jmash-core 0.0.59 → 0.0.60

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.
Files changed (28) hide show
  1. package/dist/{401-DE-TXzCc.mjs → 401-Da_FRa8F.mjs} +2 -2
  2. package/dist/{404-bKhkditH.mjs → 404-B-yLqgzc.mjs} +1 -1
  3. package/dist/{BarChart-DGjS_f26.mjs → BarChart-C4cVigGd.mjs} +2 -2
  4. package/dist/{PieChart-D66O_XMl.mjs → PieChart-DXAeeKov.mjs} +1 -1
  5. package/dist/{PieChart.vue_vue_type_script_setup_true_lang--HJAxB0M.mjs → PieChart.vue_vue_type_script_setup_true_lang-DeO-_Zu_.mjs} +2 -2
  6. package/dist/{RadarChart-BbEYnVIB.mjs → RadarChart-CWmASBqH.mjs} +1 -1
  7. package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-BaKQP2dk.mjs → RadarChart.vue_vue_type_script_setup_true_lang-CPfyBKlD.mjs} +2 -2
  8. package/dist/{el-card-BFMPAwA0.mjs → el-card-BC8c6Nqv.mjs} +1 -1
  9. package/dist/{el-col-DFVyNU5b.mjs → el-col-DzruSagK.mjs} +1 -1
  10. package/dist/{el-form-item-Dv464MKF.mjs → el-form-item-FH0FWnW5.mjs} +1 -1
  11. package/dist/{index-DGsBiCbV.mjs → index-BEcfFlyz.mjs} +6 -6
  12. package/dist/{index-B_6ikcFI.mjs → index-BJJPA_t4.mjs} +5 -5
  13. package/dist/{index-DEBaC_jU.mjs → index-BduP3zhq.mjs} +4 -4
  14. package/dist/{index-otAWIrpX.mjs → index-CXNg2AIY.mjs} +1 -1
  15. package/dist/{index-BIgjgL-a.mjs → index-RCy_bVl2.mjs} +7 -3
  16. package/dist/index.mjs +1 -1
  17. package/dist/{picture-D2hiMs9J.mjs → picture-Be_t0ujg.mjs} +2 -2
  18. package/dist/{position-CHQrk0lU.mjs → position-Dr7Dp1AA.mjs} +1 -1
  19. package/dist/{profile-CCJwsEtq.mjs → profile-B7kK9yO3.mjs} +4 -4
  20. package/dist/{runAs-C8suolP2.mjs → runAs-B0C3T4Rq.mjs} +1 -1
  21. package/dist/runAs.vue_vue_type_script_setup_true_lang-D24xjdze.mjs +645 -0
  22. package/dist/{types-DXRor_zc.mjs → types-CQh1KdEj.mjs} +3 -3
  23. package/dist/{updatePwd-CgWThOVr.mjs → updatePwd-BZwEBKIy.mjs} +1 -1
  24. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-CLY6hMmO.mjs → updatePwd.vue_vue_type_script_setup_true_lang-CcqYxpvS.mjs} +2 -2
  25. package/dts/src/lang/package/en.d.ts +2 -0
  26. package/dts/src/lang/package/zh-cn.d.ts +2 -0
  27. package/package.json +1 -1
  28. package/dist/runAs.vue_vue_type_script_setup_true_lang-BZBTd_j_.mjs +0 -610
