@ximatai/muyun-web-app 0.26.9 → 0.26.10
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/{MetadataOrchestrationView-CzhAgEdX.js → MetadataOrchestrationView-BhtVwJII.js} +182 -182
- package/dist/{ModuleActionManagementView-CM2d8jPO.js → ModuleActionManagementView-DpZS-xAD.js} +70 -70
- package/dist/RoleAuthorizationView-8lilhtMB.js +646 -0
- package/dist/{RoleDetailWorkspaceView-CzaQ3Dz1.js → RoleDetailWorkspaceView-CFha6JHn.js} +1 -1
- package/dist/{RoleManagementView-nY7qu4GF.js → RoleManagementView-0_KDrzgh.js} +511 -514
- package/dist/index.css +1 -1
- package/dist/index.js +282 -302
- package/dist/{platform-components-CIi6GdC9.js → platform-components-oRIsIoxu.js} +2060 -1893
- package/dist/types/app/StaticRoutePageHost.vue.d.ts +2 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
- package/dist/types/consumer/index.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +7 -2
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +69 -15
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +3 -2
- package/dist/types/dynamic-page-runtime/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +35 -3
- package/dist/types/dynamic-page-runtime/navigatorEntrySelection.d.ts +18 -0
- package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/pageNavigatorItemModel.d.ts +13 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +9 -8
- package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +6 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +4 -0
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +5 -3
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +7 -1
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +2 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +4 -0
- package/dist/types/platform-components/index.d.ts +0 -2
- package/dist/types/platform-components/recordFormFieldModel.d.ts +16 -2
- package/dist/types/platform-components/recordPickerConstraints.d.ts +2 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +4 -2
- package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +4 -2
- package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +2 -0
- package/dist/types/web-contracts/index.d.ts +72 -2
- package/dist/types/web-core/http.d.ts +6 -0
- package/dist/types/web-core/module/index.d.ts +1 -1
- package/dist/types/web-core/module/moduleContext.d.ts +2 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +6 -0
- package/dist/types/web-core/realtime.d.ts +8 -0
- package/dist/{workspaceViews-CkERhK0K.js → workspaceViews-D-RiJ64o.js} +3341 -3011
- package/package.json +1 -1
- package/dist/DictionaryManagementView-CtIQpqVA.js +0 -1035
- package/dist/MenuManagementView-DJhkN2sG.js +0 -837
- package/dist/RoleAuthorizationView-jn_WUCeg.js +0 -599
- package/dist/SystemUserDetailWorkspaceView-CBvqmWvP.js +0 -17
- package/dist/SystemUserManagementView-AEomKvK7.js +0 -887
- package/dist/currentUserContext-B1lj1WgF.js +0 -11
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +0 -6
- package/dist/types/views/DictionaryManagementView.vue.d.ts +0 -3
- package/dist/types/views/MenuManagementView.vue.d.ts +0 -3
- package/dist/types/views/SystemUserDetailWorkspaceView.vue.d.ts +0 -7
- package/dist/types/views/SystemUserManagementView.vue.d.ts +0 -7
- package/dist/types/views/dictionaryManagementState.d.ts +0 -215
- package/dist/types/views/menuManagementState.d.ts +0 -180
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +0 -12
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +0 -5
- package/dist/workspaceViewSessions-B5g4M0rT.js +0 -51
|
@@ -1,1035 +0,0 @@
|
|
|
1
|
-
import { Et as e, G as t, Kt as n, O as r, Qt as i, V as a, X as ee, _t as te, b as o, cn as s, ct as c, dr as ne, dt as l, ft as re, g as u, h as ie, lt as d, mt as f, n as p, o as m, st as h, u as g, ur as ae, ut as _, vt as v, x as oe, y } from "./platform-components-CIi6GdC9.js";
|
|
2
|
-
import { Transition as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createVNode as E, defineComponent as D, onMounted as se, openBlock as O, ref as k, toDisplayString as ce, unref as A, watch as j, withCtx as M, withModifiers as le } from "vue";
|
|
3
|
-
//#region src/views/dictionaryManagementState.ts
|
|
4
|
-
function ue(e, t, n, r, i, a = {}) {
|
|
5
|
-
let ee = k(0), te = k(0), o = k([]), s = p({
|
|
6
|
-
viewMode: "view",
|
|
7
|
-
createMode: "create-root",
|
|
8
|
-
editMode: "edit",
|
|
9
|
-
emptyDraft: () => F(void 0, r()),
|
|
10
|
-
copyRecord: pe
|
|
11
|
-
}), u = s.selected, ie = s.draft, m = s.mode, g = k(!1), v = k(), oe = Ge(), y = k([]), b = p({
|
|
12
|
-
viewMode: "view",
|
|
13
|
-
createMode: "create",
|
|
14
|
-
editMode: "edit",
|
|
15
|
-
emptyDraft: () => R(u.value),
|
|
16
|
-
copyRecord: z
|
|
17
|
-
}), S = b.selected, C = b.draft, w = b.mode, T = k(!1), E = k(!1), D = k(), se = Ke(), O = x(() => u.value?.id), ce = x(() => N(u.value)), A = x(() => de(u.value)), j = x(() => e.can("create") === !0), M = x(() => e.can("update") === !0), le = x(() => e.can("delete") === !0), ue = x(() => u.value?.id ? e.can(me(u.value)) === !0 : !1), fe = x(() => e.can("item_query") === !0), H = x(() => e.can("item_tree") === !0), U = x(() => e.can("item_create") === !0), W = x(() => e.can("item_update") === !0), ge = x(() => e.can("item_delete") === !0), _e = x(() => S.value?.id ? e.can(he(S.value)) === !0 : !1), ve = s.readonly, ye = b.readonly, be = x(() => m.value === "create-root" ? "新建字典类目" : m.value === "create-child" ? `新建下级:${ce.value}` : N(u.value)), xe = x(() => w.value === "create" ? "新建字典项" : P(S.value));
|
|
18
|
-
function G(e) {
|
|
19
|
-
o.value = e;
|
|
20
|
-
let t = u.value?.id ? e.find((e) => e.id === u.value?.id) : void 0;
|
|
21
|
-
if (m.value !== "view") {
|
|
22
|
-
t && s.replaceSelected(t);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
let n = t ?? e[0];
|
|
26
|
-
n ? s.select(n) : s.clearSelection(), m.value = "view", K();
|
|
27
|
-
}
|
|
28
|
-
function Se(e) {
|
|
29
|
-
s.select(e), K(), Y(), X();
|
|
30
|
-
}
|
|
31
|
-
function Ce() {
|
|
32
|
-
if (!j.value) {
|
|
33
|
-
Q("当前用户无权新增字典类目");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
s.startCreate({
|
|
37
|
-
preserveSelection: !0,
|
|
38
|
-
draft: () => F(void 0, r())
|
|
39
|
-
}), Y();
|
|
40
|
-
}
|
|
41
|
-
function we() {
|
|
42
|
-
if (!j.value) {
|
|
43
|
-
Q("当前用户无权新增字典类目");
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (!u.value?.id) {
|
|
47
|
-
Q("请先选择上级类目");
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
let e = u.value.id;
|
|
51
|
-
s.startCreate({
|
|
52
|
-
mode: "create-child",
|
|
53
|
-
preserveSelection: !0,
|
|
54
|
-
draft: () => F(e, r())
|
|
55
|
-
}), Y();
|
|
56
|
-
}
|
|
57
|
-
function Te() {
|
|
58
|
-
if (u.value) {
|
|
59
|
-
if (!M.value) {
|
|
60
|
-
Q("当前用户无权编辑字典类目");
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
s.startEdit(), Y();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function Ee() {
|
|
67
|
-
s.cancel(), Y();
|
|
68
|
-
}
|
|
69
|
-
async function De() {
|
|
70
|
-
if (g.value || m.value === "view") return;
|
|
71
|
-
if (m.value.startsWith("create") ? !j.value : !M.value) {
|
|
72
|
-
Q("当前用户无权保存字典类目");
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let n = I(ie.value, r());
|
|
76
|
-
if (!L(n)) {
|
|
77
|
-
Q("应用 alias、类目 alias 和类目名称不能为空");
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
Y(), g.value = !0;
|
|
81
|
-
try {
|
|
82
|
-
await e.runtime.ready;
|
|
83
|
-
let r = t(), i = m.value === "edit" && n.id ? await r.update(n.id, n) : await r.insert(n), a = i.record;
|
|
84
|
-
s.select(a), await Ue(i, [_.closeEditor(), _.refreshList()]), K();
|
|
85
|
-
} catch (e) {
|
|
86
|
-
Ve(e);
|
|
87
|
-
} finally {
|
|
88
|
-
g.value = !1;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
async function Oe() {
|
|
92
|
-
if (!(!u.value?.id || g.value)) {
|
|
93
|
-
if (!ue.value) {
|
|
94
|
-
Q("当前用户无权变更字典类目启停状态");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
Y(), g.value = !0;
|
|
98
|
-
try {
|
|
99
|
-
await e.runtime.ready;
|
|
100
|
-
let n = t(), r = u.value.enabled === !1 ? await n.enable(u.value.id, { version: u.value.version }) : await n.disable(u.value.id, { version: u.value.version });
|
|
101
|
-
s.select(await t().view(u.value.id)), await Ue(r, [_.refreshList()]);
|
|
102
|
-
} catch (e) {
|
|
103
|
-
Ve(e);
|
|
104
|
-
} finally {
|
|
105
|
-
g.value = !1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async function ke() {
|
|
110
|
-
if (!(!u.value?.id || g.value)) {
|
|
111
|
-
if (!le.value) {
|
|
112
|
-
Q("当前用户无权删除字典类目");
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (await i({
|
|
116
|
-
title: "删除字典类目",
|
|
117
|
-
content: `确认删除类目「${N(u.value)}」?`,
|
|
118
|
-
okText: "删除",
|
|
119
|
-
danger: !0
|
|
120
|
-
})) {
|
|
121
|
-
Y(), g.value = !0;
|
|
122
|
-
try {
|
|
123
|
-
await e.runtime.ready, await Ue(await t().delete(u.value.id, { version: u.value.version }), [_.clearSelection(), _.refreshList()]), K();
|
|
124
|
-
} catch (e) {
|
|
125
|
-
Ve(e);
|
|
126
|
-
} finally {
|
|
127
|
-
g.value = !1;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
async function Ae() {
|
|
133
|
-
if (!O.value || !A.value) {
|
|
134
|
-
y.value = [], q();
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (!H.value) {
|
|
138
|
-
y.value = [], D.value = void 0, q();
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
T.value = !0, D.value = void 0;
|
|
142
|
-
try {
|
|
143
|
-
y.value = (await J().treeFlat()).records, q();
|
|
144
|
-
} catch (e) {
|
|
145
|
-
Z(e);
|
|
146
|
-
} finally {
|
|
147
|
-
T.value = !1;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function je(e) {
|
|
151
|
-
y.value = e, q();
|
|
152
|
-
}
|
|
153
|
-
function Me(e) {
|
|
154
|
-
b.select(e), X();
|
|
155
|
-
}
|
|
156
|
-
function Ne() {
|
|
157
|
-
if (!O.value || !A.value) {
|
|
158
|
-
$("请先选择可绑定的字典类目");
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (!U.value) {
|
|
162
|
-
$("当前用户无权新增字典项");
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
b.startCreate({ preserveSelection: !0 }), X();
|
|
166
|
-
}
|
|
167
|
-
function Pe(e) {
|
|
168
|
-
if (!O.value || !A.value) {
|
|
169
|
-
$("请先选择可绑定的字典类目");
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (e.id) {
|
|
173
|
-
if (!U.value) {
|
|
174
|
-
$("当前用户无权新增字典项");
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
b.startCreate({
|
|
178
|
-
selectedRecord: e,
|
|
179
|
-
draft: () => ({
|
|
180
|
-
...R(u.value),
|
|
181
|
-
parentId: e.id
|
|
182
|
-
})
|
|
183
|
-
}), X();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
function Fe() {
|
|
187
|
-
if (S.value) {
|
|
188
|
-
if (!W.value) {
|
|
189
|
-
$("当前用户无权编辑字典项");
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
b.startEdit(), X();
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function Ie() {
|
|
196
|
-
b.cancel(), X();
|
|
197
|
-
}
|
|
198
|
-
async function Le() {
|
|
199
|
-
if (E.value || w.value === "view") return;
|
|
200
|
-
if (w.value === "create" ? !U.value : !W.value) {
|
|
201
|
-
$("当前用户无权保存字典项");
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
let e = B(C.value, u.value);
|
|
205
|
-
if (!V(e)) {
|
|
206
|
-
$("字典项编码和名称不能为空");
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
X(), E.value = !0;
|
|
210
|
-
try {
|
|
211
|
-
let t = w.value === "edit" && e.id ? await J().update(e.id, e) : await J().insert(e), n = t.record;
|
|
212
|
-
b.select(n), await We(t, [_.closeEditor(), _.refreshList()]);
|
|
213
|
-
} catch (e) {
|
|
214
|
-
Z(e);
|
|
215
|
-
} finally {
|
|
216
|
-
E.value = !1;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
async function Re() {
|
|
220
|
-
if (!(!S.value?.id || E.value)) {
|
|
221
|
-
if (!_e.value) {
|
|
222
|
-
$("当前用户无权变更字典项启停状态");
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
X(), E.value = !0;
|
|
226
|
-
try {
|
|
227
|
-
let e = S.value.enabled === !1 ? await J().enable(S.value.id, { version: S.value.version }) : await J().disable(S.value.id, { version: S.value.version });
|
|
228
|
-
b.select(await J().view(S.value.id)), await We(e, [_.refreshList()]);
|
|
229
|
-
} catch (e) {
|
|
230
|
-
Z(e);
|
|
231
|
-
} finally {
|
|
232
|
-
E.value = !1;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
async function ze() {
|
|
237
|
-
if (!(!S.value?.id || E.value)) {
|
|
238
|
-
if (!ge.value) {
|
|
239
|
-
$("当前用户无权删除字典项");
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
if (await i({
|
|
243
|
-
title: "删除字典项",
|
|
244
|
-
content: `确认删除字典项「${P(S.value)}」?`,
|
|
245
|
-
okText: "删除",
|
|
246
|
-
danger: !0
|
|
247
|
-
})) {
|
|
248
|
-
X(), E.value = !0;
|
|
249
|
-
try {
|
|
250
|
-
let e = await J().delete(S.value.id, { version: S.value.version });
|
|
251
|
-
b.clearSelection(), A.value && U.value ? b.startCreate() : w.value = "view", await We(e, [_.refreshList()]);
|
|
252
|
-
} catch (e) {
|
|
253
|
-
Z(e);
|
|
254
|
-
} finally {
|
|
255
|
-
E.value = !1;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function K() {
|
|
261
|
-
y.value = [], b.clearSelection(), w.value = "view";
|
|
262
|
-
}
|
|
263
|
-
function Be() {
|
|
264
|
-
o.value = [], s.clearSelection(), m.value = "view", K(), Y(), X();
|
|
265
|
-
}
|
|
266
|
-
function q() {
|
|
267
|
-
let e = S.value?.id ? y.value.find((e) => e.id === S.value?.id) : void 0, t = e ?? y.value[0];
|
|
268
|
-
if (w.value === "view") {
|
|
269
|
-
t ? b.select(t) : b.clearSelection();
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
e && b.replaceSelected(e);
|
|
273
|
-
}
|
|
274
|
-
function J() {
|
|
275
|
-
if (!O.value) throw Error("Dictionary item client requires selected category");
|
|
276
|
-
return n(O.value);
|
|
277
|
-
}
|
|
278
|
-
function Y() {
|
|
279
|
-
v.value = void 0;
|
|
280
|
-
}
|
|
281
|
-
function X() {
|
|
282
|
-
D.value = void 0;
|
|
283
|
-
}
|
|
284
|
-
function Ve(e) {
|
|
285
|
-
let t = ne(e);
|
|
286
|
-
if (He(t, !0)) {
|
|
287
|
-
v.value = void 0;
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
v.value = t.message;
|
|
291
|
-
}
|
|
292
|
-
function Z(e) {
|
|
293
|
-
let t = ne(e);
|
|
294
|
-
if (He(t, !0)) {
|
|
295
|
-
D.value = void 0;
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
D.value = t.message;
|
|
299
|
-
}
|
|
300
|
-
function He(e, t) {
|
|
301
|
-
return !t && !ae(e) ? !1 : (re(e, {
|
|
302
|
-
source: "dictionary-management-action",
|
|
303
|
-
phase: "action"
|
|
304
|
-
}), !0);
|
|
305
|
-
}
|
|
306
|
-
function Q(e) {
|
|
307
|
-
v.value = e, f(e, {
|
|
308
|
-
source: "dictionary-category-action",
|
|
309
|
-
phase: "action"
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
function $(e) {
|
|
313
|
-
D.value = e, f(e, {
|
|
314
|
-
source: "dictionary-item-action",
|
|
315
|
-
phase: "action"
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
function Ue(e, t) {
|
|
319
|
-
return h(l(e, t), {
|
|
320
|
-
source: "dictionary-category-action",
|
|
321
|
-
phase: "action",
|
|
322
|
-
reactionHandlers: oe
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
function We(e, t) {
|
|
326
|
-
return h(l(e, t), {
|
|
327
|
-
source: "dictionary-item-action",
|
|
328
|
-
phase: "action",
|
|
329
|
-
reactionHandlers: se
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
function Ge() {
|
|
333
|
-
return d(c({
|
|
334
|
-
refreshList: () => {
|
|
335
|
-
ee.value += 1;
|
|
336
|
-
},
|
|
337
|
-
closeEditor: () => {
|
|
338
|
-
m.value = "view";
|
|
339
|
-
},
|
|
340
|
-
clearSelection: () => {
|
|
341
|
-
s.clearSelection(), m.value = "view";
|
|
342
|
-
}
|
|
343
|
-
}), a.categoryActionResultReactionHandlers);
|
|
344
|
-
}
|
|
345
|
-
function Ke() {
|
|
346
|
-
return d(c({
|
|
347
|
-
refreshList: () => {
|
|
348
|
-
te.value += 1;
|
|
349
|
-
},
|
|
350
|
-
closeEditor: () => {
|
|
351
|
-
w.value = "view";
|
|
352
|
-
}
|
|
353
|
-
}), a.itemActionResultReactionHandlers);
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
categoryReloadKey: ee,
|
|
357
|
-
itemReloadKey: te,
|
|
358
|
-
categories: o,
|
|
359
|
-
selectedCategory: u,
|
|
360
|
-
categoryDraft: ie,
|
|
361
|
-
categoryMode: m,
|
|
362
|
-
categorySaving: g,
|
|
363
|
-
categoryError: v,
|
|
364
|
-
items: y,
|
|
365
|
-
selectedItem: S,
|
|
366
|
-
itemDraft: C,
|
|
367
|
-
itemMode: w,
|
|
368
|
-
itemLoading: T,
|
|
369
|
-
itemSaving: E,
|
|
370
|
-
itemError: D,
|
|
371
|
-
selectedCategoryId: O,
|
|
372
|
-
selectedCategoryTitle: ce,
|
|
373
|
-
selectedCategoryIsDictionary: A,
|
|
374
|
-
canCreateCategory: j,
|
|
375
|
-
canUpdateCategory: M,
|
|
376
|
-
canDeleteCategory: le,
|
|
377
|
-
canToggleCategory: ue,
|
|
378
|
-
canQueryItem: fe,
|
|
379
|
-
canTreeItem: H,
|
|
380
|
-
canCreateItem: U,
|
|
381
|
-
canUpdateItem: W,
|
|
382
|
-
canDeleteItem: ge,
|
|
383
|
-
canToggleItem: _e,
|
|
384
|
-
categoryReadonly: ve,
|
|
385
|
-
itemReadonly: ye,
|
|
386
|
-
categoryEditorTitle: be,
|
|
387
|
-
itemCardTitle: xe,
|
|
388
|
-
handleCategoriesLoaded: G,
|
|
389
|
-
handleSelectCategory: Se,
|
|
390
|
-
startCreateRootCategory: Ce,
|
|
391
|
-
startCreateChildCategory: we,
|
|
392
|
-
startEditCategory: Te,
|
|
393
|
-
cancelCategoryEdit: Ee,
|
|
394
|
-
saveCategory: De,
|
|
395
|
-
toggleCategory: Oe,
|
|
396
|
-
deleteCategory: ke,
|
|
397
|
-
handleItemsLoaded: je,
|
|
398
|
-
loadItems: Ae,
|
|
399
|
-
selectItem: Me,
|
|
400
|
-
startCreateItem: Ne,
|
|
401
|
-
startCreateChildItem: Pe,
|
|
402
|
-
startEditItem: Fe,
|
|
403
|
-
cancelItemEdit: Ie,
|
|
404
|
-
saveItem: Le,
|
|
405
|
-
toggleItem: Re,
|
|
406
|
-
deleteItem: ze,
|
|
407
|
-
resetForApplication: Be
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function N(e) {
|
|
411
|
-
return e?.title ?? e?.alias ?? e?.id ?? "字典类目";
|
|
412
|
-
}
|
|
413
|
-
function P(e) {
|
|
414
|
-
return e?.title ?? e?.code ?? e?.id ?? "字典项";
|
|
415
|
-
}
|
|
416
|
-
function de(e) {
|
|
417
|
-
return !!e && U(e?.categoryKind) === "dictionary";
|
|
418
|
-
}
|
|
419
|
-
function fe(e) {
|
|
420
|
-
return U(e?.categoryKind) === "folder";
|
|
421
|
-
}
|
|
422
|
-
function F(e, t = "platform") {
|
|
423
|
-
return {
|
|
424
|
-
applicationAlias: t,
|
|
425
|
-
alias: "",
|
|
426
|
-
categoryKind: "DICTIONARY",
|
|
427
|
-
parentId: e,
|
|
428
|
-
title: "",
|
|
429
|
-
enabled: !0
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
function pe(e) {
|
|
433
|
-
return { ...e };
|
|
434
|
-
}
|
|
435
|
-
function I(e, t = e.applicationAlias) {
|
|
436
|
-
return {
|
|
437
|
-
...e,
|
|
438
|
-
applicationAlias: t?.trim(),
|
|
439
|
-
alias: e.alias?.trim(),
|
|
440
|
-
parentId: W(e.parentId),
|
|
441
|
-
title: e.title?.trim(),
|
|
442
|
-
categoryKind: H(e.categoryKind)
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
function L(e) {
|
|
446
|
-
return !!(e.applicationAlias && e.alias && e.title);
|
|
447
|
-
}
|
|
448
|
-
function R(e) {
|
|
449
|
-
return {
|
|
450
|
-
categoryId: e?.id,
|
|
451
|
-
categoryAlias: e?.alias,
|
|
452
|
-
code: "",
|
|
453
|
-
title: "",
|
|
454
|
-
enabled: !0
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
function z(e) {
|
|
458
|
-
return { ...e };
|
|
459
|
-
}
|
|
460
|
-
function B(e, t) {
|
|
461
|
-
return {
|
|
462
|
-
...e,
|
|
463
|
-
categoryId: t?.id ?? e.categoryId,
|
|
464
|
-
categoryAlias: t?.alias ?? e.categoryAlias,
|
|
465
|
-
parentId: W(e.parentId),
|
|
466
|
-
code: e.code?.trim(),
|
|
467
|
-
title: e.title?.trim()
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
function V(e) {
|
|
471
|
-
return !!(e.categoryId && e.code && e.title);
|
|
472
|
-
}
|
|
473
|
-
function H(e) {
|
|
474
|
-
return U(e) === "folder" ? "FOLDER" : "DICTIONARY";
|
|
475
|
-
}
|
|
476
|
-
function U(e) {
|
|
477
|
-
return String(e ?? "DICTIONARY").toLowerCase();
|
|
478
|
-
}
|
|
479
|
-
function me(e) {
|
|
480
|
-
return e.enabled === !1 ? "enable" : "disable";
|
|
481
|
-
}
|
|
482
|
-
function he(e) {
|
|
483
|
-
return e.enabled === !1 ? "item_enable" : "item_disable";
|
|
484
|
-
}
|
|
485
|
-
function W(e) {
|
|
486
|
-
return e?.trim() || void 0;
|
|
487
|
-
}
|
|
488
|
-
//#endregion
|
|
489
|
-
//#region src/views/DictionaryManagementView.vue?vue&type=script&setup=true&lang.ts
|
|
490
|
-
var ge = { class: "dictionary-workspace" }, _e = {
|
|
491
|
-
key: 0,
|
|
492
|
-
class: "category-editor-panel"
|
|
493
|
-
}, ve = { class: "category-editor-header" }, ye = {
|
|
494
|
-
key: 0,
|
|
495
|
-
class: "category-status-panel"
|
|
496
|
-
}, be = "item", xe = /*#__PURE__*/ n(/* @__PURE__ */ D({
|
|
497
|
-
name: "DictionaryManagementView",
|
|
498
|
-
__name: "DictionaryManagementView",
|
|
499
|
-
setup(n) {
|
|
500
|
-
let c = i({ moduleAlias: "platform.dictionary_category" }), ne = i({ moduleAlias: "platform.application" }), l = k(""), d = k(""), f = k([]), p = k(!1), h = k(), ae = k(a(void 0)), _ = k(a(void 0)), D = /* @__PURE__ */ new Map(), de = /* @__PURE__ */ new Map(), { categoryReloadKey: F, itemReloadKey: pe, selectedCategory: I, categoryDraft: L, categoryMode: R, categorySaving: z, selectedItem: B, itemDraft: V, itemMode: H, itemSaving: U, selectedCategoryIsDictionary: me, canCreateCategory: he, canDeleteCategory: W, canToggleCategory: xe, canTreeItem: G, canCreateItem: Se, canDeleteItem: Ce, canToggleItem: we, categoryReadonly: Te, itemReadonly: Ee, categoryEditorTitle: De, itemCardTitle: Oe, handleCategoriesLoaded: ke, handleSelectCategory: Ae, startCreateRootCategory: je, startCreateChildCategory: Me, startEditCategory: Ne, cancelCategoryEdit: Pe, saveCategory: Fe, deleteCategory: Ie, handleItemsLoaded: Le, selectItem: Re, startCreateItem: ze, startCreateChildItem: K, startEditItem: Be, cancelItemEdit: q, saveItem: J, toggleItem: Y, deleteItem: X, resetForApplication: Ve } = ue(c, Qe, $e, () => h.value, v), Z = x(() => R.value !== "view"), He = x(() => f.value.map((e) => ({
|
|
501
|
-
label: e.title ?? e.alias ?? e.id ?? "未命名应用",
|
|
502
|
-
value: e.alias ?? e.id ?? "",
|
|
503
|
-
disabled: e.enabled === !1
|
|
504
|
-
}))), Q = x(() => m(c, {
|
|
505
|
-
client: h.value ? Qe() : void 0,
|
|
506
|
-
emptyQueryScopeName: "platform.dictionary_category"
|
|
507
|
-
})), $ = x(() => m(c, {
|
|
508
|
-
client: I.value?.id ? $e(I.value.id) : void 0,
|
|
509
|
-
emptyQueryScopeName: "platform.dictionary_item"
|
|
510
|
-
})), Ue = x(() => d.value.trim() ? "没有匹配的字典项" : "当前类目暂无字典项"), We = x(() => ({
|
|
511
|
-
...V.value,
|
|
512
|
-
categoryTitle: I.value ? N(I.value) : ""
|
|
513
|
-
})), Ge = x(() => ({ parentId: {
|
|
514
|
-
context: $.value,
|
|
515
|
-
reloadKey: pe.value,
|
|
516
|
-
placeholder: G.value ? "根字典项留空" : "无权查看上级字典项",
|
|
517
|
-
constraints: y(V.value.id),
|
|
518
|
-
titleOf: at
|
|
519
|
-
} })), Ke = [{
|
|
520
|
-
label: "字典",
|
|
521
|
-
value: "DICTIONARY"
|
|
522
|
-
}, {
|
|
523
|
-
label: "目录",
|
|
524
|
-
value: "FOLDER"
|
|
525
|
-
}], qe = [
|
|
526
|
-
"categoryTitle",
|
|
527
|
-
"code",
|
|
528
|
-
"title",
|
|
529
|
-
"parentId"
|
|
530
|
-
], Je = x(() => R.value === "view" ? [{
|
|
531
|
-
key: "category-edit",
|
|
532
|
-
actionCode: "update",
|
|
533
|
-
title: "编辑",
|
|
534
|
-
disabled: !I.value
|
|
535
|
-
}, {
|
|
536
|
-
key: "category-delete",
|
|
537
|
-
actionCode: "delete",
|
|
538
|
-
title: "删除",
|
|
539
|
-
danger: !0,
|
|
540
|
-
disabled: !I.value || !W.value,
|
|
541
|
-
loading: z.value
|
|
542
|
-
}] : [{
|
|
543
|
-
key: "category-cancel",
|
|
544
|
-
title: "取消",
|
|
545
|
-
disabled: z.value
|
|
546
|
-
}, {
|
|
547
|
-
key: "category-save",
|
|
548
|
-
actionCode: R.value.startsWith("create") ? "create" : "update",
|
|
549
|
-
title: z.value ? "保存中" : "保存",
|
|
550
|
-
primary: !0,
|
|
551
|
-
loading: z.value
|
|
552
|
-
}]), Ye = x(() => H.value === "view" ? [{
|
|
553
|
-
key: "item-edit",
|
|
554
|
-
actionCode: "item_update",
|
|
555
|
-
title: "编辑",
|
|
556
|
-
disabled: !B.value
|
|
557
|
-
}, {
|
|
558
|
-
key: "item-delete",
|
|
559
|
-
actionCode: "item_delete",
|
|
560
|
-
title: "删除",
|
|
561
|
-
danger: !0,
|
|
562
|
-
disabled: !B.value || !Ce.value,
|
|
563
|
-
loading: U.value
|
|
564
|
-
}] : [{
|
|
565
|
-
key: "item-cancel",
|
|
566
|
-
title: "取消",
|
|
567
|
-
disabled: U.value
|
|
568
|
-
}, {
|
|
569
|
-
key: "item-save",
|
|
570
|
-
actionCode: H.value === "create" ? "item_create" : "item_update",
|
|
571
|
-
title: U.value ? "保存中" : "保存",
|
|
572
|
-
primary: !0,
|
|
573
|
-
loading: U.value
|
|
574
|
-
}]);
|
|
575
|
-
j(h, () => {
|
|
576
|
-
l.value = "", d.value = "", Ve(), F.value += 1;
|
|
577
|
-
}), se(Ze), se(Xe);
|
|
578
|
-
async function Xe() {
|
|
579
|
-
try {
|
|
580
|
-
let e = await c.runtime.ready;
|
|
581
|
-
ae.value = a(e.uiDescriptor), _.value = a(e.uiDescriptor, be);
|
|
582
|
-
} catch (e) {
|
|
583
|
-
re(e, {
|
|
584
|
-
source: "dictionary-management",
|
|
585
|
-
phase: "load"
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
async function Ze() {
|
|
590
|
-
p.value = !0;
|
|
591
|
-
try {
|
|
592
|
-
await ne.runtime.ready;
|
|
593
|
-
let e = await ne.abilities.crud().query({ page: {
|
|
594
|
-
pageNum: 1,
|
|
595
|
-
pageSize: 200
|
|
596
|
-
} });
|
|
597
|
-
if (f.value = e.records, !h.value) {
|
|
598
|
-
let t = e.records.find((e) => e.enabled !== !1) ?? e.records[0];
|
|
599
|
-
h.value = t?.alias ?? t?.id;
|
|
600
|
-
}
|
|
601
|
-
} catch (e) {
|
|
602
|
-
re(e, {
|
|
603
|
-
source: "dictionary-application-load",
|
|
604
|
-
phase: "load"
|
|
605
|
-
});
|
|
606
|
-
} finally {
|
|
607
|
-
p.value = !1;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
function Qe() {
|
|
611
|
-
let e = h.value;
|
|
612
|
-
if (!e) throw Error("Dictionary category client requires selected application");
|
|
613
|
-
let t = de.get(e);
|
|
614
|
-
if (t) return t;
|
|
615
|
-
let n = s(c.http, `/platform.application/${encodeURIComponent(e)}/dictionary-categories`);
|
|
616
|
-
return de.set(e, n), n;
|
|
617
|
-
}
|
|
618
|
-
function $e(e) {
|
|
619
|
-
let t = D.get(e);
|
|
620
|
-
if (t) return t;
|
|
621
|
-
let n = s(c.http, `/platform.dictionary_category/categories/${encodeURIComponent(e)}/items`);
|
|
622
|
-
return D.set(e, n), n;
|
|
623
|
-
}
|
|
624
|
-
function et(e) {
|
|
625
|
-
return [
|
|
626
|
-
{
|
|
627
|
-
key: "create-child",
|
|
628
|
-
title: "新增下级类目",
|
|
629
|
-
iconName: "plus",
|
|
630
|
-
disabled: !he.value || z.value
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
key: "edit",
|
|
634
|
-
title: "编辑类目",
|
|
635
|
-
iconName: "edit",
|
|
636
|
-
disabled: z.value
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
key: "delete",
|
|
640
|
-
title: "删除类目",
|
|
641
|
-
iconName: "delete",
|
|
642
|
-
danger: !0,
|
|
643
|
-
disabled: !e.id || !W.value || z.value
|
|
644
|
-
}
|
|
645
|
-
];
|
|
646
|
-
}
|
|
647
|
-
function tt(e) {
|
|
648
|
-
return e.enabled === !1 ? "停用" : fe(e) ? "目录" : void 0;
|
|
649
|
-
}
|
|
650
|
-
function nt(e) {
|
|
651
|
-
let t = e;
|
|
652
|
-
return {
|
|
653
|
-
title: N(t),
|
|
654
|
-
secondary: t.alias ?? t.id,
|
|
655
|
-
tag: tt(t),
|
|
656
|
-
muted: t.enabled === !1,
|
|
657
|
-
actions: et(e)
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
function rt(e, t) {
|
|
661
|
-
return [
|
|
662
|
-
N(e),
|
|
663
|
-
e.alias,
|
|
664
|
-
e.applicationAlias,
|
|
665
|
-
e.id
|
|
666
|
-
].some((e) => e?.toLowerCase().includes(t));
|
|
667
|
-
}
|
|
668
|
-
function it(e, t) {
|
|
669
|
-
return [
|
|
670
|
-
P(e),
|
|
671
|
-
e.code,
|
|
672
|
-
e.id
|
|
673
|
-
].some((e) => e?.toLowerCase().includes(t));
|
|
674
|
-
}
|
|
675
|
-
function at(e) {
|
|
676
|
-
return P(e);
|
|
677
|
-
}
|
|
678
|
-
function ot(e) {
|
|
679
|
-
return e.enabled === !1 ? "停用" : void 0;
|
|
680
|
-
}
|
|
681
|
-
function st(e) {
|
|
682
|
-
let t = e;
|
|
683
|
-
return {
|
|
684
|
-
title: P(t),
|
|
685
|
-
secondary: t.code ?? t.id,
|
|
686
|
-
tag: ot(t),
|
|
687
|
-
muted: t.enabled === !1,
|
|
688
|
-
actions: ct(e)
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function ct(e) {
|
|
692
|
-
return [
|
|
693
|
-
{
|
|
694
|
-
key: "create-child",
|
|
695
|
-
title: "新增下级字典项",
|
|
696
|
-
iconName: "plus",
|
|
697
|
-
disabled: !me.value || !Se.value || U.value
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
key: "edit",
|
|
701
|
-
title: "编辑字典项",
|
|
702
|
-
iconName: "edit",
|
|
703
|
-
disabled: U.value
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
key: "delete",
|
|
707
|
-
title: "删除字典项",
|
|
708
|
-
iconName: "delete",
|
|
709
|
-
danger: !0,
|
|
710
|
-
disabled: !e.id || !Ce.value || U.value
|
|
711
|
-
}
|
|
712
|
-
];
|
|
713
|
-
}
|
|
714
|
-
function lt(e, t) {
|
|
715
|
-
if (Ae(t), e.key === "create-child") {
|
|
716
|
-
Me();
|
|
717
|
-
return;
|
|
718
|
-
}
|
|
719
|
-
if (e.key === "edit") {
|
|
720
|
-
Ne();
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
e.key === "delete" && Ie();
|
|
724
|
-
}
|
|
725
|
-
function ut(e) {
|
|
726
|
-
if (e.key === "category-edit") {
|
|
727
|
-
Ne();
|
|
728
|
-
return;
|
|
729
|
-
}
|
|
730
|
-
if (e.key === "category-delete") {
|
|
731
|
-
Ie();
|
|
732
|
-
return;
|
|
733
|
-
}
|
|
734
|
-
if (e.key === "category-cancel") {
|
|
735
|
-
Pe();
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
e.key === "category-save" && Fe();
|
|
739
|
-
}
|
|
740
|
-
function dt(e) {
|
|
741
|
-
if (e.key === "item-edit") {
|
|
742
|
-
Be();
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
if (e.key === "item-delete") {
|
|
746
|
-
X();
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
if (e.key === "item-cancel") {
|
|
750
|
-
q();
|
|
751
|
-
return;
|
|
752
|
-
}
|
|
753
|
-
e.key === "item-save" && J();
|
|
754
|
-
}
|
|
755
|
-
function ft(e, t) {
|
|
756
|
-
if (Re(t), e.key === "create-child") {
|
|
757
|
-
K(t);
|
|
758
|
-
return;
|
|
759
|
-
}
|
|
760
|
-
if (e.key === "edit") {
|
|
761
|
-
Be();
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
e.key === "delete" && X();
|
|
765
|
-
}
|
|
766
|
-
function pt(e, t) {
|
|
767
|
-
L.value = {
|
|
768
|
-
...L.value,
|
|
769
|
-
[e]: t
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
function mt(e, t) {
|
|
773
|
-
e !== "categoryTitle" && (V.value = {
|
|
774
|
-
...V.value,
|
|
775
|
-
[e]: t
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
function ht(e) {
|
|
779
|
-
return e === "parentId" && !G.value;
|
|
780
|
-
}
|
|
781
|
-
let gt = {
|
|
782
|
-
applicationAlias: {
|
|
783
|
-
label: "所属应用",
|
|
784
|
-
required: !0,
|
|
785
|
-
readOnly: !0
|
|
786
|
-
},
|
|
787
|
-
alias: {
|
|
788
|
-
label: "类目 alias",
|
|
789
|
-
required: !0
|
|
790
|
-
},
|
|
791
|
-
categoryKind: {
|
|
792
|
-
label: "类目类型",
|
|
793
|
-
required: !0,
|
|
794
|
-
controlType: "select",
|
|
795
|
-
options: Ke
|
|
796
|
-
},
|
|
797
|
-
title: {
|
|
798
|
-
label: "类目名称",
|
|
799
|
-
required: !0
|
|
800
|
-
},
|
|
801
|
-
enabled: {
|
|
802
|
-
label: "启用状态",
|
|
803
|
-
controlType: "enabledStatus"
|
|
804
|
-
}
|
|
805
|
-
}, _t = {
|
|
806
|
-
categoryTitle: {
|
|
807
|
-
label: "所属类目",
|
|
808
|
-
readOnly: !0
|
|
809
|
-
},
|
|
810
|
-
code: {
|
|
811
|
-
label: "字典项编码",
|
|
812
|
-
required: !0,
|
|
813
|
-
placeholder: "请输入字典项编码"
|
|
814
|
-
},
|
|
815
|
-
title: {
|
|
816
|
-
label: "字典项名称",
|
|
817
|
-
required: !0,
|
|
818
|
-
placeholder: "请输入字典项名称"
|
|
819
|
-
},
|
|
820
|
-
parentId: {
|
|
821
|
-
label: "上级字典项",
|
|
822
|
-
controlType: "recordPicker",
|
|
823
|
-
placeholder: "根字典项留空"
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
return (n, i) => (O(), w("section", ge, [
|
|
827
|
-
E(A(oe), {
|
|
828
|
-
"search-keyword": l.value,
|
|
829
|
-
"onUpdate:searchKeyword": i[3] ||= (e) => l.value = e,
|
|
830
|
-
class: "dictionary-column category-column",
|
|
831
|
-
title: "字典类目",
|
|
832
|
-
"search-placeholder": "搜索类目名称、alias 或 ID",
|
|
833
|
-
onRefresh: i[4] ||= (e) => F.value += 1
|
|
834
|
-
}, {
|
|
835
|
-
"title-extra": M(() => [E(A(te), {
|
|
836
|
-
value: h.value,
|
|
837
|
-
"onUpdate:value": i[0] ||= (e) => h.value = e,
|
|
838
|
-
options: He.value,
|
|
839
|
-
disabled: p.value,
|
|
840
|
-
placeholder: "选择应用"
|
|
841
|
-
}, null, 8, [
|
|
842
|
-
"value",
|
|
843
|
-
"options",
|
|
844
|
-
"disabled"
|
|
845
|
-
])]),
|
|
846
|
-
actions: M(() => [E(A(ee), {
|
|
847
|
-
class: "record-panel-create-button",
|
|
848
|
-
context: A(c),
|
|
849
|
-
"action-code": "create",
|
|
850
|
-
title: "新增字典类目",
|
|
851
|
-
"icon-only": "",
|
|
852
|
-
disabled: !h.value || A(z),
|
|
853
|
-
onClick: A(je)
|
|
854
|
-
}, null, 8, [
|
|
855
|
-
"context",
|
|
856
|
-
"disabled",
|
|
857
|
-
"onClick"
|
|
858
|
-
])]),
|
|
859
|
-
editor: M(() => [E(b, { name: "category-editor-drawer" }, {
|
|
860
|
-
default: M(() => [Z.value ? (O(), w("section", _e, [
|
|
861
|
-
T("header", ve, [T("h3", null, ce(A(De)), 1), E(A(t), {
|
|
862
|
-
context: A(c),
|
|
863
|
-
actions: Je.value,
|
|
864
|
-
size: "compact",
|
|
865
|
-
onAction: ut
|
|
866
|
-
}, null, 8, ["context", "actions"])]),
|
|
867
|
-
T("form", {
|
|
868
|
-
class: "category-form",
|
|
869
|
-
onSubmit: i[1] ||= le((...e) => A(Fe) && A(Fe)(...e), ["prevent"])
|
|
870
|
-
}, [E(A(u), {
|
|
871
|
-
record: A(L),
|
|
872
|
-
fields: ae.value,
|
|
873
|
-
fallback: gt,
|
|
874
|
-
"exclude-field-names": ["applicationAlias"],
|
|
875
|
-
disabled: A(Te),
|
|
876
|
-
"onUpdate:field": pt
|
|
877
|
-
}, null, 8, [
|
|
878
|
-
"record",
|
|
879
|
-
"fields",
|
|
880
|
-
"disabled"
|
|
881
|
-
])], 32),
|
|
882
|
-
A(R) === "edit" && A(I)?.id ? (O(), w("section", ye, [E(A(o), {
|
|
883
|
-
enabled: A(L).enabled,
|
|
884
|
-
disabled: A(z) || !A(xe),
|
|
885
|
-
onChange: i[2] ||= (e) => A(L).enabled = e
|
|
886
|
-
}, null, 8, ["enabled", "disabled"])])) : C("v-if", !0)
|
|
887
|
-
])) : C("v-if", !0)]),
|
|
888
|
-
_: 1
|
|
889
|
-
})]),
|
|
890
|
-
default: M(() => [!p.value && f.value.length === 0 ? (O(), S(A(e), {
|
|
891
|
-
key: 0,
|
|
892
|
-
description: "暂无可用应用"
|
|
893
|
-
})) : (O(), S(A(g), {
|
|
894
|
-
key: 1,
|
|
895
|
-
context: Q.value,
|
|
896
|
-
"selected-id": A(I)?.id,
|
|
897
|
-
"reload-key": A(F),
|
|
898
|
-
keyword: l.value,
|
|
899
|
-
"search-mode": "none",
|
|
900
|
-
"search-placeholder": "搜索类目名称、alias 或 ID",
|
|
901
|
-
"empty-description": "暂无字典类目",
|
|
902
|
-
"loading-tip": "加载字典类目",
|
|
903
|
-
"fallback-title": "未命名字典类目",
|
|
904
|
-
"item-of": nt,
|
|
905
|
-
"filter-option": rt,
|
|
906
|
-
onLoaded: A(ke),
|
|
907
|
-
onSelect: A(Ae),
|
|
908
|
-
onAction: lt
|
|
909
|
-
}, null, 8, [
|
|
910
|
-
"context",
|
|
911
|
-
"selected-id",
|
|
912
|
-
"reload-key",
|
|
913
|
-
"keyword",
|
|
914
|
-
"onLoaded",
|
|
915
|
-
"onSelect"
|
|
916
|
-
]))]),
|
|
917
|
-
_: 1
|
|
918
|
-
}, 8, ["search-keyword"]),
|
|
919
|
-
E(A(oe), {
|
|
920
|
-
"search-keyword": d.value,
|
|
921
|
-
"onUpdate:searchKeyword": i[5] ||= (e) => d.value = e,
|
|
922
|
-
class: "dictionary-column list-column",
|
|
923
|
-
title: "字典项",
|
|
924
|
-
"search-placeholder": "搜索字典项名称、编码或 ID",
|
|
925
|
-
onRefresh: i[6] ||= (e) => pe.value += 1
|
|
926
|
-
}, {
|
|
927
|
-
actions: M(() => [E(A(ee), {
|
|
928
|
-
class: "record-panel-create-button",
|
|
929
|
-
context: A(c),
|
|
930
|
-
"action-code": "item_create",
|
|
931
|
-
title: "新增字典项",
|
|
932
|
-
"icon-only": "",
|
|
933
|
-
disabled: !A(me) || A(U) || !A(Se),
|
|
934
|
-
onClick: A(ze)
|
|
935
|
-
}, null, 8, [
|
|
936
|
-
"context",
|
|
937
|
-
"disabled",
|
|
938
|
-
"onClick"
|
|
939
|
-
])]),
|
|
940
|
-
default: M(() => [A(I) ? A(me) ? A(G) ? (O(), S(A(g), {
|
|
941
|
-
key: 3,
|
|
942
|
-
context: $.value,
|
|
943
|
-
"selected-id": A(B)?.id,
|
|
944
|
-
"reload-key": A(pe),
|
|
945
|
-
keyword: d.value,
|
|
946
|
-
"search-mode": "none",
|
|
947
|
-
"search-placeholder": "搜索字典项名称、编码或 ID",
|
|
948
|
-
"empty-description": Ue.value,
|
|
949
|
-
"loading-tip": "加载字典项",
|
|
950
|
-
"fallback-title": "未命名字典项",
|
|
951
|
-
"item-of": st,
|
|
952
|
-
"filter-option": it,
|
|
953
|
-
onLoaded: A(Le),
|
|
954
|
-
onSelect: A(Re),
|
|
955
|
-
onAction: ft
|
|
956
|
-
}, null, 8, [
|
|
957
|
-
"context",
|
|
958
|
-
"selected-id",
|
|
959
|
-
"reload-key",
|
|
960
|
-
"keyword",
|
|
961
|
-
"empty-description",
|
|
962
|
-
"onLoaded",
|
|
963
|
-
"onSelect"
|
|
964
|
-
])) : (O(), S(A(e), {
|
|
965
|
-
key: 2,
|
|
966
|
-
description: "当前用户无权查看字典项"
|
|
967
|
-
})) : (O(), S(A(e), {
|
|
968
|
-
key: 1,
|
|
969
|
-
description: "目录类目不维护字典项"
|
|
970
|
-
})) : (O(), S(A(e), {
|
|
971
|
-
key: 0,
|
|
972
|
-
description: "请选择字典类目"
|
|
973
|
-
}))]),
|
|
974
|
-
_: 1
|
|
975
|
-
}, 8, ["search-keyword"]),
|
|
976
|
-
E(A(r), {
|
|
977
|
-
class: "dictionary-column",
|
|
978
|
-
title: A(Oe)
|
|
979
|
-
}, {
|
|
980
|
-
status: M(() => [A(H) === "view" ? A(B) ? (O(), S(A(o), {
|
|
981
|
-
key: 1,
|
|
982
|
-
enabled: A(B).enabled,
|
|
983
|
-
disabled: A(U) || !A(we),
|
|
984
|
-
loading: A(U),
|
|
985
|
-
"show-label": !1,
|
|
986
|
-
onChange: A(Y)
|
|
987
|
-
}, null, 8, [
|
|
988
|
-
"enabled",
|
|
989
|
-
"disabled",
|
|
990
|
-
"loading",
|
|
991
|
-
"onChange"
|
|
992
|
-
])) : C("v-if", !0) : (O(), S(A(o), {
|
|
993
|
-
key: 0,
|
|
994
|
-
enabled: A(V).enabled,
|
|
995
|
-
"show-label": !1,
|
|
996
|
-
onChange: i[7] ||= (e) => A(V).enabled = e
|
|
997
|
-
}, null, 8, ["enabled"]))]),
|
|
998
|
-
actions: M(() => [E(A(t), {
|
|
999
|
-
context: A(c),
|
|
1000
|
-
actions: Ye.value,
|
|
1001
|
-
onAction: dt
|
|
1002
|
-
}, null, 8, ["context", "actions"])]),
|
|
1003
|
-
default: M(() => [!A(B) && A(H) === "view" ? (O(), S(A(e), {
|
|
1004
|
-
key: 0,
|
|
1005
|
-
description: "请选择或新建字典项"
|
|
1006
|
-
})) : (O(), w("form", {
|
|
1007
|
-
key: 1,
|
|
1008
|
-
class: "item-form",
|
|
1009
|
-
onSubmit: i[8] ||= le((...e) => A(J) && A(J)(...e), ["prevent"])
|
|
1010
|
-
}, [E(A(u), {
|
|
1011
|
-
record: We.value,
|
|
1012
|
-
"field-names": qe,
|
|
1013
|
-
fields: _.value,
|
|
1014
|
-
fallback: _t,
|
|
1015
|
-
"picker-configs": Ge.value,
|
|
1016
|
-
disabled: A(Ee),
|
|
1017
|
-
"disabled-of": ht,
|
|
1018
|
-
"onUpdate:field": mt
|
|
1019
|
-
}, null, 8, [
|
|
1020
|
-
"record",
|
|
1021
|
-
"fields",
|
|
1022
|
-
"picker-configs",
|
|
1023
|
-
"disabled"
|
|
1024
|
-
])], 32)), A(B) || A(H) !== "view" ? (O(), S(A(ie), {
|
|
1025
|
-
key: 2,
|
|
1026
|
-
record: A(V),
|
|
1027
|
-
"show-sort-order": ""
|
|
1028
|
-
}, null, 8, ["record"])) : C("v-if", !0)]),
|
|
1029
|
-
_: 1
|
|
1030
|
-
}, 8, ["title"])
|
|
1031
|
-
]));
|
|
1032
|
-
}
|
|
1033
|
-
}), [["__scopeId", "data-v-513c9ba9"]]);
|
|
1034
|
-
//#endregion
|
|
1035
|
-
export { xe as default };
|