@skyfox2000/webui 1.4.14 → 1.4.16
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-BtJNPMBy.js → baseLayout-DQQ-vZCD.js} +3 -3
- package/lib/assets/modules/{file-upload-CYNi1NsW.js → file-upload-Dc61Tbof.js} +1 -1
- package/lib/assets/modules/{index-BOOirPG2.js → index-CX7vtghj.js} +1 -1
- package/lib/assets/modules/{index-DWnhNqJu.js → index-DrGkF0qX.js} +2 -2
- package/lib/assets/modules/{index-Cj6QnoC7.js → index-Dz624mC-.js} +2 -2
- package/lib/assets/modules/{menuTabs-DDGkYuvg.js → menuTabs-BwAVx2tx.js} +2 -2
- package/lib/assets/modules/{toolIcon-DXQt60Ya.js → toolIcon-B2btIpdL.js} +1 -1
- package/lib/assets/modules/{upload-template-CaeUt6VI.js → upload-template-BqG06zPn.js} +318 -310
- package/lib/assets/modules/{uploadList-D0jw6jNr.js → uploadList-DlbvQOtR.js} +4 -4
- package/lib/components/content/search/index.vue.d.ts +5 -3
- 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 +4 -4
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +693 -683
- package/package.json +1 -1
- package/src/components/content/search/index.vue +30 -24
- package/src/components/content/table/index.vue +1 -1
- package/src/components/form/autoComplete/index.vue +5 -1
- package/src/components/form/cascader/index.vue +8 -10
- package/src/components/form/checkbox/index.vue +8 -11
- package/src/components/form/radio/index.vue +9 -14
- package/src/components/form/select/index.vue +4 -1
- package/src/components/form/treeSelect/index.vue +5 -1
- package/src/utils/export-table.ts +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (e, a, t) =>
|
|
4
|
-
import { ref as c, h as H, nextTick as
|
|
5
|
-
import { Switch as
|
|
6
|
-
import { createPinia as
|
|
7
|
-
import
|
|
8
|
-
import { EnvConfig as be, AppAction as
|
|
9
|
-
import { httpPost as G, ResStatus as T, setToken as ve, fieldMapping as
|
|
1
|
+
var mt = Object.defineProperty;
|
|
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 k = (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, onMounted as Ie, onUnmounted as le, createBlock as Ae, createCommentVNode as z, openBlock as w, unref as S, 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 St, AutoComplete as It, Input as At, CheckboxGroup as Et, Checkbox as xt, RadioGroup as wt, Radio as Rt, Select as Ot, SelectOption as Tt } from "ant-design-vue";
|
|
6
|
+
import { createPinia as Pt, defineStore as ce } from "pinia";
|
|
7
|
+
import kt from "pinia-plugin-persistedstate";
|
|
8
|
+
import { EnvConfig as be, AppAction as ze, AppSource as Ce, isMicroApp as V, isBaseMicroApp as Lt, combineParams as fe } from "@skyfox2000/microbase";
|
|
9
|
+
import { httpPost as G, ResStatus as T, setToken as ve, fieldMapping as Mt, parseFieldTemplate as Se, API_HOST as Fe, SERVER_HOST as $t } from "@skyfox2000/fapi";
|
|
10
10
|
import E from "vue-m-message";
|
|
11
|
-
import { createRouter as
|
|
12
|
-
import
|
|
11
|
+
import { createRouter as Ft, createWebHashHistory as _t } from "vue-router";
|
|
12
|
+
import Ve from "async-validator";
|
|
13
13
|
import "dayjs";
|
|
14
14
|
import "vue-draggable-next";
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const Nt = Pt();
|
|
16
|
+
Nt.use(kt);
|
|
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
18
|
const L = class L {
|
|
19
19
|
};
|
|
@@ -173,18 +173,18 @@ const pe = {
|
|
|
173
173
|
type: Object,
|
|
174
174
|
required: !1
|
|
175
175
|
}
|
|
176
|
-
}, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1,
|
|
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 = [], Dt = (e) => {
|
|
177
177
|
for (const a of e) {
|
|
178
178
|
const t = ye.findIndex((s) => s.path === a.path);
|
|
179
|
-
t !== -1 && ye.splice(t, 1), ye.push(a),
|
|
179
|
+
t !== -1 && ye.splice(t, 1), ye.push(a), Re.addRoute(a);
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, at = (e, a, t, s = "") => {
|
|
182
182
|
const n = s + (s ? "/" : "") + e.path;
|
|
183
|
-
a[n] = { ...e, parent: t }, e.children && e.children.forEach((o) =>
|
|
184
|
-
},
|
|
185
|
-
history:
|
|
183
|
+
a[n] = { ...e, parent: t }, e.children && e.children.forEach((o) => at(o, a, e, n));
|
|
184
|
+
}, Re = Ft({
|
|
185
|
+
history: _t("/"),
|
|
186
186
|
routes: ye
|
|
187
|
-
}),
|
|
187
|
+
}), Ut = (e, a) => {
|
|
188
188
|
var n, o;
|
|
189
189
|
const t = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (o = e.meta) == null ? void 0 : o.permission;
|
|
190
190
|
if (!a)
|
|
@@ -202,10 +202,10 @@ const pe = {
|
|
|
202
202
|
}
|
|
203
203
|
return !1;
|
|
204
204
|
}, ne = c(null);
|
|
205
|
-
|
|
205
|
+
Re.beforeEach((e, a, t) => {
|
|
206
206
|
var l;
|
|
207
207
|
const s = e;
|
|
208
|
-
if (e.path.startsWith("/error/") || e.path.startsWith(
|
|
208
|
+
if (e.path.startsWith("/error/") || e.path.startsWith(Ye))
|
|
209
209
|
return t();
|
|
210
210
|
const n = s.meta, r = ((n == null ? void 0 : n.roles) ?? []).length > 0 || ((l = n == null ? void 0 : n.permission) == null ? void 0 : l.length);
|
|
211
211
|
if (e.path === "/") {
|
|
@@ -227,7 +227,7 @@ we.beforeEach((e, a, t) => {
|
|
|
227
227
|
else {
|
|
228
228
|
const u = _();
|
|
229
229
|
if (!u.isLogin)
|
|
230
|
-
t({ path:
|
|
230
|
+
t({ path: Ye });
|
|
231
231
|
else {
|
|
232
232
|
if (!K().menuLoaded) {
|
|
233
233
|
ne.value = {
|
|
@@ -236,24 +236,24 @@ we.beforeEach((e, a, t) => {
|
|
|
236
236
|
};
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
const f =
|
|
239
|
+
const f = Ut(s, u.isLogin);
|
|
240
240
|
t();
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
|
-
const
|
|
244
|
+
const Ht = (e) => {
|
|
245
245
|
if (ne.value) {
|
|
246
246
|
const { to: a, next: t } = ne.value;
|
|
247
247
|
ne.value = null, a.path === "/" ? t(e) : t(a.path);
|
|
248
248
|
}
|
|
249
|
-
},
|
|
250
|
-
const a =
|
|
249
|
+
}, Vt = (e) => {
|
|
250
|
+
const a = Ke();
|
|
251
251
|
if (a.TabEnabled) {
|
|
252
|
-
if (
|
|
252
|
+
if (Kt(e.key, a.TabPanes))
|
|
253
253
|
return;
|
|
254
254
|
a.TabPanes.push(e);
|
|
255
255
|
}
|
|
256
|
-
},
|
|
256
|
+
}, Kt = (e, a) => a.find((t) => t.key === e), Ke = ce("pageInfo", {
|
|
257
257
|
state: () => ({
|
|
258
258
|
TabActive: "",
|
|
259
259
|
TabPanes: [],
|
|
@@ -298,7 +298,7 @@ const Ut = (e) => {
|
|
|
298
298
|
// 默认为true
|
|
299
299
|
keepAlive: !(t.meta && !t.meta.keepAlive)
|
|
300
300
|
};
|
|
301
|
-
|
|
301
|
+
Vt(s), this.TabActive = e;
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
persist: !1
|
|
@@ -408,14 +408,14 @@ const re = {
|
|
|
408
408
|
userLogout: A.userLogout.bind(A),
|
|
409
409
|
mainAppPush: A.mainAppPush.bind(A),
|
|
410
410
|
isInMicroApp: A.isInMicroApp.bind(A)
|
|
411
|
-
},
|
|
411
|
+
}, Qt = {
|
|
412
412
|
appList: {
|
|
413
413
|
api: "PLATFORM_API",
|
|
414
414
|
authorize: !0,
|
|
415
415
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
416
416
|
loadingText: !1
|
|
417
417
|
}
|
|
418
|
-
},
|
|
418
|
+
}, _e = /* @__PURE__ */ new Map(), Jt = (e) => {
|
|
419
419
|
const a = _(), { roles: t, permission: s } = e.meta || {};
|
|
420
420
|
if (F(t) && F(s))
|
|
421
421
|
return !0;
|
|
@@ -426,17 +426,17 @@ const re = {
|
|
|
426
426
|
return F(t) || (n = a.hasRole(t)), a.isAdmin() ? n : (F(s) || (o = a.hasPermit(e.path, s)), n || o);
|
|
427
427
|
}
|
|
428
428
|
return !1;
|
|
429
|
-
},
|
|
429
|
+
}, st = (e) => e.map((a) => {
|
|
430
430
|
const t = { ...a };
|
|
431
|
-
return
|
|
432
|
-
}).filter(Boolean),
|
|
431
|
+
return Jt(t) ? (t.children && (t.children = st(t.children)), t) : null;
|
|
432
|
+
}).filter(Boolean), nt = (e, a = "") => {
|
|
433
433
|
for (const t of e) {
|
|
434
434
|
if (!t.children && !t.redirect) {
|
|
435
435
|
let s = a + t.path;
|
|
436
436
|
return s.startsWith("/") || (s = "/" + s), s;
|
|
437
437
|
}
|
|
438
438
|
if (t.children && t.children.length > 0 && t.path !== "/error" && t.path !== "/login" && t.path !== "/:page(.*)") {
|
|
439
|
-
const s =
|
|
439
|
+
const s = nt(t.children, a + t.path + "/");
|
|
440
440
|
if (s)
|
|
441
441
|
return s;
|
|
442
442
|
}
|
|
@@ -449,8 +449,8 @@ const re = {
|
|
|
449
449
|
AppCode: "",
|
|
450
450
|
Version: "",
|
|
451
451
|
Host: "",
|
|
452
|
-
Source:
|
|
453
|
-
Action:
|
|
452
|
+
Source: Ce.Manual,
|
|
453
|
+
Action: ze.App,
|
|
454
454
|
Path: "",
|
|
455
455
|
Icon: "",
|
|
456
456
|
Routes: [],
|
|
@@ -475,7 +475,7 @@ const re = {
|
|
|
475
475
|
});
|
|
476
476
|
},
|
|
477
477
|
async getRemoteAppList() {
|
|
478
|
-
return G(
|
|
478
|
+
return G(Qt.appList, {
|
|
479
479
|
Query: {
|
|
480
480
|
AppCode: this.appInfo.AppCode,
|
|
481
481
|
Enabled: 1
|
|
@@ -483,7 +483,7 @@ const re = {
|
|
|
483
483
|
}).then((e) => {
|
|
484
484
|
if ((e == null ? void 0 : e.status) === T.SUCCESS && e.data)
|
|
485
485
|
this.appList.length = 0, this.appList.push(...e.data);
|
|
486
|
-
else if ((e == null ? void 0 : e.errno) ==
|
|
486
|
+
else if ((e == null ? void 0 : e.errno) == Oe) {
|
|
487
487
|
_().logout(!1);
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
@@ -519,7 +519,7 @@ const re = {
|
|
|
519
519
|
flattenRoutes: {},
|
|
520
520
|
Routes: a ?? [],
|
|
521
521
|
defaultPage: ""
|
|
522
|
-
}), (!V() || !
|
|
522
|
+
}), (!V() || !Lt()) && (await _().getRolePermits(t.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
523
523
|
},
|
|
524
524
|
/**
|
|
525
525
|
* 设置当前应用路由信息
|
|
@@ -534,18 +534,18 @@ const re = {
|
|
|
534
534
|
};
|
|
535
535
|
const a = this.appInfo.flattenRoutes;
|
|
536
536
|
for (const t of e)
|
|
537
|
-
|
|
537
|
+
at(t, a, void 0);
|
|
538
538
|
if (Object.keys(a).forEach((t) => {
|
|
539
539
|
const s = a[t];
|
|
540
540
|
s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(t) : this.CachedComponents.push(t));
|
|
541
541
|
}), _().isLogin) {
|
|
542
|
-
const t =
|
|
543
|
-
if (
|
|
542
|
+
const t = st(this.appInfo.Routes);
|
|
543
|
+
if (Dt(t), this.appInfo.defaultPage = nt(t) || "", this.appInfo.defaultPage) {
|
|
544
544
|
if (this.menuLoaded = !0, V()) {
|
|
545
545
|
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
546
546
|
re.mainAppPush(s);
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
Ht(this.appInfo.defaultPage);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
},
|
|
@@ -563,8 +563,8 @@ const re = {
|
|
|
563
563
|
* @param path 路由地址
|
|
564
564
|
*/
|
|
565
565
|
push(e) {
|
|
566
|
-
this.findRoute(e) &&
|
|
567
|
-
if (
|
|
566
|
+
this.findRoute(e) && Ke().setTabActive(e), gt(() => {
|
|
567
|
+
if (Re.push({ path: e }), V()) {
|
|
568
568
|
const t = this.formatRoute(e);
|
|
569
569
|
re.mainAppPush(t);
|
|
570
570
|
}
|
|
@@ -585,7 +585,7 @@ const re = {
|
|
|
585
585
|
* @returns 组件实例
|
|
586
586
|
*/
|
|
587
587
|
cacheComponent(e, a) {
|
|
588
|
-
let t =
|
|
588
|
+
let t = _e.get(a.path);
|
|
589
589
|
if (!t)
|
|
590
590
|
if (this.CachedComponents.includes(a.path))
|
|
591
591
|
t = {
|
|
@@ -594,7 +594,7 @@ const re = {
|
|
|
594
594
|
render() {
|
|
595
595
|
return H(e);
|
|
596
596
|
}
|
|
597
|
-
},
|
|
597
|
+
}, _e.set(a.path, t);
|
|
598
598
|
else return e;
|
|
599
599
|
return t;
|
|
600
600
|
},
|
|
@@ -603,7 +603,7 @@ const re = {
|
|
|
603
603
|
* @param path 路由地址
|
|
604
604
|
*/
|
|
605
605
|
excludeComponent(e) {
|
|
606
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
606
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), _e.delete(e);
|
|
607
607
|
},
|
|
608
608
|
/**
|
|
609
609
|
* 路由路径层级查询,返回面包屑
|
|
@@ -623,8 +623,8 @@ const re = {
|
|
|
623
623
|
AppCode: "",
|
|
624
624
|
Version: "",
|
|
625
625
|
Host: "",
|
|
626
|
-
Source:
|
|
627
|
-
Action:
|
|
626
|
+
Source: Ce.Manual,
|
|
627
|
+
Action: ze.App,
|
|
628
628
|
Path: "",
|
|
629
629
|
Icon: "",
|
|
630
630
|
Routes: [],
|
|
@@ -638,7 +638,7 @@ const re = {
|
|
|
638
638
|
}
|
|
639
639
|
},
|
|
640
640
|
persist: !1
|
|
641
|
-
}),
|
|
641
|
+
}), qt = "Token解析失败", Oe = 1400, Qe = {
|
|
642
642
|
login: {
|
|
643
643
|
api: "PLATFORM_API",
|
|
644
644
|
url: "/openapi/LoginSrv/login",
|
|
@@ -656,41 +656,41 @@ const re = {
|
|
|
656
656
|
url: "/api/LoginSrv/logout",
|
|
657
657
|
loadingText: "正在退出..."
|
|
658
658
|
}
|
|
659
|
-
},
|
|
659
|
+
}, jt = (e) => {
|
|
660
660
|
let a = {
|
|
661
661
|
Option: {
|
|
662
662
|
Mode: "MicroApp"
|
|
663
663
|
},
|
|
664
664
|
Query: e
|
|
665
665
|
};
|
|
666
|
-
return G(
|
|
667
|
-
},
|
|
666
|
+
return G(Qe.login, a).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t : null);
|
|
667
|
+
}, Gt = (e) => {
|
|
668
668
|
let a = {
|
|
669
669
|
Query: {
|
|
670
670
|
AppId: e
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
|
-
return G(
|
|
673
|
+
return G(Qe.auth, a).then((t) => {
|
|
674
674
|
if ((t == null ? void 0 : t.status) === T.SUCCESS)
|
|
675
675
|
return t.data;
|
|
676
|
-
if ((t == null ? void 0 : t.errno) ==
|
|
676
|
+
if ((t == null ? void 0 : t.errno) == Oe) {
|
|
677
677
|
_().logout(!1);
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
680
|
return E.error("获取授权信息失败," + (t == null ? void 0 : t.msg)), null;
|
|
681
681
|
});
|
|
682
|
-
},
|
|
682
|
+
}, Bt = () => {
|
|
683
683
|
let e = {
|
|
684
684
|
Option: {},
|
|
685
685
|
Query: {}
|
|
686
686
|
};
|
|
687
|
-
return G(
|
|
688
|
-
},
|
|
687
|
+
return G(Qe.logout, e).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a.data : null);
|
|
688
|
+
}, Wt = (e) => {
|
|
689
689
|
try {
|
|
690
690
|
const a = JSON.parse(atob(e.token.split(".")[1]));
|
|
691
691
|
return a.user = JSON.parse(a.user), e.UserInfo = a.user, !0;
|
|
692
692
|
} catch (a) {
|
|
693
|
-
return console.error(
|
|
693
|
+
return console.error(qt, a), !1;
|
|
694
694
|
}
|
|
695
695
|
}, M = c(""), te = c(null), _ = ce("userInfo", {
|
|
696
696
|
state: () => ({
|
|
@@ -718,14 +718,14 @@ const re = {
|
|
|
718
718
|
* @returns
|
|
719
719
|
*/
|
|
720
720
|
async login(e, a) {
|
|
721
|
-
const t = await
|
|
721
|
+
const t = await jt(e);
|
|
722
722
|
if (t) {
|
|
723
723
|
const s = t;
|
|
724
724
|
if (s.errno)
|
|
725
725
|
return s;
|
|
726
726
|
{
|
|
727
727
|
const n = t.data;
|
|
728
|
-
if (this.token = n.token, ve(this.token), this.isLogin = !0,
|
|
728
|
+
if (this.token = n.token, ve(this.token), this.isLogin = !0, Wt(n))
|
|
729
729
|
this.userInfo = {
|
|
730
730
|
...this.userInfo,
|
|
731
731
|
...n.UserInfo
|
|
@@ -749,7 +749,7 @@ const re = {
|
|
|
749
749
|
if (te.value && te.value.appId === e)
|
|
750
750
|
return !0;
|
|
751
751
|
try {
|
|
752
|
-
const a = await
|
|
752
|
+
const a = await Gt(e);
|
|
753
753
|
return a ? (te.value = {
|
|
754
754
|
appId: e,
|
|
755
755
|
permits: a.permits || [],
|
|
@@ -844,7 +844,7 @@ const re = {
|
|
|
844
844
|
if (V())
|
|
845
845
|
return re.userLogout(), Promise.resolve();
|
|
846
846
|
try {
|
|
847
|
-
e && await
|
|
847
|
+
e && await Bt();
|
|
848
848
|
} catch (a) {
|
|
849
849
|
console.error("调用登出接口失败", a);
|
|
850
850
|
} finally {
|
|
@@ -866,7 +866,7 @@ const re = {
|
|
|
866
866
|
e.store.init();
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
|
-
}),
|
|
869
|
+
}), Te = (e, a) => {
|
|
870
870
|
var n;
|
|
871
871
|
const t = e.page;
|
|
872
872
|
return {
|
|
@@ -876,7 +876,7 @@ const re = {
|
|
|
876
876
|
...a.url,
|
|
877
877
|
loadingText: a.loadingText
|
|
878
878
|
};
|
|
879
|
-
},
|
|
879
|
+
}, Pe = (e, a) => {
|
|
880
880
|
const t = e.page, s = a.url;
|
|
881
881
|
if (!s || !s.url) {
|
|
882
882
|
const o = `URL未设置: ${a.urlKey}`;
|
|
@@ -887,12 +887,12 @@ const re = {
|
|
|
887
887
|
JSON.parse(JSON.stringify(s.params ?? {})),
|
|
888
888
|
JSON.parse(JSON.stringify(a.params ?? {}))
|
|
889
889
|
);
|
|
890
|
-
return a.processParams && (n = a.processParams(n)), a.loadingState && (a.loadingState.value = !0), a.hideErrorToast && (s.hideErrorToast = !0), G(s, n).then((o) => (a.loadingState && (a.loadingState.value = !1), (o == null ? void 0 : o.errno) ==
|
|
891
|
-
},
|
|
890
|
+
return a.processParams && (n = a.processParams(n)), a.loadingState && (a.loadingState.value = !0), a.hideErrorToast && (s.hideErrorToast = !0), G(s, n).then((o) => (a.loadingState && (a.loadingState.value = !1), (o == null ? void 0 : o.errno) == Oe ? (_().logout(!1), null) : o)).catch((o) => (a.loadingState && (a.loadingState.value = !1), null));
|
|
891
|
+
}, Je = (e, a) => {
|
|
892
892
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
893
|
-
const t =
|
|
894
|
-
return a.url = t,
|
|
895
|
-
},
|
|
893
|
+
const t = Te(e, a);
|
|
894
|
+
return a.url = t, Pe(e, a);
|
|
895
|
+
}, Fa = (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) === T.SUCCESS && (a.hideErrorToast || E.success("执行成功!")), t))), rt = (e, a = {}) => {
|
|
896
896
|
const t = a.primaryKey || "Id";
|
|
897
897
|
if (a.params || (a.params = {}), a.params.Query || (a.params.Query = {}), !a.params.Data)
|
|
898
898
|
return E.error("错误!无保存数据!"), Promise.resolve(null);
|
|
@@ -902,9 +902,9 @@ const re = {
|
|
|
902
902
|
loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据保存中..."
|
|
903
903
|
};
|
|
904
904
|
s.params.Query[t] = s.params.Data[t];
|
|
905
|
-
const n =
|
|
906
|
-
return s.url = n,
|
|
907
|
-
},
|
|
905
|
+
const n = Te(e, s);
|
|
906
|
+
return s.url = n, Pe(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (a.hideErrorToast || E.success("保存成功!")), o));
|
|
907
|
+
}, zt = (e, a, t = {}) => {
|
|
908
908
|
const s = t.primaryKey || "Id";
|
|
909
909
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
910
910
|
const n = {
|
|
@@ -914,27 +914,27 @@ const re = {
|
|
|
914
914
|
};
|
|
915
915
|
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
916
|
return E.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
917
|
-
const o =
|
|
918
|
-
return n.url = o,
|
|
919
|
-
},
|
|
917
|
+
const o = Te(e, n);
|
|
918
|
+
return n.url = o, Pe(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (t.hideErrorToast || E.success("删除成功!")), r));
|
|
919
|
+
}, Ct = (e, a) => Je(e, {
|
|
920
920
|
urlKey: "tree",
|
|
921
921
|
params: {},
|
|
922
922
|
loadingState: e.isTreeLoading,
|
|
923
923
|
loadingText: !1,
|
|
924
924
|
processParams: () => fe(e.treeQuery, a)
|
|
925
|
-
}).then((t) => (t == null ? void 0 : t.status) === T.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) || []), [])),
|
|
925
|
+
}).then((t) => (t == null ? void 0 : t.status) === T.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) || []), [])), Yt = (e, a) => {
|
|
926
926
|
for (const t of e) {
|
|
927
927
|
if (t.key === a) return t;
|
|
928
928
|
if (t.children) {
|
|
929
|
-
const s =
|
|
929
|
+
const s = Yt(t.children, a);
|
|
930
930
|
if (s) return s;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
return null;
|
|
934
934
|
};
|
|
935
935
|
let ie;
|
|
936
|
-
const
|
|
937
|
-
ie = new
|
|
936
|
+
const _a = (e) => {
|
|
937
|
+
ie = new Ve({}), ie.messages({
|
|
938
938
|
required: "${label}不能为空",
|
|
939
939
|
types: {
|
|
940
940
|
number: "${label}必须是数字"
|
|
@@ -960,7 +960,7 @@ const Fa = (e) => {
|
|
|
960
960
|
},
|
|
961
961
|
...e
|
|
962
962
|
});
|
|
963
|
-
},
|
|
963
|
+
}, Na = (e) => {
|
|
964
964
|
if (!e || F(e))
|
|
965
965
|
return [];
|
|
966
966
|
const a = [], t = ie.messages(), s = (o, r, l) => {
|
|
@@ -1016,10 +1016,10 @@ const Fa = (e) => {
|
|
|
1016
1016
|
}), a;
|
|
1017
1017
|
}, de = async (e) => {
|
|
1018
1018
|
const a = e.formData.value, t = e.formRules.value;
|
|
1019
|
-
F(t) || (
|
|
1019
|
+
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
1020
|
}).catch(({ fields: s }) => s));
|
|
1021
|
-
},
|
|
1022
|
-
}).catch(({ fields: s }) => s)),
|
|
1021
|
+
}, Da = async (e, a, t) => (t || (t = new Ve({}), t.messages(ie.messages()), t.define(a)), t.validate(e).then(() => {
|
|
1022
|
+
}).catch(({ fields: s }) => s)), qe = (e) => {
|
|
1023
1023
|
e.ruleResults.value = void 0;
|
|
1024
1024
|
}, X = () => {
|
|
1025
1025
|
const e = se(U.EditorControl, void 0), a = c(se(U.LabelText, "")), t = c(se(U.RuleKey, "")), s = se(U.ErrInfo, void 0);
|
|
@@ -1029,7 +1029,7 @@ const Fa = (e) => {
|
|
|
1029
1029
|
ruleKey: t,
|
|
1030
1030
|
errInfo: s
|
|
1031
1031
|
};
|
|
1032
|
-
},
|
|
1032
|
+
}, Xt = (e, a) => {
|
|
1033
1033
|
let t = c({
|
|
1034
1034
|
msg: "",
|
|
1035
1035
|
errClass: ""
|
|
@@ -1041,20 +1041,20 @@ const Fa = (e) => {
|
|
|
1041
1041
|
() => s == null ? void 0 : s.value,
|
|
1042
1042
|
(n) => {
|
|
1043
1043
|
if (t.value.errClass = "", t.value.msg = "", !F(n)) {
|
|
1044
|
-
const o =
|
|
1044
|
+
const o = Zt(
|
|
1045
1045
|
{
|
|
1046
1046
|
label: e.label,
|
|
1047
1047
|
rule: e.rule
|
|
1048
1048
|
},
|
|
1049
1049
|
a == null ? void 0 : a.formRules.value,
|
|
1050
|
-
|
|
1050
|
+
et(n)
|
|
1051
1051
|
);
|
|
1052
1052
|
t.value.errClass = o.errClass.value, t.value.msg = o.msg.value;
|
|
1053
1053
|
}
|
|
1054
1054
|
},
|
|
1055
1055
|
{ deep: !0 }
|
|
1056
1056
|
), t;
|
|
1057
|
-
},
|
|
1057
|
+
}, Zt = (e, a, t) => {
|
|
1058
1058
|
const s = c([]), n = c(""), o = c("");
|
|
1059
1059
|
if (!e.rule || !a || !t)
|
|
1060
1060
|
return { msg: n, ruleErrors: s, errClass: o };
|
|
@@ -1081,26 +1081,26 @@ const Fa = (e) => {
|
|
|
1081
1081
|
});
|
|
1082
1082
|
}
|
|
1083
1083
|
}), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
|
|
1084
|
-
},
|
|
1085
|
-
|
|
1086
|
-
const t =
|
|
1087
|
-
return
|
|
1088
|
-
}, Ua = (e) => {
|
|
1089
|
-
rt(e);
|
|
1084
|
+
}, Ua = (e, a) => {
|
|
1085
|
+
$e(U.LabelText, e.label || ""), $e(U.RuleKey, e.rule || "");
|
|
1086
|
+
const t = Xt(e, a);
|
|
1087
|
+
return $e(U.ErrInfo, t), t;
|
|
1090
1088
|
}, Ha = (e) => {
|
|
1091
|
-
|
|
1092
|
-
t[e.primaryKey ?? a.primaryKey] = null, rt(e);
|
|
1089
|
+
ot(e);
|
|
1093
1090
|
}, Va = (e) => {
|
|
1094
|
-
|
|
1095
|
-
|
|
1091
|
+
const a = e.page, t = e.formData.value;
|
|
1092
|
+
t[e.primaryKey ?? a.primaryKey] = null, ot(e);
|
|
1093
|
+
}, Ka = (e) => {
|
|
1094
|
+
je(e), e.visible.value = !1;
|
|
1095
|
+
}, ot = async (e) => {
|
|
1096
1096
|
var s;
|
|
1097
1097
|
const a = e.page;
|
|
1098
|
-
if (e.isFormSaving.value = !0,
|
|
1098
|
+
if (e.isFormSaving.value = !0, qe(e), e.beforeSave && e.beforeSave() === !1)
|
|
1099
1099
|
return e.isFormSaving.value = !1, Promise.resolve();
|
|
1100
1100
|
if (e.formRules.value && await de(e), e.ruleResults.value)
|
|
1101
1101
|
return E.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
|
|
1102
1102
|
const t = e.formData.value;
|
|
1103
|
-
return
|
|
1103
|
+
return rt(
|
|
1104
1104
|
{
|
|
1105
1105
|
page: a,
|
|
1106
1106
|
// 转换为AnyControl接口
|
|
@@ -1143,27 +1143,27 @@ const Fa = (e) => {
|
|
|
1143
1143
|
} else
|
|
1144
1144
|
E.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
|
|
1145
1145
|
});
|
|
1146
|
-
},
|
|
1146
|
+
}, Qa = async (e) => {
|
|
1147
1147
|
const a = e.page, t = e.grid;
|
|
1148
1148
|
e.isFormLoading.value = !0;
|
|
1149
1149
|
const s = e.formData.value, n = e.primaryKey ?? a.primaryKey;
|
|
1150
|
-
return
|
|
1151
|
-
e.isFormLoading.value = !1, o &&
|
|
1150
|
+
return ut(t, { [n]: s[n] }, e.detailUrl).then((o) => {
|
|
1151
|
+
e.isFormLoading.value = !1, o && it(e, o);
|
|
1152
1152
|
});
|
|
1153
|
-
},
|
|
1153
|
+
}, Ja = (e) => {
|
|
1154
1154
|
const a = e.grid;
|
|
1155
|
-
a && (a.rowData.value = void 0), e && (
|
|
1155
|
+
a && (a.rowData.value = void 0), e && (je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
|
|
1156
1156
|
e.visible.value = !0;
|
|
1157
1157
|
}, 1));
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1158
|
+
}, it = (e, a) => {
|
|
1159
|
+
je(e);
|
|
1160
1160
|
const t = { ...e.formData.value, ...a };
|
|
1161
1161
|
e.formData.value = JSON.parse(JSON.stringify(t));
|
|
1162
|
-
},
|
|
1163
|
-
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {},
|
|
1164
|
-
},
|
|
1162
|
+
}, je = (e) => {
|
|
1163
|
+
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, qe(e);
|
|
1164
|
+
}, qa = (e, a) => {
|
|
1165
1165
|
const t = _();
|
|
1166
|
-
return e.filter((n) => n.role && !t.hasRole(n.role) || n.permit && !t.hasPermit(
|
|
1166
|
+
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) => {
|
|
1167
1167
|
if (!a) {
|
|
1168
1168
|
if (n.visible === !1)
|
|
1169
1169
|
return !1;
|
|
@@ -1172,7 +1172,7 @@ const Fa = (e) => {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
return !0;
|
|
1174
1174
|
});
|
|
1175
|
-
},
|
|
1175
|
+
}, ja = (e, a) => {
|
|
1176
1176
|
const t = a == null ? void 0 : a.filter((s) => {
|
|
1177
1177
|
const n = e.find(
|
|
1178
1178
|
(o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
|
|
@@ -1180,10 +1180,10 @@ const Fa = (e) => {
|
|
|
1180
1180
|
return n ? { ...s, ...n } : !1;
|
|
1181
1181
|
});
|
|
1182
1182
|
return [...t || [], ...e.filter((s) => !(t != null && t.includes(s)))];
|
|
1183
|
-
},
|
|
1183
|
+
}, ea = (e) => lt(e).then((a) => a.rows), lt = (e) => {
|
|
1184
1184
|
e.gridQuery || (e.gridQuery = {});
|
|
1185
1185
|
const a = e.remotePage ? "find" : "list";
|
|
1186
|
-
return
|
|
1186
|
+
return Je(e, {
|
|
1187
1187
|
urlKey: a,
|
|
1188
1188
|
url: e.gridUrl,
|
|
1189
1189
|
params: e.gridQuery,
|
|
@@ -1208,7 +1208,7 @@ const Fa = (e) => {
|
|
|
1208
1208
|
rows: []
|
|
1209
1209
|
};
|
|
1210
1210
|
});
|
|
1211
|
-
},
|
|
1211
|
+
}, ta = (e, a, t = {}) => rt(e, {
|
|
1212
1212
|
urlKey: "update",
|
|
1213
1213
|
url: e.updateUrl,
|
|
1214
1214
|
params: {
|
|
@@ -1219,37 +1219,37 @@ const Fa = (e) => {
|
|
|
1219
1219
|
...t
|
|
1220
1220
|
}).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
|
|
1221
1221
|
e.reload.value = !0, e.afterUpdate && e.afterUpdate(a);
|
|
1222
|
-
}, 50), s)),
|
|
1222
|
+
}, 50), s)), Ga = (e, a) => {
|
|
1223
1223
|
const t = {};
|
|
1224
|
-
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey],
|
|
1224
|
+
return t[e.primaryKey] = a[e.primaryKey], t[e.statusKey] = a[e.statusKey], ta(e, t, {
|
|
1225
1225
|
loadingText: !1,
|
|
1226
1226
|
hideErrorToast: !0
|
|
1227
1227
|
});
|
|
1228
|
-
},
|
|
1228
|
+
}, ut = async (e, a, t) => await Je(e, {
|
|
1229
1229
|
urlKey: "detail",
|
|
1230
1230
|
url: t,
|
|
1231
1231
|
params: a,
|
|
1232
1232
|
loadingState: e.isGridLoading
|
|
1233
|
-
}),
|
|
1233
|
+
}), Ba = (e, a) => {
|
|
1234
1234
|
const t = a;
|
|
1235
|
-
return
|
|
1236
|
-
},
|
|
1235
|
+
return ut(e, { [e.primaryKey]: t[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && s.data && (e.expandRows.value[t[e.primaryKey]] = s), s));
|
|
1236
|
+
}, Wa = (e, a) => {
|
|
1237
1237
|
let t = e.editor;
|
|
1238
|
-
e.rowData.value = a, t && (
|
|
1239
|
-
},
|
|
1238
|
+
e.rowData.value = a, t && (it(t, a), t.visible.value = !0);
|
|
1239
|
+
}, za = (e, a) => zt(e, a, {
|
|
1240
1240
|
url: e.deleteUrl,
|
|
1241
1241
|
primaryKey: e.primaryKey
|
|
1242
1242
|
}).then((t) => ((t == null ? void 0 : t.status) === T.SUCCESS && setTimeout(() => {
|
|
1243
1243
|
e.reload.value = !0, e.afterDelete && !Array.isArray(a) && e.afterDelete(a);
|
|
1244
1244
|
}, 50), t));
|
|
1245
|
-
var
|
|
1246
|
-
class
|
|
1245
|
+
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 || {});
|
|
1246
|
+
class aa {
|
|
1247
1247
|
constructor() {
|
|
1248
1248
|
k(this, "listeners", {});
|
|
1249
1249
|
}
|
|
1250
1250
|
// 检查事件名是否符合前缀
|
|
1251
1251
|
isValidPrefix(a) {
|
|
1252
|
-
return Object.values(
|
|
1252
|
+
return Object.values(De).some((t) => a.startsWith(t + "."));
|
|
1253
1253
|
}
|
|
1254
1254
|
/**
|
|
1255
1255
|
* 事件订阅
|
|
@@ -1258,7 +1258,7 @@ class ta {
|
|
|
1258
1258
|
*/
|
|
1259
1259
|
on(a, t) {
|
|
1260
1260
|
if (!this.isValidPrefix(a)) {
|
|
1261
|
-
console.error(`事件前缀不正确: ${a}, 事件名必须以 ${Object.values(
|
|
1261
|
+
console.error(`事件前缀不正确: ${a}, 事件名必须以 ${Object.values(De).join(", ")} 开头`);
|
|
1262
1262
|
return;
|
|
1263
1263
|
}
|
|
1264
1264
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push(t);
|
|
@@ -1289,51 +1289,51 @@ class ta {
|
|
|
1289
1289
|
this.listeners[a] && this.listeners[a].forEach((s) => s(a, ...t));
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
const W = new
|
|
1292
|
+
const W = new aa(), ee = (e, a, t) => {
|
|
1293
1293
|
if (a.inputFactory && (t != null && t.reloadEvent)) {
|
|
1294
1294
|
const s = a.inputFactory.value;
|
|
1295
1295
|
s.reloadHandler = (n, o) => {
|
|
1296
|
-
|
|
1296
|
+
sa(a.url, a, o);
|
|
1297
1297
|
}, W.on(t.reloadEvent, s.reloadHandler);
|
|
1298
1298
|
}
|
|
1299
1299
|
if (t != null && t.data)
|
|
1300
1300
|
g(
|
|
1301
1301
|
() => t.data,
|
|
1302
1302
|
() => {
|
|
1303
|
-
|
|
1303
|
+
Ge(a, t.data, !0);
|
|
1304
1304
|
},
|
|
1305
1305
|
{ deep: !0, immediate: !0 }
|
|
1306
1306
|
);
|
|
1307
1307
|
else if (a.url && a.url.url)
|
|
1308
|
-
e &&
|
|
1308
|
+
e && ct(a.url, a, a.params ?? {});
|
|
1309
1309
|
else {
|
|
1310
1310
|
const s = c(se(U.LabelText, ""));
|
|
1311
1311
|
E.error("`" + s.value + "` 未配置选项数据!", {
|
|
1312
1312
|
duration: 5e3
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
|
-
},
|
|
1315
|
+
}, Ge = (e, a, t) => {
|
|
1316
1316
|
if (t) {
|
|
1317
1317
|
const s = {
|
|
1318
1318
|
...e.fieldMap
|
|
1319
1319
|
};
|
|
1320
|
-
a =
|
|
1320
|
+
a = Mt(s, a);
|
|
1321
1321
|
}
|
|
1322
1322
|
a = JSON.parse(JSON.stringify(a ?? [])), e.all && a.unshift({
|
|
1323
1323
|
label: "全部",
|
|
1324
1324
|
value: e.allValue ?? void 0
|
|
1325
1325
|
}), e.options.value = a;
|
|
1326
|
-
},
|
|
1327
|
-
Array.isArray(t) ?
|
|
1326
|
+
}, sa = (e, a, t) => {
|
|
1327
|
+
Array.isArray(t) ? Ge(a, t, !0) : ct(e, a, t);
|
|
1328
1328
|
}, he = (e, a) => {
|
|
1329
1329
|
var t;
|
|
1330
1330
|
(t = e.inputFactory) != null && t.value && a.reloadEvent && e.inputFactory.value.reloadHandler && W.off(a.reloadEvent, e.inputFactory.value.reloadHandler);
|
|
1331
|
-
},
|
|
1331
|
+
}, ct = (e, a, t) => {
|
|
1332
1332
|
const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(a.params ?? {})), o = fe(s, n, t);
|
|
1333
|
-
|
|
1334
|
-
|
|
1333
|
+
na(e, a, a.fieldMap, o).then((r) => {
|
|
1334
|
+
Ge(a, r, !1);
|
|
1335
1335
|
});
|
|
1336
|
-
},
|
|
1336
|
+
}, na = (e, a, t, s) => {
|
|
1337
1337
|
const { fieldMap: n, ...o } = e, l = {
|
|
1338
1338
|
...{
|
|
1339
1339
|
url: "",
|
|
@@ -1349,7 +1349,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1349
1349
|
if ((u == null ? void 0 : u.status) === T.SUCCESS) {
|
|
1350
1350
|
if (u.data)
|
|
1351
1351
|
return u.data;
|
|
1352
|
-
} else if ((u == null ? void 0 : u.errno) ==
|
|
1352
|
+
} else if ((u == null ? void 0 : u.errno) == Oe) {
|
|
1353
1353
|
_().logout(!1);
|
|
1354
1354
|
return;
|
|
1355
1355
|
}
|
|
@@ -1357,7 +1357,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1357
1357
|
}).finally(() => {
|
|
1358
1358
|
a.isOptionLoading.value = !1;
|
|
1359
1359
|
});
|
|
1360
|
-
},
|
|
1360
|
+
}, ra = (e, a, t) => {
|
|
1361
1361
|
if (e === void 0) return;
|
|
1362
1362
|
const s = (o) => {
|
|
1363
1363
|
const r = { ...o };
|
|
@@ -1377,7 +1377,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1377
1377
|
const o = n([e], a);
|
|
1378
1378
|
return o.length > 0 ? o[0] : void 0;
|
|
1379
1379
|
}
|
|
1380
|
-
},
|
|
1380
|
+
}, ke = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((a) => a.label) : [e.label], ae = (e, a, t) => {
|
|
1381
1381
|
const s = a.split(".");
|
|
1382
1382
|
let n = e;
|
|
1383
1383
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -1385,7 +1385,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1385
1385
|
n[r] || (n[r] = {}), n = n[r];
|
|
1386
1386
|
}
|
|
1387
1387
|
n[s[s.length - 1]] = t;
|
|
1388
|
-
},
|
|
1388
|
+
}, ft = (e, a, t) => {
|
|
1389
1389
|
if (t == null) {
|
|
1390
1390
|
Object.entries(a).forEach(([s]) => {
|
|
1391
1391
|
ae(e, s, t);
|
|
@@ -1414,12 +1414,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1414
1414
|
} else
|
|
1415
1415
|
ae(e, s, t[n]);
|
|
1416
1416
|
});
|
|
1417
|
-
},
|
|
1417
|
+
}, Le = (e, a, t) => {
|
|
1418
1418
|
var o, r;
|
|
1419
1419
|
const s = (o = e.inputFactory) == null ? void 0 : o.value;
|
|
1420
1420
|
s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && de(s.editorCtrl), e.selected.value = t;
|
|
1421
|
-
const n =
|
|
1422
|
-
if (e.selectedOptions.value = n, a.formData && a.outFields &&
|
|
1421
|
+
const n = ra(t, e.options.value);
|
|
1422
|
+
if (e.selectedOptions.value = n, a.formData && a.outFields && ft(a.formData, a.outFields, n), a.changeEvent) {
|
|
1423
1423
|
const [l, u] = a.changeEvent;
|
|
1424
1424
|
if (u)
|
|
1425
1425
|
if (Array.isArray(l))
|
|
@@ -1485,7 +1485,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1485
1485
|
value: "Id"
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
},
|
|
1488
|
+
}, Ca = (e) => {
|
|
1489
1489
|
b.PageOption = {
|
|
1490
1490
|
...b.PageOption,
|
|
1491
1491
|
...e.pageOption
|
|
@@ -1499,10 +1499,10 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1499
1499
|
...b.TreeOption,
|
|
1500
1500
|
...e.treeOption
|
|
1501
1501
|
};
|
|
1502
|
-
},
|
|
1502
|
+
}, Me = (e) => {
|
|
1503
1503
|
for (let a in e.urls)
|
|
1504
1504
|
e.urls[a].api || (e.urls[a].api = e.api), e.urls[a].authorize === void 0 && (e.urls[a].authorize = e.authorize);
|
|
1505
|
-
},
|
|
1505
|
+
}, oa = (e, a, t, s) => (Me(e), {
|
|
1506
1506
|
editorCtrl: {
|
|
1507
1507
|
...b.EditorOption,
|
|
1508
1508
|
name: "",
|
|
@@ -1518,8 +1518,8 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1518
1518
|
isFormSaving: c(!1),
|
|
1519
1519
|
isFormLoading: c(!1)
|
|
1520
1520
|
}
|
|
1521
|
-
}),
|
|
1522
|
-
|
|
1521
|
+
}), ia = (e, a, t) => {
|
|
1522
|
+
Me(e);
|
|
1523
1523
|
const s = {
|
|
1524
1524
|
...b.GridOption,
|
|
1525
1525
|
tableSize: c(b.GridOption.tableSize.value),
|
|
@@ -1552,13 +1552,13 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1552
1552
|
(n) => {
|
|
1553
1553
|
n && (setTimeout(() => {
|
|
1554
1554
|
s.reload.value = !1;
|
|
1555
|
-
}, 1), s.remotePage ?
|
|
1555
|
+
}, 1), s.remotePage ? lt(s) : ea(s));
|
|
1556
1556
|
}
|
|
1557
1557
|
), {
|
|
1558
1558
|
gridCtrl: s
|
|
1559
1559
|
};
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1560
|
+
}, Ya = (e, a) => {
|
|
1561
|
+
Me(e);
|
|
1562
1562
|
const t = {
|
|
1563
1563
|
...b.TreeOption,
|
|
1564
1564
|
reload: c(!1),
|
|
@@ -1573,7 +1573,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1573
1573
|
(s) => {
|
|
1574
1574
|
s && (setTimeout(() => {
|
|
1575
1575
|
t.reload.value = !1;
|
|
1576
|
-
}, 1),
|
|
1576
|
+
}, 1), Ct(t));
|
|
1577
1577
|
}
|
|
1578
1578
|
), {
|
|
1579
1579
|
treeCtrl: t
|
|
@@ -1600,24 +1600,24 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1600
1600
|
), {
|
|
1601
1601
|
optionCtrl: t
|
|
1602
1602
|
};
|
|
1603
|
-
},
|
|
1604
|
-
|
|
1603
|
+
}, Xa = (e, a, t) => {
|
|
1604
|
+
Me(e);
|
|
1605
1605
|
const s = {
|
|
1606
1606
|
...b.PageOption,
|
|
1607
1607
|
...e
|
|
1608
|
-
}, { editorCtrl: n } =
|
|
1608
|
+
}, { editorCtrl: n } = oa(e, s, a, t), { gridCtrl: o } = ia(e, s);
|
|
1609
1609
|
return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
|
|
1610
1610
|
pageCtrl: s,
|
|
1611
1611
|
editorCtrl: n,
|
|
1612
1612
|
gridCtrl: o
|
|
1613
1613
|
};
|
|
1614
|
-
},
|
|
1614
|
+
}, la = 7 * 24 * 60 * 60 * 1e3, Ne = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Set(), j = c({}), Za = j, es = (e) => {
|
|
1615
1615
|
var n;
|
|
1616
|
-
if (!e.iconUrl) return
|
|
1616
|
+
if (!e.iconUrl) return Ue;
|
|
1617
1617
|
const a = c(!0), t = c("");
|
|
1618
1618
|
let s = !0;
|
|
1619
|
-
return (n = e.icons) != null && n.length && (s = e.icons.every((o) => j.value[o] !== void 0)), (e.icon && !j.value[e.icon] || !s) &&
|
|
1620
|
-
|
|
1619
|
+
return (n = e.icons) != null && n.length && (s = e.icons.every((o) => j.value[o] !== void 0)), (e.icon && !j.value[e.icon] || !s) && ua(e, a).then(() => {
|
|
1620
|
+
pa(e.iconUrl, e.monoColor || !1), a.value = !0;
|
|
1621
1621
|
}), Z({
|
|
1622
1622
|
props: {
|
|
1623
1623
|
icon: {
|
|
@@ -1675,36 +1675,36 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1675
1675
|
},
|
|
1676
1676
|
render() {
|
|
1677
1677
|
if (!a.value)
|
|
1678
|
-
return
|
|
1678
|
+
return Ue;
|
|
1679
1679
|
let o = this.class, r = "";
|
|
1680
1680
|
Array.isArray(o) ? r = o.join(" ") : typeof o == "string" && (r = o);
|
|
1681
1681
|
let l = [r];
|
|
1682
|
-
return !/\bw-/.test(r) && !/$w-/.test(r) && l.push("w-4"), !/\bh-/.test(r) && !/$h-/.test(r) && l.push("h-4"), t.value ? H(
|
|
1682
|
+
return !/\bw-/.test(r) && !/$w-/.test(r) && l.push("w-4"), !/\bh-/.test(r) && !/$h-/.test(r) && l.push("h-4"), t.value ? H(et(t.value), {
|
|
1683
1683
|
onClick: this.$props.clickable ? this.handleClick : void 0,
|
|
1684
1684
|
class: `${l.join(" ")}`,
|
|
1685
1685
|
style: {
|
|
1686
1686
|
fill: "currentColor",
|
|
1687
1687
|
cursor: this.$props.clickable ? "pointer" : "default",
|
|
1688
|
-
transform:
|
|
1688
|
+
transform: ha(this.angle, this.flip)
|
|
1689
1689
|
}
|
|
1690
1690
|
}) : H("div", { class: "w-[14px] h-[14px]" });
|
|
1691
1691
|
}
|
|
1692
1692
|
});
|
|
1693
|
-
},
|
|
1693
|
+
}, ua = (e, a) => {
|
|
1694
1694
|
let t = e.iconUrl;
|
|
1695
1695
|
if (!t)
|
|
1696
1696
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1697
|
-
if (
|
|
1697
|
+
if (Ne.has(t))
|
|
1698
1698
|
return Promise.resolve();
|
|
1699
|
-
const s =
|
|
1699
|
+
const s = dt(t);
|
|
1700
1700
|
if (s)
|
|
1701
|
-
return new Promise(async (o) => (
|
|
1701
|
+
return new Promise(async (o) => (pt(s.scriptContent), o()));
|
|
1702
1702
|
a.value = !1;
|
|
1703
1703
|
const n = new Promise(async (o) => {
|
|
1704
|
-
await
|
|
1704
|
+
await ca(t, e.monoColor || !1), o(), Ne.delete(t);
|
|
1705
1705
|
});
|
|
1706
|
-
return
|
|
1707
|
-
},
|
|
1706
|
+
return Ne.set(t, n), n;
|
|
1707
|
+
}, ca = async (e, a) => {
|
|
1708
1708
|
try {
|
|
1709
1709
|
const t = await fetch(e);
|
|
1710
1710
|
if (!t.ok) {
|
|
@@ -1717,27 +1717,27 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1717
1717
|
const o = s.match(n);
|
|
1718
1718
|
if (o && o.length > 1) {
|
|
1719
1719
|
let r = o[1];
|
|
1720
|
-
|
|
1720
|
+
fa(e, r, a, s);
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1722
|
+
pt(s);
|
|
1723
1723
|
return;
|
|
1724
1724
|
} catch (t) {
|
|
1725
1725
|
return console.error("网络异常,无法加载图标库:", t), null;
|
|
1726
1726
|
}
|
|
1727
|
-
},
|
|
1727
|
+
}, pt = (e) => {
|
|
1728
1728
|
const a = document.createElement("script");
|
|
1729
1729
|
a.textContent = e, document.head.appendChild(a);
|
|
1730
|
-
},
|
|
1730
|
+
}, fa = (e, a, t, s) => {
|
|
1731
1731
|
let n = `icon_cache:${e}`;
|
|
1732
1732
|
const o = {
|
|
1733
1733
|
windowKey: a,
|
|
1734
1734
|
monoColor: t,
|
|
1735
1735
|
scriptContent: s,
|
|
1736
|
-
expireTime: Date.now() +
|
|
1736
|
+
expireTime: Date.now() + la
|
|
1737
1737
|
// 缓存时间:7天
|
|
1738
1738
|
};
|
|
1739
1739
|
localStorage.setItem(n, JSON.stringify(o));
|
|
1740
|
-
},
|
|
1740
|
+
}, dt = (e) => {
|
|
1741
1741
|
let a = `icon_cache:${e}`;
|
|
1742
1742
|
const t = localStorage.getItem(a);
|
|
1743
1743
|
if (!t) return null;
|
|
@@ -1748,7 +1748,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1748
1748
|
return console.error("解析缓存失败:", n), null;
|
|
1749
1749
|
}
|
|
1750
1750
|
return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
|
|
1751
|
-
},
|
|
1751
|
+
}, ts = () => {
|
|
1752
1752
|
const e = Date.now();
|
|
1753
1753
|
for (const a in localStorage)
|
|
1754
1754
|
if (a.startsWith("icon_cache:")) {
|
|
@@ -1759,7 +1759,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1759
1759
|
setTimeout(() => {
|
|
1760
1760
|
a.value = t, a.value && (e.value = j.value[a.value]);
|
|
1761
1761
|
}, 1);
|
|
1762
|
-
},
|
|
1762
|
+
}, Ue = H(
|
|
1763
1763
|
"svg",
|
|
1764
1764
|
{ class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
|
|
1765
1765
|
[
|
|
@@ -1779,12 +1779,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1779
1779
|
fill: "currentColor"
|
|
1780
1780
|
})
|
|
1781
1781
|
]
|
|
1782
|
-
),
|
|
1783
|
-
const t =
|
|
1782
|
+
), pa = (e, a) => {
|
|
1783
|
+
const t = dt(e);
|
|
1784
1784
|
Object.keys(window).forEach((s) => {
|
|
1785
|
-
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !
|
|
1785
|
+
s.startsWith("_iconfont_svg_string_") && (t == null ? void 0 : t.windowKey) === s && !Xe.has(s) && (Xe.add(s), da(s, a));
|
|
1786
1786
|
});
|
|
1787
|
-
},
|
|
1787
|
+
}, da = (e, a) => {
|
|
1788
1788
|
const t = window[e], o = new DOMParser().parseFromString(t, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
|
|
1789
1789
|
for (const l of o) {
|
|
1790
1790
|
const u = l.id, i = Array.from(r).find((f) => f.id === u);
|
|
@@ -1792,12 +1792,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1792
1792
|
f.hasAttribute("fill") && f.removeAttribute("fill");
|
|
1793
1793
|
})), j.value[u] || (j.value[u] = H("svg", { fill: "currentColor" }, [H("use", { "xlink:href": `#${u}` })]));
|
|
1794
1794
|
}
|
|
1795
|
-
},
|
|
1795
|
+
}, ha = (e, a) => {
|
|
1796
1796
|
let t = "";
|
|
1797
1797
|
return e && (t += `rotate(${e}deg)`), a && (t += " scaleX(-1)"), t;
|
|
1798
|
-
},
|
|
1799
|
-
|
|
1800
|
-
},
|
|
1798
|
+
}, as = (e, a, t, s) => {
|
|
1799
|
+
ht(e, [], t, s).forEach((o) => a.push(o));
|
|
1800
|
+
}, ht = (e, a, t, s) => {
|
|
1801
1801
|
var r, l, u, i, f;
|
|
1802
1802
|
const n = [], o = _();
|
|
1803
1803
|
for (const p of e) {
|
|
@@ -1805,7 +1805,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1805
1805
|
continue;
|
|
1806
1806
|
const v = p.path.split("/");
|
|
1807
1807
|
v.unshift(...a);
|
|
1808
|
-
const d =
|
|
1808
|
+
const d = ht(p.children || [], v, t, s), R = {
|
|
1809
1809
|
key: v.join("/"),
|
|
1810
1810
|
label: ((i = p.name) == null ? void 0 : i.toString()) ?? "",
|
|
1811
1811
|
title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
|
|
@@ -1815,10 +1815,10 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1815
1815
|
(d.length > 0 || !p.children) && n.push(R);
|
|
1816
1816
|
}
|
|
1817
1817
|
return n;
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1818
|
+
}, Ze = yt([]), ss = () => {
|
|
1819
|
+
Ze.length = 0;
|
|
1820
1820
|
const e = K();
|
|
1821
|
-
let t =
|
|
1821
|
+
let t = Ke().TabActive;
|
|
1822
1822
|
e.matchedRoutes(t).forEach((n, o) => {
|
|
1823
1823
|
var l;
|
|
1824
1824
|
const r = {
|
|
@@ -1826,9 +1826,9 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1826
1826
|
path: n.path,
|
|
1827
1827
|
breadcrumbName: ((l = n.name) == null ? void 0 : l.toString()) ?? ""
|
|
1828
1828
|
};
|
|
1829
|
-
|
|
1829
|
+
Ze.push(r);
|
|
1830
1830
|
});
|
|
1831
|
-
},
|
|
1831
|
+
}, ma = {
|
|
1832
1832
|
host: {
|
|
1833
1833
|
api: "SITEHOST_API",
|
|
1834
1834
|
url: "/openapi/RCSiteHostSrv/get",
|
|
@@ -1840,7 +1840,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1840
1840
|
// 不显示错误
|
|
1841
1841
|
hideErrorToast: !0
|
|
1842
1842
|
}
|
|
1843
|
-
},
|
|
1843
|
+
}, ns = ce("hostInfo", {
|
|
1844
1844
|
state: () => ({
|
|
1845
1845
|
hostInfo: {
|
|
1846
1846
|
Host: "",
|
|
@@ -1871,9 +1871,9 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
let t = (e || this.getSiteHostApi()).trim();
|
|
1873
1873
|
return (!t || t === "/") && (t = window.location.origin), t.endsWith("/") && (t = t.slice(0, -1)), new Promise((s) => {
|
|
1874
|
-
|
|
1874
|
+
Fe.SITEHOST_API || (Fe.SITEHOST_API = t);
|
|
1875
1875
|
const n = a || window.location.origin;
|
|
1876
|
-
G(
|
|
1876
|
+
G(ma.host, {
|
|
1877
1877
|
Query: {
|
|
1878
1878
|
Host: n
|
|
1879
1879
|
}
|
|
@@ -1911,12 +1911,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1911
1911
|
}, this.hostInfo.API_HOST)
|
|
1912
1912
|
for (const a in this.hostInfo.API_HOST) {
|
|
1913
1913
|
let t = this.hostInfo.API_HOST[a];
|
|
1914
|
-
t = t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") ? t : window.location.origin + t, t.endsWith("/") && (t = t.slice(0, -1)), this.hostInfo.API_HOST[a] = t,
|
|
1914
|
+
t = t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") ? t : window.location.origin + t, t.endsWith("/") && (t = t.slice(0, -1)), this.hostInfo.API_HOST[a] = t, Fe[a] = t;
|
|
1915
1915
|
}
|
|
1916
1916
|
if (this.hostInfo.SERVER_HOST)
|
|
1917
1917
|
for (const a in this.hostInfo.SERVER_HOST) {
|
|
1918
1918
|
let t = this.hostInfo.SERVER_HOST[a];
|
|
1919
|
-
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,
|
|
1919
|
+
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, $t[a] = t;
|
|
1920
1920
|
}
|
|
1921
1921
|
},
|
|
1922
1922
|
getHostInfo() {
|
|
@@ -1930,7 +1930,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1930
1930
|
// storage: localStorage,
|
|
1931
1931
|
// pick: ['hostInfo'],
|
|
1932
1932
|
// },
|
|
1933
|
-
}),
|
|
1933
|
+
}), rs = ce("settingInfo", {
|
|
1934
1934
|
state: () => ({
|
|
1935
1935
|
fullscreen: !1,
|
|
1936
1936
|
menuCollapse: !1,
|
|
@@ -1972,7 +1972,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
},
|
|
1974
1974
|
persist: !1
|
|
1975
|
-
}),
|
|
1975
|
+
}), os = /* @__PURE__ */ Z({
|
|
1976
1976
|
__name: "index",
|
|
1977
1977
|
props: {
|
|
1978
1978
|
...pe,
|
|
@@ -2009,7 +2009,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2009
2009
|
o && he(o, t);
|
|
2010
2010
|
}), (p, v) => {
|
|
2011
2011
|
var d;
|
|
2012
|
-
return r.value.length === 2 ? (w(), Ae(S(
|
|
2012
|
+
return r.value.length === 2 ? (w(), Ae(S(St), ue({
|
|
2013
2013
|
key: 0,
|
|
2014
2014
|
class: [
|
|
2015
2015
|
((d = S(i)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
|
|
@@ -2024,7 +2024,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2024
2024
|
}, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : z("", !0);
|
|
2025
2025
|
};
|
|
2026
2026
|
}
|
|
2027
|
-
}),
|
|
2027
|
+
}), is = /* @__PURE__ */ Z({
|
|
2028
2028
|
inheritAttrs: !1,
|
|
2029
2029
|
__name: "index",
|
|
2030
2030
|
props: {
|
|
@@ -2061,7 +2061,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2061
2061
|
), g(
|
|
2062
2062
|
() => l.value,
|
|
2063
2063
|
(y) => {
|
|
2064
|
-
t.autoClean && t.formData && t.outFields && y !== t.value &&
|
|
2064
|
+
t.autoClean && t.formData && t.outFields && y !== t.value && ft(t.formData, t.outFields, null);
|
|
2065
2065
|
}
|
|
2066
2066
|
);
|
|
2067
2067
|
const { editorCtrl: u, errInfo: i, labelText: f } = n, p = a;
|
|
@@ -2083,17 +2083,19 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2083
2083
|
};
|
|
2084
2084
|
r.params = fe(r.params, h), r && ee(!0, r, t);
|
|
2085
2085
|
}, R = (y) => {
|
|
2086
|
-
const x =
|
|
2086
|
+
const x = Le(r, t, y);
|
|
2087
2087
|
p("update:value", y), p("select", y);
|
|
2088
|
-
const h =
|
|
2088
|
+
const h = ke(x);
|
|
2089
2089
|
p("update:labels", h), i != null && i.value.errClass && u && de(u);
|
|
2090
2090
|
};
|
|
2091
|
-
return
|
|
2091
|
+
return xe(() => {
|
|
2092
|
+
r && r.autoload && (r.reload.value = !0);
|
|
2093
|
+
}), le(() => {
|
|
2092
2094
|
r && he(r, t);
|
|
2093
2095
|
}), (y, x) => {
|
|
2094
2096
|
var h;
|
|
2095
2097
|
return w(), $("div", null, [
|
|
2096
|
-
C(S(
|
|
2098
|
+
C(S(It), ue({
|
|
2097
2099
|
value: l.value,
|
|
2098
2100
|
"onUpdate:value": x[0] || (x[0] = (I) => l.value = I),
|
|
2099
2101
|
class: ["w-full", (h = S(i)) == null ? void 0 : h.errClass],
|
|
@@ -2102,10 +2104,10 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2102
2104
|
onSelect: R
|
|
2103
2105
|
}, S(s), { "allow-clear": !1 }), {
|
|
2104
2106
|
option: Q(({ label: I }) => [
|
|
2105
|
-
|
|
2107
|
+
we(Y(I), 1)
|
|
2106
2108
|
]),
|
|
2107
2109
|
default: Q(() => [
|
|
2108
|
-
C(S(
|
|
2110
|
+
C(S(At), {
|
|
2109
2111
|
"allow-clear": "",
|
|
2110
2112
|
placeholder: "请输入并选择" + S(f)
|
|
2111
2113
|
}, null, 8, ["placeholder"])
|
|
@@ -2115,10 +2117,10 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2115
2117
|
]);
|
|
2116
2118
|
};
|
|
2117
2119
|
}
|
|
2118
|
-
}),
|
|
2120
|
+
}), va = { class: "min-h-[32px] pt-[5px]" }, ga = {
|
|
2119
2121
|
key: 1,
|
|
2120
2122
|
class: "text-center text-gray-500"
|
|
2121
|
-
},
|
|
2123
|
+
}, ls = /* @__PURE__ */ Z({
|
|
2122
2124
|
inheritAttrs: !1,
|
|
2123
2125
|
__name: "index",
|
|
2124
2126
|
props: {
|
|
@@ -2159,10 +2161,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2159
2161
|
{ immediate: !0, deep: !0 }
|
|
2160
2162
|
);
|
|
2161
2163
|
const p = (y) => {
|
|
2162
|
-
const h =
|
|
2164
|
+
const h = Le(r, t, y), I = ke(h);
|
|
2163
2165
|
i("update:labels", I);
|
|
2164
2166
|
};
|
|
2165
|
-
return
|
|
2167
|
+
return xe(() => {
|
|
2168
|
+
r && r.autoload && (r.reload.value = !0);
|
|
2169
|
+
}), Ie(() => {
|
|
2166
2170
|
l.value && !l.value.fieldMap && (l.value.fieldMap = {
|
|
2167
2171
|
title: "Name",
|
|
2168
2172
|
label: "Name",
|
|
@@ -2171,19 +2175,19 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2171
2175
|
}), r && ee(r.autoload, r, t);
|
|
2172
2176
|
}), le(() => {
|
|
2173
2177
|
r && he(r, t);
|
|
2174
|
-
}), (y, x) => (w(), $("div",
|
|
2175
|
-
C(S(
|
|
2178
|
+
}), (y, x) => (w(), $("div", va, [
|
|
2179
|
+
C(S(Et), ue({
|
|
2176
2180
|
onChange: p,
|
|
2177
2181
|
class: "w-full mb-[-3px]"
|
|
2178
2182
|
}, S(s)), {
|
|
2179
2183
|
default: Q(() => [
|
|
2180
|
-
f.value.length > 0 ? (w(!0), $(oe, { key: 0 },
|
|
2184
|
+
f.value.length > 0 ? (w(!0), $(oe, { key: 0 }, He(f.value, (h) => {
|
|
2181
2185
|
var I;
|
|
2182
|
-
return w(), Ae(S(
|
|
2186
|
+
return w(), Ae(S(xt), {
|
|
2183
2187
|
key: h.value,
|
|
2184
2188
|
value: h.value,
|
|
2185
2189
|
disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
|
|
2186
|
-
class:
|
|
2190
|
+
class: tt([
|
|
2187
2191
|
((I = S(u)) == null ? void 0 : I.errClass) === "error" ? "error !text-red-400" : "",
|
|
2188
2192
|
"text-nowrap",
|
|
2189
2193
|
"pb-1",
|
|
@@ -2191,20 +2195,20 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2191
2195
|
])
|
|
2192
2196
|
}, {
|
|
2193
2197
|
default: Q(() => [
|
|
2194
|
-
|
|
2198
|
+
we(Y(h.label), 1)
|
|
2195
2199
|
]),
|
|
2196
2200
|
_: 2
|
|
2197
2201
|
}, 1032, ["value", "disabled", "class"]);
|
|
2198
|
-
}), 128)) : e.nodata ? (w(), $("div",
|
|
2202
|
+
}), 128)) : e.nodata ? (w(), $("div", ga, Y(e.nodata), 1)) : z("", !0)
|
|
2199
2203
|
]),
|
|
2200
2204
|
_: 1
|
|
2201
2205
|
}, 16)
|
|
2202
2206
|
]));
|
|
2203
2207
|
}
|
|
2204
|
-
}),
|
|
2208
|
+
}), ya = { class: "min-h-[32px] pt-1" }, ba = {
|
|
2205
2209
|
key: 1,
|
|
2206
2210
|
class: "text-center text-gray-500"
|
|
2207
|
-
},
|
|
2211
|
+
}, us = /* @__PURE__ */ Z({
|
|
2208
2212
|
inheritAttrs: !1,
|
|
2209
2213
|
__name: "index",
|
|
2210
2214
|
props: {
|
|
@@ -2260,10 +2264,12 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2260
2264
|
}
|
|
2261
2265
|
return h === I;
|
|
2262
2266
|
}, d = (h) => {
|
|
2263
|
-
const I = h.target.value, O =
|
|
2267
|
+
const I = h.target.value, O = Le(r, t, I), q = ke(O);
|
|
2264
2268
|
p("update:labels", q);
|
|
2265
2269
|
};
|
|
2266
|
-
return
|
|
2270
|
+
return xe(() => {
|
|
2271
|
+
r && r.autoload && (r.reload.value = !0);
|
|
2272
|
+
}), Ie(() => {
|
|
2267
2273
|
l.value && !l.value.fieldMap && (l.value.fieldMap = {
|
|
2268
2274
|
label: "Name",
|
|
2269
2275
|
value: "Id",
|
|
@@ -2271,8 +2277,8 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2271
2277
|
}), r && ee(r.autoload, r, t);
|
|
2272
2278
|
}), le(() => {
|
|
2273
2279
|
r && he(r, t);
|
|
2274
|
-
}), (h, I) => (w(), $("div",
|
|
2275
|
-
C(S(
|
|
2280
|
+
}), (h, I) => (w(), $("div", ya, [
|
|
2281
|
+
C(S(wt), ue({
|
|
2276
2282
|
value: u.value,
|
|
2277
2283
|
"onUpdate:value": I[0] || (I[0] = (O) => u.value = O),
|
|
2278
2284
|
autocheck: !1,
|
|
@@ -2280,16 +2286,16 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2280
2286
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
2281
2287
|
}, S(s)), {
|
|
2282
2288
|
default: Q(() => [
|
|
2283
|
-
f.value.length > 0 ? (w(!0), $(oe, { key: 0 },
|
|
2289
|
+
f.value.length > 0 ? (w(!0), $(oe, { key: 0 }, He(f.value, (O) => {
|
|
2284
2290
|
var q;
|
|
2285
2291
|
return w(), $(oe, {
|
|
2286
2292
|
key: O.value
|
|
2287
2293
|
}, [
|
|
2288
|
-
O.visible !== !1 ? (w(), Ae(S(
|
|
2294
|
+
O.visible !== !1 ? (w(), Ae(S(Rt), {
|
|
2289
2295
|
key: 0,
|
|
2290
2296
|
checked: v(O.value, t.value),
|
|
2291
2297
|
value: O.value,
|
|
2292
|
-
class:
|
|
2298
|
+
class: tt([
|
|
2293
2299
|
((q = S(i)) == null ? void 0 : q.errClass) === "error" ? "error !text-red-400" : "",
|
|
2294
2300
|
"text-nowrap",
|
|
2295
2301
|
"pb-1",
|
|
@@ -2297,21 +2303,21 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2297
2303
|
])
|
|
2298
2304
|
}, {
|
|
2299
2305
|
default: Q(() => [
|
|
2300
|
-
|
|
2306
|
+
we(Y(O.label), 1)
|
|
2301
2307
|
]),
|
|
2302
2308
|
_: 2
|
|
2303
2309
|
}, 1032, ["checked", "value", "class"])) : z("", !0)
|
|
2304
2310
|
], 64);
|
|
2305
|
-
}), 128)) : e.nodata ? (w(), $("div",
|
|
2311
|
+
}), 128)) : e.nodata ? (w(), $("div", ba, Y(e.nodata), 1)) : z("", !0)
|
|
2306
2312
|
]),
|
|
2307
2313
|
_: 1
|
|
2308
2314
|
}, 16, ["value"])
|
|
2309
2315
|
]));
|
|
2310
2316
|
}
|
|
2311
|
-
}),
|
|
2317
|
+
}), Sa = {
|
|
2312
2318
|
key: 0,
|
|
2313
2319
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
2314
|
-
},
|
|
2320
|
+
}, cs = /* @__PURE__ */ Z({
|
|
2315
2321
|
inheritAttrs: !1,
|
|
2316
2322
|
__name: "index",
|
|
2317
2323
|
props: {
|
|
@@ -2358,7 +2364,7 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2358
2364
|
}), v = c(f.placeholder), d = c(i == null ? void 0 : i.selected.value), R = a;
|
|
2359
2365
|
n.inputEmit = R;
|
|
2360
2366
|
const y = (m) => {
|
|
2361
|
-
const P =
|
|
2367
|
+
const P = Le(i, t, m), D = ke(P);
|
|
2362
2368
|
d.value = m, R("update:labels", D), R("update:label", D.join(";")), R("change", m, P), r != null && r.value.errClass && o && de(o);
|
|
2363
2369
|
}, x = c((i == null ? void 0 : i.options.value) || []), h = (m) => {
|
|
2364
2370
|
if (m.length > 0 && F(t.value) && t.selectFirst)
|
|
@@ -2406,7 +2412,9 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2406
2412
|
const P = m === void 0 ? s ? void 0 : null : m;
|
|
2407
2413
|
i && (i.selected.value = P), R("update:value", P);
|
|
2408
2414
|
}
|
|
2409
|
-
),
|
|
2415
|
+
), xe(() => {
|
|
2416
|
+
i && i.autoload && (i.reload.value = !0);
|
|
2417
|
+
}), Ie(() => {
|
|
2410
2418
|
if (p.value && !p.value.fieldMap && (p.value.fieldMap = {
|
|
2411
2419
|
label: "Name",
|
|
2412
2420
|
value: "Id",
|
|
@@ -2421,14 +2429,14 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2421
2429
|
}), le(() => {
|
|
2422
2430
|
i && he(i, t);
|
|
2423
2431
|
}), (m, P) => {
|
|
2424
|
-
var D,
|
|
2432
|
+
var D, Be, We;
|
|
2425
2433
|
return w(), $("div", null, [
|
|
2426
|
-
(
|
|
2427
|
-
C(S(
|
|
2428
|
-
P[1] || (P[1] =
|
|
2434
|
+
(Be = (D = S(i)) == null ? void 0 : D.url) != null && Be.loading ? (w(), $("div", Sa, [
|
|
2435
|
+
C(S(Ue), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2436
|
+
P[1] || (P[1] = bt("span", null, "数据加载中...", -1))
|
|
2429
2437
|
])) : z("", !0),
|
|
2430
|
-
C(S(
|
|
2431
|
-
class: [(
|
|
2438
|
+
C(S(Ot), ue({
|
|
2439
|
+
class: [(We = S(r)) == null ? void 0 : We.errClass, "w-full"],
|
|
2432
2440
|
value: d.value,
|
|
2433
2441
|
"onUpdate:value": P[0] || (P[0] = (B) => d.value = B),
|
|
2434
2442
|
"allow-clear": !0,
|
|
@@ -2437,15 +2445,15 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2437
2445
|
"label-in-value": !1
|
|
2438
2446
|
}, S(f)), {
|
|
2439
2447
|
default: Q(() => [
|
|
2440
|
-
(w(!0), $(oe, null,
|
|
2448
|
+
(w(!0), $(oe, null, He(x.value, (B) => (w(), $(oe, {
|
|
2441
2449
|
key: B.value
|
|
2442
2450
|
}, [
|
|
2443
|
-
B.visible !== !1 ? (w(), Ae(S(
|
|
2451
|
+
B.visible !== !1 ? (w(), Ae(S(Tt), {
|
|
2444
2452
|
key: 0,
|
|
2445
2453
|
value: B.value
|
|
2446
2454
|
}, {
|
|
2447
2455
|
default: Q(() => [
|
|
2448
|
-
|
|
2456
|
+
we(Y(B.label), 1)
|
|
2449
2457
|
]),
|
|
2450
2458
|
_: 2
|
|
2451
2459
|
}, 1032, ["value"])) : z("", !0)
|
|
@@ -2456,90 +2464,90 @@ const W = new ta(), ee = (e, a, t) => {
|
|
|
2456
2464
|
]);
|
|
2457
2465
|
};
|
|
2458
2466
|
}
|
|
2459
|
-
}),
|
|
2467
|
+
}), Ia = c(!1), fs = {
|
|
2460
2468
|
label: "模板管理",
|
|
2461
2469
|
key: "uploadTemp",
|
|
2462
2470
|
type: "primary",
|
|
2463
2471
|
icon: "icon-download",
|
|
2464
2472
|
click: () => {
|
|
2465
|
-
|
|
2473
|
+
Ia.value = !0;
|
|
2466
2474
|
}
|
|
2467
2475
|
};
|
|
2468
2476
|
export {
|
|
2469
|
-
|
|
2470
|
-
|
|
2477
|
+
it as $,
|
|
2478
|
+
ke as A,
|
|
2471
2479
|
de as B,
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2480
|
+
ls as C,
|
|
2481
|
+
us as D,
|
|
2482
|
+
cs as E,
|
|
2483
|
+
Je as F,
|
|
2484
|
+
Nt as G,
|
|
2485
|
+
Ca as H,
|
|
2486
|
+
oa as I,
|
|
2487
|
+
ia as J,
|
|
2488
|
+
Ya as K,
|
|
2489
|
+
Oe as L,
|
|
2490
|
+
Xa as M,
|
|
2491
|
+
ra as N,
|
|
2484
2492
|
N as O,
|
|
2485
2493
|
U as P,
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2494
|
+
ft as Q,
|
|
2495
|
+
Za as R,
|
|
2496
|
+
ts as S,
|
|
2497
|
+
da as T,
|
|
2498
|
+
ha as U,
|
|
2499
|
+
as as V,
|
|
2500
|
+
Ze as W,
|
|
2501
|
+
ss as X,
|
|
2502
|
+
ot as Y,
|
|
2503
|
+
Qa as Z,
|
|
2504
|
+
os as _,
|
|
2505
|
+
rs as a,
|
|
2506
|
+
_a as a0,
|
|
2507
|
+
Da as a1,
|
|
2508
|
+
qe as a2,
|
|
2509
|
+
Na as a3,
|
|
2510
|
+
ja as a4,
|
|
2511
|
+
ta as a5,
|
|
2512
|
+
ut as a6,
|
|
2513
|
+
Ba as a7,
|
|
2514
|
+
Fa as a8,
|
|
2515
|
+
rt as a9,
|
|
2516
|
+
zt as aa,
|
|
2517
|
+
De as ab,
|
|
2510
2518
|
W as ac,
|
|
2511
2519
|
re as ad,
|
|
2512
2520
|
ne as ae,
|
|
2513
2521
|
ye as af,
|
|
2514
2522
|
K as ag,
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2523
|
+
ns as ah,
|
|
2524
|
+
Ke as ai,
|
|
2525
|
+
Ia as aj,
|
|
2526
|
+
fs as ak,
|
|
2519
2527
|
ie as al,
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2528
|
+
Va as b,
|
|
2529
|
+
es as c,
|
|
2530
|
+
Ka as d,
|
|
2531
|
+
Ua as e,
|
|
2532
|
+
Wa as f,
|
|
2533
|
+
za as g,
|
|
2534
|
+
qa as h,
|
|
2527
2535
|
F as i,
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2536
|
+
Ja as j,
|
|
2537
|
+
lt as k,
|
|
2538
|
+
ea as l,
|
|
2539
|
+
Ga as m,
|
|
2540
|
+
Yt as n,
|
|
2541
|
+
Ha as o,
|
|
2542
|
+
is as p,
|
|
2543
|
+
Ct as q,
|
|
2544
|
+
Re as r,
|
|
2537
2545
|
pe as s,
|
|
2538
2546
|
X as t,
|
|
2539
2547
|
_ as u,
|
|
2540
2548
|
me as v,
|
|
2541
2549
|
ee as w,
|
|
2542
2550
|
he as x,
|
|
2543
|
-
|
|
2544
|
-
|
|
2551
|
+
Ue as y,
|
|
2552
|
+
Le as z
|
|
2545
2553
|
};
|