@ximatai/muyun-web-app 0.26.18 → 0.26.19

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 (61) hide show
  1. package/dist/{BusinessActivityLogView-CNW817Sf.js → BusinessActivityLogView-DudCmeKP.js} +2 -2
  2. package/dist/BusinessLogListDrawer-CVUvUG48.js +864 -0
  3. package/dist/{CodeConfigurationView-DU8tjPMt.js → CodeConfigurationView-ZjVgaZkD.js} +450 -450
  4. package/dist/{ConfigurationTranslationView-CbBt5s1q.js → ConfigurationTranslationView-Dl757QMl.js} +38 -38
  5. package/dist/{LoginAuditLogView-CZF1Jfq_.js → LoginAuditLogView-Cj3PMvN5.js} +2 -2
  6. package/dist/ModuleActionManagementView-BuhQrVA3.js +755 -0
  7. package/dist/{ModuleGovernanceView-CcwGyO3x.js → ModuleGovernanceView-C3RxdgQN.js} +2243 -2243
  8. package/dist/{RequestErrorLogView-DpudZrC2.js → RequestErrorLogView-tmjMOeLE.js} +2 -2
  9. package/dist/{RoleDetailWorkspaceView-DNMGsAJC.js → RoleDetailWorkspaceView-OhpBChaT.js} +518 -518
  10. package/dist/{RuntimeLogView-444BL_xs.js → RuntimeLogView-BkkgHcF0.js} +64 -64
  11. package/dist/{WorkflowAdministrationView-C-VIjvwB.js → WorkflowAdministrationView-DOhA_5-M.js} +139 -139
  12. package/dist/WorkflowConfigurationView-Bnjdrkdx.js +980 -0
  13. package/dist/{WorkflowWorkbenchView-Gr02dbBc.js → WorkflowWorkbenchView-Cf6yiofx.js} +222 -222
  14. package/dist/{codeConfiguration-ChJ6ktRR.js → codeConfiguration-DERwCY-U.js} +44 -44
  15. package/dist/index.css +1 -1
  16. package/dist/index.js +421 -430
  17. package/dist/moduleMenuWorkspace-DPmYGkS_.js +626 -0
  18. package/dist/platform-components-wRXbnwMr.js +30434 -0
  19. package/dist/{platform-workbench-BhZPARiH.js → platform-workbench-Cm_0kmTT.js} +5169 -5149
  20. package/dist/types/app/executeBusinessNotificationRecordAction.d.ts +7 -0
  21. package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +1 -0
  22. package/dist/types/dynamic-page-runtime/modulePageEnhancementState.d.ts +5 -0
  23. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +4 -0
  24. package/dist/types/platform-admin-runtime/workflow/ModuleWorkflowDrawer.vue.d.ts +7 -0
  25. package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +5 -3
  26. package/dist/types/platform-components/FormulaExpressionEditor.vue.d.ts +5 -0
  27. package/dist/types/platform-components/RecordAdaptiveDetailPanel.vue.d.ts +28 -0
  28. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +4 -0
  29. package/dist/types/platform-components/WorkflowBusinessTaskEditor.vue.d.ts +2 -0
  30. package/dist/types/platform-components/WorkflowDesignProperties.vue.d.ts +2 -6
  31. package/dist/types/platform-components/WorkflowDiagram.vue.d.ts +32 -1
  32. package/dist/types/platform-components/formulaExpressionTokens.d.ts +2 -0
  33. package/dist/types/platform-components/formulaExpressionTools.d.ts +6 -0
  34. package/dist/types/platform-components/index.d.ts +3 -0
  35. package/dist/types/platform-components/useWorkflowDesignHistory.d.ts +14 -0
  36. package/dist/types/platform-components/useWorkspaceDetailSurface.d.ts +3 -0
  37. package/dist/types/platform-components/workflowDesignClipboard.d.ts +7 -0
  38. package/dist/types/platform-components/workflowPresentation.d.ts +4 -0
  39. package/dist/types/views/WorkflowConfigurationView.vue.d.ts +1 -0
  40. package/dist/types/views/WorkflowDefinitionSettings.vue.d.ts +35 -0
  41. package/dist/types/views/WorkflowSelectionFields.vue.d.ts +2 -4
  42. package/dist/types/views/useWorkflowConfigurationContext.d.ts +49 -0
  43. package/dist/types/views/workflowConfigurationWorkspaceView.d.ts +2 -0
  44. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  45. package/dist/types/vue-ui-antdv/components/UiRadioGroup.vue.d.ts +4 -0
  46. package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +5 -0
  47. package/dist/types/vue-ui-antdv/index.d.ts +1 -0
  48. package/dist/types/vue-ui-antdv/overlayLayers.d.ts +5 -0
  49. package/dist/types/vue-ui-antdv/types.d.ts +2 -0
  50. package/dist/types/web-contracts/index.d.ts +4 -0
  51. package/dist/types/web-contracts/workflow.d.ts +16 -8
  52. package/dist/types/web-core/businessNotifications.d.ts +3 -1
  53. package/dist/types/web-core/workflow.d.ts +13 -1
  54. package/dist/useWorkflowConfigurationContext-BE_UjKgk.js +66 -0
  55. package/dist/{workspaceViews-DeBqozVb.js → workspaceViews-D37OpJ7g.js} +1516 -936
  56. package/package.json +1 -1
  57. package/dist/BusinessLogListDrawer-YiJxOlnD.js +0 -864
  58. package/dist/ModuleActionManagementView-CaiXH1l_.js +0 -755
  59. package/dist/WorkflowConfigurationView-DLFY2x7V.js +0 -1110
  60. package/dist/moduleMenuWorkspace-B8DKwC3L.js +0 -626
  61. package/dist/platform-components-5AE0j2_3.js +0 -29879
@@ -1,15 +1,16 @@
1
1
  import { n as e } from "./rolldown-runtime-BAC7EHh5.js";
2
- import { M as t, T as n, d as r, j as i, lt as a, m as o, ut as s, x as c, y as l } from "./platform-workbench-BhZPARiH.js";
3
- import { $ as u, $i as d, $n as f, An as p, Cn as m, D as h, Dn as g, Fa as _, Fr as v, Hn as y, Ia as b, Ir as x, Kn as S, L as C, Ma as w, Na as T, Nn as E, Nt as D, On as O, Qi as ee, Sa as te, Sn as ne, T as re, U as ie, Xn as k, Yn as ae, Zi as oe, Zn as se, bn as ce, ea as A, et as le, ga as ue, kn as j, ln as de, on as fe, pa as M, sn as N, tr as P, ua as F, va as pe, xa as me, xn as he, yr as ge, z as _e } from "./platform-components-5AE0j2_3.js";
4
- import { d as ve, m as ye, p as be } from "./codeConfiguration-ChJ6ktRR.js";
5
- import { a as xe, i as Se, o as Ce, r as we, s as Te, t as Ee } from "./moduleMenuWorkspace-B8DKwC3L.js";
6
- import { Fragment as I, computed as L, createBlock as R, createCommentVNode as z, createElementBlock as B, createElementVNode as V, createSlots as De, createTextVNode as H, createVNode as U, defineAsyncComponent as W, defineComponent as G, guardReactiveProps as Oe, mergeProps as ke, nextTick as Ae, normalizeClass as je, normalizeProps as Me, onBeforeUnmount as Ne, onMounted as Pe, onScopeDispose as Fe, onUnmounted as Ie, openBlock as K, ref as q, renderList as Le, renderSlot as Re, resolveDynamicComponent as ze, shallowRef as Be, toDisplayString as J, toRaw as Ve, toValue as He, unref as Y, watch as X, withCtx as Z, withKeys as Ue, withModifiers as We } from "vue";
2
+ import { E as t, M as n, T as r, d as i, j as a, lt as o, m as s, ut as c, x as l, y as u } from "./platform-workbench-Cm_0kmTT.js";
3
+ import { $n as d, Br as f, Cn as p, Cr as m, D as h, Da as g, En as _, Ft as ee, G as v, Ha as y, Hn as b, Kn as x, Ln as S, Mn as C, Nn as w, Oa as T, Pn as E, Ra as D, Sa as O, Tn as te, V as k, Va as A, W as j, Wn as ne, Xn as M, aa as N, ar as P, en as F, er as re, fn as I, ga as ie, ia as ae, jn as oe, k as se, ln as ce, m as le, nr as ue, nt as de, oa as fe, on as pe, ot as me, ra as he, rr as L, tr as ge, tt as _e, un as R, vn as ve, wa as ye, wn as be, ya as xe, z as Se, za as Ce, zr as we, zt as Te } from "./platform-components-wRXbnwMr.js";
4
+ import { d as Ee, m as De, p as Oe } from "./codeConfiguration-DERwCY-U.js";
5
+ import { a as ke, i as Ae, o as je, r as Me, s as Ne, t as Pe } from "./moduleMenuWorkspace-DPmYGkS_.js";
6
+ import { t as Fe } from "./useWorkflowConfigurationContext-BE_UjKgk.js";
7
+ import { Fragment as z, computed as B, createBlock as V, createCommentVNode as H, createElementBlock as U, createElementVNode as W, createSlots as Ie, createTextVNode as G, createVNode as K, defineAsyncComponent as Le, defineComponent as q, guardReactiveProps as Re, mergeModels as ze, mergeProps as Be, nextTick as Ve, normalizeClass as He, normalizeProps as Ue, onActivated as We, onBeforeUnmount as Ge, onMounted as Ke, onScopeDispose as qe, onUnmounted as Je, openBlock as J, ref as Y, renderList as Ye, renderSlot as Xe, resolveDynamicComponent as Ze, shallowRef as Qe, toDisplayString as X, toRaw as $e, toValue as et, unref as Z, useModel as tt, watch as Q, withCtx as $, withKeys as nt, withModifiers as rt } from "vue";
7
8
  //#region src/views/codeConfigurationWorkspaceView.ts
