@skyfox2000/webui 1.4.21 → 1.4.23
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-DiqAUz2h.js} +3 -3
- package/lib/assets/modules/{file-upload-Bu6FkNjZ.js → file-upload-CKMd0H11.js} +1 -1
- package/lib/assets/modules/{index-Ch3meKe4.js → index-BpsqYPCw.js} +1 -1
- package/lib/assets/modules/{index-BYVerdEw.js → index-DvozNhVM.js} +2 -2
- package/lib/assets/modules/{index-BysCt107.js → index-gmbMtZa2.js} +2 -2
- package/lib/assets/modules/{menuTabs-BqLT-YbD.js → menuTabs-CvAiSVNW.js} +2 -2
- package/lib/assets/modules/{toolIcon-Dd58W0UM.js → toolIcon-DWurTPaB.js} +1 -1
- package/lib/assets/modules/{upload-template-Csccple9.js → upload-template-BuaWOXY_.js} +435 -413
- package/lib/assets/modules/uploadList-De6KfTAV.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 +2 -2
- 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/router/index.ts +3 -1
- package/src/typings/upload.d.ts +10 -0
- package/src/utils/menu.ts +1 -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
|
|
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 y, 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,23 +186,27 @@ 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") {
|
|
197
202
|
if (t.length === 0 && !s)
|
|
198
203
|
return !0;
|
|
199
204
|
let l = !1, u = !1;
|
|
200
|
-
|
|
205
|
+
if (t.length > 0 && (l = r.hasRole(t)), s) {
|
|
206
|
+
const i = e.path.replace(/\/:[^/]+/g, "");
|
|
207
|
+
u = r.hasPermit(i, ":page");
|
|
208
|
+
}
|
|
209
|
+
return l || u;
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
212
|
return !1;
|
|
@@ -225,7 +234,7 @@ Re.beforeEach((e, a, t) => {
|
|
|
225
234
|
if (!r)
|
|
226
235
|
t();
|
|
227
236
|
else {
|
|
228
|
-
const u =
|
|
237
|
+
const u = N();
|
|
229
238
|
if (!u.isLogin)
|
|
230
239
|
t({ path: Ye });
|
|
231
240
|
else {
|
|
@@ -236,24 +245,24 @@ Re.beforeEach((e, a, t) => {
|
|
|
236
245
|
};
|
|
237
246
|
return;
|
|
238
247
|
}
|
|
239
|
-
const f =
|
|
248
|
+
const f = Ht(s, u.isLogin);
|
|
240
249
|
t();
|
|
241
250
|
}
|
|
242
251
|
}
|
|
243
252
|
});
|
|
244
|
-
const
|
|
253
|
+
const Vt = (e) => {
|
|
245
254
|
if (ne.value) {
|
|
246
255
|
const { to: a, next: t } = ne.value;
|
|
247
256
|
ne.value = null, a.path === "/" ? t(e) : t(a.path);
|
|
248
257
|
}
|
|
249
|
-
},
|
|
258
|
+
}, Kt = (e) => {
|
|
250
259
|
const a = Ke();
|
|
251
260
|
if (a.TabEnabled) {
|
|
252
|
-
if (
|
|
261
|
+
if (Qt(e.key, a.TabPanes))
|
|
253
262
|
return;
|
|
254
263
|
a.TabPanes.push(e);
|
|
255
264
|
}
|
|
256
|
-
},
|
|
265
|
+
}, Qt = (e, a) => a.find((t) => t.key === e), Ke = ce("pageInfo", {
|
|
257
266
|
state: () => ({
|
|
258
267
|
TabActive: "",
|
|
259
268
|
TabPanes: [],
|
|
@@ -298,12 +307,12 @@ const Ht = (e) => {
|
|
|
298
307
|
// 默认为true
|
|
299
308
|
keepAlive: !(t.meta && !t.meta.keepAlive)
|
|
300
309
|
};
|
|
301
|
-
|
|
310
|
+
Kt(s), this.TabActive = e;
|
|
302
311
|
}
|
|
303
312
|
},
|
|
304
313
|
persist: !1
|
|
305
314
|
});
|
|
306
|
-
class
|
|
315
|
+
class E {
|
|
307
316
|
/**
|
|
308
317
|
* 检查是否在微前端环境中运行
|
|
309
318
|
* @returns boolean
|
|
@@ -398,25 +407,25 @@ class A {
|
|
|
398
407
|
return this.callMainAppMethod("mainAppPush", a);
|
|
399
408
|
}
|
|
400
409
|
}
|
|
401
|
-
|
|
402
|
-
|
|
410
|
+
P(E, "messageId", 0), P(E, "callbacks", /* @__PURE__ */ new Map()), P(E, "pendingRequests", /* @__PURE__ */ new Map());
|
|
411
|
+
E.init();
|
|
403
412
|
const re = {
|
|
404
|
-
getAppInfo:
|
|
405
|
-
getHostInfo:
|
|
406
|
-
getUserInfo:
|
|
407
|
-
getToken:
|
|
408
|
-
userLogout:
|
|
409
|
-
mainAppPush:
|
|
410
|
-
isInMicroApp:
|
|
411
|
-
},
|
|
413
|
+
getAppInfo: E.getAppInfo.bind(E),
|
|
414
|
+
getHostInfo: E.getHostInfo.bind(E),
|
|
415
|
+
getUserInfo: E.getUserInfo.bind(E),
|
|
416
|
+
getToken: E.getToken.bind(E),
|
|
417
|
+
userLogout: E.userLogout.bind(E),
|
|
418
|
+
mainAppPush: E.mainAppPush.bind(E),
|
|
419
|
+
isInMicroApp: E.isInMicroApp.bind(E)
|
|
420
|
+
}, Jt = {
|
|
412
421
|
appList: {
|
|
413
422
|
api: "PLATFORM_API",
|
|
414
423
|
authorize: !0,
|
|
415
424
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
416
425
|
loadingText: !1
|
|
417
426
|
}
|
|
418
|
-
},
|
|
419
|
-
const a =
|
|
427
|
+
}, Ne = /* @__PURE__ */ new Map(), qt = (e) => {
|
|
428
|
+
const a = N(), { roles: t, permission: s } = e.meta || {};
|
|
420
429
|
if (F(t) && F(s))
|
|
421
430
|
return !0;
|
|
422
431
|
if (Se.VITE_PERMISSION_MODE === "role")
|
|
@@ -428,7 +437,7 @@ const re = {
|
|
|
428
437
|
return !1;
|
|
429
438
|
}, st = (e) => e.map((a) => {
|
|
430
439
|
const t = { ...a };
|
|
431
|
-
return
|
|
440
|
+
return qt(t) ? (t.children && (t.children = st(t.children)), t) : null;
|
|
432
441
|
}).filter(Boolean), nt = (e, a = "") => {
|
|
433
442
|
for (const t of e) {
|
|
434
443
|
if (!t.children && !t.redirect) {
|
|
@@ -450,7 +459,7 @@ const re = {
|
|
|
450
459
|
Version: "",
|
|
451
460
|
Host: "",
|
|
452
461
|
Source: Ce.Manual,
|
|
453
|
-
Action:
|
|
462
|
+
Action: We.App,
|
|
454
463
|
Path: "",
|
|
455
464
|
Icon: "",
|
|
456
465
|
Routes: [],
|
|
@@ -475,23 +484,23 @@ const re = {
|
|
|
475
484
|
});
|
|
476
485
|
},
|
|
477
486
|
async getRemoteAppList() {
|
|
478
|
-
return j(
|
|
487
|
+
return j(Jt.appList, {
|
|
479
488
|
Query: {
|
|
480
489
|
AppCode: this.appInfo.AppCode,
|
|
481
490
|
Enabled: 1
|
|
482
491
|
}
|
|
483
492
|
}).then((e) => {
|
|
484
|
-
if ((e == null ? void 0 : e.status) ===
|
|
493
|
+
if ((e == null ? void 0 : e.status) === k.SUCCESS && e.data)
|
|
485
494
|
this.appList.length = 0, this.appList.push(...e.data);
|
|
486
495
|
else if ((e == null ? void 0 : e.errno) == Oe) {
|
|
487
|
-
|
|
496
|
+
N().logout(!1);
|
|
488
497
|
return;
|
|
489
498
|
}
|
|
490
499
|
});
|
|
491
500
|
},
|
|
492
501
|
async toDefaultApp(e) {
|
|
493
502
|
if (this.appList.length === 0 && await this.loadAppList(), this.appList.length === 0) {
|
|
494
|
-
|
|
503
|
+
x.error("加载应用列表失败");
|
|
495
504
|
return;
|
|
496
505
|
}
|
|
497
506
|
let a = "";
|
|
@@ -519,7 +528,7 @@ const re = {
|
|
|
519
528
|
flattenRoutes: {},
|
|
520
529
|
Routes: a ?? [],
|
|
521
530
|
defaultPage: ""
|
|
522
|
-
}), (!V() || !
|
|
531
|
+
}), (!V() || !Mt()) && (await N().getRolePermits(t.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
523
532
|
},
|
|
524
533
|
/**
|
|
525
534
|
* 设置当前应用路由信息
|
|
@@ -538,14 +547,14 @@ const re = {
|
|
|
538
547
|
if (Object.keys(a).forEach((t) => {
|
|
539
548
|
const s = a[t];
|
|
540
549
|
s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(t) : this.CachedComponents.push(t));
|
|
541
|
-
}),
|
|
550
|
+
}), N().isLogin) {
|
|
542
551
|
const t = st(this.appInfo.Routes);
|
|
543
|
-
if (
|
|
552
|
+
if (Ut(t), this.appInfo.defaultPage = nt(t) || "", this.appInfo.defaultPage) {
|
|
544
553
|
if (this.menuLoaded = !0, V()) {
|
|
545
554
|
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
546
555
|
re.mainAppPush(s);
|
|
547
556
|
}
|
|
548
|
-
|
|
557
|
+
Vt(this.appInfo.defaultPage);
|
|
549
558
|
}
|
|
550
559
|
}
|
|
551
560
|
},
|
|
@@ -585,7 +594,7 @@ const re = {
|
|
|
585
594
|
* @returns 组件实例
|
|
586
595
|
*/
|
|
587
596
|
cacheComponent(e, a) {
|
|
588
|
-
let t =
|
|
597
|
+
let t = Ne.get(a.path);
|
|
589
598
|
if (!t)
|
|
590
599
|
if (this.CachedComponents.includes(a.path))
|
|
591
600
|
t = {
|
|
@@ -594,7 +603,7 @@ const re = {
|
|
|
594
603
|
render() {
|
|
595
604
|
return H(e);
|
|
596
605
|
}
|
|
597
|
-
},
|
|
606
|
+
}, Ne.set(a.path, t);
|
|
598
607
|
else return e;
|
|
599
608
|
return t;
|
|
600
609
|
},
|
|
@@ -603,7 +612,7 @@ const re = {
|
|
|
603
612
|
* @param path 路由地址
|
|
604
613
|
*/
|
|
605
614
|
excludeComponent(e) {
|
|
606
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
615
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Ne.delete(e);
|
|
607
616
|
},
|
|
608
617
|
/**
|
|
609
618
|
* 路由路径层级查询,返回面包屑
|
|
@@ -624,7 +633,7 @@ const re = {
|
|
|
624
633
|
Version: "",
|
|
625
634
|
Host: "",
|
|
626
635
|
Source: Ce.Manual,
|
|
627
|
-
Action:
|
|
636
|
+
Action: We.App,
|
|
628
637
|
Path: "",
|
|
629
638
|
Icon: "",
|
|
630
639
|
Routes: [],
|
|
@@ -638,7 +647,7 @@ const re = {
|
|
|
638
647
|
}
|
|
639
648
|
},
|
|
640
649
|
persist: !1
|
|
641
|
-
}),
|
|
650
|
+
}), Gt = "Token解析失败", Oe = 1400, Qe = {
|
|
642
651
|
login: {
|
|
643
652
|
api: "PLATFORM_API",
|
|
644
653
|
url: "/openapi/LoginSrv/login",
|
|
@@ -656,43 +665,43 @@ const re = {
|
|
|
656
665
|
url: "/api/LoginSrv/logout",
|
|
657
666
|
loadingText: "正在退出..."
|
|
658
667
|
}
|
|
659
|
-
},
|
|
668
|
+
}, jt = (e) => {
|
|
660
669
|
let a = {
|
|
661
670
|
Option: {
|
|
662
671
|
Mode: "MicroApp"
|
|
663
672
|
},
|
|
664
673
|
Query: e
|
|
665
674
|
};
|
|
666
|
-
return j(Qe.login, a).then((t) => (t == null ? void 0 : t.status) ===
|
|
667
|
-
},
|
|
675
|
+
return j(Qe.login, a).then((t) => (t == null ? void 0 : t.status) === k.SUCCESS ? t : null);
|
|
676
|
+
}, zt = (e) => {
|
|
668
677
|
let a = {
|
|
669
678
|
Query: {
|
|
670
679
|
AppId: e
|
|
671
680
|
}
|
|
672
681
|
};
|
|
673
682
|
return j(Qe.auth, a).then((t) => {
|
|
674
|
-
if ((t == null ? void 0 : t.status) ===
|
|
683
|
+
if ((t == null ? void 0 : t.status) === k.SUCCESS)
|
|
675
684
|
return t.data;
|
|
676
685
|
if ((t == null ? void 0 : t.errno) == Oe) {
|
|
677
|
-
|
|
686
|
+
N().logout(!1);
|
|
678
687
|
return;
|
|
679
688
|
}
|
|
680
|
-
return
|
|
689
|
+
return x.error("获取授权信息失败," + (t == null ? void 0 : t.msg)), null;
|
|
681
690
|
});
|
|
682
691
|
}, Bt = () => {
|
|
683
692
|
let e = {
|
|
684
693
|
Option: {},
|
|
685
694
|
Query: {}
|
|
686
695
|
};
|
|
687
|
-
return j(Qe.logout, e).then((a) => (a == null ? void 0 : a.status) ===
|
|
696
|
+
return j(Qe.logout, e).then((a) => (a == null ? void 0 : a.status) === k.SUCCESS ? a.data : null);
|
|
688
697
|
}, Wt = (e) => {
|
|
689
698
|
try {
|
|
690
699
|
const a = JSON.parse(atob(e.token.split(".")[1]));
|
|
691
700
|
return a.user = JSON.parse(a.user), e.UserInfo = a.user, !0;
|
|
692
701
|
} catch (a) {
|
|
693
|
-
return console.error(
|
|
702
|
+
return console.error(Gt, a), !1;
|
|
694
703
|
}
|
|
695
|
-
}, M = c(""), te = c(null),
|
|
704
|
+
}, M = c(""), te = c(null), N = ce("userInfo", {
|
|
696
705
|
state: () => ({
|
|
697
706
|
isLogin: !1,
|
|
698
707
|
userInfo: {
|
|
@@ -718,7 +727,7 @@ const re = {
|
|
|
718
727
|
* @returns
|
|
719
728
|
*/
|
|
720
729
|
async login(e, a) {
|
|
721
|
-
const t = await
|
|
730
|
+
const t = await jt(e);
|
|
722
731
|
if (t) {
|
|
723
732
|
const s = t;
|
|
724
733
|
if (s.errno)
|
|
@@ -731,7 +740,7 @@ const re = {
|
|
|
731
740
|
...n.UserInfo
|
|
732
741
|
}, M.value = n.UserInfo.UserLevel;
|
|
733
742
|
else {
|
|
734
|
-
|
|
743
|
+
x.error("用户信息解析失败");
|
|
735
744
|
return;
|
|
736
745
|
}
|
|
737
746
|
a && K().toDefaultApp();
|
|
@@ -749,7 +758,7 @@ const re = {
|
|
|
749
758
|
if (te.value && te.value.appId === e)
|
|
750
759
|
return !0;
|
|
751
760
|
try {
|
|
752
|
-
const a = await
|
|
761
|
+
const a = await zt(e);
|
|
753
762
|
return a ? (te.value = {
|
|
754
763
|
appId: e,
|
|
755
764
|
permits: a.permits || [],
|
|
@@ -849,7 +858,7 @@ const re = {
|
|
|
849
858
|
console.error("调用登出接口失败", a);
|
|
850
859
|
} finally {
|
|
851
860
|
await this.clean(), e && setTimeout(async () => {
|
|
852
|
-
|
|
861
|
+
x.success("已退出登录");
|
|
853
862
|
}, 1e3), setTimeout(async () => {
|
|
854
863
|
K().logout();
|
|
855
864
|
}, 2e3);
|
|
@@ -887,15 +896,15 @@ const re = {
|
|
|
887
896
|
JSON.parse(JSON.stringify(s.params ?? {})),
|
|
888
897
|
JSON.parse(JSON.stringify(a.params ?? {}))
|
|
889
898
|
);
|
|
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 ? (
|
|
899
|
+
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
900
|
}, Je = (e, a) => {
|
|
892
901
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
893
902
|
const t = Te(e, a);
|
|
894
903
|
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) ===
|
|
904
|
+
}, _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
905
|
const t = a.primaryKey || "Id";
|
|
897
906
|
if (a.params || (a.params = {}), a.params.Query || (a.params.Query = {}), !a.params.Data)
|
|
898
|
-
return
|
|
907
|
+
return x.error("错误!无保存数据!"), Promise.resolve(null);
|
|
899
908
|
const s = {
|
|
900
909
|
...a,
|
|
901
910
|
urlKey: a.urlKey || "save",
|
|
@@ -903,8 +912,8 @@ const re = {
|
|
|
903
912
|
};
|
|
904
913
|
s.params.Query[t] = s.params.Data[t];
|
|
905
914
|
const n = Te(e, s);
|
|
906
|
-
return s.url = n, Pe(e, s).then((o) => ((o == null ? void 0 : o.status) ===
|
|
907
|
-
},
|
|
915
|
+
return s.url = n, Pe(e, s).then((o) => ((o == null ? void 0 : o.status) === k.SUCCESS && (a.hideErrorToast || x.success("保存成功!")), o));
|
|
916
|
+
}, Ct = (e, a, t = {}) => {
|
|
908
917
|
const s = t.primaryKey || "Id";
|
|
909
918
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
910
919
|
const n = {
|
|
@@ -913,27 +922,27 @@ const re = {
|
|
|
913
922
|
loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据删除中..."
|
|
914
923
|
};
|
|
915
924
|
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
|
|
925
|
+
return x.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
917
926
|
const o = Te(e, n);
|
|
918
|
-
return n.url = o, Pe(e, n).then((r) => ((r == null ? void 0 : r.status) ===
|
|
919
|
-
},
|
|
927
|
+
return n.url = o, Pe(e, n).then((r) => ((r == null ? void 0 : r.status) === k.SUCCESS && (t.hideErrorToast || x.success("删除成功!")), r));
|
|
928
|
+
}, Yt = (e, a) => Je(e, {
|
|
920
929
|
urlKey: "tree",
|
|
921
930
|
params: {},
|
|
922
931
|
loadingState: e.isTreeLoading,
|
|
923
932
|
loadingText: !1,
|
|
924
933
|
processParams: () => fe(e.treeQuery, a)
|
|
925
|
-
}).then((t) => (t == null ? void 0 : t.status) ===
|
|
934
|
+
}).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
935
|
for (const t of e) {
|
|
927
936
|
if (t.key === a) return t;
|
|
928
937
|
if (t.children) {
|
|
929
|
-
const s =
|
|
938
|
+
const s = Xt(t.children, a);
|
|
930
939
|
if (s) return s;
|
|
931
940
|
}
|
|
932
941
|
}
|
|
933
942
|
return null;
|
|
934
943
|
};
|
|
935
944
|
let ie;
|
|
936
|
-
const
|
|
945
|
+
const Da = (e) => {
|
|
937
946
|
ie = new Ve({}), ie.messages({
|
|
938
947
|
required: "${label}不能为空",
|
|
939
948
|
types: {
|
|
@@ -960,7 +969,7 @@ const Na = (e) => {
|
|
|
960
969
|
},
|
|
961
970
|
...e
|
|
962
971
|
});
|
|
963
|
-
},
|
|
972
|
+
}, Ua = (e) => {
|
|
964
973
|
if (!e || F(e))
|
|
965
974
|
return [];
|
|
966
975
|
const a = [], t = ie.messages(), s = (o, r, l) => {
|
|
@@ -972,9 +981,9 @@ const Na = (e) => {
|
|
|
972
981
|
const i = ["string", "number", "array"];
|
|
973
982
|
for (const f of i)
|
|
974
983
|
if (u === f && t[f]) {
|
|
975
|
-
const
|
|
976
|
-
for (const
|
|
977
|
-
|
|
984
|
+
const d = t[f], p = ["len", "min", "max", "range"];
|
|
985
|
+
for (const m of p)
|
|
986
|
+
m === "range" && r.min != null && r.max != null && d.range ? n(d.range, o, { min: r.min, max: r.max }, l) : m !== "range" && r[m] != null && d[m] && n(d[m], o, { [m]: r[m] }, l);
|
|
978
987
|
}
|
|
979
988
|
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
989
|
const f = r.enum.join(", ");
|
|
@@ -986,8 +995,8 @@ const Na = (e) => {
|
|
|
986
995
|
let i;
|
|
987
996
|
if (typeof o == "function") {
|
|
988
997
|
const f = [r];
|
|
989
|
-
for (const
|
|
990
|
-
f.push(l[
|
|
998
|
+
for (const d in l)
|
|
999
|
+
f.push(l[d]);
|
|
991
1000
|
i = o.apply(null, f), i && u.push(i);
|
|
992
1001
|
} else {
|
|
993
1002
|
i = String(o);
|
|
@@ -1018,7 +1027,7 @@ const Na = (e) => {
|
|
|
1018
1027
|
const a = e.formData.value, t = e.formRules.value;
|
|
1019
1028
|
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
1029
|
}).catch(({ fields: s }) => s));
|
|
1021
|
-
},
|
|
1030
|
+
}, Ha = async (e, a, t) => (t || (t = new Ve({}), t.messages(ie.messages()), t.define(a)), t.validate(e).then(() => {
|
|
1022
1031
|
}).catch(({ fields: s }) => s)), qe = (e) => {
|
|
1023
1032
|
e.ruleResults.value = void 0;
|
|
1024
1033
|
}, X = () => {
|
|
@@ -1029,7 +1038,7 @@ const Na = (e) => {
|
|
|
1029
1038
|
ruleKey: t,
|
|
1030
1039
|
errInfo: s
|
|
1031
1040
|
};
|
|
1032
|
-
},
|
|
1041
|
+
}, Zt = (e, a) => {
|
|
1033
1042
|
let t = c({
|
|
1034
1043
|
msg: "",
|
|
1035
1044
|
errClass: ""
|
|
@@ -1037,11 +1046,11 @@ const Na = (e) => {
|
|
|
1037
1046
|
if (!e.label || !e.rule)
|
|
1038
1047
|
return t;
|
|
1039
1048
|
const s = a == null ? void 0 : a.ruleResults;
|
|
1040
|
-
return
|
|
1049
|
+
return y(
|
|
1041
1050
|
() => s == null ? void 0 : s.value,
|
|
1042
1051
|
(n) => {
|
|
1043
1052
|
if (t.value.errClass = "", t.value.msg = "", !F(n)) {
|
|
1044
|
-
const o =
|
|
1053
|
+
const o = ea(
|
|
1045
1054
|
{
|
|
1046
1055
|
label: e.label,
|
|
1047
1056
|
rule: e.rule
|
|
@@ -1054,7 +1063,7 @@ const Na = (e) => {
|
|
|
1054
1063
|
},
|
|
1055
1064
|
{ deep: !0 }
|
|
1056
1065
|
), t;
|
|
1057
|
-
},
|
|
1066
|
+
}, ea = (e, a, t) => {
|
|
1058
1067
|
const s = c([]), n = c(""), o = c("");
|
|
1059
1068
|
if (!e.rule || !a || !t)
|
|
1060
1069
|
return { msg: n, ruleErrors: s, errClass: o };
|
|
@@ -1075,30 +1084,30 @@ const Na = (e) => {
|
|
|
1075
1084
|
const i = a[u.field];
|
|
1076
1085
|
if (i) {
|
|
1077
1086
|
const f = n.value.match(l);
|
|
1078
|
-
f && f.forEach((
|
|
1079
|
-
const
|
|
1080
|
-
n.value = n.value.replace(
|
|
1087
|
+
f && f.forEach((d) => {
|
|
1088
|
+
const p = d.replace("${", "").replace("}", "");
|
|
1089
|
+
n.value = n.value.replace(d, i[p] ?? "");
|
|
1081
1090
|
});
|
|
1082
1091
|
}
|
|
1083
1092
|
}), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
|
|
1084
|
-
},
|
|
1093
|
+
}, Va = (e, a) => {
|
|
1085
1094
|
$e(U.LabelText, e.label || ""), $e(U.RuleKey, e.rule || "");
|
|
1086
|
-
const t =
|
|
1095
|
+
const t = Zt(e, a);
|
|
1087
1096
|
return $e(U.ErrInfo, t), t;
|
|
1088
|
-
},
|
|
1097
|
+
}, ta = (e, a) => {
|
|
1089
1098
|
if (!a)
|
|
1090
1099
|
return;
|
|
1091
1100
|
const [t, ...s] = e;
|
|
1092
1101
|
if (e.length === 1)
|
|
1093
1102
|
return a[t];
|
|
1094
1103
|
if (a[t])
|
|
1095
|
-
return
|
|
1096
|
-
}, Va = (e) => {
|
|
1097
|
-
ot(e);
|
|
1104
|
+
return ta(s, a[t].fields);
|
|
1098
1105
|
}, Ka = (e) => {
|
|
1106
|
+
ot(e);
|
|
1107
|
+
}, Qa = (e) => {
|
|
1099
1108
|
const a = e.page, t = e.formData.value;
|
|
1100
1109
|
t[e.primaryKey ?? a.primaryKey] = null, ot(e);
|
|
1101
|
-
},
|
|
1110
|
+
}, Ja = (e) => {
|
|
1102
1111
|
Ge(e), e.visible.value = !1;
|
|
1103
1112
|
}, ot = async (e) => {
|
|
1104
1113
|
var s;
|
|
@@ -1106,7 +1115,7 @@ const Na = (e) => {
|
|
|
1106
1115
|
if (e.isFormSaving.value = !0, qe(e), e.beforeSave && e.beforeSave() === !1)
|
|
1107
1116
|
return e.isFormSaving.value = !1, Promise.resolve();
|
|
1108
1117
|
if (e.formRules.value && await de(e), e.ruleResults.value)
|
|
1109
|
-
return
|
|
1118
|
+
return x.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
|
|
1110
1119
|
const t = e.formData.value;
|
|
1111
1120
|
return rt(
|
|
1112
1121
|
{
|
|
@@ -1127,38 +1136,38 @@ const Na = (e) => {
|
|
|
1127
1136
|
}
|
|
1128
1137
|
).then((n) => {
|
|
1129
1138
|
var o, r;
|
|
1130
|
-
if ((n == null ? void 0 : n.status) ===
|
|
1131
|
-
|
|
1139
|
+
if ((n == null ? void 0 : n.status) === k.SUCCESS)
|
|
1140
|
+
x.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
|
|
1132
1141
|
else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
|
|
1133
1142
|
const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
|
|
1134
1143
|
if (l && l.length > 2 && l[1] && l[2]) {
|
|
1135
1144
|
const u = l[1], i = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
|
|
1136
1145
|
if (f && i.length > 0) {
|
|
1137
|
-
const
|
|
1138
|
-
i.forEach((
|
|
1139
|
-
f[
|
|
1146
|
+
const d = {};
|
|
1147
|
+
i.forEach((p) => {
|
|
1148
|
+
f[p] && (d[p] = [
|
|
1140
1149
|
{
|
|
1141
|
-
field:
|
|
1150
|
+
field: p,
|
|
1142
1151
|
fieldValue: u,
|
|
1143
1152
|
message: "数据重复"
|
|
1144
1153
|
}
|
|
1145
1154
|
]);
|
|
1146
|
-
}), Object.keys(
|
|
1155
|
+
}), Object.keys(d).length > 0 && (console.error("保存失败!", d), e.ruleResults.value = d);
|
|
1147
1156
|
}
|
|
1148
|
-
|
|
1149
|
-
} else
|
|
1157
|
+
x.error(`保存失败!数据 \`${u}\` 已存在!`);
|
|
1158
|
+
} else x.error((n == null ? void 0 : n.msg) ?? "保存失败!");
|
|
1150
1159
|
e.afterSave && e.afterSave(n);
|
|
1151
1160
|
} else
|
|
1152
|
-
|
|
1161
|
+
x.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
|
|
1153
1162
|
});
|
|
1154
|
-
},
|
|
1163
|
+
}, qa = async (e) => {
|
|
1155
1164
|
const a = e.page, t = e.grid;
|
|
1156
1165
|
e.isFormLoading.value = !0;
|
|
1157
1166
|
const s = e.formData.value, n = e.primaryKey ?? a.primaryKey;
|
|
1158
1167
|
return ut(t, { [n]: s[n] }, e.detailUrl).then((o) => {
|
|
1159
1168
|
e.isFormLoading.value = !1, o && it(e, o);
|
|
1160
1169
|
});
|
|
1161
|
-
},
|
|
1170
|
+
}, Ga = (e) => {
|
|
1162
1171
|
const a = e.grid;
|
|
1163
1172
|
a && (a.rowData.value = void 0), e && (Ge(e), e.visible && (e.visible.value = !1), setTimeout(() => {
|
|
1164
1173
|
e.visible.value = !0;
|
|
@@ -1169,8 +1178,8 @@ const Na = (e) => {
|
|
|
1169
1178
|
e.formData.value = JSON.parse(JSON.stringify(t));
|
|
1170
1179
|
}, Ge = (e) => {
|
|
1171
1180
|
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, qe(e);
|
|
1172
|
-
},
|
|
1173
|
-
const t =
|
|
1181
|
+
}, ja = (e, a) => {
|
|
1182
|
+
const t = N();
|
|
1174
1183
|
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
1184
|
if (!a) {
|
|
1176
1185
|
if (n.visible === !1)
|
|
@@ -1180,7 +1189,7 @@ const Na = (e) => {
|
|
|
1180
1189
|
}
|
|
1181
1190
|
return !0;
|
|
1182
1191
|
});
|
|
1183
|
-
},
|
|
1192
|
+
}, za = (e, a) => {
|
|
1184
1193
|
const t = a == null ? void 0 : a.filter((s) => {
|
|
1185
1194
|
const n = e.find(
|
|
1186
1195
|
(o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
|
|
@@ -1188,7 +1197,7 @@ const Na = (e) => {
|
|
|
1188
1197
|
return n ? { ...s, ...n } : !1;
|
|
1189
1198
|
});
|
|
1190
1199
|
return [...t || [], ...e.filter((s) => !(t != null && t.includes(s)))];
|
|
1191
|
-
},
|
|
1200
|
+
}, aa = (e) => lt(e).then((a) => a.rows), lt = (e) => {
|
|
1192
1201
|
e.gridQuery || (e.gridQuery = {});
|
|
1193
1202
|
const a = e.remotePage ? "find" : "list";
|
|
1194
1203
|
return Je(e, {
|
|
@@ -1201,7 +1210,7 @@ const Na = (e) => {
|
|
|
1201
1210
|
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
1211
|
}
|
|
1203
1212
|
}).then((t) => {
|
|
1204
|
-
if ((t == null ? void 0 : t.status) ===
|
|
1213
|
+
if ((t == null ? void 0 : t.status) === k.SUCCESS) {
|
|
1205
1214
|
let s = t.data;
|
|
1206
1215
|
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
1216
|
total: e.total.value,
|
|
@@ -1216,7 +1225,7 @@ const Na = (e) => {
|
|
|
1216
1225
|
rows: []
|
|
1217
1226
|
};
|
|
1218
1227
|
});
|
|
1219
|
-
},
|
|
1228
|
+
}, sa = (e, a, t = {}) => rt(e, {
|
|
1220
1229
|
urlKey: "update",
|
|
1221
1230
|
url: e.updateUrl,
|
|
1222
1231
|
params: {
|
|
@@ -1225,11 +1234,11 @@ const Na = (e) => {
|
|
|
1225
1234
|
},
|
|
1226
1235
|
loadingState: e.isGridSaving,
|
|
1227
1236
|
...t
|
|
1228
|
-
}).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1237
|
+
}).then((s) => ((s == null ? void 0 : s.status) === k.SUCCESS && setTimeout(() => {
|
|
1229
1238
|
e.reload.value = !0, e.afterUpdate && e.afterUpdate(a);
|
|
1230
1239
|
}, 50), s)), Ba = (e, a) => {
|
|
1231
1240
|
const t = {};
|
|
1232
|
-
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey],
|
|
1241
|
+
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey], sa(e, t, {
|
|
1233
1242
|
loadingText: !1,
|
|
1234
1243
|
hideErrorToast: !0
|
|
1235
1244
|
});
|
|
@@ -1240,20 +1249,20 @@ const Na = (e) => {
|
|
|
1240
1249
|
loadingState: e.isGridLoading
|
|
1241
1250
|
}), Wa = (e, a) => {
|
|
1242
1251
|
const t = a;
|
|
1243
|
-
return ut(e, { [e.primaryKey]: t[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1244
|
-
},
|
|
1252
|
+
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));
|
|
1253
|
+
}, Ca = (e, a) => {
|
|
1245
1254
|
let t = e.editor;
|
|
1246
1255
|
e.rowData.value = a, t && (it(t, a), t.visible.value = !0);
|
|
1247
|
-
},
|
|
1256
|
+
}, Ya = (e, a) => Ct(e, a, {
|
|
1248
1257
|
url: e.deleteUrl,
|
|
1249
1258
|
primaryKey: e.primaryKey
|
|
1250
|
-
}).then((t) => ((t == null ? void 0 : t.status) ===
|
|
1259
|
+
}).then((t) => ((t == null ? void 0 : t.status) === k.SUCCESS && setTimeout(() => {
|
|
1251
1260
|
e.reload.value = !0, e.afterDelete && !Array.isArray(a) && e.afterDelete(a);
|
|
1252
1261
|
}, 50), t));
|
|
1253
1262
|
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
|
|
1263
|
+
class na {
|
|
1255
1264
|
constructor() {
|
|
1256
|
-
|
|
1265
|
+
P(this, "listeners", {});
|
|
1257
1266
|
}
|
|
1258
1267
|
// 检查事件名是否符合前缀
|
|
1259
1268
|
isValidPrefix(a) {
|
|
@@ -1297,15 +1306,15 @@ class sa {
|
|
|
1297
1306
|
this.listeners[a] && this.listeners[a].forEach((s) => s(a, ...t));
|
|
1298
1307
|
}
|
|
1299
1308
|
}
|
|
1300
|
-
const
|
|
1309
|
+
const B = new na(), ee = (e, a, t) => {
|
|
1301
1310
|
if (a.inputFactory && (t != null && t.reloadEvent)) {
|
|
1302
1311
|
const s = a.inputFactory.value;
|
|
1303
1312
|
s.reloadHandler = (n, o) => {
|
|
1304
|
-
|
|
1305
|
-
},
|
|
1313
|
+
ra(a.url, a, o);
|
|
1314
|
+
}, B.on(t.reloadEvent, s.reloadHandler);
|
|
1306
1315
|
}
|
|
1307
1316
|
if (t != null && t.data)
|
|
1308
|
-
|
|
1317
|
+
y(
|
|
1309
1318
|
() => t.data,
|
|
1310
1319
|
() => {
|
|
1311
1320
|
je(a, t.data, !0);
|
|
@@ -1316,7 +1325,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1316
1325
|
e && ct(a.url, a, a.params ?? {});
|
|
1317
1326
|
else {
|
|
1318
1327
|
const s = c(se(U.LabelText, ""));
|
|
1319
|
-
|
|
1328
|
+
x.error("`" + s.value + "` 未配置选项数据!", {
|
|
1320
1329
|
duration: 5e3
|
|
1321
1330
|
});
|
|
1322
1331
|
}
|
|
@@ -1325,23 +1334,23 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1325
1334
|
const s = {
|
|
1326
1335
|
...e.fieldMap
|
|
1327
1336
|
};
|
|
1328
|
-
a =
|
|
1337
|
+
a = $t(s, a);
|
|
1329
1338
|
}
|
|
1330
1339
|
a = JSON.parse(JSON.stringify(a ?? [])), e.all && a.unshift({
|
|
1331
1340
|
label: "全部",
|
|
1332
1341
|
value: e.allValue ?? void 0
|
|
1333
1342
|
}), e.options.value = a;
|
|
1334
|
-
},
|
|
1343
|
+
}, ra = (e, a, t) => {
|
|
1335
1344
|
Array.isArray(t) ? je(a, t, !0) : ct(e, a, t);
|
|
1336
1345
|
}, he = (e, a) => {
|
|
1337
1346
|
var t;
|
|
1338
|
-
(t = e.inputFactory) != null && t.value && a.reloadEvent && e.inputFactory.value.reloadHandler &&
|
|
1347
|
+
(t = e.inputFactory) != null && t.value && a.reloadEvent && e.inputFactory.value.reloadHandler && B.off(a.reloadEvent, e.inputFactory.value.reloadHandler);
|
|
1339
1348
|
}, ct = (e, a, t) => {
|
|
1340
1349
|
const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(a.params ?? {})), o = fe(s, n, t);
|
|
1341
|
-
|
|
1350
|
+
oa(e, a, a.fieldMap, o).then((r) => {
|
|
1342
1351
|
je(a, r, !1);
|
|
1343
1352
|
});
|
|
1344
|
-
},
|
|
1353
|
+
}, oa = (e, a, t, s) => {
|
|
1345
1354
|
const { fieldMap: n, ...o } = e, l = {
|
|
1346
1355
|
...{
|
|
1347
1356
|
url: "",
|
|
@@ -1354,18 +1363,18 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1354
1363
|
...o
|
|
1355
1364
|
};
|
|
1356
1365
|
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) ===
|
|
1366
|
+
if ((u == null ? void 0 : u.status) === k.SUCCESS) {
|
|
1358
1367
|
if (u.data)
|
|
1359
1368
|
return u.data;
|
|
1360
1369
|
} else if ((u == null ? void 0 : u.errno) == Oe) {
|
|
1361
|
-
|
|
1370
|
+
N().logout(!1);
|
|
1362
1371
|
return;
|
|
1363
1372
|
}
|
|
1364
1373
|
return [];
|
|
1365
1374
|
}).finally(() => {
|
|
1366
1375
|
a.isOptionLoading.value = !1;
|
|
1367
1376
|
});
|
|
1368
|
-
},
|
|
1377
|
+
}, ia = (e, a, t) => {
|
|
1369
1378
|
if (e === void 0) return;
|
|
1370
1379
|
const s = (o) => {
|
|
1371
1380
|
const r = { ...o };
|
|
@@ -1426,7 +1435,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1426
1435
|
var o, r;
|
|
1427
1436
|
const s = (o = e.inputFactory) == null ? void 0 : o.value;
|
|
1428
1437
|
s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && de(s.editorCtrl), e.selected.value = t;
|
|
1429
|
-
const n =
|
|
1438
|
+
const n = ia(t, e.options.value);
|
|
1430
1439
|
if (e.selectedOptions.value = n, a.formData && a.outFields && ft(a.formData, a.outFields, n), a.changeEvent) {
|
|
1431
1440
|
const [l, u] = a.changeEvent;
|
|
1432
1441
|
if (u)
|
|
@@ -1434,25 +1443,25 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1434
1443
|
l.every((i) => {
|
|
1435
1444
|
const f = be(u, { selectedValues: t });
|
|
1436
1445
|
try {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
} catch (
|
|
1440
|
-
console.error("eventParamsValue: ", f,
|
|
1446
|
+
const d = JSON.parse(f);
|
|
1447
|
+
B.emit(i, d, t, n);
|
|
1448
|
+
} catch (d) {
|
|
1449
|
+
console.error("eventParamsValue: ", f, d);
|
|
1441
1450
|
}
|
|
1442
1451
|
});
|
|
1443
1452
|
else {
|
|
1444
1453
|
const i = be(u, { selectedValues: t });
|
|
1445
1454
|
try {
|
|
1446
1455
|
const f = JSON.parse(i);
|
|
1447
|
-
|
|
1456
|
+
B.emit(l, f, t, n);
|
|
1448
1457
|
} catch (f) {
|
|
1449
1458
|
console.error("eventParamsValue: ", i, f);
|
|
1450
1459
|
}
|
|
1451
1460
|
}
|
|
1452
1461
|
else
|
|
1453
1462
|
Array.isArray(l) ? l.every((i) => {
|
|
1454
|
-
|
|
1455
|
-
}) :
|
|
1463
|
+
B.emit(i, n, t);
|
|
1464
|
+
}) : B.emit(l, n, t);
|
|
1456
1465
|
}
|
|
1457
1466
|
return s != null && s.inputEmit && s.inputEmit("change", t, n), n;
|
|
1458
1467
|
}, S = {
|
|
@@ -1493,7 +1502,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1493
1502
|
value: "Id"
|
|
1494
1503
|
}
|
|
1495
1504
|
}
|
|
1496
|
-
},
|
|
1505
|
+
}, Xa = (e) => {
|
|
1497
1506
|
S.PageOption = {
|
|
1498
1507
|
...S.PageOption,
|
|
1499
1508
|
...e.pageOption
|
|
@@ -1510,7 +1519,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1510
1519
|
}, Me = (e) => {
|
|
1511
1520
|
for (let a in e.urls)
|
|
1512
1521
|
e.urls[a].api || (e.urls[a].api = e.api), e.urls[a].authorize === void 0 && (e.urls[a].authorize = e.authorize);
|
|
1513
|
-
},
|
|
1522
|
+
}, la = (e, a, t, s) => (Me(e), {
|
|
1514
1523
|
editorCtrl: {
|
|
1515
1524
|
...S.EditorOption,
|
|
1516
1525
|
name: "",
|
|
@@ -1526,7 +1535,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1526
1535
|
isFormSaving: c(!1),
|
|
1527
1536
|
isFormLoading: c(!1)
|
|
1528
1537
|
}
|
|
1529
|
-
}),
|
|
1538
|
+
}), ua = (e, a, t) => {
|
|
1530
1539
|
Me(e);
|
|
1531
1540
|
const s = {
|
|
1532
1541
|
...S.GridOption,
|
|
@@ -1555,17 +1564,17 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1555
1564
|
updateUrl: e.urls.update,
|
|
1556
1565
|
deleteUrl: e.urls.delete
|
|
1557
1566
|
};
|
|
1558
|
-
return
|
|
1567
|
+
return y(
|
|
1559
1568
|
() => s.reload.value,
|
|
1560
1569
|
(n) => {
|
|
1561
1570
|
n && (setTimeout(() => {
|
|
1562
1571
|
s.reload.value = !1;
|
|
1563
|
-
}, 1), s.remotePage ? lt(s) :
|
|
1572
|
+
}, 1), s.remotePage ? lt(s) : aa(s));
|
|
1564
1573
|
}
|
|
1565
1574
|
), {
|
|
1566
1575
|
gridCtrl: s
|
|
1567
1576
|
};
|
|
1568
|
-
},
|
|
1577
|
+
}, Za = (e, a) => {
|
|
1569
1578
|
Me(e);
|
|
1570
1579
|
const t = {
|
|
1571
1580
|
...S.TreeOption,
|
|
@@ -1576,12 +1585,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1576
1585
|
data: J(void 0),
|
|
1577
1586
|
isTreeLoading: c(!1)
|
|
1578
1587
|
};
|
|
1579
|
-
return
|
|
1588
|
+
return y(
|
|
1580
1589
|
() => t.reload.value,
|
|
1581
1590
|
(s) => {
|
|
1582
1591
|
s && (setTimeout(() => {
|
|
1583
1592
|
t.reload.value = !1;
|
|
1584
|
-
}, 1),
|
|
1593
|
+
}, 1), Yt(t));
|
|
1585
1594
|
}
|
|
1586
1595
|
), {
|
|
1587
1596
|
treeCtrl: t
|
|
@@ -1598,7 +1607,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1598
1607
|
options: c([]),
|
|
1599
1608
|
isOptionLoading: c(!1)
|
|
1600
1609
|
};
|
|
1601
|
-
return
|
|
1610
|
+
return y(
|
|
1602
1611
|
() => t.reload.value,
|
|
1603
1612
|
(s) => {
|
|
1604
1613
|
s && (setTimeout(() => {
|
|
@@ -1608,24 +1617,24 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1608
1617
|
), {
|
|
1609
1618
|
optionCtrl: t
|
|
1610
1619
|
};
|
|
1611
|
-
},
|
|
1620
|
+
}, es = (e, a, t) => {
|
|
1612
1621
|
Me(e);
|
|
1613
1622
|
const s = {
|
|
1614
1623
|
...S.PageOption,
|
|
1615
1624
|
...e
|
|
1616
|
-
}, { editorCtrl: n } =
|
|
1625
|
+
}, { editorCtrl: n } = la(e, s, a, t), { gridCtrl: o } = ua(e, s);
|
|
1617
1626
|
return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
|
|
1618
1627
|
pageCtrl: s,
|
|
1619
1628
|
editorCtrl: n,
|
|
1620
1629
|
gridCtrl: o
|
|
1621
1630
|
};
|
|
1622
|
-
},
|
|
1631
|
+
}, ca = 7 * 24 * 60 * 60 * 1e3, _e = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Set(), G = c({}), ts = G, as = (e) => {
|
|
1623
1632
|
var n;
|
|
1624
1633
|
if (!e.iconUrl) return Ue;
|
|
1625
1634
|
const a = c(!0), t = c("");
|
|
1626
1635
|
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
|
-
|
|
1636
|
+
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(() => {
|
|
1637
|
+
ha(e.iconUrl, e.monoColor || !1), a.value = !0;
|
|
1629
1638
|
}), Z({
|
|
1630
1639
|
props: {
|
|
1631
1640
|
icon: {
|
|
@@ -1656,25 +1665,25 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1656
1665
|
const l = c(o.icon), u = c(0), i = () => {
|
|
1657
1666
|
o.icons && u.value++;
|
|
1658
1667
|
};
|
|
1659
|
-
return
|
|
1668
|
+
return y(
|
|
1660
1669
|
() => o.iconIndex,
|
|
1661
1670
|
(f) => {
|
|
1662
1671
|
f !== void 0 && (u.value = f);
|
|
1663
1672
|
},
|
|
1664
1673
|
{ immediate: !0 }
|
|
1665
|
-
),
|
|
1674
|
+
), y(
|
|
1666
1675
|
() => u.value,
|
|
1667
1676
|
(f) => {
|
|
1668
1677
|
o.icons && (f >= o.icons.length && (u.value = 0), l.value = o.icons[u.value], ge(t, l, l.value), r("update:iconIndex", u.value));
|
|
1669
1678
|
},
|
|
1670
1679
|
{ immediate: !0 }
|
|
1671
|
-
),
|
|
1680
|
+
), y(
|
|
1672
1681
|
() => G.value,
|
|
1673
1682
|
() => {
|
|
1674
1683
|
ge(t, l, l.value);
|
|
1675
1684
|
},
|
|
1676
1685
|
{ deep: !0 }
|
|
1677
|
-
),
|
|
1686
|
+
), y(
|
|
1678
1687
|
() => o.icon,
|
|
1679
1688
|
(f) => {
|
|
1680
1689
|
ge(t, l, f);
|
|
@@ -1693,30 +1702,30 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1693
1702
|
style: {
|
|
1694
1703
|
fill: "currentColor",
|
|
1695
1704
|
cursor: this.$props.clickable ? "pointer" : "default",
|
|
1696
|
-
transform:
|
|
1705
|
+
transform: va(this.angle, this.flip)
|
|
1697
1706
|
}
|
|
1698
1707
|
}) : H("div", { class: "w-[14px] h-[14px]" });
|
|
1699
1708
|
}
|
|
1700
1709
|
});
|
|
1701
|
-
},
|
|
1710
|
+
}, fa = (e, a) => {
|
|
1702
1711
|
let t = e.iconUrl;
|
|
1703
1712
|
if (!t)
|
|
1704
1713
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1705
|
-
if (
|
|
1714
|
+
if (_e.has(t))
|
|
1706
1715
|
return Promise.resolve();
|
|
1707
1716
|
const s = dt(t);
|
|
1708
1717
|
if (s)
|
|
1709
1718
|
return new Promise(async (o) => (pt(s.scriptContent), o()));
|
|
1710
1719
|
a.value = !1;
|
|
1711
1720
|
const n = new Promise(async (o) => {
|
|
1712
|
-
await
|
|
1721
|
+
await pa(t, e.monoColor || !1), o(), _e.delete(t);
|
|
1713
1722
|
});
|
|
1714
|
-
return
|
|
1715
|
-
},
|
|
1723
|
+
return _e.set(t, n), n;
|
|
1724
|
+
}, pa = async (e, a) => {
|
|
1716
1725
|
try {
|
|
1717
1726
|
const t = await fetch(e);
|
|
1718
1727
|
if (!t.ok) {
|
|
1719
|
-
|
|
1728
|
+
x.error("网络异常,无法加载图标库!");
|
|
1720
1729
|
return;
|
|
1721
1730
|
}
|
|
1722
1731
|
let s = await t.text();
|
|
@@ -1725,7 +1734,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1725
1734
|
const o = s.match(n);
|
|
1726
1735
|
if (o && o.length > 1) {
|
|
1727
1736
|
let r = o[1];
|
|
1728
|
-
|
|
1737
|
+
da(e, r, a, s);
|
|
1729
1738
|
}
|
|
1730
1739
|
pt(s);
|
|
1731
1740
|
return;
|
|
@@ -1735,13 +1744,13 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1735
1744
|
}, pt = (e) => {
|
|
1736
1745
|
const a = document.createElement("script");
|
|
1737
1746
|
a.textContent = e, document.head.appendChild(a);
|
|
1738
|
-
},
|
|
1747
|
+
}, da = (e, a, t, s) => {
|
|
1739
1748
|
let n = `icon_cache:${e}`;
|
|
1740
1749
|
const o = {
|
|
1741
1750
|
windowKey: a,
|
|
1742
1751
|
monoColor: t,
|
|
1743
1752
|
scriptContent: s,
|
|
1744
|
-
expireTime: Date.now() +
|
|
1753
|
+
expireTime: Date.now() + ca
|
|
1745
1754
|
// 缓存时间:7天
|
|
1746
1755
|
};
|
|
1747
1756
|
localStorage.setItem(n, JSON.stringify(o));
|
|
@@ -1756,7 +1765,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1756
1765
|
return console.error("解析缓存失败:", n), null;
|
|
1757
1766
|
}
|
|
1758
1767
|
return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
|
|
1759
|
-
},
|
|
1768
|
+
}, ss = () => {
|
|
1760
1769
|
const e = Date.now();
|
|
1761
1770
|
for (const a in localStorage)
|
|
1762
1771
|
if (a.startsWith("icon_cache:")) {
|
|
@@ -1787,12 +1796,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1787
1796
|
fill: "currentColor"
|
|
1788
1797
|
})
|
|
1789
1798
|
]
|
|
1790
|
-
),
|
|
1799
|
+
), ha = (e, a) => {
|
|
1791
1800
|
const t = dt(e);
|
|
1792
1801
|
Object.keys(window).forEach((s) => {
|
|
1793
|
-
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !Xe.has(s) && (Xe.add(s),
|
|
1802
|
+
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !Xe.has(s) && (Xe.add(s), ma(s, a));
|
|
1794
1803
|
});
|
|
1795
|
-
},
|
|
1804
|
+
}, ma = (e, a) => {
|
|
1796
1805
|
const t = window[e], o = new DOMParser().parseFromString(t, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
|
|
1797
1806
|
for (const l of o) {
|
|
1798
1807
|
const u = l.id, i = Array.from(r).find((f) => f.id === u);
|
|
@@ -1800,30 +1809,31 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1800
1809
|
f.hasAttribute("fill") && f.removeAttribute("fill");
|
|
1801
1810
|
})), G.value[u] || (G.value[u] = H("svg", { fill: "currentColor" }, [H("use", { "xlink:href": `#${u}` })]));
|
|
1802
1811
|
}
|
|
1803
|
-
},
|
|
1812
|
+
}, va = (e, a) => {
|
|
1804
1813
|
let t = "";
|
|
1805
1814
|
return e && (t += `rotate(${e}deg)`), a && (t += " scaleX(-1)"), t;
|
|
1806
|
-
},
|
|
1815
|
+
}, ns = (e, a, t, s) => {
|
|
1807
1816
|
ht(e, [], t, s).forEach((o) => a.push(o));
|
|
1808
1817
|
}, ht = (e, a, t, s) => {
|
|
1809
|
-
var r, l, u, i, f;
|
|
1810
|
-
const n = [], o =
|
|
1818
|
+
var r, l, u, i, f, d;
|
|
1819
|
+
const n = [], o = N();
|
|
1811
1820
|
for (const p of e) {
|
|
1812
|
-
if (p.redirect ||
|
|
1821
|
+
if (p.redirect || (r = p.meta) != null && r.hidden || // 隐藏菜单
|
|
1822
|
+
p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (u = (l = p.meta) == null ? void 0 : l.roles) != null && u.length && !o.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !o.hasPermit(p.meta.permission, ":page"))
|
|
1813
1823
|
continue;
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
key:
|
|
1818
|
-
label: ((
|
|
1819
|
-
title: ((
|
|
1824
|
+
const m = p.path.split("/");
|
|
1825
|
+
m.unshift(...a);
|
|
1826
|
+
const I = ht(p.children || [], m, t, s), g = {
|
|
1827
|
+
key: m.join("/"),
|
|
1828
|
+
label: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
|
|
1829
|
+
title: ((d = p.name) == null ? void 0 : d.toString()) ?? "",
|
|
1820
1830
|
icon: p.icon ? H(t, { ...s, icon: p.icon }) : void 0,
|
|
1821
|
-
children:
|
|
1831
|
+
children: I.length > 0 ? I : void 0
|
|
1822
1832
|
};
|
|
1823
|
-
(
|
|
1833
|
+
(I.length > 0 || !p.children) && n.push(g);
|
|
1824
1834
|
}
|
|
1825
1835
|
return n;
|
|
1826
|
-
}, Ze = yt([]),
|
|
1836
|
+
}, Ze = yt([]), rs = () => {
|
|
1827
1837
|
Ze.length = 0;
|
|
1828
1838
|
const e = K();
|
|
1829
1839
|
let t = Ke().TabActive;
|
|
@@ -1836,7 +1846,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1836
1846
|
};
|
|
1837
1847
|
Ze.push(r);
|
|
1838
1848
|
});
|
|
1839
|
-
},
|
|
1849
|
+
}, ga = {
|
|
1840
1850
|
host: {
|
|
1841
1851
|
api: "SITEHOST_API",
|
|
1842
1852
|
url: "/openapi/RCSiteHostSrv/get",
|
|
@@ -1848,7 +1858,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1848
1858
|
// 不显示错误
|
|
1849
1859
|
hideErrorToast: !0
|
|
1850
1860
|
}
|
|
1851
|
-
},
|
|
1861
|
+
}, os = ce("hostInfo", {
|
|
1852
1862
|
state: () => ({
|
|
1853
1863
|
hostInfo: {
|
|
1854
1864
|
Host: "",
|
|
@@ -1881,12 +1891,12 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1881
1891
|
return (!t || t === "/") && (t = window.location.origin), t.endsWith("/") && (t = t.slice(0, -1)), new Promise((s) => {
|
|
1882
1892
|
Fe.SITEHOST_API || (Fe.SITEHOST_API = t);
|
|
1883
1893
|
const n = a || window.location.origin;
|
|
1884
|
-
j(
|
|
1894
|
+
j(ga.host, {
|
|
1885
1895
|
Query: {
|
|
1886
1896
|
Host: n
|
|
1887
1897
|
}
|
|
1888
1898
|
}).then((o) => {
|
|
1889
|
-
if ((o == null ? void 0 : o.status) ===
|
|
1899
|
+
if ((o == null ? void 0 : o.status) === k.SUCCESS && o.data) {
|
|
1890
1900
|
const r = o.data;
|
|
1891
1901
|
this._setHostInfo(r);
|
|
1892
1902
|
} else
|
|
@@ -1924,7 +1934,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1924
1934
|
if (this.hostInfo.SERVER_HOST)
|
|
1925
1935
|
for (const a in this.hostInfo.SERVER_HOST) {
|
|
1926
1936
|
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,
|
|
1937
|
+
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
1938
|
}
|
|
1929
1939
|
},
|
|
1930
1940
|
getHostInfo() {
|
|
@@ -1938,7 +1948,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1938
1948
|
// storage: localStorage,
|
|
1939
1949
|
// pick: ['hostInfo'],
|
|
1940
1950
|
// },
|
|
1941
|
-
}),
|
|
1951
|
+
}), is = ce("settingInfo", {
|
|
1942
1952
|
state: () => ({
|
|
1943
1953
|
fullscreen: !1,
|
|
1944
1954
|
menuCollapse: !1,
|
|
@@ -1980,7 +1990,7 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1980
1990
|
}
|
|
1981
1991
|
},
|
|
1982
1992
|
persist: !1
|
|
1983
|
-
}),
|
|
1993
|
+
}), ls = /* @__PURE__ */ Z({
|
|
1984
1994
|
__name: "index",
|
|
1985
1995
|
props: {
|
|
1986
1996
|
...pe,
|
|
@@ -1990,6 +2000,10 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1990
2000
|
data: {
|
|
1991
2001
|
type: Array,
|
|
1992
2002
|
required: !0
|
|
2003
|
+
},
|
|
2004
|
+
size: {
|
|
2005
|
+
type: String,
|
|
2006
|
+
default: "default"
|
|
1993
2007
|
}
|
|
1994
2008
|
},
|
|
1995
2009
|
emits: ["change"],
|
|
@@ -1997,42 +2011,50 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
1997
2011
|
const t = e, s = X(), n = me(t.url, t), o = t.optionCtrl ?? n.optionCtrl;
|
|
1998
2012
|
o.inputFactory = J(s);
|
|
1999
2013
|
const r = c([]);
|
|
2000
|
-
o &&
|
|
2014
|
+
o && y(
|
|
2001
2015
|
() => o.options.value,
|
|
2002
2016
|
(p) => {
|
|
2003
2017
|
r.value = p || [];
|
|
2004
2018
|
},
|
|
2005
2019
|
{ immediate: !0, deep: !0 }
|
|
2006
2020
|
);
|
|
2007
|
-
const l = a, { editorCtrl: u, errInfo: i } = X(), f = (
|
|
2021
|
+
const l = a, { editorCtrl: u, errInfo: i } = X(), f = St(() => {
|
|
2022
|
+
switch (t.size) {
|
|
2023
|
+
case "small":
|
|
2024
|
+
return "w-[46px]";
|
|
2025
|
+
default:
|
|
2026
|
+
return "w-[58px]";
|
|
2027
|
+
}
|
|
2028
|
+
}), d = (p) => {
|
|
2008
2029
|
i != null && i.value.errClass && u && de(u), l("change", p);
|
|
2009
2030
|
};
|
|
2010
2031
|
return Ie(() => {
|
|
2011
2032
|
if (!t.data || t.data.length != 2) {
|
|
2012
|
-
console.error("Switch组件: ", t.data),
|
|
2033
|
+
console.error("Switch组件: ", t.data), x.error("Switch组件必须有且只有两个选项");
|
|
2013
2034
|
return;
|
|
2014
2035
|
}
|
|
2015
2036
|
o && ee(o.autoload, o, t);
|
|
2016
2037
|
}), le(() => {
|
|
2017
2038
|
o && he(o, t);
|
|
2018
|
-
}), (p,
|
|
2019
|
-
var
|
|
2020
|
-
return r.value.length === 2 ? (
|
|
2039
|
+
}), (p, m) => {
|
|
2040
|
+
var I;
|
|
2041
|
+
return r.value.length === 2 ? (O(), Ae(b(It), ue({
|
|
2021
2042
|
key: 0,
|
|
2043
|
+
size: e.size,
|
|
2022
2044
|
class: [
|
|
2023
|
-
((
|
|
2045
|
+
((I = b(i)) == null ? void 0 : I.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
|
|
2024
2046
|
"bg-blue-300",
|
|
2025
|
-
|
|
2047
|
+
f.value
|
|
2026
2048
|
],
|
|
2027
2049
|
checkedChildren: r.value[0].label,
|
|
2028
2050
|
checkedValue: r.value[0].value,
|
|
2029
2051
|
unCheckedChildren: r.value[1].label,
|
|
2030
2052
|
unCheckedValue: r.value[1].value,
|
|
2031
|
-
onChange:
|
|
2032
|
-
}, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) :
|
|
2053
|
+
onChange: d
|
|
2054
|
+
}, p.$attrs), null, 16, ["size", "class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : W("", !0);
|
|
2033
2055
|
};
|
|
2034
2056
|
}
|
|
2035
|
-
}),
|
|
2057
|
+
}), us = /* @__PURE__ */ Z({
|
|
2036
2058
|
inheritAttrs: !1,
|
|
2037
2059
|
__name: "index",
|
|
2038
2060
|
props: {
|
|
@@ -2060,62 +2082,62 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2060
2082
|
...r == null ? void 0 : r.fieldMap
|
|
2061
2083
|
};
|
|
2062
2084
|
const l = c(void 0);
|
|
2063
|
-
|
|
2085
|
+
y(
|
|
2064
2086
|
() => t.value,
|
|
2065
2087
|
() => {
|
|
2066
2088
|
l.value = t.value;
|
|
2067
2089
|
},
|
|
2068
2090
|
{ immediate: !0 }
|
|
2069
|
-
),
|
|
2091
|
+
), y(
|
|
2070
2092
|
() => l.value,
|
|
2071
|
-
(
|
|
2072
|
-
t.autoClean && t.formData && t.outFields &&
|
|
2093
|
+
(g) => {
|
|
2094
|
+
t.autoClean && t.formData && t.outFields && g !== t.value && ft(t.formData, t.outFields, null);
|
|
2073
2095
|
}
|
|
2074
2096
|
);
|
|
2075
|
-
const { editorCtrl: u, errInfo: i, labelText: f } = n,
|
|
2076
|
-
n.inputEmit =
|
|
2077
|
-
const
|
|
2078
|
-
r &&
|
|
2097
|
+
const { editorCtrl: u, errInfo: i, labelText: f } = n, d = a;
|
|
2098
|
+
n.inputEmit = d;
|
|
2099
|
+
const p = c((r == null ? void 0 : r.options.value) || []);
|
|
2100
|
+
r && y(
|
|
2079
2101
|
() => r.options.value,
|
|
2080
|
-
(
|
|
2081
|
-
|
|
2102
|
+
(g) => {
|
|
2103
|
+
p.value = g || [];
|
|
2082
2104
|
},
|
|
2083
2105
|
{ immediate: !0, deep: !0 }
|
|
2084
2106
|
);
|
|
2085
|
-
const
|
|
2086
|
-
if (
|
|
2107
|
+
const m = (g) => {
|
|
2108
|
+
if (p.value = [], g === "") return;
|
|
2087
2109
|
let h = {
|
|
2088
2110
|
Query: {
|
|
2089
|
-
SearchField: "%" +
|
|
2111
|
+
SearchField: "%" + g.trim() + "%"
|
|
2090
2112
|
}
|
|
2091
2113
|
};
|
|
2092
2114
|
r.params = fe(r.params, h), r && ee(!0, r, t);
|
|
2093
|
-
},
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2096
|
-
const h = ke(
|
|
2097
|
-
|
|
2115
|
+
}, I = (g) => {
|
|
2116
|
+
const w = Le(r, t, g);
|
|
2117
|
+
d("update:value", g), d("select", g);
|
|
2118
|
+
const h = ke(w);
|
|
2119
|
+
d("update:labels", h), i != null && i.value.errClass && u && de(u);
|
|
2098
2120
|
};
|
|
2099
2121
|
return xe(() => {
|
|
2100
2122
|
r && r.autoload && (r.reload.value = !0);
|
|
2101
2123
|
}), le(() => {
|
|
2102
2124
|
r && he(r, t);
|
|
2103
|
-
}), (
|
|
2125
|
+
}), (g, w) => {
|
|
2104
2126
|
var h;
|
|
2105
|
-
return
|
|
2106
|
-
C(b(
|
|
2127
|
+
return O(), $("div", null, [
|
|
2128
|
+
C(b(At), ue({
|
|
2107
2129
|
value: l.value,
|
|
2108
|
-
"onUpdate:value":
|
|
2130
|
+
"onUpdate:value": w[0] || (w[0] = (A) => l.value = A),
|
|
2109
2131
|
class: ["w-full", (h = b(i)) == null ? void 0 : h.errClass],
|
|
2110
|
-
options:
|
|
2111
|
-
onSearch:
|
|
2112
|
-
onSelect:
|
|
2132
|
+
options: p.value,
|
|
2133
|
+
onSearch: m,
|
|
2134
|
+
onSelect: I
|
|
2113
2135
|
}, b(s), { "allow-clear": !1 }), {
|
|
2114
|
-
option: Q(({ label:
|
|
2115
|
-
we(Y(
|
|
2136
|
+
option: Q(({ label: A }) => [
|
|
2137
|
+
we(Y(A), 1)
|
|
2116
2138
|
]),
|
|
2117
2139
|
default: Q(() => [
|
|
2118
|
-
C(b(
|
|
2140
|
+
C(b(Et), {
|
|
2119
2141
|
"allow-clear": "",
|
|
2120
2142
|
placeholder: "请输入并选择" + b(f)
|
|
2121
2143
|
}, null, 8, ["placeholder"])
|
|
@@ -2125,10 +2147,10 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2125
2147
|
]);
|
|
2126
2148
|
};
|
|
2127
2149
|
}
|
|
2128
|
-
}),
|
|
2150
|
+
}), ya = { class: "min-h-[32px] pt-[5px]" }, Sa = {
|
|
2129
2151
|
key: 1,
|
|
2130
2152
|
class: "text-center text-gray-500"
|
|
2131
|
-
},
|
|
2153
|
+
}, cs = /* @__PURE__ */ Z({
|
|
2132
2154
|
inheritAttrs: !1,
|
|
2133
2155
|
__name: "index",
|
|
2134
2156
|
props: {
|
|
@@ -2149,28 +2171,28 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2149
2171
|
},
|
|
2150
2172
|
emits: ["change", "update:labels"],
|
|
2151
2173
|
setup(e, { emit: a }) {
|
|
2152
|
-
var
|
|
2174
|
+
var p, m, I;
|
|
2153
2175
|
const t = e, s = Ee(), n = X(), o = me(t.url, t), r = t.optionCtrl ?? o.optionCtrl;
|
|
2154
2176
|
r.inputFactory = J(n);
|
|
2155
2177
|
const l = c({
|
|
2156
2178
|
...r == null ? void 0 : r.url,
|
|
2157
|
-
url: ((
|
|
2158
|
-
fieldMap: (r == null ? void 0 : r.fieldMap) || ((
|
|
2159
|
-
params: (r == null ? void 0 : r.params) || ((
|
|
2179
|
+
url: ((p = r == null ? void 0 : r.url) == null ? void 0 : p.url) || "",
|
|
2180
|
+
fieldMap: (r == null ? void 0 : r.fieldMap) || ((m = r == null ? void 0 : r.url) == null ? void 0 : m.fieldMap),
|
|
2181
|
+
params: (r == null ? void 0 : r.params) || ((I = r == null ? void 0 : r.url) == null ? void 0 : I.params),
|
|
2160
2182
|
loadingText: !1
|
|
2161
2183
|
}), { errInfo: u } = n, i = a;
|
|
2162
2184
|
n.inputEmit = i;
|
|
2163
2185
|
const f = c((r == null ? void 0 : r.options.value) || []);
|
|
2164
|
-
r &&
|
|
2186
|
+
r && y(
|
|
2165
2187
|
() => r.options.value,
|
|
2166
|
-
(
|
|
2167
|
-
f.value =
|
|
2188
|
+
(g) => {
|
|
2189
|
+
f.value = g || [];
|
|
2168
2190
|
},
|
|
2169
2191
|
{ immediate: !0, deep: !0 }
|
|
2170
2192
|
);
|
|
2171
|
-
const
|
|
2172
|
-
const h = Le(r, t,
|
|
2173
|
-
i("update:labels",
|
|
2193
|
+
const d = (g) => {
|
|
2194
|
+
const h = Le(r, t, g), A = ke(h);
|
|
2195
|
+
i("update:labels", A);
|
|
2174
2196
|
};
|
|
2175
2197
|
return xe(() => {
|
|
2176
2198
|
r && r.autoload && (r.reload.value = !0);
|
|
@@ -2183,20 +2205,20 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2183
2205
|
}), r && ee(r.autoload, r, t);
|
|
2184
2206
|
}), le(() => {
|
|
2185
2207
|
r && he(r, t);
|
|
2186
|
-
}), (
|
|
2187
|
-
C(b(
|
|
2188
|
-
onChange:
|
|
2208
|
+
}), (g, w) => (O(), $("div", ya, [
|
|
2209
|
+
C(b(xt), ue({
|
|
2210
|
+
onChange: d,
|
|
2189
2211
|
class: "w-full mb-[-3px]"
|
|
2190
2212
|
}, b(s)), {
|
|
2191
2213
|
default: Q(() => [
|
|
2192
|
-
f.value.length > 0 ? (
|
|
2193
|
-
var
|
|
2194
|
-
return
|
|
2214
|
+
f.value.length > 0 ? (O(!0), $(oe, { key: 0 }, He(f.value, (h) => {
|
|
2215
|
+
var A;
|
|
2216
|
+
return O(), Ae(b(wt), {
|
|
2195
2217
|
key: h.value,
|
|
2196
2218
|
value: h.value,
|
|
2197
2219
|
disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
|
|
2198
2220
|
class: tt([
|
|
2199
|
-
((
|
|
2221
|
+
((A = b(u)) == null ? void 0 : A.errClass) === "error" ? "error !text-red-400" : "",
|
|
2200
2222
|
"text-nowrap",
|
|
2201
2223
|
"pb-1",
|
|
2202
2224
|
e.wrap ? `w-1/${t.wrap}` : ""
|
|
@@ -2207,16 +2229,16 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2207
2229
|
]),
|
|
2208
2230
|
_: 2
|
|
2209
2231
|
}, 1032, ["value", "disabled", "class"]);
|
|
2210
|
-
}), 128)) : e.nodata ? (
|
|
2232
|
+
}), 128)) : e.nodata ? (O(), $("div", Sa, Y(e.nodata), 1)) : W("", !0)
|
|
2211
2233
|
]),
|
|
2212
2234
|
_: 1
|
|
2213
2235
|
}, 16)
|
|
2214
2236
|
]));
|
|
2215
2237
|
}
|
|
2216
|
-
}),
|
|
2238
|
+
}), ba = { class: "min-h-[32px] pt-1" }, Ia = {
|
|
2217
2239
|
key: 1,
|
|
2218
2240
|
class: "text-center text-gray-500"
|
|
2219
|
-
},
|
|
2241
|
+
}, fs = /* @__PURE__ */ Z({
|
|
2220
2242
|
inheritAttrs: !1,
|
|
2221
2243
|
__name: "index",
|
|
2222
2244
|
props: {
|
|
@@ -2238,42 +2260,42 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2238
2260
|
},
|
|
2239
2261
|
emits: ["change", "update:value", "update:labels"],
|
|
2240
2262
|
setup(e, { emit: a }) {
|
|
2241
|
-
var
|
|
2263
|
+
var I, g, w;
|
|
2242
2264
|
const t = e, s = Ee(), n = X(), o = me(t.url, t), r = t.optionCtrl ?? o.optionCtrl;
|
|
2243
2265
|
r.inputFactory = J(n);
|
|
2244
2266
|
const l = c({
|
|
2245
2267
|
...r == null ? void 0 : r.url,
|
|
2246
|
-
url: ((
|
|
2247
|
-
fieldMap: (r == null ? void 0 : r.fieldMap) || ((
|
|
2248
|
-
params: (r == null ? void 0 : r.params) || ((
|
|
2268
|
+
url: ((I = r == null ? void 0 : r.url) == null ? void 0 : I.url) || "",
|
|
2269
|
+
fieldMap: (r == null ? void 0 : r.fieldMap) || ((g = r == null ? void 0 : r.url) == null ? void 0 : g.fieldMap),
|
|
2270
|
+
params: (r == null ? void 0 : r.params) || ((w = r == null ? void 0 : r.url) == null ? void 0 : w.params),
|
|
2249
2271
|
loadingText: !1
|
|
2250
|
-
}), u = c(t.value), { errInfo: i } = n, f = c((r == null ? void 0 : r.options.value) || []),
|
|
2251
|
-
n.inputEmit =
|
|
2272
|
+
}), u = c(t.value), { errInfo: i } = n, f = c((r == null ? void 0 : r.options.value) || []), d = a;
|
|
2273
|
+
n.inputEmit = d, r && y(
|
|
2252
2274
|
() => r.options.value,
|
|
2253
2275
|
(h) => {
|
|
2254
2276
|
f.value = h || [];
|
|
2255
2277
|
},
|
|
2256
2278
|
{ immediate: !0, deep: !0 }
|
|
2257
|
-
),
|
|
2279
|
+
), y(
|
|
2258
2280
|
() => t.value,
|
|
2259
2281
|
(h) => {
|
|
2260
2282
|
u.value = h;
|
|
2261
2283
|
}
|
|
2262
|
-
),
|
|
2284
|
+
), y(
|
|
2263
2285
|
() => u.value,
|
|
2264
2286
|
(h) => {
|
|
2265
|
-
|
|
2287
|
+
d("update:value", h);
|
|
2266
2288
|
}
|
|
2267
2289
|
);
|
|
2268
|
-
const
|
|
2269
|
-
if (typeof h == "object" && typeof
|
|
2270
|
-
const
|
|
2271
|
-
return
|
|
2290
|
+
const p = (h, A) => {
|
|
2291
|
+
if (typeof h == "object" && typeof A == "object") {
|
|
2292
|
+
const T = JSON.stringify(h) === JSON.stringify(A);
|
|
2293
|
+
return T && (u.value = h), T;
|
|
2272
2294
|
}
|
|
2273
|
-
return h ===
|
|
2274
|
-
},
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2295
|
+
return h === A;
|
|
2296
|
+
}, m = (h) => {
|
|
2297
|
+
const A = h.target.value, T = Le(r, t, A), q = ke(T);
|
|
2298
|
+
d("update:labels", q);
|
|
2277
2299
|
};
|
|
2278
2300
|
return xe(() => {
|
|
2279
2301
|
r && r.autoload && (r.reload.value = !0);
|
|
@@ -2285,24 +2307,24 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2285
2307
|
}), r && ee(r.autoload, r, t);
|
|
2286
2308
|
}), le(() => {
|
|
2287
2309
|
r && he(r, t);
|
|
2288
|
-
}), (h,
|
|
2289
|
-
C(b(
|
|
2310
|
+
}), (h, A) => (O(), $("div", ba, [
|
|
2311
|
+
C(b(Rt), ue({
|
|
2290
2312
|
value: u.value,
|
|
2291
|
-
"onUpdate:value":
|
|
2313
|
+
"onUpdate:value": A[0] || (A[0] = (T) => u.value = T),
|
|
2292
2314
|
autocheck: !1,
|
|
2293
|
-
onChange:
|
|
2315
|
+
onChange: m,
|
|
2294
2316
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
2295
2317
|
}, b(s)), {
|
|
2296
2318
|
default: Q(() => [
|
|
2297
|
-
f.value.length > 0 ? (
|
|
2319
|
+
f.value.length > 0 ? (O(!0), $(oe, { key: 0 }, He(f.value, (T) => {
|
|
2298
2320
|
var q;
|
|
2299
|
-
return
|
|
2300
|
-
key:
|
|
2321
|
+
return O(), $(oe, {
|
|
2322
|
+
key: T.value
|
|
2301
2323
|
}, [
|
|
2302
|
-
|
|
2324
|
+
T.visible !== !1 ? (O(), Ae(b(Ot), {
|
|
2303
2325
|
key: 0,
|
|
2304
|
-
checked:
|
|
2305
|
-
value:
|
|
2326
|
+
checked: p(T.value, t.value),
|
|
2327
|
+
value: T.value,
|
|
2306
2328
|
class: tt([
|
|
2307
2329
|
((q = b(i)) == null ? void 0 : q.errClass) === "error" ? "error !text-red-400" : "",
|
|
2308
2330
|
"text-nowrap",
|
|
@@ -2311,21 +2333,21 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2311
2333
|
])
|
|
2312
2334
|
}, {
|
|
2313
2335
|
default: Q(() => [
|
|
2314
|
-
we(Y(
|
|
2336
|
+
we(Y(T.label), 1)
|
|
2315
2337
|
]),
|
|
2316
2338
|
_: 2
|
|
2317
|
-
}, 1032, ["checked", "value", "class"])) :
|
|
2339
|
+
}, 1032, ["checked", "value", "class"])) : W("", !0)
|
|
2318
2340
|
], 64);
|
|
2319
|
-
}), 128)) : e.nodata ? (
|
|
2341
|
+
}), 128)) : e.nodata ? (O(), $("div", Ia, Y(e.nodata), 1)) : W("", !0)
|
|
2320
2342
|
]),
|
|
2321
2343
|
_: 1
|
|
2322
2344
|
}, 16, ["value"])
|
|
2323
2345
|
]));
|
|
2324
2346
|
}
|
|
2325
|
-
}),
|
|
2347
|
+
}), Aa = {
|
|
2326
2348
|
key: 0,
|
|
2327
2349
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
2328
|
-
},
|
|
2350
|
+
}, ps = /* @__PURE__ */ Z({
|
|
2329
2351
|
inheritAttrs: !1,
|
|
2330
2352
|
__name: "index",
|
|
2331
2353
|
props: {
|
|
@@ -2360,111 +2382,111 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2360
2382
|
},
|
|
2361
2383
|
emits: ["change", "update:value", "update:label", "update:labels"],
|
|
2362
2384
|
setup(e, { emit: a }) {
|
|
2363
|
-
var
|
|
2385
|
+
var A, T, q;
|
|
2364
2386
|
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
2387
|
i.inputFactory = J(n);
|
|
2366
|
-
const f = Ee(),
|
|
2388
|
+
const f = Ee(), d = c({
|
|
2367
2389
|
...i == null ? void 0 : i.url,
|
|
2368
|
-
url: ((
|
|
2369
|
-
fieldMap: (i == null ? void 0 : i.fieldMap) || ((
|
|
2390
|
+
url: ((A = i == null ? void 0 : i.url) == null ? void 0 : A.url) || "",
|
|
2391
|
+
fieldMap: (i == null ? void 0 : i.fieldMap) || ((T = i == null ? void 0 : i.url) == null ? void 0 : T.fieldMap),
|
|
2370
2392
|
params: (i == null ? void 0 : i.params) || ((q = i == null ? void 0 : i.url) == null ? void 0 : q.params),
|
|
2371
2393
|
loadingText: !1
|
|
2372
|
-
}),
|
|
2373
|
-
n.inputEmit =
|
|
2374
|
-
const
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
},
|
|
2378
|
-
if (
|
|
2379
|
-
for (let
|
|
2380
|
-
const D =
|
|
2394
|
+
}), p = c(f.placeholder), m = c(i == null ? void 0 : i.selected.value), I = a;
|
|
2395
|
+
n.inputEmit = I;
|
|
2396
|
+
const g = (v) => {
|
|
2397
|
+
const L = Le(i, t, v), D = ke(L);
|
|
2398
|
+
m.value = v, I("update:labels", D), I("update:label", D.join(";")), I("change", v, L), r != null && r.value.errClass && o && de(o);
|
|
2399
|
+
}, w = c((i == null ? void 0 : i.options.value) || []), h = (v) => {
|
|
2400
|
+
if (v.length > 0 && F(t.value) && t.selectFirst)
|
|
2401
|
+
for (let L = 0; L < v.length; L++) {
|
|
2402
|
+
const D = v[L];
|
|
2381
2403
|
if (D.disabled === void 0 || D.disabled === !1) {
|
|
2382
|
-
|
|
2404
|
+
m.value = D.value;
|
|
2383
2405
|
break;
|
|
2384
2406
|
}
|
|
2385
2407
|
}
|
|
2386
|
-
else
|
|
2387
|
-
|
|
2408
|
+
else v.length > 0 && (m.value = t.value === null ? void 0 : t.value);
|
|
2409
|
+
v.length > 0 && m.value !== void 0 && g(m.value);
|
|
2388
2410
|
};
|
|
2389
|
-
return i && (
|
|
2411
|
+
return i && (y(
|
|
2390
2412
|
() => i.options.value,
|
|
2391
|
-
(
|
|
2392
|
-
|
|
2413
|
+
(v) => {
|
|
2414
|
+
w.value = v || [];
|
|
2393
2415
|
},
|
|
2394
2416
|
{ immediate: !0, deep: !0 }
|
|
2395
|
-
),
|
|
2417
|
+
), y(
|
|
2396
2418
|
() => i.selected.value,
|
|
2397
|
-
(
|
|
2398
|
-
|
|
2419
|
+
(v) => {
|
|
2420
|
+
m.value = v;
|
|
2399
2421
|
}
|
|
2400
|
-
)),
|
|
2401
|
-
() =>
|
|
2402
|
-
(
|
|
2403
|
-
h(
|
|
2422
|
+
)), y(
|
|
2423
|
+
() => w.value,
|
|
2424
|
+
(v) => {
|
|
2425
|
+
h(v);
|
|
2404
2426
|
}
|
|
2405
|
-
),
|
|
2406
|
-
() =>
|
|
2407
|
-
(
|
|
2408
|
-
|
|
2427
|
+
), y(
|
|
2428
|
+
() => d.value.loading,
|
|
2429
|
+
(v) => {
|
|
2430
|
+
v ? p.value = "" : p.value || (p.value = "请选择" + l.value);
|
|
2409
2431
|
},
|
|
2410
2432
|
{ immediate: !0 }
|
|
2411
|
-
),
|
|
2433
|
+
), y(
|
|
2412
2434
|
() => t.value,
|
|
2413
|
-
(
|
|
2414
|
-
|
|
2435
|
+
(v) => {
|
|
2436
|
+
m.value = v;
|
|
2415
2437
|
},
|
|
2416
2438
|
{ immediate: !0 }
|
|
2417
|
-
),
|
|
2418
|
-
() =>
|
|
2419
|
-
(
|
|
2420
|
-
const
|
|
2421
|
-
i && (i.selected.value =
|
|
2439
|
+
), y(
|
|
2440
|
+
() => m.value,
|
|
2441
|
+
(v) => {
|
|
2442
|
+
const L = v === void 0 ? s ? void 0 : null : v;
|
|
2443
|
+
i && (i.selected.value = L), I("update:value", L);
|
|
2422
2444
|
}
|
|
2423
2445
|
), xe(() => {
|
|
2424
2446
|
i && i.autoload && (i.reload.value = !0);
|
|
2425
2447
|
}), Ie(() => {
|
|
2426
|
-
if (
|
|
2448
|
+
if (d.value && !d.value.fieldMap && (d.value.fieldMap = {
|
|
2427
2449
|
label: "Name",
|
|
2428
2450
|
value: "Id",
|
|
2429
2451
|
key: "Id"
|
|
2430
2452
|
}), t.dataKey) {
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2453
|
+
const v = JSON.parse(JSON.stringify(_.getOptions(t.dataKey)));
|
|
2454
|
+
w.value = v, h(v);
|
|
2433
2455
|
} else if (i) {
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2456
|
+
const v = i.options.value || [];
|
|
2457
|
+
v.length > 0 ? (w.value = v, h(v)) : ee(i.autoload, i, t);
|
|
2436
2458
|
}
|
|
2437
2459
|
}), le(() => {
|
|
2438
2460
|
i && he(i, t);
|
|
2439
|
-
}), (
|
|
2440
|
-
var D,
|
|
2441
|
-
return
|
|
2442
|
-
(
|
|
2461
|
+
}), (v, L) => {
|
|
2462
|
+
var D, ze, Be;
|
|
2463
|
+
return O(), $("div", null, [
|
|
2464
|
+
(ze = (D = b(i)) == null ? void 0 : D.url) != null && ze.loading ? (O(), $("div", Aa, [
|
|
2443
2465
|
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":
|
|
2466
|
+
L[1] || (L[1] = bt("span", null, "数据加载中...", -1))
|
|
2467
|
+
])) : W("", !0),
|
|
2468
|
+
C(b(Tt), ue({
|
|
2469
|
+
class: [(Be = b(r)) == null ? void 0 : Be.errClass, "w-full"],
|
|
2470
|
+
value: m.value,
|
|
2471
|
+
"onUpdate:value": L[0] || (L[0] = (z) => m.value = z),
|
|
2450
2472
|
"allow-clear": !0,
|
|
2451
|
-
onChange:
|
|
2452
|
-
placeholder:
|
|
2473
|
+
onChange: g,
|
|
2474
|
+
placeholder: p.value,
|
|
2453
2475
|
"label-in-value": !1
|
|
2454
2476
|
}, b(f)), {
|
|
2455
2477
|
default: Q(() => [
|
|
2456
|
-
(
|
|
2457
|
-
key:
|
|
2478
|
+
(O(!0), $(oe, null, He(w.value, (z) => (O(), $(oe, {
|
|
2479
|
+
key: z.value
|
|
2458
2480
|
}, [
|
|
2459
|
-
|
|
2481
|
+
z.visible !== !1 ? (O(), Ae(b(Pt), {
|
|
2460
2482
|
key: 0,
|
|
2461
|
-
value:
|
|
2483
|
+
value: z.value
|
|
2462
2484
|
}, {
|
|
2463
2485
|
default: Q(() => [
|
|
2464
|
-
we(Y(
|
|
2486
|
+
we(Y(z.label), 1)
|
|
2465
2487
|
]),
|
|
2466
2488
|
_: 2
|
|
2467
|
-
}, 1032, ["value"])) :
|
|
2489
|
+
}, 1032, ["value"])) : W("", !0)
|
|
2468
2490
|
], 64))), 128))
|
|
2469
2491
|
]),
|
|
2470
2492
|
_: 1
|
|
@@ -2472,13 +2494,13 @@ const W = new sa(), ee = (e, a, t) => {
|
|
|
2472
2494
|
]);
|
|
2473
2495
|
};
|
|
2474
2496
|
}
|
|
2475
|
-
}),
|
|
2497
|
+
}), Ea = c(!1), ds = {
|
|
2476
2498
|
label: "模板管理",
|
|
2477
2499
|
key: "uploadTemp",
|
|
2478
2500
|
type: "primary",
|
|
2479
2501
|
icon: "icon-download",
|
|
2480
2502
|
click: () => {
|
|
2481
|
-
|
|
2503
|
+
Ea.value = !0;
|
|
2482
2504
|
}
|
|
2483
2505
|
};
|
|
2484
2506
|
export {
|
|
@@ -2486,74 +2508,74 @@ export {
|
|
|
2486
2508
|
Le as A,
|
|
2487
2509
|
ke as B,
|
|
2488
2510
|
de as C,
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2511
|
+
cs as D,
|
|
2512
|
+
fs as E,
|
|
2513
|
+
ps as F,
|
|
2492
2514
|
Je as G,
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2515
|
+
Dt as H,
|
|
2516
|
+
Xa as I,
|
|
2517
|
+
la as J,
|
|
2518
|
+
ua as K,
|
|
2497
2519
|
Oe as L,
|
|
2498
2520
|
re as M,
|
|
2499
|
-
|
|
2500
|
-
|
|
2521
|
+
Za as N,
|
|
2522
|
+
_ as O,
|
|
2501
2523
|
U as P,
|
|
2502
|
-
|
|
2503
|
-
|
|
2524
|
+
es as Q,
|
|
2525
|
+
ia as R,
|
|
2504
2526
|
ft as S,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2527
|
+
ts as T,
|
|
2528
|
+
ss as U,
|
|
2529
|
+
ma as V,
|
|
2530
|
+
va as W,
|
|
2531
|
+
ns as X,
|
|
2510
2532
|
Ze as Y,
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2533
|
+
rs as Z,
|
|
2534
|
+
ls as _,
|
|
2535
|
+
is as a,
|
|
2536
|
+
qa as a0,
|
|
2515
2537
|
it as a1,
|
|
2516
|
-
|
|
2517
|
-
|
|
2538
|
+
Da as a2,
|
|
2539
|
+
Ha as a3,
|
|
2518
2540
|
qe as a4,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2541
|
+
Ua as a5,
|
|
2542
|
+
za as a6,
|
|
2543
|
+
sa as a7,
|
|
2522
2544
|
ut as a8,
|
|
2523
2545
|
Wa as a9,
|
|
2524
2546
|
_a as aa,
|
|
2525
2547
|
rt as ab,
|
|
2526
|
-
|
|
2548
|
+
Ct as ac,
|
|
2527
2549
|
De as ad,
|
|
2528
|
-
|
|
2550
|
+
B as ae,
|
|
2529
2551
|
ne as af,
|
|
2530
2552
|
ye as ag,
|
|
2531
2553
|
K as ah,
|
|
2532
|
-
|
|
2554
|
+
os as ai,
|
|
2533
2555
|
Ke as aj,
|
|
2534
|
-
|
|
2535
|
-
|
|
2556
|
+
Ea as ak,
|
|
2557
|
+
ds as al,
|
|
2536
2558
|
ie as am,
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2559
|
+
Qa as b,
|
|
2560
|
+
as as c,
|
|
2561
|
+
Ja as d,
|
|
2562
|
+
Va as e,
|
|
2563
|
+
Ca as f,
|
|
2564
|
+
ta as g,
|
|
2565
|
+
Ya as h,
|
|
2544
2566
|
F as i,
|
|
2545
|
-
|
|
2546
|
-
|
|
2567
|
+
ja as j,
|
|
2568
|
+
Ga as k,
|
|
2547
2569
|
lt as l,
|
|
2548
|
-
|
|
2570
|
+
aa as m,
|
|
2549
2571
|
Ba as n,
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2572
|
+
Ka as o,
|
|
2573
|
+
Xt as p,
|
|
2574
|
+
Yt as q,
|
|
2553
2575
|
Re as r,
|
|
2554
|
-
|
|
2576
|
+
us as s,
|
|
2555
2577
|
pe as t,
|
|
2556
|
-
|
|
2578
|
+
N as u,
|
|
2557
2579
|
X as v,
|
|
2558
2580
|
me as w,
|
|
2559
2581
|
ee as x,
|