@ximatai/muyun-web-app 0.26.28 → 0.26.31

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 (57) hide show
  1. package/dist/{BusinessActivityLogView-DlNB97pu.js → BusinessActivityLogView-Dw_SjtBi.js} +2 -2
  2. package/dist/BusinessLogListDrawer-Bkws0k6G.js +868 -0
  3. package/dist/{CodeConfigurationView-91B9dHjD.js → CodeConfigurationView-D-S2nX4C.js} +703 -703
  4. package/dist/{ConfigurationTranslationView-ClovkYJt.js → ConfigurationTranslationView-CzLoZCo5.js} +21 -21
  5. package/dist/{LoginAuditLogView-Blg9giRX.js → LoginAuditLogView-DxAlmQ9Q.js} +2 -2
  6. package/dist/ModuleActionManagementView-CfsGwDOn.js +780 -0
  7. package/dist/{ModuleGovernanceView-BNlRHqSj.js → ModuleGovernanceView-Bt2UhO-A.js} +2352 -2352
  8. package/dist/{RequestErrorLogView-CGczIKQy.js → RequestErrorLogView--g3Uwvzx.js} +2 -2
  9. package/dist/RoleDetailWorkspaceView-Bv21G3CF.js +1435 -0
  10. package/dist/{RuntimeLogView-DF-1k-9y.js → RuntimeLogView-CM47CKiD.js} +38 -38
  11. package/dist/WorkflowAdministrationView-CYq7bXS5.js +650 -0
  12. package/dist/{WorkflowConfigurationView-BqSfYua2.js → WorkflowConfigurationView-D1ve8wHF.js} +189 -189
  13. package/dist/WorkflowWorkbenchView-CJXy2iRP.js +759 -0
  14. package/dist/{codeConfiguration-BRxveKen.js → codeConfiguration-Bls4mHm3.js} +28 -28
  15. package/dist/{configurationEditorNavigation-DeXvfJyr.js → configurationEditorNavigation-DteTknF3.js} +2 -2
  16. package/dist/index.css +1 -1
  17. package/dist/index.js +704 -646
  18. package/dist/{moduleMenuWorkspace-D_A94ZgR.js → moduleMenuWorkspace-CsYcDzfq.js} +197 -197
  19. package/dist/{platform-components-DSMqalgQ.js → platform-components-CT5wnPa0.js} +2987 -2646
  20. package/dist/{platform-workbench-B53hydzq.js → platform-workbench-CBLyxlvV.js} +5350 -5264
  21. package/dist/types/app/useLoginFailureFeedback.d.ts +8 -0
  22. package/dist/types/consumer/index.d.ts +2 -1
  23. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +30 -26
  24. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +32 -26
  25. package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +2 -0
  26. package/dist/types/dynamic-page-runtime/index.d.ts +2 -2
  27. package/dist/types/dynamic-page-runtime/modulePageActionControls.d.ts +12 -0
  28. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +16 -5
  29. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +15 -13
  30. package/dist/types/dynamic-page-runtime/useModuleRecordDataChanges.d.ts +4 -1
  31. package/dist/types/platform-components/ActionControlHost.vue.d.ts +16 -0
  32. package/dist/types/platform-components/AdaptiveHeaderActionBar.vue.d.ts +3 -0
  33. package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +13 -0
  34. package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +7 -29
  35. package/dist/types/platform-components/RecordPicker.vue.d.ts +7 -31
  36. package/dist/types/platform-components/RecordReferencePicker.vue.d.ts +24 -0
  37. package/dist/types/platform-components/ReferencePicker.vue.d.ts +1 -1
  38. package/dist/types/platform-components/ReferenceSelectionPanel.vue.d.ts +20 -0
  39. package/dist/types/platform-components/UserPicker.vue.d.ts +1 -1
  40. package/dist/types/platform-components/actionControl.d.ts +28 -0
  41. package/dist/types/platform-components/adaptiveHeaderActionLayout.d.ts +4 -2
  42. package/dist/types/platform-components/index.d.ts +1 -0
  43. package/dist/types/platform-components/recordActionBarModel.d.ts +5 -0
  44. package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -0
  45. package/dist/types/platform-components/recordReferencePickerProvider.d.ts +26 -0
  46. package/dist/types/platform-components/workflowAccountOptions.d.ts +3 -3
  47. package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +2 -0
  48. package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +13 -2
  49. package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +8 -2
  50. package/dist/{useWorkflowConfigurationContext-BuBDdUcQ.js → useWorkflowConfigurationContext-DsuGHZ0U.js} +9 -9
  51. package/dist/{workspaceViews-BSVtjZj1.js → workspaceViews-BxEz6u5n.js} +523 -523
  52. package/package.json +1 -1
  53. package/dist/BusinessLogListDrawer-ByiwQP1m.js +0 -868
  54. package/dist/ModuleActionManagementView-Chr_XTJ3.js +0 -780
  55. package/dist/RoleDetailWorkspaceView-CPH9cga9.js +0 -1435
  56. package/dist/WorkflowAdministrationView-CCXry0G4.js +0 -650
  57. package/dist/WorkflowWorkbenchView-DUFfO3Gf.js +0 -759
@@ -1,16 +1,16 @@
1
1
  import { n as e } from "./rolldown-runtime-BAC7EHh5.js";
2
- import { D as t, E as n, M as r, N as i, S as a, d as o, dt as s, ft as c, m as l, y as u } from "./platform-workbench-B53hydzq.js";
3
- import { Ca as d, D as f, Ga as p, Gn as m, Ia as h, In as g, K as _, Kn as v, Kt as y, Ln as b, Na as x, Rn as S, Rr as ee, Sa as C, Sn as w, U as T, V as E, Va as D, Wa as te, Wn as O, Xn as ne, Xt as k, _r as re, ao as A, ar as j, at as ie, ba as ae, br as M, dn as N, dr as P, gr as F, hr as oe, ht as se, io as ce, jn as I, k as le, m as ue, mr as de, ni as fe, no as pe, nt as me, ot as he, q as ge, qn as _e, rr as ve, ti as ye, to as be, tr as xe, vn as Se, vr as L, wn as Ce, xa as we, xn as Te, za as Ee, zn as De } from "./platform-components-DSMqalgQ.js";
4
- import { _ as Oe, g as ke, p as Ae } from "./codeConfiguration-BRxveKen.js";
5
- import { a as je, i as Me, n as Ne, o as Pe, r as Fe, t as Ie } from "./moduleMenuWorkspace-D_A94ZgR.js";
6
- import { t as Le } from "./useWorkflowConfigurationContext-BuBDdUcQ.js";
2
+ import { D as t, E as n, M as r, N as i, S as a, d as o, dt as s, ft as c, m as l, y as u } from "./platform-workbench-CBLyxlvV.js";
3
+ import { An as d, Ba as f, Cn as p, D as m, Fa as h, Fn as g, Gn as _, Gt as v, In as y, K as b, Kn as x, Ln as S, Lr as C, Ma as w, Ra as T, Rn as ee, Sa as E, U as D, Ua as O, Un as k, V as A, Wa as j, Wn as te, Yn as ne, Yt as re, _n as ie, _r as M, at as N, ba as ae, bn as oe, ei as se, eo as P, er as ce, gr as le, hr as ue, io as F, ir as de, k as fe, m as pe, mr as me, mt as he, nr as ge, nt as _e, pr as ve, q as ye, ro as be, st as xe, ti as Se, to as Ce, un as we, ur as Te, xa as Ee, xn as I, ya as De, yr as L } from "./platform-components-CT5wnPa0.js";
4
+ import { _ as Oe, g as ke, p as Ae } from "./codeConfiguration-Bls4mHm3.js";
5
+ import { a as je, i as Me, n as Ne, o as Pe, r as Fe, t as Ie } from "./moduleMenuWorkspace-CsYcDzfq.js";
6
+ import { t as Le } from "./useWorkflowConfigurationContext-DsuGHZ0U.js";
7
7
  import { Fragment as R, computed as z, createBlock as B, createCommentVNode as V, createElementBlock as H, createElementVNode as U, createSlots as Re, createTextVNode as W, createVNode as G, defineAsyncComponent as K, defineComponent as q, guardReactiveProps as ze, mergeModels as Be, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as We, onActivated as Ge, onBeforeUnmount as Ke, onMounted as qe, onScopeDispose as Je, onUnmounted as Ye, openBlock as J, ref as Y, renderList as Xe, renderSlot as Ze, resolveDynamicComponent as Qe, shallowRef as $e, toDisplayString as X, toRaw as et, toValue as tt, unref as Z, useModel as nt, watch as Q, withCtx as $, withKeys as rt, withModifiers as it } from "vue";
8
8
  //#region src/views/codeConfigurationWorkspaceView.ts