8
- var Ge = ye({
9
+ var it = De({
9
10
  type: "platform.code.configuration",
10
11
  route: "/_platform/workspace/platform.code.configuration",
11
12
  moduleAlias: "platform.code_rule",
12
- component: W(() => import("./CodeConfigurationView-DU8tjPMt.js").then((e) => e.n)),
13
+ component: Le(() => import("./CodeConfigurationView-ZjVgaZkD.js").then((e) => e.n)),
13
14
  layout: "workspace",
14
15
  routeTitle: "业务编码",
15
16
  routeTitleKey: "platform.code.config.title",
@@ -25,15 +26,15 @@ var Ge = ye({
25
26
  ...typeof e.moduleTitle == "string" && e.moduleTitle ? { moduleTitle: e.moduleTitle } : {}
26
27
  };
27
28
  }
28
- }), Q = /* @__PURE__ */ new Set([
29
+ }), at = /* @__PURE__ */ new Set([
29
30
  "platform",
30
31
  "tenant",
31
32
  "organization"
32
- ]), Ke = ye({
33
+ ]), ot = De({
33
34
  type: "iam.role.detail",
34
35
  route: "/iam/role",
35
36
  moduleAlias: "iam.role",
36
- component: W(() => import("./RoleDetailWorkspaceView-DNMGsAJC.js")),
37
+ component: Le(() => import("./RoleDetailWorkspaceView-OhpBChaT.js")),
37
38
  layout: "workspace",
38
39
  routeTitle: "角色管理",
39
40
  routeTitleKey: "platform.workspace-view.roles.route-title",
@@ -48,17 +49,17 @@ var Ge = ye({
48
49
  },
49
50
  parse(e) {
50
51
  let t = e.recordId, n = e.scopeKind, r = e.scopeId;
51
- if (!(typeof t != "string" || !t || typeof n != "string" || !Q.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
52
+ if (!(typeof t != "string" || !t || typeof n != "string" || !at.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
52
53
  recordId: t,
53
54
  scopeKind: n,
54
55
  ...typeof r == "string" ? { scopeId: r } : {}
55
56
  };
56
57
  }
57
- }), qe = ye({
58
+ }), st = De({
58
59
  type: "iam.role.authorization",
59
60
  route: "/iam/role/authorization",
60
61
  moduleAlias: "iam.role",
61
- component: W(() => Promise.resolve().then(() => or)),
62
+ component: Le(() => Promise.resolve().then(() => Rr)),
62
63
  layout: "workspace",
63
64
  routeTitle: "角色授权",
64
65
  routeTitleKey: "platform.workspace-view.role-authorization.route-title",
@@ -70,15 +71,15 @@ var Ge = ye({
70
71
  let t = e.roleId;
71
72
  return typeof t == "string" && t ? { roleId: t } : void 0;
72
73
  }
73
- }), Je = [
74
- Ge,
75
- Ke,
76
- qe
77
- ], Ye = ye({
74
+ }), ct = [
75
+ it,
76
+ ot,
77
+ st
78
+ ], lt = De({
78
79
  type: "platform.module.actions",
79
80
  route: "/_platform/workspace/platform.module.actions",
80
81
  moduleAlias: "platform.module",
81
- component: W(() => import("./ModuleActionManagementView-CaiXH1l_.js").then((e) => e.n)),
82
+ component: Le(() => import("./ModuleActionManagementView-BuhQrVA3.js").then((e) => e.n)),
82
83
  layout: "workspace",
83
84
  routeTitle: "模块管理",
84
85
  routeTitleKey: "platform.workspace-view.modules.route-title",
@@ -95,110 +96,687 @@ var Ge = ye({
95
96
  ...e.moduleKind === "static" || e.moduleKind === "dynamic" ? { moduleKind: e.moduleKind } : {}
96
97
  };
97
98
  }
98
- }), Xe = ye({
99
+ }), ut = De({
99
100
  type: "platform.module.workflows",
100
101
  route: "/_platform/workspace/platform.module.workflows",
101
102
  moduleAlias: "platform.module",
102
- component: W(() => import("./WorkflowConfigurationView-DLFY2x7V.js")),
103
+ component: Le(() => import("./WorkflowConfigurationView-Bnjdrkdx.js")),
103
104
  layout: "workspace",
104
105
  routeTitle: "模块管理",
105
106
  routeTitleKey: "platform.workspace-view.modules.route-title",
106
107
  presentations: ["tab"],
107
- titleArgsOf: (e) => ({ module: e.moduleTitle ?? e.moduleAlias }),
108
- titleKey: "platform.workspace-view.workflow.title",
109
- titleOf: (e) => `审批流程:${e.moduleTitle ?? e.moduleAlias}`,
108
+ tabIdentityParamsOf: (e) => ({
109
+ moduleAlias: e.moduleAlias,
110
+ definitionId: e.definitionId
111
+ }),
112
+ titleArgsOf: (e) => ({ workflow: e.definitionTitle ?? e.definitionId }),
113
+ titleKey: "platform.workspace-view.workflow.design-title",
114
+ titleOf: (e) => `流程编排:${e.definitionTitle ?? e.definitionId}`,
110
115
  parentRouteQueryOf: () => ({}),
111
116
  parse(e) {
112
- if (typeof e.moduleAlias == "string" && e.moduleAlias) return {
117
+ if (typeof e.moduleAlias == "string" && e.moduleAlias && typeof e.definitionId == "string" && e.definitionId) return {
113
118
  moduleAlias: e.moduleAlias,
119
+ definitionId: e.definitionId,
120
+ ...typeof e.definitionTitle == "string" ? { definitionTitle: e.definitionTitle } : {},
114
121
  ...typeof e.moduleTitle == "string" ? { moduleTitle: e.moduleTitle } : {}
115
122
  };
116
123
  }
117
- }), Ze = /* @__PURE__ */ G({
124
+ }), dt = /* @__PURE__ */ q({
118
125
  __name: "ModuleMenuDrawer",
119
126
  props: { context: {} },
120
127
  setup(e) {
121
- let t = b(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = o(), a = Ee(), s = a?.language ?? t, c = l(), u = () => JSON.stringify([
128
+ let t = y(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = s(), a = Pe(), o = a?.language ?? t, c = u(), l = () => JSON.stringify([
122
129
  c?.value?.userId,
123
130
  c?.value?.tenantId,
124
131
  c?.value?.organizationId,
125
132
  c?.value?.system
126
- ]), d = u(), f = !0, p = a?.session(r) ?? we(Ce(n.context.module.http), r, {
127
- valid: () => f && !!c?.value?.userId && u() === d,
133
+ ]), d = l(), f = !0, p = a?.session(r) ?? Me(je(n.context.module.http), r, {
134
+ valid: () => f && !!c?.value?.userId && l() === d,
128
135
  active: () => f
129
- }, Se(d, r, () => !!c?.value?.userId && u() === d, void 0, void 0, s), i?.refreshMenus, s), m = q();
130
- return a?.focus(p), a?.showEditor(p), p.ready.value || p.load(), X([
136
+ }, Ae(d, r, () => !!c?.value?.userId && l() === d, void 0, void 0, o), i?.refreshMenus, o), m = Y();
137
+ return a?.focus(p), a?.showEditor(p), p.ready.value || p.load(), Q([
131
138
  p.canSave,
132
139
  p.saving,
133
140
  p.saved,
134
141
  p.resultUnknown,
135
- s.revision
142
+ o.revision
136
143
  ], () => {
137
- n.context.setCloseBlocked(p.saving.value), n.context.setTitleActions(p.saved.value || p.resultUnknown.value ? [] : [{
144
+ n.context.setCloseBlocked(p.saving.value), n.context.setOperation(p.saved.value || p.resultUnknown.value ? void 0 : { actions: [{
138
145
  key: "add-menu",
139
- label: s.t("platform.screen.ModuleMenuDrawer.add", "添加"),
146
+ label: o.t("platform.screen.ModuleMenuDrawer.add", "添加"),
140
147
  emphasis: "primary",
141
148
  disabled: !p.canSave.value,
142
149
  loading: p.saving.value,
143
150
  run: () => m.value?.save()
144
- }]);
145
- }, { immediate: !0 }), X(p.saved, (e) => {
151
+ }] });
152
+ }, { immediate: !0 }), Q(p.saved, (e) => {
146
153
  e && n.context.refreshDetailExtensions();
147
- }), Ne(() => {
154
+ }), Ge(() => {
148
155
  f = !1, a?.hideEditor(p), a || p.dispose();
149
- }), (t, n) => (K(), R(xe, {
156
+ }), (t, n) => (J(), V(ke, {
150
157
  ref_key: "editor",
151
158
  ref: m,
152
- session: Y(p),
159
+ session: Z(p),
153
160
  onOpened: n[0] ||= (t) => e.context.close()
154
161
  }, null, 8, ["session"]));
155
162
  }
156
- }), Qe = { class: "module-menu-entries" }, $e = { key: 0 }, et = {
163
+ }), ft = { class: "workflow-selection-fields" }, pt = { class: "workflow-field settings-wide" }, mt = { class: "settings-help" }, ht = { class: "workflow-field settings-wide" }, gt = { class: "settings-wide workflow-field" }, _t = { class: "settings-help" }, vt = /*#__PURE__*/ P(/* @__PURE__ */ q({
164
+ name: "WorkflowSelectionFields",
165
+ __name: "WorkflowSelectionFields",
166
+ props: /*@__PURE__*/ ze({
167
+ organizationContext: {},
168
+ fields: {},
169
+ disabled: { type: Boolean },
170
+ conditionTools: {}
171
+ }, {
172
+ organizationId: { required: !0 },
173
+ organizationIdModifiers: {},
174
+ matchExpression: { required: !0 },
175
+ matchExpressionModifiers: {},
176
+ fallback: {
177
+ type: Boolean,
178
+ required: !0
179
+ },
180
+ fallbackModifiers: {}
181
+ }),
182
+ emits: [
183
+ "update:organizationId",
184
+ "update:matchExpression",
185
+ "update:fallback"
186
+ ],
187
+ setup(e) {
188
+ let t = y(), n = e, r = tt(e, "organizationId"), i = tt(e, "matchExpression"), a = tt(e, "fallback");
189
+ return (o, s) => (J(), U("div", ft, [
190
+ W("label", pt, [
191
+ G(X(Z(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
192
+ n.organizationContext ? (J(), V(Z(de), {
193
+ key: 0,
194
+ placeholder: Z(t).t("platform.workflow-config.organization-placeholder", "全部组织(可选指定组织)"),
195
+ value: r.value || void 0,
196
+ context: n.organizationContext,
197
+ disabled: n.disabled,
198
+ mode: "tree",
199
+ "onUpdate:value": s[0] ||= (e) => r.value = e ?? ""
200
+ }, null, 8, [
201
+ "placeholder",
202
+ "value",
203
+ "context",
204
+ "disabled"
205
+ ])) : (J(), V(Z(M), {
206
+ key: 1,
207
+ value: r.value || Z(t).t("platform.workflow-config.all-organizations", "模块内全部组织"),
208
+ disabled: ""
209
+ }, null, 8, ["value"])),
210
+ W("small", mt, X(n.organizationContext ? Z(t).t("platform.workflow-config.organization-help", "留空适用于全部组织;指定组织后包含其下级组织。") : Z(t).t("platform.workflow-config.global-scope-help", "当前为全局流程模板,适用于全部组织;组织选择需使用租户身份。")), 1)
211
+ ]),
212
+ W("div", ht, [W("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), K(Z(ve), {
213
+ disabled: n.disabled || a.value,
214
+ value: i.value,
215
+ "onUpdate:value": s[1] ||= (e) => i.value = e,
216
+ fields: n.fields,
217
+ tools: e.conditionTools,
218
+ "boolean-result": "",
219
+ placeholder: Z(t).t("platform.screen.WorkflowConfigurationView.leave-empty-to-match-all-records", "留空匹配所有记录")
220
+ }, null, 8, [
221
+ "disabled",
222
+ "value",
223
+ "fields",
224
+ "tools",
225
+ "placeholder"
226
+ ])]),
227
+ W("div", gt, [K(Z(re), {
228
+ disabled: n.disabled,
229
+ checked: a.value,
230
+ "onUpdate:checked": s[2] ||= (e) => a.value = e
231
+ }, {
232
+ default: $(() => [G(X(Z(t).t("platform.screen.WorkflowConfigurationView.use-as-the-fallback-workflow-for-this", "作为当前组织范围的兜底流程")), 1)]),
233
+ _: 1
234
+ }, 8, ["disabled", "checked"]), W("small", _t, X(Z(t).t("platform.workflow-config.fallback-help", "同一组织范围内无普通流程命中时使用;兜底流程不判断匹配条件。")), 1)])
235
+ ]));
236
+ }
237
+ }), [["__scopeId", "data-v-eecb79d1"]]), yt = {
238
+ key: 0,
239
+ class: "settings-help"
240
+ }, bt = { class: "workflow-field" }, xt = {
241
+ key: 1,
242
+ class: "settings-wide workflow-approval-setting"
243
+ }, St = {
244
+ key: 2,
245
+ class: "workflow-field settings-wide"
246
+ }, Ct = { class: "settings-help" }, wt = ["open"], Tt = /*#__PURE__*/ P(/* @__PURE__ */ q({
247
+ __name: "WorkflowDefinitionSettings",
248
+ props: /*@__PURE__*/ ze({
249
+ configuration: {},
250
+ creating: { type: Boolean },
251
+ busy: { type: Boolean },
252
+ actionCodeLocked: { type: Boolean }
253
+ }, {
254
+ title: { required: !0 },
255
+ titleModifiers: {},
256
+ approvalEnabled: {
257
+ type: Boolean,
258
+ required: !0
259
+ },
260
+ approvalEnabledModifiers: {},
261
+ actionCode: { required: !0 },
262
+ actionCodeModifiers: {},
263
+ organizationId: { required: !0 },
264
+ organizationIdModifiers: {},
265
+ matchExpression: { required: !0 },
266
+ matchExpressionModifiers: {},
267
+ fallback: {
268
+ type: Boolean,
269
+ required: !0
270
+ },
271
+ fallbackModifiers: {}
272
+ }),
273
+ emits: /*@__PURE__*/ ze(["submit"], [
274
+ "update:title",
275
+ "update:approvalEnabled",
276
+ "update:actionCode",
277
+ "update:organizationId",
278
+ "update:matchExpression",
279
+ "update:fallback"
280
+ ]),
281
+ setup(e, { emit: t }) {
282
+ let { language: n, fields: r, organizationContext: i, conditionTools: a } = e.configuration, o = t, s = tt(e, "title"), c = tt(e, "approvalEnabled"), l = tt(e, "actionCode"), u = tt(e, "organizationId"), d = tt(e, "matchExpression"), f = tt(e, "fallback");
283
+ return (t, p) => (J(), U("form", {
284
+ class: "property-form",
285
+ onSubmit: p[6] ||= rt((e) => o("submit"), ["prevent"])
286
+ }, [
287
+ e.creating ? (J(), U("p", yt, X(Z(n).t("platform.workflow-config.creation-help", "先创建草稿,再配置节点和参与人;发布后才会用于后续申请。")), 1)) : H("v-if", !0),
288
+ W("label", bt, [K(Z(F), { required: "" }, {
289
+ default: $(() => [G(X(Z(n).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
290
+ _: 1
291
+ }), K(Z(M), {
292
+ disabled: e.busy,
293
+ value: s.value,
294
+ "onUpdate:value": p[0] ||= (e) => s.value = e,
295
+ required: "",
296
+ "aria-label": Z(n).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")
297
+ }, null, 8, [
298
+ "disabled",
299
+ "value",
300
+ "aria-label"
301
+ ])]),
302
+ e.creating ? (J(), U("div", xt, [K(Z(re), {
303
+ disabled: e.busy,
304
+ checked: c.value,
305
+ "onUpdate:checked": p[1] ||= (e) => c.value = e
306
+ }, {
307
+ default: $(() => [G(X(Z(n).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
308
+ _: 1
309
+ }, 8, ["disabled", "checked"]), K(Z(b), { label: Z(n).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
310
+ default: $(() => [G(X(Z(n).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
311
+ _: 1
312
+ }, 8, ["label"])])) : H("v-if", !0),
313
+ c.value ? H("v-if", !0) : (J(), U("label", St, [
314
+ K(Z(F), { required: "" }, {
315
+ default: $(() => [G(X(Z(n).t("platform.workflow-config.action-code", "模块动作编码")), 1)]),
316
+ _: 1
317
+ }),
318
+ K(Z(M), {
319
+ value: l.value,
320
+ "onUpdate:value": p[2] ||= (e) => l.value = e,
321
+ required: "",
322
+ disabled: e.busy || e.actionCodeLocked,
323
+ invalid: !!l.value.trim() && !/^[a-z][A-Za-z0-9_]{0,63}$/.test(l.value.trim()),
324
+ "aria-label": Z(n).t("platform.workflow-config.action-code", "模块动作编码")
325
+ }, null, 8, [
326
+ "value",
327
+ "disabled",
328
+ "invalid",
329
+ "aria-label"
330
+ ]),
331
+ W("span", Ct, X(Z(n).t("platform.workflow-config.action-code-help", "用于流程启动动作,以小写字母开头,可含字母、数字、下划线,最多64位;发布后不能修改。")), 1)
332
+ ])),
333
+ W("details", {
334
+ class: "settings-wide",
335
+ open: !e.creating
336
+ }, [W("summary", null, X(Z(n).t("platform.workflow-config.optional-matching", "适用范围与匹配规则(可选)")), 1), K(vt, {
337
+ "condition-tools": Z(a),
338
+ class: "optional-settings",
339
+ "organization-id": u.value,
340
+ "onUpdate:organizationId": p[3] ||= (e) => u.value = e,
341
+ "match-expression": d.value,
342
+ "onUpdate:matchExpression": p[4] ||= (e) => d.value = e,
343
+ fallback: f.value,
344
+ "onUpdate:fallback": p[5] ||= (e) => f.value = e,
345
+ "organization-context": Z(i),
346
+ fields: Z(r),
347
+ disabled: e.busy
348
+ }, null, 8, [
349
+ "condition-tools",
350
+ "organization-id",
351
+ "match-expression",
352
+ "fallback",
353
+ "organization-context",
354
+ "fields",
355
+ "disabled"
356
+ ])], 8, wt)
357
+ ], 32));
358
+ }
359
+ }), [["__scopeId", "data-v-c008d307"]]), Et = { key: 0 }, Dt = { key: 1 }, Ot = /* @__PURE__ */ q({
360
+ __name: "ModuleWorkflowDrawer",
361
+ props: { context: {} },
362
+ setup(e) {
363
+ let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a = Fe(r), { client: o, context: l, language: u } = a, d = s(), f = Y([]), h = Y(), g = Y(!1), _ = Y(!1), v = Y(!1), y = Y(!1), b = Y(""), x = Y(!1), C = Y(), w = Y(""), T = Y(!0), E = Y(""), D = Y(""), O = Y(""), k = Y(!1), A = B(() => l.can?.("sort") === !0), M = B(() => !!w.value.trim() && (T.value || /^[a-z][A-Za-z0-9_]{0,63}$/.test(E.value.trim()))), N = !0;
364
+ Ge(() => {
365
+ N = !1;
366
+ }), m(() => u.t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"), () => y.value, () => v.value), Q([
367
+ w,
368
+ T,
369
+ E,
370
+ D,
371
+ O,
372
+ k
373
+ ], () => {
374
+ g.value && (y.value = !0);
375
+ }, { flush: "sync" });
376
+ let P = B(() => u.t(_.value ? "platform.screen.WorkflowConfigurationView.new-workflow" : "platform.workflow-manager.edit", _.value ? "新建流程" : "流程设置")), F = B(() => [{
377
+ key: "cancel",
378
+ label: u.t("platform.action.cancel", "取消"),
379
+ disabled: v.value,
380
+ run: ce
381
+ }, {
382
+ key: "save",
383
+ label: u.t(_.value ? "platform.screen.WorkflowConfigurationView.create-workflow-draft" : "platform.action.save", _.value ? "创建流程草稿" : "保存"),
384
+ emphasis: "primary",
385
+ disabled: v.value || !M.value,
386
+ loading: v.value,
387
+ run: de
388
+ }]);
389
+ n.context.setSubtitle(i), n.context.setOperation(void 0), Q(v, () => n.context.setCloseBlocked(v.value), { immediate: !0 });
390
+ async function re(e) {
391
+ if (!v.value) {
392
+ v.value = !0, C.value = void 0;
393
+ try {
394
+ await e();
395
+ } catch (e) {
396
+ N && (C.value = () => xe(ie(e), u));
397
+ } finally {
398
+ N && (v.value = !1);
399
+ }
400
+ }
401
+ }
402
+ async function I() {
403
+ g.value || v.value || await re(async () => {
404
+ let e = await o.query();
405
+ N && (f.value = e, await ae(e));
406
+ });
407
+ }
408
+ async function ae(e) {
409
+ l.invalidateRecordActions?.(e.map((e) => e.id)), l.recordActionsBatch ? await l.recordActionsBatch(e.map((e) => e.id)) : l.recordActions && await Promise.all(e.map((e) => l.recordActions(e.id)));
410
+ }
411
+ Ke(() => {
412
+ I();
413
+ }), We(() => {
414
+ I();
415
+ }), t({
416
+ moduleAlias: "platform.workflow.definition",
417
+ handler: async () => {
418
+ await I();
419
+ }
420
+ });
421
+ function oe(e) {
422
+ v.value || g.value || (x.value = !1, h.value = e, w.value = e?.title ?? "", T.value = e?.approvalEnabled ?? !0, E.value = e?.actionCode ?? "", D.value = e?.organizationId ?? "", O.value = e?.matchExpression ?? "", k.value = e?.defaultDefinition ?? !1, _.value = !e, y.value = !1, g.value = !0);
423
+ }
424
+ async function se() {
425
+ return v.value || y.value && !await p({
426
+ title: u.t("platform.workflow-config.discard-confirm", "放弃未保存的流程设置?"),
427
+ danger: !0,
428
+ okText: u.t("platform.workflow-config.discard", "放弃修改")
429
+ }, u) ? !1 : (y.value = !1, !0);
430
+ }
431
+ n.context.setBeforeClose(se);
432
+ async function ce() {
433
+ await se() && (g.value = !1, await I());
434
+ }
435
+ async function de() {
436
+ g.value && M.value && await re(async () => {
437
+ let e = {
438
+ title: w.value.trim(),
439
+ organizationId: D.value || null,
440
+ matchExpression: O.value || null,
441
+ defaultDefinition: k.value,
442
+ ...T.value ? {} : { actionCode: E.value.trim() }
443
+ }, t = _.value ? await o.create({
444
+ ...e,
445
+ ...T.value ? { approvalEnabled: !0 } : {
446
+ approvalEnabled: !1,
447
+ actionCode: E.value.trim()
448
+ },
449
+ enabled: !0
450
+ }) : await o.saveSelection(h.value.id, {
451
+ ...e,
452
+ version: h.value.version
453
+ });
454
+ N && (f.value = _.value ? [...f.value, t] : f.value.map((e) => e.id === t.id ? t : e), h.value = t, g.value = !1, y.value = !1, b.value = "", n.context.refreshDetailExtensions(), await ae([t]));
455
+ });
456
+ }
457
+ function fe(e) {
458
+ if (!(v.value || g.value)) {
459
+ if (!d) {
460
+ R(Error(u.t("platform.workflow-manager.navigation-unavailable", "工作台导航暂不可用")), {
461
+ source: "workflow-design",
462
+ phase: "action"
463
+ });
464
+ return;
465
+ }
466
+ d.openPage(c(ut, {
467
+ moduleAlias: r,
468
+ moduleTitle: i,
469
+ definitionId: e.id,
470
+ definitionTitle: e.title ?? e.alias ?? e.id
471
+ }));
472
+ }
473
+ }
474
+ let he = B(() => [
475
+ {
476
+ key: "title",
477
+ title: u.t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称"),
478
+ width: 150
479
+ },
480
+ {
481
+ key: "definitionStatus",
482
+ title: u.t("platform.workflow-manager.state", "流程状态"),
483
+ width: 85
484
+ },
485
+ {
486
+ key: "currentVersionNo",
487
+ title: u.t("platform.workflow-manager.published-version", "发布版本"),
488
+ width: 75
489
+ },
490
+ {
491
+ key: "matchExpression",
492
+ title: u.t("platform.screen.WorkflowSelectionFields.match-condition", "匹配条件"),
493
+ width: 120
494
+ },
495
+ {
496
+ key: "active",
497
+ title: u.t("platform.workflow-manager.active", "启用状态"),
498
+ width: 90
499
+ }
500
+ ]), ge = B(() => f.value.filter((e) => !b.value.trim() || [
501
+ e.title,
502
+ e.matchExpression,
503
+ le(e.definitionStatus, u)
504
+ ].some((e) => String(e ?? "").toLocaleLowerCase().includes(b.value.trim().toLocaleLowerCase()))).map((e) => ({ ...e })));
505
+ function _e(e) {
506
+ return e.definitionStatus === "published" || e.definitionStatus === "disabled" && e.currentVersionNo != null;
507
+ }
508
+ function ve(e, t) {
509
+ return !v.value && !g.value && l.can?.(e, String(t.id)) === !0;
510
+ }
511
+ function ye(e) {
512
+ if (e.source.tenantId === e.target.tenantId) return Se({
513
+ dragRecord: e.source,
514
+ dropRecord: e.target,
515
+ position: e.position === "before" ? -1 : 1
516
+ });
517
+ }
518
+ async function be(e, t) {
519
+ let n = f.value.find((e) => e.id === t.id);
520
+ if (n && !(v.value || g.value)) {
521
+ if (e === "design") {
522
+ fe(n);
523
+ return;
524
+ }
525
+ if (e === "settings") {
526
+ if (!ve("configureWorkflowSelection", n)) return;
527
+ oe(n);
528
+ return;
529
+ }
530
+ (e === "enable" || e === "disable" || e === "archive") && ve(`${e}WorkflowDefinition`, n) && (e !== "enable" || _e(n)) && await p({
531
+ title: u.t(e === "archive" ? "platform.workflow-config.archive-confirm" : e === "enable" ? "platform.workflow-config.enable-confirm" : "platform.workflow-config.disable-confirm", e === "archive" ? "归档此流程?" : e === "enable" ? "启用此流程?" : "停用此流程?"),
532
+ content: u.t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。"),
533
+ danger: e !== "enable"
534
+ }, u) && await re(async () => {
535
+ let t = await o.changeStatus(n.id, e, n.version);
536
+ N && (f.value = f.value.map((e) => e.id === t.id ? t : e), await ae([t]));
537
+ });
538
+ }
539
+ }
540
+ async function Se(e) {
541
+ x.value && A.value && !v.value && !g.value && !b.value.trim() && e.dragRecord.id && e.dropRecord.id && await re(async () => {
542
+ await o.sort(String(e.dragRecord.id), String(e.dropRecord.id), e.position);
543
+ let t = await o.query();
544
+ N && (f.value = t, await ae(t));
545
+ });
546
+ }
547
+ return (e, t) => (J(), U(z, null, [
548
+ g.value ? (J(), V(Z(ee), {
549
+ key: 0,
550
+ open: g.value,
551
+ width: "standard",
552
+ title: P.value,
553
+ subtitle: Z(i),
554
+ "before-close": se,
555
+ onClose: ce
556
+ }, {
557
+ operation: $(() => [K(Z(pe), { actions: F.value }, null, 8, ["actions"])]),
558
+ default: $(() => [C.value ? (J(), V(Z(te), {
559
+ key: 0,
560
+ message: C.value()
561
+ }, null, 8, ["message"])) : H("v-if", !0), K(Tt, {
562
+ onSubmit: de,
563
+ configuration: Z(a),
564
+ creating: _.value,
565
+ busy: v.value,
566
+ title: w.value,
567
+ "onUpdate:title": t[0] ||= (e) => w.value = e,
568
+ "approval-enabled": T.value,
569
+ "onUpdate:approvalEnabled": t[1] ||= (e) => T.value = e,
570
+ "action-code": E.value,
571
+ "onUpdate:actionCode": t[2] ||= (e) => E.value = e,
572
+ "action-code-locked": !_.value && h.value?.currentVersionNo != null,
573
+ "organization-id": D.value,
574
+ "onUpdate:organizationId": t[3] ||= (e) => D.value = e,
575
+ "match-expression": O.value,
576
+ "onUpdate:matchExpression": t[4] ||= (e) => O.value = e,
577
+ fallback: k.value,
578
+ "onUpdate:fallback": t[5] ||= (e) => k.value = e
579
+ }, null, 8, [
580
+ "configuration",
581
+ "creating",
582
+ "busy",
583
+ "title",
584
+ "approval-enabled",
585
+ "action-code",
586
+ "action-code-locked",
587
+ "organization-id",
588
+ "match-expression",
589
+ "fallback"
590
+ ])]),
591
+ _: 1
592
+ }, 8, [
593
+ "open",
594
+ "title",
595
+ "subtitle"
596
+ ])) : H("v-if", !0),
597
+ C.value && !g.value ? (J(), V(Z(te), {
598
+ key: 1,
599
+ message: C.value()
600
+ }, null, 8, ["message"])) : H("v-if", !0),
601
+ K(Z(Te), {
602
+ embedded: "",
603
+ title: Z(u).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
604
+ "title-action-disabled": v.value || g.value,
605
+ "title-action-icon": "reload",
606
+ "title-action-title": Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载"),
607
+ "fill-height": !1,
608
+ columns: he.value,
609
+ rows: ge.value,
610
+ loading: v.value,
611
+ "table-visible": g.value || !C.value || f.value.length > 0,
612
+ "empty-description": Z(u).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
613
+ "quick-search-visible": !0,
614
+ "quick-search-value": b.value,
615
+ "quick-search-disabled": v.value || g.value,
616
+ "row-draggable": x.value && !v.value && !g.value && A.value && !b.value.trim(),
617
+ "row-drag-handle-title": Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
618
+ "show-action-column": !0,
619
+ "action-column-width": 170,
620
+ "onUpdate:quickSearchValue": t[9] ||= (e) => b.value = e,
621
+ onTitleAction: I,
622
+ onRowDrop: ye
623
+ }, {
624
+ operations: $(() => [A.value ? (J(), V(Z(j), {
625
+ key: 0,
626
+ "icon-name": "swap-vertical",
627
+ "icon-only": "",
628
+ size: "small",
629
+ type: "text",
630
+ selected: x.value,
631
+ disabled: v.value || g.value || !!b.value.trim(),
632
+ title: Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
633
+ onClick: t[6] ||= (e) => x.value = !x.value
634
+ }, null, 8, [
635
+ "selected",
636
+ "disabled",
637
+ "title"
638
+ ])) : H("v-if", !0), K(Z(ue), {
639
+ "icon-name": "plus",
640
+ title: Z(u).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
641
+ disabled: v.value || g.value || Z(l).can?.("create") !== !0,
642
+ onClick: t[7] ||= (e) => oe()
643
+ }, null, 8, ["title", "disabled"])]),
644
+ beforeTable: $(() => [C.value && !g.value ? (J(), V(Z(L), {
645
+ key: 0,
646
+ onClick: I
647
+ }, {
648
+ default: $(() => [G(X(Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
649
+ _: 1
650
+ })) : H("v-if", !0)]),
651
+ cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), U("span", Et, X(Z(le)(String(r ?? ""), Z(u))), 1)) : e.key === "currentVersionNo" ? (J(), U("span", Dt, X(r == null ? "—" : `v${r}`), 1)) : e.key === "matchExpression" ? (J(), V(Z(me), {
652
+ key: 2,
653
+ column: {
654
+ ...e,
655
+ width: String(e.width),
656
+ maxDisplayLines: 2
657
+ },
658
+ record: {
659
+ ...n,
660
+ matchExpression: n.defaultDefinition ? Z(u).t("platform.workflow-manager.fallback", "兜底流程") : r || Z(u).t("platform.workflow-manager.all-records", "全部记录")
661
+ }
662
+ }, null, 8, ["column", "record"])) : e.key === "active" ? (J(), V(Z(ne), {
663
+ key: 3,
664
+ title: _e(n) ? Z(u).t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。") : Z(u).t("platform.workflow-manager.publish-to-enable", "请进入编排发布流程后启用")
665
+ }, {
666
+ default: $(() => [W("span", { onClick: t[8] ||= rt(() => {}, ["stop"]) }, [K(Z(S), {
667
+ "aria-label": Z(u).t("platform.workflow-manager.active", "启用状态") + ":" + n.title,
668
+ checked: n.definitionStatus === "published" && n.enabled !== !1,
669
+ disabled: !_e(n) || !ve(n.definitionStatus === "published" ? "disableWorkflowDefinition" : "enableWorkflowDefinition", n),
670
+ onChange: (e) => be(e ? "enable" : "disable", n)
671
+ }, null, 8, [
672
+ "aria-label",
673
+ "checked",
674
+ "disabled",
675
+ "onChange"
676
+ ])])]),
677
+ _: 2
678
+ }, 1032, ["title"])) : (J(), V(Z(me), {
679
+ key: 4,
680
+ column: {
681
+ ...e,
682
+ width: String(e.width),
683
+ maxDisplayLines: 2
684
+ },
685
+ record: n
686
+ }, null, 8, ["column", "record"]))]),
687
+ rowActions: $(({ record: e }) => [
688
+ K(Z(L), {
689
+ type: "link",
690
+ size: "small",
691
+ disabled: v.value || g.value,
692
+ onClick: (t) => be("design", e)
693
+ }, {
694
+ default: $(() => [G(X(Z(u).t("platform.workflow-manager.design", "编排")), 1)]),
695
+ _: 1
696
+ }, 8, ["disabled", "onClick"]),
697
+ K(Z(L), {
698
+ type: "link",
699
+ size: "small",
700
+ disabled: !ve("configureWorkflowSelection", e),
701
+ onClick: (t) => be("settings", e)
702
+ }, {
703
+ default: $(() => [G(X(Z(u).t("platform.workflow-manager.settings", "设置")), 1)]),
704
+ _: 1
705
+ }, 8, ["disabled", "onClick"]),
706
+ K(Z(L), {
707
+ type: "link",
708
+ size: "small",
709
+ danger: "",
710
+ disabled: e.definitionStatus === "archived" || !ve("archiveWorkflowDefinition", e),
711
+ onClick: (t) => be("archive", e)
712
+ }, {
713
+ default: $(() => [G(X(Z(u).t("platform.screen.WorkflowConfigurationView.archive", "归档")), 1)]),
714
+ _: 1
715
+ }, 8, ["disabled", "onClick"])
716
+ ]),
717
+ _: 1
718
+ }, 8, [
719
+ "title",
720
+ "title-action-disabled",
721
+ "title-action-title",
722
+ "columns",
723
+ "rows",
724
+ "loading",
725
+ "table-visible",
726
+ "empty-description",
727
+ "quick-search-value",
728
+ "quick-search-disabled",
729
+ "row-draggable",
730
+ "row-drag-handle-title"
731
+ ])
732
+ ], 64));
733
+ }
734
+ }), kt = { class: "module-menu-entries" }, At = { key: 0 }, jt = {
157
735
  key: 1,
158
736
  role: "status"
159
- }, tt = { key: 2 }, nt = { key: 0 }, rt = /*#__PURE__*/ P(/* @__PURE__ */ G({
737
+ }, Mt = { key: 2 }, Nt = { key: 0 }, Pt = /*#__PURE__*/ P(/* @__PURE__ */ q({
160
738
  __name: "ModuleMenuEntriesSection",
161
739
  props: { context: {} },
162
740
  setup(e) {
163
- let t = b(), n = e, r = o(), i = q([]), a = L(() => i.value.flatMap(({ scheme: e, tree: r }) => Te(r, me(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), s = q(/* @__PURE__ */ new Map()), c = q(!1), l = q(!1), u = L(() => l.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
164
- Ne(() => d++), X(() => [n.context.record.id, n.context.refreshKey], () => void p(), { immediate: !0 });
165
- async function p() {
166
- let e = ++d, t = Ce(n.context.module.http);
167
- c.value = !0, l.value = !1, i.value = [], s.value = /* @__PURE__ */ new Map();
741
+ let t = y(), n = e, r = s(), i = Y([]), a = B(() => i.value.flatMap(({ scheme: e, tree: r }) => Ne(r, g(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), o = Y(/* @__PURE__ */ new Map()), c = Y(!1), l = Y(!1), u = B(() => l.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
742
+ Ge(() => d++), Q(() => [n.context.record.id, n.context.refreshKey], () => void f(), { immediate: !0 });
743
+ async function f() {
744
+ let e = ++d, t = je(n.context.module.http);
745
+ c.value = !0, l.value = !1, i.value = [], o.value = /* @__PURE__ */ new Map();
168
746
  try {
169
747
  let [n, r] = await Promise.all([t.schemes(), t.visible()]), a = await Promise.all(n.map(async (e) => ({
170
748
  scheme: e,
171
749
  tree: await t.tree(e.id)
172
750
  })));
173
751
  if (e !== d) return;
174
- i.value = a, s.value = new Map(Te(r).map(({ menu: e }) => [e.id, e]));
752
+ i.value = a, o.value = new Map(Ne(r).map(({ menu: e }) => [e.id, e]));
175
753
  } catch {
176
754
  e === d && (l.value = !0);
177
755
  } finally {
178
756
  e === d && (c.value = !1);
179
757
  }
180
758
  }
181
- return (e, n) => (K(), B("div", Qe, [c.value ? (K(), B("span", $e, J(Y(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (K(), B("div", et, [H(J(u.value) + " ", 1), U(Y(f), {
759
+ return (e, n) => (J(), U("div", kt, [c.value ? (J(), U("span", At, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (J(), U("div", jt, [G(X(u.value) + " ", 1), K(Z(L), {
182
760
  type: "link",
183
- onClick: p
761
+ onClick: f
184
762
  }, {
185
- default: Z(() => [H(J(Y(t).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
763
+ default: $(() => [G(X(Z(t).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
186
764
  _: 1
187
- })])) : a.value.length ? z("v-if", !0) : (K(), B("span", tt, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (K(!0), B(I, null, Le(a.value, (e) => (K(), B("div", {
765
+ })])) : a.value.length ? H("v-if", !0) : (J(), U("span", Mt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (J(!0), U(z, null, Ye(a.value, (e) => (J(), U("div", {
188
766
  key: e.menu.id,
189
767
  class: "menu-entry"
190
- }, [V("span", null, [H(J(e.path), 1), e.menu.enabled === !1 ? (K(), B("small", nt, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : z("v-if", !0)]), s.value.has(e.menu.id) && Y(r)?.openMenu ? (K(), R(Y(f), {
768
+ }, [W("span", null, [G(X(e.path), 1), e.menu.enabled === !1 ? (J(), U("small", Nt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : H("v-if", !0)]), o.value.has(e.menu.id) && Z(r)?.openMenu ? (J(), V(Z(L), {
191
769
  key: 0,
192
770
  type: "link",
193
- onClick: (t) => Y(r).openMenu(s.value.get(e.menu.id))
771
+ onClick: (t) => Z(r).openMenu(o.value.get(e.menu.id))
194
772
  }, {
195
- default: Z(() => [V("span", null, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
773
+ default: $(() => [W("span", null, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
196
774
  _: 1
197
- }, 8, ["onClick"])) : z("v-if", !0)]))), 128))]));
775
+ }, 8, ["onClick"])) : H("v-if", !0)]))), 128))]));
198
776
  }
199
- }), [["__scopeId", "data-v-d5fd13ca"]]), it = /* @__PURE__ */ new WeakMap();
200
- function at(e) {
201
- let t = q({}), n = /* @__PURE__ */ new Map();
777
+ }), [["__scopeId", "data-v-d5fd13ca"]]), Ft = /* @__PURE__ */ new WeakMap();
778
+ function It(e) {
779
+ let t = Y({}), n = /* @__PURE__ */ new Map();
202
780
  async function r(r) {
203
781
  let i = (n.get(r) ?? 0) + 1;
204
782
  n.set(r, i), t.value[r] = {
@@ -206,7 +784,7 @@ function at(e) {
206
784
  configurable: !1
207
785
  };
208
786
  try {
209
- let a = await ve(e.http, r);
787
+ let a = await Ee(e.http, r);
210
788
  n.get(r) === i && (t.value[r] = {
211
789
  ...a,
212
790
  phase: "ready"
@@ -215,7 +793,7 @@ function at(e) {
215
793
  n.get(r) === i && (t.value[r] = {
216
794
  phase: "failed",
217
795
  configurable: !1,
218
- error: M(F(e))
796
+ error: xe(ie(e))
219
797
  });
220
798
  }
221
799
  }
@@ -225,109 +803,109 @@ function at(e) {
225
803
  dispose: () => n.clear()
226
804
  };
227
805
  }
228
- function ot(e) {
229
- e = Ve(e);
230
- let t = it.get(e);
231
- return t || (t = at(e), it.set(e, t)), t;
806
+ function Lt(e) {
807
+ e = $e(e);
808
+ let t = Ft.get(e);
809
+ return t || (t = It(e), Ft.set(e, t)), t;
232
810
  }
233
- function st(e) {
234
- e = Ve(e);
235
- let n = ot(e), r = t((e) => {
811
+ function Rt(e) {
812
+ e = $e(e);
813
+ let t = Lt(e), r = n((e) => {
236
814
  if (e.changes.some((e) => [
237
815
  "platform.module",
238
816
  "platform.metadata",
239
817
  "platform.metadata_field",
240
818
  "platform.module_metadata_relation",
241
819
  "platform.module_metadata_field"
242
- ].includes(e.moduleAlias))) for (let e of Object.keys(n.states.value)) n.refresh(e);
820
+ ].includes(e.moduleAlias))) for (let e of Object.keys(t.states.value)) t.refresh(e);
243
821
  });
244
822
  return () => {
245
- r.unsubscribe(), n.dispose(), it.delete(e);
823
+ r.unsubscribe(), t.dispose(), Ft.delete(e);
246
824
  };
247
825
  }
248
- function ct(e, t) {
249
- let n = ot(e).states.value[t];
826
+ function zt(e, t) {
827
+ let n = Lt(e).states.value[t];
250
828
  return n?.phase === "ready" && n.configurable;
251
829
  }
252
830
  //#endregion
253
831
  //#region src/platform-admin-runtime/ModuleCodeConfigurationStatus.vue?vue&type=script&setup=true&lang.ts
254
- var lt = {
832
+ var Bt = {
255
833
  key: 0,
256
834
  class: "module-code-status",
257
835
  role: "status"
258
- }, ut = /*#__PURE__*/ P(/* @__PURE__ */ G({
836
+ }, Vt = /*#__PURE__*/ P(/* @__PURE__ */ q({
259
837
  __name: "ModuleCodeConfigurationStatus",
260
838
  props: { context: {} },
261
839
  setup(e) {
262
- let t = e, n = b(), r = o(), i = L(() => ot(t.context.module)), a = L(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), c = L(() => i.value.states.value[a.value]);
263
- X([
840
+ let t = e, n = y(), r = s(), i = B(() => Lt(t.context.module)), a = B(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), o = B(() => i.value.states.value[a.value]);
841
+ Q([
264
842
  a,
265
843
  () => t.context.mode,
266
844
  () => t.context.module
267
845
  ], ([e, t]) => {
268
846
  e && t === "view" && !i.value.states.value[e] && i.value.refresh(e);
269
847
  }, { immediate: !0 });
270
- let l = L(() => c.value?.reason), u = L(() => t.context.mode === "view" && !!a.value && (c.value?.phase === "failed" || t.context.record?.moduleKind === "dynamic" && c.value?.phase === "ready" && !c.value.configurable));
848
+ let l = B(() => o.value?.reason), u = B(() => t.context.mode === "view" && !!a.value && (o.value?.phase === "failed" || t.context.record?.moduleKind === "dynamic" && o.value?.phase === "ready" && !o.value.configurable));
271
849
  function d() {
272
- r?.openPage(s(be, {
850
+ r?.openPage(c(Oe, {
273
851
  moduleAlias: a.value,
274
852
  moduleTitle: String(t.context.record?.title ?? a.value),
275
853
  governanceTab: "metadata"
276
854
  }));
277
855
  }
278
- return (e, t) => u.value ? (K(), B("div", lt, [c.value?.phase === "failed" ? (K(), B(I, { key: 0 }, [
279
- V("span", null, J(Y(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
280
- V("span", null, J(c.value?.error), 1),
281
- U(Y(f), {
856
+ return (e, t) => u.value ? (J(), U("div", Bt, [o.value?.phase === "failed" ? (J(), U(z, { key: 0 }, [
857
+ W("span", null, X(Z(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
858
+ W("span", null, X(o.value?.error), 1),
859
+ K(Z(L), {
282
860
  type: "link",
283
861
  onClick: t[0] ||= (e) => i.value.refresh(a.value)
284
862
  }, {
285
- default: Z(() => [H(J(Y(n).t("platform.code.config.retry", "重试")), 1)]),
863
+ default: $(() => [G(X(Z(n).t("platform.code.config.retry", "重试")), 1)]),
286
864
  _: 1
287
865
  })
288
- ], 64)) : (K(), B(I, { key: 1 }, [V("span", null, J(Y(n).t(`platform.code.config.reason.${l.value}`, l.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Y(r) ? (K(), R(Y(f), {
866
+ ], 64)) : (J(), U(z, { key: 1 }, [W("span", null, X(Z(n).t(`platform.code.config.reason.${l.value}`, l.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Z(r) ? (J(), V(Z(L), {
289
867
  key: 0,
290
868
  type: "link",
291
869
  onClick: d
292
870
  }, {
293
- default: Z(() => [H(J(Y(n).t("platform.code.config.configure-model", "配置模型")), 1)]),
871
+ default: $(() => [G(X(Z(n).t("platform.code.config.configure-model", "配置模型")), 1)]),
294
872
  _: 1
295
- })) : z("v-if", !0)], 64))])) : z("v-if", !0);
873
+ })) : H("v-if", !0)], 64))])) : H("v-if", !0);
296
874
  }
297
- }), [["__scopeId", "data-v-ab744e6f"]]), dt = Ge, ft = Xe, pt = Ye, mt = be, ht = {
875
+ }), [["__scopeId", "data-v-ab744e6f"]]), Ht = it, Ut = ut, Wt = lt, Gt = Oe, Kt = {
298
876
  id: "platform-module-workspace-actions",
299
877
  target: { moduleAlias: "platform.module" },
300
- activate: ({ module: e }) => st(e),
878
+ activate: ({ module: e }) => Rt(e),
301
879
  card: { assistant: {
302
- component: ut,
880
+ component: Vt,
303
881
  placement: {
304
882
  boundary: "inside",
305
883
  position: "bottom"
306
884
  }
307
885
  } },
308
886
  workspaceViews: [
309
- mt,
310
- pt,
311
- ft
887
+ Gt,
888
+ Wt,
889
+ Ut
312
890
  ],
313
891
  detail: {
314
892
  sections: [{
315
893
  key: "module-menu-entries",
316
894
  title: "菜单入口",
317
895
  titleKey: "platform.screen.moduleMenuWorkspace.menu-entry",
318
- component: rt
896
+ component: Pt
319
897
  }],
320
898
  actions: [
321
899
  {
322
900
  key: "module-business-code",
323
901
  title: "业务编码",
324
902
  titleKey: "platform.code.config.title",
325
- state: (e, t) => ({ visible: !!t && !!$(e) && ct(t.module, $(e)) }),
903
+ state: (e, t) => ({ visible: !!t && !!Yt(e) && zt(t.module, Yt(e)) }),
326
904
  run({ record: e, module: t, openWorkspaceTab: n }) {
327
- let r = $(e);
328
- r && ct(t, r) && n(dt, {
905
+ let r = Yt(e);
906
+ r && zt(t, r) && n(Ht, {
329
907
  moduleAlias: r,
330
- moduleTitle: vt(e)
908
+ moduleTitle: Xt(e)
331
909
  });
332
910
  }
333
911
  },
@@ -335,12 +913,14 @@ var lt = {
335
913
  key: "module-workflow-workspace",
336
914
  title: "审批流程",
337
915
  titleKey: "platform.screen.WorkflowConfigurationView.approval-workflow",
338
- state: (e) => ({ visible: $(e) !== void 0 }),
339
- run({ record: e, openWorkspaceTab: t }) {
340
- let n = $(e);
341
- n && t(ft, {
342
- moduleAlias: n,
343
- moduleTitle: vt(e)
916
+ state: (e) => ({ visible: Yt(e) !== void 0 }),
917
+ run({ openDrawer: e }) {
918
+ e({
919
+ title: "审批流程",
920
+ titleKey: "platform.screen.WorkflowConfigurationView.approval-workflow",
921
+ width: "wide",
922
+ dismissal: "dismissible",
923
+ component: Ot
344
924
  });
345
925
  }
346
926
  },
@@ -348,13 +928,13 @@ var lt = {
348
928
  key: "module-add-to-menu",
349
929
  title: "添加到菜单",
350
930
  titleKey: "platform.entry.add-to-menu",
351
- state: (e) => ({ visible: $(e) !== void 0 }),
931
+ state: (e) => ({ visible: Yt(e) !== void 0 }),
352
932
  run({ openDrawer: e }) {
353
933
  e({
354
934
  title: "添加到菜单",
355
935
  titleKey: "platform.entry.add-to-menu",
356
936
  width: "narrow",
357
- component: Ze
937
+ component: dt
358
938
  });
359
939
  }
360
940
  },
@@ -362,13 +942,13 @@ var lt = {
362
942
  key: "module-actions-workspace",
363
943
  title: "动作",
364
944
  titleKey: "platform.governance.tab.actions",
365
- state: (e) => ({ visible: $(e) !== void 0 }),
945
+ state: (e) => ({ visible: Yt(e) !== void 0 }),
366
946
  run({ record: e, openWorkspaceTab: t }) {
367
- let n = $(e);
368
- n && t(pt, {
947
+ let n = Yt(e);
948
+ n && t(Wt, {
369
949
  moduleAlias: n,
370
- moduleTitle: vt(e),
371
- moduleKind: yt(e)
950
+ moduleTitle: Xt(e),
951
+ moduleKind: Zt(e)
372
952
  });
373
953
  }
374
954
  },
@@ -376,19 +956,19 @@ var lt = {
376
956
  key: "module-ui-orchestration-workspace",
377
957
  title: "低代码",
378
958
  titleKey: "platform.entry.low-code",
379
- state: (e) => ({ visible: $(e) !== void 0 && yt(e) === "dynamic" }),
959
+ state: (e) => ({ visible: Yt(e) !== void 0 && Zt(e) === "dynamic" }),
380
960
  run({ record: e, openWorkspaceTab: t }) {
381
- let n = $(e);
382
- n && yt(e) === "dynamic" && t(mt, {
961
+ let n = Yt(e);
962
+ n && Zt(e) === "dynamic" && t(Gt, {
383
963
  moduleAlias: n,
384
- moduleTitle: vt(e),
964
+ moduleTitle: Xt(e),
385
965
  governanceTab: "overview"
386
966
  });
387
967
  }
388
968
  }
389
969
  ]
390
970
  }
391
- }, gt = {
971
+ }, qt = {
392
972
  id: "dictionary-category-tree-parent-policy",
393
973
  target: { moduleAlias: "platform.dictionary_category" },
394
974
  navigator: { treeParentPolicy: {
@@ -396,7 +976,7 @@ var lt = {
396
976
  rejectionMessage: "字典类目只能挂在目录下",
397
977
  rejectionMessageKey: "platform.entry.dictionary-categories-must-belong-to-a-folder"
398
978
  } }
399
- }, _t = {
979
+ }, Jt = {
400
980
  id: "platform-module-action-entry-scope",
401
981
  target: { moduleAlias: "platform.module_action" },
402
982
  navigator: {
@@ -409,35 +989,35 @@ var lt = {
409
989
  },
410
990
  standardActions: { disabled: ["create"] }
411
991
  };
412
- function $(e) {
413
- return bt(e, "alias") ?? bt(e, "id");
992
+ function Yt(e) {
993
+ return Qt(e, "alias") ?? Qt(e, "id");
414
994
  }
415
- function vt(e) {
416
- return bt(e, "title");
995
+ function Xt(e) {
996
+ return Qt(e, "title");
417
997
  }
418
- function yt(e) {
419
- let t = bt(e, "moduleKind");
998
+ function Zt(e) {
999
+ let t = Qt(e, "moduleKind");
420
1000
  return t === "static" || t === "dynamic" ? t : void 0;
421
1001
  }
422
- function bt(e, t) {
1002
+ function Qt(e, t) {
423
1003
  let n = e[t];
424
1004
  return typeof n == "string" && n.trim() ? n : void 0;
425
1005
  }
426
1006
  //#endregion
427
1007
  //#region src/views/PasswordPolicyPreview.vue?vue&type=script&setup=true&lang.ts
428
- var xt = { class: "password-policy-preview" }, St = {
1008
+ var $t = { class: "password-policy-preview" }, en = {
429
1009
  key: 0,
430
1010
  class: "preview-results"
431
- }, Ct = {
1011
+ }, tn = {
432
1012
  id: "iam-password-policy-preview",
433
1013
  target: { moduleAlias: "iam.password_policy_rule" },
434
1014
  card: { assistant: {
435
- component: /* @__PURE__ */ P(/* @__PURE__ */ G({
1015
+ component: /* @__PURE__ */ P(/* @__PURE__ */ q({
436
1016
  name: "PasswordPolicyPreview",
437
1017
  __name: "PasswordPolicyPreview",
438
1018
  props: { context: {} },
439
1019
  setup(e) {
440
- let t = b(), n = e, r = q("CURRENT"), i = q(""), a = q(), o = q(!1), s = q(!1), c = 0, l = L(() => v(n.context.record)), u = L(() => n.context.mode !== "view" || E(l.value?.id) !== void 0), d = L(() => [{
1020
+ let t = y(), n = e, r = Y("CURRENT"), i = Y(""), a = Y(), o = Y(!1), s = Y(!1), c = 0, l = B(() => ee(n.context.record)), u = B(() => n.context.mode !== "view" || C(l.value?.id) !== void 0), d = B(() => [{
441
1021
  value: "CURRENT",
442
1022
  label: t.t("platform.screen.PasswordPolicyPreview.current-rule", "本规则"),
443
1023
  disabled: !u.value
@@ -445,13 +1025,13 @@ var xt = { class: "password-policy-preview" }, St = {
445
1025
  value: "ALL",
446
1026
  label: t.t("platform.screen.PasswordPolicyPreview.all-rules", "全规则")
447
1027
  }]);
448
- X(u, (e) => {
1028
+ Q(u, (e) => {
449
1029
  !e && r.value === "CURRENT" && (r.value = "ALL");
450
1030
  }, { immediate: !0 });
451
1031
  function f(e) {
452
1032
  (e !== "CURRENT" || u.value) && (e === "CURRENT" || e === "ALL") && (r.value = e);
453
1033
  }
454
- X([r, () => n.context.formSessionKey], ([e]) => {
1034
+ Q([r, () => n.context.formSessionKey], ([e]) => {
455
1035
  e === "ALL" && p();
456
1036
  }, { immediate: !0 });
457
1037
  async function p() {
@@ -468,22 +1048,22 @@ var xt = { class: "password-policy-preview" }, St = {
468
1048
  e === c && (s.value = !1);
469
1049
  }
470
1050
  }
471
- let m = L(() => {
1051
+ let m = B(() => {
472
1052
  let e = u.value ? l.value : void 0;
473
1053
  if (r.value === "CURRENT") return e ? [e] : [];
474
1054
  if (!a.value) return [];
475
- let t = a.value.filter(O), n = E(e?.id);
1055
+ let t = a.value.filter(E), n = C(e?.id);
476
1056
  if (n) {
477
- let e = t.findIndex((e) => E(e.id) === n);
1057
+ let e = t.findIndex((e) => C(e.id) === n);
478
1058
  e >= 0 && t.splice(e, 1);
479
1059
  }
480
- return e && O(e) && t.push(e), t.length > 0 ? t.sort(C) : [];
481
- }), h = L(() => i.value ? m.value.map((e, t) => x(e, i.value, t)) : []), g = L(() => h.value.map((e) => ({
1060
+ return e && E(e) && t.push(e), t.length > 0 ? t.sort(b) : [];
1061
+ }), h = B(() => i.value ? m.value.map((e, t) => v(e, i.value, t)) : []), g = B(() => h.value.map((e) => ({
482
1062
  ...e,
483
- title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : pe(e.title, e.titleText, t),
484
- message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : pe(e.message, e.messageText, t),
1063
+ title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : ye(e.title, e.titleText, t),
1064
+ message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : ye(e.message, e.messageText, t),
485
1065
  diagnostic: e.diagnostic ? t.t(e.diagnostic.sourceId, e.diagnostic.originalText) : void 0
486
- }))), _ = L(() => {
1066
+ }))), _ = B(() => {
487
1067
  if (!u.value && r.value === "CURRENT") return t.t("platform.screen.PasswordPolicyPreview.select-or-create-a-rule", "请选择或新建一条规则");
488
1068
  if (r.value === "ALL" && s.value) return t.t("platform.screen.PasswordPolicyPreview.loading-the-authoritative-rules", "正在加载权威规则集");
489
1069
  if (r.value === "ALL" && o.value) return t.t("platform.screen.PasswordPolicyPreview.unable-to-load-the-authoritative-rules", "无法加载权威规则集");
@@ -495,29 +1075,29 @@ var xt = { class: "password-policy-preview" }, St = {
495
1075
  value2: h.value.length
496
1076
  }) : t.t("platform.screen.PasswordPolicyPreview.value-rules-failed", "{value1} 条规则未通过", { value1: e });
497
1077
  });
498
- function v(e) {
1078
+ function ee(e) {
499
1079
  if (e) return e;
500
1080
  }
501
- function x(e, t, n) {
502
- let r = e.title?.trim() ? void 0 : w("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : w("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = D(e.title, r?.originalText ?? ""), o = D(e.message, i?.originalText ?? ""), s = {
503
- titleText: te(e, "title"),
504
- messageText: te(e, "message")
1081
+ function v(e, t, n) {
1082
+ let r = e.title?.trim() ? void 0 : D("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : D("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = w(e.title, r?.originalText ?? ""), o = w(e.message, i?.originalText ?? ""), s = {
1083
+ titleText: T(e, "title"),
1084
+ messageText: T(e, "message")
505
1085
  }, c = e.pattern;
506
1086
  if (!c?.trim()) return {
507
1087
  ...s,
508
- key: T(e, n),
1088
+ key: S(e, n),
509
1089
  title: a,
510
1090
  message: o,
511
1091
  titleSource: r,
512
1092
  messageSource: i,
513
1093
  passed: !1,
514
- diagnostic: w("platform.screen.PasswordPolicyPreview.regular-expression-required")
1094
+ diagnostic: D("platform.screen.PasswordPolicyPreview.regular-expression-required")
515
1095
  };
516
1096
  try {
517
1097
  let l = RegExp(`^(?:${c})$`).test(t);
518
1098
  return {
519
1099
  ...s,
520
- key: T(e, n),
1100
+ key: S(e, n),
521
1101
  title: a,
522
1102
  message: o,
523
1103
  titleSource: r,
@@ -527,59 +1107,59 @@ var xt = { class: "password-policy-preview" }, St = {
527
1107
  } catch {
528
1108
  return {
529
1109
  ...s,
530
- key: T(e, n),
1110
+ key: S(e, n),
531
1111
  title: a,
532
1112
  message: o,
533
1113
  titleSource: r,
534
1114
  messageSource: i,
535
1115
  passed: !1,
536
- diagnostic: w("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
1116
+ diagnostic: D("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
537
1117
  };
538
1118
  }
539
1119
  }
540
- function C(e, t) {
541
- return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || D(e.title, "").localeCompare(D(t.title, ""));
1120
+ function b(e, t) {
1121
+ return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || w(e.title, "").localeCompare(w(t.title, ""));
542
1122
  }
543
- function T(e, t) {
544
- return E(e.id) ?? `draft:${t}`;
1123
+ function S(e, t) {
1124
+ return C(e.id) ?? `draft:${t}`;
545
1125
  }
546
- function E(e) {
1126
+ function C(e) {
547
1127
  return e?.trim() || void 0;
548
1128
  }
549
- function D(e, t) {
1129
+ function w(e, t) {
550
1130
  return e?.trim() || t;
551
1131
  }
552
- function O(e) {
1132
+ function E(e) {
553
1133
  return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
554
1134
  }
555
- return (e, n) => (K(), B("section", xt, [
556
- V("header", null, [V("h3", null, J(Y(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), V("span", { class: je({ failed: h.value.some((e) => !e.passed) }) }, J(_.value), 3)]),
557
- U(Y(y), {
1135
+ return (e, n) => (J(), U("section", $t, [
1136
+ W("header", null, [W("h3", null, X(Z(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), W("span", { class: He({ failed: h.value.some((e) => !e.passed) }) }, X(_.value), 3)]),
1137
+ K(Z(x), {
558
1138
  class: "preview-scope",
559
1139
  value: r.value,
560
1140
  options: d.value,
561
1141
  size: "small",
562
1142
  "onUpdate:value": f
563
1143
  }, null, 8, ["value", "options"]),
564
- U(Y(S), {
1144
+ K(Z(M), {
565
1145
  value: i.value,
566
1146
  "onUpdate:value": n[0] ||= (e) => i.value = e,
567
1147
  type: "text",
568
1148
  autocomplete: "off",
569
- placeholder: Y(t).t("platform.screen.PasswordPolicyPreview.enter-a-test-password", "输入测试密码"),
570
- "aria-label": Y(t).t("platform.screen.PasswordPolicyPreview.test-password", "测试密码")
1149
+ placeholder: Z(t).t("platform.screen.PasswordPolicyPreview.enter-a-test-password", "输入测试密码"),
1150
+ "aria-label": Z(t).t("platform.screen.PasswordPolicyPreview.test-password", "测试密码")
571
1151
  }, null, 8, [
572
1152
  "value",
573
1153
  "placeholder",
574
1154
  "aria-label"
575
1155
  ]),
576
- h.value.length ? (K(), B("ul", St, [(K(!0), B(I, null, Le(g.value, (e) => (K(), B("li", {
1156
+ h.value.length ? (J(), U("ul", en, [(J(!0), U(z, null, Ye(g.value, (e) => (J(), U("li", {
577
1157
  key: e.key,
578
- class: je({
1158
+ class: He({
579
1159
  passed: e.passed,
580
1160
  failed: !e.passed
581
1161
  })
582
- }, [V("strong", null, J(e.title), 1), V("span", null, J(e.diagnostic ?? (e.passed ? Y(t).t("platform.workflow-record.check-passed", "通过") : e.message)), 1)], 2))), 128))])) : z("v-if", !0)
1162
+ }, [W("strong", null, X(e.title), 1), W("span", null, X(e.diagnostic ?? (e.passed ? Z(t).t("platform.workflow-record.check-passed", "通过") : e.message)), 1)], 2))), 128))])) : H("v-if", !0)
583
1163
  ]));
584
1164
  }
585
1165
  }), [["__scopeId", "data-v-235173d0"]]),
@@ -588,19 +1168,19 @@ var xt = { class: "password-policy-preview" }, St = {
588
1168
  position: "bottom"
589
1169
  }
590
1170
  } }
591
- }, wt = { class: "tenant-applications-detail" }, Tt = { class: "tenant-applications-summary" }, Et = {
1171
+ }, nn = { class: "tenant-applications-detail" }, rn = { class: "tenant-applications-summary" }, an = {
592
1172
  key: 0,
593
1173
  class: "tenant-applications-status"
594
- }, Dt = /*#__PURE__*/ P(/* @__PURE__ */ G({
1174
+ }, on = /*#__PURE__*/ P(/* @__PURE__ */ q({
595
1175
  name: "TenantApplicationsDetailSection",
596
1176
  __name: "TenantApplicationsDetailSection",
597
1177
  props: { context: {} },
598
1178
  setup(e) {
599
- let t = b(), n = e, r = q([]), i = q(!1), a = 0, o = q(/* @__PURE__ */ new Map()), s = L(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
1179
+ let t = y(), n = e, r = Y([]), i = Y(!1), a = 0, o = Y(/* @__PURE__ */ new Map()), s = B(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
600
1180
  key: e,
601
1181
  label: o.value.get(e) ? `${o.value.get(e)} · ${e}` : e
602
1182
  })));
603
- X(() => [n.context.record.id, n.context.refreshKey], () => void c(), { immediate: !0 });
1183
+ Q(() => [n.context.record.id, n.context.refreshKey], () => void c(), { immediate: !0 });
604
1184
  async function c() {
605
1185
  let e = String(n.context.record.id ?? ""), s = ++a;
606
1186
  if (!e) {
@@ -626,7 +1206,7 @@ var xt = { class: "password-policy-preview" }, St = {
626
1206
  })]);
627
1207
  s === a && (o.value = new Map(t.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), r.value = i.records);
628
1208
  } catch (e) {
629
- s === a && N(e, {
1209
+ s === a && R(e, {
630
1210
  language: t,
631
1211
  source: "tenant-applications-detail",
632
1212
  phase: "load"
@@ -638,19 +1218,19 @@ var xt = { class: "password-policy-preview" }, St = {
638
1218
  function l(e, t) {
639
1219
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
640
1220
  }
641
- return (e, n) => (K(), B("section", wt, [V("div", Tt, [i.value ? (K(), B("span", Et, J(Y(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (K(), R(Y(se), {
1221
+ return (e, n) => (J(), U("section", nn, [W("div", rn, [i.value ? (J(), U("span", an, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (J(), V(Z(ge), {
642
1222
  key: 1,
643
1223
  items: s.value,
644
1224
  "max-visible": 8,
645
- "empty-text": Y(t).t("platform.screen.CrudRecordListExplorer.emptyDescription", "暂无记录")
1225
+ "empty-text": Z(t).t("platform.screen.CrudRecordListExplorer.emptyDescription", "暂无记录")
646
1226
  }, null, 8, ["items", "empty-text"]))])]));
647
1227
  }
648
- }), [["__scopeId", "data-v-49a973de"]]), Ot = { class: "tenant-application-configuration" }, kt = /*#__PURE__*/ P(/* @__PURE__ */ G({
1228
+ }), [["__scopeId", "data-v-49a973de"]]), sn = { class: "tenant-application-configuration" }, cn = /*#__PURE__*/ P(/* @__PURE__ */ q({
649
1229
  name: "TenantApplicationConfigurationDrawer",
650
1230
  __name: "TenantApplicationConfigurationDrawer",
651
1231
  props: { context: {} },
652
1232
  setup(e) {
653
- let t = b(), n = e, r = q([]), i = q(/* @__PURE__ */ new Set()), a = q(!1), o = q(!1), s = L(() => [{
1233
+ let t = y(), n = e, r = Y([]), i = Y(/* @__PURE__ */ new Set()), a = Y(!1), o = Y(!1), s = B(() => [{
654
1234
  key: "title",
655
1235
  title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-name", "应用名称"),
656
1236
  width: 260
@@ -658,7 +1238,7 @@ var xt = { class: "password-policy-preview" }, St = {
658
1238
  key: "alias",
659
1239
  title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-alias", "应用 alias"),
660
1240
  width: 220
661
- }]), c = L(() => r.value), l = L(() => ({
1241
+ }]), c = B(() => r.value), l = B(() => ({
662
1242
  selectedRowKeys: [...i.value],
663
1243
  preserveSelectedRowKeys: !0,
664
1244
  disabledOf: (e) => o.value || e.alias === "iam",
@@ -683,9 +1263,9 @@ var xt = { class: "password-policy-preview" }, St = {
683
1263
  run: f
684
1264
  }]);
685
1265
  }
686
- Pe(() => {
1266
+ Ke(() => {
687
1267
  u(), d();
688
- }), X([o, t.revision], u);
1268
+ }), Q([o, t.revision], u);
689
1269
  async function d() {
690
1270
  let e = String(n.context.record?.id ?? "");
691
1271
  if (e) {
@@ -710,7 +1290,7 @@ var xt = { class: "password-policy-preview" }, St = {
710
1290
  let o = new Set(r.value.map((e) => e.alias).filter(Boolean));
711
1291
  i.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
712
1292
  } catch (e) {
713
- N(e, {
1293
+ R(e, {
714
1294
  language: t,
715
1295
  source: "tenant-application-configuration",
716
1296
  phase: "load"
@@ -731,7 +1311,7 @@ var xt = { class: "password-policy-preview" }, St = {
731
1311
  body: { applicationAliases: [...i.value] }
732
1312
  }), n.context.refreshDetailExtensions(), n.context.refreshList(), n.context.close();
733
1313
  } catch (e) {
734
- N(e, {
1314
+ R(e, {
735
1315
  language: t,
736
1316
  source: "tenant-application-configuration",
737
1317
  phase: "action"
@@ -744,14 +1324,14 @@ var xt = { class: "password-policy-preview" }, St = {
744
1324
  function p(e, t) {
745
1325
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
746
1326
  }
747
- return (e, n) => (K(), B("section", Ot, [V("p", null, J(Y(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), U(Y(g), {
1327
+ return (e, n) => (J(), U("section", sn, [W("p", null, X(Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), K(Z(oe), {
748
1328
  columns: s.value,
749
1329
  rows: c.value,
750
1330
  loading: a.value,
751
1331
  pagination: !1,
752
1332
  selection: l.value,
753
1333
  "row-key": (e) => String(e.alias ?? e.id ?? ""),
754
- "empty-description": Y(t).t("platform.screen.TenantApplicationConfigurationDrawer.no-applications-available-for-configuration", "暂无可配置应用")
1334
+ "empty-description": Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.no-applications-available-for-configuration", "暂无可配置应用")
755
1335
  }, null, 8, [
756
1336
  "columns",
757
1337
  "rows",
@@ -761,7 +1341,7 @@ var xt = { class: "password-policy-preview" }, St = {
761
1341
  "empty-description"
762
1342
  ])]));
763
1343
  }
764
- }), [["__scopeId", "data-v-12c39b69"]]), At = {
1344
+ }), [["__scopeId", "data-v-12c39b69"]]), ln = {
765
1345
  id: "iam-tenant-standard-page-enhancement",
766
1346
  target: { moduleAlias: "iam.tenant" },
767
1347
  form: {
@@ -777,8 +1357,8 @@ var xt = { class: "password-policy-preview" }, St = {
777
1357
  },
778
1358
  ...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
779
1359
  fieldName: e,
780
- imageUploadHint: ({ draft: e }, t = T) => e.workbenchBrandMode === "logoOnly" ? t.t("platform.entry.logo-only-mode-supports-landscape-or-square-images-up-to-512-kb", "纯 Logo 模式支持横向或正方形图片(最大 512 KB)") : t.t("platform.entry.logo-and-title-mode-requires-square-images-recommended-128-128-px-up-to-512-kb", "Logo + 标题模式仅支持正方形图片(建议 128 × 128 px,最大 512 KB)"),
781
- imageUploadAdvisory: ({ draft: e }, t = T) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => jt(e, t)
1360
+ imageUploadHint: ({ draft: e }, t = Ce) => e.workbenchBrandMode === "logoOnly" ? t.t("platform.entry.logo-only-mode-supports-landscape-or-square-images-up-to-512-kb", "纯 Logo 模式支持横向或正方形图片(最大 512 KB)") : t.t("platform.entry.logo-and-title-mode-requires-square-images-recommended-128-128-px-up-to-512-kb", "Logo + 标题模式仅支持正方形图片(建议 128 × 128 px,最大 512 KB)"),
1361
+ imageUploadAdvisory: ({ draft: e }, t = Ce) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => un(e, t)
782
1362
  }))
783
1363
  ]
784
1364
  },
@@ -793,7 +1373,7 @@ var xt = { class: "password-policy-preview" }, St = {
793
1373
  title: "配置应用",
794
1374
  titleKey: "platform.entry.configure-applications",
795
1375
  width: "wide",
796
- component: kt
1376
+ component: cn
797
1377
  });
798
1378
  }
799
1379
  }],
@@ -801,14 +1381,14 @@ var xt = { class: "password-policy-preview" }, St = {
801
1381
  key: "tenant-applications",
802
1382
  title: "已开通应用",
803
1383
  titleKey: "platform.entry.provisioned-applications",
804
- component: Dt
1384
+ component: on
805
1385
  }]
806
1386
  }
807
1387
  };
808
- async function jt(e, t) {
1388
+ async function un(e, t) {
809
1389
  if (!e.type.startsWith("image/") || typeof Image > "u") return t.t("platform.entry.logo-and-title-mode-requires-a-readable-square-image", "Logo + 标题模式需要可读取的正方形图片。");
810
1390
  try {
811
- let { width: n, height: r } = await Mt(e), i = n / r;
1391
+ let { width: n, height: r } = await dn(e), i = n / r;
812
1392
  return i >= .9 && i <= 1.1 ? void 0 : t.t("platform.entry.value-is-value-value-px-logo-and-title-mode-only-supports-square-logos", "“{value1}”为 {value2} × {value3} px;Logo + 标题模式仅允许上传正方形 Logo。", {
813
1393
  value1: e.name,
814
1394
  value2: n,
@@ -818,7 +1398,7 @@ async function jt(e, t) {
818
1398
  return t.t("platform.entry.unable-to-read-image-dimensions-select-a-square-png-jpg-or-gif-image", "无法读取图片尺寸,请选择正方形 PNG、JPG 或 GIF 图片。");
819
1399
  }
820
1400
  }
821
- function Mt(e) {
1401
+ function dn(e) {
822
1402
  let t = URL.createObjectURL(e);
823
1403
  return new Promise((e, n) => {
824
1404
  let r = new Image();
@@ -834,24 +1414,24 @@ function Mt(e) {
834
1414
  }
835
1415
  //#endregion
836
1416
  //#region src/platform-admin-runtime/employee/EmployeeAccountDrawer.vue?vue&type=script&setup=true&lang.ts
837
- var Nt = {
1417
+ var fn = {
838
1418
  key: 1,
839
1419
  class: "employee-account-drawer"
840
- }, Pt = { class: "employee-account-existing-picker" }, Ft = /*#__PURE__*/ P(/* @__PURE__ */ G({
1420
+ }, pn = { class: "employee-account-existing-picker" }, mn = /*#__PURE__*/ P(/* @__PURE__ */ q({
841
1421
  name: "EmployeeAccountDrawer",
842
1422
  __name: "EmployeeAccountDrawer",
843
1423
  props: { context: {} },
844
1424
  setup(e) {
845
- let t = b(), n = e, r = q(), i = q(), a = q(""), o = q(""), s = q(!1), c = q(!1);
846
- Pe(() => void l());
1425
+ let t = y(), n = e, r = Y(), i = Y(), a = Y(""), o = Y(""), s = Y(!1), c = Y(!1);
1426
+ Ke(() => void l());
847
1427
  async function l() {
848
- let e = x();
1428
+ let e = v();
849
1429
  if (e) {
850
1430
  s.value = !0;
851
1431
  try {
852
1432
  r.value = await n.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
853
1433
  } catch (e) {
854
- N(e, {
1434
+ R(e, {
855
1435
  language: t,
856
1436
  source: "employee-account",
857
1437
  phase: "load"
@@ -862,11 +1442,11 @@ var Nt = {
862
1442
  }
863
1443
  }
864
1444
  async function u() {
865
- let e = x();
1445
+ let e = v();
866
1446
  if (!e || c.value) return;
867
1447
  let i = a.value.trim();
868
1448
  if (!i || !o.value) {
869
- de(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
1449
+ I(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
870
1450
  language: t,
871
1451
  source: "employee-account",
872
1452
  phase: "validation"
@@ -883,9 +1463,9 @@ var Nt = {
883
1463
  password: o.value
884
1464
  }
885
1465
  });
886
- r.value = A(t).binding, o.value = "", n.context.refreshList();
1466
+ r.value = fe(t).binding, o.value = "", n.context.refreshList();
887
1467
  } catch (e) {
888
- N(e, {
1468
+ R(e, {
889
1469
  language: t,
890
1470
  source: "employee-account",
891
1471
  phase: "action"
@@ -896,10 +1476,10 @@ var Nt = {
896
1476
  }
897
1477
  async function d(e) {
898
1478
  let t = e[0];
899
- t && await p(t.id);
1479
+ t && await f(t.id);
900
1480
  }
901
- async function p(e) {
902
- let a = x();
1481
+ async function f(e) {
1482
+ let a = v();
903
1483
  if (a && e && !c.value) {
904
1484
  c.value = !0;
905
1485
  try {
@@ -907,13 +1487,13 @@ var Nt = {
907
1487
  method: "POST",
908
1488
  path: `/iam.employee/${encodeURIComponent(a)}/account`,
909
1489
  body: { userId: e }
910
- }), i.value = void 0, n.context.refreshList(), de(t.t("platform.screen.EmployeeAccountDrawer.the-account-is-bound-to-this-employee", "账号已绑定到当前职员。"), {
1490
+ }), i.value = void 0, n.context.refreshList(), I(t.t("platform.screen.EmployeeAccountDrawer.the-account-is-bound-to-this-employee", "账号已绑定到当前职员。"), {
911
1491
  language: t,
912
1492
  source: "employee-account",
913
1493
  phase: "action"
914
1494
  });
915
1495
  } catch (e) {
916
- N(e, {
1496
+ R(e, {
917
1497
  language: t,
918
1498
  source: "employee-account",
919
1499
  phase: "action"
@@ -923,8 +1503,8 @@ var Nt = {
923
1503
  }
924
1504
  }
925
1505
  }
926
- async function g(e) {
927
- let t = x();
1506
+ async function m(e) {
1507
+ let t = v();
928
1508
  if (!t) return {
929
1509
  records: [],
930
1510
  total: 0
@@ -941,12 +1521,12 @@ var Nt = {
941
1521
  }
942
1522
  });
943
1523
  return {
944
- records: r.records.map(v),
1524
+ records: r.records.map(g),
945
1525
  total: r.total
946
1526
  };
947
1527
  }
948
- async function _(e) {
949
- let t = x();
1528
+ async function h(e) {
1529
+ let t = v();
950
1530
  return !t || e.length === 0 ? [] : (await n.context.module.http.request({
951
1531
  method: "POST",
952
1532
  path: `/iam.employee/${encodeURIComponent(t)}/account-candidates/query`,
@@ -957,9 +1537,9 @@ var Nt = {
957
1537
  pageSize: e.length
958
1538
  }
959
1539
  }
960
- })).records.map(v);
1540
+ })).records.map(g);
961
1541
  }
962
- function v(e) {
1542
+ function g(e) {
963
1543
  return {
964
1544
  id: e.id,
965
1545
  title: e.username ?? e.id,
@@ -971,9 +1551,9 @@ var Nt = {
971
1551
  departmentName: e.departmentTitle
972
1552
  };
973
1553
  }
974
- async function y() {
975
- let e = x();
976
- if (e && r.value && !c.value && await ce({
1554
+ async function ee() {
1555
+ let e = v();
1556
+ if (e && r.value && !c.value && await p({
977
1557
  title: t.t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户"),
978
1558
  content: t.t("platform.screen.EmployeeAccountDrawer.remove-this-employee-s-account-the-user-account-will-also", "确认移除该职员的账户?该用户账号会同步删除。"),
979
1559
  okText: t.t("platform.screen.RecordPermissionDialog.remove", "移除"),
@@ -986,7 +1566,7 @@ var Nt = {
986
1566
  path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
987
1567
  }), r.value = void 0, n.context.refreshList();
988
1568
  } catch (e) {
989
- N(e, {
1569
+ R(e, {
990
1570
  language: t,
991
1571
  source: "employee-account",
992
1572
  phase: "action"
@@ -996,28 +1576,28 @@ var Nt = {
996
1576
  }
997
1577
  }
998
1578
  }
999
- function x() {
1579
+ function v() {
1000
1580
  let e = n.context.record?.id;
1001
1581
  return e == null ? void 0 : String(e);
1002
1582
  }
1003
- return (e, n) => s.value ? (K(), R(Y(m), {
1583
+ return (e, n) => s.value ? (J(), V(Z(_), {
1004
1584
  key: 0,
1005
- tip: Y(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
1006
- }, null, 8, ["tip"])) : (K(), B("section", Nt, [x() ? r.value ? (K(), B(I, { key: 1 }, [V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + J(r.value.userId ?? "-"), 1), U(Y(f), {
1585
+ tip: Z(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
1586
+ }, null, 8, ["tip"])) : (J(), U("section", fn, [v() ? r.value ? (J(), U(z, { key: 1 }, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), K(Z(L), {
1007
1587
  danger: "",
1008
1588
  "icon-name": "delete",
1009
1589
  loading: c.value,
1010
- onClick: y
1590
+ onClick: ee
1011
1591
  }, {
1012
- default: Z(() => [H(J(Y(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
1592
+ default: $(() => [G(X(Z(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
1013
1593
  _: 1
1014
- }, 8, ["loading"])], 64)) : (K(), B(I, { key: 2 }, [V("section", Pt, [V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), U(Y(h), {
1594
+ }, 8, ["loading"])], 64)) : (J(), U(z, { key: 2 }, [W("section", pn, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), K(Z(se), {
1015
1595
  value: i.value,
1016
1596
  disabled: c.value,
1017
- placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.search-and-select-an-existing-login-account", "搜索并选择已有登录账号"),
1018
- title: Y(t).t("platform.screen.EmployeeAccountDrawer.select-an-existing-login-account", "选择已有登录账号"),
1019
- "search-page": g,
1020
- "resolve-users": _,
1597
+ placeholder: Z(t).t("platform.screen.EmployeeAccountDrawer.search-and-select-an-existing-login-account", "搜索并选择已有登录账号"),
1598
+ title: Z(t).t("platform.screen.EmployeeAccountDrawer.select-an-existing-login-account", "选择已有登录账号"),
1599
+ "search-page": m,
1600
+ "resolve-users": h,
1021
1601
  "onUpdate:value": n[0] ||= (e) => i.value = typeof e == "string" ? e : void 0,
1022
1602
  onSelect: d
1023
1603
  }, null, 8, [
@@ -1025,45 +1605,45 @@ var Nt = {
1025
1605
  "disabled",
1026
1606
  "placeholder",
1027
1607
  "title"
1028
- ])]), V("form", { onSubmit: We(u, ["prevent"]) }, [
1029
- V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.you-can-also-create-a-login-account-and-bind-it", "也可直接创建登录账号并自动绑定到当前职员。")), 1),
1030
- V("label", null, [V("span", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), U(Y(S), {
1608
+ ])]), W("form", { onSubmit: rt(u, ["prevent"]) }, [
1609
+ W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.you-can-also-create-a-login-account-and-bind-it", "也可直接创建登录账号并自动绑定到当前职员。")), 1),
1610
+ W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), K(Z(M), {
1031
1611
  value: a.value,
1032
1612
  "onUpdate:value": n[1] ||= (e) => a.value = e,
1033
1613
  disabled: c.value,
1034
- placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.enter-a-login-account", "请输入登录账号")
1614
+ placeholder: Z(t).t("platform.screen.EmployeeAccountDrawer.enter-a-login-account", "请输入登录账号")
1035
1615
  }, null, 8, [
1036
1616
  "value",
1037
1617
  "disabled",
1038
1618
  "placeholder"
1039
1619
  ])]),
1040
- V("label", null, [V("span", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), U(Y(S), {
1620
+ W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), K(Z(M), {
1041
1621
  value: o.value,
1042
1622
  "onUpdate:value": n[2] ||= (e) => o.value = e,
1043
1623
  type: "password",
1044
1624
  disabled: c.value,
1045
- placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.enter-an-initial-password", "请输入初始密码")
1625
+ placeholder: Z(t).t("platform.screen.EmployeeAccountDrawer.enter-an-initial-password", "请输入初始密码")
1046
1626
  }, null, 8, [
1047
1627
  "value",
1048
1628
  "disabled",
1049
1629
  "placeholder"
1050
1630
  ])]),
1051
- U(Y(f), {
1631
+ K(Z(L), {
1052
1632
  type: "primary",
1053
1633
  "html-type": "submit",
1054
1634
  "icon-name": "plus",
1055
1635
  loading: c.value
1056
1636
  }, {
1057
- default: Z(() => [H(J(Y(t).t("platform.screen.EmployeeAccountDrawer.create-and-bind-account", "创建账号并绑定")), 1)]),
1637
+ default: $(() => [G(X(Z(t).t("platform.screen.EmployeeAccountDrawer.create-and-bind-account", "创建账号并绑定")), 1)]),
1058
1638
  _: 1
1059
1639
  }, 8, ["loading"])
1060
- ], 32)], 64)) : (K(), R(Y(ne), {
1640
+ ], 32)], 64)) : (J(), V(Z(te), {
1061
1641
  key: 0,
1062
- title: Y(t).t("platform.screen.EmployeeAccountDrawer.employee-not-found", "职员不存在"),
1063
- message: Y(t).t("platform.screen.EmployeeAccountDrawer.reopen-the-employee-record-to-set-up-an-account", "请重新打开职员档案后再设置账号。")
1642
+ title: Z(t).t("platform.screen.EmployeeAccountDrawer.employee-not-found", "职员不存在"),
1643
+ message: Z(t).t("platform.screen.EmployeeAccountDrawer.reopen-the-employee-record-to-set-up-an-account", "请重新打开职员档案后再设置账号。")
1064
1644
  }, null, 8, ["title", "message"]))]));
1065
1645
  }
1066
- }), [["__scopeId", "data-v-e343e658"]]), It = {
1646
+ }), [["__scopeId", "data-v-e343e658"]]), hn = {
1067
1647
  id: "iam-employee-account-drawer",
1068
1648
  target: { moduleAlias: "iam.employee" },
1069
1649
  detail: { actions: [{
@@ -1077,26 +1657,26 @@ var Nt = {
1077
1657
  title: "设置账号",
1078
1658
  titleKey: "platform.entry.set-up-account",
1079
1659
  width: "standard",
1080
- component: Ft
1660
+ component: mn
1081
1661
  });
1082
1662
  }
1083
1663
  }] }
1084
- }, Lt = "iam.user.session.collectionChanged", Rt = /* @__PURE__ */ new WeakMap();
1085
- function zt() {
1086
- let e = x(), t = Rt.get(e);
1087
- t || (t = Bt(e), Rt.set(e, t));
1664
+ }, gn = "iam.user.session.collectionChanged", _n = /* @__PURE__ */ new WeakMap();
1665
+ function vn() {
1666
+ let e = f(), t = _n.get(e);
1667
+ t || (t = yn(e), _n.set(e, t));
1088
1668
  let n = t;
1089
- return n.users += 1, Fe(() => {
1090
- --n.users === 0 && (n.dispose(), Rt.delete(e));
1669
+ return n.users += 1, qe(() => {
1670
+ --n.users === 0 && (n.dispose(), _n.delete(e));
1091
1671
  }), {
1092
1672
  observe: n.observe,
1093
1673
  statusOf: n.statusOf,
1094
1674
  refresh: n.refresh
1095
1675
  };
1096
1676
  }
1097
- function Bt(e) {
1098
- let t = q({}), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = !1, o = !1, s = i((e) => {
1099
- Vt(e) && n.has(e.recordId) && u(e.recordId);
1677
+ function yn(e) {
1678
+ let t = Y({}), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, o = !1, s = a((e) => {
1679
+ bn(e) && n.has(e.recordId) && u(e.recordId);
1100
1680
  });
1101
1681
  function c(e) {
1102
1682
  e && !o && (n.add(e), t.value[e] || u(e));
@@ -1105,8 +1685,8 @@ function Bt(e) {
1105
1685
  return e ? t.value[e] : void 0;
1106
1686
  }
1107
1687
  function u(e) {
1108
- e && !o && (r.add(e), !a && (a = !0, queueMicrotask(() => {
1109
- a = !1, o || d();
1688
+ e && !o && (r.add(e), !i && (i = !0, queueMicrotask(() => {
1689
+ i = !1, o || d();
1110
1690
  })));
1111
1691
  }
1112
1692
  async function d() {
@@ -1123,7 +1703,7 @@ function Bt(e) {
1123
1703
  ...Object.fromEntries(r.map((e) => [e.userId, e]))
1124
1704
  };
1125
1705
  } catch (e) {
1126
- o || N(e, {
1706
+ o || R(e, {
1127
1707
  source: "iam-user-online-status",
1128
1708
  phase: "load"
1129
1709
  });
@@ -1139,12 +1719,12 @@ function Bt(e) {
1139
1719
  }
1140
1720
  };
1141
1721
  }
1142
- function Vt(e) {
1143
- return e.type === Lt && e.moduleAlias === "iam.user" && !!e.recordId;
1722
+ function bn(e) {
1723
+ return e.type === gn && e.moduleAlias === "iam.user" && !!e.recordId;
1144
1724
  }
1145
1725
  //#endregion
1146
1726
  //#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
1147
- var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1727
+ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
1148
1728
  name: "UserOnlineStatusCell",
1149
1729
  __name: "UserOnlineStatusCell",
1150
1730
  props: {
@@ -1152,7 +1732,7 @@ var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1152
1732
  column: {}
1153
1733
  },
1154
1734
  setup(e) {
1155
- let t = b(), n = e, r = zt(), i = L(() => n.record.id == null ? void 0 : String(n.record.id)), a = L(() => r.statusOf(i.value)), o = L(() => {
1735
+ let t = y(), n = e, r = vn(), i = B(() => n.record.id == null ? void 0 : String(n.record.id)), a = B(() => r.statusOf(i.value)), o = B(() => {
1156
1736
  let e = a.value;
1157
1737
  if (!e) return "-";
1158
1738
  if (e.present) {
@@ -1170,28 +1750,28 @@ var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1170
1750
  function s() {
1171
1751
  r.observe(i.value);
1172
1752
  }
1173
- return Pe(s), X(i, s), (e, t) => (K(), B("span", { class: je({
1753
+ return Ke(s), Q(i, s), (e, t) => (J(), U("span", { class: He({
1174
1754
  "user-online-status--present": a.value?.present,
1175
1755
  "user-online-status--offline": a.value && !a.value.online
1176
- }) }, J(o.value), 3));
1756
+ }) }, X(o.value), 3));
1177
1757
  }
1178
- }), [["__scopeId", "data-v-56345a12"]]), Ut = {
1758
+ }), [["__scopeId", "data-v-56345a12"]]), Sn = {
1179
1759
  key: 1,
1180
1760
  class: "user-password-drawer"
1181
- }, Wt = { key: 0 }, Gt = {
1761
+ }, Cn = { key: 0 }, wn = {
1182
1762
  key: 1,
1183
1763
  class: "user-password-reset"
1184
- }, Kt = { key: 0 }, qt = /*#__PURE__*/ P(/* @__PURE__ */ G({
1764
+ }, Tn = { key: 0 }, En = /*#__PURE__*/ P(/* @__PURE__ */ q({
1185
1765
  name: "UserPasswordDrawer",
1186
1766
  __name: "UserPasswordDrawer",
1187
1767
  props: { context: {} },
1188
1768
  setup(e) {
1189
- let t = b(), n = e, r = q(""), i = q(), a = q(!1), o = L(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
1769
+ let t = y(), n = e, r = Y(""), i = Y(), a = Y(!1), o = B(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
1190
1770
  async function s() {
1191
1771
  let e = o.value;
1192
1772
  if (e && !a.value && n.context.module.can("changePassword", e) === !0) {
1193
1773
  if (!r.value) {
1194
- de(t.t("platform.screen.UserPasswordDrawer.enter-a-new-password", "请输入新密码。"), {
1774
+ I(t.t("platform.screen.UserPasswordDrawer.enter-a-new-password", "请输入新密码。"), {
1195
1775
  language: t,
1196
1776
  source: "iam-user-password",
1197
1777
  phase: "validation"
@@ -1204,13 +1784,13 @@ var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1204
1784
  method: "POST",
1205
1785
  path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
1206
1786
  body: { password: r.value }
1207
- }), r.value = "", de(t.t("platform.screen.UserPasswordDrawer.password-changed", "密码已修改。"), {
1787
+ }), r.value = "", I(t.t("platform.screen.UserPasswordDrawer.password-changed", "密码已修改。"), {
1208
1788
  language: t,
1209
1789
  source: "iam-user-password",
1210
1790
  phase: "action"
1211
1791
  }), n.context.refreshList(), n.context.refreshDetailExtensions();
1212
1792
  } catch (e) {
1213
- N(e, {
1793
+ R(e, {
1214
1794
  language: t,
1215
1795
  source: "iam-user-password",
1216
1796
  phase: "action"
@@ -1230,7 +1810,7 @@ var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1230
1810
  path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
1231
1811
  }), n.context.refreshList(), n.context.refreshDetailExtensions();
1232
1812
  } catch (e) {
1233
- N(e, {
1813
+ R(e, {
1234
1814
  language: t,
1235
1815
  source: "iam-user-password",
1236
1816
  phase: "action"
@@ -1240,48 +1820,48 @@ var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
1240
1820
  }
1241
1821
  }
1242
1822
  }
1243
- return (n, l) => o.value ? (K(), B("section", Ut, [e.context.module.can("changePassword", o.value) === !0 ? (K(), B("label", Wt, [
1244
- V("span", null, J(Y(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
1245
- U(Y(S), {
1823
+ return (n, l) => o.value ? (J(), U("section", Sn, [e.context.module.can("changePassword", o.value) === !0 ? (J(), U("label", Cn, [
1824
+ W("span", null, X(Z(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
1825
+ K(Z(M), {
1246
1826
  value: r.value,
1247
1827
  "onUpdate:value": l[0] ||= (e) => r.value = e,
1248
1828
  type: "password",
1249
1829
  disabled: a.value,
1250
- placeholder: Y(t).t("platform.screen.App.enter-your-new-password", "请输入新密码")
1830
+ placeholder: Z(t).t("platform.screen.App.enter-your-new-password", "请输入新密码")
1251
1831
  }, null, 8, [
1252
1832
  "value",
1253
1833
  "disabled",
1254
1834
  "placeholder"
1255
1835
  ]),
1256
- U(Y(f), {
1836
+ K(Z(L), {
1257
1837
  type: "primary",
1258
1838
  loading: a.value,
1259
1839
  onClick: s
1260
1840
  }, {
1261
- default: Z(() => [H(J(Y(t).t("platform.screen.LoginView.change-password", "修改密码")), 1)]),
1841
+ default: $(() => [G(X(Z(t).t("platform.screen.LoginView.change-password", "修改密码")), 1)]),
1262
1842
  _: 1
1263
1843
  }, 8, ["loading"])
1264
- ])) : z("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (K(), B("section", Gt, [
1265
- V("p", null, J(Y(t).t("platform.screen.UserPasswordDrawer.generate-a-temporary-password-deliver-it-to-the-user-through", "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。")), 1),
1266
- U(Y(f), {
1844
+ ])) : H("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (J(), U("section", wn, [
1845
+ W("p", null, X(Z(t).t("platform.screen.UserPasswordDrawer.generate-a-temporary-password-deliver-it-to-the-user-through", "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。")), 1),
1846
+ K(Z(L), {
1267
1847
  loading: a.value,
1268
1848
  onClick: c
1269
1849
  }, {
1270
- default: Z(() => [H(J(Y(t).t("platform.screen.UserPasswordDrawer.generate-temporary-password", "生成临时密码")), 1)]),
1850
+ default: $(() => [G(X(Z(t).t("platform.screen.UserPasswordDrawer.generate-temporary-password", "生成临时密码")), 1)]),
1271
1851
  _: 1
1272
1852
  }, 8, ["loading"]),
1273
- i.value ? (K(), B("dl", Kt, [V("div", null, [V("dt", null, J(Y(t).t("platform.screen.UserPasswordDrawer.temporary-password", "临时密码")), 1), V("dd", null, J(i.value.temporaryPassword), 1)]), V("div", null, [V("dt", null, J(Y(t).t("platform.screen.UserPasswordDrawer.expires-at", "失效时间")), 1), V("dd", null, J(i.value.expiresAt ?? "-"), 1)])])) : z("v-if", !0)
1274
- ])) : z("v-if", !0)])) : (K(), R(Y(ne), {
1853
+ i.value ? (J(), U("dl", Tn, [W("div", null, [W("dt", null, X(Z(t).t("platform.screen.UserPasswordDrawer.temporary-password", "临时密码")), 1), W("dd", null, X(i.value.temporaryPassword), 1)]), W("div", null, [W("dt", null, X(Z(t).t("platform.screen.UserPasswordDrawer.expires-at", "失效时间")), 1), W("dd", null, X(i.value.expiresAt ?? "-"), 1)])])) : H("v-if", !0)
1854
+ ])) : H("v-if", !0)])) : (J(), V(Z(te), {
1275
1855
  key: 0,
1276
- title: Y(t).t("platform.screen.UserPasswordDrawer.user-not-found", "用户不存在"),
1277
- message: Y(t).t("platform.screen.UserPasswordDrawer.reopen-the-user-details-to-manage-the-password", "请重新打开用户详情后再管理密码。")
1856
+ title: Z(t).t("platform.screen.UserPasswordDrawer.user-not-found", "用户不存在"),
1857
+ message: Z(t).t("platform.screen.UserPasswordDrawer.reopen-the-user-details-to-manage-the-password", "请重新打开用户详情后再管理密码。")
1278
1858
  }, null, 8, ["title", "message"]));
1279
1859
  }
1280
1860
  }), [["__scopeId", "data-v-891512e0"]]);
1281
1861
  //#endregion
1282
1862
  //#region src/platform-admin-runtime/user/useUserSessionRows.ts
1283
- function Jt(e) {
1284
- let t = e.language ?? T, r = q([]), i = q({}), a = n({ load: async (e) => {
1863
+ function Dn(e) {
1864
+ let t = e.language ?? Ce, n = Y([]), i = Y({}), a = r({ load: async (e) => {
1285
1865
  await Promise.all(e.keys.map((t) => s(t, e.isLatest)));
1286
1866
  } });
1287
1867
  function o(e) {
@@ -1307,8 +1887,8 @@ function Jt(e) {
1307
1887
  });
1308
1888
  } catch (i) {
1309
1889
  if (!r(n)) return;
1310
- let a = F(i);
1311
- N(a, {
1890
+ let a = ie(i);
1891
+ R(a, {
1312
1892
  language: t,
1313
1893
  source: `${e.source}-sessions`,
1314
1894
  phase: "load"
@@ -1321,26 +1901,26 @@ function Jt(e) {
1321
1901
  }
1322
1902
  }
1323
1903
  function c(e, t) {
1324
- let n = String(e.id ?? "");
1325
- n && (r.value = t ? Array.from(/* @__PURE__ */ new Set([...r.value, n])) : r.value.filter((e) => e !== n), t && u(n).records.length === 0 && o(n));
1904
+ let r = String(e.id ?? "");
1905
+ r && (n.value = t ? Array.from(/* @__PURE__ */ new Set([...n.value, r])) : n.value.filter((e) => e !== r), t && u(r).records.length === 0 && o(r));
1326
1906
  }
1327
1907
  function l(e) {
1328
1908
  if (e.type !== "iam.user.session.collectionChanged" || e.moduleAlias !== "iam.user") return;
1329
1909
  let t = String(e.recordId ?? "");
1330
- t && r.value.includes(t) && o(t);
1910
+ t && n.value.includes(t) && o(t);
1331
1911
  }
1332
1912
  function u(e) {
1333
1913
  let n = e ? i.value[e] : void 0;
1334
1914
  return n ? n.failure ? {
1335
1915
  ...n,
1336
- error: M(n.failure, t)
1916
+ error: xe(n.failure, t)
1337
1917
  } : n : {
1338
1918
  records: [],
1339
1919
  loading: !1
1340
1920
  };
1341
1921
  }
1342
1922
  function d() {
1343
- a.reset(), r.value = [], i.value = {};
1923
+ a.reset(), n.value = [], i.value = {};
1344
1924
  }
1345
1925
  function f(e, t) {
1346
1926
  i.value = {
@@ -1358,7 +1938,7 @@ function Jt(e) {
1358
1938
  }
1359
1939
  //#endregion
1360
1940
  //#region src/platform-admin-runtime/userModulePageEnhancement.ts
1361
- var Yt = {
1941
+ var On = {
1362
1942
  id: "iam-user-standard-page-enhancement",
1363
1943
  target: { moduleAlias: "iam.user" },
1364
1944
  navigator: { emptyListScope: ({ currentUser: e, selectedNavigatorRecords: t }) => {
@@ -1371,56 +1951,56 @@ var Yt = {
1371
1951
  list: {
1372
1952
  rowExpansion: {
1373
1953
  key: "iam-user-sessions",
1374
- component: /* @__PURE__ */ G({
1954
+ component: /* @__PURE__ */ q({
1375
1955
  name: "UserSessionListExpansion",
1376
1956
  __name: "UserSessionListExpansion",
1377
1957
  props: { context: {} },
1378
1958
  setup(e) {
1379
- let t = b(), n = e, r = L(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), a = Jt({
1959
+ let t = y(), n = e, r = B(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), i = Dn({
1380
1960
  context: n.context.module,
1381
1961
  source: "iam-user-list-expansion",
1382
1962
  language: t
1383
- }), o = L(() => a.userSessionState(r.value)), s = L(() => o.value.records.filter((e) => !e.current && n.context.module.can("revokeSession", r.value) === !0)), c = L(() => s.value.length > 1 && n.context.module.can("revokeSessions", r.value) === !0);
1384
- X([r, () => n.context.expanded], ([e, t]) => {
1385
- e && a.handleUserRowExpand({ id: e }, t);
1963
+ }), o = B(() => i.userSessionState(r.value)), s = B(() => o.value.records.filter((e) => !e.current && n.context.module.can("revokeSession", r.value) === !0)), c = B(() => s.value.length > 1 && n.context.module.can("revokeSessions", r.value) === !0);
1964
+ Q([r, () => n.context.expanded], ([e, t]) => {
1965
+ e && i.handleUserRowExpand({ id: e }, t);
1386
1966
  }, { immediate: !0 });
1387
- let l = i((e) => a.handleUserSessionBusinessEvent(e));
1388
- Ie(() => {
1389
- l.unsubscribe(), a.reset();
1967
+ let l = a((e) => i.handleUserSessionBusinessEvent(e));
1968
+ Je(() => {
1969
+ l.unsubscribe(), i.reset();
1390
1970
  });
1391
1971
  async function u(e) {
1392
- let i = r.value;
1393
- i && !e.current && n.context.module.can("revokeSession", i) === !0 && await ce({
1972
+ let a = r.value;
1973
+ a && !e.current && n.context.module.can("revokeSession", a) === !0 && await p({
1394
1974
  title: t.t("platform.screen.UserSessionListExpansion.sign-out-session", "下线登录会话"),
1395
1975
  content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-login-session", "确认下线该登录会话?"),
1396
1976
  okText: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-session", "下线"),
1397
1977
  danger: !0
1398
1978
  }, t) && (await n.context.module.http.request({
1399
1979
  method: "POST",
1400
- path: `/iam.user/${encodeURIComponent(i)}/sessions/${encodeURIComponent(e.id)}/revoke`
1401
- }), a.loadUserSessions(i));
1980
+ path: `/iam.user/${encodeURIComponent(a)}/sessions/${encodeURIComponent(e.id)}/revoke`
1981
+ }), i.loadUserSessions(a));
1402
1982
  }
1403
1983
  async function d() {
1404
- let e = r.value, i = s.value.map((e) => e.id);
1405
- e && i.length !== 0 && n.context.module.can("revokeSessions", e) === !0 && await ce({
1984
+ let e = r.value, a = s.value.map((e) => e.id);
1985
+ e && a.length !== 0 && n.context.module.can("revokeSessions", e) === !0 && await p({
1406
1986
  title: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-all-sessions", "全部下线"),
1407
- content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-user-s-value-login-sessions", "确认下线该用户的 {value1} 个登录会话?", { value1: i.length }),
1987
+ content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-user-s-value-login-sessions", "确认下线该用户的 {value1} 个登录会话?", { value1: a.length }),
1408
1988
  okText: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-all-sessions", "全部下线"),
1409
1989
  danger: !0
1410
1990
  }, t) && (await n.context.module.http.request({
1411
1991
  method: "POST",
1412
1992
  path: `/iam.user/${encodeURIComponent(e)}/sessions/revoke`,
1413
- body: { sessionIds: i }
1414
- }), a.loadUserSessions(e));
1993
+ body: { sessionIds: a }
1994
+ }), i.loadUserSessions(e));
1415
1995
  }
1416
- return (t, n) => (K(), R(Y(C), {
1996
+ return (t, n) => (J(), V(Z(Se), {
1417
1997
  embedded: "",
1418
1998
  sessions: o.value.records,
1419
1999
  loading: o.value.loading,
1420
2000
  error: o.value.error,
1421
2001
  "can-revoke": (t) => !t.current && e.context.module.can("revokeSession", r.value) === !0,
1422
2002
  "can-revoke-all": c.value,
1423
- onRefresh: n[0] ||= (e) => Y(a).loadUserSessions(r.value),
2003
+ onRefresh: n[0] ||= (e) => Z(i).loadUserSessions(r.value),
1424
2004
  onRevoke: u,
1425
2005
  onRevokeAll: d
1426
2006
  }, null, 8, [
@@ -1440,7 +2020,7 @@ var Yt = {
1440
2020
  width: "112px",
1441
2021
  align: "center",
1442
2022
  before: "enabled",
1443
- cell: Ht
2023
+ cell: xn
1444
2024
  }]
1445
2025
  },
1446
2026
  detail: { actions: [{
@@ -1455,26 +2035,26 @@ var Yt = {
1455
2035
  title: "密码管理",
1456
2036
  titleKey: "platform.entry.password-management",
1457
2037
  width: "narrow",
1458
- component: qt
2038
+ component: En
1459
2039
  });
1460
2040
  }
1461
2041
  }] }
1462
- }, Xt = "/iam.role/scope-selection/descriptor", Zt = "/iam.role/scope-selection/candidates";
1463
- function Qt(e) {
2042
+ }, kn = "/iam.role/scope-selection/descriptor", An = "/iam.role/scope-selection/candidates";
2043
+ function jn(e) {
1464
2044
  return {
1465
2045
  async descriptor() {
1466
- return $t(await e.request({ path: Xt }));
2046
+ return Mn(await e.request({ path: kn }));
1467
2047
  },
1468
2048
  async candidates(t) {
1469
- let n = mn(t.pageNum) ?? 1, r = mn(t.pageSize) ?? 100;
1470
- return en(await e.request({
2049
+ let n = Kn(t.pageNum) ?? 1, r = Kn(t.pageSize) ?? 100;
2050
+ return Nn(await e.request({
1471
2051
  method: "POST",
1472
- path: Zt,
2052
+ path: An,
1473
2053
  body: {
1474
- navigationKey: dn(t.navigationKey, "navigationKey"),
2054
+ navigationKey: Un(t.navigationKey, "navigationKey"),
1475
2055
  level: t.level,
1476
- keyword: un(t.keyword),
1477
- parentId: un(t.parentId),
2056
+ keyword: Hn(t.keyword),
2057
+ parentId: Hn(t.parentId),
1478
2058
  page: {
1479
2059
  pageNum: n,
1480
2060
  pageSize: r
@@ -1484,35 +2064,35 @@ function Qt(e) {
1484
2064
  }
1485
2065
  };
1486
2066
  }
1487
- function $t(e) {
1488
- let t = sn(e);
2067
+ function Mn(e) {
2068
+ let t = zn(e);
1489
2069
  return {
1490
- directSelections: cn(t.directSelections).flatMap(tn),
1491
- navigations: cn(t.navigations).flatMap(nn)
2070
+ directSelections: Bn(t.directSelections).flatMap(Pn),
2071
+ navigations: Bn(t.navigations).flatMap(Fn)
1492
2072
  };
1493
2073
  }
1494
- function en(e, t) {
1495
- let n = sn(e), r = cn(n.records).flatMap(rn), i = pn(n.pageNum) ?? t, a = pn(n.pages), o = fn(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
2074
+ function Nn(e, t) {
2075
+ let n = zn(e), r = Bn(n.records).flatMap(In), i = Gn(n.pageNum) ?? t, a = Gn(n.pages), o = Wn(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
1496
2076
  return {
1497
2077
  records: r,
1498
2078
  hasMore: o,
1499
2079
  ...o ? { nextPage: i + 1 } : {}
1500
2080
  };
1501
2081
  }
1502
- function tn(e) {
1503
- let t = sn(e), n = ln(t.selectionKey);
2082
+ function Pn(e) {
2083
+ let t = zn(e), n = Vn(t.selectionKey);
1504
2084
  if (!n) return [];
1505
- let r = ln(t.title ?? t.label) ?? n, i = an(t.titleText, r);
2085
+ let r = Vn(t.title ?? t.label) ?? n, i = Ln(t.titleText, r);
1506
2086
  return [{
1507
2087
  selectionKey: n,
1508
2088
  label: r,
1509
2089
  ...i ? { labelText: i } : {}
1510
2090
  }];
1511
2091
  }
1512
- function nn(e) {
1513
- let t = sn(e), n = ln(t.navigationKey), r = on(t.level);
2092
+ function Fn(e) {
2093
+ let t = zn(e), n = Vn(t.navigationKey), r = Rn(t.level);
1514
2094
  if (!n || !r) return [];
1515
- let i = ln(t.title ?? t.label) ?? n, a = an(t.titleText, i);
2095
+ let i = Vn(t.title ?? t.label) ?? n, a = Ln(t.titleText, i);
1516
2096
  return [{
1517
2097
  navigationKey: n,
1518
2098
  level: r,
@@ -1520,22 +2100,22 @@ function nn(e) {
1520
2100
  ...a ? { labelText: a } : {}
1521
2101
  }];
1522
2102
  }
1523
- function rn(e) {
1524
- let t = sn(e), n = ln(t.id), r = ln(t.selectionKey);
2103
+ function In(e) {
2104
+ let t = zn(e), n = Vn(t.id), r = Vn(t.selectionKey);
1525
2105
  return !n || !r ? [] : [{
1526
2106
  id: n,
1527
2107
  selectionKey: r,
1528
- label: ln(t.title ?? t.label) ?? r,
1529
- ...ln(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: ln(t.subtitle ?? t.secondaryLabel) } : {},
1530
- expandable: fn(t.expandable, !1)
2108
+ label: Vn(t.title ?? t.label) ?? r,
2109
+ ...Vn(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: Vn(t.subtitle ?? t.secondaryLabel) } : {},
2110
+ expandable: Wn(t.expandable, !1)
1531
2111
  }];
1532
2112
  }
1533
- function an(e, t) {
1534
- let n = sn(e), r = n.source;
1535
- if (!ue(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !_(r, t)) return;
2113
+ function Ln(e, t) {
2114
+ let n = zn(e), r = n.source;
2115
+ if (!O(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !A(r, t)) return;
1536
2116
  let i = {};
1537
- for (let [e, t] of Object.entries(sn(n.languages))) {
1538
- let n = sn(t);
2117
+ for (let [e, t] of Object.entries(zn(n.languages))) {
2118
+ let n = zn(t);
1539
2119
  typeof n.text == "string" && n.requestedTag === e && typeof n.missing == "boolean" && typeof n.fallback == "boolean" && (i[e] = {
1540
2120
  text: n.text,
1541
2121
  requestedTag: e,
@@ -1549,76 +2129,76 @@ function an(e, t) {
1549
2129
  languages: i
1550
2130
  } : void 0;
1551
2131
  }
1552
- function on(e) {
2132
+ function Rn(e) {
1553
2133
  return e === "TENANT" || e === "ORGANIZATION" ? e : void 0;
1554
2134
  }
1555
- function sn(e) {
2135
+ function zn(e) {
1556
2136
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
1557
2137
  }
1558
- function cn(e) {
2138
+ function Bn(e) {
1559
2139
  return Array.isArray(e) ? e : [];
1560
2140
  }
1561
- function ln(e) {
1562
- return typeof e == "string" ? un(e) : void 0;
2141
+ function Vn(e) {
2142
+ return typeof e == "string" ? Hn(e) : void 0;
1563
2143
  }
1564
- function un(e) {
2144
+ function Hn(e) {
1565
2145
  return e?.trim() || void 0;
1566
2146
  }
1567
- function dn(e, t) {
1568
- let n = un(e);
2147
+ function Un(e, t) {
2148
+ let n = Hn(e);
1569
2149
  if (!n) throw Error(`角色归属范围${t}不能为空`);
1570
2150
  return n;
1571
2151
  }
1572
- function fn(e, t) {
2152
+ function Wn(e, t) {
1573
2153
  return typeof e == "boolean" ? e : t;
1574
2154
  }
1575
- function pn(e) {
2155
+ function Gn(e) {
1576
2156
  return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
1577
2157
  }
1578
- function mn(e) {
2158
+ function Kn(e) {
1579
2159
  return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
1580
2160
  }
1581
2161
  //#endregion
1582
2162
  //#region src/platform-admin-runtime/role/RoleScopeTree.vue
1583
- var hn = /* @__PURE__ */ G({
2163
+ var qn = /* @__PURE__ */ q({
1584
2164
  name: "RoleScopeTree",
1585
2165
  __name: "RoleScopeTree",
1586
2166
  props: { context: {} },
1587
2167
  setup(e) {
1588
- let t = b(), n = e, r = Qt(x()), i = q(), a = q(""), o = q(!1), s = q([]), c = q([]), l = q(0), d = q(/* @__PURE__ */ new Map()), f = L(() => n.context.selectionKey), h = L(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), g = L(() => i.value?.navigations.length !== 0), _ = L(() => h.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), v = p({
2168
+ let t = y(), n = e, r = jn(f()), i = Y(), a = Y(""), o = Y(!1), s = Y([]), c = Y([]), l = Y(0), u = Y(/* @__PURE__ */ new Map()), d = B(() => n.context.selectionKey), p = B(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), m = B(() => i.value?.navigations.length !== 0), h = B(() => p.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), g = E({
1589
2169
  nodes: () => s.value,
1590
- loader: () => ie,
2170
+ loader: () => j,
1591
2171
  version: () => l.value
1592
- }), y = L(() => S(v.nodes.value));
1593
- function S(e) {
2172
+ }), ee = B(() => v(g.nodes.value));
2173
+ function v(e) {
1594
2174
  return e.map((e) => ({
1595
2175
  ...e,
1596
- title: pe(e.title, d.value.get(e.key)?.labelText, t),
1597
- ...e.children ? { children: S(e.children) } : {}
2176
+ title: ye(e.title, u.value.get(e.key)?.labelText, t),
2177
+ ...e.children ? { children: v(e.children) } : {}
1598
2178
  }));
1599
2179
  }
1600
- let C = v.states, w = 0, T;
1601
- Pe(() => void E()), Ne(() => {
1602
- w += 1, T && clearTimeout(T);
1603
- }), X(a, () => {
1604
- g.value && (T && clearTimeout(T), T = setTimeout(() => void O(), 240));
2180
+ let b = g.states, x = 0, S;
2181
+ Ke(() => void C()), Ge(() => {
2182
+ x += 1, S && clearTimeout(S);
2183
+ }), Q(a, () => {
2184
+ m.value && (S && clearTimeout(S), S = setTimeout(() => void D(), 240));
1605
2185
  });
1606
- async function E() {
2186
+ async function C() {
1607
2187
  o.value = !0;
1608
2188
  try {
1609
2189
  i.value = await r.descriptor();
1610
2190
  let e = i.value.directSelections[0], t = i.value.directSelections.find((e) => e.selectionKey === n.context.selectionKey);
1611
- t?.labelText && oe({
2191
+ t?.labelText && N({
1612
2192
  key: t.selectionKey,
1613
2193
  label: t.label,
1614
2194
  labelText: t.labelText
1615
- }), !n.context.selectionKey && e && oe({
2195
+ }), !n.context.selectionKey && e && N({
1616
2196
  key: e.selectionKey,
1617
2197
  label: e.label,
1618
2198
  labelText: e.labelText
1619
- }), await D();
2199
+ }), await T();
1620
2200
  } catch (e) {
1621
- N(e, {
2201
+ R(e, {
1622
2202
  language: t,
1623
2203
  source: "role-scope-tree",
1624
2204
  phase: "load"
@@ -1627,34 +2207,34 @@ var hn = /* @__PURE__ */ G({
1627
2207
  o.value = !1;
1628
2208
  }
1629
2209
  }
1630
- async function D(e = {}) {
2210
+ async function T(e = {}) {
1631
2211
  let n = i.value;
1632
2212
  if (!n) return;
1633
- let r = ++w;
2213
+ let r = ++x;
1634
2214
  if (!e.append) {
1635
2215
  c.value = [], l.value += 1, o.value = !0;
1636
2216
  try {
1637
- let e = ee(n);
1638
- if (r !== w) return;
1639
- d.value = /* @__PURE__ */ new Map(), k(e), s.value = e.map((e) => e.ui);
2217
+ let e = O(n);
2218
+ if (r !== x) return;
2219
+ u.value = /* @__PURE__ */ new Map(), ne(e), s.value = e.map((e) => e.ui);
1640
2220
  } catch (e) {
1641
- if (r !== w) return;
1642
- s.value = [], N(e, {
2221
+ if (r !== x) return;
2222
+ s.value = [], R(e, {
1643
2223
  language: t,
1644
2224
  source: "role-scope-tree",
1645
2225
  phase: "load"
1646
2226
  });
1647
2227
  } finally {
1648
- r === w && (o.value = !1);
2228
+ r === x && (o.value = !1);
1649
2229
  }
1650
2230
  }
1651
2231
  }
1652
- async function O() {
1653
- if (await D(), !a.value.trim()) return;
2232
+ async function D() {
2233
+ if (await T(), !a.value.trim()) return;
1654
2234
  let e = (i.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
1655
- c.value = e, await Ae(), await Promise.all(e.map((e) => v.request(e, "refresh")));
2235
+ c.value = e, await Ve(), await Promise.all(e.map((e) => g.request(e, "refresh")));
1656
2236
  }
1657
- function ee(e) {
2237
+ function O(e) {
1658
2238
  return [
1659
2239
  ...e.directSelections.map((e) => ({
1660
2240
  ui: {
@@ -1687,8 +2267,8 @@ var hn = /* @__PURE__ */ G({
1687
2267
  }
1688
2268
  };
1689
2269
  }
1690
- function ne(e, t, n) {
1691
- let r = re(e, t, n);
2270
+ function k(e, t, n) {
2271
+ let r = A(e, t, n);
1692
2272
  return {
1693
2273
  ui: {
1694
2274
  key: e.selectionKey,
@@ -1704,7 +2284,7 @@ var hn = /* @__PURE__ */ G({
1704
2284
  children: r
1705
2285
  };
1706
2286
  }
1707
- function re(e, t, n) {
2287
+ function A(e, t, n) {
1708
2288
  return t === "TENANT" ? {
1709
2289
  navigationKey: e.selectionKey,
1710
2290
  level: "ORGANIZATION"
@@ -1714,8 +2294,8 @@ var hn = /* @__PURE__ */ G({
1714
2294
  parentId: e.id
1715
2295
  } : void 0;
1716
2296
  }
1717
- async function ie(e, n) {
1718
- let i = d.value.get(e.key);
2297
+ async function j(e, n) {
2298
+ let i = u.value.get(e.key);
1719
2299
  if (!i?.children) throw Error(t.t("platform.screen.RoleScopeTree.the-role-ownership-scope-is-no-longer-available", "角色归属范围已失效"));
1720
2300
  try {
1721
2301
  let e = await r.candidates({
@@ -1724,71 +2304,71 @@ var hn = /* @__PURE__ */ G({
1724
2304
  pageNum: n.reason === "load-more" ? Number(n.cursor) : 1
1725
2305
  });
1726
2306
  n.signal.throwIfAborted();
1727
- let t = e.records.map((e) => ne(e, i.children.level, i.children.navigationKey));
1728
- return k(t), {
2307
+ let t = e.records.map((e) => k(e, i.children.level, i.children.navigationKey));
2308
+ return ne(t), {
1729
2309
  mode: n.reason === "load-more" ? "append" : "replace",
1730
2310
  nodes: t.map((e) => e.ui),
1731
2311
  hasMore: e.hasMore,
1732
2312
  nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
1733
2313
  };
1734
2314
  } catch (e) {
1735
- throw n.signal.aborted || N(e, {
2315
+ throw n.signal.aborted || R(e, {
1736
2316
  language: t,
1737
2317
  source: "role-scope-tree",
1738
2318
  phase: "load"
1739
2319
  }), e;
1740
2320
  }
1741
2321
  }
1742
- function k(e) {
1743
- let t = new Map(d.value);
1744
- e.forEach((e) => t.set(e.ui.key, e)), d.value = t;
2322
+ function ne(e) {
2323
+ let t = new Map(u.value);
2324
+ e.forEach((e) => t.set(e.ui.key, e)), u.value = t;
1745
2325
  }
1746
- function ae(e) {
1747
- let t = d.value.get(e.key)?.selection;
1748
- t && oe(t);
2326
+ function M(e) {
2327
+ let t = u.value.get(e.key)?.selection;
2328
+ t && N(t);
1749
2329
  }
1750
- function oe(e) {
2330
+ function N(e) {
1751
2331
  n.context.selectSelectionKey(e.key, {
1752
2332
  label: e.label,
1753
2333
  ...e.labelText ? { labelText: e.labelText } : {},
1754
2334
  secondaryLabel: e.secondaryLabel
1755
2335
  });
1756
2336
  }
1757
- function se() {
2337
+ function P() {
1758
2338
  let e = i.value?.directSelections[0];
1759
- e && oe({
2339
+ e && N({
1760
2340
  key: e.selectionKey,
1761
2341
  label: e.label,
1762
2342
  labelText: e.labelText
1763
2343
  });
1764
2344
  }
1765
- return (e, n) => (K(), R(Y(u), {
2345
+ return (e, n) => (J(), V(Z(_e), {
1766
2346
  class: "role-scope-tree",
1767
- title: _.value,
1768
- "refresh-title": Y(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
2347
+ title: h.value,
2348
+ "refresh-title": Z(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
1769
2349
  "search-keyword": a.value,
1770
- "search-placeholder": Y(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
1771
- searchable: g.value,
1772
- onRefresh: D,
2350
+ "search-placeholder": Z(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
2351
+ searchable: m.value,
2352
+ onRefresh: T,
1773
2353
  "onUpdate:searchKeyword": n[3] ||= (e) => a.value = e
1774
2354
  }, {
1775
- default: Z(() => [o.value ? (K(), R(Y(m), {
2355
+ default: $(() => [o.value ? (J(), V(Z(_), {
1776
2356
  key: 0,
1777
- tip: Y(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
1778
- }, null, 8, ["tip"])) : (K(), R(Y(j), {
2357
+ tip: Z(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
2358
+ }, null, 8, ["tip"])) : (J(), V(Z(w), {
1779
2359
  key: 1,
1780
2360
  "expanded-keys": c.value,
1781
2361
  "onUpdate:expandedKeys": n[0] ||= (e) => c.value = e,
1782
- nodes: y.value,
1783
- "selected-key": f.value,
2362
+ nodes: ee.value,
2363
+ "selected-key": d.value,
1784
2364
  "reload-key": l.value,
1785
2365
  "load-strategy": "controlled",
1786
2366
  "reload-on-reexpand": "",
1787
- "branch-states": Y(C),
1788
- onLoadRequest: n[1] ||= (e) => Y(v).request(e.node.key, e.reason, Y(v).stateOf(e.node.key).status === "error"),
1789
- onSelect: ae,
1790
- onDeselect: se,
1791
- onUnloadChildren: n[2] ||= (e) => Y(v).release(e.key)
2367
+ "branch-states": Z(b),
2368
+ onLoadRequest: n[1] ||= (e) => Z(g).request(e.node.key, e.reason, Z(g).stateOf(e.node.key).status === "error"),
2369
+ onSelect: M,
2370
+ onDeselect: P,
2371
+ onUnloadChildren: n[2] ||= (e) => Z(g).release(e.key)
1792
2372
  }, null, 8, [
1793
2373
  "expanded-keys",
1794
2374
  "nodes",
@@ -1805,7 +2385,7 @@ var hn = /* @__PURE__ */ G({
1805
2385
  "searchable"
1806
2386
  ]));
1807
2387
  }
1808
- }), gn = /* @__PURE__ */ G({
2388
+ }), Jn = /* @__PURE__ */ q({
1809
2389
  name: "RoleEnumTitleCell",
1810
2390
  __name: "RoleEnumTitleCell",
1811
2391
  props: {
@@ -1813,7 +2393,7 @@ var hn = /* @__PURE__ */ G({
1813
2393
  column: {}
1814
2394
  },
1815
2395
  setup(e) {
1816
- let t = b(), n = e, r = L(() => {
2396
+ let t = y(), n = e, r = B(() => {
1817
2397
  let e = String(n.record[n.column?.key ?? ""] ?? "");
1818
2398
  return {
1819
2399
  account: t.t("platform.screen.RoleManagementView.account-role", "账号角色"),
@@ -1828,12 +2408,12 @@ var hn = /* @__PURE__ */ G({
1828
2408
  platform: t.t("platform.screen.RoleManagementView.globally-visible", "全局公开")
1829
2409
  }[e] ?? (e || "-");
1830
2410
  });
1831
- return (e, t) => (K(), B("span", null, J(r.value), 1));
2411
+ return (e, t) => (J(), U("span", null, X(r.value), 1));
1832
2412
  }
1833
2413
  });
1834
2414
  //#endregion
1835
2415
  //#region src/views/roleGrantClient.ts
1836
- function _n(e) {
2416
+ function Yn(e) {
1837
2417
  return {
1838
2418
  accountRoleGrants(t, n) {
1839
2419
  return e.request({
@@ -1939,19 +2519,19 @@ function _n(e) {
1939
2519
  }
1940
2520
  //#endregion
1941
2521
  //#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
1942
- var vn = {
2522
+ var Xn = {
1943
2523
  key: 1,
1944
2524
  class: "role-account-grant-drawer-state"
1945
- }, yn = {
2525
+ }, Zn = {
1946
2526
  key: 0,
1947
2527
  class: "role-account-grant-target-tenant"
1948
- }, bn = {
2528
+ }, Qn = {
1949
2529
  key: 1,
1950
2530
  class: "role-account-grant-target-hint"
1951
- }, xn = { class: "role-account-grant-search" }, Sn = {
2531
+ }, $n = { class: "role-account-grant-search" }, er = {
1952
2532
  key: 0,
1953
2533
  class: "role-account-grant-selected"
1954
- }, Cn = { class: "role-account-grant-selected-title" }, wn = { class: "role-account-grant-selected-list" }, Tn = ["disabled", "onClick"], En = 20, Dn = /*#__PURE__*/ P(/* @__PURE__ */ G({
2534
+ }, tr = { class: "role-account-grant-selected-title" }, nr = { class: "role-account-grant-selected-list" }, rr = ["disabled", "onClick"], ir = 20, ar = /*#__PURE__*/ P(/* @__PURE__ */ q({
1955
2535
  name: "RoleAccountGrantDrawer",
1956
2536
  __name: "RoleAccountGrantDrawer",
1957
2537
  props: {
@@ -1964,25 +2544,25 @@ var vn = {
1964
2544
  },
1965
2545
  emits: ["close", "saved"],
1966
2546
  setup(e, { emit: t }) {
1967
- let n = b(), r = e, i = t, a = q([]), o = q({}), s = q([]), c = q(/* @__PURE__ */ new Set()), l = q(/* @__PURE__ */ new Set()), u = q(""), d = q(""), p = q(1), h = q(0), g = q(!1), _ = q(!1), y = q(!1), x = q(!1), C = q(), w = L(() => _n(r.context.http)), T = v({ moduleAlias: "iam.tenant" }), E = L(() => r.role?.id), O = L(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: Ae(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), ee = L(() => r.embedded ? "section" : D), te = L(() => r.embedded ? {} : {
2547
+ let n = y(), r = e, i = t, a = Y([]), o = Y({}), s = Y([]), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(""), d = Y(""), f = Y(1), p = Y(0), m = Y(!1), h = Y(!1), v = Y(!1), b = Y(!1), x = Y(), S = B(() => Yn(r.context.http)), C = we({ moduleAlias: "iam.tenant" }), w = B(() => r.role?.id), T = B(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: De(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), E = B(() => r.embedded ? "section" : ee), D = B(() => r.embedded ? {} : {
1968
2548
  open: r.open,
1969
- title: O.value,
2549
+ title: T.value,
1970
2550
  renderMode: r.container ? "inline" : "portal",
1971
2551
  closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
1972
- onClose: xe
1973
- }), re = L(() => r.role?.ownerScopeType === "platform"), ie = L(() => C.value?.id), k = L(() => !re.value || !!ie.value), ae = L(() => T), oe = L(() => {
2552
+ onClose: ge
2553
+ }), O = B(() => r.role?.ownerScopeType === "platform"), k = B(() => x.value?.id), A = B(() => !O.value || !!k.value), j = B(() => C), ne = B(() => {
1974
2554
  let e = /* @__PURE__ */ new Map();
1975
2555
  for (let t of a.value) t.userId && e.set(t.userId, t);
1976
2556
  return e;
1977
- }), se = L(() => s.value.filter((e) => e.id).map((e) => ({
2557
+ }), N = B(() => s.value.filter((e) => e.id).map((e) => ({
1978
2558
  id: e.id,
1979
- username: G(e),
2559
+ username: Te(e),
1980
2560
  employeeNo: e.employeeNo ?? "",
1981
2561
  employeeTitle: e.employeeTitle ?? "",
1982
2562
  organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
1983
2563
  departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
1984
2564
  boundTitle: l.value.has(e.id) ? n.t("platform.screen.RoleAccountGrantDrawer.assigned", "已绑定") : n.t("platform.screen.MetadataGovernanceSurface.unbound", "未绑定")
1985
- }))), ce = L(() => [...c.value].map((e) => o.value[e] ?? W(e))), A = L(() => [...c.value].filter((e) => !l.value.has(e))), ue = L(() => [...l.value].filter((e) => !c.value.has(e))), j = L(() => A.value.length > 0 || ue.value.length > 0), de = {
2565
+ }))), P = B(() => [...c.value].map((e) => o.value[e] ?? Ce(e))), F = B(() => [...c.value].filter((e) => !l.value.has(e))), re = B(() => [...l.value].filter((e) => !c.value.has(e))), I = B(() => F.value.length > 0 || re.value.length > 0), ie = {
1986
2566
  rowKey: "id",
1987
2567
  columns: [
1988
2568
  {
@@ -2016,143 +2596,143 @@ var vn = {
2016
2596
  width: 90
2017
2597
  }
2018
2598
  ]
2019
- }, M = L(() => ({
2599
+ }, ae = B(() => ({
2020
2600
  selectedRowKeys: [...c.value],
2021
2601
  preserveSelectedRowKeys: !0,
2022
- disabledOf: () => y.value,
2602
+ disabledOf: () => v.value,
2023
2603
  onChange: (e) => {
2024
2604
  c.value = new Set(e.map((e) => String(e)));
2025
2605
  }
2026
- })), P = L(() => ({
2027
- current: p.value,
2028
- total: h.value,
2029
- pageSize: En,
2606
+ })), oe = B(() => ({
2607
+ current: f.value,
2608
+ total: p.value,
2609
+ pageSize: ir,
2030
2610
  showSizeChanger: !1,
2031
2611
  showQuickJumper: !1,
2032
- onChange: (e) => void _e(e)
2612
+ onChange: (e) => void fe(e)
2033
2613
  }));
2034
- X(() => [r.open, r.role?.id], ([e]) => {
2035
- e ? ge() : Se();
2036
- }, { immediate: !0 }), X([
2614
+ Q(() => [r.open, r.role?.id], ([e]) => {
2615
+ e ? ue() : _e();
2616
+ }, { immediate: !0 }), Q([
2037
2617
  () => r.embedded,
2038
2618
  () => r.drawerContext,
2039
2619
  c,
2040
- j,
2041
- k,
2620
+ I,
2042
2621
  A,
2043
- ue,
2044
- y,
2045
- g
2046
- ], F, { immediate: !0 }), Ne(() => r.drawerContext?.setOperation(void 0));
2047
- function F() {
2622
+ F,
2623
+ re,
2624
+ v,
2625
+ m
2626
+ ], se, { immediate: !0 }), Ge(() => r.drawerContext?.setOperation(void 0));
2627
+ function se() {
2048
2628
  let e = r.drawerContext;
2049
2629
  r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
2050
- value1: Ae(r.role ?? {}),
2051
- value2: Me(r.role)
2630
+ value1: De(r.role ?? {}),
2631
+ value2: Oe(r.role)
2052
2632
  })), e.setOperation({
2053
- summary: pe(),
2633
+ summary: le(),
2054
2634
  actions: [{
2055
2635
  key: "cancel-account-role-grants",
2056
2636
  label: n.t("platform.action.cancel", "取消"),
2057
- disabled: y.value || g.value,
2058
- run: xe
2637
+ disabled: v.value || m.value,
2638
+ run: ge
2059
2639
  }, {
2060
2640
  key: "save-account-role-grants",
2061
2641
  label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
2062
2642
  emphasis: "primary",
2063
- disabled: g.value || !k.value || !j.value,
2064
- loading: y.value,
2065
- run: () => void be()
2643
+ disabled: m.value || !A.value || !I.value,
2644
+ loading: v.value,
2645
+ run: () => void he()
2066
2646
  }]
2067
2647
  }));
2068
2648
  }
2069
- function pe() {
2070
- return k.value ? j.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
2649
+ function le() {
2650
+ return A.value ? I.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
2071
2651
  value1: c.value.size,
2072
- value2: A.value.length,
2073
- value3: ue.value.length
2652
+ value2: F.value.length,
2653
+ value3: re.value.length
2074
2654
  }) : n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected", "已选 {value1} 个用户", { value1: c.value.size }) : n.t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant", "请选择目标租户");
2075
2655
  }
2076
- async function ge() {
2077
- let e = E.value;
2656
+ async function ue() {
2657
+ let e = w.value;
2078
2658
  if (!e) {
2079
- Se();
2659
+ _e();
2080
2660
  return;
2081
2661
  }
2082
- if (!k.value) {
2083
- Ce();
2662
+ if (!A.value) {
2663
+ ve();
2084
2664
  return;
2085
2665
  }
2086
- g.value = !0, x.value = !1;
2666
+ m.value = !0, b.value = !1;
2087
2667
  try {
2088
- let t = await w.value.accountRoleGrants(e, ie.value);
2668
+ let t = await S.value.accountRoleGrants(e, k.value);
2089
2669
  a.value = t;
2090
2670
  let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
2091
- l.value = n, c.value = new Set(n), o.value = Ee([...t.map((e) => W(e.userId)).filter((e) => !!e)]), await _e(1);
2671
+ l.value = n, c.value = new Set(n), o.value = Se([...t.map((e) => Ce(e.userId)).filter((e) => !!e)]), await fe(1);
2092
2672
  } catch (e) {
2093
- x.value = !0, N(e, {
2673
+ b.value = !0, R(e, {
2094
2674
  language: n,
2095
2675
  source: "role-account-grants",
2096
2676
  phase: "load"
2097
2677
  });
2098
2678
  } finally {
2099
- g.value = !1;
2679
+ m.value = !1;
2100
2680
  }
2101
2681
  }
2102
- async function _e(e) {
2103
- let t = E.value;
2104
- if (t && k.value) {
2105
- _.value = !0;
2682
+ async function fe(e) {
2683
+ let t = w.value;
2684
+ if (t && A.value) {
2685
+ h.value = !0;
2106
2686
  try {
2107
- let n = await w.value.accountRoleCandidates(t, {
2108
- targetTenantId: ie.value,
2687
+ let n = await S.value.accountRoleCandidates(t, {
2688
+ targetTenantId: k.value,
2109
2689
  keyword: d.value,
2110
2690
  enabledOnly: !0,
2111
2691
  page: {
2112
2692
  pageNum: Math.max(0, e),
2113
- pageSize: En
2693
+ pageSize: ir
2114
2694
  }
2115
2695
  });
2116
2696
  s.value = n.records, o.value = {
2117
2697
  ...o.value,
2118
- ...Ee(n.records)
2119
- }, p.value = n.pageNum, h.value = n.total;
2698
+ ...Se(n.records)
2699
+ }, f.value = n.pageNum, p.value = n.total;
2120
2700
  } catch (e) {
2121
- N(e, {
2701
+ R(e, {
2122
2702
  language: n,
2123
2703
  source: "role-account-grants",
2124
2704
  phase: "load"
2125
2705
  });
2126
2706
  } finally {
2127
- _.value = !1;
2707
+ h.value = !1;
2128
2708
  }
2129
2709
  }
2130
2710
  }
2131
- function ve() {
2132
- d.value = u.value.trim(), _e(0);
2711
+ function pe() {
2712
+ d.value = u.value.trim(), fe(0);
2133
2713
  }
2134
- function ye(e, t) {
2714
+ function me(e, t) {
2135
2715
  let n = new Set(c.value);
2136
2716
  t ? n.add(e) : n.delete(e), c.value = n;
2137
2717
  }
2138
- async function be() {
2139
- let e = E.value;
2140
- if (e && k.value) {
2141
- if (!j.value) {
2718
+ async function he() {
2719
+ let e = w.value;
2720
+ if (e && A.value) {
2721
+ if (!I.value) {
2142
2722
  i("close");
2143
2723
  return;
2144
2724
  }
2145
- y.value = !0;
2725
+ v.value = !0;
2146
2726
  try {
2147
- for (let t of A.value) await w.value.grantAccountRole(e, {
2727
+ for (let t of F.value) await S.value.grantAccountRole(e, {
2148
2728
  userId: t,
2149
- targetTenantId: ie.value
2729
+ targetTenantId: k.value
2150
2730
  });
2151
- for (let t of ue.value) {
2152
- let n = oe.value.get(t)?.id;
2153
- n && await w.value.deleteAccountRoleGrant(e, n, ie.value);
2731
+ for (let t of re.value) {
2732
+ let n = ne.value.get(t)?.id;
2733
+ n && await S.value.deleteAccountRoleGrant(e, n, k.value);
2154
2734
  }
2155
- await fe({
2735
+ await ce({
2156
2736
  success: !0,
2157
2737
  message: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
2158
2738
  }, {
@@ -2162,120 +2742,120 @@ var vn = {
2162
2742
  fallbackMessage: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
2163
2743
  }), i("saved"), i("close");
2164
2744
  } catch (e) {
2165
- N(e, {
2745
+ R(e, {
2166
2746
  language: n,
2167
2747
  source: "role-account-grants",
2168
2748
  phase: "action"
2169
2749
  });
2170
2750
  } finally {
2171
- y.value = !1;
2751
+ v.value = !1;
2172
2752
  }
2173
2753
  }
2174
2754
  }
2175
- function xe() {
2176
- y.value || i("close");
2755
+ function ge() {
2756
+ v.value || i("close");
2177
2757
  }
2178
- function Se() {
2179
- C.value = void 0, Ce();
2758
+ function _e() {
2759
+ x.value = void 0, ve();
2180
2760
  }
2181
- function Ce() {
2182
- a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", p.value = 1, h.value = 0, g.value = !1, _.value = !1, y.value = !1, x.value = !1;
2761
+ function ve() {
2762
+ a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", f.value = 1, p.value = 0, m.value = !1, h.value = !1, v.value = !1, b.value = !1;
2183
2763
  }
2184
- async function we(e) {
2764
+ async function ye(e) {
2185
2765
  if (!e) {
2186
- C.value = void 0, Ce();
2766
+ x.value = void 0, ve();
2187
2767
  return;
2188
2768
  }
2189
- let t = await T.crud.view(e);
2190
- C.value = t ?? {
2769
+ let t = await C.crud.view(e);
2770
+ x.value = t ?? {
2191
2771
  id: e,
2192
2772
  title: e
2193
- }, await ge();
2773
+ }, await ue();
2194
2774
  }
2195
- function Te(e) {
2196
- ye(e, !1);
2775
+ function xe(e) {
2776
+ me(e, !1);
2197
2777
  }
2198
- function Ee(e) {
2778
+ function Se(e) {
2199
2779
  let t = {};
2200
2780
  for (let n of e) n.id && (t[n.id] = n);
2201
2781
  return t;
2202
2782
  }
2203
- function W(e) {
2783
+ function Ce(e) {
2204
2784
  return e ? {
2205
2785
  id: e,
2206
2786
  username: e
2207
2787
  } : void 0;
2208
2788
  }
2209
- function G(e) {
2789
+ function Te(e) {
2210
2790
  return String(e?.username ?? e?.id ?? n.t("platform.screen.RoleAccountGrantDrawer.unknown-user", "未知用户"));
2211
2791
  }
2212
- function Oe(e) {
2792
+ function Ee(e) {
2213
2793
  return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
2214
2794
  }
2215
- function Ae(e) {
2216
- return String(me(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
2795
+ function De(e) {
2796
+ return String(g(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
2217
2797
  }
2218
- function Me(e) {
2798
+ function Oe(e) {
2219
2799
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
2220
2800
  }
2221
- return (t, r) => (K(), R(ze(ee.value), ke(te.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), De({
2222
- default: Z(() => [g.value ? (K(), R(Y(m), {
2801
+ return (t, r) => (J(), V(Ze(E.value), Be(D.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), Ie({
2802
+ default: $(() => [m.value ? (J(), V(Z(_), {
2223
2803
  key: 0,
2224
2804
  class: "role-account-grant-drawer-state",
2225
- tip: Y(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
2226
- }, null, 8, ["tip"])) : x.value ? (K(), B("div", vn, [U(Y(ne), {
2227
- title: Y(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
2228
- message: Y(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
2229
- }, null, 8, ["title", "message"]), U(Y(f), {
2805
+ tip: Z(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
2806
+ }, null, 8, ["tip"])) : b.value ? (J(), U("div", Xn, [K(Z(te), {
2807
+ title: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
2808
+ message: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
2809
+ }, null, 8, ["title", "message"]), K(Z(L), {
2230
2810
  type: "primary",
2231
2811
  "icon-name": "reload",
2232
- onClick: ge
2812
+ onClick: ue
2233
2813
  }, {
2234
- default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
2814
+ default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
2235
2815
  _: 1
2236
- })])) : (K(), B("section", {
2816
+ })])) : (J(), U("section", {
2237
2817
  key: 2,
2238
- class: je(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": re.value }])
2239
- }, [re.value ? (K(), B("label", yn, [V("span", null, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), U(Y(le), {
2240
- context: ae.value,
2241
- value: ie.value,
2818
+ class: He(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": O.value }])
2819
+ }, [O.value ? (J(), U("label", Zn, [W("span", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), K(Z(de), {
2820
+ context: j.value,
2821
+ value: k.value,
2242
2822
  mode: "list",
2243
- placeholder: Y(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
2244
- disabled: y.value || g.value,
2245
- "onUpdate:value": we
2823
+ placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
2824
+ disabled: v.value || m.value,
2825
+ "onUpdate:value": ye
2246
2826
  }, null, 8, [
2247
2827
  "context",
2248
2828
  "value",
2249
2829
  "placeholder",
2250
2830
  "disabled"
2251
- ])])) : z("v-if", !0), k.value ? (K(), B(I, { key: 2 }, [
2252
- V("div", xn, [U(Y(S), {
2831
+ ])])) : H("v-if", !0), A.value ? (J(), U(z, { key: 2 }, [
2832
+ W("div", $n, [K(Z(M), {
2253
2833
  value: u.value,
2254
2834
  "allow-clear": "",
2255
- disabled: y.value,
2256
- placeholder: Y(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
2835
+ disabled: v.value,
2836
+ placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
2257
2837
  "onUpdate:value": r[0] ||= (e) => u.value = e,
2258
- onKeydown: Ue(ve, ["enter"])
2838
+ onKeydown: nt(pe, ["enter"])
2259
2839
  }, null, 8, [
2260
2840
  "value",
2261
2841
  "disabled",
2262
2842
  "placeholder"
2263
- ]), U(Y(f), {
2843
+ ]), K(Z(L), {
2264
2844
  "icon-name": "search",
2265
- disabled: y.value,
2266
- onClick: ve
2845
+ disabled: v.value,
2846
+ onClick: pe
2267
2847
  }, {
2268
- default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
2848
+ default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
2269
2849
  _: 1
2270
2850
  }, 8, ["disabled"])]),
2271
- U(Y(he), {
2851
+ K(Z(be), {
2272
2852
  class: "role-account-grant-table",
2273
2853
  size: "middle",
2274
- contract: de,
2275
- rows: se.value,
2276
- loading: _.value,
2277
- pagination: P.value,
2278
- selection: M.value,
2854
+ contract: ie,
2855
+ rows: N.value,
2856
+ loading: h.value,
2857
+ pagination: oe.value,
2858
+ selection: ae.value,
2279
2859
  "fill-height": ""
2280
2860
  }, null, 8, [
2281
2861
  "rows",
@@ -2283,41 +2863,41 @@ var vn = {
2283
2863
  "pagination",
2284
2864
  "selection"
2285
2865
  ]),
2286
- ce.value.length > 0 ? (K(), B("section", Sn, [V("div", Cn, [V("strong", null, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), V("span", null, J(ce.value.length), 1)]), V("div", wn, [(K(!0), B(I, null, Le(ce.value, (e) => (K(), B("button", {
2866
+ P.value.length > 0 ? (J(), U("section", er, [W("div", tr, [W("strong", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), W("span", null, X(P.value.length), 1)]), W("div", nr, [(J(!0), U(z, null, Ye(P.value, (e) => (J(), U("button", {
2287
2867
  key: e.id,
2288
2868
  type: "button",
2289
- disabled: y.value,
2290
- onClick: (t) => Te(e.id)
2291
- }, [V("span", null, J(G(e)), 1), V("small", null, J(Oe(e)), 1)], 8, Tn))), 128))])])) : z("v-if", !0)
2292
- ], 64)) : (K(), B("div", bn, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant-for-a-platform-shared-role-before", "平台共享角色需要先选择目标租户,再加载可绑定账号。")), 1))], 2))]),
2869
+ disabled: v.value,
2870
+ onClick: (t) => xe(e.id)
2871
+ }, [W("span", null, X(Te(e)), 1), W("small", null, X(Ee(e)), 1)], 8, rr))), 128))])])) : H("v-if", !0)
2872
+ ], 64)) : (J(), U("div", Qn, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant-for-a-platform-shared-role-before", "平台共享角色需要先选择目标租户,再加载可绑定账号。")), 1))], 2))]),
2293
2873
  _: 2
2294
2874
  }, [e.embedded ? void 0 : {
2295
2875
  name: "operation",
2296
- fn: Z(() => [U(Y(f), {
2297
- disabled: y.value || g.value,
2298
- onClick: xe
2876
+ fn: $(() => [K(Z(L), {
2877
+ disabled: v.value || m.value,
2878
+ onClick: ge
2299
2879
  }, {
2300
- default: Z(() => [H(J(Y(n).t("platform.action.cancel", "取消")), 1)]),
2880
+ default: $(() => [G(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
2301
2881
  _: 1
2302
- }, 8, ["disabled"]), U(Y(f), {
2882
+ }, 8, ["disabled"]), K(Z(L), {
2303
2883
  type: "primary",
2304
- loading: y.value,
2305
- disabled: g.value || !j.value,
2306
- onClick: be
2884
+ loading: v.value,
2885
+ disabled: m.value || !I.value,
2886
+ onClick: he
2307
2887
  }, {
2308
- default: Z(() => [H(J(Y(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
2888
+ default: $(() => [G(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
2309
2889
  _: 1
2310
2890
  }, 8, ["loading", "disabled"])]),
2311
2891
  key: "0"
2312
2892
  }]), 1040, ["class"]));
2313
2893
  }
2314
- }), [["__scopeId", "data-v-e7dae9bb"]]), On = /* @__PURE__ */ G({
2894
+ }), [["__scopeId", "data-v-e7dae9bb"]]), or = /* @__PURE__ */ q({
2315
2895
  name: "RoleAccountGrantDrawerSurface",
2316
2896
  __name: "RoleAccountGrantDrawerSurface",
2317
2897
  props: { context: {} },
2318
2898
  setup(e) {
2319
- let t = e, n = L(() => t.context.module), r = L(() => t.context.record);
2320
- return (e, i) => (K(), R(Dn, {
2899
+ let t = e, n = B(() => t.context.module), r = B(() => t.context.record);
2900
+ return (e, i) => (J(), V(ar, {
2321
2901
  open: "",
2322
2902
  embedded: "",
2323
2903
  "drawer-context": t.context,
@@ -2333,7 +2913,7 @@ var vn = {
2333
2913
  "onSaved"
2334
2914
  ]));
2335
2915
  }
2336
- }), kn = /*#__PURE__*/ P(/* @__PURE__ */ G({
2916
+ }), sr = /*#__PURE__*/ P(/* @__PURE__ */ q({
2337
2917
  name: "EmployeeEmploymentTable",
2338
2918
  __name: "EmployeeEmploymentTable",
2339
2919
  props: {
@@ -2358,7 +2938,7 @@ var vn = {
2358
2938
  },
2359
2939
  emits: ["update:selectedIds"],
2360
2940
  setup(e, { emit: t }) {
2361
- let n = b(), r = e, i = t, a = q([]), o = L(() => [
2941
+ let n = y(), r = e, i = t, a = Y([]), o = B(() => [
2362
2942
  {
2363
2943
  key: "title",
2364
2944
  title: n.t("platform.screen.EmployeePicker.employee", "职员"),
@@ -2386,7 +2966,7 @@ var vn = {
2386
2966
  width: 88,
2387
2967
  align: "right"
2388
2968
  }
2389
- ]), s = L(() => [
2969
+ ]), s = B(() => [
2390
2970
  {
2391
2971
  key: "position",
2392
2972
  title: n.t("platform.screen.CurrentUserProfileDialog.position", "岗位"),
@@ -2407,7 +2987,7 @@ var vn = {
2407
2987
  title: n.t("platform.screen.EmployeeEmploymentTable.primary-position", "主岗位"),
2408
2988
  width: 88
2409
2989
  }
2410
- ]), c = L(() => {
2990
+ ]), c = B(() => {
2411
2991
  let e = /* @__PURE__ */ new Map();
2412
2992
  for (let t of r.rows) {
2413
2993
  let n = t.employeeId ?? t.id, r = e.get(n) ?? {
@@ -2420,7 +3000,7 @@ var vn = {
2420
3000
  r.positions.push(t), e.set(n, r);
2421
3001
  }
2422
3002
  return [...e.values()];
2423
- }), l = L(() => c.value);
3003
+ }), l = B(() => c.value);
2424
3004
  function u(e, t) {
2425
3005
  let r = t;
2426
3006
  return e.key === "title" ? r.title : e.key === "employeeNo" ? r.employeeNo ?? r.employeeId : e.key === "organizationTitle" ? r.organizationTitle ?? "-" : e.key === "employmentCount" ? n.t("platform.screen.EmployeeEmploymentTable.value-items", "{value1} 项", { value1: r.positions.length }) : e.key === "selectedCount" ? n.t("platform.screen.EmployeeEmploymentTable.value-items", "{value1} 项", { value1: f(r) }) : "";
@@ -2450,11 +3030,11 @@ var vn = {
2450
3030
  let n = e.employeeId;
2451
3031
  a.value = t ? Array.from(/* @__PURE__ */ new Set([...a.value, n])) : a.value.filter((e) => e !== n);
2452
3032
  }
2453
- function _(e) {
3033
+ function g(e) {
2454
3034
  let t = e.employeeId;
2455
3035
  h(e, !a.value.includes(t));
2456
3036
  }
2457
- return (t, r) => (K(), R(Y(g), {
3037
+ return (t, r) => (J(), V(Z(oe), {
2458
3038
  class: "employee-employment-table",
2459
3039
  columns: o.value,
2460
3040
  rows: l.value,
@@ -2465,11 +3045,11 @@ var vn = {
2465
3045
  "horizontal-scroll": "",
2466
3046
  "fill-height": e.fillHeight,
2467
3047
  onRowExpand: h,
2468
- onRowDblclick: _
3048
+ onRowDblclick: g
2469
3049
  }, {
2470
- cell: Z(({ column: e, record: t }) => [H(J(u(e, t)), 1)]),
2471
- expandedRow: Z(({ record: e }) => [U(Y(_e), { title: Y(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
2472
- default: Z(() => [U(Y(g), {
3050
+ cell: $(({ column: e, record: t }) => [G(X(u(e, t)), 1)]),
3051
+ expandedRow: $(({ record: e }) => [K(Z(k), { title: Z(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
3052
+ default: $(() => [K(Z(oe), {
2473
3053
  columns: s.value,
2474
3054
  rows: e.positions,
2475
3055
  "row-key": "id",
@@ -2478,7 +3058,7 @@ var vn = {
2478
3058
  "horizontal-scroll": "",
2479
3059
  "row-muted": (e) => e.enabled === !1
2480
3060
  }, {
2481
- cell: Z(({ column: e, record: t }) => [H(J(d(e, t)), 1)]),
3061
+ cell: $(({ column: e, record: t }) => [G(X(d(e, t)), 1)]),
2482
3062
  _: 1
2483
3063
  }, 8, [
2484
3064
  "columns",
@@ -2497,13 +3077,13 @@ var vn = {
2497
3077
  "fill-height"
2498
3078
  ]));
2499
3079
  }
2500
- }), [["__scopeId", "data-v-7020a020"]]), An = { key: 1 }, jn = {
3080
+ }), [["__scopeId", "data-v-7020a020"]]), cr = { key: 1 }, lr = {
2501
3081
  key: 2,
2502
3082
  class: "role-employment-grant-body"
2503
- }, Mn = {
3083
+ }, ur = {
2504
3084
  key: 0,
2505
3085
  class: "role-employment-grant-selected"
2506
- }, Nn = { class: "role-employment-grant-selected-title" }, Pn = { class: "role-employment-grant-selected-list" }, Fn = ["disabled", "onClick"], In = /*#__PURE__*/ P(/* @__PURE__ */ G({
3086
+ }, dr = { class: "role-employment-grant-selected-title" }, fr = { class: "role-employment-grant-selected-list" }, pr = ["disabled", "onClick"], mr = /*#__PURE__*/ P(/* @__PURE__ */ q({
2507
3087
  name: "RoleEmploymentGrantDrawer",
2508
3088
  __name: "RoleEmploymentGrantDrawer",
2509
3089
  props: {
@@ -2516,65 +3096,65 @@ var vn = {
2516
3096
  },
2517
3097
  emits: ["close", "saved"],
2518
3098
  setup(e, { emit: t }) {
2519
- let n = b(), r = e, i = t, a = q([]), o = q([]), s = q({}), c = q(/* @__PURE__ */ new Set()), l = q(/* @__PURE__ */ new Set()), u = q(!1), d = q(!1), p = q(!1), h = q(!1), g = q(1), _ = q(0), v = q(""), y = L(() => r.role?.id), x = L(() => _n(r.context.http)), C = L(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), w = L(() => r.embedded ? "section" : D), T = L(() => r.embedded ? {} : {
3099
+ let n = y(), r = e, i = t, a = Y([]), o = Y([]), s = Y({}), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(!1), d = Y(!1), f = Y(!1), p = Y(!1), m = Y(1), h = Y(0), g = Y(""), v = B(() => r.role?.id), b = B(() => Yn(r.context.http)), x = B(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), S = B(() => r.embedded ? "section" : ee), C = B(() => r.embedded ? {} : {
2520
3100
  open: r.open,
2521
- title: C.value,
3101
+ title: x.value,
2522
3102
  renderMode: r.container ? "inline" : "portal",
2523
3103
  closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
2524
- onClose: () => !p.value && i("close")
2525
- }), E = L(() => [...c.value].filter((e) => !l.value.has(e))), O = L(() => [...l.value].filter((e) => !c.value.has(e))), ee = L(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), te = L(() => o.value.filter((e) => !v.value.trim() || ce(e).includes(v.value.trim()))), re = L(() => [...c.value].map((e) => s.value[e] ?? ue(e))), ie = L(() => ({
2526
- current: g.value,
2527
- total: _.value,
3104
+ onClose: () => !f.value && i("close")
3105
+ }), w = B(() => [...c.value].filter((e) => !l.value.has(e))), T = B(() => [...l.value].filter((e) => !c.value.has(e))), E = B(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), D = B(() => o.value.filter((e) => !g.value.trim() || P(e).includes(g.value.trim()))), O = B(() => [...c.value].map((e) => s.value[e] ?? I(e))), k = B(() => ({
3106
+ current: m.value,
3107
+ total: h.value,
2528
3108
  pageSize: 50,
2529
3109
  showSizeChanger: !1,
2530
3110
  showQuickJumper: !1,
2531
- onChange: (e) => void ae(e)
3111
+ onChange: (e) => void j(e)
2532
3112
  }));
2533
- X(() => [r.open, r.role?.id], ([e]) => {
2534
- e ? ae() : se();
2535
- }, { immediate: !0 }), X([
3113
+ Q(() => [r.open, r.role?.id], ([e]) => {
3114
+ e ? j() : N();
3115
+ }, { immediate: !0 }), Q([
2536
3116
  () => r.embedded,
2537
3117
  () => r.drawerContext,
2538
3118
  c,
2539
- E,
2540
- O,
2541
- p,
3119
+ w,
3120
+ T,
3121
+ f,
2542
3122
  d
2543
- ], k, { immediate: !0 }), Ne(() => r.drawerContext?.setOperation(void 0));
2544
- function k() {
3123
+ ], A, { immediate: !0 }), Ge(() => r.drawerContext?.setOperation(void 0));
3124
+ function A() {
2545
3125
  let e = r.drawerContext;
2546
3126
  r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
2547
3127
  value1: r.role?.title ?? r.role?.id ?? n.t("platform.screen.RoleManagementView.role", "角色"),
2548
- value2: M(r.role)
3128
+ value2: oe(r.role)
2549
3129
  })), e.setOperation({
2550
3130
  summary: n.t("platform.screen.RoleEmploymentGrantDrawer.value-positions-selectedvalue", "已选 {value1} 个任职{value2}", {
2551
3131
  value1: c.value.size,
2552
- value2: E.value.length || O.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
2553
- value1: E.value.length,
2554
- value2: O.value.length
3132
+ value2: w.value.length || T.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
3133
+ value1: w.value.length,
3134
+ value2: T.value.length
2555
3135
  }) : ""
2556
3136
  }),
2557
3137
  actions: [{
2558
3138
  key: "cancel-employment-role-grants",
2559
3139
  label: n.t("platform.action.cancel", "取消"),
2560
- disabled: p.value,
3140
+ disabled: f.value,
2561
3141
  run: () => i("close")
2562
3142
  }, {
2563
3143
  key: "save-employment-role-grants",
2564
3144
  label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
2565
3145
  emphasis: "primary",
2566
- disabled: d.value || E.value.length === 0 && O.value.length === 0,
2567
- loading: p.value,
2568
- run: () => void oe()
3146
+ disabled: d.value || w.value.length === 0 && T.value.length === 0,
3147
+ loading: f.value,
3148
+ run: () => void ne()
2569
3149
  }]
2570
3150
  }));
2571
3151
  }
2572
- async function ae(e = 1) {
2573
- let t = y.value;
3152
+ async function j(e = 1) {
3153
+ let t = v.value;
2574
3154
  if (t) {
2575
- d.value = !0, h.value = !1;
3155
+ d.value = !0, p.value = !1;
2576
3156
  try {
2577
- let [n, r] = await Promise.all([x.value.employmentRoleGrants(t), x.value.employmentSelector(t, {
3157
+ let [n, r] = await Promise.all([b.value.employmentRoleGrants(t), b.value.employmentSelector(t, {
2578
3158
  enabledOnly: !0,
2579
3159
  page: {
2580
3160
  pageNum: e,
@@ -2583,10 +3163,10 @@ var vn = {
2583
3163
  })]);
2584
3164
  a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
2585
3165
  ...s.value,
2586
- ...le(r.records)
2587
- }, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, g.value = r.pageNum, _.value = r.total;
3166
+ ...re(r.records)
3167
+ }, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, m.value = r.pageNum, h.value = r.total;
2588
3168
  } catch (e) {
2589
- h.value = !0, N(e, {
3169
+ p.value = !0, R(e, {
2590
3170
  language: n,
2591
3171
  source: "role-employment-grants",
2592
3172
  phase: "load"
@@ -2596,17 +3176,17 @@ var vn = {
2596
3176
  }
2597
3177
  }
2598
3178
  }
2599
- async function oe() {
2600
- let e = y.value;
3179
+ async function ne() {
3180
+ let e = v.value;
2601
3181
  if (e) {
2602
- p.value = !0;
3182
+ f.value = !0;
2603
3183
  try {
2604
- for (let t of E.value) await x.value.grantEmploymentRole(e, t);
2605
- for (let t of O.value) {
2606
- let n = ee.value.get(t)?.id;
2607
- n && await x.value.deleteEmploymentRoleGrant(e, n);
3184
+ for (let t of w.value) await b.value.grantEmploymentRole(e, t);
3185
+ for (let t of T.value) {
3186
+ let n = E.value.get(t)?.id;
3187
+ n && await b.value.deleteEmploymentRoleGrant(e, n);
2608
3188
  }
2609
- await fe({
3189
+ await ce({
2610
3190
  success: !0,
2611
3191
  message: n.t("platform.screen.RoleEmploymentGrantDrawer.position-role-assignments-saved", "任职角色授权已保存")
2612
3192
  }, {
@@ -2615,20 +3195,20 @@ var vn = {
2615
3195
  phase: "action"
2616
3196
  }), i("saved"), i("close");
2617
3197
  } catch (e) {
2618
- N(e, {
3198
+ R(e, {
2619
3199
  language: n,
2620
3200
  source: "role-employment-grants",
2621
3201
  phase: "action"
2622
3202
  });
2623
3203
  } finally {
2624
- p.value = !1;
3204
+ f.value = !1;
2625
3205
  }
2626
3206
  }
2627
3207
  }
2628
- function se() {
2629
- a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, v.value = "", g.value = 1, _.value = 0, h.value = !1;
3208
+ function N() {
3209
+ a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, g.value = "", m.value = 1, h.value = 0, p.value = !1;
2630
3210
  }
2631
- function ce(e) {
3211
+ function P(e) {
2632
3212
  return [
2633
3213
  e.employeeTitle,
2634
3214
  e.employeeNo,
@@ -2637,59 +3217,59 @@ var vn = {
2637
3217
  e.positionTitle
2638
3218
  ].filter(Boolean).join(" ");
2639
3219
  }
2640
- function A(e) {
3220
+ function F(e) {
2641
3221
  let t = new Set(c.value);
2642
3222
  t.delete(e), c.value = t;
2643
3223
  }
2644
- function le(e) {
3224
+ function re(e) {
2645
3225
  let t = {};
2646
3226
  for (let n of e) n.id && (t[n.id] = n);
2647
3227
  return t;
2648
3228
  }
2649
- function ue(e) {
3229
+ function I(e) {
2650
3230
  return {
2651
3231
  id: e,
2652
3232
  positionId: e
2653
3233
  };
2654
3234
  }
2655
- function j(e) {
3235
+ function ie(e) {
2656
3236
  let t = e.positionTitle ?? e.positionId ?? e.id;
2657
3237
  return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
2658
3238
  }
2659
- function de(e) {
3239
+ function ae(e) {
2660
3240
  return [
2661
3241
  e.employeeNo,
2662
3242
  e.organizationTitle ?? e.organizationId,
2663
3243
  e.departmentTitle ?? e.departmentId
2664
3244
  ].filter(Boolean).join(" / ") || e.id;
2665
3245
  }
2666
- function M(e) {
3246
+ function oe(e) {
2667
3247
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
2668
3248
  }
2669
- return (t, r) => (K(), R(ze(w.value), ke(T.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), De({
2670
- default: Z(() => [d.value ? (K(), R(Y(m), {
3249
+ return (t, r) => (J(), V(Ze(S.value), Be(C.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), Ie({
3250
+ default: $(() => [d.value ? (J(), V(Z(_), {
2671
3251
  key: 0,
2672
- tip: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
2673
- }, null, 8, ["tip"])) : h.value ? (K(), B("div", An, [U(Y(ne), {
2674
- title: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
2675
- message: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
2676
- }, null, 8, ["title", "message"]), U(Y(f), { onClick: r[1] ||= (e) => ae() }, {
2677
- default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
3252
+ tip: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
3253
+ }, null, 8, ["tip"])) : p.value ? (J(), U("div", cr, [K(Z(te), {
3254
+ title: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
3255
+ message: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
3256
+ }, null, 8, ["title", "message"]), K(Z(L), { onClick: r[1] ||= (e) => j() }, {
3257
+ default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
2678
3258
  _: 1
2679
- })])) : (K(), B("section", jn, [
2680
- U(Y(S), {
2681
- value: v.value,
2682
- "onUpdate:value": r[2] ||= (e) => v.value = e,
3259
+ })])) : (J(), U("section", lr, [
3260
+ K(Z(M), {
3261
+ value: g.value,
3262
+ "onUpdate:value": r[2] ||= (e) => g.value = e,
2683
3263
  "allow-clear": "",
2684
- placeholder: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.filter-by-employee-employee-number-organization-department-or-position", "筛选职员、工号、机构、部门或岗位")
3264
+ placeholder: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.filter-by-employee-employee-number-organization-department-or-position", "筛选职员、工号、机构、部门或岗位")
2685
3265
  }, null, 8, ["value", "placeholder"]),
2686
- U(kn, {
3266
+ K(sr, {
2687
3267
  "selected-ids": c.value,
2688
3268
  "onUpdate:selectedIds": r[3] ||= (e) => c.value = e,
2689
- rows: te.value,
3269
+ rows: D.value,
2690
3270
  selectable: "",
2691
- disabled: p.value,
2692
- pagination: ie.value,
3271
+ disabled: f.value,
3272
+ pagination: k.value,
2693
3273
  "fill-height": ""
2694
3274
  }, null, 8, [
2695
3275
  "selected-ids",
@@ -2697,41 +3277,41 @@ var vn = {
2697
3277
  "disabled",
2698
3278
  "pagination"
2699
3279
  ]),
2700
- re.value.length > 0 ? (K(), B("section", Mn, [V("div", Nn, [V("strong", null, J(Y(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), V("span", null, J(re.value.length), 1)]), V("div", Pn, [(K(!0), B(I, null, Le(re.value, (e) => (K(), B("button", {
3280
+ O.value.length > 0 ? (J(), U("section", ur, [W("div", dr, [W("strong", null, X(Z(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), W("span", null, X(O.value.length), 1)]), W("div", fr, [(J(!0), U(z, null, Ye(O.value, (e) => (J(), U("button", {
2701
3281
  key: e.id,
2702
3282
  type: "button",
2703
- disabled: p.value,
2704
- onClick: (t) => A(e.id)
2705
- }, [V("span", null, J(j(e)), 1), V("small", null, J(de(e)), 1)], 8, Fn))), 128))])])) : z("v-if", !0)
3283
+ disabled: f.value,
3284
+ onClick: (t) => F(e.id)
3285
+ }, [W("span", null, X(ie(e)), 1), W("small", null, X(ae(e)), 1)], 8, pr))), 128))])])) : H("v-if", !0)
2706
3286
  ]))]),
2707
3287
  _: 2
2708
3288
  }, [e.embedded ? void 0 : {
2709
3289
  name: "operation",
2710
- fn: Z(() => [U(Y(f), {
2711
- disabled: p.value,
3290
+ fn: $(() => [K(Z(L), {
3291
+ disabled: f.value,
2712
3292
  onClick: r[0] ||= (e) => i("close")
2713
3293
  }, {
2714
- default: Z(() => [H(J(Y(n).t("platform.action.cancel", "取消")), 1)]),
3294
+ default: $(() => [G(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
2715
3295
  _: 1
2716
- }, 8, ["disabled"]), U(Y(f), {
3296
+ }, 8, ["disabled"]), K(Z(L), {
2717
3297
  type: "primary",
2718
- loading: p.value,
2719
- disabled: d.value || E.value.length === 0 && O.value.length === 0,
2720
- onClick: oe
3298
+ loading: f.value,
3299
+ disabled: d.value || w.value.length === 0 && T.value.length === 0,
3300
+ onClick: ne
2721
3301
  }, {
2722
- default: Z(() => [H(J(Y(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
3302
+ default: $(() => [G(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
2723
3303
  _: 1
2724
3304
  }, 8, ["loading", "disabled"])]),
2725
3305
  key: "0"
2726
3306
  }]), 1040, ["class"]));
2727
3307
  }
2728
- }), [["__scopeId", "data-v-4736da9f"]]), Ln = /* @__PURE__ */ G({
3308
+ }), [["__scopeId", "data-v-4736da9f"]]), hr = /* @__PURE__ */ q({
2729
3309
  name: "RoleEmploymentGrantDrawerSurface",
2730
3310
  __name: "RoleEmploymentGrantDrawerSurface",
2731
3311
  props: { context: {} },
2732
3312
  setup(e) {
2733
- let t = e, n = L(() => t.context.module), r = L(() => t.context.record);
2734
- return (e, i) => (K(), R(In, {
3313
+ let t = e, n = B(() => t.context.module), r = B(() => t.context.record);
3314
+ return (e, i) => (J(), V(mr, {
2735
3315
  open: "",
2736
3316
  embedded: "",
2737
3317
  "drawer-context": t.context,
@@ -2747,7 +3327,7 @@ var vn = {
2747
3327
  "onSaved"
2748
3328
  ]));
2749
3329
  }
2750
- }), Rn = /* @__PURE__ */ G({
3330
+ }), gr = /* @__PURE__ */ q({
2751
3331
  name: "WorkspaceViewDrawer",
2752
3332
  __name: "WorkspaceViewDrawer",
2753
3333
  props: {
@@ -2765,8 +3345,8 @@ var vn = {
2765
3345
  },
2766
3346
  emits: ["close"],
2767
3347
  setup(e, { emit: t }) {
2768
- let n = e, r = t, i = L(() => n.profile === "wide-work" ? "wide" : "standard");
2769
- return (t, n) => (K(), R(Y(D), {
3348
+ let n = e, r = t, i = B(() => n.profile === "wide-work" ? "wide" : "standard");
3349
+ return (t, n) => (J(), V(Z(ee), {
2770
3350
  open: e.open,
2771
3351
  title: e.title,
2772
3352
  "render-mode": e.container ? "inline" : "portal",
@@ -2776,12 +3356,12 @@ var vn = {
2776
3356
  dismissal: e.dismissal,
2777
3357
  "before-close": e.beforeClose,
2778
3358
  onClose: n[0] ||= (e) => r("close")
2779
- }, De({
2780
- default: Z(() => [Re(t.$slots, "default")]),
3359
+ }, Ie({
3360
+ default: $(() => [Xe(t.$slots, "default")]),
2781
3361
  _: 2
2782
3362
  }, [t.$slots.operation ? {
2783
3363
  name: "operation",
2784
- fn: Z(() => [Re(t.$slots, "operation")]),
3364
+ fn: $(() => [Xe(t.$slots, "operation")]),
2785
3365
  key: "0"
2786
3366
  } : void 0]), 1032, [
2787
3367
  "open",
@@ -2797,21 +3377,21 @@ var vn = {
2797
3377
  });
2798
3378
  //#endregion
2799
3379
  //#region src/platform-admin-runtime/useWorkspaceViewPromotion.ts
2800
- function zn(e) {
3380
+ function _r(e) {
2801
3381
  return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
2802
3382
  }
2803
- function Bn(e) {
2804
- let t = o(), n = b();
2805
- return L(() => {
2806
- let r = He(e.input);
2807
- if (r && zn(He(e.eligibility)) && t) return {
3383
+ function vr(e) {
3384
+ let t = s(), n = y();
3385
+ return B(() => {
3386
+ let r = et(e.input);
3387
+ if (r && _r(et(e.eligibility)) && t) return {
2808
3388
  title: n.t("platform.workspace-view.pin-as-tab", "固定为页签"),
2809
3389
  promote: async () => {
2810
3390
  if (await e.beforePromote?.(r) === !1) {
2811
3391
  e.onPromotionRejected?.();
2812
3392
  return;
2813
3393
  }
2814
- let i = t.openPage(s(e.view, r, "tab", He(e.title), n));
3394
+ let i = t.openPage(c(e.view, r, "tab", et(e.title), n));
2815
3395
  e.onPromoted?.(i);
2816
3396
  }
2817
3397
  };
@@ -2819,53 +3399,53 @@ function Bn(e) {
2819
3399
  }
2820
3400
  //#endregion
2821
3401
  //#region src/platform-admin-runtime/workspaceViewSessions.ts
2822
- var Vn = /* @__PURE__ */ new Map(), Hn = /* @__PURE__ */ new Map();
2823
- function Un(e, t) {
2824
- return `${e.type}:${qn(t)}`;
3402
+ var yr = /* @__PURE__ */ new Map(), br = /* @__PURE__ */ new Map();
3403
+ function xr(e, t) {
3404
+ return `${e.type}:${Tr(t)}`;
2825
3405
  }
2826
- async function Wn(e, t, n) {
2827
- let r = Un(e, t), i = Hn.get(r), a = i && [...i].at(-1);
2828
- return a ? await a(Jn(n)) ? "accepted" : "rejected" : (Vn.set(r, Jn(n)), "accepted");
3406
+ async function Sr(e, t, n) {
3407
+ let r = xr(e, t), i = br.get(r), a = i && [...i].at(-1);
3408
+ return a ? await a(Er(n)) ? "accepted" : "rejected" : (yr.set(r, Er(n)), "accepted");
2829
3409
  }
2830
- function Gn(e, t, n) {
2831
- let r = Un(e, t), i = Hn.get(r) ?? /* @__PURE__ */ new Set();
2832
- return i.add(n), Hn.set(r, i), () => {
2833
- i.delete(n), i.size === 0 && Hn.delete(r);
3410
+ function Cr(e, t, n) {
3411
+ let r = xr(e, t), i = br.get(r) ?? /* @__PURE__ */ new Set();
3412
+ return i.add(n), br.set(r, i), () => {
3413
+ i.delete(n), i.size === 0 && br.delete(r);
2834
3414
  };
2835
3415
  }
2836
- function Kn(e, t) {
2837
- let n = Un(e, t), r = Vn.get(n);
2838
- return Vn.delete(n), r;
3416
+ function wr(e, t) {
3417
+ let n = xr(e, t), r = yr.get(n);
3418
+ return yr.delete(n), r;
2839
3419
  }
2840
- function qn(e) {
2841
- return Array.isArray(e) ? `[${e.map(qn).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${qn(t)}`).join(",")}}` : JSON.stringify(e);
3420
+ function Tr(e) {
3421
+ return Array.isArray(e) ? `[${e.map(Tr).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${Tr(t)}`).join(",")}}` : JSON.stringify(e);
2842
3422
  }
2843
- function Jn(e) {
3423
+ function Er(e) {
2844
3424
  return JSON.parse(JSON.stringify(e));
2845
3425
  }
2846
3426
  //#endregion
2847
3427
  //#region src/views/roleAuthorizationWorkspaceSession.ts
2848
- function Yn(e, t) {
2849
- return Wn(qe, e, t);
3428
+ function Dr(e, t) {
3429
+ return Sr(st, e, t);
2850
3430
  }
2851
- function Xn(e, t) {
2852
- return Gn(qe, e, t);
3431
+ function Or(e, t) {
3432
+ return Cr(st, e, t);
2853
3433
  }
2854
- function Zn(e) {
2855
- return Kn(qe, e);
3434
+ function kr(e) {
3435
+ return wr(st, e);
2856
3436
  }
2857
3437
  //#endregion
2858
3438
  //#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
2859
- var Qn = { class: "panel-title" }, $n = {
3439
+ var Ar = { class: "panel-title" }, jr = {
2860
3440
  key: 0,
2861
3441
  class: "authorization-column-header"
2862
- }, er = {
3442
+ }, Mr = {
2863
3443
  key: 2,
2864
3444
  class: "data-scope-editor"
2865
- }, tr = { key: 0 }, nr = { key: 1 }, rr = { key: 3 }, ir = {
3445
+ }, Nr = { key: 0 }, Pr = { key: 1 }, Fr = { key: 3 }, Ir = {
2866
3446
  key: 4,
2867
3447
  class: "not-applicable"
2868
- }, ar = /*@__PURE__*/ G({
3448
+ }, Lr = /*@__PURE__*/ q({
2869
3449
  name: "RoleAuthorizationView",
2870
3450
  __name: "RoleAuthorizationView",
2871
3451
  props: {
@@ -2877,8 +3457,8 @@ var Qn = { class: "panel-title" }, $n = {
2877
3457
  },
2878
3458
  emits: ["close"],
2879
3459
  setup(e, { emit: t }) {
2880
- let n = b(), i = e, a = t, o = v({ moduleAlias: "iam.role" }), s = i.moduleContext ?? o, c = _n(s.http), l = i.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", p = r(), h = i.roleId ? { roleId: i.roleId } : void 0, _ = h ? Zn(h) : void 0, y = q(), x = q([]), S = q(), C = q(""), w = q([]), T = q(), D = q(), te = q(!1), se = q(!1), A = q(!1), le = Be(), ue = L(() => le.value ? d(le.value, n) : void 0), j = q(), M = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), F = q(0), pe, he = L(() => y.value?.roleKind === "group"), _e = L(() => y.value?.roleKind === "dataGrant"), ve = L(() => y.value?.assignmentType === "employment"), ye = L(() => !!i.drawerContext), be = L(() => (y.value && me(y.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), xe = L(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: be.value })), Se = L(() => Ce.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: Ce.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: be.value })), Ce = L(() => x.value.find((e) => e.moduleAlias === S.value)), we = L(() => {
2881
- let e = C.value.trim().toLocaleLowerCase(), t = new Set(e ? x.value.filter((t) => [
3460
+ let n = y(), r = e, a = t, o = we({ moduleAlias: "iam.role" }), s = r.moduleContext ?? o, c = Yn(s.http), l = r.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", u = i(), f = r.roleId ? { roleId: r.roleId } : void 0, ee = f ? kr(f) : void 0, b = Y(), x = Y([]), w = Y(), T = Y(""), E = Y([]), D = Y(), O = Y(), k = Y(!1), A = Y(!1), j = Y(!1), ne = Qe(), M = B(() => ne.value ? N(ne.value, n) : void 0), P = Y(), F = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), se = Y(0), le, ue = B(() => b.value?.roleKind === "group"), de = B(() => b.value?.roleKind === "dataGrant"), fe = B(() => b.value?.assignmentType === "employment"), pe = B(() => !!r.drawerContext), me = B(() => (b.value && g(b.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), ge = B(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: me.value })), ve = B(() => ye.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: ye.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: me.value })), ye = B(() => x.value.find((e) => e.moduleAlias === w.value)), be = B(() => {
3461
+ let e = T.value.trim().toLocaleLowerCase(), t = new Set(e ? x.value.filter((t) => [
2882
3462
  t.title,
2883
3463
  t.moduleAlias,
2884
3464
  t.applicationAlias
@@ -2893,13 +3473,13 @@ var Qn = { class: "panel-title" }, $n = {
2893
3473
  title: e.title,
2894
3474
  secondary: e.applicationAlias
2895
3475
  }));
2896
- }), Te = L(() => (D.value?.options ?? []).map((e) => ({
3476
+ }), xe = B(() => (O.value?.options ?? []).map((e) => ({
2897
3477
  value: e.code,
2898
3478
  label: e.title
2899
- }))), Ee = L(() => (D.value?.referenceDependencies ?? []).map((e) => ({
3479
+ }))), Se = B(() => (O.value?.referenceDependencies ?? []).map((e) => ({
2900
3480
  value: e.referenceFieldId,
2901
3481
  label: `${e.title} → ${e.targetModuleTitle}`
2902
- }))), W = L(() => new Map((D.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), G = L(() => ve.value && w.value.some((e) => !!e.dataAuth)), ke = L(() => [
3482
+ }))), Ce = B(() => new Map((O.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = B(() => fe.value && E.value.some((e) => !!e.dataAuth)), Ee = B(() => [
2903
3483
  {
2904
3484
  key: "title",
2905
3485
  title: n.t("platform.governance.tab.actions", "动作"),
@@ -2911,12 +3491,12 @@ var Qn = { class: "panel-title" }, $n = {
2911
3491
  width: 104,
2912
3492
  align: "center"
2913
3493
  },
2914
- ...G.value ? [{
3494
+ ...Te.value ? [{
2915
3495
  key: "dataScopePolicy",
2916
3496
  title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
2917
3497
  width: 200
2918
3498
  }] : []
2919
- ]), Ae = L(() => [
3499
+ ]), De = B(() => [
2920
3500
  {
2921
3501
  key: "title",
2922
3502
  title: n.t("platform.screen.RoleAuthorizationView.standard-action", "标准动作"),
@@ -2933,311 +3513,311 @@ var Qn = { class: "panel-title" }, $n = {
2933
3513
  title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
2934
3514
  width: 160
2935
3515
  }
2936
- ]), Fe = L(() => w.value), Ie = L(() => T.value?.actions ?? []), Le = L(() => i.drawer === !0 || !!h && p?.presentation === "drawer"), Re = L(() => !!h), Ve = L(() => Re.value && !ye.value), He = L(() => ye.value ? "div" : Le.value ? Rn : Re.value ? ie : "div"), Ue = L(() => Le.value ? {
3516
+ ]), Oe = B(() => E.value), ke = B(() => D.value?.actions ?? []), Ae = B(() => r.drawer === !0 || !!f && u?.presentation === "drawer"), je = B(() => !!f), Me = B(() => je.value && !pe.value), Ne = B(() => pe.value ? "div" : Ae.value ? gr : je.value ? v : "div"), Pe = B(() => Ae.value ? {
2937
3517
  open: !0,
2938
- title: xe.value,
2939
- container: i.container ?? null,
2940
- profile: qe.drawerProfile,
2941
- promotion: Xe.value,
3518
+ title: ge.value,
3519
+ container: r.container ?? null,
3520
+ profile: st.drawerProfile,
3521
+ promotion: We.value,
2942
3522
  dismissal: "guarded",
2943
- beforeClose: pt,
2944
- onClose: mt
2945
- } : Ve.value ? { title: xe.value } : {}), We = L(() => {
2946
- let e = T.value;
2947
- return !e || j.value === void 0 ? !1 : JSON.stringify(e.actions) !== j.value;
2948
- }), Ge = L(() => F.value >= 0 && [...M.entries()].some(([e, t]) => P.get(e) !== JSON.stringify(t))), Q = L(() => We.value || Ge.value);
2949
- ge(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => Q.value, () => A.value);
2950
- let Ke = L(() => w.value.length > 0 && w.value.every((e) => e.granted)), Je = L(() => w.value.some((e) => e.granted) && !Ke.value), Ye = L(() => {
2951
- let e = Ce.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = w.value.filter((e) => e.granted).length, r = Q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
3523
+ beforeClose: ft,
3524
+ onClose: pt
3525
+ } : Me.value ? { title: ge.value } : {}), Fe = B(() => {
3526
+ let e = D.value;
3527
+ return !e || P.value === void 0 ? !1 : JSON.stringify(e.actions) !== P.value;
3528
+ }), Le = B(() => se.value >= 0 && [...F.entries()].some(([e, t]) => ie.get(e) !== JSON.stringify(t))), q = B(() => Fe.value || Le.value);
3529
+ m(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => q.value, () => j.value);
3530
+ let ze = B(() => E.value.length > 0 && E.value.every((e) => e.granted)), Be = B(() => E.value.some((e) => e.granted) && !ze.value), Ve = B(() => {
3531
+ let e = ye.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = E.value.filter((e) => e.granted).length, r = q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
2952
3532
  return n.t("platform.screen.RoleAuthorizationView.current-module-value-value-value-actions-granted-value", "当前模块:{value1} · 已授权 {value2}/{value3} 项 · {value4}", {
2953
3533
  value1: e,
2954
3534
  value2: t,
2955
- value3: w.value.length,
3535
+ value3: E.value.length,
2956
3536
  value4: r
2957
3537
  });
2958
- }), Xe = Bn({
2959
- view: qe,
2960
- input: () => h,
2961
- title: xe,
3538
+ }), We = vr({
3539
+ view: st,
3540
+ input: () => f,
3541
+ title: ge,
2962
3542
  eligibility: () => ({
2963
- hasStableIdentity: !!(l && y.value),
2964
- busy: A.value
3543
+ hasStableIdentity: !!(l && b.value),
3544
+ busy: j.value
2965
3545
  }),
2966
- beforePromote: (e) => Yn(e, {
2967
- selectedModuleAlias: S.value,
2968
- dataGrantMatrix: T.value,
2969
- actionDrafts: [...M.entries()].map(([e, t]) => ({
3546
+ beforePromote: (e) => Dr(e, {
3547
+ selectedModuleAlias: w.value,
3548
+ dataGrantMatrix: D.value,
3549
+ actionDrafts: [...F.entries()].map(([e, t]) => ({
2970
3550
  moduleAlias: e,
2971
3551
  actions: t
2972
3552
  })),
2973
- actionSnapshots: [...P.entries()].map(([e, t]) => ({
3553
+ actionSnapshots: [...ie.entries()].map(([e, t]) => ({
2974
3554
  moduleAlias: e,
2975
3555
  snapshot: t
2976
3556
  }))
2977
3557
  }).then((e) => e === "accepted"),
2978
- onPromoted: ht,
2979
- onPromotionRejected: () => de(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
3558
+ onPromoted: mt,
3559
+ onPromotionRejected: () => I(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
2980
3560
  language: n,
2981
3561
  source: "role-authorization",
2982
3562
  phase: "validation"
2983
3563
  })
2984
3564
  });
2985
- Pe(() => {
2986
- h && !Le.value && (pe = Xn(h, gt)), Qe();
2987
- }), X(xe, (e) => {
2988
- Re.value && p?.setTitle(e);
2989
- }, { immediate: !0 }), X(S, () => void $e()), X([
2990
- be,
2991
- Ye,
2992
- Q,
2993
- A,
2994
- he,
2995
- _e
2996
- ], Ze, { immediate: !0 }), Pe(() => window.addEventListener("beforeunload", $)), Ne(() => {
2997
- pe?.(), i.drawerContext?.setOperation(void 0), i.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", $);
3565
+ Ke(() => {
3566
+ f && !Ae.value && (le = Or(f, ht)), Je();
3567
+ }), Q(ge, (e) => {
3568
+ je.value && u?.setTitle(e);
3569
+ }, { immediate: !0 }), Q(w, () => void Ye()), Q([
3570
+ me,
3571
+ Ve,
3572
+ q,
3573
+ j,
3574
+ ue,
3575
+ de
3576
+ ], qe, { immediate: !0 }), Ke(() => window.addEventListener("beforeunload", _t)), Ge(() => {
3577
+ le?.(), r.drawerContext?.setOperation(void 0), r.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", _t);
2998
3578
  });
2999
- function Ze() {
3000
- let e = i.drawerContext;
3579
+ function qe() {
3580
+ let e = r.drawerContext;
3001
3581
  if (e) {
3002
- if (e.setSubtitle(`${be.value} · ${vt(y.value)}`), he.value) {
3582
+ if (e.setSubtitle(`${me.value} · ${vt(b.value)}`), ue.value) {
3003
3583
  e.setOperation(void 0);
3004
3584
  return;
3005
3585
  }
3006
3586
  e.setOperation({
3007
- summary: _e.value ? Q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ye.value,
3587
+ summary: de.value ? q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ve.value,
3008
3588
  actions: [{
3009
3589
  key: "confirm-role-authorization",
3010
3590
  label: n.t("platform.screen.UiModal.confirmText", "确认"),
3011
3591
  emphasis: "primary",
3012
- disabled: A.value || !Q.value,
3013
- loading: A.value,
3014
- run: () => void ft()
3592
+ disabled: j.value || !q.value,
3593
+ loading: j.value,
3594
+ run: () => void dt()
3015
3595
  }]
3016
3596
  });
3017
3597
  }
3018
3598
  }
3019
- async function Qe() {
3599
+ async function Je() {
3020
3600
  if (!l) {
3021
- le.value = new oe(ee(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
3601
+ ne.value = new he(ae(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
3022
3602
  return;
3023
3603
  }
3024
- te.value = !0, le.value = void 0;
3604
+ k.value = !0, ne.value = void 0;
3025
3605
  try {
3026
- if (y.value = await s.crud.view(l), y.value.roleKind === "group") return;
3027
- if (y.value.roleKind === "dataGrant") {
3606
+ if (b.value = await s.crud.view(l), b.value.roleKind === "group") return;
3607
+ if (b.value.roleKind === "dataGrant") {
3028
3608
  let [e, t] = await Promise.all([c.dataGrantActionMatrix(l), c.dataScopePolicyCatalog(l)]);
3029
- T.value = _?.dataGrantMatrix ?? e, D.value = t, j.value = JSON.stringify(e.actions);
3609
+ D.value = ee?.dataGrantMatrix ?? e, O.value = t, P.value = JSON.stringify(e.actions);
3030
3610
  return;
3031
3611
  }
3032
- x.value = (await c.authorizationModules(l)).records, S.value = _?.selectedModuleAlias ?? x.value[0]?.moduleAlias;
3612
+ x.value = (await c.authorizationModules(l)).records, w.value = ee?.selectedModuleAlias ?? x.value[0]?.moduleAlias;
3033
3613
  } catch (e) {
3034
- le.value = new oe(ee(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), N(e, {
3614
+ ne.value = new he(ae(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), R(e, {
3035
3615
  language: n,
3036
3616
  source: "role-authorization",
3037
3617
  phase: "load"
3038
3618
  });
3039
3619
  } finally {
3040
- te.value = !1;
3620
+ k.value = !1;
3041
3621
  }
3042
3622
  }
3043
- async function $e() {
3044
- let e = S.value;
3045
- if (!(!e || _e.value || he.value)) {
3046
- se.value = !0;
3623
+ async function Ye() {
3624
+ let e = w.value;
3625
+ if (!(!e || de.value || ue.value)) {
3626
+ A.value = !0;
3047
3627
  try {
3048
- let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(lt), i = _?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = M.get(e) ?? i;
3049
- w.value = a ?? r, M.has(e) || (M.set(e, w.value), P.set(e, _?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, D.value = n;
3628
+ let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(ct), i = ee?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = F.get(e) ?? i;
3629
+ E.value = a ?? r, F.has(e) || (F.set(e, E.value), ie.set(e, ee?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), se.value += 1, O.value = n;
3050
3630
  } catch (e) {
3051
- N(e, {
3631
+ R(e, {
3052
3632
  language: n,
3053
3633
  source: "role-authorization",
3054
3634
  phase: "load"
3055
3635
  });
3056
3636
  } finally {
3057
- se.value = !1;
3637
+ A.value = !1;
3058
3638
  }
3059
3639
  }
3060
3640
  }
3061
- function et(e, t) {
3062
- t && e.dataAuth && ve.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, F.value += 1;
3641
+ function Xe(e, t) {
3642
+ t && e.dataAuth && fe.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, se.value += 1;
3063
3643
  }
3064
- function tt(e) {
3065
- w.value.forEach((t) => et(t, e));
3644
+ function $e(e) {
3645
+ E.value.forEach((t) => Xe(t, e));
3066
3646
  }
3067
- function nt(e, t) {
3647
+ function et(e, t) {
3068
3648
  if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
3069
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3649
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, se.value += 1;
3070
3650
  return;
3071
3651
  }
3072
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3652
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, se.value += 1;
3073
3653
  }
3074
- function rt(e, t) {
3075
- let n = W.value.get(String(t || ""));
3076
- e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, F.value += 1;
3654
+ function tt(e, t) {
3655
+ let n = Ce.value.get(String(t || ""));
3656
+ e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, se.value += 1;
3077
3657
  }
3078
- function it(e) {
3079
- return W.value.get(String(e || ""));
3658
+ function nt(e) {
3659
+ return Ce.value.get(String(e || ""));
3080
3660
  }
3081
- function at(e) {
3661
+ function rt(e) {
3082
3662
  return typeof e == "string" || typeof e == "number" ? e : void 0;
3083
3663
  }
3084
- function ot(e) {
3664
+ function it(e) {
3085
3665
  return e.dataScopePolicy ?? "inheritDataGrant";
3086
3666
  }
3087
- function st(e) {
3088
- return !!e.dataAuth && ve.value;
3667
+ function at(e) {
3668
+ return !!e.dataAuth && fe.value;
3089
3669
  }
3090
- function ct(e, t) {
3091
- return e.key === "dataScopePolicy" && st(t);
3670
+ function ot(e, t) {
3671
+ return e.key === "dataScopePolicy" && at(t);
3092
3672
  }
3093
- function lt(e) {
3094
- return ve.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3673
+ function ct(e) {
3674
+ return fe.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3095
3675
  ...e,
3096
3676
  dataScopePolicy: "inheritDataGrant"
3097
3677
  } : e;
3098
3678
  }
3099
- async function ut() {
3100
- if (T.value) {
3101
- A.value = !0;
3679
+ async function lt() {
3680
+ if (D.value) {
3681
+ j.value = !0;
3102
3682
  try {
3103
- let e = await c.replaceDataGrantActions(l, T.value.actions.map((e) => ({
3683
+ let e = await c.replaceDataGrantActions(l, D.value.actions.map((e) => ({
3104
3684
  actionCode: e.actionCode,
3105
3685
  dataScopePolicy: e.dataScopePolicy,
3106
3686
  enabled: e.configured
3107
3687
  })));
3108
- await fe(e, {
3688
+ await ce(e, {
3109
3689
  language: n,
3110
3690
  source: "role-authorization",
3111
3691
  phase: "action",
3112
3692
  fallbackMessage: n.t("platform.screen.RoleAuthorizationView.data-permission-template-saved", "数据权限模板已保存")
3113
- }), j.value = JSON.stringify(T.value.actions);
3693
+ }), P.value = JSON.stringify(D.value.actions);
3114
3694
  } catch (e) {
3115
- N(e, {
3695
+ R(e, {
3116
3696
  language: n,
3117
3697
  source: "role-authorization",
3118
3698
  phase: "action"
3119
3699
  });
3120
3700
  } finally {
3121
- A.value = !1;
3701
+ j.value = !1;
3122
3702
  }
3123
3703
  }
3124
3704
  }
3125
- async function dt() {
3126
- let e = [...M.entries()].filter(([e, t]) => P.get(e) !== JSON.stringify(t));
3705
+ async function ut() {
3706
+ let e = [...F.entries()].filter(([e, t]) => ie.get(e) !== JSON.stringify(t));
3127
3707
  if (e.length) {
3128
- A.value = !0;
3708
+ j.value = !0;
3129
3709
  try {
3130
3710
  let t = await c.replacePermissionMatrix(l, e.flatMap(([e, t]) => t.map((t) => ({
3131
3711
  moduleAlias: e,
3132
3712
  actionCode: t.actionCode,
3133
3713
  granted: !!t.granted,
3134
- dataScopePolicy: t.granted && t.dataAuth && ve.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3714
+ dataScopePolicy: t.granted && t.dataAuth && fe.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3135
3715
  referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
3136
3716
  referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
3137
3717
  }))));
3138
- await fe(t, {
3718
+ await ce(t, {
3139
3719
  language: n,
3140
3720
  source: "role-authorization",
3141
3721
  phase: "action",
3142
3722
  fallbackMessage: n.t("platform.screen.RoleAuthorizationView.role-permissions-saved", "角色授权已保存")
3143
- }), e.forEach(([e, t]) => P.set(e, JSON.stringify(t))), F.value += 1;
3723
+ }), e.forEach(([e, t]) => ie.set(e, JSON.stringify(t))), se.value += 1;
3144
3724
  } catch (e) {
3145
- N(e, {
3725
+ R(e, {
3146
3726
  language: n,
3147
3727
  source: "role-authorization",
3148
3728
  phase: "action"
3149
3729
  });
3150
3730
  } finally {
3151
- A.value = !1;
3731
+ j.value = !1;
3152
3732
  }
3153
3733
  }
3154
3734
  }
3155
- async function ft() {
3156
- if (_e.value) {
3157
- await ut();
3735
+ async function dt() {
3736
+ if (de.value) {
3737
+ await lt();
3158
3738
  return;
3159
3739
  }
3160
- await dt();
3740
+ await ut();
3161
3741
  }
3162
- async function pt() {
3163
- return !Q.value || ce({
3742
+ async function ft() {
3743
+ return !q.value || p({
3164
3744
  title: n.t("platform.screen.RoleAuthorizationView.discard-unconfirmed-permission-changes", "放弃未确认的授权配置"),
3165
3745
  content: n.t("platform.screen.RoleAuthorizationView.these-changes-have-not-been-confirmed-and-will-be-lost", "当前修改尚未确认,关闭后将丢失这些修改。"),
3166
3746
  okText: n.t("platform.screen.WorkflowWorkbenchView.discard-changes", "放弃修改"),
3167
3747
  danger: !0
3168
3748
  }, n);
3169
3749
  }
3170
- function mt() {
3171
- _t();
3750
+ function pt() {
3751
+ gt();
3172
3752
  }
3173
- function ht() {
3174
- _t();
3753
+ function mt() {
3754
+ gt();
3175
3755
  }
3176
- function gt(e) {
3177
- return !Q.value && (S.value = e.selectedModuleAlias, T.value = e.dataGrantMatrix, M.clear(), P.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => M.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => P.set(e, t)), F.value += 1, !0);
3756
+ function ht(e) {
3757
+ return !q.value && (w.value = e.selectedModuleAlias, D.value = e.dataGrantMatrix, F.clear(), ie.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => F.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => ie.set(e, t)), se.value += 1, !0);
3178
3758
  }
3179
- function _t() {
3180
- if (i.drawer === !0) {
3759
+ function gt() {
3760
+ if (r.drawer === !0) {
3181
3761
  a("close");
3182
3762
  return;
3183
3763
  }
3184
- p?.dismiss();
3764
+ u?.dismiss();
3185
3765
  }
3186
- function $(e) {
3187
- Q.value && (e.preventDefault(), e.returnValue = "");
3766
+ function _t(e) {
3767
+ q.value && (e.preventDefault(), e.returnValue = "");
3188
3768
  }
3189
3769
  function vt(e) {
3190
3770
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
3191
3771
  }
3192
- return (e, t) => (K(), R(ze(He.value), Me(Oe(Ue.value)), De({
3193
- default: Z(() => [V("section", { class: je(["role-authorization-page", { "role-authorization-page--drawer": Le.value || ye.value }]) }, [te.value ? (K(), R(Y(m), {
3772
+ return (e, t) => (J(), V(Ze(Ne.value), Ue(Re(Pe.value)), Ie({
3773
+ default: $(() => [W("section", { class: He(["role-authorization-page", { "role-authorization-page--drawer": Ae.value || pe.value }]) }, [k.value ? (J(), V(Z(_), {
3194
3774
  key: 0,
3195
- tip: Y(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
3196
- }, null, 8, ["tip"])) : ue.value ? (K(), R(Y(ne), {
3775
+ tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
3776
+ }, null, 8, ["tip"])) : M.value ? (J(), V(Z(te), {
3197
3777
  key: 1,
3198
- title: Y(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
3199
- message: ue.value
3200
- }, null, 8, ["title", "message"])) : he.value ? (K(), R(Y(O), {
3778
+ title: Z(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
3779
+ message: M.value
3780
+ }, null, 8, ["title", "message"])) : ue.value ? (J(), V(Z(C), {
3201
3781
  key: 2,
3202
- title: Y(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
3203
- description: Y(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
3204
- }, null, 8, ["title", "description"])) : _e.value && T.value ? (K(), R(Y(u), {
3782
+ title: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
3783
+ description: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
3784
+ }, null, 8, ["title", "description"])) : de.value && D.value ? (J(), V(Z(_e), {
3205
3785
  key: 3,
3206
3786
  class: "data-grant-content",
3207
- title: Ve.value ? Y(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Y(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: be.value }),
3787
+ title: Me.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: me.value }),
3208
3788
  searchable: !1,
3209
- onRefresh: Qe
3789
+ onRefresh: Je
3210
3790
  }, {
3211
- default: Z(() => [V("header", Qn, [V("div", null, [V("h3", null, J(Y(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), V("p", null, J(Y(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), Re.value ? z("v-if", !0) : (K(), R(Y(f), {
3791
+ default: $(() => [W("header", Ar, [W("div", null, [W("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), W("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), je.value ? H("v-if", !0) : (J(), V(Z(L), {
3212
3792
  key: 0,
3213
3793
  type: "primary",
3214
- disabled: !Q.value,
3215
- loading: A.value,
3216
- onClick: ft
3794
+ disabled: !q.value,
3795
+ loading: j.value,
3796
+ onClick: dt
3217
3797
  }, {
3218
- default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3798
+ default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3219
3799
  _: 1
3220
- }, 8, ["disabled", "loading"]))]), U(Y(g), {
3221
- columns: Ae.value,
3222
- rows: Ie.value,
3800
+ }, 8, ["disabled", "loading"]))]), K(Z(oe), {
3801
+ columns: De.value,
3802
+ rows: ke.value,
3223
3803
  "row-key": "actionCode",
3224
3804
  "horizontal-scroll": ""
3225
3805
  }, {
3226
- cell: Z(({ column: e, record: t }) => [e.key === "title" ? (K(), B(I, { key: 0 }, [V("strong", null, J(t.title || t.actionCode), 1), V("small", null, J(t.actionCode), 1)], 64)) : e.key === "configured" ? (K(), R(Y(E), {
3806
+ cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.actionCode), 1)], 64)) : e.key === "configured" ? (J(), V(Z(S), {
3227
3807
  key: 1,
3228
3808
  checked: !!t.configured,
3229
- disabled: A.value,
3809
+ disabled: j.value,
3230
3810
  onChange: (e) => t.configured = e
3231
3811
  }, null, 8, [
3232
3812
  "checked",
3233
3813
  "disabled",
3234
3814
  "onChange"
3235
- ])) : (K(), R(Y(ae), {
3815
+ ])) : (J(), V(Z(d), {
3236
3816
  key: 2,
3237
3817
  value: t.dataScopePolicy,
3238
- options: Te.value,
3239
- disabled: !t.configured || A.value,
3240
- placeholder: Y(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
3818
+ options: xe.value,
3819
+ disabled: !t.configured || j.value,
3820
+ placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
3241
3821
  "allow-clear": !1,
3242
3822
  "onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
3243
3823
  }, null, 8, [
@@ -3250,22 +3830,22 @@ var Qn = { class: "panel-title" }, $n = {
3250
3830
  _: 1
3251
3831
  }, 8, ["columns", "rows"])]),
3252
3832
  _: 1
3253
- }, 8, ["title"])) : (K(), B("section", {
3833
+ }, 8, ["title"])) : (J(), U("section", {
3254
3834
  key: 4,
3255
- class: je(["authorization-layout", { "authorization-layout--compact-actions": !G.value }])
3256
- }, [U(Y(u), {
3257
- "search-keyword": C.value,
3258
- "onUpdate:searchKeyword": t[1] ||= (e) => C.value = e,
3835
+ class: He(["authorization-layout", { "authorization-layout--compact-actions": !Te.value }])
3836
+ }, [K(Z(_e), {
3837
+ "search-keyword": T.value,
3838
+ "onUpdate:searchKeyword": t[1] ||= (e) => T.value = e,
3259
3839
  class: "module-panel",
3260
- title: Y(n).t("platform.screen.RoleAuthorizationView.module-tree", "模块树"),
3261
- "refresh-title": Y(n).t("platform.screen.RoleAuthorizationView.refresh-module-directory", "刷新模块目录"),
3262
- "search-placeholder": Y(n).t("platform.screen.RoleAuthorizationView.search-module-names-or-aliases", "搜索模块名称或别名"),
3263
- onRefresh: Qe
3840
+ title: Z(n).t("platform.screen.RoleAuthorizationView.module-tree", "模块树"),
3841
+ "refresh-title": Z(n).t("platform.screen.RoleAuthorizationView.refresh-module-directory", "刷新模块目录"),
3842
+ "search-placeholder": Z(n).t("platform.screen.RoleAuthorizationView.search-module-names-or-aliases", "搜索模块名称或别名"),
3843
+ onRefresh: Je
3264
3844
  }, {
3265
- default: Z(() => [U(Y(re), {
3266
- records: we.value,
3267
- "selected-id": S.value,
3268
- onSelect: t[0] ||= (e) => S.value = e.id
3845
+ default: $(() => [K(Z(h), {
3846
+ records: be.value,
3847
+ "selected-id": w.value,
3848
+ onSelect: t[0] ||= (e) => w.value = e.id
3269
3849
  }, null, 8, ["records", "selected-id"])]),
3270
3850
  _: 1
3271
3851
  }, 8, [
@@ -3273,112 +3853,112 @@ var Qn = { class: "panel-title" }, $n = {
3273
3853
  "title",
3274
3854
  "refresh-title",
3275
3855
  "search-placeholder"
3276
- ]), U(Y(u), {
3856
+ ]), K(Z(_e), {
3277
3857
  class: "action-panel",
3278
- title: Se.value,
3858
+ title: ve.value,
3279
3859
  searchable: !1
3280
- }, De({
3281
- default: Z(() => [se.value ? (K(), R(Y(m), {
3860
+ }, Ie({
3861
+ default: $(() => [A.value ? (J(), V(Z(_), {
3282
3862
  key: 0,
3283
- tip: Y(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
3284
- }, null, 8, ["tip"])) : S.value ? (K(), R(Y(g), {
3863
+ tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
3864
+ }, null, 8, ["tip"])) : w.value ? (J(), V(Z(oe), {
3285
3865
  key: 2,
3286
- columns: ke.value,
3287
- rows: Fe.value,
3866
+ columns: Ee.value,
3867
+ rows: Oe.value,
3288
3868
  "row-key": "actionCode",
3289
3869
  "fill-height": "",
3290
3870
  "horizontal-scroll": ""
3291
3871
  }, {
3292
- header: Z(({ column: e }) => [e.key === "granted" ? (K(), B("span", $n, [U(Y(k), {
3293
- checked: Ke.value,
3294
- indeterminate: Je.value,
3295
- disabled: A.value || !w.value.length,
3296
- "aria-label": Y(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
3297
- onChange: tt
3872
+ header: $(({ column: e }) => [e.key === "granted" ? (J(), U("span", jr, [K(Z(re), {
3873
+ checked: ze.value,
3874
+ indeterminate: Be.value,
3875
+ disabled: j.value || !E.value.length,
3876
+ "aria-label": Z(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
3877
+ onChange: $e
3298
3878
  }, null, 8, [
3299
3879
  "checked",
3300
3880
  "indeterminate",
3301
3881
  "disabled",
3302
3882
  "aria-label"
3303
- ]), H(" " + J(Y(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (K(), B(I, { key: 1 }, [H(J(e.title), 1)], 64))]),
3304
- cell: Z(({ column: e, record: t }) => [e.key === "title" ? (K(), B(I, { key: 0 }, [V("strong", null, J(t.title || t.actionCode), 1), V("small", null, J(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (K(), R(Y(k), {
3883
+ ]), G(" " + X(Z(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (J(), U(z, { key: 1 }, [G(X(e.title), 1)], 64))]),
3884
+ cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), V(Z(re), {
3305
3885
  key: 1,
3306
3886
  checked: !!t.granted,
3307
- disabled: A.value,
3308
- onChange: (e) => et(t, e)
3887
+ disabled: j.value,
3888
+ onChange: (e) => Xe(t, e)
3309
3889
  }, null, 8, [
3310
3890
  "checked",
3311
3891
  "disabled",
3312
3892
  "onChange"
3313
- ])) : t.dataAuth && ve.value && t.granted ? (K(), B("div", er, [U(Y(ae), {
3314
- value: ot(t),
3315
- options: Te.value,
3316
- disabled: A.value,
3893
+ ])) : t.dataAuth && fe.value && t.granted ? (J(), U("div", Mr, [K(Z(d), {
3894
+ value: it(t),
3895
+ options: xe.value,
3896
+ disabled: j.value,
3317
3897
  "allow-clear": !1,
3318
- "onUpdate:value": (e) => nt(t, e)
3898
+ "onUpdate:value": (e) => et(t, e)
3319
3899
  }, null, 8, [
3320
3900
  "value",
3321
3901
  "options",
3322
3902
  "disabled",
3323
3903
  "onUpdate:value"
3324
- ]), t.dataScopePolicy === "referenceDependency" ? (K(), B(I, { key: 0 }, [U(Y(ae), {
3325
- value: at(t.referenceFieldId),
3326
- options: Ee.value,
3327
- disabled: A.value,
3328
- placeholder: Y(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
3904
+ ]), t.dataScopePolicy === "referenceDependency" ? (J(), U(z, { key: 0 }, [K(Z(d), {
3905
+ value: rt(t.referenceFieldId),
3906
+ options: Se.value,
3907
+ disabled: j.value,
3908
+ placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
3329
3909
  "allow-clear": !1,
3330
- "onUpdate:value": (e) => rt(t, e)
3910
+ "onUpdate:value": (e) => tt(t, e)
3331
3911
  }, null, 8, [
3332
3912
  "value",
3333
3913
  "options",
3334
3914
  "disabled",
3335
3915
  "placeholder",
3336
3916
  "onUpdate:value"
3337
- ]), t.referenceFieldId ? (K(), B("small", tr, J(Y(n).t("platform.screen.RoleAuthorizationView.dependency-target", "依赖目标:")) + J(it(t.referenceFieldId)?.targetModuleTitle) + " · " + J(it(t.referenceFieldId)?.referenceActionTitle), 1)) : (K(), B("small", nr, J(Y(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field-before-granting-this-action", "请先选择引用字段,再开启该动作授权。")), 1))], 64)) : z("v-if", !0)])) : ct(e, t) ? (K(), B("span", rr, "—")) : (K(), B("span", ir, J(Y(n).t("platform.screen.RoleAuthorizationView.not-applicable", "不适用")), 1))]),
3917
+ ]), t.referenceFieldId ? (J(), U("small", Nr, X(Z(n).t("platform.screen.RoleAuthorizationView.dependency-target", "依赖目标:")) + X(nt(t.referenceFieldId)?.targetModuleTitle) + " · " + X(nt(t.referenceFieldId)?.referenceActionTitle), 1)) : (J(), U("small", Pr, X(Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field-before-granting-this-action", "请先选择引用字段,再开启该动作授权。")), 1))], 64)) : H("v-if", !0)])) : ot(e, t) ? (J(), U("span", Fr, "—")) : (J(), U("span", Ir, X(Z(n).t("platform.screen.RoleAuthorizationView.not-applicable", "不适用")), 1))]),
3338
3918
  _: 1
3339
- }, 8, ["columns", "rows"])) : (K(), R(Y(O), {
3919
+ }, 8, ["columns", "rows"])) : (J(), V(Z(C), {
3340
3920
  key: 1,
3341
- title: Y(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
3921
+ title: Z(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
3342
3922
  }, null, 8, ["title"]))]),
3343
3923
  _: 2
3344
- }, [Re.value ? void 0 : {
3924
+ }, [je.value ? void 0 : {
3345
3925
  name: "actions",
3346
- fn: Z(() => [U(Y(f), {
3926
+ fn: $(() => [K(Z(L), {
3347
3927
  type: "primary",
3348
- disabled: !Q.value,
3349
- loading: A.value,
3350
- onClick: ft
3928
+ disabled: !q.value,
3929
+ loading: j.value,
3930
+ onClick: dt
3351
3931
  }, {
3352
- default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3932
+ default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3353
3933
  _: 1
3354
3934
  }, 8, ["disabled", "loading"])]),
3355
3935
  key: "0"
3356
3936
  }]), 1032, ["title"])], 2))], 2)]),
3357
3937
  _: 2
3358
- }, [Ve.value && !he.value ? {
3938
+ }, [Me.value && !ue.value ? {
3359
3939
  name: "operation",
3360
- fn: Z(() => [U(Y(f), {
3940
+ fn: $(() => [K(Z(L), {
3361
3941
  type: "primary",
3362
- disabled: !Q.value,
3363
- loading: A.value,
3364
- onClick: ft
3942
+ disabled: !q.value,
3943
+ loading: j.value,
3944
+ onClick: dt
3365
3945
  }, {
3366
- default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3946
+ default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3367
3947
  _: 1
3368
3948
  }, 8, ["disabled", "loading"])]),
3369
3949
  key: "0"
3370
3950
  } : void 0]), 1040));
3371
3951
  }
3372
- }), or = /* @__PURE__ */ e({ default: () => sr }), sr = /*#__PURE__*/ P(ar, [["__scopeId", "data-v-817d8433"]]), cr = { class: "role-authorization-drawer-surface" }, lr = /*#__PURE__*/ P(/* @__PURE__ */ G({
3952
+ }), Rr = /* @__PURE__ */ e({ default: () => zr }), zr = /*#__PURE__*/ P(Lr, [["__scopeId", "data-v-817d8433"]]), Br = { class: "role-authorization-drawer-surface" }, Vr = /*#__PURE__*/ P(/* @__PURE__ */ q({
3373
3953
  name: "RoleAuthorizationDrawerSurface",
3374
3954
  __name: "RoleAuthorizationDrawerSurface",
3375
3955
  props: { context: {} },
3376
3956
  setup(e) {
3377
3957
  let t = e, n = t.context.module;
3378
- return (e, r) => (K(), B("section", cr, [t.context.record?.id == null ? z("v-if", !0) : (K(), R(sr, {
3958
+ return (e, r) => (J(), U("section", Br, [t.context.record?.id == null ? H("v-if", !0) : (J(), V(zr, {
3379
3959
  key: 0,
3380
3960
  "role-id": String(t.context.record.id),
3381
- "module-context": Y(n),
3961
+ "module-context": Z(n),
3382
3962
  "drawer-context": t.context
3383
3963
  }, null, 8, [
3384
3964
  "role-id",
@@ -3386,48 +3966,48 @@ var Qn = { class: "panel-title" }, $n = {
3386
3966
  "drawer-context"
3387
3967
  ]))]));
3388
3968
  }
3389
- }), [["__scopeId", "data-v-04d29709"]]), ur = {
3969
+ }), [["__scopeId", "data-v-04d29709"]]), Hr = {
3390
3970
  key: 0,
3391
3971
  class: "role-group-member-form-field"
3392
- }, dr = {
3972
+ }, Ur = {
3393
3973
  id: "iam-role-scope-and-actions",
3394
3974
  target: { moduleAlias: "iam.role" },
3395
3975
  navigator: {
3396
3976
  bypassListScope: !0,
3397
3977
  extension: {
3398
3978
  key: "iam-role-scope-tree",
3399
- component: hn,
3979
+ component: qn,
3400
3980
  selection: { kind: "roleScope" }
3401
3981
  }
3402
3982
  },
3403
3983
  list: { cellComponents: [
3404
3984
  {
3405
3985
  key: "assignmentType",
3406
- cell: gn
3986
+ cell: Jn
3407
3987
  },
3408
3988
  {
3409
3989
  key: "roleKind",
3410
- cell: gn
3990
+ cell: Jn
3411
3991
  },
3412
3992
  {
3413
3993
  key: "sharePolicy",
3414
- cell: gn
3994
+ cell: Jn
3415
3995
  }
3416
3996
  ] },
3417
3997
  form: {
3418
3998
  contributions: [{
3419
3999
  key: "role-group-members",
3420
- component: /* @__PURE__ */ P(/* @__PURE__ */ G({
4000
+ component: /* @__PURE__ */ P(/* @__PURE__ */ q({
3421
4001
  name: "RoleGroupMemberFormField",
3422
4002
  __name: "RoleGroupMemberFormField",
3423
4003
  props: { context: {} },
3424
4004
  setup(e) {
3425
- let t = b(), n = e, r = q([]), i = q(!1), a = L(() => n.context.draft.roleKind === "group"), o = L(() => f(n.context.draft.memberRoleIds)), s = L(() => String(n.context.draft.id ?? "") || void 0), c = L(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = L(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
4005
+ let t = y(), n = e, r = Y([]), i = Y(!1), a = B(() => n.context.draft.roleKind === "group"), o = B(() => p(n.context.draft.memberRoleIds)), s = B(() => String(n.context.draft.id ?? "") || void 0), c = B(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = B(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
3426
4006
  label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? t.t("platform.screen.RoleManagementView.data-authorization-role", "数据授权角色") : t.t("platform.screen.RoleManagementView.standard-role", "标准角色")}`,
3427
4007
  value: e.id,
3428
4008
  disabled: e.roleKind === "dataGrant" && c.value.size > 0 && !o.value.includes(e.id)
3429
4009
  })));
3430
- X([a, () => n.context.formSessionKey], () => void u(), { immediate: !0 });
4010
+ Q([a, () => n.context.formSessionKey], () => void u(), { immediate: !0 });
3431
4011
  async function u() {
3432
4012
  if (!a.value) {
3433
4013
  r.value = [];
@@ -3474,29 +4054,29 @@ var Qn = { class: "panel-title" }, $n = {
3474
4054
  i.value = !1;
3475
4055
  }
3476
4056
  }
3477
- function d(e) {
4057
+ function f(e) {
3478
4058
  let t = Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : [];
3479
4059
  n.context.setField("memberRoleIds", t.length > 0 ? t.join(",") : void 0);
3480
4060
  }
3481
- function f(e) {
4061
+ function p(e) {
3482
4062
  return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
3483
4063
  }
3484
- return (n, r) => a.value ? (K(), B("label", ur, [V("span", null, J(Y(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), U(Y(ae), {
4064
+ return (n, r) => a.value ? (J(), U("label", Hr, [W("span", null, X(Z(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), K(Z(d), {
3485
4065
  mode: "multiple",
3486
4066
  value: o.value,
3487
4067
  options: l.value,
3488
4068
  loading: i.value,
3489
- placeholder: Y(t).t("platform.screen.RoleGroupMemberSelector.select-member-roles", "请选择成员角色"),
4069
+ placeholder: Z(t).t("platform.screen.RoleGroupMemberSelector.select-member-roles", "请选择成员角色"),
3490
4070
  disabled: e.context.mode === "view",
3491
4071
  "allow-clear": "",
3492
- "onUpdate:value": d
4072
+ "onUpdate:value": f
3493
4073
  }, null, 8, [
3494
4074
  "value",
3495
4075
  "options",
3496
4076
  "loading",
3497
4077
  "placeholder",
3498
4078
  "disabled"
3499
- ])])) : z("v-if", !0);
4079
+ ])])) : H("v-if", !0);
3500
4080
  }
3501
4081
  }), [["__scopeId", "data-v-5dd40ab2"]]),
3502
4082
  location: {
@@ -3525,7 +4105,7 @@ var Qn = { class: "panel-title" }, $n = {
3525
4105
  title: "绑定用户",
3526
4106
  titleKey: "platform.screen.RoleManagementView.assign-to-users",
3527
4107
  width: "extraWide",
3528
- component: On
4108
+ component: or
3529
4109
  });
3530
4110
  }
3531
4111
  },
@@ -3543,7 +4123,7 @@ var Qn = { class: "panel-title" }, $n = {
3543
4123
  title: "绑定任职",
3544
4124
  titleKey: "platform.screen.RoleManagementView.assign-to-positions",
3545
4125
  width: "extraWide",
3546
- component: Ln
4126
+ component: hr
3547
4127
  });
3548
4128
  }
3549
4129
  },
@@ -3561,21 +4141,21 @@ var Qn = { class: "panel-title" }, $n = {
3561
4141
  title: "角色授权",
3562
4142
  titleKey: "platform.unsaved-source.RoleAuthorizationView",
3563
4143
  width: "wide",
3564
- component: lr
4144
+ component: Vr
3565
4145
  });
3566
4146
  }
3567
4147
  }
3568
4148
  ]
3569
4149
  };
3570
- a("platform-admin-runtime", Je), c("platform-admin-runtime", [
3571
- ht,
3572
- gt,
3573
- _t,
3574
- Ct,
3575
- At,
3576
- It,
3577
- Yt,
3578
- dr
4150
+ o("platform-admin-runtime", ct), l("platform-admin-runtime", [
4151
+ Kt,
4152
+ qt,
4153
+ Jt,
4154
+ tn,
4155
+ ln,
4156
+ hn,
4157
+ On,
4158
+ Ur
3579
4159
  ]);
3580
4160
  //#endregion
3581
- export { Kn as a, Dn as c, Gn as i, Ke as l, or as n, Bn as o, Wn as r, In as s, sr as t };
4161
+ export { wr as a, ar as c, Cr as i, ot as l, Rr as n, vr as o, Sr as r, mr as s, zr as t };