cc1-form 1.2.10 → 1.2.12
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/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as
|
|
1
|
+
import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as te, ElInput as x, ElSwitch as Z, ElSelect as q, ElOption as K, ElRadioGroup as le, ElRadio as ne, ElTreeSelect as ue, ElDatePicker as ie, ElDialog as ae, ElButton as j, ElTableColumn as ee, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as oe, ElPagination as de, ElTable as ye } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as G, reactive as re, onMounted as fe, resolveComponent as _, createElementBlock as b, createCommentVNode as v, openBlock as f, renderSlot as C, createVNode as
|
|
3
|
+
import { defineComponent as G, reactive as re, onMounted as fe, resolveComponent as _, createElementBlock as b, createCommentVNode as v, openBlock as f, renderSlot as C, createVNode as E, withCtx as y, createTextVNode as U, Fragment as $, renderList as F, createBlock as g, normalizeClass as I, normalizeStyle as pe, ref as N, unref as o, createElementVNode as D, mergeProps as V, toHandlers as z, resolveDynamicComponent as Q, nextTick as be, toDisplayString as O, getCurrentInstance as we, createSlots as J, withModifiers as ke, resolveDirective as ve, withDirectives as Ce, normalizeProps as Ve, guardReactiveProps as ze } from "vue";
|
|
4
4
|
class M {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
@@ -303,6 +303,10 @@ class A {
|
|
|
303
303
|
},
|
|
304
304
|
/** 表格配置 */
|
|
305
305
|
table: {
|
|
306
|
+
/**
|
|
307
|
+
* 是否显示序号-默认不显示
|
|
308
|
+
*/
|
|
309
|
+
index: !1,
|
|
306
310
|
/** 表头标签宽度 默认100px */
|
|
307
311
|
labelWidth: "100px",
|
|
308
312
|
/** 表格组件大小 - 默认default */
|
|
@@ -628,7 +632,7 @@ class w {
|
|
|
628
632
|
/** curd表单 */
|
|
629
633
|
static curd = $e;
|
|
630
634
|
}
|
|
631
|
-
class
|
|
635
|
+
class H {
|
|
632
636
|
/**
|
|
633
637
|
* ID 生成函数,默认使用 `StrUtil.uuid()`,可覆盖为自定义实现
|
|
634
638
|
*/
|
|
@@ -645,7 +649,7 @@ class K {
|
|
|
645
649
|
s.forEach((e) => {
|
|
646
650
|
let r = e.default ?? "";
|
|
647
651
|
e.type === "number" && (r = e.default ?? 0), e.type === "boolean" && (r = e.default ?? !1), e.type === "time" && (r = e.default ?? /* @__PURE__ */ new Date()), t[e.value] === void 0 && (t[e.value] = r);
|
|
648
|
-
}), t[l] || (t[l] =
|
|
652
|
+
}), t[l] || (t[l] = H.getIdFun());
|
|
649
653
|
});
|
|
650
654
|
};
|
|
651
655
|
/**
|
|
@@ -657,7 +661,7 @@ class K {
|
|
|
657
661
|
*/
|
|
658
662
|
static add = (a, p, s, l) => {
|
|
659
663
|
const t = JSONUtil.cp(s);
|
|
660
|
-
|
|
664
|
+
H.setId(a, p, s);
|
|
661
665
|
const e = A.config.table.rowKey;
|
|
662
666
|
p[a].push(
|
|
663
667
|
t.reduce(
|
|
@@ -665,7 +669,7 @@ class K {
|
|
|
665
669
|
let m = d.default ?? "";
|
|
666
670
|
return d.type === "number" && (m = d.default ?? 0), d.type === "boolean" && (m = d.default ?? !1), d.type === "time" && (m = d.default ?? /* @__PURE__ */ new Date()), r[d.value] = m, r;
|
|
667
671
|
},
|
|
668
|
-
{ [e]:
|
|
672
|
+
{ [e]: H.getIdFun() }
|
|
669
673
|
)
|
|
670
674
|
), l?.(p);
|
|
671
675
|
};
|
|
@@ -689,7 +693,7 @@ class K {
|
|
|
689
693
|
static getNoIdData = (a, p) => {
|
|
690
694
|
const s = JSONUtil.cp(a), l = A.config.table.rowKey;
|
|
691
695
|
return s.forEach((t) => {
|
|
692
|
-
t[l] && delete t[l], p && t[p] &&
|
|
696
|
+
t[l] && delete t[l], p && t[p] && H.getNoIdData(t[p], p);
|
|
693
697
|
}), s;
|
|
694
698
|
};
|
|
695
699
|
}
|
|
@@ -738,33 +742,33 @@ const Ue = {
|
|
|
738
742
|
}
|
|
739
743
|
},
|
|
740
744
|
emits: ["change"],
|
|
741
|
-
setup(
|
|
742
|
-
const p =
|
|
745
|
+
setup(n, { emit: a }) {
|
|
746
|
+
const p = n, s = re({
|
|
743
747
|
show: !1,
|
|
744
748
|
add: (t, e, r) => {
|
|
745
|
-
|
|
749
|
+
H.add(t, e, r, () => {
|
|
746
750
|
l("change");
|
|
747
751
|
});
|
|
748
752
|
},
|
|
749
753
|
remove: (t, e, r) => {
|
|
750
|
-
|
|
754
|
+
H.remove(t, e, r, () => {
|
|
751
755
|
l("change");
|
|
752
756
|
});
|
|
753
757
|
}
|
|
754
758
|
});
|
|
755
759
|
fe(() => {
|
|
756
|
-
|
|
760
|
+
H.setId(p.field, p.row, p.itemFields), s.show = !0;
|
|
757
761
|
});
|
|
758
762
|
const l = a;
|
|
759
763
|
return (t, e) => {
|
|
760
764
|
const r = _("el-button"), d = _("el-input");
|
|
761
765
|
return s.show ? (f(), b("div", Ue, [
|
|
762
|
-
C(t.$slots, "list-start", { row:
|
|
763
|
-
|
|
764
|
-
|
|
766
|
+
C(t.$slots, "list-start", { row: n.row }),
|
|
767
|
+
n.addBottom ? v("", !0) : (f(), b("div", De, [
|
|
768
|
+
E(r, {
|
|
765
769
|
link: "",
|
|
766
770
|
type: "primary",
|
|
767
|
-
onClick: e[0] || (e[0] = (m) => s.add(
|
|
771
|
+
onClick: e[0] || (e[0] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
768
772
|
}, {
|
|
769
773
|
default: y(() => e[3] || (e[3] = [
|
|
770
774
|
U("添加")
|
|
@@ -772,27 +776,27 @@ const Ue = {
|
|
|
772
776
|
_: 1
|
|
773
777
|
})
|
|
774
778
|
])),
|
|
775
|
-
(f(!0), b($, null, F(
|
|
779
|
+
(f(!0), b($, null, F(n.row[n.field], (m) => (f(), b("div", Ee, [
|
|
776
780
|
C(t.$slots, "item-start", {
|
|
777
781
|
item: m,
|
|
778
|
-
row:
|
|
782
|
+
row: n.row
|
|
779
783
|
}),
|
|
780
|
-
(f(!0), b($, null, F(
|
|
784
|
+
(f(!0), b($, null, F(n.itemFields, (c) => (f(), g(d, {
|
|
781
785
|
modelValue: m[c.value],
|
|
782
786
|
"onUpdate:modelValue": (u) => m[c.value] = u,
|
|
783
|
-
style: pe({ width:
|
|
784
|
-
class: I(
|
|
785
|
-
placeholder: c[
|
|
787
|
+
style: pe({ width: n.inputWidth }),
|
|
788
|
+
class: I(n.inputClass),
|
|
789
|
+
placeholder: c[n.label] || c[n.value],
|
|
786
790
|
onChange: e[1] || (e[1] = (u) => l("change"))
|
|
787
791
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
788
792
|
C(t.$slots, "item-end", {
|
|
789
793
|
item: m,
|
|
790
|
-
row:
|
|
794
|
+
row: n.row
|
|
791
795
|
}),
|
|
792
|
-
|
|
796
|
+
E(r, {
|
|
793
797
|
link: "",
|
|
794
798
|
type: "danger",
|
|
795
|
-
onClick: (c) => s.remove(
|
|
799
|
+
onClick: (c) => s.remove(n.field, n.row, m)
|
|
796
800
|
}, {
|
|
797
801
|
default: y(() => e[4] || (e[4] = [
|
|
798
802
|
U("删除")
|
|
@@ -800,11 +804,11 @@ const Ue = {
|
|
|
800
804
|
_: 2
|
|
801
805
|
}, 1032, ["onClick"])
|
|
802
806
|
]))), 256)),
|
|
803
|
-
|
|
804
|
-
|
|
807
|
+
n.addBottom ? (f(), b("div", Oe, [
|
|
808
|
+
E(r, {
|
|
805
809
|
link: "",
|
|
806
810
|
type: "primary",
|
|
807
|
-
onClick: e[2] || (e[2] = (m) => s.add(
|
|
811
|
+
onClick: e[2] || (e[2] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
808
812
|
}, {
|
|
809
813
|
default: y(() => e[5] || (e[5] = [
|
|
810
814
|
U("添加")
|
|
@@ -812,7 +816,7 @@ const Ue = {
|
|
|
812
816
|
_: 1
|
|
813
817
|
})
|
|
814
818
|
])) : v("", !0),
|
|
815
|
-
C(t.$slots, "list-end", { row:
|
|
819
|
+
C(t.$slots, "list-end", { row: n.row })
|
|
816
820
|
])) : v("", !0);
|
|
817
821
|
};
|
|
818
822
|
}
|
|
@@ -835,8 +839,8 @@ const Ue = {
|
|
|
835
839
|
default: ""
|
|
836
840
|
}
|
|
837
841
|
},
|
|
838
|
-
setup(
|
|
839
|
-
const p = M.isFun, s = M.EDialog, l = N(), t =
|
|
842
|
+
setup(n, { expose: a }) {
|
|
843
|
+
const p = M.isFun, s = M.EDialog, l = N(), t = n, e = re({
|
|
840
844
|
rules: {},
|
|
841
845
|
show: !0,
|
|
842
846
|
form: {},
|
|
@@ -848,7 +852,7 @@ const Ue = {
|
|
|
848
852
|
getOn: (r) => r.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
849
853
|
getColumnSpan: (r, d) => {
|
|
850
854
|
if (r.item.form?.spanCol) {
|
|
851
|
-
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((
|
|
855
|
+
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((i) => !M.isFun(i.item.show?.form, e.form, e.type)).reduce((i, h) => i + (h.item.form?.span || c), 0);
|
|
852
856
|
return (r.item.form?.span || c) + k;
|
|
853
857
|
}
|
|
854
858
|
return r.item.form?.span;
|
|
@@ -867,8 +871,8 @@ const Ue = {
|
|
|
867
871
|
}
|
|
868
872
|
if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
|
|
869
873
|
h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
|
|
870
|
-
const S = h.form.span,
|
|
871
|
-
if (u.push({ item: h, span: S }), (T === 1 && u[0].span === 0 ||
|
|
874
|
+
const S = h.form.span, B = u.reduce((R, Y) => R + Y.span, S), T = u.length;
|
|
875
|
+
if (u.push({ item: h, span: S }), (T === 1 && u[0].span === 0 || B >= m || S === 0 && T > 1) && (d.push(u), u = []), h.rules) {
|
|
872
876
|
const R = {
|
|
873
877
|
input: w.tCurd("placeholderInput"),
|
|
874
878
|
select: w.tCurd("placeholderSelect")
|
|
@@ -882,11 +886,11 @@ const Ue = {
|
|
|
882
886
|
] : h.rules;
|
|
883
887
|
}
|
|
884
888
|
}
|
|
885
|
-
},
|
|
886
|
-
h.isForm = S, Array.isArray(h.children) && h.children.forEach((
|
|
889
|
+
}, i = (h, S) => {
|
|
890
|
+
h.isForm = S, Array.isArray(h.children) && h.children.forEach((B) => i(B, S));
|
|
887
891
|
};
|
|
888
892
|
r.column.forEach((h) => {
|
|
889
|
-
|
|
893
|
+
i(h, !0), k(h);
|
|
890
894
|
}), u.length > 0 && d.push(u), e.formColumn = d, e.form = JSONUtil.cp(e.formDefault);
|
|
891
895
|
}
|
|
892
896
|
});
|
|
@@ -908,7 +912,7 @@ const Ue = {
|
|
|
908
912
|
) ? (f(), b("div", {
|
|
909
913
|
key: 0,
|
|
910
914
|
class: I(["row curd-row", {
|
|
911
|
-
stripe:
|
|
915
|
+
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
912
916
|
}])
|
|
913
917
|
}, [
|
|
914
918
|
C(r.$slots, "form-start", {
|
|
@@ -921,19 +925,19 @@ const Ue = {
|
|
|
921
925
|
key: 0,
|
|
922
926
|
class: I([u.item.form.span > 0 ? `col-${e.getColumnSpan(u, m)}` : "col", `form-item-col-${u.item.key}`])
|
|
923
927
|
}, [
|
|
924
|
-
|
|
928
|
+
E(o(te), {
|
|
925
929
|
label: u.item.text?.form?.label ?? u.item.label,
|
|
926
930
|
prop: u.item.key,
|
|
927
|
-
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth ||
|
|
931
|
+
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || n.option.form?.labelWidth || "100px"
|
|
928
932
|
}, {
|
|
929
933
|
default: y(() => [
|
|
930
|
-
|
|
934
|
+
D("div", Se, [
|
|
931
935
|
C(r.$slots, "form-" + u.item.key + "-start", {
|
|
932
936
|
row: e.form,
|
|
933
937
|
item: u.item
|
|
934
938
|
}),
|
|
935
|
-
|
|
936
|
-
|
|
939
|
+
D("div", Me, [
|
|
940
|
+
D("div", Ae, [
|
|
937
941
|
C(r.$slots, "form-" + u.item.key, {
|
|
938
942
|
row: e.form,
|
|
939
943
|
item: u.item
|
|
@@ -962,7 +966,7 @@ const Ue = {
|
|
|
962
966
|
style: { width: "100%" }
|
|
963
967
|
}), {
|
|
964
968
|
default: y(() => [
|
|
965
|
-
(f(!0), b($, null, F(u.item.options?.select?.data, (k) => (f(), g(o(
|
|
969
|
+
(f(!0), b($, null, F(u.item.options?.select?.data, (k) => (f(), g(o(K), {
|
|
966
970
|
key: k.value,
|
|
967
971
|
label: k.label,
|
|
968
972
|
value: k.value
|
|
@@ -1054,7 +1058,7 @@ const Ue = {
|
|
|
1054
1058
|
}, 8, ["model", "rules"]));
|
|
1055
1059
|
}
|
|
1056
1060
|
});
|
|
1057
|
-
class
|
|
1061
|
+
class je {
|
|
1058
1062
|
/**
|
|
1059
1063
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
1060
1064
|
*
|
|
@@ -1073,9 +1077,9 @@ class Be {
|
|
|
1073
1077
|
l.utils.book_append_sheet(r, e, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(r, `${s}.xlsx`);
|
|
1074
1078
|
};
|
|
1075
1079
|
}
|
|
1076
|
-
const P = M.EDialog, Le = (
|
|
1080
|
+
const P = M.EDialog, Le = (n) => {
|
|
1077
1081
|
const a = N(), p = N(), s = N(), l = re({
|
|
1078
|
-
option:
|
|
1082
|
+
option: n.option,
|
|
1079
1083
|
/** 查询区域相关配置对象 */
|
|
1080
1084
|
search: {
|
|
1081
1085
|
/** 查询表单列集合 */
|
|
@@ -1092,18 +1096,18 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1092
1096
|
/** 组装实际要搜索的数据对象 */
|
|
1093
1097
|
getFormData: () => {
|
|
1094
1098
|
let t = {};
|
|
1095
|
-
|
|
1099
|
+
n.option.column.forEach((r) => {
|
|
1096
1100
|
(typeof r.show?.search == "function" ? r.show?.search(l.search.form) : r.show?.search) && (t[r.key] = l.search.form[r.key]);
|
|
1097
1101
|
});
|
|
1098
|
-
const e =
|
|
1102
|
+
const e = n.option.search?.before?.(t);
|
|
1099
1103
|
return e && (t = e), t;
|
|
1100
1104
|
},
|
|
1101
1105
|
/** 重置搜索表单 */
|
|
1102
1106
|
reset: () => {
|
|
1103
1107
|
const t = l.search.formDefault;
|
|
1104
1108
|
Object.keys(t).forEach((e) => {
|
|
1105
|
-
|
|
1106
|
-
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1,
|
|
1109
|
+
n.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
|
|
1110
|
+
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, n.option.init !== !1 && l.table.getList();
|
|
1107
1111
|
},
|
|
1108
1112
|
/** 提交搜索表单 */
|
|
1109
1113
|
submit: () => {
|
|
@@ -1117,15 +1121,15 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1117
1121
|
/** 总条数 */
|
|
1118
1122
|
total: 0,
|
|
1119
1123
|
/** 分页控件的布局方式 */
|
|
1120
|
-
layout:
|
|
1124
|
+
layout: n.option.page?.layout || A.config.pagination.layout,
|
|
1121
1125
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1122
|
-
showTools:
|
|
1126
|
+
showTools: n.option.page?.showTools || A.config.pagination.showTools,
|
|
1123
1127
|
/** 当前每页条数 */
|
|
1124
|
-
size:
|
|
1128
|
+
size: n.option.page?.size || A.config.pagination.size,
|
|
1125
1129
|
/** 支持切换的每页条数选项 */
|
|
1126
|
-
sizeList:
|
|
1130
|
+
sizeList: n.option.page?.sizeList || A.config.pagination.pageSizes,
|
|
1127
1131
|
/** 分页器计数 */
|
|
1128
|
-
pagerCount:
|
|
1132
|
+
pagerCount: n.option.page?.pagerCount || A.config.pagination.pagerCount,
|
|
1129
1133
|
/** 获取分页查询参数 */
|
|
1130
1134
|
getQuery: (t = {}) => ({
|
|
1131
1135
|
[A.config.field.page.size]: t.size || l.page.size,
|
|
@@ -1161,7 +1165,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1161
1165
|
const t = (e) => {
|
|
1162
1166
|
let r = [];
|
|
1163
1167
|
return e.forEach((d) => {
|
|
1164
|
-
r.push(d[
|
|
1168
|
+
r.push(d[n.option.table.rowKey]), d.children && d.children.length > 0 && (r = r.concat(t(d.children)));
|
|
1165
1169
|
}), r;
|
|
1166
1170
|
};
|
|
1167
1171
|
l.table.expand.rowKeys = t(l.table.data);
|
|
@@ -1202,7 +1206,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1202
1206
|
/** 获取数据列表接口实现 */
|
|
1203
1207
|
getList: async () => {
|
|
1204
1208
|
l.table.loading = !0;
|
|
1205
|
-
const t =
|
|
1209
|
+
const t = n.option.api.list;
|
|
1206
1210
|
try {
|
|
1207
1211
|
await l.initApiData("init");
|
|
1208
1212
|
let e = {};
|
|
@@ -1218,11 +1222,11 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1218
1222
|
...e
|
|
1219
1223
|
}), d = A.config.field.result, m = r.data || { [d.list]: r };
|
|
1220
1224
|
let c = (Array.isArray(m[d.list]), m[d.list]);
|
|
1221
|
-
const u = l.update.formColumn.flat(),
|
|
1222
|
-
const T = u.find((R) => R.item.key ===
|
|
1223
|
-
T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (R) => T.item.options[T.item.type].data?.find((Y) => Y.value == R[
|
|
1225
|
+
const u = l.update.formColumn.flat(), i = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((B) => {
|
|
1226
|
+
const T = u.find((R) => R.item.key === B);
|
|
1227
|
+
T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (R) => T.item.options[T.item.type].data?.find((Y) => Y.value == R[B])?.label || R[B]));
|
|
1224
1228
|
}), h));
|
|
1225
|
-
l.table.data =
|
|
1229
|
+
l.table.data = n.option.data ? await n.option.data(i, c) : i, l.page.total = m[d.total] || 0;
|
|
1226
1230
|
} catch (e) {
|
|
1227
1231
|
console.error(e);
|
|
1228
1232
|
} finally {
|
|
@@ -1242,9 +1246,9 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1242
1246
|
l.table.selection.list = [];
|
|
1243
1247
|
const r = s.value;
|
|
1244
1248
|
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1245
|
-
const d =
|
|
1246
|
-
const k = (
|
|
1247
|
-
for (const h of
|
|
1249
|
+
const d = n.option.table?.rowKey, m = l.table.data, c = (u) => {
|
|
1250
|
+
const k = (i) => {
|
|
1251
|
+
for (const h of i) {
|
|
1248
1252
|
if (d != null && d !== "") {
|
|
1249
1253
|
if (h[d] === u[d]) return h;
|
|
1250
1254
|
} else if (h === u)
|
|
@@ -1261,10 +1265,10 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1261
1265
|
t.forEach((u) => {
|
|
1262
1266
|
const k = c(u) ?? u;
|
|
1263
1267
|
if (e) {
|
|
1264
|
-
const
|
|
1268
|
+
const i = () => {
|
|
1265
1269
|
r.toggleRowSelection(k, !0, !1);
|
|
1266
1270
|
};
|
|
1267
|
-
e(u) !== !1 &&
|
|
1271
|
+
e(u) !== !1 && i();
|
|
1268
1272
|
} else
|
|
1269
1273
|
r.toggleRowSelection(k, !0, !1);
|
|
1270
1274
|
});
|
|
@@ -1285,7 +1289,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1285
1289
|
e.change(t, l);
|
|
1286
1290
|
return;
|
|
1287
1291
|
}
|
|
1288
|
-
l.table.sort.prop = t.prop, t.order === null ? l.table.sort.order = "" : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
|
|
1292
|
+
l.table.sort.prop = t.prop, t.order === null ? (l.table.sort.order = "", l.table.sort.prop = "") : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
|
|
1289
1293
|
}
|
|
1290
1294
|
}
|
|
1291
1295
|
},
|
|
@@ -1295,22 +1299,22 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1295
1299
|
run: {
|
|
1296
1300
|
/** 执行指定方式的导出(如select、page、all) */
|
|
1297
1301
|
start: async (t) => {
|
|
1298
|
-
let e = await l.export.run[t](), r =
|
|
1302
|
+
let e = await l.export.run[t](), r = n.option.column;
|
|
1299
1303
|
const d = ObjectUtil.deepMerge(
|
|
1300
1304
|
{
|
|
1301
1305
|
data: e,
|
|
1302
1306
|
columns: r
|
|
1303
1307
|
},
|
|
1304
1308
|
{}
|
|
1305
|
-
), m =
|
|
1306
|
-
m.before && m.before(d),
|
|
1309
|
+
), m = n.option.tools?.export || {};
|
|
1310
|
+
m.before && m.before(d), je.exportToExcel(d.data, d.columns, m.fileName);
|
|
1307
1311
|
},
|
|
1308
1312
|
/** 获取当前选中项进行导出 */
|
|
1309
1313
|
select: async () => {
|
|
1310
1314
|
l.export.loading = !0;
|
|
1311
1315
|
try {
|
|
1312
|
-
if (
|
|
1313
|
-
await
|
|
1316
|
+
if (n.option.tools?.export?.select) {
|
|
1317
|
+
await n.option.tools?.export?.select({
|
|
1314
1318
|
...l.page.getQuery(),
|
|
1315
1319
|
items: l.table.selection.list
|
|
1316
1320
|
});
|
|
@@ -1329,8 +1333,8 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1329
1333
|
page: async () => {
|
|
1330
1334
|
l.export.loading = !0;
|
|
1331
1335
|
try {
|
|
1332
|
-
if (
|
|
1333
|
-
await
|
|
1336
|
+
if (n.option.tools?.export?.page) {
|
|
1337
|
+
await n.option.tools?.export?.page({
|
|
1334
1338
|
...l.page.getQuery()
|
|
1335
1339
|
});
|
|
1336
1340
|
return;
|
|
@@ -1348,13 +1352,13 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1348
1352
|
all: async () => {
|
|
1349
1353
|
l.export.loading = !0;
|
|
1350
1354
|
try {
|
|
1351
|
-
if (
|
|
1352
|
-
await
|
|
1355
|
+
if (n.option.tools?.export?.all) {
|
|
1356
|
+
await n.option.tools?.export?.all({
|
|
1353
1357
|
...l.page.getQuery()
|
|
1354
1358
|
});
|
|
1355
1359
|
return;
|
|
1356
1360
|
}
|
|
1357
|
-
const t =
|
|
1361
|
+
const t = n.option.api.list, e = await t({
|
|
1358
1362
|
...l.page.getQuery({
|
|
1359
1363
|
size: 999999,
|
|
1360
1364
|
num: 1
|
|
@@ -1396,7 +1400,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1396
1400
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1397
1401
|
formColumn: [],
|
|
1398
1402
|
/** 判断是否禁用当前字段 */
|
|
1399
|
-
getDisabled: (t, e = !1) =>
|
|
1403
|
+
getDisabled: (t, e = !1) => n.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === P.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === P.Add ? "create" : "update"],
|
|
1400
1404
|
/** 获取表单组件绑定属性 */
|
|
1401
1405
|
getBind: (t) => t.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
|
|
1402
1406
|
/** 获取表单组件事件属性 */
|
|
@@ -1428,10 +1432,10 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1428
1432
|
data: {},
|
|
1429
1433
|
/** 返回编辑时与原值的变更数据,用于局部更新API */
|
|
1430
1434
|
getApiData: (t) => {
|
|
1431
|
-
if (
|
|
1435
|
+
if (n.option.form?.editAll)
|
|
1432
1436
|
return t;
|
|
1433
1437
|
let e = {
|
|
1434
|
-
[
|
|
1438
|
+
[n.option.table?.rowKey]: l.update.edit.data[n.option.table?.rowKey]
|
|
1435
1439
|
};
|
|
1436
1440
|
return Object.keys(l.update.edit.data).forEach((r) => {
|
|
1437
1441
|
t[r] !== l.update.edit.data[r] && (e[r] = t[r]);
|
|
@@ -1446,7 +1450,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1446
1450
|
try {
|
|
1447
1451
|
l.update.type = t;
|
|
1448
1452
|
const r = t === P.Add;
|
|
1449
|
-
l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await
|
|
1453
|
+
l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await n.option.form?.openBefore?.(l.update.form, l.update), (!n.option.table?.inlineEdit || r) && (l.update.show = !0, l.update.showContent = !0), n.option.form?.openAfter?.(l.update.form, l.update);
|
|
1450
1454
|
} catch (r) {
|
|
1451
1455
|
console.error(r);
|
|
1452
1456
|
} finally {
|
|
@@ -1460,16 +1464,16 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1460
1464
|
await p.value?.validate(async (d, m) => new Promise((c, u) => {
|
|
1461
1465
|
d || (M.fail(w.tCurd("checkFormData")), u(!1)), c();
|
|
1462
1466
|
})), l.update.loading = !0;
|
|
1463
|
-
const t = l.update.type === P.Add ?
|
|
1467
|
+
const t = l.update.type === P.Add ? n.option.api.create : n.option.api.update;
|
|
1464
1468
|
try {
|
|
1465
|
-
await
|
|
1469
|
+
await n.option.form?.submitBefore?.(l.update.form, l.update);
|
|
1466
1470
|
} catch {
|
|
1467
1471
|
l.update.loading = !1;
|
|
1468
1472
|
return;
|
|
1469
1473
|
}
|
|
1470
1474
|
let e = ObjectUtil.deepMerge(l.update.form, {});
|
|
1471
1475
|
delete e.children;
|
|
1472
|
-
const r = new Set(
|
|
1476
|
+
const r = new Set(n.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
|
|
1473
1477
|
Object.keys(e).forEach((d) => {
|
|
1474
1478
|
if (r.has(d) && e[d] != null) {
|
|
1475
1479
|
const m = new Date(e[d]).getTime();
|
|
@@ -1480,7 +1484,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1480
1484
|
if (!t) return;
|
|
1481
1485
|
await t({
|
|
1482
1486
|
...e
|
|
1483
|
-
}), l.update.close(), await l.table.getList(),
|
|
1487
|
+
}), l.update.close(), await l.table.getList(), n.option.form?.submitAfter?.(e, l.update);
|
|
1484
1488
|
} catch (d) {
|
|
1485
1489
|
console.error(d);
|
|
1486
1490
|
} finally {
|
|
@@ -1490,7 +1494,7 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1490
1494
|
},
|
|
1491
1495
|
/** 关闭弹窗和内容 */
|
|
1492
1496
|
close: () => {
|
|
1493
|
-
l.update.show = !1,
|
|
1497
|
+
l.update.show = !1, n.option.table?.inlineEdit && (l.update.form = {}), setTimeout(() => {
|
|
1494
1498
|
l.update.showContent = !1;
|
|
1495
1499
|
}, 350);
|
|
1496
1500
|
}
|
|
@@ -1521,11 +1525,11 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1521
1525
|
submit: () => {
|
|
1522
1526
|
FunUtil.throttle(async () => {
|
|
1523
1527
|
l.remove.loading = !0;
|
|
1524
|
-
const t =
|
|
1528
|
+
const t = n.option.api.delete;
|
|
1525
1529
|
try {
|
|
1526
1530
|
if (!t) return;
|
|
1527
1531
|
await t({
|
|
1528
|
-
[
|
|
1532
|
+
[n.option.table?.rowKey]: l.remove.items.map((e) => e[n.option.table?.rowKey]),
|
|
1529
1533
|
items: l.remove.items
|
|
1530
1534
|
}), M.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
|
|
1531
1535
|
} catch (e) {
|
|
@@ -1564,17 +1568,17 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1564
1568
|
e.push(m);
|
|
1565
1569
|
}
|
|
1566
1570
|
};
|
|
1567
|
-
return
|
|
1571
|
+
return n.option.column.forEach((d) => {
|
|
1568
1572
|
r(d);
|
|
1569
1573
|
}), await Promise.all(e), !0;
|
|
1570
1574
|
},
|
|
1571
1575
|
/** 初始化curd配置(option默认值合并等) */
|
|
1572
1576
|
initCurdConfig: () => {
|
|
1573
1577
|
const t = ObjectUtil.deepMerge(A.config, {});
|
|
1574
|
-
t.table.emptyText = w.tCurd("noData"),
|
|
1575
|
-
const e = ObjectUtil.deepMerge(t,
|
|
1578
|
+
t.table.emptyText = w.tCurd("noData"), n.option.size = n.option.size || {}, t.table.size = n.option.size.table || t.size.table, t.form.size = n.option.size.form || t.size.form, t.size.search = n.option.size.search || t.size.search;
|
|
1579
|
+
const e = ObjectUtil.deepMerge(t, n.option || {});
|
|
1576
1580
|
Object.keys(e).forEach((r) => {
|
|
1577
|
-
|
|
1581
|
+
n.option[r] = e[r];
|
|
1578
1582
|
});
|
|
1579
1583
|
},
|
|
1580
1584
|
/**
|
|
@@ -1603,8 +1607,8 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1603
1607
|
return;
|
|
1604
1608
|
}
|
|
1605
1609
|
} else d === "type" ? r.type = r.type || t.type : r[d] = ObjectUtil.deepMerge(t[d], r[d] || {});
|
|
1606
|
-
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size =
|
|
1607
|
-
r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ?
|
|
1610
|
+
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = n.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
|
|
1611
|
+
r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ? n.option.size.search : n.option.size.form;
|
|
1608
1612
|
}), r.table = ObjectUtil.deepMerge(r.table, r.options[r.type].table || {});
|
|
1609
1613
|
}
|
|
1610
1614
|
r.type === "switch" && (r.options.switch.tableBeforeChange = async (d, m) => {
|
|
@@ -1615,13 +1619,13 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1615
1619
|
content: w.tCurd("confirmSwitchMessage")
|
|
1616
1620
|
});
|
|
1617
1621
|
try {
|
|
1618
|
-
if (!
|
|
1619
|
-
const u = m[
|
|
1622
|
+
if (!n.option.api.update && !c.tableConfig?.api) return;
|
|
1623
|
+
const u = m[n.option.table?.rowKey];
|
|
1620
1624
|
c.loadingMap || (c.loadingMap = {}), c.loadingMap[u] || (c.loadingMap[u] = { loading: !1 }), c.loadingMap[u].loading = !0;
|
|
1621
|
-
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue,
|
|
1622
|
-
if (!
|
|
1625
|
+
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, i = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
|
|
1626
|
+
if (!i) return;
|
|
1623
1627
|
try {
|
|
1624
|
-
await
|
|
1628
|
+
await i(
|
|
1625
1629
|
{
|
|
1626
1630
|
...m,
|
|
1627
1631
|
[d]: k
|
|
@@ -1642,9 +1646,9 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1642
1646
|
} catch {
|
|
1643
1647
|
return !1;
|
|
1644
1648
|
}
|
|
1645
|
-
}), r.type === "treeSelect" && (r.options.treeSelect.rowKey =
|
|
1649
|
+
}), r.type === "treeSelect" && (r.options.treeSelect.rowKey = n.option.table?.rowKey, r.options.treeSelect.nodeKey = n.option.table?.rowKey);
|
|
1646
1650
|
};
|
|
1647
|
-
|
|
1651
|
+
n.option.column.forEach(e), n.option.table?.column?.forEach(e);
|
|
1648
1652
|
},
|
|
1649
1653
|
getColumnSpan: (t, e) => {
|
|
1650
1654
|
if (t.item.form?.spanCol) {
|
|
@@ -1655,63 +1659,63 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1655
1659
|
},
|
|
1656
1660
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1657
1661
|
initColumnForm: () => {
|
|
1658
|
-
const t =
|
|
1662
|
+
const t = n.option;
|
|
1659
1663
|
l.update.formColumn = [], l.table.column.show = {
|
|
1660
1664
|
list: [],
|
|
1661
1665
|
listSource: []
|
|
1662
1666
|
};
|
|
1663
|
-
const e = [], r =
|
|
1667
|
+
const e = [], r = n.option.form?.maxSpan || 12, d = n.option.form?.defaultSpan || r / 2;
|
|
1664
1668
|
let m = [];
|
|
1665
|
-
const c = (
|
|
1666
|
-
if (
|
|
1667
|
-
l.table.column.show.list.push(
|
|
1669
|
+
const c = (i) => {
|
|
1670
|
+
if (i.children) {
|
|
1671
|
+
l.table.column.show.list.push(i.key), i.children.forEach((h) => {
|
|
1668
1672
|
c(h);
|
|
1669
1673
|
});
|
|
1670
1674
|
return;
|
|
1671
1675
|
}
|
|
1672
|
-
if (l.update.formDefault[
|
|
1673
|
-
|
|
1674
|
-
let h =
|
|
1675
|
-
const
|
|
1676
|
-
if (m.push({ item:
|
|
1676
|
+
if (l.update.formDefault[i.key] = i.value, i.table.table && (i.show.table && l.table.column.show.list.push(i.key), i.table.table && l.table.column.show.listSource.push(i.key)), !(i.isForm && typeof i.show?.form == "boolean") || i.show?.form) {
|
|
1677
|
+
i.form = i.form || { span: d }, i.form.span = i.form.span ?? d;
|
|
1678
|
+
let h = i.form.span, S = m.reduce((T, R) => T + R.span, h);
|
|
1679
|
+
const B = m.length;
|
|
1680
|
+
if (m.push({ item: i, span: h }), (B === 1 && m[0].span === 0 || S >= r || h === 0 && B > 1) && (e.push(m), m = []), i.rules) {
|
|
1677
1681
|
const T = {
|
|
1678
1682
|
input: w.tCurd("placeholderInput"),
|
|
1679
1683
|
select: w.tCurd("placeholderSelect")
|
|
1680
|
-
}, R = (T[
|
|
1681
|
-
l.update.rules[
|
|
1684
|
+
}, R = (T[i.type] || T.input) + i.label;
|
|
1685
|
+
l.update.rules[i.key] = typeof i.rules == "boolean" ? [
|
|
1682
1686
|
{
|
|
1683
1687
|
required: !0,
|
|
1684
1688
|
message: R,
|
|
1685
1689
|
trigger: "blur"
|
|
1686
1690
|
}
|
|
1687
|
-
] :
|
|
1691
|
+
] : i.rules;
|
|
1688
1692
|
}
|
|
1689
1693
|
}
|
|
1690
|
-
}, u = (
|
|
1691
|
-
|
|
1694
|
+
}, u = (i, h) => {
|
|
1695
|
+
i.isForm = h, Array.isArray(i.children) && i.children.forEach((S) => u(S, h));
|
|
1692
1696
|
};
|
|
1693
|
-
t.column.forEach((
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
u(
|
|
1697
|
-
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((
|
|
1698
|
-
const k =
|
|
1699
|
-
k && Object.keys(k).forEach((
|
|
1700
|
-
l.search.formDefault[
|
|
1701
|
-
}), t.column.forEach((
|
|
1702
|
-
|
|
1697
|
+
t.column.forEach((i) => {
|
|
1698
|
+
i.isForm = !0, u(i, !0), c(i);
|
|
1699
|
+
}), n.option.table?.column?.forEach((i) => {
|
|
1700
|
+
u(i, !1), c(i);
|
|
1701
|
+
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((i) => i.table?.table), l.search.column.list.sort((i, h) => i.sort?.search - h.sort?.search), l.table.column.list.sort((i, h) => i.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
|
|
1702
|
+
const k = n.option.search?.formDefault;
|
|
1703
|
+
k && Object.keys(k).forEach((i) => {
|
|
1704
|
+
l.search.formDefault[i] = k[i];
|
|
1705
|
+
}), t.column.forEach((i) => {
|
|
1706
|
+
i.show?.search || (l.search.formDefault[i.key] = void 0);
|
|
1703
1707
|
}), l.search.form = ObjectUtil.deepMerge(l.search.formDefault, {});
|
|
1704
1708
|
}
|
|
1705
1709
|
});
|
|
1706
1710
|
return l.init(), fe(() => {
|
|
1707
|
-
|
|
1711
|
+
n.option.init !== !1 && l.table.getList();
|
|
1708
1712
|
}), { conf: l, switchConfirmRef: a, ruleFormRef: p, tableRef: s };
|
|
1709
|
-
},
|
|
1713
|
+
}, Be = { class: "dialog-footer" }, Re = /* @__PURE__ */ G({
|
|
1710
1714
|
__name: "switchConfirm",
|
|
1711
1715
|
props: {
|
|
1712
1716
|
size: {}
|
|
1713
1717
|
},
|
|
1714
|
-
setup(
|
|
1718
|
+
setup(n, { expose: a }) {
|
|
1715
1719
|
const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
|
|
1716
1720
|
let t = null, e = null;
|
|
1717
1721
|
const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((u, k) => {
|
|
@@ -1725,24 +1729,24 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1725
1729
|
open: r
|
|
1726
1730
|
}), (c, u) => {
|
|
1727
1731
|
const k = _("el-form");
|
|
1728
|
-
return f(), g(o(
|
|
1732
|
+
return f(), g(o(ae), {
|
|
1729
1733
|
modelValue: p.value,
|
|
1730
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1734
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => p.value = i),
|
|
1731
1735
|
title: s.value,
|
|
1732
1736
|
"close-on-click-modal": !1,
|
|
1733
1737
|
width: "400px"
|
|
1734
1738
|
}, {
|
|
1735
1739
|
footer: y(() => [
|
|
1736
|
-
|
|
1740
|
+
E(k, { size: c.size }, {
|
|
1737
1741
|
default: y(() => [
|
|
1738
|
-
|
|
1739
|
-
|
|
1742
|
+
D("span", Be, [
|
|
1743
|
+
E(o(j), { onClick: m }, {
|
|
1740
1744
|
default: y(() => u[1] || (u[1] = [
|
|
1741
1745
|
U("取消")
|
|
1742
1746
|
])),
|
|
1743
1747
|
_: 1
|
|
1744
1748
|
}),
|
|
1745
|
-
|
|
1749
|
+
E(o(j), {
|
|
1746
1750
|
type: "primary",
|
|
1747
1751
|
onClick: d
|
|
1748
1752
|
}, {
|
|
@@ -1757,14 +1761,14 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1757
1761
|
}, 8, ["size"])
|
|
1758
1762
|
]),
|
|
1759
1763
|
default: y(() => [
|
|
1760
|
-
|
|
1764
|
+
D("div", null, O(l.value), 1)
|
|
1761
1765
|
]),
|
|
1762
1766
|
_: 1
|
|
1763
1767
|
}, 8, ["modelValue", "title"]);
|
|
1764
1768
|
};
|
|
1765
1769
|
}
|
|
1766
|
-
}), X = (
|
|
1767
|
-
const p =
|
|
1770
|
+
}), X = (n, a) => {
|
|
1771
|
+
const p = n.__vccOpts || n;
|
|
1768
1772
|
for (const [s, l] of a)
|
|
1769
1773
|
p[s] = l;
|
|
1770
1774
|
return p;
|
|
@@ -1772,22 +1776,22 @@ const P = M.EDialog, Le = (i) => {
|
|
|
1772
1776
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1773
1777
|
viewBox: "0 0 1024 1024"
|
|
1774
1778
|
};
|
|
1775
|
-
function
|
|
1779
|
+
function He(n, a) {
|
|
1776
1780
|
return f(), b("svg", Pe, a[0] || (a[0] = [
|
|
1777
|
-
|
|
1781
|
+
D("path", {
|
|
1778
1782
|
fill: "currentColor",
|
|
1779
1783
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
1780
1784
|
}, null, -1)
|
|
1781
1785
|
]));
|
|
1782
1786
|
}
|
|
1783
|
-
const
|
|
1787
|
+
const Ke = /* @__PURE__ */ X(Ie, [["render", He]]), Ne = {}, We = {
|
|
1784
1788
|
"data-v-58697b5c": "",
|
|
1785
1789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1786
1790
|
viewBox: "0 0 1024 1024"
|
|
1787
1791
|
};
|
|
1788
|
-
function Je(
|
|
1792
|
+
function Je(n, a) {
|
|
1789
1793
|
return f(), b("svg", We, a[0] || (a[0] = [
|
|
1790
|
-
|
|
1794
|
+
D("path", {
|
|
1791
1795
|
fill: "currentColor",
|
|
1792
1796
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
1793
1797
|
}, null, -1)
|
|
@@ -1798,9 +1802,9 @@ const qe = /* @__PURE__ */ X(Ne, [["render", Je]]), Qe = {}, Ge = {
|
|
|
1798
1802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1799
1803
|
viewBox: "0 0 1024 1024"
|
|
1800
1804
|
};
|
|
1801
|
-
function Xe(
|
|
1805
|
+
function Xe(n, a) {
|
|
1802
1806
|
return f(), b("svg", Ge, a[0] || (a[0] = [
|
|
1803
|
-
|
|
1807
|
+
D("path", {
|
|
1804
1808
|
fill: "currentColor",
|
|
1805
1809
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
|
|
1806
1810
|
}, null, -1)
|
|
@@ -1811,22 +1815,22 @@ const Ye = /* @__PURE__ */ X(Qe, [["render", Xe]]), Ze = {}, xe = {
|
|
|
1811
1815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
1816
|
viewBox: "0 0 1024 1024"
|
|
1813
1817
|
};
|
|
1814
|
-
function _e(
|
|
1818
|
+
function _e(n, a) {
|
|
1815
1819
|
return f(), b("svg", xe, a[0] || (a[0] = [
|
|
1816
|
-
|
|
1820
|
+
D("path", {
|
|
1817
1821
|
fill: "currentColor",
|
|
1818
1822
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
|
|
1819
1823
|
}, null, -1)
|
|
1820
1824
|
]));
|
|
1821
1825
|
}
|
|
1822
|
-
const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-center table-header-label inline" }, ot = { class: "table-header-tooltip" }, at = ["
|
|
1826
|
+
const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-center table-header-label inline" }, ot = { class: "table-header-tooltip" }, at = ["innerHTML"], lt = ["onClick"], nt = { key: 1 }, it = ["onClick", "innerHTML"], rt = /* @__PURE__ */ G({
|
|
1823
1827
|
__name: "tableColumn",
|
|
1824
1828
|
props: {
|
|
1825
1829
|
conf: {},
|
|
1826
1830
|
columnList: {},
|
|
1827
1831
|
option: {}
|
|
1828
1832
|
},
|
|
1829
|
-
setup(
|
|
1833
|
+
setup(n) {
|
|
1830
1834
|
const a = M.isFun, p = we().type;
|
|
1831
1835
|
return (s, l) => {
|
|
1832
1836
|
const t = _("el-tooltip");
|
|
@@ -1834,7 +1838,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1834
1838
|
key: e.key
|
|
1835
1839
|
}, [
|
|
1836
1840
|
s.conf.table.column.show.list.includes(e.key) ? (f(), b($, { key: 0 }, [
|
|
1837
|
-
e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(o(
|
|
1841
|
+
e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(o(ee), V({
|
|
1838
1842
|
key: 0,
|
|
1839
1843
|
prop: e.key,
|
|
1840
1844
|
label: e.label,
|
|
@@ -1842,20 +1846,24 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1842
1846
|
}, e.table), {
|
|
1843
1847
|
header: y(() => [
|
|
1844
1848
|
C(s.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1845
|
-
|
|
1849
|
+
D("div", tt, [
|
|
1846
1850
|
e.table?.header?.tooltip ? (f(), g(t, {
|
|
1847
1851
|
key: 0,
|
|
1848
1852
|
effect: "dark",
|
|
1849
|
-
content: e.table?.header?.tooltip,
|
|
1850
1853
|
placement: "top"
|
|
1851
1854
|
}, {
|
|
1855
|
+
content: y(() => [
|
|
1856
|
+
D("div", {
|
|
1857
|
+
innerHTML: e.table?.header?.tooltip
|
|
1858
|
+
}, null, 8, at)
|
|
1859
|
+
]),
|
|
1852
1860
|
default: y(() => [
|
|
1853
|
-
|
|
1854
|
-
|
|
1861
|
+
D("span", ot, [
|
|
1862
|
+
E(qe)
|
|
1855
1863
|
])
|
|
1856
1864
|
]),
|
|
1857
1865
|
_: 2
|
|
1858
|
-
},
|
|
1866
|
+
}, 1024)) : v("", !0),
|
|
1859
1867
|
U(" " + O(e.label) + " ", 1),
|
|
1860
1868
|
e.table?.header?.group !== void 0 ? (f(), b("span", {
|
|
1861
1869
|
key: 1,
|
|
@@ -1870,7 +1878,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1870
1878
|
)
|
|
1871
1879
|
}, [
|
|
1872
1880
|
e.table.header.group ? (f(), g(Ye, { key: 0 })) : (f(), g(et, { key: 1 }))
|
|
1873
|
-
], 8,
|
|
1881
|
+
], 8, lt)) : v("", !0)
|
|
1874
1882
|
])
|
|
1875
1883
|
])
|
|
1876
1884
|
]),
|
|
@@ -1923,7 +1931,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1923
1931
|
ref_for: !0
|
|
1924
1932
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), {
|
|
1925
1933
|
default: y(() => [
|
|
1926
|
-
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(
|
|
1934
|
+
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(K), {
|
|
1927
1935
|
key: d.value,
|
|
1928
1936
|
label: d.label,
|
|
1929
1937
|
value: d.value
|
|
@@ -1966,7 +1974,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1966
1974
|
ref_for: !0
|
|
1967
1975
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
1968
1976
|
default: y(() => [
|
|
1969
|
-
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(
|
|
1977
|
+
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(K), {
|
|
1970
1978
|
key: d.value,
|
|
1971
1979
|
label: d.label,
|
|
1972
1980
|
value: d.value
|
|
@@ -1999,7 +2007,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1999
2007
|
loading: e.options?.switch?.loadingMap?.[r[s.option.table?.rowKey]]?.loading,
|
|
2000
2008
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2001
2009
|
ref_for: !0
|
|
2002
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), b("span",
|
|
2010
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), b("span", nt, O(r[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
2003
2011
|
], 64)) : (f(), b("span", {
|
|
2004
2012
|
key: 2,
|
|
2005
2013
|
style: pe({
|
|
@@ -2008,7 +2016,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2008
2016
|
class: I({ "table-text-click": e.table?.click?.callback }),
|
|
2009
2017
|
onClick: (d) => e.table?.click?.callback?.(r),
|
|
2010
2018
|
innerHTML: e.table?.format ? e.table?.format(r) : r[e.key]
|
|
2011
|
-
}, null, 14,
|
|
2019
|
+
}, null, 14, it))
|
|
2012
2020
|
])
|
|
2013
2021
|
], 64))
|
|
2014
2022
|
], 64))
|
|
@@ -2019,29 +2027,29 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2019
2027
|
], 64))), 128);
|
|
2020
2028
|
};
|
|
2021
2029
|
}
|
|
2022
|
-
}),
|
|
2030
|
+
}), st = {
|
|
2023
2031
|
class: "row form-item-content",
|
|
2024
2032
|
style: { width: "100%" }
|
|
2025
|
-
},
|
|
2033
|
+
}, dt = { class: "col column form-item-content-item" }, ut = { class: "col" }, ft = ["innerHTML"], pt = /* @__PURE__ */ G({
|
|
2026
2034
|
__name: "formColumn",
|
|
2027
2035
|
props: {
|
|
2028
2036
|
conf: {},
|
|
2029
2037
|
item: {}
|
|
2030
2038
|
},
|
|
2031
|
-
setup(
|
|
2032
|
-
return (a, p) => (f(), g(o(
|
|
2039
|
+
setup(n) {
|
|
2040
|
+
return (a, p) => (f(), g(o(te), {
|
|
2033
2041
|
label: a.item.item.text?.form?.label ?? a.item.item.label,
|
|
2034
2042
|
prop: a.item.item.key,
|
|
2035
2043
|
"label-width": a.item.item.text?.form?.label == "" ? 0 : a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
|
|
2036
2044
|
}, {
|
|
2037
2045
|
default: y(() => [
|
|
2038
|
-
|
|
2046
|
+
D("div", st, [
|
|
2039
2047
|
C(a.$slots, "form-" + a.item.item.key + "-start", {
|
|
2040
2048
|
row: a.conf.update.form,
|
|
2041
2049
|
item: a.item.item
|
|
2042
2050
|
}),
|
|
2043
|
-
|
|
2044
|
-
|
|
2051
|
+
D("div", dt, [
|
|
2052
|
+
D("div", ut, [
|
|
2045
2053
|
C(a.$slots, "form-" + a.item.item.key, {
|
|
2046
2054
|
row: a.conf.update.form,
|
|
2047
2055
|
item: a.item.item
|
|
@@ -2075,7 +2083,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2075
2083
|
style: { width: "100%" }
|
|
2076
2084
|
}), {
|
|
2077
2085
|
default: y(() => [
|
|
2078
|
-
(f(!0), b($, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(
|
|
2086
|
+
(f(!0), b($, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(K), {
|
|
2079
2087
|
key: s.value,
|
|
2080
2088
|
label: s.label,
|
|
2081
2089
|
value: s.value
|
|
@@ -2139,7 +2147,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2139
2147
|
key: 0,
|
|
2140
2148
|
class: "form-tip-text",
|
|
2141
2149
|
innerHTML: typeof a.item.item.form?.tipText == "function" ? a.item.item.form?.tipText(a.conf.update.form, a.conf.update.type) : a.item.item.form?.tipText
|
|
2142
|
-
}, null, 8,
|
|
2150
|
+
}, null, 8, ft)) : v("", !0)
|
|
2143
2151
|
])
|
|
2144
2152
|
]),
|
|
2145
2153
|
C(a.$slots, "form-" + a.item.item.key + "-end", {
|
|
@@ -2151,43 +2159,43 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2151
2159
|
_: 3
|
|
2152
2160
|
}, 8, ["label", "prop", "label-width"]));
|
|
2153
2161
|
}
|
|
2154
|
-
}),
|
|
2162
|
+
}), ct = {}, mt = {
|
|
2155
2163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2156
2164
|
viewBox: "64 64 896 896"
|
|
2157
2165
|
};
|
|
2158
|
-
function
|
|
2159
|
-
return f(), b("svg",
|
|
2160
|
-
|
|
2166
|
+
function ht(n, a) {
|
|
2167
|
+
return f(), b("svg", mt, a[0] || (a[0] = [
|
|
2168
|
+
D("path", {
|
|
2161
2169
|
fill: "currentColor",
|
|
2162
2170
|
d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
|
|
2163
2171
|
}, null, -1)
|
|
2164
2172
|
]));
|
|
2165
2173
|
}
|
|
2166
|
-
const
|
|
2174
|
+
const gt = /* @__PURE__ */ X(ct, [["render", ht]]), yt = {}, bt = {
|
|
2167
2175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2168
2176
|
viewBox: "64 64 896 896"
|
|
2169
2177
|
};
|
|
2170
|
-
function
|
|
2171
|
-
return f(), b("svg",
|
|
2172
|
-
|
|
2178
|
+
function wt(n, a) {
|
|
2179
|
+
return f(), b("svg", bt, a[0] || (a[0] = [
|
|
2180
|
+
D("path", {
|
|
2173
2181
|
fill: "currentColor",
|
|
2174
2182
|
d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
|
|
2175
2183
|
}, null, -1)
|
|
2176
2184
|
]));
|
|
2177
2185
|
}
|
|
2178
|
-
const
|
|
2186
|
+
const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
2179
2187
|
key: 0,
|
|
2180
2188
|
class: "relative curd-search fit-width"
|
|
2181
|
-
},
|
|
2189
|
+
}, Ct = { class: "mb-10 flex justify-between items-center fit-width" }, Vt = {
|
|
2182
2190
|
class: "flex items-center",
|
|
2183
2191
|
style: { gap: "10px" }
|
|
2184
|
-
},
|
|
2192
|
+
}, zt = { key: 0 }, $t = { key: 1 }, Ut = { key: 2 }, Dt = { class: "export-btn" }, Et = {
|
|
2185
2193
|
key: 1,
|
|
2186
2194
|
class: "export-btn"
|
|
2187
|
-
},
|
|
2195
|
+
}, Ot = {
|
|
2188
2196
|
class: "flex items-center table-tools-right",
|
|
2189
2197
|
style: { gap: "10px" }
|
|
2190
|
-
},
|
|
2198
|
+
}, St = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, Mt = { class: "dialog-footer" }, At = { class: "dialog-footer" }, Ft = /* @__PURE__ */ G({
|
|
2191
2199
|
__name: "index",
|
|
2192
2200
|
props: {
|
|
2193
2201
|
/**
|
|
@@ -2197,148 +2205,148 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2197
2205
|
default: {}
|
|
2198
2206
|
}
|
|
2199
2207
|
},
|
|
2200
|
-
setup(
|
|
2201
|
-
const p = M.EDialog, s =
|
|
2208
|
+
setup(n, { expose: a }) {
|
|
2209
|
+
const p = M.EDialog, s = n, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } = Le(s);
|
|
2202
2210
|
return a({
|
|
2203
2211
|
conf: t
|
|
2204
2212
|
}), (m, c) => {
|
|
2205
2213
|
const u = _("el-tooltip"), k = ve("loading");
|
|
2206
2214
|
return f(), b("div", {
|
|
2207
|
-
class: I(["relative cc1-form-box", [
|
|
2215
|
+
class: I(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2208
2216
|
}, [
|
|
2209
|
-
|
|
2210
|
-
class: I(["row", [
|
|
2217
|
+
D("div", {
|
|
2218
|
+
class: I(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2211
2219
|
style: { overflow: "hidden" }
|
|
2212
2220
|
}, [
|
|
2213
2221
|
C(m.$slots, "box-left"),
|
|
2214
|
-
|
|
2215
|
-
class: I(["column fit-width no-wrap", [
|
|
2222
|
+
D("div", {
|
|
2223
|
+
class: I(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
|
|
2216
2224
|
}, [
|
|
2217
|
-
|
|
2218
|
-
|
|
2225
|
+
n.option.search?.show !== !1 ? (f(), b("div", vt, [
|
|
2226
|
+
E(o(W), {
|
|
2219
2227
|
model: o(t).search.form,
|
|
2220
2228
|
inline: "",
|
|
2221
|
-
size:
|
|
2229
|
+
size: n.option.size?.search
|
|
2222
2230
|
}, {
|
|
2223
2231
|
default: y(() => [
|
|
2224
2232
|
C(m.$slots, "search-start", {
|
|
2225
2233
|
row: o(t).search.form
|
|
2226
2234
|
}),
|
|
2227
|
-
(f(!0), b($, null, F(o(t).search.column.list, (
|
|
2228
|
-
key:
|
|
2235
|
+
(f(!0), b($, null, F(o(t).search.column.list, (i) => (f(), b($, {
|
|
2236
|
+
key: i.key
|
|
2229
2237
|
}, [
|
|
2230
|
-
C(m.$slots, "search-" +
|
|
2238
|
+
C(m.$slots, "search-" + i.key + "-start", {
|
|
2231
2239
|
row: o(t).search.form
|
|
2232
2240
|
}),
|
|
2233
|
-
(typeof
|
|
2241
|
+
(typeof i.show?.search == "function" ? i.show?.search(o(t).search.form) : i.show?.search) ? (f(), g(o(te), {
|
|
2234
2242
|
key: 0,
|
|
2235
|
-
label:
|
|
2243
|
+
label: i.text?.search?.label ?? i.label
|
|
2236
2244
|
}, {
|
|
2237
2245
|
default: y(() => [
|
|
2238
|
-
C(m.$slots, "search-" +
|
|
2246
|
+
C(m.$slots, "search-" + i.key + "-left", {
|
|
2239
2247
|
row: o(t).search.form
|
|
2240
2248
|
}),
|
|
2241
|
-
C(m.$slots, "search-" +
|
|
2249
|
+
C(m.$slots, "search-" + i.key, {
|
|
2242
2250
|
row: o(t).search.form
|
|
2243
2251
|
}, () => [
|
|
2244
|
-
o(L).customComponent[
|
|
2252
|
+
o(L).customComponent[i.type ?? ""]?.search ? (f(), g(Q(o(L).customComponent[i.type ?? ""]?.search), V({
|
|
2245
2253
|
key: 0,
|
|
2246
|
-
modelValue: o(t).search.form[
|
|
2247
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2254
|
+
modelValue: o(t).search.form[i.key],
|
|
2255
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2248
2256
|
ref_for: !0
|
|
2249
|
-
},
|
|
2257
|
+
}, i.options?.search?.[i.type ?? ""], z(i.options?.search?.[i.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type === "input" ? (f(), g(o(x), V({
|
|
2250
2258
|
key: 1,
|
|
2251
|
-
modelValue: o(t).search.form[
|
|
2252
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2253
|
-
placeholder: o(t).search.getPlaceholder(
|
|
2259
|
+
modelValue: o(t).search.form[i.key],
|
|
2260
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2261
|
+
placeholder: o(t).search.getPlaceholder(i),
|
|
2254
2262
|
clearable: "",
|
|
2255
|
-
disabled:
|
|
2263
|
+
disabled: i.disabled?.search,
|
|
2256
2264
|
ref_for: !0
|
|
2257
|
-
},
|
|
2265
|
+
}, i.options?.search?.input || i.options?.input, z(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (f(), g(o(q), V({
|
|
2258
2266
|
key: 2,
|
|
2259
|
-
modelValue: o(t).search.form[
|
|
2260
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2261
|
-
placeholder: o(t).search.getPlaceholder(
|
|
2267
|
+
modelValue: o(t).search.form[i.key],
|
|
2268
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2269
|
+
placeholder: o(t).search.getPlaceholder(i, o(w).tCurd("placeholderSelect")),
|
|
2262
2270
|
clearable: "",
|
|
2263
|
-
disabled:
|
|
2271
|
+
disabled: i.disabled?.search,
|
|
2264
2272
|
ref_for: !0
|
|
2265
|
-
},
|
|
2273
|
+
}, i.options?.search?.switch || i.options?.switch, z(i.options?.search?.switch?.on || i.options?.switch?.on || {})), {
|
|
2266
2274
|
default: y(() => [
|
|
2267
|
-
(f(), g(o(
|
|
2268
|
-
key:
|
|
2269
|
-
label:
|
|
2270
|
-
value:
|
|
2275
|
+
(f(), g(o(K), {
|
|
2276
|
+
key: i.options?.switch?.activeValue,
|
|
2277
|
+
label: i.options?.switch?.activeText,
|
|
2278
|
+
value: i.options?.switch?.activeValue
|
|
2271
2279
|
}, null, 8, ["label", "value"])),
|
|
2272
|
-
(f(), g(o(
|
|
2273
|
-
key:
|
|
2274
|
-
label:
|
|
2275
|
-
value:
|
|
2280
|
+
(f(), g(o(K), {
|
|
2281
|
+
key: i.options?.switch?.inactiveValue,
|
|
2282
|
+
label: i.options?.switch?.inactiveText,
|
|
2283
|
+
value: i.options?.switch?.inactiveValue
|
|
2276
2284
|
}, null, 8, ["label", "value"]))
|
|
2277
2285
|
]),
|
|
2278
2286
|
_: 2
|
|
2279
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2287
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (f(), g(o(q), V({
|
|
2280
2288
|
key: 3,
|
|
2281
|
-
modelValue: o(t).search.form[
|
|
2282
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2283
|
-
placeholder: o(t).search.getPlaceholder(
|
|
2289
|
+
modelValue: o(t).search.form[i.key],
|
|
2290
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2291
|
+
placeholder: o(t).search.getPlaceholder(i, o(w).tCurd("placeholderSelect")),
|
|
2284
2292
|
clearable: "",
|
|
2285
|
-
disabled:
|
|
2293
|
+
disabled: i.disabled?.search,
|
|
2286
2294
|
ref_for: !0
|
|
2287
|
-
},
|
|
2295
|
+
}, i.options?.search?.select || i.options?.select, z(i.options?.search?.select?.on || i.options?.select?.on || {})), {
|
|
2288
2296
|
default: y(() => [
|
|
2289
|
-
(f(!0), b($, null, F(
|
|
2297
|
+
(f(!0), b($, null, F(i.options?.select?.data, (h) => (f(), g(o(K), {
|
|
2290
2298
|
key: h.value,
|
|
2291
2299
|
label: h.label,
|
|
2292
2300
|
value: h.value
|
|
2293
2301
|
}, null, 8, ["label", "value"]))), 128))
|
|
2294
2302
|
]),
|
|
2295
2303
|
_: 2
|
|
2296
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2304
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "radio" ? (f(), g(o(le), V({
|
|
2297
2305
|
key: 4,
|
|
2298
|
-
modelValue: o(t).search.form[
|
|
2299
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2300
|
-
disabled:
|
|
2306
|
+
modelValue: o(t).search.form[i.key],
|
|
2307
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2308
|
+
disabled: i.disabled?.search,
|
|
2301
2309
|
ref_for: !0
|
|
2302
|
-
},
|
|
2310
|
+
}, i.options?.search?.radio || i.options?.radio, z(i.options?.search?.radio?.on || i.options?.radio?.on || {})), {
|
|
2303
2311
|
default: y(() => [
|
|
2304
|
-
(f(!0), b($, null, F(
|
|
2312
|
+
(f(!0), b($, null, F(i.options?.radio?.data, (h) => (f(), g(o(ne), {
|
|
2305
2313
|
key: h.value,
|
|
2306
2314
|
label: h.label,
|
|
2307
2315
|
value: h.value
|
|
2308
2316
|
}, null, 8, ["label", "value"]))), 128))
|
|
2309
2317
|
]),
|
|
2310
2318
|
_: 2
|
|
2311
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
2319
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type === "datetime" ? (f(), g(o(ie), V({
|
|
2312
2320
|
key: 5,
|
|
2313
|
-
modelValue: o(t).search.form[
|
|
2314
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2315
|
-
disabled:
|
|
2321
|
+
modelValue: o(t).search.form[i.key],
|
|
2322
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2323
|
+
disabled: i.disabled?.search,
|
|
2316
2324
|
ref_for: !0
|
|
2317
|
-
},
|
|
2325
|
+
}, i.options?.search?.datetime || i.options?.datetime, z(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && o(L).customComponent[i.type] ? (f(), g(Q(o(L).customComponent[i.type]), V({
|
|
2318
2326
|
key: 6,
|
|
2319
|
-
modelValue: o(t).search.form[
|
|
2320
|
-
"onUpdate:modelValue": (h) => o(t).search.form[
|
|
2327
|
+
modelValue: o(t).search.form[i.key],
|
|
2328
|
+
"onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
|
|
2321
2329
|
ref_for: !0
|
|
2322
|
-
},
|
|
2323
|
-
disabled:
|
|
2330
|
+
}, i.options?.search?.[i.type] || i.options?.[i.type], z(i.options?.search?.[i.type]?.on || i.options?.[i.type]?.on || {}), {
|
|
2331
|
+
disabled: i.disabled?.search
|
|
2324
2332
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2325
2333
|
]),
|
|
2326
|
-
C(m.$slots, "search-" +
|
|
2334
|
+
C(m.$slots, "search-" + i.key + "-right", {
|
|
2327
2335
|
row: o(t).search.form
|
|
2328
2336
|
})
|
|
2329
2337
|
]),
|
|
2330
2338
|
_: 2
|
|
2331
2339
|
}, 1032, ["label"])) : v("", !0),
|
|
2332
|
-
C(m.$slots, "search-" +
|
|
2340
|
+
C(m.$slots, "search-" + i.key + "-end", {
|
|
2333
2341
|
row: o(t).search.form
|
|
2334
2342
|
})
|
|
2335
2343
|
], 64))), 128)),
|
|
2336
2344
|
C(m.$slots, "search-center", {
|
|
2337
2345
|
row: o(t).search.form
|
|
2338
2346
|
}),
|
|
2339
|
-
|
|
2347
|
+
n.option.tools?.search || n.option.tools?.reset ? (f(), g(o(te), { key: 0 }, {
|
|
2340
2348
|
default: y(() => [
|
|
2341
|
-
|
|
2349
|
+
n.option.tools?.search ? (f(), g(o(j), {
|
|
2342
2350
|
key: 0,
|
|
2343
2351
|
type: "primary",
|
|
2344
2352
|
onClick: o(t).search.submit
|
|
@@ -2348,7 +2356,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2348
2356
|
]),
|
|
2349
2357
|
_: 1
|
|
2350
2358
|
}, 8, ["onClick"])) : v("", !0),
|
|
2351
|
-
|
|
2359
|
+
n.option.tools?.reset ? (f(), g(o(j), {
|
|
2352
2360
|
key: 1,
|
|
2353
2361
|
onClick: o(t).search.reset
|
|
2354
2362
|
}, {
|
|
@@ -2367,13 +2375,13 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2367
2375
|
_: 3
|
|
2368
2376
|
}, 8, ["model", "size"])
|
|
2369
2377
|
])) : v("", !0),
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
o(l)(
|
|
2373
|
-
|
|
2378
|
+
D("div", Ct, [
|
|
2379
|
+
D("div", Vt, [
|
|
2380
|
+
o(l)(n.option.tools?.add) ? (f(), b("div", zt, [
|
|
2381
|
+
E(o(j), {
|
|
2374
2382
|
type: "primary",
|
|
2375
|
-
onClick: c[0] || (c[0] = (
|
|
2376
|
-
size:
|
|
2383
|
+
onClick: c[0] || (c[0] = (i) => o(t).update.open(o(p).Add)),
|
|
2384
|
+
size: n.option.size?.search
|
|
2377
2385
|
}, {
|
|
2378
2386
|
default: y(() => [
|
|
2379
2387
|
U(O(o(w).tCurd("add")), 1)
|
|
@@ -2381,11 +2389,11 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2381
2389
|
_: 1
|
|
2382
2390
|
}, 8, ["size"])
|
|
2383
2391
|
])) : v("", !0),
|
|
2384
|
-
|
|
2385
|
-
|
|
2392
|
+
n.option.table?.selectable && o(l)(n.option.tools?.delete) ? (f(), b("div", $t, [
|
|
2393
|
+
E(o(j), {
|
|
2386
2394
|
type: "danger",
|
|
2387
|
-
onClick: c[1] || (c[1] = (
|
|
2388
|
-
size:
|
|
2395
|
+
onClick: c[1] || (c[1] = (i) => o(t).remove.open(o(t).table.selection.list)),
|
|
2396
|
+
size: n.option.size?.search
|
|
2389
2397
|
}, {
|
|
2390
2398
|
default: y(() => [
|
|
2391
2399
|
U(O(o(w).tCurd("delete")), 1)
|
|
@@ -2393,11 +2401,11 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2393
2401
|
_: 1
|
|
2394
2402
|
}, 8, ["size"])
|
|
2395
2403
|
])) : v("", !0),
|
|
2396
|
-
|
|
2397
|
-
|
|
2404
|
+
n.option.tools?.expand ? (f(), b("div", Ut, [
|
|
2405
|
+
E(o(j), {
|
|
2398
2406
|
type: "warning",
|
|
2399
|
-
onClick: c[2] || (c[2] = (
|
|
2400
|
-
size:
|
|
2407
|
+
onClick: c[2] || (c[2] = (i) => o(t).table.expand.all()),
|
|
2408
|
+
size: n.option.size?.search
|
|
2401
2409
|
}, {
|
|
2402
2410
|
default: y(() => [
|
|
2403
2411
|
U(O(o(w).tCurd("expandCollapse")), 1)
|
|
@@ -2405,17 +2413,17 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2405
2413
|
_: 1
|
|
2406
2414
|
}, 8, ["size"])
|
|
2407
2415
|
])) : v("", !0),
|
|
2408
|
-
|
|
2409
|
-
|
|
2416
|
+
n.option.tools?.export?.show ? (f(), b($, { key: 3 }, [
|
|
2417
|
+
n.option.tools?.export?.dropdown?.show ? (f(), g(o(he), {
|
|
2410
2418
|
key: 0,
|
|
2411
2419
|
onCommand: o(t).export.click
|
|
2412
2420
|
}, {
|
|
2413
2421
|
dropdown: y(() => [
|
|
2414
|
-
|
|
2415
|
-
size:
|
|
2422
|
+
E(o(ge), {
|
|
2423
|
+
size: n.option.size?.search
|
|
2416
2424
|
}, {
|
|
2417
2425
|
default: y(() => [
|
|
2418
|
-
|
|
2426
|
+
n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || o(l)(n.option.tools?.delete)) ? (f(), g(o(oe), {
|
|
2419
2427
|
key: 0,
|
|
2420
2428
|
command: "select"
|
|
2421
2429
|
}, {
|
|
@@ -2424,7 +2432,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2424
2432
|
]),
|
|
2425
2433
|
_: 1
|
|
2426
2434
|
})) : v("", !0),
|
|
2427
|
-
|
|
2435
|
+
n.option.tools?.export?.dropdown?.page ? (f(), g(o(oe), {
|
|
2428
2436
|
key: 1,
|
|
2429
2437
|
command: "page"
|
|
2430
2438
|
}, {
|
|
@@ -2433,7 +2441,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2433
2441
|
]),
|
|
2434
2442
|
_: 1
|
|
2435
2443
|
})) : v("", !0),
|
|
2436
|
-
|
|
2444
|
+
n.option.tools?.export?.dropdown?.all ? (f(), g(o(oe), {
|
|
2437
2445
|
key: 2,
|
|
2438
2446
|
command: "all"
|
|
2439
2447
|
}, {
|
|
@@ -2447,11 +2455,11 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2447
2455
|
}, 8, ["size"])
|
|
2448
2456
|
]),
|
|
2449
2457
|
default: y(() => [
|
|
2450
|
-
|
|
2451
|
-
|
|
2458
|
+
D("div", Dt, [
|
|
2459
|
+
E(o(j), {
|
|
2452
2460
|
type: "warning",
|
|
2453
2461
|
loading: o(t).export.loading,
|
|
2454
|
-
size:
|
|
2462
|
+
size: n.option.size?.search
|
|
2455
2463
|
}, {
|
|
2456
2464
|
default: y(() => [
|
|
2457
2465
|
U(O(o(w).tCurd("export")), 1)
|
|
@@ -2461,12 +2469,12 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2461
2469
|
])
|
|
2462
2470
|
]),
|
|
2463
2471
|
_: 1
|
|
2464
|
-
}, 8, ["onCommand"])) : (f(), b("div",
|
|
2465
|
-
|
|
2472
|
+
}, 8, ["onCommand"])) : (f(), b("div", Et, [
|
|
2473
|
+
E(o(j), {
|
|
2466
2474
|
type: "warning",
|
|
2467
2475
|
loading: o(t).export.loading,
|
|
2468
|
-
size:
|
|
2469
|
-
onClick: c[3] || (c[3] = (
|
|
2476
|
+
size: n.option.size?.search,
|
|
2477
|
+
onClick: c[3] || (c[3] = (i) => o(t).export.run.start("all"))
|
|
2470
2478
|
}, {
|
|
2471
2479
|
default: y(() => [
|
|
2472
2480
|
U(O(o(w).tCurd("export")), 1)
|
|
@@ -2477,68 +2485,68 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2477
2485
|
], 64)) : v("", !0),
|
|
2478
2486
|
C(m.$slots, "tools-left")
|
|
2479
2487
|
]),
|
|
2480
|
-
|
|
2488
|
+
D("div", Ot, [
|
|
2481
2489
|
C(m.$slots, "tools-right"),
|
|
2482
2490
|
o(t).page.showTools ? (f(), g(o(de), V({
|
|
2483
2491
|
key: 0,
|
|
2484
2492
|
"current-page": o(t).page.num,
|
|
2485
|
-
"onUpdate:currentPage": c[4] || (c[4] = (
|
|
2493
|
+
"onUpdate:currentPage": c[4] || (c[4] = (i) => o(t).page.num = i),
|
|
2486
2494
|
"page-size": o(t).page.size,
|
|
2487
|
-
"onUpdate:pageSize": c[5] || (c[5] = (
|
|
2495
|
+
"onUpdate:pageSize": c[5] || (c[5] = (i) => o(t).page.size = i),
|
|
2488
2496
|
background: "",
|
|
2489
2497
|
"page-sizes": o(t).page.sizeList,
|
|
2490
2498
|
"pager-count": o(t).page.pagerCount,
|
|
2491
2499
|
layout: o(t).page.layout,
|
|
2492
2500
|
total: o(t).page.total,
|
|
2493
|
-
size:
|
|
2501
|
+
size: n.option.size?.table,
|
|
2494
2502
|
onSizeChange: o(t).table.getList,
|
|
2495
2503
|
onCurrentChange: o(t).table.getList
|
|
2496
|
-
},
|
|
2497
|
-
|
|
2504
|
+
}, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
|
|
2505
|
+
n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (f(), g(u, {
|
|
2498
2506
|
key: 1,
|
|
2499
2507
|
effect: "dark",
|
|
2500
2508
|
content: o(t).table.header.group.expand ? o(w).tCurd("mergeColumn") : o(w).tCurd("expandColumn"),
|
|
2501
2509
|
placement: "top"
|
|
2502
2510
|
}, {
|
|
2503
2511
|
default: y(() => [
|
|
2504
|
-
|
|
2505
|
-
class: I(["refresh-btn", [
|
|
2512
|
+
D("div", {
|
|
2513
|
+
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2506
2514
|
onClick: c[6] || (c[6] = //@ts-ignore
|
|
2507
|
-
(...
|
|
2515
|
+
(...i) => o(t).table.header.group.toggleExpandAll && o(t).table.header.group.toggleExpandAll(...i))
|
|
2508
2516
|
}, [
|
|
2509
|
-
o(t).table.header.group.expand ? (f(), g(
|
|
2517
|
+
o(t).table.header.group.expand ? (f(), g(gt, { key: 0 })) : (f(), g(kt, { key: 1 }))
|
|
2510
2518
|
], 2)
|
|
2511
2519
|
]),
|
|
2512
2520
|
_: 1
|
|
2513
2521
|
}, 8, ["content"])) : v("", !0),
|
|
2514
|
-
|
|
2522
|
+
n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), b("div", {
|
|
2515
2523
|
key: 2,
|
|
2516
|
-
class: I(["refresh-btn", [
|
|
2524
|
+
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2517
2525
|
onClick: c[7] || (c[7] = //@ts-ignore
|
|
2518
|
-
(...
|
|
2526
|
+
(...i) => o(t).table.getList && o(t).table.getList(...i))
|
|
2519
2527
|
}, [
|
|
2520
|
-
|
|
2528
|
+
E(Ke)
|
|
2521
2529
|
], 2)) : v("", !0)
|
|
2522
2530
|
])
|
|
2523
2531
|
]),
|
|
2524
|
-
|
|
2525
|
-
class: I(["fit-width relative form-box", [
|
|
2532
|
+
D("div", {
|
|
2533
|
+
class: I(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : "", n.option.table?.editMode ? "edit-mode" : ""]])
|
|
2526
2534
|
}, [
|
|
2527
|
-
|
|
2528
|
-
class: I(["column form-box-content", [
|
|
2535
|
+
D("div", {
|
|
2536
|
+
class: I(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2529
2537
|
}, [
|
|
2530
2538
|
Ce((f(), g(o(ye), V({
|
|
2531
2539
|
ref_key: "tableRef",
|
|
2532
2540
|
ref: d,
|
|
2533
2541
|
data: o(t).table.data,
|
|
2534
|
-
border:
|
|
2542
|
+
border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
|
|
2535
2543
|
onSelectionChange: o(t).table.selection.change,
|
|
2536
2544
|
onSortChange: o(t).table.sort.change,
|
|
2537
2545
|
"expand-row-keys": o(t).table.expand.rowKeys,
|
|
2538
2546
|
onExpandChange: o(t).table.expand.change
|
|
2539
|
-
},
|
|
2547
|
+
}, n.option.table, z(n.option.table?.on || {})), {
|
|
2540
2548
|
default: y(() => [
|
|
2541
|
-
(typeof
|
|
2549
|
+
(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) || o(l)(n.option.tools?.delete) || n.option.tools?.export?.show && n.option.tools?.export?.select ? (f(), g(o(ee), V({
|
|
2542
2550
|
key: 0,
|
|
2543
2551
|
type: "selection",
|
|
2544
2552
|
width: "40",
|
|
@@ -2546,39 +2554,49 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2546
2554
|
fixed: "left",
|
|
2547
2555
|
"show-overflow-tooltip": !1,
|
|
2548
2556
|
className: "cc1-form-selectable-column"
|
|
2549
|
-
}, typeof
|
|
2550
|
-
|
|
2557
|
+
}, typeof n.option.table?.selectable == "object" ? n.option.table?.selectable : {}, z(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
|
|
2558
|
+
(typeof n.option.table?.index == "object" ? n.option.table?.index?.show : n.option.table?.index) ? (f(), g(o(ee), V({
|
|
2559
|
+
key: 1,
|
|
2560
|
+
type: "index",
|
|
2561
|
+
fixed: "left",
|
|
2562
|
+
width: "40",
|
|
2563
|
+
align: "center",
|
|
2564
|
+
label: "#",
|
|
2565
|
+
"show-overflow-tooltip": !1,
|
|
2566
|
+
className: "cc1-form-index-column"
|
|
2567
|
+
}, typeof n.option.table?.index == "object" ? n.option.table?.index : {}, z(typeof n.option.table?.index == "object" ? n.option.table?.index?.on || {} : {})), null, 16)) : v("", !0),
|
|
2568
|
+
E(rt, {
|
|
2551
2569
|
conf: o(t),
|
|
2552
2570
|
columnList: o(t).table.column.list,
|
|
2553
|
-
option:
|
|
2571
|
+
option: n.option
|
|
2554
2572
|
}, J({ _: 2 }, [
|
|
2555
|
-
F(m.$slots, (
|
|
2573
|
+
F(m.$slots, (i, h) => ({
|
|
2556
2574
|
name: h,
|
|
2557
2575
|
fn: y((S) => [
|
|
2558
2576
|
C(m.$slots, h, Ve(ze(S || {})))
|
|
2559
2577
|
])
|
|
2560
2578
|
}))
|
|
2561
2579
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2562
|
-
o(l)(
|
|
2563
|
-
key:
|
|
2580
|
+
o(l)(n.option.table?.add) || o(l)(n.option.table?.update) || o(l)(n.option.table?.delete) || o(l)(n.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), g(o(ee), V({
|
|
2581
|
+
key: 2,
|
|
2564
2582
|
width: "auto",
|
|
2565
2583
|
"max-width": "200",
|
|
2566
2584
|
align: "center",
|
|
2567
2585
|
fixed: "right"
|
|
2568
|
-
},
|
|
2586
|
+
}, n.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2569
2587
|
header: y(() => [
|
|
2570
2588
|
C(m.$slots, "table-header-op", {}, () => [
|
|
2571
2589
|
U(O(o(w).tCurd("operation")), 1)
|
|
2572
2590
|
])
|
|
2573
2591
|
]),
|
|
2574
|
-
default: y(({ row:
|
|
2575
|
-
|
|
2576
|
-
size:
|
|
2592
|
+
default: y(({ row: i }) => [
|
|
2593
|
+
E(o(W), {
|
|
2594
|
+
size: n.option.size?.table
|
|
2577
2595
|
}, {
|
|
2578
2596
|
default: y(() => [
|
|
2579
|
-
C(m.$slots, "table-op-left", { row:
|
|
2580
|
-
o(t).update.type === o(p).Update &&
|
|
2581
|
-
|
|
2597
|
+
C(m.$slots, "table-op-left", { row: i }),
|
|
2598
|
+
o(t).update.type === o(p).Update && n.option.table?.inlineEdit && o(t).update.form[s.option.table?.rowKey] === i[s.option.table?.rowKey] ? (f(), b($, { key: 0 }, [
|
|
2599
|
+
E(o(j), {
|
|
2582
2600
|
link: "",
|
|
2583
2601
|
type: "info",
|
|
2584
2602
|
onClick: o(t).update.close
|
|
@@ -2588,7 +2606,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2588
2606
|
]),
|
|
2589
2607
|
_: 1
|
|
2590
2608
|
}, 8, ["onClick"]),
|
|
2591
|
-
|
|
2609
|
+
E(o(j), {
|
|
2592
2610
|
link: "",
|
|
2593
2611
|
type: "primary",
|
|
2594
2612
|
onClick: o(t).update.submit,
|
|
@@ -2599,53 +2617,53 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2599
2617
|
]),
|
|
2600
2618
|
_: 1
|
|
2601
2619
|
}, 8, ["onClick", "loading"]),
|
|
2602
|
-
C(m.$slots, "table-op-edit-right", { row:
|
|
2620
|
+
C(m.$slots, "table-op-edit-right", { row: i })
|
|
2603
2621
|
], 64)) : (f(), b($, { key: 1 }, [
|
|
2604
|
-
o(l)(
|
|
2622
|
+
o(l)(n.option.table?.add, i) ? (f(), g(o(j), {
|
|
2605
2623
|
key: 0,
|
|
2606
2624
|
link: "",
|
|
2607
2625
|
type: "primary",
|
|
2608
|
-
onClick: (h) => o(t).update.open(o(p).Add,
|
|
2626
|
+
onClick: (h) => o(t).update.open(o(p).Add, i)
|
|
2609
2627
|
}, {
|
|
2610
2628
|
default: y(() => [
|
|
2611
2629
|
U(O(o(w).tCurd("add")), 1)
|
|
2612
2630
|
]),
|
|
2613
2631
|
_: 2
|
|
2614
2632
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2615
|
-
o(l)(
|
|
2633
|
+
o(l)(n.option.table?.view, i) ? (f(), g(o(j), {
|
|
2616
2634
|
key: 1,
|
|
2617
2635
|
link: "",
|
|
2618
2636
|
type: "primary",
|
|
2619
|
-
onClick: (h) => o(t).update.open(o(p).View,
|
|
2637
|
+
onClick: (h) => o(t).update.open(o(p).View, i)
|
|
2620
2638
|
}, {
|
|
2621
2639
|
default: y(() => [
|
|
2622
2640
|
U(O(o(w).tCurd("view")), 1)
|
|
2623
2641
|
]),
|
|
2624
2642
|
_: 2
|
|
2625
2643
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2626
|
-
o(l)(
|
|
2644
|
+
o(l)(n.option.table?.update, i) ? (f(), g(o(j), {
|
|
2627
2645
|
key: 2,
|
|
2628
2646
|
link: "",
|
|
2629
2647
|
type: "warning",
|
|
2630
|
-
onClick: (h) => o(t).update.open(o(p).Update,
|
|
2648
|
+
onClick: (h) => o(t).update.open(o(p).Update, i)
|
|
2631
2649
|
}, {
|
|
2632
2650
|
default: y(() => [
|
|
2633
2651
|
U(O(o(w).tCurd("edit")), 1)
|
|
2634
2652
|
]),
|
|
2635
2653
|
_: 2
|
|
2636
2654
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2637
|
-
o(l)(
|
|
2655
|
+
o(l)(n.option.table?.delete, i) ? (f(), g(o(j), {
|
|
2638
2656
|
key: 3,
|
|
2639
2657
|
link: "",
|
|
2640
2658
|
type: "danger",
|
|
2641
|
-
onClick: (h) => o(t).remove.open([
|
|
2659
|
+
onClick: (h) => o(t).remove.open([i])
|
|
2642
2660
|
}, {
|
|
2643
2661
|
default: y(() => [
|
|
2644
2662
|
U(O(o(w).tCurd("delete")), 1)
|
|
2645
2663
|
]),
|
|
2646
2664
|
_: 2
|
|
2647
2665
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2648
|
-
C(m.$slots, "table-op-right", { row:
|
|
2666
|
+
C(m.$slots, "table-op-right", { row: i })
|
|
2649
2667
|
], 64))
|
|
2650
2668
|
]),
|
|
2651
2669
|
_: 2
|
|
@@ -2660,39 +2678,39 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2660
2678
|
])
|
|
2661
2679
|
], 2)
|
|
2662
2680
|
], 2),
|
|
2663
|
-
|
|
2664
|
-
(
|
|
2681
|
+
D("div", St, [
|
|
2682
|
+
(n.option.page?.show === void 0 || n.option.page?.show) && !o(t).page.showTools ? (f(), g(o(de), V({
|
|
2665
2683
|
key: 0,
|
|
2666
2684
|
"current-page": o(t).page.num,
|
|
2667
|
-
"onUpdate:currentPage": c[8] || (c[8] = (
|
|
2685
|
+
"onUpdate:currentPage": c[8] || (c[8] = (i) => o(t).page.num = i),
|
|
2668
2686
|
"page-size": o(t).page.size,
|
|
2669
|
-
"onUpdate:pageSize": c[9] || (c[9] = (
|
|
2687
|
+
"onUpdate:pageSize": c[9] || (c[9] = (i) => o(t).page.size = i),
|
|
2670
2688
|
background: "",
|
|
2671
2689
|
"page-sizes": o(t).page.sizeList,
|
|
2672
2690
|
"pager-count": o(t).page.pagerCount,
|
|
2673
2691
|
layout: o(t).page.layout,
|
|
2674
2692
|
total: o(t).page.total,
|
|
2675
|
-
size:
|
|
2693
|
+
size: n.option.size?.table,
|
|
2676
2694
|
onSizeChange: o(t).table.getList,
|
|
2677
2695
|
onCurrentChange: o(t).table.getList
|
|
2678
|
-
},
|
|
2696
|
+
}, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2679
2697
|
])
|
|
2680
2698
|
], 2),
|
|
2681
2699
|
C(m.$slots, "box-right")
|
|
2682
2700
|
], 2),
|
|
2683
|
-
|
|
2701
|
+
E(o(ae), V({
|
|
2684
2702
|
modelValue: o(t).update.show,
|
|
2685
|
-
"onUpdate:modelValue": c[10] || (c[10] = (
|
|
2703
|
+
"onUpdate:modelValue": c[10] || (c[10] = (i) => o(t).update.show = i),
|
|
2686
2704
|
title: o(t).update.title,
|
|
2687
2705
|
"before-close": o(t).update.close
|
|
2688
|
-
},
|
|
2706
|
+
}, n.option.dialog), {
|
|
2689
2707
|
footer: y(() => [
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
size:
|
|
2708
|
+
D("span", Mt, [
|
|
2709
|
+
E(o(W), {
|
|
2710
|
+
size: n.option.size?.form
|
|
2693
2711
|
}, {
|
|
2694
2712
|
default: y(() => [
|
|
2695
|
-
|
|
2713
|
+
E(o(j), {
|
|
2696
2714
|
onClick: o(t).update.close
|
|
2697
2715
|
}, {
|
|
2698
2716
|
default: y(() => [
|
|
@@ -2700,7 +2718,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2700
2718
|
]),
|
|
2701
2719
|
_: 1
|
|
2702
2720
|
}, 8, ["onClick"]),
|
|
2703
|
-
o(t).update.type !== o(p).View ? (f(), g(o(
|
|
2721
|
+
o(t).update.type !== o(p).View ? (f(), g(o(j), {
|
|
2704
2722
|
key: 0,
|
|
2705
2723
|
type: "primary",
|
|
2706
2724
|
onClick: o(t).update.submit,
|
|
@@ -2717,45 +2735,45 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2717
2735
|
])
|
|
2718
2736
|
]),
|
|
2719
2737
|
default: y(() => [
|
|
2720
|
-
|
|
2738
|
+
E(o(W), {
|
|
2721
2739
|
ref_key: "ruleFormRef",
|
|
2722
2740
|
ref: r,
|
|
2723
2741
|
model: o(t).update.form,
|
|
2724
2742
|
rules: o(t).update.rules,
|
|
2725
|
-
size:
|
|
2743
|
+
size: n.option.size?.form,
|
|
2726
2744
|
class: "update-dialog-form"
|
|
2727
2745
|
}, {
|
|
2728
2746
|
default: y(() => [
|
|
2729
|
-
o(t).update.showContent ? (f(!0), b($, { key: 0 }, F(o(t).update.formColumn, (
|
|
2747
|
+
o(t).update.showContent ? (f(!0), b($, { key: 0 }, F(o(t).update.formColumn, (i) => (f(), b($, null, [
|
|
2730
2748
|
o(l)(
|
|
2731
2749
|
(() => {
|
|
2732
|
-
const h = [], S = (
|
|
2733
|
-
|
|
2750
|
+
const h = [], S = (B) => {
|
|
2751
|
+
B?.item?.children ? S(B.item.children) : h.push(...B.map((T) => T.item?.show?.form));
|
|
2734
2752
|
};
|
|
2735
|
-
return S(
|
|
2753
|
+
return S(i), h;
|
|
2736
2754
|
})(),
|
|
2737
2755
|
o(t).update.form,
|
|
2738
2756
|
o(t).update.type
|
|
2739
2757
|
) ? (f(), b("div", {
|
|
2740
2758
|
key: 0,
|
|
2741
2759
|
class: I(["row curd-row", {
|
|
2742
|
-
stripe:
|
|
2760
|
+
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
2743
2761
|
}])
|
|
2744
2762
|
}, [
|
|
2745
2763
|
C(m.$slots, "form-start", {
|
|
2746
2764
|
row: o(t).update.form
|
|
2747
2765
|
}),
|
|
2748
|
-
(f(!0), b($, null, F(
|
|
2766
|
+
(f(!0), b($, null, F(i, (h) => (f(), b($, null, [
|
|
2749
2767
|
o(l)(h.item.show?.form, o(t).update.form, o(t).update.type) ? (f(), b("div", {
|
|
2750
2768
|
key: 0,
|
|
2751
|
-
class: I([h.item.form.span > 0 ? `col-${o(t).getColumnSpan(h,
|
|
2769
|
+
class: I([h.item.form.span > 0 ? `col-${o(t).getColumnSpan(h, i)}` : "col", `form-item-col-${h.item.key}`])
|
|
2752
2770
|
}, [
|
|
2753
|
-
(f(!0), b($, null, F(h.item.children ? h.children : [h], (S) => (f(), g(
|
|
2771
|
+
(f(!0), b($, null, F(h.item.children ? h.children : [h], (S) => (f(), g(pt, {
|
|
2754
2772
|
key: S.item.key,
|
|
2755
2773
|
conf: o(t),
|
|
2756
2774
|
item: S
|
|
2757
2775
|
}, J({ _: 2 }, [
|
|
2758
|
-
F(m.$slots, (
|
|
2776
|
+
F(m.$slots, (B, T) => ({
|
|
2759
2777
|
name: T,
|
|
2760
2778
|
fn: y((R) => [
|
|
2761
2779
|
C(m.$slots, T, V({ ref_for: !0 }, R || {}))
|
|
@@ -2775,19 +2793,19 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2775
2793
|
]),
|
|
2776
2794
|
_: 3
|
|
2777
2795
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2778
|
-
|
|
2796
|
+
E(o(ae), {
|
|
2779
2797
|
modelValue: o(t).remove.show,
|
|
2780
|
-
"onUpdate:modelValue": c[11] || (c[11] = (
|
|
2798
|
+
"onUpdate:modelValue": c[11] || (c[11] = (i) => o(t).remove.show = i),
|
|
2781
2799
|
title: o(t).remove.title,
|
|
2782
2800
|
"close-on-click-modal": !1
|
|
2783
2801
|
}, {
|
|
2784
2802
|
footer: y(() => [
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
size:
|
|
2803
|
+
D("span", At, [
|
|
2804
|
+
E(o(W), {
|
|
2805
|
+
size: n.option.size?.form
|
|
2788
2806
|
}, {
|
|
2789
2807
|
default: y(() => [
|
|
2790
|
-
|
|
2808
|
+
E(o(j), {
|
|
2791
2809
|
onClick: o(t).remove.close
|
|
2792
2810
|
}, {
|
|
2793
2811
|
default: y(() => [
|
|
@@ -2795,7 +2813,7 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2795
2813
|
]),
|
|
2796
2814
|
_: 1
|
|
2797
2815
|
}, 8, ["onClick"]),
|
|
2798
|
-
|
|
2816
|
+
E(o(j), {
|
|
2799
2817
|
type: "danger",
|
|
2800
2818
|
onClick: o(t).remove.submit,
|
|
2801
2819
|
loading: o(t).remove.loading
|
|
@@ -2811,20 +2829,20 @@ const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
|
2811
2829
|
])
|
|
2812
2830
|
]),
|
|
2813
2831
|
default: y(() => [
|
|
2814
|
-
|
|
2832
|
+
D("div", null, O(o(w).tCurd("confirmDeleteMessage", o(t).remove.items.length)), 1)
|
|
2815
2833
|
]),
|
|
2816
2834
|
_: 1
|
|
2817
2835
|
}, 8, ["modelValue", "title"]),
|
|
2818
|
-
|
|
2836
|
+
E(Re, {
|
|
2819
2837
|
ref_key: "switchConfirmRef",
|
|
2820
2838
|
ref: e,
|
|
2821
|
-
size:
|
|
2839
|
+
size: n.option.size?.form
|
|
2822
2840
|
}, null, 8, ["size"])
|
|
2823
2841
|
], 2);
|
|
2824
2842
|
};
|
|
2825
2843
|
}
|
|
2826
2844
|
});
|
|
2827
|
-
class
|
|
2845
|
+
class Rt {
|
|
2828
2846
|
/**
|
|
2829
2847
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2830
2848
|
*
|
|
@@ -2869,26 +2887,26 @@ class jt {
|
|
|
2869
2887
|
}, document.body.appendChild(l), l.click();
|
|
2870
2888
|
});
|
|
2871
2889
|
}
|
|
2872
|
-
const
|
|
2873
|
-
if (
|
|
2890
|
+
const Tt = (n, a) => {
|
|
2891
|
+
if (n.component("TCurd", Ft), n.component("TFormList", se), n.component("TColumn", Te), a?.customComponent) {
|
|
2874
2892
|
L.customComponent = a.customComponent;
|
|
2875
2893
|
for (const p in a.customComponent)
|
|
2876
|
-
|
|
2894
|
+
n.component(p, a.customComponent[p]);
|
|
2877
2895
|
}
|
|
2878
|
-
},
|
|
2879
|
-
install:
|
|
2896
|
+
}, It = {
|
|
2897
|
+
install: Tt
|
|
2880
2898
|
};
|
|
2881
2899
|
export {
|
|
2882
|
-
|
|
2883
|
-
|
|
2900
|
+
H as ArrUtil,
|
|
2901
|
+
je as ExcelUtil,
|
|
2884
2902
|
Te as TColumn,
|
|
2885
|
-
|
|
2886
|
-
|
|
2903
|
+
Ft as TCurd,
|
|
2904
|
+
Rt as TFile,
|
|
2887
2905
|
L as TForm,
|
|
2888
2906
|
A as TFormConfig,
|
|
2889
2907
|
w as TFormI18n,
|
|
2890
2908
|
se as TFormList,
|
|
2891
2909
|
M as TSys,
|
|
2892
|
-
|
|
2893
|
-
|
|
2910
|
+
It as default,
|
|
2911
|
+
Tt as install
|
|
2894
2912
|
};
|