vue3-element-dict 3.2.0 → 3.2.2
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 +8 -0
- package/lib/style.css +1 -1
- package/lib/vue3-element-dict.js +473 -475
- package/package.json +1 -1
package/lib/vue3-element-dict.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { reactive, defineComponent, toRefs, toRaw, useAttrs, computed, ref, watchEffect, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, createTextVNode, toDisplayString, renderList, renderSlot, watch, h, createElementBlock, Fragment, createCommentVNode, resolveDynamicComponent, onMounted, normalizeStyle, normalizeClass, normalizeProps, guardReactiveProps, inject, createVNode, resolveComponent, nextTick, provide, onUnmounted, withDirectives, vShow } from "vue";
|
|
2
|
-
import { ElButton, ElCascader, ElCheckTag, formItemContextKey, formContextKey, ElCheckboxGroup, ElCheckboxButton, ElCheckbox, ElTag, ElLink, ElText, ElDescriptions, ElDescriptionsItem, ElTableColumn, ElTable, ElForm, ElFormItem, ElInput, ElRadioGroup, ElRadioButton, ElRadio, ElSelect, ElOption, ElTabs, ElTabPane, ElTree, ElTreeSelect } from "element-plus";
|
|
2
|
+
import { ElButton, ElCascader, ElCheckTag, formItemContextKey, formContextKey, ElCheckboxGroup, ElCheckboxButton, ElCheckbox, ElTag, ElLink, ElText, ElDescriptions, ElDescriptionsItem, ElTableColumn, ElTable, ElForm, ElFormItem, ElIcon, ElInput, ElRadioGroup, ElRadioButton, ElRadio, ElSelect, ElOption, ElTabs, ElTabPane, ElTree, ElTreeSelect } from "element-plus";
|
|
3
|
+
import { ArrowDown, ArrowUp } from "@element-plus/icons-vue";
|
|
3
4
|
const formatDictData = (e, r, d, t) => {
|
|
4
5
|
const n = {};
|
|
5
6
|
for (let a in e)
|
|
@@ -234,12 +235,12 @@ const actions = {
|
|
|
234
235
|
I = "", mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!0);
|
|
235
236
|
else {
|
|
236
237
|
if (o) {
|
|
237
|
-
const A = Object.keys(y), S = o.split(","), D = Object.keys(T), j = A.filter((f) => !D.includes(f)),
|
|
238
|
-
let
|
|
239
|
-
|
|
238
|
+
const A = Object.keys(y), S = o.split(","), D = Object.keys(T), j = A.filter((f) => !D.includes(f)), V = S.filter((f) => D.includes(f) ? (console.warn(`注意:usuallyGetDictTypes配置与本地字典配置的字典类型${f}冲突`), !1) : !0);
|
|
239
|
+
let F = j.concat(V);
|
|
240
|
+
F = F.concat(v.split(",")), I = Array.from(new Set(F)).join(",");
|
|
240
241
|
} else {
|
|
241
242
|
const A = Object.keys(y), S = Object.keys(T);
|
|
242
|
-
let D = A.filter((
|
|
243
|
+
let D = A.filter((V) => !S.includes(V));
|
|
243
244
|
D = D.concat(v.split(",")), I = Array.from(new Set(D)).join(",");
|
|
244
245
|
}
|
|
245
246
|
mutations.ADD_IS_GETTING_DICT_TYPES(I);
|
|
@@ -251,8 +252,8 @@ const actions = {
|
|
|
251
252
|
return;
|
|
252
253
|
}
|
|
253
254
|
mutations.REMOVE_UNFIND_DICT_TYPES(v);
|
|
254
|
-
const D = b(A), j = Object.assign(JSON.parse(JSON.stringify(T)), S),
|
|
255
|
-
n.setItem(a, JSON.stringify(
|
|
255
|
+
const D = b(A), j = Object.assign(JSON.parse(JSON.stringify(T)), S), V = formatDictData(j, _, C, l == null ? void 0 : l.disabled);
|
|
256
|
+
n.setItem(a, JSON.stringify(V)), n.setItem(c, D), mutations.SET_DICT_CODES(V), r(state.dictCodes), state.isGettingAllDictTypes ? mutations.SETTING_ISGETTING_ALL_DICT_TYPES(!1) : mutations.REMOVE_IS_GETTING_DICT_TYPES(I);
|
|
256
257
|
});
|
|
257
258
|
} else {
|
|
258
259
|
const I = w(E, e);
|
|
@@ -610,10 +611,10 @@ const GetCodeByLabels = (e, r, d) => {
|
|
|
610
611
|
]),
|
|
611
612
|
_: 2
|
|
612
613
|
}, [
|
|
613
|
-
renderList(D.$slots, (
|
|
614
|
-
name:
|
|
614
|
+
renderList(D.$slots, (V, F, $) => ({
|
|
615
|
+
name: F,
|
|
615
616
|
fn: withCtx((f) => [
|
|
616
|
-
renderSlot(D.$slots,
|
|
617
|
+
renderSlot(D.$slots, F, mergeProps({ key: $ }, f))
|
|
617
618
|
])
|
|
618
619
|
}))
|
|
619
620
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -1025,58 +1026,58 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1025
1026
|
const t = d, n = e, { defaultVal: a, emptyText: u, dictType: o, disabledObj: i, filterDataFun: s, disabledDataFun: c, list: T, col: w, gap: b } = toRefs(n), p = toRaw(store.state.dictConfig), _ = useAttrs();
|
|
1026
1027
|
let C = ref("");
|
|
1027
1028
|
const l = computed(() => {
|
|
1028
|
-
const
|
|
1029
|
+
const F = {};
|
|
1029
1030
|
return Object.entries(_).forEach(([$, f]) => {
|
|
1030
1031
|
const m = ToKebabCase($);
|
|
1031
1032
|
if (m.startsWith("button-") || m.startsWith("on-button")) {
|
|
1032
1033
|
const k = ToCamelCase(m.replace("button-", ""));
|
|
1033
|
-
|
|
1034
|
+
F[k] = f;
|
|
1034
1035
|
}
|
|
1035
|
-
}),
|
|
1036
|
+
}), F;
|
|
1036
1037
|
}), y = computed(() => {
|
|
1037
|
-
const
|
|
1038
|
+
const F = Number(w.value), $ = 100 / F, f = Array.isArray(b.value) ? b.value : String(b.value).split(" "), m = f[0], B = (f[1] || m) * (F - 1) / F;
|
|
1038
1039
|
return `calc(${$}% - ${B}px) !important`;
|
|
1039
1040
|
}), v = computed(() => {
|
|
1040
|
-
const
|
|
1041
|
+
const F = Array.isArray(b.value) ? b.value : String(b.value).split(" "), $ = F[0], f = F[1] || $;
|
|
1041
1042
|
return `${$}px ${f}px`;
|
|
1042
1043
|
});
|
|
1043
|
-
function E(
|
|
1044
|
+
function E(F) {
|
|
1044
1045
|
return {
|
|
1045
1046
|
...l.value,
|
|
1046
|
-
...
|
|
1047
|
+
...F
|
|
1047
1048
|
};
|
|
1048
1049
|
}
|
|
1049
1050
|
const g = ref([]), x = async () => {
|
|
1050
1051
|
if (!o.value)
|
|
1051
1052
|
return;
|
|
1052
|
-
let
|
|
1053
|
+
let F = [];
|
|
1053
1054
|
if (typeof o.value == "object") {
|
|
1054
1055
|
C.value = o.value.type;
|
|
1055
1056
|
const $ = await store.actions.getDictDataObj(C.value);
|
|
1056
|
-
|
|
1057
|
+
F = [].concat($[C.value]);
|
|
1057
1058
|
const { filters: f, filterType: m = p.format.value, reverse: k = !1 } = o.value, B = typeof f == "string" ? f.split(",") : f;
|
|
1058
|
-
k ?
|
|
1059
|
+
k ? F = F.filter((O) => !B.includes(O[m])) : F = F.filter((O) => B.includes(O[m]));
|
|
1059
1060
|
} else {
|
|
1060
1061
|
C.value = o.value;
|
|
1061
1062
|
const $ = await store.actions.getDictDataObj(C.value);
|
|
1062
|
-
|
|
1063
|
+
F = [].concat($[C.value]);
|
|
1063
1064
|
}
|
|
1064
|
-
if (s.value && (
|
|
1065
|
-
|
|
1065
|
+
if (s.value && (F = s.value(F)), c.value)
|
|
1066
|
+
F = F.map(($) => ({
|
|
1066
1067
|
...$,
|
|
1067
1068
|
[p.format.disabled]: c.value($)
|
|
1068
1069
|
}));
|
|
1069
1070
|
else if (i.value) {
|
|
1070
1071
|
const { disabledValues: $, disabledType: f = p.format.value, reverse: m = !1 } = i.value, k = typeof $ == "string" ? $.split(",") : $;
|
|
1071
|
-
m ?
|
|
1072
|
-
const
|
|
1073
|
-
return
|
|
1074
|
-
}) :
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1072
|
+
m ? F = F.map((B) => {
|
|
1073
|
+
const O = JSON.parse(JSON.stringify(B));
|
|
1074
|
+
return O[p.format.disabled] = !k.includes(O[f]) || O[p.format.disabled], O;
|
|
1075
|
+
}) : F = F.map((B) => {
|
|
1076
|
+
const O = JSON.parse(JSON.stringify(B));
|
|
1077
|
+
return O[p.format.disabled] = k.includes(O[f]) || O[p.format.disabled], O;
|
|
1077
1078
|
});
|
|
1078
1079
|
}
|
|
1079
|
-
g.value =
|
|
1080
|
+
g.value = F.map(($) => ({
|
|
1080
1081
|
type: $[p.format.type],
|
|
1081
1082
|
label: $[p.format.label],
|
|
1082
1083
|
color: $[p.format.color],
|
|
@@ -1091,7 +1092,7 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1091
1092
|
x();
|
|
1092
1093
|
return;
|
|
1093
1094
|
}
|
|
1094
|
-
let
|
|
1095
|
+
let F = [];
|
|
1095
1096
|
for (let $ = 0; $ < T.value.length; $++) {
|
|
1096
1097
|
const f = T.value[$];
|
|
1097
1098
|
if (f.dictType) {
|
|
@@ -1100,9 +1101,9 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1100
1101
|
f.label || (m ? m[p.format.label] : (f.defaultVal || a.value) ?? (f.modelValue === 0 ? 0 : f.modelValue || f.emptyText || u.value))
|
|
1101
1102
|
), f.color = f.color || m[p.format.color] || "", f.icon = f.icon || m[p.format.icon] || "", f.disabled = f.disabled ?? (m[p.format.disabled] || !1);
|
|
1102
1103
|
}
|
|
1103
|
-
|
|
1104
|
+
F.push(f);
|
|
1104
1105
|
}
|
|
1105
|
-
g.value =
|
|
1106
|
+
g.value = F;
|
|
1106
1107
|
}
|
|
1107
1108
|
onMounted(() => {
|
|
1108
1109
|
I();
|
|
@@ -1114,15 +1115,15 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1114
1115
|
{ deep: !0 }
|
|
1115
1116
|
// 深层监听数组/对象变化
|
|
1116
1117
|
);
|
|
1117
|
-
const A = (
|
|
1118
|
-
|
|
1118
|
+
const A = (F) => {
|
|
1119
|
+
F.disabled || (F.actionType === "submit" ? t("submit", F) : F.actionType === "reset" ? t("reset", F) : F.actionType === "action" && t("action", F));
|
|
1119
1120
|
}, S = ref(null), D = () => S.value, j = ref([]);
|
|
1120
|
-
return r({ getElButtonsRef: D, getElButtonRefs: () => j.value }), (
|
|
1121
|
+
return r({ getElButtonsRef: D, getElButtonRefs: () => j.value }), (F, $) => (openBlock(), createElementBlock("div", {
|
|
1121
1122
|
ref_key: "ElButtonsRef",
|
|
1122
1123
|
ref: S,
|
|
1123
|
-
class: normalizeClass(["el-buttons-dict",
|
|
1124
|
-
id:
|
|
1125
|
-
style: normalizeStyle({ ...
|
|
1124
|
+
class: normalizeClass(["el-buttons-dict", F.$attrs.class]),
|
|
1125
|
+
id: F.$attrs.id,
|
|
1126
|
+
style: normalizeStyle({ ...F.$attrs.style, gap: v.value })
|
|
1126
1127
|
}, [
|
|
1127
1128
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (f, m) => (openBlock(), createBlock(unref(ElButton), mergeProps({
|
|
1128
1129
|
ref_for: !0,
|
|
@@ -1140,11 +1141,11 @@ const _hoisted_1$1 = ["innerHTML"], _sfc_main$m = /* @__PURE__ */ Object.assign(
|
|
|
1140
1141
|
}, [
|
|
1141
1142
|
renderList(f.slotList, (k, B) => ({
|
|
1142
1143
|
name: k.slotName,
|
|
1143
|
-
fn: withCtx((
|
|
1144
|
+
fn: withCtx((O) => [
|
|
1144
1145
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
1145
1146
|
key: B,
|
|
1146
1147
|
render: k.render,
|
|
1147
|
-
scope:
|
|
1148
|
+
scope: O
|
|
1148
1149
|
}, null, 8, ["render", "scope"]))
|
|
1149
1150
|
])
|
|
1150
1151
|
}))
|
|
@@ -1263,8 +1264,8 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1263
1264
|
c.value = u.value.type;
|
|
1264
1265
|
const S = await store.actions.getDictDataObj(c.value);
|
|
1265
1266
|
A = [].concat(S[c.value]);
|
|
1266
|
-
const { filters: D, filterType: j = T.format.value, reverse:
|
|
1267
|
-
|
|
1267
|
+
const { filters: D, filterType: j = T.format.value, reverse: V = !1 } = u.value, F = typeof D == "string" ? D.split(",") : D;
|
|
1268
|
+
V ? A = A.filter(($) => !F.includes($[j])) : A = A.filter(($) => F.includes($[j]));
|
|
1268
1269
|
} else {
|
|
1269
1270
|
c.value = u.value;
|
|
1270
1271
|
const S = await store.actions.getDictDataObj(c.value);
|
|
@@ -1276,13 +1277,13 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1276
1277
|
[T.format.disabled]: s.value(S)
|
|
1277
1278
|
}));
|
|
1278
1279
|
else if (o.value) {
|
|
1279
|
-
const { disabledValues: S, disabledType: D = T.treeSetting.valueField, reverse: j = !1 } = o.value,
|
|
1280
|
-
j ? A = A.map((
|
|
1281
|
-
const $ = JSON.parse(JSON.stringify(
|
|
1282
|
-
return $[T.format.disabled] = !
|
|
1283
|
-
}) : A = A.map((
|
|
1284
|
-
const $ = JSON.parse(JSON.stringify(
|
|
1285
|
-
return $[T.format.disabled] =
|
|
1280
|
+
const { disabledValues: S, disabledType: D = T.treeSetting.valueField, reverse: j = !1 } = o.value, V = typeof S == "string" ? S.split(",") : S;
|
|
1281
|
+
j ? A = A.map((F) => {
|
|
1282
|
+
const $ = JSON.parse(JSON.stringify(F));
|
|
1283
|
+
return $[T.format.disabled] = !V.includes($[D]) || $[T.format.disabled], $;
|
|
1284
|
+
}) : A = A.map((F) => {
|
|
1285
|
+
const $ = JSON.parse(JSON.stringify(F));
|
|
1286
|
+
return $[T.format.disabled] = V.includes($[D]) || $[T.format.disabled], $;
|
|
1286
1287
|
});
|
|
1287
1288
|
}
|
|
1288
1289
|
p.list = A;
|
|
@@ -1312,8 +1313,8 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1312
1313
|
delete j[v.value.childrenField], j[v.value.leafField] = !0;
|
|
1313
1314
|
continue;
|
|
1314
1315
|
} else {
|
|
1315
|
-
const
|
|
1316
|
-
E(
|
|
1316
|
+
const F = j[v.value.childrenField];
|
|
1317
|
+
E(F, S);
|
|
1317
1318
|
}
|
|
1318
1319
|
}
|
|
1319
1320
|
}, g = computed(() => {
|
|
@@ -1340,10 +1341,10 @@ const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1340
1341
|
props: y.value,
|
|
1341
1342
|
onChange: b
|
|
1342
1343
|
}, A.$attrs, { "popper-options": { modifiers: [{ name: "computeStyles", options: { adaptive: !1 } }] } }), createSlots({ _: 2 }, [
|
|
1343
|
-
renderList(A.$slots, (D, j,
|
|
1344
|
+
renderList(A.$slots, (D, j, V) => ({
|
|
1344
1345
|
name: j,
|
|
1345
|
-
fn: withCtx((
|
|
1346
|
-
renderSlot(A.$slots, j, mergeProps({ key:
|
|
1346
|
+
fn: withCtx((F) => [
|
|
1347
|
+
renderSlot(A.$slots, j, mergeProps({ key: V }, F))
|
|
1347
1348
|
])
|
|
1348
1349
|
}))
|
|
1349
1350
|
]), 1040, ["options", "props"]));
|
|
@@ -1488,26 +1489,26 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1488
1489
|
const t = e, { modelValue: n, options: a, fieldNames: u, dictType: o, disabledObj: i, keyValue: s, filterDataFun: c, disabledDataFun: T } = toRefs(t), w = ref([]), b = ref(""), p = toRaw(store.state.dictConfig), _ = d, C = (S, D) => {
|
|
1489
1490
|
_("change", S);
|
|
1490
1491
|
const j = [];
|
|
1491
|
-
for (let
|
|
1492
|
-
const
|
|
1493
|
-
if (n.value.includes(
|
|
1494
|
-
if (S && !n.value.includes(
|
|
1495
|
-
j.push(
|
|
1492
|
+
for (let V = 0; V < y.value.length; V++) {
|
|
1493
|
+
const F = y.value[V];
|
|
1494
|
+
if (n.value.includes(F[p.format.value]) && j.push(F), V === D)
|
|
1495
|
+
if (S && !n.value.includes(F[p.format.value]))
|
|
1496
|
+
j.push(F);
|
|
1496
1497
|
else {
|
|
1497
|
-
const $ = j.indexOf(
|
|
1498
|
+
const $ = j.indexOf(F);
|
|
1498
1499
|
j.splice($, 1);
|
|
1499
1500
|
}
|
|
1500
1501
|
}
|
|
1501
1502
|
if (_(
|
|
1502
1503
|
"update:modelValue",
|
|
1503
|
-
j.map((
|
|
1504
|
+
j.map((V) => V[p.format.value])
|
|
1504
1505
|
), s.value) {
|
|
1505
1506
|
_("dictChange", j);
|
|
1506
1507
|
return;
|
|
1507
1508
|
}
|
|
1508
1509
|
_(
|
|
1509
1510
|
"dictChange",
|
|
1510
|
-
j.map((
|
|
1511
|
+
j.map((V) => V[p.format.value])
|
|
1511
1512
|
);
|
|
1512
1513
|
}, l = reactive({
|
|
1513
1514
|
list: []
|
|
@@ -1521,9 +1522,9 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1521
1522
|
[() => y.value, () => t.modelValue],
|
|
1522
1523
|
([S, D]) => {
|
|
1523
1524
|
const j = [];
|
|
1524
|
-
for (let
|
|
1525
|
-
const
|
|
1526
|
-
D.includes(
|
|
1525
|
+
for (let V = 0; V < S.length; V++) {
|
|
1526
|
+
const F = S[V];
|
|
1527
|
+
D.includes(F[p.format.value]) ? j.push(!0) : j.push(!1);
|
|
1527
1528
|
}
|
|
1528
1529
|
w.value = j;
|
|
1529
1530
|
},
|
|
@@ -1541,8 +1542,8 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1541
1542
|
b.value = o.value.type;
|
|
1542
1543
|
const D = await store.actions.getDictDataObj(b.value);
|
|
1543
1544
|
S = [].concat(D[b.value]);
|
|
1544
|
-
const { filters: j, filterType:
|
|
1545
|
-
|
|
1545
|
+
const { filters: j, filterType: V = p.format.value, reverse: F = !1 } = o.value, $ = typeof j == "string" ? j.split(",") : j;
|
|
1546
|
+
F ? S = S.filter((f) => !$.includes(f[V])) : S = S.filter((f) => $.includes(f[V]));
|
|
1546
1547
|
} else {
|
|
1547
1548
|
b.value = o.value;
|
|
1548
1549
|
const D = await store.actions.getDictDataObj(b.value);
|
|
@@ -1554,13 +1555,13 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1554
1555
|
[p.format.disabled]: T.value(D)
|
|
1555
1556
|
}));
|
|
1556
1557
|
else if (i.value) {
|
|
1557
|
-
const { disabledValues: D, disabledType: j = p.format.value, reverse:
|
|
1558
|
-
|
|
1558
|
+
const { disabledValues: D, disabledType: j = p.format.value, reverse: V = !1 } = i.value, F = typeof D == "string" ? D.split(",") : D;
|
|
1559
|
+
V ? S = S.map(($) => {
|
|
1559
1560
|
const f = JSON.parse(JSON.stringify($));
|
|
1560
|
-
return f[p.format.disabled] = !
|
|
1561
|
+
return f[p.format.disabled] = !F.includes(f[j]) || f[p.format.disabled], f;
|
|
1561
1562
|
}) : S = S.map(($) => {
|
|
1562
1563
|
const f = JSON.parse(JSON.stringify($));
|
|
1563
|
-
return f[p.format.disabled] =
|
|
1564
|
+
return f[p.format.disabled] = F.includes(f[j]) || f[p.format.disabled], f;
|
|
1564
1565
|
});
|
|
1565
1566
|
}
|
|
1566
1567
|
l.list = S;
|
|
@@ -1568,14 +1569,14 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1568
1569
|
watch(
|
|
1569
1570
|
[E, g, x],
|
|
1570
1571
|
([S, D, j]) => {
|
|
1571
|
-
!S && !D && j && j.length === 0 && v(), j.length > 0 && (l.list = JSON.parse(JSON.stringify(j)), l.list.length > 0 && (Object.prototype.toString.call(l.list[0]) === "[object Object]" ? l.list = l.list.map((
|
|
1572
|
-
[p.format.value]:
|
|
1573
|
-
[p.format.label]:
|
|
1574
|
-
[p.format.disabled]: !!
|
|
1575
|
-
...
|
|
1576
|
-
})) : l.list = l.list.map((
|
|
1577
|
-
[p.format.value]:
|
|
1578
|
-
[p.format.label]:
|
|
1572
|
+
!S && !D && j && j.length === 0 && v(), j.length > 0 && (l.list = JSON.parse(JSON.stringify(j)), l.list.length > 0 && (Object.prototype.toString.call(l.list[0]) === "[object Object]" ? l.list = l.list.map((F) => ({
|
|
1573
|
+
[p.format.value]: F[u.value.value],
|
|
1574
|
+
[p.format.label]: F[u.value.label],
|
|
1575
|
+
[p.format.disabled]: !!F[u.value.disabled],
|
|
1576
|
+
...F
|
|
1577
|
+
})) : l.list = l.list.map((F) => ({
|
|
1578
|
+
[p.format.value]: F,
|
|
1579
|
+
[p.format.label]: F
|
|
1579
1580
|
}))));
|
|
1580
1581
|
},
|
|
1581
1582
|
{
|
|
@@ -1583,15 +1584,15 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1583
1584
|
}
|
|
1584
1585
|
);
|
|
1585
1586
|
const I = ref([]);
|
|
1586
|
-
return r({ getElCheckAbleTagRefs: () => I.value }), (S, D) => (openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (j,
|
|
1587
|
+
return r({ getElCheckAbleTagRefs: () => I.value }), (S, D) => (openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (j, V) => (openBlock(), createBlock(unref(ElCheckTag), mergeProps({
|
|
1587
1588
|
ref_for: !0,
|
|
1588
|
-
ref: (
|
|
1589
|
-
|
|
1589
|
+
ref: (F) => {
|
|
1590
|
+
F && (I.value[V] = F);
|
|
1590
1591
|
},
|
|
1591
|
-
checked: w.value[
|
|
1592
|
+
checked: w.value[V]
|
|
1592
1593
|
}, S.$attrs, {
|
|
1593
|
-
onChange: (
|
|
1594
|
-
key:
|
|
1594
|
+
onChange: (F) => C(F, V),
|
|
1595
|
+
key: V,
|
|
1595
1596
|
type: j[unref(p).format.type]
|
|
1596
1597
|
}), createSlots({
|
|
1597
1598
|
default: withCtx(() => [
|
|
@@ -1599,7 +1600,7 @@ const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1599
1600
|
]),
|
|
1600
1601
|
_: 2
|
|
1601
1602
|
}, [
|
|
1602
|
-
renderList(S.$slots, (
|
|
1603
|
+
renderList(S.$slots, (F, $, f) => ({
|
|
1603
1604
|
name: $,
|
|
1604
1605
|
fn: withCtx((m) => [
|
|
1605
1606
|
renderSlot(S.$slots, $, normalizeProps(guardReactiveProps(m)), void 0, !0)
|
|
@@ -1664,8 +1665,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1664
1665
|
return Object.entries(w).forEach(([m, k]) => {
|
|
1665
1666
|
const B = ToKebabCase(m);
|
|
1666
1667
|
if (!B.startsWith("checkbox-button-") && !B.startsWith("on-checkbox-button-")) {
|
|
1667
|
-
const
|
|
1668
|
-
f[
|
|
1668
|
+
const O = ToCamelCase(B);
|
|
1669
|
+
f[O] = k;
|
|
1669
1670
|
}
|
|
1670
1671
|
}), f;
|
|
1671
1672
|
}), p = computed(() => {
|
|
@@ -1673,8 +1674,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1673
1674
|
return Object.entries(w).forEach(([m, k]) => {
|
|
1674
1675
|
const B = ToKebabCase(m);
|
|
1675
1676
|
if (B.startsWith("checkbox-button-") || B.startsWith("on-checkbox-button-")) {
|
|
1676
|
-
const
|
|
1677
|
-
f[
|
|
1677
|
+
const O = ToCamelCase(B.replace("checkbox-button-", ""));
|
|
1678
|
+
f[O] = k;
|
|
1678
1679
|
}
|
|
1679
1680
|
}), f;
|
|
1680
1681
|
}), _ = ref(""), C = toRaw(store.state.dictConfig), l = d, y = (f) => {
|
|
@@ -1694,8 +1695,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1694
1695
|
_.value = o.value.type;
|
|
1695
1696
|
const m = await store.actions.getDictDataObj(_.value);
|
|
1696
1697
|
f = [].concat(m[_.value]);
|
|
1697
|
-
const { filters: k, filterType: B = C.format.value, reverse:
|
|
1698
|
-
|
|
1698
|
+
const { filters: k, filterType: B = C.format.value, reverse: O = !1 } = o.value, L = typeof k == "string" ? k.split(",") : k;
|
|
1699
|
+
O ? f = f.filter((R) => !L.includes(R[B])) : f = f.filter((R) => L.includes(R[B]));
|
|
1699
1700
|
} else {
|
|
1700
1701
|
_.value = o.value;
|
|
1701
1702
|
const m = await store.actions.getDictDataObj(_.value);
|
|
@@ -1707,13 +1708,13 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1707
1708
|
[C.format.disabled]: T.value(m)
|
|
1708
1709
|
}));
|
|
1709
1710
|
else if (i.value) {
|
|
1710
|
-
const { disabledValues: m, disabledType: k = C.format.value, reverse: B = !1 } = i.value,
|
|
1711
|
-
B ? f = f.map((
|
|
1712
|
-
const R = JSON.parse(JSON.stringify(
|
|
1713
|
-
return R[C.format.disabled] = !
|
|
1714
|
-
}) : f = f.map((
|
|
1715
|
-
const R = JSON.parse(JSON.stringify(
|
|
1716
|
-
return R[C.format.disabled] =
|
|
1711
|
+
const { disabledValues: m, disabledType: k = C.format.value, reverse: B = !1 } = i.value, O = typeof m == "string" ? m.split(",") : m;
|
|
1712
|
+
B ? f = f.map((L) => {
|
|
1713
|
+
const R = JSON.parse(JSON.stringify(L));
|
|
1714
|
+
return R[C.format.disabled] = !O.includes(R[k]) || R[C.format.disabled], R;
|
|
1715
|
+
}) : f = f.map((L) => {
|
|
1716
|
+
const R = JSON.parse(JSON.stringify(L));
|
|
1717
|
+
return R[C.format.disabled] = O.includes(R[k]) || R[C.format.disabled], R;
|
|
1717
1718
|
});
|
|
1718
1719
|
}
|
|
1719
1720
|
v.list = f;
|
|
@@ -1721,22 +1722,22 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1721
1722
|
watch(
|
|
1722
1723
|
[g, x, I],
|
|
1723
1724
|
([f, m, k]) => {
|
|
1724
|
-
!f && !m && k && k.length === 0 && E(), k.length > 0 && (v.list = JSON.parse(JSON.stringify(k)), v.list.length > 0 && (Object.prototype.toString.call(v.list[0]) === "[object Object]" ? v.list = v.list.map((
|
|
1725
|
-
[C.format.value]:
|
|
1726
|
-
[C.format.label]:
|
|
1727
|
-
[C.format.disabled]: !!
|
|
1728
|
-
...
|
|
1729
|
-
})) : v.list = v.list.map((
|
|
1730
|
-
[C.format.value]:
|
|
1731
|
-
[C.format.label]:
|
|
1725
|
+
!f && !m && k && k.length === 0 && E(), k.length > 0 && (v.list = JSON.parse(JSON.stringify(k)), v.list.length > 0 && (Object.prototype.toString.call(v.list[0]) === "[object Object]" ? v.list = v.list.map((O) => ({
|
|
1726
|
+
[C.format.value]: O[u.value.value],
|
|
1727
|
+
[C.format.label]: O[u.value.label],
|
|
1728
|
+
[C.format.disabled]: !!O[u.value.disabled],
|
|
1729
|
+
...O
|
|
1730
|
+
})) : v.list = v.list.map((O) => ({
|
|
1731
|
+
[C.format.value]: O,
|
|
1732
|
+
[C.format.label]: O
|
|
1732
1733
|
}))));
|
|
1733
1734
|
},
|
|
1734
1735
|
{
|
|
1735
1736
|
immediate: !0
|
|
1736
1737
|
}
|
|
1737
1738
|
);
|
|
1738
|
-
const j = ref(null),
|
|
1739
|
-
return r({ getElCheckboxGroupRef:
|
|
1739
|
+
const j = ref(null), V = () => j.value, F = ref([]);
|
|
1740
|
+
return r({ getElCheckboxGroupRef: V, getElCheckboxButtonRefs: () => F.value }), (f, m) => (openBlock(), createBlock(unref(ElCheckboxGroup), mergeProps({
|
|
1740
1741
|
ref_key: "ElCheckboxGroupRef",
|
|
1741
1742
|
ref: j,
|
|
1742
1743
|
disabled: D.value
|
|
@@ -1744,8 +1745,8 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1744
1745
|
default: withCtx(() => [
|
|
1745
1746
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(v.list, (k, B) => (openBlock(), createBlock(unref(ElCheckboxButton), mergeProps({
|
|
1746
1747
|
ref_for: !0,
|
|
1747
|
-
ref: (
|
|
1748
|
-
|
|
1748
|
+
ref: (O) => {
|
|
1749
|
+
O && (F.value[B] = O);
|
|
1749
1750
|
},
|
|
1750
1751
|
key: k[unref(C).format.value],
|
|
1751
1752
|
disabled: D.value || k[unref(C).format.disabled],
|
|
@@ -1759,10 +1760,10 @@ const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1759
1760
|
]),
|
|
1760
1761
|
_: 2
|
|
1761
1762
|
}, [
|
|
1762
|
-
renderList(f.$slots, (k, B,
|
|
1763
|
+
renderList(f.$slots, (k, B, O) => ({
|
|
1763
1764
|
name: B,
|
|
1764
|
-
fn: withCtx((
|
|
1765
|
-
renderSlot(f.$slots, B, mergeProps({ key:
|
|
1765
|
+
fn: withCtx((L) => [
|
|
1766
|
+
renderSlot(f.$slots, B, mergeProps({ key: O }, L))
|
|
1766
1767
|
])
|
|
1767
1768
|
}))
|
|
1768
1769
|
]), 1040, ["disabled"]));
|
|
@@ -1827,31 +1828,31 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1827
1828
|
setup(e, { expose: r, emit: d }) {
|
|
1828
1829
|
const t = e, { disabled: n, modelValue: a, addAllText: u, data: o, format: i, dictType: s, disabledObj: c, keyValue: T, filterDataFun: w, disabledDataFun: b } = toRefs(t), p = useAttrs(), _ = ref(!1), C = ref(!1), l = ref([]), y = computed(() => {
|
|
1829
1830
|
const P = {};
|
|
1830
|
-
return Object.entries(p).forEach(([K,
|
|
1831
|
+
return Object.entries(p).forEach(([K, G]) => {
|
|
1831
1832
|
const M = ToKebabCase(K);
|
|
1832
1833
|
if (!M.startsWith("checkbox-") && !M.startsWith("on-checkbox-")) {
|
|
1833
1834
|
const W = ToCamelCase(M);
|
|
1834
|
-
P[W] =
|
|
1835
|
+
P[W] = G;
|
|
1835
1836
|
}
|
|
1836
1837
|
}), P;
|
|
1837
1838
|
}), v = computed(() => {
|
|
1838
1839
|
const P = {};
|
|
1839
|
-
return Object.entries(p).forEach(([K,
|
|
1840
|
+
return Object.entries(p).forEach(([K, G]) => {
|
|
1840
1841
|
const M = ToKebabCase(K);
|
|
1841
1842
|
if (M.startsWith("checkbox-") || M.startsWith("on-checkbox-")) {
|
|
1842
1843
|
const W = ToCamelCase(M.replace("checkbox-", ""));
|
|
1843
|
-
P[W] =
|
|
1844
|
+
P[W] = G;
|
|
1844
1845
|
}
|
|
1845
1846
|
}), P;
|
|
1846
1847
|
}), E = ref(""), g = toRaw(store.state.dictConfig), x = d, I = computed(() => D.list.filter((P) => !P[g.format.disabled])), A = (P) => {
|
|
1847
|
-
const K = P.length,
|
|
1848
|
-
C.value = K ===
|
|
1848
|
+
const K = P.length, G = I.value.length;
|
|
1849
|
+
C.value = K === G, _.value = K > 0 && K < G;
|
|
1849
1850
|
}, S = (P) => {
|
|
1850
1851
|
if (A(P), !T.value) {
|
|
1851
1852
|
x("dictChange", P);
|
|
1852
1853
|
return;
|
|
1853
1854
|
}
|
|
1854
|
-
const K = D.list.filter((
|
|
1855
|
+
const K = D.list.filter((G) => P.includes(G[g.format.value]));
|
|
1855
1856
|
x("dictChange", K);
|
|
1856
1857
|
}, D = reactive({
|
|
1857
1858
|
list: []
|
|
@@ -1870,7 +1871,7 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1870
1871
|
E.value = s.value.type;
|
|
1871
1872
|
const K = await store.actions.getDictDataObj(E.value);
|
|
1872
1873
|
P = [].concat(K[E.value]);
|
|
1873
|
-
const { filters:
|
|
1874
|
+
const { filters: G, filterType: M = g.format.value, reverse: W = !1 } = s.value, z = typeof G == "string" ? G.split(",") : G;
|
|
1874
1875
|
W ? P = P.filter((N) => !z.includes(N[M])) : P = P.filter((N) => z.includes(N[M]));
|
|
1875
1876
|
} else {
|
|
1876
1877
|
E.value = s.value;
|
|
@@ -1883,17 +1884,17 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1883
1884
|
[g.format.disabled]: b.value(K)
|
|
1884
1885
|
}));
|
|
1885
1886
|
else if (c.value) {
|
|
1886
|
-
const { disabledValues: K, disabledType:
|
|
1887
|
+
const { disabledValues: K, disabledType: G = g.format.value, reverse: M = !1 } = c.value, W = typeof K == "string" ? K.split(",") : K;
|
|
1887
1888
|
M ? P = P.map((z) => {
|
|
1888
1889
|
const N = JSON.parse(JSON.stringify(z));
|
|
1889
|
-
return N[g.format.disabled] = !W.includes(N[
|
|
1890
|
+
return N[g.format.disabled] = !W.includes(N[G]) || N[g.format.disabled], N;
|
|
1890
1891
|
}) : P = P.map((z) => {
|
|
1891
1892
|
const N = JSON.parse(JSON.stringify(z));
|
|
1892
|
-
return N[g.format.disabled] = W.includes(N[
|
|
1893
|
+
return N[g.format.disabled] = W.includes(N[G]) || N[g.format.disabled], N;
|
|
1893
1894
|
});
|
|
1894
1895
|
}
|
|
1895
1896
|
D.list = P;
|
|
1896
|
-
},
|
|
1897
|
+
}, V = computed(() => store.state.isGettingDictTypes.includes(E.value)), F = computed(() => store.state.isGettingAllDictTypes), $ = computed(() => o.value), f = inject(formItemContextKey), m = inject(formContextKey), k = computed(() => n.value || p["checkbox-disabled"] === "" || p["checkbox-disabled"] || p.checkboxDisabled === "" || p.checkboxDisabled || p.CheckboxDisabled === "" || p.CheckboxDisabled || (f == null ? void 0 : f.disabled) || (m == null ? void 0 : m.disabled) || !1);
|
|
1897
1898
|
watch(
|
|
1898
1899
|
() => t.modelValue,
|
|
1899
1900
|
// 正确监听方式
|
|
@@ -1911,9 +1912,9 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1911
1912
|
x("update:modelValue", P), x("change", P);
|
|
1912
1913
|
}
|
|
1913
1914
|
), watch(
|
|
1914
|
-
[
|
|
1915
|
-
([P, K,
|
|
1916
|
-
!P && !K &&
|
|
1915
|
+
[V, F, $],
|
|
1916
|
+
([P, K, G]) => {
|
|
1917
|
+
!P && !K && G && G.length === 0 && j(), G.length > 0 && (D.list = JSON.parse(JSON.stringify(G)), D.list.length > 0 && (Object.prototype.toString.call(D.list[0]) === "[object Object]" ? D.list = D.list.map((W) => ({
|
|
1917
1918
|
[g.format.value]: W[i.value.value],
|
|
1918
1919
|
[g.format.label]: W[i.value.label],
|
|
1919
1920
|
[g.format.disabled]: !!W[i.value.disabled],
|
|
@@ -1929,19 +1930,19 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1929
1930
|
);
|
|
1930
1931
|
const B = (P) => {
|
|
1931
1932
|
if (_.value = !1, P) {
|
|
1932
|
-
const K = I.value.map((
|
|
1933
|
+
const K = I.value.map((G) => G[g.format.value]);
|
|
1933
1934
|
S(K);
|
|
1934
1935
|
} else
|
|
1935
1936
|
S([]);
|
|
1936
|
-
},
|
|
1937
|
-
return r({ getElCheckboxGroupRef:
|
|
1937
|
+
}, O = ref(null), L = () => O.value, R = ref([]);
|
|
1938
|
+
return r({ getElCheckboxGroupRef: L, getElCheckboxRefs: () => R.value }), (P, K) => (openBlock(), createElementBlock(Fragment, null, [
|
|
1938
1939
|
unref(u) && !k.value ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
1939
1940
|
key: 0,
|
|
1940
1941
|
class: "check-all",
|
|
1941
1942
|
disabled: k.value,
|
|
1942
1943
|
indeterminate: _.value,
|
|
1943
1944
|
modelValue: C.value,
|
|
1944
|
-
"onUpdate:modelValue": K[0] || (K[0] = (
|
|
1945
|
+
"onUpdate:modelValue": K[0] || (K[0] = (G) => C.value = G),
|
|
1945
1946
|
onChange: B
|
|
1946
1947
|
}, {
|
|
1947
1948
|
default: withCtx(() => [
|
|
@@ -1951,30 +1952,30 @@ const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
1951
1952
|
}, 8, ["disabled", "indeterminate", "modelValue"])) : createCommentVNode("", !0),
|
|
1952
1953
|
createVNode(unref(ElCheckboxGroup), mergeProps({
|
|
1953
1954
|
ref_key: "ElCheckboxGroupRef",
|
|
1954
|
-
ref:
|
|
1955
|
+
ref: O,
|
|
1955
1956
|
disabled: k.value,
|
|
1956
1957
|
modelValue: l.value,
|
|
1957
|
-
"onUpdate:modelValue": K[1] || (K[1] = (
|
|
1958
|
+
"onUpdate:modelValue": K[1] || (K[1] = (G) => l.value = G)
|
|
1958
1959
|
}, y.value, { onChange: S }), createSlots({
|
|
1959
1960
|
default: withCtx(() => [
|
|
1960
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(D.list, (
|
|
1961
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(D.list, (G, M) => (openBlock(), createBlock(unref(ElCheckbox), mergeProps({
|
|
1961
1962
|
ref_for: !0,
|
|
1962
1963
|
ref: (W) => {
|
|
1963
1964
|
W && (R.value[M] = W);
|
|
1964
1965
|
},
|
|
1965
|
-
key:
|
|
1966
|
-
label:
|
|
1967
|
-
disabled: k.value ||
|
|
1966
|
+
key: G[unref(g).format.value],
|
|
1967
|
+
label: G[unref(g).format.value],
|
|
1968
|
+
disabled: k.value || G[unref(g).format.disabled]
|
|
1968
1969
|
}, v.value), {
|
|
1969
1970
|
default: withCtx(() => [
|
|
1970
|
-
createTextVNode(toDisplayString(
|
|
1971
|
+
createTextVNode(toDisplayString(G[unref(g).format.label]), 1)
|
|
1971
1972
|
]),
|
|
1972
1973
|
_: 2
|
|
1973
1974
|
}, 1040, ["label", "disabled"]))), 128))
|
|
1974
1975
|
]),
|
|
1975
1976
|
_: 2
|
|
1976
1977
|
}, [
|
|
1977
|
-
renderList(P.$slots, (
|
|
1978
|
+
renderList(P.$slots, (G, M, W) => ({
|
|
1978
1979
|
name: M,
|
|
1979
1980
|
fn: withCtx((z) => [
|
|
1980
1981
|
renderSlot(P.$slots, M, normalizeProps(guardReactiveProps(z)), void 0, !0)
|
|
@@ -2815,10 +2816,10 @@ const Mask = (e, r) => {
|
|
|
2815
2816
|
]),
|
|
2816
2817
|
_: 2
|
|
2817
2818
|
}, [
|
|
2818
|
-
renderList(S.$slots, (j,
|
|
2819
|
-
name:
|
|
2819
|
+
renderList(S.$slots, (j, V, F) => ({
|
|
2820
|
+
name: V,
|
|
2820
2821
|
fn: withCtx(($) => [
|
|
2821
|
-
renderSlot(S.$slots,
|
|
2822
|
+
renderSlot(S.$slots, V, mergeProps({ key: F }, $))
|
|
2822
2823
|
])
|
|
2823
2824
|
}))
|
|
2824
2825
|
]), 1040, ["type", "color", "disabled"]));
|
|
@@ -3090,13 +3091,13 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3090
3091
|
}), b = ref([]), p = ref({});
|
|
3091
3092
|
let _ = JSON.parse(JSON.stringify(p));
|
|
3092
3093
|
const C = (f) => {
|
|
3093
|
-
var k, B,
|
|
3094
|
+
var k, B, O, L, R;
|
|
3094
3095
|
if ((k = n.dynamicComponentsConfig) != null && k.disabledNoPlaceholder && (f != null && f.disabled || (typeof t.disabled == "string" && t.disabled === "" || t.disabled) && (f == null ? void 0 : f.disabled) !== !1) || (B = n.dynamicComponentsConfig) != null && B.readonlyNoPlaceholder && (f != null && f.readonly || (typeof t.readonly == "string" && t.readonly === "" || t.readonly) && (f == null ? void 0 : f.readonly) !== !1))
|
|
3095
3096
|
return "";
|
|
3096
3097
|
let m = "请选择";
|
|
3097
|
-
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (m = "请输入"), (
|
|
3098
|
+
return f != null && f.compName && ToKebabCase(f == null ? void 0 : f.compName).includes("input") && (m = "请输入"), (O = n.dynamicComponentsConfig) != null && O.isShowLabelPlaceholder && (m = m + ((L = f.formItemProps) == null ? void 0 : L.label)), ((R = f.props) == null ? void 0 : R.placeholder) || m || "";
|
|
3098
3099
|
}, l = ref(!1), y = ref(""), v = () => {
|
|
3099
|
-
var k, B,
|
|
3100
|
+
var k, B, O, L, R, J, P, K, G, M, W;
|
|
3100
3101
|
y.value = "id" + GenerateUUID();
|
|
3101
3102
|
let f = [];
|
|
3102
3103
|
for (let z = 0; z < c.value.length; z++) {
|
|
@@ -3112,11 +3113,11 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3112
3113
|
//
|
|
3113
3114
|
// 重点:拷贝props为新对象(若存在),断开与原item.props的引用
|
|
3114
3115
|
props: N.props ? {
|
|
3115
|
-
...(
|
|
3116
|
+
...(O = n.dynamicComponentsConfig) == null ? void 0 : O.props,
|
|
3116
3117
|
...N.props,
|
|
3117
3118
|
placeholder: C(N)
|
|
3118
3119
|
} : {
|
|
3119
|
-
...(
|
|
3120
|
+
...(L = n.dynamicComponentsConfig) == null ? void 0 : L.props,
|
|
3120
3121
|
placeholder: C(N)
|
|
3121
3122
|
},
|
|
3122
3123
|
formItemProps: N.formItemProps ? {
|
|
@@ -3139,7 +3140,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3139
3140
|
props: N.props ? {
|
|
3140
3141
|
...N.props
|
|
3141
3142
|
} : {}
|
|
3142
|
-
}, (K = N.formItemProps) != null && K.rules || (
|
|
3143
|
+
}, (K = N.formItemProps) != null && K.rules || (G = i.value) != null && G[N.fieldName]) {
|
|
3143
3144
|
const Y = ((M = N.formItemProps) == null ? void 0 : M.rules) || ((W = i.value) == null ? void 0 : W[N.fieldName]) || [];
|
|
3144
3145
|
N.fieldName && (q.formItemProps.prop = q.formItemProps.prop || N.fieldName), q.formItemProps.required = Y.some((ne) => ne.required) || q.formItemProps.required || !1;
|
|
3145
3146
|
const re = [...Y];
|
|
@@ -3183,30 +3184,30 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3183
3184
|
}
|
|
3184
3185
|
}), p.value = JSON.parse(JSON.stringify(m));
|
|
3185
3186
|
}, E = computed(() => typeof t.isScrollToFormError == "boolean" ? t.isScrollToFormError : n.dynamicComponentsConfig.isScrollToFormError), g = async (f) => {
|
|
3186
|
-
const m = JSON.parse(JSON.stringify(p.value)), k = sortComponentsByIdDependencies(b.value), B = [],
|
|
3187
|
+
const m = JSON.parse(JSON.stringify(p.value)), k = sortComponentsByIdDependencies(b.value), B = [], O = (G) => typeof G == "string" ? G.split(",").filter(Boolean) : Array.isArray(G) ? G : [], L = async () => {
|
|
3187
3188
|
if (a.value)
|
|
3188
3189
|
return;
|
|
3189
|
-
const
|
|
3190
|
+
const G = 1e3, M = 50;
|
|
3190
3191
|
let W = 0;
|
|
3191
3192
|
return new Promise((z) => {
|
|
3192
3193
|
const N = () => {
|
|
3193
|
-
a.value || W >=
|
|
3194
|
+
a.value || W >= G ? z() : (W += M, setTimeout(N, M));
|
|
3194
3195
|
};
|
|
3195
3196
|
N();
|
|
3196
3197
|
});
|
|
3197
|
-
}, R = async (
|
|
3198
|
-
if (await
|
|
3198
|
+
}, R = async (G) => {
|
|
3199
|
+
if (await L(), !a.value)
|
|
3199
3200
|
return !1;
|
|
3200
3201
|
try {
|
|
3201
|
-
return await (a == null ? void 0 : a.value.validateField(
|
|
3202
|
+
return await (a == null ? void 0 : a.value.validateField(G));
|
|
3202
3203
|
} catch {
|
|
3203
3204
|
return !1;
|
|
3204
3205
|
}
|
|
3205
|
-
}, J = async (
|
|
3206
|
+
}, J = async (G) => {
|
|
3206
3207
|
var M;
|
|
3207
|
-
await
|
|
3208
|
-
for (let W = 0; W <
|
|
3209
|
-
const z =
|
|
3208
|
+
await L();
|
|
3209
|
+
for (let W = 0; W < G.length; W++) {
|
|
3210
|
+
const z = G[W], N = b.value.find((q) => {
|
|
3210
3211
|
var Y;
|
|
3211
3212
|
return ((Y = q == null ? void 0 : q.formItemProps) == null ? void 0 : Y.prop) === z;
|
|
3212
3213
|
});
|
|
@@ -3214,12 +3215,12 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3214
3215
|
}
|
|
3215
3216
|
}, P = {
|
|
3216
3217
|
// 处理"calculate"类型
|
|
3217
|
-
calculate: (
|
|
3218
|
+
calculate: (G) => G.showRules.some((M) => CheckConditionsByOperation(M, m)),
|
|
3218
3219
|
// 处理"compare"类型
|
|
3219
|
-
compare: (
|
|
3220
|
+
compare: (G) => G.showRules.some((M) => CheckConditions(M, m)),
|
|
3220
3221
|
// 处理"validate"类型
|
|
3221
|
-
validate: async (
|
|
3222
|
-
const M =
|
|
3222
|
+
validate: async (G) => {
|
|
3223
|
+
const M = O(G.showRules);
|
|
3223
3224
|
if (await R(M))
|
|
3224
3225
|
return !0;
|
|
3225
3226
|
{
|
|
@@ -3228,9 +3229,9 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3228
3229
|
}
|
|
3229
3230
|
},
|
|
3230
3231
|
// 处理嵌套类型(showRuleType为逻辑运算符,如"&&"、"||")
|
|
3231
|
-
default: async (
|
|
3232
|
+
default: async (G) => {
|
|
3232
3233
|
const M = [];
|
|
3233
|
-
for (const W of
|
|
3234
|
+
for (const W of G.showRules)
|
|
3234
3235
|
switch (W.type) {
|
|
3235
3236
|
case "calculate":
|
|
3236
3237
|
M.push(W.rules.some((z) => CheckConditionsByOperation(z, m)));
|
|
@@ -3239,7 +3240,7 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3239
3240
|
M.push(W.rules.some((z) => CheckConditions(z, m)));
|
|
3240
3241
|
break;
|
|
3241
3242
|
case "validate": {
|
|
3242
|
-
const z =
|
|
3243
|
+
const z = O(W.rules), N = await R(z);
|
|
3243
3244
|
if (!N) {
|
|
3244
3245
|
const q = z.filter((Y) => Y !== f);
|
|
3245
3246
|
await J(q);
|
|
@@ -3250,28 +3251,28 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3250
3251
|
default:
|
|
3251
3252
|
M.push(!1);
|
|
3252
3253
|
}
|
|
3253
|
-
return CalculateLogicalResult(M,
|
|
3254
|
+
return CalculateLogicalResult(M, G.showRuleType);
|
|
3254
3255
|
}
|
|
3255
3256
|
};
|
|
3256
|
-
for (const
|
|
3257
|
-
if (
|
|
3257
|
+
for (const G of k) {
|
|
3258
|
+
if (G.hidden)
|
|
3258
3259
|
continue;
|
|
3259
|
-
const M =
|
|
3260
|
+
const M = G.visible;
|
|
3260
3261
|
let W = M;
|
|
3261
|
-
|
|
3262
|
+
G.showRules && G.showRules.length > 0 && (W = await (P[G.showRuleType] || P.default)(G)), G.visible = W, G.fieldName && !M && W && B.push(G.fieldName), !W && G.fieldName && (m[G.fieldName] = Array.isArray(m[G.fieldName]) ? [] : "");
|
|
3262
3263
|
}
|
|
3263
|
-
const K = B.filter((
|
|
3264
|
+
const K = B.filter((G) => {
|
|
3264
3265
|
var q, Y;
|
|
3265
|
-
const M = k.find((re) => re.fieldName ===
|
|
3266
|
+
const M = k.find((re) => re.fieldName === G);
|
|
3266
3267
|
if (!(((Y = (q = M == null ? void 0 : M.formItemProps) == null ? void 0 : q.rules) == null ? void 0 : Y.length) > 0))
|
|
3267
3268
|
return !1;
|
|
3268
|
-
const z = p.value[
|
|
3269
|
+
const z = p.value[G];
|
|
3269
3270
|
return typeof z == "string" ? !!z.trim() : typeof z == "object" && z !== null && Object.keys(z).length > 0;
|
|
3270
3271
|
});
|
|
3271
3272
|
if (K.length > 0) {
|
|
3272
|
-
await
|
|
3273
|
-
const
|
|
3274
|
-
l.value = !0, T("update:modelValue",
|
|
3273
|
+
await L();
|
|
3274
|
+
const G = x();
|
|
3275
|
+
l.value = !0, T("update:modelValue", G), setTimeout(() => {
|
|
3275
3276
|
var M;
|
|
3276
3277
|
(M = a.value) == null || M.validateField(K);
|
|
3277
3278
|
}, 0);
|
|
@@ -3291,9 +3292,9 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3291
3292
|
oldVal: m,
|
|
3292
3293
|
newVal: f
|
|
3293
3294
|
}), B;
|
|
3294
|
-
const
|
|
3295
|
-
for (const
|
|
3296
|
-
const R = k ? `${k}.${
|
|
3295
|
+
const O = /* @__PURE__ */ new Set([...Object.keys(f), ...Object.keys(m)]);
|
|
3296
|
+
for (const L of O) {
|
|
3297
|
+
const R = k ? `${k}.${L}` : L, J = f[L], P = m[L];
|
|
3297
3298
|
typeof J == "object" && J !== null && !Array.isArray(J) ? B.push(...I(J, P, R)) : J !== P && B.push({
|
|
3298
3299
|
key: R,
|
|
3299
3300
|
oldVal: P,
|
|
@@ -3322,11 +3323,11 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3322
3323
|
if (A)
|
|
3323
3324
|
g();
|
|
3324
3325
|
else {
|
|
3325
|
-
const
|
|
3326
|
+
const L = (B = I(m, _).find((R) => {
|
|
3326
3327
|
if (JSON.stringify(R.newVal) !== JSON.stringify(R.oldVal))
|
|
3327
3328
|
return !0;
|
|
3328
3329
|
})) == null ? void 0 : B.key;
|
|
3329
|
-
g(
|
|
3330
|
+
g(L);
|
|
3330
3331
|
}
|
|
3331
3332
|
_ = m;
|
|
3332
3333
|
const k = x();
|
|
@@ -3349,12 +3350,12 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3349
3350
|
);
|
|
3350
3351
|
const S = async (f, m) => {
|
|
3351
3352
|
const k = x();
|
|
3352
|
-
f && f.validate((B,
|
|
3353
|
+
f && f.validate((B, O) => {
|
|
3353
3354
|
if (B)
|
|
3354
3355
|
T("pass", k, m);
|
|
3355
|
-
else if (T("fail",
|
|
3356
|
-
const
|
|
3357
|
-
f.scrollToField(
|
|
3356
|
+
else if (T("fail", O, k, m), E.value) {
|
|
3357
|
+
const L = Object.keys(O)[0];
|
|
3358
|
+
f.scrollToField(L);
|
|
3358
3359
|
}
|
|
3359
3360
|
});
|
|
3360
3361
|
}, D = async () => {
|
|
@@ -3364,8 +3365,8 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3364
3365
|
}, j = (f) => {
|
|
3365
3366
|
const m = x();
|
|
3366
3367
|
T("action", f, m);
|
|
3367
|
-
},
|
|
3368
|
-
return r({ getFormData: x, resetFormData: v, getComponentRef: (f) => f ?
|
|
3368
|
+
}, V = ref({});
|
|
3369
|
+
return r({ getFormData: x, resetFormData: v, getComponentRef: (f) => f ? V.value[f] : V.value, getDynamicComponentsRef: () => a.value }), (f, m) => {
|
|
3369
3370
|
const k = resolveComponent("el-form-item"), B = resolveComponent("el-form");
|
|
3370
3371
|
return openBlock(), createBlock(B, mergeProps({
|
|
3371
3372
|
model: p.value,
|
|
@@ -3374,33 +3375,33 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3374
3375
|
ref: a
|
|
3375
3376
|
}, f.$attrs, { colon: w.value }), {
|
|
3376
3377
|
default: withCtx(() => [
|
|
3377
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (
|
|
3378
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (O, L) => {
|
|
3378
3379
|
var R;
|
|
3379
3380
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3380
|
-
|
|
3381
|
-
|
|
3381
|
+
O.visible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3382
|
+
O.isFormData ? (openBlock(), createBlock(k, mergeProps({ key: 0 }, O.formItemProps, { class: "comp-item form" }), {
|
|
3382
3383
|
default: withCtx(() => {
|
|
3383
3384
|
var J;
|
|
3384
3385
|
return [
|
|
3385
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
3386
|
+
(openBlock(), createBlock(resolveDynamicComponent(O.compName), mergeProps({
|
|
3386
3387
|
ref_for: !0,
|
|
3387
3388
|
ref: (P) => {
|
|
3388
|
-
P &&
|
|
3389
|
+
P && O.fieldName && (V.value[O.fieldName] = P);
|
|
3389
3390
|
},
|
|
3390
|
-
key:
|
|
3391
|
-
},
|
|
3392
|
-
modelValue: p.value[
|
|
3391
|
+
key: L
|
|
3392
|
+
}, O.props, {
|
|
3393
|
+
modelValue: p.value[O.fieldName],
|
|
3393
3394
|
"onUpdate:modelValue": (P) => {
|
|
3394
|
-
p.value[
|
|
3395
|
+
p.value[O.fieldName] = P;
|
|
3395
3396
|
}
|
|
3396
3397
|
}), createSlots({ _: 2 }, [
|
|
3397
|
-
renderList((J =
|
|
3398
|
+
renderList((J = O == null ? void 0 : O.props) == null ? void 0 : J.slotList, (P, K) => ({
|
|
3398
3399
|
name: P.slotName,
|
|
3399
|
-
fn: withCtx((
|
|
3400
|
+
fn: withCtx((G) => [
|
|
3400
3401
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
3401
3402
|
key: K,
|
|
3402
3403
|
render: P.render,
|
|
3403
|
-
scope:
|
|
3404
|
+
scope: G,
|
|
3404
3405
|
formData: p.value
|
|
3405
3406
|
}, null, 8, ["render", "scope", "formData"]))
|
|
3406
3407
|
])
|
|
@@ -3409,15 +3410,15 @@ const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3409
3410
|
];
|
|
3410
3411
|
}),
|
|
3411
3412
|
_: 2
|
|
3412
|
-
}, 1040)) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
3413
|
+
}, 1040)) : (openBlock(), createBlock(resolveDynamicComponent(O.compName), mergeProps({
|
|
3413
3414
|
class: "comp-item",
|
|
3414
|
-
key:
|
|
3415
|
-
},
|
|
3416
|
-
onSubmit: (J) => S(a.value,
|
|
3415
|
+
key: L
|
|
3416
|
+
}, O.props, {
|
|
3417
|
+
onSubmit: (J) => S(a.value, O),
|
|
3417
3418
|
onReset: D,
|
|
3418
|
-
onAction: (J) => j(
|
|
3419
|
+
onAction: (J) => j(O)
|
|
3419
3420
|
}), createSlots({ _: 2 }, [
|
|
3420
|
-
renderList((R =
|
|
3421
|
+
renderList((R = O == null ? void 0 : O.props) == null ? void 0 : R.slotList, (J, P) => ({
|
|
3421
3422
|
name: J.slotName,
|
|
3422
3423
|
fn: withCtx((K) => [
|
|
3423
3424
|
(openBlock(), createBlock(_sfc_main$m, {
|
|
@@ -3674,9 +3675,9 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3674
3675
|
});
|
|
3675
3676
|
const g = reactive({}), x = (D) => {
|
|
3676
3677
|
const j = {};
|
|
3677
|
-
for (let
|
|
3678
|
-
const
|
|
3679
|
-
j[
|
|
3678
|
+
for (let V = 0; V < D.length; V++) {
|
|
3679
|
+
const F = D[V];
|
|
3680
|
+
j[F.fieldName] = F.modelValue || "";
|
|
3680
3681
|
}
|
|
3681
3682
|
Object.assign(g, j);
|
|
3682
3683
|
};
|
|
@@ -3690,9 +3691,9 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3690
3691
|
}
|
|
3691
3692
|
);
|
|
3692
3693
|
const I = (D) => {
|
|
3693
|
-
var j,
|
|
3694
|
+
var j, V;
|
|
3694
3695
|
if ((j = D == null ? void 0 : D.props) != null && j.placeholder)
|
|
3695
|
-
return (
|
|
3696
|
+
return (V = D == null ? void 0 : D.props) == null ? void 0 : V.placeholder;
|
|
3696
3697
|
if (t.value)
|
|
3697
3698
|
return D.compName.toLocaleLowerCase().includes("input") ? n.value ? "请输入" + D.label : "请输入" : n.value ? "请选择" + D.label : "请选择";
|
|
3698
3699
|
}, A = async () => {
|
|
@@ -3702,138 +3703,135 @@ const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
3702
3703
|
D ? b("pass", g) : b("fail", j, g);
|
|
3703
3704
|
});
|
|
3704
3705
|
};
|
|
3705
|
-
return (D, j) => {
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
(
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
default: withCtx(() => [
|
|
3765
|
-
createTextVNode("重 置")
|
|
3766
|
-
]),
|
|
3767
|
-
_: 1
|
|
3768
|
-
}, 512), [
|
|
3769
|
-
[vShow, unref(T)]
|
|
3706
|
+
return (D, j) => (openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
3707
|
+
ref_key: "searchFormRef",
|
|
3708
|
+
ref: y,
|
|
3709
|
+
style: { minWidth: e.minWidth + "px" },
|
|
3710
|
+
model: g,
|
|
3711
|
+
class: "dict-search-box dict-clearfix"
|
|
3712
|
+
}, D.$attrs), {
|
|
3713
|
+
default: withCtx(() => [
|
|
3714
|
+
renderSlot(D.$slots, "prepend", {
|
|
3715
|
+
searchForm: g,
|
|
3716
|
+
fold: p.value,
|
|
3717
|
+
itemsPerRow: C.value
|
|
3718
|
+
}, void 0, !0),
|
|
3719
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (V, F) => (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
3720
|
+
key: F,
|
|
3721
|
+
class: l(F),
|
|
3722
|
+
label: V.label,
|
|
3723
|
+
prop: V.fieldName
|
|
3724
|
+
}, V.formItemProps), {
|
|
3725
|
+
default: withCtx(() => {
|
|
3726
|
+
var $, f;
|
|
3727
|
+
return [
|
|
3728
|
+
(openBlock(), createBlock(resolveDynamicComponent(V.compName), mergeProps({
|
|
3729
|
+
modelValue: g[V.fieldName],
|
|
3730
|
+
"onUpdate:modelValue": (m) => g[V.fieldName] = m,
|
|
3731
|
+
clearable: (($ = V == null ? void 0 : V.props) == null ? void 0 : $.clearable) || !0,
|
|
3732
|
+
placeholder: I(V)
|
|
3733
|
+
}, V.props), createSlots({ _: 2 }, [
|
|
3734
|
+
renderList((f = V == null ? void 0 : V.props) == null ? void 0 : f.slotList, (m, k) => ({
|
|
3735
|
+
name: m.slotName,
|
|
3736
|
+
fn: withCtx((B) => [
|
|
3737
|
+
(openBlock(), createBlock(_sfc_main$m, {
|
|
3738
|
+
key: k,
|
|
3739
|
+
render: m.render,
|
|
3740
|
+
scope: B,
|
|
3741
|
+
formData: g
|
|
3742
|
+
}, null, 8, ["render", "scope", "formData"]))
|
|
3743
|
+
])
|
|
3744
|
+
}))
|
|
3745
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "clearable", "placeholder"]))
|
|
3746
|
+
];
|
|
3747
|
+
}),
|
|
3748
|
+
_: 2
|
|
3749
|
+
}, 1040, ["class", "label", "prop"]))), 128)),
|
|
3750
|
+
createVNode(unref(ElFormItem), {
|
|
3751
|
+
class: normalizeClass(l(0) + " fr")
|
|
3752
|
+
}, {
|
|
3753
|
+
default: withCtx(() => [
|
|
3754
|
+
renderSlot(D.$slots, "button-prefix", {
|
|
3755
|
+
searchForm: g,
|
|
3756
|
+
fold: p.value,
|
|
3757
|
+
itemsPerRow: C.value
|
|
3758
|
+
}, void 0, !0),
|
|
3759
|
+
withDirectives(createVNode(unref(ElButton), {
|
|
3760
|
+
plain: "",
|
|
3761
|
+
onClick: A
|
|
3762
|
+
}, {
|
|
3763
|
+
default: withCtx(() => [
|
|
3764
|
+
createTextVNode("重 置")
|
|
3770
3765
|
]),
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3766
|
+
_: 1
|
|
3767
|
+
}, 512), [
|
|
3768
|
+
[vShow, unref(T)]
|
|
3769
|
+
]),
|
|
3770
|
+
withDirectives(createVNode(unref(ElButton), {
|
|
3771
|
+
type: "primary",
|
|
3772
|
+
onClick: S
|
|
3773
|
+
}, {
|
|
3774
|
+
default: withCtx(() => [
|
|
3775
|
+
createTextVNode("查 询")
|
|
3781
3776
|
]),
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
itemsPerRow: C.value
|
|
3786
|
-
}, void 0, !0),
|
|
3787
|
-
unref(c) && p.value && unref(a).length > C.value - 1 ? (openBlock(), createBlock(unref(ElLink), {
|
|
3788
|
-
key: 0,
|
|
3789
|
-
class: "no-underline",
|
|
3790
|
-
underline: !1,
|
|
3791
|
-
type: "primary",
|
|
3792
|
-
onClick: j[0] || (j[0] = (f) => p.value = !p.value)
|
|
3793
|
-
}, {
|
|
3794
|
-
default: withCtx(() => [
|
|
3795
|
-
createTextVNode("展开"),
|
|
3796
|
-
createVNode(O, null, {
|
|
3797
|
-
default: withCtx(() => [
|
|
3798
|
-
createVNode(G)
|
|
3799
|
-
]),
|
|
3800
|
-
_: 1
|
|
3801
|
-
})
|
|
3802
|
-
]),
|
|
3803
|
-
_: 1
|
|
3804
|
-
})) : createCommentVNode("", !0),
|
|
3805
|
-
unref(c) && !p.value && unref(a).length > C.value - 1 ? (openBlock(), createBlock(unref(ElLink), {
|
|
3806
|
-
key: 1,
|
|
3807
|
-
class: "no-underline",
|
|
3808
|
-
underline: !1,
|
|
3809
|
-
type: "primary",
|
|
3810
|
-
onClick: j[1] || (j[1] = (f) => p.value = !p.value)
|
|
3811
|
-
}, {
|
|
3812
|
-
default: withCtx(() => [
|
|
3813
|
-
createTextVNode("收起"),
|
|
3814
|
-
createVNode(O, null, {
|
|
3815
|
-
default: withCtx(() => [
|
|
3816
|
-
createVNode($)
|
|
3817
|
-
]),
|
|
3818
|
-
_: 1
|
|
3819
|
-
})
|
|
3820
|
-
]),
|
|
3821
|
-
_: 1
|
|
3822
|
-
})) : createCommentVNode("", !0)
|
|
3777
|
+
_: 1
|
|
3778
|
+
}, 512), [
|
|
3779
|
+
[vShow, unref(w)]
|
|
3823
3780
|
]),
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3781
|
+
renderSlot(D.$slots, "button-suffix", {
|
|
3782
|
+
searchForm: g,
|
|
3783
|
+
fold: p.value,
|
|
3784
|
+
itemsPerRow: C.value
|
|
3785
|
+
}, void 0, !0),
|
|
3786
|
+
unref(c) && p.value && unref(a).length > C.value - 1 ? (openBlock(), createBlock(unref(ElLink), {
|
|
3787
|
+
key: 0,
|
|
3788
|
+
class: "no-underline",
|
|
3789
|
+
underline: "never",
|
|
3790
|
+
type: "primary",
|
|
3791
|
+
onClick: j[0] || (j[0] = (V) => p.value = !p.value)
|
|
3792
|
+
}, {
|
|
3793
|
+
default: withCtx(() => [
|
|
3794
|
+
createTextVNode("展开"),
|
|
3795
|
+
createVNode(unref(ElIcon), null, {
|
|
3796
|
+
default: withCtx(() => [
|
|
3797
|
+
createVNode(unref(ArrowDown))
|
|
3798
|
+
]),
|
|
3799
|
+
_: 1
|
|
3800
|
+
})
|
|
3801
|
+
]),
|
|
3802
|
+
_: 1
|
|
3803
|
+
})) : createCommentVNode("", !0),
|
|
3804
|
+
unref(c) && !p.value && unref(a).length > C.value - 1 ? (openBlock(), createBlock(unref(ElLink), {
|
|
3805
|
+
key: 1,
|
|
3806
|
+
class: "no-underline",
|
|
3807
|
+
underline: "never",
|
|
3808
|
+
type: "primary",
|
|
3809
|
+
onClick: j[1] || (j[1] = (V) => p.value = !p.value)
|
|
3810
|
+
}, {
|
|
3811
|
+
default: withCtx(() => [
|
|
3812
|
+
createTextVNode("收起"),
|
|
3813
|
+
createVNode(unref(ElIcon), null, {
|
|
3814
|
+
default: withCtx(() => [
|
|
3815
|
+
createVNode(unref(ArrowUp))
|
|
3816
|
+
]),
|
|
3817
|
+
_: 1
|
|
3818
|
+
})
|
|
3819
|
+
]),
|
|
3820
|
+
_: 1
|
|
3821
|
+
})) : createCommentVNode("", !0)
|
|
3822
|
+
]),
|
|
3823
|
+
_: 3
|
|
3824
|
+
}, 8, ["class"]),
|
|
3825
|
+
renderSlot(D.$slots, "append", {
|
|
3826
|
+
searchForm: g,
|
|
3827
|
+
fold: p.value,
|
|
3828
|
+
itemsPerRow: C.value
|
|
3829
|
+
}, void 0, !0)
|
|
3830
|
+
]),
|
|
3831
|
+
_: 3
|
|
3832
|
+
}, 16, ["style", "model"]));
|
|
3835
3833
|
}
|
|
3836
|
-
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3834
|
+
}), dictComponent$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2d9bd2d5"]]);
|
|
3837
3835
|
dictComponent$1.install = function(e) {
|
|
3838
3836
|
e.component(dictComponent$1.name, dictComponent$1);
|
|
3839
3837
|
};
|
|
@@ -3995,19 +3993,19 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
3995
3993
|
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: T, disabledDataFun: w } = toRefs(t), b = useAttrs(), p = computed(() => {
|
|
3996
3994
|
const m = {};
|
|
3997
3995
|
return Object.entries(b).forEach(([k, B]) => {
|
|
3998
|
-
const
|
|
3999
|
-
if (!
|
|
4000
|
-
const
|
|
4001
|
-
m[
|
|
3996
|
+
const O = ToKebabCase(k);
|
|
3997
|
+
if (!O.startsWith("radio-button-") && !O.startsWith("on-radio-button-")) {
|
|
3998
|
+
const L = ToCamelCase(O);
|
|
3999
|
+
m[L] = B;
|
|
4002
4000
|
}
|
|
4003
4001
|
}), m;
|
|
4004
4002
|
}), _ = computed(() => {
|
|
4005
4003
|
const m = {};
|
|
4006
4004
|
return Object.entries(b).forEach(([k, B]) => {
|
|
4007
|
-
const
|
|
4008
|
-
if (
|
|
4009
|
-
const
|
|
4010
|
-
m[
|
|
4005
|
+
const O = ToKebabCase(k);
|
|
4006
|
+
if (O.startsWith("radio-button-") || O.startsWith("on-radio-button-")) {
|
|
4007
|
+
const L = ToCamelCase(O.replace("radio-button-", ""));
|
|
4008
|
+
m[L] = B;
|
|
4011
4009
|
}
|
|
4012
4010
|
}), m;
|
|
4013
4011
|
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (m) => {
|
|
@@ -4027,8 +4025,8 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4027
4025
|
C.value = i.value.type;
|
|
4028
4026
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4029
4027
|
m = [].concat(k[C.value]);
|
|
4030
|
-
const { filters: B, filterType:
|
|
4031
|
-
|
|
4028
|
+
const { filters: B, filterType: O = l.format.value, reverse: L = !1 } = i.value, R = typeof B == "string" ? B.split(",") : B;
|
|
4029
|
+
L ? m = m.filter((J) => !R.includes(J[O])) : m = m.filter((J) => R.includes(J[O]));
|
|
4032
4030
|
} else {
|
|
4033
4031
|
C.value = i.value;
|
|
4034
4032
|
const k = await store.actions.getDictDataObj(C.value);
|
|
@@ -4040,13 +4038,13 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4040
4038
|
[l.format.disabled]: w.value(k)
|
|
4041
4039
|
}));
|
|
4042
4040
|
else if (s.value) {
|
|
4043
|
-
const { disabledValues: k, disabledType: B = l.format.value, reverse:
|
|
4044
|
-
|
|
4041
|
+
const { disabledValues: k, disabledType: B = l.format.value, reverse: O = !1 } = s.value, L = typeof k == "string" ? k.split(",") : k;
|
|
4042
|
+
O ? m = m.map((R) => {
|
|
4045
4043
|
const J = JSON.parse(JSON.stringify(R));
|
|
4046
|
-
return J[l.format.disabled] = !
|
|
4044
|
+
return J[l.format.disabled] = !L.includes(J[B]) || J[l.format.disabled], J;
|
|
4047
4045
|
}) : m = m.map((R) => {
|
|
4048
4046
|
const J = JSON.parse(JSON.stringify(R));
|
|
4049
|
-
return J[l.format.disabled] =
|
|
4047
|
+
return J[l.format.disabled] = L.includes(J[B]) || J[l.format.disabled], J;
|
|
4050
4048
|
});
|
|
4051
4049
|
}
|
|
4052
4050
|
a.value && m.unshift({
|
|
@@ -4057,14 +4055,14 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4057
4055
|
watch(
|
|
4058
4056
|
[x, I, A],
|
|
4059
4057
|
([m, k, B]) => {
|
|
4060
|
-
!m && !k && B && B.length === 0 && g(), B.length > 0 && (E.list = JSON.parse(JSON.stringify(B)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((
|
|
4061
|
-
[l.format.value]:
|
|
4062
|
-
[l.format.label]:
|
|
4063
|
-
[l.format.disabled]: !!
|
|
4064
|
-
...
|
|
4065
|
-
})) : E.list = E.list.map((
|
|
4066
|
-
[l.format.value]:
|
|
4067
|
-
[l.format.label]:
|
|
4058
|
+
!m && !k && B && B.length === 0 && g(), B.length > 0 && (E.list = JSON.parse(JSON.stringify(B)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((L) => ({
|
|
4059
|
+
[l.format.value]: L[o.value.value],
|
|
4060
|
+
[l.format.label]: L[o.value.label],
|
|
4061
|
+
[l.format.disabled]: !!L[o.value.disabled],
|
|
4062
|
+
...L
|
|
4063
|
+
})) : E.list = E.list.map((L) => ({
|
|
4064
|
+
[l.format.value]: L,
|
|
4065
|
+
[l.format.label]: L
|
|
4068
4066
|
})), a.value && E.list.unshift({
|
|
4069
4067
|
[l.format.value]: "",
|
|
4070
4068
|
[l.format.label]: a.value
|
|
@@ -4074,17 +4072,17 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4074
4072
|
immediate: !0
|
|
4075
4073
|
}
|
|
4076
4074
|
);
|
|
4077
|
-
const
|
|
4078
|
-
return r({ getElRadioGroupRef: () => $.value, getElRadioButtonRefs:
|
|
4075
|
+
const V = ref([]), F = () => V.value, $ = ref(null);
|
|
4076
|
+
return r({ getElRadioGroupRef: () => $.value, getElRadioButtonRefs: F }), (m, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4079
4077
|
ref_key: "ElRadioGroupRef",
|
|
4080
4078
|
ref: $,
|
|
4081
4079
|
disabled: j.value
|
|
4082
4080
|
}, p.value, { onChange: v }), createSlots({
|
|
4083
4081
|
default: withCtx(() => [
|
|
4084
|
-
m.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (B,
|
|
4082
|
+
m.$attrs.options ? createCommentVNode("", !0) : (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(E.list, (B, O) => (openBlock(), createBlock(unref(ElRadioButton), mergeProps({
|
|
4085
4083
|
ref_for: !0,
|
|
4086
|
-
ref: (
|
|
4087
|
-
|
|
4084
|
+
ref: (L) => {
|
|
4085
|
+
L && (V.value[O] = L);
|
|
4088
4086
|
},
|
|
4089
4087
|
key: B[unref(l).format.value],
|
|
4090
4088
|
disabled: j.value || B[unref(l).format.disabled],
|
|
@@ -4098,10 +4096,10 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4098
4096
|
]),
|
|
4099
4097
|
_: 2
|
|
4100
4098
|
}, [
|
|
4101
|
-
renderList(m.$slots, (B,
|
|
4102
|
-
name:
|
|
4099
|
+
renderList(m.$slots, (B, O, L) => ({
|
|
4100
|
+
name: O,
|
|
4103
4101
|
fn: withCtx((R) => [
|
|
4104
|
-
renderSlot(m.$slots,
|
|
4102
|
+
renderSlot(m.$slots, O, normalizeProps(guardReactiveProps(R)))
|
|
4105
4103
|
])
|
|
4106
4104
|
}))
|
|
4107
4105
|
]), 1040, ["disabled"]));
|
|
@@ -4168,19 +4166,19 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4168
4166
|
const t = e, { disabled: n, addAllText: a, data: u, format: o, dictType: i, disabledObj: s, keyValue: c, filterDataFun: T, disabledDataFun: w } = toRefs(t), b = useAttrs(), p = computed(() => {
|
|
4169
4167
|
const m = {};
|
|
4170
4168
|
return Object.entries(b).forEach(([k, B]) => {
|
|
4171
|
-
const
|
|
4172
|
-
if (!
|
|
4173
|
-
const
|
|
4174
|
-
m[
|
|
4169
|
+
const O = ToKebabCase(k);
|
|
4170
|
+
if (!O.startsWith("radio-") && !O.startsWith("on-radio-")) {
|
|
4171
|
+
const L = ToCamelCase(O);
|
|
4172
|
+
m[L] = B;
|
|
4175
4173
|
}
|
|
4176
4174
|
}), m;
|
|
4177
4175
|
}), _ = computed(() => {
|
|
4178
4176
|
const m = {};
|
|
4179
4177
|
return Object.entries(b).forEach(([k, B]) => {
|
|
4180
|
-
const
|
|
4181
|
-
if (
|
|
4182
|
-
const
|
|
4183
|
-
m[
|
|
4178
|
+
const O = ToKebabCase(k);
|
|
4179
|
+
if (O.startsWith("radio-") || O.startsWith("on-radio-")) {
|
|
4180
|
+
const L = ToCamelCase(O.replace("radio-", ""));
|
|
4181
|
+
m[L] = B;
|
|
4184
4182
|
}
|
|
4185
4183
|
}), m;
|
|
4186
4184
|
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (m) => {
|
|
@@ -4200,8 +4198,8 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4200
4198
|
C.value = i.value.type;
|
|
4201
4199
|
const k = await store.actions.getDictDataObj(C.value);
|
|
4202
4200
|
m = [].concat(k[C.value]);
|
|
4203
|
-
const { filters: B, filterType:
|
|
4204
|
-
|
|
4201
|
+
const { filters: B, filterType: O = l.format.value, reverse: L = !1 } = i.value, R = typeof B == "string" ? B.split(",") : B;
|
|
4202
|
+
L ? m = m.filter((J) => !R.includes(J[O])) : m = m.filter((J) => R.includes(J[O]));
|
|
4205
4203
|
} else {
|
|
4206
4204
|
C.value = i.value;
|
|
4207
4205
|
const k = await store.actions.getDictDataObj(C.value);
|
|
@@ -4213,13 +4211,13 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4213
4211
|
[l.format.disabled]: w.value(k)
|
|
4214
4212
|
}));
|
|
4215
4213
|
else if (s.value) {
|
|
4216
|
-
const { disabledValues: k, disabledType: B = l.format.value, reverse:
|
|
4217
|
-
|
|
4214
|
+
const { disabledValues: k, disabledType: B = l.format.value, reverse: O = !1 } = s.value, L = typeof k == "string" ? k.split(",") : k;
|
|
4215
|
+
O ? m = m.map((R) => {
|
|
4218
4216
|
const J = JSON.parse(JSON.stringify(R));
|
|
4219
|
-
return J[l.format.disabled] = !
|
|
4217
|
+
return J[l.format.disabled] = !L.includes(J[B]) || J[l.format.disabled], J;
|
|
4220
4218
|
}) : m = m.map((R) => {
|
|
4221
4219
|
const J = JSON.parse(JSON.stringify(R));
|
|
4222
|
-
return J[l.format.disabled] =
|
|
4220
|
+
return J[l.format.disabled] = L.includes(J[B]) || J[l.format.disabled], J;
|
|
4223
4221
|
});
|
|
4224
4222
|
}
|
|
4225
4223
|
a.value && m.unshift({
|
|
@@ -4230,14 +4228,14 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4230
4228
|
watch(
|
|
4231
4229
|
[x, I, A],
|
|
4232
4230
|
([m, k, B]) => {
|
|
4233
|
-
!m && !k && B && B.length === 0 && g(), B.length > 0 && (E.list = JSON.parse(JSON.stringify(B)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((
|
|
4234
|
-
[l.format.value]:
|
|
4235
|
-
[l.format.label]:
|
|
4236
|
-
[l.format.disabled]: !!
|
|
4237
|
-
...
|
|
4238
|
-
})) : E.list = E.list.map((
|
|
4239
|
-
[l.format.value]:
|
|
4240
|
-
[l.format.label]:
|
|
4231
|
+
!m && !k && B && B.length === 0 && g(), B.length > 0 && (E.list = JSON.parse(JSON.stringify(B)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((L) => ({
|
|
4232
|
+
[l.format.value]: L[o.value.value],
|
|
4233
|
+
[l.format.label]: L[o.value.label],
|
|
4234
|
+
[l.format.disabled]: !!L[o.value.disabled],
|
|
4235
|
+
...L
|
|
4236
|
+
})) : E.list = E.list.map((L) => ({
|
|
4237
|
+
[l.format.value]: L,
|
|
4238
|
+
[l.format.label]: L
|
|
4241
4239
|
})), a.value && E.list.unshift({
|
|
4242
4240
|
[l.format.value]: "",
|
|
4243
4241
|
[l.format.label]: a.value
|
|
@@ -4247,17 +4245,17 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4247
4245
|
immediate: !0
|
|
4248
4246
|
}
|
|
4249
4247
|
);
|
|
4250
|
-
const
|
|
4251
|
-
return r({ geElRadioGroupRef: () => $.value, getElRadioRefs:
|
|
4248
|
+
const V = ref([]), F = () => V.value, $ = ref(null);
|
|
4249
|
+
return r({ geElRadioGroupRef: () => $.value, getElRadioRefs: F }), (m, k) => (openBlock(), createBlock(unref(ElRadioGroup), mergeProps({
|
|
4252
4250
|
ref_key: "ElRadioGroupRef",
|
|
4253
4251
|
ref: $,
|
|
4254
4252
|
disabled: j.value
|
|
4255
4253
|
}, p.value, { onChange: v }), createSlots({
|
|
4256
4254
|
default: withCtx(() => [
|
|
4257
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (B,
|
|
4255
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (B, O) => (openBlock(), createBlock(unref(ElRadio), mergeProps({
|
|
4258
4256
|
ref_for: !0,
|
|
4259
|
-
ref: (
|
|
4260
|
-
|
|
4257
|
+
ref: (L) => {
|
|
4258
|
+
L && (V.value[O] = L);
|
|
4261
4259
|
},
|
|
4262
4260
|
key: B[unref(l).format.value],
|
|
4263
4261
|
disabled: j.value || B[unref(l).format.disabled],
|
|
@@ -4271,10 +4269,10 @@ const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4271
4269
|
]),
|
|
4272
4270
|
_: 2
|
|
4273
4271
|
}, [
|
|
4274
|
-
renderList(m.$slots, (B,
|
|
4275
|
-
name:
|
|
4272
|
+
renderList(m.$slots, (B, O, L) => ({
|
|
4273
|
+
name: O,
|
|
4276
4274
|
fn: withCtx((R) => [
|
|
4277
|
-
renderSlot(m.$slots,
|
|
4275
|
+
renderSlot(m.$slots, O, normalizeProps(guardReactiveProps(R)))
|
|
4278
4276
|
])
|
|
4279
4277
|
}))
|
|
4280
4278
|
]), 1040, ["disabled"]));
|
|
@@ -4344,8 +4342,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4344
4342
|
return Object.entries(p).forEach(([m, k]) => {
|
|
4345
4343
|
const B = ToKebabCase(m);
|
|
4346
4344
|
if (!B.startsWith("option-") && !B.startsWith("on-option-")) {
|
|
4347
|
-
const
|
|
4348
|
-
f[
|
|
4345
|
+
const O = ToCamelCase(B);
|
|
4346
|
+
f[O] = k;
|
|
4349
4347
|
}
|
|
4350
4348
|
}), f;
|
|
4351
4349
|
}), C = computed(() => {
|
|
@@ -4353,8 +4351,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4353
4351
|
return Object.entries(p).forEach(([m, k]) => {
|
|
4354
4352
|
const B = ToKebabCase(m);
|
|
4355
4353
|
if (B.startsWith("option-") || B.startsWith("on-option-")) {
|
|
4356
|
-
const
|
|
4357
|
-
f[
|
|
4354
|
+
const O = ToCamelCase(B.replace("option-", ""));
|
|
4355
|
+
f[O] = k;
|
|
4358
4356
|
}
|
|
4359
4357
|
}), f;
|
|
4360
4358
|
}), l = ref(""), y = toRaw(store.state.dictConfig), v = d, E = (f) => {
|
|
@@ -4379,8 +4377,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4379
4377
|
l.value = s.value.type;
|
|
4380
4378
|
const m = await store.actions.getDictDataObj(l.value);
|
|
4381
4379
|
f = [].concat(m[l.value]);
|
|
4382
|
-
const { filters: k, filterType: B = y.format.value, reverse:
|
|
4383
|
-
|
|
4380
|
+
const { filters: k, filterType: B = y.format.value, reverse: O = !1 } = s.value, L = typeof k == "string" ? k.split(",") : k;
|
|
4381
|
+
O ? f = f.filter((R) => !L.includes(R[B])) : f = f.filter((R) => L.includes(R[B]));
|
|
4384
4382
|
} else {
|
|
4385
4383
|
l.value = s.value;
|
|
4386
4384
|
const m = await store.actions.getDictDataObj(l.value);
|
|
@@ -4392,13 +4390,13 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4392
4390
|
[y.format.disabled]: b.value(m)
|
|
4393
4391
|
}));
|
|
4394
4392
|
else if (c.value) {
|
|
4395
|
-
const { disabledValues: m, disabledType: k = y.format.value, reverse: B = !1 } = c.value,
|
|
4396
|
-
B ? f = f.map((
|
|
4397
|
-
const R = JSON.parse(JSON.stringify(
|
|
4398
|
-
return R[y.format.disabled] = !
|
|
4399
|
-
}) : f = f.map((
|
|
4400
|
-
const R = JSON.parse(JSON.stringify(
|
|
4401
|
-
return R[y.format.disabled] =
|
|
4393
|
+
const { disabledValues: m, disabledType: k = y.format.value, reverse: B = !1 } = c.value, O = typeof m == "string" ? m.split(",") : m;
|
|
4394
|
+
B ? f = f.map((L) => {
|
|
4395
|
+
const R = JSON.parse(JSON.stringify(L));
|
|
4396
|
+
return R[y.format.disabled] = !O.includes(R[k]) || R[y.format.disabled], R;
|
|
4397
|
+
}) : f = f.map((L) => {
|
|
4398
|
+
const R = JSON.parse(JSON.stringify(L));
|
|
4399
|
+
return R[y.format.disabled] = O.includes(R[k]) || R[y.format.disabled], R;
|
|
4402
4400
|
});
|
|
4403
4401
|
}
|
|
4404
4402
|
n.value && !p.multiple && p.multiple !== "" && f.unshift({
|
|
@@ -4411,14 +4409,14 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4411
4409
|
([f, m, k]) => {
|
|
4412
4410
|
if (!f && !m && k && k.length === 0 && x(), k.length > 0) {
|
|
4413
4411
|
let B = JSON.parse(JSON.stringify(k));
|
|
4414
|
-
B.length > 0 && (Object.prototype.toString.call(B[0]) === "[object Object]" ? B = B.map((
|
|
4415
|
-
[y.format.value]:
|
|
4416
|
-
[y.format.label]:
|
|
4417
|
-
[y.format.disabled]: !!
|
|
4418
|
-
...
|
|
4419
|
-
})) : B = B.map((
|
|
4420
|
-
[y.format.value]:
|
|
4421
|
-
[y.format.label]:
|
|
4412
|
+
B.length > 0 && (Object.prototype.toString.call(B[0]) === "[object Object]" ? B = B.map((L) => ({
|
|
4413
|
+
[y.format.value]: L[i.value.value],
|
|
4414
|
+
[y.format.label]: L[i.value.label],
|
|
4415
|
+
[y.format.disabled]: !!L[i.value.disabled],
|
|
4416
|
+
...L
|
|
4417
|
+
})) : B = B.map((L) => ({
|
|
4418
|
+
[y.format.value]: L,
|
|
4419
|
+
[y.format.label]: L
|
|
4422
4420
|
})), n.value && !p.multiple && p.multiple !== "" && B.unshift({
|
|
4423
4421
|
[y.format.value]: "",
|
|
4424
4422
|
[y.format.label]: n.value
|
|
@@ -4429,8 +4427,8 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4429
4427
|
immediate: !0
|
|
4430
4428
|
}
|
|
4431
4429
|
);
|
|
4432
|
-
const D = () => n.value && !p.multiple && p.multiple !== "" ? "" : u.value, j = ref(null),
|
|
4433
|
-
return r({ getElSelectRef:
|
|
4430
|
+
const D = () => n.value && !p.multiple && p.multiple !== "" ? "" : u.value, j = ref(null), V = () => j.value, F = ref([]);
|
|
4431
|
+
return r({ getElSelectRef: V, getElOptionRefs: () => F.value }), (f, m) => (openBlock(), createBlock(unref(ElSelect), mergeProps({
|
|
4434
4432
|
ref_key: "ElSelectRef",
|
|
4435
4433
|
ref: j
|
|
4436
4434
|
}, _.value, {
|
|
@@ -4445,7 +4443,7 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4445
4443
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(g.list, (k) => (openBlock(), createBlock(unref(ElOption), mergeProps({
|
|
4446
4444
|
ref_for: !0,
|
|
4447
4445
|
ref: (B) => {
|
|
4448
|
-
B && (
|
|
4446
|
+
B && (F.value[f.index] = B);
|
|
4449
4447
|
},
|
|
4450
4448
|
key: k[unref(y).format.value],
|
|
4451
4449
|
disabled: k[unref(y).format.disabled],
|
|
@@ -4455,10 +4453,10 @@ const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4455
4453
|
]),
|
|
4456
4454
|
_: 2
|
|
4457
4455
|
}, [
|
|
4458
|
-
renderList(f.$slots, (k, B,
|
|
4456
|
+
renderList(f.$slots, (k, B, O) => ({
|
|
4459
4457
|
name: B,
|
|
4460
|
-
fn: withCtx((
|
|
4461
|
-
renderSlot(f.$slots, B, mergeProps({ key:
|
|
4458
|
+
fn: withCtx((L) => [
|
|
4459
|
+
renderSlot(f.$slots, B, mergeProps({ key: O }, L))
|
|
4462
4460
|
])
|
|
4463
4461
|
}))
|
|
4464
4462
|
]), 1040, ["empty-values", "value-key", "class"]));
|
|
@@ -4591,46 +4589,46 @@ const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4591
4589
|
ref_key: "ElTableColumnRef",
|
|
4592
4590
|
ref: A
|
|
4593
4591
|
}, D.$attrs), createSlots({
|
|
4594
|
-
default: withCtx((
|
|
4595
|
-
var
|
|
4592
|
+
default: withCtx((V) => {
|
|
4593
|
+
var F, $, f, m, k, B, O, L, R, J, P, K;
|
|
4596
4594
|
return [
|
|
4597
4595
|
unref(a) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4598
|
-
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(I(
|
|
4596
|
+
e.dictTypeNode === "button" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(I(V.row[(F = unref(d)) == null ? void 0 : F.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$n, {
|
|
4599
4597
|
key: M,
|
|
4600
|
-
modelValue:
|
|
4598
|
+
modelValue: G || "",
|
|
4601
4599
|
dictType: unref(a)
|
|
4602
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(I(
|
|
4600
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "link" ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(I(V.row[($ = unref(d)) == null ? void 0 : $.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$e, {
|
|
4603
4601
|
key: M,
|
|
4604
|
-
modelValue:
|
|
4602
|
+
modelValue: G || "",
|
|
4605
4603
|
dictType: unref(a)
|
|
4606
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(I(
|
|
4604
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "tag" ? (openBlock(!0), createElementBlock(Fragment, { key: 2 }, renderList(I(V.row[(f = unref(d)) == null ? void 0 : f.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$f, {
|
|
4607
4605
|
key: M,
|
|
4608
|
-
modelValue:
|
|
4606
|
+
modelValue: G || "",
|
|
4609
4607
|
dictType: unref(a)
|
|
4610
|
-
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(I(
|
|
4608
|
+
}, null, 8, ["modelValue", "dictType"]))), 128)) : e.dictTypeNode === "text" ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(I(V.row[(m = unref(d)) == null ? void 0 : m.prop], v.value), (G, M) => (openBlock(), createBlock(_sfc_main$d, {
|
|
4611
4609
|
key: M,
|
|
4612
|
-
modelValue:
|
|
4610
|
+
modelValue: G || "",
|
|
4613
4611
|
dictType: unref(a)
|
|
4614
4612
|
}, null, 8, ["modelValue", "dictType"]))), 128)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4615
|
-
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(
|
|
4613
|
+
createTextVNode(toDisplayString(unref(GetLabelByCodesFilter)(V.row[(k = unref(d)) == null ? void 0 : k.prop], unref(a), v.value)), 1)
|
|
4616
4614
|
], 64))
|
|
4617
|
-
], 64)) : unref(u) &&
|
|
4618
|
-
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(
|
|
4619
|
-
], 64)) : unref(o) &&
|
|
4620
|
-
createTextVNode(toDisplayString(unref(FormatDate)(
|
|
4621
|
-
], 64)) : g.value &&
|
|
4622
|
-
createTextVNode(toDisplayString(unref(Desensitization)(
|
|
4615
|
+
], 64)) : unref(u) && V.row[(B = unref(d)) == null ? void 0 : B.prop] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4616
|
+
createTextVNode(toDisplayString(unref(GetTreeLabelByCodesFilter)(V.row[(O = unref(d)) == null ? void 0 : O.prop], unref(u), E.value)), 1)
|
|
4617
|
+
], 64)) : unref(o) && V.row[(L = unref(d)) == null ? void 0 : L.prop] ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4618
|
+
createTextVNode(toDisplayString(unref(FormatDate)(V.row[(R = unref(d)) == null ? void 0 : R.prop], unref(o), unref(i))), 1)
|
|
4619
|
+
], 64)) : g.value && V.row[(J = unref(d)) == null ? void 0 : J.prop] ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4620
|
+
createTextVNode(toDisplayString(unref(Desensitization)(V.row[(P = unref(d)) == null ? void 0 : P.prop], x.value)), 1)
|
|
4623
4621
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
4624
|
-
createTextVNode(toDisplayString(
|
|
4622
|
+
createTextVNode(toDisplayString(V.row[(K = unref(d)) == null ? void 0 : K.prop] || unref(i)), 1)
|
|
4625
4623
|
], 64))
|
|
4626
4624
|
];
|
|
4627
4625
|
}),
|
|
4628
4626
|
_: 2
|
|
4629
4627
|
}, [
|
|
4630
|
-
renderList(D.$slots, (
|
|
4631
|
-
name:
|
|
4628
|
+
renderList(D.$slots, (V, F, $) => ({
|
|
4629
|
+
name: F,
|
|
4632
4630
|
fn: withCtx((f) => [
|
|
4633
|
-
renderSlot(D.$slots,
|
|
4631
|
+
renderSlot(D.$slots, F, mergeProps({ key: $ }, f), void 0, !0)
|
|
4634
4632
|
])
|
|
4635
4633
|
}))
|
|
4636
4634
|
]), 1040));
|
|
@@ -4694,24 +4692,24 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4694
4692
|
emits: ["dictChange"],
|
|
4695
4693
|
setup(e, { expose: r, emit: d }) {
|
|
4696
4694
|
const t = useAttrs(), n = e, { addAllText: a, data: u, format: o, badgeObj: i, dictType: s, disabledObj: c, keyValue: T, filterDataFun: w, disabledDataFun: b } = toRefs(n), p = computed(() => {
|
|
4697
|
-
const
|
|
4695
|
+
const F = {};
|
|
4698
4696
|
return Object.entries(t).forEach(([$, f]) => {
|
|
4699
4697
|
const m = ToKebabCase($);
|
|
4700
4698
|
if (!m.startsWith("tab-pane-") && !m.startsWith("on-tab-pane-")) {
|
|
4701
4699
|
const k = ToCamelCase(m);
|
|
4702
|
-
|
|
4700
|
+
F[k] = f;
|
|
4703
4701
|
}
|
|
4704
|
-
}),
|
|
4702
|
+
}), F;
|
|
4705
4703
|
}), _ = computed(() => {
|
|
4706
|
-
const
|
|
4704
|
+
const F = {};
|
|
4707
4705
|
return Object.entries(t).forEach(([$, f]) => {
|
|
4708
4706
|
const m = ToKebabCase($);
|
|
4709
4707
|
if (m.startsWith("tab-pane-") || m.startsWith("on-tab-pane-")) {
|
|
4710
4708
|
const k = ToCamelCase(m.replace("tab-pane-", ""));
|
|
4711
|
-
|
|
4709
|
+
F[k] = f;
|
|
4712
4710
|
}
|
|
4713
|
-
}),
|
|
4714
|
-
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (
|
|
4711
|
+
}), F;
|
|
4712
|
+
}), C = ref(""), l = toRaw(store.state.dictConfig), y = d, v = (F) => {
|
|
4715
4713
|
window.setTimeout(() => {
|
|
4716
4714
|
if (!T.value) {
|
|
4717
4715
|
y("dictChange", t.modelValue);
|
|
@@ -4725,42 +4723,42 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4725
4723
|
}), g = async () => {
|
|
4726
4724
|
if (!s.value || u.value && u.value.length > 0)
|
|
4727
4725
|
return;
|
|
4728
|
-
let
|
|
4726
|
+
let F = [];
|
|
4729
4727
|
if (typeof s.value == "object") {
|
|
4730
4728
|
C.value = s.value.type;
|
|
4731
4729
|
const $ = await store.actions.getDictDataObj(C.value);
|
|
4732
|
-
|
|
4730
|
+
F = [].concat($[C.value]);
|
|
4733
4731
|
const { filters: f, filterType: m = l.format.value, reverse: k = !1 } = s.value, B = typeof f == "string" ? f.split(",") : f;
|
|
4734
|
-
k ?
|
|
4732
|
+
k ? F = F.filter((O) => !B.includes(O[m])) : F = F.filter((O) => B.includes(O[m]));
|
|
4735
4733
|
} else {
|
|
4736
4734
|
C.value = s.value;
|
|
4737
4735
|
const $ = await store.actions.getDictDataObj(C.value);
|
|
4738
|
-
|
|
4736
|
+
F = [].concat($[C.value]);
|
|
4739
4737
|
}
|
|
4740
|
-
if (w.value && (
|
|
4741
|
-
|
|
4738
|
+
if (w.value && (F = w.value(F)), b.value)
|
|
4739
|
+
F = F.map(($) => ({
|
|
4742
4740
|
...$,
|
|
4743
4741
|
[l.format.disabled]: b.value($)
|
|
4744
4742
|
}));
|
|
4745
4743
|
else if (c.value) {
|
|
4746
4744
|
const { disabledValues: $, disabledType: f = l.format.value, reverse: m = !1 } = c.value, k = typeof $ == "string" ? $.split(",") : $;
|
|
4747
|
-
m ?
|
|
4748
|
-
const
|
|
4749
|
-
return
|
|
4750
|
-
}) :
|
|
4751
|
-
const
|
|
4752
|
-
return
|
|
4745
|
+
m ? F = F.map((B) => {
|
|
4746
|
+
const O = JSON.parse(JSON.stringify(B));
|
|
4747
|
+
return O[l.format.disabled] = !k.includes(O[f]) || O[l.format.disabled], O;
|
|
4748
|
+
}) : F = F.map((B) => {
|
|
4749
|
+
const O = JSON.parse(JSON.stringify(B));
|
|
4750
|
+
return O[l.format.disabled] = k.includes(O[f]) || O[l.format.disabled], O;
|
|
4753
4751
|
});
|
|
4754
4752
|
}
|
|
4755
|
-
a.value &&
|
|
4753
|
+
a.value && F.unshift({
|
|
4756
4754
|
[l.format.value]: "",
|
|
4757
4755
|
[l.format.label]: a.value
|
|
4758
|
-
}), E.list =
|
|
4756
|
+
}), E.list = F;
|
|
4759
4757
|
}, x = computed(() => store.state.isGettingDictTypes.includes(C.value)), I = computed(() => store.state.isGettingAllDictTypes), A = computed(() => u.value);
|
|
4760
4758
|
watch(
|
|
4761
4759
|
[x, I, A],
|
|
4762
|
-
([
|
|
4763
|
-
!
|
|
4760
|
+
([F, $, f]) => {
|
|
4761
|
+
!F && !$ && f && f.length === 0 && g(), f.length > 0 && (E.list = JSON.parse(JSON.stringify(f)), E.list.length > 0 && (Object.prototype.toString.call(E.list[0]) === "[object Object]" ? E.list = E.list.map((k) => ({
|
|
4764
4762
|
[l.format.value]: k[o.value.value],
|
|
4765
4763
|
[l.format.label]: k[o.value.label],
|
|
4766
4764
|
[l.format.disabled]: !!k[o.value.disabled],
|
|
@@ -4778,7 +4776,7 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4778
4776
|
}
|
|
4779
4777
|
);
|
|
4780
4778
|
const S = ref(null), D = () => S.value, j = ref([]);
|
|
4781
|
-
return r({ getElTabsRef: D, getElTabPaneRefs: () => j.value }), (
|
|
4779
|
+
return r({ getElTabsRef: D, getElTabPaneRefs: () => j.value }), (F, $) => {
|
|
4782
4780
|
const f = resolveComponent("el-badge");
|
|
4783
4781
|
return openBlock(), createBlock(unref(ElTabs), mergeProps({
|
|
4784
4782
|
ref_key: "ElTabsRef",
|
|
@@ -4789,7 +4787,7 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4789
4787
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(E.list, (m) => (openBlock(), createBlock(unref(ElTabPane), mergeProps({
|
|
4790
4788
|
ref_for: !0,
|
|
4791
4789
|
ref: (k) => {
|
|
4792
|
-
k && (j.value[
|
|
4790
|
+
k && (j.value[F.index] = k);
|
|
4793
4791
|
},
|
|
4794
4792
|
disabled: m[unref(l).format.disabled],
|
|
4795
4793
|
label: m[unref(l).format.label],
|
|
@@ -4797,7 +4795,7 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4797
4795
|
name: m[unref(l).format.value]
|
|
4798
4796
|
}, _.value), createSlots({
|
|
4799
4797
|
default: withCtx(() => [
|
|
4800
|
-
renderSlot(
|
|
4798
|
+
renderSlot(F.$slots, m[unref(l).format.value] ? "tabs-item-" + m[unref(l).format.value] : "tabs-item")
|
|
4801
4799
|
]),
|
|
4802
4800
|
_: 2
|
|
4803
4801
|
}, [
|