cc1-form 1.2.18 → 1.2.20
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 +427 -428
- package/dist/cc1-form.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElMessage as Ve, ElLoading as ze, ElForm as Q, ElFormItem as ae, ElInput as _, ElSwitch as Z, ElSelect as X, ElOption as W, ElRadioGroup as
|
|
1
|
+
import { ElMessage as Ve, ElLoading as ze, ElForm as Q, ElFormItem as ae, ElInput as _, ElSwitch as Z, ElSelect as X, ElOption as W, ElRadioGroup as re, ElRadio as se, ElTreeSelect as he, ElDatePicker as de, ElDialog as ie, ElButton as T, ElTableColumn as oe, ElDropdown as $e, ElDropdownMenu as De, ElDropdownItem as ne, ElPagination as pe, ElTable as Ee } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as N, reactive as
|
|
3
|
+
import { defineComponent as N, reactive as ue, onMounted as ye, resolveComponent as ee, createElementBlock as b, createCommentVNode as v, openBlock as d, renderSlot as V, createVNode as O, withCtx as g, createTextVNode as E, Fragment as D, renderList as A, createBlock as y, normalizeClass as I, normalizeStyle as ge, ref as J, unref as a, createElementVNode as U, mergeProps as C, toHandlers as z, resolveDynamicComponent as q, watch as ce, toDisplayString as S, computed as be, getCurrentInstance as Oe, createSlots as G, withModifiers as Ue, resolveDirective as Se, withDirectives as Me, normalizeProps as Fe, guardReactiveProps as Ae } from "vue";
|
|
4
4
|
class M {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
@@ -519,7 +519,7 @@ class F {
|
|
|
519
519
|
F.config = ObjectUtil.deepMerge(F.config, o);
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
class
|
|
522
|
+
class L {
|
|
523
523
|
/**
|
|
524
524
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
525
525
|
*
|
|
@@ -559,7 +559,7 @@ class j {
|
|
|
559
559
|
)
|
|
560
560
|
*/
|
|
561
561
|
static setOptionsData = (o, f, n) => {
|
|
562
|
-
const l =
|
|
562
|
+
const l = L.findOptions(o, f);
|
|
563
563
|
l && (l.data = n);
|
|
564
564
|
};
|
|
565
565
|
static form = {
|
|
@@ -573,12 +573,12 @@ class j {
|
|
|
573
573
|
*/
|
|
574
574
|
parentId: (o, f, n, l) => {
|
|
575
575
|
const t = F.config.table.rowKey;
|
|
576
|
-
o ? f.type === M.EDialog.Add ? (f.form.parentId = o[t], f.form.sort = o.children.length + 1) : f.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (f.form.parentId = "0", f.form.sort = n.length + 1),
|
|
576
|
+
o ? f.type === M.EDialog.Add ? (f.form.parentId = o[t], f.form.sort = o.children.length + 1) : f.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (f.form.parentId = "0", f.form.sort = n.length + 1), L.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: n }]);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const Te = {
|
|
582
582
|
search: "搜索",
|
|
583
583
|
add: "新增",
|
|
584
584
|
edit: "编辑",
|
|
@@ -631,7 +631,7 @@ class w {
|
|
|
631
631
|
return this.t(this.curd[o], ...f);
|
|
632
632
|
}
|
|
633
633
|
/** curd表单 */
|
|
634
|
-
static curd =
|
|
634
|
+
static curd = Te;
|
|
635
635
|
}
|
|
636
636
|
class P {
|
|
637
637
|
/**
|
|
@@ -698,14 +698,14 @@ class P {
|
|
|
698
698
|
}), n;
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
const
|
|
701
|
+
const je = {
|
|
702
702
|
key: 0,
|
|
703
703
|
class: "column curd-form-com-list",
|
|
704
704
|
style: { width: "100%", gap: "10px" }
|
|
705
|
-
},
|
|
705
|
+
}, Le = { key: 0 }, Be = {
|
|
706
706
|
class: "row items-center",
|
|
707
707
|
style: { gap: "10px", width: "100%" }
|
|
708
|
-
},
|
|
708
|
+
}, Re = { key: 1 }, fe = /* @__PURE__ */ N({
|
|
709
709
|
__name: "list",
|
|
710
710
|
props: {
|
|
711
711
|
row: {
|
|
@@ -744,7 +744,7 @@ const Le = {
|
|
|
744
744
|
},
|
|
745
745
|
emits: ["change"],
|
|
746
746
|
setup(i, { emit: o }) {
|
|
747
|
-
const f = i, n =
|
|
747
|
+
const f = i, n = ue({
|
|
748
748
|
show: !1,
|
|
749
749
|
add: (t, e, r) => {
|
|
750
750
|
P.add(t, e, r, () => {
|
|
@@ -757,15 +757,15 @@ const Le = {
|
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
});
|
|
760
|
-
|
|
760
|
+
ye(() => {
|
|
761
761
|
P.setId(f.field, f.row, f.itemFields), n.show = !0;
|
|
762
762
|
});
|
|
763
763
|
const l = o;
|
|
764
764
|
return (t, e) => {
|
|
765
765
|
const r = ee("el-button"), s = ee("el-input");
|
|
766
|
-
return n.show ? (d(), b("div",
|
|
767
|
-
|
|
768
|
-
i.addBottom ? v("", !0) : (d(), b("div",
|
|
766
|
+
return n.show ? (d(), b("div", je, [
|
|
767
|
+
V(t.$slots, "list-start", { row: i.row }),
|
|
768
|
+
i.addBottom ? v("", !0) : (d(), b("div", Le, [
|
|
769
769
|
O(r, {
|
|
770
770
|
link: "",
|
|
771
771
|
type: "primary",
|
|
@@ -777,27 +777,27 @@ const Le = {
|
|
|
777
777
|
_: 1
|
|
778
778
|
})
|
|
779
779
|
])),
|
|
780
|
-
(d(!0), b(D, null, A(i.row[i.field], (m) => (d(), b("div",
|
|
781
|
-
|
|
780
|
+
(d(!0), b(D, null, A(i.row[i.field], (m) => (d(), b("div", Be, [
|
|
781
|
+
V(t.$slots, "item-start", {
|
|
782
782
|
item: m,
|
|
783
783
|
row: i.row
|
|
784
784
|
}),
|
|
785
|
-
(d(!0), b(D, null, A(i.itemFields, (
|
|
786
|
-
modelValue: m[
|
|
787
|
-
"onUpdate:modelValue": (u) => m[
|
|
788
|
-
style:
|
|
785
|
+
(d(!0), b(D, null, A(i.itemFields, (p) => (d(), y(s, {
|
|
786
|
+
modelValue: m[p.value],
|
|
787
|
+
"onUpdate:modelValue": (u) => m[p.value] = u,
|
|
788
|
+
style: ge({ width: i.inputWidth }),
|
|
789
789
|
class: I(i.inputClass),
|
|
790
|
-
placeholder:
|
|
790
|
+
placeholder: p[i.label] || p[i.value],
|
|
791
791
|
onChange: e[1] || (e[1] = (u) => l("change"))
|
|
792
792
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
793
|
-
|
|
793
|
+
V(t.$slots, "item-end", {
|
|
794
794
|
item: m,
|
|
795
795
|
row: i.row
|
|
796
796
|
}),
|
|
797
797
|
O(r, {
|
|
798
798
|
link: "",
|
|
799
799
|
type: "danger",
|
|
800
|
-
onClick: (
|
|
800
|
+
onClick: (p) => n.remove(i.field, i.row, m)
|
|
801
801
|
}, {
|
|
802
802
|
default: g(() => e[4] || (e[4] = [
|
|
803
803
|
E("删除")
|
|
@@ -805,7 +805,7 @@ const Le = {
|
|
|
805
805
|
_: 2
|
|
806
806
|
}, 1032, ["onClick"])
|
|
807
807
|
]))), 256)),
|
|
808
|
-
i.addBottom ? (d(), b("div",
|
|
808
|
+
i.addBottom ? (d(), b("div", Re, [
|
|
809
809
|
O(r, {
|
|
810
810
|
link: "",
|
|
811
811
|
type: "primary",
|
|
@@ -817,14 +817,14 @@ const Le = {
|
|
|
817
817
|
_: 1
|
|
818
818
|
})
|
|
819
819
|
])) : v("", !0),
|
|
820
|
-
|
|
820
|
+
V(t.$slots, "list-end", { row: i.row })
|
|
821
821
|
])) : v("", !0);
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
}),
|
|
824
|
+
}), Ie = {
|
|
825
825
|
class: "row form-item-content",
|
|
826
826
|
style: { width: "100%" }
|
|
827
|
-
},
|
|
827
|
+
}, He = { class: "col" }, Ke = { class: "col" }, Pe = ["innerHTML"], Ne = /* @__PURE__ */ N({
|
|
828
828
|
__name: "column",
|
|
829
829
|
props: {
|
|
830
830
|
/**
|
|
@@ -841,7 +841,7 @@ const Le = {
|
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
843
|
setup(i, { expose: o }) {
|
|
844
|
-
const f = M.isFun, n = M.EDialog, l = J(), t = i, e =
|
|
844
|
+
const f = M.isFun, n = M.EDialog, l = J(), t = i, e = ue({
|
|
845
845
|
rules: {},
|
|
846
846
|
show: !0,
|
|
847
847
|
form: {},
|
|
@@ -853,59 +853,59 @@ const Le = {
|
|
|
853
853
|
getOn: (r) => r.options?.[e.type === n.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
854
854
|
getColumnSpan: (r, s) => {
|
|
855
855
|
if (r.item.form?.spanCol) {
|
|
856
|
-
const m = t.option.form?.maxSpan || 12,
|
|
857
|
-
return (r.item.form?.span ||
|
|
856
|
+
const m = t.option.form?.maxSpan || 12, p = t.option.form?.defaultSpan || m / 2, k = s.filter((h) => !M.isFun(h.item.show?.form, e.form, e.type)).reduce((h, c) => h + (c.item.form?.span || p), 0);
|
|
857
|
+
return (r.item.form?.span || p) + k;
|
|
858
858
|
}
|
|
859
859
|
return r.item.form?.span;
|
|
860
860
|
},
|
|
861
861
|
initColumnForm: () => {
|
|
862
862
|
const r = t.option;
|
|
863
863
|
e.formColumn = [], e.rules = {}, e.formDefault = {};
|
|
864
|
-
const s = [], m = t.option.form?.maxSpan || 12,
|
|
864
|
+
const s = [], m = t.option.form?.maxSpan || 12, p = t.option.form?.defaultSpan || m / 2;
|
|
865
865
|
let u = [];
|
|
866
|
-
const k = (
|
|
867
|
-
if (
|
|
868
|
-
|
|
869
|
-
k(
|
|
866
|
+
const k = (c) => {
|
|
867
|
+
if (c.children) {
|
|
868
|
+
c.children.forEach(($) => {
|
|
869
|
+
k($);
|
|
870
870
|
});
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
|
-
if (e.formDefault[
|
|
874
|
-
|
|
875
|
-
const
|
|
876
|
-
if (u.push({ item:
|
|
877
|
-
const
|
|
873
|
+
if (e.formDefault[c.key] = c.value, c.isForm && (typeof c.show?.form != "boolean" || c.show?.form)) {
|
|
874
|
+
c.form = c.form || { span: p }, c.form.span = c.form.span ?? p;
|
|
875
|
+
const $ = c.form.span, B = u.reduce((j, H) => j + H.span, $), R = u.length;
|
|
876
|
+
if (u.push({ item: c, span: $ }), (R === 1 && u[0].span === 0 || B >= m || $ === 0 && R > 1) && (s.push(u), u = []), c.rules) {
|
|
877
|
+
const j = {
|
|
878
878
|
input: w.tCurd("placeholderInput"),
|
|
879
879
|
select: w.tCurd("placeholderSelect")
|
|
880
|
-
}, H = (
|
|
881
|
-
e.rules[
|
|
880
|
+
}, H = (j[c.type] || j.input) + c.label;
|
|
881
|
+
e.rules[c.key] = typeof c.rules == "boolean" ? [
|
|
882
882
|
{
|
|
883
883
|
required: !0,
|
|
884
884
|
message: H,
|
|
885
885
|
trigger: "blur"
|
|
886
886
|
}
|
|
887
|
-
] :
|
|
887
|
+
] : c.rules;
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
},
|
|
891
|
-
|
|
890
|
+
}, h = (c, $) => {
|
|
891
|
+
c.isForm = $, Array.isArray(c.children) && c.children.forEach((B) => h(B, $));
|
|
892
892
|
};
|
|
893
|
-
r.column.forEach((
|
|
894
|
-
|
|
893
|
+
r.column.forEach((c) => {
|
|
894
|
+
h(c, !0), k(c);
|
|
895
895
|
}), u.length > 0 && s.push(u), e.formColumn = s, e.form = JSONUtil.cp(e.formDefault);
|
|
896
896
|
}
|
|
897
897
|
});
|
|
898
898
|
return e.initColumnForm(), o({
|
|
899
899
|
ref: l,
|
|
900
900
|
conf: e
|
|
901
|
-
}), (r, s) => (d(),
|
|
901
|
+
}), (r, s) => (d(), y(a(Q), {
|
|
902
902
|
ref_key: "ruleFormRef",
|
|
903
903
|
ref: l,
|
|
904
904
|
model: e.form,
|
|
905
905
|
rules: e.rules
|
|
906
906
|
}, {
|
|
907
907
|
default: g(() => [
|
|
908
|
-
e.show ? (d(!0), b(D, { key: 0 }, A(e.formColumn, (m,
|
|
908
|
+
e.show ? (d(!0), b(D, { key: 0 }, A(e.formColumn, (m, p) => (d(), b(D, { key: p }, [
|
|
909
909
|
a(f)(
|
|
910
910
|
m.map((u) => u.item?.show?.form),
|
|
911
911
|
e.form,
|
|
@@ -916,7 +916,7 @@ const Le = {
|
|
|
916
916
|
stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
|
|
917
917
|
}])
|
|
918
918
|
}, [
|
|
919
|
-
|
|
919
|
+
V(r.$slots, "form-start", {
|
|
920
920
|
row: e.form
|
|
921
921
|
}),
|
|
922
922
|
(d(!0), b(D, null, A(m, (u) => (d(), b(D, {
|
|
@@ -932,103 +932,103 @@ const Le = {
|
|
|
932
932
|
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || i.option.form?.labelWidth || "100px"
|
|
933
933
|
}, {
|
|
934
934
|
default: g(() => [
|
|
935
|
-
U("div",
|
|
936
|
-
|
|
935
|
+
U("div", Ie, [
|
|
936
|
+
V(r.$slots, "form-" + u.item.key + "-start", {
|
|
937
937
|
row: e.form,
|
|
938
938
|
item: u.item
|
|
939
939
|
}),
|
|
940
|
-
U("div",
|
|
941
|
-
U("div",
|
|
942
|
-
|
|
940
|
+
U("div", He, [
|
|
941
|
+
U("div", Ke, [
|
|
942
|
+
V(r.$slots, "form-" + u.item.key, {
|
|
943
943
|
row: e.form,
|
|
944
944
|
item: u.item
|
|
945
945
|
}, () => [
|
|
946
|
-
u.item.type === "input" ? (d(),
|
|
946
|
+
u.item.type === "input" ? (d(), y(a(_), C({
|
|
947
947
|
key: 0,
|
|
948
948
|
modelValue: e.form[u.item.key],
|
|
949
949
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
950
950
|
ref_for: !0
|
|
951
|
-
}, e.getBind(u.item),
|
|
951
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
952
952
|
disabled: e.getDisabled(u.item)
|
|
953
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (d(),
|
|
953
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (d(), y(a(Z), C({
|
|
954
954
|
key: 1,
|
|
955
955
|
modelValue: e.form[u.item.key],
|
|
956
956
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
957
957
|
ref_for: !0
|
|
958
|
-
}, e.getBind(u.item),
|
|
958
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
959
959
|
disabled: e.getDisabled(u.item)
|
|
960
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (d(),
|
|
960
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (d(), y(a(X), C({
|
|
961
961
|
key: 2,
|
|
962
962
|
modelValue: e.form[u.item.key],
|
|
963
963
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
964
964
|
ref_for: !0
|
|
965
|
-
}, e.getBind(u.item),
|
|
965
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
966
966
|
disabled: e.getDisabled(u.item),
|
|
967
967
|
style: { width: "100%" }
|
|
968
968
|
}), {
|
|
969
969
|
default: g(() => [
|
|
970
|
-
(d(!0), b(D, null, A(u.item.options?.select?.data, (k) => (d(),
|
|
970
|
+
(d(!0), b(D, null, A(u.item.options?.select?.data, (k) => (d(), y(a(W), {
|
|
971
971
|
key: k.value,
|
|
972
972
|
label: k.label,
|
|
973
973
|
value: k.value
|
|
974
974
|
}, null, 8, ["label", "value"]))), 128))
|
|
975
975
|
]),
|
|
976
976
|
_: 2
|
|
977
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (d(),
|
|
977
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (d(), y(a(re), C({
|
|
978
978
|
key: 3,
|
|
979
979
|
modelValue: e.form[u.item.key],
|
|
980
980
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
981
981
|
ref_for: !0
|
|
982
|
-
}, e.getBind(u.item),
|
|
982
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
983
983
|
disabled: e.getDisabled(u.item),
|
|
984
984
|
style: { width: "100%" }
|
|
985
985
|
}), {
|
|
986
986
|
default: g(() => [
|
|
987
|
-
(d(!0), b(D, null, A(u.item.options?.radio?.data, (k) => (d(),
|
|
987
|
+
(d(!0), b(D, null, A(u.item.options?.radio?.data, (k) => (d(), y(a(se), {
|
|
988
988
|
key: k.value,
|
|
989
989
|
label: k.label,
|
|
990
990
|
value: k.value
|
|
991
991
|
}, null, 8, ["label", "value"]))), 128))
|
|
992
992
|
]),
|
|
993
993
|
_: 2
|
|
994
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (d(),
|
|
994
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (d(), y(fe, C({
|
|
995
995
|
key: 4,
|
|
996
996
|
row: e.form,
|
|
997
997
|
field: u.item.key,
|
|
998
998
|
ref_for: !0
|
|
999
|
-
}, e.getBind(u.item),
|
|
999
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1000
1000
|
disabled: e.getDisabled(u.item),
|
|
1001
1001
|
style: { width: "100%" }
|
|
1002
|
-
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (d(),
|
|
1002
|
+
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (d(), y(a(he), C({
|
|
1003
1003
|
key: 5,
|
|
1004
1004
|
modelValue: e.form[u.item.key],
|
|
1005
1005
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
1006
1006
|
ref_for: !0
|
|
1007
|
-
}, e.getBind(u.item),
|
|
1007
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1008
1008
|
disabled: e.getDisabled(u.item),
|
|
1009
1009
|
style: { width: "100%" }
|
|
1010
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (d(),
|
|
1010
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (d(), y(a(de), C({
|
|
1011
1011
|
key: 6,
|
|
1012
1012
|
modelValue: e.form[u.item.key],
|
|
1013
1013
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
1014
1014
|
ref_for: !0
|
|
1015
|
-
}, e.getBind(u.item),
|
|
1015
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1016
1016
|
disabled: e.getDisabled(u.item)
|
|
1017
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (a(
|
|
1017
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (a(L).customComponent[u.item.type] || a(L).customComponent[u.item.type]?.form) ? (d(), y(q(a(L).customComponent[u.item.type]?.form || a(L).customComponent[u.item.type]), C({
|
|
1018
1018
|
key: 7,
|
|
1019
1019
|
modelValue: e.form[u.item.key],
|
|
1020
1020
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
1021
1021
|
ref_for: !0
|
|
1022
|
-
}, e.getBind(u.item),
|
|
1022
|
+
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1023
1023
|
disabled: e.getDisabled(u.item)
|
|
1024
1024
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
1025
1025
|
]),
|
|
1026
|
-
|
|
1026
|
+
V(r.$slots, "form-" + u.item.key + "-right", {
|
|
1027
1027
|
row: e.form,
|
|
1028
1028
|
item: u.item
|
|
1029
1029
|
})
|
|
1030
1030
|
]),
|
|
1031
|
-
|
|
1031
|
+
V(r.$slots, "form-" + u.item.key + "-tip", {
|
|
1032
1032
|
row: e.form,
|
|
1033
1033
|
item: u.item
|
|
1034
1034
|
}, () => [
|
|
@@ -1036,10 +1036,10 @@ const Le = {
|
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
class: "form-tip-text",
|
|
1038
1038
|
innerHTML: typeof u.item.form?.tipText == "function" ? u.item.form?.tipText(e.form, e.type) : u.item.form?.tipText
|
|
1039
|
-
}, null, 8,
|
|
1039
|
+
}, null, 8, Pe)) : v("", !0)
|
|
1040
1040
|
])
|
|
1041
1041
|
]),
|
|
1042
|
-
|
|
1042
|
+
V(r.$slots, "form-" + u.item.key + "-end", {
|
|
1043
1043
|
row: e.form,
|
|
1044
1044
|
item: u.item
|
|
1045
1045
|
})
|
|
@@ -1049,7 +1049,7 @@ const Le = {
|
|
|
1049
1049
|
}, 1032, ["label", "prop", "label-width"])
|
|
1050
1050
|
], 2)) : v("", !0)
|
|
1051
1051
|
], 64))), 128)),
|
|
1052
|
-
|
|
1052
|
+
V(r.$slots, "form-end", {
|
|
1053
1053
|
row: e.form
|
|
1054
1054
|
})
|
|
1055
1055
|
], 2)) : v("", !0)
|
|
@@ -1059,7 +1059,7 @@ const Le = {
|
|
|
1059
1059
|
}, 8, ["model", "rules"]));
|
|
1060
1060
|
}
|
|
1061
1061
|
});
|
|
1062
|
-
class
|
|
1062
|
+
class We {
|
|
1063
1063
|
/**
|
|
1064
1064
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
1065
1065
|
*
|
|
@@ -1071,8 +1071,8 @@ class Je {
|
|
|
1071
1071
|
if (!o || o.length === 0) return;
|
|
1072
1072
|
const l = await M.loadModule("xlsx"), t = o.map((s) => {
|
|
1073
1073
|
const m = {};
|
|
1074
|
-
return f.forEach((
|
|
1075
|
-
m[
|
|
1074
|
+
return f.forEach((p) => {
|
|
1075
|
+
m[p.label] = s[p.key];
|
|
1076
1076
|
}), m;
|
|
1077
1077
|
}), e = l.utils.json_to_sheet(t), r = l.utils.book_new();
|
|
1078
1078
|
l.utils.book_append_sheet(r, e, "Sheet1"), n ? typeof n == "function" && (n = n()) : n = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(r, `${n}.xlsx`);
|
|
@@ -1102,8 +1102,8 @@ class x {
|
|
|
1102
1102
|
});
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
|
-
const K = M.EDialog,
|
|
1106
|
-
const o = J(), f = J(), n = J(), l =
|
|
1105
|
+
const K = M.EDialog, Je = (i) => {
|
|
1106
|
+
const o = J(), f = J(), n = J(), l = ue({
|
|
1107
1107
|
option: i.option,
|
|
1108
1108
|
/** 查询区域相关配置对象 */
|
|
1109
1109
|
search: {
|
|
@@ -1233,29 +1233,31 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1233
1233
|
/** 获取数据列表接口实现 */
|
|
1234
1234
|
getList: async () => {
|
|
1235
1235
|
l.table.loading = !0;
|
|
1236
|
-
const t = i.option.api.list;
|
|
1236
|
+
const t = i.option.api.list, e = JSONUtil.cp(l.table.selection.list);
|
|
1237
1237
|
try {
|
|
1238
1238
|
await l.initApiData("init");
|
|
1239
|
-
let
|
|
1239
|
+
let r = {};
|
|
1240
1240
|
if (l.table.sort.prop) {
|
|
1241
|
-
const { props:
|
|
1242
|
-
|
|
1243
|
-
[
|
|
1244
|
-
[
|
|
1241
|
+
const { props: $, order: B } = F.config.table.sort;
|
|
1242
|
+
r = {
|
|
1243
|
+
[$.field]: l.table.sort.prop,
|
|
1244
|
+
[B.field]: l.table.sort.order
|
|
1245
1245
|
};
|
|
1246
1246
|
}
|
|
1247
|
-
const
|
|
1247
|
+
const s = await t({
|
|
1248
1248
|
...l.page.getQuery(),
|
|
1249
|
-
...
|
|
1250
|
-
}),
|
|
1251
|
-
let
|
|
1252
|
-
const
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
}),
|
|
1256
|
-
l.table.data = i.option.data ? await i.option.data(
|
|
1257
|
-
|
|
1258
|
-
|
|
1249
|
+
...r
|
|
1250
|
+
}), m = F.config.field.result, p = s.data || { [m.list]: s };
|
|
1251
|
+
let u = (Array.isArray(p[m.list]), p[m.list]);
|
|
1252
|
+
const k = l.update.formColumn.flat(), c = ObjectUtil.deepMerge({ data: u }, {}).data.map(($) => (Object.keys($).forEach((R) => {
|
|
1253
|
+
const j = k.find((H) => H.item.key === R);
|
|
1254
|
+
j && ["select", "radio"].includes(j.item.type) && (j.item.table.format || (j.item.table.format = (H) => j.item.options[j.item.type].data?.find((le) => le.value == H[R])?.label || H[R]));
|
|
1255
|
+
}), $));
|
|
1256
|
+
l.table.data = i.option.data ? await i.option.data(c, u) : c, l.page.total = p[m.total] || 0, setTimeout(() => {
|
|
1257
|
+
l.table.selection.setList(e);
|
|
1258
|
+
}, 20);
|
|
1259
|
+
} catch (r) {
|
|
1260
|
+
console.error(r);
|
|
1259
1261
|
} finally {
|
|
1260
1262
|
l.table.loading = !1;
|
|
1261
1263
|
}
|
|
@@ -1273,32 +1275,31 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1273
1275
|
l.table.selection.list = [];
|
|
1274
1276
|
const r = n.value;
|
|
1275
1277
|
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1276
|
-
const s = i.option.table?.rowKey, m =
|
|
1277
|
-
const
|
|
1278
|
-
for (const
|
|
1278
|
+
const s = i.option.table?.rowKey, m = (p) => {
|
|
1279
|
+
const u = (k) => {
|
|
1280
|
+
for (const h of k) {
|
|
1279
1281
|
if (s != null && s !== "") {
|
|
1280
|
-
if (
|
|
1281
|
-
} else if (
|
|
1282
|
-
return
|
|
1283
|
-
if (Array.isArray(
|
|
1284
|
-
const
|
|
1285
|
-
if (
|
|
1282
|
+
if (h[s] === p[s]) return h;
|
|
1283
|
+
} else if (h === p)
|
|
1284
|
+
return h;
|
|
1285
|
+
if (Array.isArray(h.children) && h.children.length) {
|
|
1286
|
+
const c = u(h.children);
|
|
1287
|
+
if (c !== void 0) return c;
|
|
1286
1288
|
}
|
|
1287
1289
|
}
|
|
1288
1290
|
};
|
|
1289
|
-
return
|
|
1291
|
+
return u(l.table.data);
|
|
1290
1292
|
};
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1293
|
+
t.forEach((p) => {
|
|
1294
|
+
const u = m(p);
|
|
1295
|
+
if (u)
|
|
1294
1296
|
if (e) {
|
|
1295
|
-
const
|
|
1296
|
-
r.toggleRowSelection(
|
|
1297
|
+
const k = () => {
|
|
1298
|
+
r.toggleRowSelection(u, !0, !1);
|
|
1297
1299
|
};
|
|
1298
|
-
e(
|
|
1300
|
+
e(p) !== !1 && k();
|
|
1299
1301
|
} else
|
|
1300
|
-
r.toggleRowSelection(
|
|
1301
|
-
});
|
|
1302
|
+
r.toggleRowSelection(u, !0, !1);
|
|
1302
1303
|
});
|
|
1303
1304
|
}
|
|
1304
1305
|
},
|
|
@@ -1334,7 +1335,7 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1334
1335
|
},
|
|
1335
1336
|
{}
|
|
1336
1337
|
), m = i.option.tools?.export || {};
|
|
1337
|
-
m.before && m.before(s),
|
|
1338
|
+
m.before && m.before(s), We.exportToExcel(s.data, s.columns, m.fileName);
|
|
1338
1339
|
},
|
|
1339
1340
|
/** 获取当前选中项进行导出 */
|
|
1340
1341
|
select: async () => {
|
|
@@ -1433,11 +1434,11 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1433
1434
|
/** 获取表单组件事件属性 */
|
|
1434
1435
|
getOn: (t, e) => {
|
|
1435
1436
|
const s = t.options?.[l.update.type === K.Add ? "formAdd" : "formUpdate"]?.[t.type]?.on || t.options?.[t.type]?.on || {}, m = {};
|
|
1436
|
-
return Object.keys(s).forEach((
|
|
1437
|
-
const u = s[
|
|
1438
|
-
typeof u == "function" ? m[
|
|
1437
|
+
return Object.keys(s).forEach((p) => {
|
|
1438
|
+
const u = s[p];
|
|
1439
|
+
typeof u == "function" ? m[p] = function(...k) {
|
|
1439
1440
|
return u.apply(this, [...k, e || l.update.form, t]);
|
|
1440
|
-
} : m[
|
|
1441
|
+
} : m[p] = u;
|
|
1441
1442
|
}), m;
|
|
1442
1443
|
},
|
|
1443
1444
|
/** 获取表单组件绑定属性和事件 */
|
|
@@ -1490,8 +1491,8 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1490
1491
|
/** 提交增改表单操作 */
|
|
1491
1492
|
submit: () => {
|
|
1492
1493
|
FunUtil.throttle(async () => {
|
|
1493
|
-
await f.value?.validate(async (s, m) => new Promise((
|
|
1494
|
-
s || (M.fail(w.tCurd("checkFormData")), u(!1)),
|
|
1494
|
+
await f.value?.validate(async (s, m) => new Promise((p, u) => {
|
|
1495
|
+
s || (M.fail(w.tCurd("checkFormData")), u(!1)), p();
|
|
1495
1496
|
})), l.update.loading = !0;
|
|
1496
1497
|
const t = l.update.type === K.Add ? i.option.api.create : i.option.api.update;
|
|
1497
1498
|
try {
|
|
@@ -1586,10 +1587,10 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1586
1587
|
if (l.apiDataMap[s.key] && s.options?.[s.type]?.dataApiConfig?.once) return;
|
|
1587
1588
|
const m = (async () => {
|
|
1588
1589
|
try {
|
|
1589
|
-
let
|
|
1590
|
-
if (
|
|
1590
|
+
let p = await s.options?.[s.type]?.dataApi?.(l.update.form, l.update.type);
|
|
1591
|
+
if (p) {
|
|
1591
1592
|
const u = s.options?.[s.type]?.dataPath;
|
|
1592
|
-
!Array.isArray(
|
|
1593
|
+
!Array.isArray(p) && u && (p = ObjectUtil.getPathValue(p, u)), s.options[s.type].data = p, s.options.search[s.type].data = p, s.options.search[s.options.search.type ?? s.type] || (s.options.search[s.options.search.type ?? s.type] = {}), s.options.search[s.options.search.type ?? s.type].data = p, s.options.formAdd[s.type].data = p, s.options.formUpdate[s.type].data = p, l.apiDataMap[s.key] = p;
|
|
1593
1594
|
}
|
|
1594
1595
|
} catch {
|
|
1595
1596
|
}
|
|
@@ -1630,31 +1631,31 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1630
1631
|
for (const s in t) {
|
|
1631
1632
|
if (s === "table") {
|
|
1632
1633
|
if (r.table = ObjectUtil.deepMerge(t.table, r.table || {}), r.children) {
|
|
1633
|
-
r.children.forEach((
|
|
1634
|
-
e(
|
|
1634
|
+
console.log("column.children", r.children), r.children.forEach((p) => {
|
|
1635
|
+
e(p);
|
|
1635
1636
|
});
|
|
1636
1637
|
return;
|
|
1637
1638
|
}
|
|
1638
1639
|
} else s === "type" ? r.type = r.type || t.type : r[s] = ObjectUtil.deepMerge(t[s], r[s] || {});
|
|
1639
|
-
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((
|
|
1640
|
-
r.options[
|
|
1640
|
+
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((p) => {
|
|
1641
|
+
r.options[p] = r.options[p] || ObjectUtil.deepMerge(r.options, {}), r.options[p][r.type] = r.options[p][r.type] || {}, r.options[p][r.type].size = p === "search" ? i.option.size.search : i.option.size.form;
|
|
1641
1642
|
}), r.table = ObjectUtil.deepMerge(r.table, r.options[r.type].table || {});
|
|
1642
1643
|
}
|
|
1643
1644
|
r.type === "switch" && (r.options.switch.tableBeforeChange = async (s, m) => {
|
|
1644
|
-
const
|
|
1645
|
+
const p = r.options?.switch;
|
|
1645
1646
|
try {
|
|
1646
|
-
|
|
1647
|
+
p.tableConfig?.confirm && await o.value?.open({
|
|
1647
1648
|
title: w.tCurd("confirmModify"),
|
|
1648
1649
|
content: w.tCurd("confirmSwitchMessage")
|
|
1649
1650
|
});
|
|
1650
1651
|
try {
|
|
1651
|
-
if (!i.option.api.update && !
|
|
1652
|
+
if (!i.option.api.update && !p.tableConfig?.api) return;
|
|
1652
1653
|
const u = m[i.option.table?.rowKey];
|
|
1653
|
-
|
|
1654
|
-
const k = m[s] ===
|
|
1655
|
-
if (!
|
|
1654
|
+
p.loadingMap || (p.loadingMap = {}), p.loadingMap[u] || (p.loadingMap[u] = { loading: !1 }), p.loadingMap[u].loading = !0;
|
|
1655
|
+
const k = m[s] === p.activeValue ? p.inactiveValue : p.activeValue, h = p.tableConfig?.api ? p.tableConfig.api : i.option.api.update;
|
|
1656
|
+
if (!h) return;
|
|
1656
1657
|
try {
|
|
1657
|
-
await
|
|
1658
|
+
await h(
|
|
1658
1659
|
{
|
|
1659
1660
|
...m,
|
|
1660
1661
|
[s]: k
|
|
@@ -1664,9 +1665,9 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1664
1665
|
} catch {
|
|
1665
1666
|
return !1;
|
|
1666
1667
|
} finally {
|
|
1667
|
-
|
|
1668
|
+
p.loadingMap[u].loading = !1;
|
|
1668
1669
|
}
|
|
1669
|
-
return M.success(w.tCurd("operationSuccess")),
|
|
1670
|
+
return M.success(w.tCurd("operationSuccess")), p.tableConfig?.loadList && (l.table.loading = !0, l.table.getList(), l.table.loading = !1), !0;
|
|
1670
1671
|
} catch (u) {
|
|
1671
1672
|
return console.error(u), !1;
|
|
1672
1673
|
} finally {
|
|
@@ -1681,7 +1682,7 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1681
1682
|
},
|
|
1682
1683
|
getColumnSpan: (t, e) => {
|
|
1683
1684
|
if (t.item.form?.spanCol) {
|
|
1684
|
-
const r = F.config.form.defaultSpan, m = e.filter((
|
|
1685
|
+
const r = F.config.form.defaultSpan, m = e.filter((p) => !M.isFun(p.item.show?.form, l.update.form, l.update.type)).reduce((p, u) => p + (u.item.form?.span || r), 0);
|
|
1685
1686
|
return (t.item?.form.span || r) + m;
|
|
1686
1687
|
}
|
|
1687
1688
|
return t.item.form.span;
|
|
@@ -1695,29 +1696,29 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1695
1696
|
};
|
|
1696
1697
|
const e = [], r = i.option.form?.maxSpan || 12, s = i.option.form?.defaultSpan || r / 2;
|
|
1697
1698
|
let m = [];
|
|
1698
|
-
const
|
|
1699
|
-
if (
|
|
1700
|
-
l.table.column.show.list.push(
|
|
1701
|
-
|
|
1699
|
+
const p = (c) => {
|
|
1700
|
+
if (c.children) {
|
|
1701
|
+
l.table.column.show.list.push(c.key), c.children.forEach(($) => {
|
|
1702
|
+
p($);
|
|
1702
1703
|
});
|
|
1703
1704
|
return;
|
|
1704
1705
|
}
|
|
1705
|
-
if (l.update.formDefault[
|
|
1706
|
-
|
|
1707
|
-
let
|
|
1708
|
-
const
|
|
1709
|
-
if (m.push({ item:
|
|
1710
|
-
const
|
|
1706
|
+
if (l.update.formDefault[c.key] = c.value, c.table.table && (c.show.table && l.table.column.show.list.push(c.key), c.table.table && l.table.column.show.listSource.push(c.key)), !(c.isForm && typeof c.show?.form == "boolean") || c.show?.form) {
|
|
1707
|
+
c.form = c.form || { span: s }, c.form.span = c.form.span ?? s;
|
|
1708
|
+
let $ = c.form.span, B = m.reduce((j, H) => j + H.span, $);
|
|
1709
|
+
const R = m.length;
|
|
1710
|
+
if (m.push({ item: c, span: $ }), (R === 1 && m[0].span === 0 || B >= r || $ === 0 && R > 1) && (e.push(m), m = []), c.rules) {
|
|
1711
|
+
const j = {
|
|
1711
1712
|
input: w.tCurd("placeholderInput"),
|
|
1712
1713
|
select: w.tCurd("placeholderSelect")
|
|
1713
|
-
}, H = (
|
|
1714
|
+
}, H = (j[c.type] || j.input) + c.label, le = typeof c.rules == "boolean" ? [
|
|
1714
1715
|
{
|
|
1715
1716
|
required: !0,
|
|
1716
1717
|
message: H,
|
|
1717
1718
|
trigger: "blur"
|
|
1718
1719
|
}
|
|
1719
|
-
] :
|
|
1720
|
-
l.update.rules[
|
|
1720
|
+
] : c.rules;
|
|
1721
|
+
l.update.rules[c.key] = le.map((te) => {
|
|
1721
1722
|
if (te.validator) {
|
|
1722
1723
|
const we = te.validator;
|
|
1723
1724
|
return {
|
|
@@ -1729,27 +1730,27 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1729
1730
|
});
|
|
1730
1731
|
}
|
|
1731
1732
|
}
|
|
1732
|
-
}, u = (
|
|
1733
|
-
|
|
1733
|
+
}, u = (c, $) => {
|
|
1734
|
+
c.isForm = $, Array.isArray(c.children) && c.children.forEach((B) => u(B, $));
|
|
1734
1735
|
};
|
|
1735
|
-
t.column.forEach((
|
|
1736
|
-
|
|
1737
|
-
}), i.option.table?.column?.forEach((
|
|
1738
|
-
u(
|
|
1739
|
-
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((
|
|
1736
|
+
t.column.forEach((c) => {
|
|
1737
|
+
c.isForm = !0, u(c, !0), p(c);
|
|
1738
|
+
}), i.option.table?.column?.forEach((c) => {
|
|
1739
|
+
u(c, !1), p(c);
|
|
1740
|
+
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((c) => c.table?.table), l.search.column.list.sort((c, $) => c.sort?.search - $.sort?.search), l.table.column.list.sort((c, $) => c.sort?.table - $.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
|
|
1740
1741
|
const k = i.option.search?.formDefault;
|
|
1741
|
-
k && Object.keys(k).forEach((
|
|
1742
|
-
l.search.formDefault[
|
|
1743
|
-
}), t.column.forEach((
|
|
1744
|
-
|
|
1742
|
+
k && Object.keys(k).forEach((c) => {
|
|
1743
|
+
l.search.formDefault[c] = k[c];
|
|
1744
|
+
}), t.column.forEach((c) => {
|
|
1745
|
+
c.show?.search || (l.search.formDefault[c.key] = void 0);
|
|
1745
1746
|
});
|
|
1746
|
-
const
|
|
1747
|
-
x.setValue(l.search.form,
|
|
1747
|
+
const h = ObjectUtil.deepMerge(l.search.formDefault, {});
|
|
1748
|
+
x.setValue(l.search.form, h, !0);
|
|
1748
1749
|
}
|
|
1749
1750
|
});
|
|
1750
|
-
return l.init(),
|
|
1751
|
+
return l.init(), ye(() => {
|
|
1751
1752
|
i.option.init !== !1 && l.table.getList();
|
|
1752
|
-
}), i.form &&
|
|
1753
|
+
}), i.form && ce(
|
|
1753
1754
|
() => l.update.form,
|
|
1754
1755
|
(t) => {
|
|
1755
1756
|
Object.keys(l.update.form).forEach((e) => {
|
|
@@ -1760,7 +1761,7 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1760
1761
|
deep: !0,
|
|
1761
1762
|
immediate: !0
|
|
1762
1763
|
}
|
|
1763
|
-
), i.searchForm &&
|
|
1764
|
+
), i.searchForm && ce(
|
|
1764
1765
|
() => l.search.form,
|
|
1765
1766
|
(t) => {
|
|
1766
1767
|
Object.keys(l.search.form).forEach((e) => {
|
|
@@ -1772,7 +1773,7 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1772
1773
|
immediate: !0
|
|
1773
1774
|
}
|
|
1774
1775
|
), { conf: l, switchConfirmRef: o, ruleFormRef: f, tableRef: n };
|
|
1775
|
-
},
|
|
1776
|
+
}, qe = { class: "dialog-footer" }, Qe = /* @__PURE__ */ N({
|
|
1776
1777
|
__name: "switchConfirm",
|
|
1777
1778
|
props: {
|
|
1778
1779
|
size: {}
|
|
@@ -1780,7 +1781,7 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1780
1781
|
setup(i, { expose: o }) {
|
|
1781
1782
|
const f = J(!1), n = J("确认修改"), l = J("确认要修改状态吗?");
|
|
1782
1783
|
let t = null, e = null;
|
|
1783
|
-
const r = (
|
|
1784
|
+
const r = (p) => (p?.title && (n.value = p.title), p?.content && (l.value = p.content), f.value = !0, new Promise((u, k) => {
|
|
1784
1785
|
t = u, e = k;
|
|
1785
1786
|
})), s = () => {
|
|
1786
1787
|
f.value = !1, t?.(!0), t = null, e = null;
|
|
@@ -1789,19 +1790,19 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1789
1790
|
};
|
|
1790
1791
|
return o({
|
|
1791
1792
|
open: r
|
|
1792
|
-
}), (
|
|
1793
|
+
}), (p, u) => {
|
|
1793
1794
|
const k = ee("el-form");
|
|
1794
|
-
return d(),
|
|
1795
|
+
return d(), y(a(ie), {
|
|
1795
1796
|
modelValue: f.value,
|
|
1796
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1797
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => f.value = h),
|
|
1797
1798
|
title: n.value,
|
|
1798
1799
|
"close-on-click-modal": !1,
|
|
1799
1800
|
width: "400px"
|
|
1800
1801
|
}, {
|
|
1801
1802
|
footer: g(() => [
|
|
1802
|
-
O(k, { size:
|
|
1803
|
+
O(k, { size: p.size }, {
|
|
1803
1804
|
default: g(() => [
|
|
1804
|
-
U("span",
|
|
1805
|
+
U("span", qe, [
|
|
1805
1806
|
O(a(T), { onClick: m }, {
|
|
1806
1807
|
default: g(() => u[1] || (u[1] = [
|
|
1807
1808
|
E("取消")
|
|
@@ -1834,71 +1835,71 @@ const K = M.EDialog, qe = (i) => {
|
|
|
1834
1835
|
for (const [n, l] of o)
|
|
1835
1836
|
f[n] = l;
|
|
1836
1837
|
return f;
|
|
1837
|
-
},
|
|
1838
|
+
}, Ge = {}, Xe = {
|
|
1838
1839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1839
1840
|
viewBox: "0 0 1024 1024"
|
|
1840
1841
|
};
|
|
1841
|
-
function
|
|
1842
|
-
return d(), b("svg",
|
|
1842
|
+
function Ye(i, o) {
|
|
1843
|
+
return d(), b("svg", Xe, o[0] || (o[0] = [
|
|
1843
1844
|
U("path", {
|
|
1844
1845
|
fill: "currentColor",
|
|
1845
1846
|
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"
|
|
1846
1847
|
}, null, -1)
|
|
1847
1848
|
]));
|
|
1848
1849
|
}
|
|
1849
|
-
const
|
|
1850
|
+
const Ze = /* @__PURE__ */ Y(Ge, [["render", Ye]]), xe = ["innerHTML"], _e = /* @__PURE__ */ N({
|
|
1850
1851
|
__name: "text",
|
|
1851
1852
|
props: {
|
|
1852
1853
|
content: {},
|
|
1853
1854
|
value: {}
|
|
1854
1855
|
},
|
|
1855
1856
|
setup(i) {
|
|
1856
|
-
const o = i, f =
|
|
1857
|
-
return (n, l) => typeof f.value == "object" ? (d(),
|
|
1857
|
+
const o = i, f = be(() => typeof o.content == "function" ? o.content(o.value) : o.content);
|
|
1858
|
+
return (n, l) => typeof f.value == "object" ? (d(), y(q(f.value), { key: 0 })) : (d(), b("div", {
|
|
1858
1859
|
key: 1,
|
|
1859
1860
|
innerHTML: f.value
|
|
1860
|
-
}, null, 8,
|
|
1861
|
+
}, null, 8, xe));
|
|
1861
1862
|
}
|
|
1862
|
-
}),
|
|
1863
|
+
}), et = {}, tt = {
|
|
1863
1864
|
"data-v-58697b5c": "",
|
|
1864
1865
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1865
1866
|
viewBox: "0 0 1024 1024"
|
|
1866
1867
|
};
|
|
1867
|
-
function
|
|
1868
|
-
return d(), b("svg",
|
|
1868
|
+
function ot(i, o) {
|
|
1869
|
+
return d(), b("svg", tt, o[0] || (o[0] = [
|
|
1869
1870
|
U("path", {
|
|
1870
1871
|
fill: "currentColor",
|
|
1871
1872
|
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"
|
|
1872
1873
|
}, null, -1)
|
|
1873
1874
|
]));
|
|
1874
1875
|
}
|
|
1875
|
-
const
|
|
1876
|
+
const at = /* @__PURE__ */ Y(et, [["render", ot]]), lt = {}, nt = {
|
|
1876
1877
|
"data-v-58697b5c": "",
|
|
1877
1878
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1878
1879
|
viewBox: "0 0 1024 1024"
|
|
1879
1880
|
};
|
|
1880
|
-
function
|
|
1881
|
-
return d(), b("svg",
|
|
1881
|
+
function it(i, o) {
|
|
1882
|
+
return d(), b("svg", nt, o[0] || (o[0] = [
|
|
1882
1883
|
U("path", {
|
|
1883
1884
|
fill: "currentColor",
|
|
1884
1885
|
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"
|
|
1885
1886
|
}, null, -1)
|
|
1886
1887
|
]));
|
|
1887
1888
|
}
|
|
1888
|
-
const
|
|
1889
|
+
const rt = /* @__PURE__ */ Y(lt, [["render", it]]), st = {}, dt = {
|
|
1889
1890
|
"data-v-58697b5c": "",
|
|
1890
1891
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1891
1892
|
viewBox: "0 0 1024 1024"
|
|
1892
1893
|
};
|
|
1893
|
-
function
|
|
1894
|
-
return d(), b("svg",
|
|
1894
|
+
function ut(i, o) {
|
|
1895
|
+
return d(), b("svg", dt, o[0] || (o[0] = [
|
|
1895
1896
|
U("path", {
|
|
1896
1897
|
fill: "currentColor",
|
|
1897
1898
|
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"
|
|
1898
1899
|
}, null, -1)
|
|
1899
1900
|
]));
|
|
1900
1901
|
}
|
|
1901
|
-
const
|
|
1902
|
+
const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-center table-header-label inline" }, ct = { class: "table-header-tooltip" }, mt = ["innerHTML"], ht = ["onClick"], yt = { key: 1 }, gt = ["onClick", "innerHTML"], bt = /* @__PURE__ */ N({
|
|
1902
1903
|
__name: "tableColumn",
|
|
1903
1904
|
props: {
|
|
1904
1905
|
conf: {},
|
|
@@ -1906,23 +1907,23 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1906
1907
|
option: {}
|
|
1907
1908
|
},
|
|
1908
1909
|
setup(i) {
|
|
1909
|
-
const o = M.isFun, f =
|
|
1910
|
+
const o = M.isFun, f = Oe().type;
|
|
1910
1911
|
return (n, l) => {
|
|
1911
1912
|
const t = ee("el-tooltip");
|
|
1912
1913
|
return d(!0), b(D, null, A(n.columnList, (e) => (d(), b(D, {
|
|
1913
1914
|
key: e.key
|
|
1914
1915
|
}, [
|
|
1915
|
-
n.conf.table.column.show.list.includes(e.key) && a(o)(e.show?.table, n.conf.table.data) ? (d(), b(D, { key: 0 }, [
|
|
1916
|
-
e.table?.header?.groupKey === void 0 || e.table.header.show ? (d(),
|
|
1916
|
+
n.conf.table.column.show.list.includes(e.key) && (e.show?.table === void 0 || a(o)(e.show?.table, n.conf.table.data)) ? (d(), b(D, { key: 0 }, [
|
|
1917
|
+
e.table?.header?.groupKey === void 0 || e.table.header.show ? (d(), y(a(oe), C({
|
|
1917
1918
|
key: 0,
|
|
1918
1919
|
prop: e.key,
|
|
1919
1920
|
label: e.label,
|
|
1920
1921
|
ref_for: !0
|
|
1921
1922
|
}, e.table), {
|
|
1922
1923
|
header: g(() => [
|
|
1923
|
-
|
|
1924
|
-
U("div",
|
|
1925
|
-
e.table?.header?.tooltip ? (d(),
|
|
1924
|
+
V(n.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1925
|
+
U("div", pt, [
|
|
1926
|
+
e.table?.header?.tooltip ? (d(), y(t, {
|
|
1926
1927
|
key: 0,
|
|
1927
1928
|
effect: "dark",
|
|
1928
1929
|
placement: "top"
|
|
@@ -1930,11 +1931,11 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1930
1931
|
content: g(() => [
|
|
1931
1932
|
U("div", {
|
|
1932
1933
|
innerHTML: e.table?.header?.tooltip
|
|
1933
|
-
}, null, 8,
|
|
1934
|
+
}, null, 8, mt)
|
|
1934
1935
|
]),
|
|
1935
1936
|
default: g(() => [
|
|
1936
|
-
U("span",
|
|
1937
|
-
O(
|
|
1937
|
+
U("span", ct, [
|
|
1938
|
+
O(at)
|
|
1938
1939
|
])
|
|
1939
1940
|
]),
|
|
1940
1941
|
_: 2
|
|
@@ -1943,7 +1944,7 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1943
1944
|
e.table?.header?.group !== void 0 ? (d(), b("span", {
|
|
1944
1945
|
key: 1,
|
|
1945
1946
|
class: "table-header-plus",
|
|
1946
|
-
onClick:
|
|
1947
|
+
onClick: Ue(
|
|
1947
1948
|
() => {
|
|
1948
1949
|
e.table.header.group = !e.table.header.group, n.columnList.forEach((r) => {
|
|
1949
1950
|
r.table?.header?.groupKey === e.key && (r.table.header.show = !e.table.header.group);
|
|
@@ -1952,23 +1953,23 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1952
1953
|
["stop"]
|
|
1953
1954
|
)
|
|
1954
1955
|
}, [
|
|
1955
|
-
e.table.header.group ? (d(),
|
|
1956
|
-
], 8,
|
|
1956
|
+
e.table.header.group ? (d(), y(rt, { key: 0 })) : (d(), y(ft, { key: 1 }))
|
|
1957
|
+
], 8, ht)) : v("", !0)
|
|
1957
1958
|
])
|
|
1958
1959
|
])
|
|
1959
1960
|
]),
|
|
1960
1961
|
default: g(({ row: r }) => [
|
|
1961
1962
|
e.children ? (d(), b(D, { key: 0 }, [
|
|
1962
1963
|
l[0] || (l[0] = E(" ")),
|
|
1963
|
-
(d(),
|
|
1964
|
+
(d(), y(q(a(f)), {
|
|
1964
1965
|
conf: n.conf,
|
|
1965
1966
|
columnList: e.children,
|
|
1966
1967
|
option: n.option
|
|
1967
1968
|
}, G({ _: 2 }, [
|
|
1968
1969
|
A(n.$slots, (s, m) => ({
|
|
1969
1970
|
name: m,
|
|
1970
|
-
fn: g((
|
|
1971
|
-
|
|
1971
|
+
fn: g((p) => [
|
|
1972
|
+
V(n.$slots, m, C({ ref_for: !0 }, p || {}))
|
|
1972
1973
|
])
|
|
1973
1974
|
}))
|
|
1974
1975
|
]), 1032, ["conf", "columnList", "option"]))
|
|
@@ -1978,18 +1979,18 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1978
1979
|
class: I(["row", ["table-edit-" + e.key]]),
|
|
1979
1980
|
style: { width: "100%" }
|
|
1980
1981
|
}, [
|
|
1981
|
-
|
|
1982
|
+
V(n.$slots, "table-edit-left-" + e.key, {
|
|
1982
1983
|
row: r,
|
|
1983
1984
|
item: e
|
|
1984
1985
|
}),
|
|
1985
|
-
e.type === "input" ? (d(),
|
|
1986
|
+
e.type === "input" ? (d(), y(a(_), C({
|
|
1986
1987
|
key: 0,
|
|
1987
1988
|
modelValue: r[e.key],
|
|
1988
1989
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
1989
1990
|
disabled: n.conf.update.getDisabled(e, !0),
|
|
1990
1991
|
class: "col",
|
|
1991
1992
|
ref_for: !0
|
|
1992
|
-
}, n.conf.update.getBind(e),
|
|
1993
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r))), G({ _: 2 }, [
|
|
1993
1994
|
e.options?.input?.prepend ? {
|
|
1994
1995
|
name: "prepend",
|
|
1995
1996
|
fn: g(() => [
|
|
@@ -1997,43 +1998,43 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
1997
1998
|
]),
|
|
1998
1999
|
key: "0"
|
|
1999
2000
|
} : void 0
|
|
2000
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(),
|
|
2001
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(a(X), C({
|
|
2001
2002
|
key: 1,
|
|
2002
2003
|
modelValue: r[e.key],
|
|
2003
2004
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2004
2005
|
disabled: n.conf.update.getDisabled(e, !0),
|
|
2005
2006
|
class: "col",
|
|
2006
2007
|
ref_for: !0
|
|
2007
|
-
}, n.conf.update.getBind(e),
|
|
2008
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r))), {
|
|
2008
2009
|
default: g(() => [
|
|
2009
|
-
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(),
|
|
2010
|
+
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(a(W), {
|
|
2010
2011
|
key: s.value,
|
|
2011
2012
|
label: s.label,
|
|
2012
2013
|
value: s.value
|
|
2013
2014
|
}, null, 8, ["label", "value"]))), 128))
|
|
2014
2015
|
]),
|
|
2015
2016
|
_: 2
|
|
2016
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(),
|
|
2017
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(a(Z), C({
|
|
2017
2018
|
key: 2,
|
|
2018
2019
|
modelValue: r[e.key],
|
|
2019
2020
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2020
2021
|
disabled: n.conf.update.getDisabled(e, !0),
|
|
2021
2022
|
class: "col",
|
|
2022
2023
|
ref_for: !0
|
|
2023
|
-
}, n.conf.update.getBind(e),
|
|
2024
|
-
|
|
2024
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0),
|
|
2025
|
+
V(n.$slots, "table-edit-right-" + e.key, {
|
|
2025
2026
|
row: r,
|
|
2026
2027
|
item: e
|
|
2027
2028
|
})
|
|
2028
2029
|
], 2)) : (d(), b(D, { key: 1 }, [
|
|
2029
2030
|
n.conf.update.type === a(M).EDialog.Update && a(o)(e.show?.form, n.conf.update.form, a(M).EDialog.Update) && n.option.table?.inlineEdit && n.conf.update.form[n.option.table?.rowKey] === r[n.option.table?.rowKey] && (e.type === "input" || e.type === "select") ? (d(), b(D, { key: 0 }, [
|
|
2030
|
-
e.type === "input" ? (d(),
|
|
2031
|
+
e.type === "input" ? (d(), y(a(_), C({
|
|
2031
2032
|
key: 0,
|
|
2032
2033
|
modelValue: n.conf.update.form[e.key],
|
|
2033
2034
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
2034
2035
|
disabled: n.conf.update.getDisabled(e, !0),
|
|
2035
2036
|
ref_for: !0
|
|
2036
|
-
}, n.conf.update.getBind(e),
|
|
2037
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r)), { style: { width: "100%" } }), G({ _: 2 }, [
|
|
2037
2038
|
e.options?.input?.prepend ? {
|
|
2038
2039
|
name: "prepend",
|
|
2039
2040
|
fn: g(() => [
|
|
@@ -2041,57 +2042,57 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
2041
2042
|
]),
|
|
2042
2043
|
key: "0"
|
|
2043
2044
|
} : void 0
|
|
2044
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(),
|
|
2045
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(a(X), C({
|
|
2045
2046
|
key: 1,
|
|
2046
2047
|
modelValue: n.conf.update.form[e.key],
|
|
2047
2048
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
2048
2049
|
disabled: n.conf.update.getDisabled(e, !0),
|
|
2049
2050
|
ref_for: !0
|
|
2050
|
-
}, n.conf.update.getBind(e),
|
|
2051
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
2051
2052
|
default: g(() => [
|
|
2052
|
-
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(),
|
|
2053
|
+
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(a(W), {
|
|
2053
2054
|
key: s.value,
|
|
2054
2055
|
label: s.label,
|
|
2055
2056
|
value: s.value
|
|
2056
2057
|
}, null, 8, ["label", "value"]))), 128))
|
|
2057
2058
|
]),
|
|
2058
2059
|
_: 2
|
|
2059
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(),
|
|
2060
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(a(Z), C({
|
|
2060
2061
|
key: 2,
|
|
2061
2062
|
modelValue: n.conf.update.form[e.key],
|
|
2062
2063
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
2063
2064
|
ref_for: !0
|
|
2064
|
-
}, n.conf.update.getBind(e),
|
|
2065
|
+
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r)), {
|
|
2065
2066
|
disabled: n.conf.update.getDisabled(e, !0)
|
|
2066
2067
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2067
|
-
], 64)) :
|
|
2068
|
+
], 64)) : V(n.$slots, "table-" + e.key, {
|
|
2068
2069
|
key: 1,
|
|
2069
2070
|
row: r,
|
|
2070
2071
|
item: e
|
|
2071
2072
|
}, () => [
|
|
2072
|
-
a(
|
|
2073
|
+
a(L).customComponent[e.type ?? ""]?.table ? (d(), y(q(a(L).customComponent[e.type ?? ""]?.table), C({
|
|
2073
2074
|
key: 0,
|
|
2074
2075
|
modelValue: r[e.key],
|
|
2075
2076
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2076
2077
|
ref_for: !0
|
|
2077
|
-
}, e.options?.[e.type ?? ""],
|
|
2078
|
-
e.options?.switch?.tableConfig?.change ? (d(),
|
|
2078
|
+
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (d(), b(D, { key: 1 }, [
|
|
2079
|
+
e.options?.switch?.tableConfig?.change ? (d(), y(a(Z), C({
|
|
2079
2080
|
key: 0,
|
|
2080
2081
|
modelValue: r[e.key],
|
|
2081
2082
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2082
2083
|
loading: e.options?.switch?.loadingMap?.[r[n.option.table?.rowKey]]?.loading,
|
|
2083
2084
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2084
2085
|
ref_for: !0
|
|
2085
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (d(), b("span",
|
|
2086
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (d(), b("span", yt, S(r[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
2086
2087
|
], 64)) : (d(), b("span", {
|
|
2087
2088
|
key: 2,
|
|
2088
|
-
style:
|
|
2089
|
+
style: ge({
|
|
2089
2090
|
"--table-text-click-color": e.table?.click?.color
|
|
2090
2091
|
}),
|
|
2091
2092
|
class: I({ "table-text-click": e.table?.click?.callback }),
|
|
2092
2093
|
onClick: (s) => e.table?.click?.callback?.(r),
|
|
2093
2094
|
innerHTML: e.table?.format ? e.table?.format(r) : r[e.key]
|
|
2094
|
-
}, null, 14,
|
|
2095
|
+
}, null, 14, gt))
|
|
2095
2096
|
])
|
|
2096
2097
|
], 64))
|
|
2097
2098
|
], 64))
|
|
@@ -2102,38 +2103,38 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
2102
2103
|
], 64))), 128);
|
|
2103
2104
|
};
|
|
2104
2105
|
}
|
|
2105
|
-
}),
|
|
2106
|
+
}), wt = {
|
|
2106
2107
|
class: "row form-item-content",
|
|
2107
2108
|
style: { width: "100%" }
|
|
2108
|
-
},
|
|
2109
|
+
}, kt = { class: "col column form-item-content-item" }, vt = { class: "col" }, Ct = ["innerHTML"], Vt = /* @__PURE__ */ N({
|
|
2109
2110
|
__name: "formColumn",
|
|
2110
2111
|
props: {
|
|
2111
2112
|
conf: {},
|
|
2112
2113
|
item: {}
|
|
2113
2114
|
},
|
|
2114
2115
|
setup(i) {
|
|
2115
|
-
return (o, f) => (d(),
|
|
2116
|
+
return (o, f) => (d(), y(a(ae), {
|
|
2116
2117
|
label: o.item.item.text?.form?.label ?? o.item.item.label,
|
|
2117
2118
|
prop: o.item.item.key,
|
|
2118
2119
|
"label-width": o.item.item.text?.form?.label == "" ? 0 : o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
|
|
2119
2120
|
}, {
|
|
2120
2121
|
default: g(() => [
|
|
2121
|
-
U("div",
|
|
2122
|
-
|
|
2122
|
+
U("div", wt, [
|
|
2123
|
+
V(o.$slots, "form-" + o.item.item.key + "-start", {
|
|
2123
2124
|
row: o.conf.update.form,
|
|
2124
2125
|
item: o.item.item
|
|
2125
2126
|
}),
|
|
2126
|
-
U("div",
|
|
2127
|
-
U("div",
|
|
2128
|
-
|
|
2127
|
+
U("div", kt, [
|
|
2128
|
+
U("div", vt, [
|
|
2129
|
+
V(o.$slots, "form-" + o.item.item.key, {
|
|
2129
2130
|
row: o.conf.update.form,
|
|
2130
2131
|
item: o.item.item
|
|
2131
2132
|
}, () => [
|
|
2132
|
-
o.item.item.type === "input" ? (d(),
|
|
2133
|
+
o.item.item.type === "input" ? (d(), y(a(_), C({
|
|
2133
2134
|
key: 0,
|
|
2134
2135
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2135
2136
|
"onUpdate:modelValue": f[0] || (f[0] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2136
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2137
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2137
2138
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2138
2139
|
}), G({ _: 2 }, [
|
|
2139
2140
|
o.item.item.options?.input?.prepend ? {
|
|
@@ -2143,78 +2144,76 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
2143
2144
|
]),
|
|
2144
2145
|
key: "0"
|
|
2145
2146
|
} : void 0
|
|
2146
|
-
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (d(),
|
|
2147
|
+
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (d(), y(a(Z), C({
|
|
2147
2148
|
key: 1,
|
|
2148
2149
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2149
2150
|
"onUpdate:modelValue": f[1] || (f[1] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2150
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2151
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2151
2152
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2152
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (d(),
|
|
2153
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (d(), y(a(X), C({
|
|
2153
2154
|
key: 2,
|
|
2154
2155
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2155
2156
|
"onUpdate:modelValue": f[2] || (f[2] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2156
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2157
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2157
2158
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2158
2159
|
style: { width: "100%" }
|
|
2159
2160
|
}), {
|
|
2160
2161
|
default: g(() => [
|
|
2161
|
-
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(),
|
|
2162
|
+
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(a(W), C({
|
|
2162
2163
|
key: n.value,
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
2164
|
+
ref_for: !0
|
|
2165
|
+
}, n, z(n.on || {})), null, 16))), 128))
|
|
2166
2166
|
]),
|
|
2167
2167
|
_: 1
|
|
2168
|
-
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (d(),
|
|
2168
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (d(), y(a(re), C({
|
|
2169
2169
|
key: 3,
|
|
2170
2170
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2171
2171
|
"onUpdate:modelValue": f[3] || (f[3] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2172
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2172
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2173
2173
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2174
2174
|
style: { width: "100%" }
|
|
2175
2175
|
}), {
|
|
2176
2176
|
default: g(() => [
|
|
2177
|
-
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(),
|
|
2177
|
+
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(a(se), C({
|
|
2178
2178
|
key: n.value,
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
2179
|
+
ref_for: !0
|
|
2180
|
+
}, n, z(n.on || {})), null, 16))), 128))
|
|
2182
2181
|
]),
|
|
2183
2182
|
_: 1
|
|
2184
|
-
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (d(),
|
|
2183
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (d(), y(fe, C({
|
|
2185
2184
|
key: 4,
|
|
2186
2185
|
row: o.conf.update.form,
|
|
2187
2186
|
field: o.item.item.key
|
|
2188
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2187
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2189
2188
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2190
2189
|
style: { width: "100%" }
|
|
2191
|
-
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (d(),
|
|
2190
|
+
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (d(), y(a(he), C({
|
|
2192
2191
|
key: 5,
|
|
2193
2192
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2194
2193
|
"onUpdate:modelValue": f[4] || (f[4] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2195
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2194
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2196
2195
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2197
2196
|
style: { width: "100%" }
|
|
2198
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (d(),
|
|
2197
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (d(), y(a(de), C({
|
|
2199
2198
|
key: 6,
|
|
2200
2199
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2201
2200
|
"onUpdate:modelValue": f[5] || (f[5] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2202
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2201
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2203
2202
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2204
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(
|
|
2203
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(L).customComponent[o.item.item.type] || a(L).customComponent[o.item.item.type]?.form) ? (d(), y(q(a(L).customComponent[o.item.item.type]?.form || a(L).customComponent[o.item.item.type]), C({
|
|
2205
2204
|
key: 7,
|
|
2206
2205
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2207
2206
|
"onUpdate:modelValue": f[6] || (f[6] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2208
|
-
}, o.conf.update.getBind(o.item.item),
|
|
2207
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2209
2208
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2210
2209
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0)
|
|
2211
2210
|
]),
|
|
2212
|
-
|
|
2211
|
+
V(o.$slots, "form-" + o.item.item.key + "-right", {
|
|
2213
2212
|
row: o.conf.update.form,
|
|
2214
2213
|
item: o.item.item
|
|
2215
2214
|
})
|
|
2216
2215
|
]),
|
|
2217
|
-
|
|
2216
|
+
V(o.$slots, "form-" + o.item.item.key + "-tip", {
|
|
2218
2217
|
row: o.conf.update.form,
|
|
2219
2218
|
item: o.item.item
|
|
2220
2219
|
}, () => [
|
|
@@ -2222,10 +2221,10 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
2222
2221
|
key: 0,
|
|
2223
2222
|
class: "form-tip-text",
|
|
2224
2223
|
innerHTML: typeof o.item.item.form?.tipText == "function" ? o.item.item.form?.tipText(o.conf.update.form, o.conf.update.type) : o.item.item.form?.tipText
|
|
2225
|
-
}, null, 8,
|
|
2224
|
+
}, null, 8, Ct)) : v("", !0)
|
|
2226
2225
|
])
|
|
2227
2226
|
]),
|
|
2228
|
-
|
|
2227
|
+
V(o.$slots, "form-" + o.item.item.key + "-end", {
|
|
2229
2228
|
row: o.conf.update.form,
|
|
2230
2229
|
item: o.item.item
|
|
2231
2230
|
})
|
|
@@ -2234,31 +2233,31 @@ const pt = /* @__PURE__ */ Y(dt, [["render", ft]]), ct = { class: "row flex-cent
|
|
|
2234
2233
|
_: 3
|
|
2235
2234
|
}, 8, ["label", "prop", "label-width"]));
|
|
2236
2235
|
}
|
|
2237
|
-
}),
|
|
2236
|
+
}), zt = {}, $t = {
|
|
2238
2237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2239
2238
|
viewBox: "64 64 896 896"
|
|
2240
2239
|
};
|
|
2241
|
-
function
|
|
2242
|
-
return d(), b("svg",
|
|
2240
|
+
function Dt(i, o) {
|
|
2241
|
+
return d(), b("svg", $t, o[0] || (o[0] = [
|
|
2243
2242
|
U("path", {
|
|
2244
2243
|
fill: "currentColor",
|
|
2245
2244
|
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"
|
|
2246
2245
|
}, null, -1)
|
|
2247
2246
|
]));
|
|
2248
2247
|
}
|
|
2249
|
-
const
|
|
2248
|
+
const Et = /* @__PURE__ */ Y(zt, [["render", Dt]]), Ot = {}, Ut = {
|
|
2250
2249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2251
2250
|
viewBox: "64 64 896 896"
|
|
2252
2251
|
};
|
|
2253
|
-
function
|
|
2254
|
-
return d(), b("svg",
|
|
2252
|
+
function St(i, o) {
|
|
2253
|
+
return d(), b("svg", Ut, o[0] || (o[0] = [
|
|
2255
2254
|
U("path", {
|
|
2256
2255
|
fill: "currentColor",
|
|
2257
2256
|
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"
|
|
2258
2257
|
}, null, -1)
|
|
2259
2258
|
]));
|
|
2260
2259
|
}
|
|
2261
|
-
const
|
|
2260
|
+
const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
2262
2261
|
__name: "searchField",
|
|
2263
2262
|
props: {
|
|
2264
2263
|
item: {},
|
|
@@ -2266,100 +2265,100 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2266
2265
|
type: {}
|
|
2267
2266
|
},
|
|
2268
2267
|
setup(i) {
|
|
2269
|
-
const o = i, f =
|
|
2268
|
+
const o = i, f = be({
|
|
2270
2269
|
get: () => o.conf.search.form?.[o.item?.key],
|
|
2271
2270
|
set: (n) => {
|
|
2272
2271
|
o.item?.key !== void 0 && (o.conf.search.form[o.item.key] = n);
|
|
2273
2272
|
}
|
|
2274
2273
|
});
|
|
2275
|
-
return (n, l) => a(
|
|
2274
|
+
return (n, l) => a(L).customComponent[n.type ?? ""]?.search ? (d(), y(q(a(L).customComponent[n.type ?? ""]?.search), C({
|
|
2276
2275
|
key: 0,
|
|
2277
2276
|
modelValue: f.value,
|
|
2278
2277
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => f.value = t)
|
|
2279
|
-
}, n.item.options?.search?.[n.type ?? ""],
|
|
2278
|
+
}, n.item.options?.search?.[n.type ?? ""], z(n.item.options?.search?.[n.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : n.type === "input" ? (d(), y(a(_), C({
|
|
2280
2279
|
key: 1,
|
|
2281
2280
|
modelValue: f.value,
|
|
2282
2281
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => f.value = t),
|
|
2283
2282
|
placeholder: n.conf.search.getPlaceholder(n.item),
|
|
2284
2283
|
clearable: "",
|
|
2285
2284
|
disabled: n.item.disabled?.search
|
|
2286
|
-
}, n.item.options?.search?.input || n.item.options?.input,
|
|
2285
|
+
}, n.item.options?.search?.input || n.item.options?.input, z(n.item.options?.search?.input?.on || n.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (d(), y(a(X), C({
|
|
2287
2286
|
key: 2,
|
|
2288
2287
|
modelValue: f.value,
|
|
2289
2288
|
"onUpdate:modelValue": l[2] || (l[2] = (t) => f.value = t),
|
|
2290
2289
|
placeholder: n.conf.search.getPlaceholder(n.item, a(w).tCurd("placeholderSelect")),
|
|
2291
2290
|
clearable: "",
|
|
2292
2291
|
disabled: n.item.disabled?.search
|
|
2293
|
-
}, n.item.options?.search?.switch || n.item.options?.switch,
|
|
2292
|
+
}, n.item.options?.search?.switch || n.item.options?.switch, z(n.item.options?.search?.switch?.on || n.item.options?.switch?.on || {})), {
|
|
2294
2293
|
default: g(() => [
|
|
2295
|
-
(d(),
|
|
2294
|
+
(d(), y(a(W), {
|
|
2296
2295
|
key: n.item.options?.switch?.activeValue,
|
|
2297
2296
|
label: n.item.options?.switch?.activeText,
|
|
2298
2297
|
value: n.item.options?.switch?.activeValue
|
|
2299
2298
|
}, null, 8, ["label", "value"])),
|
|
2300
|
-
(d(),
|
|
2299
|
+
(d(), y(a(W), {
|
|
2301
2300
|
key: n.item.options?.switch?.inactiveValue,
|
|
2302
2301
|
label: n.item.options?.switch?.inactiveText,
|
|
2303
2302
|
value: n.item.options?.switch?.inactiveValue
|
|
2304
2303
|
}, null, 8, ["label", "value"]))
|
|
2305
2304
|
]),
|
|
2306
2305
|
_: 1
|
|
2307
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "select" ? (d(),
|
|
2306
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "select" ? (d(), y(a(X), C({
|
|
2308
2307
|
key: 3,
|
|
2309
2308
|
modelValue: f.value,
|
|
2310
2309
|
"onUpdate:modelValue": l[3] || (l[3] = (t) => f.value = t),
|
|
2311
2310
|
placeholder: n.conf.search.getPlaceholder(n.item, a(w).tCurd("placeholderSelect")),
|
|
2312
2311
|
clearable: "",
|
|
2313
2312
|
disabled: n.item.disabled?.search
|
|
2314
|
-
}, n.item.options?.search?.select || n.item.options?.select,
|
|
2313
|
+
}, n.item.options?.search?.select || n.item.options?.select, z(n.item.options?.search?.select?.on || n.item.options?.select?.on || {})), {
|
|
2315
2314
|
default: g(() => [
|
|
2316
|
-
(d(!0), b(D, null, A(n.item.options?.search?.select?.data || n.item.options?.select?.data || [], (t) => (d(),
|
|
2315
|
+
(d(!0), b(D, null, A(n.item.options?.search?.select?.data || n.item.options?.select?.data || [], (t) => (d(), y(a(W), {
|
|
2317
2316
|
key: t.value,
|
|
2318
2317
|
label: t.label,
|
|
2319
2318
|
value: t.value
|
|
2320
2319
|
}, null, 8, ["label", "value"]))), 128))
|
|
2321
2320
|
]),
|
|
2322
2321
|
_: 1
|
|
2323
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (d(),
|
|
2322
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (d(), y(a(re), C({
|
|
2324
2323
|
key: 4,
|
|
2325
2324
|
modelValue: f.value,
|
|
2326
2325
|
"onUpdate:modelValue": l[4] || (l[4] = (t) => f.value = t),
|
|
2327
2326
|
disabled: n.item.disabled?.search
|
|
2328
|
-
}, n.item.options?.search?.radio || n.item.options?.radio,
|
|
2327
|
+
}, n.item.options?.search?.radio || n.item.options?.radio, z(n.item.options?.search?.radio?.on || n.item.options?.radio?.on || {})), {
|
|
2329
2328
|
default: g(() => [
|
|
2330
|
-
(d(!0), b(D, null, A(n.item.options?.radio?.data, (t) => (d(),
|
|
2329
|
+
(d(!0), b(D, null, A(n.item.options?.radio?.data, (t) => (d(), y(a(se), {
|
|
2331
2330
|
key: t.value,
|
|
2332
2331
|
label: t.label,
|
|
2333
2332
|
value: t.value
|
|
2334
2333
|
}, null, 8, ["label", "value"]))), 128))
|
|
2335
2334
|
]),
|
|
2336
2335
|
_: 1
|
|
2337
|
-
}, 16, ["modelValue", "disabled"])) : n.type === "datetime" ? (d(),
|
|
2336
|
+
}, 16, ["modelValue", "disabled"])) : n.type === "datetime" ? (d(), y(a(de), C({
|
|
2338
2337
|
key: 5,
|
|
2339
2338
|
modelValue: f.value,
|
|
2340
2339
|
"onUpdate:modelValue": l[5] || (l[5] = (t) => f.value = t),
|
|
2341
2340
|
disabled: n.item.disabled?.search
|
|
2342
|
-
}, n.item.options?.search?.datetime || n.item.options?.datetime,
|
|
2341
|
+
}, n.item.options?.search?.datetime || n.item.options?.datetime, z(n.item.options?.search?.datetime?.on || n.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : n.type && a(L).customComponent[n.type] ? (d(), y(q(a(L).customComponent[n.type]), C({
|
|
2343
2342
|
key: 6,
|
|
2344
2343
|
modelValue: f.value,
|
|
2345
2344
|
"onUpdate:modelValue": l[6] || (l[6] = (t) => f.value = t)
|
|
2346
|
-
}, n.item.options?.search?.[n.type] || n.item.options?.[n.type],
|
|
2345
|
+
}, n.item.options?.search?.[n.type] || n.item.options?.[n.type], z(n.item.options?.search?.[n.type]?.on || n.item.options?.[n.type]?.on || {}), {
|
|
2347
2346
|
disabled: n.item.disabled?.search
|
|
2348
2347
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0);
|
|
2349
2348
|
}
|
|
2350
|
-
}),
|
|
2349
|
+
}), Ft = {
|
|
2351
2350
|
key: 0,
|
|
2352
2351
|
class: "relative curd-search fit-width"
|
|
2353
|
-
},
|
|
2352
|
+
}, At = { class: "mb-10 flex justify-between items-center fit-width" }, Tt = {
|
|
2354
2353
|
class: "flex items-center",
|
|
2355
2354
|
style: { gap: "10px" }
|
|
2356
|
-
},
|
|
2355
|
+
}, jt = { key: 0 }, Lt = { key: 1 }, Bt = { key: 2 }, Rt = { class: "export-btn" }, It = {
|
|
2357
2356
|
key: 1,
|
|
2358
2357
|
class: "export-btn"
|
|
2359
|
-
},
|
|
2358
|
+
}, Ht = {
|
|
2360
2359
|
class: "flex items-center table-tools-right",
|
|
2361
2360
|
style: { gap: "10px" }
|
|
2362
|
-
},
|
|
2361
|
+
}, Kt = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, Pt = { class: "dialog-footer" }, Nt = { key: 0 }, Wt = { key: 1 }, Jt = { class: "dialog-footer" }, qt = /* @__PURE__ */ N({
|
|
2363
2362
|
__name: "index",
|
|
2364
2363
|
props: {
|
|
2365
2364
|
/**
|
|
@@ -2382,11 +2381,11 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2382
2381
|
}
|
|
2383
2382
|
},
|
|
2384
2383
|
setup(i, { expose: o }) {
|
|
2385
|
-
const f = M.EDialog, n = i, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: s } =
|
|
2384
|
+
const f = M.EDialog, n = i, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: s } = Je(n);
|
|
2386
2385
|
return o({
|
|
2387
2386
|
conf: t
|
|
2388
|
-
}), (m,
|
|
2389
|
-
const u = ee("el-tooltip"), k =
|
|
2387
|
+
}), (m, p) => {
|
|
2388
|
+
const u = ee("el-tooltip"), k = Se("loading");
|
|
2390
2389
|
return d(), b("div", {
|
|
2391
2390
|
class: I(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2392
2391
|
}, [
|
|
@@ -2394,65 +2393,65 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2394
2393
|
class: I(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2395
2394
|
style: { overflow: "hidden" }
|
|
2396
2395
|
}, [
|
|
2397
|
-
|
|
2396
|
+
V(m.$slots, "box-left"),
|
|
2398
2397
|
U("div", {
|
|
2399
2398
|
class: I(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
|
|
2400
2399
|
}, [
|
|
2401
|
-
i.option.search?.show !== !1 ? (d(), b("div",
|
|
2400
|
+
i.option.search?.show !== !1 ? (d(), b("div", Ft, [
|
|
2402
2401
|
O(a(Q), {
|
|
2403
2402
|
model: a(t).search.form,
|
|
2404
2403
|
inline: "",
|
|
2405
2404
|
size: i.option.size?.search
|
|
2406
2405
|
}, {
|
|
2407
2406
|
default: g(() => [
|
|
2408
|
-
|
|
2407
|
+
V(m.$slots, "search-start", {
|
|
2409
2408
|
row: a(t).search.form
|
|
2410
2409
|
}),
|
|
2411
|
-
(d(!0), b(D, null, A(a(t).search.column.list, (
|
|
2412
|
-
key:
|
|
2410
|
+
(d(!0), b(D, null, A(a(t).search.column.list, (h) => (d(), b(D, {
|
|
2411
|
+
key: h.key
|
|
2413
2412
|
}, [
|
|
2414
|
-
|
|
2413
|
+
V(m.$slots, "search-" + h.key + "-start", {
|
|
2415
2414
|
row: a(t).search.form
|
|
2416
2415
|
}),
|
|
2417
|
-
(typeof
|
|
2416
|
+
(typeof h.show?.search == "function" ? h.show?.search(a(t).search.form) : h.show?.search) ? (d(), y(a(ae), {
|
|
2418
2417
|
key: 0,
|
|
2419
|
-
label:
|
|
2418
|
+
label: h.text?.search?.label ?? h.label
|
|
2420
2419
|
}, {
|
|
2421
2420
|
default: g(() => [
|
|
2422
|
-
|
|
2421
|
+
V(m.$slots, "search-" + h.key + "-left", {
|
|
2423
2422
|
row: a(t).search.form
|
|
2424
2423
|
}),
|
|
2425
|
-
|
|
2424
|
+
V(m.$slots, "search-" + h.key, {
|
|
2426
2425
|
row: a(t).search.form
|
|
2427
2426
|
}, () => [
|
|
2428
|
-
|
|
2427
|
+
h.options?.search?.type ? (d(), y(me, {
|
|
2429
2428
|
key: 0,
|
|
2430
|
-
item:
|
|
2429
|
+
item: h,
|
|
2431
2430
|
conf: a(t),
|
|
2432
|
-
type:
|
|
2433
|
-
}, null, 8, ["item", "conf", "type"])) : (d(),
|
|
2431
|
+
type: h.options.search.type
|
|
2432
|
+
}, null, 8, ["item", "conf", "type"])) : (d(), y(me, {
|
|
2434
2433
|
key: 1,
|
|
2435
|
-
item:
|
|
2434
|
+
item: h,
|
|
2436
2435
|
conf: a(t),
|
|
2437
|
-
type:
|
|
2436
|
+
type: h.type
|
|
2438
2437
|
}, null, 8, ["item", "conf", "type"]))
|
|
2439
2438
|
]),
|
|
2440
|
-
|
|
2439
|
+
V(m.$slots, "search-" + h.key + "-right", {
|
|
2441
2440
|
row: a(t).search.form
|
|
2442
2441
|
})
|
|
2443
2442
|
]),
|
|
2444
2443
|
_: 2
|
|
2445
2444
|
}, 1032, ["label"])) : v("", !0),
|
|
2446
|
-
|
|
2445
|
+
V(m.$slots, "search-" + h.key + "-end", {
|
|
2447
2446
|
row: a(t).search.form
|
|
2448
2447
|
})
|
|
2449
2448
|
], 64))), 128)),
|
|
2450
|
-
|
|
2449
|
+
V(m.$slots, "search-center", {
|
|
2451
2450
|
row: a(t).search.form
|
|
2452
2451
|
}),
|
|
2453
|
-
i.option.tools?.search || i.option.tools?.reset ? (d(),
|
|
2452
|
+
i.option.tools?.search || i.option.tools?.reset ? (d(), y(a(ae), { key: 0 }, {
|
|
2454
2453
|
default: g(() => [
|
|
2455
|
-
i.option.tools?.search ? (d(),
|
|
2454
|
+
i.option.tools?.search ? (d(), y(a(T), {
|
|
2456
2455
|
key: 0,
|
|
2457
2456
|
type: "primary",
|
|
2458
2457
|
onClick: a(t).search.submit
|
|
@@ -2462,7 +2461,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2462
2461
|
]),
|
|
2463
2462
|
_: 1
|
|
2464
2463
|
}, 8, ["onClick"])) : v("", !0),
|
|
2465
|
-
i.option.tools?.reset ? (d(),
|
|
2464
|
+
i.option.tools?.reset ? (d(), y(a(T), {
|
|
2466
2465
|
key: 1,
|
|
2467
2466
|
onClick: a(t).search.reset
|
|
2468
2467
|
}, {
|
|
@@ -2474,19 +2473,19 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2474
2473
|
]),
|
|
2475
2474
|
_: 1
|
|
2476
2475
|
})) : v("", !0),
|
|
2477
|
-
|
|
2476
|
+
V(m.$slots, "search-end", {
|
|
2478
2477
|
row: a(t).search.form
|
|
2479
2478
|
})
|
|
2480
2479
|
]),
|
|
2481
2480
|
_: 3
|
|
2482
2481
|
}, 8, ["model", "size"])
|
|
2483
2482
|
])) : v("", !0),
|
|
2484
|
-
U("div",
|
|
2485
|
-
U("div",
|
|
2486
|
-
a(l)(i.option.tools?.add) ? (d(), b("div",
|
|
2483
|
+
U("div", At, [
|
|
2484
|
+
U("div", Tt, [
|
|
2485
|
+
a(l)(i.option.tools?.add) ? (d(), b("div", jt, [
|
|
2487
2486
|
O(a(T), {
|
|
2488
2487
|
type: "primary",
|
|
2489
|
-
onClick:
|
|
2488
|
+
onClick: p[0] || (p[0] = (h) => a(t).update.open(a(f).Add)),
|
|
2490
2489
|
size: i.option.size?.search
|
|
2491
2490
|
}, {
|
|
2492
2491
|
default: g(() => [
|
|
@@ -2495,10 +2494,10 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2495
2494
|
_: 1
|
|
2496
2495
|
}, 8, ["size"])
|
|
2497
2496
|
])) : v("", !0),
|
|
2498
|
-
i.option.table?.selectable && a(l)(i.option.tools?.delete) ? (d(), b("div",
|
|
2497
|
+
i.option.table?.selectable && a(l)(i.option.tools?.delete) ? (d(), b("div", Lt, [
|
|
2499
2498
|
O(a(T), {
|
|
2500
2499
|
type: "danger",
|
|
2501
|
-
onClick:
|
|
2500
|
+
onClick: p[1] || (p[1] = (h) => a(t).remove.open(a(t).table.selection.list)),
|
|
2502
2501
|
size: i.option.size?.search
|
|
2503
2502
|
}, {
|
|
2504
2503
|
default: g(() => [
|
|
@@ -2507,10 +2506,10 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2507
2506
|
_: 1
|
|
2508
2507
|
}, 8, ["size"])
|
|
2509
2508
|
])) : v("", !0),
|
|
2510
|
-
i.option.tools?.expand ? (d(), b("div",
|
|
2509
|
+
i.option.tools?.expand ? (d(), b("div", Bt, [
|
|
2511
2510
|
O(a(T), {
|
|
2512
2511
|
type: "warning",
|
|
2513
|
-
onClick:
|
|
2512
|
+
onClick: p[2] || (p[2] = (h) => a(t).table.expand.all()),
|
|
2514
2513
|
size: i.option.size?.search
|
|
2515
2514
|
}, {
|
|
2516
2515
|
default: g(() => [
|
|
@@ -2520,7 +2519,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2520
2519
|
}, 8, ["size"])
|
|
2521
2520
|
])) : v("", !0),
|
|
2522
2521
|
i.option.tools?.export?.show ? (d(), b(D, { key: 3 }, [
|
|
2523
|
-
i.option.tools?.export?.dropdown?.show ? (d(),
|
|
2522
|
+
i.option.tools?.export?.dropdown?.show ? (d(), y(a($e), {
|
|
2524
2523
|
key: 0,
|
|
2525
2524
|
onCommand: a(t).export.click
|
|
2526
2525
|
}, {
|
|
@@ -2529,7 +2528,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2529
2528
|
size: i.option.size?.search
|
|
2530
2529
|
}, {
|
|
2531
2530
|
default: g(() => [
|
|
2532
|
-
i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || a(l)(i.option.tools?.delete)) ? (d(),
|
|
2531
|
+
i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || a(l)(i.option.tools?.delete)) ? (d(), y(a(ne), {
|
|
2533
2532
|
key: 0,
|
|
2534
2533
|
command: "select"
|
|
2535
2534
|
}, {
|
|
@@ -2538,7 +2537,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2538
2537
|
]),
|
|
2539
2538
|
_: 1
|
|
2540
2539
|
})) : v("", !0),
|
|
2541
|
-
i.option.tools?.export?.dropdown?.page ? (d(),
|
|
2540
|
+
i.option.tools?.export?.dropdown?.page ? (d(), y(a(ne), {
|
|
2542
2541
|
key: 1,
|
|
2543
2542
|
command: "page"
|
|
2544
2543
|
}, {
|
|
@@ -2547,7 +2546,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2547
2546
|
]),
|
|
2548
2547
|
_: 1
|
|
2549
2548
|
})) : v("", !0),
|
|
2550
|
-
i.option.tools?.export?.dropdown?.all ? (d(),
|
|
2549
|
+
i.option.tools?.export?.dropdown?.all ? (d(), y(a(ne), {
|
|
2551
2550
|
key: 2,
|
|
2552
2551
|
command: "all"
|
|
2553
2552
|
}, {
|
|
@@ -2561,7 +2560,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2561
2560
|
}, 8, ["size"])
|
|
2562
2561
|
]),
|
|
2563
2562
|
default: g(() => [
|
|
2564
|
-
U("div",
|
|
2563
|
+
U("div", Rt, [
|
|
2565
2564
|
O(a(T), {
|
|
2566
2565
|
type: "warning",
|
|
2567
2566
|
loading: a(t).export.loading,
|
|
@@ -2575,12 +2574,12 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2575
2574
|
])
|
|
2576
2575
|
]),
|
|
2577
2576
|
_: 1
|
|
2578
|
-
}, 8, ["onCommand"])) : (d(), b("div",
|
|
2577
|
+
}, 8, ["onCommand"])) : (d(), b("div", It, [
|
|
2579
2578
|
O(a(T), {
|
|
2580
2579
|
type: "warning",
|
|
2581
2580
|
loading: a(t).export.loading,
|
|
2582
2581
|
size: i.option.size?.search,
|
|
2583
|
-
onClick:
|
|
2582
|
+
onClick: p[3] || (p[3] = (h) => a(t).export.run.start("all"))
|
|
2584
2583
|
}, {
|
|
2585
2584
|
default: g(() => [
|
|
2586
2585
|
E(S(a(w).tCurd("export")), 1)
|
|
@@ -2589,16 +2588,16 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2589
2588
|
}, 8, ["loading", "size"])
|
|
2590
2589
|
]))
|
|
2591
2590
|
], 64)) : v("", !0),
|
|
2592
|
-
|
|
2591
|
+
V(m.$slots, "tools-left")
|
|
2593
2592
|
]),
|
|
2594
|
-
U("div",
|
|
2595
|
-
|
|
2596
|
-
a(t).page.showTools ? (d(),
|
|
2593
|
+
U("div", Ht, [
|
|
2594
|
+
V(m.$slots, "tools-right"),
|
|
2595
|
+
a(t).page.showTools ? (d(), y(a(pe), C({
|
|
2597
2596
|
key: 0,
|
|
2598
2597
|
"current-page": a(t).page.num,
|
|
2599
|
-
"onUpdate:currentPage":
|
|
2598
|
+
"onUpdate:currentPage": p[4] || (p[4] = (h) => a(t).page.num = h),
|
|
2600
2599
|
"page-size": a(t).page.size,
|
|
2601
|
-
"onUpdate:pageSize":
|
|
2600
|
+
"onUpdate:pageSize": p[5] || (p[5] = (h) => a(t).page.size = h),
|
|
2602
2601
|
background: "",
|
|
2603
2602
|
"page-sizes": a(t).page.sizeList,
|
|
2604
2603
|
"pager-count": a(t).page.pagerCount,
|
|
@@ -2607,8 +2606,8 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2607
2606
|
size: i.option.size?.table,
|
|
2608
2607
|
onSizeChange: a(t).table.getList,
|
|
2609
2608
|
onCurrentChange: a(t).table.getList
|
|
2610
|
-
}, i.option.page?.pagination || {},
|
|
2611
|
-
i.option.tools?.expandColumn === void 0 || i.option.tools?.expandColumn ? (d(),
|
|
2609
|
+
}, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
|
|
2610
|
+
i.option.tools?.expandColumn === void 0 || i.option.tools?.expandColumn ? (d(), y(u, {
|
|
2612
2611
|
key: 1,
|
|
2613
2612
|
effect: "dark",
|
|
2614
2613
|
content: a(t).table.header.group.expand ? a(w).tCurd("mergeColumn") : a(w).tCurd("expandColumn"),
|
|
@@ -2617,10 +2616,10 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2617
2616
|
default: g(() => [
|
|
2618
2617
|
U("div", {
|
|
2619
2618
|
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2620
|
-
onClick:
|
|
2621
|
-
(...
|
|
2619
|
+
onClick: p[6] || (p[6] = //@ts-ignore
|
|
2620
|
+
(...h) => a(t).table.header.group.toggleExpandAll && a(t).table.header.group.toggleExpandAll(...h))
|
|
2622
2621
|
}, [
|
|
2623
|
-
a(t).table.header.group.expand ? (d(),
|
|
2622
|
+
a(t).table.header.group.expand ? (d(), y(Et, { key: 0 })) : (d(), y(Mt, { key: 1 }))
|
|
2624
2623
|
], 2)
|
|
2625
2624
|
]),
|
|
2626
2625
|
_: 1
|
|
@@ -2628,10 +2627,10 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2628
2627
|
i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (d(), b("div", {
|
|
2629
2628
|
key: 2,
|
|
2630
2629
|
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2631
|
-
onClick:
|
|
2632
|
-
(...
|
|
2630
|
+
onClick: p[7] || (p[7] = //@ts-ignore
|
|
2631
|
+
(...h) => a(t).table.getList && a(t).table.getList(...h))
|
|
2633
2632
|
}, [
|
|
2634
|
-
O(
|
|
2633
|
+
O(Ze)
|
|
2635
2634
|
], 2)) : v("", !0)
|
|
2636
2635
|
])
|
|
2637
2636
|
]),
|
|
@@ -2641,7 +2640,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2641
2640
|
U("div", {
|
|
2642
2641
|
class: I(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2643
2642
|
}, [
|
|
2644
|
-
|
|
2643
|
+
Me((d(), y(a(Ee), C({
|
|
2645
2644
|
ref_key: "tableRef",
|
|
2646
2645
|
ref: s,
|
|
2647
2646
|
data: a(t).table.data,
|
|
@@ -2650,9 +2649,9 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2650
2649
|
onSortChange: a(t).table.sort.change,
|
|
2651
2650
|
"expand-row-keys": a(t).table.expand.rowKeys,
|
|
2652
2651
|
onExpandChange: a(t).table.expand.change
|
|
2653
|
-
}, i.option.table,
|
|
2652
|
+
}, i.option.table, z(i.option.table?.on || {})), {
|
|
2654
2653
|
default: g(() => [
|
|
2655
|
-
(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || a(l)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (d(),
|
|
2654
|
+
(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || a(l)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (d(), y(a(oe), C({
|
|
2656
2655
|
key: 0,
|
|
2657
2656
|
type: "selection",
|
|
2658
2657
|
width: "40",
|
|
@@ -2660,8 +2659,8 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2660
2659
|
fixed: "left",
|
|
2661
2660
|
"show-overflow-tooltip": !1,
|
|
2662
2661
|
className: "cc1-form-selectable-column"
|
|
2663
|
-
}, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {},
|
|
2664
|
-
(typeof i.option.table?.index == "object" ? i.option.table?.index?.show : i.option.table?.index) ? (d(),
|
|
2662
|
+
}, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {}, z(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
|
|
2663
|
+
(typeof i.option.table?.index == "object" ? i.option.table?.index?.show : i.option.table?.index) ? (d(), y(a(oe), C({
|
|
2665
2664
|
key: 1,
|
|
2666
2665
|
type: "index",
|
|
2667
2666
|
fixed: "left",
|
|
@@ -2670,20 +2669,20 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2670
2669
|
label: "#",
|
|
2671
2670
|
"show-overflow-tooltip": !1,
|
|
2672
2671
|
className: "cc1-form-index-column"
|
|
2673
|
-
}, typeof i.option.table?.index == "object" ? i.option.table?.index : {},
|
|
2674
|
-
O(
|
|
2672
|
+
}, typeof i.option.table?.index == "object" ? i.option.table?.index : {}, z(typeof i.option.table?.index == "object" ? i.option.table?.index?.on || {} : {})), null, 16)) : v("", !0),
|
|
2673
|
+
O(bt, {
|
|
2675
2674
|
conf: a(t),
|
|
2676
2675
|
columnList: a(t).table.column.list,
|
|
2677
2676
|
option: i.option
|
|
2678
2677
|
}, G({ _: 2 }, [
|
|
2679
|
-
A(m.$slots, (
|
|
2680
|
-
name:
|
|
2681
|
-
fn: g((
|
|
2682
|
-
|
|
2678
|
+
A(m.$slots, (h, c) => ({
|
|
2679
|
+
name: c,
|
|
2680
|
+
fn: g(($) => [
|
|
2681
|
+
V(m.$slots, c, Fe(Ae($ || {})))
|
|
2683
2682
|
])
|
|
2684
2683
|
}))
|
|
2685
2684
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2686
|
-
a(l)(i.option.table?.add) || a(l)(i.option.table?.update) || a(l)(i.option.table?.delete) || a(l)(i.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (d(),
|
|
2685
|
+
a(l)(i.option.table?.add) || a(l)(i.option.table?.update) || a(l)(i.option.table?.delete) || a(l)(i.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (d(), y(a(oe), C({
|
|
2687
2686
|
key: 2,
|
|
2688
2687
|
width: "auto",
|
|
2689
2688
|
"max-width": "200",
|
|
@@ -2691,17 +2690,17 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2691
2690
|
fixed: "right"
|
|
2692
2691
|
}, i.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2693
2692
|
header: g(() => [
|
|
2694
|
-
|
|
2693
|
+
V(m.$slots, "table-header-op", {}, () => [
|
|
2695
2694
|
E(S(a(w).tCurd("operation")), 1)
|
|
2696
2695
|
])
|
|
2697
2696
|
]),
|
|
2698
|
-
default: g(({ row:
|
|
2697
|
+
default: g(({ row: h }) => [
|
|
2699
2698
|
O(a(Q), {
|
|
2700
2699
|
size: i.option.size?.table
|
|
2701
2700
|
}, {
|
|
2702
2701
|
default: g(() => [
|
|
2703
|
-
|
|
2704
|
-
a(t).update.type === a(f).Update && i.option.table?.inlineEdit && a(t).update.form[n.option.table?.rowKey] ===
|
|
2702
|
+
V(m.$slots, "table-op-left", { row: h }),
|
|
2703
|
+
a(t).update.type === a(f).Update && i.option.table?.inlineEdit && a(t).update.form[n.option.table?.rowKey] === h[n.option.table?.rowKey] ? (d(), b(D, { key: 0 }, [
|
|
2705
2704
|
O(a(T), {
|
|
2706
2705
|
link: "",
|
|
2707
2706
|
type: "info",
|
|
@@ -2723,53 +2722,53 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2723
2722
|
]),
|
|
2724
2723
|
_: 1
|
|
2725
2724
|
}, 8, ["onClick", "loading"]),
|
|
2726
|
-
|
|
2725
|
+
V(m.$slots, "table-op-edit-right", { row: h })
|
|
2727
2726
|
], 64)) : (d(), b(D, { key: 1 }, [
|
|
2728
|
-
a(l)(i.option.table?.add,
|
|
2727
|
+
a(l)(i.option.table?.add, h) ? (d(), y(a(T), {
|
|
2729
2728
|
key: 0,
|
|
2730
2729
|
link: "",
|
|
2731
2730
|
type: "primary",
|
|
2732
|
-
onClick: (
|
|
2731
|
+
onClick: (c) => a(t).update.open(a(f).Add, h)
|
|
2733
2732
|
}, {
|
|
2734
2733
|
default: g(() => [
|
|
2735
2734
|
E(S(a(w).tCurd("add")), 1)
|
|
2736
2735
|
]),
|
|
2737
2736
|
_: 2
|
|
2738
2737
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2739
|
-
a(l)(i.option.table?.view,
|
|
2738
|
+
a(l)(i.option.table?.view, h) ? (d(), y(a(T), {
|
|
2740
2739
|
key: 1,
|
|
2741
2740
|
link: "",
|
|
2742
2741
|
type: "primary",
|
|
2743
|
-
onClick: (
|
|
2742
|
+
onClick: (c) => a(t).update.open(a(f).View, h)
|
|
2744
2743
|
}, {
|
|
2745
2744
|
default: g(() => [
|
|
2746
2745
|
E(S(a(w).tCurd("view")), 1)
|
|
2747
2746
|
]),
|
|
2748
2747
|
_: 2
|
|
2749
2748
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2750
|
-
a(l)(i.option.table?.update,
|
|
2749
|
+
a(l)(i.option.table?.update, h) ? (d(), y(a(T), {
|
|
2751
2750
|
key: 2,
|
|
2752
2751
|
link: "",
|
|
2753
2752
|
type: "warning",
|
|
2754
|
-
onClick: (
|
|
2753
|
+
onClick: (c) => a(t).update.open(a(f).Update, h)
|
|
2755
2754
|
}, {
|
|
2756
2755
|
default: g(() => [
|
|
2757
2756
|
E(S(a(w).tCurd("edit")), 1)
|
|
2758
2757
|
]),
|
|
2759
2758
|
_: 2
|
|
2760
2759
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2761
|
-
a(l)(i.option.table?.delete,
|
|
2760
|
+
a(l)(i.option.table?.delete, h) ? (d(), y(a(T), {
|
|
2762
2761
|
key: 3,
|
|
2763
2762
|
link: "",
|
|
2764
2763
|
type: "danger",
|
|
2765
|
-
onClick: (
|
|
2764
|
+
onClick: (c) => a(t).remove.open([h])
|
|
2766
2765
|
}, {
|
|
2767
2766
|
default: g(() => [
|
|
2768
2767
|
E(S(a(w).tCurd("delete")), 1)
|
|
2769
2768
|
]),
|
|
2770
2769
|
_: 2
|
|
2771
2770
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2772
|
-
|
|
2771
|
+
V(m.$slots, "table-op-right", { row: h })
|
|
2773
2772
|
], 64))
|
|
2774
2773
|
]),
|
|
2775
2774
|
_: 2
|
|
@@ -2784,13 +2783,13 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2784
2783
|
])
|
|
2785
2784
|
], 2)
|
|
2786
2785
|
], 2),
|
|
2787
|
-
U("div",
|
|
2788
|
-
(i.option.page?.show === void 0 || i.option.page?.show) && !a(t).page.showTools ? (d(),
|
|
2786
|
+
U("div", Kt, [
|
|
2787
|
+
(i.option.page?.show === void 0 || i.option.page?.show) && !a(t).page.showTools ? (d(), y(a(pe), C({
|
|
2789
2788
|
key: 0,
|
|
2790
2789
|
"current-page": a(t).page.num,
|
|
2791
|
-
"onUpdate:currentPage":
|
|
2790
|
+
"onUpdate:currentPage": p[8] || (p[8] = (h) => a(t).page.num = h),
|
|
2792
2791
|
"page-size": a(t).page.size,
|
|
2793
|
-
"onUpdate:pageSize":
|
|
2792
|
+
"onUpdate:pageSize": p[9] || (p[9] = (h) => a(t).page.size = h),
|
|
2794
2793
|
background: "",
|
|
2795
2794
|
"page-sizes": a(t).page.sizeList,
|
|
2796
2795
|
"pager-count": a(t).page.pagerCount,
|
|
@@ -2799,19 +2798,19 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2799
2798
|
size: i.option.size?.table,
|
|
2800
2799
|
onSizeChange: a(t).table.getList,
|
|
2801
2800
|
onCurrentChange: a(t).table.getList
|
|
2802
|
-
}, i.option.page?.pagination || {},
|
|
2801
|
+
}, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2803
2802
|
])
|
|
2804
2803
|
], 2),
|
|
2805
|
-
|
|
2804
|
+
V(m.$slots, "box-right")
|
|
2806
2805
|
], 2),
|
|
2807
|
-
O(a(
|
|
2806
|
+
O(a(ie), C({
|
|
2808
2807
|
modelValue: a(t).update.show,
|
|
2809
|
-
"onUpdate:modelValue":
|
|
2808
|
+
"onUpdate:modelValue": p[10] || (p[10] = (h) => a(t).update.show = h),
|
|
2810
2809
|
title: a(t).update.title,
|
|
2811
2810
|
"before-close": a(t).update.close
|
|
2812
2811
|
}, i.option.dialog), {
|
|
2813
2812
|
footer: g(() => [
|
|
2814
|
-
U("span",
|
|
2813
|
+
U("span", Pt, [
|
|
2815
2814
|
O(a(Q), {
|
|
2816
2815
|
size: i.option.size?.form
|
|
2817
2816
|
}, {
|
|
@@ -2824,7 +2823,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2824
2823
|
]),
|
|
2825
2824
|
_: 1
|
|
2826
2825
|
}, 8, ["onClick"]),
|
|
2827
|
-
a(t).update.type !== a(f).View ? (d(),
|
|
2826
|
+
a(t).update.type !== a(f).View ? (d(), y(a(T), {
|
|
2828
2827
|
key: 0,
|
|
2829
2828
|
type: "primary",
|
|
2830
2829
|
onClick: a(t).update.submit,
|
|
@@ -2850,13 +2849,13 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2850
2849
|
class: "update-dialog-form"
|
|
2851
2850
|
}, {
|
|
2852
2851
|
default: g(() => [
|
|
2853
|
-
a(t).update.showContent ? (d(!0), b(D, { key: 0 }, A(a(t).update.formColumn, (
|
|
2852
|
+
a(t).update.showContent ? (d(!0), b(D, { key: 0 }, A(a(t).update.formColumn, (h) => (d(), b(D, null, [
|
|
2854
2853
|
a(l)(
|
|
2855
2854
|
(() => {
|
|
2856
|
-
const
|
|
2857
|
-
B?.item?.children ?
|
|
2855
|
+
const c = [], $ = (B) => {
|
|
2856
|
+
B?.item?.children ? $(B.item.children) : c.push(...B.map((R) => R.item?.show?.form));
|
|
2858
2857
|
};
|
|
2859
|
-
return
|
|
2858
|
+
return $(h), c;
|
|
2860
2859
|
})(),
|
|
2861
2860
|
a(t).update.form,
|
|
2862
2861
|
a(t).update.type
|
|
@@ -2866,29 +2865,29 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2866
2865
|
stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
|
|
2867
2866
|
}])
|
|
2868
2867
|
}, [
|
|
2869
|
-
|
|
2868
|
+
V(m.$slots, "form-start", {
|
|
2870
2869
|
row: a(t).update.form
|
|
2871
2870
|
}),
|
|
2872
|
-
(d(!0), b(D, null, A(
|
|
2873
|
-
a(l)(
|
|
2871
|
+
(d(!0), b(D, null, A(h, (c) => (d(), b(D, null, [
|
|
2872
|
+
a(l)(c.item.show?.form, a(t).update.form, a(t).update.type) ? (d(), b("div", {
|
|
2874
2873
|
key: 0,
|
|
2875
|
-
class: I([
|
|
2874
|
+
class: I([c.item.form.span > 0 ? `col-${a(t).getColumnSpan(c, h)}` : "col", `form-item-col-${c.item.key}`])
|
|
2876
2875
|
}, [
|
|
2877
|
-
(d(!0), b(D, null, A(
|
|
2878
|
-
key:
|
|
2876
|
+
(d(!0), b(D, null, A(c.item.children ? c.children : [c], ($) => (d(), y(Vt, {
|
|
2877
|
+
key: $.item.key,
|
|
2879
2878
|
conf: a(t),
|
|
2880
|
-
item:
|
|
2879
|
+
item: $
|
|
2881
2880
|
}, G({ _: 2 }, [
|
|
2882
|
-
A(m.$slots, (B,
|
|
2883
|
-
name:
|
|
2884
|
-
fn: g((
|
|
2885
|
-
|
|
2881
|
+
A(m.$slots, (B, R) => ({
|
|
2882
|
+
name: R,
|
|
2883
|
+
fn: g((j) => [
|
|
2884
|
+
V(m.$slots, R, C({ ref_for: !0 }, j || {}))
|
|
2886
2885
|
])
|
|
2887
2886
|
}))
|
|
2888
2887
|
]), 1032, ["conf", "item"]))), 128))
|
|
2889
2888
|
], 2)) : v("", !0)
|
|
2890
2889
|
], 64))), 256)),
|
|
2891
|
-
|
|
2890
|
+
V(m.$slots, "form-end", {
|
|
2892
2891
|
row: a(t).update.form
|
|
2893
2892
|
})
|
|
2894
2893
|
], 2)) : v("", !0)
|
|
@@ -2899,14 +2898,14 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2899
2898
|
]),
|
|
2900
2899
|
_: 3
|
|
2901
2900
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2902
|
-
O(a(
|
|
2901
|
+
O(a(ie), {
|
|
2903
2902
|
modelValue: a(t).remove.show,
|
|
2904
|
-
"onUpdate:modelValue":
|
|
2903
|
+
"onUpdate:modelValue": p[11] || (p[11] = (h) => a(t).remove.show = h),
|
|
2905
2904
|
title: a(t).remove.title,
|
|
2906
2905
|
"close-on-click-modal": !1
|
|
2907
2906
|
}, {
|
|
2908
2907
|
footer: g(() => [
|
|
2909
|
-
U("span",
|
|
2908
|
+
U("span", Jt, [
|
|
2910
2909
|
O(a(Q), {
|
|
2911
2910
|
size: i.option.size?.form
|
|
2912
2911
|
}, {
|
|
@@ -2935,16 +2934,16 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2935
2934
|
])
|
|
2936
2935
|
]),
|
|
2937
2936
|
default: g(() => [
|
|
2938
|
-
i.option.dialog?.delete?.content ? (d(), b("div",
|
|
2939
|
-
O(
|
|
2937
|
+
i.option.dialog?.delete?.content ? (d(), b("div", Nt, [
|
|
2938
|
+
O(_e, {
|
|
2940
2939
|
content: i.option.dialog?.delete?.content,
|
|
2941
2940
|
value: a(t).remove.items
|
|
2942
2941
|
}, null, 8, ["content", "value"])
|
|
2943
|
-
])) : (d(), b("div",
|
|
2942
|
+
])) : (d(), b("div", Wt, S(a(w).tCurd("confirmDeleteMessage", a(t).remove.items.length)), 1))
|
|
2944
2943
|
]),
|
|
2945
2944
|
_: 1
|
|
2946
2945
|
}, 8, ["modelValue", "title"]),
|
|
2947
|
-
O(
|
|
2946
|
+
O(Qe, {
|
|
2948
2947
|
ref_key: "switchConfirmRef",
|
|
2949
2948
|
ref: e,
|
|
2950
2949
|
size: i.option.size?.form
|
|
@@ -2953,7 +2952,7 @@ const Ft = /* @__PURE__ */ Y(Ut, [["render", Mt]]), ce = /* @__PURE__ */ N({
|
|
|
2953
2952
|
};
|
|
2954
2953
|
}
|
|
2955
2954
|
});
|
|
2956
|
-
class
|
|
2955
|
+
class Zt {
|
|
2957
2956
|
/**
|
|
2958
2957
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2959
2958
|
*
|
|
@@ -2990,34 +2989,34 @@ class xt {
|
|
|
2990
2989
|
}
|
|
2991
2990
|
const s = new FileReader();
|
|
2992
2991
|
s.onload = async (m) => {
|
|
2993
|
-
const
|
|
2994
|
-
f(
|
|
2992
|
+
const p = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
|
|
2993
|
+
f(p);
|
|
2995
2994
|
}, s.onerror = () => {
|
|
2996
2995
|
M.fail("文件读取失败"), n("文件读取失败");
|
|
2997
2996
|
}, s.readAsText(r), document.body.removeChild(l);
|
|
2998
2997
|
}, document.body.appendChild(l), l.click();
|
|
2999
2998
|
});
|
|
3000
2999
|
}
|
|
3001
|
-
const
|
|
3002
|
-
if (i.component("TCurd",
|
|
3003
|
-
|
|
3000
|
+
const Qt = (i, o) => {
|
|
3001
|
+
if (i.component("TCurd", qt), i.component("TFormList", fe), i.component("TColumn", Ne), o?.customComponent) {
|
|
3002
|
+
L.customComponent = o.customComponent;
|
|
3004
3003
|
for (const f in o.customComponent)
|
|
3005
3004
|
i.component(f, o.customComponent[f]);
|
|
3006
3005
|
}
|
|
3007
|
-
},
|
|
3008
|
-
install:
|
|
3006
|
+
}, xt = {
|
|
3007
|
+
install: Qt
|
|
3009
3008
|
};
|
|
3010
3009
|
export {
|
|
3011
3010
|
P as ArrUtil,
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3011
|
+
We as ExcelUtil,
|
|
3012
|
+
Ne as TColumn,
|
|
3013
|
+
qt as TCurd,
|
|
3014
|
+
Zt as TFile,
|
|
3015
|
+
L as TForm,
|
|
3017
3016
|
F as TFormConfig,
|
|
3018
3017
|
w as TFormI18n,
|
|
3019
|
-
|
|
3018
|
+
fe as TFormList,
|
|
3020
3019
|
M as TSys,
|
|
3021
|
-
|
|
3022
|
-
|
|
3020
|
+
xt as default,
|
|
3021
|
+
Qt as install
|
|
3023
3022
|
};
|