vue3-element-dict 3.2.4 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +582 -596
- package/package.json +1 -1
package/lib/vue3-element-dict.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive, defineComponent, toRefs, toRaw, useAttrs, computed, ref, watchEffect, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, createTextVNode, toDisplayString, renderList, renderSlot, watch, h, createElementBlock, Fragment, createCommentVNode, resolveDynamicComponent, onMounted, normalizeStyle, normalizeClass, normalizeProps, guardReactiveProps, inject, createVNode, resolveComponent, nextTick, provide, onUnmounted, withDirectives, vShow } from "vue";
|
|
2
2
|
import { ElButton, ElCascader, ElCheckTag, formItemContextKey, formContextKey, ElCheckboxGroup, ElCheckboxButton, ElCheckbox, ElTag, ElLink, ElText, ElDescriptions, ElDescriptionsItem, ElTableColumn, ElTable, ElForm, ElFormItem, ElIcon, ElInput, ElRadioGroup, ElRadioButton, ElRadio, ElSelect, ElOption, ElTabs, ElTabPane, ElTree, ElTreeSelect } from "element-plus";
|
|
3
|
-
import { ArrowDown
|
|
3
|
+
import { ArrowDown } from "@element-plus/icons-vue";
|
|
4
4
|
const formatDictData = (e, r, d, t) => {
|
|
5
5
|
const n = {};
|
|
6
6
|
for (let a in e)
|
|
@@ -12,31 +12,31 @@ const formatDictData = (e, r, d, t) => {
|
|
|
12
12
|
};
|
|
13
13
|
function sortComponentsByIdDependencies(e) {
|
|
14
14
|
const r = (_) => {
|
|
15
|
-
const
|
|
15
|
+
const C = /* @__PURE__ */ new Set(), l = /\$\{(\w+)\}/g;
|
|
16
16
|
let g;
|
|
17
17
|
for (; (g = l.exec(_)) !== null; )
|
|
18
|
-
|
|
19
|
-
return Array.from(
|
|
18
|
+
C.add(g[1]);
|
|
19
|
+
return Array.from(C);
|
|
20
20
|
}, d = (_) => {
|
|
21
|
-
const
|
|
22
|
-
typeof g == "string" ? r(g).forEach((T) =>
|
|
21
|
+
const C = /* @__PURE__ */ new Set(), l = (g) => {
|
|
22
|
+
typeof g == "string" ? r(g).forEach((T) => C.add(T)) : Array.isArray(g) ? g.forEach(l) : g && typeof g == "object" && Object.values(g).forEach(l);
|
|
23
23
|
};
|
|
24
|
-
return l(_), Array.from(
|
|
24
|
+
return l(_), Array.from(C);
|
|
25
25
|
}, t = (_) => {
|
|
26
|
-
const { showRuleType:
|
|
27
|
-
return l == null ? [] : (
|
|
26
|
+
const { showRuleType: C, showRules: l } = _, g = /* @__PURE__ */ new Set();
|
|
27
|
+
return l == null ? [] : (C === "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(
|
|
29
|
+
}) : ["compare", "calculate", ""].includes(C) ? d(l).forEach((T) => g.add(T)) : typeof C == "string" && Array.isArray(l) && l.forEach((T) => {
|
|
30
30
|
T && typeof T == "object" && "rules" in T && d(T.rules).forEach((E) => g.add(E));
|
|
31
31
|
}), Array.from(g));
|
|
32
32
|
}, n = (_) => {
|
|
33
|
-
const { validatorRuleType:
|
|
33
|
+
const { validatorRuleType: C, props: l } = _, 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
37
|
const E = T.validator;
|
|
38
|
-
E != null && (["compare", "calculate", "", void 0].includes(
|
|
39
|
-
y && typeof y == "object" && "rules" in y && d(y.rules).forEach((
|
|
38
|
+
E != null && (["compare", "calculate", "", void 0].includes(C) ? d(E).forEach((y) => g.add(y)) : typeof C == "string" && Array.isArray(E) && E.forEach((y) => {
|
|
39
|
+
y && typeof y == "object" && "rules" in y && d(y.rules).forEach((x) => g.add(x));
|
|
40
40
|
}));
|
|
41
41
|
}), Array.from(g)) : [];
|
|
42
42
|
}, a = /* @__PURE__ */ new Map();
|
|
@@ -44,7 +44,7 @@ function sortComponentsByIdDependencies(e) {
|
|
|
44
44
|
_.fieldName && _.id && a.set(_.fieldName, _.id);
|
|
45
45
|
});
|
|
46
46
|
const u = e.map((_) => {
|
|
47
|
-
const
|
|
47
|
+
const C = t(_), l = n(_), T = [.../* @__PURE__ */ new Set([...C, ...l])].map((E) => a.get(E)).filter((E) => E !== void 0 && e.some((y) => y.id === E));
|
|
48
48
|
return {
|
|
49
49
|
id: _.id,
|
|
50
50
|
component: _,
|
|
@@ -52,29 +52,29 @@ function sortComponentsByIdDependencies(e) {
|
|
|
52
52
|
// 该组件id依赖的其他id数组
|
|
53
53
|
};
|
|
54
54
|
}), o = new Set(u.map((_) => _.id)), i = /* @__PURE__ */ new Map();
|
|
55
|
-
u.forEach(({ id: _ },
|
|
56
|
-
i.set(_,
|
|
55
|
+
u.forEach(({ id: _ }, C) => {
|
|
56
|
+
i.set(_, C);
|
|
57
57
|
});
|
|
58
58
|
const s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
59
59
|
o.forEach((_) => {
|
|
60
60
|
s.set(_, []), c.set(_, 0);
|
|
61
|
-
}), u.forEach(({ id: _, depsIds:
|
|
62
|
-
|
|
61
|
+
}), u.forEach(({ id: _, depsIds: C }) => {
|
|
62
|
+
C.forEach((l) => {
|
|
63
63
|
s.get(l).push(_), c.set(_, c.get(_) + 1);
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
-
const v = [...o].filter((_) => c.get(_) === 0).sort((_,
|
|
66
|
+
const v = [...o].filter((_) => c.get(_) === 0).sort((_, C) => i.get(_) - i.get(C)), w = [];
|
|
67
67
|
for (; v.length > 0; ) {
|
|
68
68
|
const _ = v.shift();
|
|
69
|
-
w.push(_), s.get(_).forEach((
|
|
70
|
-
if (c.set(
|
|
71
|
-
const l = v.findIndex((g) => i.get(g) > i.get(
|
|
72
|
-
l === -1 ? v.push(
|
|
69
|
+
w.push(_), s.get(_).forEach((C) => {
|
|
70
|
+
if (c.set(C, c.get(C) - 1), c.get(C) === 0) {
|
|
71
|
+
const l = v.findIndex((g) => i.get(g) > i.get(C));
|
|
72
|
+
l === -1 ? v.push(C) : v.splice(l, 0, C);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
const b = [...o].filter((_) => !w.includes(_));
|
|
77
|
-
b.sort((_,
|
|
77
|
+
b.sort((_, C) => i.get(_) - i.get(C)), w.push(...b);
|
|
78
78
|
const m = new Map(e.map((_) => [_.id, _]));
|
|
79
79
|
return w.map((_) => m.get(_));
|
|
80
80
|
}
|
|
@@ -223,36 +223,36 @@ const actions = {
|
|
|
223
223
|
formatterDictVersion: b,
|
|
224
224
|
isGetAll: m,
|
|
225
225
|
filterDataFun: _,
|
|
226
|
-
disabledDataFun:
|
|
226
|
+
disabledDataFun: C,
|
|
227
227
|
format: l
|
|
228
228
|
} = state.dictConfig, g = state.dictCodes || v, T = !t && t !== 0 ? e : state.isGettingDictTypes.join(",");
|
|
229
229
|
u(i(s, T)).then((E) => {
|
|
230
230
|
mutations.REMOVE_IS_GETTING_DICT_TYPES(T);
|
|
231
|
-
const y = b(E),
|
|
232
|
-
if (y !==
|
|
231
|
+
const y = b(E), x = n.getItem(c);
|
|
232
|
+
if (y !== x) {
|
|
233
233
|
let N = "";
|
|
234
234
|
if (m)
|
|
235
235
|
N = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
236
236
|
else {
|
|
237
237
|
if (o) {
|
|
238
|
-
const j = Object.keys(g),
|
|
239
|
-
let
|
|
240
|
-
|
|
238
|
+
const j = Object.keys(g), F = o.split(","), B = Object.keys(v), I = j.filter((f) => !B.includes(f)), G = F.filter((f) => B.includes(f) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${f}冲突`), !1) : !0);
|
|
239
|
+
let D = I.concat(G);
|
|
240
|
+
D = D.concat(T.split(",")), N = Array.from(new Set(D)).join(",");
|
|
241
241
|
} else {
|
|
242
|
-
const j = Object.keys(g),
|
|
243
|
-
let B = j.filter((G) => !
|
|
242
|
+
const j = Object.keys(g), F = Object.keys(v);
|
|
243
|
+
let B = j.filter((G) => !F.includes(G));
|
|
244
244
|
B = B.concat(T.split(",")), N = Array.from(new Set(B)).join(",");
|
|
245
245
|
}
|
|
246
246
|
mutations.ADD_IS_GETTING_DICT_TYPES(N);
|
|
247
247
|
}
|
|
248
248
|
u(i(s, N)).then((j) => {
|
|
249
|
-
const
|
|
250
|
-
if (!(
|
|
249
|
+
const F = w(j, e);
|
|
250
|
+
if (!(F[e] && F[e].length > 0)) {
|
|
251
251
|
d(`不存在类型为:${e} 的字典字段,请确认后再填写`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
255
|
-
const B = b(j), I = Object.assign(JSON.parse(JSON.stringify(v)),
|
|
255
|
+
const B = b(j), I = Object.assign(JSON.parse(JSON.stringify(v)), F), G = formatDictData(I, _, C, l == null ? void 0 : l.disabled);
|
|
256
256
|
n.setItem(a, JSON.stringify(G)), n.setItem(c, B), mutations.SET_DICT_CODES(G), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(N);
|
|
257
257
|
});
|
|
258
258
|
} else {
|
|
@@ -262,8 +262,8 @@ const actions = {
|
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
mutations.REMOVE_UNFIND_DICT_TYPES(T);
|
|
265
|
-
const j = state.dictCodes || v,
|
|
266
|
-
Object.assign(j,
|
|
265
|
+
const j = state.dictCodes || v, F = formatDictData(N, _, C, l == null ? void 0 : l.disabled);
|
|
266
|
+
Object.assign(j, F), n.setItem(a, JSON.stringify(j)), mutations.SET_DICT_CODES(j), r(state.dictCodes);
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
});
|
|
@@ -585,19 +585,19 @@ 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), _ = toRaw(store.state.dictConfig),
|
|
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), _ = toRaw(store.state.dictConfig), C = d, l = useAttrs(), g = computed(() => s.value ? s.value(o.value) : c.value ? c.value : y.value && y.value[_.format.type] ? y.value[_.format.type] : "primary"), T = computed(() => v != null && v.value ? v.value(o.value) : w != null && w.value ? w.value : y.value && y.value[_.format.color] ? y.value[_.format.color] : ""), E = computed(() => b.value ? b.value(o.value) : y.value && y.value[_.format.disabled] ? y.value[_.format.disabled] : !!m.value);
|
|
589
|
+
let y = ref(null), x = ref(null);
|
|
590
590
|
watchEffect(() => {
|
|
591
591
|
if (!i.value) {
|
|
592
|
-
|
|
592
|
+
x.value = o.value;
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
595
|
GetItemByCode(o.value, i.value).then((B) => {
|
|
596
|
-
B ? (y.value = B,
|
|
596
|
+
B ? (y.value = B, x.value = B[_.format.label]) : (y.value = null, x.value = String(a.value ?? (o.value === 0 ? 0 : o.value || u.value)));
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
const N = () => {
|
|
600
|
-
E.value ||
|
|
600
|
+
E.value || C(n.value, l);
|
|
601
601
|
}, j = ref(null);
|
|
602
602
|
return r({ getElButtonRef: () => j.value }), (B, I) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
603
603
|
ref_key: "ElButtonRef",
|
|
@@ -607,14 +607,14 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
607
607
|
disabled: E.value
|
|
608
608
|
}, B.$attrs, { onClick: N }), createSlots({
|
|
609
609
|
default: withCtx(() => [
|
|
610
|
-
createTextVNode(toDisplayString(unref(
|
|
610
|
+
createTextVNode(toDisplayString(unref(x)), 1)
|
|
611
611
|
]),
|
|
612
612
|
_: 2
|
|
613
613
|
}, [
|
|
614
|
-
renderList(B.$slots, (G,
|
|
615
|
-
name:
|
|
614
|
+
renderList(B.$slots, (G, D, A) => ({
|
|
615
|
+
name: D,
|
|
616
616
|
fn: withCtx((f) => [
|
|
617
|
-
renderSlot(B.$slots,
|
|
617
|
+
renderSlot(B.$slots, D, mergeProps({ key: A }, f))
|
|
618
618
|
])
|
|
619
619
|
}))
|
|
620
620
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -771,15 +771,15 @@ 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) => {
|
|
775
|
+
if (C instanceof Date)
|
|
776
|
+
return C.getTime();
|
|
777
|
+
if (typeof C == "string" && /^\d{4}[-/]\d{2}[-/]\d{2}(?:\s+\d{2}:\d{2}:\d{2})?$/.test(C)) {
|
|
778
|
+
const g = new Date(C);
|
|
779
779
|
if (!isNaN(g.getTime()))
|
|
780
780
|
return g.getTime();
|
|
781
781
|
}
|
|
782
|
-
return
|
|
782
|
+
return C;
|
|
783
783
|
};
|
|
784
784
|
if (typeof b == "string" && /^\$\{(.+?)\}$/.test(b)) {
|
|
785
785
|
const l = b.match(/^\$\{(.+?)\}$/)[1].trim().split(".").filter(Boolean);
|
|
@@ -796,12 +796,12 @@ function ValidateNestedRule(e, r) {
|
|
|
796
796
|
}, a = (b, m) => {
|
|
797
797
|
var _;
|
|
798
798
|
if (Array.isArray(b)) {
|
|
799
|
-
let
|
|
799
|
+
let C = Array.isArray(b[0]) ? a(b[0], m) : n(b[0], m);
|
|
800
800
|
for (let l = 1; l < b.length; l += 2) {
|
|
801
|
-
const g = b[l], T = b[l + 1], E = Array.isArray(T) ? a(T, m) : n(T, m), y = typeof
|
|
802
|
-
|
|
801
|
+
const g = b[l], T = b[l + 1], E = Array.isArray(T) ? a(T, m) : n(T, m), y = typeof C == "number" ? C : NaN, x = typeof E == "number" ? E : NaN;
|
|
802
|
+
C = ((_ = d[g]) == null ? void 0 : _.call(d, y, x)) ?? NaN;
|
|
803
803
|
}
|
|
804
|
-
return
|
|
804
|
+
return C;
|
|
805
805
|
}
|
|
806
806
|
return n(b, m);
|
|
807
807
|
};
|
|
@@ -936,11 +936,11 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
936
936
|
const w = new DOMParser().parseFromString(s, "text/html"), b = w.getElementsByTagName("*");
|
|
937
937
|
return Array.from(b).forEach((m) => {
|
|
938
938
|
Array.from(m.attributes).forEach((_) => {
|
|
939
|
-
let
|
|
939
|
+
let C;
|
|
940
940
|
if (_.name.startsWith(":"))
|
|
941
|
-
|
|
941
|
+
C = _.name.slice(1);
|
|
942
942
|
else if (_.name.startsWith("v-bind:"))
|
|
943
|
-
|
|
943
|
+
C = _.name.slice(7);
|
|
944
944
|
else
|
|
945
945
|
return;
|
|
946
946
|
const l = _.value;
|
|
@@ -951,10 +951,10 @@ 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(C);
|
|
955
955
|
else {
|
|
956
|
-
const T =
|
|
957
|
-
m.setAttribute(
|
|
956
|
+
const T = C === "class" ? a(g) : String(g);
|
|
957
|
+
m.setAttribute(C, T);
|
|
958
958
|
}
|
|
959
959
|
m.removeAttribute(_.name);
|
|
960
960
|
});
|
|
@@ -1024,86 +1024,86 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1024
1024
|
emits: ["submit", "reset", "action"],
|
|
1025
1025
|
setup(e, { expose: r, emit: d }) {
|
|
1026
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), _ = useAttrs();
|
|
1027
|
-
let
|
|
1027
|
+
let C = ref("");
|
|
1028
1028
|
const l = computed(() => {
|
|
1029
|
-
const
|
|
1030
|
-
return Object.entries(_).forEach(([
|
|
1031
|
-
const p = ToKebabCase(
|
|
1029
|
+
const D = {};
|
|
1030
|
+
return Object.entries(_).forEach(([A, f]) => {
|
|
1031
|
+
const p = ToKebabCase(A);
|
|
1032
1032
|
if (p.startsWith("button-") || p.startsWith("on-button")) {
|
|
1033
1033
|
const k = ToCamelCase(p.replace("button-", ""));
|
|
1034
|
-
|
|
1034
|
+
D[k] = f;
|
|
1035
1035
|
}
|
|
1036
|
-
}),
|
|
1036
|
+
}), D;
|
|
1037
1037
|
}), g = computed(() => {
|
|
1038
|
-
const
|
|
1039
|
-
return `calc(${
|
|
1038
|
+
const D = Number(w.value), A = 100 / D, f = Array.isArray(b.value) ? b.value : String(b.value).split(" "), p = f[0], S = (f[1] || p) * (D - 1) / D;
|
|
1039
|
+
return `calc(${A}% - ${S}px) !important`;
|
|
1040
1040
|
}), T = computed(() => {
|
|
1041
|
-
const
|
|
1042
|
-
return `${
|
|
1041
|
+
const D = Array.isArray(b.value) ? b.value : String(b.value).split(" "), A = D[0], f = D[1] || A;
|
|
1042
|
+
return `${A}px ${f}px`;
|
|
1043
1043
|
});
|
|
1044
|
-
function E(
|
|
1044
|
+
function E(D) {
|
|
1045
1045
|
return {
|
|
1046
1046
|
...l.value,
|
|
1047
|
-
...
|
|
1047
|
+
...D
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
const y = ref([]),
|
|
1050
|
+
const y = ref([]), x = async () => {
|
|
1051
1051
|
if (!o.value)
|
|
1052
1052
|
return;
|
|
1053
|
-
let
|
|
1053
|
+
let D = [];
|
|
1054
1054
|
if (typeof o.value == "object") {
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const { filters: f, filterType: p = m.format.value, reverse: k = !1 } = o.value,
|
|
1059
|
-
k ?
|
|
1055
|
+
C.value = o.value.type;
|
|
1056
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
1057
|
+
D = [].concat(A[C.value]);
|
|
1058
|
+
const { filters: f, filterType: p = m.format.value, reverse: k = !1 } = o.value, S = typeof f == "string" ? f.split(",") : f;
|
|
1059
|
+
k ? D = D.filter((O) => !S.includes(O[p])) : D = D.filter((O) => S.includes(O[p]));
|
|
1060
1060
|
} else {
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1061
|
+
C.value = o.value;
|
|
1062
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
1063
|
+
D = [].concat(A[C.value]);
|
|
1064
1064
|
}
|
|
1065
|
-
if (s.value && (
|
|
1066
|
-
|
|
1067
|
-
...
|
|
1068
|
-
[m.format.disabled]: c.value(
|
|
1065
|
+
if (s.value && (D = s.value(D)), c.value)
|
|
1066
|
+
D = D.map((A) => ({
|
|
1067
|
+
...A,
|
|
1068
|
+
[m.format.disabled]: c.value(A)
|
|
1069
1069
|
}));
|
|
1070
1070
|
else if (i.value) {
|
|
1071
|
-
const { disabledValues:
|
|
1072
|
-
p ?
|
|
1073
|
-
const O = JSON.parse(JSON.stringify(
|
|
1071
|
+
const { disabledValues: A, disabledType: f = m.format.value, reverse: p = !1 } = i.value, k = typeof A == "string" ? A.split(",") : A;
|
|
1072
|
+
p ? D = D.map((S) => {
|
|
1073
|
+
const O = JSON.parse(JSON.stringify(S));
|
|
1074
1074
|
return O[m.format.disabled] = !k.includes(O[f]) || O[m.format.disabled], O;
|
|
1075
|
-
}) :
|
|
1076
|
-
const O = JSON.parse(JSON.stringify(
|
|
1075
|
+
}) : D = D.map((S) => {
|
|
1076
|
+
const O = JSON.parse(JSON.stringify(S));
|
|
1077
1077
|
return O[m.format.disabled] = k.includes(O[f]) || O[m.format.disabled], O;
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
y.value =
|
|
1081
|
-
type:
|
|
1082
|
-
label:
|
|
1083
|
-
color:
|
|
1084
|
-
icon:
|
|
1085
|
-
disabled:
|
|
1080
|
+
y.value = D.map((A) => ({
|
|
1081
|
+
type: A[m.format.type],
|
|
1082
|
+
label: A[m.format.label],
|
|
1083
|
+
color: A[m.format.color],
|
|
1084
|
+
icon: A[m.format.icon],
|
|
1085
|
+
disabled: A[m.format.disabled],
|
|
1086
1086
|
actionType: "submit",
|
|
1087
|
-
...
|
|
1087
|
+
...A
|
|
1088
1088
|
}));
|
|
1089
1089
|
};
|
|
1090
1090
|
async function N() {
|
|
1091
1091
|
if (o.value) {
|
|
1092
|
-
|
|
1092
|
+
x();
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
let
|
|
1096
|
-
for (let
|
|
1097
|
-
const f = v.value[
|
|
1095
|
+
let D = [];
|
|
1096
|
+
for (let A = 0; A < v.value.length; A++) {
|
|
1097
|
+
const f = v.value[A];
|
|
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
|
+
D.push(f);
|
|
1105
1105
|
}
|
|
1106
|
-
y.value =
|
|
1106
|
+
y.value = D;
|
|
1107
1107
|
}
|
|
1108
1108
|
onMounted(() => {
|
|
1109
1109
|
N();
|
|
@@ -1115,15 +1115,15 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1115
1115
|
{ deep: !0 }
|
|
1116
1116
|
// 深层监听数组/对象变化
|
|
1117
1117
|
);
|
|
1118
|
-
const j = (
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
return r({ getElButtonsRef: B, getElButtonRefs: () => I.value }), (
|
|
1118
|
+
const j = (D) => {
|
|
1119
|
+
D.disabled || (D.actionType === "submit" ? t("submit", D) : D.actionType === "reset" ? t("reset", D) : D.actionType === "action" && t("action", D));
|
|
1120
|
+
}, F = ref(null), B = () => F.value, I = ref([]);
|
|
1121
|
+
return r({ getElButtonsRef: B, getElButtonRefs: () => I.value }), (D, A) => (openBlock(), createElementBlock("div", {
|
|
1122
1122
|
ref_key: "ElButtonsRef",
|
|
1123
|
-
ref:
|
|
1124
|
-
class: normalizeClass(["el-buttons-dict",
|
|
1125
|
-
id:
|
|
1126
|
-
style: normalizeStyle({ ...
|
|
1123
|
+
ref: F,
|
|
1124
|
+
class: normalizeClass(["el-buttons-dict", D.$attrs.class]),
|
|
1125
|
+
id: D.$attrs.id,
|
|
1126
|
+
style: normalizeStyle({ ...D.$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,
|
|
@@ -1139,11 +1139,11 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1139
1139
|
]),
|
|
1140
1140
|
_: 2
|
|
1141
1141
|
}, [
|
|
1142
|
-
renderList(f.slotList, (k,
|
|
1142
|
+
renderList(f.slotList, (k, S) => ({
|
|
1143
1143
|
name: k.slotName,
|
|
1144
1144
|
fn: withCtx((O) => [
|
|
1145
1145
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
1146
|
-
key:
|
|
1146
|
+
key: S,
|
|
1147
1147
|
render: k.render,
|
|
1148
1148
|
scope: O
|
|
1149
1149
|
}, null, 8, ["render", "scope"]))
|
|
@@ -1262,89 +1262,89 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1262
1262
|
let j = [];
|
|
1263
1263
|
if (typeof u.value == "object") {
|
|
1264
1264
|
c.value = u.value.type;
|
|
1265
|
-
const
|
|
1266
|
-
j = [].concat(
|
|
1267
|
-
const { filters: B, filterType: I = v.format.value, reverse: G = !1 } = u.value,
|
|
1268
|
-
G ? j = j.filter((
|
|
1265
|
+
const F = await store.actions.getDictDataObj(c.value);
|
|
1266
|
+
j = [].concat(F[c.value]);
|
|
1267
|
+
const { filters: B, filterType: I = v.format.value, reverse: G = !1 } = u.value, D = typeof B == "string" ? B.split(",") : B;
|
|
1268
|
+
G ? j = j.filter((A) => !D.includes(A[I])) : j = j.filter((A) => D.includes(A[I]));
|
|
1269
1269
|
} else {
|
|
1270
1270
|
c.value = u.value;
|
|
1271
|
-
const
|
|
1272
|
-
j = [].concat(
|
|
1271
|
+
const F = await store.actions.getDictDataObj(c.value);
|
|
1272
|
+
j = [].concat(F[c.value]);
|
|
1273
1273
|
}
|
|
1274
1274
|
if (i.value && (j = i.value(j)), s.value)
|
|
1275
|
-
j = j.map((
|
|
1276
|
-
...
|
|
1277
|
-
[v.format.disabled]: s.value(
|
|
1275
|
+
j = j.map((F) => ({
|
|
1276
|
+
...F,
|
|
1277
|
+
[v.format.disabled]: s.value(F)
|
|
1278
1278
|
}));
|
|
1279
1279
|
else if (o.value) {
|
|
1280
|
-
const { disabledValues:
|
|
1281
|
-
I ? j = j.map((
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
}) : j = j.map((
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1280
|
+
const { disabledValues: F, disabledType: B = v.treeSetting.valueField, reverse: I = !1 } = o.value, G = typeof F == "string" ? F.split(",") : F;
|
|
1281
|
+
I ? j = j.map((D) => {
|
|
1282
|
+
const A = JSON.parse(JSON.stringify(D));
|
|
1283
|
+
return A[v.format.disabled] = !G.includes(A[B]) || A[v.format.disabled], A;
|
|
1284
|
+
}) : j = j.map((D) => {
|
|
1285
|
+
const A = JSON.parse(JSON.stringify(D));
|
|
1286
|
+
return A[v.format.disabled] = G.includes(A[B]) || A[v.format.disabled], A;
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
m.list = j;
|
|
1290
|
-
},
|
|
1291
|
-
const j = store.state.dictConfig.treeSetting,
|
|
1290
|
+
}, C = computed(() => store.state.isGettingDictTypes.includes(c.value)), l = computed(() => store.state.isGettingAllDictTypes), g = computed(() => {
|
|
1291
|
+
const j = store.state.dictConfig.treeSetting, F = store.state.dictConfig.format, B = t.props ?? {};
|
|
1292
1292
|
return {
|
|
1293
|
-
disabled: (B == null ? void 0 : B.disabled) ??
|
|
1293
|
+
disabled: (B == null ? void 0 : B.disabled) ?? F.disabled,
|
|
1294
1294
|
label: (B == null ? void 0 : B.label) ?? j.labelField,
|
|
1295
1295
|
value: (B == null ? void 0 : B.value) ?? j.valueField,
|
|
1296
1296
|
children: (B == null ? void 0 : B.children) ?? j.childrenField,
|
|
1297
1297
|
leaf: (B == null ? void 0 : B.leaf) ?? j.leafField
|
|
1298
1298
|
};
|
|
1299
1299
|
}), T = computed(() => {
|
|
1300
|
-
const j = JSON.parse(JSON.stringify(v.treeSetting)),
|
|
1301
|
-
...
|
|
1302
|
-
valueField:
|
|
1303
|
-
labelField:
|
|
1304
|
-
childrenField:
|
|
1305
|
-
leafField:
|
|
1306
|
-
disabled:
|
|
1300
|
+
const j = JSON.parse(JSON.stringify(v.treeSetting)), F = t.props || {}, B = {
|
|
1301
|
+
...F,
|
|
1302
|
+
valueField: F != null && F.value ? F.value : j.valueField,
|
|
1303
|
+
labelField: F != null && F.label ? F.label : j.labelField,
|
|
1304
|
+
childrenField: F != null && F.children ? F.children : j.childrenField,
|
|
1305
|
+
leafField: F != null && F.leaf ? F.leaf : j.leafField,
|
|
1306
|
+
disabled: F != null && F.disabled ? F.disabled : v.format.disabled
|
|
1307
1307
|
};
|
|
1308
1308
|
return Object.assign(j, B);
|
|
1309
|
-
}), E = (j,
|
|
1309
|
+
}), E = (j, F) => {
|
|
1310
1310
|
for (let B = 0; B < j.length; B++) {
|
|
1311
1311
|
const I = j[B];
|
|
1312
|
-
if (I[T.value.levelField] ===
|
|
1312
|
+
if (I[T.value.levelField] === F) {
|
|
1313
1313
|
delete I[T.value.childrenField], I[T.value.leafField] = !0;
|
|
1314
1314
|
continue;
|
|
1315
1315
|
} else {
|
|
1316
|
-
const
|
|
1317
|
-
E(
|
|
1316
|
+
const D = I[T.value.childrenField];
|
|
1317
|
+
E(D, F);
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
}, y = computed(() => {
|
|
1321
1321
|
if (m.list.length === 0)
|
|
1322
1322
|
return [];
|
|
1323
1323
|
const j = JSON.parse(JSON.stringify(m.list));
|
|
1324
|
-
let
|
|
1325
|
-
return a.value && E(
|
|
1324
|
+
let F = ListToTree(j, T.value);
|
|
1325
|
+
return a.value && E(F, +a.value), F || [];
|
|
1326
1326
|
});
|
|
1327
1327
|
watch(
|
|
1328
|
-
[
|
|
1329
|
-
([j,
|
|
1330
|
-
!j && !
|
|
1328
|
+
[C, l],
|
|
1329
|
+
([j, F]) => {
|
|
1330
|
+
!j && !F && _();
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
1333
|
immediate: !0
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
|
-
const
|
|
1337
|
-
return r({ getElCascaderRef: () =>
|
|
1336
|
+
const x = ref(null);
|
|
1337
|
+
return r({ getElCascaderRef: () => x.value }), (j, F) => (openBlock(), createBlock(unref(ElCascader), mergeProps({
|
|
1338
1338
|
ref_key: "ElCascaderRef",
|
|
1339
|
-
ref:
|
|
1339
|
+
ref: x,
|
|
1340
1340
|
options: y.value,
|
|
1341
1341
|
props: g.value,
|
|
1342
1342
|
onChange: b
|
|
1343
1343
|
}, j.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1344
1344
|
renderList(j.$slots, (B, I, G) => ({
|
|
1345
1345
|
name: I,
|
|
1346
|
-
fn: withCtx((
|
|
1347
|
-
renderSlot(j.$slots, I, mergeProps({ key: G },
|
|
1346
|
+
fn: withCtx((D) => [
|
|
1347
|
+
renderSlot(j.$slots, I, mergeProps({ key: G }, D))
|
|
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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""),
|
|
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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
1405
1405
|
let l = ref(null), 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, x) => (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
1421
|
color: _.value,
|
|
1422
|
-
disabled:
|
|
1422
|
+
disabled: C.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, (N, j,
|
|
1429
|
+
renderList(y.$slots, (N, j, F) => ({
|
|
1430
1430
|
name: j,
|
|
1431
1431
|
fn: withCtx((B) => [
|
|
1432
|
-
renderSlot(y.$slots, j, mergeProps({ key:
|
|
1432
|
+
renderSlot(y.$slots, j, mergeProps({ key: F }, B))
|
|
1433
1433
|
])
|
|
1434
1434
|
}))
|
|
1435
1435
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -1486,17 +1486,17 @@ 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), _ = d,
|
|
1490
|
-
_("change",
|
|
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), _ = d, C = (F, B) => {
|
|
1490
|
+
_("change", F);
|
|
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 D = g.value[G];
|
|
1494
|
+
if (n.value.includes(D[m.format.value]) && I.push(D), G === B)
|
|
1495
|
+
if (F && !n.value.includes(D[m.format.value]))
|
|
1496
|
+
I.push(D);
|
|
1497
1497
|
else {
|
|
1498
|
-
const
|
|
1499
|
-
I.splice(
|
|
1498
|
+
const A = I.indexOf(D);
|
|
1499
|
+
I.splice(A, 1);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
if (_(
|
|
@@ -1512,19 +1512,19 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
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((F) => ({
|
|
1516
|
+
label: F[m.format.label],
|
|
1517
|
+
value: F[m.format.value],
|
|
1518
|
+
disabled: !!F[m.format.disabled],
|
|
1519
|
+
...F
|
|
1520
1520
|
})));
|
|
1521
1521
|
watch(
|
|
1522
1522
|
[() => g.value, () => t.modelValue],
|
|
1523
|
-
([
|
|
1523
|
+
([F, B]) => {
|
|
1524
1524
|
const I = [];
|
|
1525
|
-
for (let G = 0; G <
|
|
1526
|
-
const
|
|
1527
|
-
B.includes(
|
|
1525
|
+
for (let G = 0; G < F.length; G++) {
|
|
1526
|
+
const D = F[G];
|
|
1527
|
+
B.includes(D[m.format.value]) ? I.push(!0) : I.push(!1);
|
|
1528
1528
|
}
|
|
1529
1529
|
w.value = I;
|
|
1530
1530
|
},
|
|
@@ -1537,46 +1537,46 @@ 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 F = [];
|
|
1541
1541
|
if (typeof o.value == "object") {
|
|
1542
1542
|
b.value = o.value.type;
|
|
1543
1543
|
const B = await store.actions.getDictDataObj(b.value);
|
|
1544
|
-
|
|
1545
|
-
const { filters: I, filterType: G = m.format.value, reverse:
|
|
1546
|
-
|
|
1544
|
+
F = [].concat(B[b.value]);
|
|
1545
|
+
const { filters: I, filterType: G = m.format.value, reverse: D = !1 } = o.value, A = typeof I == "string" ? I.split(",") : I;
|
|
1546
|
+
D ? F = F.filter((f) => !A.includes(f[G])) : F = F.filter((f) => A.includes(f[G]));
|
|
1547
1547
|
} else {
|
|
1548
1548
|
b.value = o.value;
|
|
1549
1549
|
const B = await store.actions.getDictDataObj(b.value);
|
|
1550
|
-
|
|
1550
|
+
F = [].concat(B[b.value]);
|
|
1551
1551
|
}
|
|
1552
|
-
if (c.value && (
|
|
1553
|
-
|
|
1552
|
+
if (c.value && (F = c.value(F)), v.value)
|
|
1553
|
+
F = F.map((B) => ({
|
|
1554
1554
|
...B,
|
|
1555
1555
|
[m.format.disabled]: v.value(B)
|
|
1556
1556
|
}));
|
|
1557
1557
|
else if (i.value) {
|
|
1558
|
-
const { disabledValues: B, disabledType: I = m.format.value, reverse: G = !1 } = i.value,
|
|
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: B, disabledType: I = m.format.value, reverse: G = !1 } = i.value, D = typeof B == "string" ? B.split(",") : B;
|
|
1559
|
+
G ? F = F.map((A) => {
|
|
1560
|
+
const f = JSON.parse(JSON.stringify(A));
|
|
1561
|
+
return f[m.format.disabled] = !D.includes(f[I]) || f[m.format.disabled], f;
|
|
1562
|
+
}) : F = F.map((A) => {
|
|
1563
|
+
const f = JSON.parse(JSON.stringify(A));
|
|
1564
|
+
return f[m.format.disabled] = D.includes(f[I]) || f[m.format.disabled], f;
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
|
-
l.list =
|
|
1568
|
-
}, E = computed(() => store.state.isGettingDictTypes.includes(b.value)), y = computed(() => store.state.isGettingAllDictTypes),
|
|
1567
|
+
l.list = F;
|
|
1568
|
+
}, E = computed(() => store.state.isGettingDictTypes.includes(b.value)), y = computed(() => store.state.isGettingAllDictTypes), x = computed(() => a.value);
|
|
1569
1569
|
watch(
|
|
1570
|
-
[E, y,
|
|
1571
|
-
([
|
|
1572
|
-
!
|
|
1573
|
-
[m.format.value]:
|
|
1574
|
-
[m.format.label]:
|
|
1575
|
-
[m.format.disabled]: !!
|
|
1576
|
-
...
|
|
1577
|
-
})) : l.list = l.list.map((
|
|
1578
|
-
[m.format.value]:
|
|
1579
|
-
[m.format.label]:
|
|
1570
|
+
[E, y, x],
|
|
1571
|
+
([F, B, I]) => {
|
|
1572
|
+
!F && !B && 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((D) => ({
|
|
1573
|
+
[m.format.value]: D[u.value.value],
|
|
1574
|
+
[m.format.label]: D[u.value.label],
|
|
1575
|
+
[m.format.disabled]: !!D[u.value.disabled],
|
|
1576
|
+
...D
|
|
1577
|
+
})) : l.list = l.list.map((D) => ({
|
|
1578
|
+
[m.format.value]: D,
|
|
1579
|
+
[m.format.label]: D
|
|
1580
1580
|
}))));
|
|
1581
1581
|
},
|
|
1582
1582
|
{
|
|
@@ -1584,14 +1584,14 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
1586
|
const N = ref([]);
|
|
1587
|
-
return r({ getElCheckAbleTagRefs: () => N.value }), (
|
|
1587
|
+
return r({ getElCheckAbleTagRefs: () => N.value }), (F, B) => (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: (D) => {
|
|
1590
|
+
D && (N.value[G] = D);
|
|
1591
1591
|
},
|
|
1592
1592
|
checked: w.value[G]
|
|
1593
|
-
},
|
|
1594
|
-
onChange: (
|
|
1593
|
+
}, F.$attrs, {
|
|
1594
|
+
onChange: (D) => C(D, 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(F.$slots, (D, A, f) => ({
|
|
1604
|
+
name: A,
|
|
1605
1605
|
fn: withCtx((p) => [
|
|
1606
|
-
renderSlot(
|
|
1606
|
+
renderSlot(F.$slots, A, normalizeProps(guardReactiveProps(p)), void 0, !0)
|
|
1607
1607
|
])
|
|
1608
1608
|
}))
|
|
1609
1609
|
]), 1040, ["checked", "onChange", "type"]))), 128));
|
|
@@ -1663,27 +1663,27 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
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
1665
|
return Object.entries(w).forEach(([p, k]) => {
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1668
|
-
const O = ToCamelCase(
|
|
1666
|
+
const S = ToKebabCase(p);
|
|
1667
|
+
if (!S.startsWith("checkbox-button-") && !S.startsWith("on-checkbox-button-")) {
|
|
1668
|
+
const O = ToCamelCase(S);
|
|
1669
1669
|
f[O] = k;
|
|
1670
1670
|
}
|
|
1671
1671
|
}), f;
|
|
1672
1672
|
}), m = computed(() => {
|
|
1673
1673
|
const f = {};
|
|
1674
1674
|
return Object.entries(w).forEach(([p, k]) => {
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1677
|
-
const O = ToCamelCase(
|
|
1675
|
+
const S = ToKebabCase(p);
|
|
1676
|
+
if (S.startsWith("checkbox-button-") || S.startsWith("on-checkbox-button-")) {
|
|
1677
|
+
const O = ToCamelCase(S.replace("checkbox-button-", ""));
|
|
1678
1678
|
f[O] = k;
|
|
1679
1679
|
}
|
|
1680
1680
|
}), f;
|
|
1681
|
-
}), _ = ref(""),
|
|
1681
|
+
}), _ = ref(""), C = 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((k) => f.includes(k[
|
|
1686
|
+
const p = T.list.filter((k) => f.includes(k[C.format.value]));
|
|
1687
1687
|
l("dictChange", p);
|
|
1688
1688
|
}, T = reactive({
|
|
1689
1689
|
list: []
|
|
@@ -1695,8 +1695,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1695
1695
|
_.value = o.value.type;
|
|
1696
1696
|
const p = await store.actions.getDictDataObj(_.value);
|
|
1697
1697
|
f = [].concat(p[_.value]);
|
|
1698
|
-
const { filters: k, filterType:
|
|
1699
|
-
O ? f = f.filter((R) => !V.includes(R[
|
|
1698
|
+
const { filters: k, filterType: S = C.format.value, reverse: O = !1 } = o.value, V = typeof k == "string" ? k.split(",") : k;
|
|
1699
|
+
O ? f = f.filter((R) => !V.includes(R[S])) : f = f.filter((R) => V.includes(R[S]));
|
|
1700
1700
|
} else {
|
|
1701
1701
|
_.value = o.value;
|
|
1702
1702
|
const p = await store.actions.getDictDataObj(_.value);
|
|
@@ -1705,65 +1705,65 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1705
1705
|
if (c.value && (f = c.value(f)), v.value)
|
|
1706
1706
|
f = f.map((p) => ({
|
|
1707
1707
|
...p,
|
|
1708
|
-
[
|
|
1708
|
+
[C.format.disabled]: v.value(p)
|
|
1709
1709
|
}));
|
|
1710
1710
|
else if (i.value) {
|
|
1711
|
-
const { disabledValues: p, disabledType: k =
|
|
1712
|
-
|
|
1711
|
+
const { disabledValues: p, disabledType: k = C.format.value, reverse: S = !1 } = i.value, O = typeof p == "string" ? p.split(",") : p;
|
|
1712
|
+
S ? f = f.map((V) => {
|
|
1713
1713
|
const R = JSON.parse(JSON.stringify(V));
|
|
1714
|
-
return R[
|
|
1714
|
+
return R[C.format.disabled] = !O.includes(R[k]) || R[C.format.disabled], R;
|
|
1715
1715
|
}) : f = f.map((V) => {
|
|
1716
1716
|
const R = JSON.parse(JSON.stringify(V));
|
|
1717
|
-
return R[
|
|
1717
|
+
return R[C.format.disabled] = O.includes(R[k]) || R[C.format.disabled], R;
|
|
1718
1718
|
});
|
|
1719
1719
|
}
|
|
1720
1720
|
T.list = f;
|
|
1721
|
-
}, y = computed(() => store.state.isGettingDictTypes.includes(_.value)),
|
|
1721
|
+
}, y = computed(() => store.state.isGettingDictTypes.includes(_.value)), x = computed(() => store.state.isGettingAllDictTypes), N = computed(() => a.value), j = inject(formItemContextKey), F = inject(formContextKey), B = computed(() => n.value || w["checkbox-button-disabled"] === "" || w["checkbox-button-disabled"] || w.checkboxButtonDisabled === "" || w.checkboxButtonDisabled || w.CheckboxButtonDisabled === "" || w.CheckboxButtonDisabled || (j == null ? void 0 : j.disabled) || (F == null ? void 0 : F.disabled) || !1);
|
|
1722
1722
|
watch(
|
|
1723
|
-
[y,
|
|
1723
|
+
[y, x, N],
|
|
1724
1724
|
([f, p, k]) => {
|
|
1725
1725
|
!f && !p && k && k.length === 0 && E(), k.length > 0 && (T.list = JSON.parse(JSON.stringify(k)), T.list.length > 0 && (Object.prototype.toString.call(T.list[0]) === "[object Object]" ? T.list = T.list.map((O) => ({
|
|
1726
|
-
[
|
|
1727
|
-
[
|
|
1728
|
-
[
|
|
1726
|
+
[C.format.value]: O[u.value.value],
|
|
1727
|
+
[C.format.label]: O[u.value.label],
|
|
1728
|
+
[C.format.disabled]: !!O[u.value.disabled],
|
|
1729
1729
|
...O
|
|
1730
1730
|
})) : T.list = T.list.map((O) => ({
|
|
1731
|
-
[
|
|
1732
|
-
[
|
|
1731
|
+
[C.format.value]: O,
|
|
1732
|
+
[C.format.label]: O
|
|
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, D = ref([]);
|
|
1740
|
+
return r({ getElCheckboxGroupRef: G, getElCheckboxButtonRefs: () => D.value }), (f, p) => (openBlock(), createBlock(unref(ElCheckboxGroup), mergeProps({
|
|
1741
1741
|
ref_key: "ElCheckboxGroupRef",
|
|
1742
1742
|
ref: I,
|
|
1743
1743
|
disabled: B.value
|
|
1744
1744
|
}, b.value, { onChange: g }), createSlots({
|
|
1745
1745
|
default: withCtx(() => [
|
|
1746
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (k,
|
|
1746
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(T.list, (k, S) => (openBlock(), createBlock(unref(ElCheckboxButton), mergeProps({
|
|
1747
1747
|
ref_for: !0,
|
|
1748
1748
|
ref: (O) => {
|
|
1749
|
-
O && (
|
|
1749
|
+
O && (D.value[S] = O);
|
|
1750
1750
|
},
|
|
1751
|
-
key: k[unref(
|
|
1752
|
-
disabled: B.value || k[unref(
|
|
1753
|
-
label: k[unref(
|
|
1751
|
+
key: k[unref(C).format.value],
|
|
1752
|
+
disabled: B.value || k[unref(C).format.disabled],
|
|
1753
|
+
label: k[unref(C).format.value]
|
|
1754
1754
|
}, m.value), {
|
|
1755
1755
|
default: withCtx(() => [
|
|
1756
|
-
createTextVNode(toDisplayString(k[unref(
|
|
1756
|
+
createTextVNode(toDisplayString(k[unref(C).format.label]), 1)
|
|
1757
1757
|
]),
|
|
1758
1758
|
_: 2
|
|
1759
1759
|
}, 1040, ["disabled", "label"]))), 128))
|
|
1760
1760
|
]),
|
|
1761
1761
|
_: 2
|
|
1762
1762
|
}, [
|
|
1763
|
-
renderList(f.$slots, (k,
|
|
1764
|
-
name:
|
|
1763
|
+
renderList(f.$slots, (k, S, O) => ({
|
|
1764
|
+
name: S,
|
|
1765
1765
|
fn: withCtx((V) => [
|
|
1766
|
-
renderSlot(f.$slots,
|
|
1766
|
+
renderSlot(f.$slots, S, mergeProps({ key: O }, V))
|
|
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(), _ = ref(!1),
|
|
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(), _ = ref(!1), C = 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,16 +1844,16 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1844
1844
|
P[W] = L;
|
|
1845
1845
|
}
|
|
1846
1846
|
}), P;
|
|
1847
|
-
}), E = ref(""), y = toRaw(store.state.dictConfig),
|
|
1847
|
+
}), E = ref(""), y = toRaw(store.state.dictConfig), x = d, N = computed(() => B.list.filter((P) => !P[y.format.disabled])), j = (P) => {
|
|
1848
1848
|
const K = P.length, L = N.value.length;
|
|
1849
|
-
|
|
1850
|
-
},
|
|
1849
|
+
C.value = K === L, _.value = K > 0 && K < L;
|
|
1850
|
+
}, F = (P) => {
|
|
1851
1851
|
if (j(P), !v.value) {
|
|
1852
|
-
|
|
1852
|
+
x("dictChange", P);
|
|
1853
1853
|
return;
|
|
1854
1854
|
}
|
|
1855
1855
|
const K = B.list.filter((L) => P.includes(L[y.format.value]));
|
|
1856
|
-
|
|
1856
|
+
x("dictChange", K);
|
|
1857
1857
|
}, B = reactive({
|
|
1858
1858
|
list: []
|
|
1859
1859
|
});
|
|
@@ -1894,7 +1894,7 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1894
1894
|
});
|
|
1895
1895
|
}
|
|
1896
1896
|
B.list = P;
|
|
1897
|
-
}, G = computed(() => store.state.isGettingDictTypes.includes(E.value)),
|
|
1897
|
+
}, G = computed(() => store.state.isGettingDictTypes.includes(E.value)), D = computed(() => store.state.isGettingAllDictTypes), A = computed(() => o.value), f = inject(formItemContextKey), p = inject(formContextKey), k = computed(() => n.value || m["checkbox-disabled"] === "" || m["checkbox-disabled"] || m.checkboxDisabled === "" || m.checkboxDisabled || m.CheckboxDisabled === "" || m.CheckboxDisabled || (f == null ? void 0 : f.disabled) || (p == null ? void 0 : p.disabled) || !1);
|
|
1898
1898
|
watch(
|
|
1899
1899
|
() => t.modelValue,
|
|
1900
1900
|
// 正确监听方式
|
|
@@ -1909,10 +1909,10 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1909
1909
|
), watch(
|
|
1910
1910
|
() => l.value,
|
|
1911
1911
|
(P) => {
|
|
1912
|
-
|
|
1912
|
+
x("update:modelValue", P), x("change", P);
|
|
1913
1913
|
}
|
|
1914
1914
|
), watch(
|
|
1915
|
-
[G,
|
|
1915
|
+
[G, D, A],
|
|
1916
1916
|
([P, K, L]) => {
|
|
1917
1917
|
!P && !K && L && L.length === 0 && I(), L.length > 0 && (B.list = JSON.parse(JSON.stringify(L)), B.list.length > 0 && (Object.prototype.toString.call(B.list[0]) === "[object Object]" ? B.list = B.list.map((W) => ({
|
|
1918
1918
|
[y.format.value]: W[i.value.value],
|
|
@@ -1928,12 +1928,12 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1928
1928
|
immediate: !0
|
|
1929
1929
|
}
|
|
1930
1930
|
);
|
|
1931
|
-
const
|
|
1931
|
+
const S = (P) => {
|
|
1932
1932
|
if (_.value = !1, P) {
|
|
1933
1933
|
const K = N.value.map((L) => L[y.format.value]);
|
|
1934
|
-
|
|
1934
|
+
F(K);
|
|
1935
1935
|
} else
|
|
1936
|
-
|
|
1936
|
+
F([]);
|
|
1937
1937
|
}, O = ref(null), V = () => O.value, R = ref([]);
|
|
1938
1938
|
return r({ getElCheckboxGroupRef: V, getElCheckboxRefs: () => R.value }), (P, K) => (openBlock(), createElementBlock(Fragment, null, [
|
|
1939
1939
|
unref(u) && !k.value ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
@@ -1941,9 +1941,9 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1941
1941
|
class: "check-all",
|
|
1942
1942
|
disabled: k.value,
|
|
1943
1943
|
indeterminate: _.value,
|
|
1944
|
-
modelValue:
|
|
1945
|
-
"onUpdate:modelValue": K[0] || (K[0] = (L) =>
|
|
1946
|
-
onChange:
|
|
1944
|
+
modelValue: C.value,
|
|
1945
|
+
"onUpdate:modelValue": K[0] || (K[0] = (L) => C.value = L),
|
|
1946
|
+
onChange: S
|
|
1947
1947
|
}, {
|
|
1948
1948
|
default: withCtx(() => [
|
|
1949
1949
|
createTextVNode(toDisplayString(unref(u)), 1)
|
|
@@ -1956,7 +1956,7 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1956
1956
|
disabled: k.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: F }), createSlots({
|
|
1960
1960
|
default: withCtx(() => [
|
|
1961
1961
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(B.list, (L, M) => (openBlock(), createBlock(unref(ElCheckbox), mergeProps({
|
|
1962
1962
|
ref_for: !0,
|
|
@@ -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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""),
|
|
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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
2710
2710
|
let l = ref(null), 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, x) => (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
2726
|
color: _.value,
|
|
2727
|
-
disabled:
|
|
2727
|
+
disabled: C.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, (N, j,
|
|
2734
|
+
renderList(y.$slots, (N, j, F) => ({
|
|
2735
2735
|
name: j,
|
|
2736
2736
|
fn: withCtx((B) => [
|
|
2737
|
-
renderSlot(y.$slots, j, mergeProps({ key:
|
|
2737
|
+
renderSlot(y.$slots, j, mergeProps({ key: F }, B))
|
|
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), _ = 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), _ = d, C = toRaw(store.state.dictConfig), l = computed(() => o.value ? o.value(a.value) : i.value ? i.value : E.value && E.value[C.format.type] ? E.value[C.format.type] : "primary"), g = computed(() => s.value ? s.value(a.value) : c.value ? c.value : E.value && E.value[C.format.color] ? E.value[C.format.color] : ""), T = computed(() => v.value ? v.value(a.value) : E.value && E.value[C.format.disabled] ? E.value[C.format.disabled] : !!w.value);
|
|
2793
2793
|
let E = ref(null), y = ref(null);
|
|
2794
2794
|
watchEffect(() => {
|
|
2795
2795
|
if (!u.value) {
|
|
2796
2796
|
y.value = a.value;
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
|
-
GetItemByCode(a.value, u.value).then((
|
|
2800
|
-
|
|
2799
|
+
GetItemByCode(a.value, u.value).then((F) => {
|
|
2800
|
+
F ? (E.value = F, y.value = F[C.format.label]) : (E.value = null, y.value = String(b.value ?? (a.value === 0 ? 0 : a.value || m.value)));
|
|
2801
2801
|
});
|
|
2802
2802
|
});
|
|
2803
|
-
const
|
|
2803
|
+
const x = () => {
|
|
2804
2804
|
T.value || _(n.value, attrs);
|
|
2805
2805
|
}, N = ref(null);
|
|
2806
|
-
return r({ getElLinkRef: () => N.value }), (
|
|
2806
|
+
return r({ getElLinkRef: () => N.value }), (F, B) => (openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
2807
2807
|
class: "el-link-dict",
|
|
2808
2808
|
ref_key: "ElLinkRef",
|
|
2809
2809
|
ref: N,
|
|
2810
2810
|
type: l.value,
|
|
2811
2811
|
color: g.value,
|
|
2812
2812
|
disabled: T.value
|
|
2813
|
-
},
|
|
2813
|
+
}, F.$attrs, { onClick: x }), createSlots({
|
|
2814
2814
|
default: withCtx(() => [
|
|
2815
2815
|
createTextVNode(toDisplayString(unref(y)), 1)
|
|
2816
2816
|
]),
|
|
2817
2817
|
_: 2
|
|
2818
2818
|
}, [
|
|
2819
|
-
renderList(
|
|
2819
|
+
renderList(F.$slots, (I, G, D) => ({
|
|
2820
2820
|
name: G,
|
|
2821
|
-
fn: withCtx((
|
|
2822
|
-
renderSlot(
|
|
2821
|
+
fn: withCtx((A) => [
|
|
2822
|
+
renderSlot(F.$slots, G, mergeProps({ key: D }, A))
|
|
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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""),
|
|
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"), _ = computed(() => o.value ? o.value(t.value) : i.value ? i.value : l.value && l.value[b.format.color] ? l.value[b.format.color] : ""), C = computed(() => s.value ? s.value(t.value) : l.value && l.value[b.format.disabled] ? l.value[b.format.disabled] : !!c.value);
|
|
2873
2873
|
let l = ref(null), 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, x) => (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
2889
|
color: _.value,
|
|
2890
|
-
disabled:
|
|
2890
|
+
disabled: C.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, (N, j,
|
|
2897
|
+
renderList(y.$slots, (N, j, F) => ({
|
|
2898
2898
|
name: j,
|
|
2899
2899
|
fn: withCtx((B) => [
|
|
2900
|
-
renderSlot(y.$slots, j, mergeProps({ key:
|
|
2900
|
+
renderSlot(y.$slots, j, mergeProps({ key: F }, B))
|
|
2901
2901
|
])
|
|
2902
2902
|
}))
|
|
2903
2903
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -2992,20 +2992,20 @@ const Mask = (e, r) => {
|
|
|
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, x) => (openBlock(), createBlock(_sfc_main$n, {
|
|
2996
|
+
key: x,
|
|
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, x) => (openBlock(), createBlock(_sfc_main$e, {
|
|
3000
|
+
key: x,
|
|
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, x) => (openBlock(), createBlock(_sfc_main$f, {
|
|
3004
|
+
key: x,
|
|
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, x) => (openBlock(), createBlock(_sfc_main$d, {
|
|
3008
|
+
key: x,
|
|
3009
3009
|
modelValue: y || "",
|
|
3010
3010
|
dictType: T.dictType
|
|
3011
3011
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
@@ -3023,11 +3023,11 @@ const Mask = (e, r) => {
|
|
|
3023
3023
|
]),
|
|
3024
3024
|
_: 2
|
|
3025
3025
|
}, [
|
|
3026
|
-
renderList(T.slotList, (y,
|
|
3026
|
+
renderList(T.slotList, (y, x) => ({
|
|
3027
3027
|
name: y.slotName,
|
|
3028
3028
|
fn: withCtx((N) => [
|
|
3029
3029
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3030
|
-
key:
|
|
3030
|
+
key: x,
|
|
3031
3031
|
render: y.render,
|
|
3032
3032
|
scope: N
|
|
3033
3033
|
}, null, 8, ["render", "scope"]))
|
|
@@ -3039,8 +3039,8 @@ const Mask = (e, r) => {
|
|
|
3039
3039
|
}, [
|
|
3040
3040
|
renderList(l.$slots, (T, E, y) => ({
|
|
3041
3041
|
name: E,
|
|
3042
|
-
fn: withCtx((
|
|
3043
|
-
renderSlot(l.$slots, E, mergeProps({ key: y },
|
|
3042
|
+
fn: withCtx((x) => [
|
|
3043
|
+
renderSlot(l.$slots, E, mergeProps({ key: y }, x), void 0, !0)
|
|
3044
3044
|
])
|
|
3045
3045
|
}))
|
|
3046
3046
|
]), 1040));
|
|
@@ -3090,14 +3090,14 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3090
3090
|
return typeof f == "boolean" ? f : !1;
|
|
3091
3091
|
}), b = ref([]), m = ref({});
|
|
3092
3092
|
let _ = JSON.parse(JSON.stringify(m));
|
|
3093
|
-
const
|
|
3094
|
-
var k,
|
|
3095
|
-
if ((k = n.dynamicComponentsConfig) != null && k.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (
|
|
3093
|
+
const C = (f) => {
|
|
3094
|
+
var k, S, O, V, R;
|
|
3095
|
+
if ((k = n.dynamicComponentsConfig) != null && k.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (S = n.dynamicComponentsConfig) != null && S.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
3098
|
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (p = "请输入"), (O = n.dynamicComponentsConfig) != null && O.isShowLabelPlaceholder && (p = p + ((V = f.formItemProps) == null ? void 0 : V.label)), ((R = f.props) == null ? void 0 : R.placeholder) || p || "";
|
|
3099
3099
|
}, l = ref(!1), g = ref(""), T = () => {
|
|
3100
|
-
var k,
|
|
3100
|
+
var k, S, O, V, 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++) {
|
|
@@ -3107,7 +3107,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3107
3107
|
...$,
|
|
3108
3108
|
id: $ != null && $[s.value] ? $[s.value] : GenerateUUID(),
|
|
3109
3109
|
showRuleType: ($ == null ? void 0 : $.showRuleType) || ((k = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : k.showRuleType) || "compare",
|
|
3110
|
-
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((
|
|
3110
|
+
validatorRuleType: ($ == null ? void 0 : $.validatorRuleType) || ((S = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : S.validatorRuleType) || "compare",
|
|
3111
3111
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
3112
3112
|
visible: $.showRules && $.showRules.length > 0 || $.hidden ? !1 : ($ == null ? void 0 : $.visible) ?? !0,
|
|
3113
3113
|
//
|
|
@@ -3115,10 +3115,10 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3115
3115
|
props: $.props ? {
|
|
3116
3116
|
...(O = n.dynamicComponentsConfig) == null ? void 0 : O.props,
|
|
3117
3117
|
...$.props,
|
|
3118
|
-
placeholder:
|
|
3118
|
+
placeholder: C($)
|
|
3119
3119
|
} : {
|
|
3120
3120
|
...(V = n.dynamicComponentsConfig) == null ? void 0 : V.props,
|
|
3121
|
-
placeholder:
|
|
3121
|
+
placeholder: C($)
|
|
3122
3122
|
},
|
|
3123
3123
|
formItemProps: $.formItemProps ? {
|
|
3124
3124
|
...$.formItemProps,
|
|
@@ -3184,7 +3184,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3184
3184
|
}
|
|
3185
3185
|
}), m.value = JSON.parse(JSON.stringify(p));
|
|
3186
3186
|
}, E = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError), y = async (f) => {
|
|
3187
|
-
const p = JSON.parse(JSON.stringify(m.value)), k = sortComponentsByIdDependencies(b.value),
|
|
3187
|
+
const p = JSON.parse(JSON.stringify(m.value)), k = sortComponentsByIdDependencies(b.value), S = [], O = (L) => typeof L == "string" ? L.split(",").filter(Boolean) : Array.isArray(L) ? L : [], V = async () => {
|
|
3188
3188
|
if (a.value)
|
|
3189
3189
|
return;
|
|
3190
3190
|
const L = 1e3, M = 50;
|
|
@@ -3259,9 +3259,9 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
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 && S.push(L.fieldName), !W && L.fieldName && (p[L.fieldName] = Array.isArray(p[L.fieldName]) ? [] : "");
|
|
3263
3263
|
}
|
|
3264
|
-
const K =
|
|
3264
|
+
const K = S.filter((L) => {
|
|
3265
3265
|
var q, Y;
|
|
3266
3266
|
const M = k.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))
|
|
@@ -3271,13 +3271,13 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3271
3271
|
});
|
|
3272
3272
|
if (K.length > 0) {
|
|
3273
3273
|
await V();
|
|
3274
|
-
const L =
|
|
3274
|
+
const L = x();
|
|
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
|
+
}, x = () => {
|
|
3281
3281
|
const f = JSON.parse(JSON.stringify(m.value));
|
|
3282
3282
|
for (let p = 0; p < b.value.length; p++) {
|
|
3283
3283
|
const k = b.value[p];
|
|
@@ -3285,23 +3285,23 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3285
3285
|
}
|
|
3286
3286
|
return f;
|
|
3287
3287
|
}, N = (f, p, k = "") => {
|
|
3288
|
-
const
|
|
3288
|
+
const S = [];
|
|
3289
3289
|
if (typeof f != "object" || f === null || p === null)
|
|
3290
|
-
return f !== p &&
|
|
3290
|
+
return f !== p && S.push({
|
|
3291
3291
|
key: k,
|
|
3292
3292
|
oldVal: p,
|
|
3293
3293
|
newVal: f
|
|
3294
|
-
}),
|
|
3294
|
+
}), S;
|
|
3295
3295
|
const O = /* @__PURE__ */ new Set([...Object.keys(f), ...Object.keys(p)]);
|
|
3296
3296
|
for (const V of O) {
|
|
3297
3297
|
const R = k ? `${k}.${V}` : V, J = f[V], P = p[V];
|
|
3298
|
-
typeof J == "object" && J !== null && !Array.isArray(J) ?
|
|
3298
|
+
typeof J == "object" && J !== null && !Array.isArray(J) ? S.push(...N(J, P, R)) : J !== P && S.push({
|
|
3299
3299
|
key: R,
|
|
3300
3300
|
oldVal: P,
|
|
3301
3301
|
newVal: J
|
|
3302
3302
|
});
|
|
3303
3303
|
}
|
|
3304
|
-
return
|
|
3304
|
+
return S;
|
|
3305
3305
|
};
|
|
3306
3306
|
watch(
|
|
3307
3307
|
c,
|
|
@@ -3318,19 +3318,19 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3318
3318
|
watch(
|
|
3319
3319
|
m,
|
|
3320
3320
|
(f) => {
|
|
3321
|
-
var
|
|
3321
|
+
var S;
|
|
3322
3322
|
const p = JSON.parse(JSON.stringify(f));
|
|
3323
3323
|
if (j)
|
|
3324
3324
|
y();
|
|
3325
3325
|
else {
|
|
3326
|
-
const V = (
|
|
3326
|
+
const V = (S = N(p, _).find((R) => {
|
|
3327
3327
|
if (JSON.stringify(R.newVal) !== JSON.stringify(R.oldVal))
|
|
3328
3328
|
return !0;
|
|
3329
|
-
})) == null ? void 0 :
|
|
3329
|
+
})) == null ? void 0 : S.key;
|
|
3330
3330
|
y(V);
|
|
3331
3331
|
}
|
|
3332
3332
|
_ = p;
|
|
3333
|
-
const k =
|
|
3333
|
+
const k = x();
|
|
3334
3334
|
l.value = !0, v("update:modelValue", k), j = !1;
|
|
3335
3335
|
},
|
|
3336
3336
|
{
|
|
@@ -3348,10 +3348,10 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3348
3348
|
},
|
|
3349
3349
|
{ deep: !0 }
|
|
3350
3350
|
);
|
|
3351
|
-
const
|
|
3352
|
-
const k =
|
|
3353
|
-
f && f.validate((
|
|
3354
|
-
if (
|
|
3351
|
+
const F = async (f, p) => {
|
|
3352
|
+
const k = x();
|
|
3353
|
+
f && f.validate((S, O) => {
|
|
3354
|
+
if (S)
|
|
3355
3355
|
v("pass", k, p);
|
|
3356
3356
|
else if (v("fail", O, k, p), E.value) {
|
|
3357
3357
|
const V = Object.keys(O)[0];
|
|
@@ -3363,12 +3363,12 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3363
3363
|
a.value.resetFields();
|
|
3364
3364
|
}, 30);
|
|
3365
3365
|
}, I = (f) => {
|
|
3366
|
-
const p =
|
|
3366
|
+
const p = x();
|
|
3367
3367
|
v("action", f, p);
|
|
3368
3368
|
}, G = ref({});
|
|
3369
|
-
return r({ getFormData:
|
|
3370
|
-
const k = resolveComponent("el-form-item"),
|
|
3371
|
-
return openBlock(), createBlock(
|
|
3369
|
+
return r({ getFormData: x, resetFormData: T, getComponentRef: (f) => f ? G.value[f] : G.value, getDynamicComponentsRef: () => a.value }), (f, p) => {
|
|
3370
|
+
const k = resolveComponent("el-form-item"), S = resolveComponent("el-form");
|
|
3371
|
+
return openBlock(), createBlock(S, mergeProps({
|
|
3372
3372
|
model: m.value,
|
|
3373
3373
|
class: ["dict-dynamic-components container-class", g.value],
|
|
3374
3374
|
ref_key: "DynamicComponentsRef",
|
|
@@ -3414,7 +3414,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3414
3414
|
class: "comp-item",
|
|
3415
3415
|
key: V
|
|
3416
3416
|
}, O.props, {
|
|
3417
|
-
onSubmit: (J) =>
|
|
3417
|
+
onSubmit: (J) => F(a.value, O),
|
|
3418
3418
|
onReset: B,
|
|
3419
3419
|
onAction: (J) => I(O)
|
|
3420
3420
|
}), createSlots({ _: 2 }, [
|
|
@@ -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;
|
|
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)) : (_ = unref(n).findNodeByProp(e.column.prop)) != null && _.maskType || (
|
|
3519
|
+
], 64)) : (_ = unref(n).findNodeByProp(e.column.prop)) != null && _.maskType || (C = unref(n).findNodeByProp(e.column.prop)) != null && C.maskStart ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
3520
3520
|
createTextVNode(toDisplayString(unref(n).Desensitization(c.row[e.column.prop], unref(n).maskOptions(unref(n).findNodeByProp(e.column.prop)))), 1)
|
|
3521
3521
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
3522
3522
|
createTextVNode(toDisplayString(c.row[e.column.prop] || unref(n).defaultVal), 1)
|
|
@@ -3666,44 +3666,44 @@ 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), _ = r,
|
|
3670
|
-
let
|
|
3671
|
-
return g.value === 4 ?
|
|
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), _ = r, C = 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 = (D) => {
|
|
3670
|
+
let A = "";
|
|
3671
|
+
return g.value === 4 ? A += "quarter" : g.value === 3 ? A += "triple" : g.value === 2 ? A += "half" : A += "full", g.value === 1 ? w.value && C.value && D + 1 > n.value && (A += " hide") : w.value && C.value && D + 1 > n.value * g.value - 1 && (A += " hide"), A;
|
|
3672
3672
|
}, E = ref(null);
|
|
3673
3673
|
let y = null;
|
|
3674
|
-
const
|
|
3675
|
-
|
|
3674
|
+
const x = (D) => {
|
|
3675
|
+
D && D.length > 0 && (l.value = D[0].contentRect.width);
|
|
3676
3676
|
};
|
|
3677
3677
|
onMounted(() => {
|
|
3678
|
-
var
|
|
3679
|
-
const
|
|
3680
|
-
|
|
3678
|
+
var A;
|
|
3679
|
+
const D = (A = E.value) == null ? void 0 : A.$el;
|
|
3680
|
+
D && (l.value = D.offsetWidth, y = new ResizeObserver(x), y.observe(D));
|
|
3681
3681
|
}), onUnmounted(() => {
|
|
3682
3682
|
y && (y.disconnect(), y = null);
|
|
3683
3683
|
});
|
|
3684
|
-
const N = reactive({}), j = (
|
|
3684
|
+
const N = reactive({}), j = (D) => {
|
|
3685
3685
|
var p;
|
|
3686
|
-
const
|
|
3686
|
+
const A = {};
|
|
3687
3687
|
let f = [];
|
|
3688
|
-
for (let k = 0; k <
|
|
3689
|
-
const
|
|
3690
|
-
if (
|
|
3691
|
-
f.push(
|
|
3692
|
-
const O = (p = t.value) == null ? void 0 : p[
|
|
3693
|
-
|
|
3688
|
+
for (let k = 0; k < D.length; k++) {
|
|
3689
|
+
const S = D[k];
|
|
3690
|
+
if (S.fieldName && !f.includes(S.fieldName)) {
|
|
3691
|
+
f.push(S.fieldName);
|
|
3692
|
+
const O = (p = t.value) == null ? void 0 : p[S.fieldName];
|
|
3693
|
+
A[S.fieldName] = (S == null ? void 0 : S.modelValue) !== void 0 ? S.modelValue : O !== void 0 ? O : null;
|
|
3694
3694
|
} else
|
|
3695
|
-
console.warn("字段名称重复:",
|
|
3695
|
+
console.warn("字段名称重复:", S.fieldName);
|
|
3696
3696
|
}
|
|
3697
|
-
Object.assign(N,
|
|
3697
|
+
Object.assign(N, A);
|
|
3698
3698
|
};
|
|
3699
3699
|
watch(
|
|
3700
3700
|
() => ({ ...N }),
|
|
3701
3701
|
() => {
|
|
3702
|
-
const
|
|
3702
|
+
const D = {
|
|
3703
3703
|
...JSON.parse(JSON.stringify(t.value || {})),
|
|
3704
3704
|
...N
|
|
3705
3705
|
};
|
|
3706
|
-
_("update:modelValue",
|
|
3706
|
+
_("update:modelValue", D);
|
|
3707
3707
|
},
|
|
3708
3708
|
{
|
|
3709
3709
|
deep: !0,
|
|
@@ -3711,37 +3711,39 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3711
3711
|
}
|
|
3712
3712
|
), watch(
|
|
3713
3713
|
() => d.list,
|
|
3714
|
-
(
|
|
3715
|
-
j(
|
|
3714
|
+
(D) => {
|
|
3715
|
+
j(D);
|
|
3716
3716
|
},
|
|
3717
3717
|
{
|
|
3718
3718
|
immediate: !0
|
|
3719
3719
|
}
|
|
3720
3720
|
);
|
|
3721
|
-
const
|
|
3722
|
-
var
|
|
3723
|
-
if ((
|
|
3724
|
-
return (f =
|
|
3721
|
+
const F = computed(() => g.value === 1 ? o.value.length > n.value : o.value.length > n.value * g.value - 1), B = (D) => {
|
|
3722
|
+
var A, f;
|
|
3723
|
+
if ((A = D == null ? void 0 : D.props) != null && A.placeholder)
|
|
3724
|
+
return (f = D == null ? void 0 : D.props) == null ? void 0 : f.placeholder;
|
|
3725
3725
|
if (a.value)
|
|
3726
|
-
return
|
|
3726
|
+
return D.compName.toLocaleLowerCase().includes("input") ? u.value ? "请输入" + D.label : "请输入" : u.value ? "请选择" + D.label : "请选择";
|
|
3727
3727
|
}, I = async () => {
|
|
3728
|
-
await nextTick(),
|
|
3728
|
+
await nextTick(), E.value.resetFields(), setTimeout(() => {
|
|
3729
|
+
_("reset");
|
|
3730
|
+
}, 50);
|
|
3729
3731
|
}, G = async () => {
|
|
3730
|
-
await nextTick(), E.value.validate((
|
|
3731
|
-
|
|
3732
|
+
await nextTick(), E.value.validate((D, A) => {
|
|
3733
|
+
D ? _("pass", N) : _("fail", A, N);
|
|
3732
3734
|
});
|
|
3733
3735
|
};
|
|
3734
|
-
return (
|
|
3736
|
+
return (D, A) => (openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
3735
3737
|
ref_key: "searchFormRef",
|
|
3736
3738
|
ref: E,
|
|
3737
3739
|
style: { minWidth: e.minWidth + "px" },
|
|
3738
3740
|
model: N,
|
|
3739
3741
|
class: "dict-search-box dict-clearfix"
|
|
3740
|
-
},
|
|
3742
|
+
}, D.$attrs), {
|
|
3741
3743
|
default: withCtx(() => [
|
|
3742
|
-
renderSlot(
|
|
3744
|
+
renderSlot(D.$slots, "prepend", {
|
|
3743
3745
|
searchForm: N,
|
|
3744
|
-
fold:
|
|
3746
|
+
fold: C.value,
|
|
3745
3747
|
itemsPerRow: g.value
|
|
3746
3748
|
}, void 0, !0),
|
|
3747
3749
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (f, p) => (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
@@ -3751,7 +3753,7 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3751
3753
|
prop: f.fieldName
|
|
3752
3754
|
}, f.formItemProps), {
|
|
3753
3755
|
default: withCtx(() => {
|
|
3754
|
-
var k,
|
|
3756
|
+
var k, S;
|
|
3755
3757
|
return [
|
|
3756
3758
|
(openBlock(), createBlock(resolveDynamicComponent(f.compName), mergeProps({
|
|
3757
3759
|
modelValue: N[f.fieldName],
|
|
@@ -3761,7 +3763,7 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3761
3763
|
clearable: ((k = f == null ? void 0 : f.props) == null ? void 0 : k.clearable) || !0,
|
|
3762
3764
|
placeholder: B(f)
|
|
3763
3765
|
}, f.props), createSlots({ _: 2 }, [
|
|
3764
|
-
renderList((
|
|
3766
|
+
renderList((S = f == null ? void 0 : f.props) == null ? void 0 : S.slotList, (O, V) => ({
|
|
3765
3767
|
name: O.slotName,
|
|
3766
3768
|
fn: withCtx((R) => [
|
|
3767
3769
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
@@ -3781,9 +3783,9 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3781
3783
|
class: normalizeClass(T(0) + " fr")
|
|
3782
3784
|
}, {
|
|
3783
3785
|
default: withCtx(() => [
|
|
3784
|
-
renderSlot(
|
|
3786
|
+
renderSlot(D.$slots, "button-prefix", {
|
|
3785
3787
|
searchForm: N,
|
|
3786
|
-
fold:
|
|
3788
|
+
fold: C.value,
|
|
3787
3789
|
itemsPerRow: g.value
|
|
3788
3790
|
}, void 0, !0),
|
|
3789
3791
|
withDirectives(createVNode(unref(ElButton), {
|
|
@@ -3808,60 +3810,44 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3808
3810
|
}, 512), [
|
|
3809
3811
|
[vShow, unref(m)]
|
|
3810
3812
|
]),
|
|
3811
|
-
renderSlot(
|
|
3813
|
+
renderSlot(D.$slots, "button-suffix", {
|
|
3812
3814
|
searchForm: N,
|
|
3813
|
-
fold:
|
|
3815
|
+
fold: C.value,
|
|
3814
3816
|
itemsPerRow: g.value
|
|
3815
3817
|
}, void 0, !0),
|
|
3816
|
-
unref(w) &&
|
|
3818
|
+
unref(w) && F.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3817
3819
|
key: 0,
|
|
3818
3820
|
class: "no-underline",
|
|
3819
3821
|
underline: "never",
|
|
3820
3822
|
type: "primary",
|
|
3821
|
-
onClick:
|
|
3823
|
+
onClick: A[0] || (A[0] = (f) => C.value = !C.value)
|
|
3822
3824
|
}, {
|
|
3823
3825
|
default: withCtx(() => [
|
|
3824
|
-
createTextVNode("展开"),
|
|
3825
|
-
createVNode(unref(ElIcon),
|
|
3826
|
+
createTextVNode(toDisplayString(C.value ? "展开" : "收起"), 1),
|
|
3827
|
+
createVNode(unref(ElIcon), {
|
|
3828
|
+
class: normalizeClass(C.value ? "" : "rotate")
|
|
3829
|
+
}, {
|
|
3826
3830
|
default: withCtx(() => [
|
|
3827
3831
|
createVNode(unref(ArrowDown))
|
|
3828
3832
|
]),
|
|
3829
3833
|
_: 1
|
|
3830
|
-
})
|
|
3831
|
-
]),
|
|
3832
|
-
_: 1
|
|
3833
|
-
})) : createCommentVNode("", !0),
|
|
3834
|
-
unref(w) && !D.value && S.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
3835
|
-
key: 1,
|
|
3836
|
-
class: "no-underline",
|
|
3837
|
-
underline: "never",
|
|
3838
|
-
type: "primary",
|
|
3839
|
-
onClick: x[1] || (x[1] = (f) => D.value = !D.value)
|
|
3840
|
-
}, {
|
|
3841
|
-
default: withCtx(() => [
|
|
3842
|
-
createTextVNode("收起"),
|
|
3843
|
-
createVNode(unref(ElIcon), null, {
|
|
3844
|
-
default: withCtx(() => [
|
|
3845
|
-
createVNode(unref(ArrowUp))
|
|
3846
|
-
]),
|
|
3847
|
-
_: 1
|
|
3848
|
-
})
|
|
3834
|
+
}, 8, ["class"])
|
|
3849
3835
|
]),
|
|
3850
3836
|
_: 1
|
|
3851
3837
|
})) : createCommentVNode("", !0)
|
|
3852
3838
|
]),
|
|
3853
3839
|
_: 3
|
|
3854
3840
|
}, 8, ["class"]),
|
|
3855
|
-
renderSlot(
|
|
3841
|
+
renderSlot(D.$slots, "append", {
|
|
3856
3842
|
searchForm: N,
|
|
3857
|
-
fold:
|
|
3843
|
+
fold: C.value,
|
|
3858
3844
|
itemsPerRow: g.value
|
|
3859
3845
|
}, void 0, !0)
|
|
3860
3846
|
]),
|
|
3861
3847
|
_: 3
|
|
3862
3848
|
}, 16, ["style", "model"]));
|
|
3863
3849
|
}
|
|
3864
|
-
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3850
|
+
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-7b1bd4d6"]]);
|
|
3865
3851
|
dictComponent$1.install = function(e) {
|
|
3866
3852
|
e.component(dictComponent$1.name, dictComponent$1);
|
|
3867
3853
|
};
|
|
@@ -3921,7 +3907,7 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3921
3907
|
} : typeof n.value == "object" && n.value !== null ? { ...g, ...n.value } : g;
|
|
3922
3908
|
}), m = (g = t.value) => {
|
|
3923
3909
|
v.value ? c.value = g : w.value ? c.value = Desensitization(g, b.value) : c.value = g;
|
|
3924
|
-
}, _ = inject("elFormItem", null),
|
|
3910
|
+
}, _ = inject("elFormItem", null), C = (g) => {
|
|
3925
3911
|
v.value = !0, m(), s("focus", g);
|
|
3926
3912
|
}, l = (g) => {
|
|
3927
3913
|
v.value = !1, s("update:modelValue", c.value), m(), s("blur", g), _ && _.validate("blur");
|
|
@@ -3944,11 +3930,11 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3944
3930
|
modelValue: c.value,
|
|
3945
3931
|
"onUpdate:modelValue": T[0] || (T[0] = (E) => c.value = E)
|
|
3946
3932
|
}, g.$attrs, {
|
|
3947
|
-
onFocus:
|
|
3933
|
+
onFocus: C,
|
|
3948
3934
|
onBlur: l,
|
|
3949
3935
|
autocomplete: "off"
|
|
3950
3936
|
}), createSlots({ _: 2 }, [
|
|
3951
|
-
renderList(g.$slots, (E, y,
|
|
3937
|
+
renderList(g.$slots, (E, y, x) => ({
|
|
3952
3938
|
name: y,
|
|
3953
3939
|
fn: withCtx((N) => [
|
|
3954
3940
|
renderSlot(g.$slots, y, normalizeProps(guardReactiveProps(N)))
|
|
@@ -4022,28 +4008,28 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4022
4008
|
setup(e, { expose: r, emit: d }) {
|
|
4023
4009
|
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(() => {
|
|
4024
4010
|
const p = {};
|
|
4025
|
-
return Object.entries(b).forEach(([k,
|
|
4011
|
+
return Object.entries(b).forEach(([k, S]) => {
|
|
4026
4012
|
const O = ToKebabCase(k);
|
|
4027
4013
|
if (!O.startsWith("radio-button-") && !O.startsWith("on-radio-button-")) {
|
|
4028
4014
|
const V = ToCamelCase(O);
|
|
4029
|
-
p[V] =
|
|
4015
|
+
p[V] = S;
|
|
4030
4016
|
}
|
|
4031
4017
|
}), p;
|
|
4032
4018
|
}), _ = computed(() => {
|
|
4033
4019
|
const p = {};
|
|
4034
|
-
return Object.entries(b).forEach(([k,
|
|
4020
|
+
return Object.entries(b).forEach(([k, S]) => {
|
|
4035
4021
|
const O = ToKebabCase(k);
|
|
4036
4022
|
if (O.startsWith("radio-button-") || O.startsWith("on-radio-button-")) {
|
|
4037
4023
|
const V = ToCamelCase(O.replace("radio-button-", ""));
|
|
4038
|
-
p[V] =
|
|
4024
|
+
p[V] = S;
|
|
4039
4025
|
}
|
|
4040
4026
|
}), p;
|
|
4041
|
-
}),
|
|
4027
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (p) => {
|
|
4042
4028
|
if (!c.value) {
|
|
4043
4029
|
g("dictChange", p);
|
|
4044
4030
|
return;
|
|
4045
4031
|
}
|
|
4046
|
-
const k = E.list.find((
|
|
4032
|
+
const k = E.list.find((S) => S[l.format.value] === p);
|
|
4047
4033
|
g("dictChange", k);
|
|
4048
4034
|
}, E = reactive({
|
|
4049
4035
|
list: []
|
|
@@ -4052,15 +4038,15 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4052
4038
|
return;
|
|
4053
4039
|
let p = [];
|
|
4054
4040
|
if (typeof i.value == "object") {
|
|
4055
|
-
|
|
4056
|
-
const k = await store.actions.getDictDataObj(
|
|
4057
|
-
p = [].concat(k[
|
|
4058
|
-
const { filters:
|
|
4041
|
+
C.value = i.value.type;
|
|
4042
|
+
const k = await store.actions.getDictDataObj(C.value);
|
|
4043
|
+
p = [].concat(k[C.value]);
|
|
4044
|
+
const { filters: S, filterType: O = l.format.value, reverse: V = !1 } = i.value, R = typeof S == "string" ? S.split(",") : S;
|
|
4059
4045
|
V ? p = p.filter((J) => !R.includes(J[O])) : p = p.filter((J) => R.includes(J[O]));
|
|
4060
4046
|
} else {
|
|
4061
|
-
|
|
4062
|
-
const k = await store.actions.getDictDataObj(
|
|
4063
|
-
p = [].concat(k[
|
|
4047
|
+
C.value = i.value;
|
|
4048
|
+
const k = await store.actions.getDictDataObj(C.value);
|
|
4049
|
+
p = [].concat(k[C.value]);
|
|
4064
4050
|
}
|
|
4065
4051
|
if (v.value && (p = v.value(p)), w.value)
|
|
4066
4052
|
p = p.map((k) => ({
|
|
@@ -4068,24 +4054,24 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4068
4054
|
[l.format.disabled]: w.value(k)
|
|
4069
4055
|
}));
|
|
4070
4056
|
else if (s.value) {
|
|
4071
|
-
const { disabledValues: k, disabledType:
|
|
4057
|
+
const { disabledValues: k, disabledType: S = l.format.value, reverse: O = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4072
4058
|
O ? p = p.map((R) => {
|
|
4073
4059
|
const J = JSON.parse(JSON.stringify(R));
|
|
4074
|
-
return J[l.format.disabled] = !V.includes(J[
|
|
4060
|
+
return J[l.format.disabled] = !V.includes(J[S]) || J[l.format.disabled], J;
|
|
4075
4061
|
}) : p = p.map((R) => {
|
|
4076
4062
|
const J = JSON.parse(JSON.stringify(R));
|
|
4077
|
-
return J[l.format.disabled] = V.includes(J[
|
|
4063
|
+
return J[l.format.disabled] = V.includes(J[S]) || J[l.format.disabled], J;
|
|
4078
4064
|
});
|
|
4079
4065
|
}
|
|
4080
4066
|
a.value && p.unshift({
|
|
4081
4067
|
[l.format.value]: "",
|
|
4082
4068
|
[l.format.label]: a.value
|
|
4083
4069
|
}), E.list = p;
|
|
4084
|
-
},
|
|
4070
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), N = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value), F = inject(formItemContextKey), B = inject(formContextKey), I = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (F == null ? void 0 : F.disabled) || (B == null ? void 0 : B.disabled) || !1);
|
|
4085
4071
|
watch(
|
|
4086
|
-
[
|
|
4087
|
-
([p, k,
|
|
4088
|
-
!p && !k &&
|
|
4072
|
+
[x, N, j],
|
|
4073
|
+
([p, k, S]) => {
|
|
4074
|
+
!p && !k && S && S.length === 0 && y(), S.length > 0 && (E.list = JSON.parse(JSON.stringify(S)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((V) => ({
|
|
4089
4075
|
[l.format.value]: V[o.value.value],
|
|
4090
4076
|
[l.format.label]: V[o.value.label],
|
|
4091
4077
|
[l.format.disabled]: !!V[o.value.disabled],
|
|
@@ -4102,31 +4088,31 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4102
4088
|
immediate: !0
|
|
4103
4089
|
}
|
|
4104
4090
|
);
|
|
4105
|
-
const G = ref([]),
|
|
4106
|
-
return r({ getElRadioGroupRef: () =>
|
|
4091
|
+
const G = ref([]), D = () => G.value, A = ref(null);
|
|
4092
|
+
return r({ getElRadioGroupRef: () => A.value, getElRadioButtonRefs: D }), (p, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4107
4093
|
ref_key: "ElRadioGroupRef",
|
|
4108
|
-
ref:
|
|
4094
|
+
ref: A,
|
|
4109
4095
|
disabled: I.value
|
|
4110
4096
|
}, m.value, { onChange: T }), createSlots({
|
|
4111
4097
|
default: withCtx(() => [
|
|
4112
|
-
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (
|
|
4098
|
+
p.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (S, O) => (openBlock(), createBlock(unref(ElRadioButton), mergeProps({
|
|
4113
4099
|
ref_for: !0,
|
|
4114
4100
|
ref: (V) => {
|
|
4115
4101
|
V && (G.value[O] = V);
|
|
4116
4102
|
},
|
|
4117
|
-
key:
|
|
4118
|
-
disabled: I.value ||
|
|
4119
|
-
label:
|
|
4103
|
+
key: S[unref(l).format.value],
|
|
4104
|
+
disabled: I.value || S[unref(l).format.disabled],
|
|
4105
|
+
label: S[unref(l).format.value]
|
|
4120
4106
|
}, _.value), {
|
|
4121
4107
|
default: withCtx(() => [
|
|
4122
|
-
createTextVNode(toDisplayString(
|
|
4108
|
+
createTextVNode(toDisplayString(S[unref(l).format.label]), 1)
|
|
4123
4109
|
]),
|
|
4124
4110
|
_: 2
|
|
4125
4111
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4126
4112
|
]),
|
|
4127
4113
|
_: 2
|
|
4128
4114
|
}, [
|
|
4129
|
-
renderList(p.$slots, (
|
|
4115
|
+
renderList(p.$slots, (S, O, V) => ({
|
|
4130
4116
|
name: O,
|
|
4131
4117
|
fn: withCtx((R) => [
|
|
4132
4118
|
renderSlot(p.$slots, O, normalizeProps(guardReactiveProps(R)))
|
|
@@ -4195,28 +4181,28 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4195
4181
|
setup(e, { expose: r, emit: d }) {
|
|
4196
4182
|
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(() => {
|
|
4197
4183
|
const p = {};
|
|
4198
|
-
return Object.entries(b).forEach(([k,
|
|
4184
|
+
return Object.entries(b).forEach(([k, S]) => {
|
|
4199
4185
|
const O = ToKebabCase(k);
|
|
4200
4186
|
if (!O.startsWith("radio-") && !O.startsWith("on-radio-")) {
|
|
4201
4187
|
const V = ToCamelCase(O);
|
|
4202
|
-
p[V] =
|
|
4188
|
+
p[V] = S;
|
|
4203
4189
|
}
|
|
4204
4190
|
}), p;
|
|
4205
4191
|
}), _ = computed(() => {
|
|
4206
4192
|
const p = {};
|
|
4207
|
-
return Object.entries(b).forEach(([k,
|
|
4193
|
+
return Object.entries(b).forEach(([k, S]) => {
|
|
4208
4194
|
const O = ToKebabCase(k);
|
|
4209
4195
|
if (O.startsWith("radio-") || O.startsWith("on-radio-")) {
|
|
4210
4196
|
const V = ToCamelCase(O.replace("radio-", ""));
|
|
4211
|
-
p[V] =
|
|
4197
|
+
p[V] = S;
|
|
4212
4198
|
}
|
|
4213
4199
|
}), p;
|
|
4214
|
-
}),
|
|
4200
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (p) => {
|
|
4215
4201
|
if (!c.value) {
|
|
4216
4202
|
g("dictChange", p);
|
|
4217
4203
|
return;
|
|
4218
4204
|
}
|
|
4219
|
-
const k = E.list.find((
|
|
4205
|
+
const k = E.list.find((S) => S[l.format.value] === p);
|
|
4220
4206
|
g("dictChange", k);
|
|
4221
4207
|
}, E = reactive({
|
|
4222
4208
|
list: []
|
|
@@ -4225,15 +4211,15 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4225
4211
|
return;
|
|
4226
4212
|
let p = [];
|
|
4227
4213
|
if (typeof i.value == "object") {
|
|
4228
|
-
|
|
4229
|
-
const k = await store.actions.getDictDataObj(
|
|
4230
|
-
p = [].concat(k[
|
|
4231
|
-
const { filters:
|
|
4214
|
+
C.value = i.value.type;
|
|
4215
|
+
const k = await store.actions.getDictDataObj(C.value);
|
|
4216
|
+
p = [].concat(k[C.value]);
|
|
4217
|
+
const { filters: S, filterType: O = l.format.value, reverse: V = !1 } = i.value, R = typeof S == "string" ? S.split(",") : S;
|
|
4232
4218
|
V ? p = p.filter((J) => !R.includes(J[O])) : p = p.filter((J) => R.includes(J[O]));
|
|
4233
4219
|
} else {
|
|
4234
|
-
|
|
4235
|
-
const k = await store.actions.getDictDataObj(
|
|
4236
|
-
p = [].concat(k[
|
|
4220
|
+
C.value = i.value;
|
|
4221
|
+
const k = await store.actions.getDictDataObj(C.value);
|
|
4222
|
+
p = [].concat(k[C.value]);
|
|
4237
4223
|
}
|
|
4238
4224
|
if (v.value && (p = v.value(p)), w.value)
|
|
4239
4225
|
p = p.map((k) => ({
|
|
@@ -4241,24 +4227,24 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4241
4227
|
[l.format.disabled]: w.value(k)
|
|
4242
4228
|
}));
|
|
4243
4229
|
else if (s.value) {
|
|
4244
|
-
const { disabledValues: k, disabledType:
|
|
4230
|
+
const { disabledValues: k, disabledType: S = l.format.value, reverse: O = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4245
4231
|
O ? p = p.map((R) => {
|
|
4246
4232
|
const J = JSON.parse(JSON.stringify(R));
|
|
4247
|
-
return J[l.format.disabled] = !V.includes(J[
|
|
4233
|
+
return J[l.format.disabled] = !V.includes(J[S]) || J[l.format.disabled], J;
|
|
4248
4234
|
}) : p = p.map((R) => {
|
|
4249
4235
|
const J = JSON.parse(JSON.stringify(R));
|
|
4250
|
-
return J[l.format.disabled] = V.includes(J[
|
|
4236
|
+
return J[l.format.disabled] = V.includes(J[S]) || J[l.format.disabled], J;
|
|
4251
4237
|
});
|
|
4252
4238
|
}
|
|
4253
4239
|
a.value && p.unshift({
|
|
4254
4240
|
[l.format.value]: "",
|
|
4255
4241
|
[l.format.label]: a.value
|
|
4256
4242
|
}), E.list = p;
|
|
4257
|
-
},
|
|
4243
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), N = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value), F = inject(formItemContextKey), B = inject(formContextKey), I = computed(() => n.value || b["radio-disabled"] === "" || b["radio-disabled"] || b.radioDisabled === "" || b.radioDisabled || b.RadioDisabled === "" || b.RadioDisabled || (F == null ? void 0 : F.disabled) || (B == null ? void 0 : B.disabled) || !1);
|
|
4258
4244
|
watch(
|
|
4259
|
-
[
|
|
4260
|
-
([p, k,
|
|
4261
|
-
!p && !k &&
|
|
4245
|
+
[x, N, j],
|
|
4246
|
+
([p, k, S]) => {
|
|
4247
|
+
!p && !k && S && S.length === 0 && y(), S.length > 0 && (E.list = JSON.parse(JSON.stringify(S)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((V) => ({
|
|
4262
4248
|
[l.format.value]: V[o.value.value],
|
|
4263
4249
|
[l.format.label]: V[o.value.label],
|
|
4264
4250
|
[l.format.disabled]: !!V[o.value.disabled],
|
|
@@ -4275,31 +4261,31 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4275
4261
|
immediate: !0
|
|
4276
4262
|
}
|
|
4277
4263
|
);
|
|
4278
|
-
const G = ref([]),
|
|
4279
|
-
return r({ geElRadioGroupRef: () =>
|
|
4264
|
+
const G = ref([]), D = () => G.value, A = ref(null);
|
|
4265
|
+
return r({ geElRadioGroupRef: () => A.value, getElRadioRefs: D }), (p, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4280
4266
|
ref_key: "ElRadioGroupRef",
|
|
4281
|
-
ref:
|
|
4267
|
+
ref: A,
|
|
4282
4268
|
disabled: I.value
|
|
4283
4269
|
}, m.value, { onChange: T }), createSlots({
|
|
4284
4270
|
default: withCtx(() => [
|
|
4285
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4271
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (S, O) => (openBlock(), createBlock(unref(ElRadio), mergeProps({
|
|
4286
4272
|
ref_for: !0,
|
|
4287
4273
|
ref: (V) => {
|
|
4288
4274
|
V && (G.value[O] = V);
|
|
4289
4275
|
},
|
|
4290
|
-
key:
|
|
4291
|
-
disabled: I.value ||
|
|
4292
|
-
label:
|
|
4276
|
+
key: S[unref(l).format.value],
|
|
4277
|
+
disabled: I.value || S[unref(l).format.disabled],
|
|
4278
|
+
label: S[unref(l).format.value]
|
|
4293
4279
|
}, _.value), {
|
|
4294
4280
|
default: withCtx(() => [
|
|
4295
|
-
createTextVNode(toDisplayString(
|
|
4281
|
+
createTextVNode(toDisplayString(S[unref(l).format.label]), 1)
|
|
4296
4282
|
]),
|
|
4297
4283
|
_: 2
|
|
4298
4284
|
}, 1040, ["disabled", "label"]))), 128))
|
|
4299
4285
|
]),
|
|
4300
4286
|
_: 2
|
|
4301
4287
|
}, [
|
|
4302
|
-
renderList(p.$slots, (
|
|
4288
|
+
renderList(p.$slots, (S, O, V) => ({
|
|
4303
4289
|
name: O,
|
|
4304
4290
|
fn: withCtx((R) => [
|
|
4305
4291
|
renderSlot(p.$slots, O, normalizeProps(guardReactiveProps(R)))
|
|
@@ -4370,18 +4356,18 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4370
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(), _ = computed(() => {
|
|
4371
4357
|
const f = {};
|
|
4372
4358
|
return Object.entries(m).forEach(([p, k]) => {
|
|
4373
|
-
const
|
|
4374
|
-
if (!
|
|
4375
|
-
const O = ToCamelCase(
|
|
4359
|
+
const S = ToKebabCase(p);
|
|
4360
|
+
if (!S.startsWith("option-") && !S.startsWith("on-option-")) {
|
|
4361
|
+
const O = ToCamelCase(S);
|
|
4376
4362
|
f[O] = k;
|
|
4377
4363
|
}
|
|
4378
4364
|
}), f;
|
|
4379
|
-
}),
|
|
4365
|
+
}), C = computed(() => {
|
|
4380
4366
|
const f = {};
|
|
4381
4367
|
return Object.entries(m).forEach(([p, k]) => {
|
|
4382
|
-
const
|
|
4383
|
-
if (
|
|
4384
|
-
const O = ToCamelCase(
|
|
4368
|
+
const S = ToKebabCase(p);
|
|
4369
|
+
if (S.startsWith("option-") || S.startsWith("on-option-")) {
|
|
4370
|
+
const O = ToCamelCase(S.replace("option-", ""));
|
|
4385
4371
|
f[O] = k;
|
|
4386
4372
|
}
|
|
4387
4373
|
}), f;
|
|
@@ -4399,7 +4385,7 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4399
4385
|
}
|
|
4400
4386
|
}, y = reactive({
|
|
4401
4387
|
list: []
|
|
4402
|
-
}),
|
|
4388
|
+
}), x = async () => {
|
|
4403
4389
|
if (!s.value || o.value && o.value.length > 0)
|
|
4404
4390
|
return;
|
|
4405
4391
|
let f = [];
|
|
@@ -4407,8 +4393,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4407
4393
|
l.value = s.value.type;
|
|
4408
4394
|
const p = await store.actions.getDictDataObj(l.value);
|
|
4409
4395
|
f = [].concat(p[l.value]);
|
|
4410
|
-
const { filters: k, filterType:
|
|
4411
|
-
O ? f = f.filter((R) => !V.includes(R[
|
|
4396
|
+
const { filters: k, filterType: S = g.format.value, reverse: O = !1 } = s.value, V = typeof k == "string" ? k.split(",") : k;
|
|
4397
|
+
O ? f = f.filter((R) => !V.includes(R[S])) : f = f.filter((R) => V.includes(R[S]));
|
|
4412
4398
|
} else {
|
|
4413
4399
|
l.value = s.value;
|
|
4414
4400
|
const p = await store.actions.getDictDataObj(l.value);
|
|
@@ -4420,8 +4406,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4420
4406
|
[g.format.disabled]: b.value(p)
|
|
4421
4407
|
}));
|
|
4422
4408
|
else if (c.value) {
|
|
4423
|
-
const { disabledValues: p, disabledType: k = g.format.value, reverse:
|
|
4424
|
-
|
|
4409
|
+
const { disabledValues: p, disabledType: k = g.format.value, reverse: S = !1 } = c.value, O = typeof p == "string" ? p.split(",") : p;
|
|
4410
|
+
S ? f = f.map((V) => {
|
|
4425
4411
|
const R = JSON.parse(JSON.stringify(V));
|
|
4426
4412
|
return R[g.format.disabled] = !O.includes(R[k]) || R[g.format.disabled], R;
|
|
4427
4413
|
}) : f = f.map((V) => {
|
|
@@ -4433,32 +4419,32 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4433
4419
|
[g.format.value]: "",
|
|
4434
4420
|
[g.format.label]: n.value
|
|
4435
4421
|
}), y.list = f;
|
|
4436
|
-
}, N = computed(() => store.state.isGettingDictTypes.includes(l.value)), j = computed(() => store.state.isGettingAllDictTypes),
|
|
4422
|
+
}, N = computed(() => store.state.isGettingDictTypes.includes(l.value)), j = computed(() => store.state.isGettingAllDictTypes), F = computed(() => o.value);
|
|
4437
4423
|
watch(
|
|
4438
|
-
[N, j,
|
|
4424
|
+
[N, j, F],
|
|
4439
4425
|
([f, p, k]) => {
|
|
4440
|
-
if (!f && !p && k && k.length === 0 &&
|
|
4441
|
-
let
|
|
4442
|
-
|
|
4426
|
+
if (!f && !p && k && k.length === 0 && x(), k.length > 0) {
|
|
4427
|
+
let S = JSON.parse(JSON.stringify(k));
|
|
4428
|
+
S.length > 0 && (Object.prototype.toString.call(S[0]) === "[object Object]" ? S = S.map((V) => ({
|
|
4443
4429
|
[g.format.value]: V[i.value.value],
|
|
4444
4430
|
[g.format.label]: V[i.value.label],
|
|
4445
4431
|
[g.format.disabled]: !!V[i.value.disabled],
|
|
4446
4432
|
...V
|
|
4447
|
-
})) :
|
|
4433
|
+
})) : S = S.map((V) => ({
|
|
4448
4434
|
[g.format.value]: V,
|
|
4449
4435
|
[g.format.label]: V
|
|
4450
|
-
})), n.value && !m.multiple && m.multiple !== "" &&
|
|
4436
|
+
})), n.value && !m.multiple && m.multiple !== "" && S.unshift({
|
|
4451
4437
|
[g.format.value]: "",
|
|
4452
4438
|
[g.format.label]: n.value
|
|
4453
|
-
}), y.list =
|
|
4439
|
+
}), y.list = S);
|
|
4454
4440
|
}
|
|
4455
4441
|
},
|
|
4456
4442
|
{
|
|
4457
4443
|
immediate: !0
|
|
4458
4444
|
}
|
|
4459
4445
|
);
|
|
4460
|
-
const B = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value, I = ref(null), G = () => I.value,
|
|
4461
|
-
return r({ getElSelectRef: G, getElOptionRefs: () =>
|
|
4446
|
+
const B = () => n.value && !m.multiple && m.multiple !== "" ? "" : u.value, I = ref(null), G = () => I.value, D = ref([]);
|
|
4447
|
+
return r({ getElSelectRef: G, getElOptionRefs: () => D.value }), (f, p) => (openBlock(), createBlock(unref(ElSelect), mergeProps({
|
|
4462
4448
|
ref_key: "ElSelectRef",
|
|
4463
4449
|
ref: I
|
|
4464
4450
|
}, _.value, {
|
|
@@ -4472,21 +4458,21 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4472
4458
|
default: withCtx(() => [
|
|
4473
4459
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.list, (k) => (openBlock(), createBlock(unref(ElOption), mergeProps({
|
|
4474
4460
|
ref_for: !0,
|
|
4475
|
-
ref: (
|
|
4476
|
-
|
|
4461
|
+
ref: (S) => {
|
|
4462
|
+
S && (D.value[f.index] = S);
|
|
4477
4463
|
},
|
|
4478
4464
|
key: k[unref(g).format.value],
|
|
4479
4465
|
disabled: k[unref(g).format.disabled],
|
|
4480
4466
|
label: k[unref(g).format.label],
|
|
4481
4467
|
value: k[unref(g).format.value]
|
|
4482
|
-
},
|
|
4468
|
+
}, C.value), null, 16, ["disabled", "label", "value"]))), 128))
|
|
4483
4469
|
]),
|
|
4484
4470
|
_: 2
|
|
4485
4471
|
}, [
|
|
4486
|
-
renderList(f.$slots, (k,
|
|
4487
|
-
name:
|
|
4472
|
+
renderList(f.$slots, (k, S, O) => ({
|
|
4473
|
+
name: S,
|
|
4488
4474
|
fn: withCtx((V) => [
|
|
4489
|
-
renderSlot(f.$slots,
|
|
4475
|
+
renderSlot(f.$slots, S, mergeProps({ key: O }, V))
|
|
4490
4476
|
])
|
|
4491
4477
|
}))
|
|
4492
4478
|
]), 1040, ["empty-values", "value-key", "class"]));
|
|
@@ -4579,19 +4565,19 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4579
4565
|
}
|
|
4580
4566
|
},
|
|
4581
4567
|
setup(e, { expose: r }) {
|
|
4582
|
-
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: _, maskEnd:
|
|
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: _, maskEnd: C, maskMiddle: l, maskSymbol: g } = toRefs(t), T = computed(() => {
|
|
4583
4569
|
const B = {};
|
|
4584
4570
|
return i.value !== void 0 && i.value !== null && (B.defaultVal = i.value), n.value !== void 0 && n.value !== null && (B.emptyText = n.value), c.value !== void 0 && c.value !== null && (B.formatFun = c.value), b.value !== void 0 && b.value !== null && (B.spacer = b.value), B;
|
|
4585
4571
|
}), E = computed(() => {
|
|
4586
4572
|
const B = {};
|
|
4587
4573
|
return i.value !== void 0 && i.value !== null && (B.defaultVal = i.value), n.value !== void 0 && n.value !== null && (B.emptyText = n.value), v.value !== void 0 && v.value !== null && (B.formatFunIn = v.value), w.value !== void 0 && w.value !== null && (B.formatFunOut = w.value), s.value !== void 0 && s.value !== null && (B.treeSetting = s.value), b.value !== void 0 && b.value !== null && (B.spacer = b.value), B;
|
|
4588
|
-
}), y = computed(() => !!m.value || !!_.value || !!l.value || !!
|
|
4574
|
+
}), y = computed(() => !!m.value || !!_.value || !!l.value || !!C.value), x = computed(() => {
|
|
4589
4575
|
if (m.value) {
|
|
4590
4576
|
if (Array.isArray(m.value))
|
|
4591
4577
|
return {
|
|
4592
4578
|
start: _.value || m.value[0] || 0,
|
|
4593
4579
|
middle: l.value || m.value[1] || 0,
|
|
4594
|
-
end:
|
|
4580
|
+
end: C.value || m.value[2] || 0,
|
|
4595
4581
|
symbol: g.value || m.value[3] || "*",
|
|
4596
4582
|
defaultVal: i.value
|
|
4597
4583
|
};
|
|
@@ -4599,7 +4585,7 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4599
4585
|
const B = {
|
|
4600
4586
|
start: _.value || 0,
|
|
4601
4587
|
middle: l.value || 0,
|
|
4602
|
-
end:
|
|
4588
|
+
end: C.value || 0,
|
|
4603
4589
|
symbol: g.value || "*",
|
|
4604
4590
|
defaultVal: i.value
|
|
4605
4591
|
};
|
|
@@ -4610,7 +4596,7 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4610
4596
|
return {
|
|
4611
4597
|
start: _.value || 0,
|
|
4612
4598
|
middle: l.value || 0,
|
|
4613
|
-
end:
|
|
4599
|
+
end: C.value || 0,
|
|
4614
4600
|
symbol: g.value || "*",
|
|
4615
4601
|
defaultVal: i.value
|
|
4616
4602
|
};
|
|
@@ -4620,14 +4606,14 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4620
4606
|
ref: j
|
|
4621
4607
|
}, B.$attrs), createSlots({
|
|
4622
4608
|
default: withCtx((G) => {
|
|
4623
|
-
var
|
|
4609
|
+
var D, A, f, p, k, S, O, V, R, J, P, K;
|
|
4624
4610
|
return [
|
|
4625
4611
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4626
|
-
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(N(G.row[(
|
|
4612
|
+
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(N(G.row[(D = unref(d)) == null ? void 0 : D.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$n, {
|
|
4627
4613
|
key: M,
|
|
4628
4614
|
modelValue: L || "",
|
|
4629
4615
|
dictType: unref(a)
|
|
4630
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(N(G.row[(
|
|
4616
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(N(G.row[(A = unref(d)) == null ? void 0 : A.prop], T.value), (L, M) => (openBlock(), createBlock(_sfc_main$e, {
|
|
4631
4617
|
key: M,
|
|
4632
4618
|
modelValue: L || "",
|
|
4633
4619
|
dictType: unref(a)
|
|
@@ -4642,12 +4628,12 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4642
4628
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4643
4629
|
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(G.row[(k = unref(d)) == null ? void 0 : k.prop], unref(a), T.value)), 1)
|
|
4644
4630
|
], 64))
|
|
4645
|
-
], 64)) : unref(u) && G.row[(
|
|
4631
|
+
], 64)) : unref(u) && G.row[(S = unref(d)) == null ? void 0 : S.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4646
4632
|
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(G.row[(O = unref(d)) == null ? void 0 : O.prop], unref(u), E.value)), 1)
|
|
4647
4633
|
], 64)) : unref(o) && G.row[(V = unref(d)) == null ? void 0 : V.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4648
4634
|
createTextVNode(toDisplayString(unref(FormatDate)(G.row[(R = unref(d)) == null ? void 0 : R.prop], unref(o), unref(i))), 1)
|
|
4649
4635
|
], 64)) : y.value && G.row[(J = unref(d)) == null ? void 0 : J.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4650
|
-
createTextVNode(toDisplayString(unref(Desensitization)(G.row[(P = unref(d)) == null ? void 0 : P.prop],
|
|
4636
|
+
createTextVNode(toDisplayString(unref(Desensitization)(G.row[(P = unref(d)) == null ? void 0 : P.prop], x.value)), 1)
|
|
4651
4637
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4652
4638
|
createTextVNode(toDisplayString(G.row[(K = unref(d)) == null ? void 0 : K.prop] || unref(i)), 1)
|
|
4653
4639
|
], 64))
|
|
@@ -4655,10 +4641,10 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4655
4641
|
}),
|
|
4656
4642
|
_: 2
|
|
4657
4643
|
}, [
|
|
4658
|
-
renderList(B.$slots, (G,
|
|
4659
|
-
name:
|
|
4644
|
+
renderList(B.$slots, (G, D, A) => ({
|
|
4645
|
+
name: D,
|
|
4660
4646
|
fn: withCtx((f) => [
|
|
4661
|
-
renderSlot(B.$slots,
|
|
4647
|
+
renderSlot(B.$slots, D, mergeProps({ key: A }, f), void 0, !0)
|
|
4662
4648
|
])
|
|
4663
4649
|
}))
|
|
4664
4650
|
]), 1040));
|
|
@@ -4722,73 +4708,73 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4722
4708
|
emits: ["dictChange"],
|
|
4723
4709
|
setup(e, { expose: r, emit: d }) {
|
|
4724
4710
|
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(() => {
|
|
4725
|
-
const
|
|
4726
|
-
return Object.entries(t).forEach(([
|
|
4727
|
-
const p = ToKebabCase(
|
|
4711
|
+
const D = {};
|
|
4712
|
+
return Object.entries(t).forEach(([A, f]) => {
|
|
4713
|
+
const p = ToKebabCase(A);
|
|
4728
4714
|
if (!p.startsWith("tab-pane-") && !p.startsWith("on-tab-pane-")) {
|
|
4729
4715
|
const k = ToCamelCase(p);
|
|
4730
|
-
|
|
4716
|
+
D[k] = f;
|
|
4731
4717
|
}
|
|
4732
|
-
}),
|
|
4718
|
+
}), D;
|
|
4733
4719
|
}), _ = computed(() => {
|
|
4734
|
-
const
|
|
4735
|
-
return Object.entries(t).forEach(([
|
|
4736
|
-
const p = ToKebabCase(
|
|
4720
|
+
const D = {};
|
|
4721
|
+
return Object.entries(t).forEach(([A, f]) => {
|
|
4722
|
+
const p = ToKebabCase(A);
|
|
4737
4723
|
if (p.startsWith("tab-pane-") || p.startsWith("on-tab-pane-")) {
|
|
4738
4724
|
const k = ToCamelCase(p.replace("tab-pane-", ""));
|
|
4739
|
-
|
|
4725
|
+
D[k] = f;
|
|
4740
4726
|
}
|
|
4741
|
-
}),
|
|
4742
|
-
}),
|
|
4727
|
+
}), D;
|
|
4728
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), g = d, T = (D) => {
|
|
4743
4729
|
window.setTimeout(() => {
|
|
4744
4730
|
if (!v.value) {
|
|
4745
4731
|
g("dictChange", t.modelValue);
|
|
4746
4732
|
return;
|
|
4747
4733
|
}
|
|
4748
|
-
const
|
|
4749
|
-
g("dictChange",
|
|
4734
|
+
const A = E.list.find((f) => f[l.format.value] === t.modelValue);
|
|
4735
|
+
g("dictChange", A);
|
|
4750
4736
|
}, 0);
|
|
4751
4737
|
}, E = reactive({
|
|
4752
4738
|
list: []
|
|
4753
4739
|
}), y = async () => {
|
|
4754
4740
|
if (!s.value || u.value && u.value.length > 0)
|
|
4755
4741
|
return;
|
|
4756
|
-
let
|
|
4742
|
+
let D = [];
|
|
4757
4743
|
if (typeof s.value == "object") {
|
|
4758
|
-
|
|
4759
|
-
const
|
|
4760
|
-
|
|
4761
|
-
const { filters: f, filterType: p = l.format.value, reverse: k = !1 } = s.value,
|
|
4762
|
-
k ?
|
|
4744
|
+
C.value = s.value.type;
|
|
4745
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
4746
|
+
D = [].concat(A[C.value]);
|
|
4747
|
+
const { filters: f, filterType: p = l.format.value, reverse: k = !1 } = s.value, S = typeof f == "string" ? f.split(",") : f;
|
|
4748
|
+
k ? D = D.filter((O) => !S.includes(O[p])) : D = D.filter((O) => S.includes(O[p]));
|
|
4763
4749
|
} else {
|
|
4764
|
-
|
|
4765
|
-
const
|
|
4766
|
-
|
|
4750
|
+
C.value = s.value;
|
|
4751
|
+
const A = await store.actions.getDictDataObj(C.value);
|
|
4752
|
+
D = [].concat(A[C.value]);
|
|
4767
4753
|
}
|
|
4768
|
-
if (w.value && (
|
|
4769
|
-
|
|
4770
|
-
...
|
|
4771
|
-
[l.format.disabled]: b.value(
|
|
4754
|
+
if (w.value && (D = w.value(D)), b.value)
|
|
4755
|
+
D = D.map((A) => ({
|
|
4756
|
+
...A,
|
|
4757
|
+
[l.format.disabled]: b.value(A)
|
|
4772
4758
|
}));
|
|
4773
4759
|
else if (c.value) {
|
|
4774
|
-
const { disabledValues:
|
|
4775
|
-
p ?
|
|
4776
|
-
const O = JSON.parse(JSON.stringify(
|
|
4760
|
+
const { disabledValues: A, disabledType: f = l.format.value, reverse: p = !1 } = c.value, k = typeof A == "string" ? A.split(",") : A;
|
|
4761
|
+
p ? D = D.map((S) => {
|
|
4762
|
+
const O = JSON.parse(JSON.stringify(S));
|
|
4777
4763
|
return O[l.format.disabled] = !k.includes(O[f]) || O[l.format.disabled], O;
|
|
4778
|
-
}) :
|
|
4779
|
-
const O = JSON.parse(JSON.stringify(
|
|
4764
|
+
}) : D = D.map((S) => {
|
|
4765
|
+
const O = JSON.parse(JSON.stringify(S));
|
|
4780
4766
|
return O[l.format.disabled] = k.includes(O[f]) || O[l.format.disabled], O;
|
|
4781
4767
|
});
|
|
4782
4768
|
}
|
|
4783
|
-
a.value &&
|
|
4769
|
+
a.value && D.unshift({
|
|
4784
4770
|
[l.format.value]: "",
|
|
4785
4771
|
[l.format.label]: a.value
|
|
4786
|
-
}), E.list =
|
|
4787
|
-
},
|
|
4772
|
+
}), E.list = D;
|
|
4773
|
+
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), N = computed(() => store.state.isGettingAllDictTypes), j = computed(() => u.value);
|
|
4788
4774
|
watch(
|
|
4789
|
-
[
|
|
4790
|
-
([
|
|
4791
|
-
!
|
|
4775
|
+
[x, N, j],
|
|
4776
|
+
([D, A, f]) => {
|
|
4777
|
+
!D && !A && f && f.length === 0 && y(), f.length > 0 && (E.list = JSON.parse(JSON.stringify(f)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((k) => ({
|
|
4792
4778
|
[l.format.value]: k[o.value.value],
|
|
4793
4779
|
[l.format.label]: k[o.value.label],
|
|
4794
4780
|
[l.format.disabled]: !!k[o.value.disabled],
|
|
@@ -4805,19 +4791,19 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4805
4791
|
immediate: !0
|
|
4806
4792
|
}
|
|
4807
4793
|
);
|
|
4808
|
-
const
|
|
4809
|
-
return r({ getElTabsRef: B, getElTabPaneRefs: () => I.value }), (
|
|
4794
|
+
const F = ref(null), B = () => F.value, I = ref([]);
|
|
4795
|
+
return r({ getElTabsRef: B, getElTabPaneRefs: () => I.value }), (D, A) => {
|
|
4810
4796
|
const f = resolveComponent("el-badge");
|
|
4811
4797
|
return openBlock(), createBlock(unref(ElTabs), mergeProps({
|
|
4812
4798
|
ref_key: "ElTabsRef",
|
|
4813
|
-
ref:
|
|
4799
|
+
ref: F,
|
|
4814
4800
|
class: "vue-element-dict-tabs"
|
|
4815
4801
|
}, m.value, { onTabClick: T }), {
|
|
4816
4802
|
default: withCtx(() => [
|
|
4817
4803
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (p) => (openBlock(), createBlock(unref(ElTabPane), mergeProps({
|
|
4818
4804
|
ref_for: !0,
|
|
4819
4805
|
ref: (k) => {
|
|
4820
|
-
k && (I.value[
|
|
4806
|
+
k && (I.value[D.index] = k);
|
|
4821
4807
|
},
|
|
4822
4808
|
disabled: p[unref(l).format.disabled],
|
|
4823
4809
|
label: p[unref(l).format.label],
|
|
@@ -4825,7 +4811,7 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4825
4811
|
name: p[unref(l).format.value]
|
|
4826
4812
|
}, _.value), createSlots({
|
|
4827
4813
|
default: withCtx(() => [
|
|
4828
|
-
renderSlot(
|
|
4814
|
+
renderSlot(D.$slots, p[unref(l).format.value] ? "tabs-item-" + p[unref(l).format.value] : "tabs-item")
|
|
4829
4815
|
]),
|
|
4830
4816
|
_: 2
|
|
4831
4817
|
}, [
|
|
@@ -4897,23 +4883,23 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4897
4883
|
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({
|
|
4898
4884
|
list: []
|
|
4899
4885
|
}), w = computed(() => {
|
|
4900
|
-
const y = JSON.parse(JSON.stringify(c.treeSetting)),
|
|
4901
|
-
valueField:
|
|
4902
|
-
labelField:
|
|
4903
|
-
childrenField:
|
|
4904
|
-
leafField:
|
|
4905
|
-
disabled:
|
|
4886
|
+
const y = JSON.parse(JSON.stringify(c.treeSetting)), x = d.props || {}, N = {
|
|
4887
|
+
valueField: x != null && x.value ? x.value : y.valueField,
|
|
4888
|
+
labelField: x != null && x.label ? x.label : y.labelField,
|
|
4889
|
+
childrenField: x != null && x.children ? x.children : y.childrenField,
|
|
4890
|
+
leafField: x != null && x.leaf ? x.leaf : y.leafField,
|
|
4891
|
+
disabled: x != null && x.disabled ? x.disabled : c.format.disabled
|
|
4906
4892
|
};
|
|
4907
4893
|
return Object.assign(y, N);
|
|
4908
|
-
}), b = (y,
|
|
4894
|
+
}), b = (y, x) => {
|
|
4909
4895
|
for (let N = 0; N < y.length; N++) {
|
|
4910
4896
|
const j = y[N];
|
|
4911
|
-
if (j[w.value.levelField] ===
|
|
4897
|
+
if (j[w.value.levelField] === x) {
|
|
4912
4898
|
delete j[w.value.childrenField], j[w.value.leafField] = !0;
|
|
4913
4899
|
continue;
|
|
4914
4900
|
} else {
|
|
4915
4901
|
const B = j[w.value.childrenField];
|
|
4916
|
-
b(B,
|
|
4902
|
+
b(B, x);
|
|
4917
4903
|
}
|
|
4918
4904
|
}
|
|
4919
4905
|
}, m = async () => {
|
|
@@ -4922,35 +4908,35 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4922
4908
|
let y = [];
|
|
4923
4909
|
if (typeof a.value == "object") {
|
|
4924
4910
|
s.value = a.value.type;
|
|
4925
|
-
const
|
|
4926
|
-
y = [].concat(
|
|
4927
|
-
const { filters: N, filterType: j = c.format.value, reverse:
|
|
4928
|
-
|
|
4911
|
+
const x = await store.actions.getDictDataObj(s.value);
|
|
4912
|
+
y = [].concat(x[s.value]);
|
|
4913
|
+
const { filters: N, filterType: j = c.format.value, reverse: F = !1 } = a.value, B = typeof N == "string" ? N.split(",") : N;
|
|
4914
|
+
F ? y = y.filter((I) => !B.includes(I[j])) : y = y.filter((I) => B.includes(I[j]));
|
|
4929
4915
|
} else {
|
|
4930
4916
|
s.value = a.value;
|
|
4931
|
-
const
|
|
4932
|
-
y = [].concat(
|
|
4917
|
+
const x = await store.actions.getDictDataObj(s.value);
|
|
4918
|
+
y = [].concat(x[s.value]);
|
|
4933
4919
|
}
|
|
4934
4920
|
if (o.value && (y = o.value(y)), i.value)
|
|
4935
|
-
y = y.map((
|
|
4936
|
-
...
|
|
4937
|
-
[c.format.disabled]: i.value(
|
|
4921
|
+
y = y.map((x) => ({
|
|
4922
|
+
...x,
|
|
4923
|
+
[c.format.disabled]: i.value(x)
|
|
4938
4924
|
}));
|
|
4939
4925
|
else if (u.value) {
|
|
4940
|
-
const { disabledValues:
|
|
4926
|
+
const { disabledValues: x, disabledType: N = c.treeSetting.valueField, reverse: j = !1 } = u.value, F = typeof x == "string" ? x.split(",") : x;
|
|
4941
4927
|
j ? y = y.map((B) => {
|
|
4942
4928
|
const I = JSON.parse(JSON.stringify(B));
|
|
4943
|
-
return I[c.format.disabled] = !
|
|
4929
|
+
return I[c.format.disabled] = !F.includes(I[N]) || I[c.format.disabled], I;
|
|
4944
4930
|
}) : y = y.map((B) => {
|
|
4945
4931
|
const I = JSON.parse(JSON.stringify(B));
|
|
4946
|
-
return I[c.format.disabled] =
|
|
4932
|
+
return I[c.format.disabled] = F.includes(I[N]) || I[c.format.disabled], I;
|
|
4947
4933
|
});
|
|
4948
4934
|
}
|
|
4949
4935
|
v.list = y;
|
|
4950
|
-
}, _ = computed(() => store.state.isGettingDictTypes.includes(s.value)),
|
|
4951
|
-
const y = store.state.dictConfig.treeSetting,
|
|
4936
|
+
}, _ = computed(() => store.state.isGettingDictTypes.includes(s.value)), C = computed(() => store.state.isGettingAllDictTypes), l = computed(() => {
|
|
4937
|
+
const y = store.state.dictConfig.treeSetting, x = store.state.dictConfig.format, N = d.props ?? {};
|
|
4952
4938
|
return {
|
|
4953
|
-
disabled: (N == null ? void 0 : N.disabled) ??
|
|
4939
|
+
disabled: (N == null ? void 0 : N.disabled) ?? x.disabled,
|
|
4954
4940
|
label: (N == null ? void 0 : N.label) ?? y.labelField,
|
|
4955
4941
|
children: (N == null ? void 0 : N.children) ?? y.childrenField,
|
|
4956
4942
|
isLeaf: (N == null ? void 0 : N.leaf) ?? y.leafField
|
|
@@ -4962,29 +4948,29 @@ const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4962
4948
|
id: N[w.value.valueField],
|
|
4963
4949
|
...N
|
|
4964
4950
|
}));
|
|
4965
|
-
let
|
|
4966
|
-
return n.value && b(
|
|
4951
|
+
let x = ListToTree(y, w.value);
|
|
4952
|
+
return n.value && b(x, +n.value), x;
|
|
4967
4953
|
});
|
|
4968
4954
|
watch(
|
|
4969
|
-
[_,
|
|
4970
|
-
([y,
|
|
4971
|
-
!y && !
|
|
4955
|
+
[_, C],
|
|
4956
|
+
([y, x]) => {
|
|
4957
|
+
!y && !x && m();
|
|
4972
4958
|
},
|
|
4973
4959
|
{
|
|
4974
4960
|
immediate: !0
|
|
4975
4961
|
}
|
|
4976
4962
|
);
|
|
4977
4963
|
const T = ref(null);
|
|
4978
|
-
return r({ getElTreeRef: () => T.value }), (y,
|
|
4964
|
+
return r({ getElTreeRef: () => T.value }), (y, x) => (openBlock(), createBlock(unref(ElTree), mergeProps({
|
|
4979
4965
|
ref_key: "ElTreeRef",
|
|
4980
4966
|
ref: T,
|
|
4981
4967
|
data: g.value,
|
|
4982
4968
|
props: l.value
|
|
4983
4969
|
}, y.$attrs), createSlots({ _: 2 }, [
|
|
4984
|
-
renderList(y.$slots, (N, j,
|
|
4970
|
+
renderList(y.$slots, (N, j, F) => ({
|
|
4985
4971
|
name: j,
|
|
4986
4972
|
fn: withCtx((B) => [
|
|
4987
|
-
renderSlot(y.$slots, j, mergeProps({ key:
|
|
4973
|
+
renderSlot(y.$slots, j, mergeProps({ key: F }, B))
|
|
4988
4974
|
])
|
|
4989
4975
|
}))
|
|
4990
4976
|
]), 1040, ["data", "props"]));
|
|
@@ -5035,12 +5021,12 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5035
5021
|
return Object.assign(E, T);
|
|
5036
5022
|
}), w = (T, E) => {
|
|
5037
5023
|
for (let y = 0; y < T.length; y++) {
|
|
5038
|
-
const
|
|
5039
|
-
if (
|
|
5040
|
-
delete
|
|
5024
|
+
const x = T[y];
|
|
5025
|
+
if (x[v.value.levelField] === E) {
|
|
5026
|
+
delete x[v.value.childrenField], x[v.value.leafField] = !0;
|
|
5041
5027
|
continue;
|
|
5042
5028
|
} else {
|
|
5043
|
-
const j =
|
|
5029
|
+
const j = x[v.value.childrenField];
|
|
5044
5030
|
w(j, E);
|
|
5045
5031
|
}
|
|
5046
5032
|
}
|
|
@@ -5052,8 +5038,8 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5052
5038
|
i.value = n.value.type;
|
|
5053
5039
|
const E = await store.actions.getDictDataObj(i.value);
|
|
5054
5040
|
T = [].concat(E[i.value]);
|
|
5055
|
-
const { filters: y, filterType:
|
|
5056
|
-
N ? T = T.filter((
|
|
5041
|
+
const { filters: y, filterType: x = s.format.value, reverse: N = !1 } = n.value, j = typeof y == "string" ? y.split(",") : y;
|
|
5042
|
+
N ? T = T.filter((F) => !j.includes(F[x])) : T = T.filter((F) => j.includes(F[x]));
|
|
5057
5043
|
} else {
|
|
5058
5044
|
i.value = n.value;
|
|
5059
5045
|
const E = await store.actions.getDictDataObj(i.value);
|
|
@@ -5065,17 +5051,17 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5065
5051
|
[s.format.disabled]: o.value(E)
|
|
5066
5052
|
}));
|
|
5067
5053
|
else if (a.value) {
|
|
5068
|
-
const { disabledValues: E, disabledType: y = s.treeSetting.valueField, reverse:
|
|
5069
|
-
|
|
5070
|
-
const
|
|
5071
|
-
return
|
|
5054
|
+
const { disabledValues: E, disabledType: y = s.treeSetting.valueField, reverse: x = !1 } = a.value, N = typeof E == "string" ? E.split(",") : E;
|
|
5055
|
+
x ? T = T.map((j) => {
|
|
5056
|
+
const F = JSON.parse(JSON.stringify(j));
|
|
5057
|
+
return F[s.format.disabled] = !N.includes(F[y]) || F[s.format.disabled], F;
|
|
5072
5058
|
}) : T = T.map((j) => {
|
|
5073
|
-
const
|
|
5074
|
-
return
|
|
5059
|
+
const F = JSON.parse(JSON.stringify(j));
|
|
5060
|
+
return F[s.format.disabled] = N.includes(F[y]) || F[s.format.disabled], F;
|
|
5075
5061
|
});
|
|
5076
5062
|
}
|
|
5077
5063
|
c.list = T;
|
|
5078
|
-
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)), _ = computed(() => store.state.isGettingAllDictTypes),
|
|
5064
|
+
}, m = computed(() => store.state.isGettingDictTypes.includes(i.value)), _ = computed(() => store.state.isGettingAllDictTypes), C = computed(() => {
|
|
5079
5065
|
const T = JSON.parse(JSON.stringify(c.list)).map((y) => ({
|
|
5080
5066
|
label: y[v.value.labelField],
|
|
5081
5067
|
value: y[v.value.valueField],
|
|
@@ -5098,12 +5084,12 @@ const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5098
5084
|
return r({ getElTreeSelectRef: () => l.value }), (T, E) => (openBlock(), createBlock(unref(ElTreeSelect), mergeProps({
|
|
5099
5085
|
ref_key: "ElTreeSelectRef",
|
|
5100
5086
|
ref: l,
|
|
5101
|
-
data:
|
|
5087
|
+
data: C.value
|
|
5102
5088
|
}, T.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
5103
|
-
renderList(T.$slots, (y,
|
|
5104
|
-
name:
|
|
5089
|
+
renderList(T.$slots, (y, x, N) => ({
|
|
5090
|
+
name: x,
|
|
5105
5091
|
fn: withCtx((j) => [
|
|
5106
|
-
renderSlot(T.$slots,
|
|
5092
|
+
renderSlot(T.$slots, x, mergeProps({ key: N }, j))
|
|
5107
5093
|
])
|
|
5108
5094
|
}))
|
|
5109
5095
|
]), 1040, ["data"]));
|
|
@@ -5249,12 +5235,12 @@ let vue3ElementDict = {
|
|
|
5249
5235
|
var b, m;
|
|
5250
5236
|
const d = console.warn;
|
|
5251
5237
|
console.warn = (..._) => {
|
|
5252
|
-
const
|
|
5253
|
-
|
|
5238
|
+
const C = typeof _[0] == "string" ? _[0] : "";
|
|
5239
|
+
C.includes("formItemContextKey") || C.includes("formContextKey") || d.apply(console, _);
|
|
5254
5240
|
};
|
|
5255
5241
|
const t = e.config.warnHandler;
|
|
5256
|
-
e.config.warnHandler = (_,
|
|
5257
|
-
typeof _ == "string" && (_.includes("formItemContextKey") || _.includes("formContextKey")) || t == null || t(_,
|
|
5242
|
+
e.config.warnHandler = (_, C, l) => {
|
|
5243
|
+
typeof _ == "string" && (_.includes("formItemContextKey") || _.includes("formContextKey")) || t == null || t(_, C, l);
|
|
5258
5244
|
};
|
|
5259
5245
|
const n = {
|
|
5260
5246
|
timeout: 3e4,
|
|
@@ -5330,8 +5316,8 @@ let vue3ElementDict = {
|
|
|
5330
5316
|
type: "type",
|
|
5331
5317
|
color: "color"
|
|
5332
5318
|
},
|
|
5333
|
-
formatterRequest: (_,
|
|
5334
|
-
formatterDictList: (_,
|
|
5319
|
+
formatterRequest: (_, C) => C ? { [_]: C } : { [_]: "" },
|
|
5320
|
+
formatterDictList: (_, C) => !_ || !_.dictData ? {} : _.dictData,
|
|
5335
5321
|
formatterDictVersion: (_) => !_ || !_.version ? "unknow" : _.version,
|
|
5336
5322
|
version: "unknow",
|
|
5337
5323
|
storage: localStorage,
|
|
@@ -5359,19 +5345,19 @@ let vue3ElementDict = {
|
|
|
5359
5345
|
let c = a.usuallyGetDictTypes ? a.usuallyGetDictTypes.split(",") : [];
|
|
5360
5346
|
if (a.version !== s) {
|
|
5361
5347
|
const _ = a.storage.getItem(a.dictDataKey);
|
|
5362
|
-
let
|
|
5348
|
+
let C = {};
|
|
5363
5349
|
try {
|
|
5364
|
-
|
|
5350
|
+
C = _ ? JSON.parse(_) : {};
|
|
5365
5351
|
} catch {
|
|
5366
|
-
|
|
5352
|
+
C = {}, console.error();
|
|
5367
5353
|
}
|
|
5368
|
-
const l =
|
|
5354
|
+
const l = C ? Object.keys(C) : [], g = a.localDictCodes ? Object.keys(a.localDictCodes) : [], T = l.filter((N) => !g.includes(N)), E = [...c, ...T];
|
|
5369
5355
|
c = [...new Set(E)], a.storage.removeItem(a.dictDataKey), a.storage.setItem(a.versionKey, a.version);
|
|
5370
|
-
const y = JSON.parse(JSON.stringify(a.localDictCodes)),
|
|
5371
|
-
a.storage.setItem(a.dictDataKey, JSON.stringify(
|
|
5356
|
+
const y = JSON.parse(JSON.stringify(a.localDictCodes)), x = formatDictData(y, a.filterDataFun, a.disabledDataFun, (m = a == null ? void 0 : a.format) == null ? void 0 : m.disabled);
|
|
5357
|
+
a.storage.setItem(a.dictDataKey, JSON.stringify(x)), store.mutations.SET_DICT_CODES(x);
|
|
5372
5358
|
}
|
|
5373
5359
|
a.getLoginStatusFunc() && (a.isGetAll || c.length > 0) && getDictCodeReq(a, c), components.forEach((_) => {
|
|
5374
|
-
const
|
|
5360
|
+
const C = _.name.slice(4), l = a.componentsPreFix + C;
|
|
5375
5361
|
e.component(l, _);
|
|
5376
5362
|
});
|
|
5377
5363
|
const v = reactive({
|