@ximatai/muyun-web-app 0.26.13 → 0.26.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/{BusinessActivityLogView-UC4rH4Fn.js → BusinessActivityLogView-BUg5WTm-.js} +1 -1
  2. package/dist/BusinessLogListDrawer-BOTE_7aT.js +825 -0
  3. package/dist/{LoginAuditLogView-Cjrp8MKX.js → LoginAuditLogView-DBNtvmIy.js} +1 -1
  4. package/dist/{ModuleActionManagementView-Dkb35QXc.js → ModuleActionManagementView-Bq1VO51Y.js} +165 -165
  5. package/dist/{ModuleGovernanceView-Dx43QvGf.js → ModuleGovernanceView-B8u4_erd.js} +3570 -2877
  6. package/dist/{RequestErrorLogView-WnGvMWiF.js → RequestErrorLogView-BrtH3ptj.js} +1 -1
  7. package/dist/{RoleDetailWorkspaceView-DPDb_QOn.js → RoleDetailWorkspaceView-6LW3tLA1.js} +276 -276
  8. package/dist/{RuntimeLogView-BRl4ZDkU.js → RuntimeLogView-s3X5CdHB.js} +47 -80
  9. package/dist/index.css +1 -1
  10. package/dist/index.js +400 -400
  11. package/dist/{moduleGovernanceWorkspaceView-4V_UW-Bt.js → moduleGovernanceWorkspaceView-BRgJbUjJ.js} +2 -2
  12. package/dist/{platform-components-1cvOeHmo.js → platform-components-Dt859Hbr.js} +3449 -2676
  13. package/dist/platform-workbench-DfqFnlm-.js +14701 -0
  14. package/dist/{http-B0TC0pJB.js → sse-mGbuCAax.js} +41 -11
  15. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +218 -8
  16. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +230 -18
  17. package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +2 -2
  18. package/dist/types/dynamic-page-runtime/assistantRecordEditorPolicy.d.ts +6 -0
  19. package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +1 -0
  20. package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +2 -0
  21. package/dist/types/dynamic-page-runtime/index.d.ts +1 -0
  22. package/dist/types/dynamic-page-runtime/modulePageAssistantScope.d.ts +8 -0
  23. package/dist/types/dynamic-page-runtime/modulePageAssistantSurface.d.ts +6 -0
  24. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +110 -5
  25. package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
  26. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +8 -0
  27. package/dist/types/platform-components/QueryValueEditor.vue.d.ts +1 -1
  28. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
  29. package/dist/types/platform-components/RecordFormFields.vue.d.ts +1 -1
  30. package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -1
  31. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +8 -0
  32. package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +5 -2
  33. package/dist/types/platform-components/index.d.ts +4 -1
  34. package/dist/types/platform-components/querySettlementController.d.ts +5 -0
  35. package/dist/types/platform-components/recordQueryListColumnModel.d.ts +7 -0
  36. package/dist/types/platform-components/recordQueryListQueryController.d.ts +36 -0
  37. package/dist/types/platform-components/recordTreeQueryController.d.ts +18 -0
  38. package/dist/types/platform-components/referencePickerModel.d.ts +2 -0
  39. package/dist/types/platform-workbench/AssistantMarkdownContent.vue.d.ts +6 -0
  40. package/dist/types/platform-workbench/AssistantSelectionCard.vue.d.ts +15 -0
  41. package/dist/types/platform-workbench/Workbench.vue.d.ts +7 -2
  42. package/dist/types/platform-workbench/WorkbenchAssistantPanel.vue.d.ts +12 -0
  43. package/dist/types/platform-workbench/assistantMarkdown.d.ts +1 -0
  44. package/dist/types/platform-workbench/index.d.ts +1 -0
  45. package/dist/types/platform-workbench/workbenchAssistantCapabilities.d.ts +3 -0
  46. package/dist/types/views/BusinessLogRetentionControl.vue.d.ts +7 -0
  47. package/dist/types/views/businessLogClient.d.ts +3 -0
  48. package/dist/types/views/businessLogRetentionClient.d.ts +25 -0
  49. package/dist/types/views/metadataGovernanceAssistantSurface.d.ts +122 -0
  50. package/dist/types/views/metadataModelChangeSetClient.d.ts +36 -0
  51. package/dist/types/views/metadataNaming.d.ts +4 -0
  52. package/dist/types/views/runtimeLogSse.d.ts +3 -13
  53. package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +2 -0
  54. package/dist/types/web-contracts/assistant.d.ts +59 -0
  55. package/dist/types/web-contracts/index.d.ts +1 -0
  56. package/dist/types/web-core/assistantRuntime.d.ts +77 -0
  57. package/dist/types/web-core/assistantSurface.d.ts +92 -0
  58. package/dist/types/web-core/assistantTurnClient.d.ts +8 -0
  59. package/dist/types/web-core/index.d.ts +4 -0
  60. package/dist/types/web-core/sse.d.ts +9 -0
  61. package/dist/{workspaceViews-CCg6V0pr.js → workspaceViews-DijY4n32.js} +554 -554
  62. package/package.json +1 -1
  63. package/dist/BusinessLogListDrawer-BtaXVJKz.js +0 -564
  64. package/dist/platform-workbench-Cu14Xd9d.js +0 -10299
@@ -1,8 +1,8 @@
1
1
  import { n as e } from "./rolldown-runtime-DPVXH0ON.js";
2
- import { Bn as t, C as n, Cn as r, Gt as i, Ht as a, I as o, It as s, Jt as c, L as l, Lt as u, O as d, Ot as f, Rn as p, Rt as m, T as h, Un as g, Ut as _, Vn as v, Wt as y, bn as b, cn as x, dn as S, f as C, jt as w, kt as T, ln as E, lr as D, nn as O, nr as k, on as A, pn as j, qn as ee, rt as M, sn as N, tn as P, u as te, zn as ne, zt as re } from "./platform-components-1cvOeHmo.js";
3
- import { r as ie, t as F } from "./http-B0TC0pJB.js";
4
- import { K as I, _ as ae, it as L, q as oe, s as se, t as ce, u as le } from "./platform-workbench-Cu14Xd9d.js";
5
- import { n as ue, r as de } from "./moduleGovernanceWorkspaceView-4V_UW-Bt.js";
2
+ import { $t as t, C as n, F as r, Gn as i, Ht as a, I as o, Jn as s, Jt as c, Kn as l, Mt as u, O as d, On as f, Pt as p, Qn as m, T as h, Tn as g, Tr as _, Un as v, Ut as y, Vt as b, Wn as x, Wt as S, Xt as C, Yt as w, dn as T, f as E, fn as ee, gn as D, jt as te, mn as O, on as ne, ot as re, pn as ie, qt as k, sn as A, sr as j, u as ae, vn as M } from "./platform-components-Dt859Hbr.js";
3
+ import { i as N, n as P } from "./sse-mGbuCAax.js";
4
+ import { K as F, _ as oe, at as I, q as se, s as ce, t as le, u as ue } from "./platform-workbench-DfqFnlm-.js";
5
+ import { n as de, r as L } from "./moduleGovernanceWorkspaceView-BRgJbUjJ.js";
6
6
  import { Fragment as R, computed as z, createBlock as B, createCommentVNode as V, createElementBlock as H, createElementVNode as U, createSlots as fe, createTextVNode as W, createVNode as G, defineAsyncComponent as pe, defineComponent as K, guardReactiveProps as me, mergeProps as he, nextTick as ge, normalizeClass as _e, normalizeProps as ve, onBeforeUnmount as ye, onMounted as be, onUnmounted as xe, openBlock as q, ref as J, renderList as Se, renderSlot as Ce, resolveDynamicComponent as we, toDisplayString as Y, toValue as Te, unref as X, watch as Z, withCtx as Q, withKeys as Ee, withModifiers as De } from "vue";
7
7
  //#region src/web-core/dataChanges.ts
