@ximatai/muyun-web-app 0.26.19 → 0.26.21
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.
- package/dist/{BusinessActivityLogView-DudCmeKP.js → BusinessActivityLogView-6L75GZVc.js} +2 -2
- package/dist/{BusinessLogListDrawer-CVUvUG48.js → BusinessLogListDrawer-C4iFnkE7.js} +95 -95
- package/dist/{CodeConfigurationView-ZjVgaZkD.js → CodeConfigurationView-D7sqbNCg.js} +515 -515
- package/dist/{ConfigurationTranslationView-Dl757QMl.js → ConfigurationTranslationView-ta82REbn.js} +21 -21
- package/dist/{LoginAuditLogView-Cj3PMvN5.js → LoginAuditLogView-B_RQ9JIX.js} +2 -2
- package/dist/ModuleActionManagementView-DtGF3NC_.js +755 -0
- package/dist/{ModuleGovernanceView-C3RxdgQN.js → ModuleGovernanceView-Cl6tkZ6M.js} +2659 -2651
- package/dist/{RequestErrorLogView-tmjMOeLE.js → RequestErrorLogView-BJDO3Scn.js} +2 -2
- package/dist/RoleDetailWorkspaceView-C0Ab3PEp.js +1435 -0
- package/dist/{RuntimeLogView-BkkgHcF0.js → RuntimeLogView-jP9ceuJD.js} +61 -61
- package/dist/WorkflowAdministrationView-BmNJQYtq.js +650 -0
- package/dist/{WorkflowConfigurationView-Bnjdrkdx.js → WorkflowConfigurationView-Dh6BKQm5.js} +309 -309
- package/dist/WorkflowWorkbenchView-BvPNKbuV.js +759 -0
- package/dist/{codeConfiguration-DERwCY-U.js → codeConfiguration-DhCBKbkc.js} +38 -38
- package/dist/index.css +1 -1
- package/dist/index.js +999 -618
- package/dist/moduleMenuWorkspace-BbVmNKZn.js +626 -0
- package/dist/{platform-components-wRXbnwMr.js → platform-components-i2ONyZ8r.js} +2989 -2746
- package/dist/{platform-workbench-Cm_0kmTT.js → platform-workbench-DhaREttd.js} +5400 -5384
- package/dist/types/consumer/index.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +19 -29
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageTenantNavigator.vue.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/recordSaveFeedback.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
- package/dist/types/platform-components/EmployeePicker.vue.d.ts +1 -1
- package/dist/types/platform-components/QueryCriteriaComposer.vue.d.ts +3 -1
- package/dist/types/platform-components/ReadonlyRecordWorkspace.vue.d.ts +56 -0
- package/dist/types/platform-components/RecordAdaptiveDetailPanel.vue.d.ts +3 -1
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +3 -0
- package/dist/types/platform-components/RecordQueryControls.vue.d.ts +21 -0
- package/dist/types/platform-components/RecordQueryFieldControls.vue.d.ts +32 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +2 -2
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +1 -1
- package/dist/types/platform-components/UserPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/queryCriteria.d.ts +7 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +5 -1
- package/dist/types/views/metadataChangeSetSubmission.d.ts +3 -0
- package/dist/types/views/metadataModelChangeSetClient.d.ts +7 -1
- package/dist/types/web-contracts/index.d.ts +3 -0
- package/dist/types/web-core/index.d.ts +3 -0
- package/dist/types/web-core/recordReadEntry.d.ts +23 -0
- package/dist/types/web-core/recordReadView.d.ts +28 -0
- package/dist/types/web-core/useRecordReadSession.d.ts +27 -0
- package/dist/{useWorkflowConfigurationContext-BE_UjKgk.js → useWorkflowConfigurationContext-B_NxZFyz.js} +8 -8
- package/dist/{workspaceViews-D37OpJ7g.js → workspaceViews-MTwNg_aQ.js} +565 -565
- package/package.json +1 -1
- package/dist/ModuleActionManagementView-BuhQrVA3.js +0 -755
- package/dist/RoleDetailWorkspaceView-OhpBChaT.js +0 -1435
- package/dist/WorkflowAdministrationView-DOhA_5-M.js +0 -650
- package/dist/WorkflowWorkbenchView-Cf6yiofx.js +0 -759
- package/dist/moduleMenuWorkspace-DPmYGkS_.js +0 -626
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime-BAC7EHh5.js";
|
|
2
|
-
import { E as t, M as n, T as r, d as i, j as a, lt as o, m as s, ut as c, x as l, y as u } from "./platform-workbench-
|
|
3
|
-
import { $n as d,
|
|
4
|
-
import { d as Ee, m as De, p as Oe } from "./codeConfiguration-
|
|
5
|
-
import { a as ke, i as Ae, o as je, r as Me, s as Ne, t as Pe } from "./moduleMenuWorkspace-
|
|
6
|
-
import { t as Fe } from "./useWorkflowConfigurationContext-
|
|
2
|
+
import { E as t, M as n, T as r, d as i, j as a, lt as o, m as s, ut as c, x as l, y as u } from "./platform-workbench-DhaREttd.js";
|
|
3
|
+
import { $n as d, Aa as f, An as p, Bn as m, D as h, Da as g, Fa as _, G as v, Ht as y, Ia as b, Jr as x, Ka as S, Kt as C, Ma as w, Mn as T, Nn as E, Rn as D, Tn as O, V as k, Vn as A, W as ee, Wn as te, Xa as j, Ya as ne, Yn as M, Zn as N, _n as P, cr as F, da as re, fa as ie, fr as I, gn as ae, it as oe, jn as se, jr as ce, k as le, lr as ue, m as de, ma as fe, or as pe, pa as me, pn as he, pt as ge, qa as _e, qr as ve, rr as L, rt as ye, sn as be, sr as xe, ur as R, wa as Se, yn as Ce, z as we, zn as Te } from "./platform-components-i2ONyZ8r.js";
|
|
4
|
+
import { d as Ee, m as De, p as Oe } from "./codeConfiguration-DhCBKbkc.js";
|
|
5
|
+
import { a as ke, i as Ae, o as je, r as Me, s as Ne, t as Pe } from "./moduleMenuWorkspace-BbVmNKZn.js";
|
|
6
|
+
import { t as Fe } from "./useWorkflowConfigurationContext-B_NxZFyz.js";
|
|
7
7
|
import { Fragment as z, computed as B, createBlock as V, createCommentVNode as H, createElementBlock as U, createElementVNode as W, createSlots as Ie, createTextVNode as G, createVNode as K, defineAsyncComponent as Le, defineComponent as q, guardReactiveProps as Re, mergeModels as ze, mergeProps as Be, nextTick as Ve, normalizeClass as He, normalizeProps as Ue, onActivated as We, onBeforeUnmount as Ge, onMounted as Ke, onScopeDispose as qe, onUnmounted as Je, openBlock as J, ref as Y, renderList as Ye, renderSlot as Xe, resolveDynamicComponent as Ze, shallowRef as Qe, toDisplayString as X, toRaw as $e, toValue as et, unref as Z, useModel as tt, watch as Q, withCtx as $, withKeys as nt, withModifiers as rt } from "vue";
|
|
8
8
|
//#region src/views/codeConfigurationWorkspaceView.ts
|
|
9
9
|
var it = De({
|
|
10
10
|
type: "platform.code.configuration",
|
|
11
11
|
route: "/_platform/workspace/platform.code.configuration",
|
|
12
12
|
moduleAlias: "platform.code_rule",
|
|
13
|
-
component: Le(() => import("./CodeConfigurationView-
|
|
13
|
+
component: Le(() => import("./CodeConfigurationView-D7sqbNCg.js").then((e) => e.n)),
|
|
14
14
|
layout: "workspace",
|
|
15
15
|
routeTitle: "业务编码",
|
|
16
16
|
routeTitleKey: "platform.code.config.title",
|
|
@@ -34,7 +34,7 @@ var it = De({
|
|
|
34
34
|
type: "iam.role.detail",
|
|
35
35
|
route: "/iam/role",
|
|
36
36
|
moduleAlias: "iam.role",
|
|
37
|
-
component: Le(() => import("./RoleDetailWorkspaceView-
|
|
37
|
+
component: Le(() => import("./RoleDetailWorkspaceView-C0Ab3PEp.js")),
|
|
38
38
|
layout: "workspace",
|
|
39
39
|
routeTitle: "角色管理",
|
|
40
40
|
routeTitleKey: "platform.workspace-view.roles.route-title",
|
|
@@ -79,7 +79,7 @@ var it = De({
|
|
|
79
79
|
type: "platform.module.actions",
|
|
80
80
|
route: "/_platform/workspace/platform.module.actions",
|
|
81
81
|
moduleAlias: "platform.module",
|
|
82
|
-
component: Le(() => import("./ModuleActionManagementView-
|
|
82
|
+
component: Le(() => import("./ModuleActionManagementView-DtGF3NC_.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 it = De({
|
|
|
100
100
|
type: "platform.module.workflows",
|
|
101
101
|
route: "/_platform/workspace/platform.module.workflows",
|
|
102
102
|
moduleAlias: "platform.module",
|
|
103
|
-
component: Le(() => import("./WorkflowConfigurationView-
|
|
103
|
+
component: Le(() => import("./WorkflowConfigurationView-Dh6BKQm5.js")),
|
|
104
104
|
layout: "workspace",
|
|
105
105
|
routeTitle: "模块管理",
|
|
106
106
|
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
@@ -125,7 +125,7 @@ var it = De({
|
|
|
125
125
|
__name: "ModuleMenuDrawer",
|
|
126
126
|
props: { context: {} },
|
|
127
127
|
setup(e) {
|
|
128
|
-
let t =
|
|
128
|
+
let t = j(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = s(), a = Pe(), o = a?.language ?? t, c = u(), l = () => JSON.stringify([
|
|
129
129
|
c?.value?.userId,
|
|
130
130
|
c?.value?.tenantId,
|
|
131
131
|
c?.value?.organizationId,
|
|
@@ -160,7 +160,7 @@ var it = De({
|
|
|
160
160
|
onOpened: n[0] ||= (t) => e.context.close()
|
|
161
161
|
}, null, 8, ["session"]));
|
|
162
162
|
}
|
|
163
|
-
}), ft = { class: "workflow-selection-fields" }, pt = { class: "workflow-field settings-wide" }, mt = { class: "settings-help" }, ht = { class: "workflow-field settings-wide" }, gt = { class: "settings-wide workflow-field" }, _t = { class: "settings-help" }, vt = /*#__PURE__*/
|
|
163
|
+
}), ft = { class: "workflow-selection-fields" }, pt = { class: "workflow-field settings-wide" }, mt = { class: "settings-help" }, ht = { class: "workflow-field settings-wide" }, gt = { class: "settings-wide workflow-field" }, _t = { class: "settings-help" }, vt = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
164
164
|
name: "WorkflowSelectionFields",
|
|
165
165
|
__name: "WorkflowSelectionFields",
|
|
166
166
|
props: /*@__PURE__*/ ze({
|
|
@@ -185,11 +185,11 @@ var it = De({
|
|
|
185
185
|
"update:fallback"
|
|
186
186
|
],
|
|
187
187
|
setup(e) {
|
|
188
|
-
let t =
|
|
188
|
+
let t = j(), n = e, r = tt(e, "organizationId"), i = tt(e, "matchExpression"), a = tt(e, "fallback");
|
|
189
189
|
return (o, s) => (J(), U("div", ft, [
|
|
190
190
|
W("label", pt, [
|
|
191
191
|
G(X(Z(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
|
|
192
|
-
n.organizationContext ? (J(), V(Z(
|
|
192
|
+
n.organizationContext ? (J(), V(Z(oe), {
|
|
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 it = De({
|
|
|
202
202
|
"value",
|
|
203
203
|
"context",
|
|
204
204
|
"disabled"
|
|
205
|
-
])) : (J(), V(Z(
|
|
205
|
+
])) : (J(), V(Z(L), {
|
|
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
|
W("small", mt, X(n.organizationContext ? Z(t).t("platform.workflow-config.organization-help", "留空适用于全部组织;指定组织后包含其下级组织。") : Z(t).t("platform.workflow-config.global-scope-help", "当前为全局流程模板,适用于全部组织;组织选择需使用租户身份。")), 1)
|
|
211
211
|
]),
|
|
212
|
-
W("div", ht, [W("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), K(Z(
|
|
212
|
+
W("div", ht, [W("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), K(Z(O), {
|
|
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 it = De({
|
|
|
224
224
|
"tools",
|
|
225
225
|
"placeholder"
|
|
226
226
|
])]),
|
|
227
|
-
W("div", gt, [K(Z(
|
|
227
|
+
W("div", gt, [K(Z(xe), {
|
|
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 it = De({
|
|
|
243
243
|
}, St = {
|
|
244
244
|
key: 2,
|
|
245
245
|
class: "workflow-field settings-wide"
|
|
246
|
-
}, Ct = { class: "settings-help" }, wt = ["open"], Tt = /*#__PURE__*/
|
|
246
|
+
}, Ct = { class: "settings-help" }, wt = ["open"], Tt = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
247
247
|
__name: "WorkflowDefinitionSettings",
|
|
248
248
|
props: /*@__PURE__*/ ze({
|
|
249
249
|
configuration: {},
|
|
@@ -285,10 +285,10 @@ var it = De({
|
|
|
285
285
|
onSubmit: p[6] ||= rt((e) => o("submit"), ["prevent"])
|
|
286
286
|
}, [
|
|
287
287
|
e.creating ? (J(), U("p", yt, X(Z(n).t("platform.workflow-config.creation-help", "先创建草稿,再配置节点和参与人;发布后才会用于后续申请。")), 1)) : H("v-if", !0),
|
|
288
|
-
W("label", bt, [K(Z(
|
|
288
|
+
W("label", bt, [K(Z(be), { required: "" }, {
|
|
289
289
|
default: $(() => [G(X(Z(n).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
|
|
290
290
|
_: 1
|
|
291
|
-
}), K(Z(
|
|
291
|
+
}), K(Z(L), {
|
|
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 it = De({
|
|
|
299
299
|
"value",
|
|
300
300
|
"aria-label"
|
|
301
301
|
])]),
|
|
302
|
-
e.creating ? (J(), U("div", xt, [K(Z(
|
|
302
|
+
e.creating ? (J(), U("div", xt, [K(Z(xe), {
|
|
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: $(() => [G(X(Z(n).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
|
|
308
308
|
_: 1
|
|
309
|
-
}, 8, ["disabled", "checked"]), K(Z(
|
|
309
|
+
}, 8, ["disabled", "checked"]), K(Z(M), { label: Z(n).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
|
|
310
310
|
default: $(() => [G(X(Z(n).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
|
|
311
311
|
_: 1
|
|
312
312
|
}, 8, ["label"])])) : H("v-if", !0),
|
|
313
313
|
c.value ? H("v-if", !0) : (J(), U("label", St, [
|
|
314
|
-
K(Z(
|
|
314
|
+
K(Z(be), { required: "" }, {
|
|
315
315
|
default: $(() => [G(X(Z(n).t("platform.workflow-config.action-code", "模块动作编码")), 1)]),
|
|
316
316
|
_: 1
|
|
317
317
|
}),
|
|
318
|
-
K(Z(
|
|
318
|
+
K(Z(L), {
|
|
319
319
|
value: l.value,
|
|
320
320
|
"onUpdate:value": p[2] ||= (e) => l.value = e,
|
|
321
321
|
required: "",
|
|
@@ -360,104 +360,104 @@ var it = De({
|
|
|
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 = Fe(r), { client: o, context: l, language: u } = a, d = s(), f = Y([]),
|
|
363
|
+
let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a = Fe(r), { client: o, context: l, language: u } = a, d = s(), f = Y([]), m = Y(), h = Y(!1), _ = Y(!1), v = Y(!1), b = Y(!1), x = Y(""), S = Y(!1), w = Y(), E = Y(""), D = Y(!0), O = Y(""), k = Y(""), A = Y(""), j = Y(!1), ne = B(() => l.can?.("sort") === !0), M = B(() => !!E.value.trim() && (D.value || /^[a-z][A-Za-z0-9_]{0,63}$/.test(O.value.trim()))), F = !0;
|
|
364
364
|
Ge(() => {
|
|
365
|
-
|
|
366
|
-
}),
|
|
367
|
-
w,
|
|
368
|
-
T,
|
|
365
|
+
F = !1;
|
|
366
|
+
}), ce(() => u.t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"), () => b.value, () => v.value), Q([
|
|
369
367
|
E,
|
|
370
368
|
D,
|
|
371
369
|
O,
|
|
372
|
-
k
|
|
370
|
+
k,
|
|
371
|
+
A,
|
|
372
|
+
j
|
|
373
373
|
], () => {
|
|
374
|
-
|
|
374
|
+
h.value && (b.value = !0);
|
|
375
375
|
}, { flush: "sync" });
|
|
376
|
-
let
|
|
376
|
+
let re = B(() => u.t(_.value ? "platform.screen.WorkflowConfigurationView.new-workflow" : "platform.workflow-manager.edit", _.value ? "新建流程" : "流程设置")), ie = B(() => [{
|
|
377
377
|
key: "cancel",
|
|
378
378
|
label: u.t("platform.action.cancel", "取消"),
|
|
379
379
|
disabled: v.value,
|
|
380
|
-
run:
|
|
380
|
+
run: fe
|
|
381
381
|
}, {
|
|
382
382
|
key: "save",
|
|
383
383
|
label: u.t(_.value ? "platform.screen.WorkflowConfigurationView.create-workflow-draft" : "platform.action.save", _.value ? "创建流程草稿" : "保存"),
|
|
384
384
|
emphasis: "primary",
|
|
385
385
|
disabled: v.value || !M.value,
|
|
386
386
|
loading: v.value,
|
|
387
|
-
run:
|
|
387
|
+
run: pe
|
|
388
388
|
}]);
|
|
389
389
|
n.context.setSubtitle(i), n.context.setOperation(void 0), Q(v, () => n.context.setCloseBlocked(v.value), { immediate: !0 });
|
|
390
|
-
async function
|
|
390
|
+
async function I(e) {
|
|
391
391
|
if (!v.value) {
|
|
392
|
-
v.value = !0,
|
|
392
|
+
v.value = !0, w.value = void 0;
|
|
393
393
|
try {
|
|
394
394
|
await e();
|
|
395
395
|
} catch (e) {
|
|
396
|
-
|
|
396
|
+
F && (w.value = () => g(Se(e), u));
|
|
397
397
|
} finally {
|
|
398
|
-
|
|
398
|
+
F && (v.value = !1);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
async function
|
|
403
|
-
|
|
402
|
+
async function ae() {
|
|
403
|
+
h.value || v.value || await I(async () => {
|
|
404
404
|
let e = await o.query();
|
|
405
|
-
|
|
405
|
+
F && (f.value = e, await oe(e));
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
-
async function
|
|
408
|
+
async function oe(e) {
|
|
409
409
|
l.invalidateRecordActions?.(e.map((e) => e.id)), l.recordActionsBatch ? await l.recordActionsBatch(e.map((e) => e.id)) : l.recordActions && await Promise.all(e.map((e) => l.recordActions(e.id)));
|
|
410
410
|
}
|
|
411
411
|
Ke(() => {
|
|
412
|
-
|
|
412
|
+
ae();
|
|
413
413
|
}), We(() => {
|
|
414
|
-
|
|
414
|
+
ae();
|
|
415
415
|
}), t({
|
|
416
416
|
moduleAlias: "platform.workflow.definition",
|
|
417
417
|
handler: async () => {
|
|
418
|
-
await
|
|
418
|
+
await ae();
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
function
|
|
422
|
-
v.value ||
|
|
421
|
+
function se(e) {
|
|
422
|
+
v.value || h.value || (S.value = !1, m.value = e, E.value = e?.title ?? "", D.value = e?.approvalEnabled ?? !0, O.value = e?.actionCode ?? "", k.value = e?.organizationId ?? "", A.value = e?.matchExpression ?? "", j.value = e?.defaultDefinition ?? !1, _.value = !e, b.value = !1, h.value = !0);
|
|
423
423
|
}
|
|
424
|
-
async function
|
|
425
|
-
return v.value ||
|
|
424
|
+
async function le() {
|
|
425
|
+
return v.value || b.value && !await p({
|
|
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 : (
|
|
429
|
+
}, u) ? !1 : (b.value = !1, !0);
|
|
430
430
|
}
|
|
431
|
-
n.context.setBeforeClose(
|
|
432
|
-
async function
|
|
433
|
-
await
|
|
431
|
+
n.context.setBeforeClose(le);
|
|
432
|
+
async function fe() {
|
|
433
|
+
await le() && (h.value = !1, await ae());
|
|
434
434
|
}
|
|
435
|
-
async function
|
|
436
|
-
|
|
435
|
+
async function pe() {
|
|
436
|
+
h.value && M.value && await I(async () => {
|
|
437
437
|
let e = {
|
|
438
|
-
title:
|
|
439
|
-
organizationId:
|
|
440
|
-
matchExpression:
|
|
441
|
-
defaultDefinition:
|
|
442
|
-
...
|
|
438
|
+
title: E.value.trim(),
|
|
439
|
+
organizationId: k.value || null,
|
|
440
|
+
matchExpression: A.value || null,
|
|
441
|
+
defaultDefinition: j.value,
|
|
442
|
+
...D.value ? {} : { actionCode: O.value.trim() }
|
|
443
443
|
}, t = _.value ? await o.create({
|
|
444
444
|
...e,
|
|
445
|
-
...
|
|
445
|
+
...D.value ? { approvalEnabled: !0 } : {
|
|
446
446
|
approvalEnabled: !1,
|
|
447
|
-
actionCode:
|
|
447
|
+
actionCode: O.value.trim()
|
|
448
448
|
},
|
|
449
449
|
enabled: !0
|
|
450
|
-
}) : await o.saveSelection(
|
|
450
|
+
}) : await o.saveSelection(m.value.id, {
|
|
451
451
|
...e,
|
|
452
|
-
version:
|
|
452
|
+
version: m.value.version
|
|
453
453
|
});
|
|
454
|
-
|
|
454
|
+
F && (f.value = _.value ? [...f.value, t] : f.value.map((e) => e.id === t.id ? t : e), m.value = t, h.value = !1, b.value = !1, x.value = "", n.context.refreshDetailExtensions(), await oe([t]));
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
if (!(v.value ||
|
|
457
|
+
function me(e) {
|
|
458
|
+
if (!(v.value || h.value)) {
|
|
459
459
|
if (!d) {
|
|
460
|
-
|
|
460
|
+
P(Error(u.t("platform.workflow-manager.navigation-unavailable", "工作台导航暂不可用")), {
|
|
461
461
|
source: "workflow-design",
|
|
462
462
|
phase: "action"
|
|
463
463
|
});
|
|
@@ -471,7 +471,7 @@ var it = De({
|
|
|
471
471
|
}));
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
let
|
|
474
|
+
let _e = B(() => [
|
|
475
475
|
{
|
|
476
476
|
key: "title",
|
|
477
477
|
title: u.t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称"),
|
|
@@ -497,85 +497,85 @@ var it = De({
|
|
|
497
497
|
title: u.t("platform.workflow-manager.active", "启用状态"),
|
|
498
498
|
width: 90
|
|
499
499
|
}
|
|
500
|
-
]),
|
|
500
|
+
]), ve = B(() => f.value.filter((e) => !x.value.trim() || [
|
|
501
501
|
e.title,
|
|
502
502
|
e.matchExpression,
|
|
503
|
-
|
|
504
|
-
].some((e) => String(e ?? "").toLocaleLowerCase().includes(
|
|
505
|
-
function
|
|
503
|
+
de(e.definitionStatus, u)
|
|
504
|
+
].some((e) => String(e ?? "").toLocaleLowerCase().includes(x.value.trim().toLocaleLowerCase()))).map((e) => ({ ...e })));
|
|
505
|
+
function L(e) {
|
|
506
506
|
return e.definitionStatus === "published" || e.definitionStatus === "disabled" && e.currentVersionNo != null;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return !v.value && !
|
|
508
|
+
function ye(e, t) {
|
|
509
|
+
return !v.value && !h.value && l.can?.(e, String(t.id)) === !0;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
if (e.source.tenantId === e.target.tenantId) return
|
|
511
|
+
function be(e) {
|
|
512
|
+
if (e.source.tenantId === e.target.tenantId) return Ce({
|
|
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
|
|
518
|
+
async function xe(e, t) {
|
|
519
519
|
let n = f.value.find((e) => e.id === t.id);
|
|
520
|
-
if (n && !(v.value ||
|
|
520
|
+
if (n && !(v.value || h.value)) {
|
|
521
521
|
if (e === "design") {
|
|
522
|
-
|
|
522
|
+
me(n);
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
525
|
if (e === "settings") {
|
|
526
|
-
if (!
|
|
527
|
-
|
|
526
|
+
if (!ye("configureWorkflowSelection", n)) return;
|
|
527
|
+
se(n);
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
|
-
(e === "enable" || e === "disable" || e === "archive") &&
|
|
530
|
+
(e === "enable" || e === "disable" || e === "archive") && ye(`${e}WorkflowDefinition`, n) && (e !== "enable" || L(n)) && await p({
|
|
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
|
-
}, u) && await
|
|
534
|
+
}, u) && await I(async () => {
|
|
535
535
|
let t = await o.changeStatus(n.id, e, n.version);
|
|
536
|
-
|
|
536
|
+
F && (f.value = f.value.map((e) => e.id === t.id ? t : e), await oe([t]));
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
async function
|
|
541
|
-
|
|
540
|
+
async function Ce(e) {
|
|
541
|
+
S.value && ne.value && !v.value && !h.value && !x.value.trim() && e.dragRecord.id && e.dropRecord.id && await I(async () => {
|
|
542
542
|
await o.sort(String(e.dragRecord.id), String(e.dropRecord.id), e.position);
|
|
543
543
|
let t = await o.query();
|
|
544
|
-
|
|
544
|
+
F && (f.value = t, await oe(t));
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
return (e, t) => (J(), U(z, null, [
|
|
548
|
-
|
|
548
|
+
h.value ? (J(), V(Z(y), {
|
|
549
549
|
key: 0,
|
|
550
|
-
open:
|
|
550
|
+
open: h.value,
|
|
551
551
|
width: "standard",
|
|
552
|
-
title:
|
|
552
|
+
title: re.value,
|
|
553
553
|
subtitle: Z(i),
|
|
554
|
-
"before-close":
|
|
555
|
-
onClose:
|
|
554
|
+
"before-close": le,
|
|
555
|
+
onClose: fe
|
|
556
556
|
}, {
|
|
557
|
-
operation: $(() => [K(Z(
|
|
558
|
-
default: $(() => [
|
|
557
|
+
operation: $(() => [K(Z(he), { actions: ie.value }, null, 8, ["actions"])]),
|
|
558
|
+
default: $(() => [w.value ? (J(), V(Z(T), {
|
|
559
559
|
key: 0,
|
|
560
|
-
message:
|
|
560
|
+
message: w.value()
|
|
561
561
|
}, null, 8, ["message"])) : H("v-if", !0), K(Tt, {
|
|
562
|
-
onSubmit:
|
|
562
|
+
onSubmit: pe,
|
|
563
563
|
configuration: Z(a),
|
|
564
564
|
creating: _.value,
|
|
565
565
|
busy: v.value,
|
|
566
|
-
title:
|
|
567
|
-
"onUpdate:title": t[0] ||= (e) =>
|
|
568
|
-
"approval-enabled":
|
|
569
|
-
"onUpdate:approvalEnabled": t[1] ||= (e) =>
|
|
570
|
-
"action-code":
|
|
571
|
-
"onUpdate:actionCode": t[2] ||= (e) =>
|
|
572
|
-
"action-code-locked": !_.value &&
|
|
573
|
-
"organization-id":
|
|
574
|
-
"onUpdate:organizationId": t[3] ||= (e) =>
|
|
575
|
-
"match-expression":
|
|
576
|
-
"onUpdate:matchExpression": t[4] ||= (e) =>
|
|
577
|
-
fallback:
|
|
578
|
-
"onUpdate:fallback": t[5] ||= (e) =>
|
|
566
|
+
title: E.value,
|
|
567
|
+
"onUpdate:title": t[0] ||= (e) => E.value = e,
|
|
568
|
+
"approval-enabled": D.value,
|
|
569
|
+
"onUpdate:approvalEnabled": t[1] ||= (e) => D.value = e,
|
|
570
|
+
"action-code": O.value,
|
|
571
|
+
"onUpdate:actionCode": t[2] ||= (e) => O.value = e,
|
|
572
|
+
"action-code-locked": !_.value && m.value?.currentVersionNo != null,
|
|
573
|
+
"organization-id": k.value,
|
|
574
|
+
"onUpdate:organizationId": t[3] ||= (e) => k.value = e,
|
|
575
|
+
"match-expression": A.value,
|
|
576
|
+
"onUpdate:matchExpression": t[4] ||= (e) => A.value = e,
|
|
577
|
+
fallback: j.value,
|
|
578
|
+
"onUpdate:fallback": t[5] ||= (e) => j.value = e
|
|
579
579
|
}, null, 8, [
|
|
580
580
|
"configuration",
|
|
581
581
|
"creating",
|
|
@@ -594,43 +594,43 @@ var it = De({
|
|
|
594
594
|
"title",
|
|
595
595
|
"subtitle"
|
|
596
596
|
])) : H("v-if", !0),
|
|
597
|
-
|
|
597
|
+
w.value && !h.value ? (J(), V(Z(T), {
|
|
598
598
|
key: 1,
|
|
599
|
-
message:
|
|
599
|
+
message: w.value()
|
|
600
600
|
}, null, 8, ["message"])) : H("v-if", !0),
|
|
601
|
-
K(Z(
|
|
601
|
+
K(Z(C), {
|
|
602
602
|
embedded: "",
|
|
603
603
|
title: Z(u).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
|
|
604
|
-
"title-action-disabled": v.value ||
|
|
604
|
+
"title-action-disabled": v.value || h.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:
|
|
609
|
-
rows:
|
|
608
|
+
columns: _e.value,
|
|
609
|
+
rows: ve.value,
|
|
610
610
|
loading: v.value,
|
|
611
|
-
"table-visible":
|
|
611
|
+
"table-visible": h.value || !w.value || f.value.length > 0,
|
|
612
612
|
"empty-description": Z(u).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
|
|
613
613
|
"quick-search-visible": !0,
|
|
614
|
-
"quick-search-value":
|
|
615
|
-
"quick-search-disabled": v.value ||
|
|
616
|
-
"row-draggable":
|
|
614
|
+
"quick-search-value": x.value,
|
|
615
|
+
"quick-search-disabled": v.value || h.value,
|
|
616
|
+
"row-draggable": S.value && !v.value && !h.value && ne.value && !x.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
|
-
"onUpdate:quickSearchValue": t[9] ||= (e) =>
|
|
621
|
-
onTitleAction:
|
|
622
|
-
onRowDrop:
|
|
620
|
+
"onUpdate:quickSearchValue": t[9] ||= (e) => x.value = e,
|
|
621
|
+
onTitleAction: ae,
|
|
622
|
+
onRowDrop: be
|
|
623
623
|
}, {
|
|
624
|
-
operations: $(() => [
|
|
624
|
+
operations: $(() => [ne.value ? (J(), V(Z(ee), {
|
|
625
625
|
key: 0,
|
|
626
626
|
"icon-name": "swap-vertical",
|
|
627
627
|
"icon-only": "",
|
|
628
628
|
size: "small",
|
|
629
629
|
type: "text",
|
|
630
|
-
selected:
|
|
631
|
-
disabled: v.value ||
|
|
630
|
+
selected: S.value,
|
|
631
|
+
disabled: v.value || h.value || !!x.value.trim(),
|
|
632
632
|
title: Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
|
|
633
|
-
onClick: t[6] ||= (e) =>
|
|
633
|
+
onClick: t[6] ||= (e) => S.value = !S.value
|
|
634
634
|
}, null, 8, [
|
|
635
635
|
"selected",
|
|
636
636
|
"disabled",
|
|
@@ -638,17 +638,17 @@ var it = De({
|
|
|
638
638
|
])) : H("v-if", !0), K(Z(ue), {
|
|
639
639
|
"icon-name": "plus",
|
|
640
640
|
title: Z(u).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
|
|
641
|
-
disabled: v.value ||
|
|
642
|
-
onClick: t[7] ||= (e) =>
|
|
641
|
+
disabled: v.value || h.value || Z(l).can?.("create") !== !0,
|
|
642
|
+
onClick: t[7] ||= (e) => se()
|
|
643
643
|
}, null, 8, ["title", "disabled"])]),
|
|
644
|
-
beforeTable: $(() => [
|
|
644
|
+
beforeTable: $(() => [w.value && !h.value ? (J(), V(Z(R), {
|
|
645
645
|
key: 0,
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: ae
|
|
647
647
|
}, {
|
|
648
648
|
default: $(() => [G(X(Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
|
|
649
649
|
_: 1
|
|
650
650
|
})) : H("v-if", !0)]),
|
|
651
|
-
cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), U("span", Et, X(Z(
|
|
651
|
+
cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), U("span", Et, X(Z(de)(String(r ?? ""), Z(u))), 1)) : e.key === "currentVersionNo" ? (J(), U("span", Dt, X(r == null ? "—" : `v${r}`), 1)) : e.key === "matchExpression" ? (J(), V(Z(ge), {
|
|
652
652
|
key: 2,
|
|
653
653
|
column: {
|
|
654
654
|
...e,
|
|
@@ -659,15 +659,15 @@ var it = De({
|
|
|
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(), V(Z(
|
|
662
|
+
}, null, 8, ["column", "record"])) : e.key === "active" ? (J(), V(Z(N), {
|
|
663
663
|
key: 3,
|
|
664
|
-
title:
|
|
664
|
+
title: L(n) ? Z(u).t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。") : Z(u).t("platform.workflow-manager.publish-to-enable", "请进入编排发布流程后启用")
|
|
665
665
|
}, {
|
|
666
|
-
default: $(() => [W("span", { onClick: t[8] ||= rt(() => {}, ["stop"]) }, [K(Z(
|
|
666
|
+
default: $(() => [W("span", { onClick: t[8] ||= rt(() => {}, ["stop"]) }, [K(Z(te), {
|
|
667
667
|
"aria-label": Z(u).t("platform.workflow-manager.active", "启用状态") + ":" + n.title,
|
|
668
668
|
checked: n.definitionStatus === "published" && n.enabled !== !1,
|
|
669
|
-
disabled: !
|
|
670
|
-
onChange: (e) =>
|
|
669
|
+
disabled: !L(n) || !ye(n.definitionStatus === "published" ? "disableWorkflowDefinition" : "enableWorkflowDefinition", n),
|
|
670
|
+
onChange: (e) => xe(e ? "enable" : "disable", n)
|
|
671
671
|
}, null, 8, [
|
|
672
672
|
"aria-label",
|
|
673
673
|
"checked",
|
|
@@ -675,7 +675,7 @@ var it = De({
|
|
|
675
675
|
"onChange"
|
|
676
676
|
])])]),
|
|
677
677
|
_: 2
|
|
678
|
-
}, 1032, ["title"])) : (J(), V(Z(
|
|
678
|
+
}, 1032, ["title"])) : (J(), V(Z(ge), {
|
|
679
679
|
key: 4,
|
|
680
680
|
column: {
|
|
681
681
|
...e,
|
|
@@ -685,30 +685,30 @@ var it = De({
|
|
|
685
685
|
record: n
|
|
686
686
|
}, null, 8, ["column", "record"]))]),
|
|
687
687
|
rowActions: $(({ record: e }) => [
|
|
688
|
-
K(Z(
|
|
688
|
+
K(Z(R), {
|
|
689
689
|
type: "link",
|
|
690
690
|
size: "small",
|
|
691
|
-
disabled: v.value ||
|
|
692
|
-
onClick: (t) =>
|
|
691
|
+
disabled: v.value || h.value,
|
|
692
|
+
onClick: (t) => xe("design", e)
|
|
693
693
|
}, {
|
|
694
694
|
default: $(() => [G(X(Z(u).t("platform.workflow-manager.design", "编排")), 1)]),
|
|
695
695
|
_: 1
|
|
696
696
|
}, 8, ["disabled", "onClick"]),
|
|
697
|
-
K(Z(
|
|
697
|
+
K(Z(R), {
|
|
698
698
|
type: "link",
|
|
699
699
|
size: "small",
|
|
700
|
-
disabled: !
|
|
701
|
-
onClick: (t) =>
|
|
700
|
+
disabled: !ye("configureWorkflowSelection", e),
|
|
701
|
+
onClick: (t) => xe("settings", e)
|
|
702
702
|
}, {
|
|
703
703
|
default: $(() => [G(X(Z(u).t("platform.workflow-manager.settings", "设置")), 1)]),
|
|
704
704
|
_: 1
|
|
705
705
|
}, 8, ["disabled", "onClick"]),
|
|
706
|
-
K(Z(
|
|
706
|
+
K(Z(R), {
|
|
707
707
|
type: "link",
|
|
708
708
|
size: "small",
|
|
709
709
|
danger: "",
|
|
710
|
-
disabled: e.definitionStatus === "archived" || !
|
|
711
|
-
onClick: (t) =>
|
|
710
|
+
disabled: e.definitionStatus === "archived" || !ye("archiveWorkflowDefinition", e),
|
|
711
|
+
onClick: (t) => xe("archive", e)
|
|
712
712
|
}, {
|
|
713
713
|
default: $(() => [G(X(Z(u).t("platform.screen.WorkflowConfigurationView.archive", "归档")), 1)]),
|
|
714
714
|
_: 1
|
|
@@ -734,11 +734,11 @@ var it = De({
|
|
|
734
734
|
}), kt = { class: "module-menu-entries" }, At = { key: 0 }, jt = {
|
|
735
735
|
key: 1,
|
|
736
736
|
role: "status"
|
|
737
|
-
}, Mt = { key: 2 }, Nt = { key: 0 }, Pt = /*#__PURE__*/
|
|
737
|
+
}, Mt = { key: 2 }, Nt = { key: 0 }, Pt = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
738
738
|
__name: "ModuleMenuEntriesSection",
|
|
739
739
|
props: { context: {} },
|
|
740
740
|
setup(e) {
|
|
741
|
-
let t =
|
|
741
|
+
let t = j(), n = e, r = s(), i = Y([]), a = B(() => i.value.flatMap(({ scheme: e, tree: r }) => Ne(r, _(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), o = Y(/* @__PURE__ */ new Map()), c = Y(!1), l = Y(!1), u = B(() => l.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
|
|
742
742
|
Ge(() => 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 it = De({
|
|
|
756
756
|
e === d && (c.value = !1);
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
return (e, n) => (J(), U("div", kt, [c.value ? (J(), U("span", At, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (J(), U("div", jt, [G(X(u.value) + " ", 1), K(Z(
|
|
759
|
+
return (e, n) => (J(), U("div", kt, [c.value ? (J(), U("span", At, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (J(), U("div", jt, [G(X(u.value) + " ", 1), K(Z(R), {
|
|
760
760
|
type: "link",
|
|
761
761
|
onClick: f
|
|
762
762
|
}, {
|
|
@@ -765,7 +765,7 @@ var it = De({
|
|
|
765
765
|
})])) : a.value.length ? H("v-if", !0) : (J(), U("span", Mt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (J(!0), U(z, null, Ye(a.value, (e) => (J(), U("div", {
|
|
766
766
|
key: e.menu.id,
|
|
767
767
|
class: "menu-entry"
|
|
768
|
-
}, [W("span", null, [G(X(e.path), 1), e.menu.enabled === !1 ? (J(), U("small", Nt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : H("v-if", !0)]), o.value.has(e.menu.id) && Z(r)?.openMenu ? (J(), V(Z(
|
|
768
|
+
}, [W("span", null, [G(X(e.path), 1), e.menu.enabled === !1 ? (J(), U("small", Nt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : H("v-if", !0)]), o.value.has(e.menu.id) && Z(r)?.openMenu ? (J(), V(Z(R), {
|
|
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 It(e) {
|
|
|
793
793
|
n.get(r) === i && (t.value[r] = {
|
|
794
794
|
phase: "failed",
|
|
795
795
|
configurable: !1,
|
|
796
|
-
error:
|
|
796
|
+
error: g(Se(e))
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -833,11 +833,11 @@ var Bt = {
|
|
|
833
833
|
key: 0,
|
|
834
834
|
class: "module-code-status",
|
|
835
835
|
role: "status"
|
|
836
|
-
}, Vt = /*#__PURE__*/
|
|
836
|
+
}, Vt = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
837
837
|
__name: "ModuleCodeConfigurationStatus",
|
|
838
838
|
props: { context: {} },
|
|
839
839
|
setup(e) {
|
|
840
|
-
let t = e, n =
|
|
840
|
+
let t = e, n = j(), r = s(), i = B(() => Lt(t.context.module)), a = B(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), o = B(() => i.value.states.value[a.value]);
|
|
841
841
|
Q([
|
|
842
842
|
a,
|
|
843
843
|
() => t.context.mode,
|
|
@@ -856,14 +856,14 @@ var Bt = {
|
|
|
856
856
|
return (e, t) => u.value ? (J(), U("div", Bt, [o.value?.phase === "failed" ? (J(), U(z, { key: 0 }, [
|
|
857
857
|
W("span", null, X(Z(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
|
|
858
858
|
W("span", null, X(o.value?.error), 1),
|
|
859
|
-
K(Z(
|
|
859
|
+
K(Z(R), {
|
|
860
860
|
type: "link",
|
|
861
861
|
onClick: t[0] ||= (e) => i.value.refresh(a.value)
|
|
862
862
|
}, {
|
|
863
863
|
default: $(() => [G(X(Z(n).t("platform.code.config.retry", "重试")), 1)]),
|
|
864
864
|
_: 1
|
|
865
865
|
})
|
|
866
|
-
], 64)) : (J(), U(z, { key: 1 }, [W("span", null, X(Z(n).t(`platform.code.config.reason.${l.value}`, l.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Z(r) ? (J(), V(Z(
|
|
866
|
+
], 64)) : (J(), U(z, { key: 1 }, [W("span", null, X(Z(n).t(`platform.code.config.reason.${l.value}`, l.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Z(r) ? (J(), V(Z(R), {
|
|
867
867
|
key: 0,
|
|
868
868
|
type: "link",
|
|
869
869
|
onClick: d
|
|
@@ -1012,12 +1012,12 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1012
1012
|
id: "iam-password-policy-preview",
|
|
1013
1013
|
target: { moduleAlias: "iam.password_policy_rule" },
|
|
1014
1014
|
card: { assistant: {
|
|
1015
|
-
component: /* @__PURE__ */
|
|
1015
|
+
component: /* @__PURE__ */ I(/* @__PURE__ */ q({
|
|
1016
1016
|
name: "PasswordPolicyPreview",
|
|
1017
1017
|
__name: "PasswordPolicyPreview",
|
|
1018
1018
|
props: { context: {} },
|
|
1019
1019
|
setup(e) {
|
|
1020
|
-
let t =
|
|
1020
|
+
let t = j(), n = e, r = Y("CURRENT"), i = Y(""), a = Y(), o = Y(!1), s = Y(!1), c = 0, l = B(() => y(n.context.record)), u = B(() => n.context.mode !== "view" || E(l.value?.id) !== void 0), f = B(() => [{
|
|
1021
1021
|
value: "CURRENT",
|
|
1022
1022
|
label: t.t("platform.screen.PasswordPolicyPreview.current-rule", "本规则"),
|
|
1023
1023
|
disabled: !u.value
|
|
@@ -1028,13 +1028,13 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1028
1028
|
Q(u, (e) => {
|
|
1029
1029
|
!e && r.value === "CURRENT" && (r.value = "ALL");
|
|
1030
1030
|
}, { immediate: !0 });
|
|
1031
|
-
function
|
|
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]) => {
|
|
1035
|
-
e === "ALL" &&
|
|
1035
|
+
e === "ALL" && m();
|
|
1036
1036
|
}, { immediate: !0 });
|
|
1037
|
-
async function
|
|
1037
|
+
async function m() {
|
|
1038
1038
|
let e = ++c;
|
|
1039
1039
|
s.value = !0, o.value = !1, a.value = void 0;
|
|
1040
1040
|
try {
|
|
@@ -1048,56 +1048,56 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1048
1048
|
e === c && (s.value = !1);
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
let
|
|
1051
|
+
let h = B(() => {
|
|
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(
|
|
1055
|
+
let t = a.value.filter(O), n = E(e?.id);
|
|
1056
1056
|
if (n) {
|
|
1057
|
-
let e = t.findIndex((e) =>
|
|
1057
|
+
let e = t.findIndex((e) => E(e.id) === n);
|
|
1058
1058
|
e >= 0 && t.splice(e, 1);
|
|
1059
1059
|
}
|
|
1060
|
-
return e &&
|
|
1061
|
-
}),
|
|
1060
|
+
return e && O(e) && t.push(e), t.length > 0 ? t.sort(C) : [];
|
|
1061
|
+
}), g = B(() => i.value ? h.value.map((e, t) => x(e, i.value, t)) : []), _ = B(() => g.value.map((e) => ({
|
|
1062
1062
|
...e,
|
|
1063
|
-
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) :
|
|
1064
|
-
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) :
|
|
1063
|
+
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : w(e.title, e.titleText, t),
|
|
1064
|
+
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : w(e.message, e.messageText, t),
|
|
1065
1065
|
diagnostic: e.diagnostic ? t.t(e.diagnostic.sourceId, e.diagnostic.originalText) : void 0
|
|
1066
|
-
}))),
|
|
1066
|
+
}))), v = B(() => {
|
|
1067
1067
|
if (!u.value && r.value === "CURRENT") return t.t("platform.screen.PasswordPolicyPreview.select-or-create-a-rule", "请选择或新建一条规则");
|
|
1068
1068
|
if (r.value === "ALL" && s.value) return t.t("platform.screen.PasswordPolicyPreview.loading-the-authoritative-rules", "正在加载权威规则集");
|
|
1069
1069
|
if (r.value === "ALL" && o.value) return t.t("platform.screen.PasswordPolicyPreview.unable-to-load-the-authoritative-rules", "无法加载权威规则集");
|
|
1070
1070
|
if (!i.value) return t.t("platform.screen.PasswordPolicyPreview.enter-a-test-password-for-immediate-feedback", "输入测试密码后即时反馈");
|
|
1071
|
-
if (
|
|
1072
|
-
let e =
|
|
1071
|
+
if (g.value.length === 0) return t.t("platform.screen.PasswordPolicyPreview.no-enabled-rules-participate-in-this-preview", "当前没有参与试算的启用规则");
|
|
1072
|
+
let e = g.value.filter((e) => !e.passed).length;
|
|
1073
1073
|
return e === 0 ? t.t("platform.screen.PasswordPolicyPreview.all-passed-value-value", "全部通过({value1}/{value2})", {
|
|
1074
|
-
value1:
|
|
1075
|
-
value2:
|
|
1074
|
+
value1: g.value.length,
|
|
1075
|
+
value2: g.value.length
|
|
1076
1076
|
}) : t.t("platform.screen.PasswordPolicyPreview.value-rules-failed", "{value1} 条规则未通过", { value1: e });
|
|
1077
1077
|
});
|
|
1078
|
-
function
|
|
1078
|
+
function y(e) {
|
|
1079
1079
|
if (e) return e;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
let r = e.title?.trim() ? void 0 :
|
|
1083
|
-
titleText:
|
|
1084
|
-
messageText:
|
|
1081
|
+
function x(e, t, n) {
|
|
1082
|
+
let r = e.title?.trim() ? void 0 : S("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : S("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = D(e.title, r?.originalText ?? ""), o = D(e.message, i?.originalText ?? ""), s = {
|
|
1083
|
+
titleText: b(e, "title"),
|
|
1084
|
+
messageText: b(e, "message")
|
|
1085
1085
|
}, c = e.pattern;
|
|
1086
1086
|
if (!c?.trim()) return {
|
|
1087
1087
|
...s,
|
|
1088
|
-
key:
|
|
1088
|
+
key: T(e, n),
|
|
1089
1089
|
title: a,
|
|
1090
1090
|
message: o,
|
|
1091
1091
|
titleSource: r,
|
|
1092
1092
|
messageSource: i,
|
|
1093
1093
|
passed: !1,
|
|
1094
|
-
diagnostic:
|
|
1094
|
+
diagnostic: S("platform.screen.PasswordPolicyPreview.regular-expression-required")
|
|
1095
1095
|
};
|
|
1096
1096
|
try {
|
|
1097
1097
|
let l = RegExp(`^(?:${c})$`).test(t);
|
|
1098
1098
|
return {
|
|
1099
1099
|
...s,
|
|
1100
|
-
key:
|
|
1100
|
+
key: T(e, n),
|
|
1101
1101
|
title: a,
|
|
1102
1102
|
message: o,
|
|
1103
1103
|
titleSource: r,
|
|
@@ -1107,41 +1107,41 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1107
1107
|
} catch {
|
|
1108
1108
|
return {
|
|
1109
1109
|
...s,
|
|
1110
|
-
key:
|
|
1110
|
+
key: T(e, n),
|
|
1111
1111
|
title: a,
|
|
1112
1112
|
message: o,
|
|
1113
1113
|
titleSource: r,
|
|
1114
1114
|
messageSource: i,
|
|
1115
1115
|
passed: !1,
|
|
1116
|
-
diagnostic:
|
|
1116
|
+
diagnostic: S("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) ||
|
|
1120
|
+
function C(e, t) {
|
|
1121
|
+
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || D(e.title, "").localeCompare(D(t.title, ""));
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1123
|
+
function T(e, t) {
|
|
1124
|
+
return E(e.id) ?? `draft:${t}`;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function E(e) {
|
|
1127
1127
|
return e?.trim() || void 0;
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function D(e, t) {
|
|
1130
1130
|
return e?.trim() || t;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function O(e) {
|
|
1133
1133
|
return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
|
|
1134
1134
|
}
|
|
1135
1135
|
return (e, n) => (J(), U("section", $t, [
|
|
1136
|
-
W("header", null, [W("h3", null, X(Z(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), W("span", { class: He({ failed:
|
|
1137
|
-
K(Z(
|
|
1136
|
+
W("header", null, [W("h3", null, X(Z(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), W("span", { class: He({ failed: g.value.some((e) => !e.passed) }) }, X(v.value), 3)]),
|
|
1137
|
+
K(Z(d), {
|
|
1138
1138
|
class: "preview-scope",
|
|
1139
1139
|
value: r.value,
|
|
1140
|
-
options:
|
|
1140
|
+
options: f.value,
|
|
1141
1141
|
size: "small",
|
|
1142
|
-
"onUpdate:value":
|
|
1142
|
+
"onUpdate:value": p
|
|
1143
1143
|
}, null, 8, ["value", "options"]),
|
|
1144
|
-
K(Z(
|
|
1144
|
+
K(Z(L), {
|
|
1145
1145
|
value: i.value,
|
|
1146
1146
|
"onUpdate:value": n[0] ||= (e) => i.value = e,
|
|
1147
1147
|
type: "text",
|
|
@@ -1153,7 +1153,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1153
1153
|
"placeholder",
|
|
1154
1154
|
"aria-label"
|
|
1155
1155
|
]),
|
|
1156
|
-
|
|
1156
|
+
g.value.length ? (J(), U("ul", en, [(J(!0), U(z, null, Ye(_.value, (e) => (J(), U("li", {
|
|
1157
1157
|
key: e.key,
|
|
1158
1158
|
class: He({
|
|
1159
1159
|
passed: e.passed,
|
|
@@ -1171,12 +1171,12 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1171
1171
|
}, nn = { class: "tenant-applications-detail" }, rn = { class: "tenant-applications-summary" }, an = {
|
|
1172
1172
|
key: 0,
|
|
1173
1173
|
class: "tenant-applications-status"
|
|
1174
|
-
}, on = /*#__PURE__*/
|
|
1174
|
+
}, on = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
1175
1175
|
name: "TenantApplicationsDetailSection",
|
|
1176
1176
|
__name: "TenantApplicationsDetailSection",
|
|
1177
1177
|
props: { context: {} },
|
|
1178
1178
|
setup(e) {
|
|
1179
|
-
let t =
|
|
1179
|
+
let t = j(), n = e, r = Y([]), i = Y(!1), a = 0, o = Y(/* @__PURE__ */ new Map()), s = B(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
|
|
1180
1180
|
key: e,
|
|
1181
1181
|
label: o.value.get(e) ? `${o.value.get(e)} · ${e}` : e
|
|
1182
1182
|
})));
|
|
@@ -1206,7 +1206,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
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 &&
|
|
1209
|
+
s === a && P(e, {
|
|
1210
1210
|
language: t,
|
|
1211
1211
|
source: "tenant-applications-detail",
|
|
1212
1212
|
phase: "load"
|
|
@@ -1218,19 +1218,19 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1218
1218
|
function l(e, t) {
|
|
1219
1219
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
1220
1220
|
}
|
|
1221
|
-
return (e, n) => (J(), U("section", nn, [W("div", rn, [i.value ? (J(), U("span", an, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (J(), V(Z(
|
|
1221
|
+
return (e, n) => (J(), U("section", nn, [W("div", rn, [i.value ? (J(), U("span", an, X(Z(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (J(), V(Z(F), {
|
|
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"]]), sn = { class: "tenant-application-configuration" }, cn = /*#__PURE__*/
|
|
1228
|
+
}), [["__scopeId", "data-v-49a973de"]]), sn = { class: "tenant-application-configuration" }, cn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
1229
1229
|
name: "TenantApplicationConfigurationDrawer",
|
|
1230
1230
|
__name: "TenantApplicationConfigurationDrawer",
|
|
1231
1231
|
props: { context: {} },
|
|
1232
1232
|
setup(e) {
|
|
1233
|
-
let t =
|
|
1233
|
+
let t = j(), n = e, r = Y([]), i = Y(/* @__PURE__ */ new Set()), a = Y(!1), o = Y(!1), s = B(() => [{
|
|
1234
1234
|
key: "title",
|
|
1235
1235
|
title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-name", "应用名称"),
|
|
1236
1236
|
width: 260
|
|
@@ -1290,7 +1290,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
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
|
-
|
|
1293
|
+
P(e, {
|
|
1294
1294
|
language: t,
|
|
1295
1295
|
source: "tenant-application-configuration",
|
|
1296
1296
|
phase: "load"
|
|
@@ -1311,7 +1311,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1311
1311
|
body: { applicationAliases: [...i.value] }
|
|
1312
1312
|
}), n.context.refreshDetailExtensions(), n.context.refreshList(), n.context.close();
|
|
1313
1313
|
} catch (e) {
|
|
1314
|
-
|
|
1314
|
+
P(e, {
|
|
1315
1315
|
language: t,
|
|
1316
1316
|
source: "tenant-application-configuration",
|
|
1317
1317
|
phase: "action"
|
|
@@ -1324,7 +1324,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1324
1324
|
function p(e, t) {
|
|
1325
1325
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
1326
1326
|
}
|
|
1327
|
-
return (e, n) => (J(), U("section", sn, [W("p", null, X(Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), K(Z(
|
|
1327
|
+
return (e, n) => (J(), U("section", sn, [W("p", null, X(Z(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), K(Z(D), {
|
|
1328
1328
|
columns: s.value,
|
|
1329
1329
|
rows: c.value,
|
|
1330
1330
|
loading: a.value,
|
|
@@ -1357,8 +1357,8 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1357
1357
|
},
|
|
1358
1358
|
...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
|
|
1359
1359
|
fieldName: e,
|
|
1360
|
-
imageUploadHint: ({ draft: e }, t =
|
|
1361
|
-
imageUploadAdvisory: ({ draft: e }, t =
|
|
1360
|
+
imageUploadHint: ({ draft: e }, t = _e) => 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 = _e) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => un(e, t)
|
|
1362
1362
|
}))
|
|
1363
1363
|
]
|
|
1364
1364
|
},
|
|
@@ -1417,12 +1417,12 @@ function dn(e) {
|
|
|
1417
1417
|
var fn = {
|
|
1418
1418
|
key: 1,
|
|
1419
1419
|
class: "employee-account-drawer"
|
|
1420
|
-
}, pn = { class: "employee-account-existing-picker" }, mn = /*#__PURE__*/
|
|
1420
|
+
}, pn = { class: "employee-account-existing-picker" }, mn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
1421
1421
|
name: "EmployeeAccountDrawer",
|
|
1422
1422
|
__name: "EmployeeAccountDrawer",
|
|
1423
1423
|
props: { context: {} },
|
|
1424
1424
|
setup(e) {
|
|
1425
|
-
let t =
|
|
1425
|
+
let t = j(), n = e, r = Y(), i = Y(), a = Y(""), o = Y(""), s = Y(!1), c = Y(!1);
|
|
1426
1426
|
Ke(() => void l());
|
|
1427
1427
|
async function l() {
|
|
1428
1428
|
let e = v();
|
|
@@ -1431,7 +1431,7 @@ var fn = {
|
|
|
1431
1431
|
try {
|
|
1432
1432
|
r.value = await n.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
|
|
1433
1433
|
} catch (e) {
|
|
1434
|
-
|
|
1434
|
+
P(e, {
|
|
1435
1435
|
language: t,
|
|
1436
1436
|
source: "employee-account",
|
|
1437
1437
|
phase: "load"
|
|
@@ -1446,7 +1446,7 @@ var fn = {
|
|
|
1446
1446
|
if (!e || c.value) return;
|
|
1447
1447
|
let i = a.value.trim();
|
|
1448
1448
|
if (!i || !o.value) {
|
|
1449
|
-
|
|
1449
|
+
Ce(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
|
|
1450
1450
|
language: t,
|
|
1451
1451
|
source: "employee-account",
|
|
1452
1452
|
phase: "validation"
|
|
@@ -1465,7 +1465,7 @@ var fn = {
|
|
|
1465
1465
|
});
|
|
1466
1466
|
r.value = fe(t).binding, o.value = "", n.context.refreshList();
|
|
1467
1467
|
} catch (e) {
|
|
1468
|
-
|
|
1468
|
+
P(e, {
|
|
1469
1469
|
language: t,
|
|
1470
1470
|
source: "employee-account",
|
|
1471
1471
|
phase: "action"
|
|
@@ -1487,13 +1487,13 @@ var fn = {
|
|
|
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(),
|
|
1490
|
+
}), i.value = void 0, n.context.refreshList(), Ce(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
|
-
|
|
1496
|
+
P(e, {
|
|
1497
1497
|
language: t,
|
|
1498
1498
|
source: "employee-account",
|
|
1499
1499
|
phase: "action"
|
|
@@ -1551,7 +1551,7 @@ var fn = {
|
|
|
1551
1551
|
departmentName: e.departmentTitle
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
|
-
async function
|
|
1554
|
+
async function _() {
|
|
1555
1555
|
let e = v();
|
|
1556
1556
|
if (e && r.value && !c.value && await p({
|
|
1557
1557
|
title: t.t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户"),
|
|
@@ -1566,7 +1566,7 @@ var fn = {
|
|
|
1566
1566
|
path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
|
|
1567
1567
|
}), r.value = void 0, n.context.refreshList();
|
|
1568
1568
|
} catch (e) {
|
|
1569
|
-
|
|
1569
|
+
P(e, {
|
|
1570
1570
|
language: t,
|
|
1571
1571
|
source: "employee-account",
|
|
1572
1572
|
phase: "action"
|
|
@@ -1580,18 +1580,18 @@ var fn = {
|
|
|
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(), V(Z(
|
|
1583
|
+
return (e, n) => s.value ? (J(), V(Z(E), {
|
|
1584
1584
|
key: 0,
|
|
1585
1585
|
tip: Z(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
|
|
1586
|
-
}, null, 8, ["tip"])) : (J(), U("section", fn, [v() ? r.value ? (J(), U(z, { key: 1 }, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), K(Z(
|
|
1586
|
+
}, null, 8, ["tip"])) : (J(), U("section", fn, [v() ? r.value ? (J(), U(z, { key: 1 }, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), K(Z(R), {
|
|
1587
1587
|
danger: "",
|
|
1588
1588
|
"icon-name": "delete",
|
|
1589
1589
|
loading: c.value,
|
|
1590
|
-
onClick:
|
|
1590
|
+
onClick: _
|
|
1591
1591
|
}, {
|
|
1592
1592
|
default: $(() => [G(X(Z(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
|
|
1593
1593
|
_: 1
|
|
1594
|
-
}, 8, ["loading"])], 64)) : (J(), U(z, { key: 2 }, [W("section", pn, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), K(Z(
|
|
1594
|
+
}, 8, ["loading"])], 64)) : (J(), U(z, { key: 2 }, [W("section", pn, [W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), K(Z(le), {
|
|
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", "搜索并选择已有登录账号"),
|
|
@@ -1607,7 +1607,7 @@ var fn = {
|
|
|
1607
1607
|
"title"
|
|
1608
1608
|
])]), W("form", { onSubmit: rt(u, ["prevent"]) }, [
|
|
1609
1609
|
W("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.you-can-also-create-a-login-account-and-bind-it", "也可直接创建登录账号并自动绑定到当前职员。")), 1),
|
|
1610
|
-
W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), K(Z(
|
|
1610
|
+
W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), K(Z(L), {
|
|
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 fn = {
|
|
|
1617
1617
|
"disabled",
|
|
1618
1618
|
"placeholder"
|
|
1619
1619
|
])]),
|
|
1620
|
-
W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), K(Z(
|
|
1620
|
+
W("label", null, [W("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), K(Z(L), {
|
|
1621
1621
|
value: o.value,
|
|
1622
1622
|
"onUpdate:value": n[2] ||= (e) => o.value = e,
|
|
1623
1623
|
type: "password",
|
|
@@ -1628,7 +1628,7 @@ var fn = {
|
|
|
1628
1628
|
"disabled",
|
|
1629
1629
|
"placeholder"
|
|
1630
1630
|
])]),
|
|
1631
|
-
K(Z(
|
|
1631
|
+
K(Z(R), {
|
|
1632
1632
|
type: "primary",
|
|
1633
1633
|
"html-type": "submit",
|
|
1634
1634
|
"icon-name": "plus",
|
|
@@ -1637,7 +1637,7 @@ var fn = {
|
|
|
1637
1637
|
default: $(() => [G(X(Z(t).t("platform.screen.EmployeeAccountDrawer.create-and-bind-account", "创建账号并绑定")), 1)]),
|
|
1638
1638
|
_: 1
|
|
1639
1639
|
}, 8, ["loading"])
|
|
1640
|
-
], 32)], 64)) : (J(), V(Z(
|
|
1640
|
+
], 32)], 64)) : (J(), V(Z(T), {
|
|
1641
1641
|
key: 0,
|
|
1642
1642
|
title: Z(t).t("platform.screen.EmployeeAccountDrawer.employee-not-found", "职员不存在"),
|
|
1643
1643
|
message: Z(t).t("platform.screen.EmployeeAccountDrawer.reopen-the-employee-record-to-set-up-an-account", "请重新打开职员档案后再设置账号。")
|
|
@@ -1663,7 +1663,7 @@ var fn = {
|
|
|
1663
1663
|
}] }
|
|
1664
1664
|
}, gn = "iam.user.session.collectionChanged", _n = /* @__PURE__ */ new WeakMap();
|
|
1665
1665
|
function vn() {
|
|
1666
|
-
let e =
|
|
1666
|
+
let e = x(), t = _n.get(e);
|
|
1667
1667
|
t || (t = yn(e), _n.set(e, t));
|
|
1668
1668
|
let n = t;
|
|
1669
1669
|
return n.users += 1, qe(() => {
|
|
@@ -1703,7 +1703,7 @@ function yn(e) {
|
|
|
1703
1703
|
...Object.fromEntries(r.map((e) => [e.userId, e]))
|
|
1704
1704
|
};
|
|
1705
1705
|
} catch (e) {
|
|
1706
|
-
o ||
|
|
1706
|
+
o || P(e, {
|
|
1707
1707
|
source: "iam-user-online-status",
|
|
1708
1708
|
phase: "load"
|
|
1709
1709
|
});
|
|
@@ -1724,7 +1724,7 @@ function bn(e) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
//#endregion
|
|
1726
1726
|
//#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
|
|
1727
|
-
var xn = /*#__PURE__*/
|
|
1727
|
+
var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
1728
1728
|
name: "UserOnlineStatusCell",
|
|
1729
1729
|
__name: "UserOnlineStatusCell",
|
|
1730
1730
|
props: {
|
|
@@ -1732,7 +1732,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1732
1732
|
column: {}
|
|
1733
1733
|
},
|
|
1734
1734
|
setup(e) {
|
|
1735
|
-
let t =
|
|
1735
|
+
let t = j(), n = e, r = vn(), i = B(() => n.record.id == null ? void 0 : String(n.record.id)), a = B(() => r.statusOf(i.value)), o = B(() => {
|
|
1736
1736
|
let e = a.value;
|
|
1737
1737
|
if (!e) return "-";
|
|
1738
1738
|
if (e.present) {
|
|
@@ -1761,17 +1761,17 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1761
1761
|
}, Cn = { key: 0 }, wn = {
|
|
1762
1762
|
key: 1,
|
|
1763
1763
|
class: "user-password-reset"
|
|
1764
|
-
}, Tn = { key: 0 }, En = /*#__PURE__*/
|
|
1764
|
+
}, Tn = { key: 0 }, En = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
1765
1765
|
name: "UserPasswordDrawer",
|
|
1766
1766
|
__name: "UserPasswordDrawer",
|
|
1767
1767
|
props: { context: {} },
|
|
1768
1768
|
setup(e) {
|
|
1769
|
-
let t =
|
|
1769
|
+
let t = j(), n = e, r = Y(""), i = Y(), a = Y(!1), o = B(() => 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
|
-
|
|
1774
|
+
Ce(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 xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1784
1784
|
method: "POST",
|
|
1785
1785
|
path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
|
|
1786
1786
|
body: { password: r.value }
|
|
1787
|
-
}), r.value = "",
|
|
1787
|
+
}), r.value = "", Ce(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
|
-
|
|
1793
|
+
P(e, {
|
|
1794
1794
|
language: t,
|
|
1795
1795
|
source: "iam-user-password",
|
|
1796
1796
|
phase: "action"
|
|
@@ -1810,7 +1810,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1810
1810
|
path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
|
|
1811
1811
|
}), n.context.refreshList(), n.context.refreshDetailExtensions();
|
|
1812
1812
|
} catch (e) {
|
|
1813
|
-
|
|
1813
|
+
P(e, {
|
|
1814
1814
|
language: t,
|
|
1815
1815
|
source: "iam-user-password",
|
|
1816
1816
|
phase: "action"
|
|
@@ -1822,7 +1822,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1822
1822
|
}
|
|
1823
1823
|
return (n, l) => o.value ? (J(), U("section", Sn, [e.context.module.can("changePassword", o.value) === !0 ? (J(), U("label", Cn, [
|
|
1824
1824
|
W("span", null, X(Z(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
|
|
1825
|
-
K(Z(
|
|
1825
|
+
K(Z(L), {
|
|
1826
1826
|
value: r.value,
|
|
1827
1827
|
"onUpdate:value": l[0] ||= (e) => r.value = e,
|
|
1828
1828
|
type: "password",
|
|
@@ -1833,7 +1833,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1833
1833
|
"disabled",
|
|
1834
1834
|
"placeholder"
|
|
1835
1835
|
]),
|
|
1836
|
-
K(Z(
|
|
1836
|
+
K(Z(R), {
|
|
1837
1837
|
type: "primary",
|
|
1838
1838
|
loading: a.value,
|
|
1839
1839
|
onClick: s
|
|
@@ -1843,7 +1843,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1843
1843
|
}, 8, ["loading"])
|
|
1844
1844
|
])) : H("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (J(), U("section", wn, [
|
|
1845
1845
|
W("p", null, X(Z(t).t("platform.screen.UserPasswordDrawer.generate-a-temporary-password-deliver-it-to-the-user-through", "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。")), 1),
|
|
1846
|
-
K(Z(
|
|
1846
|
+
K(Z(R), {
|
|
1847
1847
|
loading: a.value,
|
|
1848
1848
|
onClick: c
|
|
1849
1849
|
}, {
|
|
@@ -1851,7 +1851,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1851
1851
|
_: 1
|
|
1852
1852
|
}, 8, ["loading"]),
|
|
1853
1853
|
i.value ? (J(), U("dl", Tn, [W("div", null, [W("dt", null, X(Z(t).t("platform.screen.UserPasswordDrawer.temporary-password", "临时密码")), 1), W("dd", null, X(i.value.temporaryPassword), 1)]), W("div", null, [W("dt", null, X(Z(t).t("platform.screen.UserPasswordDrawer.expires-at", "失效时间")), 1), W("dd", null, X(i.value.expiresAt ?? "-"), 1)])])) : H("v-if", !0)
|
|
1854
|
-
])) : H("v-if", !0)])) : (J(), V(Z(
|
|
1854
|
+
])) : H("v-if", !0)])) : (J(), V(Z(T), {
|
|
1855
1855
|
key: 0,
|
|
1856
1856
|
title: Z(t).t("platform.screen.UserPasswordDrawer.user-not-found", "用户不存在"),
|
|
1857
1857
|
message: Z(t).t("platform.screen.UserPasswordDrawer.reopen-the-user-details-to-manage-the-password", "请重新打开用户详情后再管理密码。")
|
|
@@ -1861,7 +1861,7 @@ var xn = /*#__PURE__*/ P(/* @__PURE__ */ q({
|
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/platform-admin-runtime/user/useUserSessionRows.ts
|
|
1863
1863
|
function Dn(e) {
|
|
1864
|
-
let t = e.language ??
|
|
1864
|
+
let t = e.language ?? _e, n = Y([]), i = Y({}), a = r({ 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 Dn(e) {
|
|
|
1887
1887
|
});
|
|
1888
1888
|
} catch (i) {
|
|
1889
1889
|
if (!r(n)) return;
|
|
1890
|
-
let a =
|
|
1891
|
-
|
|
1890
|
+
let a = Se(i);
|
|
1891
|
+
P(a, {
|
|
1892
1892
|
language: t,
|
|
1893
1893
|
source: `${e.source}-sessions`,
|
|
1894
1894
|
phase: "load"
|
|
@@ -1913,7 +1913,7 @@ function Dn(e) {
|
|
|
1913
1913
|
let n = e ? i.value[e] : void 0;
|
|
1914
1914
|
return n ? n.failure ? {
|
|
1915
1915
|
...n,
|
|
1916
|
-
error:
|
|
1916
|
+
error: g(n.failure, t)
|
|
1917
1917
|
} : n : {
|
|
1918
1918
|
records: [],
|
|
1919
1919
|
loading: !1
|
|
@@ -1956,7 +1956,7 @@ var On = {
|
|
|
1956
1956
|
__name: "UserSessionListExpansion",
|
|
1957
1957
|
props: { context: {} },
|
|
1958
1958
|
setup(e) {
|
|
1959
|
-
let t =
|
|
1959
|
+
let t = j(), n = e, r = B(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), i = Dn({
|
|
1960
1960
|
context: n.context.module,
|
|
1961
1961
|
source: "iam-user-list-expansion",
|
|
1962
1962
|
language: t
|
|
@@ -1993,7 +1993,7 @@ var On = {
|
|
|
1993
1993
|
body: { sessionIds: a }
|
|
1994
1994
|
}), i.loadUserSessions(e));
|
|
1995
1995
|
}
|
|
1996
|
-
return (t, n) => (J(), V(Z(
|
|
1996
|
+
return (t, n) => (J(), V(Z(we), {
|
|
1997
1997
|
embedded: "",
|
|
1998
1998
|
sessions: o.value.records,
|
|
1999
1999
|
loading: o.value.loading,
|
|
@@ -2112,7 +2112,7 @@ function In(e) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
function Ln(e, t) {
|
|
2114
2114
|
let n = zn(e), r = n.source;
|
|
2115
|
-
if (!
|
|
2115
|
+
if (!f(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !ne(r, t)) return;
|
|
2116
2116
|
let i = {};
|
|
2117
2117
|
for (let [e, t] of Object.entries(zn(n.languages))) {
|
|
2118
2118
|
let n = zn(t);
|
|
@@ -2165,40 +2165,40 @@ var qn = /* @__PURE__ */ q({
|
|
|
2165
2165
|
__name: "RoleScopeTree",
|
|
2166
2166
|
props: { context: {} },
|
|
2167
2167
|
setup(e) {
|
|
2168
|
-
let t =
|
|
2168
|
+
let t = j(), n = e, r = jn(x()), i = Y(), a = Y(""), o = Y(!1), s = Y([]), c = Y([]), l = Y(0), u = Y(/* @__PURE__ */ new Map()), d = B(() => n.context.selectionKey), f = B(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), p = B(() => i.value?.navigations.length !== 0), h = B(() => f.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), g = A({
|
|
2169
2169
|
nodes: () => s.value,
|
|
2170
|
-
loader: () =>
|
|
2170
|
+
loader: () => ne,
|
|
2171
2171
|
version: () => l.value
|
|
2172
|
-
}),
|
|
2172
|
+
}), _ = B(() => v(g.nodes.value));
|
|
2173
2173
|
function v(e) {
|
|
2174
2174
|
return e.map((e) => ({
|
|
2175
2175
|
...e,
|
|
2176
|
-
title:
|
|
2176
|
+
title: w(e.title, u.value.get(e.key)?.labelText, t),
|
|
2177
2177
|
...e.children ? { children: v(e.children) } : {}
|
|
2178
2178
|
}));
|
|
2179
2179
|
}
|
|
2180
|
-
let
|
|
2180
|
+
let y = g.states, b = 0, S;
|
|
2181
2181
|
Ke(() => void C()), Ge(() => {
|
|
2182
|
-
|
|
2182
|
+
b += 1, S && clearTimeout(S);
|
|
2183
2183
|
}), Q(a, () => {
|
|
2184
|
-
|
|
2184
|
+
p.value && (S && clearTimeout(S), S = setTimeout(() => void D(), 240));
|
|
2185
2185
|
});
|
|
2186
2186
|
async function C() {
|
|
2187
2187
|
o.value = !0;
|
|
2188
2188
|
try {
|
|
2189
2189
|
i.value = await r.descriptor();
|
|
2190
2190
|
let e = i.value.directSelections[0], t = i.value.directSelections.find((e) => e.selectionKey === n.context.selectionKey);
|
|
2191
|
-
t?.labelText &&
|
|
2191
|
+
t?.labelText && F({
|
|
2192
2192
|
key: t.selectionKey,
|
|
2193
2193
|
label: t.label,
|
|
2194
2194
|
labelText: t.labelText
|
|
2195
|
-
}), !n.context.selectionKey && e &&
|
|
2195
|
+
}), !n.context.selectionKey && e && F({
|
|
2196
2196
|
key: e.selectionKey,
|
|
2197
2197
|
label: e.label,
|
|
2198
2198
|
labelText: e.labelText
|
|
2199
2199
|
}), await T();
|
|
2200
2200
|
} catch (e) {
|
|
2201
|
-
|
|
2201
|
+
P(e, {
|
|
2202
2202
|
language: t,
|
|
2203
2203
|
source: "role-scope-tree",
|
|
2204
2204
|
phase: "load"
|
|
@@ -2210,22 +2210,22 @@ var qn = /* @__PURE__ */ q({
|
|
|
2210
2210
|
async function T(e = {}) {
|
|
2211
2211
|
let n = i.value;
|
|
2212
2212
|
if (!n) return;
|
|
2213
|
-
let r = ++
|
|
2213
|
+
let r = ++b;
|
|
2214
2214
|
if (!e.append) {
|
|
2215
2215
|
c.value = [], l.value += 1, o.value = !0;
|
|
2216
2216
|
try {
|
|
2217
2217
|
let e = O(n);
|
|
2218
|
-
if (r !==
|
|
2219
|
-
u.value = /* @__PURE__ */ new Map(),
|
|
2218
|
+
if (r !== b) return;
|
|
2219
|
+
u.value = /* @__PURE__ */ new Map(), M(e), s.value = e.map((e) => e.ui);
|
|
2220
2220
|
} catch (e) {
|
|
2221
|
-
if (r !==
|
|
2222
|
-
s.value = [],
|
|
2221
|
+
if (r !== b) return;
|
|
2222
|
+
s.value = [], P(e, {
|
|
2223
2223
|
language: t,
|
|
2224
2224
|
source: "role-scope-tree",
|
|
2225
2225
|
phase: "load"
|
|
2226
2226
|
});
|
|
2227
2227
|
} finally {
|
|
2228
|
-
r ===
|
|
2228
|
+
r === b && (o.value = !1);
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
@@ -2249,11 +2249,11 @@ var qn = /* @__PURE__ */ q({
|
|
|
2249
2249
|
labelText: e.labelText
|
|
2250
2250
|
}
|
|
2251
2251
|
})),
|
|
2252
|
-
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) =>
|
|
2253
|
-
...e.navigations.filter((e) => e.level === "TENANT").map((e) =>
|
|
2252
|
+
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => k(e)),
|
|
2253
|
+
...e.navigations.filter((e) => e.level === "TENANT").map((e) => k(e))
|
|
2254
2254
|
];
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function k(e) {
|
|
2257
2257
|
return {
|
|
2258
2258
|
ui: {
|
|
2259
2259
|
key: `navigation:${e.navigationKey}`,
|
|
@@ -2267,8 +2267,8 @@ var qn = /* @__PURE__ */ q({
|
|
|
2267
2267
|
}
|
|
2268
2268
|
};
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2271
|
-
let r =
|
|
2270
|
+
function ee(e, t, n) {
|
|
2271
|
+
let r = te(e, t, n);
|
|
2272
2272
|
return {
|
|
2273
2273
|
ui: {
|
|
2274
2274
|
key: e.selectionKey,
|
|
@@ -2284,7 +2284,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2284
2284
|
children: r
|
|
2285
2285
|
};
|
|
2286
2286
|
}
|
|
2287
|
-
function
|
|
2287
|
+
function te(e, t, n) {
|
|
2288
2288
|
return t === "TENANT" ? {
|
|
2289
2289
|
navigationKey: e.selectionKey,
|
|
2290
2290
|
level: "ORGANIZATION"
|
|
@@ -2294,7 +2294,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2294
2294
|
parentId: e.id
|
|
2295
2295
|
} : void 0;
|
|
2296
2296
|
}
|
|
2297
|
-
async function
|
|
2297
|
+
async function ne(e, n) {
|
|
2298
2298
|
let i = u.value.get(e.key);
|
|
2299
2299
|
if (!i?.children) throw Error(t.t("platform.screen.RoleScopeTree.the-role-ownership-scope-is-no-longer-available", "角色归属范围已失效"));
|
|
2300
2300
|
try {
|
|
@@ -2304,70 +2304,70 @@ var qn = /* @__PURE__ */ q({
|
|
|
2304
2304
|
pageNum: n.reason === "load-more" ? Number(n.cursor) : 1
|
|
2305
2305
|
});
|
|
2306
2306
|
n.signal.throwIfAborted();
|
|
2307
|
-
let t = e.records.map((e) =>
|
|
2308
|
-
return
|
|
2307
|
+
let t = e.records.map((e) => ee(e, i.children.level, i.children.navigationKey));
|
|
2308
|
+
return M(t), {
|
|
2309
2309
|
mode: n.reason === "load-more" ? "append" : "replace",
|
|
2310
2310
|
nodes: t.map((e) => e.ui),
|
|
2311
2311
|
hasMore: e.hasMore,
|
|
2312
2312
|
nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
|
|
2313
2313
|
};
|
|
2314
2314
|
} catch (e) {
|
|
2315
|
-
throw n.signal.aborted ||
|
|
2315
|
+
throw n.signal.aborted || P(e, {
|
|
2316
2316
|
language: t,
|
|
2317
2317
|
source: "role-scope-tree",
|
|
2318
2318
|
phase: "load"
|
|
2319
2319
|
}), e;
|
|
2320
2320
|
}
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function M(e) {
|
|
2323
2323
|
let t = new Map(u.value);
|
|
2324
2324
|
e.forEach((e) => t.set(e.ui.key, e)), u.value = t;
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function N(e) {
|
|
2327
2327
|
let t = u.value.get(e.key)?.selection;
|
|
2328
|
-
t &&
|
|
2328
|
+
t && F(t);
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function F(e) {
|
|
2331
2331
|
n.context.selectSelectionKey(e.key, {
|
|
2332
2332
|
label: e.label,
|
|
2333
2333
|
...e.labelText ? { labelText: e.labelText } : {},
|
|
2334
2334
|
secondaryLabel: e.secondaryLabel
|
|
2335
2335
|
});
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function re() {
|
|
2338
2338
|
let e = i.value?.directSelections[0];
|
|
2339
|
-
e &&
|
|
2339
|
+
e && F({
|
|
2340
2340
|
key: e.selectionKey,
|
|
2341
2341
|
label: e.label,
|
|
2342
2342
|
labelText: e.labelText
|
|
2343
2343
|
});
|
|
2344
2344
|
}
|
|
2345
|
-
return (e, n) => (J(), V(Z(
|
|
2345
|
+
return (e, n) => (J(), V(Z(ye), {
|
|
2346
2346
|
class: "role-scope-tree",
|
|
2347
2347
|
title: h.value,
|
|
2348
2348
|
"refresh-title": Z(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
|
|
2349
2349
|
"search-keyword": a.value,
|
|
2350
2350
|
"search-placeholder": Z(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
|
|
2351
|
-
searchable:
|
|
2351
|
+
searchable: p.value,
|
|
2352
2352
|
onRefresh: T,
|
|
2353
2353
|
"onUpdate:searchKeyword": n[3] ||= (e) => a.value = e
|
|
2354
2354
|
}, {
|
|
2355
|
-
default: $(() => [o.value ? (J(), V(Z(
|
|
2355
|
+
default: $(() => [o.value ? (J(), V(Z(E), {
|
|
2356
2356
|
key: 0,
|
|
2357
2357
|
tip: Z(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
|
|
2358
|
-
}, null, 8, ["tip"])) : (J(), V(Z(
|
|
2358
|
+
}, null, 8, ["tip"])) : (J(), V(Z(m), {
|
|
2359
2359
|
key: 1,
|
|
2360
2360
|
"expanded-keys": c.value,
|
|
2361
2361
|
"onUpdate:expandedKeys": n[0] ||= (e) => c.value = e,
|
|
2362
|
-
nodes:
|
|
2362
|
+
nodes: _.value,
|
|
2363
2363
|
"selected-key": d.value,
|
|
2364
2364
|
"reload-key": l.value,
|
|
2365
2365
|
"load-strategy": "controlled",
|
|
2366
2366
|
"reload-on-reexpand": "",
|
|
2367
|
-
"branch-states": Z(
|
|
2367
|
+
"branch-states": Z(y),
|
|
2368
2368
|
onLoadRequest: n[1] ||= (e) => Z(g).request(e.node.key, e.reason, Z(g).stateOf(e.node.key).status === "error"),
|
|
2369
|
-
onSelect:
|
|
2370
|
-
onDeselect:
|
|
2369
|
+
onSelect: N,
|
|
2370
|
+
onDeselect: re,
|
|
2371
2371
|
onUnloadChildren: n[2] ||= (e) => Z(g).release(e.key)
|
|
2372
2372
|
}, null, 8, [
|
|
2373
2373
|
"expanded-keys",
|
|
@@ -2393,7 +2393,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2393
2393
|
column: {}
|
|
2394
2394
|
},
|
|
2395
2395
|
setup(e) {
|
|
2396
|
-
let t =
|
|
2396
|
+
let t = j(), n = e, r = B(() => {
|
|
2397
2397
|
let e = String(n.record[n.column?.key ?? ""] ?? "");
|
|
2398
2398
|
return {
|
|
2399
2399
|
account: t.t("platform.screen.RoleManagementView.account-role", "账号角色"),
|
|
@@ -2531,7 +2531,7 @@ var Xn = {
|
|
|
2531
2531
|
}, $n = { class: "role-account-grant-search" }, er = {
|
|
2532
2532
|
key: 0,
|
|
2533
2533
|
class: "role-account-grant-selected"
|
|
2534
|
-
}, tr = { class: "role-account-grant-selected-title" }, nr = { class: "role-account-grant-selected-list" }, rr = ["disabled", "onClick"], ir = 20, ar = /*#__PURE__*/
|
|
2534
|
+
}, tr = { class: "role-account-grant-selected-title" }, nr = { class: "role-account-grant-selected-list" }, rr = ["disabled", "onClick"], ir = 20, ar = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
2535
2535
|
name: "RoleAccountGrantDrawer",
|
|
2536
2536
|
__name: "RoleAccountGrantDrawer",
|
|
2537
2537
|
props: {
|
|
@@ -2544,17 +2544,17 @@ var Xn = {
|
|
|
2544
2544
|
},
|
|
2545
2545
|
emits: ["close", "saved"],
|
|
2546
2546
|
setup(e, { emit: t }) {
|
|
2547
|
-
let n =
|
|
2547
|
+
let n = j(), 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), v = Y(!1), b = Y(), x = B(() => Yn(r.context.http)), S = ve({ moduleAlias: "iam.tenant" }), C = B(() => r.role?.id), w = B(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: De(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), D = B(() => r.embedded ? "section" : y), O = B(() => r.embedded ? {} : {
|
|
2548
2548
|
open: r.open,
|
|
2549
|
-
title:
|
|
2549
|
+
title: w.value,
|
|
2550
2550
|
renderMode: r.container ? "inline" : "portal",
|
|
2551
2551
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
2552
|
-
onClose:
|
|
2553
|
-
}),
|
|
2552
|
+
onClose: _e
|
|
2553
|
+
}), k = B(() => r.role?.ownerScopeType === "platform"), A = B(() => b.value?.id), ee = B(() => !k.value || !!A.value), te = B(() => S), ne = B(() => {
|
|
2554
2554
|
let e = /* @__PURE__ */ new Map();
|
|
2555
2555
|
for (let t of a.value) t.userId && e.set(t.userId, t);
|
|
2556
2556
|
return e;
|
|
2557
|
-
}),
|
|
2557
|
+
}), M = B(() => s.value.filter((e) => e.id).map((e) => ({
|
|
2558
2558
|
id: e.id,
|
|
2559
2559
|
username: Te(e),
|
|
2560
2560
|
employeeNo: e.employeeNo ?? "",
|
|
@@ -2562,7 +2562,7 @@ var Xn = {
|
|
|
2562
2562
|
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
2563
2563
|
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
2564
2564
|
boundTitle: l.value.has(e.id) ? n.t("platform.screen.RoleAccountGrantDrawer.assigned", "已绑定") : n.t("platform.screen.MetadataGovernanceSurface.unbound", "未绑定")
|
|
2565
|
-
}))),
|
|
2565
|
+
}))), N = B(() => [...c.value].map((e) => o.value[e] ?? we(e))), F = B(() => [...c.value].filter((e) => !l.value.has(e))), re = B(() => [...l.value].filter((e) => !c.value.has(e))), ie = B(() => F.value.length > 0 || re.value.length > 0), I = {
|
|
2566
2566
|
rowKey: "id",
|
|
2567
2567
|
columns: [
|
|
2568
2568
|
{
|
|
@@ -2596,81 +2596,81 @@ var Xn = {
|
|
|
2596
2596
|
width: 90
|
|
2597
2597
|
}
|
|
2598
2598
|
]
|
|
2599
|
-
},
|
|
2599
|
+
}, ce = B(() => ({
|
|
2600
2600
|
selectedRowKeys: [...c.value],
|
|
2601
2601
|
preserveSelectedRowKeys: !0,
|
|
2602
|
-
disabledOf: () =>
|
|
2602
|
+
disabledOf: () => g.value,
|
|
2603
2603
|
onChange: (e) => {
|
|
2604
2604
|
c.value = new Set(e.map((e) => String(e)));
|
|
2605
2605
|
}
|
|
2606
|
-
})),
|
|
2606
|
+
})), le = B(() => ({
|
|
2607
2607
|
current: f.value,
|
|
2608
2608
|
total: p.value,
|
|
2609
2609
|
pageSize: ir,
|
|
2610
2610
|
showSizeChanger: !1,
|
|
2611
2611
|
showQuickJumper: !1,
|
|
2612
|
-
onChange: (e) => void
|
|
2612
|
+
onChange: (e) => void pe(e)
|
|
2613
2613
|
}));
|
|
2614
2614
|
Q(() => [r.open, r.role?.id], ([e]) => {
|
|
2615
|
-
e ?
|
|
2615
|
+
e ? fe() : ye();
|
|
2616
2616
|
}, { immediate: !0 }), Q([
|
|
2617
2617
|
() => r.embedded,
|
|
2618
2618
|
() => r.drawerContext,
|
|
2619
2619
|
c,
|
|
2620
|
-
|
|
2621
|
-
|
|
2620
|
+
ie,
|
|
2621
|
+
ee,
|
|
2622
2622
|
F,
|
|
2623
2623
|
re,
|
|
2624
|
-
|
|
2624
|
+
g,
|
|
2625
2625
|
m
|
|
2626
|
-
],
|
|
2627
|
-
function
|
|
2626
|
+
], ue, { immediate: !0 }), Ge(() => r.drawerContext?.setOperation(void 0));
|
|
2627
|
+
function ue() {
|
|
2628
2628
|
let e = r.drawerContext;
|
|
2629
2629
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
2630
2630
|
value1: De(r.role ?? {}),
|
|
2631
2631
|
value2: Oe(r.role)
|
|
2632
2632
|
})), e.setOperation({
|
|
2633
|
-
summary:
|
|
2633
|
+
summary: de(),
|
|
2634
2634
|
actions: [{
|
|
2635
2635
|
key: "cancel-account-role-grants",
|
|
2636
2636
|
label: n.t("platform.action.cancel", "取消"),
|
|
2637
|
-
disabled:
|
|
2638
|
-
run:
|
|
2637
|
+
disabled: g.value || m.value,
|
|
2638
|
+
run: _e
|
|
2639
2639
|
}, {
|
|
2640
2640
|
key: "save-account-role-grants",
|
|
2641
2641
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
2642
2642
|
emphasis: "primary",
|
|
2643
|
-
disabled: m.value || !
|
|
2644
|
-
loading:
|
|
2645
|
-
run: () => void
|
|
2643
|
+
disabled: m.value || !ee.value || !ie.value,
|
|
2644
|
+
loading: g.value,
|
|
2645
|
+
run: () => void ge()
|
|
2646
2646
|
}]
|
|
2647
2647
|
}));
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2650
|
-
return
|
|
2649
|
+
function de() {
|
|
2650
|
+
return ee.value ? ie.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
|
|
2651
2651
|
value1: c.value.size,
|
|
2652
2652
|
value2: F.value.length,
|
|
2653
2653
|
value3: re.value.length
|
|
2654
2654
|
}) : n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected", "已选 {value1} 个用户", { value1: c.value.size }) : n.t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant", "请选择目标租户");
|
|
2655
2655
|
}
|
|
2656
|
-
async function
|
|
2657
|
-
let e =
|
|
2656
|
+
async function fe() {
|
|
2657
|
+
let e = C.value;
|
|
2658
2658
|
if (!e) {
|
|
2659
|
-
|
|
2659
|
+
ye();
|
|
2660
2660
|
return;
|
|
2661
2661
|
}
|
|
2662
|
-
if (!
|
|
2663
|
-
|
|
2662
|
+
if (!ee.value) {
|
|
2663
|
+
be();
|
|
2664
2664
|
return;
|
|
2665
2665
|
}
|
|
2666
|
-
m.value = !0,
|
|
2666
|
+
m.value = !0, v.value = !1;
|
|
2667
2667
|
try {
|
|
2668
|
-
let t = await
|
|
2668
|
+
let t = await x.value.accountRoleGrants(e, A.value);
|
|
2669
2669
|
a.value = t;
|
|
2670
2670
|
let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
2671
|
-
l.value = n, c.value = new Set(n), o.value =
|
|
2671
|
+
l.value = n, c.value = new Set(n), o.value = Ce([...t.map((e) => we(e.userId)).filter((e) => !!e)]), await pe(1);
|
|
2672
2672
|
} catch (e) {
|
|
2673
|
-
|
|
2673
|
+
v.value = !0, P(e, {
|
|
2674
2674
|
language: n,
|
|
2675
2675
|
source: "role-account-grants",
|
|
2676
2676
|
phase: "load"
|
|
@@ -2679,13 +2679,13 @@ var Xn = {
|
|
|
2679
2679
|
m.value = !1;
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
let t =
|
|
2684
|
-
if (t &&
|
|
2682
|
+
async function pe(e) {
|
|
2683
|
+
let t = C.value;
|
|
2684
|
+
if (t && ee.value) {
|
|
2685
2685
|
h.value = !0;
|
|
2686
2686
|
try {
|
|
2687
|
-
let n = await
|
|
2688
|
-
targetTenantId:
|
|
2687
|
+
let n = await x.value.accountRoleCandidates(t, {
|
|
2688
|
+
targetTenantId: A.value,
|
|
2689
2689
|
keyword: d.value,
|
|
2690
2690
|
enabledOnly: !0,
|
|
2691
2691
|
page: {
|
|
@@ -2695,10 +2695,10 @@ var Xn = {
|
|
|
2695
2695
|
});
|
|
2696
2696
|
s.value = n.records, o.value = {
|
|
2697
2697
|
...o.value,
|
|
2698
|
-
...
|
|
2698
|
+
...Ce(n.records)
|
|
2699
2699
|
}, f.value = n.pageNum, p.value = n.total;
|
|
2700
2700
|
} catch (e) {
|
|
2701
|
-
|
|
2701
|
+
P(e, {
|
|
2702
2702
|
language: n,
|
|
2703
2703
|
source: "role-account-grants",
|
|
2704
2704
|
phase: "load"
|
|
@@ -2708,31 +2708,31 @@ var Xn = {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2712
|
-
d.value = u.value.trim(),
|
|
2711
|
+
function me() {
|
|
2712
|
+
d.value = u.value.trim(), pe(0);
|
|
2713
2713
|
}
|
|
2714
|
-
function
|
|
2714
|
+
function he(e, t) {
|
|
2715
2715
|
let n = new Set(c.value);
|
|
2716
2716
|
t ? n.add(e) : n.delete(e), c.value = n;
|
|
2717
2717
|
}
|
|
2718
|
-
async function
|
|
2719
|
-
let e =
|
|
2720
|
-
if (e &&
|
|
2721
|
-
if (!
|
|
2718
|
+
async function ge() {
|
|
2719
|
+
let e = C.value;
|
|
2720
|
+
if (e && ee.value) {
|
|
2721
|
+
if (!ie.value) {
|
|
2722
2722
|
i("close");
|
|
2723
2723
|
return;
|
|
2724
2724
|
}
|
|
2725
|
-
|
|
2725
|
+
g.value = !0;
|
|
2726
2726
|
try {
|
|
2727
|
-
for (let t of F.value) await
|
|
2727
|
+
for (let t of F.value) await x.value.grantAccountRole(e, {
|
|
2728
2728
|
userId: t,
|
|
2729
|
-
targetTenantId:
|
|
2729
|
+
targetTenantId: A.value
|
|
2730
2730
|
});
|
|
2731
2731
|
for (let t of re.value) {
|
|
2732
2732
|
let n = ne.value.get(t)?.id;
|
|
2733
|
-
n && await
|
|
2733
|
+
n && await x.value.deleteAccountRoleGrant(e, n, A.value);
|
|
2734
2734
|
}
|
|
2735
|
-
await
|
|
2735
|
+
await ae({
|
|
2736
2736
|
success: !0,
|
|
2737
2737
|
message: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2738
2738
|
}, {
|
|
@@ -2742,45 +2742,45 @@ var Xn = {
|
|
|
2742
2742
|
fallbackMessage: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2743
2743
|
}), i("saved"), i("close");
|
|
2744
2744
|
} catch (e) {
|
|
2745
|
-
|
|
2745
|
+
P(e, {
|
|
2746
2746
|
language: n,
|
|
2747
2747
|
source: "role-account-grants",
|
|
2748
2748
|
phase: "action"
|
|
2749
2749
|
});
|
|
2750
2750
|
} finally {
|
|
2751
|
-
|
|
2751
|
+
g.value = !1;
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
|
-
function ge() {
|
|
2756
|
-
v.value || i("close");
|
|
2757
|
-
}
|
|
2758
2755
|
function _e() {
|
|
2759
|
-
|
|
2756
|
+
g.value || i("close");
|
|
2757
|
+
}
|
|
2758
|
+
function ye() {
|
|
2759
|
+
b.value = void 0, be();
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2762
|
-
a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", f.value = 1, p.value = 0, m.value = !1, h.value = !1,
|
|
2761
|
+
function be() {
|
|
2762
|
+
a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", f.value = 1, p.value = 0, m.value = !1, h.value = !1, g.value = !1, v.value = !1;
|
|
2763
2763
|
}
|
|
2764
|
-
async function
|
|
2764
|
+
async function xe(e) {
|
|
2765
2765
|
if (!e) {
|
|
2766
|
-
|
|
2766
|
+
b.value = void 0, be();
|
|
2767
2767
|
return;
|
|
2768
2768
|
}
|
|
2769
|
-
let t = await
|
|
2770
|
-
|
|
2769
|
+
let t = await S.crud.view(e);
|
|
2770
|
+
b.value = t ?? {
|
|
2771
2771
|
id: e,
|
|
2772
2772
|
title: e
|
|
2773
|
-
}, await
|
|
2774
|
-
}
|
|
2775
|
-
function xe(e) {
|
|
2776
|
-
me(e, !1);
|
|
2773
|
+
}, await fe();
|
|
2777
2774
|
}
|
|
2778
2775
|
function Se(e) {
|
|
2776
|
+
he(e, !1);
|
|
2777
|
+
}
|
|
2778
|
+
function Ce(e) {
|
|
2779
2779
|
let t = {};
|
|
2780
2780
|
for (let n of e) n.id && (t[n.id] = n);
|
|
2781
2781
|
return t;
|
|
2782
2782
|
}
|
|
2783
|
-
function
|
|
2783
|
+
function we(e) {
|
|
2784
2784
|
return e ? {
|
|
2785
2785
|
id: e,
|
|
2786
2786
|
username: e
|
|
@@ -2793,69 +2793,69 @@ var Xn = {
|
|
|
2793
2793
|
return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
|
|
2794
2794
|
}
|
|
2795
2795
|
function De(e) {
|
|
2796
|
-
return String(
|
|
2796
|
+
return String(_(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
|
|
2797
2797
|
}
|
|
2798
2798
|
function Oe(e) {
|
|
2799
2799
|
return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
|
|
2800
2800
|
}
|
|
2801
|
-
return (t, r) => (J(), V(Ze(
|
|
2802
|
-
default: $(() => [m.value ? (J(), V(Z(
|
|
2801
|
+
return (t, r) => (J(), V(Ze(D.value), Be(O.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), Ie({
|
|
2802
|
+
default: $(() => [m.value ? (J(), V(Z(E), {
|
|
2803
2803
|
key: 0,
|
|
2804
2804
|
class: "role-account-grant-drawer-state",
|
|
2805
2805
|
tip: Z(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
|
|
2806
|
-
}, null, 8, ["tip"])) :
|
|
2806
|
+
}, null, 8, ["tip"])) : v.value ? (J(), U("div", Xn, [K(Z(T), {
|
|
2807
2807
|
title: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
|
|
2808
2808
|
message: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
|
|
2809
|
-
}, null, 8, ["title", "message"]), K(Z(
|
|
2809
|
+
}, null, 8, ["title", "message"]), K(Z(R), {
|
|
2810
2810
|
type: "primary",
|
|
2811
2811
|
"icon-name": "reload",
|
|
2812
|
-
onClick:
|
|
2812
|
+
onClick: fe
|
|
2813
2813
|
}, {
|
|
2814
2814
|
default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
2815
2815
|
_: 1
|
|
2816
2816
|
})])) : (J(), U("section", {
|
|
2817
2817
|
key: 2,
|
|
2818
|
-
class: He(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant":
|
|
2819
|
-
}, [
|
|
2820
|
-
context:
|
|
2821
|
-
value:
|
|
2818
|
+
class: He(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": k.value }])
|
|
2819
|
+
}, [k.value ? (J(), U("label", Zn, [W("span", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), K(Z(oe), {
|
|
2820
|
+
context: te.value,
|
|
2821
|
+
value: A.value,
|
|
2822
2822
|
mode: "list",
|
|
2823
2823
|
placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
|
|
2824
|
-
disabled:
|
|
2825
|
-
"onUpdate:value":
|
|
2824
|
+
disabled: g.value || m.value,
|
|
2825
|
+
"onUpdate:value": xe
|
|
2826
2826
|
}, null, 8, [
|
|
2827
2827
|
"context",
|
|
2828
2828
|
"value",
|
|
2829
2829
|
"placeholder",
|
|
2830
2830
|
"disabled"
|
|
2831
|
-
])])) : H("v-if", !0),
|
|
2832
|
-
W("div", $n, [K(Z(
|
|
2831
|
+
])])) : H("v-if", !0), ee.value ? (J(), U(z, { key: 2 }, [
|
|
2832
|
+
W("div", $n, [K(Z(L), {
|
|
2833
2833
|
value: u.value,
|
|
2834
2834
|
"allow-clear": "",
|
|
2835
|
-
disabled:
|
|
2835
|
+
disabled: g.value,
|
|
2836
2836
|
placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
|
|
2837
2837
|
"onUpdate:value": r[0] ||= (e) => u.value = e,
|
|
2838
|
-
onKeydown: nt(
|
|
2838
|
+
onKeydown: nt(me, ["enter"])
|
|
2839
2839
|
}, null, 8, [
|
|
2840
2840
|
"value",
|
|
2841
2841
|
"disabled",
|
|
2842
2842
|
"placeholder"
|
|
2843
|
-
]), K(Z(
|
|
2843
|
+
]), K(Z(R), {
|
|
2844
2844
|
"icon-name": "search",
|
|
2845
|
-
disabled:
|
|
2846
|
-
onClick:
|
|
2845
|
+
disabled: g.value,
|
|
2846
|
+
onClick: me
|
|
2847
2847
|
}, {
|
|
2848
2848
|
default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
|
|
2849
2849
|
_: 1
|
|
2850
2850
|
}, 8, ["disabled"])]),
|
|
2851
|
-
K(Z(
|
|
2851
|
+
K(Z(se), {
|
|
2852
2852
|
class: "role-account-grant-table",
|
|
2853
2853
|
size: "middle",
|
|
2854
|
-
contract:
|
|
2855
|
-
rows:
|
|
2854
|
+
contract: I,
|
|
2855
|
+
rows: M.value,
|
|
2856
2856
|
loading: h.value,
|
|
2857
|
-
pagination:
|
|
2858
|
-
selection:
|
|
2857
|
+
pagination: le.value,
|
|
2858
|
+
selection: ce.value,
|
|
2859
2859
|
"fill-height": ""
|
|
2860
2860
|
}, null, 8, [
|
|
2861
2861
|
"rows",
|
|
@@ -2863,27 +2863,27 @@ var Xn = {
|
|
|
2863
2863
|
"pagination",
|
|
2864
2864
|
"selection"
|
|
2865
2865
|
]),
|
|
2866
|
-
|
|
2866
|
+
N.value.length > 0 ? (J(), U("section", er, [W("div", tr, [W("strong", null, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), W("span", null, X(N.value.length), 1)]), W("div", nr, [(J(!0), U(z, null, Ye(N.value, (e) => (J(), U("button", {
|
|
2867
2867
|
key: e.id,
|
|
2868
2868
|
type: "button",
|
|
2869
|
-
disabled:
|
|
2870
|
-
onClick: (t) =>
|
|
2869
|
+
disabled: g.value,
|
|
2870
|
+
onClick: (t) => Se(e.id)
|
|
2871
2871
|
}, [W("span", null, X(Te(e)), 1), W("small", null, X(Ee(e)), 1)], 8, rr))), 128))])])) : H("v-if", !0)
|
|
2872
2872
|
], 64)) : (J(), U("div", Qn, X(Z(n).t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant-for-a-platform-shared-role-before", "平台共享角色需要先选择目标租户,再加载可绑定账号。")), 1))], 2))]),
|
|
2873
2873
|
_: 2
|
|
2874
2874
|
}, [e.embedded ? void 0 : {
|
|
2875
2875
|
name: "operation",
|
|
2876
|
-
fn: $(() => [K(Z(
|
|
2877
|
-
disabled:
|
|
2878
|
-
onClick:
|
|
2876
|
+
fn: $(() => [K(Z(R), {
|
|
2877
|
+
disabled: g.value || m.value,
|
|
2878
|
+
onClick: _e
|
|
2879
2879
|
}, {
|
|
2880
2880
|
default: $(() => [G(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
|
|
2881
2881
|
_: 1
|
|
2882
|
-
}, 8, ["disabled"]), K(Z(
|
|
2882
|
+
}, 8, ["disabled"]), K(Z(R), {
|
|
2883
2883
|
type: "primary",
|
|
2884
|
-
loading:
|
|
2885
|
-
disabled: m.value || !
|
|
2886
|
-
onClick:
|
|
2884
|
+
loading: g.value,
|
|
2885
|
+
disabled: m.value || !ie.value,
|
|
2886
|
+
onClick: ge
|
|
2887
2887
|
}, {
|
|
2888
2888
|
default: $(() => [G(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
2889
2889
|
_: 1
|
|
@@ -2913,7 +2913,7 @@ var Xn = {
|
|
|
2913
2913
|
"onSaved"
|
|
2914
2914
|
]));
|
|
2915
2915
|
}
|
|
2916
|
-
}), sr = /*#__PURE__*/
|
|
2916
|
+
}), sr = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
2917
2917
|
name: "EmployeeEmploymentTable",
|
|
2918
2918
|
__name: "EmployeeEmploymentTable",
|
|
2919
2919
|
props: {
|
|
@@ -2938,7 +2938,7 @@ var Xn = {
|
|
|
2938
2938
|
},
|
|
2939
2939
|
emits: ["update:selectedIds"],
|
|
2940
2940
|
setup(e, { emit: t }) {
|
|
2941
|
-
let n =
|
|
2941
|
+
let n = j(), r = e, i = t, a = Y([]), o = B(() => [
|
|
2942
2942
|
{
|
|
2943
2943
|
key: "title",
|
|
2944
2944
|
title: n.t("platform.screen.EmployeePicker.employee", "职员"),
|
|
@@ -3034,7 +3034,7 @@ var Xn = {
|
|
|
3034
3034
|
let t = e.employeeId;
|
|
3035
3035
|
h(e, !a.value.includes(t));
|
|
3036
3036
|
}
|
|
3037
|
-
return (t, r) => (J(), V(Z(
|
|
3037
|
+
return (t, r) => (J(), V(Z(D), {
|
|
3038
3038
|
class: "employee-employment-table",
|
|
3039
3039
|
columns: o.value,
|
|
3040
3040
|
rows: l.value,
|
|
@@ -3049,7 +3049,7 @@ var Xn = {
|
|
|
3049
3049
|
}, {
|
|
3050
3050
|
cell: $(({ column: e, record: t }) => [G(X(u(e, t)), 1)]),
|
|
3051
3051
|
expandedRow: $(({ record: e }) => [K(Z(k), { title: Z(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
|
|
3052
|
-
default: $(() => [K(Z(
|
|
3052
|
+
default: $(() => [K(Z(D), {
|
|
3053
3053
|
columns: s.value,
|
|
3054
3054
|
rows: e.positions,
|
|
3055
3055
|
"row-key": "id",
|
|
@@ -3083,7 +3083,7 @@ var Xn = {
|
|
|
3083
3083
|
}, ur = {
|
|
3084
3084
|
key: 0,
|
|
3085
3085
|
class: "role-employment-grant-selected"
|
|
3086
|
-
}, dr = { class: "role-employment-grant-selected-title" }, fr = { class: "role-employment-grant-selected-list" }, pr = ["disabled", "onClick"], mr = /*#__PURE__*/
|
|
3086
|
+
}, dr = { class: "role-employment-grant-selected-title" }, fr = { class: "role-employment-grant-selected-list" }, pr = ["disabled", "onClick"], mr = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
3087
3087
|
name: "RoleEmploymentGrantDrawer",
|
|
3088
3088
|
__name: "RoleEmploymentGrantDrawer",
|
|
3089
3089
|
props: {
|
|
@@ -3096,42 +3096,42 @@ var Xn = {
|
|
|
3096
3096
|
},
|
|
3097
3097
|
emits: ["close", "saved"],
|
|
3098
3098
|
setup(e, { emit: t }) {
|
|
3099
|
-
let n =
|
|
3099
|
+
let n = j(), 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(""), _ = B(() => r.role?.id), v = B(() => Yn(r.context.http)), b = B(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), x = B(() => r.embedded ? "section" : y), S = B(() => r.embedded ? {} : {
|
|
3100
3100
|
open: r.open,
|
|
3101
|
-
title:
|
|
3101
|
+
title: b.value,
|
|
3102
3102
|
renderMode: r.container ? "inline" : "portal",
|
|
3103
3103
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
3104
3104
|
onClose: () => !f.value && i("close")
|
|
3105
|
-
}),
|
|
3105
|
+
}), C = B(() => [...c.value].filter((e) => !l.value.has(e))), w = B(() => [...l.value].filter((e) => !c.value.has(e))), D = B(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), O = B(() => o.value.filter((e) => !g.value.trim() || N(e).includes(g.value.trim()))), k = B(() => [...c.value].map((e) => s.value[e] ?? ie(e))), A = B(() => ({
|
|
3106
3106
|
current: m.value,
|
|
3107
3107
|
total: h.value,
|
|
3108
3108
|
pageSize: 50,
|
|
3109
3109
|
showSizeChanger: !1,
|
|
3110
3110
|
showQuickJumper: !1,
|
|
3111
|
-
onChange: (e) => void
|
|
3111
|
+
onChange: (e) => void te(e)
|
|
3112
3112
|
}));
|
|
3113
3113
|
Q(() => [r.open, r.role?.id], ([e]) => {
|
|
3114
|
-
e ?
|
|
3114
|
+
e ? te() : M();
|
|
3115
3115
|
}, { immediate: !0 }), Q([
|
|
3116
3116
|
() => r.embedded,
|
|
3117
3117
|
() => r.drawerContext,
|
|
3118
3118
|
c,
|
|
3119
|
+
C,
|
|
3119
3120
|
w,
|
|
3120
|
-
T,
|
|
3121
3121
|
f,
|
|
3122
3122
|
d
|
|
3123
|
-
],
|
|
3124
|
-
function
|
|
3123
|
+
], ee, { immediate: !0 }), Ge(() => r.drawerContext?.setOperation(void 0));
|
|
3124
|
+
function ee() {
|
|
3125
3125
|
let e = r.drawerContext;
|
|
3126
3126
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
3127
3127
|
value1: r.role?.title ?? r.role?.id ?? n.t("platform.screen.RoleManagementView.role", "角色"),
|
|
3128
|
-
value2:
|
|
3128
|
+
value2: se(r.role)
|
|
3129
3129
|
})), e.setOperation({
|
|
3130
3130
|
summary: n.t("platform.screen.RoleEmploymentGrantDrawer.value-positions-selectedvalue", "已选 {value1} 个任职{value2}", {
|
|
3131
3131
|
value1: c.value.size,
|
|
3132
|
-
value2:
|
|
3133
|
-
value1:
|
|
3134
|
-
value2:
|
|
3132
|
+
value2: C.value.length || w.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
|
|
3133
|
+
value1: C.value.length,
|
|
3134
|
+
value2: w.value.length
|
|
3135
3135
|
}) : ""
|
|
3136
3136
|
}),
|
|
3137
3137
|
actions: [{
|
|
@@ -3143,18 +3143,18 @@ var Xn = {
|
|
|
3143
3143
|
key: "save-employment-role-grants",
|
|
3144
3144
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
3145
3145
|
emphasis: "primary",
|
|
3146
|
-
disabled: d.value ||
|
|
3146
|
+
disabled: d.value || C.value.length === 0 && w.value.length === 0,
|
|
3147
3147
|
loading: f.value,
|
|
3148
3148
|
run: () => void ne()
|
|
3149
3149
|
}]
|
|
3150
3150
|
}));
|
|
3151
3151
|
}
|
|
3152
|
-
async function
|
|
3153
|
-
let t =
|
|
3152
|
+
async function te(e = 1) {
|
|
3153
|
+
let t = _.value;
|
|
3154
3154
|
if (t) {
|
|
3155
3155
|
d.value = !0, p.value = !1;
|
|
3156
3156
|
try {
|
|
3157
|
-
let [n, r] = await Promise.all([
|
|
3157
|
+
let [n, r] = await Promise.all([v.value.employmentRoleGrants(t), v.value.employmentSelector(t, {
|
|
3158
3158
|
enabledOnly: !0,
|
|
3159
3159
|
page: {
|
|
3160
3160
|
pageNum: e,
|
|
@@ -3166,7 +3166,7 @@ var Xn = {
|
|
|
3166
3166
|
...re(r.records)
|
|
3167
3167
|
}, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, m.value = r.pageNum, h.value = r.total;
|
|
3168
3168
|
} catch (e) {
|
|
3169
|
-
p.value = !0,
|
|
3169
|
+
p.value = !0, P(e, {
|
|
3170
3170
|
language: n,
|
|
3171
3171
|
source: "role-employment-grants",
|
|
3172
3172
|
phase: "load"
|
|
@@ -3177,16 +3177,16 @@ var Xn = {
|
|
|
3177
3177
|
}
|
|
3178
3178
|
}
|
|
3179
3179
|
async function ne() {
|
|
3180
|
-
let e =
|
|
3180
|
+
let e = _.value;
|
|
3181
3181
|
if (e) {
|
|
3182
3182
|
f.value = !0;
|
|
3183
3183
|
try {
|
|
3184
|
-
for (let t of
|
|
3185
|
-
for (let t of
|
|
3186
|
-
let n =
|
|
3187
|
-
n && await
|
|
3184
|
+
for (let t of C.value) await v.value.grantEmploymentRole(e, t);
|
|
3185
|
+
for (let t of w.value) {
|
|
3186
|
+
let n = D.value.get(t)?.id;
|
|
3187
|
+
n && await v.value.deleteEmploymentRoleGrant(e, n);
|
|
3188
3188
|
}
|
|
3189
|
-
await
|
|
3189
|
+
await ae({
|
|
3190
3190
|
success: !0,
|
|
3191
3191
|
message: n.t("platform.screen.RoleEmploymentGrantDrawer.position-role-assignments-saved", "任职角色授权已保存")
|
|
3192
3192
|
}, {
|
|
@@ -3195,7 +3195,7 @@ var Xn = {
|
|
|
3195
3195
|
phase: "action"
|
|
3196
3196
|
}), i("saved"), i("close");
|
|
3197
3197
|
} catch (e) {
|
|
3198
|
-
|
|
3198
|
+
P(e, {
|
|
3199
3199
|
language: n,
|
|
3200
3200
|
source: "role-employment-grants",
|
|
3201
3201
|
phase: "action"
|
|
@@ -3205,10 +3205,10 @@ var Xn = {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
|
-
function
|
|
3208
|
+
function M() {
|
|
3209
3209
|
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, g.value = "", m.value = 1, h.value = 0, p.value = !1;
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function N(e) {
|
|
3212
3212
|
return [
|
|
3213
3213
|
e.employeeTitle,
|
|
3214
3214
|
e.employeeNo,
|
|
@@ -3226,38 +3226,38 @@ var Xn = {
|
|
|
3226
3226
|
for (let n of e) n.id && (t[n.id] = n);
|
|
3227
3227
|
return t;
|
|
3228
3228
|
}
|
|
3229
|
-
function
|
|
3229
|
+
function ie(e) {
|
|
3230
3230
|
return {
|
|
3231
3231
|
id: e,
|
|
3232
3232
|
positionId: e
|
|
3233
3233
|
};
|
|
3234
3234
|
}
|
|
3235
|
-
function
|
|
3235
|
+
function I(e) {
|
|
3236
3236
|
let t = e.positionTitle ?? e.positionId ?? e.id;
|
|
3237
3237
|
return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
|
|
3238
3238
|
}
|
|
3239
|
-
function
|
|
3239
|
+
function oe(e) {
|
|
3240
3240
|
return [
|
|
3241
3241
|
e.employeeNo,
|
|
3242
3242
|
e.organizationTitle ?? e.organizationId,
|
|
3243
3243
|
e.departmentTitle ?? e.departmentId
|
|
3244
3244
|
].filter(Boolean).join(" / ") || e.id;
|
|
3245
3245
|
}
|
|
3246
|
-
function
|
|
3246
|
+
function se(e) {
|
|
3247
3247
|
return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
|
|
3248
3248
|
}
|
|
3249
|
-
return (t, r) => (J(), V(Ze(
|
|
3250
|
-
default: $(() => [d.value ? (J(), V(Z(
|
|
3249
|
+
return (t, r) => (J(), V(Ze(x.value), Be(S.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), Ie({
|
|
3250
|
+
default: $(() => [d.value ? (J(), V(Z(E), {
|
|
3251
3251
|
key: 0,
|
|
3252
3252
|
tip: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
|
|
3253
|
-
}, null, 8, ["tip"])) : p.value ? (J(), U("div", cr, [K(Z(
|
|
3253
|
+
}, null, 8, ["tip"])) : p.value ? (J(), U("div", cr, [K(Z(T), {
|
|
3254
3254
|
title: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
|
|
3255
3255
|
message: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
|
|
3256
|
-
}, null, 8, ["title", "message"]), K(Z(
|
|
3256
|
+
}, null, 8, ["title", "message"]), K(Z(R), { onClick: r[1] ||= (e) => te() }, {
|
|
3257
3257
|
default: $(() => [G(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
3258
3258
|
_: 1
|
|
3259
3259
|
})])) : (J(), U("section", lr, [
|
|
3260
|
-
K(Z(
|
|
3260
|
+
K(Z(L), {
|
|
3261
3261
|
value: g.value,
|
|
3262
3262
|
"onUpdate:value": r[2] ||= (e) => g.value = e,
|
|
3263
3263
|
"allow-clear": "",
|
|
@@ -3266,10 +3266,10 @@ var Xn = {
|
|
|
3266
3266
|
K(sr, {
|
|
3267
3267
|
"selected-ids": c.value,
|
|
3268
3268
|
"onUpdate:selectedIds": r[3] ||= (e) => c.value = e,
|
|
3269
|
-
rows:
|
|
3269
|
+
rows: O.value,
|
|
3270
3270
|
selectable: "",
|
|
3271
3271
|
disabled: f.value,
|
|
3272
|
-
pagination:
|
|
3272
|
+
pagination: A.value,
|
|
3273
3273
|
"fill-height": ""
|
|
3274
3274
|
}, null, 8, [
|
|
3275
3275
|
"selected-ids",
|
|
@@ -3277,26 +3277,26 @@ var Xn = {
|
|
|
3277
3277
|
"disabled",
|
|
3278
3278
|
"pagination"
|
|
3279
3279
|
]),
|
|
3280
|
-
|
|
3280
|
+
k.value.length > 0 ? (J(), U("section", ur, [W("div", dr, [W("strong", null, X(Z(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), W("span", null, X(k.value.length), 1)]), W("div", fr, [(J(!0), U(z, null, Ye(k.value, (e) => (J(), U("button", {
|
|
3281
3281
|
key: e.id,
|
|
3282
3282
|
type: "button",
|
|
3283
3283
|
disabled: f.value,
|
|
3284
3284
|
onClick: (t) => F(e.id)
|
|
3285
|
-
}, [W("span", null, X(
|
|
3285
|
+
}, [W("span", null, X(I(e)), 1), W("small", null, X(oe(e)), 1)], 8, pr))), 128))])])) : H("v-if", !0)
|
|
3286
3286
|
]))]),
|
|
3287
3287
|
_: 2
|
|
3288
3288
|
}, [e.embedded ? void 0 : {
|
|
3289
3289
|
name: "operation",
|
|
3290
|
-
fn: $(() => [K(Z(
|
|
3290
|
+
fn: $(() => [K(Z(R), {
|
|
3291
3291
|
disabled: f.value,
|
|
3292
3292
|
onClick: r[0] ||= (e) => i("close")
|
|
3293
3293
|
}, {
|
|
3294
3294
|
default: $(() => [G(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
|
|
3295
3295
|
_: 1
|
|
3296
|
-
}, 8, ["disabled"]), K(Z(
|
|
3296
|
+
}, 8, ["disabled"]), K(Z(R), {
|
|
3297
3297
|
type: "primary",
|
|
3298
3298
|
loading: f.value,
|
|
3299
|
-
disabled: d.value ||
|
|
3299
|
+
disabled: d.value || C.value.length === 0 && w.value.length === 0,
|
|
3300
3300
|
onClick: ne
|
|
3301
3301
|
}, {
|
|
3302
3302
|
default: $(() => [G(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
@@ -3346,7 +3346,7 @@ var Xn = {
|
|
|
3346
3346
|
emits: ["close"],
|
|
3347
3347
|
setup(e, { emit: t }) {
|
|
3348
3348
|
let n = e, r = t, i = B(() => n.profile === "wide-work" ? "wide" : "standard");
|
|
3349
|
-
return (t, n) => (J(), V(Z(
|
|
3349
|
+
return (t, n) => (J(), V(Z(y), {
|
|
3350
3350
|
open: e.open,
|
|
3351
3351
|
title: e.title,
|
|
3352
3352
|
"render-mode": e.container ? "inline" : "portal",
|
|
@@ -3381,7 +3381,7 @@ function _r(e) {
|
|
|
3381
3381
|
return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
|
|
3382
3382
|
}
|
|
3383
3383
|
function vr(e) {
|
|
3384
|
-
let t = s(), n =
|
|
3384
|
+
let t = s(), n = j();
|
|
3385
3385
|
return B(() => {
|
|
3386
3386
|
let r = et(e.input);
|
|
3387
3387
|
if (r && _r(et(e.eligibility)) && t) return {
|
|
@@ -3457,29 +3457,29 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3457
3457
|
},
|
|
3458
3458
|
emits: ["close"],
|
|
3459
3459
|
setup(e, { emit: t }) {
|
|
3460
|
-
let n =
|
|
3461
|
-
let e =
|
|
3460
|
+
let n = j(), r = e, a = t, o = ve({ moduleAlias: "iam.role" }), s = r.moduleContext ?? o, c = Yn(s.http), l = r.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", u = i(), d = r.roleId ? { roleId: r.roleId } : void 0, f = d ? kr(d) : void 0, m = Y(), g = Y([]), y = Y(), b = Y(""), x = Y([]), S = Y(), C = Y(), w = Y(!1), O = Y(!1), k = Y(!1), A = Qe(), ee = B(() => A.value ? me(A.value, n) : void 0), ne = Y(), M = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), F = Y(0), I, oe = B(() => m.value?.roleKind === "group"), se = B(() => m.value?.roleKind === "dataGrant"), le = B(() => m.value?.assignmentType === "employment"), ue = B(() => !!r.drawerContext), de = B(() => (m.value && _(m.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), fe = B(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: de.value })), he = B(() => ge.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: ge.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: de.value })), ge = B(() => g.value.find((e) => e.moduleAlias === y.value)), _e = B(() => {
|
|
3461
|
+
let e = b.value.trim().toLocaleLowerCase(), t = new Set(e ? g.value.filter((t) => [
|
|
3462
3462
|
t.title,
|
|
3463
3463
|
t.moduleAlias,
|
|
3464
3464
|
t.applicationAlias
|
|
3465
|
-
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) :
|
|
3465
|
+
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : g.value.map((e) => e.moduleAlias)), n = new Map(g.value.map((e) => [e.moduleAlias, e]));
|
|
3466
3466
|
for (let e of [...t]) {
|
|
3467
3467
|
let r = n.get(e)?.parentId;
|
|
3468
3468
|
for (; r && n.has(r) && !t.has(r);) t.add(r), r = n.get(r)?.parentId;
|
|
3469
3469
|
}
|
|
3470
|
-
return
|
|
3470
|
+
return g.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
|
|
3471
3471
|
id: e.moduleAlias,
|
|
3472
3472
|
parentId: e.parentId,
|
|
3473
3473
|
title: e.title,
|
|
3474
3474
|
secondary: e.applicationAlias
|
|
3475
3475
|
}));
|
|
3476
|
-
}),
|
|
3476
|
+
}), L = B(() => (C.value?.options ?? []).map((e) => ({
|
|
3477
3477
|
value: e.code,
|
|
3478
3478
|
label: e.title
|
|
3479
|
-
}))),
|
|
3479
|
+
}))), be = B(() => (C.value?.referenceDependencies ?? []).map((e) => ({
|
|
3480
3480
|
value: e.referenceFieldId,
|
|
3481
3481
|
label: `${e.title} → ${e.targetModuleTitle}`
|
|
3482
|
-
}))),
|
|
3482
|
+
}))), Se = B(() => new Map((C.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), we = B(() => le.value && x.value.some((e) => !!e.dataAuth)), Ee = B(() => [
|
|
3483
3483
|
{
|
|
3484
3484
|
key: "title",
|
|
3485
3485
|
title: n.t("platform.governance.tab.actions", "动作"),
|
|
@@ -3491,7 +3491,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3491
3491
|
width: 104,
|
|
3492
3492
|
align: "center"
|
|
3493
3493
|
},
|
|
3494
|
-
...
|
|
3494
|
+
...we.value ? [{
|
|
3495
3495
|
key: "dataScopePolicy",
|
|
3496
3496
|
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
3497
3497
|
width: 200
|
|
@@ -3513,84 +3513,84 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3513
3513
|
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
3514
3514
|
width: 160
|
|
3515
3515
|
}
|
|
3516
|
-
]), Oe = B(() =>
|
|
3516
|
+
]), Oe = B(() => x.value), ke = B(() => S.value?.actions ?? []), Ae = B(() => r.drawer === !0 || !!d && u?.presentation === "drawer"), je = B(() => !!d), Me = B(() => je.value && !ue.value), Ne = B(() => ue.value ? "div" : Ae.value ? gr : je.value ? v : "div"), Pe = B(() => Ae.value ? {
|
|
3517
3517
|
open: !0,
|
|
3518
|
-
title:
|
|
3518
|
+
title: fe.value,
|
|
3519
3519
|
container: r.container ?? null,
|
|
3520
3520
|
profile: st.drawerProfile,
|
|
3521
3521
|
promotion: We.value,
|
|
3522
3522
|
dismissal: "guarded",
|
|
3523
3523
|
beforeClose: ft,
|
|
3524
3524
|
onClose: pt
|
|
3525
|
-
} : Me.value ? { title:
|
|
3526
|
-
let e =
|
|
3527
|
-
return !e ||
|
|
3528
|
-
}), Le = B(() =>
|
|
3529
|
-
|
|
3530
|
-
let ze = B(() =>
|
|
3531
|
-
let e =
|
|
3525
|
+
} : Me.value ? { title: fe.value } : {}), Fe = B(() => {
|
|
3526
|
+
let e = S.value;
|
|
3527
|
+
return !e || ne.value === void 0 ? !1 : JSON.stringify(e.actions) !== ne.value;
|
|
3528
|
+
}), Le = B(() => F.value >= 0 && [...M.entries()].some(([e, t]) => N.get(e) !== JSON.stringify(t))), q = B(() => Fe.value || Le.value);
|
|
3529
|
+
ce(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => q.value, () => k.value);
|
|
3530
|
+
let ze = B(() => x.value.length > 0 && x.value.every((e) => e.granted)), Be = B(() => x.value.some((e) => e.granted) && !ze.value), Ve = B(() => {
|
|
3531
|
+
let e = ge.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = x.value.filter((e) => e.granted).length, r = q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
|
|
3532
3532
|
return n.t("platform.screen.RoleAuthorizationView.current-module-value-value-value-actions-granted-value", "当前模块:{value1} · 已授权 {value2}/{value3} 项 · {value4}", {
|
|
3533
3533
|
value1: e,
|
|
3534
3534
|
value2: t,
|
|
3535
|
-
value3:
|
|
3535
|
+
value3: x.value.length,
|
|
3536
3536
|
value4: r
|
|
3537
3537
|
});
|
|
3538
3538
|
}), We = vr({
|
|
3539
3539
|
view: st,
|
|
3540
|
-
input: () =>
|
|
3541
|
-
title:
|
|
3540
|
+
input: () => d,
|
|
3541
|
+
title: fe,
|
|
3542
3542
|
eligibility: () => ({
|
|
3543
|
-
hasStableIdentity: !!(l &&
|
|
3544
|
-
busy:
|
|
3543
|
+
hasStableIdentity: !!(l && m.value),
|
|
3544
|
+
busy: k.value
|
|
3545
3545
|
}),
|
|
3546
3546
|
beforePromote: (e) => Dr(e, {
|
|
3547
|
-
selectedModuleAlias:
|
|
3548
|
-
dataGrantMatrix:
|
|
3549
|
-
actionDrafts: [...
|
|
3547
|
+
selectedModuleAlias: y.value,
|
|
3548
|
+
dataGrantMatrix: S.value,
|
|
3549
|
+
actionDrafts: [...M.entries()].map(([e, t]) => ({
|
|
3550
3550
|
moduleAlias: e,
|
|
3551
3551
|
actions: t
|
|
3552
3552
|
})),
|
|
3553
|
-
actionSnapshots: [...
|
|
3553
|
+
actionSnapshots: [...N.entries()].map(([e, t]) => ({
|
|
3554
3554
|
moduleAlias: e,
|
|
3555
3555
|
snapshot: t
|
|
3556
3556
|
}))
|
|
3557
3557
|
}).then((e) => e === "accepted"),
|
|
3558
3558
|
onPromoted: mt,
|
|
3559
|
-
onPromotionRejected: () =>
|
|
3559
|
+
onPromotionRejected: () => Ce(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
|
|
3560
3560
|
language: n,
|
|
3561
3561
|
source: "role-authorization",
|
|
3562
3562
|
phase: "validation"
|
|
3563
3563
|
})
|
|
3564
3564
|
});
|
|
3565
3565
|
Ke(() => {
|
|
3566
|
-
|
|
3567
|
-
}), Q(
|
|
3566
|
+
d && !Ae.value && (I = Or(d, ht)), Je();
|
|
3567
|
+
}), Q(fe, (e) => {
|
|
3568
3568
|
je.value && u?.setTitle(e);
|
|
3569
|
-
}, { immediate: !0 }), Q(
|
|
3570
|
-
|
|
3569
|
+
}, { immediate: !0 }), Q(y, () => void Ye()), Q([
|
|
3570
|
+
de,
|
|
3571
3571
|
Ve,
|
|
3572
3572
|
q,
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3573
|
+
k,
|
|
3574
|
+
oe,
|
|
3575
|
+
se
|
|
3576
3576
|
], qe, { immediate: !0 }), Ke(() => window.addEventListener("beforeunload", _t)), Ge(() => {
|
|
3577
|
-
|
|
3577
|
+
I?.(), r.drawerContext?.setOperation(void 0), r.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", _t);
|
|
3578
3578
|
});
|
|
3579
3579
|
function qe() {
|
|
3580
3580
|
let e = r.drawerContext;
|
|
3581
3581
|
if (e) {
|
|
3582
|
-
if (e.setSubtitle(`${
|
|
3582
|
+
if (e.setSubtitle(`${de.value} · ${vt(m.value)}`), oe.value) {
|
|
3583
3583
|
e.setOperation(void 0);
|
|
3584
3584
|
return;
|
|
3585
3585
|
}
|
|
3586
3586
|
e.setOperation({
|
|
3587
|
-
summary:
|
|
3587
|
+
summary: se.value ? q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ve.value,
|
|
3588
3588
|
actions: [{
|
|
3589
3589
|
key: "confirm-role-authorization",
|
|
3590
3590
|
label: n.t("platform.screen.UiModal.confirmText", "确认"),
|
|
3591
3591
|
emphasis: "primary",
|
|
3592
|
-
disabled:
|
|
3593
|
-
loading:
|
|
3592
|
+
disabled: k.value || !q.value,
|
|
3593
|
+
loading: k.value,
|
|
3594
3594
|
run: () => void dt()
|
|
3595
3595
|
}]
|
|
3596
3596
|
});
|
|
@@ -3598,65 +3598,65 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
async function Je() {
|
|
3600
3600
|
if (!l) {
|
|
3601
|
-
|
|
3601
|
+
A.value = new re(ie(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
|
|
3602
3602
|
return;
|
|
3603
3603
|
}
|
|
3604
|
-
|
|
3604
|
+
w.value = !0, A.value = void 0;
|
|
3605
3605
|
try {
|
|
3606
|
-
if (
|
|
3607
|
-
if (
|
|
3606
|
+
if (m.value = await s.crud.view(l), m.value.roleKind === "group") return;
|
|
3607
|
+
if (m.value.roleKind === "dataGrant") {
|
|
3608
3608
|
let [e, t] = await Promise.all([c.dataGrantActionMatrix(l), c.dataScopePolicyCatalog(l)]);
|
|
3609
|
-
|
|
3609
|
+
S.value = f?.dataGrantMatrix ?? e, C.value = t, ne.value = JSON.stringify(e.actions);
|
|
3610
3610
|
return;
|
|
3611
3611
|
}
|
|
3612
|
-
|
|
3612
|
+
g.value = (await c.authorizationModules(l)).records, y.value = f?.selectedModuleAlias ?? g.value[0]?.moduleAlias;
|
|
3613
3613
|
} catch (e) {
|
|
3614
|
-
|
|
3614
|
+
A.value = new re(ie(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), P(e, {
|
|
3615
3615
|
language: n,
|
|
3616
3616
|
source: "role-authorization",
|
|
3617
3617
|
phase: "load"
|
|
3618
3618
|
});
|
|
3619
3619
|
} finally {
|
|
3620
|
-
|
|
3620
|
+
w.value = !1;
|
|
3621
3621
|
}
|
|
3622
3622
|
}
|
|
3623
3623
|
async function Ye() {
|
|
3624
|
-
let e =
|
|
3625
|
-
if (!(!e ||
|
|
3626
|
-
|
|
3624
|
+
let e = y.value;
|
|
3625
|
+
if (!(!e || se.value || oe.value)) {
|
|
3626
|
+
O.value = !0;
|
|
3627
3627
|
try {
|
|
3628
|
-
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(ct), i =
|
|
3629
|
-
|
|
3628
|
+
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(ct), i = f?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = M.get(e) ?? i;
|
|
3629
|
+
x.value = a ?? r, M.has(e) || (M.set(e, x.value), N.set(e, f?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, C.value = n;
|
|
3630
3630
|
} catch (e) {
|
|
3631
|
-
|
|
3631
|
+
P(e, {
|
|
3632
3632
|
language: n,
|
|
3633
3633
|
source: "role-authorization",
|
|
3634
3634
|
phase: "load"
|
|
3635
3635
|
});
|
|
3636
3636
|
} finally {
|
|
3637
|
-
|
|
3637
|
+
O.value = !1;
|
|
3638
3638
|
}
|
|
3639
3639
|
}
|
|
3640
3640
|
}
|
|
3641
3641
|
function Xe(e, t) {
|
|
3642
|
-
t && e.dataAuth &&
|
|
3642
|
+
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;
|
|
3643
3643
|
}
|
|
3644
3644
|
function $e(e) {
|
|
3645
|
-
|
|
3645
|
+
x.value.forEach((t) => Xe(t, e));
|
|
3646
3646
|
}
|
|
3647
3647
|
function et(e, t) {
|
|
3648
3648
|
if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
|
|
3649
|
-
e.referenceFieldId = void 0, e.referenceActionCode = void 0,
|
|
3649
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
|
|
3650
3650
|
return;
|
|
3651
3651
|
}
|
|
3652
|
-
e.referenceFieldId = void 0, e.referenceActionCode = void 0,
|
|
3652
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
|
|
3653
3653
|
}
|
|
3654
3654
|
function tt(e, t) {
|
|
3655
|
-
let n =
|
|
3656
|
-
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode,
|
|
3655
|
+
let n = Se.value.get(String(t || ""));
|
|
3656
|
+
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, F.value += 1;
|
|
3657
3657
|
}
|
|
3658
3658
|
function nt(e) {
|
|
3659
|
-
return
|
|
3659
|
+
return Se.value.get(String(e || ""));
|
|
3660
3660
|
}
|
|
3661
3661
|
function rt(e) {
|
|
3662
3662
|
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
@@ -3665,75 +3665,75 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3665
3665
|
return e.dataScopePolicy ?? "inheritDataGrant";
|
|
3666
3666
|
}
|
|
3667
3667
|
function at(e) {
|
|
3668
|
-
return !!e.dataAuth &&
|
|
3668
|
+
return !!e.dataAuth && le.value;
|
|
3669
3669
|
}
|
|
3670
3670
|
function ot(e, t) {
|
|
3671
3671
|
return e.key === "dataScopePolicy" && at(t);
|
|
3672
3672
|
}
|
|
3673
3673
|
function ct(e) {
|
|
3674
|
-
return
|
|
3674
|
+
return le.value && e.dataAuth && e.dataScopePolicy === "none" ? {
|
|
3675
3675
|
...e,
|
|
3676
3676
|
dataScopePolicy: "inheritDataGrant"
|
|
3677
3677
|
} : e;
|
|
3678
3678
|
}
|
|
3679
3679
|
async function lt() {
|
|
3680
|
-
if (
|
|
3681
|
-
|
|
3680
|
+
if (S.value) {
|
|
3681
|
+
k.value = !0;
|
|
3682
3682
|
try {
|
|
3683
|
-
let e = await c.replaceDataGrantActions(l,
|
|
3683
|
+
let e = await c.replaceDataGrantActions(l, S.value.actions.map((e) => ({
|
|
3684
3684
|
actionCode: e.actionCode,
|
|
3685
3685
|
dataScopePolicy: e.dataScopePolicy,
|
|
3686
3686
|
enabled: e.configured
|
|
3687
3687
|
})));
|
|
3688
|
-
await
|
|
3688
|
+
await ae(e, {
|
|
3689
3689
|
language: n,
|
|
3690
3690
|
source: "role-authorization",
|
|
3691
3691
|
phase: "action",
|
|
3692
3692
|
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.data-permission-template-saved", "数据权限模板已保存")
|
|
3693
|
-
}),
|
|
3693
|
+
}), ne.value = JSON.stringify(S.value.actions);
|
|
3694
3694
|
} catch (e) {
|
|
3695
|
-
|
|
3695
|
+
P(e, {
|
|
3696
3696
|
language: n,
|
|
3697
3697
|
source: "role-authorization",
|
|
3698
3698
|
phase: "action"
|
|
3699
3699
|
});
|
|
3700
3700
|
} finally {
|
|
3701
|
-
|
|
3701
|
+
k.value = !1;
|
|
3702
3702
|
}
|
|
3703
3703
|
}
|
|
3704
3704
|
}
|
|
3705
3705
|
async function ut() {
|
|
3706
|
-
let e = [...
|
|
3706
|
+
let e = [...M.entries()].filter(([e, t]) => N.get(e) !== JSON.stringify(t));
|
|
3707
3707
|
if (e.length) {
|
|
3708
|
-
|
|
3708
|
+
k.value = !0;
|
|
3709
3709
|
try {
|
|
3710
3710
|
let t = await c.replacePermissionMatrix(l, e.flatMap(([e, t]) => t.map((t) => ({
|
|
3711
3711
|
moduleAlias: e,
|
|
3712
3712
|
actionCode: t.actionCode,
|
|
3713
3713
|
granted: !!t.granted,
|
|
3714
|
-
dataScopePolicy: t.granted && t.dataAuth &&
|
|
3714
|
+
dataScopePolicy: t.granted && t.dataAuth && le.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
|
|
3715
3715
|
referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
|
|
3716
3716
|
referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
|
|
3717
3717
|
}))));
|
|
3718
|
-
await
|
|
3718
|
+
await ae(t, {
|
|
3719
3719
|
language: n,
|
|
3720
3720
|
source: "role-authorization",
|
|
3721
3721
|
phase: "action",
|
|
3722
3722
|
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.role-permissions-saved", "角色授权已保存")
|
|
3723
|
-
}), e.forEach(([e, t]) =>
|
|
3723
|
+
}), e.forEach(([e, t]) => N.set(e, JSON.stringify(t))), F.value += 1;
|
|
3724
3724
|
} catch (e) {
|
|
3725
|
-
|
|
3725
|
+
P(e, {
|
|
3726
3726
|
language: n,
|
|
3727
3727
|
source: "role-authorization",
|
|
3728
3728
|
phase: "action"
|
|
3729
3729
|
});
|
|
3730
3730
|
} finally {
|
|
3731
|
-
|
|
3731
|
+
k.value = !1;
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
3734
|
}
|
|
3735
3735
|
async function dt() {
|
|
3736
|
-
if (
|
|
3736
|
+
if (se.value) {
|
|
3737
3737
|
await lt();
|
|
3738
3738
|
return;
|
|
3739
3739
|
}
|
|
@@ -3754,7 +3754,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3754
3754
|
gt();
|
|
3755
3755
|
}
|
|
3756
3756
|
function ht(e) {
|
|
3757
|
-
return !q.value && (
|
|
3757
|
+
return !q.value && (y.value = e.selectedModuleAlias, S.value = e.dataGrantMatrix, M.clear(), N.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => M.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => N.set(e, t)), F.value += 1, !0);
|
|
3758
3758
|
}
|
|
3759
3759
|
function gt() {
|
|
3760
3760
|
if (r.drawer === !0) {
|
|
@@ -3770,53 +3770,53 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3770
3770
|
return e?.ownerScopeType === "platform" ? n.t("platform.screen.RoleAuthorizationView.platform-scope", "平台范围") : e?.ownerScopeType === "organization" ? n.t("platform.screen.RoleAuthorizationView.organization-scope", "机构范围") : n.t("platform.screen.RoleAuthorizationView.tenant-scope", "租户范围");
|
|
3771
3771
|
}
|
|
3772
3772
|
return (e, t) => (J(), V(Ze(Ne.value), Ue(Re(Pe.value)), Ie({
|
|
3773
|
-
default: $(() => [W("section", { class: He(["role-authorization-page", { "role-authorization-page--drawer": Ae.value ||
|
|
3773
|
+
default: $(() => [W("section", { class: He(["role-authorization-page", { "role-authorization-page--drawer": Ae.value || ue.value }]) }, [w.value ? (J(), V(Z(E), {
|
|
3774
3774
|
key: 0,
|
|
3775
3775
|
tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
|
|
3776
|
-
}, null, 8, ["tip"])) :
|
|
3776
|
+
}, null, 8, ["tip"])) : ee.value ? (J(), V(Z(T), {
|
|
3777
3777
|
key: 1,
|
|
3778
3778
|
title: Z(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
|
|
3779
|
-
message:
|
|
3780
|
-
}, null, 8, ["title", "message"])) :
|
|
3779
|
+
message: ee.value
|
|
3780
|
+
}, null, 8, ["title", "message"])) : oe.value ? (J(), V(Z(Te), {
|
|
3781
3781
|
key: 2,
|
|
3782
3782
|
title: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
|
|
3783
3783
|
description: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
|
|
3784
|
-
}, null, 8, ["title", "description"])) :
|
|
3784
|
+
}, null, 8, ["title", "description"])) : se.value && S.value ? (J(), V(Z(ye), {
|
|
3785
3785
|
key: 3,
|
|
3786
3786
|
class: "data-grant-content",
|
|
3787
|
-
title: Me.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1:
|
|
3787
|
+
title: Me.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: de.value }),
|
|
3788
3788
|
searchable: !1,
|
|
3789
3789
|
onRefresh: Je
|
|
3790
3790
|
}, {
|
|
3791
|
-
default: $(() => [W("header", Ar, [W("div", null, [W("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), W("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), je.value ? H("v-if", !0) : (J(), V(Z(
|
|
3791
|
+
default: $(() => [W("header", Ar, [W("div", null, [W("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), W("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), je.value ? H("v-if", !0) : (J(), V(Z(R), {
|
|
3792
3792
|
key: 0,
|
|
3793
3793
|
type: "primary",
|
|
3794
3794
|
disabled: !q.value,
|
|
3795
|
-
loading:
|
|
3795
|
+
loading: k.value,
|
|
3796
3796
|
onClick: dt
|
|
3797
3797
|
}, {
|
|
3798
3798
|
default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3799
3799
|
_: 1
|
|
3800
|
-
}, 8, ["disabled", "loading"]))]), K(Z(
|
|
3800
|
+
}, 8, ["disabled", "loading"]))]), K(Z(D), {
|
|
3801
3801
|
columns: De.value,
|
|
3802
3802
|
rows: ke.value,
|
|
3803
3803
|
"row-key": "actionCode",
|
|
3804
3804
|
"horizontal-scroll": ""
|
|
3805
3805
|
}, {
|
|
3806
|
-
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.actionCode), 1)], 64)) : e.key === "configured" ? (J(), V(Z(
|
|
3806
|
+
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.actionCode), 1)], 64)) : e.key === "configured" ? (J(), V(Z(te), {
|
|
3807
3807
|
key: 1,
|
|
3808
3808
|
checked: !!t.configured,
|
|
3809
|
-
disabled:
|
|
3809
|
+
disabled: k.value,
|
|
3810
3810
|
onChange: (e) => t.configured = e
|
|
3811
3811
|
}, null, 8, [
|
|
3812
3812
|
"checked",
|
|
3813
3813
|
"disabled",
|
|
3814
3814
|
"onChange"
|
|
3815
|
-
])) : (J(), V(Z(
|
|
3815
|
+
])) : (J(), V(Z(pe), {
|
|
3816
3816
|
key: 2,
|
|
3817
3817
|
value: t.dataScopePolicy,
|
|
3818
|
-
options:
|
|
3819
|
-
disabled: !t.configured ||
|
|
3818
|
+
options: L.value,
|
|
3819
|
+
disabled: !t.configured || k.value,
|
|
3820
3820
|
placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
|
|
3821
3821
|
"allow-clear": !1,
|
|
3822
3822
|
"onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
|
|
@@ -3832,10 +3832,10 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3832
3832
|
_: 1
|
|
3833
3833
|
}, 8, ["title"])) : (J(), U("section", {
|
|
3834
3834
|
key: 4,
|
|
3835
|
-
class: He(["authorization-layout", { "authorization-layout--compact-actions": !
|
|
3836
|
-
}, [K(Z(
|
|
3837
|
-
"search-keyword":
|
|
3838
|
-
"onUpdate:searchKeyword": t[1] ||= (e) =>
|
|
3835
|
+
class: He(["authorization-layout", { "authorization-layout--compact-actions": !we.value }])
|
|
3836
|
+
}, [K(Z(ye), {
|
|
3837
|
+
"search-keyword": b.value,
|
|
3838
|
+
"onUpdate:searchKeyword": t[1] ||= (e) => b.value = e,
|
|
3839
3839
|
class: "module-panel",
|
|
3840
3840
|
title: Z(n).t("platform.screen.RoleAuthorizationView.module-tree", "模块树"),
|
|
3841
3841
|
"refresh-title": Z(n).t("platform.screen.RoleAuthorizationView.refresh-module-directory", "刷新模块目录"),
|
|
@@ -3843,9 +3843,9 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3843
3843
|
onRefresh: Je
|
|
3844
3844
|
}, {
|
|
3845
3845
|
default: $(() => [K(Z(h), {
|
|
3846
|
-
records:
|
|
3847
|
-
"selected-id":
|
|
3848
|
-
onSelect: t[0] ||= (e) =>
|
|
3846
|
+
records: _e.value,
|
|
3847
|
+
"selected-id": y.value,
|
|
3848
|
+
onSelect: t[0] ||= (e) => y.value = e.id
|
|
3849
3849
|
}, null, 8, ["records", "selected-id"])]),
|
|
3850
3850
|
_: 1
|
|
3851
3851
|
}, 8, [
|
|
@@ -3853,15 +3853,15 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3853
3853
|
"title",
|
|
3854
3854
|
"refresh-title",
|
|
3855
3855
|
"search-placeholder"
|
|
3856
|
-
]), K(Z(
|
|
3856
|
+
]), K(Z(ye), {
|
|
3857
3857
|
class: "action-panel",
|
|
3858
|
-
title:
|
|
3858
|
+
title: he.value,
|
|
3859
3859
|
searchable: !1
|
|
3860
3860
|
}, Ie({
|
|
3861
|
-
default: $(() => [
|
|
3861
|
+
default: $(() => [O.value ? (J(), V(Z(E), {
|
|
3862
3862
|
key: 0,
|
|
3863
3863
|
tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
|
|
3864
|
-
}, null, 8, ["tip"])) :
|
|
3864
|
+
}, null, 8, ["tip"])) : y.value ? (J(), V(Z(D), {
|
|
3865
3865
|
key: 2,
|
|
3866
3866
|
columns: Ee.value,
|
|
3867
3867
|
rows: Oe.value,
|
|
@@ -3869,10 +3869,10 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3869
3869
|
"fill-height": "",
|
|
3870
3870
|
"horizontal-scroll": ""
|
|
3871
3871
|
}, {
|
|
3872
|
-
header: $(({ column: e }) => [e.key === "granted" ? (J(), U("span", jr, [K(Z(
|
|
3872
|
+
header: $(({ column: e }) => [e.key === "granted" ? (J(), U("span", jr, [K(Z(xe), {
|
|
3873
3873
|
checked: ze.value,
|
|
3874
3874
|
indeterminate: Be.value,
|
|
3875
|
-
disabled:
|
|
3875
|
+
disabled: k.value || !x.value.length,
|
|
3876
3876
|
"aria-label": Z(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
|
|
3877
3877
|
onChange: $e
|
|
3878
3878
|
}, null, 8, [
|
|
@@ -3881,19 +3881,19 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3881
3881
|
"disabled",
|
|
3882
3882
|
"aria-label"
|
|
3883
3883
|
]), G(" " + X(Z(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (J(), U(z, { key: 1 }, [G(X(e.title), 1)], 64))]),
|
|
3884
|
-
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), V(Z(
|
|
3884
|
+
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), U(z, { key: 0 }, [W("strong", null, X(t.title || t.actionCode), 1), W("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), V(Z(xe), {
|
|
3885
3885
|
key: 1,
|
|
3886
3886
|
checked: !!t.granted,
|
|
3887
|
-
disabled:
|
|
3887
|
+
disabled: k.value,
|
|
3888
3888
|
onChange: (e) => Xe(t, e)
|
|
3889
3889
|
}, null, 8, [
|
|
3890
3890
|
"checked",
|
|
3891
3891
|
"disabled",
|
|
3892
3892
|
"onChange"
|
|
3893
|
-
])) : t.dataAuth &&
|
|
3893
|
+
])) : t.dataAuth && le.value && t.granted ? (J(), U("div", Mr, [K(Z(pe), {
|
|
3894
3894
|
value: it(t),
|
|
3895
|
-
options:
|
|
3896
|
-
disabled:
|
|
3895
|
+
options: L.value,
|
|
3896
|
+
disabled: k.value,
|
|
3897
3897
|
"allow-clear": !1,
|
|
3898
3898
|
"onUpdate:value": (e) => et(t, e)
|
|
3899
3899
|
}, null, 8, [
|
|
@@ -3901,10 +3901,10 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3901
3901
|
"options",
|
|
3902
3902
|
"disabled",
|
|
3903
3903
|
"onUpdate:value"
|
|
3904
|
-
]), t.dataScopePolicy === "referenceDependency" ? (J(), U(z, { key: 0 }, [K(Z(
|
|
3904
|
+
]), t.dataScopePolicy === "referenceDependency" ? (J(), U(z, { key: 0 }, [K(Z(pe), {
|
|
3905
3905
|
value: rt(t.referenceFieldId),
|
|
3906
|
-
options:
|
|
3907
|
-
disabled:
|
|
3906
|
+
options: be.value,
|
|
3907
|
+
disabled: k.value,
|
|
3908
3908
|
placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
|
|
3909
3909
|
"allow-clear": !1,
|
|
3910
3910
|
"onUpdate:value": (e) => tt(t, e)
|
|
@@ -3916,17 +3916,17 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3916
3916
|
"onUpdate:value"
|
|
3917
3917
|
]), t.referenceFieldId ? (J(), U("small", Nr, X(Z(n).t("platform.screen.RoleAuthorizationView.dependency-target", "依赖目标:")) + X(nt(t.referenceFieldId)?.targetModuleTitle) + " · " + X(nt(t.referenceFieldId)?.referenceActionTitle), 1)) : (J(), U("small", Pr, X(Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field-before-granting-this-action", "请先选择引用字段,再开启该动作授权。")), 1))], 64)) : H("v-if", !0)])) : ot(e, t) ? (J(), U("span", Fr, "—")) : (J(), U("span", Ir, X(Z(n).t("platform.screen.RoleAuthorizationView.not-applicable", "不适用")), 1))]),
|
|
3918
3918
|
_: 1
|
|
3919
|
-
}, 8, ["columns", "rows"])) : (J(), V(Z(
|
|
3919
|
+
}, 8, ["columns", "rows"])) : (J(), V(Z(Te), {
|
|
3920
3920
|
key: 1,
|
|
3921
3921
|
title: Z(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
|
|
3922
3922
|
}, null, 8, ["title"]))]),
|
|
3923
3923
|
_: 2
|
|
3924
3924
|
}, [je.value ? void 0 : {
|
|
3925
3925
|
name: "actions",
|
|
3926
|
-
fn: $(() => [K(Z(
|
|
3926
|
+
fn: $(() => [K(Z(R), {
|
|
3927
3927
|
type: "primary",
|
|
3928
3928
|
disabled: !q.value,
|
|
3929
|
-
loading:
|
|
3929
|
+
loading: k.value,
|
|
3930
3930
|
onClick: dt
|
|
3931
3931
|
}, {
|
|
3932
3932
|
default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
@@ -3935,12 +3935,12 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3935
3935
|
key: "0"
|
|
3936
3936
|
}]), 1032, ["title"])], 2))], 2)]),
|
|
3937
3937
|
_: 2
|
|
3938
|
-
}, [Me.value && !
|
|
3938
|
+
}, [Me.value && !oe.value ? {
|
|
3939
3939
|
name: "operation",
|
|
3940
|
-
fn: $(() => [K(Z(
|
|
3940
|
+
fn: $(() => [K(Z(R), {
|
|
3941
3941
|
type: "primary",
|
|
3942
3942
|
disabled: !q.value,
|
|
3943
|
-
loading:
|
|
3943
|
+
loading: k.value,
|
|
3944
3944
|
onClick: dt
|
|
3945
3945
|
}, {
|
|
3946
3946
|
default: $(() => [G(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
@@ -3949,7 +3949,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3949
3949
|
key: "0"
|
|
3950
3950
|
} : void 0]), 1040));
|
|
3951
3951
|
}
|
|
3952
|
-
}), Rr = /* @__PURE__ */ e({ default: () => zr }), zr = /*#__PURE__*/
|
|
3952
|
+
}), Rr = /* @__PURE__ */ e({ default: () => zr }), zr = /*#__PURE__*/ I(Lr, [["__scopeId", "data-v-817d8433"]]), Br = { class: "role-authorization-drawer-surface" }, Vr = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
3953
3953
|
name: "RoleAuthorizationDrawerSurface",
|
|
3954
3954
|
__name: "RoleAuthorizationDrawerSurface",
|
|
3955
3955
|
props: { context: {} },
|
|
@@ -3997,12 +3997,12 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3997
3997
|
form: {
|
|
3998
3998
|
contributions: [{
|
|
3999
3999
|
key: "role-group-members",
|
|
4000
|
-
component: /* @__PURE__ */
|
|
4000
|
+
component: /* @__PURE__ */ I(/* @__PURE__ */ q({
|
|
4001
4001
|
name: "RoleGroupMemberFormField",
|
|
4002
4002
|
__name: "RoleGroupMemberFormField",
|
|
4003
4003
|
props: { context: {} },
|
|
4004
4004
|
setup(e) {
|
|
4005
|
-
let t =
|
|
4005
|
+
let t = j(), n = e, r = Y([]), i = Y(!1), a = B(() => n.context.draft.roleKind === "group"), o = B(() => f(n.context.draft.memberRoleIds)), s = B(() => String(n.context.draft.id ?? "") || void 0), c = B(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = B(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
|
|
4006
4006
|
label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? t.t("platform.screen.RoleManagementView.data-authorization-role", "数据授权角色") : t.t("platform.screen.RoleManagementView.standard-role", "标准角色")}`,
|
|
4007
4007
|
value: e.id,
|
|
4008
4008
|
disabled: e.roleKind === "dataGrant" && c.value.size > 0 && !o.value.includes(e.id)
|
|
@@ -4054,14 +4054,14 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4054
4054
|
i.value = !1;
|
|
4055
4055
|
}
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function d(e) {
|
|
4058
4058
|
let t = Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : [];
|
|
4059
4059
|
n.context.setField("memberRoleIds", t.length > 0 ? t.join(",") : void 0);
|
|
4060
4060
|
}
|
|
4061
|
-
function
|
|
4061
|
+
function f(e) {
|
|
4062
4062
|
return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
4063
4063
|
}
|
|
4064
|
-
return (n, r) => a.value ? (J(), U("label", Hr, [W("span", null, X(Z(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), K(Z(
|
|
4064
|
+
return (n, r) => a.value ? (J(), U("label", Hr, [W("span", null, X(Z(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), K(Z(pe), {
|
|
4065
4065
|
mode: "multiple",
|
|
4066
4066
|
value: o.value,
|
|
4067
4067
|
options: l.value,
|
|
@@ -4069,7 +4069,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4069
4069
|
placeholder: Z(t).t("platform.screen.RoleGroupMemberSelector.select-member-roles", "请选择成员角色"),
|
|
4070
4070
|
disabled: e.context.mode === "view",
|
|
4071
4071
|
"allow-clear": "",
|
|
4072
|
-
"onUpdate:value":
|
|
4072
|
+
"onUpdate:value": d
|
|
4073
4073
|
}, null, 8, [
|
|
4074
4074
|
"value",
|
|
4075
4075
|
"options",
|