@skyfox2000/webui 1.4.21 → 1.4.22
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/{baseLayout-Da4Ox7Lj.js → baseLayout-BcSEYvus.js} +3 -3
- package/lib/assets/modules/{file-upload-Bu6FkNjZ.js → file-upload-D11e2io7.js} +1 -1
- package/lib/assets/modules/{index-BYVerdEw.js → index-CO9_YadW.js} +2 -2
- package/lib/assets/modules/{index-Ch3meKe4.js → index-ClMWx3tg.js} +1 -1
- package/lib/assets/modules/{index-BysCt107.js → index-voAmrZ30.js} +2 -2
- package/lib/assets/modules/{menuTabs-BqLT-YbD.js → menuTabs-C9wkt-m9.js} +2 -2
- package/lib/assets/modules/{toolIcon-Dd58W0UM.js → toolIcon-9zQ4jiFD.js} +1 -1
- package/lib/assets/modules/{upload-template-Csccple9.js → upload-template-CM0O990W.js} +386 -369
- package/lib/assets/modules/uploadList-DhkFSkqE.js +466 -0
- package/lib/components/content/index.d.ts +4 -0
- package/lib/components/content/list/index.vue.d.ts +126 -0
- package/lib/components/content/list/listOperate.vue.d.ts +18 -0
- package/lib/components/form/switch/index.vue.d.ts +11 -1
- package/lib/components/form/upload/uploadList.vue.d.ts +448 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/const/options.d.ts +4 -2
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +2 -2
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +5 -5
- package/lib/es/MenuLayout/index.js +2 -2
- package/lib/es/TemplateFile/index.js +4 -4
- package/lib/es/UploadForm/index.js +70 -56
- package/lib/index.d.ts +1 -1
- package/lib/typings/upload.d.ts +10 -0
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1418 -1167
- package/package.json +1 -1
- package/src/components/content/dialog/uploadForm.vue +96 -13
- package/src/components/content/index.ts +5 -0
- package/src/components/content/list/index.vue +198 -0
- package/src/components/content/list/listOperate.vue +122 -0
- package/src/components/content/table/index.vue +1 -1
- package/src/components/content/table/tableOperate.vue +19 -37
- package/src/components/form/switch/index.vue +27 -14
- package/src/components/form/upload/uploadList.vue +46 -3
- package/src/components/index.ts +2 -0
- package/src/const/options.ts +11 -1
- package/src/index.ts +2 -0
- package/src/typings/upload.d.ts +10 -0
- package/lib/assets/modules/uploadList-D8scq04c.js +0 -423
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var mt = Object.defineProperty;
|
|
2
2
|
var vt = (e, a, t) => a in e ? mt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
|
-
var
|
|
4
|
-
import { ref as c, h as H, nextTick as gt, inject as se, provide as $e, watch as g, toRaw as et, shallowRef as J, defineComponent as Z, reactive as yt, onMounted as Ie, onUnmounted as le, createBlock as Ae, createCommentVNode as
|
|
5
|
-
import { Switch as
|
|
6
|
-
import { createPinia as
|
|
7
|
-
import
|
|
8
|
-
import { EnvConfig as Se, AppAction as
|
|
9
|
-
import { httpPost as j, ResStatus as
|
|
10
|
-
import
|
|
11
|
-
import { createRouter as
|
|
3
|
+
var P = (e, a, t) => vt(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
+
import { ref as c, h as H, nextTick as gt, inject as se, provide as $e, watch as g, toRaw as et, shallowRef as J, defineComponent as Z, reactive as yt, computed as St, onMounted as Ie, onUnmounted as le, createBlock as Ae, createCommentVNode as W, openBlock as O, unref as b, mergeProps as ue, useAttrs as Ee, onActivated as xe, createElementBlock as $, createVNode as C, withCtx as Q, createTextVNode as we, toDisplayString as Y, Fragment as oe, renderList as He, normalizeClass as tt, createElementVNode as bt } from "vue";
|
|
5
|
+
import { Switch as It, AutoComplete as At, Input as Et, CheckboxGroup as xt, Checkbox as wt, RadioGroup as Rt, Radio as Ot, Select as Tt, SelectOption as Pt } from "ant-design-vue";
|
|
6
|
+
import { createPinia as kt, defineStore as ce } from "pinia";
|
|
7
|
+
import Lt from "pinia-plugin-persistedstate";
|
|
8
|
+
import { EnvConfig as Se, AppAction as We, AppSource as Ce, isMicroApp as V, isBaseMicroApp as Mt, combineParams as fe } from "@skyfox2000/microbase";
|
|
9
|
+
import { httpPost as j, ResStatus as k, setToken as ve, fieldMapping as $t, parseFieldTemplate as be, API_HOST as Fe, SERVER_HOST as Ft } from "@skyfox2000/fapi";
|
|
10
|
+
import x from "vue-m-message";
|
|
11
|
+
import { createRouter as Nt, createWebHashHistory as _t } from "vue-router";
|
|
12
12
|
import Ve from "async-validator";
|
|
13
13
|
import "dayjs";
|
|
14
14
|
import "vue-draggable-next";
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const Dt = kt();
|
|
16
|
+
Dt.use(Lt);
|
|
17
17
|
var U = /* @__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))(U || {});
|
|
18
|
-
const
|
|
18
|
+
const R = class R {
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
P(R, "dict", {}), P(R, "Keys", {
|
|
21
21
|
EnableDisable: "EnableDisable",
|
|
22
22
|
SuccessResult: "SuccessResult",
|
|
23
23
|
YesNo: "YesNo",
|
|
@@ -27,25 +27,30 @@ k(L, "dict", {}), k(L, "Keys", {
|
|
|
27
27
|
* @param key 名称
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
P(R, "getOptions", (a) => R.dict[a]), /**
|
|
31
|
+
* 静态选择项列表
|
|
32
|
+
* @param key 名称
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
P(R, "getOptionItems", (a) => R.dict[a]), /**
|
|
31
36
|
* 静态选择项对象
|
|
32
37
|
* @param key 名称
|
|
33
38
|
* @param value 值
|
|
34
39
|
* @returns
|
|
35
40
|
*/
|
|
36
|
-
|
|
41
|
+
P(R, "getOptionItem", (a, t) => R.dict[a].find((s) => s.value === t)), /**
|
|
37
42
|
* 设置静态选择项
|
|
38
43
|
* @param key 名称
|
|
39
44
|
* @param list 列表
|
|
40
45
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
P(R, "setOptions", (a, t) => {
|
|
47
|
+
R.dict[a] = t;
|
|
43
48
|
}), /**
|
|
44
49
|
* 启用/停用选项
|
|
45
50
|
* - 启用 1
|
|
46
51
|
* - 停用 0
|
|
47
52
|
*/
|
|
48
|
-
|
|
53
|
+
P(R, "EnableDisable", [
|
|
49
54
|
{
|
|
50
55
|
label: "启用",
|
|
51
56
|
text: "✅ 启用",
|
|
@@ -61,7 +66,7 @@ k(L, "EnableDisable", [
|
|
|
61
66
|
* - 成功 1
|
|
62
67
|
* - 失败 0
|
|
63
68
|
*/
|
|
64
|
-
|
|
69
|
+
P(R, "SuccessResult", [
|
|
65
70
|
{
|
|
66
71
|
label: "成功",
|
|
67
72
|
text: "✅ 成功",
|
|
@@ -77,7 +82,7 @@ k(L, "SuccessResult", [
|
|
|
77
82
|
* - 是 1
|
|
78
83
|
* - 否 0
|
|
79
84
|
*/
|
|
80
|
-
|
|
85
|
+
P(R, "YesNo", [
|
|
81
86
|
{
|
|
82
87
|
label: "是",
|
|
83
88
|
text: "✅ 是",
|
|
@@ -93,7 +98,7 @@ k(L, "YesNo", [
|
|
|
93
98
|
* - 男 M
|
|
94
99
|
* - 女 F
|
|
95
100
|
*/
|
|
96
|
-
|
|
101
|
+
P(R, "MaleFemale", [
|
|
97
102
|
{
|
|
98
103
|
label: "男",
|
|
99
104
|
text: "男 👨",
|
|
@@ -105,11 +110,11 @@ k(L, "MaleFemale", [
|
|
|
105
110
|
value: "F"
|
|
106
111
|
}
|
|
107
112
|
]);
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
let _ = R;
|
|
114
|
+
_.setOptions("EnableDisable", _.EnableDisable);
|
|
115
|
+
_.setOptions("SuccessResult", _.SuccessResult);
|
|
116
|
+
_.setOptions("YesNo", _.YesNo);
|
|
117
|
+
_.setOptions("MaleFemale", _.MaleFemale);
|
|
113
118
|
const pe = {
|
|
114
119
|
/**
|
|
115
120
|
* 选项数据接口
|
|
@@ -173,7 +178,7 @@ const pe = {
|
|
|
173
178
|
type: Object,
|
|
174
179
|
required: !1
|
|
175
180
|
}
|
|
176
|
-
}, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ye = "/login/", ye = [],
|
|
181
|
+
}, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ye = "/login/", ye = [], Ut = (e) => {
|
|
177
182
|
for (const a of e) {
|
|
178
183
|
const t = ye.findIndex((s) => s.path === a.path);
|
|
179
184
|
t !== -1 && ye.splice(t, 1), ye.push(a), Re.addRoute(a);
|
|
@@ -181,16 +186,16 @@ const pe = {
|
|
|
181
186
|
}, at = (e, a, t, s = "") => {
|
|
182
187
|
const n = s + (s ? "/" : "") + e.path;
|
|
183
188
|
a[n] = { ...e, parent: t }, e.children && e.children.forEach((o) => at(o, a, e, n));
|
|
184
|
-
}, Re =
|
|
189
|
+
}, Re = Nt({
|
|
185
190
|
history: _t("/"),
|
|
186
191
|
routes: ye
|
|
187
|
-
}),
|
|
192
|
+
}), Ht = (e, a) => {
|
|
188
193
|
var n, o;
|
|
189
194
|
const t = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (o = e.meta) == null ? void 0 : o.permission;
|
|
190
195
|
if (!a)
|
|
191
196
|
return t.length === 0 && !s;
|
|
192
197
|
if (a) {
|
|
193
|
-
const r =
|
|
198
|
+
const r = N();
|
|
194
199
|
if (Se.VITE_PERMISSION_MODE === "role")
|
|
195
200
|
return t.length === 0 ? !0 : r.hasRole(t);
|
|
196
201
|
if (Se.VITE_PERMISSION_MODE === "permit") {
|
|
@@ -225,7 +230,7 @@ Re.beforeEach((e, a, t) => {
|
|
|
225
230
|
if (!r)
|
|
226
231
|
t();
|
|
227
232
|
else {
|
|
228
|
-
const u =
|
|
233
|
+
const u = N();
|
|
229
234
|
if (!u.isLogin)
|
|
230
235
|
t({ path: Ye });
|
|
231
236
|
else {
|
|
@@ -236,24 +241,24 @@ Re.beforeEach((e, a, t) => {
|
|
|
236
241
|
};
|
|
237
242
|
return;
|
|
238
243
|
}
|
|
239
|
-
const f =
|
|
244
|
+
const f = Ht(s, u.isLogin);
|
|
240
245
|
t();
|
|
241
246
|
}
|
|
242
247
|
}
|
|
243
248
|
});
|
|
244
|
-
const
|
|
249
|
+
const Vt = (e) => {
|
|
245
250
|
if (ne.value) {
|
|
246
251
|
const { to: a, next: t } = ne.value;
|
|
247
252
|
ne.value = null, a.path === "/" ? t(e) : t(a.path);
|
|
248
253
|
}
|
|
249
|
-
},
|
|
254
|
+
}, Kt = (e) => {
|
|
250
255
|
const a = Ke();
|
|
251
256
|
if (a.TabEnabled) {
|
|
252
|
-
if (
|
|
257
|
+
if (Qt(e.key, a.TabPanes))
|
|
253
258
|
return;
|
|
254
259
|
a.TabPanes.push(e);
|
|
255
260
|
}
|
|
256
|
-
},
|
|
261
|
+
}, Qt = (e, a) => a.find((t) => t.key === e), Ke = ce("pageInfo", {
|
|
257
262
|
state: () => ({
|
|
258
263
|
TabActive: "",
|
|
259
264
|
TabPanes: [],
|
|
@@ -298,12 +303,12 @@ const Ht = (e) => {
|
|
|
298
303
|
// 默认为true
|
|
299
304
|
keepAlive: !(t.meta && !t.meta.keepAlive)
|
|
300
305
|
};
|
|
301
|
-
|
|
306
|
+
Kt(s), this.TabActive = e;
|
|
302
307
|
}
|
|
303
308
|
},
|
|
304
309
|
persist: !1
|
|
305
310
|
});
|
|
306
|
-
class
|
|
311
|
+
class E {
|
|
307
312
|
/**
|
|
308
313
|
* 检查是否在微前端环境中运行
|
|
309
314
|
* @returns boolean
|
|
@@ -398,25 +403,25 @@ class A {
|
|
|
398
403
|
return this.callMainAppMethod("mainAppPush", a);
|
|
399
404
|
}
|
|
400
405
|
}
|
|
401
|
-
|
|
402
|
-
|
|
406
|
+
P(E, "messageId", 0), P(E, "callbacks", /* @__PURE__ */ new Map()), P(E, "pendingRequests", /* @__PURE__ */ new Map());
|
|
407
|
+
E.init();
|
|
403
408
|
const re = {
|
|
404
|
-
getAppInfo:
|
|
405
|
-
getHostInfo:
|
|
406
|
-
getUserInfo:
|
|
407
|
-
getToken:
|
|
408
|
-
userLogout:
|
|
409
|
-
mainAppPush:
|
|
410
|
-
isInMicroApp:
|
|
411
|
-
},
|
|
409
|
+
getAppInfo: E.getAppInfo.bind(E),
|
|
410
|
+
getHostInfo: E.getHostInfo.bind(E),
|
|
411
|
+
getUserInfo: E.getUserInfo.bind(E),
|
|
412
|
+
getToken: E.getToken.bind(E),
|
|
413
|
+
userLogout: E.userLogout.bind(E),
|
|
414
|
+
mainAppPush: E.mainAppPush.bind(E),
|
|
415
|
+
isInMicroApp: E.isInMicroApp.bind(E)
|
|
416
|
+
}, Jt = {
|
|
412
417
|
appList: {
|
|
413
418
|
api: "PLATFORM_API",
|
|
414
419
|
authorize: !0,
|
|
415
420
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
416
421
|
loadingText: !1
|
|
417
422
|
}
|
|
418
|
-
},
|
|
419
|
-
const a =
|
|
423
|
+
}, Ne = /* @__PURE__ */ new Map(), qt = (e) => {
|
|
424
|
+
const a = N(), { roles: t, permission: s } = e.meta || {};
|
|
420
425
|
if (F(t) && F(s))
|
|
421
426
|
return !0;
|
|
422
427
|
if (Se.VITE_PERMISSION_MODE === "role")
|
|
@@ -428,7 +433,7 @@ const re = {
|
|
|
428
433
|
return !1;
|
|
429
434
|
}, st = (e) => e.map((a) => {
|
|
430
435
|
const t = { ...a };
|
|
431
|
-
return
|
|
436
|
+
return qt(t) ? (t.children && (t.children = st(t.children)), t) : null;
|
|
432
437
|
}).filter(Boolean), nt = (e, a = "") => {
|
|
433
438
|
for (const t of e) {
|
|
434
439
|
if (!t.children && !t.redirect) {
|
|
@@ -450,7 +455,7 @@ const re = {
|
|
|
450
455
|
Version: "",
|
|
451
456
|
Host: "",
|
|
452
457
|
Source: Ce.Manual,
|
|
453
|
-
Action:
|
|
458
|
+
Action: We.App,
|
|
454
459
|
Path: "",
|
|
455
460
|
Icon: "",
|
|
456
461
|
Routes: [],
|
|
@@ -475,23 +480,23 @@ const re = {
|
|
|
475
480
|
});
|
|
476
481
|
},
|
|
477
482
|
async getRemoteAppList() {
|
|
478
|
-
return j(
|
|
483
|
+
return j(Jt.appList, {
|
|
479
484
|
Query: {
|
|
480
485
|
AppCode: this.appInfo.AppCode,
|
|
481
486
|
Enabled: 1
|
|
482
487
|
}
|
|
483
488
|
}).then((e) => {
|
|
484
|
-
if ((e == null ? void 0 : e.status) ===
|
|
489
|
+
if ((e == null ? void 0 : e.status) === k.SUCCESS && e.data)
|
|
485
490
|
this.appList.length = 0, this.appList.push(...e.data);
|
|
486
491
|
else if ((e == null ? void 0 : e.errno) == Oe) {
|
|
487
|
-
|
|
492
|
+
N().logout(!1);
|
|
488
493
|
return;
|
|
489
494
|
}
|
|
490
495
|
});
|
|
491
496
|
},
|
|
492
497
|
async toDefaultApp(e) {
|
|
493
498
|
if (this.appList.length === 0 && await this.loadAppList(), this.appList.length === 0) {
|
|
494
|
-
|
|
499
|
+
x.error("加载应用列表失败");
|
|
495
500
|
return;
|
|
496
501
|
}
|
|
497
502
|
let a = "";
|
|
@@ -519,7 +524,7 @@ const re = {
|
|
|
519
524
|
flattenRoutes: {},
|
|
520
525
|
Routes: a ?? [],
|
|
521
526
|
defaultPage: ""
|
|
522
|
-
}), (!V() || !
|
|
527
|
+
}), (!V() || !Mt()) && (await N().getRolePermits(t.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
523
528
|
},
|
|
524
529
|
/**
|
|
525
530
|
* 设置当前应用路由信息
|
|
@@ -538,14 +543,14 @@ const re = {
|
|
|
538
543
|
if (Object.keys(a).forEach((t) => {
|
|
539
544
|
const s = a[t];
|
|
540
545
|
s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(t) : this.CachedComponents.push(t));
|
|
541
|
-
}),
|
|
546
|
+
}), N().isLogin) {
|
|
542
547
|
const t = st(this.appInfo.Routes);
|
|
543
|
-
if (
|
|
548
|
+
if (Ut(t), this.appInfo.defaultPage = nt(t) || "", this.appInfo.defaultPage) {
|
|
544
549
|
if (this.menuLoaded = !0, V()) {
|
|
545
550
|
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
546
551
|
re.mainAppPush(s);
|
|
547
552
|
}
|
|
548
|
-
|
|
553
|
+
Vt(this.appInfo.defaultPage);
|
|
549
554
|
}
|
|
550
555
|
}
|
|
551
556
|
},
|
|
@@ -585,7 +590,7 @@ const re = {
|
|
|
585
590
|
* @returns 组件实例
|
|
586
591
|
*/
|
|
587
592
|
cacheComponent(e, a) {
|
|
588
|
-
let t =
|
|
593
|
+
let t = Ne.get(a.path);
|
|
589
594
|
if (!t)
|
|
590
595
|
if (this.CachedComponents.includes(a.path))
|
|
591
596
|
t = {
|
|
@@ -594,7 +599,7 @@ const re = {
|
|
|
594
599
|
render() {
|
|
595
600
|
return H(e);
|
|
596
601
|
}
|
|
597
|
-
},
|
|
602
|
+
}, Ne.set(a.path, t);
|
|
598
603
|
else return e;
|
|
599
604
|
return t;
|
|
600
605
|
},
|
|
@@ -603,7 +608,7 @@ const re = {
|
|
|
603
608
|
* @param path 路由地址
|
|
604
609
|
*/
|
|
605
610
|
excludeComponent(e) {
|
|
606
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
611
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Ne.delete(e);
|
|
607
612
|
},
|
|
608
613
|
/**
|
|
609
614
|
* 路由路径层级查询,返回面包屑
|
|
@@ -624,7 +629,7 @@ const re = {
|
|
|
624
629
|
Version: "",
|
|
625
630
|
Host: "",
|
|
626
631
|
Source: Ce.Manual,
|
|
627
|
-
Action:
|
|
632
|
+
Action: We.App,
|
|
628
633
|
Path: "",
|
|
629
634
|
Icon: "",
|
|
630
635
|
Routes: [],
|
|
@@ -638,7 +643,7 @@ const re = {
|
|
|
638
643
|
}
|
|
639
644
|
},
|
|
640
645
|
persist: !1
|
|
641
|
-
}),
|
|
646
|
+
}), Gt = "Token解析失败", Oe = 1400, Qe = {
|
|
642
647
|
login: {
|
|
643
648
|
api: "PLATFORM_API",
|
|
644
649
|
url: "/openapi/LoginSrv/login",
|
|
@@ -656,43 +661,43 @@ const re = {
|
|
|
656
661
|
url: "/api/LoginSrv/logout",
|
|
657
662
|
loadingText: "正在退出..."
|
|
658
663
|
}
|
|
659
|
-
},
|
|
664
|
+
}, jt = (e) => {
|
|
660
665
|
let a = {
|
|
661
666
|
Option: {
|
|
662
667
|
Mode: "MicroApp"
|
|
663
668
|
},
|
|
664
669
|
Query: e
|
|
665
670
|
};
|
|
666
|
-
return j(Qe.login, a).then((t) => (t == null ? void 0 : t.status) ===
|
|
667
|
-
},
|
|
671
|
+
return j(Qe.login, a).then((t) => (t == null ? void 0 : t.status) === k.SUCCESS ? t : null);
|
|
672
|
+
}, zt = (e) => {
|
|
668
673
|
let a = {
|
|
669
674
|
Query: {
|
|
670
675
|
AppId: e
|
|
671
676
|
}
|
|
672
677
|
};
|
|
673
678
|
return j(Qe.auth, a).then((t) => {
|
|
674
|
-
if ((t == null ? void 0 : t.status) ===
|
|
679
|
+
if ((t == null ? void 0 : t.status) === k.SUCCESS)
|
|
675
680
|
return t.data;
|
|
676
681
|
if ((t == null ? void 0 : t.errno) == Oe) {
|
|
677
|
-
|
|
682
|
+
N().logout(!1);
|
|
678
683
|
return;
|
|
679
684
|
}
|
|
680
|
-
return
|
|
685
|
+
return x.error("获取授权信息失败," + (t == null ? void 0 : t.msg)), null;
|
|
681
686
|
});
|
|
682
687
|
}, Bt = () => {
|
|
683
688
|
let e = {
|
|
684
689
|
Option: {},
|
|
685
690
|
Query: {}
|
|
686
691
|
};
|
|
687
|
-
return j(Qe.logout, e).then((a) => (a == null ? void 0 : a.status) ===
|
|
692
|
+
return j(Qe.logout, e).then((a) => (a == null ? void 0 : a.status) === k.SUCCESS ? a.data : null);
|
|
688
693
|
}, Wt = (e) => {
|
|
689
694
|
try {
|
|
690
695
|
const a = JSON.parse(atob(e.token.split(".")[1]));
|
|
691
696
|
return a.user = JSON.parse(a.user), e.UserInfo = a.user, !0;
|
|
692
697
|
} catch (a) {
|
|
693
|
-
return console.error(
|
|
698
|
+
return console.error(Gt, a), !1;
|
|
694
699
|
}
|
|
695
|
-
}, M = c(""), te = c(null),
|
|
700
|
+
}, M = c(""), te = c(null), N = ce("userInfo", {
|
|
696
701
|
state: () => ({
|
|
697
702
|
isLogin: !1,
|
|
698
703
|
userInfo: {
|
|
@@ -718,7 +723,7 @@ const re = {
|
|
|
718
723
|
* @returns
|
|
719
724
|
*/
|
|
720
725
|
async login(e, a) {
|
|
721
|
-
const t = await
|
|
726
|
+
const t = await jt(e);
|
|
722
727
|
if (t) {
|
|
723
728
|
const s = t;
|
|
724
729
|
if (s.errno)
|
|
@@ -731,7 +736,7 @@ const re = {
|
|
|
731
736
|
...n.UserInfo
|
|
732
737
|
}, M.value = n.UserInfo.UserLevel;
|
|
733
738
|
else {
|
|
734
|
-
|
|
739
|
+
x.error("用户信息解析失败");
|
|
735
740
|
return;
|
|
736
741
|
}
|
|
737
742
|
a && K().toDefaultApp();
|
|
@@ -749,7 +754,7 @@ const re = {
|
|
|
749
754
|
if (te.value && te.value.appId === e)
|
|
750
755
|
return !0;
|
|
751
756
|
try {
|
|
752
|
-
const a = await
|
|
757
|
+
const a = await zt(e);
|
|
753
758
|
return a ? (te.value = {
|
|
754
759
|
appId: e,
|
|
755
760
|
permits: a.permits || [],
|
|
@@ -849,7 +854,7 @@ const re = {
|
|
|
849
854
|
console.error("调用登出接口失败", a);
|
|
850
855
|
} finally {
|
|
851
856
|
await this.clean(), e && setTimeout(async () => {
|
|
852
|
-
|
|
857
|
+
x.success("已退出登录");
|
|
853
858
|
}, 1e3), setTimeout(async () => {
|
|
854
859
|
K().logout();
|
|
855
860
|
}, 2e3);
|
|
@@ -887,15 +892,15 @@ const re = {
|
|
|
887
892
|
JSON.parse(JSON.stringify(s.params ?? {})),
|
|
888
893
|
JSON.parse(JSON.stringify(a.params ?? {}))
|
|
889
894
|
);
|
|
890
|
-
return a.processParams && (n = a.processParams(n)), a.loadingState && (a.loadingState.value = !0), a.hideErrorToast && (s.hideErrorToast = !0), j(s, n).then((o) => (a.loadingState && (a.loadingState.value = !1), (o == null ? void 0 : o.errno) == Oe ? (
|
|
895
|
+
return a.processParams && (n = a.processParams(n)), a.loadingState && (a.loadingState.value = !0), a.hideErrorToast && (s.hideErrorToast = !0), j(s, n).then((o) => (a.loadingState && (a.loadingState.value = !1), (o == null ? void 0 : o.errno) == Oe ? (N().logout(!1), null) : o)).catch((o) => (a.loadingState && (a.loadingState.value = !1), null));
|
|
891
896
|
}, Je = (e, a) => {
|
|
892
897
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
893
898
|
const t = Te(e, a);
|
|
894
899
|
return a.url = t, Pe(e, a);
|
|
895
|
-
}, _a = (e, a) => (a.params || (a.params = {}), a.params.Query || (a.params.Query = {}), a.loadingText = a.loadingText === !1 ? !1 : a.loadingText || "开始执行...", a.url = Te(e, a), Pe(e, a).then((t) => ((t == null ? void 0 : t.status) ===
|
|
900
|
+
}, _a = (e, a) => (a.params || (a.params = {}), a.params.Query || (a.params.Query = {}), a.loadingText = a.loadingText === !1 ? !1 : a.loadingText || "开始执行...", a.url = Te(e, a), Pe(e, a).then((t) => ((t == null ? void 0 : t.status) === k.SUCCESS && (a.hideErrorToast || x.success("执行成功!")), t))), rt = (e, a = {}) => {
|
|
896
901
|
const t = a.primaryKey || "Id";
|
|
897
902
|
if (a.params || (a.params = {}), a.params.Query || (a.params.Query = {}), !a.params.Data)
|
|
898
|
-
return
|
|
903
|
+
return x.error("错误!无保存数据!"), Promise.resolve(null);
|
|
899
904
|
const s = {
|
|
900
905
|
...a,
|
|
901
906
|
urlKey: a.urlKey || "save",
|
|
@@ -903,8 +908,8 @@ const re = {
|
|
|
903
908
|
};
|
|
904
909
|
s.params.Query[t] = s.params.Data[t];
|
|
905
910
|
const n = Te(e, s);
|
|
906
|
-
return s.url = n, Pe(e, s).then((o) => ((o == null ? void 0 : o.status) ===
|
|
907
|
-
},
|
|
911
|
+
return s.url = n, Pe(e, s).then((o) => ((o == null ? void 0 : o.status) === k.SUCCESS && (a.hideErrorToast || x.success("保存成功!")), o));
|
|
912
|
+
}, Ct = (e, a, t = {}) => {
|
|
908
913
|
const s = t.primaryKey || "Id";
|
|
909
914
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
910
915
|
const n = {
|
|
@@ -913,27 +918,27 @@ const re = {
|
|
|
913
918
|
loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据删除中..."
|
|
914
919
|
};
|
|
915
920
|
if (Array.isArray(a) ? n.params.Query[s] = a : n.params.Query[s] = a[s], F(n.params.Query) || F(n.params.Query[s]))
|
|
916
|
-
return
|
|
921
|
+
return x.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
917
922
|
const o = Te(e, n);
|
|
918
|
-
return n.url = o, Pe(e, n).then((r) => ((r == null ? void 0 : r.status) ===
|
|
919
|
-
},
|
|
923
|
+
return n.url = o, Pe(e, n).then((r) => ((r == null ? void 0 : r.status) === k.SUCCESS && (t.hideErrorToast || x.success("删除成功!")), r));
|
|
924
|
+
}, Yt = (e, a) => Je(e, {
|
|
920
925
|
urlKey: "tree",
|
|
921
926
|
params: {},
|
|
922
927
|
loadingState: e.isTreeLoading,
|
|
923
928
|
loadingText: !1,
|
|
924
929
|
processParams: () => fe(e.treeQuery, a)
|
|
925
|
-
}).then((t) => (t == null ? void 0 : t.status) ===
|
|
930
|
+
}).then((t) => (t == null ? void 0 : t.status) === k.SUCCESS ? (e.data.value = t.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((t == null ? void 0 : t.data) || []), [])), Xt = (e, a) => {
|
|
926
931
|
for (const t of e) {
|
|
927
932
|
if (t.key === a) return t;
|
|
928
933
|
if (t.children) {
|
|
929
|
-
const s =
|
|
934
|
+
const s = Xt(t.children, a);
|
|
930
935
|
if (s) return s;
|
|
931
936
|
}
|
|
932
937
|
}
|
|
933
938
|
return null;
|
|
934
939
|
};
|
|
935
940
|
let ie;
|
|
936
|
-
const
|
|
941
|
+
const Da = (e) => {
|
|
937
942
|
ie = new Ve({}), ie.messages({
|
|
938
943
|
required: "${label}不能为空",
|
|
939
944
|
types: {
|
|
@@ -960,7 +965,7 @@ const Na = (e) => {
|
|
|
960
965
|
},
|
|
961
966
|
...e
|
|
962
967
|
});
|
|
963
|
-
},
|
|
968
|
+
}, Ua = (e) => {
|
|
964
969
|
if (!e || F(e))
|
|
965
970
|
return [];
|
|
966
971
|
const a = [], t = ie.messages(), s = (o, r, l) => {
|
|
@@ -972,9 +977,9 @@ const Na = (e) => {
|
|
|
972
977
|
const i = ["string", "number", "array"];
|
|
973
978
|
for (const f of i)
|
|
974
979
|
if (u === f && t[f]) {
|
|
975
|
-
const p = t[f],
|
|
976
|
-
for (const
|
|
977
|
-
|
|
980
|
+
const p = t[f], h = ["len", "min", "max", "range"];
|
|
981
|
+
for (const m of h)
|
|
982
|
+
m === "range" && r.min != null && r.max != null && p.range ? n(p.range, o, { min: r.min, max: r.max }, l) : m !== "range" && r[m] != null && p[m] && n(p[m], o, { [m]: r[m] }, l);
|
|
978
983
|
}
|
|
979
984
|
if (r.required && t.required && n(t.required, o, {}, l), r.pattern && t.pattern && n(r.message, o, {}, l), r.enum && Array.isArray(r.enum) && t.enum) {
|
|
980
985
|
const f = r.enum.join(", ");
|
|
@@ -1018,7 +1023,7 @@ const Na = (e) => {
|
|
|
1018
1023
|
const a = e.formData.value, t = e.formRules.value;
|
|
1019
1024
|
F(t) || (qe(e), e.ruleValidator || (e.ruleValidator = new Ve({}), e.ruleValidator.messages(ie.messages()), e.ruleValidator.define(t)), e.ruleResults.value = await e.ruleValidator.validate(a).then(() => {
|
|
1020
1025
|
}).catch(({ fields: s }) => s));
|
|
1021
|
-
},
|
|
1026
|
+
}, Ha = async (e, a, t) => (t || (t = new Ve({}), t.messages(ie.messages()), t.define(a)), t.validate(e).then(() => {
|
|
1022
1027
|
}).catch(({ fields: s }) => s)), qe = (e) => {
|
|
1023
1028
|
e.ruleResults.value = void 0;
|
|
1024
1029
|
}, X = () => {
|
|
@@ -1029,7 +1034,7 @@ const Na = (e) => {
|
|
|
1029
1034
|
ruleKey: t,
|
|
1030
1035
|
errInfo: s
|
|
1031
1036
|
};
|
|
1032
|
-
},
|
|
1037
|
+
}, Zt = (e, a) => {
|
|
1033
1038
|
let t = c({
|
|
1034
1039
|
msg: "",
|
|
1035
1040
|
errClass: ""
|
|
@@ -1041,7 +1046,7 @@ const Na = (e) => {
|
|
|
1041
1046
|
() => s == null ? void 0 : s.value,
|
|
1042
1047
|
(n) => {
|
|
1043
1048
|
if (t.value.errClass = "", t.value.msg = "", !F(n)) {
|
|
1044
|
-
const o =
|
|
1049
|
+
const o = ea(
|
|
1045
1050
|
{
|
|
1046
1051
|
label: e.label,
|
|
1047
1052
|
rule: e.rule
|
|
@@ -1054,7 +1059,7 @@ const Na = (e) => {
|
|
|
1054
1059
|
},
|
|
1055
1060
|
{ deep: !0 }
|
|
1056
1061
|
), t;
|
|
1057
|
-
},
|
|
1062
|
+
}, ea = (e, a, t) => {
|
|
1058
1063
|
const s = c([]), n = c(""), o = c("");
|
|
1059
1064
|
if (!e.rule || !a || !t)
|
|
1060
1065
|
return { msg: n, ruleErrors: s, errClass: o };
|
|
@@ -1076,29 +1081,29 @@ const Na = (e) => {
|
|
|
1076
1081
|
if (i) {
|
|
1077
1082
|
const f = n.value.match(l);
|
|
1078
1083
|
f && f.forEach((p) => {
|
|
1079
|
-
const
|
|
1080
|
-
n.value = n.value.replace(p, i[
|
|
1084
|
+
const h = p.replace("${", "").replace("}", "");
|
|
1085
|
+
n.value = n.value.replace(p, i[h] ?? "");
|
|
1081
1086
|
});
|
|
1082
1087
|
}
|
|
1083
1088
|
}), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
|
|
1084
|
-
},
|
|
1089
|
+
}, Va = (e, a) => {
|
|
1085
1090
|
$e(U.LabelText, e.label || ""), $e(U.RuleKey, e.rule || "");
|
|
1086
|
-
const t =
|
|
1091
|
+
const t = Zt(e, a);
|
|
1087
1092
|
return $e(U.ErrInfo, t), t;
|
|
1088
|
-
},
|
|
1093
|
+
}, ta = (e, a) => {
|
|
1089
1094
|
if (!a)
|
|
1090
1095
|
return;
|
|
1091
1096
|
const [t, ...s] = e;
|
|
1092
1097
|
if (e.length === 1)
|
|
1093
1098
|
return a[t];
|
|
1094
1099
|
if (a[t])
|
|
1095
|
-
return
|
|
1096
|
-
}, Va = (e) => {
|
|
1097
|
-
ot(e);
|
|
1100
|
+
return ta(s, a[t].fields);
|
|
1098
1101
|
}, Ka = (e) => {
|
|
1102
|
+
ot(e);
|
|
1103
|
+
}, Qa = (e) => {
|
|
1099
1104
|
const a = e.page, t = e.formData.value;
|
|
1100
1105
|
t[e.primaryKey ?? a.primaryKey] = null, ot(e);
|
|
1101
|
-
},
|
|
1106
|
+
}, Ja = (e) => {
|
|
1102
1107
|
Ge(e), e.visible.value = !1;
|
|
1103
1108
|
}, ot = async (e) => {
|
|
1104
1109
|
var s;
|
|
@@ -1106,7 +1111,7 @@ const Na = (e) => {
|
|
|
1106
1111
|
if (e.isFormSaving.value = !0, qe(e), e.beforeSave && e.beforeSave() === !1)
|
|
1107
1112
|
return e.isFormSaving.value = !1, Promise.resolve();
|
|
1108
1113
|
if (e.formRules.value && await de(e), e.ruleResults.value)
|
|
1109
|
-
return
|
|
1114
|
+
return x.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
|
|
1110
1115
|
const t = e.formData.value;
|
|
1111
1116
|
return rt(
|
|
1112
1117
|
{
|
|
@@ -1127,38 +1132,38 @@ const Na = (e) => {
|
|
|
1127
1132
|
}
|
|
1128
1133
|
).then((n) => {
|
|
1129
1134
|
var o, r;
|
|
1130
|
-
if ((n == null ? void 0 : n.status) ===
|
|
1131
|
-
|
|
1135
|
+
if ((n == null ? void 0 : n.status) === k.SUCCESS)
|
|
1136
|
+
x.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
|
|
1132
1137
|
else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
|
|
1133
1138
|
const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
|
|
1134
1139
|
if (l && l.length > 2 && l[1] && l[2]) {
|
|
1135
1140
|
const u = l[1], i = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
|
|
1136
1141
|
if (f && i.length > 0) {
|
|
1137
1142
|
const p = {};
|
|
1138
|
-
i.forEach((
|
|
1139
|
-
f[
|
|
1143
|
+
i.forEach((h) => {
|
|
1144
|
+
f[h] && (p[h] = [
|
|
1140
1145
|
{
|
|
1141
|
-
field:
|
|
1146
|
+
field: h,
|
|
1142
1147
|
fieldValue: u,
|
|
1143
1148
|
message: "数据重复"
|
|
1144
1149
|
}
|
|
1145
1150
|
]);
|
|
1146
1151
|
}), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
|
|
1147
1152
|
}
|
|
1148
|
-
|
|
1149
|
-
} else
|
|
1153
|
+
x.error(`保存失败!数据 \`${u}\` 已存在!`);
|
|
1154
|
+
} else x.error((n == null ? void 0 : n.msg) ?? "保存失败!");
|
|
1150
1155
|
e.afterSave && e.afterSave(n);
|
|
1151
1156
|
} else
|
|
1152
|
-
|
|
1157
|
+
x.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
|
|
1153
1158
|
});
|
|
1154
|
-
},
|
|
1159
|
+
}, qa = async (e) => {
|
|
1155
1160
|
const a = e.page, t = e.grid;
|
|
1156
1161
|
e.isFormLoading.value = !0;
|
|
1157
1162
|
const s = e.formData.value, n = e.primaryKey ?? a.primaryKey;
|
|
1158
1163
|
return ut(t, { [n]: s[n] }, e.detailUrl).then((o) => {
|
|
1159
1164
|
e.isFormLoading.value = !1, o && it(e, o);
|
|
1160
1165
|
});
|
|
1161
|
-
},
|
|
1166
|
+
}, Ga = (e) => {
|
|
1162
1167
|
const a = e.grid;
|
|
1163
1168
|
a && (a.rowData.value = void 0), e && (Ge(e), e.visible && (e.visible.value = !1), setTimeout(() => {
|
|
1164
1169
|
e.visible.value = !0;
|
|
@@ -1169,8 +1174,8 @@ const Na = (e) => {
|
|
|
1169
1174
|
e.formData.value = JSON.parse(JSON.stringify(t));
|
|
1170
1175
|
}, Ge = (e) => {
|
|
1171
1176
|
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, qe(e);
|
|
1172
|
-
},
|
|
1173
|
-
const t =
|
|
1177
|
+
}, ja = (e, a) => {
|
|
1178
|
+
const t = N();
|
|
1174
1179
|
return e.filter((n) => n.role && !t.hasRole(n.role) || n.permit && !t.hasPermit(Re.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
|
|
1175
1180
|
if (!a) {
|
|
1176
1181
|
if (n.visible === !1)
|
|
@@ -1180,7 +1185,7 @@ const Na = (e) => {
|
|
|
1180
1185
|
}
|
|
1181
1186
|
return !0;
|
|
1182
1187
|
});
|
|
1183
|
-
},
|
|
1188
|
+
}, za = (e, a) => {
|
|
1184
1189
|
const t = a == null ? void 0 : a.filter((s) => {
|
|
1185
1190
|
const n = e.find(
|
|
1186
1191
|
(o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
|
|
@@ -1188,7 +1193,7 @@ const Na = (e) => {
|
|
|
1188
1193
|
return n ? { ...s, ...n } : !1;
|
|
1189
1194
|
});
|
|
1190
1195
|
return [...t || [], ...e.filter((s) => !(t != null && t.includes(s)))];
|
|
1191
|
-
},
|
|
1196
|
+
}, aa = (e) => lt(e).then((a) => a.rows), lt = (e) => {
|
|
1192
1197
|
e.gridQuery || (e.gridQuery = {});
|
|
1193
1198
|
const a = e.remotePage ? "find" : "list";
|
|
1194
1199
|
return Je(e, {
|
|
@@ -1201,7 +1206,7 @@ const Na = (e) => {
|
|
|
1201
1206
|
return e.remotePage && (t.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), fe((n = e.gridUrl) == null ? void 0 : n.params, t, e.gridQuery);
|
|
1202
1207
|
}
|
|
1203
1208
|
}).then((t) => {
|
|
1204
|
-
if ((t == null ? void 0 : t.status) ===
|
|
1209
|
+
if ((t == null ? void 0 : t.status) === k.SUCCESS) {
|
|
1205
1210
|
let s = t.data;
|
|
1206
1211
|
return s.rows ? (e.tableData.value = s.rows, e.total.value = s.total) : (e.tableData.value = t.data, e.total.value = t.data.length, s = {
|
|
1207
1212
|
total: e.total.value,
|
|
@@ -1216,7 +1221,7 @@ const Na = (e) => {
|
|
|
1216
1221
|
rows: []
|
|
1217
1222
|
};
|
|
1218
1223
|
});
|
|
1219
|
-
},
|
|
1224
|
+
}, sa = (e, a, t = {}) => rt(e, {
|
|
1220
1225
|
urlKey: "update",
|
|
1221
1226
|
url: e.updateUrl,
|
|
1222
1227
|
params: {
|
|
@@ -1225,11 +1230,11 @@ const Na = (e) => {
|
|
|
1225
1230
|
},
|
|
1226
1231
|
loadingState: e.isGridSaving,
|
|
1227
1232
|
...t
|
|
1228
|
-
}).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1233
|
+
}).then((s) => ((s == null ? void 0 : s.status) === k.SUCCESS && setTimeout(() => {
|
|
1229
1234
|
e.reload.value = !0, e.afterUpdate && e.afterUpdate(a);
|
|
1230
1235
|
}, 50), s)), Ba = (e, a) => {
|
|
1231
1236
|
const t = {};
|
|
1232
|
-
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey],
|
|
1237
|
+
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey], sa(e, t, {
|
|
1233
1238
|
loadingText: !1,
|
|
1234
1239
|
hideErrorToast: !0
|
|
1235
1240
|
});
|
|
@@ -1240,20 +1245,20 @@ const Na = (e) => {
|
|
|
1240
1245
|
loadingState: e.isGridLoading
|
|
1241
1246
|
}), Wa = (e, a) => {
|
|
1242
1247
|
const t = a;
|
|
1243
|
-
return ut(e, { [e.primaryKey]: t[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1244
|
-
},
|
|
1248
|
+
return ut(e, { [e.primaryKey]: t[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === k.SUCCESS && s.data && (e.expandRows.value[t[e.primaryKey]] = s), s));
|
|
1249
|
+
}, Ca = (e, a) => {
|
|
1245
1250
|
let t = e.editor;
|
|
1246
1251
|
e.rowData.value = a, t && (it(t, a), t.visible.value = !0);
|
|
1247
|
-
},
|
|
1252
|
+
}, Ya = (e, a) => Ct(e, a, {
|
|
1248
1253
|
url: e.deleteUrl,
|
|
1249
1254
|
primaryKey: e.primaryKey
|
|
1250
|
-
}).then((t) => ((t == null ? void 0 : t.status) ===
|
|
1255
|
+
}).then((t) => ((t == null ? void 0 : t.status) === k.SUCCESS && setTimeout(() => {
|
|
1251
1256
|
e.reload.value = !0, e.afterDelete && !Array.isArray(a) && e.afterDelete(a);
|
|
1252
1257
|
}, 50), t));
|
|
1253
1258
|
var De = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(De || {});
|
|
1254
|
-
class
|
|
1259
|
+
class na {
|
|
1255
1260
|
constructor() {
|
|
1256
|
-
|
|
1261
|
+
P(this, "listeners", {});
|
|
1257
1262
|
}
|
|
1258
1263
|
// 检查事件名是否符合前缀
|
|
1259
1264
|
isValidPrefix(a) {
|
|
@@ -1297,12 +1302,12 @@ class sa {
|
|
|
1297
1302
|
this.listeners[a] && this.listeners[a].forEach((s) => s(a, ...t));
|
|
1298
1303
|
}
|
|
1299
1304
|
}
|
|
1300
|
-
const
|
|
1305
|
+
const B = new na(), ee = (e, a, t) => {
|
|
1301
1306
|
if (a.inputFactory && (t != null && t.reloadEvent)) {
|
|
1302
1307
|
const s = a.inputFactory.value;
|
|
1303
1308
|
s.reloadHandler = (n, o) => {
|
|
1304
|
-
|
|
1305
|
-
},
|
|
1309
|
+
ra(a.url, a, o);
|
|
1310
|
+
}, B.on(t.reloadEvent, s.reloadHandler);
|
|
1306
1311
|
}
|
|
1307
1312
|
if (t != null && t.data)
|
|
1308
1313
|
g(
|
|
@@ -1316,7 +1321,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1316
1321
|
e && ct(a.url, a, a.params ?? {});
|
|
1317
1322
|
else {
|
|
1318
1323
|
const s = c(se(U.LabelText, ""));
|
|
1319
|
-
|
|
1324
|
+
x.error("`" + s.value + "` 未配置选项数据!", {
|
|
1320
1325
|
duration: 5e3
|
|
1321
1326
|
});
|
|
1322
1327
|
}
|
|
@@ -1325,23 +1330,23 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1325
1330
|
const s = {
|
|
1326
1331
|
...e.fieldMap
|
|
1327
1332
|
};
|
|
1328
|
-
a =
|
|
1333
|
+
a = $t(s, a);
|
|
1329
1334
|
}
|
|
1330
1335
|
a = JSON.parse(JSON.stringify(a ?? [])), e.all && a.unshift({
|
|
1331
1336
|
label: "全部",
|
|
1332
1337
|
value: e.allValue ?? void 0
|
|
1333
1338
|
}), e.options.value = a;
|
|
1334
|
-
},
|
|
1339
|
+
}, ra = (e, a, t) => {
|
|
1335
1340
|
Array.isArray(t) ? je(a, t, !0) : ct(e, a, t);
|
|
1336
1341
|
}, he = (e, a) => {
|
|
1337
1342
|
var t;
|
|
1338
|
-
(t = e.inputFactory) != null && t.value && a.reloadEvent && e.inputFactory.value.reloadHandler &&
|
|
1343
|
+
(t = e.inputFactory) != null && t.value && a.reloadEvent && e.inputFactory.value.reloadHandler && B.off(a.reloadEvent, e.inputFactory.value.reloadHandler);
|
|
1339
1344
|
}, ct = (e, a, t) => {
|
|
1340
1345
|
const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(a.params ?? {})), o = fe(s, n, t);
|
|
1341
|
-
|
|
1346
|
+
oa(e, a, a.fieldMap, o).then((r) => {
|
|
1342
1347
|
je(a, r, !1);
|
|
1343
1348
|
});
|
|
1344
|
-
},
|
|
1349
|
+
}, oa = (e, a, t, s) => {
|
|
1345
1350
|
const { fieldMap: n, ...o } = e, l = {
|
|
1346
1351
|
...{
|
|
1347
1352
|
url: "",
|
|
@@ -1354,18 +1359,18 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1354
1359
|
...o
|
|
1355
1360
|
};
|
|
1356
1361
|
return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), a.optionQuery = s, a.isOptionLoading.value = !0, j(l, s).then((u) => {
|
|
1357
|
-
if ((u == null ? void 0 : u.status) ===
|
|
1362
|
+
if ((u == null ? void 0 : u.status) === k.SUCCESS) {
|
|
1358
1363
|
if (u.data)
|
|
1359
1364
|
return u.data;
|
|
1360
1365
|
} else if ((u == null ? void 0 : u.errno) == Oe) {
|
|
1361
|
-
|
|
1366
|
+
N().logout(!1);
|
|
1362
1367
|
return;
|
|
1363
1368
|
}
|
|
1364
1369
|
return [];
|
|
1365
1370
|
}).finally(() => {
|
|
1366
1371
|
a.isOptionLoading.value = !1;
|
|
1367
1372
|
});
|
|
1368
|
-
},
|
|
1373
|
+
}, ia = (e, a, t) => {
|
|
1369
1374
|
if (e === void 0) return;
|
|
1370
1375
|
const s = (o) => {
|
|
1371
1376
|
const r = { ...o };
|
|
@@ -1426,7 +1431,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1426
1431
|
var o, r;
|
|
1427
1432
|
const s = (o = e.inputFactory) == null ? void 0 : o.value;
|
|
1428
1433
|
s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && de(s.editorCtrl), e.selected.value = t;
|
|
1429
|
-
const n =
|
|
1434
|
+
const n = ia(t, e.options.value);
|
|
1430
1435
|
if (e.selectedOptions.value = n, a.formData && a.outFields && ft(a.formData, a.outFields, n), a.changeEvent) {
|
|
1431
1436
|
const [l, u] = a.changeEvent;
|
|
1432
1437
|
if (u)
|
|
@@ -1435,7 +1440,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1435
1440
|
const f = be(u, { selectedValues: t });
|
|
1436
1441
|
try {
|
|
1437
1442
|
const p = JSON.parse(f);
|
|
1438
|
-
|
|
1443
|
+
B.emit(i, p, t, n);
|
|
1439
1444
|
} catch (p) {
|
|
1440
1445
|
console.error("eventParamsValue: ", f, p);
|
|
1441
1446
|
}
|
|
@@ -1444,15 +1449,15 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1444
1449
|
const i = be(u, { selectedValues: t });
|
|
1445
1450
|
try {
|
|
1446
1451
|
const f = JSON.parse(i);
|
|
1447
|
-
|
|
1452
|
+
B.emit(l, f, t, n);
|
|
1448
1453
|
} catch (f) {
|
|
1449
1454
|
console.error("eventParamsValue: ", i, f);
|
|
1450
1455
|
}
|
|
1451
1456
|
}
|
|
1452
1457
|
else
|
|
1453
1458
|
Array.isArray(l) ? l.every((i) => {
|
|
1454
|
-
|
|
1455
|
-
}) :
|
|
1459
|
+
B.emit(i, n, t);
|
|
1460
|
+
}) : B.emit(l, n, t);
|
|
1456
1461
|
}
|
|
1457
1462
|
return s != null && s.inputEmit && s.inputEmit("change", t, n), n;
|
|
1458
1463
|
}, S = {
|
|
@@ -1493,7 +1498,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1493
1498
|
value: "Id"
|
|
1494
1499
|
}
|
|
1495
1500
|
}
|
|
1496
|
-
},
|
|
1501
|
+
}, Xa = (e) => {
|
|
1497
1502
|
S.PageOption = {
|
|
1498
1503
|
...S.PageOption,
|
|
1499
1504
|
...e.pageOption
|
|
@@ -1510,7 +1515,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1510
1515
|
}, Me = (e) => {
|
|
1511
1516
|
for (let a in e.urls)
|
|
1512
1517
|
e.urls[a].api || (e.urls[a].api = e.api), e.urls[a].authorize === void 0 && (e.urls[a].authorize = e.authorize);
|
|
1513
|
-
},
|
|
1518
|
+
}, la = (e, a, t, s) => (Me(e), {
|
|
1514
1519
|
editorCtrl: {
|
|
1515
1520
|
...S.EditorOption,
|
|
1516
1521
|
name: "",
|
|
@@ -1526,7 +1531,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1526
1531
|
isFormSaving: c(!1),
|
|
1527
1532
|
isFormLoading: c(!1)
|
|
1528
1533
|
}
|
|
1529
|
-
}),
|
|
1534
|
+
}), ua = (e, a, t) => {
|
|
1530
1535
|
Me(e);
|
|
1531
1536
|
const s = {
|
|
1532
1537
|
...S.GridOption,
|
|
@@ -1560,12 +1565,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1560
1565
|
(n) => {
|
|
1561
1566
|
n && (setTimeout(() => {
|
|
1562
1567
|
s.reload.value = !1;
|
|
1563
|
-
}, 1), s.remotePage ? lt(s) :
|
|
1568
|
+
}, 1), s.remotePage ? lt(s) : aa(s));
|
|
1564
1569
|
}
|
|
1565
1570
|
), {
|
|
1566
1571
|
gridCtrl: s
|
|
1567
1572
|
};
|
|
1568
|
-
},
|
|
1573
|
+
}, Za = (e, a) => {
|
|
1569
1574
|
Me(e);
|
|
1570
1575
|
const t = {
|
|
1571
1576
|
...S.TreeOption,
|
|
@@ -1581,7 +1586,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1581
1586
|
(s) => {
|
|
1582
1587
|
s && (setTimeout(() => {
|
|
1583
1588
|
t.reload.value = !1;
|
|
1584
|
-
}, 1),
|
|
1589
|
+
}, 1), Yt(t));
|
|
1585
1590
|
}
|
|
1586
1591
|
), {
|
|
1587
1592
|
treeCtrl: t
|
|
@@ -1608,24 +1613,24 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1608
1613
|
), {
|
|
1609
1614
|
optionCtrl: t
|
|
1610
1615
|
};
|
|
1611
|
-
},
|
|
1616
|
+
}, es = (e, a, t) => {
|
|
1612
1617
|
Me(e);
|
|
1613
1618
|
const s = {
|
|
1614
1619
|
...S.PageOption,
|
|
1615
1620
|
...e
|
|
1616
|
-
}, { editorCtrl: n } =
|
|
1621
|
+
}, { editorCtrl: n } = la(e, s, a, t), { gridCtrl: o } = ua(e, s);
|
|
1617
1622
|
return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
|
|
1618
1623
|
pageCtrl: s,
|
|
1619
1624
|
editorCtrl: n,
|
|
1620
1625
|
gridCtrl: o
|
|
1621
1626
|
};
|
|
1622
|
-
},
|
|
1627
|
+
}, ca = 7 * 24 * 60 * 60 * 1e3, _e = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Set(), G = c({}), ts = G, as = (e) => {
|
|
1623
1628
|
var n;
|
|
1624
1629
|
if (!e.iconUrl) return Ue;
|
|
1625
1630
|
const a = c(!0), t = c("");
|
|
1626
1631
|
let s = !0;
|
|
1627
|
-
return (n = e.icons) != null && n.length && (s = e.icons.every((o) => G.value[o] !== void 0)), (e.icon && !G.value[e.icon] || !s) &&
|
|
1628
|
-
|
|
1632
|
+
return (n = e.icons) != null && n.length && (s = e.icons.every((o) => G.value[o] !== void 0)), (e.icon && !G.value[e.icon] || !s) && fa(e, a).then(() => {
|
|
1633
|
+
ha(e.iconUrl, e.monoColor || !1), a.value = !0;
|
|
1629
1634
|
}), Z({
|
|
1630
1635
|
props: {
|
|
1631
1636
|
icon: {
|
|
@@ -1693,30 +1698,30 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1693
1698
|
style: {
|
|
1694
1699
|
fill: "currentColor",
|
|
1695
1700
|
cursor: this.$props.clickable ? "pointer" : "default",
|
|
1696
|
-
transform:
|
|
1701
|
+
transform: va(this.angle, this.flip)
|
|
1697
1702
|
}
|
|
1698
1703
|
}) : H("div", { class: "w-[14px] h-[14px]" });
|
|
1699
1704
|
}
|
|
1700
1705
|
});
|
|
1701
|
-
},
|
|
1706
|
+
}, fa = (e, a) => {
|
|
1702
1707
|
let t = e.iconUrl;
|
|
1703
1708
|
if (!t)
|
|
1704
1709
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1705
|
-
if (
|
|
1710
|
+
if (_e.has(t))
|
|
1706
1711
|
return Promise.resolve();
|
|
1707
1712
|
const s = dt(t);
|
|
1708
1713
|
if (s)
|
|
1709
1714
|
return new Promise(async (o) => (pt(s.scriptContent), o()));
|
|
1710
1715
|
a.value = !1;
|
|
1711
1716
|
const n = new Promise(async (o) => {
|
|
1712
|
-
await
|
|
1717
|
+
await pa(t, e.monoColor || !1), o(), _e.delete(t);
|
|
1713
1718
|
});
|
|
1714
|
-
return
|
|
1715
|
-
},
|
|
1719
|
+
return _e.set(t, n), n;
|
|
1720
|
+
}, pa = async (e, a) => {
|
|
1716
1721
|
try {
|
|
1717
1722
|
const t = await fetch(e);
|
|
1718
1723
|
if (!t.ok) {
|
|
1719
|
-
|
|
1724
|
+
x.error("网络异常,无法加载图标库!");
|
|
1720
1725
|
return;
|
|
1721
1726
|
}
|
|
1722
1727
|
let s = await t.text();
|
|
@@ -1725,7 +1730,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1725
1730
|
const o = s.match(n);
|
|
1726
1731
|
if (o && o.length > 1) {
|
|
1727
1732
|
let r = o[1];
|
|
1728
|
-
|
|
1733
|
+
da(e, r, a, s);
|
|
1729
1734
|
}
|
|
1730
1735
|
pt(s);
|
|
1731
1736
|
return;
|
|
@@ -1735,13 +1740,13 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1735
1740
|
}, pt = (e) => {
|
|
1736
1741
|
const a = document.createElement("script");
|
|
1737
1742
|
a.textContent = e, document.head.appendChild(a);
|
|
1738
|
-
},
|
|
1743
|
+
}, da = (e, a, t, s) => {
|
|
1739
1744
|
let n = `icon_cache:${e}`;
|
|
1740
1745
|
const o = {
|
|
1741
1746
|
windowKey: a,
|
|
1742
1747
|
monoColor: t,
|
|
1743
1748
|
scriptContent: s,
|
|
1744
|
-
expireTime: Date.now() +
|
|
1749
|
+
expireTime: Date.now() + ca
|
|
1745
1750
|
// 缓存时间:7天
|
|
1746
1751
|
};
|
|
1747
1752
|
localStorage.setItem(n, JSON.stringify(o));
|
|
@@ -1756,7 +1761,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1756
1761
|
return console.error("解析缓存失败:", n), null;
|
|
1757
1762
|
}
|
|
1758
1763
|
return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
|
|
1759
|
-
},
|
|
1764
|
+
}, ss = () => {
|
|
1760
1765
|
const e = Date.now();
|
|
1761
1766
|
for (const a in localStorage)
|
|
1762
1767
|
if (a.startsWith("icon_cache:")) {
|
|
@@ -1787,12 +1792,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1787
1792
|
fill: "currentColor"
|
|
1788
1793
|
})
|
|
1789
1794
|
]
|
|
1790
|
-
),
|
|
1795
|
+
), ha = (e, a) => {
|
|
1791
1796
|
const t = dt(e);
|
|
1792
1797
|
Object.keys(window).forEach((s) => {
|
|
1793
|
-
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !Xe.has(s) && (Xe.add(s),
|
|
1798
|
+
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !Xe.has(s) && (Xe.add(s), ma(s, a));
|
|
1794
1799
|
});
|
|
1795
|
-
},
|
|
1800
|
+
}, ma = (e, a) => {
|
|
1796
1801
|
const t = window[e], o = new DOMParser().parseFromString(t, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
|
|
1797
1802
|
for (const l of o) {
|
|
1798
1803
|
const u = l.id, i = Array.from(r).find((f) => f.id === u);
|
|
@@ -1800,30 +1805,30 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1800
1805
|
f.hasAttribute("fill") && f.removeAttribute("fill");
|
|
1801
1806
|
})), G.value[u] || (G.value[u] = H("svg", { fill: "currentColor" }, [H("use", { "xlink:href": `#${u}` })]));
|
|
1802
1807
|
}
|
|
1803
|
-
},
|
|
1808
|
+
}, va = (e, a) => {
|
|
1804
1809
|
let t = "";
|
|
1805
1810
|
return e && (t += `rotate(${e}deg)`), a && (t += " scaleX(-1)"), t;
|
|
1806
|
-
},
|
|
1811
|
+
}, ns = (e, a, t, s) => {
|
|
1807
1812
|
ht(e, [], t, s).forEach((o) => a.push(o));
|
|
1808
1813
|
}, ht = (e, a, t, s) => {
|
|
1809
1814
|
var r, l, u, i, f;
|
|
1810
|
-
const n = [], o =
|
|
1815
|
+
const n = [], o = N();
|
|
1811
1816
|
for (const p of e) {
|
|
1812
1817
|
if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (r = p.meta) == null ? void 0 : r.roles) != null && l.length && !o.hasRole(p.meta.roles) && (u = p.meta) != null && u.permission && !o.hasPermit(p.meta.permission, ":page"))
|
|
1813
1818
|
continue;
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
key:
|
|
1819
|
+
const h = p.path.split("/");
|
|
1820
|
+
h.unshift(...a);
|
|
1821
|
+
const m = ht(p.children || [], h, t, s), A = {
|
|
1822
|
+
key: h.join("/"),
|
|
1818
1823
|
label: ((i = p.name) == null ? void 0 : i.toString()) ?? "",
|
|
1819
1824
|
title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
|
|
1820
1825
|
icon: p.icon ? H(t, { ...s, icon: p.icon }) : void 0,
|
|
1821
|
-
children:
|
|
1826
|
+
children: m.length > 0 ? m : void 0
|
|
1822
1827
|
};
|
|
1823
|
-
(
|
|
1828
|
+
(m.length > 0 || !p.children) && n.push(A);
|
|
1824
1829
|
}
|
|
1825
1830
|
return n;
|
|
1826
|
-
}, Ze = yt([]),
|
|
1831
|
+
}, Ze = yt([]), rs = () => {
|
|
1827
1832
|
Ze.length = 0;
|
|
1828
1833
|
const e = K();
|
|
1829
1834
|
let t = Ke().TabActive;
|
|
@@ -1836,7 +1841,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1836
1841
|
};
|
|
1837
1842
|
Ze.push(r);
|
|
1838
1843
|
});
|
|
1839
|
-
},
|
|
1844
|
+
}, ga = {
|
|
1840
1845
|
host: {
|
|
1841
1846
|
api: "SITEHOST_API",
|
|
1842
1847
|
url: "/openapi/RCSiteHostSrv/get",
|
|
@@ -1848,7 +1853,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1848
1853
|
// 不显示错误
|
|
1849
1854
|
hideErrorToast: !0
|
|
1850
1855
|
}
|
|
1851
|
-
},
|
|
1856
|
+
}, os = ce("hostInfo", {
|
|
1852
1857
|
state: () => ({
|
|
1853
1858
|
hostInfo: {
|
|
1854
1859
|
Host: "",
|
|
@@ -1881,12 +1886,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1881
1886
|
return (!t || t === "/") && (t = window.location.origin), t.endsWith("/") && (t = t.slice(0, -1)), new Promise((s) => {
|
|
1882
1887
|
Fe.SITEHOST_API || (Fe.SITEHOST_API = t);
|
|
1883
1888
|
const n = a || window.location.origin;
|
|
1884
|
-
j(
|
|
1889
|
+
j(ga.host, {
|
|
1885
1890
|
Query: {
|
|
1886
1891
|
Host: n
|
|
1887
1892
|
}
|
|
1888
1893
|
}).then((o) => {
|
|
1889
|
-
if ((o == null ? void 0 : o.status) ===
|
|
1894
|
+
if ((o == null ? void 0 : o.status) === k.SUCCESS && o.data) {
|
|
1890
1895
|
const r = o.data;
|
|
1891
1896
|
this._setHostInfo(r);
|
|
1892
1897
|
} else
|
|
@@ -1924,7 +1929,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1924
1929
|
if (this.hostInfo.SERVER_HOST)
|
|
1925
1930
|
for (const a in this.hostInfo.SERVER_HOST) {
|
|
1926
1931
|
let t = this.hostInfo.SERVER_HOST[a];
|
|
1927
|
-
t = t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") ? t : window.location.origin + t, t.endsWith("/") && (t = t.slice(0, -1)), this.hostInfo.SERVER_HOST[a] = t,
|
|
1932
|
+
t = t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") ? t : window.location.origin + t, t.endsWith("/") && (t = t.slice(0, -1)), this.hostInfo.SERVER_HOST[a] = t, Ft[a] = t;
|
|
1928
1933
|
}
|
|
1929
1934
|
},
|
|
1930
1935
|
getHostInfo() {
|
|
@@ -1938,7 +1943,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1938
1943
|
// storage: localStorage,
|
|
1939
1944
|
// pick: ['hostInfo'],
|
|
1940
1945
|
// },
|
|
1941
|
-
}),
|
|
1946
|
+
}), is = ce("settingInfo", {
|
|
1942
1947
|
state: () => ({
|
|
1943
1948
|
fullscreen: !1,
|
|
1944
1949
|
menuCollapse: !1,
|
|
@@ -1980,7 +1985,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1980
1985
|
}
|
|
1981
1986
|
},
|
|
1982
1987
|
persist: !1
|
|
1983
|
-
}),
|
|
1988
|
+
}), ls = /* @__PURE__ */ Z({
|
|
1984
1989
|
__name: "index",
|
|
1985
1990
|
props: {
|
|
1986
1991
|
...pe,
|
|
@@ -1990,6 +1995,10 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1990
1995
|
data: {
|
|
1991
1996
|
type: Array,
|
|
1992
1997
|
required: !0
|
|
1998
|
+
},
|
|
1999
|
+
size: {
|
|
2000
|
+
type: String,
|
|
2001
|
+
default: "default"
|
|
1993
2002
|
}
|
|
1994
2003
|
},
|
|
1995
2004
|
emits: ["change"],
|
|
@@ -1999,40 +2008,48 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1999
2008
|
const r = c([]);
|
|
2000
2009
|
o && g(
|
|
2001
2010
|
() => o.options.value,
|
|
2002
|
-
(
|
|
2003
|
-
r.value =
|
|
2011
|
+
(h) => {
|
|
2012
|
+
r.value = h || [];
|
|
2004
2013
|
},
|
|
2005
2014
|
{ immediate: !0, deep: !0 }
|
|
2006
2015
|
);
|
|
2007
|
-
const l = a, { editorCtrl: u, errInfo: i } = X(), f = (
|
|
2008
|
-
|
|
2016
|
+
const l = a, { editorCtrl: u, errInfo: i } = X(), f = St(() => {
|
|
2017
|
+
switch (t.size) {
|
|
2018
|
+
case "small":
|
|
2019
|
+
return "w-[46px]";
|
|
2020
|
+
default:
|
|
2021
|
+
return "w-[58px]";
|
|
2022
|
+
}
|
|
2023
|
+
}), p = (h) => {
|
|
2024
|
+
i != null && i.value.errClass && u && de(u), l("change", h);
|
|
2009
2025
|
};
|
|
2010
2026
|
return Ie(() => {
|
|
2011
2027
|
if (!t.data || t.data.length != 2) {
|
|
2012
|
-
console.error("Switch组件: ", t.data),
|
|
2028
|
+
console.error("Switch组件: ", t.data), x.error("Switch组件必须有且只有两个选项");
|
|
2013
2029
|
return;
|
|
2014
2030
|
}
|
|
2015
2031
|
o && ee(o.autoload, o, t);
|
|
2016
2032
|
}), le(() => {
|
|
2017
2033
|
o && he(o, t);
|
|
2018
|
-
}), (
|
|
2019
|
-
var
|
|
2020
|
-
return r.value.length === 2 ? (
|
|
2034
|
+
}), (h, m) => {
|
|
2035
|
+
var A;
|
|
2036
|
+
return r.value.length === 2 ? (O(), Ae(b(It), ue({
|
|
2021
2037
|
key: 0,
|
|
2038
|
+
size: e.size,
|
|
2022
2039
|
class: [
|
|
2023
|
-
((
|
|
2040
|
+
((A = b(i)) == null ? void 0 : A.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
|
|
2024
2041
|
"bg-blue-300",
|
|
2025
|
-
|
|
2042
|
+
f.value
|
|
2026
2043
|
],
|
|
2027
2044
|
checkedChildren: r.value[0].label,
|
|
2028
2045
|
checkedValue: r.value[0].value,
|
|
2029
2046
|
unCheckedChildren: r.value[1].label,
|
|
2030
2047
|
unCheckedValue: r.value[1].value,
|
|
2031
|
-
onChange:
|
|
2032
|
-
},
|
|
2048
|
+
onChange: p
|
|
2049
|
+
}, h.$attrs), null, 16, ["size", "class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : W("", !0);
|
|
2033
2050
|
};
|
|
2034
2051
|
}
|
|
2035
|
-
}),
|
|
2052
|
+
}), us = /* @__PURE__ */ Z({
|
|
2036
2053
|
inheritAttrs: !1,
|
|
2037
2054
|
__name: "index",
|
|
2038
2055
|
props: {
|
|
@@ -2074,48 +2091,48 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2074
2091
|
);
|
|
2075
2092
|
const { editorCtrl: u, errInfo: i, labelText: f } = n, p = a;
|
|
2076
2093
|
n.inputEmit = p;
|
|
2077
|
-
const
|
|
2094
|
+
const h = c((r == null ? void 0 : r.options.value) || []);
|
|
2078
2095
|
r && g(
|
|
2079
2096
|
() => r.options.value,
|
|
2080
2097
|
(y) => {
|
|
2081
|
-
|
|
2098
|
+
h.value = y || [];
|
|
2082
2099
|
},
|
|
2083
2100
|
{ immediate: !0, deep: !0 }
|
|
2084
2101
|
);
|
|
2085
|
-
const
|
|
2086
|
-
if (
|
|
2087
|
-
let
|
|
2102
|
+
const m = (y) => {
|
|
2103
|
+
if (h.value = [], y === "") return;
|
|
2104
|
+
let d = {
|
|
2088
2105
|
Query: {
|
|
2089
2106
|
SearchField: "%" + y.trim() + "%"
|
|
2090
2107
|
}
|
|
2091
2108
|
};
|
|
2092
|
-
r.params = fe(r.params,
|
|
2093
|
-
},
|
|
2094
|
-
const
|
|
2109
|
+
r.params = fe(r.params, d), r && ee(!0, r, t);
|
|
2110
|
+
}, A = (y) => {
|
|
2111
|
+
const w = Le(r, t, y);
|
|
2095
2112
|
p("update:value", y), p("select", y);
|
|
2096
|
-
const
|
|
2097
|
-
p("update:labels",
|
|
2113
|
+
const d = ke(w);
|
|
2114
|
+
p("update:labels", d), i != null && i.value.errClass && u && de(u);
|
|
2098
2115
|
};
|
|
2099
2116
|
return xe(() => {
|
|
2100
2117
|
r && r.autoload && (r.reload.value = !0);
|
|
2101
2118
|
}), le(() => {
|
|
2102
2119
|
r && he(r, t);
|
|
2103
|
-
}), (y,
|
|
2104
|
-
var
|
|
2105
|
-
return
|
|
2106
|
-
C(b(
|
|
2120
|
+
}), (y, w) => {
|
|
2121
|
+
var d;
|
|
2122
|
+
return O(), $("div", null, [
|
|
2123
|
+
C(b(At), ue({
|
|
2107
2124
|
value: l.value,
|
|
2108
|
-
"onUpdate:value":
|
|
2109
|
-
class: ["w-full", (
|
|
2110
|
-
options:
|
|
2111
|
-
onSearch:
|
|
2112
|
-
onSelect:
|
|
2125
|
+
"onUpdate:value": w[0] || (w[0] = (I) => l.value = I),
|
|
2126
|
+
class: ["w-full", (d = b(i)) == null ? void 0 : d.errClass],
|
|
2127
|
+
options: h.value,
|
|
2128
|
+
onSearch: m,
|
|
2129
|
+
onSelect: A
|
|
2113
2130
|
}, b(s), { "allow-clear": !1 }), {
|
|
2114
2131
|
option: Q(({ label: I }) => [
|
|
2115
2132
|
we(Y(I), 1)
|
|
2116
2133
|
]),
|
|
2117
2134
|
default: Q(() => [
|
|
2118
|
-
C(b(
|
|
2135
|
+
C(b(Et), {
|
|
2119
2136
|
"allow-clear": "",
|
|
2120
2137
|
placeholder: "请输入并选择" + b(f)
|
|
2121
2138
|
}, null, 8, ["placeholder"])
|
|
@@ -2125,10 +2142,10 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2125
2142
|
]);
|
|
2126
2143
|
};
|
|
2127
2144
|
}
|
|
2128
|
-
}),
|
|
2145
|
+
}), ya = { class: "min-h-[32px] pt-[5px]" }, Sa = {
|
|
2129
2146
|
key: 1,
|
|
2130
2147
|
class: "text-center text-gray-500"
|
|
2131
|
-
},
|
|
2148
|
+
}, cs = /* @__PURE__ */ Z({
|
|
2132
2149
|
inheritAttrs: !1,
|
|
2133
2150
|
__name: "index",
|
|
2134
2151
|
props: {
|
|
@@ -2149,14 +2166,14 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2149
2166
|
},
|
|
2150
2167
|
emits: ["change", "update:labels"],
|
|
2151
2168
|
setup(e, { emit: a }) {
|
|
2152
|
-
var
|
|
2169
|
+
var h, m, A;
|
|
2153
2170
|
const t = e, s = Ee(), n = X(), o = me(t.url, t), r = t.optionCtrl ?? o.optionCtrl;
|
|
2154
2171
|
r.inputFactory = J(n);
|
|
2155
2172
|
const l = c({
|
|
2156
2173
|
...r == null ? void 0 : r.url,
|
|
2157
|
-
url: ((
|
|
2158
|
-
fieldMap: (r == null ? void 0 : r.fieldMap) || ((
|
|
2159
|
-
params: (r == null ? void 0 : r.params) || ((
|
|
2174
|
+
url: ((h = r == null ? void 0 : r.url) == null ? void 0 : h.url) || "",
|
|
2175
|
+
fieldMap: (r == null ? void 0 : r.fieldMap) || ((m = r == null ? void 0 : r.url) == null ? void 0 : m.fieldMap),
|
|
2176
|
+
params: (r == null ? void 0 : r.params) || ((A = r == null ? void 0 : r.url) == null ? void 0 : A.params),
|
|
2160
2177
|
loadingText: !1
|
|
2161
2178
|
}), { errInfo: u } = n, i = a;
|
|
2162
2179
|
n.inputEmit = i;
|
|
@@ -2169,7 +2186,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2169
2186
|
{ immediate: !0, deep: !0 }
|
|
2170
2187
|
);
|
|
2171
2188
|
const p = (y) => {
|
|
2172
|
-
const
|
|
2189
|
+
const d = Le(r, t, y), I = ke(d);
|
|
2173
2190
|
i("update:labels", I);
|
|
2174
2191
|
};
|
|
2175
2192
|
return xe(() => {
|
|
@@ -2183,18 +2200,18 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2183
2200
|
}), r && ee(r.autoload, r, t);
|
|
2184
2201
|
}), le(() => {
|
|
2185
2202
|
r && he(r, t);
|
|
2186
|
-
}), (y,
|
|
2187
|
-
C(b(
|
|
2203
|
+
}), (y, w) => (O(), $("div", ya, [
|
|
2204
|
+
C(b(xt), ue({
|
|
2188
2205
|
onChange: p,
|
|
2189
2206
|
class: "w-full mb-[-3px]"
|
|
2190
2207
|
}, b(s)), {
|
|
2191
2208
|
default: Q(() => [
|
|
2192
|
-
f.value.length > 0 ? (
|
|
2209
|
+
f.value.length > 0 ? (O(!0), $(oe, { key: 0 }, He(f.value, (d) => {
|
|
2193
2210
|
var I;
|
|
2194
|
-
return
|
|
2195
|
-
key:
|
|
2196
|
-
value:
|
|
2197
|
-
disabled:
|
|
2211
|
+
return O(), Ae(b(wt), {
|
|
2212
|
+
key: d.value,
|
|
2213
|
+
value: d.value,
|
|
2214
|
+
disabled: d.disabled || d.value && e.disabledItems && e.disabledItems.indexOf(d.value.toString()) > -1,
|
|
2198
2215
|
class: tt([
|
|
2199
2216
|
((I = b(u)) == null ? void 0 : I.errClass) === "error" ? "error !text-red-400" : "",
|
|
2200
2217
|
"text-nowrap",
|
|
@@ -2203,20 +2220,20 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2203
2220
|
])
|
|
2204
2221
|
}, {
|
|
2205
2222
|
default: Q(() => [
|
|
2206
|
-
we(Y(
|
|
2223
|
+
we(Y(d.label), 1)
|
|
2207
2224
|
]),
|
|
2208
2225
|
_: 2
|
|
2209
2226
|
}, 1032, ["value", "disabled", "class"]);
|
|
2210
|
-
}), 128)) : e.nodata ? (
|
|
2227
|
+
}), 128)) : e.nodata ? (O(), $("div", Sa, Y(e.nodata), 1)) : W("", !0)
|
|
2211
2228
|
]),
|
|
2212
2229
|
_: 1
|
|
2213
2230
|
}, 16)
|
|
2214
2231
|
]));
|
|
2215
2232
|
}
|
|
2216
|
-
}),
|
|
2233
|
+
}), ba = { class: "min-h-[32px] pt-1" }, Ia = {
|
|
2217
2234
|
key: 1,
|
|
2218
2235
|
class: "text-center text-gray-500"
|
|
2219
|
-
},
|
|
2236
|
+
}, fs = /* @__PURE__ */ Z({
|
|
2220
2237
|
inheritAttrs: !1,
|
|
2221
2238
|
__name: "index",
|
|
2222
2239
|
props: {
|
|
@@ -2238,41 +2255,41 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2238
2255
|
},
|
|
2239
2256
|
emits: ["change", "update:value", "update:labels"],
|
|
2240
2257
|
setup(e, { emit: a }) {
|
|
2241
|
-
var
|
|
2258
|
+
var A, y, w;
|
|
2242
2259
|
const t = e, s = Ee(), n = X(), o = me(t.url, t), r = t.optionCtrl ?? o.optionCtrl;
|
|
2243
2260
|
r.inputFactory = J(n);
|
|
2244
2261
|
const l = c({
|
|
2245
2262
|
...r == null ? void 0 : r.url,
|
|
2246
|
-
url: ((
|
|
2263
|
+
url: ((A = r == null ? void 0 : r.url) == null ? void 0 : A.url) || "",
|
|
2247
2264
|
fieldMap: (r == null ? void 0 : r.fieldMap) || ((y = r == null ? void 0 : r.url) == null ? void 0 : y.fieldMap),
|
|
2248
|
-
params: (r == null ? void 0 : r.params) || ((
|
|
2265
|
+
params: (r == null ? void 0 : r.params) || ((w = r == null ? void 0 : r.url) == null ? void 0 : w.params),
|
|
2249
2266
|
loadingText: !1
|
|
2250
2267
|
}), u = c(t.value), { errInfo: i } = n, f = c((r == null ? void 0 : r.options.value) || []), p = a;
|
|
2251
2268
|
n.inputEmit = p, r && g(
|
|
2252
2269
|
() => r.options.value,
|
|
2253
|
-
(
|
|
2254
|
-
f.value =
|
|
2270
|
+
(d) => {
|
|
2271
|
+
f.value = d || [];
|
|
2255
2272
|
},
|
|
2256
2273
|
{ immediate: !0, deep: !0 }
|
|
2257
2274
|
), g(
|
|
2258
2275
|
() => t.value,
|
|
2259
|
-
(
|
|
2260
|
-
u.value =
|
|
2276
|
+
(d) => {
|
|
2277
|
+
u.value = d;
|
|
2261
2278
|
}
|
|
2262
2279
|
), g(
|
|
2263
2280
|
() => u.value,
|
|
2264
|
-
(
|
|
2265
|
-
p("update:value",
|
|
2281
|
+
(d) => {
|
|
2282
|
+
p("update:value", d);
|
|
2266
2283
|
}
|
|
2267
2284
|
);
|
|
2268
|
-
const
|
|
2269
|
-
if (typeof
|
|
2270
|
-
const
|
|
2271
|
-
return
|
|
2285
|
+
const h = (d, I) => {
|
|
2286
|
+
if (typeof d == "object" && typeof I == "object") {
|
|
2287
|
+
const T = JSON.stringify(d) === JSON.stringify(I);
|
|
2288
|
+
return T && (u.value = d), T;
|
|
2272
2289
|
}
|
|
2273
|
-
return
|
|
2274
|
-
},
|
|
2275
|
-
const I =
|
|
2290
|
+
return d === I;
|
|
2291
|
+
}, m = (d) => {
|
|
2292
|
+
const I = d.target.value, T = Le(r, t, I), q = ke(T);
|
|
2276
2293
|
p("update:labels", q);
|
|
2277
2294
|
};
|
|
2278
2295
|
return xe(() => {
|
|
@@ -2285,24 +2302,24 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2285
2302
|
}), r && ee(r.autoload, r, t);
|
|
2286
2303
|
}), le(() => {
|
|
2287
2304
|
r && he(r, t);
|
|
2288
|
-
}), (
|
|
2289
|
-
C(b(
|
|
2305
|
+
}), (d, I) => (O(), $("div", ba, [
|
|
2306
|
+
C(b(Rt), ue({
|
|
2290
2307
|
value: u.value,
|
|
2291
|
-
"onUpdate:value": I[0] || (I[0] = (
|
|
2308
|
+
"onUpdate:value": I[0] || (I[0] = (T) => u.value = T),
|
|
2292
2309
|
autocheck: !1,
|
|
2293
|
-
onChange:
|
|
2310
|
+
onChange: m,
|
|
2294
2311
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
2295
2312
|
}, b(s)), {
|
|
2296
2313
|
default: Q(() => [
|
|
2297
|
-
f.value.length > 0 ? (
|
|
2314
|
+
f.value.length > 0 ? (O(!0), $(oe, { key: 0 }, He(f.value, (T) => {
|
|
2298
2315
|
var q;
|
|
2299
|
-
return
|
|
2300
|
-
key:
|
|
2316
|
+
return O(), $(oe, {
|
|
2317
|
+
key: T.value
|
|
2301
2318
|
}, [
|
|
2302
|
-
|
|
2319
|
+
T.visible !== !1 ? (O(), Ae(b(Ot), {
|
|
2303
2320
|
key: 0,
|
|
2304
|
-
checked:
|
|
2305
|
-
value:
|
|
2321
|
+
checked: h(T.value, t.value),
|
|
2322
|
+
value: T.value,
|
|
2306
2323
|
class: tt([
|
|
2307
2324
|
((q = b(i)) == null ? void 0 : q.errClass) === "error" ? "error !text-red-400" : "",
|
|
2308
2325
|
"text-nowrap",
|
|
@@ -2311,21 +2328,21 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2311
2328
|
])
|
|
2312
2329
|
}, {
|
|
2313
2330
|
default: Q(() => [
|
|
2314
|
-
we(Y(
|
|
2331
|
+
we(Y(T.label), 1)
|
|
2315
2332
|
]),
|
|
2316
2333
|
_: 2
|
|
2317
|
-
}, 1032, ["checked", "value", "class"])) :
|
|
2334
|
+
}, 1032, ["checked", "value", "class"])) : W("", !0)
|
|
2318
2335
|
], 64);
|
|
2319
|
-
}), 128)) : e.nodata ? (
|
|
2336
|
+
}), 128)) : e.nodata ? (O(), $("div", Ia, Y(e.nodata), 1)) : W("", !0)
|
|
2320
2337
|
]),
|
|
2321
2338
|
_: 1
|
|
2322
2339
|
}, 16, ["value"])
|
|
2323
2340
|
]));
|
|
2324
2341
|
}
|
|
2325
|
-
}),
|
|
2342
|
+
}), Aa = {
|
|
2326
2343
|
key: 0,
|
|
2327
2344
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
2328
|
-
},
|
|
2345
|
+
}, ps = /* @__PURE__ */ Z({
|
|
2329
2346
|
inheritAttrs: !1,
|
|
2330
2347
|
__name: "index",
|
|
2331
2348
|
props: {
|
|
@@ -2360,65 +2377,65 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2360
2377
|
},
|
|
2361
2378
|
emits: ["change", "update:value", "update:label", "update:labels"],
|
|
2362
2379
|
setup(e, { emit: a }) {
|
|
2363
|
-
var I,
|
|
2380
|
+
var I, T, q;
|
|
2364
2381
|
const t = e, s = t.value === void 0 ? !0 : t.undefValue, n = X(), { editorCtrl: o, errInfo: r, labelText: l } = n, u = me(t.url, t), i = t.optionCtrl ?? u.optionCtrl;
|
|
2365
2382
|
i.inputFactory = J(n);
|
|
2366
2383
|
const f = Ee(), p = c({
|
|
2367
2384
|
...i == null ? void 0 : i.url,
|
|
2368
2385
|
url: ((I = i == null ? void 0 : i.url) == null ? void 0 : I.url) || "",
|
|
2369
|
-
fieldMap: (i == null ? void 0 : i.fieldMap) || ((
|
|
2386
|
+
fieldMap: (i == null ? void 0 : i.fieldMap) || ((T = i == null ? void 0 : i.url) == null ? void 0 : T.fieldMap),
|
|
2370
2387
|
params: (i == null ? void 0 : i.params) || ((q = i == null ? void 0 : i.url) == null ? void 0 : q.params),
|
|
2371
2388
|
loadingText: !1
|
|
2372
|
-
}),
|
|
2373
|
-
n.inputEmit =
|
|
2374
|
-
const y = (
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
},
|
|
2378
|
-
if (
|
|
2379
|
-
for (let
|
|
2380
|
-
const D =
|
|
2389
|
+
}), h = c(f.placeholder), m = c(i == null ? void 0 : i.selected.value), A = a;
|
|
2390
|
+
n.inputEmit = A;
|
|
2391
|
+
const y = (v) => {
|
|
2392
|
+
const L = Le(i, t, v), D = ke(L);
|
|
2393
|
+
m.value = v, A("update:labels", D), A("update:label", D.join(";")), A("change", v, L), r != null && r.value.errClass && o && de(o);
|
|
2394
|
+
}, w = c((i == null ? void 0 : i.options.value) || []), d = (v) => {
|
|
2395
|
+
if (v.length > 0 && F(t.value) && t.selectFirst)
|
|
2396
|
+
for (let L = 0; L < v.length; L++) {
|
|
2397
|
+
const D = v[L];
|
|
2381
2398
|
if (D.disabled === void 0 || D.disabled === !1) {
|
|
2382
|
-
|
|
2399
|
+
m.value = D.value;
|
|
2383
2400
|
break;
|
|
2384
2401
|
}
|
|
2385
2402
|
}
|
|
2386
|
-
else
|
|
2387
|
-
|
|
2403
|
+
else v.length > 0 && (m.value = t.value === null ? void 0 : t.value);
|
|
2404
|
+
v.length > 0 && m.value !== void 0 && y(m.value);
|
|
2388
2405
|
};
|
|
2389
2406
|
return i && (g(
|
|
2390
2407
|
() => i.options.value,
|
|
2391
|
-
(
|
|
2392
|
-
|
|
2408
|
+
(v) => {
|
|
2409
|
+
w.value = v || [];
|
|
2393
2410
|
},
|
|
2394
2411
|
{ immediate: !0, deep: !0 }
|
|
2395
2412
|
), g(
|
|
2396
2413
|
() => i.selected.value,
|
|
2397
|
-
(
|
|
2398
|
-
|
|
2414
|
+
(v) => {
|
|
2415
|
+
m.value = v;
|
|
2399
2416
|
}
|
|
2400
2417
|
)), g(
|
|
2401
|
-
() =>
|
|
2402
|
-
(
|
|
2403
|
-
|
|
2418
|
+
() => w.value,
|
|
2419
|
+
(v) => {
|
|
2420
|
+
d(v);
|
|
2404
2421
|
}
|
|
2405
2422
|
), g(
|
|
2406
2423
|
() => p.value.loading,
|
|
2407
|
-
(
|
|
2408
|
-
|
|
2424
|
+
(v) => {
|
|
2425
|
+
v ? h.value = "" : h.value || (h.value = "请选择" + l.value);
|
|
2409
2426
|
},
|
|
2410
2427
|
{ immediate: !0 }
|
|
2411
2428
|
), g(
|
|
2412
2429
|
() => t.value,
|
|
2413
|
-
(
|
|
2414
|
-
|
|
2430
|
+
(v) => {
|
|
2431
|
+
m.value = v;
|
|
2415
2432
|
},
|
|
2416
2433
|
{ immediate: !0 }
|
|
2417
2434
|
), g(
|
|
2418
|
-
() =>
|
|
2419
|
-
(
|
|
2420
|
-
const
|
|
2421
|
-
i && (i.selected.value =
|
|
2435
|
+
() => m.value,
|
|
2436
|
+
(v) => {
|
|
2437
|
+
const L = v === void 0 ? s ? void 0 : null : v;
|
|
2438
|
+
i && (i.selected.value = L), A("update:value", L);
|
|
2422
2439
|
}
|
|
2423
2440
|
), xe(() => {
|
|
2424
2441
|
i && i.autoload && (i.reload.value = !0);
|
|
@@ -2428,43 +2445,43 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2428
2445
|
value: "Id",
|
|
2429
2446
|
key: "Id"
|
|
2430
2447
|
}), t.dataKey) {
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2448
|
+
const v = JSON.parse(JSON.stringify(_.getOptions(t.dataKey)));
|
|
2449
|
+
w.value = v, d(v);
|
|
2433
2450
|
} else if (i) {
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2451
|
+
const v = i.options.value || [];
|
|
2452
|
+
v.length > 0 ? (w.value = v, d(v)) : ee(i.autoload, i, t);
|
|
2436
2453
|
}
|
|
2437
2454
|
}), le(() => {
|
|
2438
2455
|
i && he(i, t);
|
|
2439
|
-
}), (
|
|
2440
|
-
var D,
|
|
2441
|
-
return
|
|
2442
|
-
(
|
|
2456
|
+
}), (v, L) => {
|
|
2457
|
+
var D, ze, Be;
|
|
2458
|
+
return O(), $("div", null, [
|
|
2459
|
+
(ze = (D = b(i)) == null ? void 0 : D.url) != null && ze.loading ? (O(), $("div", Aa, [
|
|
2443
2460
|
C(b(Ue), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2444
|
-
|
|
2445
|
-
])) :
|
|
2446
|
-
C(b(
|
|
2447
|
-
class: [(
|
|
2448
|
-
value:
|
|
2449
|
-
"onUpdate:value":
|
|
2461
|
+
L[1] || (L[1] = bt("span", null, "数据加载中...", -1))
|
|
2462
|
+
])) : W("", !0),
|
|
2463
|
+
C(b(Tt), ue({
|
|
2464
|
+
class: [(Be = b(r)) == null ? void 0 : Be.errClass, "w-full"],
|
|
2465
|
+
value: m.value,
|
|
2466
|
+
"onUpdate:value": L[0] || (L[0] = (z) => m.value = z),
|
|
2450
2467
|
"allow-clear": !0,
|
|
2451
2468
|
onChange: y,
|
|
2452
|
-
placeholder:
|
|
2469
|
+
placeholder: h.value,
|
|
2453
2470
|
"label-in-value": !1
|
|
2454
2471
|
}, b(f)), {
|
|
2455
2472
|
default: Q(() => [
|
|
2456
|
-
(
|
|
2457
|
-
key:
|
|
2473
|
+
(O(!0), $(oe, null, He(w.value, (z) => (O(), $(oe, {
|
|
2474
|
+
key: z.value
|
|
2458
2475
|
}, [
|
|
2459
|
-
|
|
2476
|
+
z.visible !== !1 ? (O(), Ae(b(Pt), {
|
|
2460
2477
|
key: 0,
|
|
2461
|
-
value:
|
|
2478
|
+
value: z.value
|
|
2462
2479
|
}, {
|
|
2463
2480
|
default: Q(() => [
|
|
2464
|
-
we(Y(
|
|
2481
|
+
we(Y(z.label), 1)
|
|
2465
2482
|
]),
|
|
2466
2483
|
_: 2
|
|
2467
|
-
}, 1032, ["value"])) :
|
|
2484
|
+
}, 1032, ["value"])) : W("", !0)
|
|
2468
2485
|
], 64))), 128))
|
|
2469
2486
|
]),
|
|
2470
2487
|
_: 1
|
|
@@ -2472,13 +2489,13 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2472
2489
|
]);
|
|
2473
2490
|
};
|
|
2474
2491
|
}
|
|
2475
|
-
}),
|
|
2492
|
+
}), Ea = c(!1), ds = {
|
|
2476
2493
|
label: "模板管理",
|
|
2477
2494
|
key: "uploadTemp",
|
|
2478
2495
|
type: "primary",
|
|
2479
2496
|
icon: "icon-download",
|
|
2480
2497
|
click: () => {
|
|
2481
|
-
|
|
2498
|
+
Ea.value = !0;
|
|
2482
2499
|
}
|
|
2483
2500
|
};
|
|
2484
2501
|
export {
|
|
@@ -2486,74 +2503,74 @@ export {
|
|
|
2486
2503
|
Le as A,
|
|
2487
2504
|
ke as B,
|
|
2488
2505
|
de as C,
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2506
|
+
cs as D,
|
|
2507
|
+
fs as E,
|
|
2508
|
+
ps as F,
|
|
2492
2509
|
Je as G,
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2510
|
+
Dt as H,
|
|
2511
|
+
Xa as I,
|
|
2512
|
+
la as J,
|
|
2513
|
+
ua as K,
|
|
2497
2514
|
Oe as L,
|
|
2498
2515
|
re as M,
|
|
2499
|
-
|
|
2500
|
-
|
|
2516
|
+
Za as N,
|
|
2517
|
+
_ as O,
|
|
2501
2518
|
U as P,
|
|
2502
|
-
|
|
2503
|
-
|
|
2519
|
+
es as Q,
|
|
2520
|
+
ia as R,
|
|
2504
2521
|
ft as S,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2522
|
+
ts as T,
|
|
2523
|
+
ss as U,
|
|
2524
|
+
ma as V,
|
|
2525
|
+
va as W,
|
|
2526
|
+
ns as X,
|
|
2510
2527
|
Ze as Y,
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2528
|
+
rs as Z,
|
|
2529
|
+
ls as _,
|
|
2530
|
+
is as a,
|
|
2531
|
+
qa as a0,
|
|
2515
2532
|
it as a1,
|
|
2516
|
-
|
|
2517
|
-
|
|
2533
|
+
Da as a2,
|
|
2534
|
+
Ha as a3,
|
|
2518
2535
|
qe as a4,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2536
|
+
Ua as a5,
|
|
2537
|
+
za as a6,
|
|
2538
|
+
sa as a7,
|
|
2522
2539
|
ut as a8,
|
|
2523
2540
|
Wa as a9,
|
|
2524
2541
|
_a as aa,
|
|
2525
2542
|
rt as ab,
|
|
2526
|
-
|
|
2543
|
+
Ct as ac,
|
|
2527
2544
|
De as ad,
|
|
2528
|
-
|
|
2545
|
+
B as ae,
|
|
2529
2546
|
ne as af,
|
|
2530
2547
|
ye as ag,
|
|
2531
2548
|
K as ah,
|
|
2532
|
-
|
|
2549
|
+
os as ai,
|
|
2533
2550
|
Ke as aj,
|
|
2534
|
-
|
|
2535
|
-
|
|
2551
|
+
Ea as ak,
|
|
2552
|
+
ds as al,
|
|
2536
2553
|
ie as am,
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2554
|
+
Qa as b,
|
|
2555
|
+
as as c,
|
|
2556
|
+
Ja as d,
|
|
2557
|
+
Va as e,
|
|
2558
|
+
Ca as f,
|
|
2559
|
+
ta as g,
|
|
2560
|
+
Ya as h,
|
|
2544
2561
|
F as i,
|
|
2545
|
-
|
|
2546
|
-
|
|
2562
|
+
ja as j,
|
|
2563
|
+
Ga as k,
|
|
2547
2564
|
lt as l,
|
|
2548
|
-
|
|
2565
|
+
aa as m,
|
|
2549
2566
|
Ba as n,
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2567
|
+
Ka as o,
|
|
2568
|
+
Xt as p,
|
|
2569
|
+
Yt as q,
|
|
2553
2570
|
Re as r,
|
|
2554
|
-
|
|
2571
|
+
us as s,
|
|
2555
2572
|
pe as t,
|
|
2556
|
-
|
|
2573
|
+
N as u,
|
|
2557
2574
|
X as v,
|
|
2558
2575
|
me as w,
|
|
2559
2576
|
ee as x,
|