8
8
  function Oe(e = {}) {
@@ -51,11 +51,11 @@ var Me = /* @__PURE__ */ new Set([
51
51
  "platform",
52
52
  "tenant",
53
53
  "organization"
54
- ]), Ne = de({
54
+ ]), Ne = L({
55
55
  type: "iam.role.detail",
56
56
  route: "/iam/role",
57
57
  moduleAlias: "iam.role",
58
- component: pe(() => import("./RoleDetailWorkspaceView-DPDb_QOn.js")),
58
+ component: pe(() => import("./RoleDetailWorkspaceView-6LW3tLA1.js")),
59
59
  layout: "workspace",
60
60
  routeTitle: "角色管理",
61
61
  presentations: ["drawer", "tab"],
@@ -74,7 +74,7 @@ var Me = /* @__PURE__ */ new Set([
74
74
  ...typeof r == "string" ? { scopeId: r } : {}
75
75
  };
76
76
  }
77
- }), Pe = de({
77
+ }), Pe = L({
78
78
  type: "iam.role.authorization",
79
79
  route: "/iam/role/authorization",
80
80
  moduleAlias: "iam.role",
@@ -88,11 +88,11 @@ var Me = /* @__PURE__ */ new Set([
88
88
  let t = e.roleId;
89
89
  return typeof t == "string" && t ? { roleId: t } : void 0;
90
90
  }
91
- }), Fe = [Ne, Pe], Ie = de({
91
+ }), Fe = [Ne, Pe], Ie = L({
92
92
  type: "platform.module.actions",
93
93
  route: "/_platform/workspace/platform.module.actions",
94
94
  moduleAlias: "platform.module",
95
- component: pe(() => import("./ModuleActionManagementView-Dkb35QXc.js").then((e) => e.n)),
95
+ component: pe(() => import("./ModuleActionManagementView-Bq1VO51Y.js").then((e) => e.n)),
96
96
  layout: "workspace",
97
97
  routeTitle: "模块管理",
98
98
  presentations: ["tab"],
@@ -110,7 +110,7 @@ var Me = /* @__PURE__ */ new Set([
110
110
  //#endregion
111
111
  //#region src/platform-admin-runtime/module-menu/moduleMenuClient.ts
112
112
  function Le(e) {
113
- let t = r(e, { moduleAlias: "platform.menu_scheme" });
113
+ let t = f(e, { moduleAlias: "platform.menu_scheme" });
114
114
  return {
115
115
  async schemes() {
116
116
  let e = [];
@@ -131,9 +131,9 @@ function Le(e) {
131
131
  })).records;
132
132
  },
133
133
  insert(t, n) {
134
- return r(ie(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).insert(n);
134
+ return f(N(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).insert(n);
135
135
  },
136
- visible: () => L(e).mine().then((e) => e.records)
136
+ visible: () => I(e).mine().then((e) => e.records)
137
137
  };
138
138
  }
139
139
  function $(e, t = "") {
@@ -170,13 +170,13 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
170
170
  }, We = {
171
171
  key: 4,
172
172
  role: "alert"
173
- }, Ge = /*#__PURE__*/ j(/* @__PURE__ */ K({
173
+ }, Ge = /*#__PURE__*/ M(/* @__PURE__ */ K({
174
174
  __name: "ModuleMenuDrawer",
175
175
  props: { context: {} },
176
176
  setup(e) {
177
- let t = e, n = le(), r = Le(t.context.module.http), i = String(t.context.record?.alias ?? t.context.record?.id ?? ""), a = b({ moduleAlias: i }), o = J(""), s = J(!1), c = J(String(t.context.record?.title ?? i)), l = J([]), u = J(""), d = J("root"), f = J("tab"), p = J([]), m = J(!0), h = J(!1), g = J(!1), _ = J(""), v = J(), y = J(""), x = J(), C = J(!1), w = 0;
178
- ye(() => w++);
179
- let T = z(() => [{
177
+ let t = e, n = ue(), r = Le(t.context.module.http), i = String(t.context.record?.alias ?? t.context.record?.id ?? ""), a = g({ moduleAlias: i }), o = J(""), s = J(!1), c = J(String(t.context.record?.title ?? i)), l = J([]), u = J(""), d = J("root"), f = J("tab"), p = J([]), m = J(!0), h = J(!1), _ = J(!1), v = J(""), y = J(), b = J(""), x = J(), S = J(!1), C = 0;
178
+ ye(() => C++);
179
+ let w = z(() => [{
180
180
  value: "root",
181
181
  title: "顶层",
182
182
  children: Re(p.value)
@@ -186,63 +186,63 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
186
186
  value: e.id,
187
187
  label: n ? `${t} · ${r}` : t
188
188
  };
189
- })), D = z(() => $(p.value).find(({ menu: e }) => e.moduleAlias === i && e.parentId === d.value)), O = z(() => !m.value && !g.value && !v.value && !!(i && u.value && c.value.trim()) && h.value && s.value);
189
+ })), te = z(() => $(p.value).find(({ menu: e }) => e.moduleAlias === i && e.parentId === d.value)), O = z(() => !m.value && !_.value && !y.value && !!(i && u.value && c.value.trim()) && h.value && s.value);
190
190
  Z([
191
191
  O,
192
- g,
193
- v
192
+ _,
193
+ y
194
194
  ], () => {
195
- t.context.setCloseBlocked(g.value), t.context.setTitleActions(v.value ? [] : [{
195
+ t.context.setCloseBlocked(_.value), t.context.setTitleActions(y.value ? [] : [{
196
196
  key: "add-menu",
197
197
  label: "添加",
198
198
  emphasis: "primary",
199
199
  disabled: !O.value,
200
- loading: g.value,
201
- run: M
200
+ loading: _.value,
201
+ run: A
202
202
  }]);
203
- }, { immediate: !0 }), Z(u, () => void j()), k();
204
- async function k() {
205
- s.value = !1, h.value = !1, m.value = !0, _.value = "";
206
- let e = ++w;
203
+ }, { immediate: !0 }), Z(u, () => void ie()), re();
204
+ async function re() {
205
+ s.value = !1, h.value = !1, m.value = !0, v.value = "";
206
+ let e = ++C;
207
207
  try {
208
208
  let [t, n] = await Promise.all([r.schemes(), a.runtime.load()]);
209
- if (e !== w) return;
210
- if (f.value = n.entryType === "link" ? "window" : "tab", o.value = te(n), s.value = !o.value, l.value = t, !E.value.length) {
211
- _.value = "暂无可用菜单方案,请先在菜单管理中配置方案。", m.value = !1;
209
+ if (e !== C) return;
210
+ if (f.value = n.entryType === "link" ? "window" : "tab", o.value = j(n), s.value = !o.value, l.value = t, !E.value.length) {
211
+ v.value = "暂无可用菜单方案,请先在菜单管理中配置方案。", m.value = !1;
212
212
  return;
213
213
  }
214
214
  let i = await r.visible();
215
- if (e !== w) return;
215
+ if (e !== C) return;
216
216
  let c = i[0]?.record.schemeId, d = E.value.some((e) => e.value === c) ? c : String(E.value[0].value);
217
- u.value === d ? await j() : u.value = d;
217
+ u.value === d ? await ie() : u.value = d;
218
218
  } catch (t) {
219
- e === w && (_.value = ne(t), m.value = !1);
219
+ e === C && (v.value = ae(t), m.value = !1);
220
220
  }
221
221
  }
222
- async function j() {
223
- let e = ++w;
224
- d.value = "root", p.value = [], h.value = !1, _.value = "", m.value = !0;
222
+ async function ie() {
223
+ let e = ++C;
224
+ d.value = "root", p.value = [], h.value = !1, v.value = "", m.value = !0;
225
225
  try {
226
226
  let t = await r.tree(u.value);
227
- e === w && (p.value = t, h.value = !0);
227
+ e === C && (p.value = t, h.value = !0);
228
228
  } catch (t) {
229
- e === w && (_.value = ne(t));
229
+ e === C && (v.value = ae(t));
230
230
  } finally {
231
- e === w && (m.value = !1);
231
+ e === C && (m.value = !1);
232
232
  }
233
233
  }
234
- async function ee() {
235
- C.value = !1, _.value = "";
234
+ async function k() {
235
+ S.value = !1, v.value = "";
236
236
  try {
237
237
  let e = await (n?.refreshMenus?.() ?? r.visible());
238
- x.value = $(e).find(({ menu: e }) => e.id === v.value?.id)?.menu, C.value = !0;
238
+ x.value = $(e).find(({ menu: e }) => e.id === y.value?.id)?.menu, S.value = !0;
239
239
  } catch {
240
- _.value = "菜单已添加,导航刷新失败。请重试刷新,无需重复添加。";
240
+ v.value = "菜单已添加,导航刷新失败。请重试刷新,无需重复添加。";
241
241
  }
242
242
  }
243
- async function M() {
243
+ async function A() {
244
244
  if (O.value) {
245
- g.value = !0, _.value = "";
245
+ _.value = !0, v.value = "";
246
246
  try {
247
247
  let e = await r.insert(u.value, {
248
248
  title: c.value.trim(),
@@ -252,72 +252,72 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
252
252
  openMode: f.value,
253
253
  enabled: !0
254
254
  });
255
- v.value = e.record;
255
+ y.value = e.record;
256
256
  let n = $(p.value).find(({ menu: e }) => e.id === d.value)?.path, a = l.value.find((e) => e.id === u.value);
257
- y.value = [
257
+ b.value = [
258
258
  a?.title,
259
259
  n,
260
260
  c.value.trim()
261
- ].filter(Boolean).join(" / "), t.context.refreshDetailExtensions(), await ee();
261
+ ].filter(Boolean).join(" / "), t.context.refreshDetailExtensions(), await k();
262
262
  } catch (e) {
263
- _.value = ne(e);
263
+ v.value = ae(e);
264
264
  } finally {
265
- g.value = !1;
265
+ _.value = !1;
266
266
  }
267
267
  }
268
268
  }
269
- function te(e) {
269
+ function j(e) {
270
270
  return e.entryType === "route" ? e.entryRoute ? "" : "该模块尚未配置页面地址,请返回模块补充。" : e.entryType === "link" ? e.entryExternalUrl ? "" : "该模块尚未配置链接地址,请返回模块补充。" : e.uiDescriptor?.page ? "" : "该模块尚无可用业务页面,请返回模块完成页面配置;使用草稿配置的页面需先发布。";
271
271
  }
272
- function ne(e) {
272
+ function ae(e) {
273
273
  return e instanceof Error ? e.message : "加载失败,请重试。";
274
274
  }
275
- function re() {
275
+ function M() {
276
276
  x.value && n?.openMenu && (n.openMenu(x.value), t.context.close());
277
277
  }
278
278
  return (t, r) => (q(), H("div", ze, [
279
- v.value ? (q(), H(R, { key: 1 }, [
279
+ y.value ? (q(), H(R, { key: 1 }, [
280
280
  r[12] ||= U("strong", null, "已添加到菜单", -1),
281
- U("p", null, Y(y.value), 1),
282
- x.value && X(n)?.openMenu ? (q(), B(X(S), {
281
+ U("p", null, Y(b.value), 1),
282
+ x.value && X(n)?.openMenu ? (q(), B(X(D), {
283
283
  key: 0,
284
284
  type: "primary",
285
- onClick: re
285
+ onClick: M
286
286
  }, {
287
287
  default: Q(() => [...r[10] ||= [W("打开", -1)]]),
288
288
  _: 1
289
- })) : C.value ? (q(), H("p", He, " 当前用户的导航中暂不可见,请检查菜单方案适用范围、上级菜单状态及模块访问权限。 ")) : V("v-if", !0),
290
- _.value ? (q(), B(X(S), {
289
+ })) : S.value ? (q(), H("p", He, " 当前用户的导航中暂不可见,请检查菜单方案适用范围、上级菜单状态及模块访问权限。 ")) : V("v-if", !0),
290
+ v.value ? (q(), B(X(D), {
291
291
  key: 2,
292
- disabled: g.value,
293
- onClick: ee
292
+ disabled: _.value,
293
+ onClick: k
294
294
  }, {
295
295
  default: Q(() => [...r[11] ||= [W("刷新导航", -1)]]),
296
296
  _: 1
297
297
  }, 8, ["disabled"])) : V("v-if", !0)
298
298
  ], 64)) : (q(), H(R, { key: 0 }, [
299
- U("label", null, [r[5] ||= W("菜单名称", -1), G(X(A), {
299
+ U("label", null, [r[5] ||= W("菜单名称", -1), G(X(T), {
300
300
  value: c.value,
301
301
  "onUpdate:value": r[0] ||= (e) => c.value = e,
302
- disabled: g.value,
302
+ disabled: _.value,
303
303
  "aria-label": "菜单名称"
304
304
  }, null, 8, ["value", "disabled"])]),
305
- E.value.length > 1 ? (q(), H("label", Be, [r[6] ||= W("菜单方案 ", -1), G(X(N), {
305
+ E.value.length > 1 ? (q(), H("label", Be, [r[6] ||= W("菜单方案 ", -1), G(X(ee), {
306
306
  value: u.value,
307
307
  options: E.value,
308
308
  "allow-clear": !1,
309
- disabled: g.value,
309
+ disabled: _.value,
310
310
  "onUpdate:value": r[1] ||= (e) => u.value = String(e ?? "")
311
311
  }, null, 8, [
312
312
  "value",
313
313
  "options",
314
314
  "disabled"
315
315
  ])])) : V("v-if", !0),
316
- U("label", null, [r[7] ||= W("放置位置 ", -1), G(X(P), {
316
+ U("label", null, [r[7] ||= W("放置位置 ", -1), G(X(ne), {
317
317
  value: d.value,
318
- "tree-data": T.value,
318
+ "tree-data": w.value,
319
319
  "allow-clear": !1,
320
- disabled: m.value || g.value,
320
+ disabled: m.value || _.value,
321
321
  loading: m.value,
322
322
  "onUpdate:value": r[2] ||= (e) => d.value = String(e ?? "root")
323
323
  }, null, 8, [
@@ -326,10 +326,10 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
326
326
  "disabled",
327
327
  "loading"
328
328
  ])]),
329
- U("details", null, [r[9] ||= U("summary", null, "更多设置", -1), U("label", null, [r[8] ||= W("打开方式 ", -1), G(X(N), {
329
+ U("details", null, [r[9] ||= U("summary", null, "更多设置", -1), U("label", null, [r[8] ||= W("打开方式 ", -1), G(X(ee), {
330
330
  value: f.value,
331
331
  "allow-clear": !1,
332
- disabled: g.value,
332
+ disabled: _.value,
333
333
  options: [{
334
334
  value: "tab",
335
335
  label: "页签内打开"
@@ -339,21 +339,21 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
339
339
  }],
340
340
  "onUpdate:value": r[3] ||= (e) => f.value = e === "window" ? "window" : "tab"
341
341
  }, null, 8, ["value", "disabled"])])]),
342
- D.value ? (q(), H("p", Ve, "此位置已有「" + Y(D.value.menu.title) + "」,仍可添加另一个入口。", 1)) : V("v-if", !0)
342
+ te.value ? (q(), H("p", Ve, "此位置已有「" + Y(te.value.menu.title) + "」,仍可添加另一个入口。", 1)) : V("v-if", !0)
343
343
  ], 64)),
344
344
  o.value ? (q(), H("p", Ue, Y(o.value), 1)) : V("v-if", !0),
345
- o.value ? (q(), B(X(S), {
345
+ o.value ? (q(), B(X(D), {
346
346
  key: 3,
347
347
  onClick: r[4] ||= (t) => e.context.close()
348
348
  }, {
349
349
  default: Q(() => [...r[13] ||= [W("返回模块", -1)]]),
350
350
  _: 1
351
351
  })) : V("v-if", !0),
352
- _.value ? (q(), H("p", We, Y(_.value), 1)) : V("v-if", !0),
353
- _.value && !v.value && !h.value ? (q(), B(X(S), {
352
+ v.value ? (q(), H("p", We, Y(v.value), 1)) : V("v-if", !0),
353
+ v.value && !y.value && !h.value ? (q(), B(X(D), {
354
354
  key: 5,
355
- disabled: g.value,
356
- onClick: k
355
+ disabled: _.value,
356
+ onClick: re
357
357
  }, {
358
358
  default: Q(() => [...r[14] ||= [W("重试", -1)]]),
359
359
  _: 1
@@ -363,11 +363,11 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
363
363
  }), [["__scopeId", "data-v-38eeb884"]]), Ke = { class: "module-menu-entries" }, qe = { key: 0 }, Je = {
364
364
  key: 1,
365
365
  role: "status"
366
- }, Ye = { key: 2 }, Xe = { key: 0 }, Ze = /*#__PURE__*/ j(/* @__PURE__ */ K({
366
+ }, Ye = { key: 2 }, Xe = { key: 0 }, Ze = /*#__PURE__*/ M(/* @__PURE__ */ K({
367
367
  __name: "ModuleMenuEntriesSection",
368
368
  props: { context: {} },
369
369
  setup(e) {
370
- let t = e, n = le(), r = J([]), i = J(/* @__PURE__ */ new Map()), a = J(!1), o = J(""), s = 0;
370
+ let t = e, n = ue(), r = J([]), i = J(/* @__PURE__ */ new Map()), a = J(!1), o = J(""), s = 0;
371
371
  ye(() => s++), Z(() => [t.context.record.id, t.context.refreshKey], () => void c(), { immediate: !0 });
372
372
  async function c() {
373
373
  let e = ++s, n = String(t.context.record.alias ?? t.context.record.id ?? ""), c = Le(t.context.module.http);
@@ -382,7 +382,7 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
382
382
  e === s && (a.value = !1);
383
383
  }
384
384
  }
385
- return (e, t) => (q(), H("div", Ke, [a.value ? (q(), H("span", qe, "正在加载…")) : o.value ? (q(), H("div", Je, [W(Y(o.value) + " ", 1), G(X(S), {
385
+ return (e, t) => (q(), H("div", Ke, [a.value ? (q(), H("span", qe, "正在加载…")) : o.value ? (q(), H("div", Je, [W(Y(o.value) + " ", 1), G(X(D), {
386
386
  type: "link",
387
387
  onClick: c
388
388
  }, {
@@ -391,7 +391,7 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
391
391
  })])) : r.value.length ? V("v-if", !0) : (q(), H("span", Ye, "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), (q(!0), H(R, null, Se(r.value, (e) => (q(), H("div", {
392
392
  key: e.menu.id,
393
393
  class: "menu-entry"
394
- }, [U("span", null, [W(Y(e.path), 1), e.menu.enabled === !1 ? (q(), H("small", Xe, " · 已停用")) : V("v-if", !0)]), i.value.has(e.menu.id) && X(n)?.openMenu ? (q(), B(X(S), {
394
+ }, [U("span", null, [W(Y(e.path), 1), e.menu.enabled === !1 ? (q(), H("small", Xe, " · 已停用")) : V("v-if", !0)]), i.value.has(e.menu.id) && X(n)?.openMenu ? (q(), B(X(D), {
395
395
  key: 0,
396
396
  type: "link",
397
397
  onClick: (t) => X(n).openMenu(i.value.get(e.menu.id))
@@ -400,7 +400,7 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
400
400
  _: 1
401
401
  }, 8, ["onClick"])) : V("v-if", !0)]))), 128))]));
402
402
  }
403
- }), [["__scopeId", "data-v-ff7756d2"]]), Qe = Ie, $e = ue, et = {
403
+ }), [["__scopeId", "data-v-ff7756d2"]]), Qe = Ie, $e = de, et = {
404
404
  id: "platform-module-workspace-actions",
405
405
  target: { moduleAlias: "platform.module" },
406
406
  workspaceViews: [$e, Qe],
@@ -493,7 +493,7 @@ var st = { class: "password-policy-preview" }, ct = {
493
493
  id: "iam-password-policy-preview",
494
494
  target: { moduleAlias: "iam.password_policy_rule" },
495
495
  card: { assistant: {
496
- component: /* @__PURE__ */ j(/* @__PURE__ */ K({
496
+ component: /* @__PURE__ */ M(/* @__PURE__ */ K({
497
497
  name: "PasswordPolicyPreview",
498
498
  __name: "PasswordPolicyPreview",
499
499
  props: { context: {} },
@@ -595,14 +595,14 @@ var st = { class: "password-policy-preview" }, ct = {
595
595
  }
596
596
  return (e, t) => (q(), H("section", st, [
597
597
  U("header", null, [t[1] ||= U("h3", null, "密码试算", -1), U("span", { class: _e({ failed: m.value.some((e) => !e.passed) }) }, Y(h.value), 3)]),
598
- G(X(O), {
598
+ G(X(A), {
599
599
  class: "preview-scope",
600
600
  value: n.value,
601
601
  options: u.value,
602
602
  size: "small",
603
603
  "onUpdate:value": d
604
604
  }, null, 8, ["value", "options"]),
605
- G(X(A), {
605
+ G(X(T), {
606
606
  value: r.value,
607
607
  "onUpdate:value": t[0] ||= (e) => r.value = e,
608
608
  type: "text",
@@ -628,7 +628,7 @@ var st = { class: "password-policy-preview" }, ct = {
628
628
  }, ut = { class: "tenant-applications-detail" }, dt = { class: "tenant-applications-summary" }, ft = {
629
629
  key: 0,
630
630
  class: "tenant-applications-status"
631
- }, pt = /*#__PURE__*/ j(/* @__PURE__ */ K({
631
+ }, pt = /*#__PURE__*/ M(/* @__PURE__ */ K({
632
632
  name: "TenantApplicationsDetailSection",
633
633
  __name: "TenantApplicationsDetailSection",
634
634
  props: { context: {} },
@@ -663,7 +663,7 @@ var st = { class: "password-policy-preview" }, ct = {
663
663
  })]);
664
664
  o === i && (a.value = new Map(r.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), n.value = s.records);
665
665
  } catch (e) {
666
- o === i && T(e, {
666
+ o === i && u(e, {
667
667
  source: "tenant-applications-detail",
668
668
  phase: "load"
669
669
  });
@@ -674,19 +674,19 @@ var st = { class: "password-policy-preview" }, ct = {
674
674
  function c(e, t) {
675
675
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
676
676
  }
677
- return (e, t) => (q(), H("section", ut, [U("div", dt, [r.value ? (q(), H("span", ft, "正在加载…")) : (q(), B(X(E), {
677
+ return (e, t) => (q(), H("section", ut, [U("div", dt, [r.value ? (q(), H("span", ft, "正在加载…")) : (q(), B(X(O), {
678
678
  key: 1,
679
679
  items: o.value,
680
680
  "max-visible": 8,
681
681
  "empty-text": "暂无记录"
682
682
  }, null, 8, ["items"]))])]));
683
683
  }
684
- }), [["__scopeId", "data-v-2f879564"]]), mt = { class: "tenant-application-configuration" }, ht = /*#__PURE__*/ j(/* @__PURE__ */ K({
684
+ }), [["__scopeId", "data-v-2f879564"]]), mt = { class: "tenant-application-configuration" }, ht = /*#__PURE__*/ M(/* @__PURE__ */ K({
685
685
  name: "TenantApplicationConfigurationDrawer",
686
686
  __name: "TenantApplicationConfigurationDrawer",
687
687
  props: { context: {} },
688
688
  setup(e) {
689
- let t = e, n = J([]), r = J(/* @__PURE__ */ new Set()), i = J(!1), o = J(!1), s = [{
689
+ let t = e, n = J([]), r = J(/* @__PURE__ */ new Set()), i = J(!1), a = J(!1), o = [{
690
690
  key: "title",
691
691
  title: "应用名称",
692
692
  width: 260
@@ -694,34 +694,34 @@ var st = { class: "password-policy-preview" }, ct = {
694
694
  key: "alias",
695
695
  title: "应用 alias",
696
696
  width: 220
697
- }], c = z(() => n.value), l = z(() => ({
697
+ }], s = z(() => n.value), c = z(() => ({
698
698
  selectedRowKeys: [...r.value],
699
699
  preserveSelectedRowKeys: !0,
700
- disabledOf: (e) => o.value || e.alias === "iam",
700
+ disabledOf: (e) => a.value || e.alias === "iam",
701
701
  onChange: (e) => {
702
702
  r.value = new Set(e.map(String));
703
703
  }
704
704
  }));
705
- function u() {
706
- t.context.setCloseBlocked(o.value), t.context.setTitleActions([{
705
+ function l() {
706
+ t.context.setCloseBlocked(a.value), t.context.setTitleActions([{
707
707
  key: "cancel",
708
708
  label: "取消",
709
- disabled: o.value,
709
+ disabled: a.value,
710
710
  run: () => {
711
- o.value || t.context.close();
711
+ a.value || t.context.close();
712
712
  }
713
713
  }, {
714
714
  key: "confirm",
715
715
  label: "确认",
716
716
  emphasis: "primary",
717
- disabled: o.value,
718
- loading: o.value,
717
+ disabled: a.value,
718
+ loading: a.value,
719
719
  run: f
720
720
  }]);
721
721
  }
722
722
  be(() => {
723
- u(), d();
724
- }), Z(o, u);
723
+ l(), d();
724
+ }), Z(a, l);
725
725
  async function d() {
726
726
  let e = String(t.context.record?.id ?? "");
727
727
  if (e) {
@@ -746,7 +746,7 @@ var st = { class: "password-policy-preview" }, ct = {
746
746
  let o = new Set(n.value.map((e) => e.alias).filter(Boolean));
747
747
  r.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
748
748
  } catch (e) {
749
- T(e, {
749
+ u(e, {
750
750
  source: "tenant-application-configuration",
751
751
  phase: "load"
752
752
  });
@@ -757,8 +757,8 @@ var st = { class: "password-policy-preview" }, ct = {
757
757
  }
758
758
  async function f() {
759
759
  let e = String(t.context.record?.id ?? "");
760
- if (e && !o.value) {
761
- o.value = !0;
760
+ if (e && !a.value) {
761
+ a.value = !0;
762
762
  try {
763
763
  await t.context.module.http.request({
764
764
  method: "POST",
@@ -766,24 +766,24 @@ var st = { class: "password-policy-preview" }, ct = {
766
766
  body: { applicationAliases: [...r.value] }
767
767
  }), t.context.refreshDetailExtensions(), t.context.refreshList(), t.context.close();
768
768
  } catch (e) {
769
- T(e, {
769
+ u(e, {
770
770
  source: "tenant-application-configuration",
771
771
  phase: "action"
772
772
  });
773
773
  } finally {
774
- o.value = !1;
774
+ a.value = !1;
775
775
  }
776
776
  }
777
777
  }
778
778
  function p(e, t) {
779
779
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
780
780
  }
781
- return (e, t) => (q(), H("section", mt, [t[0] ||= U("p", null, "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。", -1), G(X(a), {
782
- columns: s,
783
- rows: c.value,
781
+ return (e, t) => (q(), H("section", mt, [t[0] ||= U("p", null, "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。", -1), G(X(k), {
782
+ columns: o,
783
+ rows: s.value,
784
784
  loading: i.value,
785
785
  pagination: !1,
786
- selection: l.value,
786
+ selection: c.value,
787
787
  "row-key": (e) => String(e.alias ?? e.id ?? ""),
788
788
  "empty-description": "暂无可配置应用"
789
789
  }, null, 8, [
@@ -862,21 +862,21 @@ function vt(e) {
862
862
  var yt = {
863
863
  key: 1,
864
864
  class: "employee-account-drawer"
865
- }, bt = { class: "employee-account-existing-picker" }, xt = /*#__PURE__*/ j(/* @__PURE__ */ K({
865
+ }, bt = { class: "employee-account-existing-picker" }, xt = /*#__PURE__*/ M(/* @__PURE__ */ K({
866
866
  name: "EmployeeAccountDrawer",
867
867
  __name: "EmployeeAccountDrawer",
868
868
  props: { context: {} },
869
869
  setup(e) {
870
- let t = e, n = J(), r = J(), i = J(""), a = J(""), o = J(!1), c = J(!1);
871
- be(() => void l());
872
- async function l() {
873
- let e = v();
870
+ let t = e, n = J(), r = J(), i = J(""), a = J(""), o = J(!1), s = J(!1);
871
+ be(() => void c());
872
+ async function c() {
873
+ let e = x();
874
874
  if (e) {
875
875
  o.value = !0;
876
876
  try {
877
877
  n.value = await t.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
878
878
  } catch (e) {
879
- T(e, {
879
+ u(e, {
880
880
  source: "employee-account",
881
881
  phase: "load"
882
882
  });
@@ -885,18 +885,18 @@ var yt = {
885
885
  }
886
886
  }
887
887
  }
888
- async function u() {
889
- let e = v();
890
- if (!e || c.value) return;
888
+ async function l() {
889
+ let e = x();
890
+ if (!e || s.value) return;
891
891
  let r = i.value.trim();
892
892
  if (!r || !a.value) {
893
- w("请输入账号和初始密码。", {
893
+ p("请输入账号和初始密码。", {
894
894
  source: "employee-account",
895
895
  phase: "validation"
896
896
  });
897
897
  return;
898
898
  }
899
- c.value = !0;
899
+ s.value = !0;
900
900
  try {
901
901
  let i = await t.context.module.http.request({
902
902
  method: "POST",
@@ -906,14 +906,14 @@ var yt = {
906
906
  password: a.value
907
907
  }
908
908
  });
909
- n.value = D(i).binding, a.value = "", t.context.refreshList();
909
+ n.value = _(i).binding, a.value = "", t.context.refreshList();
910
910
  } catch (e) {
911
- T(e, {
911
+ u(e, {
912
912
  source: "employee-account",
913
913
  phase: "action"
914
914
  });
915
915
  } finally {
916
- c.value = !1;
916
+ s.value = !1;
917
917
  }
918
918
  }
919
919
  async function d(e) {
@@ -921,30 +921,30 @@ var yt = {
921
921
  t && await f(t.id);
922
922
  }
923
923
  async function f(e) {
924
- let i = v();
925
- if (i && e && !c.value) {
926
- c.value = !0;
924
+ let i = x();
925
+ if (i && e && !s.value) {
926
+ s.value = !0;
927
927
  try {
928
928
  n.value = await t.context.module.http.request({
929
929
  method: "POST",
930
930
  path: `/iam.employee/${encodeURIComponent(i)}/account`,
931
931
  body: { userId: e }
932
- }), r.value = void 0, t.context.refreshList(), w("账号已绑定到当前职员。", {
932
+ }), r.value = void 0, t.context.refreshList(), p("账号已绑定到当前职员。", {
933
933
  source: "employee-account",
934
934
  phase: "action"
935
935
  });
936
936
  } catch (e) {
937
- T(e, {
937
+ u(e, {
938
938
  source: "employee-account",
939
939
  phase: "action"
940
940
  });
941
941
  } finally {
942
- c.value = !1;
942
+ s.value = !1;
943
943
  }
944
944
  }
945
945
  }
946
- async function p(e) {
947
- let n = v();
946
+ async function m(e) {
947
+ let n = x();
948
948
  if (!n) return {
949
949
  records: [],
950
950
  total: 0
@@ -966,7 +966,7 @@ var yt = {
966
966
  };
967
967
  }
968
968
  async function h(e) {
969
- let n = v();
969
+ let n = x();
970
970
  return !n || e.length === 0 ? [] : (await t.context.module.http.request({
971
971
  method: "POST",
972
972
  path: `/iam.employee/${encodeURIComponent(n)}/account-candidates/query`,
@@ -991,79 +991,79 @@ var yt = {
991
991
  departmentName: e.departmentTitle
992
992
  };
993
993
  }
994
- async function _() {
995
- let e = v();
996
- if (e && n.value && !c.value && await s({
994
+ async function v() {
995
+ let e = x();
996
+ if (e && n.value && !s.value && await b({
997
997
  title: "移除账户",
998
998
  content: "确认移除该职员的账户?该用户账号会同步删除。",
999
999
  okText: "移除",
1000
1000
  danger: !0
1001
1001
  })) {
1002
- c.value = !0;
1002
+ s.value = !0;
1003
1003
  try {
1004
1004
  await t.context.module.http.request({
1005
1005
  method: "POST",
1006
1006
  path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
1007
1007
  }), n.value = void 0, t.context.refreshList();
1008
1008
  } catch (e) {
1009
- T(e, {
1009
+ u(e, {
1010
1010
  source: "employee-account",
1011
1011
  phase: "action"
1012
1012
  });
1013
1013
  } finally {
1014
- c.value = !1;
1014
+ s.value = !1;
1015
1015
  }
1016
1016
  }
1017
1017
  }
1018
- function v() {
1018
+ function x() {
1019
1019
  let e = t.context.record?.id;
1020
1020
  return e == null ? void 0 : String(e);
1021
1021
  }
1022
- return (e, t) => o.value ? (q(), B(X(re), {
1022
+ return (e, t) => o.value ? (q(), B(X(S), {
1023
1023
  key: 0,
1024
1024
  tip: "加载账号绑定"
1025
- })) : (q(), H("section", yt, [v() ? n.value ? (q(), H(R, { key: 1 }, [U("p", null, "当前已绑定用户:" + Y(n.value.userId ?? "-"), 1), G(X(S), {
1025
+ })) : (q(), H("section", yt, [x() ? n.value ? (q(), H(R, { key: 1 }, [U("p", null, "当前已绑定用户:" + Y(n.value.userId ?? "-"), 1), G(X(D), {
1026
1026
  danger: "",
1027
1027
  "icon-name": "delete",
1028
- loading: c.value,
1029
- onClick: _
1028
+ loading: s.value,
1029
+ onClick: v
1030
1030
  }, {
1031
1031
  default: Q(() => [...t[3] ||= [W("移除账户", -1)]]),
1032
1032
  _: 1
1033
- }, 8, ["loading"])], 64)) : (q(), H(R, { key: 2 }, [U("section", bt, [t[4] ||= U("p", null, "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。", -1), G(X(C), {
1033
+ }, 8, ["loading"])], 64)) : (q(), H(R, { key: 2 }, [U("section", bt, [t[4] ||= U("p", null, "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。", -1), G(X(E), {
1034
1034
  value: r.value,
1035
- disabled: c.value,
1035
+ disabled: s.value,
1036
1036
  placeholder: "搜索并选择已有登录账号",
1037
1037
  title: "选择已有登录账号",
1038
- "search-page": p,
1038
+ "search-page": m,
1039
1039
  "resolve-users": h,
1040
1040
  "onUpdate:value": t[0] ||= (e) => r.value = typeof e == "string" ? e : void 0,
1041
1041
  onSelect: d
1042
- }, null, 8, ["value", "disabled"])]), U("form", { onSubmit: De(u, ["prevent"]) }, [
1042
+ }, null, 8, ["value", "disabled"])]), U("form", { onSubmit: De(l, ["prevent"]) }, [
1043
1043
  t[8] ||= U("p", null, "也可直接创建登录账号并自动绑定到当前职员。", -1),
1044
- U("label", null, [t[5] ||= U("span", null, "账号", -1), G(X(A), {
1044
+ U("label", null, [t[5] ||= U("span", null, "账号", -1), G(X(T), {
1045
1045
  value: i.value,
1046
1046
  "onUpdate:value": t[1] ||= (e) => i.value = e,
1047
- disabled: c.value,
1047
+ disabled: s.value,
1048
1048
  placeholder: "请输入登录账号"
1049
1049
  }, null, 8, ["value", "disabled"])]),
1050
- U("label", null, [t[6] ||= U("span", null, "初始密码", -1), G(X(A), {
1050
+ U("label", null, [t[6] ||= U("span", null, "初始密码", -1), G(X(T), {
1051
1051
  value: a.value,
1052
1052
  "onUpdate:value": t[2] ||= (e) => a.value = e,
1053
1053
  type: "password",
1054
- disabled: c.value,
1054
+ disabled: s.value,
1055
1055
  placeholder: "请输入初始密码"
1056
1056
  }, null, 8, ["value", "disabled"])]),
1057
- G(X(S), {
1057
+ G(X(D), {
1058
1058
  type: "primary",
1059
1059
  "html-type": "submit",
1060
1060
  "icon-name": "plus",
1061
- loading: c.value
1061
+ loading: s.value
1062
1062
  }, {
1063
1063
  default: Q(() => [...t[7] ||= [W(" 创建账号并绑定 ", -1)]]),
1064
1064
  _: 1
1065
1065
  }, 8, ["loading"])
1066
- ], 32)], 64)) : (q(), B(X(m), {
1066
+ ], 32)], 64)) : (q(), B(X(y), {
1067
1067
  key: 0,
1068
1068
  title: "职员不存在",
1069
1069
  message: "请重新打开职员档案后再设置账号。"
@@ -1119,7 +1119,7 @@ function Mt(e, t) {
1119
1119
  //#endregion
1120
1120
  //#region src/platform-admin-runtime/backendHttp.ts
1121
1121
  function Nt(e = {}) {
1122
- return F({
1122
+ return P({
1123
1123
  baseUrl: void 0,
1124
1124
  token: e.withAuth === !1 ? void 0 : Tt(void 0),
1125
1125
  credentials: Pt(void 0),
@@ -1133,7 +1133,7 @@ function Pt(e) {
1133
1133
  //#region src/platform-admin-runtime/realtime.ts
1134
1134
  var Ft = Oe(), It = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Set(), Rt, zt, Bt = 3e4;
1135
1135
  function Vt(e = {}) {
1136
- return g({
1136
+ return s({
1137
1137
  baseUrl: e.baseUrl ?? void 0,
1138
1138
  token: e.token ?? Tt(void 0),
1139
1139
  onStateChange: (t) => {
@@ -1143,20 +1143,20 @@ function Vt(e = {}) {
1143
1143
  }
1144
1144
  function Ht(e = {}) {
1145
1145
  if (zt) throw Error("App realtime is already connected. Disconnect the active connection before reconnecting.");
1146
- let n = Vt(e);
1147
- Rt = n;
1148
- let r = t(n, Ft), i = v(n, (t) => {
1146
+ let t = Vt(e);
1147
+ Rt = t;
1148
+ let n = i(t, Ft), r = l(t, (t) => {
1149
1149
  e.onUserNotification?.(t);
1150
- }), a = ne(n, (t) => {
1150
+ }), a = x(t, (t) => {
1151
1151
  e.onBusinessNotification?.(t);
1152
- }), o = p(n, (e) => {
1152
+ }), o = v(t, (e) => {
1153
1153
  for (let t of Lt) t(e);
1154
- }), s = Wt(n);
1155
- s.start(), Jt(n), n.connect();
1156
- let c = !1, l = { async disconnect() {
1157
- c || (c = !0, r.unsubscribe(), i.unsubscribe(), a.unsubscribe(), o.unsubscribe(), s.stop(), Yt(), zt === l && (zt = void 0), Rt === n && (Rt = void 0), await n.disconnect());
1154
+ }), s = Wt(t);
1155
+ s.start(), Jt(t), t.connect();
1156
+ let c = !1, u = { async disconnect() {
1157
+ c || (c = !0, n.unsubscribe(), r.unsubscribe(), a.unsubscribe(), o.unsubscribe(), s.stop(), Yt(), zt === u && (zt = void 0), Rt === t && (Rt = void 0), await t.disconnect());
1158
1158
  } };
1159
- return zt = l, l;
1159
+ return zt = u, u;
1160
1160
  }
1161
1161
  async function Ut() {
1162
1162
  await zt?.disconnect();
@@ -1190,7 +1190,7 @@ function Wt(e) {
1190
1190
  if (!(!n && r - t < Bt)) {
1191
1191
  t = r;
1192
1192
  try {
1193
- e.publish(k, { timestamp: new Date(r).toISOString() });
1193
+ e.publish(j, { timestamp: new Date(r).toISOString() });
1194
1194
  } catch {}
1195
1195
  }
1196
1196
  }
@@ -1221,7 +1221,7 @@ function Yt() {
1221
1221
  for (let e of It.values()) e.active?.unsubscribe(), e.active = void 0;
1222
1222
  }
1223
1223
  function Xt(e, t) {
1224
- return e.subscribe(ee(t), (e) => {
1224
+ return e.subscribe(m(t), (e) => {
1225
1225
  Ft.dispatch(e);
1226
1226
  });
1227
1227
  }
@@ -1268,7 +1268,7 @@ async function on() {
1268
1268
  ...Object.fromEntries(t.map((e) => [e.userId, e]))
1269
1269
  };
1270
1270
  } catch (e) {
1271
- T(e, {
1271
+ u(e, {
1272
1272
  source: "iam-user-online-status",
1273
1273
  phase: "load"
1274
1274
  });
@@ -1279,7 +1279,7 @@ function sn(e) {
1279
1279
  }
1280
1280
  //#endregion
1281
1281
  //#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
1282
- var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1282
+ var cn = /*#__PURE__*/ M(/* @__PURE__ */ K({
1283
1283
  name: "UserOnlineStatusCell",
1284
1284
  __name: "UserOnlineStatusCell",
1285
1285
  props: {
@@ -1310,7 +1310,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1310
1310
  }, un = { key: 0 }, dn = {
1311
1311
  key: 1,
1312
1312
  class: "user-password-reset"
1313
- }, fn = { key: 0 }, pn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1313
+ }, fn = { key: 0 }, pn = /*#__PURE__*/ M(/* @__PURE__ */ K({
1314
1314
  name: "UserPasswordDrawer",
1315
1315
  __name: "UserPasswordDrawer",
1316
1316
  props: { context: {} },
@@ -1320,7 +1320,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1320
1320
  let e = a.value;
1321
1321
  if (e && !i.value && t.context.module.can("changePassword", e) === !0) {
1322
1322
  if (!n.value) {
1323
- w("请输入新密码。", {
1323
+ p("请输入新密码。", {
1324
1324
  source: "iam-user-password",
1325
1325
  phase: "validation"
1326
1326
  });
@@ -1332,12 +1332,12 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1332
1332
  method: "POST",
1333
1333
  path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
1334
1334
  body: { password: n.value }
1335
- }), n.value = "", w("密码已修改。", {
1335
+ }), n.value = "", p("密码已修改。", {
1336
1336
  source: "iam-user-password",
1337
1337
  phase: "action"
1338
1338
  }), t.context.refreshList(), t.context.refreshDetailExtensions();
1339
1339
  } catch (e) {
1340
- T(e, {
1340
+ u(e, {
1341
1341
  source: "iam-user-password",
1342
1342
  phase: "action"
1343
1343
  });
@@ -1356,7 +1356,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1356
1356
  path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
1357
1357
  }), t.context.refreshList(), t.context.refreshDetailExtensions();
1358
1358
  } catch (e) {
1359
- T(e, {
1359
+ u(e, {
1360
1360
  source: "iam-user-password",
1361
1361
  phase: "action"
1362
1362
  });
@@ -1367,14 +1367,14 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1367
1367
  }
1368
1368
  return (t, c) => a.value ? (q(), H("section", ln, [e.context.module.can("changePassword", a.value) === !0 ? (q(), H("label", un, [
1369
1369
  c[2] ||= U("span", null, "新密码", -1),
1370
- G(X(A), {
1370
+ G(X(T), {
1371
1371
  value: n.value,
1372
1372
  "onUpdate:value": c[0] ||= (e) => n.value = e,
1373
1373
  type: "password",
1374
1374
  disabled: i.value,
1375
1375
  placeholder: "请输入新密码"
1376
1376
  }, null, 8, ["value", "disabled"]),
1377
- G(X(S), {
1377
+ G(X(D), {
1378
1378
  type: "primary",
1379
1379
  loading: i.value,
1380
1380
  onClick: o
@@ -1384,7 +1384,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1384
1384
  }, 8, ["loading"])
1385
1385
  ])) : V("v-if", !0), e.context.module.can("resetPassword", a.value) === !0 ? (q(), H("section", dn, [
1386
1386
  c[6] ||= U("p", null, "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。", -1),
1387
- G(X(S), {
1387
+ G(X(D), {
1388
1388
  loading: i.value,
1389
1389
  onClick: s
1390
1390
  }, {
@@ -1392,7 +1392,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1392
1392
  _: 1
1393
1393
  }, 8, ["loading"]),
1394
1394
  r.value ? (q(), H("dl", fn, [U("div", null, [c[4] ||= U("dt", null, "临时密码", -1), U("dd", null, Y(r.value.temporaryPassword), 1)]), U("div", null, [c[5] ||= U("dt", null, "失效时间", -1), U("dd", null, Y(r.value.expiresAt ?? "-"), 1)])])) : V("v-if", !0)
1395
- ])) : V("v-if", !0)])) : (q(), B(X(m), {
1395
+ ])) : V("v-if", !0)])) : (q(), B(X(y), {
1396
1396
  key: 0,
1397
1397
  title: "用户不存在",
1398
1398
  message: "请重新打开用户详情后再管理密码。"
@@ -1443,7 +1443,7 @@ function hn(e) {
1443
1443
  }
1444
1444
  async function a(t, n) {
1445
1445
  if (e.context.can("sessions", t) !== !1) {
1446
- u(t, {
1446
+ d(t, {
1447
1447
  ...c(t),
1448
1448
  loading: !0,
1449
1449
  error: void 0
@@ -1454,17 +1454,17 @@ function hn(e) {
1454
1454
  method: "GET",
1455
1455
  path: `/iam.user/${encodeURIComponent(t)}/sessions`
1456
1456
  });
1457
- n(t) && u(t, {
1457
+ n(t) && d(t, {
1458
1458
  records: r,
1459
1459
  loading: !1
1460
1460
  });
1461
1461
  } catch (r) {
1462
1462
  if (!n(t)) return;
1463
- let i = T(r, {
1463
+ let i = u(r, {
1464
1464
  source: `${e.source}-sessions`,
1465
1465
  phase: "load"
1466
1466
  });
1467
- u(t, {
1467
+ d(t, {
1468
1468
  ...c(t),
1469
1469
  loading: !1,
1470
1470
  error: i.message
@@ -1493,7 +1493,7 @@ function hn(e) {
1493
1493
  function l() {
1494
1494
  r.reset(), t.value = [], n.value = {};
1495
1495
  }
1496
- function u(e, t) {
1496
+ function d(e, t) {
1497
1497
  n.value = {
1498
1498
  ...n.value,
1499
1499
  [e]: t
@@ -1530,17 +1530,17 @@ var gn = {
1530
1530
  let t = e, r = z(() => t.context.record.id == null ? void 0 : String(t.context.record.id)), i = hn({
1531
1531
  context: t.context.module,
1532
1532
  source: "iam-user-list-expansion"
1533
- }), a = z(() => i.userSessionState(r.value)), o = z(() => a.value.records.filter((e) => !e.current && t.context.module.can("revokeSession", r.value) === !0)), c = z(() => o.value.length > 1 && t.context.module.can("revokeSessions", r.value) === !0);
1533
+ }), a = z(() => i.userSessionState(r.value)), o = z(() => a.value.records.filter((e) => !e.current && t.context.module.can("revokeSession", r.value) === !0)), s = z(() => o.value.length > 1 && t.context.module.can("revokeSessions", r.value) === !0);
1534
1534
  Z([r, () => t.context.expanded], ([e, t]) => {
1535
1535
  e && i.handleUserRowExpand({ id: e }, t);
1536
1536
  }, { immediate: !0 });
1537
- let l = qt((e) => i.handleUserSessionBusinessEvent(e));
1537
+ let c = qt((e) => i.handleUserSessionBusinessEvent(e));
1538
1538
  xe(() => {
1539
- l.unsubscribe(), i.reset();
1539
+ c.unsubscribe(), i.reset();
1540
1540
  });
1541
- async function u(e) {
1541
+ async function l(e) {
1542
1542
  let n = r.value;
1543
- n && !e.current && t.context.module.can("revokeSession", n) === !0 && await s({
1543
+ n && !e.current && t.context.module.can("revokeSession", n) === !0 && await b({
1544
1544
  title: "下线登录会话",
1545
1545
  content: "确认下线该登录会话?",
1546
1546
  okText: "下线",
@@ -1550,9 +1550,9 @@ var gn = {
1550
1550
  path: `/iam.user/${encodeURIComponent(n)}/sessions/${encodeURIComponent(e.id)}/revoke`
1551
1551
  }), i.loadUserSessions(n));
1552
1552
  }
1553
- async function d() {
1553
+ async function u() {
1554
1554
  let e = r.value, n = o.value.map((e) => e.id);
1555
- e && n.length !== 0 && t.context.module.can("revokeSessions", e) === !0 && await s({
1555
+ e && n.length !== 0 && t.context.module.can("revokeSessions", e) === !0 && await b({
1556
1556
  title: "全部下线",
1557
1557
  content: `确认下线该用户的 ${n.length} 个登录会话?`,
1558
1558
  okText: "全部下线",
@@ -1569,10 +1569,10 @@ var gn = {
1569
1569
  loading: a.value.loading,
1570
1570
  error: a.value.error,
1571
1571
  "can-revoke": (t) => !t.current && e.context.module.can("revokeSession", r.value) === !0,
1572
- "can-revoke-all": c.value,
1572
+ "can-revoke-all": s.value,
1573
1573
  onRefresh: o[0] ||= (e) => X(i).loadUserSessions(r.value),
1574
- onRevoke: u,
1575
- onRevokeAll: d
1574
+ onRevoke: l,
1575
+ onRevokeAll: u
1576
1576
  }, null, 8, [
1577
1577
  "sessions",
1578
1578
  "loading",
@@ -1707,61 +1707,61 @@ var Pn = /* @__PURE__ */ K({
1707
1707
  __name: "RoleScopeTree",
1708
1708
  props: { context: {} },
1709
1709
  setup(e) {
1710
- let t = e, n = yn(Nt()), r = J(), a = J(""), s = J(!1), c = J([]), l = J([]), u = J(0), d = J(/* @__PURE__ */ new Map()), f = z(() => t.context.selectionKey), p = z(() => r.value?.navigations.some((e) => e.level === "TENANT") === !0), m = z(() => r.value?.navigations.length !== 0), h = z(() => p.value ? "租户" : "机构"), g = i({
1711
- nodes: () => c.value,
1712
- loader: () => A,
1713
- version: () => u.value
1714
- }), _ = g.nodes, v = g.states, b = 0, x;
1715
- be(() => void S()), ye(() => {
1716
- b += 1, x && clearTimeout(x);
1710
+ let t = e, n = yn(Nt()), i = J(), a = J(""), o = J(!1), s = J([]), c = J([]), l = J(0), d = J(/* @__PURE__ */ new Map()), f = z(() => t.context.selectionKey), p = z(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), m = z(() => i.value?.navigations.length !== 0), h = z(() => p.value ? "租户" : "机构"), g = C({
1711
+ nodes: () => s.value,
1712
+ loader: () => ne,
1713
+ version: () => l.value
1714
+ }), _ = g.nodes, v = g.states, y = 0, b;
1715
+ be(() => void x()), ye(() => {
1716
+ y += 1, b && clearTimeout(b);
1717
1717
  }), Z(a, () => {
1718
- m.value && (x && clearTimeout(x), x = setTimeout(() => void w(), 240));
1718
+ m.value && (b && clearTimeout(b), b = setTimeout(() => void E(), 240));
1719
1719
  });
1720
- async function S() {
1721
- s.value = !0;
1720
+ async function x() {
1721
+ o.value = !0;
1722
1722
  try {
1723
- r.value = await n.descriptor();
1724
- let e = r.value.directSelections[0];
1725
- !t.context.selectionKey && e && M({
1723
+ i.value = await n.descriptor();
1724
+ let e = i.value.directSelections[0];
1725
+ !t.context.selectionKey && e && k({
1726
1726
  key: e.selectionKey,
1727
1727
  label: e.label
1728
- }), await C();
1728
+ }), await T();
1729
1729
  } catch (e) {
1730
- T(e, {
1730
+ u(e, {
1731
1731
  source: "role-scope-tree",
1732
1732
  phase: "load"
1733
1733
  });
1734
1734
  } finally {
1735
- s.value = !1;
1735
+ o.value = !1;
1736
1736
  }
1737
1737
  }
1738
- async function C(e = {}) {
1739
- let t = r.value;
1738
+ async function T(e = {}) {
1739
+ let t = i.value;
1740
1740
  if (!t) return;
1741
- let n = ++b;
1741
+ let n = ++y;
1742
1742
  if (!e.append) {
1743
- l.value = [], u.value += 1, s.value = !0;
1743
+ c.value = [], l.value += 1, o.value = !0;
1744
1744
  try {
1745
- let e = E(t);
1746
- if (n !== b) return;
1747
- d.value = /* @__PURE__ */ new Map(), j(e), c.value = e.map((e) => e.ui);
1745
+ let e = ee(t);
1746
+ if (n !== y) return;
1747
+ d.value = /* @__PURE__ */ new Map(), re(e), s.value = e.map((e) => e.ui);
1748
1748
  } catch (e) {
1749
- if (n !== b) return;
1750
- c.value = [], T(e, {
1749
+ if (n !== y) return;
1750
+ s.value = [], u(e, {
1751
1751
  source: "role-scope-tree",
1752
1752
  phase: "load"
1753
1753
  });
1754
1754
  } finally {
1755
- n === b && (s.value = !1);
1755
+ n === y && (o.value = !1);
1756
1756
  }
1757
1757
  }
1758
1758
  }
1759
- async function w() {
1760
- if (await C(), !a.value.trim()) return;
1761
- let e = (r.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
1762
- l.value = e, await ge(), await Promise.all(e.map((e) => g.request(e, "refresh")));
1759
+ async function E() {
1760
+ if (await T(), !a.value.trim()) return;
1761
+ let e = (i.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
1762
+ c.value = e, await ge(), await Promise.all(e.map((e) => g.request(e, "refresh")));
1763
1763
  }
1764
- function E(e) {
1764
+ function ee(e) {
1765
1765
  return [
1766
1766
  ...e.directSelections.map((e) => ({
1767
1767
  ui: {
@@ -1791,8 +1791,8 @@ var Pn = /* @__PURE__ */ K({
1791
1791
  }
1792
1792
  };
1793
1793
  }
1794
- function O(e, t, n) {
1795
- let r = k(e, t, n);
1794
+ function te(e, t, n) {
1795
+ let r = O(e, t, n);
1796
1796
  return {
1797
1797
  ui: {
1798
1798
  key: e.selectionKey,
@@ -1808,7 +1808,7 @@ var Pn = /* @__PURE__ */ K({
1808
1808
  children: r
1809
1809
  };
1810
1810
  }
1811
- function k(e, t, n) {
1811
+ function O(e, t, n) {
1812
1812
  return t === "TENANT" ? {
1813
1813
  navigationKey: e.selectionKey,
1814
1814
  level: "ORGANIZATION"
@@ -1818,7 +1818,7 @@ var Pn = /* @__PURE__ */ K({
1818
1818
  parentId: e.id
1819
1819
  } : void 0;
1820
1820
  }
1821
- async function A(e, t) {
1821
+ async function ne(e, t) {
1822
1822
  let r = d.value.get(e.key);
1823
1823
  if (!r?.children) throw Error("角色归属范围已失效");
1824
1824
  try {
@@ -1828,67 +1828,67 @@ var Pn = /* @__PURE__ */ K({
1828
1828
  pageNum: t.reason === "load-more" ? Number(t.cursor) : 1
1829
1829
  });
1830
1830
  t.signal.throwIfAborted();
1831
- let i = e.records.map((e) => O(e, r.children.level, r.children.navigationKey));
1832
- return j(i), {
1831
+ let i = e.records.map((e) => te(e, r.children.level, r.children.navigationKey));
1832
+ return re(i), {
1833
1833
  mode: t.reason === "load-more" ? "append" : "replace",
1834
1834
  nodes: i.map((e) => e.ui),
1835
1835
  hasMore: e.hasMore,
1836
1836
  nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
1837
1837
  };
1838
1838
  } catch (e) {
1839
- throw t.signal.aborted || T(e, {
1839
+ throw t.signal.aborted || u(e, {
1840
1840
  source: "role-scope-tree",
1841
1841
  phase: "load"
1842
1842
  }), e;
1843
1843
  }
1844
1844
  }
1845
- function j(e) {
1845
+ function re(e) {
1846
1846
  let t = new Map(d.value);
1847
1847
  e.forEach((e) => t.set(e.ui.key, e)), d.value = t;
1848
1848
  }
1849
- function ee(e) {
1849
+ function ie(e) {
1850
1850
  let t = d.value.get(e.key)?.selection;
1851
- t && M(t);
1851
+ t && k(t);
1852
1852
  }
1853
- function M(e) {
1853
+ function k(e) {
1854
1854
  t.context.selectSelectionKey(e.key, {
1855
1855
  label: e.label,
1856
1856
  secondaryLabel: e.secondaryLabel
1857
1857
  });
1858
1858
  }
1859
- function N() {
1860
- let e = r.value?.directSelections[0];
1861
- e && M({
1859
+ function A() {
1860
+ let e = i.value?.directSelections[0];
1861
+ e && k({
1862
1862
  key: e.selectionKey,
1863
1863
  label: e.label
1864
1864
  });
1865
1865
  }
1866
- return (e, t) => (q(), B(X(o), {
1866
+ return (e, t) => (q(), B(X(r), {
1867
1867
  class: "role-scope-tree",
1868
1868
  title: h.value,
1869
1869
  "refresh-title": "刷新角色归属范围",
1870
1870
  "search-keyword": a.value,
1871
1871
  "search-placeholder": "搜索名称、编码或标识",
1872
1872
  searchable: m.value,
1873
- onRefresh: C,
1873
+ onRefresh: T,
1874
1874
  "onUpdate:searchKeyword": t[3] ||= (e) => a.value = e
1875
1875
  }, {
1876
- default: Q(() => [s.value ? (q(), B(X(re), {
1876
+ default: Q(() => [o.value ? (q(), B(X(S), {
1877
1877
  key: 0,
1878
1878
  tip: "加载角色归属范围"
1879
- })) : (q(), B(X(y), {
1879
+ })) : (q(), B(X(w), {
1880
1880
  key: 1,
1881
- "expanded-keys": l.value,
1882
- "onUpdate:expandedKeys": t[0] ||= (e) => l.value = e,
1881
+ "expanded-keys": c.value,
1882
+ "onUpdate:expandedKeys": t[0] ||= (e) => c.value = e,
1883
1883
  nodes: X(_),
1884
1884
  "selected-key": f.value,
1885
- "reload-key": u.value,
1885
+ "reload-key": l.value,
1886
1886
  "load-strategy": "controlled",
1887
1887
  "reload-on-reexpand": "",
1888
1888
  "branch-states": X(v),
1889
1889
  onLoadRequest: t[1] ||= (e) => X(g).request(e.node.key, e.reason, X(g).stateOf(e.node.key).status === "error"),
1890
- onSelect: ee,
1891
- onDeselect: N,
1890
+ onSelect: ie,
1891
+ onDeselect: A,
1892
1892
  onUnloadChildren: t[2] ||= (e) => X(g).release(e.key)
1893
1893
  }, null, 8, [
1894
1894
  "expanded-keys",
@@ -2050,7 +2050,7 @@ var Ln = {
2050
2050
  }, Bn = { class: "role-account-grant-search" }, Vn = {
2051
2051
  key: 0,
2052
2052
  class: "role-account-grant-selected"
2053
- }, Hn = { class: "role-account-grant-selected-title" }, Un = { class: "role-account-grant-selected-list" }, Wn = ["disabled", "onClick"], Gn = 20, Kn = /*#__PURE__*/ j(/* @__PURE__ */ K({
2053
+ }, Hn = { class: "role-account-grant-selected-title" }, Un = { class: "role-account-grant-selected-list" }, Wn = ["disabled", "onClick"], Gn = 20, Kn = /*#__PURE__*/ M(/* @__PURE__ */ K({
2054
2054
  name: "RoleAccountGrantDrawer",
2055
2055
  __name: "RoleAccountGrantDrawer",
2056
2056
  props: {
@@ -2063,25 +2063,25 @@ var Ln = {
2063
2063
  },
2064
2064
  emits: ["close", "saved"],
2065
2065
  setup(e, { emit: t }) {
2066
- let n = e, r = t, i = J([]), a = J({}), o = J([]), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), d = J(""), p = J(""), h = J(1), g = J(0), _ = J(!1), v = J(!1), y = J(!1), x = J(!1), C = J(), w = z(() => In(n.context.http)), E = b({ moduleAlias: "iam.tenant" }), D = z(() => n.role?.id), O = z(() => n.role ? `绑定用户 - ${je(n.role)}` : "绑定用户"), k = z(() => n.embedded ? "section" : M), j = z(() => n.embedded ? {} : {
2066
+ let n = e, r = t, i = J([]), s = J({}), c = J([]), l = J(/* @__PURE__ */ new Set()), d = J(/* @__PURE__ */ new Set()), f = J(""), p = J(""), m = J(1), h = J(0), _ = J(!1), v = J(!1), b = J(!1), x = J(!1), C = J(), w = z(() => In(n.context.http)), E = g({ moduleAlias: "iam.tenant" }), ee = z(() => n.role?.id), O = z(() => n.role ? `绑定用户 - ${je(n.role)}` : "绑定用户"), ne = z(() => n.embedded ? "section" : re), ie = z(() => n.embedded ? {} : {
2067
2067
  open: n.open,
2068
2068
  title: O.value,
2069
2069
  renderMode: n.container ? "inline" : "portal",
2070
2070
  closeTitle: "关闭",
2071
2071
  onClose: ve
2072
- }), ee = z(() => n.role?.ownerScopeType === "platform"), N = z(() => C.value?.id), P = z(() => !ee.value || !!N.value), te = z(() => E), ne = z(() => {
2072
+ }), k = z(() => n.role?.ownerScopeType === "platform"), A = z(() => C.value?.id), j = z(() => !k.value || !!A.value), ae = z(() => E), M = z(() => {
2073
2073
  let e = /* @__PURE__ */ new Map();
2074
2074
  for (let t of i.value) t.userId && e.set(t.userId, t);
2075
2075
  return e;
2076
- }), ie = z(() => o.value.filter((e) => e.id).map((e) => ({
2076
+ }), N = z(() => c.value.filter((e) => e.id).map((e) => ({
2077
2077
  id: e.id,
2078
2078
  username: ke(e),
2079
2079
  employeeNo: e.employeeNo ?? "",
2080
2080
  employeeTitle: e.employeeTitle ?? "",
2081
2081
  organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
2082
2082
  departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
2083
- boundTitle: c.value.has(e.id) ? "已绑定" : "未绑定"
2084
- }))), F = z(() => [...s.value].map((e) => a.value[e] ?? Oe(e))), I = z(() => [...s.value].filter((e) => !c.value.has(e))), ae = z(() => [...c.value].filter((e) => !s.value.has(e))), L = z(() => I.value.length > 0 || ae.value.length > 0), oe = {
2083
+ boundTitle: d.value.has(e.id) ? "已绑定" : "未绑定"
2084
+ }))), P = z(() => [...l.value].map((e) => s.value[e] ?? Oe(e))), F = z(() => [...l.value].filter((e) => !d.value.has(e))), oe = z(() => [...d.value].filter((e) => !l.value.has(e))), I = z(() => F.value.length > 0 || oe.value.length > 0), se = {
2085
2085
  rowKey: "id",
2086
2086
  columns: [
2087
2087
  {
@@ -2115,74 +2115,74 @@ var Ln = {
2115
2115
  width: 90
2116
2116
  }
2117
2117
  ]
2118
- }, se = z(() => ({
2119
- selectedRowKeys: [...s.value],
2118
+ }, ce = z(() => ({
2119
+ selectedRowKeys: [...l.value],
2120
2120
  preserveSelectedRowKeys: !0,
2121
- disabledOf: () => y.value,
2121
+ disabledOf: () => b.value,
2122
2122
  onChange: (e) => {
2123
- s.value = new Set(e.map((e) => String(e)));
2123
+ l.value = new Set(e.map((e) => String(e)));
2124
2124
  }
2125
- })), ce = z(() => ({
2126
- current: h.value,
2127
- total: g.value,
2125
+ })), le = z(() => ({
2126
+ current: m.value,
2127
+ total: h.value,
2128
2128
  pageSize: Gn,
2129
2129
  showSizeChanger: !1,
2130
2130
  showQuickJumper: !1,
2131
2131
  onChange: (e) => void pe(e)
2132
2132
  }));
2133
2133
  Z(() => [n.open, n.role?.id], ([e]) => {
2134
- e ? de() : be();
2134
+ e ? L() : be();
2135
2135
  }, { immediate: !0 }), Z([
2136
2136
  () => n.embedded,
2137
2137
  () => n.drawerContext,
2138
- s,
2139
- L,
2140
- P,
2138
+ l,
2141
2139
  I,
2142
- ae,
2143
- y,
2140
+ j,
2141
+ F,
2142
+ oe,
2143
+ b,
2144
2144
  _
2145
- ], le, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2146
- function le() {
2145
+ ], ue, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2146
+ function ue() {
2147
2147
  let e = n.drawerContext;
2148
2148
  n.embedded && e && (e.setSubtitle(`角色:${je(n.role ?? {})} · ${Me(n.role)}`), e.setOperation({
2149
- summary: ue(),
2149
+ summary: de(),
2150
2150
  actions: [{
2151
2151
  key: "cancel-account-role-grants",
2152
2152
  label: "取消",
2153
- disabled: y.value || _.value,
2153
+ disabled: b.value || _.value,
2154
2154
  run: ve
2155
2155
  }, {
2156
2156
  key: "save-account-role-grants",
2157
2157
  label: "确定",
2158
2158
  emphasis: "primary",
2159
- disabled: _.value || !P.value || !L.value,
2160
- loading: y.value,
2159
+ disabled: _.value || !j.value || !I.value,
2160
+ loading: b.value,
2161
2161
  run: () => void ge()
2162
2162
  }]
2163
2163
  }));
2164
2164
  }
2165
- function ue() {
2166
- return P.value ? L.value ? `已选 ${s.value.size} 个用户 · 新增 ${I.value.length} · 移除 ${ae.value.length}` : `已选 ${s.value.size} 个用户` : "请选择目标租户";
2165
+ function de() {
2166
+ return j.value ? I.value ? `已选 ${l.value.size} 个用户 · 新增 ${F.value.length} · 移除 ${oe.value.length}` : `已选 ${l.value.size} 个用户` : "请选择目标租户";
2167
2167
  }
2168
- async function de() {
2169
- let e = D.value;
2168
+ async function L() {
2169
+ let e = ee.value;
2170
2170
  if (!e) {
2171
2171
  be();
2172
2172
  return;
2173
2173
  }
2174
- if (!P.value) {
2174
+ if (!j.value) {
2175
2175
  xe();
2176
2176
  return;
2177
2177
  }
2178
2178
  _.value = !0, x.value = !1;
2179
2179
  try {
2180
- let t = await w.value.accountRoleGrants(e, N.value);
2180
+ let t = await w.value.accountRoleGrants(e, A.value);
2181
2181
  i.value = t;
2182
2182
  let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
2183
- c.value = n, s.value = new Set(n), a.value = De([...t.map((e) => Oe(e.userId)).filter((e) => !!e)]), await pe(1);
2183
+ d.value = n, l.value = new Set(n), s.value = De([...t.map((e) => Oe(e.userId)).filter((e) => !!e)]), await pe(1);
2184
2184
  } catch (e) {
2185
- x.value = !0, T(e, {
2185
+ x.value = !0, u(e, {
2186
2186
  source: "role-account-grants",
2187
2187
  phase: "load"
2188
2188
  });
@@ -2191,12 +2191,12 @@ var Ln = {
2191
2191
  }
2192
2192
  }
2193
2193
  async function pe(e) {
2194
- let t = D.value;
2195
- if (t && P.value) {
2194
+ let t = ee.value;
2195
+ if (t && j.value) {
2196
2196
  v.value = !0;
2197
2197
  try {
2198
2198
  let n = await w.value.accountRoleCandidates(t, {
2199
- targetTenantId: N.value,
2199
+ targetTenantId: A.value,
2200
2200
  keyword: p.value,
2201
2201
  enabledOnly: !0,
2202
2202
  page: {
@@ -2204,12 +2204,12 @@ var Ln = {
2204
2204
  pageSize: Gn
2205
2205
  }
2206
2206
  });
2207
- o.value = n.records, a.value = {
2208
- ...a.value,
2207
+ c.value = n.records, s.value = {
2208
+ ...s.value,
2209
2209
  ...De(n.records)
2210
- }, h.value = n.pageNum, g.value = n.total;
2210
+ }, m.value = n.pageNum, h.value = n.total;
2211
2211
  } catch (e) {
2212
- T(e, {
2212
+ u(e, {
2213
2213
  source: "role-account-grants",
2214
2214
  phase: "load"
2215
2215
  });
@@ -2219,30 +2219,30 @@ var Ln = {
2219
2219
  }
2220
2220
  }
2221
2221
  function K() {
2222
- p.value = d.value.trim(), pe(0);
2222
+ p.value = f.value.trim(), pe(0);
2223
2223
  }
2224
2224
  function me(e, t) {
2225
- let n = new Set(s.value);
2226
- t ? n.add(e) : n.delete(e), s.value = n;
2225
+ let n = new Set(l.value);
2226
+ t ? n.add(e) : n.delete(e), l.value = n;
2227
2227
  }
2228
2228
  async function ge() {
2229
- let e = D.value;
2230
- if (e && P.value) {
2231
- if (!L.value) {
2229
+ let e = ee.value;
2230
+ if (e && j.value) {
2231
+ if (!I.value) {
2232
2232
  r("close");
2233
2233
  return;
2234
2234
  }
2235
- y.value = !0;
2235
+ b.value = !0;
2236
2236
  try {
2237
- for (let t of I.value) await w.value.grantAccountRole(e, {
2237
+ for (let t of F.value) await w.value.grantAccountRole(e, {
2238
2238
  userId: t,
2239
- targetTenantId: N.value
2239
+ targetTenantId: A.value
2240
2240
  });
2241
- for (let t of ae.value) {
2242
- let n = ne.value.get(t)?.id;
2243
- n && await w.value.deleteAccountRoleGrant(e, n, N.value);
2241
+ for (let t of oe.value) {
2242
+ let n = M.value.get(t)?.id;
2243
+ n && await w.value.deleteAccountRoleGrant(e, n, A.value);
2244
2244
  }
2245
- await f({
2245
+ await te({
2246
2246
  success: !0,
2247
2247
  message: "用户绑定已保存"
2248
2248
  }, {
@@ -2251,23 +2251,23 @@ var Ln = {
2251
2251
  fallbackMessage: "用户绑定已保存"
2252
2252
  }), r("saved"), r("close");
2253
2253
  } catch (e) {
2254
- T(e, {
2254
+ u(e, {
2255
2255
  source: "role-account-grants",
2256
2256
  phase: "action"
2257
2257
  });
2258
2258
  } finally {
2259
- y.value = !1;
2259
+ b.value = !1;
2260
2260
  }
2261
2261
  }
2262
2262
  }
2263
2263
  function ve() {
2264
- y.value || r("close");
2264
+ b.value || r("close");
2265
2265
  }
2266
2266
  function be() {
2267
2267
  C.value = void 0, xe();
2268
2268
  }
2269
2269
  function xe() {
2270
- i.value = [], a.value = {}, o.value = [], s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), d.value = "", p.value = "", h.value = 1, g.value = 0, _.value = !1, v.value = !1, y.value = !1, x.value = !1;
2270
+ i.value = [], s.value = {}, c.value = [], l.value = /* @__PURE__ */ new Set(), d.value = /* @__PURE__ */ new Set(), f.value = "", p.value = "", m.value = 1, h.value = 0, _.value = !1, v.value = !1, b.value = !1, x.value = !1;
2271
2271
  }
2272
2272
  async function Ce(e) {
2273
2273
  if (!e) {
@@ -2278,7 +2278,7 @@ var Ln = {
2278
2278
  C.value = t ?? {
2279
2279
  id: e,
2280
2280
  title: e
2281
- }, await de();
2281
+ }, await L();
2282
2282
  }
2283
2283
  function Te(e) {
2284
2284
  me(e, !1);
@@ -2306,59 +2306,59 @@ var Ln = {
2306
2306
  function Me(e) {
2307
2307
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
2308
2308
  }
2309
- return (t, n) => (q(), B(we(k.value), he(j.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), fe({
2310
- default: Q(() => [_.value ? (q(), B(X(re), {
2309
+ return (t, n) => (q(), B(we(ne.value), he(ie.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), fe({
2310
+ default: Q(() => [_.value ? (q(), B(X(S), {
2311
2311
  key: 0,
2312
2312
  class: "role-account-grant-drawer-state",
2313
2313
  tip: "加载用户"
2314
- })) : x.value ? (q(), H("div", Ln, [G(X(m), {
2314
+ })) : x.value ? (q(), H("div", Ln, [G(X(y), {
2315
2315
  title: "用户加载失败",
2316
2316
  message: "无法加载当前角色的用户绑定"
2317
- }), G(X(S), {
2317
+ }), G(X(D), {
2318
2318
  type: "primary",
2319
2319
  "icon-name": "reload",
2320
- onClick: de
2320
+ onClick: L
2321
2321
  }, {
2322
2322
  default: Q(() => [...n[3] ||= [W("重试", -1)]]),
2323
2323
  _: 1
2324
2324
  })])) : (q(), H("section", {
2325
2325
  key: 2,
2326
- class: _e(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": ee.value }])
2327
- }, [ee.value ? (q(), H("label", Rn, [n[4] ||= U("span", null, "目标租户", -1), G(X(l), {
2328
- context: te.value,
2329
- value: N.value,
2326
+ class: _e(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": k.value }])
2327
+ }, [k.value ? (q(), H("label", Rn, [n[4] ||= U("span", null, "目标租户", -1), G(X(o), {
2328
+ context: ae.value,
2329
+ value: A.value,
2330
2330
  mode: "list",
2331
2331
  placeholder: "请选择角色下发的目标租户",
2332
- disabled: y.value || _.value,
2332
+ disabled: b.value || _.value,
2333
2333
  "onUpdate:value": Ce
2334
2334
  }, null, 8, [
2335
2335
  "context",
2336
2336
  "value",
2337
2337
  "disabled"
2338
- ])])) : V("v-if", !0), P.value ? (q(), H(R, { key: 2 }, [
2339
- U("div", Bn, [G(X(A), {
2340
- value: d.value,
2338
+ ])])) : V("v-if", !0), j.value ? (q(), H(R, { key: 2 }, [
2339
+ U("div", Bn, [G(X(T), {
2340
+ value: f.value,
2341
2341
  "allow-clear": "",
2342
- disabled: y.value,
2342
+ disabled: b.value,
2343
2343
  placeholder: "搜索用户账号",
2344
- "onUpdate:value": n[0] ||= (e) => d.value = e,
2344
+ "onUpdate:value": n[0] ||= (e) => f.value = e,
2345
2345
  onKeydown: Ee(K, ["enter"])
2346
- }, null, 8, ["value", "disabled"]), G(X(S), {
2346
+ }, null, 8, ["value", "disabled"]), G(X(D), {
2347
2347
  "icon-name": "search",
2348
- disabled: y.value,
2348
+ disabled: b.value,
2349
2349
  onClick: K
2350
2350
  }, {
2351
2351
  default: Q(() => [...n[5] ||= [W("查询", -1)]]),
2352
2352
  _: 1
2353
2353
  }, 8, ["disabled"])]),
2354
- G(X(u), {
2354
+ G(X(a), {
2355
2355
  class: "role-account-grant-table",
2356
2356
  size: "middle",
2357
- contract: oe,
2358
- rows: ie.value,
2357
+ contract: se,
2358
+ rows: N.value,
2359
2359
  loading: v.value,
2360
- pagination: ce.value,
2361
- selection: se.value,
2360
+ pagination: le.value,
2361
+ selection: ce.value,
2362
2362
  "fill-height": ""
2363
2363
  }, null, 8, [
2364
2364
  "rows",
@@ -2366,26 +2366,26 @@ var Ln = {
2366
2366
  "pagination",
2367
2367
  "selection"
2368
2368
  ]),
2369
- F.value.length > 0 ? (q(), H("section", Vn, [U("div", Hn, [n[6] ||= U("strong", null, "已选用户", -1), U("span", null, Y(F.value.length) + " 个", 1)]), U("div", Un, [(q(!0), H(R, null, Se(F.value, (e) => (q(), H("button", {
2369
+ P.value.length > 0 ? (q(), H("section", Vn, [U("div", Hn, [n[6] ||= U("strong", null, "已选用户", -1), U("span", null, Y(P.value.length) + " 个", 1)]), U("div", Un, [(q(!0), H(R, null, Se(P.value, (e) => (q(), H("button", {
2370
2370
  key: e.id,
2371
2371
  type: "button",
2372
- disabled: y.value,
2372
+ disabled: b.value,
2373
2373
  onClick: (t) => Te(e.id)
2374
2374
  }, [U("span", null, Y(ke(e)), 1), U("small", null, Y(Ae(e)), 1)], 8, Wn))), 128))])])) : V("v-if", !0)
2375
2375
  ], 64)) : (q(), H("div", zn, " 平台共享角色需要先选择目标租户,再加载可绑定账号。 "))], 2))]),
2376
2376
  _: 2
2377
2377
  }, [e.embedded ? void 0 : {
2378
2378
  name: "operation",
2379
- fn: Q(() => [G(X(S), {
2380
- disabled: y.value || _.value,
2379
+ fn: Q(() => [G(X(D), {
2380
+ disabled: b.value || _.value,
2381
2381
  onClick: ve
2382
2382
  }, {
2383
2383
  default: Q(() => [...n[1] ||= [W("取消", -1)]]),
2384
2384
  _: 1
2385
- }, 8, ["disabled"]), G(X(S), {
2385
+ }, 8, ["disabled"]), G(X(D), {
2386
2386
  type: "primary",
2387
- loading: y.value,
2388
- disabled: _.value || !L.value,
2387
+ loading: b.value,
2388
+ disabled: _.value || !I.value,
2389
2389
  onClick: ge
2390
2390
  }, {
2391
2391
  default: Q(() => [...n[2] ||= [W(" 确定 ", -1)]]),
@@ -2416,7 +2416,7 @@ var Ln = {
2416
2416
  "onSaved"
2417
2417
  ]));
2418
2418
  }
2419
- }), Jn = /*#__PURE__*/ j(/* @__PURE__ */ K({
2419
+ }), Jn = /*#__PURE__*/ M(/* @__PURE__ */ K({
2420
2420
  name: "EmployeeEmploymentTable",
2421
2421
  __name: "EmployeeEmploymentTable",
2422
2422
  props: {
@@ -2441,7 +2441,7 @@ var Ln = {
2441
2441
  },
2442
2442
  emits: ["update:selectedIds"],
2443
2443
  setup(e, { emit: t }) {
2444
- let n = e, r = t, i = J([]), o = [
2444
+ let n = e, r = t, i = J([]), a = [
2445
2445
  {
2446
2446
  key: "title",
2447
2447
  title: "职员",
@@ -2469,7 +2469,7 @@ var Ln = {
2469
2469
  width: 88,
2470
2470
  align: "right"
2471
2471
  }
2472
- ], s = [
2472
+ ], o = [
2473
2473
  {
2474
2474
  key: "position",
2475
2475
  title: "岗位",
@@ -2490,7 +2490,7 @@ var Ln = {
2490
2490
  title: "主岗位",
2491
2491
  width: 88
2492
2492
  }
2493
- ], c = z(() => {
2493
+ ], s = z(() => {
2494
2494
  let e = /* @__PURE__ */ new Map();
2495
2495
  for (let t of n.rows) {
2496
2496
  let n = t.employeeId ?? t.id, r = e.get(n) ?? {
@@ -2503,65 +2503,65 @@ var Ln = {
2503
2503
  r.positions.push(t), e.set(n, r);
2504
2504
  }
2505
2505
  return [...e.values()];
2506
- }), l = z(() => c.value);
2507
- function u(e, t) {
2506
+ }), c = z(() => s.value);
2507
+ function l(e, t) {
2508
2508
  let n = t;
2509
- return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${f(n)} 项` : "";
2509
+ return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${d(n)} 项` : "";
2510
2510
  }
2511
- function d(e, t) {
2511
+ function u(e, t) {
2512
2512
  let n = t;
2513
2513
  return e.key === "position" ? n.positionTitle ?? n.positionId : e.key === "organization" ? n.organizationTitle ?? n.organizationId : e.key === "department" ? n.departmentTitle ?? n.departmentId : e.key === "primaryPosition" ? n.primaryPosition ? "是" : "否" : "";
2514
2514
  }
2515
- function f(e) {
2515
+ function d(e) {
2516
2516
  return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
2517
2517
  }
2518
- function p(e) {
2518
+ function f(e) {
2519
2519
  if (n.selectable) return {
2520
2520
  selectedRowKeys: e.positions.filter((e) => n.selectedIds.has(e.id)).map((e) => e.id),
2521
2521
  preserveSelectedRowKeys: !0,
2522
2522
  disabledOf: () => n.disabled,
2523
- onChange: (t) => m(e, t)
2523
+ onChange: (t) => p(e, t)
2524
2524
  };
2525
2525
  }
2526
- function m(e, t) {
2526
+ function p(e, t) {
2527
2527
  let i = new Set(n.selectedIds);
2528
2528
  for (let t of e.positions) i.delete(t.id);
2529
2529
  for (let e of t) i.add(String(e));
2530
2530
  r("update:selectedIds", i);
2531
2531
  }
2532
- function g(e, t) {
2532
+ function m(e, t) {
2533
2533
  let n = e.employeeId;
2534
2534
  i.value = t ? Array.from(/* @__PURE__ */ new Set([...i.value, n])) : i.value.filter((e) => e !== n);
2535
2535
  }
2536
- function _(e) {
2536
+ function g(e) {
2537
2537
  let t = e.employeeId;
2538
- g(e, !i.value.includes(t));
2538
+ m(e, !i.value.includes(t));
2539
2539
  }
2540
- return (t, n) => (q(), B(X(a), {
2540
+ return (t, n) => (q(), B(X(k), {
2541
2541
  class: "employee-employment-table",
2542
- columns: o,
2543
- rows: l.value,
2542
+ columns: a,
2543
+ rows: c.value,
2544
2544
  "row-key": "employeeId",
2545
2545
  pagination: e.pagination,
2546
2546
  "expanded-row-keys": i.value,
2547
2547
  "clickable-rows": "",
2548
2548
  "horizontal-scroll": "",
2549
2549
  "fill-height": e.fillHeight,
2550
- onRowExpand: g,
2551
- onRowDblclick: _
2550
+ onRowExpand: m,
2551
+ onRowDblclick: g
2552
2552
  }, {
2553
- cell: Q(({ column: e, record: t }) => [W(Y(u(e, t)), 1)]),
2553
+ cell: Q(({ column: e, record: t }) => [W(Y(l(e, t)), 1)]),
2554
2554
  expandedRow: Q(({ record: e }) => [G(X(h), { title: "任职信息" }, {
2555
- default: Q(() => [G(X(a), {
2556
- columns: s,
2555
+ default: Q(() => [G(X(k), {
2556
+ columns: o,
2557
2557
  rows: e.positions,
2558
2558
  "row-key": "id",
2559
2559
  pagination: !1,
2560
- selection: p(e),
2560
+ selection: f(e),
2561
2561
  "horizontal-scroll": "",
2562
2562
  "row-muted": (e) => e.enabled === !1
2563
2563
  }, {
2564
- cell: Q(({ column: e, record: t }) => [W(Y(d(e, t)), 1)]),
2564
+ cell: Q(({ column: e, record: t }) => [W(Y(u(e, t)), 1)]),
2565
2565
  _: 1
2566
2566
  }, 8, [
2567
2567
  "rows",
@@ -2584,7 +2584,7 @@ var Ln = {
2584
2584
  }, Zn = {
2585
2585
  key: 0,
2586
2586
  class: "role-employment-grant-selected"
2587
- }, Qn = { class: "role-employment-grant-selected-title" }, $n = { class: "role-employment-grant-selected-list" }, er = ["disabled", "onClick"], tr = /*#__PURE__*/ j(/* @__PURE__ */ K({
2587
+ }, Qn = { class: "role-employment-grant-selected-title" }, $n = { class: "role-employment-grant-selected-list" }, er = ["disabled", "onClick"], tr = /*#__PURE__*/ M(/* @__PURE__ */ K({
2588
2588
  name: "RoleEmploymentGrantDrawer",
2589
2589
  __name: "RoleEmploymentGrantDrawer",
2590
2590
  props: {
@@ -2597,56 +2597,56 @@ var Ln = {
2597
2597
  },
2598
2598
  emits: ["close", "saved"],
2599
2599
  setup(e, { emit: t }) {
2600
- let n = e, r = t, i = J([]), a = J([]), o = J({}), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), l = J(!1), u = J(!1), d = J(!1), p = J(!1), h = J(1), g = J(0), _ = J(""), v = z(() => n.role?.id), y = z(() => In(n.context.http)), b = z(() => `绑定任职 - ${n.role?.title ?? n.role?.id ?? ""}`), x = z(() => n.embedded ? "section" : M), C = z(() => n.embedded ? {} : {
2600
+ let n = e, r = t, i = J([]), a = J([]), o = J({}), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), l = J(!1), d = J(!1), f = J(!1), p = J(!1), m = J(1), h = J(0), g = J(""), _ = z(() => n.role?.id), v = z(() => In(n.context.http)), b = z(() => `绑定任职 - ${n.role?.title ?? n.role?.id ?? ""}`), x = z(() => n.embedded ? "section" : re), C = z(() => n.embedded ? {} : {
2601
2601
  open: n.open,
2602
2602
  title: b.value,
2603
2603
  renderMode: n.container ? "inline" : "portal",
2604
2604
  closeTitle: "关闭",
2605
- onClose: () => !d.value && r("close")
2606
- }), w = z(() => [...s.value].filter((e) => !c.value.has(e))), E = z(() => [...c.value].filter((e) => !s.value.has(e))), D = z(() => new Map(i.value.map((e) => [e.employeePositionId, e]))), O = z(() => a.value.filter((e) => !_.value.trim() || ne(e).includes(_.value.trim()))), k = z(() => [...s.value].map((e) => o.value[e] ?? I(e))), j = z(() => ({
2607
- current: h.value,
2608
- total: g.value,
2605
+ onClose: () => !f.value && r("close")
2606
+ }), w = z(() => [...s.value].filter((e) => !c.value.has(e))), E = z(() => [...c.value].filter((e) => !s.value.has(e))), ee = z(() => new Map(i.value.map((e) => [e.employeePositionId, e]))), O = z(() => a.value.filter((e) => !g.value.trim() || M(e).includes(g.value.trim()))), ne = z(() => [...s.value].map((e) => o.value[e] ?? F(e))), ie = z(() => ({
2607
+ current: m.value,
2608
+ total: h.value,
2609
2609
  pageSize: 50,
2610
2610
  showSizeChanger: !1,
2611
2611
  showQuickJumper: !1,
2612
- onChange: (e) => void N(e)
2612
+ onChange: (e) => void A(e)
2613
2613
  }));
2614
2614
  Z(() => [n.open, n.role?.id], ([e]) => {
2615
- e ? N() : te();
2615
+ e ? A() : ae();
2616
2616
  }, { immediate: !0 }), Z([
2617
2617
  () => n.embedded,
2618
2618
  () => n.drawerContext,
2619
2619
  s,
2620
2620
  w,
2621
2621
  E,
2622
- d,
2623
- u
2624
- ], ee, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2625
- function ee() {
2622
+ f,
2623
+ d
2624
+ ], k, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2625
+ function k() {
2626
2626
  let e = n.drawerContext;
2627
- n.embedded && e && (e.setSubtitle(`角色:${n.role?.title ?? n.role?.id ?? "角色"} · ${oe(n.role)}`), e.setOperation({
2627
+ n.embedded && e && (e.setSubtitle(`角色:${n.role?.title ?? n.role?.id ?? "角色"} · ${se(n.role)}`), e.setOperation({
2628
2628
  summary: `已选 ${s.value.size} 个任职${w.value.length || E.value.length ? ` · 新增 ${w.value.length} · 移除 ${E.value.length}` : ""}`,
2629
2629
  actions: [{
2630
2630
  key: "cancel-employment-role-grants",
2631
2631
  label: "取消",
2632
- disabled: d.value,
2632
+ disabled: f.value,
2633
2633
  run: () => r("close")
2634
2634
  }, {
2635
2635
  key: "save-employment-role-grants",
2636
2636
  label: "确定",
2637
2637
  emphasis: "primary",
2638
- disabled: u.value || w.value.length === 0 && E.value.length === 0,
2639
- loading: d.value,
2640
- run: () => void P()
2638
+ disabled: d.value || w.value.length === 0 && E.value.length === 0,
2639
+ loading: f.value,
2640
+ run: () => void j()
2641
2641
  }]
2642
2642
  }));
2643
2643
  }
2644
- async function N(e = 1) {
2645
- let t = v.value;
2644
+ async function A(e = 1) {
2645
+ let t = _.value;
2646
2646
  if (t) {
2647
- u.value = !0, p.value = !1;
2647
+ d.value = !0, p.value = !1;
2648
2648
  try {
2649
- let [n, r] = await Promise.all([y.value.employmentRoleGrants(t), y.value.employmentSelector(t, {
2649
+ let [n, r] = await Promise.all([v.value.employmentRoleGrants(t), v.value.employmentSelector(t, {
2650
2650
  enabledOnly: !0,
2651
2651
  page: {
2652
2652
  pageNum: e,
@@ -2655,29 +2655,29 @@ var Ln = {
2655
2655
  })]);
2656
2656
  i.value = n, c.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), o.value = {
2657
2657
  ...o.value,
2658
- ...F(r.records)
2659
- }, l.value ||= (s.value = new Set(c.value), !0), a.value = r.records, h.value = r.pageNum, g.value = r.total;
2658
+ ...P(r.records)
2659
+ }, l.value ||= (s.value = new Set(c.value), !0), a.value = r.records, m.value = r.pageNum, h.value = r.total;
2660
2660
  } catch (e) {
2661
- p.value = !0, T(e, {
2661
+ p.value = !0, u(e, {
2662
2662
  source: "role-employment-grants",
2663
2663
  phase: "load"
2664
2664
  });
2665
2665
  } finally {
2666
- u.value = !1;
2666
+ d.value = !1;
2667
2667
  }
2668
2668
  }
2669
2669
  }
2670
- async function P() {
2671
- let e = v.value;
2670
+ async function j() {
2671
+ let e = _.value;
2672
2672
  if (e) {
2673
- d.value = !0;
2673
+ f.value = !0;
2674
2674
  try {
2675
- for (let t of w.value) await y.value.grantEmploymentRole(e, t);
2675
+ for (let t of w.value) await v.value.grantEmploymentRole(e, t);
2676
2676
  for (let t of E.value) {
2677
- let n = D.value.get(t)?.id;
2678
- n && await y.value.deleteEmploymentRoleGrant(e, n);
2677
+ let n = ee.value.get(t)?.id;
2678
+ n && await v.value.deleteEmploymentRoleGrant(e, n);
2679
2679
  }
2680
- await f({
2680
+ await te({
2681
2681
  success: !0,
2682
2682
  message: "任职角色授权已保存"
2683
2683
  }, {
@@ -2685,19 +2685,19 @@ var Ln = {
2685
2685
  phase: "action"
2686
2686
  }), r("saved"), r("close");
2687
2687
  } catch (e) {
2688
- T(e, {
2688
+ u(e, {
2689
2689
  source: "role-employment-grants",
2690
2690
  phase: "action"
2691
2691
  });
2692
2692
  } finally {
2693
- d.value = !1;
2693
+ f.value = !1;
2694
2694
  }
2695
2695
  }
2696
2696
  }
2697
- function te() {
2698
- i.value = [], a.value = [], o.value = {}, s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), l.value = !1, _.value = "", h.value = 1, g.value = 0, p.value = !1;
2697
+ function ae() {
2698
+ i.value = [], a.value = [], o.value = {}, s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), l.value = !1, g.value = "", m.value = 1, h.value = 0, p.value = !1;
2699
2699
  }
2700
- function ne(e) {
2700
+ function M(e) {
2701
2701
  return [
2702
2702
  e.employeeTitle,
2703
2703
  e.employeeNo,
@@ -2706,49 +2706,49 @@ var Ln = {
2706
2706
  e.positionTitle
2707
2707
  ].filter(Boolean).join(" ");
2708
2708
  }
2709
- function ie(e) {
2709
+ function N(e) {
2710
2710
  let t = new Set(s.value);
2711
2711
  t.delete(e), s.value = t;
2712
2712
  }
2713
- function F(e) {
2713
+ function P(e) {
2714
2714
  let t = {};
2715
2715
  for (let n of e) n.id && (t[n.id] = n);
2716
2716
  return t;
2717
2717
  }
2718
- function I(e) {
2718
+ function F(e) {
2719
2719
  return {
2720
2720
  id: e,
2721
2721
  positionId: e
2722
2722
  };
2723
2723
  }
2724
- function ae(e) {
2724
+ function oe(e) {
2725
2725
  let t = e.positionTitle ?? e.positionId ?? e.id;
2726
2726
  return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
2727
2727
  }
2728
- function L(e) {
2728
+ function I(e) {
2729
2729
  return [
2730
2730
  e.employeeNo,
2731
2731
  e.organizationTitle ?? e.organizationId,
2732
2732
  e.departmentTitle ?? e.departmentId
2733
2733
  ].filter(Boolean).join(" / ") || e.id;
2734
2734
  }
2735
- function oe(e) {
2735
+ function se(e) {
2736
2736
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
2737
2737
  }
2738
2738
  return (t, n) => (q(), B(we(x.value), he(C.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), fe({
2739
- default: Q(() => [u.value ? (q(), B(X(re), {
2739
+ default: Q(() => [d.value ? (q(), B(X(S), {
2740
2740
  key: 0,
2741
2741
  tip: "加载任职"
2742
- })) : p.value ? (q(), H("div", Yn, [G(X(m), {
2742
+ })) : p.value ? (q(), H("div", Yn, [G(X(y), {
2743
2743
  title: "任职加载失败",
2744
2744
  message: "无法加载任职授权"
2745
- }), G(X(S), { onClick: n[1] ||= (e) => N() }, {
2745
+ }), G(X(D), { onClick: n[1] ||= (e) => A() }, {
2746
2746
  default: Q(() => [...n[6] ||= [W("重试", -1)]]),
2747
2747
  _: 1
2748
2748
  })])) : (q(), H("section", Xn, [
2749
- G(X(A), {
2750
- value: _.value,
2751
- "onUpdate:value": n[2] ||= (e) => _.value = e,
2749
+ G(X(T), {
2750
+ value: g.value,
2751
+ "onUpdate:value": n[2] ||= (e) => g.value = e,
2752
2752
  "allow-clear": "",
2753
2753
  placeholder: "筛选职员、工号、机构、部门或岗位"
2754
2754
  }, null, 8, ["value"]),
@@ -2757,8 +2757,8 @@ var Ln = {
2757
2757
  "onUpdate:selectedIds": n[3] ||= (e) => s.value = e,
2758
2758
  rows: O.value,
2759
2759
  selectable: "",
2760
- disabled: d.value,
2761
- pagination: j.value,
2760
+ disabled: f.value,
2761
+ pagination: ie.value,
2762
2762
  "fill-height": ""
2763
2763
  }, null, 8, [
2764
2764
  "selected-ids",
@@ -2766,27 +2766,27 @@ var Ln = {
2766
2766
  "disabled",
2767
2767
  "pagination"
2768
2768
  ]),
2769
- k.value.length > 0 ? (q(), H("section", Zn, [U("div", Qn, [n[7] ||= U("strong", null, "已选任职", -1), U("span", null, Y(k.value.length) + " 个", 1)]), U("div", $n, [(q(!0), H(R, null, Se(k.value, (e) => (q(), H("button", {
2769
+ ne.value.length > 0 ? (q(), H("section", Zn, [U("div", Qn, [n[7] ||= U("strong", null, "已选任职", -1), U("span", null, Y(ne.value.length) + " 个", 1)]), U("div", $n, [(q(!0), H(R, null, Se(ne.value, (e) => (q(), H("button", {
2770
2770
  key: e.id,
2771
2771
  type: "button",
2772
- disabled: d.value,
2773
- onClick: (t) => ie(e.id)
2774
- }, [U("span", null, Y(ae(e)), 1), U("small", null, Y(L(e)), 1)], 8, er))), 128))])])) : V("v-if", !0)
2772
+ disabled: f.value,
2773
+ onClick: (t) => N(e.id)
2774
+ }, [U("span", null, Y(oe(e)), 1), U("small", null, Y(I(e)), 1)], 8, er))), 128))])])) : V("v-if", !0)
2775
2775
  ]))]),
2776
2776
  _: 2
2777
2777
  }, [e.embedded ? void 0 : {
2778
2778
  name: "operation",
2779
- fn: Q(() => [G(X(S), {
2780
- disabled: d.value,
2779
+ fn: Q(() => [G(X(D), {
2780
+ disabled: f.value,
2781
2781
  onClick: n[0] ||= (e) => r("close")
2782
2782
  }, {
2783
2783
  default: Q(() => [...n[4] ||= [W("取消", -1)]]),
2784
2784
  _: 1
2785
- }, 8, ["disabled"]), G(X(S), {
2785
+ }, 8, ["disabled"]), G(X(D), {
2786
2786
  type: "primary",
2787
- loading: d.value,
2788
- disabled: u.value || w.value.length === 0 && E.value.length === 0,
2789
- onClick: P
2787
+ loading: f.value,
2788
+ disabled: d.value || w.value.length === 0 && E.value.length === 0,
2789
+ onClick: j
2790
2790
  }, {
2791
2791
  default: Q(() => [...n[5] ||= [W(" 确定 ", -1)]]),
2792
2792
  _: 1
@@ -2835,7 +2835,7 @@ var Ln = {
2835
2835
  emits: ["close"],
2836
2836
  setup(e, { emit: t }) {
2837
2837
  let n = e, r = t, i = z(() => n.profile === "wide-work" ? "wide" : "standard");
2838
- return (t, n) => (q(), B(X(M), {
2838
+ return (t, n) => (q(), B(X(re), {
2839
2839
  open: e.open,
2840
2840
  title: e.title,
2841
2841
  "render-mode": e.container ? "inline" : "portal",
@@ -2870,7 +2870,7 @@ function ir(e) {
2870
2870
  return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
2871
2871
  }
2872
2872
  function ar(e) {
2873
- let t = le();
2873
+ let t = ue();
2874
2874
  return z(() => {
2875
2875
  let n = Te(e.input);
2876
2876
  if (n && ir(Te(e.eligibility)) && t) return {
@@ -2880,7 +2880,7 @@ function ar(e) {
2880
2880
  e.onPromotionRejected?.();
2881
2881
  return;
2882
2882
  }
2883
- let r = t.openPage(oe(e.view, n, "tab", Te(e.title)));
2883
+ let r = t.openPage(se(e.view, n, "tab", Te(e.title)));
2884
2884
  e.onPromoted?.(r);
2885
2885
  }
2886
2886
  };
@@ -2945,30 +2945,30 @@ var _r = { class: "panel-title" }, vr = {
2945
2945
  drawerContext: {}
2946
2946
  },
2947
2947
  emits: ["close"],
2948
- setup(e, { emit: t }) {
2949
- let n = e, r = t, i = b({ moduleAlias: "iam.role" }), l = n.moduleContext ?? i, u = In(l.http), p = n.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", h = se(), g = n.roleId ? { roleId: n.roleId } : void 0, v = g ? gr(g) : void 0, y = J(), C = J([]), E = J(), D = J(""), O = J([]), k = J(), A = J(), j = J(!1), ee = J(!1), M = J(!1), P = J(), ne = J(), ie = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), I = J(0), ae, L = z(() => y.value?.roleKind === "group"), oe = z(() => y.value?.roleKind === "dataGrant"), le = z(() => y.value?.assignmentType === "employment"), ue = z(() => !!n.drawerContext), de = z(() => y.value?.title ?? p ?? "角色"), pe = z(() => `授权:${de.value}`), K = z(() => he.value ? `动作授权 - ${he.value.title}` : `动作授权 - ${de.value}`), he = z(() => C.value.find((e) => e.moduleAlias === E.value)), ge = z(() => {
2950
- let e = D.value.trim().toLocaleLowerCase(), t = new Set(e ? C.value.filter((t) => [
2948
+ setup(e, { emit: n }) {
2949
+ let i = e, a = n, o = g({ moduleAlias: "iam.role" }), s = i.moduleContext ?? o, l = In(s.http), f = i.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", m = ce(), h = i.roleId ? { roleId: i.roleId } : void 0, _ = h ? gr(h) : void 0, v = J(), x = J([]), C = J(), w = J(""), T = J([]), E = J(), O = J(), ne = J(!1), re = J(!1), A = J(!1), j = J(), M = J(), N = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), F = J(0), oe, I = z(() => v.value?.roleKind === "group"), se = z(() => v.value?.roleKind === "dataGrant"), ue = z(() => v.value?.assignmentType === "employment"), de = z(() => !!i.drawerContext), L = z(() => v.value?.title ?? f ?? "角色"), pe = z(() => `授权:${L.value}`), K = z(() => he.value ? `动作授权 - ${he.value.title}` : `动作授权 - ${L.value}`), he = z(() => x.value.find((e) => e.moduleAlias === C.value)), ge = z(() => {
2950
+ let e = w.value.trim().toLocaleLowerCase(), t = new Set(e ? x.value.filter((t) => [
2951
2951
  t.title,
2952
2952
  t.moduleAlias,
2953
2953
  t.applicationAlias
2954
- ].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : C.value.map((e) => e.moduleAlias)), n = new Map(C.value.map((e) => [e.moduleAlias, e]));
2954
+ ].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : x.value.map((e) => e.moduleAlias)), n = new Map(x.value.map((e) => [e.moduleAlias, e]));
2955
2955
  for (let e of [...t]) {
2956
2956
  let r = n.get(e)?.parentId;
2957
2957
  for (; r && n.has(r) && !t.has(r);) t.add(r), r = n.get(r)?.parentId;
2958
2958
  }
2959
- return C.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
2959
+ return x.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
2960
2960
  id: e.moduleAlias,
2961
2961
  parentId: e.parentId,
2962
2962
  title: e.title,
2963
2963
  secondary: e.applicationAlias
2964
2964
  }));
2965
- }), xe = z(() => (A.value?.options ?? []).map((e) => ({
2965
+ }), xe = z(() => (O.value?.options ?? []).map((e) => ({
2966
2966
  value: e.code,
2967
2967
  label: e.title
2968
- }))), Se = z(() => (A.value?.referenceDependencies ?? []).map((e) => ({
2968
+ }))), Se = z(() => (O.value?.referenceDependencies ?? []).map((e) => ({
2969
2969
  value: e.referenceFieldId,
2970
2970
  label: `${e.title} → ${e.targetModuleTitle}`
2971
- }))), Ce = z(() => new Map((A.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = z(() => le.value && O.value.some((e) => !!e.dataAuth)), Ee = z(() => [
2971
+ }))), Ce = z(() => new Map((O.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = z(() => ue.value && T.value.some((e) => !!e.dataAuth)), Ee = z(() => [
2972
2972
  {
2973
2973
  key: "title",
2974
2974
  title: "动作",
@@ -3002,139 +3002,139 @@ var _r = { class: "panel-title" }, vr = {
3002
3002
  title: "数据范围",
3003
3003
  width: 160
3004
3004
  }
3005
- ], Oe = z(() => O.value), ke = z(() => k.value?.actions ?? []), Ae = z(() => n.drawer === !0 || !!g && h?.presentation === "drawer"), je = z(() => !!g), Me = z(() => je.value && !ue.value), Ne = z(() => ue.value ? "div" : Ae.value ? rr : je.value ? d : "div"), Fe = z(() => Ae.value ? {
3005
+ ], Oe = z(() => T.value), ke = z(() => E.value?.actions ?? []), Ae = z(() => i.drawer === !0 || !!h && m?.presentation === "drawer"), je = z(() => !!h), Me = z(() => je.value && !de.value), Ne = z(() => de.value ? "div" : Ae.value ? rr : je.value ? d : "div"), Fe = z(() => Ae.value ? {
3006
3006
  open: !0,
3007
3007
  title: pe.value,
3008
- container: n.container ?? null,
3008
+ container: i.container ?? null,
3009
3009
  profile: Pe.drawerProfile,
3010
3010
  promotion: Ve.value,
3011
3011
  dismissal: "guarded",
3012
3012
  beforeClose: it,
3013
3013
  onClose: at
3014
3014
  } : Me.value ? { title: pe.value } : {}), Ie = z(() => {
3015
- let e = k.value;
3016
- return !e || ne.value === void 0 ? !1 : JSON.stringify(e.actions) !== ne.value;
3017
- }), Le = z(() => I.value >= 0 && [...ie.entries()].some(([e, t]) => F.get(e) !== JSON.stringify(t))), $ = z(() => Ie.value || Le.value);
3018
- ce("角色授权", () => $.value, () => M.value);
3019
- let Re = z(() => O.value.length > 0 && O.value.every((e) => e.granted)), ze = z(() => O.value.some((e) => e.granted) && !Re.value), Be = z(() => {
3020
- let e = he.value?.title ?? "未选择模块", t = O.value.filter((e) => e.granted).length, n = $.value ? "有未确认修改" : "未修改";
3021
- return `当前模块:${e} · 已授权 ${t}/${O.value.length} 项 · ${n}`;
3015
+ let e = E.value;
3016
+ return !e || M.value === void 0 ? !1 : JSON.stringify(e.actions) !== M.value;
3017
+ }), Le = z(() => F.value >= 0 && [...N.entries()].some(([e, t]) => P.get(e) !== JSON.stringify(t))), $ = z(() => Ie.value || Le.value);
3018
+ le("角色授权", () => $.value, () => A.value);
3019
+ let Re = z(() => T.value.length > 0 && T.value.every((e) => e.granted)), ze = z(() => T.value.some((e) => e.granted) && !Re.value), Be = z(() => {
3020
+ let e = he.value?.title ?? "未选择模块", t = T.value.filter((e) => e.granted).length, n = $.value ? "有未确认修改" : "未修改";
3021
+ return `当前模块:${e} · 已授权 ${t}/${T.value.length} 项 · ${n}`;
3022
3022
  }), Ve = ar({
3023
3023
  view: Pe,
3024
- input: () => g,
3024
+ input: () => h,
3025
3025
  title: pe,
3026
3026
  eligibility: () => ({
3027
- hasStableIdentity: !!(p && y.value),
3028
- busy: M.value
3027
+ hasStableIdentity: !!(f && v.value),
3028
+ busy: A.value
3029
3029
  }),
3030
3030
  beforePromote: (e) => mr(e, {
3031
- selectedModuleAlias: E.value,
3032
- dataGrantMatrix: k.value,
3033
- actionDrafts: [...ie.entries()].map(([e, t]) => ({
3031
+ selectedModuleAlias: C.value,
3032
+ dataGrantMatrix: E.value,
3033
+ actionDrafts: [...N.entries()].map(([e, t]) => ({
3034
3034
  moduleAlias: e,
3035
3035
  actions: t
3036
3036
  })),
3037
- actionSnapshots: [...F.entries()].map(([e, t]) => ({
3037
+ actionSnapshots: [...P.entries()].map(([e, t]) => ({
3038
3038
  moduleAlias: e,
3039
3039
  snapshot: t
3040
3040
  }))
3041
3041
  }).then((e) => e === "accepted"),
3042
3042
  onPromoted: ot,
3043
- onPromotionRejected: () => w("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
3043
+ onPromotionRejected: () => p("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
3044
3044
  source: "role-authorization",
3045
3045
  phase: "validation"
3046
3046
  })
3047
3047
  });
3048
3048
  be(() => {
3049
- g && !Ae.value && (ae = hr(g, st)), Ue();
3049
+ h && !Ae.value && (oe = hr(h, st)), Ue();
3050
3050
  }), Z(pe, (e) => {
3051
- je.value && h?.setTitle(e);
3052
- }, { immediate: !0 }), Z(E, () => void We()), Z([
3053
- de,
3051
+ je.value && m?.setTitle(e);
3052
+ }, { immediate: !0 }), Z(C, () => void We()), Z([
3053
+ L,
3054
3054
  Be,
3055
3055
  $,
3056
- M,
3057
- L,
3058
- oe
3056
+ A,
3057
+ I,
3058
+ se
3059
3059
  ], He, { immediate: !0 }), be(() => window.addEventListener("beforeunload", lt)), ye(() => {
3060
- ae?.(), n.drawerContext?.setOperation(void 0), n.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", lt);
3060
+ oe?.(), i.drawerContext?.setOperation(void 0), i.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", lt);
3061
3061
  });
3062
3062
  function He() {
3063
- let e = n.drawerContext;
3063
+ let e = i.drawerContext;
3064
3064
  if (e) {
3065
- if (e.setSubtitle(`${de.value} · ${ut(y.value)}`), L.value) {
3065
+ if (e.setSubtitle(`${L.value} · ${ut(v.value)}`), I.value) {
3066
3066
  e.setOperation(void 0);
3067
3067
  return;
3068
3068
  }
3069
3069
  e.setOperation({
3070
- summary: oe.value ? $.value ? "有未确认修改" : "未修改" : Be.value,
3070
+ summary: se.value ? $.value ? "有未确认修改" : "未修改" : Be.value,
3071
3071
  actions: [{
3072
3072
  key: "confirm-role-authorization",
3073
3073
  label: "确认",
3074
3074
  emphasis: "primary",
3075
- disabled: M.value || !$.value,
3076
- loading: M.value,
3075
+ disabled: A.value || !$.value,
3076
+ loading: A.value,
3077
3077
  run: () => void rt()
3078
3078
  }]
3079
3079
  });
3080
3080
  }
3081
3081
  }
3082
3082
  async function Ue() {
3083
- if (!p) {
3084
- P.value = "缺少角色标识,无法打开授权页。";
3083
+ if (!f) {
3084
+ j.value = "缺少角色标识,无法打开授权页。";
3085
3085
  return;
3086
3086
  }
3087
- j.value = !0, P.value = void 0;
3087
+ ne.value = !0, j.value = void 0;
3088
3088
  try {
3089
- if (y.value = await l.crud.view(p), y.value.roleKind === "group") return;
3090
- if (y.value.roleKind === "dataGrant") {
3091
- let [e, t] = await Promise.all([u.dataGrantActionMatrix(p), u.dataScopePolicyCatalog(p)]);
3092
- k.value = v?.dataGrantMatrix ?? e, A.value = t, ne.value = JSON.stringify(e.actions);
3089
+ if (v.value = await s.crud.view(f), v.value.roleKind === "group") return;
3090
+ if (v.value.roleKind === "dataGrant") {
3091
+ let [e, t] = await Promise.all([l.dataGrantActionMatrix(f), l.dataScopePolicyCatalog(f)]);
3092
+ E.value = _?.dataGrantMatrix ?? e, O.value = t, M.value = JSON.stringify(e.actions);
3093
3093
  return;
3094
3094
  }
3095
- C.value = (await u.authorizationModules(p)).records, E.value = v?.selectedModuleAlias ?? C.value[0]?.moduleAlias;
3095
+ x.value = (await l.authorizationModules(f)).records, C.value = _?.selectedModuleAlias ?? x.value[0]?.moduleAlias;
3096
3096
  } catch (e) {
3097
- P.value = "授权信息加载失败,请重试。", T(e, {
3097
+ j.value = "授权信息加载失败,请重试。", u(e, {
3098
3098
  source: "role-authorization",
3099
3099
  phase: "load"
3100
3100
  });
3101
3101
  } finally {
3102
- j.value = !1;
3102
+ ne.value = !1;
3103
3103
  }
3104
3104
  }
3105
3105
  async function We() {
3106
- let e = E.value;
3107
- if (!(!e || oe.value || L.value)) {
3108
- ee.value = !0;
3106
+ let e = C.value;
3107
+ if (!(!e || se.value || I.value)) {
3108
+ re.value = !0;
3109
3109
  try {
3110
- let [t, n] = await Promise.all([u.permissionMatrix(p, [e]), u.dataScopePolicyCatalog(p, e)]), r = (t.modules[0]?.actions ?? []).map(et), i = v?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = ie.get(e) ?? i;
3111
- O.value = a ?? r, ie.has(e) || (ie.set(e, O.value), F.set(e, v?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), I.value += 1, A.value = n;
3110
+ let [t, n] = await Promise.all([l.permissionMatrix(f, [e]), l.dataScopePolicyCatalog(f, e)]), r = (t.modules[0]?.actions ?? []).map(et), i = _?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = N.get(e) ?? i;
3111
+ T.value = a ?? r, N.has(e) || (N.set(e, T.value), P.set(e, _?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, O.value = n;
3112
3112
  } catch (e) {
3113
- T(e, {
3113
+ u(e, {
3114
3114
  source: "role-authorization",
3115
3115
  phase: "load"
3116
3116
  });
3117
3117
  } finally {
3118
- ee.value = !1;
3118
+ re.value = !1;
3119
3119
  }
3120
3120
  }
3121
3121
  }
3122
3122
  function Ge(e, t) {
3123
- t && e.dataAuth && le.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, I.value += 1;
3123
+ t && e.dataAuth && ue.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, F.value += 1;
3124
3124
  }
3125
3125
  function Ke(e) {
3126
- O.value.forEach((t) => Ge(t, e));
3126
+ T.value.forEach((t) => Ge(t, e));
3127
3127
  }
3128
3128
  function qe(e, t) {
3129
3129
  if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
3130
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, I.value += 1;
3130
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3131
3131
  return;
3132
3132
  }
3133
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, I.value += 1;
3133
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3134
3134
  }
3135
3135
  function Je(e, t) {
3136
3136
  let n = Ce.value.get(String(t || ""));
3137
- e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, I.value += 1;
3137
+ e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, F.value += 1;
3138
3138
  }
3139
3139
  function Ye(e) {
3140
3140
  return Ce.value.get(String(e || ""));
@@ -3146,78 +3146,78 @@ var _r = { class: "panel-title" }, vr = {
3146
3146
  return e.dataScopePolicy ?? "inheritDataGrant";
3147
3147
  }
3148
3148
  function Qe(e) {
3149
- return !!e.dataAuth && le.value;
3149
+ return !!e.dataAuth && ue.value;
3150
3150
  }
3151
3151
  function $e(e, t) {
3152
3152
  return e.key === "dataScopePolicy" && Qe(t);
3153
3153
  }
3154
3154
  function et(e) {
3155
- return le.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3155
+ return ue.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3156
3156
  ...e,
3157
3157
  dataScopePolicy: "inheritDataGrant"
3158
3158
  } : e;
3159
3159
  }
3160
3160
  async function tt() {
3161
- if (k.value) {
3162
- M.value = !0;
3161
+ if (E.value) {
3162
+ A.value = !0;
3163
3163
  try {
3164
- let e = await u.replaceDataGrantActions(p, k.value.actions.map((e) => ({
3164
+ let e = await l.replaceDataGrantActions(f, E.value.actions.map((e) => ({
3165
3165
  actionCode: e.actionCode,
3166
3166
  dataScopePolicy: e.dataScopePolicy,
3167
3167
  enabled: e.configured
3168
3168
  })));
3169
- await f(e, {
3169
+ await te(e, {
3170
3170
  source: "role-authorization",
3171
3171
  phase: "action",
3172
3172
  fallbackMessage: "数据权限模板已保存"
3173
- }), ne.value = JSON.stringify(k.value.actions);
3173
+ }), M.value = JSON.stringify(E.value.actions);
3174
3174
  } catch (e) {
3175
- T(e, {
3175
+ u(e, {
3176
3176
  source: "role-authorization",
3177
3177
  phase: "action"
3178
3178
  });
3179
3179
  } finally {
3180
- M.value = !1;
3180
+ A.value = !1;
3181
3181
  }
3182
3182
  }
3183
3183
  }
3184
3184
  async function nt() {
3185
- let e = [...ie.entries()].filter(([e, t]) => F.get(e) !== JSON.stringify(t));
3185
+ let e = [...N.entries()].filter(([e, t]) => P.get(e) !== JSON.stringify(t));
3186
3186
  if (e.length) {
3187
- M.value = !0;
3187
+ A.value = !0;
3188
3188
  try {
3189
- let t = await u.replacePermissionMatrix(p, e.flatMap(([e, t]) => t.map((t) => ({
3189
+ let t = await l.replacePermissionMatrix(f, e.flatMap(([e, t]) => t.map((t) => ({
3190
3190
  moduleAlias: e,
3191
3191
  actionCode: t.actionCode,
3192
3192
  granted: !!t.granted,
3193
- dataScopePolicy: t.granted && t.dataAuth && le.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3193
+ dataScopePolicy: t.granted && t.dataAuth && ue.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3194
3194
  referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
3195
3195
  referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
3196
3196
  }))));
3197
- await f(t, {
3197
+ await te(t, {
3198
3198
  source: "role-authorization",
3199
3199
  phase: "action",
3200
3200
  fallbackMessage: "角色授权已保存"
3201
- }), e.forEach(([e, t]) => F.set(e, JSON.stringify(t))), I.value += 1;
3201
+ }), e.forEach(([e, t]) => P.set(e, JSON.stringify(t))), F.value += 1;
3202
3202
  } catch (e) {
3203
- T(e, {
3203
+ u(e, {
3204
3204
  source: "role-authorization",
3205
3205
  phase: "action"
3206
3206
  });
3207
3207
  } finally {
3208
- M.value = !1;
3208
+ A.value = !1;
3209
3209
  }
3210
3210
  }
3211
3211
  }
3212
3212
  async function rt() {
3213
- if (oe.value) {
3213
+ if (se.value) {
3214
3214
  await tt();
3215
3215
  return;
3216
3216
  }
3217
3217
  await nt();
3218
3218
  }
3219
3219
  async function it() {
3220
- return !$.value || s({
3220
+ return !$.value || b({
3221
3221
  title: "放弃未确认的授权配置",
3222
3222
  content: "当前修改尚未确认,关闭后将丢失这些修改。",
3223
3223
  okText: "放弃修改",
@@ -3231,14 +3231,14 @@ var _r = { class: "panel-title" }, vr = {
3231
3231
  ct();
3232
3232
  }
3233
3233
  function st(e) {
3234
- return !$.value && (E.value = e.selectedModuleAlias, k.value = e.dataGrantMatrix, ie.clear(), F.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => ie.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => F.set(e, t)), I.value += 1, !0);
3234
+ return !$.value && (C.value = e.selectedModuleAlias, E.value = e.dataGrantMatrix, N.clear(), P.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => N.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => P.set(e, t)), F.value += 1, !0);
3235
3235
  }
3236
3236
  function ct() {
3237
- if (n.drawer === !0) {
3238
- r("close");
3237
+ if (i.drawer === !0) {
3238
+ a("close");
3239
3239
  return;
3240
3240
  }
3241
- h?.dismiss();
3241
+ m?.dismiss();
3242
3242
  }
3243
3243
  function lt(e) {
3244
3244
  $.value && (e.preventDefault(), e.returnValue = "");
@@ -3246,57 +3246,57 @@ var _r = { class: "panel-title" }, vr = {
3246
3246
  function ut(e) {
3247
3247
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
3248
3248
  }
3249
- return (e, t) => (q(), B(we(Ne.value), ve(me(Fe.value)), fe({
3250
- default: Q(() => [U("section", { class: _e(["role-authorization-page", { "role-authorization-page--drawer": Ae.value || ue.value }]) }, [j.value ? (q(), B(X(re), {
3249
+ return (e, n) => (q(), B(we(Ne.value), ve(me(Fe.value)), fe({
3250
+ default: Q(() => [U("section", { class: _e(["role-authorization-page", { "role-authorization-page--drawer": Ae.value || de.value }]) }, [ne.value ? (q(), B(X(S), {
3251
3251
  key: 0,
3252
3252
  tip: "加载授权信息"
3253
- })) : P.value ? (q(), B(X(m), {
3253
+ })) : j.value ? (q(), B(X(y), {
3254
3254
  key: 1,
3255
3255
  title: "授权页加载失败",
3256
- message: P.value
3257
- }, null, 8, ["message"])) : L.value ? (q(), B(X(_), {
3256
+ message: j.value
3257
+ }, null, 8, ["message"])) : I.value ? (q(), B(X(c), {
3258
3258
  key: 2,
3259
3259
  title: "角色组不独立授权",
3260
3260
  description: "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。"
3261
- })) : oe.value && k.value ? (q(), B(X(o), {
3261
+ })) : se.value && E.value ? (q(), B(X(r), {
3262
3262
  key: 3,
3263
3263
  class: "data-grant-content",
3264
- title: Me.value ? "数据权限模板" : `数据权限模板 - ${de.value}`,
3264
+ title: Me.value ? "数据权限模板" : `数据权限模板 - ${L.value}`,
3265
3265
  searchable: !1,
3266
3266
  onRefresh: Ue
3267
3267
  }, {
3268
- default: Q(() => [U("header", _r, [t[4] ||= U("div", null, [U("h3", null, "标准动作的数据范围模板"), U("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), je.value ? V("v-if", !0) : (q(), B(X(S), {
3268
+ default: Q(() => [U("header", _r, [n[4] ||= U("div", null, [U("h3", null, "标准动作的数据范围模板"), U("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), je.value ? V("v-if", !0) : (q(), B(X(D), {
3269
3269
  key: 0,
3270
3270
  type: "primary",
3271
3271
  disabled: !$.value,
3272
- loading: M.value,
3272
+ loading: A.value,
3273
3273
  onClick: rt
3274
3274
  }, {
3275
- default: Q(() => [...t[3] ||= [W(" 确认 ", -1)]]),
3275
+ default: Q(() => [...n[3] ||= [W(" 确认 ", -1)]]),
3276
3276
  _: 1
3277
- }, 8, ["disabled", "loading"]))]), G(X(a), {
3277
+ }, 8, ["disabled", "loading"]))]), G(X(k), {
3278
3278
  columns: De,
3279
3279
  rows: ke.value,
3280
3280
  "row-key": "actionCode",
3281
3281
  "horizontal-scroll": ""
3282
3282
  }, {
3283
- cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(t.title || t.actionCode), 1), U("small", null, Y(t.actionCode), 1)], 64)) : e.key === "configured" ? (q(), B(X(c), {
3283
+ cell: Q(({ column: e, record: n }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(n.title || n.actionCode), 1), U("small", null, Y(n.actionCode), 1)], 64)) : e.key === "configured" ? (q(), B(X(t), {
3284
3284
  key: 1,
3285
- checked: !!t.configured,
3286
- disabled: M.value,
3287
- onChange: (e) => t.configured = e
3285
+ checked: !!n.configured,
3286
+ disabled: A.value,
3287
+ onChange: (e) => n.configured = e
3288
3288
  }, null, 8, [
3289
3289
  "checked",
3290
3290
  "disabled",
3291
3291
  "onChange"
3292
- ])) : (q(), B(X(N), {
3292
+ ])) : (q(), B(X(ee), {
3293
3293
  key: 2,
3294
- value: t.dataScopePolicy,
3294
+ value: n.dataScopePolicy,
3295
3295
  options: xe.value,
3296
- disabled: !t.configured || M.value,
3296
+ disabled: !n.configured || A.value,
3297
3297
  placeholder: "请选择数据范围",
3298
3298
  "allow-clear": !1,
3299
- "onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
3299
+ "onUpdate:value": (e) => n.dataScopePolicy = String(e || "")
3300
3300
  }, null, 8, [
3301
3301
  "value",
3302
3302
  "options",
@@ -3309,30 +3309,30 @@ var _r = { class: "panel-title" }, vr = {
3309
3309
  }, 8, ["title"])) : (q(), H("section", {
3310
3310
  key: 4,
3311
3311
  class: _e(["authorization-layout", { "authorization-layout--compact-actions": !Te.value }])
3312
- }, [G(X(o), {
3313
- "search-keyword": D.value,
3314
- "onUpdate:searchKeyword": t[1] ||= (e) => D.value = e,
3312
+ }, [G(X(r), {
3313
+ "search-keyword": w.value,
3314
+ "onUpdate:searchKeyword": n[1] ||= (e) => w.value = e,
3315
3315
  class: "module-panel",
3316
3316
  title: "模块树",
3317
3317
  "refresh-title": "刷新模块目录",
3318
3318
  "search-placeholder": "搜索模块名称或别名",
3319
3319
  onRefresh: Ue
3320
3320
  }, {
3321
- default: Q(() => [G(X(te), {
3321
+ default: Q(() => [G(X(ae), {
3322
3322
  records: ge.value,
3323
- "selected-id": E.value,
3324
- onSelect: t[0] ||= (e) => E.value = e.id
3323
+ "selected-id": C.value,
3324
+ onSelect: n[0] ||= (e) => C.value = e.id
3325
3325
  }, null, 8, ["records", "selected-id"])]),
3326
3326
  _: 1
3327
- }, 8, ["search-keyword"]), G(X(o), {
3327
+ }, 8, ["search-keyword"]), G(X(r), {
3328
3328
  class: "action-panel",
3329
3329
  title: K.value,
3330
3330
  searchable: !1
3331
3331
  }, fe({
3332
- default: Q(() => [ee.value ? (q(), B(X(re), {
3332
+ default: Q(() => [re.value ? (q(), B(X(S), {
3333
3333
  key: 0,
3334
3334
  tip: "加载模块动作"
3335
- })) : E.value ? (q(), B(X(a), {
3335
+ })) : C.value ? (q(), B(X(k), {
3336
3336
  key: 2,
3337
3337
  columns: Ee.value,
3338
3338
  rows: Oe.value,
@@ -3340,30 +3340,30 @@ var _r = { class: "panel-title" }, vr = {
3340
3340
  "fill-height": "",
3341
3341
  "horizontal-scroll": ""
3342
3342
  }, {
3343
- header: Q(({ column: e }) => [e.key === "granted" ? (q(), H("span", vr, [G(X(x), {
3343
+ header: Q(({ column: e }) => [e.key === "granted" ? (q(), H("span", vr, [G(X(ie), {
3344
3344
  checked: Re.value,
3345
3345
  indeterminate: ze.value,
3346
- disabled: M.value || !O.value.length,
3346
+ disabled: A.value || !T.value.length,
3347
3347
  "aria-label": "全选当前模块动作授权",
3348
3348
  onChange: Ke
3349
3349
  }, null, 8, [
3350
3350
  "checked",
3351
3351
  "indeterminate",
3352
3352
  "disabled"
3353
- ]), t[6] ||= W(" 授权 ", -1)])) : (q(), H(R, { key: 1 }, [W(Y(e.title), 1)], 64))]),
3354
- cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(t.title || t.actionCode), 1), U("small", null, Y(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (q(), B(X(x), {
3353
+ ]), n[6] ||= W(" 授权 ", -1)])) : (q(), H(R, { key: 1 }, [W(Y(e.title), 1)], 64))]),
3354
+ cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(t.title || t.actionCode), 1), U("small", null, Y(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (q(), B(X(ie), {
3355
3355
  key: 1,
3356
3356
  checked: !!t.granted,
3357
- disabled: M.value,
3357
+ disabled: A.value,
3358
3358
  onChange: (e) => Ge(t, e)
3359
3359
  }, null, 8, [
3360
3360
  "checked",
3361
3361
  "disabled",
3362
3362
  "onChange"
3363
- ])) : t.dataAuth && le.value && t.granted ? (q(), H("div", yr, [G(X(N), {
3363
+ ])) : t.dataAuth && ue.value && t.granted ? (q(), H("div", yr, [G(X(ee), {
3364
3364
  value: Ze(t),
3365
3365
  options: xe.value,
3366
- disabled: M.value,
3366
+ disabled: A.value,
3367
3367
  "allow-clear": !1,
3368
3368
  "onUpdate:value": (e) => qe(t, e)
3369
3369
  }, null, 8, [
@@ -3371,10 +3371,10 @@ var _r = { class: "panel-title" }, vr = {
3371
3371
  "options",
3372
3372
  "disabled",
3373
3373
  "onUpdate:value"
3374
- ]), t.dataScopePolicy === "referenceDependency" ? (q(), H(R, { key: 0 }, [G(X(N), {
3374
+ ]), t.dataScopePolicy === "referenceDependency" ? (q(), H(R, { key: 0 }, [G(X(ee), {
3375
3375
  value: Xe(t.referenceFieldId),
3376
3376
  options: Se.value,
3377
- disabled: M.value,
3377
+ disabled: A.value,
3378
3378
  placeholder: "请选择引用字段",
3379
3379
  "allow-clear": !1,
3380
3380
  "onUpdate:value": (e) => Je(t, e)
@@ -3385,40 +3385,40 @@ var _r = { class: "panel-title" }, vr = {
3385
3385
  "onUpdate:value"
3386
3386
  ]), t.referenceFieldId ? (q(), H("small", br, " 依赖目标:" + Y(Ye(t.referenceFieldId)?.targetModuleTitle) + " · " + Y(Ye(t.referenceFieldId)?.referenceActionTitle), 1)) : (q(), H("small", xr, "请先选择引用字段,再开启该动作授权。"))], 64)) : V("v-if", !0)])) : $e(e, t) ? (q(), H("span", Sr, "—")) : (q(), H("span", Cr, "不适用"))]),
3387
3387
  _: 1
3388
- }, 8, ["columns", "rows"])) : (q(), B(X(_), {
3388
+ }, 8, ["columns", "rows"])) : (q(), B(X(c), {
3389
3389
  key: 1,
3390
3390
  title: "请选择模块"
3391
3391
  }))]),
3392
3392
  _: 2
3393
3393
  }, [je.value ? void 0 : {
3394
3394
  name: "actions",
3395
- fn: Q(() => [G(X(S), {
3395
+ fn: Q(() => [G(X(D), {
3396
3396
  type: "primary",
3397
3397
  disabled: !$.value,
3398
- loading: M.value,
3398
+ loading: A.value,
3399
3399
  onClick: rt
3400
3400
  }, {
3401
- default: Q(() => [...t[5] ||= [W(" 确认 ", -1)]]),
3401
+ default: Q(() => [...n[5] ||= [W(" 确认 ", -1)]]),
3402
3402
  _: 1
3403
3403
  }, 8, ["disabled", "loading"])]),
3404
3404
  key: "0"
3405
3405
  }]), 1032, ["title"])], 2))], 2)]),
3406
3406
  _: 2
3407
- }, [Me.value && !L.value ? {
3407
+ }, [Me.value && !I.value ? {
3408
3408
  name: "operation",
3409
- fn: Q(() => [G(X(S), {
3409
+ fn: Q(() => [G(X(D), {
3410
3410
  type: "primary",
3411
3411
  disabled: !$.value,
3412
- loading: M.value,
3412
+ loading: A.value,
3413
3413
  onClick: rt
3414
3414
  }, {
3415
- default: Q(() => [...t[2] ||= [W(" 确认 ", -1)]]),
3415
+ default: Q(() => [...n[2] ||= [W(" 确认 ", -1)]]),
3416
3416
  _: 1
3417
3417
  }, 8, ["disabled", "loading"])]),
3418
3418
  key: "0"
3419
3419
  } : void 0]), 1040));
3420
3420
  }
3421
- }), Tr = /* @__PURE__ */ e({ default: () => Er }), Er = /*#__PURE__*/ j(wr, [["__scopeId", "data-v-ee79d1ea"]]), Dr = { class: "role-authorization-drawer-surface" }, Or = /*#__PURE__*/ j(/* @__PURE__ */ K({
3421
+ }), Tr = /* @__PURE__ */ e({ default: () => Er }), Er = /*#__PURE__*/ M(wr, [["__scopeId", "data-v-ee79d1ea"]]), Dr = { class: "role-authorization-drawer-surface" }, Or = /*#__PURE__*/ M(/* @__PURE__ */ K({
3422
3422
  name: "RoleAuthorizationDrawerSurface",
3423
3423
  __name: "RoleAuthorizationDrawerSurface",
3424
3424
  props: { context: {} },
@@ -3466,7 +3466,7 @@ var _r = { class: "panel-title" }, vr = {
3466
3466
  form: {
3467
3467
  contributions: [{
3468
3468
  key: "role-group-members",
3469
- component: /* @__PURE__ */ j(/* @__PURE__ */ K({
3469
+ component: /* @__PURE__ */ M(/* @__PURE__ */ K({
3470
3470
  name: "RoleGroupMemberFormField",
3471
3471
  __name: "RoleGroupMemberFormField",
3472
3472
  props: { context: {} },
@@ -3530,7 +3530,7 @@ var _r = { class: "panel-title" }, vr = {
3530
3530
  function d(e) {
3531
3531
  return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
3532
3532
  }
3533
- return (t, n) => i.value ? (q(), H("label", kr, [n[0] ||= U("span", null, "成员角色", -1), G(X(N), {
3533
+ return (t, n) => i.value ? (q(), H("label", kr, [n[0] ||= U("span", null, "成员角色", -1), G(X(ee), {
3534
3534
  mode: "multiple",
3535
3535
  value: a.value,
3536
3536
  options: c.value,
@@ -3609,7 +3609,7 @@ var _r = { class: "panel-title" }, vr = {
3609
3609
  }
3610
3610
  ]
3611
3611
  };
3612
- I("platform-admin-runtime", Fe), ae("platform-admin-runtime", [
3612
+ F("platform-admin-runtime", Fe), oe("platform-admin-runtime", [
3613
3613
  et,
3614
3614
  tt,
3615
3615
  nt,