From 9c2c1ed0616947fb596930bcd8df010f6f04c056 Mon Sep 17 00:00:00 2001 From: ah-max150 Date: Wed, 23 Sep 2026 17:40:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E4=B8=A4=E6=A0=8F=E5=B8=83=E5=B1=80=E6=95=B4=E5=90=88=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=8E=E6=94=B9=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/apps/web-antd/src/layouts/basic.vue | 14 +- .../router/routes/static/change-password.ts | 7 +- .../src/router/routes/static/profile.ts | 6 +- .../web-antd/src/views/sys/profile/index.vue | 320 ++++-------------- .../profile/modules/ChangePasswordCard.vue | 125 +++++++ .../profile/modules/ChangePasswordModal.vue | 147 -------- .../sys/profile/modules/ProfileInfoCard.vue | 242 +++++++++++++ 7 files changed, 439 insertions(+), 422 deletions(-) create mode 100644 apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordCard.vue delete mode 100644 apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordModal.vue create mode 100644 apps/web/apps/web-antd/src/views/sys/profile/modules/ProfileInfoCard.vue diff --git a/apps/web/apps/web-antd/src/layouts/basic.vue b/apps/web/apps/web-antd/src/layouts/basic.vue index d9c68c34..0457e158 100644 --- a/apps/web/apps/web-antd/src/layouts/basic.vue +++ b/apps/web/apps/web-antd/src/layouts/basic.vue @@ -113,8 +113,6 @@ const UserIcon = createIconifyIcon('lucide:user'); const MemoryIcon = createIconifyIcon('lucide:brain'); // 意见反馈图标 const FeedbackIcon = createIconifyIcon('lucide:message-square-plus'); -// 锁图标 -const LockIcon = createIconifyIcon('lucide:lock'); /** 是否具备智能助手聊天权限(用于「我的记忆」入口;含超管) */ const canUseAgentChat = computed(() => hasPermission('agent:chat')); @@ -128,13 +126,13 @@ const companyCount = computed(() => { const menus = computed(() => { const menuItems = []; - // 个人信息 + // 个人中心 menuItems.push({ handler: () => { router.push('/system/profile'); }, icon: UserIcon, - text: '个人信息', + text: '个人中心', }); // 我的记忆(有助手聊天权才显示) if (canUseAgentChat.value) { @@ -154,14 +152,6 @@ const menus = computed(() => { icon: FeedbackIcon, text: '意见反馈', }); - // 修改密码 - menuItems.push({ - handler: () => { - router.push('/system/change-password'); - }, - icon: LockIcon, - text: '修改密码', - }); // 可切换公司数大于 1 时显示切换公司 if (companyCount.value > 1) { diff --git a/apps/web/apps/web-antd/src/router/routes/static/change-password.ts b/apps/web/apps/web-antd/src/router/routes/static/change-password.ts index d6f3fb8a..5bfeacb8 100644 --- a/apps/web/apps/web-antd/src/router/routes/static/change-password.ts +++ b/apps/web/apps/web-antd/src/router/routes/static/change-password.ts @@ -1,16 +1,13 @@ import type { RouteRecordRaw } from 'vue-router'; /** - * 修改密码静态路由 + * 修改密码:并入个人中心,保留旧路径兼容跳转 */ const staticRoutes: RouteRecordRaw[] = [ { name: 'ChangePassword', path: '/system/change-password', - component: () => - import( - '#/views/sys/profile/modules/ChangePasswordModal.vue' - ), + redirect: '/system/profile?tab=password', meta: { title: '修改密码', hideInMenu: true, diff --git a/apps/web/apps/web-antd/src/router/routes/static/profile.ts b/apps/web/apps/web-antd/src/router/routes/static/profile.ts index 4f745a75..f99e4a4c 100644 --- a/apps/web/apps/web-antd/src/router/routes/static/profile.ts +++ b/apps/web/apps/web-antd/src/router/routes/static/profile.ts @@ -5,14 +5,16 @@ import type { RouteRecordRaw } from 'vue-router'; */ const staticRoutes: RouteRecordRaw[] = [ { - name: 'PersonalProfile', + name: 'PersonalCenter', path: '/system/profile', component: () => import('#/views/sys/profile/index.vue'), meta: { icon: 'lucide:user', - title: '个人信息', + title: '个人中心', hideInMenu: true, ignoreAccess: true, + // 页内 ?tab= 不另开系统标签 + fullPathKey: false, }, }, ]; diff --git a/apps/web/apps/web-antd/src/views/sys/profile/index.vue b/apps/web/apps/web-antd/src/views/sys/profile/index.vue index 0dfb7e10..ff421968 100644 --- a/apps/web/apps/web-antd/src/views/sys/profile/index.vue +++ b/apps/web/apps/web-antd/src/views/sys/profile/index.vue @@ -1,279 +1,87 @@ diff --git a/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordCard.vue b/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordCard.vue new file mode 100644 index 00000000..ba358d8b --- /dev/null +++ b/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordCard.vue @@ -0,0 +1,125 @@ + + + diff --git a/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordModal.vue b/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordModal.vue deleted file mode 100644 index 6561ebe7..00000000 --- a/apps/web/apps/web-antd/src/views/sys/profile/modules/ChangePasswordModal.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - diff --git a/apps/web/apps/web-antd/src/views/sys/profile/modules/ProfileInfoCard.vue b/apps/web/apps/web-antd/src/views/sys/profile/modules/ProfileInfoCard.vue new file mode 100644 index 00000000..323b9fd0 --- /dev/null +++ b/apps/web/apps/web-antd/src/views/sys/profile/modules/ProfileInfoCard.vue @@ -0,0 +1,242 @@ + + +