diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index 51019679f8973bda24dde60b27017ef424302dc4..2b1248b63dce4c85676c31219e5822ad0d502b10 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -344,7 +344,6 @@ const handleUploadRestart = (item: any) => {
});
},
onSuccess: () => {
- item.percent = 100;
props.handInitTaskList();
},
fileInfo: item,
@@ -389,7 +388,7 @@ watch(
newUploadTask: false,
taskId: item.taskId,
name: item.opName,
- percent: item?.taskStatus && item?.taskStatus !== 'pending' ? 100 : 99,
+ percent: item?.taskStatus && item?.taskStatus === 'success' ? 100 : (item?.taskStatus === 'failed'? 0 : 99),
uploadStatus: item?.taskStatus,
};
});
@@ -465,7 +464,6 @@ const uploadFiles = () => {
uploadingList.value = [
...uploadingList.value,
...res?.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -473,9 +471,7 @@ const uploadFiles = () => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail?.current_stage
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
uploadStatus: item?.taskStatus,
};
}),
@@ -534,7 +530,6 @@ const uploadKnowledgeFile = () => {
},
onSuccess: () => {
uploadFileNumber += 1;
- item.percent = 100;
item.uploadStatus = 'success';
resolve(true); // 标记成功
},
@@ -598,7 +593,6 @@ const uploadDatasetFile = () => {
},
onSuccess: () => {
uploadFileNumber += 1;
- item.percent = 100;
item.uploadStatus = 'success';
resolve(true); // 标记成功
},
diff --git a/src/components/UserHeaderBar/index.vue b/src/components/UserHeaderBar/index.vue
index 63b735ff0e0435c95ad367ccf6f44c21acfee92d..52b5c6004446979b097599e3cc73eb43bfcb3cab 100644
--- a/src/components/UserHeaderBar/index.vue
+++ b/src/components/UserHeaderBar/index.vue
@@ -28,7 +28,7 @@ import '@/styles/headerBar.scss';
.knowledge-show-text {
font-size: 16px;
- line-height: 24px;
+ line-height: 21px;
color: rgb(78 88 101);
}
}
diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts
index 612d9e3ca7a50a8575a5869d66a249bd791b9582..cc65c0c8e4303216e21ef5cbf1994bf38f46040a 100644
--- a/src/lang/package/en.ts
+++ b/src/lang/package/en.ts
@@ -59,7 +59,7 @@ export default {
assetId: 'Asset ID',
welcomeUsePro: 'Welcome to witChainD!',
profile:
- 'witChainD offers efficient document management and intelligent analysis,supporting a variety of file formats including md,xlsx,pdf,doc,docx,pptx,html and txt.Equipped with an advanced document processing technology and powerful retrieval capabilities of the openEuler Intelligence,WitchainD aims to provide you with an exceptional intelligent Q&A service.',
+ 'witChainD offers efficient document management and intelligent analysis,supporting a variety of file formats including xlsx,pdf,doc,docx,pptx,html,json,yaml,md,zip and txt.Equipped with an advanced document processing technology and powerful retrieval capabilities of the openEuler Intelligence,WitchainD aims to provide you with an exceptional intelligent Q&A service.',
message: {
name: 'Enter an asset libraray name.',
libraryNameLen: 'The asset library name can contain 1 to 15 characters.',
@@ -185,7 +185,7 @@ export default {
fileZipFormat:
'The file must be in .zip format. A maximum of five asssets with a total size of 5 GB can be uploaded.',
fileAllFormat:
- 'The file can be in .md,.xlsx,.pdf,.doc,.docx,.pptx,.html or .txt format. A maximum of 100 files with a total size of 500 MB can be uploaded.',
+ 'The file can be in .xlsx,.pdf,.doc,.docx,.txt,.pptx,.html,.json,.yaml,.md or .zip format. A maximum of 100 files with a total size of 500 MB can be uploaded.',
continueAdd: 'You can drag files to the list area below to add more.',
dragDropAdd: 'Drop files here.',
dragFile: 'Drop files here.',
diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts
index dbe1dcb8c1471c6c30ba010d6a4b4a5927e01125..a98aae3944da09a0dfe058440b6f04e6fb0f3f50 100644
--- a/src/lang/package/zh-cn.ts
+++ b/src/lang/package/zh-cn.ts
@@ -64,7 +64,7 @@ export default {
assetId: '资产ID',
welcomeUsePro: '欢迎使用知识库!',
profile:
- '知识库专注于文档的高效管理和智能解析,支持包括md,xlsx,pdf,doc,docx,pptx,html以及txt在内的多种文件格式。本平台搭载的先进文档处理技术,结合openEuler Intelligence的强大检索功能,旨在为您提供卓越的智能问答服务体验。',
+ '知识库专注于文档的高效管理和智能解析,支持包括xlsx,pdf,doc,docx,pptx,html,json,yaml,md,zip以及txt在内的多种文件格式。本平台搭载的先进文档处理技术,结合openEuler Intelligence的强大检索功能,旨在为您提供卓越的智能问答服务体验。',
message: {
name: '请输入资产库名称',
libraryNameLen: '资产库名称长度1-15个字符',
@@ -191,7 +191,7 @@ export default {
confirmCancelAnalytic: '确认取消解析?点击确认后将停止解析,请谨慎操作。',
fileZipFormat: '文件支持.zip格式,最多支持上传5个资产库,资产库总大小不超过5GB',
fileAllFormat:
- '文件支持.md,.xlsx,.pdf,.doc,.docx,.txt,.pptx,.html格式,最多支持上传128个文件,文件总大小不超过500MB',
+ '文件支持.xlsx,.pdf,.doc,.docx,.txt,.pptx,.html,.json,.yaml,.md,.zip格式,最多支持上传128个文件,文件总大小不超过500MB',
continueAdd: '您仍可以通过拖拽文件到下方列表区域进行文件添加',
dragDropAdd: '将文件拖到此处即可继续添加',
dragFile: '将文件拖到此处',
diff --git a/src/styles/group.scss b/src/styles/group.scss
index 54cc9a164590d048878d1916aef19ffffdee0f32..fe59c55e212a2987a27b13a5254611b537e5227a 100644
--- a/src/styles/group.scss
+++ b/src/styles/group.scss
@@ -86,8 +86,9 @@
}
}
.group-content-container{
- min-height: calc(100vh - 454px);
+ min-height: calc(100vh - 464px);
margin-top: 16px;
+ margin-bottom: 10px;
.group-tabs-content {
margin-top: 16px;
@@ -96,7 +97,7 @@
display: grid;
grid-template-columns: repeat(auto-fill, 339px);
gap: 16px;
- max-height: 690px;
+ max-height: 660px;
overflow-y: auto;
.group-card-empty{
display: flex;
diff --git a/src/styles/knowledgeFile.scss b/src/styles/knowledgeFile.scss
index 8742f121d3034c86c9b7b52e1a11932431c741ae..15164dfbbf64b35c9a0be25d4c889d89894cecf6 100644
--- a/src/styles/knowledgeFile.scss
+++ b/src/styles/knowledgeFile.scss
@@ -124,7 +124,7 @@
}
.kf-container-table-box {
- height: calc(100% - 40px);
+ height: calc(100% - 56px);
display: flex;
flex-direction: column;
tbody {
@@ -207,7 +207,6 @@
}
.el-pagination {
- margin-top: 0;
margin-top: 24px !important;
}
diff --git a/src/styles/reset.scss b/src/styles/reset.scss
index c2b20a4c36fc21462c372163adbefd3369b2b663..61a8ced50894326ca98545d36736905aec91ceec 100644
--- a/src/styles/reset.scss
+++ b/src/styles/reset.scss
@@ -818,7 +818,7 @@ div:focus {
}
}
.el-select-dropdown__item.is-hovering {
- background-color: rgb(122,165,225);
+ background-color: rgb(122,165,225) !important;
span {
color: #fff !important;
}
diff --git a/src/utils/downloadFun.ts b/src/utils/downloadFun.ts
index e1fea102330e296ab55038c7b876d69cc382a15a..f4b38379562caaa40e822194391a5cd0fb4ebe02 100644
--- a/src/utils/downloadFun.ts
+++ b/src/utils/downloadFun.ts
@@ -6,7 +6,7 @@ export function downloadFun(url: string) {
const { parentToken } = storeToRefs(appStore);
const token = parentToken.value || localStorage.getItem('ECSESSION');
if (!token) {
- console.error('Token is not available yet');
+ ElMessage.error(`Token is not available yet`);
return;
}
useAppStoreHook().changeDownLoading(true);
@@ -39,7 +39,9 @@ export function downloadFun(url: string) {
a.click();
URL.revokeObjectURL(a.href);
})
- .catch((error) => console.error('下载失败:', error))
+ .catch((error) => {
+ ElMessage.error(`下载失败: ${error}`);
+ })
.finally(() => {
useAppStoreHook().changeDownLoading(false);
});
diff --git a/src/views/dataSet/dataSetDrawer.vue b/src/views/dataSet/dataSetDrawer.vue
index 35a21d868656adf2f46c7d894ac9772b92cc36ec..2cc1affd2927574b8d02d5f46e27ac7c63cfd42a 100644
--- a/src/views/dataSet/dataSetDrawer.vue
+++ b/src/views/dataSet/dataSetDrawer.vue
@@ -208,7 +208,7 @@
删除
@@ -263,6 +263,7 @@ import dataSetAPI from '@/api/dataSet';
import empty_pending from '@/assets/images/empty_pending.svg'
import empty_failed from '@/assets/images/empty_failed.svg'
import empty_running from '@/assets/images/empty_running.svg'
+import { IconAlarm } from '@computing/opendesign-icons';
const loading = ref(false);
const dataSetDrawerVisible = ref(false);
@@ -387,7 +388,37 @@ const handleEditRow = (dataId: any,property: string | number,value: any)=>{
const handleBatchDelete =()=>{
let ids = selectionDataSetList.value.map((item:any)=>item.dataId)
- handleDelete(ids);
+ ElMessageBox.confirm(
+ `确定删除选择的数据吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ handleDelete(ids)
+ })
+}
+const handleSingleDelete=(ids:any)=>{
+ ElMessageBox.confirm(
+ `确定删除此条数据吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ handleDelete(ids)
+ })
+
}
const handleDelete=(ids:any)=>{
@@ -462,6 +493,20 @@ const queryTableData=(params: any)=>{
})
}
+const handleDataPolling = (params: any) => {
+ const param={
+ datasetId:props.dataSetRow.datasetId,
+ ...params,
+ }
+ dataSetAPI.querySingleDataSetInfo(param).then((res:any)=>{
+ tableData.value.data = res.datas;
+ totalCount.value = res.total;
+ if(res.datas.length && res.total){
+ stopPolling();
+ }
+ })
+};
+
let pollingTimer: any = null;
const startPolling = () => {
@@ -471,8 +516,8 @@ const startPolling = () => {
page: currentPage.value,
pageSize: currentPageSize.value,
};
- queryTableData(param);
- }, 10000);
+ handleDataPolling(param);
+ }, 15000);
};
const stopPolling = () => {
diff --git a/src/views/dataSet/index.vue b/src/views/dataSet/index.vue
index e4edd89cbe56123ea802dd7e00d249c708e3f807..ba44090a1d3c1f23aefb20fece7900ad61d9aae2 100644
--- a/src/views/dataSet/index.vue
+++ b/src/views/dataSet/index.vue
@@ -169,6 +169,7 @@
:row-key="(row) => row.datasetId"
@selection-change="handleSelectionChange"
ref="multipleTable"
+ max-height="782"
:border="false">
暂停
@@ -435,10 +436,7 @@
生成
@@ -521,7 +519,7 @@
import EmptyStatus from '@/components/EmptyStatus/index.vue';
import { useGroupStore } from '@/store/modules/group';
import { IconCaretDown, IconFilter, IconCaretUp, IconSearch, IconAlarm, IconChevronUp, IconChevronDown, IconX } from '@computing/opendesign-icons';
-import { DataSetStatusEnum } from '@/enums/KnowledgeEnum';
+import { DataSetStatusEnum, StatusEnum } from '@/enums/KnowledgeEnum';
import FilterContainr from '@/components/TableFilter/index.vue';
import DataSetDrawer from './dataSetDrawer.vue';
import CreateEvaluate from '@/views/dataSet/craeteEvaluate.vue';
@@ -805,13 +803,26 @@ const handleBatchDownBth = (e: boolean) => {
};
const handleSelectDeleteDataSet = () => {
- loading.value = true;
- const params = selectionDataSetList.value.map((row: any)=>row.datasetId)
- dataSetAPI.delDataSet(params).then(()=>{
- handleSearchData();
- }).finally(()=>{
- loading.value = false;
- selectionDataSetList.value = [];
+ ElMessageBox.confirm(
+ `确定删除选择的数据集吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(() => {
+ loading.value = true;
+ const params = selectionDataSetList.value.map((row: any)=>row.datasetId)
+ dataSetAPI.delDataSet(params).then(()=>{
+ handleSearchData();
+ }).finally(()=>{
+ loading.value = false;
+ selectionDataSetList.value = [];
+ })
})
};
@@ -833,12 +844,25 @@ const handelStatusFilterProper = (filterList: any) => {
};
const handleDeleteDataSet = (row: any) => {
- loading.value = true;
- const params = [row.datasetId];
- dataSetAPI.delDataSet(params).then(()=>{
- handleSearchData();
- }).finally(()=>{
- loading.value = false;
+ ElMessageBox.confirm(
+ `确定删除数据集【${row.datasetName}】 吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ loading.value = true;
+ const params = [row.datasetId];
+ dataSetAPI.delDataSet(params).then(()=>{
+ handleSearchData();
+ }).finally(()=>{
+ loading.value = false;
+ })
})
};
@@ -986,7 +1010,6 @@ const handleInitExportTaskList = () => {
taskExportLoading.value = false;
taskExportList.value =
res.tasks.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -994,9 +1017,7 @@ const handleInitExportTaskList = () => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}) || [];
@@ -1051,7 +1072,6 @@ const handleExportDataSet = async (row: any) => {
return item;
}),
...res.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -1059,9 +1079,7 @@ const handleExportDataSet = async (row: any) => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}),
@@ -1122,7 +1140,6 @@ const handleBatchExport = () => {
})
}),
...res.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -1130,9 +1147,7 @@ const handleBatchExport = () => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}),
diff --git a/src/views/evaluate/index.vue b/src/views/evaluate/index.vue
index ba84d0efddb4d54feb2442c3eca0865a5d2ce95e..7deac95fe56b153fb80320b3983bff99efef9381 100644
--- a/src/views/evaluate/index.vue
+++ b/src/views/evaluate/index.vue
@@ -34,7 +34,7 @@
-
@@ -178,12 +178,12 @@
暂停
- 重启
- 下载
- 删除
+ 删除
@@ -448,8 +448,38 @@ const handleDelete = (arr: any) => {
})
}
+const handleSingleDelete = (row: any) => {
+ ElMessageBox.confirm(
+ `确定删除测试数据【${row.testingName}】吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ handleDelete([row]);
+ })
+}
+
const handleBatchDelete = () => {
- handleDelete(selectedRow.value)
+ ElMessageBox.confirm(
+ `确定删除选择的测试数据吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ handleDelete(selectedRow.value);
+ })
}
const handelStatusFilterProper = (filterList: any) => {
searchPayload.value.runStatus = filterList;
diff --git a/src/views/evaluate/testCase.vue b/src/views/evaluate/testCase.vue
index 22c21cfd0ecd1bc80abda74fc9312ae2673ab1ac..67cec0006e4759dc02eb597b1e713a1c300ab4b9 100644
--- a/src/views/evaluate/testCase.vue
+++ b/src/views/evaluate/testCase.vue
@@ -349,8 +349,10 @@ const initChart = async () => {
lineStyle: {
color: 'rgb(141,152,170)',
}
+ },
+ axisLabel: {
+ interval: 0 // 确保所有标签都显示
}
-
},
yAxis: {
interval: 50,
diff --git a/src/views/group/groupDetail/index.vue b/src/views/group/groupDetail/index.vue
index db6b8fb233aec1e1a6c00ee48671300fb0962bb0..324cd69af3da9a2c86d21b5546c64eaa4a0abf7c 100644
--- a/src/views/group/groupDetail/index.vue
+++ b/src/views/group/groupDetail/index.vue
@@ -102,7 +102,7 @@ const handleClick = (tab: any, event: any) => { };
const handleDeleteTeam=() => {
ElMessageBox.confirm(
- `解散【${curTeamInfo.value.teamName}】团队后,该团队下的所有项目都将被同步删除,且不可恢复!请谨慎操作。`,
+ `解散【${form.value.teamName}】团队后,该团队下的所有项目都将被同步删除,且不可恢复!请谨慎操作。`,
'提示',
{
confirmButtonText: '确定',
@@ -120,7 +120,7 @@ const handleDeleteTeam=() => {
delNav(1);
router.push('/group');
handleSwitchMenu('knowledge')
- ElMessage.success(`团队【${curTeamInfo.value.teamName}】解散成功`);
+ ElMessage.success(`团队【${form.value.teamName}】解散成功`);
})
})
}
@@ -182,6 +182,10 @@ onMounted(()=>{
color: rgba(78,88,101,0.8) !important;
}
}
+ .el-button{
+ width: 64px;
+ height: 24px;
+ }
}
}
diff --git a/src/views/group/index.vue b/src/views/group/index.vue
index 8b7e563379cca829535bc9b708831fcfa767f17d..26a30e7909d272d381652e8a62f33bad1f2a02ab 100644
--- a/src/views/group/index.vue
+++ b/src/views/group/index.vue
@@ -74,7 +74,7 @@
-
+
diff --git a/src/views/knowledgeFile/index.vue b/src/views/knowledgeFile/index.vue
index eb18995f1276136e30e392a6b94b5506d2f9a295..3ba9fff597e8dd7631a6f928375dfab935d88de6 100644
--- a/src/views/knowledgeFile/index.vue
+++ b/src/views/knowledgeFile/index.vue
@@ -395,6 +395,7 @@
:page-sizes="pagination.pageSizes"
:layout="pagination.layout"
:total="totalCount"
+ :default-page-size="20"
popper-class="kbLibraryPage"
@change="handleChangePage" />
@@ -410,7 +411,7 @@
:singleFileLimit="true"
:singleFileSize="0.05"
:tipText="$t('dialogTipText.fileAllFormat')"
- accept=".md,.xlsx,.pdf,.doc,.docx,.txt,.pptx,.html"
+ accept=".xlsx,.pdf,.doc,.docx,.txt,.pptx,.html,.md,.json,.yaml,.md,.zip"
:maxFileNum="128"
:maxSize="0.488"
:handleUploadMyFile="handleUploadMyFile"
@@ -1038,7 +1039,7 @@ const handleQueryKbData = () => {
teamId,
kbId: kbId,
page: 1,
- pageSize: 10,
+ pageSize: 20,
}).then((res: any) => {
kbInfo.value = res.kbList?.[0] || {};
let categoryList = JSON.parse(
diff --git a/src/views/knowledgeLibrary/index.vue b/src/views/knowledgeLibrary/index.vue
index 2868ab4b1995957d34466caee8a94e10fb2d0061..dc90d66d9e05415adec4a578eb92ec8a0d5fd7d7 100644
--- a/src/views/knowledgeLibrary/index.vue
+++ b/src/views/knowledgeLibrary/index.vue
@@ -227,8 +227,8 @@
class="kl-single-card"
@click="handleJumpAssets(item)"
v-for="item in fileTableList.data"
- :key="item.id"
- :class="{'is-checked': item.checked}">
+ :key="item?.kbId"
+ :class="{'is-checked': item?.checked}">
@@ -262,6 +262,7 @@
handleCheckboxChange(val, item)"
/>
@@ -320,6 +321,7 @@
class="kl-table-box"
v-else>
({
data: [],
});
+const tableListRef = ref();
const taskTimer = ref();
const batchDownBth = ref(false);
const multiple = ref(false)
const multipleSelection = ref([]);
const isAllChecked = computed(() => {
if (!fileTableList.data.length) return false;
- return fileTableList.data.every(item => item.checked);
+ return fileTableList.data.every(item => item?.checked);
});
const isIndeterminate = ref(false);
@@ -732,11 +736,21 @@ const handleSelectAll = (checked:CheckboxValueType) => {
isIndeterminate.value = false;
};
+const handleClearSelection = () => {
+ tableListRef.value?.clearSelection();
+ fileTableList.data.forEach(item => {
+ item.checked = false;
+ });
+ multipleSelection.value = [];
+ isIndeterminate.value = false;
+};
+
const handleBatchDownBth = (e: boolean) => {
batchDownBth.value = e;
};
const handleDelete= async (ids:string[],successFn:Function)=>{
+ loading.value = true;
KbAppAPI.delKbLibrary(ids).then((res) => {
if (res) {
ElMessage({
@@ -755,16 +769,28 @@ const handleDelete= async (ids:string[],successFn:Function)=>{
});
}
const handleBatchDelete = () => {
- loading.value = true;
- const ids = multipleSelection.value.map(item => item.kbId);
- const successFn = ()=>{
- multipleSelection.value = [];
- handleQueryKbLibrary({
- page: 1,
- pageSize: 10,
- });
- }
- handleDelete(ids,successFn);
+ ElMessageBox.confirm(
+ `确定删除选择的资产库吗?`,
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ cancelButtonClass: 'el-button--primary',
+ confirmButtonClass: 'el-button-confirm',
+ type: 'warning',
+ icon:markRaw(IconAlarm)
+ }
+ ).then(()=>{
+ const ids = multipleSelection.value.map(item => item.kbId);
+ const successFn = ()=>{
+ handleClearSelection();
+ handleQueryKbLibrary({
+ page: 1,
+ pageSize: 10,
+ });
+ }
+ handleDelete(ids,successFn);
+ })
}
const handleBatchExport = () => {
@@ -804,7 +830,6 @@ const handleBatchExport = () => {
taskExportList.value = [
...arr,
...res.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -812,9 +837,7 @@ const handleBatchExport = () => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}),
@@ -908,7 +931,7 @@ const handleSwitch = (switchType: string) => {
currentPage.value = 1;
currentPageSize.value = 10;
knoledgekeyWord.value = '';
- multipleSelection.value = [];
+ handleClearSelection();
isIndeterminate.value = false;
handleQueryKbLibrary({
@@ -993,12 +1016,13 @@ const handleStopUploadFile = (taskId: string) => {
taskId
};
KbAppAPI.stopOneTaskList(payload).then((res:any) => {
- handleInitExportTaskList();
+ handelTaskList();
importTaskList.value = res.tasks || [];
- taskListLoading.value = false;
importTaskTotal.value = res.total || 0;
taskListImportDate.value = Date.now();
- })
+ }).finally(()=>{
+ taskListLoading.value = false;
+ });
}
};
@@ -1045,7 +1069,6 @@ const handleExportKl = async (row: any) => {
return item;
}),
...res.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -1053,9 +1076,7 @@ const handleExportKl = async (row: any) => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}),
@@ -1112,7 +1133,11 @@ const handleCloseAllTask=(type: ITaskType)=>{
teamId: route.query.id as string,
taskType:type
}).then(() => {
- handleInitExportTaskList();
+ if(type === 'kb_export'){
+ handleInitExportTaskList();
+ }else{
+ handelTaskList();
+ }
}).finally(()=>{
taskExportLoading.value = false;
})
@@ -1129,7 +1154,6 @@ const handleInitExportTaskList = () => {
taskExportLoading.value = false;
taskExportList.value =
res.tasks.map((item: any) => {
- let reportDetail = item?.task?.reports?.[0];
return {
id: item.opId,
taskId: item.taskId,
@@ -1137,9 +1161,7 @@ const handleInitExportTaskList = () => {
percent:
item?.taskStatus === 'success'
? 100
- : reportDetail
- ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1)
- : 0,
+ : item.taskCompleted,
exportStatus: item?.taskStatus,
};
}) || [];