From 0d5cb7ba3867f779aceddda1f5f8290e4ff3d026 Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Fri, 22 Aug 2025 11:48:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E4=B8=AD=E5=BF=83=E9=A1=B5=E9=9D=A2=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../svg/svg-finishProductsWareHouse.svg | 4 + src/assets/svg/svg-rawMaterialStorage.svg | 3 + .../navbar/components/right-side/index.vue | 3 +- src/layouts/components/siderBar/index.vue | 3 +- src/layouts/components/siderBar/menu-list.ts | 15 +- src/router/routes/modules/materialCenter.ts | 164 ++++++++++++++++++ src/styles/font.scss | 26 +++ .../components/management/account/index.vue | 2 +- .../management/enterprise/index.vue | 2 +- .../components/management/person/index.vue | 2 +- src/views/home/components/created/index.vue | 8 +- .../history-conversation-drawer/index.vue | 9 +- .../components/finished-products/constants.ts | 26 +++ .../components/finished-products/index.vue | 35 ++++ .../components/finished-products/style.scss | 37 ++++ .../components/raw-material/index.vue | 16 ++ .../components/raw-material/style.scss | 3 + src/views/material-center/index.vue | 54 ++++++ src/views/material-center/style.scss | 2 + 19 files changed, 389 insertions(+), 25 deletions(-) create mode 100644 src/assets/svg/svg-finishProductsWareHouse.svg create mode 100644 src/assets/svg/svg-rawMaterialStorage.svg create mode 100644 src/router/routes/modules/materialCenter.ts create mode 100644 src/views/material-center/components/finished-products/constants.ts create mode 100644 src/views/material-center/components/finished-products/index.vue create mode 100644 src/views/material-center/components/finished-products/style.scss create mode 100644 src/views/material-center/components/raw-material/index.vue create mode 100644 src/views/material-center/components/raw-material/style.scss create mode 100644 src/views/material-center/index.vue create mode 100644 src/views/material-center/style.scss diff --git a/src/assets/svg/svg-finishProductsWareHouse.svg b/src/assets/svg/svg-finishProductsWareHouse.svg new file mode 100644 index 0000000..a137e0f --- /dev/null +++ b/src/assets/svg/svg-finishProductsWareHouse.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/assets/svg/svg-rawMaterialStorage.svg b/src/assets/svg/svg-rawMaterialStorage.svg new file mode 100644 index 0000000..f3cce8a --- /dev/null +++ b/src/assets/svg/svg-rawMaterialStorage.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/layouts/components/navbar/components/right-side/index.vue b/src/layouts/components/navbar/components/right-side/index.vue index 1ab142d..5641166 100644 --- a/src/layouts/components/navbar/components/right-side/index.vue +++ b/src/layouts/components/navbar/components/right-side/index.vue @@ -83,6 +83,7 @@ import router from '@/router'; import { useEnterpriseStore } from '@/stores/modules/enterprise'; import { useSidebarStore } from '@/stores/modules/side-bar'; import { useUserStore } from '@/stores'; +import { handleUserHome } from '@/utils/user'; import ExitAccountModal from '../exit-account-modal'; import DownloadCenterModal from '../task-center-modal'; @@ -134,7 +135,7 @@ const setUnread = () => { } }; const handleAgentClick = () => { - router.push({ name: props.isAgentRoute ? 'Home' : 'AgentIndex' }); + props.isAgentRoute ? handleUserHome() : router.push({ name: 'AgentIndex' }); }; diff --git a/src/layouts/components/siderBar/index.vue b/src/layouts/components/siderBar/index.vue index 992d4a3..0923d58 100644 --- a/src/layouts/components/siderBar/index.vue +++ b/src/layouts/components/siderBar/index.vue @@ -8,6 +8,7 @@ import { useAppStore } from '@/stores'; import { useSidebarStore } from '@/stores/modules/side-bar'; import { MENU_LIST } from './menu-list'; import type { typeMenuItem } from './menu-list'; +import { handleUserHome } from '@/utils/user'; import icon1 from '@/assets/img/agent/icon1.png'; @@ -124,7 +125,7 @@ export default defineComponent({ onClickItem('Home')} + onClick={handleUserHome} > {!sidebarStore.menuCollapse && 智能搜索} diff --git a/src/layouts/components/siderBar/menu-list.ts b/src/layouts/components/siderBar/menu-list.ts index c286648..b56b876 100644 --- a/src/layouts/components/siderBar/menu-list.ts +++ b/src/layouts/components/siderBar/menu-list.ts @@ -43,7 +43,7 @@ export const MENU_LIST = >{ { key: 'ModPutAccountData', icon: 'svg-putAccountData', - label: '账户数据', + label: '账户数据', routeName: 'PutAccountAccountData', requireLogin: true, activeMatch: ['PutAccountAccountData'], @@ -72,20 +72,20 @@ export const MENU_LIST = >{ icon: 'svg-materialCenter', children: [ { - key: 'ModMediaFinishProductsWareHouse', + key: 'ModMaterialCenterFinishedProductsWareHouse', icon: 'svg-finishProductsWareHouse', label: '成品库', - routeName: 'FinishProductsWareHouse', + routeName: 'MaterialCenterFinishedProducts', requireLogin: true, - activeMatch: ['FinishProductsWareHouse', 'FinishProductsWareHouseWriter'], + activeMatch: ['MaterialCenterFinishedProducts'], }, { - key: 'ModMediaRawMaterialStorage', + key: 'ModMaterialCenterRawMaterialStorage', icon: 'svg-rawMaterialStorage', label: '原料库', - routeName: 'RawMaterialStorage', + routeName: 'MaterialCenterRawMaterial', requireLogin: true, - activeMatch: ['RawMaterialStorage', 'RawMaterialStorageWriter'], + activeMatch: ['MaterialCenterRawMaterial'], }, ], }, @@ -122,4 +122,3 @@ export const MENU_LIST = >{ }, ], }; - diff --git a/src/router/routes/modules/materialCenter.ts b/src/router/routes/modules/materialCenter.ts new file mode 100644 index 0000000..326f178 --- /dev/null +++ b/src/router/routes/modules/materialCenter.ts @@ -0,0 +1,164 @@ +import type { AppRouteRecordRaw } from '../types'; +import { MENU_GROUP_IDS } from '@/router/constants'; + +import IconContentManuscript from '@/assets/svg/svg-contentManuscript.svg'; + +const COMPONENTS: AppRouteRecordRaw[] = [ + { + path: '/material-center', + name: 'MaterialCenter', + redirect: 'material-center/finished-products', + meta: { + locale: '素材中心', + icon: IconContentManuscript, + requiresAuth: true, + requireLogin: true, + roles: ['*'], + id: MENU_GROUP_IDS.CREATIVE_GENERATION_WORKSHOP_ID, + }, + children: [ + { + path: 'finished-products', + name: 'MaterialCenterFinishedProducts', + meta: { + locale: '成品库', + requiresAuth: true, + requireLogin: true, + roles: ['*'], + }, + component: () => import('@/views/material-center/index.vue'), + }, + { + path: 'raw-material', + name: 'MaterialCenterRawMaterial', + meta: { + locale: '原料库', + requiresAuth: true, + requireLogin: true, + roles: ['*'], + }, + component: () => import('@/views/material-center/index.vue'), + }, + // { + // path: 'list', + // name: 'ManuscriptList', + // meta: { + // locale: '内容稿件列表', + // requiresAuth: true, + // requireLogin: true, + // roles: ['*'], + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/list/index.vue'), + // }, + // { + // path: 'upload', + // name: 'ManuscriptUpload', + // meta: { + // locale: '稿件上传', + // requiresAuth: true, + // requireLogin: true, + // hideFooter: true, + // roles: ['*'], + // hideInMenu: true, + // activeMenu: 'ManuscriptList', + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/upload/index.vue'), + // }, + // { + // path: 'edit/:id', + // name: 'ManuscriptEdit', + // meta: { + // locale: '账号详情', + // requiresAuth: true, + // requireLogin: true, + // hideFooter: true, + // roles: ['*'], + // hideInMenu: true, + // activeMenu: 'ManuscriptList', + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/edit/index.vue'), + // }, + // { + // path: 'detail/:id', + // name: 'ManuscriptDetail', + // meta: { + // locale: '稿件详情', + // requiresAuth: true, + // requireLogin: true, + // hideFooter: true, + // roles: ['*'], + // hideInMenu: true, + // activeMenu: 'ManuscriptList', + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/detail/index.vue'), + // }, + // { + // path: 'check-list', + // name: 'ManuscriptCheckList', + // meta: { + // locale: '内容稿件审核', + // requiresAuth: true, + // requireLogin: true, + // roles: ['*'], + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/check-list/index.vue'), + // }, + // { + // path: 'check-list/detail/:id', + // name: 'ManuscriptCheckListDetail', + // meta: { + // locale: '内容稿件审核详情', + // requiresAuth: true, + // requireLogin: true, + // hideFooter: true, + // hideInMenu: true, + // roles: ['*'], + // activeMenu: 'ManuscriptCheckList', + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/detail/index.vue'), + // }, + // { + // path: 'check', + // name: 'ManuscriptCheck', + // meta: { + // locale: '稿件审核', + // requiresAuth: true, + // requireLogin: true, + // hideFooter: true, + // roles: ['*'], + // hideInMenu: true, + // activeMenu: 'ManuscriptCheckList', + // }, + // component: () => import('@/views/creative-generation-workshop/manuscript/check/index.vue'), + // }, + ], + }, + // { + // path: '/explore/list/:shareCode', + // name: 'ExploreList', + // meta: { + // locale: '分享链接列表', + // requiresAuth: false, + // requireLogin: false, + // hideFooter: true, + // hideSidebar: true, + // roles: ['*'], + // }, + // component: () => import('@/views/creative-generation-workshop/explore/list/index.vue'), + // }, + // { + // path: '/explore/detail/:shareCode/:id', + // name: 'ExploreDetail', + // meta: { + // locale: '分享链接详情', + // requiresAuth: false, + // requireLogin: false, + // hideFooter: true, + // hideSidebar: true, + // roles: ['*'], + // }, + // component: () => import('@/views/creative-generation-workshop/explore/detail/index.vue'), + // }, +]; + +export default COMPONENTS; diff --git a/src/styles/font.scss b/src/styles/font.scss index e6195d3..3b1ea9a 100644 --- a/src/styles/font.scss +++ b/src/styles/font.scss @@ -16,3 +16,29 @@ font-family: 'Manrope-SemiBold'; src: url('@/assets/fonts/Manrope-SemiBold.ttf'); } + +.font-family-regular { + font-family: $font-family-regular; +} +.font-family-medium { + font-family: $font-family-medium; +} +.font-family-light { + font-family: $font-family-light; +} +.font-family-bold { + font-family: $font-family-bold; +} + +.font-family-manrope-regular { + font-family: $font-family-manrope-regular; +} +.font-family-manrope-medium { + font-family: $font-family-manrope-medium; +} +.font-family-manrope-bold { + font-family: $font-family-manrope-bold; +} +.font-family-manrope-semiBold { + font-family: $font-family-manrope-semiBold; +} diff --git a/src/views/components/management/account/index.vue b/src/views/components/management/account/index.vue index d688822..dec8791 100644 --- a/src/views/components/management/account/index.vue +++ b/src/views/components/management/account/index.vue @@ -8,7 +8,7 @@ :columns="columns" :data="dataSource" :pagination="pagination" - class="mt-8px h-540px" + class="mt-8px" @page-change="handlePageChange" @page-size-change="handlePageSizeChange" > diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue index 95f3b8b..2c32c7a 100644 --- a/src/views/components/management/enterprise/index.vue +++ b/src/views/components/management/enterprise/index.vue @@ -3,7 +3,7 @@
企业信息
- + diff --git a/src/views/components/management/person/index.vue b/src/views/components/management/person/index.vue index 373d4f4..f1bf3ee 100644 --- a/src/views/components/management/person/index.vue +++ b/src/views/components/management/person/index.vue @@ -3,7 +3,7 @@
个人信息
- + diff --git a/src/views/home/components/created/index.vue b/src/views/home/components/created/index.vue index 7091a22..50cdad3 100644 --- a/src/views/home/components/created/index.vue +++ b/src/views/home/components/created/index.vue @@ -5,6 +5,7 @@ import SenderInput from '../sender-input/index.vue'; import { useSharedDataStore } from '@/stores/modules/share-data'; import { useRouter } from 'vue-router'; +import { handleUserHome } from '@/utils/user'; export default { setup(props, { emit, expose }) { @@ -20,12 +21,7 @@ export default { const handleSearch = () => { console.log('searchValue.value', searchValue.value); // const conversationId = searchValue.value; - // router.push({ - // name: 'Home', - // params: { - // conversationId, - // }, - // }); + // handleUserHome({conversationId}) }; const tagList = [ diff --git a/src/views/home/components/history-conversation-drawer/index.vue b/src/views/home/components/history-conversation-drawer/index.vue index baea7fb..09bb116 100644 --- a/src/views/home/components/history-conversation-drawer/index.vue +++ b/src/views/home/components/history-conversation-drawer/index.vue @@ -5,6 +5,8 @@ import Conversations from '@/components/xt-chat/xt-conversations'; import SvgIcon from '@/components/svg-icon'; import { Button, Flex, Input } from 'ant-design-vue'; import DeleteChatModal from './delete-chat-modal.vue'; + +import { handleUserHome } from '@/utils/user'; import { useRouter } from 'vue-router'; export default { @@ -48,12 +50,7 @@ export default { }; const handleActiveChange = (item) => { const { id } = item; - router.push({ - name: 'Home', - params: { - conversationId: id, - }, - }); + handleUserHome({ conversationId: id }); }; expose({ diff --git a/src/views/material-center/components/finished-products/constants.ts b/src/views/material-center/components/finished-products/constants.ts new file mode 100644 index 0000000..c874ffd --- /dev/null +++ b/src/views/material-center/components/finished-products/constants.ts @@ -0,0 +1,26 @@ +export enum AuditStatus { + All = '0', + Pending = '1', + Auditing = '2', + Passed = '3', +} + +export const TABS_LIST = [ + { + label: '全部', + value: AuditStatus.All, + }, + { + label: '待审核', + value: AuditStatus.Pending, + }, + { + label: '审核中', + value: AuditStatus.Auditing, + }, + { + label: '已通过', + value: AuditStatus.Passed, + }, +]; + diff --git a/src/views/material-center/components/finished-products/index.vue b/src/views/material-center/components/finished-products/index.vue new file mode 100644 index 0000000..2924f13 --- /dev/null +++ b/src/views/material-center/components/finished-products/index.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/material-center/components/finished-products/style.scss b/src/views/material-center/components/finished-products/style.scss new file mode 100644 index 0000000..d93b8c2 --- /dev/null +++ b/src/views/material-center/components/finished-products/style.scss @@ -0,0 +1,37 @@ +.finished-products-wrap { + :deep(.ant-tabs) { + .ant-tabs-nav { + margin-bottom: 0; + padding: 0 24px; + .ant-tabs-nav-wrap { + height: 56px; + .ant-tabs-nav-list { + .ant-tabs-tab { + .ant-tabs-tab-btn { + color: var(--Text-2, #55585f); + font-family: $font-family-regular; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + } + &.ant-tabs-tab-active { + .ant-tabs-tab-btn { + color: var(--Brand-6, #6d4cfe); + font-weight: 500; + font-family: $font-family-medium; + text-shadow: none; + } + } + } + .ant-tabs-ink-bar { + background: #6D4CFE; + } + } + } + } + .ant-tabs-content-holder { + display: none; + } + } +} diff --git a/src/views/material-center/components/raw-material/index.vue b/src/views/material-center/components/raw-material/index.vue new file mode 100644 index 0000000..f5c4aaf --- /dev/null +++ b/src/views/material-center/components/raw-material/index.vue @@ -0,0 +1,16 @@ + + + diff --git a/src/views/material-center/components/raw-material/style.scss b/src/views/material-center/components/raw-material/style.scss new file mode 100644 index 0000000..3486458 --- /dev/null +++ b/src/views/material-center/components/raw-material/style.scss @@ -0,0 +1,3 @@ +.raw-material-wrap { + +} \ No newline at end of file diff --git a/src/views/material-center/index.vue b/src/views/material-center/index.vue new file mode 100644 index 0000000..b27488a --- /dev/null +++ b/src/views/material-center/index.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/views/material-center/style.scss b/src/views/material-center/style.scss new file mode 100644 index 0000000..0d3706c --- /dev/null +++ b/src/views/material-center/style.scss @@ -0,0 +1,2 @@ +.material-center-wrap { +}