@skyfox2000/webui 1.4.3 → 1.4.5
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-C92mDmCL.js → baseLayout-BT7tGUB1.js} +3 -3
- package/lib/assets/modules/{file-upload-DGCoBLP3.js → file-upload-DicHRX1r.js} +27 -28
- package/lib/assets/modules/{index-C_7galsG.js → index-BURe9YrF.js} +2 -2
- package/lib/assets/modules/{index-ChjM1bSE.js → index-BjXLzCF2.js} +2 -2
- package/lib/assets/modules/{index-BrDxf94o.js → index-iozooZXX.js} +1 -1
- package/lib/assets/modules/{menuTabs-Boe_4pzK.js → menuTabs-D_UlXkmm.js} +56 -56
- package/lib/assets/modules/{toolIcon-BddslNsJ.js → toolIcon-BiWBb2pJ.js} +1 -1
- package/lib/assets/modules/{uploadList-3sClH7Na.js → uploadList-61wZlPUk.js} +4 -4
- package/lib/assets/modules/{uploadList-ZGWKyite.js → uploadList-C_hqJ4X1.js} +217 -217
- 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/UploadForm/index.js +4 -4
- package/lib/stores/hostInfo.d.ts +2 -2
- package/lib/utils/micro-openapis.d.ts +7 -6
- package/lib/webui.es.js +12 -12
- package/package.json +1 -1
- package/src/components/layout/header/headerExits.vue +4 -4
- package/src/stores/appInfo.ts +10 -6
- package/src/stores/hostInfo.ts +6 -5
- package/src/utils/file-upload.ts +4 -3
- package/src/utils/micro-openapis.ts +9 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var ha = Object.defineProperty;
|
|
2
2
|
var ma = (e, t, a) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var L = (e, t, a) => ma(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
-
import { ref as f, h as H, nextTick as va, inject as se, provide as
|
|
4
|
+
import { ref as f, h as H, nextTick as va, inject as se, provide as Me, watch as g, toRaw as Ze, shallowRef as Q, defineComponent as Z, reactive as ga, onMounted as Ie, onUnmounted as ie, createBlock as Ae, createCommentVNode as z, openBlock as w, unref as b, mergeProps as le, useAttrs as Ee, createElementBlock as $, createVNode as C, withCtx as K, createTextVNode as xe, toDisplayString as Y, Fragment as re, renderList as Ue, normalizeClass as ea, createElementVNode as ya } from "vue";
|
|
5
5
|
import { Switch as Sa, AutoComplete as ba, Input as Ia, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as xa, Radio as wa, Select as Oa, SelectOption as Ra } from "ant-design-vue";
|
|
6
6
|
import { createPinia as Ta, defineStore as ue } from "pinia";
|
|
7
7
|
import Pa from "pinia-plugin-persistedstate";
|
|
8
|
-
import { EnvConfig as
|
|
9
|
-
import { httpPost as
|
|
8
|
+
import { EnvConfig as Se, AppAction as Be, AppSource as ze, isMicroApp as j, isBaseMicroApp as ka, combineParams as ce } from "@skyfox2000/microbase";
|
|
9
|
+
import { httpPost as q, ResStatus as T, setToken as me, fieldMapping as La, parseFieldTemplate as be, API_HOST as $e, SERVER_HOST as Ma } from "@skyfox2000/fapi";
|
|
10
10
|
import E from "vue-m-message";
|
|
11
11
|
import { createRouter as $a, createWebHashHistory as Fa } from "vue-router";
|
|
12
12
|
import He from "async-validator";
|
|
@@ -176,12 +176,12 @@ const fe = {
|
|
|
176
176
|
}, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ce = "/login/", ge = [], Na = (e) => {
|
|
177
177
|
for (const t of e) {
|
|
178
178
|
const a = ge.findIndex((s) => s.path === t.path);
|
|
179
|
-
a !== -1 && ge.splice(a, 1), ge.push(t),
|
|
179
|
+
a !== -1 && ge.splice(a, 1), ge.push(t), we.addRoute(t);
|
|
180
180
|
}
|
|
181
181
|
}, aa = (e, t, a, s = "") => {
|
|
182
182
|
const n = s + (s ? "/" : "") + e.path;
|
|
183
183
|
t[n] = { ...e, parent: a }, e.children && e.children.forEach((o) => aa(o, t, e, n));
|
|
184
|
-
},
|
|
184
|
+
}, we = $a({
|
|
185
185
|
history: Fa("/"),
|
|
186
186
|
routes: ge
|
|
187
187
|
}), Da = (e, t) => {
|
|
@@ -191,9 +191,9 @@ const fe = {
|
|
|
191
191
|
return a.length === 0 && !s;
|
|
192
192
|
if (t) {
|
|
193
193
|
const r = _();
|
|
194
|
-
if (
|
|
194
|
+
if (Se.VITE_PERMISSION_MODE === "role")
|
|
195
195
|
return a.length === 0 ? !0 : r.hasRole(a);
|
|
196
|
-
if (
|
|
196
|
+
if (Se.VITE_PERMISSION_MODE === "permit") {
|
|
197
197
|
if (a.length === 0 && !s)
|
|
198
198
|
return !0;
|
|
199
199
|
let l = !1, u = !1;
|
|
@@ -202,7 +202,7 @@ const fe = {
|
|
|
202
202
|
}
|
|
203
203
|
return !1;
|
|
204
204
|
}, ne = f(null);
|
|
205
|
-
|
|
205
|
+
we.beforeEach((e, t, a) => {
|
|
206
206
|
var l;
|
|
207
207
|
const s = e;
|
|
208
208
|
if (e.path.startsWith("/error/") || e.path.startsWith(Ce))
|
|
@@ -302,20 +302,115 @@ const Ua = (e) => {
|
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
persist: !1
|
|
305
|
-
})
|
|
305
|
+
});
|
|
306
|
+
class A {
|
|
307
|
+
/**
|
|
308
|
+
* 检查是否在微前端环境中运行
|
|
309
|
+
* @returns boolean
|
|
310
|
+
*/
|
|
311
|
+
static isInMicroApp() {
|
|
312
|
+
return typeof window < "u" && !!window.microApp;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* 调用主应用方法的通用方法
|
|
316
|
+
* @param method 方法名
|
|
317
|
+
* @param params 参数
|
|
318
|
+
* @returns Promise
|
|
319
|
+
*/
|
|
320
|
+
static async callMainAppMethod(t, a) {
|
|
321
|
+
if (!this.isInMicroApp())
|
|
322
|
+
throw new Error(`未配置${t}接口!`);
|
|
323
|
+
const s = ++this.messageId, n = new Promise((r, l) => {
|
|
324
|
+
this.callbacks.set(s, { resolve: r, reject: l }), setTimeout(() => {
|
|
325
|
+
this.callbacks.has(s) && (this.callbacks.delete(s), l(new Error(`API调用超时: ${t}`)));
|
|
326
|
+
}, 1e4);
|
|
327
|
+
}), o = {
|
|
328
|
+
type: "API_REQUEST",
|
|
329
|
+
id: s,
|
|
330
|
+
method: t,
|
|
331
|
+
params: a
|
|
332
|
+
};
|
|
333
|
+
return window.microApp.dispatch(o), n;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* 处理来自主应用的响应数据
|
|
337
|
+
* @param data 响应数据
|
|
338
|
+
*/
|
|
339
|
+
static handleResponseData(t) {
|
|
340
|
+
if (t && t.type === "API_RESPONSE" && typeof t.id == "number") {
|
|
341
|
+
const { id: a, success: s, result: n, error: o } = t, r = this.callbacks.get(a);
|
|
342
|
+
r && (this.callbacks.delete(a), s ? r.resolve(n) : r.reject(new Error(o || "未知错误")));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* 初始化通信监听器
|
|
347
|
+
*/
|
|
348
|
+
static init() {
|
|
349
|
+
this.isInMicroApp() && window.microApp.addDataListener((t) => {
|
|
350
|
+
this.handleResponseData(t);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* 获取应用信息
|
|
355
|
+
*/
|
|
356
|
+
static async getAppInfo() {
|
|
357
|
+
return this.callMainAppMethod("getAppInfo");
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* 获取主机信息
|
|
361
|
+
*/
|
|
362
|
+
static async getHostInfo() {
|
|
363
|
+
return this.callMainAppMethod("getHostInfo");
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 获取用户信息
|
|
367
|
+
*/
|
|
368
|
+
static async getUserInfo() {
|
|
369
|
+
return this.callMainAppMethod("getUserInfo");
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* 获取授权令牌
|
|
373
|
+
*/
|
|
374
|
+
static async getToken() {
|
|
375
|
+
return this.callMainAppMethod("getToken");
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* 用户登出
|
|
379
|
+
*/
|
|
380
|
+
static async userLogout() {
|
|
381
|
+
return this.callMainAppMethod("userLogout");
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* 主应用推送
|
|
385
|
+
*/
|
|
386
|
+
static async mainAppPush(t) {
|
|
387
|
+
return this.callMainAppMethod("mainAppPush", t);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
L(A, "messageId", 0), L(A, "callbacks", /* @__PURE__ */ new Map());
|
|
391
|
+
A.init();
|
|
392
|
+
const ye = {
|
|
393
|
+
getAppInfo: A.getAppInfo.bind(A),
|
|
394
|
+
getHostInfo: A.getHostInfo.bind(A),
|
|
395
|
+
getUserInfo: A.getUserInfo.bind(A),
|
|
396
|
+
getToken: A.getToken.bind(A),
|
|
397
|
+
userLogout: A.userLogout.bind(A),
|
|
398
|
+
mainAppPush: A.mainAppPush.bind(A),
|
|
399
|
+
isInMicroApp: A.isInMicroApp.bind(A)
|
|
400
|
+
}, Ka = {
|
|
306
401
|
appList: {
|
|
307
402
|
api: "PLATFORM_API",
|
|
308
403
|
authorize: !0,
|
|
309
404
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
310
405
|
loadingText: !1
|
|
311
406
|
}
|
|
312
|
-
},
|
|
407
|
+
}, Fe = /* @__PURE__ */ new Map(), Qa = (e) => {
|
|
313
408
|
const t = _(), { roles: a, permission: s } = e.meta || {};
|
|
314
409
|
if (F(a) && F(s))
|
|
315
410
|
return !0;
|
|
316
|
-
if (
|
|
411
|
+
if (Se.VITE_PERMISSION_MODE === "role")
|
|
317
412
|
return F(a) ? !0 : t.hasRole(a);
|
|
318
|
-
if (
|
|
413
|
+
if (Se.VITE_PERMISSION_MODE === "permit") {
|
|
319
414
|
let n = !1, o = !1;
|
|
320
415
|
return F(a) || (n = t.hasRole(a)), t.isAdmin() ? n : (F(s) || (o = t.hasPermit(e.path, s)), n || o);
|
|
321
416
|
}
|
|
@@ -369,7 +464,7 @@ const Ua = (e) => {
|
|
|
369
464
|
});
|
|
370
465
|
},
|
|
371
466
|
async getRemoteAppList() {
|
|
372
|
-
return
|
|
467
|
+
return q(Ka.appList, {
|
|
373
468
|
Query: {
|
|
374
469
|
AppCode: this.appInfo.AppCode,
|
|
375
470
|
Enabled: 1
|
|
@@ -377,7 +472,7 @@ const Ua = (e) => {
|
|
|
377
472
|
}).then((e) => {
|
|
378
473
|
if ((e == null ? void 0 : e.status) === T.SUCCESS && e.data)
|
|
379
474
|
this.appList.length = 0, this.appList.push(...e.data);
|
|
380
|
-
else if ((e == null ? void 0 : e.errno) ==
|
|
475
|
+
else if ((e == null ? void 0 : e.errno) == Oe) {
|
|
381
476
|
_().logout(!1);
|
|
382
477
|
return;
|
|
383
478
|
}
|
|
@@ -413,7 +508,7 @@ const Ua = (e) => {
|
|
|
413
508
|
flattenRoutes: {},
|
|
414
509
|
Routes: t ?? [],
|
|
415
510
|
defaultPage: ""
|
|
416
|
-
}), (!
|
|
511
|
+
}), (!j() || !ka()) && (await _().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
417
512
|
},
|
|
418
513
|
/**
|
|
419
514
|
* 设置当前应用路由信息
|
|
@@ -435,9 +530,9 @@ const Ua = (e) => {
|
|
|
435
530
|
}), _().isLogin) {
|
|
436
531
|
const a = ta(this.appInfo.Routes);
|
|
437
532
|
if (Na(a), this.appInfo.defaultPage = sa(a) || "", this.appInfo.defaultPage) {
|
|
438
|
-
if (this.menuLoaded = !0,
|
|
533
|
+
if (this.menuLoaded = !0, j()) {
|
|
439
534
|
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
440
|
-
|
|
535
|
+
ye.mainAppPush(s);
|
|
441
536
|
}
|
|
442
537
|
Ua(this.appInfo.defaultPage);
|
|
443
538
|
}
|
|
@@ -458,9 +553,9 @@ const Ua = (e) => {
|
|
|
458
553
|
*/
|
|
459
554
|
push(e) {
|
|
460
555
|
this.findRoute(e) && Ve().setTabActive(e), va(() => {
|
|
461
|
-
if (
|
|
556
|
+
if (we.push({ path: e }), j()) {
|
|
462
557
|
const a = this.formatRoute(e);
|
|
463
|
-
|
|
558
|
+
ye.mainAppPush(a);
|
|
464
559
|
}
|
|
465
560
|
});
|
|
466
561
|
},
|
|
@@ -479,7 +574,7 @@ const Ua = (e) => {
|
|
|
479
574
|
* @returns 组件实例
|
|
480
575
|
*/
|
|
481
576
|
cacheComponent(e, t) {
|
|
482
|
-
let a =
|
|
577
|
+
let a = Fe.get(t.path);
|
|
483
578
|
if (!a)
|
|
484
579
|
if (this.CachedComponents.includes(t.path))
|
|
485
580
|
a = {
|
|
@@ -488,7 +583,7 @@ const Ua = (e) => {
|
|
|
488
583
|
render() {
|
|
489
584
|
return H(e);
|
|
490
585
|
}
|
|
491
|
-
},
|
|
586
|
+
}, Fe.set(t.path, a);
|
|
492
587
|
else return e;
|
|
493
588
|
return a;
|
|
494
589
|
},
|
|
@@ -497,7 +592,7 @@ const Ua = (e) => {
|
|
|
497
592
|
* @param path 路由地址
|
|
498
593
|
*/
|
|
499
594
|
excludeComponent(e) {
|
|
500
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
595
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Fe.delete(e);
|
|
501
596
|
},
|
|
502
597
|
/**
|
|
503
598
|
* 路由路径层级查询,返回面包屑
|
|
@@ -528,11 +623,11 @@ const Ua = (e) => {
|
|
|
528
623
|
}, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
|
|
529
624
|
},
|
|
530
625
|
logout() {
|
|
531
|
-
this.clean(), window.location.assign("/");
|
|
626
|
+
this.clean(), j() ? ye.mainAppPush("/") : window.location.assign("/");
|
|
532
627
|
}
|
|
533
628
|
},
|
|
534
629
|
persist: !1
|
|
535
|
-
}), Ja = "Token解析失败",
|
|
630
|
+
}), Ja = "Token解析失败", Oe = 1400, Ke = {
|
|
536
631
|
login: {
|
|
537
632
|
api: "PLATFORM_API",
|
|
538
633
|
url: "/openapi/LoginSrv/login",
|
|
@@ -557,17 +652,17 @@ const Ua = (e) => {
|
|
|
557
652
|
},
|
|
558
653
|
Query: e
|
|
559
654
|
};
|
|
560
|
-
return
|
|
655
|
+
return q(Ke.login, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a : null);
|
|
561
656
|
}, Ga = (e) => {
|
|
562
657
|
let t = {
|
|
563
658
|
Query: {
|
|
564
659
|
AppId: e
|
|
565
660
|
}
|
|
566
661
|
};
|
|
567
|
-
return
|
|
662
|
+
return q(Ke.auth, t).then((a) => {
|
|
568
663
|
if ((a == null ? void 0 : a.status) === T.SUCCESS)
|
|
569
664
|
return a.data;
|
|
570
|
-
if ((a == null ? void 0 : a.errno) ==
|
|
665
|
+
if ((a == null ? void 0 : a.errno) == Oe) {
|
|
571
666
|
_().logout(!1);
|
|
572
667
|
return;
|
|
573
668
|
}
|
|
@@ -578,7 +673,7 @@ const Ua = (e) => {
|
|
|
578
673
|
Option: {},
|
|
579
674
|
Query: {}
|
|
580
675
|
};
|
|
581
|
-
return
|
|
676
|
+
return q(Ke.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
|
|
582
677
|
}, Wa = (e) => {
|
|
583
678
|
try {
|
|
584
679
|
const t = JSON.parse(atob(e.token.split(".")[1]));
|
|
@@ -604,7 +699,7 @@ const Ua = (e) => {
|
|
|
604
699
|
* 启动时初始化用户信息
|
|
605
700
|
*/
|
|
606
701
|
init() {
|
|
607
|
-
|
|
702
|
+
j() || (this.token ? (me(this.token), M.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
|
|
608
703
|
},
|
|
609
704
|
/**
|
|
610
705
|
* 登录操作
|
|
@@ -749,7 +844,7 @@ const Ua = (e) => {
|
|
|
749
844
|
return Promise.resolve();
|
|
750
845
|
}
|
|
751
846
|
},
|
|
752
|
-
persist:
|
|
847
|
+
persist: j() ? !1 : {
|
|
753
848
|
key: "MICROAPP_USER_INFO",
|
|
754
849
|
storage: localStorage,
|
|
755
850
|
pick: ["token", "userInfo"],
|
|
@@ -758,7 +853,7 @@ const Ua = (e) => {
|
|
|
758
853
|
e.store.init();
|
|
759
854
|
}
|
|
760
855
|
}
|
|
761
|
-
}),
|
|
856
|
+
}), Re = (e, t) => {
|
|
762
857
|
var n;
|
|
763
858
|
const a = e.page;
|
|
764
859
|
return {
|
|
@@ -768,7 +863,7 @@ const Ua = (e) => {
|
|
|
768
863
|
...t.url,
|
|
769
864
|
loadingText: t.loadingText
|
|
770
865
|
};
|
|
771
|
-
},
|
|
866
|
+
}, Te = (e, t) => {
|
|
772
867
|
const a = e.page, s = t.url;
|
|
773
868
|
if (!s || !s.url) {
|
|
774
869
|
const o = `URL未设置: ${t.urlKey}`;
|
|
@@ -779,12 +874,12 @@ const Ua = (e) => {
|
|
|
779
874
|
JSON.parse(JSON.stringify(s.params ?? {})),
|
|
780
875
|
JSON.parse(JSON.stringify(t.params ?? {}))
|
|
781
876
|
);
|
|
782
|
-
return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0),
|
|
877
|
+
return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), q(s, n).then((o) => (t.loadingState && (t.loadingState.value = !1), (o == null ? void 0 : o.errno) == Oe ? (_().logout(!1), null) : o)).catch((o) => (t.loadingState && (t.loadingState.value = !1), null));
|
|
783
878
|
}, Qe = (e, t) => {
|
|
784
879
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
785
|
-
const a =
|
|
786
|
-
return t.url = a,
|
|
787
|
-
}, Lt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url =
|
|
880
|
+
const a = Re(e, t);
|
|
881
|
+
return t.url = a, Te(e, t);
|
|
882
|
+
}, Lt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Re(e, t), Te(e, t).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && (t.hideErrorToast || E.success("执行成功!")), a))), na = (e, t = {}) => {
|
|
788
883
|
const a = t.primaryKey || "Id";
|
|
789
884
|
if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
|
|
790
885
|
return E.error("错误!无保存数据!"), Promise.resolve(null);
|
|
@@ -794,8 +889,8 @@ const Ua = (e) => {
|
|
|
794
889
|
loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
|
|
795
890
|
};
|
|
796
891
|
s.params.Query[a] = s.params.Data[a];
|
|
797
|
-
const n =
|
|
798
|
-
return s.url = n,
|
|
892
|
+
const n = Re(e, s);
|
|
893
|
+
return s.url = n, Te(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || E.success("保存成功!")), o));
|
|
799
894
|
}, Ba = (e, t, a = {}) => {
|
|
800
895
|
const s = a.primaryKey || "Id";
|
|
801
896
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
@@ -806,8 +901,8 @@ const Ua = (e) => {
|
|
|
806
901
|
};
|
|
807
902
|
if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], F(n.params.Query) || F(n.params.Query[s]))
|
|
808
903
|
return E.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
809
|
-
const o =
|
|
810
|
-
return n.url = o,
|
|
904
|
+
const o = Re(e, n);
|
|
905
|
+
return n.url = o, Te(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || E.success("删除成功!")), r));
|
|
811
906
|
}, za = (e, t) => Qe(e, {
|
|
812
907
|
urlKey: "tree",
|
|
813
908
|
params: {},
|
|
@@ -965,9 +1060,9 @@ const Mt = (e) => {
|
|
|
965
1060
|
}
|
|
966
1061
|
}), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
|
|
967
1062
|
}, _t = (e, t) => {
|
|
968
|
-
|
|
1063
|
+
Me(U.LabelText, e.label || ""), Me(U.RuleKey, e.rule || "");
|
|
969
1064
|
const a = Ca(e, t);
|
|
970
|
-
return
|
|
1065
|
+
return Me(U.ErrInfo, a), a;
|
|
971
1066
|
}, Nt = (e) => {
|
|
972
1067
|
ra(e);
|
|
973
1068
|
}, Dt = (e) => {
|
|
@@ -1046,7 +1141,7 @@ const Mt = (e) => {
|
|
|
1046
1141
|
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Je(e);
|
|
1047
1142
|
}, Kt = (e, t) => {
|
|
1048
1143
|
const a = _();
|
|
1049
|
-
return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(
|
|
1144
|
+
return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(we.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
|
|
1050
1145
|
if (!t) {
|
|
1051
1146
|
if (n.visible === !1)
|
|
1052
1147
|
return !1;
|
|
@@ -1228,11 +1323,11 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1228
1323
|
},
|
|
1229
1324
|
...o
|
|
1230
1325
|
};
|
|
1231
|
-
return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), t.optionQuery = s, t.isOptionLoading.value = !0,
|
|
1326
|
+
return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), t.optionQuery = s, t.isOptionLoading.value = !0, q(l, s).then((u) => {
|
|
1232
1327
|
if ((u == null ? void 0 : u.status) === T.SUCCESS) {
|
|
1233
1328
|
if (u.data)
|
|
1234
1329
|
return u.data;
|
|
1235
|
-
} else if ((u == null ? void 0 : u.errno) ==
|
|
1330
|
+
} else if ((u == null ? void 0 : u.errno) == Oe) {
|
|
1236
1331
|
_().logout(!1);
|
|
1237
1332
|
return;
|
|
1238
1333
|
}
|
|
@@ -1260,7 +1355,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1260
1355
|
const o = n([e], t);
|
|
1261
1356
|
return o.length > 0 ? o[0] : void 0;
|
|
1262
1357
|
}
|
|
1263
|
-
},
|
|
1358
|
+
}, Pe = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], te = (e, t, a) => {
|
|
1264
1359
|
const s = t.split(".");
|
|
1265
1360
|
let n = e;
|
|
1266
1361
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -1281,7 +1376,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1281
1376
|
try {
|
|
1282
1377
|
const l = parseInt(((r = n.match(/\$\{(\d+)\}/)) == null ? void 0 : r[1]) ?? "0"), u = a[l], i = n.replace(/\$\{\d+\}\./, "");
|
|
1283
1378
|
if (i && u) {
|
|
1284
|
-
const c =
|
|
1379
|
+
const c = be(i, u);
|
|
1285
1380
|
te(e, s, c);
|
|
1286
1381
|
} else
|
|
1287
1382
|
te(e, s, u);
|
|
@@ -1292,12 +1387,12 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1292
1387
|
console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
|
|
1293
1388
|
}) : Object.entries(t).forEach(([s, n]) => {
|
|
1294
1389
|
if (n.includes("${")) {
|
|
1295
|
-
const o =
|
|
1390
|
+
const o = be(n, a);
|
|
1296
1391
|
te(e, s, o);
|
|
1297
1392
|
} else
|
|
1298
1393
|
te(e, s, a[n]);
|
|
1299
1394
|
});
|
|
1300
|
-
},
|
|
1395
|
+
}, ke = (e, t, a) => {
|
|
1301
1396
|
var o, r;
|
|
1302
1397
|
const s = (o = e.inputFactory) == null ? void 0 : o.value;
|
|
1303
1398
|
s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && pe(s.editorCtrl), e.selected.value = a;
|
|
@@ -1307,7 +1402,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1307
1402
|
if (u)
|
|
1308
1403
|
if (Array.isArray(l))
|
|
1309
1404
|
l.every((i) => {
|
|
1310
|
-
const c =
|
|
1405
|
+
const c = be(u, { selectedValues: a });
|
|
1311
1406
|
try {
|
|
1312
1407
|
const p = JSON.parse(c);
|
|
1313
1408
|
B.emit(i, p, a, n);
|
|
@@ -1316,7 +1411,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1316
1411
|
}
|
|
1317
1412
|
});
|
|
1318
1413
|
else {
|
|
1319
|
-
const i =
|
|
1414
|
+
const i = be(u, { selectedValues: a });
|
|
1320
1415
|
try {
|
|
1321
1416
|
const c = JSON.parse(i);
|
|
1322
1417
|
B.emit(l, c, a, n);
|
|
@@ -1382,10 +1477,10 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1382
1477
|
...S.TreeOption,
|
|
1383
1478
|
...e.treeOption
|
|
1384
1479
|
};
|
|
1385
|
-
},
|
|
1480
|
+
}, Le = (e) => {
|
|
1386
1481
|
for (let t in e.urls)
|
|
1387
1482
|
e.urls[t].api || (e.urls[t].api = e.api), e.urls[t].authorize === void 0 && (e.urls[t].authorize = e.authorize);
|
|
1388
|
-
}, nt = (e, t, a, s) => (
|
|
1483
|
+
}, nt = (e, t, a, s) => (Le(e), {
|
|
1389
1484
|
editorCtrl: {
|
|
1390
1485
|
...S.EditorOption,
|
|
1391
1486
|
name: "",
|
|
@@ -1402,7 +1497,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1402
1497
|
isFormLoading: f(!1)
|
|
1403
1498
|
}
|
|
1404
1499
|
}), rt = (e, t, a) => {
|
|
1405
|
-
|
|
1500
|
+
Le(e);
|
|
1406
1501
|
const s = {
|
|
1407
1502
|
...S.GridOption,
|
|
1408
1503
|
tableSize: f(S.GridOption.tableSize.value),
|
|
@@ -1441,7 +1536,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1441
1536
|
gridCtrl: s
|
|
1442
1537
|
};
|
|
1443
1538
|
}, Bt = (e, t) => {
|
|
1444
|
-
|
|
1539
|
+
Le(e);
|
|
1445
1540
|
const a = {
|
|
1446
1541
|
...S.TreeOption,
|
|
1447
1542
|
reload: f(!1),
|
|
@@ -1484,7 +1579,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1484
1579
|
optionCtrl: a
|
|
1485
1580
|
};
|
|
1486
1581
|
}, zt = (e, t, a) => {
|
|
1487
|
-
|
|
1582
|
+
Le(e);
|
|
1488
1583
|
const s = {
|
|
1489
1584
|
...S.PageOption,
|
|
1490
1585
|
...e
|
|
@@ -1494,12 +1589,12 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1494
1589
|
editorCtrl: n,
|
|
1495
1590
|
gridCtrl: o
|
|
1496
1591
|
};
|
|
1497
|
-
}, ot = 7 * 24 * 60 * 60 * 1e3,
|
|
1592
|
+
}, ot = 7 * 24 * 60 * 60 * 1e3, _e = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), G = f({}), Ct = G, Yt = (e) => {
|
|
1498
1593
|
var n;
|
|
1499
1594
|
if (!e.iconUrl) return De;
|
|
1500
1595
|
const t = f(!0), a = f("");
|
|
1501
1596
|
let s = !0;
|
|
1502
|
-
return (n = e.icons) != null && n.length && (s = e.icons.every((o) =>
|
|
1597
|
+
return (n = e.icons) != null && n.length && (s = e.icons.every((o) => G.value[o] !== void 0)), (e.icon && !G.value[e.icon] || !s) && it(e, t).then(() => {
|
|
1503
1598
|
ct(e.iconUrl, e.monoColor || !1), t.value = !0;
|
|
1504
1599
|
}), Z({
|
|
1505
1600
|
props: {
|
|
@@ -1544,7 +1639,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1544
1639
|
},
|
|
1545
1640
|
{ immediate: !0 }
|
|
1546
1641
|
), g(
|
|
1547
|
-
() =>
|
|
1642
|
+
() => G.value,
|
|
1548
1643
|
() => {
|
|
1549
1644
|
ve(a, l, l.value);
|
|
1550
1645
|
},
|
|
@@ -1577,16 +1672,16 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1577
1672
|
let a = e.iconUrl;
|
|
1578
1673
|
if (!a)
|
|
1579
1674
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1580
|
-
if (
|
|
1675
|
+
if (_e.has(a))
|
|
1581
1676
|
return Promise.resolve();
|
|
1582
1677
|
const s = pa(a);
|
|
1583
1678
|
if (s)
|
|
1584
1679
|
return new Promise(async (o) => (fa(s.scriptContent), o()));
|
|
1585
1680
|
t.value = !1;
|
|
1586
1681
|
const n = new Promise(async (o) => {
|
|
1587
|
-
await lt(a, e.monoColor || !1), o(),
|
|
1682
|
+
await lt(a, e.monoColor || !1), o(), _e.delete(a);
|
|
1588
1683
|
});
|
|
1589
|
-
return
|
|
1684
|
+
return _e.set(a, n), n;
|
|
1590
1685
|
}, lt = async (e, t) => {
|
|
1591
1686
|
try {
|
|
1592
1687
|
const a = await fetch(e);
|
|
@@ -1640,7 +1735,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1640
1735
|
}
|
|
1641
1736
|
}, ve = (e, t, a) => {
|
|
1642
1737
|
setTimeout(() => {
|
|
1643
|
-
t.value = a, t.value && (e.value =
|
|
1738
|
+
t.value = a, t.value && (e.value = G.value[t.value]);
|
|
1644
1739
|
}, 1);
|
|
1645
1740
|
}, De = H(
|
|
1646
1741
|
"svg",
|
|
@@ -1673,7 +1768,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1673
1768
|
const u = l.id, i = Array.from(r).find((c) => c.id === u);
|
|
1674
1769
|
i && t && (i.innerHTML = l.innerHTML, i.querySelectorAll("*").forEach((c) => {
|
|
1675
1770
|
c.hasAttribute("fill") && c.removeAttribute("fill");
|
|
1676
|
-
})),
|
|
1771
|
+
})), G.value[u] || (G.value[u] = H("svg", { fill: "currentColor" }, [H("use", { "xlink:href": `#${u}` })]));
|
|
1677
1772
|
}
|
|
1678
1773
|
}, pt = (e, t) => {
|
|
1679
1774
|
let a = "";
|
|
@@ -1745,28 +1840,28 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1745
1840
|
* 加载站点信息
|
|
1746
1841
|
* @param hostApi 启动配置主机地址
|
|
1747
1842
|
* @param hostKey 站点信息,默认为当前主域名
|
|
1748
|
-
* @param mainOpenApis 宿主机开放接口
|
|
1749
1843
|
*/
|
|
1750
|
-
async loadHostInfo(e, t
|
|
1751
|
-
if (
|
|
1752
|
-
|
|
1844
|
+
async loadHostInfo(e, t) {
|
|
1845
|
+
if (j()) {
|
|
1846
|
+
const s = await ye.getHostInfo();
|
|
1847
|
+
this._setHostInfo(s);
|
|
1753
1848
|
return;
|
|
1754
1849
|
}
|
|
1755
|
-
let
|
|
1756
|
-
return (!
|
|
1757
|
-
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1850
|
+
let a = (e || this.getSiteHostApi()).trim();
|
|
1851
|
+
return (!a || a === "/") && (a = window.location.origin), a.endsWith("/") && (a = a.slice(0, -1)), new Promise((s) => {
|
|
1852
|
+
$e.SITEHOST_API || ($e.SITEHOST_API = a);
|
|
1853
|
+
const n = t || window.location.origin;
|
|
1854
|
+
q(dt.host, {
|
|
1760
1855
|
Query: {
|
|
1761
|
-
Host:
|
|
1856
|
+
Host: n
|
|
1762
1857
|
}
|
|
1763
|
-
}).then((
|
|
1764
|
-
if ((
|
|
1765
|
-
const
|
|
1766
|
-
this._setHostInfo(
|
|
1858
|
+
}).then((o) => {
|
|
1859
|
+
if ((o == null ? void 0 : o.status) === T.SUCCESS && o.data) {
|
|
1860
|
+
const r = o.data;
|
|
1861
|
+
this._setHostInfo(r);
|
|
1767
1862
|
} else
|
|
1768
1863
|
this._setHostInfo(null);
|
|
1769
|
-
|
|
1864
|
+
s();
|
|
1770
1865
|
});
|
|
1771
1866
|
});
|
|
1772
1867
|
},
|
|
@@ -1794,7 +1889,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1794
1889
|
}, this.hostInfo.API_HOST)
|
|
1795
1890
|
for (const t in this.hostInfo.API_HOST) {
|
|
1796
1891
|
let a = this.hostInfo.API_HOST[t];
|
|
1797
|
-
a = a.startsWith("http://") || a.startsWith("https://") || a.startsWith("//") ? a : window.location.origin + a, a.endsWith("/") && (a = a.slice(0, -1)), this.hostInfo.API_HOST[t] = a,
|
|
1892
|
+
a = a.startsWith("http://") || a.startsWith("https://") || a.startsWith("//") ? a : window.location.origin + a, a.endsWith("/") && (a = a.slice(0, -1)), this.hostInfo.API_HOST[t] = a, $e[t] = a;
|
|
1798
1893
|
}
|
|
1799
1894
|
if (this.hostInfo.SERVER_HOST)
|
|
1800
1895
|
for (const t in this.hostInfo.SERVER_HOST) {
|
|
@@ -1813,102 +1908,7 @@ const B = new et(), ee = (e, t, a) => {
|
|
|
1813
1908
|
// storage: localStorage,
|
|
1814
1909
|
// pick: ['hostInfo'],
|
|
1815
1910
|
// },
|
|
1816
|
-
})
|
|
1817
|
-
class A {
|
|
1818
|
-
/**
|
|
1819
|
-
* 检查是否在微前端环境中运行
|
|
1820
|
-
* @returns boolean
|
|
1821
|
-
*/
|
|
1822
|
-
static isInMicroApp() {
|
|
1823
|
-
return typeof window < "u" && !!window.microApp;
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* 调用主应用方法的通用方法
|
|
1827
|
-
* @param method 方法名
|
|
1828
|
-
* @param params 参数
|
|
1829
|
-
* @returns Promise
|
|
1830
|
-
*/
|
|
1831
|
-
static async callMainAppMethod(t, a) {
|
|
1832
|
-
if (!this.isInMicroApp())
|
|
1833
|
-
throw new Error(`未配置${t}接口!`);
|
|
1834
|
-
const s = ++this.messageId, n = new Promise((r, l) => {
|
|
1835
|
-
this.callbacks.set(s, { resolve: r, reject: l }), setTimeout(() => {
|
|
1836
|
-
this.callbacks.has(s) && (this.callbacks.delete(s), l(new Error(`API调用超时: ${t}`)));
|
|
1837
|
-
}, 1e4);
|
|
1838
|
-
}), o = {
|
|
1839
|
-
type: "API_REQUEST",
|
|
1840
|
-
id: s,
|
|
1841
|
-
method: t,
|
|
1842
|
-
params: a
|
|
1843
|
-
};
|
|
1844
|
-
return window.microApp.dispatch(o), n;
|
|
1845
|
-
}
|
|
1846
|
-
/**
|
|
1847
|
-
* 处理来自主应用的响应数据
|
|
1848
|
-
* @param data 响应数据
|
|
1849
|
-
*/
|
|
1850
|
-
static handleResponseData(t) {
|
|
1851
|
-
if (t && t.type === "API_RESPONSE" && typeof t.id == "number") {
|
|
1852
|
-
const { id: a, success: s, result: n, error: o } = t, r = this.callbacks.get(a);
|
|
1853
|
-
r && (this.callbacks.delete(a), s ? r.resolve(n) : r.reject(new Error(o || "未知错误")));
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
/**
|
|
1857
|
-
* 初始化通信监听器
|
|
1858
|
-
*/
|
|
1859
|
-
static init() {
|
|
1860
|
-
this.isInMicroApp() && window.microApp.addDataListener((t) => {
|
|
1861
|
-
console.log("收到来自主应用的数据:", t), this.handleResponseData(t);
|
|
1862
|
-
});
|
|
1863
|
-
}
|
|
1864
|
-
/**
|
|
1865
|
-
* 获取应用信息
|
|
1866
|
-
*/
|
|
1867
|
-
static async getAppInfo() {
|
|
1868
|
-
return this.callMainAppMethod("getAppInfo");
|
|
1869
|
-
}
|
|
1870
|
-
/**
|
|
1871
|
-
* 获取主机信息
|
|
1872
|
-
*/
|
|
1873
|
-
static async getHostInfo() {
|
|
1874
|
-
return this.callMainAppMethod("getHostInfo");
|
|
1875
|
-
}
|
|
1876
|
-
/**
|
|
1877
|
-
* 获取用户信息
|
|
1878
|
-
*/
|
|
1879
|
-
static async getUserInfo() {
|
|
1880
|
-
return this.callMainAppMethod("getUserInfo");
|
|
1881
|
-
}
|
|
1882
|
-
/**
|
|
1883
|
-
* 获取授权令牌
|
|
1884
|
-
*/
|
|
1885
|
-
static async getToken() {
|
|
1886
|
-
return this.callMainAppMethod("getToken");
|
|
1887
|
-
}
|
|
1888
|
-
/**
|
|
1889
|
-
* 用户登出
|
|
1890
|
-
*/
|
|
1891
|
-
static async userLogout() {
|
|
1892
|
-
return this.callMainAppMethod("userLogout");
|
|
1893
|
-
}
|
|
1894
|
-
/**
|
|
1895
|
-
* 主应用推送
|
|
1896
|
-
*/
|
|
1897
|
-
static async mainAppPush(t) {
|
|
1898
|
-
return this.callMainAppMethod("mainAppPush", t);
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
L(A, "messageId", 0), L(A, "callbacks", /* @__PURE__ */ new Map());
|
|
1902
|
-
A.init();
|
|
1903
|
-
const ts = {
|
|
1904
|
-
getAppInfo: A.getAppInfo.bind(A),
|
|
1905
|
-
getHostInfo: A.getHostInfo.bind(A),
|
|
1906
|
-
getUserInfo: A.getUserInfo.bind(A),
|
|
1907
|
-
getToken: A.getToken.bind(A),
|
|
1908
|
-
userLogout: A.userLogout.bind(A),
|
|
1909
|
-
mainAppPush: A.mainAppPush.bind(A),
|
|
1910
|
-
isInMicroApp: A.isInMicroApp.bind(A)
|
|
1911
|
-
}, ss = ue("settingInfo", {
|
|
1911
|
+
}), ts = ue("settingInfo", {
|
|
1912
1912
|
state: () => ({
|
|
1913
1913
|
fullscreen: !1,
|
|
1914
1914
|
menuCollapse: !1,
|
|
@@ -1950,7 +1950,7 @@ const ts = {
|
|
|
1950
1950
|
}
|
|
1951
1951
|
},
|
|
1952
1952
|
persist: !1
|
|
1953
|
-
}),
|
|
1953
|
+
}), ss = /* @__PURE__ */ Z({
|
|
1954
1954
|
__name: "index",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
...fe,
|
|
@@ -1977,7 +1977,7 @@ const ts = {
|
|
|
1977
1977
|
const l = t, { editorCtrl: u, errInfo: i } = X(), c = (p) => {
|
|
1978
1978
|
i != null && i.value.errClass && u && pe(u), l("change", p);
|
|
1979
1979
|
};
|
|
1980
|
-
return
|
|
1980
|
+
return Ie(() => {
|
|
1981
1981
|
if (!a.data || a.data.length != 2) {
|
|
1982
1982
|
console.error("Switch组件: ", a.data), E.error("Switch组件必须有且只有两个选项");
|
|
1983
1983
|
return;
|
|
@@ -1987,7 +1987,7 @@ const ts = {
|
|
|
1987
1987
|
o && de(o, a);
|
|
1988
1988
|
}), (p, v) => {
|
|
1989
1989
|
var d;
|
|
1990
|
-
return r.value.length === 2 ? (w(),
|
|
1990
|
+
return r.value.length === 2 ? (w(), Ae(b(Sa), le({
|
|
1991
1991
|
key: 0,
|
|
1992
1992
|
class: [
|
|
1993
1993
|
((d = b(i)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
|
|
@@ -2002,7 +2002,7 @@ const ts = {
|
|
|
2002
2002
|
}, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : z("", !0);
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
|
-
}),
|
|
2005
|
+
}), ns = /* @__PURE__ */ Z({
|
|
2006
2006
|
inheritAttrs: !1,
|
|
2007
2007
|
__name: "index",
|
|
2008
2008
|
props: {
|
|
@@ -2023,7 +2023,7 @@ const ts = {
|
|
|
2023
2023
|
},
|
|
2024
2024
|
emits: ["update:value", "select", "change", "update:labels"],
|
|
2025
2025
|
setup(e, { emit: t }) {
|
|
2026
|
-
const a = e, s =
|
|
2026
|
+
const a = e, s = Ee(), n = X(), o = he(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
|
|
2027
2027
|
r.inputFactory = Q(n), r.fieldMap = {
|
|
2028
2028
|
label: "Name",
|
|
2029
2029
|
value: "Id",
|
|
@@ -2061,9 +2061,9 @@ const ts = {
|
|
|
2061
2061
|
};
|
|
2062
2062
|
r.params = ce(r.params, h), r && ee(!0, r, a);
|
|
2063
2063
|
}, O = (y) => {
|
|
2064
|
-
const x =
|
|
2064
|
+
const x = ke(r, a, y);
|
|
2065
2065
|
p("update:value", y), p("select", y);
|
|
2066
|
-
const h =
|
|
2066
|
+
const h = Pe(x);
|
|
2067
2067
|
p("update:labels", h), i != null && i.value.errClass && u && pe(u);
|
|
2068
2068
|
};
|
|
2069
2069
|
return ie(() => {
|
|
@@ -2080,7 +2080,7 @@ const ts = {
|
|
|
2080
2080
|
onSelect: O
|
|
2081
2081
|
}, b(s), { "allow-clear": !1 }), {
|
|
2082
2082
|
option: K(({ label: I }) => [
|
|
2083
|
-
|
|
2083
|
+
xe(Y(I), 1)
|
|
2084
2084
|
]),
|
|
2085
2085
|
default: K(() => [
|
|
2086
2086
|
C(b(Ia), {
|
|
@@ -2096,7 +2096,7 @@ const ts = {
|
|
|
2096
2096
|
}), ht = { class: "min-h-[32px] pt-[5px]" }, mt = {
|
|
2097
2097
|
key: 1,
|
|
2098
2098
|
class: "text-center text-gray-500"
|
|
2099
|
-
},
|
|
2099
|
+
}, rs = /* @__PURE__ */ Z({
|
|
2100
2100
|
inheritAttrs: !1,
|
|
2101
2101
|
__name: "index",
|
|
2102
2102
|
props: {
|
|
@@ -2118,7 +2118,7 @@ const ts = {
|
|
|
2118
2118
|
emits: ["change", "update:labels"],
|
|
2119
2119
|
setup(e, { emit: t }) {
|
|
2120
2120
|
var v, d, O;
|
|
2121
|
-
const a = e, s =
|
|
2121
|
+
const a = e, s = Ee(), n = X(), o = he(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
|
|
2122
2122
|
r.inputFactory = Q(n);
|
|
2123
2123
|
const l = f({
|
|
2124
2124
|
...r == null ? void 0 : r.url,
|
|
@@ -2137,10 +2137,10 @@ const ts = {
|
|
|
2137
2137
|
{ immediate: !0, deep: !0 }
|
|
2138
2138
|
);
|
|
2139
2139
|
const p = (y) => {
|
|
2140
|
-
const h =
|
|
2140
|
+
const h = ke(r, a, y), I = Pe(h);
|
|
2141
2141
|
i("update:labels", I);
|
|
2142
2142
|
};
|
|
2143
|
-
return
|
|
2143
|
+
return Ie(() => {
|
|
2144
2144
|
l.value && !l.value.fieldMap && (l.value.fieldMap = {
|
|
2145
2145
|
title: "Name",
|
|
2146
2146
|
label: "Name",
|
|
@@ -2157,7 +2157,7 @@ const ts = {
|
|
|
2157
2157
|
default: K(() => [
|
|
2158
2158
|
c.value.length > 0 ? (w(!0), $(re, { key: 0 }, Ue(c.value, (h) => {
|
|
2159
2159
|
var I;
|
|
2160
|
-
return w(),
|
|
2160
|
+
return w(), Ae(b(Ea), {
|
|
2161
2161
|
key: h.value,
|
|
2162
2162
|
value: h.value,
|
|
2163
2163
|
disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
|
|
@@ -2169,7 +2169,7 @@ const ts = {
|
|
|
2169
2169
|
])
|
|
2170
2170
|
}, {
|
|
2171
2171
|
default: K(() => [
|
|
2172
|
-
|
|
2172
|
+
xe(Y(h.label), 1)
|
|
2173
2173
|
]),
|
|
2174
2174
|
_: 2
|
|
2175
2175
|
}, 1032, ["value", "disabled", "class"]);
|
|
@@ -2182,7 +2182,7 @@ const ts = {
|
|
|
2182
2182
|
}), vt = { class: "min-h-[32px] pt-1" }, gt = {
|
|
2183
2183
|
key: 1,
|
|
2184
2184
|
class: "text-center text-gray-500"
|
|
2185
|
-
},
|
|
2185
|
+
}, os = /* @__PURE__ */ Z({
|
|
2186
2186
|
inheritAttrs: !1,
|
|
2187
2187
|
__name: "index",
|
|
2188
2188
|
props: {
|
|
@@ -2205,7 +2205,7 @@ const ts = {
|
|
|
2205
2205
|
emits: ["change", "update:value", "update:labels"],
|
|
2206
2206
|
setup(e, { emit: t }) {
|
|
2207
2207
|
var O, y, x;
|
|
2208
|
-
const a = e, s =
|
|
2208
|
+
const a = e, s = Ee(), n = X(), o = he(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
|
|
2209
2209
|
r.inputFactory = Q(n);
|
|
2210
2210
|
const l = f({
|
|
2211
2211
|
...r == null ? void 0 : r.url,
|
|
@@ -2238,10 +2238,10 @@ const ts = {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
return h === I;
|
|
2240
2240
|
}, d = (h) => {
|
|
2241
|
-
const I = h.target.value, R =
|
|
2241
|
+
const I = h.target.value, R = ke(r, a, I), J = Pe(R);
|
|
2242
2242
|
p("update:labels", J);
|
|
2243
2243
|
};
|
|
2244
|
-
return
|
|
2244
|
+
return Ie(() => {
|
|
2245
2245
|
l.value && !l.value.fieldMap && (l.value.fieldMap = {
|
|
2246
2246
|
label: "Name",
|
|
2247
2247
|
value: "Id",
|
|
@@ -2263,7 +2263,7 @@ const ts = {
|
|
|
2263
2263
|
return w(), $(re, {
|
|
2264
2264
|
key: R.value
|
|
2265
2265
|
}, [
|
|
2266
|
-
R.visible !== !1 ? (w(),
|
|
2266
|
+
R.visible !== !1 ? (w(), Ae(b(wa), {
|
|
2267
2267
|
key: 0,
|
|
2268
2268
|
checked: v(R.value, a.value),
|
|
2269
2269
|
value: R.value,
|
|
@@ -2275,7 +2275,7 @@ const ts = {
|
|
|
2275
2275
|
])
|
|
2276
2276
|
}, {
|
|
2277
2277
|
default: K(() => [
|
|
2278
|
-
|
|
2278
|
+
xe(Y(R.label), 1)
|
|
2279
2279
|
]),
|
|
2280
2280
|
_: 2
|
|
2281
2281
|
}, 1032, ["checked", "value", "class"])) : z("", !0)
|
|
@@ -2289,7 +2289,7 @@ const ts = {
|
|
|
2289
2289
|
}), yt = {
|
|
2290
2290
|
key: 0,
|
|
2291
2291
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
2292
|
-
},
|
|
2292
|
+
}, is = /* @__PURE__ */ Z({
|
|
2293
2293
|
inheritAttrs: !1,
|
|
2294
2294
|
__name: "index",
|
|
2295
2295
|
props: {
|
|
@@ -2327,7 +2327,7 @@ const ts = {
|
|
|
2327
2327
|
var I, R, J;
|
|
2328
2328
|
const a = e, s = a.value === void 0 ? !0 : a.undefValue, n = X(), { editorCtrl: o, errInfo: r, labelText: l } = n, u = he(a.url, a), i = a.optionCtrl ?? u.optionCtrl;
|
|
2329
2329
|
i.inputFactory = Q(n);
|
|
2330
|
-
const c =
|
|
2330
|
+
const c = Ee(), p = f({
|
|
2331
2331
|
...i == null ? void 0 : i.url,
|
|
2332
2332
|
url: ((I = i == null ? void 0 : i.url) == null ? void 0 : I.url) || "",
|
|
2333
2333
|
fieldMap: (i == null ? void 0 : i.fieldMap) || ((R = i == null ? void 0 : i.url) == null ? void 0 : R.fieldMap),
|
|
@@ -2336,7 +2336,7 @@ const ts = {
|
|
|
2336
2336
|
}), v = f(c.placeholder), d = f(i == null ? void 0 : i.selected.value), O = t;
|
|
2337
2337
|
n.inputEmit = O;
|
|
2338
2338
|
const y = (m) => {
|
|
2339
|
-
const k =
|
|
2339
|
+
const k = ke(i, a, m), D = Pe(k);
|
|
2340
2340
|
d.value = m, O("update:labels", D), O("update:label", D.join(";")), O("change", m), r != null && r.value.errClass && o && pe(o);
|
|
2341
2341
|
}, x = f((i == null ? void 0 : i.options.value) || []), h = (m) => {
|
|
2342
2342
|
if (m.length > 0 && F(a.value) && a.selectFirst)
|
|
@@ -2384,7 +2384,7 @@ const ts = {
|
|
|
2384
2384
|
const k = m === void 0 ? s ? void 0 : null : m;
|
|
2385
2385
|
i && (i.selected.value = k), O("update:value", k);
|
|
2386
2386
|
}
|
|
2387
|
-
),
|
|
2387
|
+
), Ie(() => {
|
|
2388
2388
|
if (p.value && !p.value.fieldMap && (p.value.fieldMap = {
|
|
2389
2389
|
label: "Name",
|
|
2390
2390
|
value: "Id",
|
|
@@ -2408,22 +2408,22 @@ const ts = {
|
|
|
2408
2408
|
C(b(Oa), le({
|
|
2409
2409
|
class: [(We = b(r)) == null ? void 0 : We.errClass, "w-full"],
|
|
2410
2410
|
value: d.value,
|
|
2411
|
-
"onUpdate:value": k[0] || (k[0] = (
|
|
2411
|
+
"onUpdate:value": k[0] || (k[0] = (W) => d.value = W),
|
|
2412
2412
|
"allow-clear": !0,
|
|
2413
2413
|
onChange: y,
|
|
2414
2414
|
placeholder: v.value,
|
|
2415
2415
|
"label-in-value": !1
|
|
2416
2416
|
}, b(c)), {
|
|
2417
2417
|
default: K(() => [
|
|
2418
|
-
(w(!0), $(re, null, Ue(x.value, (
|
|
2419
|
-
key:
|
|
2418
|
+
(w(!0), $(re, null, Ue(x.value, (W) => (w(), $(re, {
|
|
2419
|
+
key: W.value
|
|
2420
2420
|
}, [
|
|
2421
|
-
|
|
2421
|
+
W.visible !== !1 ? (w(), Ae(b(Ra), {
|
|
2422
2422
|
key: 0,
|
|
2423
|
-
value:
|
|
2423
|
+
value: W.value
|
|
2424
2424
|
}, {
|
|
2425
2425
|
default: K(() => [
|
|
2426
|
-
|
|
2426
|
+
xe(Y(W.label), 1)
|
|
2427
2427
|
]),
|
|
2428
2428
|
_: 2
|
|
2429
2429
|
}, 1032, ["value"])) : z("", !0)
|
|
@@ -2438,9 +2438,9 @@ const ts = {
|
|
|
2438
2438
|
export {
|
|
2439
2439
|
Mt as $,
|
|
2440
2440
|
pe as A,
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2441
|
+
rs as B,
|
|
2442
|
+
os as C,
|
|
2443
|
+
is as D,
|
|
2444
2444
|
Qe as E,
|
|
2445
2445
|
_a as F,
|
|
2446
2446
|
Wt as G,
|
|
@@ -2448,7 +2448,7 @@ export {
|
|
|
2448
2448
|
rt as I,
|
|
2449
2449
|
Bt as J,
|
|
2450
2450
|
zt as K,
|
|
2451
|
-
|
|
2451
|
+
Oe as L,
|
|
2452
2452
|
st as M,
|
|
2453
2453
|
ca as N,
|
|
2454
2454
|
N as O,
|
|
@@ -2463,8 +2463,8 @@ export {
|
|
|
2463
2463
|
ra as X,
|
|
2464
2464
|
Ht as Y,
|
|
2465
2465
|
oa as Z,
|
|
2466
|
-
|
|
2467
|
-
|
|
2466
|
+
ss as _,
|
|
2467
|
+
ts as a,
|
|
2468
2468
|
Ft as a0,
|
|
2469
2469
|
Je as a1,
|
|
2470
2470
|
$t as a2,
|
|
@@ -2477,7 +2477,7 @@ export {
|
|
|
2477
2477
|
Ba as a9,
|
|
2478
2478
|
Ne as aa,
|
|
2479
2479
|
B as ab,
|
|
2480
|
-
|
|
2480
|
+
ye as ac,
|
|
2481
2481
|
ne as ad,
|
|
2482
2482
|
ge as ae,
|
|
2483
2483
|
V as af,
|
|
@@ -2496,17 +2496,17 @@ export {
|
|
|
2496
2496
|
ia as k,
|
|
2497
2497
|
Xa as l,
|
|
2498
2498
|
Jt as m,
|
|
2499
|
-
|
|
2499
|
+
ns as n,
|
|
2500
2500
|
Nt as o,
|
|
2501
2501
|
fe as p,
|
|
2502
2502
|
za as q,
|
|
2503
|
-
|
|
2503
|
+
we as r,
|
|
2504
2504
|
X as s,
|
|
2505
2505
|
he as t,
|
|
2506
2506
|
_ as u,
|
|
2507
2507
|
ee as v,
|
|
2508
2508
|
de as w,
|
|
2509
2509
|
De as x,
|
|
2510
|
-
|
|
2511
|
-
|
|
2510
|
+
ke as y,
|
|
2511
|
+
Pe as z
|
|
2512
2512
|
};
|