vue3-element-dict 3.2.5 → 3.2.6
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 +3 -1
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +991 -989
- package/package.json +1 -1
package/lib/vue3-element-dict.js
CHANGED
|
@@ -11,72 +11,72 @@ const formatDictData = (e, r, d, t) => {
|
|
|
11
11
|
return n;
|
|
12
12
|
};
|
|
13
13
|
function sortComponentsByIdDependencies(e) {
|
|
14
|
-
const r = (
|
|
15
|
-
const
|
|
14
|
+
const r = (C) => {
|
|
15
|
+
const D = /* @__PURE__ */ new Set(), l = /\$\{(\w+)\}/g;
|
|
16
16
|
let g;
|
|
17
|
-
for (; (g = l.exec(
|
|
18
|
-
|
|
19
|
-
return Array.from(
|
|
20
|
-
}, d = (
|
|
21
|
-
const
|
|
22
|
-
typeof g == "string" ? r(g).forEach((T) =>
|
|
17
|
+
for (; (g = l.exec(C)) !== null; )
|
|
18
|
+
D.add(g[1]);
|
|
19
|
+
return Array.from(D);
|
|
20
|
+
}, d = (C) => {
|
|
21
|
+
const D = /* @__PURE__ */ new Set(), l = (g) => {
|
|
22
|
+
typeof g == "string" ? r(g).forEach((T) => D.add(T)) : Array.isArray(g) ? g.forEach(l) : g && typeof g == "object" && Object.values(g).forEach(l);
|
|
23
23
|
};
|
|
24
|
-
return l(
|
|
25
|
-
}, t = (
|
|
26
|
-
const { showRuleType:
|
|
27
|
-
return l == null ? [] : (
|
|
24
|
+
return l(C), Array.from(D);
|
|
25
|
+
}, t = (C) => {
|
|
26
|
+
const { showRuleType: D, showRules: l } = C, g = /* @__PURE__ */ new Set();
|
|
27
|
+
return l == null ? [] : (D === "validate" ? typeof l == "string" ? g.add(l) : Array.isArray(l) && l.forEach((T) => {
|
|
28
28
|
typeof T == "string" && g.add(T);
|
|
29
|
-
}) : ["compare", "calculate", ""].includes(
|
|
30
|
-
T && typeof T == "object" && "rules" in T && d(T.rules).forEach((
|
|
29
|
+
}) : ["compare", "calculate", ""].includes(D) ? d(l).forEach((T) => g.add(T)) : typeof D == "string" && Array.isArray(l) && l.forEach((T) => {
|
|
30
|
+
T && typeof T == "object" && "rules" in T && d(T.rules).forEach((B) => g.add(B));
|
|
31
31
|
}), Array.from(g));
|
|
32
|
-
}, n = (
|
|
33
|
-
const { validatorRuleType:
|
|
32
|
+
}, n = (C) => {
|
|
33
|
+
const { validatorRuleType: D, props: l } = C, g = /* @__PURE__ */ new Set();
|
|
34
34
|
return l != null && l.rules ? (l.rules.forEach((T) => {
|
|
35
35
|
if (!(T != null && T.validator))
|
|
36
36
|
return;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
y && typeof y == "object" && "rules" in y && d(y.rules).forEach((
|
|
37
|
+
const B = T.validator;
|
|
38
|
+
B != null && (["compare", "calculate", "", void 0].includes(D) ? d(B).forEach((y) => g.add(y)) : typeof D == "string" && Array.isArray(B) && B.forEach((y) => {
|
|
39
|
+
y && typeof y == "object" && "rules" in y && d(y.rules).forEach((j) => g.add(j));
|
|
40
40
|
}));
|
|
41
41
|
}), Array.from(g)) : [];
|
|
42
42
|
}, a = /* @__PURE__ */ new Map();
|
|
43
|
-
e.forEach((
|
|
44
|
-
|
|
43
|
+
e.forEach((C) => {
|
|
44
|
+
C.fieldName && C.id && a.set(C.fieldName, C.id);
|
|
45
45
|
});
|
|
46
|
-
const u = e.map((
|
|
47
|
-
const
|
|
46
|
+
const u = e.map((C) => {
|
|
47
|
+
const D = t(C), l = n(C), T = [.../* @__PURE__ */ new Set([...D, ...l])].map((B) => a.get(B)).filter((B) => B !== void 0 && e.some((y) => y.id === B));
|
|
48
48
|
return {
|
|
49
|
-
id:
|
|
50
|
-
component:
|
|
49
|
+
id: C.id,
|
|
50
|
+
component: C,
|
|
51
51
|
depsIds: T
|
|
52
52
|
// 该组件id依赖的其他id数组
|
|
53
53
|
};
|
|
54
|
-
}), o = new Set(u.map((
|
|
55
|
-
u.forEach(({ id:
|
|
56
|
-
i.set(
|
|
54
|
+
}), o = new Set(u.map((C) => C.id)), i = /* @__PURE__ */ new Map();
|
|
55
|
+
u.forEach(({ id: C }, D) => {
|
|
56
|
+
i.set(C, D);
|
|
57
57
|
});
|
|
58
58
|
const s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
59
|
-
o.forEach((
|
|
60
|
-
s.set(
|
|
61
|
-
}), u.forEach(({ id:
|
|
62
|
-
|
|
63
|
-
s.get(l).push(
|
|
59
|
+
o.forEach((C) => {
|
|
60
|
+
s.set(C, []), c.set(C, 0);
|
|
61
|
+
}), u.forEach(({ id: C, depsIds: D }) => {
|
|
62
|
+
D.forEach((l) => {
|
|
63
|
+
s.get(l).push(C), c.set(C, c.get(C) + 1);
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
-
const v = [...o].filter((
|
|
66
|
+
const v = [...o].filter((C) => c.get(C) === 0).sort((C, D) => i.get(C) - i.get(D)), w = [];
|
|
67
67
|
for (; v.length > 0; ) {
|
|
68
|
-
const
|
|
69
|
-
w.push(
|
|
70
|
-
if (c.set(
|
|
71
|
-
const l = v.findIndex((g) => i.get(g) > i.get(
|
|
72
|
-
l === -1 ? v.push(
|
|
68
|
+
const C = v.shift();
|
|
69
|
+
w.push(C), s.get(C).forEach((D) => {
|
|
70
|
+
if (c.set(D, c.get(D) - 1), c.get(D) === 0) {
|
|
71
|
+
const l = v.findIndex((g) => i.get(g) > i.get(D));
|
|
72
|
+
l === -1 ? v.push(D) : v.splice(l, 0, D);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const b = [...o].filter((
|
|
77
|
-
b.sort((
|
|
78
|
-
const m = new Map(e.map((
|
|
79
|
-
return w.map((
|
|
76
|
+
const b = [...o].filter((C) => !w.includes(C));
|
|
77
|
+
b.sort((C, D) => i.get(C) - i.get(D)), w.push(...b);
|
|
78
|
+
const m = new Map(e.map((C) => [C.id, C]));
|
|
79
|
+
return w.map((C) => m.get(C));
|
|
80
80
|
}
|
|
81
81
|
const state = reactive({
|
|
82
82
|
//超时时间
|
|
@@ -222,48 +222,48 @@ const actions = {
|
|
|
222
222
|
formatterDictList: w,
|
|
223
223
|
formatterDictVersion: b,
|
|
224
224
|
isGetAll: m,
|
|
225
|
-
filterDataFun:
|
|
226
|
-
disabledDataFun:
|
|
225
|
+
filterDataFun: C,
|
|
226
|
+
disabledDataFun: D,
|
|
227
227
|
format: l
|
|
228
228
|
} = state.dictConfig, g = state.dictCodes || v, T = !t && t !== 0 ? e : state.isGettingDictTypes.join(",");
|
|
229
|
-
u(i(s, T)).then((
|
|
229
|
+
u(i(s, T)).then((B) => {
|
|
230
230
|
mutations.REMOVE_IS_GETTING_DICT_TYPES(T);
|
|
231
|
-
const y = b(
|
|
232
|
-
if (y !==
|
|
233
|
-
let
|
|
231
|
+
const y = b(B), j = n.getItem(c);
|
|
232
|
+
if (y !== j) {
|
|
233
|
+
let V = "";
|
|
234
234
|
if (m)
|
|
235
|
-
|
|
235
|
+
V = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
236
236
|
else {
|
|
237
237
|
if (o) {
|
|
238
|
-
const
|
|
239
|
-
let
|
|
240
|
-
|
|
238
|
+
const A = Object.keys(g), S = o.split(","), O = Object.keys(v), I = A.filter((f) => !O.includes(f)), G = S.filter((f) => O.includes(f) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${f}冲突`), !1) : !0);
|
|
239
|
+
let E = I.concat(G);
|
|
240
|
+
E = E.concat(T.split(",")), V = Array.from(new Set(E)).join(",");
|
|
241
241
|
} else {
|
|
242
|
-
const
|
|
243
|
-
let
|
|
244
|
-
|
|
242
|
+
const A = Object.keys(g), S = Object.keys(v);
|
|
243
|
+
let O = A.filter((G) => !S.includes(G));
|
|
244
|
+
O = O.concat(T.split(",")), V = Array.from(new Set(O)).join(",");
|
|
245
245
|
}
|
|
246
|
-
mutations.ADD_IS_GETTING_DICT_TYPES(
|
|
246
|
+
mutations.ADD_IS_GETTING_DICT_TYPES(V);
|
|
247
247
|
}
|
|
248
|
-
u(i(s,
|
|
249
|
-
const
|
|
250
|
-
if (!(
|
|
248
|
+
u(i(s, V)).then((A) => {
|
|
249
|
+
const S = w(A, e);
|
|
250
|
+
if (!(S[e] && S[e].length > 0)) {
|
|
251
251
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
255
|
-
const
|
|
256
|
-
n.setItem(a, JSON.stringify(G)), n.setItem(c,
|
|
255
|
+
const O = b(A), I = Object.assign(JSON.parse(JSON.stringify(v)), S), G = formatDictData(I, C, D, l == null ? void 0 : l.disabled);
|
|
256
|
+
n.setItem(a, JSON.stringify(G)), n.setItem(c, O), mutations.SET_DICT_CODES(G), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(V);
|
|
257
257
|
});
|
|
258
258
|
} else {
|
|
259
|
-
const
|
|
260
|
-
if (!(
|
|
259
|
+
const V = w(B, e);
|
|
260
|
+
if (!(V[e] && V[e].length > 0)) {
|
|
261
261
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
265
|
-
const
|
|
266
|
-
Object.assign(
|
|
265
|
+
const A = state.dictCodes || v, S = formatDictData(V, C, D, l == null ? void 0 : l.disabled);
|
|
266
|
+
Object.assign(A, S), n.setItem(a, JSON.stringify(A)), mutations.SET_DICT_CODES(A), r(state.dictCodes);
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
});
|
|
@@ -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: v, color: w, judgeDisabledFun: b, disabled: m } = toRefs(t),
|
|
589
|
-
let y = ref(null),
|
|
588
|
+
const t = e, { actionType: n, defaultVal: a, emptyText: u, modelValue: o, dictType: i, judgeTypeFun: s, type: c, judgeColorFun: v, color: w, judgeDisabledFun: b, disabled: m } = toRefs(t), C = toRaw(store.state.dictConfig), D = d, l = useAttrs(), g = computed(() => s.value ? s.value(o.value) : c.value ? c.value : y.value && y.value[C.format.type] ? y.value[C.format.type] : "primary"), T = computed(() => v != null && v.value ? v.value(o.value) : w != null && w.value ? w.value : y.value && y.value[C.format.color] ? y.value[C.format.color] : ""), B = computed(() => b.value ? b.value(o.value) : y.value && y.value[C.format.disabled] ? y.value[C.format.disabled] : !!m.value);
|
|
589
|
+
let y = ref(null), j = ref(null);
|
|
590
590
|
watchEffect(() => {
|
|
591
591
|
if (!i.value) {
|
|
592
|
-
|
|
592
|
+
j.value = o.value;
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
GetItemByCode(o.value, i.value).then((
|
|
596
|
-
|
|
595
|
+
GetItemByCode(o.value, i.value).then((O) => {
|
|
596
|
+
O ? (y.value = O, j.value = O[C.format.label]) : (y.value = null, j.value = String(a.value ?? (o.value === 0 ? 0 : o.value || u.value)));
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
return r({ getElButtonRef: () =>
|
|
599
|
+
const V = () => {
|
|
600
|
+
B.value || D(n.value, l);
|
|
601
|
+
}, A = ref(null);
|
|
602
|
+
return r({ getElButtonRef: () => A.value }), (O, I) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
603
603
|
ref_key: "ElButtonRef",
|
|
604
|
-
ref:
|
|
604
|
+
ref: A,
|
|
605
605
|
type: g.value,
|
|
606
606
|
color: T.value,
|
|
607
|
-
disabled:
|
|
608
|
-
},
|
|
607
|
+
disabled: B.value
|
|
608
|
+
}, O.$attrs, { onClick: V }), createSlots({
|
|
609
609
|
default: withCtx(() => [
|
|
610
|
-
createTextVNode(toDisplayString(unref(
|
|
610
|
+
createTextVNode(toDisplayString(unref(j)), 1)
|
|
611
611
|
]),
|
|
612
612
|
_: 2
|
|
613
613
|
}, [
|
|
614
|
-
renderList(
|
|
615
|
-
name:
|
|
614
|
+
renderList(O.$slots, (G, E, x) => ({
|
|
615
|
+
name: E,
|
|
616
616
|
fn: withCtx((f) => [
|
|
617
|
-
renderSlot(
|
|
617
|
+
renderSlot(O.$slots, E, mergeProps({ key: x }, f))
|
|
618
618
|
])
|
|
619
619
|
}))
|
|
620
620
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -771,22 +771,22 @@ function ValidateNestedRule(e, r) {
|
|
|
771
771
|
"===": (b, m) => b === m,
|
|
772
772
|
"!==": (b, m) => b !== m
|
|
773
773
|
}, n = (b, m) => {
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
776
|
-
return
|
|
777
|
-
if (typeof
|
|
778
|
-
const g = new Date(
|
|
774
|
+
const C = (D) => {
|
|
775
|
+
if (D instanceof Date)
|
|
776
|
+
return D.getTime();
|
|
777
|
+
if (typeof D == "string" && /^\d{4}[-/]\d{2}[-/]\d{2}(?:\s+\d{2}:\d{2}:\d{2})?$/.test(D)) {
|
|
778
|
+
const g = new Date(D);
|
|
779
779
|
if (!isNaN(g.getTime()))
|
|
780
780
|
return g.getTime();
|
|
781
781
|
}
|
|
782
|
-
return
|
|
782
|
+
return D;
|
|
783
783
|
};
|
|
784
784
|
if (typeof b == "string" && /^\$\{(.+?)\}$/.test(b)) {
|
|
785
785
|
const l = b.match(/^\$\{(.+?)\}$/)[1].trim().split(".").filter(Boolean);
|
|
786
786
|
let g = getNestedValue(m, l);
|
|
787
787
|
if (g == null)
|
|
788
788
|
return "";
|
|
789
|
-
if (g =
|
|
789
|
+
if (g = C(g), typeof g == "string") {
|
|
790
790
|
const T = g.trim();
|
|
791
791
|
return /^-?\d+(\.\d+)?$/.test(T) ? Number(T) : T;
|
|
792
792
|
}
|
|
@@ -794,14 +794,14 @@ function ValidateNestedRule(e, r) {
|
|
|
794
794
|
}
|
|
795
795
|
return typeof b == "string" && /^-?\d+(\.\d+)?$/.test(b) ? Number(b) : b;
|
|
796
796
|
}, a = (b, m) => {
|
|
797
|
-
var
|
|
797
|
+
var C;
|
|
798
798
|
if (Array.isArray(b)) {
|
|
799
|
-
let
|
|
799
|
+
let D = 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 g = b[l], T = b[l + 1],
|
|
802
|
-
|
|
801
|
+
const g = b[l], T = b[l + 1], B = Array.isArray(T) ? a(T, m) : n(T, m), y = typeof D == "number" ? D : NaN, j = typeof B == "number" ? B : NaN;
|
|
802
|
+
D = ((C = d[g]) == null ? void 0 : C.call(d, y, j)) ?? NaN;
|
|
803
803
|
}
|
|
804
|
-
return
|
|
804
|
+
return D;
|
|
805
805
|
}
|
|
806
806
|
return n(b, m);
|
|
807
807
|
};
|
|
@@ -935,15 +935,15 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
935
935
|
}, a = (s) => typeof s == "string" ? s : Array.isArray(s) ? s.map((c) => a(c)).filter(Boolean).join(" ") : typeof s == "object" && s !== null ? Object.entries(s).filter(([c, v]) => !!v).map(([c]) => c).join(" ") : "", u = (s, c) => {
|
|
936
936
|
const w = new DOMParser().parseFromString(s, "text/html"), b = w.getElementsByTagName("*");
|
|
937
937
|
return Array.from(b).forEach((m) => {
|
|
938
|
-
Array.from(m.attributes).forEach((
|
|
939
|
-
let
|
|
940
|
-
if (
|
|
941
|
-
|
|
942
|
-
else if (
|
|
943
|
-
|
|
938
|
+
Array.from(m.attributes).forEach((C) => {
|
|
939
|
+
let D;
|
|
940
|
+
if (C.name.startsWith(":"))
|
|
941
|
+
D = C.name.slice(1);
|
|
942
|
+
else if (C.name.startsWith("v-bind:"))
|
|
943
|
+
D = C.name.slice(7);
|
|
944
944
|
else
|
|
945
945
|
return;
|
|
946
|
-
const l =
|
|
946
|
+
const l = C.value;
|
|
947
947
|
let g;
|
|
948
948
|
try {
|
|
949
949
|
g = n(l, c);
|
|
@@ -951,12 +951,12 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
951
951
|
console.error(`v-bind表达式错误: ${l}`, T), g = "";
|
|
952
952
|
}
|
|
953
953
|
if (g == null)
|
|
954
|
-
m.removeAttribute(
|
|
954
|
+
m.removeAttribute(D);
|
|
955
955
|
else {
|
|
956
|
-
const T =
|
|
957
|
-
m.setAttribute(
|
|
956
|
+
const T = D === "class" ? a(g) : String(g);
|
|
957
|
+
m.setAttribute(D, T);
|
|
958
958
|
}
|
|
959
|
-
m.removeAttribute(
|
|
959
|
+
m.removeAttribute(C.name);
|
|
960
960
|
});
|
|
961
961
|
}), w.body.innerHTML;
|
|
962
962
|
}, o = (s, c) => s.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g, (v, w) => n(w, c)), i = (s, c) => {
|
|
@@ -1023,129 +1023,129 @@ 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: v, col: w, gap: b } = toRefs(n), m = toRaw(store.state.dictConfig),
|
|
1027
|
-
let
|
|
1026
|
+
const t = d, n = e, { defaultVal: a, emptyText: u, dictType: o, disabledObj: i, filterDataFun: s, disabledDataFun: c, list: v, col: w, gap: b } = toRefs(n), m = toRaw(store.state.dictConfig), C = useAttrs();
|
|
1027
|
+
let D = ref("");
|
|
1028
1028
|
const l = computed(() => {
|
|
1029
|
-
const
|
|
1030
|
-
return Object.entries(
|
|
1031
|
-
const p = ToKebabCase(
|
|
1029
|
+
const E = {};
|
|
1030
|
+
return Object.entries(C).forEach(([x, f]) => {
|
|
1031
|
+
const p = ToKebabCase(x);
|
|
1032
1032
|
if (p.startsWith("button-") || p.startsWith("on-button")) {
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1033
|
+
const _ = ToCamelCase(p.replace("button-", ""));
|
|
1034
|
+
E[_] = f;
|
|
1035
1035
|
}
|
|
1036
|
-
}),
|
|
1036
|
+
}), E;
|
|
1037
1037
|
}), g = computed(() => {
|
|
1038
|
-
const
|
|
1039
|
-
return `calc(${
|
|
1038
|
+
const E = Number(w.value), x = 100 / E, f = Array.isArray(b.value) ? b.value : String(b.value).split(" "), p = f[0], F = (f[1] || p) * (E - 1) / E;
|
|
1039
|
+
return `calc(${x}% - ${F}px) !important`;
|
|
1040
1040
|
}), T = computed(() => {
|
|
1041
|
-
const
|
|
1042
|
-
return `${
|
|
1041
|
+
const E = Array.isArray(b.value) ? b.value : String(b.value).split(" "), x = E[0], f = E[1] || x;
|
|
1042
|
+
return `${x}px ${f}px`;
|
|
1043
1043
|
});
|
|
1044
|
-
function E
|
|
1044
|
+
function B(E) {
|
|
1045
1045
|
return {
|
|
1046
1046
|
...l.value,
|
|
1047
|
-
...
|
|
1047
|
+
...E
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
const y = ref([]),
|
|
1050
|
+
const y = ref([]), j = async () => {
|
|
1051
1051
|
if (!o.value)
|
|
1052
1052
|
return;
|
|
1053
|
-
let
|
|
1053
|
+
let E = [];
|
|
1054
1054
|
if (typeof o.value == "object") {
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const { filters: f, filterType: p = m.format.value, reverse:
|
|
1059
|
-
|
|
1055
|
+
D.value = o.value.type;
|
|
1056
|
+
const x = await store.actions.getDictDataObj(D.value);
|
|
1057
|
+
E = [].concat(x[D.value]);
|
|
1058
|
+
const { filters: f, filterType: p = m.format.value, reverse: _ = !1 } = o.value, F = typeof f == "string" ? f.split(",") : f;
|
|
1059
|
+
_ ? E = E.filter((k) => !F.includes(k[p])) : E = E.filter((k) => F.includes(k[p]));
|
|
1060
1060
|
} else {
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1061
|
+
D.value = o.value;
|
|
1062
|
+
const x = await store.actions.getDictDataObj(D.value);
|
|
1063
|
+
E = [].concat(x[D.value]);
|
|
1064
1064
|
}
|
|
1065
|
-
if (s.value && (
|
|
1066
|
-
|
|
1067
|
-
...
|
|
1068
|
-
[m.format.disabled]: c.value(
|
|
1065
|
+
if (s.value && (E = s.value(E)), c.value)
|
|
1066
|
+
E = E.map((x) => ({
|
|
1067
|
+
...x,
|
|
1068
|
+
[m.format.disabled]: c.value(x)
|
|
1069
1069
|
}));
|
|
1070
1070
|
else if (i.value) {
|
|
1071
|
-
const { disabledValues:
|
|
1072
|
-
p ?
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1075
|
-
}) :
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
1071
|
+
const { disabledValues: x, disabledType: f = m.format.value, reverse: p = !1 } = i.value, _ = typeof x == "string" ? x.split(",") : x;
|
|
1072
|
+
p ? E = E.map((F) => {
|
|
1073
|
+
const k = JSON.parse(JSON.stringify(F));
|
|
1074
|
+
return k[m.format.disabled] = !_.includes(k[f]) || k[m.format.disabled], k;
|
|
1075
|
+
}) : E = E.map((F) => {
|
|
1076
|
+
const k = JSON.parse(JSON.stringify(F));
|
|
1077
|
+
return k[m.format.disabled] = _.includes(k[f]) || k[m.format.disabled], k;
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
y.value =
|
|
1081
|
-
type:
|
|
1082
|
-
label:
|
|
1083
|
-
color:
|
|
1084
|
-
icon:
|
|
1085
|
-
disabled:
|
|
1080
|
+
y.value = E.map((x) => ({
|
|
1081
|
+
type: x[m.format.type],
|
|
1082
|
+
label: x[m.format.label],
|
|
1083
|
+
color: x[m.format.color],
|
|
1084
|
+
icon: x[m.format.icon],
|
|
1085
|
+
disabled: x[m.format.disabled],
|
|
1086
1086
|
actionType: "submit",
|
|
1087
|
-
...
|
|
1087
|
+
...x
|
|
1088
1088
|
}));
|
|
1089
1089
|
};
|
|
1090
|
-
async function
|
|
1090
|
+
async function V() {
|
|
1091
1091
|
if (o.value) {
|
|
1092
|
-
|
|
1092
|
+
j();
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
let
|
|
1096
|
-
for (let
|
|
1097
|
-
const f = v.value[
|
|
1095
|
+
let E = [];
|
|
1096
|
+
for (let x = 0; x < v.value.length; x++) {
|
|
1097
|
+
const f = v.value[x];
|
|
1098
1098
|
if (f.dictType) {
|
|
1099
1099
|
const p = await GetItemByCode(f.modelValue, f.dictType);
|
|
1100
1100
|
f.type = f.type || p[m.format.type] || "", f.label = String(
|
|
1101
1101
|
f.label || (p ? p[m.format.label] : (f.defaultVal || a.value) ?? (f.modelValue === 0 ? 0 : f.modelValue || f.emptyText || u.value))
|
|
1102
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
|
+
E.push(f);
|
|
1105
1105
|
}
|
|
1106
|
-
y.value =
|
|
1106
|
+
y.value = E;
|
|
1107
1107
|
}
|
|
1108
1108
|
onMounted(() => {
|
|
1109
|
-
|
|
1109
|
+
V();
|
|
1110
1110
|
}), watch(
|
|
1111
1111
|
() => n.list,
|
|
1112
1112
|
() => {
|
|
1113
|
-
|
|
1113
|
+
V();
|
|
1114
1114
|
},
|
|
1115
1115
|
{ deep: !0 }
|
|
1116
1116
|
// 深层监听数组/对象变化
|
|
1117
1117
|
);
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
return r({ getElButtonsRef:
|
|
1118
|
+
const A = (E) => {
|
|
1119
|
+
E.disabled || (E.actionType === "submit" ? t("submit", E) : E.actionType === "reset" ? t("reset", E) : E.actionType === "action" && t("action", E));
|
|
1120
|
+
}, S = ref(null), O = () => S.value, I = ref([]);
|
|
1121
|
+
return r({ getElButtonsRef: O, getElButtonRefs: () => I.value }), (E, x) => (openBlock(), createElementBlock("div", {
|
|
1122
1122
|
ref_key: "ElButtonsRef",
|
|
1123
|
-
ref:
|
|
1124
|
-
class: normalizeClass(["el-buttons-dict",
|
|
1125
|
-
id:
|
|
1126
|
-
style: normalizeStyle({ ...
|
|
1123
|
+
ref: S,
|
|
1124
|
+
class: normalizeClass(["el-buttons-dict", E.$attrs.class]),
|
|
1125
|
+
id: E.$attrs.id,
|
|
1126
|
+
style: normalizeStyle({ ...E.$attrs.style, gap: T.value })
|
|
1127
1127
|
}, [
|
|
1128
1128
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (f, p) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
1129
1129
|
ref_for: !0,
|
|
1130
|
-
ref: (
|
|
1131
|
-
|
|
1130
|
+
ref: (_) => {
|
|
1131
|
+
_ && (I.value[p] = _);
|
|
1132
1132
|
},
|
|
1133
1133
|
key: p,
|
|
1134
1134
|
style: { width: g.value, margin: "0 !important" },
|
|
1135
|
-
onClick: (
|
|
1136
|
-
},
|
|
1135
|
+
onClick: (_) => A(f)
|
|
1136
|
+
}, B(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, (
|
|
1143
|
-
name:
|
|
1144
|
-
fn: withCtx((
|
|
1142
|
+
renderList(f.slotList, (_, F) => ({
|
|
1143
|
+
name: _.slotName,
|
|
1144
|
+
fn: withCtx((k) => [
|
|
1145
1145
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
1146
|
-
key:
|
|
1147
|
-
render:
|
|
1148
|
-
scope:
|
|
1146
|
+
key: F,
|
|
1147
|
+
render: _.render,
|
|
1148
|
+
scope: k
|
|
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(""), v = toRaw(store.state.dictConfig), w = d, b = (
|
|
1256
|
-
w("dictChange",
|
|
1255
|
+
const t = useAttrs(), n = e, { maxLevel: a, dictType: u, disabledObj: o, filterDataFun: i, disabledDataFun: s } = toRefs(n), c = ref(""), v = toRaw(store.state.dictConfig), w = d, b = (A) => {
|
|
1256
|
+
w("dictChange", A);
|
|
1257
1257
|
}, m = reactive({
|
|
1258
1258
|
list: []
|
|
1259
|
-
}),
|
|
1259
|
+
}), C = async () => {
|
|
1260
1260
|
if (!u.value)
|
|
1261
1261
|
return;
|
|
1262
|
-
let
|
|
1262
|
+
let A = [];
|
|
1263
1263
|
if (typeof u.value == "object") {
|
|
1264
1264
|
c.value = u.value.type;
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
const { filters:
|
|
1268
|
-
G ?
|
|
1265
|
+
const S = await store.actions.getDictDataObj(c.value);
|
|
1266
|
+
A = [].concat(S[c.value]);
|
|
1267
|
+
const { filters: O, filterType: I = v.format.value, reverse: G = !1 } = u.value, E = typeof O == "string" ? O.split(",") : O;
|
|
1268
|
+
G ? A = A.filter((x) => !E.includes(x[I])) : A = A.filter((x) => E.includes(x[I]));
|
|
1269
1269
|
} else {
|
|
1270
1270
|
c.value = u.value;
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1271
|
+
const S = await store.actions.getDictDataObj(c.value);
|
|
1272
|
+
A = [].concat(S[c.value]);
|
|
1273
1273
|
}
|
|
1274
|
-
if (i.value && (
|
|
1275
|
-
|
|
1276
|
-
...
|
|
1277
|
-
[v.format.disabled]: s.value(
|
|
1274
|
+
if (i.value && (A = i.value(A)), s.value)
|
|
1275
|
+
A = A.map((S) => ({
|
|
1276
|
+
...S,
|
|
1277
|
+
[v.format.disabled]: s.value(S)
|
|
1278
1278
|
}));
|
|
1279
1279
|
else if (o.value) {
|
|
1280
|
-
const { disabledValues:
|
|
1281
|
-
I ?
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
}) :
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1280
|
+
const { disabledValues: S, disabledType: O = v.treeSetting.valueField, reverse: I = !1 } = o.value, G = typeof S == "string" ? S.split(",") : S;
|
|
1281
|
+
I ? A = A.map((E) => {
|
|
1282
|
+
const x = JSON.parse(JSON.stringify(E));
|
|
1283
|
+
return x[v.format.disabled] = !G.includes(x[O]) || x[v.format.disabled], x;
|
|
1284
|
+
}) : A = A.map((E) => {
|
|
1285
|
+
const x = JSON.parse(JSON.stringify(E));
|
|
1286
|
+
return x[v.format.disabled] = G.includes(x[O]) || x[v.format.disabled], x;
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
|
-
m.list =
|
|
1290
|
-
},
|
|
1291
|
-
const
|
|
1289
|
+
m.list = A;
|
|
1290
|
+
}, D = computed(() => store.state.isGettingDictTypes.includes(c.value)), l = computed(() => store.state.isGettingAllDictTypes), g = computed(() => {
|
|
1291
|
+
const A = store.state.dictConfig.treeSetting, S = store.state.dictConfig.format, O = t.props ?? {};
|
|
1292
1292
|
return {
|
|
1293
|
-
disabled: (
|
|
1294
|
-
label: (
|
|
1295
|
-
value: (
|
|
1296
|
-
children: (
|
|
1297
|
-
leaf: (
|
|
1293
|
+
disabled: (O == null ? void 0 : O.disabled) ?? S.disabled,
|
|
1294
|
+
label: (O == null ? void 0 : O.label) ?? A.labelField,
|
|
1295
|
+
value: (O == null ? void 0 : O.value) ?? A.valueField,
|
|
1296
|
+
children: (O == null ? void 0 : O.children) ?? A.childrenField,
|
|
1297
|
+
leaf: (O == null ? void 0 : O.leaf) ?? A.leafField
|
|
1298
1298
|
};
|
|
1299
1299
|
}), T = computed(() => {
|
|
1300
|
-
const
|
|
1301
|
-
...
|
|
1302
|
-
valueField:
|
|
1303
|
-
labelField:
|
|
1304
|
-
childrenField:
|
|
1305
|
-
leafField:
|
|
1306
|
-
disabled:
|
|
1300
|
+
const A = JSON.parse(JSON.stringify(v.treeSetting)), S = t.props || {}, O = {
|
|
1301
|
+
...S,
|
|
1302
|
+
valueField: S != null && S.value ? S.value : A.valueField,
|
|
1303
|
+
labelField: S != null && S.label ? S.label : A.labelField,
|
|
1304
|
+
childrenField: S != null && S.children ? S.children : A.childrenField,
|
|
1305
|
+
leafField: S != null && S.leaf ? S.leaf : A.leafField,
|
|
1306
|
+
disabled: S != null && S.disabled ? S.disabled : v.format.disabled
|
|
1307
1307
|
};
|
|
1308
|
-
return Object.assign(
|
|
1309
|
-
}),
|
|
1310
|
-
for (let
|
|
1311
|
-
const I =
|
|
1312
|
-
if (I[T.value.levelField] ===
|
|
1308
|
+
return Object.assign(A, O);
|
|
1309
|
+
}), B = (A, S) => {
|
|
1310
|
+
for (let O = 0; O < A.length; O++) {
|
|
1311
|
+
const I = A[O];
|
|
1312
|
+
if (I[T.value.levelField] === S) {
|
|
1313
1313
|
delete I[T.value.childrenField], I[T.value.leafField] = !0;
|
|
1314
1314
|
continue;
|
|
1315
1315
|
} else {
|
|
1316
|
-
const
|
|
1317
|
-
E
|
|
1316
|
+
const E = I[T.value.childrenField];
|
|
1317
|
+
B(E, S);
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
}, y = computed(() => {
|
|
1321
1321
|
if (m.list.length === 0)
|
|
1322
1322
|
return [];
|
|
1323
|
-
const
|
|
1324
|
-
let
|
|
1325
|
-
return a.value &&
|
|
1323
|
+
const A = JSON.parse(JSON.stringify(m.list));
|
|
1324
|
+
let S = ListToTree(A, T.value);
|
|
1325
|
+
return a.value && B(S, +a.value), S || [];
|
|
1326
1326
|
});
|
|
1327
1327
|
watch(
|
|
1328
|
-
[
|
|
1329
|
-
([
|
|
1330
|
-
!
|
|
1328
|
+
[D, l],
|
|
1329
|
+
([A, S]) => {
|
|
1330
|
+
!A && !S && C();
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
1333
|
immediate: !0
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
|
-
const
|
|
1337
|
-
return r({ getElCascaderRef: () =>
|
|
1336
|
+
const j = ref(null);
|
|
1337
|
+
return r({ getElCascaderRef: () => j.value }), (A, S) => (openBlock(), createBlock(unref(ElCascader), mergeProps({
|
|
1338
1338
|
ref_key: "ElCascaderRef",
|
|
1339
|
-
ref:
|
|
1339
|
+
ref: j,
|
|
1340
1340
|
options: y.value,
|
|
1341
1341
|
props: g.value,
|
|
1342
1342
|
onChange: b
|
|
1343
|
-
},
|
|
1344
|
-
renderList(
|
|
1343
|
+
}, A.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1344
|
+
renderList(A.$slots, (O, I, G) => ({
|
|
1345
1345
|
name: I,
|
|
1346
|
-
fn: withCtx((
|
|
1347
|
-
renderSlot(
|
|
1346
|
+
fn: withCtx((E) => [
|
|
1347
|
+
renderSlot(A.$slots, I, mergeProps({ key: G }, E))
|
|
1348
1348
|
])
|
|
1349
1349
|
}))
|
|
1350
1350
|
]), 1040, ["options", "props"]));
|
|
@@ -1401,7 +1401,7 @@ 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: v, 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"),
|
|
1404
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), 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"), C = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), D = 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), g = ref(null);
|
|
1406
1406
|
watchEffect(() => {
|
|
1407
1407
|
if (!n.value) {
|
|
@@ -1413,23 +1413,23 @@ const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1413
1413
|
});
|
|
1414
1414
|
});
|
|
1415
1415
|
const T = ref(null);
|
|
1416
|
-
return r({ getElCheckTagRef: () => T.value }), (y,
|
|
1416
|
+
return r({ getElCheckTagRef: () => T.value }), (y, j) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1417
1417
|
class: "el-check-tag-dict",
|
|
1418
1418
|
ref_key: "ElCheckTagRef",
|
|
1419
1419
|
ref: T,
|
|
1420
1420
|
type: m.value,
|
|
1421
|
-
color:
|
|
1422
|
-
disabled:
|
|
1421
|
+
color: C.value,
|
|
1422
|
+
disabled: D.value
|
|
1423
1423
|
}, y.$attrs), createSlots({
|
|
1424
1424
|
default: withCtx(() => [
|
|
1425
1425
|
createTextVNode(toDisplayString(unref(g)), 1)
|
|
1426
1426
|
]),
|
|
1427
1427
|
_: 2
|
|
1428
1428
|
}, [
|
|
1429
|
-
renderList(y.$slots, (
|
|
1430
|
-
name:
|
|
1431
|
-
fn: withCtx((
|
|
1432
|
-
renderSlot(y.$slots,
|
|
1429
|
+
renderList(y.$slots, (V, A, S) => ({
|
|
1430
|
+
name: A,
|
|
1431
|
+
fn: withCtx((O) => [
|
|
1432
|
+
renderSlot(y.$slots, A, mergeProps({ key: S }, O))
|
|
1433
1433
|
])
|
|
1434
1434
|
}))
|
|
1435
1435
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -1486,45 +1486,45 @@ 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: v } = toRefs(t), w = ref([]), b = ref(""), m = toRaw(store.state.dictConfig),
|
|
1490
|
-
|
|
1489
|
+
const t = e, { modelValue: n, options: a, fieldNames: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: v } = toRefs(t), w = ref([]), b = ref(""), m = toRaw(store.state.dictConfig), C = d, D = (S, O) => {
|
|
1490
|
+
C("change", S);
|
|
1491
1491
|
const I = [];
|
|
1492
1492
|
for (let G = 0; G < g.value.length; G++) {
|
|
1493
|
-
const
|
|
1494
|
-
if (n.value.includes(
|
|
1495
|
-
if (
|
|
1496
|
-
I.push(
|
|
1493
|
+
const E = g.value[G];
|
|
1494
|
+
if (n.value.includes(E[m.format.value]) && I.push(E), G === O)
|
|
1495
|
+
if (S && !n.value.includes(E[m.format.value]))
|
|
1496
|
+
I.push(E);
|
|
1497
1497
|
else {
|
|
1498
|
-
const
|
|
1499
|
-
I.splice(
|
|
1498
|
+
const x = I.indexOf(E);
|
|
1499
|
+
I.splice(x, 1);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
if (
|
|
1502
|
+
if (C(
|
|
1503
1503
|
"update:modelValue",
|
|
1504
1504
|
I.map((G) => G[m.format.value])
|
|
1505
1505
|
), s.value) {
|
|
1506
|
-
|
|
1506
|
+
C("dictChange", I);
|
|
1507
1507
|
return;
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
C(
|
|
1510
1510
|
"dictChange",
|
|
1511
1511
|
I.map((G) => G[m.format.value])
|
|
1512
1512
|
);
|
|
1513
1513
|
}, l = reactive({
|
|
1514
1514
|
list: []
|
|
1515
|
-
}), g = computed(() => l.list.map((
|
|
1516
|
-
label:
|
|
1517
|
-
value:
|
|
1518
|
-
disabled: !!
|
|
1519
|
-
...
|
|
1515
|
+
}), g = computed(() => l.list.map((S) => ({
|
|
1516
|
+
label: S[m.format.label],
|
|
1517
|
+
value: S[m.format.value],
|
|
1518
|
+
disabled: !!S[m.format.disabled],
|
|
1519
|
+
...S
|
|
1520
1520
|
})));
|
|
1521
1521
|
watch(
|
|
1522
1522
|
[() => g.value, () => t.modelValue],
|
|
1523
|
-
([
|
|
1523
|
+
([S, O]) => {
|
|
1524
1524
|
const I = [];
|
|
1525
|
-
for (let G = 0; G <
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1525
|
+
for (let G = 0; G < S.length; G++) {
|
|
1526
|
+
const E = S[G];
|
|
1527
|
+
O.includes(E[m.format.value]) ? I.push(!0) : I.push(!1);
|
|
1528
1528
|
}
|
|
1529
1529
|
w.value = I;
|
|
1530
1530
|
},
|
|
@@ -1537,61 +1537,61 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1537
1537
|
const T = async () => {
|
|
1538
1538
|
if (!o.value || a.value && a.value.length > 0)
|
|
1539
1539
|
return;
|
|
1540
|
-
let
|
|
1540
|
+
let S = [];
|
|
1541
1541
|
if (typeof o.value == "object") {
|
|
1542
1542
|
b.value = o.value.type;
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1545
|
-
const { filters: I, filterType: G = m.format.value, reverse:
|
|
1546
|
-
|
|
1543
|
+
const O = await store.actions.getDictDataObj(b.value);
|
|
1544
|
+
S = [].concat(O[b.value]);
|
|
1545
|
+
const { filters: I, filterType: G = m.format.value, reverse: E = !1 } = o.value, x = typeof I == "string" ? I.split(",") : I;
|
|
1546
|
+
E ? S = S.filter((f) => !x.includes(f[G])) : S = S.filter((f) => x.includes(f[G]));
|
|
1547
1547
|
} else {
|
|
1548
1548
|
b.value = o.value;
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1549
|
+
const O = await store.actions.getDictDataObj(b.value);
|
|
1550
|
+
S = [].concat(O[b.value]);
|
|
1551
1551
|
}
|
|
1552
|
-
if (c.value && (
|
|
1553
|
-
|
|
1554
|
-
...
|
|
1555
|
-
[m.format.disabled]: v.value(
|
|
1552
|
+
if (c.value && (S = c.value(S)), v.value)
|
|
1553
|
+
S = S.map((O) => ({
|
|
1554
|
+
...O,
|
|
1555
|
+
[m.format.disabled]: v.value(O)
|
|
1556
1556
|
}));
|
|
1557
1557
|
else if (i.value) {
|
|
1558
|
-
const { disabledValues:
|
|
1559
|
-
G ?
|
|
1560
|
-
const f = JSON.parse(JSON.stringify(
|
|
1561
|
-
return f[m.format.disabled] = !
|
|
1562
|
-
}) :
|
|
1563
|
-
const f = JSON.parse(JSON.stringify(
|
|
1564
|
-
return f[m.format.disabled] =
|
|
1558
|
+
const { disabledValues: O, disabledType: I = m.format.value, reverse: G = !1 } = i.value, E = typeof O == "string" ? O.split(",") : O;
|
|
1559
|
+
G ? S = S.map((x) => {
|
|
1560
|
+
const f = JSON.parse(JSON.stringify(x));
|
|
1561
|
+
return f[m.format.disabled] = !E.includes(f[I]) || f[m.format.disabled], f;
|
|
1562
|
+
}) : S = S.map((x) => {
|
|
1563
|
+
const f = JSON.parse(JSON.stringify(x));
|
|
1564
|
+
return f[m.format.disabled] = E.includes(f[I]) || f[m.format.disabled], f;
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
|
-
l.list =
|
|
1568
|
-
},
|
|
1567
|
+
l.list = S;
|
|
1568
|
+
}, B = computed(() => store.state.isGettingDictTypes.includes(b.value)), y = computed(() => store.state.isGettingAllDictTypes), j = computed(() => a.value);
|
|
1569
1569
|
watch(
|
|
1570
|
-
[
|
|
1571
|
-
([
|
|
1572
|
-
!
|
|
1573
|
-
[m.format.value]:
|
|
1574
|
-
[m.format.label]:
|
|
1575
|
-
[m.format.disabled]: !!
|
|
1576
|
-
...
|
|
1577
|
-
})) : l.list = l.list.map((
|
|
1578
|
-
[m.format.value]:
|
|
1579
|
-
[m.format.label]:
|
|
1570
|
+
[B, y, j],
|
|
1571
|
+
([S, O, I]) => {
|
|
1572
|
+
!S && !O && I && I.length === 0 && T(), I.length > 0 && (l.list = JSON.parse(JSON.stringify(I)), l.list.length > 0 && (Object.prototype.toString.call(l.list[0]) === "[object Object]" ? l.list = l.list.map((E) => ({
|
|
1573
|
+
[m.format.value]: E[u.value.value],
|
|
1574
|
+
[m.format.label]: E[u.value.label],
|
|
1575
|
+
[m.format.disabled]: !!E[u.value.disabled],
|
|
1576
|
+
...E
|
|
1577
|
+
})) : l.list = l.list.map((E) => ({
|
|
1578
|
+
[m.format.value]: E,
|
|
1579
|
+
[m.format.label]: E
|
|
1580
1580
|
}))));
|
|
1581
1581
|
},
|
|
1582
1582
|
{
|
|
1583
1583
|
immediate: !0
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
|
-
const
|
|
1587
|
-
return r({ getElCheckAbleTagRefs: () =>
|
|
1586
|
+
const V = ref([]);
|
|
1587
|
+
return r({ getElCheckAbleTagRefs: () => V.value }), (S, O) => (openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (I, G) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1588
1588
|
ref_for: !0,
|
|
1589
|
-
ref: (
|
|
1590
|
-
|
|
1589
|
+
ref: (E) => {
|
|
1590
|
+
E && (V.value[G] = E);
|
|
1591
1591
|
},
|
|
1592
1592
|
checked: w.value[G]
|
|
1593
|
-
},
|
|
1594
|
-
onChange: (
|
|
1593
|
+
}, S.$attrs, {
|
|
1594
|
+
onChange: (E) => D(E, G),
|
|
1595
1595
|
key: G,
|
|
1596
1596
|
type: I[unref(m).format.type]
|
|
1597
1597
|
}), createSlots({
|
|
@@ -1600,10 +1600,10 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1600
1600
|
]),
|
|
1601
1601
|
_: 2
|
|
1602
1602
|
}, [
|
|
1603
|
-
renderList(
|
|
1604
|
-
name:
|
|
1603
|
+
renderList(S.$slots, (E, x, f) => ({
|
|
1604
|
+
name: x,
|
|
1605
1605
|
fn: withCtx((p) => [
|
|
1606
|
-
renderSlot(
|
|
1606
|
+
renderSlot(S.$slots, x, normalizeProps(guardReactiveProps(p)), void 0, !0)
|
|
1607
1607
|
])
|
|
1608
1608
|
}))
|
|
1609
1609
|
]), 1040, ["checked", "onChange", "type"]))), 128));
|
|
@@ -1662,108 +1662,108 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1662
1662
|
setup(e, { expose: r, emit: d }) {
|
|
1663
1663
|
const t = e, { disabled: n, data: a, format: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: v } = toRefs(t), w = useAttrs(), b = computed(() => {
|
|
1664
1664
|
const f = {};
|
|
1665
|
-
return Object.entries(w).forEach(([p,
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1668
|
-
const
|
|
1669
|
-
f[
|
|
1665
|
+
return Object.entries(w).forEach(([p, _]) => {
|
|
1666
|
+
const F = ToKebabCase(p);
|
|
1667
|
+
if (!F.startsWith("checkbox-button-") && !F.startsWith("on-checkbox-button-")) {
|
|
1668
|
+
const k = ToCamelCase(F);
|
|
1669
|
+
f[k] = _;
|
|
1670
1670
|
}
|
|
1671
1671
|
}), f;
|
|
1672
1672
|
}), m = computed(() => {
|
|
1673
1673
|
const f = {};
|
|
1674
|
-
return Object.entries(w).forEach(([p,
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1677
|
-
const
|
|
1678
|
-
f[
|
|
1674
|
+
return Object.entries(w).forEach(([p, _]) => {
|
|
1675
|
+
const F = ToKebabCase(p);
|
|
1676
|
+
if (F.startsWith("checkbox-button-") || F.startsWith("on-checkbox-button-")) {
|
|
1677
|
+
const k = ToCamelCase(F.replace("checkbox-button-", ""));
|
|
1678
|
+
f[k] = _;
|
|
1679
1679
|
}
|
|
1680
1680
|
}), f;
|
|
1681
|
-
}),
|
|
1681
|
+
}), C = ref(""), D = toRaw(store.state.dictConfig), l = d, g = (f) => {
|
|
1682
1682
|
if (!s.value) {
|
|
1683
1683
|
l("dictChange", f);
|
|
1684
1684
|
return;
|
|
1685
1685
|
}
|
|
1686
|
-
const p = T.list.filter((
|
|
1686
|
+
const p = T.list.filter((_) => f.includes(_[D.format.value]));
|
|
1687
1687
|
l("dictChange", p);
|
|
1688
1688
|
}, T = reactive({
|
|
1689
1689
|
list: []
|
|
1690
|
-
}),
|
|
1690
|
+
}), B = async () => {
|
|
1691
1691
|
if (!o.value || a.value && a.value.length > 0)
|
|
1692
1692
|
return;
|
|
1693
1693
|
let f = [];
|
|
1694
1694
|
if (typeof o.value == "object") {
|
|
1695
|
-
|
|
1696
|
-
const p = await store.actions.getDictDataObj(
|
|
1697
|
-
f = [].concat(p[
|
|
1698
|
-
const { filters:
|
|
1699
|
-
|
|
1695
|
+
C.value = o.value.type;
|
|
1696
|
+
const p = await store.actions.getDictDataObj(C.value);
|
|
1697
|
+
f = [].concat(p[C.value]);
|
|
1698
|
+
const { filters: _, filterType: F = D.format.value, reverse: k = !1 } = o.value, N = typeof _ == "string" ? _.split(",") : _;
|
|
1699
|
+
k ? f = f.filter((R) => !N.includes(R[F])) : f = f.filter((R) => N.includes(R[F]));
|
|
1700
1700
|
} else {
|
|
1701
|
-
|
|
1702
|
-
const p = await store.actions.getDictDataObj(
|
|
1703
|
-
f = [].concat(p[
|
|
1701
|
+
C.value = o.value;
|
|
1702
|
+
const p = await store.actions.getDictDataObj(C.value);
|
|
1703
|
+
f = [].concat(p[C.value]);
|
|
1704
1704
|
}
|
|
1705
1705
|
if (c.value && (f = c.value(f)), v.value)
|
|
1706
1706
|
f = f.map((p) => ({
|
|
1707
1707
|
...p,
|
|
1708
|
-
[
|
|
1708
|
+
[D.format.disabled]: v.value(p)
|
|
1709
1709
|
}));
|
|
1710
1710
|
else if (i.value) {
|
|
1711
|
-
const { disabledValues: p, disabledType:
|
|
1712
|
-
|
|
1713
|
-
const R = JSON.parse(JSON.stringify(
|
|
1714
|
-
return R[
|
|
1715
|
-
}) : f = f.map((
|
|
1716
|
-
const R = JSON.parse(JSON.stringify(
|
|
1717
|
-
return R[
|
|
1711
|
+
const { disabledValues: p, disabledType: _ = D.format.value, reverse: F = !1 } = i.value, k = typeof p == "string" ? p.split(",") : p;
|
|
1712
|
+
F ? f = f.map((N) => {
|
|
1713
|
+
const R = JSON.parse(JSON.stringify(N));
|
|
1714
|
+
return R[D.format.disabled] = !k.includes(R[_]) || R[D.format.disabled], R;
|
|
1715
|
+
}) : f = f.map((N) => {
|
|
1716
|
+
const R = JSON.parse(JSON.stringify(N));
|
|
1717
|
+
return R[D.format.disabled] = k.includes(R[_]) || R[D.format.disabled], R;
|
|
1718
1718
|
});
|
|
1719
1719
|
}
|
|
1720
1720
|
T.list = f;
|
|
1721
|
-
}, y = computed(() => store.state.isGettingDictTypes.includes(
|
|
1721
|
+
}, y = computed(() => store.state.isGettingDictTypes.includes(C.value)), j = computed(() => store.state.isGettingAllDictTypes), V = computed(() => a.value), A = inject(formItemContextKey), S = inject(formContextKey), O = computed(() => n.value || w["checkbox-button-disabled"] === "" || w["checkbox-button-disabled"] || w.checkboxButtonDisabled === "" || w.checkboxButtonDisabled || w.CheckboxButtonDisabled === "" || w.CheckboxButtonDisabled || (A == null ? void 0 : A.disabled) || (S == null ? void 0 : S.disabled) || !1);
|
|
1722
1722
|
watch(
|
|
1723
|
-
[y,
|
|
1724
|
-
([f, p,
|
|
1725
|
-
!f && !p &&
|
|
1726
|
-
[
|
|
1727
|
-
[
|
|
1728
|
-
[
|
|
1729
|
-
...
|
|
1730
|
-
})) : T.list = T.list.map((
|
|
1731
|
-
[
|
|
1732
|
-
[
|
|
1723
|
+
[y, j, V],
|
|
1724
|
+
([f, p, _]) => {
|
|
1725
|
+
!f && !p && _ && _.length === 0 && B(), _.length > 0 && (T.list = JSON.parse(JSON.stringify(_)), T.list.length > 0 && (Object.prototype.toString.call(T.list[0]) === "[object Object]" ? T.list = T.list.map((k) => ({
|
|
1726
|
+
[D.format.value]: k[u.value.value],
|
|
1727
|
+
[D.format.label]: k[u.value.label],
|
|
1728
|
+
[D.format.disabled]: !!k[u.value.disabled],
|
|
1729
|
+
...k
|
|
1730
|
+
})) : T.list = T.list.map((k) => ({
|
|
1731
|
+
[D.format.value]: k,
|
|
1732
|
+
[D.format.label]: k
|
|
1733
1733
|
}))));
|
|
1734
1734
|
},
|
|
1735
1735
|
{
|
|
1736
1736
|
immediate: !0
|
|
1737
1737
|
}
|
|
1738
1738
|
);
|
|
1739
|
-
const I = ref(null), G = () => I.value,
|
|
1740
|
-
return r({ getElCheckboxGroupRef: G, getElCheckboxButtonRefs: () =>
|
|
1739
|
+
const I = ref(null), G = () => I.value, E = ref([]);
|
|
1740
|
+
return r({ getElCheckboxGroupRef: G, getElCheckboxButtonRefs: () => E.value }), (f, p) => (openBlock(), createBlock(unref(ElCheckboxGroup), mergeProps({
|
|
1741
1741
|
ref_key: "ElCheckboxGroupRef",
|
|
1742
1742
|
ref: I,
|
|
1743
|
-
disabled:
|
|
1743
|
+
disabled: O.value
|
|
1744
1744
|
}, b.value, { onChange: g }), createSlots({
|
|
1745
1745
|
default: withCtx(() => [
|
|
1746
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (
|
|
1746
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (_, F) => (openBlock(), createBlock(unref(ElCheckboxButton), mergeProps({
|
|
1747
1747
|
ref_for: !0,
|
|
1748
|
-
ref: (
|
|
1749
|
-
|
|
1748
|
+
ref: (k) => {
|
|
1749
|
+
k && (E.value[F] = k);
|
|
1750
1750
|
},
|
|
1751
|
-
key:
|
|
1752
|
-
disabled:
|
|
1753
|
-
label:
|
|
1751
|
+
key: _[unref(D).format.value],
|
|
1752
|
+
disabled: O.value || _[unref(D).format.disabled],
|
|
1753
|
+
label: _[unref(D).format.value]
|
|
1754
1754
|
}, m.value), {
|
|
1755
1755
|
default: withCtx(() => [
|
|
1756
|
-
createTextVNode(toDisplayString(
|
|
1756
|
+
createTextVNode(toDisplayString(_[unref(D).format.label]), 1)
|
|
1757
1757
|
]),
|
|
1758
1758
|
_: 2
|
|
1759
1759
|
}, 1040, ["disabled", "label"]))), 128))
|
|
1760
1760
|
]),
|
|
1761
1761
|
_: 2
|
|
1762
1762
|
}, [
|
|
1763
|
-
renderList(f.$slots, (
|
|
1764
|
-
name:
|
|
1765
|
-
fn: withCtx((
|
|
1766
|
-
renderSlot(f.$slots,
|
|
1763
|
+
renderList(f.$slots, (_, F, k) => ({
|
|
1764
|
+
name: F,
|
|
1765
|
+
fn: withCtx((N) => [
|
|
1766
|
+
renderSlot(f.$slots, F, mergeProps({ key: k }, N))
|
|
1767
1767
|
])
|
|
1768
1768
|
}))
|
|
1769
1769
|
]), 1040, ["disabled"]));
|
|
@@ -1826,7 +1826,7 @@ 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: v, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(),
|
|
1829
|
+
const t = e, { disabled: n, modelValue: a, addAllText: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(), C = ref(!1), D = ref(!1), l = ref([]), g = computed(() => {
|
|
1830
1830
|
const P = {};
|
|
1831
1831
|
return Object.entries(m).forEach(([K, L]) => {
|
|
1832
1832
|
const M = ToKebabCase(K);
|
|
@@ -1844,23 +1844,23 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1844
1844
|
P[W] = L;
|
|
1845
1845
|
}
|
|
1846
1846
|
}), P;
|
|
1847
|
-
}),
|
|
1848
|
-
const K = P.length, L =
|
|
1849
|
-
|
|
1850
|
-
},
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1847
|
+
}), B = ref(""), y = toRaw(store.state.dictConfig), j = d, V = computed(() => O.list.filter((P) => !P[y.format.disabled])), A = (P) => {
|
|
1848
|
+
const K = P.length, L = V.value.length;
|
|
1849
|
+
D.value = K === L, C.value = K > 0 && K < L;
|
|
1850
|
+
}, S = (P) => {
|
|
1851
|
+
if (A(P), !v.value) {
|
|
1852
|
+
j("dictChange", P);
|
|
1853
1853
|
return;
|
|
1854
1854
|
}
|
|
1855
|
-
const K =
|
|
1856
|
-
|
|
1857
|
-
},
|
|
1855
|
+
const K = O.list.filter((L) => P.includes(L[y.format.value]));
|
|
1856
|
+
j("dictChange", K);
|
|
1857
|
+
}, O = reactive({
|
|
1858
1858
|
list: []
|
|
1859
1859
|
});
|
|
1860
1860
|
watch(
|
|
1861
|
-
() =>
|
|
1861
|
+
() => V.value,
|
|
1862
1862
|
() => {
|
|
1863
|
-
|
|
1863
|
+
A(a.value);
|
|
1864
1864
|
}
|
|
1865
1865
|
);
|
|
1866
1866
|
const I = async () => {
|
|
@@ -1868,15 +1868,15 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1868
1868
|
return;
|
|
1869
1869
|
let P = [];
|
|
1870
1870
|
if (typeof s.value == "object") {
|
|
1871
|
-
|
|
1872
|
-
const K = await store.actions.getDictDataObj(
|
|
1873
|
-
P = [].concat(K[
|
|
1871
|
+
B.value = s.value.type;
|
|
1872
|
+
const K = await store.actions.getDictDataObj(B.value);
|
|
1873
|
+
P = [].concat(K[B.value]);
|
|
1874
1874
|
const { filters: L, filterType: M = y.format.value, reverse: W = !1 } = s.value, z = typeof L == "string" ? L.split(",") : L;
|
|
1875
1875
|
W ? P = P.filter(($) => !z.includes($[M])) : P = P.filter(($) => z.includes($[M]));
|
|
1876
1876
|
} else {
|
|
1877
|
-
|
|
1878
|
-
const K = await store.actions.getDictDataObj(
|
|
1879
|
-
P = [].concat(K[
|
|
1877
|
+
B.value = s.value;
|
|
1878
|
+
const K = await store.actions.getDictDataObj(B.value);
|
|
1879
|
+
P = [].concat(K[B.value]);
|
|
1880
1880
|
}
|
|
1881
1881
|
if (w.value && (P = w.value(P)), b.value)
|
|
1882
1882
|
P = P.map((K) => ({
|
|
@@ -1893,8 +1893,8 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1893
1893
|
return $[y.format.disabled] = W.includes($[L]) || $[y.format.disabled], $;
|
|
1894
1894
|
});
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1897
|
-
}, G = computed(() => store.state.isGettingDictTypes.includes(
|
|
1896
|
+
O.list = P;
|
|
1897
|
+
}, G = computed(() => store.state.isGettingDictTypes.includes(B.value)), E = computed(() => store.state.isGettingAllDictTypes), x = computed(() => o.value), f = inject(formItemContextKey), p = inject(formContextKey), _ = 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
|
// 正确监听方式
|
|
@@ -1909,17 +1909,17 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1909
1909
|
), watch(
|
|
1910
1910
|
() => l.value,
|
|
1911
1911
|
(P) => {
|
|
1912
|
-
|
|
1912
|
+
j("update:modelValue", P), j("change", P);
|
|
1913
1913
|
}
|
|
1914
1914
|
), watch(
|
|
1915
|
-
[G,
|
|
1915
|
+
[G, E, x],
|
|
1916
1916
|
([P, K, L]) => {
|
|
1917
|
-
!P && !K && L && L.length === 0 && I(), L.length > 0 && (
|
|
1917
|
+
!P && !K && L && L.length === 0 && I(), L.length > 0 && (O.list = JSON.parse(JSON.stringify(L)), O.list.length > 0 && (Object.prototype.toString.call(O.list[0]) === "[object Object]" ? O.list = O.list.map((W) => ({
|
|
1918
1918
|
[y.format.value]: W[i.value.value],
|
|
1919
1919
|
[y.format.label]: W[i.value.label],
|
|
1920
1920
|
[y.format.disabled]: !!W[i.value.disabled],
|
|
1921
1921
|
...W
|
|
1922
|
-
})) :
|
|
1922
|
+
})) : O.list = O.list.map((W) => ({
|
|
1923
1923
|
[y.format.value]: W,
|
|
1924
1924
|
[y.format.label]: W
|
|
1925
1925
|
}))));
|
|
@@ -1928,22 +1928,22 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1928
1928
|
immediate: !0
|
|
1929
1929
|
}
|
|
1930
1930
|
);
|
|
1931
|
-
const
|
|
1932
|
-
if (
|
|
1933
|
-
const K =
|
|
1934
|
-
|
|
1931
|
+
const F = (P) => {
|
|
1932
|
+
if (C.value = !1, P) {
|
|
1933
|
+
const K = V.value.map((L) => L[y.format.value]);
|
|
1934
|
+
S(K);
|
|
1935
1935
|
} else
|
|
1936
|
-
|
|
1937
|
-
},
|
|
1938
|
-
return r({ getElCheckboxGroupRef:
|
|
1939
|
-
unref(u) && !
|
|
1936
|
+
S([]);
|
|
1937
|
+
}, k = ref(null), N = () => k.value, R = ref([]);
|
|
1938
|
+
return r({ getElCheckboxGroupRef: N, getElCheckboxRefs: () => R.value }), (P, K) => (openBlock(), createElementBlock(Fragment, null, [
|
|
1939
|
+
unref(u) && !_.value ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
1940
1940
|
key: 0,
|
|
1941
1941
|
class: "check-all",
|
|
1942
|
-
disabled:
|
|
1943
|
-
indeterminate:
|
|
1944
|
-
modelValue:
|
|
1945
|
-
"onUpdate:modelValue": K[0] || (K[0] = (L) =>
|
|
1946
|
-
onChange:
|
|
1942
|
+
disabled: _.value,
|
|
1943
|
+
indeterminate: C.value,
|
|
1944
|
+
modelValue: D.value,
|
|
1945
|
+
"onUpdate:modelValue": K[0] || (K[0] = (L) => D.value = L),
|
|
1946
|
+
onChange: F
|
|
1947
1947
|
}, {
|
|
1948
1948
|
default: withCtx(() => [
|
|
1949
1949
|
createTextVNode(toDisplayString(unref(u)), 1)
|
|
@@ -1952,20 +1952,20 @@ 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:
|
|
1956
|
-
disabled:
|
|
1955
|
+
ref: k,
|
|
1956
|
+
disabled: _.value,
|
|
1957
1957
|
modelValue: l.value,
|
|
1958
1958
|
"onUpdate:modelValue": K[1] || (K[1] = (L) => l.value = L)
|
|
1959
|
-
}, g.value, { onChange:
|
|
1959
|
+
}, g.value, { onChange: S }), createSlots({
|
|
1960
1960
|
default: withCtx(() => [
|
|
1961
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1961
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(O.list, (L, 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
1966
|
key: L[unref(y).format.value],
|
|
1967
1967
|
label: L[unref(y).format.value],
|
|
1968
|
-
disabled:
|
|
1968
|
+
disabled: _.value || L[unref(y).format.disabled]
|
|
1969
1969
|
}, T.value), {
|
|
1970
1970
|
default: withCtx(() => [
|
|
1971
1971
|
createTextVNode(toDisplayString(L[unref(y).format.label]), 1)
|
|
@@ -2706,7 +2706,7 @@ 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: v, 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"),
|
|
2709
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), 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"), C = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), D = 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), g = ref(null);
|
|
2711
2711
|
watchEffect(() => {
|
|
2712
2712
|
if (!n.value) {
|
|
@@ -2718,23 +2718,23 @@ const Mask = (e, r) => {
|
|
|
2718
2718
|
});
|
|
2719
2719
|
});
|
|
2720
2720
|
const T = ref(null);
|
|
2721
|
-
return r({ getElTagRef: () => T.value }), (y,
|
|
2721
|
+
return r({ getElTagRef: () => T.value }), (y, j) => (openBlock(), createBlock(unref(ElTag), mergeProps({
|
|
2722
2722
|
class: "el-tag-dict",
|
|
2723
2723
|
ref_key: "ElTagRef",
|
|
2724
2724
|
ref: T,
|
|
2725
2725
|
type: m.value,
|
|
2726
|
-
color:
|
|
2727
|
-
disabled:
|
|
2726
|
+
color: C.value,
|
|
2727
|
+
disabled: D.value
|
|
2728
2728
|
}, y.$attrs), createSlots({
|
|
2729
2729
|
default: withCtx(() => [
|
|
2730
2730
|
createTextVNode(toDisplayString(unref(g)), 1)
|
|
2731
2731
|
]),
|
|
2732
2732
|
_: 2
|
|
2733
2733
|
}, [
|
|
2734
|
-
renderList(y.$slots, (
|
|
2735
|
-
name:
|
|
2736
|
-
fn: withCtx((
|
|
2737
|
-
renderSlot(y.$slots,
|
|
2734
|
+
renderList(y.$slots, (V, A, S) => ({
|
|
2735
|
+
name: A,
|
|
2736
|
+
fn: withCtx((O) => [
|
|
2737
|
+
renderSlot(y.$slots, A, mergeProps({ key: S }, O))
|
|
2738
2738
|
])
|
|
2739
2739
|
}))
|
|
2740
2740
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2789,37 +2789,37 @@ const Mask = (e, r) => {
|
|
|
2789
2789
|
},
|
|
2790
2790
|
emits: ["submit", "reset", "action"],
|
|
2791
2791
|
setup(e, { expose: r, emit: d }) {
|
|
2792
|
-
const t = e, { actionType: n, modelValue: a, dictType: u, judgeTypeFun: o, type: i, judgeColorFun: s, color: c, judgeDisabledFun: v, disabled: w, defaultVal: b, emptyText: m } = toRefs(t),
|
|
2793
|
-
let
|
|
2792
|
+
const t = e, { actionType: n, modelValue: a, dictType: u, judgeTypeFun: o, type: i, judgeColorFun: s, color: c, judgeDisabledFun: v, disabled: w, defaultVal: b, emptyText: m } = toRefs(t), C = d, D = toRaw(store.state.dictConfig), l = computed(() => o.value ? o.value(a.value) : i.value ? i.value : B.value && B.value[D.format.type] ? B.value[D.format.type] : "primary"), g = computed(() => s.value ? s.value(a.value) : c.value ? c.value : B.value && B.value[D.format.color] ? B.value[D.format.color] : ""), T = computed(() => v.value ? v.value(a.value) : B.value && B.value[D.format.disabled] ? B.value[D.format.disabled] : !!w.value);
|
|
2793
|
+
let B = ref(null), y = ref(null);
|
|
2794
2794
|
watchEffect(() => {
|
|
2795
2795
|
if (!u.value) {
|
|
2796
2796
|
y.value = a.value;
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
|
-
GetItemByCode(a.value, u.value).then((
|
|
2800
|
-
|
|
2799
|
+
GetItemByCode(a.value, u.value).then((S) => {
|
|
2800
|
+
S ? (B.value = S, y.value = S[D.format.label]) : (B.value = null, y.value = String(b.value ?? (a.value === 0 ? 0 : a.value || m.value)));
|
|
2801
2801
|
});
|
|
2802
2802
|
});
|
|
2803
|
-
const
|
|
2804
|
-
T.value ||
|
|
2805
|
-
},
|
|
2806
|
-
return r({ getElLinkRef: () =>
|
|
2803
|
+
const j = () => {
|
|
2804
|
+
T.value || C(n.value, attrs);
|
|
2805
|
+
}, V = ref(null);
|
|
2806
|
+
return r({ getElLinkRef: () => V.value }), (S, O) => (openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
2807
2807
|
class: "el-link-dict",
|
|
2808
2808
|
ref_key: "ElLinkRef",
|
|
2809
|
-
ref:
|
|
2809
|
+
ref: V,
|
|
2810
2810
|
type: l.value,
|
|
2811
2811
|
color: g.value,
|
|
2812
2812
|
disabled: T.value
|
|
2813
|
-
},
|
|
2813
|
+
}, S.$attrs, { onClick: j }), createSlots({
|
|
2814
2814
|
default: withCtx(() => [
|
|
2815
2815
|
createTextVNode(toDisplayString(unref(y)), 1)
|
|
2816
2816
|
]),
|
|
2817
2817
|
_: 2
|
|
2818
2818
|
}, [
|
|
2819
|
-
renderList(
|
|
2819
|
+
renderList(S.$slots, (I, G, E) => ({
|
|
2820
2820
|
name: G,
|
|
2821
|
-
fn: withCtx((
|
|
2822
|
-
renderSlot(
|
|
2821
|
+
fn: withCtx((x) => [
|
|
2822
|
+
renderSlot(S.$slots, G, mergeProps({ key: E }, x))
|
|
2823
2823
|
])
|
|
2824
2824
|
}))
|
|
2825
2825
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2869,7 +2869,7 @@ 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: v, 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"),
|
|
2872
|
+
const d = e, { modelValue: t, dictType: n, judgeTypeFun: a, type: u, judgeColorFun: o, color: i, judgeDisabledFun: s, disabled: c, defaultVal: v, emptyText: w } = toRefs(d), 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"), C = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), D = 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), g = ref(null);
|
|
2874
2874
|
watchEffect(() => {
|
|
2875
2875
|
if (!n.value) {
|
|
@@ -2881,23 +2881,23 @@ const Mask = (e, r) => {
|
|
|
2881
2881
|
});
|
|
2882
2882
|
});
|
|
2883
2883
|
const T = ref(null);
|
|
2884
|
-
return r({ getElTextRef: () => T.value }), (y,
|
|
2884
|
+
return r({ getElTextRef: () => T.value }), (y, j) => (openBlock(), createBlock(unref(ElText), mergeProps({
|
|
2885
2885
|
class: "el-text-dict",
|
|
2886
2886
|
ref_key: "ElTextRef",
|
|
2887
2887
|
ref: T,
|
|
2888
2888
|
type: m.value,
|
|
2889
|
-
color:
|
|
2890
|
-
disabled:
|
|
2889
|
+
color: C.value,
|
|
2890
|
+
disabled: D.value
|
|
2891
2891
|
}, y.$attrs), createSlots({
|
|
2892
2892
|
default: withCtx(() => [
|
|
2893
2893
|
createTextVNode(toDisplayString(unref(g)), 1)
|
|
2894
2894
|
]),
|
|
2895
2895
|
_: 2
|
|
2896
2896
|
}, [
|
|
2897
|
-
renderList(y.$slots, (
|
|
2898
|
-
name:
|
|
2899
|
-
fn: withCtx((
|
|
2900
|
-
renderSlot(y.$slots,
|
|
2897
|
+
renderList(y.$slots, (V, A, S) => ({
|
|
2898
|
+
name: A,
|
|
2899
|
+
fn: withCtx((O) => [
|
|
2900
|
+
renderSlot(y.$slots, A, mergeProps({ key: S }, O))
|
|
2901
2901
|
])
|
|
2902
2902
|
}))
|
|
2903
2903
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2920,18 +2920,18 @@ const Mask = (e, r) => {
|
|
|
2920
2920
|
const a = computed(() => {
|
|
2921
2921
|
const l = {};
|
|
2922
2922
|
return Object.entries(n).forEach(([g, T]) => {
|
|
2923
|
-
const
|
|
2924
|
-
if (!
|
|
2925
|
-
const y = ToCamelCase(
|
|
2923
|
+
const B = ToKebabCase(g);
|
|
2924
|
+
if (!B.startsWith("descriptions-item-") && !B.startsWith("on-descriptions-item-")) {
|
|
2925
|
+
const y = ToCamelCase(B);
|
|
2926
2926
|
l[y] = T;
|
|
2927
2927
|
}
|
|
2928
2928
|
}), l;
|
|
2929
2929
|
}), u = computed(() => {
|
|
2930
2930
|
const l = {};
|
|
2931
2931
|
return Object.entries(n).forEach(([g, T]) => {
|
|
2932
|
-
const
|
|
2933
|
-
if (
|
|
2934
|
-
const y = ToCamelCase(
|
|
2932
|
+
const B = ToKebabCase(g);
|
|
2933
|
+
if (B.startsWith("descriptions-item-") || B.startsWith("on-descriptions-item")) {
|
|
2934
|
+
const y = ToCamelCase(B.replace("descriptions-item-", ""));
|
|
2935
2935
|
l[y] = T;
|
|
2936
2936
|
}
|
|
2937
2937
|
}), l;
|
|
@@ -2983,29 +2983,29 @@ const Mask = (e, r) => {
|
|
|
2983
2983
|
ref: b
|
|
2984
2984
|
}, a.value), createSlots({
|
|
2985
2985
|
default: withCtx(() => [
|
|
2986
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (T,
|
|
2986
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (T, B) => (openBlock(), createBlock(unref(ElDescriptionsItem), mergeProps({
|
|
2987
2987
|
ref_for: !0,
|
|
2988
2988
|
ref: (y) => {
|
|
2989
|
-
y && (m.value[
|
|
2989
|
+
y && (m.value[B] = y);
|
|
2990
2990
|
},
|
|
2991
|
-
key:
|
|
2991
|
+
key: B
|
|
2992
2992
|
}, o(T)), createSlots({
|
|
2993
2993
|
default: withCtx(() => [
|
|
2994
2994
|
T.dictType ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2995
|
-
T.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(w(T.modelValue, i(T)), (y,
|
|
2996
|
-
key:
|
|
2995
|
+
T.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(w(T.modelValue, i(T)), (y, j) => (openBlock(), createBlock(_sfc_main$n, {
|
|
2996
|
+
key: j,
|
|
2997
2997
|
modelValue: y || "",
|
|
2998
2998
|
dictType: T.dictType
|
|
2999
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(w(T.modelValue, i(T)), (y,
|
|
3000
|
-
key:
|
|
2999
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(w(T.modelValue, i(T)), (y, j) => (openBlock(), createBlock(_sfc_main$e, {
|
|
3000
|
+
key: j,
|
|
3001
3001
|
modelValue: y || "",
|
|
3002
3002
|
dictType: T.dictType
|
|
3003
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(w(T.modelValue, i(T)), (y,
|
|
3004
|
-
key:
|
|
3003
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(w(T.modelValue, i(T)), (y, j) => (openBlock(), createBlock(_sfc_main$f, {
|
|
3004
|
+
key: j,
|
|
3005
3005
|
modelValue: y || "",
|
|
3006
3006
|
dictType: T.dictType
|
|
3007
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(w(T.modelValue, i(T)), (y,
|
|
3008
|
-
key:
|
|
3007
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : T.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(w(T.modelValue, i(T)), (y, j) => (openBlock(), createBlock(_sfc_main$d, {
|
|
3008
|
+
key: j,
|
|
3009
3009
|
modelValue: y || "",
|
|
3010
3010
|
dictType: T.dictType
|
|
3011
3011
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
@@ -3023,13 +3023,13 @@ const Mask = (e, r) => {
|
|
|
3023
3023
|
]),
|
|
3024
3024
|
_: 2
|
|
3025
3025
|
}, [
|
|
3026
|
-
renderList(T.slotList, (y,
|
|
3026
|
+
renderList(T.slotList, (y, j) => ({
|
|
3027
3027
|
name: y.slotName,
|
|
3028
|
-
fn: withCtx((
|
|
3028
|
+
fn: withCtx((V) => [
|
|
3029
3029
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3030
|
-
key:
|
|
3030
|
+
key: j,
|
|
3031
3031
|
render: y.render,
|
|
3032
|
-
scope:
|
|
3032
|
+
scope: V
|
|
3033
3033
|
}, null, 8, ["render", "scope"]))
|
|
3034
3034
|
])
|
|
3035
3035
|
}))
|
|
@@ -3037,10 +3037,10 @@ const Mask = (e, r) => {
|
|
|
3037
3037
|
]),
|
|
3038
3038
|
_: 2
|
|
3039
3039
|
}, [
|
|
3040
|
-
renderList(l.$slots, (T,
|
|
3041
|
-
name:
|
|
3042
|
-
fn: withCtx((
|
|
3043
|
-
renderSlot(l.$slots,
|
|
3040
|
+
renderList(l.$slots, (T, B, y) => ({
|
|
3041
|
+
name: B,
|
|
3042
|
+
fn: withCtx((j) => [
|
|
3043
|
+
renderSlot(l.$slots, B, mergeProps({ key: y }, j), void 0, !0)
|
|
3044
3044
|
])
|
|
3045
3045
|
}))
|
|
3046
3046
|
]), 1040));
|
|
@@ -3089,15 +3089,15 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3089
3089
|
const f = (p = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : p.isShowLabelColon;
|
|
3090
3090
|
return typeof f == "boolean" ? f : !1;
|
|
3091
3091
|
}), b = ref([]), m = ref({});
|
|
3092
|
-
let
|
|
3093
|
-
const
|
|
3094
|
-
var
|
|
3095
|
-
if ((
|
|
3092
|
+
let C = JSON.parse(JSON.stringify(m));
|
|
3093
|
+
const D = (f) => {
|
|
3094
|
+
var _, F, k, N, R;
|
|
3095
|
+
if ((_ = n.dynamicComponentsConfig) != null && _.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (F = n.dynamicComponentsConfig) != null && F.readonlyNoPlaceholder && (f != null && f.readonly || (typeof t.readonly == "string" && t.readonly === "" || t.readonly) && (f == null ? void 0 : f.readonly) !== !1))
|
|
3096
3096
|
return "";
|
|
3097
3097
|
let p = "请选择";
|
|
3098
|
-
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (p = "请输入"), (
|
|
3098
|
+
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (p = "请输入"), (k = n.dynamicComponentsConfig) != null && k.isShowLabelPlaceholder && (p = p + ((N = f.formItemProps) == null ? void 0 : N.label)), ((R = f.props) == null ? void 0 : R.placeholder) || p || "";
|
|
3099
3099
|
}, l = ref(!1), g = ref(""), T = () => {
|
|
3100
|
-
var
|
|
3100
|
+
var _, F, k, N, R, J, P, K, L, M, W;
|
|
3101
3101
|
g.value = "id" + GenerateUUID();
|
|
3102
3102
|
let f = [];
|
|
3103
3103
|
for (let z = 0; z < c.value.length; z++) {
|
|
@@ -3106,19 +3106,19 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3106
3106
|
if ($ != null && $.isFormData && ($ != null && $.fieldName) ? q = {
|
|
3107
3107
|
...$,
|
|
3108
3108
|
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3109
|
-
showRuleType: ($ == null ? void 0 : $.showRuleType) || ((
|
|
3110
|
-
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((
|
|
3109
|
+
showRuleType: ($ == null ? void 0 : $.showRuleType) || ((_ = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : _.showRuleType) || "compare",
|
|
3110
|
+
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((F = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : F.validatorRuleType) || "compare",
|
|
3111
3111
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3112
3112
|
visible: $.showRules && $.showRules.length > 0 || $.hidden ? !1 : ($ == null ? void 0 : $.visible) ?? !0,
|
|
3113
3113
|
//
|
|
3114
3114
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
3115
3115
|
props: $.props ? {
|
|
3116
|
-
...(
|
|
3116
|
+
...(k = n.dynamicComponentsConfig) == null ? void 0 : k.props,
|
|
3117
3117
|
...$.props,
|
|
3118
|
-
placeholder:
|
|
3118
|
+
placeholder: D($)
|
|
3119
3119
|
} : {
|
|
3120
|
-
...(
|
|
3121
|
-
placeholder:
|
|
3120
|
+
...(N = n.dynamicComponentsConfig) == null ? void 0 : N.props,
|
|
3121
|
+
placeholder: D($)
|
|
3122
3122
|
},
|
|
3123
3123
|
formItemProps: $.formItemProps ? {
|
|
3124
3124
|
...$.formItemProps,
|
|
@@ -3183,8 +3183,8 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3183
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
3185
|
}), m.value = JSON.parse(JSON.stringify(p));
|
|
3186
|
-
},
|
|
3187
|
-
const p = JSON.parse(JSON.stringify(m.value)),
|
|
3186
|
+
}, B = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError), y = async (f) => {
|
|
3187
|
+
const p = JSON.parse(JSON.stringify(m.value)), _ = sortComponentsByIdDependencies(b.value), F = [], k = (L) => typeof L == "string" ? L.split(",").filter(Boolean) : Array.isArray(L) ? L : [], N = async () => {
|
|
3188
3188
|
if (a.value)
|
|
3189
3189
|
return;
|
|
3190
3190
|
const L = 1e3, M = 50;
|
|
@@ -3196,7 +3196,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3196
3196
|
$();
|
|
3197
3197
|
});
|
|
3198
3198
|
}, R = async (L) => {
|
|
3199
|
-
if (await
|
|
3199
|
+
if (await N(), !a.value)
|
|
3200
3200
|
return !1;
|
|
3201
3201
|
try {
|
|
3202
3202
|
return await (a == null ? void 0 : a.value.validateField(L));
|
|
@@ -3205,7 +3205,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3205
3205
|
}
|
|
3206
3206
|
}, J = async (L) => {
|
|
3207
3207
|
var M;
|
|
3208
|
-
await
|
|
3208
|
+
await N();
|
|
3209
3209
|
for (let W = 0; W < L.length; W++) {
|
|
3210
3210
|
const z = L[W], $ = b.value.find((q) => {
|
|
3211
3211
|
var Y;
|
|
@@ -3220,7 +3220,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3220
3220
|
compare: (L) => L.showRules.some((M) => CheckConditions(M, p)),
|
|
3221
3221
|
// 处理"validate"类型
|
|
3222
3222
|
validate: async (L) => {
|
|
3223
|
-
const M =
|
|
3223
|
+
const M = k(L.showRules);
|
|
3224
3224
|
if (await R(M))
|
|
3225
3225
|
return !0;
|
|
3226
3226
|
{
|
|
@@ -3240,7 +3240,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3240
3240
|
M.push(W.rules.some((z) => CheckConditions(z, p)));
|
|
3241
3241
|
break;
|
|
3242
3242
|
case "validate": {
|
|
3243
|
-
const z =
|
|
3243
|
+
const z = k(W.rules), $ = await R(z);
|
|
3244
3244
|
if (!$) {
|
|
3245
3245
|
const q = z.filter((Y) => Y !== f);
|
|
3246
3246
|
await J(q);
|
|
@@ -3254,54 +3254,54 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3254
3254
|
return CalculateLogicalResult(M, L.showRuleType);
|
|
3255
3255
|
}
|
|
3256
3256
|
};
|
|
3257
|
-
for (const L of
|
|
3257
|
+
for (const L of _) {
|
|
3258
3258
|
if (L.hidden)
|
|
3259
3259
|
continue;
|
|
3260
3260
|
const M = L.visible;
|
|
3261
3261
|
let W = M;
|
|
3262
|
-
L.showRules && L.showRules.length > 0 && (W = await (P[L.showRuleType] || P.default)(L)), L.visible = W, L.fieldName && !M && W &&
|
|
3262
|
+
L.showRules && L.showRules.length > 0 && (W = await (P[L.showRuleType] || P.default)(L)), L.visible = W, L.fieldName && !M && W && F.push(L.fieldName), !W && L.fieldName && (p[L.fieldName] = Array.isArray(p[L.fieldName]) ? [] : "");
|
|
3263
3263
|
}
|
|
3264
|
-
const K =
|
|
3264
|
+
const K = F.filter((L) => {
|
|
3265
3265
|
var q, Y;
|
|
3266
|
-
const M =
|
|
3266
|
+
const M = _.find((re) => re.fieldName === L);
|
|
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
3269
|
const z = m.value[L];
|
|
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
|
|
3274
|
-
const L =
|
|
3273
|
+
await N();
|
|
3274
|
+
const L = j();
|
|
3275
3275
|
l.value = !0, v("update:modelValue", L), setTimeout(() => {
|
|
3276
3276
|
var M;
|
|
3277
3277
|
(M = a.value) == null || M.validateField(K);
|
|
3278
3278
|
}, 0);
|
|
3279
3279
|
}
|
|
3280
|
-
},
|
|
3280
|
+
}, j = () => {
|
|
3281
3281
|
const f = JSON.parse(JSON.stringify(m.value));
|
|
3282
3282
|
for (let p = 0; p < b.value.length; p++) {
|
|
3283
|
-
const
|
|
3284
|
-
!
|
|
3283
|
+
const _ = b.value[p];
|
|
3284
|
+
!_.visible && !_.hidden && delete f[_.fieldName];
|
|
3285
3285
|
}
|
|
3286
3286
|
return f;
|
|
3287
|
-
},
|
|
3288
|
-
const
|
|
3287
|
+
}, V = (f, p, _ = "") => {
|
|
3288
|
+
const F = [];
|
|
3289
3289
|
if (typeof f != "object" || f === null || p === null)
|
|
3290
|
-
return f !== p &&
|
|
3291
|
-
key:
|
|
3290
|
+
return f !== p && F.push({
|
|
3291
|
+
key: _,
|
|
3292
3292
|
oldVal: p,
|
|
3293
3293
|
newVal: f
|
|
3294
|
-
}),
|
|
3295
|
-
const
|
|
3296
|
-
for (const
|
|
3297
|
-
const R =
|
|
3298
|
-
typeof J == "object" && J !== null && !Array.isArray(J) ?
|
|
3294
|
+
}), F;
|
|
3295
|
+
const k = /* @__PURE__ */ new Set([...Object.keys(f), ...Object.keys(p)]);
|
|
3296
|
+
for (const N of k) {
|
|
3297
|
+
const R = _ ? `${_}.${N}` : N, J = f[N], P = p[N];
|
|
3298
|
+
typeof J == "object" && J !== null && !Array.isArray(J) ? F.push(...V(J, P, R)) : J !== P && F.push({
|
|
3299
3299
|
key: R,
|
|
3300
3300
|
oldVal: P,
|
|
3301
3301
|
newVal: J
|
|
3302
3302
|
});
|
|
3303
3303
|
}
|
|
3304
|
-
return
|
|
3304
|
+
return F;
|
|
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 A = !0;
|
|
3318
3318
|
watch(
|
|
3319
3319
|
m,
|
|
3320
3320
|
(f) => {
|
|
3321
|
-
var
|
|
3321
|
+
var F;
|
|
3322
3322
|
const p = JSON.parse(JSON.stringify(f));
|
|
3323
|
-
if (
|
|
3323
|
+
if (A)
|
|
3324
3324
|
y();
|
|
3325
3325
|
else {
|
|
3326
|
-
const
|
|
3326
|
+
const N = (F = V(p, C).find((R) => {
|
|
3327
3327
|
if (JSON.stringify(R.newVal) !== JSON.stringify(R.oldVal))
|
|
3328
3328
|
return !0;
|
|
3329
|
-
})) == null ? void 0 :
|
|
3330
|
-
y(
|
|
3329
|
+
})) == null ? void 0 : F.key;
|
|
3330
|
+
y(N);
|
|
3331
3331
|
}
|
|
3332
|
-
|
|
3333
|
-
const
|
|
3334
|
-
l.value = !0, v("update:modelValue",
|
|
3332
|
+
C = p;
|
|
3333
|
+
const _ = j();
|
|
3334
|
+
l.value = !0, v("update:modelValue", _), A = !1;
|
|
3335
3335
|
},
|
|
3336
3336
|
{
|
|
3337
3337
|
deep: !0,
|
|
@@ -3348,54 +3348,54 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3348
3348
|
},
|
|
3349
3349
|
{ deep: !0 }
|
|
3350
3350
|
);
|
|
3351
|
-
const
|
|
3352
|
-
const
|
|
3353
|
-
f && f.validate((
|
|
3354
|
-
if (
|
|
3355
|
-
v("pass",
|
|
3356
|
-
else if (v("fail",
|
|
3357
|
-
const
|
|
3358
|
-
f.scrollToField(
|
|
3351
|
+
const S = async (f, p) => {
|
|
3352
|
+
const _ = j();
|
|
3353
|
+
f && f.validate((F, k) => {
|
|
3354
|
+
if (F)
|
|
3355
|
+
v("pass", _, p);
|
|
3356
|
+
else if (v("fail", k, _, p), B.value) {
|
|
3357
|
+
const N = Object.keys(k)[0];
|
|
3358
|
+
f.scrollToField(N);
|
|
3359
3359
|
}
|
|
3360
3360
|
});
|
|
3361
|
-
},
|
|
3361
|
+
}, O = async () => {
|
|
3362
3362
|
T(), await nextTick(), a.value && setTimeout(() => {
|
|
3363
3363
|
a.value.resetFields();
|
|
3364
3364
|
}, 30);
|
|
3365
3365
|
}, I = (f) => {
|
|
3366
|
-
const p =
|
|
3366
|
+
const p = j();
|
|
3367
3367
|
v("action", f, p);
|
|
3368
3368
|
}, G = ref({});
|
|
3369
|
-
return r({ getFormData:
|
|
3370
|
-
const
|
|
3371
|
-
return openBlock(), createBlock(
|
|
3369
|
+
return r({ getFormData: j, resetFormData: T, getComponentRef: (f) => f ? G.value[f] : G.value, getDynamicComponentsRef: () => a.value }), (f, p) => {
|
|
3370
|
+
const _ = resolveComponent("el-form-item"), F = resolveComponent("el-form");
|
|
3371
|
+
return openBlock(), createBlock(F, mergeProps({
|
|
3372
3372
|
model: m.value,
|
|
3373
3373
|
class: ["dict-dynamic-components container-class", g.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, (k, N) => {
|
|
3379
3379
|
var R;
|
|
3380
3380
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3381
|
-
|
|
3382
|
-
|
|
3381
|
+
k.visible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3382
|
+
k.isFormData ? (openBlock(), createBlock(_, mergeProps({ key: 0 }, k.formItemProps, { class: "comp-item form" }), {
|
|
3383
3383
|
default: withCtx(() => {
|
|
3384
3384
|
var J;
|
|
3385
3385
|
return [
|
|
3386
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3386
|
+
(openBlock(), createBlock(resolveDynamicComponent(k.compName), mergeProps({
|
|
3387
3387
|
ref_for: !0,
|
|
3388
3388
|
ref: (P) => {
|
|
3389
|
-
P &&
|
|
3389
|
+
P && k.fieldName && (G.value[k.fieldName] = P);
|
|
3390
3390
|
},
|
|
3391
|
-
key:
|
|
3392
|
-
},
|
|
3393
|
-
modelValue: m.value[
|
|
3391
|
+
key: N
|
|
3392
|
+
}, k.props, {
|
|
3393
|
+
modelValue: m.value[k.fieldName],
|
|
3394
3394
|
"onUpdate:modelValue": (P) => {
|
|
3395
|
-
m.value[
|
|
3395
|
+
m.value[k.fieldName] = P;
|
|
3396
3396
|
}
|
|
3397
3397
|
}), createSlots({ _: 2 }, [
|
|
3398
|
-
renderList((J =
|
|
3398
|
+
renderList((J = k == null ? void 0 : k.props) == null ? void 0 : J.slotList, (P, K) => ({
|
|
3399
3399
|
name: P.slotName,
|
|
3400
3400
|
fn: withCtx((L) => [
|
|
3401
3401
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
@@ -3410,15 +3410,15 @@ 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(k.compName), mergeProps({
|
|
3414
3414
|
class: "comp-item",
|
|
3415
|
-
key:
|
|
3416
|
-
},
|
|
3417
|
-
onSubmit: (J) =>
|
|
3418
|
-
onReset:
|
|
3419
|
-
onAction: (J) => I(
|
|
3415
|
+
key: N
|
|
3416
|
+
}, k.props, {
|
|
3417
|
+
onSubmit: (J) => S(a.value, k),
|
|
3418
|
+
onReset: O,
|
|
3419
|
+
onAction: (J) => I(k)
|
|
3420
3420
|
}), createSlots({ _: 2 }, [
|
|
3421
|
-
renderList((R =
|
|
3421
|
+
renderList((R = k == null ? void 0 : k.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, {
|
|
@@ -3481,7 +3481,7 @@ 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 v, w, b, m,
|
|
3484
|
+
var v, w, b, m, C, D;
|
|
3485
3485
|
return [
|
|
3486
3486
|
(v = unref(n).findNodeByProp(e.column.prop)) != null && v.slotList ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(unref(n).findNodeByProp(e.column.prop).slotList, (l) => (openBlock(), createElementBlock("div", {
|
|
3487
3487
|
key: l.slotName
|
|
@@ -3516,7 +3516,7 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3516
3516
|
createTextVNode(toDisplayString(unref(n).GetTreeLabelByCodesFilter(c.row[e.column.prop], unref(n).findNodeByProp(e.column.prop).dictTreeType, unref(n).dictTreeOptions(unref(n).findNodeByProp(e.column.prop)))), 1)
|
|
3517
3517
|
], 64)) : (m = unref(n).findNodeByProp(e.column.prop)) != null && m.dateFormat ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
3518
3518
|
createTextVNode(toDisplayString(unref(n).FormatDate(c.row[e.column.prop], unref(n).findNodeByProp(e.column.prop).dateFormat, unref(n).findNodeByProp(e.column.prop).defaultVal)), 1)
|
|
3519
|
-
], 64)) : (
|
|
3519
|
+
], 64)) : (C = unref(n).findNodeByProp(e.column.prop)) != null && C.maskType || (D = unref(n).findNodeByProp(e.column.prop)) != null && D.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)
|
|
@@ -3666,44 +3666,46 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3666
3666
|
},
|
|
3667
3667
|
emits: ["fail", "pass", "reset", "update:modelValue"],
|
|
3668
3668
|
setup(e, { emit: r }) {
|
|
3669
|
-
const d = e, { modelValue: t, rows: n, isAutoSetPlaceholder: a, isShowLabelPlaceholder: u, list: o, largeWidth: i, mediumWidth: s, smallWidth: c, foldStatus: v, showFold: w, showReset: b, showSearch: m } = toRefs(d),
|
|
3670
|
-
let
|
|
3671
|
-
return g.value === 4 ?
|
|
3672
|
-
},
|
|
3673
|
-
let y = null;
|
|
3674
|
-
const
|
|
3675
|
-
|
|
3669
|
+
const d = e, { modelValue: t, rows: n, isAutoSetPlaceholder: a, isShowLabelPlaceholder: u, list: o, largeWidth: i, mediumWidth: s, smallWidth: c, foldStatus: v, showFold: w, showReset: b, showSearch: m } = toRefs(d), C = r, D = ref(v.value), l = ref(window.innerWidth), g = computed(() => l.value > i.value ? 4 : l.value > s.value ? 3 : l.value > c.value ? 2 : 1), T = (x) => {
|
|
3670
|
+
let f = "";
|
|
3671
|
+
return g.value === 4 ? f += "quarter" : g.value === 3 ? f += "triple" : g.value === 2 ? f += "half" : f += "full", g.value === 1 ? w.value && D.value && x + 1 > n.value && (f += " hide") : w.value && D.value && x + 1 > n.value * g.value - 1 && (f += " hide"), f;
|
|
3672
|
+
}, B = ref(null);
|
|
3673
|
+
let y = null, j = null;
|
|
3674
|
+
const V = (x) => {
|
|
3675
|
+
j && clearTimeout(j), j = setTimeout(() => {
|
|
3676
|
+
x && x.length > 0 && (l.value = x[0].contentRect.width);
|
|
3677
|
+
}, 300);
|
|
3676
3678
|
};
|
|
3677
3679
|
onMounted(() => {
|
|
3678
|
-
var
|
|
3679
|
-
const
|
|
3680
|
-
|
|
3680
|
+
var f;
|
|
3681
|
+
const x = (f = B.value) == null ? void 0 : f.$el;
|
|
3682
|
+
x && (l.value = x.offsetWidth, y = new ResizeObserver(V), y.observe(x));
|
|
3681
3683
|
}), onUnmounted(() => {
|
|
3682
3684
|
y && (y.disconnect(), y = null);
|
|
3683
3685
|
});
|
|
3684
|
-
const
|
|
3685
|
-
var
|
|
3686
|
-
const
|
|
3687
|
-
let
|
|
3688
|
-
for (let
|
|
3689
|
-
const
|
|
3690
|
-
if (
|
|
3691
|
-
|
|
3692
|
-
const
|
|
3693
|
-
|
|
3686
|
+
const A = reactive({}), S = (x) => {
|
|
3687
|
+
var _;
|
|
3688
|
+
const f = {};
|
|
3689
|
+
let p = [];
|
|
3690
|
+
for (let F = 0; F < x.length; F++) {
|
|
3691
|
+
const k = x[F];
|
|
3692
|
+
if (k.fieldName && !p.includes(k.fieldName)) {
|
|
3693
|
+
p.push(k.fieldName);
|
|
3694
|
+
const N = (_ = t.value) == null ? void 0 : _[k.fieldName];
|
|
3695
|
+
f[k.fieldName] = (k == null ? void 0 : k.modelValue) !== void 0 ? k.modelValue : N !== void 0 ? N : null;
|
|
3694
3696
|
} else
|
|
3695
|
-
console.warn("字段名称重复:",
|
|
3697
|
+
console.warn("字段名称重复:", k.fieldName);
|
|
3696
3698
|
}
|
|
3697
|
-
Object.assign(
|
|
3699
|
+
Object.assign(A, f);
|
|
3698
3700
|
};
|
|
3699
3701
|
watch(
|
|
3700
|
-
() => ({ ...
|
|
3702
|
+
() => ({ ...A }),
|
|
3701
3703
|
() => {
|
|
3702
|
-
const
|
|
3704
|
+
const x = {
|
|
3703
3705
|
...JSON.parse(JSON.stringify(t.value || {})),
|
|
3704
|
-
...
|
|
3706
|
+
...A
|
|
3705
3707
|
};
|
|
3706
|
-
|
|
3708
|
+
C("update:modelValue", x);
|
|
3707
3709
|
},
|
|
3708
3710
|
{
|
|
3709
3711
|
deep: !0,
|
|
@@ -3711,66 +3713,66 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3711
3713
|
}
|
|
3712
3714
|
), watch(
|
|
3713
3715
|
() => d.list,
|
|
3714
|
-
(
|
|
3715
|
-
|
|
3716
|
+
(x) => {
|
|
3717
|
+
S(x);
|
|
3716
3718
|
},
|
|
3717
3719
|
{
|
|
3718
3720
|
immediate: !0
|
|
3719
3721
|
}
|
|
3720
3722
|
);
|
|
3721
|
-
const
|
|
3722
|
-
var
|
|
3723
|
-
if ((
|
|
3724
|
-
return (
|
|
3723
|
+
const O = computed(() => g.value === 1 ? o.value.length > n.value : o.value.length > n.value * g.value - 1), I = (x) => {
|
|
3724
|
+
var f, p;
|
|
3725
|
+
if ((f = x == null ? void 0 : x.props) != null && f.placeholder)
|
|
3726
|
+
return (p = x == null ? void 0 : x.props) == null ? void 0 : p.placeholder;
|
|
3725
3727
|
if (a.value)
|
|
3726
|
-
return
|
|
3727
|
-
}, I = async () => {
|
|
3728
|
-
await nextTick(), E.value.resetFields(), setTimeout(() => {
|
|
3729
|
-
_("reset");
|
|
3730
|
-
}, 50);
|
|
3728
|
+
return x.compName.toLocaleLowerCase().includes("input") ? u.value ? "请输入" + x.label : "请输入" : u.value ? "请选择" + x.label : "请选择";
|
|
3731
3729
|
}, G = async () => {
|
|
3732
|
-
await nextTick(),
|
|
3733
|
-
|
|
3730
|
+
await nextTick(), B.value.resetFields(), setTimeout(() => {
|
|
3731
|
+
C("reset");
|
|
3732
|
+
}, 100);
|
|
3733
|
+
}, E = async () => {
|
|
3734
|
+
await nextTick(), B.value.validate((x, f) => {
|
|
3735
|
+
x ? C("pass", A) : C("fail", f, A);
|
|
3734
3736
|
});
|
|
3735
3737
|
};
|
|
3736
|
-
return (
|
|
3738
|
+
return (x, f) => (openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
3737
3739
|
ref_key: "searchFormRef",
|
|
3738
|
-
ref:
|
|
3740
|
+
ref: B,
|
|
3739
3741
|
style: { minWidth: e.minWidth + "px" },
|
|
3740
|
-
model:
|
|
3742
|
+
model: A,
|
|
3741
3743
|
class: "dict-search-box dict-clearfix"
|
|
3742
|
-
},
|
|
3744
|
+
}, x.$attrs), {
|
|
3743
3745
|
default: withCtx(() => [
|
|
3744
|
-
renderSlot(
|
|
3745
|
-
searchForm:
|
|
3746
|
-
fold:
|
|
3746
|
+
renderSlot(x.$slots, "prepend", {
|
|
3747
|
+
searchForm: A,
|
|
3748
|
+
fold: D.value,
|
|
3747
3749
|
itemsPerRow: g.value
|
|
3748
3750
|
}, void 0, !0),
|
|
3749
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (
|
|
3750
|
-
key:
|
|
3751
|
-
class: T(
|
|
3752
|
-
label:
|
|
3753
|
-
prop:
|
|
3754
|
-
},
|
|
3751
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (p, _) => (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
3752
|
+
key: _,
|
|
3753
|
+
class: T(_),
|
|
3754
|
+
label: p.label,
|
|
3755
|
+
prop: p.fieldName
|
|
3756
|
+
}, p.formItemProps), {
|
|
3755
3757
|
default: withCtx(() => {
|
|
3756
|
-
var
|
|
3758
|
+
var F, k;
|
|
3757
3759
|
return [
|
|
3758
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3759
|
-
modelValue:
|
|
3760
|
-
"onUpdate:modelValue": (
|
|
3761
|
-
|
|
3760
|
+
(openBlock(), createBlock(resolveDynamicComponent(p.compName), mergeProps({
|
|
3761
|
+
modelValue: A[p.fieldName],
|
|
3762
|
+
"onUpdate:modelValue": (N) => {
|
|
3763
|
+
A[p.fieldName] = N;
|
|
3762
3764
|
},
|
|
3763
|
-
clearable: ((
|
|
3764
|
-
placeholder:
|
|
3765
|
-
},
|
|
3766
|
-
renderList((
|
|
3767
|
-
name:
|
|
3768
|
-
fn: withCtx((
|
|
3765
|
+
clearable: ((F = p == null ? void 0 : p.props) == null ? void 0 : F.clearable) || !0,
|
|
3766
|
+
placeholder: I(p)
|
|
3767
|
+
}, p.props), createSlots({ _: 2 }, [
|
|
3768
|
+
renderList((k = p == null ? void 0 : p.props) == null ? void 0 : k.slotList, (N, R) => ({
|
|
3769
|
+
name: N.slotName,
|
|
3770
|
+
fn: withCtx((J) => [
|
|
3769
3771
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3770
|
-
key:
|
|
3771
|
-
render:
|
|
3772
|
-
scope:
|
|
3773
|
-
formData:
|
|
3772
|
+
key: R,
|
|
3773
|
+
render: N.render,
|
|
3774
|
+
scope: J,
|
|
3775
|
+
formData: A
|
|
3774
3776
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3775
3777
|
])
|
|
3776
3778
|
}))
|
|
@@ -3783,14 +3785,14 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3783
3785
|
class: normalizeClass(T(0) + " fr")
|
|
3784
3786
|
}, {
|
|
3785
3787
|
default: withCtx(() => [
|
|
3786
|
-
renderSlot(
|
|
3787
|
-
searchForm:
|
|
3788
|
-
fold:
|
|
3788
|
+
renderSlot(x.$slots, "button-prefix", {
|
|
3789
|
+
searchForm: A,
|
|
3790
|
+
fold: D.value,
|
|
3789
3791
|
itemsPerRow: g.value
|
|
3790
3792
|
}, void 0, !0),
|
|
3791
3793
|
withDirectives(createVNode(unref(ElButton), {
|
|
3792
3794
|
plain: "",
|
|
3793
|
-
onClick:
|
|
3795
|
+
onClick: G
|
|
3794
3796
|
}, {
|
|
3795
3797
|
default: withCtx(() => [
|
|
3796
3798
|
createTextVNode("重 置")
|
|
@@ -3801,7 +3803,7 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3801
3803
|
]),
|
|
3802
3804
|
withDirectives(createVNode(unref(ElButton), {
|
|
3803
3805
|
type: "primary",
|
|
3804
|
-
onClick:
|
|
3806
|
+
onClick: E
|
|
3805
3807
|
}, {
|
|
3806
3808
|
default: withCtx(() => [
|
|
3807
3809
|
createTextVNode("查 询")
|
|
@@ -3810,22 +3812,22 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3810
3812
|
}, 512), [
|
|
3811
3813
|
[vShow, unref(m)]
|
|
3812
3814
|
]),
|
|
3813
|
-
renderSlot(
|
|
3814
|
-
searchForm:
|
|
3815
|
-
fold:
|
|
3815
|
+
renderSlot(x.$slots, "button-suffix", {
|
|
3816
|
+
searchForm: A,
|
|
3817
|
+
fold: D.value,
|
|
3816
3818
|
itemsPerRow: g.value
|
|
3817
3819
|
}, void 0, !0),
|
|
3818
|
-
unref(w) &&
|
|
3820
|
+
unref(w) && O.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3819
3821
|
key: 0,
|
|
3820
3822
|
class: "no-underline",
|
|
3821
3823
|
underline: "never",
|
|
3822
3824
|
type: "primary",
|
|
3823
|
-
onClick:
|
|
3825
|
+
onClick: f[0] || (f[0] = (p) => D.value = !D.value)
|
|
3824
3826
|
}, {
|
|
3825
3827
|
default: withCtx(() => [
|
|
3826
|
-
createTextVNode(toDisplayString(
|
|
3828
|
+
createTextVNode(toDisplayString(D.value ? "展开" : "收起"), 1),
|
|
3827
3829
|
createVNode(unref(ElIcon), {
|
|
3828
|
-
class: normalizeClass(
|
|
3830
|
+
class: normalizeClass(D.value ? "" : "rotate")
|
|
3829
3831
|
}, {
|
|
3830
3832
|
default: withCtx(() => [
|
|
3831
3833
|
createVNode(unref(ArrowDown))
|
|
@@ -3838,16 +3840,16 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3838
3840
|
]),
|
|
3839
3841
|
_: 3
|
|
3840
3842
|
}, 8, ["class"]),
|
|
3841
|
-
renderSlot(
|
|
3842
|
-
searchForm:
|
|
3843
|
-
fold:
|
|
3843
|
+
renderSlot(x.$slots, "append", {
|
|
3844
|
+
searchForm: A,
|
|
3845
|
+
fold: D.value,
|
|
3844
3846
|
itemsPerRow: g.value
|
|
3845
3847
|
}, void 0, !0)
|
|
3846
3848
|
]),
|
|
3847
3849
|
_: 3
|
|
3848
3850
|
}, 16, ["style", "model"]));
|
|
3849
3851
|
}
|
|
3850
|
-
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3852
|
+
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-cba5a702"]]);
|
|
3851
3853
|
dictComponent$1.install = function(e) {
|
|
3852
3854
|
e.component(dictComponent$1.name, dictComponent$1);
|
|
3853
3855
|
};
|
|
@@ -3907,10 +3909,10 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3907
3909
|
} : typeof n.value == "object" && n.value !== null ? { ...g, ...n.value } : g;
|
|
3908
3910
|
}), m = (g = t.value) => {
|
|
3909
3911
|
v.value ? c.value = g : w.value ? c.value = Desensitization(g, b.value) : c.value = g;
|
|
3910
|
-
},
|
|
3912
|
+
}, C = inject("elFormItem", null), D = (g) => {
|
|
3911
3913
|
v.value = !0, m(), s("focus", g);
|
|
3912
3914
|
}, l = (g) => {
|
|
3913
|
-
v.value = !1, s("update:modelValue", c.value), m(), s("blur", g),
|
|
3915
|
+
v.value = !1, s("update:modelValue", c.value), m(), s("blur", g), C && C.validate("blur");
|
|
3914
3916
|
};
|
|
3915
3917
|
return watch(
|
|
3916
3918
|
c,
|
|
@@ -3928,16 +3930,16 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3928
3930
|
v.value = !1;
|
|
3929
3931
|
}), (g, T) => (openBlock(), createBlock(unref(ElInput), mergeProps({
|
|
3930
3932
|
modelValue: c.value,
|
|
3931
|
-
"onUpdate:modelValue": T[0] || (T[0] = (
|
|
3933
|
+
"onUpdate:modelValue": T[0] || (T[0] = (B) => c.value = B)
|
|
3932
3934
|
}, g.$attrs, {
|
|
3933
|
-
onFocus:
|
|
3935
|
+
onFocus: D,
|
|
3934
3936
|
onBlur: l,
|
|
3935
3937
|
autocomplete: "off"
|
|
3936
3938
|
}), createSlots({ _: 2 }, [
|
|
3937
|
-
renderList(g.$slots, (
|
|
3939
|
+
renderList(g.$slots, (B, y, j) => ({
|
|
3938
3940
|
name: y,
|
|
3939
|
-
fn: withCtx((
|
|
3940
|
-
renderSlot(g.$slots, y, normalizeProps(guardReactiveProps(
|
|
3941
|
+
fn: withCtx((V) => [
|
|
3942
|
+
renderSlot(g.$slots, y, normalizeProps(guardReactiveProps(V)))
|
|
3941
3943
|
])
|
|
3942
3944
|
}))
|
|
3943
3945
|
]), 1040, ["modelValue"]));
|
|
@@ -4008,78 +4010,78 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4008
4010
|
setup(e, { expose: r, emit: d }) {
|
|
4009
4011
|
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: v, disabledDataFun: w } = toRefs(t), b = useAttrs(), m = computed(() => {
|
|
4010
4012
|
const p = {};
|
|
4011
|
-
return Object.entries(b).forEach(([
|
|
4012
|
-
const
|
|
4013
|
-
if (!
|
|
4014
|
-
const
|
|
4015
|
-
p[
|
|
4013
|
+
return Object.entries(b).forEach(([_, F]) => {
|
|
4014
|
+
const k = ToKebabCase(_);
|
|
4015
|
+
if (!k.startsWith("radio-button-") && !k.startsWith("on-radio-button-")) {
|
|
4016
|
+
const N = ToCamelCase(k);
|
|
4017
|
+
p[N] = F;
|
|
4016
4018
|
}
|
|
4017
4019
|
}), p;
|
|
4018
|
-
}),
|
|
4020
|
+
}), C = computed(() => {
|
|
4019
4021
|
const p = {};
|
|
4020
|
-
return Object.entries(b).forEach(([
|
|
4021
|
-
const
|
|
4022
|
-
if (
|
|
4023
|
-
const
|
|
4024
|
-
p[
|
|
4022
|
+
return Object.entries(b).forEach(([_, F]) => {
|
|
4023
|
+
const k = ToKebabCase(_);
|
|
4024
|
+
if (k.startsWith("radio-button-") || k.startsWith("on-radio-button-")) {
|
|
4025
|
+
const N = ToCamelCase(k.replace("radio-button-", ""));
|
|
4026
|
+
p[N] = F;
|
|
4025
4027
|
}
|
|
4026
4028
|
}), p;
|
|
4027
|
-
}),
|
|
4029
|
+
}), D = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (p) => {
|
|
4028
4030
|
if (!c.value) {
|
|
4029
4031
|
g("dictChange", p);
|
|
4030
4032
|
return;
|
|
4031
4033
|
}
|
|
4032
|
-
const
|
|
4033
|
-
g("dictChange",
|
|
4034
|
-
},
|
|
4034
|
+
const _ = B.list.find((F) => F[l.format.value] === p);
|
|
4035
|
+
g("dictChange", _);
|
|
4036
|
+
}, B = reactive({
|
|
4035
4037
|
list: []
|
|
4036
4038
|
}), y = async () => {
|
|
4037
4039
|
if (!i.value || u.value && u.value.length > 0)
|
|
4038
4040
|
return;
|
|
4039
4041
|
let p = [];
|
|
4040
4042
|
if (typeof i.value == "object") {
|
|
4041
|
-
|
|
4042
|
-
const
|
|
4043
|
-
p = [].concat(
|
|
4044
|
-
const { filters:
|
|
4045
|
-
|
|
4043
|
+
D.value = i.value.type;
|
|
4044
|
+
const _ = await store.actions.getDictDataObj(D.value);
|
|
4045
|
+
p = [].concat(_[D.value]);
|
|
4046
|
+
const { filters: F, filterType: k = l.format.value, reverse: N = !1 } = i.value, R = typeof F == "string" ? F.split(",") : F;
|
|
4047
|
+
N ? p = p.filter((J) => !R.includes(J[k])) : p = p.filter((J) => R.includes(J[k]));
|
|
4046
4048
|
} else {
|
|
4047
|
-
|
|
4048
|
-
const
|
|
4049
|
-
p = [].concat(
|
|
4049
|
+
D.value = i.value;
|
|
4050
|
+
const _ = await store.actions.getDictDataObj(D.value);
|
|
4051
|
+
p = [].concat(_[D.value]);
|
|
4050
4052
|
}
|
|
4051
4053
|
if (v.value && (p = v.value(p)), w.value)
|
|
4052
|
-
p = p.map((
|
|
4053
|
-
...
|
|
4054
|
-
[l.format.disabled]: w.value(
|
|
4054
|
+
p = p.map((_) => ({
|
|
4055
|
+
..._,
|
|
4056
|
+
[l.format.disabled]: w.value(_)
|
|
4055
4057
|
}));
|
|
4056
4058
|
else if (s.value) {
|
|
4057
|
-
const { disabledValues:
|
|
4058
|
-
|
|
4059
|
+
const { disabledValues: _, disabledType: F = l.format.value, reverse: k = !1 } = s.value, N = typeof _ == "string" ? _.split(",") : _;
|
|
4060
|
+
k ? p = p.map((R) => {
|
|
4059
4061
|
const J = JSON.parse(JSON.stringify(R));
|
|
4060
|
-
return J[l.format.disabled] = !
|
|
4062
|
+
return J[l.format.disabled] = !N.includes(J[F]) || J[l.format.disabled], J;
|
|
4061
4063
|
}) : p = p.map((R) => {
|
|
4062
4064
|
const J = JSON.parse(JSON.stringify(R));
|
|
4063
|
-
return J[l.format.disabled] =
|
|
4065
|
+
return J[l.format.disabled] = N.includes(J[F]) || J[l.format.disabled], J;
|
|
4064
4066
|
});
|
|
4065
4067
|
}
|
|
4066
4068
|
a.value && p.unshift({
|
|
4067
4069
|
[l.format.value]: "",
|
|
4068
4070
|
[l.format.label]: a.value
|
|
4069
|
-
}),
|
|
4070
|
-
},
|
|
4071
|
+
}), B.list = p;
|
|
4072
|
+
}, j = computed(() => store.state.isGettingDictTypes.includes(D.value)), V = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value), S = inject(formItemContextKey), O = inject(formContextKey), I = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (S == null ? void 0 : S.disabled) || (O == null ? void 0 : O.disabled) || !1);
|
|
4071
4073
|
watch(
|
|
4072
|
-
[
|
|
4073
|
-
([p,
|
|
4074
|
-
!p && !
|
|
4075
|
-
[l.format.value]:
|
|
4076
|
-
[l.format.label]:
|
|
4077
|
-
[l.format.disabled]: !!
|
|
4078
|
-
...
|
|
4079
|
-
})) :
|
|
4080
|
-
[l.format.value]:
|
|
4081
|
-
[l.format.label]:
|
|
4082
|
-
})), a.value &&
|
|
4074
|
+
[j, V, A],
|
|
4075
|
+
([p, _, F]) => {
|
|
4076
|
+
!p && !_ && F && F.length === 0 && y(), F.length > 0 && (B.list = JSON.parse(JSON.stringify(F)), B.list.length > 0 && (Object.prototype.toString.call(B.list[0]) === "[object Object]" ? B.list = B.list.map((N) => ({
|
|
4077
|
+
[l.format.value]: N[o.value.value],
|
|
4078
|
+
[l.format.label]: N[o.value.label],
|
|
4079
|
+
[l.format.disabled]: !!N[o.value.disabled],
|
|
4080
|
+
...N
|
|
4081
|
+
})) : B.list = B.list.map((N) => ({
|
|
4082
|
+
[l.format.value]: N,
|
|
4083
|
+
[l.format.label]: N
|
|
4084
|
+
})), a.value && B.list.unshift({
|
|
4083
4085
|
[l.format.value]: "",
|
|
4084
4086
|
[l.format.label]: a.value
|
|
4085
4087
|
})));
|
|
@@ -4088,34 +4090,34 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4088
4090
|
immediate: !0
|
|
4089
4091
|
}
|
|
4090
4092
|
);
|
|
4091
|
-
const G = ref([]),
|
|
4092
|
-
return r({ getElRadioGroupRef: () =>
|
|
4093
|
+
const G = ref([]), E = () => G.value, x = ref(null);
|
|
4094
|
+
return r({ getElRadioGroupRef: () => x.value, getElRadioButtonRefs: E }), (p, _) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4093
4095
|
ref_key: "ElRadioGroupRef",
|
|
4094
|
-
ref:
|
|
4096
|
+
ref: x,
|
|
4095
4097
|
disabled: I.value
|
|
4096
4098
|
}, m.value, { onChange: T }), createSlots({
|
|
4097
4099
|
default: withCtx(() => [
|
|
4098
|
-
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(
|
|
4100
|
+
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(B.list, (F, k) => (openBlock(), createBlock(unref(ElRadioButton), mergeProps({
|
|
4099
4101
|
ref_for: !0,
|
|
4100
|
-
ref: (
|
|
4101
|
-
|
|
4102
|
+
ref: (N) => {
|
|
4103
|
+
N && (G.value[k] = N);
|
|
4102
4104
|
},
|
|
4103
|
-
key:
|
|
4104
|
-
disabled: I.value ||
|
|
4105
|
-
label:
|
|
4106
|
-
},
|
|
4105
|
+
key: F[unref(l).format.value],
|
|
4106
|
+
disabled: I.value || F[unref(l).format.disabled],
|
|
4107
|
+
label: F[unref(l).format.value]
|
|
4108
|
+
}, C.value), {
|
|
4107
4109
|
default: withCtx(() => [
|
|
4108
|
-
createTextVNode(toDisplayString(
|
|
4110
|
+
createTextVNode(toDisplayString(F[unref(l).format.label]), 1)
|
|
4109
4111
|
]),
|
|
4110
4112
|
_: 2
|
|
4111
4113
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4112
4114
|
]),
|
|
4113
4115
|
_: 2
|
|
4114
4116
|
}, [
|
|
4115
|
-
renderList(p.$slots, (
|
|
4116
|
-
name:
|
|
4117
|
+
renderList(p.$slots, (F, k, N) => ({
|
|
4118
|
+
name: k,
|
|
4117
4119
|
fn: withCtx((R) => [
|
|
4118
|
-
renderSlot(p.$slots,
|
|
4120
|
+
renderSlot(p.$slots, k, normalizeProps(guardReactiveProps(R)))
|
|
4119
4121
|
])
|
|
4120
4122
|
}))
|
|
4121
4123
|
]), 1040, ["disabled"]));
|
|
@@ -4181,78 +4183,78 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4181
4183
|
setup(e, { expose: r, emit: d }) {
|
|
4182
4184
|
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: v, disabledDataFun: w } = toRefs(t), b = useAttrs(), m = computed(() => {
|
|
4183
4185
|
const p = {};
|
|
4184
|
-
return Object.entries(b).forEach(([
|
|
4185
|
-
const
|
|
4186
|
-
if (!
|
|
4187
|
-
const
|
|
4188
|
-
p[
|
|
4186
|
+
return Object.entries(b).forEach(([_, F]) => {
|
|
4187
|
+
const k = ToKebabCase(_);
|
|
4188
|
+
if (!k.startsWith("radio-") && !k.startsWith("on-radio-")) {
|
|
4189
|
+
const N = ToCamelCase(k);
|
|
4190
|
+
p[N] = F;
|
|
4189
4191
|
}
|
|
4190
4192
|
}), p;
|
|
4191
|
-
}),
|
|
4193
|
+
}), C = computed(() => {
|
|
4192
4194
|
const p = {};
|
|
4193
|
-
return Object.entries(b).forEach(([
|
|
4194
|
-
const
|
|
4195
|
-
if (
|
|
4196
|
-
const
|
|
4197
|
-
p[
|
|
4195
|
+
return Object.entries(b).forEach(([_, F]) => {
|
|
4196
|
+
const k = ToKebabCase(_);
|
|
4197
|
+
if (k.startsWith("radio-") || k.startsWith("on-radio-")) {
|
|
4198
|
+
const N = ToCamelCase(k.replace("radio-", ""));
|
|
4199
|
+
p[N] = F;
|
|
4198
4200
|
}
|
|
4199
4201
|
}), p;
|
|
4200
|
-
}),
|
|
4202
|
+
}), D = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (p) => {
|
|
4201
4203
|
if (!c.value) {
|
|
4202
4204
|
g("dictChange", p);
|
|
4203
4205
|
return;
|
|
4204
4206
|
}
|
|
4205
|
-
const
|
|
4206
|
-
g("dictChange",
|
|
4207
|
-
},
|
|
4207
|
+
const _ = B.list.find((F) => F[l.format.value] === p);
|
|
4208
|
+
g("dictChange", _);
|
|
4209
|
+
}, B = reactive({
|
|
4208
4210
|
list: []
|
|
4209
4211
|
}), y = async () => {
|
|
4210
4212
|
if (!i.value || u.value && u.value.length > 0)
|
|
4211
4213
|
return;
|
|
4212
4214
|
let p = [];
|
|
4213
4215
|
if (typeof i.value == "object") {
|
|
4214
|
-
|
|
4215
|
-
const
|
|
4216
|
-
p = [].concat(
|
|
4217
|
-
const { filters:
|
|
4218
|
-
|
|
4216
|
+
D.value = i.value.type;
|
|
4217
|
+
const _ = await store.actions.getDictDataObj(D.value);
|
|
4218
|
+
p = [].concat(_[D.value]);
|
|
4219
|
+
const { filters: F, filterType: k = l.format.value, reverse: N = !1 } = i.value, R = typeof F == "string" ? F.split(",") : F;
|
|
4220
|
+
N ? p = p.filter((J) => !R.includes(J[k])) : p = p.filter((J) => R.includes(J[k]));
|
|
4219
4221
|
} else {
|
|
4220
|
-
|
|
4221
|
-
const
|
|
4222
|
-
p = [].concat(
|
|
4222
|
+
D.value = i.value;
|
|
4223
|
+
const _ = await store.actions.getDictDataObj(D.value);
|
|
4224
|
+
p = [].concat(_[D.value]);
|
|
4223
4225
|
}
|
|
4224
4226
|
if (v.value && (p = v.value(p)), w.value)
|
|
4225
|
-
p = p.map((
|
|
4226
|
-
...
|
|
4227
|
-
[l.format.disabled]: w.value(
|
|
4227
|
+
p = p.map((_) => ({
|
|
4228
|
+
..._,
|
|
4229
|
+
[l.format.disabled]: w.value(_)
|
|
4228
4230
|
}));
|
|
4229
4231
|
else if (s.value) {
|
|
4230
|
-
const { disabledValues:
|
|
4231
|
-
|
|
4232
|
+
const { disabledValues: _, disabledType: F = l.format.value, reverse: k = !1 } = s.value, N = typeof _ == "string" ? _.split(",") : _;
|
|
4233
|
+
k ? p = p.map((R) => {
|
|
4232
4234
|
const J = JSON.parse(JSON.stringify(R));
|
|
4233
|
-
return J[l.format.disabled] = !
|
|
4235
|
+
return J[l.format.disabled] = !N.includes(J[F]) || J[l.format.disabled], J;
|
|
4234
4236
|
}) : p = p.map((R) => {
|
|
4235
4237
|
const J = JSON.parse(JSON.stringify(R));
|
|
4236
|
-
return J[l.format.disabled] =
|
|
4238
|
+
return J[l.format.disabled] = N.includes(J[F]) || J[l.format.disabled], J;
|
|
4237
4239
|
});
|
|
4238
4240
|
}
|
|
4239
4241
|
a.value && p.unshift({
|
|
4240
4242
|
[l.format.value]: "",
|
|
4241
4243
|
[l.format.label]: a.value
|
|
4242
|
-
}),
|
|
4243
|
-
},
|
|
4244
|
+
}), B.list = p;
|
|
4245
|
+
}, j = computed(() => store.state.isGettingDictTypes.includes(D.value)), V = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value), S = inject(formItemContextKey), O = inject(formContextKey), I = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (S == null ? void 0 : S.disabled) || (O == null ? void 0 : O.disabled) || !1);
|
|
4244
4246
|
watch(
|
|
4245
|
-
[
|
|
4246
|
-
([p,
|
|
4247
|
-
!p && !
|
|
4248
|
-
[l.format.value]:
|
|
4249
|
-
[l.format.label]:
|
|
4250
|
-
[l.format.disabled]: !!
|
|
4251
|
-
...
|
|
4252
|
-
})) :
|
|
4253
|
-
[l.format.value]:
|
|
4254
|
-
[l.format.label]:
|
|
4255
|
-
})), a.value &&
|
|
4247
|
+
[j, V, A],
|
|
4248
|
+
([p, _, F]) => {
|
|
4249
|
+
!p && !_ && F && F.length === 0 && y(), F.length > 0 && (B.list = JSON.parse(JSON.stringify(F)), B.list.length > 0 && (Object.prototype.toString.call(B.list[0]) === "[object Object]" ? B.list = B.list.map((N) => ({
|
|
4250
|
+
[l.format.value]: N[o.value.value],
|
|
4251
|
+
[l.format.label]: N[o.value.label],
|
|
4252
|
+
[l.format.disabled]: !!N[o.value.disabled],
|
|
4253
|
+
...N
|
|
4254
|
+
})) : B.list = B.list.map((N) => ({
|
|
4255
|
+
[l.format.value]: N,
|
|
4256
|
+
[l.format.label]: N
|
|
4257
|
+
})), a.value && B.list.unshift({
|
|
4256
4258
|
[l.format.value]: "",
|
|
4257
4259
|
[l.format.label]: a.value
|
|
4258
4260
|
})));
|
|
@@ -4261,34 +4263,34 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4261
4263
|
immediate: !0
|
|
4262
4264
|
}
|
|
4263
4265
|
);
|
|
4264
|
-
const G = ref([]),
|
|
4265
|
-
return r({ geElRadioGroupRef: () =>
|
|
4266
|
+
const G = ref([]), E = () => G.value, x = ref(null);
|
|
4267
|
+
return r({ geElRadioGroupRef: () => x.value, getElRadioRefs: E }), (p, _) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4266
4268
|
ref_key: "ElRadioGroupRef",
|
|
4267
|
-
ref:
|
|
4269
|
+
ref: x,
|
|
4268
4270
|
disabled: I.value
|
|
4269
4271
|
}, m.value, { onChange: T }), createSlots({
|
|
4270
4272
|
default: withCtx(() => [
|
|
4271
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4273
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(B.list, (F, k) => (openBlock(), createBlock(unref(ElRadio), mergeProps({
|
|
4272
4274
|
ref_for: !0,
|
|
4273
|
-
ref: (
|
|
4274
|
-
|
|
4275
|
+
ref: (N) => {
|
|
4276
|
+
N && (G.value[k] = N);
|
|
4275
4277
|
},
|
|
4276
|
-
key:
|
|
4277
|
-
disabled: I.value ||
|
|
4278
|
-
label:
|
|
4279
|
-
},
|
|
4278
|
+
key: F[unref(l).format.value],
|
|
4279
|
+
disabled: I.value || F[unref(l).format.disabled],
|
|
4280
|
+
label: F[unref(l).format.value]
|
|
4281
|
+
}, C.value), {
|
|
4280
4282
|
default: withCtx(() => [
|
|
4281
|
-
createTextVNode(toDisplayString(
|
|
4283
|
+
createTextVNode(toDisplayString(F[unref(l).format.label]), 1)
|
|
4282
4284
|
]),
|
|
4283
4285
|
_: 2
|
|
4284
4286
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4285
4287
|
]),
|
|
4286
4288
|
_: 2
|
|
4287
4289
|
}, [
|
|
4288
|
-
renderList(p.$slots, (
|
|
4289
|
-
name:
|
|
4290
|
+
renderList(p.$slots, (F, k, N) => ({
|
|
4291
|
+
name: k,
|
|
4290
4292
|
fn: withCtx((R) => [
|
|
4291
|
-
renderSlot(p.$slots,
|
|
4293
|
+
renderSlot(p.$slots, k, normalizeProps(guardReactiveProps(R)))
|
|
4292
4294
|
])
|
|
4293
4295
|
}))
|
|
4294
4296
|
]), 1040, ["disabled"]));
|
|
@@ -4353,39 +4355,39 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4353
4355
|
},
|
|
4354
4356
|
emits: ["dictChange"],
|
|
4355
4357
|
setup(e, { expose: r, emit: d }) {
|
|
4356
|
-
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(),
|
|
4358
|
+
const t = e, { addAllText: n, emptyValues: a, valueOnClear: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: b } = toRefs(t), m = useAttrs(), C = computed(() => {
|
|
4357
4359
|
const f = {};
|
|
4358
|
-
return Object.entries(m).forEach(([p,
|
|
4359
|
-
const
|
|
4360
|
-
if (!
|
|
4361
|
-
const
|
|
4362
|
-
f[
|
|
4360
|
+
return Object.entries(m).forEach(([p, _]) => {
|
|
4361
|
+
const F = ToKebabCase(p);
|
|
4362
|
+
if (!F.startsWith("option-") && !F.startsWith("on-option-")) {
|
|
4363
|
+
const k = ToCamelCase(F);
|
|
4364
|
+
f[k] = _;
|
|
4363
4365
|
}
|
|
4364
4366
|
}), f;
|
|
4365
|
-
}),
|
|
4367
|
+
}), D = computed(() => {
|
|
4366
4368
|
const f = {};
|
|
4367
|
-
return Object.entries(m).forEach(([p,
|
|
4368
|
-
const
|
|
4369
|
-
if (
|
|
4370
|
-
const
|
|
4371
|
-
f[
|
|
4369
|
+
return Object.entries(m).forEach(([p, _]) => {
|
|
4370
|
+
const F = ToKebabCase(p);
|
|
4371
|
+
if (F.startsWith("option-") || F.startsWith("on-option-")) {
|
|
4372
|
+
const k = ToCamelCase(F.replace("option-", ""));
|
|
4373
|
+
f[k] = _;
|
|
4372
4374
|
}
|
|
4373
4375
|
}), f;
|
|
4374
|
-
}), l = ref(""), g = toRaw(store.state.dictConfig), T = d,
|
|
4376
|
+
}), l = ref(""), g = toRaw(store.state.dictConfig), T = d, B = (f) => {
|
|
4375
4377
|
if (!v.value) {
|
|
4376
4378
|
T("dictChange", f);
|
|
4377
4379
|
return;
|
|
4378
4380
|
}
|
|
4379
4381
|
if (!m.multiple && m.multiple !== "") {
|
|
4380
|
-
const p = y.list.find((
|
|
4382
|
+
const p = y.list.find((_) => _[g.format.value] === f);
|
|
4381
4383
|
T("dictChange", p);
|
|
4382
4384
|
} else {
|
|
4383
|
-
const p = y.list.filter((
|
|
4385
|
+
const p = y.list.filter((_) => f.includes(_[g.format.value]));
|
|
4384
4386
|
T("dictChange", p);
|
|
4385
4387
|
}
|
|
4386
4388
|
}, y = reactive({
|
|
4387
4389
|
list: []
|
|
4388
|
-
}),
|
|
4390
|
+
}), j = async () => {
|
|
4389
4391
|
if (!s.value || o.value && o.value.length > 0)
|
|
4390
4392
|
return;
|
|
4391
4393
|
let f = [];
|
|
@@ -4393,8 +4395,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4393
4395
|
l.value = s.value.type;
|
|
4394
4396
|
const p = await store.actions.getDictDataObj(l.value);
|
|
4395
4397
|
f = [].concat(p[l.value]);
|
|
4396
|
-
const { filters:
|
|
4397
|
-
|
|
4398
|
+
const { filters: _, filterType: F = g.format.value, reverse: k = !1 } = s.value, N = typeof _ == "string" ? _.split(",") : _;
|
|
4399
|
+
k ? f = f.filter((R) => !N.includes(R[F])) : f = f.filter((R) => N.includes(R[F]));
|
|
4398
4400
|
} else {
|
|
4399
4401
|
l.value = s.value;
|
|
4400
4402
|
const p = await store.actions.getDictDataObj(l.value);
|
|
@@ -4406,73 +4408,73 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4406
4408
|
[g.format.disabled]: b.value(p)
|
|
4407
4409
|
}));
|
|
4408
4410
|
else if (c.value) {
|
|
4409
|
-
const { disabledValues: p, disabledType:
|
|
4410
|
-
|
|
4411
|
-
const R = JSON.parse(JSON.stringify(
|
|
4412
|
-
return R[g.format.disabled] = !
|
|
4413
|
-
}) : f = f.map((
|
|
4414
|
-
const R = JSON.parse(JSON.stringify(
|
|
4415
|
-
return R[g.format.disabled] =
|
|
4411
|
+
const { disabledValues: p, disabledType: _ = g.format.value, reverse: F = !1 } = c.value, k = typeof p == "string" ? p.split(",") : p;
|
|
4412
|
+
F ? f = f.map((N) => {
|
|
4413
|
+
const R = JSON.parse(JSON.stringify(N));
|
|
4414
|
+
return R[g.format.disabled] = !k.includes(R[_]) || R[g.format.disabled], R;
|
|
4415
|
+
}) : f = f.map((N) => {
|
|
4416
|
+
const R = JSON.parse(JSON.stringify(N));
|
|
4417
|
+
return R[g.format.disabled] = k.includes(R[_]) || R[g.format.disabled], R;
|
|
4416
4418
|
});
|
|
4417
4419
|
}
|
|
4418
4420
|
n.value && !m.multiple && m.multiple !== "" && f.unshift({
|
|
4419
4421
|
[g.format.value]: "",
|
|
4420
4422
|
[g.format.label]: n.value
|
|
4421
4423
|
}), y.list = f;
|
|
4422
|
-
},
|
|
4424
|
+
}, V = computed(() => store.state.isGettingDictTypes.includes(l.value)), A = computed(() => store.state.isGettingAllDictTypes), S = computed(() => o.value);
|
|
4423
4425
|
watch(
|
|
4424
|
-
[
|
|
4425
|
-
([f, p,
|
|
4426
|
-
if (!f && !p &&
|
|
4427
|
-
let
|
|
4428
|
-
|
|
4429
|
-
[g.format.value]:
|
|
4430
|
-
[g.format.label]:
|
|
4431
|
-
[g.format.disabled]: !!
|
|
4432
|
-
...
|
|
4433
|
-
})) :
|
|
4434
|
-
[g.format.value]:
|
|
4435
|
-
[g.format.label]:
|
|
4436
|
-
})), n.value && !m.multiple && m.multiple !== "" &&
|
|
4426
|
+
[V, A, S],
|
|
4427
|
+
([f, p, _]) => {
|
|
4428
|
+
if (!f && !p && _ && _.length === 0 && j(), _.length > 0) {
|
|
4429
|
+
let F = JSON.parse(JSON.stringify(_));
|
|
4430
|
+
F.length > 0 && (Object.prototype.toString.call(F[0]) === "[object Object]" ? F = F.map((N) => ({
|
|
4431
|
+
[g.format.value]: N[i.value.value],
|
|
4432
|
+
[g.format.label]: N[i.value.label],
|
|
4433
|
+
[g.format.disabled]: !!N[i.value.disabled],
|
|
4434
|
+
...N
|
|
4435
|
+
})) : F = F.map((N) => ({
|
|
4436
|
+
[g.format.value]: N,
|
|
4437
|
+
[g.format.label]: N
|
|
4438
|
+
})), n.value && !m.multiple && m.multiple !== "" && F.unshift({
|
|
4437
4439
|
[g.format.value]: "",
|
|
4438
4440
|
[g.format.label]: n.value
|
|
4439
|
-
}), y.list =
|
|
4441
|
+
}), y.list = F);
|
|
4440
4442
|
}
|
|
4441
4443
|
},
|
|
4442
4444
|
{
|
|
4443
4445
|
immediate: !0
|
|
4444
4446
|
}
|
|
4445
4447
|
);
|
|
4446
|
-
const
|
|
4447
|
-
return r({ getElSelectRef: G, getElOptionRefs: () =>
|
|
4448
|
+
const O = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value, I = ref(null), G = () => I.value, E = ref([]);
|
|
4449
|
+
return r({ getElSelectRef: G, getElOptionRefs: () => E.value }), (f, p) => (openBlock(), createBlock(unref(ElSelect), mergeProps({
|
|
4448
4450
|
ref_key: "ElSelectRef",
|
|
4449
4451
|
ref: I
|
|
4450
|
-
},
|
|
4451
|
-
"value-on-clear":
|
|
4452
|
+
}, C.value, {
|
|
4453
|
+
"value-on-clear": O,
|
|
4452
4454
|
"empty-values": unref(n) ? [null, void 0] : unref(a),
|
|
4453
4455
|
"value-key": unref(g).format.value,
|
|
4454
|
-
onChange:
|
|
4456
|
+
onChange: B,
|
|
4455
4457
|
class: unref(m).modelValue === "" && unref(n) ? "no-clear" : "",
|
|
4456
4458
|
"popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] }
|
|
4457
4459
|
}), createSlots({
|
|
4458
4460
|
default: withCtx(() => [
|
|
4459
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.list, (
|
|
4461
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.list, (_) => (openBlock(), createBlock(unref(ElOption), mergeProps({
|
|
4460
4462
|
ref_for: !0,
|
|
4461
|
-
ref: (
|
|
4462
|
-
|
|
4463
|
+
ref: (F) => {
|
|
4464
|
+
F && (E.value[f.index] = F);
|
|
4463
4465
|
},
|
|
4464
|
-
key:
|
|
4465
|
-
disabled:
|
|
4466
|
-
label:
|
|
4467
|
-
value:
|
|
4468
|
-
},
|
|
4466
|
+
key: _[unref(g).format.value],
|
|
4467
|
+
disabled: _[unref(g).format.disabled],
|
|
4468
|
+
label: _[unref(g).format.label],
|
|
4469
|
+
value: _[unref(g).format.value]
|
|
4470
|
+
}, D.value), null, 16, ["disabled", "label", "value"]))), 128))
|
|
4469
4471
|
]),
|
|
4470
4472
|
_: 2
|
|
4471
4473
|
}, [
|
|
4472
|
-
renderList(f.$slots, (
|
|
4473
|
-
name:
|
|
4474
|
-
fn: withCtx((
|
|
4475
|
-
renderSlot(f.$slots,
|
|
4474
|
+
renderList(f.$slots, (_, F, k) => ({
|
|
4475
|
+
name: F,
|
|
4476
|
+
fn: withCtx((N) => [
|
|
4477
|
+
renderSlot(f.$slots, F, mergeProps({ key: k }, N))
|
|
4476
4478
|
])
|
|
4477
4479
|
}))
|
|
4478
4480
|
]), 1040, ["empty-values", "value-key", "class"]));
|
|
@@ -4565,75 +4567,75 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4565
4567
|
}
|
|
4566
4568
|
},
|
|
4567
4569
|
setup(e, { expose: r }) {
|
|
4568
|
-
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn: v, formatFunOut: w, spacer: b, maskType: m, maskStart:
|
|
4569
|
-
const
|
|
4570
|
-
return i.value !== void 0 && i.value !== null && (
|
|
4571
|
-
}),
|
|
4572
|
-
const
|
|
4573
|
-
return i.value !== void 0 && i.value !== null && (
|
|
4574
|
-
}), y = computed(() => !!m.value || !!
|
|
4570
|
+
const d = useAttrs(), t = e, { emptyText: n, dictType: a, dictTreeType: u, dateFormat: o, defaultVal: i, treeSetting: s, formatFun: c, formatFunIn: v, formatFunOut: w, spacer: b, maskType: m, maskStart: C, maskEnd: D, maskMiddle: l, maskSymbol: g } = toRefs(t), T = computed(() => {
|
|
4571
|
+
const O = {};
|
|
4572
|
+
return i.value !== void 0 && i.value !== null && (O.defaultVal = i.value), n.value !== void 0 && n.value !== null && (O.emptyText = n.value), c.value !== void 0 && c.value !== null && (O.formatFun = c.value), b.value !== void 0 && b.value !== null && (O.spacer = b.value), O;
|
|
4573
|
+
}), B = computed(() => {
|
|
4574
|
+
const O = {};
|
|
4575
|
+
return i.value !== void 0 && i.value !== null && (O.defaultVal = i.value), n.value !== void 0 && n.value !== null && (O.emptyText = n.value), v.value !== void 0 && v.value !== null && (O.formatFunIn = v.value), w.value !== void 0 && w.value !== null && (O.formatFunOut = w.value), s.value !== void 0 && s.value !== null && (O.treeSetting = s.value), b.value !== void 0 && b.value !== null && (O.spacer = b.value), O;
|
|
4576
|
+
}), y = computed(() => !!m.value || !!C.value || !!l.value || !!D.value), j = computed(() => {
|
|
4575
4577
|
if (m.value) {
|
|
4576
4578
|
if (Array.isArray(m.value))
|
|
4577
4579
|
return {
|
|
4578
|
-
start:
|
|
4580
|
+
start: C.value || m.value[0] || 0,
|
|
4579
4581
|
middle: l.value || m.value[1] || 0,
|
|
4580
|
-
end:
|
|
4582
|
+
end: D.value || m.value[2] || 0,
|
|
4581
4583
|
symbol: g.value || m.value[3] || "*",
|
|
4582
4584
|
defaultVal: i.value
|
|
4583
4585
|
};
|
|
4584
4586
|
if (typeof m.value == "object") {
|
|
4585
|
-
const
|
|
4586
|
-
start:
|
|
4587
|
+
const O = {
|
|
4588
|
+
start: C.value || 0,
|
|
4587
4589
|
middle: l.value || 0,
|
|
4588
|
-
end:
|
|
4590
|
+
end: D.value || 0,
|
|
4589
4591
|
symbol: g.value || "*",
|
|
4590
4592
|
defaultVal: i.value
|
|
4591
4593
|
};
|
|
4592
|
-
return Object.assign(
|
|
4594
|
+
return Object.assign(O, m.value);
|
|
4593
4595
|
} else
|
|
4594
4596
|
return m.value;
|
|
4595
4597
|
} else
|
|
4596
4598
|
return {
|
|
4597
|
-
start:
|
|
4599
|
+
start: C.value || 0,
|
|
4598
4600
|
middle: l.value || 0,
|
|
4599
|
-
end:
|
|
4601
|
+
end: D.value || 0,
|
|
4600
4602
|
symbol: g.value || "*",
|
|
4601
4603
|
defaultVal: i.value
|
|
4602
4604
|
};
|
|
4603
|
-
}),
|
|
4604
|
-
return r({ getElTableColumnRef: () =>
|
|
4605
|
+
}), V = (O, I = {}) => Array.isArray(O) ? O : typeof O == "string" ? O.split(I.spacer || ",") : typeof O == "number" ? [O] : [], A = ref(null);
|
|
4606
|
+
return r({ getElTableColumnRef: () => A.value }), (O, I) => (openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
4605
4607
|
ref_key: "ElTableColumnRef",
|
|
4606
|
-
ref:
|
|
4607
|
-
},
|
|
4608
|
+
ref: A
|
|
4609
|
+
}, O.$attrs), createSlots({
|
|
4608
4610
|
default: withCtx((G) => {
|
|
4609
|
-
var
|
|
4611
|
+
var E, x, f, p, _, F, k, N, R, J, P, K;
|
|
4610
4612
|
return [
|
|
4611
4613
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4612
|
-
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(
|
|
4614
|
+
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(V(G.row[(E = unref(d)) == null ? void 0 : E.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$n, {
|
|
4613
4615
|
key: M,
|
|
4614
4616
|
modelValue: L || "",
|
|
4615
4617
|
dictType: unref(a)
|
|
4616
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(
|
|
4618
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(V(G.row[(x = unref(d)) == null ? void 0 : x.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$e, {
|
|
4617
4619
|
key: M,
|
|
4618
4620
|
modelValue: L || "",
|
|
4619
4621
|
dictType: unref(a)
|
|
4620
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(
|
|
4622
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(V(G.row[(f = unref(d)) == null ? void 0 : f.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$f, {
|
|
4621
4623
|
key: M,
|
|
4622
4624
|
modelValue: L || "",
|
|
4623
4625
|
dictType: unref(a)
|
|
4624
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(
|
|
4626
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(V(G.row[(p = unref(d)) == null ? void 0 : p.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$d, {
|
|
4625
4627
|
key: M,
|
|
4626
4628
|
modelValue: L || "",
|
|
4627
4629
|
dictType: unref(a)
|
|
4628
4630
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4629
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(G.row[(
|
|
4631
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(G.row[(_ = unref(d)) == null ? void 0 : _.prop], unref(a), T.value)), 1)
|
|
4630
4632
|
], 64))
|
|
4631
|
-
], 64)) : unref(u) && G.row[(
|
|
4632
|
-
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(G.row[(
|
|
4633
|
-
], 64)) : unref(o) && G.row[(
|
|
4633
|
+
], 64)) : unref(u) && G.row[(F = unref(d)) == null ? void 0 : F.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4634
|
+
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(G.row[(k = unref(d)) == null ? void 0 : k.prop], unref(u), B.value)), 1)
|
|
4635
|
+
], 64)) : unref(o) && G.row[(N = unref(d)) == null ? void 0 : N.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4634
4636
|
createTextVNode(toDisplayString(unref(FormatDate)(G.row[(R = unref(d)) == null ? void 0 : R.prop], unref(o), unref(i))), 1)
|
|
4635
4637
|
], 64)) : y.value && G.row[(J = unref(d)) == null ? void 0 : J.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4636
|
-
createTextVNode(toDisplayString(unref(Desensitization)(G.row[(P = unref(d)) == null ? void 0 : P.prop],
|
|
4638
|
+
createTextVNode(toDisplayString(unref(Desensitization)(G.row[(P = unref(d)) == null ? void 0 : P.prop], j.value)), 1)
|
|
4637
4639
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4638
4640
|
createTextVNode(toDisplayString(G.row[(K = unref(d)) == null ? void 0 : K.prop] || unref(i)), 1)
|
|
4639
4641
|
], 64))
|
|
@@ -4641,10 +4643,10 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4641
4643
|
}),
|
|
4642
4644
|
_: 2
|
|
4643
4645
|
}, [
|
|
4644
|
-
renderList(
|
|
4645
|
-
name:
|
|
4646
|
+
renderList(O.$slots, (G, E, x) => ({
|
|
4647
|
+
name: E,
|
|
4646
4648
|
fn: withCtx((f) => [
|
|
4647
|
-
renderSlot(
|
|
4649
|
+
renderSlot(O.$slots, E, mergeProps({ key: x }, f), void 0, !0)
|
|
4648
4650
|
])
|
|
4649
4651
|
}))
|
|
4650
4652
|
]), 1040));
|
|
@@ -4708,81 +4710,81 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4708
4710
|
emits: ["dictChange"],
|
|
4709
4711
|
setup(e, { expose: r, emit: d }) {
|
|
4710
4712
|
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue: v, filterDataFun: w, disabledDataFun: b } = toRefs(n), m = computed(() => {
|
|
4711
|
-
const
|
|
4712
|
-
return Object.entries(t).forEach(([
|
|
4713
|
-
const p = ToKebabCase(
|
|
4713
|
+
const E = {};
|
|
4714
|
+
return Object.entries(t).forEach(([x, f]) => {
|
|
4715
|
+
const p = ToKebabCase(x);
|
|
4714
4716
|
if (!p.startsWith("tab-pane-") && !p.startsWith("on-tab-pane-")) {
|
|
4715
|
-
const
|
|
4716
|
-
|
|
4717
|
+
const _ = ToCamelCase(p);
|
|
4718
|
+
E[_] = f;
|
|
4717
4719
|
}
|
|
4718
|
-
}),
|
|
4719
|
-
}),
|
|
4720
|
-
const
|
|
4721
|
-
return Object.entries(t).forEach(([
|
|
4722
|
-
const p = ToKebabCase(
|
|
4720
|
+
}), E;
|
|
4721
|
+
}), C = computed(() => {
|
|
4722
|
+
const E = {};
|
|
4723
|
+
return Object.entries(t).forEach(([x, f]) => {
|
|
4724
|
+
const p = ToKebabCase(x);
|
|
4723
4725
|
if (p.startsWith("tab-pane-") || p.startsWith("on-tab-pane-")) {
|
|
4724
|
-
const
|
|
4725
|
-
|
|
4726
|
+
const _ = ToCamelCase(p.replace("tab-pane-", ""));
|
|
4727
|
+
E[_] = f;
|
|
4726
4728
|
}
|
|
4727
|
-
}),
|
|
4728
|
-
}),
|
|
4729
|
+
}), E;
|
|
4730
|
+
}), D = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (E) => {
|
|
4729
4731
|
window.setTimeout(() => {
|
|
4730
4732
|
if (!v.value) {
|
|
4731
4733
|
g("dictChange", t.modelValue);
|
|
4732
4734
|
return;
|
|
4733
4735
|
}
|
|
4734
|
-
const
|
|
4735
|
-
g("dictChange",
|
|
4736
|
+
const x = B.list.find((f) => f[l.format.value] === t.modelValue);
|
|
4737
|
+
g("dictChange", x);
|
|
4736
4738
|
}, 0);
|
|
4737
|
-
},
|
|
4739
|
+
}, B = reactive({
|
|
4738
4740
|
list: []
|
|
4739
4741
|
}), y = async () => {
|
|
4740
4742
|
if (!s.value || u.value && u.value.length > 0)
|
|
4741
4743
|
return;
|
|
4742
|
-
let
|
|
4744
|
+
let E = [];
|
|
4743
4745
|
if (typeof s.value == "object") {
|
|
4744
|
-
|
|
4745
|
-
const
|
|
4746
|
-
|
|
4747
|
-
const { filters: f, filterType: p = l.format.value, reverse:
|
|
4748
|
-
|
|
4746
|
+
D.value = s.value.type;
|
|
4747
|
+
const x = await store.actions.getDictDataObj(D.value);
|
|
4748
|
+
E = [].concat(x[D.value]);
|
|
4749
|
+
const { filters: f, filterType: p = l.format.value, reverse: _ = !1 } = s.value, F = typeof f == "string" ? f.split(",") : f;
|
|
4750
|
+
_ ? E = E.filter((k) => !F.includes(k[p])) : E = E.filter((k) => F.includes(k[p]));
|
|
4749
4751
|
} else {
|
|
4750
|
-
|
|
4751
|
-
const
|
|
4752
|
-
|
|
4752
|
+
D.value = s.value;
|
|
4753
|
+
const x = await store.actions.getDictDataObj(D.value);
|
|
4754
|
+
E = [].concat(x[D.value]);
|
|
4753
4755
|
}
|
|
4754
|
-
if (w.value && (
|
|
4755
|
-
|
|
4756
|
-
...
|
|
4757
|
-
[l.format.disabled]: b.value(
|
|
4756
|
+
if (w.value && (E = w.value(E)), b.value)
|
|
4757
|
+
E = E.map((x) => ({
|
|
4758
|
+
...x,
|
|
4759
|
+
[l.format.disabled]: b.value(x)
|
|
4758
4760
|
}));
|
|
4759
4761
|
else if (c.value) {
|
|
4760
|
-
const { disabledValues:
|
|
4761
|
-
p ?
|
|
4762
|
-
const
|
|
4763
|
-
return
|
|
4764
|
-
}) :
|
|
4765
|
-
const
|
|
4766
|
-
return
|
|
4762
|
+
const { disabledValues: x, disabledType: f = l.format.value, reverse: p = !1 } = c.value, _ = typeof x == "string" ? x.split(",") : x;
|
|
4763
|
+
p ? E = E.map((F) => {
|
|
4764
|
+
const k = JSON.parse(JSON.stringify(F));
|
|
4765
|
+
return k[l.format.disabled] = !_.includes(k[f]) || k[l.format.disabled], k;
|
|
4766
|
+
}) : E = E.map((F) => {
|
|
4767
|
+
const k = JSON.parse(JSON.stringify(F));
|
|
4768
|
+
return k[l.format.disabled] = _.includes(k[f]) || k[l.format.disabled], k;
|
|
4767
4769
|
});
|
|
4768
4770
|
}
|
|
4769
|
-
a.value &&
|
|
4771
|
+
a.value && E.unshift({
|
|
4770
4772
|
[l.format.value]: "",
|
|
4771
4773
|
[l.format.label]: a.value
|
|
4772
|
-
}),
|
|
4773
|
-
},
|
|
4774
|
+
}), B.list = E;
|
|
4775
|
+
}, j = computed(() => store.state.isGettingDictTypes.includes(D.value)), V = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value);
|
|
4774
4776
|
watch(
|
|
4775
|
-
[
|
|
4776
|
-
([
|
|
4777
|
-
!
|
|
4778
|
-
[l.format.value]:
|
|
4779
|
-
[l.format.label]:
|
|
4780
|
-
[l.format.disabled]: !!
|
|
4781
|
-
...
|
|
4782
|
-
})) :
|
|
4783
|
-
[l.format.value]:
|
|
4784
|
-
[l.format.label]:
|
|
4785
|
-
})), a.value &&
|
|
4777
|
+
[j, V, A],
|
|
4778
|
+
([E, x, f]) => {
|
|
4779
|
+
!E && !x && f && f.length === 0 && y(), f.length > 0 && (B.list = JSON.parse(JSON.stringify(f)), B.list.length > 0 && (Object.prototype.toString.call(B.list[0]) === "[object Object]" ? B.list = B.list.map((_) => ({
|
|
4780
|
+
[l.format.value]: _[o.value.value],
|
|
4781
|
+
[l.format.label]: _[o.value.label],
|
|
4782
|
+
[l.format.disabled]: !!_[o.value.disabled],
|
|
4783
|
+
..._
|
|
4784
|
+
})) : B.list = B.list.map((_) => ({
|
|
4785
|
+
[l.format.value]: _,
|
|
4786
|
+
[l.format.label]: _
|
|
4787
|
+
})), a.value && B.list.unshift({
|
|
4786
4788
|
[l.format.value]: "",
|
|
4787
4789
|
[l.format.label]: a.value
|
|
4788
4790
|
})));
|
|
@@ -4791,27 +4793,27 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4791
4793
|
immediate: !0
|
|
4792
4794
|
}
|
|
4793
4795
|
);
|
|
4794
|
-
const
|
|
4795
|
-
return r({ getElTabsRef:
|
|
4796
|
+
const S = ref(null), O = () => S.value, I = ref([]);
|
|
4797
|
+
return r({ getElTabsRef: O, getElTabPaneRefs: () => I.value }), (E, x) => {
|
|
4796
4798
|
const f = resolveComponent("el-badge");
|
|
4797
4799
|
return openBlock(), createBlock(unref(ElTabs), mergeProps({
|
|
4798
4800
|
ref_key: "ElTabsRef",
|
|
4799
|
-
ref:
|
|
4801
|
+
ref: S,
|
|
4800
4802
|
class: "vue-element-dict-tabs"
|
|
4801
4803
|
}, m.value, { onTabClick: T }), {
|
|
4802
4804
|
default: withCtx(() => [
|
|
4803
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4805
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(B.list, (p) => (openBlock(), createBlock(unref(ElTabPane), mergeProps({
|
|
4804
4806
|
ref_for: !0,
|
|
4805
|
-
ref: (
|
|
4806
|
-
|
|
4807
|
+
ref: (_) => {
|
|
4808
|
+
_ && (I.value[E.index] = _);
|
|
4807
4809
|
},
|
|
4808
4810
|
disabled: p[unref(l).format.disabled],
|
|
4809
4811
|
label: p[unref(l).format.label],
|
|
4810
4812
|
key: p[unref(l).format.value],
|
|
4811
4813
|
name: p[unref(l).format.value]
|
|
4812
|
-
},
|
|
4814
|
+
}, C.value), createSlots({
|
|
4813
4815
|
default: withCtx(() => [
|
|
4814
|
-
renderSlot(
|
|
4816
|
+
renderSlot(E.$slots, p[unref(l).format.value] ? "tabs-item-" + p[unref(l).format.value] : "tabs-item")
|
|
4815
4817
|
]),
|
|
4816
4818
|
_: 2
|
|
4817
4819
|
}, [
|
|
@@ -4883,23 +4885,23 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4883
4885
|
const d = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: u, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), c = toRaw(store.state.dictConfig), v = reactive({
|
|
4884
4886
|
list: []
|
|
4885
4887
|
}), w = computed(() => {
|
|
4886
|
-
const y = JSON.parse(JSON.stringify(c.treeSetting)),
|
|
4887
|
-
valueField:
|
|
4888
|
-
labelField:
|
|
4889
|
-
childrenField:
|
|
4890
|
-
leafField:
|
|
4891
|
-
disabled:
|
|
4888
|
+
const y = JSON.parse(JSON.stringify(c.treeSetting)), j = d.props || {}, V = {
|
|
4889
|
+
valueField: j != null && j.value ? j.value : y.valueField,
|
|
4890
|
+
labelField: j != null && j.label ? j.label : y.labelField,
|
|
4891
|
+
childrenField: j != null && j.children ? j.children : y.childrenField,
|
|
4892
|
+
leafField: j != null && j.leaf ? j.leaf : y.leafField,
|
|
4893
|
+
disabled: j != null && j.disabled ? j.disabled : c.format.disabled
|
|
4892
4894
|
};
|
|
4893
|
-
return Object.assign(y,
|
|
4894
|
-
}), b = (y,
|
|
4895
|
-
for (let
|
|
4896
|
-
const
|
|
4897
|
-
if (
|
|
4898
|
-
delete
|
|
4895
|
+
return Object.assign(y, V);
|
|
4896
|
+
}), b = (y, j) => {
|
|
4897
|
+
for (let V = 0; V < y.length; V++) {
|
|
4898
|
+
const A = y[V];
|
|
4899
|
+
if (A[w.value.levelField] === j) {
|
|
4900
|
+
delete A[w.value.childrenField], A[w.value.leafField] = !0;
|
|
4899
4901
|
continue;
|
|
4900
4902
|
} else {
|
|
4901
|
-
const
|
|
4902
|
-
b(
|
|
4903
|
+
const O = A[w.value.childrenField];
|
|
4904
|
+
b(O, j);
|
|
4903
4905
|
}
|
|
4904
4906
|
}
|
|
4905
4907
|
}, m = async () => {
|
|
@@ -4908,69 +4910,69 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4908
4910
|
let y = [];
|
|
4909
4911
|
if (typeof a.value == "object") {
|
|
4910
4912
|
s.value = a.value.type;
|
|
4911
|
-
const
|
|
4912
|
-
y = [].concat(
|
|
4913
|
-
const { filters:
|
|
4914
|
-
|
|
4913
|
+
const j = await store.actions.getDictDataObj(s.value);
|
|
4914
|
+
y = [].concat(j[s.value]);
|
|
4915
|
+
const { filters: V, filterType: A = c.format.value, reverse: S = !1 } = a.value, O = typeof V == "string" ? V.split(",") : V;
|
|
4916
|
+
S ? y = y.filter((I) => !O.includes(I[A])) : y = y.filter((I) => O.includes(I[A]));
|
|
4915
4917
|
} else {
|
|
4916
4918
|
s.value = a.value;
|
|
4917
|
-
const
|
|
4918
|
-
y = [].concat(
|
|
4919
|
+
const j = await store.actions.getDictDataObj(s.value);
|
|
4920
|
+
y = [].concat(j[s.value]);
|
|
4919
4921
|
}
|
|
4920
4922
|
if (o.value && (y = o.value(y)), i.value)
|
|
4921
|
-
y = y.map((
|
|
4922
|
-
...
|
|
4923
|
-
[c.format.disabled]: i.value(
|
|
4923
|
+
y = y.map((j) => ({
|
|
4924
|
+
...j,
|
|
4925
|
+
[c.format.disabled]: i.value(j)
|
|
4924
4926
|
}));
|
|
4925
4927
|
else if (u.value) {
|
|
4926
|
-
const { disabledValues:
|
|
4927
|
-
|
|
4928
|
-
const I = JSON.parse(JSON.stringify(
|
|
4929
|
-
return I[c.format.disabled] = !
|
|
4930
|
-
}) : y = y.map((
|
|
4931
|
-
const I = JSON.parse(JSON.stringify(
|
|
4932
|
-
return I[c.format.disabled] =
|
|
4928
|
+
const { disabledValues: j, disabledType: V = c.treeSetting.valueField, reverse: A = !1 } = u.value, S = typeof j == "string" ? j.split(",") : j;
|
|
4929
|
+
A ? y = y.map((O) => {
|
|
4930
|
+
const I = JSON.parse(JSON.stringify(O));
|
|
4931
|
+
return I[c.format.disabled] = !S.includes(I[V]) || I[c.format.disabled], I;
|
|
4932
|
+
}) : y = y.map((O) => {
|
|
4933
|
+
const I = JSON.parse(JSON.stringify(O));
|
|
4934
|
+
return I[c.format.disabled] = S.includes(I[V]) || I[c.format.disabled], I;
|
|
4933
4935
|
});
|
|
4934
4936
|
}
|
|
4935
4937
|
v.list = y;
|
|
4936
|
-
},
|
|
4937
|
-
const y = store.state.dictConfig.treeSetting,
|
|
4938
|
+
}, C = computed(() => store.state.isGettingDictTypes.includes(s.value)), D = computed(() => store.state.isGettingAllDictTypes), l = computed(() => {
|
|
4939
|
+
const y = store.state.dictConfig.treeSetting, j = store.state.dictConfig.format, V = d.props ?? {};
|
|
4938
4940
|
return {
|
|
4939
|
-
disabled: (
|
|
4940
|
-
label: (
|
|
4941
|
-
children: (
|
|
4942
|
-
isLeaf: (
|
|
4941
|
+
disabled: (V == null ? void 0 : V.disabled) ?? j.disabled,
|
|
4942
|
+
label: (V == null ? void 0 : V.label) ?? y.labelField,
|
|
4943
|
+
children: (V == null ? void 0 : V.children) ?? y.childrenField,
|
|
4944
|
+
isLeaf: (V == null ? void 0 : V.leaf) ?? y.leafField
|
|
4943
4945
|
};
|
|
4944
4946
|
}), g = computed(() => {
|
|
4945
4947
|
if (v.list.length === 0)
|
|
4946
4948
|
return [];
|
|
4947
|
-
const y = JSON.parse(JSON.stringify(v.list)).map((
|
|
4948
|
-
id:
|
|
4949
|
-
...
|
|
4949
|
+
const y = JSON.parse(JSON.stringify(v.list)).map((V) => ({
|
|
4950
|
+
id: V[w.value.valueField],
|
|
4951
|
+
...V
|
|
4950
4952
|
}));
|
|
4951
|
-
let
|
|
4952
|
-
return n.value && b(
|
|
4953
|
+
let j = ListToTree(y, w.value);
|
|
4954
|
+
return n.value && b(j, +n.value), j;
|
|
4953
4955
|
});
|
|
4954
4956
|
watch(
|
|
4955
|
-
[
|
|
4956
|
-
([y,
|
|
4957
|
-
!y && !
|
|
4957
|
+
[C, D],
|
|
4958
|
+
([y, j]) => {
|
|
4959
|
+
!y && !j && m();
|
|
4958
4960
|
},
|
|
4959
4961
|
{
|
|
4960
4962
|
immediate: !0
|
|
4961
4963
|
}
|
|
4962
4964
|
);
|
|
4963
4965
|
const T = ref(null);
|
|
4964
|
-
return r({ getElTreeRef: () => T.value }), (y,
|
|
4966
|
+
return r({ getElTreeRef: () => T.value }), (y, j) => (openBlock(), createBlock(unref(ElTree), mergeProps({
|
|
4965
4967
|
ref_key: "ElTreeRef",
|
|
4966
4968
|
ref: T,
|
|
4967
4969
|
data: g.value,
|
|
4968
4970
|
props: l.value
|
|
4969
4971
|
}, y.$attrs), createSlots({ _: 2 }, [
|
|
4970
|
-
renderList(y.$slots, (
|
|
4971
|
-
name:
|
|
4972
|
-
fn: withCtx((
|
|
4973
|
-
renderSlot(y.$slots,
|
|
4972
|
+
renderList(y.$slots, (V, A, S) => ({
|
|
4973
|
+
name: A,
|
|
4974
|
+
fn: withCtx((O) => [
|
|
4975
|
+
renderSlot(y.$slots, A, mergeProps({ key: S }, O))
|
|
4974
4976
|
])
|
|
4975
4977
|
}))
|
|
4976
4978
|
]), 1040, ["data", "props"]));
|
|
@@ -5017,17 +5019,17 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5017
5019
|
valueField: "value",
|
|
5018
5020
|
childrenField: "children",
|
|
5019
5021
|
leafField: s.treeSetting.leafField
|
|
5020
|
-
},
|
|
5021
|
-
return Object.assign(
|
|
5022
|
-
}), w = (T,
|
|
5022
|
+
}, B = JSON.parse(JSON.stringify(s.treeSetting));
|
|
5023
|
+
return Object.assign(B, T);
|
|
5024
|
+
}), w = (T, B) => {
|
|
5023
5025
|
for (let y = 0; y < T.length; y++) {
|
|
5024
|
-
const
|
|
5025
|
-
if (
|
|
5026
|
-
delete
|
|
5026
|
+
const j = T[y];
|
|
5027
|
+
if (j[v.value.levelField] === B) {
|
|
5028
|
+
delete j[v.value.childrenField], j[v.value.leafField] = !0;
|
|
5027
5029
|
continue;
|
|
5028
5030
|
} else {
|
|
5029
|
-
const
|
|
5030
|
-
w(
|
|
5031
|
+
const A = j[v.value.childrenField];
|
|
5032
|
+
w(A, B);
|
|
5031
5033
|
}
|
|
5032
5034
|
}
|
|
5033
5035
|
}, b = async () => {
|
|
@@ -5036,60 +5038,60 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5036
5038
|
let T = [];
|
|
5037
5039
|
if (typeof n.value == "object") {
|
|
5038
5040
|
i.value = n.value.type;
|
|
5039
|
-
const
|
|
5040
|
-
T = [].concat(
|
|
5041
|
-
const { filters: y, filterType:
|
|
5042
|
-
|
|
5041
|
+
const B = await store.actions.getDictDataObj(i.value);
|
|
5042
|
+
T = [].concat(B[i.value]);
|
|
5043
|
+
const { filters: y, filterType: j = s.format.value, reverse: V = !1 } = n.value, A = typeof y == "string" ? y.split(",") : y;
|
|
5044
|
+
V ? T = T.filter((S) => !A.includes(S[j])) : T = T.filter((S) => A.includes(S[j]));
|
|
5043
5045
|
} else {
|
|
5044
5046
|
i.value = n.value;
|
|
5045
|
-
const
|
|
5046
|
-
T = [].concat(
|
|
5047
|
+
const B = await store.actions.getDictDataObj(i.value);
|
|
5048
|
+
T = [].concat(B[i.value]);
|
|
5047
5049
|
}
|
|
5048
5050
|
if (u.value && (T = u.value(T)), o.value)
|
|
5049
|
-
T = T.map((
|
|
5050
|
-
...
|
|
5051
|
-
[s.format.disabled]: o.value(
|
|
5051
|
+
T = T.map((B) => ({
|
|
5052
|
+
...B,
|
|
5053
|
+
[s.format.disabled]: o.value(B)
|
|
5052
5054
|
}));
|
|
5053
5055
|
else if (a.value) {
|
|
5054
|
-
const { disabledValues:
|
|
5055
|
-
|
|
5056
|
-
const
|
|
5057
|
-
return
|
|
5058
|
-
}) : T = T.map((
|
|
5059
|
-
const
|
|
5060
|
-
return
|
|
5056
|
+
const { disabledValues: B, disabledType: y = s.treeSetting.valueField, reverse: j = !1 } = a.value, V = typeof B == "string" ? B.split(",") : B;
|
|
5057
|
+
j ? T = T.map((A) => {
|
|
5058
|
+
const S = JSON.parse(JSON.stringify(A));
|
|
5059
|
+
return S[s.format.disabled] = !V.includes(S[y]) || S[s.format.disabled], S;
|
|
5060
|
+
}) : T = T.map((A) => {
|
|
5061
|
+
const S = JSON.parse(JSON.stringify(A));
|
|
5062
|
+
return S[s.format.disabled] = V.includes(S[y]) || S[s.format.disabled], S;
|
|
5061
5063
|
});
|
|
5062
5064
|
}
|
|
5063
5065
|
c.list = T;
|
|
5064
|
-
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)),
|
|
5066
|
+
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)), C = computed(() => store.state.isGettingAllDictTypes), D = computed(() => {
|
|
5065
5067
|
const T = JSON.parse(JSON.stringify(c.list)).map((y) => ({
|
|
5066
5068
|
label: y[v.value.labelField],
|
|
5067
5069
|
value: y[v.value.valueField],
|
|
5068
5070
|
children: y[v.value.childrenField],
|
|
5069
5071
|
...y
|
|
5070
5072
|
}));
|
|
5071
|
-
let
|
|
5072
|
-
return t.value && w(
|
|
5073
|
+
let B = ListToTree(T, v.value);
|
|
5074
|
+
return t.value && w(B, +t.value), B;
|
|
5073
5075
|
});
|
|
5074
5076
|
watch(
|
|
5075
|
-
[m,
|
|
5076
|
-
([T,
|
|
5077
|
-
!T && !
|
|
5077
|
+
[m, C],
|
|
5078
|
+
([T, B]) => {
|
|
5079
|
+
!T && !B && b();
|
|
5078
5080
|
},
|
|
5079
5081
|
{
|
|
5080
5082
|
immediate: !0
|
|
5081
5083
|
}
|
|
5082
5084
|
);
|
|
5083
5085
|
const l = ref(null);
|
|
5084
|
-
return r({ getElTreeSelectRef: () => l.value }), (T,
|
|
5086
|
+
return r({ getElTreeSelectRef: () => l.value }), (T, B) => (openBlock(), createBlock(unref(ElTreeSelect), mergeProps({
|
|
5085
5087
|
ref_key: "ElTreeSelectRef",
|
|
5086
5088
|
ref: l,
|
|
5087
|
-
data:
|
|
5089
|
+
data: D.value
|
|
5088
5090
|
}, T.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
5089
|
-
renderList(T.$slots, (y,
|
|
5090
|
-
name:
|
|
5091
|
-
fn: withCtx((
|
|
5092
|
-
renderSlot(T.$slots,
|
|
5091
|
+
renderList(T.$slots, (y, j, V) => ({
|
|
5092
|
+
name: j,
|
|
5093
|
+
fn: withCtx((A) => [
|
|
5094
|
+
renderSlot(T.$slots, j, mergeProps({ key: V }, A))
|
|
5093
5095
|
])
|
|
5094
5096
|
}))
|
|
5095
5097
|
]), 1040, ["data"]));
|
|
@@ -5234,13 +5236,13 @@ let vue3ElementDict = {
|
|
|
5234
5236
|
async install(e, r) {
|
|
5235
5237
|
var b, m;
|
|
5236
5238
|
const d = console.warn;
|
|
5237
|
-
console.warn = (...
|
|
5238
|
-
const
|
|
5239
|
-
|
|
5239
|
+
console.warn = (...C) => {
|
|
5240
|
+
const D = typeof C[0] == "string" ? C[0] : "";
|
|
5241
|
+
D.includes("formItemContextKey") || D.includes("formContextKey") || d.apply(console, C);
|
|
5240
5242
|
};
|
|
5241
5243
|
const t = e.config.warnHandler;
|
|
5242
|
-
e.config.warnHandler = (
|
|
5243
|
-
typeof
|
|
5244
|
+
e.config.warnHandler = (C, D, l) => {
|
|
5245
|
+
typeof C == "string" && (C.includes("formItemContextKey") || C.includes("formContextKey")) || t == null || t(C, D, l);
|
|
5244
5246
|
};
|
|
5245
5247
|
const n = {
|
|
5246
5248
|
timeout: 3e4,
|
|
@@ -5278,9 +5280,9 @@ let vue3ElementDict = {
|
|
|
5278
5280
|
getLoginStatusFunc: () => !0,
|
|
5279
5281
|
loginStatusChangeFunc: null,
|
|
5280
5282
|
//组件过滤数据 配置
|
|
5281
|
-
filterDataFun: (
|
|
5283
|
+
filterDataFun: (C) => C,
|
|
5282
5284
|
//组件禁用数据 配置
|
|
5283
|
-
disabledDataFun: (
|
|
5285
|
+
disabledDataFun: (C) => !1,
|
|
5284
5286
|
//配置数组数据转化成树形数据
|
|
5285
5287
|
treeSetting: {
|
|
5286
5288
|
idField: "id",
|
|
@@ -5316,9 +5318,9 @@ let vue3ElementDict = {
|
|
|
5316
5318
|
type: "type",
|
|
5317
5319
|
color: "color"
|
|
5318
5320
|
},
|
|
5319
|
-
formatterRequest: (
|
|
5320
|
-
formatterDictList: (
|
|
5321
|
-
formatterDictVersion: (
|
|
5321
|
+
formatterRequest: (C, D) => D ? { [C]: D } : { [C]: "" },
|
|
5322
|
+
formatterDictList: (C, D) => !C || !C.dictData ? {} : C.dictData,
|
|
5323
|
+
formatterDictVersion: (C) => !C || !C.version ? "unknow" : C.version,
|
|
5322
5324
|
version: "unknow",
|
|
5323
5325
|
storage: localStorage,
|
|
5324
5326
|
isGetAll: !1,
|
|
@@ -5332,10 +5334,10 @@ let vue3ElementDict = {
|
|
|
5332
5334
|
store.mutations.SET_DICT_SETTING(a);
|
|
5333
5335
|
let u = {};
|
|
5334
5336
|
try {
|
|
5335
|
-
const
|
|
5336
|
-
u =
|
|
5337
|
-
} catch (
|
|
5338
|
-
u = {}, console.log(
|
|
5337
|
+
const C = a.storage.getItem(a.dictDataKey);
|
|
5338
|
+
u = C ? JSON.parse(C) : {};
|
|
5339
|
+
} catch (C) {
|
|
5340
|
+
u = {}, console.log(C);
|
|
5339
5341
|
}
|
|
5340
5342
|
let o = JSON.parse(JSON.stringify(a.localDictCodes));
|
|
5341
5343
|
o = Object.assign(u, o);
|
|
@@ -5344,21 +5346,21 @@ let vue3ElementDict = {
|
|
|
5344
5346
|
const s = a.storage.getItem(a.versionKey);
|
|
5345
5347
|
let c = a.usuallyGetDictTypes ? a.usuallyGetDictTypes.split(",") : [];
|
|
5346
5348
|
if (a.version !== s) {
|
|
5347
|
-
const
|
|
5348
|
-
let
|
|
5349
|
+
const C = a.storage.getItem(a.dictDataKey);
|
|
5350
|
+
let D = {};
|
|
5349
5351
|
try {
|
|
5350
|
-
|
|
5352
|
+
D = C ? JSON.parse(C) : {};
|
|
5351
5353
|
} catch {
|
|
5352
|
-
|
|
5354
|
+
D = {}, console.error();
|
|
5353
5355
|
}
|
|
5354
|
-
const l =
|
|
5355
|
-
c = [...new Set(
|
|
5356
|
-
const y = JSON.parse(JSON.stringify(a.localDictCodes)),
|
|
5357
|
-
a.storage.setItem(a.dictDataKey, JSON.stringify(
|
|
5356
|
+
const l = D ? Object.keys(D) : [], g = a.localDictCodes ? Object.keys(a.localDictCodes) : [], T = l.filter((V) => !g.includes(V)), B = [...c, ...T];
|
|
5357
|
+
c = [...new Set(B)], a.storage.removeItem(a.dictDataKey), a.storage.setItem(a.versionKey, a.version);
|
|
5358
|
+
const y = JSON.parse(JSON.stringify(a.localDictCodes)), j = formatDictData(y, a.filterDataFun, a.disabledDataFun, (m = a == null ? void 0 : a.format) == null ? void 0 : m.disabled);
|
|
5359
|
+
a.storage.setItem(a.dictDataKey, JSON.stringify(j)), store.mutations.SET_DICT_CODES(j);
|
|
5358
5360
|
}
|
|
5359
|
-
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((
|
|
5360
|
-
const
|
|
5361
|
-
e.component(l,
|
|
5361
|
+
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((C) => {
|
|
5362
|
+
const D = C.name.slice(4), l = a.componentsPreFix + D;
|
|
5363
|
+
e.component(l, C);
|
|
5362
5364
|
});
|
|
5363
5365
|
const v = reactive({
|
|
5364
5366
|
hadLogin: computed(() => store.state.dictConfig.getLoginStatusFunc())
|
|
@@ -5366,8 +5368,8 @@ let vue3ElementDict = {
|
|
|
5366
5368
|
(() => {
|
|
5367
5369
|
loginWatcher && (loginWatcher(), loginWatcher = null), loginWatcher = watch(
|
|
5368
5370
|
() => v.hadLogin,
|
|
5369
|
-
(
|
|
5370
|
-
a.loginStatusChangeFunc && a.loginStatusChangeFunc(
|
|
5371
|
+
(C) => {
|
|
5372
|
+
a.loginStatusChangeFunc && a.loginStatusChangeFunc(C), C && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c);
|
|
5371
5373
|
},
|
|
5372
5374
|
{ immediate: !1 }
|
|
5373
5375
|
);
|