vue3-element-dict 3.2.2 → 3.2.3
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 +4 -0
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +1124 -1120
- 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 = (
|
|
14
|
+
const r = (D) => {
|
|
15
15
|
const C = /* @__PURE__ */ new Set(), l = /\$\{(\w+)\}/g;
|
|
16
16
|
let y;
|
|
17
|
-
for (; (y = l.exec(
|
|
17
|
+
for (; (y = l.exec(D)) !== null; )
|
|
18
18
|
C.add(y[1]);
|
|
19
19
|
return Array.from(C);
|
|
20
|
-
}, d = (
|
|
20
|
+
}, d = (D) => {
|
|
21
21
|
const C = /* @__PURE__ */ new Set(), l = (y) => {
|
|
22
22
|
typeof y == "string" ? r(y).forEach((v) => C.add(v)) : Array.isArray(y) ? y.forEach(l) : y && typeof y == "object" && Object.values(y).forEach(l);
|
|
23
23
|
};
|
|
24
|
-
return l(
|
|
25
|
-
}, t = (
|
|
26
|
-
const { showRuleType: C, showRules: l } =
|
|
24
|
+
return l(D), Array.from(C);
|
|
25
|
+
}, t = (D) => {
|
|
26
|
+
const { showRuleType: C, showRules: l } = D, y = /* @__PURE__ */ new Set();
|
|
27
27
|
return l == null ? [] : (C === "validate" ? typeof l == "string" ? y.add(l) : Array.isArray(l) && l.forEach((v) => {
|
|
28
28
|
typeof v == "string" && y.add(v);
|
|
29
29
|
}) : ["compare", "calculate", ""].includes(C) ? d(l).forEach((v) => y.add(v)) : typeof C == "string" && Array.isArray(l) && l.forEach((v) => {
|
|
30
30
|
v && typeof v == "object" && "rules" in v && d(v.rules).forEach((E) => y.add(E));
|
|
31
31
|
}), Array.from(y));
|
|
32
|
-
}, n = (
|
|
33
|
-
const { validatorRuleType: C, props: l } =
|
|
32
|
+
}, n = (D) => {
|
|
33
|
+
const { validatorRuleType: C, props: l } = D, y = /* @__PURE__ */ new Set();
|
|
34
34
|
return l != null && l.rules ? (l.rules.forEach((v) => {
|
|
35
35
|
if (!(v != null && v.validator))
|
|
36
36
|
return;
|
|
37
37
|
const E = v.validator;
|
|
38
|
-
E != null && (["compare", "calculate", "", void 0].includes(C) ? d(E).forEach((
|
|
39
|
-
|
|
38
|
+
E != null && (["compare", "calculate", "", void 0].includes(C) ? d(E).forEach((T) => y.add(T)) : typeof C == "string" && Array.isArray(E) && E.forEach((T) => {
|
|
39
|
+
T && typeof T == "object" && "rules" in T && d(T.rules).forEach((x) => y.add(x));
|
|
40
40
|
}));
|
|
41
41
|
}), Array.from(y)) : [];
|
|
42
42
|
}, a = /* @__PURE__ */ new Map();
|
|
43
|
-
e.forEach((
|
|
44
|
-
|
|
43
|
+
e.forEach((D) => {
|
|
44
|
+
D.fieldName && D.id && a.set(D.fieldName, D.id);
|
|
45
45
|
});
|
|
46
|
-
const u = e.map((
|
|
47
|
-
const C = t(
|
|
46
|
+
const u = e.map((D) => {
|
|
47
|
+
const C = t(D), l = n(D), v = [.../* @__PURE__ */ new Set([...C, ...l])].map((E) => a.get(E)).filter((E) => E !== void 0 && e.some((T) => T.id === E));
|
|
48
48
|
return {
|
|
49
|
-
id:
|
|
50
|
-
component:
|
|
49
|
+
id: D.id,
|
|
50
|
+
component: D,
|
|
51
51
|
depsIds: v
|
|
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((D) => D.id)), i = /* @__PURE__ */ new Map();
|
|
55
|
+
u.forEach(({ id: D }, C) => {
|
|
56
|
+
i.set(D, C);
|
|
57
57
|
});
|
|
58
58
|
const s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
59
|
-
o.forEach((
|
|
60
|
-
s.set(
|
|
61
|
-
}), u.forEach(({ id:
|
|
59
|
+
o.forEach((D) => {
|
|
60
|
+
s.set(D, []), c.set(D, 0);
|
|
61
|
+
}), u.forEach(({ id: D, depsIds: C }) => {
|
|
62
62
|
C.forEach((l) => {
|
|
63
|
-
s.get(l).push(
|
|
63
|
+
s.get(l).push(D), c.set(D, c.get(D) + 1);
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
-
const
|
|
67
|
-
for (;
|
|
68
|
-
const
|
|
69
|
-
w.push(
|
|
66
|
+
const g = [...o].filter((D) => c.get(D) === 0).sort((D, C) => i.get(D) - i.get(C)), w = [];
|
|
67
|
+
for (; g.length > 0; ) {
|
|
68
|
+
const D = g.shift();
|
|
69
|
+
w.push(D), s.get(D).forEach((C) => {
|
|
70
70
|
if (c.set(C, c.get(C) - 1), c.get(C) === 0) {
|
|
71
|
-
const l =
|
|
72
|
-
l === -1 ?
|
|
71
|
+
const l = g.findIndex((y) => i.get(y) > i.get(C));
|
|
72
|
+
l === -1 ? g.push(C) : g.splice(l, 0, C);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const b = [...o].filter((
|
|
77
|
-
b.sort((
|
|
78
|
-
const
|
|
79
|
-
return w.map((
|
|
76
|
+
const b = [...o].filter((D) => !w.includes(D));
|
|
77
|
+
b.sort((D, C) => i.get(D) - i.get(C)), w.push(...b);
|
|
78
|
+
const m = new Map(e.map((D) => [D.id, D]));
|
|
79
|
+
return w.map((D) => m.get(D));
|
|
80
80
|
}
|
|
81
81
|
const state = reactive({
|
|
82
82
|
//超时时间
|
|
@@ -218,42 +218,42 @@ const actions = {
|
|
|
218
218
|
formatterRequest: i,
|
|
219
219
|
query: s,
|
|
220
220
|
versionKey: c,
|
|
221
|
-
localDictCodes:
|
|
221
|
+
localDictCodes: g,
|
|
222
222
|
formatterDictList: w,
|
|
223
223
|
formatterDictVersion: b,
|
|
224
|
-
isGetAll:
|
|
225
|
-
filterDataFun:
|
|
224
|
+
isGetAll: m,
|
|
225
|
+
filterDataFun: D,
|
|
226
226
|
disabledDataFun: C,
|
|
227
227
|
format: l
|
|
228
|
-
} = state.dictConfig, y = state.dictCodes ||
|
|
228
|
+
} = state.dictConfig, y = state.dictCodes || g, v = !t && t !== 0 ? e : state.isGettingDictTypes.join(",");
|
|
229
229
|
u(i(s, v)).then((E) => {
|
|
230
230
|
mutations.REMOVE_IS_GETTING_DICT_TYPES(v);
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
231
|
+
const T = b(E), x = n.getItem(c);
|
|
232
|
+
if (T !== x) {
|
|
233
233
|
let I = "";
|
|
234
|
-
if (
|
|
234
|
+
if (m)
|
|
235
235
|
I = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
236
236
|
else {
|
|
237
237
|
if (o) {
|
|
238
|
-
const
|
|
239
|
-
let
|
|
240
|
-
|
|
238
|
+
const j = Object.keys(y), S = o.split(","), F = Object.keys(g), L = j.filter((f) => !F.includes(f)), N = S.filter((f) => F.includes(f) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${f}冲突`), !1) : !0);
|
|
239
|
+
let _ = L.concat(N);
|
|
240
|
+
_ = _.concat(v.split(",")), I = Array.from(new Set(_)).join(",");
|
|
241
241
|
} else {
|
|
242
|
-
const
|
|
243
|
-
let
|
|
244
|
-
|
|
242
|
+
const j = Object.keys(y), S = Object.keys(g);
|
|
243
|
+
let F = j.filter((N) => !S.includes(N));
|
|
244
|
+
F = F.concat(v.split(",")), I = Array.from(new Set(F)).join(",");
|
|
245
245
|
}
|
|
246
246
|
mutations.ADD_IS_GETTING_DICT_TYPES(I);
|
|
247
247
|
}
|
|
248
|
-
u(i(s, I)).then((
|
|
249
|
-
const S = w(
|
|
248
|
+
u(i(s, I)).then((j) => {
|
|
249
|
+
const S = w(j, e);
|
|
250
250
|
if (!(S[e] && S[e].length > 0)) {
|
|
251
251
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
mutations.REMOVE_UNFIND_DICT_TYPES(v);
|
|
255
|
-
const
|
|
256
|
-
n.setItem(a, JSON.stringify(
|
|
255
|
+
const F = b(j), L = Object.assign(JSON.parse(JSON.stringify(g)), S), N = formatDictData(L, D, C, l == null ? void 0 : l.disabled);
|
|
256
|
+
n.setItem(a, JSON.stringify(N)), n.setItem(c, F), mutations.SET_DICT_CODES(N), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(I);
|
|
257
257
|
});
|
|
258
258
|
} else {
|
|
259
259
|
const I = w(E, e);
|
|
@@ -262,8 +262,8 @@ const actions = {
|
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
mutations.REMOVE_UNFIND_DICT_TYPES(v);
|
|
265
|
-
const
|
|
266
|
-
Object.assign(
|
|
265
|
+
const j = state.dictCodes || g, S = formatDictData(I, D, C, l == null ? void 0 : l.disabled);
|
|
266
|
+
Object.assign(j, S), n.setItem(a, JSON.stringify(j)), mutations.SET_DICT_CODES(j), 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 g = o.find((w) => w[a.value] === e);
|
|
291
|
+
t(g ? g[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, g = Date.now(), w = window.setInterval(() => {
|
|
335
|
+
if (Date.now() - g > c) {
|
|
336
336
|
clearInterval(w), a("getLabelByCodes获取字典数据超时");
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
@@ -351,7 +351,7 @@ const GetLabelByCodes = (e, r, d) => {
|
|
|
351
351
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const g = 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
|
+
g && g.length > 0 ? t.formatFun(g, 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 g = o.find((w) => w[a.label] === e);
|
|
395
|
+
t(g ? g[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, g = Date.now(), w = window.setInterval(() => {
|
|
438
|
+
if (Date.now() - g > c) {
|
|
439
439
|
clearInterval(w), a("getCodeByLabels获取字典数据超时");
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
@@ -454,14 +454,14 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
454
454
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const g = GetCodeByLabelsDothings(
|
|
458
458
|
u,
|
|
459
459
|
s,
|
|
460
460
|
o,
|
|
461
461
|
t.defaultVal
|
|
462
462
|
);
|
|
463
463
|
n(
|
|
464
|
-
|
|
464
|
+
g && g.length > 0 ? t.formatFun(g, 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((g) => t.includes(g))) {
|
|
497
497
|
clearInterval(s);
|
|
498
|
-
for (let
|
|
499
|
-
const w = u[
|
|
498
|
+
for (let g = 0; g < u.length; g++) {
|
|
499
|
+
const w = u[g];
|
|
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 g = o.find((w) => w[a.value] === e);
|
|
523
|
+
t(g || (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: g, color: w, judgeDisabledFun: b, disabled: m } = toRefs(t), D = toRaw(store.state.dictConfig), C = d, l = useAttrs(), y = computed(() => s.value ? s.value(o.value) : c.value ? c.value : T.value && T.value[D.format.type] ? T.value[D.format.type] : "primary"), v = computed(() => g != null && g.value ? g.value(o.value) : w != null && w.value ? w.value : T.value && T.value[D.format.color] ? T.value[D.format.color] : ""), E = computed(() => b.value ? b.value(o.value) : T.value && T.value[D.format.disabled] ? T.value[D.format.disabled] : !!m.value);
|
|
589
|
+
let T = 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
|
-
GetItemByCode(o.value, i.value).then((
|
|
596
|
-
|
|
595
|
+
GetItemByCode(o.value, i.value).then((F) => {
|
|
596
|
+
F ? (T.value = F, x.value = F[D.format.label]) : (T.value = null, x.value = String(a.value ?? (o.value === 0 ? 0 : o.value || u.value)));
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
const I = () => {
|
|
600
600
|
E.value || C(n.value, l);
|
|
601
|
-
},
|
|
602
|
-
return r({ getElButtonRef: () =>
|
|
601
|
+
}, j = ref(null);
|
|
602
|
+
return r({ getElButtonRef: () => j.value }), (F, L) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
603
603
|
ref_key: "ElButtonRef",
|
|
604
|
-
ref:
|
|
604
|
+
ref: j,
|
|
605
605
|
type: y.value,
|
|
606
606
|
color: v.value,
|
|
607
607
|
disabled: E.value
|
|
608
|
-
},
|
|
608
|
+
}, F.$attrs, { onClick: I }), createSlots({
|
|
609
609
|
default: withCtx(() => [
|
|
610
610
|
createTextVNode(toDisplayString(unref(x)), 1)
|
|
611
611
|
]),
|
|
612
612
|
_: 2
|
|
613
613
|
}, [
|
|
614
|
-
renderList(
|
|
615
|
-
name:
|
|
614
|
+
renderList(F.$slots, (N, _, A) => ({
|
|
615
|
+
name: _,
|
|
616
616
|
fn: withCtx((f) => [
|
|
617
|
-
renderSlot(
|
|
617
|
+
renderSlot(F.$slots, _, mergeProps({ key: A }, f))
|
|
618
618
|
])
|
|
619
619
|
}))
|
|
620
620
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -753,25 +753,25 @@ function CheckConditionsByOperation(e, r) {
|
|
|
753
753
|
return d;
|
|
754
754
|
}
|
|
755
755
|
function ValidateNestedRule(e, r) {
|
|
756
|
-
var
|
|
756
|
+
var g, w;
|
|
757
757
|
const d = {
|
|
758
|
-
"+": (b,
|
|
759
|
-
"-": (b,
|
|
760
|
-
"*": (b,
|
|
761
|
-
"/": (b,
|
|
762
|
-
"%": (b,
|
|
763
|
-
"**": (b,
|
|
758
|
+
"+": (b, m) => b + m,
|
|
759
|
+
"-": (b, m) => b - m,
|
|
760
|
+
"*": (b, m) => b * m,
|
|
761
|
+
"/": (b, m) => m !== 0 ? b / m : NaN,
|
|
762
|
+
"%": (b, m) => m !== 0 ? b % m : NaN,
|
|
763
|
+
"**": (b, m) => b ** m
|
|
764
764
|
}, t = {
|
|
765
|
-
">": (b,
|
|
766
|
-
"<": (b,
|
|
767
|
-
">=": (b,
|
|
768
|
-
"<=": (b,
|
|
769
|
-
"==": (b,
|
|
770
|
-
"!=": (b,
|
|
771
|
-
"===": (b,
|
|
772
|
-
"!==": (b,
|
|
773
|
-
}, n = (b,
|
|
774
|
-
const
|
|
765
|
+
">": (b, m) => b > m,
|
|
766
|
+
"<": (b, m) => b < m,
|
|
767
|
+
">=": (b, m) => b >= m,
|
|
768
|
+
"<=": (b, m) => b <= m,
|
|
769
|
+
"==": (b, m) => b == m,
|
|
770
|
+
"!=": (b, m) => b != m,
|
|
771
|
+
"===": (b, m) => b === m,
|
|
772
|
+
"!==": (b, m) => b !== m
|
|
773
|
+
}, n = (b, m) => {
|
|
774
|
+
const D = (C) => {
|
|
775
775
|
if (C instanceof Date)
|
|
776
776
|
return C.getTime();
|
|
777
777
|
if (typeof C == "string" && /^\d{4}[-/]\d{2}[-/]\d{2}(?:\s+\d{2}:\d{2}:\d{2})?$/.test(C)) {
|
|
@@ -783,32 +783,32 @@ function ValidateNestedRule(e, r) {
|
|
|
783
783
|
};
|
|
784
784
|
if (typeof b == "string" && /^\$\{(.+?)\}$/.test(b)) {
|
|
785
785
|
const l = b.match(/^\$\{(.+?)\}$/)[1].trim().split(".").filter(Boolean);
|
|
786
|
-
let y = getNestedValue(
|
|
786
|
+
let y = getNestedValue(m, l);
|
|
787
787
|
if (y == null)
|
|
788
788
|
return "";
|
|
789
|
-
if (y =
|
|
789
|
+
if (y = D(y), typeof y == "string") {
|
|
790
790
|
const v = y.trim();
|
|
791
791
|
return /^-?\d+(\.\d+)?$/.test(v) ? Number(v) : v;
|
|
792
792
|
}
|
|
793
793
|
return y;
|
|
794
794
|
}
|
|
795
795
|
return typeof b == "string" && /^-?\d+(\.\d+)?$/.test(b) ? Number(b) : b;
|
|
796
|
-
}, a = (b,
|
|
797
|
-
var
|
|
796
|
+
}, a = (b, m) => {
|
|
797
|
+
var D;
|
|
798
798
|
if (Array.isArray(b)) {
|
|
799
|
-
let C = Array.isArray(b[0]) ? a(b[0],
|
|
799
|
+
let C = Array.isArray(b[0]) ? a(b[0], m) : n(b[0], m);
|
|
800
800
|
for (let l = 1; l < b.length; l += 2) {
|
|
801
|
-
const y = b[l], v = b[l + 1], E = Array.isArray(v) ? a(v,
|
|
802
|
-
C = ((
|
|
801
|
+
const y = b[l], v = b[l + 1], E = Array.isArray(v) ? a(v, m) : n(v, m), T = typeof C == "number" ? C : NaN, x = typeof E == "number" ? E : NaN;
|
|
802
|
+
C = ((D = d[y]) == null ? void 0 : D.call(d, T, x)) ?? NaN;
|
|
803
803
|
}
|
|
804
804
|
return C;
|
|
805
805
|
}
|
|
806
|
-
return n(b,
|
|
806
|
+
return n(b, 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" ? ((g = t[u]) == null ? void 0 : g.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,23 +927,23 @@ 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 g = Object.keys(c), w = g.join(", ");
|
|
931
|
+
return new Function(w, `return (${s});`)(...g.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,
|
|
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, g]) => !!g).map(([c]) => c).join(" ") : "", u = (s, c) => {
|
|
936
936
|
const w = new DOMParser().parseFromString(s, "text/html"), b = w.getElementsByTagName("*");
|
|
937
|
-
return Array.from(b).forEach((
|
|
938
|
-
Array.from(
|
|
937
|
+
return Array.from(b).forEach((m) => {
|
|
938
|
+
Array.from(m.attributes).forEach((D) => {
|
|
939
939
|
let C;
|
|
940
|
-
if (
|
|
941
|
-
C =
|
|
942
|
-
else if (
|
|
943
|
-
C =
|
|
940
|
+
if (D.name.startsWith(":"))
|
|
941
|
+
C = D.name.slice(1);
|
|
942
|
+
else if (D.name.startsWith("v-bind:"))
|
|
943
|
+
C = D.name.slice(7);
|
|
944
944
|
else
|
|
945
945
|
return;
|
|
946
|
-
const l =
|
|
946
|
+
const l = D.value;
|
|
947
947
|
let y;
|
|
948
948
|
try {
|
|
949
949
|
y = n(l, c);
|
|
@@ -951,17 +951,17 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
951
951
|
console.error(`v-bind表达式错误: ${l}`, v), y = "";
|
|
952
952
|
}
|
|
953
953
|
if (y == null)
|
|
954
|
-
|
|
954
|
+
m.removeAttribute(C);
|
|
955
955
|
else {
|
|
956
956
|
const v = C === "class" ? a(y) : String(y);
|
|
957
|
-
|
|
957
|
+
m.setAttribute(C, v);
|
|
958
958
|
}
|
|
959
|
-
|
|
959
|
+
m.removeAttribute(D.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, (g, w) => n(w, c)), i = (s, c) => {
|
|
963
|
+
const g = o(s, c);
|
|
964
|
+
return u(g, c);
|
|
965
965
|
};
|
|
966
966
|
return watch(
|
|
967
967
|
() => [r.render, r.scope, r.formData],
|
|
@@ -1023,68 +1023,68 @@ 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:
|
|
1026
|
+
const t = d, n = e, { defaultVal: a, emptyText: u, dictType: o, disabledObj: i, filterDataFun: s, disabledDataFun: c, list: g, col: w, gap: b } = toRefs(n), m = toRaw(store.state.dictConfig), D = useAttrs();
|
|
1027
1027
|
let C = ref("");
|
|
1028
1028
|
const l = computed(() => {
|
|
1029
|
-
const
|
|
1030
|
-
return Object.entries(
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
const k = ToCamelCase(
|
|
1034
|
-
|
|
1029
|
+
const _ = {};
|
|
1030
|
+
return Object.entries(D).forEach(([A, f]) => {
|
|
1031
|
+
const p = ToKebabCase(A);
|
|
1032
|
+
if (p.startsWith("button-") || p.startsWith("on-button")) {
|
|
1033
|
+
const k = ToCamelCase(p.replace("button-", ""));
|
|
1034
|
+
_[k] = f;
|
|
1035
1035
|
}
|
|
1036
|
-
}),
|
|
1036
|
+
}), _;
|
|
1037
1037
|
}), y = computed(() => {
|
|
1038
|
-
const
|
|
1039
|
-
return `calc(${
|
|
1038
|
+
const _ = Number(w.value), A = 100 / _, f = Array.isArray(b.value) ? b.value : String(b.value).split(" "), p = f[0], O = (f[1] || p) * (_ - 1) / _;
|
|
1039
|
+
return `calc(${A}% - ${O}px) !important`;
|
|
1040
1040
|
}), v = computed(() => {
|
|
1041
|
-
const
|
|
1042
|
-
return `${
|
|
1041
|
+
const _ = Array.isArray(b.value) ? b.value : String(b.value).split(" "), A = _[0], f = _[1] || A;
|
|
1042
|
+
return `${A}px ${f}px`;
|
|
1043
1043
|
});
|
|
1044
|
-
function E(
|
|
1044
|
+
function E(_) {
|
|
1045
1045
|
return {
|
|
1046
1046
|
...l.value,
|
|
1047
|
-
...
|
|
1047
|
+
..._
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const T = ref([]), x = async () => {
|
|
1051
1051
|
if (!o.value)
|
|
1052
1052
|
return;
|
|
1053
|
-
let
|
|
1053
|
+
let _ = [];
|
|
1054
1054
|
if (typeof o.value == "object") {
|
|
1055
1055
|
C.value = o.value.type;
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const { filters: f, filterType:
|
|
1059
|
-
k ?
|
|
1056
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
1057
|
+
_ = [].concat(A[C.value]);
|
|
1058
|
+
const { filters: f, filterType: p = m.format.value, reverse: k = !1 } = o.value, O = typeof f == "string" ? f.split(",") : f;
|
|
1059
|
+
k ? _ = _.filter((B) => !O.includes(B[p])) : _ = _.filter((B) => O.includes(B[p]));
|
|
1060
1060
|
} else {
|
|
1061
1061
|
C.value = o.value;
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1062
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
1063
|
+
_ = [].concat(A[C.value]);
|
|
1064
1064
|
}
|
|
1065
|
-
if (s.value && (
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
[
|
|
1065
|
+
if (s.value && (_ = s.value(_)), c.value)
|
|
1066
|
+
_ = _.map((A) => ({
|
|
1067
|
+
...A,
|
|
1068
|
+
[m.format.disabled]: c.value(A)
|
|
1069
1069
|
}));
|
|
1070
1070
|
else if (i.value) {
|
|
1071
|
-
const { disabledValues:
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1075
|
-
}) :
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
1071
|
+
const { disabledValues: A, disabledType: f = m.format.value, reverse: p = !1 } = i.value, k = typeof A == "string" ? A.split(",") : A;
|
|
1072
|
+
p ? _ = _.map((O) => {
|
|
1073
|
+
const B = JSON.parse(JSON.stringify(O));
|
|
1074
|
+
return B[m.format.disabled] = !k.includes(B[f]) || B[m.format.disabled], B;
|
|
1075
|
+
}) : _ = _.map((O) => {
|
|
1076
|
+
const B = JSON.parse(JSON.stringify(O));
|
|
1077
|
+
return B[m.format.disabled] = k.includes(B[f]) || B[m.format.disabled], B;
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
|
|
1081
|
-
type:
|
|
1082
|
-
label:
|
|
1083
|
-
color:
|
|
1084
|
-
icon:
|
|
1085
|
-
disabled:
|
|
1080
|
+
T.value = _.map((A) => ({
|
|
1081
|
+
type: A[m.format.type],
|
|
1082
|
+
label: A[m.format.label],
|
|
1083
|
+
color: A[m.format.color],
|
|
1084
|
+
icon: A[m.format.icon],
|
|
1085
|
+
disabled: A[m.format.disabled],
|
|
1086
1086
|
actionType: "submit",
|
|
1087
|
-
|
|
1087
|
+
...A
|
|
1088
1088
|
}));
|
|
1089
1089
|
};
|
|
1090
1090
|
async function I() {
|
|
@@ -1092,18 +1092,18 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1092
1092
|
x();
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
let
|
|
1096
|
-
for (let
|
|
1097
|
-
const f =
|
|
1095
|
+
let _ = [];
|
|
1096
|
+
for (let A = 0; A < g.value.length; A++) {
|
|
1097
|
+
const f = g.value[A];
|
|
1098
1098
|
if (f.dictType) {
|
|
1099
|
-
const
|
|
1100
|
-
f.type = f.type || m
|
|
1101
|
-
f.label || (
|
|
1102
|
-
), f.color = f.color || m
|
|
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
|
+
_.push(f);
|
|
1105
1105
|
}
|
|
1106
|
-
|
|
1106
|
+
T.value = _;
|
|
1107
1107
|
}
|
|
1108
1108
|
onMounted(() => {
|
|
1109
1109
|
I();
|
|
@@ -1115,37 +1115,37 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1115
1115
|
{ deep: !0 }
|
|
1116
1116
|
// 深层监听数组/对象变化
|
|
1117
1117
|
);
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
}, S = ref(null),
|
|
1121
|
-
return r({ getElButtonsRef:
|
|
1118
|
+
const j = (_) => {
|
|
1119
|
+
_.disabled || (_.actionType === "submit" ? t("submit", _) : _.actionType === "reset" ? t("reset", _) : _.actionType === "action" && t("action", _));
|
|
1120
|
+
}, S = ref(null), F = () => S.value, L = ref([]);
|
|
1121
|
+
return r({ getElButtonsRef: F, getElButtonRefs: () => L.value }), (_, A) => (openBlock(), createElementBlock("div", {
|
|
1122
1122
|
ref_key: "ElButtonsRef",
|
|
1123
1123
|
ref: S,
|
|
1124
|
-
class: normalizeClass(["el-buttons-dict",
|
|
1125
|
-
id:
|
|
1126
|
-
style: normalizeStyle({ ...
|
|
1124
|
+
class: normalizeClass(["el-buttons-dict", _.$attrs.class]),
|
|
1125
|
+
id: _.$attrs.id,
|
|
1126
|
+
style: normalizeStyle({ ..._.$attrs.style, gap: v.value })
|
|
1127
1127
|
}, [
|
|
1128
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1128
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.value, (f, p) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
1129
1129
|
ref_for: !0,
|
|
1130
1130
|
ref: (k) => {
|
|
1131
|
-
k && (
|
|
1131
|
+
k && (L.value[p] = k);
|
|
1132
1132
|
},
|
|
1133
|
-
key:
|
|
1133
|
+
key: p,
|
|
1134
1134
|
style: { width: y.value, margin: "0 !important" },
|
|
1135
|
-
onClick: (k) =>
|
|
1135
|
+
onClick: (k) => j(f)
|
|
1136
1136
|
}, E(f)), createSlots({
|
|
1137
1137
|
default: withCtx(() => [
|
|
1138
1138
|
createTextVNode(toDisplayString(f.label || f.modelValue), 1)
|
|
1139
1139
|
]),
|
|
1140
1140
|
_: 2
|
|
1141
1141
|
}, [
|
|
1142
|
-
renderList(f.slotList, (k,
|
|
1142
|
+
renderList(f.slotList, (k, O) => ({
|
|
1143
1143
|
name: k.slotName,
|
|
1144
|
-
fn: withCtx((
|
|
1144
|
+
fn: withCtx((B) => [
|
|
1145
1145
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
1146
|
-
key:
|
|
1146
|
+
key: O,
|
|
1147
1147
|
render: k.render,
|
|
1148
|
-
scope:
|
|
1148
|
+
scope: B
|
|
1149
1149
|
}, null, 8, ["render", "scope"]))
|
|
1150
1150
|
])
|
|
1151
1151
|
}))
|
|
@@ -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(""),
|
|
1256
|
-
w("dictChange",
|
|
1257
|
-
},
|
|
1255
|
+
const t = useAttrs(), n = e, { maxLevel: a, dictType: u, disabledObj: o, filterDataFun: i, disabledDataFun: s } = toRefs(n), c = ref(""), g = toRaw(store.state.dictConfig), w = d, b = (j) => {
|
|
1256
|
+
w("dictChange", j);
|
|
1257
|
+
}, m = reactive({
|
|
1258
1258
|
list: []
|
|
1259
|
-
}),
|
|
1259
|
+
}), D = async () => {
|
|
1260
1260
|
if (!u.value)
|
|
1261
1261
|
return;
|
|
1262
|
-
let
|
|
1262
|
+
let j = [];
|
|
1263
1263
|
if (typeof u.value == "object") {
|
|
1264
1264
|
c.value = u.value.type;
|
|
1265
1265
|
const S = await store.actions.getDictDataObj(c.value);
|
|
1266
|
-
|
|
1267
|
-
const { filters:
|
|
1268
|
-
|
|
1266
|
+
j = [].concat(S[c.value]);
|
|
1267
|
+
const { filters: F, filterType: L = g.format.value, reverse: N = !1 } = u.value, _ = typeof F == "string" ? F.split(",") : F;
|
|
1268
|
+
N ? j = j.filter((A) => !_.includes(A[L])) : j = j.filter((A) => _.includes(A[L]));
|
|
1269
1269
|
} else {
|
|
1270
1270
|
c.value = u.value;
|
|
1271
1271
|
const S = await store.actions.getDictDataObj(c.value);
|
|
1272
|
-
|
|
1272
|
+
j = [].concat(S[c.value]);
|
|
1273
1273
|
}
|
|
1274
|
-
if (i.value && (
|
|
1275
|
-
|
|
1274
|
+
if (i.value && (j = i.value(j)), s.value)
|
|
1275
|
+
j = j.map((S) => ({
|
|
1276
1276
|
...S,
|
|
1277
|
-
[
|
|
1277
|
+
[g.format.disabled]: s.value(S)
|
|
1278
1278
|
}));
|
|
1279
1279
|
else if (o.value) {
|
|
1280
|
-
const { disabledValues: S, disabledType:
|
|
1281
|
-
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
}) :
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1280
|
+
const { disabledValues: S, disabledType: F = g.treeSetting.valueField, reverse: L = !1 } = o.value, N = typeof S == "string" ? S.split(",") : S;
|
|
1281
|
+
L ? j = j.map((_) => {
|
|
1282
|
+
const A = JSON.parse(JSON.stringify(_));
|
|
1283
|
+
return A[g.format.disabled] = !N.includes(A[F]) || A[g.format.disabled], A;
|
|
1284
|
+
}) : j = j.map((_) => {
|
|
1285
|
+
const A = JSON.parse(JSON.stringify(_));
|
|
1286
|
+
return A[g.format.disabled] = N.includes(A[F]) || A[g.format.disabled], A;
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
|
-
|
|
1289
|
+
m.list = j;
|
|
1290
1290
|
}, C = computed(() => store.state.isGettingDictTypes.includes(c.value)), l = computed(() => store.state.isGettingAllDictTypes), y = computed(() => {
|
|
1291
|
-
const
|
|
1291
|
+
const j = store.state.dictConfig.treeSetting, S = store.state.dictConfig.format, F = t.props ?? {};
|
|
1292
1292
|
return {
|
|
1293
|
-
disabled: (
|
|
1294
|
-
label: (
|
|
1295
|
-
value: (
|
|
1296
|
-
children: (
|
|
1297
|
-
leaf: (
|
|
1293
|
+
disabled: (F == null ? void 0 : F.disabled) ?? S.disabled,
|
|
1294
|
+
label: (F == null ? void 0 : F.label) ?? j.labelField,
|
|
1295
|
+
value: (F == null ? void 0 : F.value) ?? j.valueField,
|
|
1296
|
+
children: (F == null ? void 0 : F.children) ?? j.childrenField,
|
|
1297
|
+
leaf: (F == null ? void 0 : F.leaf) ?? j.leafField
|
|
1298
1298
|
};
|
|
1299
1299
|
}), v = computed(() => {
|
|
1300
|
-
const
|
|
1300
|
+
const j = JSON.parse(JSON.stringify(g.treeSetting)), S = t.props || {}, F = {
|
|
1301
1301
|
...S,
|
|
1302
|
-
valueField: S != null && S.value ? S.value :
|
|
1303
|
-
labelField: S != null && S.label ? S.label :
|
|
1304
|
-
childrenField: S != null && S.children ? S.children :
|
|
1305
|
-
leafField: S != null && S.leaf ? S.leaf :
|
|
1306
|
-
disabled: S != null && S.disabled ? S.disabled :
|
|
1302
|
+
valueField: S != null && S.value ? S.value : j.valueField,
|
|
1303
|
+
labelField: S != null && S.label ? S.label : j.labelField,
|
|
1304
|
+
childrenField: S != null && S.children ? S.children : j.childrenField,
|
|
1305
|
+
leafField: S != null && S.leaf ? S.leaf : j.leafField,
|
|
1306
|
+
disabled: S != null && S.disabled ? S.disabled : g.format.disabled
|
|
1307
1307
|
};
|
|
1308
|
-
return Object.assign(
|
|
1309
|
-
}), E = (
|
|
1310
|
-
for (let
|
|
1311
|
-
const
|
|
1312
|
-
if (
|
|
1313
|
-
delete
|
|
1308
|
+
return Object.assign(j, F);
|
|
1309
|
+
}), E = (j, S) => {
|
|
1310
|
+
for (let F = 0; F < j.length; F++) {
|
|
1311
|
+
const L = j[F];
|
|
1312
|
+
if (L[v.value.levelField] === S) {
|
|
1313
|
+
delete L[v.value.childrenField], L[v.value.leafField] = !0;
|
|
1314
1314
|
continue;
|
|
1315
1315
|
} else {
|
|
1316
|
-
const
|
|
1317
|
-
E(
|
|
1316
|
+
const _ = L[v.value.childrenField];
|
|
1317
|
+
E(_, S);
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
},
|
|
1321
|
-
if (
|
|
1320
|
+
}, T = computed(() => {
|
|
1321
|
+
if (m.list.length === 0)
|
|
1322
1322
|
return [];
|
|
1323
|
-
const
|
|
1324
|
-
let S = ListToTree(
|
|
1323
|
+
const j = JSON.parse(JSON.stringify(m.list));
|
|
1324
|
+
let S = ListToTree(j, v.value);
|
|
1325
1325
|
return a.value && E(S, +a.value), S || [];
|
|
1326
1326
|
});
|
|
1327
1327
|
watch(
|
|
1328
1328
|
[C, l],
|
|
1329
|
-
([
|
|
1330
|
-
!
|
|
1329
|
+
([j, S]) => {
|
|
1330
|
+
!j && !S && D();
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
1333
|
immediate: !0
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
const x = ref(null);
|
|
1337
|
-
return r({ getElCascaderRef: () => x.value }), (
|
|
1337
|
+
return r({ getElCascaderRef: () => x.value }), (j, S) => (openBlock(), createBlock(unref(ElCascader), mergeProps({
|
|
1338
1338
|
ref_key: "ElCascaderRef",
|
|
1339
1339
|
ref: x,
|
|
1340
|
-
options:
|
|
1340
|
+
options: T.value,
|
|
1341
1341
|
props: y.value,
|
|
1342
1342
|
onChange: b
|
|
1343
|
-
},
|
|
1344
|
-
renderList(
|
|
1345
|
-
name:
|
|
1346
|
-
fn: withCtx((
|
|
1347
|
-
renderSlot(
|
|
1343
|
+
}, j.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1344
|
+
renderList(j.$slots, (F, L, N) => ({
|
|
1345
|
+
name: L,
|
|
1346
|
+
fn: withCtx((_) => [
|
|
1347
|
+
renderSlot(j.$slots, L, mergeProps({ key: N }, _))
|
|
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:
|
|
1404
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: g, emptyText: w } = toRefs(d), b = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[b.format.type] ? l.value[b.format.type] : "primary"), D = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
1405
1405
|
let l = ref(null), y = ref(null);
|
|
1406
1406
|
watchEffect(() => {
|
|
1407
1407
|
if (!n.value) {
|
|
1408
1408
|
y.value = t.value;
|
|
1409
1409
|
return;
|
|
1410
1410
|
}
|
|
1411
|
-
GetItemByCode(t.value, n.value).then((
|
|
1412
|
-
|
|
1411
|
+
GetItemByCode(t.value, n.value).then((T) => {
|
|
1412
|
+
T ? (l.value = T, y.value = T[b.format.label]) : (l.value = null, y.value = String(g.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
1413
1413
|
});
|
|
1414
1414
|
});
|
|
1415
1415
|
const v = ref(null);
|
|
1416
|
-
return r({ getElCheckTagRef: () => v.value }), (
|
|
1416
|
+
return r({ getElCheckTagRef: () => v.value }), (T, x) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1417
1417
|
class: "el-check-tag-dict",
|
|
1418
1418
|
ref_key: "ElCheckTagRef",
|
|
1419
1419
|
ref: v,
|
|
1420
|
-
type:
|
|
1421
|
-
color:
|
|
1420
|
+
type: m.value,
|
|
1421
|
+
color: D.value,
|
|
1422
1422
|
disabled: C.value
|
|
1423
|
-
},
|
|
1423
|
+
}, T.$attrs), createSlots({
|
|
1424
1424
|
default: withCtx(() => [
|
|
1425
1425
|
createTextVNode(toDisplayString(unref(y)), 1)
|
|
1426
1426
|
]),
|
|
1427
1427
|
_: 2
|
|
1428
1428
|
}, [
|
|
1429
|
-
renderList(
|
|
1430
|
-
name:
|
|
1431
|
-
fn: withCtx((
|
|
1432
|
-
renderSlot(
|
|
1429
|
+
renderList(T.$slots, (I, j, S) => ({
|
|
1430
|
+
name: j,
|
|
1431
|
+
fn: withCtx((F) => [
|
|
1432
|
+
renderSlot(T.$slots, j, mergeProps({ key: S }, F))
|
|
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 (S && !n.value.includes(
|
|
1496
|
-
|
|
1489
|
+
const t = e, { modelValue: n, options: a, fieldNames: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: g } = toRefs(t), w = ref([]), b = ref(""), m = toRaw(store.state.dictConfig), D = d, C = (S, F) => {
|
|
1490
|
+
D("change", S);
|
|
1491
|
+
const L = [];
|
|
1492
|
+
for (let N = 0; N < y.value.length; N++) {
|
|
1493
|
+
const _ = y.value[N];
|
|
1494
|
+
if (n.value.includes(_[m.format.value]) && L.push(_), N === F)
|
|
1495
|
+
if (S && !n.value.includes(_[m.format.value]))
|
|
1496
|
+
L.push(_);
|
|
1497
1497
|
else {
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1498
|
+
const A = L.indexOf(_);
|
|
1499
|
+
L.splice(A, 1);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
if (
|
|
1502
|
+
if (D(
|
|
1503
1503
|
"update:modelValue",
|
|
1504
|
-
|
|
1504
|
+
L.map((N) => N[m.format.value])
|
|
1505
1505
|
), s.value) {
|
|
1506
|
-
|
|
1506
|
+
D("dictChange", L);
|
|
1507
1507
|
return;
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
D(
|
|
1510
1510
|
"dictChange",
|
|
1511
|
-
|
|
1511
|
+
L.map((N) => N[m.format.value])
|
|
1512
1512
|
);
|
|
1513
1513
|
}, l = reactive({
|
|
1514
1514
|
list: []
|
|
1515
1515
|
}), y = computed(() => l.list.map((S) => ({
|
|
1516
|
-
label: S[
|
|
1517
|
-
value: S[
|
|
1518
|
-
disabled: !!S[
|
|
1516
|
+
label: S[m.format.label],
|
|
1517
|
+
value: S[m.format.value],
|
|
1518
|
+
disabled: !!S[m.format.disabled],
|
|
1519
1519
|
...S
|
|
1520
1520
|
})));
|
|
1521
1521
|
watch(
|
|
1522
1522
|
[() => y.value, () => t.modelValue],
|
|
1523
|
-
([S,
|
|
1524
|
-
const
|
|
1525
|
-
for (let
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1523
|
+
([S, F]) => {
|
|
1524
|
+
const L = [];
|
|
1525
|
+
for (let N = 0; N < S.length; N++) {
|
|
1526
|
+
const _ = S[N];
|
|
1527
|
+
F.includes(_[m.format.value]) ? L.push(!0) : L.push(!1);
|
|
1528
1528
|
}
|
|
1529
|
-
w.value =
|
|
1529
|
+
w.value = L;
|
|
1530
1530
|
},
|
|
1531
1531
|
{
|
|
1532
1532
|
deep: !0,
|
|
@@ -1540,43 +1540,43 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1540
1540
|
let S = [];
|
|
1541
1541
|
if (typeof o.value == "object") {
|
|
1542
1542
|
b.value = o.value.type;
|
|
1543
|
-
const
|
|
1544
|
-
S = [].concat(
|
|
1545
|
-
const { filters:
|
|
1546
|
-
|
|
1543
|
+
const F = await store.actions.getDictDataObj(b.value);
|
|
1544
|
+
S = [].concat(F[b.value]);
|
|
1545
|
+
const { filters: L, filterType: N = m.format.value, reverse: _ = !1 } = o.value, A = typeof L == "string" ? L.split(",") : L;
|
|
1546
|
+
_ ? S = S.filter((f) => !A.includes(f[N])) : S = S.filter((f) => A.includes(f[N]));
|
|
1547
1547
|
} else {
|
|
1548
1548
|
b.value = o.value;
|
|
1549
|
-
const
|
|
1550
|
-
S = [].concat(
|
|
1549
|
+
const F = await store.actions.getDictDataObj(b.value);
|
|
1550
|
+
S = [].concat(F[b.value]);
|
|
1551
1551
|
}
|
|
1552
|
-
if (c.value && (S = c.value(S)),
|
|
1553
|
-
S = S.map((
|
|
1554
|
-
...
|
|
1555
|
-
[
|
|
1552
|
+
if (c.value && (S = c.value(S)), g.value)
|
|
1553
|
+
S = S.map((F) => ({
|
|
1554
|
+
...F,
|
|
1555
|
+
[m.format.disabled]: g.value(F)
|
|
1556
1556
|
}));
|
|
1557
1557
|
else if (i.value) {
|
|
1558
|
-
const { disabledValues:
|
|
1559
|
-
|
|
1560
|
-
const f = JSON.parse(JSON.stringify(
|
|
1561
|
-
return f[
|
|
1562
|
-
}) : S = S.map((
|
|
1563
|
-
const f = JSON.parse(JSON.stringify(
|
|
1564
|
-
return f[
|
|
1558
|
+
const { disabledValues: F, disabledType: L = m.format.value, reverse: N = !1 } = i.value, _ = typeof F == "string" ? F.split(",") : F;
|
|
1559
|
+
N ? S = S.map((A) => {
|
|
1560
|
+
const f = JSON.parse(JSON.stringify(A));
|
|
1561
|
+
return f[m.format.disabled] = !_.includes(f[L]) || f[m.format.disabled], f;
|
|
1562
|
+
}) : S = S.map((A) => {
|
|
1563
|
+
const f = JSON.parse(JSON.stringify(A));
|
|
1564
|
+
return f[m.format.disabled] = _.includes(f[L]) || f[m.format.disabled], f;
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
l.list = S;
|
|
1568
|
-
}, E = computed(() => store.state.isGettingDictTypes.includes(b.value)),
|
|
1568
|
+
}, E = computed(() => store.state.isGettingDictTypes.includes(b.value)), T = computed(() => store.state.isGettingAllDictTypes), x = computed(() => a.value);
|
|
1569
1569
|
watch(
|
|
1570
|
-
[E,
|
|
1571
|
-
([S,
|
|
1572
|
-
!S && !
|
|
1573
|
-
[
|
|
1574
|
-
[
|
|
1575
|
-
[
|
|
1576
|
-
...
|
|
1577
|
-
})) : l.list = l.list.map((
|
|
1578
|
-
[
|
|
1579
|
-
[
|
|
1570
|
+
[E, T, x],
|
|
1571
|
+
([S, F, L]) => {
|
|
1572
|
+
!S && !F && L && L.length === 0 && v(), L.length > 0 && (l.list = JSON.parse(JSON.stringify(L)), l.list.length > 0 && (Object.prototype.toString.call(l.list[0]) === "[object Object]" ? l.list = l.list.map((_) => ({
|
|
1573
|
+
[m.format.value]: _[u.value.value],
|
|
1574
|
+
[m.format.label]: _[u.value.label],
|
|
1575
|
+
[m.format.disabled]: !!_[u.value.disabled],
|
|
1576
|
+
..._
|
|
1577
|
+
})) : l.list = l.list.map((_) => ({
|
|
1578
|
+
[m.format.value]: _,
|
|
1579
|
+
[m.format.label]: _
|
|
1580
1580
|
}))));
|
|
1581
1581
|
},
|
|
1582
1582
|
{
|
|
@@ -1584,26 +1584,26 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
1586
|
const I = ref([]);
|
|
1587
|
-
return r({ getElCheckAbleTagRefs: () => I.value }), (S,
|
|
1587
|
+
return r({ getElCheckAbleTagRefs: () => I.value }), (S, F) => (openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (L, N) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1588
1588
|
ref_for: !0,
|
|
1589
|
-
ref: (
|
|
1590
|
-
|
|
1589
|
+
ref: (_) => {
|
|
1590
|
+
_ && (I.value[N] = _);
|
|
1591
1591
|
},
|
|
1592
|
-
checked: w.value[
|
|
1592
|
+
checked: w.value[N]
|
|
1593
1593
|
}, S.$attrs, {
|
|
1594
|
-
onChange: (
|
|
1595
|
-
key:
|
|
1596
|
-
type:
|
|
1594
|
+
onChange: (_) => C(_, N),
|
|
1595
|
+
key: N,
|
|
1596
|
+
type: L[unref(m).format.type]
|
|
1597
1597
|
}), createSlots({
|
|
1598
1598
|
default: withCtx(() => [
|
|
1599
|
-
createTextVNode(" " + toDisplayString(
|
|
1599
|
+
createTextVNode(" " + toDisplayString(L[unref(m).format.label]), 1)
|
|
1600
1600
|
]),
|
|
1601
1601
|
_: 2
|
|
1602
1602
|
}, [
|
|
1603
|
-
renderList(S.$slots, (
|
|
1604
|
-
name:
|
|
1605
|
-
fn: withCtx((
|
|
1606
|
-
renderSlot(S.$slots,
|
|
1603
|
+
renderList(S.$slots, (_, A, f) => ({
|
|
1604
|
+
name: A,
|
|
1605
|
+
fn: withCtx((p) => [
|
|
1606
|
+
renderSlot(S.$slots, A, normalizeProps(guardReactiveProps(p)), void 0, !0)
|
|
1607
1607
|
])
|
|
1608
1608
|
}))
|
|
1609
1609
|
]), 1040, ["checked", "onChange", "type"]))), 128));
|
|
@@ -1660,31 +1660,31 @@ 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:
|
|
1663
|
+
const t = e, { disabled: n, data: a, format: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: g } = toRefs(t), w = useAttrs(), b = computed(() => {
|
|
1664
1664
|
const f = {};
|
|
1665
|
-
return Object.entries(w).forEach(([
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1668
|
-
const
|
|
1669
|
-
f[
|
|
1665
|
+
return Object.entries(w).forEach(([p, k]) => {
|
|
1666
|
+
const O = ToKebabCase(p);
|
|
1667
|
+
if (!O.startsWith("checkbox-button-") && !O.startsWith("on-checkbox-button-")) {
|
|
1668
|
+
const B = ToCamelCase(O);
|
|
1669
|
+
f[B] = k;
|
|
1670
1670
|
}
|
|
1671
1671
|
}), f;
|
|
1672
|
-
}),
|
|
1672
|
+
}), m = computed(() => {
|
|
1673
1673
|
const f = {};
|
|
1674
|
-
return Object.entries(w).forEach(([
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1677
|
-
const
|
|
1678
|
-
f[
|
|
1674
|
+
return Object.entries(w).forEach(([p, k]) => {
|
|
1675
|
+
const O = ToKebabCase(p);
|
|
1676
|
+
if (O.startsWith("checkbox-button-") || O.startsWith("on-checkbox-button-")) {
|
|
1677
|
+
const B = ToCamelCase(O.replace("checkbox-button-", ""));
|
|
1678
|
+
f[B] = k;
|
|
1679
1679
|
}
|
|
1680
1680
|
}), f;
|
|
1681
|
-
}),
|
|
1681
|
+
}), D = ref(""), C = toRaw(store.state.dictConfig), l = d, y = (f) => {
|
|
1682
1682
|
if (!s.value) {
|
|
1683
1683
|
l("dictChange", f);
|
|
1684
1684
|
return;
|
|
1685
1685
|
}
|
|
1686
|
-
const
|
|
1687
|
-
l("dictChange",
|
|
1686
|
+
const p = v.list.filter((k) => f.includes(k[C.format.value]));
|
|
1687
|
+
l("dictChange", p);
|
|
1688
1688
|
}, v = reactive({
|
|
1689
1689
|
list: []
|
|
1690
1690
|
}), E = async () => {
|
|
@@ -1692,66 +1692,66 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1692
1692
|
return;
|
|
1693
1693
|
let f = [];
|
|
1694
1694
|
if (typeof o.value == "object") {
|
|
1695
|
-
|
|
1696
|
-
const
|
|
1697
|
-
f = [].concat(
|
|
1698
|
-
const { filters: k, filterType:
|
|
1699
|
-
|
|
1695
|
+
D.value = o.value.type;
|
|
1696
|
+
const p = await store.actions.getDictDataObj(D.value);
|
|
1697
|
+
f = [].concat(p[D.value]);
|
|
1698
|
+
const { filters: k, filterType: O = C.format.value, reverse: B = !1 } = o.value, V = typeof k == "string" ? k.split(",") : k;
|
|
1699
|
+
B ? f = f.filter((R) => !V.includes(R[O])) : f = f.filter((R) => V.includes(R[O]));
|
|
1700
1700
|
} else {
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
f = [].concat(
|
|
1701
|
+
D.value = o.value;
|
|
1702
|
+
const p = await store.actions.getDictDataObj(D.value);
|
|
1703
|
+
f = [].concat(p[D.value]);
|
|
1704
1704
|
}
|
|
1705
|
-
if (c.value && (f = c.value(f)),
|
|
1706
|
-
f = f.map((
|
|
1707
|
-
...
|
|
1708
|
-
[C.format.disabled]:
|
|
1705
|
+
if (c.value && (f = c.value(f)), g.value)
|
|
1706
|
+
f = f.map((p) => ({
|
|
1707
|
+
...p,
|
|
1708
|
+
[C.format.disabled]: g.value(p)
|
|
1709
1709
|
}));
|
|
1710
1710
|
else if (i.value) {
|
|
1711
|
-
const { disabledValues:
|
|
1712
|
-
|
|
1713
|
-
const R = JSON.parse(JSON.stringify(
|
|
1714
|
-
return R[C.format.disabled] = !
|
|
1715
|
-
}) : f = f.map((
|
|
1716
|
-
const R = JSON.parse(JSON.stringify(
|
|
1717
|
-
return R[C.format.disabled] =
|
|
1711
|
+
const { disabledValues: p, disabledType: k = C.format.value, reverse: O = !1 } = i.value, B = typeof p == "string" ? p.split(",") : p;
|
|
1712
|
+
O ? f = f.map((V) => {
|
|
1713
|
+
const R = JSON.parse(JSON.stringify(V));
|
|
1714
|
+
return R[C.format.disabled] = !B.includes(R[k]) || R[C.format.disabled], R;
|
|
1715
|
+
}) : f = f.map((V) => {
|
|
1716
|
+
const R = JSON.parse(JSON.stringify(V));
|
|
1717
|
+
return R[C.format.disabled] = B.includes(R[k]) || R[C.format.disabled], R;
|
|
1718
1718
|
});
|
|
1719
1719
|
}
|
|
1720
1720
|
v.list = f;
|
|
1721
|
-
},
|
|
1721
|
+
}, T = computed(() => store.state.isGettingDictTypes.includes(D.value)), x = computed(() => store.state.isGettingAllDictTypes), I = computed(() => a.value), j = inject(formItemContextKey), S = inject(formContextKey), F = computed(() => n.value || w["checkbox-button-disabled"] === "" || w["checkbox-button-disabled"] || w.checkboxButtonDisabled === "" || w.checkboxButtonDisabled || w.CheckboxButtonDisabled === "" || w.CheckboxButtonDisabled || (j == null ? void 0 : j.disabled) || (S == null ? void 0 : S.disabled) || !1);
|
|
1722
1722
|
watch(
|
|
1723
|
-
[
|
|
1724
|
-
([f,
|
|
1725
|
-
!f && !
|
|
1726
|
-
[C.format.value]:
|
|
1727
|
-
[C.format.label]:
|
|
1728
|
-
[C.format.disabled]: !!
|
|
1729
|
-
...
|
|
1730
|
-
})) : v.list = v.list.map((
|
|
1731
|
-
[C.format.value]:
|
|
1732
|
-
[C.format.label]:
|
|
1723
|
+
[T, x, I],
|
|
1724
|
+
([f, p, k]) => {
|
|
1725
|
+
!f && !p && k && k.length === 0 && E(), k.length > 0 && (v.list = JSON.parse(JSON.stringify(k)), v.list.length > 0 && (Object.prototype.toString.call(v.list[0]) === "[object Object]" ? v.list = v.list.map((B) => ({
|
|
1726
|
+
[C.format.value]: B[u.value.value],
|
|
1727
|
+
[C.format.label]: B[u.value.label],
|
|
1728
|
+
[C.format.disabled]: !!B[u.value.disabled],
|
|
1729
|
+
...B
|
|
1730
|
+
})) : v.list = v.list.map((B) => ({
|
|
1731
|
+
[C.format.value]: B,
|
|
1732
|
+
[C.format.label]: B
|
|
1733
1733
|
}))));
|
|
1734
1734
|
},
|
|
1735
1735
|
{
|
|
1736
1736
|
immediate: !0
|
|
1737
1737
|
}
|
|
1738
1738
|
);
|
|
1739
|
-
const
|
|
1740
|
-
return r({ getElCheckboxGroupRef:
|
|
1739
|
+
const L = ref(null), N = () => L.value, _ = ref([]);
|
|
1740
|
+
return r({ getElCheckboxGroupRef: N, getElCheckboxButtonRefs: () => _.value }), (f, p) => (openBlock(), createBlock(unref(ElCheckboxGroup), mergeProps({
|
|
1741
1741
|
ref_key: "ElCheckboxGroupRef",
|
|
1742
|
-
ref:
|
|
1743
|
-
disabled:
|
|
1742
|
+
ref: L,
|
|
1743
|
+
disabled: F.value
|
|
1744
1744
|
}, b.value, { onChange: y }), createSlots({
|
|
1745
1745
|
default: withCtx(() => [
|
|
1746
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(v.list, (k,
|
|
1746
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(v.list, (k, O) => (openBlock(), createBlock(unref(ElCheckboxButton), mergeProps({
|
|
1747
1747
|
ref_for: !0,
|
|
1748
|
-
ref: (
|
|
1749
|
-
|
|
1748
|
+
ref: (B) => {
|
|
1749
|
+
B && (_.value[O] = B);
|
|
1750
1750
|
},
|
|
1751
1751
|
key: k[unref(C).format.value],
|
|
1752
|
-
disabled:
|
|
1752
|
+
disabled: F.value || k[unref(C).format.disabled],
|
|
1753
1753
|
label: k[unref(C).format.value]
|
|
1754
|
-
},
|
|
1754
|
+
}, m.value), {
|
|
1755
1755
|
default: withCtx(() => [
|
|
1756
1756
|
createTextVNode(toDisplayString(k[unref(C).format.label]), 1)
|
|
1757
1757
|
]),
|
|
@@ -1760,10 +1760,10 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1760
1760
|
]),
|
|
1761
1761
|
_: 2
|
|
1762
1762
|
}, [
|
|
1763
|
-
renderList(f.$slots, (k,
|
|
1764
|
-
name:
|
|
1765
|
-
fn: withCtx((
|
|
1766
|
-
renderSlot(f.$slots,
|
|
1763
|
+
renderList(f.$slots, (k, O, B) => ({
|
|
1764
|
+
name: O,
|
|
1765
|
+
fn: withCtx((V) => [
|
|
1766
|
+
renderSlot(f.$slots, O, mergeProps({ key: B }, V))
|
|
1767
1767
|
])
|
|
1768
1768
|
}))
|
|
1769
1769
|
]), 1040, ["disabled"]));
|
|
@@ -1826,9 +1826,9 @@ 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:
|
|
1829
|
+
const t = e, { disabled: n, modelValue: a, addAllText: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: g, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(), D = ref(!1), C = ref(!1), l = ref([]), y = computed(() => {
|
|
1830
1830
|
const P = {};
|
|
1831
|
-
return Object.entries(
|
|
1831
|
+
return Object.entries(m).forEach(([K, G]) => {
|
|
1832
1832
|
const M = ToKebabCase(K);
|
|
1833
1833
|
if (!M.startsWith("checkbox-") && !M.startsWith("on-checkbox-")) {
|
|
1834
1834
|
const W = ToCamelCase(M);
|
|
@@ -1837,33 +1837,33 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1837
1837
|
}), P;
|
|
1838
1838
|
}), v = computed(() => {
|
|
1839
1839
|
const P = {};
|
|
1840
|
-
return Object.entries(
|
|
1840
|
+
return Object.entries(m).forEach(([K, G]) => {
|
|
1841
1841
|
const M = ToKebabCase(K);
|
|
1842
1842
|
if (M.startsWith("checkbox-") || M.startsWith("on-checkbox-")) {
|
|
1843
1843
|
const W = ToCamelCase(M.replace("checkbox-", ""));
|
|
1844
1844
|
P[W] = G;
|
|
1845
1845
|
}
|
|
1846
1846
|
}), P;
|
|
1847
|
-
}), E = ref(""),
|
|
1847
|
+
}), E = ref(""), T = toRaw(store.state.dictConfig), x = d, I = computed(() => F.list.filter((P) => !P[T.format.disabled])), j = (P) => {
|
|
1848
1848
|
const K = P.length, G = I.value.length;
|
|
1849
|
-
C.value = K === G,
|
|
1849
|
+
C.value = K === G, D.value = K > 0 && K < G;
|
|
1850
1850
|
}, S = (P) => {
|
|
1851
|
-
if (
|
|
1851
|
+
if (j(P), !g.value) {
|
|
1852
1852
|
x("dictChange", P);
|
|
1853
1853
|
return;
|
|
1854
1854
|
}
|
|
1855
|
-
const K =
|
|
1855
|
+
const K = F.list.filter((G) => P.includes(G[T.format.value]));
|
|
1856
1856
|
x("dictChange", K);
|
|
1857
|
-
},
|
|
1857
|
+
}, F = reactive({
|
|
1858
1858
|
list: []
|
|
1859
1859
|
});
|
|
1860
1860
|
watch(
|
|
1861
1861
|
() => I.value,
|
|
1862
1862
|
() => {
|
|
1863
|
-
|
|
1863
|
+
j(a.value);
|
|
1864
1864
|
}
|
|
1865
1865
|
);
|
|
1866
|
-
const
|
|
1866
|
+
const L = async () => {
|
|
1867
1867
|
if (!s.value || o.value && o.value.length > 0)
|
|
1868
1868
|
return;
|
|
1869
1869
|
let P = [];
|
|
@@ -1871,8 +1871,8 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1871
1871
|
E.value = s.value.type;
|
|
1872
1872
|
const K = await store.actions.getDictDataObj(E.value);
|
|
1873
1873
|
P = [].concat(K[E.value]);
|
|
1874
|
-
const { filters: G, filterType: M =
|
|
1875
|
-
W ? P = P.filter((
|
|
1874
|
+
const { filters: G, filterType: M = T.format.value, reverse: W = !1 } = s.value, z = typeof G == "string" ? G.split(",") : G;
|
|
1875
|
+
W ? P = P.filter(($) => !z.includes($[M])) : P = P.filter(($) => z.includes($[M]));
|
|
1876
1876
|
} else {
|
|
1877
1877
|
E.value = s.value;
|
|
1878
1878
|
const K = await store.actions.getDictDataObj(E.value);
|
|
@@ -1881,20 +1881,20 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1881
1881
|
if (w.value && (P = w.value(P)), b.value)
|
|
1882
1882
|
P = P.map((K) => ({
|
|
1883
1883
|
...K,
|
|
1884
|
-
[
|
|
1884
|
+
[T.format.disabled]: b.value(K)
|
|
1885
1885
|
}));
|
|
1886
1886
|
else if (c.value) {
|
|
1887
|
-
const { disabledValues: K, disabledType: G =
|
|
1887
|
+
const { disabledValues: K, disabledType: G = T.format.value, reverse: M = !1 } = c.value, W = typeof K == "string" ? K.split(",") : K;
|
|
1888
1888
|
M ? P = P.map((z) => {
|
|
1889
|
-
const
|
|
1890
|
-
return
|
|
1889
|
+
const $ = JSON.parse(JSON.stringify(z));
|
|
1890
|
+
return $[T.format.disabled] = !W.includes($[G]) || $[T.format.disabled], $;
|
|
1891
1891
|
}) : P = P.map((z) => {
|
|
1892
|
-
const
|
|
1893
|
-
return
|
|
1892
|
+
const $ = JSON.parse(JSON.stringify(z));
|
|
1893
|
+
return $[T.format.disabled] = W.includes($[G]) || $[T.format.disabled], $;
|
|
1894
1894
|
});
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1897
|
-
},
|
|
1896
|
+
F.list = P;
|
|
1897
|
+
}, N = computed(() => store.state.isGettingDictTypes.includes(E.value)), _ = computed(() => store.state.isGettingAllDictTypes), A = computed(() => o.value), f = inject(formItemContextKey), p = inject(formContextKey), k = 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
|
// 正确监听方式
|
|
@@ -1912,38 +1912,38 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1912
1912
|
x("update:modelValue", P), x("change", P);
|
|
1913
1913
|
}
|
|
1914
1914
|
), watch(
|
|
1915
|
-
[
|
|
1915
|
+
[N, _, A],
|
|
1916
1916
|
([P, K, G]) => {
|
|
1917
|
-
!P && !K && G && G.length === 0 &&
|
|
1918
|
-
[
|
|
1919
|
-
[
|
|
1920
|
-
[
|
|
1917
|
+
!P && !K && G && G.length === 0 && L(), G.length > 0 && (F.list = JSON.parse(JSON.stringify(G)), F.list.length > 0 && (Object.prototype.toString.call(F.list[0]) === "[object Object]" ? F.list = F.list.map((W) => ({
|
|
1918
|
+
[T.format.value]: W[i.value.value],
|
|
1919
|
+
[T.format.label]: W[i.value.label],
|
|
1920
|
+
[T.format.disabled]: !!W[i.value.disabled],
|
|
1921
1921
|
...W
|
|
1922
|
-
})) :
|
|
1923
|
-
[
|
|
1924
|
-
[
|
|
1922
|
+
})) : F.list = F.list.map((W) => ({
|
|
1923
|
+
[T.format.value]: W,
|
|
1924
|
+
[T.format.label]: W
|
|
1925
1925
|
}))));
|
|
1926
1926
|
},
|
|
1927
1927
|
{
|
|
1928
1928
|
immediate: !0
|
|
1929
1929
|
}
|
|
1930
1930
|
);
|
|
1931
|
-
const
|
|
1932
|
-
if (
|
|
1933
|
-
const K = I.value.map((G) => G[
|
|
1931
|
+
const O = (P) => {
|
|
1932
|
+
if (D.value = !1, P) {
|
|
1933
|
+
const K = I.value.map((G) => G[T.format.value]);
|
|
1934
1934
|
S(K);
|
|
1935
1935
|
} else
|
|
1936
1936
|
S([]);
|
|
1937
|
-
},
|
|
1938
|
-
return r({ getElCheckboxGroupRef:
|
|
1937
|
+
}, B = ref(null), V = () => B.value, R = ref([]);
|
|
1938
|
+
return r({ getElCheckboxGroupRef: V, getElCheckboxRefs: () => R.value }), (P, K) => (openBlock(), createElementBlock(Fragment, null, [
|
|
1939
1939
|
unref(u) && !k.value ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
1940
1940
|
key: 0,
|
|
1941
1941
|
class: "check-all",
|
|
1942
1942
|
disabled: k.value,
|
|
1943
|
-
indeterminate:
|
|
1943
|
+
indeterminate: D.value,
|
|
1944
1944
|
modelValue: C.value,
|
|
1945
1945
|
"onUpdate:modelValue": K[0] || (K[0] = (G) => C.value = G),
|
|
1946
|
-
onChange:
|
|
1946
|
+
onChange: O
|
|
1947
1947
|
}, {
|
|
1948
1948
|
default: withCtx(() => [
|
|
1949
1949
|
createTextVNode(toDisplayString(unref(u)), 1)
|
|
@@ -1952,23 +1952,23 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1952
1952
|
}, 8, ["disabled", "indeterminate", "modelValue"])) : createCommentVNode("", !0),
|
|
1953
1953
|
createVNode(unref(ElCheckboxGroup), mergeProps({
|
|
1954
1954
|
ref_key: "ElCheckboxGroupRef",
|
|
1955
|
-
ref:
|
|
1955
|
+
ref: B,
|
|
1956
1956
|
disabled: k.value,
|
|
1957
1957
|
modelValue: l.value,
|
|
1958
1958
|
"onUpdate:modelValue": K[1] || (K[1] = (G) => l.value = G)
|
|
1959
1959
|
}, y.value, { onChange: S }), createSlots({
|
|
1960
1960
|
default: withCtx(() => [
|
|
1961
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1961
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(F.list, (G, M) => (openBlock(), createBlock(unref(ElCheckbox), mergeProps({
|
|
1962
1962
|
ref_for: !0,
|
|
1963
1963
|
ref: (W) => {
|
|
1964
1964
|
W && (R.value[M] = W);
|
|
1965
1965
|
},
|
|
1966
|
-
key: G[unref(
|
|
1967
|
-
label: G[unref(
|
|
1968
|
-
disabled: k.value || G[unref(
|
|
1966
|
+
key: G[unref(T).format.value],
|
|
1967
|
+
label: G[unref(T).format.value],
|
|
1968
|
+
disabled: k.value || G[unref(T).format.disabled]
|
|
1969
1969
|
}, v.value), {
|
|
1970
1970
|
default: withCtx(() => [
|
|
1971
|
-
createTextVNode(toDisplayString(G[unref(
|
|
1971
|
+
createTextVNode(toDisplayString(G[unref(T).format.label]), 1)
|
|
1972
1972
|
]),
|
|
1973
1973
|
_: 2
|
|
1974
1974
|
}, 1040, ["label", "disabled"]))), 128))
|
|
@@ -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, g = Date.now(), w = window.setInterval(() => {
|
|
2094
|
+
if (Date.now() - g > c) {
|
|
2095
2095
|
clearInterval(w), a("getTreeLabelByCode获取字典数据超时");
|
|
2096
2096
|
return;
|
|
2097
2097
|
}
|
|
@@ -2100,7 +2100,7 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2100
2100
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2101
2101
|
return;
|
|
2102
2102
|
}
|
|
2103
|
-
const b = s.find((
|
|
2103
|
+
const b = s.find((m) => m[o.valueField] === e);
|
|
2104
2104
|
n(b ? t.formatFun(GetTreeItemByCode(b[o.idField], s, o), o) : t.defaultVal);
|
|
2105
2105
|
}
|
|
2106
2106
|
}, 1e3);
|
|
@@ -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 g = s.find((w) => w[o.valueField] === e);
|
|
2114
|
+
n(g ? t.formatFun(GetTreeItemByCode(g[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((g) => g[o.valueField] === e);
|
|
2119
2119
|
n(c ? t.formatFun(GetTreeItemByCode(c[o.idField], s, o), o) : t.defaultVal);
|
|
2120
2120
|
}
|
|
2121
2121
|
});
|
|
@@ -2144,8 +2144,8 @@ 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 >
|
|
2147
|
+
const g = store.state.timeout || 3e4, w = Date.now(), b = window.setInterval(() => {
|
|
2148
|
+
if (Date.now() - w > g) {
|
|
2149
2149
|
clearInterval(b), a("getTreeLabelByCodes获取字典数据超时");
|
|
2150
2150
|
return;
|
|
2151
2151
|
}
|
|
@@ -2154,13 +2154,13 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2154
2154
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2155
2155
|
return;
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2158
|
-
n(
|
|
2157
|
+
const m = GetTreeLabelByCodesDothings(u, c, t.defaultVal, t.formatFunIn, i, t.emptyText);
|
|
2158
|
+
n(m && m.length > 0 ? t.formatFunOut(m) : t.defaultVal);
|
|
2159
2159
|
}
|
|
2160
2160
|
}, 1e3);
|
|
2161
2161
|
} else
|
|
2162
|
-
store.actions.getDictDataObj(r).then((
|
|
2163
|
-
if (c =
|
|
2162
|
+
store.actions.getDictDataObj(r).then((g) => {
|
|
2163
|
+
if (c = g[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 g = GetTreeLabelByCodesDothings(u, c, t.defaultVal, t.formatFunIn, i, t.emptyText);
|
|
2173
|
+
n(g && g.length > 0 ? t.formatFunOut(g) : 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, g = Date.now(), w = window.setInterval(() => {
|
|
2188
|
+
if (Date.now() - g > c) {
|
|
2189
2189
|
clearInterval(w), a("getTreeCodeByLabel获取字典数据超时");
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
@@ -2194,7 +2194,7 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2194
2194
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2195
2195
|
return;
|
|
2196
2196
|
}
|
|
2197
|
-
const b = s.find((
|
|
2197
|
+
const b = s.find((m) => m[o.labelField] === e);
|
|
2198
2198
|
n(b ? t.formatFun(GetTreeItemByLabel(b[o.labelField], s, o), o) : t.defaultVal);
|
|
2199
2199
|
}
|
|
2200
2200
|
}, 1e3);
|
|
@@ -2204,12 +2204,12 @@ const GetTreeLabelByCodes = (e, r, d) => {
|
|
|
2204
2204
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
2207
|
-
const
|
|
2208
|
-
n(
|
|
2207
|
+
const g = s.find((w) => w[o.labelField] === e);
|
|
2208
|
+
n(g ? t.formatFun(GetTreeItemByLabel(g[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((g) => g[o.labelField] === e);
|
|
2213
2213
|
n(c ? t.formatFun(GetTreeItemByLabel(c[o.labelField], s, o), o) : t.defaultVal);
|
|
2214
2214
|
}
|
|
2215
2215
|
});
|
|
@@ -2237,8 +2237,8 @@ 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 >
|
|
2240
|
+
const g = store.state.timeout || 3e4, w = Date.now(), b = window.setInterval(() => {
|
|
2241
|
+
if (Date.now() - w > g) {
|
|
2242
2242
|
clearInterval(b), a("getTreeCodeByLabels获取字典数据超时");
|
|
2243
2243
|
return;
|
|
2244
2244
|
}
|
|
@@ -2247,13 +2247,13 @@ const GetTreeCodeByLabels = (e, r, d) => {
|
|
|
2247
2247
|
a(`不存在类型为:${r} 的字典字段,请确认后再填写`);
|
|
2248
2248
|
return;
|
|
2249
2249
|
}
|
|
2250
|
-
const
|
|
2251
|
-
n(
|
|
2250
|
+
const m = GetTreeCodeByLabelsDothings(u, c, t.defaultVal, t.formatFunIn, i);
|
|
2251
|
+
n(m && m.length > 0 ? t.formatFunOut(m) : t.defaultVal);
|
|
2252
2252
|
}
|
|
2253
2253
|
}, 1e3);
|
|
2254
2254
|
} else
|
|
2255
|
-
store.actions.getDictDataObj(r).then((
|
|
2256
|
-
if (c =
|
|
2255
|
+
store.actions.getDictDataObj(r).then((g) => {
|
|
2256
|
+
if (c = g[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 g = GetTreeCodeByLabelsDothings(u, c, t.defaultVal, t.formatFunIn, i);
|
|
2266
|
+
n(g && g.length > 0 ? t.formatFunOut(g) : 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((g) => g[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((g) => g[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:
|
|
2709
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: g, emptyText: w } = toRefs(d), b = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[b.format.type] ? l.value[b.format.type] : "primary"), D = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
2710
2710
|
let l = ref(null), y = ref(null);
|
|
2711
2711
|
watchEffect(() => {
|
|
2712
2712
|
if (!n.value) {
|
|
2713
2713
|
y.value = t.value;
|
|
2714
2714
|
return;
|
|
2715
2715
|
}
|
|
2716
|
-
GetItemByCode(t.value, n.value).then((
|
|
2717
|
-
|
|
2716
|
+
GetItemByCode(t.value, n.value).then((T) => {
|
|
2717
|
+
T ? (l.value = T, y.value = T[b.format.label]) : (l.value = null, y.value = String(g.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
2718
2718
|
});
|
|
2719
2719
|
});
|
|
2720
2720
|
const v = ref(null);
|
|
2721
|
-
return r({ getElTagRef: () => v.value }), (
|
|
2721
|
+
return r({ getElTagRef: () => v.value }), (T, x) => (openBlock(), createBlock(unref(ElTag), mergeProps({
|
|
2722
2722
|
class: "el-tag-dict",
|
|
2723
2723
|
ref_key: "ElTagRef",
|
|
2724
2724
|
ref: v,
|
|
2725
|
-
type:
|
|
2726
|
-
color:
|
|
2725
|
+
type: m.value,
|
|
2726
|
+
color: D.value,
|
|
2727
2727
|
disabled: C.value
|
|
2728
|
-
},
|
|
2728
|
+
}, T.$attrs), createSlots({
|
|
2729
2729
|
default: withCtx(() => [
|
|
2730
2730
|
createTextVNode(toDisplayString(unref(y)), 1)
|
|
2731
2731
|
]),
|
|
2732
2732
|
_: 2
|
|
2733
2733
|
}, [
|
|
2734
|
-
renderList(
|
|
2735
|
-
name:
|
|
2736
|
-
fn: withCtx((
|
|
2737
|
-
renderSlot(
|
|
2734
|
+
renderList(T.$slots, (I, j, S) => ({
|
|
2735
|
+
name: j,
|
|
2736
|
+
fn: withCtx((F) => [
|
|
2737
|
+
renderSlot(T.$slots, j, mergeProps({ key: S }, F))
|
|
2738
2738
|
])
|
|
2739
2739
|
}))
|
|
2740
2740
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2789,21 +2789,21 @@ 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: g, disabled: w, defaultVal: b, emptyText: m } = toRefs(t), D = 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"), y = computed(() => s.value ? s.value(a.value) : c.value ? c.value : E.value && E.value[C.format.color] ? E.value[C.format.color] : ""), v = computed(() => g.value ? g.value(a.value) : E.value && E.value[C.format.disabled] ? E.value[C.format.disabled] : !!w.value);
|
|
2793
|
+
let E = ref(null), T = ref(null);
|
|
2794
2794
|
watchEffect(() => {
|
|
2795
2795
|
if (!u.value) {
|
|
2796
|
-
|
|
2796
|
+
T.value = a.value;
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
2799
|
GetItemByCode(a.value, u.value).then((S) => {
|
|
2800
|
-
S ? (E.value = S,
|
|
2800
|
+
S ? (E.value = S, T.value = S[C.format.label]) : (E.value = null, T.value = String(b.value ?? (a.value === 0 ? 0 : a.value || m.value)));
|
|
2801
2801
|
});
|
|
2802
2802
|
});
|
|
2803
2803
|
const x = () => {
|
|
2804
|
-
v.value ||
|
|
2804
|
+
v.value || D(n.value, attrs);
|
|
2805
2805
|
}, I = ref(null);
|
|
2806
|
-
return r({ getElLinkRef: () => I.value }), (S,
|
|
2806
|
+
return r({ getElLinkRef: () => I.value }), (S, F) => (openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
2807
2807
|
class: "el-link-dict",
|
|
2808
2808
|
ref_key: "ElLinkRef",
|
|
2809
2809
|
ref: I,
|
|
@@ -2812,14 +2812,14 @@ const Mask = (e, r) => {
|
|
|
2812
2812
|
disabled: v.value
|
|
2813
2813
|
}, S.$attrs, { onClick: x }), createSlots({
|
|
2814
2814
|
default: withCtx(() => [
|
|
2815
|
-
createTextVNode(toDisplayString(unref(
|
|
2815
|
+
createTextVNode(toDisplayString(unref(T)), 1)
|
|
2816
2816
|
]),
|
|
2817
2817
|
_: 2
|
|
2818
2818
|
}, [
|
|
2819
|
-
renderList(S.$slots, (
|
|
2820
|
-
name:
|
|
2821
|
-
fn: withCtx((
|
|
2822
|
-
renderSlot(S.$slots,
|
|
2819
|
+
renderList(S.$slots, (L, N, _) => ({
|
|
2820
|
+
name: N,
|
|
2821
|
+
fn: withCtx((A) => [
|
|
2822
|
+
renderSlot(S.$slots, N, mergeProps({ key: _ }, A))
|
|
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:
|
|
2872
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: g, emptyText: w } = toRefs(d), b = toRaw(store.state.dictConfig), m = computed(() => a.value ? a.value(t.value) : u.value ? u.value : l.value && l.value[b.format.type] ? l.value[b.format.type] : "primary"), D = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
2873
2873
|
let l = ref(null), y = ref(null);
|
|
2874
2874
|
watchEffect(() => {
|
|
2875
2875
|
if (!n.value) {
|
|
2876
2876
|
y.value = t.value;
|
|
2877
2877
|
return;
|
|
2878
2878
|
}
|
|
2879
|
-
GetItemByCode(t.value, n.value).then((
|
|
2880
|
-
|
|
2879
|
+
GetItemByCode(t.value, n.value).then((T) => {
|
|
2880
|
+
T ? (l.value = T, y.value = T[b.format.label]) : (l.value = null, y.value = String(g.value ?? (t.value === 0 ? 0 : t.value || w.value)));
|
|
2881
2881
|
});
|
|
2882
2882
|
});
|
|
2883
2883
|
const v = ref(null);
|
|
2884
|
-
return r({ getElTextRef: () => v.value }), (
|
|
2884
|
+
return r({ getElTextRef: () => v.value }), (T, x) => (openBlock(), createBlock(unref(ElText), mergeProps({
|
|
2885
2885
|
class: "el-text-dict",
|
|
2886
2886
|
ref_key: "ElTextRef",
|
|
2887
2887
|
ref: v,
|
|
2888
|
-
type:
|
|
2889
|
-
color:
|
|
2888
|
+
type: m.value,
|
|
2889
|
+
color: D.value,
|
|
2890
2890
|
disabled: C.value
|
|
2891
|
-
},
|
|
2891
|
+
}, T.$attrs), createSlots({
|
|
2892
2892
|
default: withCtx(() => [
|
|
2893
2893
|
createTextVNode(toDisplayString(unref(y)), 1)
|
|
2894
2894
|
]),
|
|
2895
2895
|
_: 2
|
|
2896
2896
|
}, [
|
|
2897
|
-
renderList(
|
|
2898
|
-
name:
|
|
2899
|
-
fn: withCtx((
|
|
2900
|
-
renderSlot(
|
|
2897
|
+
renderList(T.$slots, (I, j, S) => ({
|
|
2898
|
+
name: j,
|
|
2899
|
+
fn: withCtx((F) => [
|
|
2900
|
+
renderSlot(T.$slots, j, mergeProps({ key: S }, F))
|
|
2901
2901
|
])
|
|
2902
2902
|
}))
|
|
2903
2903
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2922,8 +2922,8 @@ const Mask = (e, r) => {
|
|
|
2922
2922
|
return Object.entries(n).forEach(([y, v]) => {
|
|
2923
2923
|
const E = ToKebabCase(y);
|
|
2924
2924
|
if (!E.startsWith("descriptions-item-") && !E.startsWith("on-descriptions-item-")) {
|
|
2925
|
-
const
|
|
2926
|
-
l[
|
|
2925
|
+
const T = ToCamelCase(E);
|
|
2926
|
+
l[T] = v;
|
|
2927
2927
|
}
|
|
2928
2928
|
}), l;
|
|
2929
2929
|
}), u = computed(() => {
|
|
@@ -2931,8 +2931,8 @@ const Mask = (e, r) => {
|
|
|
2931
2931
|
return Object.entries(n).forEach(([y, v]) => {
|
|
2932
2932
|
const E = ToKebabCase(y);
|
|
2933
2933
|
if (E.startsWith("descriptions-item-") || E.startsWith("on-descriptions-item")) {
|
|
2934
|
-
const
|
|
2935
|
-
l[
|
|
2934
|
+
const T = ToCamelCase(E.replace("descriptions-item-", ""));
|
|
2935
|
+
l[T] = v;
|
|
2936
2936
|
}
|
|
2937
2937
|
}), l;
|
|
2938
2938
|
});
|
|
@@ -2948,7 +2948,7 @@ const Mask = (e, r) => {
|
|
|
2948
2948
|
}, s = (l) => {
|
|
2949
2949
|
const y = {};
|
|
2950
2950
|
return l.defaultVal !== void 0 && l.defaultVal !== null && (y.defaultVal = l.defaultVal), l.emptyText !== void 0 && l.emptyText !== null && (y.emptyText = l.emptyText), l.formatFunIn !== void 0 && l.formatFunIn !== null && (y.formatFunIn = l.formatFunIn), l.formatFunOut !== void 0 && l.formatFunOut !== null && (y.formatFunOut = l.formatFunOut), l.treeSetting !== void 0 && l.treeSetting !== null && (y.treeSetting = l.treeSetting), l.spacer !== void 0 && l.spacer !== null && (y.spacer = l.spacer), Object.assign(y, l.dictOptions || {});
|
|
2951
|
-
}, c = (l) => !!l.maskType || !!l.maskStart || !!l.maskMiddle || !!l.maskEnd,
|
|
2951
|
+
}, c = (l) => !!l.maskType || !!l.maskStart || !!l.maskMiddle || !!l.maskEnd, g = (l) => {
|
|
2952
2952
|
if (l.maskType) {
|
|
2953
2953
|
if (Array.isArray(l.maskType))
|
|
2954
2954
|
return {
|
|
@@ -2977,36 +2977,36 @@ const Mask = (e, r) => {
|
|
|
2977
2977
|
symbol: l.maskSymbol || "*",
|
|
2978
2978
|
defaultVal: l.defaultVal
|
|
2979
2979
|
};
|
|
2980
|
-
}, w = (l, y = {}) => Array.isArray(l) ? l : typeof l == "string" ? l.split(y.spacer || ",") : typeof l == "number" ? [l] : [], b = ref(null),
|
|
2981
|
-
return r({ getElDescriptionsRef: () => b.value, getElDescriptionsItemRefs: () =>
|
|
2980
|
+
}, w = (l, y = {}) => Array.isArray(l) ? l : typeof l == "string" ? l.split(y.spacer || ",") : typeof l == "number" ? [l] : [], b = ref(null), m = ref([]);
|
|
2981
|
+
return r({ getElDescriptionsRef: () => b.value, getElDescriptionsItemRefs: () => m.value }), (l, y) => (openBlock(), createBlock(unref(ElDescriptions), mergeProps({
|
|
2982
2982
|
ref_key: "ElDescriptionsRef",
|
|
2983
2983
|
ref: b
|
|
2984
2984
|
}, a.value), createSlots({
|
|
2985
2985
|
default: withCtx(() => [
|
|
2986
2986
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (v, E) => (openBlock(), createBlock(unref(ElDescriptionsItem), mergeProps({
|
|
2987
2987
|
ref_for: !0,
|
|
2988
|
-
ref: (
|
|
2989
|
-
|
|
2988
|
+
ref: (T) => {
|
|
2989
|
+
T && (m.value[E] = T);
|
|
2990
2990
|
},
|
|
2991
2991
|
key: E
|
|
2992
2992
|
}, o(v)), createSlots({
|
|
2993
2993
|
default: withCtx(() => [
|
|
2994
2994
|
v.dictType ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2995
|
-
v.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(w(v.modelValue, i(v)), (
|
|
2995
|
+
v.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(w(v.modelValue, i(v)), (T, x) => (openBlock(), createBlock(_sfc_main$n, {
|
|
2996
2996
|
key: x,
|
|
2997
|
-
modelValue:
|
|
2997
|
+
modelValue: T || "",
|
|
2998
2998
|
dictType: v.dictType
|
|
2999
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(w(v.modelValue, i(v)), (
|
|
2999
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(w(v.modelValue, i(v)), (T, x) => (openBlock(), createBlock(_sfc_main$e, {
|
|
3000
3000
|
key: x,
|
|
3001
|
-
modelValue:
|
|
3001
|
+
modelValue: T || "",
|
|
3002
3002
|
dictType: v.dictType
|
|
3003
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(w(v.modelValue, i(v)), (
|
|
3003
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(w(v.modelValue, i(v)), (T, x) => (openBlock(), createBlock(_sfc_main$f, {
|
|
3004
3004
|
key: x,
|
|
3005
|
-
modelValue:
|
|
3005
|
+
modelValue: T || "",
|
|
3006
3006
|
dictType: v.dictType
|
|
3007
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(w(v.modelValue, i(v)), (
|
|
3007
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : v.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(w(v.modelValue, i(v)), (T, x) => (openBlock(), createBlock(_sfc_main$d, {
|
|
3008
3008
|
key: x,
|
|
3009
|
-
modelValue:
|
|
3009
|
+
modelValue: T || "",
|
|
3010
3010
|
dictType: v.dictType
|
|
3011
3011
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3012
3012
|
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(v.modelValue, v.dictType, i(v))), 1)
|
|
@@ -3016,19 +3016,19 @@ const Mask = (e, r) => {
|
|
|
3016
3016
|
], 64)) : v.dateFormat && v.modelValue ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
3017
3017
|
createTextVNode(toDisplayString(unref(FormatDate)(v.modelValue, v.dateFormat, v.defaultVal)), 1)
|
|
3018
3018
|
], 64)) : c(v) && v.modelValue ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
3019
|
-
createTextVNode(toDisplayString(unref(Desensitization)(v.modelValue,
|
|
3019
|
+
createTextVNode(toDisplayString(unref(Desensitization)(v.modelValue, g(v))), 1)
|
|
3020
3020
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3021
3021
|
createTextVNode(toDisplayString(v.modelValue !== void 0 && v.modelValue !== null ? v.modelValue : v.defaultVal), 1)
|
|
3022
3022
|
], 64))
|
|
3023
3023
|
]),
|
|
3024
3024
|
_: 2
|
|
3025
3025
|
}, [
|
|
3026
|
-
renderList(v.slotList, (
|
|
3027
|
-
name:
|
|
3026
|
+
renderList(v.slotList, (T, x) => ({
|
|
3027
|
+
name: T.slotName,
|
|
3028
3028
|
fn: withCtx((I) => [
|
|
3029
3029
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3030
3030
|
key: x,
|
|
3031
|
-
render:
|
|
3031
|
+
render: T.render,
|
|
3032
3032
|
scope: I
|
|
3033
3033
|
}, null, 8, ["render", "scope"]))
|
|
3034
3034
|
])
|
|
@@ -3037,10 +3037,10 @@ const Mask = (e, r) => {
|
|
|
3037
3037
|
]),
|
|
3038
3038
|
_: 2
|
|
3039
3039
|
}, [
|
|
3040
|
-
renderList(l.$slots, (v, E,
|
|
3040
|
+
renderList(l.$slots, (v, E, T) => ({
|
|
3041
3041
|
name: E,
|
|
3042
3042
|
fn: withCtx((x) => [
|
|
3043
|
-
renderSlot(l.$slots, E, mergeProps({ key:
|
|
3043
|
+
renderSlot(l.$slots, E, mergeProps({ key: T }, x), void 0, !0)
|
|
3044
3044
|
])
|
|
3045
3045
|
}))
|
|
3046
3046
|
]), 1040));
|
|
@@ -3080,69 +3080,69 @@ 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), g = 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 f = (
|
|
3089
|
+
const f = (p = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : p.isShowLabelColon;
|
|
3090
3090
|
return typeof f == "boolean" ? f : !1;
|
|
3091
|
-
}), b = ref([]),
|
|
3092
|
-
let
|
|
3091
|
+
}), b = ref([]), m = ref({});
|
|
3092
|
+
let D = JSON.parse(JSON.stringify(m));
|
|
3093
3093
|
const C = (f) => {
|
|
3094
|
-
var k,
|
|
3095
|
-
if ((k = n.dynamicComponentsConfig) != null && k.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (
|
|
3094
|
+
var k, O, B, V, R;
|
|
3095
|
+
if ((k = n.dynamicComponentsConfig) != null && k.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 f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (
|
|
3097
|
+
let p = "请选择";
|
|
3098
|
+
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (p = "请输入"), (B = n.dynamicComponentsConfig) != null && B.isShowLabelPlaceholder && (p = p + ((V = f.formItemProps) == null ? void 0 : V.label)), ((R = f.props) == null ? void 0 : R.placeholder) || p || "";
|
|
3099
3099
|
}, l = ref(!1), y = ref(""), v = () => {
|
|
3100
|
-
var k,
|
|
3100
|
+
var k, O, B, V, R, J, P, K, G, M, W;
|
|
3101
3101
|
y.value = "id" + GenerateUUID();
|
|
3102
3102
|
let f = [];
|
|
3103
3103
|
for (let z = 0; z < c.value.length; z++) {
|
|
3104
|
-
const
|
|
3104
|
+
const $ = c.value[z];
|
|
3105
3105
|
let q = null;
|
|
3106
|
-
if (
|
|
3107
|
-
|
|
3108
|
-
id:
|
|
3109
|
-
showRuleType: (
|
|
3110
|
-
validatorRuleType: (
|
|
3106
|
+
if ($ != null && $.isFormData && ($ != null && $.fieldName) ? q = {
|
|
3107
|
+
...$,
|
|
3108
|
+
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3109
|
+
showRuleType: ($ == null ? void 0 : $.showRuleType) || ((k = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : k.showRuleType) || "compare",
|
|
3110
|
+
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((O = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : O.validatorRuleType) || "compare",
|
|
3111
3111
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3112
|
-
visible:
|
|
3112
|
+
visible: $.showRules && $.showRules.length > 0 || $.hidden ? !1 : ($ == null ? void 0 : $.visible) ?? !0,
|
|
3113
3113
|
//
|
|
3114
3114
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
3115
|
-
props:
|
|
3116
|
-
...(
|
|
3117
|
-
|
|
3118
|
-
placeholder: C(
|
|
3115
|
+
props: $.props ? {
|
|
3116
|
+
...(B = n.dynamicComponentsConfig) == null ? void 0 : B.props,
|
|
3117
|
+
...$.props,
|
|
3118
|
+
placeholder: C($)
|
|
3119
3119
|
} : {
|
|
3120
|
-
...(
|
|
3121
|
-
placeholder: C(
|
|
3120
|
+
...(V = n.dynamicComponentsConfig) == null ? void 0 : V.props,
|
|
3121
|
+
placeholder: C($)
|
|
3122
3122
|
},
|
|
3123
|
-
formItemProps:
|
|
3124
|
-
|
|
3125
|
-
id:
|
|
3126
|
-
class: (R =
|
|
3123
|
+
formItemProps: $.formItemProps ? {
|
|
3124
|
+
...$.formItemProps,
|
|
3125
|
+
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3126
|
+
class: (R = $.props) != null && R.class ? $.props.class + " " + (($ == null ? void 0 : $.fieldName) || "") : ($ == null ? void 0 : $.fieldName) || ""
|
|
3127
3127
|
} : {
|
|
3128
|
-
id:
|
|
3129
|
-
class: (
|
|
3128
|
+
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3129
|
+
class: ($ == null ? void 0 : $.fieldName) || ""
|
|
3130
3130
|
}
|
|
3131
3131
|
} : q = {
|
|
3132
|
-
|
|
3133
|
-
id:
|
|
3134
|
-
showRuleType: (
|
|
3135
|
-
validatorRuleType: (
|
|
3132
|
+
...$,
|
|
3133
|
+
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3134
|
+
showRuleType: ($ == null ? void 0 : $.showRuleType) || ((J = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : J.showRuleType) || "compare",
|
|
3135
|
+
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((P = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : P.validatorRuleType) || "compare",
|
|
3136
3136
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3137
|
-
visible:
|
|
3137
|
+
visible: $.showRules && $.showRules.length > 0 || $.hidden ? !1 : ($ == null ? void 0 : $.visible) ?? !0,
|
|
3138
3138
|
// 默认为true(显示)
|
|
3139
3139
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
3140
|
-
props:
|
|
3141
|
-
|
|
3140
|
+
props: $.props ? {
|
|
3141
|
+
...$.props
|
|
3142
3142
|
} : {}
|
|
3143
|
-
}, (K =
|
|
3144
|
-
const Y = ((M =
|
|
3145
|
-
|
|
3143
|
+
}, (K = $.formItemProps) != null && K.rules || (G = i.value) != null && G[$.fieldName]) {
|
|
3144
|
+
const Y = ((M = $.formItemProps) == null ? void 0 : M.rules) || ((W = i.value) == null ? void 0 : W[$.fieldName]) || [];
|
|
3145
|
+
$.fieldName && (q.formItemProps.prop = q.formItemProps.prop || $.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) => {
|
|
3148
3148
|
var se;
|
|
@@ -3156,14 +3156,14 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3156
3156
|
} else if (Array.isArray(U.validator)) {
|
|
3157
3157
|
const Z = [...U.validator];
|
|
3158
3158
|
q.validatorRuleType === "calculate" ? U.validator = (ae, Q, H) => {
|
|
3159
|
-
Z.some((ee) => CheckConditionsByOperation(ee,
|
|
3159
|
+
Z.some((ee) => CheckConditionsByOperation(ee, m.value)) ? H() : H((U == null ? void 0 : U.message) || "错误提示");
|
|
3160
3160
|
} : q.validatorRuleType === "compare" ? U.validator = (ae, Q, H) => {
|
|
3161
|
-
Z.some((ee) => CheckConditions(ee,
|
|
3161
|
+
Z.some((ee) => CheckConditions(ee, m.value)) ? H() : H((U == null ? void 0 : U.message) || "错误提示");
|
|
3162
3162
|
} : q.validatorRuleType && (U.validator = (ae, Q, H) => {
|
|
3163
3163
|
let X = [];
|
|
3164
3164
|
for (let le = 0; le < Z.length; le++) {
|
|
3165
3165
|
const te = Z[le];
|
|
3166
|
-
te.type === "calculate" ? X.push(te.rules.some((oe) => CheckConditionsByOperation(oe,
|
|
3166
|
+
te.type === "calculate" ? X.push(te.rules.some((oe) => CheckConditionsByOperation(oe, m.value))) : te.type === "compare" && X.push(te.rules.some((oe) => CheckConditions(oe, m.value)));
|
|
3167
3167
|
}
|
|
3168
3168
|
CalculateLogicalResult(X, q.validatorRuleType) ? H() : H((U == null ? void 0 : U.message) || "错误提示");
|
|
3169
3169
|
});
|
|
@@ -3175,28 +3175,28 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3175
3175
|
f.push(q);
|
|
3176
3176
|
}
|
|
3177
3177
|
b.value = f;
|
|
3178
|
-
const
|
|
3178
|
+
const p = {};
|
|
3179
3179
|
b.value.forEach((z) => {
|
|
3180
|
-
var
|
|
3180
|
+
var $, q;
|
|
3181
3181
|
if (z.isFormData && z.fieldName) {
|
|
3182
|
-
const Y = (
|
|
3183
|
-
|
|
3182
|
+
const Y = ($ = o.value) == null ? void 0 : $[z.fieldName];
|
|
3183
|
+
p[z.fieldName] = ((q = z == null ? void 0 : z.props) == null ? void 0 : q.modelValue) !== void 0 ? z.props.modelValue : Y !== void 0 ? Y : null;
|
|
3184
3184
|
}
|
|
3185
|
-
}),
|
|
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), T = async (f) => {
|
|
3187
|
+
const p = JSON.parse(JSON.stringify(m.value)), k = sortComponentsByIdDependencies(b.value), O = [], B = (G) => typeof G == "string" ? G.split(",").filter(Boolean) : Array.isArray(G) ? G : [], V = async () => {
|
|
3188
3188
|
if (a.value)
|
|
3189
3189
|
return;
|
|
3190
3190
|
const G = 1e3, M = 50;
|
|
3191
3191
|
let W = 0;
|
|
3192
3192
|
return new Promise((z) => {
|
|
3193
|
-
const
|
|
3194
|
-
a.value || W >= G ? z() : (W += M, setTimeout(
|
|
3193
|
+
const $ = () => {
|
|
3194
|
+
a.value || W >= G ? z() : (W += M, setTimeout($, M));
|
|
3195
3195
|
};
|
|
3196
|
-
|
|
3196
|
+
$();
|
|
3197
3197
|
});
|
|
3198
3198
|
}, R = async (G) => {
|
|
3199
|
-
if (await
|
|
3199
|
+
if (await V(), !a.value)
|
|
3200
3200
|
return !1;
|
|
3201
3201
|
try {
|
|
3202
3202
|
return await (a == null ? void 0 : a.value.validateField(G));
|
|
@@ -3205,26 +3205,26 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3205
3205
|
}
|
|
3206
3206
|
}, J = async (G) => {
|
|
3207
3207
|
var M;
|
|
3208
|
-
await
|
|
3208
|
+
await V();
|
|
3209
3209
|
for (let W = 0; W < G.length; W++) {
|
|
3210
|
-
const z = G[W],
|
|
3210
|
+
const z = G[W], $ = b.value.find((q) => {
|
|
3211
3211
|
var Y;
|
|
3212
3212
|
return ((Y = q == null ? void 0 : q.formItemProps) == null ? void 0 : Y.prop) === z;
|
|
3213
3213
|
});
|
|
3214
|
-
|
|
3214
|
+
m.value[$.fieldName] || (M = a.value) == null || M.clearValidate(z);
|
|
3215
3215
|
}
|
|
3216
3216
|
}, P = {
|
|
3217
3217
|
// 处理"calculate"类型
|
|
3218
|
-
calculate: (G) => G.showRules.some((M) => CheckConditionsByOperation(M,
|
|
3218
|
+
calculate: (G) => G.showRules.some((M) => CheckConditionsByOperation(M, p)),
|
|
3219
3219
|
// 处理"compare"类型
|
|
3220
|
-
compare: (G) => G.showRules.some((M) => CheckConditions(M,
|
|
3220
|
+
compare: (G) => G.showRules.some((M) => CheckConditions(M, p)),
|
|
3221
3221
|
// 处理"validate"类型
|
|
3222
3222
|
validate: async (G) => {
|
|
3223
|
-
const M =
|
|
3223
|
+
const M = B(G.showRules);
|
|
3224
3224
|
if (await R(M))
|
|
3225
3225
|
return !0;
|
|
3226
3226
|
{
|
|
3227
|
-
const z = M.filter((
|
|
3227
|
+
const z = M.filter(($) => $ !== f);
|
|
3228
3228
|
return await J(z), !1;
|
|
3229
3229
|
}
|
|
3230
3230
|
},
|
|
@@ -3234,18 +3234,18 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3234
3234
|
for (const W of G.showRules)
|
|
3235
3235
|
switch (W.type) {
|
|
3236
3236
|
case "calculate":
|
|
3237
|
-
M.push(W.rules.some((z) => CheckConditionsByOperation(z,
|
|
3237
|
+
M.push(W.rules.some((z) => CheckConditionsByOperation(z, p)));
|
|
3238
3238
|
break;
|
|
3239
3239
|
case "compare":
|
|
3240
|
-
M.push(W.rules.some((z) => CheckConditions(z,
|
|
3240
|
+
M.push(W.rules.some((z) => CheckConditions(z, p)));
|
|
3241
3241
|
break;
|
|
3242
3242
|
case "validate": {
|
|
3243
|
-
const z =
|
|
3244
|
-
if (
|
|
3243
|
+
const z = B(W.rules), $ = await R(z);
|
|
3244
|
+
if (!$) {
|
|
3245
3245
|
const q = z.filter((Y) => Y !== f);
|
|
3246
3246
|
await J(q);
|
|
3247
3247
|
}
|
|
3248
|
-
M.push(
|
|
3248
|
+
M.push($);
|
|
3249
3249
|
break;
|
|
3250
3250
|
}
|
|
3251
3251
|
default:
|
|
@@ -3259,49 +3259,49 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3259
3259
|
continue;
|
|
3260
3260
|
const M = G.visible;
|
|
3261
3261
|
let W = M;
|
|
3262
|
-
G.showRules && G.showRules.length > 0 && (W = await (P[G.showRuleType] || P.default)(G)), G.visible = W, G.fieldName && !M && W &&
|
|
3262
|
+
G.showRules && G.showRules.length > 0 && (W = await (P[G.showRuleType] || P.default)(G)), G.visible = W, G.fieldName && !M && W && O.push(G.fieldName), !W && G.fieldName && (p[G.fieldName] = Array.isArray(p[G.fieldName]) ? [] : "");
|
|
3263
3263
|
}
|
|
3264
|
-
const K =
|
|
3264
|
+
const K = O.filter((G) => {
|
|
3265
3265
|
var q, Y;
|
|
3266
3266
|
const M = k.find((re) => re.fieldName === G);
|
|
3267
3267
|
if (!(((Y = (q = M == null ? void 0 : M.formItemProps) == null ? void 0 : q.rules) == null ? void 0 : Y.length) > 0))
|
|
3268
3268
|
return !1;
|
|
3269
|
-
const z =
|
|
3269
|
+
const z = m.value[G];
|
|
3270
3270
|
return typeof z == "string" ? !!z.trim() : typeof z == "object" && z !== null && Object.keys(z).length > 0;
|
|
3271
3271
|
});
|
|
3272
3272
|
if (K.length > 0) {
|
|
3273
|
-
await
|
|
3273
|
+
await V();
|
|
3274
3274
|
const G = x();
|
|
3275
|
-
l.value = !0,
|
|
3275
|
+
l.value = !0, g("update:modelValue", G), setTimeout(() => {
|
|
3276
3276
|
var M;
|
|
3277
3277
|
(M = a.value) == null || M.validateField(K);
|
|
3278
3278
|
}, 0);
|
|
3279
3279
|
}
|
|
3280
3280
|
}, x = () => {
|
|
3281
|
-
const f = JSON.parse(JSON.stringify(
|
|
3282
|
-
for (let
|
|
3283
|
-
const k = b.value[
|
|
3281
|
+
const f = JSON.parse(JSON.stringify(m.value));
|
|
3282
|
+
for (let p = 0; p < b.value.length; p++) {
|
|
3283
|
+
const k = b.value[p];
|
|
3284
3284
|
!k.visible && !k.hidden && delete f[k.fieldName];
|
|
3285
3285
|
}
|
|
3286
3286
|
return f;
|
|
3287
|
-
}, I = (f,
|
|
3288
|
-
const
|
|
3289
|
-
if (typeof f != "object" || f === null ||
|
|
3290
|
-
return f !==
|
|
3287
|
+
}, I = (f, p, k = "") => {
|
|
3288
|
+
const O = [];
|
|
3289
|
+
if (typeof f != "object" || f === null || p === null)
|
|
3290
|
+
return f !== p && O.push({
|
|
3291
3291
|
key: k,
|
|
3292
|
-
oldVal:
|
|
3292
|
+
oldVal: p,
|
|
3293
3293
|
newVal: f
|
|
3294
|
-
}),
|
|
3295
|
-
const
|
|
3296
|
-
for (const
|
|
3297
|
-
const R = k ? `${k}.${
|
|
3298
|
-
typeof J == "object" && J !== null && !Array.isArray(J) ?
|
|
3294
|
+
}), O;
|
|
3295
|
+
const B = /* @__PURE__ */ new Set([...Object.keys(f), ...Object.keys(p)]);
|
|
3296
|
+
for (const V of B) {
|
|
3297
|
+
const R = k ? `${k}.${V}` : V, J = f[V], P = p[V];
|
|
3298
|
+
typeof J == "object" && J !== null && !Array.isArray(J) ? O.push(...I(J, P, R)) : J !== P && O.push({
|
|
3299
3299
|
key: R,
|
|
3300
3300
|
oldVal: P,
|
|
3301
3301
|
newVal: J
|
|
3302
3302
|
});
|
|
3303
3303
|
}
|
|
3304
|
-
return
|
|
3304
|
+
return O;
|
|
3305
3305
|
};
|
|
3306
3306
|
watch(
|
|
3307
3307
|
c,
|
|
@@ -3314,24 +3314,24 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3314
3314
|
// 首次执行
|
|
3315
3315
|
}
|
|
3316
3316
|
);
|
|
3317
|
-
let
|
|
3317
|
+
let j = !0;
|
|
3318
3318
|
watch(
|
|
3319
|
-
|
|
3319
|
+
m,
|
|
3320
3320
|
(f) => {
|
|
3321
|
-
var
|
|
3322
|
-
const
|
|
3323
|
-
if (
|
|
3324
|
-
|
|
3321
|
+
var O;
|
|
3322
|
+
const p = JSON.parse(JSON.stringify(f));
|
|
3323
|
+
if (j)
|
|
3324
|
+
T();
|
|
3325
3325
|
else {
|
|
3326
|
-
const
|
|
3326
|
+
const V = (O = I(p, D).find((R) => {
|
|
3327
3327
|
if (JSON.stringify(R.newVal) !== JSON.stringify(R.oldVal))
|
|
3328
3328
|
return !0;
|
|
3329
|
-
})) == null ? void 0 :
|
|
3330
|
-
|
|
3329
|
+
})) == null ? void 0 : O.key;
|
|
3330
|
+
T(V);
|
|
3331
3331
|
}
|
|
3332
|
-
|
|
3332
|
+
D = p;
|
|
3333
3333
|
const k = x();
|
|
3334
|
-
l.value = !0,
|
|
3334
|
+
l.value = !0, g("update:modelValue", k), j = !1;
|
|
3335
3335
|
},
|
|
3336
3336
|
{
|
|
3337
3337
|
deep: !0,
|
|
@@ -3348,61 +3348,61 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3348
3348
|
},
|
|
3349
3349
|
{ deep: !0 }
|
|
3350
3350
|
);
|
|
3351
|
-
const S = async (f,
|
|
3351
|
+
const S = async (f, p) => {
|
|
3352
3352
|
const k = x();
|
|
3353
|
-
f && f.validate((
|
|
3354
|
-
if (
|
|
3355
|
-
|
|
3356
|
-
else if (
|
|
3357
|
-
const
|
|
3358
|
-
f.scrollToField(
|
|
3353
|
+
f && f.validate((O, B) => {
|
|
3354
|
+
if (O)
|
|
3355
|
+
g("pass", k, p);
|
|
3356
|
+
else if (g("fail", B, k, p), E.value) {
|
|
3357
|
+
const V = Object.keys(B)[0];
|
|
3358
|
+
f.scrollToField(V);
|
|
3359
3359
|
}
|
|
3360
3360
|
});
|
|
3361
|
-
},
|
|
3361
|
+
}, F = async () => {
|
|
3362
3362
|
v(), await nextTick(), a.value && setTimeout(() => {
|
|
3363
3363
|
a.value.resetFields();
|
|
3364
3364
|
}, 30);
|
|
3365
|
-
},
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3368
|
-
},
|
|
3369
|
-
return r({ getFormData: x, resetFormData: v, getComponentRef: (f) => f ?
|
|
3370
|
-
const k = resolveComponent("el-form-item"),
|
|
3371
|
-
return openBlock(), createBlock(
|
|
3372
|
-
model:
|
|
3365
|
+
}, L = (f) => {
|
|
3366
|
+
const p = x();
|
|
3367
|
+
g("action", f, p);
|
|
3368
|
+
}, N = ref({});
|
|
3369
|
+
return r({ getFormData: x, resetFormData: v, getComponentRef: (f) => f ? N.value[f] : N.value, getDynamicComponentsRef: () => a.value }), (f, p) => {
|
|
3370
|
+
const k = resolveComponent("el-form-item"), O = resolveComponent("el-form");
|
|
3371
|
+
return openBlock(), createBlock(O, mergeProps({
|
|
3372
|
+
model: m.value,
|
|
3373
3373
|
class: ["dict-dynamic-components container-class", y.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(b.value, (
|
|
3378
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (B, V) => {
|
|
3379
3379
|
var R;
|
|
3380
3380
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3381
|
-
|
|
3382
|
-
|
|
3381
|
+
B.visible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3382
|
+
B.isFormData ? (openBlock(), createBlock(k, mergeProps({ key: 0 }, B.formItemProps, { class: "comp-item form" }), {
|
|
3383
3383
|
default: withCtx(() => {
|
|
3384
3384
|
var J;
|
|
3385
3385
|
return [
|
|
3386
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3386
|
+
(openBlock(), createBlock(resolveDynamicComponent(B.compName), mergeProps({
|
|
3387
3387
|
ref_for: !0,
|
|
3388
3388
|
ref: (P) => {
|
|
3389
|
-
P &&
|
|
3389
|
+
P && B.fieldName && (N.value[B.fieldName] = P);
|
|
3390
3390
|
},
|
|
3391
|
-
key:
|
|
3392
|
-
},
|
|
3393
|
-
modelValue:
|
|
3391
|
+
key: V
|
|
3392
|
+
}, B.props, {
|
|
3393
|
+
modelValue: m.value[B.fieldName],
|
|
3394
3394
|
"onUpdate:modelValue": (P) => {
|
|
3395
|
-
|
|
3395
|
+
m.value[B.fieldName] = P;
|
|
3396
3396
|
}
|
|
3397
3397
|
}), createSlots({ _: 2 }, [
|
|
3398
|
-
renderList((J =
|
|
3398
|
+
renderList((J = B == null ? void 0 : B.props) == null ? void 0 : J.slotList, (P, K) => ({
|
|
3399
3399
|
name: P.slotName,
|
|
3400
3400
|
fn: withCtx((G) => [
|
|
3401
3401
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3402
3402
|
key: K,
|
|
3403
3403
|
render: P.render,
|
|
3404
3404
|
scope: G,
|
|
3405
|
-
formData:
|
|
3405
|
+
formData: m.value
|
|
3406
3406
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3407
3407
|
])
|
|
3408
3408
|
}))
|
|
@@ -3410,22 +3410,22 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3410
3410
|
];
|
|
3411
3411
|
}),
|
|
3412
3412
|
_: 2
|
|
3413
|
-
}, 1040)) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
3413
|
+
}, 1040)) : (openBlock(), createBlock(resolveDynamicComponent(B.compName), mergeProps({
|
|
3414
3414
|
class: "comp-item",
|
|
3415
|
-
key:
|
|
3416
|
-
},
|
|
3417
|
-
onSubmit: (J) => S(a.value,
|
|
3418
|
-
onReset:
|
|
3419
|
-
onAction: (J) =>
|
|
3415
|
+
key: V
|
|
3416
|
+
}, B.props, {
|
|
3417
|
+
onSubmit: (J) => S(a.value, B),
|
|
3418
|
+
onReset: F,
|
|
3419
|
+
onAction: (J) => L(B)
|
|
3420
3420
|
}), createSlots({ _: 2 }, [
|
|
3421
|
-
renderList((R =
|
|
3421
|
+
renderList((R = B == null ? void 0 : B.props) == null ? void 0 : R.slotList, (J, P) => ({
|
|
3422
3422
|
name: J.slotName,
|
|
3423
3423
|
fn: withCtx((K) => [
|
|
3424
3424
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3425
3425
|
key: P,
|
|
3426
3426
|
render: J.render,
|
|
3427
3427
|
scope: K,
|
|
3428
|
-
formData:
|
|
3428
|
+
formData: m.value
|
|
3429
3429
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3430
3430
|
])
|
|
3431
3431
|
}))
|
|
@@ -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 g, w, b, m, D, C;
|
|
3485
3485
|
return [
|
|
3486
|
-
(
|
|
3486
|
+
(g = unref(n).findNodeByProp(e.column.prop)) != null && g.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, {
|
|
@@ -3514,9 +3514,9 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3514
3514
|
], 64))
|
|
3515
3515
|
], 64)) : (b = unref(n).findNodeByProp(e.column.prop)) != null && b.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
|
-
], 64)) : (
|
|
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)) : (D = unref(n).findNodeByProp(e.column.prop)) != null && D.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 g = s[c];
|
|
3560
|
+
if (g.prop === i)
|
|
3561
|
+
return g;
|
|
3562
|
+
if (g.children && g.children.length > 0) {
|
|
3563
|
+
const w = o(i, g.children);
|
|
3564
3564
|
if (w)
|
|
3565
3565
|
return w;
|
|
3566
3566
|
}
|
|
@@ -3610,6 +3610,10 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3610
3610
|
}, {
|
|
3611
3611
|
__name: "index",
|
|
3612
3612
|
props: {
|
|
3613
|
+
rows: {
|
|
3614
|
+
type: Number,
|
|
3615
|
+
default: 2
|
|
3616
|
+
},
|
|
3613
3617
|
isAutoSetPlaceholder: {
|
|
3614
3618
|
type: Boolean,
|
|
3615
3619
|
default: !0
|
|
@@ -3658,87 +3662,87 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3658
3662
|
},
|
|
3659
3663
|
emits: ["fail", "pass", "reset"],
|
|
3660
3664
|
setup(e, { emit: r }) {
|
|
3661
|
-
const d = e, {
|
|
3662
|
-
let
|
|
3663
|
-
return
|
|
3664
|
-
},
|
|
3665
|
-
let
|
|
3666
|
-
const
|
|
3667
|
-
|
|
3665
|
+
const d = e, { rows: t, isAutoSetPlaceholder: n, isShowLabelPlaceholder: a, list: u, largeWidth: o, mediumWidth: i, smallWidth: s, foldStatus: c, showFold: g, showReset: w, showSearch: b } = toRefs(d), m = r, D = ref(c.value), C = ref(window.innerWidth), l = computed(() => C.value > o.value ? 4 : C.value > i.value ? 3 : C.value > s.value ? 2 : 1), y = (N) => {
|
|
3666
|
+
let _ = "";
|
|
3667
|
+
return l.value === 4 ? _ += "quarter" : l.value === 3 ? _ += "triple" : l.value === 2 ? _ += "half" : _ += "full", l.value === 1 ? g.value && D.value && N + 1 > t.value && (_ += " hide") : g.value && D.value && N + 1 > t.value * l.value - 1 && (_ += " hide"), _;
|
|
3668
|
+
}, v = ref(null);
|
|
3669
|
+
let E = null;
|
|
3670
|
+
const T = (N) => {
|
|
3671
|
+
N && N.length > 0 && (C.value = N[0].contentRect.width);
|
|
3668
3672
|
};
|
|
3669
3673
|
onMounted(() => {
|
|
3670
|
-
var
|
|
3671
|
-
const
|
|
3672
|
-
|
|
3674
|
+
var _;
|
|
3675
|
+
const N = (_ = v.value) == null ? void 0 : _.$el;
|
|
3676
|
+
N && (C.value = N.offsetWidth, E = new ResizeObserver(T), E.observe(N));
|
|
3673
3677
|
}), onUnmounted(() => {
|
|
3674
|
-
|
|
3678
|
+
E && (E.disconnect(), E = null);
|
|
3675
3679
|
});
|
|
3676
|
-
const
|
|
3677
|
-
const
|
|
3678
|
-
for (let
|
|
3679
|
-
const
|
|
3680
|
-
|
|
3680
|
+
const x = reactive({}), I = (N) => {
|
|
3681
|
+
const _ = {};
|
|
3682
|
+
for (let A = 0; A < N.length; A++) {
|
|
3683
|
+
const f = N[A];
|
|
3684
|
+
_[f.fieldName] = f.modelValue || "";
|
|
3681
3685
|
}
|
|
3682
|
-
Object.assign(
|
|
3686
|
+
Object.assign(x, _);
|
|
3683
3687
|
};
|
|
3684
3688
|
watch(
|
|
3685
3689
|
() => d.list,
|
|
3686
|
-
(
|
|
3687
|
-
|
|
3690
|
+
(N) => {
|
|
3691
|
+
I(N);
|
|
3688
3692
|
},
|
|
3689
3693
|
{
|
|
3690
3694
|
immediate: !0
|
|
3691
3695
|
}
|
|
3692
3696
|
);
|
|
3693
|
-
const
|
|
3694
|
-
var
|
|
3695
|
-
if ((
|
|
3696
|
-
return (
|
|
3697
|
-
if (
|
|
3698
|
-
return
|
|
3699
|
-
},
|
|
3700
|
-
await nextTick(),
|
|
3701
|
-
},
|
|
3702
|
-
await nextTick(),
|
|
3703
|
-
|
|
3697
|
+
const j = computed(() => l.value === 1 ? u.value.length > t.value : u.value.length > t.value * l.value - 1), S = (N) => {
|
|
3698
|
+
var _, A;
|
|
3699
|
+
if ((_ = N == null ? void 0 : N.props) != null && _.placeholder)
|
|
3700
|
+
return (A = N == null ? void 0 : N.props) == null ? void 0 : A.placeholder;
|
|
3701
|
+
if (n.value)
|
|
3702
|
+
return N.compName.toLocaleLowerCase().includes("input") ? a.value ? "请输入" + N.label : "请输入" : a.value ? "请选择" + N.label : "请选择";
|
|
3703
|
+
}, F = async () => {
|
|
3704
|
+
await nextTick(), m("reset"), v.value.resetFields();
|
|
3705
|
+
}, L = async () => {
|
|
3706
|
+
await nextTick(), v.value.validate((N, _) => {
|
|
3707
|
+
N ? m("pass", x) : m("fail", _, x);
|
|
3704
3708
|
});
|
|
3705
3709
|
};
|
|
3706
|
-
return (
|
|
3710
|
+
return (N, _) => (openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
3707
3711
|
ref_key: "searchFormRef",
|
|
3708
|
-
ref:
|
|
3712
|
+
ref: v,
|
|
3709
3713
|
style: { minWidth: e.minWidth + "px" },
|
|
3710
|
-
model:
|
|
3714
|
+
model: x,
|
|
3711
3715
|
class: "dict-search-box dict-clearfix"
|
|
3712
|
-
},
|
|
3716
|
+
}, N.$attrs), {
|
|
3713
3717
|
default: withCtx(() => [
|
|
3714
|
-
renderSlot(
|
|
3715
|
-
searchForm:
|
|
3716
|
-
fold:
|
|
3717
|
-
itemsPerRow:
|
|
3718
|
+
renderSlot(N.$slots, "prepend", {
|
|
3719
|
+
searchForm: x,
|
|
3720
|
+
fold: D.value,
|
|
3721
|
+
itemsPerRow: l.value
|
|
3718
3722
|
}, void 0, !0),
|
|
3719
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
3720
|
-
key:
|
|
3721
|
-
class:
|
|
3722
|
-
label:
|
|
3723
|
-
prop:
|
|
3724
|
-
},
|
|
3723
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (A, f) => (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
3724
|
+
key: f,
|
|
3725
|
+
class: y(f),
|
|
3726
|
+
label: A.label,
|
|
3727
|
+
prop: A.fieldName
|
|
3728
|
+
}, A.formItemProps), {
|
|
3725
3729
|
default: withCtx(() => {
|
|
3726
|
-
var
|
|
3730
|
+
var p, k;
|
|
3727
3731
|
return [
|
|
3728
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3729
|
-
modelValue:
|
|
3730
|
-
"onUpdate:modelValue": (
|
|
3731
|
-
clearable: ((
|
|
3732
|
-
placeholder:
|
|
3733
|
-
},
|
|
3734
|
-
renderList((
|
|
3735
|
-
name:
|
|
3736
|
-
fn: withCtx((
|
|
3732
|
+
(openBlock(), createBlock(resolveDynamicComponent(A.compName), mergeProps({
|
|
3733
|
+
modelValue: x[A.fieldName],
|
|
3734
|
+
"onUpdate:modelValue": (O) => x[A.fieldName] = O,
|
|
3735
|
+
clearable: ((p = A == null ? void 0 : A.props) == null ? void 0 : p.clearable) || !0,
|
|
3736
|
+
placeholder: S(A)
|
|
3737
|
+
}, A.props), createSlots({ _: 2 }, [
|
|
3738
|
+
renderList((k = A == null ? void 0 : A.props) == null ? void 0 : k.slotList, (O, B) => ({
|
|
3739
|
+
name: O.slotName,
|
|
3740
|
+
fn: withCtx((V) => [
|
|
3737
3741
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3738
|
-
key:
|
|
3739
|
-
render:
|
|
3740
|
-
scope:
|
|
3741
|
-
formData:
|
|
3742
|
+
key: B,
|
|
3743
|
+
render: O.render,
|
|
3744
|
+
scope: V,
|
|
3745
|
+
formData: x
|
|
3742
3746
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3743
3747
|
])
|
|
3744
3748
|
}))
|
|
@@ -3748,47 +3752,47 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3748
3752
|
_: 2
|
|
3749
3753
|
}, 1040, ["class", "label", "prop"]))), 128)),
|
|
3750
3754
|
createVNode(unref(ElFormItem), {
|
|
3751
|
-
class: normalizeClass(
|
|
3755
|
+
class: normalizeClass(y(0) + " fr")
|
|
3752
3756
|
}, {
|
|
3753
3757
|
default: withCtx(() => [
|
|
3754
|
-
renderSlot(
|
|
3755
|
-
searchForm:
|
|
3756
|
-
fold:
|
|
3757
|
-
itemsPerRow:
|
|
3758
|
+
renderSlot(N.$slots, "button-prefix", {
|
|
3759
|
+
searchForm: x,
|
|
3760
|
+
fold: D.value,
|
|
3761
|
+
itemsPerRow: l.value
|
|
3758
3762
|
}, void 0, !0),
|
|
3759
3763
|
withDirectives(createVNode(unref(ElButton), {
|
|
3760
3764
|
plain: "",
|
|
3761
|
-
onClick:
|
|
3765
|
+
onClick: F
|
|
3762
3766
|
}, {
|
|
3763
3767
|
default: withCtx(() => [
|
|
3764
3768
|
createTextVNode("重 置")
|
|
3765
3769
|
]),
|
|
3766
3770
|
_: 1
|
|
3767
3771
|
}, 512), [
|
|
3768
|
-
[vShow, unref(
|
|
3772
|
+
[vShow, unref(w)]
|
|
3769
3773
|
]),
|
|
3770
3774
|
withDirectives(createVNode(unref(ElButton), {
|
|
3771
3775
|
type: "primary",
|
|
3772
|
-
onClick:
|
|
3776
|
+
onClick: L
|
|
3773
3777
|
}, {
|
|
3774
3778
|
default: withCtx(() => [
|
|
3775
3779
|
createTextVNode("查 询")
|
|
3776
3780
|
]),
|
|
3777
3781
|
_: 1
|
|
3778
3782
|
}, 512), [
|
|
3779
|
-
[vShow, unref(
|
|
3783
|
+
[vShow, unref(b)]
|
|
3780
3784
|
]),
|
|
3781
|
-
renderSlot(
|
|
3782
|
-
searchForm:
|
|
3783
|
-
fold:
|
|
3784
|
-
itemsPerRow:
|
|
3785
|
+
renderSlot(N.$slots, "button-suffix", {
|
|
3786
|
+
searchForm: x,
|
|
3787
|
+
fold: D.value,
|
|
3788
|
+
itemsPerRow: l.value
|
|
3785
3789
|
}, void 0, !0),
|
|
3786
|
-
unref(
|
|
3790
|
+
unref(g) && D.value && j.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3787
3791
|
key: 0,
|
|
3788
3792
|
class: "no-underline",
|
|
3789
3793
|
underline: "never",
|
|
3790
3794
|
type: "primary",
|
|
3791
|
-
onClick:
|
|
3795
|
+
onClick: _[0] || (_[0] = (A) => D.value = !D.value)
|
|
3792
3796
|
}, {
|
|
3793
3797
|
default: withCtx(() => [
|
|
3794
3798
|
createTextVNode("展开"),
|
|
@@ -3801,12 +3805,12 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3801
3805
|
]),
|
|
3802
3806
|
_: 1
|
|
3803
3807
|
})) : createCommentVNode("", !0),
|
|
3804
|
-
unref(
|
|
3808
|
+
unref(g) && !D.value && j.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3805
3809
|
key: 1,
|
|
3806
3810
|
class: "no-underline",
|
|
3807
3811
|
underline: "never",
|
|
3808
3812
|
type: "primary",
|
|
3809
|
-
onClick:
|
|
3813
|
+
onClick: _[1] || (_[1] = (A) => D.value = !D.value)
|
|
3810
3814
|
}, {
|
|
3811
3815
|
default: withCtx(() => [
|
|
3812
3816
|
createTextVNode("收起"),
|
|
@@ -3822,16 +3826,16 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3822
3826
|
]),
|
|
3823
3827
|
_: 3
|
|
3824
3828
|
}, 8, ["class"]),
|
|
3825
|
-
renderSlot(
|
|
3826
|
-
searchForm:
|
|
3827
|
-
fold:
|
|
3828
|
-
itemsPerRow:
|
|
3829
|
+
renderSlot(N.$slots, "append", {
|
|
3830
|
+
searchForm: x,
|
|
3831
|
+
fold: D.value,
|
|
3832
|
+
itemsPerRow: l.value
|
|
3829
3833
|
}, void 0, !0)
|
|
3830
3834
|
]),
|
|
3831
3835
|
_: 3
|
|
3832
3836
|
}, 16, ["style", "model"]));
|
|
3833
3837
|
}
|
|
3834
|
-
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3838
|
+
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c13122dd"]]);
|
|
3835
3839
|
dictComponent$1.install = function(e) {
|
|
3836
3840
|
e.component(dictComponent$1.name, dictComponent$1);
|
|
3837
3841
|
};
|
|
@@ -3874,7 +3878,7 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3874
3878
|
},
|
|
3875
3879
|
emits: ["update:modelValue", "focus", "blur"],
|
|
3876
3880
|
setup(e, { emit: r }) {
|
|
3877
|
-
const d = e, { modelValue: t, maskType: n, maskStart: a, maskMiddle: u, maskEnd: o, maskSymbol: i } = toRefs(d), s = r, c = ref(d.modelValue),
|
|
3881
|
+
const d = e, { modelValue: t, maskType: n, maskStart: a, maskMiddle: u, maskEnd: o, maskSymbol: i } = toRefs(d), s = r, c = ref(d.modelValue), g = ref(!1), w = computed(() => !!n.value || Number(a.value) > 0 || Number(u.value) > 0 || Number(o.value) > 0), b = computed(() => {
|
|
3878
3882
|
const y = {
|
|
3879
3883
|
start: Number(a.value) || 0,
|
|
3880
3884
|
middle: Number(u.value) || 0,
|
|
@@ -3889,27 +3893,27 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3889
3893
|
end: n.value[2] || y.end,
|
|
3890
3894
|
symbol: n.value[3] || y.symbol
|
|
3891
3895
|
} : typeof n.value == "object" && n.value !== null ? { ...y, ...n.value } : y;
|
|
3892
|
-
}),
|
|
3893
|
-
|
|
3894
|
-
},
|
|
3895
|
-
|
|
3896
|
+
}), m = (y = t.value) => {
|
|
3897
|
+
g.value ? c.value = y : w.value ? c.value = Desensitization(y, b.value) : c.value = y;
|
|
3898
|
+
}, D = inject("elFormItem", null), C = (y) => {
|
|
3899
|
+
g.value = !0, m(), s("focus", y);
|
|
3896
3900
|
}, l = (y) => {
|
|
3897
|
-
|
|
3901
|
+
g.value = !1, s("update:modelValue", c.value), m(), s("blur", y), D && D.validate("blur");
|
|
3898
3902
|
};
|
|
3899
3903
|
return watch(
|
|
3900
3904
|
c,
|
|
3901
3905
|
(y) => {
|
|
3902
|
-
|
|
3906
|
+
g.value && s("update:modelValue", y);
|
|
3903
3907
|
},
|
|
3904
3908
|
{ immediate: !1 }
|
|
3905
3909
|
), watch(
|
|
3906
3910
|
t,
|
|
3907
3911
|
(y) => {
|
|
3908
|
-
|
|
3912
|
+
m(y);
|
|
3909
3913
|
},
|
|
3910
3914
|
{ immediate: !0, deep: !0 }
|
|
3911
3915
|
), onUnmounted(() => {
|
|
3912
|
-
|
|
3916
|
+
g.value = !1;
|
|
3913
3917
|
}), (y, v) => (openBlock(), createBlock(unref(ElInput), mergeProps({
|
|
3914
3918
|
modelValue: c.value,
|
|
3915
3919
|
"onUpdate:modelValue": v[0] || (v[0] = (E) => c.value = E)
|
|
@@ -3918,10 +3922,10 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3918
3922
|
onBlur: l,
|
|
3919
3923
|
autocomplete: "off"
|
|
3920
3924
|
}), createSlots({ _: 2 }, [
|
|
3921
|
-
renderList(y.$slots, (E,
|
|
3922
|
-
name:
|
|
3925
|
+
renderList(y.$slots, (E, T, x) => ({
|
|
3926
|
+
name: T,
|
|
3923
3927
|
fn: withCtx((I) => [
|
|
3924
|
-
renderSlot(y.$slots,
|
|
3928
|
+
renderSlot(y.$slots, T, normalizeProps(guardReactiveProps(I)))
|
|
3925
3929
|
])
|
|
3926
3930
|
}))
|
|
3927
3931
|
]), 1040, ["modelValue"]));
|
|
@@ -3990,79 +3994,79 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3990
3994
|
},
|
|
3991
3995
|
emits: ["dictChange"],
|
|
3992
3996
|
setup(e, { expose: r, emit: d }) {
|
|
3993
|
-
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun:
|
|
3994
|
-
const
|
|
3995
|
-
return Object.entries(b).forEach(([k,
|
|
3996
|
-
const
|
|
3997
|
-
if (!
|
|
3998
|
-
const
|
|
3999
|
-
|
|
3997
|
+
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: g, disabledDataFun: w } = toRefs(t), b = useAttrs(), m = computed(() => {
|
|
3998
|
+
const p = {};
|
|
3999
|
+
return Object.entries(b).forEach(([k, O]) => {
|
|
4000
|
+
const B = ToKebabCase(k);
|
|
4001
|
+
if (!B.startsWith("radio-button-") && !B.startsWith("on-radio-button-")) {
|
|
4002
|
+
const V = ToCamelCase(B);
|
|
4003
|
+
p[V] = O;
|
|
4000
4004
|
}
|
|
4001
|
-
}),
|
|
4002
|
-
}),
|
|
4003
|
-
const
|
|
4004
|
-
return Object.entries(b).forEach(([k,
|
|
4005
|
-
const
|
|
4006
|
-
if (
|
|
4007
|
-
const
|
|
4008
|
-
|
|
4005
|
+
}), p;
|
|
4006
|
+
}), D = computed(() => {
|
|
4007
|
+
const p = {};
|
|
4008
|
+
return Object.entries(b).forEach(([k, O]) => {
|
|
4009
|
+
const B = ToKebabCase(k);
|
|
4010
|
+
if (B.startsWith("radio-button-") || B.startsWith("on-radio-button-")) {
|
|
4011
|
+
const V = ToCamelCase(B.replace("radio-button-", ""));
|
|
4012
|
+
p[V] = O;
|
|
4009
4013
|
}
|
|
4010
|
-
}),
|
|
4011
|
-
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (
|
|
4014
|
+
}), p;
|
|
4015
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (p) => {
|
|
4012
4016
|
if (!c.value) {
|
|
4013
|
-
y("dictChange",
|
|
4017
|
+
y("dictChange", p);
|
|
4014
4018
|
return;
|
|
4015
4019
|
}
|
|
4016
|
-
const k = E.list.find((
|
|
4020
|
+
const k = E.list.find((O) => O[l.format.value] === p);
|
|
4017
4021
|
y("dictChange", k);
|
|
4018
4022
|
}, E = reactive({
|
|
4019
4023
|
list: []
|
|
4020
|
-
}),
|
|
4024
|
+
}), T = async () => {
|
|
4021
4025
|
if (!i.value || u.value && u.value.length > 0)
|
|
4022
4026
|
return;
|
|
4023
|
-
let
|
|
4027
|
+
let p = [];
|
|
4024
4028
|
if (typeof i.value == "object") {
|
|
4025
4029
|
C.value = i.value.type;
|
|
4026
4030
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4027
|
-
|
|
4028
|
-
const { filters:
|
|
4029
|
-
|
|
4031
|
+
p = [].concat(k[C.value]);
|
|
4032
|
+
const { filters: O, filterType: B = l.format.value, reverse: V = !1 } = i.value, R = typeof O == "string" ? O.split(",") : O;
|
|
4033
|
+
V ? p = p.filter((J) => !R.includes(J[B])) : p = p.filter((J) => R.includes(J[B]));
|
|
4030
4034
|
} else {
|
|
4031
4035
|
C.value = i.value;
|
|
4032
4036
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4033
|
-
|
|
4037
|
+
p = [].concat(k[C.value]);
|
|
4034
4038
|
}
|
|
4035
|
-
if (
|
|
4036
|
-
|
|
4039
|
+
if (g.value && (p = g.value(p)), w.value)
|
|
4040
|
+
p = p.map((k) => ({
|
|
4037
4041
|
...k,
|
|
4038
4042
|
[l.format.disabled]: w.value(k)
|
|
4039
4043
|
}));
|
|
4040
4044
|
else if (s.value) {
|
|
4041
|
-
const { disabledValues: k, disabledType:
|
|
4042
|
-
|
|
4045
|
+
const { disabledValues: k, disabledType: O = l.format.value, reverse: B = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4046
|
+
B ? p = p.map((R) => {
|
|
4043
4047
|
const J = JSON.parse(JSON.stringify(R));
|
|
4044
|
-
return J[l.format.disabled] = !
|
|
4045
|
-
}) :
|
|
4048
|
+
return J[l.format.disabled] = !V.includes(J[O]) || J[l.format.disabled], J;
|
|
4049
|
+
}) : p = p.map((R) => {
|
|
4046
4050
|
const J = JSON.parse(JSON.stringify(R));
|
|
4047
|
-
return J[l.format.disabled] =
|
|
4051
|
+
return J[l.format.disabled] = V.includes(J[O]) || J[l.format.disabled], J;
|
|
4048
4052
|
});
|
|
4049
4053
|
}
|
|
4050
|
-
a.value &&
|
|
4054
|
+
a.value && p.unshift({
|
|
4051
4055
|
[l.format.value]: "",
|
|
4052
4056
|
[l.format.label]: a.value
|
|
4053
|
-
}), E.list =
|
|
4054
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes),
|
|
4057
|
+
}), E.list = p;
|
|
4058
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value), S = inject(formItemContextKey), F = inject(formContextKey), L = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (S == null ? void 0 : S.disabled) || (F == null ? void 0 : F.disabled) || !1);
|
|
4055
4059
|
watch(
|
|
4056
|
-
[x, I,
|
|
4057
|
-
([
|
|
4058
|
-
!
|
|
4059
|
-
[l.format.value]:
|
|
4060
|
-
[l.format.label]:
|
|
4061
|
-
[l.format.disabled]: !!
|
|
4062
|
-
...
|
|
4063
|
-
})) : E.list = E.list.map((
|
|
4064
|
-
[l.format.value]:
|
|
4065
|
-
[l.format.label]:
|
|
4060
|
+
[x, I, j],
|
|
4061
|
+
([p, k, O]) => {
|
|
4062
|
+
!p && !k && O && O.length === 0 && T(), 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((V) => ({
|
|
4063
|
+
[l.format.value]: V[o.value.value],
|
|
4064
|
+
[l.format.label]: V[o.value.label],
|
|
4065
|
+
[l.format.disabled]: !!V[o.value.disabled],
|
|
4066
|
+
...V
|
|
4067
|
+
})) : E.list = E.list.map((V) => ({
|
|
4068
|
+
[l.format.value]: V,
|
|
4069
|
+
[l.format.label]: V
|
|
4066
4070
|
})), a.value && E.list.unshift({
|
|
4067
4071
|
[l.format.value]: "",
|
|
4068
4072
|
[l.format.label]: a.value
|
|
@@ -4072,34 +4076,34 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4072
4076
|
immediate: !0
|
|
4073
4077
|
}
|
|
4074
4078
|
);
|
|
4075
|
-
const
|
|
4076
|
-
return r({ getElRadioGroupRef: () =>
|
|
4079
|
+
const N = ref([]), _ = () => N.value, A = ref(null);
|
|
4080
|
+
return r({ getElRadioGroupRef: () => A.value, getElRadioButtonRefs: _ }), (p, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4077
4081
|
ref_key: "ElRadioGroupRef",
|
|
4078
|
-
ref:
|
|
4079
|
-
disabled:
|
|
4080
|
-
},
|
|
4082
|
+
ref: A,
|
|
4083
|
+
disabled: L.value
|
|
4084
|
+
}, m.value, { onChange: v }), createSlots({
|
|
4081
4085
|
default: withCtx(() => [
|
|
4082
|
-
|
|
4086
|
+
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (O, B) => (openBlock(), createBlock(unref(ElRadioButton), mergeProps({
|
|
4083
4087
|
ref_for: !0,
|
|
4084
|
-
ref: (
|
|
4085
|
-
|
|
4088
|
+
ref: (V) => {
|
|
4089
|
+
V && (N.value[B] = V);
|
|
4086
4090
|
},
|
|
4087
|
-
key:
|
|
4088
|
-
disabled:
|
|
4089
|
-
label:
|
|
4090
|
-
},
|
|
4091
|
+
key: O[unref(l).format.value],
|
|
4092
|
+
disabled: L.value || O[unref(l).format.disabled],
|
|
4093
|
+
label: O[unref(l).format.value]
|
|
4094
|
+
}, D.value), {
|
|
4091
4095
|
default: withCtx(() => [
|
|
4092
|
-
createTextVNode(toDisplayString(
|
|
4096
|
+
createTextVNode(toDisplayString(O[unref(l).format.label]), 1)
|
|
4093
4097
|
]),
|
|
4094
4098
|
_: 2
|
|
4095
4099
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4096
4100
|
]),
|
|
4097
4101
|
_: 2
|
|
4098
4102
|
}, [
|
|
4099
|
-
renderList(
|
|
4100
|
-
name:
|
|
4103
|
+
renderList(p.$slots, (O, B, V) => ({
|
|
4104
|
+
name: B,
|
|
4101
4105
|
fn: withCtx((R) => [
|
|
4102
|
-
renderSlot(
|
|
4106
|
+
renderSlot(p.$slots, B, normalizeProps(guardReactiveProps(R)))
|
|
4103
4107
|
])
|
|
4104
4108
|
}))
|
|
4105
4109
|
]), 1040, ["disabled"]));
|
|
@@ -4163,79 +4167,79 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4163
4167
|
},
|
|
4164
4168
|
emits: ["dictChange"],
|
|
4165
4169
|
setup(e, { expose: r, emit: d }) {
|
|
4166
|
-
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun:
|
|
4167
|
-
const
|
|
4168
|
-
return Object.entries(b).forEach(([k,
|
|
4169
|
-
const
|
|
4170
|
-
if (!
|
|
4171
|
-
const
|
|
4172
|
-
|
|
4170
|
+
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: g, disabledDataFun: w } = toRefs(t), b = useAttrs(), m = computed(() => {
|
|
4171
|
+
const p = {};
|
|
4172
|
+
return Object.entries(b).forEach(([k, O]) => {
|
|
4173
|
+
const B = ToKebabCase(k);
|
|
4174
|
+
if (!B.startsWith("radio-") && !B.startsWith("on-radio-")) {
|
|
4175
|
+
const V = ToCamelCase(B);
|
|
4176
|
+
p[V] = O;
|
|
4173
4177
|
}
|
|
4174
|
-
}),
|
|
4175
|
-
}),
|
|
4176
|
-
const
|
|
4177
|
-
return Object.entries(b).forEach(([k,
|
|
4178
|
-
const
|
|
4179
|
-
if (
|
|
4180
|
-
const
|
|
4181
|
-
|
|
4178
|
+
}), p;
|
|
4179
|
+
}), D = computed(() => {
|
|
4180
|
+
const p = {};
|
|
4181
|
+
return Object.entries(b).forEach(([k, O]) => {
|
|
4182
|
+
const B = ToKebabCase(k);
|
|
4183
|
+
if (B.startsWith("radio-") || B.startsWith("on-radio-")) {
|
|
4184
|
+
const V = ToCamelCase(B.replace("radio-", ""));
|
|
4185
|
+
p[V] = O;
|
|
4182
4186
|
}
|
|
4183
|
-
}),
|
|
4184
|
-
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (
|
|
4187
|
+
}), p;
|
|
4188
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (p) => {
|
|
4185
4189
|
if (!c.value) {
|
|
4186
|
-
y("dictChange",
|
|
4190
|
+
y("dictChange", p);
|
|
4187
4191
|
return;
|
|
4188
4192
|
}
|
|
4189
|
-
const k = E.list.find((
|
|
4193
|
+
const k = E.list.find((O) => O[l.format.value] === p);
|
|
4190
4194
|
y("dictChange", k);
|
|
4191
4195
|
}, E = reactive({
|
|
4192
4196
|
list: []
|
|
4193
|
-
}),
|
|
4197
|
+
}), T = async () => {
|
|
4194
4198
|
if (!i.value || u.value && u.value.length > 0)
|
|
4195
4199
|
return;
|
|
4196
|
-
let
|
|
4200
|
+
let p = [];
|
|
4197
4201
|
if (typeof i.value == "object") {
|
|
4198
4202
|
C.value = i.value.type;
|
|
4199
4203
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4200
|
-
|
|
4201
|
-
const { filters:
|
|
4202
|
-
|
|
4204
|
+
p = [].concat(k[C.value]);
|
|
4205
|
+
const { filters: O, filterType: B = l.format.value, reverse: V = !1 } = i.value, R = typeof O == "string" ? O.split(",") : O;
|
|
4206
|
+
V ? p = p.filter((J) => !R.includes(J[B])) : p = p.filter((J) => R.includes(J[B]));
|
|
4203
4207
|
} else {
|
|
4204
4208
|
C.value = i.value;
|
|
4205
4209
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4206
|
-
|
|
4210
|
+
p = [].concat(k[C.value]);
|
|
4207
4211
|
}
|
|
4208
|
-
if (
|
|
4209
|
-
|
|
4212
|
+
if (g.value && (p = g.value(p)), w.value)
|
|
4213
|
+
p = p.map((k) => ({
|
|
4210
4214
|
...k,
|
|
4211
4215
|
[l.format.disabled]: w.value(k)
|
|
4212
4216
|
}));
|
|
4213
4217
|
else if (s.value) {
|
|
4214
|
-
const { disabledValues: k, disabledType:
|
|
4215
|
-
|
|
4218
|
+
const { disabledValues: k, disabledType: O = l.format.value, reverse: B = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4219
|
+
B ? p = p.map((R) => {
|
|
4216
4220
|
const J = JSON.parse(JSON.stringify(R));
|
|
4217
|
-
return J[l.format.disabled] = !
|
|
4218
|
-
}) :
|
|
4221
|
+
return J[l.format.disabled] = !V.includes(J[O]) || J[l.format.disabled], J;
|
|
4222
|
+
}) : p = p.map((R) => {
|
|
4219
4223
|
const J = JSON.parse(JSON.stringify(R));
|
|
4220
|
-
return J[l.format.disabled] =
|
|
4224
|
+
return J[l.format.disabled] = V.includes(J[O]) || J[l.format.disabled], J;
|
|
4221
4225
|
});
|
|
4222
4226
|
}
|
|
4223
|
-
a.value &&
|
|
4227
|
+
a.value && p.unshift({
|
|
4224
4228
|
[l.format.value]: "",
|
|
4225
4229
|
[l.format.label]: a.value
|
|
4226
|
-
}), E.list =
|
|
4227
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes),
|
|
4230
|
+
}), E.list = p;
|
|
4231
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value), S = inject(formItemContextKey), F = inject(formContextKey), L = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (S == null ? void 0 : S.disabled) || (F == null ? void 0 : F.disabled) || !1);
|
|
4228
4232
|
watch(
|
|
4229
|
-
[x, I,
|
|
4230
|
-
([
|
|
4231
|
-
!
|
|
4232
|
-
[l.format.value]:
|
|
4233
|
-
[l.format.label]:
|
|
4234
|
-
[l.format.disabled]: !!
|
|
4235
|
-
...
|
|
4236
|
-
})) : E.list = E.list.map((
|
|
4237
|
-
[l.format.value]:
|
|
4238
|
-
[l.format.label]:
|
|
4233
|
+
[x, I, j],
|
|
4234
|
+
([p, k, O]) => {
|
|
4235
|
+
!p && !k && O && O.length === 0 && T(), 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((V) => ({
|
|
4236
|
+
[l.format.value]: V[o.value.value],
|
|
4237
|
+
[l.format.label]: V[o.value.label],
|
|
4238
|
+
[l.format.disabled]: !!V[o.value.disabled],
|
|
4239
|
+
...V
|
|
4240
|
+
})) : E.list = E.list.map((V) => ({
|
|
4241
|
+
[l.format.value]: V,
|
|
4242
|
+
[l.format.label]: V
|
|
4239
4243
|
})), a.value && E.list.unshift({
|
|
4240
4244
|
[l.format.value]: "",
|
|
4241
4245
|
[l.format.label]: a.value
|
|
@@ -4245,34 +4249,34 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4245
4249
|
immediate: !0
|
|
4246
4250
|
}
|
|
4247
4251
|
);
|
|
4248
|
-
const
|
|
4249
|
-
return r({ geElRadioGroupRef: () =>
|
|
4252
|
+
const N = ref([]), _ = () => N.value, A = ref(null);
|
|
4253
|
+
return r({ geElRadioGroupRef: () => A.value, getElRadioRefs: _ }), (p, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4250
4254
|
ref_key: "ElRadioGroupRef",
|
|
4251
|
-
ref:
|
|
4252
|
-
disabled:
|
|
4253
|
-
},
|
|
4255
|
+
ref: A,
|
|
4256
|
+
disabled: L.value
|
|
4257
|
+
}, m.value, { onChange: v }), createSlots({
|
|
4254
4258
|
default: withCtx(() => [
|
|
4255
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4259
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (O, B) => (openBlock(), createBlock(unref(ElRadio), mergeProps({
|
|
4256
4260
|
ref_for: !0,
|
|
4257
|
-
ref: (
|
|
4258
|
-
|
|
4261
|
+
ref: (V) => {
|
|
4262
|
+
V && (N.value[B] = V);
|
|
4259
4263
|
},
|
|
4260
|
-
key:
|
|
4261
|
-
disabled:
|
|
4262
|
-
label:
|
|
4263
|
-
},
|
|
4264
|
+
key: O[unref(l).format.value],
|
|
4265
|
+
disabled: L.value || O[unref(l).format.disabled],
|
|
4266
|
+
label: O[unref(l).format.value]
|
|
4267
|
+
}, D.value), {
|
|
4264
4268
|
default: withCtx(() => [
|
|
4265
|
-
createTextVNode(toDisplayString(
|
|
4269
|
+
createTextVNode(toDisplayString(O[unref(l).format.label]), 1)
|
|
4266
4270
|
]),
|
|
4267
4271
|
_: 2
|
|
4268
4272
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4269
4273
|
]),
|
|
4270
4274
|
_: 2
|
|
4271
4275
|
}, [
|
|
4272
|
-
renderList(
|
|
4273
|
-
name:
|
|
4276
|
+
renderList(p.$slots, (O, B, V) => ({
|
|
4277
|
+
name: B,
|
|
4274
4278
|
fn: withCtx((R) => [
|
|
4275
|
-
renderSlot(
|
|
4279
|
+
renderSlot(p.$slots, B, normalizeProps(guardReactiveProps(R)))
|
|
4276
4280
|
])
|
|
4277
4281
|
}))
|
|
4278
4282
|
]), 1040, ["disabled"]));
|
|
@@ -4337,37 +4341,37 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4337
4341
|
},
|
|
4338
4342
|
emits: ["dictChange"],
|
|
4339
4343
|
setup(e, { expose: r, emit: d }) {
|
|
4340
|
-
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue:
|
|
4344
|
+
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: g, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(), D = computed(() => {
|
|
4341
4345
|
const f = {};
|
|
4342
|
-
return Object.entries(
|
|
4343
|
-
const
|
|
4344
|
-
if (!
|
|
4345
|
-
const
|
|
4346
|
-
f[
|
|
4346
|
+
return Object.entries(m).forEach(([p, k]) => {
|
|
4347
|
+
const O = ToKebabCase(p);
|
|
4348
|
+
if (!O.startsWith("option-") && !O.startsWith("on-option-")) {
|
|
4349
|
+
const B = ToCamelCase(O);
|
|
4350
|
+
f[B] = k;
|
|
4347
4351
|
}
|
|
4348
4352
|
}), f;
|
|
4349
4353
|
}), C = computed(() => {
|
|
4350
4354
|
const f = {};
|
|
4351
|
-
return Object.entries(
|
|
4352
|
-
const
|
|
4353
|
-
if (
|
|
4354
|
-
const
|
|
4355
|
-
f[
|
|
4355
|
+
return Object.entries(m).forEach(([p, k]) => {
|
|
4356
|
+
const O = ToKebabCase(p);
|
|
4357
|
+
if (O.startsWith("option-") || O.startsWith("on-option-")) {
|
|
4358
|
+
const B = ToCamelCase(O.replace("option-", ""));
|
|
4359
|
+
f[B] = k;
|
|
4356
4360
|
}
|
|
4357
4361
|
}), f;
|
|
4358
4362
|
}), l = ref(""), y = toRaw(store.state.dictConfig), v = d, E = (f) => {
|
|
4359
|
-
if (!
|
|
4363
|
+
if (!g.value) {
|
|
4360
4364
|
v("dictChange", f);
|
|
4361
4365
|
return;
|
|
4362
4366
|
}
|
|
4363
|
-
if (!
|
|
4364
|
-
const
|
|
4365
|
-
v("dictChange",
|
|
4367
|
+
if (!m.multiple && m.multiple !== "") {
|
|
4368
|
+
const p = T.list.find((k) => k[y.format.value] === f);
|
|
4369
|
+
v("dictChange", p);
|
|
4366
4370
|
} else {
|
|
4367
|
-
const
|
|
4368
|
-
v("dictChange",
|
|
4371
|
+
const p = T.list.filter((k) => f.includes(k[y.format.value]));
|
|
4372
|
+
v("dictChange", p);
|
|
4369
4373
|
}
|
|
4370
|
-
},
|
|
4374
|
+
}, T = reactive({
|
|
4371
4375
|
list: []
|
|
4372
4376
|
}), x = async () => {
|
|
4373
4377
|
if (!s.value || o.value && o.value.length > 0)
|
|
@@ -4375,75 +4379,75 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4375
4379
|
let f = [];
|
|
4376
4380
|
if (typeof s.value == "object") {
|
|
4377
4381
|
l.value = s.value.type;
|
|
4378
|
-
const
|
|
4379
|
-
f = [].concat(
|
|
4380
|
-
const { filters: k, filterType:
|
|
4381
|
-
|
|
4382
|
+
const p = await store.actions.getDictDataObj(l.value);
|
|
4383
|
+
f = [].concat(p[l.value]);
|
|
4384
|
+
const { filters: k, filterType: O = y.format.value, reverse: B = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4385
|
+
B ? f = f.filter((R) => !V.includes(R[O])) : f = f.filter((R) => V.includes(R[O]));
|
|
4382
4386
|
} else {
|
|
4383
4387
|
l.value = s.value;
|
|
4384
|
-
const
|
|
4385
|
-
f = [].concat(
|
|
4388
|
+
const p = await store.actions.getDictDataObj(l.value);
|
|
4389
|
+
f = [].concat(p[l.value]);
|
|
4386
4390
|
}
|
|
4387
4391
|
if (w.value && (f = w.value(f)), b.value)
|
|
4388
|
-
f = f.map((
|
|
4389
|
-
...
|
|
4390
|
-
[y.format.disabled]: b.value(
|
|
4392
|
+
f = f.map((p) => ({
|
|
4393
|
+
...p,
|
|
4394
|
+
[y.format.disabled]: b.value(p)
|
|
4391
4395
|
}));
|
|
4392
4396
|
else if (c.value) {
|
|
4393
|
-
const { disabledValues:
|
|
4394
|
-
|
|
4395
|
-
const R = JSON.parse(JSON.stringify(
|
|
4396
|
-
return R[y.format.disabled] = !
|
|
4397
|
-
}) : f = f.map((
|
|
4398
|
-
const R = JSON.parse(JSON.stringify(
|
|
4399
|
-
return R[y.format.disabled] =
|
|
4397
|
+
const { disabledValues: p, disabledType: k = y.format.value, reverse: O = !1 } = c.value, B = typeof p == "string" ? p.split(",") : p;
|
|
4398
|
+
O ? f = f.map((V) => {
|
|
4399
|
+
const R = JSON.parse(JSON.stringify(V));
|
|
4400
|
+
return R[y.format.disabled] = !B.includes(R[k]) || R[y.format.disabled], R;
|
|
4401
|
+
}) : f = f.map((V) => {
|
|
4402
|
+
const R = JSON.parse(JSON.stringify(V));
|
|
4403
|
+
return R[y.format.disabled] = B.includes(R[k]) || R[y.format.disabled], R;
|
|
4400
4404
|
});
|
|
4401
4405
|
}
|
|
4402
|
-
n.value && !
|
|
4406
|
+
n.value && !m.multiple && m.multiple !== "" && f.unshift({
|
|
4403
4407
|
[y.format.value]: "",
|
|
4404
4408
|
[y.format.label]: n.value
|
|
4405
|
-
}),
|
|
4406
|
-
}, I = computed(() => store.state.isGettingDictTypes.includes(l.value)),
|
|
4409
|
+
}), T.list = f;
|
|
4410
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(l.value)), j = computed(() => store.state.isGettingAllDictTypes), S = computed(() => o.value);
|
|
4407
4411
|
watch(
|
|
4408
|
-
[I,
|
|
4409
|
-
([f,
|
|
4410
|
-
if (!f && !
|
|
4411
|
-
let
|
|
4412
|
-
|
|
4413
|
-
[y.format.value]:
|
|
4414
|
-
[y.format.label]:
|
|
4415
|
-
[y.format.disabled]: !!
|
|
4416
|
-
...
|
|
4417
|
-
})) :
|
|
4418
|
-
[y.format.value]:
|
|
4419
|
-
[y.format.label]:
|
|
4420
|
-
})), n.value && !
|
|
4412
|
+
[I, j, S],
|
|
4413
|
+
([f, p, k]) => {
|
|
4414
|
+
if (!f && !p && k && k.length === 0 && x(), k.length > 0) {
|
|
4415
|
+
let O = JSON.parse(JSON.stringify(k));
|
|
4416
|
+
O.length > 0 && (Object.prototype.toString.call(O[0]) === "[object Object]" ? O = O.map((V) => ({
|
|
4417
|
+
[y.format.value]: V[i.value.value],
|
|
4418
|
+
[y.format.label]: V[i.value.label],
|
|
4419
|
+
[y.format.disabled]: !!V[i.value.disabled],
|
|
4420
|
+
...V
|
|
4421
|
+
})) : O = O.map((V) => ({
|
|
4422
|
+
[y.format.value]: V,
|
|
4423
|
+
[y.format.label]: V
|
|
4424
|
+
})), n.value && !m.multiple && m.multiple !== "" && O.unshift({
|
|
4421
4425
|
[y.format.value]: "",
|
|
4422
4426
|
[y.format.label]: n.value
|
|
4423
|
-
}),
|
|
4427
|
+
}), T.list = O);
|
|
4424
4428
|
}
|
|
4425
4429
|
},
|
|
4426
4430
|
{
|
|
4427
4431
|
immediate: !0
|
|
4428
4432
|
}
|
|
4429
4433
|
);
|
|
4430
|
-
const
|
|
4431
|
-
return r({ getElSelectRef:
|
|
4434
|
+
const F = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value, L = ref(null), N = () => L.value, _ = ref([]);
|
|
4435
|
+
return r({ getElSelectRef: N, getElOptionRefs: () => _.value }), (f, p) => (openBlock(), createBlock(unref(ElSelect), mergeProps({
|
|
4432
4436
|
ref_key: "ElSelectRef",
|
|
4433
|
-
ref:
|
|
4434
|
-
},
|
|
4435
|
-
"value-on-clear":
|
|
4437
|
+
ref: L
|
|
4438
|
+
}, D.value, {
|
|
4439
|
+
"value-on-clear": F,
|
|
4436
4440
|
"empty-values": unref(n) ? [null, void 0] : unref(a),
|
|
4437
4441
|
"value-key": unref(y).format.value,
|
|
4438
4442
|
onChange: E,
|
|
4439
|
-
class: unref(
|
|
4443
|
+
class: unref(m).modelValue === "" && unref(n) ? "no-clear" : "",
|
|
4440
4444
|
"popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] }
|
|
4441
4445
|
}), createSlots({
|
|
4442
4446
|
default: withCtx(() => [
|
|
4443
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4447
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (k) => (openBlock(), createBlock(unref(ElOption), mergeProps({
|
|
4444
4448
|
ref_for: !0,
|
|
4445
|
-
ref: (
|
|
4446
|
-
|
|
4449
|
+
ref: (O) => {
|
|
4450
|
+
O && (_.value[f.index] = O);
|
|
4447
4451
|
},
|
|
4448
4452
|
key: k[unref(y).format.value],
|
|
4449
4453
|
disabled: k[unref(y).format.disabled],
|
|
@@ -4453,10 +4457,10 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4453
4457
|
]),
|
|
4454
4458
|
_: 2
|
|
4455
4459
|
}, [
|
|
4456
|
-
renderList(f.$slots, (k,
|
|
4457
|
-
name:
|
|
4458
|
-
fn: withCtx((
|
|
4459
|
-
renderSlot(f.$slots,
|
|
4460
|
+
renderList(f.$slots, (k, O, B) => ({
|
|
4461
|
+
name: O,
|
|
4462
|
+
fn: withCtx((V) => [
|
|
4463
|
+
renderSlot(f.$slots, O, mergeProps({ key: B }, V))
|
|
4460
4464
|
])
|
|
4461
4465
|
}))
|
|
4462
4466
|
]), 1040, ["empty-values", "value-key", "class"]));
|
|
@@ -4549,86 +4553,86 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4549
4553
|
}
|
|
4550
4554
|
},
|
|
4551
4555
|
setup(e, { expose: r }) {
|
|
4552
|
-
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn:
|
|
4553
|
-
const
|
|
4554
|
-
return i.value !== void 0 && i.value !== null && (
|
|
4556
|
+
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn: g, formatFunOut: w, spacer: b, maskType: m, maskStart: D, maskEnd: C, maskMiddle: l, maskSymbol: y } = toRefs(t), v = computed(() => {
|
|
4557
|
+
const F = {};
|
|
4558
|
+
return i.value !== void 0 && i.value !== null && (F.defaultVal = i.value), n.value !== void 0 && n.value !== null && (F.emptyText = n.value), c.value !== void 0 && c.value !== null && (F.formatFun = c.value), b.value !== void 0 && b.value !== null && (F.spacer = b.value), F;
|
|
4555
4559
|
}), E = computed(() => {
|
|
4556
|
-
const
|
|
4557
|
-
return i.value !== void 0 && i.value !== null && (
|
|
4558
|
-
}),
|
|
4559
|
-
if (
|
|
4560
|
-
if (Array.isArray(
|
|
4560
|
+
const F = {};
|
|
4561
|
+
return i.value !== void 0 && i.value !== null && (F.defaultVal = i.value), n.value !== void 0 && n.value !== null && (F.emptyText = n.value), g.value !== void 0 && g.value !== null && (F.formatFunIn = g.value), w.value !== void 0 && w.value !== null && (F.formatFunOut = w.value), s.value !== void 0 && s.value !== null && (F.treeSetting = s.value), b.value !== void 0 && b.value !== null && (F.spacer = b.value), F;
|
|
4562
|
+
}), T = computed(() => !!m.value || !!D.value || !!l.value || !!C.value), x = computed(() => {
|
|
4563
|
+
if (m.value) {
|
|
4564
|
+
if (Array.isArray(m.value))
|
|
4561
4565
|
return {
|
|
4562
|
-
start:
|
|
4563
|
-
middle: l.value ||
|
|
4564
|
-
end: C.value ||
|
|
4565
|
-
symbol: y.value ||
|
|
4566
|
+
start: D.value || m.value[0] || 0,
|
|
4567
|
+
middle: l.value || m.value[1] || 0,
|
|
4568
|
+
end: C.value || m.value[2] || 0,
|
|
4569
|
+
symbol: y.value || m.value[3] || "*",
|
|
4566
4570
|
defaultVal: i.value
|
|
4567
4571
|
};
|
|
4568
|
-
if (typeof
|
|
4569
|
-
const
|
|
4570
|
-
start:
|
|
4572
|
+
if (typeof m.value == "object") {
|
|
4573
|
+
const F = {
|
|
4574
|
+
start: D.value || 0,
|
|
4571
4575
|
middle: l.value || 0,
|
|
4572
4576
|
end: C.value || 0,
|
|
4573
4577
|
symbol: y.value || "*",
|
|
4574
4578
|
defaultVal: i.value
|
|
4575
4579
|
};
|
|
4576
|
-
return Object.assign(
|
|
4580
|
+
return Object.assign(F, m.value);
|
|
4577
4581
|
} else
|
|
4578
|
-
return
|
|
4582
|
+
return m.value;
|
|
4579
4583
|
} else
|
|
4580
4584
|
return {
|
|
4581
|
-
start:
|
|
4585
|
+
start: D.value || 0,
|
|
4582
4586
|
middle: l.value || 0,
|
|
4583
4587
|
end: C.value || 0,
|
|
4584
4588
|
symbol: y.value || "*",
|
|
4585
4589
|
defaultVal: i.value
|
|
4586
4590
|
};
|
|
4587
|
-
}), I = (
|
|
4588
|
-
return r({ getElTableColumnRef: () =>
|
|
4591
|
+
}), I = (F, L = {}) => Array.isArray(F) ? F : typeof F == "string" ? F.split(L.spacer || ",") : typeof F == "number" ? [F] : [], j = ref(null);
|
|
4592
|
+
return r({ getElTableColumnRef: () => j.value }), (F, L) => (openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
4589
4593
|
ref_key: "ElTableColumnRef",
|
|
4590
|
-
ref:
|
|
4591
|
-
},
|
|
4592
|
-
default: withCtx((
|
|
4593
|
-
var
|
|
4594
|
+
ref: j
|
|
4595
|
+
}, F.$attrs), createSlots({
|
|
4596
|
+
default: withCtx((N) => {
|
|
4597
|
+
var _, A, f, p, k, O, B, V, R, J, P, K;
|
|
4594
4598
|
return [
|
|
4595
4599
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4596
|
-
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(I(
|
|
4600
|
+
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(I(N.row[(_ = unref(d)) == null ? void 0 : _.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$n, {
|
|
4597
4601
|
key: M,
|
|
4598
4602
|
modelValue: G || "",
|
|
4599
4603
|
dictType: unref(a)
|
|
4600
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(I(
|
|
4604
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(I(N.row[(A = unref(d)) == null ? void 0 : A.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$e, {
|
|
4601
4605
|
key: M,
|
|
4602
4606
|
modelValue: G || "",
|
|
4603
4607
|
dictType: unref(a)
|
|
4604
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(I(
|
|
4608
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(I(N.row[(f = unref(d)) == null ? void 0 : f.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$f, {
|
|
4605
4609
|
key: M,
|
|
4606
4610
|
modelValue: G || "",
|
|
4607
4611
|
dictType: unref(a)
|
|
4608
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(I(
|
|
4612
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(I(N.row[(p = unref(d)) == null ? void 0 : p.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$d, {
|
|
4609
4613
|
key: M,
|
|
4610
4614
|
modelValue: G || "",
|
|
4611
4615
|
dictType: unref(a)
|
|
4612
4616
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4613
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(
|
|
4617
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(N.row[(k = unref(d)) == null ? void 0 : k.prop], unref(a), v.value)), 1)
|
|
4614
4618
|
], 64))
|
|
4615
|
-
], 64)) : unref(u) &&
|
|
4616
|
-
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
4617
|
-
], 64)) : unref(o) &&
|
|
4618
|
-
createTextVNode(toDisplayString(unref(FormatDate)(
|
|
4619
|
-
], 64)) :
|
|
4620
|
-
createTextVNode(toDisplayString(unref(Desensitization)(
|
|
4619
|
+
], 64)) : unref(u) && N.row[(O = unref(d)) == null ? void 0 : O.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4620
|
+
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(N.row[(B = unref(d)) == null ? void 0 : B.prop], unref(u), E.value)), 1)
|
|
4621
|
+
], 64)) : unref(o) && N.row[(V = unref(d)) == null ? void 0 : V.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4622
|
+
createTextVNode(toDisplayString(unref(FormatDate)(N.row[(R = unref(d)) == null ? void 0 : R.prop], unref(o), unref(i))), 1)
|
|
4623
|
+
], 64)) : T.value && N.row[(J = unref(d)) == null ? void 0 : J.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4624
|
+
createTextVNode(toDisplayString(unref(Desensitization)(N.row[(P = unref(d)) == null ? void 0 : P.prop], x.value)), 1)
|
|
4621
4625
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4622
|
-
createTextVNode(toDisplayString(
|
|
4626
|
+
createTextVNode(toDisplayString(N.row[(K = unref(d)) == null ? void 0 : K.prop] || unref(i)), 1)
|
|
4623
4627
|
], 64))
|
|
4624
4628
|
];
|
|
4625
4629
|
}),
|
|
4626
4630
|
_: 2
|
|
4627
4631
|
}, [
|
|
4628
|
-
renderList(
|
|
4629
|
-
name:
|
|
4632
|
+
renderList(F.$slots, (N, _, A) => ({
|
|
4633
|
+
name: _,
|
|
4630
4634
|
fn: withCtx((f) => [
|
|
4631
|
-
renderSlot(
|
|
4635
|
+
renderSlot(F.$slots, _, mergeProps({ key: A }, f), void 0, !0)
|
|
4632
4636
|
])
|
|
4633
4637
|
}))
|
|
4634
4638
|
]), 1040));
|
|
@@ -4691,74 +4695,74 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4691
4695
|
},
|
|
4692
4696
|
emits: ["dictChange"],
|
|
4693
4697
|
setup(e, { expose: r, emit: d }) {
|
|
4694
|
-
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue:
|
|
4695
|
-
const
|
|
4696
|
-
return Object.entries(t).forEach(([
|
|
4697
|
-
const
|
|
4698
|
-
if (!
|
|
4699
|
-
const k = ToCamelCase(
|
|
4700
|
-
|
|
4698
|
+
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue: g, filterDataFun: w, disabledDataFun: b } = toRefs(n), m = computed(() => {
|
|
4699
|
+
const _ = {};
|
|
4700
|
+
return Object.entries(t).forEach(([A, f]) => {
|
|
4701
|
+
const p = ToKebabCase(A);
|
|
4702
|
+
if (!p.startsWith("tab-pane-") && !p.startsWith("on-tab-pane-")) {
|
|
4703
|
+
const k = ToCamelCase(p);
|
|
4704
|
+
_[k] = f;
|
|
4701
4705
|
}
|
|
4702
|
-
}),
|
|
4703
|
-
}),
|
|
4704
|
-
const
|
|
4705
|
-
return Object.entries(t).forEach(([
|
|
4706
|
-
const
|
|
4707
|
-
if (
|
|
4708
|
-
const k = ToCamelCase(
|
|
4709
|
-
|
|
4706
|
+
}), _;
|
|
4707
|
+
}), D = computed(() => {
|
|
4708
|
+
const _ = {};
|
|
4709
|
+
return Object.entries(t).forEach(([A, f]) => {
|
|
4710
|
+
const p = ToKebabCase(A);
|
|
4711
|
+
if (p.startsWith("tab-pane-") || p.startsWith("on-tab-pane-")) {
|
|
4712
|
+
const k = ToCamelCase(p.replace("tab-pane-", ""));
|
|
4713
|
+
_[k] = f;
|
|
4710
4714
|
}
|
|
4711
|
-
}),
|
|
4712
|
-
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (
|
|
4715
|
+
}), _;
|
|
4716
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (_) => {
|
|
4713
4717
|
window.setTimeout(() => {
|
|
4714
|
-
if (!
|
|
4718
|
+
if (!g.value) {
|
|
4715
4719
|
y("dictChange", t.modelValue);
|
|
4716
4720
|
return;
|
|
4717
4721
|
}
|
|
4718
|
-
const
|
|
4719
|
-
y("dictChange",
|
|
4722
|
+
const A = E.list.find((f) => f[l.format.value] === t.modelValue);
|
|
4723
|
+
y("dictChange", A);
|
|
4720
4724
|
}, 0);
|
|
4721
4725
|
}, E = reactive({
|
|
4722
4726
|
list: []
|
|
4723
|
-
}),
|
|
4727
|
+
}), T = async () => {
|
|
4724
4728
|
if (!s.value || u.value && u.value.length > 0)
|
|
4725
4729
|
return;
|
|
4726
|
-
let
|
|
4730
|
+
let _ = [];
|
|
4727
4731
|
if (typeof s.value == "object") {
|
|
4728
4732
|
C.value = s.value.type;
|
|
4729
|
-
const
|
|
4730
|
-
|
|
4731
|
-
const { filters: f, filterType:
|
|
4732
|
-
k ?
|
|
4733
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
4734
|
+
_ = [].concat(A[C.value]);
|
|
4735
|
+
const { filters: f, filterType: p = l.format.value, reverse: k = !1 } = s.value, O = typeof f == "string" ? f.split(",") : f;
|
|
4736
|
+
k ? _ = _.filter((B) => !O.includes(B[p])) : _ = _.filter((B) => O.includes(B[p]));
|
|
4733
4737
|
} else {
|
|
4734
4738
|
C.value = s.value;
|
|
4735
|
-
const
|
|
4736
|
-
|
|
4739
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
4740
|
+
_ = [].concat(A[C.value]);
|
|
4737
4741
|
}
|
|
4738
|
-
if (w.value && (
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
[l.format.disabled]: b.value(
|
|
4742
|
+
if (w.value && (_ = w.value(_)), b.value)
|
|
4743
|
+
_ = _.map((A) => ({
|
|
4744
|
+
...A,
|
|
4745
|
+
[l.format.disabled]: b.value(A)
|
|
4742
4746
|
}));
|
|
4743
4747
|
else if (c.value) {
|
|
4744
|
-
const { disabledValues:
|
|
4745
|
-
|
|
4746
|
-
const
|
|
4747
|
-
return
|
|
4748
|
-
}) :
|
|
4749
|
-
const
|
|
4750
|
-
return
|
|
4748
|
+
const { disabledValues: A, disabledType: f = l.format.value, reverse: p = !1 } = c.value, k = typeof A == "string" ? A.split(",") : A;
|
|
4749
|
+
p ? _ = _.map((O) => {
|
|
4750
|
+
const B = JSON.parse(JSON.stringify(O));
|
|
4751
|
+
return B[l.format.disabled] = !k.includes(B[f]) || B[l.format.disabled], B;
|
|
4752
|
+
}) : _ = _.map((O) => {
|
|
4753
|
+
const B = JSON.parse(JSON.stringify(O));
|
|
4754
|
+
return B[l.format.disabled] = k.includes(B[f]) || B[l.format.disabled], B;
|
|
4751
4755
|
});
|
|
4752
4756
|
}
|
|
4753
|
-
a.value &&
|
|
4757
|
+
a.value && _.unshift({
|
|
4754
4758
|
[l.format.value]: "",
|
|
4755
4759
|
[l.format.label]: a.value
|
|
4756
|
-
}), E.list =
|
|
4757
|
-
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes),
|
|
4760
|
+
}), E.list = _;
|
|
4761
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value);
|
|
4758
4762
|
watch(
|
|
4759
|
-
[x, I,
|
|
4760
|
-
([
|
|
4761
|
-
!
|
|
4763
|
+
[x, I, j],
|
|
4764
|
+
([_, A, f]) => {
|
|
4765
|
+
!_ && !A && f && f.length === 0 && T(), 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((k) => ({
|
|
4762
4766
|
[l.format.value]: k[o.value.value],
|
|
4763
4767
|
[l.format.label]: k[o.value.label],
|
|
4764
4768
|
[l.format.disabled]: !!k[o.value.disabled],
|
|
@@ -4775,36 +4779,36 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4775
4779
|
immediate: !0
|
|
4776
4780
|
}
|
|
4777
4781
|
);
|
|
4778
|
-
const S = ref(null),
|
|
4779
|
-
return r({ getElTabsRef:
|
|
4782
|
+
const S = ref(null), F = () => S.value, L = ref([]);
|
|
4783
|
+
return r({ getElTabsRef: F, getElTabPaneRefs: () => L.value }), (_, A) => {
|
|
4780
4784
|
const f = resolveComponent("el-badge");
|
|
4781
4785
|
return openBlock(), createBlock(unref(ElTabs), mergeProps({
|
|
4782
4786
|
ref_key: "ElTabsRef",
|
|
4783
4787
|
ref: S,
|
|
4784
4788
|
class: "vue-element-dict-tabs"
|
|
4785
|
-
},
|
|
4789
|
+
}, m.value, { onTabClick: v }), {
|
|
4786
4790
|
default: withCtx(() => [
|
|
4787
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4791
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (p) => (openBlock(), createBlock(unref(ElTabPane), mergeProps({
|
|
4788
4792
|
ref_for: !0,
|
|
4789
4793
|
ref: (k) => {
|
|
4790
|
-
k && (
|
|
4794
|
+
k && (L.value[_.index] = k);
|
|
4791
4795
|
},
|
|
4792
|
-
disabled:
|
|
4793
|
-
label:
|
|
4794
|
-
key:
|
|
4795
|
-
name:
|
|
4796
|
-
},
|
|
4796
|
+
disabled: p[unref(l).format.disabled],
|
|
4797
|
+
label: p[unref(l).format.label],
|
|
4798
|
+
key: p[unref(l).format.value],
|
|
4799
|
+
name: p[unref(l).format.value]
|
|
4800
|
+
}, D.value), createSlots({
|
|
4797
4801
|
default: withCtx(() => [
|
|
4798
|
-
renderSlot(
|
|
4802
|
+
renderSlot(_.$slots, p[unref(l).format.value] ? "tabs-item-" + p[unref(l).format.value] : "tabs-item")
|
|
4799
4803
|
]),
|
|
4800
4804
|
_: 2
|
|
4801
4805
|
}, [
|
|
4802
|
-
unref(i)[
|
|
4806
|
+
unref(i)[p[unref(l).format.value]] ? {
|
|
4803
4807
|
name: "label",
|
|
4804
4808
|
fn: withCtx(() => [
|
|
4805
|
-
createVNode(f, mergeProps(unref(i)[
|
|
4809
|
+
createVNode(f, mergeProps(unref(i)[p[unref(l).format.value]], { class: "item" }), {
|
|
4806
4810
|
default: withCtx(() => [
|
|
4807
|
-
createTextVNode(toDisplayString(
|
|
4811
|
+
createTextVNode(toDisplayString(p[unref(l).format.label]), 1)
|
|
4808
4812
|
]),
|
|
4809
4813
|
_: 2
|
|
4810
4814
|
}, 1040)
|
|
@@ -4864,97 +4868,97 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4864
4868
|
}
|
|
4865
4869
|
},
|
|
4866
4870
|
setup(e, { expose: r }) {
|
|
4867
|
-
const d = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: u, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), c = toRaw(store.state.dictConfig),
|
|
4871
|
+
const d = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: u, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), c = toRaw(store.state.dictConfig), g = reactive({
|
|
4868
4872
|
list: []
|
|
4869
4873
|
}), w = computed(() => {
|
|
4870
|
-
const
|
|
4871
|
-
valueField: x != null && x.value ? x.value :
|
|
4872
|
-
labelField: x != null && x.label ? x.label :
|
|
4873
|
-
childrenField: x != null && x.children ? x.children :
|
|
4874
|
-
leafField: x != null && x.leaf ? x.leaf :
|
|
4874
|
+
const T = JSON.parse(JSON.stringify(c.treeSetting)), x = d.props || {}, I = {
|
|
4875
|
+
valueField: x != null && x.value ? x.value : T.valueField,
|
|
4876
|
+
labelField: x != null && x.label ? x.label : T.labelField,
|
|
4877
|
+
childrenField: x != null && x.children ? x.children : T.childrenField,
|
|
4878
|
+
leafField: x != null && x.leaf ? x.leaf : T.leafField,
|
|
4875
4879
|
disabled: x != null && x.disabled ? x.disabled : c.format.disabled
|
|
4876
4880
|
};
|
|
4877
|
-
return Object.assign(
|
|
4878
|
-
}), b = (
|
|
4879
|
-
for (let I = 0; I <
|
|
4880
|
-
const
|
|
4881
|
-
if (
|
|
4882
|
-
delete
|
|
4881
|
+
return Object.assign(T, I);
|
|
4882
|
+
}), b = (T, x) => {
|
|
4883
|
+
for (let I = 0; I < T.length; I++) {
|
|
4884
|
+
const j = T[I];
|
|
4885
|
+
if (j[w.value.levelField] === x) {
|
|
4886
|
+
delete j[w.value.childrenField], j[w.value.leafField] = !0;
|
|
4883
4887
|
continue;
|
|
4884
4888
|
} else {
|
|
4885
|
-
const
|
|
4886
|
-
b(
|
|
4889
|
+
const F = j[w.value.childrenField];
|
|
4890
|
+
b(F, x);
|
|
4887
4891
|
}
|
|
4888
4892
|
}
|
|
4889
|
-
},
|
|
4893
|
+
}, m = async () => {
|
|
4890
4894
|
if (!a.value)
|
|
4891
4895
|
return;
|
|
4892
|
-
let
|
|
4896
|
+
let T = [];
|
|
4893
4897
|
if (typeof a.value == "object") {
|
|
4894
4898
|
s.value = a.value.type;
|
|
4895
4899
|
const x = await store.actions.getDictDataObj(s.value);
|
|
4896
|
-
|
|
4897
|
-
const { filters: I, filterType:
|
|
4898
|
-
S ?
|
|
4900
|
+
T = [].concat(x[s.value]);
|
|
4901
|
+
const { filters: I, filterType: j = c.format.value, reverse: S = !1 } = a.value, F = typeof I == "string" ? I.split(",") : I;
|
|
4902
|
+
S ? T = T.filter((L) => !F.includes(L[j])) : T = T.filter((L) => F.includes(L[j]));
|
|
4899
4903
|
} else {
|
|
4900
4904
|
s.value = a.value;
|
|
4901
4905
|
const x = await store.actions.getDictDataObj(s.value);
|
|
4902
|
-
|
|
4906
|
+
T = [].concat(x[s.value]);
|
|
4903
4907
|
}
|
|
4904
|
-
if (o.value && (
|
|
4905
|
-
|
|
4908
|
+
if (o.value && (T = o.value(T)), i.value)
|
|
4909
|
+
T = T.map((x) => ({
|
|
4906
4910
|
...x,
|
|
4907
4911
|
[c.format.disabled]: i.value(x)
|
|
4908
4912
|
}));
|
|
4909
4913
|
else if (u.value) {
|
|
4910
|
-
const { disabledValues: x, disabledType: I = c.treeSetting.valueField, reverse:
|
|
4911
|
-
|
|
4912
|
-
const
|
|
4913
|
-
return
|
|
4914
|
-
}) :
|
|
4915
|
-
const
|
|
4916
|
-
return
|
|
4914
|
+
const { disabledValues: x, disabledType: I = c.treeSetting.valueField, reverse: j = !1 } = u.value, S = typeof x == "string" ? x.split(",") : x;
|
|
4915
|
+
j ? T = T.map((F) => {
|
|
4916
|
+
const L = JSON.parse(JSON.stringify(F));
|
|
4917
|
+
return L[c.format.disabled] = !S.includes(L[I]) || L[c.format.disabled], L;
|
|
4918
|
+
}) : T = T.map((F) => {
|
|
4919
|
+
const L = JSON.parse(JSON.stringify(F));
|
|
4920
|
+
return L[c.format.disabled] = S.includes(L[I]) || L[c.format.disabled], L;
|
|
4917
4921
|
});
|
|
4918
4922
|
}
|
|
4919
|
-
|
|
4920
|
-
},
|
|
4921
|
-
const
|
|
4923
|
+
g.list = T;
|
|
4924
|
+
}, D = computed(() => store.state.isGettingDictTypes.includes(s.value)), C = computed(() => store.state.isGettingAllDictTypes), l = computed(() => {
|
|
4925
|
+
const T = store.state.dictConfig.treeSetting, x = store.state.dictConfig.format, I = d.props ?? {};
|
|
4922
4926
|
return {
|
|
4923
4927
|
disabled: (I == null ? void 0 : I.disabled) ?? x.disabled,
|
|
4924
|
-
label: (I == null ? void 0 : I.label) ??
|
|
4925
|
-
children: (I == null ? void 0 : I.children) ??
|
|
4926
|
-
isLeaf: (I == null ? void 0 : I.leaf) ??
|
|
4928
|
+
label: (I == null ? void 0 : I.label) ?? T.labelField,
|
|
4929
|
+
children: (I == null ? void 0 : I.children) ?? T.childrenField,
|
|
4930
|
+
isLeaf: (I == null ? void 0 : I.leaf) ?? T.leafField
|
|
4927
4931
|
};
|
|
4928
4932
|
}), y = computed(() => {
|
|
4929
|
-
if (
|
|
4933
|
+
if (g.list.length === 0)
|
|
4930
4934
|
return [];
|
|
4931
|
-
const
|
|
4935
|
+
const T = JSON.parse(JSON.stringify(g.list)).map((I) => ({
|
|
4932
4936
|
id: I[w.value.valueField],
|
|
4933
4937
|
...I
|
|
4934
4938
|
}));
|
|
4935
|
-
let x = ListToTree(
|
|
4939
|
+
let x = ListToTree(T, w.value);
|
|
4936
4940
|
return n.value && b(x, +n.value), x;
|
|
4937
4941
|
});
|
|
4938
4942
|
watch(
|
|
4939
|
-
[
|
|
4940
|
-
([
|
|
4941
|
-
!
|
|
4943
|
+
[D, C],
|
|
4944
|
+
([T, x]) => {
|
|
4945
|
+
!T && !x && m();
|
|
4942
4946
|
},
|
|
4943
4947
|
{
|
|
4944
4948
|
immediate: !0
|
|
4945
4949
|
}
|
|
4946
4950
|
);
|
|
4947
4951
|
const v = ref(null);
|
|
4948
|
-
return r({ getElTreeRef: () => v.value }), (
|
|
4952
|
+
return r({ getElTreeRef: () => v.value }), (T, x) => (openBlock(), createBlock(unref(ElTree), mergeProps({
|
|
4949
4953
|
ref_key: "ElTreeRef",
|
|
4950
4954
|
ref: v,
|
|
4951
4955
|
data: y.value,
|
|
4952
4956
|
props: l.value
|
|
4953
|
-
},
|
|
4954
|
-
renderList(
|
|
4955
|
-
name:
|
|
4956
|
-
fn: withCtx((
|
|
4957
|
-
renderSlot(
|
|
4957
|
+
}, T.$attrs), createSlots({ _: 2 }, [
|
|
4958
|
+
renderList(T.$slots, (I, j, S) => ({
|
|
4959
|
+
name: j,
|
|
4960
|
+
fn: withCtx((F) => [
|
|
4961
|
+
renderSlot(T.$slots, j, mergeProps({ key: S }, F))
|
|
4958
4962
|
])
|
|
4959
4963
|
}))
|
|
4960
4964
|
]), 1040, ["data", "props"]));
|
|
@@ -4995,7 +4999,7 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4995
4999
|
useAttrs();
|
|
4996
5000
|
const d = e, { maxLevel: t, dictType: n, disabledObj: a, filterDataFun: u, disabledDataFun: o } = toRefs(d), i = ref(""), s = toRaw(store.state.dictConfig), c = reactive({
|
|
4997
5001
|
list: []
|
|
4998
|
-
}),
|
|
5002
|
+
}), g = computed(() => {
|
|
4999
5003
|
const v = {
|
|
5000
5004
|
labelField: "label",
|
|
5001
5005
|
valueField: "value",
|
|
@@ -5004,14 +5008,14 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5004
5008
|
}, E = JSON.parse(JSON.stringify(s.treeSetting));
|
|
5005
5009
|
return Object.assign(E, v);
|
|
5006
5010
|
}), w = (v, E) => {
|
|
5007
|
-
for (let
|
|
5008
|
-
const x = v[
|
|
5009
|
-
if (x[
|
|
5010
|
-
delete x[
|
|
5011
|
+
for (let T = 0; T < v.length; T++) {
|
|
5012
|
+
const x = v[T];
|
|
5013
|
+
if (x[g.value.levelField] === E) {
|
|
5014
|
+
delete x[g.value.childrenField], x[g.value.leafField] = !0;
|
|
5011
5015
|
continue;
|
|
5012
5016
|
} else {
|
|
5013
|
-
const
|
|
5014
|
-
w(
|
|
5017
|
+
const j = x[g.value.childrenField];
|
|
5018
|
+
w(j, E);
|
|
5015
5019
|
}
|
|
5016
5020
|
}
|
|
5017
5021
|
}, b = async () => {
|
|
@@ -5022,8 +5026,8 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5022
5026
|
i.value = n.value.type;
|
|
5023
5027
|
const E = await store.actions.getDictDataObj(i.value);
|
|
5024
5028
|
v = [].concat(E[i.value]);
|
|
5025
|
-
const { filters:
|
|
5026
|
-
I ? v = v.filter((S) => !
|
|
5029
|
+
const { filters: T, filterType: x = s.format.value, reverse: I = !1 } = n.value, j = typeof T == "string" ? T.split(",") : T;
|
|
5030
|
+
I ? v = v.filter((S) => !j.includes(S[x])) : v = v.filter((S) => j.includes(S[x]));
|
|
5027
5031
|
} else {
|
|
5028
5032
|
i.value = n.value;
|
|
5029
5033
|
const E = await store.actions.getDictDataObj(i.value);
|
|
@@ -5035,28 +5039,28 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5035
5039
|
[s.format.disabled]: o.value(E)
|
|
5036
5040
|
}));
|
|
5037
5041
|
else if (a.value) {
|
|
5038
|
-
const { disabledValues: E, disabledType:
|
|
5039
|
-
x ? v = v.map((
|
|
5040
|
-
const S = JSON.parse(JSON.stringify(
|
|
5041
|
-
return S[s.format.disabled] = !I.includes(S[
|
|
5042
|
-
}) : v = v.map((
|
|
5043
|
-
const S = JSON.parse(JSON.stringify(
|
|
5044
|
-
return S[s.format.disabled] = I.includes(S[
|
|
5042
|
+
const { disabledValues: E, disabledType: T = s.treeSetting.valueField, reverse: x = !1 } = a.value, I = typeof E == "string" ? E.split(",") : E;
|
|
5043
|
+
x ? v = v.map((j) => {
|
|
5044
|
+
const S = JSON.parse(JSON.stringify(j));
|
|
5045
|
+
return S[s.format.disabled] = !I.includes(S[T]) || S[s.format.disabled], S;
|
|
5046
|
+
}) : v = v.map((j) => {
|
|
5047
|
+
const S = JSON.parse(JSON.stringify(j));
|
|
5048
|
+
return S[s.format.disabled] = I.includes(S[T]) || S[s.format.disabled], S;
|
|
5045
5049
|
});
|
|
5046
5050
|
}
|
|
5047
5051
|
c.list = v;
|
|
5048
|
-
},
|
|
5049
|
-
const v = JSON.parse(JSON.stringify(c.list)).map((
|
|
5050
|
-
label: g
|
|
5051
|
-
value: g
|
|
5052
|
-
children: g
|
|
5053
|
-
...
|
|
5052
|
+
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)), D = computed(() => store.state.isGettingAllDictTypes), C = computed(() => {
|
|
5053
|
+
const v = JSON.parse(JSON.stringify(c.list)).map((T) => ({
|
|
5054
|
+
label: T[g.value.labelField],
|
|
5055
|
+
value: T[g.value.valueField],
|
|
5056
|
+
children: T[g.value.childrenField],
|
|
5057
|
+
...T
|
|
5054
5058
|
}));
|
|
5055
|
-
let E = ListToTree(v,
|
|
5059
|
+
let E = ListToTree(v, g.value);
|
|
5056
5060
|
return t.value && w(E, +t.value), E;
|
|
5057
5061
|
});
|
|
5058
5062
|
watch(
|
|
5059
|
-
[
|
|
5063
|
+
[m, D],
|
|
5060
5064
|
([v, E]) => {
|
|
5061
5065
|
!v && !E && b();
|
|
5062
5066
|
},
|
|
@@ -5070,10 +5074,10 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5070
5074
|
ref: l,
|
|
5071
5075
|
data: C.value
|
|
5072
5076
|
}, v.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
5073
|
-
renderList(v.$slots, (
|
|
5077
|
+
renderList(v.$slots, (T, x, I) => ({
|
|
5074
5078
|
name: x,
|
|
5075
|
-
fn: withCtx((
|
|
5076
|
-
renderSlot(v.$slots, x, mergeProps({ key: I },
|
|
5079
|
+
fn: withCtx((j) => [
|
|
5080
|
+
renderSlot(v.$slots, x, mergeProps({ key: I }, j))
|
|
5077
5081
|
])
|
|
5078
5082
|
}))
|
|
5079
5083
|
]), 1040, ["data"]));
|
|
@@ -5191,8 +5195,8 @@ async function getDictCodeReq(e, r) {
|
|
|
5191
5195
|
const s = store.state.dictCodes;
|
|
5192
5196
|
o = u;
|
|
5193
5197
|
const c = { ...s };
|
|
5194
|
-
o.forEach((
|
|
5195
|
-
c.hasOwnProperty(
|
|
5198
|
+
o.forEach((g) => {
|
|
5199
|
+
c.hasOwnProperty(g) && delete c[g];
|
|
5196
5200
|
}), store.mutations.SET_DICT_CODES(c), e.storage.setItem(e.dictDataKey, JSON.stringify(c));
|
|
5197
5201
|
} else if (u.length > 0)
|
|
5198
5202
|
for (let s = 0; s < u.length; s++)
|
|
@@ -5203,28 +5207,28 @@ async function getDictCodeReq(e, r) {
|
|
|
5203
5207
|
store.mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
5204
5208
|
const c = await e.getDictCodeApi(e.formatterRequest(e.query, s));
|
|
5205
5209
|
store.mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1);
|
|
5206
|
-
const
|
|
5210
|
+
const g = e.formatterDictList(c, s), w = e.formatterDictVersion(c);
|
|
5207
5211
|
e.storage.setItem(e.versionKey, w);
|
|
5208
|
-
const b = Object.assign(store.state.dictCodes,
|
|
5209
|
-
store.mutations.SET_DICT_CODES(
|
|
5212
|
+
const b = Object.assign(store.state.dictCodes, g), m = formatDictData(b, e.filterDataFun, e.disabledDataFun, (i = e == null ? void 0 : e.format) == null ? void 0 : i.disabled);
|
|
5213
|
+
store.mutations.SET_DICT_CODES(m), e.storage.setItem(e.dictDataKey, JSON.stringify(m));
|
|
5210
5214
|
} else if (o.length > 0)
|
|
5211
5215
|
for (let c = 0; c < o.length; c++) {
|
|
5212
|
-
const
|
|
5213
|
-
store.actions.getDictDataObj(
|
|
5216
|
+
const g = o[c];
|
|
5217
|
+
store.actions.getDictDataObj(g);
|
|
5214
5218
|
}
|
|
5215
5219
|
}
|
|
5216
5220
|
}
|
|
5217
5221
|
let vue3ElementDict = {
|
|
5218
5222
|
async install(e, r) {
|
|
5219
|
-
var b,
|
|
5223
|
+
var b, m;
|
|
5220
5224
|
const d = console.warn;
|
|
5221
|
-
console.warn = (...
|
|
5222
|
-
const C = typeof
|
|
5223
|
-
C.includes("formItemContextKey") || C.includes("formContextKey") || d.apply(console,
|
|
5225
|
+
console.warn = (...D) => {
|
|
5226
|
+
const C = typeof D[0] == "string" ? D[0] : "";
|
|
5227
|
+
C.includes("formItemContextKey") || C.includes("formContextKey") || d.apply(console, D);
|
|
5224
5228
|
};
|
|
5225
5229
|
const t = e.config.warnHandler;
|
|
5226
|
-
e.config.warnHandler = (
|
|
5227
|
-
typeof
|
|
5230
|
+
e.config.warnHandler = (D, C, l) => {
|
|
5231
|
+
typeof D == "string" && (D.includes("formItemContextKey") || D.includes("formContextKey")) || t == null || t(D, C, l);
|
|
5228
5232
|
};
|
|
5229
5233
|
const n = {
|
|
5230
5234
|
timeout: 3e4,
|
|
@@ -5262,9 +5266,9 @@ let vue3ElementDict = {
|
|
|
5262
5266
|
getLoginStatusFunc: () => !0,
|
|
5263
5267
|
loginStatusChangeFunc: null,
|
|
5264
5268
|
//组件过滤数据 配置
|
|
5265
|
-
filterDataFun: (
|
|
5269
|
+
filterDataFun: (D) => D,
|
|
5266
5270
|
//组件禁用数据 配置
|
|
5267
|
-
disabledDataFun: (
|
|
5271
|
+
disabledDataFun: (D) => !1,
|
|
5268
5272
|
//配置数组数据转化成树形数据
|
|
5269
5273
|
treeSetting: {
|
|
5270
5274
|
idField: "id",
|
|
@@ -5300,9 +5304,9 @@ let vue3ElementDict = {
|
|
|
5300
5304
|
type: "type",
|
|
5301
5305
|
color: "color"
|
|
5302
5306
|
},
|
|
5303
|
-
formatterRequest: (
|
|
5304
|
-
formatterDictList: (
|
|
5305
|
-
formatterDictVersion: (
|
|
5307
|
+
formatterRequest: (D, C) => C ? { [D]: C } : { [D]: "" },
|
|
5308
|
+
formatterDictList: (D, C) => !D || !D.dictData ? {} : D.dictData,
|
|
5309
|
+
formatterDictVersion: (D) => !D || !D.version ? "unknow" : D.version,
|
|
5306
5310
|
version: "unknow",
|
|
5307
5311
|
storage: localStorage,
|
|
5308
5312
|
isGetAll: !1,
|
|
@@ -5316,10 +5320,10 @@ let vue3ElementDict = {
|
|
|
5316
5320
|
store.mutations.SET_DICT_SETTING(a);
|
|
5317
5321
|
let u = {};
|
|
5318
5322
|
try {
|
|
5319
|
-
const
|
|
5320
|
-
u =
|
|
5321
|
-
} catch (
|
|
5322
|
-
u = {}, console.log(
|
|
5323
|
+
const D = a.storage.getItem(a.dictDataKey);
|
|
5324
|
+
u = D ? JSON.parse(D) : {};
|
|
5325
|
+
} catch (D) {
|
|
5326
|
+
u = {}, console.log(D);
|
|
5323
5327
|
}
|
|
5324
5328
|
let o = JSON.parse(JSON.stringify(a.localDictCodes));
|
|
5325
5329
|
o = Object.assign(u, o);
|
|
@@ -5328,30 +5332,30 @@ let vue3ElementDict = {
|
|
|
5328
5332
|
const s = a.storage.getItem(a.versionKey);
|
|
5329
5333
|
let c = a.usuallyGetDictTypes ? a.usuallyGetDictTypes.split(",") : [];
|
|
5330
5334
|
if (a.version !== s) {
|
|
5331
|
-
const
|
|
5335
|
+
const D = a.storage.getItem(a.dictDataKey);
|
|
5332
5336
|
let C = {};
|
|
5333
5337
|
try {
|
|
5334
|
-
C =
|
|
5338
|
+
C = D ? JSON.parse(D) : {};
|
|
5335
5339
|
} catch {
|
|
5336
5340
|
C = {}, console.error();
|
|
5337
5341
|
}
|
|
5338
5342
|
const l = C ? Object.keys(C) : [], y = a.localDictCodes ? Object.keys(a.localDictCodes) : [], v = l.filter((I) => !y.includes(I)), E = [...c, ...v];
|
|
5339
5343
|
c = [...new Set(E)], a.storage.removeItem(a.dictDataKey), a.storage.setItem(a.versionKey, a.version);
|
|
5340
|
-
const
|
|
5344
|
+
const T = JSON.parse(JSON.stringify(a.localDictCodes)), x = formatDictData(T, a.filterDataFun, a.disabledDataFun, (m = a == null ? void 0 : a.format) == null ? void 0 : m.disabled);
|
|
5341
5345
|
a.storage.setItem(a.dictDataKey, JSON.stringify(x)), store.mutations.SET_DICT_CODES(x);
|
|
5342
5346
|
}
|
|
5343
|
-
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((
|
|
5344
|
-
const C =
|
|
5345
|
-
e.component(l,
|
|
5347
|
+
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((D) => {
|
|
5348
|
+
const C = D.name.slice(4), l = a.componentsPreFix + C;
|
|
5349
|
+
e.component(l, D);
|
|
5346
5350
|
});
|
|
5347
|
-
const
|
|
5351
|
+
const g = reactive({
|
|
5348
5352
|
hadLogin: computed(() => store.state.dictConfig.getLoginStatusFunc())
|
|
5349
5353
|
});
|
|
5350
5354
|
(() => {
|
|
5351
5355
|
loginWatcher && (loginWatcher(), loginWatcher = null), loginWatcher = watch(
|
|
5352
|
-
() =>
|
|
5353
|
-
(
|
|
5354
|
-
a.loginStatusChangeFunc && a.loginStatusChangeFunc(
|
|
5356
|
+
() => g.hadLogin,
|
|
5357
|
+
(D) => {
|
|
5358
|
+
a.loginStatusChangeFunc && a.loginStatusChangeFunc(D), D && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c);
|
|
5355
5359
|
},
|
|
5356
5360
|
{ immediate: !1 }
|
|
5357
5361
|
);
|