@ximatai/muyun-web-app 0.26.5 → 0.26.7
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/{EmployeeDetailWorkspaceView-rm9ujeiQ.js → EmployeeDetailWorkspaceView-DYJLlkSz.js} +1 -1
- package/dist/EmployeeManagementView-taxWUa7g.js +1778 -0
- package/dist/{MetadataOrchestrationView-DaPNQML7.js → MetadataOrchestrationView-B-CPudJl.js} +151 -151
- package/dist/ModuleActionManagementView-CmVj0e0C.js +597 -0
- package/dist/{RoleAuthorizationView-qQvn7M75.js → RoleAuthorizationView-q_6CsBYq.js} +194 -194
- package/dist/{RoleDetailWorkspaceView-C-vaKeZM.js → RoleDetailWorkspaceView-DmJlJgAj.js} +1 -1
- package/dist/{RoleManagementView-C3nxfub2.js → RoleManagementView-HCa9rH0f.js} +466 -466
- package/dist/{SystemUserDetailWorkspaceView-FIbfff00.js → SystemUserDetailWorkspaceView-U6Ij0US1.js} +1 -1
- package/dist/SystemUserManagementView-C1CkKivH.js +758 -0
- package/dist/{UserDetailWorkspaceView-M--ndn6x.js → UserDetailWorkspaceView-OPYvD6mH.js} +1 -1
- package/dist/{UserManagementView-MSXf4fno.js → UserManagementView-gbCL9SnC.js} +226 -226
- package/dist/index.css +1 -1
- package/dist/index.js +3309 -2288
- package/dist/pageRealtime-CzJlr9hs.js +225 -0
- package/dist/{platform-components-_3KlZZf5.js → platform-components-DKKWbNrz.js} +4196 -1790
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +33 -0
- package/dist/types/app/LoginView.vue.d.ts +4 -1
- package/dist/types/app/ThemeSkinPreferencesDialog.vue.d.ts +20 -0
- package/dist/types/app/lockedTabPreference.d.ts +6 -0
- package/dist/types/app/themeSkinPreference.d.ts +11 -0
- package/dist/types/app/workbenchRouteSync.d.ts +13 -0
- package/dist/types/app/workbenchStartup.d.ts +14 -1
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +43 -0
- package/dist/types/consumer/index.d.ts +24 -1
- package/dist/types/consumer/userPreferencePersistence.d.ts +7 -0
- package/dist/types/consumer/workbenchNavigation.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +8 -1
- package/dist/types/dynamic-page-runtime/index.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +144 -0
- package/dist/types/dynamic-page-runtime/modulePageListRefresh.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +11 -0
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +1 -0
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +1 -1
- package/dist/types/platform-admin-runtime/index.d.ts +3 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +9 -5
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +1 -36
- package/dist/types/platform-admin-runtime/workspaceViewHost.d.ts +2 -10
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +1 -17
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/DateTimeText.vue.d.ts +1 -1
- package/dist/types/platform-components/FileSizeText.vue.d.ts +10 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +70 -0
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +30 -0
- package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +16 -0
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +8 -6
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +5 -5
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +6 -6
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +29 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +8 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -0
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +33 -0
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +33 -0
- package/dist/types/platform-components/RecordPanelState.vue.d.ts +11 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +47 -2
- package/dist/types/platform-components/RecordStatusTag.vue.d.ts +6 -1
- package/dist/types/platform-components/RecordTagList.vue.d.ts +7 -0
- package/dist/types/platform-components/SingleImageFileReferenceField.vue.d.ts +23 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +25 -0
- package/dist/types/platform-components/fileTransferUpload.d.ts +43 -0
- package/dist/types/platform-components/index.d.ts +15 -1
- package/dist/types/platform-components/platformErrorFeedback.d.ts +4 -0
- package/dist/types/platform-components/platformFileSize.d.ts +10 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +12 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +24 -3
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/staticCrudManagementState.d.ts +1 -1
- package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
- package/dist/types/platform-workbench/WorkbenchBrandControl.vue.d.ts +41 -0
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +39 -1
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +2 -0
- package/dist/types/platform-workbench/WorkbenchSidebarMenuEntry.vue.d.ts +19 -0
- package/dist/types/platform-workbench/WorkspaceViewOutlet.vue.d.ts +7 -0
- package/dist/types/platform-workbench/index.d.ts +7 -0
- package/dist/types/platform-workbench/menuHoverClickIntent.d.ts +10 -0
- package/dist/types/platform-workbench/menuPointerAim.d.ts +11 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +4 -0
- package/dist/types/platform-workbench/workspaceViewContract.d.ts +20 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +8 -0
- package/dist/types/platform-workbench/workspaceViews.d.ts +21 -0
- package/dist/types/views/applicationManagementState.d.ts +1 -1
- package/dist/types/views/employeeDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/fieldSpecManagementState.d.ts +1 -1
- package/dist/types/views/fieldUiControlManagementState.d.ts +1 -1
- package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +1 -1
- package/dist/types/views/moduleActionManagementWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleAuthorizationWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/tenantManagementState.d.ts +11 -1
- package/dist/types/views/userDetailWorkspaceView.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiColorPicker.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +3 -3
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTabs.vue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/components/UiTagList.vue.d.ts +17 -0
- package/dist/types/vue-ui-antdv/components/UiThemeProvider.vue.d.ts +21 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +3 -3
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/index.d.ts +6 -0
- package/dist/types/vue-ui-antdv/theme.d.ts +58 -0
- package/dist/types/vue-ui-antdv/themeGlobalScope.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +4 -9
- package/dist/types/web-contracts/index.d.ts +168 -0
- package/dist/types/web-core/clients.d.ts +14 -1
- package/dist/types/web-core/http.d.ts +12 -1
- package/dist/types/web-core/index.d.ts +2 -0
- package/dist/types/web-core/mock.d.ts +3 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +1 -0
- package/dist/types/web-core/userPreferences.d.ts +24 -0
- package/dist/{useUserSessionRows-iAqK_cUy.js → useUserSessionRows-CBHEzRFQ.js} +2 -2
- package/dist/workspaceViewSessions-DkB9myrq.js +3252 -0
- package/package.json +1 -1
- package/dist/EmployeeManagementView-DyYMWQ64.js +0 -1706
- package/dist/ModuleActionManagementView-BFoPGqzC.js +0 -597
- package/dist/SystemUserManagementView-m6vwJDxI.js +0 -761
- package/dist/pageRealtime-4LXXvVW7.js +0 -140
- package/dist/workspaceViewSessions-DW0wbyQ_.js +0 -1448
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as pe, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as me, normalizeClass as he, normalizeProps as ge, onBeforeUnmount as _e, onMounted as
|
|
1
|
+
import { C as e, F as t, Jn as n, Mt as r, O as i, Ot as a, X as ee, bt as te, f as ne, gt as re, ht as ie, jt as o, kt as ae, lt as oe, rt as se, st as ce, tt as s, ut as le, zt as ue } from "./platform-components-DKKWbNrz.js";
|
|
2
|
+
import { i as de, n as c, r as l, s as u, t as d, x as fe } from "./workspaceViewSessions-DkB9myrq.js";
|
|
3
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as pe, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as me, normalizeClass as he, normalizeProps as ge, onBeforeUnmount as _e, onMounted as ve, openBlock as x, ref as S, renderSlot as C, resolveDynamicComponent as ye, toDisplayString as w, unref as T, watch as be, withCtx as E } from "vue";
|
|
4
4
|
//#region src/views/roleGrantClient.ts
|
|
5
|
-
function
|
|
5
|
+
function xe(e) {
|
|
6
6
|
return {
|
|
7
7
|
accountRoleGrants(t) {
|
|
8
8
|
return e.request({ path: `/iam.role/${encodeURIComponent(t)}/account-grants` });
|
|
@@ -104,7 +104,7 @@ function be(e) {
|
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/platform-admin-runtime/WorkspaceViewDrawer.vue
|
|
107
|
-
var
|
|
107
|
+
var Se = /* @__PURE__ */ b({
|
|
108
108
|
name: "WorkspaceViewDrawer",
|
|
109
109
|
__name: "WorkspaceViewDrawer",
|
|
110
110
|
props: {
|
|
@@ -115,21 +115,21 @@ var xe = /* @__PURE__ */ b({
|
|
|
115
115
|
promotion: { default: void 0 }
|
|
116
116
|
},
|
|
117
117
|
emits: ["close"],
|
|
118
|
-
setup(e, { emit:
|
|
119
|
-
let
|
|
120
|
-
return (
|
|
118
|
+
setup(e, { emit: n }) {
|
|
119
|
+
let r = e, i = n, a = p(() => r.profile === "wide-work" ? "min(600px, 100vw)" : 520);
|
|
120
|
+
return (n, r) => (x(), m(T(t), {
|
|
121
121
|
open: e.open,
|
|
122
122
|
title: e.title,
|
|
123
123
|
subtitle: e.subtitle,
|
|
124
|
-
width:
|
|
124
|
+
width: a.value,
|
|
125
125
|
promotion: e.promotion,
|
|
126
|
-
onClose:
|
|
126
|
+
onClose: r[0] ||= (e) => i("close")
|
|
127
127
|
}, _({
|
|
128
|
-
default:
|
|
128
|
+
default: E(() => [C(n.$slots, "default")]),
|
|
129
129
|
_: 2
|
|
130
|
-
}, [
|
|
130
|
+
}, [n.$slots.operation ? {
|
|
131
131
|
name: "operation",
|
|
132
|
-
fn:
|
|
132
|
+
fn: E(() => [C(n.$slots, "operation")]),
|
|
133
133
|
key: "0"
|
|
134
134
|
} : void 0]), 1032, [
|
|
135
135
|
"open",
|
|
@@ -142,30 +142,30 @@ var xe = /* @__PURE__ */ b({
|
|
|
142
142
|
});
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/views/roleAuthorizationWorkspaceSession.ts
|
|
145
|
-
function Se(e, t) {
|
|
146
|
-
return u(d, e, t);
|
|
147
|
-
}
|
|
148
145
|
function Ce(e, t) {
|
|
149
|
-
return
|
|
146
|
+
return d(u, e, t);
|
|
147
|
+
}
|
|
148
|
+
function we(e, t) {
|
|
149
|
+
return c(u, e, t);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return l(
|
|
151
|
+
function Te(e) {
|
|
152
|
+
return l(u, e);
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
|
|
156
|
-
var
|
|
156
|
+
var Ee = { class: "panel-title" }, De = {
|
|
157
157
|
key: 4,
|
|
158
158
|
class: "authorization-layout"
|
|
159
|
-
},
|
|
159
|
+
}, Oe = {
|
|
160
160
|
key: 0,
|
|
161
161
|
class: "authorization-column-header"
|
|
162
|
-
},
|
|
162
|
+
}, ke = {
|
|
163
163
|
key: 2,
|
|
164
164
|
class: "data-scope-editor"
|
|
165
|
-
},
|
|
165
|
+
}, Ae = { key: 0 }, je = { key: 1 }, Me = { key: 3 }, Ne = {
|
|
166
166
|
key: 4,
|
|
167
167
|
class: "not-applicable"
|
|
168
|
-
},
|
|
168
|
+
}, D = /*@__PURE__*/ b({
|
|
169
169
|
name: "RoleAuthorizationView",
|
|
170
170
|
__name: "RoleAuthorizationView",
|
|
171
171
|
props: {
|
|
@@ -173,19 +173,19 @@ var Te = { class: "panel-title" }, Ee = {
|
|
|
173
173
|
drawer: { type: Boolean }
|
|
174
174
|
},
|
|
175
175
|
emits: ["close"],
|
|
176
|
-
setup(
|
|
177
|
-
let
|
|
176
|
+
setup(t, { emit: n }) {
|
|
177
|
+
let r = t, c = n, l = ue({ moduleAlias: "iam.role" }), d = xe(l.http), b = r.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", C = fe(), D = r.roleId ? { roleId: r.roleId } : void 0, O = D ? Te(D) : void 0, k = S(), A = S([]), j = S(), M = S([]), N = S(), P = S(), F = S(!1), I = S(!1), L = S(!1), R = S(), z = S(), B = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map(), H = S(0), Pe, U = p(() => k.value?.roleKind === "group"), W = p(() => k.value?.roleKind === "dataGrant"), G = p(() => k.value?.assignmentType === "employment"), K = p(() => k.value?.title ?? b ?? "角色"), q = p(() => `授权:${K.value}`), Fe = p(() => Ie.value ? `动作授权 - ${Ie.value.title}` : `动作授权 - ${K.value}`), Ie = p(() => A.value.find((e) => e.moduleAlias === j.value)), Le = p(() => A.value.map((e) => ({
|
|
178
178
|
id: e.moduleAlias,
|
|
179
179
|
parentId: e.parentId,
|
|
180
180
|
title: e.title,
|
|
181
181
|
secondary: e.applicationAlias
|
|
182
|
-
}))),
|
|
182
|
+
}))), Re = p(() => (P.value?.options ?? []).map((e) => ({
|
|
183
183
|
value: e.code,
|
|
184
184
|
label: e.title
|
|
185
|
-
}))),
|
|
185
|
+
}))), ze = p(() => (P.value?.referenceDependencies ?? []).map((e) => ({
|
|
186
186
|
value: e.referenceFieldId,
|
|
187
187
|
label: `${e.title} → ${e.targetModuleTitle}`
|
|
188
|
-
}))),
|
|
188
|
+
}))), Be = p(() => new Map((P.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Ve = [
|
|
189
189
|
{
|
|
190
190
|
key: "title",
|
|
191
191
|
title: "动作",
|
|
@@ -202,7 +202,7 @@ var Te = { class: "panel-title" }, Ee = {
|
|
|
202
202
|
title: "数据范围",
|
|
203
203
|
width: 160
|
|
204
204
|
}
|
|
205
|
-
],
|
|
205
|
+
], He = [
|
|
206
206
|
{
|
|
207
207
|
key: "title",
|
|
208
208
|
title: "标准动作",
|
|
@@ -219,131 +219,131 @@ var Te = { class: "panel-title" }, Ee = {
|
|
|
219
219
|
title: "数据范围",
|
|
220
220
|
width: 160
|
|
221
221
|
}
|
|
222
|
-
],
|
|
222
|
+
], Ue = p(() => M.value), We = p(() => N.value?.actions ?? []), J = p(() => r.drawer === !0 || !!D && C?.presentation === "drawer"), Y = p(() => !!D), Ge = p(() => J.value ? Se : Y.value ? i : "div"), Ke = p(() => J.value ? {
|
|
223
223
|
open: !0,
|
|
224
|
-
title:
|
|
225
|
-
profile:
|
|
226
|
-
promotion:
|
|
227
|
-
onClose:
|
|
228
|
-
} :
|
|
229
|
-
let e =
|
|
230
|
-
return !e ||
|
|
231
|
-
}),
|
|
232
|
-
view:
|
|
233
|
-
input: () =>
|
|
234
|
-
title:
|
|
224
|
+
title: q.value,
|
|
225
|
+
profile: u.drawerProfile,
|
|
226
|
+
promotion: Ze.value,
|
|
227
|
+
onClose: dt
|
|
228
|
+
} : Y.value ? { title: q.value } : {}), qe = p(() => {
|
|
229
|
+
let e = N.value;
|
|
230
|
+
return !e || z.value === void 0 ? !1 : JSON.stringify(e.actions) !== z.value;
|
|
231
|
+
}), Je = p(() => H.value >= 0 && [...B.entries()].some(([e, t]) => V.get(e) !== JSON.stringify(t))), X = p(() => qe.value || Je.value), Ye = p(() => M.value.length > 0 && M.value.every((e) => e.granted)), Xe = p(() => M.value.some((e) => e.granted) && !Ye.value), Ze = de({
|
|
232
|
+
view: u,
|
|
233
|
+
input: () => D,
|
|
234
|
+
title: q,
|
|
235
235
|
eligibility: () => ({
|
|
236
|
-
hasStableIdentity: !!(b &&
|
|
237
|
-
busy:
|
|
236
|
+
hasStableIdentity: !!(b && k.value),
|
|
237
|
+
busy: L.value
|
|
238
238
|
}),
|
|
239
|
-
beforePromote: (e) =>
|
|
240
|
-
selectedModuleAlias:
|
|
241
|
-
dataGrantMatrix:
|
|
242
|
-
actionDrafts: [...
|
|
239
|
+
beforePromote: (e) => Ce(e, {
|
|
240
|
+
selectedModuleAlias: j.value,
|
|
241
|
+
dataGrantMatrix: N.value,
|
|
242
|
+
actionDrafts: [...B.entries()].map(([e, t]) => ({
|
|
243
243
|
moduleAlias: e,
|
|
244
244
|
actions: t
|
|
245
245
|
})),
|
|
246
|
-
actionSnapshots: [...
|
|
246
|
+
actionSnapshots: [...V.entries()].map(([e, t]) => ({
|
|
247
247
|
moduleAlias: e,
|
|
248
248
|
snapshot: t
|
|
249
249
|
}))
|
|
250
250
|
}).then((e) => e === "accepted"),
|
|
251
|
-
onPromoted:
|
|
251
|
+
onPromoted: ft,
|
|
252
252
|
onPromotionRejected: () => se("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
|
|
253
253
|
source: "role-authorization",
|
|
254
254
|
phase: "validation"
|
|
255
255
|
})
|
|
256
256
|
});
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}),
|
|
260
|
-
|
|
261
|
-
}, { immediate: !0 }),
|
|
262
|
-
|
|
257
|
+
ve(() => {
|
|
258
|
+
D && !J.value && (Pe = we(D, pt)), Z();
|
|
259
|
+
}), be(q, (e) => {
|
|
260
|
+
Y.value && C?.setTitle(e);
|
|
261
|
+
}, { immediate: !0 }), be(j, () => void Qe()), ve(() => window.addEventListener("beforeunload", $)), _e(() => {
|
|
262
|
+
Pe?.(), window.removeEventListener("beforeunload", $);
|
|
263
263
|
});
|
|
264
|
-
async function
|
|
264
|
+
async function Z() {
|
|
265
265
|
if (!b) {
|
|
266
|
-
|
|
266
|
+
R.value = "缺少角色标识,无法打开授权页。";
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
|
-
|
|
269
|
+
F.value = !0, R.value = void 0;
|
|
270
270
|
try {
|
|
271
|
-
if (
|
|
272
|
-
if (
|
|
273
|
-
let [e, t] = await Promise.all([
|
|
274
|
-
|
|
271
|
+
if (k.value = await l.crud.view(b), k.value.roleKind === "group") return;
|
|
272
|
+
if (k.value.roleKind === "dataGrant") {
|
|
273
|
+
let [e, t] = await Promise.all([d.dataGrantActionMatrix(b), d.dataScopePolicyCatalog(b)]);
|
|
274
|
+
N.value = O?.dataGrantMatrix ?? e, P.value = t, z.value = JSON.stringify(e.actions);
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
A.value = (await d.authorizationModules(b)).records, j.value = O?.selectedModuleAlias ?? A.value[0]?.moduleAlias;
|
|
278
278
|
} catch (e) {
|
|
279
|
-
|
|
279
|
+
R.value = "授权信息加载失败,请重试。", s(e, {
|
|
280
280
|
source: "role-authorization",
|
|
281
281
|
phase: "load"
|
|
282
282
|
});
|
|
283
283
|
} finally {
|
|
284
|
-
|
|
284
|
+
F.value = !1;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
async function
|
|
288
|
-
let e =
|
|
289
|
-
if (!(!e ||
|
|
290
|
-
|
|
287
|
+
async function Qe() {
|
|
288
|
+
let e = j.value;
|
|
289
|
+
if (!(!e || W.value || U.value)) {
|
|
290
|
+
I.value = !0;
|
|
291
291
|
try {
|
|
292
|
-
let [t, n] = await Promise.all([
|
|
293
|
-
|
|
292
|
+
let [t, n] = await Promise.all([d.permissionMatrix(b, [e]), d.dataScopePolicyCatalog(b, e)]), r = (t.modules[0]?.actions ?? []).map(ct), i = O?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions;
|
|
293
|
+
M.value = B.get(e) ?? i ?? r, B.has(e) || (B.set(e, M.value), V.set(e, O?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), H.value += 1, P.value = n;
|
|
294
294
|
} catch (e) {
|
|
295
|
-
|
|
295
|
+
s(e, {
|
|
296
296
|
source: "role-authorization",
|
|
297
297
|
phase: "load"
|
|
298
298
|
});
|
|
299
299
|
} finally {
|
|
300
|
-
|
|
300
|
+
I.value = !1;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
t && e.dataAuth &&
|
|
304
|
+
function $e(e, t) {
|
|
305
|
+
t && e.dataAuth && G.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, H.value += 1;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
307
|
+
function et(e) {
|
|
308
|
+
M.value.forEach((t) => $e(t, e));
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function tt(e, t) {
|
|
311
311
|
if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
|
|
312
|
-
e.referenceFieldId = void 0, e.referenceActionCode = void 0,
|
|
312
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, H.value += 1;
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
|
-
e.referenceFieldId = void 0, e.referenceActionCode = void 0,
|
|
315
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, H.value += 1;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
let n =
|
|
319
|
-
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode,
|
|
320
|
-
}
|
|
321
|
-
function nt(e) {
|
|
322
|
-
return ze.value.get(String(e || ""));
|
|
317
|
+
function nt(e, t) {
|
|
318
|
+
let n = Be.value.get(String(t || ""));
|
|
319
|
+
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, H.value += 1;
|
|
323
320
|
}
|
|
324
321
|
function rt(e) {
|
|
325
|
-
return
|
|
322
|
+
return Be.value.get(String(e || ""));
|
|
326
323
|
}
|
|
327
324
|
function it(e) {
|
|
328
|
-
return e
|
|
325
|
+
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
329
326
|
}
|
|
330
327
|
function at(e) {
|
|
331
|
-
return
|
|
328
|
+
return e.dataScopePolicy ?? "inheritDataGrant";
|
|
329
|
+
}
|
|
330
|
+
function ot(e) {
|
|
331
|
+
return !!e.dataAuth && G.value;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
return e.key === "dataScopePolicy" &&
|
|
333
|
+
function st(e, t) {
|
|
334
|
+
return e.key === "dataScopePolicy" && ot(t);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function ct(e) {
|
|
337
|
+
return G.value && e.dataAuth && e.dataScopePolicy === "none" ? {
|
|
338
338
|
...e,
|
|
339
339
|
dataScopePolicy: "inheritDataGrant"
|
|
340
340
|
} : e;
|
|
341
341
|
}
|
|
342
|
-
async function
|
|
343
|
-
if (
|
|
344
|
-
|
|
342
|
+
async function lt() {
|
|
343
|
+
if (N.value) {
|
|
344
|
+
L.value = !0;
|
|
345
345
|
try {
|
|
346
|
-
await
|
|
346
|
+
await ee(await d.replaceDataGrantActions(b, N.value.actions.map((e) => ({
|
|
347
347
|
actionCode: e.actionCode,
|
|
348
348
|
dataScopePolicy: e.dataScopePolicy,
|
|
349
349
|
enabled: e.configured
|
|
@@ -351,123 +351,123 @@ var Te = { class: "panel-title" }, Ee = {
|
|
|
351
351
|
source: "role-authorization",
|
|
352
352
|
phase: "action",
|
|
353
353
|
fallbackMessage: "数据权限模板已保存"
|
|
354
|
-
}),
|
|
354
|
+
}), z.value = JSON.stringify(N.value.actions);
|
|
355
355
|
} catch (e) {
|
|
356
|
-
|
|
356
|
+
s(e, {
|
|
357
357
|
source: "role-authorization",
|
|
358
358
|
phase: "action"
|
|
359
359
|
});
|
|
360
360
|
} finally {
|
|
361
|
-
|
|
361
|
+
L.value = !1;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
366
|
-
let e = [...
|
|
365
|
+
async function ut() {
|
|
366
|
+
let e = [...B.entries()].filter(([e, t]) => V.get(e) !== JSON.stringify(t));
|
|
367
367
|
if (e.length) {
|
|
368
|
-
|
|
368
|
+
L.value = !0;
|
|
369
369
|
try {
|
|
370
|
-
await
|
|
370
|
+
await ee(await d.replacePermissionMatrix(b, e.flatMap(([e, t]) => t.map((t) => ({
|
|
371
371
|
moduleAlias: e,
|
|
372
372
|
actionCode: t.actionCode,
|
|
373
373
|
granted: !!t.granted,
|
|
374
|
-
dataScopePolicy: t.granted && t.dataAuth &&
|
|
374
|
+
dataScopePolicy: t.granted && t.dataAuth && G.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
|
|
375
375
|
referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
|
|
376
376
|
referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
|
|
377
377
|
})))), {
|
|
378
378
|
source: "role-authorization",
|
|
379
379
|
phase: "action",
|
|
380
380
|
fallbackMessage: "角色授权已保存"
|
|
381
|
-
}), e.forEach(([e, t]) =>
|
|
381
|
+
}), e.forEach(([e, t]) => V.set(e, JSON.stringify(t))), H.value += 1;
|
|
382
382
|
} catch (e) {
|
|
383
|
-
|
|
383
|
+
s(e, {
|
|
384
384
|
source: "role-authorization",
|
|
385
385
|
phase: "action"
|
|
386
386
|
});
|
|
387
387
|
} finally {
|
|
388
|
-
|
|
388
|
+
L.value = !1;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
async function
|
|
393
|
-
if (
|
|
394
|
-
await
|
|
392
|
+
async function Q() {
|
|
393
|
+
if (W.value) {
|
|
394
|
+
await lt();
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
|
-
await
|
|
397
|
+
await ut();
|
|
398
398
|
}
|
|
399
|
-
async function
|
|
400
|
-
|
|
399
|
+
async function dt() {
|
|
400
|
+
X.value && !await ce({
|
|
401
401
|
title: "放弃未确认的授权配置",
|
|
402
402
|
content: "当前修改尚未确认,关闭后将丢失这些修改。",
|
|
403
403
|
okText: "放弃修改",
|
|
404
404
|
danger: !0
|
|
405
|
-
}) ||
|
|
405
|
+
}) || mt();
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
407
|
+
function ft() {
|
|
408
|
+
mt();
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
return
|
|
410
|
+
function pt(e) {
|
|
411
|
+
return X.value ? !1 : (j.value = e.selectedModuleAlias, N.value = e.dataGrantMatrix, B.clear(), V.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => B.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => V.set(e, t)), H.value += 1, !0);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
if (
|
|
415
|
-
|
|
413
|
+
function mt() {
|
|
414
|
+
if (r.drawer === !0) {
|
|
415
|
+
c("close");
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
C?.dismiss();
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
|
|
420
|
+
function $(e) {
|
|
421
|
+
X.value && (e.preventDefault(), e.returnValue = "");
|
|
422
422
|
}
|
|
423
|
-
return (
|
|
424
|
-
default:
|
|
423
|
+
return (t, n) => (x(), m(ye(Ge.value), ge(me(Ke.value)), _({
|
|
424
|
+
default: E(() => [g("section", { class: he(["role-authorization-page", { "role-authorization-page--drawer": J.value }]) }, [F.value ? (x(), m(T(le), {
|
|
425
425
|
key: 0,
|
|
426
426
|
tip: "加载授权信息"
|
|
427
|
-
})) :
|
|
427
|
+
})) : R.value ? (x(), m(T(oe), {
|
|
428
428
|
key: 1,
|
|
429
429
|
title: "授权页加载失败",
|
|
430
|
-
message:
|
|
431
|
-
}, null, 8, ["message"])) :
|
|
430
|
+
message: R.value
|
|
431
|
+
}, null, 8, ["message"])) : U.value ? (x(), m(T(re), {
|
|
432
432
|
key: 2,
|
|
433
433
|
title: "角色组不独立授权",
|
|
434
434
|
description: "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。"
|
|
435
|
-
})) :
|
|
435
|
+
})) : W.value && N.value ? (x(), m(T(e), {
|
|
436
436
|
key: 3,
|
|
437
437
|
class: "data-grant-content",
|
|
438
|
-
title:
|
|
438
|
+
title: Y.value ? "数据权限模板" : `数据权限模板 - ${K.value}`,
|
|
439
439
|
searchable: !1,
|
|
440
|
-
onRefresh:
|
|
440
|
+
onRefresh: Z
|
|
441
441
|
}, {
|
|
442
|
-
default:
|
|
442
|
+
default: E(() => [g("header", Ee, [n[3] ||= g("div", null, [g("h3", null, "标准动作的数据范围模板"), g("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), Y.value ? pe("v-if", !0) : (x(), m(T(o), {
|
|
443
443
|
key: 0,
|
|
444
444
|
type: "primary",
|
|
445
|
-
disabled: !
|
|
446
|
-
loading:
|
|
447
|
-
onClick:
|
|
445
|
+
disabled: !X.value,
|
|
446
|
+
loading: L.value,
|
|
447
|
+
onClick: Q
|
|
448
448
|
}, {
|
|
449
|
-
default:
|
|
449
|
+
default: E(() => [...n[2] ||= [v(" 确认 ", -1)]]),
|
|
450
450
|
_: 1
|
|
451
|
-
}, 8, ["disabled", "loading"]))]), y(
|
|
452
|
-
columns:
|
|
453
|
-
rows:
|
|
451
|
+
}, 8, ["disabled", "loading"]))]), y(T(ie), {
|
|
452
|
+
columns: He,
|
|
453
|
+
rows: We.value,
|
|
454
454
|
"row-key": "actionCode",
|
|
455
455
|
"horizontal-scroll": ""
|
|
456
456
|
}, {
|
|
457
|
-
cell:
|
|
457
|
+
cell: E(({ column: e, record: t }) => [e.key === "title" ? (x(), h(f, { key: 0 }, [g("strong", null, w(t.title || t.actionCode), 1), g("small", null, w(t.actionCode), 1)], 64)) : e.key === "configured" ? (x(), m(T(te), {
|
|
458
458
|
key: 1,
|
|
459
459
|
checked: !!t.configured,
|
|
460
|
-
disabled:
|
|
460
|
+
disabled: L.value,
|
|
461
461
|
onChange: (e) => t.configured = e
|
|
462
462
|
}, null, 8, [
|
|
463
463
|
"checked",
|
|
464
464
|
"disabled",
|
|
465
465
|
"onChange"
|
|
466
|
-
])) : (
|
|
466
|
+
])) : (x(), m(T(a), {
|
|
467
467
|
key: 2,
|
|
468
468
|
value: t.dataScopePolicy,
|
|
469
|
-
options:
|
|
470
|
-
disabled: !t.configured ||
|
|
469
|
+
options: Re.value,
|
|
470
|
+
disabled: !t.configured || L.value,
|
|
471
471
|
placeholder: "请选择数据范围",
|
|
472
472
|
"allow-clear": !1,
|
|
473
473
|
"onUpdate:value": (e) => t.dataScopePolicy = String(e || "")
|
|
@@ -480,113 +480,113 @@ var Te = { class: "panel-title" }, Ee = {
|
|
|
480
480
|
_: 1
|
|
481
481
|
}, 8, ["rows"])]),
|
|
482
482
|
_: 1
|
|
483
|
-
}, 8, ["title"])) : (
|
|
483
|
+
}, 8, ["title"])) : (x(), h("section", De, [y(T(e), {
|
|
484
484
|
class: "module-panel",
|
|
485
485
|
title: "模块树",
|
|
486
486
|
"refresh-title": "刷新模块目录",
|
|
487
487
|
searchable: !1,
|
|
488
|
-
onRefresh:
|
|
488
|
+
onRefresh: Z
|
|
489
489
|
}, {
|
|
490
|
-
default:
|
|
491
|
-
records:
|
|
492
|
-
"selected-id":
|
|
493
|
-
onSelect:
|
|
490
|
+
default: E(() => [y(T(ne), {
|
|
491
|
+
records: Le.value,
|
|
492
|
+
"selected-id": j.value,
|
|
493
|
+
onSelect: n[0] ||= (e) => j.value = e.id
|
|
494
494
|
}, null, 8, ["records", "selected-id"])]),
|
|
495
495
|
_: 1
|
|
496
|
-
}), y(
|
|
496
|
+
}), y(T(e), {
|
|
497
497
|
class: "action-panel",
|
|
498
|
-
title:
|
|
498
|
+
title: Fe.value,
|
|
499
499
|
searchable: !1
|
|
500
500
|
}, _({
|
|
501
|
-
default:
|
|
501
|
+
default: E(() => [I.value ? (x(), m(T(le), {
|
|
502
502
|
key: 0,
|
|
503
503
|
tip: "加载模块动作"
|
|
504
|
-
})) :
|
|
504
|
+
})) : j.value ? (x(), m(T(ie), {
|
|
505
505
|
key: 2,
|
|
506
|
-
columns:
|
|
507
|
-
rows:
|
|
506
|
+
columns: Ve,
|
|
507
|
+
rows: Ue.value,
|
|
508
508
|
"row-key": "actionCode",
|
|
509
509
|
"fill-height": "",
|
|
510
510
|
"horizontal-scroll": ""
|
|
511
511
|
}, {
|
|
512
|
-
header:
|
|
513
|
-
checked:
|
|
514
|
-
indeterminate:
|
|
515
|
-
disabled:
|
|
512
|
+
header: E(({ column: e }) => [e.key === "granted" ? (x(), h("span", Oe, [y(T(ae), {
|
|
513
|
+
checked: Ye.value,
|
|
514
|
+
indeterminate: Xe.value,
|
|
515
|
+
disabled: L.value || !M.value.length,
|
|
516
516
|
"aria-label": "全选当前模块动作授权",
|
|
517
|
-
onChange:
|
|
517
|
+
onChange: et
|
|
518
518
|
}, null, 8, [
|
|
519
519
|
"checked",
|
|
520
520
|
"indeterminate",
|
|
521
521
|
"disabled"
|
|
522
|
-
]),
|
|
523
|
-
cell:
|
|
522
|
+
]), n[5] ||= v(" 授权 ", -1)])) : (x(), h(f, { key: 1 }, [v(w(e.title), 1)], 64))]),
|
|
523
|
+
cell: E(({ column: e, record: t }) => [e.key === "title" ? (x(), h(f, { key: 0 }, [g("strong", null, w(t.title || t.actionCode), 1), g("small", null, w(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (x(), m(T(ae), {
|
|
524
524
|
key: 1,
|
|
525
525
|
checked: !!t.granted,
|
|
526
|
-
disabled:
|
|
527
|
-
onChange: (e) =>
|
|
526
|
+
disabled: L.value,
|
|
527
|
+
onChange: (e) => $e(t, e)
|
|
528
528
|
}, null, 8, [
|
|
529
529
|
"checked",
|
|
530
530
|
"disabled",
|
|
531
531
|
"onChange"
|
|
532
|
-
])) : t.dataAuth &&
|
|
533
|
-
value:
|
|
534
|
-
options:
|
|
535
|
-
disabled:
|
|
532
|
+
])) : t.dataAuth && G.value && t.granted ? (x(), h("div", ke, [y(T(a), {
|
|
533
|
+
value: at(t),
|
|
534
|
+
options: Re.value,
|
|
535
|
+
disabled: L.value,
|
|
536
536
|
"allow-clear": !1,
|
|
537
|
-
"onUpdate:value": (e) =>
|
|
537
|
+
"onUpdate:value": (e) => tt(t, e)
|
|
538
538
|
}, null, 8, [
|
|
539
539
|
"value",
|
|
540
540
|
"options",
|
|
541
541
|
"disabled",
|
|
542
542
|
"onUpdate:value"
|
|
543
|
-
]), t.dataScopePolicy === "referenceDependency" ? (
|
|
544
|
-
value:
|
|
545
|
-
options:
|
|
546
|
-
disabled:
|
|
543
|
+
]), t.dataScopePolicy === "referenceDependency" ? (x(), h(f, { key: 0 }, [y(T(a), {
|
|
544
|
+
value: it(t.referenceFieldId),
|
|
545
|
+
options: ze.value,
|
|
546
|
+
disabled: L.value,
|
|
547
547
|
placeholder: "请选择引用字段",
|
|
548
548
|
"allow-clear": !1,
|
|
549
|
-
"onUpdate:value": (e) =>
|
|
549
|
+
"onUpdate:value": (e) => nt(t, e)
|
|
550
550
|
}, null, 8, [
|
|
551
551
|
"value",
|
|
552
552
|
"options",
|
|
553
553
|
"disabled",
|
|
554
554
|
"onUpdate:value"
|
|
555
|
-
]), t.referenceFieldId ? (
|
|
555
|
+
]), t.referenceFieldId ? (x(), h("small", Ae, " 依赖目标:" + w(rt(t.referenceFieldId)?.targetModuleTitle) + " · " + w(rt(t.referenceFieldId)?.referenceActionTitle), 1)) : (x(), h("small", je, "请先选择引用字段,再开启该动作授权。"))], 64)) : pe("v-if", !0)])) : st(e, t) ? (x(), h("span", Me, "—")) : (x(), h("span", Ne, "不适用"))]),
|
|
556
556
|
_: 1
|
|
557
|
-
}, 8, ["rows"])) : (
|
|
557
|
+
}, 8, ["rows"])) : (x(), m(T(re), {
|
|
558
558
|
key: 1,
|
|
559
559
|
title: "请选择模块"
|
|
560
560
|
}))]),
|
|
561
561
|
_: 2
|
|
562
|
-
}, [
|
|
562
|
+
}, [Y.value ? void 0 : {
|
|
563
563
|
name: "actions",
|
|
564
|
-
fn:
|
|
564
|
+
fn: E(() => [y(T(o), {
|
|
565
565
|
type: "primary",
|
|
566
|
-
disabled: !
|
|
567
|
-
loading:
|
|
568
|
-
onClick:
|
|
566
|
+
disabled: !X.value,
|
|
567
|
+
loading: L.value,
|
|
568
|
+
onClick: Q
|
|
569
569
|
}, {
|
|
570
|
-
default:
|
|
570
|
+
default: E(() => [...n[4] ||= [v(" 确认 ", -1)]]),
|
|
571
571
|
_: 1
|
|
572
572
|
}, 8, ["disabled", "loading"])]),
|
|
573
573
|
key: "0"
|
|
574
574
|
}]), 1032, ["title"])]))], 2)]),
|
|
575
575
|
_: 2
|
|
576
|
-
}, [
|
|
576
|
+
}, [Y.value && !U.value ? {
|
|
577
577
|
name: "operation",
|
|
578
|
-
fn:
|
|
578
|
+
fn: E(() => [y(T(o), {
|
|
579
579
|
type: "primary",
|
|
580
|
-
disabled: !
|
|
581
|
-
loading:
|
|
582
|
-
onClick:
|
|
580
|
+
disabled: !X.value,
|
|
581
|
+
loading: L.value,
|
|
582
|
+
onClick: Q
|
|
583
583
|
}, {
|
|
584
|
-
default:
|
|
584
|
+
default: E(() => [...n[1] ||= [v(" 确认 ", -1)]]),
|
|
585
585
|
_: 1
|
|
586
586
|
}, 8, ["disabled", "loading"])]),
|
|
587
587
|
key: "0"
|
|
588
588
|
} : void 0]), 1040));
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
590
|
+
}), O = /* @__PURE__ */ n({ default: () => k }), k = /*#__PURE__*/ r(D, [["__scopeId", "data-v-3023b71d"]]);
|
|
591
591
|
//#endregion
|
|
592
|
-
export {
|
|
592
|
+
export { O as n, xe as r, k as t };
|