From 4ba24f2b60845198c97d8d3847fd025c80a63be9 Mon Sep 17 00:00:00 2001 From: sunlei Date: Mon, 29 Jun 2026 17:01:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E9=BD=90=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=B8=8E=E7=8E=AF=E5=A2=83=E6=80=BB=E8=A7=88?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + apps/web-antdv-next/src/api/core/menu.spec.ts | 10 - apps/web-antdv-next/src/api/core/menu.ts | 1 - apps/web-antdv-next/src/api/system/menu.ts | 2 + .../src/locales/langs/en-US/page.json | 3 +- .../src/locales/langs/en-US/system.json | 1 + .../src/locales/langs/zh-CN/page.json | 3 +- .../src/locales/langs/zh-CN/system.json | 1 + .../src/router/routes/modules/dashboard.ts | 9 - .../src/views/dashboard/workspace/index.vue | 266 ------------------ .../src/views/system/menu/list.vue | 7 + .../src/views/system/menu/modules/form.vue | 10 + .../src/views/system/user/data.ts | 4 +- .../src/views/system/user/modules/form.vue | 2 +- 14 files changed, 27 insertions(+), 293 deletions(-) delete mode 100644 apps/web-antdv-next/src/views/dashboard/workspace/index.vue diff --git a/README.md b/README.md index ea222a2..d1bd5e4 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ pnpm run build:antdv-next ## 业务页面 +- 系统管理 / 菜单管理维护后端 `admin_menu.sort` 排序字段,菜单树展示仍以后端返回顺序为准;默认首页入口收敛到环境总览 `/analytics`,不再保留假工作台 `/workspace` 页面。 - 系统管理 / 站内信是日志级通知列表,只展示 API 错误、QQBot 下线、NapCat 离线等后端自动捕获事件;页面提供筛选、处理/重新打开、置顶和删除,不提供人工新增或编辑。 - QQBot / 账号连接页拆分 OneBot 连接、QQ 登录、NapCat 运行和运行说明列;更新登录通过 SSE 展示 quick / password / captcha / new-device / qrcode 每步中文进度,密码登录触发 QQ 安全验证时在弹窗内完成腾讯验证码并回交 API,新设备验证二维码和腾讯验证码分开展示;行操作“运行态”打开只读抽屉,展示 NapCat runtime/protocol/session behavior profile、风险模式和登录事件证据。 - QQBot / 插件平台页保留在线命令能力表,并提供 manifest 校验、本地插件安装、安装记录、运行事件和账号绑定抽屉,接口走 `/qqbot/plugin-platform/*`。 diff --git a/apps/web-antdv-next/src/api/core/menu.spec.ts b/apps/web-antdv-next/src/api/core/menu.spec.ts index 345e71a..62f195f 100644 --- a/apps/web-antdv-next/src/api/core/menu.spec.ts +++ b/apps/web-antdv-next/src/api/core/menu.spec.ts @@ -25,11 +25,6 @@ describe('core menu api', () => { path: '/analytics', component: '/dashboard/analytics/index', }, - { - name: 'Workspace', - path: '/workspace', - component: '/dashboard/workspace/index', - }, ], }, { @@ -82,11 +77,6 @@ describe('core menu api', () => { path: '/analytics', component: '/dashboard/analytics/index', }, - { - name: 'Workspace', - path: '/workspace', - component: '/dashboard/workspace/index', - }, ], }, { diff --git a/apps/web-antdv-next/src/api/core/menu.ts b/apps/web-antdv-next/src/api/core/menu.ts index ab20d95..b3ecd07 100644 --- a/apps/web-antdv-next/src/api/core/menu.ts +++ b/apps/web-antdv-next/src/api/core/menu.ts @@ -91,7 +91,6 @@ const SUPPORTED_ADMIN_MENU_NAMES = new Set([ 'SystemUserCreate', 'SystemUserDelete', 'SystemUserEdit', - 'Workspace', ]); export function isSupportedAdminMenuName(name?: null | string | symbol) { diff --git a/apps/web-antdv-next/src/api/system/menu.ts b/apps/web-antdv-next/src/api/system/menu.ts index 33a1cdb..6d6fa82 100644 --- a/apps/web-antdv-next/src/api/system/menu.ts +++ b/apps/web-antdv-next/src/api/system/menu.ts @@ -87,6 +87,8 @@ export namespace SystemMenuApi { pid: string; /** 重定向 */ redirect?: string; + /** 排序值 */ + sort?: number; /** 菜单类型 */ type: (typeof MenuTypes)[number]; } diff --git a/apps/web-antdv-next/src/locales/langs/en-US/page.json b/apps/web-antdv-next/src/locales/langs/en-US/page.json index ec77de5..b16d8f9 100644 --- a/apps/web-antdv-next/src/locales/langs/en-US/page.json +++ b/apps/web-antdv-next/src/locales/langs/en-US/page.json @@ -11,7 +11,6 @@ }, "dashboard": { "title": "Dashboard", - "analytics": "Environment", - "workspace": "Workspace" + "analytics": "Environment" } } diff --git a/apps/web-antdv-next/src/locales/langs/en-US/system.json b/apps/web-antdv-next/src/locales/langs/en-US/system.json index 9dd74a2..6dcbfa3 100644 --- a/apps/web-antdv-next/src/locales/langs/en-US/system.json +++ b/apps/web-antdv-next/src/locales/langs/en-US/system.json @@ -59,6 +59,7 @@ "activeIcon": "Active Icon", "activePath": "Active Path", "path": "Route Path", + "sort": "Sort", "component": "Component", "status": "Status", "authCode": "Auth Code", diff --git a/apps/web-antdv-next/src/locales/langs/zh-CN/page.json b/apps/web-antdv-next/src/locales/langs/zh-CN/page.json index e91296a..094ea28 100644 --- a/apps/web-antdv-next/src/locales/langs/zh-CN/page.json +++ b/apps/web-antdv-next/src/locales/langs/zh-CN/page.json @@ -11,7 +11,6 @@ }, "dashboard": { "title": "概览", - "analytics": "环境总览", - "workspace": "工作台" + "analytics": "环境总览" } } diff --git a/apps/web-antdv-next/src/locales/langs/zh-CN/system.json b/apps/web-antdv-next/src/locales/langs/zh-CN/system.json index d719ba7..d618ddd 100644 --- a/apps/web-antdv-next/src/locales/langs/zh-CN/system.json +++ b/apps/web-antdv-next/src/locales/langs/zh-CN/system.json @@ -75,6 +75,7 @@ "operation": "操作", "parent": "上级菜单", "path": "路由地址", + "sort": "排序", "status": "状态", "title": "菜单管理", "type": "类型", diff --git a/apps/web-antdv-next/src/router/routes/modules/dashboard.ts b/apps/web-antdv-next/src/router/routes/modules/dashboard.ts index 5254dc6..a49b360 100644 --- a/apps/web-antdv-next/src/router/routes/modules/dashboard.ts +++ b/apps/web-antdv-next/src/router/routes/modules/dashboard.ts @@ -22,15 +22,6 @@ const routes: RouteRecordRaw[] = [ title: $t('page.dashboard.analytics'), }, }, - { - name: 'Workspace', - path: '/workspace', - component: () => import('#/views/dashboard/workspace/index.vue'), - meta: { - icon: 'carbon:workspace', - title: $t('page.dashboard.workspace'), - }, - }, ], }, ]; diff --git a/apps/web-antdv-next/src/views/dashboard/workspace/index.vue b/apps/web-antdv-next/src/views/dashboard/workspace/index.vue deleted file mode 100644 index b95d613..0000000 --- a/apps/web-antdv-next/src/views/dashboard/workspace/index.vue +++ /dev/null @@ -1,266 +0,0 @@ - - - diff --git a/apps/web-antdv-next/src/views/system/menu/list.vue b/apps/web-antdv-next/src/views/system/menu/list.vue index 755d028..ae47348 100644 --- a/apps/web-antdv-next/src/views/system/menu/list.vue +++ b/apps/web-antdv-next/src/views/system/menu/list.vue @@ -65,6 +65,13 @@ const columns: Array> = [ title: $t('system.menu.component'), width: 220, }, + { + align: 'center', + dataIndex: 'sort', + key: 'sort', + title: $t('system.menu.sort'), + width: 90, + }, { align: 'center', dataIndex: 'status', diff --git a/apps/web-antdv-next/src/views/system/menu/modules/form.vue b/apps/web-antdv-next/src/views/system/menu/modules/form.vue index 8d6006d..7f117a4 100644 --- a/apps/web-antdv-next/src/views/system/menu/modules/form.vue +++ b/apps/web-antdv-next/src/views/system/menu/modules/form.vue @@ -265,6 +265,16 @@ const schema: VbenFormSchema[] = [ fieldName: 'status', label: $t('system.menu.status'), }, + { + component: 'InputNumber', + componentProps: { + class: 'w-full', + precision: 0, + }, + defaultValue: 0, + fieldName: 'sort', + label: $t('system.menu.sort'), + }, { component: 'Select', componentProps: { diff --git a/apps/web-antdv-next/src/views/system/user/data.ts b/apps/web-antdv-next/src/views/system/user/data.ts index bfb0ab1..0442b1a 100644 --- a/apps/web-antdv-next/src/views/system/user/data.ts +++ b/apps/web-antdv-next/src/views/system/user/data.ts @@ -82,9 +82,9 @@ export function useFormSchema(): VbenFormSchema[] { { component: 'Input', componentProps: { - placeholder: '/workspace', + placeholder: '/analytics', }, - defaultValue: '/workspace', + defaultValue: '/analytics', fieldName: 'homePath', label: $t('system.user.homePath'), }, diff --git a/apps/web-antdv-next/src/views/system/user/modules/form.vue b/apps/web-antdv-next/src/views/system/user/modules/form.vue index 3c48e8a..72dd2c8 100644 --- a/apps/web-antdv-next/src/views/system/user/modules/form.vue +++ b/apps/web-antdv-next/src/views/system/user/modules/form.vue @@ -49,7 +49,7 @@ const [Drawer, drawerApi] = useVbenDrawer({ formApi.resetForm(); formApi.setValues({ ...data, - homePath: data?.homePath || '/workspace', + homePath: data?.homePath || '/analytics', password: '', status: data?.status ?? 1, timezone: data?.timezone || 'Asia/Shanghai',