@ximatai/muyun-web-app 0.26.22 → 0.26.24
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-CXBpVbZW.js → BusinessActivityLogView-DQ5_VmLp.js} +2 -2
- package/dist/{BusinessLogListDrawer-DToyqP9V.js → BusinessLogListDrawer-BnucgqNA.js} +116 -116
- package/dist/{CodeConfigurationView-DAdbnF2Y.js → CodeConfigurationView-CtQjmpLz.js} +527 -527
- package/dist/{ConfigurationTranslationView-D1aLZQlx.js → ConfigurationTranslationView-BiYn2MJx.js} +26 -26
- package/dist/{LoginAuditLogView-DRxp6BbU.js → LoginAuditLogView-BIz1LVC3.js} +2 -2
- package/dist/ModuleActionManagementView-0_ek9yag.js +780 -0
- package/dist/{ModuleGovernanceView-C7V5KQcA.js → ModuleGovernanceView-DEDF61vj.js} +3061 -3061
- package/dist/{RequestErrorLogView-S6O4ha82.js → RequestErrorLogView-HatmiK8_.js} +2 -2
- package/dist/RoleDetailWorkspaceView-BzzoarpR.js +1435 -0
- package/dist/{RuntimeLogView-BuF-xgEc.js → RuntimeLogView-Vdt6SWK6.js} +65 -65
- package/dist/{WorkflowAdministrationView-DkK3Wybi.js → WorkflowAdministrationView-Dlw2ng0N.js} +193 -193
- package/dist/{WorkflowConfigurationView-8DFNdIyI.js → WorkflowConfigurationView-j2xnGmkM.js} +39 -39
- package/dist/{WorkflowWorkbenchView-CAloU49z.js → WorkflowWorkbenchView-Nv4mvTTP.js} +122 -122
- package/dist/{codeConfiguration-BV9yki1E.js → codeConfiguration-B_z1qQvB.js} +43 -43
- package/dist/index.css +1 -1
- package/dist/index.js +1344 -818
- package/dist/moduleMenuWorkspace-1N0U7QW9.js +626 -0
- package/dist/{platform-components-C9cG_1E2.js → platform-components-Xb5qgsXU.js} +3088 -2999
- package/dist/{platform-workbench-BSTroBaq.js → platform-workbench-VhgKhPLI.js} +5106 -5031
- package/dist/record-read.js +2 -0
- package/dist/recordReadEntry-CxDHM44F.js +152 -0
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +6 -0
- package/dist/types/app/ExternalIdentityBindings.vue.d.ts +8 -0
- package/dist/types/app/ExternalProvisioningConfirmation.vue.d.ts +15 -0
- package/dist/types/app/LoginView.vue.d.ts +3 -1
- package/dist/types/app/WeLinkQrCode.vue.d.ts +11 -0
- package/dist/types/app/externalLoginReturn.d.ts +38 -0
- package/dist/types/app/useExternalLoginHost.d.ts +27 -0
- package/dist/types/app/weLinkQrCode.d.ts +22 -0
- package/dist/types/consumer/index.d.ts +7 -2
- package/dist/types/consumer/recordRead.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +4 -0
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +11 -15
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailActionRuntime.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +2 -0
- package/dist/types/platform-admin-runtime/job/ScheduledActionTargetFields.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/scheduledActionPlanPageEnhancement.d.ts +3 -0
- package/dist/types/platform-components/BusinessNotificationCard.vue.d.ts +30 -0
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +4 -39
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +8 -17
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +2 -2
- package/dist/types/platform-components/SingleImageFileReferenceField.vue.d.ts +4 -0
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +9 -2
- package/dist/types/platform-components/managementWorkspaceContext.d.ts +2 -1
- package/dist/types/platform-components/useNotificationDeckMotion.d.ts +7 -0
- package/dist/types/views/businessRuleGovernance.d.ts +1 -0
- package/dist/types/web-contracts/index.d.ts +71 -2
- package/dist/types/web-core/clients.d.ts +11 -1
- package/dist/{useWorkflowConfigurationContext-ClwD0BWE.js → useWorkflowConfigurationContext-BLFXzHwn.js} +8 -8
- package/dist/{workspaceViews-Cvi7uakV.js → workspaceViews-Cas3PR5B.js} +1035 -879
- package/package.json +5 -1
- package/dist/ModuleActionManagementView-D4oXCnW2.js +0 -755
- package/dist/RoleDetailWorkspaceView-lg4XwTlN.js +0 -1435
- package/dist/moduleMenuWorkspace-BBOQrHeT.js +0 -626
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime-BAC7EHh5.js";
|
|
2
|
-
import { E as t, M as n, T as r, d as i, j as a, lt as o, m as s, ut as c, x as l, y as u } from "./platform-workbench-
|
|
3
|
-
import { $n as d,
|
|
4
|
-
import { d as
|
|
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, j as a, lt as o, m as s, ut as c, x as l, y as u } from "./platform-workbench-VhgKhPLI.js";
|
|
3
|
+
import { $n as d, An as f, Bn as p, D as m, G as h, Ht as g, Ia as _, Ja as v, Jr as y, Kt as b, La as x, Mn as ee, Na as S, Nn as C, Oa as w, Rn as T, Ta as te, Tn as E, V as D, Vn as O, W as ne, Wn as re, Xa as ie, Yn as ae, Yr as k, Za as A, Zn as j, _n as M, cr as N, dr as P, et as F, fa as oe, gn as se, ha as ce, ir as I, it as le, ja as ue, jn as de, jr as fe, k as pe, lr as me, m as he, ma as ge, pa as _e, pn as ve, pr as L, pt as ye, qa as be, rt as xe, sn as Se, sr as Ce, ur as we, yn as Te, z as Ee, zn as De } from "./platform-components-Xb5qgsXU.js";
|
|
4
|
+
import { d as Oe, m as ke, p as Ae } from "./codeConfiguration-B_z1qQvB.js";
|
|
5
|
+
import { a as je, i as Me, o as Ne, r as Pe, s as Fe, t as Ie } from "./moduleMenuWorkspace-1N0U7QW9.js";
|
|
6
|
+
import { t as Le } from "./useWorkflowConfigurationContext-BLFXzHwn.js";
|
|
7
|
+
import { Fragment as R, computed as z, createBlock as B, createCommentVNode as V, createElementBlock as H, createElementVNode as U, createSlots as Re, createTextVNode as W, createVNode as G, defineAsyncComponent as K, defineComponent as q, guardReactiveProps as ze, mergeModels as Be, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as We, onActivated as Ge, onBeforeUnmount as Ke, onMounted as qe, onScopeDispose as Je, onUnmounted as Ye, openBlock as J, ref as Y, renderList as Xe, renderSlot as Ze, resolveDynamicComponent as Qe, shallowRef as $e, toDisplayString as X, toRaw as et, toValue as tt, unref as Z, useModel as nt, watch as Q, withCtx as $, withKeys as rt, withModifiers as it } from "vue";
|
|
8
8
|
//#region src/views/codeConfigurationWorkspaceView.ts
|
|
9
|
-
var
|
|
9
|
+
var at = ke({
|
|
10
10
|
type: "platform.code.configuration",
|
|
11
11
|
route: "/_platform/workspace/platform.code.configuration",
|
|
12
12
|
moduleAlias: "platform.code_rule",
|
|
13
|
-
component:
|
|
13
|
+
component: K(() => import("./CodeConfigurationView-CtQjmpLz.js").then((e) => e.n)),
|
|
14
14
|
layout: "workspace",
|
|
15
15
|
routeTitle: "业务编码",
|
|
16
16
|
routeTitleKey: "platform.code.config.title",
|
|
@@ -26,15 +26,15 @@ var it = De({
|
|
|
26
26
|
...typeof e.moduleTitle == "string" && e.moduleTitle ? { moduleTitle: e.moduleTitle } : {}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), ot = /* @__PURE__ */ new Set([
|
|
30
30
|
"platform",
|
|
31
31
|
"tenant",
|
|
32
32
|
"organization"
|
|
33
|
-
]),
|
|
33
|
+
]), st = ke({
|
|
34
34
|
type: "iam.role.detail",
|
|
35
35
|
route: "/iam/role",
|
|
36
36
|
moduleAlias: "iam.role",
|
|
37
|
-
component:
|
|
37
|
+
component: K(() => import("./RoleDetailWorkspaceView-BzzoarpR.js")),
|
|
38
38
|
layout: "workspace",
|
|
39
39
|
routeTitle: "角色管理",
|
|
40
40
|
routeTitleKey: "platform.workspace-view.roles.route-title",
|
|
@@ -49,17 +49,17 @@ var it = De({
|
|
|
49
49
|
},
|
|
50
50
|
parse(e) {
|
|
51
51
|
let t = e.recordId, n = e.scopeKind, r = e.scopeId;
|
|
52
|
-
if (!(typeof t != "string" || !t || typeof n != "string" || !
|
|
52
|
+
if (!(typeof t != "string" || !t || typeof n != "string" || !ot.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
|
|
53
53
|
recordId: t,
|
|
54
54
|
scopeKind: n,
|
|
55
55
|
...typeof r == "string" ? { scopeId: r } : {}
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
}),
|
|
58
|
+
}), ct = ke({
|
|
59
59
|
type: "iam.role.authorization",
|
|
60
60
|
route: "/iam/role/authorization",
|
|
61
61
|
moduleAlias: "iam.role",
|
|
62
|
-
component:
|
|
62
|
+
component: K(() => Promise.resolve().then(() => Kr)),
|
|
63
63
|
layout: "workspace",
|
|
64
64
|
routeTitle: "角色授权",
|
|
65
65
|
routeTitleKey: "platform.workspace-view.role-authorization.route-title",
|
|
@@ -71,15 +71,15 @@ var it = De({
|
|
|
71
71
|
let t = e.roleId;
|
|
72
72
|
return typeof t == "string" && t ? { roleId: t } : void 0;
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
74
|
+
}), lt = [
|
|
75
|
+
at,
|
|
76
|
+
st,
|
|
77
|
+
ct
|
|
78
|
+
], ut = ke({
|
|
79
79
|
type: "platform.module.actions",
|
|
80
80
|
route: "/_platform/workspace/platform.module.actions",
|
|
81
81
|
moduleAlias: "platform.module",
|
|
82
|
-
component:
|
|
82
|
+
component: K(() => import("./ModuleActionManagementView-0_ek9yag.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 it = De({
|
|
|
96
96
|
...e.moduleKind === "static" || e.moduleKind === "dynamic" ? { moduleKind: e.moduleKind } : {}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), dt = ke({
|
|
100
100
|
type: "platform.module.workflows",
|
|
101
101
|
route: "/_platform/workspace/platform.module.workflows",
|
|
102
102
|
moduleAlias: "platform.module",
|
|
103
|
-
component:
|
|
103
|
+
component: K(() => import("./WorkflowConfigurationView-j2xnGmkM.js")),
|
|
104
104
|
layout: "workspace",
|
|
105
105
|
routeTitle: "模块管理",
|
|
106
106
|
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
@@ -121,19 +121,19 @@ var it = De({
|
|
|
121
121
|
...typeof e.moduleTitle == "string" ? { moduleTitle: e.moduleTitle } : {}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), ft = /* @__PURE__ */ q({
|
|
125
125
|
__name: "ModuleMenuDrawer",
|
|
126
126
|
props: { context: {} },
|
|
127
127
|
setup(e) {
|
|
128
|
-
let t =
|
|
128
|
+
let t = A(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = s(), a = Ie(), 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) ?? Pe(Ne(n.context.module.http), r, {
|
|
134
134
|
valid: () => f && !!c?.value?.userId && l() === d,
|
|
135
135
|
active: () => f
|
|
136
|
-
},
|
|
136
|
+
}, Me(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,
|
|
@@ -151,19 +151,19 @@ var it = De({
|
|
|
151
151
|
}] });
|
|
152
152
|
}, { immediate: !0 }), Q(p.saved, (e) => {
|
|
153
153
|
e && n.context.refreshDetailExtensions();
|
|
154
|
-
}),
|
|
154
|
+
}), Ke(() => {
|
|
155
155
|
f = !1, a?.hideEditor(p), a || p.dispose();
|
|
156
|
-
}), (t, n) => (J(),
|
|
156
|
+
}), (t, n) => (J(), B(je, {
|
|
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
|
-
}),
|
|
163
|
+
}), pt = { class: "workflow-selection-fields" }, mt = { class: "workflow-field settings-wide" }, ht = { class: "settings-help" }, gt = { class: "workflow-field settings-wide" }, _t = { class: "settings-wide workflow-field" }, vt = { class: "settings-help" }, yt = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
164
164
|
name: "WorkflowSelectionFields",
|
|
165
165
|
__name: "WorkflowSelectionFields",
|
|
166
|
-
props: /*@__PURE__*/
|
|
166
|
+
props: /*@__PURE__*/ Be({
|
|
167
167
|
organizationContext: {},
|
|
168
168
|
fields: {},
|
|
169
169
|
disabled: { type: Boolean },
|
|
@@ -185,11 +185,11 @@ var it = De({
|
|
|
185
185
|
"update:fallback"
|
|
186
186
|
],
|
|
187
187
|
setup(e) {
|
|
188
|
-
let t =
|
|
189
|
-
return (o, s) => (J(),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
n.organizationContext ? (J(),
|
|
188
|
+
let t = A(), n = e, r = nt(e, "organizationId"), i = nt(e, "matchExpression"), a = nt(e, "fallback");
|
|
189
|
+
return (o, s) => (J(), H("div", pt, [
|
|
190
|
+
U("label", mt, [
|
|
191
|
+
W(X(Z(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
|
|
192
|
+
n.organizationContext ? (J(), B(Z(le), {
|
|
193
193
|
key: 0,
|
|
194
194
|
placeholder: Z(t).t("platform.workflow-config.organization-placeholder", "全部组织(可选指定组织)"),
|
|
195
195
|
value: r.value || void 0,
|
|
@@ -202,14 +202,14 @@ var it = De({
|
|
|
202
202
|
"value",
|
|
203
203
|
"context",
|
|
204
204
|
"disabled"
|
|
205
|
-
])) : (J(),
|
|
205
|
+
])) : (J(), B(Z(I), {
|
|
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
|
-
|
|
212
|
+
U("div", gt, [U("span", null, X(Z(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), G(Z(E), {
|
|
213
213
|
disabled: n.disabled || a.value,
|
|
214
214
|
value: i.value,
|
|
215
215
|
"onUpdate:value": s[1] ||= (e) => i.value = e,
|
|
@@ -224,28 +224,28 @@ var it = De({
|
|
|
224
224
|
"tools",
|
|
225
225
|
"placeholder"
|
|
226
226
|
])]),
|
|
227
|
-
|
|
227
|
+
U("div", _t, [G(Z(N), {
|
|
228
228
|
disabled: n.disabled,
|
|
229
229
|
checked: a.value,
|
|
230
230
|
"onUpdate:checked": s[2] ||= (e) => a.value = e
|
|
231
231
|
}, {
|
|
232
|
-
default: $(() => [
|
|
232
|
+
default: $(() => [W(X(Z(t).t("platform.screen.WorkflowConfigurationView.use-as-the-fallback-workflow-for-this", "作为当前组织范围的兜底流程")), 1)]),
|
|
233
233
|
_: 1
|
|
234
|
-
}, 8, ["disabled", "checked"]),
|
|
234
|
+
}, 8, ["disabled", "checked"]), U("small", vt, X(Z(t).t("platform.workflow-config.fallback-help", "同一组织范围内无普通流程命中时使用;兜底流程不判断匹配条件。")), 1)])
|
|
235
235
|
]));
|
|
236
236
|
}
|
|
237
|
-
}), [["__scopeId", "data-v-eecb79d1"]]),
|
|
237
|
+
}), [["__scopeId", "data-v-eecb79d1"]]), bt = {
|
|
238
238
|
key: 0,
|
|
239
239
|
class: "settings-help"
|
|
240
|
-
},
|
|
240
|
+
}, xt = { class: "workflow-field" }, St = {
|
|
241
241
|
key: 1,
|
|
242
242
|
class: "settings-wide workflow-approval-setting"
|
|
243
|
-
},
|
|
243
|
+
}, Ct = {
|
|
244
244
|
key: 2,
|
|
245
245
|
class: "workflow-field settings-wide"
|
|
246
|
-
},
|
|
246
|
+
}, wt = { class: "settings-help" }, Tt = ["open"], Et = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
247
247
|
__name: "WorkflowDefinitionSettings",
|
|
248
|
-
props: /*@__PURE__*/
|
|
248
|
+
props: /*@__PURE__*/ Be({
|
|
249
249
|
configuration: {},
|
|
250
250
|
creating: { type: Boolean },
|
|
251
251
|
busy: { type: Boolean },
|
|
@@ -270,7 +270,7 @@ var it = De({
|
|
|
270
270
|
},
|
|
271
271
|
fallbackModifiers: {}
|
|
272
272
|
}),
|
|
273
|
-
emits: /*@__PURE__*/
|
|
273
|
+
emits: /*@__PURE__*/ Be(["submit"], [
|
|
274
274
|
"update:title",
|
|
275
275
|
"update:approvalEnabled",
|
|
276
276
|
"update:actionCode",
|
|
@@ -279,16 +279,16 @@ var it = De({
|
|
|
279
279
|
"update:fallback"
|
|
280
280
|
]),
|
|
281
281
|
setup(e, { emit: t }) {
|
|
282
|
-
let { language: n, fields: r, organizationContext: i, conditionTools: a } = e.configuration, o = t, s =
|
|
283
|
-
return (t, p) => (J(),
|
|
282
|
+
let { language: n, fields: r, organizationContext: i, conditionTools: a } = e.configuration, o = t, s = nt(e, "title"), c = nt(e, "approvalEnabled"), l = nt(e, "actionCode"), u = nt(e, "organizationId"), d = nt(e, "matchExpression"), f = nt(e, "fallback");
|
|
283
|
+
return (t, p) => (J(), H("form", {
|
|
284
284
|
class: "property-form",
|
|
285
|
-
onSubmit: p[6] ||=
|
|
285
|
+
onSubmit: p[6] ||= it((e) => o("submit"), ["prevent"])
|
|
286
286
|
}, [
|
|
287
|
-
e.creating ? (J(),
|
|
288
|
-
|
|
289
|
-
default: $(() => [
|
|
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(Se), { required: "" }, {
|
|
289
|
+
default: $(() => [W(X(Z(n).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
|
|
290
290
|
_: 1
|
|
291
|
-
}),
|
|
291
|
+
}), G(Z(I), {
|
|
292
292
|
disabled: e.busy,
|
|
293
293
|
value: s.value,
|
|
294
294
|
"onUpdate:value": p[0] ||= (e) => s.value = e,
|
|
@@ -299,23 +299,23 @@ var it = De({
|
|
|
299
299
|
"value",
|
|
300
300
|
"aria-label"
|
|
301
301
|
])]),
|
|
302
|
-
e.creating ? (J(),
|
|
302
|
+
e.creating ? (J(), H("div", St, [G(Z(N), {
|
|
303
303
|
disabled: e.busy,
|
|
304
304
|
checked: c.value,
|
|
305
305
|
"onUpdate:checked": p[1] ||= (e) => c.value = e
|
|
306
306
|
}, {
|
|
307
|
-
default: $(() => [
|
|
307
|
+
default: $(() => [W(X(Z(n).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
|
|
308
308
|
_: 1
|
|
309
|
-
}, 8, ["disabled", "checked"]),
|
|
310
|
-
default: $(() => [
|
|
309
|
+
}, 8, ["disabled", "checked"]), G(Z(ae), { label: Z(n).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
|
|
310
|
+
default: $(() => [W(X(Z(n).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
|
|
311
311
|
_: 1
|
|
312
|
-
}, 8, ["label"])])) :
|
|
313
|
-
c.value ?
|
|
314
|
-
|
|
315
|
-
default: $(() => [
|
|
312
|
+
}, 8, ["label"])])) : V("v-if", !0),
|
|
313
|
+
c.value ? V("v-if", !0) : (J(), H("label", Ct, [
|
|
314
|
+
G(Z(Se), { required: "" }, {
|
|
315
|
+
default: $(() => [W(X(Z(n).t("platform.workflow-config.action-code", "模块动作编码")), 1)]),
|
|
316
316
|
_: 1
|
|
317
317
|
}),
|
|
318
|
-
|
|
318
|
+
G(Z(I), {
|
|
319
319
|
value: l.value,
|
|
320
320
|
"onUpdate:value": p[2] ||= (e) => l.value = e,
|
|
321
321
|
required: "",
|
|
@@ -328,12 +328,12 @@ var it = De({
|
|
|
328
328
|
"invalid",
|
|
329
329
|
"aria-label"
|
|
330
330
|
]),
|
|
331
|
-
|
|
331
|
+
U("span", wt, X(Z(n).t("platform.workflow-config.action-code-help", "用于流程启动动作,以小写字母开头,可含字母、数字、下划线,最多64位;发布后不能修改。")), 1)
|
|
332
332
|
])),
|
|
333
|
-
|
|
333
|
+
U("details", {
|
|
334
334
|
class: "settings-wide",
|
|
335
335
|
open: !e.creating
|
|
336
|
-
}, [
|
|
336
|
+
}, [U("summary", null, X(Z(n).t("platform.workflow-config.optional-matching", "适用范围与匹配规则(可选)")), 1), G(yt, {
|
|
337
337
|
"condition-tools": Z(a),
|
|
338
338
|
class: "optional-settings",
|
|
339
339
|
"organization-id": u.value,
|
|
@@ -353,117 +353,117 @@ var it = De({
|
|
|
353
353
|
"organization-context",
|
|
354
354
|
"fields",
|
|
355
355
|
"disabled"
|
|
356
|
-
])], 8,
|
|
356
|
+
])], 8, Tt)
|
|
357
357
|
], 32));
|
|
358
358
|
}
|
|
359
|
-
}), [["__scopeId", "data-v-c008d307"]]),
|
|
359
|
+
}), [["__scopeId", "data-v-c008d307"]]), Dt = { key: 0 }, Ot = { key: 1 }, kt = /* @__PURE__ */ q({
|
|
360
360
|
__name: "ModuleWorkflowDrawer",
|
|
361
361
|
props: { context: {} },
|
|
362
362
|
setup(e) {
|
|
363
|
-
let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a =
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}),
|
|
363
|
+
let n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = String(n.context.record?.title ?? r), a = Le(r), { client: o, context: l, language: u } = a, d = s(), p = Y([]), m = Y(), h = Y(!1), _ = Y(!1), v = Y(!1), y = Y(!1), x = Y(""), S = Y(!1), C = Y(), T = Y(""), E = Y(!0), D = Y(""), O = Y(""), ie = Y(""), ae = Y(!1), k = z(() => l.can?.("sort") === !0), A = z(() => !!T.value.trim() && (E.value || /^[a-z][A-Za-z0-9_]{0,63}$/.test(D.value.trim()))), N = !0;
|
|
364
|
+
Ke(() => {
|
|
365
|
+
N = !1;
|
|
366
|
+
}), fe(() => u.t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"), () => y.value, () => v.value), Q([
|
|
367
|
+
T,
|
|
367
368
|
E,
|
|
368
369
|
D,
|
|
369
370
|
O,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
j
|
|
371
|
+
ie,
|
|
372
|
+
ae
|
|
373
373
|
], () => {
|
|
374
|
-
h.value && (
|
|
374
|
+
h.value && (y.value = !0);
|
|
375
375
|
}, { flush: "sync" });
|
|
376
|
-
let
|
|
376
|
+
let F = z(() => u.t(_.value ? "platform.screen.WorkflowConfigurationView.new-workflow" : "platform.workflow-manager.edit", _.value ? "新建流程" : "流程设置")), oe = z(() => [{
|
|
377
377
|
key: "cancel",
|
|
378
378
|
label: u.t("platform.action.cancel", "取消"),
|
|
379
379
|
disabled: v.value,
|
|
380
|
-
run:
|
|
380
|
+
run: de
|
|
381
381
|
}, {
|
|
382
382
|
key: "save",
|
|
383
383
|
label: u.t(_.value ? "platform.screen.WorkflowConfigurationView.create-workflow-draft" : "platform.action.save", _.value ? "创建流程草稿" : "保存"),
|
|
384
384
|
emphasis: "primary",
|
|
385
|
-
disabled: v.value || !
|
|
385
|
+
disabled: v.value || !A.value,
|
|
386
386
|
loading: v.value,
|
|
387
387
|
run: pe
|
|
388
388
|
}]);
|
|
389
389
|
n.context.setSubtitle(i), n.context.setOperation(void 0), Q(v, () => n.context.setCloseBlocked(v.value), { immediate: !0 });
|
|
390
|
-
async function
|
|
390
|
+
async function se(e) {
|
|
391
391
|
if (!v.value) {
|
|
392
|
-
v.value = !0,
|
|
392
|
+
v.value = !0, C.value = void 0;
|
|
393
393
|
try {
|
|
394
394
|
await e();
|
|
395
395
|
} catch (e) {
|
|
396
|
-
|
|
396
|
+
N && (C.value = () => w(te(e), u));
|
|
397
397
|
} finally {
|
|
398
|
-
|
|
398
|
+
N && (v.value = !1);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
async function
|
|
403
|
-
h.value || v.value || await
|
|
402
|
+
async function ce() {
|
|
403
|
+
h.value || v.value || await se(async () => {
|
|
404
404
|
let e = await o.query();
|
|
405
|
-
|
|
405
|
+
N && (p.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
|
-
|
|
412
|
-
|
|
413
|
-
}),
|
|
414
|
-
|
|
411
|
+
qe(() => {
|
|
412
|
+
ce();
|
|
413
|
+
}), Ge(() => {
|
|
414
|
+
ce();
|
|
415
415
|
}), t({
|
|
416
416
|
moduleAlias: "platform.workflow.definition",
|
|
417
417
|
handler: async () => {
|
|
418
|
-
await
|
|
418
|
+
await ce();
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
function
|
|
422
|
-
v.value || h.value || (S.value = !1, m.value = e,
|
|
421
|
+
function le(e) {
|
|
422
|
+
v.value || h.value || (S.value = !1, m.value = e, T.value = e?.title ?? "", E.value = e?.approvalEnabled ?? !0, D.value = e?.actionCode ?? "", O.value = e?.organizationId ?? "", ie.value = e?.matchExpression ?? "", ae.value = e?.defaultDefinition ?? !1, _.value = !e, y.value = !1, h.value = !0);
|
|
423
423
|
}
|
|
424
|
-
async function
|
|
425
|
-
return v.value ||
|
|
424
|
+
async function ue() {
|
|
425
|
+
return v.value || y.value && !await f({
|
|
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 : (y.value = !1, !0);
|
|
430
430
|
}
|
|
431
|
-
n.context.setBeforeClose(
|
|
432
|
-
async function
|
|
433
|
-
await
|
|
431
|
+
n.context.setBeforeClose(ue);
|
|
432
|
+
async function de() {
|
|
433
|
+
await ue() && (h.value = !1, await ce());
|
|
434
434
|
}
|
|
435
435
|
async function pe() {
|
|
436
|
-
h.value &&
|
|
436
|
+
h.value && A.value && await se(async () => {
|
|
437
437
|
let e = {
|
|
438
|
-
title:
|
|
439
|
-
organizationId:
|
|
440
|
-
matchExpression:
|
|
441
|
-
defaultDefinition:
|
|
442
|
-
...
|
|
438
|
+
title: T.value.trim(),
|
|
439
|
+
organizationId: O.value || null,
|
|
440
|
+
matchExpression: ie.value || null,
|
|
441
|
+
defaultDefinition: ae.value,
|
|
442
|
+
...E.value ? {} : { actionCode: D.value.trim() }
|
|
443
443
|
}, t = _.value ? await o.create({
|
|
444
444
|
...e,
|
|
445
|
-
...
|
|
445
|
+
...E.value ? { approvalEnabled: !0 } : {
|
|
446
446
|
approvalEnabled: !1,
|
|
447
|
-
actionCode:
|
|
447
|
+
actionCode: D.value.trim()
|
|
448
448
|
},
|
|
449
449
|
enabled: !0
|
|
450
450
|
}) : await o.saveSelection(m.value.id, {
|
|
451
451
|
...e,
|
|
452
452
|
version: m.value.version
|
|
453
453
|
});
|
|
454
|
-
|
|
454
|
+
N && (p.value = _.value ? [...p.value, t] : p.value.map((e) => e.id === t.id ? t : e), m.value = t, h.value = !1, y.value = !1, x.value = "", n.context.refreshDetailExtensions(), await I([t]));
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
function me(e) {
|
|
458
458
|
if (!(v.value || h.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
|
});
|
|
464
464
|
return;
|
|
465
465
|
}
|
|
466
|
-
d.openPage(c(
|
|
466
|
+
d.openPage(c(dt, {
|
|
467
467
|
moduleAlias: r,
|
|
468
468
|
moduleTitle: i,
|
|
469
469
|
definitionId: e.id,
|
|
@@ -471,7 +471,7 @@ var it = De({
|
|
|
471
471
|
}));
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
let
|
|
474
|
+
let ge = z(() => [
|
|
475
475
|
{
|
|
476
476
|
key: "title",
|
|
477
477
|
title: u.t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称"),
|
|
@@ -497,85 +497,85 @@ var it = De({
|
|
|
497
497
|
title: u.t("platform.workflow-manager.active", "启用状态"),
|
|
498
498
|
width: 90
|
|
499
499
|
}
|
|
500
|
-
]),
|
|
500
|
+
]), _e = z(() => p.value.filter((e) => !x.value.trim() || [
|
|
501
501
|
e.title,
|
|
502
502
|
e.matchExpression,
|
|
503
|
-
|
|
503
|
+
he(e.definitionStatus, u)
|
|
504
504
|
].some((e) => String(e ?? "").toLocaleLowerCase().includes(x.value.trim().toLocaleLowerCase()))).map((e) => ({ ...e })));
|
|
505
505
|
function L(e) {
|
|
506
506
|
return e.definitionStatus === "published" || e.definitionStatus === "disabled" && e.currentVersionNo != null;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function be(e, t) {
|
|
509
509
|
return !v.value && !h.value && l.can?.(e, String(t.id)) === !0;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function xe(e) {
|
|
512
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
|
|
519
|
-
let n =
|
|
518
|
+
async function Se(e, t) {
|
|
519
|
+
let n = p.value.find((e) => e.id === t.id);
|
|
520
520
|
if (n && !(v.value || h.value)) {
|
|
521
521
|
if (e === "design") {
|
|
522
522
|
me(n);
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
525
|
if (e === "settings") {
|
|
526
|
-
if (!
|
|
527
|
-
|
|
526
|
+
if (!be("configureWorkflowSelection", n)) return;
|
|
527
|
+
le(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 f({
|
|
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 se(async () => {
|
|
535
535
|
let t = await o.changeStatus(n.id, e, n.version);
|
|
536
|
-
|
|
536
|
+
N && (p.value = p.value.map((e) => e.id === t.id ? t : e), await I([t]));
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
async function Ce(e) {
|
|
541
|
-
S.value &&
|
|
541
|
+
S.value && k.value && !v.value && !h.value && !x.value.trim() && e.dragRecord.id && e.dropRecord.id && await se(async () => {
|
|
542
542
|
await o.sort(String(e.dragRecord.id), String(e.dropRecord.id), e.position);
|
|
543
543
|
let t = await o.query();
|
|
544
|
-
|
|
544
|
+
N && (p.value = t, await I(t));
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
return (e, t) => (J(),
|
|
548
|
-
h.value ? (J(),
|
|
547
|
+
return (e, t) => (J(), H(R, null, [
|
|
548
|
+
h.value ? (J(), B(Z(g), {
|
|
549
549
|
key: 0,
|
|
550
550
|
open: h.value,
|
|
551
551
|
width: "standard",
|
|
552
|
-
title:
|
|
552
|
+
title: F.value,
|
|
553
553
|
subtitle: Z(i),
|
|
554
|
-
"before-close":
|
|
555
|
-
onClose:
|
|
554
|
+
"before-close": ue,
|
|
555
|
+
onClose: de
|
|
556
556
|
}, {
|
|
557
|
-
operation: $(() => [
|
|
558
|
-
default: $(() => [
|
|
557
|
+
operation: $(() => [G(Z(ve), { actions: oe.value }, null, 8, ["actions"])]),
|
|
558
|
+
default: $(() => [C.value ? (J(), B(Z(ee), {
|
|
559
559
|
key: 0,
|
|
560
|
-
message:
|
|
561
|
-
}, null, 8, ["message"])) :
|
|
560
|
+
message: C.value()
|
|
561
|
+
}, null, 8, ["message"])) : V("v-if", !0), G(Et, {
|
|
562
562
|
onSubmit: pe,
|
|
563
563
|
configuration: Z(a),
|
|
564
564
|
creating: _.value,
|
|
565
565
|
busy: v.value,
|
|
566
|
-
title:
|
|
567
|
-
"onUpdate:title": t[0] ||= (e) =>
|
|
568
|
-
"approval-enabled":
|
|
569
|
-
"onUpdate:approvalEnabled": t[1] ||= (e) =>
|
|
570
|
-
"action-code":
|
|
571
|
-
"onUpdate:actionCode": t[2] ||= (e) =>
|
|
566
|
+
title: T.value,
|
|
567
|
+
"onUpdate:title": t[0] ||= (e) => T.value = e,
|
|
568
|
+
"approval-enabled": E.value,
|
|
569
|
+
"onUpdate:approvalEnabled": t[1] ||= (e) => E.value = e,
|
|
570
|
+
"action-code": D.value,
|
|
571
|
+
"onUpdate:actionCode": t[2] ||= (e) => D.value = e,
|
|
572
572
|
"action-code-locked": !_.value && m.value?.currentVersionNo != null,
|
|
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) =>
|
|
573
|
+
"organization-id": O.value,
|
|
574
|
+
"onUpdate:organizationId": t[3] ||= (e) => O.value = e,
|
|
575
|
+
"match-expression": ie.value,
|
|
576
|
+
"onUpdate:matchExpression": t[4] ||= (e) => ie.value = e,
|
|
577
|
+
fallback: ae.value,
|
|
578
|
+
"onUpdate:fallback": t[5] ||= (e) => ae.value = e
|
|
579
579
|
}, null, 8, [
|
|
580
580
|
"configuration",
|
|
581
581
|
"creating",
|
|
@@ -593,35 +593,35 @@ var it = De({
|
|
|
593
593
|
"open",
|
|
594
594
|
"title",
|
|
595
595
|
"subtitle"
|
|
596
|
-
])) :
|
|
597
|
-
|
|
596
|
+
])) : V("v-if", !0),
|
|
597
|
+
C.value && !h.value ? (J(), B(Z(ee), {
|
|
598
598
|
key: 1,
|
|
599
|
-
message:
|
|
600
|
-
}, null, 8, ["message"])) :
|
|
601
|
-
|
|
599
|
+
message: C.value()
|
|
600
|
+
}, null, 8, ["message"])) : V("v-if", !0),
|
|
601
|
+
G(Z(b), {
|
|
602
602
|
embedded: "",
|
|
603
603
|
title: Z(u).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
|
|
604
604
|
"title-action-disabled": v.value || h.value,
|
|
605
605
|
"title-action-icon": "reload",
|
|
606
606
|
"title-action-title": Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载"),
|
|
607
607
|
"fill-height": !1,
|
|
608
|
-
columns:
|
|
609
|
-
rows:
|
|
608
|
+
columns: ge.value,
|
|
609
|
+
rows: _e.value,
|
|
610
610
|
loading: v.value,
|
|
611
|
-
"table-visible": h.value || !
|
|
611
|
+
"table-visible": h.value || !C.value || p.value.length > 0,
|
|
612
612
|
"empty-description": Z(u).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
|
|
613
613
|
"quick-search-visible": !0,
|
|
614
614
|
"quick-search-value": x.value,
|
|
615
615
|
"quick-search-disabled": v.value || h.value,
|
|
616
|
-
"row-draggable": S.value && !v.value && !h.value &&
|
|
616
|
+
"row-draggable": S.value && !v.value && !h.value && k.value && !x.value.trim(),
|
|
617
617
|
"row-drag-handle-title": Z(u).t("platform.workflow-config.reorder", "调整流程顺序:越靠上越优先"),
|
|
618
618
|
"show-action-column": !0,
|
|
619
619
|
"action-column-width": 170,
|
|
620
620
|
"onUpdate:quickSearchValue": t[9] ||= (e) => x.value = e,
|
|
621
|
-
onTitleAction:
|
|
622
|
-
onRowDrop:
|
|
621
|
+
onTitleAction: ce,
|
|
622
|
+
onRowDrop: xe
|
|
623
623
|
}, {
|
|
624
|
-
operations: $(() => [
|
|
624
|
+
operations: $(() => [k.value ? (J(), B(Z(ne), {
|
|
625
625
|
key: 0,
|
|
626
626
|
"icon-name": "swap-vertical",
|
|
627
627
|
"icon-only": "",
|
|
@@ -635,20 +635,20 @@ var it = De({
|
|
|
635
635
|
"selected",
|
|
636
636
|
"disabled",
|
|
637
637
|
"title"
|
|
638
|
-
])) :
|
|
638
|
+
])) : V("v-if", !0), G(Z(we), {
|
|
639
639
|
"icon-name": "plus",
|
|
640
640
|
title: Z(u).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
|
|
641
641
|
disabled: v.value || h.value || Z(l).can?.("create") !== !0,
|
|
642
|
-
onClick: t[7] ||= (e) =>
|
|
642
|
+
onClick: t[7] ||= (e) => le()
|
|
643
643
|
}, null, 8, ["title", "disabled"])]),
|
|
644
|
-
beforeTable: $(() => [
|
|
644
|
+
beforeTable: $(() => [C.value && !h.value ? (J(), B(Z(P), {
|
|
645
645
|
key: 0,
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: ce
|
|
647
647
|
}, {
|
|
648
|
-
default: $(() => [
|
|
648
|
+
default: $(() => [W(X(Z(u).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
|
|
649
649
|
_: 1
|
|
650
|
-
})) :
|
|
651
|
-
cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(),
|
|
650
|
+
})) : V("v-if", !0)]),
|
|
651
|
+
cell: $(({ column: e, record: n, value: r }) => [e.key === "definitionStatus" ? (J(), H("span", Dt, X(Z(he)(String(r ?? ""), Z(u))), 1)) : e.key === "currentVersionNo" ? (J(), H("span", Ot, X(r == null ? "—" : `v${r}`), 1)) : e.key === "matchExpression" ? (J(), B(Z(ye), {
|
|
652
652
|
key: 2,
|
|
653
653
|
column: {
|
|
654
654
|
...e,
|
|
@@ -659,15 +659,15 @@ var it = De({
|
|
|
659
659
|
...n,
|
|
660
660
|
matchExpression: n.defaultDefinition ? Z(u).t("platform.workflow-manager.fallback", "兜底流程") : r || Z(u).t("platform.workflow-manager.all-records", "全部记录")
|
|
661
661
|
}
|
|
662
|
-
}, null, 8, ["column", "record"])) : e.key === "active" ? (J(),
|
|
662
|
+
}, null, 8, ["column", "record"])) : e.key === "active" ? (J(), B(Z(j), {
|
|
663
663
|
key: 3,
|
|
664
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: $(() => [
|
|
666
|
+
default: $(() => [U("span", { onClick: t[8] ||= it(() => {}, ["stop"]) }, [G(Z(re), {
|
|
667
667
|
"aria-label": Z(u).t("platform.workflow-manager.active", "启用状态") + ":" + n.title,
|
|
668
668
|
checked: n.definitionStatus === "published" && n.enabled !== !1,
|
|
669
|
-
disabled: !L(n) || !
|
|
670
|
-
onChange: (e) =>
|
|
669
|
+
disabled: !L(n) || !be(n.definitionStatus === "published" ? "disableWorkflowDefinition" : "enableWorkflowDefinition", n),
|
|
670
|
+
onChange: (e) => Se(e ? "enable" : "disable", n)
|
|
671
671
|
}, null, 8, [
|
|
672
672
|
"aria-label",
|
|
673
673
|
"checked",
|
|
@@ -675,7 +675,7 @@ var it = De({
|
|
|
675
675
|
"onChange"
|
|
676
676
|
])])]),
|
|
677
677
|
_: 2
|
|
678
|
-
}, 1032, ["title"])) : (J(),
|
|
678
|
+
}, 1032, ["title"])) : (J(), B(Z(ye), {
|
|
679
679
|
key: 4,
|
|
680
680
|
column: {
|
|
681
681
|
...e,
|
|
@@ -685,32 +685,32 @@ var it = De({
|
|
|
685
685
|
record: n
|
|
686
686
|
}, null, 8, ["column", "record"]))]),
|
|
687
687
|
rowActions: $(({ record: e }) => [
|
|
688
|
-
|
|
688
|
+
G(Z(P), {
|
|
689
689
|
type: "link",
|
|
690
690
|
size: "small",
|
|
691
691
|
disabled: v.value || h.value,
|
|
692
|
-
onClick: (t) =>
|
|
692
|
+
onClick: (t) => Se("design", e)
|
|
693
693
|
}, {
|
|
694
|
-
default: $(() => [
|
|
694
|
+
default: $(() => [W(X(Z(u).t("platform.workflow-manager.design", "编排")), 1)]),
|
|
695
695
|
_: 1
|
|
696
696
|
}, 8, ["disabled", "onClick"]),
|
|
697
|
-
|
|
697
|
+
G(Z(P), {
|
|
698
698
|
type: "link",
|
|
699
699
|
size: "small",
|
|
700
|
-
disabled: !
|
|
701
|
-
onClick: (t) =>
|
|
700
|
+
disabled: !be("configureWorkflowSelection", e),
|
|
701
|
+
onClick: (t) => Se("settings", e)
|
|
702
702
|
}, {
|
|
703
|
-
default: $(() => [
|
|
703
|
+
default: $(() => [W(X(Z(u).t("platform.workflow-manager.settings", "设置")), 1)]),
|
|
704
704
|
_: 1
|
|
705
705
|
}, 8, ["disabled", "onClick"]),
|
|
706
|
-
|
|
706
|
+
G(Z(P), {
|
|
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) => Se("archive", e)
|
|
712
712
|
}, {
|
|
713
|
-
default: $(() => [
|
|
713
|
+
default: $(() => [W(X(Z(u).t("platform.screen.WorkflowConfigurationView.archive", "归档")), 1)]),
|
|
714
714
|
_: 1
|
|
715
715
|
}, 8, ["disabled", "onClick"])
|
|
716
716
|
]),
|
|
@@ -731,17 +731,17 @@ var it = De({
|
|
|
731
731
|
])
|
|
732
732
|
], 64));
|
|
733
733
|
}
|
|
734
|
-
}),
|
|
734
|
+
}), At = { class: "module-menu-entries" }, jt = { key: 0 }, Mt = {
|
|
735
735
|
key: 1,
|
|
736
736
|
role: "status"
|
|
737
|
-
},
|
|
737
|
+
}, Nt = { key: 2 }, Pt = { key: 0 }, Ft = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
738
738
|
__name: "ModuleMenuEntriesSection",
|
|
739
739
|
props: { context: {} },
|
|
740
740
|
setup(e) {
|
|
741
|
-
let t =
|
|
742
|
-
|
|
741
|
+
let t = A(), n = e, r = s(), i = Y([]), a = z(() => i.value.flatMap(({ scheme: e, tree: r }) => Fe(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
|
+
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 = Ne(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,33 +749,33 @@ var it = De({
|
|
|
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(Fe(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(),
|
|
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(P), {
|
|
760
760
|
type: "link",
|
|
761
761
|
onClick: f
|
|
762
762
|
}, {
|
|
763
|
-
default: $(() => [
|
|
763
|
+
default: $(() => [W(X(Z(t).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
764
764
|
_: 1
|
|
765
|
-
})])) : a.value.length ?
|
|
765
|
+
})])) : a.value.length ? V("v-if", !0) : (J(), H("span", Nt, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (J(!0), H(R, null, Xe(a.value, (e) => (J(), H("div", {
|
|
766
766
|
key: e.menu.id,
|
|
767
767
|
class: "menu-entry"
|
|
768
|
-
}, [
|
|
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(P), {
|
|
769
769
|
key: 0,
|
|
770
770
|
type: "link",
|
|
771
771
|
onClick: (t) => Z(r).openMenu(o.value.get(e.menu.id))
|
|
772
772
|
}, {
|
|
773
|
-
default: $(() => [
|
|
773
|
+
default: $(() => [U("span", null, X(Z(t).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
|
|
774
774
|
_: 1
|
|
775
|
-
}, 8, ["onClick"])) :
|
|
775
|
+
}, 8, ["onClick"])) : V("v-if", !0)]))), 128))]));
|
|
776
776
|
}
|
|
777
|
-
}), [["__scopeId", "data-v-d5fd13ca"]]),
|
|
778
|
-
function
|
|
777
|
+
}), [["__scopeId", "data-v-d5fd13ca"]]), It = /* @__PURE__ */ new WeakMap();
|
|
778
|
+
function Lt(e) {
|
|
779
779
|
let t = Y({}), n = /* @__PURE__ */ new Map();
|
|
780
780
|
async function r(r) {
|
|
781
781
|
let i = (n.get(r) ?? 0) + 1;
|
|
@@ -784,7 +784,7 @@ function It(e) {
|
|
|
784
784
|
configurable: !1
|
|
785
785
|
};
|
|
786
786
|
try {
|
|
787
|
-
let a = await
|
|
787
|
+
let a = await Oe(e.http, r);
|
|
788
788
|
n.get(r) === i && (t.value[r] = {
|
|
789
789
|
...a,
|
|
790
790
|
phase: "ready"
|
|
@@ -793,7 +793,7 @@ function It(e) {
|
|
|
793
793
|
n.get(r) === i && (t.value[r] = {
|
|
794
794
|
phase: "failed",
|
|
795
795
|
configurable: !1,
|
|
796
|
-
error:
|
|
796
|
+
error: w(te(e))
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
}
|
|
@@ -803,14 +803,14 @@ function It(e) {
|
|
|
803
803
|
dispose: () => n.clear()
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
|
-
function Lt(e) {
|
|
807
|
-
e = $e(e);
|
|
808
|
-
let t = Ft.get(e);
|
|
809
|
-
return t || (t = It(e), Ft.set(e, t)), t;
|
|
810
|
-
}
|
|
811
806
|
function Rt(e) {
|
|
812
|
-
e =
|
|
813
|
-
let t =
|
|
807
|
+
e = et(e);
|
|
808
|
+
let t = It.get(e);
|
|
809
|
+
return t || (t = Lt(e), It.set(e, t)), t;
|
|
810
|
+
}
|
|
811
|
+
function zt(e) {
|
|
812
|
+
e = et(e);
|
|
813
|
+
let t = Rt(e), r = n((e) => {
|
|
814
814
|
if (e.changes.some((e) => [
|
|
815
815
|
"platform.module",
|
|
816
816
|
"platform.metadata",
|
|
@@ -820,24 +820,24 @@ function Rt(e) {
|
|
|
820
820
|
].includes(e.moduleAlias))) for (let e of Object.keys(t.states.value)) t.refresh(e);
|
|
821
821
|
});
|
|
822
822
|
return () => {
|
|
823
|
-
r.unsubscribe(), t.dispose(),
|
|
823
|
+
r.unsubscribe(), t.dispose(), It.delete(e);
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
let n =
|
|
826
|
+
function Bt(e, t) {
|
|
827
|
+
let n = Rt(e).states.value[t];
|
|
828
828
|
return n?.phase === "ready" && n.configurable;
|
|
829
829
|
}
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region src/platform-admin-runtime/ModuleCodeConfigurationStatus.vue?vue&type=script&setup=true&lang.ts
|
|
832
|
-
var
|
|
832
|
+
var Vt = {
|
|
833
833
|
key: 0,
|
|
834
834
|
class: "module-code-status",
|
|
835
835
|
role: "status"
|
|
836
|
-
},
|
|
836
|
+
}, Ht = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
837
837
|
__name: "ModuleCodeConfigurationStatus",
|
|
838
838
|
props: { context: {} },
|
|
839
839
|
setup(e) {
|
|
840
|
-
let t = e, n =
|
|
840
|
+
let t = e, n = A(), r = s(), i = z(() => Rt(t.context.module)), a = z(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), o = z(() => i.value.states.value[a.value]);
|
|
841
841
|
Q([
|
|
842
842
|
a,
|
|
843
843
|
() => t.context.mode,
|
|
@@ -845,67 +845,67 @@ var Bt = {
|
|
|
845
845
|
], ([e, t]) => {
|
|
846
846
|
e && t === "view" && !i.value.states.value[e] && i.value.refresh(e);
|
|
847
847
|
}, { immediate: !0 });
|
|
848
|
-
let l =
|
|
848
|
+
let l = z(() => o.value?.reason), u = z(() => t.context.mode === "view" && !!a.value && (o.value?.phase === "failed" || t.context.record?.moduleKind === "dynamic" && o.value?.phase === "ready" && !o.value.configurable));
|
|
849
849
|
function d() {
|
|
850
|
-
r?.openPage(c(
|
|
850
|
+
r?.openPage(c(Ae, {
|
|
851
851
|
moduleAlias: a.value,
|
|
852
852
|
moduleTitle: String(t.context.record?.title ?? a.value),
|
|
853
853
|
governanceTab: "metadata"
|
|
854
854
|
}));
|
|
855
855
|
}
|
|
856
|
-
return (e, t) => u.value ? (J(),
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
856
|
+
return (e, t) => u.value ? (J(), H("div", Vt, [o.value?.phase === "failed" ? (J(), H(R, { key: 0 }, [
|
|
857
|
+
U("span", null, X(Z(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
|
|
858
|
+
U("span", null, X(o.value?.error), 1),
|
|
859
|
+
G(Z(P), {
|
|
860
860
|
type: "link",
|
|
861
861
|
onClick: t[0] ||= (e) => i.value.refresh(a.value)
|
|
862
862
|
}, {
|
|
863
|
-
default: $(() => [
|
|
863
|
+
default: $(() => [W(X(Z(n).t("platform.code.config.retry", "重试")), 1)]),
|
|
864
864
|
_: 1
|
|
865
865
|
})
|
|
866
|
-
], 64)) : (J(),
|
|
866
|
+
], 64)) : (J(), H(R, { 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(P), {
|
|
867
867
|
key: 0,
|
|
868
868
|
type: "link",
|
|
869
869
|
onClick: d
|
|
870
870
|
}, {
|
|
871
|
-
default: $(() => [
|
|
871
|
+
default: $(() => [W(X(Z(n).t("platform.code.config.configure-model", "配置模型")), 1)]),
|
|
872
872
|
_: 1
|
|
873
|
-
})) :
|
|
873
|
+
})) : V("v-if", !0)], 64))])) : V("v-if", !0);
|
|
874
874
|
}
|
|
875
|
-
}), [["__scopeId", "data-v-ab744e6f"]]),
|
|
875
|
+
}), [["__scopeId", "data-v-ab744e6f"]]), Ut = at, Wt = dt, Gt = ut, Kt = Ae, qt = {
|
|
876
876
|
id: "platform-module-workspace-actions",
|
|
877
877
|
target: { moduleAlias: "platform.module" },
|
|
878
|
-
activate: ({ module: e }) =>
|
|
878
|
+
activate: ({ module: e }) => zt(e),
|
|
879
879
|
card: { assistant: {
|
|
880
|
-
component:
|
|
880
|
+
component: Ht,
|
|
881
881
|
placement: {
|
|
882
882
|
boundary: "inside",
|
|
883
883
|
position: "bottom"
|
|
884
884
|
}
|
|
885
885
|
} },
|
|
886
886
|
workspaceViews: [
|
|
887
|
+
Kt,
|
|
887
888
|
Gt,
|
|
888
|
-
Wt
|
|
889
|
-
Ut
|
|
889
|
+
Wt
|
|
890
890
|
],
|
|
891
891
|
detail: {
|
|
892
892
|
sections: [{
|
|
893
893
|
key: "module-menu-entries",
|
|
894
894
|
title: "菜单入口",
|
|
895
895
|
titleKey: "platform.screen.moduleMenuWorkspace.menu-entry",
|
|
896
|
-
component:
|
|
896
|
+
component: Ft
|
|
897
897
|
}],
|
|
898
898
|
actions: [
|
|
899
899
|
{
|
|
900
900
|
key: "module-business-code",
|
|
901
901
|
title: "业务编码",
|
|
902
902
|
titleKey: "platform.code.config.title",
|
|
903
|
-
state: (e, t) => ({ visible: !!t && !!
|
|
903
|
+
state: (e, t) => ({ visible: !!t && !!Xt(e) && Bt(t.module, Xt(e)) }),
|
|
904
904
|
run({ record: e, module: t, openWorkspaceTab: n }) {
|
|
905
|
-
let r =
|
|
906
|
-
r &&
|
|
905
|
+
let r = Xt(e);
|
|
906
|
+
r && Bt(t, r) && n(Ut, {
|
|
907
907
|
moduleAlias: r,
|
|
908
|
-
moduleTitle:
|
|
908
|
+
moduleTitle: Zt(e)
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
911
|
},
|
|
@@ -913,14 +913,14 @@ var Bt = {
|
|
|
913
913
|
key: "module-workflow-workspace",
|
|
914
914
|
title: "审批流程",
|
|
915
915
|
titleKey: "platform.screen.WorkflowConfigurationView.approval-workflow",
|
|
916
|
-
state: (e) => ({ visible:
|
|
916
|
+
state: (e) => ({ visible: Xt(e) !== void 0 }),
|
|
917
917
|
run({ openDrawer: e }) {
|
|
918
918
|
e({
|
|
919
919
|
title: "审批流程",
|
|
920
920
|
titleKey: "platform.screen.WorkflowConfigurationView.approval-workflow",
|
|
921
921
|
width: "wide",
|
|
922
922
|
dismissal: "dismissible",
|
|
923
|
-
component:
|
|
923
|
+
component: kt
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
926
|
},
|
|
@@ -928,13 +928,13 @@ var Bt = {
|
|
|
928
928
|
key: "module-add-to-menu",
|
|
929
929
|
title: "添加到菜单",
|
|
930
930
|
titleKey: "platform.entry.add-to-menu",
|
|
931
|
-
state: (e) => ({ visible:
|
|
931
|
+
state: (e) => ({ visible: Xt(e) !== void 0 }),
|
|
932
932
|
run({ openDrawer: e }) {
|
|
933
933
|
e({
|
|
934
934
|
title: "添加到菜单",
|
|
935
935
|
titleKey: "platform.entry.add-to-menu",
|
|
936
936
|
width: "narrow",
|
|
937
|
-
component:
|
|
937
|
+
component: ft
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
940
|
},
|
|
@@ -942,13 +942,13 @@ var Bt = {
|
|
|
942
942
|
key: "module-actions-workspace",
|
|
943
943
|
title: "动作",
|
|
944
944
|
titleKey: "platform.governance.tab.actions",
|
|
945
|
-
state: (e) => ({ visible:
|
|
945
|
+
state: (e) => ({ visible: Xt(e) !== void 0 }),
|
|
946
946
|
run({ record: e, openWorkspaceTab: t }) {
|
|
947
|
-
let n =
|
|
948
|
-
n && t(
|
|
947
|
+
let n = Xt(e);
|
|
948
|
+
n && t(Gt, {
|
|
949
949
|
moduleAlias: n,
|
|
950
|
-
moduleTitle:
|
|
951
|
-
moduleKind:
|
|
950
|
+
moduleTitle: Zt(e),
|
|
951
|
+
moduleKind: Qt(e)
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
954
|
},
|
|
@@ -956,19 +956,19 @@ var Bt = {
|
|
|
956
956
|
key: "module-ui-orchestration-workspace",
|
|
957
957
|
title: "低代码",
|
|
958
958
|
titleKey: "platform.entry.low-code",
|
|
959
|
-
state: (e) => ({ visible:
|
|
959
|
+
state: (e) => ({ visible: Xt(e) !== void 0 && Qt(e) === "dynamic" }),
|
|
960
960
|
run({ record: e, openWorkspaceTab: t }) {
|
|
961
|
-
let n =
|
|
962
|
-
n &&
|
|
961
|
+
let n = Xt(e);
|
|
962
|
+
n && Qt(e) === "dynamic" && t(Kt, {
|
|
963
963
|
moduleAlias: n,
|
|
964
|
-
moduleTitle:
|
|
964
|
+
moduleTitle: Zt(e),
|
|
965
965
|
governanceTab: "overview"
|
|
966
966
|
});
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
]
|
|
970
970
|
}
|
|
971
|
-
},
|
|
971
|
+
}, Jt = {
|
|
972
972
|
id: "dictionary-category-tree-parent-policy",
|
|
973
973
|
target: { moduleAlias: "platform.dictionary_category" },
|
|
974
974
|
navigator: { treeParentPolicy: {
|
|
@@ -976,7 +976,7 @@ var Bt = {
|
|
|
976
976
|
rejectionMessage: "字典类目只能挂在目录下",
|
|
977
977
|
rejectionMessageKey: "platform.entry.dictionary-categories-must-belong-to-a-folder"
|
|
978
978
|
} }
|
|
979
|
-
},
|
|
979
|
+
}, Yt = {
|
|
980
980
|
id: "platform-module-action-entry-scope",
|
|
981
981
|
target: { moduleAlias: "platform.module_action" },
|
|
982
982
|
navigator: {
|
|
@@ -989,35 +989,35 @@ var Bt = {
|
|
|
989
989
|
},
|
|
990
990
|
standardActions: { disabled: ["create"] }
|
|
991
991
|
};
|
|
992
|
-
function Yt(e) {
|
|
993
|
-
return Qt(e, "alias") ?? Qt(e, "id");
|
|
994
|
-
}
|
|
995
992
|
function Xt(e) {
|
|
996
|
-
return
|
|
993
|
+
return $t(e, "alias") ?? $t(e, "id");
|
|
997
994
|
}
|
|
998
995
|
function Zt(e) {
|
|
999
|
-
|
|
996
|
+
return $t(e, "title");
|
|
997
|
+
}
|
|
998
|
+
function Qt(e) {
|
|
999
|
+
let t = $t(e, "moduleKind");
|
|
1000
1000
|
return t === "static" || t === "dynamic" ? t : void 0;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function $t(e, t) {
|
|
1003
1003
|
let n = e[t];
|
|
1004
1004
|
return typeof n == "string" && n.trim() ? n : void 0;
|
|
1005
1005
|
}
|
|
1006
1006
|
//#endregion
|
|
1007
1007
|
//#region src/views/PasswordPolicyPreview.vue?vue&type=script&setup=true&lang.ts
|
|
1008
|
-
var
|
|
1008
|
+
var en = { class: "password-policy-preview" }, tn = {
|
|
1009
1009
|
key: 0,
|
|
1010
1010
|
class: "preview-results"
|
|
1011
|
-
},
|
|
1011
|
+
}, nn = {
|
|
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__ */ L(/* @__PURE__ */ q({
|
|
1016
1016
|
name: "PasswordPolicyPreview",
|
|
1017
1017
|
__name: "PasswordPolicyPreview",
|
|
1018
1018
|
props: { context: {} },
|
|
1019
1019
|
setup(e) {
|
|
1020
|
-
let t =
|
|
1020
|
+
let t = A(), n = e, r = Y("CURRENT"), i = Y(""), a = Y(), o = Y(!1), s = Y(!1), c = 0, l = z(() => y(n.context.record)), u = z(() => n.context.mode !== "view" || w(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
|
|
@@ -1048,22 +1048,22 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1048
1048
|
e === c && (s.value = !1);
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
let h =
|
|
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(te), n = w(e?.id);
|
|
1056
1056
|
if (n) {
|
|
1057
|
-
let e = t.findIndex((e) =>
|
|
1057
|
+
let e = t.findIndex((e) => w(e.id) === n);
|
|
1058
1058
|
e >= 0 && t.splice(e, 1);
|
|
1059
1059
|
}
|
|
1060
|
-
return e &&
|
|
1061
|
-
}), g =
|
|
1060
|
+
return e && te(e) && t.push(e), t.length > 0 ? t.sort(ee) : [];
|
|
1061
|
+
}), g = z(() => i.value ? h.value.map((e, t) => b(e, i.value, t)) : []), _ = z(() => g.value.map((e) => ({
|
|
1062
1062
|
...e,
|
|
1063
|
-
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) :
|
|
1064
|
-
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) :
|
|
1063
|
+
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : S(e.title, e.titleText, t),
|
|
1064
|
+
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : S(e.message, e.messageText, t),
|
|
1065
1065
|
diagnostic: e.diagnostic ? t.t(e.diagnostic.sourceId, e.diagnostic.originalText) : void 0
|
|
1066
|
-
}))), v =
|
|
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", "无法加载权威规则集");
|
|
@@ -1078,26 +1078,26 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1078
1078
|
function y(e) {
|
|
1079
1079
|
if (e) return e;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
let r = e.title?.trim() ? void 0 :
|
|
1083
|
-
titleText:
|
|
1084
|
-
messageText:
|
|
1081
|
+
function b(e, t, n) {
|
|
1082
|
+
let r = e.title?.trim() ? void 0 : be("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : be("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = T(e.title, r?.originalText ?? ""), o = T(e.message, i?.originalText ?? ""), s = {
|
|
1083
|
+
titleText: x(e, "title"),
|
|
1084
|
+
messageText: x(e, "message")
|
|
1085
1085
|
}, c = e.pattern;
|
|
1086
1086
|
if (!c?.trim()) return {
|
|
1087
1087
|
...s,
|
|
1088
|
-
key:
|
|
1088
|
+
key: C(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: be("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: C(e, n),
|
|
1101
1101
|
title: a,
|
|
1102
1102
|
message: o,
|
|
1103
1103
|
titleSource: r,
|
|
@@ -1107,41 +1107,41 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1107
1107
|
} catch {
|
|
1108
1108
|
return {
|
|
1109
1109
|
...s,
|
|
1110
|
-
key:
|
|
1110
|
+
key: C(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: be("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) ||
|
|
1120
|
+
function ee(e, t) {
|
|
1121
|
+
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || T(e.title, "").localeCompare(T(t.title, ""));
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1123
|
+
function C(e, t) {
|
|
1124
|
+
return w(e.id) ?? `draft:${t}`;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function w(e) {
|
|
1127
1127
|
return e?.trim() || void 0;
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function T(e, t) {
|
|
1130
1130
|
return e?.trim() || t;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function te(e) {
|
|
1133
1133
|
return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
|
|
1134
1134
|
}
|
|
1135
|
-
return (e, n) => (J(),
|
|
1136
|
-
|
|
1137
|
-
|
|
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: g.value.some((e) => !e.passed) }) }, X(v.value), 3)]),
|
|
1137
|
+
G(Z(d), {
|
|
1138
1138
|
class: "preview-scope",
|
|
1139
1139
|
value: r.value,
|
|
1140
1140
|
options: f.value,
|
|
1141
1141
|
size: "small",
|
|
1142
1142
|
"onUpdate:value": p
|
|
1143
1143
|
}, null, 8, ["value", "options"]),
|
|
1144
|
-
|
|
1144
|
+
G(Z(I), {
|
|
1145
1145
|
value: i.value,
|
|
1146
1146
|
"onUpdate:value": n[0] ||= (e) => i.value = e,
|
|
1147
1147
|
type: "text",
|
|
@@ -1153,13 +1153,13 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1153
1153
|
"placeholder",
|
|
1154
1154
|
"aria-label"
|
|
1155
1155
|
]),
|
|
1156
|
-
g.value.length ? (J(),
|
|
1156
|
+
g.value.length ? (J(), H("ul", tn, [(J(!0), H(R, null, Xe(_.value, (e) => (J(), H("li", {
|
|
1157
1157
|
key: e.key,
|
|
1158
|
-
class:
|
|
1158
|
+
class: Ue({
|
|
1159
1159
|
passed: e.passed,
|
|
1160
1160
|
failed: !e.passed
|
|
1161
1161
|
})
|
|
1162
|
-
}, [
|
|
1162
|
+
}, [U("strong", null, X(e.title), 1), U("span", null, X(e.diagnostic ?? (e.passed ? Z(t).t("platform.workflow-record.check-passed", "通过") : e.message)), 1)], 2))), 128))])) : V("v-if", !0)
|
|
1163
1163
|
]));
|
|
1164
1164
|
}
|
|
1165
1165
|
}), [["__scopeId", "data-v-235173d0"]]),
|
|
@@ -1168,15 +1168,15 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1168
1168
|
position: "bottom"
|
|
1169
1169
|
}
|
|
1170
1170
|
} }
|
|
1171
|
-
},
|
|
1171
|
+
}, rn = { class: "tenant-applications-detail" }, an = { class: "tenant-applications-summary" }, on = {
|
|
1172
1172
|
key: 0,
|
|
1173
1173
|
class: "tenant-applications-status"
|
|
1174
|
-
},
|
|
1174
|
+
}, sn = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
1175
1175
|
name: "TenantApplicationsDetailSection",
|
|
1176
1176
|
__name: "TenantApplicationsDetailSection",
|
|
1177
1177
|
props: { context: {} },
|
|
1178
1178
|
setup(e) {
|
|
1179
|
-
let t =
|
|
1179
|
+
let t = A(), n = e, r = Y([]), i = Y(!1), a = 0, o = Y(/* @__PURE__ */ new Map()), s = z(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
|
|
1180
1180
|
key: e,
|
|
1181
1181
|
label: o.value.get(e) ? `${o.value.get(e)} · ${e}` : e
|
|
1182
1182
|
})));
|
|
@@ -1206,7 +1206,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1206
1206
|
})]);
|
|
1207
1207
|
s === a && (o.value = new Map(t.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), r.value = i.records);
|
|
1208
1208
|
} catch (e) {
|
|
1209
|
-
s === a &&
|
|
1209
|
+
s === a && M(e, {
|
|
1210
1210
|
language: t,
|
|
1211
1211
|
source: "tenant-applications-detail",
|
|
1212
1212
|
phase: "load"
|
|
@@ -1218,19 +1218,19 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1218
1218
|
function l(e, t) {
|
|
1219
1219
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
1220
1220
|
}
|
|
1221
|
-
return (e, n) => (J(),
|
|
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"]]),
|
|
1228
|
+
}), [["__scopeId", "data-v-49a973de"]]), cn = { class: "tenant-application-configuration" }, ln = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
1229
1229
|
name: "TenantApplicationConfigurationDrawer",
|
|
1230
1230
|
__name: "TenantApplicationConfigurationDrawer",
|
|
1231
1231
|
props: { context: {} },
|
|
1232
1232
|
setup(e) {
|
|
1233
|
-
let t =
|
|
1233
|
+
let t = A(), 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
|
|
@@ -1238,7 +1238,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1238
1238
|
key: "alias",
|
|
1239
1239
|
title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-alias", "应用 alias"),
|
|
1240
1240
|
width: 220
|
|
1241
|
-
}]), c =
|
|
1241
|
+
}]), c = z(() => r.value), l = z(() => ({
|
|
1242
1242
|
selectedRowKeys: [...i.value],
|
|
1243
1243
|
preserveSelectedRowKeys: !0,
|
|
1244
1244
|
disabledOf: (e) => o.value || e.alias === "iam",
|
|
@@ -1263,7 +1263,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1263
1263
|
run: f
|
|
1264
1264
|
}]);
|
|
1265
1265
|
}
|
|
1266
|
-
|
|
1266
|
+
qe(() => {
|
|
1267
1267
|
u(), d();
|
|
1268
1268
|
}), Q([o, t.revision], u);
|
|
1269
1269
|
async function d() {
|
|
@@ -1290,7 +1290,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1290
1290
|
let o = new Set(r.value.map((e) => e.alias).filter(Boolean));
|
|
1291
1291
|
i.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
|
|
1292
1292
|
} catch (e) {
|
|
1293
|
-
|
|
1293
|
+
M(e, {
|
|
1294
1294
|
language: t,
|
|
1295
1295
|
source: "tenant-application-configuration",
|
|
1296
1296
|
phase: "load"
|
|
@@ -1311,7 +1311,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1311
1311
|
body: { applicationAliases: [...i.value] }
|
|
1312
1312
|
}), n.context.refreshDetailExtensions(), n.context.refreshList(), n.context.close();
|
|
1313
1313
|
} catch (e) {
|
|
1314
|
-
|
|
1314
|
+
M(e, {
|
|
1315
1315
|
language: t,
|
|
1316
1316
|
source: "tenant-application-configuration",
|
|
1317
1317
|
phase: "action"
|
|
@@ -1324,7 +1324,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1324
1324
|
function p(e, t) {
|
|
1325
1325
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
1326
1326
|
}
|
|
1327
|
-
return (e, n) => (J(),
|
|
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(T), {
|
|
1328
1328
|
columns: s.value,
|
|
1329
1329
|
rows: c.value,
|
|
1330
1330
|
loading: a.value,
|
|
@@ -1341,7 +1341,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1341
1341
|
"empty-description"
|
|
1342
1342
|
])]));
|
|
1343
1343
|
}
|
|
1344
|
-
}), [["__scopeId", "data-v-12c39b69"]]),
|
|
1344
|
+
}), [["__scopeId", "data-v-12c39b69"]]), un = {
|
|
1345
1345
|
id: "iam-tenant-standard-page-enhancement",
|
|
1346
1346
|
target: { moduleAlias: "iam.tenant" },
|
|
1347
1347
|
form: {
|
|
@@ -1357,8 +1357,8 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1357
1357
|
},
|
|
1358
1358
|
...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
|
|
1359
1359
|
fieldName: e,
|
|
1360
|
-
imageUploadHint: ({ draft: e }, t =
|
|
1361
|
-
imageUploadAdvisory: ({ draft: e }, t =
|
|
1360
|
+
imageUploadHint: ({ draft: e }, t = v) => 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 = v) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => dn(e, t)
|
|
1362
1362
|
}))
|
|
1363
1363
|
]
|
|
1364
1364
|
},
|
|
@@ -1373,7 +1373,7 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1373
1373
|
title: "配置应用",
|
|
1374
1374
|
titleKey: "platform.entry.configure-applications",
|
|
1375
1375
|
width: "wide",
|
|
1376
|
-
component:
|
|
1376
|
+
component: ln
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
1379
|
}],
|
|
@@ -1381,14 +1381,14 @@ var $t = { class: "password-policy-preview" }, en = {
|
|
|
1381
1381
|
key: "tenant-applications",
|
|
1382
1382
|
title: "已开通应用",
|
|
1383
1383
|
titleKey: "platform.entry.provisioned-applications",
|
|
1384
|
-
component:
|
|
1384
|
+
component: sn
|
|
1385
1385
|
}]
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
async function
|
|
1388
|
+
async function dn(e, t) {
|
|
1389
1389
|
if (!e.type.startsWith("image/") || typeof Image > "u") return t.t("platform.entry.logo-and-title-mode-requires-a-readable-square-image", "Logo + 标题模式需要可读取的正方形图片。");
|
|
1390
1390
|
try {
|
|
1391
|
-
let { width: n, height: r } = await
|
|
1391
|
+
let { width: n, height: r } = await fn(e), i = n / r;
|
|
1392
1392
|
return i >= .9 && i <= 1.1 ? void 0 : t.t("platform.entry.value-is-value-value-px-logo-and-title-mode-only-supports-square-logos", "“{value1}”为 {value2} × {value3} px;Logo + 标题模式仅允许上传正方形 Logo。", {
|
|
1393
1393
|
value1: e.name,
|
|
1394
1394
|
value2: n,
|
|
@@ -1398,7 +1398,7 @@ async function un(e, t) {
|
|
|
1398
1398
|
return t.t("platform.entry.unable-to-read-image-dimensions-select-a-square-png-jpg-or-gif-image", "无法读取图片尺寸,请选择正方形 PNG、JPG 或 GIF 图片。");
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function fn(e) {
|
|
1402
1402
|
let t = URL.createObjectURL(e);
|
|
1403
1403
|
return new Promise((e, n) => {
|
|
1404
1404
|
let r = new Image();
|
|
@@ -1414,16 +1414,16 @@ function dn(e) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
//#endregion
|
|
1416
1416
|
//#region src/platform-admin-runtime/employee/EmployeeAccountDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
1417
|
-
var
|
|
1417
|
+
var pn = {
|
|
1418
1418
|
key: 1,
|
|
1419
1419
|
class: "employee-account-drawer"
|
|
1420
|
-
},
|
|
1420
|
+
}, mn = { class: "employee-account-existing-picker" }, hn = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
1421
1421
|
name: "EmployeeAccountDrawer",
|
|
1422
1422
|
__name: "EmployeeAccountDrawer",
|
|
1423
1423
|
props: { context: {} },
|
|
1424
1424
|
setup(e) {
|
|
1425
|
-
let t =
|
|
1426
|
-
|
|
1425
|
+
let t = A(), n = e, r = Y(), i = Y(), a = Y(""), o = Y(""), s = Y(!1), c = Y(!1);
|
|
1426
|
+
qe(() => void l());
|
|
1427
1427
|
async function l() {
|
|
1428
1428
|
let e = v();
|
|
1429
1429
|
if (e) {
|
|
@@ -1431,7 +1431,7 @@ var fn = {
|
|
|
1431
1431
|
try {
|
|
1432
1432
|
r.value = await n.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
|
|
1433
1433
|
} catch (e) {
|
|
1434
|
-
|
|
1434
|
+
M(e, {
|
|
1435
1435
|
language: t,
|
|
1436
1436
|
source: "employee-account",
|
|
1437
1437
|
phase: "load"
|
|
@@ -1446,7 +1446,7 @@ var fn = {
|
|
|
1446
1446
|
if (!e || c.value) return;
|
|
1447
1447
|
let i = a.value.trim();
|
|
1448
1448
|
if (!i || !o.value) {
|
|
1449
|
-
|
|
1449
|
+
Te(t.t("platform.screen.EmployeeAccountDrawer.enter-an-account-and-initial-password", "请输入账号和初始密码。"), {
|
|
1450
1450
|
language: t,
|
|
1451
1451
|
source: "employee-account",
|
|
1452
1452
|
phase: "validation"
|
|
@@ -1463,9 +1463,9 @@ var fn = {
|
|
|
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"
|
|
@@ -1476,9 +1476,9 @@ var fn = {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
async function d(e) {
|
|
1478
1478
|
let t = e[0];
|
|
1479
|
-
t && await
|
|
1479
|
+
t && await p(t.id);
|
|
1480
1480
|
}
|
|
1481
|
-
async function
|
|
1481
|
+
async function p(e) {
|
|
1482
1482
|
let a = v();
|
|
1483
1483
|
if (a && e && !c.value) {
|
|
1484
1484
|
c.value = !0;
|
|
@@ -1487,13 +1487,13 @@ var fn = {
|
|
|
1487
1487
|
method: "POST",
|
|
1488
1488
|
path: `/iam.employee/${encodeURIComponent(a)}/account`,
|
|
1489
1489
|
body: { userId: e }
|
|
1490
|
-
}), i.value = void 0, n.context.refreshList(),
|
|
1490
|
+
}), i.value = void 0, n.context.refreshList(), Te(t.t("platform.screen.EmployeeAccountDrawer.the-account-is-bound-to-this-employee", "账号已绑定到当前职员。"), {
|
|
1491
1491
|
language: t,
|
|
1492
1492
|
source: "employee-account",
|
|
1493
1493
|
phase: "action"
|
|
1494
1494
|
});
|
|
1495
1495
|
} catch (e) {
|
|
1496
|
-
|
|
1496
|
+
M(e, {
|
|
1497
1497
|
language: t,
|
|
1498
1498
|
source: "employee-account",
|
|
1499
1499
|
phase: "action"
|
|
@@ -1553,7 +1553,7 @@ var fn = {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
async function _() {
|
|
1555
1555
|
let e = v();
|
|
1556
|
-
if (e && r.value && !c.value && await
|
|
1556
|
+
if (e && r.value && !c.value && await f({
|
|
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 fn = {
|
|
|
1566
1566
|
path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
|
|
1567
1567
|
}), r.value = void 0, n.context.refreshList();
|
|
1568
1568
|
} catch (e) {
|
|
1569
|
-
|
|
1569
|
+
M(e, {
|
|
1570
1570
|
language: t,
|
|
1571
1571
|
source: "employee-account",
|
|
1572
1572
|
phase: "action"
|
|
@@ -1580,18 +1580,18 @@ var fn = {
|
|
|
1580
1580
|
let e = n.context.record?.id;
|
|
1581
1581
|
return e == null ? void 0 : String(e);
|
|
1582
1582
|
}
|
|
1583
|
-
return (e, n) => s.value ? (J(),
|
|
1583
|
+
return (e, n) => s.value ? (J(), B(Z(C), {
|
|
1584
1584
|
key: 0,
|
|
1585
1585
|
tip: Z(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
|
|
1586
|
-
}, null, 8, ["tip"])) : (J(),
|
|
1586
|
+
}, null, 8, ["tip"])) : (J(), H("section", pn, [v() ? r.value ? (J(), H(R, { key: 1 }, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + X(r.value.userId ?? "-"), 1), G(Z(P), {
|
|
1587
1587
|
danger: "",
|
|
1588
1588
|
"icon-name": "delete",
|
|
1589
1589
|
loading: c.value,
|
|
1590
1590
|
onClick: _
|
|
1591
1591
|
}, {
|
|
1592
|
-
default: $(() => [
|
|
1592
|
+
default: $(() => [W(X(Z(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
|
|
1593
1593
|
_: 1
|
|
1594
|
-
}, 8, ["loading"])], 64)) : (J(),
|
|
1594
|
+
}, 8, ["loading"])], 64)) : (J(), H(R, { key: 2 }, [U("section", mn, [U("p", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), G(Z(pe), {
|
|
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", "搜索并选择已有登录账号"),
|
|
@@ -1605,9 +1605,9 @@ var fn = {
|
|
|
1605
1605
|
"disabled",
|
|
1606
1606
|
"placeholder",
|
|
1607
1607
|
"title"
|
|
1608
|
-
])]),
|
|
1609
|
-
|
|
1610
|
-
|
|
1608
|
+
])]), U("form", { onSubmit: it(u, ["prevent"]) }, [
|
|
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(I), {
|
|
1611
1611
|
value: a.value,
|
|
1612
1612
|
"onUpdate:value": n[1] ||= (e) => a.value = e,
|
|
1613
1613
|
disabled: c.value,
|
|
@@ -1617,7 +1617,7 @@ var fn = {
|
|
|
1617
1617
|
"disabled",
|
|
1618
1618
|
"placeholder"
|
|
1619
1619
|
])]),
|
|
1620
|
-
|
|
1620
|
+
U("label", null, [U("span", null, X(Z(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), G(Z(I), {
|
|
1621
1621
|
value: o.value,
|
|
1622
1622
|
"onUpdate:value": n[2] ||= (e) => o.value = e,
|
|
1623
1623
|
type: "password",
|
|
@@ -1628,22 +1628,22 @@ var fn = {
|
|
|
1628
1628
|
"disabled",
|
|
1629
1629
|
"placeholder"
|
|
1630
1630
|
])]),
|
|
1631
|
-
|
|
1631
|
+
G(Z(P), {
|
|
1632
1632
|
type: "primary",
|
|
1633
1633
|
"html-type": "submit",
|
|
1634
1634
|
"icon-name": "plus",
|
|
1635
1635
|
loading: c.value
|
|
1636
1636
|
}, {
|
|
1637
|
-
default: $(() => [
|
|
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(),
|
|
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", "请重新打开职员档案后再设置账号。")
|
|
1644
1644
|
}, null, 8, ["title", "message"]))]));
|
|
1645
1645
|
}
|
|
1646
|
-
}), [["__scopeId", "data-v-e343e658"]]),
|
|
1646
|
+
}), [["__scopeId", "data-v-e343e658"]]), gn = {
|
|
1647
1647
|
id: "iam-employee-account-drawer",
|
|
1648
1648
|
target: { moduleAlias: "iam.employee" },
|
|
1649
1649
|
detail: { actions: [{
|
|
@@ -1657,26 +1657,26 @@ var fn = {
|
|
|
1657
1657
|
title: "设置账号",
|
|
1658
1658
|
titleKey: "platform.entry.set-up-account",
|
|
1659
1659
|
width: "standard",
|
|
1660
|
-
component:
|
|
1660
|
+
component: hn
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
}] }
|
|
1664
|
-
},
|
|
1665
|
-
function
|
|
1666
|
-
let e =
|
|
1667
|
-
t || (t =
|
|
1664
|
+
}, _n = "iam.user.session.collectionChanged", vn = /* @__PURE__ */ new WeakMap();
|
|
1665
|
+
function yn() {
|
|
1666
|
+
let e = k(), t = vn.get(e);
|
|
1667
|
+
t || (t = bn(e), vn.set(e, t));
|
|
1668
1668
|
let n = t;
|
|
1669
|
-
return n.users += 1,
|
|
1670
|
-
--n.users === 0 && (n.dispose(),
|
|
1669
|
+
return n.users += 1, Je(() => {
|
|
1670
|
+
--n.users === 0 && (n.dispose(), vn.delete(e));
|
|
1671
1671
|
}), {
|
|
1672
1672
|
observe: n.observe,
|
|
1673
1673
|
statusOf: n.statusOf,
|
|
1674
1674
|
refresh: n.refresh
|
|
1675
1675
|
};
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function bn(e) {
|
|
1678
1678
|
let t = Y({}), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, o = !1, s = a((e) => {
|
|
1679
|
-
|
|
1679
|
+
xn(e) && n.has(e.recordId) && u(e.recordId);
|
|
1680
1680
|
});
|
|
1681
1681
|
function c(e) {
|
|
1682
1682
|
e && !o && (n.add(e), t.value[e] || u(e));
|
|
@@ -1703,7 +1703,7 @@ function yn(e) {
|
|
|
1703
1703
|
...Object.fromEntries(r.map((e) => [e.userId, e]))
|
|
1704
1704
|
};
|
|
1705
1705
|
} catch (e) {
|
|
1706
|
-
o ||
|
|
1706
|
+
o || M(e, {
|
|
1707
1707
|
source: "iam-user-online-status",
|
|
1708
1708
|
phase: "load"
|
|
1709
1709
|
});
|
|
@@ -1719,12 +1719,12 @@ function yn(e) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1723
|
-
return e.type ===
|
|
1722
|
+
function xn(e) {
|
|
1723
|
+
return e.type === _n && e.moduleAlias === "iam.user" && !!e.recordId;
|
|
1724
1724
|
}
|
|
1725
1725
|
//#endregion
|
|
1726
1726
|
//#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
|
|
1727
|
-
var
|
|
1727
|
+
var Sn = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
1728
1728
|
name: "UserOnlineStatusCell",
|
|
1729
1729
|
__name: "UserOnlineStatusCell",
|
|
1730
1730
|
props: {
|
|
@@ -1732,7 +1732,7 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1732
1732
|
column: {}
|
|
1733
1733
|
},
|
|
1734
1734
|
setup(e) {
|
|
1735
|
-
let t =
|
|
1735
|
+
let t = A(), n = e, r = yn(), i = z(() => n.record.id == null ? void 0 : String(n.record.id)), a = z(() => r.statusOf(i.value)), o = z(() => {
|
|
1736
1736
|
let e = a.value;
|
|
1737
1737
|
if (!e) return "-";
|
|
1738
1738
|
if (e.present) {
|
|
@@ -1750,28 +1750,28 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1750
1750
|
function s() {
|
|
1751
1751
|
r.observe(i.value);
|
|
1752
1752
|
}
|
|
1753
|
-
return
|
|
1753
|
+
return qe(s), Q(i, s), (e, t) => (J(), H("span", { class: Ue({
|
|
1754
1754
|
"user-online-status--present": a.value?.present,
|
|
1755
1755
|
"user-online-status--offline": a.value && !a.value.online
|
|
1756
1756
|
}) }, X(o.value), 3));
|
|
1757
1757
|
}
|
|
1758
|
-
}), [["__scopeId", "data-v-56345a12"]]),
|
|
1758
|
+
}), [["__scopeId", "data-v-56345a12"]]), Cn = {
|
|
1759
1759
|
key: 1,
|
|
1760
1760
|
class: "user-password-drawer"
|
|
1761
|
-
},
|
|
1761
|
+
}, wn = { key: 0 }, Tn = {
|
|
1762
1762
|
key: 1,
|
|
1763
1763
|
class: "user-password-reset"
|
|
1764
|
-
},
|
|
1764
|
+
}, En = { key: 0 }, Dn = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
1765
1765
|
name: "UserPasswordDrawer",
|
|
1766
1766
|
__name: "UserPasswordDrawer",
|
|
1767
1767
|
props: { context: {} },
|
|
1768
1768
|
setup(e) {
|
|
1769
|
-
let t =
|
|
1769
|
+
let t = A(), n = e, r = Y(""), i = Y(), a = Y(!1), o = z(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
|
|
1770
1770
|
async function s() {
|
|
1771
1771
|
let e = o.value;
|
|
1772
1772
|
if (e && !a.value && n.context.module.can("changePassword", e) === !0) {
|
|
1773
1773
|
if (!r.value) {
|
|
1774
|
-
|
|
1774
|
+
Te(t.t("platform.screen.UserPasswordDrawer.enter-a-new-password", "请输入新密码。"), {
|
|
1775
1775
|
language: t,
|
|
1776
1776
|
source: "iam-user-password",
|
|
1777
1777
|
phase: "validation"
|
|
@@ -1784,13 +1784,13 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1784
1784
|
method: "POST",
|
|
1785
1785
|
path: `/iam.user/changePassword/${encodeURIComponent(e)}`,
|
|
1786
1786
|
body: { password: r.value }
|
|
1787
|
-
}), r.value = "",
|
|
1787
|
+
}), r.value = "", Te(t.t("platform.screen.UserPasswordDrawer.password-changed", "密码已修改。"), {
|
|
1788
1788
|
language: t,
|
|
1789
1789
|
source: "iam-user-password",
|
|
1790
1790
|
phase: "action"
|
|
1791
1791
|
}), n.context.refreshList(), n.context.refreshDetailExtensions();
|
|
1792
1792
|
} catch (e) {
|
|
1793
|
-
|
|
1793
|
+
M(e, {
|
|
1794
1794
|
language: t,
|
|
1795
1795
|
source: "iam-user-password",
|
|
1796
1796
|
phase: "action"
|
|
@@ -1810,7 +1810,7 @@ var xn = /*#__PURE__*/ I(/* @__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"
|
|
@@ -1820,9 +1820,9 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
|
-
return (n, l) => o.value ? (J(),
|
|
1824
|
-
|
|
1825
|
-
|
|
1823
|
+
return (n, l) => o.value ? (J(), H("section", Cn, [e.context.module.can("changePassword", o.value) === !0 ? (J(), H("label", wn, [
|
|
1824
|
+
U("span", null, X(Z(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
|
|
1825
|
+
G(Z(I), {
|
|
1826
1826
|
value: r.value,
|
|
1827
1827
|
"onUpdate:value": l[0] ||= (e) => r.value = e,
|
|
1828
1828
|
type: "password",
|
|
@@ -1833,25 +1833,25 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1833
1833
|
"disabled",
|
|
1834
1834
|
"placeholder"
|
|
1835
1835
|
]),
|
|
1836
|
-
|
|
1836
|
+
G(Z(P), {
|
|
1837
1837
|
type: "primary",
|
|
1838
1838
|
loading: a.value,
|
|
1839
1839
|
onClick: s
|
|
1840
1840
|
}, {
|
|
1841
|
-
default: $(() => [
|
|
1841
|
+
default: $(() => [W(X(Z(t).t("platform.screen.LoginView.change-password", "修改密码")), 1)]),
|
|
1842
1842
|
_: 1
|
|
1843
1843
|
}, 8, ["loading"])
|
|
1844
|
-
])) :
|
|
1845
|
-
|
|
1846
|
-
|
|
1844
|
+
])) : V("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (J(), H("section", Tn, [
|
|
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(P), {
|
|
1847
1847
|
loading: a.value,
|
|
1848
1848
|
onClick: c
|
|
1849
1849
|
}, {
|
|
1850
|
-
default: $(() => [
|
|
1850
|
+
default: $(() => [W(X(Z(t).t("platform.screen.UserPasswordDrawer.generate-temporary-password", "生成临时密码")), 1)]),
|
|
1851
1851
|
_: 1
|
|
1852
1852
|
}, 8, ["loading"]),
|
|
1853
|
-
i.value ? (J(),
|
|
1854
|
-
])) :
|
|
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(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", "请重新打开用户详情后再管理密码。")
|
|
@@ -1860,8 +1860,8 @@ var xn = /*#__PURE__*/ I(/* @__PURE__ */ q({
|
|
|
1860
1860
|
}), [["__scopeId", "data-v-891512e0"]]);
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/platform-admin-runtime/user/useUserSessionRows.ts
|
|
1863
|
-
function
|
|
1864
|
-
let t = e.language ??
|
|
1863
|
+
function On(e) {
|
|
1864
|
+
let t = e.language ?? v, n = Y([]), i = Y({}), a = r({ load: async (e) => {
|
|
1865
1865
|
await Promise.all(e.keys.map((t) => s(t, e.isLatest)));
|
|
1866
1866
|
} });
|
|
1867
1867
|
function o(e) {
|
|
@@ -1887,8 +1887,8 @@ function Dn(e) {
|
|
|
1887
1887
|
});
|
|
1888
1888
|
} catch (i) {
|
|
1889
1889
|
if (!r(n)) return;
|
|
1890
|
-
let a =
|
|
1891
|
-
|
|
1890
|
+
let a = te(i);
|
|
1891
|
+
M(a, {
|
|
1892
1892
|
language: t,
|
|
1893
1893
|
source: `${e.source}-sessions`,
|
|
1894
1894
|
phase: "load"
|
|
@@ -1913,7 +1913,7 @@ function Dn(e) {
|
|
|
1913
1913
|
let n = e ? i.value[e] : void 0;
|
|
1914
1914
|
return n ? n.failure ? {
|
|
1915
1915
|
...n,
|
|
1916
|
-
error:
|
|
1916
|
+
error: w(n.failure, t)
|
|
1917
1917
|
} : n : {
|
|
1918
1918
|
records: [],
|
|
1919
1919
|
loading: !1
|
|
@@ -1938,7 +1938,7 @@ function Dn(e) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
//#endregion
|
|
1940
1940
|
//#region src/platform-admin-runtime/userModulePageEnhancement.ts
|
|
1941
|
-
var
|
|
1941
|
+
var kn = {
|
|
1942
1942
|
id: "iam-user-standard-page-enhancement",
|
|
1943
1943
|
target: { moduleAlias: "iam.user" },
|
|
1944
1944
|
navigator: { emptyListScope: ({ currentUser: e, selectedNavigatorRecords: t }) => {
|
|
@@ -1956,21 +1956,21 @@ var On = {
|
|
|
1956
1956
|
__name: "UserSessionListExpansion",
|
|
1957
1957
|
props: { context: {} },
|
|
1958
1958
|
setup(e) {
|
|
1959
|
-
let t =
|
|
1959
|
+
let t = A(), 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
|
|
1963
|
-
}), o =
|
|
1963
|
+
}), o = z(() => i.userSessionState(r.value)), s = z(() => o.value.records.filter((e) => !e.current && n.context.module.can("revokeSession", r.value) === !0)), c = z(() => s.value.length > 1 && n.context.module.can("revokeSessions", r.value) === !0);
|
|
1964
1964
|
Q([r, () => n.context.expanded], ([e, t]) => {
|
|
1965
1965
|
e && i.handleUserRowExpand({ id: e }, t);
|
|
1966
1966
|
}, { immediate: !0 });
|
|
1967
1967
|
let l = a((e) => i.handleUserSessionBusinessEvent(e));
|
|
1968
|
-
|
|
1968
|
+
Ye(() => {
|
|
1969
1969
|
l.unsubscribe(), i.reset();
|
|
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 f({
|
|
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 On = {
|
|
|
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 f({
|
|
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 On = {
|
|
|
1993
1993
|
body: { sessionIds: a }
|
|
1994
1994
|
}), i.loadUserSessions(e));
|
|
1995
1995
|
}
|
|
1996
|
-
return (t, n) => (J(),
|
|
1996
|
+
return (t, n) => (J(), B(Z(Ee), {
|
|
1997
1997
|
embedded: "",
|
|
1998
1998
|
sessions: o.value.records,
|
|
1999
1999
|
loading: o.value.loading,
|
|
@@ -2020,7 +2020,7 @@ var On = {
|
|
|
2020
2020
|
width: "112px",
|
|
2021
2021
|
align: "center",
|
|
2022
2022
|
before: "enabled",
|
|
2023
|
-
cell:
|
|
2023
|
+
cell: Sn
|
|
2024
2024
|
}]
|
|
2025
2025
|
},
|
|
2026
2026
|
detail: { actions: [{
|
|
@@ -2035,26 +2035,181 @@ var On = {
|
|
|
2035
2035
|
title: "密码管理",
|
|
2036
2036
|
titleKey: "platform.entry.password-management",
|
|
2037
2037
|
width: "narrow",
|
|
2038
|
-
component:
|
|
2038
|
+
component: Dn
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
2041
2041
|
}] }
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2042
|
+
}, An = { class: "scheduled-target-fields" }, jn = {
|
|
2043
|
+
key: 0,
|
|
2044
|
+
role: "status"
|
|
2045
|
+
}, Mn = {
|
|
2046
|
+
key: 1,
|
|
2047
|
+
role: "alert"
|
|
2048
|
+
}, Nn = {
|
|
2049
|
+
key: 2,
|
|
2050
|
+
role: "alert"
|
|
2051
|
+
}, Pn = { key: 3 }, Fn = { key: 4 }, In = {
|
|
2052
|
+
id: "platform-scheduled-action-targets",
|
|
2053
|
+
target: { moduleAlias: "platform.scheduled_action_plan" },
|
|
2054
|
+
form: {
|
|
2055
|
+
contributions: [{
|
|
2056
|
+
key: "scheduled-targets",
|
|
2057
|
+
component: /* @__PURE__ */ L(/* @__PURE__ */ q({
|
|
2058
|
+
__name: "ScheduledActionTargetFields",
|
|
2059
|
+
props: { context: {} },
|
|
2060
|
+
setup(e) {
|
|
2061
|
+
let t = e, n = A(), r = k(), 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
|
+
t.context.formSessionKey,
|
|
2063
|
+
t.context.draft.executionTenantId,
|
|
2064
|
+
n.languageTag.value
|
|
2065
|
+
]));
|
|
2066
|
+
Q(f, () => void p(), { immediate: !0 }), Ke(() => l++);
|
|
2067
|
+
async function p() {
|
|
2068
|
+
let e = ++l;
|
|
2069
|
+
i.value = [], a.value = !0, o.value = !1;
|
|
2070
|
+
try {
|
|
2071
|
+
let n = await r.request({
|
|
2072
|
+
path: "/platform.scheduled_action_plan/scheduled-targets",
|
|
2073
|
+
query: { executionTenantId: String(t.context.draft.executionTenantId ?? "") || void 0 }
|
|
2074
|
+
});
|
|
2075
|
+
e === l && (i.value = n);
|
|
2076
|
+
} catch {
|
|
2077
|
+
e === l && (o.value = !0);
|
|
2078
|
+
} finally {
|
|
2079
|
+
e === l && (a.value = !1);
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
let m = z(() => n.t("platform.scheduled-target.unavailable", "当前目标已失效或无权调度,请重新选择")), h = z(() => i.value.find((e) => e.moduleAlias === u.value && e.actionCode === d.value));
|
|
2083
|
+
Q([
|
|
2084
|
+
a,
|
|
2085
|
+
o,
|
|
2086
|
+
h,
|
|
2087
|
+
u,
|
|
2088
|
+
d,
|
|
2089
|
+
s,
|
|
2090
|
+
c
|
|
2091
|
+
], () => {
|
|
2092
|
+
let e = t.context.mode === "view" || !a.value && !o.value && !!h.value && s.value && c.value;
|
|
2093
|
+
t.context.reportValidity({
|
|
2094
|
+
valid: e,
|
|
2095
|
+
errors: e ? {} : { actionCode: m.value }
|
|
2096
|
+
});
|
|
2097
|
+
}, { immediate: !0 });
|
|
2098
|
+
function g(e) {
|
|
2099
|
+
let t = i.value, r = u.value, a = e === "moduleAlias" ? [...new Map(t.map((e) => [e.moduleAlias, {
|
|
2100
|
+
id: e.moduleAlias,
|
|
2101
|
+
title: e.moduleTitle,
|
|
2102
|
+
subtitle: e.moduleAlias
|
|
2103
|
+
}])).values()] : t.filter((e) => e.moduleAlias === r).map((e) => ({
|
|
2104
|
+
id: e.actionCode,
|
|
2105
|
+
title: e.actionTitle,
|
|
2106
|
+
subtitle: `${e.actionCode} · ${e.source === "static" ? n.t("platform.scheduled-target.static", "静态") : n.t("platform.scheduled-target.dynamic", "动态")}`
|
|
2107
|
+
}));
|
|
2108
|
+
return {
|
|
2109
|
+
identity: {
|
|
2110
|
+
targetModuleAlias: "platform.scheduled_action_plan",
|
|
2111
|
+
source: {
|
|
2112
|
+
kind: "businessPurpose",
|
|
2113
|
+
id: `scheduled-target:${e}`
|
|
2114
|
+
},
|
|
2115
|
+
authorizationScope: f.value
|
|
2116
|
+
},
|
|
2117
|
+
async searchPage(e) {
|
|
2118
|
+
let t = a.filter((t) => `${t.title} ${t.subtitle}`.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())), n = (e.pageNum - 1) * e.pageSize;
|
|
2119
|
+
return {
|
|
2120
|
+
records: t.slice(n, n + e.pageSize),
|
|
2121
|
+
total: t.length
|
|
2122
|
+
};
|
|
2123
|
+
},
|
|
2124
|
+
async resolve(e) {
|
|
2125
|
+
return e.map((e) => a.find((t) => t.id === e) ?? {
|
|
2126
|
+
id: e,
|
|
2127
|
+
title: e,
|
|
2128
|
+
unavailable: !0,
|
|
2129
|
+
disabled: !0
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
let _ = z(() => g("moduleAlias")), v = z(() => g("actionCode"));
|
|
2135
|
+
function y(e) {
|
|
2136
|
+
let n = typeof e == "string" ? e : void 0;
|
|
2137
|
+
n !== u.value && (t.context.setField("moduleAlias", n), t.context.setField("actionCode", void 0));
|
|
2138
|
+
}
|
|
2139
|
+
function b(e) {
|
|
2140
|
+
t.context.setField("actionCode", typeof e == "string" ? e : void 0);
|
|
2141
|
+
}
|
|
2142
|
+
function x(e) {
|
|
2143
|
+
let n = t.context.fields.find((t) => t.fieldName === e);
|
|
2144
|
+
return t.context.mode === "view" || n?.readOnly === !0 || a.value || o.value;
|
|
2145
|
+
}
|
|
2146
|
+
function ee(e) {
|
|
2147
|
+
return t.context.fields.find((t) => t.fieldName === e)?.label ?? e;
|
|
2148
|
+
}
|
|
2149
|
+
return (e, t) => (J(), H("div", An, [
|
|
2150
|
+
U("label", null, [U("span", null, X(ee("moduleAlias")), 1), G(Z(F), {
|
|
2151
|
+
value: u.value || void 0,
|
|
2152
|
+
provider: _.value,
|
|
2153
|
+
"reload-key": f.value,
|
|
2154
|
+
mode: "dropdown",
|
|
2155
|
+
disabled: x("moduleAlias"),
|
|
2156
|
+
"onUpdate:value": y,
|
|
2157
|
+
onValidityChange: t[0] ||= (e) => s.value = e.valid
|
|
2158
|
+
}, null, 8, [
|
|
2159
|
+
"value",
|
|
2160
|
+
"provider",
|
|
2161
|
+
"reload-key",
|
|
2162
|
+
"disabled"
|
|
2163
|
+
])]),
|
|
2164
|
+
U("label", null, [U("span", null, X(ee("actionCode")), 1), G(Z(F), {
|
|
2165
|
+
value: d.value || void 0,
|
|
2166
|
+
provider: v.value,
|
|
2167
|
+
"reload-key": `${f.value}:${u.value}`,
|
|
2168
|
+
mode: "dropdown",
|
|
2169
|
+
disabled: x("actionCode") || !u.value,
|
|
2170
|
+
"onUpdate:value": b,
|
|
2171
|
+
onValidityChange: t[1] ||= (e) => c.value = e.valid
|
|
2172
|
+
}, null, 8, [
|
|
2173
|
+
"value",
|
|
2174
|
+
"provider",
|
|
2175
|
+
"reload-key",
|
|
2176
|
+
"disabled"
|
|
2177
|
+
])]),
|
|
2178
|
+
a.value ? (J(), H("p", jn, X(Z(n).t("platform.scheduled-target.loading", "正在加载候选")), 1)) : o.value ? (J(), H("p", Mn, [W(X(Z(n).t("platform.scheduled-target.load-failed", "候选加载失败,请重试")) + " ", 1), U("button", {
|
|
2179
|
+
type: "button",
|
|
2180
|
+
onClick: p
|
|
2181
|
+
}, X(Z(n).t("platform.scheduled-target.retry", "重试")), 1)])) : !a.value && (u.value || d.value) && !h.value ? (J(), H("p", Nn, X(m.value), 1)) : V("v-if", !0),
|
|
2182
|
+
h.value?.parametersRequired ? (J(), H("p", Pn, X(Z(n).t("platform.scheduled-target.parameters-required", "此动作需要参数,请填写静态参数 JSON")), 1)) : h.value && h.value.parametersRequired == null ? (J(), H("p", Fn, X(Z(n).t("platform.scheduled-target.parameters-unspecified", "此动作未声明参数要求,保存时将校验参数")), 1)) : V("v-if", !0)
|
|
2183
|
+
]));
|
|
2184
|
+
}
|
|
2185
|
+
}), [["__scopeId", "data-v-405e31c0"]]),
|
|
2186
|
+
location: {
|
|
2187
|
+
surface: "record-card",
|
|
2188
|
+
fieldName: "moduleAlias",
|
|
2189
|
+
placement: "after"
|
|
2190
|
+
}
|
|
2191
|
+
}],
|
|
2192
|
+
fieldPolicies: ["moduleAlias", "actionCode"].map((e) => ({
|
|
2193
|
+
fieldName: e,
|
|
2194
|
+
visible: () => !1
|
|
2195
|
+
}))
|
|
2196
|
+
}
|
|
2197
|
+
}, Ln = "/iam.role/scope-selection/descriptor", Rn = "/iam.role/scope-selection/candidates";
|
|
2198
|
+
function zn(e) {
|
|
2044
2199
|
return {
|
|
2045
2200
|
async descriptor() {
|
|
2046
|
-
return
|
|
2201
|
+
return Bn(await e.request({ path: Ln }));
|
|
2047
2202
|
},
|
|
2048
2203
|
async candidates(t) {
|
|
2049
|
-
let n =
|
|
2050
|
-
return
|
|
2204
|
+
let n = er(t.pageNum) ?? 1, r = er(t.pageSize) ?? 100;
|
|
2205
|
+
return Vn(await e.request({
|
|
2051
2206
|
method: "POST",
|
|
2052
|
-
path:
|
|
2207
|
+
path: Rn,
|
|
2053
2208
|
body: {
|
|
2054
|
-
navigationKey:
|
|
2209
|
+
navigationKey: Zn(t.navigationKey, "navigationKey"),
|
|
2055
2210
|
level: t.level,
|
|
2056
|
-
keyword:
|
|
2057
|
-
parentId:
|
|
2211
|
+
keyword: Xn(t.keyword),
|
|
2212
|
+
parentId: Xn(t.parentId),
|
|
2058
2213
|
page: {
|
|
2059
2214
|
pageNum: n,
|
|
2060
2215
|
pageSize: r
|
|
@@ -2064,35 +2219,35 @@ function jn(e) {
|
|
|
2064
2219
|
}
|
|
2065
2220
|
};
|
|
2066
2221
|
}
|
|
2067
|
-
function
|
|
2068
|
-
let t =
|
|
2222
|
+
function Bn(e) {
|
|
2223
|
+
let t = qn(e);
|
|
2069
2224
|
return {
|
|
2070
|
-
directSelections:
|
|
2071
|
-
navigations:
|
|
2225
|
+
directSelections: Jn(t.directSelections).flatMap(Hn),
|
|
2226
|
+
navigations: Jn(t.navigations).flatMap(Un)
|
|
2072
2227
|
};
|
|
2073
2228
|
}
|
|
2074
|
-
function
|
|
2075
|
-
let n =
|
|
2229
|
+
function Vn(e, t) {
|
|
2230
|
+
let n = qn(e), r = Jn(n.records).flatMap(Wn), i = $n(n.pageNum) ?? t, a = $n(n.pages), o = Qn(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
|
|
2076
2231
|
return {
|
|
2077
2232
|
records: r,
|
|
2078
2233
|
hasMore: o,
|
|
2079
2234
|
...o ? { nextPage: i + 1 } : {}
|
|
2080
2235
|
};
|
|
2081
2236
|
}
|
|
2082
|
-
function
|
|
2083
|
-
let t =
|
|
2237
|
+
function Hn(e) {
|
|
2238
|
+
let t = qn(e), n = Yn(t.selectionKey);
|
|
2084
2239
|
if (!n) return [];
|
|
2085
|
-
let r =
|
|
2240
|
+
let r = Yn(t.title ?? t.label) ?? n, i = Gn(t.titleText, r);
|
|
2086
2241
|
return [{
|
|
2087
2242
|
selectionKey: n,
|
|
2088
2243
|
label: r,
|
|
2089
2244
|
...i ? { labelText: i } : {}
|
|
2090
2245
|
}];
|
|
2091
2246
|
}
|
|
2092
|
-
function
|
|
2093
|
-
let t =
|
|
2247
|
+
function Un(e) {
|
|
2248
|
+
let t = qn(e), n = Yn(t.navigationKey), r = Kn(t.level);
|
|
2094
2249
|
if (!n || !r) return [];
|
|
2095
|
-
let i =
|
|
2250
|
+
let i = Yn(t.title ?? t.label) ?? n, a = Gn(t.titleText, i);
|
|
2096
2251
|
return [{
|
|
2097
2252
|
navigationKey: n,
|
|
2098
2253
|
level: r,
|
|
@@ -2100,22 +2255,22 @@ function Fn(e) {
|
|
|
2100
2255
|
...a ? { labelText: a } : {}
|
|
2101
2256
|
}];
|
|
2102
2257
|
}
|
|
2103
|
-
function
|
|
2104
|
-
let t =
|
|
2258
|
+
function Wn(e) {
|
|
2259
|
+
let t = qn(e), n = Yn(t.id), r = Yn(t.selectionKey);
|
|
2105
2260
|
return !n || !r ? [] : [{
|
|
2106
2261
|
id: n,
|
|
2107
2262
|
selectionKey: r,
|
|
2108
|
-
label:
|
|
2109
|
-
...
|
|
2110
|
-
expandable:
|
|
2263
|
+
label: Yn(t.title ?? t.label) ?? r,
|
|
2264
|
+
...Yn(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: Yn(t.subtitle ?? t.secondaryLabel) } : {},
|
|
2265
|
+
expandable: Qn(t.expandable, !1)
|
|
2111
2266
|
}];
|
|
2112
2267
|
}
|
|
2113
|
-
function
|
|
2114
|
-
let n =
|
|
2115
|
-
if (!
|
|
2268
|
+
function Gn(e, t) {
|
|
2269
|
+
let n = qn(e), r = n.source;
|
|
2270
|
+
if (!ue(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !ie(r, t)) return;
|
|
2116
2271
|
let i = {};
|
|
2117
|
-
for (let [e, t] of Object.entries(
|
|
2118
|
-
let n =
|
|
2272
|
+
for (let [e, t] of Object.entries(qn(n.languages))) {
|
|
2273
|
+
let n = qn(t);
|
|
2119
2274
|
typeof n.text == "string" && n.requestedTag === e && typeof n.missing == "boolean" && typeof n.fallback == "boolean" && (i[e] = {
|
|
2120
2275
|
text: n.text,
|
|
2121
2276
|
requestedTag: e,
|
|
@@ -2129,76 +2284,76 @@ function Ln(e, t) {
|
|
|
2129
2284
|
languages: i
|
|
2130
2285
|
} : void 0;
|
|
2131
2286
|
}
|
|
2132
|
-
function
|
|
2287
|
+
function Kn(e) {
|
|
2133
2288
|
return e === "TENANT" || e === "ORGANIZATION" ? e : void 0;
|
|
2134
2289
|
}
|
|
2135
|
-
function
|
|
2290
|
+
function qn(e) {
|
|
2136
2291
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
2137
2292
|
}
|
|
2138
|
-
function
|
|
2293
|
+
function Jn(e) {
|
|
2139
2294
|
return Array.isArray(e) ? e : [];
|
|
2140
2295
|
}
|
|
2141
|
-
function
|
|
2142
|
-
return typeof e == "string" ?
|
|
2296
|
+
function Yn(e) {
|
|
2297
|
+
return typeof e == "string" ? Xn(e) : void 0;
|
|
2143
2298
|
}
|
|
2144
|
-
function
|
|
2299
|
+
function Xn(e) {
|
|
2145
2300
|
return e?.trim() || void 0;
|
|
2146
2301
|
}
|
|
2147
|
-
function
|
|
2148
|
-
let n =
|
|
2302
|
+
function Zn(e, t) {
|
|
2303
|
+
let n = Xn(e);
|
|
2149
2304
|
if (!n) throw Error(`角色归属范围${t}不能为空`);
|
|
2150
2305
|
return n;
|
|
2151
2306
|
}
|
|
2152
|
-
function
|
|
2307
|
+
function Qn(e, t) {
|
|
2153
2308
|
return typeof e == "boolean" ? e : t;
|
|
2154
2309
|
}
|
|
2155
|
-
function
|
|
2310
|
+
function $n(e) {
|
|
2156
2311
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
2157
2312
|
}
|
|
2158
|
-
function
|
|
2313
|
+
function er(e) {
|
|
2159
2314
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
2160
2315
|
}
|
|
2161
2316
|
//#endregion
|
|
2162
2317
|
//#region src/platform-admin-runtime/role/RoleScopeTree.vue
|
|
2163
|
-
var
|
|
2318
|
+
var tr = /* @__PURE__ */ q({
|
|
2164
2319
|
name: "RoleScopeTree",
|
|
2165
2320
|
__name: "RoleScopeTree",
|
|
2166
2321
|
props: { context: {} },
|
|
2167
2322
|
setup(e) {
|
|
2168
|
-
let t =
|
|
2323
|
+
let t = A(), n = e, r = zn(k()), 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), m = z(() => i.value?.navigations.length !== 0), h = z(() => f.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), g = O({
|
|
2169
2324
|
nodes: () => s.value,
|
|
2170
|
-
loader: () =>
|
|
2325
|
+
loader: () => re,
|
|
2171
2326
|
version: () => l.value
|
|
2172
|
-
}), _ =
|
|
2327
|
+
}), _ = z(() => v(g.nodes.value));
|
|
2173
2328
|
function v(e) {
|
|
2174
2329
|
return e.map((e) => ({
|
|
2175
2330
|
...e,
|
|
2176
|
-
title:
|
|
2331
|
+
title: S(e.title, u.value.get(e.key)?.labelText, t),
|
|
2177
2332
|
...e.children ? { children: v(e.children) } : {}
|
|
2178
2333
|
}));
|
|
2179
2334
|
}
|
|
2180
|
-
let y = g.states, b = 0,
|
|
2181
|
-
|
|
2182
|
-
b += 1,
|
|
2335
|
+
let y = g.states, b = 0, x;
|
|
2336
|
+
qe(() => void ee()), Ke(() => {
|
|
2337
|
+
b += 1, x && clearTimeout(x);
|
|
2183
2338
|
}), Q(a, () => {
|
|
2184
|
-
|
|
2339
|
+
m.value && (x && clearTimeout(x), x = setTimeout(() => void T(), 240));
|
|
2185
2340
|
});
|
|
2186
|
-
async function
|
|
2341
|
+
async function ee() {
|
|
2187
2342
|
o.value = !0;
|
|
2188
2343
|
try {
|
|
2189
2344
|
i.value = await r.descriptor();
|
|
2190
2345
|
let e = i.value.directSelections[0], t = i.value.directSelections.find((e) => e.selectionKey === n.context.selectionKey);
|
|
2191
|
-
t?.labelText &&
|
|
2346
|
+
t?.labelText && j({
|
|
2192
2347
|
key: t.selectionKey,
|
|
2193
2348
|
label: t.label,
|
|
2194
2349
|
labelText: t.labelText
|
|
2195
|
-
}), !n.context.selectionKey && e &&
|
|
2350
|
+
}), !n.context.selectionKey && e && j({
|
|
2196
2351
|
key: e.selectionKey,
|
|
2197
2352
|
label: e.label,
|
|
2198
2353
|
labelText: e.labelText
|
|
2199
|
-
}), await
|
|
2354
|
+
}), await w();
|
|
2200
2355
|
} catch (e) {
|
|
2201
|
-
|
|
2356
|
+
M(e, {
|
|
2202
2357
|
language: t,
|
|
2203
2358
|
source: "role-scope-tree",
|
|
2204
2359
|
phase: "load"
|
|
@@ -2207,19 +2362,19 @@ var qn = /* @__PURE__ */ q({
|
|
|
2207
2362
|
o.value = !1;
|
|
2208
2363
|
}
|
|
2209
2364
|
}
|
|
2210
|
-
async function
|
|
2365
|
+
async function w(e = {}) {
|
|
2211
2366
|
let n = i.value;
|
|
2212
2367
|
if (!n) return;
|
|
2213
2368
|
let r = ++b;
|
|
2214
2369
|
if (!e.append) {
|
|
2215
2370
|
c.value = [], l.value += 1, o.value = !0;
|
|
2216
2371
|
try {
|
|
2217
|
-
let e =
|
|
2372
|
+
let e = te(n);
|
|
2218
2373
|
if (r !== b) return;
|
|
2219
|
-
u.value = /* @__PURE__ */ new Map(),
|
|
2374
|
+
u.value = /* @__PURE__ */ new Map(), ie(e), s.value = e.map((e) => e.ui);
|
|
2220
2375
|
} catch (e) {
|
|
2221
2376
|
if (r !== b) return;
|
|
2222
|
-
s.value = [],
|
|
2377
|
+
s.value = [], M(e, {
|
|
2223
2378
|
language: t,
|
|
2224
2379
|
source: "role-scope-tree",
|
|
2225
2380
|
phase: "load"
|
|
@@ -2229,12 +2384,12 @@ var qn = /* @__PURE__ */ q({
|
|
|
2229
2384
|
}
|
|
2230
2385
|
}
|
|
2231
2386
|
}
|
|
2232
|
-
async function
|
|
2233
|
-
if (await
|
|
2387
|
+
async function T() {
|
|
2388
|
+
if (await w(), !a.value.trim()) return;
|
|
2234
2389
|
let e = (i.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
|
|
2235
|
-
c.value = e, await
|
|
2390
|
+
c.value = e, await He(), await Promise.all(e.map((e) => g.request(e, "refresh")));
|
|
2236
2391
|
}
|
|
2237
|
-
function
|
|
2392
|
+
function te(e) {
|
|
2238
2393
|
return [
|
|
2239
2394
|
...e.directSelections.map((e) => ({
|
|
2240
2395
|
ui: {
|
|
@@ -2249,11 +2404,11 @@ var qn = /* @__PURE__ */ q({
|
|
|
2249
2404
|
labelText: e.labelText
|
|
2250
2405
|
}
|
|
2251
2406
|
})),
|
|
2252
|
-
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) =>
|
|
2253
|
-
...e.navigations.filter((e) => e.level === "TENANT").map((e) =>
|
|
2407
|
+
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => E(e)),
|
|
2408
|
+
...e.navigations.filter((e) => e.level === "TENANT").map((e) => E(e))
|
|
2254
2409
|
];
|
|
2255
2410
|
}
|
|
2256
|
-
function
|
|
2411
|
+
function E(e) {
|
|
2257
2412
|
return {
|
|
2258
2413
|
ui: {
|
|
2259
2414
|
key: `navigation:${e.navigationKey}`,
|
|
@@ -2267,8 +2422,8 @@ var qn = /* @__PURE__ */ q({
|
|
|
2267
2422
|
}
|
|
2268
2423
|
};
|
|
2269
2424
|
}
|
|
2270
|
-
function
|
|
2271
|
-
let r =
|
|
2425
|
+
function D(e, t, n) {
|
|
2426
|
+
let r = ne(e, t, n);
|
|
2272
2427
|
return {
|
|
2273
2428
|
ui: {
|
|
2274
2429
|
key: e.selectionKey,
|
|
@@ -2284,7 +2439,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2284
2439
|
children: r
|
|
2285
2440
|
};
|
|
2286
2441
|
}
|
|
2287
|
-
function
|
|
2442
|
+
function ne(e, t, n) {
|
|
2288
2443
|
return t === "TENANT" ? {
|
|
2289
2444
|
navigationKey: e.selectionKey,
|
|
2290
2445
|
level: "ORGANIZATION"
|
|
@@ -2294,7 +2449,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2294
2449
|
parentId: e.id
|
|
2295
2450
|
} : void 0;
|
|
2296
2451
|
}
|
|
2297
|
-
async function
|
|
2452
|
+
async function re(e, n) {
|
|
2298
2453
|
let i = u.value.get(e.key);
|
|
2299
2454
|
if (!i?.children) throw Error(t.t("platform.screen.RoleScopeTree.the-role-ownership-scope-is-no-longer-available", "角色归属范围已失效"));
|
|
2300
2455
|
try {
|
|
@@ -2304,58 +2459,58 @@ var qn = /* @__PURE__ */ q({
|
|
|
2304
2459
|
pageNum: n.reason === "load-more" ? Number(n.cursor) : 1
|
|
2305
2460
|
});
|
|
2306
2461
|
n.signal.throwIfAborted();
|
|
2307
|
-
let t = e.records.map((e) =>
|
|
2308
|
-
return
|
|
2462
|
+
let t = e.records.map((e) => D(e, i.children.level, i.children.navigationKey));
|
|
2463
|
+
return ie(t), {
|
|
2309
2464
|
mode: n.reason === "load-more" ? "append" : "replace",
|
|
2310
2465
|
nodes: t.map((e) => e.ui),
|
|
2311
2466
|
hasMore: e.hasMore,
|
|
2312
2467
|
nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
|
|
2313
2468
|
};
|
|
2314
2469
|
} catch (e) {
|
|
2315
|
-
throw n.signal.aborted ||
|
|
2470
|
+
throw n.signal.aborted || M(e, {
|
|
2316
2471
|
language: t,
|
|
2317
2472
|
source: "role-scope-tree",
|
|
2318
2473
|
phase: "load"
|
|
2319
2474
|
}), e;
|
|
2320
2475
|
}
|
|
2321
2476
|
}
|
|
2322
|
-
function
|
|
2477
|
+
function ie(e) {
|
|
2323
2478
|
let t = new Map(u.value);
|
|
2324
2479
|
e.forEach((e) => t.set(e.ui.key, e)), u.value = t;
|
|
2325
2480
|
}
|
|
2326
|
-
function
|
|
2481
|
+
function ae(e) {
|
|
2327
2482
|
let t = u.value.get(e.key)?.selection;
|
|
2328
|
-
t &&
|
|
2483
|
+
t && j(t);
|
|
2329
2484
|
}
|
|
2330
|
-
function
|
|
2485
|
+
function j(e) {
|
|
2331
2486
|
n.context.selectSelectionKey(e.key, {
|
|
2332
2487
|
label: e.label,
|
|
2333
2488
|
...e.labelText ? { labelText: e.labelText } : {},
|
|
2334
2489
|
secondaryLabel: e.secondaryLabel
|
|
2335
2490
|
});
|
|
2336
2491
|
}
|
|
2337
|
-
function
|
|
2492
|
+
function N() {
|
|
2338
2493
|
let e = i.value?.directSelections[0];
|
|
2339
|
-
e &&
|
|
2494
|
+
e && j({
|
|
2340
2495
|
key: e.selectionKey,
|
|
2341
2496
|
label: e.label,
|
|
2342
2497
|
labelText: e.labelText
|
|
2343
2498
|
});
|
|
2344
2499
|
}
|
|
2345
|
-
return (e, n) => (J(),
|
|
2500
|
+
return (e, n) => (J(), B(Z(xe), {
|
|
2346
2501
|
class: "role-scope-tree",
|
|
2347
2502
|
title: h.value,
|
|
2348
2503
|
"refresh-title": Z(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
|
|
2349
2504
|
"search-keyword": a.value,
|
|
2350
2505
|
"search-placeholder": Z(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
|
|
2351
|
-
searchable:
|
|
2352
|
-
onRefresh:
|
|
2506
|
+
searchable: m.value,
|
|
2507
|
+
onRefresh: w,
|
|
2353
2508
|
"onUpdate:searchKeyword": n[3] ||= (e) => a.value = e
|
|
2354
2509
|
}, {
|
|
2355
|
-
default: $(() => [o.value ? (J(),
|
|
2510
|
+
default: $(() => [o.value ? (J(), B(Z(C), {
|
|
2356
2511
|
key: 0,
|
|
2357
2512
|
tip: Z(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
|
|
2358
|
-
}, null, 8, ["tip"])) : (J(),
|
|
2513
|
+
}, null, 8, ["tip"])) : (J(), B(Z(p), {
|
|
2359
2514
|
key: 1,
|
|
2360
2515
|
"expanded-keys": c.value,
|
|
2361
2516
|
"onUpdate:expandedKeys": n[0] ||= (e) => c.value = e,
|
|
@@ -2366,8 +2521,8 @@ var qn = /* @__PURE__ */ q({
|
|
|
2366
2521
|
"reload-on-reexpand": "",
|
|
2367
2522
|
"branch-states": Z(y),
|
|
2368
2523
|
onLoadRequest: n[1] ||= (e) => Z(g).request(e.node.key, e.reason, Z(g).stateOf(e.node.key).status === "error"),
|
|
2369
|
-
onSelect:
|
|
2370
|
-
onDeselect:
|
|
2524
|
+
onSelect: ae,
|
|
2525
|
+
onDeselect: N,
|
|
2371
2526
|
onUnloadChildren: n[2] ||= (e) => Z(g).release(e.key)
|
|
2372
2527
|
}, null, 8, [
|
|
2373
2528
|
"expanded-keys",
|
|
@@ -2385,7 +2540,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2385
2540
|
"searchable"
|
|
2386
2541
|
]));
|
|
2387
2542
|
}
|
|
2388
|
-
}),
|
|
2543
|
+
}), nr = /* @__PURE__ */ q({
|
|
2389
2544
|
name: "RoleEnumTitleCell",
|
|
2390
2545
|
__name: "RoleEnumTitleCell",
|
|
2391
2546
|
props: {
|
|
@@ -2393,7 +2548,7 @@ var qn = /* @__PURE__ */ q({
|
|
|
2393
2548
|
column: {}
|
|
2394
2549
|
},
|
|
2395
2550
|
setup(e) {
|
|
2396
|
-
let t =
|
|
2551
|
+
let t = A(), n = e, r = z(() => {
|
|
2397
2552
|
let e = String(n.record[n.column?.key ?? ""] ?? "");
|
|
2398
2553
|
return {
|
|
2399
2554
|
account: t.t("platform.screen.RoleManagementView.account-role", "账号角色"),
|
|
@@ -2408,12 +2563,12 @@ var qn = /* @__PURE__ */ q({
|
|
|
2408
2563
|
platform: t.t("platform.screen.RoleManagementView.globally-visible", "全局公开")
|
|
2409
2564
|
}[e] ?? (e || "-");
|
|
2410
2565
|
});
|
|
2411
|
-
return (e, t) => (J(),
|
|
2566
|
+
return (e, t) => (J(), H("span", null, X(r.value), 1));
|
|
2412
2567
|
}
|
|
2413
2568
|
});
|
|
2414
2569
|
//#endregion
|
|
2415
2570
|
//#region src/views/roleGrantClient.ts
|
|
2416
|
-
function
|
|
2571
|
+
function rr(e) {
|
|
2417
2572
|
return {
|
|
2418
2573
|
accountRoleGrants(t, n) {
|
|
2419
2574
|
return e.request({
|
|
@@ -2519,19 +2674,19 @@ function Yn(e) {
|
|
|
2519
2674
|
}
|
|
2520
2675
|
//#endregion
|
|
2521
2676
|
//#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
2522
|
-
var
|
|
2677
|
+
var ir = {
|
|
2523
2678
|
key: 1,
|
|
2524
2679
|
class: "role-account-grant-drawer-state"
|
|
2525
|
-
},
|
|
2680
|
+
}, ar = {
|
|
2526
2681
|
key: 0,
|
|
2527
2682
|
class: "role-account-grant-target-tenant"
|
|
2528
|
-
},
|
|
2683
|
+
}, or = {
|
|
2529
2684
|
key: 1,
|
|
2530
2685
|
class: "role-account-grant-target-hint"
|
|
2531
|
-
},
|
|
2686
|
+
}, sr = { class: "role-account-grant-search" }, cr = {
|
|
2532
2687
|
key: 0,
|
|
2533
2688
|
class: "role-account-grant-selected"
|
|
2534
|
-
},
|
|
2689
|
+
}, lr = { class: "role-account-grant-selected-title" }, ur = { class: "role-account-grant-selected-list" }, dr = ["disabled", "onClick"], fr = 20, pr = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
2535
2690
|
name: "RoleAccountGrantDrawer",
|
|
2536
2691
|
__name: "RoleAccountGrantDrawer",
|
|
2537
2692
|
props: {
|
|
@@ -2544,25 +2699,25 @@ var Xn = {
|
|
|
2544
2699
|
},
|
|
2545
2700
|
emits: ["close", "saved"],
|
|
2546
2701
|
setup(e, { emit: t }) {
|
|
2547
|
-
let n =
|
|
2702
|
+
let n = A(), r = e, i = t, a = Y([]), o = Y({}), s = Y([]), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(""), d = Y(""), f = Y(1), p = Y(0), m = Y(!1), h = Y(!1), v = Y(!1), b = Y(!1), x = Y(), S = z(() => rr(r.context.http)), w = y({ moduleAlias: "iam.tenant" }), T = z(() => r.role?.id), te = z(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: Oe(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), E = z(() => r.embedded ? "section" : g), D = z(() => r.embedded ? {} : {
|
|
2548
2703
|
open: r.open,
|
|
2549
|
-
title:
|
|
2704
|
+
title: te.value,
|
|
2550
2705
|
renderMode: r.container ? "inline" : "portal",
|
|
2551
2706
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
2552
|
-
onClose:
|
|
2553
|
-
}),
|
|
2707
|
+
onClose: ye
|
|
2708
|
+
}), O = z(() => r.role?.ownerScopeType === "platform"), ne = z(() => x.value?.id), re = z(() => !O.value || !!ne.value), ie = z(() => w), ae = z(() => {
|
|
2554
2709
|
let e = /* @__PURE__ */ new Map();
|
|
2555
2710
|
for (let t of a.value) t.userId && e.set(t.userId, t);
|
|
2556
2711
|
return e;
|
|
2557
|
-
}),
|
|
2712
|
+
}), k = z(() => s.value.filter((e) => e.id).map((e) => ({
|
|
2558
2713
|
id: e.id,
|
|
2559
|
-
username:
|
|
2714
|
+
username: Ee(e),
|
|
2560
2715
|
employeeNo: e.employeeNo ?? "",
|
|
2561
2716
|
employeeTitle: e.employeeTitle ?? "",
|
|
2562
2717
|
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
2563
2718
|
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
2564
2719
|
boundTitle: l.value.has(e.id) ? n.t("platform.screen.RoleAccountGrantDrawer.assigned", "已绑定") : n.t("platform.screen.MetadataGovernanceSurface.unbound", "未绑定")
|
|
2565
|
-
}))),
|
|
2720
|
+
}))), j = z(() => [...c.value].map((e) => o.value[e] ?? Te(e))), N = z(() => [...c.value].filter((e) => !l.value.has(e))), F = z(() => [...l.value].filter((e) => !c.value.has(e))), oe = z(() => N.value.length > 0 || F.value.length > 0), ce = {
|
|
2566
2721
|
rowKey: "id",
|
|
2567
2722
|
columns: [
|
|
2568
2723
|
{
|
|
@@ -2596,81 +2751,81 @@ var Xn = {
|
|
|
2596
2751
|
width: 90
|
|
2597
2752
|
}
|
|
2598
2753
|
]
|
|
2599
|
-
},
|
|
2754
|
+
}, ue = z(() => ({
|
|
2600
2755
|
selectedRowKeys: [...c.value],
|
|
2601
2756
|
preserveSelectedRowKeys: !0,
|
|
2602
|
-
disabledOf: () =>
|
|
2757
|
+
disabledOf: () => v.value,
|
|
2603
2758
|
onChange: (e) => {
|
|
2604
2759
|
c.value = new Set(e.map((e) => String(e)));
|
|
2605
2760
|
}
|
|
2606
|
-
})),
|
|
2761
|
+
})), fe = z(() => ({
|
|
2607
2762
|
current: f.value,
|
|
2608
2763
|
total: p.value,
|
|
2609
|
-
pageSize:
|
|
2764
|
+
pageSize: fr,
|
|
2610
2765
|
showSizeChanger: !1,
|
|
2611
2766
|
showQuickJumper: !1,
|
|
2612
|
-
onChange: (e) => void
|
|
2767
|
+
onChange: (e) => void ge(e)
|
|
2613
2768
|
}));
|
|
2614
2769
|
Q(() => [r.open, r.role?.id], ([e]) => {
|
|
2615
|
-
e ?
|
|
2770
|
+
e ? he() : be();
|
|
2616
2771
|
}, { immediate: !0 }), Q([
|
|
2617
2772
|
() => r.embedded,
|
|
2618
2773
|
() => r.drawerContext,
|
|
2619
2774
|
c,
|
|
2620
|
-
|
|
2621
|
-
ee,
|
|
2622
|
-
F,
|
|
2775
|
+
oe,
|
|
2623
2776
|
re,
|
|
2624
|
-
|
|
2777
|
+
N,
|
|
2778
|
+
F,
|
|
2779
|
+
v,
|
|
2625
2780
|
m
|
|
2626
|
-
],
|
|
2627
|
-
function
|
|
2781
|
+
], pe, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
|
|
2782
|
+
function pe() {
|
|
2628
2783
|
let e = r.drawerContext;
|
|
2629
2784
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
2630
|
-
value1:
|
|
2631
|
-
value2:
|
|
2785
|
+
value1: Oe(r.role ?? {}),
|
|
2786
|
+
value2: ke(r.role)
|
|
2632
2787
|
})), e.setOperation({
|
|
2633
|
-
summary:
|
|
2788
|
+
summary: me(),
|
|
2634
2789
|
actions: [{
|
|
2635
2790
|
key: "cancel-account-role-grants",
|
|
2636
2791
|
label: n.t("platform.action.cancel", "取消"),
|
|
2637
|
-
disabled:
|
|
2638
|
-
run:
|
|
2792
|
+
disabled: v.value || m.value,
|
|
2793
|
+
run: ye
|
|
2639
2794
|
}, {
|
|
2640
2795
|
key: "save-account-role-grants",
|
|
2641
2796
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
2642
2797
|
emphasis: "primary",
|
|
2643
|
-
disabled: m.value || !
|
|
2644
|
-
loading:
|
|
2645
|
-
run: () => void
|
|
2798
|
+
disabled: m.value || !re.value || !oe.value,
|
|
2799
|
+
loading: v.value,
|
|
2800
|
+
run: () => void L()
|
|
2646
2801
|
}]
|
|
2647
2802
|
}));
|
|
2648
2803
|
}
|
|
2649
|
-
function
|
|
2650
|
-
return
|
|
2804
|
+
function me() {
|
|
2805
|
+
return re.value ? oe.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
|
|
2651
2806
|
value1: c.value.size,
|
|
2652
|
-
value2:
|
|
2653
|
-
value3:
|
|
2807
|
+
value2: N.value.length,
|
|
2808
|
+
value3: F.value.length
|
|
2654
2809
|
}) : n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected", "已选 {value1} 个用户", { value1: c.value.size }) : n.t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant", "请选择目标租户");
|
|
2655
2810
|
}
|
|
2656
|
-
async function
|
|
2657
|
-
let e =
|
|
2811
|
+
async function he() {
|
|
2812
|
+
let e = T.value;
|
|
2658
2813
|
if (!e) {
|
|
2659
|
-
|
|
2814
|
+
be();
|
|
2660
2815
|
return;
|
|
2661
2816
|
}
|
|
2662
|
-
if (!
|
|
2663
|
-
|
|
2817
|
+
if (!re.value) {
|
|
2818
|
+
xe();
|
|
2664
2819
|
return;
|
|
2665
2820
|
}
|
|
2666
|
-
m.value = !0,
|
|
2821
|
+
m.value = !0, b.value = !1;
|
|
2667
2822
|
try {
|
|
2668
|
-
let t = await
|
|
2823
|
+
let t = await S.value.accountRoleGrants(e, ne.value);
|
|
2669
2824
|
a.value = t;
|
|
2670
2825
|
let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
2671
|
-
l.value = n, c.value = new Set(n), o.value =
|
|
2826
|
+
l.value = n, c.value = new Set(n), o.value = we([...t.map((e) => Te(e.userId)).filter((e) => !!e)]), await ge(1);
|
|
2672
2827
|
} catch (e) {
|
|
2673
|
-
|
|
2828
|
+
b.value = !0, M(e, {
|
|
2674
2829
|
language: n,
|
|
2675
2830
|
source: "role-account-grants",
|
|
2676
2831
|
phase: "load"
|
|
@@ -2679,26 +2834,26 @@ var Xn = {
|
|
|
2679
2834
|
m.value = !1;
|
|
2680
2835
|
}
|
|
2681
2836
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
let t =
|
|
2684
|
-
if (t &&
|
|
2837
|
+
async function ge(e) {
|
|
2838
|
+
let t = T.value;
|
|
2839
|
+
if (t && re.value) {
|
|
2685
2840
|
h.value = !0;
|
|
2686
2841
|
try {
|
|
2687
|
-
let n = await
|
|
2688
|
-
targetTenantId:
|
|
2842
|
+
let n = await S.value.accountRoleCandidates(t, {
|
|
2843
|
+
targetTenantId: ne.value,
|
|
2689
2844
|
keyword: d.value,
|
|
2690
2845
|
enabledOnly: !0,
|
|
2691
2846
|
page: {
|
|
2692
2847
|
pageNum: Math.max(0, e),
|
|
2693
|
-
pageSize:
|
|
2848
|
+
pageSize: fr
|
|
2694
2849
|
}
|
|
2695
2850
|
});
|
|
2696
2851
|
s.value = n.records, o.value = {
|
|
2697
2852
|
...o.value,
|
|
2698
|
-
...
|
|
2853
|
+
...we(n.records)
|
|
2699
2854
|
}, f.value = n.pageNum, p.value = n.total;
|
|
2700
2855
|
} catch (e) {
|
|
2701
|
-
|
|
2856
|
+
M(e, {
|
|
2702
2857
|
language: n,
|
|
2703
2858
|
source: "role-account-grants",
|
|
2704
2859
|
phase: "load"
|
|
@@ -2708,31 +2863,31 @@ var Xn = {
|
|
|
2708
2863
|
}
|
|
2709
2864
|
}
|
|
2710
2865
|
}
|
|
2711
|
-
function
|
|
2712
|
-
d.value = u.value.trim(),
|
|
2866
|
+
function _e() {
|
|
2867
|
+
d.value = u.value.trim(), ge(0);
|
|
2713
2868
|
}
|
|
2714
|
-
function
|
|
2869
|
+
function ve(e, t) {
|
|
2715
2870
|
let n = new Set(c.value);
|
|
2716
2871
|
t ? n.add(e) : n.delete(e), c.value = n;
|
|
2717
2872
|
}
|
|
2718
|
-
async function
|
|
2719
|
-
let e =
|
|
2720
|
-
if (e &&
|
|
2721
|
-
if (!
|
|
2873
|
+
async function L() {
|
|
2874
|
+
let e = T.value;
|
|
2875
|
+
if (e && re.value) {
|
|
2876
|
+
if (!oe.value) {
|
|
2722
2877
|
i("close");
|
|
2723
2878
|
return;
|
|
2724
2879
|
}
|
|
2725
|
-
|
|
2880
|
+
v.value = !0;
|
|
2726
2881
|
try {
|
|
2727
|
-
for (let t of
|
|
2882
|
+
for (let t of N.value) await S.value.grantAccountRole(e, {
|
|
2728
2883
|
userId: t,
|
|
2729
|
-
targetTenantId:
|
|
2884
|
+
targetTenantId: ne.value
|
|
2730
2885
|
});
|
|
2731
|
-
for (let t of
|
|
2732
|
-
let n =
|
|
2733
|
-
n && await
|
|
2886
|
+
for (let t of F.value) {
|
|
2887
|
+
let n = ae.value.get(t)?.id;
|
|
2888
|
+
n && await S.value.deleteAccountRoleGrant(e, n, ne.value);
|
|
2734
2889
|
}
|
|
2735
|
-
await
|
|
2890
|
+
await se({
|
|
2736
2891
|
success: !0,
|
|
2737
2892
|
message: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2738
2893
|
}, {
|
|
@@ -2742,120 +2897,120 @@ var Xn = {
|
|
|
2742
2897
|
fallbackMessage: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2743
2898
|
}), i("saved"), i("close");
|
|
2744
2899
|
} catch (e) {
|
|
2745
|
-
|
|
2900
|
+
M(e, {
|
|
2746
2901
|
language: n,
|
|
2747
2902
|
source: "role-account-grants",
|
|
2748
2903
|
phase: "action"
|
|
2749
2904
|
});
|
|
2750
2905
|
} finally {
|
|
2751
|
-
|
|
2906
|
+
v.value = !1;
|
|
2752
2907
|
}
|
|
2753
2908
|
}
|
|
2754
2909
|
}
|
|
2755
|
-
function _e() {
|
|
2756
|
-
g.value || i("close");
|
|
2757
|
-
}
|
|
2758
2910
|
function ye() {
|
|
2759
|
-
|
|
2911
|
+
v.value || i("close");
|
|
2760
2912
|
}
|
|
2761
2913
|
function be() {
|
|
2762
|
-
|
|
2914
|
+
x.value = void 0, xe();
|
|
2915
|
+
}
|
|
2916
|
+
function xe() {
|
|
2917
|
+
a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", f.value = 1, p.value = 0, m.value = !1, h.value = !1, v.value = !1, b.value = !1;
|
|
2763
2918
|
}
|
|
2764
|
-
async function
|
|
2919
|
+
async function Se(e) {
|
|
2765
2920
|
if (!e) {
|
|
2766
|
-
|
|
2921
|
+
x.value = void 0, xe();
|
|
2767
2922
|
return;
|
|
2768
2923
|
}
|
|
2769
|
-
let t = await
|
|
2770
|
-
|
|
2924
|
+
let t = await w.crud.view(e);
|
|
2925
|
+
x.value = t ?? {
|
|
2771
2926
|
id: e,
|
|
2772
2927
|
title: e
|
|
2773
|
-
}, await
|
|
2774
|
-
}
|
|
2775
|
-
function Se(e) {
|
|
2776
|
-
he(e, !1);
|
|
2928
|
+
}, await he();
|
|
2777
2929
|
}
|
|
2778
2930
|
function Ce(e) {
|
|
2931
|
+
ve(e, !1);
|
|
2932
|
+
}
|
|
2933
|
+
function we(e) {
|
|
2779
2934
|
let t = {};
|
|
2780
2935
|
for (let n of e) n.id && (t[n.id] = n);
|
|
2781
2936
|
return t;
|
|
2782
2937
|
}
|
|
2783
|
-
function
|
|
2938
|
+
function Te(e) {
|
|
2784
2939
|
return e ? {
|
|
2785
2940
|
id: e,
|
|
2786
2941
|
username: e
|
|
2787
2942
|
} : void 0;
|
|
2788
2943
|
}
|
|
2789
|
-
function
|
|
2944
|
+
function Ee(e) {
|
|
2790
2945
|
return String(e?.username ?? e?.id ?? n.t("platform.screen.RoleAccountGrantDrawer.unknown-user", "未知用户"));
|
|
2791
2946
|
}
|
|
2792
|
-
function
|
|
2947
|
+
function De(e) {
|
|
2793
2948
|
return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
|
|
2794
2949
|
}
|
|
2795
|
-
function
|
|
2950
|
+
function Oe(e) {
|
|
2796
2951
|
return String(_(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
|
|
2797
2952
|
}
|
|
2798
|
-
function
|
|
2953
|
+
function ke(e) {
|
|
2799
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", "租户范围");
|
|
2800
2955
|
}
|
|
2801
|
-
return (t, r) => (J(),
|
|
2802
|
-
default: $(() => [m.value ? (J(),
|
|
2956
|
+
return (t, r) => (J(), B(Qe(E.value), Ve(D.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), Re({
|
|
2957
|
+
default: $(() => [m.value ? (J(), B(Z(C), {
|
|
2803
2958
|
key: 0,
|
|
2804
2959
|
class: "role-account-grant-drawer-state",
|
|
2805
2960
|
tip: Z(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
|
|
2806
|
-
}, null, 8, ["tip"])) :
|
|
2961
|
+
}, null, 8, ["tip"])) : b.value ? (J(), H("div", ir, [G(Z(ee), {
|
|
2807
2962
|
title: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
|
|
2808
2963
|
message: Z(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
|
|
2809
|
-
}, null, 8, ["title", "message"]),
|
|
2964
|
+
}, null, 8, ["title", "message"]), G(Z(P), {
|
|
2810
2965
|
type: "primary",
|
|
2811
2966
|
"icon-name": "reload",
|
|
2812
|
-
onClick:
|
|
2967
|
+
onClick: he
|
|
2813
2968
|
}, {
|
|
2814
|
-
default: $(() => [
|
|
2969
|
+
default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
2815
2970
|
_: 1
|
|
2816
|
-
})])) : (J(),
|
|
2971
|
+
})])) : (J(), H("section", {
|
|
2817
2972
|
key: 2,
|
|
2818
|
-
class:
|
|
2819
|
-
}, [
|
|
2820
|
-
context:
|
|
2821
|
-
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(le), {
|
|
2975
|
+
context: ie.value,
|
|
2976
|
+
value: ne.value,
|
|
2822
2977
|
mode: "list",
|
|
2823
2978
|
placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
|
|
2824
|
-
disabled:
|
|
2825
|
-
"onUpdate:value":
|
|
2979
|
+
disabled: v.value || m.value,
|
|
2980
|
+
"onUpdate:value": Se
|
|
2826
2981
|
}, null, 8, [
|
|
2827
2982
|
"context",
|
|
2828
2983
|
"value",
|
|
2829
2984
|
"placeholder",
|
|
2830
2985
|
"disabled"
|
|
2831
|
-
])])) :
|
|
2832
|
-
|
|
2986
|
+
])])) : V("v-if", !0), re.value ? (J(), H(R, { key: 2 }, [
|
|
2987
|
+
U("div", sr, [G(Z(I), {
|
|
2833
2988
|
value: u.value,
|
|
2834
2989
|
"allow-clear": "",
|
|
2835
|
-
disabled:
|
|
2990
|
+
disabled: v.value,
|
|
2836
2991
|
placeholder: Z(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
|
|
2837
2992
|
"onUpdate:value": r[0] ||= (e) => u.value = e,
|
|
2838
|
-
onKeydown:
|
|
2993
|
+
onKeydown: rt(_e, ["enter"])
|
|
2839
2994
|
}, null, 8, [
|
|
2840
2995
|
"value",
|
|
2841
2996
|
"disabled",
|
|
2842
2997
|
"placeholder"
|
|
2843
|
-
]),
|
|
2998
|
+
]), G(Z(P), {
|
|
2844
2999
|
"icon-name": "search",
|
|
2845
|
-
disabled:
|
|
2846
|
-
onClick:
|
|
3000
|
+
disabled: v.value,
|
|
3001
|
+
onClick: _e
|
|
2847
3002
|
}, {
|
|
2848
|
-
default: $(() => [
|
|
3003
|
+
default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
|
|
2849
3004
|
_: 1
|
|
2850
3005
|
}, 8, ["disabled"])]),
|
|
2851
|
-
|
|
3006
|
+
G(Z(de), {
|
|
2852
3007
|
class: "role-account-grant-table",
|
|
2853
3008
|
size: "middle",
|
|
2854
|
-
contract:
|
|
2855
|
-
rows:
|
|
3009
|
+
contract: ce,
|
|
3010
|
+
rows: k.value,
|
|
2856
3011
|
loading: h.value,
|
|
2857
|
-
pagination:
|
|
2858
|
-
selection:
|
|
3012
|
+
pagination: fe.value,
|
|
3013
|
+
selection: ue.value,
|
|
2859
3014
|
"fill-height": ""
|
|
2860
3015
|
}, null, 8, [
|
|
2861
3016
|
"rows",
|
|
@@ -2863,41 +3018,41 @@ var Xn = {
|
|
|
2863
3018
|
"pagination",
|
|
2864
3019
|
"selection"
|
|
2865
3020
|
]),
|
|
2866
|
-
|
|
3021
|
+
j.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(j.value.length), 1)]), U("div", ur, [(J(!0), H(R, null, Xe(j.value, (e) => (J(), H("button", {
|
|
2867
3022
|
key: e.id,
|
|
2868
3023
|
type: "button",
|
|
2869
|
-
disabled:
|
|
2870
|
-
onClick: (t) =>
|
|
2871
|
-
}, [
|
|
2872
|
-
], 64)) : (J(),
|
|
3024
|
+
disabled: v.value,
|
|
3025
|
+
onClick: (t) => Ce(e.id)
|
|
3026
|
+
}, [U("span", null, X(Ee(e)), 1), U("small", null, X(De(e)), 1)], 8, dr))), 128))])])) : V("v-if", !0)
|
|
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))]),
|
|
2873
3028
|
_: 2
|
|
2874
3029
|
}, [e.embedded ? void 0 : {
|
|
2875
3030
|
name: "operation",
|
|
2876
|
-
fn: $(() => [
|
|
2877
|
-
disabled:
|
|
2878
|
-
onClick:
|
|
3031
|
+
fn: $(() => [G(Z(P), {
|
|
3032
|
+
disabled: v.value || m.value,
|
|
3033
|
+
onClick: ye
|
|
2879
3034
|
}, {
|
|
2880
|
-
default: $(() => [
|
|
3035
|
+
default: $(() => [W(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
|
|
2881
3036
|
_: 1
|
|
2882
|
-
}, 8, ["disabled"]),
|
|
3037
|
+
}, 8, ["disabled"]), G(Z(P), {
|
|
2883
3038
|
type: "primary",
|
|
2884
|
-
loading:
|
|
2885
|
-
disabled: m.value || !
|
|
2886
|
-
onClick:
|
|
3039
|
+
loading: v.value,
|
|
3040
|
+
disabled: m.value || !oe.value,
|
|
3041
|
+
onClick: L
|
|
2887
3042
|
}, {
|
|
2888
|
-
default: $(() => [
|
|
3043
|
+
default: $(() => [W(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
2889
3044
|
_: 1
|
|
2890
3045
|
}, 8, ["loading", "disabled"])]),
|
|
2891
3046
|
key: "0"
|
|
2892
3047
|
}]), 1040, ["class"]));
|
|
2893
3048
|
}
|
|
2894
|
-
}), [["__scopeId", "data-v-e7dae9bb"]]),
|
|
3049
|
+
}), [["__scopeId", "data-v-e7dae9bb"]]), mr = /* @__PURE__ */ q({
|
|
2895
3050
|
name: "RoleAccountGrantDrawerSurface",
|
|
2896
3051
|
__name: "RoleAccountGrantDrawerSurface",
|
|
2897
3052
|
props: { context: {} },
|
|
2898
3053
|
setup(e) {
|
|
2899
|
-
let t = e, n =
|
|
2900
|
-
return (e, i) => (J(),
|
|
3054
|
+
let t = e, n = z(() => t.context.module), r = z(() => t.context.record);
|
|
3055
|
+
return (e, i) => (J(), B(pr, {
|
|
2901
3056
|
open: "",
|
|
2902
3057
|
embedded: "",
|
|
2903
3058
|
"drawer-context": t.context,
|
|
@@ -2913,7 +3068,7 @@ var Xn = {
|
|
|
2913
3068
|
"onSaved"
|
|
2914
3069
|
]));
|
|
2915
3070
|
}
|
|
2916
|
-
}),
|
|
3071
|
+
}), hr = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
2917
3072
|
name: "EmployeeEmploymentTable",
|
|
2918
3073
|
__name: "EmployeeEmploymentTable",
|
|
2919
3074
|
props: {
|
|
@@ -2938,7 +3093,7 @@ var Xn = {
|
|
|
2938
3093
|
},
|
|
2939
3094
|
emits: ["update:selectedIds"],
|
|
2940
3095
|
setup(e, { emit: t }) {
|
|
2941
|
-
let n =
|
|
3096
|
+
let n = A(), r = e, i = t, a = Y([]), o = z(() => [
|
|
2942
3097
|
{
|
|
2943
3098
|
key: "title",
|
|
2944
3099
|
title: n.t("platform.screen.EmployeePicker.employee", "职员"),
|
|
@@ -2966,7 +3121,7 @@ var Xn = {
|
|
|
2966
3121
|
width: 88,
|
|
2967
3122
|
align: "right"
|
|
2968
3123
|
}
|
|
2969
|
-
]), s =
|
|
3124
|
+
]), s = z(() => [
|
|
2970
3125
|
{
|
|
2971
3126
|
key: "position",
|
|
2972
3127
|
title: n.t("platform.screen.CurrentUserProfileDialog.position", "岗位"),
|
|
@@ -2987,7 +3142,7 @@ var Xn = {
|
|
|
2987
3142
|
title: n.t("platform.screen.EmployeeEmploymentTable.primary-position", "主岗位"),
|
|
2988
3143
|
width: 88
|
|
2989
3144
|
}
|
|
2990
|
-
]), c =
|
|
3145
|
+
]), c = z(() => {
|
|
2991
3146
|
let e = /* @__PURE__ */ new Map();
|
|
2992
3147
|
for (let t of r.rows) {
|
|
2993
3148
|
let n = t.employeeId ?? t.id, r = e.get(n) ?? {
|
|
@@ -3000,7 +3155,7 @@ var Xn = {
|
|
|
3000
3155
|
r.positions.push(t), e.set(n, r);
|
|
3001
3156
|
}
|
|
3002
3157
|
return [...e.values()];
|
|
3003
|
-
}), l =
|
|
3158
|
+
}), l = z(() => c.value);
|
|
3004
3159
|
function u(e, t) {
|
|
3005
3160
|
let r = t;
|
|
3006
3161
|
return e.key === "title" ? r.title : e.key === "employeeNo" ? r.employeeNo ?? r.employeeId : e.key === "organizationTitle" ? r.organizationTitle ?? "-" : e.key === "employmentCount" ? n.t("platform.screen.EmployeeEmploymentTable.value-items", "{value1} 项", { value1: r.positions.length }) : e.key === "selectedCount" ? n.t("platform.screen.EmployeeEmploymentTable.value-items", "{value1} 项", { value1: f(r) }) : "";
|
|
@@ -3034,7 +3189,7 @@ var Xn = {
|
|
|
3034
3189
|
let t = e.employeeId;
|
|
3035
3190
|
h(e, !a.value.includes(t));
|
|
3036
3191
|
}
|
|
3037
|
-
return (t, r) => (J(),
|
|
3192
|
+
return (t, r) => (J(), B(Z(T), {
|
|
3038
3193
|
class: "employee-employment-table",
|
|
3039
3194
|
columns: o.value,
|
|
3040
3195
|
rows: l.value,
|
|
@@ -3047,9 +3202,9 @@ var Xn = {
|
|
|
3047
3202
|
onRowExpand: h,
|
|
3048
3203
|
onRowDblclick: g
|
|
3049
3204
|
}, {
|
|
3050
|
-
cell: $(({ column: e, record: t }) => [
|
|
3051
|
-
expandedRow: $(({ record: e }) => [
|
|
3052
|
-
default: $(() => [
|
|
3205
|
+
cell: $(({ column: e, record: t }) => [W(X(u(e, t)), 1)]),
|
|
3206
|
+
expandedRow: $(({ record: e }) => [G(Z(D), { title: Z(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
|
|
3207
|
+
default: $(() => [G(Z(T), {
|
|
3053
3208
|
columns: s.value,
|
|
3054
3209
|
rows: e.positions,
|
|
3055
3210
|
"row-key": "id",
|
|
@@ -3058,7 +3213,7 @@ var Xn = {
|
|
|
3058
3213
|
"horizontal-scroll": "",
|
|
3059
3214
|
"row-muted": (e) => e.enabled === !1
|
|
3060
3215
|
}, {
|
|
3061
|
-
cell: $(({ column: e, record: t }) => [
|
|
3216
|
+
cell: $(({ column: e, record: t }) => [W(X(d(e, t)), 1)]),
|
|
3062
3217
|
_: 1
|
|
3063
3218
|
}, 8, [
|
|
3064
3219
|
"columns",
|
|
@@ -3077,13 +3232,13 @@ var Xn = {
|
|
|
3077
3232
|
"fill-height"
|
|
3078
3233
|
]));
|
|
3079
3234
|
}
|
|
3080
|
-
}), [["__scopeId", "data-v-7020a020"]]),
|
|
3235
|
+
}), [["__scopeId", "data-v-7020a020"]]), gr = { key: 1 }, _r = {
|
|
3081
3236
|
key: 2,
|
|
3082
3237
|
class: "role-employment-grant-body"
|
|
3083
|
-
},
|
|
3238
|
+
}, vr = {
|
|
3084
3239
|
key: 0,
|
|
3085
3240
|
class: "role-employment-grant-selected"
|
|
3086
|
-
},
|
|
3241
|
+
}, yr = { class: "role-employment-grant-selected-title" }, br = { class: "role-employment-grant-selected-list" }, xr = ["disabled", "onClick"], Sr = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
3087
3242
|
name: "RoleEmploymentGrantDrawer",
|
|
3088
3243
|
__name: "RoleEmploymentGrantDrawer",
|
|
3089
3244
|
props: {
|
|
@@ -3096,42 +3251,42 @@ var Xn = {
|
|
|
3096
3251
|
},
|
|
3097
3252
|
emits: ["close", "saved"],
|
|
3098
3253
|
setup(e, { emit: t }) {
|
|
3099
|
-
let n =
|
|
3254
|
+
let n = A(), r = e, i = t, a = Y([]), o = Y([]), s = Y({}), c = Y(/* @__PURE__ */ new Set()), l = Y(/* @__PURE__ */ new Set()), u = Y(!1), d = Y(!1), f = Y(!1), p = Y(!1), m = Y(1), h = Y(0), _ = Y(""), v = z(() => r.role?.id), y = z(() => rr(r.context.http)), b = z(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), x = z(() => r.embedded ? "section" : g), S = z(() => r.embedded ? {} : {
|
|
3100
3255
|
open: r.open,
|
|
3101
3256
|
title: b.value,
|
|
3102
3257
|
renderMode: r.container ? "inline" : "portal",
|
|
3103
3258
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
3104
3259
|
onClose: () => !f.value && i("close")
|
|
3105
|
-
}),
|
|
3260
|
+
}), w = z(() => [...c.value].filter((e) => !l.value.has(e))), T = z(() => [...l.value].filter((e) => !c.value.has(e))), te = z(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), E = z(() => o.value.filter((e) => !_.value.trim() || k(e).includes(_.value.trim()))), D = z(() => [...c.value].map((e) => s.value[e] ?? F(e))), O = z(() => ({
|
|
3106
3261
|
current: m.value,
|
|
3107
3262
|
total: h.value,
|
|
3108
3263
|
pageSize: 50,
|
|
3109
3264
|
showSizeChanger: !1,
|
|
3110
3265
|
showQuickJumper: !1,
|
|
3111
|
-
onChange: (e) => void
|
|
3266
|
+
onChange: (e) => void re(e)
|
|
3112
3267
|
}));
|
|
3113
3268
|
Q(() => [r.open, r.role?.id], ([e]) => {
|
|
3114
|
-
e ?
|
|
3269
|
+
e ? re() : ae();
|
|
3115
3270
|
}, { immediate: !0 }), Q([
|
|
3116
3271
|
() => r.embedded,
|
|
3117
3272
|
() => r.drawerContext,
|
|
3118
3273
|
c,
|
|
3119
|
-
C,
|
|
3120
3274
|
w,
|
|
3275
|
+
T,
|
|
3121
3276
|
f,
|
|
3122
3277
|
d
|
|
3123
|
-
],
|
|
3124
|
-
function
|
|
3278
|
+
], ne, { immediate: !0 }), Ke(() => r.drawerContext?.setOperation(void 0));
|
|
3279
|
+
function ne() {
|
|
3125
3280
|
let e = r.drawerContext;
|
|
3126
3281
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
3127
3282
|
value1: r.role?.title ?? r.role?.id ?? n.t("platform.screen.RoleManagementView.role", "角色"),
|
|
3128
|
-
value2:
|
|
3283
|
+
value2: le(r.role)
|
|
3129
3284
|
})), e.setOperation({
|
|
3130
3285
|
summary: n.t("platform.screen.RoleEmploymentGrantDrawer.value-positions-selectedvalue", "已选 {value1} 个任职{value2}", {
|
|
3131
3286
|
value1: c.value.size,
|
|
3132
|
-
value2:
|
|
3133
|
-
value1:
|
|
3134
|
-
value2:
|
|
3287
|
+
value2: w.value.length || T.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
|
|
3288
|
+
value1: w.value.length,
|
|
3289
|
+
value2: T.value.length
|
|
3135
3290
|
}) : ""
|
|
3136
3291
|
}),
|
|
3137
3292
|
actions: [{
|
|
@@ -3143,18 +3298,18 @@ var Xn = {
|
|
|
3143
3298
|
key: "save-employment-role-grants",
|
|
3144
3299
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
3145
3300
|
emphasis: "primary",
|
|
3146
|
-
disabled: d.value ||
|
|
3301
|
+
disabled: d.value || w.value.length === 0 && T.value.length === 0,
|
|
3147
3302
|
loading: f.value,
|
|
3148
|
-
run: () => void
|
|
3303
|
+
run: () => void ie()
|
|
3149
3304
|
}]
|
|
3150
3305
|
}));
|
|
3151
3306
|
}
|
|
3152
|
-
async function
|
|
3153
|
-
let t =
|
|
3307
|
+
async function re(e = 1) {
|
|
3308
|
+
let t = v.value;
|
|
3154
3309
|
if (t) {
|
|
3155
3310
|
d.value = !0, p.value = !1;
|
|
3156
3311
|
try {
|
|
3157
|
-
let [n, r] = await Promise.all([
|
|
3312
|
+
let [n, r] = await Promise.all([y.value.employmentRoleGrants(t), y.value.employmentSelector(t, {
|
|
3158
3313
|
enabledOnly: !0,
|
|
3159
3314
|
page: {
|
|
3160
3315
|
pageNum: e,
|
|
@@ -3163,10 +3318,10 @@ var Xn = {
|
|
|
3163
3318
|
})]);
|
|
3164
3319
|
a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
|
|
3165
3320
|
...s.value,
|
|
3166
|
-
...
|
|
3321
|
+
...N(r.records)
|
|
3167
3322
|
}, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, m.value = r.pageNum, h.value = r.total;
|
|
3168
3323
|
} catch (e) {
|
|
3169
|
-
p.value = !0,
|
|
3324
|
+
p.value = !0, M(e, {
|
|
3170
3325
|
language: n,
|
|
3171
3326
|
source: "role-employment-grants",
|
|
3172
3327
|
phase: "load"
|
|
@@ -3176,17 +3331,17 @@ var Xn = {
|
|
|
3176
3331
|
}
|
|
3177
3332
|
}
|
|
3178
3333
|
}
|
|
3179
|
-
async function
|
|
3180
|
-
let e =
|
|
3334
|
+
async function ie() {
|
|
3335
|
+
let e = v.value;
|
|
3181
3336
|
if (e) {
|
|
3182
3337
|
f.value = !0;
|
|
3183
3338
|
try {
|
|
3184
|
-
for (let t of
|
|
3185
|
-
for (let t of
|
|
3186
|
-
let n =
|
|
3187
|
-
n && await
|
|
3339
|
+
for (let t of w.value) await y.value.grantEmploymentRole(e, t);
|
|
3340
|
+
for (let t of T.value) {
|
|
3341
|
+
let n = te.value.get(t)?.id;
|
|
3342
|
+
n && await y.value.deleteEmploymentRoleGrant(e, n);
|
|
3188
3343
|
}
|
|
3189
|
-
await
|
|
3344
|
+
await se({
|
|
3190
3345
|
success: !0,
|
|
3191
3346
|
message: n.t("platform.screen.RoleEmploymentGrantDrawer.position-role-assignments-saved", "任职角色授权已保存")
|
|
3192
3347
|
}, {
|
|
@@ -3195,7 +3350,7 @@ var Xn = {
|
|
|
3195
3350
|
phase: "action"
|
|
3196
3351
|
}), i("saved"), i("close");
|
|
3197
3352
|
} catch (e) {
|
|
3198
|
-
|
|
3353
|
+
M(e, {
|
|
3199
3354
|
language: n,
|
|
3200
3355
|
source: "role-employment-grants",
|
|
3201
3356
|
phase: "action"
|
|
@@ -3205,10 +3360,10 @@ var Xn = {
|
|
|
3205
3360
|
}
|
|
3206
3361
|
}
|
|
3207
3362
|
}
|
|
3208
|
-
function
|
|
3209
|
-
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1,
|
|
3363
|
+
function ae() {
|
|
3364
|
+
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, _.value = "", m.value = 1, h.value = 0, p.value = !1;
|
|
3210
3365
|
}
|
|
3211
|
-
function
|
|
3366
|
+
function k(e) {
|
|
3212
3367
|
return [
|
|
3213
3368
|
e.employeeTitle,
|
|
3214
3369
|
e.employeeNo,
|
|
@@ -3217,59 +3372,59 @@ var Xn = {
|
|
|
3217
3372
|
e.positionTitle
|
|
3218
3373
|
].filter(Boolean).join(" ");
|
|
3219
3374
|
}
|
|
3220
|
-
function
|
|
3375
|
+
function j(e) {
|
|
3221
3376
|
let t = new Set(c.value);
|
|
3222
3377
|
t.delete(e), c.value = t;
|
|
3223
3378
|
}
|
|
3224
|
-
function
|
|
3379
|
+
function N(e) {
|
|
3225
3380
|
let t = {};
|
|
3226
3381
|
for (let n of e) n.id && (t[n.id] = n);
|
|
3227
3382
|
return t;
|
|
3228
3383
|
}
|
|
3229
|
-
function
|
|
3384
|
+
function F(e) {
|
|
3230
3385
|
return {
|
|
3231
3386
|
id: e,
|
|
3232
3387
|
positionId: e
|
|
3233
3388
|
};
|
|
3234
3389
|
}
|
|
3235
|
-
function
|
|
3390
|
+
function oe(e) {
|
|
3236
3391
|
let t = e.positionTitle ?? e.positionId ?? e.id;
|
|
3237
3392
|
return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
|
|
3238
3393
|
}
|
|
3239
|
-
function
|
|
3394
|
+
function ce(e) {
|
|
3240
3395
|
return [
|
|
3241
3396
|
e.employeeNo,
|
|
3242
3397
|
e.organizationTitle ?? e.organizationId,
|
|
3243
3398
|
e.departmentTitle ?? e.departmentId
|
|
3244
3399
|
].filter(Boolean).join(" / ") || e.id;
|
|
3245
3400
|
}
|
|
3246
|
-
function
|
|
3401
|
+
function le(e) {
|
|
3247
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", "租户范围");
|
|
3248
3403
|
}
|
|
3249
|
-
return (t, r) => (J(),
|
|
3250
|
-
default: $(() => [d.value ? (J(),
|
|
3404
|
+
return (t, r) => (J(), B(Qe(x.value), Ve(S.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), Re({
|
|
3405
|
+
default: $(() => [d.value ? (J(), B(Z(C), {
|
|
3251
3406
|
key: 0,
|
|
3252
3407
|
tip: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
|
|
3253
|
-
}, null, 8, ["tip"])) : p.value ? (J(),
|
|
3408
|
+
}, null, 8, ["tip"])) : p.value ? (J(), H("div", gr, [G(Z(ee), {
|
|
3254
3409
|
title: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
|
|
3255
3410
|
message: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
|
|
3256
|
-
}, null, 8, ["title", "message"]),
|
|
3257
|
-
default: $(() => [
|
|
3411
|
+
}, null, 8, ["title", "message"]), G(Z(P), { onClick: r[1] ||= (e) => re() }, {
|
|
3412
|
+
default: $(() => [W(X(Z(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
3258
3413
|
_: 1
|
|
3259
|
-
})])) : (J(),
|
|
3260
|
-
|
|
3261
|
-
value:
|
|
3262
|
-
"onUpdate:value": r[2] ||= (e) =>
|
|
3414
|
+
})])) : (J(), H("section", _r, [
|
|
3415
|
+
G(Z(I), {
|
|
3416
|
+
value: _.value,
|
|
3417
|
+
"onUpdate:value": r[2] ||= (e) => _.value = e,
|
|
3263
3418
|
"allow-clear": "",
|
|
3264
3419
|
placeholder: Z(n).t("platform.screen.RoleEmploymentGrantDrawer.filter-by-employee-employee-number-organization-department-or-position", "筛选职员、工号、机构、部门或岗位")
|
|
3265
3420
|
}, null, 8, ["value", "placeholder"]),
|
|
3266
|
-
|
|
3421
|
+
G(hr, {
|
|
3267
3422
|
"selected-ids": c.value,
|
|
3268
3423
|
"onUpdate:selectedIds": r[3] ||= (e) => c.value = e,
|
|
3269
|
-
rows:
|
|
3424
|
+
rows: E.value,
|
|
3270
3425
|
selectable: "",
|
|
3271
3426
|
disabled: f.value,
|
|
3272
|
-
pagination:
|
|
3427
|
+
pagination: O.value,
|
|
3273
3428
|
"fill-height": ""
|
|
3274
3429
|
}, null, 8, [
|
|
3275
3430
|
"selected-ids",
|
|
@@ -3277,41 +3432,41 @@ var Xn = {
|
|
|
3277
3432
|
"disabled",
|
|
3278
3433
|
"pagination"
|
|
3279
3434
|
]),
|
|
3280
|
-
|
|
3435
|
+
D.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(D.value.length), 1)]), U("div", br, [(J(!0), H(R, null, Xe(D.value, (e) => (J(), H("button", {
|
|
3281
3436
|
key: e.id,
|
|
3282
3437
|
type: "button",
|
|
3283
3438
|
disabled: f.value,
|
|
3284
|
-
onClick: (t) =>
|
|
3285
|
-
}, [
|
|
3439
|
+
onClick: (t) => j(e.id)
|
|
3440
|
+
}, [U("span", null, X(oe(e)), 1), U("small", null, X(ce(e)), 1)], 8, xr))), 128))])])) : V("v-if", !0)
|
|
3286
3441
|
]))]),
|
|
3287
3442
|
_: 2
|
|
3288
3443
|
}, [e.embedded ? void 0 : {
|
|
3289
3444
|
name: "operation",
|
|
3290
|
-
fn: $(() => [
|
|
3445
|
+
fn: $(() => [G(Z(P), {
|
|
3291
3446
|
disabled: f.value,
|
|
3292
3447
|
onClick: r[0] ||= (e) => i("close")
|
|
3293
3448
|
}, {
|
|
3294
|
-
default: $(() => [
|
|
3449
|
+
default: $(() => [W(X(Z(n).t("platform.action.cancel", "取消")), 1)]),
|
|
3295
3450
|
_: 1
|
|
3296
|
-
}, 8, ["disabled"]),
|
|
3451
|
+
}, 8, ["disabled"]), G(Z(P), {
|
|
3297
3452
|
type: "primary",
|
|
3298
3453
|
loading: f.value,
|
|
3299
|
-
disabled: d.value ||
|
|
3300
|
-
onClick:
|
|
3454
|
+
disabled: d.value || w.value.length === 0 && T.value.length === 0,
|
|
3455
|
+
onClick: ie
|
|
3301
3456
|
}, {
|
|
3302
|
-
default: $(() => [
|
|
3457
|
+
default: $(() => [W(X(Z(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
3303
3458
|
_: 1
|
|
3304
3459
|
}, 8, ["loading", "disabled"])]),
|
|
3305
3460
|
key: "0"
|
|
3306
3461
|
}]), 1040, ["class"]));
|
|
3307
3462
|
}
|
|
3308
|
-
}), [["__scopeId", "data-v-4736da9f"]]),
|
|
3463
|
+
}), [["__scopeId", "data-v-4736da9f"]]), Cr = /* @__PURE__ */ q({
|
|
3309
3464
|
name: "RoleEmploymentGrantDrawerSurface",
|
|
3310
3465
|
__name: "RoleEmploymentGrantDrawerSurface",
|
|
3311
3466
|
props: { context: {} },
|
|
3312
3467
|
setup(e) {
|
|
3313
|
-
let t = e, n =
|
|
3314
|
-
return (e, i) => (J(),
|
|
3468
|
+
let t = e, n = z(() => t.context.module), r = z(() => t.context.record);
|
|
3469
|
+
return (e, i) => (J(), B(Sr, {
|
|
3315
3470
|
open: "",
|
|
3316
3471
|
embedded: "",
|
|
3317
3472
|
"drawer-context": t.context,
|
|
@@ -3327,7 +3482,7 @@ var Xn = {
|
|
|
3327
3482
|
"onSaved"
|
|
3328
3483
|
]));
|
|
3329
3484
|
}
|
|
3330
|
-
}),
|
|
3485
|
+
}), wr = /* @__PURE__ */ q({
|
|
3331
3486
|
name: "WorkspaceViewDrawer",
|
|
3332
3487
|
__name: "WorkspaceViewDrawer",
|
|
3333
3488
|
props: {
|
|
@@ -3345,8 +3500,8 @@ var Xn = {
|
|
|
3345
3500
|
},
|
|
3346
3501
|
emits: ["close"],
|
|
3347
3502
|
setup(e, { emit: t }) {
|
|
3348
|
-
let n = e, r = t, i =
|
|
3349
|
-
return (t, n) => (J(),
|
|
3503
|
+
let n = e, r = t, i = z(() => n.profile === "wide-work" ? "wide" : "standard");
|
|
3504
|
+
return (t, n) => (J(), B(Z(g), {
|
|
3350
3505
|
open: e.open,
|
|
3351
3506
|
title: e.title,
|
|
3352
3507
|
"render-mode": e.container ? "inline" : "portal",
|
|
@@ -3356,12 +3511,12 @@ var Xn = {
|
|
|
3356
3511
|
dismissal: e.dismissal,
|
|
3357
3512
|
"before-close": e.beforeClose,
|
|
3358
3513
|
onClose: n[0] ||= (e) => r("close")
|
|
3359
|
-
},
|
|
3360
|
-
default: $(() => [
|
|
3514
|
+
}, Re({
|
|
3515
|
+
default: $(() => [Ze(t.$slots, "default")]),
|
|
3361
3516
|
_: 2
|
|
3362
3517
|
}, [t.$slots.operation ? {
|
|
3363
3518
|
name: "operation",
|
|
3364
|
-
fn: $(() => [
|
|
3519
|
+
fn: $(() => [Ze(t.$slots, "operation")]),
|
|
3365
3520
|
key: "0"
|
|
3366
3521
|
} : void 0]), 1032, [
|
|
3367
3522
|
"open",
|
|
@@ -3377,21 +3532,21 @@ var Xn = {
|
|
|
3377
3532
|
});
|
|
3378
3533
|
//#endregion
|
|
3379
3534
|
//#region src/platform-admin-runtime/useWorkspaceViewPromotion.ts
|
|
3380
|
-
function
|
|
3535
|
+
function Tr(e) {
|
|
3381
3536
|
return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
|
|
3382
3537
|
}
|
|
3383
|
-
function
|
|
3384
|
-
let t = s(), n =
|
|
3385
|
-
return
|
|
3386
|
-
let r =
|
|
3387
|
-
if (r &&
|
|
3538
|
+
function Er(e) {
|
|
3539
|
+
let t = s(), n = A();
|
|
3540
|
+
return z(() => {
|
|
3541
|
+
let r = tt(e.input);
|
|
3542
|
+
if (r && Tr(tt(e.eligibility)) && t) return {
|
|
3388
3543
|
title: n.t("platform.workspace-view.pin-as-tab", "固定为页签"),
|
|
3389
3544
|
promote: async () => {
|
|
3390
3545
|
if (await e.beforePromote?.(r) === !1) {
|
|
3391
3546
|
e.onPromotionRejected?.();
|
|
3392
3547
|
return;
|
|
3393
3548
|
}
|
|
3394
|
-
let i = t.openPage(c(e.view, r, "tab",
|
|
3549
|
+
let i = t.openPage(c(e.view, r, "tab", tt(e.title), n));
|
|
3395
3550
|
e.onPromoted?.(i);
|
|
3396
3551
|
}
|
|
3397
3552
|
};
|
|
@@ -3399,53 +3554,53 @@ function vr(e) {
|
|
|
3399
3554
|
}
|
|
3400
3555
|
//#endregion
|
|
3401
3556
|
//#region src/platform-admin-runtime/workspaceViewSessions.ts
|
|
3402
|
-
var
|
|
3403
|
-
function
|
|
3404
|
-
return `${e.type}:${
|
|
3557
|
+
var Dr = /* @__PURE__ */ new Map(), Or = /* @__PURE__ */ new Map();
|
|
3558
|
+
function kr(e, t) {
|
|
3559
|
+
return `${e.type}:${Nr(t)}`;
|
|
3405
3560
|
}
|
|
3406
|
-
async function
|
|
3407
|
-
let r =
|
|
3408
|
-
return a ? await a(
|
|
3561
|
+
async function Ar(e, t, n) {
|
|
3562
|
+
let r = kr(e, t), i = Or.get(r), a = i && [...i].at(-1);
|
|
3563
|
+
return a ? await a(Pr(n)) ? "accepted" : "rejected" : (Dr.set(r, Pr(n)), "accepted");
|
|
3409
3564
|
}
|
|
3410
|
-
function
|
|
3411
|
-
let r =
|
|
3412
|
-
return i.add(n),
|
|
3413
|
-
i.delete(n), i.size === 0 &&
|
|
3565
|
+
function jr(e, t, n) {
|
|
3566
|
+
let r = kr(e, t), i = Or.get(r) ?? /* @__PURE__ */ new Set();
|
|
3567
|
+
return i.add(n), Or.set(r, i), () => {
|
|
3568
|
+
i.delete(n), i.size === 0 && Or.delete(r);
|
|
3414
3569
|
};
|
|
3415
3570
|
}
|
|
3416
|
-
function
|
|
3417
|
-
let n =
|
|
3418
|
-
return
|
|
3571
|
+
function Mr(e, t) {
|
|
3572
|
+
let n = kr(e, t), r = Dr.get(n);
|
|
3573
|
+
return Dr.delete(n), r;
|
|
3419
3574
|
}
|
|
3420
|
-
function
|
|
3421
|
-
return Array.isArray(e) ? `[${e.map(
|
|
3575
|
+
function Nr(e) {
|
|
3576
|
+
return Array.isArray(e) ? `[${e.map(Nr).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${Nr(t)}`).join(",")}}` : JSON.stringify(e);
|
|
3422
3577
|
}
|
|
3423
|
-
function
|
|
3578
|
+
function Pr(e) {
|
|
3424
3579
|
return JSON.parse(JSON.stringify(e));
|
|
3425
3580
|
}
|
|
3426
3581
|
//#endregion
|
|
3427
3582
|
//#region src/views/roleAuthorizationWorkspaceSession.ts
|
|
3428
|
-
function
|
|
3429
|
-
return
|
|
3583
|
+
function Fr(e, t) {
|
|
3584
|
+
return Ar(ct, e, t);
|
|
3430
3585
|
}
|
|
3431
|
-
function
|
|
3432
|
-
return
|
|
3586
|
+
function Ir(e, t) {
|
|
3587
|
+
return jr(ct, e, t);
|
|
3433
3588
|
}
|
|
3434
|
-
function
|
|
3435
|
-
return
|
|
3589
|
+
function Lr(e) {
|
|
3590
|
+
return Mr(ct, e);
|
|
3436
3591
|
}
|
|
3437
3592
|
//#endregion
|
|
3438
3593
|
//#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
|
|
3439
|
-
var
|
|
3594
|
+
var Rr = { class: "panel-title" }, zr = {
|
|
3440
3595
|
key: 0,
|
|
3441
3596
|
class: "authorization-column-header"
|
|
3442
|
-
},
|
|
3597
|
+
}, Br = {
|
|
3443
3598
|
key: 2,
|
|
3444
3599
|
class: "data-scope-editor"
|
|
3445
|
-
},
|
|
3600
|
+
}, Vr = { key: 0 }, Hr = { key: 1 }, Ur = { key: 3 }, Wr = {
|
|
3446
3601
|
key: 4,
|
|
3447
3602
|
class: "not-applicable"
|
|
3448
|
-
},
|
|
3603
|
+
}, Gr = /*@__PURE__*/ q({
|
|
3449
3604
|
name: "RoleAuthorizationView",
|
|
3450
3605
|
__name: "RoleAuthorizationView",
|
|
3451
3606
|
props: {
|
|
@@ -3457,29 +3612,29 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3457
3612
|
},
|
|
3458
3613
|
emits: ["close"],
|
|
3459
3614
|
setup(e, { emit: t }) {
|
|
3460
|
-
let n =
|
|
3461
|
-
let e =
|
|
3615
|
+
let n = A(), r = e, a = t, o = y({ 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, p = d ? Lr(d) : void 0, g = Y(), v = Y([]), b = Y(), x = Y(""), S = Y([]), w = Y(), te = Y(), E = Y(!1), D = Y(!1), O = Y(!1), ne = $e(), ie = z(() => ne.value ? ge(ne.value, n) : void 0), ae = Y(), k = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), F = Y(0), ce, I = z(() => g.value?.roleKind === "group"), le = z(() => g.value?.roleKind === "dataGrant"), ue = z(() => g.value?.assignmentType === "employment"), de = z(() => !!r.drawerContext), pe = z(() => (g.value && _(g.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(() => ve.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: ve.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: pe.value })), ve = z(() => v.value.find((e) => e.moduleAlias === b.value)), L = z(() => {
|
|
3616
|
+
let e = x.value.trim().toLocaleLowerCase(), t = new Set(e ? v.value.filter((t) => [
|
|
3462
3617
|
t.title,
|
|
3463
3618
|
t.moduleAlias,
|
|
3464
3619
|
t.applicationAlias
|
|
3465
|
-
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) :
|
|
3620
|
+
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : v.value.map((e) => e.moduleAlias)), n = new Map(v.value.map((e) => [e.moduleAlias, e]));
|
|
3466
3621
|
for (let e of [...t]) {
|
|
3467
3622
|
let r = n.get(e)?.parentId;
|
|
3468
3623
|
for (; r && n.has(r) && !t.has(r);) t.add(r), r = n.get(r)?.parentId;
|
|
3469
3624
|
}
|
|
3470
|
-
return
|
|
3625
|
+
return v.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
|
|
3471
3626
|
id: e.moduleAlias,
|
|
3472
3627
|
parentId: e.parentId,
|
|
3473
3628
|
title: e.title,
|
|
3474
3629
|
secondary: e.applicationAlias
|
|
3475
3630
|
}));
|
|
3476
|
-
}),
|
|
3631
|
+
}), ye = z(() => (te.value?.options ?? []).map((e) => ({
|
|
3477
3632
|
value: e.code,
|
|
3478
3633
|
label: e.title
|
|
3479
|
-
}))), be =
|
|
3634
|
+
}))), be = z(() => (te.value?.referenceDependencies ?? []).map((e) => ({
|
|
3480
3635
|
value: e.referenceFieldId,
|
|
3481
3636
|
label: `${e.title} → ${e.targetModuleTitle}`
|
|
3482
|
-
}))), Se =
|
|
3637
|
+
}))), Se = z(() => new Map((te.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), we = z(() => ue.value && S.value.some((e) => !!e.dataAuth)), Ee = z(() => [
|
|
3483
3638
|
{
|
|
3484
3639
|
key: "title",
|
|
3485
3640
|
title: n.t("platform.governance.tab.actions", "动作"),
|
|
@@ -3496,7 +3651,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3496
3651
|
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
3497
3652
|
width: 200
|
|
3498
3653
|
}] : []
|
|
3499
|
-
]),
|
|
3654
|
+
]), Oe = z(() => [
|
|
3500
3655
|
{
|
|
3501
3656
|
key: "title",
|
|
3502
3657
|
title: n.t("platform.screen.RoleAuthorizationView.standard-action", "标准动作"),
|
|
@@ -3513,84 +3668,84 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3513
3668
|
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
3514
3669
|
width: 160
|
|
3515
3670
|
}
|
|
3516
|
-
]),
|
|
3671
|
+
]), ke = z(() => S.value), Ae = z(() => w.value?.actions ?? []), je = z(() => r.drawer === !0 || !!d && u?.presentation === "drawer"), Me = z(() => !!d), Ne = z(() => Me.value && !de.value), Pe = z(() => de.value ? "div" : je.value ? wr : Me.value ? h : "div"), Fe = z(() => je.value ? {
|
|
3517
3672
|
open: !0,
|
|
3518
|
-
title:
|
|
3673
|
+
title: me.value,
|
|
3519
3674
|
container: r.container ?? null,
|
|
3520
|
-
profile:
|
|
3521
|
-
promotion:
|
|
3675
|
+
profile: ct.drawerProfile,
|
|
3676
|
+
promotion: He.value,
|
|
3522
3677
|
dismissal: "guarded",
|
|
3523
3678
|
beforeClose: ft,
|
|
3524
3679
|
onClose: pt
|
|
3525
|
-
} :
|
|
3526
|
-
let e =
|
|
3527
|
-
return !e ||
|
|
3528
|
-
}), Le =
|
|
3529
|
-
|
|
3530
|
-
let
|
|
3531
|
-
let e =
|
|
3680
|
+
} : Ne.value ? { title: me.value } : {}), Ie = z(() => {
|
|
3681
|
+
let e = w.value;
|
|
3682
|
+
return !e || ae.value === void 0 ? !1 : JSON.stringify(e.actions) !== ae.value;
|
|
3683
|
+
}), Le = z(() => F.value >= 0 && [...k.entries()].some(([e, t]) => j.get(e) !== JSON.stringify(t))), K = z(() => Ie.value || Le.value);
|
|
3684
|
+
fe(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => K.value, () => O.value);
|
|
3685
|
+
let q = z(() => S.value.length > 0 && S.value.every((e) => e.granted)), Be = z(() => S.value.some((e) => e.granted) && !q.value), Ve = z(() => {
|
|
3686
|
+
let e = ve.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = S.value.filter((e) => e.granted).length, r = K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
|
|
3532
3687
|
return n.t("platform.screen.RoleAuthorizationView.current-module-value-value-value-actions-granted-value", "当前模块:{value1} · 已授权 {value2}/{value3} 项 · {value4}", {
|
|
3533
3688
|
value1: e,
|
|
3534
3689
|
value2: t,
|
|
3535
|
-
value3:
|
|
3690
|
+
value3: S.value.length,
|
|
3536
3691
|
value4: r
|
|
3537
3692
|
});
|
|
3538
|
-
}),
|
|
3539
|
-
view:
|
|
3693
|
+
}), He = Er({
|
|
3694
|
+
view: ct,
|
|
3540
3695
|
input: () => d,
|
|
3541
|
-
title:
|
|
3696
|
+
title: me,
|
|
3542
3697
|
eligibility: () => ({
|
|
3543
|
-
hasStableIdentity: !!(l &&
|
|
3544
|
-
busy:
|
|
3698
|
+
hasStableIdentity: !!(l && g.value),
|
|
3699
|
+
busy: O.value
|
|
3545
3700
|
}),
|
|
3546
|
-
beforePromote: (e) =>
|
|
3547
|
-
selectedModuleAlias:
|
|
3548
|
-
dataGrantMatrix:
|
|
3549
|
-
actionDrafts: [...
|
|
3701
|
+
beforePromote: (e) => Fr(e, {
|
|
3702
|
+
selectedModuleAlias: b.value,
|
|
3703
|
+
dataGrantMatrix: w.value,
|
|
3704
|
+
actionDrafts: [...k.entries()].map(([e, t]) => ({
|
|
3550
3705
|
moduleAlias: e,
|
|
3551
3706
|
actions: t
|
|
3552
3707
|
})),
|
|
3553
|
-
actionSnapshots: [...
|
|
3708
|
+
actionSnapshots: [...j.entries()].map(([e, t]) => ({
|
|
3554
3709
|
moduleAlias: e,
|
|
3555
3710
|
snapshot: t
|
|
3556
3711
|
}))
|
|
3557
3712
|
}).then((e) => e === "accepted"),
|
|
3558
3713
|
onPromoted: mt,
|
|
3559
|
-
onPromotionRejected: () =>
|
|
3714
|
+
onPromotionRejected: () => Te(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
|
|
3560
3715
|
language: n,
|
|
3561
3716
|
source: "role-authorization",
|
|
3562
3717
|
phase: "validation"
|
|
3563
3718
|
})
|
|
3564
3719
|
});
|
|
3565
|
-
|
|
3566
|
-
d && !
|
|
3567
|
-
}), Q(
|
|
3568
|
-
|
|
3569
|
-
}, { immediate: !0 }), Q(
|
|
3570
|
-
|
|
3720
|
+
qe(() => {
|
|
3721
|
+
d && !je.value && (ce = Ir(d, ht)), Je();
|
|
3722
|
+
}), Q(me, (e) => {
|
|
3723
|
+
Me.value && u?.setTitle(e);
|
|
3724
|
+
}, { immediate: !0 }), Q(b, () => void Ye()), Q([
|
|
3725
|
+
pe,
|
|
3571
3726
|
Ve,
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
],
|
|
3577
|
-
|
|
3727
|
+
K,
|
|
3728
|
+
O,
|
|
3729
|
+
I,
|
|
3730
|
+
le
|
|
3731
|
+
], Ge, { immediate: !0 }), qe(() => window.addEventListener("beforeunload", _t)), Ke(() => {
|
|
3732
|
+
ce?.(), r.drawerContext?.setOperation(void 0), r.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", _t);
|
|
3578
3733
|
});
|
|
3579
|
-
function
|
|
3734
|
+
function Ge() {
|
|
3580
3735
|
let e = r.drawerContext;
|
|
3581
3736
|
if (e) {
|
|
3582
|
-
if (e.setSubtitle(`${
|
|
3737
|
+
if (e.setSubtitle(`${pe.value} · ${vt(g.value)}`), I.value) {
|
|
3583
3738
|
e.setOperation(void 0);
|
|
3584
3739
|
return;
|
|
3585
3740
|
}
|
|
3586
3741
|
e.setOperation({
|
|
3587
|
-
summary:
|
|
3742
|
+
summary: le.value ? K.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ve.value,
|
|
3588
3743
|
actions: [{
|
|
3589
3744
|
key: "confirm-role-authorization",
|
|
3590
3745
|
label: n.t("platform.screen.UiModal.confirmText", "确认"),
|
|
3591
3746
|
emphasis: "primary",
|
|
3592
|
-
disabled:
|
|
3593
|
-
loading:
|
|
3747
|
+
disabled: O.value || !K.value,
|
|
3748
|
+
loading: O.value,
|
|
3594
3749
|
run: () => void dt()
|
|
3595
3750
|
}]
|
|
3596
3751
|
});
|
|
@@ -3598,51 +3753,51 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3598
3753
|
}
|
|
3599
3754
|
async function Je() {
|
|
3600
3755
|
if (!l) {
|
|
3601
|
-
|
|
3756
|
+
ne.value = new oe(_e(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
|
|
3602
3757
|
return;
|
|
3603
3758
|
}
|
|
3604
|
-
|
|
3759
|
+
E.value = !0, ne.value = void 0;
|
|
3605
3760
|
try {
|
|
3606
|
-
if (
|
|
3607
|
-
if (
|
|
3761
|
+
if (g.value = await s.crud.view(l), g.value.roleKind === "group") return;
|
|
3762
|
+
if (g.value.roleKind === "dataGrant") {
|
|
3608
3763
|
let [e, t] = await Promise.all([c.dataGrantActionMatrix(l), c.dataScopePolicyCatalog(l)]);
|
|
3609
|
-
|
|
3764
|
+
w.value = p?.dataGrantMatrix ?? e, te.value = t, ae.value = JSON.stringify(e.actions);
|
|
3610
3765
|
return;
|
|
3611
3766
|
}
|
|
3612
|
-
|
|
3767
|
+
v.value = (await c.authorizationModules(l)).records, b.value = p?.selectedModuleAlias ?? v.value[0]?.moduleAlias;
|
|
3613
3768
|
} catch (e) {
|
|
3614
|
-
|
|
3769
|
+
ne.value = new oe(_e(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), M(e, {
|
|
3615
3770
|
language: n,
|
|
3616
3771
|
source: "role-authorization",
|
|
3617
3772
|
phase: "load"
|
|
3618
3773
|
});
|
|
3619
3774
|
} finally {
|
|
3620
|
-
|
|
3775
|
+
E.value = !1;
|
|
3621
3776
|
}
|
|
3622
3777
|
}
|
|
3623
3778
|
async function Ye() {
|
|
3624
|
-
let e =
|
|
3625
|
-
if (!(!e ||
|
|
3626
|
-
|
|
3779
|
+
let e = b.value;
|
|
3780
|
+
if (!(!e || le.value || I.value)) {
|
|
3781
|
+
D.value = !0;
|
|
3627
3782
|
try {
|
|
3628
|
-
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(
|
|
3629
|
-
|
|
3783
|
+
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(st), i = p?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = k.get(e) ?? i;
|
|
3784
|
+
S.value = a ?? r, k.has(e) || (k.set(e, S.value), j.set(e, p?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, te.value = n;
|
|
3630
3785
|
} catch (e) {
|
|
3631
|
-
|
|
3786
|
+
M(e, {
|
|
3632
3787
|
language: n,
|
|
3633
3788
|
source: "role-authorization",
|
|
3634
3789
|
phase: "load"
|
|
3635
3790
|
});
|
|
3636
3791
|
} finally {
|
|
3637
|
-
|
|
3792
|
+
D.value = !1;
|
|
3638
3793
|
}
|
|
3639
3794
|
}
|
|
3640
3795
|
}
|
|
3641
3796
|
function Xe(e, t) {
|
|
3642
|
-
t && e.dataAuth &&
|
|
3797
|
+
t && e.dataAuth && ue.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, F.value += 1;
|
|
3643
3798
|
}
|
|
3644
|
-
function
|
|
3645
|
-
|
|
3799
|
+
function Ze(e) {
|
|
3800
|
+
S.value.forEach((t) => Xe(t, e));
|
|
3646
3801
|
}
|
|
3647
3802
|
function et(e, t) {
|
|
3648
3803
|
if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
|
|
@@ -3665,82 +3820,82 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3665
3820
|
return e.dataScopePolicy ?? "inheritDataGrant";
|
|
3666
3821
|
}
|
|
3667
3822
|
function at(e) {
|
|
3668
|
-
return !!e.dataAuth &&
|
|
3823
|
+
return !!e.dataAuth && ue.value;
|
|
3669
3824
|
}
|
|
3670
3825
|
function ot(e, t) {
|
|
3671
3826
|
return e.key === "dataScopePolicy" && at(t);
|
|
3672
3827
|
}
|
|
3673
|
-
function
|
|
3674
|
-
return
|
|
3828
|
+
function st(e) {
|
|
3829
|
+
return ue.value && e.dataAuth && e.dataScopePolicy === "none" ? {
|
|
3675
3830
|
...e,
|
|
3676
3831
|
dataScopePolicy: "inheritDataGrant"
|
|
3677
3832
|
} : e;
|
|
3678
3833
|
}
|
|
3679
3834
|
async function lt() {
|
|
3680
|
-
if (
|
|
3681
|
-
|
|
3835
|
+
if (w.value) {
|
|
3836
|
+
O.value = !0;
|
|
3682
3837
|
try {
|
|
3683
|
-
let e = await c.replaceDataGrantActions(l,
|
|
3838
|
+
let e = await c.replaceDataGrantActions(l, w.value.actions.map((e) => ({
|
|
3684
3839
|
actionCode: e.actionCode,
|
|
3685
3840
|
dataScopePolicy: e.dataScopePolicy,
|
|
3686
3841
|
enabled: e.configured
|
|
3687
3842
|
})));
|
|
3688
|
-
await
|
|
3843
|
+
await se(e, {
|
|
3689
3844
|
language: n,
|
|
3690
3845
|
source: "role-authorization",
|
|
3691
3846
|
phase: "action",
|
|
3692
3847
|
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.data-permission-template-saved", "数据权限模板已保存")
|
|
3693
|
-
}),
|
|
3848
|
+
}), ae.value = JSON.stringify(w.value.actions);
|
|
3694
3849
|
} catch (e) {
|
|
3695
|
-
|
|
3850
|
+
M(e, {
|
|
3696
3851
|
language: n,
|
|
3697
3852
|
source: "role-authorization",
|
|
3698
3853
|
phase: "action"
|
|
3699
3854
|
});
|
|
3700
3855
|
} finally {
|
|
3701
|
-
|
|
3856
|
+
O.value = !1;
|
|
3702
3857
|
}
|
|
3703
3858
|
}
|
|
3704
3859
|
}
|
|
3705
3860
|
async function ut() {
|
|
3706
|
-
let e = [...
|
|
3861
|
+
let e = [...k.entries()].filter(([e, t]) => j.get(e) !== JSON.stringify(t));
|
|
3707
3862
|
if (e.length) {
|
|
3708
|
-
|
|
3863
|
+
O.value = !0;
|
|
3709
3864
|
try {
|
|
3710
3865
|
let t = await c.replacePermissionMatrix(l, e.flatMap(([e, t]) => t.map((t) => ({
|
|
3711
3866
|
moduleAlias: e,
|
|
3712
3867
|
actionCode: t.actionCode,
|
|
3713
3868
|
granted: !!t.granted,
|
|
3714
|
-
dataScopePolicy: t.granted && t.dataAuth &&
|
|
3869
|
+
dataScopePolicy: t.granted && t.dataAuth && ue.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
|
|
3715
3870
|
referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
|
|
3716
3871
|
referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
|
|
3717
3872
|
}))));
|
|
3718
|
-
await
|
|
3873
|
+
await se(t, {
|
|
3719
3874
|
language: n,
|
|
3720
3875
|
source: "role-authorization",
|
|
3721
3876
|
phase: "action",
|
|
3722
3877
|
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.role-permissions-saved", "角色授权已保存")
|
|
3723
|
-
}), e.forEach(([e, t]) =>
|
|
3878
|
+
}), e.forEach(([e, t]) => j.set(e, JSON.stringify(t))), F.value += 1;
|
|
3724
3879
|
} catch (e) {
|
|
3725
|
-
|
|
3880
|
+
M(e, {
|
|
3726
3881
|
language: n,
|
|
3727
3882
|
source: "role-authorization",
|
|
3728
3883
|
phase: "action"
|
|
3729
3884
|
});
|
|
3730
3885
|
} finally {
|
|
3731
|
-
|
|
3886
|
+
O.value = !1;
|
|
3732
3887
|
}
|
|
3733
3888
|
}
|
|
3734
3889
|
}
|
|
3735
3890
|
async function dt() {
|
|
3736
|
-
if (
|
|
3891
|
+
if (le.value) {
|
|
3737
3892
|
await lt();
|
|
3738
3893
|
return;
|
|
3739
3894
|
}
|
|
3740
3895
|
await ut();
|
|
3741
3896
|
}
|
|
3742
3897
|
async function ft() {
|
|
3743
|
-
return !
|
|
3898
|
+
return !K.value || f({
|
|
3744
3899
|
title: n.t("platform.screen.RoleAuthorizationView.discard-unconfirmed-permission-changes", "放弃未确认的授权配置"),
|
|
3745
3900
|
content: n.t("platform.screen.RoleAuthorizationView.these-changes-have-not-been-confirmed-and-will-be-lost", "当前修改尚未确认,关闭后将丢失这些修改。"),
|
|
3746
3901
|
okText: n.t("platform.screen.WorkflowWorkbenchView.discard-changes", "放弃修改"),
|
|
@@ -3754,7 +3909,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3754
3909
|
gt();
|
|
3755
3910
|
}
|
|
3756
3911
|
function ht(e) {
|
|
3757
|
-
return !
|
|
3912
|
+
return !K.value && (b.value = e.selectedModuleAlias, w.value = e.dataGrantMatrix, k.clear(), j.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => k.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => j.set(e, t)), F.value += 1, !0);
|
|
3758
3913
|
}
|
|
3759
3914
|
function gt() {
|
|
3760
3915
|
if (r.drawer === !0) {
|
|
@@ -3764,59 +3919,59 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3764
3919
|
u?.dismiss();
|
|
3765
3920
|
}
|
|
3766
3921
|
function _t(e) {
|
|
3767
|
-
|
|
3922
|
+
K.value && (e.preventDefault(), e.returnValue = "");
|
|
3768
3923
|
}
|
|
3769
3924
|
function vt(e) {
|
|
3770
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", "租户范围");
|
|
3771
3926
|
}
|
|
3772
|
-
return (e, t) => (J(),
|
|
3773
|
-
default: $(() => [
|
|
3927
|
+
return (e, t) => (J(), B(Qe(Pe.value), We(ze(Fe.value)), Re({
|
|
3928
|
+
default: $(() => [U("section", { class: Ue(["role-authorization-page", { "role-authorization-page--drawer": je.value || de.value }]) }, [E.value ? (J(), B(Z(C), {
|
|
3774
3929
|
key: 0,
|
|
3775
3930
|
tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
|
|
3776
|
-
}, null, 8, ["tip"])) :
|
|
3931
|
+
}, null, 8, ["tip"])) : ie.value ? (J(), B(Z(ee), {
|
|
3777
3932
|
key: 1,
|
|
3778
3933
|
title: Z(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
|
|
3779
|
-
message:
|
|
3780
|
-
}, null, 8, ["title", "message"])) :
|
|
3934
|
+
message: ie.value
|
|
3935
|
+
}, null, 8, ["title", "message"])) : I.value ? (J(), B(Z(De), {
|
|
3781
3936
|
key: 2,
|
|
3782
3937
|
title: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
|
|
3783
3938
|
description: Z(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
|
|
3784
|
-
}, null, 8, ["title", "description"])) :
|
|
3939
|
+
}, null, 8, ["title", "description"])) : le.value && w.value ? (J(), B(Z(xe), {
|
|
3785
3940
|
key: 3,
|
|
3786
3941
|
class: "data-grant-content",
|
|
3787
|
-
title:
|
|
3942
|
+
title: Ne.value ? Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Z(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: pe.value }),
|
|
3788
3943
|
searchable: !1,
|
|
3789
3944
|
onRefresh: Je
|
|
3790
3945
|
}, {
|
|
3791
|
-
default: $(() => [
|
|
3946
|
+
default: $(() => [U("header", Rr, [U("div", null, [U("h3", null, X(Z(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), U("p", null, X(Z(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), Me.value ? V("v-if", !0) : (J(), B(Z(P), {
|
|
3792
3947
|
key: 0,
|
|
3793
3948
|
type: "primary",
|
|
3794
|
-
disabled: !
|
|
3795
|
-
loading:
|
|
3949
|
+
disabled: !K.value,
|
|
3950
|
+
loading: O.value,
|
|
3796
3951
|
onClick: dt
|
|
3797
3952
|
}, {
|
|
3798
|
-
default: $(() => [
|
|
3953
|
+
default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3799
3954
|
_: 1
|
|
3800
|
-
}, 8, ["disabled", "loading"]))]),
|
|
3801
|
-
columns:
|
|
3802
|
-
rows:
|
|
3955
|
+
}, 8, ["disabled", "loading"]))]), G(Z(T), {
|
|
3956
|
+
columns: Oe.value,
|
|
3957
|
+
rows: Ae.value,
|
|
3803
3958
|
"row-key": "actionCode",
|
|
3804
3959
|
"horizontal-scroll": ""
|
|
3805
3960
|
}, {
|
|
3806
|
-
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(),
|
|
3961
|
+
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), H(R, { key: 0 }, [U("strong", null, X(t.title || t.actionCode), 1), U("small", null, X(t.actionCode), 1)], 64)) : e.key === "configured" ? (J(), B(Z(re), {
|
|
3807
3962
|
key: 1,
|
|
3808
3963
|
checked: !!t.configured,
|
|
3809
|
-
disabled:
|
|
3964
|
+
disabled: O.value,
|
|
3810
3965
|
onChange: (e) => t.configured = e
|
|
3811
3966
|
}, null, 8, [
|
|
3812
3967
|
"checked",
|
|
3813
3968
|
"disabled",
|
|
3814
3969
|
"onChange"
|
|
3815
|
-
])) : (J(),
|
|
3970
|
+
])) : (J(), B(Z(Ce), {
|
|
3816
3971
|
key: 2,
|
|
3817
3972
|
value: t.dataScopePolicy,
|
|
3818
|
-
options:
|
|
3819
|
-
disabled: !t.configured ||
|
|
3973
|
+
options: ye.value,
|
|
3974
|
+
disabled: !t.configured || O.value,
|
|
3820
3975
|
placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
|
|
3821
3976
|
"allow-clear": !1,
|
|
3822
3977
|
"onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
|
|
@@ -3830,22 +3985,22 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3830
3985
|
_: 1
|
|
3831
3986
|
}, 8, ["columns", "rows"])]),
|
|
3832
3987
|
_: 1
|
|
3833
|
-
}, 8, ["title"])) : (J(),
|
|
3988
|
+
}, 8, ["title"])) : (J(), H("section", {
|
|
3834
3989
|
key: 4,
|
|
3835
|
-
class:
|
|
3836
|
-
}, [
|
|
3837
|
-
"search-keyword":
|
|
3838
|
-
"onUpdate:searchKeyword": t[1] ||= (e) =>
|
|
3990
|
+
class: Ue(["authorization-layout", { "authorization-layout--compact-actions": !we.value }])
|
|
3991
|
+
}, [G(Z(xe), {
|
|
3992
|
+
"search-keyword": x.value,
|
|
3993
|
+
"onUpdate:searchKeyword": t[1] ||= (e) => x.value = e,
|
|
3839
3994
|
class: "module-panel",
|
|
3840
3995
|
title: Z(n).t("platform.screen.RoleAuthorizationView.module-tree", "模块树"),
|
|
3841
3996
|
"refresh-title": Z(n).t("platform.screen.RoleAuthorizationView.refresh-module-directory", "刷新模块目录"),
|
|
3842
3997
|
"search-placeholder": Z(n).t("platform.screen.RoleAuthorizationView.search-module-names-or-aliases", "搜索模块名称或别名"),
|
|
3843
3998
|
onRefresh: Je
|
|
3844
3999
|
}, {
|
|
3845
|
-
default: $(() => [
|
|
3846
|
-
records:
|
|
3847
|
-
"selected-id":
|
|
3848
|
-
onSelect: t[0] ||= (e) =>
|
|
4000
|
+
default: $(() => [G(Z(m), {
|
|
4001
|
+
records: L.value,
|
|
4002
|
+
"selected-id": b.value,
|
|
4003
|
+
onSelect: t[0] ||= (e) => b.value = e.id
|
|
3849
4004
|
}, null, 8, ["records", "selected-id"])]),
|
|
3850
4005
|
_: 1
|
|
3851
4006
|
}, 8, [
|
|
@@ -3853,47 +4008,47 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3853
4008
|
"title",
|
|
3854
4009
|
"refresh-title",
|
|
3855
4010
|
"search-placeholder"
|
|
3856
|
-
]),
|
|
4011
|
+
]), G(Z(xe), {
|
|
3857
4012
|
class: "action-panel",
|
|
3858
4013
|
title: he.value,
|
|
3859
4014
|
searchable: !1
|
|
3860
|
-
},
|
|
3861
|
-
default: $(() => [
|
|
4015
|
+
}, Re({
|
|
4016
|
+
default: $(() => [D.value ? (J(), B(Z(C), {
|
|
3862
4017
|
key: 0,
|
|
3863
4018
|
tip: Z(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
|
|
3864
|
-
}, null, 8, ["tip"])) :
|
|
4019
|
+
}, null, 8, ["tip"])) : b.value ? (J(), B(Z(T), {
|
|
3865
4020
|
key: 2,
|
|
3866
4021
|
columns: Ee.value,
|
|
3867
|
-
rows:
|
|
4022
|
+
rows: ke.value,
|
|
3868
4023
|
"row-key": "actionCode",
|
|
3869
4024
|
"fill-height": "",
|
|
3870
4025
|
"horizontal-scroll": ""
|
|
3871
4026
|
}, {
|
|
3872
|
-
header: $(({ column: e }) => [e.key === "granted" ? (J(),
|
|
3873
|
-
checked:
|
|
4027
|
+
header: $(({ column: e }) => [e.key === "granted" ? (J(), H("span", zr, [G(Z(N), {
|
|
4028
|
+
checked: q.value,
|
|
3874
4029
|
indeterminate: Be.value,
|
|
3875
|
-
disabled:
|
|
4030
|
+
disabled: O.value || !S.value.length,
|
|
3876
4031
|
"aria-label": Z(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
|
|
3877
|
-
onChange:
|
|
4032
|
+
onChange: Ze
|
|
3878
4033
|
}, null, 8, [
|
|
3879
4034
|
"checked",
|
|
3880
4035
|
"indeterminate",
|
|
3881
4036
|
"disabled",
|
|
3882
4037
|
"aria-label"
|
|
3883
|
-
]),
|
|
3884
|
-
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(),
|
|
4038
|
+
]), W(" " + X(Z(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (J(), H(R, { key: 1 }, [W(X(e.title), 1)], 64))]),
|
|
4039
|
+
cell: $(({ column: e, record: t }) => [e.key === "title" ? (J(), H(R, { key: 0 }, [U("strong", null, X(t.title || t.actionCode), 1), U("small", null, X(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (J(), B(Z(N), {
|
|
3885
4040
|
key: 1,
|
|
3886
4041
|
checked: !!t.granted,
|
|
3887
|
-
disabled:
|
|
4042
|
+
disabled: O.value,
|
|
3888
4043
|
onChange: (e) => Xe(t, e)
|
|
3889
4044
|
}, null, 8, [
|
|
3890
4045
|
"checked",
|
|
3891
4046
|
"disabled",
|
|
3892
4047
|
"onChange"
|
|
3893
|
-
])) : t.dataAuth &&
|
|
4048
|
+
])) : t.dataAuth && ue.value && t.granted ? (J(), H("div", Br, [G(Z(Ce), {
|
|
3894
4049
|
value: it(t),
|
|
3895
|
-
options:
|
|
3896
|
-
disabled:
|
|
4050
|
+
options: ye.value,
|
|
4051
|
+
disabled: O.value,
|
|
3897
4052
|
"allow-clear": !1,
|
|
3898
4053
|
"onUpdate:value": (e) => et(t, e)
|
|
3899
4054
|
}, null, 8, [
|
|
@@ -3901,10 +4056,10 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3901
4056
|
"options",
|
|
3902
4057
|
"disabled",
|
|
3903
4058
|
"onUpdate:value"
|
|
3904
|
-
]), t.dataScopePolicy === "referenceDependency" ? (J(),
|
|
4059
|
+
]), t.dataScopePolicy === "referenceDependency" ? (J(), H(R, { key: 0 }, [G(Z(Ce), {
|
|
3905
4060
|
value: rt(t.referenceFieldId),
|
|
3906
4061
|
options: be.value,
|
|
3907
|
-
disabled:
|
|
4062
|
+
disabled: O.value,
|
|
3908
4063
|
placeholder: Z(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
|
|
3909
4064
|
"allow-clear": !1,
|
|
3910
4065
|
"onUpdate:value": (e) => tt(t, e)
|
|
@@ -3914,48 +4069,48 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3914
4069
|
"disabled",
|
|
3915
4070
|
"placeholder",
|
|
3916
4071
|
"onUpdate:value"
|
|
3917
|
-
]), t.referenceFieldId ? (J(),
|
|
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))]),
|
|
3918
4073
|
_: 1
|
|
3919
|
-
}, 8, ["columns", "rows"])) : (J(),
|
|
4074
|
+
}, 8, ["columns", "rows"])) : (J(), B(Z(De), {
|
|
3920
4075
|
key: 1,
|
|
3921
4076
|
title: Z(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
|
|
3922
4077
|
}, null, 8, ["title"]))]),
|
|
3923
4078
|
_: 2
|
|
3924
|
-
}, [
|
|
4079
|
+
}, [Me.value ? void 0 : {
|
|
3925
4080
|
name: "actions",
|
|
3926
|
-
fn: $(() => [
|
|
4081
|
+
fn: $(() => [G(Z(P), {
|
|
3927
4082
|
type: "primary",
|
|
3928
|
-
disabled: !
|
|
3929
|
-
loading:
|
|
4083
|
+
disabled: !K.value,
|
|
4084
|
+
loading: O.value,
|
|
3930
4085
|
onClick: dt
|
|
3931
4086
|
}, {
|
|
3932
|
-
default: $(() => [
|
|
4087
|
+
default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3933
4088
|
_: 1
|
|
3934
4089
|
}, 8, ["disabled", "loading"])]),
|
|
3935
4090
|
key: "0"
|
|
3936
4091
|
}]), 1032, ["title"])], 2))], 2)]),
|
|
3937
4092
|
_: 2
|
|
3938
|
-
}, [
|
|
4093
|
+
}, [Ne.value && !I.value ? {
|
|
3939
4094
|
name: "operation",
|
|
3940
|
-
fn: $(() => [
|
|
4095
|
+
fn: $(() => [G(Z(P), {
|
|
3941
4096
|
type: "primary",
|
|
3942
|
-
disabled: !
|
|
3943
|
-
loading:
|
|
4097
|
+
disabled: !K.value,
|
|
4098
|
+
loading: O.value,
|
|
3944
4099
|
onClick: dt
|
|
3945
4100
|
}, {
|
|
3946
|
-
default: $(() => [
|
|
4101
|
+
default: $(() => [W(X(Z(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3947
4102
|
_: 1
|
|
3948
4103
|
}, 8, ["disabled", "loading"])]),
|
|
3949
4104
|
key: "0"
|
|
3950
4105
|
} : void 0]), 1040));
|
|
3951
4106
|
}
|
|
3952
|
-
}),
|
|
4107
|
+
}), Kr = /* @__PURE__ */ e({ default: () => qr }), qr = /*#__PURE__*/ L(Gr, [["__scopeId", "data-v-817d8433"]]), Jr = { class: "role-authorization-drawer-surface" }, Yr = /*#__PURE__*/ L(/* @__PURE__ */ q({
|
|
3953
4108
|
name: "RoleAuthorizationDrawerSurface",
|
|
3954
4109
|
__name: "RoleAuthorizationDrawerSurface",
|
|
3955
4110
|
props: { context: {} },
|
|
3956
4111
|
setup(e) {
|
|
3957
4112
|
let t = e, n = t.context.module;
|
|
3958
|
-
return (e, r) => (J(),
|
|
4113
|
+
return (e, r) => (J(), H("section", Jr, [t.context.record?.id == null ? V("v-if", !0) : (J(), B(qr, {
|
|
3959
4114
|
key: 0,
|
|
3960
4115
|
"role-id": String(t.context.record.id),
|
|
3961
4116
|
"module-context": Z(n),
|
|
@@ -3966,43 +4121,43 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
3966
4121
|
"drawer-context"
|
|
3967
4122
|
]))]));
|
|
3968
4123
|
}
|
|
3969
|
-
}), [["__scopeId", "data-v-04d29709"]]),
|
|
4124
|
+
}), [["__scopeId", "data-v-04d29709"]]), Xr = {
|
|
3970
4125
|
key: 0,
|
|
3971
4126
|
class: "role-group-member-form-field"
|
|
3972
|
-
},
|
|
4127
|
+
}, Zr = {
|
|
3973
4128
|
id: "iam-role-scope-and-actions",
|
|
3974
4129
|
target: { moduleAlias: "iam.role" },
|
|
3975
4130
|
navigator: {
|
|
3976
4131
|
bypassListScope: !0,
|
|
3977
4132
|
extension: {
|
|
3978
4133
|
key: "iam-role-scope-tree",
|
|
3979
|
-
component:
|
|
4134
|
+
component: tr,
|
|
3980
4135
|
selection: { kind: "roleScope" }
|
|
3981
4136
|
}
|
|
3982
4137
|
},
|
|
3983
4138
|
list: { cellComponents: [
|
|
3984
4139
|
{
|
|
3985
4140
|
key: "assignmentType",
|
|
3986
|
-
cell:
|
|
4141
|
+
cell: nr
|
|
3987
4142
|
},
|
|
3988
4143
|
{
|
|
3989
4144
|
key: "roleKind",
|
|
3990
|
-
cell:
|
|
4145
|
+
cell: nr
|
|
3991
4146
|
},
|
|
3992
4147
|
{
|
|
3993
4148
|
key: "sharePolicy",
|
|
3994
|
-
cell:
|
|
4149
|
+
cell: nr
|
|
3995
4150
|
}
|
|
3996
4151
|
] },
|
|
3997
4152
|
form: {
|
|
3998
4153
|
contributions: [{
|
|
3999
4154
|
key: "role-group-members",
|
|
4000
|
-
component: /* @__PURE__ */
|
|
4155
|
+
component: /* @__PURE__ */ L(/* @__PURE__ */ q({
|
|
4001
4156
|
name: "RoleGroupMemberFormField",
|
|
4002
4157
|
__name: "RoleGroupMemberFormField",
|
|
4003
4158
|
props: { context: {} },
|
|
4004
4159
|
setup(e) {
|
|
4005
|
-
let t =
|
|
4160
|
+
let t = A(), n = e, r = Y([]), i = Y(!1), a = z(() => n.context.draft.roleKind === "group"), o = z(() => f(n.context.draft.memberRoleIds)), s = z(() => String(n.context.draft.id ?? "") || void 0), c = z(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = z(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
|
|
4006
4161
|
label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? t.t("platform.screen.RoleManagementView.data-authorization-role", "数据授权角色") : t.t("platform.screen.RoleManagementView.standard-role", "标准角色")}`,
|
|
4007
4162
|
value: e.id,
|
|
4008
4163
|
disabled: e.roleKind === "dataGrant" && c.value.size > 0 && !o.value.includes(e.id)
|
|
@@ -4061,7 +4216,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4061
4216
|
function f(e) {
|
|
4062
4217
|
return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
4063
4218
|
}
|
|
4064
|
-
return (n, r) => a.value ? (J(),
|
|
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(Ce), {
|
|
4065
4220
|
mode: "multiple",
|
|
4066
4221
|
value: o.value,
|
|
4067
4222
|
options: l.value,
|
|
@@ -4076,7 +4231,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4076
4231
|
"loading",
|
|
4077
4232
|
"placeholder",
|
|
4078
4233
|
"disabled"
|
|
4079
|
-
])])) :
|
|
4234
|
+
])])) : V("v-if", !0);
|
|
4080
4235
|
}
|
|
4081
4236
|
}), [["__scopeId", "data-v-5dd40ab2"]]),
|
|
4082
4237
|
location: {
|
|
@@ -4105,7 +4260,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4105
4260
|
title: "绑定用户",
|
|
4106
4261
|
titleKey: "platform.screen.RoleManagementView.assign-to-users",
|
|
4107
4262
|
width: "extraWide",
|
|
4108
|
-
component:
|
|
4263
|
+
component: mr
|
|
4109
4264
|
});
|
|
4110
4265
|
}
|
|
4111
4266
|
},
|
|
@@ -4123,7 +4278,7 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4123
4278
|
title: "绑定任职",
|
|
4124
4279
|
titleKey: "platform.screen.RoleManagementView.assign-to-positions",
|
|
4125
4280
|
width: "extraWide",
|
|
4126
|
-
component:
|
|
4281
|
+
component: Cr
|
|
4127
4282
|
});
|
|
4128
4283
|
}
|
|
4129
4284
|
},
|
|
@@ -4141,21 +4296,22 @@ var Ar = { class: "panel-title" }, jr = {
|
|
|
4141
4296
|
title: "角色授权",
|
|
4142
4297
|
titleKey: "platform.unsaved-source.RoleAuthorizationView",
|
|
4143
4298
|
width: "wide",
|
|
4144
|
-
component:
|
|
4299
|
+
component: Yr
|
|
4145
4300
|
});
|
|
4146
4301
|
}
|
|
4147
4302
|
}
|
|
4148
4303
|
]
|
|
4149
4304
|
};
|
|
4150
|
-
o("platform-admin-runtime",
|
|
4151
|
-
Kt,
|
|
4305
|
+
o("platform-admin-runtime", lt), l("platform-admin-runtime", [
|
|
4152
4306
|
qt,
|
|
4153
4307
|
Jt,
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4308
|
+
Yt,
|
|
4309
|
+
nn,
|
|
4310
|
+
un,
|
|
4311
|
+
gn,
|
|
4312
|
+
kn,
|
|
4313
|
+
Zr,
|
|
4314
|
+
In
|
|
4159
4315
|
]);
|
|
4160
4316
|
//#endregion
|
|
4161
|
-
export {
|
|
4317
|
+
export { Mr as a, pr as c, jr as i, st as l, Kr as n, Er as o, Ar as r, Sr as s, qr as t };
|