From 0a47e63e7376110e073f422bc26f38ebe91e7422 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 24 Dec 2024 16:37:05 +0800 Subject: [PATCH] feat: batch cancel task --- ui/src/api/document.ts | 11 ++++++- ui/src/styles/element-plus.scss | 1 - ui/src/views/document/index.vue | 56 +++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/ui/src/api/document.ts b/ui/src/api/document.ts index 6356a722e27..7ad275949c1 100644 --- a/ui/src/api/document.ts +++ b/ui/src/api/document.ts @@ -359,6 +359,14 @@ const cancelTask: ( ) } +const batchCancelTask: ( + dataset_id: string, + data: any, + loading?: Ref +) => Promise> = (dataset_id, data, loading) => { + return put(`${prefix}/${dataset_id}/document/cancel_task/_batch`, data, undefined, loading) +} + export default { postSplitDocument, getDocument, @@ -383,5 +391,6 @@ export default { batchRefresh, batchGenerateRelated, cancelTask, - exportDocumentZip + exportDocumentZip, + batchCancelTask } diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index 251671f0b00..400e303fecc 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -6,7 +6,6 @@ --el-text-color-regular: #1f2329; --el-color-info: #8f959e !important; --el-disabled-bg-color: #eff0f1; - --el-disabled-border-color: #bbbfc4; --el-text-color-primary: #1f2329; } diff --git a/ui/src/views/document/index.vue b/ui/src/views/document/index.vue index 486cdbbb7e3..117fad4a50b 100644 --- a/ui/src/views/document/index.vue +++ b/ui/src/views/document/index.vue @@ -1,5 +1,5 @@ - +