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