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"> @@ -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 @@
- +