@skyfox2000/webui 1.2.9 → 1.2.11
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/lib/assets/modules/{file-upload-BYIvmkmy.js → file-upload-CGyzCx7I.js} +1 -1
- package/lib/assets/modules/{form-excel-BUX2QW11.js → form-excel-DWirWVPA.js} +1 -1
- package/lib/assets/modules/{index-DcRkhkn2.js → index-C1zkNPmi.js} +1 -1
- package/lib/assets/modules/{index-jl5Ie2tZ.js → index-Czk7DDWM.js} +2 -2
- package/lib/assets/modules/{menuTabs-DY1XBq16.js → menuTabs-BOax-dro.js} +2 -2
- package/lib/assets/modules/{toolIcon-BDIOj_3l.js → toolIcon-vJF7OgP6.js} +1 -1
- package/lib/assets/modules/{uploadList-BPG5whz7.js → uploadList-BW23uSvi.js} +4 -4
- package/lib/assets/modules/{uploadList-D2Ux4h1N.js → uploadList-DaUjVXLU.js} +251 -237
- package/lib/components/common/icon/index.vue.d.ts +1 -1
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +3 -3
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +4 -4
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/stores/userInfo.d.ts +1 -0
- package/lib/webui.es.js +11 -11
- package/package.json +1 -1
- package/src/stores/userInfo.ts +28 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var ia = Object.defineProperty;
|
|
2
2
|
var ua = (e, t, a) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
-
var
|
|
4
|
-
import { inject as j, ref as c, provide as
|
|
3
|
+
var L = (e, t, a) => ua(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { inject as j, ref as c, provide as Se, watch as E, toRaw as je, h as F, nextTick as ca, shallowRef as qe, defineComponent as ee, reactive as fa, useAttrs as ie, onMounted as ue, onUnmounted as ce, createElementBlock as k, openBlock as x, createVNode as J, unref as A, mergeProps as fe, withCtx as Q, createCommentVNode as B, Fragment as z, renderList as Oe, createBlock as ke, normalizeClass as Je, createTextVNode as Le, toDisplayString as W, createElementVNode as pa } from "vue";
|
|
5
5
|
import { AutoComplete as da, CheckboxGroup as ha, Checkbox as ma, RadioGroup as va, Radio as ga, Select as ya, SelectOption as ba } from "ant-design-vue";
|
|
6
6
|
import { createPinia as Sa, defineStore as ae } from "pinia";
|
|
7
7
|
import Ia from "pinia-plugin-persistedstate";
|
|
8
|
-
import { combineParams as
|
|
9
|
-
import { ResStatus as
|
|
8
|
+
import { combineParams as Me, EnvConfig as ne, AppAction as He, AppSource as Ke, isMicroApp as oe, mainAppApis as N, isBaseMicroApp as Aa } from "@skyfox2000/microbase";
|
|
9
|
+
import { ResStatus as R, httpPost as K, setToken as te, fieldMapping as xa, parseFieldTemplate as Te, API_HOST as Ie, SERVER_HOST as Ea } from "@skyfox2000/fapi";
|
|
10
10
|
import I from "vue-m-message";
|
|
11
|
-
import
|
|
12
|
-
import { createRouter as
|
|
11
|
+
import $e from "async-validator";
|
|
12
|
+
import { createRouter as Ra, createWebHashHistory as Ta } from "vue-router";
|
|
13
13
|
import "dayjs";
|
|
14
14
|
import "vue-draggable-next";
|
|
15
15
|
const Pa = Sa();
|
|
16
16
|
Pa.use(Ia);
|
|
17
|
-
var
|
|
18
|
-
const
|
|
17
|
+
var D = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.LabelWidth = "FormItem.LabelWidth", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(D || {});
|
|
18
|
+
const T = class T {
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
L(T, "dict", {}), L(T, "Keys", {
|
|
21
21
|
EnableDisable: "EnableDisable",
|
|
22
22
|
SuccessResult: "SuccessResult",
|
|
23
23
|
YesNo: "YesNo",
|
|
@@ -27,25 +27,25 @@ k(R, "dict", {}), k(R, "Keys", {
|
|
|
27
27
|
* @param key 名称
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
L(T, "getOptions", (t) => T.dict[t]), /**
|
|
31
31
|
* 静态选择项对象
|
|
32
32
|
* @param key 名称
|
|
33
33
|
* @param value 值
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
L(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
|
|
37
37
|
* 设置静态选择项
|
|
38
38
|
* @param key 名称
|
|
39
39
|
* @param list 列表
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
L(T, "setOptions", (t, a) => {
|
|
42
|
+
T.dict[t] = a;
|
|
43
43
|
}), /**
|
|
44
44
|
* 启用/停用选项
|
|
45
45
|
* - 启用 1
|
|
46
46
|
* - 停用 0
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
L(T, "EnableDisable", [
|
|
49
49
|
{
|
|
50
50
|
label: "启用",
|
|
51
51
|
text: "✅ 启用",
|
|
@@ -61,7 +61,7 @@ k(R, "EnableDisable", [
|
|
|
61
61
|
* - 成功 1
|
|
62
62
|
* - 失败 0
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
L(T, "SuccessResult", [
|
|
65
65
|
{
|
|
66
66
|
label: "成功",
|
|
67
67
|
text: "✅ 成功",
|
|
@@ -77,7 +77,7 @@ k(R, "SuccessResult", [
|
|
|
77
77
|
* - 是 1
|
|
78
78
|
* - 否 0
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
L(T, "YesNo", [
|
|
81
81
|
{
|
|
82
82
|
label: "是",
|
|
83
83
|
text: "✅ 是",
|
|
@@ -93,7 +93,7 @@ k(R, "YesNo", [
|
|
|
93
93
|
* - 男 M
|
|
94
94
|
* - 女 F
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
L(T, "MaleFemale", [
|
|
97
97
|
{
|
|
98
98
|
label: "男",
|
|
99
99
|
text: "男 👨",
|
|
@@ -105,12 +105,12 @@ k(R, "MaleFemale", [
|
|
|
105
105
|
value: "F"
|
|
106
106
|
}
|
|
107
107
|
]);
|
|
108
|
-
let M =
|
|
108
|
+
let M = T;
|
|
109
109
|
M.setOptions("EnableDisable", M.EnableDisable);
|
|
110
110
|
M.setOptions("SuccessResult", M.SuccessResult);
|
|
111
111
|
M.setOptions("YesNo", M.YesNo);
|
|
112
112
|
M.setOptions("MaleFemale", M.MaleFemale);
|
|
113
|
-
const
|
|
113
|
+
const pe = {
|
|
114
114
|
/**
|
|
115
115
|
* 自动接口加载数据
|
|
116
116
|
* - 默认为true
|
|
@@ -211,7 +211,7 @@ const ce = {
|
|
|
211
211
|
type: Array,
|
|
212
212
|
required: !1
|
|
213
213
|
}
|
|
214
|
-
}, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1,
|
|
214
|
+
}, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, de = (e, t) => {
|
|
215
215
|
var r;
|
|
216
216
|
return {
|
|
217
217
|
url: "",
|
|
@@ -220,7 +220,7 @@ const ce = {
|
|
|
220
220
|
...t.url,
|
|
221
221
|
loadingText: t.loadingText
|
|
222
222
|
};
|
|
223
|
-
},
|
|
223
|
+
}, he = (e, t) => {
|
|
224
224
|
const a = e.page, s = t.url;
|
|
225
225
|
if (!s || !s.url) {
|
|
226
226
|
const n = `URL未设置: ${t.urlKey}`;
|
|
@@ -228,12 +228,12 @@ const ce = {
|
|
|
228
228
|
}
|
|
229
229
|
s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
|
|
230
230
|
let r = JSON.parse(JSON.stringify(t.params));
|
|
231
|
-
return t.processParams && (r = t.processParams(r)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0),
|
|
232
|
-
},
|
|
231
|
+
return t.processParams && (r = t.processParams(r)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), K(s, r).then((n) => (t.loadingState && (t.loadingState.value = !1), n)).catch((n) => (t.loadingState && (t.loadingState.value = !1), null));
|
|
232
|
+
}, Ne = (e, t) => {
|
|
233
233
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
234
|
-
const a =
|
|
235
|
-
return t.url = a,
|
|
236
|
-
}, xt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url =
|
|
234
|
+
const a = de(e, t);
|
|
235
|
+
return t.url = a, he(e, t);
|
|
236
|
+
}, xt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = de(e, t), he(e, t).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && (t.hideErrorToast || I.success("执行成功!")), a))), Be = (e, t = {}) => {
|
|
237
237
|
const a = t.primaryKey || "Id";
|
|
238
238
|
if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
|
|
239
239
|
return I.error("错误!无保存数据!"), Promise.resolve(null);
|
|
@@ -243,8 +243,8 @@ const ce = {
|
|
|
243
243
|
loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
|
|
244
244
|
};
|
|
245
245
|
s.params.Query[a] = s.params.Data[a];
|
|
246
|
-
const r =
|
|
247
|
-
return s.url = r,
|
|
246
|
+
const r = de(e, s);
|
|
247
|
+
return s.url = r, he(e, s).then((n) => ((n == null ? void 0 : n.status) === R.SUCCESS && (t.hideErrorToast || I.success("保存成功!")), n));
|
|
248
248
|
}, wa = (e, t, a = {}) => {
|
|
249
249
|
const s = a.primaryKey || "Id";
|
|
250
250
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
@@ -255,18 +255,18 @@ const ce = {
|
|
|
255
255
|
};
|
|
256
256
|
if (Array.isArray(t) ? r.params.Query[s] = t : r.params.Query[s] = t[s], P(r.params.Query) || P(r.params.Query[s]))
|
|
257
257
|
return I.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
258
|
-
const n =
|
|
259
|
-
return r.url = n,
|
|
260
|
-
}, Oa = (e, t) =>
|
|
258
|
+
const n = de(e, r);
|
|
259
|
+
return r.url = n, he(e, r).then((o) => ((o == null ? void 0 : o.status) === R.SUCCESS && (a.hideErrorToast || I.success("删除成功!")), o));
|
|
260
|
+
}, Oa = (e, t) => Ne(e, {
|
|
261
261
|
urlKey: "tree",
|
|
262
262
|
params: {},
|
|
263
263
|
loadingState: e.isTreeLoading,
|
|
264
264
|
loadingText: !1,
|
|
265
|
-
processParams: () =>
|
|
266
|
-
}).then((a) => (a == null ? void 0 : a.status) ===
|
|
265
|
+
processParams: () => Me(e.treeQuery, t)
|
|
266
|
+
}).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
|
|
267
267
|
let Y;
|
|
268
268
|
const Et = (e) => {
|
|
269
|
-
Y = new
|
|
269
|
+
Y = new $e({}), Y.messages({
|
|
270
270
|
required: "${label}不能为空",
|
|
271
271
|
types: {
|
|
272
272
|
number: "${label}必须是数字"
|
|
@@ -292,7 +292,7 @@ const Et = (e) => {
|
|
|
292
292
|
},
|
|
293
293
|
...e
|
|
294
294
|
});
|
|
295
|
-
},
|
|
295
|
+
}, Rt = (e) => {
|
|
296
296
|
if (!e || P(e))
|
|
297
297
|
return [];
|
|
298
298
|
const t = [], a = Y.messages(), s = (n, o, l) => {
|
|
@@ -346,15 +346,15 @@ const Et = (e) => {
|
|
|
346
346
|
rules: i
|
|
347
347
|
});
|
|
348
348
|
}), t;
|
|
349
|
-
},
|
|
349
|
+
}, me = async (e) => {
|
|
350
350
|
const t = e.formData.value, a = e.formRules.value;
|
|
351
|
-
P(a) || (
|
|
351
|
+
P(a) || (De(e), e.ruleValidator || (e.ruleValidator = new $e({}), e.ruleValidator.messages(Y.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
|
|
352
352
|
}).catch(({ fields: s }) => s));
|
|
353
|
-
},
|
|
354
|
-
}).catch(({ fields: s }) => s)),
|
|
353
|
+
}, Tt = async (e, t, a) => (a || (a = new $e({}), a.messages(Y.messages()), a.define(t)), a.validate(e).then(() => {
|
|
354
|
+
}).catch(({ fields: s }) => s)), De = (e) => {
|
|
355
355
|
e.ruleResults.value = void 0;
|
|
356
|
-
},
|
|
357
|
-
const e = j(
|
|
356
|
+
}, ve = () => {
|
|
357
|
+
const e = j(D.EditorControl, void 0), t = c(j(D.LabelText, "")), a = c(j(D.RuleKey, "")), s = j(D.ErrInfo, void 0);
|
|
358
358
|
return {
|
|
359
359
|
editorCtrl: e,
|
|
360
360
|
labelText: t,
|
|
@@ -414,22 +414,22 @@ const Et = (e) => {
|
|
|
414
414
|
}
|
|
415
415
|
}), s.value.length > 0 && (n.value = "error"), { msg: r, ruleErrors: s, errClass: n };
|
|
416
416
|
}, Pt = (e, t) => {
|
|
417
|
-
|
|
417
|
+
Se(D.LabelText, e.label || ""), Se(D.RuleKey, e.rule || "");
|
|
418
418
|
const a = ka(e, t);
|
|
419
|
-
return
|
|
419
|
+
return Se(D.ErrInfo, a), a;
|
|
420
420
|
}, wt = (e) => {
|
|
421
421
|
ze(e);
|
|
422
422
|
}, Ot = (e) => {
|
|
423
423
|
const t = e.page, a = e.formData.value;
|
|
424
424
|
a[e.primaryKey ?? t.primaryKey] = null, ze(e);
|
|
425
425
|
}, kt = (e) => {
|
|
426
|
-
|
|
426
|
+
Fe(e), e.visible.value = !1;
|
|
427
427
|
}, ze = async (e) => {
|
|
428
428
|
var s;
|
|
429
429
|
const t = e.page;
|
|
430
|
-
if (e.isFormSaving.value = !0,
|
|
430
|
+
if (e.isFormSaving.value = !0, De(e), e.beforeSave && e.beforeSave() === !1)
|
|
431
431
|
return e.isFormSaving.value = !1, Promise.resolve();
|
|
432
|
-
if (e.formRules.value && await
|
|
432
|
+
if (e.formRules.value && await me(e), e.ruleResults.value)
|
|
433
433
|
return I.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
|
|
434
434
|
const a = e.formData.value;
|
|
435
435
|
return Be(
|
|
@@ -451,7 +451,7 @@ const Et = (e) => {
|
|
|
451
451
|
}
|
|
452
452
|
).then((r) => {
|
|
453
453
|
var n, o;
|
|
454
|
-
if ((r == null ? void 0 : r.status) ===
|
|
454
|
+
if ((r == null ? void 0 : r.status) === R.SUCCESS)
|
|
455
455
|
I.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
|
|
456
456
|
else if (r != null && r.msg && ((n = r == null ? void 0 : r.msg) == null ? void 0 : n.indexOf("Duplicate entry")) > -1) {
|
|
457
457
|
const l = (o = r == null ? void 0 : r.msg) == null ? void 0 : o.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
|
|
@@ -483,36 +483,36 @@ const Et = (e) => {
|
|
|
483
483
|
});
|
|
484
484
|
}, Mt = (e) => {
|
|
485
485
|
const t = e.grid;
|
|
486
|
-
t && (t.rowData.value = void 0), e && (
|
|
486
|
+
t && (t.rowData.value = void 0), e && (Fe(e), e.visible && (e.visible.value = !1), setTimeout(() => {
|
|
487
487
|
e.visible.value = !0;
|
|
488
488
|
}, 1));
|
|
489
489
|
}, We = (e, t) => {
|
|
490
|
-
|
|
490
|
+
Fe(e);
|
|
491
491
|
const a = { ...e.formData.value, ...t };
|
|
492
492
|
e.formData.value = JSON.parse(JSON.stringify(a));
|
|
493
|
-
},
|
|
494
|
-
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {},
|
|
495
|
-
},
|
|
493
|
+
}, Fe = (e) => {
|
|
494
|
+
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, De(e);
|
|
495
|
+
}, le = "/login/", re = [], Ma = (e) => {
|
|
496
496
|
for (const t of e) {
|
|
497
|
-
const a =
|
|
498
|
-
a !== -1 &&
|
|
497
|
+
const a = re.findIndex((s) => s.path === t.path);
|
|
498
|
+
a !== -1 && re.splice(a, 1), re.push(t), X.addRoute(t);
|
|
499
499
|
}
|
|
500
500
|
}, Ye = (e, t, a, s = "") => {
|
|
501
501
|
const r = s + (s ? "/" : "") + e.path;
|
|
502
502
|
t[r] = { ...e, parent: a }, e.children && e.children.forEach((n) => Ye(n, t, e, r));
|
|
503
|
-
}, X =
|
|
504
|
-
history:
|
|
505
|
-
routes:
|
|
503
|
+
}, X = Ra({
|
|
504
|
+
history: Ta("/"),
|
|
505
|
+
routes: re
|
|
506
506
|
}), $a = (e, t) => {
|
|
507
507
|
var r, n;
|
|
508
508
|
const a = ((r = e.meta) == null ? void 0 : r.roles) ?? [], s = (n = e.meta) == null ? void 0 : n.permission;
|
|
509
509
|
if (!t)
|
|
510
510
|
return a.length === 0 && !s;
|
|
511
511
|
if (t) {
|
|
512
|
-
const o =
|
|
513
|
-
if (
|
|
512
|
+
const o = H();
|
|
513
|
+
if (ne.VITE_PERMISSION_MODE === "role")
|
|
514
514
|
return a.length === 0 ? !0 : o.hasRole(a);
|
|
515
|
-
if (
|
|
515
|
+
if (ne.VITE_PERMISSION_MODE === "permit") {
|
|
516
516
|
if (a.length === 0 && !s)
|
|
517
517
|
return !0;
|
|
518
518
|
let l = !1, i = !1;
|
|
@@ -524,7 +524,7 @@ const Et = (e) => {
|
|
|
524
524
|
X.beforeEach((e, t, a) => {
|
|
525
525
|
var l;
|
|
526
526
|
const s = e;
|
|
527
|
-
if (e.path.startsWith("/error/") || e.path.startsWith(
|
|
527
|
+
if (e.path.startsWith("/error/") || e.path.startsWith(le))
|
|
528
528
|
return a();
|
|
529
529
|
const r = s.meta, o = ((r == null ? void 0 : r.roles) ?? []).length > 0 || ((l = r == null ? void 0 : r.permission) == null ? void 0 : l.length);
|
|
530
530
|
if (e.path === "/") {
|
|
@@ -544,9 +544,9 @@ X.beforeEach((e, t, a) => {
|
|
|
544
544
|
if (!o)
|
|
545
545
|
a();
|
|
546
546
|
else {
|
|
547
|
-
const i =
|
|
547
|
+
const i = H();
|
|
548
548
|
if (!i.isLogin)
|
|
549
|
-
a({ path:
|
|
549
|
+
a({ path: le });
|
|
550
550
|
else {
|
|
551
551
|
if (!C().menuLoaded) {
|
|
552
552
|
q.value = {
|
|
@@ -560,19 +560,19 @@ X.beforeEach((e, t, a) => {
|
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
});
|
|
563
|
-
const
|
|
563
|
+
const Na = (e) => {
|
|
564
564
|
if (q.value) {
|
|
565
565
|
const { to: t, next: a } = q.value;
|
|
566
566
|
q.value = null, t.path === "/" ? a(e) : a(t.path);
|
|
567
567
|
}
|
|
568
|
-
},
|
|
569
|
-
const t =
|
|
568
|
+
}, Da = (e) => {
|
|
569
|
+
const t = Ue();
|
|
570
570
|
if (t.TabEnabled) {
|
|
571
571
|
if (Fa(e.key, t.TabPanes))
|
|
572
572
|
return;
|
|
573
573
|
t.TabPanes.push(e);
|
|
574
574
|
}
|
|
575
|
-
}, Fa = (e, t) => t.find((a) => a.key === e),
|
|
575
|
+
}, Fa = (e, t) => t.find((a) => a.key === e), Ue = ae("pageInfo", {
|
|
576
576
|
state: () => ({
|
|
577
577
|
TabActive: "",
|
|
578
578
|
TabPanes: [],
|
|
@@ -617,7 +617,7 @@ const Da = (e) => {
|
|
|
617
617
|
// 默认为true
|
|
618
618
|
keepAlive: !(a.meta && !a.meta.keepAlive)
|
|
619
619
|
};
|
|
620
|
-
|
|
620
|
+
Da(s), this.TabActive = e;
|
|
621
621
|
}
|
|
622
622
|
},
|
|
623
623
|
persist: !1
|
|
@@ -628,13 +628,13 @@ const Da = (e) => {
|
|
|
628
628
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
629
629
|
loadingText: !1
|
|
630
630
|
}
|
|
631
|
-
},
|
|
632
|
-
const t =
|
|
631
|
+
}, Ae = /* @__PURE__ */ new Map(), Ca = (e) => {
|
|
632
|
+
const t = H(), { roles: a, permission: s } = e.meta || {};
|
|
633
633
|
if (P(a) && P(s))
|
|
634
634
|
return !0;
|
|
635
|
-
if (
|
|
635
|
+
if (ne.VITE_PERMISSION_MODE === "role")
|
|
636
636
|
return P(a) ? !0 : t.hasRole(a);
|
|
637
|
-
if (
|
|
637
|
+
if (ne.VITE_PERMISSION_MODE === "permit") {
|
|
638
638
|
let r = !1, n = !1;
|
|
639
639
|
return P(a) || (r = t.hasRole(a)), t.isAdmin() ? r : (P(s) || (n = t.hasPermit(e.path, s)), r || n);
|
|
640
640
|
}
|
|
@@ -662,8 +662,8 @@ const Da = (e) => {
|
|
|
662
662
|
AppCode: "",
|
|
663
663
|
Version: "",
|
|
664
664
|
Host: "",
|
|
665
|
-
Source:
|
|
666
|
-
Action:
|
|
665
|
+
Source: Ke.Manual,
|
|
666
|
+
Action: He.App,
|
|
667
667
|
Path: "",
|
|
668
668
|
Icon: "",
|
|
669
669
|
Routes: [],
|
|
@@ -688,13 +688,13 @@ const Da = (e) => {
|
|
|
688
688
|
});
|
|
689
689
|
},
|
|
690
690
|
async getRemoteAppList() {
|
|
691
|
-
return
|
|
691
|
+
return K(Ua.appList, {
|
|
692
692
|
Query: {
|
|
693
693
|
AppCode: this.appInfo.AppCode,
|
|
694
694
|
Enabled: 1
|
|
695
695
|
}
|
|
696
696
|
}).then((e) => {
|
|
697
|
-
(e == null ? void 0 : e.status) ===
|
|
697
|
+
(e == null ? void 0 : e.status) === R.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
|
|
698
698
|
});
|
|
699
699
|
},
|
|
700
700
|
async toDefaultApp(e) {
|
|
@@ -727,7 +727,7 @@ const Da = (e) => {
|
|
|
727
727
|
flattenRoutes: {},
|
|
728
728
|
Routes: t ?? [],
|
|
729
729
|
defaultPage: ""
|
|
730
|
-
}), (!
|
|
730
|
+
}), (!oe() || !Aa()) && (await H().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
731
731
|
},
|
|
732
732
|
/**
|
|
733
733
|
* 设置当前应用路由信息
|
|
@@ -746,14 +746,14 @@ const Da = (e) => {
|
|
|
746
746
|
if (Object.keys(t).forEach((a) => {
|
|
747
747
|
const s = t[a];
|
|
748
748
|
s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
|
|
749
|
-
}),
|
|
749
|
+
}), H().isLogin) {
|
|
750
750
|
const a = Xe(this.appInfo.Routes);
|
|
751
751
|
if (Ma(a), this.appInfo.defaultPage = Ze(a) || "", this.appInfo.defaultPage) {
|
|
752
|
-
if (this.menuLoaded = !0,
|
|
752
|
+
if (this.menuLoaded = !0, N.value && N.value.mainAppPush) {
|
|
753
753
|
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
754
|
-
|
|
754
|
+
N.value.mainAppPush(s);
|
|
755
755
|
}
|
|
756
|
-
|
|
756
|
+
Na(this.appInfo.defaultPage);
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
},
|
|
@@ -771,10 +771,10 @@ const Da = (e) => {
|
|
|
771
771
|
* @param path 路由地址
|
|
772
772
|
*/
|
|
773
773
|
push(e) {
|
|
774
|
-
this.findRoute(e) &&
|
|
775
|
-
if (X.push({ path: e }),
|
|
774
|
+
this.findRoute(e) && Ue().setTabActive(e), ca(() => {
|
|
775
|
+
if (X.push({ path: e }), N.value && N.value.mainAppPush) {
|
|
776
776
|
const a = this.formatRoute(e);
|
|
777
|
-
|
|
777
|
+
N.value.mainAppPush(a);
|
|
778
778
|
}
|
|
779
779
|
});
|
|
780
780
|
},
|
|
@@ -793,7 +793,7 @@ const Da = (e) => {
|
|
|
793
793
|
* @returns 组件实例
|
|
794
794
|
*/
|
|
795
795
|
cacheComponent(e, t) {
|
|
796
|
-
let a =
|
|
796
|
+
let a = Ae.get(t.path);
|
|
797
797
|
if (!a)
|
|
798
798
|
if (this.CachedComponents.includes(t.path))
|
|
799
799
|
a = {
|
|
@@ -802,7 +802,7 @@ const Da = (e) => {
|
|
|
802
802
|
render() {
|
|
803
803
|
return F(e);
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, Ae.set(t.path, a);
|
|
806
806
|
else return e;
|
|
807
807
|
return a;
|
|
808
808
|
},
|
|
@@ -811,7 +811,7 @@ const Da = (e) => {
|
|
|
811
811
|
* @param path 路由地址
|
|
812
812
|
*/
|
|
813
813
|
excludeComponent(e) {
|
|
814
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
814
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Ae.delete(e);
|
|
815
815
|
},
|
|
816
816
|
/**
|
|
817
817
|
* 路由路径层级查询,返回面包屑
|
|
@@ -831,8 +831,8 @@ const Da = (e) => {
|
|
|
831
831
|
AppCode: "",
|
|
832
832
|
Version: "",
|
|
833
833
|
Host: "",
|
|
834
|
-
Source:
|
|
835
|
-
Action:
|
|
834
|
+
Source: Ke.Manual,
|
|
835
|
+
Action: He.App,
|
|
836
836
|
Path: "",
|
|
837
837
|
Icon: "",
|
|
838
838
|
Routes: [],
|
|
@@ -842,11 +842,11 @@ const Da = (e) => {
|
|
|
842
842
|
}, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
|
|
843
843
|
},
|
|
844
844
|
logout() {
|
|
845
|
-
this.clean(), X.push({ path:
|
|
845
|
+
this.clean(), X.push({ path: le + "#/" }), oe() && N.value && N.value.mainAppPush && N.value.mainAppPush(le + "#/");
|
|
846
846
|
}
|
|
847
847
|
},
|
|
848
848
|
persist: !1
|
|
849
|
-
}), ea = "Token解析失败",
|
|
849
|
+
}), ea = "Token解析失败", Ve = "登录过期,请重新登录", Ce = {
|
|
850
850
|
login: {
|
|
851
851
|
api: "PLATFORM_API",
|
|
852
852
|
url: "/openapi/LoginSrv/login",
|
|
@@ -871,20 +871,20 @@ const Da = (e) => {
|
|
|
871
871
|
},
|
|
872
872
|
Query: e
|
|
873
873
|
};
|
|
874
|
-
return
|
|
875
|
-
},
|
|
874
|
+
return K(Ce.login, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a : null);
|
|
875
|
+
}, Ha = (e) => {
|
|
876
876
|
let t = {
|
|
877
877
|
Query: {
|
|
878
878
|
AppId: e
|
|
879
879
|
}
|
|
880
880
|
};
|
|
881
|
-
return
|
|
882
|
-
},
|
|
881
|
+
return K(Ce.auth, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a.data : (I.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
|
|
882
|
+
}, Ka = () => {
|
|
883
883
|
let e = {
|
|
884
884
|
Option: {},
|
|
885
885
|
Query: {}
|
|
886
886
|
};
|
|
887
|
-
return
|
|
887
|
+
return K(Ce.logout, e).then((t) => (t == null ? void 0 : t.status) === R.SUCCESS ? t.data : null);
|
|
888
888
|
}, Va = (e) => {
|
|
889
889
|
try {
|
|
890
890
|
const a = JSON.parse(atob(e.split(".")[1])).exp;
|
|
@@ -892,10 +892,10 @@ const Da = (e) => {
|
|
|
892
892
|
} catch (t) {
|
|
893
893
|
return console.error(ea, t), !0;
|
|
894
894
|
}
|
|
895
|
-
},
|
|
895
|
+
}, xe = (e, t) => e == "" ? (I.error(Ve, {
|
|
896
896
|
duration: 3e3,
|
|
897
897
|
onClose: t
|
|
898
|
-
}), !1) : Va(e) ? (I.error(
|
|
898
|
+
}), !1) : Va(e) ? (I.error(Ve, {
|
|
899
899
|
duration: 3e3,
|
|
900
900
|
onClose: t
|
|
901
901
|
}), !1) : !0, Qa = (e) => {
|
|
@@ -905,7 +905,7 @@ const Da = (e) => {
|
|
|
905
905
|
} catch (t) {
|
|
906
906
|
return console.error(ea, t), !1;
|
|
907
907
|
}
|
|
908
|
-
},
|
|
908
|
+
}, O = c(""), G = c(null), H = ae("userInfo", {
|
|
909
909
|
state: () => ({
|
|
910
910
|
isLogin: !1,
|
|
911
911
|
userInfo: {
|
|
@@ -919,6 +919,12 @@ const Da = (e) => {
|
|
|
919
919
|
refreshToken: ""
|
|
920
920
|
}),
|
|
921
921
|
actions: {
|
|
922
|
+
/**
|
|
923
|
+
* 启动时初始化用户信息
|
|
924
|
+
*/
|
|
925
|
+
init() {
|
|
926
|
+
oe() || (this.token ? (xe(this.token, () => this.clean()), te(this.token), O.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
|
|
927
|
+
},
|
|
922
928
|
/**
|
|
923
929
|
* 登录操作
|
|
924
930
|
* @param loginInfo 登录信息
|
|
@@ -932,11 +938,11 @@ const Da = (e) => {
|
|
|
932
938
|
return s;
|
|
933
939
|
{
|
|
934
940
|
const r = a.data;
|
|
935
|
-
if (this.token = r.token,
|
|
941
|
+
if (this.token = r.token, te(this.token), this.isLogin = !0, Qa(r))
|
|
936
942
|
this.userInfo = {
|
|
937
943
|
...this.userInfo,
|
|
938
944
|
...r.UserInfo
|
|
939
|
-
},
|
|
945
|
+
}, O.value = r.UserInfo.UserLevel;
|
|
940
946
|
else {
|
|
941
947
|
I.error("用户信息解析失败");
|
|
942
948
|
return;
|
|
@@ -956,7 +962,7 @@ const Da = (e) => {
|
|
|
956
962
|
if (G.value && G.value.appId === e)
|
|
957
963
|
return !0;
|
|
958
964
|
try {
|
|
959
|
-
const t = await
|
|
965
|
+
const t = await Ha(e);
|
|
960
966
|
return t ? (G.value = {
|
|
961
967
|
appId: e,
|
|
962
968
|
permits: t.permits || [],
|
|
@@ -972,7 +978,7 @@ const Da = (e) => {
|
|
|
972
978
|
* @returns 是否有角色权限
|
|
973
979
|
*/
|
|
974
980
|
hasRole(e) {
|
|
975
|
-
return
|
|
981
|
+
return O.value ? Array.isArray(e) ? e.includes(O.value) : O.value === e : !1;
|
|
976
982
|
},
|
|
977
983
|
/**
|
|
978
984
|
* 检查功能权限
|
|
@@ -999,21 +1005,21 @@ const Da = (e) => {
|
|
|
999
1005
|
* @param token 用户Token
|
|
1000
1006
|
*/
|
|
1001
1007
|
setUserInfo(e, t) {
|
|
1002
|
-
if (!
|
|
1008
|
+
if (!xe(t)) {
|
|
1003
1009
|
this.clean();
|
|
1004
1010
|
return;
|
|
1005
1011
|
}
|
|
1006
|
-
|
|
1012
|
+
O.value || (O.value = e.UserLevel, this.userInfo = {
|
|
1007
1013
|
...this.userInfo,
|
|
1008
1014
|
...e
|
|
1009
|
-
}, this.token = t,
|
|
1015
|
+
}, this.token = t, te(this.token), this.isLogin = !0);
|
|
1010
1016
|
},
|
|
1011
1017
|
/**
|
|
1012
1018
|
* 获取用户Token
|
|
1013
1019
|
* @returns 用户Token
|
|
1014
1020
|
*/
|
|
1015
1021
|
getToken() {
|
|
1016
|
-
return
|
|
1022
|
+
return xe(this.token, () => {
|
|
1017
1023
|
this.clean(), this.logout();
|
|
1018
1024
|
}) ? this.token : "";
|
|
1019
1025
|
},
|
|
@@ -1021,20 +1027,20 @@ const Da = (e) => {
|
|
|
1021
1027
|
* 是否超级管理员
|
|
1022
1028
|
*/
|
|
1023
1029
|
isSuperAdmin() {
|
|
1024
|
-
return
|
|
1030
|
+
return O.value === "Super";
|
|
1025
1031
|
},
|
|
1026
1032
|
/**
|
|
1027
1033
|
* 是否管理员
|
|
1028
1034
|
*/
|
|
1029
1035
|
isAdmin() {
|
|
1030
|
-
return
|
|
1036
|
+
return O.value === "Super" || O.value === "Admin";
|
|
1031
1037
|
},
|
|
1032
1038
|
/**
|
|
1033
1039
|
* 获取用户级别
|
|
1034
1040
|
* @returns 用户级别
|
|
1035
1041
|
*/
|
|
1036
1042
|
getUserLevel() {
|
|
1037
|
-
return
|
|
1043
|
+
return O.value;
|
|
1038
1044
|
},
|
|
1039
1045
|
/*
|
|
1040
1046
|
* 清理登录信息
|
|
@@ -1046,7 +1052,7 @@ const Da = (e) => {
|
|
|
1046
1052
|
Code: "",
|
|
1047
1053
|
TenantId: "",
|
|
1048
1054
|
UserLevel: ""
|
|
1049
|
-
}, this.token = "",
|
|
1055
|
+
}, this.token = "", te(this.token), this.isLogin = !1, G.value = null, O.value = "", C().clean(), Promise.resolve();
|
|
1050
1056
|
},
|
|
1051
1057
|
/**
|
|
1052
1058
|
* 登出操作
|
|
@@ -1054,7 +1060,7 @@ const Da = (e) => {
|
|
|
1054
1060
|
*/
|
|
1055
1061
|
async logout() {
|
|
1056
1062
|
try {
|
|
1057
|
-
await
|
|
1063
|
+
await Ka();
|
|
1058
1064
|
} catch (e) {
|
|
1059
1065
|
console.error("调用登出接口失败", e);
|
|
1060
1066
|
} finally {
|
|
@@ -1067,9 +1073,17 @@ const Da = (e) => {
|
|
|
1067
1073
|
return Promise.resolve();
|
|
1068
1074
|
}
|
|
1069
1075
|
},
|
|
1070
|
-
persist: !1
|
|
1076
|
+
persist: oe() ? !1 : {
|
|
1077
|
+
key: "MICROAPP_USER_INFO",
|
|
1078
|
+
storage: localStorage,
|
|
1079
|
+
pick: ["token", "userInfo"],
|
|
1080
|
+
// 只存储token和userInfo
|
|
1081
|
+
afterHydrate: (e) => {
|
|
1082
|
+
e.store.init();
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1071
1085
|
}), $t = (e, t) => {
|
|
1072
|
-
const a =
|
|
1086
|
+
const a = H();
|
|
1073
1087
|
return e.filter((s) => {
|
|
1074
1088
|
if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(X.currentRoute.value.path, s.permit))
|
|
1075
1089
|
return !1;
|
|
@@ -1081,7 +1095,7 @@ const Da = (e) => {
|
|
|
1081
1095
|
}
|
|
1082
1096
|
return !0;
|
|
1083
1097
|
});
|
|
1084
|
-
},
|
|
1098
|
+
}, Nt = (e, t) => {
|
|
1085
1099
|
const a = t == null ? void 0 : t.filter((s) => {
|
|
1086
1100
|
const r = e.find(
|
|
1087
1101
|
(n) => n.dataIndex === s.dataIndex || n.key === s.key || n.title === s.title
|
|
@@ -1092,17 +1106,17 @@ const Da = (e) => {
|
|
|
1092
1106
|
}, Ga = (e) => (e.remotePage = !1, aa(e).then((t) => t.rows)), aa = (e) => {
|
|
1093
1107
|
e.gridQuery || (e.gridQuery = {});
|
|
1094
1108
|
const t = e.remotePage ? "find" : "list";
|
|
1095
|
-
return
|
|
1109
|
+
return Ne(e, {
|
|
1096
1110
|
urlKey: t,
|
|
1097
1111
|
url: e.gridUrl,
|
|
1098
1112
|
params: e.gridQuery,
|
|
1099
1113
|
loadingState: e.isGridLoading,
|
|
1100
1114
|
processParams: (a) => {
|
|
1101
1115
|
var r;
|
|
1102
|
-
return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]),
|
|
1116
|
+
return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Me((r = e.gridUrl) == null ? void 0 : r.params, a, e.gridQuery);
|
|
1103
1117
|
}
|
|
1104
1118
|
}).then((a) => {
|
|
1105
|
-
if ((a == null ? void 0 : a.status) ===
|
|
1119
|
+
if ((a == null ? void 0 : a.status) === R.SUCCESS) {
|
|
1106
1120
|
let s = a.data;
|
|
1107
1121
|
return s.rows ? (e.tableData.value = s.rows, e.total.value = s.total) : (e.tableData.value = a.data, e.total.value = a.data.length, s = {
|
|
1108
1122
|
total: e.total.value,
|
|
@@ -1123,29 +1137,29 @@ const Da = (e) => {
|
|
|
1123
1137
|
},
|
|
1124
1138
|
loadingState: e.isGridSaving,
|
|
1125
1139
|
...a
|
|
1126
|
-
}).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1140
|
+
}).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && setTimeout(() => {
|
|
1127
1141
|
e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
|
|
1128
|
-
}, 50), s)),
|
|
1142
|
+
}, 50), s)), Dt = (e, t) => {
|
|
1129
1143
|
const a = {};
|
|
1130
1144
|
return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], ja(e, a, {
|
|
1131
1145
|
loadingText: !1,
|
|
1132
1146
|
hideErrorToast: !0
|
|
1133
1147
|
});
|
|
1134
|
-
}, ta = async (e, t, a) => await
|
|
1148
|
+
}, ta = async (e, t, a) => await Ne(e, {
|
|
1135
1149
|
urlKey: "detail",
|
|
1136
1150
|
url: a,
|
|
1137
1151
|
params: t,
|
|
1138
1152
|
loadingState: e.isGridLoading
|
|
1139
1153
|
}), Ft = (e, t) => {
|
|
1140
1154
|
const a = t;
|
|
1141
|
-
return ta(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1155
|
+
return ta(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
|
|
1142
1156
|
}, Ut = (e, t) => {
|
|
1143
1157
|
let a = e.editor;
|
|
1144
1158
|
e.rowData.value = t, a && (We(a, t), a.visible.value = !0);
|
|
1145
1159
|
}, Ct = (e, t) => wa(e, t, {
|
|
1146
1160
|
url: e.deleteUrl,
|
|
1147
1161
|
primaryKey: e.primaryKey
|
|
1148
|
-
}).then((a) => ((a == null ? void 0 : a.status) ===
|
|
1162
|
+
}).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && setTimeout(() => {
|
|
1149
1163
|
e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
|
|
1150
1164
|
}, 50), a)), y = {
|
|
1151
1165
|
PageOption: {
|
|
@@ -1244,7 +1258,7 @@ const Da = (e) => {
|
|
|
1244
1258
|
), {
|
|
1245
1259
|
gridCtrl: s
|
|
1246
1260
|
};
|
|
1247
|
-
},
|
|
1261
|
+
}, Ht = (e, t) => {
|
|
1248
1262
|
const a = {
|
|
1249
1263
|
...y.TreeOption,
|
|
1250
1264
|
reload: c(!1),
|
|
@@ -1264,7 +1278,7 @@ const Da = (e) => {
|
|
|
1264
1278
|
), {
|
|
1265
1279
|
treeCtrl: a
|
|
1266
1280
|
};
|
|
1267
|
-
},
|
|
1281
|
+
}, Kt = (e, t, a) => {
|
|
1268
1282
|
for (const o in e.urls)
|
|
1269
1283
|
e.urls[o] && (e.urls[o].api || (e.urls[o].api = e.api), e.urls[o].authorize === void 0 && (e.urls[o].authorize = e.authorize));
|
|
1270
1284
|
const s = {
|
|
@@ -1277,14 +1291,14 @@ const Da = (e) => {
|
|
|
1277
1291
|
gridCtrl: n
|
|
1278
1292
|
};
|
|
1279
1293
|
};
|
|
1280
|
-
var
|
|
1294
|
+
var Pe = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(Pe || {});
|
|
1281
1295
|
class Ba {
|
|
1282
1296
|
constructor() {
|
|
1283
|
-
|
|
1297
|
+
L(this, "listeners", {});
|
|
1284
1298
|
}
|
|
1285
1299
|
// 检查事件名是否符合前缀
|
|
1286
1300
|
isValidPrefix(t) {
|
|
1287
|
-
return Object.values(
|
|
1301
|
+
return Object.values(Pe).some((a) => t.startsWith(a + "."));
|
|
1288
1302
|
}
|
|
1289
1303
|
/**
|
|
1290
1304
|
* 事件订阅
|
|
@@ -1293,7 +1307,7 @@ class Ba {
|
|
|
1293
1307
|
*/
|
|
1294
1308
|
on(t, a) {
|
|
1295
1309
|
if (!this.isValidPrefix(t)) {
|
|
1296
|
-
console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(
|
|
1310
|
+
console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Pe).join(", ")} 开头`);
|
|
1297
1311
|
return;
|
|
1298
1312
|
}
|
|
1299
1313
|
this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
|
|
@@ -1331,19 +1345,19 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1331
1345
|
E(
|
|
1332
1346
|
() => t.data,
|
|
1333
1347
|
() => {
|
|
1334
|
-
|
|
1348
|
+
_e(t, t.data, a, !0);
|
|
1335
1349
|
},
|
|
1336
1350
|
{ deep: !0, immediate: !0 }
|
|
1337
1351
|
);
|
|
1338
1352
|
else if (r && r.url)
|
|
1339
1353
|
e !== !1 && sa(r, t, n ?? {}, a);
|
|
1340
1354
|
else {
|
|
1341
|
-
const o = c(j(
|
|
1355
|
+
const o = c(j(D.LabelText, ""));
|
|
1342
1356
|
I.error("`" + o.value + "` 未配置选项数据!", {
|
|
1343
1357
|
duration: 5e3
|
|
1344
1358
|
});
|
|
1345
1359
|
}
|
|
1346
|
-
},
|
|
1360
|
+
}, _e = (e, t, a, s) => {
|
|
1347
1361
|
if (!t || t.length === 0) {
|
|
1348
1362
|
a.value = [];
|
|
1349
1363
|
return;
|
|
@@ -1359,13 +1373,13 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1359
1373
|
value: void 0
|
|
1360
1374
|
}), a.value = t;
|
|
1361
1375
|
}, za = (e, t, a, s) => {
|
|
1362
|
-
Array.isArray(a) ?
|
|
1363
|
-
},
|
|
1376
|
+
Array.isArray(a) ? _e(t, a, s, !0) : sa(e, t, a, s);
|
|
1377
|
+
}, ge = (e, t) => {
|
|
1364
1378
|
t && e.reloadEvent && t.reloadHandler && V.off(e.reloadEvent, t.reloadHandler);
|
|
1365
1379
|
}, sa = (e, t, a, s) => {
|
|
1366
|
-
const r =
|
|
1380
|
+
const r = Me(e.params, t.params, a);
|
|
1367
1381
|
Wa(e, t.fieldMap, r).then((n) => {
|
|
1368
|
-
|
|
1382
|
+
_e(t, n, s, !1);
|
|
1369
1383
|
});
|
|
1370
1384
|
}, Wa = (e, t, a) => {
|
|
1371
1385
|
const { fieldMap: s, ...r } = e, o = {
|
|
@@ -1379,11 +1393,11 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1379
1393
|
},
|
|
1380
1394
|
...r
|
|
1381
1395
|
};
|
|
1382
|
-
return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}),
|
|
1396
|
+
return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), K(o, a).then((l) => (l == null ? void 0 : l.status) === R.SUCCESS && l.data ? l.data : []);
|
|
1383
1397
|
}, Ya = (e, t) => {
|
|
1384
1398
|
if (e !== void 0)
|
|
1385
1399
|
return Array.isArray(e) ? t.filter((a) => e.includes(a.value)) : t.find((a) => a.value === e);
|
|
1386
|
-
},
|
|
1400
|
+
}, Ee = (e, t, a) => {
|
|
1387
1401
|
const s = t.split(".");
|
|
1388
1402
|
let r = e;
|
|
1389
1403
|
for (let n = 0; n < s.length - 1; n++) {
|
|
@@ -1394,27 +1408,27 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1394
1408
|
}, ra = (e, t, a) => {
|
|
1395
1409
|
if (a == null) {
|
|
1396
1410
|
Object.entries(t).forEach(([s]) => {
|
|
1397
|
-
|
|
1411
|
+
Ee(e, s, a);
|
|
1398
1412
|
});
|
|
1399
1413
|
return;
|
|
1400
1414
|
}
|
|
1401
1415
|
Array.isArray(a) || Object.entries(t).forEach(([s, r]) => {
|
|
1402
1416
|
if (r.includes("${")) {
|
|
1403
|
-
const n =
|
|
1404
|
-
|
|
1417
|
+
const n = Te(r, a);
|
|
1418
|
+
Ee(e, s, n);
|
|
1405
1419
|
} else
|
|
1406
|
-
|
|
1420
|
+
Ee(e, s, a[r]);
|
|
1407
1421
|
});
|
|
1408
|
-
},
|
|
1422
|
+
}, ye = (e, t, a, s) => {
|
|
1409
1423
|
var n;
|
|
1410
|
-
s.editorCtrl && ((n = s.errInfo) != null && n.value.errClass) &&
|
|
1424
|
+
s.editorCtrl && ((n = s.errInfo) != null && n.value.errClass) && me(s.editorCtrl);
|
|
1411
1425
|
const r = Ya(t, a.value);
|
|
1412
1426
|
if (e.formData && e.outFields && ra(e.formData, e.outFields, r), e.changeEvent) {
|
|
1413
1427
|
const [o, l] = e.changeEvent;
|
|
1414
1428
|
if (l)
|
|
1415
1429
|
if (Array.isArray(o))
|
|
1416
1430
|
o.every((i) => {
|
|
1417
|
-
const u =
|
|
1431
|
+
const u = Te(l, { selectedValues: t });
|
|
1418
1432
|
try {
|
|
1419
1433
|
const f = JSON.parse(u);
|
|
1420
1434
|
V.emit(i, f, t, r);
|
|
@@ -1423,7 +1437,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1423
1437
|
}
|
|
1424
1438
|
});
|
|
1425
1439
|
else {
|
|
1426
|
-
const i =
|
|
1440
|
+
const i = Te(l, { selectedValues: t });
|
|
1427
1441
|
try {
|
|
1428
1442
|
const u = JSON.parse(i);
|
|
1429
1443
|
V.emit(o, u, t, r);
|
|
@@ -1437,9 +1451,9 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1437
1451
|
}) : V.emit(o, r, t);
|
|
1438
1452
|
}
|
|
1439
1453
|
return s.inputEmit && s.inputEmit("change", t, r), r;
|
|
1440
|
-
},
|
|
1454
|
+
}, be = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, Re = /* @__PURE__ */ new Map(), Qe = /* @__PURE__ */ new Set(), _ = c({}), Vt = _, Qt = (e) => {
|
|
1441
1455
|
var r;
|
|
1442
|
-
if (!e.iconUrl) return
|
|
1456
|
+
if (!e.iconUrl) return we;
|
|
1443
1457
|
const t = c(!0), a = c("");
|
|
1444
1458
|
let s = !0;
|
|
1445
1459
|
return (r = e.icons) != null && r.length && (s = e.icons.every((n) => _.value[n] !== void 0)), (e.icon && !_.value[e.icon] || !s) && Za(e, t).then(() => {
|
|
@@ -1483,25 +1497,25 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1483
1497
|
), E(
|
|
1484
1498
|
() => i.value,
|
|
1485
1499
|
(f) => {
|
|
1486
|
-
n.icons && (f >= n.icons.length && (i.value = 0), l.value = n.icons[i.value],
|
|
1500
|
+
n.icons && (f >= n.icons.length && (i.value = 0), l.value = n.icons[i.value], se(a, l, l.value), o("update:iconIndex", i.value));
|
|
1487
1501
|
},
|
|
1488
1502
|
{ immediate: !0 }
|
|
1489
1503
|
), E(
|
|
1490
1504
|
() => _.value,
|
|
1491
1505
|
() => {
|
|
1492
|
-
|
|
1506
|
+
se(a, l, l.value);
|
|
1493
1507
|
},
|
|
1494
1508
|
{ deep: !0 }
|
|
1495
1509
|
), E(
|
|
1496
1510
|
() => n.icon,
|
|
1497
1511
|
(f) => {
|
|
1498
|
-
|
|
1512
|
+
se(a, l, f);
|
|
1499
1513
|
}
|
|
1500
|
-
),
|
|
1514
|
+
), se(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
|
|
1501
1515
|
},
|
|
1502
1516
|
render() {
|
|
1503
1517
|
if (!t.value)
|
|
1504
|
-
return
|
|
1518
|
+
return we;
|
|
1505
1519
|
let n = this.class, o = "";
|
|
1506
1520
|
Array.isArray(n) ? o = n.join(" ") : typeof n == "string" && (o = n);
|
|
1507
1521
|
let l = [o];
|
|
@@ -1520,16 +1534,16 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1520
1534
|
let a = e.iconUrl;
|
|
1521
1535
|
if (!a)
|
|
1522
1536
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1523
|
-
if (
|
|
1537
|
+
if (Re.has(a))
|
|
1524
1538
|
return Promise.resolve();
|
|
1525
1539
|
const s = oa(a);
|
|
1526
1540
|
if (s)
|
|
1527
1541
|
return new Promise(async (n) => (na(s.scriptContent), n()));
|
|
1528
1542
|
t.value = !1;
|
|
1529
1543
|
const r = new Promise(async (n) => {
|
|
1530
|
-
await et(a, e.monoColor || !1), n(),
|
|
1544
|
+
await et(a, e.monoColor || !1), n(), Re.delete(a);
|
|
1531
1545
|
});
|
|
1532
|
-
return
|
|
1546
|
+
return Re.set(a, r), r;
|
|
1533
1547
|
}, et = async (e, t) => {
|
|
1534
1548
|
try {
|
|
1535
1549
|
const a = await fetch(e);
|
|
@@ -1581,11 +1595,11 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1581
1595
|
const a = localStorage.getItem(t);
|
|
1582
1596
|
a && JSON.parse(a).expireTime < e && localStorage.removeItem(t);
|
|
1583
1597
|
}
|
|
1584
|
-
},
|
|
1598
|
+
}, se = (e, t, a) => {
|
|
1585
1599
|
setTimeout(() => {
|
|
1586
1600
|
t.value = a, t.value && (e.value = _.value[t.value]);
|
|
1587
1601
|
}, 1);
|
|
1588
|
-
},
|
|
1602
|
+
}, we = F(
|
|
1589
1603
|
"svg",
|
|
1590
1604
|
{ class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
|
|
1591
1605
|
[
|
|
@@ -1625,7 +1639,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1625
1639
|
la(e, [], a, s).forEach((n) => t.push(n));
|
|
1626
1640
|
}, la = (e, t, a, s) => {
|
|
1627
1641
|
var o, l, i, u, f;
|
|
1628
|
-
const r = [], n =
|
|
1642
|
+
const r = [], n = H();
|
|
1629
1643
|
for (const p of e) {
|
|
1630
1644
|
if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (o = p.meta) == null ? void 0 : o.roles) != null && l.length && !n.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !n.hasPermit(p.meta.permission, ":page"))
|
|
1631
1645
|
continue;
|
|
@@ -1644,7 +1658,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1644
1658
|
}, Ge = fa([]), qt = () => {
|
|
1645
1659
|
Ge.length = 0;
|
|
1646
1660
|
const e = C();
|
|
1647
|
-
let a =
|
|
1661
|
+
let a = Ue().TabActive;
|
|
1648
1662
|
e.matchedRoutes(a).forEach((r, n) => {
|
|
1649
1663
|
var l;
|
|
1650
1664
|
const o = {
|
|
@@ -1690,14 +1704,14 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1690
1704
|
return;
|
|
1691
1705
|
}
|
|
1692
1706
|
return new Promise((s) => {
|
|
1693
|
-
|
|
1707
|
+
Ie.SITEHOST_API || (Ie.SITEHOST_API = e);
|
|
1694
1708
|
const r = t || window.location.origin;
|
|
1695
|
-
|
|
1709
|
+
K(nt.host, {
|
|
1696
1710
|
Query: {
|
|
1697
1711
|
Host: r
|
|
1698
1712
|
}
|
|
1699
1713
|
}).then((n) => {
|
|
1700
|
-
if ((n == null ? void 0 : n.status) ===
|
|
1714
|
+
if ((n == null ? void 0 : n.status) === R.SUCCESS && n.data) {
|
|
1701
1715
|
const o = n.data;
|
|
1702
1716
|
this._setHostInfo(o);
|
|
1703
1717
|
}
|
|
@@ -1713,7 +1727,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1713
1727
|
...this.hostInfo,
|
|
1714
1728
|
...e
|
|
1715
1729
|
}, this.hostInfo.API_HOST)
|
|
1716
|
-
for (const t in this.hostInfo.API_HOST)
|
|
1730
|
+
for (const t in this.hostInfo.API_HOST) Ie[t] = this.hostInfo.API_HOST[t];
|
|
1717
1731
|
if (this.hostInfo.SERVER_HOST)
|
|
1718
1732
|
for (const t in this.hostInfo.SERVER_HOST) Ea[t] = this.hostInfo.SERVER_HOST[t];
|
|
1719
1733
|
},
|
|
@@ -1774,7 +1788,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1774
1788
|
inheritAttrs: !1,
|
|
1775
1789
|
__name: "index",
|
|
1776
1790
|
props: {
|
|
1777
|
-
...
|
|
1791
|
+
...pe,
|
|
1778
1792
|
autoload: {
|
|
1779
1793
|
type: Boolean,
|
|
1780
1794
|
default: !1
|
|
@@ -1809,7 +1823,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1809
1823
|
emits: ["update:value", "select", "change", "update:labels"],
|
|
1810
1824
|
setup(e, { emit: t }) {
|
|
1811
1825
|
var w, m, b;
|
|
1812
|
-
const a = e, s =
|
|
1826
|
+
const a = e, s = ie(), r = c({
|
|
1813
1827
|
...a.url,
|
|
1814
1828
|
url: ((w = a.url) == null ? void 0 : w.url) || "",
|
|
1815
1829
|
fieldMap: a.fieldMap || ((m = a.url) == null ? void 0 : m.fieldMap),
|
|
@@ -1828,7 +1842,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1828
1842
|
a.autoClean && a.formData && a.outFields && g !== a.value && ra(a.formData, a.outFields, null);
|
|
1829
1843
|
}
|
|
1830
1844
|
);
|
|
1831
|
-
const o =
|
|
1845
|
+
const o = ve(), { editorCtrl: l, errInfo: i, labelText: u } = o, f = t;
|
|
1832
1846
|
o.inputEmit = f;
|
|
1833
1847
|
const p = c([]), v = (g) => {
|
|
1834
1848
|
var $;
|
|
@@ -1847,24 +1861,24 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1847
1861
|
$like: "%" + d + "%"
|
|
1848
1862
|
}), a.onsearch && a.onsearch(d, S), Z(!0, a, p, o, r.value, S);
|
|
1849
1863
|
}, h = (g) => {
|
|
1850
|
-
const d =
|
|
1864
|
+
const d = ye(a, g, p, o);
|
|
1851
1865
|
f("update:value", g), f("select", g);
|
|
1852
|
-
const S =
|
|
1853
|
-
f("update:labels", S), i != null && i.value.errClass && l &&
|
|
1866
|
+
const S = be(d);
|
|
1867
|
+
f("update:labels", S), i != null && i.value.errClass && l && me(l);
|
|
1854
1868
|
};
|
|
1855
|
-
return
|
|
1869
|
+
return ue(() => {
|
|
1856
1870
|
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
1857
1871
|
title: "Name",
|
|
1858
1872
|
label: "Name",
|
|
1859
1873
|
value: "Name",
|
|
1860
1874
|
key: "Id"
|
|
1861
1875
|
});
|
|
1862
|
-
}),
|
|
1863
|
-
|
|
1876
|
+
}), ce(() => {
|
|
1877
|
+
ge(a, o);
|
|
1864
1878
|
}), (g, d) => {
|
|
1865
1879
|
var S;
|
|
1866
|
-
return x(),
|
|
1867
|
-
J(A(da),
|
|
1880
|
+
return x(), k("div", null, [
|
|
1881
|
+
J(A(da), fe({
|
|
1868
1882
|
value: n.value,
|
|
1869
1883
|
"onUpdate:value": d[0] || (d[0] = ($) => n.value = $),
|
|
1870
1884
|
class: [(S = A(i)) == null ? void 0 : S.errClass, "error w-full"],
|
|
@@ -1883,7 +1897,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1883
1897
|
inheritAttrs: !1,
|
|
1884
1898
|
__name: "index",
|
|
1885
1899
|
props: {
|
|
1886
|
-
...
|
|
1900
|
+
...pe,
|
|
1887
1901
|
nodata: {
|
|
1888
1902
|
type: String,
|
|
1889
1903
|
default: ""
|
|
@@ -1901,36 +1915,36 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1901
1915
|
emits: ["change", "update:labels"],
|
|
1902
1916
|
setup(e, { emit: t }) {
|
|
1903
1917
|
var f, p, v;
|
|
1904
|
-
const a = e, s =
|
|
1918
|
+
const a = e, s = ie(), r = c({
|
|
1905
1919
|
...a.url,
|
|
1906
1920
|
url: ((f = a.url) == null ? void 0 : f.url) || "",
|
|
1907
1921
|
fieldMap: a.fieldMap || ((p = a.url) == null ? void 0 : p.fieldMap),
|
|
1908
1922
|
params: a.params || ((v = a.url) == null ? void 0 : v.params),
|
|
1909
1923
|
loadingText: !1
|
|
1910
|
-
}), n =
|
|
1924
|
+
}), n = ve(), { errInfo: o } = n, l = t;
|
|
1911
1925
|
n.inputEmit = l;
|
|
1912
1926
|
const i = c([]), u = (h) => {
|
|
1913
|
-
const m =
|
|
1927
|
+
const m = ye(a, h, i, n), b = be(m);
|
|
1914
1928
|
l("update:labels", b);
|
|
1915
1929
|
};
|
|
1916
|
-
return
|
|
1930
|
+
return ue(() => {
|
|
1917
1931
|
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
1918
1932
|
title: "Name",
|
|
1919
1933
|
label: "Name",
|
|
1920
1934
|
value: "Id",
|
|
1921
1935
|
key: "Id"
|
|
1922
1936
|
}), Z(a.autoload, a, i, n, r.value, r.value.params);
|
|
1923
|
-
}),
|
|
1924
|
-
|
|
1925
|
-
}), (h, w) => (x(),
|
|
1926
|
-
J(A(ha),
|
|
1937
|
+
}), ce(() => {
|
|
1938
|
+
ge(a, n);
|
|
1939
|
+
}), (h, w) => (x(), k("div", ot, [
|
|
1940
|
+
J(A(ha), fe({
|
|
1927
1941
|
onChange: u,
|
|
1928
1942
|
class: "w-full mb-[-3px]"
|
|
1929
1943
|
}, A(s)), {
|
|
1930
1944
|
default: Q(() => [
|
|
1931
|
-
i.value.length > 0 ? (x(!0),
|
|
1945
|
+
i.value.length > 0 ? (x(!0), k(z, { key: 0 }, Oe(i.value, (m) => {
|
|
1932
1946
|
var b;
|
|
1933
|
-
return x(),
|
|
1947
|
+
return x(), ke(A(ma), {
|
|
1934
1948
|
key: m.value,
|
|
1935
1949
|
value: m.value,
|
|
1936
1950
|
disabled: m.disabled || m.value && e.disabledItems && e.disabledItems.indexOf(m.value.toString()) > -1,
|
|
@@ -1942,11 +1956,11 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1942
1956
|
])
|
|
1943
1957
|
}, {
|
|
1944
1958
|
default: Q(() => [
|
|
1945
|
-
|
|
1959
|
+
Le(W(m.label), 1)
|
|
1946
1960
|
]),
|
|
1947
1961
|
_: 2
|
|
1948
1962
|
}, 1032, ["value", "disabled", "class"]);
|
|
1949
|
-
}), 128)) : e.nodata ? (x(),
|
|
1963
|
+
}), 128)) : e.nodata ? (x(), k("div", lt, W(e.nodata), 1)) : B("", !0)
|
|
1950
1964
|
]),
|
|
1951
1965
|
_: 1
|
|
1952
1966
|
}, 16)
|
|
@@ -1959,7 +1973,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1959
1973
|
inheritAttrs: !1,
|
|
1960
1974
|
__name: "index",
|
|
1961
1975
|
props: {
|
|
1962
|
-
...
|
|
1976
|
+
...pe,
|
|
1963
1977
|
value: {
|
|
1964
1978
|
type: [String, Number, null, Array],
|
|
1965
1979
|
default: void 0
|
|
@@ -1978,13 +1992,13 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1978
1992
|
emits: ["change", "update:value", "update:labels"],
|
|
1979
1993
|
setup(e, { emit: t }) {
|
|
1980
1994
|
var v, h, w;
|
|
1981
|
-
const a = e, s =
|
|
1995
|
+
const a = e, s = ie(), r = c({
|
|
1982
1996
|
...a.url,
|
|
1983
1997
|
url: ((v = a.url) == null ? void 0 : v.url) || "",
|
|
1984
1998
|
fieldMap: a.fieldMap || ((h = a.url) == null ? void 0 : h.fieldMap),
|
|
1985
1999
|
params: a.params || ((w = a.url) == null ? void 0 : w.params),
|
|
1986
2000
|
loadingText: !1
|
|
1987
|
-
}), n = c(a.value), o =
|
|
2001
|
+
}), n = c(a.value), o = ve(), { errInfo: l } = o, i = c([]), u = t;
|
|
1988
2002
|
o.inputEmit = u, E(
|
|
1989
2003
|
() => n.value,
|
|
1990
2004
|
(m) => {
|
|
@@ -1998,20 +2012,20 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
1998
2012
|
}
|
|
1999
2013
|
return m === b;
|
|
2000
2014
|
}, p = (m) => {
|
|
2001
|
-
const b = m.target.value, g =
|
|
2015
|
+
const b = m.target.value, g = ye(a, b, i, o), d = be(g);
|
|
2002
2016
|
u("update:labels", d);
|
|
2003
2017
|
};
|
|
2004
|
-
return
|
|
2018
|
+
return ue(() => {
|
|
2005
2019
|
var m;
|
|
2006
2020
|
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
2007
2021
|
label: "Name",
|
|
2008
2022
|
value: "Id",
|
|
2009
2023
|
key: "Id"
|
|
2010
2024
|
}), Z(a.autoload, a, i, o, r.value, (m = r.value) == null ? void 0 : m.params);
|
|
2011
|
-
}),
|
|
2012
|
-
|
|
2013
|
-
}), (m, b) => (x(),
|
|
2014
|
-
J(A(va),
|
|
2025
|
+
}), ce(() => {
|
|
2026
|
+
ge(a, o);
|
|
2027
|
+
}), (m, b) => (x(), k("div", it, [
|
|
2028
|
+
J(A(va), fe({
|
|
2015
2029
|
value: n.value,
|
|
2016
2030
|
"onUpdate:value": b[0] || (b[0] = (g) => n.value = g),
|
|
2017
2031
|
autocheck: !1,
|
|
@@ -2019,12 +2033,12 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2019
2033
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
2020
2034
|
}, A(s)), {
|
|
2021
2035
|
default: Q(() => [
|
|
2022
|
-
i.value.length > 0 ? (x(!0),
|
|
2036
|
+
i.value.length > 0 ? (x(!0), k(z, { key: 0 }, Oe(i.value, (g) => {
|
|
2023
2037
|
var d;
|
|
2024
|
-
return x(),
|
|
2038
|
+
return x(), k(z, {
|
|
2025
2039
|
key: g.value
|
|
2026
2040
|
}, [
|
|
2027
|
-
g.visible !== !1 ? (x(),
|
|
2041
|
+
g.visible !== !1 ? (x(), ke(A(ga), {
|
|
2028
2042
|
key: 0,
|
|
2029
2043
|
checked: f(g.value, a.value),
|
|
2030
2044
|
value: g.value,
|
|
@@ -2036,12 +2050,12 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2036
2050
|
])
|
|
2037
2051
|
}, {
|
|
2038
2052
|
default: Q(() => [
|
|
2039
|
-
|
|
2053
|
+
Le(W(g.label), 1)
|
|
2040
2054
|
]),
|
|
2041
2055
|
_: 2
|
|
2042
2056
|
}, 1032, ["checked", "value", "class"])) : B("", !0)
|
|
2043
2057
|
], 64);
|
|
2044
|
-
}), 128)) : e.nodata ? (x(),
|
|
2058
|
+
}), 128)) : e.nodata ? (x(), k("div", ut, W(e.nodata), 1)) : B("", !0)
|
|
2045
2059
|
]),
|
|
2046
2060
|
_: 1
|
|
2047
2061
|
}, 16, ["value"])
|
|
@@ -2054,7 +2068,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2054
2068
|
inheritAttrs: !1,
|
|
2055
2069
|
__name: "index",
|
|
2056
2070
|
props: {
|
|
2057
|
-
...
|
|
2071
|
+
...pe,
|
|
2058
2072
|
value: {
|
|
2059
2073
|
type: [String, Number, Array, null],
|
|
2060
2074
|
default: void 0
|
|
@@ -2093,17 +2107,17 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2093
2107
|
emits: ["change", "update:value", "update:labels"],
|
|
2094
2108
|
setup(e, { emit: t }) {
|
|
2095
2109
|
var m, b, g;
|
|
2096
|
-
const a = e, s =
|
|
2110
|
+
const a = e, s = ie(), r = c({
|
|
2097
2111
|
...a.url,
|
|
2098
2112
|
url: ((m = a.url) == null ? void 0 : m.url) || "",
|
|
2099
2113
|
fieldMap: a.fieldMap || ((b = a.url) == null ? void 0 : b.fieldMap),
|
|
2100
2114
|
params: a.params || ((g = a.url) == null ? void 0 : g.params),
|
|
2101
2115
|
loadingText: !1
|
|
2102
|
-
}), n =
|
|
2116
|
+
}), n = ve(), { editorCtrl: o, errInfo: l, labelText: i } = n, u = c(a.value), f = c(s.placeholder), p = c(void 0), v = t;
|
|
2103
2117
|
n.inputEmit = v;
|
|
2104
2118
|
const h = c([]), w = (d) => {
|
|
2105
|
-
const S =
|
|
2106
|
-
p.value = d, v("update:labels", $), v("change", d), l != null && l.value.errClass && o &&
|
|
2119
|
+
const S = ye(a, d, h, n), $ = be(S);
|
|
2120
|
+
p.value = d, v("update:labels", $), v("change", d), l != null && l.value.errClass && o && me(o);
|
|
2107
2121
|
};
|
|
2108
2122
|
return E(
|
|
2109
2123
|
() => h.value,
|
|
@@ -2131,7 +2145,7 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2131
2145
|
Z(!0, a, h, n, r.value, d);
|
|
2132
2146
|
},
|
|
2133
2147
|
{ deep: !0 }
|
|
2134
|
-
),
|
|
2148
|
+
), ue(() => {
|
|
2135
2149
|
var d;
|
|
2136
2150
|
if (r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
2137
2151
|
label: "Name",
|
|
@@ -2141,16 +2155,16 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2141
2155
|
const S = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
|
|
2142
2156
|
h.value = S;
|
|
2143
2157
|
} else Z(a.autoload, a, h, n, r.value, (d = r.value) == null ? void 0 : d.params);
|
|
2144
|
-
}),
|
|
2145
|
-
|
|
2158
|
+
}), ce(() => {
|
|
2159
|
+
ge(a, n);
|
|
2146
2160
|
}), (d, S) => {
|
|
2147
2161
|
var $;
|
|
2148
|
-
return x(),
|
|
2149
|
-
a.url && a.url.loading === !0 ? (x(),
|
|
2150
|
-
J(A(
|
|
2162
|
+
return x(), k("div", null, [
|
|
2163
|
+
a.url && a.url.loading === !0 ? (x(), k("div", ct, [
|
|
2164
|
+
J(A(we), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2151
2165
|
S[1] || (S[1] = pa("span", null, "数据加载中...", -1))
|
|
2152
2166
|
])) : B("", !0),
|
|
2153
|
-
J(A(ya),
|
|
2167
|
+
J(A(ya), fe({
|
|
2154
2168
|
class: [($ = A(l)) == null ? void 0 : $.errClass, "w-full"],
|
|
2155
2169
|
value: p.value,
|
|
2156
2170
|
"onUpdate:value": S[0] || (S[0] = (U) => p.value = U),
|
|
@@ -2160,15 +2174,15 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2160
2174
|
"label-in-value": !1
|
|
2161
2175
|
}, A(s)), {
|
|
2162
2176
|
default: Q(() => [
|
|
2163
|
-
(x(!0),
|
|
2177
|
+
(x(!0), k(z, null, Oe(h.value, (U) => (x(), k(z, {
|
|
2164
2178
|
key: U.value
|
|
2165
2179
|
}, [
|
|
2166
|
-
U.visible !== !1 ? (x(),
|
|
2180
|
+
U.visible !== !1 ? (x(), ke(A(ba), {
|
|
2167
2181
|
key: 0,
|
|
2168
2182
|
value: U.value
|
|
2169
2183
|
}, {
|
|
2170
2184
|
default: Q(() => [
|
|
2171
|
-
|
|
2185
|
+
Le(W(U.label), 1)
|
|
2172
2186
|
]),
|
|
2173
2187
|
_: 2
|
|
2174
2188
|
}, 1032, ["value"])) : B("", !0)
|
|
@@ -2181,23 +2195,23 @@ const V = new Ba(), Z = (e, t, a, s, r, n) => {
|
|
|
2181
2195
|
}
|
|
2182
2196
|
});
|
|
2183
2197
|
export {
|
|
2184
|
-
|
|
2185
|
-
|
|
2198
|
+
Rt as $,
|
|
2199
|
+
Ne as A,
|
|
2186
2200
|
Pa as B,
|
|
2187
2201
|
_t as C,
|
|
2188
2202
|
qa as D,
|
|
2189
2203
|
Ja as E,
|
|
2190
|
-
|
|
2191
|
-
|
|
2204
|
+
Ht as F,
|
|
2205
|
+
Kt as G,
|
|
2192
2206
|
Ya as H,
|
|
2193
2207
|
ra as I,
|
|
2194
|
-
|
|
2195
|
-
|
|
2208
|
+
ye as J,
|
|
2209
|
+
be as K,
|
|
2196
2210
|
Vt as L,
|
|
2197
2211
|
Gt as M,
|
|
2198
2212
|
st as N,
|
|
2199
2213
|
M as O,
|
|
2200
|
-
|
|
2214
|
+
D as P,
|
|
2201
2215
|
rt as Q,
|
|
2202
2216
|
jt as R,
|
|
2203
2217
|
Ge as S,
|
|
@@ -2206,24 +2220,24 @@ export {
|
|
|
2206
2220
|
Lt as V,
|
|
2207
2221
|
We as W,
|
|
2208
2222
|
Et as X,
|
|
2209
|
-
|
|
2210
|
-
|
|
2223
|
+
Tt as Y,
|
|
2224
|
+
De as Z,
|
|
2211
2225
|
zt as _,
|
|
2212
2226
|
Bt as a,
|
|
2213
|
-
|
|
2227
|
+
Nt as a0,
|
|
2214
2228
|
ja as a1,
|
|
2215
2229
|
ta as a2,
|
|
2216
2230
|
Ft as a3,
|
|
2217
2231
|
xt as a4,
|
|
2218
2232
|
Be as a5,
|
|
2219
2233
|
wa as a6,
|
|
2220
|
-
|
|
2234
|
+
Pe as a7,
|
|
2221
2235
|
V as a8,
|
|
2222
2236
|
q as a9,
|
|
2223
|
-
|
|
2237
|
+
re as aa,
|
|
2224
2238
|
C as ab,
|
|
2225
2239
|
Jt as ac,
|
|
2226
|
-
|
|
2240
|
+
Ue as ad,
|
|
2227
2241
|
Y as ae,
|
|
2228
2242
|
Ot as b,
|
|
2229
2243
|
Qt as c,
|
|
@@ -2236,17 +2250,17 @@ export {
|
|
|
2236
2250
|
Mt as j,
|
|
2237
2251
|
aa as k,
|
|
2238
2252
|
Ga as l,
|
|
2239
|
-
|
|
2240
|
-
|
|
2253
|
+
Dt as m,
|
|
2254
|
+
pe as n,
|
|
2241
2255
|
wt as o,
|
|
2242
|
-
|
|
2256
|
+
ve as p,
|
|
2243
2257
|
Oa as q,
|
|
2244
2258
|
X as r,
|
|
2245
2259
|
Z as s,
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2260
|
+
ge as t,
|
|
2261
|
+
H as u,
|
|
2262
|
+
we as v,
|
|
2263
|
+
me as w,
|
|
2250
2264
|
Wt as x,
|
|
2251
2265
|
Yt as y,
|
|
2252
2266
|
Xt as z
|