vue3-element-dict 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +662 -656
- package/package.json +1 -1
package/lib/vue3-element-dict.js
CHANGED
|
@@ -25,15 +25,15 @@ function sortComponentsByIdDependencies(e) {
|
|
|
25
25
|
return C == null ? [] : (d === "validate" ? typeof C == "string" ? b.add(C) : Array.isArray(C) && C.forEach((E) => {
|
|
26
26
|
typeof E == "string" && b.add(E);
|
|
27
27
|
}) : ["compare", "calculate", ""].includes(d) ? c(C).forEach((E) => b.add(E)) : typeof d == "string" && Array.isArray(C) && C.forEach((E) => {
|
|
28
|
-
E && typeof E == "object" && "rules" in E && c(E.rules).forEach((
|
|
28
|
+
E && typeof E == "object" && "rules" in E && c(E.rules).forEach((I) => b.add(I));
|
|
29
29
|
}), Array.from(b));
|
|
30
30
|
}, n = (p) => {
|
|
31
31
|
const { validatorRuleType: d, props: C } = p, b = /* @__PURE__ */ new Set();
|
|
32
32
|
return C != null && C.rules ? (C.rules.forEach((E) => {
|
|
33
33
|
if (!(E != null && E.validator))
|
|
34
34
|
return;
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const I = E.validator;
|
|
36
|
+
I != null && (["compare", "calculate", "", void 0].includes(d) ? c(I).forEach((O) => b.add(O)) : typeof d == "string" && Array.isArray(I) && I.forEach((O) => {
|
|
37
37
|
O && typeof O == "object" && "rules" in O && c(O.rules).forEach((A) => b.add(A));
|
|
38
38
|
}));
|
|
39
39
|
}), Array.from(b)) : [];
|
|
@@ -42,7 +42,7 @@ function sortComponentsByIdDependencies(e) {
|
|
|
42
42
|
p.fieldName && p.id && a.set(p.fieldName, p.id);
|
|
43
43
|
});
|
|
44
44
|
const l = e.map((p) => {
|
|
45
|
-
const d = t(p), C = n(p), E = [.../* @__PURE__ */ new Set([...d, ...C])].map((
|
|
45
|
+
const d = t(p), C = n(p), E = [.../* @__PURE__ */ new Set([...d, ...C])].map((I) => a.get(I)).filter((I) => I !== void 0 && e.some((O) => O.id === I));
|
|
46
46
|
return {
|
|
47
47
|
id: p.id,
|
|
48
48
|
component: p,
|
|
@@ -212,25 +212,25 @@ const state = reactive({
|
|
|
212
212
|
}
|
|
213
213
|
mutations.ADD_UNFIND_DICT_TYPES(e), l(i(s, e)).then((E) => {
|
|
214
214
|
mutations.REMOVE_IS_GETTING_DICT_TYPES(e);
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
215
|
+
const I = F(E), O = n.getItem(m);
|
|
216
|
+
if (I !== O) {
|
|
217
217
|
let A = "";
|
|
218
218
|
if (y)
|
|
219
219
|
A = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
220
220
|
else {
|
|
221
221
|
if (o) {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const x = Object.keys(b), B = o.split(","), _ = Object.keys(v), N = x.filter((T) => !_.includes(T)), f = B.filter((T) => _.includes(T) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${T}冲突`), !1) : !0), k = N.concat(f);
|
|
223
|
+
k.push(e), A = Array.from(new Set(k)).join(",");
|
|
224
224
|
} else {
|
|
225
|
-
const
|
|
225
|
+
const x = Object.keys(b), B = Object.keys(v), _ = x.filter((f) => !B.includes(f));
|
|
226
226
|
_.push(e), A = Array.from(new Set(_)).join(",");
|
|
227
227
|
}
|
|
228
228
|
mutations.ADD_IS_GETTING_DICT_TYPES(A);
|
|
229
229
|
}
|
|
230
230
|
l(i(s, A)).then(
|
|
231
|
-
(
|
|
231
|
+
(x) => {
|
|
232
232
|
const B = j(
|
|
233
|
-
|
|
233
|
+
x,
|
|
234
234
|
e
|
|
235
235
|
);
|
|
236
236
|
if (!(B[e] && B[e].length > 0)) {
|
|
@@ -240,10 +240,10 @@ const state = reactive({
|
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
mutations.REMOVE_UNFIND_DICT_TYPES(e);
|
|
243
|
-
const _ = F(
|
|
243
|
+
const _ = F(x), N = Object.assign(
|
|
244
244
|
JSON.parse(JSON.stringify(v)),
|
|
245
245
|
B
|
|
246
|
-
), f = formatDictData(
|
|
246
|
+
), f = formatDictData(N, p, d, C == null ? void 0 : C.disabled);
|
|
247
247
|
n.setItem(a, JSON.stringify(f)), n.setItem(m, _), mutations.SET_DICT_CODES(f), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(A);
|
|
248
248
|
}
|
|
249
249
|
);
|
|
@@ -257,8 +257,8 @@ const state = reactive({
|
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
mutations.REMOVE_UNFIND_DICT_TYPES(e);
|
|
260
|
-
const
|
|
261
|
-
Object.assign(
|
|
260
|
+
const x = state.dictCodes || v, B = formatDictData(A, p, d, C == null ? void 0 : C.disabled);
|
|
261
|
+
Object.assign(x, B), n.setItem(a, JSON.stringify(x)), mutations.SET_DICT_CODES(x), r(state.dictCodes);
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
} else
|
|
@@ -595,38 +595,38 @@ const GetCodeByLabels = (e, r, c) => {
|
|
|
595
595
|
},
|
|
596
596
|
emits: ["submit", "reset", "action"],
|
|
597
597
|
setup(e, { expose: r, emit: c }) {
|
|
598
|
-
const t = e, { actionType: n, defaultVal: a, emptyText: l, modelValue: o, dictType: i, judgeTypeFun: s, type: m, judgeColorFun: v, color: j, judgeDisabledFun: F, disabled: y } = toRefs(t), p = toRaw(store.state.dictConfig), d = c, C = useAttrs(), b = computed(() => s.value ? s.value(o.value) : m.value ? m.value : O.value && O.value[p.format.type] ? O.value[p.format.type] : "primary"), E = computed(() => v != null && v.value ? v.value(o.value) : j != null && j.value ? j.value : O.value && O.value[p.format.color] ? O.value[p.format.color] : ""),
|
|
598
|
+
const t = e, { actionType: n, defaultVal: a, emptyText: l, modelValue: o, dictType: i, judgeTypeFun: s, type: m, judgeColorFun: v, color: j, judgeDisabledFun: F, disabled: y } = toRefs(t), p = toRaw(store.state.dictConfig), d = c, C = useAttrs(), b = computed(() => s.value ? s.value(o.value) : m.value ? m.value : O.value && O.value[p.format.type] ? O.value[p.format.type] : "primary"), E = computed(() => v != null && v.value ? v.value(o.value) : j != null && j.value ? j.value : O.value && O.value[p.format.color] ? O.value[p.format.color] : ""), I = computed(() => F.value ? F.value(o.value) : O.value && O.value[p.format.disabled] ? O.value[p.format.disabled] : !!y.value);
|
|
599
599
|
let O = ref(null), A = ref(null);
|
|
600
600
|
watchEffect(() => {
|
|
601
601
|
if (!i.value) {
|
|
602
602
|
A.value = o.value;
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
|
-
GetItemByCode(o.value, i.value).then((
|
|
606
|
-
|
|
605
|
+
GetItemByCode(o.value, i.value).then((N) => {
|
|
606
|
+
N ? (O.value = N, A.value = N[p.format.label]) : (O.value = null, A.value = String(a.value ?? (o.value === 0 ? 0 : o.value || l.value)));
|
|
607
607
|
});
|
|
608
608
|
});
|
|
609
|
-
const
|
|
610
|
-
|
|
609
|
+
const x = () => {
|
|
610
|
+
I.value || d(n.value, C);
|
|
611
611
|
}, B = ref(null);
|
|
612
|
-
return r({ getElButtonRef: () => B.value }), (
|
|
613
|
-
const
|
|
614
|
-
return openBlock(), createBlock(
|
|
612
|
+
return r({ getElButtonRef: () => B.value }), (N, f) => {
|
|
613
|
+
const k = resolveComponent("el-button");
|
|
614
|
+
return openBlock(), createBlock(k, mergeProps({
|
|
615
615
|
ref_key: "ElButtonRef",
|
|
616
616
|
ref: B,
|
|
617
617
|
type: b.value,
|
|
618
618
|
color: E.value,
|
|
619
|
-
disabled:
|
|
620
|
-
},
|
|
619
|
+
disabled: I.value
|
|
620
|
+
}, N.$attrs, { onClick: x }), createSlots({
|
|
621
621
|
default: withCtx(() => [
|
|
622
622
|
createTextVNode(toDisplayString(unref(A)), 1)
|
|
623
623
|
]),
|
|
624
624
|
_: 2
|
|
625
625
|
}, [
|
|
626
|
-
renderList(
|
|
627
|
-
name:
|
|
628
|
-
fn: withCtx((
|
|
629
|
-
renderSlot(
|
|
626
|
+
renderList(N.$slots, (g, T, u) => ({
|
|
627
|
+
name: T,
|
|
628
|
+
fn: withCtx((D) => [
|
|
629
|
+
renderSlot(N.$slots, T, mergeProps({ key: u }, D))
|
|
630
630
|
])
|
|
631
631
|
}))
|
|
632
632
|
]), 1040, ["type", "color", "disabled"]);
|
|
@@ -811,7 +811,7 @@ function ValidateNestedRule(e, r) {
|
|
|
811
811
|
if (Array.isArray(F)) {
|
|
812
812
|
let d = Array.isArray(F[0]) ? a(F[0], y) : n(F[0], y);
|
|
813
813
|
for (let C = 1; C < F.length; C += 2) {
|
|
814
|
-
const b = F[C], E = F[C + 1],
|
|
814
|
+
const b = F[C], E = F[C + 1], I = Array.isArray(E) ? a(E, y) : n(E, y), O = typeof d == "number" ? d : NaN, A = typeof I == "number" ? I : NaN;
|
|
815
815
|
d = ((p = c[b]) == null ? void 0 : p.call(c, O, A)) ?? NaN;
|
|
816
816
|
}
|
|
817
817
|
return d;
|
|
@@ -1023,21 +1023,21 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$j = /* @__PURE__ */ Object.assign(
|
|
|
1023
1023
|
let d = ref("");
|
|
1024
1024
|
const C = computed(() => {
|
|
1025
1025
|
const g = {};
|
|
1026
|
-
return Object.entries(p).forEach(([
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
const
|
|
1030
|
-
g[
|
|
1026
|
+
return Object.entries(p).forEach(([T, u]) => {
|
|
1027
|
+
const D = ToKebabCase(T);
|
|
1028
|
+
if (D.startsWith("button-") || D.startsWith("on-button")) {
|
|
1029
|
+
const S = ToCamelCase(D.replace("button-", ""));
|
|
1030
|
+
g[S] = u;
|
|
1031
1031
|
}
|
|
1032
1032
|
}), g;
|
|
1033
1033
|
}), b = computed(() => {
|
|
1034
|
-
const g = Number(j.value),
|
|
1035
|
-
return `calc(${
|
|
1034
|
+
const g = Number(j.value), T = 100 / g, u = Array.isArray(F.value) ? F.value : String(F.value).split(" "), D = u[0], $ = (u[1] || D) * (g - 1) / g;
|
|
1035
|
+
return `calc(${T}% - ${$}px) !important`;
|
|
1036
1036
|
}), E = computed(() => {
|
|
1037
|
-
const g = Array.isArray(F.value) ? F.value : String(F.value).split(" "),
|
|
1038
|
-
return `${
|
|
1037
|
+
const g = Array.isArray(F.value) ? F.value : String(F.value).split(" "), T = g[0], u = g[1] || T;
|
|
1038
|
+
return `${T}px ${u}px`;
|
|
1039
1039
|
});
|
|
1040
|
-
function
|
|
1040
|
+
function I(g) {
|
|
1041
1041
|
return {
|
|
1042
1042
|
...C.value,
|
|
1043
1043
|
...g
|
|
@@ -1049,78 +1049,78 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$j = /* @__PURE__ */ Object.assign(
|
|
|
1049
1049
|
let g = [];
|
|
1050
1050
|
if (typeof o.value == "object") {
|
|
1051
1051
|
d.value = o.value.type;
|
|
1052
|
-
const
|
|
1053
|
-
g = [].concat(
|
|
1052
|
+
const T = await store.actions.getDictDataObj(d.value);
|
|
1053
|
+
g = [].concat(T[d.value]);
|
|
1054
1054
|
const {
|
|
1055
1055
|
filters: u,
|
|
1056
|
-
filterType:
|
|
1057
|
-
reverse:
|
|
1056
|
+
filterType: D = y.format.value,
|
|
1057
|
+
reverse: S = !1
|
|
1058
1058
|
} = o.value, $ = typeof u == "string" ? u.split(",") : u;
|
|
1059
|
-
|
|
1059
|
+
S ? g = g.filter((G) => !$.includes(G[D])) : g = g.filter((G) => $.includes(G[D]));
|
|
1060
1060
|
} else {
|
|
1061
1061
|
d.value = o.value;
|
|
1062
|
-
const
|
|
1063
|
-
g = [].concat(
|
|
1062
|
+
const T = await store.actions.getDictDataObj(d.value);
|
|
1063
|
+
g = [].concat(T[d.value]);
|
|
1064
1064
|
}
|
|
1065
1065
|
if (s.value && (g = s.value(g)), m.value)
|
|
1066
|
-
g = g.map((
|
|
1067
|
-
...
|
|
1068
|
-
[y.format.disabled]: m.value(
|
|
1066
|
+
g = g.map((T) => ({
|
|
1067
|
+
...T,
|
|
1068
|
+
[y.format.disabled]: m.value(T)
|
|
1069
1069
|
}));
|
|
1070
1070
|
else if (i.value) {
|
|
1071
1071
|
const {
|
|
1072
|
-
disabledValues:
|
|
1072
|
+
disabledValues: T,
|
|
1073
1073
|
disabledType: u = y.format.value,
|
|
1074
|
-
reverse:
|
|
1075
|
-
} = i.value,
|
|
1076
|
-
|
|
1074
|
+
reverse: D = !1
|
|
1075
|
+
} = i.value, S = typeof T == "string" ? T.split(",") : T;
|
|
1076
|
+
D ? g = g.map(($) => {
|
|
1077
1077
|
const G = JSON.parse(JSON.stringify($));
|
|
1078
|
-
return G[y.format.disabled] = !
|
|
1078
|
+
return G[y.format.disabled] = !S.includes(G[u]) || G[y.format.disabled], G;
|
|
1079
1079
|
}) : g = g.map(($) => {
|
|
1080
1080
|
const G = JSON.parse(JSON.stringify($));
|
|
1081
|
-
return G[y.format.disabled] =
|
|
1081
|
+
return G[y.format.disabled] = S.includes(G[u]) || G[y.format.disabled], G;
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
1084
|
-
O.value = g.map((
|
|
1085
|
-
type:
|
|
1086
|
-
label:
|
|
1087
|
-
color:
|
|
1088
|
-
icon:
|
|
1089
|
-
disabled:
|
|
1084
|
+
O.value = g.map((T) => ({
|
|
1085
|
+
type: T[y.format.type],
|
|
1086
|
+
label: T[y.format.label],
|
|
1087
|
+
color: T[y.format.color],
|
|
1088
|
+
icon: T[y.format.icon],
|
|
1089
|
+
disabled: T[y.format.disabled],
|
|
1090
1090
|
actionType: "submit",
|
|
1091
|
-
...
|
|
1091
|
+
...T
|
|
1092
1092
|
}));
|
|
1093
1093
|
};
|
|
1094
|
-
async function
|
|
1094
|
+
async function x() {
|
|
1095
1095
|
if (o.value) {
|
|
1096
1096
|
A();
|
|
1097
1097
|
return;
|
|
1098
1098
|
}
|
|
1099
1099
|
let g = [];
|
|
1100
|
-
for (let
|
|
1101
|
-
const u = v.value[
|
|
1100
|
+
for (let T = 0; T < v.value.length; T++) {
|
|
1101
|
+
const u = v.value[T];
|
|
1102
1102
|
if (u.dictType) {
|
|
1103
|
-
const
|
|
1104
|
-
u.type = u.type ||
|
|
1103
|
+
const D = await GetItemByCode(u.modelValue, u.dictType);
|
|
1104
|
+
u.type = u.type || D[y.format.type] || "", u.label = String(u.label || (D ? D[y.format.label] : (u.defaultVal || a.value) ?? (u.modelValue === 0 ? 0 : u.modelValue || u.emptyText || l.value))), u.color = u.color || D[y.format.color] || "", u.icon = u.icon || D[y.format.icon] || "", u.disabled = u.disabled ?? (D[y.format.disabled] || !1);
|
|
1105
1105
|
}
|
|
1106
1106
|
g.push(u);
|
|
1107
1107
|
}
|
|
1108
1108
|
O.value = g;
|
|
1109
1109
|
}
|
|
1110
1110
|
onMounted(() => {
|
|
1111
|
-
|
|
1111
|
+
x();
|
|
1112
1112
|
}), watch(
|
|
1113
1113
|
() => n.list,
|
|
1114
1114
|
() => {
|
|
1115
|
-
|
|
1115
|
+
x();
|
|
1116
1116
|
},
|
|
1117
1117
|
{ deep: !0 }
|
|
1118
1118
|
// 深层监听数组/对象变化
|
|
1119
1119
|
);
|
|
1120
1120
|
const B = (g) => {
|
|
1121
1121
|
g.disabled || (g.actionType === "submit" ? t("submit", g) : g.actionType === "reset" ? t("reset", g) : g.actionType === "action" && t("action", g));
|
|
1122
|
-
}, _ = ref(null),
|
|
1123
|
-
return r({ getElButtonsRef:
|
|
1122
|
+
}, _ = ref(null), N = () => _.value, f = ref([]);
|
|
1123
|
+
return r({ getElButtonsRef: N, getElButtonRefs: () => f.value }), (g, T) => {
|
|
1124
1124
|
const u = resolveComponent("el-button");
|
|
1125
1125
|
return openBlock(), createElementBlock("div", {
|
|
1126
1126
|
ref_key: "ElButtonsRef",
|
|
@@ -1129,21 +1129,21 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$j = /* @__PURE__ */ Object.assign(
|
|
|
1129
1129
|
id: g.$attrs.id,
|
|
1130
1130
|
style: normalizeStyle({ ...g.$attrs.style, gap: E.value })
|
|
1131
1131
|
}, [
|
|
1132
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(O.value, (
|
|
1132
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(O.value, (D, S) => (openBlock(), createBlock(u, mergeProps({
|
|
1133
1133
|
ref_for: !0,
|
|
1134
1134
|
ref: ($) => {
|
|
1135
|
-
$ && (f.value[
|
|
1135
|
+
$ && (f.value[S] = $);
|
|
1136
1136
|
},
|
|
1137
|
-
key:
|
|
1137
|
+
key: S,
|
|
1138
1138
|
style: { width: b.value, margin: "0 !important" },
|
|
1139
|
-
onClick: ($) => B(
|
|
1140
|
-
},
|
|
1139
|
+
onClick: ($) => B(D)
|
|
1140
|
+
}, I(D)), createSlots({
|
|
1141
1141
|
default: withCtx(() => [
|
|
1142
|
-
createTextVNode(toDisplayString(
|
|
1142
|
+
createTextVNode(toDisplayString(D.label || D.modelValue), 1)
|
|
1143
1143
|
]),
|
|
1144
1144
|
_: 2
|
|
1145
1145
|
}, [
|
|
1146
|
-
renderList(
|
|
1146
|
+
renderList(D.slotList, ($, G) => ({
|
|
1147
1147
|
name: $.slotName,
|
|
1148
1148
|
fn: withCtx((M) => [
|
|
1149
1149
|
(openBlock(), createBlock(_sfc_main$j, {
|
|
@@ -1270,11 +1270,11 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1270
1270
|
const _ = await store.actions.getDictDataObj(m.value);
|
|
1271
1271
|
B = [].concat(_[m.value]);
|
|
1272
1272
|
const {
|
|
1273
|
-
filters:
|
|
1273
|
+
filters: N,
|
|
1274
1274
|
filterType: f = v.format.value,
|
|
1275
|
-
reverse:
|
|
1276
|
-
} = l.value, g = typeof
|
|
1277
|
-
|
|
1275
|
+
reverse: k = !1
|
|
1276
|
+
} = l.value, g = typeof N == "string" ? N.split(",") : N;
|
|
1277
|
+
k ? B = B.filter((T) => !g.includes(T[f])) : B = B.filter((T) => g.includes(T[f]));
|
|
1278
1278
|
} else {
|
|
1279
1279
|
m.value = l.value;
|
|
1280
1280
|
const _ = await store.actions.getDictDataObj(m.value);
|
|
@@ -1288,45 +1288,45 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1288
1288
|
else if (o.value) {
|
|
1289
1289
|
const {
|
|
1290
1290
|
disabledValues: _,
|
|
1291
|
-
disabledType:
|
|
1291
|
+
disabledType: N = v.format.value,
|
|
1292
1292
|
reverse: f = !1
|
|
1293
|
-
} = o.value,
|
|
1293
|
+
} = o.value, k = typeof _ == "string" ? _.split(",") : _;
|
|
1294
1294
|
f ? B = B.map((g) => {
|
|
1295
|
-
const
|
|
1296
|
-
return
|
|
1295
|
+
const T = JSON.parse(JSON.stringify(g));
|
|
1296
|
+
return T[v.format.disabled] = !k.includes(T[N]) || T[v.format.disabled], T;
|
|
1297
1297
|
}) : B = B.map((g) => {
|
|
1298
|
-
const
|
|
1299
|
-
return
|
|
1298
|
+
const T = JSON.parse(JSON.stringify(g));
|
|
1299
|
+
return T[v.format.disabled] = k.includes(T[N]) || T[v.format.disabled], T;
|
|
1300
1300
|
});
|
|
1301
1301
|
}
|
|
1302
1302
|
y.list = B;
|
|
1303
1303
|
}, d = computed(() => store.state.isGettingDictTypes.includes(m.value)), C = computed(() => store.state.isGettingAllDictTypes), b = computed(() => {
|
|
1304
|
-
const B = store.state.dictConfig.treeSetting, _ = store.state.dictConfig.format,
|
|
1304
|
+
const B = store.state.dictConfig.treeSetting, _ = store.state.dictConfig.format, N = t.props ?? {};
|
|
1305
1305
|
return {
|
|
1306
|
-
disabled: (
|
|
1307
|
-
label: (
|
|
1308
|
-
value: (
|
|
1309
|
-
children: (
|
|
1310
|
-
leaf: (
|
|
1306
|
+
disabled: (N == null ? void 0 : N.disabled) ?? _.disabled,
|
|
1307
|
+
label: (N == null ? void 0 : N.label) ?? B.labelField,
|
|
1308
|
+
value: (N == null ? void 0 : N.value) ?? B.valueField,
|
|
1309
|
+
children: (N == null ? void 0 : N.children) ?? B.childrenField,
|
|
1310
|
+
leaf: (N == null ? void 0 : N.leaf) ?? B.leafField
|
|
1311
1311
|
};
|
|
1312
1312
|
}), E = computed(() => {
|
|
1313
|
-
const B = JSON.parse(JSON.stringify(v.treeSetting)), _ = t.props || {},
|
|
1313
|
+
const B = JSON.parse(JSON.stringify(v.treeSetting)), _ = t.props || {}, N = {
|
|
1314
1314
|
valueField: _ != null && _.value ? _.value : B.valueField,
|
|
1315
1315
|
labelField: _ != null && _.label ? _.label : B.labelField,
|
|
1316
1316
|
childrenField: _ != null && _.children ? _.children : B.childrenField,
|
|
1317
1317
|
leafField: _ != null && _.leaf ? _.leaf : B.leafField,
|
|
1318
1318
|
disabled: _ != null && _.disabled ? _.disabled : v.format.disabled
|
|
1319
1319
|
};
|
|
1320
|
-
return Object.assign(B,
|
|
1321
|
-
}),
|
|
1322
|
-
for (let
|
|
1323
|
-
const f = B[
|
|
1320
|
+
return Object.assign(B, N);
|
|
1321
|
+
}), I = (B, _) => {
|
|
1322
|
+
for (let N = 0; N < B.length; N++) {
|
|
1323
|
+
const f = B[N];
|
|
1324
1324
|
if (f[E.value.levelField] === _) {
|
|
1325
1325
|
delete f[E.value.childrenField], f[E.value.leafField] = !0;
|
|
1326
1326
|
continue;
|
|
1327
1327
|
} else {
|
|
1328
1328
|
const g = f[E.value.childrenField];
|
|
1329
|
-
|
|
1329
|
+
I(g, _);
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
}, O = computed(() => {
|
|
@@ -1334,7 +1334,7 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1334
1334
|
return [];
|
|
1335
1335
|
const B = JSON.parse(JSON.stringify(y.list));
|
|
1336
1336
|
let _ = ListToTree(B, E.value);
|
|
1337
|
-
return a.value && (
|
|
1337
|
+
return a.value && (I(_, +a.value), console.log("🚀 ~ treeData:", _)), _ || [];
|
|
1338
1338
|
});
|
|
1339
1339
|
watch(
|
|
1340
1340
|
[d, C],
|
|
@@ -1347,18 +1347,18 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1347
1347
|
);
|
|
1348
1348
|
const A = ref(null);
|
|
1349
1349
|
return r({ getElCascaderRef: () => A.value }), (B, _) => {
|
|
1350
|
-
const
|
|
1351
|
-
return openBlock(), createBlock(
|
|
1350
|
+
const N = resolveComponent("el-cascader");
|
|
1351
|
+
return openBlock(), createBlock(N, mergeProps({
|
|
1352
1352
|
ref_key: "ElCascaderRef",
|
|
1353
1353
|
ref: A,
|
|
1354
1354
|
options: O.value,
|
|
1355
1355
|
props: b.value,
|
|
1356
1356
|
onChange: F
|
|
1357
1357
|
}, B.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1358
|
-
renderList(B.$slots, (f,
|
|
1359
|
-
name:
|
|
1360
|
-
fn: withCtx((
|
|
1361
|
-
renderSlot(B.$slots,
|
|
1358
|
+
renderList(B.$slots, (f, k, g) => ({
|
|
1359
|
+
name: k,
|
|
1360
|
+
fn: withCtx((T) => [
|
|
1361
|
+
renderSlot(B.$slots, k, mergeProps({ key: g }, T))
|
|
1362
1362
|
])
|
|
1363
1363
|
}))
|
|
1364
1364
|
]), 1040, ["options", "props"]);
|
|
@@ -1429,8 +1429,8 @@ const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1429
1429
|
});
|
|
1430
1430
|
const E = ref(null);
|
|
1431
1431
|
return r({ getElCheckTagRef: () => E.value }), (O, A) => {
|
|
1432
|
-
const
|
|
1433
|
-
return openBlock(), createBlock(
|
|
1432
|
+
const x = resolveComponent("el-check-tag");
|
|
1433
|
+
return openBlock(), createBlock(x, mergeProps({
|
|
1434
1434
|
class: "el-check-tag-dict",
|
|
1435
1435
|
ref_key: "ElCheckTagRef",
|
|
1436
1436
|
ref: E,
|
|
@@ -1443,10 +1443,10 @@ const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1443
1443
|
]),
|
|
1444
1444
|
_: 2
|
|
1445
1445
|
}, [
|
|
1446
|
-
renderList(O.$slots, (B, _,
|
|
1446
|
+
renderList(O.$slots, (B, _, N) => ({
|
|
1447
1447
|
name: _,
|
|
1448
1448
|
fn: withCtx((f) => [
|
|
1449
|
-
renderSlot(O.$slots, _, mergeProps({ key:
|
|
1449
|
+
renderSlot(O.$slots, _, mergeProps({ key: N }, f))
|
|
1450
1450
|
])
|
|
1451
1451
|
}))
|
|
1452
1452
|
]), 1040, ["type", "color", "disabled"]);
|
|
@@ -1510,19 +1510,19 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1510
1510
|
disabledDataFun: m
|
|
1511
1511
|
} = toRefs(t), v = useAttrs(), j = computed(() => {
|
|
1512
1512
|
const f = {};
|
|
1513
|
-
return Object.entries(v).forEach(([
|
|
1514
|
-
const
|
|
1515
|
-
if (!
|
|
1516
|
-
const u = ToCamelCase(
|
|
1513
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
1514
|
+
const T = ToKebabCase(k);
|
|
1515
|
+
if (!T.startsWith("checkbox-button-") && !T.startsWith("on-checkbox-button-")) {
|
|
1516
|
+
const u = ToCamelCase(T);
|
|
1517
1517
|
f[u] = g;
|
|
1518
1518
|
}
|
|
1519
1519
|
}), f;
|
|
1520
1520
|
}), F = computed(() => {
|
|
1521
1521
|
const f = {};
|
|
1522
|
-
return Object.entries(v).forEach(([
|
|
1523
|
-
const
|
|
1524
|
-
if (
|
|
1525
|
-
const u = ToCamelCase(
|
|
1522
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
1523
|
+
const T = ToKebabCase(k);
|
|
1524
|
+
if (T.startsWith("checkbox-button-") || T.startsWith("on-checkbox-button-")) {
|
|
1525
|
+
const u = ToCamelCase(T.replace("checkbox-button-", ""));
|
|
1526
1526
|
f[u] = g;
|
|
1527
1527
|
}
|
|
1528
1528
|
}), f;
|
|
@@ -1531,8 +1531,8 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1531
1531
|
d("dictChange", f);
|
|
1532
1532
|
return;
|
|
1533
1533
|
}
|
|
1534
|
-
const
|
|
1535
|
-
d("dictChange",
|
|
1534
|
+
const k = b.list.filter((g) => f.includes(g[p.format.value]));
|
|
1535
|
+
d("dictChange", k);
|
|
1536
1536
|
}, b = reactive({
|
|
1537
1537
|
list: []
|
|
1538
1538
|
}), E = async () => {
|
|
@@ -1541,44 +1541,44 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1541
1541
|
let f = [];
|
|
1542
1542
|
if (typeof l.value == "object") {
|
|
1543
1543
|
y.value = l.value.type;
|
|
1544
|
-
const
|
|
1545
|
-
f = [].concat(
|
|
1544
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
1545
|
+
f = [].concat(k[y.value]);
|
|
1546
1546
|
const {
|
|
1547
1547
|
filters: g,
|
|
1548
|
-
filterType:
|
|
1548
|
+
filterType: T = p.format.value,
|
|
1549
1549
|
reverse: u = !1
|
|
1550
|
-
} = l.value,
|
|
1551
|
-
u ? f = f.filter((
|
|
1550
|
+
} = l.value, D = typeof g == "string" ? g.split(",") : g;
|
|
1551
|
+
u ? f = f.filter((S) => !D.includes(S[T])) : f = f.filter((S) => D.includes(S[T]));
|
|
1552
1552
|
} else {
|
|
1553
1553
|
y.value = l.value;
|
|
1554
|
-
const
|
|
1555
|
-
f = [].concat(
|
|
1554
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
1555
|
+
f = [].concat(k[y.value]);
|
|
1556
1556
|
}
|
|
1557
1557
|
if (s.value && (f = s.value(f)), m.value)
|
|
1558
|
-
f = f.map((
|
|
1559
|
-
...
|
|
1560
|
-
[p.format.disabled]: m.value(
|
|
1558
|
+
f = f.map((k) => ({
|
|
1559
|
+
...k,
|
|
1560
|
+
[p.format.disabled]: m.value(k)
|
|
1561
1561
|
}));
|
|
1562
1562
|
else if (o.value) {
|
|
1563
1563
|
const {
|
|
1564
|
-
disabledValues:
|
|
1564
|
+
disabledValues: k,
|
|
1565
1565
|
disabledType: g = p.format.value,
|
|
1566
|
-
reverse:
|
|
1567
|
-
} = o.value, u = typeof
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1571
|
-
}) : f = f.map((
|
|
1572
|
-
const
|
|
1573
|
-
return
|
|
1566
|
+
reverse: T = !1
|
|
1567
|
+
} = o.value, u = typeof k == "string" ? k.split(",") : k;
|
|
1568
|
+
T ? f = f.map((D) => {
|
|
1569
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
1570
|
+
return S[p.format.disabled] = !u.includes(S[g]) || S[p.format.disabled], S;
|
|
1571
|
+
}) : f = f.map((D) => {
|
|
1572
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
1573
|
+
return S[p.format.disabled] = u.includes(S[g]) || S[p.format.disabled], S;
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
1576
|
b.list = f;
|
|
1577
|
-
},
|
|
1577
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(y.value)), O = computed(() => store.state.isGettingAllDictTypes), A = computed(() => n.value);
|
|
1578
1578
|
watch(
|
|
1579
|
-
[
|
|
1580
|
-
([f,
|
|
1581
|
-
!f && !
|
|
1579
|
+
[I, O, A],
|
|
1580
|
+
([f, k, g]) => {
|
|
1581
|
+
!f && !k && g && g.length === 0 && E(), g.length > 0 && (b.list = JSON.parse(JSON.stringify(g)), b.list.length > 0 && (Object.prototype.toString.call(b.list[0]) === "[object Object]" ? b.list = b.list.map((u) => ({
|
|
1582
1582
|
[p.format.value]: u[a.value.value],
|
|
1583
1583
|
[p.format.label]: u[a.value.label],
|
|
1584
1584
|
[p.format.disabled]: !!u[a.value.disabled],
|
|
@@ -1592,18 +1592,18 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1592
1592
|
immediate: !0
|
|
1593
1593
|
}
|
|
1594
1594
|
);
|
|
1595
|
-
const
|
|
1596
|
-
return r({ getElCheckboxGroupRef: B, getElCheckboxButtonRefs: () => _.value }), (f,
|
|
1597
|
-
const g = resolveComponent("el-checkbox-button"),
|
|
1598
|
-
return openBlock(), createBlock(
|
|
1595
|
+
const x = ref(null), B = () => x.value, _ = ref([]);
|
|
1596
|
+
return r({ getElCheckboxGroupRef: B, getElCheckboxButtonRefs: () => _.value }), (f, k) => {
|
|
1597
|
+
const g = resolveComponent("el-checkbox-button"), T = resolveComponent("el-checkbox-group");
|
|
1598
|
+
return openBlock(), createBlock(T, mergeProps({
|
|
1599
1599
|
ref_key: "ElCheckboxGroupRef",
|
|
1600
|
-
ref:
|
|
1600
|
+
ref: x
|
|
1601
1601
|
}, j.value, { onChange: C }), createSlots({
|
|
1602
1602
|
default: withCtx(() => [
|
|
1603
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u,
|
|
1603
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u, D) => (openBlock(), createBlock(g, mergeProps({
|
|
1604
1604
|
ref_for: !0,
|
|
1605
|
-
ref: (
|
|
1606
|
-
|
|
1605
|
+
ref: (S) => {
|
|
1606
|
+
S && (_.value[D] = S);
|
|
1607
1607
|
},
|
|
1608
1608
|
key: u[unref(p).format.value],
|
|
1609
1609
|
disabled: u[unref(p).format.disabled],
|
|
@@ -1617,10 +1617,10 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1617
1617
|
]),
|
|
1618
1618
|
_: 2
|
|
1619
1619
|
}, [
|
|
1620
|
-
renderList(f.$slots, (u,
|
|
1621
|
-
name:
|
|
1620
|
+
renderList(f.$slots, (u, D, S) => ({
|
|
1621
|
+
name: D,
|
|
1622
1622
|
fn: withCtx(($) => [
|
|
1623
|
-
renderSlot(f.$slots,
|
|
1623
|
+
renderSlot(f.$slots, D, mergeProps({ key: S }, $))
|
|
1624
1624
|
])
|
|
1625
1625
|
}))
|
|
1626
1626
|
]), 1040);
|
|
@@ -1684,19 +1684,19 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1684
1684
|
disabledDataFun: m
|
|
1685
1685
|
} = toRefs(t), v = useAttrs(), j = computed(() => {
|
|
1686
1686
|
const f = {};
|
|
1687
|
-
return Object.entries(v).forEach(([
|
|
1688
|
-
const
|
|
1689
|
-
if (!
|
|
1690
|
-
const u = ToCamelCase(
|
|
1687
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
1688
|
+
const T = ToKebabCase(k);
|
|
1689
|
+
if (!T.startsWith("checkbox-") && !T.startsWith("on-checkbox-")) {
|
|
1690
|
+
const u = ToCamelCase(T);
|
|
1691
1691
|
f[u] = g;
|
|
1692
1692
|
}
|
|
1693
1693
|
}), f;
|
|
1694
1694
|
}), F = computed(() => {
|
|
1695
1695
|
const f = {};
|
|
1696
|
-
return Object.entries(v).forEach(([
|
|
1697
|
-
const
|
|
1698
|
-
if (
|
|
1699
|
-
const u = ToCamelCase(
|
|
1696
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
1697
|
+
const T = ToKebabCase(k);
|
|
1698
|
+
if (T.startsWith("checkbox-") || T.startsWith("on-checkbox-")) {
|
|
1699
|
+
const u = ToCamelCase(T.replace("checkbox-", ""));
|
|
1700
1700
|
f[u] = g;
|
|
1701
1701
|
}
|
|
1702
1702
|
}), f;
|
|
@@ -1705,8 +1705,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1705
1705
|
d("dictChange", f);
|
|
1706
1706
|
return;
|
|
1707
1707
|
}
|
|
1708
|
-
const
|
|
1709
|
-
d("dictChange",
|
|
1708
|
+
const k = b.list.filter((g) => f.includes(g[p.format.value]));
|
|
1709
|
+
d("dictChange", k);
|
|
1710
1710
|
}, b = reactive({
|
|
1711
1711
|
list: []
|
|
1712
1712
|
}), E = async () => {
|
|
@@ -1715,44 +1715,44 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1715
1715
|
let f = [];
|
|
1716
1716
|
if (typeof l.value == "object") {
|
|
1717
1717
|
y.value = l.value.type;
|
|
1718
|
-
const
|
|
1719
|
-
f = [].concat(
|
|
1718
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
1719
|
+
f = [].concat(k[y.value]);
|
|
1720
1720
|
const {
|
|
1721
1721
|
filters: g,
|
|
1722
|
-
filterType:
|
|
1722
|
+
filterType: T = p.format.value,
|
|
1723
1723
|
reverse: u = !1
|
|
1724
|
-
} = l.value,
|
|
1725
|
-
u ? f = f.filter((
|
|
1724
|
+
} = l.value, D = typeof g == "string" ? g.split(",") : g;
|
|
1725
|
+
u ? f = f.filter((S) => !D.includes(S[T])) : f = f.filter((S) => D.includes(S[T]));
|
|
1726
1726
|
} else {
|
|
1727
1727
|
y.value = l.value;
|
|
1728
|
-
const
|
|
1729
|
-
f = [].concat(
|
|
1728
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
1729
|
+
f = [].concat(k[y.value]);
|
|
1730
1730
|
}
|
|
1731
1731
|
if (s.value && (f = s.value(f)), m.value)
|
|
1732
|
-
f = f.map((
|
|
1733
|
-
...
|
|
1734
|
-
[p.format.disabled]: m.value(
|
|
1732
|
+
f = f.map((k) => ({
|
|
1733
|
+
...k,
|
|
1734
|
+
[p.format.disabled]: m.value(k)
|
|
1735
1735
|
}));
|
|
1736
1736
|
else if (o.value) {
|
|
1737
1737
|
const {
|
|
1738
|
-
disabledValues:
|
|
1738
|
+
disabledValues: k,
|
|
1739
1739
|
disabledType: g = p.format.value,
|
|
1740
|
-
reverse:
|
|
1741
|
-
} = o.value, u = typeof
|
|
1742
|
-
|
|
1743
|
-
const
|
|
1744
|
-
return
|
|
1745
|
-
}) : f = f.map((
|
|
1746
|
-
const
|
|
1747
|
-
return
|
|
1740
|
+
reverse: T = !1
|
|
1741
|
+
} = o.value, u = typeof k == "string" ? k.split(",") : k;
|
|
1742
|
+
T ? f = f.map((D) => {
|
|
1743
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
1744
|
+
return S[p.format.disabled] = !u.includes(S[g]) || S[p.format.disabled], S;
|
|
1745
|
+
}) : f = f.map((D) => {
|
|
1746
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
1747
|
+
return S[p.format.disabled] = u.includes(S[g]) || S[p.format.disabled], S;
|
|
1748
1748
|
});
|
|
1749
1749
|
}
|
|
1750
1750
|
b.list = f;
|
|
1751
|
-
},
|
|
1751
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(y.value)), O = computed(() => store.state.isGettingAllDictTypes), A = computed(() => n.value);
|
|
1752
1752
|
watch(
|
|
1753
|
-
[
|
|
1754
|
-
([f,
|
|
1755
|
-
!f && !
|
|
1753
|
+
[I, O, A],
|
|
1754
|
+
([f, k, g]) => {
|
|
1755
|
+
!f && !k && g && g.length === 0 && E(), g.length > 0 && (b.list = JSON.parse(JSON.stringify(g)), b.list.length > 0 && (Object.prototype.toString.call(b.list[0]) === "[object Object]" ? b.list = b.list.map((u) => ({
|
|
1756
1756
|
[p.format.value]: u[a.value.value],
|
|
1757
1757
|
[p.format.label]: u[a.value.label],
|
|
1758
1758
|
[p.format.disabled]: !!u[a.value.disabled],
|
|
@@ -1766,18 +1766,18 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1766
1766
|
immediate: !0
|
|
1767
1767
|
}
|
|
1768
1768
|
);
|
|
1769
|
-
const
|
|
1770
|
-
return r({ getElCheckboxGroupRef: B, getElCheckboxRefs: () => _.value }), (f,
|
|
1771
|
-
const g = resolveComponent("el-checkbox"),
|
|
1772
|
-
return openBlock(), createBlock(
|
|
1769
|
+
const x = ref(null), B = () => x.value, _ = ref([]);
|
|
1770
|
+
return r({ getElCheckboxGroupRef: B, getElCheckboxRefs: () => _.value }), (f, k) => {
|
|
1771
|
+
const g = resolveComponent("el-checkbox"), T = resolveComponent("el-checkbox-group");
|
|
1772
|
+
return openBlock(), createBlock(T, mergeProps({
|
|
1773
1773
|
ref_key: "ElCheckboxGroupRef",
|
|
1774
|
-
ref:
|
|
1774
|
+
ref: x
|
|
1775
1775
|
}, j.value, { onChange: C }), createSlots({
|
|
1776
1776
|
default: withCtx(() => [
|
|
1777
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u,
|
|
1777
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u, D) => (openBlock(), createBlock(g, mergeProps({
|
|
1778
1778
|
ref_for: !0,
|
|
1779
|
-
ref: (
|
|
1780
|
-
|
|
1779
|
+
ref: (S) => {
|
|
1780
|
+
S && (_.value[D] = S);
|
|
1781
1781
|
},
|
|
1782
1782
|
key: u[unref(p).format.value],
|
|
1783
1783
|
label: u[unref(p).format.value],
|
|
@@ -1791,10 +1791,10 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1791
1791
|
]),
|
|
1792
1792
|
_: 2
|
|
1793
1793
|
}, [
|
|
1794
|
-
renderList(f.$slots, (u,
|
|
1795
|
-
name:
|
|
1794
|
+
renderList(f.$slots, (u, D, S) => ({
|
|
1795
|
+
name: D,
|
|
1796
1796
|
fn: withCtx(($) => [
|
|
1797
|
-
renderSlot(f.$slots,
|
|
1797
|
+
renderSlot(f.$slots, D, normalizeProps(guardReactiveProps($)))
|
|
1798
1798
|
])
|
|
1799
1799
|
}))
|
|
1800
1800
|
]), 1040);
|
|
@@ -2480,8 +2480,8 @@ const Mask = (e, r) => {
|
|
|
2480
2480
|
return Object.entries(n).forEach(([C, b]) => {
|
|
2481
2481
|
const E = ToKebabCase(C);
|
|
2482
2482
|
if (!E.startsWith("descriptions-item-") && !E.startsWith("on-descriptions-item-")) {
|
|
2483
|
-
const
|
|
2484
|
-
d[
|
|
2483
|
+
const I = ToCamelCase(E);
|
|
2484
|
+
d[I] = b;
|
|
2485
2485
|
}
|
|
2486
2486
|
}), d;
|
|
2487
2487
|
}), l = computed(() => {
|
|
@@ -2489,8 +2489,8 @@ const Mask = (e, r) => {
|
|
|
2489
2489
|
return Object.entries(n).forEach(([C, b]) => {
|
|
2490
2490
|
const E = ToKebabCase(C);
|
|
2491
2491
|
if (E.startsWith("descriptions-item-") || E.startsWith("on-descriptions-item")) {
|
|
2492
|
-
const
|
|
2493
|
-
d[
|
|
2492
|
+
const I = ToCamelCase(E.replace("descriptions-item-", ""));
|
|
2493
|
+
d[I] = b;
|
|
2494
2494
|
}
|
|
2495
2495
|
}), d;
|
|
2496
2496
|
});
|
|
@@ -2537,16 +2537,16 @@ const Mask = (e, r) => {
|
|
|
2537
2537
|
};
|
|
2538
2538
|
}, j = ref(null), F = ref([]);
|
|
2539
2539
|
return r({ getElDescriptionsRef: () => j.value, getElDescriptionsItemRefs: () => F.value }), (d, C) => {
|
|
2540
|
-
const b = resolveComponent("el-button-dict"), E = resolveComponent("el-link-dict"),
|
|
2541
|
-
return openBlock(), createBlock(
|
|
2540
|
+
const b = resolveComponent("el-button-dict"), E = resolveComponent("el-link-dict"), I = resolveComponent("el-tag-dict"), O = resolveComponent("el-text-dict"), A = resolveComponent("el-descriptions-item"), x = resolveComponent("el-descriptions");
|
|
2541
|
+
return openBlock(), createBlock(x, mergeProps({
|
|
2542
2542
|
ref_key: "ElDescriptionsRef",
|
|
2543
2543
|
ref: j
|
|
2544
2544
|
}, a.value), createSlots({
|
|
2545
2545
|
default: withCtx(() => [
|
|
2546
2546
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t), (B, _) => (openBlock(), createBlock(A, mergeProps({
|
|
2547
2547
|
ref_for: !0,
|
|
2548
|
-
ref: (
|
|
2549
|
-
|
|
2548
|
+
ref: (N) => {
|
|
2549
|
+
N && (F.value[_] = N);
|
|
2550
2550
|
},
|
|
2551
2551
|
key: _
|
|
2552
2552
|
}, o(B)), createSlots({
|
|
@@ -2560,7 +2560,7 @@ const Mask = (e, r) => {
|
|
|
2560
2560
|
key: 1,
|
|
2561
2561
|
modelValue: B.modelValue || "",
|
|
2562
2562
|
dictType: B.dictType
|
|
2563
|
-
}, null, 8, ["modelValue", "dictType"])) : B.dictTypeNode === "tag" ? (openBlock(), createBlock(
|
|
2563
|
+
}, null, 8, ["modelValue", "dictType"])) : B.dictTypeNode === "tag" ? (openBlock(), createBlock(I, {
|
|
2564
2564
|
key: 2,
|
|
2565
2565
|
modelValue: B.modelValue || "",
|
|
2566
2566
|
dictType: B.dictType
|
|
@@ -2587,13 +2587,13 @@ const Mask = (e, r) => {
|
|
|
2587
2587
|
]),
|
|
2588
2588
|
_: 2
|
|
2589
2589
|
}, [
|
|
2590
|
-
renderList(B.slotList, (
|
|
2591
|
-
name:
|
|
2592
|
-
fn: withCtx((
|
|
2590
|
+
renderList(B.slotList, (N, f) => ({
|
|
2591
|
+
name: N.slotName,
|
|
2592
|
+
fn: withCtx((k) => [
|
|
2593
2593
|
(openBlock(), createBlock(_sfc_main$j, {
|
|
2594
2594
|
key: f,
|
|
2595
|
-
render:
|
|
2596
|
-
scope:
|
|
2595
|
+
render: N.render,
|
|
2596
|
+
scope: k
|
|
2597
2597
|
}, null, 8, ["render", "scope"]))
|
|
2598
2598
|
])
|
|
2599
2599
|
}))
|
|
@@ -2601,10 +2601,10 @@ const Mask = (e, r) => {
|
|
|
2601
2601
|
]),
|
|
2602
2602
|
_: 2
|
|
2603
2603
|
}, [
|
|
2604
|
-
renderList(d.$slots, (B, _,
|
|
2604
|
+
renderList(d.$slots, (B, _, N) => ({
|
|
2605
2605
|
name: _,
|
|
2606
2606
|
fn: withCtx((f) => [
|
|
2607
|
-
renderSlot(d.$slots, _, mergeProps({ key:
|
|
2607
|
+
renderSlot(d.$slots, _, mergeProps({ key: N }, f))
|
|
2608
2608
|
])
|
|
2609
2609
|
}))
|
|
2610
2610
|
]), 1040);
|
|
@@ -2719,7 +2719,7 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2719
2719
|
} = toRefs(c), E = computed(() => {
|
|
2720
2720
|
const _ = {};
|
|
2721
2721
|
return i.value !== void 0 && i.value !== null && (_.defaultVal = i.value), n.value !== void 0 && n.value !== null && (_.emptyText = n.value), m.value !== void 0 && m.value !== null && (_.formatFun = m.value), F.value !== void 0 && F.value !== null && (_.spacer = F.value), _;
|
|
2722
|
-
}),
|
|
2722
|
+
}), I = computed(() => {
|
|
2723
2723
|
const _ = {};
|
|
2724
2724
|
return i.value !== void 0 && i.value !== null && (_.defaultVal = i.value), n.value !== void 0 && n.value !== null && (_.emptyText = n.value), v.value !== void 0 && v.value !== null && (_.formatFunIn = v.value), j.value !== void 0 && j.value !== null && (_.formatFunOut = j.value), s.value !== void 0 && s.value !== null && (_.treeSetting = s.value), F.value !== void 0 && F.value !== null && (_.spacer = F.value), _;
|
|
2725
2725
|
}), O = computed(() => !!y.value || !!p.value || !!C.value || !!d.value), A = computed(() => {
|
|
@@ -2751,12 +2751,12 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2751
2751
|
symbol: b.value || "*",
|
|
2752
2752
|
defaultVal: i.value
|
|
2753
2753
|
};
|
|
2754
|
-
}),
|
|
2755
|
-
return r({ getElDescriptionsItemRef: () =>
|
|
2756
|
-
const f = resolveComponent("el-button-dict"),
|
|
2754
|
+
}), x = ref(null);
|
|
2755
|
+
return r({ getElDescriptionsItemRef: () => x.value }), (_, N) => {
|
|
2756
|
+
const f = resolveComponent("el-button-dict"), k = resolveComponent("el-link-dict"), g = resolveComponent("el-tag-dict"), T = resolveComponent("el-text-dict"), u = resolveComponent("el-descriptions-item");
|
|
2757
2757
|
return openBlock(), createBlock(u, mergeProps({
|
|
2758
2758
|
ref_key: "ElDescriptionsItemRef",
|
|
2759
|
-
ref:
|
|
2759
|
+
ref: x
|
|
2760
2760
|
}, _.$attrs), createSlots({
|
|
2761
2761
|
default: withCtx(() => [
|
|
2762
2762
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -2764,7 +2764,7 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2764
2764
|
key: 0,
|
|
2765
2765
|
modelValue: unref(t) || "",
|
|
2766
2766
|
dictType: unref(a)
|
|
2767
|
-
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "link" ? (openBlock(), createBlock(
|
|
2767
|
+
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "link" ? (openBlock(), createBlock(k, {
|
|
2768
2768
|
key: 1,
|
|
2769
2769
|
modelValue: unref(t) || "",
|
|
2770
2770
|
dictType: unref(a)
|
|
@@ -2772,7 +2772,7 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2772
2772
|
key: 2,
|
|
2773
2773
|
modelValue: unref(t) || "",
|
|
2774
2774
|
dictType: unref(a)
|
|
2775
|
-
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "text" ? (openBlock(), createBlock(
|
|
2775
|
+
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "text" ? (openBlock(), createBlock(T, {
|
|
2776
2776
|
key: 3,
|
|
2777
2777
|
modelValue: unref(t) || "",
|
|
2778
2778
|
dictType: unref(a)
|
|
@@ -2783,7 +2783,7 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2783
2783
|
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
2784
2784
|
unref(t),
|
|
2785
2785
|
unref(l),
|
|
2786
|
-
|
|
2786
|
+
I.value
|
|
2787
2787
|
)), 1)
|
|
2788
2788
|
], 64)) : unref(o) && unref(t) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2789
2789
|
createTextVNode(toDisplayString(unref(FormatDate)(unref(t), unref(o), unref(i))), 1)
|
|
@@ -2795,10 +2795,10 @@ const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2795
2795
|
]),
|
|
2796
2796
|
_: 2
|
|
2797
2797
|
}, [
|
|
2798
|
-
renderList(_.$slots, (
|
|
2799
|
-
name:
|
|
2798
|
+
renderList(_.$slots, (D, S, $) => ({
|
|
2799
|
+
name: S,
|
|
2800
2800
|
fn: withCtx((G) => [
|
|
2801
|
-
renderSlot(_.$slots,
|
|
2801
|
+
renderSlot(_.$slots, S, mergeProps({ key: $ }, G))
|
|
2802
2802
|
])
|
|
2803
2803
|
}))
|
|
2804
2804
|
]), 1040);
|
|
@@ -2840,163 +2840,162 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
2840
2840
|
emits: ["pass", "fail", "update:modelValue", "action"],
|
|
2841
2841
|
setup(e, { expose: r, emit: c }) {
|
|
2842
2842
|
const t = useAttrs(), n = toRaw(store.state.dictConfig), a = ref(null), l = e, { modelValue: o, rules: i, idField: s, componentList: m } = toRefs(l), v = c, j = computed(() => {
|
|
2843
|
-
var
|
|
2843
|
+
var D;
|
|
2844
2844
|
if (typeof t.colon == "boolean")
|
|
2845
2845
|
return t.colon;
|
|
2846
|
-
const u = (
|
|
2846
|
+
const u = (D = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : D.isShowLabelColon;
|
|
2847
2847
|
return typeof u == "boolean" ? u : !1;
|
|
2848
2848
|
}), F = ref([]), y = ref({});
|
|
2849
2849
|
let p = JSON.parse(JSON.stringify(y));
|
|
2850
2850
|
const d = (u) => {
|
|
2851
|
-
var
|
|
2852
|
-
if ((
|
|
2851
|
+
var S, $, G, M, z;
|
|
2852
|
+
if ((S = n.dynamicComponentsConfig) != null && S.disabledNoPlaceholder && (u != null && u.disabled) || ($ = n.dynamicComponentsConfig) != null && $.readonlyNoPlaceholder && (u != null && u.readonly))
|
|
2853
2853
|
return "";
|
|
2854
|
-
let
|
|
2855
|
-
return u != null && u.compName && ToKebabCase(u == null ? void 0 : u.compName).includes("input") && (
|
|
2854
|
+
let D = "请选择";
|
|
2855
|
+
return u != null && u.compName && ToKebabCase(u == null ? void 0 : u.compName).includes("input") && (D = "请输入"), (G = n.dynamicComponentsConfig) != null && G.isShowLabelPlaceholder && (D = D + ((M = u.props) == null ? void 0 : M.label)), ((z = u.props) == null ? void 0 : z.placeholder) || D || "";
|
|
2856
2856
|
}, C = ref(!1), b = ref(""), E = () => {
|
|
2857
|
-
var
|
|
2857
|
+
var S, $, G, M, z, J, K, U, V, R, q;
|
|
2858
2858
|
b.value = "id" + GenerateUUID();
|
|
2859
2859
|
let u = [];
|
|
2860
2860
|
for (let L = 0; L < m.value.length; L++) {
|
|
2861
|
-
const
|
|
2862
|
-
let
|
|
2863
|
-
if (
|
|
2864
|
-
...
|
|
2865
|
-
id:
|
|
2866
|
-
showRuleType: (
|
|
2867
|
-
validatorRuleType: (
|
|
2861
|
+
const w = m.value[L];
|
|
2862
|
+
let W = null;
|
|
2863
|
+
if (w != null && w.isFormData && (w != null && w.fieldName) ? W = {
|
|
2864
|
+
...w,
|
|
2865
|
+
id: w != null && w[s.value] ? w[s.value] : GenerateUUID(),
|
|
2866
|
+
showRuleType: (w == null ? void 0 : w.showRuleType) || ((S = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : S.showRuleType) || "compare",
|
|
2867
|
+
validatorRuleType: (w == null ? void 0 : w.validatorRuleType) || (($ = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : $.validatorRuleType) || "compare",
|
|
2868
2868
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
2869
|
-
visible:
|
|
2869
|
+
visible: w.showRules && w.showRules.length > 0 || w.hidden ? !1 : (w == null ? void 0 : w.visible) ?? !0,
|
|
2870
2870
|
//
|
|
2871
2871
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
2872
|
-
props:
|
|
2872
|
+
props: w.props ? {
|
|
2873
2873
|
...(G = n.dynamicComponentsConfig) == null ? void 0 : G.props,
|
|
2874
|
-
...
|
|
2875
|
-
placeholder: d(
|
|
2874
|
+
...w.props,
|
|
2875
|
+
placeholder: d(w)
|
|
2876
2876
|
} : {
|
|
2877
2877
|
...(M = n.dynamicComponentsConfig) == null ? void 0 : M.props,
|
|
2878
|
-
placeholder: d(
|
|
2878
|
+
placeholder: d(w)
|
|
2879
2879
|
},
|
|
2880
|
-
formItemProps:
|
|
2881
|
-
...
|
|
2882
|
-
id:
|
|
2883
|
-
class: (z =
|
|
2880
|
+
formItemProps: w.formItemProps ? {
|
|
2881
|
+
...w.formItemProps,
|
|
2882
|
+
id: w != null && w[s.value] ? w[s.value] : GenerateUUID(),
|
|
2883
|
+
class: (z = w.props) != null && z.class ? w.props.class + " " + ((w == null ? void 0 : w.fieldName) || "") : (w == null ? void 0 : w.fieldName) || ""
|
|
2884
2884
|
} : {
|
|
2885
|
-
id:
|
|
2886
|
-
class: (
|
|
2885
|
+
id: w != null && w[s.value] ? w[s.value] : GenerateUUID(),
|
|
2886
|
+
class: (w == null ? void 0 : w.fieldName) || ""
|
|
2887
2887
|
}
|
|
2888
|
-
} :
|
|
2889
|
-
...
|
|
2890
|
-
id:
|
|
2891
|
-
showRuleType: (
|
|
2892
|
-
validatorRuleType: (
|
|
2888
|
+
} : W = {
|
|
2889
|
+
...w,
|
|
2890
|
+
id: w != null && w[s.value] ? w[s.value] : GenerateUUID(),
|
|
2891
|
+
showRuleType: (w == null ? void 0 : w.showRuleType) || ((J = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : J.showRuleType) || "compare",
|
|
2892
|
+
validatorRuleType: (w == null ? void 0 : w.validatorRuleType) || ((K = n == null ? void 0 : n.dynamicComponentsConfig) == null ? void 0 : K.validatorRuleType) || "compare",
|
|
2893
2893
|
// 解决重置无法正常显示或隐藏的问题 有显示规则的先给他设置为 false
|
|
2894
|
-
visible:
|
|
2894
|
+
visible: w.showRules && w.showRules.length > 0 || w.hidden ? !1 : (w == null ? void 0 : w.visible) ?? !0,
|
|
2895
2895
|
// 默认为true(显示)
|
|
2896
2896
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
2897
|
-
props:
|
|
2898
|
-
...
|
|
2897
|
+
props: w.props ? {
|
|
2898
|
+
...w.props
|
|
2899
2899
|
} : {}
|
|
2900
|
-
}, (
|
|
2901
|
-
const Z = ((
|
|
2902
|
-
|
|
2903
|
-
const
|
|
2904
|
-
|
|
2900
|
+
}, (U = w.formItemProps) != null && U.rules || (V = i.value) != null && V[w.fieldName]) {
|
|
2901
|
+
const Z = ((R = w.formItemProps) == null ? void 0 : R.rules) || ((q = i.value) == null ? void 0 : q[w.fieldName]) || [];
|
|
2902
|
+
w.fieldName && (W.formItemProps.prop = W.formItemProps.prop || w.fieldName), W.formItemProps.required = Z.some((ne) => ne.required) || W.formItemProps.required || !1;
|
|
2903
|
+
const re = [...Z];
|
|
2904
|
+
W.formItemProps.rules = re.map((ne) => {
|
|
2905
2905
|
var oe;
|
|
2906
|
-
const P = { ...
|
|
2907
|
-
if (P.required && !P.message && (P.message =
|
|
2906
|
+
const P = { ...ne };
|
|
2907
|
+
if (P.required && !P.message && (P.message = W.props.placeholder || `${W.formItemProps.label}不能为空`), P.pattern && typeof P.pattern == "string" && (P.pattern = new RegExp(P.pattern)), P.validator) {
|
|
2908
2908
|
if (typeof P.validator == "string") {
|
|
2909
|
-
const
|
|
2910
|
-
P.validator = (ae,
|
|
2911
|
-
|
|
2909
|
+
const H = (oe = n.validator) == null ? void 0 : oe[P.validator];
|
|
2910
|
+
P.validator = (ae, Q, Y) => {
|
|
2911
|
+
H(Q) ? Y() : Y((P == null ? void 0 : P.message) || "错误提示");
|
|
2912
2912
|
};
|
|
2913
2913
|
} else if (Array.isArray(P.validator)) {
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
} :
|
|
2918
|
-
|
|
2919
|
-
} :
|
|
2920
|
-
let
|
|
2921
|
-
for (let le = 0; le <
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2914
|
+
const H = [...P.validator];
|
|
2915
|
+
W.validatorRuleType === "calculate" ? P.validator = (ae, Q, Y) => {
|
|
2916
|
+
H.some((ee) => CheckConditionsByOperation(ee, y.value)) ? Y() : Y((P == null ? void 0 : P.message) || "错误提示");
|
|
2917
|
+
} : W.validatorRuleType === "compare" ? P.validator = (ae, Q, Y) => {
|
|
2918
|
+
H.some((ee) => CheckConditions(ee, y.value)) ? Y() : Y((P == null ? void 0 : P.message) || "错误提示");
|
|
2919
|
+
} : W.validatorRuleType && (P.validator = (ae, Q, Y) => {
|
|
2920
|
+
let X = [];
|
|
2921
|
+
for (let le = 0; le < H.length; le++) {
|
|
2922
|
+
const te = H[le];
|
|
2923
|
+
te.type === "calculate" ? X.push(te.rules.some((se) => CheckConditionsByOperation(se, y.value))) : te.type === "compare" && X.push(te.rules.some((se) => CheckConditions(se, y.value)));
|
|
2924
2924
|
}
|
|
2925
|
-
CalculateLogicalResult(
|
|
2925
|
+
CalculateLogicalResult(X, W.validatorRuleType) ? Y() : Y((P == null ? void 0 : P.message) || "错误提示");
|
|
2926
2926
|
});
|
|
2927
2927
|
}
|
|
2928
2928
|
}
|
|
2929
2929
|
return P;
|
|
2930
2930
|
});
|
|
2931
2931
|
}
|
|
2932
|
-
u.push(
|
|
2932
|
+
u.push(W);
|
|
2933
2933
|
}
|
|
2934
2934
|
F.value = u;
|
|
2935
|
-
const
|
|
2935
|
+
const D = {};
|
|
2936
2936
|
F.value.forEach((L) => {
|
|
2937
|
-
var
|
|
2937
|
+
var w, W;
|
|
2938
2938
|
if (L.isFormData && L.fieldName) {
|
|
2939
|
-
const Z = (
|
|
2940
|
-
|
|
2939
|
+
const Z = (w = o.value) == null ? void 0 : w[L.fieldName];
|
|
2940
|
+
D[L.fieldName] = Z !== void 0 ? Z : ((W = L == null ? void 0 : L.props) == null ? void 0 : W.modelValue) !== void 0 ? L.props.modelValue : "";
|
|
2941
2941
|
}
|
|
2942
|
-
}), y.value = JSON.parse(JSON.stringify(
|
|
2943
|
-
},
|
|
2944
|
-
|
|
2945
|
-
const T = JSON.parse(JSON.stringify(y.value)), k = sortComponentsByIdDependencies(F.value), $ = [], G = (V) => typeof V == "string" ? V.split(",").filter(Boolean) : Array.isArray(V) ? V : [], M = async () => {
|
|
2942
|
+
}), y.value = JSON.parse(JSON.stringify(D));
|
|
2943
|
+
}, I = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError), O = async (u) => {
|
|
2944
|
+
const D = JSON.parse(JSON.stringify(y.value)), S = sortComponentsByIdDependencies(F.value), $ = [], G = (V) => typeof V == "string" ? V.split(",").filter(Boolean) : Array.isArray(V) ? V : [], M = async () => {
|
|
2946
2945
|
if (a.value)
|
|
2947
2946
|
return;
|
|
2948
2947
|
const V = 1e3, R = 50;
|
|
2949
|
-
let
|
|
2950
|
-
return new Promise((
|
|
2951
|
-
const
|
|
2952
|
-
a.value ||
|
|
2948
|
+
let q = 0;
|
|
2949
|
+
return new Promise((L) => {
|
|
2950
|
+
const w = () => {
|
|
2951
|
+
a.value || q >= V ? L() : (q += R, setTimeout(w, R));
|
|
2953
2952
|
};
|
|
2954
|
-
|
|
2953
|
+
w();
|
|
2955
2954
|
});
|
|
2956
2955
|
}, z = async (V) => {
|
|
2957
2956
|
if (await M(), !a.value)
|
|
2958
2957
|
return !1;
|
|
2959
2958
|
try {
|
|
2960
|
-
return await a.value.validateField(V)
|
|
2959
|
+
return await (a == null ? void 0 : a.value.validateField(V));
|
|
2961
2960
|
} catch {
|
|
2962
2961
|
return !1;
|
|
2963
2962
|
}
|
|
2964
|
-
},
|
|
2963
|
+
}, J = async (V) => {
|
|
2965
2964
|
var R;
|
|
2966
2965
|
await M(), (R = a.value) == null || R.clearValidate(V);
|
|
2967
|
-
},
|
|
2966
|
+
}, K = {
|
|
2968
2967
|
// 处理"calculate"类型
|
|
2969
|
-
calculate: (V) => V.showRules.some((R) => CheckConditionsByOperation(R,
|
|
2968
|
+
calculate: (V) => V.showRules.some((R) => CheckConditionsByOperation(R, D)),
|
|
2970
2969
|
// 处理"compare"类型
|
|
2971
|
-
compare: (V) => V.showRules.some((R) => CheckConditions(R,
|
|
2970
|
+
compare: (V) => V.showRules.some((R) => CheckConditions(R, D)),
|
|
2972
2971
|
// 处理"validate"类型
|
|
2973
2972
|
validate: async (V) => {
|
|
2974
2973
|
const R = G(V.showRules);
|
|
2975
2974
|
if (await z(R))
|
|
2976
2975
|
return !0;
|
|
2977
2976
|
{
|
|
2978
|
-
const
|
|
2979
|
-
return await
|
|
2977
|
+
const L = R.filter((w) => w !== u);
|
|
2978
|
+
return await J(L), !1;
|
|
2980
2979
|
}
|
|
2981
2980
|
},
|
|
2982
2981
|
// 处理嵌套类型(showRuleType为逻辑运算符,如"&&"、"||")
|
|
2983
2982
|
default: async (V) => {
|
|
2984
2983
|
const R = [];
|
|
2985
|
-
for (const
|
|
2986
|
-
switch (
|
|
2984
|
+
for (const q of V.showRules)
|
|
2985
|
+
switch (q.type) {
|
|
2987
2986
|
case "calculate":
|
|
2988
|
-
R.push(
|
|
2987
|
+
R.push(q.rules.some((L) => CheckConditionsByOperation(L, D)));
|
|
2989
2988
|
break;
|
|
2990
2989
|
case "compare":
|
|
2991
|
-
R.push(
|
|
2990
|
+
R.push(q.rules.some((L) => CheckConditions(L, D)));
|
|
2992
2991
|
break;
|
|
2993
2992
|
case "validate": {
|
|
2994
|
-
const
|
|
2995
|
-
if (!
|
|
2996
|
-
const
|
|
2997
|
-
await
|
|
2993
|
+
const L = G(q.rules), w = await z(L);
|
|
2994
|
+
if (!w) {
|
|
2995
|
+
const W = L.filter((Z) => Z !== u);
|
|
2996
|
+
await J(W);
|
|
2998
2997
|
}
|
|
2999
|
-
R.push(
|
|
2998
|
+
R.push(w);
|
|
3000
2999
|
break;
|
|
3001
3000
|
}
|
|
3002
3001
|
default:
|
|
@@ -3005,44 +3004,51 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3005
3004
|
return CalculateLogicalResult(R, V.showRuleType);
|
|
3006
3005
|
}
|
|
3007
3006
|
};
|
|
3008
|
-
for (const V of
|
|
3007
|
+
for (const V of S) {
|
|
3009
3008
|
if (V.hidden)
|
|
3010
3009
|
continue;
|
|
3011
3010
|
const R = V.visible;
|
|
3012
|
-
let
|
|
3013
|
-
V.showRules && V.showRules.length > 0 && (
|
|
3011
|
+
let q = R;
|
|
3012
|
+
V.showRules && V.showRules.length > 0 && (q = await (K[V.showRuleType] || K.default)(V)), V.visible = q, V.fieldName && !R && q && $.push(V.fieldName), !q && V.fieldName && (D[V.fieldName] = Array.isArray(D[V.fieldName]) ? [] : "");
|
|
3014
3013
|
}
|
|
3015
|
-
const
|
|
3016
|
-
var
|
|
3017
|
-
const R =
|
|
3018
|
-
if (!(((
|
|
3014
|
+
const U = $.filter((V) => {
|
|
3015
|
+
var W, Z;
|
|
3016
|
+
const R = S.find((re) => re.fieldName === V);
|
|
3017
|
+
if (!(((Z = (W = R == null ? void 0 : R.formItemProps) == null ? void 0 : W.rules) == null ? void 0 : Z.length) > 0))
|
|
3019
3018
|
return !1;
|
|
3020
|
-
const
|
|
3021
|
-
return typeof
|
|
3019
|
+
const L = y.value[V];
|
|
3020
|
+
return typeof L == "string" ? !!L.trim() : typeof L == "object" && L !== null && Object.keys(L).length > 0;
|
|
3022
3021
|
});
|
|
3023
|
-
|
|
3022
|
+
if (U.length > 0) {
|
|
3023
|
+
await M();
|
|
3024
|
+
const V = A();
|
|
3025
|
+
C.value = !0, v("update:modelValue", V), setTimeout(() => {
|
|
3026
|
+
var R;
|
|
3027
|
+
(R = a.value) == null || R.validateField(U);
|
|
3028
|
+
}, 0);
|
|
3029
|
+
}
|
|
3024
3030
|
}, A = () => {
|
|
3025
3031
|
const u = JSON.parse(JSON.stringify(y.value));
|
|
3026
|
-
for (let
|
|
3027
|
-
const
|
|
3028
|
-
!
|
|
3032
|
+
for (let D = 0; D < F.value.length; D++) {
|
|
3033
|
+
const S = F.value[D];
|
|
3034
|
+
!S.visible && !S.hidden && delete u[S.fieldName];
|
|
3029
3035
|
}
|
|
3030
3036
|
return u;
|
|
3031
|
-
},
|
|
3037
|
+
}, x = (u, D, S = "") => {
|
|
3032
3038
|
const $ = [];
|
|
3033
|
-
if (typeof u != "object" || u === null ||
|
|
3034
|
-
return u !==
|
|
3035
|
-
key:
|
|
3036
|
-
oldVal:
|
|
3039
|
+
if (typeof u != "object" || u === null || D === null)
|
|
3040
|
+
return u !== D && $.push({
|
|
3041
|
+
key: S,
|
|
3042
|
+
oldVal: D,
|
|
3037
3043
|
newVal: u
|
|
3038
3044
|
}), $;
|
|
3039
|
-
const G = /* @__PURE__ */ new Set([...Object.keys(u), ...Object.keys(
|
|
3045
|
+
const G = /* @__PURE__ */ new Set([...Object.keys(u), ...Object.keys(D)]);
|
|
3040
3046
|
for (const M of G) {
|
|
3041
|
-
const z =
|
|
3042
|
-
typeof
|
|
3047
|
+
const z = S ? `${S}.${M}` : M, J = u[M], K = D[M];
|
|
3048
|
+
typeof J == "object" && J !== null && !Array.isArray(J) ? $.push(...x(J, K, z)) : J !== K && $.push({
|
|
3043
3049
|
key: z,
|
|
3044
|
-
oldVal:
|
|
3045
|
-
newVal:
|
|
3050
|
+
oldVal: K,
|
|
3051
|
+
newVal: J
|
|
3046
3052
|
});
|
|
3047
3053
|
}
|
|
3048
3054
|
return $;
|
|
@@ -3057,19 +3063,19 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3057
3063
|
let B = !0;
|
|
3058
3064
|
watch(y, (u) => {
|
|
3059
3065
|
var $;
|
|
3060
|
-
const
|
|
3066
|
+
const D = JSON.parse(JSON.stringify(u));
|
|
3061
3067
|
if (B)
|
|
3062
3068
|
O();
|
|
3063
3069
|
else {
|
|
3064
|
-
const M = ($ =
|
|
3070
|
+
const M = ($ = x(D, p).find((z) => {
|
|
3065
3071
|
if (JSON.stringify(z.newVal) !== JSON.stringify(z.oldVal))
|
|
3066
3072
|
return !0;
|
|
3067
3073
|
})) == null ? void 0 : $.key;
|
|
3068
3074
|
O(M);
|
|
3069
3075
|
}
|
|
3070
|
-
p =
|
|
3071
|
-
const
|
|
3072
|
-
C.value = !0, v("update:modelValue",
|
|
3076
|
+
p = D;
|
|
3077
|
+
const S = A();
|
|
3078
|
+
C.value = !0, v("update:modelValue", S), B = !1;
|
|
3073
3079
|
}, {
|
|
3074
3080
|
deep: !0,
|
|
3075
3081
|
immediate: !0
|
|
@@ -3080,26 +3086,26 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3080
3086
|
}
|
|
3081
3087
|
E();
|
|
3082
3088
|
}, { deep: !0 });
|
|
3083
|
-
const _ = async (u,
|
|
3084
|
-
const
|
|
3089
|
+
const _ = async (u, D) => {
|
|
3090
|
+
const S = A();
|
|
3085
3091
|
u && u.validate(($, G) => {
|
|
3086
3092
|
if ($)
|
|
3087
|
-
v("pass",
|
|
3088
|
-
else if (v("fail", G),
|
|
3093
|
+
v("pass", S, D);
|
|
3094
|
+
else if (v("fail", G, S, D), I.value) {
|
|
3089
3095
|
const M = Object.keys(G)[0];
|
|
3090
3096
|
u.scrollToField(M);
|
|
3091
3097
|
}
|
|
3092
3098
|
});
|
|
3093
|
-
},
|
|
3099
|
+
}, N = async () => {
|
|
3094
3100
|
E(), await nextTick(), a.value && setTimeout(() => {
|
|
3095
3101
|
a.value.resetFields();
|
|
3096
3102
|
}, 30);
|
|
3097
3103
|
}, f = (u) => {
|
|
3098
|
-
const
|
|
3099
|
-
v("action", u,
|
|
3100
|
-
},
|
|
3101
|
-
return r({ getFormData: A, resetFormData: E, getComponentRef: (u) => u ?
|
|
3102
|
-
const
|
|
3104
|
+
const D = A();
|
|
3105
|
+
v("action", u, D);
|
|
3106
|
+
}, k = ref({});
|
|
3107
|
+
return r({ getFormData: A, resetFormData: E, getComponentRef: (u) => u ? k.value[u] : k.value, getDynamicComponentsRef: () => a.value }), (u, D) => {
|
|
3108
|
+
const S = resolveComponent("el-form-item"), $ = resolveComponent("el-form");
|
|
3103
3109
|
return openBlock(), createBlock($, mergeProps({
|
|
3104
3110
|
model: unref(o),
|
|
3105
3111
|
class: ["dict-dynamic-components container-class", b.value],
|
|
@@ -3111,29 +3117,29 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3111
3117
|
var z;
|
|
3112
3118
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3113
3119
|
G.visible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3114
|
-
G.isFormData ? (openBlock(), createBlock(
|
|
3120
|
+
G.isFormData ? (openBlock(), createBlock(S, mergeProps({ key: 0 }, G.formItemProps, { class: "comp-item form" }), {
|
|
3115
3121
|
default: withCtx(() => {
|
|
3116
|
-
var
|
|
3122
|
+
var J;
|
|
3117
3123
|
return [
|
|
3118
3124
|
(openBlock(), createBlock(resolveDynamicComponent(G.compName), mergeProps({
|
|
3119
3125
|
ref_for: !0,
|
|
3120
|
-
ref: (
|
|
3121
|
-
|
|
3126
|
+
ref: (K) => {
|
|
3127
|
+
K && G.fieldName && (k.value[G.fieldName] = K);
|
|
3122
3128
|
},
|
|
3123
3129
|
key: M
|
|
3124
3130
|
}, G.props, {
|
|
3125
3131
|
modelValue: y.value[G.fieldName],
|
|
3126
|
-
"onUpdate:modelValue": (
|
|
3127
|
-
y.value[G.fieldName] =
|
|
3132
|
+
"onUpdate:modelValue": (K) => {
|
|
3133
|
+
y.value[G.fieldName] = K;
|
|
3128
3134
|
}
|
|
3129
3135
|
}), createSlots({ _: 2 }, [
|
|
3130
|
-
renderList((
|
|
3131
|
-
name:
|
|
3132
|
-
fn: withCtx((
|
|
3136
|
+
renderList((J = G == null ? void 0 : G.props) == null ? void 0 : J.slotList, (K, U) => ({
|
|
3137
|
+
name: K.slotName,
|
|
3138
|
+
fn: withCtx((V) => [
|
|
3133
3139
|
(openBlock(), createBlock(_sfc_main$j, {
|
|
3134
|
-
key:
|
|
3135
|
-
render:
|
|
3136
|
-
scope:
|
|
3140
|
+
key: U,
|
|
3141
|
+
render: K.render,
|
|
3142
|
+
scope: V,
|
|
3137
3143
|
formData: y.value
|
|
3138
3144
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3139
3145
|
])
|
|
@@ -3146,17 +3152,17 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3146
3152
|
class: "comp-item",
|
|
3147
3153
|
key: M
|
|
3148
3154
|
}, G.props, {
|
|
3149
|
-
onSubmit: (
|
|
3150
|
-
onReset:
|
|
3151
|
-
onAction: (
|
|
3155
|
+
onSubmit: (J) => _(a.value, G),
|
|
3156
|
+
onReset: N,
|
|
3157
|
+
onAction: (J) => f(G)
|
|
3152
3158
|
}), createSlots({ _: 2 }, [
|
|
3153
|
-
renderList((z = G == null ? void 0 : G.props) == null ? void 0 : z.slotList, (
|
|
3154
|
-
name:
|
|
3155
|
-
fn: withCtx((
|
|
3159
|
+
renderList((z = G == null ? void 0 : G.props) == null ? void 0 : z.slotList, (J, K) => ({
|
|
3160
|
+
name: J.slotName,
|
|
3161
|
+
fn: withCtx((U) => [
|
|
3156
3162
|
(openBlock(), createBlock(_sfc_main$j, {
|
|
3157
|
-
key:
|
|
3158
|
-
render:
|
|
3159
|
-
scope:
|
|
3163
|
+
key: K,
|
|
3164
|
+
render: J.render,
|
|
3165
|
+
scope: U,
|
|
3160
3166
|
formData: y.value
|
|
3161
3167
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3162
3168
|
])
|
|
@@ -3170,7 +3176,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3170
3176
|
}, 16, ["model", "class", "colon"]);
|
|
3171
3177
|
};
|
|
3172
3178
|
}
|
|
3173
|
-
}), dictComponent = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
3179
|
+
}), dictComponent = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ccd77baf"]]);
|
|
3174
3180
|
dictComponent.install = function(e) {
|
|
3175
3181
|
e.component(dictComponent.name, dictComponent);
|
|
3176
3182
|
};
|
|
@@ -3242,8 +3248,8 @@ const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3242
3248
|
}, { immediate: !0, deep: !0 }), onUnmounted(() => {
|
|
3243
3249
|
v.value = !1;
|
|
3244
3250
|
}), (b, E) => {
|
|
3245
|
-
const
|
|
3246
|
-
return openBlock(), createBlock(
|
|
3251
|
+
const I = resolveComponent("el-input");
|
|
3252
|
+
return openBlock(), createBlock(I, mergeProps({
|
|
3247
3253
|
modelValue: m.value,
|
|
3248
3254
|
"onUpdate:modelValue": E[0] || (E[0] = (O) => m.value = O)
|
|
3249
3255
|
}, b.$attrs, {
|
|
@@ -3310,26 +3316,26 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3310
3316
|
},
|
|
3311
3317
|
emits: ["submit", "reset", "action"],
|
|
3312
3318
|
setup(e, { expose: r, emit: c }) {
|
|
3313
|
-
const t = e, { actionType: n, modelValue: a, dictType: l, judgeTypeFun: o, type: i, judgeColorFun: s, color: m, judgeDisabledFun: v, disabled: j, defaultVal: F, emptyText: y } = toRefs(t), p = c, d = toRaw(store.state.dictConfig), C = computed(() => o.value ? o.value(a.value) : i.value ? i.value :
|
|
3314
|
-
let
|
|
3319
|
+
const t = e, { actionType: n, modelValue: a, dictType: l, judgeTypeFun: o, type: i, judgeColorFun: s, color: m, judgeDisabledFun: v, disabled: j, defaultVal: F, emptyText: y } = toRefs(t), p = c, d = toRaw(store.state.dictConfig), C = computed(() => o.value ? o.value(a.value) : i.value ? i.value : I.value && I.value[d.format.type] ? I.value[d.format.type] : "primary"), b = computed(() => s.value ? s.value(a.value) : m.value ? m.value : I.value && I.value[d.format.color] ? I.value[d.format.color] : ""), E = computed(() => v.value ? v.value(a.value) : I.value && I.value[d.format.disabled] ? I.value[d.format.disabled] : !!j.value);
|
|
3320
|
+
let I = ref(null), O = ref(null);
|
|
3315
3321
|
watchEffect(() => {
|
|
3316
3322
|
if (!l.value) {
|
|
3317
3323
|
O.value = a.value;
|
|
3318
3324
|
return;
|
|
3319
3325
|
}
|
|
3320
3326
|
GetItemByCode(a.value, l.value).then((_) => {
|
|
3321
|
-
_ ? (
|
|
3327
|
+
_ ? (I.value = _, O.value = _[d.format.label]) : (I.value = null, O.value = String(F.value ?? (a.value === 0 ? 0 : a.value || y.value)));
|
|
3322
3328
|
});
|
|
3323
3329
|
});
|
|
3324
3330
|
const A = () => {
|
|
3325
3331
|
E.value || p(n.value, attrs);
|
|
3326
|
-
},
|
|
3327
|
-
return r({ getElLinkRef: () =>
|
|
3332
|
+
}, x = ref(null);
|
|
3333
|
+
return r({ getElLinkRef: () => x.value }), (_, N) => {
|
|
3328
3334
|
const f = resolveComponent("el-link");
|
|
3329
3335
|
return openBlock(), createBlock(f, mergeProps({
|
|
3330
3336
|
class: "el-link-dict",
|
|
3331
3337
|
ref_key: "ElLinkRef",
|
|
3332
|
-
ref:
|
|
3338
|
+
ref: x,
|
|
3333
3339
|
type: C.value,
|
|
3334
3340
|
color: b.value,
|
|
3335
3341
|
disabled: E.value
|
|
@@ -3339,10 +3345,10 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3339
3345
|
]),
|
|
3340
3346
|
_: 2
|
|
3341
3347
|
}, [
|
|
3342
|
-
renderList(_.$slots, (
|
|
3348
|
+
renderList(_.$slots, (k, g, T) => ({
|
|
3343
3349
|
name: g,
|
|
3344
3350
|
fn: withCtx((u) => [
|
|
3345
|
-
renderSlot(_.$slots, g, mergeProps({ key:
|
|
3351
|
+
renderSlot(_.$slots, g, mergeProps({ key: T }, u))
|
|
3346
3352
|
])
|
|
3347
3353
|
}))
|
|
3348
3354
|
]), 1040, ["type", "color", "disabled"]);
|
|
@@ -3406,19 +3412,19 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3406
3412
|
disabledDataFun: m
|
|
3407
3413
|
} = toRefs(t), v = useAttrs(), j = computed(() => {
|
|
3408
3414
|
const f = {};
|
|
3409
|
-
return Object.entries(v).forEach(([
|
|
3410
|
-
const
|
|
3411
|
-
if (!
|
|
3412
|
-
const u = ToCamelCase(
|
|
3415
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3416
|
+
const T = ToKebabCase(k);
|
|
3417
|
+
if (!T.startsWith("radio-button-") && !T.startsWith("on-radio-button-")) {
|
|
3418
|
+
const u = ToCamelCase(T);
|
|
3413
3419
|
f[u] = g;
|
|
3414
3420
|
}
|
|
3415
3421
|
}), f;
|
|
3416
3422
|
}), F = computed(() => {
|
|
3417
3423
|
const f = {};
|
|
3418
|
-
return Object.entries(v).forEach(([
|
|
3419
|
-
const
|
|
3420
|
-
if (
|
|
3421
|
-
const u = ToCamelCase(
|
|
3424
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3425
|
+
const T = ToKebabCase(k);
|
|
3426
|
+
if (T.startsWith("radio-button-") || T.startsWith("on-radio-button-")) {
|
|
3427
|
+
const u = ToCamelCase(T.replace("radio-button-", ""));
|
|
3422
3428
|
f[u] = g;
|
|
3423
3429
|
}
|
|
3424
3430
|
}), f;
|
|
@@ -3427,8 +3433,8 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3427
3433
|
d("dictChange", f);
|
|
3428
3434
|
return;
|
|
3429
3435
|
}
|
|
3430
|
-
const
|
|
3431
|
-
d("dictChange",
|
|
3436
|
+
const k = b.list.find((g) => g[p.format.value] === f);
|
|
3437
|
+
d("dictChange", k);
|
|
3432
3438
|
}, b = reactive({
|
|
3433
3439
|
list: []
|
|
3434
3440
|
}), E = async () => {
|
|
@@ -3437,44 +3443,44 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3437
3443
|
let f = [];
|
|
3438
3444
|
if (typeof l.value == "object") {
|
|
3439
3445
|
y.value = l.value.type;
|
|
3440
|
-
const
|
|
3441
|
-
f = [].concat(
|
|
3446
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3447
|
+
f = [].concat(k[y.value]);
|
|
3442
3448
|
const {
|
|
3443
3449
|
filters: g,
|
|
3444
|
-
filterType:
|
|
3450
|
+
filterType: T = p.format.value,
|
|
3445
3451
|
reverse: u = !1
|
|
3446
|
-
} = l.value,
|
|
3447
|
-
u ? f = f.filter((
|
|
3452
|
+
} = l.value, D = typeof g == "string" ? g.split(",") : g;
|
|
3453
|
+
u ? f = f.filter((S) => !D.includes(S[T])) : f = f.filter((S) => D.includes(S[T]));
|
|
3448
3454
|
} else {
|
|
3449
3455
|
y.value = l.value;
|
|
3450
|
-
const
|
|
3451
|
-
f = [].concat(
|
|
3456
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3457
|
+
f = [].concat(k[y.value]);
|
|
3452
3458
|
}
|
|
3453
3459
|
if (s.value && (f = s.value(f)), m.value)
|
|
3454
|
-
f = f.map((
|
|
3455
|
-
...
|
|
3456
|
-
[p.format.disabled]: m.value(
|
|
3460
|
+
f = f.map((k) => ({
|
|
3461
|
+
...k,
|
|
3462
|
+
[p.format.disabled]: m.value(k)
|
|
3457
3463
|
}));
|
|
3458
3464
|
else if (o.value) {
|
|
3459
3465
|
const {
|
|
3460
|
-
disabledValues:
|
|
3466
|
+
disabledValues: k,
|
|
3461
3467
|
disabledType: g = p.format.value,
|
|
3462
|
-
reverse:
|
|
3463
|
-
} = o.value, u = typeof
|
|
3464
|
-
|
|
3465
|
-
const
|
|
3466
|
-
return
|
|
3467
|
-
}) : f = f.map((
|
|
3468
|
-
const
|
|
3469
|
-
return
|
|
3468
|
+
reverse: T = !1
|
|
3469
|
+
} = o.value, u = typeof k == "string" ? k.split(",") : k;
|
|
3470
|
+
T ? f = f.map((D) => {
|
|
3471
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3472
|
+
return S[p.format.disabled] = !u.includes(S[g]) || S[p.format.disabled], S;
|
|
3473
|
+
}) : f = f.map((D) => {
|
|
3474
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3475
|
+
return S[p.format.disabled] = u.includes(S[g]) || S[p.format.disabled], S;
|
|
3470
3476
|
});
|
|
3471
3477
|
}
|
|
3472
3478
|
b.list = f;
|
|
3473
|
-
},
|
|
3479
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(y.value)), O = computed(() => store.state.isGettingAllDictTypes), A = computed(() => n.value);
|
|
3474
3480
|
watch(
|
|
3475
|
-
[
|
|
3476
|
-
([f,
|
|
3477
|
-
!f && !
|
|
3481
|
+
[I, O, A],
|
|
3482
|
+
([f, k, g]) => {
|
|
3483
|
+
!f && !k && g && g.length === 0 && E(), g.length > 0 && (b.list = JSON.parse(JSON.stringify(g)), b.list.length > 0 && (Object.prototype.toString.call(b.list[0]) === "[object Object]" ? b.list = b.list.map((u) => ({
|
|
3478
3484
|
[p.format.value]: u[a.value.value],
|
|
3479
3485
|
[p.format.label]: u[a.value.label],
|
|
3480
3486
|
[p.format.disabled]: !!u[a.value.disabled],
|
|
@@ -3488,18 +3494,18 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3488
3494
|
immediate: !0
|
|
3489
3495
|
}
|
|
3490
3496
|
);
|
|
3491
|
-
const
|
|
3492
|
-
return r({ getElRadioGroupRef: () => _.value, getElRadioButtonRefs: B }), (f,
|
|
3493
|
-
const g = resolveComponent("el-radio-button"),
|
|
3494
|
-
return openBlock(), createBlock(
|
|
3497
|
+
const x = ref([]), B = () => x.value, _ = ref(null);
|
|
3498
|
+
return r({ getElRadioGroupRef: () => _.value, getElRadioButtonRefs: B }), (f, k) => {
|
|
3499
|
+
const g = resolveComponent("el-radio-button"), T = resolveComponent("el-radio-group");
|
|
3500
|
+
return openBlock(), createBlock(T, mergeProps({
|
|
3495
3501
|
ref_key: "ElRadioGroupRef",
|
|
3496
3502
|
ref: _
|
|
3497
3503
|
}, j.value, { onChange: C }), createSlots({
|
|
3498
3504
|
default: withCtx(() => [
|
|
3499
|
-
f.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(b.list, (u,
|
|
3505
|
+
f.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(b.list, (u, D) => (openBlock(), createBlock(g, mergeProps({
|
|
3500
3506
|
ref_for: !0,
|
|
3501
|
-
ref: (
|
|
3502
|
-
|
|
3507
|
+
ref: (S) => {
|
|
3508
|
+
S && (x.value[D] = S);
|
|
3503
3509
|
},
|
|
3504
3510
|
key: u[unref(p).format.value],
|
|
3505
3511
|
disabled: u[unref(p).format.disabled],
|
|
@@ -3513,10 +3519,10 @@ const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3513
3519
|
]),
|
|
3514
3520
|
_: 2
|
|
3515
3521
|
}, [
|
|
3516
|
-
renderList(f.$slots, (u,
|
|
3517
|
-
name:
|
|
3522
|
+
renderList(f.$slots, (u, D, S) => ({
|
|
3523
|
+
name: D,
|
|
3518
3524
|
fn: withCtx(($) => [
|
|
3519
|
-
renderSlot(f.$slots,
|
|
3525
|
+
renderSlot(f.$slots, D, normalizeProps(guardReactiveProps($)))
|
|
3520
3526
|
])
|
|
3521
3527
|
}))
|
|
3522
3528
|
]), 1040);
|
|
@@ -3582,19 +3588,19 @@ const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3582
3588
|
disabledDataFun: m
|
|
3583
3589
|
} = toRefs(t), v = useAttrs(), j = computed(() => {
|
|
3584
3590
|
const f = {};
|
|
3585
|
-
return Object.entries(v).forEach(([
|
|
3586
|
-
const
|
|
3587
|
-
if (!
|
|
3588
|
-
const u = ToCamelCase(
|
|
3591
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3592
|
+
const T = ToKebabCase(k);
|
|
3593
|
+
if (!T.startsWith("radio-") && !T.startsWith("on-radio-")) {
|
|
3594
|
+
const u = ToCamelCase(T);
|
|
3589
3595
|
f[u] = g;
|
|
3590
3596
|
}
|
|
3591
3597
|
}), f;
|
|
3592
3598
|
}), F = computed(() => {
|
|
3593
3599
|
const f = {};
|
|
3594
|
-
return Object.entries(v).forEach(([
|
|
3595
|
-
const
|
|
3596
|
-
if (
|
|
3597
|
-
const u = ToCamelCase(
|
|
3600
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3601
|
+
const T = ToKebabCase(k);
|
|
3602
|
+
if (T.startsWith("radio-") || T.startsWith("on-radio-")) {
|
|
3603
|
+
const u = ToCamelCase(T.replace("radio-", ""));
|
|
3598
3604
|
f[u] = g;
|
|
3599
3605
|
}
|
|
3600
3606
|
}), f;
|
|
@@ -3603,8 +3609,8 @@ const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3603
3609
|
d("dictChange", f);
|
|
3604
3610
|
return;
|
|
3605
3611
|
}
|
|
3606
|
-
const
|
|
3607
|
-
d("dictChange",
|
|
3612
|
+
const k = b.list.find((g) => g[p.format.value] === f);
|
|
3613
|
+
d("dictChange", k);
|
|
3608
3614
|
}, b = reactive({
|
|
3609
3615
|
list: []
|
|
3610
3616
|
}), E = async () => {
|
|
@@ -3613,44 +3619,44 @@ const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3613
3619
|
let f = [];
|
|
3614
3620
|
if (typeof l.value == "object") {
|
|
3615
3621
|
y.value = l.value.type;
|
|
3616
|
-
const
|
|
3617
|
-
f = [].concat(
|
|
3622
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3623
|
+
f = [].concat(k[y.value]);
|
|
3618
3624
|
const {
|
|
3619
3625
|
filters: g,
|
|
3620
|
-
filterType:
|
|
3626
|
+
filterType: T = p.format.value,
|
|
3621
3627
|
reverse: u = !1
|
|
3622
|
-
} = l.value,
|
|
3623
|
-
u ? f = f.filter((
|
|
3628
|
+
} = l.value, D = typeof g == "string" ? g.split(",") : g;
|
|
3629
|
+
u ? f = f.filter((S) => !D.includes(S[T])) : f = f.filter((S) => D.includes(S[T]));
|
|
3624
3630
|
} else {
|
|
3625
3631
|
y.value = l.value;
|
|
3626
|
-
const
|
|
3627
|
-
f = [].concat(
|
|
3632
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3633
|
+
f = [].concat(k[y.value]);
|
|
3628
3634
|
}
|
|
3629
3635
|
if (s.value && (f = s.value(f)), m.value)
|
|
3630
|
-
f = f.map((
|
|
3631
|
-
...
|
|
3632
|
-
[p.format.disabled]: m.value(
|
|
3636
|
+
f = f.map((k) => ({
|
|
3637
|
+
...k,
|
|
3638
|
+
[p.format.disabled]: m.value(k)
|
|
3633
3639
|
}));
|
|
3634
3640
|
else if (o.value) {
|
|
3635
3641
|
const {
|
|
3636
|
-
disabledValues:
|
|
3642
|
+
disabledValues: k,
|
|
3637
3643
|
disabledType: g = p.format.value,
|
|
3638
|
-
reverse:
|
|
3639
|
-
} = o.value, u = typeof
|
|
3640
|
-
|
|
3641
|
-
const
|
|
3642
|
-
return
|
|
3643
|
-
}) : f = f.map((
|
|
3644
|
-
const
|
|
3645
|
-
return
|
|
3644
|
+
reverse: T = !1
|
|
3645
|
+
} = o.value, u = typeof k == "string" ? k.split(",") : k;
|
|
3646
|
+
T ? f = f.map((D) => {
|
|
3647
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3648
|
+
return S[p.format.disabled] = !u.includes(S[g]) || S[p.format.disabled], S;
|
|
3649
|
+
}) : f = f.map((D) => {
|
|
3650
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3651
|
+
return S[p.format.disabled] = u.includes(S[g]) || S[p.format.disabled], S;
|
|
3646
3652
|
});
|
|
3647
3653
|
}
|
|
3648
3654
|
b.list = f;
|
|
3649
|
-
},
|
|
3655
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(y.value)), O = computed(() => store.state.isGettingAllDictTypes), A = computed(() => n.value);
|
|
3650
3656
|
watch(
|
|
3651
|
-
[
|
|
3652
|
-
([f,
|
|
3653
|
-
!f && !
|
|
3657
|
+
[I, O, A],
|
|
3658
|
+
([f, k, g]) => {
|
|
3659
|
+
!f && !k && g && g.length === 0 && E(), g.length > 0 && (b.list = JSON.parse(JSON.stringify(g)), b.list.length > 0 && (Object.prototype.toString.call(b.list[0]) === "[object Object]" ? b.list = b.list.map((u) => ({
|
|
3654
3660
|
[p.format.value]: u[a.value.value],
|
|
3655
3661
|
[p.format.label]: u[a.value.label],
|
|
3656
3662
|
[p.format.disabled]: !!u[a.value.disabled],
|
|
@@ -3664,18 +3670,18 @@ const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3664
3670
|
immediate: !0
|
|
3665
3671
|
}
|
|
3666
3672
|
);
|
|
3667
|
-
const
|
|
3668
|
-
return r({ geElRadioGroupRef: () => _.value, getElRadioRefs: B }), (f,
|
|
3669
|
-
const g = resolveComponent("el-radio"),
|
|
3670
|
-
return openBlock(), createBlock(
|
|
3673
|
+
const x = ref([]), B = () => x.value, _ = ref(null);
|
|
3674
|
+
return r({ geElRadioGroupRef: () => _.value, getElRadioRefs: B }), (f, k) => {
|
|
3675
|
+
const g = resolveComponent("el-radio"), T = resolveComponent("el-radio-group");
|
|
3676
|
+
return openBlock(), createBlock(T, mergeProps({
|
|
3671
3677
|
ref_key: "ElRadioGroupRef",
|
|
3672
3678
|
ref: _
|
|
3673
3679
|
}, j.value, { onChange: C }), createSlots({
|
|
3674
3680
|
default: withCtx(() => [
|
|
3675
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u,
|
|
3681
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u, D) => (openBlock(), createBlock(g, mergeProps({
|
|
3676
3682
|
ref_for: !0,
|
|
3677
|
-
ref: (
|
|
3678
|
-
|
|
3683
|
+
ref: (S) => {
|
|
3684
|
+
S && (x.value[D] = S);
|
|
3679
3685
|
},
|
|
3680
3686
|
key: u[unref(p).format.value],
|
|
3681
3687
|
disabled: u[unref(p).format.disabled],
|
|
@@ -3689,10 +3695,10 @@ const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3689
3695
|
]),
|
|
3690
3696
|
_: 2
|
|
3691
3697
|
}, [
|
|
3692
|
-
renderList(f.$slots, (u,
|
|
3693
|
-
name:
|
|
3698
|
+
renderList(f.$slots, (u, D, S) => ({
|
|
3699
|
+
name: D,
|
|
3694
3700
|
fn: withCtx(($) => [
|
|
3695
|
-
renderSlot(f.$slots,
|
|
3701
|
+
renderSlot(f.$slots, D, normalizeProps(guardReactiveProps($)))
|
|
3696
3702
|
])
|
|
3697
3703
|
}))
|
|
3698
3704
|
]), 1040);
|
|
@@ -3748,19 +3754,19 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3748
3754
|
setup(e, { expose: r, emit: c }) {
|
|
3749
3755
|
const t = e, { data: n, format: a, dictType: l, disabledObj: o, keyValue: i, filterDataFun: s, disabledDataFun: m } = toRefs(t), v = useAttrs(), j = computed(() => {
|
|
3750
3756
|
const f = {};
|
|
3751
|
-
return Object.entries(v).forEach(([
|
|
3752
|
-
const
|
|
3753
|
-
if (!
|
|
3754
|
-
const u = ToCamelCase(
|
|
3757
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3758
|
+
const T = ToKebabCase(k);
|
|
3759
|
+
if (!T.startsWith("option-") && !T.startsWith("on-option-")) {
|
|
3760
|
+
const u = ToCamelCase(T);
|
|
3755
3761
|
f[u] = g;
|
|
3756
3762
|
}
|
|
3757
3763
|
}), f;
|
|
3758
3764
|
}), F = computed(() => {
|
|
3759
3765
|
const f = {};
|
|
3760
|
-
return Object.entries(v).forEach(([
|
|
3761
|
-
const
|
|
3762
|
-
if (
|
|
3763
|
-
const u = ToCamelCase(
|
|
3766
|
+
return Object.entries(v).forEach(([k, g]) => {
|
|
3767
|
+
const T = ToKebabCase(k);
|
|
3768
|
+
if (T.startsWith("option-") || T.startsWith("on-option-")) {
|
|
3769
|
+
const u = ToCamelCase(T.replace("option-", ""));
|
|
3764
3770
|
f[u] = g;
|
|
3765
3771
|
}
|
|
3766
3772
|
}), f;
|
|
@@ -3774,44 +3780,44 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3774
3780
|
let f = [];
|
|
3775
3781
|
if (typeof l.value == "object") {
|
|
3776
3782
|
y.value = l.value.type;
|
|
3777
|
-
const
|
|
3778
|
-
f = [].concat(
|
|
3783
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3784
|
+
f = [].concat(k[y.value]);
|
|
3779
3785
|
const {
|
|
3780
3786
|
filters: g,
|
|
3781
|
-
filterType:
|
|
3787
|
+
filterType: T = p.format.value,
|
|
3782
3788
|
reverse: u = !1
|
|
3783
|
-
} = l.value,
|
|
3784
|
-
u ? f = f.filter((
|
|
3789
|
+
} = l.value, D = typeof g == "string" ? g.split(",") : g;
|
|
3790
|
+
u ? f = f.filter((S) => !D.includes(S[T])) : f = f.filter((S) => D.includes(S[T]));
|
|
3785
3791
|
} else {
|
|
3786
3792
|
y.value = l.value;
|
|
3787
|
-
const
|
|
3788
|
-
f = [].concat(
|
|
3793
|
+
const k = await store.actions.getDictDataObj(y.value);
|
|
3794
|
+
f = [].concat(k[y.value]);
|
|
3789
3795
|
}
|
|
3790
3796
|
if (s.value && (f = s.value(f)), m.value)
|
|
3791
|
-
f = f.map((
|
|
3792
|
-
...
|
|
3793
|
-
[p.format.disabled]: m.value(
|
|
3797
|
+
f = f.map((k) => ({
|
|
3798
|
+
...k,
|
|
3799
|
+
[p.format.disabled]: m.value(k)
|
|
3794
3800
|
}));
|
|
3795
3801
|
else if (o.value) {
|
|
3796
3802
|
const {
|
|
3797
|
-
disabledValues:
|
|
3803
|
+
disabledValues: k,
|
|
3798
3804
|
disabledType: g = p.format.value,
|
|
3799
|
-
reverse:
|
|
3800
|
-
} = o.value, u = typeof
|
|
3801
|
-
|
|
3802
|
-
const
|
|
3803
|
-
return
|
|
3804
|
-
}) : f = f.map((
|
|
3805
|
-
const
|
|
3806
|
-
return
|
|
3805
|
+
reverse: T = !1
|
|
3806
|
+
} = o.value, u = typeof k == "string" ? k.split(",") : k;
|
|
3807
|
+
T ? f = f.map((D) => {
|
|
3808
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3809
|
+
return S[p.format.disabled] = !u.includes(S[g]) || S[p.format.disabled], S;
|
|
3810
|
+
}) : f = f.map((D) => {
|
|
3811
|
+
const S = JSON.parse(JSON.stringify(D));
|
|
3812
|
+
return S[p.format.disabled] = u.includes(S[g]) || S[p.format.disabled], S;
|
|
3807
3813
|
});
|
|
3808
3814
|
}
|
|
3809
3815
|
b.list = f;
|
|
3810
|
-
},
|
|
3816
|
+
}, I = computed(() => store.state.isGettingDictTypes.includes(y.value)), O = computed(() => store.state.isGettingAllDictTypes), A = computed(() => n.value);
|
|
3811
3817
|
watch(
|
|
3812
|
-
[
|
|
3813
|
-
([f,
|
|
3814
|
-
!f && !
|
|
3818
|
+
[I, O, A],
|
|
3819
|
+
([f, k, g]) => {
|
|
3820
|
+
!f && !k && g && g.length === 0 && E(), g.length > 0 && (b.list = JSON.parse(JSON.stringify(g)), b.list.length > 0 && (Object.prototype.toString.call(b.list[0]) === "[object Object]" ? b.list = b.list.map((u) => ({
|
|
3815
3821
|
[p.format.value]: u[a.value.value],
|
|
3816
3822
|
[p.format.label]: u[a.value.label],
|
|
3817
3823
|
[p.format.disabled]: !!u[a.value.disabled],
|
|
@@ -3825,12 +3831,12 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3825
3831
|
immediate: !0
|
|
3826
3832
|
}
|
|
3827
3833
|
);
|
|
3828
|
-
const
|
|
3829
|
-
return r({ getElSelectRef: B, getElOptionRefs: () => _.value }), (f,
|
|
3830
|
-
const g = resolveComponent("el-option"),
|
|
3831
|
-
return openBlock(), createBlock(
|
|
3834
|
+
const x = ref(null), B = () => x.value, _ = ref([]);
|
|
3835
|
+
return r({ getElSelectRef: B, getElOptionRefs: () => _.value }), (f, k) => {
|
|
3836
|
+
const g = resolveComponent("el-option"), T = resolveComponent("el-select");
|
|
3837
|
+
return openBlock(), createBlock(T, mergeProps({
|
|
3832
3838
|
ref_key: "ElSelectRef",
|
|
3833
|
-
ref:
|
|
3839
|
+
ref: x
|
|
3834
3840
|
}, j.value, {
|
|
3835
3841
|
"value-key": unref(i) ? unref(p).format.label : "",
|
|
3836
3842
|
onChange: C,
|
|
@@ -3839,8 +3845,8 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3839
3845
|
default: withCtx(() => [
|
|
3840
3846
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.list, (u) => (openBlock(), createBlock(g, mergeProps({
|
|
3841
3847
|
ref_for: !0,
|
|
3842
|
-
ref: (
|
|
3843
|
-
|
|
3848
|
+
ref: (D) => {
|
|
3849
|
+
D && (_.value[f.index] = D);
|
|
3844
3850
|
},
|
|
3845
3851
|
key: u[unref(p).format.value],
|
|
3846
3852
|
disabled: u[unref(p).format.disabled],
|
|
@@ -3850,10 +3856,10 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3850
3856
|
]),
|
|
3851
3857
|
_: 2
|
|
3852
3858
|
}, [
|
|
3853
|
-
renderList(f.$slots, (u,
|
|
3854
|
-
name:
|
|
3859
|
+
renderList(f.$slots, (u, D, S) => ({
|
|
3860
|
+
name: D,
|
|
3855
3861
|
fn: withCtx(($) => [
|
|
3856
|
-
renderSlot(f.$slots,
|
|
3862
|
+
renderSlot(f.$slots, D, mergeProps({ key: S }, $))
|
|
3857
3863
|
])
|
|
3858
3864
|
}))
|
|
3859
3865
|
]), 1040, ["value-key"]);
|
|
@@ -3966,7 +3972,7 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3966
3972
|
} = toRefs(t), E = computed(() => {
|
|
3967
3973
|
const _ = {};
|
|
3968
3974
|
return i.value !== void 0 && i.value !== null && (_.defaultVal = i.value), n.value !== void 0 && n.value !== null && (_.emptyText = n.value), m.value !== void 0 && m.value !== null && (_.formatFun = m.value), F.value !== void 0 && F.value !== null && (_.spacer = F.value), _;
|
|
3969
|
-
}),
|
|
3975
|
+
}), I = computed(() => {
|
|
3970
3976
|
const _ = {};
|
|
3971
3977
|
return i.value !== void 0 && i.value !== null && (_.defaultVal = i.value), n.value !== void 0 && n.value !== null && (_.emptyText = n.value), v.value !== void 0 && v.value !== null && (_.formatFunIn = v.value), j.value !== void 0 && j.value !== null && (_.formatFunOut = j.value), s.value !== void 0 && s.value !== null && (_.treeSetting = s.value), F.value !== void 0 && F.value !== null && (_.spacer = F.value), _;
|
|
3972
3978
|
}), O = computed(() => !!y.value || !!p.value || !!C.value || !!d.value), A = computed(() => {
|
|
@@ -3998,57 +4004,57 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3998
4004
|
symbol: b.value || "*",
|
|
3999
4005
|
defaultVal: i.value
|
|
4000
4006
|
};
|
|
4001
|
-
}),
|
|
4002
|
-
return r({ getElTableColumnRef: () =>
|
|
4003
|
-
const f = resolveComponent("el-button-dict"),
|
|
4007
|
+
}), x = ref(null);
|
|
4008
|
+
return r({ getElTableColumnRef: () => x.value }), (_, N) => {
|
|
4009
|
+
const f = resolveComponent("el-button-dict"), k = resolveComponent("el-link-dict"), g = resolveComponent("el-tag-dict"), T = resolveComponent("el-text-dict"), u = resolveComponent("el-table-column");
|
|
4004
4010
|
return openBlock(), createBlock(u, mergeProps({
|
|
4005
4011
|
ref_key: "ElTableColumnRef",
|
|
4006
|
-
ref:
|
|
4012
|
+
ref: x
|
|
4007
4013
|
}, _.$attrs), createSlots({
|
|
4008
|
-
default: withCtx((
|
|
4009
|
-
var
|
|
4014
|
+
default: withCtx((D) => {
|
|
4015
|
+
var S, $, G, M, z, J, K, U, V, R, q, L;
|
|
4010
4016
|
return [
|
|
4011
4017
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4012
4018
|
e.dictTypeNode === "button" ? (openBlock(), createBlock(f, {
|
|
4013
4019
|
key: 0,
|
|
4014
|
-
modelValue:
|
|
4020
|
+
modelValue: D.row[(S = unref(c)) == null ? void 0 : S.prop] || "",
|
|
4015
4021
|
dictType: unref(a)
|
|
4016
|
-
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "link" ? (openBlock(), createBlock(
|
|
4022
|
+
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "link" ? (openBlock(), createBlock(k, {
|
|
4017
4023
|
key: 1,
|
|
4018
|
-
modelValue:
|
|
4024
|
+
modelValue: D.row[($ = unref(c)) == null ? void 0 : $.prop] || "",
|
|
4019
4025
|
dictType: unref(a)
|
|
4020
4026
|
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "tag" ? (openBlock(), createBlock(g, {
|
|
4021
4027
|
key: 2,
|
|
4022
|
-
modelValue:
|
|
4028
|
+
modelValue: D.row[(G = unref(c)) == null ? void 0 : G.prop] || "",
|
|
4023
4029
|
dictType: unref(a)
|
|
4024
|
-
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "text" ? (openBlock(), createBlock(
|
|
4030
|
+
}, null, 8, ["modelValue", "dictType"])) : e.dictTypeNode === "text" ? (openBlock(), createBlock(T, {
|
|
4025
4031
|
key: 3,
|
|
4026
|
-
modelValue:
|
|
4032
|
+
modelValue: D.row[(M = unref(c)) == null ? void 0 : M.prop] || "",
|
|
4027
4033
|
dictType: unref(a)
|
|
4028
4034
|
}, null, 8, ["modelValue", "dictType"])) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4029
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(
|
|
4035
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(D.row[(z = unref(c)) == null ? void 0 : z.prop], unref(a), E.value)), 1)
|
|
4030
4036
|
], 64))
|
|
4031
|
-
], 64)) : unref(l) &&
|
|
4037
|
+
], 64)) : unref(l) && D.row[(J = unref(c)) == null ? void 0 : J.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4032
4038
|
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
4033
|
-
|
|
4039
|
+
D.row[(K = unref(c)) == null ? void 0 : K.prop],
|
|
4034
4040
|
unref(l),
|
|
4035
|
-
|
|
4041
|
+
I.value
|
|
4036
4042
|
)), 1)
|
|
4037
|
-
], 64)) : unref(o) &&
|
|
4038
|
-
createTextVNode(toDisplayString(unref(FormatDate)(
|
|
4039
|
-
], 64)) : O.value &&
|
|
4040
|
-
createTextVNode(toDisplayString(unref(Desensitization)(
|
|
4043
|
+
], 64)) : unref(o) && D.row[(U = unref(c)) == null ? void 0 : U.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4044
|
+
createTextVNode(toDisplayString(unref(FormatDate)(D.row[(V = unref(c)) == null ? void 0 : V.prop], unref(o), unref(i))), 1)
|
|
4045
|
+
], 64)) : O.value && D.row[(R = unref(c)) == null ? void 0 : R.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4046
|
+
createTextVNode(toDisplayString(unref(Desensitization)(D.row[(q = unref(c)) == null ? void 0 : q.prop], A.value)), 1)
|
|
4041
4047
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4042
|
-
createTextVNode(toDisplayString(
|
|
4048
|
+
createTextVNode(toDisplayString(D.row[(L = unref(c)) == null ? void 0 : L.prop] || unref(i)), 1)
|
|
4043
4049
|
], 64))
|
|
4044
4050
|
];
|
|
4045
4051
|
}),
|
|
4046
4052
|
_: 2
|
|
4047
4053
|
}, [
|
|
4048
|
-
renderList(_.$slots, (
|
|
4049
|
-
name:
|
|
4054
|
+
renderList(_.$slots, (D, S, $) => ({
|
|
4055
|
+
name: S,
|
|
4050
4056
|
fn: withCtx((G) => [
|
|
4051
|
-
renderSlot(_.$slots,
|
|
4057
|
+
renderSlot(_.$slots, S, mergeProps({ key: $ }, G))
|
|
4052
4058
|
])
|
|
4053
4059
|
}))
|
|
4054
4060
|
]), 1040);
|
|
@@ -4117,128 +4123,128 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4117
4123
|
filterDataFun: v,
|
|
4118
4124
|
disabledDataFun: j
|
|
4119
4125
|
} = toRefs(n), F = computed(() => {
|
|
4120
|
-
const
|
|
4121
|
-
return Object.entries(t).forEach(([g,
|
|
4126
|
+
const k = {};
|
|
4127
|
+
return Object.entries(t).forEach(([g, T]) => {
|
|
4122
4128
|
const u = ToKebabCase(g);
|
|
4123
4129
|
if (!u.startsWith("tab-pane-") && !u.startsWith("on-tab-pane-")) {
|
|
4124
|
-
const
|
|
4125
|
-
|
|
4130
|
+
const D = ToCamelCase(u);
|
|
4131
|
+
k[D] = T;
|
|
4126
4132
|
}
|
|
4127
|
-
}),
|
|
4133
|
+
}), k;
|
|
4128
4134
|
}), y = computed(() => {
|
|
4129
|
-
const
|
|
4130
|
-
return Object.entries(t).forEach(([g,
|
|
4135
|
+
const k = {};
|
|
4136
|
+
return Object.entries(t).forEach(([g, T]) => {
|
|
4131
4137
|
const u = ToKebabCase(g);
|
|
4132
4138
|
if (u.startsWith("tab-pane-") || u.startsWith("on-tab-pane-")) {
|
|
4133
|
-
const
|
|
4134
|
-
|
|
4139
|
+
const D = ToCamelCase(u.replace("tab-pane-", ""));
|
|
4140
|
+
k[D] = T;
|
|
4135
4141
|
}
|
|
4136
|
-
}),
|
|
4137
|
-
}), p = ref(""), d = toRaw(store.state.dictConfig), C = c, b = (
|
|
4142
|
+
}), k;
|
|
4143
|
+
}), p = ref(""), d = toRaw(store.state.dictConfig), C = c, b = (k) => {
|
|
4138
4144
|
window.setTimeout(() => {
|
|
4139
4145
|
if (!m.value) {
|
|
4140
4146
|
C("dictChange", t.modelValue);
|
|
4141
4147
|
return;
|
|
4142
4148
|
}
|
|
4143
|
-
const g = E.list.find((
|
|
4149
|
+
const g = E.list.find((T) => T[d.format.value] === t.modelValue);
|
|
4144
4150
|
C("dictChange", g);
|
|
4145
4151
|
}, 0);
|
|
4146
4152
|
}, E = reactive({
|
|
4147
4153
|
list: []
|
|
4148
|
-
}),
|
|
4154
|
+
}), I = async () => {
|
|
4149
4155
|
if (!i.value || a.value && a.value.length > 0)
|
|
4150
4156
|
return;
|
|
4151
|
-
let
|
|
4157
|
+
let k = [];
|
|
4152
4158
|
if (typeof i.value == "object") {
|
|
4153
4159
|
p.value = i.value.type;
|
|
4154
4160
|
const g = await store.actions.getDictDataObj(p.value);
|
|
4155
|
-
|
|
4161
|
+
k = [].concat(g[p.value]);
|
|
4156
4162
|
const {
|
|
4157
|
-
filters:
|
|
4163
|
+
filters: T,
|
|
4158
4164
|
filterType: u = d.format.value,
|
|
4159
|
-
reverse:
|
|
4160
|
-
} = i.value,
|
|
4161
|
-
|
|
4165
|
+
reverse: D = !1
|
|
4166
|
+
} = i.value, S = typeof T == "string" ? T.split(",") : T;
|
|
4167
|
+
D ? k = k.filter(($) => !S.includes($[u])) : k = k.filter(($) => S.includes($[u]));
|
|
4162
4168
|
} else {
|
|
4163
4169
|
p.value = i.value;
|
|
4164
4170
|
const g = await store.actions.getDictDataObj(p.value);
|
|
4165
|
-
|
|
4171
|
+
k = [].concat(g[p.value]);
|
|
4166
4172
|
}
|
|
4167
|
-
if (v.value && (
|
|
4168
|
-
|
|
4173
|
+
if (v.value && (k = v.value(k)), j.value)
|
|
4174
|
+
k = k.map((g) => ({
|
|
4169
4175
|
...g,
|
|
4170
4176
|
[d.format.disabled]: j.value(g)
|
|
4171
4177
|
}));
|
|
4172
4178
|
else if (s.value) {
|
|
4173
4179
|
const {
|
|
4174
4180
|
disabledValues: g,
|
|
4175
|
-
disabledType:
|
|
4181
|
+
disabledType: T = d.format.value,
|
|
4176
4182
|
reverse: u = !1
|
|
4177
|
-
} = s.value,
|
|
4178
|
-
u ?
|
|
4179
|
-
const $ = JSON.parse(JSON.stringify(
|
|
4180
|
-
return $[d.format.disabled] = !
|
|
4181
|
-
}) :
|
|
4182
|
-
const $ = JSON.parse(JSON.stringify(
|
|
4183
|
-
return $[d.format.disabled] =
|
|
4183
|
+
} = s.value, D = typeof g == "string" ? g.split(",") : g;
|
|
4184
|
+
u ? k = k.map((S) => {
|
|
4185
|
+
const $ = JSON.parse(JSON.stringify(S));
|
|
4186
|
+
return $[d.format.disabled] = !D.includes($[T]) || $[d.format.disabled], $;
|
|
4187
|
+
}) : k = k.map((S) => {
|
|
4188
|
+
const $ = JSON.parse(JSON.stringify(S));
|
|
4189
|
+
return $[d.format.disabled] = D.includes($[T]) || $[d.format.disabled], $;
|
|
4184
4190
|
});
|
|
4185
4191
|
}
|
|
4186
|
-
E.list =
|
|
4187
|
-
}, O = computed(() => store.state.isGettingDictTypes.includes(p.value)), A = computed(() => store.state.isGettingAllDictTypes),
|
|
4192
|
+
E.list = k;
|
|
4193
|
+
}, O = computed(() => store.state.isGettingDictTypes.includes(p.value)), A = computed(() => store.state.isGettingAllDictTypes), x = computed(() => a.value);
|
|
4188
4194
|
watch(
|
|
4189
|
-
[O, A,
|
|
4190
|
-
([
|
|
4191
|
-
!
|
|
4192
|
-
[d.format.value]:
|
|
4193
|
-
[d.format.label]:
|
|
4194
|
-
[d.format.disabled]: !!
|
|
4195
|
-
...
|
|
4196
|
-
})) : E.list = E.list.map((
|
|
4197
|
-
[d.format.value]:
|
|
4198
|
-
[d.format.label]:
|
|
4195
|
+
[O, A, x],
|
|
4196
|
+
([k, g, T]) => {
|
|
4197
|
+
!k && !g && T && T.length === 0 && I(), T.length > 0 && (E.list = JSON.parse(JSON.stringify(T)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((D) => ({
|
|
4198
|
+
[d.format.value]: D[l.value.value],
|
|
4199
|
+
[d.format.label]: D[l.value.label],
|
|
4200
|
+
[d.format.disabled]: !!D[l.value.disabled],
|
|
4201
|
+
...D
|
|
4202
|
+
})) : E.list = E.list.map((D) => ({
|
|
4203
|
+
[d.format.value]: D,
|
|
4204
|
+
[d.format.label]: D
|
|
4199
4205
|
}))));
|
|
4200
4206
|
},
|
|
4201
4207
|
{
|
|
4202
4208
|
immediate: !0
|
|
4203
4209
|
}
|
|
4204
4210
|
);
|
|
4205
|
-
const B = ref(null), _ = () => B.value,
|
|
4206
|
-
return r({ getElTabsRef: _, getElTabPaneRefs: () =>
|
|
4207
|
-
const
|
|
4208
|
-
return openBlock(), createBlock(
|
|
4211
|
+
const B = ref(null), _ = () => B.value, N = ref([]);
|
|
4212
|
+
return r({ getElTabsRef: _, getElTabPaneRefs: () => N.value }), (k, g) => {
|
|
4213
|
+
const T = resolveComponent("el-badge"), u = resolveComponent("el-tab-pane"), D = resolveComponent("el-tabs");
|
|
4214
|
+
return openBlock(), createBlock(D, mergeProps({
|
|
4209
4215
|
ref_key: "ElTabsRef",
|
|
4210
4216
|
ref: B,
|
|
4211
4217
|
class: "vue-element-dict-tabs"
|
|
4212
4218
|
}, F.value, { onTabClick: b }), {
|
|
4213
4219
|
default: withCtx(() => [
|
|
4214
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (
|
|
4220
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (S) => (openBlock(), createBlock(u, mergeProps({
|
|
4215
4221
|
ref_for: !0,
|
|
4216
4222
|
ref: ($) => {
|
|
4217
|
-
$ && (
|
|
4223
|
+
$ && (N.value[k.index] = $);
|
|
4218
4224
|
},
|
|
4219
|
-
disabled:
|
|
4220
|
-
label:
|
|
4221
|
-
key:
|
|
4222
|
-
name:
|
|
4225
|
+
disabled: S[unref(d).format.disabled],
|
|
4226
|
+
label: S[unref(d).format.label],
|
|
4227
|
+
key: S[unref(d).format.value],
|
|
4228
|
+
name: S[unref(d).format.value]
|
|
4223
4229
|
}, y.value), createSlots({
|
|
4224
4230
|
default: withCtx(() => [
|
|
4225
|
-
renderSlot(
|
|
4231
|
+
renderSlot(k.$slots, S[unref(d).format.value])
|
|
4226
4232
|
]),
|
|
4227
4233
|
_: 2
|
|
4228
4234
|
}, [
|
|
4229
|
-
unref(o)[
|
|
4235
|
+
unref(o)[S[unref(d).format.value]] ? {
|
|
4230
4236
|
name: "label",
|
|
4231
4237
|
fn: withCtx(() => [
|
|
4232
|
-
createVNode(
|
|
4233
|
-
type: unref(o)[
|
|
4234
|
-
"is-dot": unref(o)[
|
|
4235
|
-
value: unref(o)[
|
|
4236
|
-
max: unref(o)[
|
|
4237
|
-
hidden: unref(o)[
|
|
4238
|
+
createVNode(T, {
|
|
4239
|
+
type: unref(o)[S[unref(d).format.value]].type,
|
|
4240
|
+
"is-dot": unref(o)[S[unref(d).format.value]].isDot,
|
|
4241
|
+
value: unref(o)[S[unref(d).format.value]].value,
|
|
4242
|
+
max: unref(o)[S[unref(d).format.value]].max,
|
|
4243
|
+
hidden: unref(o)[S[unref(d).format.value]].hidden,
|
|
4238
4244
|
class: "item"
|
|
4239
4245
|
}, {
|
|
4240
4246
|
default: withCtx(() => [
|
|
4241
|
-
createTextVNode(toDisplayString(
|
|
4247
|
+
createTextVNode(toDisplayString(S[unref(d).format.label]), 1)
|
|
4242
4248
|
]),
|
|
4243
4249
|
_: 2
|
|
4244
4250
|
}, 1032, ["type", "is-dot", "value", "max", "hidden"])
|
|
@@ -4316,8 +4322,8 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4316
4322
|
});
|
|
4317
4323
|
const E = ref(null);
|
|
4318
4324
|
return r({ getElTagRef: () => E.value }), (O, A) => {
|
|
4319
|
-
const
|
|
4320
|
-
return openBlock(), createBlock(
|
|
4325
|
+
const x = resolveComponent("el-tag");
|
|
4326
|
+
return openBlock(), createBlock(x, mergeProps({
|
|
4321
4327
|
class: "el-tag-dict",
|
|
4322
4328
|
ref_key: "ElTagRef",
|
|
4323
4329
|
ref: E,
|
|
@@ -4330,10 +4336,10 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4330
4336
|
]),
|
|
4331
4337
|
_: 2
|
|
4332
4338
|
}, [
|
|
4333
|
-
renderList(O.$slots, (B, _,
|
|
4339
|
+
renderList(O.$slots, (B, _, N) => ({
|
|
4334
4340
|
name: _,
|
|
4335
4341
|
fn: withCtx((f) => [
|
|
4336
|
-
renderSlot(O.$slots, _, mergeProps({ key:
|
|
4342
|
+
renderSlot(O.$slots, _, mergeProps({ key: N }, f))
|
|
4337
4343
|
])
|
|
4338
4344
|
}))
|
|
4339
4345
|
]), 1040, ["type", "color", "disabled"]);
|
|
@@ -4404,8 +4410,8 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4404
4410
|
});
|
|
4405
4411
|
const E = ref(null);
|
|
4406
4412
|
return r({ getElTextRef: () => E.value }), (O, A) => {
|
|
4407
|
-
const
|
|
4408
|
-
return openBlock(), createBlock(
|
|
4413
|
+
const x = resolveComponent("el-text");
|
|
4414
|
+
return openBlock(), createBlock(x, mergeProps({
|
|
4409
4415
|
class: "el-text-dict",
|
|
4410
4416
|
ref_key: "ElTextRef",
|
|
4411
4417
|
ref: E,
|
|
@@ -4418,10 +4424,10 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4418
4424
|
]),
|
|
4419
4425
|
_: 2
|
|
4420
4426
|
}, [
|
|
4421
|
-
renderList(O.$slots, (B, _,
|
|
4427
|
+
renderList(O.$slots, (B, _, N) => ({
|
|
4422
4428
|
name: _,
|
|
4423
4429
|
fn: withCtx((f) => [
|
|
4424
|
-
renderSlot(O.$slots, _, mergeProps({ key:
|
|
4430
|
+
renderSlot(O.$slots, _, mergeProps({ key: N }, f))
|
|
4425
4431
|
])
|
|
4426
4432
|
}))
|
|
4427
4433
|
]), 1040, ["type", "color", "disabled"]);
|
|
@@ -4463,23 +4469,23 @@ const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4463
4469
|
const c = useAttrs(), t = e, { maxLevel: n, dictType: a, disabledObj: l, filterDataFun: o, disabledDataFun: i } = toRefs(t), s = ref(""), m = toRaw(store.state.dictConfig), v = reactive({
|
|
4464
4470
|
list: []
|
|
4465
4471
|
}), j = computed(() => {
|
|
4466
|
-
const O = JSON.parse(JSON.stringify(m.treeSetting)), A = c.props || {},
|
|
4472
|
+
const O = JSON.parse(JSON.stringify(m.treeSetting)), A = c.props || {}, x = {
|
|
4467
4473
|
valueField: A != null && A.value ? A.value : O.valueField,
|
|
4468
4474
|
labelField: A != null && A.label ? A.label : O.labelField,
|
|
4469
4475
|
childrenField: A != null && A.children ? A.children : O.childrenField,
|
|
4470
4476
|
leafField: A != null && A.leaf ? A.leaf : O.leafField,
|
|
4471
4477
|
disabled: A != null && A.disabled ? A.disabled : m.format.disabled
|
|
4472
4478
|
};
|
|
4473
|
-
return Object.assign(O,
|
|
4479
|
+
return Object.assign(O, x);
|
|
4474
4480
|
}), F = (O, A) => {
|
|
4475
|
-
for (let
|
|
4476
|
-
const B = O[
|
|
4481
|
+
for (let x = 0; x < O.length; x++) {
|
|
4482
|
+
const B = O[x];
|
|
4477
4483
|
if (B[j.value.levelField] === A) {
|
|
4478
4484
|
delete B[j.value.childrenField], B[j.value.leafField] = !0;
|
|
4479
4485
|
continue;
|
|
4480
4486
|
} else {
|
|
4481
|
-
const
|
|
4482
|
-
F(
|
|
4487
|
+
const N = B[j.value.childrenField];
|
|
4488
|
+
F(N, A);
|
|
4483
4489
|
}
|
|
4484
4490
|
}
|
|
4485
4491
|
}, y = async () => {
|
|
@@ -4491,11 +4497,11 @@ const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4491
4497
|
const A = await store.actions.getDictDataObj(s.value);
|
|
4492
4498
|
O = [].concat(A[s.value]);
|
|
4493
4499
|
const {
|
|
4494
|
-
filters:
|
|
4500
|
+
filters: x,
|
|
4495
4501
|
filterType: B = m.format.value,
|
|
4496
4502
|
reverse: _ = !1
|
|
4497
|
-
} = a.value,
|
|
4498
|
-
_ ? O = O.filter((f) => !
|
|
4503
|
+
} = a.value, N = typeof x == "string" ? x.split(",") : x;
|
|
4504
|
+
_ ? O = O.filter((f) => !N.includes(f[B])) : O = O.filter((f) => N.includes(f[B]));
|
|
4499
4505
|
} else {
|
|
4500
4506
|
s.value = a.value;
|
|
4501
4507
|
const A = await store.actions.getDictDataObj(s.value);
|
|
@@ -4509,32 +4515,32 @@ const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4509
4515
|
else if (l.value) {
|
|
4510
4516
|
const {
|
|
4511
4517
|
disabledValues: A,
|
|
4512
|
-
disabledType:
|
|
4518
|
+
disabledType: x = m.format.value,
|
|
4513
4519
|
reverse: B = !1
|
|
4514
4520
|
} = l.value, _ = typeof A == "string" ? A.split(",") : A;
|
|
4515
|
-
B ? O = O.map((
|
|
4516
|
-
const f = JSON.parse(JSON.stringify(
|
|
4517
|
-
return f[m.format.disabled] = !_.includes(f[
|
|
4518
|
-
}) : O = O.map((
|
|
4519
|
-
const f = JSON.parse(JSON.stringify(
|
|
4520
|
-
return f[m.format.disabled] = _.includes(f[
|
|
4521
|
+
B ? O = O.map((N) => {
|
|
4522
|
+
const f = JSON.parse(JSON.stringify(N));
|
|
4523
|
+
return f[m.format.disabled] = !_.includes(f[x]) || f[m.format.disabled], f;
|
|
4524
|
+
}) : O = O.map((N) => {
|
|
4525
|
+
const f = JSON.parse(JSON.stringify(N));
|
|
4526
|
+
return f[m.format.disabled] = _.includes(f[x]) || f[m.format.disabled], f;
|
|
4521
4527
|
});
|
|
4522
4528
|
}
|
|
4523
4529
|
v.list = O;
|
|
4524
4530
|
}, p = computed(() => store.state.isGettingDictTypes.includes(s.value)), d = computed(() => store.state.isGettingAllDictTypes), C = computed(() => {
|
|
4525
|
-
const O = store.state.dictConfig.treeSetting, A = store.state.dictConfig.format,
|
|
4531
|
+
const O = store.state.dictConfig.treeSetting, A = store.state.dictConfig.format, x = c.props ?? {};
|
|
4526
4532
|
return {
|
|
4527
|
-
disabled: (
|
|
4528
|
-
label: (
|
|
4529
|
-
children: (
|
|
4530
|
-
isLeaf: (
|
|
4533
|
+
disabled: (x == null ? void 0 : x.disabled) ?? A.disabled,
|
|
4534
|
+
label: (x == null ? void 0 : x.label) ?? O.labelField,
|
|
4535
|
+
children: (x == null ? void 0 : x.children) ?? O.childrenField,
|
|
4536
|
+
isLeaf: (x == null ? void 0 : x.leaf) ?? O.leafField
|
|
4531
4537
|
};
|
|
4532
4538
|
}), b = computed(() => {
|
|
4533
4539
|
if (v.list.length === 0)
|
|
4534
4540
|
return [];
|
|
4535
|
-
const O = JSON.parse(JSON.stringify(v.list)).map((
|
|
4536
|
-
id:
|
|
4537
|
-
...
|
|
4541
|
+
const O = JSON.parse(JSON.stringify(v.list)).map((x) => ({
|
|
4542
|
+
id: x[j.value.valueField],
|
|
4543
|
+
...x
|
|
4538
4544
|
}));
|
|
4539
4545
|
let A = ListToTree(O, j.value);
|
|
4540
4546
|
return n.value && F(A, +n.value), A;
|
|
@@ -4550,17 +4556,17 @@ const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4550
4556
|
);
|
|
4551
4557
|
const E = ref(null);
|
|
4552
4558
|
return r({ getElTreeRef: () => E.value }), (O, A) => {
|
|
4553
|
-
const
|
|
4554
|
-
return openBlock(), createBlock(
|
|
4559
|
+
const x = resolveComponent("el-tree");
|
|
4560
|
+
return openBlock(), createBlock(x, mergeProps({
|
|
4555
4561
|
ref_key: "ElTreeRef",
|
|
4556
4562
|
ref: E,
|
|
4557
4563
|
data: b.value,
|
|
4558
4564
|
props: C.value
|
|
4559
4565
|
}, O.$attrs), createSlots({ _: 2 }, [
|
|
4560
|
-
renderList(O.$slots, (B, _,
|
|
4566
|
+
renderList(O.$slots, (B, _, N) => ({
|
|
4561
4567
|
name: _,
|
|
4562
4568
|
fn: withCtx((f) => [
|
|
4563
|
-
renderSlot(O.$slots, _, mergeProps({ key:
|
|
4569
|
+
renderSlot(O.$slots, _, mergeProps({ key: N }, f))
|
|
4564
4570
|
])
|
|
4565
4571
|
}))
|
|
4566
4572
|
]), 1040, ["data", "props"]);
|
|
@@ -4608,17 +4614,17 @@ const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4608
4614
|
valueField: "value",
|
|
4609
4615
|
childrenField: "children",
|
|
4610
4616
|
leafField: s.treeSetting.leafField
|
|
4611
|
-
},
|
|
4612
|
-
return Object.assign(
|
|
4613
|
-
}), j = (E,
|
|
4617
|
+
}, I = JSON.parse(JSON.stringify(s.treeSetting));
|
|
4618
|
+
return Object.assign(I, E);
|
|
4619
|
+
}), j = (E, I) => {
|
|
4614
4620
|
for (let O = 0; O < E.length; O++) {
|
|
4615
4621
|
const A = E[O];
|
|
4616
|
-
if (A[v.value.levelField] ===
|
|
4622
|
+
if (A[v.value.levelField] === I) {
|
|
4617
4623
|
delete A[v.value.childrenField], A[v.value.leafField] = !0;
|
|
4618
4624
|
continue;
|
|
4619
4625
|
} else {
|
|
4620
4626
|
const B = A[v.value.childrenField];
|
|
4621
|
-
j(B,
|
|
4627
|
+
j(B, I);
|
|
4622
4628
|
}
|
|
4623
4629
|
}
|
|
4624
4630
|
}, F = async () => {
|
|
@@ -4627,36 +4633,36 @@ const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4627
4633
|
let E = [];
|
|
4628
4634
|
if (typeof n.value == "object") {
|
|
4629
4635
|
i.value = n.value.type;
|
|
4630
|
-
const
|
|
4631
|
-
E = [].concat(
|
|
4636
|
+
const I = await store.actions.getDictDataObj(i.value);
|
|
4637
|
+
E = [].concat(I[i.value]);
|
|
4632
4638
|
const {
|
|
4633
4639
|
filters: O,
|
|
4634
4640
|
filterType: A = s.format.value,
|
|
4635
|
-
reverse:
|
|
4641
|
+
reverse: x = !1
|
|
4636
4642
|
} = n.value, B = typeof O == "string" ? O.split(",") : O;
|
|
4637
|
-
|
|
4643
|
+
x ? E = E.filter((_) => !B.includes(_[A])) : E = E.filter((_) => B.includes(_[A]));
|
|
4638
4644
|
} else {
|
|
4639
4645
|
i.value = n.value;
|
|
4640
|
-
const
|
|
4641
|
-
E = [].concat(
|
|
4646
|
+
const I = await store.actions.getDictDataObj(i.value);
|
|
4647
|
+
E = [].concat(I[i.value]);
|
|
4642
4648
|
}
|
|
4643
4649
|
if (l.value && (E = l.value(E)), o.value)
|
|
4644
|
-
E = E.map((
|
|
4645
|
-
...
|
|
4646
|
-
[s.format.disabled]: o.value(
|
|
4650
|
+
E = E.map((I) => ({
|
|
4651
|
+
...I,
|
|
4652
|
+
[s.format.disabled]: o.value(I)
|
|
4647
4653
|
}));
|
|
4648
4654
|
else if (a.value) {
|
|
4649
4655
|
const {
|
|
4650
|
-
disabledValues:
|
|
4656
|
+
disabledValues: I,
|
|
4651
4657
|
disabledType: O = s.format.value,
|
|
4652
4658
|
reverse: A = !1
|
|
4653
|
-
} = a.value,
|
|
4659
|
+
} = a.value, x = typeof I == "string" ? I.split(",") : I;
|
|
4654
4660
|
A ? E = E.map((B) => {
|
|
4655
4661
|
const _ = JSON.parse(JSON.stringify(B));
|
|
4656
|
-
return _[s.format.disabled] = !
|
|
4662
|
+
return _[s.format.disabled] = !x.includes(_[O]) || _[s.format.disabled], _;
|
|
4657
4663
|
}) : E = E.map((B) => {
|
|
4658
4664
|
const _ = JSON.parse(JSON.stringify(B));
|
|
4659
|
-
return _[s.format.disabled] =
|
|
4665
|
+
return _[s.format.disabled] = x.includes(_[O]) || _[s.format.disabled], _;
|
|
4660
4666
|
});
|
|
4661
4667
|
}
|
|
4662
4668
|
m.list = E;
|
|
@@ -4667,30 +4673,30 @@ const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4667
4673
|
children: O[v.value.childrenField],
|
|
4668
4674
|
...O
|
|
4669
4675
|
}));
|
|
4670
|
-
let
|
|
4671
|
-
return t.value && j(
|
|
4676
|
+
let I = ListToTree(E, v.value);
|
|
4677
|
+
return t.value && j(I, +t.value), I;
|
|
4672
4678
|
});
|
|
4673
4679
|
watch(
|
|
4674
4680
|
[y, p],
|
|
4675
|
-
([E,
|
|
4676
|
-
!E && !
|
|
4681
|
+
([E, I]) => {
|
|
4682
|
+
!E && !I && F();
|
|
4677
4683
|
},
|
|
4678
4684
|
{
|
|
4679
4685
|
immediate: !0
|
|
4680
4686
|
}
|
|
4681
4687
|
);
|
|
4682
4688
|
const C = ref(null);
|
|
4683
|
-
return r({ getElTreeSelectRef: () => C.value }), (E,
|
|
4689
|
+
return r({ getElTreeSelectRef: () => C.value }), (E, I) => {
|
|
4684
4690
|
const O = resolveComponent("el-tree-select");
|
|
4685
4691
|
return openBlock(), createBlock(O, mergeProps({
|
|
4686
4692
|
ref_key: "ElTreeSelectRef",
|
|
4687
4693
|
ref: C,
|
|
4688
4694
|
data: d.value
|
|
4689
4695
|
}, E.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
4690
|
-
renderList(E.$slots, (A,
|
|
4691
|
-
name:
|
|
4696
|
+
renderList(E.$slots, (A, x, B) => ({
|
|
4697
|
+
name: x,
|
|
4692
4698
|
fn: withCtx((_) => [
|
|
4693
|
-
renderSlot(E.$slots,
|
|
4699
|
+
renderSlot(E.$slots, x, mergeProps({ key: B }, _))
|
|
4694
4700
|
])
|
|
4695
4701
|
}))
|
|
4696
4702
|
]), 1040, ["data"]);
|