diff --git a/src/assets/config/menu.ts b/src/assets/config/menu.ts index 5b592e7..5bcfe48 100644 --- a/src/assets/config/menu.ts +++ b/src/assets/config/menu.ts @@ -62,7 +62,6 @@ export function getMenuList(userRole?: UserRoleEnum): Promise { { id: 53, modId: 1111, name: "操作日志", page: "/oplog", roles: [UserRoleEnum.SuperAdmin] }, { id: 56, modId: 1114, name: "开放接口日志", page: "/oapilog", roles: [UserRoleEnum.SuperAdmin] }, { id: 54, modId: 1112, name: "推送日志", page: "/push-log", roles: [UserRoleEnum.SuperAdmin] }, - { id: 55, modId: 1113, name: "测试推送", page: "/push-test", roles: [UserRoleEnum.SuperAdmin] }, ], }, ]; diff --git a/src/router/routes.ts b/src/router/routes.ts index 645e0cf..0d6a901 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -12,7 +12,6 @@ import PermissionView from "@/views/PermissionView.vue"; import OperationLogList from "@/views/oplog/OperationLogList.vue"; import OapiLogList from "@/views/oapilog/OapiLogList.vue"; import PushLog from "@/views/push/PushLog.vue"; -import PushTest from "@/views/push/PushTest.vue"; import NoAuth from "@/views/NoAuth.vue"; // 管理端四级访问控制:meta.roles 为空/未声明 = 登录即可访问 @@ -112,12 +111,6 @@ const routes: RouteRecordRaw[] = [ component: PushLog, meta: { title: "推送日志", icon: "icon-list", modId: 1112, keepAlive: true, roles: [UserRoleEnum.SuperAdmin] }, }, - { - path: "/push-test", - name: "PushTest", - component: PushTest, - meta: { title: "测试推送", icon: "icon-list", modId: 1113, roles: [UserRoleEnum.SuperAdmin] }, - }, // ===== 操作日志 ===== { path: "/oplog", diff --git a/src/views/GroupAuth.vue b/src/views/GroupAuth.vue index f099010..43ad0cd 100644 --- a/src/views/GroupAuth.vue +++ b/src/views/GroupAuth.vue @@ -39,10 +39,11 @@ :type="collapsedMap[String(item.cat.id)] ? 'ios-arrow-forward' : 'ios-arrow-down'" /> {{ item.cat.name }} {{ item.treeData.length }}个应用 - 子组继承 + + 子组继承 - 全部展开 + 全部展开: @@ -662,6 +663,10 @@ onMounted(async () => { font-size: 13px; color: #333; margin-left: 6px; + /* 卡片是 3 列布局,列宽有限:用超大的收缩系数让分类名先让位(省略号), + 保证右侧「子组继承 / 全部展开」整组不被挤出可视区 */ + flex: 0 999 auto; + min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -671,15 +676,28 @@ onMounted(async () => { color: #999; font-size: 12px; margin-left: 8px; - flex: 1; + /* 次优先收缩:空间实在不够时先截断数量文案,也不挤走开关 */ + flex: 0 10 auto; + min-width: 0; + overflow: hidden; white-space: nowrap; } +/* 弹性空隙:把右侧「子组继承 | 全部展开」整组推到卡片头右端,与分类名/数量拉开距离 */ +.cat-spacer { + flex: 1 1 0; + min-width: 0; +} + .inherit-cap { font-size: 12px; color: #999; flex-shrink: 0; - margin-right: 6px; + padding: 0 6px; + line-height: 18px; + background: #f0f2f5; + border-radius: 2px; + cursor: default; } .expand-all { @@ -687,6 +705,10 @@ onMounted(async () => { align-items: center; flex-shrink: 0; gap: 4px; + /* 与左侧「子组继承」提示以竖线分隔:否则两个标签相邻会被读成同一个开关的说明 */ + margin-left: 10px; + padding-left: 10px; + border-left: 1px solid #e8eaec; } .expand-all-label { diff --git a/src/views/PermissionView.vue b/src/views/PermissionView.vue index 2083cea..76d4b73 100644 --- a/src/views/PermissionView.vue +++ b/src/views/PermissionView.vue @@ -62,11 +62,19 @@
-
{{ permMainTitle }}
+
+ {{ permMainTitle }} + + + 全部展开: + + +
权限加载中...
{{ permEmptyTip }}
- +
@@ -156,6 +164,9 @@ const permScope = ref<{ type: "user" | "group" | "role"; id?: number; label: str label: "", }); +// 已授权应用面板的「全部展开」开关(默认关闭):应用层默认折叠,需按需展开模块 +const permExpandAll = ref(false); + const permMainTitle = computed(() => { if (permScope.value.type === "group") return `已授权应用(部门:${permScope.value.label})`; if (permScope.value.type === "role") return `已授权应用(角色:${permScope.value.label})`; @@ -571,6 +582,30 @@ function formatModules(modules: ModuleNode[]): any[] { font-size: 13px; background: #fafafa; border-bottom: 1px solid #f0f0f0; + display: flex; + align-items: center; +} + +.side-title-text { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.expand-all { + display: flex; + align-items: center; + flex-shrink: 0; + gap: 4px; + font-weight: 400; +} + +.expand-all-label { + font-size: 12px; + color: #999; + white-space: nowrap; } .side-body { diff --git a/src/views/role-authz/AppModuleCheckTree.vue b/src/views/role-authz/AppModuleCheckTree.vue index 63e2528..5abcbb1 100644 --- a/src/views/role-authz/AppModuleCheckTree.vue +++ b/src/views/role-authz/AppModuleCheckTree.vue @@ -26,9 +26,10 @@ :type="collapsedMap[String(item.cat.id)] ? 'ios-arrow-forward' : 'ios-arrow-down'" /> {{ item.cat.name }} {{ item.treeData.length }}个应用 + - 全部展开 + 全部展开: @@ -393,6 +394,9 @@ watch( font-size: 13px; color: #333; margin-left: 6px; + /* 列宽有限:分类名优先让位(省略号),保证右侧「全部展开」不被挤出可视区 */ + flex: 0 999 auto; + min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -402,10 +406,18 @@ watch( color: #999; font-size: 12px; margin-left: 8px; - flex: 1; + flex: 0 10 auto; + min-width: 0; + overflow: hidden; white-space: nowrap; } +/* 弹性空隙:把「全部展开」整组推到卡片头右端 */ +.cat-spacer { + flex: 1 1 0; + min-width: 0; +} + .cat-card-body { padding: 6px 8px; }