vue3-element-dict 3.2.8 → 3.2.9
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/README.md +5 -1
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +1467 -1437
- package/package.json +1 -1
package/lib/vue3-element-dict.js
CHANGED
|
@@ -11,72 +11,72 @@ const formatDictData = (e, r, d, t) => {
|
|
|
11
11
|
return n;
|
|
12
12
|
};
|
|
13
13
|
function sortComponentsByIdDependencies(e) {
|
|
14
|
-
const r = (
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
for (; (
|
|
18
|
-
|
|
19
|
-
return Array.from(
|
|
20
|
-
}, d = (
|
|
21
|
-
const
|
|
22
|
-
typeof
|
|
14
|
+
const r = (k) => {
|
|
15
|
+
const C = /* @__PURE__ */ new Set(), l = /\$\{(\w+)\}/g;
|
|
16
|
+
let b;
|
|
17
|
+
for (; (b = l.exec(k)) !== null; )
|
|
18
|
+
C.add(b[1]);
|
|
19
|
+
return Array.from(C);
|
|
20
|
+
}, d = (k) => {
|
|
21
|
+
const C = /* @__PURE__ */ new Set(), l = (b) => {
|
|
22
|
+
typeof b == "string" ? r(b).forEach((T) => C.add(T)) : Array.isArray(b) ? b.forEach(l) : b && typeof b == "object" && Object.values(b).forEach(l);
|
|
23
23
|
};
|
|
24
|
-
return l(
|
|
25
|
-
}, t = (
|
|
26
|
-
const { showRuleType:
|
|
27
|
-
return l == null ? [] : (
|
|
28
|
-
typeof
|
|
29
|
-
}) : ["compare", "calculate", ""].includes(
|
|
30
|
-
|
|
31
|
-
}), Array.from(
|
|
32
|
-
}, n = (
|
|
33
|
-
const { validatorRuleType:
|
|
34
|
-
return l != null && l.rules ? (l.rules.forEach((
|
|
35
|
-
if (!(
|
|
24
|
+
return l(k), Array.from(C);
|
|
25
|
+
}, t = (k) => {
|
|
26
|
+
const { showRuleType: C, showRules: l } = k, b = /* @__PURE__ */ new Set();
|
|
27
|
+
return l == null ? [] : (C === "validate" ? typeof l == "string" ? b.add(l) : Array.isArray(l) && l.forEach((T) => {
|
|
28
|
+
typeof T == "string" && b.add(T);
|
|
29
|
+
}) : ["compare", "calculate", ""].includes(C) ? d(l).forEach((T) => b.add(T)) : typeof C == "string" && Array.isArray(l) && l.forEach((T) => {
|
|
30
|
+
T && typeof T == "object" && "rules" in T && d(T.rules).forEach((E) => b.add(E));
|
|
31
|
+
}), Array.from(b));
|
|
32
|
+
}, n = (k) => {
|
|
33
|
+
const { validatorRuleType: C, props: l } = k, b = /* @__PURE__ */ new Set();
|
|
34
|
+
return l != null && l.rules ? (l.rules.forEach((T) => {
|
|
35
|
+
if (!(T != null && T.validator))
|
|
36
36
|
return;
|
|
37
|
-
const E =
|
|
38
|
-
E != null && (["compare", "calculate", "", void 0].includes(
|
|
39
|
-
|
|
37
|
+
const E = T.validator;
|
|
38
|
+
E != null && (["compare", "calculate", "", void 0].includes(C) ? d(E).forEach((y) => b.add(y)) : typeof C == "string" && Array.isArray(E) && E.forEach((y) => {
|
|
39
|
+
y && typeof y == "object" && "rules" in y && d(y.rules).forEach((x) => b.add(x));
|
|
40
40
|
}));
|
|
41
|
-
}), Array.from(
|
|
41
|
+
}), Array.from(b)) : [];
|
|
42
42
|
}, a = /* @__PURE__ */ new Map();
|
|
43
|
-
e.forEach((
|
|
44
|
-
|
|
43
|
+
e.forEach((k) => {
|
|
44
|
+
k.fieldName && k.id && a.set(k.fieldName, k.id);
|
|
45
45
|
});
|
|
46
|
-
const u = e.map((
|
|
47
|
-
const
|
|
46
|
+
const u = e.map((k) => {
|
|
47
|
+
const C = t(k), l = n(k), T = [.../* @__PURE__ */ new Set([...C, ...l])].map((E) => a.get(E)).filter((E) => E !== void 0 && e.some((y) => y.id === E));
|
|
48
48
|
return {
|
|
49
|
-
id:
|
|
50
|
-
component:
|
|
51
|
-
depsIds:
|
|
49
|
+
id: k.id,
|
|
50
|
+
component: k,
|
|
51
|
+
depsIds: T
|
|
52
52
|
// 该组件id依赖的其他id数组
|
|
53
53
|
};
|
|
54
|
-
}), o = new Set(u.map((
|
|
55
|
-
u.forEach(({ id:
|
|
56
|
-
i.set(
|
|
54
|
+
}), o = new Set(u.map((k) => k.id)), i = /* @__PURE__ */ new Map();
|
|
55
|
+
u.forEach(({ id: k }, C) => {
|
|
56
|
+
i.set(k, C);
|
|
57
57
|
});
|
|
58
58
|
const s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
59
|
-
o.forEach((
|
|
60
|
-
s.set(
|
|
61
|
-
}), u.forEach(({ id:
|
|
62
|
-
|
|
63
|
-
s.get(l).push(
|
|
59
|
+
o.forEach((k) => {
|
|
60
|
+
s.set(k, []), c.set(k, 0);
|
|
61
|
+
}), u.forEach(({ id: k, depsIds: C }) => {
|
|
62
|
+
C.forEach((l) => {
|
|
63
|
+
s.get(l).push(k), c.set(k, c.get(k) + 1);
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
-
const
|
|
67
|
-
for (;
|
|
68
|
-
const
|
|
69
|
-
w.push(
|
|
70
|
-
if (c.set(
|
|
71
|
-
const l =
|
|
72
|
-
l === -1 ?
|
|
66
|
+
const v = [...o].filter((k) => c.get(k) === 0).sort((k, C) => i.get(k) - i.get(C)), w = [];
|
|
67
|
+
for (; v.length > 0; ) {
|
|
68
|
+
const k = v.shift();
|
|
69
|
+
w.push(k), s.get(k).forEach((C) => {
|
|
70
|
+
if (c.set(C, c.get(C) - 1), c.get(C) === 0) {
|
|
71
|
+
const l = v.findIndex((b) => i.get(b) > i.get(C));
|
|
72
|
+
l === -1 ? v.push(C) : v.splice(l, 0, C);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
const m = new Map(e.map((
|
|
79
|
-
return w.map((
|
|
76
|
+
const g = [...o].filter((k) => !w.includes(k));
|
|
77
|
+
g.sort((k, C) => i.get(k) - i.get(C)), w.push(...g);
|
|
78
|
+
const m = new Map(e.map((k) => [k.id, k]));
|
|
79
|
+
return w.map((k) => m.get(k));
|
|
80
80
|
}
|
|
81
81
|
const state = reactive({
|
|
82
82
|
//超时时间
|
|
@@ -218,52 +218,52 @@ const actions = {
|
|
|
218
218
|
formatterRequest: i,
|
|
219
219
|
query: s,
|
|
220
220
|
versionKey: c,
|
|
221
|
-
localDictCodes:
|
|
221
|
+
localDictCodes: v,
|
|
222
222
|
formatterDictList: w,
|
|
223
|
-
formatterDictVersion:
|
|
223
|
+
formatterDictVersion: g,
|
|
224
224
|
isGetAll: m,
|
|
225
|
-
filterDataFun:
|
|
226
|
-
disabledDataFun:
|
|
225
|
+
filterDataFun: k,
|
|
226
|
+
disabledDataFun: C,
|
|
227
227
|
format: l
|
|
228
|
-
} = state.dictConfig,
|
|
229
|
-
u(i(s,
|
|
230
|
-
mutations.REMOVE_IS_GETTING_DICT_TYPES(
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
233
|
-
let
|
|
228
|
+
} = state.dictConfig, b = state.dictCodes || v, T = !t && t !== 0 ? e : state.isGettingDictTypes.join(",");
|
|
229
|
+
u(i(s, T)).then((E) => {
|
|
230
|
+
mutations.REMOVE_IS_GETTING_DICT_TYPES(T);
|
|
231
|
+
const y = g(E), x = n.getItem(c);
|
|
232
|
+
if (y !== x) {
|
|
233
|
+
let G = "";
|
|
234
234
|
if (m)
|
|
235
|
-
|
|
235
|
+
G = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
236
236
|
else {
|
|
237
237
|
if (o) {
|
|
238
|
-
const A = Object.keys(
|
|
239
|
-
let
|
|
240
|
-
|
|
238
|
+
const A = Object.keys(b), _ = o.split(","), S = Object.keys(v), I = A.filter((f) => !S.includes(f)), R = _.filter((f) => S.includes(f) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${f}冲突`), !1) : !0);
|
|
239
|
+
let B = I.concat(R);
|
|
240
|
+
B = B.concat(T.split(",")), G = Array.from(new Set(B)).join(",");
|
|
241
241
|
} else {
|
|
242
|
-
const A = Object.keys(
|
|
243
|
-
let S = A.filter((
|
|
244
|
-
S = S.concat(
|
|
242
|
+
const A = Object.keys(b), _ = Object.keys(v);
|
|
243
|
+
let S = A.filter((R) => !_.includes(R));
|
|
244
|
+
S = S.concat(T.split(",")), G = Array.from(new Set(S)).join(",");
|
|
245
245
|
}
|
|
246
|
-
mutations.ADD_IS_GETTING_DICT_TYPES(
|
|
246
|
+
mutations.ADD_IS_GETTING_DICT_TYPES(G);
|
|
247
247
|
}
|
|
248
|
-
u(i(s,
|
|
249
|
-
const
|
|
250
|
-
if (!(
|
|
248
|
+
u(i(s, G)).then((A) => {
|
|
249
|
+
const _ = w(A, e);
|
|
250
|
+
if (!(_[e] && _[e].length > 0)) {
|
|
251
251
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
mutations.REMOVE_UNFIND_DICT_TYPES(
|
|
255
|
-
const S =
|
|
256
|
-
n.setItem(a, JSON.stringify(
|
|
254
|
+
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
255
|
+
const S = g(A), I = Object.assign(JSON.parse(JSON.stringify(v)), _), R = formatDictData(I, k, C, l == null ? void 0 : l.disabled);
|
|
256
|
+
n.setItem(a, JSON.stringify(R)), n.setItem(c, S), mutations.SET_DICT_CODES(R), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(G);
|
|
257
257
|
});
|
|
258
258
|
} else {
|
|
259
|
-
const
|
|
260
|
-
if (!(
|
|
259
|
+
const G = w(E, e);
|
|
260
|
+
if (!(G[e] && G[e].length > 0)) {
|
|
261
261
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
mutations.REMOVE_UNFIND_DICT_TYPES(
|
|
265
|
-
const A = state.dictCodes ||
|
|
266
|
-
Object.assign(A,
|
|
264
|
+
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
265
|
+
const A = state.dictCodes || v, _ = formatDictData(G, k, C, l == null ? void 0 : l.disabled);
|
|
266
|
+
Object.assign(A, _), n.setItem(a, JSON.stringify(A)), mutations.SET_DICT_CODES(A), r(state.dictCodes);
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
});
|
|
@@ -287,8 +287,8 @@ const actions = {
|
|
|
287
287
|
n(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
t(
|
|
290
|
+
const v = o.find((w) => w[a.value] === e);
|
|
291
|
+
t(v ? v[a.label] : d ?? "");
|
|
292
292
|
}
|
|
293
293
|
}, 1e3);
|
|
294
294
|
} else
|
|
@@ -331,8 +331,8 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
331
331
|
let s = [];
|
|
332
332
|
if (!i || !i[r])
|
|
333
333
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
334
|
-
const c = store.state.timeout || 3e4,
|
|
335
|
-
if (Date.now() -
|
|
334
|
+
const c = store.state.timeout || 3e4, v = Date.now(), w = window.setInterval(() => {
|
|
335
|
+
if (Date.now() - v > c) {
|
|
336
336
|
clearInterval(w), a("getLabelByCodes获取字典数据超时");
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
@@ -341,8 +341,8 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
341
341
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
345
|
-
n(
|
|
344
|
+
const g = GetLabelByCodesDothings(u, s, o, t.defaultVal, t.emptyText);
|
|
345
|
+
n(g && g.length > 0 ? t.formatFun(g, o) : t.defaultVal);
|
|
346
346
|
}
|
|
347
347
|
}, 1e3);
|
|
348
348
|
} else
|
|
@@ -351,7 +351,7 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
351
351
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const v = GetLabelByCodesDothings(
|
|
355
355
|
u,
|
|
356
356
|
s,
|
|
357
357
|
o,
|
|
@@ -359,7 +359,7 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
359
359
|
t.emptyText
|
|
360
360
|
);
|
|
361
361
|
n(
|
|
362
|
-
|
|
362
|
+
v && v.length > 0 ? t.formatFun(v, o) : t.defaultVal
|
|
363
363
|
);
|
|
364
364
|
});
|
|
365
365
|
else {
|
|
@@ -391,8 +391,8 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
391
391
|
n(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
t(
|
|
394
|
+
const v = o.find((w) => w[a.label] === e);
|
|
395
|
+
t(v ? v[a.value] : d ?? "");
|
|
396
396
|
}
|
|
397
397
|
}, 1e3);
|
|
398
398
|
} else
|
|
@@ -434,8 +434,8 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
434
434
|
let s = [];
|
|
435
435
|
if (!i || !i[r])
|
|
436
436
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
437
|
-
const c = store.state.timeout || 3e4,
|
|
438
|
-
if (Date.now() -
|
|
437
|
+
const c = store.state.timeout || 3e4, v = Date.now(), w = window.setInterval(() => {
|
|
438
|
+
if (Date.now() - v > c) {
|
|
439
439
|
clearInterval(w), a("getCodeByLabels获取字典数据超时");
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
@@ -444,8 +444,8 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
444
444
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
447
|
-
const
|
|
448
|
-
n(
|
|
447
|
+
const g = GetCodeByLabelsDothings(u, s, o, t.defaultVal);
|
|
448
|
+
n(g && g.length > 0 ? t.formatFun(g, o) : t.defaultVal);
|
|
449
449
|
}
|
|
450
450
|
}, 1e3);
|
|
451
451
|
} else
|
|
@@ -454,14 +454,14 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
454
454
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const v = GetCodeByLabelsDothings(
|
|
458
458
|
u,
|
|
459
459
|
s,
|
|
460
460
|
o,
|
|
461
461
|
t.defaultVal
|
|
462
462
|
);
|
|
463
463
|
n(
|
|
464
|
-
|
|
464
|
+
v && v.length > 0 ? t.formatFun(v, o) : t.defaultVal
|
|
465
465
|
);
|
|
466
466
|
});
|
|
467
467
|
else {
|
|
@@ -493,10 +493,10 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
493
493
|
clearInterval(s), d("getDictObjByDictTypes获取字典数据超时");
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
|
-
if (!store.state.isGettingDictTypes.some((
|
|
496
|
+
if (!store.state.isGettingDictTypes.some((v) => t.includes(v))) {
|
|
497
497
|
clearInterval(s);
|
|
498
|
-
for (let
|
|
499
|
-
const w = u[
|
|
498
|
+
for (let v = 0; v < u.length; v++) {
|
|
499
|
+
const w = u[v];
|
|
500
500
|
store.state.dictCodes[w] ? n[w] = store.state.dictCodes[w] : d(`不存在类型为:${w} 的字典字段,请确认后再填写`);
|
|
501
501
|
}
|
|
502
502
|
r(n);
|
|
@@ -519,8 +519,8 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
519
519
|
n(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
|
-
const
|
|
523
|
-
t(
|
|
522
|
+
const v = o.find((w) => w[a.value] === e);
|
|
523
|
+
t(v || (d ?? ""));
|
|
524
524
|
}
|
|
525
525
|
}, 1e3);
|
|
526
526
|
} else
|
|
@@ -585,36 +585,36 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
585
585
|
},
|
|
586
586
|
emits: ["submit", "reset", "action"],
|
|
587
587
|
setup(e, { expose: r, emit: d }) {
|
|
588
|
-
const t = e, { actionType: n, defaultVal: a, emptyText: u, modelValue: o, dictType: i, judgeTypeFun: s, type: c, judgeColorFun:
|
|
589
|
-
let
|
|
588
|
+
const t = e, { actionType: n, defaultVal: a, emptyText: u, modelValue: o, dictType: i, judgeTypeFun: s, type: c, judgeColorFun: v, color: w, judgeDisabledFun: g, disabled: m } = toRefs(t), k = toRaw(store.state.dictConfig), C = d, l = useAttrs(), b = computed(() => s.value ? s.value(o.value) : c.value ? c.value : y.value && y.value[k.format.type] ? y.value[k.format.type] : "primary"), T = computed(() => v != null && v.value ? v.value(o.value) : w != null && w.value ? w.value : y.value && y.value[k.format.color] ? y.value[k.format.color] : ""), E = computed(() => g.value ? g.value(o.value) : y.value && y.value[k.format.disabled] ? y.value[k.format.disabled] : !!m.value);
|
|
589
|
+
let y = ref(null), x = ref(null);
|
|
590
590
|
watchEffect(() => {
|
|
591
591
|
if (!i.value) {
|
|
592
592
|
x.value = o.value;
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
595
|
GetItemByCode(o.value, i.value).then((S) => {
|
|
596
|
-
S ? (
|
|
596
|
+
S ? (y.value = S, x.value = S[k.format.label]) : (y.value = null, x.value = String(a.value ?? (o.value === 0 ? 0 : o.value || u.value)));
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
|
-
const
|
|
600
|
-
E.value ||
|
|
599
|
+
const G = () => {
|
|
600
|
+
E.value || C(n.value, l);
|
|
601
601
|
}, A = ref(null);
|
|
602
|
-
return r({ getElButtonRef: () => A.value }), (S,
|
|
602
|
+
return r({ getElButtonRef: () => A.value }), (S, I) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
603
603
|
ref_key: "ElButtonRef",
|
|
604
604
|
ref: A,
|
|
605
|
-
type:
|
|
606
|
-
color:
|
|
605
|
+
type: b.value,
|
|
606
|
+
color: T.value,
|
|
607
607
|
disabled: E.value
|
|
608
|
-
}, S.$attrs, { onClick:
|
|
608
|
+
}, S.$attrs, { onClick: G }), createSlots({
|
|
609
609
|
default: withCtx(() => [
|
|
610
610
|
createTextVNode(toDisplayString(unref(x)), 1)
|
|
611
611
|
]),
|
|
612
612
|
_: 2
|
|
613
613
|
}, [
|
|
614
|
-
renderList(S.$slots, (
|
|
615
|
-
name:
|
|
616
|
-
fn: withCtx((
|
|
617
|
-
renderSlot(S.$slots,
|
|
614
|
+
renderList(S.$slots, (R, B, V) => ({
|
|
615
|
+
name: B,
|
|
616
|
+
fn: withCtx((f) => [
|
|
617
|
+
renderSlot(S.$slots, B, mergeProps({ key: V }, f))
|
|
618
618
|
])
|
|
619
619
|
}))
|
|
620
620
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -753,62 +753,62 @@ function CheckConditionsByOperation(e, r) {
|
|
|
753
753
|
return d;
|
|
754
754
|
}
|
|
755
755
|
function ValidateNestedRule(e, r) {
|
|
756
|
-
var
|
|
756
|
+
var v, w;
|
|
757
757
|
const d = {
|
|
758
|
-
"+": (
|
|
759
|
-
"-": (
|
|
760
|
-
"*": (
|
|
761
|
-
"/": (
|
|
762
|
-
"%": (
|
|
763
|
-
"**": (
|
|
758
|
+
"+": (g, m) => g + m,
|
|
759
|
+
"-": (g, m) => g - m,
|
|
760
|
+
"*": (g, m) => g * m,
|
|
761
|
+
"/": (g, m) => m !== 0 ? g / m : NaN,
|
|
762
|
+
"%": (g, m) => m !== 0 ? g % m : NaN,
|
|
763
|
+
"**": (g, m) => g ** m
|
|
764
764
|
}, t = {
|
|
765
|
-
">": (
|
|
766
|
-
"<": (
|
|
767
|
-
">=": (
|
|
768
|
-
"<=": (
|
|
769
|
-
"==": (
|
|
770
|
-
"!=": (
|
|
771
|
-
"===": (
|
|
772
|
-
"!==": (
|
|
773
|
-
}, n = (
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
776
|
-
return
|
|
777
|
-
if (typeof
|
|
778
|
-
const
|
|
779
|
-
if (!isNaN(
|
|
780
|
-
return
|
|
765
|
+
">": (g, m) => g > m,
|
|
766
|
+
"<": (g, m) => g < m,
|
|
767
|
+
">=": (g, m) => g >= m,
|
|
768
|
+
"<=": (g, m) => g <= m,
|
|
769
|
+
"==": (g, m) => g == m,
|
|
770
|
+
"!=": (g, m) => g != m,
|
|
771
|
+
"===": (g, m) => g === m,
|
|
772
|
+
"!==": (g, m) => g !== m
|
|
773
|
+
}, n = (g, m) => {
|
|
774
|
+
const k = (C) => {
|
|
775
|
+
if (C instanceof Date)
|
|
776
|
+
return C.getTime();
|
|
777
|
+
if (typeof C == "string" && /^\d{4}[-/]\d{2}[-/]\d{2}(?:\s+\d{2}:\d{2}:\d{2})?$/.test(C)) {
|
|
778
|
+
const b = new Date(C);
|
|
779
|
+
if (!isNaN(b.getTime()))
|
|
780
|
+
return b.getTime();
|
|
781
781
|
}
|
|
782
|
-
return
|
|
782
|
+
return C;
|
|
783
783
|
};
|
|
784
|
-
if (typeof
|
|
785
|
-
const l =
|
|
786
|
-
let
|
|
787
|
-
if (
|
|
784
|
+
if (typeof g == "string" && /^\$\{(.+?)\}$/.test(g)) {
|
|
785
|
+
const l = g.match(/^\$\{(.+?)\}$/)[1].trim().split(".").filter(Boolean);
|
|
786
|
+
let b = getNestedValue(m, l);
|
|
787
|
+
if (b == null)
|
|
788
788
|
return "";
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
return /^-?\d+(\.\d+)?$/.test(
|
|
789
|
+
if (b = k(b), typeof b == "string") {
|
|
790
|
+
const T = b.trim();
|
|
791
|
+
return /^-?\d+(\.\d+)?$/.test(T) ? Number(T) : T;
|
|
792
792
|
}
|
|
793
|
-
return
|
|
793
|
+
return b;
|
|
794
794
|
}
|
|
795
|
-
return typeof
|
|
796
|
-
}, a = (
|
|
797
|
-
var
|
|
798
|
-
if (Array.isArray(
|
|
799
|
-
let
|
|
800
|
-
for (let l = 1; l <
|
|
801
|
-
const
|
|
802
|
-
|
|
795
|
+
return typeof g == "string" && /^-?\d+(\.\d+)?$/.test(g) ? Number(g) : g;
|
|
796
|
+
}, a = (g, m) => {
|
|
797
|
+
var k;
|
|
798
|
+
if (Array.isArray(g)) {
|
|
799
|
+
let C = Array.isArray(g[0]) ? a(g[0], m) : n(g[0], m);
|
|
800
|
+
for (let l = 1; l < g.length; l += 2) {
|
|
801
|
+
const b = g[l], T = g[l + 1], E = Array.isArray(T) ? a(T, m) : n(T, m), y = typeof C == "number" ? C : NaN, x = typeof E == "number" ? E : NaN;
|
|
802
|
+
C = ((k = d[b]) == null ? void 0 : k.call(d, y, x)) ?? NaN;
|
|
803
803
|
}
|
|
804
|
-
return
|
|
804
|
+
return C;
|
|
805
805
|
}
|
|
806
|
-
return n(
|
|
806
|
+
return n(g, m);
|
|
807
807
|
};
|
|
808
808
|
if (!Array.isArray(e) || e.length < 3)
|
|
809
809
|
return !1;
|
|
810
810
|
const u = e[e.length - 2], o = e[e.length - 1], i = e.slice(0, e.length - 2), s = a(i, r), c = a(o, r);
|
|
811
|
-
return typeof s != "number" || typeof c != "number" ? ((
|
|
811
|
+
return typeof s != "number" || typeof c != "number" ? ((v = t[u]) == null ? void 0 : v.call(t, s, c)) ?? !1 : isNaN(s) || isNaN(c) ? !1 : ((w = t[u]) == null ? void 0 : w.call(t, s, c)) ?? !1;
|
|
812
812
|
}
|
|
813
813
|
function CalculateLogicalResult(conditions, expression) {
|
|
814
814
|
if (!Array.isArray(conditions))
|
|
@@ -927,41 +927,41 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
927
927
|
setup(e) {
|
|
928
928
|
const r = e, d = ref(null), t = ref(""), n = (s, c) => {
|
|
929
929
|
try {
|
|
930
|
-
const
|
|
931
|
-
return new Function(w, `return (${s});`)(...
|
|
930
|
+
const v = Object.keys(c), w = v.join(", ");
|
|
931
|
+
return new Function(w, `return (${s});`)(...v.map((m) => c[m]));
|
|
932
932
|
} catch {
|
|
933
933
|
return "";
|
|
934
934
|
}
|
|
935
|
-
}, a = (s) => typeof s == "string" ? s : Array.isArray(s) ? s.map((c) => a(c)).filter(Boolean).join(" ") : typeof s == "object" && s !== null ? Object.entries(s).filter(([c,
|
|
936
|
-
const w = new DOMParser().parseFromString(s, "text/html"),
|
|
937
|
-
return Array.from(
|
|
938
|
-
Array.from(m.attributes).forEach((
|
|
939
|
-
let
|
|
940
|
-
if (
|
|
941
|
-
|
|
942
|
-
else if (
|
|
943
|
-
|
|
935
|
+
}, a = (s) => typeof s == "string" ? s : Array.isArray(s) ? s.map((c) => a(c)).filter(Boolean).join(" ") : typeof s == "object" && s !== null ? Object.entries(s).filter(([c, v]) => !!v).map(([c]) => c).join(" ") : "", u = (s, c) => {
|
|
936
|
+
const w = new DOMParser().parseFromString(s, "text/html"), g = w.getElementsByTagName("*");
|
|
937
|
+
return Array.from(g).forEach((m) => {
|
|
938
|
+
Array.from(m.attributes).forEach((k) => {
|
|
939
|
+
let C;
|
|
940
|
+
if (k.name.startsWith(":"))
|
|
941
|
+
C = k.name.slice(1);
|
|
942
|
+
else if (k.name.startsWith("v-bind:"))
|
|
943
|
+
C = k.name.slice(7);
|
|
944
944
|
else
|
|
945
945
|
return;
|
|
946
|
-
const l =
|
|
947
|
-
let
|
|
946
|
+
const l = k.value;
|
|
947
|
+
let b;
|
|
948
948
|
try {
|
|
949
|
-
|
|
950
|
-
} catch (
|
|
951
|
-
console.error(`v-bind表达式错误: ${l}`,
|
|
949
|
+
b = n(l, c);
|
|
950
|
+
} catch (T) {
|
|
951
|
+
console.error(`v-bind表达式错误: ${l}`, T), b = "";
|
|
952
952
|
}
|
|
953
|
-
if (
|
|
954
|
-
m.removeAttribute(
|
|
953
|
+
if (b == null)
|
|
954
|
+
m.removeAttribute(C);
|
|
955
955
|
else {
|
|
956
|
-
const
|
|
957
|
-
m.setAttribute(
|
|
956
|
+
const T = C === "class" ? a(b) : String(b);
|
|
957
|
+
m.setAttribute(C, T);
|
|
958
958
|
}
|
|
959
|
-
m.removeAttribute(
|
|
959
|
+
m.removeAttribute(k.name);
|
|
960
960
|
});
|
|
961
961
|
}), w.body.innerHTML;
|
|
962
|
-
}, o = (s, c) => s.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g, (
|
|
963
|
-
const
|
|
964
|
-
return u(
|
|
962
|
+
}, o = (s, c) => s.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g, (v, w) => n(w, c)), i = (s, c) => {
|
|
963
|
+
const v = o(s, c);
|
|
964
|
+
return u(v, c);
|
|
965
965
|
};
|
|
966
966
|
return watch(
|
|
967
967
|
() => [r.render, r.scope, r.formData],
|
|
@@ -1023,128 +1023,128 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1023
1023
|
},
|
|
1024
1024
|
emits: ["submit", "reset", "action"],
|
|
1025
1025
|
setup(e, { expose: r, emit: d }) {
|
|
1026
|
-
const t = d, n = e, { defaultVal: a, emptyText: u, dictType: o, disabledObj: i, filterDataFun: s, disabledDataFun: c, list:
|
|
1027
|
-
let
|
|
1026
|
+
const t = d, n = e, { defaultVal: a, emptyText: u, dictType: o, disabledObj: i, filterDataFun: s, disabledDataFun: c, list: v, col: w, gap: g } = toRefs(n), m = toRaw(store.state.dictConfig), k = useAttrs();
|
|
1027
|
+
let C = ref("");
|
|
1028
1028
|
const l = computed(() => {
|
|
1029
|
-
const
|
|
1030
|
-
return Object.entries(
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1029
|
+
const B = {};
|
|
1030
|
+
return Object.entries(k).forEach(([V, f]) => {
|
|
1031
|
+
const p = ToKebabCase(V);
|
|
1032
|
+
if (p.startsWith("button-") || p.startsWith("on-button")) {
|
|
1033
|
+
const D = ToCamelCase(p.replace("button-", ""));
|
|
1034
|
+
B[D] = f;
|
|
1035
1035
|
}
|
|
1036
|
-
}),
|
|
1037
|
-
}), v = computed(() => {
|
|
1038
|
-
const O = Number(w.value), $ = 100 / O, p = Array.isArray(y.value) ? y.value : String(y.value).split(" "), f = p[0], B = (p[1] || f) * (O - 1) / O;
|
|
1039
|
-
return `calc(${$}% - ${B}px) !important`;
|
|
1036
|
+
}), B;
|
|
1040
1037
|
}), b = computed(() => {
|
|
1041
|
-
const
|
|
1042
|
-
return
|
|
1038
|
+
const B = Number(w.value), V = 100 / B, f = Array.isArray(g.value) ? g.value : String(g.value).split(" "), p = f[0], O = (f[1] || p) * (B - 1) / B;
|
|
1039
|
+
return `calc(${V}% - ${O}px) !important`;
|
|
1040
|
+
}), T = computed(() => {
|
|
1041
|
+
const B = Array.isArray(g.value) ? g.value : String(g.value).split(" "), V = B[0], f = B[1] || V;
|
|
1042
|
+
return `${V}px ${f}px`;
|
|
1043
1043
|
});
|
|
1044
|
-
function E(
|
|
1044
|
+
function E(B) {
|
|
1045
1045
|
return {
|
|
1046
1046
|
...l.value,
|
|
1047
|
-
...
|
|
1047
|
+
...B
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const y = ref([]), x = async () => {
|
|
1051
1051
|
if (!o.value)
|
|
1052
1052
|
return;
|
|
1053
|
-
let
|
|
1053
|
+
let B = [];
|
|
1054
1054
|
if (typeof o.value == "object") {
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const { filters:
|
|
1059
|
-
|
|
1055
|
+
C.value = o.value.type;
|
|
1056
|
+
const V = await store.actions.getDictDataObj(C.value);
|
|
1057
|
+
B = [].concat(V[C.value]);
|
|
1058
|
+
const { filters: f, filterType: p = m.format.value, reverse: D = !1 } = o.value, O = typeof f == "string" ? f.split(",") : f;
|
|
1059
|
+
D ? B = B.filter((F) => !O.includes(F[p])) : B = B.filter((F) => O.includes(F[p]));
|
|
1060
1060
|
} else {
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1061
|
+
C.value = o.value;
|
|
1062
|
+
const V = await store.actions.getDictDataObj(C.value);
|
|
1063
|
+
B = [].concat(V[C.value]);
|
|
1064
1064
|
}
|
|
1065
|
-
if (s.value && (
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
[m.format.disabled]: c.value(
|
|
1065
|
+
if (s.value && (B = s.value(B)), c.value)
|
|
1066
|
+
B = B.map((V) => ({
|
|
1067
|
+
...V,
|
|
1068
|
+
[m.format.disabled]: c.value(V)
|
|
1069
1069
|
}));
|
|
1070
1070
|
else if (i.value) {
|
|
1071
|
-
const { disabledValues:
|
|
1072
|
-
|
|
1073
|
-
const F = JSON.parse(JSON.stringify(
|
|
1074
|
-
return F[m.format.disabled] = !
|
|
1075
|
-
}) :
|
|
1076
|
-
const F = JSON.parse(JSON.stringify(
|
|
1077
|
-
return F[m.format.disabled] =
|
|
1071
|
+
const { disabledValues: V, disabledType: f = m.format.value, reverse: p = !1 } = i.value, D = typeof V == "string" ? V.split(",") : V;
|
|
1072
|
+
p ? B = B.map((O) => {
|
|
1073
|
+
const F = JSON.parse(JSON.stringify(O));
|
|
1074
|
+
return F[m.format.disabled] = !D.includes(F[f]) || F[m.format.disabled], F;
|
|
1075
|
+
}) : B = B.map((O) => {
|
|
1076
|
+
const F = JSON.parse(JSON.stringify(O));
|
|
1077
|
+
return F[m.format.disabled] = D.includes(F[f]) || F[m.format.disabled], F;
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
|
|
1081
|
-
type:
|
|
1082
|
-
label:
|
|
1083
|
-
color:
|
|
1084
|
-
icon:
|
|
1085
|
-
disabled:
|
|
1080
|
+
y.value = B.map((V) => ({
|
|
1081
|
+
type: V[m.format.type],
|
|
1082
|
+
label: V[m.format.label],
|
|
1083
|
+
color: V[m.format.color],
|
|
1084
|
+
icon: V[m.format.icon],
|
|
1085
|
+
disabled: V[m.format.disabled],
|
|
1086
1086
|
actionType: "submit",
|
|
1087
|
-
|
|
1087
|
+
...V
|
|
1088
1088
|
}));
|
|
1089
1089
|
};
|
|
1090
|
-
async function
|
|
1090
|
+
async function G() {
|
|
1091
1091
|
if (o.value) {
|
|
1092
1092
|
x();
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
let
|
|
1096
|
-
for (let
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
),
|
|
1095
|
+
let B = [];
|
|
1096
|
+
for (let V = 0; V < v.value.length; V++) {
|
|
1097
|
+
const f = v.value[V];
|
|
1098
|
+
if (f.dictType) {
|
|
1099
|
+
const p = await GetItemByCode(f.modelValue, f.dictType);
|
|
1100
|
+
f.type = f.type || p[m.format.type] || "", f.label = String(
|
|
1101
|
+
f.label || (p ? p[m.format.label] : (f.defaultVal || a.value) ?? (f.modelValue === 0 ? 0 : f.modelValue || f.emptyText || u.value))
|
|
1102
|
+
), f.color = f.color || p[m.format.color] || "", f.icon = f.icon || p[m.format.icon] || "", f.disabled = f.disabled ?? (p[m.format.disabled] || !1);
|
|
1103
1103
|
}
|
|
1104
|
-
|
|
1104
|
+
B.push(f);
|
|
1105
1105
|
}
|
|
1106
|
-
|
|
1106
|
+
y.value = B;
|
|
1107
1107
|
}
|
|
1108
1108
|
onMounted(() => {
|
|
1109
|
-
|
|
1109
|
+
G();
|
|
1110
1110
|
}), watch(
|
|
1111
1111
|
() => n.list,
|
|
1112
1112
|
() => {
|
|
1113
|
-
|
|
1113
|
+
G();
|
|
1114
1114
|
},
|
|
1115
1115
|
{ deep: !0 }
|
|
1116
1116
|
// 深层监听数组/对象变化
|
|
1117
1117
|
);
|
|
1118
|
-
const A = (
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
return r({ getElButtonsRef: S, getElButtonRefs: () =>
|
|
1118
|
+
const A = (B) => {
|
|
1119
|
+
B.disabled || (B.actionType === "submit" ? t("submit", B) : B.actionType === "reset" ? t("reset", B) : B.actionType === "action" && t("action", B));
|
|
1120
|
+
}, _ = ref(null), S = () => _.value, I = ref([]);
|
|
1121
|
+
return r({ getElButtonsRef: S, getElButtonRefs: () => I.value }), (B, V) => (openBlock(), createElementBlock("div", {
|
|
1122
1122
|
ref_key: "ElButtonsRef",
|
|
1123
|
-
ref:
|
|
1124
|
-
class: normalizeClass(["el-buttons-dict",
|
|
1125
|
-
id:
|
|
1126
|
-
style: normalizeStyle({ ...
|
|
1123
|
+
ref: _,
|
|
1124
|
+
class: normalizeClass(["el-buttons-dict", B.$attrs.class]),
|
|
1125
|
+
id: B.$attrs.id,
|
|
1126
|
+
style: normalizeStyle({ ...B.$attrs.style, gap: T.value })
|
|
1127
1127
|
}, [
|
|
1128
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1128
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (f, p) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
1129
1129
|
ref_for: !0,
|
|
1130
|
-
ref: (
|
|
1131
|
-
|
|
1130
|
+
ref: (D) => {
|
|
1131
|
+
D && (I.value[p] = D);
|
|
1132
1132
|
},
|
|
1133
|
-
key:
|
|
1134
|
-
style: { width:
|
|
1135
|
-
onClick: (
|
|
1136
|
-
}, E(
|
|
1133
|
+
key: p,
|
|
1134
|
+
style: { width: b.value, margin: "0 !important" },
|
|
1135
|
+
onClick: (D) => A(f)
|
|
1136
|
+
}, E(f)), createSlots({
|
|
1137
1137
|
default: withCtx(() => [
|
|
1138
|
-
createTextVNode(toDisplayString(
|
|
1138
|
+
createTextVNode(toDisplayString(f.label || f.modelValue), 1)
|
|
1139
1139
|
]),
|
|
1140
1140
|
_: 2
|
|
1141
1141
|
}, [
|
|
1142
|
-
renderList(
|
|
1143
|
-
name:
|
|
1142
|
+
renderList(f.slotList, (D, O) => ({
|
|
1143
|
+
name: D.slotName,
|
|
1144
1144
|
fn: withCtx((F) => [
|
|
1145
1145
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
1146
|
-
key:
|
|
1147
|
-
render:
|
|
1146
|
+
key: O,
|
|
1147
|
+
render: D.render,
|
|
1148
1148
|
scope: F
|
|
1149
1149
|
}, null, 8, ["render", "scope"]))
|
|
1150
1150
|
])
|
|
@@ -1252,99 +1252,99 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1252
1252
|
},
|
|
1253
1253
|
emits: ["dictChange"],
|
|
1254
1254
|
setup(e, { expose: r, emit: d }) {
|
|
1255
|
-
const t = useAttrs(), n = e, { maxLevel: a, dictType: u, disabledObj: o, filterDataFun: i, disabledDataFun: s } = toRefs(n), c = ref(""),
|
|
1255
|
+
const t = useAttrs(), n = e, { maxLevel: a, dictType: u, disabledObj: o, filterDataFun: i, disabledDataFun: s } = toRefs(n), c = ref(""), v = toRaw(store.state.dictConfig), w = d, g = (A) => {
|
|
1256
1256
|
w("dictChange", A);
|
|
1257
1257
|
}, m = reactive({
|
|
1258
1258
|
list: []
|
|
1259
|
-
}),
|
|
1259
|
+
}), k = async () => {
|
|
1260
1260
|
if (!u.value)
|
|
1261
1261
|
return;
|
|
1262
1262
|
let A = [];
|
|
1263
1263
|
if (typeof u.value == "object") {
|
|
1264
1264
|
c.value = u.value.type;
|
|
1265
|
-
const
|
|
1266
|
-
A = [].concat(
|
|
1267
|
-
const { filters: S, filterType:
|
|
1268
|
-
|
|
1265
|
+
const _ = await store.actions.getDictDataObj(c.value);
|
|
1266
|
+
A = [].concat(_[c.value]);
|
|
1267
|
+
const { filters: S, filterType: I = v.format.value, reverse: R = !1 } = u.value, B = typeof S == "string" ? S.split(",") : S;
|
|
1268
|
+
R ? A = A.filter((V) => !B.includes(V[I])) : A = A.filter((V) => B.includes(V[I]));
|
|
1269
1269
|
} else {
|
|
1270
1270
|
c.value = u.value;
|
|
1271
|
-
const
|
|
1272
|
-
A = [].concat(
|
|
1271
|
+
const _ = await store.actions.getDictDataObj(c.value);
|
|
1272
|
+
A = [].concat(_[c.value]);
|
|
1273
1273
|
}
|
|
1274
1274
|
if (i.value && (A = i.value(A)), s.value)
|
|
1275
|
-
A = A.map((
|
|
1276
|
-
...
|
|
1277
|
-
[
|
|
1275
|
+
A = A.map((_) => ({
|
|
1276
|
+
..._,
|
|
1277
|
+
[v.format.disabled]: s.value(_)
|
|
1278
1278
|
}));
|
|
1279
1279
|
else if (o.value) {
|
|
1280
|
-
const { disabledValues:
|
|
1281
|
-
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
}) : A = A.map((
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1280
|
+
const { disabledValues: _, disabledType: S = v.treeSetting.valueField, reverse: I = !1 } = o.value, R = typeof _ == "string" ? _.split(",") : _;
|
|
1281
|
+
I ? A = A.map((B) => {
|
|
1282
|
+
const V = JSON.parse(JSON.stringify(B));
|
|
1283
|
+
return V[v.format.disabled] = !R.includes(V[S]) || V[v.format.disabled], V;
|
|
1284
|
+
}) : A = A.map((B) => {
|
|
1285
|
+
const V = JSON.parse(JSON.stringify(B));
|
|
1286
|
+
return V[v.format.disabled] = R.includes(V[S]) || V[v.format.disabled], V;
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
m.list = A;
|
|
1290
|
-
},
|
|
1291
|
-
const A = store.state.dictConfig.treeSetting,
|
|
1290
|
+
}, C = computed(() => store.state.isGettingDictTypes.includes(c.value)), l = computed(() => store.state.isGettingAllDictTypes), b = computed(() => {
|
|
1291
|
+
const A = store.state.dictConfig.treeSetting, _ = store.state.dictConfig.format, S = t.props ?? {};
|
|
1292
1292
|
return {
|
|
1293
|
-
disabled: (S == null ? void 0 : S.disabled) ??
|
|
1293
|
+
disabled: (S == null ? void 0 : S.disabled) ?? _.disabled,
|
|
1294
1294
|
label: (S == null ? void 0 : S.label) ?? A.labelField,
|
|
1295
1295
|
value: (S == null ? void 0 : S.value) ?? A.valueField,
|
|
1296
1296
|
children: (S == null ? void 0 : S.children) ?? A.childrenField,
|
|
1297
1297
|
leaf: (S == null ? void 0 : S.leaf) ?? A.leafField
|
|
1298
1298
|
};
|
|
1299
|
-
}),
|
|
1300
|
-
const A = JSON.parse(JSON.stringify(
|
|
1301
|
-
...
|
|
1302
|
-
valueField:
|
|
1303
|
-
labelField:
|
|
1304
|
-
childrenField:
|
|
1305
|
-
leafField:
|
|
1306
|
-
disabled:
|
|
1299
|
+
}), T = computed(() => {
|
|
1300
|
+
const A = JSON.parse(JSON.stringify(v.treeSetting)), _ = t.props || {}, S = {
|
|
1301
|
+
..._,
|
|
1302
|
+
valueField: _ != null && _.value ? _.value : A.valueField,
|
|
1303
|
+
labelField: _ != null && _.label ? _.label : A.labelField,
|
|
1304
|
+
childrenField: _ != null && _.children ? _.children : A.childrenField,
|
|
1305
|
+
leafField: _ != null && _.leaf ? _.leaf : A.leafField,
|
|
1306
|
+
disabled: _ != null && _.disabled ? _.disabled : v.format.disabled
|
|
1307
1307
|
};
|
|
1308
1308
|
return Object.assign(A, S);
|
|
1309
|
-
}), E = (A,
|
|
1309
|
+
}), E = (A, _) => {
|
|
1310
1310
|
for (let S = 0; S < A.length; S++) {
|
|
1311
|
-
const
|
|
1312
|
-
if (
|
|
1313
|
-
delete
|
|
1311
|
+
const I = A[S];
|
|
1312
|
+
if (I[T.value.levelField] === _) {
|
|
1313
|
+
delete I[T.value.childrenField], I[T.value.leafField] = !0;
|
|
1314
1314
|
continue;
|
|
1315
1315
|
} else {
|
|
1316
|
-
const
|
|
1317
|
-
E(
|
|
1316
|
+
const B = I[T.value.childrenField];
|
|
1317
|
+
E(B, _);
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
},
|
|
1320
|
+
}, y = computed(() => {
|
|
1321
1321
|
if (m.list.length === 0)
|
|
1322
1322
|
return [];
|
|
1323
1323
|
const A = JSON.parse(JSON.stringify(m.list));
|
|
1324
|
-
let
|
|
1325
|
-
return a.value && E(
|
|
1324
|
+
let _ = ListToTree(A, T.value);
|
|
1325
|
+
return a.value && E(_, +a.value), _ || [];
|
|
1326
1326
|
});
|
|
1327
1327
|
watch(
|
|
1328
|
-
[
|
|
1329
|
-
([A,
|
|
1330
|
-
!A && !
|
|
1328
|
+
[C, l],
|
|
1329
|
+
([A, _]) => {
|
|
1330
|
+
!A && !_ && k();
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
1333
|
immediate: !0
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
const x = ref(null);
|
|
1337
|
-
return r({ getElCascaderRef: () => x.value }), (A,
|
|
1337
|
+
return r({ getElCascaderRef: () => x.value }), (A, _) => (openBlock(), createBlock(unref(ElCascader), mergeProps({
|
|
1338
1338
|
ref_key: "ElCascaderRef",
|
|
1339
1339
|
ref: x,
|
|
1340
|
-
options:
|
|
1341
|
-
props:
|
|
1342
|
-
onChange:
|
|
1340
|
+
options: y.value,
|
|
1341
|
+
props: b.value,
|
|
1342
|
+
onChange: g
|
|
1343
1343
|
}, A.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1344
|
-
renderList(A.$slots, (S,
|
|
1345
|
-
name:
|
|
1346
|
-
fn: withCtx((
|
|
1347
|
-
renderSlot(A.$slots,
|
|
1344
|
+
renderList(A.$slots, (S, I, R) => ({
|
|
1345
|
+
name: I,
|
|
1346
|
+
fn: withCtx((B) => [
|
|
1347
|
+
renderSlot(A.$slots, I, mergeProps({ key: R }, B))
|
|
1348
1348
|
])
|
|
1349
1349
|
}))
|
|
1350
1350
|
]), 1040, ["options", "props"]));
|
|
@@ -1401,35 +1401,35 @@ const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1401
1401
|
}
|
|
1402
1402
|
},
|
|
1403
1403
|
setup(e, { expose: r }) {
|
|
1404
|
-
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal:
|
|
1405
|
-
let l = ref(null),
|
|
1404
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), g = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[g.format.type] ? l.value[g.format.type] : "primary"), k = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[g.format.color] ? l.value[g.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[g.format.disabled] ? l.value[g.format.disabled] : !!c.value);
|
|
1405
|
+
let l = ref(null), b = ref(null);
|
|
1406
1406
|
watchEffect(() => {
|
|
1407
1407
|
if (!n.value) {
|
|
1408
|
-
|
|
1408
|
+
b.value = t.value;
|
|
1409
1409
|
return;
|
|
1410
1410
|
}
|
|
1411
|
-
GetItemByCode(t.value, n.value).then((
|
|
1412
|
-
|
|
1411
|
+
GetItemByCode(t.value, n.value).then((y) => {
|
|
1412
|
+
y ? (l.value = y, b.value = y[g.format.label]) : (l.value = null, b.value = String(v.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
1413
1413
|
});
|
|
1414
1414
|
});
|
|
1415
|
-
const
|
|
1416
|
-
return r({ getElCheckTagRef: () =>
|
|
1415
|
+
const T = ref(null);
|
|
1416
|
+
return r({ getElCheckTagRef: () => T.value }), (y, x) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1417
1417
|
class: "el-check-tag-dict",
|
|
1418
1418
|
ref_key: "ElCheckTagRef",
|
|
1419
|
-
ref:
|
|
1419
|
+
ref: T,
|
|
1420
1420
|
type: m.value,
|
|
1421
|
-
color:
|
|
1422
|
-
disabled:
|
|
1423
|
-
},
|
|
1421
|
+
color: k.value,
|
|
1422
|
+
disabled: C.value
|
|
1423
|
+
}, y.$attrs), createSlots({
|
|
1424
1424
|
default: withCtx(() => [
|
|
1425
|
-
createTextVNode(toDisplayString(unref(
|
|
1425
|
+
createTextVNode(toDisplayString(unref(b)), 1)
|
|
1426
1426
|
]),
|
|
1427
1427
|
_: 2
|
|
1428
1428
|
}, [
|
|
1429
|
-
renderList(
|
|
1429
|
+
renderList(y.$slots, (G, A, _) => ({
|
|
1430
1430
|
name: A,
|
|
1431
1431
|
fn: withCtx((S) => [
|
|
1432
|
-
renderSlot(
|
|
1432
|
+
renderSlot(y.$slots, A, mergeProps({ key: _ }, S))
|
|
1433
1433
|
])
|
|
1434
1434
|
}))
|
|
1435
1435
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -1486,47 +1486,47 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1486
1486
|
},
|
|
1487
1487
|
emits: ["dictChange", "change", "update:modelValue"],
|
|
1488
1488
|
setup(e, { expose: r, emit: d }) {
|
|
1489
|
-
const t = e, { modelValue: n, options: a, fieldNames: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun:
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1492
|
-
for (let
|
|
1493
|
-
const
|
|
1494
|
-
if (n.value.includes(
|
|
1495
|
-
if (
|
|
1496
|
-
|
|
1489
|
+
const t = e, { modelValue: n, options: a, fieldNames: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: v } = toRefs(t), w = ref([]), g = ref(""), m = toRaw(store.state.dictConfig), k = d, C = (_, S) => {
|
|
1490
|
+
k("change", _);
|
|
1491
|
+
const I = [];
|
|
1492
|
+
for (let R = 0; R < b.value.length; R++) {
|
|
1493
|
+
const B = b.value[R];
|
|
1494
|
+
if (n.value.includes(B[m.format.value]) && I.push(B), R === S)
|
|
1495
|
+
if (_ && !n.value.includes(B[m.format.value]))
|
|
1496
|
+
I.push(B);
|
|
1497
1497
|
else {
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1498
|
+
const V = I.indexOf(B);
|
|
1499
|
+
I.splice(V, 1);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
if (
|
|
1502
|
+
if (k(
|
|
1503
1503
|
"update:modelValue",
|
|
1504
|
-
|
|
1504
|
+
I.map((R) => R[m.format.value])
|
|
1505
1505
|
), s.value) {
|
|
1506
|
-
|
|
1506
|
+
k("dictChange", I);
|
|
1507
1507
|
return;
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
k(
|
|
1510
1510
|
"dictChange",
|
|
1511
|
-
|
|
1511
|
+
I.map((R) => R[m.format.value])
|
|
1512
1512
|
);
|
|
1513
1513
|
}, l = reactive({
|
|
1514
1514
|
list: []
|
|
1515
|
-
}),
|
|
1516
|
-
label:
|
|
1517
|
-
value:
|
|
1518
|
-
disabled: !!
|
|
1519
|
-
...
|
|
1515
|
+
}), b = computed(() => l.list.map((_) => ({
|
|
1516
|
+
label: _[m.format.label],
|
|
1517
|
+
value: _[m.format.value],
|
|
1518
|
+
disabled: !!_[m.format.disabled],
|
|
1519
|
+
..._
|
|
1520
1520
|
})));
|
|
1521
1521
|
watch(
|
|
1522
|
-
[() =>
|
|
1523
|
-
([
|
|
1524
|
-
const
|
|
1525
|
-
for (let
|
|
1526
|
-
const
|
|
1527
|
-
S.includes(
|
|
1522
|
+
[() => b.value, () => t.modelValue],
|
|
1523
|
+
([_, S]) => {
|
|
1524
|
+
const I = [];
|
|
1525
|
+
for (let R = 0; R < _.length; R++) {
|
|
1526
|
+
const B = _[R];
|
|
1527
|
+
S.includes(B[m.format.value]) ? I.push(!0) : I.push(!1);
|
|
1528
1528
|
}
|
|
1529
|
-
w.value =
|
|
1529
|
+
w.value = I;
|
|
1530
1530
|
},
|
|
1531
1531
|
{
|
|
1532
1532
|
deep: !0,
|
|
@@ -1534,76 +1534,76 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1534
1534
|
}
|
|
1535
1535
|
// 数组/对象必须加 deep!
|
|
1536
1536
|
);
|
|
1537
|
-
const
|
|
1537
|
+
const T = async () => {
|
|
1538
1538
|
if (!o.value || a.value && a.value.length > 0)
|
|
1539
1539
|
return;
|
|
1540
|
-
let
|
|
1540
|
+
let _ = [];
|
|
1541
1541
|
if (typeof o.value == "object") {
|
|
1542
|
-
|
|
1543
|
-
const S = await store.actions.getDictDataObj(
|
|
1544
|
-
|
|
1545
|
-
const { filters:
|
|
1546
|
-
|
|
1542
|
+
g.value = o.value.type;
|
|
1543
|
+
const S = await store.actions.getDictDataObj(g.value);
|
|
1544
|
+
_ = [].concat(S[g.value]);
|
|
1545
|
+
const { filters: I, filterType: R = m.format.value, reverse: B = !1 } = o.value, V = typeof I == "string" ? I.split(",") : I;
|
|
1546
|
+
B ? _ = _.filter((f) => !V.includes(f[R])) : _ = _.filter((f) => V.includes(f[R]));
|
|
1547
1547
|
} else {
|
|
1548
|
-
|
|
1549
|
-
const S = await store.actions.getDictDataObj(
|
|
1550
|
-
|
|
1548
|
+
g.value = o.value;
|
|
1549
|
+
const S = await store.actions.getDictDataObj(g.value);
|
|
1550
|
+
_ = [].concat(S[g.value]);
|
|
1551
1551
|
}
|
|
1552
|
-
if (c.value && (
|
|
1553
|
-
|
|
1552
|
+
if (c.value && (_ = c.value(_)), v.value)
|
|
1553
|
+
_ = _.map((S) => ({
|
|
1554
1554
|
...S,
|
|
1555
|
-
[m.format.disabled]:
|
|
1555
|
+
[m.format.disabled]: v.value(S)
|
|
1556
1556
|
}));
|
|
1557
1557
|
else if (i.value) {
|
|
1558
|
-
const { disabledValues: S, disabledType:
|
|
1559
|
-
|
|
1560
|
-
const
|
|
1561
|
-
return
|
|
1562
|
-
}) :
|
|
1563
|
-
const
|
|
1564
|
-
return
|
|
1558
|
+
const { disabledValues: S, disabledType: I = m.format.value, reverse: R = !1 } = i.value, B = typeof S == "string" ? S.split(",") : S;
|
|
1559
|
+
R ? _ = _.map((V) => {
|
|
1560
|
+
const f = JSON.parse(JSON.stringify(V));
|
|
1561
|
+
return f[m.format.disabled] = !B.includes(f[I]) || f[m.format.disabled], f;
|
|
1562
|
+
}) : _ = _.map((V) => {
|
|
1563
|
+
const f = JSON.parse(JSON.stringify(V));
|
|
1564
|
+
return f[m.format.disabled] = B.includes(f[I]) || f[m.format.disabled], f;
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
|
-
l.list =
|
|
1568
|
-
}, E = computed(() => store.state.isGettingDictTypes.includes(
|
|
1567
|
+
l.list = _;
|
|
1568
|
+
}, E = computed(() => store.state.isGettingDictTypes.includes(g.value)), y = computed(() => store.state.isGettingAllDictTypes), x = computed(() => a.value);
|
|
1569
1569
|
watch(
|
|
1570
|
-
[E,
|
|
1571
|
-
([
|
|
1572
|
-
!
|
|
1573
|
-
[m.format.value]:
|
|
1574
|
-
[m.format.label]:
|
|
1575
|
-
[m.format.disabled]: !!
|
|
1576
|
-
...
|
|
1577
|
-
})) : l.list = l.list.map((
|
|
1578
|
-
[m.format.value]:
|
|
1579
|
-
[m.format.label]:
|
|
1570
|
+
[E, y, x],
|
|
1571
|
+
([_, S, I]) => {
|
|
1572
|
+
!_ && !S && I && I.length === 0 && T(), I.length > 0 && (l.list = JSON.parse(JSON.stringify(I)), l.list.length > 0 && (Object.prototype.toString.call(l.list[0]) === "[object Object]" ? l.list = l.list.map((B) => ({
|
|
1573
|
+
[m.format.value]: B[u.value.value],
|
|
1574
|
+
[m.format.label]: B[u.value.label],
|
|
1575
|
+
[m.format.disabled]: !!B[u.value.disabled],
|
|
1576
|
+
...B
|
|
1577
|
+
})) : l.list = l.list.map((B) => ({
|
|
1578
|
+
[m.format.value]: B,
|
|
1579
|
+
[m.format.label]: B
|
|
1580
1580
|
}))));
|
|
1581
1581
|
},
|
|
1582
1582
|
{
|
|
1583
1583
|
immediate: !0
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
|
-
const
|
|
1587
|
-
return r({ getElCheckAbleTagRefs: () =>
|
|
1586
|
+
const G = ref([]);
|
|
1587
|
+
return r({ getElCheckAbleTagRefs: () => G.value }), (_, S) => (openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (I, R) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1588
1588
|
ref_for: !0,
|
|
1589
|
-
ref: (
|
|
1590
|
-
|
|
1589
|
+
ref: (B) => {
|
|
1590
|
+
B && (G.value[R] = B);
|
|
1591
1591
|
},
|
|
1592
|
-
checked: w.value[
|
|
1593
|
-
},
|
|
1594
|
-
onChange: (
|
|
1595
|
-
key:
|
|
1596
|
-
type:
|
|
1592
|
+
checked: w.value[R]
|
|
1593
|
+
}, _.$attrs, {
|
|
1594
|
+
onChange: (B) => C(B, R),
|
|
1595
|
+
key: R,
|
|
1596
|
+
type: I[unref(m).format.type]
|
|
1597
1597
|
}), createSlots({
|
|
1598
1598
|
default: withCtx(() => [
|
|
1599
|
-
createTextVNode(" " + toDisplayString(
|
|
1599
|
+
createTextVNode(" " + toDisplayString(I[unref(m).format.label]), 1)
|
|
1600
1600
|
]),
|
|
1601
1601
|
_: 2
|
|
1602
1602
|
}, [
|
|
1603
|
-
renderList(
|
|
1604
|
-
name:
|
|
1605
|
-
fn: withCtx((
|
|
1606
|
-
renderSlot(
|
|
1603
|
+
renderList(_.$slots, (B, V, f) => ({
|
|
1604
|
+
name: V,
|
|
1605
|
+
fn: withCtx((p) => [
|
|
1606
|
+
renderSlot(_.$slots, V, normalizeProps(guardReactiveProps(p)), void 0, !0)
|
|
1607
1607
|
])
|
|
1608
1608
|
}))
|
|
1609
1609
|
]), 1040, ["checked", "onChange", "type"]))), 128));
|
|
@@ -1660,110 +1660,110 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1660
1660
|
},
|
|
1661
1661
|
emits: ["dictChange"],
|
|
1662
1662
|
setup(e, { expose: r, emit: d }) {
|
|
1663
|
-
const t = e, { disabled: n, data: a, format: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun:
|
|
1664
|
-
const
|
|
1665
|
-
return Object.entries(w).forEach(([
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1668
|
-
const F = ToCamelCase(
|
|
1669
|
-
|
|
1663
|
+
const t = e, { disabled: n, data: a, format: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: v } = toRefs(t), w = useAttrs(), g = computed(() => {
|
|
1664
|
+
const f = {};
|
|
1665
|
+
return Object.entries(w).forEach(([p, D]) => {
|
|
1666
|
+
const O = ToKebabCase(p);
|
|
1667
|
+
if (!O.startsWith("checkbox-button-") && !O.startsWith("on-checkbox-button-")) {
|
|
1668
|
+
const F = ToCamelCase(O);
|
|
1669
|
+
f[F] = D;
|
|
1670
1670
|
}
|
|
1671
|
-
}),
|
|
1671
|
+
}), f;
|
|
1672
1672
|
}), m = computed(() => {
|
|
1673
|
-
const
|
|
1674
|
-
return Object.entries(w).forEach(([
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1677
|
-
const F = ToCamelCase(
|
|
1678
|
-
|
|
1673
|
+
const f = {};
|
|
1674
|
+
return Object.entries(w).forEach(([p, D]) => {
|
|
1675
|
+
const O = ToKebabCase(p);
|
|
1676
|
+
if (O.startsWith("checkbox-button-") || O.startsWith("on-checkbox-button-")) {
|
|
1677
|
+
const F = ToCamelCase(O.replace("checkbox-button-", ""));
|
|
1678
|
+
f[F] = D;
|
|
1679
1679
|
}
|
|
1680
|
-
}),
|
|
1681
|
-
}),
|
|
1680
|
+
}), f;
|
|
1681
|
+
}), k = ref(""), C = toRaw(store.state.dictConfig), l = d, b = (f) => {
|
|
1682
1682
|
if (!s.value) {
|
|
1683
|
-
l("dictChange",
|
|
1683
|
+
l("dictChange", f);
|
|
1684
1684
|
return;
|
|
1685
1685
|
}
|
|
1686
|
-
const
|
|
1687
|
-
l("dictChange",
|
|
1688
|
-
},
|
|
1686
|
+
const p = T.list.filter((D) => f.includes(D[C.format.value]));
|
|
1687
|
+
l("dictChange", p);
|
|
1688
|
+
}, T = reactive({
|
|
1689
1689
|
list: []
|
|
1690
1690
|
}), E = async () => {
|
|
1691
1691
|
if (!o.value || a.value && a.value.length > 0)
|
|
1692
1692
|
return;
|
|
1693
|
-
let
|
|
1693
|
+
let f = [];
|
|
1694
1694
|
if (typeof o.value == "object") {
|
|
1695
|
-
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
const { filters:
|
|
1699
|
-
F ?
|
|
1695
|
+
k.value = o.value.type;
|
|
1696
|
+
const p = await store.actions.getDictDataObj(k.value);
|
|
1697
|
+
f = [].concat(p[k.value]);
|
|
1698
|
+
const { filters: D, filterType: O = C.format.value, reverse: F = !1 } = o.value, L = typeof D == "string" ? D.split(",") : D;
|
|
1699
|
+
F ? f = f.filter((P) => !L.includes(P[O])) : f = f.filter((P) => L.includes(P[O]));
|
|
1700
1700
|
} else {
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1701
|
+
k.value = o.value;
|
|
1702
|
+
const p = await store.actions.getDictDataObj(k.value);
|
|
1703
|
+
f = [].concat(p[k.value]);
|
|
1704
1704
|
}
|
|
1705
|
-
if (c.value && (
|
|
1706
|
-
|
|
1707
|
-
...
|
|
1708
|
-
[
|
|
1705
|
+
if (c.value && (f = c.value(f)), v.value)
|
|
1706
|
+
f = f.map((p) => ({
|
|
1707
|
+
...p,
|
|
1708
|
+
[C.format.disabled]: v.value(p)
|
|
1709
1709
|
}));
|
|
1710
1710
|
else if (i.value) {
|
|
1711
|
-
const { disabledValues:
|
|
1712
|
-
|
|
1713
|
-
const
|
|
1714
|
-
return
|
|
1715
|
-
}) :
|
|
1716
|
-
const
|
|
1717
|
-
return
|
|
1711
|
+
const { disabledValues: p, disabledType: D = C.format.value, reverse: O = !1 } = i.value, F = typeof p == "string" ? p.split(",") : p;
|
|
1712
|
+
O ? f = f.map((L) => {
|
|
1713
|
+
const P = JSON.parse(JSON.stringify(L));
|
|
1714
|
+
return P[C.format.disabled] = !F.includes(P[D]) || P[C.format.disabled], P;
|
|
1715
|
+
}) : f = f.map((L) => {
|
|
1716
|
+
const P = JSON.parse(JSON.stringify(L));
|
|
1717
|
+
return P[C.format.disabled] = F.includes(P[D]) || P[C.format.disabled], P;
|
|
1718
1718
|
});
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1721
|
-
},
|
|
1720
|
+
T.list = f;
|
|
1721
|
+
}, y = computed(() => store.state.isGettingDictTypes.includes(k.value)), x = computed(() => store.state.isGettingAllDictTypes), G = computed(() => a.value), A = inject(formItemContextKey), _ = inject(formContextKey), S = computed(() => n.value || w["checkbox-button-disabled"] === "" || w["checkbox-button-disabled"] || w.checkboxButtonDisabled === "" || w.checkboxButtonDisabled || w.CheckboxButtonDisabled === "" || w.CheckboxButtonDisabled || (A == null ? void 0 : A.disabled) || (_ == null ? void 0 : _.disabled) || !1);
|
|
1722
1722
|
watch(
|
|
1723
|
-
[
|
|
1724
|
-
([
|
|
1725
|
-
!
|
|
1726
|
-
[
|
|
1727
|
-
[
|
|
1728
|
-
[
|
|
1723
|
+
[y, x, G],
|
|
1724
|
+
([f, p, D]) => {
|
|
1725
|
+
!f && !p && D && D.length === 0 && E(), D.length > 0 && (T.list = JSON.parse(JSON.stringify(D)), T.list.length > 0 && (Object.prototype.toString.call(T.list[0]) === "[object Object]" ? T.list = T.list.map((F) => ({
|
|
1726
|
+
[C.format.value]: F[u.value.value],
|
|
1727
|
+
[C.format.label]: F[u.value.label],
|
|
1728
|
+
[C.format.disabled]: !!F[u.value.disabled],
|
|
1729
1729
|
...F
|
|
1730
|
-
})) :
|
|
1731
|
-
[
|
|
1732
|
-
[
|
|
1730
|
+
})) : T.list = T.list.map((F) => ({
|
|
1731
|
+
[C.format.value]: F,
|
|
1732
|
+
[C.format.label]: F
|
|
1733
1733
|
}))));
|
|
1734
1734
|
},
|
|
1735
1735
|
{
|
|
1736
1736
|
immediate: !0
|
|
1737
1737
|
}
|
|
1738
1738
|
);
|
|
1739
|
-
const
|
|
1740
|
-
return r({ getElCheckboxGroupRef:
|
|
1739
|
+
const I = ref(null), R = () => I.value, B = ref([]);
|
|
1740
|
+
return r({ getElCheckboxGroupRef: R, getElCheckboxButtonRefs: () => B.value }), (f, p) => (openBlock(), createBlock(unref(ElCheckboxGroup), mergeProps({
|
|
1741
1741
|
ref_key: "ElCheckboxGroupRef",
|
|
1742
|
-
ref:
|
|
1742
|
+
ref: I,
|
|
1743
1743
|
disabled: S.value
|
|
1744
|
-
},
|
|
1744
|
+
}, g.value, { onChange: b }), createSlots({
|
|
1745
1745
|
default: withCtx(() => [
|
|
1746
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1746
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (D, O) => (openBlock(), createBlock(unref(ElCheckboxButton), mergeProps({
|
|
1747
1747
|
ref_for: !0,
|
|
1748
1748
|
ref: (F) => {
|
|
1749
|
-
F && (
|
|
1749
|
+
F && (B.value[O] = F);
|
|
1750
1750
|
},
|
|
1751
|
-
key:
|
|
1752
|
-
disabled: S.value ||
|
|
1753
|
-
label:
|
|
1751
|
+
key: D[unref(C).format.value],
|
|
1752
|
+
disabled: S.value || D[unref(C).format.disabled],
|
|
1753
|
+
label: D[unref(C).format.value]
|
|
1754
1754
|
}, m.value), {
|
|
1755
1755
|
default: withCtx(() => [
|
|
1756
|
-
createTextVNode(toDisplayString(
|
|
1756
|
+
createTextVNode(toDisplayString(D[unref(C).format.label]), 1)
|
|
1757
1757
|
]),
|
|
1758
1758
|
_: 2
|
|
1759
1759
|
}, 1040, ["disabled", "label"]))), 128))
|
|
1760
1760
|
]),
|
|
1761
1761
|
_: 2
|
|
1762
1762
|
}, [
|
|
1763
|
-
renderList(
|
|
1764
|
-
name:
|
|
1765
|
-
fn: withCtx((
|
|
1766
|
-
renderSlot(
|
|
1763
|
+
renderList(f.$slots, (D, O, F) => ({
|
|
1764
|
+
name: O,
|
|
1765
|
+
fn: withCtx((L) => [
|
|
1766
|
+
renderSlot(f.$slots, O, mergeProps({ key: F }, L))
|
|
1767
1767
|
])
|
|
1768
1768
|
}))
|
|
1769
1769
|
]), 1040, ["disabled"]));
|
|
@@ -1826,80 +1826,80 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1826
1826
|
},
|
|
1827
1827
|
emits: ["dictChange", "update:modelValue", "change"],
|
|
1828
1828
|
setup(e, { expose: r, emit: d }) {
|
|
1829
|
-
const t = e, { disabled: n, modelValue: a, addAllText: u, data: o, format: i, dictType: s, disabledObj: c, keyValue:
|
|
1830
|
-
const
|
|
1831
|
-
return Object.entries(m).forEach(([
|
|
1832
|
-
const
|
|
1833
|
-
if (!
|
|
1834
|
-
const W = ToCamelCase(
|
|
1835
|
-
|
|
1829
|
+
const t = e, { disabled: n, modelValue: a, addAllText: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: g } = toRefs(t), m = useAttrs(), k = ref(!1), C = ref(!1), l = ref([]), b = computed(() => {
|
|
1830
|
+
const $ = {};
|
|
1831
|
+
return Object.entries(m).forEach(([M, j]) => {
|
|
1832
|
+
const J = ToKebabCase(M);
|
|
1833
|
+
if (!J.startsWith("checkbox-") && !J.startsWith("on-checkbox-")) {
|
|
1834
|
+
const W = ToCamelCase(J);
|
|
1835
|
+
$[W] = j;
|
|
1836
1836
|
}
|
|
1837
|
-
}),
|
|
1838
|
-
}),
|
|
1839
|
-
const
|
|
1840
|
-
return Object.entries(m).forEach(([
|
|
1841
|
-
const
|
|
1842
|
-
if (
|
|
1843
|
-
const W = ToCamelCase(
|
|
1844
|
-
|
|
1837
|
+
}), $;
|
|
1838
|
+
}), T = computed(() => {
|
|
1839
|
+
const $ = {};
|
|
1840
|
+
return Object.entries(m).forEach(([M, j]) => {
|
|
1841
|
+
const J = ToKebabCase(M);
|
|
1842
|
+
if (J.startsWith("checkbox-") || J.startsWith("on-checkbox-")) {
|
|
1843
|
+
const W = ToCamelCase(J.replace("checkbox-", ""));
|
|
1844
|
+
$[W] = j;
|
|
1845
1845
|
}
|
|
1846
|
-
}),
|
|
1847
|
-
}), E = ref(""),
|
|
1848
|
-
const
|
|
1849
|
-
|
|
1850
|
-
},
|
|
1851
|
-
if (A(
|
|
1852
|
-
x("dictChange",
|
|
1846
|
+
}), $;
|
|
1847
|
+
}), E = ref(""), y = toRaw(store.state.dictConfig), x = d, G = computed(() => S.list.filter(($) => !$[y.format.disabled])), A = ($) => {
|
|
1848
|
+
const M = $.length, j = G.value.length;
|
|
1849
|
+
C.value = M === j, k.value = M > 0 && M < j;
|
|
1850
|
+
}, _ = ($) => {
|
|
1851
|
+
if (A($), !v.value) {
|
|
1852
|
+
x("dictChange", $);
|
|
1853
1853
|
return;
|
|
1854
1854
|
}
|
|
1855
|
-
const
|
|
1856
|
-
x("dictChange",
|
|
1855
|
+
const M = S.list.filter((j) => $.includes(j[y.format.value]));
|
|
1856
|
+
x("dictChange", M);
|
|
1857
1857
|
}, S = reactive({
|
|
1858
1858
|
list: []
|
|
1859
1859
|
});
|
|
1860
1860
|
watch(
|
|
1861
|
-
() =>
|
|
1861
|
+
() => G.value,
|
|
1862
1862
|
() => {
|
|
1863
1863
|
A(a.value);
|
|
1864
1864
|
}
|
|
1865
1865
|
);
|
|
1866
|
-
const
|
|
1866
|
+
const I = async () => {
|
|
1867
1867
|
if (!s.value || o.value && o.value.length > 0)
|
|
1868
1868
|
return;
|
|
1869
|
-
let
|
|
1869
|
+
let $ = [];
|
|
1870
1870
|
if (typeof s.value == "object") {
|
|
1871
1871
|
E.value = s.value.type;
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1874
|
-
const { filters:
|
|
1875
|
-
W ?
|
|
1872
|
+
const M = await store.actions.getDictDataObj(E.value);
|
|
1873
|
+
$ = [].concat(M[E.value]);
|
|
1874
|
+
const { filters: j, filterType: J = y.format.value, reverse: W = !1 } = s.value, K = typeof j == "string" ? j.split(",") : j;
|
|
1875
|
+
W ? $ = $.filter((N) => !K.includes(N[J])) : $ = $.filter((N) => K.includes(N[J]));
|
|
1876
1876
|
} else {
|
|
1877
1877
|
E.value = s.value;
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1878
|
+
const M = await store.actions.getDictDataObj(E.value);
|
|
1879
|
+
$ = [].concat(M[E.value]);
|
|
1880
1880
|
}
|
|
1881
|
-
if (w.value && (
|
|
1882
|
-
|
|
1883
|
-
...
|
|
1884
|
-
[
|
|
1881
|
+
if (w.value && ($ = w.value($)), g.value)
|
|
1882
|
+
$ = $.map((M) => ({
|
|
1883
|
+
...M,
|
|
1884
|
+
[y.format.disabled]: g.value(M)
|
|
1885
1885
|
}));
|
|
1886
1886
|
else if (c.value) {
|
|
1887
|
-
const { disabledValues:
|
|
1888
|
-
|
|
1889
|
-
const N = JSON.parse(JSON.stringify(
|
|
1890
|
-
return N[
|
|
1891
|
-
}) :
|
|
1892
|
-
const N = JSON.parse(JSON.stringify(
|
|
1893
|
-
return N[
|
|
1887
|
+
const { disabledValues: M, disabledType: j = y.format.value, reverse: J = !1 } = c.value, W = typeof M == "string" ? M.split(",") : M;
|
|
1888
|
+
J ? $ = $.map((K) => {
|
|
1889
|
+
const N = JSON.parse(JSON.stringify(K));
|
|
1890
|
+
return N[y.format.disabled] = !W.includes(N[j]) || N[y.format.disabled], N;
|
|
1891
|
+
}) : $ = $.map((K) => {
|
|
1892
|
+
const N = JSON.parse(JSON.stringify(K));
|
|
1893
|
+
return N[y.format.disabled] = W.includes(N[j]) || N[y.format.disabled], N;
|
|
1894
1894
|
});
|
|
1895
1895
|
}
|
|
1896
|
-
S.list =
|
|
1897
|
-
},
|
|
1896
|
+
S.list = $;
|
|
1897
|
+
}, R = computed(() => store.state.isGettingDictTypes.includes(E.value)), B = computed(() => store.state.isGettingAllDictTypes), V = computed(() => o.value), f = inject(formItemContextKey), p = inject(formContextKey), D = computed(() => n.value || m["checkbox-disabled"] === "" || m["checkbox-disabled"] || m.checkboxDisabled === "" || m.checkboxDisabled || m.CheckboxDisabled === "" || m.CheckboxDisabled || (f == null ? void 0 : f.disabled) || (p == null ? void 0 : p.disabled) || !1);
|
|
1898
1898
|
watch(
|
|
1899
1899
|
() => t.modelValue,
|
|
1900
1900
|
// 正确监听方式
|
|
1901
|
-
(
|
|
1902
|
-
l.value =
|
|
1901
|
+
($) => {
|
|
1902
|
+
l.value = $;
|
|
1903
1903
|
},
|
|
1904
1904
|
{
|
|
1905
1905
|
deep: !0,
|
|
@@ -1908,42 +1908,42 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1908
1908
|
// 数组/对象必须加 deep!
|
|
1909
1909
|
), watch(
|
|
1910
1910
|
() => l.value,
|
|
1911
|
-
(
|
|
1912
|
-
x("update:modelValue",
|
|
1911
|
+
($) => {
|
|
1912
|
+
x("update:modelValue", $), x("change", $);
|
|
1913
1913
|
}
|
|
1914
1914
|
), watch(
|
|
1915
|
-
[
|
|
1916
|
-
([
|
|
1917
|
-
|
|
1918
|
-
[
|
|
1919
|
-
[
|
|
1920
|
-
[
|
|
1915
|
+
[R, B, V],
|
|
1916
|
+
([$, M, j]) => {
|
|
1917
|
+
!$ && !M && j && j.length === 0 && I(), j.length > 0 && (S.list = JSON.parse(JSON.stringify(j)), S.list.length > 0 && (Object.prototype.toString.call(S.list[0]) === "[object Object]" ? S.list = S.list.map((W) => ({
|
|
1918
|
+
[y.format.value]: W[i.value.value],
|
|
1919
|
+
[y.format.label]: W[i.value.label],
|
|
1920
|
+
[y.format.disabled]: !!W[i.value.disabled],
|
|
1921
1921
|
...W
|
|
1922
1922
|
})) : S.list = S.list.map((W) => ({
|
|
1923
|
-
[
|
|
1924
|
-
[
|
|
1923
|
+
[y.format.value]: W,
|
|
1924
|
+
[y.format.label]: W
|
|
1925
1925
|
}))));
|
|
1926
1926
|
},
|
|
1927
1927
|
{
|
|
1928
1928
|
immediate: !0
|
|
1929
1929
|
}
|
|
1930
1930
|
);
|
|
1931
|
-
const
|
|
1932
|
-
if (
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1931
|
+
const O = ($) => {
|
|
1932
|
+
if (k.value = !1, $) {
|
|
1933
|
+
const M = G.value.map((j) => j[y.format.value]);
|
|
1934
|
+
_(M);
|
|
1935
1935
|
} else
|
|
1936
|
-
|
|
1937
|
-
}, F = ref(null),
|
|
1938
|
-
return r({ getElCheckboxGroupRef:
|
|
1939
|
-
unref(u) && !
|
|
1936
|
+
_([]);
|
|
1937
|
+
}, F = ref(null), L = () => F.value, P = ref([]);
|
|
1938
|
+
return r({ getElCheckboxGroupRef: L, getElCheckboxRefs: () => P.value }), ($, M) => (openBlock(), createElementBlock(Fragment, null, [
|
|
1939
|
+
unref(u) && !D.value ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
1940
1940
|
key: 0,
|
|
1941
1941
|
class: "check-all",
|
|
1942
|
-
disabled:
|
|
1943
|
-
indeterminate:
|
|
1944
|
-
modelValue:
|
|
1945
|
-
"onUpdate:modelValue":
|
|
1946
|
-
onChange:
|
|
1942
|
+
disabled: D.value,
|
|
1943
|
+
indeterminate: k.value,
|
|
1944
|
+
modelValue: C.value,
|
|
1945
|
+
"onUpdate:modelValue": M[0] || (M[0] = (j) => C.value = j),
|
|
1946
|
+
onChange: O
|
|
1947
1947
|
}, {
|
|
1948
1948
|
default: withCtx(() => [
|
|
1949
1949
|
createTextVNode(toDisplayString(unref(u)), 1)
|
|
@@ -1953,32 +1953,32 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1953
1953
|
createVNode(unref(ElCheckboxGroup), mergeProps({
|
|
1954
1954
|
ref_key: "ElCheckboxGroupRef",
|
|
1955
1955
|
ref: F,
|
|
1956
|
-
disabled:
|
|
1956
|
+
disabled: D.value,
|
|
1957
1957
|
modelValue: l.value,
|
|
1958
|
-
"onUpdate:modelValue":
|
|
1959
|
-
},
|
|
1958
|
+
"onUpdate:modelValue": M[1] || (M[1] = (j) => l.value = j)
|
|
1959
|
+
}, b.value, { onChange: _ }), createSlots({
|
|
1960
1960
|
default: withCtx(() => [
|
|
1961
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(S.list, (
|
|
1961
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(S.list, (j, J) => (openBlock(), createBlock(unref(ElCheckbox), mergeProps({
|
|
1962
1962
|
ref_for: !0,
|
|
1963
1963
|
ref: (W) => {
|
|
1964
|
-
W && (
|
|
1964
|
+
W && (P.value[J] = W);
|
|
1965
1965
|
},
|
|
1966
|
-
key:
|
|
1967
|
-
label:
|
|
1968
|
-
disabled:
|
|
1969
|
-
},
|
|
1966
|
+
key: j[unref(y).format.value],
|
|
1967
|
+
label: j[unref(y).format.value],
|
|
1968
|
+
disabled: D.value || j[unref(y).format.disabled]
|
|
1969
|
+
}, T.value), {
|
|
1970
1970
|
default: withCtx(() => [
|
|
1971
|
-
createTextVNode(toDisplayString(
|
|
1971
|
+
createTextVNode(toDisplayString(j[unref(y).format.label]), 1)
|
|
1972
1972
|
]),
|
|
1973
1973
|
_: 2
|
|
1974
1974
|
}, 1040, ["label", "disabled"]))), 128))
|
|
1975
1975
|
]),
|
|
1976
1976
|
_: 2
|
|
1977
1977
|
}, [
|
|
1978
|
-
renderList(
|
|
1979
|
-
name:
|
|
1980
|
-
fn: withCtx((
|
|
1981
|
-
renderSlot(
|
|
1978
|
+
renderList($.$slots, (j, J, W) => ({
|
|
1979
|
+
name: J,
|
|
1980
|
+
fn: withCtx((K) => [
|
|
1981
|
+
renderSlot($.$slots, J, normalizeProps(guardReactiveProps(K)), void 0, !0)
|
|
1982
1982
|
])
|
|
1983
1983
|
}))
|
|
1984
1984
|
]), 1040, ["disabled", "modelValue"])
|
|
@@ -2090,8 +2090,8 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2090
2090
|
let s = [];
|
|
2091
2091
|
if (!i || !i[r])
|
|
2092
2092
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
2093
|
-
const c = store.state.timeout || 3e4,
|
|
2094
|
-
if (Date.now() -
|
|
2093
|
+
const c = store.state.timeout || 3e4, v = Date.now(), w = window.setInterval(() => {
|
|
2094
|
+
if (Date.now() - v > c) {
|
|
2095
2095
|
clearInterval(w), a("getTreeLabelByCode获取字典数据超时");
|
|
2096
2096
|
return;
|
|
2097
2097
|
}
|
|
@@ -2100,8 +2100,8 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2100
2100
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2101
2101
|
return;
|
|
2102
2102
|
}
|
|
2103
|
-
const
|
|
2104
|
-
n(
|
|
2103
|
+
const g = s.find((m) => m[o.valueField] === e);
|
|
2104
|
+
n(g ? t.formatFun(GetTreeItemByCode(g[o.idField], s, o), o) : t.defaultVal);
|
|
2105
2105
|
}
|
|
2106
2106
|
}, 1e3);
|
|
2107
2107
|
} else
|
|
@@ -2110,12 +2110,12 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2110
2110
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2111
2111
|
return;
|
|
2112
2112
|
}
|
|
2113
|
-
const
|
|
2114
|
-
n(
|
|
2113
|
+
const v = s.find((w) => w[o.valueField] === e);
|
|
2114
|
+
n(v ? t.formatFun(GetTreeItemByCode(v[o.idField], s, o), o) : t.defaultVal);
|
|
2115
2115
|
});
|
|
2116
2116
|
else {
|
|
2117
2117
|
s = i[r];
|
|
2118
|
-
const c = s.find((
|
|
2118
|
+
const c = s.find((v) => v[o.valueField] === e);
|
|
2119
2119
|
n(c ? t.formatFun(GetTreeItemByCode(c[o.idField], s, o), o) : t.defaultVal);
|
|
2120
2120
|
}
|
|
2121
2121
|
});
|
|
@@ -2144,13 +2144,13 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2144
2144
|
let c = [];
|
|
2145
2145
|
if (!s || !s[r])
|
|
2146
2146
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
2147
|
-
const
|
|
2148
|
-
if (Date.now() - w >
|
|
2149
|
-
clearInterval(
|
|
2147
|
+
const v = store.state.timeout || 3e4, w = Date.now(), g = window.setInterval(() => {
|
|
2148
|
+
if (Date.now() - w > v) {
|
|
2149
|
+
clearInterval(g), a("getTreeLabelByCodes获取字典数据超时");
|
|
2150
2150
|
return;
|
|
2151
2151
|
}
|
|
2152
2152
|
if (!(store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes)) {
|
|
2153
|
-
if (clearInterval(
|
|
2153
|
+
if (clearInterval(g), c = store.state.dictCodes[r], !c) {
|
|
2154
2154
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2155
2155
|
return;
|
|
2156
2156
|
}
|
|
@@ -2159,8 +2159,8 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
}, 1e3);
|
|
2161
2161
|
} else
|
|
2162
|
-
store.actions.getDictDataObj(r).then((
|
|
2163
|
-
if (c =
|
|
2162
|
+
store.actions.getDictDataObj(r).then((v) => {
|
|
2163
|
+
if (c = v[r], !c) {
|
|
2164
2164
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2165
2165
|
return;
|
|
2166
2166
|
}
|
|
@@ -2169,8 +2169,8 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2169
2169
|
});
|
|
2170
2170
|
else {
|
|
2171
2171
|
c = s[r];
|
|
2172
|
-
const
|
|
2173
|
-
n(
|
|
2172
|
+
const v = GetTreeLabelByCodesDothings(u, c, t.defaultVal, t.formatFunIn, i, t.emptyText);
|
|
2173
|
+
n(v && v.length > 0 ? t.formatFunOut(v) : t.defaultVal);
|
|
2174
2174
|
}
|
|
2175
2175
|
});
|
|
2176
2176
|
}, GetTreeCodeByLabel = (e, r, d) => {
|
|
@@ -2184,8 +2184,8 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2184
2184
|
let s = [];
|
|
2185
2185
|
if (!i || !i[r])
|
|
2186
2186
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
2187
|
-
const c = store.state.timeout || 3e4,
|
|
2188
|
-
if (Date.now() -
|
|
2187
|
+
const c = store.state.timeout || 3e4, v = Date.now(), w = window.setInterval(() => {
|
|
2188
|
+
if (Date.now() - v > c) {
|
|
2189
2189
|
clearInterval(w), a("getTreeCodeByLabel获取字典数据超时");
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
@@ -2194,8 +2194,8 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2194
2194
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2195
2195
|
return;
|
|
2196
2196
|
}
|
|
2197
|
-
const
|
|
2198
|
-
n(
|
|
2197
|
+
const g = s.find((m) => m[o.labelField] === e);
|
|
2198
|
+
n(g ? t.formatFun(GetTreeItemByLabel(g[o.labelField], s, o), o) : t.defaultVal);
|
|
2199
2199
|
}
|
|
2200
2200
|
}, 1e3);
|
|
2201
2201
|
} else
|
|
@@ -2204,12 +2204,12 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2204
2204
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
2207
|
-
const
|
|
2208
|
-
n(
|
|
2207
|
+
const v = s.find((w) => w[o.labelField] === e);
|
|
2208
|
+
n(v ? t.formatFun(GetTreeItemByLabel(v[o.labelField], s, o), o) : t.defaultVal);
|
|
2209
2209
|
});
|
|
2210
2210
|
else {
|
|
2211
2211
|
s = i[r];
|
|
2212
|
-
const c = s.find((
|
|
2212
|
+
const c = s.find((v) => v[o.labelField] === e);
|
|
2213
2213
|
n(c ? t.formatFun(GetTreeItemByLabel(c[o.labelField], s, o), o) : t.defaultVal);
|
|
2214
2214
|
}
|
|
2215
2215
|
});
|
|
@@ -2237,13 +2237,13 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2237
2237
|
let c = [];
|
|
2238
2238
|
if (!s || !s[r])
|
|
2239
2239
|
if (store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes) {
|
|
2240
|
-
const
|
|
2241
|
-
if (Date.now() - w >
|
|
2242
|
-
clearInterval(
|
|
2240
|
+
const v = store.state.timeout || 3e4, w = Date.now(), g = window.setInterval(() => {
|
|
2241
|
+
if (Date.now() - w > v) {
|
|
2242
|
+
clearInterval(g), a("getTreeCodeByLabels获取字典数据超时");
|
|
2243
2243
|
return;
|
|
2244
2244
|
}
|
|
2245
2245
|
if (!(store.state.isGettingDictTypes.includes(r) || store.state.isGettingAllDictTypes)) {
|
|
2246
|
-
if (clearInterval(
|
|
2246
|
+
if (clearInterval(g), c = store.state.dictCodes[r], !c) {
|
|
2247
2247
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2248
2248
|
return;
|
|
2249
2249
|
}
|
|
@@ -2252,8 +2252,8 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2252
2252
|
}
|
|
2253
2253
|
}, 1e3);
|
|
2254
2254
|
} else
|
|
2255
|
-
store.actions.getDictDataObj(r).then((
|
|
2256
|
-
if (c =
|
|
2255
|
+
store.actions.getDictDataObj(r).then((v) => {
|
|
2256
|
+
if (c = v[r], !c) {
|
|
2257
2257
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2258
2258
|
return;
|
|
2259
2259
|
}
|
|
@@ -2262,8 +2262,8 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2262
2262
|
});
|
|
2263
2263
|
else {
|
|
2264
2264
|
c = s[r];
|
|
2265
|
-
const
|
|
2266
|
-
n(
|
|
2265
|
+
const v = GetTreeCodeByLabelsDothings(u, c, t.defaultVal, t.formatFunIn, i);
|
|
2266
|
+
n(v && v.length > 0 ? t.formatFunOut(v) : t.defaultVal);
|
|
2267
2267
|
}
|
|
2268
2268
|
});
|
|
2269
2269
|
}, GetTreeLabelByCodeFilter = (e, r, d) => {
|
|
@@ -2305,7 +2305,7 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2305
2305
|
const t = {
|
|
2306
2306
|
defaultVal: null,
|
|
2307
2307
|
emptyText: "--",
|
|
2308
|
-
formatFunIn: (s, c) => s.map((
|
|
2308
|
+
formatFunIn: (s, c) => s.map((v) => v[c.labelField]).join("/"),
|
|
2309
2309
|
treeSetting: {},
|
|
2310
2310
|
formatFunOut: (s) => s.join(","),
|
|
2311
2311
|
spacer: ","
|
|
@@ -2379,7 +2379,7 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2379
2379
|
}, GetTreeCodeByLabelsFilter = (e, r, d) => {
|
|
2380
2380
|
const t = {
|
|
2381
2381
|
defaultVal: null,
|
|
2382
|
-
formatFunIn: (s, c) => s.map((
|
|
2382
|
+
formatFunIn: (s, c) => s.map((v) => v[c.valueField]).join("/"),
|
|
2383
2383
|
treeSetting: {},
|
|
2384
2384
|
formatFunOut: (s) => s.join(","),
|
|
2385
2385
|
spacer: ","
|
|
@@ -2706,35 +2706,35 @@ const Mask = (e, r) => {
|
|
|
2706
2706
|
}
|
|
2707
2707
|
},
|
|
2708
2708
|
setup(e, { expose: r }) {
|
|
2709
|
-
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal:
|
|
2710
|
-
let l = ref(null),
|
|
2709
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), g = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[g.format.type] ? l.value[g.format.type] : "primary"), k = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[g.format.color] ? l.value[g.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[g.format.disabled] ? l.value[g.format.disabled] : !!c.value);
|
|
2710
|
+
let l = ref(null), b = ref(null);
|
|
2711
2711
|
watchEffect(() => {
|
|
2712
2712
|
if (!n.value) {
|
|
2713
|
-
|
|
2713
|
+
b.value = t.value;
|
|
2714
2714
|
return;
|
|
2715
2715
|
}
|
|
2716
|
-
GetItemByCode(t.value, n.value).then((
|
|
2717
|
-
|
|
2716
|
+
GetItemByCode(t.value, n.value).then((y) => {
|
|
2717
|
+
y ? (l.value = y, b.value = y[g.format.label]) : (l.value = null, b.value = String(v.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
2718
2718
|
});
|
|
2719
2719
|
});
|
|
2720
|
-
const
|
|
2721
|
-
return r({ getElTagRef: () =>
|
|
2720
|
+
const T = ref(null);
|
|
2721
|
+
return r({ getElTagRef: () => T.value }), (y, x) => (openBlock(), createBlock(unref(ElTag), mergeProps({
|
|
2722
2722
|
class: "el-tag-dict",
|
|
2723
2723
|
ref_key: "ElTagRef",
|
|
2724
|
-
ref:
|
|
2724
|
+
ref: T,
|
|
2725
2725
|
type: m.value,
|
|
2726
|
-
color:
|
|
2727
|
-
disabled:
|
|
2728
|
-
},
|
|
2726
|
+
color: k.value,
|
|
2727
|
+
disabled: C.value
|
|
2728
|
+
}, y.$attrs), createSlots({
|
|
2729
2729
|
default: withCtx(() => [
|
|
2730
|
-
createTextVNode(toDisplayString(unref(
|
|
2730
|
+
createTextVNode(toDisplayString(unref(b)), 1)
|
|
2731
2731
|
]),
|
|
2732
2732
|
_: 2
|
|
2733
2733
|
}, [
|
|
2734
|
-
renderList(
|
|
2734
|
+
renderList(y.$slots, (G, A, _) => ({
|
|
2735
2735
|
name: A,
|
|
2736
2736
|
fn: withCtx((S) => [
|
|
2737
|
-
renderSlot(
|
|
2737
|
+
renderSlot(y.$slots, A, mergeProps({ key: _ }, S))
|
|
2738
2738
|
])
|
|
2739
2739
|
}))
|
|
2740
2740
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2789,37 +2789,37 @@ const Mask = (e, r) => {
|
|
|
2789
2789
|
},
|
|
2790
2790
|
emits: ["submit", "reset", "action"],
|
|
2791
2791
|
setup(e, { expose: r, emit: d }) {
|
|
2792
|
-
const t = e, { actionType: n, modelValue: a, dictType: u, judgeTypeFun: o, type: i, judgeColorFun: s, color: c, judgeDisabledFun:
|
|
2793
|
-
let E = ref(null),
|
|
2792
|
+
const t = e, { actionType: n, modelValue: a, dictType: u, judgeTypeFun: o, type: i, judgeColorFun: s, color: c, judgeDisabledFun: v, disabled: w, defaultVal: g, emptyText: m } = toRefs(t), k = d, C = toRaw(store.state.dictConfig), l = computed(() => o.value ? o.value(a.value) : i.value ? i.value : E.value && E.value[C.format.type] ? E.value[C.format.type] : "primary"), b = computed(() => s.value ? s.value(a.value) : c.value ? c.value : E.value && E.value[C.format.color] ? E.value[C.format.color] : ""), T = computed(() => v.value ? v.value(a.value) : E.value && E.value[C.format.disabled] ? E.value[C.format.disabled] : !!w.value);
|
|
2793
|
+
let E = ref(null), y = ref(null);
|
|
2794
2794
|
watchEffect(() => {
|
|
2795
2795
|
if (!u.value) {
|
|
2796
|
-
|
|
2796
|
+
y.value = a.value;
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
|
-
GetItemByCode(a.value, u.value).then((
|
|
2800
|
-
|
|
2799
|
+
GetItemByCode(a.value, u.value).then((_) => {
|
|
2800
|
+
_ ? (E.value = _, y.value = _[C.format.label]) : (E.value = null, y.value = String(g.value ?? (a.value === 0 ? 0 : a.value || m.value)));
|
|
2801
2801
|
});
|
|
2802
2802
|
});
|
|
2803
2803
|
const x = () => {
|
|
2804
|
-
|
|
2805
|
-
},
|
|
2806
|
-
return r({ getElLinkRef: () =>
|
|
2804
|
+
T.value || k(n.value, attrs);
|
|
2805
|
+
}, G = ref(null);
|
|
2806
|
+
return r({ getElLinkRef: () => G.value }), (_, S) => (openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
2807
2807
|
class: "el-link-dict",
|
|
2808
2808
|
ref_key: "ElLinkRef",
|
|
2809
|
-
ref:
|
|
2809
|
+
ref: G,
|
|
2810
2810
|
type: l.value,
|
|
2811
|
-
color:
|
|
2812
|
-
disabled:
|
|
2813
|
-
},
|
|
2811
|
+
color: b.value,
|
|
2812
|
+
disabled: T.value
|
|
2813
|
+
}, _.$attrs, { onClick: x }), createSlots({
|
|
2814
2814
|
default: withCtx(() => [
|
|
2815
|
-
createTextVNode(toDisplayString(unref(
|
|
2815
|
+
createTextVNode(toDisplayString(unref(y)), 1)
|
|
2816
2816
|
]),
|
|
2817
2817
|
_: 2
|
|
2818
2818
|
}, [
|
|
2819
|
-
renderList(
|
|
2820
|
-
name:
|
|
2821
|
-
fn: withCtx((
|
|
2822
|
-
renderSlot(
|
|
2819
|
+
renderList(_.$slots, (I, R, B) => ({
|
|
2820
|
+
name: R,
|
|
2821
|
+
fn: withCtx((V) => [
|
|
2822
|
+
renderSlot(_.$slots, R, mergeProps({ key: B }, V))
|
|
2823
2823
|
])
|
|
2824
2824
|
}))
|
|
2825
2825
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2869,35 +2869,35 @@ const Mask = (e, r) => {
|
|
|
2869
2869
|
}
|
|
2870
2870
|
},
|
|
2871
2871
|
setup(e, { expose: r }) {
|
|
2872
|
-
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal:
|
|
2873
|
-
let l = ref(null),
|
|
2872
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), g = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[g.format.type] ? l.value[g.format.type] : "primary"), k = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[g.format.color] ? l.value[g.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[g.format.disabled] ? l.value[g.format.disabled] : !!c.value);
|
|
2873
|
+
let l = ref(null), b = ref(null);
|
|
2874
2874
|
watchEffect(() => {
|
|
2875
2875
|
if (!n.value) {
|
|
2876
|
-
|
|
2876
|
+
b.value = t.value;
|
|
2877
2877
|
return;
|
|
2878
2878
|
}
|
|
2879
|
-
GetItemByCode(t.value, n.value).then((
|
|
2880
|
-
|
|
2879
|
+
GetItemByCode(t.value, n.value).then((y) => {
|
|
2880
|
+
y ? (l.value = y, b.value = y[g.format.label]) : (l.value = null, b.value = String(v.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
2881
2881
|
});
|
|
2882
2882
|
});
|
|
2883
|
-
const
|
|
2884
|
-
return r({ getElTextRef: () =>
|
|
2883
|
+
const T = ref(null);
|
|
2884
|
+
return r({ getElTextRef: () => T.value }), (y, x) => (openBlock(), createBlock(unref(ElText), mergeProps({
|
|
2885
2885
|
class: "el-text-dict",
|
|
2886
2886
|
ref_key: "ElTextRef",
|
|
2887
|
-
ref:
|
|
2887
|
+
ref: T,
|
|
2888
2888
|
type: m.value,
|
|
2889
|
-
color:
|
|
2890
|
-
disabled:
|
|
2891
|
-
},
|
|
2889
|
+
color: k.value,
|
|
2890
|
+
disabled: C.value
|
|
2891
|
+
}, y.$attrs), createSlots({
|
|
2892
2892
|
default: withCtx(() => [
|
|
2893
|
-
createTextVNode(toDisplayString(unref(
|
|
2893
|
+
createTextVNode(toDisplayString(unref(b)), 1)
|
|
2894
2894
|
]),
|
|
2895
2895
|
_: 2
|
|
2896
2896
|
}, [
|
|
2897
|
-
renderList(
|
|
2897
|
+
renderList(y.$slots, (G, A, _) => ({
|
|
2898
2898
|
name: A,
|
|
2899
2899
|
fn: withCtx((S) => [
|
|
2900
|
-
renderSlot(
|
|
2900
|
+
renderSlot(y.$slots, A, mergeProps({ key: _ }, S))
|
|
2901
2901
|
])
|
|
2902
2902
|
}))
|
|
2903
2903
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2919,20 +2919,20 @@ const Mask = (e, r) => {
|
|
|
2919
2919
|
ref("");
|
|
2920
2920
|
const a = computed(() => {
|
|
2921
2921
|
const l = {};
|
|
2922
|
-
return Object.entries(n).forEach(([
|
|
2923
|
-
const E = ToKebabCase(
|
|
2922
|
+
return Object.entries(n).forEach(([b, T]) => {
|
|
2923
|
+
const E = ToKebabCase(b);
|
|
2924
2924
|
if (!E.startsWith("descriptions-item-") && !E.startsWith("on-descriptions-item-")) {
|
|
2925
|
-
const
|
|
2926
|
-
l[
|
|
2925
|
+
const y = ToCamelCase(E);
|
|
2926
|
+
l[y] = T;
|
|
2927
2927
|
}
|
|
2928
2928
|
}), l;
|
|
2929
2929
|
}), u = computed(() => {
|
|
2930
2930
|
const l = {};
|
|
2931
|
-
return Object.entries(n).forEach(([
|
|
2932
|
-
const E = ToKebabCase(
|
|
2931
|
+
return Object.entries(n).forEach(([b, T]) => {
|
|
2932
|
+
const E = ToKebabCase(b);
|
|
2933
2933
|
if (E.startsWith("descriptions-item-") || E.startsWith("on-descriptions-item")) {
|
|
2934
|
-
const
|
|
2935
|
-
l[
|
|
2934
|
+
const y = ToCamelCase(E.replace("descriptions-item-", ""));
|
|
2935
|
+
l[y] = T;
|
|
2936
2936
|
}
|
|
2937
2937
|
}), l;
|
|
2938
2938
|
});
|
|
@@ -2943,12 +2943,12 @@ const Mask = (e, r) => {
|
|
|
2943
2943
|
};
|
|
2944
2944
|
}
|
|
2945
2945
|
const i = (l) => {
|
|
2946
|
-
const
|
|
2947
|
-
return l.defaultVal !== void 0 && l.defaultVal !== null && (
|
|
2946
|
+
const b = {};
|
|
2947
|
+
return l.defaultVal !== void 0 && l.defaultVal !== null && (b.defaultVal = l.defaultVal), l.emptyText !== void 0 && l.emptyText !== null && (b.emptyText = l.emptyText), l.formatFun !== void 0 && l.formatFun !== null && (b.formatFun = l.formatFun), l.spacer !== void 0 && l.spacer !== null && (b.spacer = l.spacer), Object.assign(b, l.dictOptions || {});
|
|
2948
2948
|
}, s = (l) => {
|
|
2949
|
-
const
|
|
2950
|
-
return l.defaultVal !== void 0 && l.defaultVal !== null && (
|
|
2951
|
-
}, c = (l) => !!l.maskType || !!l.maskStart || !!l.maskMiddle || !!l.maskEnd,
|
|
2949
|
+
const b = {};
|
|
2950
|
+
return l.defaultVal !== void 0 && l.defaultVal !== null && (b.defaultVal = l.defaultVal), l.emptyText !== void 0 && l.emptyText !== null && (b.emptyText = l.emptyText), l.formatFunIn !== void 0 && l.formatFunIn !== null && (b.formatFunIn = l.formatFunIn), l.formatFunOut !== void 0 && l.formatFunOut !== null && (b.formatFunOut = l.formatFunOut), l.treeSetting !== void 0 && l.treeSetting !== null && (b.treeSetting = l.treeSetting), l.spacer !== void 0 && l.spacer !== null && (b.spacer = l.spacer), Object.assign(b, l.dictOptions || {});
|
|
2951
|
+
}, c = (l) => !!l.maskType || !!l.maskStart || !!l.maskMiddle || !!l.maskEnd, v = (l) => {
|
|
2952
2952
|
if (l.maskType) {
|
|
2953
2953
|
if (Array.isArray(l.maskType))
|
|
2954
2954
|
return {
|
|
@@ -2959,14 +2959,14 @@ const Mask = (e, r) => {
|
|
|
2959
2959
|
defaultVal: l.defaultVal
|
|
2960
2960
|
};
|
|
2961
2961
|
if (typeof l.maskType == "object") {
|
|
2962
|
-
const
|
|
2962
|
+
const b = {
|
|
2963
2963
|
start: l.maskStart || 0,
|
|
2964
2964
|
middle: l.maskMiddle || 0,
|
|
2965
2965
|
end: l.maskEnd || 0,
|
|
2966
2966
|
symbol: l.maskSymbol || "*",
|
|
2967
2967
|
defaultVal: l.defaultVal
|
|
2968
2968
|
};
|
|
2969
|
-
return Object.assign(
|
|
2969
|
+
return Object.assign(b, l.maskType);
|
|
2970
2970
|
} else
|
|
2971
2971
|
return l.maskType;
|
|
2972
2972
|
} else
|
|
@@ -2977,59 +2977,59 @@ const Mask = (e, r) => {
|
|
|
2977
2977
|
symbol: l.maskSymbol || "*",
|
|
2978
2978
|
defaultVal: l.defaultVal
|
|
2979
2979
|
};
|
|
2980
|
-
}, w = (l,
|
|
2981
|
-
return r({ getElDescriptionsRef: () =>
|
|
2980
|
+
}, w = (l, b = {}) => Array.isArray(l) ? l : typeof l == "string" ? l.split(b.spacer || ",") : typeof l == "number" ? [l] : [], g = ref(null), m = ref([]);
|
|
2981
|
+
return r({ getElDescriptionsRef: () => g.value, getElDescriptionsItemRefs: () => m.value }), (l, b) => (openBlock(), createBlock(unref(ElDescriptions), mergeProps({
|
|
2982
2982
|
ref_key: "ElDescriptionsRef",
|
|
2983
|
-
ref:
|
|
2983
|
+
ref: g
|
|
2984
2984
|
}, a.value), createSlots({
|
|
2985
2985
|
default: withCtx(() => [
|
|
2986
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (
|
|
2986
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (T, E) => (openBlock(), createBlock(unref(ElDescriptionsItem), mergeProps({
|
|
2987
2987
|
ref_for: !0,
|
|
2988
|
-
ref: (
|
|
2989
|
-
|
|
2988
|
+
ref: (y) => {
|
|
2989
|
+
y && (m.value[E] = y);
|
|
2990
2990
|
},
|
|
2991
2991
|
key: E
|
|
2992
|
-
}, o(
|
|
2992
|
+
}, o(T)), createSlots({
|
|
2993
2993
|
default: withCtx(() => [
|
|
2994
|
-
|
|
2995
|
-
|
|
2994
|
+
T.dictType ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2995
|
+
T.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(w(T.modelValue, i(T)), (y, x) => (openBlock(), createBlock(_sfc_main$n, {
|
|
2996
2996
|
key: x,
|
|
2997
|
-
modelValue:
|
|
2998
|
-
dictType:
|
|
2999
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) :
|
|
2997
|
+
modelValue: y || "",
|
|
2998
|
+
dictType: T.dictType
|
|
2999
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(w(T.modelValue, i(T)), (y, x) => (openBlock(), createBlock(_sfc_main$e, {
|
|
3000
3000
|
key: x,
|
|
3001
|
-
modelValue:
|
|
3002
|
-
dictType:
|
|
3003
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) :
|
|
3001
|
+
modelValue: y || "",
|
|
3002
|
+
dictType: T.dictType
|
|
3003
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(w(T.modelValue, i(T)), (y, x) => (openBlock(), createBlock(_sfc_main$f, {
|
|
3004
3004
|
key: x,
|
|
3005
|
-
modelValue:
|
|
3006
|
-
dictType:
|
|
3007
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) :
|
|
3005
|
+
modelValue: y || "",
|
|
3006
|
+
dictType: T.dictType
|
|
3007
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(w(T.modelValue, i(T)), (y, x) => (openBlock(), createBlock(_sfc_main$d, {
|
|
3008
3008
|
key: x,
|
|
3009
|
-
modelValue:
|
|
3010
|
-
dictType:
|
|
3009
|
+
modelValue: y || "",
|
|
3010
|
+
dictType: T.dictType
|
|
3011
3011
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3012
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(
|
|
3012
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(T.modelValue, T.dictType, i(T))), 1)
|
|
3013
3013
|
], 64))
|
|
3014
|
-
], 64)) :
|
|
3015
|
-
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
3016
|
-
], 64)) :
|
|
3017
|
-
createTextVNode(toDisplayString(unref(FormatDate)(
|
|
3018
|
-
], 64)) : c(
|
|
3019
|
-
createTextVNode(toDisplayString(unref(Desensitization)(
|
|
3014
|
+
], 64)) : T.dictTreeType ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3015
|
+
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(T.modelValue, T.dictTreeType, s(T))), 1)
|
|
3016
|
+
], 64)) : T.dateFormat && T.modelValue ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
3017
|
+
createTextVNode(toDisplayString(unref(FormatDate)(T.modelValue, T.dateFormat, T.defaultVal)), 1)
|
|
3018
|
+
], 64)) : c(T) && T.modelValue ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
3019
|
+
createTextVNode(toDisplayString(unref(Desensitization)(T.modelValue, v(T))), 1)
|
|
3020
3020
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3021
|
-
createTextVNode(toDisplayString(
|
|
3021
|
+
createTextVNode(toDisplayString(T.modelValue !== void 0 && T.modelValue !== null ? T.modelValue : T.defaultVal), 1)
|
|
3022
3022
|
], 64))
|
|
3023
3023
|
]),
|
|
3024
3024
|
_: 2
|
|
3025
3025
|
}, [
|
|
3026
|
-
renderList(
|
|
3027
|
-
name:
|
|
3028
|
-
fn: withCtx((
|
|
3026
|
+
renderList(T.slotList, (y, x) => ({
|
|
3027
|
+
name: y.slotName,
|
|
3028
|
+
fn: withCtx((G) => [
|
|
3029
3029
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3030
3030
|
key: x,
|
|
3031
|
-
render:
|
|
3032
|
-
scope:
|
|
3031
|
+
render: y.render,
|
|
3032
|
+
scope: G
|
|
3033
3033
|
}, null, 8, ["render", "scope"]))
|
|
3034
3034
|
])
|
|
3035
3035
|
}))
|
|
@@ -3037,10 +3037,10 @@ const Mask = (e, r) => {
|
|
|
3037
3037
|
]),
|
|
3038
3038
|
_: 2
|
|
3039
3039
|
}, [
|
|
3040
|
-
renderList(l.$slots, (
|
|
3040
|
+
renderList(l.$slots, (T, E, y) => ({
|
|
3041
3041
|
name: E,
|
|
3042
3042
|
fn: withCtx((x) => [
|
|
3043
|
-
renderSlot(l.$slots, E, mergeProps({ key:
|
|
3043
|
+
renderSlot(l.$slots, E, mergeProps({ key: y }, x), void 0, !0)
|
|
3044
3044
|
])
|
|
3045
3045
|
}))
|
|
3046
3046
|
]), 1040));
|
|
@@ -3080,34 +3080,34 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3080
3080
|
},
|
|
3081
3081
|
emits: ["pass", "fail", "update:modelValue", "action"],
|
|
3082
3082
|
setup(e, { expose: r, emit: d }) {
|
|
3083
|
-
const t = useAttrs(), n = toRaw(store.state.dictConfig), a = ref(null), u = e, { modelValue: o, rules: i, idField: s, componentList: c } = toRefs(u),
|
|
3084
|
-
var
|
|
3083
|
+
const t = useAttrs(), n = toRaw(store.state.dictConfig), a = ref(null), u = e, { modelValue: o, rules: i, idField: s, componentList: c } = toRefs(u), v = d, w = computed(() => {
|
|
3084
|
+
var p;
|
|
3085
3085
|
if (typeof t.colon == "boolean")
|
|
3086
3086
|
return t.colon;
|
|
3087
3087
|
if (typeof t.colon == "string" && t.colon === "")
|
|
3088
3088
|
return !0;
|
|
3089
|
-
const
|
|
3090
|
-
return typeof
|
|
3091
|
-
}),
|
|
3092
|
-
let
|
|
3093
|
-
const
|
|
3094
|
-
var
|
|
3095
|
-
if ((
|
|
3089
|
+
const f = (p = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : p.isShowLabelColon;
|
|
3090
|
+
return typeof f == "boolean" ? f : !1;
|
|
3091
|
+
}), g = ref([]), m = ref({});
|
|
3092
|
+
let k = JSON.parse(JSON.stringify(m));
|
|
3093
|
+
const C = (f) => {
|
|
3094
|
+
var D, O, F, L, P;
|
|
3095
|
+
if ((D = n.dynamicComponentsConfig) != null && D.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (O = n.dynamicComponentsConfig) != null && O.readonlyNoPlaceholder && (f != null && f.readonly || (typeof t.readonly == "string" && t.readonly === "" || t.readonly) && (f == null ? void 0 : f.readonly) !== !1))
|
|
3096
3096
|
return "";
|
|
3097
|
-
let
|
|
3098
|
-
return
|
|
3099
|
-
}, l = ref(!1),
|
|
3100
|
-
var
|
|
3101
|
-
|
|
3102
|
-
let
|
|
3103
|
-
for (let
|
|
3104
|
-
const N = c.value[
|
|
3097
|
+
let p = "请选择";
|
|
3098
|
+
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (p = "请输入"), (F = n.dynamicComponentsConfig) != null && F.isShowLabelPlaceholder && (p = p + ((L = f.formItemProps) == null ? void 0 : L.label)), ((P = f.props) == null ? void 0 : P.placeholder) || p || "";
|
|
3099
|
+
}, l = ref(!1), b = ref(""), T = () => {
|
|
3100
|
+
var D, O, F, L, P, z, $, M, j, J, W;
|
|
3101
|
+
b.value = "id" + GenerateUUID();
|
|
3102
|
+
let f = [];
|
|
3103
|
+
for (let K = 0; K < c.value.length; K++) {
|
|
3104
|
+
const N = c.value[K];
|
|
3105
3105
|
let q = null;
|
|
3106
3106
|
if (N != null && N.isFormData && (N != null && N.fieldName) ? q = {
|
|
3107
3107
|
...N,
|
|
3108
3108
|
id: N != null && N[s.value] ? N[s.value] : GenerateUUID(),
|
|
3109
|
-
showRuleType: (N == null ? void 0 : N.showRuleType) || ((
|
|
3110
|
-
validatorRuleType: (N == null ? void 0 : N.validatorRuleType) || ((
|
|
3109
|
+
showRuleType: (N == null ? void 0 : N.showRuleType) || ((D = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : D.showRuleType) || "compare",
|
|
3110
|
+
validatorRuleType: (N == null ? void 0 : N.validatorRuleType) || ((O = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : O.validatorRuleType) || "compare",
|
|
3111
3111
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3112
3112
|
visible: N.showRules && N.showRules.length > 0 || N.hidden ? !1 : (N == null ? void 0 : N.visible) ?? !0,
|
|
3113
3113
|
//
|
|
@@ -3115,15 +3115,15 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3115
3115
|
props: N.props ? {
|
|
3116
3116
|
...(F = n.dynamicComponentsConfig) == null ? void 0 : F.props,
|
|
3117
3117
|
...N.props,
|
|
3118
|
-
placeholder:
|
|
3118
|
+
placeholder: C(N)
|
|
3119
3119
|
} : {
|
|
3120
|
-
...(
|
|
3121
|
-
placeholder:
|
|
3120
|
+
...(L = n.dynamicComponentsConfig) == null ? void 0 : L.props,
|
|
3121
|
+
placeholder: C(N)
|
|
3122
3122
|
},
|
|
3123
3123
|
formItemProps: N.formItemProps ? {
|
|
3124
3124
|
...N.formItemProps,
|
|
3125
3125
|
id: N != null && N[s.value] ? N[s.value] : GenerateUUID(),
|
|
3126
|
-
class: (
|
|
3126
|
+
class: (P = N.props) != null && P.class ? N.props.class + " " + ((N == null ? void 0 : N.fieldName) || "") : (N == null ? void 0 : N.fieldName) || ""
|
|
3127
3127
|
} : {
|
|
3128
3128
|
id: N != null && N[s.value] ? N[s.value] : GenerateUUID(),
|
|
3129
3129
|
class: (N == null ? void 0 : N.fieldName) || ""
|
|
@@ -3131,8 +3131,8 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3131
3131
|
} : q = {
|
|
3132
3132
|
...N,
|
|
3133
3133
|
id: N != null && N[s.value] ? N[s.value] : GenerateUUID(),
|
|
3134
|
-
showRuleType: (N == null ? void 0 : N.showRuleType) || ((
|
|
3135
|
-
validatorRuleType: (N == null ? void 0 : N.validatorRuleType) || ((
|
|
3134
|
+
showRuleType: (N == null ? void 0 : N.showRuleType) || ((z = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : z.showRuleType) || "compare",
|
|
3135
|
+
validatorRuleType: (N == null ? void 0 : N.validatorRuleType) || (($ = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : $.validatorRuleType) || "compare",
|
|
3136
3136
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3137
3137
|
visible: N.showRules && N.showRules.length > 0 || N.hidden ? !1 : (N == null ? void 0 : N.visible) ?? !0,
|
|
3138
3138
|
// 默认为true(显示)
|
|
@@ -3140,8 +3140,8 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3140
3140
|
props: N.props ? {
|
|
3141
3141
|
...N.props
|
|
3142
3142
|
} : {}
|
|
3143
|
-
}, (
|
|
3144
|
-
const Y = ((
|
|
3143
|
+
}, (M = N.formItemProps) != null && M.rules || (j = i.value) != null && j[N.fieldName]) {
|
|
3144
|
+
const Y = ((J = N.formItemProps) == null ? void 0 : J.rules) || ((W = i.value) == null ? void 0 : W[N.fieldName]) || [];
|
|
3145
3145
|
N.fieldName && (q.formItemProps.prop = q.formItemProps.prop || N.fieldName), q.formItemProps.required = Y.some((ne) => ne.required) || q.formItemProps.required || !1;
|
|
3146
3146
|
const re = [...Y];
|
|
3147
3147
|
q.formItemProps.rules = re.map((ne) => {
|
|
@@ -3172,141 +3172,141 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3172
3172
|
return U;
|
|
3173
3173
|
});
|
|
3174
3174
|
}
|
|
3175
|
-
|
|
3175
|
+
f.push(q);
|
|
3176
3176
|
}
|
|
3177
|
-
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3177
|
+
g.value = f;
|
|
3178
|
+
const p = {};
|
|
3179
|
+
g.value.forEach((K) => {
|
|
3180
3180
|
var N, q;
|
|
3181
|
-
if (
|
|
3182
|
-
const Y = (N = o.value) == null ? void 0 : N[
|
|
3183
|
-
|
|
3181
|
+
if (K.isFormData && K.fieldName) {
|
|
3182
|
+
const Y = (N = o.value) == null ? void 0 : N[K.fieldName];
|
|
3183
|
+
p[K.fieldName] = ((q = K == null ? void 0 : K.props) == null ? void 0 : q.modelValue) !== void 0 ? K.props.modelValue : Y !== void 0 ? Y : null;
|
|
3184
3184
|
}
|
|
3185
|
-
}), m.value = JSON.parse(JSON.stringify(
|
|
3186
|
-
}, E = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError),
|
|
3187
|
-
const
|
|
3185
|
+
}), m.value = JSON.parse(JSON.stringify(p));
|
|
3186
|
+
}, E = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError), y = async (f) => {
|
|
3187
|
+
const p = JSON.parse(JSON.stringify(m.value)), D = sortComponentsByIdDependencies(g.value), O = [], F = (j) => typeof j == "string" ? j.split(",").filter(Boolean) : Array.isArray(j) ? j : [], L = async () => {
|
|
3188
3188
|
if (a.value)
|
|
3189
3189
|
return;
|
|
3190
|
-
const
|
|
3190
|
+
const j = 1e3, J = 50;
|
|
3191
3191
|
let W = 0;
|
|
3192
|
-
return new Promise((
|
|
3192
|
+
return new Promise((K) => {
|
|
3193
3193
|
const N = () => {
|
|
3194
|
-
a.value || W >=
|
|
3194
|
+
a.value || W >= j ? K() : (W += J, setTimeout(N, J));
|
|
3195
3195
|
};
|
|
3196
3196
|
N();
|
|
3197
3197
|
});
|
|
3198
|
-
},
|
|
3199
|
-
if (await
|
|
3198
|
+
}, P = async (j) => {
|
|
3199
|
+
if (await L(), !a.value)
|
|
3200
3200
|
return !1;
|
|
3201
3201
|
try {
|
|
3202
|
-
return await (a == null ? void 0 : a.value.validateField(
|
|
3202
|
+
return await (a == null ? void 0 : a.value.validateField(j));
|
|
3203
3203
|
} catch {
|
|
3204
3204
|
return !1;
|
|
3205
3205
|
}
|
|
3206
|
-
},
|
|
3207
|
-
var
|
|
3208
|
-
await
|
|
3209
|
-
for (let W = 0; W <
|
|
3210
|
-
const
|
|
3206
|
+
}, z = async (j) => {
|
|
3207
|
+
var J;
|
|
3208
|
+
await L();
|
|
3209
|
+
for (let W = 0; W < j.length; W++) {
|
|
3210
|
+
const K = j[W], N = g.value.find((q) => {
|
|
3211
3211
|
var Y;
|
|
3212
|
-
return ((Y = q == null ? void 0 : q.formItemProps) == null ? void 0 : Y.prop) ===
|
|
3212
|
+
return ((Y = q == null ? void 0 : q.formItemProps) == null ? void 0 : Y.prop) === K;
|
|
3213
3213
|
});
|
|
3214
|
-
m.value[N.fieldName] || (
|
|
3214
|
+
m.value[N.fieldName] || (J = a.value) == null || J.clearValidate(K);
|
|
3215
3215
|
}
|
|
3216
|
-
},
|
|
3216
|
+
}, $ = {
|
|
3217
3217
|
// 处理"calculate"类型
|
|
3218
|
-
calculate: (
|
|
3218
|
+
calculate: (j) => j.showRules.some((J) => CheckConditionsByOperation(J, p)),
|
|
3219
3219
|
// 处理"compare"类型
|
|
3220
|
-
compare: (
|
|
3220
|
+
compare: (j) => j.showRules.some((J) => CheckConditions(J, p)),
|
|
3221
3221
|
// 处理"validate"类型
|
|
3222
|
-
validate: async (
|
|
3223
|
-
const
|
|
3224
|
-
if (await J
|
|
3222
|
+
validate: async (j) => {
|
|
3223
|
+
const J = F(j.showRules);
|
|
3224
|
+
if (await P(J))
|
|
3225
3225
|
return !0;
|
|
3226
3226
|
{
|
|
3227
|
-
const
|
|
3228
|
-
return await
|
|
3227
|
+
const K = J.filter((N) => N !== f);
|
|
3228
|
+
return await z(K), !1;
|
|
3229
3229
|
}
|
|
3230
3230
|
},
|
|
3231
3231
|
// 处理嵌套类型(showRuleType为逻辑运算符,如"&&"、"||")
|
|
3232
|
-
default: async (
|
|
3233
|
-
const
|
|
3234
|
-
for (const W of
|
|
3232
|
+
default: async (j) => {
|
|
3233
|
+
const J = [];
|
|
3234
|
+
for (const W of j.showRules)
|
|
3235
3235
|
switch (W.type) {
|
|
3236
3236
|
case "calculate":
|
|
3237
|
-
|
|
3237
|
+
J.push(W.rules.some((K) => CheckConditionsByOperation(K, p)));
|
|
3238
3238
|
break;
|
|
3239
3239
|
case "compare":
|
|
3240
|
-
|
|
3240
|
+
J.push(W.rules.some((K) => CheckConditions(K, p)));
|
|
3241
3241
|
break;
|
|
3242
3242
|
case "validate": {
|
|
3243
|
-
const
|
|
3243
|
+
const K = F(W.rules), N = await P(K);
|
|
3244
3244
|
if (!N) {
|
|
3245
|
-
const q =
|
|
3246
|
-
await
|
|
3245
|
+
const q = K.filter((Y) => Y !== f);
|
|
3246
|
+
await z(q);
|
|
3247
3247
|
}
|
|
3248
|
-
|
|
3248
|
+
J.push(N);
|
|
3249
3249
|
break;
|
|
3250
3250
|
}
|
|
3251
3251
|
default:
|
|
3252
|
-
|
|
3252
|
+
J.push(!1);
|
|
3253
3253
|
}
|
|
3254
|
-
return CalculateLogicalResult(
|
|
3254
|
+
return CalculateLogicalResult(J, j.showRuleType);
|
|
3255
3255
|
}
|
|
3256
3256
|
};
|
|
3257
|
-
for (const
|
|
3258
|
-
if (
|
|
3257
|
+
for (const j of D) {
|
|
3258
|
+
if (j.hidden)
|
|
3259
3259
|
continue;
|
|
3260
|
-
const
|
|
3261
|
-
let W =
|
|
3262
|
-
|
|
3260
|
+
const J = j.visible;
|
|
3261
|
+
let W = J;
|
|
3262
|
+
j.showRules && j.showRules.length > 0 && (W = await ($[j.showRuleType] || $.default)(j)), j.visible = W, j.fieldName && !J && W && O.push(j.fieldName), !W && j.fieldName && (p[j.fieldName] = Array.isArray(p[j.fieldName]) ? [] : "");
|
|
3263
3263
|
}
|
|
3264
|
-
const
|
|
3264
|
+
const M = O.filter((j) => {
|
|
3265
3265
|
var q, Y;
|
|
3266
|
-
const
|
|
3267
|
-
if (!(((Y = (q =
|
|
3266
|
+
const J = D.find((re) => re.fieldName === j);
|
|
3267
|
+
if (!(((Y = (q = J == null ? void 0 : J.formItemProps) == null ? void 0 : q.rules) == null ? void 0 : Y.length) > 0))
|
|
3268
3268
|
return !1;
|
|
3269
|
-
const
|
|
3270
|
-
return typeof
|
|
3269
|
+
const K = m.value[j];
|
|
3270
|
+
return typeof K == "string" ? !!K.trim() : typeof K == "object" && K !== null && Object.keys(K).length > 0;
|
|
3271
3271
|
});
|
|
3272
|
-
if (
|
|
3273
|
-
await
|
|
3274
|
-
const
|
|
3275
|
-
l.value = !0,
|
|
3276
|
-
var
|
|
3277
|
-
(
|
|
3272
|
+
if (M.length > 0) {
|
|
3273
|
+
await L();
|
|
3274
|
+
const j = x();
|
|
3275
|
+
l.value = !0, v("update:modelValue", j), setTimeout(() => {
|
|
3276
|
+
var J;
|
|
3277
|
+
(J = a.value) == null || J.validateField(M);
|
|
3278
3278
|
}, 0);
|
|
3279
3279
|
}
|
|
3280
3280
|
}, x = () => {
|
|
3281
|
-
const
|
|
3282
|
-
for (let
|
|
3283
|
-
const
|
|
3284
|
-
!
|
|
3281
|
+
const f = JSON.parse(JSON.stringify(m.value));
|
|
3282
|
+
for (let p = 0; p < g.value.length; p++) {
|
|
3283
|
+
const D = g.value[p];
|
|
3284
|
+
!D.visible && !D.hidden && delete f[D.fieldName];
|
|
3285
3285
|
}
|
|
3286
|
-
return
|
|
3287
|
-
},
|
|
3288
|
-
const
|
|
3289
|
-
if (typeof
|
|
3290
|
-
return
|
|
3291
|
-
key:
|
|
3292
|
-
oldVal:
|
|
3293
|
-
newVal:
|
|
3294
|
-
}),
|
|
3295
|
-
const F = /* @__PURE__ */ new Set([...Object.keys(
|
|
3296
|
-
for (const
|
|
3297
|
-
const
|
|
3298
|
-
typeof
|
|
3299
|
-
key:
|
|
3300
|
-
oldVal:
|
|
3301
|
-
newVal:
|
|
3286
|
+
return f;
|
|
3287
|
+
}, G = (f, p, D = "") => {
|
|
3288
|
+
const O = [];
|
|
3289
|
+
if (typeof f != "object" || f === null || p === null)
|
|
3290
|
+
return f !== p && O.push({
|
|
3291
|
+
key: D,
|
|
3292
|
+
oldVal: p,
|
|
3293
|
+
newVal: f
|
|
3294
|
+
}), O;
|
|
3295
|
+
const F = /* @__PURE__ */ new Set([...Object.keys(f), ...Object.keys(p)]);
|
|
3296
|
+
for (const L of F) {
|
|
3297
|
+
const P = D ? `${D}.${L}` : L, z = f[L], $ = p[L];
|
|
3298
|
+
typeof z == "object" && z !== null && !Array.isArray(z) ? O.push(...G(z, $, P)) : z !== $ && O.push({
|
|
3299
|
+
key: P,
|
|
3300
|
+
oldVal: $,
|
|
3301
|
+
newVal: z
|
|
3302
3302
|
});
|
|
3303
3303
|
}
|
|
3304
|
-
return
|
|
3304
|
+
return O;
|
|
3305
3305
|
};
|
|
3306
3306
|
watch(
|
|
3307
3307
|
c,
|
|
3308
3308
|
() => {
|
|
3309
|
-
|
|
3309
|
+
T();
|
|
3310
3310
|
},
|
|
3311
3311
|
{
|
|
3312
3312
|
deep: !0,
|
|
@@ -3317,21 +3317,21 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3317
3317
|
let A = !0;
|
|
3318
3318
|
watch(
|
|
3319
3319
|
m,
|
|
3320
|
-
(
|
|
3321
|
-
var
|
|
3322
|
-
const
|
|
3320
|
+
(f) => {
|
|
3321
|
+
var O;
|
|
3322
|
+
const p = JSON.parse(JSON.stringify(f));
|
|
3323
3323
|
if (A)
|
|
3324
|
-
|
|
3324
|
+
y();
|
|
3325
3325
|
else {
|
|
3326
|
-
const
|
|
3327
|
-
if (JSON.stringify(
|
|
3326
|
+
const L = (O = G(p, k).find((P) => {
|
|
3327
|
+
if (JSON.stringify(P.newVal) !== JSON.stringify(P.oldVal))
|
|
3328
3328
|
return !0;
|
|
3329
|
-
})) == null ? void 0 :
|
|
3330
|
-
|
|
3329
|
+
})) == null ? void 0 : O.key;
|
|
3330
|
+
y(L);
|
|
3331
3331
|
}
|
|
3332
|
-
|
|
3333
|
-
const
|
|
3334
|
-
l.value = !0,
|
|
3332
|
+
k = p;
|
|
3333
|
+
const D = x();
|
|
3334
|
+
l.value = !0, v("update:modelValue", D), A = !1;
|
|
3335
3335
|
},
|
|
3336
3336
|
{
|
|
3337
3337
|
deep: !0,
|
|
@@ -3344,64 +3344,64 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3344
3344
|
l.value = !1;
|
|
3345
3345
|
return;
|
|
3346
3346
|
}
|
|
3347
|
-
|
|
3347
|
+
T();
|
|
3348
3348
|
},
|
|
3349
3349
|
{ deep: !0 }
|
|
3350
3350
|
);
|
|
3351
|
-
const
|
|
3352
|
-
const
|
|
3353
|
-
|
|
3354
|
-
if (
|
|
3355
|
-
|
|
3356
|
-
else if (
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3351
|
+
const _ = async (f, p) => {
|
|
3352
|
+
const D = x();
|
|
3353
|
+
f && f.validate((O, F) => {
|
|
3354
|
+
if (O)
|
|
3355
|
+
v("pass", D, p);
|
|
3356
|
+
else if (v("fail", F, D, p), E.value) {
|
|
3357
|
+
const L = Object.keys(F)[0];
|
|
3358
|
+
f.scrollToField(L);
|
|
3359
3359
|
}
|
|
3360
3360
|
});
|
|
3361
3361
|
}, S = async () => {
|
|
3362
|
-
|
|
3362
|
+
T(), await nextTick(), a.value && setTimeout(() => {
|
|
3363
3363
|
a.value.resetFields();
|
|
3364
3364
|
}, 30);
|
|
3365
|
-
},
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3368
|
-
},
|
|
3369
|
-
return r({ getFormData: x, resetFormData:
|
|
3370
|
-
const
|
|
3371
|
-
return openBlock(), createBlock(
|
|
3365
|
+
}, I = (f) => {
|
|
3366
|
+
const p = x();
|
|
3367
|
+
v("action", f, p);
|
|
3368
|
+
}, R = ref({});
|
|
3369
|
+
return r({ getFormData: x, resetFormData: T, getComponentRef: (f) => f ? R.value[f] : R.value, getDynamicComponentsRef: () => a.value }), (f, p) => {
|
|
3370
|
+
const D = resolveComponent("el-form-item"), O = resolveComponent("el-form");
|
|
3371
|
+
return openBlock(), createBlock(O, mergeProps({
|
|
3372
3372
|
model: m.value,
|
|
3373
|
-
class: ["dict-dynamic-components container-class",
|
|
3373
|
+
class: ["dict-dynamic-components container-class", b.value],
|
|
3374
3374
|
ref_key: "DynamicComponentsRef",
|
|
3375
3375
|
ref: a
|
|
3376
|
-
},
|
|
3376
|
+
}, f.$attrs, { colon: w.value }), {
|
|
3377
3377
|
default: withCtx(() => [
|
|
3378
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
3379
|
-
var
|
|
3378
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (F, L) => {
|
|
3379
|
+
var P;
|
|
3380
3380
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3381
3381
|
F.visible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3382
|
-
F.isFormData ? (openBlock(), createBlock(
|
|
3382
|
+
F.isFormData ? (openBlock(), createBlock(D, mergeProps({ key: 0 }, F.formItemProps, { class: "comp-item form" }), {
|
|
3383
3383
|
default: withCtx(() => {
|
|
3384
|
-
var
|
|
3384
|
+
var z;
|
|
3385
3385
|
return [
|
|
3386
3386
|
(openBlock(), createBlock(resolveDynamicComponent(F.compName), mergeProps({
|
|
3387
3387
|
ref_for: !0,
|
|
3388
|
-
ref: (
|
|
3389
|
-
|
|
3388
|
+
ref: ($) => {
|
|
3389
|
+
$ && F.fieldName && (R.value[F.fieldName] = $);
|
|
3390
3390
|
},
|
|
3391
|
-
key:
|
|
3391
|
+
key: L
|
|
3392
3392
|
}, F.props, {
|
|
3393
3393
|
modelValue: m.value[F.fieldName],
|
|
3394
|
-
"onUpdate:modelValue": (
|
|
3395
|
-
m.value[F.fieldName] =
|
|
3394
|
+
"onUpdate:modelValue": ($) => {
|
|
3395
|
+
m.value[F.fieldName] = $;
|
|
3396
3396
|
}
|
|
3397
3397
|
}), createSlots({ _: 2 }, [
|
|
3398
|
-
renderList((
|
|
3399
|
-
name:
|
|
3400
|
-
fn: withCtx((
|
|
3398
|
+
renderList((z = F == null ? void 0 : F.props) == null ? void 0 : z.slotList, ($, M) => ({
|
|
3399
|
+
name: $.slotName,
|
|
3400
|
+
fn: withCtx((j) => [
|
|
3401
3401
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3402
|
-
key:
|
|
3403
|
-
render:
|
|
3404
|
-
scope:
|
|
3402
|
+
key: M,
|
|
3403
|
+
render: $.render,
|
|
3404
|
+
scope: j,
|
|
3405
3405
|
formData: m.value
|
|
3406
3406
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3407
3407
|
])
|
|
@@ -3412,19 +3412,19 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3412
3412
|
_: 2
|
|
3413
3413
|
}, 1040)) : (openBlock(), createBlock(resolveDynamicComponent(F.compName), mergeProps({
|
|
3414
3414
|
class: "comp-item",
|
|
3415
|
-
key:
|
|
3415
|
+
key: L
|
|
3416
3416
|
}, F.props, {
|
|
3417
|
-
onSubmit: (
|
|
3417
|
+
onSubmit: (z) => _(a.value, F),
|
|
3418
3418
|
onReset: S,
|
|
3419
|
-
onAction: (
|
|
3419
|
+
onAction: (z) => I(F)
|
|
3420
3420
|
}), createSlots({ _: 2 }, [
|
|
3421
|
-
renderList((
|
|
3422
|
-
name:
|
|
3423
|
-
fn: withCtx((
|
|
3421
|
+
renderList((P = F == null ? void 0 : F.props) == null ? void 0 : P.slotList, (z, $) => ({
|
|
3422
|
+
name: z.slotName,
|
|
3423
|
+
fn: withCtx((M) => [
|
|
3424
3424
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3425
|
-
key:
|
|
3426
|
-
render:
|
|
3427
|
-
scope:
|
|
3425
|
+
key: $,
|
|
3426
|
+
render: z.render,
|
|
3427
|
+
scope: M,
|
|
3428
3428
|
formData: m.value
|
|
3429
3429
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3430
3430
|
])
|
|
@@ -3481,9 +3481,9 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3481
3481
|
!e.column.children || e.column.children.length === 0 ? {
|
|
3482
3482
|
name: "default",
|
|
3483
3483
|
fn: withCtx((c) => {
|
|
3484
|
-
var
|
|
3484
|
+
var v, w, g, m, k, C;
|
|
3485
3485
|
return [
|
|
3486
|
-
(
|
|
3486
|
+
(v = unref(n).findNodeByProp(e.column.prop)) != null && v.slotList ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(unref(n).findNodeByProp(e.column.prop).slotList, (l) => (openBlock(), createElementBlock("div", {
|
|
3487
3487
|
key: l.slotName
|
|
3488
3488
|
}, [
|
|
3489
3489
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
@@ -3493,30 +3493,30 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3493
3493
|
formData: c.row
|
|
3494
3494
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3495
3495
|
]))), 128)) : (w = unref(n).findNodeByProp(e.column.prop)) != null && w.dictType ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3496
|
-
unref(n).findNodeByProp(e.column.prop).dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l,
|
|
3497
|
-
key:
|
|
3496
|
+
unref(n).findNodeByProp(e.column.prop).dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l, b) => (openBlock(), createBlock(_sfc_main$n, {
|
|
3497
|
+
key: b,
|
|
3498
3498
|
dictType: unref(n).findNodeByProp(e.column.prop).dictType,
|
|
3499
3499
|
modelValue: l || ""
|
|
3500
|
-
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l,
|
|
3501
|
-
key:
|
|
3500
|
+
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l, b) => (openBlock(), createBlock(_sfc_main$e, {
|
|
3501
|
+
key: b,
|
|
3502
3502
|
dictType: unref(n).findNodeByProp(e.column.prop).dictType,
|
|
3503
3503
|
modelValue: l || ""
|
|
3504
|
-
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l,
|
|
3505
|
-
key:
|
|
3504
|
+
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l, b) => (openBlock(), createBlock(_sfc_main$f, {
|
|
3505
|
+
key: b,
|
|
3506
3506
|
dictType: unref(n).findNodeByProp(e.column.prop).dictType,
|
|
3507
3507
|
modelValue: l || ""
|
|
3508
|
-
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l,
|
|
3509
|
-
key:
|
|
3508
|
+
}, null, 8, ["dictType", "modelValue"]))), 128)) : unref(n).findNodeByProp(e.column.prop).dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(t(c.row[e.column.prop], unref(n).dictOptions), (l, b) => (openBlock(), createBlock(_sfc_main$d, {
|
|
3509
|
+
key: b,
|
|
3510
3510
|
dictType: unref(n).findNodeByProp(e.column.prop).dictType,
|
|
3511
3511
|
modelValue: l || ""
|
|
3512
3512
|
}, null, 8, ["dictType", "modelValue"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3513
3513
|
createTextVNode(toDisplayString(unref(n).GetLabelByCodesFilter(c.row[e.column.prop], unref(n).findNodeByProp(e.column.prop).dictType, unref(n).dictOptions(unref(n).findNodeByProp(e.column.prop)))), 1)
|
|
3514
3514
|
], 64))
|
|
3515
|
-
], 64)) : (
|
|
3515
|
+
], 64)) : (g = unref(n).findNodeByProp(e.column.prop)) != null && g.dictTreeType ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
3516
3516
|
createTextVNode(toDisplayString(unref(n).GetTreeLabelByCodesFilter(c.row[e.column.prop], unref(n).findNodeByProp(e.column.prop).dictTreeType, unref(n).dictTreeOptions(unref(n).findNodeByProp(e.column.prop)))), 1)
|
|
3517
3517
|
], 64)) : (m = unref(n).findNodeByProp(e.column.prop)) != null && m.dateFormat ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
3518
3518
|
createTextVNode(toDisplayString(unref(n).FormatDate(c.row[e.column.prop], unref(n).findNodeByProp(e.column.prop).dateFormat, unref(n).findNodeByProp(e.column.prop).defaultVal)), 1)
|
|
3519
|
-
], 64)) : (
|
|
3519
|
+
], 64)) : (k = unref(n).findNodeByProp(e.column.prop)) != null && k.maskType || (C = unref(n).findNodeByProp(e.column.prop)) != null && C.maskStart ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3520
3520
|
createTextVNode(toDisplayString(unref(n).Desensitization(c.row[e.column.prop], unref(n).maskOptions(unref(n).findNodeByProp(e.column.prop)))), 1)
|
|
3521
3521
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
3522
3522
|
createTextVNode(toDisplayString(c.row[e.column.prop] || unref(n).defaultVal), 1)
|
|
@@ -3556,11 +3556,11 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3556
3556
|
return i.defaultVal && (s.defaultVal = i.defaultVal), i.formatFun && (s.formatFun = i.formatFun), i.spacer && (s.spacer = i.spacer), s;
|
|
3557
3557
|
}, o = (i, s = d.tableHeader) => {
|
|
3558
3558
|
for (let c = 0; c < s.length; c++) {
|
|
3559
|
-
const
|
|
3560
|
-
if (
|
|
3561
|
-
return
|
|
3562
|
-
if (
|
|
3563
|
-
const w = o(i,
|
|
3559
|
+
const v = s[c];
|
|
3560
|
+
if (v.prop === i)
|
|
3561
|
+
return v;
|
|
3562
|
+
if (v.children && v.children.length > 0) {
|
|
3563
|
+
const w = o(i, v.children);
|
|
3564
3564
|
if (w)
|
|
3565
3565
|
return w;
|
|
3566
3566
|
}
|
|
@@ -3610,6 +3610,16 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3610
3610
|
}, {
|
|
3611
3611
|
__name: "index",
|
|
3612
3612
|
props: {
|
|
3613
|
+
// 防抖时间
|
|
3614
|
+
debounceTime: {
|
|
3615
|
+
type: Number,
|
|
3616
|
+
default: 300
|
|
3617
|
+
},
|
|
3618
|
+
// 是否立即触发一次容器宽度监听
|
|
3619
|
+
debounceImmediate: {
|
|
3620
|
+
type: Boolean,
|
|
3621
|
+
default: !0
|
|
3622
|
+
},
|
|
3613
3623
|
expandText: {
|
|
3614
3624
|
type: String,
|
|
3615
3625
|
default: "展开"
|
|
@@ -3697,54 +3707,74 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3697
3707
|
},
|
|
3698
3708
|
emits: ["fail", "pass", "reset", "update:modelValue"],
|
|
3699
3709
|
setup(e, { emit: r }) {
|
|
3700
|
-
const d = e, {
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3710
|
+
const d = e, {
|
|
3711
|
+
debounceTime: t,
|
|
3712
|
+
debounceImmediate: n,
|
|
3713
|
+
expandText: a,
|
|
3714
|
+
foldText: u,
|
|
3715
|
+
searchText: o,
|
|
3716
|
+
resetText: i,
|
|
3717
|
+
foldOnReset: s,
|
|
3718
|
+
expandOnNoEmptySearch: c,
|
|
3719
|
+
expandOnError: v,
|
|
3720
|
+
modelValue: w,
|
|
3721
|
+
rows: g,
|
|
3722
|
+
isAutoSetPlaceholder: m,
|
|
3723
|
+
isShowLabelPlaceholder: k,
|
|
3724
|
+
list: C,
|
|
3725
|
+
largeWidth: l,
|
|
3726
|
+
mediumWidth: b,
|
|
3727
|
+
smallWidth: T,
|
|
3728
|
+
foldStatus: E,
|
|
3729
|
+
showFold: y,
|
|
3730
|
+
showReset: x,
|
|
3731
|
+
showSearch: G
|
|
3732
|
+
} = toRefs(d), A = r, _ = ref(E.value), S = ref(window.innerWidth), I = computed(() => S.value > l.value ? 4 : S.value > b.value ? 3 : S.value > T.value ? 2 : 1), R = computed(() => {
|
|
3733
|
+
const $ = [];
|
|
3734
|
+
for (let M = 0; M < C.value.length; M++) {
|
|
3735
|
+
const j = C.value[M], J = M;
|
|
3736
|
+
let W = !1;
|
|
3737
|
+
I.value === 1 ? W = y.value && _.value && J + 1 > g.value : W = y.value && _.value && J + 1 > g.value * I.value - 1, W && j.fieldName && $.push(j.fieldName);
|
|
3706
3738
|
}
|
|
3707
|
-
return
|
|
3708
|
-
}),
|
|
3709
|
-
let
|
|
3710
|
-
return
|
|
3711
|
-
},
|
|
3712
|
-
let
|
|
3713
|
-
const p = (
|
|
3714
|
-
$ &&
|
|
3715
|
-
|
|
3716
|
-
}, 300);
|
|
3717
|
-
};
|
|
3739
|
+
return $;
|
|
3740
|
+
}), B = ($) => {
|
|
3741
|
+
let M = "";
|
|
3742
|
+
return I.value === 4 ? M += "quarter" : I.value === 3 ? M += "triple" : I.value === 2 ? M += "half" : M += "full", I.value === 1 ? y.value && _.value && $ + 1 > g.value && (M += " hide") : y.value && _.value && $ + 1 > g.value * I.value - 1 && (M += " hide"), M;
|
|
3743
|
+
}, V = ref(null);
|
|
3744
|
+
let f = null;
|
|
3745
|
+
const p = Debounce(($) => {
|
|
3746
|
+
$ && $.length > 0 && (S.value = $[0].contentRect.width);
|
|
3747
|
+
}, t.value, n.value);
|
|
3718
3748
|
onMounted(() => {
|
|
3719
|
-
var
|
|
3720
|
-
const
|
|
3721
|
-
|
|
3749
|
+
var M;
|
|
3750
|
+
const $ = (M = V.value) == null ? void 0 : M.$el;
|
|
3751
|
+
$ && (S.value = $.offsetWidth, f = new ResizeObserver(p), f.observe($));
|
|
3722
3752
|
}), onUnmounted(() => {
|
|
3723
|
-
|
|
3753
|
+
f && (f.disconnect(), f = null);
|
|
3724
3754
|
});
|
|
3725
|
-
const
|
|
3726
|
-
var
|
|
3727
|
-
const
|
|
3728
|
-
let
|
|
3729
|
-
for (let
|
|
3730
|
-
const
|
|
3731
|
-
if (
|
|
3732
|
-
|
|
3733
|
-
const
|
|
3734
|
-
|
|
3755
|
+
const D = ref({}), O = ($) => {
|
|
3756
|
+
var J;
|
|
3757
|
+
const M = {};
|
|
3758
|
+
let j = [];
|
|
3759
|
+
for (let W = 0; W < $.length; W++) {
|
|
3760
|
+
const K = $[W];
|
|
3761
|
+
if (K.fieldName && !j.includes(K.fieldName)) {
|
|
3762
|
+
j.push(K.fieldName);
|
|
3763
|
+
const N = (J = w.value) == null ? void 0 : J[K.fieldName];
|
|
3764
|
+
M[K.fieldName] = (K == null ? void 0 : K.modelValue) !== void 0 ? K.modelValue : N !== void 0 ? N : null;
|
|
3735
3765
|
} else
|
|
3736
|
-
console.warn("字段名称重复:",
|
|
3766
|
+
console.warn("字段名称重复:", K.fieldName);
|
|
3737
3767
|
}
|
|
3738
|
-
|
|
3768
|
+
D.value = JSON.parse(JSON.stringify(M));
|
|
3739
3769
|
};
|
|
3740
3770
|
watch(
|
|
3741
|
-
() => ({ ...
|
|
3771
|
+
() => ({ ...D.value }),
|
|
3742
3772
|
() => {
|
|
3743
|
-
const
|
|
3744
|
-
...JSON.parse(JSON.stringify(
|
|
3745
|
-
...
|
|
3773
|
+
const $ = {
|
|
3774
|
+
...JSON.parse(JSON.stringify(w.value || {})),
|
|
3775
|
+
...D.value
|
|
3746
3776
|
};
|
|
3747
|
-
|
|
3777
|
+
A("update:modelValue", $);
|
|
3748
3778
|
},
|
|
3749
3779
|
{
|
|
3750
3780
|
deep: !0,
|
|
@@ -3752,69 +3782,69 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3752
3782
|
}
|
|
3753
3783
|
), watch(
|
|
3754
3784
|
() => d.list,
|
|
3755
|
-
(
|
|
3756
|
-
|
|
3785
|
+
($) => {
|
|
3786
|
+
O($);
|
|
3757
3787
|
},
|
|
3758
3788
|
{
|
|
3759
3789
|
immediate: !0
|
|
3760
3790
|
}
|
|
3761
3791
|
);
|
|
3762
|
-
const
|
|
3763
|
-
var
|
|
3764
|
-
if ((
|
|
3765
|
-
return (
|
|
3766
|
-
if (
|
|
3767
|
-
return
|
|
3768
|
-
},
|
|
3769
|
-
await nextTick(),
|
|
3770
|
-
|
|
3792
|
+
const F = computed(() => I.value === 1 ? C.value.length > g.value : C.value.length > g.value * I.value - 1), L = ($) => {
|
|
3793
|
+
var M, j;
|
|
3794
|
+
if ((M = $ == null ? void 0 : $.props) != null && M.placeholder)
|
|
3795
|
+
return (j = $ == null ? void 0 : $.props) == null ? void 0 : j.placeholder;
|
|
3796
|
+
if (m.value)
|
|
3797
|
+
return $.compName.toLocaleLowerCase().includes("input") ? k.value ? "请输入" + $.label : "请输入" : k.value ? "请选择" + $.label : "请选择";
|
|
3798
|
+
}, P = async () => {
|
|
3799
|
+
await nextTick(), V.value.resetFields(), setTimeout(() => {
|
|
3800
|
+
s.value && (_.value = !0), A("reset");
|
|
3771
3801
|
}, 100);
|
|
3772
|
-
},
|
|
3773
|
-
await nextTick(),
|
|
3774
|
-
|
|
3775
|
-
const
|
|
3776
|
-
return !(
|
|
3777
|
-
}).some((
|
|
3802
|
+
}, z = async () => {
|
|
3803
|
+
await nextTick(), V.value.validate(($, M) => {
|
|
3804
|
+
$ ? (Object.keys(D.value).filter((W) => {
|
|
3805
|
+
const K = D.value[W];
|
|
3806
|
+
return !(K == null || K === "" || typeof K == "number" && Number.isNaN(K) || Array.isArray(K) && K.length === 0 || typeof K == "string" && K.trim() === "");
|
|
3807
|
+
}).some((W) => R.value.includes(W)) && c.value && (_.value = !1), A("pass", D.value)) : ((Object.keys(M).some((W) => R.value.includes(W)) || v.value) && (_.value = !1), A("fail", M, D.value));
|
|
3778
3808
|
});
|
|
3779
3809
|
};
|
|
3780
|
-
return (
|
|
3810
|
+
return ($, M) => (openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
3781
3811
|
ref_key: "searchFormRef",
|
|
3782
|
-
ref:
|
|
3812
|
+
ref: V,
|
|
3783
3813
|
style: { minWidth: e.minWidth + "px" },
|
|
3784
|
-
model:
|
|
3814
|
+
model: D.value,
|
|
3785
3815
|
class: "dict-search-box dict-clearfix"
|
|
3786
|
-
},
|
|
3816
|
+
}, $.$attrs), {
|
|
3787
3817
|
default: withCtx(() => [
|
|
3788
|
-
renderSlot(
|
|
3789
|
-
searchForm:
|
|
3790
|
-
fold:
|
|
3791
|
-
itemsPerRow:
|
|
3818
|
+
renderSlot($.$slots, "prepend", {
|
|
3819
|
+
searchForm: D.value,
|
|
3820
|
+
fold: _.value,
|
|
3821
|
+
itemsPerRow: I.value
|
|
3792
3822
|
}, void 0, !0),
|
|
3793
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
3794
|
-
key:
|
|
3795
|
-
class:
|
|
3796
|
-
label:
|
|
3797
|
-
prop:
|
|
3798
|
-
},
|
|
3823
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(C), (j, J) => (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
3824
|
+
key: J,
|
|
3825
|
+
class: B(J),
|
|
3826
|
+
label: j.label,
|
|
3827
|
+
prop: j.fieldName
|
|
3828
|
+
}, j.formItemProps), {
|
|
3799
3829
|
default: withCtx(() => {
|
|
3800
|
-
var
|
|
3830
|
+
var W, K;
|
|
3801
3831
|
return [
|
|
3802
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3803
|
-
modelValue:
|
|
3804
|
-
"onUpdate:modelValue": (
|
|
3805
|
-
|
|
3832
|
+
(openBlock(), createBlock(resolveDynamicComponent(j.compName), mergeProps({
|
|
3833
|
+
modelValue: D.value[j.fieldName],
|
|
3834
|
+
"onUpdate:modelValue": (N) => {
|
|
3835
|
+
D.value[j.fieldName] = N;
|
|
3806
3836
|
},
|
|
3807
|
-
clearable: ((
|
|
3808
|
-
placeholder:
|
|
3809
|
-
},
|
|
3810
|
-
renderList((
|
|
3811
|
-
name:
|
|
3812
|
-
fn: withCtx((
|
|
3837
|
+
clearable: ((W = j == null ? void 0 : j.props) == null ? void 0 : W.clearable) || !0,
|
|
3838
|
+
placeholder: L(j)
|
|
3839
|
+
}, j.props), createSlots({ _: 2 }, [
|
|
3840
|
+
renderList((K = j == null ? void 0 : j.props) == null ? void 0 : K.slotList, (N, q) => ({
|
|
3841
|
+
name: N.slotName,
|
|
3842
|
+
fn: withCtx((Y) => [
|
|
3813
3843
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3814
|
-
key:
|
|
3815
|
-
render:
|
|
3816
|
-
scope:
|
|
3817
|
-
formData:
|
|
3844
|
+
key: q,
|
|
3845
|
+
render: N.render,
|
|
3846
|
+
scope: Y,
|
|
3847
|
+
formData: D.value
|
|
3818
3848
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3819
3849
|
])
|
|
3820
3850
|
}))
|
|
@@ -3824,52 +3854,52 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3824
3854
|
_: 2
|
|
3825
3855
|
}, 1040, ["class", "label", "prop"]))), 128)),
|
|
3826
3856
|
createVNode(unref(ElFormItem), {
|
|
3827
|
-
class: normalizeClass(
|
|
3857
|
+
class: normalizeClass(B(0) + " fr")
|
|
3828
3858
|
}, {
|
|
3829
3859
|
default: withCtx(() => [
|
|
3830
|
-
renderSlot(
|
|
3831
|
-
searchForm:
|
|
3832
|
-
fold:
|
|
3833
|
-
itemsPerRow:
|
|
3860
|
+
renderSlot($.$slots, "button-prefix", {
|
|
3861
|
+
searchForm: D.value,
|
|
3862
|
+
fold: _.value,
|
|
3863
|
+
itemsPerRow: I.value
|
|
3834
3864
|
}, void 0, !0),
|
|
3835
3865
|
withDirectives(createVNode(unref(ElButton), {
|
|
3836
3866
|
plain: "",
|
|
3837
|
-
onClick:
|
|
3867
|
+
onClick: P
|
|
3838
3868
|
}, {
|
|
3839
3869
|
default: withCtx(() => [
|
|
3840
|
-
createTextVNode(toDisplayString(unref(
|
|
3870
|
+
createTextVNode(toDisplayString(unref(i)), 1)
|
|
3841
3871
|
]),
|
|
3842
3872
|
_: 1
|
|
3843
3873
|
}, 512), [
|
|
3844
|
-
[vShow, unref(
|
|
3874
|
+
[vShow, unref(x)]
|
|
3845
3875
|
]),
|
|
3846
3876
|
withDirectives(createVNode(unref(ElButton), {
|
|
3847
3877
|
type: "primary",
|
|
3848
|
-
onClick:
|
|
3878
|
+
onClick: z
|
|
3849
3879
|
}, {
|
|
3850
3880
|
default: withCtx(() => [
|
|
3851
|
-
createTextVNode(toDisplayString(unref(
|
|
3881
|
+
createTextVNode(toDisplayString(unref(o)), 1)
|
|
3852
3882
|
]),
|
|
3853
3883
|
_: 1
|
|
3854
3884
|
}, 512), [
|
|
3855
|
-
[vShow, unref(
|
|
3885
|
+
[vShow, unref(G)]
|
|
3856
3886
|
]),
|
|
3857
|
-
renderSlot(
|
|
3858
|
-
searchForm:
|
|
3859
|
-
fold:
|
|
3860
|
-
itemsPerRow:
|
|
3887
|
+
renderSlot($.$slots, "button-suffix", {
|
|
3888
|
+
searchForm: D.value,
|
|
3889
|
+
fold: _.value,
|
|
3890
|
+
itemsPerRow: I.value
|
|
3861
3891
|
}, void 0, !0),
|
|
3862
|
-
unref(
|
|
3892
|
+
unref(y) && F.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3863
3893
|
key: 0,
|
|
3864
3894
|
class: "no-underline",
|
|
3865
3895
|
underline: "never",
|
|
3866
3896
|
type: "primary",
|
|
3867
|
-
onClick:
|
|
3897
|
+
onClick: M[0] || (M[0] = (j) => _.value = !_.value)
|
|
3868
3898
|
}, {
|
|
3869
3899
|
default: withCtx(() => [
|
|
3870
|
-
createTextVNode(toDisplayString(
|
|
3900
|
+
createTextVNode(toDisplayString(_.value ? unref(a) : unref(u)), 1),
|
|
3871
3901
|
createVNode(unref(ElIcon), {
|
|
3872
|
-
class: normalizeClass(
|
|
3902
|
+
class: normalizeClass(_.value ? "" : "rotate")
|
|
3873
3903
|
}, {
|
|
3874
3904
|
default: withCtx(() => [
|
|
3875
3905
|
createVNode(unref(ArrowDown))
|
|
@@ -3882,16 +3912,16 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3882
3912
|
]),
|
|
3883
3913
|
_: 3
|
|
3884
3914
|
}, 8, ["class"]),
|
|
3885
|
-
renderSlot(
|
|
3886
|
-
searchForm:
|
|
3887
|
-
fold:
|
|
3888
|
-
itemsPerRow:
|
|
3915
|
+
renderSlot($.$slots, "append", {
|
|
3916
|
+
searchForm: D.value,
|
|
3917
|
+
fold: _.value,
|
|
3918
|
+
itemsPerRow: I.value
|
|
3889
3919
|
}, void 0, !0)
|
|
3890
3920
|
]),
|
|
3891
3921
|
_: 3
|
|
3892
3922
|
}, 16, ["style", "model"]));
|
|
3893
3923
|
}
|
|
3894
|
-
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3924
|
+
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6a42ddaf"]]);
|
|
3895
3925
|
dictComponent$1.install = function(e) {
|
|
3896
3926
|
e.component(dictComponent$1.name, dictComponent$1);
|
|
3897
3927
|
};
|
|
@@ -3934,8 +3964,8 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3934
3964
|
},
|
|
3935
3965
|
emits: ["update:modelValue", "focus", "blur"],
|
|
3936
3966
|
setup(e, { emit: r }) {
|
|
3937
|
-
const d = e, { modelValue: t, maskType: n, maskStart: a, maskMiddle: u, maskEnd: o, maskSymbol: i } = toRefs(d), s = r, c = ref(d.modelValue),
|
|
3938
|
-
const
|
|
3967
|
+
const d = e, { modelValue: t, maskType: n, maskStart: a, maskMiddle: u, maskEnd: o, maskSymbol: i } = toRefs(d), s = r, c = ref(d.modelValue), v = ref(!1), w = computed(() => !!n.value || Number(a.value) > 0 || Number(u.value) > 0 || Number(o.value) > 0), g = computed(() => {
|
|
3968
|
+
const b = {
|
|
3939
3969
|
start: Number(a.value) || 0,
|
|
3940
3970
|
middle: Number(u.value) || 0,
|
|
3941
3971
|
end: Number(o.value) || 0,
|
|
@@ -3943,45 +3973,45 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3943
3973
|
defaultVal: ""
|
|
3944
3974
|
};
|
|
3945
3975
|
return typeof n.value == "string" ? n.value : Array.isArray(n.value) ? {
|
|
3946
|
-
...
|
|
3947
|
-
start: n.value[0] ||
|
|
3948
|
-
middle: n.value[1] ||
|
|
3949
|
-
end: n.value[2] ||
|
|
3950
|
-
symbol: n.value[3] ||
|
|
3951
|
-
} : typeof n.value == "object" && n.value !== null ? { ...
|
|
3952
|
-
}), m = (
|
|
3953
|
-
|
|
3954
|
-
},
|
|
3955
|
-
|
|
3956
|
-
}, l = (
|
|
3957
|
-
|
|
3976
|
+
...b,
|
|
3977
|
+
start: n.value[0] || b.start,
|
|
3978
|
+
middle: n.value[1] || b.middle,
|
|
3979
|
+
end: n.value[2] || b.end,
|
|
3980
|
+
symbol: n.value[3] || b.symbol
|
|
3981
|
+
} : typeof n.value == "object" && n.value !== null ? { ...b, ...n.value } : b;
|
|
3982
|
+
}), m = (b = t.value) => {
|
|
3983
|
+
v.value ? c.value = b : w.value ? c.value = Desensitization(b, g.value) : c.value = b;
|
|
3984
|
+
}, k = inject("elFormItem", null), C = (b) => {
|
|
3985
|
+
v.value = !0, m(), s("focus", b);
|
|
3986
|
+
}, l = (b) => {
|
|
3987
|
+
v.value = !1, s("update:modelValue", c.value), m(), s("blur", b), k && k.validate("blur");
|
|
3958
3988
|
};
|
|
3959
3989
|
return watch(
|
|
3960
3990
|
c,
|
|
3961
|
-
(
|
|
3962
|
-
|
|
3991
|
+
(b) => {
|
|
3992
|
+
v.value && s("update:modelValue", b);
|
|
3963
3993
|
},
|
|
3964
3994
|
{ immediate: !1 }
|
|
3965
3995
|
), watch(
|
|
3966
3996
|
t,
|
|
3967
|
-
(
|
|
3968
|
-
m(
|
|
3997
|
+
(b) => {
|
|
3998
|
+
m(b);
|
|
3969
3999
|
},
|
|
3970
4000
|
{ immediate: !0, deep: !0 }
|
|
3971
4001
|
), onUnmounted(() => {
|
|
3972
|
-
|
|
3973
|
-
}), (
|
|
4002
|
+
v.value = !1;
|
|
4003
|
+
}), (b, T) => (openBlock(), createBlock(unref(ElInput), mergeProps({
|
|
3974
4004
|
modelValue: c.value,
|
|
3975
|
-
"onUpdate:modelValue":
|
|
3976
|
-
},
|
|
3977
|
-
onFocus:
|
|
4005
|
+
"onUpdate:modelValue": T[0] || (T[0] = (E) => c.value = E)
|
|
4006
|
+
}, b.$attrs, {
|
|
4007
|
+
onFocus: C,
|
|
3978
4008
|
onBlur: l,
|
|
3979
4009
|
autocomplete: "off"
|
|
3980
4010
|
}), createSlots({ _: 2 }, [
|
|
3981
|
-
renderList(
|
|
3982
|
-
name:
|
|
3983
|
-
fn: withCtx((
|
|
3984
|
-
renderSlot(
|
|
4011
|
+
renderList(b.$slots, (E, y, x) => ({
|
|
4012
|
+
name: y,
|
|
4013
|
+
fn: withCtx((G) => [
|
|
4014
|
+
renderSlot(b.$slots, y, normalizeProps(guardReactiveProps(G)))
|
|
3985
4015
|
])
|
|
3986
4016
|
}))
|
|
3987
4017
|
]), 1040, ["modelValue"]));
|
|
@@ -4050,79 +4080,79 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4050
4080
|
},
|
|
4051
4081
|
emits: ["dictChange"],
|
|
4052
4082
|
setup(e, { expose: r, emit: d }) {
|
|
4053
|
-
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun:
|
|
4054
|
-
const
|
|
4055
|
-
return Object.entries(
|
|
4056
|
-
const F = ToKebabCase(
|
|
4083
|
+
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: v, disabledDataFun: w } = toRefs(t), g = useAttrs(), m = computed(() => {
|
|
4084
|
+
const p = {};
|
|
4085
|
+
return Object.entries(g).forEach(([D, O]) => {
|
|
4086
|
+
const F = ToKebabCase(D);
|
|
4057
4087
|
if (!F.startsWith("radio-button-") && !F.startsWith("on-radio-button-")) {
|
|
4058
|
-
const
|
|
4059
|
-
|
|
4088
|
+
const L = ToCamelCase(F);
|
|
4089
|
+
p[L] = O;
|
|
4060
4090
|
}
|
|
4061
|
-
}),
|
|
4062
|
-
}),
|
|
4063
|
-
const
|
|
4064
|
-
return Object.entries(
|
|
4065
|
-
const F = ToKebabCase(
|
|
4091
|
+
}), p;
|
|
4092
|
+
}), k = computed(() => {
|
|
4093
|
+
const p = {};
|
|
4094
|
+
return Object.entries(g).forEach(([D, O]) => {
|
|
4095
|
+
const F = ToKebabCase(D);
|
|
4066
4096
|
if (F.startsWith("radio-button-") || F.startsWith("on-radio-button-")) {
|
|
4067
|
-
const
|
|
4068
|
-
|
|
4097
|
+
const L = ToCamelCase(F.replace("radio-button-", ""));
|
|
4098
|
+
p[L] = O;
|
|
4069
4099
|
}
|
|
4070
|
-
}),
|
|
4071
|
-
}),
|
|
4100
|
+
}), p;
|
|
4101
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), b = d, T = (p) => {
|
|
4072
4102
|
if (!c.value) {
|
|
4073
|
-
|
|
4103
|
+
b("dictChange", p);
|
|
4074
4104
|
return;
|
|
4075
4105
|
}
|
|
4076
|
-
const
|
|
4077
|
-
|
|
4106
|
+
const D = E.list.find((O) => O[l.format.value] === p);
|
|
4107
|
+
b("dictChange", D);
|
|
4078
4108
|
}, E = reactive({
|
|
4079
4109
|
list: []
|
|
4080
|
-
}),
|
|
4110
|
+
}), y = async () => {
|
|
4081
4111
|
if (!i.value || u.value && u.value.length > 0)
|
|
4082
4112
|
return;
|
|
4083
|
-
let
|
|
4113
|
+
let p = [];
|
|
4084
4114
|
if (typeof i.value == "object") {
|
|
4085
|
-
|
|
4086
|
-
const
|
|
4087
|
-
|
|
4088
|
-
const { filters:
|
|
4089
|
-
|
|
4115
|
+
C.value = i.value.type;
|
|
4116
|
+
const D = await store.actions.getDictDataObj(C.value);
|
|
4117
|
+
p = [].concat(D[C.value]);
|
|
4118
|
+
const { filters: O, filterType: F = l.format.value, reverse: L = !1 } = i.value, P = typeof O == "string" ? O.split(",") : O;
|
|
4119
|
+
L ? p = p.filter((z) => !P.includes(z[F])) : p = p.filter((z) => P.includes(z[F]));
|
|
4090
4120
|
} else {
|
|
4091
|
-
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4121
|
+
C.value = i.value;
|
|
4122
|
+
const D = await store.actions.getDictDataObj(C.value);
|
|
4123
|
+
p = [].concat(D[C.value]);
|
|
4094
4124
|
}
|
|
4095
|
-
if (
|
|
4096
|
-
|
|
4097
|
-
...
|
|
4098
|
-
[l.format.disabled]: w.value(
|
|
4125
|
+
if (v.value && (p = v.value(p)), w.value)
|
|
4126
|
+
p = p.map((D) => ({
|
|
4127
|
+
...D,
|
|
4128
|
+
[l.format.disabled]: w.value(D)
|
|
4099
4129
|
}));
|
|
4100
4130
|
else if (s.value) {
|
|
4101
|
-
const { disabledValues:
|
|
4102
|
-
F ?
|
|
4103
|
-
const
|
|
4104
|
-
return
|
|
4105
|
-
}) :
|
|
4106
|
-
const
|
|
4107
|
-
return
|
|
4131
|
+
const { disabledValues: D, disabledType: O = l.format.value, reverse: F = !1 } = s.value, L = typeof D == "string" ? D.split(",") : D;
|
|
4132
|
+
F ? p = p.map((P) => {
|
|
4133
|
+
const z = JSON.parse(JSON.stringify(P));
|
|
4134
|
+
return z[l.format.disabled] = !L.includes(z[O]) || z[l.format.disabled], z;
|
|
4135
|
+
}) : p = p.map((P) => {
|
|
4136
|
+
const z = JSON.parse(JSON.stringify(P));
|
|
4137
|
+
return z[l.format.disabled] = L.includes(z[O]) || z[l.format.disabled], z;
|
|
4108
4138
|
});
|
|
4109
4139
|
}
|
|
4110
|
-
a.value &&
|
|
4140
|
+
a.value && p.unshift({
|
|
4111
4141
|
[l.format.value]: "",
|
|
4112
4142
|
[l.format.label]: a.value
|
|
4113
|
-
}), E.list =
|
|
4114
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(
|
|
4143
|
+
}), E.list = p;
|
|
4144
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), G = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value), _ = inject(formItemContextKey), S = inject(formContextKey), I = computed(() => n.value || g["radio-disabled"] === "" || g["radio-disabled"] || g.radioDisabled === "" || g.radioDisabled || g.RadioDisabled === "" || g.RadioDisabled || (_ == null ? void 0 : _.disabled) || (S == null ? void 0 : S.disabled) || !1);
|
|
4115
4145
|
watch(
|
|
4116
|
-
[x,
|
|
4117
|
-
([
|
|
4118
|
-
!
|
|
4119
|
-
[l.format.value]:
|
|
4120
|
-
[l.format.label]:
|
|
4121
|
-
[l.format.disabled]: !!
|
|
4122
|
-
...
|
|
4123
|
-
})) : E.list = E.list.map((
|
|
4124
|
-
[l.format.value]:
|
|
4125
|
-
[l.format.label]:
|
|
4146
|
+
[x, G, A],
|
|
4147
|
+
([p, D, O]) => {
|
|
4148
|
+
!p && !D && O && O.length === 0 && y(), O.length > 0 && (E.list = JSON.parse(JSON.stringify(O)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((L) => ({
|
|
4149
|
+
[l.format.value]: L[o.value.value],
|
|
4150
|
+
[l.format.label]: L[o.value.label],
|
|
4151
|
+
[l.format.disabled]: !!L[o.value.disabled],
|
|
4152
|
+
...L
|
|
4153
|
+
})) : E.list = E.list.map((L) => ({
|
|
4154
|
+
[l.format.value]: L,
|
|
4155
|
+
[l.format.label]: L
|
|
4126
4156
|
})), a.value && E.list.unshift({
|
|
4127
4157
|
[l.format.value]: "",
|
|
4128
4158
|
[l.format.label]: a.value
|
|
@@ -4132,34 +4162,34 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4132
4162
|
immediate: !0
|
|
4133
4163
|
}
|
|
4134
4164
|
);
|
|
4135
|
-
const
|
|
4136
|
-
return r({ getElRadioGroupRef: () =>
|
|
4165
|
+
const R = ref([]), B = () => R.value, V = ref(null);
|
|
4166
|
+
return r({ getElRadioGroupRef: () => V.value, getElRadioButtonRefs: B }), (p, D) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4137
4167
|
ref_key: "ElRadioGroupRef",
|
|
4138
|
-
ref:
|
|
4139
|
-
disabled:
|
|
4140
|
-
}, m.value, { onChange:
|
|
4168
|
+
ref: V,
|
|
4169
|
+
disabled: I.value
|
|
4170
|
+
}, m.value, { onChange: T }), createSlots({
|
|
4141
4171
|
default: withCtx(() => [
|
|
4142
|
-
|
|
4172
|
+
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (O, F) => (openBlock(), createBlock(unref(ElRadioButton), mergeProps({
|
|
4143
4173
|
ref_for: !0,
|
|
4144
|
-
ref: (
|
|
4145
|
-
|
|
4174
|
+
ref: (L) => {
|
|
4175
|
+
L && (R.value[F] = L);
|
|
4146
4176
|
},
|
|
4147
|
-
key:
|
|
4148
|
-
disabled:
|
|
4149
|
-
label:
|
|
4150
|
-
},
|
|
4177
|
+
key: O[unref(l).format.value],
|
|
4178
|
+
disabled: I.value || O[unref(l).format.disabled],
|
|
4179
|
+
label: O[unref(l).format.value]
|
|
4180
|
+
}, k.value), {
|
|
4151
4181
|
default: withCtx(() => [
|
|
4152
|
-
createTextVNode(toDisplayString(
|
|
4182
|
+
createTextVNode(toDisplayString(O[unref(l).format.label]), 1)
|
|
4153
4183
|
]),
|
|
4154
4184
|
_: 2
|
|
4155
4185
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4156
4186
|
]),
|
|
4157
4187
|
_: 2
|
|
4158
4188
|
}, [
|
|
4159
|
-
renderList(
|
|
4189
|
+
renderList(p.$slots, (O, F, L) => ({
|
|
4160
4190
|
name: F,
|
|
4161
|
-
fn: withCtx((
|
|
4162
|
-
renderSlot(
|
|
4191
|
+
fn: withCtx((P) => [
|
|
4192
|
+
renderSlot(p.$slots, F, normalizeProps(guardReactiveProps(P)))
|
|
4163
4193
|
])
|
|
4164
4194
|
}))
|
|
4165
4195
|
]), 1040, ["disabled"]));
|
|
@@ -4223,79 +4253,79 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4223
4253
|
},
|
|
4224
4254
|
emits: ["dictChange"],
|
|
4225
4255
|
setup(e, { expose: r, emit: d }) {
|
|
4226
|
-
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun:
|
|
4227
|
-
const
|
|
4228
|
-
return Object.entries(
|
|
4229
|
-
const F = ToKebabCase(
|
|
4256
|
+
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: v, disabledDataFun: w } = toRefs(t), g = useAttrs(), m = computed(() => {
|
|
4257
|
+
const p = {};
|
|
4258
|
+
return Object.entries(g).forEach(([D, O]) => {
|
|
4259
|
+
const F = ToKebabCase(D);
|
|
4230
4260
|
if (!F.startsWith("radio-") && !F.startsWith("on-radio-")) {
|
|
4231
|
-
const
|
|
4232
|
-
|
|
4261
|
+
const L = ToCamelCase(F);
|
|
4262
|
+
p[L] = O;
|
|
4233
4263
|
}
|
|
4234
|
-
}),
|
|
4235
|
-
}),
|
|
4236
|
-
const
|
|
4237
|
-
return Object.entries(
|
|
4238
|
-
const F = ToKebabCase(
|
|
4264
|
+
}), p;
|
|
4265
|
+
}), k = computed(() => {
|
|
4266
|
+
const p = {};
|
|
4267
|
+
return Object.entries(g).forEach(([D, O]) => {
|
|
4268
|
+
const F = ToKebabCase(D);
|
|
4239
4269
|
if (F.startsWith("radio-") || F.startsWith("on-radio-")) {
|
|
4240
|
-
const
|
|
4241
|
-
|
|
4270
|
+
const L = ToCamelCase(F.replace("radio-", ""));
|
|
4271
|
+
p[L] = O;
|
|
4242
4272
|
}
|
|
4243
|
-
}),
|
|
4244
|
-
}),
|
|
4273
|
+
}), p;
|
|
4274
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), b = d, T = (p) => {
|
|
4245
4275
|
if (!c.value) {
|
|
4246
|
-
|
|
4276
|
+
b("dictChange", p);
|
|
4247
4277
|
return;
|
|
4248
4278
|
}
|
|
4249
|
-
const
|
|
4250
|
-
|
|
4279
|
+
const D = E.list.find((O) => O[l.format.value] === p);
|
|
4280
|
+
b("dictChange", D);
|
|
4251
4281
|
}, E = reactive({
|
|
4252
4282
|
list: []
|
|
4253
|
-
}),
|
|
4283
|
+
}), y = async () => {
|
|
4254
4284
|
if (!i.value || u.value && u.value.length > 0)
|
|
4255
4285
|
return;
|
|
4256
|
-
let
|
|
4286
|
+
let p = [];
|
|
4257
4287
|
if (typeof i.value == "object") {
|
|
4258
|
-
|
|
4259
|
-
const
|
|
4260
|
-
|
|
4261
|
-
const { filters:
|
|
4262
|
-
|
|
4288
|
+
C.value = i.value.type;
|
|
4289
|
+
const D = await store.actions.getDictDataObj(C.value);
|
|
4290
|
+
p = [].concat(D[C.value]);
|
|
4291
|
+
const { filters: O, filterType: F = l.format.value, reverse: L = !1 } = i.value, P = typeof O == "string" ? O.split(",") : O;
|
|
4292
|
+
L ? p = p.filter((z) => !P.includes(z[F])) : p = p.filter((z) => P.includes(z[F]));
|
|
4263
4293
|
} else {
|
|
4264
|
-
|
|
4265
|
-
const
|
|
4266
|
-
|
|
4294
|
+
C.value = i.value;
|
|
4295
|
+
const D = await store.actions.getDictDataObj(C.value);
|
|
4296
|
+
p = [].concat(D[C.value]);
|
|
4267
4297
|
}
|
|
4268
|
-
if (
|
|
4269
|
-
|
|
4270
|
-
...
|
|
4271
|
-
[l.format.disabled]: w.value(
|
|
4298
|
+
if (v.value && (p = v.value(p)), w.value)
|
|
4299
|
+
p = p.map((D) => ({
|
|
4300
|
+
...D,
|
|
4301
|
+
[l.format.disabled]: w.value(D)
|
|
4272
4302
|
}));
|
|
4273
4303
|
else if (s.value) {
|
|
4274
|
-
const { disabledValues:
|
|
4275
|
-
F ?
|
|
4276
|
-
const
|
|
4277
|
-
return
|
|
4278
|
-
}) :
|
|
4279
|
-
const
|
|
4280
|
-
return
|
|
4304
|
+
const { disabledValues: D, disabledType: O = l.format.value, reverse: F = !1 } = s.value, L = typeof D == "string" ? D.split(",") : D;
|
|
4305
|
+
F ? p = p.map((P) => {
|
|
4306
|
+
const z = JSON.parse(JSON.stringify(P));
|
|
4307
|
+
return z[l.format.disabled] = !L.includes(z[O]) || z[l.format.disabled], z;
|
|
4308
|
+
}) : p = p.map((P) => {
|
|
4309
|
+
const z = JSON.parse(JSON.stringify(P));
|
|
4310
|
+
return z[l.format.disabled] = L.includes(z[O]) || z[l.format.disabled], z;
|
|
4281
4311
|
});
|
|
4282
4312
|
}
|
|
4283
|
-
a.value &&
|
|
4313
|
+
a.value && p.unshift({
|
|
4284
4314
|
[l.format.value]: "",
|
|
4285
4315
|
[l.format.label]: a.value
|
|
4286
|
-
}), E.list =
|
|
4287
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(
|
|
4316
|
+
}), E.list = p;
|
|
4317
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), G = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value), _ = inject(formItemContextKey), S = inject(formContextKey), I = computed(() => n.value || g["radio-disabled"] === "" || g["radio-disabled"] || g.radioDisabled === "" || g.radioDisabled || g.RadioDisabled === "" || g.RadioDisabled || (_ == null ? void 0 : _.disabled) || (S == null ? void 0 : S.disabled) || !1);
|
|
4288
4318
|
watch(
|
|
4289
|
-
[x,
|
|
4290
|
-
([
|
|
4291
|
-
!
|
|
4292
|
-
[l.format.value]:
|
|
4293
|
-
[l.format.label]:
|
|
4294
|
-
[l.format.disabled]: !!
|
|
4295
|
-
...
|
|
4296
|
-
})) : E.list = E.list.map((
|
|
4297
|
-
[l.format.value]:
|
|
4298
|
-
[l.format.label]:
|
|
4319
|
+
[x, G, A],
|
|
4320
|
+
([p, D, O]) => {
|
|
4321
|
+
!p && !D && O && O.length === 0 && y(), O.length > 0 && (E.list = JSON.parse(JSON.stringify(O)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((L) => ({
|
|
4322
|
+
[l.format.value]: L[o.value.value],
|
|
4323
|
+
[l.format.label]: L[o.value.label],
|
|
4324
|
+
[l.format.disabled]: !!L[o.value.disabled],
|
|
4325
|
+
...L
|
|
4326
|
+
})) : E.list = E.list.map((L) => ({
|
|
4327
|
+
[l.format.value]: L,
|
|
4328
|
+
[l.format.label]: L
|
|
4299
4329
|
})), a.value && E.list.unshift({
|
|
4300
4330
|
[l.format.value]: "",
|
|
4301
4331
|
[l.format.label]: a.value
|
|
@@ -4305,34 +4335,34 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4305
4335
|
immediate: !0
|
|
4306
4336
|
}
|
|
4307
4337
|
);
|
|
4308
|
-
const
|
|
4309
|
-
return r({ geElRadioGroupRef: () =>
|
|
4338
|
+
const R = ref([]), B = () => R.value, V = ref(null);
|
|
4339
|
+
return r({ geElRadioGroupRef: () => V.value, getElRadioRefs: B }), (p, D) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4310
4340
|
ref_key: "ElRadioGroupRef",
|
|
4311
|
-
ref:
|
|
4312
|
-
disabled:
|
|
4313
|
-
}, m.value, { onChange:
|
|
4341
|
+
ref: V,
|
|
4342
|
+
disabled: I.value
|
|
4343
|
+
}, m.value, { onChange: T }), createSlots({
|
|
4314
4344
|
default: withCtx(() => [
|
|
4315
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4345
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (O, F) => (openBlock(), createBlock(unref(ElRadio), mergeProps({
|
|
4316
4346
|
ref_for: !0,
|
|
4317
|
-
ref: (
|
|
4318
|
-
|
|
4347
|
+
ref: (L) => {
|
|
4348
|
+
L && (R.value[F] = L);
|
|
4319
4349
|
},
|
|
4320
|
-
key:
|
|
4321
|
-
disabled:
|
|
4322
|
-
label:
|
|
4323
|
-
},
|
|
4350
|
+
key: O[unref(l).format.value],
|
|
4351
|
+
disabled: I.value || O[unref(l).format.disabled],
|
|
4352
|
+
label: O[unref(l).format.value]
|
|
4353
|
+
}, k.value), {
|
|
4324
4354
|
default: withCtx(() => [
|
|
4325
|
-
createTextVNode(toDisplayString(
|
|
4355
|
+
createTextVNode(toDisplayString(O[unref(l).format.label]), 1)
|
|
4326
4356
|
]),
|
|
4327
4357
|
_: 2
|
|
4328
4358
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4329
4359
|
]),
|
|
4330
4360
|
_: 2
|
|
4331
4361
|
}, [
|
|
4332
|
-
renderList(
|
|
4362
|
+
renderList(p.$slots, (O, F, L) => ({
|
|
4333
4363
|
name: F,
|
|
4334
|
-
fn: withCtx((
|
|
4335
|
-
renderSlot(
|
|
4364
|
+
fn: withCtx((P) => [
|
|
4365
|
+
renderSlot(p.$slots, F, normalizeProps(guardReactiveProps(P)))
|
|
4336
4366
|
])
|
|
4337
4367
|
}))
|
|
4338
4368
|
]), 1040, ["disabled"]));
|
|
@@ -4397,126 +4427,126 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4397
4427
|
},
|
|
4398
4428
|
emits: ["dictChange"],
|
|
4399
4429
|
setup(e, { expose: r, emit: d }) {
|
|
4400
|
-
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue:
|
|
4401
|
-
const
|
|
4402
|
-
return Object.entries(m).forEach(([
|
|
4403
|
-
const
|
|
4404
|
-
if (!
|
|
4405
|
-
const F = ToCamelCase(
|
|
4406
|
-
|
|
4430
|
+
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: g } = toRefs(t), m = useAttrs(), k = computed(() => {
|
|
4431
|
+
const f = {};
|
|
4432
|
+
return Object.entries(m).forEach(([p, D]) => {
|
|
4433
|
+
const O = ToKebabCase(p);
|
|
4434
|
+
if (!O.startsWith("option-") && !O.startsWith("on-option-")) {
|
|
4435
|
+
const F = ToCamelCase(O);
|
|
4436
|
+
f[F] = D;
|
|
4407
4437
|
}
|
|
4408
|
-
}),
|
|
4409
|
-
}),
|
|
4410
|
-
const
|
|
4411
|
-
return Object.entries(m).forEach(([
|
|
4412
|
-
const
|
|
4413
|
-
if (
|
|
4414
|
-
const F = ToCamelCase(
|
|
4415
|
-
|
|
4438
|
+
}), f;
|
|
4439
|
+
}), C = computed(() => {
|
|
4440
|
+
const f = {};
|
|
4441
|
+
return Object.entries(m).forEach(([p, D]) => {
|
|
4442
|
+
const O = ToKebabCase(p);
|
|
4443
|
+
if (O.startsWith("option-") || O.startsWith("on-option-")) {
|
|
4444
|
+
const F = ToCamelCase(O.replace("option-", ""));
|
|
4445
|
+
f[F] = D;
|
|
4416
4446
|
}
|
|
4417
|
-
}),
|
|
4418
|
-
}), l = ref(""),
|
|
4419
|
-
if (!
|
|
4420
|
-
|
|
4447
|
+
}), f;
|
|
4448
|
+
}), l = ref(""), b = toRaw(store.state.dictConfig), T = d, E = (f) => {
|
|
4449
|
+
if (!v.value) {
|
|
4450
|
+
T("dictChange", f);
|
|
4421
4451
|
return;
|
|
4422
4452
|
}
|
|
4423
4453
|
if (!m.multiple && m.multiple !== "") {
|
|
4424
|
-
const
|
|
4425
|
-
|
|
4454
|
+
const p = y.list.find((D) => D[b.format.value] === f);
|
|
4455
|
+
T("dictChange", p);
|
|
4426
4456
|
} else {
|
|
4427
|
-
const
|
|
4428
|
-
|
|
4457
|
+
const p = y.list.filter((D) => f.includes(D[b.format.value]));
|
|
4458
|
+
T("dictChange", p);
|
|
4429
4459
|
}
|
|
4430
|
-
},
|
|
4460
|
+
}, y = reactive({
|
|
4431
4461
|
list: []
|
|
4432
4462
|
}), x = async () => {
|
|
4433
4463
|
if (!s.value || o.value && o.value.length > 0)
|
|
4434
4464
|
return;
|
|
4435
|
-
let
|
|
4465
|
+
let f = [];
|
|
4436
4466
|
if (typeof s.value == "object") {
|
|
4437
4467
|
l.value = s.value.type;
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4440
|
-
const { filters:
|
|
4441
|
-
F ?
|
|
4468
|
+
const p = await store.actions.getDictDataObj(l.value);
|
|
4469
|
+
f = [].concat(p[l.value]);
|
|
4470
|
+
const { filters: D, filterType: O = b.format.value, reverse: F = !1 } = s.value, L = typeof D == "string" ? D.split(",") : D;
|
|
4471
|
+
F ? f = f.filter((P) => !L.includes(P[O])) : f = f.filter((P) => L.includes(P[O]));
|
|
4442
4472
|
} else {
|
|
4443
4473
|
l.value = s.value;
|
|
4444
|
-
const
|
|
4445
|
-
|
|
4474
|
+
const p = await store.actions.getDictDataObj(l.value);
|
|
4475
|
+
f = [].concat(p[l.value]);
|
|
4446
4476
|
}
|
|
4447
|
-
if (w.value && (
|
|
4448
|
-
|
|
4449
|
-
...
|
|
4450
|
-
[
|
|
4477
|
+
if (w.value && (f = w.value(f)), g.value)
|
|
4478
|
+
f = f.map((p) => ({
|
|
4479
|
+
...p,
|
|
4480
|
+
[b.format.disabled]: g.value(p)
|
|
4451
4481
|
}));
|
|
4452
4482
|
else if (c.value) {
|
|
4453
|
-
const { disabledValues:
|
|
4454
|
-
|
|
4455
|
-
const
|
|
4456
|
-
return
|
|
4457
|
-
}) :
|
|
4458
|
-
const
|
|
4459
|
-
return
|
|
4483
|
+
const { disabledValues: p, disabledType: D = b.format.value, reverse: O = !1 } = c.value, F = typeof p == "string" ? p.split(",") : p;
|
|
4484
|
+
O ? f = f.map((L) => {
|
|
4485
|
+
const P = JSON.parse(JSON.stringify(L));
|
|
4486
|
+
return P[b.format.disabled] = !F.includes(P[D]) || P[b.format.disabled], P;
|
|
4487
|
+
}) : f = f.map((L) => {
|
|
4488
|
+
const P = JSON.parse(JSON.stringify(L));
|
|
4489
|
+
return P[b.format.disabled] = F.includes(P[D]) || P[b.format.disabled], P;
|
|
4460
4490
|
});
|
|
4461
4491
|
}
|
|
4462
|
-
n.value && !m.multiple && m.multiple !== "" &&
|
|
4463
|
-
[
|
|
4464
|
-
[
|
|
4465
|
-
}),
|
|
4466
|
-
},
|
|
4492
|
+
n.value && !m.multiple && m.multiple !== "" && f.unshift({
|
|
4493
|
+
[b.format.value]: "",
|
|
4494
|
+
[b.format.label]: n.value
|
|
4495
|
+
}), y.list = f;
|
|
4496
|
+
}, G = computed(() => store.state.isGettingDictTypes.includes(l.value)), A = computed(() => store.state.isGettingAllDictTypes), _ = computed(() => o.value);
|
|
4467
4497
|
watch(
|
|
4468
|
-
[
|
|
4469
|
-
([
|
|
4470
|
-
if (!
|
|
4471
|
-
let
|
|
4472
|
-
|
|
4473
|
-
[
|
|
4474
|
-
[
|
|
4475
|
-
[
|
|
4476
|
-
...
|
|
4477
|
-
})) :
|
|
4478
|
-
[
|
|
4479
|
-
[
|
|
4480
|
-
})), n.value && !m.multiple && m.multiple !== "" &&
|
|
4481
|
-
[
|
|
4482
|
-
[
|
|
4483
|
-
}),
|
|
4498
|
+
[G, A, _],
|
|
4499
|
+
([f, p, D]) => {
|
|
4500
|
+
if (!f && !p && D && D.length === 0 && x(), D.length > 0) {
|
|
4501
|
+
let O = JSON.parse(JSON.stringify(D));
|
|
4502
|
+
O.length > 0 && (Object.prototype.toString.call(O[0]) === "[object Object]" ? O = O.map((L) => ({
|
|
4503
|
+
[b.format.value]: L[i.value.value],
|
|
4504
|
+
[b.format.label]: L[i.value.label],
|
|
4505
|
+
[b.format.disabled]: !!L[i.value.disabled],
|
|
4506
|
+
...L
|
|
4507
|
+
})) : O = O.map((L) => ({
|
|
4508
|
+
[b.format.value]: L,
|
|
4509
|
+
[b.format.label]: L
|
|
4510
|
+
})), n.value && !m.multiple && m.multiple !== "" && O.unshift({
|
|
4511
|
+
[b.format.value]: "",
|
|
4512
|
+
[b.format.label]: n.value
|
|
4513
|
+
}), y.list = O);
|
|
4484
4514
|
}
|
|
4485
4515
|
},
|
|
4486
4516
|
{
|
|
4487
4517
|
immediate: !0
|
|
4488
4518
|
}
|
|
4489
4519
|
);
|
|
4490
|
-
const S = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value,
|
|
4491
|
-
return r({ getElSelectRef:
|
|
4520
|
+
const S = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value, I = ref(null), R = () => I.value, B = ref([]);
|
|
4521
|
+
return r({ getElSelectRef: R, getElOptionRefs: () => B.value }), (f, p) => (openBlock(), createBlock(unref(ElSelect), mergeProps({
|
|
4492
4522
|
ref_key: "ElSelectRef",
|
|
4493
|
-
ref:
|
|
4494
|
-
},
|
|
4523
|
+
ref: I
|
|
4524
|
+
}, k.value, {
|
|
4495
4525
|
"value-on-clear": S,
|
|
4496
4526
|
"empty-values": unref(n) ? [null, void 0] : unref(a),
|
|
4497
|
-
"value-key": unref(
|
|
4527
|
+
"value-key": unref(b).format.value,
|
|
4498
4528
|
onChange: E,
|
|
4499
4529
|
class: unref(m).modelValue === "" && unref(n) ? "no-clear" : "",
|
|
4500
4530
|
"popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] }
|
|
4501
4531
|
}), createSlots({
|
|
4502
4532
|
default: withCtx(() => [
|
|
4503
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4533
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.list, (D) => (openBlock(), createBlock(unref(ElOption), mergeProps({
|
|
4504
4534
|
ref_for: !0,
|
|
4505
|
-
ref: (
|
|
4506
|
-
|
|
4535
|
+
ref: (O) => {
|
|
4536
|
+
O && (B.value[f.index] = O);
|
|
4507
4537
|
},
|
|
4508
|
-
key:
|
|
4509
|
-
disabled:
|
|
4510
|
-
label:
|
|
4511
|
-
value:
|
|
4512
|
-
},
|
|
4538
|
+
key: D[unref(b).format.value],
|
|
4539
|
+
disabled: D[unref(b).format.disabled],
|
|
4540
|
+
label: D[unref(b).format.label],
|
|
4541
|
+
value: D[unref(b).format.value]
|
|
4542
|
+
}, C.value), null, 16, ["disabled", "label", "value"]))), 128))
|
|
4513
4543
|
]),
|
|
4514
4544
|
_: 2
|
|
4515
4545
|
}, [
|
|
4516
|
-
renderList(
|
|
4517
|
-
name:
|
|
4518
|
-
fn: withCtx((
|
|
4519
|
-
renderSlot(
|
|
4546
|
+
renderList(f.$slots, (D, O, F) => ({
|
|
4547
|
+
name: O,
|
|
4548
|
+
fn: withCtx((L) => [
|
|
4549
|
+
renderSlot(f.$slots, O, mergeProps({ key: F }, L))
|
|
4520
4550
|
])
|
|
4521
4551
|
}))
|
|
4522
4552
|
]), 1040, ["empty-values", "value-key", "class"]));
|
|
@@ -4609,28 +4639,28 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4609
4639
|
}
|
|
4610
4640
|
},
|
|
4611
4641
|
setup(e, { expose: r }) {
|
|
4612
|
-
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn:
|
|
4642
|
+
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn: v, formatFunOut: w, spacer: g, maskType: m, maskStart: k, maskEnd: C, maskMiddle: l, maskSymbol: b } = toRefs(t), T = computed(() => {
|
|
4613
4643
|
const S = {};
|
|
4614
|
-
return i.value !== void 0 && i.value !== null && (S.defaultVal = i.value), n.value !== void 0 && n.value !== null && (S.emptyText = n.value), c.value !== void 0 && c.value !== null && (S.formatFun = c.value),
|
|
4644
|
+
return i.value !== void 0 && i.value !== null && (S.defaultVal = i.value), n.value !== void 0 && n.value !== null && (S.emptyText = n.value), c.value !== void 0 && c.value !== null && (S.formatFun = c.value), g.value !== void 0 && g.value !== null && (S.spacer = g.value), S;
|
|
4615
4645
|
}), E = computed(() => {
|
|
4616
4646
|
const S = {};
|
|
4617
|
-
return i.value !== void 0 && i.value !== null && (S.defaultVal = i.value), n.value !== void 0 && n.value !== null && (S.emptyText = n.value),
|
|
4618
|
-
}),
|
|
4647
|
+
return i.value !== void 0 && i.value !== null && (S.defaultVal = i.value), n.value !== void 0 && n.value !== null && (S.emptyText = n.value), v.value !== void 0 && v.value !== null && (S.formatFunIn = v.value), w.value !== void 0 && w.value !== null && (S.formatFunOut = w.value), s.value !== void 0 && s.value !== null && (S.treeSetting = s.value), g.value !== void 0 && g.value !== null && (S.spacer = g.value), S;
|
|
4648
|
+
}), y = computed(() => !!m.value || !!k.value || !!l.value || !!C.value), x = computed(() => {
|
|
4619
4649
|
if (m.value) {
|
|
4620
4650
|
if (Array.isArray(m.value))
|
|
4621
4651
|
return {
|
|
4622
|
-
start:
|
|
4652
|
+
start: k.value || m.value[0] || 0,
|
|
4623
4653
|
middle: l.value || m.value[1] || 0,
|
|
4624
|
-
end:
|
|
4625
|
-
symbol:
|
|
4654
|
+
end: C.value || m.value[2] || 0,
|
|
4655
|
+
symbol: b.value || m.value[3] || "*",
|
|
4626
4656
|
defaultVal: i.value
|
|
4627
4657
|
};
|
|
4628
4658
|
if (typeof m.value == "object") {
|
|
4629
4659
|
const S = {
|
|
4630
|
-
start:
|
|
4660
|
+
start: k.value || 0,
|
|
4631
4661
|
middle: l.value || 0,
|
|
4632
|
-
end:
|
|
4633
|
-
symbol:
|
|
4662
|
+
end: C.value || 0,
|
|
4663
|
+
symbol: b.value || "*",
|
|
4634
4664
|
defaultVal: i.value
|
|
4635
4665
|
};
|
|
4636
4666
|
return Object.assign(S, m.value);
|
|
@@ -4638,57 +4668,57 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4638
4668
|
return m.value;
|
|
4639
4669
|
} else
|
|
4640
4670
|
return {
|
|
4641
|
-
start:
|
|
4671
|
+
start: k.value || 0,
|
|
4642
4672
|
middle: l.value || 0,
|
|
4643
|
-
end:
|
|
4644
|
-
symbol:
|
|
4673
|
+
end: C.value || 0,
|
|
4674
|
+
symbol: b.value || "*",
|
|
4645
4675
|
defaultVal: i.value
|
|
4646
4676
|
};
|
|
4647
|
-
}),
|
|
4648
|
-
return r({ getElTableColumnRef: () => A.value }), (S,
|
|
4677
|
+
}), G = (S, I = {}) => Array.isArray(S) ? S : typeof S == "string" ? S.split(I.spacer || ",") : typeof S == "number" ? [S] : [], A = ref(null);
|
|
4678
|
+
return r({ getElTableColumnRef: () => A.value }), (S, I) => (openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
4649
4679
|
ref_key: "ElTableColumnRef",
|
|
4650
4680
|
ref: A
|
|
4651
4681
|
}, S.$attrs), createSlots({
|
|
4652
|
-
default: withCtx((
|
|
4653
|
-
var
|
|
4682
|
+
default: withCtx((R) => {
|
|
4683
|
+
var B, V, f, p, D, O, F, L, P, z, $, M;
|
|
4654
4684
|
return [
|
|
4655
4685
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4656
|
-
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(
|
|
4657
|
-
key:
|
|
4658
|
-
modelValue:
|
|
4686
|
+
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(G(R.row[(B = unref(d)) == null ? void 0 : B.prop], T.value), (j, J) => (openBlock(), createBlock(_sfc_main$n, {
|
|
4687
|
+
key: J,
|
|
4688
|
+
modelValue: j || "",
|
|
4659
4689
|
dictType: unref(a)
|
|
4660
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(
|
|
4661
|
-
key:
|
|
4662
|
-
modelValue:
|
|
4690
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(G(R.row[(V = unref(d)) == null ? void 0 : V.prop], T.value), (j, J) => (openBlock(), createBlock(_sfc_main$e, {
|
|
4691
|
+
key: J,
|
|
4692
|
+
modelValue: j || "",
|
|
4663
4693
|
dictType: unref(a)
|
|
4664
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(
|
|
4665
|
-
key:
|
|
4666
|
-
modelValue:
|
|
4694
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(G(R.row[(f = unref(d)) == null ? void 0 : f.prop], T.value), (j, J) => (openBlock(), createBlock(_sfc_main$f, {
|
|
4695
|
+
key: J,
|
|
4696
|
+
modelValue: j || "",
|
|
4667
4697
|
dictType: unref(a)
|
|
4668
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(
|
|
4669
|
-
key:
|
|
4670
|
-
modelValue:
|
|
4698
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(G(R.row[(p = unref(d)) == null ? void 0 : p.prop], T.value), (j, J) => (openBlock(), createBlock(_sfc_main$d, {
|
|
4699
|
+
key: J,
|
|
4700
|
+
modelValue: j || "",
|
|
4671
4701
|
dictType: unref(a)
|
|
4672
4702
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4673
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(
|
|
4703
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(R.row[(D = unref(d)) == null ? void 0 : D.prop], unref(a), T.value)), 1)
|
|
4674
4704
|
], 64))
|
|
4675
|
-
], 64)) : unref(u) &&
|
|
4676
|
-
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
4677
|
-
], 64)) : unref(o) &&
|
|
4678
|
-
createTextVNode(toDisplayString(unref(FormatDate)(
|
|
4679
|
-
], 64)) :
|
|
4680
|
-
createTextVNode(toDisplayString(unref(Desensitization)(
|
|
4705
|
+
], 64)) : unref(u) && R.row[(O = unref(d)) == null ? void 0 : O.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4706
|
+
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(R.row[(F = unref(d)) == null ? void 0 : F.prop], unref(u), E.value)), 1)
|
|
4707
|
+
], 64)) : unref(o) && R.row[(L = unref(d)) == null ? void 0 : L.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4708
|
+
createTextVNode(toDisplayString(unref(FormatDate)(R.row[(P = unref(d)) == null ? void 0 : P.prop], unref(o), unref(i))), 1)
|
|
4709
|
+
], 64)) : y.value && R.row[(z = unref(d)) == null ? void 0 : z.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4710
|
+
createTextVNode(toDisplayString(unref(Desensitization)(R.row[($ = unref(d)) == null ? void 0 : $.prop], x.value)), 1)
|
|
4681
4711
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4682
|
-
createTextVNode(toDisplayString(
|
|
4712
|
+
createTextVNode(toDisplayString(R.row[(M = unref(d)) == null ? void 0 : M.prop] || unref(i)), 1)
|
|
4683
4713
|
], 64))
|
|
4684
4714
|
];
|
|
4685
4715
|
}),
|
|
4686
4716
|
_: 2
|
|
4687
4717
|
}, [
|
|
4688
|
-
renderList(S.$slots, (
|
|
4689
|
-
name:
|
|
4690
|
-
fn: withCtx((
|
|
4691
|
-
renderSlot(S.$slots,
|
|
4718
|
+
renderList(S.$slots, (R, B, V) => ({
|
|
4719
|
+
name: B,
|
|
4720
|
+
fn: withCtx((f) => [
|
|
4721
|
+
renderSlot(S.$slots, B, mergeProps({ key: V }, f), void 0, !0)
|
|
4692
4722
|
])
|
|
4693
4723
|
}))
|
|
4694
4724
|
]), 1040));
|
|
@@ -4751,81 +4781,81 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4751
4781
|
},
|
|
4752
4782
|
emits: ["dictChange"],
|
|
4753
4783
|
setup(e, { expose: r, emit: d }) {
|
|
4754
|
-
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue:
|
|
4755
|
-
const
|
|
4756
|
-
return Object.entries(t).forEach(([
|
|
4757
|
-
const
|
|
4758
|
-
if (!
|
|
4759
|
-
const
|
|
4760
|
-
|
|
4784
|
+
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: g } = toRefs(n), m = computed(() => {
|
|
4785
|
+
const B = {};
|
|
4786
|
+
return Object.entries(t).forEach(([V, f]) => {
|
|
4787
|
+
const p = ToKebabCase(V);
|
|
4788
|
+
if (!p.startsWith("tab-pane-") && !p.startsWith("on-tab-pane-")) {
|
|
4789
|
+
const D = ToCamelCase(p);
|
|
4790
|
+
B[D] = f;
|
|
4761
4791
|
}
|
|
4762
|
-
}),
|
|
4763
|
-
}),
|
|
4764
|
-
const
|
|
4765
|
-
return Object.entries(t).forEach(([
|
|
4766
|
-
const
|
|
4767
|
-
if (
|
|
4768
|
-
const
|
|
4769
|
-
|
|
4792
|
+
}), B;
|
|
4793
|
+
}), k = computed(() => {
|
|
4794
|
+
const B = {};
|
|
4795
|
+
return Object.entries(t).forEach(([V, f]) => {
|
|
4796
|
+
const p = ToKebabCase(V);
|
|
4797
|
+
if (p.startsWith("tab-pane-") || p.startsWith("on-tab-pane-")) {
|
|
4798
|
+
const D = ToCamelCase(p.replace("tab-pane-", ""));
|
|
4799
|
+
B[D] = f;
|
|
4770
4800
|
}
|
|
4771
|
-
}),
|
|
4772
|
-
}),
|
|
4801
|
+
}), B;
|
|
4802
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), b = d, T = (B) => {
|
|
4773
4803
|
window.setTimeout(() => {
|
|
4774
|
-
if (!
|
|
4775
|
-
|
|
4804
|
+
if (!v.value) {
|
|
4805
|
+
b("dictChange", t.modelValue);
|
|
4776
4806
|
return;
|
|
4777
4807
|
}
|
|
4778
|
-
const
|
|
4779
|
-
|
|
4808
|
+
const V = E.list.find((f) => f[l.format.value] === t.modelValue);
|
|
4809
|
+
b("dictChange", V);
|
|
4780
4810
|
}, 0);
|
|
4781
4811
|
}, E = reactive({
|
|
4782
4812
|
list: []
|
|
4783
|
-
}),
|
|
4813
|
+
}), y = async () => {
|
|
4784
4814
|
if (!s.value || u.value && u.value.length > 0)
|
|
4785
4815
|
return;
|
|
4786
|
-
let
|
|
4816
|
+
let B = [];
|
|
4787
4817
|
if (typeof s.value == "object") {
|
|
4788
|
-
|
|
4789
|
-
const
|
|
4790
|
-
|
|
4791
|
-
const { filters:
|
|
4792
|
-
|
|
4818
|
+
C.value = s.value.type;
|
|
4819
|
+
const V = await store.actions.getDictDataObj(C.value);
|
|
4820
|
+
B = [].concat(V[C.value]);
|
|
4821
|
+
const { filters: f, filterType: p = l.format.value, reverse: D = !1 } = s.value, O = typeof f == "string" ? f.split(",") : f;
|
|
4822
|
+
D ? B = B.filter((F) => !O.includes(F[p])) : B = B.filter((F) => O.includes(F[p]));
|
|
4793
4823
|
} else {
|
|
4794
|
-
|
|
4795
|
-
const
|
|
4796
|
-
|
|
4824
|
+
C.value = s.value;
|
|
4825
|
+
const V = await store.actions.getDictDataObj(C.value);
|
|
4826
|
+
B = [].concat(V[C.value]);
|
|
4797
4827
|
}
|
|
4798
|
-
if (w.value && (
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
[l.format.disabled]:
|
|
4828
|
+
if (w.value && (B = w.value(B)), g.value)
|
|
4829
|
+
B = B.map((V) => ({
|
|
4830
|
+
...V,
|
|
4831
|
+
[l.format.disabled]: g.value(V)
|
|
4802
4832
|
}));
|
|
4803
4833
|
else if (c.value) {
|
|
4804
|
-
const { disabledValues:
|
|
4805
|
-
|
|
4806
|
-
const F = JSON.parse(JSON.stringify(
|
|
4807
|
-
return F[l.format.disabled] = !
|
|
4808
|
-
}) :
|
|
4809
|
-
const F = JSON.parse(JSON.stringify(
|
|
4810
|
-
return F[l.format.disabled] =
|
|
4834
|
+
const { disabledValues: V, disabledType: f = l.format.value, reverse: p = !1 } = c.value, D = typeof V == "string" ? V.split(",") : V;
|
|
4835
|
+
p ? B = B.map((O) => {
|
|
4836
|
+
const F = JSON.parse(JSON.stringify(O));
|
|
4837
|
+
return F[l.format.disabled] = !D.includes(F[f]) || F[l.format.disabled], F;
|
|
4838
|
+
}) : B = B.map((O) => {
|
|
4839
|
+
const F = JSON.parse(JSON.stringify(O));
|
|
4840
|
+
return F[l.format.disabled] = D.includes(F[f]) || F[l.format.disabled], F;
|
|
4811
4841
|
});
|
|
4812
4842
|
}
|
|
4813
|
-
a.value &&
|
|
4843
|
+
a.value && B.unshift({
|
|
4814
4844
|
[l.format.value]: "",
|
|
4815
4845
|
[l.format.label]: a.value
|
|
4816
|
-
}), E.list =
|
|
4817
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(
|
|
4846
|
+
}), E.list = B;
|
|
4847
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), G = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value);
|
|
4818
4848
|
watch(
|
|
4819
|
-
[x,
|
|
4820
|
-
([
|
|
4821
|
-
!
|
|
4822
|
-
[l.format.value]:
|
|
4823
|
-
[l.format.label]:
|
|
4824
|
-
[l.format.disabled]: !!
|
|
4825
|
-
...
|
|
4826
|
-
})) : E.list = E.list.map((
|
|
4827
|
-
[l.format.value]:
|
|
4828
|
-
[l.format.label]:
|
|
4849
|
+
[x, G, A],
|
|
4850
|
+
([B, V, f]) => {
|
|
4851
|
+
!B && !V && f && f.length === 0 && y(), f.length > 0 && (E.list = JSON.parse(JSON.stringify(f)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((D) => ({
|
|
4852
|
+
[l.format.value]: D[o.value.value],
|
|
4853
|
+
[l.format.label]: D[o.value.label],
|
|
4854
|
+
[l.format.disabled]: !!D[o.value.disabled],
|
|
4855
|
+
...D
|
|
4856
|
+
})) : E.list = E.list.map((D) => ({
|
|
4857
|
+
[l.format.value]: D,
|
|
4858
|
+
[l.format.label]: D
|
|
4829
4859
|
})), a.value && E.list.unshift({
|
|
4830
4860
|
[l.format.value]: "",
|
|
4831
4861
|
[l.format.label]: a.value
|
|
@@ -4835,36 +4865,36 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4835
4865
|
immediate: !0
|
|
4836
4866
|
}
|
|
4837
4867
|
);
|
|
4838
|
-
const
|
|
4839
|
-
return r({ getElTabsRef: S, getElTabPaneRefs: () =>
|
|
4840
|
-
const
|
|
4868
|
+
const _ = ref(null), S = () => _.value, I = ref([]);
|
|
4869
|
+
return r({ getElTabsRef: S, getElTabPaneRefs: () => I.value }), (B, V) => {
|
|
4870
|
+
const f = resolveComponent("el-badge");
|
|
4841
4871
|
return openBlock(), createBlock(unref(ElTabs), mergeProps({
|
|
4842
4872
|
ref_key: "ElTabsRef",
|
|
4843
|
-
ref:
|
|
4873
|
+
ref: _,
|
|
4844
4874
|
class: "vue-element-dict-tabs"
|
|
4845
|
-
}, m.value, { onTabClick:
|
|
4875
|
+
}, m.value, { onTabClick: T }), {
|
|
4846
4876
|
default: withCtx(() => [
|
|
4847
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4877
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (p) => (openBlock(), createBlock(unref(ElTabPane), mergeProps({
|
|
4848
4878
|
ref_for: !0,
|
|
4849
|
-
ref: (
|
|
4850
|
-
|
|
4879
|
+
ref: (D) => {
|
|
4880
|
+
D && (I.value[B.index] = D);
|
|
4851
4881
|
},
|
|
4852
|
-
disabled:
|
|
4853
|
-
label:
|
|
4854
|
-
key:
|
|
4855
|
-
name:
|
|
4856
|
-
},
|
|
4882
|
+
disabled: p[unref(l).format.disabled],
|
|
4883
|
+
label: p[unref(l).format.label],
|
|
4884
|
+
key: p[unref(l).format.value],
|
|
4885
|
+
name: p[unref(l).format.value]
|
|
4886
|
+
}, k.value), createSlots({
|
|
4857
4887
|
default: withCtx(() => [
|
|
4858
|
-
renderSlot(
|
|
4888
|
+
renderSlot(B.$slots, p[unref(l).format.value] ? "tabs-item-" + p[unref(l).format.value] : "tabs-item")
|
|
4859
4889
|
]),
|
|
4860
4890
|
_: 2
|
|
4861
4891
|
}, [
|
|
4862
|
-
unref(i)[
|
|
4892
|
+
unref(i)[p[unref(l).format.value]] ? {
|
|
4863
4893
|
name: "label",
|
|
4864
4894
|
fn: withCtx(() => [
|
|
4865
|
-
createVNode(
|
|
4895
|
+
createVNode(f, mergeProps(unref(i)[p[unref(l).format.value]], { class: "item" }), {
|
|
4866
4896
|
default: withCtx(() => [
|
|
4867
|
-
createTextVNode(toDisplayString(
|
|
4897
|
+
createTextVNode(toDisplayString(p[unref(l).format.label]), 1)
|
|
4868
4898
|
]),
|
|
4869
4899
|
_: 2
|
|
4870
4900
|
}, 1040)
|
|
@@ -4924,97 +4954,97 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4924
4954
|
}
|
|
4925
4955
|
},
|
|
4926
4956
|
setup(e, { expose: r }) {
|
|
4927
|
-
const d = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: u, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), c = toRaw(store.state.dictConfig),
|
|
4957
|
+
const d = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: u, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), c = toRaw(store.state.dictConfig), v = reactive({
|
|
4928
4958
|
list: []
|
|
4929
4959
|
}), w = computed(() => {
|
|
4930
|
-
const
|
|
4931
|
-
valueField: x != null && x.value ? x.value :
|
|
4932
|
-
labelField: x != null && x.label ? x.label :
|
|
4933
|
-
childrenField: x != null && x.children ? x.children :
|
|
4934
|
-
leafField: x != null && x.leaf ? x.leaf :
|
|
4960
|
+
const y = JSON.parse(JSON.stringify(c.treeSetting)), x = d.props || {}, G = {
|
|
4961
|
+
valueField: x != null && x.value ? x.value : y.valueField,
|
|
4962
|
+
labelField: x != null && x.label ? x.label : y.labelField,
|
|
4963
|
+
childrenField: x != null && x.children ? x.children : y.childrenField,
|
|
4964
|
+
leafField: x != null && x.leaf ? x.leaf : y.leafField,
|
|
4935
4965
|
disabled: x != null && x.disabled ? x.disabled : c.format.disabled
|
|
4936
4966
|
};
|
|
4937
|
-
return Object.assign(
|
|
4938
|
-
}),
|
|
4939
|
-
for (let
|
|
4940
|
-
const A =
|
|
4967
|
+
return Object.assign(y, G);
|
|
4968
|
+
}), g = (y, x) => {
|
|
4969
|
+
for (let G = 0; G < y.length; G++) {
|
|
4970
|
+
const A = y[G];
|
|
4941
4971
|
if (A[w.value.levelField] === x) {
|
|
4942
4972
|
delete A[w.value.childrenField], A[w.value.leafField] = !0;
|
|
4943
4973
|
continue;
|
|
4944
4974
|
} else {
|
|
4945
4975
|
const S = A[w.value.childrenField];
|
|
4946
|
-
|
|
4976
|
+
g(S, x);
|
|
4947
4977
|
}
|
|
4948
4978
|
}
|
|
4949
4979
|
}, m = async () => {
|
|
4950
4980
|
if (!a.value)
|
|
4951
4981
|
return;
|
|
4952
|
-
let
|
|
4982
|
+
let y = [];
|
|
4953
4983
|
if (typeof a.value == "object") {
|
|
4954
4984
|
s.value = a.value.type;
|
|
4955
4985
|
const x = await store.actions.getDictDataObj(s.value);
|
|
4956
|
-
|
|
4957
|
-
const { filters:
|
|
4958
|
-
|
|
4986
|
+
y = [].concat(x[s.value]);
|
|
4987
|
+
const { filters: G, filterType: A = c.format.value, reverse: _ = !1 } = a.value, S = typeof G == "string" ? G.split(",") : G;
|
|
4988
|
+
_ ? y = y.filter((I) => !S.includes(I[A])) : y = y.filter((I) => S.includes(I[A]));
|
|
4959
4989
|
} else {
|
|
4960
4990
|
s.value = a.value;
|
|
4961
4991
|
const x = await store.actions.getDictDataObj(s.value);
|
|
4962
|
-
|
|
4992
|
+
y = [].concat(x[s.value]);
|
|
4963
4993
|
}
|
|
4964
|
-
if (o.value && (
|
|
4965
|
-
|
|
4994
|
+
if (o.value && (y = o.value(y)), i.value)
|
|
4995
|
+
y = y.map((x) => ({
|
|
4966
4996
|
...x,
|
|
4967
4997
|
[c.format.disabled]: i.value(x)
|
|
4968
4998
|
}));
|
|
4969
4999
|
else if (u.value) {
|
|
4970
|
-
const { disabledValues: x, disabledType:
|
|
4971
|
-
A ?
|
|
4972
|
-
const
|
|
4973
|
-
return
|
|
4974
|
-
}) :
|
|
4975
|
-
const
|
|
4976
|
-
return
|
|
5000
|
+
const { disabledValues: x, disabledType: G = c.treeSetting.valueField, reverse: A = !1 } = u.value, _ = typeof x == "string" ? x.split(",") : x;
|
|
5001
|
+
A ? y = y.map((S) => {
|
|
5002
|
+
const I = JSON.parse(JSON.stringify(S));
|
|
5003
|
+
return I[c.format.disabled] = !_.includes(I[G]) || I[c.format.disabled], I;
|
|
5004
|
+
}) : y = y.map((S) => {
|
|
5005
|
+
const I = JSON.parse(JSON.stringify(S));
|
|
5006
|
+
return I[c.format.disabled] = _.includes(I[G]) || I[c.format.disabled], I;
|
|
4977
5007
|
});
|
|
4978
5008
|
}
|
|
4979
|
-
|
|
4980
|
-
},
|
|
4981
|
-
const
|
|
5009
|
+
v.list = y;
|
|
5010
|
+
}, k = computed(() => store.state.isGettingDictTypes.includes(s.value)), C = computed(() => store.state.isGettingAllDictTypes), l = computed(() => {
|
|
5011
|
+
const y = store.state.dictConfig.treeSetting, x = store.state.dictConfig.format, G = d.props ?? {};
|
|
4982
5012
|
return {
|
|
4983
|
-
disabled: (
|
|
4984
|
-
label: (
|
|
4985
|
-
children: (
|
|
4986
|
-
isLeaf: (
|
|
5013
|
+
disabled: (G == null ? void 0 : G.disabled) ?? x.disabled,
|
|
5014
|
+
label: (G == null ? void 0 : G.label) ?? y.labelField,
|
|
5015
|
+
children: (G == null ? void 0 : G.children) ?? y.childrenField,
|
|
5016
|
+
isLeaf: (G == null ? void 0 : G.leaf) ?? y.leafField
|
|
4987
5017
|
};
|
|
4988
|
-
}),
|
|
4989
|
-
if (
|
|
5018
|
+
}), b = computed(() => {
|
|
5019
|
+
if (v.list.length === 0)
|
|
4990
5020
|
return [];
|
|
4991
|
-
const
|
|
4992
|
-
id:
|
|
4993
|
-
...
|
|
5021
|
+
const y = JSON.parse(JSON.stringify(v.list)).map((G) => ({
|
|
5022
|
+
id: G[w.value.valueField],
|
|
5023
|
+
...G
|
|
4994
5024
|
}));
|
|
4995
|
-
let x = ListToTree(
|
|
4996
|
-
return n.value &&
|
|
5025
|
+
let x = ListToTree(y, w.value);
|
|
5026
|
+
return n.value && g(x, +n.value), x;
|
|
4997
5027
|
});
|
|
4998
5028
|
watch(
|
|
4999
|
-
[
|
|
5000
|
-
([
|
|
5001
|
-
!
|
|
5029
|
+
[k, C],
|
|
5030
|
+
([y, x]) => {
|
|
5031
|
+
!y && !x && m();
|
|
5002
5032
|
},
|
|
5003
5033
|
{
|
|
5004
5034
|
immediate: !0
|
|
5005
5035
|
}
|
|
5006
5036
|
);
|
|
5007
|
-
const
|
|
5008
|
-
return r({ getElTreeRef: () =>
|
|
5037
|
+
const T = ref(null);
|
|
5038
|
+
return r({ getElTreeRef: () => T.value }), (y, x) => (openBlock(), createBlock(unref(ElTree), mergeProps({
|
|
5009
5039
|
ref_key: "ElTreeRef",
|
|
5010
|
-
ref:
|
|
5011
|
-
data:
|
|
5040
|
+
ref: T,
|
|
5041
|
+
data: b.value,
|
|
5012
5042
|
props: l.value
|
|
5013
|
-
},
|
|
5014
|
-
renderList(
|
|
5043
|
+
}, y.$attrs), createSlots({ _: 2 }, [
|
|
5044
|
+
renderList(y.$slots, (G, A, _) => ({
|
|
5015
5045
|
name: A,
|
|
5016
5046
|
fn: withCtx((S) => [
|
|
5017
|
-
renderSlot(
|
|
5047
|
+
renderSlot(y.$slots, A, mergeProps({ key: _ }, S))
|
|
5018
5048
|
])
|
|
5019
5049
|
}))
|
|
5020
5050
|
]), 1040, ["data", "props"]));
|
|
@@ -5055,85 +5085,85 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5055
5085
|
useAttrs();
|
|
5056
5086
|
const d = e, { maxLevel: t, dictType: n, disabledObj: a, filterDataFun: u, disabledDataFun: o } = toRefs(d), i = ref(""), s = toRaw(store.state.dictConfig), c = reactive({
|
|
5057
5087
|
list: []
|
|
5058
|
-
}),
|
|
5059
|
-
const
|
|
5088
|
+
}), v = computed(() => {
|
|
5089
|
+
const T = {
|
|
5060
5090
|
labelField: "label",
|
|
5061
5091
|
valueField: "value",
|
|
5062
5092
|
childrenField: "children",
|
|
5063
5093
|
leafField: s.treeSetting.leafField
|
|
5064
5094
|
}, E = JSON.parse(JSON.stringify(s.treeSetting));
|
|
5065
|
-
return Object.assign(E,
|
|
5066
|
-
}), w = (
|
|
5067
|
-
for (let
|
|
5068
|
-
const x =
|
|
5069
|
-
if (x[
|
|
5070
|
-
delete x[
|
|
5095
|
+
return Object.assign(E, T);
|
|
5096
|
+
}), w = (T, E) => {
|
|
5097
|
+
for (let y = 0; y < T.length; y++) {
|
|
5098
|
+
const x = T[y];
|
|
5099
|
+
if (x[v.value.levelField] === E) {
|
|
5100
|
+
delete x[v.value.childrenField], x[v.value.leafField] = !0;
|
|
5071
5101
|
continue;
|
|
5072
5102
|
} else {
|
|
5073
|
-
const A = x[
|
|
5103
|
+
const A = x[v.value.childrenField];
|
|
5074
5104
|
w(A, E);
|
|
5075
5105
|
}
|
|
5076
5106
|
}
|
|
5077
|
-
},
|
|
5107
|
+
}, g = async () => {
|
|
5078
5108
|
if (!n.value)
|
|
5079
5109
|
return;
|
|
5080
|
-
let
|
|
5110
|
+
let T = [];
|
|
5081
5111
|
if (typeof n.value == "object") {
|
|
5082
5112
|
i.value = n.value.type;
|
|
5083
5113
|
const E = await store.actions.getDictDataObj(i.value);
|
|
5084
|
-
|
|
5085
|
-
const { filters:
|
|
5086
|
-
|
|
5114
|
+
T = [].concat(E[i.value]);
|
|
5115
|
+
const { filters: y, filterType: x = s.format.value, reverse: G = !1 } = n.value, A = typeof y == "string" ? y.split(",") : y;
|
|
5116
|
+
G ? T = T.filter((_) => !A.includes(_[x])) : T = T.filter((_) => A.includes(_[x]));
|
|
5087
5117
|
} else {
|
|
5088
5118
|
i.value = n.value;
|
|
5089
5119
|
const E = await store.actions.getDictDataObj(i.value);
|
|
5090
|
-
|
|
5120
|
+
T = [].concat(E[i.value]);
|
|
5091
5121
|
}
|
|
5092
|
-
if (u.value && (
|
|
5093
|
-
|
|
5122
|
+
if (u.value && (T = u.value(T)), o.value)
|
|
5123
|
+
T = T.map((E) => ({
|
|
5094
5124
|
...E,
|
|
5095
5125
|
[s.format.disabled]: o.value(E)
|
|
5096
5126
|
}));
|
|
5097
5127
|
else if (a.value) {
|
|
5098
|
-
const { disabledValues: E, disabledType:
|
|
5099
|
-
x ?
|
|
5100
|
-
const
|
|
5101
|
-
return
|
|
5102
|
-
}) :
|
|
5103
|
-
const
|
|
5104
|
-
return
|
|
5128
|
+
const { disabledValues: E, disabledType: y = s.treeSetting.valueField, reverse: x = !1 } = a.value, G = typeof E == "string" ? E.split(",") : E;
|
|
5129
|
+
x ? T = T.map((A) => {
|
|
5130
|
+
const _ = JSON.parse(JSON.stringify(A));
|
|
5131
|
+
return _[s.format.disabled] = !G.includes(_[y]) || _[s.format.disabled], _;
|
|
5132
|
+
}) : T = T.map((A) => {
|
|
5133
|
+
const _ = JSON.parse(JSON.stringify(A));
|
|
5134
|
+
return _[s.format.disabled] = G.includes(_[y]) || _[s.format.disabled], _;
|
|
5105
5135
|
});
|
|
5106
5136
|
}
|
|
5107
|
-
c.list =
|
|
5108
|
-
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)),
|
|
5109
|
-
const
|
|
5110
|
-
label:
|
|
5111
|
-
value:
|
|
5112
|
-
children:
|
|
5113
|
-
...
|
|
5137
|
+
c.list = T;
|
|
5138
|
+
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)), k = computed(() => store.state.isGettingAllDictTypes), C = computed(() => {
|
|
5139
|
+
const T = JSON.parse(JSON.stringify(c.list)).map((y) => ({
|
|
5140
|
+
label: y[v.value.labelField],
|
|
5141
|
+
value: y[v.value.valueField],
|
|
5142
|
+
children: y[v.value.childrenField],
|
|
5143
|
+
...y
|
|
5114
5144
|
}));
|
|
5115
|
-
let E = ListToTree(
|
|
5145
|
+
let E = ListToTree(T, v.value);
|
|
5116
5146
|
return t.value && w(E, +t.value), E;
|
|
5117
5147
|
});
|
|
5118
5148
|
watch(
|
|
5119
|
-
[m,
|
|
5120
|
-
([
|
|
5121
|
-
!
|
|
5149
|
+
[m, k],
|
|
5150
|
+
([T, E]) => {
|
|
5151
|
+
!T && !E && g();
|
|
5122
5152
|
},
|
|
5123
5153
|
{
|
|
5124
5154
|
immediate: !0
|
|
5125
5155
|
}
|
|
5126
5156
|
);
|
|
5127
5157
|
const l = ref(null);
|
|
5128
|
-
return r({ getElTreeSelectRef: () => l.value }), (
|
|
5158
|
+
return r({ getElTreeSelectRef: () => l.value }), (T, E) => (openBlock(), createBlock(unref(ElTreeSelect), mergeProps({
|
|
5129
5159
|
ref_key: "ElTreeSelectRef",
|
|
5130
5160
|
ref: l,
|
|
5131
|
-
data:
|
|
5132
|
-
},
|
|
5133
|
-
renderList(
|
|
5161
|
+
data: C.value
|
|
5162
|
+
}, T.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
5163
|
+
renderList(T.$slots, (y, x, G) => ({
|
|
5134
5164
|
name: x,
|
|
5135
5165
|
fn: withCtx((A) => [
|
|
5136
|
-
renderSlot(
|
|
5166
|
+
renderSlot(T.$slots, x, mergeProps({ key: G }, A))
|
|
5137
5167
|
])
|
|
5138
5168
|
}))
|
|
5139
5169
|
]), 1040, ["data"]));
|
|
@@ -5251,8 +5281,8 @@ async function getDictCodeReq(e, r) {
|
|
|
5251
5281
|
const s = store.state.dictCodes;
|
|
5252
5282
|
o = u;
|
|
5253
5283
|
const c = { ...s };
|
|
5254
|
-
o.forEach((
|
|
5255
|
-
c.hasOwnProperty(
|
|
5284
|
+
o.forEach((v) => {
|
|
5285
|
+
c.hasOwnProperty(v) && delete c[v];
|
|
5256
5286
|
}), store.mutations.SET_DICT_CODES(c), e.storage.setItem(e.dictDataKey, JSON.stringify(c));
|
|
5257
5287
|
} else if (u.length > 0)
|
|
5258
5288
|
for (let s = 0; s < u.length; s++)
|
|
@@ -5263,28 +5293,28 @@ async function getDictCodeReq(e, r) {
|
|
|
5263
5293
|
store.mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
5264
5294
|
const c = await e.getDictCodeApi(e.formatterRequest(e.query, s));
|
|
5265
5295
|
store.mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1);
|
|
5266
|
-
const
|
|
5296
|
+
const v = e.formatterDictList(c, s), w = e.formatterDictVersion(c);
|
|
5267
5297
|
e.storage.setItem(e.versionKey, w);
|
|
5268
|
-
const
|
|
5298
|
+
const g = Object.assign(store.state.dictCodes, v), m = formatDictData(g, e.filterDataFun, e.disabledDataFun, (i = e == null ? void 0 : e.format) == null ? void 0 : i.disabled);
|
|
5269
5299
|
store.mutations.SET_DICT_CODES(m), e.storage.setItem(e.dictDataKey, JSON.stringify(m));
|
|
5270
5300
|
} else if (o.length > 0)
|
|
5271
5301
|
for (let c = 0; c < o.length; c++) {
|
|
5272
|
-
const
|
|
5273
|
-
store.actions.getDictDataObj(
|
|
5302
|
+
const v = o[c];
|
|
5303
|
+
store.actions.getDictDataObj(v);
|
|
5274
5304
|
}
|
|
5275
5305
|
}
|
|
5276
5306
|
}
|
|
5277
5307
|
let vue3ElementDict = {
|
|
5278
5308
|
async install(e, r) {
|
|
5279
|
-
var
|
|
5309
|
+
var g, m;
|
|
5280
5310
|
const d = console.warn;
|
|
5281
|
-
console.warn = (...
|
|
5282
|
-
const
|
|
5283
|
-
|
|
5311
|
+
console.warn = (...k) => {
|
|
5312
|
+
const C = typeof k[0] == "string" ? k[0] : "";
|
|
5313
|
+
C.includes("formItemContextKey") || C.includes("formContextKey") || d.apply(console, k);
|
|
5284
5314
|
};
|
|
5285
5315
|
const t = e.config.warnHandler;
|
|
5286
|
-
e.config.warnHandler = (
|
|
5287
|
-
typeof
|
|
5316
|
+
e.config.warnHandler = (k, C, l) => {
|
|
5317
|
+
typeof k == "string" && (k.includes("formItemContextKey") || k.includes("formContextKey")) || t == null || t(k, C, l);
|
|
5288
5318
|
};
|
|
5289
5319
|
const n = {
|
|
5290
5320
|
timeout: 3e4,
|
|
@@ -5322,9 +5352,9 @@ let vue3ElementDict = {
|
|
|
5322
5352
|
getLoginStatusFunc: () => !0,
|
|
5323
5353
|
loginStatusChangeFunc: null,
|
|
5324
5354
|
//组件过滤数据 配置
|
|
5325
|
-
filterDataFun: (
|
|
5355
|
+
filterDataFun: (k) => k,
|
|
5326
5356
|
//组件禁用数据 配置
|
|
5327
|
-
disabledDataFun: (
|
|
5357
|
+
disabledDataFun: (k) => !1,
|
|
5328
5358
|
//配置数组数据转化成树形数据
|
|
5329
5359
|
treeSetting: {
|
|
5330
5360
|
idField: "id",
|
|
@@ -5360,9 +5390,9 @@ let vue3ElementDict = {
|
|
|
5360
5390
|
type: "type",
|
|
5361
5391
|
color: "color"
|
|
5362
5392
|
},
|
|
5363
|
-
formatterRequest: (
|
|
5364
|
-
formatterDictList: (
|
|
5365
|
-
formatterDictVersion: (
|
|
5393
|
+
formatterRequest: (k, C) => C ? { [k]: C } : { [k]: "" },
|
|
5394
|
+
formatterDictList: (k, C) => !k || !k.dictData ? {} : k.dictData,
|
|
5395
|
+
formatterDictVersion: (k) => !k || !k.version ? "unknow" : k.version,
|
|
5366
5396
|
version: "unknow",
|
|
5367
5397
|
storage: localStorage,
|
|
5368
5398
|
isGetAll: !1,
|
|
@@ -5376,42 +5406,42 @@ let vue3ElementDict = {
|
|
|
5376
5406
|
store.mutations.SET_DICT_SETTING(a);
|
|
5377
5407
|
let u = {};
|
|
5378
5408
|
try {
|
|
5379
|
-
const
|
|
5380
|
-
u =
|
|
5381
|
-
} catch (
|
|
5382
|
-
u = {}, console.log(
|
|
5409
|
+
const k = a.storage.getItem(a.dictDataKey);
|
|
5410
|
+
u = k ? JSON.parse(k) : {};
|
|
5411
|
+
} catch (k) {
|
|
5412
|
+
u = {}, console.log(k);
|
|
5383
5413
|
}
|
|
5384
5414
|
let o = JSON.parse(JSON.stringify(a.localDictCodes));
|
|
5385
5415
|
o = Object.assign(u, o);
|
|
5386
|
-
const i = formatDictData(o, a.filterDataFun, a.disabledDataFun, (
|
|
5416
|
+
const i = formatDictData(o, a.filterDataFun, a.disabledDataFun, (g = a == null ? void 0 : a.format) == null ? void 0 : g.disabled);
|
|
5387
5417
|
a.storage.setItem(a.dictDataKey, JSON.stringify(i)), store.mutations.SET_DICT_CODES(i);
|
|
5388
5418
|
const s = a.storage.getItem(a.versionKey);
|
|
5389
5419
|
let c = a.usuallyGetDictTypes ? a.usuallyGetDictTypes.split(",") : [];
|
|
5390
5420
|
if (a.version !== s) {
|
|
5391
|
-
const
|
|
5392
|
-
let
|
|
5421
|
+
const k = a.storage.getItem(a.dictDataKey);
|
|
5422
|
+
let C = {};
|
|
5393
5423
|
try {
|
|
5394
|
-
|
|
5424
|
+
C = k ? JSON.parse(k) : {};
|
|
5395
5425
|
} catch {
|
|
5396
|
-
|
|
5426
|
+
C = {}, console.error();
|
|
5397
5427
|
}
|
|
5398
|
-
const l =
|
|
5428
|
+
const l = C ? Object.keys(C) : [], b = a.localDictCodes ? Object.keys(a.localDictCodes) : [], T = l.filter((G) => !b.includes(G)), E = [...c, ...T];
|
|
5399
5429
|
c = [...new Set(E)], a.storage.removeItem(a.dictDataKey), a.storage.setItem(a.versionKey, a.version);
|
|
5400
|
-
const
|
|
5430
|
+
const y = JSON.parse(JSON.stringify(a.localDictCodes)), x = formatDictData(y, a.filterDataFun, a.disabledDataFun, (m = a == null ? void 0 : a.format) == null ? void 0 : m.disabled);
|
|
5401
5431
|
a.storage.setItem(a.dictDataKey, JSON.stringify(x)), store.mutations.SET_DICT_CODES(x);
|
|
5402
5432
|
}
|
|
5403
|
-
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((
|
|
5404
|
-
const
|
|
5405
|
-
e.component(l,
|
|
5433
|
+
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((k) => {
|
|
5434
|
+
const C = k.name.slice(4), l = a.componentsPreFix + C;
|
|
5435
|
+
e.component(l, k);
|
|
5406
5436
|
});
|
|
5407
|
-
const
|
|
5437
|
+
const v = reactive({
|
|
5408
5438
|
hadLogin: computed(() => store.state.dictConfig.getLoginStatusFunc())
|
|
5409
5439
|
});
|
|
5410
5440
|
(() => {
|
|
5411
5441
|
loginWatcher && (loginWatcher(), loginWatcher = null), loginWatcher = watch(
|
|
5412
|
-
() =>
|
|
5413
|
-
(
|
|
5414
|
-
a.loginStatusChangeFunc && a.loginStatusChangeFunc(
|
|
5442
|
+
() => v.hadLogin,
|
|
5443
|
+
(k) => {
|
|
5444
|
+
a.loginStatusChangeFunc && a.loginStatusChangeFunc(k), k && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c);
|
|
5415
5445
|
},
|
|
5416
5446
|
{ immediate: !1 }
|
|
5417
5447
|
);
|