diff --git a/package.json b/package.json index ab97dd95cb5e97d5b0b720e6d3e5ab5e12752ad2..3ebe5ff74cc41809b80b72315e38cd9ca152b9be 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/components/EmptyStatus/index.vue b/src/components/EmptyStatus/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..61a55f7ef6cc650cb1a2db1a361f5f1c226ae6a2 --- /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 0000000000000000000000000000000000000000..177c47c403642027f97146fbbf93e8f43a42ef6c --- /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 e1d6586e7d9d562f805e03f17338ee2b341e7471..3d091b1c360a677051355214fb0415a4d8f31e92 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"> 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 e2308cd7a60fb2cb27f82e92a59efcf747021f6d..7e215a8b07f22b7b6953038a4a6b8f5faa62136e 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 0000000000000000000000000000000000000000..64e5af8cf9b7e5bb5a68ab54e726387c600f27c9 --- /dev/null +++ b/src/store/modules/group.ts @@ -0,0 +1,36 @@ +import { store } from '@/store'; + +export const useGroupStore = defineStore( + 'group', + () => { + let createKnowledgeVisible = ref(false); + 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 { + createKnowledgeVisible, + navGroup, + groupMenu, + handleSwitchMenu, + delNav, + }; + }, + { + // 持久化存储 + persist: { + key: 'group_data', + storage: sessionStorage, + pick: ['navGroup', 'groupMenu'], + }, + } +); + +export function useGroupStoreHook() { + return useGroupStore(store); +} diff --git a/src/styles/grouInfo.scss b/src/styles/grouInfo.scss new file mode 100644 index 0000000000000000000000000000000000000000..db0fc9b7587de6edea56c1bc38bd4c2e0f75de75 --- /dev/null +++ b/src/styles/grouInfo.scss @@ -0,0 +1,91 @@ +.group-info { + padding: 24px; + + .group-info-title { + display: flex; + align-items: center; + + .group-left-menu { + display: flex; + gap: 4px; + align-items: center; + height: 16px; + + .home-menu { + display: inline-block; + max-width: 80px; + height: 16px; + font-size: 12px; + line-height: 16px; + } + + .group-name { + max-width: 152px; + font-size: 12px; + font-weight: 700; + display: flex; + line-height: 16px; + & div{ + margin-left: 4px; + } + .last-name{ + text-overflow: ellipsis; + width: 130px; + overflow: hidden; + white-space: nowrap; + } + } + } + + .group-mid-menu { + width: 400px; + height: 32px; + background-color: white; + display: flex; + border-radius: 4px; + position: absolute; + left: 50%; + transform: translateX(-50%); + .section { + width: 197px; + height: 28px; + display: flex; + justify-content: center; + align-items: center; + gap: 4px; + font-size: 12px; + font-weight: 700; + margin: 2px ; + cursor: pointer; + } + + .section-active { + + color: white; + background-color: rgb(99, 149, 253); + border-radius: 4px; + } + } + } + .group-info-content{ + width: 100%; + height: calc(100vh - 100px); + border-radius: 8px; + background-color: rgb(253,254,255); + margin-top: 16px; + padding: 24px; + + .empty-content{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: calc(100vh - 100px); + .group-btn{ + border-radius: 4px !important; + width: 96px; + background-color: rgb(99,149,253); + } + } + } +} \ No newline at end of file diff --git a/src/styles/group.scss b/src/styles/group.scss new file mode 100644 index 0000000000000000000000000000000000000000..a751819a3b920c408313d95afe730b1860aa442b --- /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 b771b1fd008e301d71d3eebe20643b4be7811d44..a578a876648c9c43abf5a4aa3eb3a47cc7c8890a 100644 --- a/src/styles/knowledgeFile.scss +++ b/src/styles/knowledgeFile.scss @@ -3,8 +3,8 @@ flex-direction: column; gap: 16px; width: 100%; - height: calc(100% - 48px); - padding: 16px 24px 24px; + height: calc(100vh - 220px); + // padding: 16px 24px 24px; min-width: 1240px; .kf-container-top { display: flex; @@ -75,7 +75,7 @@ .kf-container-right { flex: 1; min-width: 700px; - padding: 16px 24px 24px 24px; + // 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 db0966d446393dd3de7aa8575eb17712411cabd5..53975b3b84591194476c4cef17cb845a6d19968b 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 bc8f7ae65a4b9c47853d9f3709dd8722c2cb6f76..2a7cc8e5a16f2fe1f2a7fe4425230bccc0b2d13b 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/libraryInfo.scss b/src/styles/libraryInfo.scss new file mode 100644 index 0000000000000000000000000000000000000000..1ed9bc43b39948fe3eec4316013f504d87567811 --- /dev/null +++ b/src/styles/libraryInfo.scss @@ -0,0 +1,80 @@ +.library-info { + padding: 24px; + + .library-info-title { + display: flex; + align-items: center; + + .library-left-menu { + display: flex; + gap: 4px; + align-items: center; + width: 232px; + height: 16px; + + .home-menu { + display: inline-block; + max-width: 80px; + height: 16px; + font-size: 12px; + line-height: 16px; + } + + .library-name { + max-width: 152px; + font-size: 12px; + font-weight: 700; + display: flex; + line-height: 16px; + & div{ + margin-left: 4px; + } + } + } + + .library-mid-menu { + width: 400px; + height: 32px; + background-color: white; + display: flex; + border-radius: 4px; + position: absolute; + left: 50%; + transform: translateX(-50%); + .section { + width: 197px; + height: 28px; + display: flex; + justify-content: center; + align-items: center; + gap: 4px; + font-size: 12px; + font-weight: 700; + margin: 2px ; + cursor: pointer; + } + + .section-active { + + color: white; + background-color: rgb(99, 149, 253); + border-radius: 4px; + } + } + } + .library-info-content{ + width: 100%; + height: calc(100vh - 100px); + border-radius: 8px; + background-color: rgb(253,254,255); + margin-top: 16px; + padding: 24px; + } +} +.library-info-title{ + font-size: 16px; + font-weight: 700; + margin-bottom: 8px; +} + .library-info-tabs{ + } \ No newline at end of file diff --git a/src/styles/reset.scss b/src/styles/reset.scss index d5b775ac30c1846104c446923227e1571d196577..c66df44c39b19d154b0a77ad363826fb0fc16db9 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/createKnowledge.vue b/src/views/group/createKnowledge.vue new file mode 100644 index 0000000000000000000000000000000000000000..ca26b3936887f7fd3fdcdf840045102197e03d50 --- /dev/null +++ b/src/views/group/createKnowledge.vue @@ -0,0 +1,25 @@ + + \ No newline at end of file diff --git a/src/views/group/data.js b/src/views/group/data.js new file mode 100644 index 0000000000000000000000000000000000000000..cdf45902ff5cbd97ae6d9cb59fc7cc8af135f1e3 --- /dev/null +++ b/src/views/group/data.js @@ -0,0 +1,43 @@ + +const groupList=[ + { + id:'11111', + name:'团队名称1', + type:'公开', + desc:'这是团队名称1的团队简介这是团队名称1的团队简介这是团队名称1的团队简介这是团队名称1的团队简介这是团队名称1的团队简介', + owner:'zhangsan', + member:8 + },{ + id:'22222', + name:'团队名称2', + type:'公开', + desc:'这是团队名称1的团队简介', + owner:'zhangsan', + member:8 + },{ + id:'33333', + name:'团队名称3', + type:'私密', + desc:'这是团队名称1的团队简介', + owner:'zhangsan', + member:8 + },{ + id:'44444', + name:'团队名称4', + type:'私密', + desc:'这是团队名称1的团队简介', + owner:'zhangsan', + member:8 + },{ + id:'5555', + name:'团队名称5', + type:'私密', + desc:'这是团队名称1的团队简介', + owner:'zhangsan', + member:8 + }, +]; + +export { + groupList, +} \ No newline at end of file diff --git a/src/views/group/groupDetail/index.vue b/src/views/group/groupDetail/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..efde11a259587fcff90402fdf99babc2499754db --- /dev/null +++ b/src/views/group/groupDetail/index.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/group/groupInfo.vue b/src/views/group/groupInfo.vue new file mode 100644 index 0000000000000000000000000000000000000000..b3354d36792215c0fa318115f2e20da4f77811c0 --- /dev/null +++ b/src/views/group/groupInfo.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/src/views/group/index.vue b/src/views/group/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..910515fca849171c074dec80152f82058c7abdfd --- /dev/null +++ b/src/views/group/index.vue @@ -0,0 +1,200 @@ + + + diff --git a/src/views/knowledgeFile/documentInfo.vue b/src/views/knowledgeFile/documentInfo.vue new file mode 100644 index 0000000000000000000000000000000000000000..a53c436faf00934257a2c227b9144bc0cdc53437 --- /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 16616b2ab04f953b4c29e411c599baabdeb05a85..c8e593883cb19f68dca46656913de51917eca57d 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 }} - - + + + }; + + onUnmounted(() => { + clearInterval(taskExportTimer.value); + clearInterval(taskTimer.value); + taskTimer.value = null; + taskExportTimer.value = null; + }); + + \ No newline at end of file diff --git a/src/views/knowledgeLibrary/libraryInfo.vue b/src/views/knowledgeLibrary/libraryInfo.vue new file mode 100644 index 0000000000000000000000000000000000000000..88d51490de588354769ff6b56fe2f2f7c1d3d36d --- /dev/null +++ b/src/views/knowledgeLibrary/libraryInfo.vue @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 697cfce3388bbb5514fe25b1a62f37b7efade29b..da5cecc43cee1a4c55385528eb34865af48f660d 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;