9
9
  var at = Oe({
10
10
  type: "platform.code.configuration",
11
11
  route: "/_platform/workspace/platform.code.configuration",
12
12
  moduleAlias: "platform.code_rule",
13
- component: K(() => import("./CodeConfigurationView-91B9dHjD.js").then((e) => e.n)),
13
+ component: K(() => import("./CodeConfigurationView-D-S2nX4C.js").then((e) => e.n)),
14
14
  layout: "workspace",
15
15
  routeTitle: "业务编码",
16
16
  routeTitleKey: "platform.code.config.title",
@@ -34,7 +34,7 @@ var at = Oe({
34
34
  type: "iam.role.detail",
35
35
  route: "/iam/role",
36
36
  moduleAlias: "iam.role",
37
- component: K(() => import("./RoleDetailWorkspaceView-CPH9cga9.js")),
37
+ component: K(() => import("./RoleDetailWorkspaceView-Bv21G3CF.js")),
38
38
  layout: "workspace",
39
39
  routeTitle: "角色管理",
40
40
  routeTitleKey: "platform.workspace-view.roles.route-title",
@@ -79,7 +79,7 @@ var at = Oe({
79
79
  type: "platform.module.actions",
80
80
  route: "/_platform/workspace/platform.module.actions",
81
81
  moduleAlias: "platform.module",
82
- component: K(() => import("./ModuleActionManagementView-Chr_XTJ3.js").then((e) => e.n)),
82
+ component: K(() => import("./ModuleActionManagementView-CfsGwDOn.js").then((e) => e.n)),
83
83
  layout: "workspace",
84
84
  routeTitle: "模块管理",
85
85
  routeTitleKey: "platform.workspace-view.modules.route-title",
@@ -100,7 +100,7 @@ var at = Oe({
100
100
  type: "platform.module.workflows",
101
101
  route: "/_platform/workspace/platform.module.workflows",
102
102
  moduleAlias: "platform.module",
103
- component: K(() => import("./WorkflowConfigurationView-BqSfYua2.js")),
103
+ component: K(() => import("./WorkflowConfigurationView-D1ve8wHF.js")),
104
104
  layout: "workspace",
105
105
  routeTitle: "模块管理",
106
106
  routeTitleKey: "platform.workspace-view.modules.route-title",
@@ -125,7 +125,7 @@ var at = Oe({
125
125
  __name: "ModuleMenuDrawer",
126
126
  props: { context: {} },
127
127
  setup(e) {
128
- let t = A(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = l(), a = Ie(), o = a?.language ?? t, s = u(), c = () => JSON.stringify([
128
+ let t = F(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = l(), a = Ie(), o = a?.language ?? t, s = u(), c = () => JSON.stringify([
129
129
  s?.value?.userId,
130
130
  s?.value?.tenantId,
131
131
  s?.value?.organizationId,
@@ -160,7 +160,7 @@ var at = Oe({
160
160
  onOpened: n[0] ||= (t) => e.context.close()
161
161
  }, null, 8, ["session"]));
162
162
  }
163
- }), pt = { class: "workflow-selection-fields" }, mt = { class: "workflow-field settings-wide" }, ht = { class: "settings-help" }, gt = { class: "workflow-field settings-wide" }, _t = { class: "settings-wide workflow-field" }, vt = { class: "settings-help" }, yt = /*#__PURE__*/ M(/* @__PURE__ */ q({
163
+ }), pt = { class: "workflow-selection-fields" }, mt = { class: "workflow-field settings-wide" }, ht = { class: "settings-help" }, gt = { class: "workflow-field settings-wide" }, _t = { class: "settings-wide workflow-field" }, vt = { class: "settings-help" }, yt = /*#__PURE__*/ L(/* @__PURE__ */ q({
164
164
  name: "WorkflowSelectionFields",
165
165
  __name: "WorkflowSelectionFields",
166
166
  props: /*@__PURE__*/ Be({
@@ -185,11 +185,11 @@ var at = Oe({
185
185
  "update:fallback"
186
186
  ],
187
187
  setup(e) {
188
- let t = A(), n = e, r = nt(e, "organizationId"), i = nt(e, "matchExpression"), a = nt(e, "fallback");
188
+ let t = F(), n = e, r = nt(e, "organizationId"), i = nt(e, "matchExpression"), a = nt(e, "fallback");
189
189
  return (o, s) => (J(), H("div", pt, [
190
190
  U("label", mt, [
191
191
  W(X(Z(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
192
- n.organizationContext ? (J(), B(Z(he), {
192
+ n.organizationContext ? (J(), B(Z(_e), {
193
193
  key: 0,
194
194
  placeholder: Z(t).t("platform.workflow-config.organization-placeholder", "全部组织(可选指定组织)"),
195
195
  value: r.value || void 0,
@@ -202,14 +202,14 @@ var at = Oe({
202
202
  "value",
203
203
  "context",
204
204
  "disabled"
205
- ])) : (J(), B(Z(P), {
205
+ ])) : (J(), B(Z(Te), {
206
206
  key: 1,
207
207
  value: r.value || Z(t).t("platform.workflow-config.all-organizations", "模块内全部组织"),
208
208
  disabled: ""
209
209
  }, null, 8, ["value"])),
210
210
  U("small", ht, X(n.organizationContext ? Z(t).t("platform.workflow-config.organization-help", "留空适用于全部组织;指定组织后包含其下级组织。") : Z(t).t("platform.workflow-config.global-scope-help", "当前为全局流程模板,适用于全部组织;组织选择需使用租户身份。")), 1)
211
211
  ]),
212
- U("div", gt, [U("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), G(Z(I), {
212
+ U("div", gt, [U("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), G(Z(d), {
213
213
  disabled: n.disabled || a.value,
214
214
  value: i.value,
215
215
  "onUpdate:value": s[1] ||= (e) => i.value = e,
@@ -224,7 +224,7 @@ var at = Oe({
224
224
  "tools",
225
225
  "placeholder"
226
226
  ])]),
227
- U("div", _t, [G(Z(oe), {
227
+ U("div", _t, [G(Z(me), {
228
228
  disabled: n.disabled,
229
229
  checked: a.value,
230
230
  "onUpdate:checked": s[2] ||= (e) => a.value = e
@@ -243,7 +243,7 @@ var at = Oe({
243
243
  }, Ct = {
244
244
  key: 2,
245
245
  class: "workflow-field settings-wide"
246
- }, wt = { class: "settings-help" }, Tt = ["open"], Et = /*#__PURE__*/ M(/* @__PURE__ */ q({
246
+ }, wt = { class: "settings-help" }, Tt = ["open"], Et = /*#__PURE__*/ L(/* @__PURE__ */ q({
247
247
  __name: "WorkflowDefinitionSettings",
248
248
  props: /*@__PURE__*/ Be({
249
249
  configuration: {},
@@ -285,10 +285,10 @@ var at = Oe({
285
285
  onSubmit: p[6] ||= it((e) => o("submit"), ["prevent"])
286
286
  }, [
287
287
  e.creating ? (J(), H("p", bt, X(Z(n).t("platform.workflow-config.creation-help", "先创建草稿,再配置节点和参与人;发布后才会用于后续申请。")), 1)) : V("v-if", !0),
288
- U("label", xt, [G(Z(N), { required: "" }, {
288
+ U("label", xt, [G(Z(we), { required: "" }, {
289
289
  default: $(() => [W(X(Z(n).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
290
290
  _: 1
291
- }), G(Z(P), {
291
+ }), G(Z(Te), {
292
292
  disabled: e.busy,
293
293
  value: s.value,
294
294
  "onUpdate:value": p[0] ||= (e) => s.value = e,
@@ -299,23 +299,23 @@ var at = Oe({
299
299
  "value",
300
300
  "aria-label"
301
301
  ])]),
302
- e.creating ? (J(), H("div", St, [G(Z(oe), {
302
+ e.creating ? (J(), H("div", St, [G(Z(me), {
303
303
  disabled: e.busy,
304
304
  checked: c.value,
305
305
  "onUpdate:checked": p[1] ||= (e) => c.value = e
306
306
  }, {
307
307
  default: $(() => [W(X(Z(n).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
308
308
  _: 1
309
- }, 8, ["disabled", "checked"]), G(Z(xe), { label: Z(n).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
309
+ }, 8, ["disabled", "checked"]), G(Z(ce), { label: Z(n).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
310
310
  default: $(() => [W(X(Z(n).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
311
311
  _: 1
312
312
  }, 8, ["label"])])) : V("v-if", !0),
313
313
  c.value ? V("v-if", !0) : (J(), H("label", Ct, [
314
- G(Z(N), { required: "" }, {
314
+ G(Z(we), { required: "" }, {
315
315
  default: $(() => [W(X(Z(n).t("platform.workflow-config.action-code", "模块动作编码")), 1)]),
316
316
  _: 1
317
317
  }),
318
- G(Z(P), {
318
+ G(Z(Te), {
319
319
  value: l.value,
320
320
  "onUpdate:value": p[2] ||= (e) => l.value = e,
321
321
  required: "",
@@ -360,104 +360,104 @@ var at = Oe({
360
360
  __name: "ModuleWorkflowDrawer",
361
361
  props: { context: {} },
362
362
  setup(e) {
363
- let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a = Le(r), { client: o, context: s, language: u } = a, d = l(), f = Y([]), p = Y(), m = Y(!1), v = Y(!1), b = Y(!1), C = Y(!1), T = Y(""), E = Y(!1), D = Y(), te = Y(""), O = Y(!0), A = Y(""), j = Y(""), ie = Y(""), ae = Y(!1), M = z(() => s.can?.("sort") === !0), N = z(() => !!te.value.trim() && (O.value || /^[a-z][A-Za-z0-9_]{0,63}$/.test(A.value.trim()))), P = !0;
363
+ let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a = Le(r), { client: o, context: s, language: u } = a, d = l(), f = Y([]), p = Y(), m = Y(!1), _ = Y(!1), y = Y(!1), x = Y(!1), T = Y(""), ee = Y(!1), E = Y(), D = Y(""), O = Y(!0), k = Y(""), A = Y(""), j = Y(""), te = Y(!1), N = z(() => s.can?.("sort") === !0), ae = z(() => !!D.value.trim() && (O.value || /^[a-z][A-Za-z0-9_]{0,63}$/.test(k.value.trim()))), oe = !0;
364
364
  Ke(() => {
365
- P = !1;
366
- }), ee(() => u.t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"), () => C.value, () => b.value), Q([
367
- te,
365
+ oe = !1;
366
+ }), C(() => u.t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"), () => x.value, () => y.value), Q([
367
+ D,
368
368
  O,
369
+ k,
369
370
  A,
370
371
  j,
371
- ie,
372
- ae
372
+ te
373
373
  ], () => {
374
- m.value && (C.value = !0);
374
+ m.value && (x.value = !0);
375
375
  }, { flush: "sync" });
376
- let F = z(() => u.t(v.value ? "platform.screen.WorkflowConfigurationView.new-workflow" : "platform.workflow-manager.edit", v.value ? "新建流程" : "流程设置")), oe = z(() => [{
376
+ let se = z(() => u.t(_.value ? "platform.screen.WorkflowConfigurationView.new-workflow" : "platform.workflow-manager.edit", _.value ? "新建流程" : "流程设置")), P = z(() => [{
377
377
  key: "cancel",
378
378
  label: u.t("platform.action.cancel", "取消"),
379
- disabled: b.value,
380
- run: pe
379
+ disabled: y.value,
380
+ run: me
381
381
  }, {
382
382
  key: "save",
383
- label: u.t(v.value ? "platform.screen.WorkflowConfigurationView.create-workflow-draft" : "platform.action.save", v.value ? "创建流程草稿" : "保存"),
383
+ label: u.t(_.value ? "platform.screen.WorkflowConfigurationView.create-workflow-draft" : "platform.action.save", _.value ? "创建流程草稿" : "保存"),
384
384
  emphasis: "primary",
385
- disabled: b.value || !N.value,
386
- loading: b.value,
387
- run: me
385
+ disabled: y.value || !ae.value,
386
+ loading: y.value,
387
+ run: _e
388
388
  }]);
389
- n.context.setSubtitle(i), n.context.setOperation(void 0), Q(b, () => n.context.setCloseBlocked(b.value), { immediate: !0 });
389
+ n.context.setSubtitle(i), n.context.setOperation(void 0), Q(y, () => n.context.setCloseBlocked(y.value), { immediate: !0 });
390
390
  async function ce(e) {
391
- if (!b.value) {
392
- b.value = !0, D.value = void 0;
391
+ if (!y.value) {
392
+ y.value = !0, E.value = void 0;
393
393
  try {
394
394
  await e();
395
395
  } catch (e) {
396
- P && (D.value = () => h(x(e), u));
396
+ oe && (E.value = () => h(w(e), u));
397
397
  } finally {
398
- P && (b.value = !1);
398
+ oe && (y.value = !1);
399
399
  }
400
400
  }
401
401
  }
402
- async function I() {
403
- m.value || b.value || await ce(async () => {
402
+ async function ue() {
403
+ m.value || y.value || await ce(async () => {
404
404
  let e = await o.query();
405
- P && (f.value = e, await le(e));
405
+ oe && (f.value = e, await F(e));
406
406
  });
407
407
  }
408
- async function le(e) {
408
+ async function F(e) {
409
409
  s.invalidateRecordActions?.(e.map((e) => e.id)), s.recordActionsBatch ? await s.recordActionsBatch(e.map((e) => e.id)) : s.recordActions && await Promise.all(e.map((e) => s.recordActions(e.id)));
410
410
  }
411
411
  qe(() => {
412
- I();
412
+ ue();
413
413
  }), Ge(() => {
414
- I();
414
+ ue();
415
415
  }), t({
416
416
  moduleAlias: "platform.workflow.definition",
417
417
  handler: async () => {
418
- await I();
418
+ await ue();
419
419
  }
420
420
  });
421
421
  function de(e) {
422
- b.value || m.value || (E.value = !1, p.value = e, te.value = e?.title ?? "", O.value = e?.approvalEnabled ?? !0, A.value = e?.actionCode ?? "", j.value = e?.organizationId ?? "", ie.value = e?.matchExpression ?? "", ae.value = e?.defaultDefinition ?? !1, v.value = !e, C.value = !1, m.value = !0);
422
+ y.value || m.value || (ee.value = !1, p.value = e, D.value = e?.title ?? "", O.value = e?.approvalEnabled ?? !0, k.value = e?.actionCode ?? "", A.value = e?.organizationId ?? "", j.value = e?.matchExpression ?? "", te.value = e?.defaultDefinition ?? !1, _.value = !e, x.value = !1, m.value = !0);
423
423
  }
424
424
  async function fe() {
425
- return b.value || C.value && !await g({
425
+ return y.value || x.value && !await g({
426
426
  title: u.t("platform.workflow-config.discard-confirm", "放弃未保存的流程设置?"),
427
427
  danger: !0,
428
428
  okText: u.t("platform.workflow-config.discard", "放弃修改")
429
- }, u) ? !1 : (C.value = !1, !0);
429
+ }, u) ? !1 : (x.value = !1, !0);
430
430
  }
431
431
  n.context.setBeforeClose(fe);
432
- async function pe() {
433
- await fe() && (m.value = !1, await I());
434
- }
435
432
  async function me() {
436
- m.value && N.value && await ce(async () => {
433
+ await fe() && (m.value = !1, await ue());
434
+ }
435
+ async function _e() {
436
+ m.value && ae.value && await ce(async () => {
437
437
  let e = {
438
- title: te.value.trim(),
439
- organizationId: j.value || null,
440
- matchExpression: ie.value || null,
441
- defaultDefinition: ae.value,
442
- ...O.value ? {} : { actionCode: A.value.trim() }
443
- }, t = v.value ? await o.create({
438
+ title: D.value.trim(),
439
+ organizationId: A.value || null,
440
+ matchExpression: j.value || null,
441
+ defaultDefinition: te.value,
442
+ ...O.value ? {} : { actionCode: k.value.trim() }
443
+ }, t = _.value ? await o.create({
444
444
  ...e,
445
445
  ...O.value ? { approvalEnabled: !0 } : {
446
446
  approvalEnabled: !1,
447
- actionCode: A.value.trim()
447
+ actionCode: k.value.trim()
448
448
  },
449
449
  enabled: !0
450
450
  }) : await o.saveSelection(p.value.id, {
451
451
  ...e,
452
452
  version: p.value.version
453
453
  });
454
- P && (f.value = v.value ? [...f.value, t] : f.value.map((e) => e.id === t.id ? t : e), p.value = t, m.value = !1, C.value = !1, T.value = "", n.context.refreshDetailExtensions(), await le([t]));
454
+ oe && (f.value = _.value ? [...f.value, t] : f.value.map((e) => e.id === t.id ? t : e), p.value = t, m.value = !1, x.value = !1, T.value = "", n.context.refreshDetailExtensions(), await F([t]));
455
455
  });
456
456
  }
457
- function he(e) {
458
- if (!(b.value || m.value)) {
457
+ function ve(e) {
458
+ if (!(y.value || m.value)) {
459
459
  if (!d) {
460
- w(Error(u.t("platform.workflow-manager.navigation-unavailable", "工作台导航暂不可用")), {
460
+ I(Error(u.t("platform.workflow-manager.navigation-unavailable", "工作台导航暂不可用")), {
461
461
  source: "workflow-design",
462
462
  phase: "action"
463
463
  });
@@ -471,7 +471,7 @@ var at = Oe({
471
471
  }));
472
472
  }
473
473
  }
474
- let ge = z(() => [
474
+ let ye = z(() => [
475
475
  {
476
476
  key: "title",
477
477
  title: u.t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称"),
@@ -497,85 +497,85 @@ var at = Oe({
497
497
  title: u.t("platform.workflow-manager.active", "启用状态"),
498
498
  width: 90
499
499
  }
500
- ]), _e = z(() => f.value.filter((e) => !T.value.trim() || [
500
+ ]), be = z(() => f.value.filter((e) => !T.value.trim() || [
501
501
  e.title,
502
502
  e.matchExpression,
503
- ue(e.definitionStatus, u)
503
+ pe(e.definitionStatus, u)
504
504
  ].some((e) => String(e ?? "").toLocaleLowerCase().includes(T.value.trim().toLocaleLowerCase()))).map((e) => ({ ...e })));
505
- function ye(e) {
505
+ function xe(e) {
506
506
  return e.definitionStatus === "published" || e.definitionStatus === "disabled" && e.currentVersionNo != null;
507
507
  }
508
- function be(e, t) {
509
- return !b.value && !m.value && s.can?.(e, String(t.id)) === !0;
508
+ function Se(e, t) {
509
+ return !y.value && !m.value && s.can?.(e, String(t.id)) === !0;
510
510
  }
511
- function xe(e) {
512
- if (e.source.tenantId === e.target.tenantId) return we({
511
+ function Ce(e) {
512
+ if (e.source.tenantId === e.target.tenantId) return Te({
513
513
  dragRecord: e.source,
514
514
  dropRecord: e.target,
515
515
  position: e.position === "before" ? -1 : 1
516
516
  });
517
517
  }
518
- async function Ce(e, t) {
518
+ async function we(e, t) {
519
519
  let n = f.value.find((e) => e.id === t.id);
520
- if (n && !(b.value || m.value)) {
520
+ if (n && !(y.value || m.value)) {
521
521
  if (e === "design") {
522
- he(n);
522
+ ve(n);
523
523
  return;
524
524
  }
525
525
  if (e === "settings") {
526
- if (!be("configureWorkflowSelection", n)) return;
526
+ if (!Se("configureWorkflowSelection", n)) return;
527
527
  de(n);
528
528
  return;
529
529
  }
530
- (e === "enable" || e === "disable" || e === "archive") && be(`${e}WorkflowDefinition`, n) && (e !== "enable" || ye(n)) && await g({
530
+ (e === "enable" || e === "disable" || e === "archive") && Se(`${e}WorkflowDefinition`, n) && (e !== "enable" || xe(n)) && await g({
531
531
  title: u.t(e === "archive" ? "platform.workflow-config.archive-confirm" : e === "enable" ? "platform.workflow-config.enable-confirm" : "platform.workflow-config.disable-confirm", e === "archive" ? "归档此流程?" : e === "enable" ? "启用此流程?" : "停用此流程?"),
532
532
  content: u.t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。"),
533
533
  danger: e !== "enable"
534
534
  }, u) && await ce(async () => {
535
535
  let t = await o.changeStatus(n.id, e, n.version);
536
- P && (f.value = f.value.map((e) => e.id === t.id ? t : e), await le([t]));
536
+ oe && (f.value = f.value.map((e) => e.id === t.id ? t : e), await F([t]));
537
537
  });
538
538
  }
539
539
  }
540
- async function we(e) {
541
- E.value && M.value && !b.value && !m.value && !T.value.trim() && e.dragRecord.id && e.dropRecord.id && await ce(async () => {
540
+ async function Te(e) {
541
+ ee.value && N.value && !y.value && !m.value && !T.value.trim() && e.dragRecord.id && e.dropRecord.id && await ce(async () => {
542
542
  await o.sort(String(e.dragRecord.id), String(e.dropRecord.id), e.position);
543
543
  let t = await o.query();
544
- P && (f.value = t, await le(t));
544
+ oe && (f.value = t, await F(t));
545
545
  });
546
546
  }
547
547
  return (e, t) => (J(), H(R, null, [
548
- m.value ? (J(), B(Z(y), {
548
+ m.value ? (J(), B(Z(v), {
549
549
  key: 0,
550
550
  open: m.value,
551
551
  width: "standard",
552
- title: F.value,
552
+ title: se.value,
553
553
  subtitle: Z(i),
554
554
  "before-close": fe,
555
- onClose: pe
555
+ onClose: me
556
556
  }, {
557
- operation: $(() => [G(Z(Se), { actions: oe.value }, null, 8, ["actions"])]),
558
- default: $(() => [D.value ? (J(), B(Z(S), {
557
+ operation: $(() => [G(Z(ie), { actions: P.value }, null, 8, ["actions"])]),
558
+ default: $(() => [E.value ? (J(), B(Z(S), {
559
559
  key: 0,
560
- message: D.value()
560
+ message: E.value()
561
561
  }, null, 8, ["message"])) : V("v-if", !0), G(Et, {
562
- onSubmit: me,
562
+ onSubmit: _e,
563
563
  configuration: Z(a),
564
- creating: v.value,
565
- busy: b.value,
566
- title: te.value,
567
- "onUpdate:title": t[0] ||= (e) => te.value = e,
564
+ creating: _.value,
565
+ busy: y.value,
566
+ title: D.value,
567
+ "onUpdate:title": t[0] ||= (e) => D.value = e,
568
568
  "approval-enabled": O.value,
569
569
  "onUpdate:approvalEnabled": t[1] ||= (e) => O.value = e,
570
- "action-code": A.value,
571
- "onUpdate:actionCode": t[2] ||= (e) => A.value = e,
572
- "action-code-locked": !v.value && p.value?.currentVersionNo != null,
573
- "organization-id": j.value,
574
- "onUpdate:organizationId": t[3] ||= (e) => j.value = e,
575
- "match-expression": ie.value,
576
- "onUpdate:matchExpression": t[4] ||= (e) => ie.value = e,
577
- fallback: ae.value,
578
- "onUpdate:fallback": t[5] ||= (e) => ae.value = e
570
+ "action-code": k.value,
571
+ "onUpdate:actionCode": t[2] ||= (e) => k.value = e,
572
+ "action-code-locked": !_.value && p.value?.currentVersionNo != null,
573
+ "organization-id": A.value,
574
+ "onUpdate:organizationId": t[3] ||= (e) => A.value = e,
575
+ "match-expression": j.value,
576
+ "onUpdate:matchExpression": t[4] ||= (e) => j.value = e,
577
+ fallback: te.value,
578
+ "onUpdate:fallback": t[5] ||= (e) => te.value = e
579
579
  }, null, 8, [
580
580
  "configuration",
581
581
  "creating",
@@ -594,61 +594,61 @@ var at = Oe({
594
594
  "title",
595
595
  "subtitle"
596
596
  ])) : V("v-if", !0),
597
- D.value && !m.value ? (J(), B(Z(S), {
597
+ E.value && !m.value ? (J(), B(Z(S), {
598
598
  key: 1,
599
- message: D.value()
599
+ message: E.value()
600
600
  }, null, 8, ["message"])) : V("v-if", !0),
601
- G(Z(k), {
601
+ G(Z(re), {
602
602
  embedded: "",
603
603
  title: Z(u).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
604
- "title-action-disabled": b.value || m.value,
604
+ "title-action-disabled": y.value || m.value,
605
605
  "title-action-icon": "reload",
606
606
  "title-action-title": Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载"),
607
607
  "fill-height": !1,
608
- columns: ge.value,
609
- rows: _e.value,
610
- loading: b.value,
611
- "table-visible": m.value || !D.value || f.value.length > 0,
608
+ columns: ye.value,
609
+ rows: be.value,
610
+ loading: y.value,
611
+ "table-visible": m.value || !E.value || f.value.length > 0,
612
612
  "empty-description": Z(u).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
613
613
  "quick-search-visible": !0,
614
614
  "quick-search-value": T.value,
615
- "quick-search-disabled": b.value || m.value,
616
- "row-draggable": E.value && !b.value && !m.value && M.value && !T.value.trim(),
615
+ "quick-search-disabled": y.value || m.value,
616
+ "row-draggable": ee.value && !y.value && !m.value && N.value && !T.value.trim(),
617
617
  "row-drag-handle-title": Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
618
618
  "show-action-column": !0,
619
619
  "action-column-width": 170,
620
620
  "onUpdate:quickSearchValue": t[9] ||= (e) => T.value = e,
621
- onTitleAction: I,
622
- onRowDrop: xe
621
+ onTitleAction: ue,
622
+ onRowDrop: Ce
623
623
  }, {
624
- operations: $(() => [M.value ? (J(), B(Z(_), {
624
+ operations: $(() => [N.value ? (J(), B(Z(b), {
625
625
  key: 0,
626
626
  "icon-name": "swap-vertical",
627
627
  "icon-only": "",
628
628
  size: "small",
629
629
  type: "text",
630
- selected: E.value,
631
- disabled: b.value || m.value || !!T.value.trim(),
630
+ selected: ee.value,
631
+ disabled: y.value || m.value || !!T.value.trim(),
632
632
  title: Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
633
- onClick: t[6] ||= (e) => E.value = !E.value
633
+ onClick: t[6] ||= (e) => ee.value = !ee.value
634
634
  }, null, 8, [
635
635
  "selected",
636
636
  "disabled",
637
637
  "title"
638
- ])) : V("v-if", !0), G(Z(re), {
638
+ ])) : V("v-if", !0), G(Z(le), {
639
639
  "icon-name": "plus",
640
640
  title: Z(u).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
641
- disabled: b.value || m.value || Z(s).can?.("create") !== !0,
641
+ disabled: y.value || m.value || Z(s).can?.("create") !== !0,
642
642
  onClick: t[7] ||= (e) => de()
643
643
  }, null, 8, ["title", "disabled"])]),
644
- beforeTable: $(() => [D.value && !m.value ? (J(), B(Z(L), {
644
+ beforeTable: $(() => [E.value && !m.value ? (J(), B(Z(M), {
645
645
  key: 0,
646
- onClick: I
646
+ onClick: ue
647
647
  }, {
648
648
  default: $(() => [W(X(Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
649
649
  _: 1
650
650
  })) : V("v-if", !0)]),
651
- cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), H("span", Dt, X(Z(ue)(String(r ?? ""), Z(u))), 1)) : e.key === "currentVersionNo" ? (J(), H("span", Ot, X(r == null ? "—" : `v${r}`), 1)) : e.key === "matchExpression" ? (J(), B(Z(se), {
651
+ cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), H("span", Dt, X(Z(pe)(String(r ?? ""), Z(u))), 1)) : e.key === "currentVersionNo" ? (J(), H("span", Ot, X(r == null ? "—" : `v${r}`), 1)) : e.key === "matchExpression" ? (J(), B(Z(he), {
652
652
  key: 2,
653
653
  column: {
654
654
  ...e,
@@ -659,15 +659,15 @@ var at = Oe({
659
659
  ...n,
660
660
  matchExpression: n.defaultDefinition ? Z(u).t("platform.workflow-manager.fallback", "兜底流程") : r || Z(u).t("platform.workflow-manager.all-records", "全部记录")
661
661
  }
662
- }, null, 8, ["column", "record"])) : e.key === "active" ? (J(), B(Z(ve), {
662
+ }, null, 8, ["column", "record"])) : e.key === "active" ? (J(), B(Z(ge), {
663
663
  key: 3,
664
- title: ye(n) ? Z(u).t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。") : Z(u).t("platform.workflow-manager.publish-to-enable", "请进入编排发布流程后启用")
664
+ title: xe(n) ? Z(u).t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。") : Z(u).t("platform.workflow-manager.publish-to-enable", "请进入编排发布流程后启用")
665
665
  }, {
666
666
  default: $(() => [U("span", { onClick: t[8] ||= it(() => {}, ["stop"]) }, [G(Z(ne), {
667
667
  "aria-label": Z(u).t("platform.workflow-manager.active", "启用状态") + ":" + n.title,
668
668
  checked: n.definitionStatus === "published" && n.enabled !== !1,
669
- disabled: !ye(n) || !be(n.definitionStatus === "published" ? "disableWorkflowDefinition" : "enableWorkflowDefinition", n),
670
- onChange: (e) => Ce(e ? "enable" : "disable", n)
669
+ disabled: !xe(n) || !Se(n.definitionStatus === "published" ? "disableWorkflowDefinition" : "enableWorkflowDefinition", n),
670
+ onChange: (e) => we(e ? "enable" : "disable", n)
671
671
  }, null, 8, [
672
672
  "aria-label",
673
673
  "checked",
@@ -675,7 +675,7 @@ var at = Oe({
675
675
  "onChange"
676
676
  ])])]),
677
677
  _: 2
678
- }, 1032, ["title"])) : (J(), B(Z(se), {
678
+ }, 1032, ["title"])) : (J(), B(Z(he), {
679
679
  key: 4,
680
680
  column: {
681
681
  ...e,
@@ -685,30 +685,30 @@ var at = Oe({
685
685
  record: n
686
686
  }, null, 8, ["column", "record"]))]),
687
687
  rowActions: $(({ record: e }) => [
688
- G(Z(L), {
688
+ G(Z(M), {
689
689
  type: "link",
690
690
  size: "small",
691
- disabled: b.value || m.value,
692
- onClick: (t) => Ce("design", e)
691
+ disabled: y.value || m.value,
692
+ onClick: (t) => we("design", e)
693
693
  }, {
694
694
  default: $(() => [W(X(Z(u).t("platform.workflow-manager.design", "编排")), 1)]),
695
695
  _: 1
696
696
  }, 8, ["disabled", "onClick"]),
697
- G(Z(L), {
697
+ G(Z(M), {
698
698
  type: "link",
699
699
  size: "small",
700
- disabled: !be("configureWorkflowSelection", e),
701
- onClick: (t) => Ce("settings", e)
700
+ disabled: !Se("configureWorkflowSelection", e),
701
+ onClick: (t) => we("settings", e)
702
702
  }, {
703
703
  default: $(() => [W(X(Z(u).t("platform.workflow-manager.settings", "设置")), 1)]),
704
704
  _: 1
705
705
  }, 8, ["disabled", "onClick"]),
706
- G(Z(L), {
706
+ G(Z(M), {
707
707
  type: "link",
708
708
  size: "small",
709
709
  danger: "",
710
- disabled: e.definitionStatus === "archived" || !be("archiveWorkflowDefinition", e),
711
- onClick: (t) => Ce("archive", e)
710
+ disabled: e.definitionStatus === "archived" || !Se("archiveWorkflowDefinition", e),
711
+ onClick: (t) => we("archive", e)
712
712
  }, {
713
713
  default: $(() => [W(X(Z(u).t("platform.screen.WorkflowConfigurationView.archive", "归档")), 1)]),
714
714
  _: 1
@@ -734,11 +734,11 @@ var at = Oe({
734
734
  }), At = { class: "module-menu-entries" }, jt = { key: 0 }, Mt = {
735
735
  key: 1,
736
736
  role: "status"
737
- }, Nt = { key: 2 }, Pt = { key: 0 }, Ft = /*#__PURE__*/ M(/* @__PURE__ */ q({
737
+ }, Nt = { key: 2 }, Pt = { key: 0 }, Ft = /*#__PURE__*/ L(/* @__PURE__ */ q({
738
738
  __name: "ModuleMenuEntriesSection",
739
739
  props: { context: {} },
740
740
  setup(e) {
741
- let t = A(), n = e, r = l(), i = Y([]), a = z(() => i.value.flatMap(({ scheme: e, tree: r }) => Pe(r, te(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), o = Y(/* @__PURE__ */ new Map()), s = Y(!1), c = Y(!1), u = z(() => c.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
741
+ let t = F(), n = e, r = l(), i = Y([]), a = z(() => i.value.flatMap(({ scheme: e, tree: r }) => Pe(r, O(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), o = Y(/* @__PURE__ */ new Map()), s = Y(!1), c = Y(!1), u = z(() => c.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
742
742
  Ke(() => d++), Q(() => [n.context.record.id, n.context.refreshKey], () => void f(), { immediate: !0 });
743
743
  async function f() {
744
744
  let e = ++d, t = je(n.context.module.http);
@@ -756,7 +756,7 @@ var at = Oe({
756
756
  e === d && (s.value = !1);
757
757
  }
758
758
  }
759
- return (e, n) => (J(), H("div", At, [s.value ? (J(), H("span", jt, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (J(), H("div", Mt, [W(X(u.value) + " ", 1), G(Z(L), {
759
+ return (e, n) => (J(), H("div", At, [s.value ? (J(), H("span", jt, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (J(), H("div", Mt, [W(X(u.value) + " ", 1), G(Z(M), {
760
760
  type: "link",
761
761
  onClick: f
762
762
  }, {
@@ -765,7 +765,7 @@ var at = Oe({
765
765
  })])) : a.value.length ? V("v-if", !0) : (J(), H("span", Nt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (J(!0), H(R, null, Xe(a.value, (e) => (J(), H("div", {
766
766
  key: e.menu.id,
767
767
  class: "menu-entry"
768
- }, [U("span", null, [W(X(e.path), 1), e.menu.enabled === !1 ? (J(), H("small", Pt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : V("v-if", !0)]), o.value.has(e.menu.id) && Z(r)?.openMenu ? (J(), B(Z(L), {
768
+ }, [U("span", null, [W(X(e.path), 1), e.menu.enabled === !1 ? (J(), H("small", Pt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : V("v-if", !0)]), o.value.has(e.menu.id) && Z(r)?.openMenu ? (J(), B(Z(M), {
769
769
  key: 0,
770
770
  type: "link",
771
771
  onClick: (t) => Z(r).openMenu(o.value.get(e.menu.id))
@@ -793,7 +793,7 @@ function Lt(e) {
793
793
  n.get(r) === i && (t.value[r] = {
794
794
  phase: "failed",
795
795
  configurable: !1,
796
- error: h(x(e))
796
+ error: h(w(e))
797
797
  });
798
798
  }
799
799
  }
@@ -833,11 +833,11 @@ var Vt = {
833
833
  key: 0,
834
834
  class: "module-code-status",
835
835
  role: "status"
836
- }, Ht = /*#__PURE__*/ M(/* @__PURE__ */ q({
836
+ }, Ht = /*#__PURE__*/ L(/* @__PURE__ */ q({
837
837
  __name: "ModuleCodeConfigurationStatus",
838
838
  props: { context: {} },
839
839
  setup(e) {
840
- let t = e, n = A(), r = l(), i = z(() => Rt(t.context.module)), a = z(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), o = z(() => i.value.states.value[a.value]);
840
+ let t = e, n = F(), r = l(), i = z(() => Rt(t.context.module)), a = z(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), o = z(() => i.value.states.value[a.value]);
841
841
  Q([
842
842
  a,
843
843
  () => t.context.mode,
@@ -856,14 +856,14 @@ var Vt = {
856
856
  return (e, t) => u.value ? (J(), H("div", Vt, [o.value?.phase === "failed" ? (J(), H(R, { key: 0 }, [
857
857
  U("span", null, X(Z(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
858
858
  U("span", null, X(o.value?.error), 1),
859
- G(Z(L), {
859
+ G(Z(M), {
860
860
  type: "link",
861
861
  onClick: t[0] ||= (e) => i.value.refresh(a.value)
862
862
  }, {
863
863
  default: $(() => [W(X(Z(n).t("platform.code.config.retry", "重试")), 1)]),
864
864
  _: 1
865
865
  })
866
- ], 64)) : (J(), H(R, { key: 1 }, [U("span", null, X(Z(n).t(`platform.code.config.reason.${s.value}`, s.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Z(r) ? (J(), B(Z(L), {
866
+ ], 64)) : (J(), H(R, { key: 1 }, [U("span", null, X(Z(n).t(`platform.code.config.reason.${s.value}`, s.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Z(r) ? (J(), B(Z(M), {
867
867
  key: 0,
868
868
  type: "link",
869
869
  onClick: d
@@ -1012,12 +1012,12 @@ var en = { class: "password-policy-preview" }, tn = {
1012
1012
  id: "iam-password-policy-preview",
1013
1013
  target: { moduleAlias: "iam.password_policy_rule" },
1014
1014
  card: { assistant: {
1015
- component: /* @__PURE__ */ M(/* @__PURE__ */ q({
1015
+ component: /* @__PURE__ */ L(/* @__PURE__ */ q({
1016
1016
  name: "PasswordPolicyPreview",
1017
1017
  __name: "PasswordPolicyPreview",
1018
1018
  props: { context: {} },
1019
1019
  setup(e) {
1020
- let t = A(), n = e, r = Y("CURRENT"), i = Y(""), a = Y(), o = Y(!1), s = Y(!1), c = 0, l = z(() => y(n.context.record)), u = z(() => n.context.mode !== "view" || ee(l.value?.id) !== void 0), d = z(() => [{
1020
+ let t = F(), n = e, r = Y("CURRENT"), i = Y(""), a = Y(), o = Y(!1), s = Y(!1), c = 0, l = z(() => y(n.context.record)), u = z(() => n.context.mode !== "view" || C(l.value?.id) !== void 0), d = z(() => [{
1021
1021
  value: "CURRENT",
1022
1022
  label: t.t("platform.screen.PasswordPolicyPreview.current-rule", "本规则"),
1023
1023
  disabled: !u.value
@@ -1028,7 +1028,7 @@ var en = { class: "password-policy-preview" }, tn = {
1028
1028
  Q(u, (e) => {
1029
1029
  !e && r.value === "CURRENT" && (r.value = "ALL");
1030
1030
  }, { immediate: !0 });
1031
- function f(e) {
1031
+ function p(e) {
1032
1032
  (e !== "CURRENT" || u.value) && (e === "CURRENT" || e === "ALL") && (r.value = e);
1033
1033
  }
1034
1034
  Q([r, () => n.context.formSessionKey], ([e]) => {
@@ -1052,16 +1052,16 @@ var en = { class: "password-policy-preview" }, tn = {
1052
1052
  let e = u.value ? l.value : void 0;
1053
1053
  if (r.value === "CURRENT") return e ? [e] : [];
1054
1054
  if (!a.value) return [];
1055
- let t = a.value.filter(w), n = ee(e?.id);
1055
+ let t = a.value.filter(T), n = C(e?.id);
1056
1056
  if (n) {
1057
- let e = t.findIndex((e) => ee(e.id) === n);
1057
+ let e = t.findIndex((e) => C(e.id) === n);
1058
1058
  e >= 0 && t.splice(e, 1);
1059
1059
  }
1060
- return e && w(e) && t.push(e), t.length > 0 ? t.sort(x) : [];
1060
+ return e && T(e) && t.push(e), t.length > 0 ? t.sort(x) : [];
1061
1061
  }), g = z(() => i.value ? h.value.map((e, t) => b(e, i.value, t)) : []), _ = z(() => g.value.map((e) => ({
1062
1062
  ...e,
1063
- title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : D(e.title, e.titleText, t),
1064
- message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : D(e.message, e.messageText, t),
1063
+ title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : f(e.title, e.titleText, t),
1064
+ message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : f(e.message, e.messageText, t),
1065
1065
  diagnostic: e.diagnostic ? t.t(e.diagnostic.sourceId, e.diagnostic.originalText) : void 0
1066
1066
  }))), v = z(() => {
1067
1067
  if (!u.value && r.value === "CURRENT") return t.t("platform.screen.PasswordPolicyPreview.select-or-create-a-rule", "请选择或新建一条规则");
@@ -1079,9 +1079,9 @@ var en = { class: "password-policy-preview" }, tn = {
1079
1079
  if (e) return e;
1080
1080
  }
1081
1081
  function b(e, t, n) {
1082
- let r = e.title?.trim() ? void 0 : be("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : be("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = C(e.title, r?.originalText ?? ""), o = C(e.message, i?.originalText ?? ""), s = {
1083
- titleText: p(e, "title"),
1084
- messageText: p(e, "message")
1082
+ let r = e.title?.trim() ? void 0 : P("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : P("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = w(e.title, r?.originalText ?? ""), o = w(e.message, i?.originalText ?? ""), s = {
1083
+ titleText: j(e, "title"),
1084
+ messageText: j(e, "message")
1085
1085
  }, c = e.pattern;
1086
1086
  if (!c?.trim()) return {
1087
1087
  ...s,
@@ -1091,7 +1091,7 @@ var en = { class: "password-policy-preview" }, tn = {
1091
1091
  titleSource: r,
1092
1092
  messageSource: i,
1093
1093
  passed: !1,
1094
- diagnostic: be("platform.screen.PasswordPolicyPreview.regular-expression-required")
1094
+ diagnostic: P("platform.screen.PasswordPolicyPreview.regular-expression-required")
1095
1095
  };
1096
1096
  try {
1097
1097
  let l = RegExp(`^(?:${c})$`).test(t);
@@ -1113,35 +1113,35 @@ var en = { class: "password-policy-preview" }, tn = {
1113
1113
  titleSource: r,
1114
1114
  messageSource: i,
1115
1115
  passed: !1,
1116
- diagnostic: be("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
1116
+ diagnostic: P("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
1117
1117
  };
1118
1118
  }
1119
1119
  }
1120
1120
  function x(e, t) {
1121
- return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || C(e.title, "").localeCompare(C(t.title, ""));
1121
+ return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || w(e.title, "").localeCompare(w(t.title, ""));
1122
1122
  }
1123
1123
  function S(e, t) {
1124
- return ee(e.id) ?? `draft:${t}`;
1124
+ return C(e.id) ?? `draft:${t}`;
1125
1125
  }
1126
- function ee(e) {
1126
+ function C(e) {
1127
1127
  return e?.trim() || void 0;
1128
1128
  }
1129
- function C(e, t) {
1129
+ function w(e, t) {
1130
1130
  return e?.trim() || t;
1131
1131
  }
1132
- function w(e) {
1132
+ function T(e) {
1133
1133
  return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
1134
1134
  }
1135
1135
  return (e, n) => (J(), H("section", en, [
1136
1136
  U("header", null, [U("h3", null, X(Z(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), U("span", { class: Ue({ failed: g.value.some((e) => !e.passed) }) }, X(v.value), 3)]),
1137
- G(Z(j), {
1137
+ G(Z(de), {
1138
1138
  class: "preview-scope",
1139
1139
  value: r.value,
1140
1140
  options: d.value,
1141
1141
  size: "small",
1142
- "onUpdate:value": f
1142
+ "onUpdate:value": p
1143
1143
  }, null, 8, ["value", "options"]),
1144
- G(Z(P), {
1144
+ G(Z(Te), {
1145
1145
  value: i.value,
1146
1146
  "onUpdate:value": n[0] ||= (e) => i.value = e,
1147
1147
  type: "text",
@@ -1171,12 +1171,12 @@ var en = { class: "password-policy-preview" }, tn = {
1171
1171
  }, rn = { class: "tenant-applications-detail" }, an = { class: "tenant-applications-summary" }, on = {
1172
1172
  key: 0,
1173
1173
  class: "tenant-applications-status"
1174
- }, sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1174
+ }, sn = /*#__PURE__*/ L(/* @__PURE__ */ q({
1175
1175
  name: "TenantApplicationsDetailSection",
1176
1176
  __name: "TenantApplicationsDetailSection",
1177
1177
  props: { context: {} },
1178
1178
  setup(e) {
1179
- let t = A(), n = e, r = Y([]), i = Y(!1), a = 0, o = Y(/* @__PURE__ */ new Map()), s = z(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
1179
+ let t = F(), n = e, r = Y([]), i = Y(!1), a = 0, o = Y(/* @__PURE__ */ new Map()), s = z(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
1180
1180
  key: e,
1181
1181
  label: o.value.get(e) ? `${o.value.get(e)} · ${e}` : e
1182
1182
  })));
@@ -1206,7 +1206,7 @@ var en = { class: "password-policy-preview" }, tn = {
1206
1206
  })]);
1207
1207
  s === a && (o.value = new Map(t.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), r.value = i.records);
1208
1208
  } catch (e) {
1209
- s === a && w(e, {
1209
+ s === a && I(e, {
1210
1210
  language: t,
1211
1211
  source: "tenant-applications-detail",
1212
1212
  phase: "load"
@@ -1218,19 +1218,19 @@ var en = { class: "password-policy-preview" }, tn = {
1218
1218
  function l(e, t) {
1219
1219
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
1220
1220
  }
1221
- return (e, n) => (J(), H("section", rn, [U("div", an, [i.value ? (J(), H("span", on, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (J(), B(Z(F), {
1221
+ return (e, n) => (J(), H("section", rn, [U("div", an, [i.value ? (J(), H("span", on, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (J(), B(Z(ue), {
1222
1222
  key: 1,
1223
1223
  items: s.value,
1224
1224
  "max-visible": 8,
1225
1225
  "empty-text": Z(t).t("platform.screen.CrudRecordListExplorer.emptyDescription", "暂无记录")
1226
1226
  }, null, 8, ["items", "empty-text"]))])]));
1227
1227
  }
1228
- }), [["__scopeId", "data-v-49a973de"]]), cn = { class: "tenant-application-configuration" }, ln = /*#__PURE__*/ M(/* @__PURE__ */ q({
1228
+ }), [["__scopeId", "data-v-49a973de"]]), cn = { class: "tenant-application-configuration" }, ln = /*#__PURE__*/ L(/* @__PURE__ */ q({
1229
1229
  name: "TenantApplicationConfigurationDrawer",
1230
1230
  __name: "TenantApplicationConfigurationDrawer",
1231
1231
  props: { context: {} },
1232
1232
  setup(e) {
1233
- let t = A(), n = e, r = Y([]), i = Y(/* @__PURE__ */ new Set()), a = Y(!1), o = Y(!1), s = z(() => [{
1233
+ let t = F(), n = e, r = Y([]), i = Y(/* @__PURE__ */ new Set()), a = Y(!1), o = Y(!1), s = z(() => [{
1234
1234
  key: "title",
1235
1235
  title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-name", "应用名称"),
1236
1236
  width: 260
@@ -1290,7 +1290,7 @@ var en = { class: "password-policy-preview" }, tn = {
1290
1290
  let o = new Set(r.value.map((e) => e.alias).filter(Boolean));
1291
1291
  i.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
1292
1292
  } catch (e) {
1293
- w(e, {
1293
+ I(e, {
1294
1294
  language: t,
1295
1295
  source: "tenant-application-configuration",
1296
1296
  phase: "load"
@@ -1311,7 +1311,7 @@ var en = { class: "password-policy-preview" }, tn = {
1311
1311
  body: { applicationAliases: [...i.value] }
1312
1312
  }), n.context.refreshDetailExtensions(), n.context.refreshList(), n.context.close();
1313
1313
  } catch (e) {
1314
- w(e, {
1314
+ I(e, {
1315
1315
  language: t,
1316
1316
  source: "tenant-application-configuration",
1317
1317
  phase: "action"
@@ -1324,7 +1324,7 @@ var en = { class: "password-policy-preview" }, tn = {
1324
1324
  function p(e, t) {
1325
1325
  return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
1326
1326
  }
1327
- return (e, n) => (J(), H("section", cn, [U("p", null, X(Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), G(Z(O), {
1327
+ return (e, n) => (J(), H("section", cn, [U("p", null, X(Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), G(Z(k), {
1328
1328
  columns: s.value,
1329
1329
  rows: c.value,
1330
1330
  loading: a.value,
@@ -1357,8 +1357,8 @@ var en = { class: "password-policy-preview" }, tn = {
1357
1357
  },
1358
1358
  ...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
1359
1359
  fieldName: e,
1360
- imageUploadHint: ({ draft: e }, t = pe) => e.workbenchBrandMode === "logoOnly" ? t.t("platform.entry.logo-only-mode-supports-landscape-or-square-images-up-to-512-kb", "纯 Logo 模式支持横向或正方形图片(最大 512 KB)") : t.t("platform.entry.logo-and-title-mode-requires-square-images-recommended-128-128-px-up-to-512-kb", "Logo + 标题模式仅支持正方形图片(建议 128 × 128 px,最大 512 KB)"),
1361
- imageUploadAdvisory: ({ draft: e }, t = pe) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => dn(e, t)
1360
+ imageUploadHint: ({ draft: e }, t = Ce) => e.workbenchBrandMode === "logoOnly" ? t.t("platform.entry.logo-only-mode-supports-landscape-or-square-images-up-to-512-kb", "纯 Logo 模式支持横向或正方形图片(最大 512 KB)") : t.t("platform.entry.logo-and-title-mode-requires-square-images-recommended-128-128-px-up-to-512-kb", "Logo + 标题模式仅支持正方形图片(建议 128 × 128 px,最大 512 KB)"),
1361
+ imageUploadAdvisory: ({ draft: e }, t = Ce) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => dn(e, t)
1362
1362
  }))
1363
1363
  ]
1364
1364
  },
@@ -1417,12 +1417,12 @@ function fn(e) {
1417
1417
  var pn = {
1418
1418
  key: 1,
1419
1419
  class: "employee-account-drawer"
1420
- }, mn = { class: "employee-account-existing-picker" }, hn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1420
+ }, mn = { class: "employee-account-existing-picker" }, hn = /*#__PURE__*/ L(/* @__PURE__ */ q({
1421
1421
  name: "EmployeeAccountDrawer",
1422
1422
  __name: "EmployeeAccountDrawer",
1423
1423
  props: { context: {} },
1424
1424
  setup(e) {
1425
- let t = A(), n = e, r = Y(), i = Y(), a = Y(""), o = Y(""), s = Y(!1), c = Y(!1);
1425
+ let t = F(), n = e, r = Y(), i = Y(), a = Y(""), o = Y(""), s = Y(!1), c = Y(!1);
1426
1426
  qe(() => void l());
1427
1427
  async function l() {
1428
1428
  let e = y();
@@ -1431,7 +1431,7 @@ var pn = {
1431
1431
  try {
1432
1432
  r.value = await n.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
1433
1433
  } catch (e) {
1434
- w(e, {
1434
+ I(e, {
1435
1435
  language: t,
1436
1436
  source: "employee-account",
1437
1437
  phase: "load"
@@ -1446,7 +1446,7 @@ var pn = {
1446
1446
  if (!e || c.value) return;
1447
1447
  let i = a.value.trim();
1448
1448
  if (!i || !o.value) {
1449
- Ce(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
1449
+ p(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
1450
1450
  language: t,
1451
1451
  source: "employee-account",
1452
1452
  phase: "validation"
@@ -1463,9 +1463,9 @@ var pn = {
1463
1463
  password: o.value
1464
1464
  }
1465
1465
  });
1466
- r.value = d(t).binding, o.value = "", n.context.refreshList();
1466
+ r.value = E(t).binding, o.value = "", n.context.refreshList();
1467
1467
  } catch (e) {
1468
- w(e, {
1468
+ I(e, {
1469
1469
  language: t,
1470
1470
  source: "employee-account",
1471
1471
  phase: "action"
@@ -1474,11 +1474,11 @@ var pn = {
1474
1474
  c.value = !1;
1475
1475
  }
1476
1476
  }
1477
- async function f(e) {
1477
+ async function d(e) {
1478
1478
  let t = e[0];
1479
- t && await p(t.id);
1479
+ t && await f(t.id);
1480
1480
  }
1481
- async function p(e) {
1481
+ async function f(e) {
1482
1482
  let a = y();
1483
1483
  if (a && e && !c.value) {
1484
1484
  c.value = !0;
@@ -1487,13 +1487,13 @@ var pn = {
1487
1487
  method: "POST",
1488
1488
  path: `/iam.employee/${encodeURIComponent(a)}/account`,
1489
1489
  body: { userId: e }
1490
- }), i.value = void 0, n.context.refreshList(), Ce(t.t("platform.screen.EmployeeAccountDrawer.the-account-is-bound-to-this-employee", "账号已绑定到当前职员。"), {
1490
+ }), i.value = void 0, n.context.refreshList(), p(t.t("platform.screen.EmployeeAccountDrawer.the-account-is-bound-to-this-employee", "账号已绑定到当前职员。"), {
1491
1491
  language: t,
1492
1492
  source: "employee-account",
1493
1493
  phase: "action"
1494
1494
  });
1495
1495
  } catch (e) {
1496
- w(e, {
1496
+ I(e, {
1497
1497
  language: t,
1498
1498
  source: "employee-account",
1499
1499
  phase: "action"
@@ -1566,7 +1566,7 @@ var pn = {
1566
1566
  path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
1567
1567
  }), r.value = void 0, n.context.refreshList();
1568
1568
  } catch (e) {
1569
- w(e, {
1569
+ I(e, {
1570
1570
  language: t,
1571
1571
  source: "employee-account",
1572
1572
  phase: "action"
@@ -1580,10 +1580,10 @@ var pn = {
1580
1580
  let e = n.context.record?.id;
1581
1581
  return e == null ? void 0 : String(e);
1582
1582
  }
1583
- return (e, n) => s.value ? (J(), B(Z(De), {
1583
+ return (e, n) => s.value ? (J(), B(Z(ee), {
1584
1584
  key: 0,
1585
1585
  tip: Z(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
1586
- }, null, 8, ["tip"])) : (J(), H("section", pn, [y() ? r.value ? (J(), H(R, { key: 1 }, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), G(Z(L), {
1586
+ }, null, 8, ["tip"])) : (J(), H("section", pn, [y() ? r.value ? (J(), H(R, { key: 1 }, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), G(Z(M), {
1587
1587
  danger: "",
1588
1588
  "icon-name": "delete",
1589
1589
  loading: c.value,
@@ -1591,7 +1591,7 @@ var pn = {
1591
1591
  }, {
1592
1592
  default: $(() => [W(X(Z(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
1593
1593
  _: 1
1594
- }, 8, ["loading"])], 64)) : (J(), H(R, { key: 2 }, [U("section", mn, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), G(Z(le), {
1594
+ }, 8, ["loading"])], 64)) : (J(), H(R, { key: 2 }, [U("section", mn, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), G(Z(fe), {
1595
1595
  value: i.value,
1596
1596
  disabled: c.value,
1597
1597
  placeholder: Z(t).t("platform.screen.EmployeeAccountDrawer.search-and-select-an-existing-login-account", "搜索并选择已有登录账号"),
@@ -1599,7 +1599,7 @@ var pn = {
1599
1599
  "search-page": m,
1600
1600
  "resolve-users": h,
1601
1601
  "onUpdate:value": n[0] ||= (e) => i.value = typeof e == "string" ? e : void 0,
1602
- onSelect: f
1602
+ onSelect: d
1603
1603
  }, null, 8, [
1604
1604
  "value",
1605
1605
  "disabled",
@@ -1607,7 +1607,7 @@ var pn = {
1607
1607
  "title"
1608
1608
  ])]), U("form", { onSubmit: it(u, ["prevent"]) }, [
1609
1609
  U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.you-can-also-create-a-login-account-and-bind-it", "也可直接创建登录账号并自动绑定到当前职员。")), 1),
1610
- U("label", null, [U("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), G(Z(P), {
1610
+ U("label", null, [U("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), G(Z(Te), {
1611
1611
  value: a.value,
1612
1612
  "onUpdate:value": n[1] ||= (e) => a.value = e,
1613
1613
  disabled: c.value,
@@ -1617,7 +1617,7 @@ var pn = {
1617
1617
  "disabled",
1618
1618
  "placeholder"
1619
1619
  ])]),
1620
- U("label", null, [U("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), G(Z(P), {
1620
+ U("label", null, [U("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), G(Z(Te), {
1621
1621
  value: o.value,
1622
1622
  "onUpdate:value": n[2] ||= (e) => o.value = e,
1623
1623
  type: "password",
@@ -1628,7 +1628,7 @@ var pn = {
1628
1628
  "disabled",
1629
1629
  "placeholder"
1630
1630
  ])]),
1631
- G(Z(L), {
1631
+ G(Z(M), {
1632
1632
  type: "primary",
1633
1633
  "html-type": "submit",
1634
1634
  "icon-name": "plus",
@@ -1663,7 +1663,7 @@ var pn = {
1663
1663
  }] }
1664
1664
  }, _n = "iam.user.session.collectionChanged", vn = /* @__PURE__ */ new WeakMap();
1665
1665
  function yn() {
1666
- let e = fe(), t = vn.get(e);
1666
+ let e = Se(), t = vn.get(e);
1667
1667
  t || (t = bn(e), vn.set(e, t));
1668
1668
  let n = t;
1669
1669
  return n.users += 1, Je(() => {
@@ -1703,7 +1703,7 @@ function bn(e) {
1703
1703
  ...Object.fromEntries(r.map((e) => [e.userId, e]))
1704
1704
  };
1705
1705
  } catch (e) {
1706
- o || w(e, {
1706
+ o || I(e, {
1707
1707
  source: "iam-user-online-status",
1708
1708
  phase: "load"
1709
1709
  });
@@ -1724,7 +1724,7 @@ function xn(e) {
1724
1724
  }
1725
1725
  //#endregion
1726
1726
  //#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
1727
- var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1727
+ var Sn = /*#__PURE__*/ L(/* @__PURE__ */ q({
1728
1728
  name: "UserOnlineStatusCell",
1729
1729
  __name: "UserOnlineStatusCell",
1730
1730
  props: {
@@ -1732,7 +1732,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1732
1732
  column: {}
1733
1733
  },
1734
1734
  setup(e) {
1735
- let t = A(), n = e, r = yn(), i = z(() => n.record.id == null ? void 0 : String(n.record.id)), a = z(() => r.statusOf(i.value)), o = z(() => {
1735
+ let t = F(), n = e, r = yn(), i = z(() => n.record.id == null ? void 0 : String(n.record.id)), a = z(() => r.statusOf(i.value)), o = z(() => {
1736
1736
  let e = a.value;
1737
1737
  if (!e) return "-";
1738
1738
  if (e.present) {
@@ -1761,17 +1761,17 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1761
1761
  }, wn = { key: 0 }, Tn = {
1762
1762
  key: 1,
1763
1763
  class: "user-password-reset"
1764
- }, En = { key: 0 }, Dn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1764
+ }, En = { key: 0 }, Dn = /*#__PURE__*/ L(/* @__PURE__ */ q({
1765
1765
  name: "UserPasswordDrawer",
1766
1766
  __name: "UserPasswordDrawer",
1767
1767
  props: { context: {} },
1768
1768
  setup(e) {
1769
- let t = A(), n = e, r = Y(""), i = Y(), a = Y(!1), o = z(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
1769
+ let t = F(), n = e, r = Y(""), i = Y(), a = Y(!1), o = z(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
1770
1770
  async function s() {
1771
1771
  let e = o.value;
1772
1772
  if (e && !a.value && n.context.module.can("changePassword", e) === !0) {
1773
1773
  if (!r.value) {
1774
- Ce(t.t("platform.screen.UserPasswordDrawer.enter-a-new-password", "请输入新密码。"), {
1774
+ p(t.t("platform.screen.UserPasswordDrawer.enter-a-new-password", "请输入新密码。"), {
1775
1775
  language: t,
1776
1776
  source: "iam-user-password",
1777
1777
  phase: "validation"
@@ -1784,13 +1784,13 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1784
1784
  method: "POST",
1785
1785
  path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
1786
1786
  body: { password: r.value }
1787
- }), r.value = "", Ce(t.t("platform.screen.UserPasswordDrawer.password-changed", "密码已修改。"), {
1787
+ }), r.value = "", p(t.t("platform.screen.UserPasswordDrawer.password-changed", "密码已修改。"), {
1788
1788
  language: t,
1789
1789
  source: "iam-user-password",
1790
1790
  phase: "action"
1791
1791
  }), n.context.refreshList(), n.context.refreshDetailExtensions();
1792
1792
  } catch (e) {
1793
- w(e, {
1793
+ I(e, {
1794
1794
  language: t,
1795
1795
  source: "iam-user-password",
1796
1796
  phase: "action"
@@ -1810,7 +1810,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1810
1810
  path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
1811
1811
  }), n.context.refreshList(), n.context.refreshDetailExtensions();
1812
1812
  } catch (e) {
1813
- w(e, {
1813
+ I(e, {
1814
1814
  language: t,
1815
1815
  source: "iam-user-password",
1816
1816
  phase: "action"
@@ -1822,7 +1822,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1822
1822
  }
1823
1823
  return (n, l) => o.value ? (J(), H("section", Cn, [e.context.module.can("changePassword", o.value) === !0 ? (J(), H("label", wn, [
1824
1824
  U("span", null, X(Z(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
1825
- G(Z(P), {
1825
+ G(Z(Te), {
1826
1826
  value: r.value,
1827
1827
  "onUpdate:value": l[0] ||= (e) => r.value = e,
1828
1828
  type: "password",
@@ -1833,7 +1833,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1833
1833
  "disabled",
1834
1834
  "placeholder"
1835
1835
  ]),
1836
- G(Z(L), {
1836
+ G(Z(M), {
1837
1837
  type: "primary",
1838
1838
  loading: a.value,
1839
1839
  onClick: s
@@ -1843,7 +1843,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1843
1843
  }, 8, ["loading"])
1844
1844
  ])) : V("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (J(), H("section", Tn, [
1845
1845
  U("p", null, X(Z(t).t("platform.screen.UserPasswordDrawer.generate-a-temporary-password-deliver-it-to-the-user-through", "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。")), 1),
1846
- G(Z(L), {
1846
+ G(Z(M), {
1847
1847
  loading: a.value,
1848
1848
  onClick: c
1849
1849
  }, {
@@ -1861,7 +1861,7 @@ var Sn = /*#__PURE__*/ M(/* @__PURE__ */ q({
1861
1861
  //#endregion
1862
1862
  //#region src/platform-admin-runtime/user/useUserSessionRows.ts
1863
1863
  function On(e) {
1864
- let t = e.language ?? pe, r = Y([]), i = Y({}), a = n({ load: async (e) => {
1864
+ let t = e.language ?? Ce, r = Y([]), i = Y({}), a = n({ load: async (e) => {
1865
1865
  await Promise.all(e.keys.map((t) => s(t, e.isLatest)));
1866
1866
  } });
1867
1867
  function o(e) {
@@ -1887,8 +1887,8 @@ function On(e) {
1887
1887
  });
1888
1888
  } catch (i) {
1889
1889
  if (!r(n)) return;
1890
- let a = x(i);
1891
- w(a, {
1890
+ let a = w(i);
1891
+ I(a, {
1892
1892
  language: t,
1893
1893
  source: `${e.source}-sessions`,
1894
1894
  phase: "load"
@@ -1956,7 +1956,7 @@ var kn = {
1956
1956
  __name: "UserSessionListExpansion",
1957
1957
  props: { context: {} },
1958
1958
  setup(e) {
1959
- let t = A(), n = e, i = z(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), a = On({
1959
+ let t = F(), n = e, i = z(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), a = On({
1960
1960
  context: n.context.module,
1961
1961
  source: "iam-user-list-expansion",
1962
1962
  language: t
@@ -1993,7 +1993,7 @@ var kn = {
1993
1993
  body: { sessionIds: r }
1994
1994
  }), a.loadUserSessions(e));
1995
1995
  }
1996
- return (t, n) => (J(), B(Z(E), {
1996
+ return (t, n) => (J(), B(Z(A), {
1997
1997
  embedded: "",
1998
1998
  sessions: o.value.records,
1999
1999
  loading: o.value.loading,
@@ -2054,11 +2054,11 @@ var kn = {
2054
2054
  form: {
2055
2055
  contributions: [{
2056
2056
  key: "scheduled-targets",
2057
- component: /* @__PURE__ */ M(/* @__PURE__ */ q({
2057
+ component: /* @__PURE__ */ L(/* @__PURE__ */ q({
2058
2058
  __name: "ScheduledActionTargetFields",
2059
2059
  props: { context: {} },
2060
2060
  setup(e) {
2061
- let t = e, n = A(), r = fe(), i = Y([]), a = Y(!0), o = Y(!1), s = Y(!0), c = Y(!0), l = 0, u = z(() => String(t.context.draft.moduleAlias ?? "")), d = z(() => String(t.context.draft.actionCode ?? "")), f = z(() => JSON.stringify([
2061
+ let t = e, n = F(), r = Se(), i = Y([]), a = Y(!0), o = Y(!1), s = Y(!0), c = Y(!0), l = 0, u = z(() => String(t.context.draft.moduleAlias ?? "")), d = z(() => String(t.context.draft.actionCode ?? "")), f = z(() => JSON.stringify([
2062
2062
  t.context.formSessionKey,
2063
2063
  t.context.draft.executionTenantId,
2064
2064
  n.languageTag.value
@@ -2147,7 +2147,7 @@ var kn = {
2147
2147
  return t.context.fields.find((t) => t.fieldName === e)?.label ?? e;
2148
2148
  }
2149
2149
  return (e, t) => (J(), H("div", An, [
2150
- U("label", null, [U("span", null, X(S("moduleAlias")), 1), G(Z(me), {
2150
+ U("label", null, [U("span", null, X(S("moduleAlias")), 1), G(Z(N), {
2151
2151
  value: u.value || void 0,
2152
2152
  provider: _.value,
2153
2153
  "reload-key": f.value,
@@ -2161,7 +2161,7 @@ var kn = {
2161
2161
  "reload-key",
2162
2162
  "disabled"
2163
2163
  ])]),
2164
- U("label", null, [U("span", null, X(S("actionCode")), 1), G(Z(me), {
2164
+ U("label", null, [U("span", null, X(S("actionCode")), 1), G(Z(N), {
2165
2165
  value: d.value || void 0,
2166
2166
  provider: v.value,
2167
2167
  "reload-key": `${f.value}:${u.value}`,
@@ -2267,7 +2267,7 @@ function Wn(e) {
2267
2267
  }
2268
2268
  function Gn(e, t) {
2269
2269
  let n = qn(e), r = n.source;
2270
- if (!Ee(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !ce(r, t)) return;
2270
+ if (!T(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !be(r, t)) return;
2271
2271
  let i = {};
2272
2272
  for (let [e, t] of Object.entries(qn(n.languages))) {
2273
2273
  let n = qn(t);
@@ -2320,40 +2320,40 @@ var tr = /* @__PURE__ */ q({
2320
2320
  __name: "RoleScopeTree",
2321
2321
  props: { context: {} },
2322
2322
  setup(e) {
2323
- let t = A(), n = e, r = zn(fe()), i = Y(), a = Y(""), o = Y(!1), s = Y([]), c = Y([]), l = Y(0), u = Y(/* @__PURE__ */ new Map()), d = z(() => n.context.selectionKey), f = z(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), p = z(() => i.value?.navigations.length !== 0), m = z(() => f.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), h = _e({
2323
+ let t = F(), n = e, r = zn(Se()), i = Y(), a = Y(""), o = Y(!1), s = Y([]), c = Y([]), l = Y(0), u = Y(/* @__PURE__ */ new Map()), d = z(() => n.context.selectionKey), p = z(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), m = z(() => i.value?.navigations.length !== 0), h = z(() => p.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), g = x({
2324
2324
  nodes: () => s.value,
2325
- loader: () => ne,
2325
+ loader: () => j,
2326
2326
  version: () => l.value
2327
- }), g = z(() => _(h.nodes.value));
2328
- function _(e) {
2327
+ }), v = z(() => y(g.nodes.value));
2328
+ function y(e) {
2329
2329
  return e.map((e) => ({
2330
2330
  ...e,
2331
- title: D(e.title, u.value.get(e.key)?.labelText, t),
2332
- ...e.children ? { children: _(e.children) } : {}
2331
+ title: f(e.title, u.value.get(e.key)?.labelText, t),
2332
+ ...e.children ? { children: y(e.children) } : {}
2333
2333
  }));
2334
2334
  }
2335
- let y = h.states, b = 0, x;
2336
- qe(() => void S()), Ke(() => {
2337
- b += 1, x && clearTimeout(x);
2335
+ let b = g.states, S = 0, C;
2336
+ qe(() => void w()), Ke(() => {
2337
+ S += 1, C && clearTimeout(C);
2338
2338
  }), Q(a, () => {
2339
- p.value && (x && clearTimeout(x), x = setTimeout(() => void C(), 240));
2339
+ m.value && (C && clearTimeout(C), C = setTimeout(() => void E(), 240));
2340
2340
  });
2341
- async function S() {
2341
+ async function w() {
2342
2342
  o.value = !0;
2343
2343
  try {
2344
2344
  i.value = await r.descriptor();
2345
2345
  let e = i.value.directSelections[0], t = i.value.directSelections.find((e) => e.selectionKey === n.context.selectionKey);
2346
- t?.labelText && j({
2346
+ t?.labelText && re({
2347
2347
  key: t.selectionKey,
2348
2348
  label: t.label,
2349
2349
  labelText: t.labelText
2350
- }), !n.context.selectionKey && e && j({
2350
+ }), !n.context.selectionKey && e && re({
2351
2351
  key: e.selectionKey,
2352
2352
  label: e.label,
2353
2353
  labelText: e.labelText
2354
- }), await ee();
2354
+ }), await T();
2355
2355
  } catch (e) {
2356
- w(e, {
2356
+ I(e, {
2357
2357
  language: t,
2358
2358
  source: "role-scope-tree",
2359
2359
  phase: "load"
@@ -2362,34 +2362,34 @@ var tr = /* @__PURE__ */ q({
2362
2362
  o.value = !1;
2363
2363
  }
2364
2364
  }
2365
- async function ee(e = {}) {
2365
+ async function T(e = {}) {
2366
2366
  let n = i.value;
2367
2367
  if (!n) return;
2368
- let r = ++b;
2368
+ let r = ++S;
2369
2369
  if (!e.append) {
2370
2370
  c.value = [], l.value += 1, o.value = !0;
2371
2371
  try {
2372
- let e = T(n);
2373
- if (r !== b) return;
2374
- u.value = /* @__PURE__ */ new Map(), k(e), s.value = e.map((e) => e.ui);
2372
+ let e = D(n);
2373
+ if (r !== S) return;
2374
+ u.value = /* @__PURE__ */ new Map(), te(e), s.value = e.map((e) => e.ui);
2375
2375
  } catch (e) {
2376
- if (r !== b) return;
2377
- s.value = [], w(e, {
2376
+ if (r !== S) return;
2377
+ s.value = [], I(e, {
2378
2378
  language: t,
2379
2379
  source: "role-scope-tree",
2380
2380
  phase: "load"
2381
2381
  });
2382
2382
  } finally {
2383
- r === b && (o.value = !1);
2383
+ r === S && (o.value = !1);
2384
2384
  }
2385
2385
  }
2386
2386
  }
2387
- async function C() {
2388
- if (await ee(), !a.value.trim()) return;
2387
+ async function E() {
2388
+ if (await T(), !a.value.trim()) return;
2389
2389
  let e = (i.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
2390
- c.value = e, await He(), await Promise.all(e.map((e) => h.request(e, "refresh")));
2390
+ c.value = e, await He(), await Promise.all(e.map((e) => g.request(e, "refresh")));
2391
2391
  }
2392
- function T(e) {
2392
+ function D(e) {
2393
2393
  return [
2394
2394
  ...e.directSelections.map((e) => ({
2395
2395
  ui: {
@@ -2404,11 +2404,11 @@ var tr = /* @__PURE__ */ q({
2404
2404
  labelText: e.labelText
2405
2405
  }
2406
2406
  })),
2407
- ...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => E(e)),
2408
- ...e.navigations.filter((e) => e.level === "TENANT").map((e) => E(e))
2407
+ ...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => O(e)),
2408
+ ...e.navigations.filter((e) => e.level === "TENANT").map((e) => O(e))
2409
2409
  ];
2410
2410
  }
2411
- function E(e) {
2411
+ function O(e) {
2412
2412
  return {
2413
2413
  ui: {
2414
2414
  key: `navigation:${e.navigationKey}`,
@@ -2422,8 +2422,8 @@ var tr = /* @__PURE__ */ q({
2422
2422
  }
2423
2423
  };
2424
2424
  }
2425
- function te(e, t, n) {
2426
- let r = O(e, t, n);
2425
+ function k(e, t, n) {
2426
+ let r = A(e, t, n);
2427
2427
  return {
2428
2428
  ui: {
2429
2429
  key: e.selectionKey,
@@ -2439,7 +2439,7 @@ var tr = /* @__PURE__ */ q({
2439
2439
  children: r
2440
2440
  };
2441
2441
  }
2442
- function O(e, t, n) {
2442
+ function A(e, t, n) {
2443
2443
  return t === "TENANT" ? {
2444
2444
  navigationKey: e.selectionKey,
2445
2445
  level: "ORGANIZATION"
@@ -2449,7 +2449,7 @@ var tr = /* @__PURE__ */ q({
2449
2449
  parentId: e.id
2450
2450
  } : void 0;
2451
2451
  }
2452
- async function ne(e, n) {
2452
+ async function j(e, n) {
2453
2453
  let i = u.value.get(e.key);
2454
2454
  if (!i?.children) throw Error(t.t("platform.screen.RoleScopeTree.the-role-ownership-scope-is-no-longer-available", "角色归属范围已失效"));
2455
2455
  try {
@@ -2459,71 +2459,71 @@ var tr = /* @__PURE__ */ q({
2459
2459
  pageNum: n.reason === "load-more" ? Number(n.cursor) : 1
2460
2460
  });
2461
2461
  n.signal.throwIfAborted();
2462
- let t = e.records.map((e) => te(e, i.children.level, i.children.navigationKey));
2463
- return k(t), {
2462
+ let t = e.records.map((e) => k(e, i.children.level, i.children.navigationKey));
2463
+ return te(t), {
2464
2464
  mode: n.reason === "load-more" ? "append" : "replace",
2465
2465
  nodes: t.map((e) => e.ui),
2466
2466
  hasMore: e.hasMore,
2467
2467
  nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
2468
2468
  };
2469
2469
  } catch (e) {
2470
- throw n.signal.aborted || w(e, {
2470
+ throw n.signal.aborted || I(e, {
2471
2471
  language: t,
2472
2472
  source: "role-scope-tree",
2473
2473
  phase: "load"
2474
2474
  }), e;
2475
2475
  }
2476
2476
  }
2477
- function k(e) {
2477
+ function te(e) {
2478
2478
  let t = new Map(u.value);
2479
2479
  e.forEach((e) => t.set(e.ui.key, e)), u.value = t;
2480
2480
  }
2481
- function re(e) {
2481
+ function ne(e) {
2482
2482
  let t = u.value.get(e.key)?.selection;
2483
- t && j(t);
2483
+ t && re(t);
2484
2484
  }
2485
- function j(e) {
2485
+ function re(e) {
2486
2486
  n.context.selectSelectionKey(e.key, {
2487
2487
  label: e.label,
2488
2488
  ...e.labelText ? { labelText: e.labelText } : {},
2489
2489
  secondaryLabel: e.secondaryLabel
2490
2490
  });
2491
2491
  }
2492
- function ae() {
2492
+ function ie() {
2493
2493
  let e = i.value?.directSelections[0];
2494
- e && j({
2494
+ e && re({
2495
2495
  key: e.selectionKey,
2496
2496
  label: e.label,
2497
2497
  labelText: e.labelText
2498
2498
  });
2499
2499
  }
2500
- return (e, n) => (J(), B(Z(ie), {
2500
+ return (e, n) => (J(), B(Z(xe), {
2501
2501
  class: "role-scope-tree",
2502
- title: m.value,
2502
+ title: h.value,
2503
2503
  "refresh-title": Z(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
2504
2504
  "search-keyword": a.value,
2505
2505
  "search-placeholder": Z(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
2506
- searchable: p.value,
2507
- onRefresh: ee,
2506
+ searchable: m.value,
2507
+ onRefresh: T,
2508
2508
  "onUpdate:searchKeyword": n[3] ||= (e) => a.value = e
2509
2509
  }, {
2510
- default: $(() => [o.value ? (J(), B(Z(De), {
2510
+ default: $(() => [o.value ? (J(), B(Z(ee), {
2511
2511
  key: 0,
2512
2512
  tip: Z(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
2513
- }, null, 8, ["tip"])) : (J(), B(Z(v), {
2513
+ }, null, 8, ["tip"])) : (J(), B(Z(_), {
2514
2514
  key: 1,
2515
2515
  "expanded-keys": c.value,
2516
2516
  "onUpdate:expandedKeys": n[0] ||= (e) => c.value = e,
2517
- nodes: g.value,
2517
+ nodes: v.value,
2518
2518
  "selected-key": d.value,
2519
2519
  "reload-key": l.value,
2520
2520
  "load-strategy": "controlled",
2521
2521
  "reload-on-reexpand": "",
2522
- "branch-states": Z(y),
2523
- onLoadRequest: n[1] ||= (e) => Z(h).request(e.node.key, e.reason, Z(h).stateOf(e.node.key).status === "error"),
2524
- onSelect: re,
2525
- onDeselect: ae,
2526
- onUnloadChildren: n[2] ||= (e) => Z(h).release(e.key)
2522
+ "branch-states": Z(b),
2523
+ onLoadRequest: n[1] ||= (e) => Z(g).request(e.node.key, e.reason, Z(g).stateOf(e.node.key).status === "error"),
2524
+ onSelect: ne,
2525
+ onDeselect: ie,
2526
+ onUnloadChildren: n[2] ||= (e) => Z(g).release(e.key)
2527
2527
  }, null, 8, [
2528
2528
  "expanded-keys",
2529
2529
  "nodes",
@@ -2548,7 +2548,7 @@ var tr = /* @__PURE__ */ q({
2548
2548
  column: {}
2549
2549
  },
2550
2550
  setup(e) {
2551
- let t = A(), n = e, r = z(() => {
2551
+ let t = F(), n = e, r = z(() => {
2552
2552
  let e = String(n.record[n.column?.key ?? ""] ?? "");
2553
2553
  return {
2554
2554
  account: t.t("platform.screen.RoleManagementView.account-role", "账号角色"),
@@ -2686,7 +2686,7 @@ var ir = {
2686
2686
  }, sr = { class: "role-account-grant-search" }, cr = {
2687
2687
  key: 0,
2688
2688
  class: "role-account-grant-selected"
2689
- }, lr = { class: "role-account-grant-selected-title" }, ur = { class: "role-account-grant-selected-list" }, dr = ["disabled", "onClick"], fr = 20, pr = /*#__PURE__*/ M(/* @__PURE__ */ q({
2689
+ }, lr = { class: "role-account-grant-selected-title" }, ur = { class: "role-account-grant-selected-list" }, dr = ["disabled", "onClick"], fr = 20, pr = /*#__PURE__*/ L(/* @__PURE__ */ q({
2690
2690
  name: "RoleAccountGrantDrawer",
2691
2691
  __name: "RoleAccountGrantDrawer",
2692
2692
  props: {
@@ -2699,25 +2699,25 @@ var ir = {
2699
2699
  },
2700
2700
  emits: ["close", "saved"],
2701
2701
  setup(e, { emit: t }) {
2702
- let n = A(), r = e, i = t, a = Y([]), o = Y({}), s = Y([]), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(""), d = Y(""), f = Y(1), p = Y(0), m = Y(!1), h = Y(!1), g = Y(!1), _ = Y(!1), v = Y(), x = z(() => rr(r.context.http)), ee = ye({ moduleAlias: "iam.tenant" }), C = z(() => r.role?.id), T = z(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: Oe(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), E = z(() => r.embedded ? "section" : y), D = z(() => r.embedded ? {} : {
2702
+ let n = F(), r = e, i = t, a = Y([]), o = Y({}), s = Y([]), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(""), d = Y(""), f = Y(1), p = Y(0), m = Y(!1), h = Y(!1), g = Y(!1), _ = Y(!1), b = Y(), x = z(() => rr(r.context.http)), C = se({ moduleAlias: "iam.tenant" }), w = z(() => r.role?.id), T = z(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: Oe(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), E = z(() => r.embedded ? "section" : v), D = z(() => r.embedded ? {} : {
2703
2703
  open: r.open,
2704
2704
  title: T.value,
2705
2705
  renderMode: r.container ? "inline" : "portal",
2706
2706
  closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
2707
- onClose: ge
2708
- }), O = z(() => r.role?.ownerScopeType === "platform"), ne = z(() => v.value?.id), k = z(() => !O.value || !!ne.value), re = z(() => ee), j = z(() => {
2707
+ onClose: ye
2708
+ }), k = z(() => r.role?.ownerScopeType === "platform"), A = z(() => b.value?.id), j = z(() => !k.value || !!A.value), te = z(() => C), ne = z(() => {
2709
2709
  let e = /* @__PURE__ */ new Map();
2710
2710
  for (let t of a.value) t.userId && e.set(t.userId, t);
2711
2711
  return e;
2712
- }), ie = z(() => s.value.filter((e) => e.id).map((e) => ({
2712
+ }), re = z(() => s.value.filter((e) => e.id).map((e) => ({
2713
2713
  id: e.id,
2714
- username: we(e),
2714
+ username: De(e),
2715
2715
  employeeNo: e.employeeNo ?? "",
2716
2716
  employeeTitle: e.employeeTitle ?? "",
2717
2717
  organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
2718
2718
  departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
2719
2719
  boundTitle: l.value.has(e.id) ? n.t("platform.screen.RoleAccountGrantDrawer.assigned", "已绑定") : n.t("platform.screen.MetadataGovernanceSurface.unbound", "未绑定")
2720
- }))), ae = z(() => [...c.value].map((e) => o.value[e] ?? Ce(e))), M = z(() => [...c.value].filter((e) => !l.value.has(e))), N = z(() => [...l.value].filter((e) => !c.value.has(e))), F = z(() => M.value.length > 0 || N.value.length > 0), oe = {
2720
+ }))), ie = z(() => [...c.value].map((e) => o.value[e] ?? Ee(e))), N = z(() => [...c.value].filter((e) => !l.value.has(e))), ae = z(() => [...l.value].filter((e) => !c.value.has(e))), P = z(() => N.value.length > 0 || ae.value.length > 0), ce = {
2721
2721
  rowKey: "id",
2722
2722
  columns: [
2723
2723
  {
@@ -2751,81 +2751,81 @@ var ir = {
2751
2751
  width: 90
2752
2752
  }
2753
2753
  ]
2754
- }, se = z(() => ({
2754
+ }, le = z(() => ({
2755
2755
  selectedRowKeys: [...c.value],
2756
2756
  preserveSelectedRowKeys: !0,
2757
2757
  disabledOf: () => g.value,
2758
2758
  onChange: (e) => {
2759
2759
  c.value = new Set(e.map((e) => String(e)));
2760
2760
  }
2761
- })), ce = z(() => ({
2761
+ })), ue = z(() => ({
2762
2762
  current: f.value,
2763
2763
  total: p.value,
2764
2764
  pageSize: fr,
2765
2765
  showSizeChanger: !1,
2766
2766
  showQuickJumper: !1,
2767
- onChange: (e) => void de(e)
2767
+ onChange: (e) => void me(e)
2768
2768
  }));
2769
2769
  Q(() => [r.open, r.role?.id], ([e]) => {
2770
- e ? ue() : _e();
2770
+ e ? pe() : be();
2771
2771
  }, { immediate: !0 }), Q([
2772
2772
  () => r.embedded,
2773
2773
  () => r.drawerContext,
2774
2774
  c,
2775
- F,
2776
- k,
2777
- M,
2775
+ P,
2776
+ j,
2778
2777
  N,
2778
+ ae,
2779
2779
  g,
2780
2780
  m
2781
- ], I, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
2782
- function I() {
2781
+ ], de, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
2782
+ function de() {
2783
2783
  let e = r.drawerContext;
2784
2784
  r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
2785
2785
  value1: Oe(r.role ?? {}),
2786
2786
  value2: ke(r.role)
2787
2787
  })), e.setOperation({
2788
- summary: le(),
2788
+ summary: fe(),
2789
2789
  actions: [{
2790
2790
  key: "cancel-account-role-grants",
2791
2791
  label: n.t("platform.action.cancel", "取消"),
2792
2792
  disabled: g.value || m.value,
2793
- run: ge
2793
+ run: ye
2794
2794
  }, {
2795
2795
  key: "save-account-role-grants",
2796
2796
  label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
2797
2797
  emphasis: "primary",
2798
- disabled: m.value || !k.value || !F.value,
2798
+ disabled: m.value || !j.value || !P.value,
2799
2799
  loading: g.value,
2800
- run: () => void me()
2800
+ run: () => void ve()
2801
2801
  }]
2802
2802
  }));
2803
2803
  }
2804
- function le() {
2805
- return k.value ? F.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
2804
+ function fe() {
2805
+ return j.value ? P.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
2806
2806
  value1: c.value.size,
2807
- value2: M.value.length,
2808
- value3: N.value.length
2807
+ value2: N.value.length,
2808
+ value3: ae.value.length
2809
2809
  }) : n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected", "已选 {value1} 个用户", { value1: c.value.size }) : n.t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant", "请选择目标租户");
2810
2810
  }
2811
- async function ue() {
2812
- let e = C.value;
2811
+ async function pe() {
2812
+ let e = w.value;
2813
2813
  if (!e) {
2814
- _e();
2814
+ be();
2815
2815
  return;
2816
2816
  }
2817
- if (!k.value) {
2818
- ve();
2817
+ if (!j.value) {
2818
+ xe();
2819
2819
  return;
2820
2820
  }
2821
2821
  m.value = !0, _.value = !1;
2822
2822
  try {
2823
- let t = await x.value.accountRoleGrants(e, ne.value);
2823
+ let t = await x.value.accountRoleGrants(e, A.value);
2824
2824
  a.value = t;
2825
2825
  let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
2826
- l.value = n, c.value = new Set(n), o.value = Se([...t.map((e) => Ce(e.userId)).filter((e) => !!e)]), await de(1);
2826
+ l.value = n, c.value = new Set(n), o.value = we([...t.map((e) => Ee(e.userId)).filter((e) => !!e)]), await me(1);
2827
2827
  } catch (e) {
2828
- _.value = !0, w(e, {
2828
+ _.value = !0, I(e, {
2829
2829
  language: n,
2830
2830
  source: "role-account-grants",
2831
2831
  phase: "load"
@@ -2834,13 +2834,13 @@ var ir = {
2834
2834
  m.value = !1;
2835
2835
  }
2836
2836
  }
2837
- async function de(e) {
2838
- let t = C.value;
2839
- if (t && k.value) {
2837
+ async function me(e) {
2838
+ let t = w.value;
2839
+ if (t && j.value) {
2840
2840
  h.value = !0;
2841
2841
  try {
2842
2842
  let n = await x.value.accountRoleCandidates(t, {
2843
- targetTenantId: ne.value,
2843
+ targetTenantId: A.value,
2844
2844
  keyword: d.value,
2845
2845
  enabledOnly: !0,
2846
2846
  page: {
@@ -2850,10 +2850,10 @@ var ir = {
2850
2850
  });
2851
2851
  s.value = n.records, o.value = {
2852
2852
  ...o.value,
2853
- ...Se(n.records)
2853
+ ...we(n.records)
2854
2854
  }, f.value = n.pageNum, p.value = n.total;
2855
2855
  } catch (e) {
2856
- w(e, {
2856
+ I(e, {
2857
2857
  language: n,
2858
2858
  source: "role-account-grants",
2859
2859
  phase: "load"
@@ -2863,31 +2863,31 @@ var ir = {
2863
2863
  }
2864
2864
  }
2865
2865
  }
2866
- function fe() {
2867
- d.value = u.value.trim(), de(0);
2866
+ function he() {
2867
+ d.value = u.value.trim(), me(0);
2868
2868
  }
2869
- function pe(e, t) {
2869
+ function ge(e, t) {
2870
2870
  let n = new Set(c.value);
2871
2871
  t ? n.add(e) : n.delete(e), c.value = n;
2872
2872
  }
2873
- async function me() {
2874
- let e = C.value;
2875
- if (e && k.value) {
2876
- if (!F.value) {
2873
+ async function ve() {
2874
+ let e = w.value;
2875
+ if (e && j.value) {
2876
+ if (!P.value) {
2877
2877
  i("close");
2878
2878
  return;
2879
2879
  }
2880
2880
  g.value = !0;
2881
2881
  try {
2882
- for (let t of M.value) await x.value.grantAccountRole(e, {
2882
+ for (let t of N.value) await x.value.grantAccountRole(e, {
2883
2883
  userId: t,
2884
- targetTenantId: ne.value
2884
+ targetTenantId: A.value
2885
2885
  });
2886
- for (let t of N.value) {
2887
- let n = j.value.get(t)?.id;
2888
- n && await x.value.deleteAccountRoleGrant(e, n, ne.value);
2886
+ for (let t of ae.value) {
2887
+ let n = ne.value.get(t)?.id;
2888
+ n && await x.value.deleteAccountRoleGrant(e, n, A.value);
2889
2889
  }
2890
- await Te({
2890
+ await oe({
2891
2891
  success: !0,
2892
2892
  message: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
2893
2893
  }, {
@@ -2897,7 +2897,7 @@ var ir = {
2897
2897
  fallbackMessage: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
2898
2898
  }), i("saved"), i("close");
2899
2899
  } catch (e) {
2900
- w(e, {
2900
+ I(e, {
2901
2901
  language: n,
2902
2902
  source: "role-account-grants",
2903
2903
  phase: "action"
@@ -2907,110 +2907,110 @@ var ir = {
2907
2907
  }
2908
2908
  }
2909
2909
  }
2910
- function ge() {
2910
+ function ye() {
2911
2911
  g.value || i("close");
2912
2912
  }
2913
- function _e() {
2914
- v.value = void 0, ve();
2913
+ function be() {
2914
+ b.value = void 0, xe();
2915
2915
  }
2916
- function ve() {
2916
+ function xe() {
2917
2917
  a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", f.value = 1, p.value = 0, m.value = !1, h.value = !1, g.value = !1, _.value = !1;
2918
2918
  }
2919
- async function be(e) {
2919
+ async function Se(e) {
2920
2920
  if (!e) {
2921
- v.value = void 0, ve();
2921
+ b.value = void 0, xe();
2922
2922
  return;
2923
2923
  }
2924
- let t = await ee.crud.view(e);
2925
- v.value = t ?? {
2924
+ let t = await C.crud.view(e);
2925
+ b.value = t ?? {
2926
2926
  id: e,
2927
2927
  title: e
2928
- }, await ue();
2928
+ }, await pe();
2929
2929
  }
2930
- function xe(e) {
2931
- pe(e, !1);
2930
+ function Ce(e) {
2931
+ ge(e, !1);
2932
2932
  }
2933
- function Se(e) {
2933
+ function we(e) {
2934
2934
  let t = {};
2935
2935
  for (let n of e) n.id && (t[n.id] = n);
2936
2936
  return t;
2937
2937
  }
2938
- function Ce(e) {
2938
+ function Ee(e) {
2939
2939
  return e ? {
2940
2940
  id: e,
2941
2941
  username: e
2942
2942
  } : void 0;
2943
2943
  }
2944
- function we(e) {
2944
+ function De(e) {
2945
2945
  return String(e?.username ?? e?.id ?? n.t("platform.screen.RoleAccountGrantDrawer.unknown-user", "未知用户"));
2946
2946
  }
2947
- function Ee(e) {
2947
+ function L(e) {
2948
2948
  return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
2949
2949
  }
2950
2950
  function Oe(e) {
2951
- return String(te(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
2951
+ return String(O(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
2952
2952
  }
2953
2953
  function ke(e) {
2954
2954
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
2955
2955
  }
2956
2956
  return (t, r) => (J(), B(Qe(E.value), Ve(D.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), Re({
2957
- default: $(() => [m.value ? (J(), B(Z(De), {
2957
+ default: $(() => [m.value ? (J(), B(Z(ee), {
2958
2958
  key: 0,
2959
2959
  class: "role-account-grant-drawer-state",
2960
2960
  tip: Z(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
2961
2961
  }, null, 8, ["tip"])) : _.value ? (J(), H("div", ir, [G(Z(S), {
2962
2962
  title: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
2963
2963
  message: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
2964
- }, null, 8, ["title", "message"]), G(Z(L), {
2964
+ }, null, 8, ["title", "message"]), G(Z(M), {
2965
2965
  type: "primary",
2966
2966
  "icon-name": "reload",
2967
- onClick: ue
2967
+ onClick: pe
2968
2968
  }, {
2969
2969
  default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
2970
2970
  _: 1
2971
2971
  })])) : (J(), H("section", {
2972
2972
  key: 2,
2973
- class: Ue(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": O.value }])
2974
- }, [O.value ? (J(), H("label", ar, [U("span", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), G(Z(he), {
2975
- context: re.value,
2976
- value: ne.value,
2973
+ class: Ue(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": k.value }])
2974
+ }, [k.value ? (J(), H("label", ar, [U("span", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), G(Z(_e), {
2975
+ context: te.value,
2976
+ value: A.value,
2977
2977
  mode: "list",
2978
2978
  placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
2979
2979
  disabled: g.value || m.value,
2980
- "onUpdate:value": be
2980
+ "onUpdate:value": Se
2981
2981
  }, null, 8, [
2982
2982
  "context",
2983
2983
  "value",
2984
2984
  "placeholder",
2985
2985
  "disabled"
2986
- ])])) : V("v-if", !0), k.value ? (J(), H(R, { key: 2 }, [
2987
- U("div", sr, [G(Z(P), {
2986
+ ])])) : V("v-if", !0), j.value ? (J(), H(R, { key: 2 }, [
2987
+ U("div", sr, [G(Z(Te), {
2988
2988
  value: u.value,
2989
2989
  "allow-clear": "",
2990
2990
  disabled: g.value,
2991
2991
  placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
2992
2992
  "onUpdate:value": r[0] ||= (e) => u.value = e,
2993
- onKeydown: rt(fe, ["enter"])
2993
+ onKeydown: rt(he, ["enter"])
2994
2994
  }, null, 8, [
2995
2995
  "value",
2996
2996
  "disabled",
2997
2997
  "placeholder"
2998
- ]), G(Z(L), {
2998
+ ]), G(Z(M), {
2999
2999
  "icon-name": "search",
3000
3000
  disabled: g.value,
3001
- onClick: fe
3001
+ onClick: he
3002
3002
  }, {
3003
3003
  default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
3004
3004
  _: 1
3005
3005
  }, 8, ["disabled"])]),
3006
- G(Z(b), {
3006
+ G(Z(y), {
3007
3007
  class: "role-account-grant-table",
3008
3008
  size: "middle",
3009
- contract: oe,
3010
- rows: ie.value,
3009
+ contract: ce,
3010
+ rows: re.value,
3011
3011
  loading: h.value,
3012
- pagination: ce.value,
3013
- selection: se.value,
3012
+ pagination: ue.value,
3013
+ selection: le.value,
3014
3014
  "fill-height": ""
3015
3015
  }, null, 8, [
3016
3016
  "rows",
@@ -3018,27 +3018,27 @@ var ir = {
3018
3018
  "pagination",
3019
3019
  "selection"
3020
3020
  ]),
3021
- ae.value.length > 0 ? (J(), H("section", cr, [U("div", lr, [U("strong", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), U("span", null, X(ae.value.length), 1)]), U("div", ur, [(J(!0), H(R, null, Xe(ae.value, (e) => (J(), H("button", {
3021
+ ie.value.length > 0 ? (J(), H("section", cr, [U("div", lr, [U("strong", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), U("span", null, X(ie.value.length), 1)]), U("div", ur, [(J(!0), H(R, null, Xe(ie.value, (e) => (J(), H("button", {
3022
3022
  key: e.id,
3023
3023
  type: "button",
3024
3024
  disabled: g.value,
3025
- onClick: (t) => xe(e.id)
3026
- }, [U("span", null, X(we(e)), 1), U("small", null, X(Ee(e)), 1)], 8, dr))), 128))])])) : V("v-if", !0)
3025
+ onClick: (t) => Ce(e.id)
3026
+ }, [U("span", null, X(De(e)), 1), U("small", null, X(L(e)), 1)], 8, dr))), 128))])])) : V("v-if", !0)
3027
3027
  ], 64)) : (J(), H("div", or, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant-for-a-platform-shared-role-before", "平台共享角色需要先选择目标租户,再加载可绑定账号。")), 1))], 2))]),
3028
3028
  _: 2
3029
3029
  }, [e.embedded ? void 0 : {
3030
3030
  name: "operation",
3031
- fn: $(() => [G(Z(L), {
3031
+ fn: $(() => [G(Z(M), {
3032
3032
  disabled: g.value || m.value,
3033
- onClick: ge
3033
+ onClick: ye
3034
3034
  }, {
3035
3035
  default: $(() => [W(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
3036
3036
  _: 1
3037
- }, 8, ["disabled"]), G(Z(L), {
3037
+ }, 8, ["disabled"]), G(Z(M), {
3038
3038
  type: "primary",
3039
3039
  loading: g.value,
3040
- disabled: m.value || !F.value,
3041
- onClick: me
3040
+ disabled: m.value || !P.value,
3041
+ onClick: ve
3042
3042
  }, {
3043
3043
  default: $(() => [W(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
3044
3044
  _: 1
@@ -3068,7 +3068,7 @@ var ir = {
3068
3068
  "onSaved"
3069
3069
  ]));
3070
3070
  }
3071
- }), hr = /*#__PURE__*/ M(/* @__PURE__ */ q({
3071
+ }), hr = /*#__PURE__*/ L(/* @__PURE__ */ q({
3072
3072
  name: "EmployeeEmploymentTable",
3073
3073
  __name: "EmployeeEmploymentTable",
3074
3074
  props: {
@@ -3093,7 +3093,7 @@ var ir = {
3093
3093
  },
3094
3094
  emits: ["update:selectedIds"],
3095
3095
  setup(e, { emit: t }) {
3096
- let n = A(), r = e, i = t, a = Y([]), o = z(() => [
3096
+ let n = F(), r = e, i = t, a = Y([]), o = z(() => [
3097
3097
  {
3098
3098
  key: "title",
3099
3099
  title: n.t("platform.screen.EmployeePicker.employee", "职员"),
@@ -3189,7 +3189,7 @@ var ir = {
3189
3189
  let t = e.employeeId;
3190
3190
  h(e, !a.value.includes(t));
3191
3191
  }
3192
- return (t, r) => (J(), B(Z(O), {
3192
+ return (t, r) => (J(), B(Z(k), {
3193
3193
  class: "employee-employment-table",
3194
3194
  columns: o.value,
3195
3195
  rows: l.value,
@@ -3203,8 +3203,8 @@ var ir = {
3203
3203
  onRowDblclick: g
3204
3204
  }, {
3205
3205
  cell: $(({ column: e, record: t }) => [W(X(u(e, t)), 1)]),
3206
- expandedRow: $(({ record: e }) => [G(Z(T), { title: Z(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
3207
- default: $(() => [G(Z(O), {
3206
+ expandedRow: $(({ record: e }) => [G(Z(D), { title: Z(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
3207
+ default: $(() => [G(Z(k), {
3208
3208
  columns: s.value,
3209
3209
  rows: e.positions,
3210
3210
  "row-key": "id",
@@ -3238,7 +3238,7 @@ var ir = {
3238
3238
  }, vr = {
3239
3239
  key: 0,
3240
3240
  class: "role-employment-grant-selected"
3241
- }, yr = { class: "role-employment-grant-selected-title" }, br = { class: "role-employment-grant-selected-list" }, xr = ["disabled", "onClick"], Sr = /*#__PURE__*/ M(/* @__PURE__ */ q({
3241
+ }, yr = { class: "role-employment-grant-selected-title" }, br = { class: "role-employment-grant-selected-list" }, xr = ["disabled", "onClick"], Sr = /*#__PURE__*/ L(/* @__PURE__ */ q({
3242
3242
  name: "RoleEmploymentGrantDrawer",
3243
3243
  __name: "RoleEmploymentGrantDrawer",
3244
3244
  props: {
@@ -3251,41 +3251,41 @@ var ir = {
3251
3251
  },
3252
3252
  emits: ["close", "saved"],
3253
3253
  setup(e, { emit: t }) {
3254
- let n = A(), r = e, i = t, a = Y([]), o = Y([]), s = Y({}), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(!1), d = Y(!1), f = Y(!1), p = Y(!1), m = Y(1), h = Y(0), g = Y(""), _ = z(() => r.role?.id), v = z(() => rr(r.context.http)), b = z(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), x = z(() => r.embedded ? "section" : y), ee = z(() => r.embedded ? {} : {
3254
+ let n = F(), r = e, i = t, a = Y([]), o = Y([]), s = Y({}), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(!1), d = Y(!1), f = Y(!1), p = Y(!1), m = Y(1), h = Y(0), g = Y(""), _ = z(() => r.role?.id), y = z(() => rr(r.context.http)), b = z(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), x = z(() => r.embedded ? "section" : v), C = z(() => r.embedded ? {} : {
3255
3255
  open: r.open,
3256
3256
  title: b.value,
3257
3257
  renderMode: r.container ? "inline" : "portal",
3258
3258
  closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
3259
3259
  onClose: () => !f.value && i("close")
3260
- }), C = z(() => [...c.value].filter((e) => !l.value.has(e))), T = z(() => [...l.value].filter((e) => !c.value.has(e))), E = z(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), D = z(() => o.value.filter((e) => !g.value.trim() || ie(e).includes(g.value.trim()))), te = z(() => [...c.value].map((e) => s.value[e] ?? N(e))), O = z(() => ({
3260
+ }), w = z(() => [...c.value].filter((e) => !l.value.has(e))), T = z(() => [...l.value].filter((e) => !c.value.has(e))), E = z(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), D = z(() => o.value.filter((e) => !g.value.trim() || re(e).includes(g.value.trim()))), O = z(() => [...c.value].map((e) => s.value[e] ?? ae(e))), k = z(() => ({
3261
3261
  current: m.value,
3262
3262
  total: h.value,
3263
3263
  pageSize: 50,
3264
3264
  showSizeChanger: !1,
3265
3265
  showQuickJumper: !1,
3266
- onChange: (e) => void k(e)
3266
+ onChange: (e) => void j(e)
3267
3267
  }));
3268
3268
  Q(() => [r.open, r.role?.id], ([e]) => {
3269
- e ? k() : j();
3269
+ e ? j() : ne();
3270
3270
  }, { immediate: !0 }), Q([
3271
3271
  () => r.embedded,
3272
3272
  () => r.drawerContext,
3273
3273
  c,
3274
- C,
3274
+ w,
3275
3275
  T,
3276
3276
  f,
3277
3277
  d
3278
- ], ne, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
3279
- function ne() {
3278
+ ], A, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
3279
+ function A() {
3280
3280
  let e = r.drawerContext;
3281
3281
  r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
3282
3282
  value1: r.role?.title ?? r.role?.id ?? n.t("platform.screen.RoleManagementView.role", "角色"),
3283
- value2: se(r.role)
3283
+ value2: ce(r.role)
3284
3284
  })), e.setOperation({
3285
3285
  summary: n.t("platform.screen.RoleEmploymentGrantDrawer.value-positions-selectedvalue", "已选 {value1} 个任职{value2}", {
3286
3286
  value1: c.value.size,
3287
- value2: C.value.length || T.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
3288
- value1: C.value.length,
3287
+ value2: w.value.length || T.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
3288
+ value1: w.value.length,
3289
3289
  value2: T.value.length
3290
3290
  }) : ""
3291
3291
  }),
@@ -3298,18 +3298,18 @@ var ir = {
3298
3298
  key: "save-employment-role-grants",
3299
3299
  label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
3300
3300
  emphasis: "primary",
3301
- disabled: d.value || C.value.length === 0 && T.value.length === 0,
3301
+ disabled: d.value || w.value.length === 0 && T.value.length === 0,
3302
3302
  loading: f.value,
3303
- run: () => void re()
3303
+ run: () => void te()
3304
3304
  }]
3305
3305
  }));
3306
3306
  }
3307
- async function k(e = 1) {
3307
+ async function j(e = 1) {
3308
3308
  let t = _.value;
3309
3309
  if (t) {
3310
3310
  d.value = !0, p.value = !1;
3311
3311
  try {
3312
- let [n, r] = await Promise.all([v.value.employmentRoleGrants(t), v.value.employmentSelector(t, {
3312
+ let [n, r] = await Promise.all([y.value.employmentRoleGrants(t), y.value.employmentSelector(t, {
3313
3313
  enabledOnly: !0,
3314
3314
  page: {
3315
3315
  pageNum: e,
@@ -3318,10 +3318,10 @@ var ir = {
3318
3318
  })]);
3319
3319
  a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
3320
3320
  ...s.value,
3321
- ...M(r.records)
3321
+ ...N(r.records)
3322
3322
  }, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, m.value = r.pageNum, h.value = r.total;
3323
3323
  } catch (e) {
3324
- p.value = !0, w(e, {
3324
+ p.value = !0, I(e, {
3325
3325
  language: n,
3326
3326
  source: "role-employment-grants",
3327
3327
  phase: "load"
@@ -3331,17 +3331,17 @@ var ir = {
3331
3331
  }
3332
3332
  }
3333
3333
  }
3334
- async function re() {
3334
+ async function te() {
3335
3335
  let e = _.value;
3336
3336
  if (e) {
3337
3337
  f.value = !0;
3338
3338
  try {
3339
- for (let t of C.value) await v.value.grantEmploymentRole(e, t);
3339
+ for (let t of w.value) await y.value.grantEmploymentRole(e, t);
3340
3340
  for (let t of T.value) {
3341
3341
  let n = E.value.get(t)?.id;
3342
- n && await v.value.deleteEmploymentRoleGrant(e, n);
3342
+ n && await y.value.deleteEmploymentRoleGrant(e, n);
3343
3343
  }
3344
- await Te({
3344
+ await oe({
3345
3345
  success: !0,
3346
3346
  message: n.t("platform.screen.RoleEmploymentGrantDrawer.position-role-assignments-saved", "任职角色授权已保存")
3347
3347
  }, {
@@ -3350,7 +3350,7 @@ var ir = {
3350
3350
  phase: "action"
3351
3351
  }), i("saved"), i("close");
3352
3352
  } catch (e) {
3353
- w(e, {
3353
+ I(e, {
3354
3354
  language: n,
3355
3355
  source: "role-employment-grants",
3356
3356
  phase: "action"
@@ -3360,10 +3360,10 @@ var ir = {
3360
3360
  }
3361
3361
  }
3362
3362
  }
3363
- function j() {
3363
+ function ne() {
3364
3364
  a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, g.value = "", m.value = 1, h.value = 0, p.value = !1;
3365
3365
  }
3366
- function ie(e) {
3366
+ function re(e) {
3367
3367
  return [
3368
3368
  e.employeeTitle,
3369
3369
  e.employeeNo,
@@ -3372,47 +3372,47 @@ var ir = {
3372
3372
  e.positionTitle
3373
3373
  ].filter(Boolean).join(" ");
3374
3374
  }
3375
- function ae(e) {
3375
+ function ie(e) {
3376
3376
  let t = new Set(c.value);
3377
3377
  t.delete(e), c.value = t;
3378
3378
  }
3379
- function M(e) {
3379
+ function N(e) {
3380
3380
  let t = {};
3381
3381
  for (let n of e) n.id && (t[n.id] = n);
3382
3382
  return t;
3383
3383
  }
3384
- function N(e) {
3384
+ function ae(e) {
3385
3385
  return {
3386
3386
  id: e,
3387
3387
  positionId: e
3388
3388
  };
3389
3389
  }
3390
- function F(e) {
3390
+ function se(e) {
3391
3391
  let t = e.positionTitle ?? e.positionId ?? e.id;
3392
3392
  return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
3393
3393
  }
3394
- function oe(e) {
3394
+ function P(e) {
3395
3395
  return [
3396
3396
  e.employeeNo,
3397
3397
  e.organizationTitle ?? e.organizationId,
3398
3398
  e.departmentTitle ?? e.departmentId
3399
3399
  ].filter(Boolean).join(" / ") || e.id;
3400
3400
  }
3401
- function se(e) {
3401
+ function ce(e) {
3402
3402
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
3403
3403
  }
3404
- return (t, r) => (J(), B(Qe(x.value), Ve(ee.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), Re({
3405
- default: $(() => [d.value ? (J(), B(Z(De), {
3404
+ return (t, r) => (J(), B(Qe(x.value), Ve(C.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), Re({
3405
+ default: $(() => [d.value ? (J(), B(Z(ee), {
3406
3406
  key: 0,
3407
3407
  tip: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
3408
3408
  }, null, 8, ["tip"])) : p.value ? (J(), H("div", gr, [G(Z(S), {
3409
3409
  title: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
3410
3410
  message: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
3411
- }, null, 8, ["title", "message"]), G(Z(L), { onClick: r[1] ||= (e) => k() }, {
3411
+ }, null, 8, ["title", "message"]), G(Z(M), { onClick: r[1] ||= (e) => j() }, {
3412
3412
  default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
3413
3413
  _: 1
3414
3414
  })])) : (J(), H("section", _r, [
3415
- G(Z(P), {
3415
+ G(Z(Te), {
3416
3416
  value: g.value,
3417
3417
  "onUpdate:value": r[2] ||= (e) => g.value = e,
3418
3418
  "allow-clear": "",
@@ -3424,7 +3424,7 @@ var ir = {
3424
3424
  rows: D.value,
3425
3425
  selectable: "",
3426
3426
  disabled: f.value,
3427
- pagination: O.value,
3427
+ pagination: k.value,
3428
3428
  "fill-height": ""
3429
3429
  }, null, 8, [
3430
3430
  "selected-ids",
@@ -3432,27 +3432,27 @@ var ir = {
3432
3432
  "disabled",
3433
3433
  "pagination"
3434
3434
  ]),
3435
- te.value.length > 0 ? (J(), H("section", vr, [U("div", yr, [U("strong", null, X(Z(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), U("span", null, X(te.value.length), 1)]), U("div", br, [(J(!0), H(R, null, Xe(te.value, (e) => (J(), H("button", {
3435
+ O.value.length > 0 ? (J(), H("section", vr, [U("div", yr, [U("strong", null, X(Z(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), U("span", null, X(O.value.length), 1)]), U("div", br, [(J(!0), H(R, null, Xe(O.value, (e) => (J(), H("button", {
3436
3436
  key: e.id,
3437
3437
  type: "button",
3438
3438
  disabled: f.value,
3439
- onClick: (t) => ae(e.id)
3440
- }, [U("span", null, X(F(e)), 1), U("small", null, X(oe(e)), 1)], 8, xr))), 128))])])) : V("v-if", !0)
3439
+ onClick: (t) => ie(e.id)
3440
+ }, [U("span", null, X(se(e)), 1), U("small", null, X(P(e)), 1)], 8, xr))), 128))])])) : V("v-if", !0)
3441
3441
  ]))]),
3442
3442
  _: 2
3443
3443
  }, [e.embedded ? void 0 : {
3444
3444
  name: "operation",
3445
- fn: $(() => [G(Z(L), {
3445
+ fn: $(() => [G(Z(M), {
3446
3446
  disabled: f.value,
3447
3447
  onClick: r[0] ||= (e) => i("close")
3448
3448
  }, {
3449
3449
  default: $(() => [W(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
3450
3450
  _: 1
3451
- }, 8, ["disabled"]), G(Z(L), {
3451
+ }, 8, ["disabled"]), G(Z(M), {
3452
3452
  type: "primary",
3453
3453
  loading: f.value,
3454
- disabled: d.value || C.value.length === 0 && T.value.length === 0,
3455
- onClick: re
3454
+ disabled: d.value || w.value.length === 0 && T.value.length === 0,
3455
+ onClick: te
3456
3456
  }, {
3457
3457
  default: $(() => [W(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
3458
3458
  _: 1
@@ -3501,7 +3501,7 @@ var ir = {
3501
3501
  emits: ["close"],
3502
3502
  setup(e, { emit: t }) {
3503
3503
  let n = e, r = t, i = z(() => n.profile === "wide-work" ? "wide" : "standard");
3504
- return (t, n) => (J(), B(Z(y), {
3504
+ return (t, n) => (J(), B(Z(v), {
3505
3505
  open: e.open,
3506
3506
  title: e.title,
3507
3507
  "render-mode": e.container ? "inline" : "portal",
@@ -3536,7 +3536,7 @@ function Tr(e) {
3536
3536
  return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
3537
3537
  }
3538
3538
  function Er(e) {
3539
- let t = l(), n = A();
3539
+ let t = l(), n = F();
3540
3540
  return z(() => {
3541
3541
  let r = tt(e.input);
3542
3542
  if (r && Tr(tt(e.eligibility)) && t) return {
@@ -3612,7 +3612,7 @@ var Rr = { class: "panel-title" }, zr = {
3612
3612
  },
3613
3613
  emits: ["close"],
3614
3614
  setup(e, { emit: t }) {
3615
- let n = A(), r = e, i = t, a = ye({ moduleAlias: "iam.role" }), s = r.moduleContext ?? a, c = rr(s.http), l = r.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", u = o(), d = r.roleId ? { roleId: r.roleId } : void 0, p = d ? Lr(d) : void 0, h = Y(), _ = Y([]), v = Y(), y = Y(""), b = Y([]), x = Y(), T = Y(), E = Y(!1), D = Y(!1), k = Y(!1), re = $e(), j = z(() => re.value ? C(re.value, n) : void 0), M = Y(), N = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), F = Y(0), se, ce = z(() => h.value?.roleKind === "group"), I = z(() => h.value?.roleKind === "dataGrant"), le = z(() => h.value?.assignmentType === "employment"), ue = z(() => !!r.drawerContext), fe = z(() => (h.value && te(h.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), pe = z(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: fe.value })), me = z(() => he.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: he.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: fe.value })), he = z(() => _.value.find((e) => e.moduleAlias === v.value)), _e = z(() => {
3615
+ let n = F(), r = e, i = t, a = se({ moduleAlias: "iam.role" }), s = r.moduleContext ?? a, c = rr(s.http), l = r.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", u = o(), d = r.roleId ? { roleId: r.roleId } : void 0, f = d ? Lr(d) : void 0, h = Y(), _ = Y([]), v = Y(), y = Y(""), b = Y([]), x = Y(), w = Y(), T = Y(!1), E = Y(!1), D = Y(!1), A = $e(), j = z(() => A.value ? Ee(A.value, n) : void 0), re = Y(), ie = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), P = Y(0), ce, le = z(() => h.value?.roleKind === "group"), ue = z(() => h.value?.roleKind === "dataGrant"), de = z(() => h.value?.assignmentType === "employment"), fe = z(() => !!r.drawerContext), pe = z(() => (h.value && O(h.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), he = z(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: pe.value })), ge = z(() => _e.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: _e.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: pe.value })), _e = z(() => _.value.find((e) => e.moduleAlias === v.value)), be = z(() => {
3616
3616
  let e = y.value.trim().toLocaleLowerCase(), t = new Set(e ? _.value.filter((t) => [
3617
3617
  t.title,
3618
3618
  t.moduleAlias,
@@ -3628,13 +3628,13 @@ var Rr = { class: "panel-title" }, zr = {
3628
3628
  title: e.title,
3629
3629
  secondary: e.applicationAlias
3630
3630
  }));
3631
- }), ve = z(() => (T.value?.options ?? []).map((e) => ({
3631
+ }), Se = z(() => (w.value?.options ?? []).map((e) => ({
3632
3632
  value: e.code,
3633
3633
  label: e.title
3634
- }))), be = z(() => (T.value?.referenceDependencies ?? []).map((e) => ({
3634
+ }))), Ce = z(() => (w.value?.referenceDependencies ?? []).map((e) => ({
3635
3635
  value: e.referenceFieldId,
3636
3636
  label: `${e.title} → ${e.targetModuleTitle}`
3637
- }))), xe = z(() => new Map((T.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Se = z(() => le.value && b.value.some((e) => !!e.dataAuth)), Ee = z(() => [
3637
+ }))), we = z(() => new Map((w.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Te = z(() => de.value && b.value.some((e) => !!e.dataAuth)), L = z(() => [
3638
3638
  {
3639
3639
  key: "title",
3640
3640
  title: n.t("platform.governance.tab.actions", "动作"),
@@ -3646,7 +3646,7 @@ var Rr = { class: "panel-title" }, zr = {
3646
3646
  width: 104,
3647
3647
  align: "center"
3648
3648
  },
3649
- ...Se.value ? [{
3649
+ ...Te.value ? [{
3650
3650
  key: "dataScopePolicy",
3651
3651
  title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
3652
3652
  width: 200
@@ -3668,22 +3668,22 @@ var Rr = { class: "panel-title" }, zr = {
3668
3668
  title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
3669
3669
  width: 160
3670
3670
  }
3671
- ]), ke = z(() => b.value), Ae = z(() => x.value?.actions ?? []), je = z(() => r.drawer === !0 || !!d && u?.presentation === "drawer"), Me = z(() => !!d), Ne = z(() => Me.value && !ue.value), Pe = z(() => ue.value ? "div" : je.value ? wr : Me.value ? ge : "div"), Fe = z(() => je.value ? {
3671
+ ]), ke = z(() => b.value), Ae = z(() => x.value?.actions ?? []), je = z(() => r.drawer === !0 || !!d && u?.presentation === "drawer"), Me = z(() => !!d), Ne = z(() => Me.value && !fe.value), Pe = z(() => fe.value ? "div" : je.value ? wr : Me.value ? ye : "div"), Fe = z(() => je.value ? {
3672
3672
  open: !0,
3673
- title: pe.value,
3673
+ title: he.value,
3674
3674
  container: r.container ?? null,
3675
3675
  profile: ct.drawerProfile,
3676
3676
  promotion: He.value,
3677
3677
  dismissal: "guarded",
3678
3678
  beforeClose: ft,
3679
3679
  onClose: pt
3680
- } : Ne.value ? { title: pe.value } : {}), Ie = z(() => {
3680
+ } : Ne.value ? { title: he.value } : {}), Ie = z(() => {
3681
3681
  let e = x.value;
3682
- return !e || M.value === void 0 ? !1 : JSON.stringify(e.actions) !== M.value;
3683
- }), Le = z(() => F.value >= 0 && [...N.entries()].some(([e, t]) => P.get(e) !== JSON.stringify(t))), K = z(() => Ie.value || Le.value);
3684
- ee(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => K.value, () => k.value);
3682
+ return !e || re.value === void 0 ? !1 : JSON.stringify(e.actions) !== re.value;
3683
+ }), Le = z(() => P.value >= 0 && [...ie.entries()].some(([e, t]) => N.get(e) !== JSON.stringify(t))), K = z(() => Ie.value || Le.value);
3684
+ C(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => K.value, () => D.value);
3685
3685
  let q = z(() => b.value.length > 0 && b.value.every((e) => e.granted)), Be = z(() => b.value.some((e) => e.granted) && !q.value), Ve = z(() => {
3686
- let e = he.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = b.value.filter((e) => e.granted).length, r = K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
3686
+ let e = _e.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = b.value.filter((e) => e.granted).length, r = K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
3687
3687
  return n.t("platform.screen.RoleAuthorizationView.current-module-value-value-value-actions-granted-value", "当前模块:{value1} · 已授权 {value2}/{value3} 项 · {value4}", {
3688
3688
  value1: e,
3689
3689
  value2: t,
@@ -3693,59 +3693,59 @@ var Rr = { class: "panel-title" }, zr = {
3693
3693
  }), He = Er({
3694
3694
  view: ct,
3695
3695
  input: () => d,
3696
- title: pe,
3696
+ title: he,
3697
3697
  eligibility: () => ({
3698
3698
  hasStableIdentity: !!(l && h.value),
3699
- busy: k.value
3699
+ busy: D.value
3700
3700
  }),
3701
3701
  beforePromote: (e) => Fr(e, {
3702
3702
  selectedModuleAlias: v.value,
3703
3703
  dataGrantMatrix: x.value,
3704
- actionDrafts: [...N.entries()].map(([e, t]) => ({
3704
+ actionDrafts: [...ie.entries()].map(([e, t]) => ({
3705
3705
  moduleAlias: e,
3706
3706
  actions: t
3707
3707
  })),
3708
- actionSnapshots: [...P.entries()].map(([e, t]) => ({
3708
+ actionSnapshots: [...N.entries()].map(([e, t]) => ({
3709
3709
  moduleAlias: e,
3710
3710
  snapshot: t
3711
3711
  }))
3712
3712
  }).then((e) => e === "accepted"),
3713
3713
  onPromoted: mt,
3714
- onPromotionRejected: () => Ce(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
3714
+ onPromotionRejected: () => p(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
3715
3715
  language: n,
3716
3716
  source: "role-authorization",
3717
3717
  phase: "validation"
3718
3718
  })
3719
3719
  });
3720
3720
  qe(() => {
3721
- d && !je.value && (se = Ir(d, ht)), Je();
3722
- }), Q(pe, (e) => {
3721
+ d && !je.value && (ce = Ir(d, ht)), Je();
3722
+ }), Q(he, (e) => {
3723
3723
  Me.value && u?.setTitle(e);
3724
3724
  }, { immediate: !0 }), Q(v, () => void Ye()), Q([
3725
- fe,
3725
+ pe,
3726
3726
  Ve,
3727
3727
  K,
3728
- k,
3729
- ce,
3730
- I
3728
+ D,
3729
+ le,
3730
+ ue
3731
3731
  ], Ge, { immediate: !0 }), qe(() => window.addEventListener("beforeunload", _t)), Ke(() => {
3732
- se?.(), r.drawerContext?.setOperation(void 0), r.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", _t);
3732
+ ce?.(), r.drawerContext?.setOperation(void 0), r.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", _t);
3733
3733
  });
3734
3734
  function Ge() {
3735
3735
  let e = r.drawerContext;
3736
3736
  if (e) {
3737
- if (e.setSubtitle(`${fe.value} · ${vt(h.value)}`), ce.value) {
3737
+ if (e.setSubtitle(`${pe.value} · ${vt(h.value)}`), le.value) {
3738
3738
  e.setOperation(void 0);
3739
3739
  return;
3740
3740
  }
3741
3741
  e.setOperation({
3742
- summary: I.value ? K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ve.value,
3742
+ summary: ue.value ? K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ve.value,
3743
3743
  actions: [{
3744
3744
  key: "confirm-role-authorization",
3745
3745
  label: n.t("platform.screen.UiModal.confirmText", "确认"),
3746
3746
  emphasis: "primary",
3747
- disabled: k.value || !K.value,
3748
- loading: k.value,
3747
+ disabled: D.value || !K.value,
3748
+ loading: D.value,
3749
3749
  run: () => void dt()
3750
3750
  }]
3751
3751
  });
@@ -3753,65 +3753,65 @@ var Rr = { class: "panel-title" }, zr = {
3753
3753
  }
3754
3754
  async function Je() {
3755
3755
  if (!l) {
3756
- re.value = new ae(we(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
3756
+ A.value = new De(ae(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
3757
3757
  return;
3758
3758
  }
3759
- E.value = !0, re.value = void 0;
3759
+ T.value = !0, A.value = void 0;
3760
3760
  try {
3761
3761
  if (h.value = await s.crud.view(l), h.value.roleKind === "group") return;
3762
3762
  if (h.value.roleKind === "dataGrant") {
3763
3763
  let [e, t] = await Promise.all([c.dataGrantActionMatrix(l), c.dataScopePolicyCatalog(l)]);
3764
- x.value = p?.dataGrantMatrix ?? e, T.value = t, M.value = JSON.stringify(e.actions);
3764
+ x.value = f?.dataGrantMatrix ?? e, w.value = t, re.value = JSON.stringify(e.actions);
3765
3765
  return;
3766
3766
  }
3767
- _.value = (await c.authorizationModules(l)).records, v.value = p?.selectedModuleAlias ?? _.value[0]?.moduleAlias;
3767
+ _.value = (await c.authorizationModules(l)).records, v.value = f?.selectedModuleAlias ?? _.value[0]?.moduleAlias;
3768
3768
  } catch (e) {
3769
- re.value = new ae(we(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), w(e, {
3769
+ A.value = new De(ae(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), I(e, {
3770
3770
  language: n,
3771
3771
  source: "role-authorization",
3772
3772
  phase: "load"
3773
3773
  });
3774
3774
  } finally {
3775
- E.value = !1;
3775
+ T.value = !1;
3776
3776
  }
3777
3777
  }
3778
3778
  async function Ye() {
3779
3779
  let e = v.value;
3780
- if (!(!e || I.value || ce.value)) {
3781
- D.value = !0;
3780
+ if (!(!e || ue.value || le.value)) {
3781
+ E.value = !0;
3782
3782
  try {
3783
- let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(st), i = p?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = N.get(e) ?? i;
3784
- b.value = a ?? r, N.has(e) || (N.set(e, b.value), P.set(e, p?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, T.value = n;
3783
+ let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(st), i = f?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = ie.get(e) ?? i;
3784
+ b.value = a ?? r, ie.has(e) || (ie.set(e, b.value), N.set(e, f?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), P.value += 1, w.value = n;
3785
3785
  } catch (e) {
3786
- w(e, {
3786
+ I(e, {
3787
3787
  language: n,
3788
3788
  source: "role-authorization",
3789
3789
  phase: "load"
3790
3790
  });
3791
3791
  } finally {
3792
- D.value = !1;
3792
+ E.value = !1;
3793
3793
  }
3794
3794
  }
3795
3795
  }
3796
3796
  function Xe(e, t) {
3797
- t && e.dataAuth && le.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, F.value += 1;
3797
+ t && e.dataAuth && de.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, P.value += 1;
3798
3798
  }
3799
3799
  function Ze(e) {
3800
3800
  b.value.forEach((t) => Xe(t, e));
3801
3801
  }
3802
3802
  function et(e, t) {
3803
3803
  if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
3804
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3804
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, P.value += 1;
3805
3805
  return;
3806
3806
  }
3807
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
3807
+ e.referenceFieldId = void 0, e.referenceActionCode = void 0, P.value += 1;
3808
3808
  }
3809
3809
  function tt(e, t) {
3810
- let n = xe.value.get(String(t || ""));
3811
- e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, F.value += 1;
3810
+ let n = we.value.get(String(t || ""));
3811
+ e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, P.value += 1;
3812
3812
  }
3813
3813
  function nt(e) {
3814
- return xe.value.get(String(e || ""));
3814
+ return we.value.get(String(e || ""));
3815
3815
  }
3816
3816
  function rt(e) {
3817
3817
  return typeof e == "string" || typeof e == "number" ? e : void 0;
@@ -3820,75 +3820,75 @@ var Rr = { class: "panel-title" }, zr = {
3820
3820
  return e.dataScopePolicy ?? "inheritDataGrant";
3821
3821
  }
3822
3822
  function at(e) {
3823
- return !!e.dataAuth && le.value;
3823
+ return !!e.dataAuth && de.value;
3824
3824
  }
3825
3825
  function ot(e, t) {
3826
3826
  return e.key === "dataScopePolicy" && at(t);
3827
3827
  }
3828
3828
  function st(e) {
3829
- return le.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3829
+ return de.value && e.dataAuth && e.dataScopePolicy === "none" ? {
3830
3830
  ...e,
3831
3831
  dataScopePolicy: "inheritDataGrant"
3832
3832
  } : e;
3833
3833
  }
3834
3834
  async function lt() {
3835
3835
  if (x.value) {
3836
- k.value = !0;
3836
+ D.value = !0;
3837
3837
  try {
3838
3838
  let e = await c.replaceDataGrantActions(l, x.value.actions.map((e) => ({
3839
3839
  actionCode: e.actionCode,
3840
3840
  dataScopePolicy: e.dataScopePolicy,
3841
3841
  enabled: e.configured
3842
3842
  })));
3843
- await Te(e, {
3843
+ await oe(e, {
3844
3844
  language: n,
3845
3845
  source: "role-authorization",
3846
3846
  phase: "action",
3847
3847
  fallbackMessage: n.t("platform.screen.RoleAuthorizationView.data-permission-template-saved", "数据权限模板已保存")
3848
- }), M.value = JSON.stringify(x.value.actions);
3848
+ }), re.value = JSON.stringify(x.value.actions);
3849
3849
  } catch (e) {
3850
- w(e, {
3850
+ I(e, {
3851
3851
  language: n,
3852
3852
  source: "role-authorization",
3853
3853
  phase: "action"
3854
3854
  });
3855
3855
  } finally {
3856
- k.value = !1;
3856
+ D.value = !1;
3857
3857
  }
3858
3858
  }
3859
3859
  }
3860
3860
  async function ut() {
3861
- let e = [...N.entries()].filter(([e, t]) => P.get(e) !== JSON.stringify(t));
3861
+ let e = [...ie.entries()].filter(([e, t]) => N.get(e) !== JSON.stringify(t));
3862
3862
  if (e.length) {
3863
- k.value = !0;
3863
+ D.value = !0;
3864
3864
  try {
3865
3865
  let t = await c.replacePermissionMatrix(l, e.flatMap(([e, t]) => t.map((t) => ({
3866
3866
  moduleAlias: e,
3867
3867
  actionCode: t.actionCode,
3868
3868
  granted: !!t.granted,
3869
- dataScopePolicy: t.granted && t.dataAuth && le.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3869
+ dataScopePolicy: t.granted && t.dataAuth && de.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
3870
3870
  referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
3871
3871
  referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
3872
3872
  }))));
3873
- await Te(t, {
3873
+ await oe(t, {
3874
3874
  language: n,
3875
3875
  source: "role-authorization",
3876
3876
  phase: "action",
3877
3877
  fallbackMessage: n.t("platform.screen.RoleAuthorizationView.role-permissions-saved", "角色授权已保存")
3878
- }), e.forEach(([e, t]) => P.set(e, JSON.stringify(t))), F.value += 1;
3878
+ }), e.forEach(([e, t]) => N.set(e, JSON.stringify(t))), P.value += 1;
3879
3879
  } catch (e) {
3880
- w(e, {
3880
+ I(e, {
3881
3881
  language: n,
3882
3882
  source: "role-authorization",
3883
3883
  phase: "action"
3884
3884
  });
3885
3885
  } finally {
3886
- k.value = !1;
3886
+ D.value = !1;
3887
3887
  }
3888
3888
  }
3889
3889
  }
3890
3890
  async function dt() {
3891
- if (I.value) {
3891
+ if (ue.value) {
3892
3892
  await lt();
3893
3893
  return;
3894
3894
  }
@@ -3909,7 +3909,7 @@ var Rr = { class: "panel-title" }, zr = {
3909
3909
  gt();
3910
3910
  }
3911
3911
  function ht(e) {
3912
- return !K.value && (v.value = e.selectedModuleAlias, x.value = e.dataGrantMatrix, N.clear(), P.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => N.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => P.set(e, t)), F.value += 1, !0);
3912
+ return !K.value && (v.value = e.selectedModuleAlias, x.value = e.dataGrantMatrix, ie.clear(), N.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => ie.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => N.set(e, t)), P.value += 1, !0);
3913
3913
  }
3914
3914
  function gt() {
3915
3915
  if (r.drawer === !0) {
@@ -3925,34 +3925,34 @@ var Rr = { class: "panel-title" }, zr = {
3925
3925
  return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
3926
3926
  }
3927
3927
  return (e, t) => (J(), B(Qe(Pe.value), We(ze(Fe.value)), Re({
3928
- default: $(() => [U("section", { class: Ue(["role-authorization-page", { "role-authorization-page--drawer": je.value || ue.value }]) }, [E.value ? (J(), B(Z(De), {
3928
+ default: $(() => [U("section", { class: Ue(["role-authorization-page", { "role-authorization-page--drawer": je.value || fe.value }]) }, [T.value ? (J(), B(Z(ee), {
3929
3929
  key: 0,
3930
3930
  tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
3931
3931
  }, null, 8, ["tip"])) : j.value ? (J(), B(Z(S), {
3932
3932
  key: 1,
3933
3933
  title: Z(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
3934
3934
  message: j.value
3935
- }, null, 8, ["title", "message"])) : ce.value ? (J(), B(Z(m), {
3935
+ }, null, 8, ["title", "message"])) : le.value ? (J(), B(Z(te), {
3936
3936
  key: 2,
3937
3937
  title: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
3938
3938
  description: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
3939
- }, null, 8, ["title", "description"])) : I.value && x.value ? (J(), B(Z(ie), {
3939
+ }, null, 8, ["title", "description"])) : ue.value && x.value ? (J(), B(Z(xe), {
3940
3940
  key: 3,
3941
3941
  class: "data-grant-content",
3942
- title: Ne.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: fe.value }),
3942
+ title: Ne.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: pe.value }),
3943
3943
  searchable: !1,
3944
3944
  onRefresh: Je
3945
3945
  }, {
3946
- default: $(() => [U("header", Rr, [U("div", null, [U("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), U("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), Me.value ? V("v-if", !0) : (J(), B(Z(L), {
3946
+ default: $(() => [U("header", Rr, [U("div", null, [U("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), U("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), Me.value ? V("v-if", !0) : (J(), B(Z(M), {
3947
3947
  key: 0,
3948
3948
  type: "primary",
3949
3949
  disabled: !K.value,
3950
- loading: k.value,
3950
+ loading: D.value,
3951
3951
  onClick: dt
3952
3952
  }, {
3953
3953
  default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
3954
3954
  _: 1
3955
- }, 8, ["disabled", "loading"]))]), G(Z(O), {
3955
+ }, 8, ["disabled", "loading"]))]), G(Z(k), {
3956
3956
  columns: Oe.value,
3957
3957
  rows: Ae.value,
3958
3958
  "row-key": "actionCode",
@@ -3961,17 +3961,17 @@ var Rr = { class: "panel-title" }, zr = {
3961
3961
  cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), H(R, { key: 0 }, [U("strong", null, X(t.title || t.actionCode), 1), U("small", null, X(t.actionCode), 1)], 64)) : e.key === "configured" ? (J(), B(Z(ne), {
3962
3962
  key: 1,
3963
3963
  checked: !!t.configured,
3964
- disabled: k.value,
3964
+ disabled: D.value,
3965
3965
  onChange: (e) => t.configured = e
3966
3966
  }, null, 8, [
3967
3967
  "checked",
3968
3968
  "disabled",
3969
3969
  "onChange"
3970
- ])) : (J(), B(Z(de), {
3970
+ ])) : (J(), B(Z(ve), {
3971
3971
  key: 2,
3972
3972
  value: t.dataScopePolicy,
3973
- options: ve.value,
3974
- disabled: !t.configured || k.value,
3973
+ options: Se.value,
3974
+ disabled: !t.configured || D.value,
3975
3975
  placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
3976
3976
  "allow-clear": !1,
3977
3977
  "onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
@@ -3987,8 +3987,8 @@ var Rr = { class: "panel-title" }, zr = {
3987
3987
  _: 1
3988
3988
  }, 8, ["title"])) : (J(), H("section", {
3989
3989
  key: 4,
3990
- class: Ue(["authorization-layout", { "authorization-layout--compact-actions": !Se.value }])
3991
- }, [G(Z(ie), {
3990
+ class: Ue(["authorization-layout", { "authorization-layout--compact-actions": !Te.value }])
3991
+ }, [G(Z(xe), {
3992
3992
  "search-keyword": y.value,
3993
3993
  "onUpdate:searchKeyword": t[1] ||= (e) => y.value = e,
3994
3994
  class: "module-panel",
@@ -3997,8 +3997,8 @@ var Rr = { class: "panel-title" }, zr = {
3997
3997
  "search-placeholder": Z(n).t("platform.screen.RoleAuthorizationView.search-module-names-or-aliases", "搜索模块名称或别名"),
3998
3998
  onRefresh: Je
3999
3999
  }, {
4000
- default: $(() => [G(Z(f), {
4001
- records: _e.value,
4000
+ default: $(() => [G(Z(m), {
4001
+ records: be.value,
4002
4002
  "selected-id": v.value,
4003
4003
  onSelect: t[0] ||= (e) => v.value = e.id
4004
4004
  }, null, 8, ["records", "selected-id"])]),
@@ -4008,26 +4008,26 @@ var Rr = { class: "panel-title" }, zr = {
4008
4008
  "title",
4009
4009
  "refresh-title",
4010
4010
  "search-placeholder"
4011
- ]), G(Z(ie), {
4011
+ ]), G(Z(xe), {
4012
4012
  class: "action-panel",
4013
- title: me.value,
4013
+ title: ge.value,
4014
4014
  searchable: !1
4015
4015
  }, Re({
4016
- default: $(() => [D.value ? (J(), B(Z(De), {
4016
+ default: $(() => [E.value ? (J(), B(Z(ee), {
4017
4017
  key: 0,
4018
4018
  tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
4019
- }, null, 8, ["tip"])) : v.value ? (J(), B(Z(O), {
4019
+ }, null, 8, ["tip"])) : v.value ? (J(), B(Z(k), {
4020
4020
  key: 2,
4021
- columns: Ee.value,
4021
+ columns: L.value,
4022
4022
  rows: ke.value,
4023
4023
  "row-key": "actionCode",
4024
4024
  "fill-height": "",
4025
4025
  "horizontal-scroll": ""
4026
4026
  }, {
4027
- header: $(({ column: e }) => [e.key === "granted" ? (J(), H("span", zr, [G(Z(oe), {
4027
+ header: $(({ column: e }) => [e.key === "granted" ? (J(), H("span", zr, [G(Z(me), {
4028
4028
  checked: q.value,
4029
4029
  indeterminate: Be.value,
4030
- disabled: k.value || !b.value.length,
4030
+ disabled: D.value || !b.value.length,
4031
4031
  "aria-label": Z(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
4032
4032
  onChange: Ze
4033
4033
  }, null, 8, [
@@ -4036,19 +4036,19 @@ var Rr = { class: "panel-title" }, zr = {
4036
4036
  "disabled",
4037
4037
  "aria-label"
4038
4038
  ]), W(" " + X(Z(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (J(), H(R, { key: 1 }, [W(X(e.title), 1)], 64))]),
4039
- cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), H(R, { key: 0 }, [U("strong", null, X(t.title || t.actionCode), 1), U("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), B(Z(oe), {
4039
+ cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), H(R, { key: 0 }, [U("strong", null, X(t.title || t.actionCode), 1), U("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), B(Z(me), {
4040
4040
  key: 1,
4041
4041
  checked: !!t.granted,
4042
- disabled: k.value,
4042
+ disabled: D.value,
4043
4043
  onChange: (e) => Xe(t, e)
4044
4044
  }, null, 8, [
4045
4045
  "checked",
4046
4046
  "disabled",
4047
4047
  "onChange"
4048
- ])) : t.dataAuth && le.value && t.granted ? (J(), H("div", Br, [G(Z(de), {
4048
+ ])) : t.dataAuth && de.value && t.granted ? (J(), H("div", Br, [G(Z(ve), {
4049
4049
  value: it(t),
4050
- options: ve.value,
4051
- disabled: k.value,
4050
+ options: Se.value,
4051
+ disabled: D.value,
4052
4052
  "allow-clear": !1,
4053
4053
  "onUpdate:value": (e) => et(t, e)
4054
4054
  }, null, 8, [
@@ -4056,10 +4056,10 @@ var Rr = { class: "panel-title" }, zr = {
4056
4056
  "options",
4057
4057
  "disabled",
4058
4058
  "onUpdate:value"
4059
- ]), t.dataScopePolicy === "referenceDependency" ? (J(), H(R, { key: 0 }, [G(Z(de), {
4059
+ ]), t.dataScopePolicy === "referenceDependency" ? (J(), H(R, { key: 0 }, [G(Z(ve), {
4060
4060
  value: rt(t.referenceFieldId),
4061
- options: be.value,
4062
- disabled: k.value,
4061
+ options: Ce.value,
4062
+ disabled: D.value,
4063
4063
  placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
4064
4064
  "allow-clear": !1,
4065
4065
  "onUpdate:value": (e) => tt(t, e)
@@ -4071,17 +4071,17 @@ var Rr = { class: "panel-title" }, zr = {
4071
4071
  "onUpdate:value"
4072
4072
  ]), t.referenceFieldId ? (J(), H("small", Vr, X(Z(n).t("platform.screen.RoleAuthorizationView.dependency-target", "依赖目标:")) + X(nt(t.referenceFieldId)?.targetModuleTitle) + " · " + X(nt(t.referenceFieldId)?.referenceActionTitle), 1)) : (J(), H("small", Hr, X(Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field-before-granting-this-action", "请先选择引用字段,再开启该动作授权。")), 1))], 64)) : V("v-if", !0)])) : ot(e, t) ? (J(), H("span", Ur, "—")) : (J(), H("span", Wr, X(Z(n).t("platform.screen.RoleAuthorizationView.not-applicable", "不适用")), 1))]),
4073
4073
  _: 1
4074
- }, 8, ["columns", "rows"])) : (J(), B(Z(m), {
4074
+ }, 8, ["columns", "rows"])) : (J(), B(Z(te), {
4075
4075
  key: 1,
4076
4076
  title: Z(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
4077
4077
  }, null, 8, ["title"]))]),
4078
4078
  _: 2
4079
4079
  }, [Me.value ? void 0 : {
4080
4080
  name: "actions",
4081
- fn: $(() => [G(Z(L), {
4081
+ fn: $(() => [G(Z(M), {
4082
4082
  type: "primary",
4083
4083
  disabled: !K.value,
4084
- loading: k.value,
4084
+ loading: D.value,
4085
4085
  onClick: dt
4086
4086
  }, {
4087
4087
  default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
@@ -4090,12 +4090,12 @@ var Rr = { class: "panel-title" }, zr = {
4090
4090
  key: "0"
4091
4091
  }]), 1032, ["title"])], 2))], 2)]),
4092
4092
  _: 2
4093
- }, [Ne.value && !ce.value ? {
4093
+ }, [Ne.value && !le.value ? {
4094
4094
  name: "operation",
4095
- fn: $(() => [G(Z(L), {
4095
+ fn: $(() => [G(Z(M), {
4096
4096
  type: "primary",
4097
4097
  disabled: !K.value,
4098
- loading: k.value,
4098
+ loading: D.value,
4099
4099
  onClick: dt
4100
4100
  }, {
4101
4101
  default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
@@ -4104,7 +4104,7 @@ var Rr = { class: "panel-title" }, zr = {
4104
4104
  key: "0"
4105
4105
  } : void 0]), 1040));
4106
4106
  }
4107
- }), Kr = /* @__PURE__ */ e({ default: () => qr }), qr = /*#__PURE__*/ M(Gr, [["__scopeId", "data-v-817d8433"]]), Jr = { class: "role-authorization-drawer-surface" }, Yr = /*#__PURE__*/ M(/* @__PURE__ */ q({
4107
+ }), Kr = /* @__PURE__ */ e({ default: () => qr }), qr = /*#__PURE__*/ L(Gr, [["__scopeId", "data-v-817d8433"]]), Jr = { class: "role-authorization-drawer-surface" }, Yr = /*#__PURE__*/ L(/* @__PURE__ */ q({
4108
4108
  name: "RoleAuthorizationDrawerSurface",
4109
4109
  __name: "RoleAuthorizationDrawerSurface",
4110
4110
  props: { context: {} },
@@ -4152,12 +4152,12 @@ var Rr = { class: "panel-title" }, zr = {
4152
4152
  form: {
4153
4153
  contributions: [{
4154
4154
  key: "role-group-members",
4155
- component: /* @__PURE__ */ M(/* @__PURE__ */ q({
4155
+ component: /* @__PURE__ */ L(/* @__PURE__ */ q({
4156
4156
  name: "RoleGroupMemberFormField",
4157
4157
  __name: "RoleGroupMemberFormField",
4158
4158
  props: { context: {} },
4159
4159
  setup(e) {
4160
- let t = A(), n = e, r = Y([]), i = Y(!1), a = z(() => n.context.draft.roleKind === "group"), o = z(() => f(n.context.draft.memberRoleIds)), s = z(() => String(n.context.draft.id ?? "") || void 0), c = z(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = z(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
4160
+ let t = F(), n = e, r = Y([]), i = Y(!1), a = z(() => n.context.draft.roleKind === "group"), o = z(() => f(n.context.draft.memberRoleIds)), s = z(() => String(n.context.draft.id ?? "") || void 0), c = z(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = z(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
4161
4161
  label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? t.t("platform.screen.RoleManagementView.data-authorization-role", "数据授权角色") : t.t("platform.screen.RoleManagementView.standard-role", "标准角色")}`,
4162
4162
  value: e.id,
4163
4163
  disabled: e.roleKind === "dataGrant" && c.value.size > 0 && !o.value.includes(e.id)
@@ -4216,7 +4216,7 @@ var Rr = { class: "panel-title" }, zr = {
4216
4216
  function f(e) {
4217
4217
  return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
4218
4218
  }
4219
- return (n, r) => a.value ? (J(), H("label", Xr, [U("span", null, X(Z(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), G(Z(de), {
4219
+ return (n, r) => a.value ? (J(), H("label", Xr, [U("span", null, X(Z(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), G(Z(ve), {
4220
4220
  mode: "multiple",
4221
4221
  value: o.value,
4222
4222
  options: l.value,