@ximatai/muyun-web-app 0.26.13 → 0.26.15

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 (186) hide show
  1. package/dist/{BusinessActivityLogView-UC4rH4Fn.js → BusinessActivityLogView-DVzrZW1X.js} +1 -1
  2. package/dist/BusinessLogListDrawer-D-R3wnWr.js +825 -0
  3. package/dist/{LoginAuditLogView-Cjrp8MKX.js → LoginAuditLogView-BP1eaEPw.js} +1 -1
  4. package/dist/{ModuleActionManagementView-Dkb35QXc.js → ModuleActionManagementView-D17iKVQv.js} +214 -196
  5. package/dist/{ModuleGovernanceView-Dx43QvGf.js → ModuleGovernanceView-LkWCtops.js} +13509 -8472
  6. package/dist/{RequestErrorLogView-WnGvMWiF.js → RequestErrorLogView-LzN94-Tk.js} +1 -1
  7. package/dist/{RoleDetailWorkspaceView-DPDb_QOn.js → RoleDetailWorkspaceView-BXA-bzFu.js} +173 -164
  8. package/dist/{RuntimeLogView-BRl4ZDkU.js → RuntimeLogView-DUpu2q2w.js} +48 -81
  9. package/dist/index.css +1 -1
  10. package/dist/index.js +562 -497
  11. package/dist/moduleGovernanceWorkspaceView-COjWtJMr.js +639 -0
  12. package/dist/{platform-components-1cvOeHmo.js → platform-components-Hs3DrTqE.js} +5260 -3344
  13. package/dist/platform-workbench-C-kE-Yqq.js +19755 -0
  14. package/dist/{http-B0TC0pJB.js → sse-Q1wa3p_k.js} +34 -4
  15. package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
  16. package/dist/types/app/useWorkbenchMenuRefresh.d.ts +4 -0
  17. package/dist/types/app/workbenchMenuRefresh.d.ts +14 -0
  18. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
  19. package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -3
  20. package/dist/types/dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts +17 -0
  21. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +712 -22
  22. package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -2
  23. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +782 -60
  24. package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +1 -0
  25. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +1 -0
  26. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +1 -0
  27. package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +5 -2
  28. package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +6 -0
  29. package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +9 -7
  30. package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +2 -0
  31. package/dist/types/dynamic-page-runtime/assistantBusinessScope.d.ts +3 -0
  32. package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +34 -0
  33. package/dist/types/dynamic-page-runtime/assistantRecordEditorPolicy.d.ts +6 -0
  34. package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +2 -0
  35. package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +1 -0
  36. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +94 -4
  37. package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +2 -0
  38. package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +2 -0
  39. package/dist/types/dynamic-page-runtime/index.d.ts +1 -0
  40. package/dist/types/dynamic-page-runtime/modulePageAssistantScope.d.ts +20 -0
  41. package/dist/types/dynamic-page-runtime/modulePageAssistantSurface.d.ts +6 -0
  42. package/dist/types/dynamic-page-runtime/recordCreationReadiness.d.ts +17 -0
  43. package/dist/types/dynamic-page-runtime/recordDisplayProjection.d.ts +59 -0
  44. package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +59 -0
  45. package/dist/types/dynamic-page-runtime/recordFormDraftAccess.d.ts +33 -0
  46. package/dist/types/dynamic-page-runtime/recordMutationPayload.d.ts +2 -2
  47. package/dist/types/dynamic-page-runtime/recordReferenceDisplay.d.ts +8 -0
  48. package/dist/types/dynamic-page-runtime/recordSaveRecovery.d.ts +12 -0
  49. package/dist/types/dynamic-page-runtime/relationDraftAssistantCapabilities.d.ts +9 -0
  50. package/dist/types/dynamic-page-runtime/relationDraftController.d.ts +23 -0
  51. package/dist/types/dynamic-page-runtime/relationFormComputeCoordinator.d.ts +1 -0
  52. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +404 -12
  53. package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
  54. package/dist/types/formula/FormulaRuntime.d.ts +3 -1
  55. package/dist/types/platform-admin-runtime/backendHttp.d.ts +5 -1
  56. package/dist/types/platform-admin-runtime/module-menu/ModuleMenuEditor.vue.d.ts +17 -0
  57. package/dist/types/platform-admin-runtime/module-menu/ModuleMenuGovernanceSurface.vue.d.ts +6 -0
  58. package/dist/types/platform-admin-runtime/module-menu/moduleMenuClient.d.ts +6 -2
  59. package/dist/types/platform-admin-runtime/module-menu/moduleMenuReceiptStore.d.ts +5 -0
  60. package/dist/types/platform-admin-runtime/module-menu/moduleMenuSession.d.ts +61 -0
  61. package/dist/types/platform-admin-runtime/module-menu/moduleMenuWorkspace.d.ts +180 -0
  62. package/dist/types/platform-admin-runtime/workspaceViewSessions.d.ts +1 -1
  63. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +11 -7
  64. package/dist/types/platform-components/DictionaryPicker.vue.d.ts +2 -0
  65. package/dist/types/platform-components/FileTransferUploader.vue.d.ts +1 -1
  66. package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +6 -4
  67. package/dist/types/platform-components/ManagementTabs.vue.d.ts +20 -0
  68. package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -0
  69. package/dist/types/platform-components/QueryValueEditor.vue.d.ts +1 -1
  70. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
  71. package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +15 -9
  72. package/dist/types/platform-components/RecordExplorerTools.vue.d.ts +27 -0
  73. package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -1
  74. package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -2
  75. package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +2 -0
  76. package/dist/types/platform-components/RecordPicker.vue.d.ts +2 -0
  77. package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -1
  78. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +9 -1
  79. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
  80. package/dist/types/platform-components/RecordRelationTabs.vue.d.ts +1 -0
  81. package/dist/types/platform-components/ReferencePicker.vue.d.ts +2 -0
  82. package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +2 -0
  83. package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +5 -2
  84. package/dist/types/platform-components/index.d.ts +9 -1
  85. package/dist/types/platform-components/optionFieldOptionCache.d.ts +1 -1
  86. package/dist/types/platform-components/queryNumericValue.d.ts +3 -0
  87. package/dist/types/platform-components/querySettlementController.d.ts +5 -0
  88. package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
  89. package/dist/types/platform-components/recordFormFieldModel.d.ts +22 -0
  90. package/dist/types/platform-components/recordQueryListColumnModel.d.ts +8 -0
  91. package/dist/types/platform-components/recordQueryListQueryController.d.ts +53 -0
  92. package/dist/types/platform-components/recordQueryListStandardQuery.d.ts +3 -0
  93. package/dist/types/platform-components/recordTreeQueryController.d.ts +18 -0
  94. package/dist/types/platform-components/recycleBinState.d.ts +17 -0
  95. package/dist/types/platform-components/referencePickerModel.d.ts +3 -0
  96. package/dist/types/platform-workbench/AssistantMarkdownContent.vue.d.ts +6 -0
  97. package/dist/types/platform-workbench/AssistantSelectionCard.vue.d.ts +15 -0
  98. package/dist/types/platform-workbench/ConstructionPlanCard.vue.d.ts +8 -0
  99. package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
  100. package/dist/types/platform-workbench/WorkbenchAssistantPanel.vue.d.ts +18 -0
  101. package/dist/types/platform-workbench/assistantMarkdown.d.ts +1 -0
  102. package/dist/types/platform-workbench/configurationCollaboration.d.ts +23 -0
  103. package/dist/types/platform-workbench/constructionDelivery.d.ts +3 -0
  104. package/dist/types/platform-workbench/constructionFields.d.ts +5 -0
  105. package/dist/types/platform-workbench/constructionInitialization.d.ts +4 -0
  106. package/dist/types/platform-workbench/constructionPlanGuard.d.ts +21 -0
  107. package/dist/types/platform-workbench/constructionPlanSession.d.ts +95 -0
  108. package/dist/types/platform-workbench/constructionReferenceDiscovery.d.ts +3 -0
  109. package/dist/types/platform-workbench/index.d.ts +1 -0
  110. package/dist/types/platform-workbench/useAssistantConversation.d.ts +360 -0
  111. package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +47 -0
  112. package/dist/types/platform-workbench/workbenchAssistantCapabilities.d.ts +22 -0
  113. package/dist/types/views/BusinessLogRetentionControl.vue.d.ts +7 -0
  114. package/dist/types/views/MetadataSourceTree.vue.d.ts +7 -3
  115. package/dist/types/views/ModuleRuntimeActivationStatus.vue.d.ts +11 -0
  116. package/dist/types/views/PageCompositionDescriptorPreview.vue.d.ts +8 -8
  117. package/dist/types/views/PageCompositionEditor.vue.d.ts +10 -0
  118. package/dist/types/views/PageCompositionTree.vue.d.ts +19 -13
  119. package/dist/types/views/businessLogClient.d.ts +3 -0
  120. package/dist/types/views/businessLogRetentionClient.d.ts +25 -0
  121. package/dist/types/views/businessRuleAssistantSurface.d.ts +7 -0
  122. package/dist/types/views/businessRuleEditor.d.ts +22 -0
  123. package/dist/types/views/businessRuleGovernance.d.ts +7 -1
  124. package/dist/types/views/businessRuleSession.d.ts +63 -0
  125. package/dist/types/views/businessRuleWorkspace.d.ts +144 -0
  126. package/dist/types/views/configurationEditorNavigation.d.ts +2 -0
  127. package/dist/types/views/metadataChangeSetSubmission.d.ts +10 -0
  128. package/dist/types/views/metadataEditorSession.d.ts +652 -0
  129. package/dist/types/views/metadataGovernanceAssistantSurface.d.ts +4 -0
  130. package/dist/types/views/metadataGovernanceEditor.d.ts +220 -0
  131. package/dist/types/views/metadataModelChangeSetClient.d.ts +36 -0
  132. package/dist/types/views/metadataModelEditSession.d.ts +26 -1
  133. package/dist/types/views/metadataNaming.d.ts +11 -1
  134. package/dist/types/views/metadataOrchestrationState.d.ts +22 -0
  135. package/dist/types/views/metadataWorkspace.d.ts +1316 -0
  136. package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
  137. package/dist/types/views/moduleRuntimeActivation.d.ts +11 -0
  138. package/dist/types/views/pageCompositionAssistantSurface.d.ts +27 -0
  139. package/dist/types/views/pageCompositionCandidate.d.ts +47 -0
  140. package/dist/types/views/pageCompositionComponents.d.ts +42 -0
  141. package/dist/types/views/pageCompositionDraftState.d.ts +277 -8
  142. package/dist/types/views/pageCompositionDragPayload.d.ts +7 -1
  143. package/dist/types/views/pageCompositionMode.d.ts +1 -1
  144. package/dist/types/views/pageCompositionPlacement.d.ts +6 -1
  145. package/dist/types/views/pageCompositionPublication.d.ts +37 -0
  146. package/dist/types/views/pageCompositionSession.d.ts +1341 -0
  147. package/dist/types/views/pageCompositionWorkspace.d.ts +2555 -0
  148. package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +1 -1
  149. package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -1
  150. package/dist/types/views/runtimeLogSse.d.ts +3 -13
  151. package/dist/types/views/usePageCompositionComponents.d.ts +68 -0
  152. package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +1 -0
  153. package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +2 -0
  154. package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +2 -0
  155. package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +4 -0
  156. package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +2 -0
  157. package/dist/types/vue-ui-antdv/types.d.ts +4 -0
  158. package/dist/types/web-contracts/assistant.d.ts +87 -0
  159. package/dist/types/web-contracts/constructionPlan.d.ts +212 -0
  160. package/dist/types/web-contracts/index.d.ts +33 -0
  161. package/dist/types/web-contracts/operation.d.ts +33 -0
  162. package/dist/types/web-contracts/referenceTarget.d.ts +13 -0
  163. package/dist/types/web-core/assistantCapabilityCatalog.d.ts +22 -0
  164. package/dist/types/web-core/assistantCatalogPage.d.ts +12 -0
  165. package/dist/types/web-core/assistantConfirmation.d.ts +23 -0
  166. package/dist/types/web-core/assistantConversationClient.d.ts +42 -0
  167. package/dist/types/web-core/assistantRuntime.d.ts +123 -0
  168. package/dist/types/web-core/assistantSurface.d.ts +162 -0
  169. package/dist/types/web-core/assistantTurnClient.d.ts +16 -0
  170. package/dist/types/web-core/constructionPlanClient.d.ts +55 -0
  171. package/dist/types/web-core/errors.d.ts +2 -0
  172. package/dist/types/web-core/http.d.ts +1 -0
  173. package/dist/types/web-core/index.d.ts +12 -0
  174. package/dist/types/web-core/module/dataExchangeClient.d.ts +53 -0
  175. package/dist/types/web-core/module/index.d.ts +1 -0
  176. package/dist/types/web-core/module/staticModuleClient.d.ts +12 -2
  177. package/dist/types/web-core/operationConfirmation.d.ts +28 -0
  178. package/dist/types/web-core/operationErrors.d.ts +9 -0
  179. package/dist/types/web-core/operationReceipt.d.ts +10 -0
  180. package/dist/types/web-core/sse.d.ts +9 -0
  181. package/dist/types/web-core/uuid.d.ts +2 -0
  182. package/dist/{workspaceViews-CCg6V0pr.js → workspaceViews-CHsgLFwY.js} +783 -1189
  183. package/package.json +1 -1
  184. package/dist/BusinessLogListDrawer-BtaXVJKz.js +0 -564
  185. package/dist/moduleGovernanceWorkspaceView-4V_UW-Bt.js +0 -40
  186. package/dist/platform-workbench-Cu14Xd9d.js +0 -10299
@@ -1,61 +1,19 @@
1
1
  import { n as e } from "./rolldown-runtime-DPVXH0ON.js";
2
- import { Bn as t, C as n, Cn as r, Gt as i, Ht as a, I as o, It as s, Jt as c, L as l, Lt as u, O as d, Ot as f, Rn as p, Rt as m, T as h, Un as g, Ut as _, Vn as v, Wt as y, bn as b, cn as x, dn as S, f as C, jt as w, kt as T, ln as E, lr as D, nn as O, nr as k, on as A, pn as j, qn as ee, rt as M, sn as N, tn as P, u as te, zn as ne, zt as re } from "./platform-components-1cvOeHmo.js";
3
- import { r as ie, t as F } from "./http-B0TC0pJB.js";
4
- import { K as I, _ as ae, it as L, q as oe, s as se, t as ce, u as le } from "./platform-workbench-Cu14Xd9d.js";
5
- import { n as ue, r as de } from "./moduleGovernanceWorkspaceView-4V_UW-Bt.js";
6
- import { Fragment as R, computed as z, createBlock as B, createCommentVNode as V, createElementBlock as H, createElementVNode as U, createSlots as fe, createTextVNode as W, createVNode as G, defineAsyncComponent as pe, defineComponent as K, guardReactiveProps as me, mergeProps as he, nextTick as ge, normalizeClass as _e, normalizeProps as ve, onBeforeUnmount as ye, onMounted as be, onUnmounted as xe, openBlock as q, ref as J, renderList as Se, renderSlot as Ce, resolveDynamicComponent as we, toDisplayString as Y, toValue as Te, unref as X, watch as Z, withCtx as Q, withKeys as Ee, withModifiers as De } from "vue";
7
- //#region src/web-core/dataChanges.ts
8
- function Oe(e = {}) {
9
- let t = Math.max(1, e.maxHandledChangeSetIds ?? 1e3), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
10
- return {
11
- async dispatch(e) {
12
- let t = ke(e);
13
- return !t || n.has(t.changeSetId) ? !1 : (i(t.changeSetId), await Promise.allSettled([...r].map((e) => Promise.resolve().then(() => e(t)))), !0);
14
- },
15
- subscribe(e) {
16
- return r.add(e), { unsubscribe() {
17
- r.delete(e);
18
- } };
19
- },
20
- markHandled(e) {
21
- let t = Ae(e);
22
- t && i(t);
23
- }
24
- };
25
- function i(e) {
26
- for (n.delete(e), n.add(e); n.size > t;) {
27
- let e = n.values().next().value;
28
- if (!e) return;
29
- n.delete(e);
30
- }
31
- }
32
- }
33
- function ke(e) {
34
- let t = Ae(e?.changeSetId);
35
- if (t && Array.isArray(e?.changes)) return {
36
- changeSetId: t,
37
- changes: e.changes.filter(je)
38
- };
39
- }
40
- function Ae(e) {
41
- return e?.trim() || void 0;
42
- }
43
- function je(e) {
44
- if (!e || typeof e != "object") return !1;
45
- let t = e.type, n = e.moduleAlias;
46
- return typeof t == "string" && t.trim() !== "" && typeof n == "string" && n.trim() !== "";
47
- }
48
- //#endregion
2
+ import { T as t, _ as n, at as r, h as i, k as a, ot as o, s, t as c, u as l, x as u } from "./platform-workbench-C-kE-Yqq.js";
3
+ import { $t as d, Bt as f, C as p, Cn as m, Dn as h, O as g, Pn as _, Qt as v, R as y, Sn as b, T as x, Tn as S, Ut as C, Vt as w, Wr as T, Xt as E, Zt as D, an as O, bn as k, cn as ee, f as A, gn as te, ht as ne, in as j, nn as M, rn as re, u as ie, xn as ae, z as oe } from "./platform-components-Hs3DrTqE.js";
4
+ import { n as N } from "./sse-Q1wa3p_k.js";
5
+ import { a as P, c as F, l as I, n as se, o as ce, r as le, s as ue, u as de } from "./moduleGovernanceWorkspaceView-COjWtJMr.js";
6
+ import { Fragment as L, computed as R, createBlock as z, createCommentVNode as B, createElementBlock as V, createElementVNode as H, createSlots as fe, createTextVNode as U, createVNode as W, defineAsyncComponent as G, defineComponent as K, guardReactiveProps as pe, mergeProps as me, nextTick as he, normalizeClass as ge, normalizeProps as _e, onBeforeUnmount as ve, onMounted as ye, onUnmounted as be, openBlock as q, ref as J, renderList as xe, renderSlot as Se, resolveDynamicComponent as Ce, toDisplayString as Y, toValue as we, unref as X, watch as Z, withCtx as Q, withKeys as Te, withModifiers as Ee } from "vue";
49
7
  //#region src/views/roleDetailWorkspaceView.ts
