jmash-core 0.0.39 → 0.0.41

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 (73) hide show
  1. package/dist/{401-CdhEu4T4.mjs → 401-CJFCHgSZ.mjs} +2 -2
  2. package/dist/{404-DkL9XgVz.mjs → 404-CIMxkP9D.mjs} +1 -1
  3. package/dist/{BarChart-BAUAF2EM.mjs → BarChart-DU09mkLm.mjs} +2 -2
  4. package/dist/{PieChart-DawdhjgV.mjs → PieChart-CoqFm60I.mjs} +1 -1
  5. package/dist/{PieChart.vue_vue_type_script_setup_true_lang-BNpfYKP_.mjs → PieChart.vue_vue_type_script_setup_true_lang-sfYOFNKO.mjs} +2 -2
  6. package/dist/{RadarChart-Cmy4Kx6_.mjs → RadarChart-0WISsxpt.mjs} +1 -1
  7. package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-DSbItcHQ.mjs → RadarChart.vue_vue_type_script_setup_true_lang-BIOHXswr.mjs} +2 -2
  8. package/dist/{el-card-C34Q0Uym.mjs → el-card-DTXS4SWb.mjs} +1 -1
  9. package/dist/{el-col-B52VUKzg.mjs → el-col-C1oER81S.mjs} +1 -1
  10. package/dist/{el-form-item-B4UdYQRs.mjs → el-form-item-CJcAbcqr.mjs} +76 -76
  11. package/dist/{index-C8YRqnUz.mjs → index-BAk-5oG9.mjs} +1 -1
  12. package/dist/{index-C80YQc_W.mjs → index-BwIx8FCt.mjs} +32 -32
  13. package/dist/{index-uMvRmAE4.mjs → index-C195Pa7c.mjs} +9761 -11328
  14. package/dist/{index-C8BZXM0g.mjs → index-DB4OW-7Q.mjs} +982 -946
  15. package/dist/{index-Bo7YJt82.mjs → index-ORr19rEl.mjs} +48 -48
  16. package/dist/index.mjs +40 -37
  17. package/dist/index.vue_vue_type_script_setup_true_lang-fPrQh0lj.mjs +720 -0
  18. package/dist/{picture-BWU-5yjz.mjs → picture-Cpgh-vo-.mjs} +106 -106
  19. package/dist/{position-C-x4QW6J.mjs → position-M0AZIV5D.mjs} +1 -1
  20. package/dist/profile-DBegP-cF.mjs +4904 -0
  21. package/dist/{runAs-TvH5stYU.mjs → runAs-xhA9mf-i.mjs} +1 -1
  22. package/dist/runAs.vue_vue_type_script_setup_true_lang-DLfQ0lsg.mjs +610 -0
  23. package/dist/style.css +1 -1
  24. package/dist/{types-D2erVkDs.mjs → types-FkPgztcJ.mjs} +4 -3
  25. package/dist/{updatePwd-B2_g0SZo.mjs → updatePwd-D1EnTbTY.mjs} +1 -1
  26. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-BizfnzzV.mjs → updatePwd.vue_vue_type_script_setup_true_lang-DkH3J5K0.mjs} +20 -20
  27. package/dts/src/api/auth/index.d.ts +27 -2
  28. package/dts/src/api/auth/types.d.ts +42 -34
  29. package/dts/src/api/index.d.ts +7 -1
  30. package/dts/src/api/types.d.ts +10 -0
  31. package/dts/src/index.d.ts +9 -8
  32. package/dts/src/lang/package/zh-cn.d.ts +2 -0
  33. package/dts/src/router/index.d.ts +5 -3
  34. package/dts/src/utils/request.d.ts +2 -0
  35. package/package.json +1 -1
  36. package/dist/edit-BLaPAzUL.mjs +0 -4
  37. package/dist/edit-BXuyxZh9.mjs +0 -4
  38. package/dist/edit-CFf0s07O.mjs +0 -823
  39. package/dist/edit-DZ9hTXeR.mjs +0 -4
  40. package/dist/edit-DlrFLzTL.mjs +0 -4
  41. package/dist/edit-EdaB9SSf.mjs +0 -4
  42. package/dist/edit-Kne2PwwU.mjs +0 -459
  43. package/dist/edit-jg9l_Reg.mjs +0 -4
  44. package/dist/edit.vue_vue_type_script_setup_true_lang-4rHDZXXI.mjs +0 -216
  45. package/dist/edit.vue_vue_type_script_setup_true_lang-BC1zWgeA.mjs +0 -593
  46. package/dist/edit.vue_vue_type_script_setup_true_lang-BckjVLbr.mjs +0 -136
  47. package/dist/edit.vue_vue_type_script_setup_true_lang-Bd_6zzD7.mjs +0 -157
  48. package/dist/edit.vue_vue_type_script_setup_true_lang-BmDTKxvL.mjs +0 -280
  49. package/dist/edit.vue_vue_type_script_setup_true_lang-BwDzJpxL.mjs +0 -226
  50. package/dist/el-checkbox-group-l0sNRNKZ.mjs +0 -1
  51. package/dist/el-date-picker-ZuZ7Icew.mjs +0 -3345
  52. package/dist/el-divider-B2Q7h8Ue.mjs +0 -45
  53. package/dist/el-dropdown-item-CF7AWJJk.mjs +0 -671
  54. package/dist/el-tree-select-B2n1iK36.mjs +0 -1313
  55. package/dist/index-BBtOEuTE.mjs +0 -280
  56. package/dist/index-BYBALKYQ.mjs +0 -74
  57. package/dist/index-BZ0HWESU.mjs +0 -949
  58. package/dist/index-BoC2W_nt.mjs +0 -280
  59. package/dist/index-CLxvt-Vt.mjs +0 -292
  60. package/dist/index-CoJe3ek6.mjs +0 -280
  61. package/dist/index-CtCbUL0r.mjs +0 -471
  62. package/dist/index-D-Ce5smQ.mjs +0 -505
  63. package/dist/index-DDBu5r9o.mjs +0 -93
  64. package/dist/index-DFRe9_oD.mjs +0 -480
  65. package/dist/index-DHMuTZ7a.mjs +0 -246
  66. package/dist/index-DqfVM012.mjs +0 -502
  67. package/dist/index-Niej8SwP.mjs +0 -134
  68. package/dist/index-Orr0L_H3.mjs +0 -63
  69. package/dist/index-wDuQo7A0.mjs +0 -501
  70. package/dist/index.vue_vue_type_script_setup_true_lang-DIcVpe9M.mjs +0 -55
  71. package/dist/moment-CMYwqyVT.mjs +0 -2579
  72. package/dist/profile-VVxA40z5.mjs +0 -262
  73. package/dist/runAs.vue_vue_type_script_setup_true_lang-BHqTCD_Q.mjs +0 -114
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./runAs.vue_vue_type_script_setup_true_lang-BHqTCD_Q.mjs";
1
+ import { _ as f } from "./runAs.vue_vue_type_script_setup_true_lang-DLfQ0lsg.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,610 @@
1
+ import { A as we, t as Be, I as Te, s as Me, H as ke, E as Se, br as Ie, bs as Ae, bt as Ve, bu as _, ax as ee, bv as Re, bw as Le, _ as Oe, bx as $e, c as Ne, g as ie, j as ne, V as Pe, b9 as ze, ag as te, aY as oe, z as De, by as Ue, $ as L, bz as Fe, bA as He, X as Ke, bB as je, al as qe } from "./index-C195Pa7c.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 Ye, 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 Ze, createTextVNode as j, vShow as q, isVNode as ce, render as fe, useModel as Je, resolveDirective as Qe, unref as X } from "vue";
3
+ const xe = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', _e = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, ae = (e) => Array.from(e.querySelectorAll(xe)).filter((n) => en(n) && _e(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, ...o) {
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, ...o), e.dispatchEvent(a), e;
25
+ }, G = "_trap-focus-children", B = [], re = (e) => {
26
+ var n;
27
+ if (B.length === 0)
28
+ return;
29
+ const o = B[B.length - 1][G];
30
+ if (o.length > 0 && e.code === we.tab) {
31
+ if (o.length === 1) {
32
+ e.preventDefault(), document.activeElement !== o[0] && o[0].focus();
33
+ return;
34
+ }
35
+ const s = e.shiftKey, a = e.target === o[0], l = e.target === o[o.length - 1];
36
+ if (a && s && (e.preventDefault(), o[o.length - 1].focus()), l && !s && (e.preventDefault(), o[0].focus()), process.env.NODE_ENV === "test") {
37
+ const r = o.indexOf(e.target);
38
+ r !== -1 && ((n = o[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
+ }, tn = 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: o,
116
+ zIndex: s,
117
+ ns: a,
118
+ size: l
119
+ } = Ve("message-box", w(() => e.buttonSize)), { t: r } = o, { nextZIndex: c } = s, p = C(!1), t = 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 = t.type;
155
+ return { [a.bm("icon", i)]: i && _[i] };
156
+ }), E = ee(), u = ee(), pe = w(() => t.icon || _[t.type] || ""), me = w(() => !!t.message), T = C(), W = C(), V = C(), P = C(), Y = C(), ve = w(() => t.confirmButtonClass);
157
+ se(() => t.inputValue, async (i) => {
158
+ await $(), e.boxType === "prompt" && i !== null && J();
159
+ }, { immediate: !0 }), se(() => p.value, (i) => {
160
+ var b, M;
161
+ i && (e.boxType !== "prompt" && (t.autofocus ? V.value = (M = (b = Y.value) == null ? void 0 : b.$el) != null ? M : T.value : V.value = T.value), t.zIndex = c()), e.boxType === "prompt" && (i ? $().then(() => {
162
+ var x;
163
+ P.value && P.value.$el && (t.autofocus ? V.value = (x = he()) != null ? x : T.value : V.value = T.value);
164
+ }) : (t.editorErrorMessage = "", t.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
+ t.action && n("action", t.action);
175
+ }));
176
+ }
177
+ const Z = () => {
178
+ e.closeOnClickModal && z(t.distinguishCancelAndClose ? "close" : "cancel");
179
+ }, ye = $e(Z), Ce = (i) => {
180
+ if (t.inputType !== "textarea")
181
+ return i.preventDefault(), z("confirm");
182
+ }, z = (i) => {
183
+ var b;
184
+ e.boxType === "prompt" && i === "confirm" && !J() || (t.action = i, t.beforeClose ? (b = t.beforeClose) == null || b.call(t, i, t, R) : R());
185
+ }, J = () => {
186
+ if (e.boxType === "prompt") {
187
+ const i = t.inputPattern;
188
+ if (i && !i.test(t.inputValue || ""))
189
+ return t.editorErrorMessage = t.inputErrorMessage || r("el.messagebox.error"), t.validateError = !0, !1;
190
+ const b = t.inputValidator;
191
+ if (typeof b == "function") {
192
+ const M = b(t.inputValue);
193
+ if (M === !1)
194
+ return t.editorErrorMessage = t.inputErrorMessage || r("el.messagebox.error"), t.validateError = !0, !1;
195
+ if (typeof M == "string")
196
+ return t.editorErrorMessage = M, t.validateError = !0, !1;
197
+ }
198
+ }
199
+ return t.editorErrorMessage = "", t.validateError = !1, !0;
200
+ }, he = () => {
201
+ const i = P.value.$refs;
202
+ return i.input || i.textarea;
203
+ }, Q = () => {
204
+ z("close");
205
+ }, Ee = () => {
206
+ e.closeOnPressEscape && Q();
207
+ };
208
+ return e.lockScroll && Le(p), {
209
+ ...We(t),
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: Y,
225
+ doClose: R,
226
+ handleClose: Q,
227
+ onCloseRequested: Ee,
228
+ handleWrapperClick: Z,
229
+ handleInputEnter: Ce,
230
+ handleAction: z,
231
+ t: r
232
+ };
233
+ }
234
+ }), on = ["aria-label", "aria-describedby"], sn = ["aria-label"], ln = ["id"];
235
+ function an(e, n, o, s, a, l) {
236
+ const r = k("el-icon"), c = k("close"), p = k("el-input"), t = k("el-button"), A = k("el-focus-trap"), E = k("el-overlay");
237
+ return f(), g(Ye, {
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
+ Ze(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
+ j(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
+ [q, e.showInput]
376
+ ])
377
+ ], 10, ln),
378
+ v("div", {
379
+ class: d(e.ns.e("btns"))
380
+ }, [
381
+ e.showCancelButton ? (f(), g(t, {
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
+ j(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(t, {
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
+ j(O(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
408
+ ]),
409
+ _: 1
410
+ }, 8, ["loading", "class", "round", "disabled", "size"]), [
411
+ [q, e.showConfirmButton]
412
+ ])
413
+ ], 2)
414
+ ], 6)
415
+ ]),
416
+ _: 3
417
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
418
+ ], 42, on)
419
+ ]),
420
+ _: 3
421
+ }, 8, ["z-index", "overlay-class", "mask"]), [
422
+ [q, e.visible]
423
+ ])
424
+ ]),
425
+ _: 3
426
+ });
427
+ }
428
+ var rn = /* @__PURE__ */ Oe(tn, [["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)), oe(e.appendTo) && (n = e.appendTo), oe(n) || (De("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), n = document.body)), n;
432
+ }, dn = (e, n, o = null) => {
433
+ const s = h(rn, e, te(e.message) || ce(e.message) ? {
434
+ default: te(e.message) ? e.message : () => e.message
435
+ } : null);
436
+ return s.appContext = o, fe(s, n), un(e).appendChild(n.firstElementChild), s.component;
437
+ }, cn = () => document.createElement("div"), fn = (e, n) => {
438
+ const o = cn();
439
+ e.onVanish = () => {
440
+ fe(null, o), 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, o, 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 o;
455
+ return ie(e) || ce(e) ? e = {
456
+ message: e
457
+ } : o = e.callback, new Promise((s, a) => {
458
+ const l = fn(e, n ?? I._context);
459
+ N.set(l, {
460
+ options: e,
461
+ callback: o,
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, o, s, a) => {
477
+ let l = "";
478
+ return Pe(o) ? (s = o, l = "") : ze(o) ? l = "" : l = o, 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), o = C([]), s = Je(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, o.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(), t = await L().getUserInfo();
563
+ await He().generateRoutes(p, t), Ke({
564
+ message: "切换成功",
565
+ type: "success"
566
+ }), s.value = !1;
567
+ }
568
+ });
569
+ });
570
+ }
571
+ return (r, c) => {
572
+ const p = je, t = qe, A = Qe("hasPerm");
573
+ return f(), g(t, {
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(o),
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
+ j(" 切换 ")
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
+ };