@skyfox2000/webui 1.3.10 → 1.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/modules/{file-upload-CwyUkWwi.js → file-upload-C2F7lPSM.js} +1 -1
- package/lib/assets/modules/{index-B_XPl41L.js → index-BIrJNh7I.js} +68 -65
- package/lib/assets/modules/{index-DHWlaZL2.js → index-Wb7_c6EZ.js} +2 -2
- package/lib/assets/modules/{index-BRWQ6SRp.js → index-sCdzN6vg.js} +1 -1
- package/lib/assets/modules/{menuTabs-NoNLt_B5.js → menuTabs-Dk9meNAk.js} +2 -2
- package/lib/assets/modules/{toolIcon-BSjgzw0G.js → toolIcon-s2mFt6QR.js} +1 -1
- package/lib/assets/modules/{uploadList-1Zmhwr0q.js → uploadList-B2L8NHoj.js} +4 -4
- package/lib/assets/modules/{uploadList-B4wb8I9a.js → uploadList-C_T_ft8_.js} +216 -204
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +3 -3
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +112 -113
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/utils/form-excel.d.ts +2 -1
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +14 -14
- package/package.json +1 -1
- package/src/components/content/dialog/excelForm.vue +12 -13
- package/src/components/form/radio/index.vue +8 -0
- package/src/components/form/select/index.vue +17 -1
- package/src/utils/form-excel.ts +18 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var ma = Object.defineProperty;
|
|
2
2
|
var va = (e, t, a) => t in e ? ma(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
-
var
|
|
4
|
-
import { inject as te, ref as f, provide as Le, watch as
|
|
5
|
-
import { Switch as Sa, AutoComplete as Ia, Input as xa, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as Oa, Radio as Ra, Select as Ta, SelectOption as
|
|
6
|
-
import { createPinia as
|
|
3
|
+
var F = (e, t, a) => va(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { inject as te, ref as f, provide as Le, watch as y, toRaw as Ze, h as U, nextTick as ga, shallowRef as K, defineComponent as X, reactive as ya, onMounted as Ie, onUnmounted as ie, createBlock as xe, createCommentVNode as C, openBlock as O, unref as S, mergeProps as le, useAttrs as Ae, createElementBlock as $, createVNode as z, withCtx as V, createTextVNode as Ee, toDisplayString as W, Fragment as ne, renderList as Ue, normalizeClass as ea, createElementVNode as ba } from "vue";
|
|
5
|
+
import { Switch as Sa, AutoComplete as Ia, Input as xa, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as Oa, Radio as Ra, Select as Ta, SelectOption as Pa } from "ant-design-vue";
|
|
6
|
+
import { createPinia as wa, defineStore as ue } from "pinia";
|
|
7
7
|
import ka from "pinia-plugin-persistedstate";
|
|
8
8
|
import { combineParams as Oe, EnvConfig as ge, AppAction as Ce, AppSource as ze, isMicroApp as ye, mainAppApis as _, isBaseMicroApp as La } from "@skyfox2000/microbase";
|
|
9
9
|
import { ResStatus as T, httpPost as G, setToken as he, fieldMapping as $a, parseFieldTemplate as be, API_HOST as $e, SERVER_HOST as Fa } from "@skyfox2000/fapi";
|
|
@@ -12,12 +12,12 @@ import He from "async-validator";
|
|
|
12
12
|
import { createRouter as Ma, createWebHashHistory as Na } from "vue-router";
|
|
13
13
|
import "dayjs";
|
|
14
14
|
import "vue-draggable-next";
|
|
15
|
-
const _a =
|
|
15
|
+
const _a = wa();
|
|
16
16
|
_a.use(ka);
|
|
17
17
|
var D = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.LabelWidth = "FormItem.LabelWidth", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(D || {});
|
|
18
|
-
const
|
|
18
|
+
const P = class P {
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
F(P, "dict", {}), F(P, "Keys", {
|
|
21
21
|
EnableDisable: "EnableDisable",
|
|
22
22
|
SuccessResult: "SuccessResult",
|
|
23
23
|
YesNo: "YesNo",
|
|
@@ -27,25 +27,25 @@ $(w, "dict", {}), $(w, "Keys", {
|
|
|
27
27
|
* @param key 名称
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
F(P, "getOptions", (t) => P.dict[t]), /**
|
|
31
31
|
* 静态选择项对象
|
|
32
32
|
* @param key 名称
|
|
33
33
|
* @param value 值
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
F(P, "getOptionItem", (t, a) => P.dict[t].find((s) => s.value === a)), /**
|
|
37
37
|
* 设置静态选择项
|
|
38
38
|
* @param key 名称
|
|
39
39
|
* @param list 列表
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
F(P, "setOptions", (t, a) => {
|
|
42
|
+
P.dict[t] = a;
|
|
43
43
|
}), /**
|
|
44
44
|
* 启用/停用选项
|
|
45
45
|
* - 启用 1
|
|
46
46
|
* - 停用 0
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
F(P, "EnableDisable", [
|
|
49
49
|
{
|
|
50
50
|
label: "启用",
|
|
51
51
|
text: "✅ 启用",
|
|
@@ -61,7 +61,7 @@ $(w, "EnableDisable", [
|
|
|
61
61
|
* - 成功 1
|
|
62
62
|
* - 失败 0
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
F(P, "SuccessResult", [
|
|
65
65
|
{
|
|
66
66
|
label: "成功",
|
|
67
67
|
text: "✅ 成功",
|
|
@@ -77,7 +77,7 @@ $(w, "SuccessResult", [
|
|
|
77
77
|
* - 是 1
|
|
78
78
|
* - 否 0
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
F(P, "YesNo", [
|
|
81
81
|
{
|
|
82
82
|
label: "是",
|
|
83
83
|
text: "✅ 是",
|
|
@@ -93,7 +93,7 @@ $(w, "YesNo", [
|
|
|
93
93
|
* - 男 M
|
|
94
94
|
* - 女 F
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
F(P, "MaleFemale", [
|
|
97
97
|
{
|
|
98
98
|
label: "男",
|
|
99
99
|
text: "男 👨",
|
|
@@ -105,11 +105,11 @@ $(w, "MaleFemale", [
|
|
|
105
105
|
value: "F"
|
|
106
106
|
}
|
|
107
107
|
]);
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
let M = P;
|
|
109
|
+
M.setOptions("EnableDisable", M.EnableDisable);
|
|
110
|
+
M.setOptions("SuccessResult", M.SuccessResult);
|
|
111
|
+
M.setOptions("YesNo", M.YesNo);
|
|
112
|
+
M.setOptions("MaleFemale", M.MaleFemale);
|
|
113
113
|
const ce = {
|
|
114
114
|
/**
|
|
115
115
|
* 选项数据接口
|
|
@@ -173,7 +173,7 @@ const ce = {
|
|
|
173
173
|
type: Object,
|
|
174
174
|
required: !1
|
|
175
175
|
}
|
|
176
|
-
},
|
|
176
|
+
}, w = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Re = (e, t) => {
|
|
177
177
|
var n;
|
|
178
178
|
const a = e.page;
|
|
179
179
|
return {
|
|
@@ -216,7 +216,7 @@ const ce = {
|
|
|
216
216
|
urlKey: "delete",
|
|
217
217
|
loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据删除中..."
|
|
218
218
|
};
|
|
219
|
-
if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s],
|
|
219
|
+
if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], w(n.params.Query) || w(n.params.Query[s]))
|
|
220
220
|
return x.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
221
221
|
const o = Re(e, n);
|
|
222
222
|
return n.url = o, Te(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || x.success("删除成功!")), r));
|
|
@@ -256,7 +256,7 @@ const Ft = (e) => {
|
|
|
256
256
|
...e
|
|
257
257
|
});
|
|
258
258
|
}, Mt = (e) => {
|
|
259
|
-
if (!e ||
|
|
259
|
+
if (!e || w(e))
|
|
260
260
|
return [];
|
|
261
261
|
const t = [], a = re.messages(), s = (o, r, l) => {
|
|
262
262
|
const i = r.type;
|
|
@@ -267,9 +267,9 @@ const Ft = (e) => {
|
|
|
267
267
|
const u = ["string", "number", "array"];
|
|
268
268
|
for (const c of u)
|
|
269
269
|
if (i === c && a[c]) {
|
|
270
|
-
const p = a[c],
|
|
271
|
-
for (const
|
|
272
|
-
|
|
270
|
+
const p = a[c], v = ["len", "min", "max", "range"];
|
|
271
|
+
for (const h of v)
|
|
272
|
+
h === "range" && r.min != null && r.max != null && p.range ? n(p.range, o, { min: r.min, max: r.max }, l) : h !== "range" && r[h] != null && p[h] && n(p[h], o, { [h]: r[h] }, l);
|
|
273
273
|
}
|
|
274
274
|
if (r.required && a.required && n(a.required, o, {}, l), r.pattern && a.pattern && n(r.message, o, {}, l), r.enum && Array.isArray(r.enum) && a.enum) {
|
|
275
275
|
const c = r.enum.join(", ");
|
|
@@ -311,7 +311,7 @@ const Ft = (e) => {
|
|
|
311
311
|
}), t;
|
|
312
312
|
}, fe = async (e) => {
|
|
313
313
|
const t = e.formData.value, a = e.formRules.value;
|
|
314
|
-
|
|
314
|
+
w(a) || (Ke(e), e.ruleValidator || (e.ruleValidator = new He({}), e.ruleValidator.messages(re.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
|
|
315
315
|
}).catch(({ fields: s }) => s));
|
|
316
316
|
}, Nt = async (e, t, a) => (a || (a = new He({}), a.messages(re.messages()), a.define(t)), a.validate(e).then(() => {
|
|
317
317
|
}).catch(({ fields: s }) => s)), Ke = (e) => {
|
|
@@ -332,10 +332,10 @@ const Ft = (e) => {
|
|
|
332
332
|
if (!e.label || !e.rule)
|
|
333
333
|
return a;
|
|
334
334
|
const s = t == null ? void 0 : t.ruleResults;
|
|
335
|
-
return
|
|
335
|
+
return y(
|
|
336
336
|
() => s == null ? void 0 : s.value,
|
|
337
337
|
(n) => {
|
|
338
|
-
if (a.value.errClass = "", a.value.msg = "", !
|
|
338
|
+
if (a.value.errClass = "", a.value.msg = "", !w(n)) {
|
|
339
339
|
const o = Va(
|
|
340
340
|
{
|
|
341
341
|
label: e.label,
|
|
@@ -371,8 +371,8 @@ const Ft = (e) => {
|
|
|
371
371
|
if (u) {
|
|
372
372
|
const c = n.value.match(l);
|
|
373
373
|
c && c.forEach((p) => {
|
|
374
|
-
const
|
|
375
|
-
n.value = n.value.replace(p, u[
|
|
374
|
+
const v = p.replace("${", "").replace("}", "");
|
|
375
|
+
n.value = n.value.replace(p, u[v] ?? "");
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
}), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
|
|
@@ -422,10 +422,10 @@ const Ft = (e) => {
|
|
|
422
422
|
const i = l[1], u = l[2].replace(/Idx_/g, "").split("_"), c = e.formRules.value;
|
|
423
423
|
if (c && u.length > 0) {
|
|
424
424
|
const p = {};
|
|
425
|
-
u.forEach((
|
|
426
|
-
c[
|
|
425
|
+
u.forEach((v) => {
|
|
426
|
+
c[v] && (p[v] = [
|
|
427
427
|
{
|
|
428
|
-
field:
|
|
428
|
+
field: v,
|
|
429
429
|
fieldValue: i,
|
|
430
430
|
message: "数据重复"
|
|
431
431
|
}
|
|
@@ -593,13 +593,13 @@ const Ja = (e) => {
|
|
|
593
593
|
}
|
|
594
594
|
}, Fe = /* @__PURE__ */ new Map(), Ba = (e) => {
|
|
595
595
|
const t = j(), { roles: a, permission: s } = e.meta || {};
|
|
596
|
-
if (
|
|
596
|
+
if (w(a) && w(s))
|
|
597
597
|
return !0;
|
|
598
598
|
if (ge.VITE_PERMISSION_MODE === "role")
|
|
599
|
-
return
|
|
599
|
+
return w(a) ? !0 : t.hasRole(a);
|
|
600
600
|
if (ge.VITE_PERMISSION_MODE === "permit") {
|
|
601
601
|
let n = !1, o = !1;
|
|
602
|
-
return
|
|
602
|
+
return w(a) || (n = t.hasRole(a)), t.isAdmin() ? n : (w(s) || (o = t.hasPermit(e.path, s)), n || o);
|
|
603
603
|
}
|
|
604
604
|
return !1;
|
|
605
605
|
}, ra = (e) => e.map((t) => {
|
|
@@ -868,7 +868,7 @@ const Ja = (e) => {
|
|
|
868
868
|
} catch (t) {
|
|
869
869
|
return console.error(ia, t), !1;
|
|
870
870
|
}
|
|
871
|
-
},
|
|
871
|
+
}, L = f(""), ee = f(null), j = ue("userInfo", {
|
|
872
872
|
state: () => ({
|
|
873
873
|
isLogin: !1,
|
|
874
874
|
userInfo: {
|
|
@@ -886,7 +886,7 @@ const Ja = (e) => {
|
|
|
886
886
|
* 启动时初始化用户信息
|
|
887
887
|
*/
|
|
888
888
|
init() {
|
|
889
|
-
ye() || (this.token ? (Me(this.token, () => this.clean()), he(this.token),
|
|
889
|
+
ye() || (this.token ? (Me(this.token, () => this.clean()), he(this.token), L.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
|
|
890
890
|
},
|
|
891
891
|
/**
|
|
892
892
|
* 登录操作
|
|
@@ -905,7 +905,7 @@ const Ja = (e) => {
|
|
|
905
905
|
this.userInfo = {
|
|
906
906
|
...this.userInfo,
|
|
907
907
|
...n.UserInfo
|
|
908
|
-
},
|
|
908
|
+
}, L.value = n.UserInfo.UserLevel;
|
|
909
909
|
else {
|
|
910
910
|
x.error("用户信息解析失败");
|
|
911
911
|
return;
|
|
@@ -941,7 +941,7 @@ const Ja = (e) => {
|
|
|
941
941
|
* @returns 是否有角色权限
|
|
942
942
|
*/
|
|
943
943
|
hasRole(e) {
|
|
944
|
-
return
|
|
944
|
+
return L.value ? Array.isArray(e) ? e.includes(L.value) : L.value === e : !1;
|
|
945
945
|
},
|
|
946
946
|
/**
|
|
947
947
|
* 检查功能权限
|
|
@@ -972,7 +972,7 @@ const Ja = (e) => {
|
|
|
972
972
|
this.clean();
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
L.value || (L.value = e.UserLevel, this.userInfo = {
|
|
976
976
|
...this.userInfo,
|
|
977
977
|
...e
|
|
978
978
|
}, this.token = t, he(this.token), this.isLogin = !0);
|
|
@@ -990,20 +990,20 @@ const Ja = (e) => {
|
|
|
990
990
|
* 是否超级管理员
|
|
991
991
|
*/
|
|
992
992
|
isSuperAdmin() {
|
|
993
|
-
return
|
|
993
|
+
return L.value === "Super";
|
|
994
994
|
},
|
|
995
995
|
/**
|
|
996
996
|
* 是否管理员
|
|
997
997
|
*/
|
|
998
998
|
isAdmin() {
|
|
999
|
-
return
|
|
999
|
+
return L.value === "Super" || L.value === "Admin";
|
|
1000
1000
|
},
|
|
1001
1001
|
/**
|
|
1002
1002
|
* 获取用户级别
|
|
1003
1003
|
* @returns 用户级别
|
|
1004
1004
|
*/
|
|
1005
1005
|
getUserLevel() {
|
|
1006
|
-
return
|
|
1006
|
+
return L.value;
|
|
1007
1007
|
},
|
|
1008
1008
|
/*
|
|
1009
1009
|
* 清理登录信息
|
|
@@ -1015,7 +1015,7 @@ const Ja = (e) => {
|
|
|
1015
1015
|
Code: "",
|
|
1016
1016
|
TenantId: "",
|
|
1017
1017
|
UserLevel: ""
|
|
1018
|
-
}, this.token = "", he(this.token), this.isLogin = !1, ee.value = null,
|
|
1018
|
+
}, this.token = "", he(this.token), this.isLogin = !1, ee.value = null, L.value = "", H().clean(), Promise.resolve();
|
|
1019
1019
|
},
|
|
1020
1020
|
/**
|
|
1021
1021
|
* 登出操作
|
|
@@ -1126,7 +1126,7 @@ const Ja = (e) => {
|
|
|
1126
1126
|
var _e = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(_e || {});
|
|
1127
1127
|
class at {
|
|
1128
1128
|
constructor() {
|
|
1129
|
-
|
|
1129
|
+
F(this, "listeners", {});
|
|
1130
1130
|
}
|
|
1131
1131
|
// 检查事件名是否符合前缀
|
|
1132
1132
|
isValidPrefix(t) {
|
|
@@ -1178,7 +1178,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1178
1178
|
}, B.on(a.reloadEvent, s.reloadHandler);
|
|
1179
1179
|
}
|
|
1180
1180
|
if (a != null && a.data)
|
|
1181
|
-
|
|
1181
|
+
y(
|
|
1182
1182
|
() => a.data,
|
|
1183
1183
|
() => {
|
|
1184
1184
|
Ge(t, a.data, !0);
|
|
@@ -1249,7 +1249,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1249
1249
|
const o = n([e], t);
|
|
1250
1250
|
return o.length > 0 ? o[0] : void 0;
|
|
1251
1251
|
}
|
|
1252
|
-
},
|
|
1252
|
+
}, Pe = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], ae = (e, t, a) => {
|
|
1253
1253
|
const s = t.split(".");
|
|
1254
1254
|
let n = e;
|
|
1255
1255
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -1286,7 +1286,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1286
1286
|
} else
|
|
1287
1287
|
ae(e, s, a[n]);
|
|
1288
1288
|
});
|
|
1289
|
-
},
|
|
1289
|
+
}, we = (e, t, a) => {
|
|
1290
1290
|
var o, r;
|
|
1291
1291
|
const s = (o = e.inputFactory) == null ? void 0 : o.value;
|
|
1292
1292
|
s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && fe(s.editorCtrl), e.selected.value = a;
|
|
@@ -1319,7 +1319,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1319
1319
|
}) : B.emit(l, n, a);
|
|
1320
1320
|
}
|
|
1321
1321
|
return s != null && s.inputEmit && s.inputEmit("change", a, n), n;
|
|
1322
|
-
},
|
|
1322
|
+
}, b = {
|
|
1323
1323
|
PageOption: {
|
|
1324
1324
|
primaryKey: "Id",
|
|
1325
1325
|
statusKey: "Enabled"
|
|
@@ -1358,17 +1358,17 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
}, Ct = (e) => {
|
|
1361
|
-
|
|
1362
|
-
...
|
|
1361
|
+
b.PageOption = {
|
|
1362
|
+
...b.PageOption,
|
|
1363
1363
|
...e.pageOption
|
|
1364
|
-
},
|
|
1365
|
-
...
|
|
1364
|
+
}, b.GridOption = {
|
|
1365
|
+
...b.GridOption,
|
|
1366
1366
|
...e.gridOption
|
|
1367
|
-
},
|
|
1368
|
-
...
|
|
1367
|
+
}, b.EditorOption = {
|
|
1368
|
+
...b.EditorOption,
|
|
1369
1369
|
...e.editorOptions
|
|
1370
|
-
},
|
|
1371
|
-
...
|
|
1370
|
+
}, b.TreeOption = {
|
|
1371
|
+
...b.TreeOption,
|
|
1372
1372
|
...e.treeOption
|
|
1373
1373
|
};
|
|
1374
1374
|
}, ke = (e) => {
|
|
@@ -1376,7 +1376,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1376
1376
|
e.urls[t].api || (e.urls[t].api = e.api), e.urls[t].authorize || (e.urls[t].authorize = e.authorize);
|
|
1377
1377
|
}, rt = (e, t, a, s) => (ke(e), {
|
|
1378
1378
|
editorCtrl: {
|
|
1379
|
-
...
|
|
1379
|
+
...b.EditorOption,
|
|
1380
1380
|
name: "",
|
|
1381
1381
|
default: a ? JSON.parse(JSON.stringify(a)) : void 0,
|
|
1382
1382
|
visible: f(!1),
|
|
@@ -1393,15 +1393,15 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1393
1393
|
}), ot = (e, t, a) => {
|
|
1394
1394
|
ke(e);
|
|
1395
1395
|
const s = {
|
|
1396
|
-
...
|
|
1397
|
-
tableSize: f(
|
|
1398
|
-
selectable: f(
|
|
1399
|
-
searchBar: f(
|
|
1400
|
-
pageSize: f(
|
|
1401
|
-
rowExpand: f(
|
|
1402
|
-
buttons: f([...
|
|
1403
|
-
tools: [...
|
|
1404
|
-
operates: [...
|
|
1396
|
+
...b.GridOption,
|
|
1397
|
+
tableSize: f(b.GridOption.tableSize.value),
|
|
1398
|
+
selectable: f(b.GridOption.selectable.value),
|
|
1399
|
+
searchBar: f(b.GridOption.searchBar.value),
|
|
1400
|
+
pageSize: f(b.GridOption.pageSize.value),
|
|
1401
|
+
rowExpand: f(b.GridOption.rowExpand.value),
|
|
1402
|
+
buttons: f([...b.GridOption.buttons.value]),
|
|
1403
|
+
tools: [...b.GridOption.tools],
|
|
1404
|
+
operates: [...b.GridOption.operates],
|
|
1405
1405
|
columns: f(a || []),
|
|
1406
1406
|
reload: f(!1),
|
|
1407
1407
|
pageNo: f(1),
|
|
@@ -1419,7 +1419,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1419
1419
|
updateUrl: e.urls.update,
|
|
1420
1420
|
deleteUrl: e.urls.delete
|
|
1421
1421
|
};
|
|
1422
|
-
return
|
|
1422
|
+
return y(
|
|
1423
1423
|
() => s.reload.value,
|
|
1424
1424
|
(n) => {
|
|
1425
1425
|
n && (setTimeout(() => {
|
|
@@ -1432,7 +1432,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1432
1432
|
}, zt = (e, t) => {
|
|
1433
1433
|
ke(e);
|
|
1434
1434
|
const a = {
|
|
1435
|
-
...
|
|
1435
|
+
...b.TreeOption,
|
|
1436
1436
|
reload: f(!1),
|
|
1437
1437
|
page: t,
|
|
1438
1438
|
node: f(void 0),
|
|
@@ -1440,7 +1440,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1440
1440
|
data: K(void 0),
|
|
1441
1441
|
isTreeLoading: f(!1)
|
|
1442
1442
|
};
|
|
1443
|
-
return
|
|
1443
|
+
return y(
|
|
1444
1444
|
() => a.reload.value,
|
|
1445
1445
|
(s) => {
|
|
1446
1446
|
s && (setTimeout(() => {
|
|
@@ -1452,7 +1452,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1452
1452
|
};
|
|
1453
1453
|
}, de = (e, t) => {
|
|
1454
1454
|
const a = {
|
|
1455
|
-
...
|
|
1455
|
+
...b.OptionOption,
|
|
1456
1456
|
url: e,
|
|
1457
1457
|
reload: f(!1),
|
|
1458
1458
|
optionQuery: {},
|
|
@@ -1462,7 +1462,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1462
1462
|
options: f([]),
|
|
1463
1463
|
isOptionLoading: f(!1)
|
|
1464
1464
|
};
|
|
1465
|
-
return
|
|
1465
|
+
return y(
|
|
1466
1466
|
() => a.reload.value,
|
|
1467
1467
|
(s) => {
|
|
1468
1468
|
s && (setTimeout(() => {
|
|
@@ -1475,7 +1475,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1475
1475
|
}, Wt = (e, t, a) => {
|
|
1476
1476
|
ke(e);
|
|
1477
1477
|
const s = {
|
|
1478
|
-
...
|
|
1478
|
+
...b.PageOption,
|
|
1479
1479
|
...e
|
|
1480
1480
|
}, { editorCtrl: n } = rt(e, s, t, a), { gridCtrl: o } = ot(e, s);
|
|
1481
1481
|
return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
|
|
@@ -1520,25 +1520,25 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1520
1520
|
const l = f(o.icon), i = f(0), u = () => {
|
|
1521
1521
|
o.icons && i.value++;
|
|
1522
1522
|
};
|
|
1523
|
-
return
|
|
1523
|
+
return y(
|
|
1524
1524
|
() => o.iconIndex,
|
|
1525
1525
|
(c) => {
|
|
1526
1526
|
c !== void 0 && (i.value = c);
|
|
1527
1527
|
},
|
|
1528
1528
|
{ immediate: !0 }
|
|
1529
|
-
),
|
|
1529
|
+
), y(
|
|
1530
1530
|
() => i.value,
|
|
1531
1531
|
(c) => {
|
|
1532
1532
|
o.icons && (c >= o.icons.length && (i.value = 0), l.value = o.icons[i.value], me(a, l, l.value), r("update:iconIndex", i.value));
|
|
1533
1533
|
},
|
|
1534
1534
|
{ immediate: !0 }
|
|
1535
|
-
),
|
|
1535
|
+
), y(
|
|
1536
1536
|
() => J.value,
|
|
1537
1537
|
() => {
|
|
1538
1538
|
me(a, l, l.value);
|
|
1539
1539
|
},
|
|
1540
1540
|
{ deep: !0 }
|
|
1541
|
-
),
|
|
1541
|
+
), y(
|
|
1542
1542
|
() => o.icon,
|
|
1543
1543
|
(c) => {
|
|
1544
1544
|
me(a, l, c);
|
|
@@ -1675,16 +1675,16 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1675
1675
|
for (const p of e) {
|
|
1676
1676
|
if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (r = p.meta) == null ? void 0 : r.roles) != null && l.length && !o.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !o.hasPermit(p.meta.permission, ":page"))
|
|
1677
1677
|
continue;
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
key:
|
|
1678
|
+
const v = p.path.split("/");
|
|
1679
|
+
v.unshift(...t);
|
|
1680
|
+
const h = ha(p.children || [], v, a, s), A = {
|
|
1681
|
+
key: v.join("/"),
|
|
1682
1682
|
label: ((u = p.name) == null ? void 0 : u.toString()) ?? "",
|
|
1683
1683
|
title: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
|
|
1684
1684
|
icon: p.icon ? U(a, { ...s, icon: p.icon }) : void 0,
|
|
1685
|
-
children:
|
|
1685
|
+
children: h.length > 0 ? h : void 0
|
|
1686
1686
|
};
|
|
1687
|
-
(
|
|
1687
|
+
(h.length > 0 || !p.children) && n.push(A);
|
|
1688
1688
|
}
|
|
1689
1689
|
return n;
|
|
1690
1690
|
}, Xe = ya([]), as = () => {
|
|
@@ -1833,7 +1833,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1833
1833
|
const a = e, s = Y(), n = de(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
|
|
1834
1834
|
o.inputFactory = K(s);
|
|
1835
1835
|
const r = f([]);
|
|
1836
|
-
o &&
|
|
1836
|
+
o && y(
|
|
1837
1837
|
() => o.options.value,
|
|
1838
1838
|
(p) => {
|
|
1839
1839
|
r.value = p || [];
|
|
@@ -1851,12 +1851,12 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1851
1851
|
o && Z(o.autoload, o, a);
|
|
1852
1852
|
}), ie(() => {
|
|
1853
1853
|
o && pe(o, a);
|
|
1854
|
-
}), (p,
|
|
1855
|
-
var
|
|
1856
|
-
return r.value.length === 2 ? (O(), xe(
|
|
1854
|
+
}), (p, v) => {
|
|
1855
|
+
var h;
|
|
1856
|
+
return r.value.length === 2 ? (O(), xe(S(Sa), le({
|
|
1857
1857
|
key: 0,
|
|
1858
1858
|
class: [
|
|
1859
|
-
((
|
|
1859
|
+
((h = S(u)) == null ? void 0 : h.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
|
|
1860
1860
|
"bg-blue-300",
|
|
1861
1861
|
"w-[58px]"
|
|
1862
1862
|
],
|
|
@@ -1896,13 +1896,13 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1896
1896
|
...r == null ? void 0 : r.fieldMap
|
|
1897
1897
|
};
|
|
1898
1898
|
const l = f(void 0);
|
|
1899
|
-
|
|
1899
|
+
y(
|
|
1900
1900
|
() => a.value,
|
|
1901
1901
|
() => {
|
|
1902
1902
|
l.value = a.value;
|
|
1903
1903
|
},
|
|
1904
1904
|
{ immediate: !0 }
|
|
1905
|
-
),
|
|
1905
|
+
), y(
|
|
1906
1906
|
() => l.value,
|
|
1907
1907
|
(g) => {
|
|
1908
1908
|
a.autoClean && a.formData && a.outFields && g !== a.value && fa(a.formData, a.outFields, null);
|
|
@@ -1910,48 +1910,48 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1910
1910
|
);
|
|
1911
1911
|
const { editorCtrl: i, errInfo: u, labelText: c } = n, p = t;
|
|
1912
1912
|
n.inputEmit = p;
|
|
1913
|
-
const
|
|
1914
|
-
r &&
|
|
1913
|
+
const v = f((r == null ? void 0 : r.options.value) || []);
|
|
1914
|
+
r && y(
|
|
1915
1915
|
() => r.options.value,
|
|
1916
1916
|
(g) => {
|
|
1917
|
-
|
|
1917
|
+
v.value = g || [];
|
|
1918
1918
|
},
|
|
1919
1919
|
{ immediate: !0, deep: !0 }
|
|
1920
1920
|
);
|
|
1921
|
-
const
|
|
1922
|
-
if (
|
|
1923
|
-
let
|
|
1921
|
+
const h = (g) => {
|
|
1922
|
+
if (v.value = [], g === "") return;
|
|
1923
|
+
let d = {
|
|
1924
1924
|
Query: {
|
|
1925
1925
|
SearchField: "%" + g.trim() + "%"
|
|
1926
1926
|
}
|
|
1927
1927
|
};
|
|
1928
|
-
r.params = Oe(r.params,
|
|
1928
|
+
r.params = Oe(r.params, d), r && Z(!0, r, a);
|
|
1929
1929
|
}, A = (g) => {
|
|
1930
|
-
const E =
|
|
1930
|
+
const E = we(r, a, g);
|
|
1931
1931
|
p("update:value", g), p("select", g);
|
|
1932
|
-
const
|
|
1933
|
-
p("update:labels",
|
|
1932
|
+
const d = Pe(E);
|
|
1933
|
+
p("update:labels", d), u != null && u.value.errClass && i && fe(i);
|
|
1934
1934
|
};
|
|
1935
1935
|
return ie(() => {
|
|
1936
1936
|
r && pe(r, a);
|
|
1937
1937
|
}), (g, E) => {
|
|
1938
|
-
var
|
|
1939
|
-
return O(),
|
|
1940
|
-
z(
|
|
1938
|
+
var d;
|
|
1939
|
+
return O(), $("div", null, [
|
|
1940
|
+
z(S(Ia), le({
|
|
1941
1941
|
value: l.value,
|
|
1942
|
-
"onUpdate:value": E[0] || (E[0] = (
|
|
1943
|
-
class: ["w-full", (
|
|
1944
|
-
options:
|
|
1945
|
-
onSearch:
|
|
1942
|
+
"onUpdate:value": E[0] || (E[0] = (I) => l.value = I),
|
|
1943
|
+
class: ["w-full", (d = S(u)) == null ? void 0 : d.errClass],
|
|
1944
|
+
options: v.value,
|
|
1945
|
+
onSearch: h,
|
|
1946
1946
|
onSelect: A
|
|
1947
|
-
},
|
|
1948
|
-
option: V(({ label:
|
|
1949
|
-
Ee(W(
|
|
1947
|
+
}, S(s), { "allow-clear": !1 }), {
|
|
1948
|
+
option: V(({ label: I }) => [
|
|
1949
|
+
Ee(W(I), 1)
|
|
1950
1950
|
]),
|
|
1951
1951
|
default: V(() => [
|
|
1952
|
-
z(
|
|
1952
|
+
z(S(xa), {
|
|
1953
1953
|
"allow-clear": "",
|
|
1954
|
-
placeholder: "请输入并选择" +
|
|
1954
|
+
placeholder: "请输入并选择" + S(c)
|
|
1955
1955
|
}, null, 8, ["placeholder"])
|
|
1956
1956
|
]),
|
|
1957
1957
|
_: 1
|
|
@@ -1983,19 +1983,19 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
1983
1983
|
},
|
|
1984
1984
|
emits: ["change", "update:labels"],
|
|
1985
1985
|
setup(e, { emit: t }) {
|
|
1986
|
-
var
|
|
1986
|
+
var v, h, A;
|
|
1987
1987
|
const a = e, s = Ae(), n = Y(), o = de(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
|
|
1988
1988
|
r.inputFactory = K(n);
|
|
1989
1989
|
const l = f({
|
|
1990
1990
|
...r == null ? void 0 : r.url,
|
|
1991
|
-
url: ((
|
|
1992
|
-
fieldMap: (r == null ? void 0 : r.fieldMap) || ((
|
|
1991
|
+
url: ((v = r == null ? void 0 : r.url) == null ? void 0 : v.url) || "",
|
|
1992
|
+
fieldMap: (r == null ? void 0 : r.fieldMap) || ((h = r == null ? void 0 : r.url) == null ? void 0 : h.fieldMap),
|
|
1993
1993
|
params: (r == null ? void 0 : r.params) || ((A = r == null ? void 0 : r.url) == null ? void 0 : A.params),
|
|
1994
1994
|
loadingText: !1
|
|
1995
1995
|
}), { errInfo: i } = n, u = t;
|
|
1996
1996
|
n.inputEmit = u;
|
|
1997
1997
|
const c = f((r == null ? void 0 : r.options.value) || []);
|
|
1998
|
-
r &&
|
|
1998
|
+
r && y(
|
|
1999
1999
|
() => r.options.value,
|
|
2000
2000
|
(g) => {
|
|
2001
2001
|
c.value = g || [];
|
|
@@ -2003,8 +2003,8 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2003
2003
|
{ immediate: !0, deep: !0 }
|
|
2004
2004
|
);
|
|
2005
2005
|
const p = (g) => {
|
|
2006
|
-
const
|
|
2007
|
-
u("update:labels",
|
|
2006
|
+
const d = we(r, a, g), I = Pe(d);
|
|
2007
|
+
u("update:labels", I);
|
|
2008
2008
|
};
|
|
2009
2009
|
return Ie(() => {
|
|
2010
2010
|
l.value && !l.value.fieldMap && (l.value.fieldMap = {
|
|
@@ -2015,31 +2015,31 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2015
2015
|
}), r && Z(r.autoload, r, a);
|
|
2016
2016
|
}), ie(() => {
|
|
2017
2017
|
r && pe(r, a);
|
|
2018
|
-
}), (g, E) => (O(),
|
|
2019
|
-
z(
|
|
2018
|
+
}), (g, E) => (O(), $("div", mt, [
|
|
2019
|
+
z(S(Aa), le({
|
|
2020
2020
|
onChange: p,
|
|
2021
2021
|
class: "w-full mb-[-3px]"
|
|
2022
|
-
},
|
|
2022
|
+
}, S(s)), {
|
|
2023
2023
|
default: V(() => [
|
|
2024
|
-
c.value.length > 0 ? (O(!0),
|
|
2025
|
-
var
|
|
2026
|
-
return O(), xe(
|
|
2027
|
-
key:
|
|
2028
|
-
value:
|
|
2029
|
-
disabled:
|
|
2024
|
+
c.value.length > 0 ? (O(!0), $(ne, { key: 0 }, Ue(c.value, (d) => {
|
|
2025
|
+
var I;
|
|
2026
|
+
return O(), xe(S(Ea), {
|
|
2027
|
+
key: d.value,
|
|
2028
|
+
value: d.value,
|
|
2029
|
+
disabled: d.disabled || d.value && e.disabledItems && e.disabledItems.indexOf(d.value.toString()) > -1,
|
|
2030
2030
|
class: ea([
|
|
2031
|
-
((
|
|
2031
|
+
((I = S(i)) == null ? void 0 : I.errClass) === "error" ? "error !text-red-400" : "",
|
|
2032
2032
|
"text-nowrap",
|
|
2033
2033
|
"pb-1",
|
|
2034
2034
|
e.wrap ? `w-1/${a.wrap}` : ""
|
|
2035
2035
|
])
|
|
2036
2036
|
}, {
|
|
2037
2037
|
default: V(() => [
|
|
2038
|
-
Ee(W(
|
|
2038
|
+
Ee(W(d.label), 1)
|
|
2039
2039
|
]),
|
|
2040
2040
|
_: 2
|
|
2041
2041
|
}, 1032, ["value", "disabled", "class"]);
|
|
2042
|
-
}), 128)) : e.nodata ? (O(),
|
|
2042
|
+
}), 128)) : e.nodata ? (O(), $("div", vt, W(e.nodata), 1)) : C("", !0)
|
|
2043
2043
|
]),
|
|
2044
2044
|
_: 1
|
|
2045
2045
|
}, 16)
|
|
@@ -2080,26 +2080,31 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2080
2080
|
params: (r == null ? void 0 : r.params) || ((E = r == null ? void 0 : r.url) == null ? void 0 : E.params),
|
|
2081
2081
|
loadingText: !1
|
|
2082
2082
|
}), i = f(a.value), { errInfo: u } = n, c = f((r == null ? void 0 : r.options.value) || []), p = t;
|
|
2083
|
-
n.inputEmit = p, r &&
|
|
2083
|
+
n.inputEmit = p, r && y(
|
|
2084
2084
|
() => r.options.value,
|
|
2085
|
-
(
|
|
2086
|
-
c.value =
|
|
2085
|
+
(d) => {
|
|
2086
|
+
c.value = d || [];
|
|
2087
2087
|
},
|
|
2088
2088
|
{ immediate: !0, deep: !0 }
|
|
2089
|
-
),
|
|
2089
|
+
), y(
|
|
2090
|
+
() => a.value,
|
|
2091
|
+
(d) => {
|
|
2092
|
+
i.value = d;
|
|
2093
|
+
}
|
|
2094
|
+
), y(
|
|
2090
2095
|
() => i.value,
|
|
2091
|
-
(
|
|
2092
|
-
p("update:value",
|
|
2096
|
+
(d) => {
|
|
2097
|
+
p("update:value", d);
|
|
2093
2098
|
}
|
|
2094
2099
|
);
|
|
2095
|
-
const
|
|
2096
|
-
if (typeof
|
|
2097
|
-
const R = JSON.stringify(
|
|
2098
|
-
return R && (i.value =
|
|
2100
|
+
const v = (d, I) => {
|
|
2101
|
+
if (typeof d == "object" && typeof I == "object") {
|
|
2102
|
+
const R = JSON.stringify(d) === JSON.stringify(I);
|
|
2103
|
+
return R && (i.value = d), R;
|
|
2099
2104
|
}
|
|
2100
|
-
return
|
|
2101
|
-
},
|
|
2102
|
-
const
|
|
2105
|
+
return d === I;
|
|
2106
|
+
}, h = (d) => {
|
|
2107
|
+
const I = d.target.value, R = we(r, a, I), Q = Pe(R);
|
|
2103
2108
|
p("update:labels", Q);
|
|
2104
2109
|
};
|
|
2105
2110
|
return Ie(() => {
|
|
@@ -2110,26 +2115,26 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2110
2115
|
}), r && Z(r.autoload, r, a);
|
|
2111
2116
|
}), ie(() => {
|
|
2112
2117
|
r && pe(r, a);
|
|
2113
|
-
}), (
|
|
2114
|
-
z(
|
|
2118
|
+
}), (d, I) => (O(), $("div", gt, [
|
|
2119
|
+
z(S(Oa), le({
|
|
2115
2120
|
value: i.value,
|
|
2116
|
-
"onUpdate:value":
|
|
2121
|
+
"onUpdate:value": I[0] || (I[0] = (R) => i.value = R),
|
|
2117
2122
|
autocheck: !1,
|
|
2118
|
-
onChange:
|
|
2123
|
+
onChange: h,
|
|
2119
2124
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
2120
|
-
},
|
|
2125
|
+
}, S(s)), {
|
|
2121
2126
|
default: V(() => [
|
|
2122
|
-
c.value.length > 0 ? (O(!0),
|
|
2127
|
+
c.value.length > 0 ? (O(!0), $(ne, { key: 0 }, Ue(c.value, (R) => {
|
|
2123
2128
|
var Q;
|
|
2124
|
-
return O(),
|
|
2129
|
+
return O(), $(ne, {
|
|
2125
2130
|
key: R.value
|
|
2126
2131
|
}, [
|
|
2127
|
-
R.visible !== !1 ? (O(), xe(
|
|
2132
|
+
R.visible !== !1 ? (O(), xe(S(Ra), {
|
|
2128
2133
|
key: 0,
|
|
2129
|
-
checked:
|
|
2134
|
+
checked: v(R.value, a.value),
|
|
2130
2135
|
value: R.value,
|
|
2131
2136
|
class: ea([
|
|
2132
|
-
((Q =
|
|
2137
|
+
((Q = S(u)) == null ? void 0 : Q.errClass) === "error" ? "error !text-red-400" : "",
|
|
2133
2138
|
"text-nowrap",
|
|
2134
2139
|
"pb-1",
|
|
2135
2140
|
e.wrap ? `w-1/${a.wrap}` : ""
|
|
@@ -2141,7 +2146,7 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2141
2146
|
_: 2
|
|
2142
2147
|
}, 1032, ["checked", "value", "class"])) : C("", !0)
|
|
2143
2148
|
], 64);
|
|
2144
|
-
}), 128)) : e.nodata ? (O(),
|
|
2149
|
+
}), 128)) : e.nodata ? (O(), $("div", yt, W(e.nodata), 1)) : C("", !0)
|
|
2145
2150
|
]),
|
|
2146
2151
|
_: 1
|
|
2147
2152
|
}, 16, ["value"])
|
|
@@ -2176,57 +2181,64 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2176
2181
|
},
|
|
2177
2182
|
emits: ["change", "update:value", "update:label", "update:labels"],
|
|
2178
2183
|
setup(e, { emit: t }) {
|
|
2179
|
-
var
|
|
2184
|
+
var I, R, Q;
|
|
2180
2185
|
const a = e, s = Y(), { editorCtrl: n, errInfo: o, labelText: r } = s, l = de(a.url, a), i = a.optionCtrl ?? l.optionCtrl;
|
|
2181
2186
|
i.inputFactory = K(s);
|
|
2182
2187
|
const u = Ae(), c = f({
|
|
2183
2188
|
...i == null ? void 0 : i.url,
|
|
2184
|
-
url: ((
|
|
2189
|
+
url: ((I = i == null ? void 0 : i.url) == null ? void 0 : I.url) || "",
|
|
2185
2190
|
fieldMap: (i == null ? void 0 : i.fieldMap) || ((R = i == null ? void 0 : i.url) == null ? void 0 : R.fieldMap),
|
|
2186
2191
|
params: (i == null ? void 0 : i.params) || ((Q = i == null ? void 0 : i.url) == null ? void 0 : Q.params),
|
|
2187
2192
|
loadingText: !1
|
|
2188
|
-
}), p = f(a.value),
|
|
2193
|
+
}), p = f(a.value), v = f(u.placeholder), h = f((i == null ? void 0 : i.selected.value) || void 0), A = t;
|
|
2189
2194
|
s.inputEmit = A;
|
|
2190
|
-
const g = (
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
}, E = f((i == null ? void 0 : i.options.value) || []),
|
|
2194
|
-
if (
|
|
2195
|
-
for (let
|
|
2196
|
-
const N =
|
|
2195
|
+
const g = (m) => {
|
|
2196
|
+
const k = we(i, a, m), N = Pe(k);
|
|
2197
|
+
h.value = m, A("update:labels", N), A("update:label", N.join(";")), A("change", m), o != null && o.value.errClass && n && fe(n);
|
|
2198
|
+
}, E = f((i == null ? void 0 : i.options.value) || []), d = (m) => {
|
|
2199
|
+
if (m.length > 0 && w(a.value) && a.selectFirst)
|
|
2200
|
+
for (let k = 0; k < m.length; k++) {
|
|
2201
|
+
const N = m[k];
|
|
2197
2202
|
if (N.disabled === void 0 || N.disabled === !1) {
|
|
2198
|
-
|
|
2203
|
+
h.value = N.value;
|
|
2199
2204
|
break;
|
|
2200
2205
|
}
|
|
2201
2206
|
}
|
|
2202
|
-
else
|
|
2203
|
-
|
|
2207
|
+
else m.length > 0 && (h.value = a.value === null ? void 0 : a.value);
|
|
2208
|
+
m.length > 0 && h.value !== void 0 && g(h.value);
|
|
2204
2209
|
};
|
|
2205
|
-
return i &&
|
|
2210
|
+
return i && (y(
|
|
2206
2211
|
() => i.options.value,
|
|
2207
|
-
(
|
|
2208
|
-
E.value =
|
|
2212
|
+
(m) => {
|
|
2213
|
+
E.value = m || [];
|
|
2209
2214
|
},
|
|
2210
2215
|
{ immediate: !0, deep: !0 }
|
|
2211
|
-
),
|
|
2216
|
+
), y(
|
|
2217
|
+
() => i.selected.value,
|
|
2218
|
+
(m) => {
|
|
2219
|
+
h.value = m;
|
|
2220
|
+
}
|
|
2221
|
+
)), y(
|
|
2212
2222
|
() => E.value,
|
|
2213
|
-
(
|
|
2214
|
-
|
|
2223
|
+
(m) => {
|
|
2224
|
+
d(m);
|
|
2215
2225
|
}
|
|
2216
|
-
),
|
|
2226
|
+
), y(
|
|
2217
2227
|
() => c.value.loading,
|
|
2218
|
-
(
|
|
2219
|
-
|
|
2228
|
+
(m) => {
|
|
2229
|
+
m ? v.value = "" : v.value || (v.value = "请选择" + r.value);
|
|
2220
2230
|
},
|
|
2221
2231
|
{ immediate: !0 }
|
|
2222
|
-
),
|
|
2223
|
-
() =>
|
|
2224
|
-
(
|
|
2225
|
-
|
|
2232
|
+
), y(
|
|
2233
|
+
() => h.value,
|
|
2234
|
+
(m) => {
|
|
2235
|
+
i && (i.selected.value = m);
|
|
2236
|
+
const k = m === void 0 ? null : m;
|
|
2237
|
+
if (u.mode === "multiple" && w(m) && w(p.value)) {
|
|
2226
2238
|
A("update:value", p.value);
|
|
2227
2239
|
return;
|
|
2228
2240
|
}
|
|
2229
|
-
A("update:value",
|
|
2241
|
+
A("update:value", k);
|
|
2230
2242
|
}
|
|
2231
2243
|
), Ie(() => {
|
|
2232
2244
|
if (c.value && !c.value.fieldMap && (c.value.fieldMap = {
|
|
@@ -2234,35 +2246,35 @@ const B = new at(), Z = (e, t, a) => {
|
|
|
2234
2246
|
value: "Id",
|
|
2235
2247
|
key: "Id"
|
|
2236
2248
|
}), a.dataKey) {
|
|
2237
|
-
const
|
|
2238
|
-
E.value =
|
|
2249
|
+
const m = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
|
|
2250
|
+
E.value = m, d(m);
|
|
2239
2251
|
} else if (i) {
|
|
2240
|
-
const
|
|
2241
|
-
|
|
2252
|
+
const m = i.options.value || [];
|
|
2253
|
+
m.length > 0 ? (E.value = m, d(m)) : Z(i.autoload, i, a);
|
|
2242
2254
|
}
|
|
2243
2255
|
}), ie(() => {
|
|
2244
2256
|
i && pe(i, a);
|
|
2245
|
-
}), (
|
|
2257
|
+
}), (m, k) => {
|
|
2246
2258
|
var N, qe, Be;
|
|
2247
|
-
return O(),
|
|
2248
|
-
(qe = (N =
|
|
2249
|
-
z(
|
|
2250
|
-
|
|
2259
|
+
return O(), $("div", null, [
|
|
2260
|
+
(qe = (N = S(i)) == null ? void 0 : N.url) != null && qe.loading ? (O(), $("div", bt, [
|
|
2261
|
+
z(S(De), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2262
|
+
k[1] || (k[1] = ba("span", null, "数据加载中...", -1))
|
|
2251
2263
|
])) : C("", !0),
|
|
2252
|
-
z(
|
|
2253
|
-
class: [(Be =
|
|
2254
|
-
value:
|
|
2255
|
-
"onUpdate:value":
|
|
2264
|
+
z(S(Ta), le({
|
|
2265
|
+
class: [(Be = S(o)) == null ? void 0 : Be.errClass, "w-full"],
|
|
2266
|
+
value: h.value,
|
|
2267
|
+
"onUpdate:value": k[0] || (k[0] = (q) => h.value = q),
|
|
2256
2268
|
"allow-clear": !0,
|
|
2257
2269
|
onChange: g,
|
|
2258
|
-
placeholder:
|
|
2270
|
+
placeholder: v.value,
|
|
2259
2271
|
"label-in-value": !1
|
|
2260
|
-
},
|
|
2272
|
+
}, S(u)), {
|
|
2261
2273
|
default: V(() => [
|
|
2262
|
-
(O(!0),
|
|
2274
|
+
(O(!0), $(ne, null, Ue(E.value, (q) => (O(), $(ne, {
|
|
2263
2275
|
key: q.value
|
|
2264
2276
|
}, [
|
|
2265
|
-
q.visible !== !1 ? (O(), xe(
|
|
2277
|
+
q.visible !== !1 ? (O(), xe(S(Pa), {
|
|
2266
2278
|
key: 0,
|
|
2267
2279
|
value: q.value
|
|
2268
2280
|
}, {
|
|
@@ -2295,7 +2307,7 @@ export {
|
|
|
2295
2307
|
nt as L,
|
|
2296
2308
|
fa as M,
|
|
2297
2309
|
Yt as N,
|
|
2298
|
-
|
|
2310
|
+
M as O,
|
|
2299
2311
|
D as P,
|
|
2300
2312
|
Zt as Q,
|
|
2301
2313
|
pt as R,
|
|
@@ -2333,7 +2345,7 @@ export {
|
|
|
2333
2345
|
qt as f,
|
|
2334
2346
|
Bt as g,
|
|
2335
2347
|
Qt as h,
|
|
2336
|
-
|
|
2348
|
+
w as i,
|
|
2337
2349
|
Kt as j,
|
|
2338
2350
|
la as k,
|
|
2339
2351
|
Za as l,
|
|
@@ -2349,6 +2361,6 @@ export {
|
|
|
2349
2361
|
Z as v,
|
|
2350
2362
|
pe as w,
|
|
2351
2363
|
De as x,
|
|
2352
|
-
|
|
2353
|
-
|
|
2364
|
+
we as y,
|
|
2365
|
+
Pe as z
|
|
2354
2366
|
};
|