50
- var Me = /* @__PURE__ */ new Set([
8
+ var De = /* @__PURE__ */ new Set([
51
9
  "platform",
52
10
  "tenant",
53
11
  "organization"
54
- ]), Ne = de({
12
+ ]), Oe = de({
55
13
  type: "iam.role.detail",
56
14
  route: "/iam/role",
57
15
  moduleAlias: "iam.role",
58
- component: pe(() => import("./RoleDetailWorkspaceView-DPDb_QOn.js")),
16
+ component: G(() => import("./RoleDetailWorkspaceView-BXA-bzFu.js")),
59
17
  layout: "workspace",
60
18
  routeTitle: "角色管理",
61
19
  presentations: ["drawer", "tab"],
@@ -68,17 +26,17 @@ var Me = /* @__PURE__ */ new Set([
68
26
  },
69
27
  parse(e) {
70
28
  let t = e.recordId, n = e.scopeKind, r = e.scopeId;
71
- if (!(typeof t != "string" || !t || typeof n != "string" || !Me.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
29
+ if (!(typeof t != "string" || !t || typeof n != "string" || !De.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
72
30
  recordId: t,
73
31
  scopeKind: n,
74
32
  ...typeof r == "string" ? { scopeId: r } : {}
75
33
  };
76
34
  }
77
- }), Pe = de({
35
+ }), ke = de({
78
36
  type: "iam.role.authorization",
79
37
  route: "/iam/role/authorization",
80
38
  moduleAlias: "iam.role",
81
- component: pe(() => Promise.resolve().then(() => Tr)),
39
+ component: G(() => Promise.resolve().then(() => zn)),
82
40
  layout: "workspace",
83
41
  routeTitle: "角色授权",
84
42
  drawerProfile: "wide-work",
@@ -88,11 +46,11 @@ var Me = /* @__PURE__ */ new Set([
88
46
  let t = e.roleId;
89
47
  return typeof t == "string" && t ? { roleId: t } : void 0;
90
48
  }
91
- }), Fe = [Ne, Pe], Ie = de({
49
+ }), Ae = [Oe, ke], je = de({
92
50
  type: "platform.module.actions",
93
51
  route: "/_platform/workspace/platform.module.actions",
94
52
  moduleAlias: "platform.module",
95
- component: pe(() => import("./ModuleActionManagementView-Dkb35QXc.js").then((e) => e.n)),
53
+ component: G(() => import("./ModuleActionManagementView-D17iKVQv.js").then((e) => e.n)),
96
54
  layout: "workspace",
97
55
  routeTitle: "模块管理",
98
56
  presentations: ["tab"],
@@ -106,359 +64,143 @@ var Me = /* @__PURE__ */ new Set([
106
64
  ...e.moduleKind === "static" || e.moduleKind === "dynamic" ? { moduleKind: e.moduleKind } : {}
107
65
  };
108
66
  }
109
- });
110
- //#endregion
111
- //#region src/platform-admin-runtime/module-menu/moduleMenuClient.ts
112
- function Le(e) {
113
- let t = r(e, { moduleAlias: "platform.menu_scheme" });
114
- return {
115
- async schemes() {
116
- let e = [];
117
- for (let n = 1;; n++) {
118
- let r = await t.query({ page: {
119
- pageNum: n,
120
- pageSize: 100
121
- } });
122
- if (e.push(...r.records), e.length >= r.total || r.records.length === 0) return e;
123
- }
124
- },
125
- async tree(t) {
126
- return (await e.request({
127
- method: "POST",
128
- path: "/platform.menu/tree/query",
129
- headers: { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) },
130
- body: { externalQueryValues: { schemeId: t } }
131
- })).records;
132
- },
133
- insert(t, n) {
134
- return r(ie(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).insert(n);
135
- },
136
- visible: () => L(e).mine().then((e) => e.records)
137
- };
138
- }
139
- function $(e, t = "") {
140
- return e.flatMap(({ record: e, children: n }) => {
141
- let r = t ? `${t} / ${e.title}` : e.title;
142
- return [{
143
- menu: e,
144
- path: r
145
- }, ...$(n, r)];
146
- });
147
- }
148
- function Re(e, t = !1) {
149
- return e.map(({ record: e, children: n }) => {
150
- let r = t || e.enabled === !1;
151
- return {
152
- value: e.id,
153
- title: e.title,
154
- disabled: r || !!e.moduleAlias,
155
- children: Re(n, r)
156
- };
157
- });
158
- }
159
- //#endregion
160
- //#region src/platform-admin-runtime/module-menu/ModuleMenuDrawer.vue?vue&type=script&setup=true&lang.ts
161
- var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
162
- key: 1,
163
- class: "hint"
164
- }, He = {
165
- key: 1,
166
- class: "hint"
167
- }, Ue = {
168
- key: 2,
169
- role: "status"
170
- }, We = {
171
- key: 4,
172
- role: "alert"
173
- }, Ge = /*#__PURE__*/ j(/* @__PURE__ */ K({
67
+ }), Me = /* @__PURE__ */ K({
174
68
  __name: "ModuleMenuDrawer",
175
69
  props: { context: {} },
176
70
  setup(e) {
177
- let t = e, n = le(), r = Le(t.context.module.http), i = String(t.context.record?.alias ?? t.context.record?.id ?? ""), a = b({ moduleAlias: i }), o = J(""), s = J(!1), c = J(String(t.context.record?.title ?? i)), l = J([]), u = J(""), d = J("root"), f = J("tab"), p = J([]), m = J(!0), h = J(!1), g = J(!1), _ = J(""), v = J(), y = J(""), x = J(), C = J(!1), w = 0;
178
- ye(() => w++);
179
- let T = z(() => [{
180
- value: "root",
181
- title: "顶层",
182
- children: Re(p.value)
183
- }]), E = z(() => l.value.filter((e) => e.enabled !== !1).map((e) => {
184
- let t = e.title ?? e.alias ?? e.id, n = l.value.some((t) => t.id !== e.id && t.title === e.title), r = e.organizationId ?? e.tenantId ?? "系统";
185
- return {
186
- value: e.id,
187
- label: n ? `${t} · ${r}` : t
188
- };
189
- })), D = z(() => $(p.value).find(({ menu: e }) => e.moduleAlias === i && e.parentId === d.value)), O = z(() => !m.value && !g.value && !v.value && !!(i && u.value && c.value.trim()) && h.value && s.value);
190
- Z([
191
- O,
192
- g,
193
- v
71
+ let t = e, n = String(t.context.record?.alias ?? t.context.record?.id ?? ""), r = l(), a = le(), o = i(), s = () => JSON.stringify([
72
+ o?.value?.userId,
73
+ o?.value?.tenantId,
74
+ o?.value?.organizationId,
75
+ o?.value?.system
76
+ ]), c = s(), u = !0, d = a?.session(n) ?? P(F(t.context.module.http), n, {
77
+ valid: () => u && !!o?.value?.userId && s() === c,
78
+ active: () => u
79
+ }, ce(c, n, () => !!o?.value?.userId && s() === c), r?.refreshMenus), f = J();
80
+ return a?.focus(d), a?.showEditor(d), d.ready.value || d.load(), Z([
81
+ d.canSave,
82
+ d.saving,
83
+ d.saved,
84
+ d.resultUnknown
194
85
  ], () => {
195
- t.context.setCloseBlocked(g.value), t.context.setTitleActions(v.value ? [] : [{
86
+ t.context.setCloseBlocked(d.saving.value), t.context.setTitleActions(d.saved.value || d.resultUnknown.value ? [] : [{
196
87
  key: "add-menu",
197
88
  label: "添加",
198
89
  emphasis: "primary",
199
- disabled: !O.value,
200
- loading: g.value,
201
- run: M
90
+ disabled: !d.canSave.value,
91
+ loading: d.saving.value,
92
+ run: () => f.value?.save()
202
93
  }]);
203
- }, { immediate: !0 }), Z(u, () => void j()), k();
204
- async function k() {
205
- s.value = !1, h.value = !1, m.value = !0, _.value = "";
206
- let e = ++w;
207
- try {
208
- let [t, n] = await Promise.all([r.schemes(), a.runtime.load()]);
209
- if (e !== w) return;
210
- if (f.value = n.entryType === "link" ? "window" : "tab", o.value = te(n), s.value = !o.value, l.value = t, !E.value.length) {
211
- _.value = "暂无可用菜单方案,请先在菜单管理中配置方案。", m.value = !1;
212
- return;
213
- }
214
- let i = await r.visible();
215
- if (e !== w) return;
216
- let c = i[0]?.record.schemeId, d = E.value.some((e) => e.value === c) ? c : String(E.value[0].value);
217
- u.value === d ? await j() : u.value = d;
218
- } catch (t) {
219
- e === w && (_.value = ne(t), m.value = !1);
220
- }
221
- }
222
- async function j() {
223
- let e = ++w;
224
- d.value = "root", p.value = [], h.value = !1, _.value = "", m.value = !0;
225
- try {
226
- let t = await r.tree(u.value);
227
- e === w && (p.value = t, h.value = !0);
228
- } catch (t) {
229
- e === w && (_.value = ne(t));
230
- } finally {
231
- e === w && (m.value = !1);
232
- }
233
- }
234
- async function ee() {
235
- C.value = !1, _.value = "";
236
- try {
237
- let e = await (n?.refreshMenus?.() ?? r.visible());
238
- x.value = $(e).find(({ menu: e }) => e.id === v.value?.id)?.menu, C.value = !0;
239
- } catch {
240
- _.value = "菜单已添加,导航刷新失败。请重试刷新,无需重复添加。";
241
- }
242
- }
243
- async function M() {
244
- if (O.value) {
245
- g.value = !0, _.value = "";
246
- try {
247
- let e = await r.insert(u.value, {
248
- title: c.value.trim(),
249
- moduleAlias: i,
250
- schemeId: u.value,
251
- parentId: d.value,
252
- openMode: f.value,
253
- enabled: !0
254
- });
255
- v.value = e.record;
256
- let n = $(p.value).find(({ menu: e }) => e.id === d.value)?.path, a = l.value.find((e) => e.id === u.value);
257
- y.value = [
258
- a?.title,
259
- n,
260
- c.value.trim()
261
- ].filter(Boolean).join(" / "), t.context.refreshDetailExtensions(), await ee();
262
- } catch (e) {
263
- _.value = ne(e);
264
- } finally {
265
- g.value = !1;
266
- }
267
- }
268
- }
269
- function te(e) {
270
- return e.entryType === "route" ? e.entryRoute ? "" : "该模块尚未配置页面地址,请返回模块补充。" : e.entryType === "link" ? e.entryExternalUrl ? "" : "该模块尚未配置链接地址,请返回模块补充。" : e.uiDescriptor?.page ? "" : "该模块尚无可用业务页面,请返回模块完成页面配置;使用草稿配置的页面需先发布。";
271
- }
272
- function ne(e) {
273
- return e instanceof Error ? e.message : "加载失败,请重试。";
274
- }
275
- function re() {
276
- x.value && n?.openMenu && (n.openMenu(x.value), t.context.close());
277
- }
278
- return (t, r) => (q(), H("div", ze, [
279
- v.value ? (q(), H(R, { key: 1 }, [
280
- r[12] ||= U("strong", null, "已添加到菜单", -1),
281
- U("p", null, Y(y.value), 1),
282
- x.value && X(n)?.openMenu ? (q(), B(X(S), {
283
- key: 0,
284
- type: "primary",
285
- onClick: re
286
- }, {
287
- default: Q(() => [...r[10] ||= [W("打开", -1)]]),
288
- _: 1
289
- })) : C.value ? (q(), H("p", He, " 当前用户的导航中暂不可见,请检查菜单方案适用范围、上级菜单状态及模块访问权限。 ")) : V("v-if", !0),
290
- _.value ? (q(), B(X(S), {
291
- key: 2,
292
- disabled: g.value,
293
- onClick: ee
294
- }, {
295
- default: Q(() => [...r[11] ||= [W("刷新导航", -1)]]),
296
- _: 1
297
- }, 8, ["disabled"])) : V("v-if", !0)
298
- ], 64)) : (q(), H(R, { key: 0 }, [
299
- U("label", null, [r[5] ||= W("菜单名称", -1), G(X(A), {
300
- value: c.value,
301
- "onUpdate:value": r[0] ||= (e) => c.value = e,
302
- disabled: g.value,
303
- "aria-label": "菜单名称"
304
- }, null, 8, ["value", "disabled"])]),
305
- E.value.length > 1 ? (q(), H("label", Be, [r[6] ||= W("菜单方案 ", -1), G(X(N), {
306
- value: u.value,
307
- options: E.value,
308
- "allow-clear": !1,
309
- disabled: g.value,
310
- "onUpdate:value": r[1] ||= (e) => u.value = String(e ?? "")
311
- }, null, 8, [
312
- "value",
313
- "options",
314
- "disabled"
315
- ])])) : V("v-if", !0),
316
- U("label", null, [r[7] ||= W("放置位置 ", -1), G(X(P), {
317
- value: d.value,
318
- "tree-data": T.value,
319
- "allow-clear": !1,
320
- disabled: m.value || g.value,
321
- loading: m.value,
322
- "onUpdate:value": r[2] ||= (e) => d.value = String(e ?? "root")
323
- }, null, 8, [
324
- "value",
325
- "tree-data",
326
- "disabled",
327
- "loading"
328
- ])]),
329
- U("details", null, [r[9] ||= U("summary", null, "更多设置", -1), U("label", null, [r[8] ||= W("打开方式 ", -1), G(X(N), {
330
- value: f.value,
331
- "allow-clear": !1,
332
- disabled: g.value,
333
- options: [{
334
- value: "tab",
335
- label: "页签内打开"
336
- }, {
337
- value: "window",
338
- label: "新窗口打开"
339
- }],
340
- "onUpdate:value": r[3] ||= (e) => f.value = e === "window" ? "window" : "tab"
341
- }, null, 8, ["value", "disabled"])])]),
342
- D.value ? (q(), H("p", Ve, "此位置已有「" + Y(D.value.menu.title) + "」,仍可添加另一个入口。", 1)) : V("v-if", !0)
343
- ], 64)),
344
- o.value ? (q(), H("p", Ue, Y(o.value), 1)) : V("v-if", !0),
345
- o.value ? (q(), B(X(S), {
346
- key: 3,
347
- onClick: r[4] ||= (t) => e.context.close()
348
- }, {
349
- default: Q(() => [...r[13] ||= [W("返回模块", -1)]]),
350
- _: 1
351
- })) : V("v-if", !0),
352
- _.value ? (q(), H("p", We, Y(_.value), 1)) : V("v-if", !0),
353
- _.value && !v.value && !h.value ? (q(), B(X(S), {
354
- key: 5,
355
- disabled: g.value,
356
- onClick: k
357
- }, {
358
- default: Q(() => [...r[14] ||= [W("重试", -1)]]),
359
- _: 1
360
- }, 8, ["disabled"])) : V("v-if", !0)
361
- ]));
94
+ }, { immediate: !0 }), Z(d.saved, (e) => {
95
+ e && t.context.refreshDetailExtensions();
96
+ }), ve(() => {
97
+ u = !1, a?.hideEditor(d), a || d.dispose();
98
+ }), (t, n) => (q(), z(ue, {
99
+ ref_key: "editor",
100
+ ref: f,
101
+ session: X(d),
102
+ onOpened: n[0] ||= (t) => e.context.close()
103
+ }, null, 8, ["session"]));
362
104
  }
363
- }), [["__scopeId", "data-v-38eeb884"]]), Ke = { class: "module-menu-entries" }, qe = { key: 0 }, Je = {
105
+ }), Ne = { class: "module-menu-entries" }, Pe = { key: 0 }, Fe = {
364
106
  key: 1,
365
107
  role: "status"
366
- }, Ye = { key: 2 }, Xe = { key: 0 }, Ze = /*#__PURE__*/ j(/* @__PURE__ */ K({
108
+ }, Ie = { key: 2 }, Le = { key: 0 }, $ = /*#__PURE__*/ h(/* @__PURE__ */ K({
367
109
  __name: "ModuleMenuEntriesSection",
368
110
  props: { context: {} },
369
111
  setup(e) {
370
- let t = e, n = le(), r = J([]), i = J(/* @__PURE__ */ new Map()), a = J(!1), o = J(""), s = 0;
371
- ye(() => s++), Z(() => [t.context.record.id, t.context.refreshKey], () => void c(), { immediate: !0 });
112
+ let t = e, n = l(), r = J([]), i = J(/* @__PURE__ */ new Map()), a = J(!1), o = J(""), s = 0;
113
+ ve(() => s++), Z(() => [t.context.record.id, t.context.refreshKey], () => void c(), { immediate: !0 });
372
114
  async function c() {
373
- let e = ++s, n = String(t.context.record.alias ?? t.context.record.id ?? ""), c = Le(t.context.module.http);
115
+ let e = ++s, n = String(t.context.record.alias ?? t.context.record.id ?? ""), c = F(t.context.module.http);
374
116
  a.value = !0, o.value = "", r.value = [], i.value = /* @__PURE__ */ new Map();
375
117
  try {
376
- let [t, a] = await Promise.all([c.schemes(), c.visible()]), o = await Promise.all(t.map(async (e) => $(await c.tree(e.id), e.title ?? e.alias ?? e.id).filter(({ menu: e }) => e.moduleAlias === n)));
118
+ let [t, a] = await Promise.all([c.schemes(), c.visible()]), o = await Promise.all(t.map(async (e) => I(await c.tree(e.id), e.title ?? e.alias ?? e.id).filter(({ menu: e }) => e.moduleAlias === n)));
377
119
  if (e !== s) return;
378
- r.value = o.flat(), i.value = new Map($(a).map(({ menu: e }) => [e.id, e]));
120
+ r.value = o.flat(), i.value = new Map(I(a).map(({ menu: e }) => [e.id, e]));
379
121
  } catch {
380
122
  e === s && (o.value = "暂时无法读取菜单入口,请确认有菜单管理权限后重试。");
381
123
  } finally {
382
124
  e === s && (a.value = !1);
383
125
  }
384
126
  }
385
- return (e, t) => (q(), H("div", Ke, [a.value ? (q(), H("span", qe, "正在加载…")) : o.value ? (q(), H("div", Je, [W(Y(o.value) + " ", 1), G(X(S), {
127
+ return (e, t) => (q(), V("div", Ne, [a.value ? (q(), V("span", Pe, "正在加载…")) : o.value ? (q(), V("div", Fe, [U(Y(o.value) + " ", 1), W(X(S), {
386
128
  type: "link",
387
129
  onClick: c
388
130
  }, {
389
- default: Q(() => [...t[0] ||= [W("重试", -1)]]),
131
+ default: Q(() => [...t[0] ||= [U("重试", -1)]]),
390
132
  _: 1
391
- })])) : r.value.length ? V("v-if", !0) : (q(), H("span", Ye, "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), (q(!0), H(R, null, Se(r.value, (e) => (q(), H("div", {
133
+ })])) : r.value.length ? B("v-if", !0) : (q(), V("span", Ie, "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), (q(!0), V(L, null, xe(r.value, (e) => (q(), V("div", {
392
134
  key: e.menu.id,
393
135
  class: "menu-entry"
394
- }, [U("span", null, [W(Y(e.path), 1), e.menu.enabled === !1 ? (q(), H("small", Xe, " · 已停用")) : V("v-if", !0)]), i.value.has(e.menu.id) && X(n)?.openMenu ? (q(), B(X(S), {
136
+ }, [H("span", null, [U(Y(e.path), 1), e.menu.enabled === !1 ? (q(), V("small", Le, " · 已停用")) : B("v-if", !0)]), i.value.has(e.menu.id) && X(n)?.openMenu ? (q(), z(X(S), {
395
137
  key: 0,
396
138
  type: "link",
397
139
  onClick: (t) => X(n).openMenu(i.value.get(e.menu.id))
398
140
  }, {
399
- default: Q(() => [...t[1] ||= [U("span", null, "打开", -1)]]),
141
+ default: Q(() => [...t[1] ||= [H("span", null, "打开", -1)]]),
400
142
  _: 1
401
- }, 8, ["onClick"])) : V("v-if", !0)]))), 128))]));
143
+ }, 8, ["onClick"])) : B("v-if", !0)]))), 128))]));
402
144
  }
403
- }), [["__scopeId", "data-v-ff7756d2"]]), Qe = Ie, $e = ue, et = {
145
+ }), [["__scopeId", "data-v-ff7756d2"]]), Re = je, ze = se, Be = {
404
146
  id: "platform-module-workspace-actions",
405
147
  target: { moduleAlias: "platform.module" },
406
- workspaceViews: [$e, Qe],
148
+ workspaceViews: [ze, Re],
407
149
  detail: {
408
150
  sections: [{
409
151
  key: "module-menu-entries",
410
152
  title: "菜单入口",
411
- component: Ze
153
+ component: $
412
154
  }],
413
155
  actions: [
414
156
  {
415
157
  key: "module-add-to-menu",
416
158
  title: "添加到菜单",
417
- state: (e) => ({ visible: rt(e) !== void 0 }),
159
+ state: (e) => ({ visible: Ue(e) !== void 0 }),
418
160
  run({ openDrawer: e }) {
419
161
  e({
420
162
  title: "添加到菜单",
421
163
  width: "narrow",
422
- component: Ge
164
+ component: Me
423
165
  });
424
166
  }
425
167
  },
426
168
  {
427
169
  key: "module-actions-workspace",
428
170
  title: "动作",
429
- state: (e) => ({ visible: rt(e) !== void 0 }),
171
+ state: (e) => ({ visible: Ue(e) !== void 0 }),
430
172
  run({ record: e, openWorkspaceTab: t }) {
431
- let n = rt(e);
432
- n && t(Qe, {
173
+ let n = Ue(e);
174
+ n && t(Re, {
433
175
  moduleAlias: n,
434
- moduleTitle: it(e),
435
- moduleKind: at(e)
176
+ moduleTitle: We(e),
177
+ moduleKind: Ge(e)
436
178
  });
437
179
  }
438
180
  },
439
181
  {
440
182
  key: "module-ui-orchestration-workspace",
441
183
  title: "低代码",
442
- state: (e) => ({ visible: rt(e) !== void 0 && at(e) === "dynamic" }),
184
+ state: (e) => ({ visible: Ue(e) !== void 0 && Ge(e) === "dynamic" }),
443
185
  run({ record: e, openWorkspaceTab: t }) {
444
- let n = rt(e);
445
- n && at(e) === "dynamic" && t($e, {
186
+ let n = Ue(e);
187
+ n && Ge(e) === "dynamic" && t(ze, {
446
188
  moduleAlias: n,
447
- moduleTitle: it(e),
189
+ moduleTitle: We(e),
448
190
  governanceTab: "overview"
449
191
  });
450
192
  }
451
193
  }
452
194
  ]
453
195
  }
454
- }, tt = {
196
+ }, Ve = {
455
197
  id: "dictionary-category-tree-parent-policy",
456
198
  target: { moduleAlias: "platform.dictionary_category" },
457
199
  navigator: { treeParentPolicy: {
458
200
  canUseAsParent: (e) => e.categoryKind === "folder",
459
201
  rejectionMessage: "字典类目只能挂在目录下"
460
202
  } }
461
- }, nt = {
203
+ }, He = {
462
204
  id: "platform-module-action-entry-scope",
463
205
  target: { moduleAlias: "platform.module_action" },
464
206
  navigator: {
@@ -470,35 +212,35 @@ var ze = { class: "module-menu-form" }, Be = { key: 0 }, Ve = {
470
212
  },
471
213
  standardActions: { disabled: ["create"] }
472
214
  };
473
- function rt(e) {
474
- return ot(e, "alias") ?? ot(e, "id");
215
+ function Ue(e) {
216
+ return Ke(e, "alias") ?? Ke(e, "id");
475
217
  }
476
- function it(e) {
477
- return ot(e, "title");
218
+ function We(e) {
219
+ return Ke(e, "title");
478
220
  }
479
- function at(e) {
480
- let t = ot(e, "moduleKind");
221
+ function Ge(e) {
222
+ let t = Ke(e, "moduleKind");
481
223
  return t === "static" || t === "dynamic" ? t : void 0;
482
224
  }
483
- function ot(e, t) {
225
+ function Ke(e, t) {
484
226
  let n = e[t];
485
227
  return typeof n == "string" && n.trim() ? n : void 0;
486
228
  }
487
229
  //#endregion
488
230
  //#region src/views/PasswordPolicyPreview.vue?vue&type=script&setup=true&lang.ts
489
- var st = { class: "password-policy-preview" }, ct = {
231
+ var qe = { class: "password-policy-preview" }, Je = {
490
232
  key: 0,
491
233
  class: "preview-results"
492
- }, lt = {
234
+ }, Ye = {
493
235
  id: "iam-password-policy-preview",
494
236
  target: { moduleAlias: "iam.password_policy_rule" },
495
237
  card: { assistant: {
496
- component: /* @__PURE__ */ j(/* @__PURE__ */ K({
238
+ component: /* @__PURE__ */ h(/* @__PURE__ */ K({
497
239
  name: "PasswordPolicyPreview",
498
240
  __name: "PasswordPolicyPreview",
499
241
  props: { context: {} },
500
242
  setup(e) {
501
- let t = e, n = J("CURRENT"), r = J(""), i = J(), a = J(!1), o = J(!1), s = 0, c = z(() => g(t.context.record)), l = z(() => t.context.mode !== "view" || b(c.value?.id) !== void 0), u = z(() => [{
243
+ let t = e, n = J("CURRENT"), r = J(""), i = J(), a = J(!1), o = J(!1), s = 0, c = R(() => g(t.context.record)), l = R(() => t.context.mode !== "view" || b(c.value?.id) !== void 0), u = R(() => [{
502
244
  value: "CURRENT",
503
245
  label: "本规则",
504
246
  disabled: !l.value
@@ -529,7 +271,7 @@ var st = { class: "password-policy-preview" }, ct = {
529
271
  e === s && (o.value = !1);
530
272
  }
531
273
  }
532
- let p = z(() => {
274
+ let p = R(() => {
533
275
  let e = l.value ? c.value : void 0;
534
276
  if (n.value === "CURRENT") return e ? [e] : [];
535
277
  if (!i.value) return [];
@@ -539,7 +281,7 @@ var st = { class: "password-policy-preview" }, ct = {
539
281
  e >= 0 && t.splice(e, 1);
540
282
  }
541
283
  return e && S(e) && t.push(e), t.length > 0 ? t.sort(v) : [];
542
- }), m = z(() => r.value ? p.value.map((e, t) => _(e, r.value, t)) : []), h = z(() => {
284
+ }), m = R(() => r.value ? p.value.map((e, t) => _(e, r.value, t)) : []), h = R(() => {
543
285
  if (!l.value && n.value === "CURRENT") return "请选择或新建一条规则";
544
286
  if (n.value === "ALL" && o.value) return "正在加载权威规则集";
545
287
  if (n.value === "ALL" && a.value) return "无法加载权威规则集";
@@ -593,16 +335,16 @@ var st = { class: "password-policy-preview" }, ct = {
593
335
  function S(e) {
594
336
  return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
595
337
  }
596
- return (e, t) => (q(), H("section", st, [
597
- U("header", null, [t[1] ||= U("h3", null, "密码试算", -1), U("span", { class: _e({ failed: m.value.some((e) => !e.passed) }) }, Y(h.value), 3)]),
598
- G(X(O), {
338
+ return (e, t) => (q(), V("section", qe, [
339
+ H("header", null, [t[1] ||= H("h3", null, "密码试算", -1), H("span", { class: ge({ failed: m.value.some((e) => !e.passed) }) }, Y(h.value), 3)]),
340
+ W(X(te), {
599
341
  class: "preview-scope",
600
342
  value: n.value,
601
343
  options: u.value,
602
344
  size: "small",
603
345
  "onUpdate:value": d
604
346
  }, null, 8, ["value", "options"]),
605
- G(X(A), {
347
+ W(X(k), {
606
348
  value: r.value,
607
349
  "onUpdate:value": t[0] ||= (e) => r.value = e,
608
350
  type: "text",
@@ -610,13 +352,13 @@ var st = { class: "password-policy-preview" }, ct = {
610
352
  placeholder: "输入测试密码",
611
353
  "aria-label": "测试密码"
612
354
  }, null, 8, ["value"]),
613
- m.value.length ? (q(), H("ul", ct, [(q(!0), H(R, null, Se(m.value, (e) => (q(), H("li", {
355
+ m.value.length ? (q(), V("ul", Je, [(q(!0), V(L, null, xe(m.value, (e) => (q(), V("li", {
614
356
  key: e.key,
615
- class: _e({
357
+ class: ge({
616
358
  passed: e.passed,
617
359
  failed: !e.passed
618
360
  })
619
- }, [U("strong", null, Y(e.title), 1), U("span", null, Y(e.diagnostic ?? (e.passed ? "通过" : e.message)), 1)], 2))), 128))])) : V("v-if", !0)
361
+ }, [H("strong", null, Y(e.title), 1), H("span", null, Y(e.diagnostic ?? (e.passed ? "通过" : e.message)), 1)], 2))), 128))])) : B("v-if", !0)
620
362
  ]));
621
363
  }
622
364
  }), [["__scopeId", "data-v-1ebdeb6e"]]),
@@ -625,15 +367,15 @@ var st = { class: "password-policy-preview" }, ct = {
625
367
  position: "bottom"
626
368
  }
627
369
  } }
628
- }, ut = { class: "tenant-applications-detail" }, dt = { class: "tenant-applications-summary" }, ft = {
370
+ }, Xe = { class: "tenant-applications-detail" }, Ze = { class: "tenant-applications-summary" }, Qe = {
629
371
  key: 0,
630
372
  class: "tenant-applications-status"
631
- }, pt = /*#__PURE__*/ j(/* @__PURE__ */ K({
373
+ }, $e = /*#__PURE__*/ h(/* @__PURE__ */ K({
632
374
  name: "TenantApplicationsDetailSection",
633
375
  __name: "TenantApplicationsDetailSection",
634
376
  props: { context: {} },
635
377
  setup(e) {
636
- let t = e, n = J([]), r = J(!1), i = 0, a = J(/* @__PURE__ */ new Map()), o = z(() => n.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
378
+ let t = e, n = J([]), r = J(!1), i = 0, a = J(/* @__PURE__ */ new Map()), o = R(() => n.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
637
379
  key: e,
638
380
  label: a.value.get(e) ? `${a.value.get(e)} · ${e}` : e
639
381
  })));
@@ -663,7 +405,7 @@ var st = { class: "password-policy-preview" }, ct = {
663
405
  })]);
664
406
  o === i && (a.value = new Map(r.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), n.value = s.records);
665
407
  } catch (e) {
666
- o === i && T(e, {
408
+ o === i && w(e, {
667
409
  source: "tenant-applications-detail",
668
410
  phase: "load"
669
411
  });
@@ -674,19 +416,19 @@ var st = { class: "password-policy-preview" }, ct = {
674
416
  function c(e, t) {
675
417
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
676
418
  }
677
- return (e, t) => (q(), H("section", ut, [U("div", dt, [r.value ? (q(), H("span", ft, "正在加载…")) : (q(), B(X(E), {
419
+ return (e, t) => (q(), V("section", Xe, [H("div", Ze, [r.value ? (q(), V("span", Qe, "正在加载…")) : (q(), z(X(m), {
678
420
  key: 1,
679
421
  items: o.value,
680
422
  "max-visible": 8,
681
423
  "empty-text": "暂无记录"
682
424
  }, null, 8, ["items"]))])]));
683
425
  }
684
- }), [["__scopeId", "data-v-2f879564"]]), mt = { class: "tenant-application-configuration" }, ht = /*#__PURE__*/ j(/* @__PURE__ */ K({
426
+ }), [["__scopeId", "data-v-2f879564"]]), et = { class: "tenant-application-configuration" }, tt = /*#__PURE__*/ h(/* @__PURE__ */ K({
685
427
  name: "TenantApplicationConfigurationDrawer",
686
428
  __name: "TenantApplicationConfigurationDrawer",
687
429
  props: { context: {} },
688
430
  setup(e) {
689
- let t = e, n = J([]), r = J(/* @__PURE__ */ new Set()), i = J(!1), o = J(!1), s = [{
431
+ let t = e, n = J([]), r = J(/* @__PURE__ */ new Set()), i = J(!1), a = J(!1), o = [{
690
432
  key: "title",
691
433
  title: "应用名称",
692
434
  width: 260
@@ -694,35 +436,35 @@ var st = { class: "password-policy-preview" }, ct = {
694
436
  key: "alias",
695
437
  title: "应用 alias",
696
438
  width: 220
697
- }], c = z(() => n.value), l = z(() => ({
439
+ }], s = R(() => n.value), c = R(() => ({
698
440
  selectedRowKeys: [...r.value],
699
441
  preserveSelectedRowKeys: !0,
700
- disabledOf: (e) => o.value || e.alias === "iam",
442
+ disabledOf: (e) => a.value || e.alias === "iam",
701
443
  onChange: (e) => {
702
444
  r.value = new Set(e.map(String));
703
445
  }
704
446
  }));
705
- function u() {
706
- t.context.setCloseBlocked(o.value), t.context.setTitleActions([{
447
+ function l() {
448
+ t.context.setCloseBlocked(a.value), t.context.setTitleActions([{
707
449
  key: "cancel",
708
450
  label: "取消",
709
- disabled: o.value,
451
+ disabled: a.value,
710
452
  run: () => {
711
- o.value || t.context.close();
453
+ a.value || t.context.close();
712
454
  }
713
455
  }, {
714
456
  key: "confirm",
715
457
  label: "确认",
716
458
  emphasis: "primary",
717
- disabled: o.value,
718
- loading: o.value,
719
- run: f
459
+ disabled: a.value,
460
+ loading: a.value,
461
+ run: d
720
462
  }]);
721
463
  }
722
- be(() => {
723
- u(), d();
724
- }), Z(o, u);
725
- async function d() {
464
+ ye(() => {
465
+ l(), u();
466
+ }), Z(a, l);
467
+ async function u() {
726
468
  let e = String(t.context.record?.id ?? "");
727
469
  if (e) {
728
470
  i.value = !0;
@@ -736,7 +478,7 @@ var st = { class: "password-policy-preview" }, ct = {
736
478
  } }
737
479
  }), t.context.module.http.request({
738
480
  method: "POST",
739
- path: p(e, "query"),
481
+ path: f(e, "query"),
740
482
  body: { page: {
741
483
  pageNum: 1,
742
484
  pageSize: 200
@@ -746,7 +488,7 @@ var st = { class: "password-policy-preview" }, ct = {
746
488
  let o = new Set(n.value.map((e) => e.alias).filter(Boolean));
747
489
  r.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
748
490
  } catch (e) {
749
- T(e, {
491
+ w(e, {
750
492
  source: "tenant-application-configuration",
751
493
  phase: "load"
752
494
  });
@@ -755,35 +497,35 @@ var st = { class: "password-policy-preview" }, ct = {
755
497
  }
756
498
  }
757
499
  }
758
- async function f() {
500
+ async function d() {
759
501
  let e = String(t.context.record?.id ?? "");
760
- if (e && !o.value) {
761
- o.value = !0;
502
+ if (e && !a.value) {
503
+ a.value = !0;
762
504
  try {
763
505
  await t.context.module.http.request({
764
506
  method: "POST",
765
- path: p(e, "configure"),
507
+ path: f(e, "configure"),
766
508
  body: { applicationAliases: [...r.value] }
767
509
  }), t.context.refreshDetailExtensions(), t.context.refreshList(), t.context.close();
768
510
  } catch (e) {
769
- T(e, {
511
+ w(e, {
770
512
  source: "tenant-application-configuration",
771
513
  phase: "action"
772
514
  });
773
515
  } finally {
774
- o.value = !1;
516
+ a.value = !1;
775
517
  }
776
518
  }
777
519
  }
778
- function p(e, t) {
520
+ function f(e, t) {
779
521
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
780
522
  }
781
- return (e, t) => (q(), H("section", mt, [t[0] ||= U("p", null, "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。", -1), G(X(a), {
782
- columns: s,
783
- rows: c.value,
523
+ return (e, t) => (q(), V("section", et, [t[0] ||= H("p", null, "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。", -1), W(X(M), {
524
+ columns: o,
525
+ rows: s.value,
784
526
  loading: i.value,
785
527
  pagination: !1,
786
- selection: l.value,
528
+ selection: c.value,
787
529
  "row-key": (e) => String(e.alias ?? e.id ?? ""),
788
530
  "empty-description": "暂无可配置应用"
789
531
  }, null, 8, [
@@ -793,7 +535,7 @@ var st = { class: "password-policy-preview" }, ct = {
793
535
  "row-key"
794
536
  ])]));
795
537
  }
796
- }), [["__scopeId", "data-v-2e68af88"]]), gt = {
538
+ }), [["__scopeId", "data-v-2e68af88"]]), nt = {
797
539
  id: "iam-tenant-standard-page-enhancement",
798
540
  target: { moduleAlias: "iam.tenant" },
799
541
  form: {
@@ -810,7 +552,7 @@ var st = { class: "password-policy-preview" }, ct = {
810
552
  ...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
811
553
  fieldName: e,
812
554
  imageUploadHint: ({ draft: e }) => e.workbenchBrandMode === "logoOnly" ? "纯 Logo 模式支持横向或正方形图片(最大 512 KB)" : "Logo + 标题模式仅支持正方形图片(建议 128 × 128 px,最大 512 KB)",
813
- imageUploadAdvisory: ({ draft: e }) => e.workbenchBrandMode === "logoOnly" ? void 0 : _t
555
+ imageUploadAdvisory: ({ draft: e }) => e.workbenchBrandMode === "logoOnly" ? void 0 : rt
814
556
  }))
815
557
  ]
816
558
  },
@@ -823,27 +565,27 @@ var st = { class: "password-policy-preview" }, ct = {
823
565
  e({
824
566
  title: "配置应用",
825
567
  width: "wide",
826
- component: ht
568
+ component: tt
827
569
  });
828
570
  }
829
571
  }],
830
572
  sections: [{
831
573
  key: "tenant-applications",
832
574
  title: "已开通应用",
833
- component: pt
575
+ component: $e
834
576
  }]
835
577
  }
836
578
  };
837
- async function _t(e) {
579
+ async function rt(e) {
838
580
  if (!e.type.startsWith("image/") || typeof Image > "u") return "Logo + 标题模式需要可读取的正方形图片。";
839
581
  try {
840
- let { width: t, height: n } = await vt(e), r = t / n;
582
+ let { width: t, height: n } = await it(e), r = t / n;
841
583
  return r >= .9 && r <= 1.1 ? void 0 : `“${e.name}”为 ${t} × ${n} px;Logo + 标题模式仅允许上传正方形 Logo。`;
842
584
  } catch {
843
585
  return "无法读取图片尺寸,请选择正方形 PNG、JPG 或 GIF 图片。";
844
586
  }
845
587
  }
846
- function vt(e) {
588
+ function it(e) {
847
589
  let t = URL.createObjectURL(e);
848
590
  return new Promise((e, n) => {
849
591
  let r = new Image();
@@ -859,24 +601,24 @@ function vt(e) {
859
601
  }
860
602
  //#endregion
861
603
  //#region src/platform-admin-runtime/employee/EmployeeAccountDrawer.vue?vue&type=script&setup=true&lang.ts
862
- var yt = {
604
+ var at = {
863
605
  key: 1,
864
606
  class: "employee-account-drawer"
865
- }, bt = { class: "employee-account-existing-picker" }, xt = /*#__PURE__*/ j(/* @__PURE__ */ K({
607
+ }, ot = { class: "employee-account-existing-picker" }, st = /*#__PURE__*/ h(/* @__PURE__ */ K({
866
608
  name: "EmployeeAccountDrawer",
867
609
  __name: "EmployeeAccountDrawer",
868
610
  props: { context: {} },
869
611
  setup(e) {
870
- let t = e, n = J(), r = J(), i = J(""), a = J(""), o = J(!1), c = J(!1);
871
- be(() => void l());
872
- async function l() {
873
- let e = v();
612
+ let t = e, n = J(), r = J(), i = J(""), a = J(""), o = J(!1), s = J(!1);
613
+ ye(() => void c());
614
+ async function c() {
615
+ let e = _();
874
616
  if (e) {
875
617
  o.value = !0;
876
618
  try {
877
619
  n.value = await t.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
878
620
  } catch (e) {
879
- T(e, {
621
+ w(e, {
880
622
  source: "employee-account",
881
623
  phase: "load"
882
624
  });
@@ -885,18 +627,18 @@ var yt = {
885
627
  }
886
628
  }
887
629
  }
888
- async function u() {
889
- let e = v();
890
- if (!e || c.value) return;
630
+ async function l() {
631
+ let e = _();
632
+ if (!e || s.value) return;
891
633
  let r = i.value.trim();
892
634
  if (!r || !a.value) {
893
- w("请输入账号和初始密码。", {
635
+ C("请输入账号和初始密码。", {
894
636
  source: "employee-account",
895
637
  phase: "validation"
896
638
  });
897
639
  return;
898
640
  }
899
- c.value = !0;
641
+ s.value = !0;
900
642
  try {
901
643
  let i = await t.context.module.http.request({
902
644
  method: "POST",
@@ -906,45 +648,45 @@ var yt = {
906
648
  password: a.value
907
649
  }
908
650
  });
909
- n.value = D(i).binding, a.value = "", t.context.refreshList();
651
+ n.value = T(i).binding, a.value = "", t.context.refreshList();
910
652
  } catch (e) {
911
- T(e, {
653
+ w(e, {
912
654
  source: "employee-account",
913
655
  phase: "action"
914
656
  });
915
657
  } finally {
916
- c.value = !1;
658
+ s.value = !1;
917
659
  }
918
660
  }
919
- async function d(e) {
661
+ async function u(e) {
920
662
  let t = e[0];
921
663
  t && await f(t.id);
922
664
  }
923
665
  async function f(e) {
924
- let i = v();
925
- if (i && e && !c.value) {
926
- c.value = !0;
666
+ let i = _();
667
+ if (i && e && !s.value) {
668
+ s.value = !0;
927
669
  try {
928
670
  n.value = await t.context.module.http.request({
929
671
  method: "POST",
930
672
  path: `/iam.employee/${encodeURIComponent(i)}/account`,
931
673
  body: { userId: e }
932
- }), r.value = void 0, t.context.refreshList(), w("账号已绑定到当前职员。", {
674
+ }), r.value = void 0, t.context.refreshList(), C("账号已绑定到当前职员。", {
933
675
  source: "employee-account",
934
676
  phase: "action"
935
677
  });
936
678
  } catch (e) {
937
- T(e, {
679
+ w(e, {
938
680
  source: "employee-account",
939
681
  phase: "action"
940
682
  });
941
683
  } finally {
942
- c.value = !1;
684
+ s.value = !1;
943
685
  }
944
686
  }
945
687
  }
946
688
  async function p(e) {
947
- let n = v();
689
+ let n = _();
948
690
  if (!n) return {
949
691
  records: [],
950
692
  total: 0
@@ -961,12 +703,12 @@ var yt = {
961
703
  }
962
704
  });
963
705
  return {
964
- records: r.records.map(g),
706
+ records: r.records.map(h),
965
707
  total: r.total
966
708
  };
967
709
  }
968
- async function h(e) {
969
- let n = v();
710
+ async function m(e) {
711
+ let n = _();
970
712
  return !n || e.length === 0 ? [] : (await t.context.module.http.request({
971
713
  method: "POST",
972
714
  path: `/iam.employee/${encodeURIComponent(n)}/account-candidates/query`,
@@ -977,9 +719,9 @@ var yt = {
977
719
  pageSize: e.length
978
720
  }
979
721
  }
980
- })).records.map(g);
722
+ })).records.map(h);
981
723
  }
982
- function g(e) {
724
+ function h(e) {
983
725
  return {
984
726
  id: e.id,
985
727
  title: e.username ?? e.id,
@@ -991,85 +733,85 @@ var yt = {
991
733
  departmentName: e.departmentTitle
992
734
  };
993
735
  }
994
- async function _() {
995
- let e = v();
996
- if (e && n.value && !c.value && await s({
736
+ async function g() {
737
+ let e = _();
738
+ if (e && n.value && !s.value && await E({
997
739
  title: "移除账户",
998
740
  content: "确认移除该职员的账户?该用户账号会同步删除。",
999
741
  okText: "移除",
1000
742
  danger: !0
1001
743
  })) {
1002
- c.value = !0;
744
+ s.value = !0;
1003
745
  try {
1004
746
  await t.context.module.http.request({
1005
747
  method: "POST",
1006
748
  path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
1007
749
  }), n.value = void 0, t.context.refreshList();
1008
750
  } catch (e) {
1009
- T(e, {
751
+ w(e, {
1010
752
  source: "employee-account",
1011
753
  phase: "action"
1012
754
  });
1013
755
  } finally {
1014
- c.value = !1;
756
+ s.value = !1;
1015
757
  }
1016
758
  }
1017
759
  }
1018
- function v() {
760
+ function _() {
1019
761
  let e = t.context.record?.id;
1020
762
  return e == null ? void 0 : String(e);
1021
763
  }
1022
- return (e, t) => o.value ? (q(), B(X(re), {
764
+ return (e, t) => o.value ? (q(), z(X(d), {
1023
765
  key: 0,
1024
766
  tip: "加载账号绑定"
1025
- })) : (q(), H("section", yt, [v() ? n.value ? (q(), H(R, { key: 1 }, [U("p", null, "当前已绑定用户:" + Y(n.value.userId ?? "-"), 1), G(X(S), {
767
+ })) : (q(), V("section", at, [_() ? n.value ? (q(), V(L, { key: 1 }, [H("p", null, "当前已绑定用户:" + Y(n.value.userId ?? "-"), 1), W(X(S), {
1026
768
  danger: "",
1027
769
  "icon-name": "delete",
1028
- loading: c.value,
1029
- onClick: _
770
+ loading: s.value,
771
+ onClick: g
1030
772
  }, {
1031
- default: Q(() => [...t[3] ||= [W("移除账户", -1)]]),
773
+ default: Q(() => [...t[3] ||= [U("移除账户", -1)]]),
1032
774
  _: 1
1033
- }, 8, ["loading"])], 64)) : (q(), H(R, { key: 2 }, [U("section", bt, [t[4] ||= U("p", null, "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。", -1), G(X(C), {
775
+ }, 8, ["loading"])], 64)) : (q(), V(L, { key: 2 }, [H("section", ot, [t[4] ||= H("p", null, "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。", -1), W(X(A), {
1034
776
  value: r.value,
1035
- disabled: c.value,
777
+ disabled: s.value,
1036
778
  placeholder: "搜索并选择已有登录账号",
1037
779
  title: "选择已有登录账号",
1038
780
  "search-page": p,
1039
- "resolve-users": h,
781
+ "resolve-users": m,
1040
782
  "onUpdate:value": t[0] ||= (e) => r.value = typeof e == "string" ? e : void 0,
1041
- onSelect: d
1042
- }, null, 8, ["value", "disabled"])]), U("form", { onSubmit: De(u, ["prevent"]) }, [
1043
- t[8] ||= U("p", null, "也可直接创建登录账号并自动绑定到当前职员。", -1),
1044
- U("label", null, [t[5] ||= U("span", null, "账号", -1), G(X(A), {
783
+ onSelect: u
784
+ }, null, 8, ["value", "disabled"])]), H("form", { onSubmit: Ee(l, ["prevent"]) }, [
785
+ t[8] ||= H("p", null, "也可直接创建登录账号并自动绑定到当前职员。", -1),
786
+ H("label", null, [t[5] ||= H("span", null, "账号", -1), W(X(k), {
1045
787
  value: i.value,
1046
788
  "onUpdate:value": t[1] ||= (e) => i.value = e,
1047
- disabled: c.value,
789
+ disabled: s.value,
1048
790
  placeholder: "请输入登录账号"
1049
791
  }, null, 8, ["value", "disabled"])]),
1050
- U("label", null, [t[6] ||= U("span", null, "初始密码", -1), G(X(A), {
792
+ H("label", null, [t[6] ||= H("span", null, "初始密码", -1), W(X(k), {
1051
793
  value: a.value,
1052
794
  "onUpdate:value": t[2] ||= (e) => a.value = e,
1053
795
  type: "password",
1054
- disabled: c.value,
796
+ disabled: s.value,
1055
797
  placeholder: "请输入初始密码"
1056
798
  }, null, 8, ["value", "disabled"])]),
1057
- G(X(S), {
799
+ W(X(S), {
1058
800
  type: "primary",
1059
801
  "html-type": "submit",
1060
802
  "icon-name": "plus",
1061
- loading: c.value
803
+ loading: s.value
1062
804
  }, {
1063
- default: Q(() => [...t[7] ||= [W(" 创建账号并绑定 ", -1)]]),
805
+ default: Q(() => [...t[7] ||= [U(" 创建账号并绑定 ", -1)]]),
1064
806
  _: 1
1065
807
  }, 8, ["loading"])
1066
- ], 32)], 64)) : (q(), B(X(m), {
808
+ ], 32)], 64)) : (q(), z(X(v), {
1067
809
  key: 0,
1068
810
  title: "职员不存在",
1069
811
  message: "请重新打开职员档案后再设置账号。"
1070
812
  }))]));
1071
813
  }
1072
- }), [["__scopeId", "data-v-aa8474e1"]]), St = {
814
+ }), [["__scopeId", "data-v-aa8474e1"]]), ct = {
1073
815
  id: "iam-employee-account-drawer",
1074
816
  target: { moduleAlias: "iam.employee" },
1075
817
  detail: { actions: [{
@@ -1081,163 +823,48 @@ var yt = {
1081
823
  r && e.can("employeeAccounts", r) !== !1 && n({
1082
824
  title: "设置账号",
1083
825
  width: "standard",
1084
- component: xt
826
+ component: st
1085
827
  });
1086
828
  }
1087
829
  }] }
1088
- }, Ct = "muyun.auth.token", wt = "muyun.auth.sessionId";
1089
- function Tt(e) {
1090
- return Et() ?? jt(e);
1091
- }
1092
- function Et() {
1093
- if (!(typeof window > "u")) return jt(window.localStorage.getItem(Ct));
1094
- }
1095
- function Dt() {
1096
- if (!(typeof window > "u")) return jt(window.localStorage.getItem(wt));
1097
- }
1098
- function Ot(e) {
1099
- typeof window > "u" || window.localStorage.setItem(Ct, e);
1100
- }
1101
- function kt(e) {
1102
- if (typeof window > "u") return;
1103
- let t = jt(e);
1104
- if (t) {
1105
- window.localStorage.setItem(wt, t);
1106
- return;
1107
- }
1108
- window.localStorage.removeItem(wt);
1109
- }
1110
- function At() {
1111
- typeof window > "u" || (window.localStorage.removeItem(Ct), window.localStorage.removeItem(wt));
1112
- }
1113
- function jt(e) {
1114
- return e?.trim() || void 0;
1115
- }
1116
- function Mt(e, t) {
830
+ };
831
+ function lt(e, t) {
1117
832
  return !1;
1118
833
  }
1119
834
  //#endregion
1120
835
  //#region src/platform-admin-runtime/backendHttp.ts
1121
- function Nt(e = {}) {
1122
- return F({
836
+ function ut(e = {}) {
837
+ let t = () => N({
1123
838
  baseUrl: void 0,
1124
- token: e.withAuth === !1 ? void 0 : Tt(void 0),
1125
- credentials: Pt(void 0),
1126
- onAuthenticationRequired: e.withAuth === !1 ? void 0 : (e, t) => Mt(e, t)
1127
- });
1128
- }
1129
- function Pt(e) {
1130
- return e === "include" || e === "omit" || e === "same-origin" ? e : void 0;
1131
- }
1132
- //#endregion
1133
- //#region src/platform-admin-runtime/realtime.ts
1134
- var Ft = Oe(), It = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Set(), Rt, zt, Bt = 3e4;
1135
- function Vt(e = {}) {
1136
- return g({
1137
- baseUrl: e.baseUrl ?? void 0,
1138
- token: e.token ?? Tt(void 0),
1139
- onStateChange: (t) => {
1140
- e.onStateChange?.(t), t === "unauthorized" && e.onUnauthorized?.();
1141
- }
839
+ token: e.withAuth === !1 ? void 0 : a(void 0),
840
+ credentials: dt(void 0),
841
+ onAuthenticationRequired: e.withAuth === !1 ? void 0 : (e, t) => lt(e, t)
1142
842
  });
1143
- }
1144
- function Ht(e = {}) {
1145
- if (zt) throw Error("App realtime is already connected. Disconnect the active connection before reconnecting.");
1146
- let n = Vt(e);
1147
- Rt = n;
1148
- let r = t(n, Ft), i = v(n, (t) => {
1149
- e.onUserNotification?.(t);
1150
- }), a = ne(n, (t) => {
1151
- e.onBusinessNotification?.(t);
1152
- }), o = p(n, (e) => {
1153
- for (let t of Lt) t(e);
1154
- }), s = Wt(n);
1155
- s.start(), Jt(n), n.connect();
1156
- let c = !1, l = { async disconnect() {
1157
- c || (c = !0, r.unsubscribe(), i.unsubscribe(), a.unsubscribe(), o.unsubscribe(), s.stop(), Yt(), zt === l && (zt = void 0), Rt === n && (Rt = void 0), await n.disconnect());
1158
- } };
1159
- return zt = l, l;
1160
- }
1161
- async function Ut() {
1162
- await zt?.disconnect();
1163
- }
1164
- function Wt(e) {
1165
- let t = 0, n = [
1166
- "pointermove",
1167
- "pointerdown",
1168
- "keydown",
1169
- "scroll"
1170
- ], r = () => a(!1), i = () => {
1171
- document.visibilityState === "visible" && a(!0);
1172
- };
1173
843
  return {
1174
- start() {
1175
- if (!(typeof window > "u" || typeof document > "u")) {
1176
- for (let e of n) window.addEventListener(e, r, { passive: !0 });
1177
- document.addEventListener("visibilitychange", i);
1178
- }
844
+ request(e) {
845
+ return t().request(e);
1179
846
  },
1180
- stop() {
1181
- if (!(typeof window > "u" || typeof document > "u")) {
1182
- for (let e of n) window.removeEventListener(e, r);
1183
- document.removeEventListener("visibilitychange", i);
1184
- }
1185
- }
1186
- };
1187
- function a(n) {
1188
- if (e.state() !== "connected") return;
1189
- let r = Date.now();
1190
- if (!(!n && r - t < Bt)) {
1191
- t = r;
1192
- try {
1193
- e.publish(k, { timestamp: new Date(r).toISOString() });
1194
- } catch {}
847
+ stream(e) {
848
+ return t().stream(e);
1195
849
  }
1196
- }
1197
- }
1198
- function Gt(e) {
1199
- let t = e.trim();
1200
- if (!t) throw Error("Module data change subscription requires a moduleAlias");
1201
- let n = It.get(t) ?? {
1202
- moduleAlias: t,
1203
- references: 0
1204
850
  };
1205
- return n.references += 1, It.set(t, n), !n.active && Rt && (n.active = Xt(Rt, t)), { unsubscribe() {
1206
- --n.references, !(n.references > 0) && (n.active?.unsubscribe(), n.active = void 0, It.delete(t));
1207
- } };
1208
- }
1209
- function Kt(e) {
1210
- return Ft.subscribe(e);
1211
- }
1212
- function qt(e) {
1213
- return Lt.add(e), { unsubscribe() {
1214
- Lt.delete(e);
1215
- } };
1216
- }
1217
- function Jt(e) {
1218
- for (let t of It.values()) t.active?.unsubscribe(), t.active = Xt(e, t.moduleAlias);
1219
- }
1220
- function Yt() {
1221
- for (let e of It.values()) e.active?.unsubscribe(), e.active = void 0;
1222
851
  }
1223
- function Xt(e, t) {
1224
- return e.subscribe(ee(t), (e) => {
1225
- Ft.dispatch(e);
1226
- });
852
+ function dt(e) {
853
+ return e === "include" || e === "omit" || e === "same-origin" ? e : void 0;
1227
854
  }
1228
855
  //#endregion
1229
856
  //#region src/platform-admin-runtime/user/userOnlineStatusStore.ts
1230
- var Zt = "iam.user.session.collectionChanged", Qt = J({}), $t = /* @__PURE__ */ new Set(), en = !1, tn = !1;
1231
- function nn() {
1232
- rn();
857
+ var ft = "iam.user.session.collectionChanged", pt = J({}), mt = /* @__PURE__ */ new Set(), ht = !1, gt = !1;
858
+ function _t() {
859
+ vt();
1233
860
  function e(e) {
1234
- e && !Qt.value[e] && ($t.add(e), an());
861
+ e && !pt.value[e] && (mt.add(e), yt());
1235
862
  }
1236
863
  function t(e) {
1237
- return e ? Qt.value[e] : void 0;
864
+ return e ? pt.value[e] : void 0;
1238
865
  }
1239
866
  function n(e) {
1240
- e && ($t.add(e), an());
867
+ e && (mt.add(e), yt());
1241
868
  }
1242
869
  return {
1243
870
  observe: e,
@@ -1245,41 +872,41 @@ function nn() {
1245
872
  refresh: n
1246
873
  };
1247
874
  }
1248
- function rn() {
1249
- tn || (tn = !0, qt((e) => {
1250
- sn(e) && ($t.add(e.recordId), an());
875
+ function vt() {
876
+ gt || (gt = !0, t((e) => {
877
+ xt(e) && (mt.add(e.recordId), yt());
1251
878
  }));
1252
879
  }
1253
- function an() {
1254
- en || (en = !0, queueMicrotask(() => {
1255
- en = !1, on();
880
+ function yt() {
881
+ ht || (ht = !0, queueMicrotask(() => {
882
+ ht = !1, bt();
1256
883
  }));
1257
884
  }
1258
- async function on() {
1259
- let e = Array.from($t);
1260
- if ($t.clear(), e.length !== 0) try {
1261
- let t = await Nt().request({
885
+ async function bt() {
886
+ let e = Array.from(mt);
887
+ if (mt.clear(), e.length !== 0) try {
888
+ let t = await ut().request({
1262
889
  method: "POST",
1263
890
  path: "/iam.user/sessions/status",
1264
891
  body: { userIds: e }
1265
892
  });
1266
- Qt.value = {
1267
- ...Qt.value,
893
+ pt.value = {
894
+ ...pt.value,
1268
895
  ...Object.fromEntries(t.map((e) => [e.userId, e]))
1269
896
  };
1270
897
  } catch (e) {
1271
- T(e, {
898
+ w(e, {
1272
899
  source: "iam-user-online-status",
1273
900
  phase: "load"
1274
901
  });
1275
902
  }
1276
903
  }
1277
- function sn(e) {
1278
- return e.type === Zt && e.moduleAlias === "iam.user" && !!e.recordId;
904
+ function xt(e) {
905
+ return e.type === ft && e.moduleAlias === "iam.user" && !!e.recordId;
1279
906
  }
1280
907
  //#endregion
1281
908
  //#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
1282
- var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
909
+ var St = /*#__PURE__*/ h(/* @__PURE__ */ K({
1283
910
  name: "UserOnlineStatusCell",
1284
911
  __name: "UserOnlineStatusCell",
1285
912
  props: {
@@ -1287,7 +914,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1287
914
  column: {}
1288
915
  },
1289
916
  setup(e) {
1290
- let t = e, n = nn(), r = z(() => t.record.id == null ? void 0 : String(t.record.id)), i = z(() => n.statusOf(r.value)), a = z(() => {
917
+ let t = e, n = _t(), r = R(() => t.record.id == null ? void 0 : String(t.record.id)), i = R(() => n.statusOf(r.value)), a = R(() => {
1291
918
  let e = i.value;
1292
919
  if (!e) return "-";
1293
920
  if (e.present) {
@@ -1299,28 +926,28 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1299
926
  function o() {
1300
927
  n.observe(r.value);
1301
928
  }
1302
- return be(o), Z(r, o), (e, t) => (q(), H("span", { class: _e({
929
+ return ye(o), Z(r, o), (e, t) => (q(), V("span", { class: ge({
1303
930
  "user-online-status--present": i.value?.present,
1304
931
  "user-online-status--offline": i.value && !i.value.online
1305
932
  }) }, Y(a.value), 3));
1306
933
  }
1307
- }), [["__scopeId", "data-v-789ddd4a"]]), ln = {
934
+ }), [["__scopeId", "data-v-789ddd4a"]]), Ct = {
1308
935
  key: 1,
1309
936
  class: "user-password-drawer"
1310
- }, un = { key: 0 }, dn = {
937
+ }, wt = { key: 0 }, Tt = {
1311
938
  key: 1,
1312
939
  class: "user-password-reset"
1313
- }, fn = { key: 0 }, pn = /*#__PURE__*/ j(/* @__PURE__ */ K({
940
+ }, Et = { key: 0 }, Dt = /*#__PURE__*/ h(/* @__PURE__ */ K({
1314
941
  name: "UserPasswordDrawer",
1315
942
  __name: "UserPasswordDrawer",
1316
943
  props: { context: {} },
1317
944
  setup(e) {
1318
- let t = e, n = J(""), r = J(), i = J(!1), a = z(() => t.context.record?.id == null ? void 0 : String(t.context.record.id));
945
+ let t = e, n = J(""), r = J(), i = J(!1), a = R(() => t.context.record?.id == null ? void 0 : String(t.context.record.id));
1319
946
  async function o() {
1320
947
  let e = a.value;
1321
948
  if (e && !i.value && t.context.module.can("changePassword", e) === !0) {
1322
949
  if (!n.value) {
1323
- w("请输入新密码。", {
950
+ C("请输入新密码。", {
1324
951
  source: "iam-user-password",
1325
952
  phase: "validation"
1326
953
  });
@@ -1332,12 +959,12 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1332
959
  method: "POST",
1333
960
  path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
1334
961
  body: { password: n.value }
1335
- }), n.value = "", w("密码已修改。", {
962
+ }), n.value = "", C("密码已修改。", {
1336
963
  source: "iam-user-password",
1337
964
  phase: "action"
1338
965
  }), t.context.refreshList(), t.context.refreshDetailExtensions();
1339
966
  } catch (e) {
1340
- T(e, {
967
+ w(e, {
1341
968
  source: "iam-user-password",
1342
969
  phase: "action"
1343
970
  });
@@ -1356,7 +983,7 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1356
983
  path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
1357
984
  }), t.context.refreshList(), t.context.refreshDetailExtensions();
1358
985
  } catch (e) {
1359
- T(e, {
986
+ w(e, {
1360
987
  source: "iam-user-password",
1361
988
  phase: "action"
1362
989
  });
@@ -1365,34 +992,34 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1365
992
  }
1366
993
  }
1367
994
  }
1368
- return (t, c) => a.value ? (q(), H("section", ln, [e.context.module.can("changePassword", a.value) === !0 ? (q(), H("label", un, [
1369
- c[2] ||= U("span", null, "新密码", -1),
1370
- G(X(A), {
995
+ return (t, c) => a.value ? (q(), V("section", Ct, [e.context.module.can("changePassword", a.value) === !0 ? (q(), V("label", wt, [
996
+ c[2] ||= H("span", null, "新密码", -1),
997
+ W(X(k), {
1371
998
  value: n.value,
1372
999
  "onUpdate:value": c[0] ||= (e) => n.value = e,
1373
1000
  type: "password",
1374
1001
  disabled: i.value,
1375
1002
  placeholder: "请输入新密码"
1376
1003
  }, null, 8, ["value", "disabled"]),
1377
- G(X(S), {
1004
+ W(X(S), {
1378
1005
  type: "primary",
1379
1006
  loading: i.value,
1380
1007
  onClick: o
1381
1008
  }, {
1382
- default: Q(() => [...c[1] ||= [W("修改密码", -1)]]),
1009
+ default: Q(() => [...c[1] ||= [U("修改密码", -1)]]),
1383
1010
  _: 1
1384
1011
  }, 8, ["loading"])
1385
- ])) : V("v-if", !0), e.context.module.can("resetPassword", a.value) === !0 ? (q(), H("section", dn, [
1386
- c[6] ||= U("p", null, "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。", -1),
1387
- G(X(S), {
1012
+ ])) : B("v-if", !0), e.context.module.can("resetPassword", a.value) === !0 ? (q(), V("section", Tt, [
1013
+ c[6] ||= H("p", null, "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。", -1),
1014
+ W(X(S), {
1388
1015
  loading: i.value,
1389
1016
  onClick: s
1390
1017
  }, {
1391
- default: Q(() => [...c[3] ||= [W("生成临时密码", -1)]]),
1018
+ default: Q(() => [...c[3] ||= [U("生成临时密码", -1)]]),
1392
1019
  _: 1
1393
1020
  }, 8, ["loading"]),
1394
- r.value ? (q(), H("dl", fn, [U("div", null, [c[4] ||= U("dt", null, "临时密码", -1), U("dd", null, Y(r.value.temporaryPassword), 1)]), U("div", null, [c[5] ||= U("dt", null, "失效时间", -1), U("dd", null, Y(r.value.expiresAt ?? "-"), 1)])])) : V("v-if", !0)
1395
- ])) : V("v-if", !0)])) : (q(), B(X(m), {
1021
+ r.value ? (q(), V("dl", Et, [H("div", null, [c[4] ||= H("dt", null, "临时密码", -1), H("dd", null, Y(r.value.temporaryPassword), 1)]), H("div", null, [c[5] ||= H("dt", null, "失效时间", -1), H("dd", null, Y(r.value.expiresAt ?? "-"), 1)])])) : B("v-if", !0)
1022
+ ])) : B("v-if", !0)])) : (q(), z(X(v), {
1396
1023
  key: 0,
1397
1024
  title: "用户不存在",
1398
1025
  message: "请重新打开用户详情后再管理密码。"
@@ -1400,42 +1027,9 @@ var cn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1400
1027
  }
1401
1028
  }), [["__scopeId", "data-v-f6125048"]]);
1402
1029
  //#endregion
1403
- //#region src/platform-admin-runtime/pageRealtime.ts
1404
- function mn(e) {
1405
- let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map(), r, i = 0, a = !0;
1406
- function o(n) {
1407
- if (!a) return;
1408
- let i = Array.isArray(n) ? n : [n];
1409
- for (let e of i) e && t.add(e);
1410
- t.size === 0 || r || (r = setTimeout(s, e.delay ?? 0));
1411
- }
1412
- function s() {
1413
- if (r = void 0, !a || t.size === 0) return;
1414
- let o = Array.from(t);
1415
- t.clear(), i += 1;
1416
- let s = i;
1417
- o.forEach((e) => n.set(e, s)), e.load({
1418
- keys: o,
1419
- isLatest: (e) => a && n.get(e) === s,
1420
- active: () => a
1421
- });
1422
- }
1423
- function c() {
1424
- a = !1, l();
1425
- }
1426
- function l() {
1427
- r &&= (clearTimeout(r), void 0), t.clear(), n.clear();
1428
- }
1429
- return {
1430
- enqueue: o,
1431
- reset: l,
1432
- dispose: c
1433
- };
1434
- }
1435
- //#endregion
1436
1030
  //#region src/platform-admin-runtime/user/useUserSessionRows.ts
1437
- function hn(e) {
1438
- let t = J([]), n = J({}), r = mn({ load: async (e) => {
1031
+ function Ot(e) {
1032
+ let t = J([]), n = J({}), r = u({ load: async (e) => {
1439
1033
  await Promise.all(e.keys.map((t) => a(t, e.isLatest)));
1440
1034
  } });
1441
1035
  function i(e) {
@@ -1443,7 +1037,7 @@ function hn(e) {
1443
1037
  }
1444
1038
  async function a(t, n) {
1445
1039
  if (e.context.can("sessions", t) !== !1) {
1446
- u(t, {
1040
+ d(t, {
1447
1041
  ...c(t),
1448
1042
  loading: !0,
1449
1043
  error: void 0
@@ -1454,17 +1048,17 @@ function hn(e) {
1454
1048
  method: "GET",
1455
1049
  path: `/iam.user/${encodeURIComponent(t)}/sessions`
1456
1050
  });
1457
- n(t) && u(t, {
1051
+ n(t) && d(t, {
1458
1052
  records: r,
1459
1053
  loading: !1
1460
1054
  });
1461
1055
  } catch (r) {
1462
1056
  if (!n(t)) return;
1463
- let i = T(r, {
1057
+ let i = w(r, {
1464
1058
  source: `${e.source}-sessions`,
1465
1059
  phase: "load"
1466
1060
  });
1467
- u(t, {
1061
+ d(t, {
1468
1062
  ...c(t),
1469
1063
  loading: !1,
1470
1064
  error: i.message
@@ -1493,7 +1087,7 @@ function hn(e) {
1493
1087
  function l() {
1494
1088
  r.reset(), t.value = [], n.value = {};
1495
1089
  }
1496
- function u(e, t) {
1090
+ function d(e, t) {
1497
1091
  n.value = {
1498
1092
  ...n.value,
1499
1093
  [e]: t
@@ -1509,7 +1103,7 @@ function hn(e) {
1509
1103
  }
1510
1104
  //#endregion
1511
1105
  //#region src/platform-admin-runtime/userModulePageEnhancement.ts
1512
- var gn = {
1106
+ var kt = {
1513
1107
  id: "iam-user-standard-page-enhancement",
1514
1108
  target: { moduleAlias: "iam.user" },
1515
1109
  navigator: { emptyListScope: ({ currentUser: e, selectedNavigatorRecords: t }) => {
@@ -1527,52 +1121,52 @@ var gn = {
1527
1121
  __name: "UserSessionListExpansion",
1528
1122
  props: { context: {} },
1529
1123
  setup(e) {
1530
- let t = e, r = z(() => t.context.record.id == null ? void 0 : String(t.context.record.id)), i = hn({
1531
- context: t.context.module,
1124
+ let n = e, r = R(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), i = Ot({
1125
+ context: n.context.module,
1532
1126
  source: "iam-user-list-expansion"
1533
- }), a = z(() => i.userSessionState(r.value)), o = z(() => a.value.records.filter((e) => !e.current && t.context.module.can("revokeSession", r.value) === !0)), c = z(() => o.value.length > 1 && t.context.module.can("revokeSessions", r.value) === !0);
1534
- Z([r, () => t.context.expanded], ([e, t]) => {
1127
+ }), a = R(() => i.userSessionState(r.value)), o = R(() => a.value.records.filter((e) => !e.current && n.context.module.can("revokeSession", r.value) === !0)), s = R(() => o.value.length > 1 && n.context.module.can("revokeSessions", r.value) === !0);
1128
+ Z([r, () => n.context.expanded], ([e, t]) => {
1535
1129
  e && i.handleUserRowExpand({ id: e }, t);
1536
1130
  }, { immediate: !0 });
1537
- let l = qt((e) => i.handleUserSessionBusinessEvent(e));
1538
- xe(() => {
1539
- l.unsubscribe(), i.reset();
1131
+ let c = t((e) => i.handleUserSessionBusinessEvent(e));
1132
+ be(() => {
1133
+ c.unsubscribe(), i.reset();
1540
1134
  });
1541
- async function u(e) {
1542
- let n = r.value;
1543
- n && !e.current && t.context.module.can("revokeSession", n) === !0 && await s({
1135
+ async function l(e) {
1136
+ let t = r.value;
1137
+ t && !e.current && n.context.module.can("revokeSession", t) === !0 && await E({
1544
1138
  title: "下线登录会话",
1545
1139
  content: "确认下线该登录会话?",
1546
1140
  okText: "下线",
1547
1141
  danger: !0
1548
- }) && (await t.context.module.http.request({
1142
+ }) && (await n.context.module.http.request({
1549
1143
  method: "POST",
1550
- path: `/iam.user/${encodeURIComponent(n)}/sessions/${encodeURIComponent(e.id)}/revoke`
1551
- }), i.loadUserSessions(n));
1144
+ path: `/iam.user/${encodeURIComponent(t)}/sessions/${encodeURIComponent(e.id)}/revoke`
1145
+ }), i.loadUserSessions(t));
1552
1146
  }
1553
- async function d() {
1554
- let e = r.value, n = o.value.map((e) => e.id);
1555
- e && n.length !== 0 && t.context.module.can("revokeSessions", e) === !0 && await s({
1147
+ async function u() {
1148
+ let e = r.value, t = o.value.map((e) => e.id);
1149
+ e && t.length !== 0 && n.context.module.can("revokeSessions", e) === !0 && await E({
1556
1150
  title: "全部下线",
1557
- content: `确认下线该用户的 ${n.length} 个登录会话?`,
1151
+ content: `确认下线该用户的 ${t.length} 个登录会话?`,
1558
1152
  okText: "全部下线",
1559
1153
  danger: !0
1560
- }) && (await t.context.module.http.request({
1154
+ }) && (await n.context.module.http.request({
1561
1155
  method: "POST",
1562
1156
  path: `/iam.user/${encodeURIComponent(e)}/sessions/revoke`,
1563
- body: { sessionIds: n }
1157
+ body: { sessionIds: t }
1564
1158
  }), i.loadUserSessions(e));
1565
1159
  }
1566
- return (t, o) => (q(), B(X(n), {
1160
+ return (t, n) => (q(), z(X(p), {
1567
1161
  embedded: "",
1568
1162
  sessions: a.value.records,
1569
1163
  loading: a.value.loading,
1570
1164
  error: a.value.error,
1571
1165
  "can-revoke": (t) => !t.current && e.context.module.can("revokeSession", r.value) === !0,
1572
- "can-revoke-all": c.value,
1573
- onRefresh: o[0] ||= (e) => X(i).loadUserSessions(r.value),
1574
- onRevoke: u,
1575
- onRevokeAll: d
1166
+ "can-revoke-all": s.value,
1167
+ onRefresh: n[0] ||= (e) => X(i).loadUserSessions(r.value),
1168
+ onRevoke: l,
1169
+ onRevokeAll: u
1576
1170
  }, null, 8, [
1577
1171
  "sessions",
1578
1172
  "loading",
@@ -1589,7 +1183,7 @@ var gn = {
1589
1183
  width: "112px",
1590
1184
  align: "center",
1591
1185
  before: "enabled",
1592
- cell: cn
1186
+ cell: St
1593
1187
  }]
1594
1188
  },
1595
1189
  detail: { actions: [{
@@ -1602,26 +1196,26 @@ var gn = {
1602
1196
  e({
1603
1197
  title: "密码管理",
1604
1198
  width: "narrow",
1605
- component: pn
1199
+ component: Dt
1606
1200
  });
1607
1201
  }
1608
1202
  }] }
1609
- }, _n = "/iam.role/scope-selection/descriptor", vn = "/iam.role/scope-selection/candidates";
1610
- function yn(e) {
1203
+ }, At = "/iam.role/scope-selection/descriptor", jt = "/iam.role/scope-selection/candidates";
1204
+ function Mt(e) {
1611
1205
  return {
1612
1206
  async descriptor() {
1613
- return bn(await e.request({ path: _n }));
1207
+ return Nt(await e.request({ path: At }));
1614
1208
  },
1615
1209
  async candidates(t) {
1616
- let n = Nn(t.pageNum) ?? 1, r = Nn(t.pageSize) ?? 100;
1617
- return xn(await e.request({
1210
+ let n = Kt(t.pageNum) ?? 1, r = Kt(t.pageSize) ?? 100;
1211
+ return Pt(await e.request({
1618
1212
  method: "POST",
1619
- path: vn,
1213
+ path: jt,
1620
1214
  body: {
1621
- navigationKey: An(t.navigationKey, "navigationKey"),
1215
+ navigationKey: Ut(t.navigationKey, "navigationKey"),
1622
1216
  level: t.level,
1623
- keyword: kn(t.keyword),
1624
- parentId: kn(t.parentId),
1217
+ keyword: Ht(t.keyword),
1218
+ parentId: Ht(t.parentId),
1625
1219
  page: {
1626
1220
  pageNum: n,
1627
1221
  pageSize: r
@@ -1631,137 +1225,137 @@ function yn(e) {
1631
1225
  }
1632
1226
  };
1633
1227
  }
1634
- function bn(e) {
1635
- let t = En(e);
1228
+ function Nt(e) {
1229
+ let t = zt(e);
1636
1230
  return {
1637
- directSelections: Dn(t.directSelections).flatMap(Sn),
1638
- navigations: Dn(t.navigations).flatMap(Cn)
1231
+ directSelections: Bt(t.directSelections).flatMap(Ft),
1232
+ navigations: Bt(t.navigations).flatMap(It)
1639
1233
  };
1640
1234
  }
1641
- function xn(e, t) {
1642
- let n = En(e), r = Dn(n.records).flatMap(wn), i = Mn(n.pageNum) ?? t, a = Mn(n.pages), o = jn(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
1235
+ function Pt(e, t) {
1236
+ let n = zt(e), r = Bt(n.records).flatMap(Lt), i = Gt(n.pageNum) ?? t, a = Gt(n.pages), o = Wt(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
1643
1237
  return {
1644
1238
  records: r,
1645
1239
  hasMore: o,
1646
1240
  ...o ? { nextPage: i + 1 } : {}
1647
1241
  };
1648
1242
  }
1649
- function Sn(e) {
1650
- let t = En(e), n = On(t.selectionKey);
1243
+ function Ft(e) {
1244
+ let t = zt(e), n = Vt(t.selectionKey);
1651
1245
  return n ? [{
1652
1246
  selectionKey: n,
1653
- label: On(t.title ?? t.label) ?? n
1247
+ label: Vt(t.title ?? t.label) ?? n
1654
1248
  }] : [];
1655
1249
  }
1656
- function Cn(e) {
1657
- let t = En(e), n = On(t.navigationKey), r = Tn(t.level);
1250
+ function It(e) {
1251
+ let t = zt(e), n = Vt(t.navigationKey), r = Rt(t.level);
1658
1252
  return !n || !r ? [] : [{
1659
1253
  navigationKey: n,
1660
1254
  level: r,
1661
- label: On(t.title ?? t.label) ?? n
1255
+ label: Vt(t.title ?? t.label) ?? n
1662
1256
  }];
1663
1257
  }
1664
- function wn(e) {
1665
- let t = En(e), n = On(t.id), r = On(t.selectionKey);
1258
+ function Lt(e) {
1259
+ let t = zt(e), n = Vt(t.id), r = Vt(t.selectionKey);
1666
1260
  return !n || !r ? [] : [{
1667
1261
  id: n,
1668
1262
  selectionKey: r,
1669
- label: On(t.title ?? t.label) ?? r,
1670
- ...On(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: On(t.subtitle ?? t.secondaryLabel) } : {},
1671
- expandable: jn(t.expandable, !1)
1263
+ label: Vt(t.title ?? t.label) ?? r,
1264
+ ...Vt(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: Vt(t.subtitle ?? t.secondaryLabel) } : {},
1265
+ expandable: Wt(t.expandable, !1)
1672
1266
  }];
1673
1267
  }
1674
- function Tn(e) {
1268
+ function Rt(e) {
1675
1269
  return e === "TENANT" || e === "ORGANIZATION" ? e : void 0;
1676
1270
  }
1677
- function En(e) {
1271
+ function zt(e) {
1678
1272
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
1679
1273
  }
1680
- function Dn(e) {
1274
+ function Bt(e) {
1681
1275
  return Array.isArray(e) ? e : [];
1682
1276
  }
1683
- function On(e) {
1684
- return typeof e == "string" ? kn(e) : void 0;
1277
+ function Vt(e) {
1278
+ return typeof e == "string" ? Ht(e) : void 0;
1685
1279
  }
1686
- function kn(e) {
1280
+ function Ht(e) {
1687
1281
  return e?.trim() || void 0;
1688
1282
  }
1689
- function An(e, t) {
1690
- let n = kn(e);
1283
+ function Ut(e, t) {
1284
+ let n = Ht(e);
1691
1285
  if (!n) throw Error(`角色归属范围${t}不能为空`);
1692
1286
  return n;
1693
1287
  }
1694
- function jn(e, t) {
1288
+ function Wt(e, t) {
1695
1289
  return typeof e == "boolean" ? e : t;
1696
1290
  }
1697
- function Mn(e) {
1291
+ function Gt(e) {
1698
1292
  return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
1699
1293
  }
1700
- function Nn(e) {
1294
+ function Kt(e) {
1701
1295
  return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
1702
1296
  }
1703
1297
  //#endregion
1704
1298
  //#region src/platform-admin-runtime/role/RoleScopeTree.vue
1705
- var Pn = /* @__PURE__ */ K({
1299
+ var qt = /* @__PURE__ */ K({
1706
1300
  name: "RoleScopeTree",
1707
1301
  __name: "RoleScopeTree",
1708
1302
  props: { context: {} },
1709
1303
  setup(e) {
1710
- let t = e, n = yn(Nt()), r = J(), a = J(""), s = J(!1), c = J([]), l = J([]), u = J(0), d = J(/* @__PURE__ */ new Map()), f = z(() => t.context.selectionKey), p = z(() => r.value?.navigations.some((e) => e.level === "TENANT") === !0), m = z(() => r.value?.navigations.length !== 0), h = z(() => p.value ? "租户" : "机构"), g = i({
1711
- nodes: () => c.value,
1712
- loader: () => A,
1713
- version: () => u.value
1714
- }), _ = g.nodes, v = g.states, b = 0, x;
1715
- be(() => void S()), ye(() => {
1716
- b += 1, x && clearTimeout(x);
1717
- }), Z(a, () => {
1718
- m.value && (x && clearTimeout(x), x = setTimeout(() => void w(), 240));
1304
+ let t = e, n = Mt(ut()), r = J(), i = J(""), a = J(!1), o = J([]), s = J([]), c = J(0), l = J(/* @__PURE__ */ new Map()), u = R(() => t.context.selectionKey), f = R(() => r.value?.navigations.some((e) => e.level === "TENANT") === !0), p = R(() => r.value?.navigations.length !== 0), m = R(() => f.value ? "租户" : "机构"), h = O({
1305
+ nodes: () => o.value,
1306
+ loader: () => ee,
1307
+ version: () => c.value
1308
+ }), g = h.nodes, _ = h.states, v = 0, b;
1309
+ ye(() => void x()), ve(() => {
1310
+ v += 1, b && clearTimeout(b);
1311
+ }), Z(i, () => {
1312
+ p.value && (b && clearTimeout(b), b = setTimeout(() => void C(), 240));
1719
1313
  });
1720
- async function S() {
1721
- s.value = !0;
1314
+ async function x() {
1315
+ a.value = !0;
1722
1316
  try {
1723
1317
  r.value = await n.descriptor();
1724
1318
  let e = r.value.directSelections[0];
1725
- !t.context.selectionKey && e && M({
1319
+ !t.context.selectionKey && e && ne({
1726
1320
  key: e.selectionKey,
1727
1321
  label: e.label
1728
- }), await C();
1322
+ }), await S();
1729
1323
  } catch (e) {
1730
- T(e, {
1324
+ w(e, {
1731
1325
  source: "role-scope-tree",
1732
1326
  phase: "load"
1733
1327
  });
1734
1328
  } finally {
1735
- s.value = !1;
1329
+ a.value = !1;
1736
1330
  }
1737
1331
  }
1738
- async function C(e = {}) {
1332
+ async function S(e = {}) {
1739
1333
  let t = r.value;
1740
1334
  if (!t) return;
1741
- let n = ++b;
1335
+ let n = ++v;
1742
1336
  if (!e.append) {
1743
- l.value = [], u.value += 1, s.value = !0;
1337
+ s.value = [], c.value += 1, a.value = !0;
1744
1338
  try {
1745
- let e = E(t);
1746
- if (n !== b) return;
1747
- d.value = /* @__PURE__ */ new Map(), j(e), c.value = e.map((e) => e.ui);
1339
+ let e = T(t);
1340
+ if (n !== v) return;
1341
+ l.value = /* @__PURE__ */ new Map(), A(e), o.value = e.map((e) => e.ui);
1748
1342
  } catch (e) {
1749
- if (n !== b) return;
1750
- c.value = [], T(e, {
1343
+ if (n !== v) return;
1344
+ o.value = [], w(e, {
1751
1345
  source: "role-scope-tree",
1752
1346
  phase: "load"
1753
1347
  });
1754
1348
  } finally {
1755
- n === b && (s.value = !1);
1349
+ n === v && (a.value = !1);
1756
1350
  }
1757
1351
  }
1758
1352
  }
1759
- async function w() {
1760
- if (await C(), !a.value.trim()) return;
1353
+ async function C() {
1354
+ if (await S(), !i.value.trim()) return;
1761
1355
  let e = (r.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
1762
- l.value = e, await ge(), await Promise.all(e.map((e) => g.request(e, "refresh")));
1356
+ s.value = e, await he(), await Promise.all(e.map((e) => h.request(e, "refresh")));
1763
1357
  }
1764
- function E(e) {
1358
+ function T(e) {
1765
1359
  return [
1766
1360
  ...e.directSelections.map((e) => ({
1767
1361
  ui: {
@@ -1774,11 +1368,11 @@ var Pn = /* @__PURE__ */ K({
1774
1368
  label: e.label
1775
1369
  }
1776
1370
  })),
1777
- ...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => D(e)),
1778
- ...e.navigations.filter((e) => e.level === "TENANT").map((e) => D(e))
1371
+ ...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => E(e)),
1372
+ ...e.navigations.filter((e) => e.level === "TENANT").map((e) => E(e))
1779
1373
  ];
1780
1374
  }
1781
- function D(e) {
1375
+ function E(e) {
1782
1376
  return {
1783
1377
  ui: {
1784
1378
  key: `navigation:${e.navigationKey}`,
@@ -1791,7 +1385,7 @@ var Pn = /* @__PURE__ */ K({
1791
1385
  }
1792
1386
  };
1793
1387
  }
1794
- function O(e, t, n) {
1388
+ function D(e, t, n) {
1795
1389
  let r = k(e, t, n);
1796
1390
  return {
1797
1391
  ui: {
@@ -1818,78 +1412,78 @@ var Pn = /* @__PURE__ */ K({
1818
1412
  parentId: e.id
1819
1413
  } : void 0;
1820
1414
  }
1821
- async function A(e, t) {
1822
- let r = d.value.get(e.key);
1415
+ async function ee(e, t) {
1416
+ let r = l.value.get(e.key);
1823
1417
  if (!r?.children) throw Error("角色归属范围已失效");
1824
1418
  try {
1825
1419
  let e = await n.candidates({
1826
1420
  ...r.children,
1827
- keyword: a.value.trim() || void 0,
1421
+ keyword: i.value.trim() || void 0,
1828
1422
  pageNum: t.reason === "load-more" ? Number(t.cursor) : 1
1829
1423
  });
1830
1424
  t.signal.throwIfAborted();
1831
- let i = e.records.map((e) => O(e, r.children.level, r.children.navigationKey));
1832
- return j(i), {
1425
+ let a = e.records.map((e) => D(e, r.children.level, r.children.navigationKey));
1426
+ return A(a), {
1833
1427
  mode: t.reason === "load-more" ? "append" : "replace",
1834
- nodes: i.map((e) => e.ui),
1428
+ nodes: a.map((e) => e.ui),
1835
1429
  hasMore: e.hasMore,
1836
1430
  nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
1837
1431
  };
1838
1432
  } catch (e) {
1839
- throw t.signal.aborted || T(e, {
1433
+ throw t.signal.aborted || w(e, {
1840
1434
  source: "role-scope-tree",
1841
1435
  phase: "load"
1842
1436
  }), e;
1843
1437
  }
1844
1438
  }
1845
- function j(e) {
1846
- let t = new Map(d.value);
1847
- e.forEach((e) => t.set(e.ui.key, e)), d.value = t;
1439
+ function A(e) {
1440
+ let t = new Map(l.value);
1441
+ e.forEach((e) => t.set(e.ui.key, e)), l.value = t;
1848
1442
  }
1849
- function ee(e) {
1850
- let t = d.value.get(e.key)?.selection;
1851
- t && M(t);
1443
+ function te(e) {
1444
+ let t = l.value.get(e.key)?.selection;
1445
+ t && ne(t);
1852
1446
  }
1853
- function M(e) {
1447
+ function ne(e) {
1854
1448
  t.context.selectSelectionKey(e.key, {
1855
1449
  label: e.label,
1856
1450
  secondaryLabel: e.secondaryLabel
1857
1451
  });
1858
1452
  }
1859
- function N() {
1453
+ function M() {
1860
1454
  let e = r.value?.directSelections[0];
1861
- e && M({
1455
+ e && ne({
1862
1456
  key: e.selectionKey,
1863
1457
  label: e.label
1864
1458
  });
1865
1459
  }
1866
- return (e, t) => (q(), B(X(o), {
1460
+ return (e, t) => (q(), z(X(y), {
1867
1461
  class: "role-scope-tree",
1868
- title: h.value,
1462
+ title: m.value,
1869
1463
  "refresh-title": "刷新角色归属范围",
1870
- "search-keyword": a.value,
1464
+ "search-keyword": i.value,
1871
1465
  "search-placeholder": "搜索名称、编码或标识",
1872
- searchable: m.value,
1873
- onRefresh: C,
1874
- "onUpdate:searchKeyword": t[3] ||= (e) => a.value = e
1466
+ searchable: p.value,
1467
+ onRefresh: S,
1468
+ "onUpdate:searchKeyword": t[3] ||= (e) => i.value = e
1875
1469
  }, {
1876
- default: Q(() => [s.value ? (q(), B(X(re), {
1470
+ default: Q(() => [a.value ? (q(), z(X(d), {
1877
1471
  key: 0,
1878
1472
  tip: "加载角色归属范围"
1879
- })) : (q(), B(X(y), {
1473
+ })) : (q(), z(X(j), {
1880
1474
  key: 1,
1881
- "expanded-keys": l.value,
1882
- "onUpdate:expandedKeys": t[0] ||= (e) => l.value = e,
1883
- nodes: X(_),
1884
- "selected-key": f.value,
1885
- "reload-key": u.value,
1475
+ "expanded-keys": s.value,
1476
+ "onUpdate:expandedKeys": t[0] ||= (e) => s.value = e,
1477
+ nodes: X(g),
1478
+ "selected-key": u.value,
1479
+ "reload-key": c.value,
1886
1480
  "load-strategy": "controlled",
1887
1481
  "reload-on-reexpand": "",
1888
- "branch-states": X(v),
1889
- onLoadRequest: t[1] ||= (e) => X(g).request(e.node.key, e.reason, X(g).stateOf(e.node.key).status === "error"),
1890
- onSelect: ee,
1891
- onDeselect: N,
1892
- onUnloadChildren: t[2] ||= (e) => X(g).release(e.key)
1482
+ "branch-states": X(_),
1483
+ onLoadRequest: t[1] ||= (e) => X(h).request(e.node.key, e.reason, X(h).stateOf(e.node.key).status === "error"),
1484
+ onSelect: te,
1485
+ onDeselect: M,
1486
+ onUnloadChildren: t[2] ||= (e) => X(h).release(e.key)
1893
1487
  }, null, 8, [
1894
1488
  "expanded-keys",
1895
1489
  "nodes",
@@ -1904,7 +1498,7 @@ var Pn = /* @__PURE__ */ K({
1904
1498
  "searchable"
1905
1499
  ]));
1906
1500
  }
1907
- }), Fn = /* @__PURE__ */ K({
1501
+ }), Jt = /* @__PURE__ */ K({
1908
1502
  name: "RoleEnumTitleCell",
1909
1503
  __name: "RoleEnumTitleCell",
1910
1504
  props: {
@@ -1912,7 +1506,7 @@ var Pn = /* @__PURE__ */ K({
1912
1506
  column: {}
1913
1507
  },
1914
1508
  setup(e) {
1915
- let t = e, n = z(() => {
1509
+ let t = e, n = R(() => {
1916
1510
  let e = String(t.record[t.column?.key ?? ""] ?? "");
1917
1511
  return {
1918
1512
  account: "账号角色",
@@ -1927,12 +1521,12 @@ var Pn = /* @__PURE__ */ K({
1927
1521
  platform: "全局公开"
1928
1522
  }[e] ?? (e || "-");
1929
1523
  });
1930
- return (e, t) => (q(), H("span", null, Y(n.value), 1));
1524
+ return (e, t) => (q(), V("span", null, Y(n.value), 1));
1931
1525
  }
1932
1526
  });
1933
1527
  //#endregion
1934
1528
  //#region src/views/roleGrantClient.ts
1935
- function In(e) {
1529
+ function Yt(e) {
1936
1530
  return {
1937
1531
  accountRoleGrants(t, n) {
1938
1532
  return e.request({
@@ -2038,19 +1632,19 @@ function In(e) {
2038
1632
  }
2039
1633
  //#endregion
2040
1634
  //#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
2041
- var Ln = {
1635
+ var Xt = {
2042
1636
  key: 1,
2043
1637
  class: "role-account-grant-drawer-state"
2044
- }, Rn = {
1638
+ }, Zt = {
2045
1639
  key: 0,
2046
1640
  class: "role-account-grant-target-tenant"
2047
- }, zn = {
1641
+ }, Qt = {
2048
1642
  key: 1,
2049
1643
  class: "role-account-grant-target-hint"
2050
- }, Bn = { class: "role-account-grant-search" }, Vn = {
1644
+ }, $t = { class: "role-account-grant-search" }, en = {
2051
1645
  key: 0,
2052
1646
  class: "role-account-grant-selected"
2053
- }, Hn = { class: "role-account-grant-selected-title" }, Un = { class: "role-account-grant-selected-list" }, Wn = ["disabled", "onClick"], Gn = 20, Kn = /*#__PURE__*/ j(/* @__PURE__ */ K({
1647
+ }, tn = { class: "role-account-grant-selected-title" }, nn = { class: "role-account-grant-selected-list" }, rn = ["disabled", "onClick"], an = 20, on = /*#__PURE__*/ h(/* @__PURE__ */ K({
2054
1648
  name: "RoleAccountGrantDrawer",
2055
1649
  __name: "RoleAccountGrantDrawer",
2056
1650
  props: {
@@ -2063,17 +1657,17 @@ var Ln = {
2063
1657
  },
2064
1658
  emits: ["close", "saved"],
2065
1659
  setup(e, { emit: t }) {
2066
- let n = e, r = t, i = J([]), a = J({}), o = J([]), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), d = J(""), p = J(""), h = J(1), g = J(0), _ = J(!1), v = J(!1), y = J(!1), x = J(!1), C = J(), w = z(() => In(n.context.http)), E = b({ moduleAlias: "iam.tenant" }), D = z(() => n.role?.id), O = z(() => n.role ? `绑定用户 - ${je(n.role)}` : "绑定用户"), k = z(() => n.embedded ? "section" : M), j = z(() => n.embedded ? {} : {
1660
+ let n = e, r = t, i = J([]), a = J({}), o = J([]), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), l = J(""), u = J(""), p = J(1), m = J(0), h = J(!1), g = J(!1), y = J(!1), b = J(!1), x = J(), C = R(() => Yt(n.context.http)), T = _({ moduleAlias: "iam.tenant" }), E = R(() => n.role?.id), O = R(() => n.role ? `绑定用户 - ${je(n.role)}` : "绑定用户"), ee = R(() => n.embedded ? "section" : ne), A = R(() => n.embedded ? {} : {
2067
1661
  open: n.open,
2068
1662
  title: O.value,
2069
1663
  renderMode: n.container ? "inline" : "portal",
2070
1664
  closeTitle: "关闭",
2071
- onClose: ve
2072
- }), ee = z(() => n.role?.ownerScopeType === "platform"), N = z(() => C.value?.id), P = z(() => !ee.value || !!N.value), te = z(() => E), ne = z(() => {
1665
+ onClose: ye
1666
+ }), te = R(() => n.role?.ownerScopeType === "platform"), j = R(() => x.value?.id), M = R(() => !te.value || !!j.value), re = R(() => T), ie = R(() => {
2073
1667
  let e = /* @__PURE__ */ new Map();
2074
1668
  for (let t of i.value) t.userId && e.set(t.userId, t);
2075
1669
  return e;
2076
- }), ie = z(() => o.value.filter((e) => e.id).map((e) => ({
1670
+ }), ae = R(() => o.value.filter((e) => e.id).map((e) => ({
2077
1671
  id: e.id,
2078
1672
  username: ke(e),
2079
1673
  employeeNo: e.employeeNo ?? "",
@@ -2081,7 +1675,7 @@ var Ln = {
2081
1675
  organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
2082
1676
  departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
2083
1677
  boundTitle: c.value.has(e.id) ? "已绑定" : "未绑定"
2084
- }))), F = z(() => [...s.value].map((e) => a.value[e] ?? Oe(e))), I = z(() => [...s.value].filter((e) => !c.value.has(e))), ae = z(() => [...c.value].filter((e) => !s.value.has(e))), L = z(() => I.value.length > 0 || ae.value.length > 0), oe = {
1678
+ }))), N = R(() => [...s.value].map((e) => a.value[e] ?? Oe(e))), P = R(() => [...s.value].filter((e) => !c.value.has(e))), F = R(() => [...c.value].filter((e) => !s.value.has(e))), I = R(() => P.value.length > 0 || F.value.length > 0), se = {
2085
1679
  rowKey: "id",
2086
1680
  columns: [
2087
1681
  {
@@ -2115,132 +1709,132 @@ var Ln = {
2115
1709
  width: 90
2116
1710
  }
2117
1711
  ]
2118
- }, se = z(() => ({
1712
+ }, ce = R(() => ({
2119
1713
  selectedRowKeys: [...s.value],
2120
1714
  preserveSelectedRowKeys: !0,
2121
1715
  disabledOf: () => y.value,
2122
1716
  onChange: (e) => {
2123
1717
  s.value = new Set(e.map((e) => String(e)));
2124
1718
  }
2125
- })), ce = z(() => ({
2126
- current: h.value,
2127
- total: g.value,
2128
- pageSize: Gn,
1719
+ })), le = R(() => ({
1720
+ current: p.value,
1721
+ total: m.value,
1722
+ pageSize: an,
2129
1723
  showSizeChanger: !1,
2130
1724
  showQuickJumper: !1,
2131
- onChange: (e) => void pe(e)
1725
+ onChange: (e) => void K(e)
2132
1726
  }));
2133
1727
  Z(() => [n.open, n.role?.id], ([e]) => {
2134
- e ? de() : be();
1728
+ e ? G() : be();
2135
1729
  }, { immediate: !0 }), Z([
2136
1730
  () => n.embedded,
2137
1731
  () => n.drawerContext,
2138
1732
  s,
2139
- L,
2140
- P,
2141
1733
  I,
2142
- ae,
1734
+ M,
1735
+ P,
1736
+ F,
2143
1737
  y,
2144
- _
2145
- ], le, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2146
- function le() {
1738
+ h
1739
+ ], ue, { immediate: !0 }), ve(() => n.drawerContext?.setOperation(void 0));
1740
+ function ue() {
2147
1741
  let e = n.drawerContext;
2148
1742
  n.embedded && e && (e.setSubtitle(`角色:${je(n.role ?? {})} · ${Me(n.role)}`), e.setOperation({
2149
- summary: ue(),
1743
+ summary: de(),
2150
1744
  actions: [{
2151
1745
  key: "cancel-account-role-grants",
2152
1746
  label: "取消",
2153
- disabled: y.value || _.value,
2154
- run: ve
1747
+ disabled: y.value || h.value,
1748
+ run: ye
2155
1749
  }, {
2156
1750
  key: "save-account-role-grants",
2157
1751
  label: "确定",
2158
1752
  emphasis: "primary",
2159
- disabled: _.value || !P.value || !L.value,
1753
+ disabled: h.value || !M.value || !I.value,
2160
1754
  loading: y.value,
2161
- run: () => void ge()
1755
+ run: () => void _e()
2162
1756
  }]
2163
1757
  }));
2164
1758
  }
2165
- function ue() {
2166
- return P.value ? L.value ? `已选 ${s.value.size} 个用户 · 新增 ${I.value.length} · 移除 ${ae.value.length}` : `已选 ${s.value.size} 个用户` : "请选择目标租户";
1759
+ function de() {
1760
+ return M.value ? I.value ? `已选 ${s.value.size} 个用户 · 新增 ${P.value.length} · 移除 ${F.value.length}` : `已选 ${s.value.size} 个用户` : "请选择目标租户";
2167
1761
  }
2168
- async function de() {
2169
- let e = D.value;
1762
+ async function G() {
1763
+ let e = E.value;
2170
1764
  if (!e) {
2171
1765
  be();
2172
1766
  return;
2173
1767
  }
2174
- if (!P.value) {
2175
- xe();
1768
+ if (!M.value) {
1769
+ Se();
2176
1770
  return;
2177
1771
  }
2178
- _.value = !0, x.value = !1;
1772
+ h.value = !0, b.value = !1;
2179
1773
  try {
2180
- let t = await w.value.accountRoleGrants(e, N.value);
1774
+ let t = await C.value.accountRoleGrants(e, j.value);
2181
1775
  i.value = t;
2182
1776
  let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
2183
- c.value = n, s.value = new Set(n), a.value = De([...t.map((e) => Oe(e.userId)).filter((e) => !!e)]), await pe(1);
1777
+ c.value = n, s.value = new Set(n), a.value = De([...t.map((e) => Oe(e.userId)).filter((e) => !!e)]), await K(1);
2184
1778
  } catch (e) {
2185
- x.value = !0, T(e, {
1779
+ b.value = !0, w(e, {
2186
1780
  source: "role-account-grants",
2187
1781
  phase: "load"
2188
1782
  });
2189
1783
  } finally {
2190
- _.value = !1;
1784
+ h.value = !1;
2191
1785
  }
2192
1786
  }
2193
- async function pe(e) {
2194
- let t = D.value;
2195
- if (t && P.value) {
2196
- v.value = !0;
1787
+ async function K(e) {
1788
+ let t = E.value;
1789
+ if (t && M.value) {
1790
+ g.value = !0;
2197
1791
  try {
2198
- let n = await w.value.accountRoleCandidates(t, {
2199
- targetTenantId: N.value,
2200
- keyword: p.value,
1792
+ let n = await C.value.accountRoleCandidates(t, {
1793
+ targetTenantId: j.value,
1794
+ keyword: u.value,
2201
1795
  enabledOnly: !0,
2202
1796
  page: {
2203
1797
  pageNum: Math.max(0, e),
2204
- pageSize: Gn
1798
+ pageSize: an
2205
1799
  }
2206
1800
  });
2207
1801
  o.value = n.records, a.value = {
2208
1802
  ...a.value,
2209
1803
  ...De(n.records)
2210
- }, h.value = n.pageNum, g.value = n.total;
1804
+ }, p.value = n.pageNum, m.value = n.total;
2211
1805
  } catch (e) {
2212
- T(e, {
1806
+ w(e, {
2213
1807
  source: "role-account-grants",
2214
1808
  phase: "load"
2215
1809
  });
2216
1810
  } finally {
2217
- v.value = !1;
1811
+ g.value = !1;
2218
1812
  }
2219
1813
  }
2220
1814
  }
2221
- function K() {
2222
- p.value = d.value.trim(), pe(0);
1815
+ function pe() {
1816
+ u.value = l.value.trim(), K(0);
2223
1817
  }
2224
- function me(e, t) {
1818
+ function he(e, t) {
2225
1819
  let n = new Set(s.value);
2226
1820
  t ? n.add(e) : n.delete(e), s.value = n;
2227
1821
  }
2228
- async function ge() {
2229
- let e = D.value;
2230
- if (e && P.value) {
2231
- if (!L.value) {
1822
+ async function _e() {
1823
+ let e = E.value;
1824
+ if (e && M.value) {
1825
+ if (!I.value) {
2232
1826
  r("close");
2233
1827
  return;
2234
1828
  }
2235
1829
  y.value = !0;
2236
1830
  try {
2237
- for (let t of I.value) await w.value.grantAccountRole(e, {
1831
+ for (let t of P.value) await C.value.grantAccountRole(e, {
2238
1832
  userId: t,
2239
- targetTenantId: N.value
1833
+ targetTenantId: j.value
2240
1834
  });
2241
- for (let t of ae.value) {
2242
- let n = ne.value.get(t)?.id;
2243
- n && await w.value.deleteAccountRoleGrant(e, n, N.value);
1835
+ for (let t of F.value) {
1836
+ let n = ie.value.get(t)?.id;
1837
+ n && await C.value.deleteAccountRoleGrant(e, n, j.value);
2244
1838
  }
2245
1839
  await f({
2246
1840
  success: !0,
@@ -2251,7 +1845,7 @@ var Ln = {
2251
1845
  fallbackMessage: "用户绑定已保存"
2252
1846
  }), r("saved"), r("close");
2253
1847
  } catch (e) {
2254
- T(e, {
1848
+ w(e, {
2255
1849
  source: "role-account-grants",
2256
1850
  phase: "action"
2257
1851
  });
@@ -2260,28 +1854,28 @@ var Ln = {
2260
1854
  }
2261
1855
  }
2262
1856
  }
2263
- function ve() {
1857
+ function ye() {
2264
1858
  y.value || r("close");
2265
1859
  }
2266
1860
  function be() {
2267
- C.value = void 0, xe();
1861
+ x.value = void 0, Se();
2268
1862
  }
2269
- function xe() {
2270
- i.value = [], a.value = {}, o.value = [], s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), d.value = "", p.value = "", h.value = 1, g.value = 0, _.value = !1, v.value = !1, y.value = !1, x.value = !1;
1863
+ function Se() {
1864
+ i.value = [], a.value = {}, o.value = [], s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), l.value = "", u.value = "", p.value = 1, m.value = 0, h.value = !1, g.value = !1, y.value = !1, b.value = !1;
2271
1865
  }
2272
- async function Ce(e) {
1866
+ async function we(e) {
2273
1867
  if (!e) {
2274
- C.value = void 0, xe();
1868
+ x.value = void 0, Se();
2275
1869
  return;
2276
1870
  }
2277
- let t = await E.crud.view(e);
2278
- C.value = t ?? {
1871
+ let t = await T.crud.view(e);
1872
+ x.value = t ?? {
2279
1873
  id: e,
2280
1874
  title: e
2281
- }, await de();
1875
+ }, await G();
2282
1876
  }
2283
- function Te(e) {
2284
- me(e, !1);
1877
+ function Ee(e) {
1878
+ he(e, !1);
2285
1879
  }
2286
1880
  function De(e) {
2287
1881
  let t = {};
@@ -2306,59 +1900,59 @@ var Ln = {
2306
1900
  function Me(e) {
2307
1901
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
2308
1902
  }
2309
- return (t, n) => (q(), B(we(k.value), he(j.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), fe({
2310
- default: Q(() => [_.value ? (q(), B(X(re), {
1903
+ return (t, n) => (q(), z(Ce(ee.value), me(A.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), fe({
1904
+ default: Q(() => [h.value ? (q(), z(X(d), {
2311
1905
  key: 0,
2312
1906
  class: "role-account-grant-drawer-state",
2313
1907
  tip: "加载用户"
2314
- })) : x.value ? (q(), H("div", Ln, [G(X(m), {
1908
+ })) : b.value ? (q(), V("div", Xt, [W(X(v), {
2315
1909
  title: "用户加载失败",
2316
1910
  message: "无法加载当前角色的用户绑定"
2317
- }), G(X(S), {
1911
+ }), W(X(S), {
2318
1912
  type: "primary",
2319
1913
  "icon-name": "reload",
2320
- onClick: de
1914
+ onClick: G
2321
1915
  }, {
2322
- default: Q(() => [...n[3] ||= [W("重试", -1)]]),
1916
+ default: Q(() => [...n[3] ||= [U("重试", -1)]]),
2323
1917
  _: 1
2324
- })])) : (q(), H("section", {
1918
+ })])) : (q(), V("section", {
2325
1919
  key: 2,
2326
- class: _e(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": ee.value }])
2327
- }, [ee.value ? (q(), H("label", Rn, [n[4] ||= U("span", null, "目标租户", -1), G(X(l), {
2328
- context: te.value,
2329
- value: N.value,
1920
+ class: ge(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": te.value }])
1921
+ }, [te.value ? (q(), V("label", Zt, [n[4] ||= H("span", null, "目标租户", -1), W(X(oe), {
1922
+ context: re.value,
1923
+ value: j.value,
2330
1924
  mode: "list",
2331
1925
  placeholder: "请选择角色下发的目标租户",
2332
- disabled: y.value || _.value,
2333
- "onUpdate:value": Ce
1926
+ disabled: y.value || h.value,
1927
+ "onUpdate:value": we
2334
1928
  }, null, 8, [
2335
1929
  "context",
2336
1930
  "value",
2337
1931
  "disabled"
2338
- ])])) : V("v-if", !0), P.value ? (q(), H(R, { key: 2 }, [
2339
- U("div", Bn, [G(X(A), {
2340
- value: d.value,
1932
+ ])])) : B("v-if", !0), M.value ? (q(), V(L, { key: 2 }, [
1933
+ H("div", $t, [W(X(k), {
1934
+ value: l.value,
2341
1935
  "allow-clear": "",
2342
1936
  disabled: y.value,
2343
1937
  placeholder: "搜索用户账号",
2344
- "onUpdate:value": n[0] ||= (e) => d.value = e,
2345
- onKeydown: Ee(K, ["enter"])
2346
- }, null, 8, ["value", "disabled"]), G(X(S), {
1938
+ "onUpdate:value": n[0] ||= (e) => l.value = e,
1939
+ onKeydown: Te(pe, ["enter"])
1940
+ }, null, 8, ["value", "disabled"]), W(X(S), {
2347
1941
  "icon-name": "search",
2348
1942
  disabled: y.value,
2349
- onClick: K
1943
+ onClick: pe
2350
1944
  }, {
2351
- default: Q(() => [...n[5] ||= [W("查询", -1)]]),
1945
+ default: Q(() => [...n[5] ||= [U("查询", -1)]]),
2352
1946
  _: 1
2353
1947
  }, 8, ["disabled"])]),
2354
- G(X(u), {
1948
+ W(X(D), {
2355
1949
  class: "role-account-grant-table",
2356
1950
  size: "middle",
2357
- contract: oe,
2358
- rows: ie.value,
2359
- loading: v.value,
2360
- pagination: ce.value,
2361
- selection: se.value,
1951
+ contract: se,
1952
+ rows: ae.value,
1953
+ loading: g.value,
1954
+ pagination: le.value,
1955
+ selection: ce.value,
2362
1956
  "fill-height": ""
2363
1957
  }, null, 8, [
2364
1958
  "rows",
@@ -2366,41 +1960,41 @@ var Ln = {
2366
1960
  "pagination",
2367
1961
  "selection"
2368
1962
  ]),
2369
- F.value.length > 0 ? (q(), H("section", Vn, [U("div", Hn, [n[6] ||= U("strong", null, "已选用户", -1), U("span", null, Y(F.value.length) + " 个", 1)]), U("div", Un, [(q(!0), H(R, null, Se(F.value, (e) => (q(), H("button", {
1963
+ N.value.length > 0 ? (q(), V("section", en, [H("div", tn, [n[6] ||= H("strong", null, "已选用户", -1), H("span", null, Y(N.value.length) + " 个", 1)]), H("div", nn, [(q(!0), V(L, null, xe(N.value, (e) => (q(), V("button", {
2370
1964
  key: e.id,
2371
1965
  type: "button",
2372
1966
  disabled: y.value,
2373
- onClick: (t) => Te(e.id)
2374
- }, [U("span", null, Y(ke(e)), 1), U("small", null, Y(Ae(e)), 1)], 8, Wn))), 128))])])) : V("v-if", !0)
2375
- ], 64)) : (q(), H("div", zn, " 平台共享角色需要先选择目标租户,再加载可绑定账号。 "))], 2))]),
1967
+ onClick: (t) => Ee(e.id)
1968
+ }, [H("span", null, Y(ke(e)), 1), H("small", null, Y(Ae(e)), 1)], 8, rn))), 128))])])) : B("v-if", !0)
1969
+ ], 64)) : (q(), V("div", Qt, " 平台共享角色需要先选择目标租户,再加载可绑定账号。 "))], 2))]),
2376
1970
  _: 2
2377
1971
  }, [e.embedded ? void 0 : {
2378
1972
  name: "operation",
2379
- fn: Q(() => [G(X(S), {
2380
- disabled: y.value || _.value,
2381
- onClick: ve
1973
+ fn: Q(() => [W(X(S), {
1974
+ disabled: y.value || h.value,
1975
+ onClick: ye
2382
1976
  }, {
2383
- default: Q(() => [...n[1] ||= [W("取消", -1)]]),
1977
+ default: Q(() => [...n[1] ||= [U("取消", -1)]]),
2384
1978
  _: 1
2385
- }, 8, ["disabled"]), G(X(S), {
1979
+ }, 8, ["disabled"]), W(X(S), {
2386
1980
  type: "primary",
2387
1981
  loading: y.value,
2388
- disabled: _.value || !L.value,
2389
- onClick: ge
1982
+ disabled: h.value || !I.value,
1983
+ onClick: _e
2390
1984
  }, {
2391
- default: Q(() => [...n[2] ||= [W(" 确定 ", -1)]]),
1985
+ default: Q(() => [...n[2] ||= [U(" 确定 ", -1)]]),
2392
1986
  _: 1
2393
1987
  }, 8, ["loading", "disabled"])]),
2394
1988
  key: "0"
2395
1989
  }]), 1040, ["class"]));
2396
1990
  }
2397
- }), [["__scopeId", "data-v-fc27c9ca"]]), qn = /* @__PURE__ */ K({
1991
+ }), [["__scopeId", "data-v-fc27c9ca"]]), sn = /* @__PURE__ */ K({
2398
1992
  name: "RoleAccountGrantDrawerSurface",
2399
1993
  __name: "RoleAccountGrantDrawerSurface",
2400
1994
  props: { context: {} },
2401
1995
  setup(e) {
2402
- let t = e, n = z(() => t.context.module), r = z(() => t.context.record);
2403
- return (e, i) => (q(), B(Kn, {
1996
+ let t = e, n = R(() => t.context.module), r = R(() => t.context.record);
1997
+ return (e, i) => (q(), z(on, {
2404
1998
  open: "",
2405
1999
  embedded: "",
2406
2000
  "drawer-context": t.context,
@@ -2416,7 +2010,7 @@ var Ln = {
2416
2010
  "onSaved"
2417
2011
  ]));
2418
2012
  }
2419
- }), Jn = /*#__PURE__*/ j(/* @__PURE__ */ K({
2013
+ }), cn = /*#__PURE__*/ h(/* @__PURE__ */ K({
2420
2014
  name: "EmployeeEmploymentTable",
2421
2015
  __name: "EmployeeEmploymentTable",
2422
2016
  props: {
@@ -2441,7 +2035,7 @@ var Ln = {
2441
2035
  },
2442
2036
  emits: ["update:selectedIds"],
2443
2037
  setup(e, { emit: t }) {
2444
- let n = e, r = t, i = J([]), o = [
2038
+ let n = e, r = t, i = J([]), a = [
2445
2039
  {
2446
2040
  key: "title",
2447
2041
  title: "职员",
@@ -2469,7 +2063,7 @@ var Ln = {
2469
2063
  width: 88,
2470
2064
  align: "right"
2471
2065
  }
2472
- ], s = [
2066
+ ], o = [
2473
2067
  {
2474
2068
  key: "position",
2475
2069
  title: "岗位",
@@ -2490,7 +2084,7 @@ var Ln = {
2490
2084
  title: "主岗位",
2491
2085
  width: 88
2492
2086
  }
2493
- ], c = z(() => {
2087
+ ], s = R(() => {
2494
2088
  let e = /* @__PURE__ */ new Map();
2495
2089
  for (let t of n.rows) {
2496
2090
  let n = t.employeeId ?? t.id, r = e.get(n) ?? {
@@ -2503,65 +2097,65 @@ var Ln = {
2503
2097
  r.positions.push(t), e.set(n, r);
2504
2098
  }
2505
2099
  return [...e.values()];
2506
- }), l = z(() => c.value);
2507
- function u(e, t) {
2100
+ }), c = R(() => s.value);
2101
+ function l(e, t) {
2508
2102
  let n = t;
2509
- return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${f(n)} 项` : "";
2103
+ return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${d(n)} 项` : "";
2510
2104
  }
2511
- function d(e, t) {
2105
+ function u(e, t) {
2512
2106
  let n = t;
2513
2107
  return e.key === "position" ? n.positionTitle ?? n.positionId : e.key === "organization" ? n.organizationTitle ?? n.organizationId : e.key === "department" ? n.departmentTitle ?? n.departmentId : e.key === "primaryPosition" ? n.primaryPosition ? "是" : "否" : "";
2514
2108
  }
2515
- function f(e) {
2109
+ function d(e) {
2516
2110
  return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
2517
2111
  }
2518
- function p(e) {
2112
+ function f(e) {
2519
2113
  if (n.selectable) return {
2520
2114
  selectedRowKeys: e.positions.filter((e) => n.selectedIds.has(e.id)).map((e) => e.id),
2521
2115
  preserveSelectedRowKeys: !0,
2522
2116
  disabledOf: () => n.disabled,
2523
- onChange: (t) => m(e, t)
2117
+ onChange: (t) => p(e, t)
2524
2118
  };
2525
2119
  }
2526
- function m(e, t) {
2120
+ function p(e, t) {
2527
2121
  let i = new Set(n.selectedIds);
2528
2122
  for (let t of e.positions) i.delete(t.id);
2529
2123
  for (let e of t) i.add(String(e));
2530
2124
  r("update:selectedIds", i);
2531
2125
  }
2532
- function g(e, t) {
2126
+ function m(e, t) {
2533
2127
  let n = e.employeeId;
2534
2128
  i.value = t ? Array.from(/* @__PURE__ */ new Set([...i.value, n])) : i.value.filter((e) => e !== n);
2535
2129
  }
2536
- function _(e) {
2130
+ function h(e) {
2537
2131
  let t = e.employeeId;
2538
- g(e, !i.value.includes(t));
2132
+ m(e, !i.value.includes(t));
2539
2133
  }
2540
- return (t, n) => (q(), B(X(a), {
2134
+ return (t, n) => (q(), z(X(M), {
2541
2135
  class: "employee-employment-table",
2542
- columns: o,
2543
- rows: l.value,
2136
+ columns: a,
2137
+ rows: c.value,
2544
2138
  "row-key": "employeeId",
2545
2139
  pagination: e.pagination,
2546
2140
  "expanded-row-keys": i.value,
2547
2141
  "clickable-rows": "",
2548
2142
  "horizontal-scroll": "",
2549
2143
  "fill-height": e.fillHeight,
2550
- onRowExpand: g,
2551
- onRowDblclick: _
2144
+ onRowExpand: m,
2145
+ onRowDblclick: h
2552
2146
  }, {
2553
- cell: Q(({ column: e, record: t }) => [W(Y(u(e, t)), 1)]),
2554
- expandedRow: Q(({ record: e }) => [G(X(h), { title: "任职信息" }, {
2555
- default: Q(() => [G(X(a), {
2556
- columns: s,
2147
+ cell: Q(({ column: e, record: t }) => [U(Y(l(e, t)), 1)]),
2148
+ expandedRow: Q(({ record: e }) => [W(X(x), { title: "任职信息" }, {
2149
+ default: Q(() => [W(X(M), {
2150
+ columns: o,
2557
2151
  rows: e.positions,
2558
2152
  "row-key": "id",
2559
2153
  pagination: !1,
2560
- selection: p(e),
2154
+ selection: f(e),
2561
2155
  "horizontal-scroll": "",
2562
2156
  "row-muted": (e) => e.enabled === !1
2563
2157
  }, {
2564
- cell: Q(({ column: e, record: t }) => [W(Y(d(e, t)), 1)]),
2158
+ cell: Q(({ column: e, record: t }) => [U(Y(u(e, t)), 1)]),
2565
2159
  _: 1
2566
2160
  }, 8, [
2567
2161
  "rows",
@@ -2578,13 +2172,13 @@ var Ln = {
2578
2172
  "fill-height"
2579
2173
  ]));
2580
2174
  }
2581
- }), [["__scopeId", "data-v-21f1027e"]]), Yn = { key: 1 }, Xn = {
2175
+ }), [["__scopeId", "data-v-21f1027e"]]), ln = { key: 1 }, un = {
2582
2176
  key: 2,
2583
2177
  class: "role-employment-grant-body"
2584
- }, Zn = {
2178
+ }, dn = {
2585
2179
  key: 0,
2586
2180
  class: "role-employment-grant-selected"
2587
- }, Qn = { class: "role-employment-grant-selected-title" }, $n = { class: "role-employment-grant-selected-list" }, er = ["disabled", "onClick"], tr = /*#__PURE__*/ j(/* @__PURE__ */ K({
2181
+ }, fn = { class: "role-employment-grant-selected-title" }, pn = { class: "role-employment-grant-selected-list" }, mn = ["disabled", "onClick"], hn = /*#__PURE__*/ h(/* @__PURE__ */ K({
2588
2182
  name: "RoleEmploymentGrantDrawer",
2589
2183
  __name: "RoleEmploymentGrantDrawer",
2590
2184
  props: {
@@ -2597,56 +2191,56 @@ var Ln = {
2597
2191
  },
2598
2192
  emits: ["close", "saved"],
2599
2193
  setup(e, { emit: t }) {
2600
- let n = e, r = t, i = J([]), a = J([]), o = J({}), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), l = J(!1), u = J(!1), d = J(!1), p = J(!1), h = J(1), g = J(0), _ = J(""), v = z(() => n.role?.id), y = z(() => In(n.context.http)), b = z(() => `绑定任职 - ${n.role?.title ?? n.role?.id ?? ""}`), x = z(() => n.embedded ? "section" : M), C = z(() => n.embedded ? {} : {
2194
+ let n = e, r = t, i = J([]), a = J([]), o = J({}), s = J(/* @__PURE__ */ new Set()), c = J(/* @__PURE__ */ new Set()), l = J(!1), u = J(!1), p = J(!1), m = J(!1), h = J(1), g = J(0), _ = J(""), y = R(() => n.role?.id), b = R(() => Yt(n.context.http)), x = R(() => `绑定任职 - ${n.role?.title ?? n.role?.id ?? ""}`), C = R(() => n.embedded ? "section" : ne), T = R(() => n.embedded ? {} : {
2601
2195
  open: n.open,
2602
- title: b.value,
2196
+ title: x.value,
2603
2197
  renderMode: n.container ? "inline" : "portal",
2604
2198
  closeTitle: "关闭",
2605
- onClose: () => !d.value && r("close")
2606
- }), w = z(() => [...s.value].filter((e) => !c.value.has(e))), E = z(() => [...c.value].filter((e) => !s.value.has(e))), D = z(() => new Map(i.value.map((e) => [e.employeePositionId, e]))), O = z(() => a.value.filter((e) => !_.value.trim() || ne(e).includes(_.value.trim()))), k = z(() => [...s.value].map((e) => o.value[e] ?? I(e))), j = z(() => ({
2199
+ onClose: () => !p.value && r("close")
2200
+ }), E = R(() => [...s.value].filter((e) => !c.value.has(e))), D = R(() => [...c.value].filter((e) => !s.value.has(e))), O = R(() => new Map(i.value.map((e) => [e.employeePositionId, e]))), ee = R(() => a.value.filter((e) => !_.value.trim() || ae(e).includes(_.value.trim()))), A = R(() => [...s.value].map((e) => o.value[e] ?? P(e))), te = R(() => ({
2607
2201
  current: h.value,
2608
2202
  total: g.value,
2609
2203
  pageSize: 50,
2610
2204
  showSizeChanger: !1,
2611
2205
  showQuickJumper: !1,
2612
- onChange: (e) => void N(e)
2206
+ onChange: (e) => void M(e)
2613
2207
  }));
2614
2208
  Z(() => [n.open, n.role?.id], ([e]) => {
2615
- e ? N() : te();
2209
+ e ? M() : ie();
2616
2210
  }, { immediate: !0 }), Z([
2617
2211
  () => n.embedded,
2618
2212
  () => n.drawerContext,
2619
2213
  s,
2620
- w,
2621
2214
  E,
2622
- d,
2215
+ D,
2216
+ p,
2623
2217
  u
2624
- ], ee, { immediate: !0 }), ye(() => n.drawerContext?.setOperation(void 0));
2625
- function ee() {
2218
+ ], j, { immediate: !0 }), ve(() => n.drawerContext?.setOperation(void 0));
2219
+ function j() {
2626
2220
  let e = n.drawerContext;
2627
- n.embedded && e && (e.setSubtitle(`角色:${n.role?.title ?? n.role?.id ?? "角色"} · ${oe(n.role)}`), e.setOperation({
2628
- summary: `已选 ${s.value.size} 个任职${w.value.length || E.value.length ? ` · 新增 ${w.value.length} · 移除 ${E.value.length}` : ""}`,
2221
+ n.embedded && e && (e.setSubtitle(`角色:${n.role?.title ?? n.role?.id ?? "角色"} · ${se(n.role)}`), e.setOperation({
2222
+ summary: `已选 ${s.value.size} 个任职${E.value.length || D.value.length ? ` · 新增 ${E.value.length} · 移除 ${D.value.length}` : ""}`,
2629
2223
  actions: [{
2630
2224
  key: "cancel-employment-role-grants",
2631
2225
  label: "取消",
2632
- disabled: d.value,
2226
+ disabled: p.value,
2633
2227
  run: () => r("close")
2634
2228
  }, {
2635
2229
  key: "save-employment-role-grants",
2636
2230
  label: "确定",
2637
2231
  emphasis: "primary",
2638
- disabled: u.value || w.value.length === 0 && E.value.length === 0,
2639
- loading: d.value,
2640
- run: () => void P()
2232
+ disabled: u.value || E.value.length === 0 && D.value.length === 0,
2233
+ loading: p.value,
2234
+ run: () => void re()
2641
2235
  }]
2642
2236
  }));
2643
2237
  }
2644
- async function N(e = 1) {
2645
- let t = v.value;
2238
+ async function M(e = 1) {
2239
+ let t = y.value;
2646
2240
  if (t) {
2647
- u.value = !0, p.value = !1;
2241
+ u.value = !0, m.value = !1;
2648
2242
  try {
2649
- let [n, r] = await Promise.all([y.value.employmentRoleGrants(t), y.value.employmentSelector(t, {
2243
+ let [n, r] = await Promise.all([b.value.employmentRoleGrants(t), b.value.employmentSelector(t, {
2650
2244
  enabledOnly: !0,
2651
2245
  page: {
2652
2246
  pageNum: e,
@@ -2655,10 +2249,10 @@ var Ln = {
2655
2249
  })]);
2656
2250
  i.value = n, c.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), o.value = {
2657
2251
  ...o.value,
2658
- ...F(r.records)
2252
+ ...N(r.records)
2659
2253
  }, l.value ||= (s.value = new Set(c.value), !0), a.value = r.records, h.value = r.pageNum, g.value = r.total;
2660
2254
  } catch (e) {
2661
- p.value = !0, T(e, {
2255
+ m.value = !0, w(e, {
2662
2256
  source: "role-employment-grants",
2663
2257
  phase: "load"
2664
2258
  });
@@ -2667,15 +2261,15 @@ var Ln = {
2667
2261
  }
2668
2262
  }
2669
2263
  }
2670
- async function P() {
2671
- let e = v.value;
2264
+ async function re() {
2265
+ let e = y.value;
2672
2266
  if (e) {
2673
- d.value = !0;
2267
+ p.value = !0;
2674
2268
  try {
2675
- for (let t of w.value) await y.value.grantEmploymentRole(e, t);
2676
- for (let t of E.value) {
2677
- let n = D.value.get(t)?.id;
2678
- n && await y.value.deleteEmploymentRoleGrant(e, n);
2269
+ for (let t of E.value) await b.value.grantEmploymentRole(e, t);
2270
+ for (let t of D.value) {
2271
+ let n = O.value.get(t)?.id;
2272
+ n && await b.value.deleteEmploymentRoleGrant(e, n);
2679
2273
  }
2680
2274
  await f({
2681
2275
  success: !0,
@@ -2685,19 +2279,19 @@ var Ln = {
2685
2279
  phase: "action"
2686
2280
  }), r("saved"), r("close");
2687
2281
  } catch (e) {
2688
- T(e, {
2282
+ w(e, {
2689
2283
  source: "role-employment-grants",
2690
2284
  phase: "action"
2691
2285
  });
2692
2286
  } finally {
2693
- d.value = !1;
2287
+ p.value = !1;
2694
2288
  }
2695
2289
  }
2696
2290
  }
2697
- function te() {
2698
- i.value = [], a.value = [], o.value = {}, s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), l.value = !1, _.value = "", h.value = 1, g.value = 0, p.value = !1;
2291
+ function ie() {
2292
+ i.value = [], a.value = [], o.value = {}, s.value = /* @__PURE__ */ new Set(), c.value = /* @__PURE__ */ new Set(), l.value = !1, _.value = "", h.value = 1, g.value = 0, m.value = !1;
2699
2293
  }
2700
- function ne(e) {
2294
+ function ae(e) {
2701
2295
  return [
2702
2296
  e.employeeTitle,
2703
2297
  e.employeeNo,
@@ -2706,59 +2300,59 @@ var Ln = {
2706
2300
  e.positionTitle
2707
2301
  ].filter(Boolean).join(" ");
2708
2302
  }
2709
- function ie(e) {
2303
+ function oe(e) {
2710
2304
  let t = new Set(s.value);
2711
2305
  t.delete(e), s.value = t;
2712
2306
  }
2713
- function F(e) {
2307
+ function N(e) {
2714
2308
  let t = {};
2715
2309
  for (let n of e) n.id && (t[n.id] = n);
2716
2310
  return t;
2717
2311
  }
2718
- function I(e) {
2312
+ function P(e) {
2719
2313
  return {
2720
2314
  id: e,
2721
2315
  positionId: e
2722
2316
  };
2723
2317
  }
2724
- function ae(e) {
2318
+ function F(e) {
2725
2319
  let t = e.positionTitle ?? e.positionId ?? e.id;
2726
2320
  return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
2727
2321
  }
2728
- function L(e) {
2322
+ function I(e) {
2729
2323
  return [
2730
2324
  e.employeeNo,
2731
2325
  e.organizationTitle ?? e.organizationId,
2732
2326
  e.departmentTitle ?? e.departmentId
2733
2327
  ].filter(Boolean).join(" / ") || e.id;
2734
2328
  }
2735
- function oe(e) {
2329
+ function se(e) {
2736
2330
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
2737
2331
  }
2738
- return (t, n) => (q(), B(we(x.value), he(C.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), fe({
2739
- default: Q(() => [u.value ? (q(), B(X(re), {
2332
+ return (t, n) => (q(), z(Ce(C.value), me(T.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), fe({
2333
+ default: Q(() => [u.value ? (q(), z(X(d), {
2740
2334
  key: 0,
2741
2335
  tip: "加载任职"
2742
- })) : p.value ? (q(), H("div", Yn, [G(X(m), {
2336
+ })) : m.value ? (q(), V("div", ln, [W(X(v), {
2743
2337
  title: "任职加载失败",
2744
2338
  message: "无法加载任职授权"
2745
- }), G(X(S), { onClick: n[1] ||= (e) => N() }, {
2746
- default: Q(() => [...n[6] ||= [W("重试", -1)]]),
2339
+ }), W(X(S), { onClick: n[1] ||= (e) => M() }, {
2340
+ default: Q(() => [...n[6] ||= [U("重试", -1)]]),
2747
2341
  _: 1
2748
- })])) : (q(), H("section", Xn, [
2749
- G(X(A), {
2342
+ })])) : (q(), V("section", un, [
2343
+ W(X(k), {
2750
2344
  value: _.value,
2751
2345
  "onUpdate:value": n[2] ||= (e) => _.value = e,
2752
2346
  "allow-clear": "",
2753
2347
  placeholder: "筛选职员、工号、机构、部门或岗位"
2754
2348
  }, null, 8, ["value"]),
2755
- G(Jn, {
2349
+ W(cn, {
2756
2350
  "selected-ids": s.value,
2757
2351
  "onUpdate:selectedIds": n[3] ||= (e) => s.value = e,
2758
- rows: O.value,
2352
+ rows: ee.value,
2759
2353
  selectable: "",
2760
- disabled: d.value,
2761
- pagination: j.value,
2354
+ disabled: p.value,
2355
+ pagination: te.value,
2762
2356
  "fill-height": ""
2763
2357
  }, null, 8, [
2764
2358
  "selected-ids",
@@ -2766,41 +2360,41 @@ var Ln = {
2766
2360
  "disabled",
2767
2361
  "pagination"
2768
2362
  ]),
2769
- k.value.length > 0 ? (q(), H("section", Zn, [U("div", Qn, [n[7] ||= U("strong", null, "已选任职", -1), U("span", null, Y(k.value.length) + " 个", 1)]), U("div", $n, [(q(!0), H(R, null, Se(k.value, (e) => (q(), H("button", {
2363
+ A.value.length > 0 ? (q(), V("section", dn, [H("div", fn, [n[7] ||= H("strong", null, "已选任职", -1), H("span", null, Y(A.value.length) + " 个", 1)]), H("div", pn, [(q(!0), V(L, null, xe(A.value, (e) => (q(), V("button", {
2770
2364
  key: e.id,
2771
2365
  type: "button",
2772
- disabled: d.value,
2773
- onClick: (t) => ie(e.id)
2774
- }, [U("span", null, Y(ae(e)), 1), U("small", null, Y(L(e)), 1)], 8, er))), 128))])])) : V("v-if", !0)
2366
+ disabled: p.value,
2367
+ onClick: (t) => oe(e.id)
2368
+ }, [H("span", null, Y(F(e)), 1), H("small", null, Y(I(e)), 1)], 8, mn))), 128))])])) : B("v-if", !0)
2775
2369
  ]))]),
2776
2370
  _: 2
2777
2371
  }, [e.embedded ? void 0 : {
2778
2372
  name: "operation",
2779
- fn: Q(() => [G(X(S), {
2780
- disabled: d.value,
2373
+ fn: Q(() => [W(X(S), {
2374
+ disabled: p.value,
2781
2375
  onClick: n[0] ||= (e) => r("close")
2782
2376
  }, {
2783
- default: Q(() => [...n[4] ||= [W("取消", -1)]]),
2377
+ default: Q(() => [...n[4] ||= [U("取消", -1)]]),
2784
2378
  _: 1
2785
- }, 8, ["disabled"]), G(X(S), {
2379
+ }, 8, ["disabled"]), W(X(S), {
2786
2380
  type: "primary",
2787
- loading: d.value,
2788
- disabled: u.value || w.value.length === 0 && E.value.length === 0,
2789
- onClick: P
2381
+ loading: p.value,
2382
+ disabled: u.value || E.value.length === 0 && D.value.length === 0,
2383
+ onClick: re
2790
2384
  }, {
2791
- default: Q(() => [...n[5] ||= [W(" 确定 ", -1)]]),
2385
+ default: Q(() => [...n[5] ||= [U(" 确定 ", -1)]]),
2792
2386
  _: 1
2793
2387
  }, 8, ["loading", "disabled"])]),
2794
2388
  key: "0"
2795
2389
  }]), 1040, ["class"]));
2796
2390
  }
2797
- }), [["__scopeId", "data-v-06db3659"]]), nr = /* @__PURE__ */ K({
2391
+ }), [["__scopeId", "data-v-06db3659"]]), gn = /* @__PURE__ */ K({
2798
2392
  name: "RoleEmploymentGrantDrawerSurface",
2799
2393
  __name: "RoleEmploymentGrantDrawerSurface",
2800
2394
  props: { context: {} },
2801
2395
  setup(e) {
2802
- let t = e, n = z(() => t.context.module), r = z(() => t.context.record);
2803
- return (e, i) => (q(), B(tr, {
2396
+ let t = e, n = R(() => t.context.module), r = R(() => t.context.record);
2397
+ return (e, i) => (q(), z(hn, {
2804
2398
  open: "",
2805
2399
  embedded: "",
2806
2400
  "drawer-context": t.context,
@@ -2816,7 +2410,7 @@ var Ln = {
2816
2410
  "onSaved"
2817
2411
  ]));
2818
2412
  }
2819
- }), rr = /* @__PURE__ */ K({
2413
+ }), _n = /* @__PURE__ */ K({
2820
2414
  name: "WorkspaceViewDrawer",
2821
2415
  __name: "WorkspaceViewDrawer",
2822
2416
  props: {
@@ -2834,8 +2428,8 @@ var Ln = {
2834
2428
  },
2835
2429
  emits: ["close"],
2836
2430
  setup(e, { emit: t }) {
2837
- let n = e, r = t, i = z(() => n.profile === "wide-work" ? "wide" : "standard");
2838
- return (t, n) => (q(), B(X(M), {
2431
+ let n = e, r = t, i = R(() => n.profile === "wide-work" ? "wide" : "standard");
2432
+ return (t, n) => (q(), z(X(ne), {
2839
2433
  open: e.open,
2840
2434
  title: e.title,
2841
2435
  "render-mode": e.container ? "inline" : "portal",
@@ -2846,11 +2440,11 @@ var Ln = {
2846
2440
  "before-close": e.beforeClose,
2847
2441
  onClose: n[0] ||= (e) => r("close")
2848
2442
  }, fe({
2849
- default: Q(() => [Ce(t.$slots, "default")]),
2443
+ default: Q(() => [Se(t.$slots, "default")]),
2850
2444
  _: 2
2851
2445
  }, [t.$slots.operation ? {
2852
2446
  name: "operation",
2853
- fn: Q(() => [Ce(t.$slots, "operation")]),
2447
+ fn: Q(() => [Se(t.$slots, "operation")]),
2854
2448
  key: "0"
2855
2449
  } : void 0]), 1032, [
2856
2450
  "open",
@@ -2866,21 +2460,21 @@ var Ln = {
2866
2460
  });
2867
2461
  //#endregion
2868
2462
  //#region src/platform-admin-runtime/useWorkspaceViewPromotion.ts
2869
- function ir(e) {
2463
+ function vn(e) {
2870
2464
  return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
2871
2465
  }
2872
- function ar(e) {
2873
- let t = le();
2874
- return z(() => {
2875
- let n = Te(e.input);
2876
- if (n && ir(Te(e.eligibility)) && t) return {
2466
+ function yn(e) {
2467
+ let t = l();
2468
+ return R(() => {
2469
+ let n = we(e.input);
2470
+ if (n && vn(we(e.eligibility)) && t) return {
2877
2471
  title: "固定为页签",
2878
2472
  promote: async () => {
2879
2473
  if (await e.beforePromote?.(n) === !1) {
2880
2474
  e.onPromotionRejected?.();
2881
2475
  return;
2882
2476
  }
2883
- let r = t.openPage(oe(e.view, n, "tab", Te(e.title)));
2477
+ let r = t.openPage(o(e.view, n, "tab", we(e.title)));
2884
2478
  e.onPromoted?.(r);
2885
2479
  }
2886
2480
  };
@@ -2888,53 +2482,53 @@ function ar(e) {
2888
2482
  }
2889
2483
  //#endregion
2890
2484
  //#region src/platform-admin-runtime/workspaceViewSessions.ts
2891
- var or = /* @__PURE__ */ new Map(), sr = /* @__PURE__ */ new Map();
2892
- function cr(e, t) {
2893
- return `${e.type}:${fr(t)}`;
2894
- }
2895
- async function lr(e, t, n) {
2896
- let r = cr(e, t), i = sr.get(r), a = i && [...i].at(-1);
2897
- return a ? await a(pr(n)) ? "accepted" : "rejected" : (or.set(r, pr(n)), "accepted");
2898
- }
2899
- function ur(e, t, n) {
2900
- let r = cr(e, t), i = sr.get(r) ?? /* @__PURE__ */ new Set();
2901
- return i.add(n), sr.set(r, i), () => {
2902
- i.delete(n), i.size === 0 && sr.delete(r);
2485
+ var bn = /* @__PURE__ */ new Map(), xn = /* @__PURE__ */ new Map();
2486
+ function Sn(e, t) {
2487
+ return `${e.type}:${En(t)}`;
2488
+ }
2489
+ async function Cn(e, t, n) {
2490
+ let r = Sn(e, t), i = xn.get(r), a = i && [...i].at(-1);
2491
+ return a ? await a(Dn(n)) ? "accepted" : "rejected" : (bn.set(r, Dn(n)), "accepted");
2492
+ }
2493
+ function wn(e, t, n) {
2494
+ let r = Sn(e, t), i = xn.get(r) ?? /* @__PURE__ */ new Set();
2495
+ return i.add(n), xn.set(r, i), () => {
2496
+ i.delete(n), i.size === 0 && xn.delete(r);
2903
2497
  };
2904
2498
  }
2905
- function dr(e, t) {
2906
- let n = cr(e, t), r = or.get(n);
2907
- return or.delete(n), r;
2499
+ function Tn(e, t) {
2500
+ let n = Sn(e, t), r = bn.get(n);
2501
+ return bn.delete(n), r;
2908
2502
  }
2909
- function fr(e) {
2910
- return Array.isArray(e) ? `[${e.map(fr).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${fr(t)}`).join(",")}}` : JSON.stringify(e);
2503
+ function En(e) {
2504
+ return Array.isArray(e) ? `[${e.map(En).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${En(t)}`).join(",")}}` : JSON.stringify(e);
2911
2505
  }
2912
- function pr(e) {
2506
+ function Dn(e) {
2913
2507
  return JSON.parse(JSON.stringify(e));
2914
2508
  }
2915
2509
  //#endregion
2916
2510
  //#region src/views/roleAuthorizationWorkspaceSession.ts
2917
- function mr(e, t) {
2918
- return lr(Pe, e, t);
2511
+ function On(e, t) {
2512
+ return Cn(ke, e, t);
2919
2513
  }
2920
- function hr(e, t) {
2921
- return ur(Pe, e, t);
2514
+ function kn(e, t) {
2515
+ return wn(ke, e, t);
2922
2516
  }
2923
- function gr(e) {
2924
- return dr(Pe, e);
2517
+ function An(e) {
2518
+ return Tn(ke, e);
2925
2519
  }
2926
2520
  //#endregion
2927
2521
  //#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
2928
- var _r = { class: "panel-title" }, vr = {
2522
+ var jn = { class: "panel-title" }, Mn = {
2929
2523
  key: 0,
2930
2524
  class: "authorization-column-header"
2931
- }, yr = {
2525
+ }, Nn = {
2932
2526
  key: 2,
2933
2527
  class: "data-scope-editor"
2934
- }, br = { key: 0 }, xr = { key: 1 }, Sr = { key: 3 }, Cr = {
2528
+ }, Pn = { key: 0 }, Fn = { key: 1 }, In = { key: 3 }, Ln = {
2935
2529
  key: 4,
2936
2530
  class: "not-applicable"
2937
- }, wr = /*@__PURE__*/ K({
2531
+ }, Rn = /*@__PURE__*/ K({
2938
2532
  name: "RoleAuthorizationView",
2939
2533
  __name: "RoleAuthorizationView",
2940
2534
  props: {
@@ -2946,29 +2540,29 @@ var _r = { class: "panel-title" }, vr = {
2946
2540
  },
2947
2541
  emits: ["close"],
2948
2542
  setup(e, { emit: t }) {
2949
- let n = e, r = t, i = b({ moduleAlias: "iam.role" }), l = n.moduleContext ?? i, u = In(l.http), p = n.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", h = se(), g = n.roleId ? { roleId: n.roleId } : void 0, v = g ? gr(g) : void 0, y = J(), C = J([]), E = J(), D = J(""), O = J([]), k = J(), A = J(), j = J(!1), ee = J(!1), M = J(!1), P = J(), ne = J(), ie = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), I = J(0), ae, L = z(() => y.value?.roleKind === "group"), oe = z(() => y.value?.roleKind === "dataGrant"), le = z(() => y.value?.assignmentType === "employment"), ue = z(() => !!n.drawerContext), de = z(() => y.value?.title ?? p ?? "角色"), pe = z(() => `授权:${de.value}`), K = z(() => he.value ? `动作授权 - ${he.value.title}` : `动作授权 - ${de.value}`), he = z(() => C.value.find((e) => e.moduleAlias === E.value)), ge = z(() => {
2950
- let e = D.value.trim().toLocaleLowerCase(), t = new Set(e ? C.value.filter((t) => [
2543
+ let n = e, r = t, i = _({ moduleAlias: "iam.role" }), a = n.moduleContext ?? i, o = Yt(a.http), l = n.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", u = s(), p = n.roleId ? { roleId: n.roleId } : void 0, m = p ? An(p) : void 0, h = J(), x = J([]), T = J(), D = J(""), O = J([]), k = J(), A = J(), te = J(!1), ne = J(!1), j = J(!1), oe = J(), N = J(), P = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), I = J(0), se, ce = R(() => h.value?.roleKind === "group"), le = R(() => h.value?.roleKind === "dataGrant"), ue = R(() => h.value?.assignmentType === "employment"), de = R(() => !!n.drawerContext), G = R(() => h.value?.title ?? l ?? "角色"), K = R(() => `授权:${G.value}`), me = R(() => he.value ? `动作授权 - ${he.value.title}` : `动作授权 - ${G.value}`), he = R(() => x.value.find((e) => e.moduleAlias === T.value)), be = R(() => {
2544
+ let e = D.value.trim().toLocaleLowerCase(), t = new Set(e ? x.value.filter((t) => [
2951
2545
  t.title,
2952
2546
  t.moduleAlias,
2953
2547
  t.applicationAlias
2954
- ].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : C.value.map((e) => e.moduleAlias)), n = new Map(C.value.map((e) => [e.moduleAlias, e]));
2548
+ ].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : x.value.map((e) => e.moduleAlias)), n = new Map(x.value.map((e) => [e.moduleAlias, e]));
2955
2549
  for (let e of [...t]) {
2956
2550
  let r = n.get(e)?.parentId;
2957
2551
  for (; r && n.has(r) && !t.has(r);) t.add(r), r = n.get(r)?.parentId;
2958
2552
  }
2959
- return C.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
2553
+ return x.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
2960
2554
  id: e.moduleAlias,
2961
2555
  parentId: e.parentId,
2962
2556
  title: e.title,
2963
2557
  secondary: e.applicationAlias
2964
2558
  }));
2965
- }), xe = z(() => (A.value?.options ?? []).map((e) => ({
2559
+ }), xe = R(() => (A.value?.options ?? []).map((e) => ({
2966
2560
  value: e.code,
2967
2561
  label: e.title
2968
- }))), Se = z(() => (A.value?.referenceDependencies ?? []).map((e) => ({
2562
+ }))), Se = R(() => (A.value?.referenceDependencies ?? []).map((e) => ({
2969
2563
  value: e.referenceFieldId,
2970
2564
  label: `${e.title} → ${e.targetModuleTitle}`
2971
- }))), Ce = z(() => new Map((A.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = z(() => le.value && O.value.some((e) => !!e.dataAuth)), Ee = z(() => [
2565
+ }))), we = R(() => new Map((A.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = R(() => ue.value && O.value.some((e) => !!e.dataAuth)), Ee = R(() => [
2972
2566
  {
2973
2567
  key: "title",
2974
2568
  title: "动作",
@@ -3002,35 +2596,35 @@ var _r = { class: "panel-title" }, vr = {
3002
2596
  title: "数据范围",
3003
2597
  width: 160
3004
2598
  }
3005
- ], Oe = z(() => O.value), ke = z(() => k.value?.actions ?? []), Ae = z(() => n.drawer === !0 || !!g && h?.presentation === "drawer"), je = z(() => !!g), Me = z(() => je.value && !ue.value), Ne = z(() => ue.value ? "div" : Ae.value ? rr : je.value ? d : "div"), Fe = z(() => Ae.value ? {
2599
+ ], Oe = R(() => O.value), Ae = R(() => k.value?.actions ?? []), je = R(() => n.drawer === !0 || !!p && u?.presentation === "drawer"), Me = R(() => !!p), Ne = R(() => Me.value && !de.value), Pe = R(() => de.value ? "div" : je.value ? _n : Me.value ? g : "div"), Fe = R(() => je.value ? {
3006
2600
  open: !0,
3007
- title: pe.value,
2601
+ title: K.value,
3008
2602
  container: n.container ?? null,
3009
- profile: Pe.drawerProfile,
2603
+ profile: ke.drawerProfile,
3010
2604
  promotion: Ve.value,
3011
2605
  dismissal: "guarded",
3012
2606
  beforeClose: it,
3013
2607
  onClose: at
3014
- } : Me.value ? { title: pe.value } : {}), Ie = z(() => {
2608
+ } : Ne.value ? { title: K.value } : {}), Ie = R(() => {
3015
2609
  let e = k.value;
3016
- return !e || ne.value === void 0 ? !1 : JSON.stringify(e.actions) !== ne.value;
3017
- }), Le = z(() => I.value >= 0 && [...ie.entries()].some(([e, t]) => F.get(e) !== JSON.stringify(t))), $ = z(() => Ie.value || Le.value);
3018
- ce("角色授权", () => $.value, () => M.value);
3019
- let Re = z(() => O.value.length > 0 && O.value.every((e) => e.granted)), ze = z(() => O.value.some((e) => e.granted) && !Re.value), Be = z(() => {
2610
+ return !e || N.value === void 0 ? !1 : JSON.stringify(e.actions) !== N.value;
2611
+ }), Le = R(() => I.value >= 0 && [...P.entries()].some(([e, t]) => F.get(e) !== JSON.stringify(t))), $ = R(() => Ie.value || Le.value);
2612
+ c("角色授权", () => $.value, () => j.value);
2613
+ let Re = R(() => O.value.length > 0 && O.value.every((e) => e.granted)), ze = R(() => O.value.some((e) => e.granted) && !Re.value), Be = R(() => {
3020
2614
  let e = he.value?.title ?? "未选择模块", t = O.value.filter((e) => e.granted).length, n = $.value ? "有未确认修改" : "未修改";
3021
2615
  return `当前模块:${e} · 已授权 ${t}/${O.value.length} 项 · ${n}`;
3022
- }), Ve = ar({
3023
- view: Pe,
3024
- input: () => g,
3025
- title: pe,
2616
+ }), Ve = yn({
2617
+ view: ke,
2618
+ input: () => p,
2619
+ title: K,
3026
2620
  eligibility: () => ({
3027
- hasStableIdentity: !!(p && y.value),
3028
- busy: M.value
2621
+ hasStableIdentity: !!(l && h.value),
2622
+ busy: j.value
3029
2623
  }),
3030
- beforePromote: (e) => mr(e, {
3031
- selectedModuleAlias: E.value,
2624
+ beforePromote: (e) => On(e, {
2625
+ selectedModuleAlias: T.value,
3032
2626
  dataGrantMatrix: k.value,
3033
- actionDrafts: [...ie.entries()].map(([e, t]) => ({
2627
+ actionDrafts: [...P.entries()].map(([e, t]) => ({
3034
2628
  moduleAlias: e,
3035
2629
  actions: t
3036
2630
  })),
@@ -3040,87 +2634,87 @@ var _r = { class: "panel-title" }, vr = {
3040
2634
  }))
3041
2635
  }).then((e) => e === "accepted"),
3042
2636
  onPromoted: ot,
3043
- onPromotionRejected: () => w("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
2637
+ onPromotionRejected: () => C("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
3044
2638
  source: "role-authorization",
3045
2639
  phase: "validation"
3046
2640
  })
3047
2641
  });
3048
- be(() => {
3049
- g && !Ae.value && (ae = hr(g, st)), Ue();
3050
- }), Z(pe, (e) => {
3051
- je.value && h?.setTitle(e);
3052
- }, { immediate: !0 }), Z(E, () => void We()), Z([
3053
- de,
2642
+ ye(() => {
2643
+ p && !je.value && (se = kn(p, st)), Ue();
2644
+ }), Z(K, (e) => {
2645
+ Me.value && u?.setTitle(e);
2646
+ }, { immediate: !0 }), Z(T, () => void We()), Z([
2647
+ G,
3054
2648
  Be,
3055
2649
  $,
3056
- M,
3057
- L,
3058
- oe
3059
- ], He, { immediate: !0 }), be(() => window.addEventListener("beforeunload", lt)), ye(() => {
3060
- ae?.(), n.drawerContext?.setOperation(void 0), n.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", lt);
2650
+ j,
2651
+ ce,
2652
+ le
2653
+ ], He, { immediate: !0 }), ye(() => window.addEventListener("beforeunload", lt)), ve(() => {
2654
+ se?.(), n.drawerContext?.setOperation(void 0), n.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", lt);
3061
2655
  });
3062
2656
  function He() {
3063
2657
  let e = n.drawerContext;
3064
2658
  if (e) {
3065
- if (e.setSubtitle(`${de.value} · ${ut(y.value)}`), L.value) {
2659
+ if (e.setSubtitle(`${G.value} · ${ut(h.value)}`), ce.value) {
3066
2660
  e.setOperation(void 0);
3067
2661
  return;
3068
2662
  }
3069
2663
  e.setOperation({
3070
- summary: oe.value ? $.value ? "有未确认修改" : "未修改" : Be.value,
2664
+ summary: le.value ? $.value ? "有未确认修改" : "未修改" : Be.value,
3071
2665
  actions: [{
3072
2666
  key: "confirm-role-authorization",
3073
2667
  label: "确认",
3074
2668
  emphasis: "primary",
3075
- disabled: M.value || !$.value,
3076
- loading: M.value,
2669
+ disabled: j.value || !$.value,
2670
+ loading: j.value,
3077
2671
  run: () => void rt()
3078
2672
  }]
3079
2673
  });
3080
2674
  }
3081
2675
  }
3082
2676
  async function Ue() {
3083
- if (!p) {
3084
- P.value = "缺少角色标识,无法打开授权页。";
2677
+ if (!l) {
2678
+ oe.value = "缺少角色标识,无法打开授权页。";
3085
2679
  return;
3086
2680
  }
3087
- j.value = !0, P.value = void 0;
2681
+ te.value = !0, oe.value = void 0;
3088
2682
  try {
3089
- if (y.value = await l.crud.view(p), y.value.roleKind === "group") return;
3090
- if (y.value.roleKind === "dataGrant") {
3091
- let [e, t] = await Promise.all([u.dataGrantActionMatrix(p), u.dataScopePolicyCatalog(p)]);
3092
- k.value = v?.dataGrantMatrix ?? e, A.value = t, ne.value = JSON.stringify(e.actions);
2683
+ if (h.value = await a.crud.view(l), h.value.roleKind === "group") return;
2684
+ if (h.value.roleKind === "dataGrant") {
2685
+ let [e, t] = await Promise.all([o.dataGrantActionMatrix(l), o.dataScopePolicyCatalog(l)]);
2686
+ k.value = m?.dataGrantMatrix ?? e, A.value = t, N.value = JSON.stringify(e.actions);
3093
2687
  return;
3094
2688
  }
3095
- C.value = (await u.authorizationModules(p)).records, E.value = v?.selectedModuleAlias ?? C.value[0]?.moduleAlias;
2689
+ x.value = (await o.authorizationModules(l)).records, T.value = m?.selectedModuleAlias ?? x.value[0]?.moduleAlias;
3096
2690
  } catch (e) {
3097
- P.value = "授权信息加载失败,请重试。", T(e, {
2691
+ oe.value = "授权信息加载失败,请重试。", w(e, {
3098
2692
  source: "role-authorization",
3099
2693
  phase: "load"
3100
2694
  });
3101
2695
  } finally {
3102
- j.value = !1;
2696
+ te.value = !1;
3103
2697
  }
3104
2698
  }
3105
2699
  async function We() {
3106
- let e = E.value;
3107
- if (!(!e || oe.value || L.value)) {
3108
- ee.value = !0;
2700
+ let e = T.value;
2701
+ if (!(!e || le.value || ce.value)) {
2702
+ ne.value = !0;
3109
2703
  try {
3110
- let [t, n] = await Promise.all([u.permissionMatrix(p, [e]), u.dataScopePolicyCatalog(p, e)]), r = (t.modules[0]?.actions ?? []).map(et), i = v?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = ie.get(e) ?? i;
3111
- O.value = a ?? r, ie.has(e) || (ie.set(e, O.value), F.set(e, v?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), I.value += 1, A.value = n;
2704
+ let [t, n] = await Promise.all([o.permissionMatrix(l, [e]), o.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(et), i = m?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = P.get(e) ?? i;
2705
+ O.value = a ?? r, P.has(e) || (P.set(e, O.value), F.set(e, m?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), I.value += 1, A.value = n;
3112
2706
  } catch (e) {
3113
- T(e, {
2707
+ w(e, {
3114
2708
  source: "role-authorization",
3115
2709
  phase: "load"
3116
2710
  });
3117
2711
  } finally {
3118
- ee.value = !1;
2712
+ ne.value = !1;
3119
2713
  }
3120
2714
  }
3121
2715
  }
3122
2716
  function Ge(e, t) {
3123
- t && e.dataAuth && le.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, I.value += 1;
2717
+ t && e.dataAuth && ue.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, I.value += 1;
3124
2718
  }
3125
2719
  function Ke(e) {
3126
2720
  O.value.forEach((t) => Ge(t, e));
@@ -3133,11 +2727,11 @@ var _r = { class: "panel-title" }, vr = {
3133
2727
  e.referenceFieldId = void 0, e.referenceActionCode = void 0, I.value += 1;
3134
2728
  }
3135
2729
  function Je(e, t) {
3136
- let n = Ce.value.get(String(t || ""));
2730
+ let n = we.value.get(String(t || ""));
3137
2731
  e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, I.value += 1;
3138
2732
  }
3139
2733
  function Ye(e) {
3140
- return Ce.value.get(String(e || ""));
2734
+ return we.value.get(String(e || ""));
3141
2735
  }
3142
2736
  function Xe(e) {
3143
2737
  return typeof e == "string" || typeof e == "number" ? e : void 0;
@@ -3146,22 +2740,22 @@ var _r = { class: "panel-title" }, vr = {
3146
2740
  return e.dataScopePolicy ?? "inheritDataGrant";
3147
2741
  }
3148
2742
  function Qe(e) {
3149
- return !!e.dataAuth && le.value;
2743
+ return !!e.dataAuth && ue.value;
3150
2744
  }
3151
2745
  function $e(e, t) {
3152
2746
  return e.key === "dataScopePolicy" && Qe(t);
3153
2747
  }
3154
2748
  function et(e) {
3155
- return le.value && e.dataAuth && e.dataScopePolicy === "none" ? {
2749
+ return ue.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3156
2750
  ...e,
3157
2751
  dataScopePolicy: "inheritDataGrant"
3158
2752
  } : e;
3159
2753
  }
3160
2754
  async function tt() {
3161
2755
  if (k.value) {
3162
- M.value = !0;
2756
+ j.value = !0;
3163
2757
  try {
3164
- let e = await u.replaceDataGrantActions(p, k.value.actions.map((e) => ({
2758
+ let e = await o.replaceDataGrantActions(l, k.value.actions.map((e) => ({
3165
2759
  actionCode: e.actionCode,
3166
2760
  dataScopePolicy: e.dataScopePolicy,
3167
2761
  enabled: e.configured
@@ -3170,27 +2764,27 @@ var _r = { class: "panel-title" }, vr = {
3170
2764
  source: "role-authorization",
3171
2765
  phase: "action",
3172
2766
  fallbackMessage: "数据权限模板已保存"
3173
- }), ne.value = JSON.stringify(k.value.actions);
2767
+ }), N.value = JSON.stringify(k.value.actions);
3174
2768
  } catch (e) {
3175
- T(e, {
2769
+ w(e, {
3176
2770
  source: "role-authorization",
3177
2771
  phase: "action"
3178
2772
  });
3179
2773
  } finally {
3180
- M.value = !1;
2774
+ j.value = !1;
3181
2775
  }
3182
2776
  }
3183
2777
  }
3184
2778
  async function nt() {
3185
- let e = [...ie.entries()].filter(([e, t]) => F.get(e) !== JSON.stringify(t));
2779
+ let e = [...P.entries()].filter(([e, t]) => F.get(e) !== JSON.stringify(t));
3186
2780
  if (e.length) {
3187
- M.value = !0;
2781
+ j.value = !0;
3188
2782
  try {
3189
- let t = await u.replacePermissionMatrix(p, e.flatMap(([e, t]) => t.map((t) => ({
2783
+ let t = await o.replacePermissionMatrix(l, e.flatMap(([e, t]) => t.map((t) => ({
3190
2784
  moduleAlias: e,
3191
2785
  actionCode: t.actionCode,
3192
2786
  granted: !!t.granted,
3193
- dataScopePolicy: t.granted && t.dataAuth && le.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
2787
+ dataScopePolicy: t.granted && t.dataAuth && ue.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3194
2788
  referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
3195
2789
  referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
3196
2790
  }))));
@@ -3200,24 +2794,24 @@ var _r = { class: "panel-title" }, vr = {
3200
2794
  fallbackMessage: "角色授权已保存"
3201
2795
  }), e.forEach(([e, t]) => F.set(e, JSON.stringify(t))), I.value += 1;
3202
2796
  } catch (e) {
3203
- T(e, {
2797
+ w(e, {
3204
2798
  source: "role-authorization",
3205
2799
  phase: "action"
3206
2800
  });
3207
2801
  } finally {
3208
- M.value = !1;
2802
+ j.value = !1;
3209
2803
  }
3210
2804
  }
3211
2805
  }
3212
2806
  async function rt() {
3213
- if (oe.value) {
2807
+ if (le.value) {
3214
2808
  await tt();
3215
2809
  return;
3216
2810
  }
3217
2811
  await nt();
3218
2812
  }
3219
2813
  async function it() {
3220
- return !$.value || s({
2814
+ return !$.value || E({
3221
2815
  title: "放弃未确认的授权配置",
3222
2816
  content: "当前修改尚未确认,关闭后将丢失这些修改。",
3223
2817
  okText: "放弃修改",
@@ -3231,14 +2825,14 @@ var _r = { class: "panel-title" }, vr = {
3231
2825
  ct();
3232
2826
  }
3233
2827
  function st(e) {
3234
- return !$.value && (E.value = e.selectedModuleAlias, k.value = e.dataGrantMatrix, ie.clear(), F.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => ie.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => F.set(e, t)), I.value += 1, !0);
2828
+ return !$.value && (T.value = e.selectedModuleAlias, k.value = e.dataGrantMatrix, P.clear(), F.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => P.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => F.set(e, t)), I.value += 1, !0);
3235
2829
  }
3236
2830
  function ct() {
3237
2831
  if (n.drawer === !0) {
3238
2832
  r("close");
3239
2833
  return;
3240
2834
  }
3241
- h?.dismiss();
2835
+ u?.dismiss();
3242
2836
  }
3243
2837
  function lt(e) {
3244
2838
  $.value && (e.preventDefault(), e.returnValue = "");
@@ -3246,54 +2840,54 @@ var _r = { class: "panel-title" }, vr = {
3246
2840
  function ut(e) {
3247
2841
  return e?.ownerScopeType === "platform" ? "平台范围" : e?.ownerScopeType === "organization" ? "机构范围" : "租户范围";
3248
2842
  }
3249
- return (e, t) => (q(), B(we(Ne.value), ve(me(Fe.value)), fe({
3250
- default: Q(() => [U("section", { class: _e(["role-authorization-page", { "role-authorization-page--drawer": Ae.value || ue.value }]) }, [j.value ? (q(), B(X(re), {
2843
+ return (e, t) => (q(), z(Ce(Pe.value), _e(pe(Fe.value)), fe({
2844
+ default: Q(() => [H("section", { class: ge(["role-authorization-page", { "role-authorization-page--drawer": je.value || de.value }]) }, [te.value ? (q(), z(X(d), {
3251
2845
  key: 0,
3252
2846
  tip: "加载授权信息"
3253
- })) : P.value ? (q(), B(X(m), {
2847
+ })) : oe.value ? (q(), z(X(v), {
3254
2848
  key: 1,
3255
2849
  title: "授权页加载失败",
3256
- message: P.value
3257
- }, null, 8, ["message"])) : L.value ? (q(), B(X(_), {
2850
+ message: oe.value
2851
+ }, null, 8, ["message"])) : ce.value ? (q(), z(X(re), {
3258
2852
  key: 2,
3259
2853
  title: "角色组不独立授权",
3260
2854
  description: "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。"
3261
- })) : oe.value && k.value ? (q(), B(X(o), {
2855
+ })) : le.value && k.value ? (q(), z(X(y), {
3262
2856
  key: 3,
3263
2857
  class: "data-grant-content",
3264
- title: Me.value ? "数据权限模板" : `数据权限模板 - ${de.value}`,
2858
+ title: Ne.value ? "数据权限模板" : `数据权限模板 - ${G.value}`,
3265
2859
  searchable: !1,
3266
2860
  onRefresh: Ue
3267
2861
  }, {
3268
- default: Q(() => [U("header", _r, [t[4] ||= U("div", null, [U("h3", null, "标准动作的数据范围模板"), U("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), je.value ? V("v-if", !0) : (q(), B(X(S), {
2862
+ default: Q(() => [H("header", jn, [t[4] ||= H("div", null, [H("h3", null, "标准动作的数据范围模板"), H("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), Me.value ? B("v-if", !0) : (q(), z(X(S), {
3269
2863
  key: 0,
3270
2864
  type: "primary",
3271
2865
  disabled: !$.value,
3272
- loading: M.value,
2866
+ loading: j.value,
3273
2867
  onClick: rt
3274
2868
  }, {
3275
- default: Q(() => [...t[3] ||= [W(" 确认 ", -1)]]),
2869
+ default: Q(() => [...t[3] ||= [U(" 确认 ", -1)]]),
3276
2870
  _: 1
3277
- }, 8, ["disabled", "loading"]))]), G(X(a), {
2871
+ }, 8, ["disabled", "loading"]))]), W(X(M), {
3278
2872
  columns: De,
3279
- rows: ke.value,
2873
+ rows: Ae.value,
3280
2874
  "row-key": "actionCode",
3281
2875
  "horizontal-scroll": ""
3282
2876
  }, {
3283
- cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(t.title || t.actionCode), 1), U("small", null, Y(t.actionCode), 1)], 64)) : e.key === "configured" ? (q(), B(X(c), {
2877
+ cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), V(L, { key: 0 }, [H("strong", null, Y(t.title || t.actionCode), 1), H("small", null, Y(t.actionCode), 1)], 64)) : e.key === "configured" ? (q(), z(X(ee), {
3284
2878
  key: 1,
3285
2879
  checked: !!t.configured,
3286
- disabled: M.value,
2880
+ disabled: j.value,
3287
2881
  onChange: (e) => t.configured = e
3288
2882
  }, null, 8, [
3289
2883
  "checked",
3290
2884
  "disabled",
3291
2885
  "onChange"
3292
- ])) : (q(), B(X(N), {
2886
+ ])) : (q(), z(X(ae), {
3293
2887
  key: 2,
3294
2888
  value: t.dataScopePolicy,
3295
2889
  options: xe.value,
3296
- disabled: !t.configured || M.value,
2890
+ disabled: !t.configured || j.value,
3297
2891
  placeholder: "请选择数据范围",
3298
2892
  "allow-clear": !1,
3299
2893
  "onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
@@ -3306,10 +2900,10 @@ var _r = { class: "panel-title" }, vr = {
3306
2900
  _: 1
3307
2901
  }, 8, ["rows"])]),
3308
2902
  _: 1
3309
- }, 8, ["title"])) : (q(), H("section", {
2903
+ }, 8, ["title"])) : (q(), V("section", {
3310
2904
  key: 4,
3311
- class: _e(["authorization-layout", { "authorization-layout--compact-actions": !Te.value }])
3312
- }, [G(X(o), {
2905
+ class: ge(["authorization-layout", { "authorization-layout--compact-actions": !Te.value }])
2906
+ }, [W(X(y), {
3313
2907
  "search-keyword": D.value,
3314
2908
  "onUpdate:searchKeyword": t[1] ||= (e) => D.value = e,
3315
2909
  class: "module-panel",
@@ -3318,21 +2912,21 @@ var _r = { class: "panel-title" }, vr = {
3318
2912
  "search-placeholder": "搜索模块名称或别名",
3319
2913
  onRefresh: Ue
3320
2914
  }, {
3321
- default: Q(() => [G(X(te), {
3322
- records: ge.value,
3323
- "selected-id": E.value,
3324
- onSelect: t[0] ||= (e) => E.value = e.id
2915
+ default: Q(() => [W(X(ie), {
2916
+ records: be.value,
2917
+ "selected-id": T.value,
2918
+ onSelect: t[0] ||= (e) => T.value = e.id
3325
2919
  }, null, 8, ["records", "selected-id"])]),
3326
2920
  _: 1
3327
- }, 8, ["search-keyword"]), G(X(o), {
2921
+ }, 8, ["search-keyword"]), W(X(y), {
3328
2922
  class: "action-panel",
3329
- title: K.value,
2923
+ title: me.value,
3330
2924
  searchable: !1
3331
2925
  }, fe({
3332
- default: Q(() => [ee.value ? (q(), B(X(re), {
2926
+ default: Q(() => [ne.value ? (q(), z(X(d), {
3333
2927
  key: 0,
3334
2928
  tip: "加载模块动作"
3335
- })) : E.value ? (q(), B(X(a), {
2929
+ })) : T.value ? (q(), z(X(M), {
3336
2930
  key: 2,
3337
2931
  columns: Ee.value,
3338
2932
  rows: Oe.value,
@@ -3340,30 +2934,30 @@ var _r = { class: "panel-title" }, vr = {
3340
2934
  "fill-height": "",
3341
2935
  "horizontal-scroll": ""
3342
2936
  }, {
3343
- header: Q(({ column: e }) => [e.key === "granted" ? (q(), H("span", vr, [G(X(x), {
2937
+ header: Q(({ column: e }) => [e.key === "granted" ? (q(), V("span", Mn, [W(X(b), {
3344
2938
  checked: Re.value,
3345
2939
  indeterminate: ze.value,
3346
- disabled: M.value || !O.value.length,
2940
+ disabled: j.value || !O.value.length,
3347
2941
  "aria-label": "全选当前模块动作授权",
3348
2942
  onChange: Ke
3349
2943
  }, null, 8, [
3350
2944
  "checked",
3351
2945
  "indeterminate",
3352
2946
  "disabled"
3353
- ]), t[6] ||= W(" 授权 ", -1)])) : (q(), H(R, { key: 1 }, [W(Y(e.title), 1)], 64))]),
3354
- cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), H(R, { key: 0 }, [U("strong", null, Y(t.title || t.actionCode), 1), U("small", null, Y(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (q(), B(X(x), {
2947
+ ]), t[6] ||= U(" 授权 ", -1)])) : (q(), V(L, { key: 1 }, [U(Y(e.title), 1)], 64))]),
2948
+ cell: Q(({ column: e, record: t }) => [e.key === "title" ? (q(), V(L, { key: 0 }, [H("strong", null, Y(t.title || t.actionCode), 1), H("small", null, Y(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (q(), z(X(b), {
3355
2949
  key: 1,
3356
2950
  checked: !!t.granted,
3357
- disabled: M.value,
2951
+ disabled: j.value,
3358
2952
  onChange: (e) => Ge(t, e)
3359
2953
  }, null, 8, [
3360
2954
  "checked",
3361
2955
  "disabled",
3362
2956
  "onChange"
3363
- ])) : t.dataAuth && le.value && t.granted ? (q(), H("div", yr, [G(X(N), {
2957
+ ])) : t.dataAuth && ue.value && t.granted ? (q(), V("div", Nn, [W(X(ae), {
3364
2958
  value: Ze(t),
3365
2959
  options: xe.value,
3366
- disabled: M.value,
2960
+ disabled: j.value,
3367
2961
  "allow-clear": !1,
3368
2962
  "onUpdate:value": (e) => qe(t, e)
3369
2963
  }, null, 8, [
@@ -3371,10 +2965,10 @@ var _r = { class: "panel-title" }, vr = {
3371
2965
  "options",
3372
2966
  "disabled",
3373
2967
  "onUpdate:value"
3374
- ]), t.dataScopePolicy === "referenceDependency" ? (q(), H(R, { key: 0 }, [G(X(N), {
2968
+ ]), t.dataScopePolicy === "referenceDependency" ? (q(), V(L, { key: 0 }, [W(X(ae), {
3375
2969
  value: Xe(t.referenceFieldId),
3376
2970
  options: Se.value,
3377
- disabled: M.value,
2971
+ disabled: j.value,
3378
2972
  placeholder: "请选择引用字段",
3379
2973
  "allow-clear": !1,
3380
2974
  "onUpdate:value": (e) => Je(t, e)
@@ -3383,48 +2977,48 @@ var _r = { class: "panel-title" }, vr = {
3383
2977
  "options",
3384
2978
  "disabled",
3385
2979
  "onUpdate:value"
3386
- ]), t.referenceFieldId ? (q(), H("small", br, " 依赖目标:" + Y(Ye(t.referenceFieldId)?.targetModuleTitle) + " · " + Y(Ye(t.referenceFieldId)?.referenceActionTitle), 1)) : (q(), H("small", xr, "请先选择引用字段,再开启该动作授权。"))], 64)) : V("v-if", !0)])) : $e(e, t) ? (q(), H("span", Sr, "—")) : (q(), H("span", Cr, "不适用"))]),
2980
+ ]), t.referenceFieldId ? (q(), V("small", Pn, " 依赖目标:" + Y(Ye(t.referenceFieldId)?.targetModuleTitle) + " · " + Y(Ye(t.referenceFieldId)?.referenceActionTitle), 1)) : (q(), V("small", Fn, "请先选择引用字段,再开启该动作授权。"))], 64)) : B("v-if", !0)])) : $e(e, t) ? (q(), V("span", In, "—")) : (q(), V("span", Ln, "不适用"))]),
3387
2981
  _: 1
3388
- }, 8, ["columns", "rows"])) : (q(), B(X(_), {
2982
+ }, 8, ["columns", "rows"])) : (q(), z(X(re), {
3389
2983
  key: 1,
3390
2984
  title: "请选择模块"
3391
2985
  }))]),
3392
2986
  _: 2
3393
- }, [je.value ? void 0 : {
2987
+ }, [Me.value ? void 0 : {
3394
2988
  name: "actions",
3395
- fn: Q(() => [G(X(S), {
2989
+ fn: Q(() => [W(X(S), {
3396
2990
  type: "primary",
3397
2991
  disabled: !$.value,
3398
- loading: M.value,
2992
+ loading: j.value,
3399
2993
  onClick: rt
3400
2994
  }, {
3401
- default: Q(() => [...t[5] ||= [W(" 确认 ", -1)]]),
2995
+ default: Q(() => [...t[5] ||= [U(" 确认 ", -1)]]),
3402
2996
  _: 1
3403
2997
  }, 8, ["disabled", "loading"])]),
3404
2998
  key: "0"
3405
2999
  }]), 1032, ["title"])], 2))], 2)]),
3406
3000
  _: 2
3407
- }, [Me.value && !L.value ? {
3001
+ }, [Ne.value && !ce.value ? {
3408
3002
  name: "operation",
3409
- fn: Q(() => [G(X(S), {
3003
+ fn: Q(() => [W(X(S), {
3410
3004
  type: "primary",
3411
3005
  disabled: !$.value,
3412
- loading: M.value,
3006
+ loading: j.value,
3413
3007
  onClick: rt
3414
3008
  }, {
3415
- default: Q(() => [...t[2] ||= [W(" 确认 ", -1)]]),
3009
+ default: Q(() => [...t[2] ||= [U(" 确认 ", -1)]]),
3416
3010
  _: 1
3417
3011
  }, 8, ["disabled", "loading"])]),
3418
3012
  key: "0"
3419
3013
  } : void 0]), 1040));
3420
3014
  }
3421
- }), Tr = /* @__PURE__ */ e({ default: () => Er }), Er = /*#__PURE__*/ j(wr, [["__scopeId", "data-v-ee79d1ea"]]), Dr = { class: "role-authorization-drawer-surface" }, Or = /*#__PURE__*/ j(/* @__PURE__ */ K({
3015
+ }), zn = /* @__PURE__ */ e({ default: () => Bn }), Bn = /*#__PURE__*/ h(Rn, [["__scopeId", "data-v-ee79d1ea"]]), Vn = { class: "role-authorization-drawer-surface" }, Hn = /*#__PURE__*/ h(/* @__PURE__ */ K({
3422
3016
  name: "RoleAuthorizationDrawerSurface",
3423
3017
  __name: "RoleAuthorizationDrawerSurface",
3424
3018
  props: { context: {} },
3425
3019
  setup(e) {
3426
3020
  let t = e, n = t.context.module;
3427
- return (e, r) => (q(), H("section", Dr, [t.context.record?.id == null ? V("v-if", !0) : (q(), B(Er, {
3021
+ return (e, r) => (q(), V("section", Vn, [t.context.record?.id == null ? B("v-if", !0) : (q(), z(Bn, {
3428
3022
  key: 0,
3429
3023
  "role-id": String(t.context.record.id),
3430
3024
  "module-context": X(n),
@@ -3435,43 +3029,43 @@ var _r = { class: "panel-title" }, vr = {
3435
3029
  "drawer-context"
3436
3030
  ]))]));
3437
3031
  }
3438
- }), [["__scopeId", "data-v-04d29709"]]), kr = {
3032
+ }), [["__scopeId", "data-v-04d29709"]]), Un = {
3439
3033
  key: 0,
3440
3034
  class: "role-group-member-form-field"
3441
- }, Ar = {
3035
+ }, Wn = {
3442
3036
  id: "iam-role-scope-and-actions",
3443
3037
  target: { moduleAlias: "iam.role" },
3444
3038
  navigator: {
3445
3039
  bypassListScope: !0,
3446
3040
  extension: {
3447
3041
  key: "iam-role-scope-tree",
3448
- component: Pn,
3042
+ component: qt,
3449
3043
  selection: { kind: "roleScope" }
3450
3044
  }
3451
3045
  },
3452
3046
  list: { cellComponents: [
3453
3047
  {
3454
3048
  key: "assignmentType",
3455
- cell: Fn
3049
+ cell: Jt
3456
3050
  },
3457
3051
  {
3458
3052
  key: "roleKind",
3459
- cell: Fn
3053
+ cell: Jt
3460
3054
  },
3461
3055
  {
3462
3056
  key: "sharePolicy",
3463
- cell: Fn
3057
+ cell: Jt
3464
3058
  }
3465
3059
  ] },
3466
3060
  form: {
3467
3061
  contributions: [{
3468
3062
  key: "role-group-members",
3469
- component: /* @__PURE__ */ j(/* @__PURE__ */ K({
3063
+ component: /* @__PURE__ */ h(/* @__PURE__ */ K({
3470
3064
  name: "RoleGroupMemberFormField",
3471
3065
  __name: "RoleGroupMemberFormField",
3472
3066
  props: { context: {} },
3473
3067
  setup(e) {
3474
- let t = e, n = J([]), r = J(!1), i = z(() => t.context.draft.roleKind === "group"), a = z(() => d(t.context.draft.memberRoleIds)), o = z(() => String(t.context.draft.id ?? "") || void 0), s = z(() => new Set(n.value.filter((e) => e.roleKind === "dataGrant" && e.id && a.value.includes(e.id)).map((e) => e.id))), c = z(() => n.value.filter((e) => e.id && e.id !== o.value).map((e) => ({
3068
+ let t = e, n = J([]), r = J(!1), i = R(() => t.context.draft.roleKind === "group"), a = R(() => d(t.context.draft.memberRoleIds)), o = R(() => String(t.context.draft.id ?? "") || void 0), s = R(() => new Set(n.value.filter((e) => e.roleKind === "dataGrant" && e.id && a.value.includes(e.id)).map((e) => e.id))), c = R(() => n.value.filter((e) => e.id && e.id !== o.value).map((e) => ({
3475
3069
  label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? "数据授权角色" : "标准角色"}`,
3476
3070
  value: e.id,
3477
3071
  disabled: e.roleKind === "dataGrant" && s.value.size > 0 && !a.value.includes(e.id)
@@ -3530,7 +3124,7 @@ var _r = { class: "panel-title" }, vr = {
3530
3124
  function d(e) {
3531
3125
  return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
3532
3126
  }
3533
- return (t, n) => i.value ? (q(), H("label", kr, [n[0] ||= U("span", null, "成员角色", -1), G(X(N), {
3127
+ return (t, n) => i.value ? (q(), V("label", Un, [n[0] ||= H("span", null, "成员角色", -1), W(X(ae), {
3534
3128
  mode: "multiple",
3535
3129
  value: a.value,
3536
3130
  options: c.value,
@@ -3544,7 +3138,7 @@ var _r = { class: "panel-title" }, vr = {
3544
3138
  "options",
3545
3139
  "loading",
3546
3140
  "disabled"
3547
- ])])) : V("v-if", !0);
3141
+ ])])) : B("v-if", !0);
3548
3142
  }
3549
3143
  }), [["__scopeId", "data-v-665f4381"]]),
3550
3144
  location: {
@@ -3571,7 +3165,7 @@ var _r = { class: "panel-title" }, vr = {
3571
3165
  e({
3572
3166
  title: "绑定用户",
3573
3167
  width: "extraWide",
3574
- component: qn
3168
+ component: sn
3575
3169
  });
3576
3170
  }
3577
3171
  },
@@ -3587,7 +3181,7 @@ var _r = { class: "panel-title" }, vr = {
3587
3181
  e({
3588
3182
  title: "绑定任职",
3589
3183
  width: "extraWide",
3590
- component: nr
3184
+ component: gn
3591
3185
  });
3592
3186
  }
3593
3187
  },
@@ -3603,21 +3197,21 @@ var _r = { class: "panel-title" }, vr = {
3603
3197
  e({
3604
3198
  title: "角色授权",
3605
3199
  width: "wide",
3606
- component: Or
3200
+ component: Hn
3607
3201
  });
3608
3202
  }
3609
3203
  }
3610
3204
  ]
3611
3205
  };
3612
- I("platform-admin-runtime", Fe), ae("platform-admin-runtime", [
3613
- et,
3614
- tt,
3206
+ r("platform-admin-runtime", Ae), n("platform-admin-runtime", [
3207
+ Be,
3208
+ Ve,
3209
+ He,
3210
+ Ye,
3615
3211
  nt,
3616
- lt,
3617
- gt,
3618
- St,
3619
- gn,
3620
- Ar
3212
+ ct,
3213
+ kt,
3214
+ Wn
3621
3215
  ]);
3622
3216
  //#endregion
3623
- export { ke as C, Oe as S, kt as _, dr as a, Et as b, Kn as c, qt as d, Kt as f, Tt as g, At as h, ur as i, Ht as l, Nt as m, Tr as n, ar as o, Gt as p, lr as r, tr as s, Er as t, Ut as u, Ot as v, Ne as x, Dt as y };
3217
+ export { Tn as a, on as c, wn as i, ut as l, zn as n, yn as o, Cn as r, hn as s, Bn as t, Oe as u };