diff --git a/src/api/apiDefinitions.ts b/src/api/apiDefinitions.ts index c9bc2b6..3116ff5 100644 --- a/src/api/apiDefinitions.ts +++ b/src/api/apiDefinitions.ts @@ -32,6 +32,7 @@ export default { 'SysGroup.sysGroupRemove': ['POST', '/api/sysgroup/Delete/{id}'], 'SysGroup.disable': ['POST', '/api/sysgroup/Disable/{id}'], 'SysGroup.enable': ['POST', '/api/sysgroup/Enable/{id}'], + 'SysGroup.setIncludeChildren': ['POST', '/api/sysgroup/SetIncludeChildren/{id}'], 'SysGroup.batchAdd': ['POST', '/api/sysgroup/BatchAdd'], 'SysGroup.sysGroupAdd': ['POST', '/api/sysgroup/Add'], 'PushSubscription.test': ['POST', '/api/push/Test'], diff --git a/src/api/globals.d.ts b/src/api/globals.d.ts index 29334d6..0ea5a1a 100644 --- a/src/api/globals.d.ts +++ b/src/api/globals.d.ts @@ -148,6 +148,9 @@ export interface SysGroupRequest { type: number; sort?: number; } +export interface SysGroupIncludeChildrenRequest { + includeChildren: boolean; +} export interface PushTestRequest { appId?: number; interfacePath?: string; @@ -1584,6 +1587,35 @@ declare global { >( config: Config ): Alova2Method; + /** + * --- + * + * [POST] + * + * **path:** /api/sysgroup/SetIncludeChildren/{id} + * + * --- + * + * **RequestBody** + * ```ts + * type RequestBody = SysGroupIncludeChildrenRequest + * ``` + * + * **Response** + * ```ts + * type Response = null + * ``` + */ + setIncludeChildren< + Config extends Alova2MethodConfig & { + pathParams: { + id: number; + }; + data: SysGroupIncludeChildrenRequest; + } + >( + config: Config + ): Alova2Method; /** * --- * diff --git a/src/assets/config/menu.ts b/src/assets/config/menu.ts index 72045ef..349757e 100644 --- a/src/assets/config/menu.ts +++ b/src/assets/config/menu.ts @@ -13,6 +13,9 @@ import { UserRoleEnum } from "@/types"; * 2. 应用管理 —— S+C(局端不开放:局端的应用动作是「开通」,应用维护是平台级) * 3. 权限管理 —— 父目录:应用开通(S+B) / 组授权 / 角色授权 / 权限一览(S+B+C) * 4. 日志管理 —— 仅超管(父目录) + * 5. 基础设置 —— 非业务域的基础配置合集(当前:部门管理),后续字典/参数/模板等杂项归此 + * + * 菜单不渲染图标:本工程侧边栏只输出文字,节点无需 icon 字段。 * * 每个节点带唯一 id;子节点的 pid 由 layout.vue 的 flaten() 扁平化时 * 依据父节点 id 自动推导,用于「高亮自身 + 面包屑展示父级」联动。 @@ -48,7 +51,6 @@ export function getMenuList(userRole?: UserRoleEnum): Promise { { id: 42, modId: 1104, name: "组授权", page: "/group-auth", roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School] }, { id: 44, modId: 1110, name: "角色授权", page: "/role-authz/list", roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School] }, { id: 43, modId: 1105, name: "权限一览", page: "/permission-view", roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School] }, - { id: 45, modId: 1106, name: "部门管理", page: "/dept-manage", roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School] }, ], }, // 4. 日志管理(父目录) @@ -65,6 +67,18 @@ export function getMenuList(userRole?: UserRoleEnum): Promise { { id: 54, modId: 1112, name: "推送日志", page: "/push-log", roles: [UserRoleEnum.SuperAdmin] }, ], }, + // 5. 基础设置(父目录):非业务域的基础配置杂项合集,部门管理从「权限管理」迁入 + { + id: 6, + modId: 1115, + name: "基础设置", + page: "", + childState: true, + roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School], + children: [ + { id: 61, modId: 1106, name: "部门管理", page: "/dept-manage", roles: [UserRoleEnum.SuperAdmin, UserRoleEnum.Bureau, UserRoleEnum.School] }, + ], + }, ]; return Promise.resolve(filterMenuByRole(menu, userRole)); } diff --git a/src/router/routes.ts b/src/router/routes.ts index 5a2ccdd..1fc1e3b 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -106,13 +106,14 @@ const routes: RouteRecordRaw[] = [ component: PermissionView, meta: { title: "权限一览", icon: "icon-list", modId: 1105, roles: ALL_ADMIN }, }, - // ===== 部门管理(2026-10-20 部门线 P0 最小批:只读树 + 状态徽标 + 启停)===== - // 挂「权限管理」分组(菜单 id=45);无删除/成员/职务/新建入口——建部门=建组回「组,用户管理」 + // ===== 部门管理(2026-10-20 部门线 P0 最小批,2026-10-21 迁入「基础设置」分组)===== + // 原挂「权限管理」(modId 1108);部门属于组织基础配置而非权限,改挂「基础设置」(modId 1115) + // 无删除/成员/职务/新建入口——建部门=建组回「组,用户管理」 { path: "/dept-manage", name: "DeptManage", component: DeptManage, - meta: { title: "部门管理", icon: "icon-list", modId: 1106, parentId: 1108, roles: ALL_ADMIN }, + meta: { title: "部门管理", icon: "icon-list", modId: 1106, parentId: 1115, roles: ALL_ADMIN }, }, { path: "/push-log", diff --git a/src/views/dept-manage/DeptCard.vue b/src/views/dept-manage/DeptCard.vue index 2d4c9fa..613761f 100644 --- a/src/views/dept-manage/DeptCard.vue +++ b/src/views/dept-manage/DeptCard.vue @@ -18,8 +18,8 @@