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