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 @@ + + + + + + + 个人信息 + + + 编辑头像、登录用户名与联系方式 + + + + + + + + + + + + + {{ userInfo?.realName?.charAt(0) || '?' }} + + + 更换 + + + + + + + 头像 + + + 点击更换,保存后生效,不超过 2MB + + + + + + + + + + + + + + + + + + + + + + + + 重置 + + 保存 + + + +
+ 请妥善保管您的新密码 +
- 请妥善保管您的新密码 -
+ 编辑头像、登录用户名与联系方式 +
+ 头像 +
+ 点击更换,保存后生效,不超过 2MB +