+
{{ userDisplayName(user) }}
{{ user.groupPath }}
@@ -84,6 +85,8 @@ interface UserItem {
account?: string;
realName?: string;
isMain?: number;
+ /** 该行对应的组ID:同一用户多组时后端每个组出一行,选中行按该组查看权限 */
+ groupId?: number;
groupPath?: string;
}
@@ -232,7 +235,8 @@ async function onSelectUser(user: UserItem) {
selectedUser.value = user;
treeLoading.value = true;
const userId = user.id as number;
- const groupId = selectedGroup.value?.id;
+ // 行自带组ID(多组用户每个组一行)优先;组列表模式回退左侧选中组
+ const groupId = user.groupId ?? (selectedGroup.value?.id ? Number(selectedGroup.value.id) : undefined);
// 三块数据并行加载,互不阻塞
// userGroupTree 为新增接口:apiDefinitions 未重新生成(npm run api:gen)时方法不存在,降级为友好报错
const userGroupTreeApi = (Apis.GroupAuthz as any).userGroupTree
diff --git a/src/views/app/AppForm.vue b/src/views/app/AppForm.vue
index 00710e9..195f3a7 100644
--- a/src/views/app/AppForm.vue
+++ b/src/views/app/AppForm.vue
@@ -202,9 +202,13 @@ function onUploadSuccess(response: any, field: 'pcIcon' | 'appIcon') {
}
/* ---------- 前端类型选项 ---------- */
+// value 对齐后端平台枚举 com.yunhai.platform.utils.enums.ClientEnum(位掩码 key):
+// 1=Pc浏览器 2=移动App 8=微信公众号 32=钉钉;公众号/钉钉地址见表单第七行
const clientOptions = [
{ value: 1, label: 'Pc浏览器' },
{ value: 2, label: '移动App' },
+ { value: 8, label: '微信公众号' },
+ { value: 32, label: '钉钉' },
];
/* ---------- 校验规则 ---------- */
diff --git a/src/views/app/AppList.vue b/src/views/app/AppList.vue
index 70218cb..2a0123d 100644
--- a/src/views/app/AppList.vue
+++ b/src/views/app/AppList.vue
@@ -141,7 +141,8 @@ const columns = [
key: "clients",
width: 180,
render: (h: any, { row }: any) => {
- const map: Record
= { 1: "Pc浏览器", 2: "移动App" };
+ // value 对齐平台 ClientEnum:1=Pc浏览器 2=移动App 8=微信公众号 32=钉钉
+ const map: Record = { 1: "Pc浏览器", 2: "移动App", 8: "微信公众号", 32: "钉钉" };
const arr: number[] = Array.isArray(row.clients) ? row.clients : [];
if (!arr.length) return h("span", "-");
return h("span", arr.map((v) => map[v] ?? v).join("、"));