diff --git a/src/assets/images/dark_bg_1.webp b/src/assets/images/dark_bg_1.webp new file mode 100644 index 0000000000000000000000000000000000000000..671c9df36fd79cf4f2ea99be5288420af253045e Binary files /dev/null and b/src/assets/images/dark_bg_1.webp differ diff --git a/src/assets/images/light_bg_1.webp b/src/assets/images/light_bg_1.webp new file mode 100644 index 0000000000000000000000000000000000000000..c0f0983f820c9ef4b99f92d0181da3864ec19daa Binary files /dev/null and b/src/assets/images/light_bg_1.webp differ diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index bf3eb6410780c7d90f1882d350ca6fe1cc750bed..9872acaa46c260692dbb5afdd6ab5cadce940659 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -18,7 +18,7 @@ {{ $t('btnText.chooseFile') }} @@ -368,13 +368,23 @@ const batchDelete = () => { ElMessage.warning(`请先选择文件再进行批量删除操作!`); return; } - selectedFiles.forEach((item) => item && deleteFile(item)); + const filesToDelete = [...selectedFiles]; + filesToDelete.forEach((item) => item && deleteFile(item)); + multipleSelection.value = []; }; const deleteFile = (row?: any) => { if (row) { const idx = fileTableList.data.findIndex((item: any) => item.id === row.id); fileTableList.data.splice(idx, 1); changeAllSizes(row.file, 'del'); + // 同步移除el-upload内部缓存 + if (uploadRef.value && uploadRef.value.uploadFiles) { + const fileIdx = uploadRef.value.uploadFiles.findIndex((f: any) => f.uid === row.file.uid); + if (fileIdx > -1) { + uploadRef.value.uploadFiles.splice(fileIdx, 1); + } + } + console.log(uploadRef.value) } }; @@ -565,20 +575,19 @@ const uploadKnowledgeFile = () => { // 提交数据集 const uploadDatasetFile = () => { - props?.handleImportLoading(true); let uploadFileNumber = 0; - uploadingList.value = fileTableList.data.map((item) => { - return { - id: item.id, - name: item.name, - file: item.file, - percent: 0, - newUploadTask: true, - }; - }); - const uploadPromises = uploadingList.value.map((item) => { - return new Promise((resolve, reject) => { - doUpload({ + props.handInitTaskList(fileTableList.data).then((res: any) => { + uploadingList.value = fileTableList.data.map((item) => { + return { + id: item.id, + name: item.name, + file: item.file, + percent: 0, + newUploadTask: true, + }; + }); + uploadingList.value.forEach((item) => { + return doUpload({ file: item.file, onProgress: (evt: any) => { if (evt < 100) { @@ -586,46 +595,46 @@ const uploadDatasetFile = () => { } }, onError: (e: any) => { + uploadFileNumber += 1; uploadingList.value = uploadingList.value.map((up) => { if (up.id === e.id) { - return { ...e, uploadStatus: 'error' }; + return { ...e, uploadStatus: 'error'}; } return up; }); - reject(e); // 传递错误 + handleToggleUploadNotify(); }, onSuccess: () => { uploadFileNumber += 1; - item.uploadStatus = 'success'; - resolve(true); // 标记成功 + if (uploadFileNumber === fileTableList.data.length) { + props.handleQueryTaskList(); + fileTableList.data = []; + } }, - fileInfo: item, + fileInfo: item }); }); + uploadingList.value = [ + ...uploadingList.value, + ...res?.map((item: any) => { + return { + id: item.opId, + taskId: item.taskId, + name: item.opName, + percent: + item?.taskStatus === 'success' + ? 100 + : item.taskCompleted, + uploadStatus: item?.taskStatus, + }; + }), + ]; + props.handleCancelVisible(); + uploadRef.value?.clearFiles(); + allFileSizes.value = 0; + uploadingList.value.length && handleToggleUploadNotify(); }); - - // 所有上传完成后统一更新列表 - Promise.allSettled(uploadPromises).then((results) => { - const successCount = results.filter((result) => result.status === 'fulfilled').length; - const errorCount = results.length - successCount; - - // 统一更新列表 - props?.handleImportLoading(false); - if (errorCount > 0) { - handleToggleUploadNotify(); - } - - // 所有上传完成后的回调 - props.handleQueryTaskList(fileTableList.data); // 统一更新列表 - }); - - uploadingList.value.length && handleToggleUploadNotify(); - props.handleCancelVisible(); - fileTableList.data = []; - uploadRef.value?.clearFiles(); - allFileSizes.value = 0; -} - +}; const handleToggleUploadNotify = () => { props.toggleUploadNotify({ showUploadNotify: true, diff --git a/src/components/Upload/uploadProgress.vue b/src/components/Upload/uploadProgress.vue index 89846fc4f3b8ed1ec2d37ac7ed380bf949691128..74d9d9c27c8dcaeb195e48d67842cec8e3975364 100644 --- a/src/components/Upload/uploadProgress.vue +++ b/src/components/Upload/uploadProgress.vue @@ -44,9 +44,7 @@ {{ `,${$t('assetLibrary.uploadIng')}...` }} -
+
diff --git a/src/components/UserHeaderBar/index.vue b/src/components/UserHeaderBar/index.vue index c0cd79746632792c82d399366241ad8d9782ad6f..30d622ae6b1404f8c3c3aafffba6a39faf87a71b 100644 --- a/src/components/UserHeaderBar/index.vue +++ b/src/components/UserHeaderBar/index.vue @@ -18,7 +18,7 @@ import '@/styles/headerBar.scss'; diff --git a/src/styles/dataSetDialog.scss b/src/styles/dataSetDialog.scss index 05326d0532420c936b0f40028f62029ea35d6100..d82da104c4b179e0ca35dc26d3dfc3de317e11af 100644 --- a/src/styles/dataSetDialog.scss +++ b/src/styles/dataSetDialog.scss @@ -7,13 +7,16 @@ } .kf-ruleForm,.dataSet-ruleForm { .el-form-item { - gap: unset !important; + gap: 24px !important; margin-bottom: 24px; div{ font-size: 12px; } .el-form-item__label{ font-size: 12px; + width: 96px !important; + padding-right: 0px !important; + font-weight: 400; } } @@ -78,10 +81,10 @@ } .el-form-item__content{ - width: 100% !important; + width: 376px !important; flex: 1 !important; .el-input,.el-textarea__inner,.el-select__wrapper{ - width: 100% !important; + width: 376px !important; } } diff --git a/src/styles/dataSetDrawer.scss b/src/styles/dataSetDrawer.scss index d867fd90c53ccb1720d43e16e6413c6577b7eef3..0d2424f4edc98962857ef5d2dc1ae1654564541d 100644 --- a/src/styles/dataSetDrawer.scss +++ b/src/styles/dataSetDrawer.scss @@ -43,7 +43,6 @@ } .dataSetInfoNameBox{ align-items: center; - margin-bottom: 8px; } .dataSetInfoLabel{ @@ -120,7 +119,7 @@ background: var(--o-bg-color-light); border-radius: 4px; font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; .dataSetListIcon{ width: 16px; height: 16px; @@ -148,7 +147,7 @@ .dataSetScoreNumber{ color: var(--o-color-major); - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; font-size: 14px; font-weight: 700; } @@ -163,11 +162,11 @@ } .el-textarea__inner{ font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; } .el-table .cell{ font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; } .el-table thead .cell{ font-weight: 500; diff --git a/src/styles/evaluate.scss b/src/styles/evaluate.scss index c41db340abaa58b3563e48c139f9010b73c5728d..f70d09429719ad72dc4bbdf3860ef874a585611c 100644 --- a/src/styles/evaluate.scss +++ b/src/styles/evaluate.scss @@ -222,13 +222,14 @@ .el-dialog__body { padding-bottom: 0px; + max-height:400px; .evaluate-form { .el-form-item { margin-bottom: 24px; .el-form-item__label{ color: var(--o-item-label-text); font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; padding: 0px; margin-right: 24px; } @@ -240,10 +241,13 @@ .el-form-item__content{ .el-input__inner,.el-textarea__inner,.el-select__selected-item{ font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; --el-input-placeholder-color: var(--o-text-color-tertiary); font-weight: 400; } + .el-textarea__inner{ + height: 88px; + } .el-input-number{ width: 104px; } @@ -266,7 +270,7 @@ .evaluate-dataSetName{ color: var(--o-text-color-primary); font-size: 12px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; line-height: 16px; } } diff --git a/src/styles/group.scss b/src/styles/group.scss index e645eed18ae2ce69e08aaca78c680bd2a300163a..7588bb462f74f2a03722df47933a6499d29c6d93 100644 --- a/src/styles/group.scss +++ b/src/styles/group.scss @@ -153,7 +153,7 @@ font-size: 12px; line-height: 16px; color: var(--o-item-label-text); - margin: 6px 0 14px; + margin: 4px 0 16px; display: -webkit-box; /* 旧版 Flexbox 兼容(必须) */ -webkit-line-clamp: 2; /* 限制显示行数 */ -webkit-box-orient: vertical; /* 垂直方向排列 */ @@ -312,7 +312,7 @@ align-items: flex-start !important; line-height: 22px; padding-top: 9px !important; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; &.is-active{ color: rgb(99, 149, 253) !important; font-weight: 500 !important; diff --git a/src/styles/knowledgeFile.scss b/src/styles/knowledgeFile.scss index c8a81a25a17ae5ce74c5ee9408ee169686c3ad9a..c9562b205d18a21f89bccdff6e5d113c51640340 100644 --- a/src/styles/knowledgeFile.scss +++ b/src/styles/knowledgeFile.scss @@ -502,8 +502,8 @@ .iconAlarmOrange { svg { - width: 24px; - height: 24px; + width: 16px; + height: 16px; } } diff --git a/src/styles/knowledgeFileSection.scss b/src/styles/knowledgeFileSection.scss index 1a03d857f813184990dca0434b8c523b3e83e46a..1a7a78a9575b8713338b3e03add6da78ea2ed63c 100644 --- a/src/styles/knowledgeFileSection.scss +++ b/src/styles/knowledgeFileSection.scss @@ -56,7 +56,7 @@ font-size: 16px; color: var(--o-text-color-primary); font-weight: 700; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; } .kf-section-info-desc { @@ -111,7 +111,7 @@ font-size: 16px; font-weight: 700; line-height: 32px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; margin-right: 24px; } @@ -526,15 +526,14 @@ .el-dialog__header { padding: 16px 24px !important; } - .el-textarea__inner{ - max-height: 500px; - } .el-dialog__body { padding: 0px; margin: 24px; - max-height:400px; + max-height:unset; + .el-textarea__inner{ - max-height: 400px; + width: 496px; + height: 440px !important; } textarea::-webkit-scrollbar { width: 4px; diff --git a/src/styles/knowledgeForm.scss b/src/styles/knowledgeForm.scss index 5bfb2a943277b9697bb41c276a2e8c839c812574..8a2fa0476749beaf13496982d2e9599653330190 100644 --- a/src/styles/knowledgeForm.scss +++ b/src/styles/knowledgeForm.scss @@ -206,6 +206,9 @@ .config-form{ margin-bottom: 8px !important; } + & :nth-last-child(2) { + margin-bottom: 0 !important; + } } .analyticMethodSelect { diff --git a/src/styles/reset.scss b/src/styles/reset.scss index e0b024cf2ca1cfe4d4c53f6c4d2f44629da95f7c..3ebcff7784d6e1bcdc5784611e774b95672122d2 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -167,7 +167,7 @@ $newHoverBg: linear-gradient( color: var(--o-text-color-secondary) !important; &:hover{ border-color: var(--o-button-bg) !important; - color: var(--o-text-color-secondary) !important; + color: rgba(99, 149, 253,1) !important; } } @@ -988,12 +988,14 @@ div:focus { border-color: none !important; } .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{ - top: 4px !important; + top: 3px !important; transform: scaleY(0.5) translateX(2px) !important; + height: 4px !important; } .el-checkbox__input.is-checked .el-checkbox__inner:after { border-color: var(--el-checkbox-checked-icon-color) !important; - transform: rotate(45deg) scaleY(1) translate(-1.5px,0px) !important; + transform: rotate(45deg) scaleY(1) translate(-2px,0px) !important; + border-width: 2px !important; } .el-input__wrapper, @@ -1119,7 +1121,8 @@ div:focus { font-size: 12px; margin-top: 8px; color: var(--o-item-label-text); - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; + font-weight: 400; } .el-table{ background-color: var(--o-bg-color-base) !important; @@ -1146,4 +1149,8 @@ div:focus { color: var(--o-button-color_hover) !important; border-color: var(--o-button-border-color_hover) !important; } +} + +.el-form-item__label{ + color: #4e5865 !important; } \ No newline at end of file diff --git a/src/styles/theme.scss b/src/styles/theme.scss index 5adad22984fdc8f944c7680ccba8b308db78fe51..68c85412d747ef491e23c6a106031be8cf11f212 100644 --- a/src/styles/theme.scss +++ b/src/styles/theme.scss @@ -1,6 +1,6 @@ body[theme='dark'] { - --o-main-bg: url('/src/assets/images/dark_bg.webp'); + --o-main-bg: url('/src/assets/images/dark_bg_1.webp'); --o-bg-dialog:var(--o-bg-color-base); --o-button-bg:rgb(99 149 253); --o-tag-text-color:rgb(99 149 253); @@ -25,7 +25,7 @@ body[theme='dark'] { } body[theme='light'] { - --o-main-bg: url('/src/assets/images/light_bg.webp'); + --o-main-bg: url('/src/assets/images/light_bg_1.webp'); --o-bg-dialog:var(--o-bg-color-base); --o-button-bg:rgb(99 149 253); --o-tag-text-color:rgb(99 149 253); diff --git a/src/styles/upload.scss b/src/styles/upload.scss index 2a6bfa3a016918df1f0681eb7c3494edd384c03d..bab2dabe180f3644738d09a3db3ea43abe9fb629 100644 --- a/src/styles/upload.scss +++ b/src/styles/upload.scss @@ -218,6 +218,9 @@ width: 4px !important; } } + .el-table__header-wrapper .el-table-column--selection>.cell{ + height: 32px; + } } .upload-btns { diff --git a/src/styles/uploadProgress.scss b/src/styles/uploadProgress.scss index d461071bc10205016cb11df9984b1480bf9fa128..74f64081791ca0a88f52dc3f42e5ae9d63e22296 100644 --- a/src/styles/uploadProgress.scss +++ b/src/styles/uploadProgress.scss @@ -7,7 +7,7 @@ overflow: hidden; background-color: var(--o-bg-color-base); border-color: var(--o-bg-color-base); - border-radius: var(--o-border-radius); + border-radius:8px; box-shadow: var(--o-task-box-shadow); .o-upload-notify__head { @@ -37,7 +37,7 @@ } .o-upload-notify__body { - padding:0 16px 8px; + padding:0 0 8px 16px; background-color: var(--o-bg-color-light); } @@ -45,8 +45,16 @@ display: flex; flex-direction: column; gap: 8px; - max-height: 500px; + max-height: 434px; overflow-y: auto; + padding-right: 16px; + &::-webkit-scrollbar { + width: 4px; // 调整滚动条宽度 + } + // 滚动条滑块样式 + &::-webkit-scrollbar-thumb { + background: #C3CECF; // 滑块颜色 + } .item { padding: 16px; @@ -106,11 +114,9 @@ margin-top: 6px; font-size: 12px; color: var(--o-text-color-primary); - font-size: 12px; font-weight: 600; .el-icon { font-size: 14px; - path { fill: green !important; } @@ -123,7 +129,6 @@ margin-top: 6px; font-size: 12px; color: rgb(0 0 0); - font-size: 12px; font-weight: 600; .el-icon { font-size: 14px; @@ -141,9 +146,7 @@ } .item-all-close { - width: 100%; - margin-top: 16px; - margin-bottom: 8px; + padding: 16px 16px 8px; font-size: 12px; font-weight: 700; color: rgb(99,149,253); diff --git a/src/views/dataSet/dataSetDrawer.vue b/src/views/dataSet/dataSetDrawer.vue index 604296d4b010c2ad5daca2d34423c1b22c67d430..cf487dae05c13e786b5e8199e2fabe2566bdf0ed 100644 --- a/src/views/dataSet/dataSetDrawer.vue +++ b/src/views/dataSet/dataSetDrawer.vue @@ -57,7 +57,7 @@ -
+
{{ $t('dataset.datasetName') }}
@@ -734,6 +735,7 @@ const handleQueryDataSetList = ( const handleCleartTimer = () => { clearInterval(pollingKfTimer.value); + clearInterval(taskTimer.value); pollingKfTimer.value = null; }; @@ -1001,9 +1003,6 @@ const handleUploadMyFile = (options: any) => { options.onError({ ...options.fileInfo, error: err }); }); }; -const handleQueryTaskList = () => { - handleSearchOpsData(true, false); -}; const handleCancelVisible = () => { dialogImportVisible.value = false; @@ -1027,7 +1026,7 @@ const handleInitExportTaskList = () => { exportTaskTotal.value = res?.total || 0; taskExportLoading.value = false; taskExportList.value = - res.tasks.map((item: any) => { + res?.tasks.map((item: any) => { return { id: item.opId, taskId: item.taskId, @@ -1182,7 +1181,11 @@ const handleCloseAllTask=(type: ITaskType)=>{ teamId, taskType:type }).then(() => { - handleInitExportTaskList(); + if(type === 'kb_export'){ + handleInitExportTaskList(); + }else{ + handelTaskList(); + } }).finally(()=>{ taskExportLoading.value = false; }) @@ -1258,5 +1261,63 @@ watch(()=>dataSetDrawerVisible.value,()=>{ handleSearchData(); } }) - +const taskTimer = ref(); +const taskListLoading = ref(false) +const importTaskPage = ref(1); +const importTaskPageSize = ref(10); +const importTaskList = ref([]); +const handelTaskList = () => { + KbAppAPI.queryTaskList({ + teamId:localStorage.getItem('teamId') ?? '', + taskType: 'dataset_import', + page: 1, + pageSize: importTaskPageSize.value, + }).then((res: any) => { + importTaskList.value = res?.tasks || []; + importTaskTotal.value = res.total; + taskListImportDate.value = Date.now(); + taskListLoading.value = false; + if (res?.tasks?.every((item: any) => !['pending', 'running'].includes(item.taskStatus))) { + clearInterval(taskTimer.value); + taskTimer.value = null; + handleSearchData() + } + }); +}; +const handleQueryTaskList = () => { + taskTimer.value = setInterval(() => { + handelTaskList(); + }, 2500); +}; +const handleStopUploadFile = (taskId: string) => { + if(taskId==='all'){ + handleCloseAllTask('dataset_import'); + }else{ + taskListImportDate.value = Date.now(); + taskListLoading.value = true; + let payload: any = { + taskId + }; + KbAppAPI.stopOneTaskList(payload).then((res:any) => { + handelTaskList(); + importTaskList.value = res?.tasks || []; + importTaskTotal.value = res.total || 0; + taskListImportDate.value = Date.now(); + }).finally(()=>{ + taskListLoading.value = false; + }); + } +}; +const handInitTaskList = (selectedFiles: string | any[]) => { + return KbAppAPI.queryTaskList({ + teamId:localStorage.getItem('teamId') ?? '', + taskType: 'dataset_import', + page: 1, + pageSize: importTaskPageSize.value, + }).then((res: any) => { + importTaskList.value = res.tasks || []; + importTaskTotal.value = selectedFiles ? res.total + selectedFiles.length : res.total; + return res.tasks || []; + }); +}; diff --git a/src/views/group/createGroup.vue b/src/views/group/createGroup.vue index 71149a7dff2714385fa216ec25bd095a004bca0e..6c7dde5a735e437d8e970e1b2ebb61a369341320 100644 --- a/src/views/group/createGroup.vue +++ b/src/views/group/createGroup.vue @@ -10,7 +10,7 @@ - + @@ -171,7 +171,7 @@ const handleCancelVisible = () => { color: var(--o-item-label-text); padding-right: 0px; margin-right: 24px; - font-family: 'HarmonyOS Sans SC'; + font-family: 'HarmonyOS Sans SC Regular'; width: 48px !important; } .el-form-item__label:before { @@ -190,6 +190,30 @@ const handleCancelVisible = () => { } } + .isPublicItem { + .el-form-item__label, .el-form-item__content{ + height: 16px !important; + line-height: 16px !important; + min-height: 16px; + .el-switch{ + height: 16px !important; + .el-switch__core{ + height: 16px !important; + width: 32px !important; + min-width: 32px !important; + .el-switch__action{ + width: 12px !important; + height: 12px !important; + } + } + + } + .el-switch.is-checked .el-switch__core .el-switch__action{ + left: calc(100% - 13px) !important; + } + } + } + } } diff --git a/src/views/knowledgeFile/dataSetDialog.vue b/src/views/knowledgeFile/dataSetDialog.vue index 591296e97674577e40255c6936d4b1a4be93b1fb..953d237d1a179505faaaaae1df1e8d5ea5af837d 100644 --- a/src/views/knowledgeFile/dataSetDialog.vue +++ b/src/views/knowledgeFile/dataSetDialog.vue @@ -57,10 +57,10 @@ - + - + diff --git a/src/views/knowledgeFile/index.vue b/src/views/knowledgeFile/index.vue index aec65243cd7bddd269bbf9a2cf6c558e689174cf..ef9c4628a7b0fae988e60b015b87379d0dbc9830 100644 --- a/src/views/knowledgeFile/index.vue +++ b/src/views/knowledgeFile/index.vue @@ -565,6 +565,7 @@ :handleUploadRestart="uploadTaskListData.handleUploadRestart" :taskListImportDate="taskListImportDate" :importTaskTotal="importTaskTotal" + :handleCloseSingleUpload="handleStopUploadFile" :isShowAllClear="true" /> \ No newline at end of file diff --git a/src/views/knowledgeFileSection/index.vue b/src/views/knowledgeFileSection/index.vue index 263988070a4dba2eb9e1a436634bb865dacf48ae..64ec90d9d2892a2005e1cc9150f578bba0e5f64a 100644 --- a/src/views/knowledgeFileSection/index.vue +++ b/src/views/knowledgeFileSection/index.vue @@ -232,7 +232,7 @@ class="kf-section-edit-dialog" v-model="contentDialogVisible" :title="$t('btnText.edit')" - width="500" + width="544" align-center >