From 4ef0905061c053a1aad71dbda573b5b293a4d569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Fri, 18 Apr 2025 16:26:06 +0800 Subject: [PATCH 01/82] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=A2=E9=98=9F?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.ts | 3 +- src/router/index.ts | 28 ++- src/store/index.ts | 2 + src/store/modules/group.ts | 34 ++++ src/styles/group.scss | 245 +++++++++++++++++++++++++++ src/styles/knowledgeFile.scss | 4 +- src/styles/knowledgeFileSection.scss | 5 +- src/styles/knowledgeLibrary.scss | 18 +- src/styles/reset.scss | 4 +- src/views/group/data.js | 3 + src/views/group/index.vue | 191 +++++++++++++++++++++ src/views/login/index.vue | 2 +- 13 files changed, 515 insertions(+), 25 deletions(-) create mode 100644 src/store/modules/group.ts create mode 100644 src/styles/group.scss create mode 100644 src/views/group/data.js create mode 100644 src/views/group/index.vue diff --git a/package.json b/package.json index ab97dd9..3ebe5ff 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.2", "pinia": "^2.2.2", + "pinia-plugin-persistedstate": "^4.2.0", "qs": "^6.13.0", "sortablejs": "^1.15.2", "uuid": "^10.0.0", diff --git a/src/main.ts b/src/main.ts index 7b71c80..4b9c52a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,10 +19,11 @@ import '@/styles/index.scss'; import 'uno.css'; import 'animate.css'; import router from './router'; +import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; const app = createApp(App); -app.use(createPinia()); +app.use(createPinia().use(piniaPluginPersistedstate)); app.use(router); app.use(ElementPlus, { locale: zhCn, diff --git a/src/router/index.ts b/src/router/index.ts index 7e05ad4..8df835e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -14,8 +14,27 @@ export const constantRoutes: RouteRecordRaw[] = [ meta: { hidden: true }, }, { - path: '/NotFoundPage', - component: () => import('@/views/notFoundPage/index.vue'), + path: '/group', + name: 'Group', + component: () => import('@/views/group/index.vue'), + meta: { hidden: true }, + }, + { + path: '/groupInfo', + name: 'GroupInfo', + component: () => import('@/views/group/groupInfo.vue'), + meta: { hidden: true }, + }, + { + path: '/libraryInfo', + name: 'libraryInfo', + component: () => import('@/views/knowledgeLibrary/libraryInfo.vue'), + meta: { hidden: true }, + }, + { + path: '/documentInfo', + name: 'documentInfo', + component: () => import('@/views/knowledgeFile/documentInfo.vue'), meta: { hidden: true }, }, { @@ -33,6 +52,11 @@ export const constantRoutes: RouteRecordRaw[] = [ component: () => import('@/views/knowledgeFileSection/index.vue'), meta: { hidden: true }, }, + { + path: '/NotFoundPage', + component: () => import('@/views/notFoundPage/index.vue'), + meta: { hidden: true }, + }, { path: '/:catchAll(.*)', redirect: '/NotFoundPage', diff --git a/src/store/index.ts b/src/store/index.ts index e2308cd..7e215a8 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,7 +1,9 @@ import type { App } from 'vue'; import { createPinia } from 'pinia'; +import piniaPersist from 'pinia-plugin-persistedstate'; const store = createPinia(); +store.use(piniaPersist); // 全局注册 store export function setupStore(app: App) { diff --git a/src/store/modules/group.ts b/src/store/modules/group.ts new file mode 100644 index 0000000..38c3e26 --- /dev/null +++ b/src/store/modules/group.ts @@ -0,0 +1,34 @@ +import { store } from '@/store'; + +export const useGroupStore = defineStore( + 'group', + () => { + let navGroup = ref([{ name: '数据治理', path: '/group', query: {} }]); + let groupMenu = ref('knowledge'); + + let handleSwitchMenu = (menu: string) => { + groupMenu.value = menu; + }; + let delNav = (value: number) => { + navGroup.value.splice(value); + }; + return { + navGroup, + groupMenu, + handleSwitchMenu, + delNav, + }; + }, + { + // 持久化存储 + persist: { + key: 'group_data', + storage: sessionStorage, + pick: ['navGroup', 'groupMenu'], + }, + } +); + +export function useGroupStoreHook() { + return useGroupStore(store); +} diff --git a/src/styles/group.scss b/src/styles/group.scss new file mode 100644 index 0000000..a751819 --- /dev/null +++ b/src/styles/group.scss @@ -0,0 +1,245 @@ +.group-container { + width: 100%; + height: calc(100vh - 300px); + padding: 0 24px 24px; + background: rgb(239 239 239); + min-width: 820px; + + .group-box { + box-sizing: border-box; + display: flex; + flex-direction: column; + width: 100%; + height: calc(100vh - 319px); + padding-bottom: 24px; + overflow-y: auto; + background: rgb(253 254 255); + border-radius: 4px; + transform: translateY(-40px); + .el-tabs--border-card{ + border: none; + } + .group-tabs { + .group-tabs-item { + .group-tab-header{ + display: flex; + justify-content: space-between; + .group-btn{ + border-radius: 4px !important; + width: 96px; + background-color: rgb(99,149,253); + } + .group-right-btn { + display: flex; + gap: 8px; + + .group-btn-search { + width: 400px; + height: 32px; + + .el-input__icon { + font-size: 16px; + } + + .el-input__inner { + font-size: 12px !important; + line-height: 16px; + } + + .el-input__wrapper { + padding-right: 8px !important; + } + } + + .group-btn-switch { + box-sizing: border-box; + display: flex; + align-items: center; + width: 64px; + height: 32px; + border: 1px solid rgb(195 206 223); + border-radius: 2px; + + .group-btn-switch-icon { + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + cursor: pointer; + + .el-icon { + color: #8d98aa; + font-size: 16px !important; + } + } + + .bgThumb { + height: 32px; + background: rgb(99 149 253); + + .el-icon { + color: white; + font-size: 16px !important; + } + } + } + } + } + .group-tabs-content{ + margin-top: 16px; + display: flex; + justify-content: space-between; + display: grid; + grid-template-columns: repeat(auto-fill, 339px); + gap: 16px; + + .group-card-item { + + width: 339px; + height: 124px; + border-radius: 8px; + background-color: rgb(244, 246, 250); + padding: 16px; + cursor: pointer; + + .group-card-title { + display: flex; + justify-content: space-between; + align-items: center; + + .group-card-title-name { + font-size: 16px; + font-weight: 700; + line-height: 24px; + } + + .card-type { + border-radius: 2px; + width: 40px; + height: 16px; + color: white; + text-align: center; + font-size: 12px; + line-height: 16px; + } + + .card-type-public { + background-color: rgb(36, 171, 54); + } + + .card-type-privacy { + background-color: rgb(235, 175, 0); + } + } + + .group-card-desc { + width: 307px; + height: 32px; + font-size: 12px; + line-height: 16px; + color: rgb(78, 88, 101); + margin: 4px 0 16px; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .group-card-footer { + display: flex; + justify-content: space-between; + align-items: center; + + .info { + font-size: 12px; + color: rgb(141, 152, 170); + } + } + } + } + .group-table-box { + padding: 16px 24px 24px; + height: 100%; + display: flex; + flex-direction: column; + gap: 24px; + min-height: 200px; + + .el-checkbox__inner::before { + top: 4.5px !important; + width: 13px; + } + + tbody { + td { + border-right: unset !important; + } + } + + .el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell { + border-right: unset !important; + } + + .el-table__header { + width: 100% !important; + + height: 32px; + box-shadow: inset 0 -1px 0 0 rgb(223 229 239); + + thead tr th { + background-color: #f4f6fa; + } + } + + .group-name-row { + color: #0077ff; + font-size: 12px; + font-weight: 500; + cursor: pointer; + } + + .group-id { + .el-icon { + color: #8d98aa; + } + } + + .el-table__body { + width: 100% !important; + + .el-table__row { + height: 48px; + } + } + + .el-table__cell { + padding: 0 !important; + font-size: 12px; + } + + .el-table--border .el-table__cell:first-child .cell { + padding: 0 12px !important; + } + + .el-table-column--selection .cell { + padding-right: 0 !important; + padding-left: 22px; + } + + .group-selection::after { + content: unset !important; + } + + .el-pagination { + margin-top: 0; + } + + .el-pagination .el-input__inner { + height: var(--el-input-inner-height) !important; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/styles/knowledgeFile.scss b/src/styles/knowledgeFile.scss index b771b1f..1dc2dc6 100644 --- a/src/styles/knowledgeFile.scss +++ b/src/styles/knowledgeFile.scss @@ -3,8 +3,7 @@ flex-direction: column; gap: 16px; width: 100%; - height: calc(100% - 48px); - padding: 16px 24px 24px; + height: calc(100vh - 220px); min-width: 1240px; .kf-container-top { display: flex; @@ -75,7 +74,6 @@ .kf-container-right { flex: 1; min-width: 700px; - padding: 16px 24px 24px 24px; background: rgb(254 254 254); border-radius: 4px; diff --git a/src/styles/knowledgeFileSection.scss b/src/styles/knowledgeFileSection.scss index db0966d..53975b3 100644 --- a/src/styles/knowledgeFileSection.scss +++ b/src/styles/knowledgeFileSection.scss @@ -4,7 +4,6 @@ gap: 16px; width: 100%; height: 100%; - padding: 16px 24px 24px; min-width: 1240px; .kf-section-container-top { display: flex; @@ -40,14 +39,13 @@ display: flex; gap: 2px; width: 100%; - height: calc(100% - 80px); + height: calc(100vh - 210px); .kf-section-container-left { display: flex; flex-direction: column; gap: 16px; width: 314px; - padding: 24px; background: rgb(254 254 254); border-top-left-radius: 4px; border-bottom-left-radius: 4px; @@ -78,7 +76,6 @@ flex: 1; min-width: 700px; height: 100%; - padding: 24px 0 24px 24px; overflow: hidden; background: rgb(254 254 254); border-top-right-radius: 4px; diff --git a/src/styles/knowledgeLibrary.scss b/src/styles/knowledgeLibrary.scss index bc8f7ae..2a7cc8e 100644 --- a/src/styles/knowledgeLibrary.scss +++ b/src/styles/knowledgeLibrary.scss @@ -1,8 +1,6 @@ .knowledgeLibrary-container { width: 100%; height: calc(100vh - 300px); - padding: 0 24px 24px; - background: rgb(239 239 239); min-width: 820px; .knowledgeLibrary-box { @@ -15,12 +13,9 @@ overflow-y: auto; background: rgb(253 254 255); border-radius: 4px; - transform: translateY(-5px); .kl-tilte { height: 24px; - margin-left: 24px; - margin-top: 24px; font-size: 16px; line-height: 24px; color: rgb(0, 0, 0); @@ -31,7 +26,6 @@ display: flex; justify-content: space-between; width: 100%; - padding: 0 24px; margin-top: 16px; .kl-left-btn { @@ -102,7 +96,7 @@ .bgThumb { height: 32px; - background: rgb(0 119 255); + background: rgb(99,149,253); .el-icon { color: white; @@ -117,20 +111,20 @@ box-sizing: border-box; width: 100%; height: 100%; - padding: 0 16px 24px 24px; margin-top: 16px; - overflow-y: scroll; + overflow-y: auto; } .kl-card { display: flex; flex-wrap: wrap; justify-content: space-between; + gap: 16px; .kl-single-card { display: flex; flex-direction: column; - height: 302px; + height: 232px; padding: 24px; cursor: pointer; background: rgb(244 246 250); @@ -230,7 +224,7 @@ @media screen and (width <=1560px) { .kl-card-container { display: grid; - grid-template-columns: repeat(auto-fill, 350px); + grid-template-columns: repeat(auto-fill, 428px); grid-gap: 16px; } } @@ -238,7 +232,7 @@ @media screen and (width >=1560px) { .kl-card-container { display: grid; - grid-template-columns: repeat(auto-fill, 350px); + grid-template-columns: repeat(auto-fill, 428px); grid-gap: 16px; } } diff --git a/src/styles/reset.scss b/src/styles/reset.scss index d5b775a..c66df44 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -229,11 +229,11 @@ $newHoverBg: linear-gradient( } .el-button--primary, .bgThumb { - background: $newbg !important; + // background: $newbg !important; border-color: #c7d2fbc0 !important; &:hover { color: white !important; - background: $newHoverBg !important; + // background: $newHoverBg !important; border-color: #c7d2fbc0 !important; } } diff --git a/src/views/group/data.js b/src/views/group/data.js new file mode 100644 index 0000000..b8f85d0 --- /dev/null +++ b/src/views/group/data.js @@ -0,0 +1,3 @@ +const groupList = []; + +export { groupList }; diff --git a/src/views/group/index.vue b/src/views/group/index.vue new file mode 100644 index 0000000..961506d --- /dev/null +++ b/src/views/group/index.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 697cfce..da5cecc 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -404,7 +404,7 @@ const handleLoginSubmit = () => { duration: 3000, }); localStorage.setItem('userInfo', JSON.stringify(res)); - window.open(`${window.origin}/witchaind/#/knowledge/library`, '_self'); + window.open(`${window.origin}/witchaind/#/group`, '_self'); }) .finally(() => { loading.value = false; -- Gitee From cbaba42d71539ac951b9482744bbff2f648cb4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Fri, 18 Apr 2025 17:22:15 +0800 Subject: [PATCH 02/82] =?UTF-8?q?=E5=B0=81=E8=A3=85=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B9=B6=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EmptyStatus/index.vue | 47 +++++++++++ src/components/GroupLayout/index.vue | 98 ++++++++++++++++++++++ src/components/KnowledgeForm/index.vue | 2 +- src/styles/grouInfo.scss | 91 ++++++++++++++++++++ src/styles/libraryInfo.scss | 80 ++++++++++++++++++ src/views/group/groupDetail/index.vue | 13 +++ src/views/group/groupInfo.vue | 24 ++++++ src/views/knowledgeLibrary/index.vue | 50 ++++++----- src/views/knowledgeLibrary/libraryInfo.vue | 31 +++++++ 9 files changed, 414 insertions(+), 22 deletions(-) create mode 100644 src/components/EmptyStatus/index.vue create mode 100644 src/components/GroupLayout/index.vue create mode 100644 src/styles/grouInfo.scss create mode 100644 src/styles/libraryInfo.scss create mode 100644 src/views/group/groupDetail/index.vue create mode 100644 src/views/group/groupInfo.vue create mode 100644 src/views/knowledgeLibrary/libraryInfo.vue diff --git a/src/components/EmptyStatus/index.vue b/src/components/EmptyStatus/index.vue new file mode 100644 index 0000000..61a55f7 --- /dev/null +++ b/src/components/EmptyStatus/index.vue @@ -0,0 +1,47 @@ + + + + + \ No newline at end of file diff --git a/src/components/GroupLayout/index.vue b/src/components/GroupLayout/index.vue new file mode 100644 index 0000000..177c47c --- /dev/null +++ b/src/components/GroupLayout/index.vue @@ -0,0 +1,98 @@ + + + + + + \ No newline at end of file diff --git a/src/components/KnowledgeForm/index.vue b/src/components/KnowledgeForm/index.vue index e1d6586..3d091b1 100644 --- a/src/components/KnowledgeForm/index.vue +++ b/src/components/KnowledgeForm/index.vue @@ -84,7 +84,7 @@ :placeholder="$t('assetLibrary.message.pleaseChoose')" :teleported="false" class="select-container" - :disabled="props.formData.id" + :disabled="props.formData?.id" :suffix-icon="IconCaretDown"> +
+ +
+ + diff --git a/src/views/group/groupInfo.vue b/src/views/group/groupInfo.vue new file mode 100644 index 0000000..67c1236 --- /dev/null +++ b/src/views/group/groupInfo.vue @@ -0,0 +1,24 @@ + + + \ No newline at end of file diff --git a/src/views/knowledgeLibrary/index.vue b/src/views/knowledgeLibrary/index.vue index 49665f1..afc9888 100644 --- a/src/views/knowledgeLibrary/index.vue +++ b/src/views/knowledgeLibrary/index.vue @@ -1,8 +1,14 @@ \ No newline at end of file -- Gitee From 47485e8a6ab719931cc6705a7a02cef016127e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Fri, 18 Apr 2025 17:26:34 +0800 Subject: [PATCH 03/82] =?UTF-8?q?=E8=B5=84=E6=96=99=E5=BA=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/knowledgeFile/documentInfo.vue | 31 ++ src/views/knowledgeFile/index.vue | 622 ++++++----------------- src/views/knowledgeFileSection/index.vue | 28 - 3 files changed, 192 insertions(+), 489 deletions(-) create mode 100644 src/views/knowledgeFile/documentInfo.vue diff --git a/src/views/knowledgeFile/documentInfo.vue b/src/views/knowledgeFile/documentInfo.vue new file mode 100644 index 0000000..a53c436 --- /dev/null +++ b/src/views/knowledgeFile/documentInfo.vue @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/src/views/knowledgeFile/index.vue b/src/views/knowledgeFile/index.vue index 16616b2..c8e5938 100644 --- a/src/views/knowledgeFile/index.vue +++ b/src/views/knowledgeFile/index.vue @@ -1,68 +1,19 @@ - + {{ $t('btnText.analytic') }} - {{ $t('btnText.delete') }}
- - + - + - + @@ -190,49 +90,22 @@ {{ scope.row.document_type.type }} - - + + - \ No newline at end of file diff --git a/src/store/modules/group.ts b/src/store/modules/group.ts index 38c3e26..dae0986 100644 --- a/src/store/modules/group.ts +++ b/src/store/modules/group.ts @@ -5,6 +5,7 @@ export const useGroupStore = defineStore( () => { let navGroup = ref([{ name: '数据治理', path: '/group', query: {} }]); let groupMenu = ref('knowledge'); + let knowledgeTabActive = ref('document'); let handleSwitchMenu = (menu: string) => { groupMenu.value = menu; @@ -12,11 +13,16 @@ export const useGroupStore = defineStore( let delNav = (value: number) => { navGroup.value.splice(value); }; + let handleKnowledgeTab = (key: string) => { + knowledgeTabActive.value = key; + }; return { navGroup, groupMenu, + knowledgeTabActive, handleSwitchMenu, delNav, + handleKnowledgeTab, }; }, { diff --git a/src/styles/dataSet.scss b/src/styles/dataSet.scss new file mode 100644 index 0000000..1b7571c --- /dev/null +++ b/src/styles/dataSet.scss @@ -0,0 +1,6 @@ +.dataset-empty-content { + height: calc(100vh - 220px); + display: flex; + justify-content: center; + align-items: center +} diff --git a/src/styles/evaluate.scss b/src/styles/evaluate.scss new file mode 100644 index 0000000..4c1beb4 --- /dev/null +++ b/src/styles/evaluate.scss @@ -0,0 +1,6 @@ +.evaluate-empty-content { + height: calc(100vh - 220px); + display: flex; + justify-content: center; + align-items: center +} diff --git a/src/styles/group.scss b/src/styles/group.scss index a751819..e34e7ac 100644 --- a/src/styles/group.scss +++ b/src/styles/group.scss @@ -159,7 +159,7 @@ } } .group-table-box { - padding: 16px 24px 24px; + padding: 16px 0 24px; height: 100%; display: flex; flex-direction: column; diff --git a/src/styles/reset.scss b/src/styles/reset.scss index c66df44..f296d2d 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -197,7 +197,7 @@ h6 { } .el-button { - border-radius: 2px !important; + border-radius: 4px !important; } .el-button span { diff --git a/src/views/dataSet/index.vue b/src/views/dataSet/index.vue new file mode 100644 index 0000000..3bb653b --- /dev/null +++ b/src/views/dataSet/index.vue @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/src/views/evaluate/index.vue b/src/views/evaluate/index.vue new file mode 100644 index 0000000..e955d4f --- /dev/null +++ b/src/views/evaluate/index.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/views/knowledgeLibrary/index.vue b/src/views/knowledgeLibrary/index.vue index afc9888..6c7d6c5 100644 --- a/src/views/knowledgeLibrary/index.vue +++ b/src/views/knowledgeLibrary/index.vue @@ -413,6 +413,7 @@ @change="handleChangePage" />
+ - { }); handleCancelVisible(); }; - const handleCreateKnowledge = () => { dialogCreateVisible.value = true; }; @@ -1033,7 +1033,6 @@ const handleCancelVisible = () => { dialogImportVisible.value = false; dialogCreateVisible.value = false; }; -const { navGroup } = storeToRefs(useGroupStore()); const handleJumpAssets = (kbItem: any) => { let groupNav = navGroup.value; diff --git a/src/views/knowledgeLibrary/libraryInfo.vue b/src/views/knowledgeLibrary/libraryInfo.vue index 88d5149..22ff8ea 100644 --- a/src/views/knowledgeLibrary/libraryInfo.vue +++ b/src/views/knowledgeLibrary/libraryInfo.vue @@ -4,12 +4,16 @@ @@ -19,13 +23,18 @@ \ No newline at end of file -- Gitee From e4720608a5834f3e8601b660c1cf7db3cd306cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Mon, 21 Apr 2025 17:59:15 +0800 Subject: [PATCH 05/82] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E5=BA=93=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=E5=92=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/KnowledgeForm/index.vue | 50 +++++- src/components/Upload/index.vue | 9 +- src/lang/package/en.ts | 5 +- src/lang/package/zh-cn.ts | 15 +- src/styles/knowledgeForm.scss | 4 +- src/styles/knowledgeLibrary.scss | 116 ++++++++++--- src/styles/reset.scss | 10 +- src/styles/upload.scss | 2 + src/views/group/groupInfo.vue | 2 - src/views/knowledgeLibrary/index.vue | 226 ++++++++++++++++++++----- 10 files changed, 348 insertions(+), 91 deletions(-) diff --git a/src/components/KnowledgeForm/index.vue b/src/components/KnowledgeForm/index.vue index 3d091b1..4ea936e 100644 --- a/src/components/KnowledgeForm/index.vue +++ b/src/components/KnowledgeForm/index.vue @@ -42,7 +42,7 @@ class="config-size-desc"> @@ -126,9 +126,53 @@ - (512~1024) + 128~1024) + + + + + (128~1024) + + + + + (128M~2048M) {{ $t('btnText.batchDelete') }}
@@ -34,7 +35,11 @@ -
{{ $t('dialogTipText.continueAdd') }}
+
+ + + + {{ $t('dialogTipText.continueAdd') }}
import { computed, reactive, ref } from 'vue'; import '@/styles/upload.scss'; -import { IconUpload, IconError } from '@computing/opendesign-icons'; +import { IconUpload, IconError, IconAlertCircle } from '@computing/opendesign-icons'; import type { UploadFile, UploadProgressEvent } from 'element-plus/es/components/upload/src/upload'; const { t } = useI18n(); import { ElMessage } from 'element-plus'; diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts index c364c35..b50db91 100644 --- a/src/lang/package/en.ts +++ b/src/lang/package/en.ts @@ -83,6 +83,8 @@ export default { fileConfigCategory: 'Document Information Categories', supAddCategoris: 'A maximum of 10 document categories can be added.', fileNum: 'Document Count', + fileSize: 'fileSize', + creator: 'creator', uploadTime: 'Create Time', importTaskList: 'File upload list', exportTaskList: 'Export Task List', @@ -139,6 +141,7 @@ export default { edit: 'Edit', delete: 'Delete', batchDelete: 'Batch Delete', + batchExport: 'Batch Export', retry: 'Retry', restart: 'Restart', clearAll: 'Clear all', @@ -148,7 +151,7 @@ export default { importFile: 'Import Document', editAssetLibrary: 'Edit Asset Library', createAssetLibrary: 'Create Asset Library', - batchImport: 'Batch Import', + batchImport: 'Import the asset library', batchDown: 'Batch Download', download: 'Download', downloadAll: 'Download All', diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts index 5fea918..57ceb42 100644 --- a/src/lang/package/zh-cn.ts +++ b/src/lang/package/zh-cn.ts @@ -79,15 +79,17 @@ export default { piece: '篇', file: '文档', name: '资产库名称', - desc: '描述', - language: '语言', + desc: '简介', + language: '分词器', embeddedModel: '嵌入模型', - analyticMethod: '解析方法', + analyticMethod: '文档解析器', fileChunkSize: '文件分块大小', - configCategory: '配置类别', + configCategory: '文档类别', fileConfigCategory: '文档信息类别', supAddCategoris: '最多支持添加10个文档信息类别', fileNum: '文档数量', + fileSize: '文档大小', + creator: '创建人', uploadTime: '创建时间', importTaskList: '文件上传列表', exportTaskList: '导出任务列表', @@ -95,6 +97,8 @@ export default { uploadFailedNet: '上传失败,请检查网络', fileSuffiexNot: '文件后缀不符合要求,请检查文件', copySuccessFul: '复制成功', + numberUpperLimit: '单次文档上传个数上限', + sizeUpperLimit: '单次文档上传尺寸上限', }, assetFile: { docName: '文档名称', @@ -145,6 +149,7 @@ export default { edit: '编辑', delete: '删除', batchDelete: '批量删除', + batchExport: '批量导出', retry: '重试', restart: '重启', clearAll: '全部清空', @@ -154,7 +159,7 @@ export default { importFile: '导入文档', createAssetLibrary: '新建资产库', editAssetLibrary: '编辑资产库', - batchImport: '批量导入', + batchImport: '导入资产库', batchDown: '批量下载', download: '下载', downloadAll: '下载全部', diff --git a/src/styles/knowledgeForm.scss b/src/styles/knowledgeForm.scss index 7c0496a..5732d9d 100644 --- a/src/styles/knowledgeForm.scss +++ b/src/styles/knowledgeForm.scss @@ -240,13 +240,13 @@ .create-dialog { width: 560px; - height: 600px; + height: 440px; position: relative; padding: 0 !important; overflow: hidden; .el-dialog__body { - height: 470px !important; + height: 320px !important; max-height: unset !important; min-height: unset !important; padding-left: 16px !important; diff --git a/src/styles/knowledgeLibrary.scss b/src/styles/knowledgeLibrary.scss index 2a7cc8e..e614e54 100644 --- a/src/styles/knowledgeLibrary.scss +++ b/src/styles/knowledgeLibrary.scss @@ -1,6 +1,6 @@ .knowledgeLibrary-container { width: 100%; - height: calc(100vh - 300px); + height: calc(100vh - 124px); min-width: 820px; .knowledgeLibrary-box { @@ -8,10 +8,9 @@ display: flex; flex-direction: column; width: 100%; - height: calc(100vh - 319px); - padding-bottom: 24px; + height: 100%; + // padding-bottom: 16px; overflow-y: auto; - background: rgb(253 254 255); border-radius: 4px; .kl-tilte { @@ -29,7 +28,13 @@ margin-top: 16px; .kl-left-btn { + display: flex; + align-items: center; + &>button{ + margin-right: 8px; + } + .createAsset, .ImportAsset { font-size: 12px; @@ -37,16 +42,56 @@ } .createAsset { - padding: 8px 17.2px; + padding: 8px 18px; } .ImportAsset { - padding: 8px 23.2px; + padding: 8px 16px; + margin-left: 0px; } .el-button--primary { background: rgb(0 119 255); } + .el-dropdown{ + margin-right: 8px; + .dropdown-disabled{ + cursor: not-allowed; + border: 1px solid rgb(191, 199, 215) !important ; + background-color: rgb(235,237,243); + color: rgb(191, 199, 215) !important; + &:hover,:active{ + cursor: not-allowed; + background-color: rgb(235,237,243); + color: rgb(191, 199, 215) !important; + } + } + + } + .multipleSelectNum{ + display: inline-block; + font-size: 12px; + color: rgb(141, 152, 170); + &>span{ + color: rgb(99, 149, 253); + } + } + .multipleSelect{ + margin-right: 8px; + display: flex; + align-items: center; + font-weight: 400; + .el-checkbox.el-checkbox--large{ + height: 20px; + } + .el-checkbox__input.is-indeterminate .el-checkbox__inner:before { + transform: scaleY(0.5) translateX(3px); + } + & span{ + font-size: 12px; + } + + } } .kl-right-btn { @@ -111,7 +156,7 @@ box-sizing: border-box; width: 100%; height: 100%; - margin-top: 16px; + margin: 16px 0; overflow-y: auto; } @@ -125,10 +170,15 @@ display: flex; flex-direction: column; height: 232px; - padding: 24px; + padding: 16px; cursor: pointer; background: rgb(244 246 250); - border-radius: 4px; + border-radius: 8px; + border: 1px solid transparent; + + &.is-checked { + border: 2px solid rgb(99, 149, 253); + } .kl-card-top { display: flex; @@ -138,10 +188,13 @@ .kl-card-name { width: 90%; height: 24px; - font-size: 18px; + font-size: 16px; font-weight: 700; line-height: 24px; } + .el-checkbox{ + height: 20px; + } .kl-card-more-icon { cursor: pointer; @@ -150,19 +203,22 @@ .kl-card-desc { flex: 1; - padding-top: 16px; - font-size: 14px; - line-height: 22px; - color: rgb(141 152 170); + padding-top: 8px; + font-size: 12px; + line-height: 16px; + letter-spacing: 0px; + color: rgb(78,88,101); + height: 112px; + width: 396px; } .kl-card-footer { display: flex; gap: 16px; align-items: center; - color: rgb(78 88 101); + color: rgb(141 152 170); width: 100%; - margin-bottom: 8px; + font-size: 12px; .el-icon { font-size: 16px; @@ -176,7 +232,6 @@ .kl-card-file { display: flex; width: 90%; - font-size: 14px; .kl-file-text { width: 95%; @@ -185,33 +240,28 @@ } .kl-file-num { - font-size: 14px; font-family: 'HarmonyOS Sans SC Bold'; } } .kl-card-timer-icon { - text-align: right; display: flex; gap: 4px; - width: 45%; align-items: center; - font-size: 14px; .kl-card-timer { - width: 90%; } } } .kl-card-id { + font-size: 12px; width: 330px !important; - + margin-bottom: 8px; .id-label, .id-value { - font-size: 14px; letter-spacing: 0; - color: #575d6c; + color: rgb(141 152 170); } .id-label { @@ -252,7 +302,7 @@ } .kl-table-box { - padding: 16px 24px 24px; + padding: 16px 0; height: 100%; display: flex; flex-direction: column; @@ -326,13 +376,16 @@ .el-pagination { margin-top: 0; + margin-bottom: 24px; } .el-pagination .el-input__inner { height: var(--el-input-inner-height) !important; } } - +.el-pagination{ + margin-bottom: 24px; +} .o-export-progress-notify { position: fixed; right: 24px; @@ -682,4 +735,13 @@ .el-dropdown-menu { padding: 4px 0 !important; } +} + +.kf-ops-dowlon { + .el-dropdown-menu { + padding: 4px 0 !important; + .el-dropdown-menu__item { + font-size: 12px; + } + } } \ No newline at end of file diff --git a/src/styles/reset.scss b/src/styles/reset.scss index f296d2d..71513e5 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -223,17 +223,15 @@ $newHoverBg: linear-gradient( */ .el-button { &:hover { - color: #5d7dffc0 !important; - border-color: #5d7dffc0 !important; + color: #5d7dffc0 ; + border-color: #5d7dffc0 ; } } .el-button--primary, .bgThumb { - // background: $newbg !important; border-color: #c7d2fbc0 !important; &:hover { color: white !important; - // background: $newHoverBg !important; border-color: #c7d2fbc0 !important; } } @@ -297,7 +295,9 @@ div:focus { font-size: 12px; } } - +.el-dialog{ + border-radius: 8px !important; +} .el-dialog__header { .el-dialog__title { font-size: 16px; diff --git a/src/styles/upload.scss b/src/styles/upload.scss index 446ff42..0455786 100644 --- a/src/styles/upload.scss +++ b/src/styles/upload.scss @@ -39,6 +39,8 @@ margin: 8px 0; font-size: var(--o-font-size-info); line-height: var(--o-line-height-info); + display: flex; + align-items: center; } &.has-files { diff --git a/src/views/group/groupInfo.vue b/src/views/group/groupInfo.vue index 67c1236..f79f697 100644 --- a/src/views/group/groupInfo.vue +++ b/src/views/group/groupInfo.vue @@ -2,11 +2,9 @@ diff --git a/src/views/knowledgeLibrary/index.vue b/src/views/knowledgeLibrary/index.vue index 6c7d6c5..ce547e4 100644 --- a/src/views/knowledgeLibrary/index.vue +++ b/src/views/knowledgeLibrary/index.vue @@ -1,6 +1,6 @@ +
+
+ {{ `ID:${' '} ` }} + {{ item.id }} +
+
+ +
+ {{ bytesToSize(item.document_size) }} +
+
-
- {{ `ID:${' '} ` }} - {{ item.id }} -
+
@@ -264,11 +331,12 @@ @sort-change="handleSortChange" @selection-change="handleSelectionChange" :class="fileTableList.data.length < currentPageSize ? 'showPagination' : ''"> + + + + + + \ No newline at end of file diff --git a/src/views/knowledgeFile/documentLog.vue b/src/views/knowledgeFile/documentLog.vue new file mode 100644 index 0000000..fd5d027 --- /dev/null +++ b/src/views/knowledgeFile/documentLog.vue @@ -0,0 +1,158 @@ + + + + + diff --git a/src/views/knowledgeFileSection/index.vue b/src/views/knowledgeFileSection/index.vue index 1033369..38004d7 100644 --- a/src/views/knowledgeFileSection/index.vue +++ b/src/views/knowledgeFileSection/index.vue @@ -1,5 +1,5 @@ + + diff --git a/src/views/evaluate/testData.vue b/src/views/evaluate/testData.vue new file mode 100644 index 0000000..14d3993 --- /dev/null +++ b/src/views/evaluate/testData.vue @@ -0,0 +1,387 @@ + + + + \ No newline at end of file diff --git a/src/views/knowledgeFileSection/index.vue b/src/views/knowledgeFileSection/index.vue index 38004d7..082ae9f 100644 --- a/src/views/knowledgeFileSection/index.vue +++ b/src/views/knowledgeFileSection/index.vue @@ -45,7 +45,7 @@
{{ $t('assetFile.contentView') }}
- -
+
+
+ +
+
+ +
+
+ +
-- Gitee From 17cd086a13d3382603f3d51000d0fad42b7d7dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Thu, 24 Apr 2025 20:53:11 +0800 Subject: [PATCH 12/82] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=8A=BD=E5=B1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/evaluate/testData.vue | 565 ++++++++++++++++++-------------- 1 file changed, 310 insertions(+), 255 deletions(-) diff --git a/src/views/evaluate/testData.vue b/src/views/evaluate/testData.vue index 14d3993..de1f09b 100644 --- a/src/views/evaluate/testData.vue +++ b/src/views/evaluate/testData.vue @@ -1,19 +1,45 @@ @@ -26,7 +52,20 @@ const props = defineProps({ rowData: Object, }); -let chartInstance: echarts.ECharts | null = null; +const currentPage = ref(1); +const totalCount = ref(0); +const currentPageSize = ref(20); +const pagination = ref({ + pageSizes: [10, 20, 30, 40, 50], + layout: 'total,sizes,prev,pager,next,jumper', +}); + +const handleChangePage = (pageNum: number, pageSize: number) => { + currentPage.value = pageNum; + currentPageSize.value = pageSize; +}; + +let chartInstanceR: echarts.ECharts | null = null; let chartInstanceL: echarts.ECharts | null = null; let resizeTimer: NodeJS.Timeout | null = null; @@ -36,32 +75,18 @@ const debounceResize = () => { clearTimeout(resizeTimer); } resizeTimer = setTimeout(() => { - if (chartInstance && props.visible) { - chartInstance.resize(); + if (chartInstanceR && chartInstanceL && props.visible) { + chartInstanceR.resize(); + chartInstanceL.resize(); } }, 100); }; -// 计算环形渐变方向的核心函数 -function getCoordinates(startAngle:number, endAngle:number) { - const startRad = (startAngle - 90) * Math.PI / 180; // 转换为弧度(坐标系偏移90度) - const endRad = (endAngle - 90) * Math.PI / 180; - - // 计算起点和终点在圆上的坐标(基于0.5,0.5的圆心) - const x = 0.5 + 0.5 * Math.cos(startRad); - const y = 0.5 + 0.5 * Math.sin(startRad); - const x2 = 0.5 + 0.5 * Math.cos(endRad); - const y2 = 0.5 + 0.5 * Math.sin(endRad); - - return { x, y, x2, y2 }; -} -// 示例:当圆环从225度开始到-45度结束时 -const coords = getCoordinates(225, -45); // 返回{x: 0.146, y: 0.146, x2: 0.854, y2: 0.854} const initChart = async () => { try { // 等待DOM更新 await nextTick(); - + // 基于准备好的dom,初始化echarts实例 const chartDom = document.getElementById('rightChart'); const chartDomL = document.getElementById('leftChart'); @@ -69,215 +94,178 @@ const initChart = async () => { console.error('Chart DOM element not found'); return; } - + // 如果已经有实例,先销毁 - if (chartInstance) { - chartInstance.dispose(); + if (chartInstanceR) { + chartInstanceR.dispose(); } - - chartInstance = echarts.init(chartDom); - chartInstanceL = echarts.init(chartDomL); - const option = { - // 鼠标悬浮的提示 - tooltip: { - formatter: '{b} : {c}' - }, - series: [ - { - type: 'gauge', - min: 0, //最大值 - max: 100, //最小值 - startAngle: 200, //仪表盘起始角度。正右手侧为0度,正上方为90度,正左手侧为180度。 - endAngle: -20, //仪表盘结束角度 - itemStyle: { - color: '#f37215', //颜色 - shadowColor: 'rgba(0,138,255,0.45)', //阴影颜色 - shadowBlur: 10, //图形阴影的模糊大小 - shadowOffsetX: 2, //阴影水平方向上的偏移距离 - shadowOffsetY: 2 //阴影垂直方向上的偏移距离 - }, - progress: { - show: true, //是否显示进度条 - width: 18, //进度条宽度 - itemStyle: { - color: { - type: 'linear', - x: 1, - y: 0, - x2: 0, - y2: 1, - colorStops: [ - { - offset: 0, - color: 'green' // 0% 处的颜色 - }, - { - offset: 0.3, - color: 'yellow' // 100% 处的颜色 - }, - { - offset: 0.7, - color: 'orange' // 100% 处的颜色 - }, - { - offset: 1, - color: 'red' // 100% 处的颜色 - } - ], - global: false // 缺省为 false - } + if (chartInstanceL) { + chartInstanceL.dispose(); } - }, - pointer: { - show: false, //是否显示指针 - itemStyle: { - color: { - type: 'linear', - x: 1, - y: 0, - x2: 0, - y2: 1, - colorStops: [ - { - offset: 0, - color: '#f12711' // 0% 处的颜色 - }, - { - offset: 1, - color: '#f5af19' // 100% 处的颜色 - } - ], - global: false // 缺省为 false - } - } - }, - axisLine: { - show: false, //是否显示仪表盘轴线 - lineStyle: { - width: 18 //轴线宽度 - } - }, - axisTick: { - show: false, //是否显示刻度 - distance: -29, - itemStyle: { - color: '#fff', - width: 2 - } - }, - splitLine: { - show: false, //是否显示分隔线 - }, - axisLabel: { - show: false, //是否显示标签 - }, - title: { - show: true, //是否显示标题 - }, - detail: { - show: true, //是否显示详情 - valueAnimation: true, //是否开启标签的数字动画 - borderRadius: 8, //文字块的圆角 - // offsetCenter: [0, '70%'], //相对于仪表盘中心的偏移位置,数组第一项是水平方向的偏移,第二项是垂直方向的偏移。可以是绝对的数值,也可以是相对于仪表盘半径的百分比 - fontSize: 50, //文字的字体大小 - fontWeight: 'bolder', //文字字体的粗细 - formatter: '{value}', //格式化函数或者字符串 - }, - data: [ - { - value: 90, - name: '高危' - } - ] - } - ] -}; -chartInstance.setOption(option); - - // chartInstance.setOption({ - // title: { - // text: '85', - // x: 'center', - // y: 'center', - // textStyle: { - // fontSize: 36, - // fontWeight: 'bold', - // color: '#333' - // } - // }, - // series: [ - // { - // type: 'gauge', - // radius: ['70%', '80%'], - // startAngle: 225, // 左下角起始(角度坐标系:0度为右侧,顺时针增加) - // endAngle: -45, // 右下角结束(等效315度) - // clockWise: true, // 顺时针填充 - // data: [ - // { - // value: 85, - // name: '完成率', - // itemStyle: { - // color: { - // type: 'linear', - // ...coords, - // colorStops: [ - // { offset: 0.0, color: '#00FF00' }, // 0%位置:绿色 - // { offset: 0.5, color: '#FFFF00' }, // 50%位置:黄色 - // { offset: 0.75, color: '#FFA500' }, // 75%位置:橙色 - // { offset: 1.0, color: '#FF0000' } // 100%位置:红色 - // ], - // globalCoord: false // 确保渐变基于图形坐标系[5](@ref) - // } - // } - // }, - // { - // value: 15, - // name: '剩余', - // itemStyle: { - // color: '#EBEEF5' - // } - // } - // ], - // label: { - // show: false - // }, - // hoverAnimation: false, - // silent: true - // } - // ] - // }); + chartInstanceR = echarts.init(chartDom); + chartInstanceL = echarts.init(chartDomL); + + chartInstanceR.setOption({ + title: { + text: '综合评分', + left: 'left', + textStyle: { + fontSize: 14, + color: '#333', + fontWeight: '700', + } + }, + series: [ + { + type: 'gauge', + min: 0, //最大值 + max: 100, //最小值 + startAngle: 225, //仪表盘起始角度。正右手侧为0度,正上方为90度,正左手侧为180度。 + endAngle: -45, //仪表盘结束角度 + itemStyle: { + color: '#f37215', //颜色 + shadowColor: 'rgba(0,138,255,0.45)', //阴影颜色 + shadowBlur: 10, //图形阴影的模糊大小 + shadowOffsetX: 2, //阴影水平方向上的偏移距离 + shadowOffsetY: 2 //阴影垂直方向上的偏移距离 + }, + progress: { + show: true, //是否显示进度条 + width: 10, //进度条宽度 + itemStyle: { + color: { + type: 'linear', + x: 1, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 1, + color: 'green' // 0% 处的颜色 + }, + { + offset: 0.7, + color: 'yellow' // 100% 处的颜色 + }, + { + offset: 0.3, + color: 'orange' // 100% 处的颜色 + }, + { + offset: 0, + color: 'red' // 100% 处的颜色 + } + ], + global: false // 缺省为 false + } + } + }, + pointer: { + icon: 'triangle', + width: 8, + length: '10%', + itemStyle: { + color: 'black', + shadowColor: 'rgba(0,0,0,0.3)', + shadowBlur: 8 + }, + offsetCenter: [0, '-60%'] + }, + axisLine: { + show: false, //是否显示仪表盘轴线 + lineStyle: { + width: 18 //轴线宽度 + } + }, + axisTick: { + show: false, //是否显示刻度 + distance: -29, + itemStyle: { + color: '#fff', + width: 2 + } + }, + splitLine: { + show: false, //是否显示分隔线 + }, + axisLabel: { + show: false, //是否显示标签 + }, + title: { + show: true, //是否显示标题 + }, + detail: { + show: true, //是否显示详情 + valueAnimation: true, //是否开启标签的数字动画 + offsetCenter: [0, 0], //相对于仪表盘中心的偏移位置 + fontSize: 32, //文字的字体大小 + color: 'black', + fontWeight: 'bolder', //文字字体的粗细 + backgroundColor: 'white', // 添加白色背景 + borderRadius: 100, // 设置圆形边框 + padding: [10, 10, 10, 10], // 设置内边距使背景更大 + width: 120, // 设置背景宽度 + height: 120, // 设置背景高度 + shadowColor: 'rgba(141,152,170,0.4)', + shadowBlur: 20, // 阴影模糊大小 + }, + data: [ + { + value: 82.5, + } + ] + } + ] + }); chartInstanceL.setOption({ color: ['rgb(141,152,170)'], textStyle: { color: 'rgb(141,152,170)' }, lineStyle: { - color: 'rgb(141,152,170)' + color: 'rgb(141,152,170)' }, grid: { left: '1%', // 左侧距离容器3%宽度(百分比更适配响应式) right: '1%', // 右侧距离容器3%宽度 + bottom: '1%', // 底部距离容器3%宽度 + top: '22%', // 顶部距离容器3%宽度 containLabel: true // 确保坐标轴标签不被截断[3,5](@ref) }, - title: { text: '评估质量' }, // 继承全局字体颜色 + title: { + text: '评估质量', + textStyle: { + fontSize: 14, + } + }, xAxis: { data: ['上下文相关性', '召回率', '忠实性', '答案的相关性', '最大公共子串', '编辑距离', '杰卡徳距离'], + axisTick: { + show: false + }, + axisLine: { + lineStyle: { + color: 'rgb(141,152,170)', + } + } + }, yAxis: { - interval:50, + interval: 50, type: 'value', - name:'分数(分)', + name: '分数(分)', textStyle: { color: 'black', }, splitLine: { show: true, lineStyle: { - type: 'dashed', - color: 'rgb(141,152,170)', - dash: [30,15], // [实线长度, 间隔长度](数值越大越稀疏) + type: 'dashed', + color: 'rgb(141,152,170)', + dash: [30, 15], // [实线长度, 间隔长度](数值越大越稀疏) opacity: 0.5 } } @@ -288,7 +276,7 @@ chartInstance.setOption(option); data: [76, 70, 78, 80, 74, 82, 77], barWidth: '10%', itemStyle: { - color:'rgb(0,98,220)', + color: 'rgb(0,98,220)', borderWidth: 1, shadowColor: 'rgba(0,92,219,0.2)', shadowBlur: 10, @@ -304,16 +292,6 @@ chartInstance.setOption(option); } } -// 监听visible属性变化 -watch(() => props.visible, async (newVal) => { - if (newVal) { - // 添加小延时确保DOM已经渲染 - setTimeout(async () => { - await initChart(); - }, 100); - } -}, { immediate: true }); - // 监听窗口大小变化 onMounted(() => { window.addEventListener('resize', debounceResize); @@ -328,18 +306,26 @@ watch(() => props.visible, (newVal) => { }, 100); } else { // drawer关闭时清理图表实例 - if (chartInstance) { - chartInstance.dispose(); - chartInstance = null; + if (chartInstanceR) { + chartInstanceR.dispose(); + chartInstanceR = null; + } + if (chartInstanceL) { + chartInstanceL.dispose(); + chartInstanceL = null; } } }, { immediate: true }); // 组件销毁前清理 onBeforeUnmount(() => { - if (chartInstance) { - chartInstance.dispose(); - chartInstance = null; + if (chartInstanceR) { + chartInstanceR.dispose(); + chartInstanceR = null; + } + if (chartInstanceL) { + chartInstanceL.dispose(); + chartInstanceL = null; } if (resizeTimer) { clearTimeout(resizeTimer); @@ -349,39 +335,108 @@ onBeforeUnmount(() => { - \ No newline at end of file -- Gitee From 85d17cdfb4c0349917b6beba9e60ab5c41edf7d6 Mon Sep 17 00:00:00 2001 From: zttProjectSpace Date: Fri, 25 Apr 2025 15:43:21 +0800 Subject: [PATCH 13/82] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/svg/taskEmpty.svg | 61 ++++ src/assets/svg/taskFailed.svg | 46 +++ src/assets/svg/taskList.svg | 13 + src/assets/svg/taskLoading.svg | 49 ++++ src/assets/svg/taskScore.svg | 7 + src/components/Upload/index.vue | 1 - src/styles/dataSet.scss | 140 ++++----- src/styles/dataSetDrawer.scss | 151 ++++++++++ src/styles/reset.scss | 4 + src/views/dataSet/dataSetDrawer.vue | 319 +++++++++++++++++++++ src/views/knowledgeFile/dataSetDialog.vue | 7 +- src/views/knowledgeFile/index.vue | 13 +- src/views/knowledgeLibrary/libraryInfo.vue | 43 +-- src/views/login/index.vue | 2 - 14 files changed, 757 insertions(+), 99 deletions(-) create mode 100644 src/assets/svg/taskEmpty.svg create mode 100644 src/assets/svg/taskFailed.svg create mode 100644 src/assets/svg/taskList.svg create mode 100644 src/assets/svg/taskLoading.svg create mode 100644 src/assets/svg/taskScore.svg create mode 100644 src/styles/dataSetDrawer.scss create mode 100644 src/views/dataSet/dataSetDrawer.vue diff --git a/src/assets/svg/taskEmpty.svg b/src/assets/svg/taskEmpty.svg new file mode 100644 index 0000000..5fc2704 --- /dev/null +++ b/src/assets/svg/taskEmpty.svg @@ -0,0 +1,61 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/taskFailed.svg b/src/assets/svg/taskFailed.svg new file mode 100644 index 0000000..d604e88 --- /dev/null +++ b/src/assets/svg/taskFailed.svg @@ -0,0 +1,46 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/taskList.svg b/src/assets/svg/taskList.svg new file mode 100644 index 0000000..7246b5e --- /dev/null +++ b/src/assets/svg/taskList.svg @@ -0,0 +1,13 @@ + + + Created with Pixso. + + + + + + + + + + diff --git a/src/assets/svg/taskLoading.svg b/src/assets/svg/taskLoading.svg new file mode 100644 index 0000000..183bad2 --- /dev/null +++ b/src/assets/svg/taskLoading.svg @@ -0,0 +1,49 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/taskScore.svg b/src/assets/svg/taskScore.svg new file mode 100644 index 0000000..0796468 --- /dev/null +++ b/src/assets/svg/taskScore.svg @@ -0,0 +1,7 @@ + + + Created with Pixso. + + + + diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index dac2eb3..4067bba 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -291,7 +291,6 @@ const handleChange = (file: UploadFile) => { // 超出文件数量限制时的处理 const handleExceed = (files: File[], uploadFiles: any[]) => { - console.log(uploadFiles.length); ElMessage.warning(`超出文件数量限制,最多只能上传 ${props.maxFileNum} 个文件!`); }; diff --git a/src/styles/dataSet.scss b/src/styles/dataSet.scss index f199375..b6fc73b 100644 --- a/src/styles/dataSet.scss +++ b/src/styles/dataSet.scss @@ -51,85 +51,87 @@ } .statusFail, - .statusSuccess, - .statusCancel { - height: 24px; - width: fit-content; - padding: 0px 8px; - font-size: 12px; - line-height: 24px; - color: rgb(255 255 255); - text-align: center; - border-radius: 2px; - } + .statusSuccess, + .statusCancel { + height: 24px; + width: fit-content; + padding: 0px 8px; + font-size: 12px; + line-height: 24px; + color: rgb(255 255 255); + text-align: center; + border-radius: 2px; + } - .statusFail { - background: rgb(227, 32, 32); - } + .statusFail { + background: rgb(227, 32, 32); + } - .statusSuccess { - background: rgb(36, 171, 54); - } + .statusSuccess { + background: rgb(36, 171, 54); + } - .statusCancel { - background: rgb(141, 152, 170); - } + .statusCancel { + background: rgb(141, 152, 170); + } - .statusWaitIng { - display: flex; - align-items: center; - gap: 9px; - } + .statusWaitIng { + display: flex; + align-items: center; + gap: 9px; + } - @keyframes rotate-img { - from { - transform: rotate(0); - } + @keyframes rotate-img { + from { + transform: rotate(0); + } - to { - transform: rotate(360deg); - } - } + to { + transform: rotate(360deg); + } + } - .icon-loading { - height: 16px; - width: 16px; - background-repeat: no-repeat !important; - background-size: 100% !important; - display: inline-block; - background: url('/src/assets/icons/taskLoading.png'); - } + .icon-loading { + height: 16px; + width: 16px; + background-repeat: no-repeat !important; + background-size: 100% !important; + display: inline-block; + background: url('/src/assets/icons/taskLoading.png'); + } - .icon-box { - animation: rotate-img 0.8s infinite linear; - } + .icon-box { + animation: rotate-img 0.8s infinite linear; + } + + .statusGenerate { + display: flex; + align-items: center; - .statusGenerate { - display: flex; - align-items: center; - - .percent-box { - .el-progress-bar { - width: 88px; - } - .el-progress__text { - width: fit-content; - } - } - - .el-progress__text { - width: 24px; - min-width: 18px; - color: rgb(0 0 0); - } - - .statusGenerateText { - font-size: 12px; - font-family: 'HarmonyOS Sans SC Medium'; - margin-left: 2px; - color: rgb(0 0 0); - } + .percent-box { + .el-progress-bar { + width: 88px; } + .el-progress__text { + width: fit-content; + } + } + + .el-progress__text { + width: 24px; + min-width: 18px; + color: rgb(0 0 0); + } + .statusGenerateText { + font-size: 12px; + font-family: 'HarmonyOS Sans SC Medium'; + margin-left: 2px; + color: rgb(0 0 0); + } + } + .dataSet-container-table-box{ + margin-top: 16px; + } } diff --git a/src/styles/dataSetDrawer.scss b/src/styles/dataSetDrawer.scss new file mode 100644 index 0000000..5db65cb --- /dev/null +++ b/src/styles/dataSetDrawer.scss @@ -0,0 +1,151 @@ +.dataSetDrawerContainer{ + width: 60% !important; + .el-drawer__header{ + padding-top: 24px !important; + padding-left: 24px !important; + padding-bottom: 16px !important; + margin: unset !important; + .el-drawer__title{ + font-size: 16px; + font-weight: 700; + color: var(--o-text-color-primary); + + } + } + .el-drawer__footer{ + padding:0 24px 0 0 !important; + height: 48px !important; + display: flex; + align-items: center; + box-shadow: 0px -8px 16px 0px rgba(0, 0,0,0.1); + background-color: var(--o-bg-color-base); + } + .el-checkbox__input.is-indeterminate .el-checkbox__inner:before { + width: 12px !important; + top: 4px !important; + } + + .dataSetInfoContainer{ + display: flex; + flex-direction: column; + gap: 16px; + width: 100%; + padding: 16px 24px 24px !important; + background-color: var(--o-bg-color-light); + border-radius: 8px; + margin-bottom: 16px; + .dataSetInfoBox{ + display: flex; + justify-content: space-between; + } + .dataSetInfoNameBox,.dataSetInfoDescBox{ + display: flex; + gap: 24px; + } + .dataSetInfoNameBox{ + align-items: center; + } + + .dataSetInfoLabel{ + color: var(--o-text-color-secondary); + font-size: 12px; + position: relative; + } + + .dataSetInfoLabel::before{ + position: absolute; + color: var(--el-color-danger); + content: "*"; + left: -8px; + top: 1px; + } + + .dataSetInfoTitle{ + font-size: 14px; + } + + .dataSetInfoContent{ + width: 412px; + color: var(--o-text-color-primary); + font-size: 12px; + } + + .dataSetInfoEdit{ + color: #6395fd; + cursor: pointer; + font-size: 12px; + } + + .dataSetInfoOps{ + display: flex; + gap: 8px; + color: #6395fd; + cursor: pointer; + font-size: 12px; + } + } + + .dataSetInfoCenterBox{ + display: flex; + justify-content:space-between; + margin-bottom: 8px; + .dataSetInfoRight{ + display: flex; + gap: 8px; + .dataSetListBox,.dataSetScoreBox{ + height: 32px; + padding:0 16px; + display: flex; + align-items: center; + justify-content: center; + background: var(--o-bg-color-dark); + border-radius: 4px; + .dataSetListIcon{ + margin-top: 5px; + margin-right: 4px; + } + .dataSetScoreIcon{ + margin-top: 4px; + margin-right: 4px; + } + .dataSetListText,.dataSetScoreText{ + margin-right: 8px; + color: var(--o-text-color-secondary); + } + + .dataSetListNumber{ + font-size: 14px; + } + + .dataSetScoreNumber{ + color: var(--o-color-major); + font-size: 14px; + } + } + } + .el-button.is-disabled, .el-button.is-disabled:hover { + background-color: #ebedf3 !important; + background-image: none; + border-color: unset !important; + color: var(--o-button-color_disabled) !important; + cursor: not-allowed; + } + } + + .el-table tbody tr td:first-child .cell { + padding-left: 16px !important; + } + + .el-table tbody .el-table__cell:not(.el-table__expanded-cell):first-child, + .el-table thead .cell, + .el-table tbody .el-table-column--selection + th.el-table__cell, + .el-table-column--selection + td.el-table__cell { + padding: unset !important; + } + tbody .el-table__cell{ + padding: 0 !important; + } + .el-table__row .cell{ + padding: 8px !important; + } +} \ No newline at end of file diff --git a/src/styles/reset.scss b/src/styles/reset.scss index b640950..28eb3db 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -315,6 +315,10 @@ div:focus { } } +.el-table__header thead tr th { + background-color: #f4f6fa !important; +} + .el-button:focus-visible { outline: unset !important; } diff --git a/src/views/dataSet/dataSetDrawer.vue b/src/views/dataSet/dataSetDrawer.vue new file mode 100644 index 0000000..cdca683 --- /dev/null +++ b/src/views/dataSet/dataSetDrawer.vue @@ -0,0 +1,319 @@ + + diff --git a/src/views/knowledgeFile/dataSetDialog.vue b/src/views/knowledgeFile/dataSetDialog.vue index a2bc14c..2418a2e 100644 --- a/src/views/knowledgeFile/dataSetDialog.vue +++ b/src/views/knowledgeFile/dataSetDialog.vue @@ -1,7 +1,7 @@