@@ -191,6 +191,7 @@ declare const _default: {
191
191
  name: string;
192
192
  target: string;
193
193
  routeName: string;
194
+ resourceCode: string;
194
195
  url: string;
195
196
  status: string;
196
197
  operatePerm: string;
@@ -203,6 +204,7 @@ declare const _default: {
203
204
  parentRequired: string;
204
205
  nameRequired: string;
205
206
  routeNameRequired: string;
207
+ resourceCodeRequired: string;
206
208
  urlRequired: string;
207
209
  urlExistSlash: string;
208
210
  statusRequired: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/src/index.d.ts",
@@ -1,610 +0,0 @@
1
- import { A as we, t as Be, I as Te, s as Me, H as ke, E as Se, bg as Ie, bh as Ae, bi as Ve, bj as x, bk as ee, bl as Re, bm as Le, _ as Oe, bn as $e, c as Ne, g as ie, j as ne, V as Pe, a_ as ze, al as oe, aN as te, z as De, bo as Ue, a2 as L, bp as Fe, bq as He, X as Ke, br as qe, aq as je } from "./index-BIgjgL-a.mjs";
2
- import { nextTick as $, defineComponent as ue, computed as w, ref as C, reactive as de, watch as se, onMounted as Xe, onBeforeUnmount as Ge, toRefs as We, resolveComponent as k, openBlock as f, createBlock as g, Transition as Ze, withCtx as m, withDirectives as H, createVNode as h, createElementVNode as v, normalizeClass as d, normalizeStyle as le, withModifiers as D, createElementBlock as K, resolveDynamicComponent as U, createCommentVNode as S, toDisplayString as O, withKeys as F, renderSlot as Je, createTextVNode as q, vShow as j, isVNode as ce, render as fe, useModel as Qe, resolveDirective as Ye, unref as X } from "vue";
3
- const _e = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', xe = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, ae = (e) => Array.from(e.querySelectorAll(_e)).filter((n) => en(n) && xe(n)), en = (e) => {
4
- if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
5
- return !0;
6
- if (e.disabled)
7
- return !1;
8
- switch (e.nodeName) {
9
- case "A":
10
- return !!e.href && e.rel !== "ignore";
11
- case "INPUT":
12
- return !(e.type === "hidden" || e.type === "file");
13
- case "BUTTON":
14
- case "SELECT":
15
- case "TEXTAREA":
16
- return !0;
17
- default:
18
- return !1;
19
- }
20
- }, hn = function(e, n, ...t) {
21
- let s;
22
- n.includes("mouse") || n.includes("click") ? s = "MouseEvents" : n.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
23
- const a = document.createEvent(s);
24
- return a.initEvent(n, ...t), e.dispatchEvent(a), e;
25
- }, G = "_trap-focus-children", B = [], re = (e) => {
26
- var n;
27
- if (B.length === 0)
28
- return;
29
- const t = B[B.length - 1][G];
30
- if (t.length > 0 && e.code === we.tab) {
31
- if (t.length === 1) {
32
- e.preventDefault(), document.activeElement !== t[0] && t[0].focus();
33
- return;
34
- }
35
- const s = e.shiftKey, a = e.target === t[0], l = e.target === t[t.length - 1];
36
- if (a && s && (e.preventDefault(), t[t.length - 1].focus()), l && !s && (e.preventDefault(), t[0].focus()), process.env.NODE_ENV === "test") {
37
- const r = t.indexOf(e.target);
38
- r !== -1 && ((n = t[s ? r - 1 : r + 1]) == null || n.focus());
39
- }
40
- }
41
- }, nn = {
42
- beforeMount(e) {
43
- e[G] = ae(e), B.push(e), B.length <= 1 && document.addEventListener("keydown", re);
44
- },
45
- updated(e) {
46
- $(() => {
47
- e[G] = ae(e);
48
- });
49
- },
50
- unmounted() {
51
- B.shift(), B.length === 0 && document.removeEventListener("keydown", re);
52
- }
53
- }, on = ue({
54
- name: "ElMessageBox",
55
- directives: {
56
- TrapFocus: nn
57
- },
58
- components: {
59
- ElButton: Be,
60
- ElFocusTrap: Te,
61
- ElInput: Me,
62
- ElOverlay: ke,
63
- ElIcon: Se,
64
- ...Ie
65
- },
66
- inheritAttrs: !1,
67
- props: {
68
- buttonSize: {
69
- type: String,
70
- validator: Ae
71
- },
72
- modal: {
73
- type: Boolean,
74
- default: !0
75
- },
76
- lockScroll: {
77
- type: Boolean,
78
- default: !0
79
- },
80
- showClose: {
81
- type: Boolean,
82
- default: !0
83
- },
84
- closeOnClickModal: {
85
- type: Boolean,
86
- default: !0
87
- },
88
- closeOnPressEscape: {
89
- type: Boolean,
90
- default: !0
91
- },
92
- closeOnHashChange: {
93
- type: Boolean,
94
- default: !0
95
- },
96
- center: Boolean,
97
- draggable: Boolean,
98
- overflow: Boolean,
99
- roundButton: {
100
- default: !1,
101
- type: Boolean
102
- },
103
- container: {
104
- type: String,
105
- default: "body"
106
- },
107
- boxType: {
108
- type: String,
109
- default: ""
110
- }
111
- },
112
- emits: ["vanish", "action"],
113
- setup(e, { emit: n }) {
114
- const {
115
- locale: t,
116
- zIndex: s,
117
- ns: a,
118
- size: l
119
- } = Ve("message-box", w(() => e.buttonSize)), { t: r } = t, { nextZIndex: c } = s, p = C(!1), o = de({
120
- autofocus: !0,
121
- beforeClose: null,
122
- callback: null,
123
- cancelButtonText: "",
124
- cancelButtonClass: "",
125
- confirmButtonText: "",
126
- confirmButtonClass: "",
127
- customClass: "",
128
- customStyle: {},
129
- dangerouslyUseHTMLString: !1,
130
- distinguishCancelAndClose: !1,
131
- icon: "",
132
- inputPattern: null,
133
- inputPlaceholder: "",
134
- inputType: "text",
135
- inputValue: null,
136
- inputValidator: null,
137
- inputErrorMessage: "",
138
- message: null,
139
- modalFade: !0,
140
- modalClass: "",
141
- showCancelButton: !1,
142
- showConfirmButton: !0,
143
- type: "",
144
- title: void 0,
145
- showInput: !1,
146
- action: "",
147
- confirmButtonLoading: !1,
148
- cancelButtonLoading: !1,
149
- confirmButtonDisabled: !1,
150
- editorErrorMessage: "",
151
- validateError: !1,
152
- zIndex: c()
153
- }), A = w(() => {
154
- const i = o.type;
155
- return { [a.bm("icon", i)]: i && x[i] };
156
- }), E = ee(), u = ee(), pe = w(() => o.icon || x[o.type] || ""), me = w(() => !!o.message), T = C(), W = C(), V = C(), P = C(), Z = C(), ve = w(() => o.confirmButtonClass);
157
- se(() => o.inputValue, async (i) => {
158
- await $(), e.boxType === "prompt" && i !== null && Q();
159
- }, { immediate: !0 }), se(() => p.value, (i) => {
160
- var b, M;
161
- i && (e.boxType !== "prompt" && (o.autofocus ? V.value = (M = (b = Z.value) == null ? void 0 : b.$el) != null ? M : T.value : V.value = T.value), o.zIndex = c()), e.boxType === "prompt" && (i ? $().then(() => {
162
- var _;
163
- P.value && P.value.$el && (o.autofocus ? V.value = (_ = he()) != null ? _ : T.value : V.value = T.value);
164
- }) : (o.editorErrorMessage = "", o.validateError = !1));
165
- });
166
- const ge = w(() => e.draggable), be = w(() => e.overflow);
167
- Re(T, W, ge, be), Xe(async () => {
168
- await $(), e.closeOnHashChange && window.addEventListener("hashchange", R);
169
- }), Ge(() => {
170
- e.closeOnHashChange && window.removeEventListener("hashchange", R);
171
- });
172
- function R() {
173
- p.value && (p.value = !1, $(() => {
174
- o.action && n("action", o.action);
175
- }));
176
- }
177
- const J = () => {
178
- e.closeOnClickModal && z(o.distinguishCancelAndClose ? "close" : "cancel");
179
- }, ye = $e(J), Ce = (i) => {
180
- if (o.inputType !== "textarea")
181
- return i.preventDefault(), z("confirm");
182
- }, z = (i) => {
183
- var b;
184
- e.boxType === "prompt" && i === "confirm" && !Q() || (o.action = i, o.beforeClose ? (b = o.beforeClose) == null || b.call(o, i, o, R) : R());
185
- }, Q = () => {
186
- if (e.boxType === "prompt") {
187
- const i = o.inputPattern;
188
- if (i && !i.test(o.inputValue || ""))
189
- return o.editorErrorMessage = o.inputErrorMessage || r("el.messagebox.error"), o.validateError = !0, !1;
190
- const b = o.inputValidator;
191
- if (typeof b == "function") {
192
- const M = b(o.inputValue);
193
- if (M === !1)
194
- return o.editorErrorMessage = o.inputErrorMessage || r("el.messagebox.error"), o.validateError = !0, !1;
195
- if (typeof M == "string")
196
- return o.editorErrorMessage = M, o.validateError = !0, !1;
197
- }
198
- }
199
- return o.editorErrorMessage = "", o.validateError = !1, !0;
200
- }, he = () => {
201
- const i = P.value.$refs;
202
- return i.input || i.textarea;
203
- }, Y = () => {
204
- z("close");
205
- }, Ee = () => {
206
- e.closeOnPressEscape && Y();
207
- };
208
- return e.lockScroll && Le(p), {
209
- ...We(o),
210
- ns: a,
211
- overlayEvent: ye,
212
- visible: p,
213
- hasMessage: me,
214
- typeClass: A,
215
- contentId: E,
216
- inputId: u,
217
- btnSize: l,
218
- iconComponent: pe,
219
- confirmButtonClasses: ve,
220
- rootRef: T,
221
- focusStartRef: V,
222
- headerRef: W,
223
- inputRef: P,
224
- confirmRef: Z,
225
- doClose: R,
226
- handleClose: Y,
227
- onCloseRequested: Ee,
228
- handleWrapperClick: J,
229
- handleInputEnter: Ce,
230
- handleAction: z,
231
- t: r
232
- };
233
- }
234
- }), tn = ["aria-label", "aria-describedby"], sn = ["aria-label"], ln = ["id"];
235
- function an(e, n, t, s, a, l) {
236
- const r = k("el-icon"), c = k("close"), p = k("el-input"), o = k("el-button"), A = k("el-focus-trap"), E = k("el-overlay");
237
- return f(), g(Ze, {
238
- name: "fade-in-linear",
239
- onAfterLeave: n[11] || (n[11] = (u) => e.$emit("vanish")),
240
- persisted: ""
241
- }, {
242
- default: m(() => [
243
- H(h(E, {
244
- "z-index": e.zIndex,
245
- "overlay-class": [e.ns.is("message-box"), e.modalClass],
246
- mask: e.modal
247
- }, {
248
- default: m(() => [
249
- v("div", {
250
- role: "dialog",
251
- "aria-label": e.title,
252
- "aria-modal": "true",
253
- "aria-describedby": e.showInput ? void 0 : e.contentId,
254
- class: d(`${e.ns.namespace.value}-overlay-message-box`),
255
- onClick: n[8] || (n[8] = (...u) => e.overlayEvent.onClick && e.overlayEvent.onClick(...u)),
256
- onMousedown: n[9] || (n[9] = (...u) => e.overlayEvent.onMousedown && e.overlayEvent.onMousedown(...u)),
257
- onMouseup: n[10] || (n[10] = (...u) => e.overlayEvent.onMouseup && e.overlayEvent.onMouseup(...u))
258
- }, [
259
- h(A, {
260
- loop: "",
261
- trapped: e.visible,
262
- "focus-trap-el": e.rootRef,
263
- "focus-start-el": e.focusStartRef,
264
- onReleaseRequested: e.onCloseRequested
265
- }, {
266
- default: m(() => [
267
- v("div", {
268
- ref: "rootRef",
269
- class: d([
270
- e.ns.b(),
271
- e.customClass,
272
- e.ns.is("draggable", e.draggable),
273
- { [e.ns.m("center")]: e.center }
274
- ]),
275
- style: le(e.customStyle),
276
- tabindex: "-1",
277
- onClick: n[7] || (n[7] = D(() => {
278
- }, ["stop"]))
279
- }, [
280
- e.title !== null && e.title !== void 0 ? (f(), K("div", {
281
- key: 0,
282
- ref: "headerRef",
283
- class: d([e.ns.e("header"), { "show-close": e.showClose }])
284
- }, [
285
- v("div", {
286
- class: d(e.ns.e("title"))
287
- }, [
288
- e.iconComponent && e.center ? (f(), g(r, {
289
- key: 0,
290
- class: d([e.ns.e("status"), e.typeClass])
291
- }, {
292
- default: m(() => [
293
- (f(), g(U(e.iconComponent)))
294
- ]),
295
- _: 1
296
- }, 8, ["class"])) : S("v-if", !0),
297
- v("span", null, O(e.title), 1)
298
- ], 2),
299
- e.showClose ? (f(), K("button", {
300
- key: 0,
301
- type: "button",
302
- class: d(e.ns.e("headerbtn")),
303
- "aria-label": e.t("el.messagebox.close"),
304
- onClick: n[0] || (n[0] = (u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel")),
305
- onKeydown: n[1] || (n[1] = F(D((u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
306
- }, [
307
- h(r, {
308
- class: d(e.ns.e("close"))
309
- }, {
310
- default: m(() => [
311
- h(c)
312
- ]),
313
- _: 1
314
- }, 8, ["class"])
315
- ], 42, sn)) : S("v-if", !0)
316
- ], 2)) : S("v-if", !0),
317
- v("div", {
318
- id: e.contentId,
319
- class: d(e.ns.e("content"))
320
- }, [
321
- v("div", {
322
- class: d(e.ns.e("container"))
323
- }, [
324
- e.iconComponent && !e.center && e.hasMessage ? (f(), g(r, {
325
- key: 0,
326
- class: d([e.ns.e("status"), e.typeClass])
327
- }, {
328
- default: m(() => [
329
- (f(), g(U(e.iconComponent)))
330
- ]),
331
- _: 1
332
- }, 8, ["class"])) : S("v-if", !0),
333
- e.hasMessage ? (f(), K("div", {
334
- key: 1,
335
- class: d(e.ns.e("message"))
336
- }, [
337
- Je(e.$slots, "default", {}, () => [
338
- e.dangerouslyUseHTMLString ? (f(), g(U(e.showInput ? "label" : "p"), {
339
- key: 1,
340
- for: e.showInput ? e.inputId : void 0,
341
- innerHTML: e.message
342
- }, null, 8, ["for", "innerHTML"])) : (f(), g(U(e.showInput ? "label" : "p"), {
343
- key: 0,
344
- for: e.showInput ? e.inputId : void 0
345
- }, {
346
- default: m(() => [
347
- q(O(e.dangerouslyUseHTMLString ? "" : e.message), 1)
348
- ]),
349
- _: 1
350
- }, 8, ["for"]))
351
- ])
352
- ], 2)) : S("v-if", !0)
353
- ], 2),
354
- H(v("div", {
355
- class: d(e.ns.e("input"))
356
- }, [
357
- h(p, {
358
- id: e.inputId,
359
- ref: "inputRef",
360
- modelValue: e.inputValue,
361
- "onUpdate:modelValue": n[2] || (n[2] = (u) => e.inputValue = u),
362
- type: e.inputType,
363
- placeholder: e.inputPlaceholder,
364
- "aria-invalid": e.validateError,
365
- class: d({ invalid: e.validateError }),
366
- onKeydown: F(e.handleInputEnter, ["enter"])
367
- }, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
368
- v("div", {
369
- class: d(e.ns.e("errormsg")),
370
- style: le({
371
- visibility: e.editorErrorMessage ? "visible" : "hidden"
372
- })
373
- }, O(e.editorErrorMessage), 7)
374
- ], 2), [
375
- [j, e.showInput]
376
- ])
377
- ], 10, ln),
378
- v("div", {
379
- class: d(e.ns.e("btns"))
380
- }, [
381
- e.showCancelButton ? (f(), g(o, {
382
- key: 0,
383
- loading: e.cancelButtonLoading,
384
- class: d([e.cancelButtonClass]),
385
- round: e.roundButton,
386
- size: e.btnSize,
387
- onClick: n[3] || (n[3] = (u) => e.handleAction("cancel")),
388
- onKeydown: n[4] || (n[4] = F(D((u) => e.handleAction("cancel"), ["prevent"]), ["enter"]))
389
- }, {
390
- default: m(() => [
391
- q(O(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
392
- ]),
393
- _: 1
394
- }, 8, ["loading", "class", "round", "size"])) : S("v-if", !0),
395
- H(h(o, {
396
- ref: "confirmRef",
397
- type: "primary",
398
- loading: e.confirmButtonLoading,
399
- class: d([e.confirmButtonClasses]),
400
- round: e.roundButton,
401
- disabled: e.confirmButtonDisabled,
402
- size: e.btnSize,
403
- onClick: n[5] || (n[5] = (u) => e.handleAction("confirm")),
404
- onKeydown: n[6] || (n[6] = F(D((u) => e.handleAction("confirm"), ["prevent"]), ["enter"]))
405
- }, {
406
- default: m(() => [
407
- q(O(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
408
- ]),
409
- _: 1
410
- }, 8, ["loading", "class", "round", "disabled", "size"]), [
411
- [j, e.showConfirmButton]
412
- ])
413
- ], 2)
414
- ], 6)
415
- ]),
416
- _: 3
417
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
418
- ], 42, tn)
419
- ]),
420
- _: 3
421
- }, 8, ["z-index", "overlay-class", "mask"]), [
422
- [j, e.visible]
423
- ])
424
- ]),
425
- _: 3
426
- });
427
- }
428
- var rn = /* @__PURE__ */ Oe(on, [["render", an], ["__file", "index.vue"]]);
429
- const N = /* @__PURE__ */ new Map(), un = (e) => {
430
- let n = document.body;
431
- return e.appendTo && (ie(e.appendTo) && (n = document.querySelector(e.appendTo)), te(e.appendTo) && (n = e.appendTo), te(n) || (De("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), n = document.body)), n;
432
- }, dn = (e, n, t = null) => {
433
- const s = h(rn, e, oe(e.message) || ce(e.message) ? {
434
- default: oe(e.message) ? e.message : () => e.message
435
- } : null);
436
- return s.appContext = t, fe(s, n), un(e).appendChild(n.firstElementChild), s.component;
437
- }, cn = () => document.createElement("div"), fn = (e, n) => {
438
- const t = cn();
439
- e.onVanish = () => {
440
- fe(null, t), N.delete(a);
441
- }, e.onAction = (l) => {
442
- const r = N.get(a);
443
- let c;
444
- e.showInput ? c = { value: a.inputValue, action: l } : c = l, e.callback ? e.callback(c, s.proxy) : l === "cancel" || l === "close" ? e.distinguishCancelAndClose && l !== "cancel" ? r.reject("close") : r.reject("cancel") : r.resolve(c);
445
- };
446
- const s = dn(e, t, n), a = s.proxy;
447
- for (const l in e)
448
- ne(e, l) && !ne(a.$props, l) && (a[l] = e[l]);
449
- return a.visible = !0, a;
450
- };
451
- function I(e, n = null) {
452
- if (!Ne)
453
- return Promise.reject();
454
- let t;
455
- return ie(e) || ce(e) ? e = {
456
- message: e
457
- } : t = e.callback, new Promise((s, a) => {
458
- const l = fn(e, n ?? I._context);
459
- N.set(l, {
460
- options: e,
461
- callback: t,
462
- resolve: s,
463
- reject: a
464
- });
465
- });
466
- }
467
- const pn = ["alert", "confirm", "prompt"], mn = {
468
- alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
469
- confirm: { showCancelButton: !0 },
470
- prompt: { showCancelButton: !0, showInput: !0 }
471
- };
472
- pn.forEach((e) => {
473
- I[e] = vn(e);
474
- });
475
- function vn(e) {
476
- return (n, t, s, a) => {
477
- let l = "";
478
- return Pe(t) ? (s = t, l = "") : ze(t) ? l = "" : l = t, I(Object.assign({
479
- title: l,
480
- message: n,
481
- type: "",
482
- ...mn[e]
483
- }, s, {
484
- boxType: e
485
- }), a);
486
- };
487
- }
488
- I.close = () => {
489
- N.forEach((e, n) => {
490
- n.doClose();
491
- }), N.clear();
492
- };
493
- I._context = null;
494
- const y = I;
495
- y.install = (e) => {
496
- y._context = e._context, e.config.globalProperties.$msgbox = y, e.config.globalProperties.$messageBox = y, e.config.globalProperties.$alert = y.alert, e.config.globalProperties.$confirm = y.confirm, e.config.globalProperties.$prompt = y.prompt;
497
- };
498
- const gn = y, bn = ["onClick"], En = /* @__PURE__ */ ue({
499
- __name: "runAs",
500
- props: {
501
- modelValue: { type: Boolean },
502
- modelModifiers: {}
503
- },
504
- emits: ["update:modelValue"],
505
- setup(e) {
506
- const n = C(!1), t = C([]), s = Qe(e, "modelValue"), a = de([
507
- {
508
- label: "用户名",
509
- prop: "loginName",
510
- width: "100",
511
- sortable: !0,
512
- isColumn: !0
513
- },
514
- {
515
- label: "用户昵称",
516
- prop: "nickName",
517
- width: "100",
518
- isColumn: !0
519
- },
520
- {
521
- label: "手机号",
522
- prop: "mobilePhone",
523
- width: "180",
524
- isColumn: !0,
525
- sortable: !0
526
- },
527
- {
528
- label: "邮箱",
529
- prop: "email",
530
- width: "180",
531
- isColumn: !0,
532
- sortable: !0
533
- },
534
- {
535
- label: "查看/隐藏",
536
- width: "100",
537
- slotName: "encryption",
538
- columnType: "slot",
539
- isColumn: !0
540
- },
541
- {
542
- label: "操作",
543
- width: "100",
544
- slotName: "operation",
545
- columnType: "slot",
546
- fixed: "right",
547
- isColumn: !0
548
- }
549
- ]);
550
- n.value = !0, Ue().then(({ data: r }) => {
551
- console.log(r), n.value = !1, t.value = r.results;
552
- });
553
- function l(r) {
554
- gn.confirm("确定切换用户身份吗?", "提示", {
555
- confirmButtonText: "确定",
556
- cancelButtonText: "取消",
557
- type: "warning"
558
- }).then(() => {
559
- console.log(L()), Fe(r.userId).then(async (c) => {
560
- if (c.status === 200) {
561
- L().user.roleCodes = [], L().user.permCodes = [];
562
- const { roleCodes: p } = await L().getRoleInfo(), o = await L().getUserInfo();
563
- await He().generateRoutes(p, o), Ke({
564
- message: "切换成功",
565
- type: "success"
566
- }), s.value = !1;
567
- }
568
- });
569
- });
570
- }
571
- return (r, c) => {
572
- const p = qe, o = je, A = Ye("hasPerm");
573
- return f(), g(o, {
574
- title: "切换身份",
575
- modelValue: s.value,
576
- "onUpdate:modelValue": c[0] || (c[0] = (E) => s.value = E),
577
- width: "700px"
578
- }, {
579
- default: m(() => [
580
- h(p, {
581
- class: "table-top",
582
- ref: "multipleTableRef",
583
- "row-keys": "userId",
584
- "list-loading": X(n),
585
- "table-data": X(t),
586
- "table-label": X(a)
587
- }, {
588
- operation: m((E) => [
589
- H((f(), K("span", {
590
- class: "el-button-color",
591
- onClick: (u) => l(E.data.row)
592
- }, [
593
- q(" 切换 ")
594
- ], 8, bn)), [
595
- [A, ["rbac:user:switch"]]
596
- ])
597
- ]),
598
- _: 1
599
- }, 8, ["list-loading", "table-data", "table-label"])
600
- ]),
601
- _: 1
602
- }, 8, ["modelValue"]);
603
- };
604
- }
605
- });
606
- export {
607
- gn as E,
608
- En as _,
609
- hn as t
610
- };