@ximatai/muyun-web-app 0.26.17 → 0.26.18
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-9RrW-RKb.js → BusinessActivityLogView-CNW817Sf.js} +2 -2
- package/dist/BusinessLogListDrawer-YiJxOlnD.js +864 -0
- package/dist/CodeConfigurationView-DU8tjPMt.js +1667 -0
- package/dist/{ConfigurationTranslationView-Bh_ekuMP.js → ConfigurationTranslationView-CbBt5s1q.js} +22 -22
- package/dist/{LoginAuditLogView-DG6iBXEn.js → LoginAuditLogView-CZF1Jfq_.js} +2 -2
- package/dist/ModuleActionManagementView-CaiXH1l_.js +755 -0
- package/dist/{ModuleGovernanceView-C53RnUzc.js → ModuleGovernanceView-CcwGyO3x.js} +3856 -4000
- package/dist/{RequestErrorLogView-Ba5p0hLE.js → RequestErrorLogView-DpudZrC2.js} +2 -2
- package/dist/RoleDetailWorkspaceView-DNMGsAJC.js +1435 -0
- package/dist/{RuntimeLogView-BFEABm8G.js → RuntimeLogView-444BL_xs.js} +60 -60
- package/dist/WorkflowAdministrationView-C-VIjvwB.js +650 -0
- package/dist/{WorkflowConfigurationView-A0m5tBX9.js → WorkflowConfigurationView-DLFY2x7V.js} +302 -289
- package/dist/WorkflowWorkbenchView-Gr02dbBc.js +759 -0
- package/dist/codeConfiguration-ChJ6ktRR.js +208 -0
- package/dist/index.css +1 -1
- package/dist/index.js +473 -463
- package/dist/{moduleGovernanceWorkspaceView-DNKzYX0x.js → moduleMenuWorkspace-B8DKwC3L.js} +224 -265
- package/dist/{platform-components-BBfyINHa.js → platform-components-5AE0j2_3.js} +4597 -4630
- package/dist/{platform-workbench-C1hmkOUD.js → platform-workbench-BhZPARiH.js} +4887 -4929
- package/dist/types/app/DevelopmentTopbarActions.vue.d.ts +9 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +5 -1
- package/dist/types/consumer/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +2 -2
- package/dist/types/platform-admin-runtime/ModuleCodeConfigurationStatus.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/moduleCodeConfiguration.d.ts +15 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +4 -2
- package/dist/types/platform-components/RecordRelationActionButton.vue.d.ts +16 -0
- package/dist/types/{dynamic-page-runtime → platform-components}/TenantScopeExplorer.vue.d.ts +1 -1
- package/dist/types/platform-components/index.d.ts +2 -0
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +10 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +4 -0
- package/dist/types/platform-components/useBusinessCodeForm.d.ts +36 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +6 -2
- package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +13 -1
- package/dist/types/views/CodeConfigurationView.vue.d.ts +8 -0
- package/dist/types/views/CodeRuleFormatEditor.vue.d.ts +17 -0
- package/dist/types/views/codeConfiguration.d.ts +127 -0
- package/dist/types/views/codeConfigurationWorkspaceView.d.ts +5 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiDatePicker.vue.d.ts +33 -0
- package/dist/types/vue-ui-antdv/components/UiHelp.vue.d.ts +16 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +12 -4
- package/dist/types/vue-ui-antdv/datePickerCalendar.d.ts +472 -0
- package/dist/types/vue-ui-antdv/datePickerValue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/index.d.ts +3 -0
- package/dist/types/vue-ui-antdv/languageLocales.d.ts +2 -0
- package/dist/types/web-contracts/index.d.ts +14 -0
- package/dist/{workspaceViews-BpH71LKQ.js → workspaceViews-DeBqozVb.js} +1046 -902
- package/package.json +4 -1
- package/dist/BusinessLogListDrawer-DYVx9tiQ.js +0 -864
- package/dist/ModuleActionManagementView-DgHqhoMN.js +0 -755
- package/dist/RoleDetailWorkspaceView-C3TBqksY.js +0 -1435
- package/dist/WorkflowAdministrationView-BOHG2e-I.js +0 -650
- package/dist/WorkflowWorkbenchView-DGpNDt5V.js +0 -759
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime-BAC7EHh5.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { M as t, T as n, d as r, j as i, lt as a, m as o, ut as s, x as c, y as l } from "./platform-workbench-BhZPARiH.js";
|
|
3
|
+
import { $ as u, $i as d, $n as f, An as p, Cn as m, D as h, Dn as g, Fa as _, Fr as v, Hn as y, Ia as b, Ir as x, Kn as S, L as C, Ma as w, Na as T, Nn as E, Nt as D, On as O, Qi as ee, Sa as te, Sn as ne, T as re, U as ie, Xn as k, Yn as ae, Zi as oe, Zn as se, bn as ce, ea as A, et as le, ga as ue, kn as j, ln as de, on as fe, pa as M, sn as N, tr as P, ua as F, va as pe, xa as me, xn as he, yr as ge, z as _e } from "./platform-components-5AE0j2_3.js";
|
|
4
|
+
import { d as ve, m as ye, p as be } from "./codeConfiguration-ChJ6ktRR.js";
|
|
5
|
+
import { a as xe, i as Se, o as Ce, r as we, s as Te, t as Ee } from "./moduleMenuWorkspace-B8DKwC3L.js";
|
|
6
|
+
import { Fragment as I, computed as L, createBlock as R, createCommentVNode as z, createElementBlock as B, createElementVNode as V, createSlots as De, createTextVNode as H, createVNode as U, defineAsyncComponent as W, defineComponent as G, guardReactiveProps as Oe, mergeProps as ke, nextTick as Ae, normalizeClass as je, normalizeProps as Me, onBeforeUnmount as Ne, onMounted as Pe, onScopeDispose as Fe, onUnmounted as Ie, openBlock as K, ref as q, renderList as Le, renderSlot as Re, resolveDynamicComponent as ze, shallowRef as Be, toDisplayString as J, toRaw as Ve, toValue as He, unref as Y, watch as X, withCtx as Z, withKeys as Ue, withModifiers as We } from "vue";
|
|
7
|
+
//#region src/views/codeConfigurationWorkspaceView.ts
|
|
8
|
+
var Ge = ye({
|
|
9
|
+
type: "platform.code.configuration",
|
|
10
|
+
route: "/_platform/workspace/platform.code.configuration",
|
|
11
|
+
moduleAlias: "platform.code_rule",
|
|
12
|
+
component: W(() => import("./CodeConfigurationView-DU8tjPMt.js").then((e) => e.n)),
|
|
13
|
+
layout: "workspace",
|
|
14
|
+
routeTitle: "业务编码",
|
|
15
|
+
routeTitleKey: "platform.code.config.title",
|
|
16
|
+
presentations: ["tab"],
|
|
17
|
+
titleKey: "platform.code.config.workspace-title",
|
|
18
|
+
titleArgsOf: (e) => ({ module: e.moduleTitle ?? e.moduleAlias ?? "全部模块" }),
|
|
19
|
+
titleOf: (e) => `业务编码:${e.moduleTitle ?? e.moduleAlias ?? "全部模块"}`,
|
|
20
|
+
tabIdentityParamsOf: (e) => ({ moduleAlias: e.moduleAlias ?? "all" }),
|
|
21
|
+
parentRouteQueryOf: () => ({}),
|
|
22
|
+
parse(e) {
|
|
23
|
+
return {
|
|
24
|
+
...typeof e.moduleAlias == "string" && e.moduleAlias ? { moduleAlias: e.moduleAlias } : {},
|
|
25
|
+
...typeof e.moduleTitle == "string" && e.moduleTitle ? { moduleTitle: e.moduleTitle } : {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}), Q = /* @__PURE__ */ new Set([
|
|
8
29
|
"platform",
|
|
9
30
|
"tenant",
|
|
10
31
|
"organization"
|
|
11
|
-
]),
|
|
32
|
+
]), Ke = ye({
|
|
12
33
|
type: "iam.role.detail",
|
|
13
34
|
route: "/iam/role",
|
|
14
35
|
moduleAlias: "iam.role",
|
|
15
|
-
component:
|
|
36
|
+
component: W(() => import("./RoleDetailWorkspaceView-DNMGsAJC.js")),
|
|
16
37
|
layout: "workspace",
|
|
17
38
|
routeTitle: "角色管理",
|
|
18
39
|
routeTitleKey: "platform.workspace-view.roles.route-title",
|
|
@@ -27,17 +48,17 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
27
48
|
},
|
|
28
49
|
parse(e) {
|
|
29
50
|
let t = e.recordId, n = e.scopeKind, r = e.scopeId;
|
|
30
|
-
if (!(typeof t != "string" || !t || typeof n != "string" || !
|
|
51
|
+
if (!(typeof t != "string" || !t || typeof n != "string" || !Q.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
|
|
31
52
|
recordId: t,
|
|
32
53
|
scopeKind: n,
|
|
33
54
|
...typeof r == "string" ? { scopeId: r } : {}
|
|
34
55
|
};
|
|
35
56
|
}
|
|
36
|
-
}),
|
|
57
|
+
}), qe = ye({
|
|
37
58
|
type: "iam.role.authorization",
|
|
38
59
|
route: "/iam/role/authorization",
|
|
39
60
|
moduleAlias: "iam.role",
|
|
40
|
-
component:
|
|
61
|
+
component: W(() => Promise.resolve().then(() => or)),
|
|
41
62
|
layout: "workspace",
|
|
42
63
|
routeTitle: "角色授权",
|
|
43
64
|
routeTitleKey: "platform.workspace-view.role-authorization.route-title",
|
|
@@ -49,11 +70,15 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
49
70
|
let t = e.roleId;
|
|
50
71
|
return typeof t == "string" && t ? { roleId: t } : void 0;
|
|
51
72
|
}
|
|
52
|
-
}),
|
|
73
|
+
}), Je = [
|
|
74
|
+
Ge,
|
|
75
|
+
Ke,
|
|
76
|
+
qe
|
|
77
|
+
], Ye = ye({
|
|
53
78
|
type: "platform.module.actions",
|
|
54
79
|
route: "/_platform/workspace/platform.module.actions",
|
|
55
80
|
moduleAlias: "platform.module",
|
|
56
|
-
component:
|
|
81
|
+
component: W(() => import("./ModuleActionManagementView-CaiXH1l_.js").then((e) => e.n)),
|
|
57
82
|
layout: "workspace",
|
|
58
83
|
routeTitle: "模块管理",
|
|
59
84
|
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
@@ -70,11 +95,11 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
70
95
|
...e.moduleKind === "static" || e.moduleKind === "dynamic" ? { moduleKind: e.moduleKind } : {}
|
|
71
96
|
};
|
|
72
97
|
}
|
|
73
|
-
}),
|
|
98
|
+
}), Xe = ye({
|
|
74
99
|
type: "platform.module.workflows",
|
|
75
100
|
route: "/_platform/workspace/platform.module.workflows",
|
|
76
101
|
moduleAlias: "platform.module",
|
|
77
|
-
component:
|
|
102
|
+
component: W(() => import("./WorkflowConfigurationView-DLFY2x7V.js")),
|
|
78
103
|
layout: "workspace",
|
|
79
104
|
routeTitle: "模块管理",
|
|
80
105
|
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
@@ -89,20 +114,20 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
89
114
|
...typeof e.moduleTitle == "string" ? { moduleTitle: e.moduleTitle } : {}
|
|
90
115
|
};
|
|
91
116
|
}
|
|
92
|
-
}),
|
|
117
|
+
}), Ze = /* @__PURE__ */ G({
|
|
93
118
|
__name: "ModuleMenuDrawer",
|
|
94
119
|
props: { context: {} },
|
|
95
120
|
setup(e) {
|
|
96
|
-
let t =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]), d = u(), f = !0, p =
|
|
102
|
-
valid: () => f && !!
|
|
121
|
+
let t = b(), n = e, r = String(n.context.record?.alias ?? n.context.record?.id ?? ""), i = o(), a = Ee(), s = a?.language ?? t, c = l(), u = () => JSON.stringify([
|
|
122
|
+
c?.value?.userId,
|
|
123
|
+
c?.value?.tenantId,
|
|
124
|
+
c?.value?.organizationId,
|
|
125
|
+
c?.value?.system
|
|
126
|
+
]), d = u(), f = !0, p = a?.session(r) ?? we(Ce(n.context.module.http), r, {
|
|
127
|
+
valid: () => f && !!c?.value?.userId && u() === d,
|
|
103
128
|
active: () => f
|
|
104
|
-
},
|
|
105
|
-
return
|
|
129
|
+
}, Se(d, r, () => !!c?.value?.userId && u() === d, void 0, void 0, s), i?.refreshMenus, s), m = q();
|
|
130
|
+
return a?.focus(p), a?.showEditor(p), p.ready.value || p.load(), X([
|
|
106
131
|
p.canSave,
|
|
107
132
|
p.saving,
|
|
108
133
|
p.saved,
|
|
@@ -117,28 +142,28 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
117
142
|
loading: p.saving.value,
|
|
118
143
|
run: () => m.value?.save()
|
|
119
144
|
}]);
|
|
120
|
-
}, { immediate: !0 }),
|
|
145
|
+
}, { immediate: !0 }), X(p.saved, (e) => {
|
|
121
146
|
e && n.context.refreshDetailExtensions();
|
|
122
|
-
}),
|
|
123
|
-
f = !1,
|
|
124
|
-
}), (t, n) => (
|
|
147
|
+
}), Ne(() => {
|
|
148
|
+
f = !1, a?.hideEditor(p), a || p.dispose();
|
|
149
|
+
}), (t, n) => (K(), R(xe, {
|
|
125
150
|
ref_key: "editor",
|
|
126
151
|
ref: m,
|
|
127
|
-
session:
|
|
152
|
+
session: Y(p),
|
|
128
153
|
onOpened: n[0] ||= (t) => e.context.close()
|
|
129
154
|
}, null, 8, ["session"]));
|
|
130
155
|
}
|
|
131
|
-
}),
|
|
156
|
+
}), Qe = { class: "module-menu-entries" }, $e = { key: 0 }, et = {
|
|
132
157
|
key: 1,
|
|
133
158
|
role: "status"
|
|
134
|
-
},
|
|
159
|
+
}, tt = { key: 2 }, nt = { key: 0 }, rt = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
135
160
|
__name: "ModuleMenuEntriesSection",
|
|
136
161
|
props: { context: {} },
|
|
137
162
|
setup(e) {
|
|
138
|
-
let t =
|
|
139
|
-
|
|
140
|
-
async function
|
|
141
|
-
let e = ++d, t =
|
|
163
|
+
let t = b(), n = e, r = o(), i = q([]), a = L(() => i.value.flatMap(({ scheme: e, tree: r }) => Te(r, me(e, "title", t) ?? e.alias ?? e.id, t).filter(({ menu: e }) => e.moduleAlias === String(n.context.record.alias ?? n.context.record.id ?? "")))), s = q(/* @__PURE__ */ new Map()), c = q(!1), l = q(!1), u = L(() => l.value ? t.t("platform.screen.ModuleMenuEntriesSection.cannot-load-menu-entries-right-now-check-that-you-have", "暂时无法读取菜单入口,请确认有菜单管理权限后重试。") : ""), d = 0;
|
|
164
|
+
Ne(() => d++), X(() => [n.context.record.id, n.context.refreshKey], () => void p(), { immediate: !0 });
|
|
165
|
+
async function p() {
|
|
166
|
+
let e = ++d, t = Ce(n.context.module.http);
|
|
142
167
|
c.value = !0, l.value = !1, i.value = [], s.value = /* @__PURE__ */ new Map();
|
|
143
168
|
try {
|
|
144
169
|
let [n, r] = await Promise.all([t.schemes(), t.visible()]), a = await Promise.all(n.map(async (e) => ({
|
|
@@ -146,57 +171,176 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
146
171
|
tree: await t.tree(e.id)
|
|
147
172
|
})));
|
|
148
173
|
if (e !== d) return;
|
|
149
|
-
i.value = a, s.value = new Map(
|
|
174
|
+
i.value = a, s.value = new Map(Te(r).map(({ menu: e }) => [e.id, e]));
|
|
150
175
|
} catch {
|
|
151
176
|
e === d && (l.value = !0);
|
|
152
177
|
} finally {
|
|
153
178
|
e === d && (c.value = !1);
|
|
154
179
|
}
|
|
155
180
|
}
|
|
156
|
-
return (e, n) => (
|
|
181
|
+
return (e, n) => (K(), B("div", Qe, [c.value ? (K(), B("span", $e, J(Y(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : u.value ? (K(), B("div", et, [H(J(u.value) + " ", 1), U(Y(f), {
|
|
157
182
|
type: "link",
|
|
158
|
-
onClick:
|
|
183
|
+
onClick: p
|
|
159
184
|
}, {
|
|
160
|
-
default:
|
|
185
|
+
default: Z(() => [H(J(Y(t).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
161
186
|
_: 1
|
|
162
|
-
})])) :
|
|
187
|
+
})])) : a.value.length ? z("v-if", !0) : (K(), B("span", tt, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.no-menu-entry-yet-use-add-to-menu-above-to", "尚未添加到菜单,可通过上方“添加到菜单”设置入口。")), 1)), (K(!0), B(I, null, Le(a.value, (e) => (K(), B("div", {
|
|
163
188
|
key: e.menu.id,
|
|
164
189
|
class: "menu-entry"
|
|
165
|
-
}, [
|
|
190
|
+
}, [V("span", null, [H(J(e.path), 1), e.menu.enabled === !1 ? (K(), B("small", nt, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.disabled", "· 已停用")), 1)) : z("v-if", !0)]), s.value.has(e.menu.id) && Y(r)?.openMenu ? (K(), R(Y(f), {
|
|
166
191
|
key: 0,
|
|
167
192
|
type: "link",
|
|
168
|
-
onClick: (t) =>
|
|
193
|
+
onClick: (t) => Y(r).openMenu(s.value.get(e.menu.id))
|
|
169
194
|
}, {
|
|
170
|
-
default:
|
|
195
|
+
default: Z(() => [V("span", null, J(Y(t).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
|
|
171
196
|
_: 1
|
|
172
|
-
}, 8, ["onClick"])) :
|
|
197
|
+
}, 8, ["onClick"])) : z("v-if", !0)]))), 128))]));
|
|
198
|
+
}
|
|
199
|
+
}), [["__scopeId", "data-v-d5fd13ca"]]), it = /* @__PURE__ */ new WeakMap();
|
|
200
|
+
function at(e) {
|
|
201
|
+
let t = q({}), n = /* @__PURE__ */ new Map();
|
|
202
|
+
async function r(r) {
|
|
203
|
+
let i = (n.get(r) ?? 0) + 1;
|
|
204
|
+
n.set(r, i), t.value[r] = {
|
|
205
|
+
phase: "loading",
|
|
206
|
+
configurable: !1
|
|
207
|
+
};
|
|
208
|
+
try {
|
|
209
|
+
let a = await ve(e.http, r);
|
|
210
|
+
n.get(r) === i && (t.value[r] = {
|
|
211
|
+
...a,
|
|
212
|
+
phase: "ready"
|
|
213
|
+
});
|
|
214
|
+
} catch (e) {
|
|
215
|
+
n.get(r) === i && (t.value[r] = {
|
|
216
|
+
phase: "failed",
|
|
217
|
+
configurable: !1,
|
|
218
|
+
error: M(F(e))
|
|
219
|
+
});
|
|
220
|
+
}
|
|
173
221
|
}
|
|
174
|
-
|
|
222
|
+
return {
|
|
223
|
+
states: t,
|
|
224
|
+
refresh: r,
|
|
225
|
+
dispose: () => n.clear()
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function ot(e) {
|
|
229
|
+
e = Ve(e);
|
|
230
|
+
let t = it.get(e);
|
|
231
|
+
return t || (t = at(e), it.set(e, t)), t;
|
|
232
|
+
}
|
|
233
|
+
function st(e) {
|
|
234
|
+
e = Ve(e);
|
|
235
|
+
let n = ot(e), r = t((e) => {
|
|
236
|
+
if (e.changes.some((e) => [
|
|
237
|
+
"platform.module",
|
|
238
|
+
"platform.metadata",
|
|
239
|
+
"platform.metadata_field",
|
|
240
|
+
"platform.module_metadata_relation",
|
|
241
|
+
"platform.module_metadata_field"
|
|
242
|
+
].includes(e.moduleAlias))) for (let e of Object.keys(n.states.value)) n.refresh(e);
|
|
243
|
+
});
|
|
244
|
+
return () => {
|
|
245
|
+
r.unsubscribe(), n.dispose(), it.delete(e);
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function ct(e, t) {
|
|
249
|
+
let n = ot(e).states.value[t];
|
|
250
|
+
return n?.phase === "ready" && n.configurable;
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/platform-admin-runtime/ModuleCodeConfigurationStatus.vue?vue&type=script&setup=true&lang.ts
|
|
254
|
+
var lt = {
|
|
255
|
+
key: 0,
|
|
256
|
+
class: "module-code-status",
|
|
257
|
+
role: "status"
|
|
258
|
+
}, ut = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
259
|
+
__name: "ModuleCodeConfigurationStatus",
|
|
260
|
+
props: { context: {} },
|
|
261
|
+
setup(e) {
|
|
262
|
+
let t = e, n = b(), r = o(), i = L(() => ot(t.context.module)), a = L(() => String(t.context.record?.alias ?? t.context.record?.id ?? "")), c = L(() => i.value.states.value[a.value]);
|
|
263
|
+
X([
|
|
264
|
+
a,
|
|
265
|
+
() => t.context.mode,
|
|
266
|
+
() => t.context.module
|
|
267
|
+
], ([e, t]) => {
|
|
268
|
+
e && t === "view" && !i.value.states.value[e] && i.value.refresh(e);
|
|
269
|
+
}, { immediate: !0 });
|
|
270
|
+
let l = L(() => c.value?.reason), u = L(() => t.context.mode === "view" && !!a.value && (c.value?.phase === "failed" || t.context.record?.moduleKind === "dynamic" && c.value?.phase === "ready" && !c.value.configurable));
|
|
271
|
+
function d() {
|
|
272
|
+
r?.openPage(s(be, {
|
|
273
|
+
moduleAlias: a.value,
|
|
274
|
+
moduleTitle: String(t.context.record?.title ?? a.value),
|
|
275
|
+
governanceTab: "metadata"
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
278
|
+
return (e, t) => u.value ? (K(), B("div", lt, [c.value?.phase === "failed" ? (K(), B(I, { key: 0 }, [
|
|
279
|
+
V("span", null, J(Y(n).t("platform.code.config.catalog-failed", "暂时无法检查业务编码配置条件,请重试。")), 1),
|
|
280
|
+
V("span", null, J(c.value?.error), 1),
|
|
281
|
+
U(Y(f), {
|
|
282
|
+
type: "link",
|
|
283
|
+
onClick: t[0] ||= (e) => i.value.refresh(a.value)
|
|
284
|
+
}, {
|
|
285
|
+
default: Z(() => [H(J(Y(n).t("platform.code.config.retry", "重试")), 1)]),
|
|
286
|
+
_: 1
|
|
287
|
+
})
|
|
288
|
+
], 64)) : (K(), B(I, { key: 1 }, [V("span", null, J(Y(n).t(`platform.code.config.reason.${l.value}`, l.value === "no-model" ? "尚未关联业务数据模型,请先配置模型,再设置编号规则。" : "当前数据模型没有可用于编号的字段,请先检查字段配置。")), 1), Y(r) ? (K(), R(Y(f), {
|
|
289
|
+
key: 0,
|
|
290
|
+
type: "link",
|
|
291
|
+
onClick: d
|
|
292
|
+
}, {
|
|
293
|
+
default: Z(() => [H(J(Y(n).t("platform.code.config.configure-model", "配置模型")), 1)]),
|
|
294
|
+
_: 1
|
|
295
|
+
})) : z("v-if", !0)], 64))])) : z("v-if", !0);
|
|
296
|
+
}
|
|
297
|
+
}), [["__scopeId", "data-v-ab744e6f"]]), dt = Ge, ft = Xe, pt = Ye, mt = be, ht = {
|
|
175
298
|
id: "platform-module-workspace-actions",
|
|
176
299
|
target: { moduleAlias: "platform.module" },
|
|
300
|
+
activate: ({ module: e }) => st(e),
|
|
301
|
+
card: { assistant: {
|
|
302
|
+
component: ut,
|
|
303
|
+
placement: {
|
|
304
|
+
boundary: "inside",
|
|
305
|
+
position: "bottom"
|
|
306
|
+
}
|
|
307
|
+
} },
|
|
177
308
|
workspaceViews: [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
309
|
+
mt,
|
|
310
|
+
pt,
|
|
311
|
+
ft
|
|
181
312
|
],
|
|
182
313
|
detail: {
|
|
183
314
|
sections: [{
|
|
184
315
|
key: "module-menu-entries",
|
|
185
316
|
title: "菜单入口",
|
|
186
317
|
titleKey: "platform.screen.moduleMenuWorkspace.menu-entry",
|
|
187
|
-
component:
|
|
318
|
+
component: rt
|
|
188
319
|
}],
|
|
189
320
|
actions: [
|
|
321
|
+
{
|
|
322
|
+
key: "module-business-code",
|
|
323
|
+
title: "业务编码",
|
|
324
|
+
titleKey: "platform.code.config.title",
|
|
325
|
+
state: (e, t) => ({ visible: !!t && !!$(e) && ct(t.module, $(e)) }),
|
|
326
|
+
run({ record: e, module: t, openWorkspaceTab: n }) {
|
|
327
|
+
let r = $(e);
|
|
328
|
+
r && ct(t, r) && n(dt, {
|
|
329
|
+
moduleAlias: r,
|
|
330
|
+
moduleTitle: vt(e)
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
},
|
|
190
334
|
{
|
|
191
335
|
key: "module-workflow-workspace",
|
|
192
336
|
title: "审批流程",
|
|
193
337
|
titleKey: "platform.screen.WorkflowConfigurationView.approval-workflow",
|
|
194
|
-
state: (e) => ({ visible:
|
|
338
|
+
state: (e) => ({ visible: $(e) !== void 0 }),
|
|
195
339
|
run({ record: e, openWorkspaceTab: t }) {
|
|
196
|
-
let n =
|
|
197
|
-
n && t(
|
|
340
|
+
let n = $(e);
|
|
341
|
+
n && t(ft, {
|
|
198
342
|
moduleAlias: n,
|
|
199
|
-
moduleTitle:
|
|
343
|
+
moduleTitle: vt(e)
|
|
200
344
|
});
|
|
201
345
|
}
|
|
202
346
|
},
|
|
@@ -204,13 +348,13 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
204
348
|
key: "module-add-to-menu",
|
|
205
349
|
title: "添加到菜单",
|
|
206
350
|
titleKey: "platform.entry.add-to-menu",
|
|
207
|
-
state: (e) => ({ visible:
|
|
351
|
+
state: (e) => ({ visible: $(e) !== void 0 }),
|
|
208
352
|
run({ openDrawer: e }) {
|
|
209
353
|
e({
|
|
210
354
|
title: "添加到菜单",
|
|
211
355
|
titleKey: "platform.entry.add-to-menu",
|
|
212
356
|
width: "narrow",
|
|
213
|
-
component:
|
|
357
|
+
component: Ze
|
|
214
358
|
});
|
|
215
359
|
}
|
|
216
360
|
},
|
|
@@ -218,13 +362,13 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
218
362
|
key: "module-actions-workspace",
|
|
219
363
|
title: "动作",
|
|
220
364
|
titleKey: "platform.governance.tab.actions",
|
|
221
|
-
state: (e) => ({ visible:
|
|
365
|
+
state: (e) => ({ visible: $(e) !== void 0 }),
|
|
222
366
|
run({ record: e, openWorkspaceTab: t }) {
|
|
223
|
-
let n =
|
|
224
|
-
n && t(
|
|
367
|
+
let n = $(e);
|
|
368
|
+
n && t(pt, {
|
|
225
369
|
moduleAlias: n,
|
|
226
|
-
moduleTitle:
|
|
227
|
-
moduleKind:
|
|
370
|
+
moduleTitle: vt(e),
|
|
371
|
+
moduleKind: yt(e)
|
|
228
372
|
});
|
|
229
373
|
}
|
|
230
374
|
},
|
|
@@ -232,19 +376,19 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
232
376
|
key: "module-ui-orchestration-workspace",
|
|
233
377
|
title: "低代码",
|
|
234
378
|
titleKey: "platform.entry.low-code",
|
|
235
|
-
state: (e) => ({ visible:
|
|
379
|
+
state: (e) => ({ visible: $(e) !== void 0 && yt(e) === "dynamic" }),
|
|
236
380
|
run({ record: e, openWorkspaceTab: t }) {
|
|
237
|
-
let n =
|
|
238
|
-
n &&
|
|
381
|
+
let n = $(e);
|
|
382
|
+
n && yt(e) === "dynamic" && t(mt, {
|
|
239
383
|
moduleAlias: n,
|
|
240
|
-
moduleTitle:
|
|
384
|
+
moduleTitle: vt(e),
|
|
241
385
|
governanceTab: "overview"
|
|
242
386
|
});
|
|
243
387
|
}
|
|
244
388
|
}
|
|
245
389
|
]
|
|
246
390
|
}
|
|
247
|
-
},
|
|
391
|
+
}, gt = {
|
|
248
392
|
id: "dictionary-category-tree-parent-policy",
|
|
249
393
|
target: { moduleAlias: "platform.dictionary_category" },
|
|
250
394
|
navigator: { treeParentPolicy: {
|
|
@@ -252,7 +396,7 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
252
396
|
rejectionMessage: "字典类目只能挂在目录下",
|
|
253
397
|
rejectionMessageKey: "platform.entry.dictionary-categories-must-belong-to-a-folder"
|
|
254
398
|
} }
|
|
255
|
-
},
|
|
399
|
+
}, _t = {
|
|
256
400
|
id: "platform-module-action-entry-scope",
|
|
257
401
|
target: { moduleAlias: "platform.module_action" },
|
|
258
402
|
navigator: {
|
|
@@ -265,35 +409,35 @@ var Ve = /* @__PURE__ */ new Set([
|
|
|
265
409
|
},
|
|
266
410
|
standardActions: { disabled: ["create"] }
|
|
267
411
|
};
|
|
268
|
-
function
|
|
269
|
-
return
|
|
412
|
+
function $(e) {
|
|
413
|
+
return bt(e, "alias") ?? bt(e, "id");
|
|
270
414
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
415
|
+
function vt(e) {
|
|
416
|
+
return bt(e, "title");
|
|
273
417
|
}
|
|
274
|
-
function
|
|
275
|
-
let t =
|
|
418
|
+
function yt(e) {
|
|
419
|
+
let t = bt(e, "moduleKind");
|
|
276
420
|
return t === "static" || t === "dynamic" ? t : void 0;
|
|
277
421
|
}
|
|
278
|
-
function
|
|
422
|
+
function bt(e, t) {
|
|
279
423
|
let n = e[t];
|
|
280
424
|
return typeof n == "string" && n.trim() ? n : void 0;
|
|
281
425
|
}
|
|
282
426
|
//#endregion
|
|
283
427
|
//#region src/views/PasswordPolicyPreview.vue?vue&type=script&setup=true&lang.ts
|
|
284
|
-
var
|
|
428
|
+
var xt = { class: "password-policy-preview" }, St = {
|
|
285
429
|
key: 0,
|
|
286
430
|
class: "preview-results"
|
|
287
|
-
},
|
|
431
|
+
}, Ct = {
|
|
288
432
|
id: "iam-password-policy-preview",
|
|
289
433
|
target: { moduleAlias: "iam.password_policy_rule" },
|
|
290
434
|
card: { assistant: {
|
|
291
|
-
component: /* @__PURE__ */
|
|
435
|
+
component: /* @__PURE__ */ P(/* @__PURE__ */ G({
|
|
292
436
|
name: "PasswordPolicyPreview",
|
|
293
437
|
__name: "PasswordPolicyPreview",
|
|
294
438
|
props: { context: {} },
|
|
295
439
|
setup(e) {
|
|
296
|
-
let t =
|
|
440
|
+
let t = b(), n = e, r = q("CURRENT"), i = q(""), a = q(), o = q(!1), s = q(!1), c = 0, l = L(() => v(n.context.record)), u = L(() => n.context.mode !== "view" || E(l.value?.id) !== void 0), d = L(() => [{
|
|
297
441
|
value: "CURRENT",
|
|
298
442
|
label: t.t("platform.screen.PasswordPolicyPreview.current-rule", "本规则"),
|
|
299
443
|
disabled: !u.value
|
|
@@ -301,16 +445,16 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
301
445
|
value: "ALL",
|
|
302
446
|
label: t.t("platform.screen.PasswordPolicyPreview.all-rules", "全规则")
|
|
303
447
|
}]);
|
|
304
|
-
|
|
448
|
+
X(u, (e) => {
|
|
305
449
|
!e && r.value === "CURRENT" && (r.value = "ALL");
|
|
306
450
|
}, { immediate: !0 });
|
|
307
|
-
function
|
|
451
|
+
function f(e) {
|
|
308
452
|
(e !== "CURRENT" || u.value) && (e === "CURRENT" || e === "ALL") && (r.value = e);
|
|
309
453
|
}
|
|
310
|
-
|
|
311
|
-
e === "ALL" &&
|
|
454
|
+
X([r, () => n.context.formSessionKey], ([e]) => {
|
|
455
|
+
e === "ALL" && p();
|
|
312
456
|
}, { immediate: !0 });
|
|
313
|
-
async function
|
|
457
|
+
async function p() {
|
|
314
458
|
let e = ++c;
|
|
315
459
|
s.value = !0, o.value = !1, a.value = void 0;
|
|
316
460
|
try {
|
|
@@ -324,56 +468,56 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
324
468
|
e === c && (s.value = !1);
|
|
325
469
|
}
|
|
326
470
|
}
|
|
327
|
-
let
|
|
471
|
+
let m = L(() => {
|
|
328
472
|
let e = u.value ? l.value : void 0;
|
|
329
473
|
if (r.value === "CURRENT") return e ? [e] : [];
|
|
330
474
|
if (!a.value) return [];
|
|
331
|
-
let t = a.value.filter(
|
|
475
|
+
let t = a.value.filter(O), n = E(e?.id);
|
|
332
476
|
if (n) {
|
|
333
|
-
let e = t.findIndex((e) =>
|
|
477
|
+
let e = t.findIndex((e) => E(e.id) === n);
|
|
334
478
|
e >= 0 && t.splice(e, 1);
|
|
335
479
|
}
|
|
336
|
-
return e &&
|
|
337
|
-
}),
|
|
480
|
+
return e && O(e) && t.push(e), t.length > 0 ? t.sort(C) : [];
|
|
481
|
+
}), h = L(() => i.value ? m.value.map((e, t) => x(e, i.value, t)) : []), g = L(() => h.value.map((e) => ({
|
|
338
482
|
...e,
|
|
339
|
-
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) :
|
|
340
|
-
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) :
|
|
483
|
+
title: e.titleSource ? t.t(e.titleSource.sourceId, e.title) : pe(e.title, e.titleText, t),
|
|
484
|
+
message: e.messageSource ? t.t(e.messageSource.sourceId, e.message) : pe(e.message, e.messageText, t),
|
|
341
485
|
diagnostic: e.diagnostic ? t.t(e.diagnostic.sourceId, e.diagnostic.originalText) : void 0
|
|
342
|
-
}))),
|
|
486
|
+
}))), _ = L(() => {
|
|
343
487
|
if (!u.value && r.value === "CURRENT") return t.t("platform.screen.PasswordPolicyPreview.select-or-create-a-rule", "请选择或新建一条规则");
|
|
344
488
|
if (r.value === "ALL" && s.value) return t.t("platform.screen.PasswordPolicyPreview.loading-the-authoritative-rules", "正在加载权威规则集");
|
|
345
489
|
if (r.value === "ALL" && o.value) return t.t("platform.screen.PasswordPolicyPreview.unable-to-load-the-authoritative-rules", "无法加载权威规则集");
|
|
346
490
|
if (!i.value) return t.t("platform.screen.PasswordPolicyPreview.enter-a-test-password-for-immediate-feedback", "输入测试密码后即时反馈");
|
|
347
|
-
if (
|
|
348
|
-
let e =
|
|
491
|
+
if (h.value.length === 0) return t.t("platform.screen.PasswordPolicyPreview.no-enabled-rules-participate-in-this-preview", "当前没有参与试算的启用规则");
|
|
492
|
+
let e = h.value.filter((e) => !e.passed).length;
|
|
349
493
|
return e === 0 ? t.t("platform.screen.PasswordPolicyPreview.all-passed-value-value", "全部通过({value1}/{value2})", {
|
|
350
|
-
value1:
|
|
351
|
-
value2:
|
|
494
|
+
value1: h.value.length,
|
|
495
|
+
value2: h.value.length
|
|
352
496
|
}) : t.t("platform.screen.PasswordPolicyPreview.value-rules-failed", "{value1} 条规则未通过", { value1: e });
|
|
353
497
|
});
|
|
354
|
-
function
|
|
498
|
+
function v(e) {
|
|
355
499
|
if (e) return e;
|
|
356
500
|
}
|
|
357
|
-
function
|
|
358
|
-
let r = e.title?.trim() ? void 0 :
|
|
359
|
-
titleText:
|
|
360
|
-
messageText:
|
|
501
|
+
function x(e, t, n) {
|
|
502
|
+
let r = e.title?.trim() ? void 0 : w("platform.screen.PasswordPolicyPreview.unnamed-rule"), i = e.message?.trim() ? void 0 : w("platform.screen.PasswordPolicyPreview.no-failure-message-configured"), a = D(e.title, r?.originalText ?? ""), o = D(e.message, i?.originalText ?? ""), s = {
|
|
503
|
+
titleText: te(e, "title"),
|
|
504
|
+
messageText: te(e, "message")
|
|
361
505
|
}, c = e.pattern;
|
|
362
506
|
if (!c?.trim()) return {
|
|
363
507
|
...s,
|
|
364
|
-
key:
|
|
508
|
+
key: T(e, n),
|
|
365
509
|
title: a,
|
|
366
510
|
message: o,
|
|
367
511
|
titleSource: r,
|
|
368
512
|
messageSource: i,
|
|
369
513
|
passed: !1,
|
|
370
|
-
diagnostic:
|
|
514
|
+
diagnostic: w("platform.screen.PasswordPolicyPreview.regular-expression-required")
|
|
371
515
|
};
|
|
372
516
|
try {
|
|
373
517
|
let l = RegExp(`^(?:${c})$`).test(t);
|
|
374
518
|
return {
|
|
375
519
|
...s,
|
|
376
|
-
key:
|
|
520
|
+
key: T(e, n),
|
|
377
521
|
title: a,
|
|
378
522
|
message: o,
|
|
379
523
|
titleSource: r,
|
|
@@ -383,59 +527,59 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
383
527
|
} catch {
|
|
384
528
|
return {
|
|
385
529
|
...s,
|
|
386
|
-
key:
|
|
530
|
+
key: T(e, n),
|
|
387
531
|
title: a,
|
|
388
532
|
message: o,
|
|
389
533
|
titleSource: r,
|
|
390
534
|
messageSource: i,
|
|
391
535
|
passed: !1,
|
|
392
|
-
diagnostic:
|
|
536
|
+
diagnostic: w("platform.screen.PasswordPolicyPreview.browser-regex-unsupported")
|
|
393
537
|
};
|
|
394
538
|
}
|
|
395
539
|
}
|
|
396
|
-
function
|
|
397
|
-
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) ||
|
|
540
|
+
function C(e, t) {
|
|
541
|
+
return (e.sortOrder ?? 2 ** 53 - 1) - (t.sortOrder ?? 2 ** 53 - 1) || D(e.title, "").localeCompare(D(t.title, ""));
|
|
398
542
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
543
|
+
function T(e, t) {
|
|
544
|
+
return E(e.id) ?? `draft:${t}`;
|
|
401
545
|
}
|
|
402
|
-
function
|
|
546
|
+
function E(e) {
|
|
403
547
|
return e?.trim() || void 0;
|
|
404
548
|
}
|
|
405
|
-
function
|
|
549
|
+
function D(e, t) {
|
|
406
550
|
return e?.trim() || t;
|
|
407
551
|
}
|
|
408
|
-
function
|
|
552
|
+
function O(e) {
|
|
409
553
|
return e.enabled !== !1 && (e.scopeType == null || e.scopeType.toLowerCase() === "global");
|
|
410
554
|
}
|
|
411
|
-
return (e, n) => (
|
|
412
|
-
|
|
413
|
-
|
|
555
|
+
return (e, n) => (K(), B("section", xt, [
|
|
556
|
+
V("header", null, [V("h3", null, J(Y(t).t("platform.screen.PasswordPolicyPreview.password-preview", "密码试算")), 1), V("span", { class: je({ failed: h.value.some((e) => !e.passed) }) }, J(_.value), 3)]),
|
|
557
|
+
U(Y(y), {
|
|
414
558
|
class: "preview-scope",
|
|
415
559
|
value: r.value,
|
|
416
|
-
options:
|
|
560
|
+
options: d.value,
|
|
417
561
|
size: "small",
|
|
418
|
-
"onUpdate:value":
|
|
562
|
+
"onUpdate:value": f
|
|
419
563
|
}, null, 8, ["value", "options"]),
|
|
420
|
-
|
|
564
|
+
U(Y(S), {
|
|
421
565
|
value: i.value,
|
|
422
566
|
"onUpdate:value": n[0] ||= (e) => i.value = e,
|
|
423
567
|
type: "text",
|
|
424
568
|
autocomplete: "off",
|
|
425
|
-
placeholder:
|
|
426
|
-
"aria-label":
|
|
569
|
+
placeholder: Y(t).t("platform.screen.PasswordPolicyPreview.enter-a-test-password", "输入测试密码"),
|
|
570
|
+
"aria-label": Y(t).t("platform.screen.PasswordPolicyPreview.test-password", "测试密码")
|
|
427
571
|
}, null, 8, [
|
|
428
572
|
"value",
|
|
429
573
|
"placeholder",
|
|
430
574
|
"aria-label"
|
|
431
575
|
]),
|
|
432
|
-
|
|
576
|
+
h.value.length ? (K(), B("ul", St, [(K(!0), B(I, null, Le(g.value, (e) => (K(), B("li", {
|
|
433
577
|
key: e.key,
|
|
434
|
-
class:
|
|
578
|
+
class: je({
|
|
435
579
|
passed: e.passed,
|
|
436
580
|
failed: !e.passed
|
|
437
581
|
})
|
|
438
|
-
}, [
|
|
582
|
+
}, [V("strong", null, J(e.title), 1), V("span", null, J(e.diagnostic ?? (e.passed ? Y(t).t("platform.workflow-record.check-passed", "通过") : e.message)), 1)], 2))), 128))])) : z("v-if", !0)
|
|
439
583
|
]));
|
|
440
584
|
}
|
|
441
585
|
}), [["__scopeId", "data-v-235173d0"]]),
|
|
@@ -444,19 +588,19 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
444
588
|
position: "bottom"
|
|
445
589
|
}
|
|
446
590
|
} }
|
|
447
|
-
},
|
|
591
|
+
}, wt = { class: "tenant-applications-detail" }, Tt = { class: "tenant-applications-summary" }, Et = {
|
|
448
592
|
key: 0,
|
|
449
593
|
class: "tenant-applications-status"
|
|
450
|
-
},
|
|
594
|
+
}, Dt = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
451
595
|
name: "TenantApplicationsDetailSection",
|
|
452
596
|
__name: "TenantApplicationsDetailSection",
|
|
453
597
|
props: { context: {} },
|
|
454
598
|
setup(e) {
|
|
455
|
-
let t =
|
|
599
|
+
let t = b(), n = e, r = q([]), i = q(!1), a = 0, o = q(/* @__PURE__ */ new Map()), s = L(() => r.value.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && e.length > 0).map((e) => ({
|
|
456
600
|
key: e,
|
|
457
601
|
label: o.value.get(e) ? `${o.value.get(e)} · ${e}` : e
|
|
458
602
|
})));
|
|
459
|
-
|
|
603
|
+
X(() => [n.context.record.id, n.context.refreshKey], () => void c(), { immediate: !0 });
|
|
460
604
|
async function c() {
|
|
461
605
|
let e = String(n.context.record.id ?? ""), s = ++a;
|
|
462
606
|
if (!e) {
|
|
@@ -482,7 +626,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
482
626
|
})]);
|
|
483
627
|
s === a && (o.value = new Map(t.records.filter((e) => e.alias && e.title).map((e) => [e.alias, e.title])), r.value = i.records);
|
|
484
628
|
} catch (e) {
|
|
485
|
-
s === a &&
|
|
629
|
+
s === a && N(e, {
|
|
486
630
|
language: t,
|
|
487
631
|
source: "tenant-applications-detail",
|
|
488
632
|
phase: "load"
|
|
@@ -494,19 +638,19 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
494
638
|
function l(e, t) {
|
|
495
639
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
496
640
|
}
|
|
497
|
-
return (e, n) => (
|
|
641
|
+
return (e, n) => (K(), B("section", wt, [V("div", Tt, [i.value ? (K(), B("span", Et, J(Y(t).t("platform.screen.WorkflowAdministrationView.loading", "正在加载…")), 1)) : (K(), R(Y(se), {
|
|
498
642
|
key: 1,
|
|
499
643
|
items: s.value,
|
|
500
644
|
"max-visible": 8,
|
|
501
|
-
"empty-text":
|
|
645
|
+
"empty-text": Y(t).t("platform.screen.CrudRecordListExplorer.emptyDescription", "暂无记录")
|
|
502
646
|
}, null, 8, ["items", "empty-text"]))])]));
|
|
503
647
|
}
|
|
504
|
-
}), [["__scopeId", "data-v-49a973de"]]),
|
|
648
|
+
}), [["__scopeId", "data-v-49a973de"]]), Ot = { class: "tenant-application-configuration" }, kt = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
505
649
|
name: "TenantApplicationConfigurationDrawer",
|
|
506
650
|
__name: "TenantApplicationConfigurationDrawer",
|
|
507
651
|
props: { context: {} },
|
|
508
652
|
setup(e) {
|
|
509
|
-
let t =
|
|
653
|
+
let t = b(), n = e, r = q([]), i = q(/* @__PURE__ */ new Set()), a = q(!1), o = q(!1), s = L(() => [{
|
|
510
654
|
key: "title",
|
|
511
655
|
title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-name", "应用名称"),
|
|
512
656
|
width: 260
|
|
@@ -514,7 +658,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
514
658
|
key: "alias",
|
|
515
659
|
title: t.t("platform.screen.TenantApplicationConfigurationDrawer.application-alias", "应用 alias"),
|
|
516
660
|
width: 220
|
|
517
|
-
}]), c =
|
|
661
|
+
}]), c = L(() => r.value), l = L(() => ({
|
|
518
662
|
selectedRowKeys: [...i.value],
|
|
519
663
|
preserveSelectedRowKeys: !0,
|
|
520
664
|
disabledOf: (e) => o.value || e.alias === "iam",
|
|
@@ -539,9 +683,9 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
539
683
|
run: f
|
|
540
684
|
}]);
|
|
541
685
|
}
|
|
542
|
-
|
|
686
|
+
Pe(() => {
|
|
543
687
|
u(), d();
|
|
544
|
-
}),
|
|
688
|
+
}), X([o, t.revision], u);
|
|
545
689
|
async function d() {
|
|
546
690
|
let e = String(n.context.record?.id ?? "");
|
|
547
691
|
if (e) {
|
|
@@ -566,7 +710,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
566
710
|
let o = new Set(r.value.map((e) => e.alias).filter(Boolean));
|
|
567
711
|
i.value = /* @__PURE__ */ new Set(["iam", ...a.records.map((e) => e.applicationAlias).filter((e) => typeof e == "string" && o.has(e))]);
|
|
568
712
|
} catch (e) {
|
|
569
|
-
|
|
713
|
+
N(e, {
|
|
570
714
|
language: t,
|
|
571
715
|
source: "tenant-application-configuration",
|
|
572
716
|
phase: "load"
|
|
@@ -587,7 +731,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
587
731
|
body: { applicationAliases: [...i.value] }
|
|
588
732
|
}), n.context.refreshDetailExtensions(), n.context.refreshList(), n.context.close();
|
|
589
733
|
} catch (e) {
|
|
590
|
-
|
|
734
|
+
N(e, {
|
|
591
735
|
language: t,
|
|
592
736
|
source: "tenant-application-configuration",
|
|
593
737
|
phase: "action"
|
|
@@ -600,14 +744,14 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
600
744
|
function p(e, t) {
|
|
601
745
|
return `/iam.tenant/${encodeURIComponent(e)}/applications/${t}`;
|
|
602
746
|
}
|
|
603
|
-
return (e, n) => (
|
|
747
|
+
return (e, n) => (K(), B("section", Ot, [V("p", null, J(Y(t).t("platform.screen.TenantApplicationConfigurationDrawer.select-applications-to-provision-for-this-tenant-deselecting-an-application", "勾选表示向当前租户开通应用;取消勾选将移除该租户的应用开通记录。")), 1), U(Y(g), {
|
|
604
748
|
columns: s.value,
|
|
605
749
|
rows: c.value,
|
|
606
750
|
loading: a.value,
|
|
607
751
|
pagination: !1,
|
|
608
752
|
selection: l.value,
|
|
609
753
|
"row-key": (e) => String(e.alias ?? e.id ?? ""),
|
|
610
|
-
"empty-description":
|
|
754
|
+
"empty-description": Y(t).t("platform.screen.TenantApplicationConfigurationDrawer.no-applications-available-for-configuration", "暂无可配置应用")
|
|
611
755
|
}, null, 8, [
|
|
612
756
|
"columns",
|
|
613
757
|
"rows",
|
|
@@ -617,7 +761,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
617
761
|
"empty-description"
|
|
618
762
|
])]));
|
|
619
763
|
}
|
|
620
|
-
}), [["__scopeId", "data-v-12c39b69"]]),
|
|
764
|
+
}), [["__scopeId", "data-v-12c39b69"]]), At = {
|
|
621
765
|
id: "iam-tenant-standard-page-enhancement",
|
|
622
766
|
target: { moduleAlias: "iam.tenant" },
|
|
623
767
|
form: {
|
|
@@ -633,8 +777,8 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
633
777
|
},
|
|
634
778
|
...["lightLogoAssetId", "darkLogoAssetId"].map((e) => ({
|
|
635
779
|
fieldName: e,
|
|
636
|
-
imageUploadHint: ({ draft: e }, t =
|
|
637
|
-
imageUploadAdvisory: ({ draft: e }, t =
|
|
780
|
+
imageUploadHint: ({ draft: e }, t = T) => 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)"),
|
|
781
|
+
imageUploadAdvisory: ({ draft: e }, t = T) => e.workbenchBrandMode === "logoOnly" ? void 0 : (e) => jt(e, t)
|
|
638
782
|
}))
|
|
639
783
|
]
|
|
640
784
|
},
|
|
@@ -649,7 +793,7 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
649
793
|
title: "配置应用",
|
|
650
794
|
titleKey: "platform.entry.configure-applications",
|
|
651
795
|
width: "wide",
|
|
652
|
-
component:
|
|
796
|
+
component: kt
|
|
653
797
|
});
|
|
654
798
|
}
|
|
655
799
|
}],
|
|
@@ -657,14 +801,14 @@ var lt = { class: "password-policy-preview" }, ut = {
|
|
|
657
801
|
key: "tenant-applications",
|
|
658
802
|
title: "已开通应用",
|
|
659
803
|
titleKey: "platform.entry.provisioned-applications",
|
|
660
|
-
component:
|
|
804
|
+
component: Dt
|
|
661
805
|
}]
|
|
662
806
|
}
|
|
663
807
|
};
|
|
664
|
-
async function
|
|
808
|
+
async function jt(e, t) {
|
|
665
809
|
if (!e.type.startsWith("image/") || typeof Image > "u") return t.t("platform.entry.logo-and-title-mode-requires-a-readable-square-image", "Logo + 标题模式需要可读取的正方形图片。");
|
|
666
810
|
try {
|
|
667
|
-
let { width: n, height: r } = await
|
|
811
|
+
let { width: n, height: r } = await Mt(e), i = n / r;
|
|
668
812
|
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。", {
|
|
669
813
|
value1: e.name,
|
|
670
814
|
value2: n,
|
|
@@ -674,7 +818,7 @@ async function yt(e, t) {
|
|
|
674
818
|
return t.t("platform.entry.unable-to-read-image-dimensions-select-a-square-png-jpg-or-gif-image", "无法读取图片尺寸,请选择正方形 PNG、JPG 或 GIF 图片。");
|
|
675
819
|
}
|
|
676
820
|
}
|
|
677
|
-
function
|
|
821
|
+
function Mt(e) {
|
|
678
822
|
let t = URL.createObjectURL(e);
|
|
679
823
|
return new Promise((e, n) => {
|
|
680
824
|
let r = new Image();
|
|
@@ -690,24 +834,24 @@ function bt(e) {
|
|
|
690
834
|
}
|
|
691
835
|
//#endregion
|
|
692
836
|
//#region src/platform-admin-runtime/employee/EmployeeAccountDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
693
|
-
var
|
|
837
|
+
var Nt = {
|
|
694
838
|
key: 1,
|
|
695
839
|
class: "employee-account-drawer"
|
|
696
|
-
},
|
|
840
|
+
}, Pt = { class: "employee-account-existing-picker" }, Ft = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
697
841
|
name: "EmployeeAccountDrawer",
|
|
698
842
|
__name: "EmployeeAccountDrawer",
|
|
699
843
|
props: { context: {} },
|
|
700
844
|
setup(e) {
|
|
701
|
-
let t =
|
|
702
|
-
|
|
845
|
+
let t = b(), n = e, r = q(), i = q(), a = q(""), o = q(""), s = q(!1), c = q(!1);
|
|
846
|
+
Pe(() => void l());
|
|
703
847
|
async function l() {
|
|
704
|
-
let e =
|
|
848
|
+
let e = x();
|
|
705
849
|
if (e) {
|
|
706
850
|
s.value = !0;
|
|
707
851
|
try {
|
|
708
852
|
r.value = await n.context.module.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/account` });
|
|
709
853
|
} catch (e) {
|
|
710
|
-
|
|
854
|
+
N(e, {
|
|
711
855
|
language: t,
|
|
712
856
|
source: "employee-account",
|
|
713
857
|
phase: "load"
|
|
@@ -718,7 +862,7 @@ var xt = {
|
|
|
718
862
|
}
|
|
719
863
|
}
|
|
720
864
|
async function u() {
|
|
721
|
-
let e =
|
|
865
|
+
let e = x();
|
|
722
866
|
if (!e || c.value) return;
|
|
723
867
|
let i = a.value.trim();
|
|
724
868
|
if (!i || !o.value) {
|
|
@@ -739,9 +883,9 @@ var xt = {
|
|
|
739
883
|
password: o.value
|
|
740
884
|
}
|
|
741
885
|
});
|
|
742
|
-
r.value =
|
|
886
|
+
r.value = A(t).binding, o.value = "", n.context.refreshList();
|
|
743
887
|
} catch (e) {
|
|
744
|
-
|
|
888
|
+
N(e, {
|
|
745
889
|
language: t,
|
|
746
890
|
source: "employee-account",
|
|
747
891
|
phase: "action"
|
|
@@ -752,10 +896,10 @@ var xt = {
|
|
|
752
896
|
}
|
|
753
897
|
async function d(e) {
|
|
754
898
|
let t = e[0];
|
|
755
|
-
t && await
|
|
899
|
+
t && await p(t.id);
|
|
756
900
|
}
|
|
757
|
-
async function
|
|
758
|
-
let a =
|
|
901
|
+
async function p(e) {
|
|
902
|
+
let a = x();
|
|
759
903
|
if (a && e && !c.value) {
|
|
760
904
|
c.value = !0;
|
|
761
905
|
try {
|
|
@@ -769,7 +913,7 @@ var xt = {
|
|
|
769
913
|
phase: "action"
|
|
770
914
|
});
|
|
771
915
|
} catch (e) {
|
|
772
|
-
|
|
916
|
+
N(e, {
|
|
773
917
|
language: t,
|
|
774
918
|
source: "employee-account",
|
|
775
919
|
phase: "action"
|
|
@@ -779,8 +923,8 @@ var xt = {
|
|
|
779
923
|
}
|
|
780
924
|
}
|
|
781
925
|
}
|
|
782
|
-
async function
|
|
783
|
-
let t =
|
|
926
|
+
async function g(e) {
|
|
927
|
+
let t = x();
|
|
784
928
|
if (!t) return {
|
|
785
929
|
records: [],
|
|
786
930
|
total: 0
|
|
@@ -797,12 +941,12 @@ var xt = {
|
|
|
797
941
|
}
|
|
798
942
|
});
|
|
799
943
|
return {
|
|
800
|
-
records: r.records.map(
|
|
944
|
+
records: r.records.map(v),
|
|
801
945
|
total: r.total
|
|
802
946
|
};
|
|
803
947
|
}
|
|
804
|
-
async function
|
|
805
|
-
let t =
|
|
948
|
+
async function _(e) {
|
|
949
|
+
let t = x();
|
|
806
950
|
return !t || e.length === 0 ? [] : (await n.context.module.http.request({
|
|
807
951
|
method: "POST",
|
|
808
952
|
path: `/iam.employee/${encodeURIComponent(t)}/account-candidates/query`,
|
|
@@ -813,9 +957,9 @@ var xt = {
|
|
|
813
957
|
pageSize: e.length
|
|
814
958
|
}
|
|
815
959
|
}
|
|
816
|
-
})).records.map(
|
|
960
|
+
})).records.map(v);
|
|
817
961
|
}
|
|
818
|
-
function
|
|
962
|
+
function v(e) {
|
|
819
963
|
return {
|
|
820
964
|
id: e.id,
|
|
821
965
|
title: e.username ?? e.id,
|
|
@@ -827,9 +971,9 @@ var xt = {
|
|
|
827
971
|
departmentName: e.departmentTitle
|
|
828
972
|
};
|
|
829
973
|
}
|
|
830
|
-
async function
|
|
831
|
-
let e =
|
|
832
|
-
if (e && r.value && !c.value && await
|
|
974
|
+
async function y() {
|
|
975
|
+
let e = x();
|
|
976
|
+
if (e && r.value && !c.value && await ce({
|
|
833
977
|
title: t.t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户"),
|
|
834
978
|
content: t.t("platform.screen.EmployeeAccountDrawer.remove-this-employee-s-account-the-user-account-will-also", "确认移除该职员的账户?该用户账号会同步删除。"),
|
|
835
979
|
okText: t.t("platform.screen.RecordPermissionDialog.remove", "移除"),
|
|
@@ -842,7 +986,7 @@ var xt = {
|
|
|
842
986
|
path: `/iam.employee/${encodeURIComponent(e)}/account/delete`
|
|
843
987
|
}), r.value = void 0, n.context.refreshList();
|
|
844
988
|
} catch (e) {
|
|
845
|
-
|
|
989
|
+
N(e, {
|
|
846
990
|
language: t,
|
|
847
991
|
source: "employee-account",
|
|
848
992
|
phase: "action"
|
|
@@ -852,28 +996,28 @@ var xt = {
|
|
|
852
996
|
}
|
|
853
997
|
}
|
|
854
998
|
}
|
|
855
|
-
function
|
|
999
|
+
function x() {
|
|
856
1000
|
let e = n.context.record?.id;
|
|
857
1001
|
return e == null ? void 0 : String(e);
|
|
858
1002
|
}
|
|
859
|
-
return (e, n) => s.value ? (
|
|
1003
|
+
return (e, n) => s.value ? (K(), R(Y(m), {
|
|
860
1004
|
key: 0,
|
|
861
|
-
tip:
|
|
862
|
-
}, null, 8, ["tip"])) : (
|
|
1005
|
+
tip: Y(t).t("platform.screen.EmployeeAccountDrawer.loading-account-binding", "加载账号绑定")
|
|
1006
|
+
}, null, 8, ["tip"])) : (K(), B("section", Nt, [x() ? r.value ? (K(), B(I, { key: 1 }, [V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.currently-bound-user", "当前已绑定用户:")) + J(r.value.userId ?? "-"), 1), U(Y(f), {
|
|
863
1007
|
danger: "",
|
|
864
1008
|
"icon-name": "delete",
|
|
865
1009
|
loading: c.value,
|
|
866
|
-
onClick:
|
|
1010
|
+
onClick: y
|
|
867
1011
|
}, {
|
|
868
|
-
default:
|
|
1012
|
+
default: Z(() => [H(J(Y(t).t("platform.screen.EmployeeAccountDrawer.remove-account", "移除账户")), 1)]),
|
|
869
1013
|
_: 1
|
|
870
|
-
}, 8, ["loading"])], 64)) : (
|
|
1014
|
+
}, 8, ["loading"])], 64)) : (K(), B(I, { key: 2 }, [V("section", Pt, [V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.bind-an-existing-user-account-only-enabled-accounts-in-this", "绑定已有用户账号;仅显示当前租户内启用且尚未绑定其他职员的账号。")), 1), U(Y(h), {
|
|
871
1015
|
value: i.value,
|
|
872
1016
|
disabled: c.value,
|
|
873
|
-
placeholder:
|
|
874
|
-
title:
|
|
875
|
-
"search-page":
|
|
876
|
-
"resolve-users":
|
|
1017
|
+
placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.search-and-select-an-existing-login-account", "搜索并选择已有登录账号"),
|
|
1018
|
+
title: Y(t).t("platform.screen.EmployeeAccountDrawer.select-an-existing-login-account", "选择已有登录账号"),
|
|
1019
|
+
"search-page": g,
|
|
1020
|
+
"resolve-users": _,
|
|
877
1021
|
"onUpdate:value": n[0] ||= (e) => i.value = typeof e == "string" ? e : void 0,
|
|
878
1022
|
onSelect: d
|
|
879
1023
|
}, null, 8, [
|
|
@@ -881,45 +1025,45 @@ var xt = {
|
|
|
881
1025
|
"disabled",
|
|
882
1026
|
"placeholder",
|
|
883
1027
|
"title"
|
|
884
|
-
])]),
|
|
885
|
-
|
|
886
|
-
|
|
1028
|
+
])]), V("form", { onSubmit: We(u, ["prevent"]) }, [
|
|
1029
|
+
V("p", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.you-can-also-create-a-login-account-and-bind-it", "也可直接创建登录账号并自动绑定到当前职员。")), 1),
|
|
1030
|
+
V("label", null, [V("span", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.account", "账号")), 1), U(Y(S), {
|
|
887
1031
|
value: a.value,
|
|
888
1032
|
"onUpdate:value": n[1] ||= (e) => a.value = e,
|
|
889
1033
|
disabled: c.value,
|
|
890
|
-
placeholder:
|
|
1034
|
+
placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.enter-a-login-account", "请输入登录账号")
|
|
891
1035
|
}, null, 8, [
|
|
892
1036
|
"value",
|
|
893
1037
|
"disabled",
|
|
894
1038
|
"placeholder"
|
|
895
1039
|
])]),
|
|
896
|
-
|
|
1040
|
+
V("label", null, [V("span", null, J(Y(t).t("platform.screen.EmployeeAccountDrawer.initial-password", "初始密码")), 1), U(Y(S), {
|
|
897
1041
|
value: o.value,
|
|
898
1042
|
"onUpdate:value": n[2] ||= (e) => o.value = e,
|
|
899
1043
|
type: "password",
|
|
900
1044
|
disabled: c.value,
|
|
901
|
-
placeholder:
|
|
1045
|
+
placeholder: Y(t).t("platform.screen.EmployeeAccountDrawer.enter-an-initial-password", "请输入初始密码")
|
|
902
1046
|
}, null, 8, [
|
|
903
1047
|
"value",
|
|
904
1048
|
"disabled",
|
|
905
1049
|
"placeholder"
|
|
906
1050
|
])]),
|
|
907
|
-
|
|
1051
|
+
U(Y(f), {
|
|
908
1052
|
type: "primary",
|
|
909
1053
|
"html-type": "submit",
|
|
910
1054
|
"icon-name": "plus",
|
|
911
1055
|
loading: c.value
|
|
912
1056
|
}, {
|
|
913
|
-
default:
|
|
1057
|
+
default: Z(() => [H(J(Y(t).t("platform.screen.EmployeeAccountDrawer.create-and-bind-account", "创建账号并绑定")), 1)]),
|
|
914
1058
|
_: 1
|
|
915
1059
|
}, 8, ["loading"])
|
|
916
|
-
], 32)], 64)) : (
|
|
1060
|
+
], 32)], 64)) : (K(), R(Y(ne), {
|
|
917
1061
|
key: 0,
|
|
918
|
-
title:
|
|
919
|
-
message:
|
|
1062
|
+
title: Y(t).t("platform.screen.EmployeeAccountDrawer.employee-not-found", "职员不存在"),
|
|
1063
|
+
message: Y(t).t("platform.screen.EmployeeAccountDrawer.reopen-the-employee-record-to-set-up-an-account", "请重新打开职员档案后再设置账号。")
|
|
920
1064
|
}, null, 8, ["title", "message"]))]));
|
|
921
1065
|
}
|
|
922
|
-
}), [["__scopeId", "data-v-e343e658"]]),
|
|
1066
|
+
}), [["__scopeId", "data-v-e343e658"]]), It = {
|
|
923
1067
|
id: "iam-employee-account-drawer",
|
|
924
1068
|
target: { moduleAlias: "iam.employee" },
|
|
925
1069
|
detail: { actions: [{
|
|
@@ -933,26 +1077,26 @@ var xt = {
|
|
|
933
1077
|
title: "设置账号",
|
|
934
1078
|
titleKey: "platform.entry.set-up-account",
|
|
935
1079
|
width: "standard",
|
|
936
|
-
component:
|
|
1080
|
+
component: Ft
|
|
937
1081
|
});
|
|
938
1082
|
}
|
|
939
1083
|
}] }
|
|
940
|
-
},
|
|
941
|
-
function
|
|
942
|
-
let e =
|
|
943
|
-
t || (t =
|
|
1084
|
+
}, Lt = "iam.user.session.collectionChanged", Rt = /* @__PURE__ */ new WeakMap();
|
|
1085
|
+
function zt() {
|
|
1086
|
+
let e = x(), t = Rt.get(e);
|
|
1087
|
+
t || (t = Bt(e), Rt.set(e, t));
|
|
944
1088
|
let n = t;
|
|
945
|
-
return n.users += 1,
|
|
946
|
-
--n.users === 0 && (n.dispose(),
|
|
1089
|
+
return n.users += 1, Fe(() => {
|
|
1090
|
+
--n.users === 0 && (n.dispose(), Rt.delete(e));
|
|
947
1091
|
}), {
|
|
948
1092
|
observe: n.observe,
|
|
949
1093
|
statusOf: n.statusOf,
|
|
950
1094
|
refresh: n.refresh
|
|
951
1095
|
};
|
|
952
1096
|
}
|
|
953
|
-
function
|
|
954
|
-
let t =
|
|
955
|
-
|
|
1097
|
+
function Bt(e) {
|
|
1098
|
+
let t = q({}), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = !1, o = !1, s = i((e) => {
|
|
1099
|
+
Vt(e) && n.has(e.recordId) && u(e.recordId);
|
|
956
1100
|
});
|
|
957
1101
|
function c(e) {
|
|
958
1102
|
e && !o && (n.add(e), t.value[e] || u(e));
|
|
@@ -961,13 +1105,13 @@ function Ot(e) {
|
|
|
961
1105
|
return e ? t.value[e] : void 0;
|
|
962
1106
|
}
|
|
963
1107
|
function u(e) {
|
|
964
|
-
e && !o && (
|
|
1108
|
+
e && !o && (r.add(e), !a && (a = !0, queueMicrotask(() => {
|
|
965
1109
|
a = !1, o || d();
|
|
966
1110
|
})));
|
|
967
1111
|
}
|
|
968
1112
|
async function d() {
|
|
969
|
-
let n = Array.from(
|
|
970
|
-
if (
|
|
1113
|
+
let n = Array.from(r);
|
|
1114
|
+
if (r.clear(), n.length !== 0) try {
|
|
971
1115
|
let r = await e.request({
|
|
972
1116
|
method: "POST",
|
|
973
1117
|
path: "/iam.user/sessions/status",
|
|
@@ -979,7 +1123,7 @@ function Ot(e) {
|
|
|
979
1123
|
...Object.fromEntries(r.map((e) => [e.userId, e]))
|
|
980
1124
|
};
|
|
981
1125
|
} catch (e) {
|
|
982
|
-
o ||
|
|
1126
|
+
o || N(e, {
|
|
983
1127
|
source: "iam-user-online-status",
|
|
984
1128
|
phase: "load"
|
|
985
1129
|
});
|
|
@@ -991,16 +1135,16 @@ function Ot(e) {
|
|
|
991
1135
|
statusOf: l,
|
|
992
1136
|
refresh: u,
|
|
993
1137
|
dispose() {
|
|
994
|
-
o = !0, n.clear(),
|
|
1138
|
+
o = !0, n.clear(), r.clear(), s.unsubscribe();
|
|
995
1139
|
}
|
|
996
1140
|
};
|
|
997
1141
|
}
|
|
998
|
-
function
|
|
999
|
-
return e.type ===
|
|
1142
|
+
function Vt(e) {
|
|
1143
|
+
return e.type === Lt && e.moduleAlias === "iam.user" && !!e.recordId;
|
|
1000
1144
|
}
|
|
1001
1145
|
//#endregion
|
|
1002
1146
|
//#region src/platform-admin-runtime/user/UserOnlineStatusCell.vue
|
|
1003
|
-
var
|
|
1147
|
+
var Ht = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
1004
1148
|
name: "UserOnlineStatusCell",
|
|
1005
1149
|
__name: "UserOnlineStatusCell",
|
|
1006
1150
|
props: {
|
|
@@ -1008,7 +1152,7 @@ var At = /*#__PURE__*/ D(/* @__PURE__ */ K({
|
|
|
1008
1152
|
column: {}
|
|
1009
1153
|
},
|
|
1010
1154
|
setup(e) {
|
|
1011
|
-
let t =
|
|
1155
|
+
let t = b(), n = e, r = zt(), i = L(() => n.record.id == null ? void 0 : String(n.record.id)), a = L(() => r.statusOf(i.value)), o = L(() => {
|
|
1012
1156
|
let e = a.value;
|
|
1013
1157
|
if (!e) return "-";
|
|
1014
1158
|
if (e.present) {
|
|
@@ -1026,23 +1170,23 @@ var At = /*#__PURE__*/ D(/* @__PURE__ */ K({
|
|
|
1026
1170
|
function s() {
|
|
1027
1171
|
r.observe(i.value);
|
|
1028
1172
|
}
|
|
1029
|
-
return
|
|
1173
|
+
return Pe(s), X(i, s), (e, t) => (K(), B("span", { class: je({
|
|
1030
1174
|
"user-online-status--present": a.value?.present,
|
|
1031
1175
|
"user-online-status--offline": a.value && !a.value.online
|
|
1032
|
-
}) },
|
|
1176
|
+
}) }, J(o.value), 3));
|
|
1033
1177
|
}
|
|
1034
|
-
}), [["__scopeId", "data-v-56345a12"]]),
|
|
1178
|
+
}), [["__scopeId", "data-v-56345a12"]]), Ut = {
|
|
1035
1179
|
key: 1,
|
|
1036
1180
|
class: "user-password-drawer"
|
|
1037
|
-
},
|
|
1181
|
+
}, Wt = { key: 0 }, Gt = {
|
|
1038
1182
|
key: 1,
|
|
1039
1183
|
class: "user-password-reset"
|
|
1040
|
-
},
|
|
1184
|
+
}, Kt = { key: 0 }, qt = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
1041
1185
|
name: "UserPasswordDrawer",
|
|
1042
1186
|
__name: "UserPasswordDrawer",
|
|
1043
1187
|
props: { context: {} },
|
|
1044
1188
|
setup(e) {
|
|
1045
|
-
let t =
|
|
1189
|
+
let t = b(), n = e, r = q(""), i = q(), a = q(!1), o = L(() => n.context.record?.id == null ? void 0 : String(n.context.record.id));
|
|
1046
1190
|
async function s() {
|
|
1047
1191
|
let e = o.value;
|
|
1048
1192
|
if (e && !a.value && n.context.module.can("changePassword", e) === !0) {
|
|
@@ -1066,7 +1210,7 @@ var At = /*#__PURE__*/ D(/* @__PURE__ */ K({
|
|
|
1066
1210
|
phase: "action"
|
|
1067
1211
|
}), n.context.refreshList(), n.context.refreshDetailExtensions();
|
|
1068
1212
|
} catch (e) {
|
|
1069
|
-
|
|
1213
|
+
N(e, {
|
|
1070
1214
|
language: t,
|
|
1071
1215
|
source: "iam-user-password",
|
|
1072
1216
|
phase: "action"
|
|
@@ -1086,7 +1230,7 @@ var At = /*#__PURE__*/ D(/* @__PURE__ */ K({
|
|
|
1086
1230
|
path: `/iam.user/resetPassword/${encodeURIComponent(e)}`
|
|
1087
1231
|
}), n.context.refreshList(), n.context.refreshDetailExtensions();
|
|
1088
1232
|
} catch (e) {
|
|
1089
|
-
|
|
1233
|
+
N(e, {
|
|
1090
1234
|
language: t,
|
|
1091
1235
|
source: "iam-user-password",
|
|
1092
1236
|
phase: "action"
|
|
@@ -1096,80 +1240,80 @@ var At = /*#__PURE__*/ D(/* @__PURE__ */ K({
|
|
|
1096
1240
|
}
|
|
1097
1241
|
}
|
|
1098
1242
|
}
|
|
1099
|
-
return (n, l) => o.value ? (
|
|
1100
|
-
|
|
1101
|
-
|
|
1243
|
+
return (n, l) => o.value ? (K(), B("section", Ut, [e.context.module.can("changePassword", o.value) === !0 ? (K(), B("label", Wt, [
|
|
1244
|
+
V("span", null, J(Y(t).t("platform.screen.LoginView.new-password", "新密码")), 1),
|
|
1245
|
+
U(Y(S), {
|
|
1102
1246
|
value: r.value,
|
|
1103
1247
|
"onUpdate:value": l[0] ||= (e) => r.value = e,
|
|
1104
1248
|
type: "password",
|
|
1105
1249
|
disabled: a.value,
|
|
1106
|
-
placeholder:
|
|
1250
|
+
placeholder: Y(t).t("platform.screen.App.enter-your-new-password", "请输入新密码")
|
|
1107
1251
|
}, null, 8, [
|
|
1108
1252
|
"value",
|
|
1109
1253
|
"disabled",
|
|
1110
1254
|
"placeholder"
|
|
1111
1255
|
]),
|
|
1112
|
-
|
|
1256
|
+
U(Y(f), {
|
|
1113
1257
|
type: "primary",
|
|
1114
1258
|
loading: a.value,
|
|
1115
1259
|
onClick: s
|
|
1116
1260
|
}, {
|
|
1117
|
-
default:
|
|
1261
|
+
default: Z(() => [H(J(Y(t).t("platform.screen.LoginView.change-password", "修改密码")), 1)]),
|
|
1118
1262
|
_: 1
|
|
1119
1263
|
}, 8, ["loading"])
|
|
1120
|
-
])) :
|
|
1121
|
-
|
|
1122
|
-
|
|
1264
|
+
])) : z("v-if", !0), e.context.module.can("resetPassword", o.value) === !0 ? (K(), B("section", Gt, [
|
|
1265
|
+
V("p", null, J(Y(t).t("platform.screen.UserPasswordDrawer.generate-a-temporary-password-deliver-it-to-the-user-through", "由系统生成临时密码。请在安全渠道交付给用户,并提醒其尽快修改。")), 1),
|
|
1266
|
+
U(Y(f), {
|
|
1123
1267
|
loading: a.value,
|
|
1124
1268
|
onClick: c
|
|
1125
1269
|
}, {
|
|
1126
|
-
default:
|
|
1270
|
+
default: Z(() => [H(J(Y(t).t("platform.screen.UserPasswordDrawer.generate-temporary-password", "生成临时密码")), 1)]),
|
|
1127
1271
|
_: 1
|
|
1128
1272
|
}, 8, ["loading"]),
|
|
1129
|
-
i.value ? (
|
|
1130
|
-
])) :
|
|
1273
|
+
i.value ? (K(), B("dl", Kt, [V("div", null, [V("dt", null, J(Y(t).t("platform.screen.UserPasswordDrawer.temporary-password", "临时密码")), 1), V("dd", null, J(i.value.temporaryPassword), 1)]), V("div", null, [V("dt", null, J(Y(t).t("platform.screen.UserPasswordDrawer.expires-at", "失效时间")), 1), V("dd", null, J(i.value.expiresAt ?? "-"), 1)])])) : z("v-if", !0)
|
|
1274
|
+
])) : z("v-if", !0)])) : (K(), R(Y(ne), {
|
|
1131
1275
|
key: 0,
|
|
1132
|
-
title:
|
|
1133
|
-
message:
|
|
1276
|
+
title: Y(t).t("platform.screen.UserPasswordDrawer.user-not-found", "用户不存在"),
|
|
1277
|
+
message: Y(t).t("platform.screen.UserPasswordDrawer.reopen-the-user-details-to-manage-the-password", "请重新打开用户详情后再管理密码。")
|
|
1134
1278
|
}, null, 8, ["title", "message"]));
|
|
1135
1279
|
}
|
|
1136
1280
|
}), [["__scopeId", "data-v-891512e0"]]);
|
|
1137
1281
|
//#endregion
|
|
1138
1282
|
//#region src/platform-admin-runtime/user/useUserSessionRows.ts
|
|
1139
|
-
function
|
|
1140
|
-
let
|
|
1283
|
+
function Jt(e) {
|
|
1284
|
+
let t = e.language ?? T, r = q([]), i = q({}), a = n({ load: async (e) => {
|
|
1141
1285
|
await Promise.all(e.keys.map((t) => s(t, e.isLatest)));
|
|
1142
1286
|
} });
|
|
1143
1287
|
function o(e) {
|
|
1144
1288
|
a.enqueue(e);
|
|
1145
1289
|
}
|
|
1146
|
-
async function s(
|
|
1147
|
-
if (e.context.can("sessions",
|
|
1148
|
-
f(
|
|
1149
|
-
...u(
|
|
1290
|
+
async function s(n, r) {
|
|
1291
|
+
if (e.context.can("sessions", n) !== !1) {
|
|
1292
|
+
f(n, {
|
|
1293
|
+
...u(n),
|
|
1150
1294
|
loading: !0,
|
|
1151
1295
|
error: void 0,
|
|
1152
1296
|
failure: void 0
|
|
1153
1297
|
});
|
|
1154
1298
|
try {
|
|
1155
|
-
await e.context.recordActions(
|
|
1156
|
-
let
|
|
1299
|
+
await e.context.recordActions(n);
|
|
1300
|
+
let t = await e.context.http.request({
|
|
1157
1301
|
method: "GET",
|
|
1158
|
-
path: `/iam.user/${encodeURIComponent(
|
|
1302
|
+
path: `/iam.user/${encodeURIComponent(n)}/sessions`
|
|
1159
1303
|
});
|
|
1160
|
-
r(
|
|
1161
|
-
records:
|
|
1304
|
+
r(n) && f(n, {
|
|
1305
|
+
records: t,
|
|
1162
1306
|
loading: !1
|
|
1163
1307
|
});
|
|
1164
1308
|
} catch (i) {
|
|
1165
|
-
if (!r(
|
|
1166
|
-
let a =
|
|
1167
|
-
|
|
1168
|
-
language:
|
|
1309
|
+
if (!r(n)) return;
|
|
1310
|
+
let a = F(i);
|
|
1311
|
+
N(a, {
|
|
1312
|
+
language: t,
|
|
1169
1313
|
source: `${e.source}-sessions`,
|
|
1170
1314
|
phase: "load"
|
|
1171
|
-
}), f(
|
|
1172
|
-
...u(
|
|
1315
|
+
}), f(n, {
|
|
1316
|
+
...u(n),
|
|
1173
1317
|
loading: !1,
|
|
1174
1318
|
failure: a
|
|
1175
1319
|
});
|
|
@@ -1186,11 +1330,11 @@ function It(e) {
|
|
|
1186
1330
|
t && r.value.includes(t) && o(t);
|
|
1187
1331
|
}
|
|
1188
1332
|
function u(e) {
|
|
1189
|
-
let
|
|
1190
|
-
return
|
|
1191
|
-
...
|
|
1192
|
-
error:
|
|
1193
|
-
} :
|
|
1333
|
+
let n = e ? i.value[e] : void 0;
|
|
1334
|
+
return n ? n.failure ? {
|
|
1335
|
+
...n,
|
|
1336
|
+
error: M(n.failure, t)
|
|
1337
|
+
} : n : {
|
|
1194
1338
|
records: [],
|
|
1195
1339
|
loading: !1
|
|
1196
1340
|
};
|
|
@@ -1214,7 +1358,7 @@ function It(e) {
|
|
|
1214
1358
|
}
|
|
1215
1359
|
//#endregion
|
|
1216
1360
|
//#region src/platform-admin-runtime/userModulePageEnhancement.ts
|
|
1217
|
-
var
|
|
1361
|
+
var Yt = {
|
|
1218
1362
|
id: "iam-user-standard-page-enhancement",
|
|
1219
1363
|
target: { moduleAlias: "iam.user" },
|
|
1220
1364
|
navigator: { emptyListScope: ({ currentUser: e, selectedNavigatorRecords: t }) => {
|
|
@@ -1227,56 +1371,56 @@ var Lt = {
|
|
|
1227
1371
|
list: {
|
|
1228
1372
|
rowExpansion: {
|
|
1229
1373
|
key: "iam-user-sessions",
|
|
1230
|
-
component: /* @__PURE__ */
|
|
1374
|
+
component: /* @__PURE__ */ G({
|
|
1231
1375
|
name: "UserSessionListExpansion",
|
|
1232
1376
|
__name: "UserSessionListExpansion",
|
|
1233
1377
|
props: { context: {} },
|
|
1234
1378
|
setup(e) {
|
|
1235
|
-
let t =
|
|
1379
|
+
let t = b(), n = e, r = L(() => n.context.record.id == null ? void 0 : String(n.context.record.id)), a = Jt({
|
|
1236
1380
|
context: n.context.module,
|
|
1237
1381
|
source: "iam-user-list-expansion",
|
|
1238
1382
|
language: t
|
|
1239
|
-
}), o =
|
|
1240
|
-
|
|
1383
|
+
}), o = L(() => a.userSessionState(r.value)), s = L(() => o.value.records.filter((e) => !e.current && n.context.module.can("revokeSession", r.value) === !0)), c = L(() => s.value.length > 1 && n.context.module.can("revokeSessions", r.value) === !0);
|
|
1384
|
+
X([r, () => n.context.expanded], ([e, t]) => {
|
|
1241
1385
|
e && a.handleUserRowExpand({ id: e }, t);
|
|
1242
1386
|
}, { immediate: !0 });
|
|
1243
|
-
let l =
|
|
1244
|
-
|
|
1387
|
+
let l = i((e) => a.handleUserSessionBusinessEvent(e));
|
|
1388
|
+
Ie(() => {
|
|
1245
1389
|
l.unsubscribe(), a.reset();
|
|
1246
1390
|
});
|
|
1247
1391
|
async function u(e) {
|
|
1248
|
-
let
|
|
1249
|
-
|
|
1392
|
+
let i = r.value;
|
|
1393
|
+
i && !e.current && n.context.module.can("revokeSession", i) === !0 && await ce({
|
|
1250
1394
|
title: t.t("platform.screen.UserSessionListExpansion.sign-out-session", "下线登录会话"),
|
|
1251
1395
|
content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-login-session", "确认下线该登录会话?"),
|
|
1252
1396
|
okText: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-session", "下线"),
|
|
1253
1397
|
danger: !0
|
|
1254
1398
|
}, t) && (await n.context.module.http.request({
|
|
1255
1399
|
method: "POST",
|
|
1256
|
-
path: `/iam.user/${encodeURIComponent(
|
|
1257
|
-
}), a.loadUserSessions(
|
|
1400
|
+
path: `/iam.user/${encodeURIComponent(i)}/sessions/${encodeURIComponent(e.id)}/revoke`
|
|
1401
|
+
}), a.loadUserSessions(i));
|
|
1258
1402
|
}
|
|
1259
1403
|
async function d() {
|
|
1260
|
-
let e =
|
|
1261
|
-
e &&
|
|
1404
|
+
let e = r.value, i = s.value.map((e) => e.id);
|
|
1405
|
+
e && i.length !== 0 && n.context.module.can("revokeSessions", e) === !0 && await ce({
|
|
1262
1406
|
title: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-all-sessions", "全部下线"),
|
|
1263
|
-
content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-user-s-value-login-sessions", "确认下线该用户的 {value1} 个登录会话?", { value1:
|
|
1407
|
+
content: t.t("platform.screen.UserSessionListExpansion.sign-out-this-user-s-value-login-sessions", "确认下线该用户的 {value1} 个登录会话?", { value1: i.length }),
|
|
1264
1408
|
okText: t.t("platform.screen.UserSessionExpandedSubtable.sign-out-all-sessions", "全部下线"),
|
|
1265
1409
|
danger: !0
|
|
1266
1410
|
}, t) && (await n.context.module.http.request({
|
|
1267
1411
|
method: "POST",
|
|
1268
1412
|
path: `/iam.user/${encodeURIComponent(e)}/sessions/revoke`,
|
|
1269
|
-
body: { sessionIds:
|
|
1413
|
+
body: { sessionIds: i }
|
|
1270
1414
|
}), a.loadUserSessions(e));
|
|
1271
1415
|
}
|
|
1272
|
-
return (t, n) => (
|
|
1416
|
+
return (t, n) => (K(), R(Y(C), {
|
|
1273
1417
|
embedded: "",
|
|
1274
1418
|
sessions: o.value.records,
|
|
1275
1419
|
loading: o.value.loading,
|
|
1276
1420
|
error: o.value.error,
|
|
1277
|
-
"can-revoke": (t) => !t.current && e.context.module.can("revokeSession",
|
|
1421
|
+
"can-revoke": (t) => !t.current && e.context.module.can("revokeSession", r.value) === !0,
|
|
1278
1422
|
"can-revoke-all": c.value,
|
|
1279
|
-
onRefresh: n[0] ||= (e) =>
|
|
1423
|
+
onRefresh: n[0] ||= (e) => Y(a).loadUserSessions(r.value),
|
|
1280
1424
|
onRevoke: u,
|
|
1281
1425
|
onRevokeAll: d
|
|
1282
1426
|
}, null, 8, [
|
|
@@ -1296,7 +1440,7 @@ var Lt = {
|
|
|
1296
1440
|
width: "112px",
|
|
1297
1441
|
align: "center",
|
|
1298
1442
|
before: "enabled",
|
|
1299
|
-
cell:
|
|
1443
|
+
cell: Ht
|
|
1300
1444
|
}]
|
|
1301
1445
|
},
|
|
1302
1446
|
detail: { actions: [{
|
|
@@ -1311,26 +1455,26 @@ var Lt = {
|
|
|
1311
1455
|
title: "密码管理",
|
|
1312
1456
|
titleKey: "platform.entry.password-management",
|
|
1313
1457
|
width: "narrow",
|
|
1314
|
-
component:
|
|
1458
|
+
component: qt
|
|
1315
1459
|
});
|
|
1316
1460
|
}
|
|
1317
1461
|
}] }
|
|
1318
|
-
},
|
|
1319
|
-
function
|
|
1462
|
+
}, Xt = "/iam.role/scope-selection/descriptor", Zt = "/iam.role/scope-selection/candidates";
|
|
1463
|
+
function Qt(e) {
|
|
1320
1464
|
return {
|
|
1321
1465
|
async descriptor() {
|
|
1322
|
-
return
|
|
1466
|
+
return $t(await e.request({ path: Xt }));
|
|
1323
1467
|
},
|
|
1324
1468
|
async candidates(t) {
|
|
1325
|
-
let n =
|
|
1326
|
-
return
|
|
1469
|
+
let n = mn(t.pageNum) ?? 1, r = mn(t.pageSize) ?? 100;
|
|
1470
|
+
return en(await e.request({
|
|
1327
1471
|
method: "POST",
|
|
1328
|
-
path:
|
|
1472
|
+
path: Zt,
|
|
1329
1473
|
body: {
|
|
1330
|
-
navigationKey:
|
|
1474
|
+
navigationKey: dn(t.navigationKey, "navigationKey"),
|
|
1331
1475
|
level: t.level,
|
|
1332
|
-
keyword:
|
|
1333
|
-
parentId:
|
|
1476
|
+
keyword: un(t.keyword),
|
|
1477
|
+
parentId: un(t.parentId),
|
|
1334
1478
|
page: {
|
|
1335
1479
|
pageNum: n,
|
|
1336
1480
|
pageSize: r
|
|
@@ -1340,35 +1484,35 @@ function Bt(e) {
|
|
|
1340
1484
|
}
|
|
1341
1485
|
};
|
|
1342
1486
|
}
|
|
1343
|
-
function
|
|
1344
|
-
let t =
|
|
1487
|
+
function $t(e) {
|
|
1488
|
+
let t = sn(e);
|
|
1345
1489
|
return {
|
|
1346
|
-
directSelections:
|
|
1347
|
-
navigations:
|
|
1490
|
+
directSelections: cn(t.directSelections).flatMap(tn),
|
|
1491
|
+
navigations: cn(t.navigations).flatMap(nn)
|
|
1348
1492
|
};
|
|
1349
1493
|
}
|
|
1350
|
-
function
|
|
1351
|
-
let n =
|
|
1494
|
+
function en(e, t) {
|
|
1495
|
+
let n = sn(e), r = cn(n.records).flatMap(rn), i = pn(n.pageNum) ?? t, a = pn(n.pages), o = fn(n.totalKnown, !0) && a != null ? i < a : r.length > 0;
|
|
1352
1496
|
return {
|
|
1353
1497
|
records: r,
|
|
1354
1498
|
hasMore: o,
|
|
1355
1499
|
...o ? { nextPage: i + 1 } : {}
|
|
1356
1500
|
};
|
|
1357
1501
|
}
|
|
1358
|
-
function
|
|
1359
|
-
let t =
|
|
1502
|
+
function tn(e) {
|
|
1503
|
+
let t = sn(e), n = ln(t.selectionKey);
|
|
1360
1504
|
if (!n) return [];
|
|
1361
|
-
let r =
|
|
1505
|
+
let r = ln(t.title ?? t.label) ?? n, i = an(t.titleText, r);
|
|
1362
1506
|
return [{
|
|
1363
1507
|
selectionKey: n,
|
|
1364
1508
|
label: r,
|
|
1365
1509
|
...i ? { labelText: i } : {}
|
|
1366
1510
|
}];
|
|
1367
1511
|
}
|
|
1368
|
-
function
|
|
1369
|
-
let t =
|
|
1512
|
+
function nn(e) {
|
|
1513
|
+
let t = sn(e), n = ln(t.navigationKey), r = on(t.level);
|
|
1370
1514
|
if (!n || !r) return [];
|
|
1371
|
-
let i =
|
|
1515
|
+
let i = ln(t.title ?? t.label) ?? n, a = an(t.titleText, i);
|
|
1372
1516
|
return [{
|
|
1373
1517
|
navigationKey: n,
|
|
1374
1518
|
level: r,
|
|
@@ -1376,22 +1520,22 @@ function Wt(e) {
|
|
|
1376
1520
|
...a ? { labelText: a } : {}
|
|
1377
1521
|
}];
|
|
1378
1522
|
}
|
|
1379
|
-
function
|
|
1380
|
-
let t =
|
|
1523
|
+
function rn(e) {
|
|
1524
|
+
let t = sn(e), n = ln(t.id), r = ln(t.selectionKey);
|
|
1381
1525
|
return !n || !r ? [] : [{
|
|
1382
1526
|
id: n,
|
|
1383
1527
|
selectionKey: r,
|
|
1384
|
-
label:
|
|
1385
|
-
...
|
|
1386
|
-
expandable:
|
|
1528
|
+
label: ln(t.title ?? t.label) ?? r,
|
|
1529
|
+
...ln(t.subtitle ?? t.secondaryLabel) ? { secondaryLabel: ln(t.subtitle ?? t.secondaryLabel) } : {},
|
|
1530
|
+
expandable: fn(t.expandable, !1)
|
|
1387
1531
|
}];
|
|
1388
1532
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let n =
|
|
1391
|
-
if (!
|
|
1533
|
+
function an(e, t) {
|
|
1534
|
+
let n = sn(e), r = n.source;
|
|
1535
|
+
if (!ue(r) || r.sourceKind !== "CODE" || !r.sourceId.startsWith("iam.role.scope.") || !_(r, t)) return;
|
|
1392
1536
|
let i = {};
|
|
1393
|
-
for (let [e, t] of Object.entries(
|
|
1394
|
-
let n =
|
|
1537
|
+
for (let [e, t] of Object.entries(sn(n.languages))) {
|
|
1538
|
+
let n = sn(t);
|
|
1395
1539
|
typeof n.text == "string" && n.requestedTag === e && typeof n.missing == "boolean" && typeof n.fallback == "boolean" && (i[e] = {
|
|
1396
1540
|
text: n.text,
|
|
1397
1541
|
requestedTag: e,
|
|
@@ -1405,76 +1549,76 @@ function Kt(e, t) {
|
|
|
1405
1549
|
languages: i
|
|
1406
1550
|
} : void 0;
|
|
1407
1551
|
}
|
|
1408
|
-
function
|
|
1552
|
+
function on(e) {
|
|
1409
1553
|
return e === "TENANT" || e === "ORGANIZATION" ? e : void 0;
|
|
1410
1554
|
}
|
|
1411
|
-
function
|
|
1555
|
+
function sn(e) {
|
|
1412
1556
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
1413
1557
|
}
|
|
1414
|
-
function
|
|
1558
|
+
function cn(e) {
|
|
1415
1559
|
return Array.isArray(e) ? e : [];
|
|
1416
1560
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return typeof e == "string" ?
|
|
1561
|
+
function ln(e) {
|
|
1562
|
+
return typeof e == "string" ? un(e) : void 0;
|
|
1419
1563
|
}
|
|
1420
|
-
function
|
|
1564
|
+
function un(e) {
|
|
1421
1565
|
return e?.trim() || void 0;
|
|
1422
1566
|
}
|
|
1423
|
-
function
|
|
1424
|
-
let n =
|
|
1567
|
+
function dn(e, t) {
|
|
1568
|
+
let n = un(e);
|
|
1425
1569
|
if (!n) throw Error(`角色归属范围${t}不能为空`);
|
|
1426
1570
|
return n;
|
|
1427
1571
|
}
|
|
1428
|
-
function
|
|
1572
|
+
function fn(e, t) {
|
|
1429
1573
|
return typeof e == "boolean" ? e : t;
|
|
1430
1574
|
}
|
|
1431
|
-
function
|
|
1575
|
+
function pn(e) {
|
|
1432
1576
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
1433
1577
|
}
|
|
1434
|
-
function
|
|
1578
|
+
function mn(e) {
|
|
1435
1579
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
1436
1580
|
}
|
|
1437
1581
|
//#endregion
|
|
1438
1582
|
//#region src/platform-admin-runtime/role/RoleScopeTree.vue
|
|
1439
|
-
var
|
|
1583
|
+
var hn = /* @__PURE__ */ G({
|
|
1440
1584
|
name: "RoleScopeTree",
|
|
1441
1585
|
__name: "RoleScopeTree",
|
|
1442
1586
|
props: { context: {} },
|
|
1443
1587
|
setup(e) {
|
|
1444
|
-
let t =
|
|
1588
|
+
let t = b(), n = e, r = Qt(x()), i = q(), a = q(""), o = q(!1), s = q([]), c = q([]), l = q(0), d = q(/* @__PURE__ */ new Map()), f = L(() => n.context.selectionKey), h = L(() => i.value?.navigations.some((e) => e.level === "TENANT") === !0), g = L(() => i.value?.navigations.length !== 0), _ = L(() => h.value ? t.t("platform.screen.ModulePageHostRuntime.tenant", "租户") : t.t("platform.user-picker.axis.organization", "机构")), v = p({
|
|
1445
1589
|
nodes: () => s.value,
|
|
1446
|
-
loader: () =>
|
|
1590
|
+
loader: () => ie,
|
|
1447
1591
|
version: () => l.value
|
|
1448
|
-
}),
|
|
1449
|
-
function
|
|
1592
|
+
}), y = L(() => S(v.nodes.value));
|
|
1593
|
+
function S(e) {
|
|
1450
1594
|
return e.map((e) => ({
|
|
1451
1595
|
...e,
|
|
1452
|
-
title:
|
|
1453
|
-
...e.children ? { children:
|
|
1596
|
+
title: pe(e.title, d.value.get(e.key)?.labelText, t),
|
|
1597
|
+
...e.children ? { children: S(e.children) } : {}
|
|
1454
1598
|
}));
|
|
1455
1599
|
}
|
|
1456
|
-
let
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}),
|
|
1460
|
-
|
|
1600
|
+
let C = v.states, w = 0, T;
|
|
1601
|
+
Pe(() => void E()), Ne(() => {
|
|
1602
|
+
w += 1, T && clearTimeout(T);
|
|
1603
|
+
}), X(a, () => {
|
|
1604
|
+
g.value && (T && clearTimeout(T), T = setTimeout(() => void O(), 240));
|
|
1461
1605
|
});
|
|
1462
|
-
async function
|
|
1606
|
+
async function E() {
|
|
1463
1607
|
o.value = !0;
|
|
1464
1608
|
try {
|
|
1465
1609
|
i.value = await r.descriptor();
|
|
1466
1610
|
let e = i.value.directSelections[0], t = i.value.directSelections.find((e) => e.selectionKey === n.context.selectionKey);
|
|
1467
|
-
t?.labelText &&
|
|
1611
|
+
t?.labelText && oe({
|
|
1468
1612
|
key: t.selectionKey,
|
|
1469
1613
|
label: t.label,
|
|
1470
1614
|
labelText: t.labelText
|
|
1471
|
-
}), !n.context.selectionKey && e &&
|
|
1615
|
+
}), !n.context.selectionKey && e && oe({
|
|
1472
1616
|
key: e.selectionKey,
|
|
1473
1617
|
label: e.label,
|
|
1474
1618
|
labelText: e.labelText
|
|
1475
|
-
}), await
|
|
1619
|
+
}), await D();
|
|
1476
1620
|
} catch (e) {
|
|
1477
|
-
|
|
1621
|
+
N(e, {
|
|
1478
1622
|
language: t,
|
|
1479
1623
|
source: "role-scope-tree",
|
|
1480
1624
|
phase: "load"
|
|
@@ -1483,34 +1627,34 @@ var nn = /* @__PURE__ */ K({
|
|
|
1483
1627
|
o.value = !1;
|
|
1484
1628
|
}
|
|
1485
1629
|
}
|
|
1486
|
-
async function
|
|
1630
|
+
async function D(e = {}) {
|
|
1487
1631
|
let n = i.value;
|
|
1488
1632
|
if (!n) return;
|
|
1489
|
-
let r = ++
|
|
1633
|
+
let r = ++w;
|
|
1490
1634
|
if (!e.append) {
|
|
1491
1635
|
c.value = [], l.value += 1, o.value = !0;
|
|
1492
1636
|
try {
|
|
1493
|
-
let e =
|
|
1494
|
-
if (r !==
|
|
1495
|
-
|
|
1637
|
+
let e = ee(n);
|
|
1638
|
+
if (r !== w) return;
|
|
1639
|
+
d.value = /* @__PURE__ */ new Map(), k(e), s.value = e.map((e) => e.ui);
|
|
1496
1640
|
} catch (e) {
|
|
1497
|
-
if (r !==
|
|
1498
|
-
s.value = [],
|
|
1641
|
+
if (r !== w) return;
|
|
1642
|
+
s.value = [], N(e, {
|
|
1499
1643
|
language: t,
|
|
1500
1644
|
source: "role-scope-tree",
|
|
1501
1645
|
phase: "load"
|
|
1502
1646
|
});
|
|
1503
1647
|
} finally {
|
|
1504
|
-
r ===
|
|
1648
|
+
r === w && (o.value = !1);
|
|
1505
1649
|
}
|
|
1506
1650
|
}
|
|
1507
1651
|
}
|
|
1508
|
-
async function
|
|
1509
|
-
if (await
|
|
1652
|
+
async function O() {
|
|
1653
|
+
if (await D(), !a.value.trim()) return;
|
|
1510
1654
|
let e = (i.value?.navigations ?? []).map((e) => `navigation:${e.navigationKey}`);
|
|
1511
|
-
c.value = e, await
|
|
1655
|
+
c.value = e, await Ae(), await Promise.all(e.map((e) => v.request(e, "refresh")));
|
|
1512
1656
|
}
|
|
1513
|
-
function
|
|
1657
|
+
function ee(e) {
|
|
1514
1658
|
return [
|
|
1515
1659
|
...e.directSelections.map((e) => ({
|
|
1516
1660
|
ui: {
|
|
@@ -1525,11 +1669,11 @@ var nn = /* @__PURE__ */ K({
|
|
|
1525
1669
|
labelText: e.labelText
|
|
1526
1670
|
}
|
|
1527
1671
|
})),
|
|
1528
|
-
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) =>
|
|
1529
|
-
...e.navigations.filter((e) => e.level === "TENANT").map((e) =>
|
|
1672
|
+
...e.navigations.filter((e) => e.level === "ORGANIZATION").map((e) => te(e)),
|
|
1673
|
+
...e.navigations.filter((e) => e.level === "TENANT").map((e) => te(e))
|
|
1530
1674
|
];
|
|
1531
1675
|
}
|
|
1532
|
-
function
|
|
1676
|
+
function te(e) {
|
|
1533
1677
|
return {
|
|
1534
1678
|
ui: {
|
|
1535
1679
|
key: `navigation:${e.navigationKey}`,
|
|
@@ -1543,8 +1687,8 @@ var nn = /* @__PURE__ */ K({
|
|
|
1543
1687
|
}
|
|
1544
1688
|
};
|
|
1545
1689
|
}
|
|
1546
|
-
function
|
|
1547
|
-
let r =
|
|
1690
|
+
function ne(e, t, n) {
|
|
1691
|
+
let r = re(e, t, n);
|
|
1548
1692
|
return {
|
|
1549
1693
|
ui: {
|
|
1550
1694
|
key: e.selectionKey,
|
|
@@ -1560,7 +1704,7 @@ var nn = /* @__PURE__ */ K({
|
|
|
1560
1704
|
children: r
|
|
1561
1705
|
};
|
|
1562
1706
|
}
|
|
1563
|
-
function
|
|
1707
|
+
function re(e, t, n) {
|
|
1564
1708
|
return t === "TENANT" ? {
|
|
1565
1709
|
navigationKey: e.selectionKey,
|
|
1566
1710
|
level: "ORGANIZATION"
|
|
@@ -1570,8 +1714,8 @@ var nn = /* @__PURE__ */ K({
|
|
|
1570
1714
|
parentId: e.id
|
|
1571
1715
|
} : void 0;
|
|
1572
1716
|
}
|
|
1573
|
-
async function
|
|
1574
|
-
let i =
|
|
1717
|
+
async function ie(e, n) {
|
|
1718
|
+
let i = d.value.get(e.key);
|
|
1575
1719
|
if (!i?.children) throw Error(t.t("platform.screen.RoleScopeTree.the-role-ownership-scope-is-no-longer-available", "角色归属范围已失效"));
|
|
1576
1720
|
try {
|
|
1577
1721
|
let e = await r.candidates({
|
|
@@ -1580,71 +1724,71 @@ var nn = /* @__PURE__ */ K({
|
|
|
1580
1724
|
pageNum: n.reason === "load-more" ? Number(n.cursor) : 1
|
|
1581
1725
|
});
|
|
1582
1726
|
n.signal.throwIfAborted();
|
|
1583
|
-
let t = e.records.map((e) =>
|
|
1584
|
-
return
|
|
1727
|
+
let t = e.records.map((e) => ne(e, i.children.level, i.children.navigationKey));
|
|
1728
|
+
return k(t), {
|
|
1585
1729
|
mode: n.reason === "load-more" ? "append" : "replace",
|
|
1586
1730
|
nodes: t.map((e) => e.ui),
|
|
1587
1731
|
hasMore: e.hasMore,
|
|
1588
1732
|
nextCursor: e.nextPage == null ? void 0 : String(e.nextPage)
|
|
1589
1733
|
};
|
|
1590
1734
|
} catch (e) {
|
|
1591
|
-
throw n.signal.aborted ||
|
|
1735
|
+
throw n.signal.aborted || N(e, {
|
|
1592
1736
|
language: t,
|
|
1593
1737
|
source: "role-scope-tree",
|
|
1594
1738
|
phase: "load"
|
|
1595
1739
|
}), e;
|
|
1596
1740
|
}
|
|
1597
1741
|
}
|
|
1598
|
-
function
|
|
1599
|
-
let t = new Map(
|
|
1600
|
-
e.forEach((e) => t.set(e.ui.key, e)),
|
|
1742
|
+
function k(e) {
|
|
1743
|
+
let t = new Map(d.value);
|
|
1744
|
+
e.forEach((e) => t.set(e.ui.key, e)), d.value = t;
|
|
1601
1745
|
}
|
|
1602
|
-
function
|
|
1603
|
-
let t =
|
|
1604
|
-
t &&
|
|
1746
|
+
function ae(e) {
|
|
1747
|
+
let t = d.value.get(e.key)?.selection;
|
|
1748
|
+
t && oe(t);
|
|
1605
1749
|
}
|
|
1606
|
-
function
|
|
1750
|
+
function oe(e) {
|
|
1607
1751
|
n.context.selectSelectionKey(e.key, {
|
|
1608
1752
|
label: e.label,
|
|
1609
1753
|
...e.labelText ? { labelText: e.labelText } : {},
|
|
1610
1754
|
secondaryLabel: e.secondaryLabel
|
|
1611
1755
|
});
|
|
1612
1756
|
}
|
|
1613
|
-
function
|
|
1757
|
+
function se() {
|
|
1614
1758
|
let e = i.value?.directSelections[0];
|
|
1615
|
-
e &&
|
|
1759
|
+
e && oe({
|
|
1616
1760
|
key: e.selectionKey,
|
|
1617
1761
|
label: e.label,
|
|
1618
1762
|
labelText: e.labelText
|
|
1619
1763
|
});
|
|
1620
1764
|
}
|
|
1621
|
-
return (e, n) => (
|
|
1765
|
+
return (e, n) => (K(), R(Y(u), {
|
|
1622
1766
|
class: "role-scope-tree",
|
|
1623
|
-
title:
|
|
1624
|
-
"refresh-title":
|
|
1767
|
+
title: _.value,
|
|
1768
|
+
"refresh-title": Y(t).t("platform.screen.RoleScopeTree.refresh-role-ownership-scopes", "刷新角色归属范围"),
|
|
1625
1769
|
"search-keyword": a.value,
|
|
1626
|
-
"search-placeholder":
|
|
1627
|
-
searchable:
|
|
1628
|
-
onRefresh:
|
|
1770
|
+
"search-placeholder": Y(t).t("platform.screen.RoleScopeTree.search-names-codes-or-ids", "搜索名称、编码或标识"),
|
|
1771
|
+
searchable: g.value,
|
|
1772
|
+
onRefresh: D,
|
|
1629
1773
|
"onUpdate:searchKeyword": n[3] ||= (e) => a.value = e
|
|
1630
1774
|
}, {
|
|
1631
|
-
default:
|
|
1775
|
+
default: Z(() => [o.value ? (K(), R(Y(m), {
|
|
1632
1776
|
key: 0,
|
|
1633
|
-
tip:
|
|
1634
|
-
}, null, 8, ["tip"])) : (
|
|
1777
|
+
tip: Y(t).t("platform.screen.RoleScopeTree.loading-role-ownership-scopes", "加载角色归属范围")
|
|
1778
|
+
}, null, 8, ["tip"])) : (K(), R(Y(j), {
|
|
1635
1779
|
key: 1,
|
|
1636
1780
|
"expanded-keys": c.value,
|
|
1637
1781
|
"onUpdate:expandedKeys": n[0] ||= (e) => c.value = e,
|
|
1638
|
-
nodes:
|
|
1639
|
-
"selected-key":
|
|
1782
|
+
nodes: y.value,
|
|
1783
|
+
"selected-key": f.value,
|
|
1640
1784
|
"reload-key": l.value,
|
|
1641
1785
|
"load-strategy": "controlled",
|
|
1642
1786
|
"reload-on-reexpand": "",
|
|
1643
|
-
"branch-states":
|
|
1644
|
-
onLoadRequest: n[1] ||= (e) =>
|
|
1645
|
-
onSelect:
|
|
1646
|
-
onDeselect:
|
|
1647
|
-
onUnloadChildren: n[2] ||= (e) =>
|
|
1787
|
+
"branch-states": Y(C),
|
|
1788
|
+
onLoadRequest: n[1] ||= (e) => Y(v).request(e.node.key, e.reason, Y(v).stateOf(e.node.key).status === "error"),
|
|
1789
|
+
onSelect: ae,
|
|
1790
|
+
onDeselect: se,
|
|
1791
|
+
onUnloadChildren: n[2] ||= (e) => Y(v).release(e.key)
|
|
1648
1792
|
}, null, 8, [
|
|
1649
1793
|
"expanded-keys",
|
|
1650
1794
|
"nodes",
|
|
@@ -1661,7 +1805,7 @@ var nn = /* @__PURE__ */ K({
|
|
|
1661
1805
|
"searchable"
|
|
1662
1806
|
]));
|
|
1663
1807
|
}
|
|
1664
|
-
}),
|
|
1808
|
+
}), gn = /* @__PURE__ */ G({
|
|
1665
1809
|
name: "RoleEnumTitleCell",
|
|
1666
1810
|
__name: "RoleEnumTitleCell",
|
|
1667
1811
|
props: {
|
|
@@ -1669,7 +1813,7 @@ var nn = /* @__PURE__ */ K({
|
|
|
1669
1813
|
column: {}
|
|
1670
1814
|
},
|
|
1671
1815
|
setup(e) {
|
|
1672
|
-
let t =
|
|
1816
|
+
let t = b(), n = e, r = L(() => {
|
|
1673
1817
|
let e = String(n.record[n.column?.key ?? ""] ?? "");
|
|
1674
1818
|
return {
|
|
1675
1819
|
account: t.t("platform.screen.RoleManagementView.account-role", "账号角色"),
|
|
@@ -1684,12 +1828,12 @@ var nn = /* @__PURE__ */ K({
|
|
|
1684
1828
|
platform: t.t("platform.screen.RoleManagementView.globally-visible", "全局公开")
|
|
1685
1829
|
}[e] ?? (e || "-");
|
|
1686
1830
|
});
|
|
1687
|
-
return (e, t) => (
|
|
1831
|
+
return (e, t) => (K(), B("span", null, J(r.value), 1));
|
|
1688
1832
|
}
|
|
1689
1833
|
});
|
|
1690
1834
|
//#endregion
|
|
1691
1835
|
//#region src/views/roleGrantClient.ts
|
|
1692
|
-
function
|
|
1836
|
+
function _n(e) {
|
|
1693
1837
|
return {
|
|
1694
1838
|
accountRoleGrants(t, n) {
|
|
1695
1839
|
return e.request({
|
|
@@ -1795,19 +1939,19 @@ function an(e) {
|
|
|
1795
1939
|
}
|
|
1796
1940
|
//#endregion
|
|
1797
1941
|
//#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
1798
|
-
var
|
|
1942
|
+
var vn = {
|
|
1799
1943
|
key: 1,
|
|
1800
1944
|
class: "role-account-grant-drawer-state"
|
|
1801
|
-
},
|
|
1945
|
+
}, yn = {
|
|
1802
1946
|
key: 0,
|
|
1803
1947
|
class: "role-account-grant-target-tenant"
|
|
1804
|
-
},
|
|
1948
|
+
}, bn = {
|
|
1805
1949
|
key: 1,
|
|
1806
1950
|
class: "role-account-grant-target-hint"
|
|
1807
|
-
},
|
|
1951
|
+
}, xn = { class: "role-account-grant-search" }, Sn = {
|
|
1808
1952
|
key: 0,
|
|
1809
1953
|
class: "role-account-grant-selected"
|
|
1810
|
-
},
|
|
1954
|
+
}, Cn = { class: "role-account-grant-selected-title" }, wn = { class: "role-account-grant-selected-list" }, Tn = ["disabled", "onClick"], En = 20, Dn = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
1811
1955
|
name: "RoleAccountGrantDrawer",
|
|
1812
1956
|
__name: "RoleAccountGrantDrawer",
|
|
1813
1957
|
props: {
|
|
@@ -1820,25 +1964,25 @@ var on = {
|
|
|
1820
1964
|
},
|
|
1821
1965
|
emits: ["close", "saved"],
|
|
1822
1966
|
setup(e, { emit: t }) {
|
|
1823
|
-
let n =
|
|
1967
|
+
let n = b(), r = e, i = t, a = q([]), o = q({}), s = q([]), c = q(/* @__PURE__ */ new Set()), l = q(/* @__PURE__ */ new Set()), u = q(""), d = q(""), p = q(1), h = q(0), g = q(!1), _ = q(!1), y = q(!1), x = q(!1), C = q(), w = L(() => _n(r.context.http)), T = v({ moduleAlias: "iam.tenant" }), E = L(() => r.role?.id), O = L(() => r.role ? n.t("platform.screen.RoleAccountGrantDrawer.assign-users-value", "绑定用户 - {value1}", { value1: Ae(r.role) }) : n.t("platform.screen.RoleManagementView.assign-to-users", "绑定用户")), ee = L(() => r.embedded ? "section" : D), te = L(() => r.embedded ? {} : {
|
|
1824
1968
|
open: r.open,
|
|
1825
|
-
title:
|
|
1969
|
+
title: O.value,
|
|
1826
1970
|
renderMode: r.container ? "inline" : "portal",
|
|
1827
1971
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
1828
|
-
onClose:
|
|
1829
|
-
}),
|
|
1972
|
+
onClose: xe
|
|
1973
|
+
}), re = L(() => r.role?.ownerScopeType === "platform"), ie = L(() => C.value?.id), k = L(() => !re.value || !!ie.value), ae = L(() => T), oe = L(() => {
|
|
1830
1974
|
let e = /* @__PURE__ */ new Map();
|
|
1831
1975
|
for (let t of a.value) t.userId && e.set(t.userId, t);
|
|
1832
1976
|
return e;
|
|
1833
|
-
}),
|
|
1977
|
+
}), se = L(() => s.value.filter((e) => e.id).map((e) => ({
|
|
1834
1978
|
id: e.id,
|
|
1835
|
-
username:
|
|
1979
|
+
username: G(e),
|
|
1836
1980
|
employeeNo: e.employeeNo ?? "",
|
|
1837
1981
|
employeeTitle: e.employeeTitle ?? "",
|
|
1838
1982
|
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
1839
1983
|
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
1840
1984
|
boundTitle: l.value.has(e.id) ? n.t("platform.screen.RoleAccountGrantDrawer.assigned", "已绑定") : n.t("platform.screen.MetadataGovernanceSurface.unbound", "未绑定")
|
|
1841
|
-
}))),
|
|
1985
|
+
}))), ce = L(() => [...c.value].map((e) => o.value[e] ?? W(e))), A = L(() => [...c.value].filter((e) => !l.value.has(e))), ue = L(() => [...l.value].filter((e) => !c.value.has(e))), j = L(() => A.value.length > 0 || ue.value.length > 0), de = {
|
|
1842
1986
|
rowKey: "id",
|
|
1843
1987
|
columns: [
|
|
1844
1988
|
{
|
|
@@ -1872,143 +2016,143 @@ var on = {
|
|
|
1872
2016
|
width: 90
|
|
1873
2017
|
}
|
|
1874
2018
|
]
|
|
1875
|
-
},
|
|
2019
|
+
}, M = L(() => ({
|
|
1876
2020
|
selectedRowKeys: [...c.value],
|
|
1877
2021
|
preserveSelectedRowKeys: !0,
|
|
1878
|
-
disabledOf: () =>
|
|
2022
|
+
disabledOf: () => y.value,
|
|
1879
2023
|
onChange: (e) => {
|
|
1880
2024
|
c.value = new Set(e.map((e) => String(e)));
|
|
1881
2025
|
}
|
|
1882
|
-
})),
|
|
2026
|
+
})), P = L(() => ({
|
|
1883
2027
|
current: p.value,
|
|
1884
|
-
total:
|
|
1885
|
-
pageSize:
|
|
2028
|
+
total: h.value,
|
|
2029
|
+
pageSize: En,
|
|
1886
2030
|
showSizeChanger: !1,
|
|
1887
2031
|
showQuickJumper: !1,
|
|
1888
|
-
onChange: (e) => void
|
|
2032
|
+
onChange: (e) => void _e(e)
|
|
1889
2033
|
}));
|
|
1890
|
-
|
|
1891
|
-
e ?
|
|
1892
|
-
}, { immediate: !0 }),
|
|
2034
|
+
X(() => [r.open, r.role?.id], ([e]) => {
|
|
2035
|
+
e ? ge() : Se();
|
|
2036
|
+
}, { immediate: !0 }), X([
|
|
1893
2037
|
() => r.embedded,
|
|
1894
2038
|
() => r.drawerContext,
|
|
1895
2039
|
c,
|
|
1896
|
-
|
|
2040
|
+
j,
|
|
1897
2041
|
k,
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
],
|
|
1903
|
-
function
|
|
2042
|
+
A,
|
|
2043
|
+
ue,
|
|
2044
|
+
y,
|
|
2045
|
+
g
|
|
2046
|
+
], F, { immediate: !0 }), Ne(() => r.drawerContext?.setOperation(void 0));
|
|
2047
|
+
function F() {
|
|
1904
2048
|
let e = r.drawerContext;
|
|
1905
2049
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
1906
|
-
value1:
|
|
2050
|
+
value1: Ae(r.role ?? {}),
|
|
1907
2051
|
value2: Me(r.role)
|
|
1908
2052
|
})), e.setOperation({
|
|
1909
2053
|
summary: pe(),
|
|
1910
2054
|
actions: [{
|
|
1911
2055
|
key: "cancel-account-role-grants",
|
|
1912
2056
|
label: n.t("platform.action.cancel", "取消"),
|
|
1913
|
-
disabled:
|
|
1914
|
-
run:
|
|
2057
|
+
disabled: y.value || g.value,
|
|
2058
|
+
run: xe
|
|
1915
2059
|
}, {
|
|
1916
2060
|
key: "save-account-role-grants",
|
|
1917
2061
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
1918
2062
|
emphasis: "primary",
|
|
1919
|
-
disabled:
|
|
1920
|
-
loading:
|
|
1921
|
-
run: () => void
|
|
2063
|
+
disabled: g.value || !k.value || !j.value,
|
|
2064
|
+
loading: y.value,
|
|
2065
|
+
run: () => void be()
|
|
1922
2066
|
}]
|
|
1923
2067
|
}));
|
|
1924
2068
|
}
|
|
1925
2069
|
function pe() {
|
|
1926
|
-
return k.value ?
|
|
2070
|
+
return k.value ? j.value ? n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected-value-added-value-removed", "已选 {value1} 个用户 · 新增 {value2} · 移除 {value3}", {
|
|
1927
2071
|
value1: c.value.size,
|
|
1928
|
-
value2:
|
|
1929
|
-
value3:
|
|
2072
|
+
value2: A.value.length,
|
|
2073
|
+
value3: ue.value.length
|
|
1930
2074
|
}) : n.t("platform.screen.RoleAccountGrantDrawer.value-users-selected", "已选 {value1} 个用户", { value1: c.value.size }) : n.t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant", "请选择目标租户");
|
|
1931
2075
|
}
|
|
1932
|
-
async function
|
|
1933
|
-
let e =
|
|
2076
|
+
async function ge() {
|
|
2077
|
+
let e = E.value;
|
|
1934
2078
|
if (!e) {
|
|
1935
|
-
|
|
2079
|
+
Se();
|
|
1936
2080
|
return;
|
|
1937
2081
|
}
|
|
1938
2082
|
if (!k.value) {
|
|
1939
|
-
|
|
2083
|
+
Ce();
|
|
1940
2084
|
return;
|
|
1941
2085
|
}
|
|
1942
|
-
|
|
2086
|
+
g.value = !0, x.value = !1;
|
|
1943
2087
|
try {
|
|
1944
|
-
let t = await
|
|
2088
|
+
let t = await w.value.accountRoleGrants(e, ie.value);
|
|
1945
2089
|
a.value = t;
|
|
1946
2090
|
let n = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
1947
|
-
l.value = n, c.value = new Set(n), o.value =
|
|
2091
|
+
l.value = n, c.value = new Set(n), o.value = Ee([...t.map((e) => W(e.userId)).filter((e) => !!e)]), await _e(1);
|
|
1948
2092
|
} catch (e) {
|
|
1949
|
-
|
|
2093
|
+
x.value = !0, N(e, {
|
|
1950
2094
|
language: n,
|
|
1951
2095
|
source: "role-account-grants",
|
|
1952
2096
|
phase: "load"
|
|
1953
2097
|
});
|
|
1954
2098
|
} finally {
|
|
1955
|
-
|
|
2099
|
+
g.value = !1;
|
|
1956
2100
|
}
|
|
1957
2101
|
}
|
|
1958
|
-
async function
|
|
1959
|
-
let t =
|
|
2102
|
+
async function _e(e) {
|
|
2103
|
+
let t = E.value;
|
|
1960
2104
|
if (t && k.value) {
|
|
1961
|
-
|
|
2105
|
+
_.value = !0;
|
|
1962
2106
|
try {
|
|
1963
|
-
let n = await
|
|
1964
|
-
targetTenantId:
|
|
1965
|
-
keyword:
|
|
2107
|
+
let n = await w.value.accountRoleCandidates(t, {
|
|
2108
|
+
targetTenantId: ie.value,
|
|
2109
|
+
keyword: d.value,
|
|
1966
2110
|
enabledOnly: !0,
|
|
1967
2111
|
page: {
|
|
1968
2112
|
pageNum: Math.max(0, e),
|
|
1969
|
-
pageSize:
|
|
2113
|
+
pageSize: En
|
|
1970
2114
|
}
|
|
1971
2115
|
});
|
|
1972
2116
|
s.value = n.records, o.value = {
|
|
1973
2117
|
...o.value,
|
|
1974
|
-
...
|
|
1975
|
-
}, p.value = n.pageNum,
|
|
2118
|
+
...Ee(n.records)
|
|
2119
|
+
}, p.value = n.pageNum, h.value = n.total;
|
|
1976
2120
|
} catch (e) {
|
|
1977
|
-
|
|
2121
|
+
N(e, {
|
|
1978
2122
|
language: n,
|
|
1979
2123
|
source: "role-account-grants",
|
|
1980
2124
|
phase: "load"
|
|
1981
2125
|
});
|
|
1982
2126
|
} finally {
|
|
1983
|
-
|
|
2127
|
+
_.value = !1;
|
|
1984
2128
|
}
|
|
1985
2129
|
}
|
|
1986
2130
|
}
|
|
1987
|
-
function
|
|
1988
|
-
|
|
2131
|
+
function ve() {
|
|
2132
|
+
d.value = u.value.trim(), _e(0);
|
|
1989
2133
|
}
|
|
1990
|
-
function
|
|
2134
|
+
function ye(e, t) {
|
|
1991
2135
|
let n = new Set(c.value);
|
|
1992
2136
|
t ? n.add(e) : n.delete(e), c.value = n;
|
|
1993
2137
|
}
|
|
1994
|
-
async function
|
|
1995
|
-
let e =
|
|
2138
|
+
async function be() {
|
|
2139
|
+
let e = E.value;
|
|
1996
2140
|
if (e && k.value) {
|
|
1997
|
-
if (!
|
|
2141
|
+
if (!j.value) {
|
|
1998
2142
|
i("close");
|
|
1999
2143
|
return;
|
|
2000
2144
|
}
|
|
2001
|
-
|
|
2145
|
+
y.value = !0;
|
|
2002
2146
|
try {
|
|
2003
|
-
for (let t of
|
|
2147
|
+
for (let t of A.value) await w.value.grantAccountRole(e, {
|
|
2004
2148
|
userId: t,
|
|
2005
|
-
targetTenantId:
|
|
2149
|
+
targetTenantId: ie.value
|
|
2006
2150
|
});
|
|
2007
|
-
for (let t of
|
|
2008
|
-
let n =
|
|
2009
|
-
n && await
|
|
2151
|
+
for (let t of ue.value) {
|
|
2152
|
+
let n = oe.value.get(t)?.id;
|
|
2153
|
+
n && await w.value.deleteAccountRoleGrant(e, n, ie.value);
|
|
2010
2154
|
}
|
|
2011
|
-
await
|
|
2155
|
+
await fe({
|
|
2012
2156
|
success: !0,
|
|
2013
2157
|
message: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2014
2158
|
}, {
|
|
@@ -2018,120 +2162,120 @@ var on = {
|
|
|
2018
2162
|
fallbackMessage: n.t("platform.screen.RoleAccountGrantDrawer.user-assignments-saved", "用户绑定已保存")
|
|
2019
2163
|
}), i("saved"), i("close");
|
|
2020
2164
|
} catch (e) {
|
|
2021
|
-
|
|
2165
|
+
N(e, {
|
|
2022
2166
|
language: n,
|
|
2023
2167
|
source: "role-account-grants",
|
|
2024
2168
|
phase: "action"
|
|
2025
2169
|
});
|
|
2026
2170
|
} finally {
|
|
2027
|
-
|
|
2171
|
+
y.value = !1;
|
|
2028
2172
|
}
|
|
2029
2173
|
}
|
|
2030
2174
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2175
|
+
function xe() {
|
|
2176
|
+
y.value || i("close");
|
|
2033
2177
|
}
|
|
2034
|
-
function
|
|
2035
|
-
|
|
2178
|
+
function Se() {
|
|
2179
|
+
C.value = void 0, Ce();
|
|
2036
2180
|
}
|
|
2037
|
-
function
|
|
2038
|
-
a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(),
|
|
2181
|
+
function Ce() {
|
|
2182
|
+
a.value = [], o.value = {}, s.value = [], c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = "", d.value = "", p.value = 1, h.value = 0, g.value = !1, _.value = !1, y.value = !1, x.value = !1;
|
|
2039
2183
|
}
|
|
2040
|
-
async function
|
|
2184
|
+
async function we(e) {
|
|
2041
2185
|
if (!e) {
|
|
2042
|
-
|
|
2186
|
+
C.value = void 0, Ce();
|
|
2043
2187
|
return;
|
|
2044
2188
|
}
|
|
2045
|
-
let t = await
|
|
2046
|
-
|
|
2189
|
+
let t = await T.crud.view(e);
|
|
2190
|
+
C.value = t ?? {
|
|
2047
2191
|
id: e,
|
|
2048
2192
|
title: e
|
|
2049
|
-
}, await
|
|
2193
|
+
}, await ge();
|
|
2050
2194
|
}
|
|
2051
|
-
function
|
|
2052
|
-
|
|
2195
|
+
function Te(e) {
|
|
2196
|
+
ye(e, !1);
|
|
2053
2197
|
}
|
|
2054
|
-
function
|
|
2198
|
+
function Ee(e) {
|
|
2055
2199
|
let t = {};
|
|
2056
2200
|
for (let n of e) n.id && (t[n.id] = n);
|
|
2057
2201
|
return t;
|
|
2058
2202
|
}
|
|
2059
|
-
function
|
|
2203
|
+
function W(e) {
|
|
2060
2204
|
return e ? {
|
|
2061
2205
|
id: e,
|
|
2062
2206
|
username: e
|
|
2063
2207
|
} : void 0;
|
|
2064
2208
|
}
|
|
2065
|
-
function
|
|
2209
|
+
function G(e) {
|
|
2066
2210
|
return String(e?.username ?? e?.id ?? n.t("platform.screen.RoleAccountGrantDrawer.unknown-user", "未知用户"));
|
|
2067
2211
|
}
|
|
2068
|
-
function
|
|
2212
|
+
function Oe(e) {
|
|
2069
2213
|
return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
|
|
2070
2214
|
}
|
|
2071
|
-
function
|
|
2072
|
-
return String(
|
|
2215
|
+
function Ae(e) {
|
|
2216
|
+
return String(me(e, "title", n) ?? e.id ?? n.t("platform.screen.RoleManagementView.role", "角色"));
|
|
2073
2217
|
}
|
|
2074
2218
|
function Me(e) {
|
|
2075
2219
|
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", "租户范围");
|
|
2076
2220
|
}
|
|
2077
|
-
return (t, r) => (
|
|
2078
|
-
default:
|
|
2221
|
+
return (t, r) => (K(), R(ze(ee.value), ke(te.value, { class: { "role-account-grant-drawer-surface": e.embedded } }), De({
|
|
2222
|
+
default: Z(() => [g.value ? (K(), R(Y(m), {
|
|
2079
2223
|
key: 0,
|
|
2080
2224
|
class: "role-account-grant-drawer-state",
|
|
2081
|
-
tip:
|
|
2082
|
-
}, null, 8, ["tip"])) :
|
|
2083
|
-
title:
|
|
2084
|
-
message:
|
|
2085
|
-
}, null, 8, ["title", "message"]),
|
|
2225
|
+
tip: Y(n).t("platform.screen.RoleAccountGrantDrawer.loading-users", "加载用户")
|
|
2226
|
+
}, null, 8, ["tip"])) : x.value ? (K(), B("div", vn, [U(Y(ne), {
|
|
2227
|
+
title: Y(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-users", "用户加载失败"),
|
|
2228
|
+
message: Y(n).t("platform.screen.RoleAccountGrantDrawer.failed-to-load-user-assignments-for-this-role", "无法加载当前角色的用户绑定")
|
|
2229
|
+
}, null, 8, ["title", "message"]), U(Y(f), {
|
|
2086
2230
|
type: "primary",
|
|
2087
2231
|
"icon-name": "reload",
|
|
2088
|
-
onClick:
|
|
2232
|
+
onClick: ge
|
|
2089
2233
|
}, {
|
|
2090
|
-
default:
|
|
2234
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
2091
2235
|
_: 1
|
|
2092
|
-
})])) : (
|
|
2236
|
+
})])) : (K(), B("section", {
|
|
2093
2237
|
key: 2,
|
|
2094
|
-
class:
|
|
2095
|
-
}, [
|
|
2096
|
-
context:
|
|
2097
|
-
value:
|
|
2238
|
+
class: je(["role-account-grant-drawer-body", { "role-account-grant-drawer-body--target-tenant": re.value }])
|
|
2239
|
+
}, [re.value ? (K(), B("label", yn, [V("span", null, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.target-tenant", "目标租户")), 1), U(Y(le), {
|
|
2240
|
+
context: ae.value,
|
|
2241
|
+
value: ie.value,
|
|
2098
2242
|
mode: "list",
|
|
2099
|
-
placeholder:
|
|
2100
|
-
disabled:
|
|
2101
|
-
"onUpdate:value":
|
|
2243
|
+
placeholder: Y(n).t("platform.screen.RoleAccountGrantDrawer.select-the-target-tenant-for-this-role-assignment", "请选择角色下发的目标租户"),
|
|
2244
|
+
disabled: y.value || g.value,
|
|
2245
|
+
"onUpdate:value": we
|
|
2102
2246
|
}, null, 8, [
|
|
2103
2247
|
"context",
|
|
2104
2248
|
"value",
|
|
2105
2249
|
"placeholder",
|
|
2106
2250
|
"disabled"
|
|
2107
|
-
])])) :
|
|
2108
|
-
|
|
2109
|
-
value:
|
|
2251
|
+
])])) : z("v-if", !0), k.value ? (K(), B(I, { key: 2 }, [
|
|
2252
|
+
V("div", xn, [U(Y(S), {
|
|
2253
|
+
value: u.value,
|
|
2110
2254
|
"allow-clear": "",
|
|
2111
|
-
disabled:
|
|
2112
|
-
placeholder:
|
|
2113
|
-
"onUpdate:value": r[0] ||= (e) =>
|
|
2114
|
-
onKeydown:
|
|
2255
|
+
disabled: y.value,
|
|
2256
|
+
placeholder: Y(n).t("platform.screen.RoleAccountGrantDrawer.search-user-accounts", "搜索用户账号"),
|
|
2257
|
+
"onUpdate:value": r[0] ||= (e) => u.value = e,
|
|
2258
|
+
onKeydown: Ue(ve, ["enter"])
|
|
2115
2259
|
}, null, 8, [
|
|
2116
2260
|
"value",
|
|
2117
2261
|
"disabled",
|
|
2118
2262
|
"placeholder"
|
|
2119
|
-
]),
|
|
2263
|
+
]), U(Y(f), {
|
|
2120
2264
|
"icon-name": "search",
|
|
2121
|
-
disabled:
|
|
2122
|
-
onClick:
|
|
2265
|
+
disabled: y.value,
|
|
2266
|
+
onClick: ve
|
|
2123
2267
|
}, {
|
|
2124
|
-
default:
|
|
2268
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
|
|
2125
2269
|
_: 1
|
|
2126
2270
|
}, 8, ["disabled"])]),
|
|
2127
|
-
|
|
2271
|
+
U(Y(he), {
|
|
2128
2272
|
class: "role-account-grant-table",
|
|
2129
2273
|
size: "middle",
|
|
2130
|
-
contract:
|
|
2131
|
-
rows:
|
|
2132
|
-
loading:
|
|
2133
|
-
pagination:
|
|
2134
|
-
selection:
|
|
2274
|
+
contract: de,
|
|
2275
|
+
rows: se.value,
|
|
2276
|
+
loading: _.value,
|
|
2277
|
+
pagination: P.value,
|
|
2278
|
+
selection: M.value,
|
|
2135
2279
|
"fill-height": ""
|
|
2136
2280
|
}, null, 8, [
|
|
2137
2281
|
"rows",
|
|
@@ -2139,41 +2283,41 @@ var on = {
|
|
|
2139
2283
|
"pagination",
|
|
2140
2284
|
"selection"
|
|
2141
2285
|
]),
|
|
2142
|
-
|
|
2286
|
+
ce.value.length > 0 ? (K(), B("section", Sn, [V("div", Cn, [V("strong", null, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.selected-users", "已选用户")), 1), V("span", null, J(ce.value.length), 1)]), V("div", wn, [(K(!0), B(I, null, Le(ce.value, (e) => (K(), B("button", {
|
|
2143
2287
|
key: e.id,
|
|
2144
2288
|
type: "button",
|
|
2145
|
-
disabled:
|
|
2146
|
-
onClick: (t) =>
|
|
2147
|
-
}, [
|
|
2148
|
-
], 64)) : (
|
|
2289
|
+
disabled: y.value,
|
|
2290
|
+
onClick: (t) => Te(e.id)
|
|
2291
|
+
}, [V("span", null, J(G(e)), 1), V("small", null, J(Oe(e)), 1)], 8, Tn))), 128))])])) : z("v-if", !0)
|
|
2292
|
+
], 64)) : (K(), B("div", bn, J(Y(n).t("platform.screen.RoleAccountGrantDrawer.select-a-target-tenant-for-a-platform-shared-role-before", "平台共享角色需要先选择目标租户,再加载可绑定账号。")), 1))], 2))]),
|
|
2149
2293
|
_: 2
|
|
2150
2294
|
}, [e.embedded ? void 0 : {
|
|
2151
2295
|
name: "operation",
|
|
2152
|
-
fn:
|
|
2153
|
-
disabled:
|
|
2154
|
-
onClick:
|
|
2296
|
+
fn: Z(() => [U(Y(f), {
|
|
2297
|
+
disabled: y.value || g.value,
|
|
2298
|
+
onClick: xe
|
|
2155
2299
|
}, {
|
|
2156
|
-
default:
|
|
2300
|
+
default: Z(() => [H(J(Y(n).t("platform.action.cancel", "取消")), 1)]),
|
|
2157
2301
|
_: 1
|
|
2158
|
-
}, 8, ["disabled"]),
|
|
2302
|
+
}, 8, ["disabled"]), U(Y(f), {
|
|
2159
2303
|
type: "primary",
|
|
2160
|
-
loading:
|
|
2161
|
-
disabled:
|
|
2162
|
-
onClick:
|
|
2304
|
+
loading: y.value,
|
|
2305
|
+
disabled: g.value || !j.value,
|
|
2306
|
+
onClick: be
|
|
2163
2307
|
}, {
|
|
2164
|
-
default:
|
|
2308
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
2165
2309
|
_: 1
|
|
2166
2310
|
}, 8, ["loading", "disabled"])]),
|
|
2167
2311
|
key: "0"
|
|
2168
2312
|
}]), 1040, ["class"]));
|
|
2169
2313
|
}
|
|
2170
|
-
}), [["__scopeId", "data-v-e7dae9bb"]]),
|
|
2314
|
+
}), [["__scopeId", "data-v-e7dae9bb"]]), On = /* @__PURE__ */ G({
|
|
2171
2315
|
name: "RoleAccountGrantDrawerSurface",
|
|
2172
2316
|
__name: "RoleAccountGrantDrawerSurface",
|
|
2173
2317
|
props: { context: {} },
|
|
2174
2318
|
setup(e) {
|
|
2175
|
-
let t = e, n =
|
|
2176
|
-
return (e, i) => (
|
|
2319
|
+
let t = e, n = L(() => t.context.module), r = L(() => t.context.record);
|
|
2320
|
+
return (e, i) => (K(), R(Dn, {
|
|
2177
2321
|
open: "",
|
|
2178
2322
|
embedded: "",
|
|
2179
2323
|
"drawer-context": t.context,
|
|
@@ -2189,7 +2333,7 @@ var on = {
|
|
|
2189
2333
|
"onSaved"
|
|
2190
2334
|
]));
|
|
2191
2335
|
}
|
|
2192
|
-
}),
|
|
2336
|
+
}), kn = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
2193
2337
|
name: "EmployeeEmploymentTable",
|
|
2194
2338
|
__name: "EmployeeEmploymentTable",
|
|
2195
2339
|
props: {
|
|
@@ -2214,7 +2358,7 @@ var on = {
|
|
|
2214
2358
|
},
|
|
2215
2359
|
emits: ["update:selectedIds"],
|
|
2216
2360
|
setup(e, { emit: t }) {
|
|
2217
|
-
let n =
|
|
2361
|
+
let n = b(), r = e, i = t, a = q([]), o = L(() => [
|
|
2218
2362
|
{
|
|
2219
2363
|
key: "title",
|
|
2220
2364
|
title: n.t("platform.screen.EmployeePicker.employee", "职员"),
|
|
@@ -2242,7 +2386,7 @@ var on = {
|
|
|
2242
2386
|
width: 88,
|
|
2243
2387
|
align: "right"
|
|
2244
2388
|
}
|
|
2245
|
-
]), s =
|
|
2389
|
+
]), s = L(() => [
|
|
2246
2390
|
{
|
|
2247
2391
|
key: "position",
|
|
2248
2392
|
title: n.t("platform.screen.CurrentUserProfileDialog.position", "岗位"),
|
|
@@ -2263,7 +2407,7 @@ var on = {
|
|
|
2263
2407
|
title: n.t("platform.screen.EmployeeEmploymentTable.primary-position", "主岗位"),
|
|
2264
2408
|
width: 88
|
|
2265
2409
|
}
|
|
2266
|
-
]), c =
|
|
2410
|
+
]), c = L(() => {
|
|
2267
2411
|
let e = /* @__PURE__ */ new Map();
|
|
2268
2412
|
for (let t of r.rows) {
|
|
2269
2413
|
let n = t.employeeId ?? t.id, r = e.get(n) ?? {
|
|
@@ -2276,7 +2420,7 @@ var on = {
|
|
|
2276
2420
|
r.positions.push(t), e.set(n, r);
|
|
2277
2421
|
}
|
|
2278
2422
|
return [...e.values()];
|
|
2279
|
-
}), l =
|
|
2423
|
+
}), l = L(() => c.value);
|
|
2280
2424
|
function u(e, t) {
|
|
2281
2425
|
let r = t;
|
|
2282
2426
|
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) }) : "";
|
|
@@ -2306,11 +2450,11 @@ var on = {
|
|
|
2306
2450
|
let n = e.employeeId;
|
|
2307
2451
|
a.value = t ? Array.from(/* @__PURE__ */ new Set([...a.value, n])) : a.value.filter((e) => e !== n);
|
|
2308
2452
|
}
|
|
2309
|
-
function
|
|
2453
|
+
function _(e) {
|
|
2310
2454
|
let t = e.employeeId;
|
|
2311
2455
|
h(e, !a.value.includes(t));
|
|
2312
2456
|
}
|
|
2313
|
-
return (t, r) => (
|
|
2457
|
+
return (t, r) => (K(), R(Y(g), {
|
|
2314
2458
|
class: "employee-employment-table",
|
|
2315
2459
|
columns: o.value,
|
|
2316
2460
|
rows: l.value,
|
|
@@ -2321,11 +2465,11 @@ var on = {
|
|
|
2321
2465
|
"horizontal-scroll": "",
|
|
2322
2466
|
"fill-height": e.fillHeight,
|
|
2323
2467
|
onRowExpand: h,
|
|
2324
|
-
onRowDblclick:
|
|
2468
|
+
onRowDblclick: _
|
|
2325
2469
|
}, {
|
|
2326
|
-
cell:
|
|
2327
|
-
expandedRow:
|
|
2328
|
-
default:
|
|
2470
|
+
cell: Z(({ column: e, record: t }) => [H(J(u(e, t)), 1)]),
|
|
2471
|
+
expandedRow: Z(({ record: e }) => [U(Y(_e), { title: Y(n).t("platform.screen.CurrentUserProfileDialog.employment-details", "任职信息") }, {
|
|
2472
|
+
default: Z(() => [U(Y(g), {
|
|
2329
2473
|
columns: s.value,
|
|
2330
2474
|
rows: e.positions,
|
|
2331
2475
|
"row-key": "id",
|
|
@@ -2334,7 +2478,7 @@ var on = {
|
|
|
2334
2478
|
"horizontal-scroll": "",
|
|
2335
2479
|
"row-muted": (e) => e.enabled === !1
|
|
2336
2480
|
}, {
|
|
2337
|
-
cell:
|
|
2481
|
+
cell: Z(({ column: e, record: t }) => [H(J(d(e, t)), 1)]),
|
|
2338
2482
|
_: 1
|
|
2339
2483
|
}, 8, [
|
|
2340
2484
|
"columns",
|
|
@@ -2353,13 +2497,13 @@ var on = {
|
|
|
2353
2497
|
"fill-height"
|
|
2354
2498
|
]));
|
|
2355
2499
|
}
|
|
2356
|
-
}), [["__scopeId", "data-v-7020a020"]]),
|
|
2500
|
+
}), [["__scopeId", "data-v-7020a020"]]), An = { key: 1 }, jn = {
|
|
2357
2501
|
key: 2,
|
|
2358
2502
|
class: "role-employment-grant-body"
|
|
2359
|
-
},
|
|
2503
|
+
}, Mn = {
|
|
2360
2504
|
key: 0,
|
|
2361
2505
|
class: "role-employment-grant-selected"
|
|
2362
|
-
},
|
|
2506
|
+
}, Nn = { class: "role-employment-grant-selected-title" }, Pn = { class: "role-employment-grant-selected-list" }, Fn = ["disabled", "onClick"], In = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
2363
2507
|
name: "RoleEmploymentGrantDrawer",
|
|
2364
2508
|
__name: "RoleEmploymentGrantDrawer",
|
|
2365
2509
|
props: {
|
|
@@ -2372,65 +2516,65 @@ var on = {
|
|
|
2372
2516
|
},
|
|
2373
2517
|
emits: ["close", "saved"],
|
|
2374
2518
|
setup(e, { emit: t }) {
|
|
2375
|
-
let n =
|
|
2519
|
+
let n = b(), r = e, i = t, a = q([]), o = q([]), s = q({}), c = q(/* @__PURE__ */ new Set()), l = q(/* @__PURE__ */ new Set()), u = q(!1), d = q(!1), p = q(!1), h = q(!1), g = q(1), _ = q(0), v = q(""), y = L(() => r.role?.id), x = L(() => _n(r.context.http)), C = L(() => n.t("platform.screen.RoleEmploymentGrantDrawer.assign-positions-value", "绑定任职 - {value1}", { value1: r.role?.title ?? r.role?.id ?? "" })), w = L(() => r.embedded ? "section" : D), T = L(() => r.embedded ? {} : {
|
|
2376
2520
|
open: r.open,
|
|
2377
|
-
title:
|
|
2521
|
+
title: C.value,
|
|
2378
2522
|
renderMode: r.container ? "inline" : "portal",
|
|
2379
2523
|
closeTitle: n.t("platform.screen.workspaceViewDiscardGuard.close", "关闭"),
|
|
2380
|
-
onClose: () => !
|
|
2381
|
-
}),
|
|
2382
|
-
current:
|
|
2383
|
-
total:
|
|
2524
|
+
onClose: () => !p.value && i("close")
|
|
2525
|
+
}), E = L(() => [...c.value].filter((e) => !l.value.has(e))), O = L(() => [...l.value].filter((e) => !c.value.has(e))), ee = L(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), te = L(() => o.value.filter((e) => !v.value.trim() || ce(e).includes(v.value.trim()))), re = L(() => [...c.value].map((e) => s.value[e] ?? ue(e))), ie = L(() => ({
|
|
2526
|
+
current: g.value,
|
|
2527
|
+
total: _.value,
|
|
2384
2528
|
pageSize: 50,
|
|
2385
2529
|
showSizeChanger: !1,
|
|
2386
2530
|
showQuickJumper: !1,
|
|
2387
|
-
onChange: (e) => void
|
|
2531
|
+
onChange: (e) => void ae(e)
|
|
2388
2532
|
}));
|
|
2389
|
-
|
|
2390
|
-
e ?
|
|
2391
|
-
}, { immediate: !0 }),
|
|
2533
|
+
X(() => [r.open, r.role?.id], ([e]) => {
|
|
2534
|
+
e ? ae() : se();
|
|
2535
|
+
}, { immediate: !0 }), X([
|
|
2392
2536
|
() => r.embedded,
|
|
2393
2537
|
() => r.drawerContext,
|
|
2394
2538
|
c,
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2539
|
+
E,
|
|
2540
|
+
O,
|
|
2541
|
+
p,
|
|
2398
2542
|
d
|
|
2399
|
-
],
|
|
2400
|
-
function
|
|
2543
|
+
], k, { immediate: !0 }), Ne(() => r.drawerContext?.setOperation(void 0));
|
|
2544
|
+
function k() {
|
|
2401
2545
|
let e = r.drawerContext;
|
|
2402
2546
|
r.embedded && e && (e.setSubtitle(n.t("platform.screen.RoleAccountGrantDrawer.role-value-value", "角色:{value1} · {value2}", {
|
|
2403
2547
|
value1: r.role?.title ?? r.role?.id ?? n.t("platform.screen.RoleManagementView.role", "角色"),
|
|
2404
|
-
value2:
|
|
2548
|
+
value2: M(r.role)
|
|
2405
2549
|
})), e.setOperation({
|
|
2406
2550
|
summary: n.t("platform.screen.RoleEmploymentGrantDrawer.value-positions-selectedvalue", "已选 {value1} 个任职{value2}", {
|
|
2407
2551
|
value1: c.value.size,
|
|
2408
|
-
value2:
|
|
2409
|
-
value1:
|
|
2410
|
-
value2:
|
|
2552
|
+
value2: E.value.length || O.value.length ? n.t("platform.screen.RoleEmploymentGrantDrawer.value-added-value-removed", " · 新增 {value1} · 移除 {value2}", {
|
|
2553
|
+
value1: E.value.length,
|
|
2554
|
+
value2: O.value.length
|
|
2411
2555
|
}) : ""
|
|
2412
2556
|
}),
|
|
2413
2557
|
actions: [{
|
|
2414
2558
|
key: "cancel-employment-role-grants",
|
|
2415
2559
|
label: n.t("platform.action.cancel", "取消"),
|
|
2416
|
-
disabled:
|
|
2560
|
+
disabled: p.value,
|
|
2417
2561
|
run: () => i("close")
|
|
2418
2562
|
}, {
|
|
2419
2563
|
key: "save-employment-role-grants",
|
|
2420
2564
|
label: n.t("platform.screen.RoleAccountGrantDrawer.confirm", "确定"),
|
|
2421
2565
|
emphasis: "primary",
|
|
2422
|
-
disabled: d.value ||
|
|
2423
|
-
loading:
|
|
2424
|
-
run: () => void
|
|
2566
|
+
disabled: d.value || E.value.length === 0 && O.value.length === 0,
|
|
2567
|
+
loading: p.value,
|
|
2568
|
+
run: () => void oe()
|
|
2425
2569
|
}]
|
|
2426
2570
|
}));
|
|
2427
2571
|
}
|
|
2428
|
-
async function
|
|
2429
|
-
let t =
|
|
2572
|
+
async function ae(e = 1) {
|
|
2573
|
+
let t = y.value;
|
|
2430
2574
|
if (t) {
|
|
2431
|
-
d.value = !0,
|
|
2575
|
+
d.value = !0, h.value = !1;
|
|
2432
2576
|
try {
|
|
2433
|
-
let [n, r] = await Promise.all([
|
|
2577
|
+
let [n, r] = await Promise.all([x.value.employmentRoleGrants(t), x.value.employmentSelector(t, {
|
|
2434
2578
|
enabledOnly: !0,
|
|
2435
2579
|
page: {
|
|
2436
2580
|
pageNum: e,
|
|
@@ -2439,10 +2583,10 @@ var on = {
|
|
|
2439
2583
|
})]);
|
|
2440
2584
|
a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
|
|
2441
2585
|
...s.value,
|
|
2442
|
-
...
|
|
2443
|
-
}, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records,
|
|
2586
|
+
...le(r.records)
|
|
2587
|
+
}, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, g.value = r.pageNum, _.value = r.total;
|
|
2444
2588
|
} catch (e) {
|
|
2445
|
-
|
|
2589
|
+
h.value = !0, N(e, {
|
|
2446
2590
|
language: n,
|
|
2447
2591
|
source: "role-employment-grants",
|
|
2448
2592
|
phase: "load"
|
|
@@ -2452,17 +2596,17 @@ var on = {
|
|
|
2452
2596
|
}
|
|
2453
2597
|
}
|
|
2454
2598
|
}
|
|
2455
|
-
async function
|
|
2456
|
-
let e =
|
|
2599
|
+
async function oe() {
|
|
2600
|
+
let e = y.value;
|
|
2457
2601
|
if (e) {
|
|
2458
|
-
|
|
2602
|
+
p.value = !0;
|
|
2459
2603
|
try {
|
|
2460
|
-
for (let t of
|
|
2461
|
-
for (let t of
|
|
2462
|
-
let n =
|
|
2463
|
-
n && await
|
|
2604
|
+
for (let t of E.value) await x.value.grantEmploymentRole(e, t);
|
|
2605
|
+
for (let t of O.value) {
|
|
2606
|
+
let n = ee.value.get(t)?.id;
|
|
2607
|
+
n && await x.value.deleteEmploymentRoleGrant(e, n);
|
|
2464
2608
|
}
|
|
2465
|
-
await
|
|
2609
|
+
await fe({
|
|
2466
2610
|
success: !0,
|
|
2467
2611
|
message: n.t("platform.screen.RoleEmploymentGrantDrawer.position-role-assignments-saved", "任职角色授权已保存")
|
|
2468
2612
|
}, {
|
|
@@ -2471,20 +2615,20 @@ var on = {
|
|
|
2471
2615
|
phase: "action"
|
|
2472
2616
|
}), i("saved"), i("close");
|
|
2473
2617
|
} catch (e) {
|
|
2474
|
-
|
|
2618
|
+
N(e, {
|
|
2475
2619
|
language: n,
|
|
2476
2620
|
source: "role-employment-grants",
|
|
2477
2621
|
phase: "action"
|
|
2478
2622
|
});
|
|
2479
2623
|
} finally {
|
|
2480
|
-
|
|
2624
|
+
p.value = !1;
|
|
2481
2625
|
}
|
|
2482
2626
|
}
|
|
2483
2627
|
}
|
|
2484
|
-
function
|
|
2485
|
-
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1,
|
|
2628
|
+
function se() {
|
|
2629
|
+
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, v.value = "", g.value = 1, _.value = 0, h.value = !1;
|
|
2486
2630
|
}
|
|
2487
|
-
function
|
|
2631
|
+
function ce(e) {
|
|
2488
2632
|
return [
|
|
2489
2633
|
e.employeeTitle,
|
|
2490
2634
|
e.employeeNo,
|
|
@@ -2493,59 +2637,59 @@ var on = {
|
|
|
2493
2637
|
e.positionTitle
|
|
2494
2638
|
].filter(Boolean).join(" ");
|
|
2495
2639
|
}
|
|
2496
|
-
function
|
|
2640
|
+
function A(e) {
|
|
2497
2641
|
let t = new Set(c.value);
|
|
2498
2642
|
t.delete(e), c.value = t;
|
|
2499
2643
|
}
|
|
2500
|
-
function
|
|
2644
|
+
function le(e) {
|
|
2501
2645
|
let t = {};
|
|
2502
2646
|
for (let n of e) n.id && (t[n.id] = n);
|
|
2503
2647
|
return t;
|
|
2504
2648
|
}
|
|
2505
|
-
function
|
|
2649
|
+
function ue(e) {
|
|
2506
2650
|
return {
|
|
2507
2651
|
id: e,
|
|
2508
2652
|
positionId: e
|
|
2509
2653
|
};
|
|
2510
2654
|
}
|
|
2511
|
-
function
|
|
2655
|
+
function j(e) {
|
|
2512
2656
|
let t = e.positionTitle ?? e.positionId ?? e.id;
|
|
2513
2657
|
return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
|
|
2514
2658
|
}
|
|
2515
|
-
function
|
|
2659
|
+
function de(e) {
|
|
2516
2660
|
return [
|
|
2517
2661
|
e.employeeNo,
|
|
2518
2662
|
e.organizationTitle ?? e.organizationId,
|
|
2519
2663
|
e.departmentTitle ?? e.departmentId
|
|
2520
2664
|
].filter(Boolean).join(" / ") || e.id;
|
|
2521
2665
|
}
|
|
2522
|
-
function
|
|
2666
|
+
function M(e) {
|
|
2523
2667
|
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", "租户范围");
|
|
2524
2668
|
}
|
|
2525
|
-
return (t, r) => (
|
|
2526
|
-
default:
|
|
2669
|
+
return (t, r) => (K(), R(ze(w.value), ke(T.value, { class: { "role-employment-grant-drawer-surface": e.embedded } }), De({
|
|
2670
|
+
default: Z(() => [d.value ? (K(), R(Y(m), {
|
|
2527
2671
|
key: 0,
|
|
2528
|
-
tip:
|
|
2529
|
-
}, null, 8, ["tip"])) :
|
|
2530
|
-
title:
|
|
2531
|
-
message:
|
|
2532
|
-
}, null, 8, ["title", "message"]),
|
|
2533
|
-
default:
|
|
2672
|
+
tip: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.loading-positions", "加载任职")
|
|
2673
|
+
}, null, 8, ["tip"])) : h.value ? (K(), B("div", An, [U(Y(ne), {
|
|
2674
|
+
title: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-positions", "任职加载失败"),
|
|
2675
|
+
message: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.failed-to-load-position-assignments", "无法加载任职授权")
|
|
2676
|
+
}, null, 8, ["title", "message"]), U(Y(f), { onClick: r[1] ||= (e) => ae() }, {
|
|
2677
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
2534
2678
|
_: 1
|
|
2535
|
-
})])) : (
|
|
2536
|
-
|
|
2537
|
-
value:
|
|
2538
|
-
"onUpdate:value": r[2] ||= (e) =>
|
|
2679
|
+
})])) : (K(), B("section", jn, [
|
|
2680
|
+
U(Y(S), {
|
|
2681
|
+
value: v.value,
|
|
2682
|
+
"onUpdate:value": r[2] ||= (e) => v.value = e,
|
|
2539
2683
|
"allow-clear": "",
|
|
2540
|
-
placeholder:
|
|
2684
|
+
placeholder: Y(n).t("platform.screen.RoleEmploymentGrantDrawer.filter-by-employee-employee-number-organization-department-or-position", "筛选职员、工号、机构、部门或岗位")
|
|
2541
2685
|
}, null, 8, ["value", "placeholder"]),
|
|
2542
|
-
|
|
2686
|
+
U(kn, {
|
|
2543
2687
|
"selected-ids": c.value,
|
|
2544
2688
|
"onUpdate:selectedIds": r[3] ||= (e) => c.value = e,
|
|
2545
|
-
rows:
|
|
2689
|
+
rows: te.value,
|
|
2546
2690
|
selectable: "",
|
|
2547
|
-
disabled:
|
|
2548
|
-
pagination:
|
|
2691
|
+
disabled: p.value,
|
|
2692
|
+
pagination: ie.value,
|
|
2549
2693
|
"fill-height": ""
|
|
2550
2694
|
}, null, 8, [
|
|
2551
2695
|
"selected-ids",
|
|
@@ -2553,41 +2697,41 @@ var on = {
|
|
|
2553
2697
|
"disabled",
|
|
2554
2698
|
"pagination"
|
|
2555
2699
|
]),
|
|
2556
|
-
|
|
2700
|
+
re.value.length > 0 ? (K(), B("section", Mn, [V("div", Nn, [V("strong", null, J(Y(n).t("platform.screen.RoleEmploymentGrantDrawer.selected-positions", "已选任职")), 1), V("span", null, J(re.value.length), 1)]), V("div", Pn, [(K(!0), B(I, null, Le(re.value, (e) => (K(), B("button", {
|
|
2557
2701
|
key: e.id,
|
|
2558
2702
|
type: "button",
|
|
2559
|
-
disabled:
|
|
2560
|
-
onClick: (t) =>
|
|
2561
|
-
}, [
|
|
2703
|
+
disabled: p.value,
|
|
2704
|
+
onClick: (t) => A(e.id)
|
|
2705
|
+
}, [V("span", null, J(j(e)), 1), V("small", null, J(de(e)), 1)], 8, Fn))), 128))])])) : z("v-if", !0)
|
|
2562
2706
|
]))]),
|
|
2563
2707
|
_: 2
|
|
2564
2708
|
}, [e.embedded ? void 0 : {
|
|
2565
2709
|
name: "operation",
|
|
2566
|
-
fn:
|
|
2567
|
-
disabled:
|
|
2710
|
+
fn: Z(() => [U(Y(f), {
|
|
2711
|
+
disabled: p.value,
|
|
2568
2712
|
onClick: r[0] ||= (e) => i("close")
|
|
2569
2713
|
}, {
|
|
2570
|
-
default:
|
|
2714
|
+
default: Z(() => [H(J(Y(n).t("platform.action.cancel", "取消")), 1)]),
|
|
2571
2715
|
_: 1
|
|
2572
|
-
}, 8, ["disabled"]),
|
|
2716
|
+
}, 8, ["disabled"]), U(Y(f), {
|
|
2573
2717
|
type: "primary",
|
|
2574
|
-
loading:
|
|
2575
|
-
disabled: d.value ||
|
|
2576
|
-
onClick:
|
|
2718
|
+
loading: p.value,
|
|
2719
|
+
disabled: d.value || E.value.length === 0 && O.value.length === 0,
|
|
2720
|
+
onClick: oe
|
|
2577
2721
|
}, {
|
|
2578
|
-
default:
|
|
2722
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.RoleAccountGrantDrawer.confirm", "确定")), 1)]),
|
|
2579
2723
|
_: 1
|
|
2580
2724
|
}, 8, ["loading", "disabled"])]),
|
|
2581
2725
|
key: "0"
|
|
2582
2726
|
}]), 1040, ["class"]));
|
|
2583
2727
|
}
|
|
2584
|
-
}), [["__scopeId", "data-v-4736da9f"]]),
|
|
2728
|
+
}), [["__scopeId", "data-v-4736da9f"]]), Ln = /* @__PURE__ */ G({
|
|
2585
2729
|
name: "RoleEmploymentGrantDrawerSurface",
|
|
2586
2730
|
__name: "RoleEmploymentGrantDrawerSurface",
|
|
2587
2731
|
props: { context: {} },
|
|
2588
2732
|
setup(e) {
|
|
2589
|
-
let t = e, n =
|
|
2590
|
-
return (e, i) => (
|
|
2733
|
+
let t = e, n = L(() => t.context.module), r = L(() => t.context.record);
|
|
2734
|
+
return (e, i) => (K(), R(In, {
|
|
2591
2735
|
open: "",
|
|
2592
2736
|
embedded: "",
|
|
2593
2737
|
"drawer-context": t.context,
|
|
@@ -2603,7 +2747,7 @@ var on = {
|
|
|
2603
2747
|
"onSaved"
|
|
2604
2748
|
]));
|
|
2605
2749
|
}
|
|
2606
|
-
}),
|
|
2750
|
+
}), Rn = /* @__PURE__ */ G({
|
|
2607
2751
|
name: "WorkspaceViewDrawer",
|
|
2608
2752
|
__name: "WorkspaceViewDrawer",
|
|
2609
2753
|
props: {
|
|
@@ -2621,8 +2765,8 @@ var on = {
|
|
|
2621
2765
|
},
|
|
2622
2766
|
emits: ["close"],
|
|
2623
2767
|
setup(e, { emit: t }) {
|
|
2624
|
-
let n = e, r = t, i =
|
|
2625
|
-
return (t, n) => (
|
|
2768
|
+
let n = e, r = t, i = L(() => n.profile === "wide-work" ? "wide" : "standard");
|
|
2769
|
+
return (t, n) => (K(), R(Y(D), {
|
|
2626
2770
|
open: e.open,
|
|
2627
2771
|
title: e.title,
|
|
2628
2772
|
"render-mode": e.container ? "inline" : "portal",
|
|
@@ -2632,12 +2776,12 @@ var on = {
|
|
|
2632
2776
|
dismissal: e.dismissal,
|
|
2633
2777
|
"before-close": e.beforeClose,
|
|
2634
2778
|
onClose: n[0] ||= (e) => r("close")
|
|
2635
|
-
},
|
|
2636
|
-
default:
|
|
2779
|
+
}, De({
|
|
2780
|
+
default: Z(() => [Re(t.$slots, "default")]),
|
|
2637
2781
|
_: 2
|
|
2638
2782
|
}, [t.$slots.operation ? {
|
|
2639
2783
|
name: "operation",
|
|
2640
|
-
fn:
|
|
2784
|
+
fn: Z(() => [Re(t.$slots, "operation")]),
|
|
2641
2785
|
key: "0"
|
|
2642
2786
|
} : void 0]), 1032, [
|
|
2643
2787
|
"open",
|
|
@@ -2653,21 +2797,21 @@ var on = {
|
|
|
2653
2797
|
});
|
|
2654
2798
|
//#endregion
|
|
2655
2799
|
//#region src/platform-admin-runtime/useWorkspaceViewPromotion.ts
|
|
2656
|
-
function
|
|
2800
|
+
function zn(e) {
|
|
2657
2801
|
return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
|
|
2658
2802
|
}
|
|
2659
|
-
function
|
|
2660
|
-
let t =
|
|
2661
|
-
return
|
|
2662
|
-
let r =
|
|
2663
|
-
if (r &&
|
|
2803
|
+
function Bn(e) {
|
|
2804
|
+
let t = o(), n = b();
|
|
2805
|
+
return L(() => {
|
|
2806
|
+
let r = He(e.input);
|
|
2807
|
+
if (r && zn(He(e.eligibility)) && t) return {
|
|
2664
2808
|
title: n.t("platform.workspace-view.pin-as-tab", "固定为页签"),
|
|
2665
2809
|
promote: async () => {
|
|
2666
2810
|
if (await e.beforePromote?.(r) === !1) {
|
|
2667
2811
|
e.onPromotionRejected?.();
|
|
2668
2812
|
return;
|
|
2669
2813
|
}
|
|
2670
|
-
let i = t.openPage(
|
|
2814
|
+
let i = t.openPage(s(e.view, r, "tab", He(e.title), n));
|
|
2671
2815
|
e.onPromoted?.(i);
|
|
2672
2816
|
}
|
|
2673
2817
|
};
|
|
@@ -2675,53 +2819,53 @@ function On(e) {
|
|
|
2675
2819
|
}
|
|
2676
2820
|
//#endregion
|
|
2677
2821
|
//#region src/platform-admin-runtime/workspaceViewSessions.ts
|
|
2678
|
-
var
|
|
2679
|
-
function
|
|
2680
|
-
return `${e.type}:${
|
|
2822
|
+
var Vn = /* @__PURE__ */ new Map(), Hn = /* @__PURE__ */ new Map();
|
|
2823
|
+
function Un(e, t) {
|
|
2824
|
+
return `${e.type}:${qn(t)}`;
|
|
2681
2825
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
let r =
|
|
2684
|
-
return a ? await a(
|
|
2826
|
+
async function Wn(e, t, n) {
|
|
2827
|
+
let r = Un(e, t), i = Hn.get(r), a = i && [...i].at(-1);
|
|
2828
|
+
return a ? await a(Jn(n)) ? "accepted" : "rejected" : (Vn.set(r, Jn(n)), "accepted");
|
|
2685
2829
|
}
|
|
2686
|
-
function
|
|
2687
|
-
let r =
|
|
2688
|
-
return i.add(n),
|
|
2689
|
-
i.delete(n), i.size === 0 &&
|
|
2830
|
+
function Gn(e, t, n) {
|
|
2831
|
+
let r = Un(e, t), i = Hn.get(r) ?? /* @__PURE__ */ new Set();
|
|
2832
|
+
return i.add(n), Hn.set(r, i), () => {
|
|
2833
|
+
i.delete(n), i.size === 0 && Hn.delete(r);
|
|
2690
2834
|
};
|
|
2691
2835
|
}
|
|
2692
|
-
function
|
|
2693
|
-
let n =
|
|
2694
|
-
return
|
|
2836
|
+
function Kn(e, t) {
|
|
2837
|
+
let n = Un(e, t), r = Vn.get(n);
|
|
2838
|
+
return Vn.delete(n), r;
|
|
2695
2839
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return Array.isArray(e) ? `[${e.map(
|
|
2840
|
+
function qn(e) {
|
|
2841
|
+
return Array.isArray(e) ? `[${e.map(qn).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${qn(t)}`).join(",")}}` : JSON.stringify(e);
|
|
2698
2842
|
}
|
|
2699
|
-
function
|
|
2843
|
+
function Jn(e) {
|
|
2700
2844
|
return JSON.parse(JSON.stringify(e));
|
|
2701
2845
|
}
|
|
2702
2846
|
//#endregion
|
|
2703
2847
|
//#region src/views/roleAuthorizationWorkspaceSession.ts
|
|
2704
|
-
function
|
|
2705
|
-
return
|
|
2848
|
+
function Yn(e, t) {
|
|
2849
|
+
return Wn(qe, e, t);
|
|
2706
2850
|
}
|
|
2707
|
-
function
|
|
2708
|
-
return
|
|
2851
|
+
function Xn(e, t) {
|
|
2852
|
+
return Gn(qe, e, t);
|
|
2709
2853
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return
|
|
2854
|
+
function Zn(e) {
|
|
2855
|
+
return Kn(qe, e);
|
|
2712
2856
|
}
|
|
2713
2857
|
//#endregion
|
|
2714
2858
|
//#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
|
|
2715
|
-
var
|
|
2859
|
+
var Qn = { class: "panel-title" }, $n = {
|
|
2716
2860
|
key: 0,
|
|
2717
2861
|
class: "authorization-column-header"
|
|
2718
|
-
},
|
|
2862
|
+
}, er = {
|
|
2719
2863
|
key: 2,
|
|
2720
2864
|
class: "data-scope-editor"
|
|
2721
|
-
},
|
|
2865
|
+
}, tr = { key: 0 }, nr = { key: 1 }, rr = { key: 3 }, ir = {
|
|
2722
2866
|
key: 4,
|
|
2723
2867
|
class: "not-applicable"
|
|
2724
|
-
},
|
|
2868
|
+
}, ar = /*@__PURE__*/ G({
|
|
2725
2869
|
name: "RoleAuthorizationView",
|
|
2726
2870
|
__name: "RoleAuthorizationView",
|
|
2727
2871
|
props: {
|
|
@@ -2733,96 +2877,96 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
2733
2877
|
},
|
|
2734
2878
|
emits: ["close"],
|
|
2735
2879
|
setup(e, { emit: t }) {
|
|
2736
|
-
let
|
|
2737
|
-
let e =
|
|
2880
|
+
let n = b(), i = e, a = t, o = v({ moduleAlias: "iam.role" }), s = i.moduleContext ?? o, c = _n(s.http), l = i.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", p = r(), h = i.roleId ? { roleId: i.roleId } : void 0, _ = h ? Zn(h) : void 0, y = q(), x = q([]), S = q(), C = q(""), w = q([]), T = q(), D = q(), te = q(!1), se = q(!1), A = q(!1), le = Be(), ue = L(() => le.value ? d(le.value, n) : void 0), j = q(), M = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), F = q(0), pe, he = L(() => y.value?.roleKind === "group"), _e = L(() => y.value?.roleKind === "dataGrant"), ve = L(() => y.value?.assignmentType === "employment"), ye = L(() => !!i.drawerContext), be = L(() => (y.value && me(y.value, "title", n)) ?? l ?? n.t("platform.screen.RoleManagementView.role", "角色")), xe = L(() => n.t("platform.screen.RoleAuthorizationView.permissions-value", "授权:{value1}", { value1: be.value })), Se = L(() => Ce.value ? n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: Ce.value.title }) : n.t("platform.screen.RoleAuthorizationView.action-permissions-value", "动作授权 - {value1}", { value1: be.value })), Ce = L(() => x.value.find((e) => e.moduleAlias === S.value)), we = L(() => {
|
|
2881
|
+
let e = C.value.trim().toLocaleLowerCase(), t = new Set(e ? x.value.filter((t) => [
|
|
2738
2882
|
t.title,
|
|
2739
2883
|
t.moduleAlias,
|
|
2740
2884
|
t.applicationAlias
|
|
2741
|
-
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) :
|
|
2885
|
+
].filter((e) => !!e).some((t) => t.toLocaleLowerCase().includes(e))).map((e) => e.moduleAlias) : x.value.map((e) => e.moduleAlias)), n = new Map(x.value.map((e) => [e.moduleAlias, e]));
|
|
2742
2886
|
for (let e of [...t]) {
|
|
2743
2887
|
let r = n.get(e)?.parentId;
|
|
2744
2888
|
for (; r && n.has(r) && !t.has(r);) t.add(r), r = n.get(r)?.parentId;
|
|
2745
2889
|
}
|
|
2746
|
-
return
|
|
2890
|
+
return x.value.filter((e) => t.has(e.moduleAlias)).map((e) => ({
|
|
2747
2891
|
id: e.moduleAlias,
|
|
2748
2892
|
parentId: e.parentId,
|
|
2749
2893
|
title: e.title,
|
|
2750
2894
|
secondary: e.applicationAlias
|
|
2751
2895
|
}));
|
|
2752
|
-
}),
|
|
2896
|
+
}), Te = L(() => (D.value?.options ?? []).map((e) => ({
|
|
2753
2897
|
value: e.code,
|
|
2754
2898
|
label: e.title
|
|
2755
|
-
}))),
|
|
2899
|
+
}))), Ee = L(() => (D.value?.referenceDependencies ?? []).map((e) => ({
|
|
2756
2900
|
value: e.referenceFieldId,
|
|
2757
2901
|
label: `${e.title} → ${e.targetModuleTitle}`
|
|
2758
|
-
}))),
|
|
2902
|
+
}))), W = L(() => new Map((D.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), G = L(() => ve.value && w.value.some((e) => !!e.dataAuth)), ke = L(() => [
|
|
2759
2903
|
{
|
|
2760
2904
|
key: "title",
|
|
2761
|
-
title:
|
|
2905
|
+
title: n.t("platform.governance.tab.actions", "动作"),
|
|
2762
2906
|
width: 160
|
|
2763
2907
|
},
|
|
2764
2908
|
{
|
|
2765
2909
|
key: "granted",
|
|
2766
|
-
title:
|
|
2910
|
+
title: n.t("platform.page-action.MANAGE_PERMISSIONS.title", "授权"),
|
|
2767
2911
|
width: 104,
|
|
2768
2912
|
align: "center"
|
|
2769
2913
|
},
|
|
2770
|
-
...
|
|
2914
|
+
...G.value ? [{
|
|
2771
2915
|
key: "dataScopePolicy",
|
|
2772
|
-
title:
|
|
2916
|
+
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
2773
2917
|
width: 200
|
|
2774
2918
|
}] : []
|
|
2775
|
-
]),
|
|
2919
|
+
]), Ae = L(() => [
|
|
2776
2920
|
{
|
|
2777
2921
|
key: "title",
|
|
2778
|
-
title:
|
|
2922
|
+
title: n.t("platform.screen.RoleAuthorizationView.standard-action", "标准动作"),
|
|
2779
2923
|
width: 130
|
|
2780
2924
|
},
|
|
2781
2925
|
{
|
|
2782
2926
|
key: "configured",
|
|
2783
|
-
title:
|
|
2927
|
+
title: n.t("platform.screen.RoleAuthorizationView.enable-template", "启用模板"),
|
|
2784
2928
|
width: 104,
|
|
2785
2929
|
align: "center"
|
|
2786
2930
|
},
|
|
2787
2931
|
{
|
|
2788
2932
|
key: "dataScopePolicy",
|
|
2789
|
-
title:
|
|
2933
|
+
title: n.t("platform.screen.RoleAuthorizationView.data-scope", "数据范围"),
|
|
2790
2934
|
width: 160
|
|
2791
2935
|
}
|
|
2792
|
-
]),
|
|
2936
|
+
]), Fe = L(() => w.value), Ie = L(() => T.value?.actions ?? []), Le = L(() => i.drawer === !0 || !!h && p?.presentation === "drawer"), Re = L(() => !!h), Ve = L(() => Re.value && !ye.value), He = L(() => ye.value ? "div" : Le.value ? Rn : Re.value ? ie : "div"), Ue = L(() => Le.value ? {
|
|
2793
2937
|
open: !0,
|
|
2794
|
-
title:
|
|
2938
|
+
title: xe.value,
|
|
2795
2939
|
container: i.container ?? null,
|
|
2796
|
-
profile:
|
|
2797
|
-
promotion:
|
|
2940
|
+
profile: qe.drawerProfile,
|
|
2941
|
+
promotion: Xe.value,
|
|
2798
2942
|
dismissal: "guarded",
|
|
2799
|
-
beforeClose:
|
|
2800
|
-
onClose:
|
|
2801
|
-
} :
|
|
2802
|
-
let e =
|
|
2803
|
-
return !e ||
|
|
2804
|
-
}), Ge =
|
|
2805
|
-
|
|
2806
|
-
let Ke =
|
|
2807
|
-
let e =
|
|
2808
|
-
return
|
|
2943
|
+
beforeClose: pt,
|
|
2944
|
+
onClose: mt
|
|
2945
|
+
} : Ve.value ? { title: xe.value } : {}), We = L(() => {
|
|
2946
|
+
let e = T.value;
|
|
2947
|
+
return !e || j.value === void 0 ? !1 : JSON.stringify(e.actions) !== j.value;
|
|
2948
|
+
}), Ge = L(() => F.value >= 0 && [...M.entries()].some(([e, t]) => P.get(e) !== JSON.stringify(t))), Q = L(() => We.value || Ge.value);
|
|
2949
|
+
ge(() => n.t("platform.unsaved-source.RoleAuthorizationView", "角色授权"), () => Q.value, () => A.value);
|
|
2950
|
+
let Ke = L(() => w.value.length > 0 && w.value.every((e) => e.granted)), Je = L(() => w.value.some((e) => e.granted) && !Ke.value), Ye = L(() => {
|
|
2951
|
+
let e = Ce.value?.title ?? n.t("platform.screen.RoleAuthorizationView.no-module-selected", "未选择模块"), t = w.value.filter((e) => e.granted).length, r = Q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改");
|
|
2952
|
+
return n.t("platform.screen.RoleAuthorizationView.current-module-value-value-value-actions-granted-value", "当前模块:{value1} · 已授权 {value2}/{value3} 项 · {value4}", {
|
|
2809
2953
|
value1: e,
|
|
2810
2954
|
value2: t,
|
|
2811
|
-
value3:
|
|
2812
|
-
value4:
|
|
2955
|
+
value3: w.value.length,
|
|
2956
|
+
value4: r
|
|
2813
2957
|
});
|
|
2814
|
-
}),
|
|
2815
|
-
view:
|
|
2816
|
-
input: () =>
|
|
2817
|
-
title:
|
|
2958
|
+
}), Xe = Bn({
|
|
2959
|
+
view: qe,
|
|
2960
|
+
input: () => h,
|
|
2961
|
+
title: xe,
|
|
2818
2962
|
eligibility: () => ({
|
|
2819
|
-
hasStableIdentity: !!(l &&
|
|
2963
|
+
hasStableIdentity: !!(l && y.value),
|
|
2820
2964
|
busy: A.value
|
|
2821
2965
|
}),
|
|
2822
|
-
beforePromote: (e) =>
|
|
2823
|
-
selectedModuleAlias:
|
|
2824
|
-
dataGrantMatrix:
|
|
2825
|
-
actionDrafts: [...
|
|
2966
|
+
beforePromote: (e) => Yn(e, {
|
|
2967
|
+
selectedModuleAlias: S.value,
|
|
2968
|
+
dataGrantMatrix: T.value,
|
|
2969
|
+
actionDrafts: [...M.entries()].map(([e, t]) => ({
|
|
2826
2970
|
moduleAlias: e,
|
|
2827
2971
|
actions: t
|
|
2828
2972
|
})),
|
|
@@ -2831,145 +2975,145 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
2831
2975
|
snapshot: t
|
|
2832
2976
|
}))
|
|
2833
2977
|
}).then((e) => e === "accepted"),
|
|
2834
|
-
onPromoted:
|
|
2835
|
-
onPromotionRejected: () => de(
|
|
2836
|
-
language:
|
|
2978
|
+
onPromoted: ht,
|
|
2979
|
+
onPromotionRejected: () => de(n.t("platform.screen.RoleAuthorizationView.the-target-tab-has-unconfirmed-permission-changes-confirm-or-close", "目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。"), {
|
|
2980
|
+
language: n,
|
|
2837
2981
|
source: "role-authorization",
|
|
2838
2982
|
phase: "validation"
|
|
2839
2983
|
})
|
|
2840
2984
|
});
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
}),
|
|
2844
|
-
|
|
2845
|
-
}, { immediate: !0 }),
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2985
|
+
Pe(() => {
|
|
2986
|
+
h && !Le.value && (pe = Xn(h, gt)), Qe();
|
|
2987
|
+
}), X(xe, (e) => {
|
|
2988
|
+
Re.value && p?.setTitle(e);
|
|
2989
|
+
}, { immediate: !0 }), X(S, () => void $e()), X([
|
|
2990
|
+
be,
|
|
2991
|
+
Ye,
|
|
2992
|
+
Q,
|
|
2849
2993
|
A,
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
],
|
|
2853
|
-
|
|
2994
|
+
he,
|
|
2995
|
+
_e
|
|
2996
|
+
], Ze, { immediate: !0 }), Pe(() => window.addEventListener("beforeunload", $)), Ne(() => {
|
|
2997
|
+
pe?.(), i.drawerContext?.setOperation(void 0), i.drawerContext?.setSubtitle(void 0), window.removeEventListener("beforeunload", $);
|
|
2854
2998
|
});
|
|
2855
|
-
function
|
|
2999
|
+
function Ze() {
|
|
2856
3000
|
let e = i.drawerContext;
|
|
2857
3001
|
if (e) {
|
|
2858
|
-
if (e.setSubtitle(`${
|
|
3002
|
+
if (e.setSubtitle(`${be.value} · ${vt(y.value)}`), he.value) {
|
|
2859
3003
|
e.setOperation(void 0);
|
|
2860
3004
|
return;
|
|
2861
3005
|
}
|
|
2862
3006
|
e.setOperation({
|
|
2863
|
-
summary:
|
|
3007
|
+
summary: _e.value ? Q.value ? n.t("platform.screen.ConstructionPlanCard.unconfirmed-changes", "有未确认修改") : n.t("platform.screen.RoleAuthorizationView.unchanged", "未修改") : Ye.value,
|
|
2864
3008
|
actions: [{
|
|
2865
3009
|
key: "confirm-role-authorization",
|
|
2866
|
-
label:
|
|
3010
|
+
label: n.t("platform.screen.UiModal.confirmText", "确认"),
|
|
2867
3011
|
emphasis: "primary",
|
|
2868
|
-
disabled: A.value ||
|
|
3012
|
+
disabled: A.value || !Q.value,
|
|
2869
3013
|
loading: A.value,
|
|
2870
|
-
run: () => void
|
|
3014
|
+
run: () => void ft()
|
|
2871
3015
|
}]
|
|
2872
3016
|
});
|
|
2873
3017
|
}
|
|
2874
3018
|
}
|
|
2875
|
-
async function
|
|
3019
|
+
async function Qe() {
|
|
2876
3020
|
if (!l) {
|
|
2877
|
-
|
|
3021
|
+
le.value = new oe(ee(n, "platform.screen.RoleAuthorizationView.the-role-id-is-missing-cannot-open-the-permissions-page", "缺少角色标识,无法打开授权页。"));
|
|
2878
3022
|
return;
|
|
2879
3023
|
}
|
|
2880
|
-
|
|
3024
|
+
te.value = !0, le.value = void 0;
|
|
2881
3025
|
try {
|
|
2882
|
-
if (
|
|
2883
|
-
if (
|
|
3026
|
+
if (y.value = await s.crud.view(l), y.value.roleKind === "group") return;
|
|
3027
|
+
if (y.value.roleKind === "dataGrant") {
|
|
2884
3028
|
let [e, t] = await Promise.all([c.dataGrantActionMatrix(l), c.dataScopePolicyCatalog(l)]);
|
|
2885
|
-
|
|
3029
|
+
T.value = _?.dataGrantMatrix ?? e, D.value = t, j.value = JSON.stringify(e.actions);
|
|
2886
3030
|
return;
|
|
2887
3031
|
}
|
|
2888
|
-
|
|
3032
|
+
x.value = (await c.authorizationModules(l)).records, S.value = _?.selectedModuleAlias ?? x.value[0]?.moduleAlias;
|
|
2889
3033
|
} catch (e) {
|
|
2890
|
-
|
|
2891
|
-
language:
|
|
3034
|
+
le.value = new oe(ee(n, "platform.screen.RoleAuthorizationView.failed-to-load-permission-information-try-again", "授权信息加载失败,请重试。")), N(e, {
|
|
3035
|
+
language: n,
|
|
2892
3036
|
source: "role-authorization",
|
|
2893
3037
|
phase: "load"
|
|
2894
3038
|
});
|
|
2895
3039
|
} finally {
|
|
2896
|
-
|
|
3040
|
+
te.value = !1;
|
|
2897
3041
|
}
|
|
2898
3042
|
}
|
|
2899
|
-
async function
|
|
2900
|
-
let e =
|
|
2901
|
-
if (!(!e ||
|
|
2902
|
-
|
|
3043
|
+
async function $e() {
|
|
3044
|
+
let e = S.value;
|
|
3045
|
+
if (!(!e || _e.value || he.value)) {
|
|
3046
|
+
se.value = !0;
|
|
2903
3047
|
try {
|
|
2904
|
-
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(
|
|
2905
|
-
|
|
3048
|
+
let [t, n] = await Promise.all([c.permissionMatrix(l, [e]), c.dataScopePolicyCatalog(l, e)]), r = (t.modules[0]?.actions ?? []).map(lt), i = _?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions, a = M.get(e) ?? i;
|
|
3049
|
+
w.value = a ?? r, M.has(e) || (M.set(e, w.value), P.set(e, _?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), F.value += 1, D.value = n;
|
|
2906
3050
|
} catch (e) {
|
|
2907
|
-
|
|
2908
|
-
language:
|
|
3051
|
+
N(e, {
|
|
3052
|
+
language: n,
|
|
2909
3053
|
source: "role-authorization",
|
|
2910
3054
|
phase: "load"
|
|
2911
3055
|
});
|
|
2912
3056
|
} finally {
|
|
2913
|
-
|
|
3057
|
+
se.value = !1;
|
|
2914
3058
|
}
|
|
2915
3059
|
}
|
|
2916
3060
|
}
|
|
2917
|
-
function
|
|
2918
|
-
t && e.dataAuth &&
|
|
3061
|
+
function et(e, t) {
|
|
3062
|
+
t && e.dataAuth && ve.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, F.value += 1;
|
|
2919
3063
|
}
|
|
2920
|
-
function
|
|
2921
|
-
|
|
3064
|
+
function tt(e) {
|
|
3065
|
+
w.value.forEach((t) => et(t, e));
|
|
2922
3066
|
}
|
|
2923
|
-
function
|
|
3067
|
+
function nt(e, t) {
|
|
2924
3068
|
if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
|
|
2925
3069
|
e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
|
|
2926
3070
|
return;
|
|
2927
3071
|
}
|
|
2928
3072
|
e.referenceFieldId = void 0, e.referenceActionCode = void 0, F.value += 1;
|
|
2929
3073
|
}
|
|
2930
|
-
function
|
|
2931
|
-
let n =
|
|
3074
|
+
function rt(e, t) {
|
|
3075
|
+
let n = W.value.get(String(t || ""));
|
|
2932
3076
|
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, F.value += 1;
|
|
2933
3077
|
}
|
|
2934
|
-
function rt(e) {
|
|
2935
|
-
return Ee.value.get(String(e || ""));
|
|
2936
|
-
}
|
|
2937
3078
|
function it(e) {
|
|
2938
|
-
return
|
|
3079
|
+
return W.value.get(String(e || ""));
|
|
2939
3080
|
}
|
|
2940
3081
|
function at(e) {
|
|
2941
|
-
return e
|
|
3082
|
+
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
2942
3083
|
}
|
|
2943
3084
|
function ot(e) {
|
|
2944
|
-
return
|
|
3085
|
+
return e.dataScopePolicy ?? "inheritDataGrant";
|
|
3086
|
+
}
|
|
3087
|
+
function st(e) {
|
|
3088
|
+
return !!e.dataAuth && ve.value;
|
|
2945
3089
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return e.key === "dataScopePolicy" &&
|
|
3090
|
+
function ct(e, t) {
|
|
3091
|
+
return e.key === "dataScopePolicy" && st(t);
|
|
2948
3092
|
}
|
|
2949
|
-
function
|
|
2950
|
-
return
|
|
3093
|
+
function lt(e) {
|
|
3094
|
+
return ve.value && e.dataAuth && e.dataScopePolicy === "none" ? {
|
|
2951
3095
|
...e,
|
|
2952
3096
|
dataScopePolicy: "inheritDataGrant"
|
|
2953
3097
|
} : e;
|
|
2954
3098
|
}
|
|
2955
|
-
async function
|
|
2956
|
-
if (
|
|
3099
|
+
async function ut() {
|
|
3100
|
+
if (T.value) {
|
|
2957
3101
|
A.value = !0;
|
|
2958
3102
|
try {
|
|
2959
|
-
let e = await c.replaceDataGrantActions(l,
|
|
3103
|
+
let e = await c.replaceDataGrantActions(l, T.value.actions.map((e) => ({
|
|
2960
3104
|
actionCode: e.actionCode,
|
|
2961
3105
|
dataScopePolicy: e.dataScopePolicy,
|
|
2962
3106
|
enabled: e.configured
|
|
2963
3107
|
})));
|
|
2964
|
-
await
|
|
2965
|
-
language:
|
|
3108
|
+
await fe(e, {
|
|
3109
|
+
language: n,
|
|
2966
3110
|
source: "role-authorization",
|
|
2967
3111
|
phase: "action",
|
|
2968
|
-
fallbackMessage:
|
|
2969
|
-
}),
|
|
3112
|
+
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.data-permission-template-saved", "数据权限模板已保存")
|
|
3113
|
+
}), j.value = JSON.stringify(T.value.actions);
|
|
2970
3114
|
} catch (e) {
|
|
2971
|
-
|
|
2972
|
-
language:
|
|
3115
|
+
N(e, {
|
|
3116
|
+
language: n,
|
|
2973
3117
|
source: "role-authorization",
|
|
2974
3118
|
phase: "action"
|
|
2975
3119
|
});
|
|
@@ -2978,8 +3122,8 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
2978
3122
|
}
|
|
2979
3123
|
}
|
|
2980
3124
|
}
|
|
2981
|
-
async function
|
|
2982
|
-
let e = [...
|
|
3125
|
+
async function dt() {
|
|
3126
|
+
let e = [...M.entries()].filter(([e, t]) => P.get(e) !== JSON.stringify(t));
|
|
2983
3127
|
if (e.length) {
|
|
2984
3128
|
A.value = !0;
|
|
2985
3129
|
try {
|
|
@@ -2987,19 +3131,19 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
2987
3131
|
moduleAlias: e,
|
|
2988
3132
|
actionCode: t.actionCode,
|
|
2989
3133
|
granted: !!t.granted,
|
|
2990
|
-
dataScopePolicy: t.granted && t.dataAuth &&
|
|
3134
|
+
dataScopePolicy: t.granted && t.dataAuth && ve.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
|
|
2991
3135
|
referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
|
|
2992
3136
|
referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
|
|
2993
3137
|
}))));
|
|
2994
|
-
await
|
|
2995
|
-
language:
|
|
3138
|
+
await fe(t, {
|
|
3139
|
+
language: n,
|
|
2996
3140
|
source: "role-authorization",
|
|
2997
3141
|
phase: "action",
|
|
2998
|
-
fallbackMessage:
|
|
3142
|
+
fallbackMessage: n.t("platform.screen.RoleAuthorizationView.role-permissions-saved", "角色授权已保存")
|
|
2999
3143
|
}), e.forEach(([e, t]) => P.set(e, JSON.stringify(t))), F.value += 1;
|
|
3000
3144
|
} catch (e) {
|
|
3001
|
-
|
|
3002
|
-
language:
|
|
3145
|
+
N(e, {
|
|
3146
|
+
language: n,
|
|
3003
3147
|
source: "role-authorization",
|
|
3004
3148
|
phase: "action"
|
|
3005
3149
|
});
|
|
@@ -3008,78 +3152,78 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3008
3152
|
}
|
|
3009
3153
|
}
|
|
3010
3154
|
}
|
|
3011
|
-
async function
|
|
3012
|
-
if (
|
|
3013
|
-
await
|
|
3155
|
+
async function ft() {
|
|
3156
|
+
if (_e.value) {
|
|
3157
|
+
await ut();
|
|
3014
3158
|
return;
|
|
3015
3159
|
}
|
|
3016
|
-
await
|
|
3160
|
+
await dt();
|
|
3017
3161
|
}
|
|
3018
|
-
async function
|
|
3019
|
-
return
|
|
3020
|
-
title:
|
|
3021
|
-
content:
|
|
3022
|
-
okText:
|
|
3162
|
+
async function pt() {
|
|
3163
|
+
return !Q.value || ce({
|
|
3164
|
+
title: n.t("platform.screen.RoleAuthorizationView.discard-unconfirmed-permission-changes", "放弃未确认的授权配置"),
|
|
3165
|
+
content: n.t("platform.screen.RoleAuthorizationView.these-changes-have-not-been-confirmed-and-will-be-lost", "当前修改尚未确认,关闭后将丢失这些修改。"),
|
|
3166
|
+
okText: n.t("platform.screen.WorkflowWorkbenchView.discard-changes", "放弃修改"),
|
|
3023
3167
|
danger: !0
|
|
3024
|
-
},
|
|
3025
|
-
}
|
|
3026
|
-
function pt() {
|
|
3027
|
-
gt();
|
|
3168
|
+
}, n);
|
|
3028
3169
|
}
|
|
3029
3170
|
function mt() {
|
|
3030
|
-
|
|
3171
|
+
_t();
|
|
3172
|
+
}
|
|
3173
|
+
function ht() {
|
|
3174
|
+
_t();
|
|
3031
3175
|
}
|
|
3032
|
-
function
|
|
3033
|
-
return
|
|
3176
|
+
function gt(e) {
|
|
3177
|
+
return !Q.value && (S.value = e.selectedModuleAlias, T.value = e.dataGrantMatrix, M.clear(), P.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => M.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => P.set(e, t)), F.value += 1, !0);
|
|
3034
3178
|
}
|
|
3035
|
-
function
|
|
3179
|
+
function _t() {
|
|
3036
3180
|
if (i.drawer === !0) {
|
|
3037
3181
|
a("close");
|
|
3038
3182
|
return;
|
|
3039
3183
|
}
|
|
3040
|
-
|
|
3184
|
+
p?.dismiss();
|
|
3041
3185
|
}
|
|
3042
|
-
function
|
|
3043
|
-
|
|
3186
|
+
function $(e) {
|
|
3187
|
+
Q.value && (e.preventDefault(), e.returnValue = "");
|
|
3044
3188
|
}
|
|
3045
3189
|
function vt(e) {
|
|
3046
|
-
return e?.ownerScopeType === "platform" ?
|
|
3190
|
+
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", "租户范围");
|
|
3047
3191
|
}
|
|
3048
|
-
return (e, t) => (
|
|
3049
|
-
default:
|
|
3192
|
+
return (e, t) => (K(), R(ze(He.value), Me(Oe(Ue.value)), De({
|
|
3193
|
+
default: Z(() => [V("section", { class: je(["role-authorization-page", { "role-authorization-page--drawer": Le.value || ye.value }]) }, [te.value ? (K(), R(Y(m), {
|
|
3050
3194
|
key: 0,
|
|
3051
|
-
tip:
|
|
3052
|
-
}, null, 8, ["tip"])) :
|
|
3195
|
+
tip: Y(n).t("platform.screen.RoleAuthorizationView.loading-permissions", "加载授权信息")
|
|
3196
|
+
}, null, 8, ["tip"])) : ue.value ? (K(), R(Y(ne), {
|
|
3053
3197
|
key: 1,
|
|
3054
|
-
title:
|
|
3055
|
-
message:
|
|
3056
|
-
}, null, 8, ["title", "message"])) :
|
|
3198
|
+
title: Y(n).t("platform.screen.RoleAuthorizationView.failed-to-load-the-permissions-page", "授权页加载失败"),
|
|
3199
|
+
message: ue.value
|
|
3200
|
+
}, null, 8, ["title", "message"])) : he.value ? (K(), R(Y(O), {
|
|
3057
3201
|
key: 2,
|
|
3058
|
-
title:
|
|
3059
|
-
description:
|
|
3060
|
-
}, null, 8, ["title", "description"])) :
|
|
3202
|
+
title: Y(n).t("platform.screen.RoleAuthorizationView.role-groups-do-not-have-separate-permissions", "角色组不独立授权"),
|
|
3203
|
+
description: Y(n).t("platform.screen.RoleAuthorizationView.role-groups-combine-their-member-roles-configure-action-and-data", "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。")
|
|
3204
|
+
}, null, 8, ["title", "description"])) : _e.value && T.value ? (K(), R(Y(u), {
|
|
3061
3205
|
key: 3,
|
|
3062
3206
|
class: "data-grant-content",
|
|
3063
|
-
title:
|
|
3207
|
+
title: Ve.value ? Y(n).t("platform.screen.RoleAuthorizationView.data-permission-template", "数据权限模板") : Y(n).t("platform.screen.RoleAuthorizationView.data-permission-template-value", "数据权限模板 - {value1}", { value1: be.value }),
|
|
3064
3208
|
searchable: !1,
|
|
3065
|
-
onRefresh:
|
|
3209
|
+
onRefresh: Qe
|
|
3066
3210
|
}, {
|
|
3067
|
-
default:
|
|
3211
|
+
default: Z(() => [V("header", Qn, [V("div", null, [V("h3", null, J(Y(n).t("platform.screen.RoleAuthorizationView.data-scope-templates-for-standard-actions", "标准动作的数据范围模板")), 1), V("p", null, J(Y(n).t("platform.screen.RoleAuthorizationView.a-template-takes-effect-only-when-a-standard-role-action", "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")), 1)]), Re.value ? z("v-if", !0) : (K(), R(Y(f), {
|
|
3068
3212
|
key: 0,
|
|
3069
3213
|
type: "primary",
|
|
3070
|
-
disabled:
|
|
3214
|
+
disabled: !Q.value,
|
|
3071
3215
|
loading: A.value,
|
|
3072
|
-
onClick:
|
|
3216
|
+
onClick: ft
|
|
3073
3217
|
}, {
|
|
3074
|
-
default:
|
|
3218
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3075
3219
|
_: 1
|
|
3076
|
-
}, 8, ["disabled", "loading"]))]),
|
|
3077
|
-
columns:
|
|
3078
|
-
rows:
|
|
3220
|
+
}, 8, ["disabled", "loading"]))]), U(Y(g), {
|
|
3221
|
+
columns: Ae.value,
|
|
3222
|
+
rows: Ie.value,
|
|
3079
3223
|
"row-key": "actionCode",
|
|
3080
3224
|
"horizontal-scroll": ""
|
|
3081
3225
|
}, {
|
|
3082
|
-
cell:
|
|
3226
|
+
cell: Z(({ column: e, record: t }) => [e.key === "title" ? (K(), B(I, { key: 0 }, [V("strong", null, J(t.title || t.actionCode), 1), V("small", null, J(t.actionCode), 1)], 64)) : e.key === "configured" ? (K(), R(Y(E), {
|
|
3083
3227
|
key: 1,
|
|
3084
3228
|
checked: !!t.configured,
|
|
3085
3229
|
disabled: A.value,
|
|
@@ -3088,12 +3232,12 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3088
3232
|
"checked",
|
|
3089
3233
|
"disabled",
|
|
3090
3234
|
"onChange"
|
|
3091
|
-
])) : (
|
|
3235
|
+
])) : (K(), R(Y(ae), {
|
|
3092
3236
|
key: 2,
|
|
3093
3237
|
value: t.dataScopePolicy,
|
|
3094
|
-
options:
|
|
3238
|
+
options: Te.value,
|
|
3095
3239
|
disabled: !t.configured || A.value,
|
|
3096
|
-
placeholder:
|
|
3240
|
+
placeholder: Y(n).t("platform.screen.RoleAuthorizationView.select-a-data-scope", "请选择数据范围"),
|
|
3097
3241
|
"allow-clear": !1,
|
|
3098
3242
|
"onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
|
|
3099
3243
|
}, null, 8, [
|
|
@@ -3106,22 +3250,22 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3106
3250
|
_: 1
|
|
3107
3251
|
}, 8, ["columns", "rows"])]),
|
|
3108
3252
|
_: 1
|
|
3109
|
-
}, 8, ["title"])) : (
|
|
3253
|
+
}, 8, ["title"])) : (K(), B("section", {
|
|
3110
3254
|
key: 4,
|
|
3111
|
-
class:
|
|
3112
|
-
}, [
|
|
3113
|
-
"search-keyword":
|
|
3114
|
-
"onUpdate:searchKeyword": t[1] ||= (e) =>
|
|
3255
|
+
class: je(["authorization-layout", { "authorization-layout--compact-actions": !G.value }])
|
|
3256
|
+
}, [U(Y(u), {
|
|
3257
|
+
"search-keyword": C.value,
|
|
3258
|
+
"onUpdate:searchKeyword": t[1] ||= (e) => C.value = e,
|
|
3115
3259
|
class: "module-panel",
|
|
3116
|
-
title:
|
|
3117
|
-
"refresh-title":
|
|
3118
|
-
"search-placeholder":
|
|
3119
|
-
onRefresh:
|
|
3260
|
+
title: Y(n).t("platform.screen.RoleAuthorizationView.module-tree", "模块树"),
|
|
3261
|
+
"refresh-title": Y(n).t("platform.screen.RoleAuthorizationView.refresh-module-directory", "刷新模块目录"),
|
|
3262
|
+
"search-placeholder": Y(n).t("platform.screen.RoleAuthorizationView.search-module-names-or-aliases", "搜索模块名称或别名"),
|
|
3263
|
+
onRefresh: Qe
|
|
3120
3264
|
}, {
|
|
3121
|
-
default:
|
|
3122
|
-
records:
|
|
3123
|
-
"selected-id":
|
|
3124
|
-
onSelect: t[0] ||= (e) =>
|
|
3265
|
+
default: Z(() => [U(Y(re), {
|
|
3266
|
+
records: we.value,
|
|
3267
|
+
"selected-id": S.value,
|
|
3268
|
+
onSelect: t[0] ||= (e) => S.value = e.id
|
|
3125
3269
|
}, null, 8, ["records", "selected-id"])]),
|
|
3126
3270
|
_: 1
|
|
3127
3271
|
}, 8, [
|
|
@@ -3129,112 +3273,112 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3129
3273
|
"title",
|
|
3130
3274
|
"refresh-title",
|
|
3131
3275
|
"search-placeholder"
|
|
3132
|
-
]),
|
|
3276
|
+
]), U(Y(u), {
|
|
3133
3277
|
class: "action-panel",
|
|
3134
|
-
title:
|
|
3278
|
+
title: Se.value,
|
|
3135
3279
|
searchable: !1
|
|
3136
|
-
},
|
|
3137
|
-
default:
|
|
3280
|
+
}, De({
|
|
3281
|
+
default: Z(() => [se.value ? (K(), R(Y(m), {
|
|
3138
3282
|
key: 0,
|
|
3139
|
-
tip:
|
|
3140
|
-
}, null, 8, ["tip"])) :
|
|
3283
|
+
tip: Y(n).t("platform.screen.RoleAuthorizationView.loading-module-actions", "加载模块动作")
|
|
3284
|
+
}, null, 8, ["tip"])) : S.value ? (K(), R(Y(g), {
|
|
3141
3285
|
key: 2,
|
|
3142
|
-
columns:
|
|
3143
|
-
rows:
|
|
3286
|
+
columns: ke.value,
|
|
3287
|
+
rows: Fe.value,
|
|
3144
3288
|
"row-key": "actionCode",
|
|
3145
3289
|
"fill-height": "",
|
|
3146
3290
|
"horizontal-scroll": ""
|
|
3147
3291
|
}, {
|
|
3148
|
-
header:
|
|
3292
|
+
header: Z(({ column: e }) => [e.key === "granted" ? (K(), B("span", $n, [U(Y(k), {
|
|
3149
3293
|
checked: Ke.value,
|
|
3150
|
-
indeterminate:
|
|
3151
|
-
disabled: A.value || !
|
|
3152
|
-
"aria-label":
|
|
3153
|
-
onChange:
|
|
3294
|
+
indeterminate: Je.value,
|
|
3295
|
+
disabled: A.value || !w.value.length,
|
|
3296
|
+
"aria-label": Y(n).t("platform.screen.RoleAuthorizationView.grant-all-actions-in-the-current-module", "全选当前模块动作授权"),
|
|
3297
|
+
onChange: tt
|
|
3154
3298
|
}, null, 8, [
|
|
3155
3299
|
"checked",
|
|
3156
3300
|
"indeterminate",
|
|
3157
3301
|
"disabled",
|
|
3158
3302
|
"aria-label"
|
|
3159
|
-
]),
|
|
3160
|
-
cell:
|
|
3303
|
+
]), H(" " + J(Y(n).t("platform.page-action.MANAGE_PERMISSIONS.title", "授权")), 1)])) : (K(), B(I, { key: 1 }, [H(J(e.title), 1)], 64))]),
|
|
3304
|
+
cell: Z(({ column: e, record: t }) => [e.key === "title" ? (K(), B(I, { key: 0 }, [V("strong", null, J(t.title || t.actionCode), 1), V("small", null, J(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (K(), R(Y(k), {
|
|
3161
3305
|
key: 1,
|
|
3162
3306
|
checked: !!t.granted,
|
|
3163
3307
|
disabled: A.value,
|
|
3164
|
-
onChange: (e) =>
|
|
3308
|
+
onChange: (e) => et(t, e)
|
|
3165
3309
|
}, null, 8, [
|
|
3166
3310
|
"checked",
|
|
3167
3311
|
"disabled",
|
|
3168
3312
|
"onChange"
|
|
3169
|
-
])) : t.dataAuth &&
|
|
3170
|
-
value:
|
|
3171
|
-
options:
|
|
3313
|
+
])) : t.dataAuth && ve.value && t.granted ? (K(), B("div", er, [U(Y(ae), {
|
|
3314
|
+
value: ot(t),
|
|
3315
|
+
options: Te.value,
|
|
3172
3316
|
disabled: A.value,
|
|
3173
3317
|
"allow-clear": !1,
|
|
3174
|
-
"onUpdate:value": (e) =>
|
|
3318
|
+
"onUpdate:value": (e) => nt(t, e)
|
|
3175
3319
|
}, null, 8, [
|
|
3176
3320
|
"value",
|
|
3177
3321
|
"options",
|
|
3178
3322
|
"disabled",
|
|
3179
3323
|
"onUpdate:value"
|
|
3180
|
-
]), t.dataScopePolicy === "referenceDependency" ? (
|
|
3181
|
-
value:
|
|
3182
|
-
options:
|
|
3324
|
+
]), t.dataScopePolicy === "referenceDependency" ? (K(), B(I, { key: 0 }, [U(Y(ae), {
|
|
3325
|
+
value: at(t.referenceFieldId),
|
|
3326
|
+
options: Ee.value,
|
|
3183
3327
|
disabled: A.value,
|
|
3184
|
-
placeholder:
|
|
3328
|
+
placeholder: Y(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field", "请选择引用字段"),
|
|
3185
3329
|
"allow-clear": !1,
|
|
3186
|
-
"onUpdate:value": (e) =>
|
|
3330
|
+
"onUpdate:value": (e) => rt(t, e)
|
|
3187
3331
|
}, null, 8, [
|
|
3188
3332
|
"value",
|
|
3189
3333
|
"options",
|
|
3190
3334
|
"disabled",
|
|
3191
3335
|
"placeholder",
|
|
3192
3336
|
"onUpdate:value"
|
|
3193
|
-
]), t.referenceFieldId ? (
|
|
3337
|
+
]), t.referenceFieldId ? (K(), B("small", tr, J(Y(n).t("platform.screen.RoleAuthorizationView.dependency-target", "依赖目标:")) + J(it(t.referenceFieldId)?.targetModuleTitle) + " · " + J(it(t.referenceFieldId)?.referenceActionTitle), 1)) : (K(), B("small", nr, J(Y(n).t("platform.screen.RoleAuthorizationView.select-a-reference-field-before-granting-this-action", "请先选择引用字段,再开启该动作授权。")), 1))], 64)) : z("v-if", !0)])) : ct(e, t) ? (K(), B("span", rr, "—")) : (K(), B("span", ir, J(Y(n).t("platform.screen.RoleAuthorizationView.not-applicable", "不适用")), 1))]),
|
|
3194
3338
|
_: 1
|
|
3195
|
-
}, 8, ["columns", "rows"])) : (
|
|
3339
|
+
}, 8, ["columns", "rows"])) : (K(), R(Y(O), {
|
|
3196
3340
|
key: 1,
|
|
3197
|
-
title:
|
|
3341
|
+
title: Y(n).t("platform.screen.useModulePageSession.select-a-module", "请选择模块")
|
|
3198
3342
|
}, null, 8, ["title"]))]),
|
|
3199
3343
|
_: 2
|
|
3200
|
-
}, [
|
|
3344
|
+
}, [Re.value ? void 0 : {
|
|
3201
3345
|
name: "actions",
|
|
3202
|
-
fn:
|
|
3346
|
+
fn: Z(() => [U(Y(f), {
|
|
3203
3347
|
type: "primary",
|
|
3204
|
-
disabled:
|
|
3348
|
+
disabled: !Q.value,
|
|
3205
3349
|
loading: A.value,
|
|
3206
|
-
onClick:
|
|
3350
|
+
onClick: ft
|
|
3207
3351
|
}, {
|
|
3208
|
-
default:
|
|
3352
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3209
3353
|
_: 1
|
|
3210
3354
|
}, 8, ["disabled", "loading"])]),
|
|
3211
3355
|
key: "0"
|
|
3212
3356
|
}]), 1032, ["title"])], 2))], 2)]),
|
|
3213
3357
|
_: 2
|
|
3214
|
-
}, [
|
|
3358
|
+
}, [Ve.value && !he.value ? {
|
|
3215
3359
|
name: "operation",
|
|
3216
|
-
fn:
|
|
3360
|
+
fn: Z(() => [U(Y(f), {
|
|
3217
3361
|
type: "primary",
|
|
3218
|
-
disabled:
|
|
3362
|
+
disabled: !Q.value,
|
|
3219
3363
|
loading: A.value,
|
|
3220
|
-
onClick:
|
|
3364
|
+
onClick: ft
|
|
3221
3365
|
}, {
|
|
3222
|
-
default:
|
|
3366
|
+
default: Z(() => [H(J(Y(n).t("platform.screen.UiModal.confirmText", "确认")), 1)]),
|
|
3223
3367
|
_: 1
|
|
3224
3368
|
}, 8, ["disabled", "loading"])]),
|
|
3225
3369
|
key: "0"
|
|
3226
3370
|
} : void 0]), 1040));
|
|
3227
3371
|
}
|
|
3228
|
-
}),
|
|
3372
|
+
}), or = /* @__PURE__ */ e({ default: () => sr }), sr = /*#__PURE__*/ P(ar, [["__scopeId", "data-v-817d8433"]]), cr = { class: "role-authorization-drawer-surface" }, lr = /*#__PURE__*/ P(/* @__PURE__ */ G({
|
|
3229
3373
|
name: "RoleAuthorizationDrawerSurface",
|
|
3230
3374
|
__name: "RoleAuthorizationDrawerSurface",
|
|
3231
3375
|
props: { context: {} },
|
|
3232
3376
|
setup(e) {
|
|
3233
3377
|
let t = e, n = t.context.module;
|
|
3234
|
-
return (e, r) => (
|
|
3378
|
+
return (e, r) => (K(), B("section", cr, [t.context.record?.id == null ? z("v-if", !0) : (K(), R(sr, {
|
|
3235
3379
|
key: 0,
|
|
3236
3380
|
"role-id": String(t.context.record.id),
|
|
3237
|
-
"module-context":
|
|
3381
|
+
"module-context": Y(n),
|
|
3238
3382
|
"drawer-context": t.context
|
|
3239
3383
|
}, null, 8, [
|
|
3240
3384
|
"role-id",
|
|
@@ -3242,48 +3386,48 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3242
3386
|
"drawer-context"
|
|
3243
3387
|
]))]));
|
|
3244
3388
|
}
|
|
3245
|
-
}), [["__scopeId", "data-v-04d29709"]]),
|
|
3389
|
+
}), [["__scopeId", "data-v-04d29709"]]), ur = {
|
|
3246
3390
|
key: 0,
|
|
3247
3391
|
class: "role-group-member-form-field"
|
|
3248
|
-
},
|
|
3392
|
+
}, dr = {
|
|
3249
3393
|
id: "iam-role-scope-and-actions",
|
|
3250
3394
|
target: { moduleAlias: "iam.role" },
|
|
3251
3395
|
navigator: {
|
|
3252
3396
|
bypassListScope: !0,
|
|
3253
3397
|
extension: {
|
|
3254
3398
|
key: "iam-role-scope-tree",
|
|
3255
|
-
component:
|
|
3399
|
+
component: hn,
|
|
3256
3400
|
selection: { kind: "roleScope" }
|
|
3257
3401
|
}
|
|
3258
3402
|
},
|
|
3259
3403
|
list: { cellComponents: [
|
|
3260
3404
|
{
|
|
3261
3405
|
key: "assignmentType",
|
|
3262
|
-
cell:
|
|
3406
|
+
cell: gn
|
|
3263
3407
|
},
|
|
3264
3408
|
{
|
|
3265
3409
|
key: "roleKind",
|
|
3266
|
-
cell:
|
|
3410
|
+
cell: gn
|
|
3267
3411
|
},
|
|
3268
3412
|
{
|
|
3269
3413
|
key: "sharePolicy",
|
|
3270
|
-
cell:
|
|
3414
|
+
cell: gn
|
|
3271
3415
|
}
|
|
3272
3416
|
] },
|
|
3273
3417
|
form: {
|
|
3274
3418
|
contributions: [{
|
|
3275
3419
|
key: "role-group-members",
|
|
3276
|
-
component: /* @__PURE__ */
|
|
3420
|
+
component: /* @__PURE__ */ P(/* @__PURE__ */ G({
|
|
3277
3421
|
name: "RoleGroupMemberFormField",
|
|
3278
3422
|
__name: "RoleGroupMemberFormField",
|
|
3279
3423
|
props: { context: {} },
|
|
3280
3424
|
setup(e) {
|
|
3281
|
-
let t =
|
|
3425
|
+
let t = b(), n = e, r = q([]), i = q(!1), a = L(() => n.context.draft.roleKind === "group"), o = L(() => f(n.context.draft.memberRoleIds)), s = L(() => String(n.context.draft.id ?? "") || void 0), c = L(() => new Set(r.value.filter((e) => e.roleKind === "dataGrant" && e.id && o.value.includes(e.id)).map((e) => e.id))), l = L(() => r.value.filter((e) => e.id && e.id !== s.value).map((e) => ({
|
|
3282
3426
|
label: `${e.title ?? e.id} / ${e.roleKind === "dataGrant" ? t.t("platform.screen.RoleManagementView.data-authorization-role", "数据授权角色") : t.t("platform.screen.RoleManagementView.standard-role", "标准角色")}`,
|
|
3283
3427
|
value: e.id,
|
|
3284
3428
|
disabled: e.roleKind === "dataGrant" && c.value.size > 0 && !o.value.includes(e.id)
|
|
3285
3429
|
})));
|
|
3286
|
-
|
|
3430
|
+
X([a, () => n.context.formSessionKey], () => void u(), { immediate: !0 });
|
|
3287
3431
|
async function u() {
|
|
3288
3432
|
if (!a.value) {
|
|
3289
3433
|
r.value = [];
|
|
@@ -3337,12 +3481,12 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3337
3481
|
function f(e) {
|
|
3338
3482
|
return typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
3339
3483
|
}
|
|
3340
|
-
return (n, r) => a.value ? (
|
|
3484
|
+
return (n, r) => a.value ? (K(), B("label", ur, [V("span", null, J(Y(t).t("platform.screen.RoleManagementView.member-roles", "成员角色")), 1), U(Y(ae), {
|
|
3341
3485
|
mode: "multiple",
|
|
3342
3486
|
value: o.value,
|
|
3343
3487
|
options: l.value,
|
|
3344
3488
|
loading: i.value,
|
|
3345
|
-
placeholder:
|
|
3489
|
+
placeholder: Y(t).t("platform.screen.RoleGroupMemberSelector.select-member-roles", "请选择成员角色"),
|
|
3346
3490
|
disabled: e.context.mode === "view",
|
|
3347
3491
|
"allow-clear": "",
|
|
3348
3492
|
"onUpdate:value": d
|
|
@@ -3352,7 +3496,7 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3352
3496
|
"loading",
|
|
3353
3497
|
"placeholder",
|
|
3354
3498
|
"disabled"
|
|
3355
|
-
])])) :
|
|
3499
|
+
])])) : z("v-if", !0);
|
|
3356
3500
|
}
|
|
3357
3501
|
}), [["__scopeId", "data-v-5dd40ab2"]]),
|
|
3358
3502
|
location: {
|
|
@@ -3381,7 +3525,7 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3381
3525
|
title: "绑定用户",
|
|
3382
3526
|
titleKey: "platform.screen.RoleManagementView.assign-to-users",
|
|
3383
3527
|
width: "extraWide",
|
|
3384
|
-
component:
|
|
3528
|
+
component: On
|
|
3385
3529
|
});
|
|
3386
3530
|
}
|
|
3387
3531
|
},
|
|
@@ -3399,7 +3543,7 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3399
3543
|
title: "绑定任职",
|
|
3400
3544
|
titleKey: "platform.screen.RoleManagementView.assign-to-positions",
|
|
3401
3545
|
width: "extraWide",
|
|
3402
|
-
component:
|
|
3546
|
+
component: Ln
|
|
3403
3547
|
});
|
|
3404
3548
|
}
|
|
3405
3549
|
},
|
|
@@ -3417,21 +3561,21 @@ var Bn = { class: "panel-title" }, Vn = {
|
|
|
3417
3561
|
title: "角色授权",
|
|
3418
3562
|
titleKey: "platform.unsaved-source.RoleAuthorizationView",
|
|
3419
3563
|
width: "wide",
|
|
3420
|
-
component:
|
|
3564
|
+
component: lr
|
|
3421
3565
|
});
|
|
3422
3566
|
}
|
|
3423
3567
|
}
|
|
3424
3568
|
]
|
|
3425
3569
|
};
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3570
|
+
a("platform-admin-runtime", Je), c("platform-admin-runtime", [
|
|
3571
|
+
ht,
|
|
3572
|
+
gt,
|
|
3573
|
+
_t,
|
|
3574
|
+
Ct,
|
|
3575
|
+
At,
|
|
3576
|
+
It,
|
|
3577
|
+
Yt,
|
|
3578
|
+
dr
|
|
3435
3579
|
]);
|
|
3436
3580
|
//#endregion
|
|
3437
|
-
export {
|
|
3581
|
+
export { Kn as a, Dn as c, Gn as i, Ke as l, or as n, Bn as o, Wn as r, In as s, sr as t };
|