From e89db1527debf67b4d6338e54784e34aec98489e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Thu, 22 May 2025 15:48:34 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=A1=B5=E8=BD=AE=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataSet/dataSetDrawer.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/dataSet/dataSetDrawer.vue b/src/views/dataSet/dataSetDrawer.vue index 35a21d8..33aaa7d 100644 --- a/src/views/dataSet/dataSetDrawer.vue +++ b/src/views/dataSet/dataSetDrawer.vue @@ -462,6 +462,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 +485,8 @@ const startPolling = () => { page: currentPage.value, pageSize: currentPageSize.value, }; - queryTableData(param); - }, 10000); + handleDataPolling(param); + }, 15000); }; const stopPolling = () => { -- Gitee From b826eb817897c21b53824404a8bd1299fc8ce029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Thu, 22 May 2025 16:37:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=9A=84=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=9B=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE=E9=9B=86=E5=92=8C?= =?UTF-8?q?=E8=AF=84=E6=B5=8B=E9=A1=B5=E9=9D=A2=E7=9A=84=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/downloadFun.ts | 6 ++++-- src/views/dataSet/index.vue | 9 +++------ src/views/evaluate/index.vue | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/utils/downloadFun.ts b/src/utils/downloadFun.ts index e1fea10..f4b3837 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/index.vue b/src/views/dataSet/index.vue index e4edd89..170551b 100644 --- a/src/views/dataSet/index.vue +++ b/src/views/dataSet/index.vue @@ -427,7 +427,7 @@ fixed="right"> -- Gitee From 15286ab09392608800e3be4771825b42d9caf607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Fri, 23 May 2025 17:06:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=A8=AA=E5=9D=90=E6=A0=87=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=83=BD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/evaluate/testCase.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/evaluate/testCase.vue b/src/views/evaluate/testCase.vue index 22c21cf..67cec00 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, -- Gitee From 14e3c2ab5e70134ff436d570c5f973bdb5060948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Mon, 26 May 2025 14:44:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=92=8C=E5=B8=83?= =?UTF-8?q?=E5=B1=80=EF=BC=9B=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=94=AF=E6=8C=81=E7=9A=84=E6=A0=BC=E5=BC=8F=EF=BC=9B?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E8=A1=A8=E6=A0=BC=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=AB=98=E5=BA=A6=E5=92=8C=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Upload/index.vue | 10 ++------- src/components/UserHeaderBar/index.vue | 2 +- src/lang/package/en.ts | 4 ++-- src/lang/package/zh-cn.ts | 4 ++-- src/styles/group.scss | 5 +++-- src/styles/knowledgeFile.scss | 3 +-- src/views/dataSet/index.vue | 16 ++++----------- src/views/evaluate/index.vue | 2 +- src/views/group/index.vue | 2 +- src/views/knowledgeFile/index.vue | 5 +++-- src/views/knowledgeLibrary/index.vue | 28 +++++++++++--------------- 11 files changed, 32 insertions(+), 49 deletions(-) diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index 5101967..2b1248b 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 63b735f..52b5c60 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 612d9e3..cc65c0c 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 dbe1dcb..a98aae3 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 54cc9a1..fe59c55 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 8742f12..15164df 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/views/dataSet/index.vue b/src/views/dataSet/index.vue index 170551b..e48316e 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"> { taskExportLoading.value = false; taskExportList.value = res.tasks.map((item: any) => { - let reportDetail = item?.task?.reports?.[0]; return { id: item.opId, taskId: item.taskId, @@ -991,9 +991,7 @@ const handleInitExportTaskList = () => { percent: item?.taskStatus === 'success' ? 100 - : reportDetail - ? ((reportDetail?.current_stage / reportDetail?.stage_cnt) * 100).toFixed(1) - : 0, + : item.taskCompleted, exportStatus: item?.taskStatus, }; }) || []; @@ -1048,7 +1046,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, @@ -1056,9 +1053,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, }; }), @@ -1119,7 +1114,6 @@ const handleBatchExport = () => { }) }), ...res.map((item: any) => { - let reportDetail = item?.task?.reports?.[0]; return { id: item.opId, taskId: item.taskId, @@ -1127,9 +1121,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 a7a6e9c..ac1e7d6 100644 --- a/src/views/evaluate/index.vue +++ b/src/views/evaluate/index.vue @@ -34,7 +34,7 @@ - diff --git a/src/views/group/index.vue b/src/views/group/index.vue index 8b7e563..26a30e7 100644 --- a/src/views/group/index.vue +++ b/src/views/group/index.vue @@ -74,7 +74,7 @@
- + @@ -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/group/groupDetail/index.vue b/src/views/group/groupDetail/index.vue index db6b8fb..324cd69 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/knowledgeLibrary/index.vue b/src/views/knowledgeLibrary/index.vue index ff41747..dc90d66 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 @@
@@ -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 = () => { @@ -905,7 +931,7 @@ const handleSwitch = (switchType: string) => { currentPage.value = 1; currentPageSize.value = 10; knoledgekeyWord.value = ''; - multipleSelection.value = []; + handleClearSelection(); isIndeterminate.value = false; handleQueryKbLibrary({ -- Gitee