cc1-form 1.2.20 → 1.2.22
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 +460 -434
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/column.vue.d.ts +51 -37
- package/dist/components/TCurd/formColumn.vue.d.ts +25 -25
- package/dist/components/TCurd/index.d.ts +26 -26
- package/dist/components/TCurd/index.vue.d.ts +57 -57
- package/dist/components/TCurd/indexType.d.ts +5 -5
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 se, ElRadio as de, ElTreeSelect as he, ElDatePicker as ue, ElDialog as ie, ElButton as T, ElTableColumn as oe, ElDropdown as $e, ElDropdownMenu as De, ElDropdownItem as ne, ElPagination as ce, ElTable as Ee } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as N, reactive as
|
|
4
|
-
class
|
|
3
|
+
import { defineComponent as N, reactive as fe, onMounted as ye, resolveComponent as ee, createElementBlock as b, createCommentVNode as v, openBlock as d, renderSlot as V, createVNode as U, withCtx as g, createTextVNode as E, Fragment as D, renderList as A, createBlock as y, normalizeClass as I, normalizeStyle as ge, ref as J, watch as re, unref as l, createElementVNode as S, mergeProps as C, toHandlers as z, resolveDynamicComponent as q, toDisplayString as M, 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
|
+
class O {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
7
7
|
*/
|
|
@@ -43,9 +43,9 @@ class M {
|
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
45
|
static loadModule = async (o) => {
|
|
46
|
-
if (!
|
|
46
|
+
if (!O.moduleObj[o])
|
|
47
47
|
throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
|
|
48
|
-
const f = await
|
|
48
|
+
const f = await O.moduleObj[o]();
|
|
49
49
|
return f.default ?? f;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -63,9 +63,9 @@ class M {
|
|
|
63
63
|
* @param options 其他选项
|
|
64
64
|
*/
|
|
65
65
|
static showMessage(o, f, n = {}) {
|
|
66
|
-
const
|
|
67
|
-
if (!this.tipMessages[o] ||
|
|
68
|
-
this.tipMessages[o] =
|
|
66
|
+
const a = Date.now();
|
|
67
|
+
if (!this.tipMessages[o] || a - this.tipMessages[o] > this.tipMessagesGap) {
|
|
68
|
+
this.tipMessages[o] = a;
|
|
69
69
|
const t = Object.assign(
|
|
70
70
|
{
|
|
71
71
|
message: o,
|
|
@@ -117,11 +117,11 @@ class M {
|
|
|
117
117
|
*/
|
|
118
118
|
static openUrl = (o, f = !0) => {
|
|
119
119
|
if (f) {
|
|
120
|
-
let n = screen.width / 2 - 500,
|
|
120
|
+
let n = screen.width / 2 - 500, a = screen.height / 2 - 800 / 2 - 30;
|
|
121
121
|
window.open(
|
|
122
122
|
o,
|
|
123
123
|
"_blank",
|
|
124
|
-
"toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" +
|
|
124
|
+
"toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + a + ", left=" + n
|
|
125
125
|
);
|
|
126
126
|
} else
|
|
127
127
|
window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
|
|
@@ -132,10 +132,10 @@ class M {
|
|
|
132
132
|
* @returns
|
|
133
133
|
*/
|
|
134
134
|
static getImgPic = (o) => new Promise(async (f, n) => {
|
|
135
|
-
let
|
|
136
|
-
const t = await
|
|
135
|
+
let a = document.getElementById(o.id);
|
|
136
|
+
const t = await O.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
|
-
t(
|
|
138
|
+
t(a, {
|
|
139
139
|
logging: !1,
|
|
140
140
|
allowTaint: !0,
|
|
141
141
|
scale: window.devicePixelRatio,
|
|
@@ -538,9 +538,9 @@ class L {
|
|
|
538
538
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
539
539
|
*/
|
|
540
540
|
static findOptions = (o, f) => {
|
|
541
|
-
const n = o.column.find((t) => t.key === f),
|
|
541
|
+
const n = o.column.find((t) => t.key === f), a = (t) => t.replace(/-([a-z])/g, (e, r) => r.toUpperCase());
|
|
542
542
|
if (n)
|
|
543
|
-
return n.options[
|
|
543
|
+
return n.options[a(n.type)];
|
|
544
544
|
};
|
|
545
545
|
/**
|
|
546
546
|
* 更新组件数据
|
|
@@ -559,8 +559,8 @@ class L {
|
|
|
559
559
|
)
|
|
560
560
|
*/
|
|
561
561
|
static setOptionsData = (o, f, n) => {
|
|
562
|
-
const
|
|
563
|
-
|
|
562
|
+
const a = L.findOptions(o, f);
|
|
563
|
+
a && (a.data = n);
|
|
564
564
|
};
|
|
565
565
|
static form = {
|
|
566
566
|
openBefore: {
|
|
@@ -571,9 +571,9 @@ class L {
|
|
|
571
571
|
* @param treeData 树形数据
|
|
572
572
|
* @param option 组件配置
|
|
573
573
|
*/
|
|
574
|
-
parentId: (o, f, n,
|
|
574
|
+
parentId: (o, f, n, a) => {
|
|
575
575
|
const t = F.config.table.rowKey;
|
|
576
|
-
o ? f.type ===
|
|
576
|
+
o ? f.type === O.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(a, "parentId", [{ [t]: "0", title: "根", children: n }]);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
};
|
|
@@ -621,7 +621,7 @@ class w {
|
|
|
621
621
|
return o(...f);
|
|
622
622
|
o = String(o);
|
|
623
623
|
let n = 0;
|
|
624
|
-
return o.replace(/{([^}]+)}/g, (
|
|
624
|
+
return o.replace(/{([^}]+)}/g, (a, t) => n < f.length ? String(f[n++]) : `{${t}}`);
|
|
625
625
|
}
|
|
626
626
|
static setI18n = (o) => {
|
|
627
627
|
w.curd = ObjectUtil.deepMerge(w.curd, o);
|
|
@@ -645,12 +645,12 @@ class P {
|
|
|
645
645
|
*/
|
|
646
646
|
static setId = (o, f, n) => {
|
|
647
647
|
f[o] || (f[o] = []);
|
|
648
|
-
const
|
|
648
|
+
const a = F.config.table.rowKey;
|
|
649
649
|
f[o].forEach((t) => {
|
|
650
650
|
n.forEach((e) => {
|
|
651
651
|
let r = e.default ?? "";
|
|
652
652
|
e.type === "number" && (r = e.default ?? 0), e.type === "boolean" && (r = e.default ?? !1), e.type === "time" && (r = e.default ?? /* @__PURE__ */ new Date()), t[e.value] === void 0 && (t[e.value] = r);
|
|
653
|
-
}), t[
|
|
653
|
+
}), t[a] || (t[a] = P.getIdFun());
|
|
654
654
|
});
|
|
655
655
|
};
|
|
656
656
|
/**
|
|
@@ -660,7 +660,7 @@ class P {
|
|
|
660
660
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
661
661
|
* @param callback 回调函数
|
|
662
662
|
*/
|
|
663
|
-
static add = (o, f, n,
|
|
663
|
+
static add = (o, f, n, a) => {
|
|
664
664
|
const t = JSONUtil.cp(n);
|
|
665
665
|
P.setId(o, f, n);
|
|
666
666
|
const e = F.config.table.rowKey;
|
|
@@ -672,7 +672,7 @@ class P {
|
|
|
672
672
|
},
|
|
673
673
|
{ [e]: P.getIdFun() }
|
|
674
674
|
)
|
|
675
|
-
),
|
|
675
|
+
), a?.(f);
|
|
676
676
|
};
|
|
677
677
|
/**
|
|
678
678
|
* 删除数组元素
|
|
@@ -681,9 +681,9 @@ class P {
|
|
|
681
681
|
* @param item 元素-如:{_id:''}
|
|
682
682
|
* @param callback 回调函数
|
|
683
683
|
*/
|
|
684
|
-
static remove = (o, f, n,
|
|
684
|
+
static remove = (o, f, n, a) => {
|
|
685
685
|
const t = F.config.table.rowKey;
|
|
686
|
-
f[o] = f[o].filter((e) => e[t] !== n[t]),
|
|
686
|
+
f[o] = f[o].filter((e) => e[t] !== n[t]), a?.(f);
|
|
687
687
|
};
|
|
688
688
|
/**
|
|
689
689
|
* 获取没有id的数据
|
|
@@ -692,9 +692,9 @@ class P {
|
|
|
692
692
|
* @returns 没有id的数据
|
|
693
693
|
*/
|
|
694
694
|
static getNoIdData = (o, f) => {
|
|
695
|
-
const n = JSONUtil.cp(o),
|
|
695
|
+
const n = JSONUtil.cp(o), a = F.config.table.rowKey;
|
|
696
696
|
return n.forEach((t) => {
|
|
697
|
-
t[
|
|
697
|
+
t[a] && delete t[a], f && t[f] && P.getNoIdData(t[f], f);
|
|
698
698
|
}), n;
|
|
699
699
|
};
|
|
700
700
|
}
|
|
@@ -705,7 +705,7 @@ const je = {
|
|
|
705
705
|
}, Le = { key: 0 }, Be = {
|
|
706
706
|
class: "row items-center",
|
|
707
707
|
style: { gap: "10px", width: "100%" }
|
|
708
|
-
}, Re = { key: 1 },
|
|
708
|
+
}, Re = { key: 1 }, pe = /* @__PURE__ */ N({
|
|
709
709
|
__name: "list",
|
|
710
710
|
props: {
|
|
711
711
|
row: {
|
|
@@ -744,29 +744,29 @@ const je = {
|
|
|
744
744
|
},
|
|
745
745
|
emits: ["change"],
|
|
746
746
|
setup(i, { emit: o }) {
|
|
747
|
-
const f = i, n =
|
|
747
|
+
const f = i, n = fe({
|
|
748
748
|
show: !1,
|
|
749
749
|
add: (t, e, r) => {
|
|
750
750
|
P.add(t, e, r, () => {
|
|
751
|
-
|
|
751
|
+
a("change");
|
|
752
752
|
});
|
|
753
753
|
},
|
|
754
754
|
remove: (t, e, r) => {
|
|
755
755
|
P.remove(t, e, r, () => {
|
|
756
|
-
|
|
756
|
+
a("change");
|
|
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
|
-
const
|
|
763
|
+
const a = o;
|
|
764
764
|
return (t, e) => {
|
|
765
765
|
const r = ee("el-button"), s = ee("el-input");
|
|
766
766
|
return n.show ? (d(), b("div", je, [
|
|
767
767
|
V(t.$slots, "list-start", { row: i.row }),
|
|
768
768
|
i.addBottom ? v("", !0) : (d(), b("div", Le, [
|
|
769
|
-
|
|
769
|
+
U(r, {
|
|
770
770
|
link: "",
|
|
771
771
|
type: "primary",
|
|
772
772
|
onClick: e[0] || (e[0] = (m) => n.add(i.field, i.row, i.itemFields))
|
|
@@ -788,13 +788,13 @@ const je = {
|
|
|
788
788
|
style: ge({ width: i.inputWidth }),
|
|
789
789
|
class: I(i.inputClass),
|
|
790
790
|
placeholder: p[i.label] || p[i.value],
|
|
791
|
-
onChange: e[1] || (e[1] = (u) =>
|
|
791
|
+
onChange: e[1] || (e[1] = (u) => a("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
|
+
U(r, {
|
|
798
798
|
link: "",
|
|
799
799
|
type: "danger",
|
|
800
800
|
onClick: (p) => n.remove(i.field, i.row, m)
|
|
@@ -806,7 +806,7 @@ const je = {
|
|
|
806
806
|
}, 1032, ["onClick"])
|
|
807
807
|
]))), 256)),
|
|
808
808
|
i.addBottom ? (d(), b("div", Re, [
|
|
809
|
-
|
|
809
|
+
U(r, {
|
|
810
810
|
link: "",
|
|
811
811
|
type: "primary",
|
|
812
812
|
onClick: e[2] || (e[2] = (m) => n.add(i.field, i.row, i.itemFields))
|
|
@@ -838,22 +838,30 @@ const je = {
|
|
|
838
838
|
*/
|
|
839
839
|
type: {
|
|
840
840
|
default: ""
|
|
841
|
+
},
|
|
842
|
+
form: {
|
|
843
|
+
default: {}
|
|
841
844
|
}
|
|
842
845
|
},
|
|
843
846
|
setup(i, { expose: o }) {
|
|
844
|
-
const f =
|
|
847
|
+
const f = O.isFun, n = O.EDialog, a = J(), t = i, e = fe({
|
|
845
848
|
rules: {},
|
|
846
849
|
show: !0,
|
|
847
850
|
form: {},
|
|
848
851
|
formDefault: {},
|
|
849
852
|
type: t.type || n.Add,
|
|
850
853
|
formColumn: [],
|
|
851
|
-
getDisabled: (r) =>
|
|
854
|
+
getDisabled: (r) => {
|
|
855
|
+
if (e.type === n.View)
|
|
856
|
+
return r.disabled?.view === void 0 ? !0 : O.isFun(r.disabled?.view, e.form);
|
|
857
|
+
const s = r.disabled?.[e.type === n.Add ? "create" : "update"];
|
|
858
|
+
return O.isFun(s, e.form);
|
|
859
|
+
},
|
|
852
860
|
getBind: (r) => r.options?.[e.type === n.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
|
|
853
861
|
getOn: (r) => r.options?.[e.type === n.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
854
862
|
getColumnSpan: (r, s) => {
|
|
855
863
|
if (r.item.form?.spanCol) {
|
|
856
|
-
const m = t.option.form?.maxSpan || 12, p = t.option.form?.defaultSpan || m / 2, k = s.filter((h) => !
|
|
864
|
+
const m = t.option.form?.maxSpan || 12, p = t.option.form?.defaultSpan || m / 2, k = s.filter((h) => !O.isFun(h.item.show?.form, e.form, e.type)).reduce((h, c) => h + (c.item.form?.span || p), 0);
|
|
857
865
|
return (r.item.form?.span || p) + k;
|
|
858
866
|
}
|
|
859
867
|
return r.item.form?.span;
|
|
@@ -895,18 +903,29 @@ const je = {
|
|
|
895
903
|
}), u.length > 0 && s.push(u), e.formColumn = s, e.form = JSONUtil.cp(e.formDefault);
|
|
896
904
|
}
|
|
897
905
|
});
|
|
898
|
-
return e.initColumnForm(),
|
|
899
|
-
|
|
906
|
+
return e.initColumnForm(), t.form && re(
|
|
907
|
+
() => e.form,
|
|
908
|
+
(r) => {
|
|
909
|
+
Object.keys(e.form).forEach((s) => {
|
|
910
|
+
t.form[s] = e.form[s];
|
|
911
|
+
});
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
deep: !0,
|
|
915
|
+
immediate: !0
|
|
916
|
+
}
|
|
917
|
+
), o({
|
|
918
|
+
ref: a,
|
|
900
919
|
conf: e
|
|
901
|
-
}), (r, s) => (d(), y(
|
|
920
|
+
}), (r, s) => (d(), y(l(Q), {
|
|
902
921
|
ref_key: "ruleFormRef",
|
|
903
|
-
ref:
|
|
922
|
+
ref: a,
|
|
904
923
|
model: e.form,
|
|
905
924
|
rules: e.rules
|
|
906
925
|
}, {
|
|
907
926
|
default: g(() => [
|
|
908
927
|
e.show ? (d(!0), b(D, { key: 0 }, A(e.formColumn, (m, p) => (d(), b(D, { key: p }, [
|
|
909
|
-
|
|
928
|
+
l(f)(
|
|
910
929
|
m.map((u) => u.item?.show?.form),
|
|
911
930
|
e.form,
|
|
912
931
|
e.type
|
|
@@ -922,42 +941,42 @@ const je = {
|
|
|
922
941
|
(d(!0), b(D, null, A(m, (u) => (d(), b(D, {
|
|
923
942
|
key: u.item.key
|
|
924
943
|
}, [
|
|
925
|
-
|
|
944
|
+
l(f)(u.item.show?.form, e.form, e.type) ? (d(), b("div", {
|
|
926
945
|
key: 0,
|
|
927
946
|
class: I([u.item.form.span > 0 ? `col-${e.getColumnSpan(u, m)}` : "col", `form-item-col-${u.item.key}`])
|
|
928
947
|
}, [
|
|
929
|
-
|
|
948
|
+
U(l(ae), {
|
|
930
949
|
label: u.item.text?.form?.label ?? u.item.label,
|
|
931
950
|
prop: u.item.key,
|
|
932
951
|
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || i.option.form?.labelWidth || "100px"
|
|
933
952
|
}, {
|
|
934
953
|
default: g(() => [
|
|
935
|
-
|
|
954
|
+
S("div", Ie, [
|
|
936
955
|
V(r.$slots, "form-" + u.item.key + "-start", {
|
|
937
956
|
row: e.form,
|
|
938
957
|
item: u.item
|
|
939
958
|
}),
|
|
940
|
-
|
|
941
|
-
|
|
959
|
+
S("div", He, [
|
|
960
|
+
S("div", Ke, [
|
|
942
961
|
V(r.$slots, "form-" + u.item.key, {
|
|
943
962
|
row: e.form,
|
|
944
963
|
item: u.item
|
|
945
964
|
}, () => [
|
|
946
|
-
u.item.type === "input" ? (d(), y(
|
|
965
|
+
u.item.type === "input" ? (d(), y(l(_), C({
|
|
947
966
|
key: 0,
|
|
948
967
|
modelValue: e.form[u.item.key],
|
|
949
968
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
950
969
|
ref_for: !0
|
|
951
970
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
952
971
|
disabled: e.getDisabled(u.item)
|
|
953
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (d(), y(
|
|
972
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (d(), y(l(Z), C({
|
|
954
973
|
key: 1,
|
|
955
974
|
modelValue: e.form[u.item.key],
|
|
956
975
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
957
976
|
ref_for: !0
|
|
958
977
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
959
978
|
disabled: e.getDisabled(u.item)
|
|
960
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (d(), y(
|
|
979
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (d(), y(l(X), C({
|
|
961
980
|
key: 2,
|
|
962
981
|
modelValue: e.form[u.item.key],
|
|
963
982
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -967,14 +986,14 @@ const je = {
|
|
|
967
986
|
style: { width: "100%" }
|
|
968
987
|
}), {
|
|
969
988
|
default: g(() => [
|
|
970
|
-
(d(!0), b(D, null, A(u.item.options?.select?.data, (k) => (d(), y(
|
|
989
|
+
(d(!0), b(D, null, A(u.item.options?.select?.data, (k) => (d(), y(l(W), {
|
|
971
990
|
key: k.value,
|
|
972
991
|
label: k.label,
|
|
973
992
|
value: k.value
|
|
974
993
|
}, null, 8, ["label", "value"]))), 128))
|
|
975
994
|
]),
|
|
976
995
|
_: 2
|
|
977
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (d(), y(
|
|
996
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (d(), y(l(se), C({
|
|
978
997
|
key: 3,
|
|
979
998
|
modelValue: e.form[u.item.key],
|
|
980
999
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -984,14 +1003,14 @@ const je = {
|
|
|
984
1003
|
style: { width: "100%" }
|
|
985
1004
|
}), {
|
|
986
1005
|
default: g(() => [
|
|
987
|
-
(d(!0), b(D, null, A(u.item.options?.radio?.data, (k) => (d(), y(
|
|
1006
|
+
(d(!0), b(D, null, A(u.item.options?.radio?.data, (k) => (d(), y(l(de), {
|
|
988
1007
|
key: k.value,
|
|
989
1008
|
label: k.label,
|
|
990
1009
|
value: k.value
|
|
991
1010
|
}, null, 8, ["label", "value"]))), 128))
|
|
992
1011
|
]),
|
|
993
1012
|
_: 2
|
|
994
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (d(), y(
|
|
1013
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (d(), y(pe, C({
|
|
995
1014
|
key: 4,
|
|
996
1015
|
row: e.form,
|
|
997
1016
|
field: u.item.key,
|
|
@@ -999,7 +1018,7 @@ const je = {
|
|
|
999
1018
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1000
1019
|
disabled: e.getDisabled(u.item),
|
|
1001
1020
|
style: { width: "100%" }
|
|
1002
|
-
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (d(), y(
|
|
1021
|
+
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (d(), y(l(he), C({
|
|
1003
1022
|
key: 5,
|
|
1004
1023
|
modelValue: e.form[u.item.key],
|
|
1005
1024
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -1007,14 +1026,14 @@ const je = {
|
|
|
1007
1026
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1008
1027
|
disabled: e.getDisabled(u.item),
|
|
1009
1028
|
style: { width: "100%" }
|
|
1010
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (d(), y(
|
|
1029
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (d(), y(l(ue), C({
|
|
1011
1030
|
key: 6,
|
|
1012
1031
|
modelValue: e.form[u.item.key],
|
|
1013
1032
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
1014
1033
|
ref_for: !0
|
|
1015
1034
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1016
1035
|
disabled: e.getDisabled(u.item)
|
|
1017
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (
|
|
1036
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (l(L).customComponent[u.item.type] || l(L).customComponent[u.item.type]?.form) ? (d(), y(q(l(L).customComponent[u.item.type]?.form || l(L).customComponent[u.item.type]), C({
|
|
1018
1037
|
key: 7,
|
|
1019
1038
|
modelValue: e.form[u.item.key],
|
|
1020
1039
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -1069,13 +1088,13 @@ class We {
|
|
|
1069
1088
|
*/
|
|
1070
1089
|
static exportToExcel = async (o, f, n) => {
|
|
1071
1090
|
if (!o || o.length === 0) return;
|
|
1072
|
-
const
|
|
1091
|
+
const a = await O.loadModule("xlsx"), t = o.map((s) => {
|
|
1073
1092
|
const m = {};
|
|
1074
1093
|
return f.forEach((p) => {
|
|
1075
1094
|
m[p.label] = s[p.key];
|
|
1076
1095
|
}), m;
|
|
1077
|
-
}), e =
|
|
1078
|
-
|
|
1096
|
+
}), e = a.utils.json_to_sheet(t), r = a.utils.book_new();
|
|
1097
|
+
a.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()}`, a.writeFile(r, `${n}.xlsx`);
|
|
1079
1098
|
};
|
|
1080
1099
|
}
|
|
1081
1100
|
class x {
|
|
@@ -1097,13 +1116,13 @@ class x {
|
|
|
1097
1116
|
* @returns
|
|
1098
1117
|
*/
|
|
1099
1118
|
static setValue = (o, f, n = !1) => {
|
|
1100
|
-
n && x.delAllKey(o), Object.keys(f).forEach((
|
|
1101
|
-
o[
|
|
1119
|
+
n && x.delAllKey(o), Object.keys(f).forEach((a) => {
|
|
1120
|
+
o[a] !== f[a] && (o[a] = f[a]);
|
|
1102
1121
|
});
|
|
1103
1122
|
};
|
|
1104
1123
|
}
|
|
1105
|
-
const K =
|
|
1106
|
-
const o = J(), f = J(), n = J(),
|
|
1124
|
+
const K = O.EDialog, Je = (i) => {
|
|
1125
|
+
const o = J(), f = J(), n = J(), a = fe({
|
|
1107
1126
|
option: i.option,
|
|
1108
1127
|
/** 查询区域相关配置对象 */
|
|
1109
1128
|
search: {
|
|
@@ -1122,23 +1141,23 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1122
1141
|
getFormData: () => {
|
|
1123
1142
|
let t = {};
|
|
1124
1143
|
i.option.column.forEach((r) => {
|
|
1125
|
-
(typeof r.show?.search == "function" ? r.show?.search(
|
|
1144
|
+
(typeof r.show?.search == "function" ? r.show?.search(a.search.form) : r.show?.search) && (t[r.key] = a.search.form[r.key]);
|
|
1126
1145
|
});
|
|
1127
1146
|
const e = i.option.search?.before?.(t);
|
|
1128
1147
|
return e && (t = e), t;
|
|
1129
1148
|
},
|
|
1130
1149
|
/** 重置搜索表单 */
|
|
1131
1150
|
reset: () => {
|
|
1132
|
-
const t =
|
|
1151
|
+
const t = a.search.formDefault;
|
|
1133
1152
|
Object.keys(t).forEach((r) => {
|
|
1134
|
-
i.option.search?.resetMode === "none" ? t[r] = void 0 : t[r] =
|
|
1153
|
+
i.option.search?.resetMode === "none" ? t[r] = void 0 : t[r] = a.search.formDefault[r];
|
|
1135
1154
|
});
|
|
1136
1155
|
const e = ObjectUtil.deepMerge(t, {});
|
|
1137
|
-
x.setValue(
|
|
1156
|
+
x.setValue(a.search.form, e, !0), a.page.num = 1, i.option.init !== !1 && a.table.getList();
|
|
1138
1157
|
},
|
|
1139
1158
|
/** 提交搜索表单 */
|
|
1140
1159
|
submit: () => {
|
|
1141
|
-
|
|
1160
|
+
a.page.num = 1, a.table.getList();
|
|
1142
1161
|
}
|
|
1143
1162
|
},
|
|
1144
1163
|
/** 分页区域相关配置对象 */
|
|
@@ -1159,9 +1178,9 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1159
1178
|
pagerCount: i.option.page?.pagerCount || F.config.pagination.pagerCount,
|
|
1160
1179
|
/** 获取分页查询参数 */
|
|
1161
1180
|
getQuery: (t = {}) => ({
|
|
1162
|
-
[F.config.field.page.size]: t.size ||
|
|
1163
|
-
[F.config.field.page.num]: t.num ||
|
|
1164
|
-
...
|
|
1181
|
+
[F.config.field.page.size]: t.size || a.page.size,
|
|
1182
|
+
[F.config.field.page.num]: t.num || a.page.num,
|
|
1183
|
+
...a.search.getFormData()
|
|
1165
1184
|
})
|
|
1166
1185
|
},
|
|
1167
1186
|
/** 表格区域相关配置对象 */
|
|
@@ -1186,8 +1205,8 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1186
1205
|
},
|
|
1187
1206
|
/** 全部展开/收起 */
|
|
1188
1207
|
all: () => {
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1208
|
+
if (a.table.expand.isExpand)
|
|
1209
|
+
a.table.expand.rowKeys = [];
|
|
1191
1210
|
else {
|
|
1192
1211
|
const t = (e) => {
|
|
1193
1212
|
let r = [];
|
|
@@ -1195,9 +1214,9 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1195
1214
|
r.push(s[i.option.table.rowKey]), s.children && s.children.length > 0 && (r = r.concat(t(s.children)));
|
|
1196
1215
|
}), r;
|
|
1197
1216
|
};
|
|
1198
|
-
|
|
1217
|
+
a.table.expand.rowKeys = t(a.table.data);
|
|
1199
1218
|
}
|
|
1200
|
-
|
|
1219
|
+
a.table.expand.isExpand = !a.table.expand.isExpand;
|
|
1201
1220
|
}
|
|
1202
1221
|
},
|
|
1203
1222
|
/** 表格列相关配置 */
|
|
@@ -1219,47 +1238,47 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1219
1238
|
expand: !1,
|
|
1220
1239
|
/** 全部展开/收起主分组 */
|
|
1221
1240
|
toggleExpandAll: () => {
|
|
1222
|
-
const t = !
|
|
1223
|
-
|
|
1241
|
+
const t = !a.table.header.group.expand;
|
|
1242
|
+
a.table.header.group.expand = t;
|
|
1224
1243
|
const e = (r) => {
|
|
1225
1244
|
r.forEach((s) => {
|
|
1226
1245
|
s.table?.header?.group !== void 0 && (s.table.header.group = !t), s.table?.header?.groupKey !== void 0 && (s.table.header.show = t), Array.isArray(s.children) && s.children.length > 0 && e(s.children);
|
|
1227
1246
|
});
|
|
1228
1247
|
};
|
|
1229
|
-
e(
|
|
1248
|
+
e(a.table.column.list);
|
|
1230
1249
|
}
|
|
1231
1250
|
}
|
|
1232
1251
|
},
|
|
1233
1252
|
/** 获取数据列表接口实现 */
|
|
1234
1253
|
getList: async () => {
|
|
1235
|
-
|
|
1236
|
-
const t = i.option.api.list, e = JSONUtil.cp(
|
|
1254
|
+
a.table.loading = !0;
|
|
1255
|
+
const t = i.option.api.list, e = JSONUtil.cp(a.table.selection.list);
|
|
1237
1256
|
try {
|
|
1238
|
-
await
|
|
1257
|
+
await a.initApiData("init");
|
|
1239
1258
|
let r = {};
|
|
1240
|
-
if (
|
|
1259
|
+
if (a.table.sort.prop) {
|
|
1241
1260
|
const { props: $, order: B } = F.config.table.sort;
|
|
1242
1261
|
r = {
|
|
1243
|
-
[$.field]:
|
|
1244
|
-
[B.field]:
|
|
1262
|
+
[$.field]: a.table.sort.prop,
|
|
1263
|
+
[B.field]: a.table.sort.order
|
|
1245
1264
|
};
|
|
1246
1265
|
}
|
|
1247
1266
|
const s = await t({
|
|
1248
|
-
...
|
|
1267
|
+
...a.page.getQuery(),
|
|
1249
1268
|
...r
|
|
1250
1269
|
}), m = F.config.field.result, p = s.data || { [m.list]: s };
|
|
1251
1270
|
let u = (Array.isArray(p[m.list]), p[m.list]);
|
|
1252
|
-
const k =
|
|
1271
|
+
const k = a.update.formColumn.flat(), c = ObjectUtil.deepMerge({ data: u }, {}).data.map(($) => (Object.keys($).forEach((R) => {
|
|
1253
1272
|
const j = k.find((H) => H.item.key === R);
|
|
1254
1273
|
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
1274
|
}), $));
|
|
1256
|
-
|
|
1257
|
-
|
|
1275
|
+
a.table.data = i.option.data ? await i.option.data(c, u) : c, a.page.total = p[m.total] || 0, setTimeout(() => {
|
|
1276
|
+
a.table.selection.setList(e);
|
|
1258
1277
|
}, 20);
|
|
1259
1278
|
} catch (r) {
|
|
1260
1279
|
console.error(r);
|
|
1261
1280
|
} finally {
|
|
1262
|
-
|
|
1281
|
+
a.table.loading = !1;
|
|
1263
1282
|
}
|
|
1264
1283
|
},
|
|
1265
1284
|
/** 表格多选相关配置 */
|
|
@@ -1268,11 +1287,11 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1268
1287
|
list: [],
|
|
1269
1288
|
/** 选中状态回调 */
|
|
1270
1289
|
change: (t) => {
|
|
1271
|
-
|
|
1290
|
+
a.table.selection.list = t;
|
|
1272
1291
|
},
|
|
1273
1292
|
/** 设置表格多选数据 */
|
|
1274
1293
|
setList: (t, e) => {
|
|
1275
|
-
|
|
1294
|
+
a.table.selection.list = [];
|
|
1276
1295
|
const r = n.value;
|
|
1277
1296
|
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1278
1297
|
const s = i.option.table?.rowKey, m = (p) => {
|
|
@@ -1288,7 +1307,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1288
1307
|
}
|
|
1289
1308
|
}
|
|
1290
1309
|
};
|
|
1291
|
-
return u(
|
|
1310
|
+
return u(a.table.data);
|
|
1292
1311
|
};
|
|
1293
1312
|
t.forEach((p) => {
|
|
1294
1313
|
const u = m(p);
|
|
@@ -1311,13 +1330,13 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1311
1330
|
order: "",
|
|
1312
1331
|
/** 排序变更回调 */
|
|
1313
1332
|
change: (t) => {
|
|
1314
|
-
F.config.table.sort.resetPage && (
|
|
1333
|
+
F.config.table.sort.resetPage && (a.page.num = 1);
|
|
1315
1334
|
const e = F.config.table.sort;
|
|
1316
1335
|
if (e.change) {
|
|
1317
|
-
e.change(t,
|
|
1336
|
+
e.change(t, a);
|
|
1318
1337
|
return;
|
|
1319
1338
|
}
|
|
1320
|
-
|
|
1339
|
+
a.table.sort.prop = t.prop, t.order === null ? (a.table.sort.order = "", a.table.sort.prop = "") : a.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, a.table.getList();
|
|
1321
1340
|
}
|
|
1322
1341
|
}
|
|
1323
1342
|
},
|
|
@@ -1327,7 +1346,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1327
1346
|
run: {
|
|
1328
1347
|
/** 执行指定方式的导出(如select、page、all) */
|
|
1329
1348
|
start: async (t) => {
|
|
1330
|
-
let e = await
|
|
1349
|
+
let e = await a.export.run[t](), r = i.option.column;
|
|
1331
1350
|
const s = ObjectUtil.deepMerge(
|
|
1332
1351
|
{
|
|
1333
1352
|
data: e,
|
|
@@ -1339,55 +1358,55 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1339
1358
|
},
|
|
1340
1359
|
/** 获取当前选中项进行导出 */
|
|
1341
1360
|
select: async () => {
|
|
1342
|
-
|
|
1361
|
+
a.export.loading = !0;
|
|
1343
1362
|
try {
|
|
1344
1363
|
if (i.option.tools?.export?.select) {
|
|
1345
1364
|
await i.option.tools?.export?.select({
|
|
1346
|
-
...
|
|
1347
|
-
items:
|
|
1365
|
+
...a.page.getQuery(),
|
|
1366
|
+
items: a.table.selection.list
|
|
1348
1367
|
});
|
|
1349
1368
|
return;
|
|
1350
1369
|
}
|
|
1351
|
-
if (
|
|
1352
|
-
throw
|
|
1353
|
-
return
|
|
1370
|
+
if (a.table.selection.list.length === 0)
|
|
1371
|
+
throw O.fail(w.tCurd("selectDataToExport")), new Error(w.tCurd("selectDataToExport"));
|
|
1372
|
+
return a.table.selection.list;
|
|
1354
1373
|
} catch (t) {
|
|
1355
1374
|
console.error(t);
|
|
1356
1375
|
} finally {
|
|
1357
|
-
|
|
1376
|
+
a.export.loading = !1;
|
|
1358
1377
|
}
|
|
1359
1378
|
},
|
|
1360
1379
|
/** 导出当前页的数据 */
|
|
1361
1380
|
page: async () => {
|
|
1362
|
-
|
|
1381
|
+
a.export.loading = !0;
|
|
1363
1382
|
try {
|
|
1364
1383
|
if (i.option.tools?.export?.page) {
|
|
1365
1384
|
await i.option.tools?.export?.page({
|
|
1366
|
-
...
|
|
1385
|
+
...a.page.getQuery()
|
|
1367
1386
|
});
|
|
1368
1387
|
return;
|
|
1369
1388
|
}
|
|
1370
|
-
if (
|
|
1371
|
-
throw
|
|
1372
|
-
return
|
|
1389
|
+
if (a.table.data.length === 0)
|
|
1390
|
+
throw O.fail(w.tCurd("noData")), new Error(w.tCurd("noData"));
|
|
1391
|
+
return a.table.data;
|
|
1373
1392
|
} catch (t) {
|
|
1374
1393
|
console.error(t);
|
|
1375
1394
|
} finally {
|
|
1376
|
-
|
|
1395
|
+
a.export.loading = !1;
|
|
1377
1396
|
}
|
|
1378
1397
|
},
|
|
1379
1398
|
/** 导出所有数据 */
|
|
1380
1399
|
all: async () => {
|
|
1381
|
-
|
|
1400
|
+
a.export.loading = !0;
|
|
1382
1401
|
try {
|
|
1383
1402
|
if (i.option.tools?.export?.all) {
|
|
1384
1403
|
await i.option.tools?.export?.all({
|
|
1385
|
-
...
|
|
1404
|
+
...a.page.getQuery()
|
|
1386
1405
|
});
|
|
1387
1406
|
return;
|
|
1388
1407
|
}
|
|
1389
1408
|
const t = i.option.api.list, e = await t({
|
|
1390
|
-
...
|
|
1409
|
+
...a.page.getQuery({
|
|
1391
1410
|
size: 999999,
|
|
1392
1411
|
num: 1
|
|
1393
1412
|
})
|
|
@@ -1396,7 +1415,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1396
1415
|
} catch (t) {
|
|
1397
1416
|
console.error(t);
|
|
1398
1417
|
} finally {
|
|
1399
|
-
|
|
1418
|
+
a.export.loading = !1;
|
|
1400
1419
|
}
|
|
1401
1420
|
}
|
|
1402
1421
|
},
|
|
@@ -1404,7 +1423,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1404
1423
|
loading: !1,
|
|
1405
1424
|
/** 执行导出操作的触发函数 */
|
|
1406
1425
|
click: (t) => {
|
|
1407
|
-
|
|
1426
|
+
a.export.loading || a.export.run.start(t);
|
|
1408
1427
|
}
|
|
1409
1428
|
},
|
|
1410
1429
|
/** 表单增删改弹窗相关对象 */
|
|
@@ -1428,27 +1447,34 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1428
1447
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1429
1448
|
formColumn: [],
|
|
1430
1449
|
/** 判断是否禁用当前字段 */
|
|
1431
|
-
getDisabled: (t, e = !1) =>
|
|
1450
|
+
getDisabled: (t, e = !1) => {
|
|
1451
|
+
if (i.option.table?.editMode && e)
|
|
1452
|
+
return t.disabled?.table === void 0 ? !1 : O.isFun(t.disabled?.table, a.update.form);
|
|
1453
|
+
if (a.update.type === K.View)
|
|
1454
|
+
return t.disabled?.view === void 0 ? !0 : O.isFun(t.disabled?.view, a.update.form);
|
|
1455
|
+
const r = t.disabled?.[a.update.type === K.Add ? "create" : "update"];
|
|
1456
|
+
return O.isFun(r, a.update.form);
|
|
1457
|
+
},
|
|
1432
1458
|
/** 获取表单组件绑定属性 */
|
|
1433
|
-
getBind: (t) => t.options?.[
|
|
1459
|
+
getBind: (t) => t.options?.[a.update.type === K.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
|
|
1434
1460
|
/** 获取表单组件事件属性 */
|
|
1435
1461
|
getOn: (t, e) => {
|
|
1436
|
-
const s = t.options?.[
|
|
1462
|
+
const s = t.options?.[a.update.type === K.Add ? "formAdd" : "formUpdate"]?.[t.type]?.on || t.options?.[t.type]?.on || {}, m = {};
|
|
1437
1463
|
return Object.keys(s).forEach((p) => {
|
|
1438
1464
|
const u = s[p];
|
|
1439
1465
|
typeof u == "function" ? m[p] = function(...k) {
|
|
1440
|
-
return u.apply(this, [...k, e ||
|
|
1466
|
+
return u.apply(this, [...k, e || a.update.form, t]);
|
|
1441
1467
|
} : m[p] = u;
|
|
1442
1468
|
}), m;
|
|
1443
1469
|
},
|
|
1444
1470
|
/** 获取表单组件绑定属性和事件 */
|
|
1445
1471
|
getOptions: (t) => {
|
|
1446
1472
|
try {
|
|
1447
|
-
const r =
|
|
1473
|
+
const r = a.update.formColumn.flat().find((s) => s.item.key === t)?.item;
|
|
1448
1474
|
return r ? {
|
|
1449
1475
|
options: r.options,
|
|
1450
1476
|
// @ts-ignore
|
|
1451
|
-
bind:
|
|
1477
|
+
bind: a.update.getBind(r)
|
|
1452
1478
|
} : { options: {}, bind: {} };
|
|
1453
1479
|
} catch {
|
|
1454
1480
|
return { options: {}, bind: {} };
|
|
@@ -1463,28 +1489,28 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1463
1489
|
if (i.option.form?.editAll)
|
|
1464
1490
|
return t;
|
|
1465
1491
|
let e = {
|
|
1466
|
-
[i.option.table?.rowKey]:
|
|
1492
|
+
[i.option.table?.rowKey]: a.update.edit.data[i.option.table?.rowKey]
|
|
1467
1493
|
};
|
|
1468
|
-
return Object.keys(
|
|
1469
|
-
t[r] !==
|
|
1494
|
+
return Object.keys(a.update.edit.data).forEach((r) => {
|
|
1495
|
+
t[r] !== a.update.edit.data[r] && (e[r] = t[r]);
|
|
1470
1496
|
}), e;
|
|
1471
1497
|
}
|
|
1472
1498
|
},
|
|
1473
1499
|
view: {},
|
|
1474
1500
|
/** 打开增改弹窗 */
|
|
1475
1501
|
open: (t, e) => {
|
|
1476
|
-
|
|
1477
|
-
|
|
1502
|
+
a.update.showContent || FunUtil.throttle(async () => {
|
|
1503
|
+
O.loading(!0);
|
|
1478
1504
|
try {
|
|
1479
|
-
|
|
1505
|
+
a.update.type = t;
|
|
1480
1506
|
const r = t === K.Add;
|
|
1481
|
-
|
|
1482
|
-
const s = ObjectUtil.deepMerge(r ?
|
|
1483
|
-
x.setValue(
|
|
1507
|
+
a.update.edit.data = e, a.update.title = w.tCurd(r ? "add" : t === K.View ? "view" : "edit");
|
|
1508
|
+
const s = ObjectUtil.deepMerge(r ? a.update.formDefault : e, {});
|
|
1509
|
+
x.setValue(a.update.form, s, !0), await a.initApiData("update"), await i.option.form?.openBefore?.(a.update.form, a.update), (!i.option.table?.inlineEdit || r) && (a.update.show = !0, a.update.showContent = !0), i.option.form?.openAfter?.(a.update.form, a.update);
|
|
1484
1510
|
} catch (r) {
|
|
1485
1511
|
console.error(r);
|
|
1486
1512
|
} finally {
|
|
1487
|
-
|
|
1513
|
+
O.loading(!1);
|
|
1488
1514
|
}
|
|
1489
1515
|
});
|
|
1490
1516
|
},
|
|
@@ -1492,16 +1518,16 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1492
1518
|
submit: () => {
|
|
1493
1519
|
FunUtil.throttle(async () => {
|
|
1494
1520
|
await f.value?.validate(async (s, m) => new Promise((p, u) => {
|
|
1495
|
-
s || (
|
|
1496
|
-
})),
|
|
1497
|
-
const t =
|
|
1521
|
+
s || (O.fail(w.tCurd("checkFormData")), u(!1)), p();
|
|
1522
|
+
})), a.update.loading = !0;
|
|
1523
|
+
const t = a.update.type === K.Add ? i.option.api.create : i.option.api.update;
|
|
1498
1524
|
try {
|
|
1499
|
-
await i.option.form?.submitBefore?.(
|
|
1525
|
+
await i.option.form?.submitBefore?.(a.update.form, a.update);
|
|
1500
1526
|
} catch {
|
|
1501
|
-
|
|
1527
|
+
a.update.loading = !1;
|
|
1502
1528
|
return;
|
|
1503
1529
|
}
|
|
1504
|
-
let e = ObjectUtil.deepMerge(
|
|
1530
|
+
let e = ObjectUtil.deepMerge(a.update.form, {});
|
|
1505
1531
|
delete e.children;
|
|
1506
1532
|
const r = new Set(i.option.column.filter((s) => s.type === "datetime").map((s) => s.key));
|
|
1507
1533
|
Object.keys(e).forEach((s) => {
|
|
@@ -1514,18 +1540,18 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1514
1540
|
if (!t) return;
|
|
1515
1541
|
await t({
|
|
1516
1542
|
...e
|
|
1517
|
-
}),
|
|
1543
|
+
}), a.update.close(), await a.table.getList(), i.option.form?.submitAfter?.(e, a.update);
|
|
1518
1544
|
} catch (s) {
|
|
1519
1545
|
console.error(s);
|
|
1520
1546
|
} finally {
|
|
1521
|
-
|
|
1547
|
+
a.update.loading = !1;
|
|
1522
1548
|
}
|
|
1523
1549
|
});
|
|
1524
1550
|
},
|
|
1525
1551
|
/** 关闭弹窗和内容 */
|
|
1526
1552
|
close: () => {
|
|
1527
|
-
|
|
1528
|
-
|
|
1553
|
+
a.update.show = !1, i.option.table?.inlineEdit && (a.update.form = {}), setTimeout(() => {
|
|
1554
|
+
a.update.showContent = !1;
|
|
1529
1555
|
}, 350);
|
|
1530
1556
|
}
|
|
1531
1557
|
},
|
|
@@ -1541,38 +1567,38 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1541
1567
|
loading: !1,
|
|
1542
1568
|
/** 关闭删除弹窗 */
|
|
1543
1569
|
close: () => {
|
|
1544
|
-
|
|
1570
|
+
a.remove.show = !1;
|
|
1545
1571
|
},
|
|
1546
1572
|
/** 打开删除弹窗并设置待删除项 */
|
|
1547
1573
|
open: (t) => {
|
|
1548
1574
|
if (t.length === 0) {
|
|
1549
|
-
|
|
1575
|
+
O.fail(w.tCurd("selectDataToDelete"));
|
|
1550
1576
|
return;
|
|
1551
1577
|
}
|
|
1552
|
-
|
|
1578
|
+
a.remove.items = t, a.remove.show = !0;
|
|
1553
1579
|
},
|
|
1554
1580
|
/** 执行删除实际操作 */
|
|
1555
1581
|
submit: () => {
|
|
1556
1582
|
FunUtil.throttle(async () => {
|
|
1557
|
-
|
|
1583
|
+
a.remove.loading = !0;
|
|
1558
1584
|
const t = i.option.api.delete;
|
|
1559
1585
|
try {
|
|
1560
1586
|
if (!t) return;
|
|
1561
1587
|
await t({
|
|
1562
|
-
[i.option.table?.rowKey]:
|
|
1563
|
-
items:
|
|
1564
|
-
}),
|
|
1588
|
+
[i.option.table?.rowKey]: a.remove.items.map((e) => e[i.option.table?.rowKey]),
|
|
1589
|
+
items: a.remove.items
|
|
1590
|
+
}), O.success(w.tCurd("operationSuccess")), a.table.data.length <= 1 && a.page.num > 1 && (a.page.num -= 1), a.remove.close(), await a.table.getList();
|
|
1565
1591
|
} catch (e) {
|
|
1566
1592
|
console.error(e);
|
|
1567
1593
|
} finally {
|
|
1568
|
-
|
|
1594
|
+
a.remove.loading = !1;
|
|
1569
1595
|
}
|
|
1570
1596
|
});
|
|
1571
1597
|
}
|
|
1572
1598
|
},
|
|
1573
1599
|
/** 初始化curd关联所有默认与依赖配置及表单列 */
|
|
1574
1600
|
init: () => {
|
|
1575
|
-
|
|
1601
|
+
a.initCurdConfig(), a.initColumnOptions(), a.initColumnForm();
|
|
1576
1602
|
},
|
|
1577
1603
|
/** 下拉请求等数据缓存 */
|
|
1578
1604
|
apiDataMap: {},
|
|
@@ -1584,13 +1610,13 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1584
1610
|
return;
|
|
1585
1611
|
}
|
|
1586
1612
|
if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[t]) {
|
|
1587
|
-
if (
|
|
1613
|
+
if (a.apiDataMap[s.key] && s.options?.[s.type]?.dataApiConfig?.once) return;
|
|
1588
1614
|
const m = (async () => {
|
|
1589
1615
|
try {
|
|
1590
|
-
let p = await s.options?.[s.type]?.dataApi?.(
|
|
1616
|
+
let p = await s.options?.[s.type]?.dataApi?.(a.update.form, a.update.type);
|
|
1591
1617
|
if (p) {
|
|
1592
1618
|
const u = s.options?.[s.type]?.dataPath;
|
|
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,
|
|
1619
|
+
!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, a.apiDataMap[s.key] = p;
|
|
1594
1620
|
}
|
|
1595
1621
|
} catch {
|
|
1596
1622
|
}
|
|
@@ -1631,7 +1657,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1631
1657
|
for (const s in t) {
|
|
1632
1658
|
if (s === "table") {
|
|
1633
1659
|
if (r.table = ObjectUtil.deepMerge(t.table, r.table || {}), r.children) {
|
|
1634
|
-
|
|
1660
|
+
r.children.forEach((p) => {
|
|
1635
1661
|
e(p);
|
|
1636
1662
|
});
|
|
1637
1663
|
return;
|
|
@@ -1667,11 +1693,11 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1667
1693
|
} finally {
|
|
1668
1694
|
p.loadingMap[u].loading = !1;
|
|
1669
1695
|
}
|
|
1670
|
-
return
|
|
1696
|
+
return O.success(w.tCurd("operationSuccess")), p.tableConfig?.loadList && (a.table.loading = !0, a.table.getList(), a.table.loading = !1), !0;
|
|
1671
1697
|
} catch (u) {
|
|
1672
1698
|
return console.error(u), !1;
|
|
1673
1699
|
} finally {
|
|
1674
|
-
|
|
1700
|
+
a.table.loading = !1;
|
|
1675
1701
|
}
|
|
1676
1702
|
} catch {
|
|
1677
1703
|
return !1;
|
|
@@ -1682,7 +1708,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1682
1708
|
},
|
|
1683
1709
|
getColumnSpan: (t, e) => {
|
|
1684
1710
|
if (t.item.form?.spanCol) {
|
|
1685
|
-
const r = F.config.form.defaultSpan, m = e.filter((p) => !
|
|
1711
|
+
const r = F.config.form.defaultSpan, m = e.filter((p) => !O.isFun(p.item.show?.form, a.update.form, a.update.type)).reduce((p, u) => p + (u.item.form?.span || r), 0);
|
|
1686
1712
|
return (t.item?.form.span || r) + m;
|
|
1687
1713
|
}
|
|
1688
1714
|
return t.item.form.span;
|
|
@@ -1690,7 +1716,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1690
1716
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1691
1717
|
initColumnForm: () => {
|
|
1692
1718
|
const t = i.option;
|
|
1693
|
-
|
|
1719
|
+
a.update.formColumn = [], a.table.column.show = {
|
|
1694
1720
|
list: [],
|
|
1695
1721
|
listSource: []
|
|
1696
1722
|
};
|
|
@@ -1698,12 +1724,12 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1698
1724
|
let m = [];
|
|
1699
1725
|
const p = (c) => {
|
|
1700
1726
|
if (c.children) {
|
|
1701
|
-
|
|
1727
|
+
a.table.column.show.list.push(c.key), c.children.forEach(($) => {
|
|
1702
1728
|
p($);
|
|
1703
1729
|
});
|
|
1704
1730
|
return;
|
|
1705
1731
|
}
|
|
1706
|
-
if (
|
|
1732
|
+
if (a.update.formDefault[c.key] = c.value, c.table.table && (c.show.table && a.table.column.show.list.push(c.key), c.table.table && a.table.column.show.listSource.push(c.key)), !(c.isForm && typeof c.show?.form == "boolean") || c.show?.form) {
|
|
1707
1733
|
c.form = c.form || { span: s }, c.form.span = c.form.span ?? s;
|
|
1708
1734
|
let $ = c.form.span, B = m.reduce((j, H) => j + H.span, $);
|
|
1709
1735
|
const R = m.length;
|
|
@@ -1718,12 +1744,12 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1718
1744
|
trigger: "blur"
|
|
1719
1745
|
}
|
|
1720
1746
|
] : c.rules;
|
|
1721
|
-
|
|
1747
|
+
a.update.rules[c.key] = le.map((te) => {
|
|
1722
1748
|
if (te.validator) {
|
|
1723
1749
|
const we = te.validator;
|
|
1724
1750
|
return {
|
|
1725
1751
|
...te,
|
|
1726
|
-
validator: (ke, ve, Ce) => we(ke, ve, Ce,
|
|
1752
|
+
validator: (ke, ve, Ce) => we(ke, ve, Ce, a.update.form)
|
|
1727
1753
|
};
|
|
1728
1754
|
}
|
|
1729
1755
|
return te;
|
|
@@ -1737,51 +1763,51 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1737
1763
|
c.isForm = !0, u(c, !0), p(c);
|
|
1738
1764
|
}), i.option.table?.column?.forEach((c) => {
|
|
1739
1765
|
u(c, !1), p(c);
|
|
1740
|
-
}),
|
|
1766
|
+
}), a.search.column.list = t.column.concat(t.table?.column || []), a.table.column.list = a.search.column.list.filter((c) => c.table?.table), a.search.column.list.sort((c, $) => c.sort?.search - $.sort?.search), a.table.column.list.sort((c, $) => c.sort?.table - $.sort?.table), m.length > 0 && e.push(m), a.update.formColumn = e;
|
|
1741
1767
|
const k = i.option.search?.formDefault;
|
|
1742
1768
|
k && Object.keys(k).forEach((c) => {
|
|
1743
|
-
|
|
1769
|
+
a.search.formDefault[c] = k[c];
|
|
1744
1770
|
}), t.column.forEach((c) => {
|
|
1745
|
-
c.show?.search || (
|
|
1771
|
+
c.show?.search || (a.search.formDefault[c.key] = void 0);
|
|
1746
1772
|
});
|
|
1747
|
-
const h = ObjectUtil.deepMerge(
|
|
1748
|
-
x.setValue(
|
|
1773
|
+
const h = ObjectUtil.deepMerge(a.search.formDefault, {});
|
|
1774
|
+
x.setValue(a.search.form, h, !0);
|
|
1749
1775
|
}
|
|
1750
1776
|
});
|
|
1751
|
-
return
|
|
1752
|
-
i.option.init !== !1 &&
|
|
1753
|
-
}), i.form &&
|
|
1754
|
-
() =>
|
|
1777
|
+
return a.init(), ye(() => {
|
|
1778
|
+
i.option.init !== !1 && a.table.getList();
|
|
1779
|
+
}), i.form && re(
|
|
1780
|
+
() => a.update.form,
|
|
1755
1781
|
(t) => {
|
|
1756
|
-
Object.keys(
|
|
1757
|
-
i.form[e] =
|
|
1782
|
+
Object.keys(a.update.form).forEach((e) => {
|
|
1783
|
+
i.form[e] = a.update.form[e];
|
|
1758
1784
|
});
|
|
1759
1785
|
},
|
|
1760
1786
|
{
|
|
1761
1787
|
deep: !0,
|
|
1762
1788
|
immediate: !0
|
|
1763
1789
|
}
|
|
1764
|
-
), i.searchForm &&
|
|
1765
|
-
() =>
|
|
1790
|
+
), i.searchForm && re(
|
|
1791
|
+
() => a.search.form,
|
|
1766
1792
|
(t) => {
|
|
1767
|
-
Object.keys(
|
|
1768
|
-
i.searchForm[e] =
|
|
1793
|
+
Object.keys(a.search.form).forEach((e) => {
|
|
1794
|
+
i.searchForm[e] = a.search.form[e];
|
|
1769
1795
|
});
|
|
1770
1796
|
},
|
|
1771
1797
|
{
|
|
1772
1798
|
deep: !0,
|
|
1773
1799
|
immediate: !0
|
|
1774
1800
|
}
|
|
1775
|
-
), { conf:
|
|
1801
|
+
), { conf: a, switchConfirmRef: o, ruleFormRef: f, tableRef: n };
|
|
1776
1802
|
}, qe = { class: "dialog-footer" }, Qe = /* @__PURE__ */ N({
|
|
1777
1803
|
__name: "switchConfirm",
|
|
1778
1804
|
props: {
|
|
1779
1805
|
size: {}
|
|
1780
1806
|
},
|
|
1781
1807
|
setup(i, { expose: o }) {
|
|
1782
|
-
const f = J(!1), n = J("确认修改"),
|
|
1808
|
+
const f = J(!1), n = J("确认修改"), a = J("确认要修改状态吗?");
|
|
1783
1809
|
let t = null, e = null;
|
|
1784
|
-
const r = (p) => (p?.title && (n.value = p.title), p?.content && (
|
|
1810
|
+
const r = (p) => (p?.title && (n.value = p.title), p?.content && (a.value = p.content), f.value = !0, new Promise((u, k) => {
|
|
1785
1811
|
t = u, e = k;
|
|
1786
1812
|
})), s = () => {
|
|
1787
1813
|
f.value = !1, t?.(!0), t = null, e = null;
|
|
@@ -1792,7 +1818,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1792
1818
|
open: r
|
|
1793
1819
|
}), (p, u) => {
|
|
1794
1820
|
const k = ee("el-form");
|
|
1795
|
-
return d(), y(
|
|
1821
|
+
return d(), y(l(ie), {
|
|
1796
1822
|
modelValue: f.value,
|
|
1797
1823
|
"onUpdate:modelValue": u[0] || (u[0] = (h) => f.value = h),
|
|
1798
1824
|
title: n.value,
|
|
@@ -1800,16 +1826,16 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1800
1826
|
width: "400px"
|
|
1801
1827
|
}, {
|
|
1802
1828
|
footer: g(() => [
|
|
1803
|
-
|
|
1829
|
+
U(k, { size: p.size }, {
|
|
1804
1830
|
default: g(() => [
|
|
1805
|
-
|
|
1806
|
-
|
|
1831
|
+
S("span", qe, [
|
|
1832
|
+
U(l(T), { onClick: m }, {
|
|
1807
1833
|
default: g(() => u[1] || (u[1] = [
|
|
1808
1834
|
E("取消")
|
|
1809
1835
|
])),
|
|
1810
1836
|
_: 1
|
|
1811
1837
|
}),
|
|
1812
|
-
|
|
1838
|
+
U(l(T), {
|
|
1813
1839
|
type: "primary",
|
|
1814
1840
|
onClick: s
|
|
1815
1841
|
}, {
|
|
@@ -1824,7 +1850,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1824
1850
|
}, 8, ["size"])
|
|
1825
1851
|
]),
|
|
1826
1852
|
default: g(() => [
|
|
1827
|
-
|
|
1853
|
+
S("div", null, M(a.value), 1)
|
|
1828
1854
|
]),
|
|
1829
1855
|
_: 1
|
|
1830
1856
|
}, 8, ["modelValue", "title"]);
|
|
@@ -1832,8 +1858,8 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1832
1858
|
}
|
|
1833
1859
|
}), Y = (i, o) => {
|
|
1834
1860
|
const f = i.__vccOpts || i;
|
|
1835
|
-
for (const [n,
|
|
1836
|
-
f[n] =
|
|
1861
|
+
for (const [n, a] of o)
|
|
1862
|
+
f[n] = a;
|
|
1837
1863
|
return f;
|
|
1838
1864
|
}, Ge = {}, Xe = {
|
|
1839
1865
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1841,7 +1867,7 @@ const K = M.EDialog, Je = (i) => {
|
|
|
1841
1867
|
};
|
|
1842
1868
|
function Ye(i, o) {
|
|
1843
1869
|
return d(), b("svg", Xe, o[0] || (o[0] = [
|
|
1844
|
-
|
|
1870
|
+
S("path", {
|
|
1845
1871
|
fill: "currentColor",
|
|
1846
1872
|
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"
|
|
1847
1873
|
}, null, -1)
|
|
@@ -1855,7 +1881,7 @@ const Ze = /* @__PURE__ */ Y(Ge, [["render", Ye]]), xe = ["innerHTML"], _e = /*
|
|
|
1855
1881
|
},
|
|
1856
1882
|
setup(i) {
|
|
1857
1883
|
const o = i, f = be(() => typeof o.content == "function" ? o.content(o.value) : o.content);
|
|
1858
|
-
return (n,
|
|
1884
|
+
return (n, a) => typeof f.value == "object" ? (d(), y(q(f.value), { key: 0 })) : (d(), b("div", {
|
|
1859
1885
|
key: 1,
|
|
1860
1886
|
innerHTML: f.value
|
|
1861
1887
|
}, null, 8, xe));
|
|
@@ -1867,7 +1893,7 @@ const Ze = /* @__PURE__ */ Y(Ge, [["render", Ye]]), xe = ["innerHTML"], _e = /*
|
|
|
1867
1893
|
};
|
|
1868
1894
|
function ot(i, o) {
|
|
1869
1895
|
return d(), b("svg", tt, o[0] || (o[0] = [
|
|
1870
|
-
|
|
1896
|
+
S("path", {
|
|
1871
1897
|
fill: "currentColor",
|
|
1872
1898
|
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"
|
|
1873
1899
|
}, null, -1)
|
|
@@ -1880,7 +1906,7 @@ const at = /* @__PURE__ */ Y(et, [["render", ot]]), lt = {}, nt = {
|
|
|
1880
1906
|
};
|
|
1881
1907
|
function it(i, o) {
|
|
1882
1908
|
return d(), b("svg", nt, o[0] || (o[0] = [
|
|
1883
|
-
|
|
1909
|
+
S("path", {
|
|
1884
1910
|
fill: "currentColor",
|
|
1885
1911
|
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"
|
|
1886
1912
|
}, null, -1)
|
|
@@ -1893,7 +1919,7 @@ const rt = /* @__PURE__ */ Y(lt, [["render", it]]), st = {}, dt = {
|
|
|
1893
1919
|
};
|
|
1894
1920
|
function ut(i, o) {
|
|
1895
1921
|
return d(), b("svg", dt, o[0] || (o[0] = [
|
|
1896
|
-
|
|
1922
|
+
S("path", {
|
|
1897
1923
|
fill: "currentColor",
|
|
1898
1924
|
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"
|
|
1899
1925
|
}, null, -1)
|
|
@@ -1907,14 +1933,14 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
1907
1933
|
option: {}
|
|
1908
1934
|
},
|
|
1909
1935
|
setup(i) {
|
|
1910
|
-
const o =
|
|
1911
|
-
return (n,
|
|
1936
|
+
const o = O.isFun, f = Oe().type;
|
|
1937
|
+
return (n, a) => {
|
|
1912
1938
|
const t = ee("el-tooltip");
|
|
1913
1939
|
return d(!0), b(D, null, A(n.columnList, (e) => (d(), b(D, {
|
|
1914
1940
|
key: e.key
|
|
1915
1941
|
}, [
|
|
1916
|
-
n.conf.table.column.show.list.includes(e.key) && (e.show?.table === void 0 ||
|
|
1917
|
-
e.table?.header?.groupKey === void 0 || e.table.header.show ? (d(), y(
|
|
1942
|
+
n.conf.table.column.show.list.includes(e.key) && (e.show?.table === void 0 || l(o)(e.show?.table, n.conf.table.data)) ? (d(), b(D, { key: 0 }, [
|
|
1943
|
+
e.table?.header?.groupKey === void 0 || e.table.header.show ? (d(), y(l(oe), C({
|
|
1918
1944
|
key: 0,
|
|
1919
1945
|
prop: e.key,
|
|
1920
1946
|
label: e.label,
|
|
@@ -1922,25 +1948,25 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
1922
1948
|
}, e.table), {
|
|
1923
1949
|
header: g(() => [
|
|
1924
1950
|
V(n.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1925
|
-
|
|
1951
|
+
S("div", pt, [
|
|
1926
1952
|
e.table?.header?.tooltip ? (d(), y(t, {
|
|
1927
1953
|
key: 0,
|
|
1928
1954
|
effect: "dark",
|
|
1929
1955
|
placement: "top"
|
|
1930
1956
|
}, {
|
|
1931
1957
|
content: g(() => [
|
|
1932
|
-
|
|
1958
|
+
S("div", {
|
|
1933
1959
|
innerHTML: e.table?.header?.tooltip
|
|
1934
1960
|
}, null, 8, mt)
|
|
1935
1961
|
]),
|
|
1936
1962
|
default: g(() => [
|
|
1937
|
-
|
|
1938
|
-
|
|
1963
|
+
S("span", ct, [
|
|
1964
|
+
U(at)
|
|
1939
1965
|
])
|
|
1940
1966
|
]),
|
|
1941
1967
|
_: 2
|
|
1942
1968
|
}, 1024)) : v("", !0),
|
|
1943
|
-
E(" " +
|
|
1969
|
+
E(" " + M(e.label) + " ", 1),
|
|
1944
1970
|
e.table?.header?.group !== void 0 ? (d(), b("span", {
|
|
1945
1971
|
key: 1,
|
|
1946
1972
|
class: "table-header-plus",
|
|
@@ -1960,8 +1986,8 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
1960
1986
|
]),
|
|
1961
1987
|
default: g(({ row: r }) => [
|
|
1962
1988
|
e.children ? (d(), b(D, { key: 0 }, [
|
|
1963
|
-
|
|
1964
|
-
(d(), y(q(
|
|
1989
|
+
a[0] || (a[0] = E(" ")),
|
|
1990
|
+
(d(), y(q(l(f)), {
|
|
1965
1991
|
conf: n.conf,
|
|
1966
1992
|
columnList: e.children,
|
|
1967
1993
|
option: n.option
|
|
@@ -1983,7 +2009,7 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
1983
2009
|
row: r,
|
|
1984
2010
|
item: e
|
|
1985
2011
|
}),
|
|
1986
|
-
e.type === "input" ? (d(), y(
|
|
2012
|
+
e.type === "input" ? (d(), y(l(_), C({
|
|
1987
2013
|
key: 0,
|
|
1988
2014
|
modelValue: r[e.key],
|
|
1989
2015
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
@@ -1994,11 +2020,11 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
1994
2020
|
e.options?.input?.prepend ? {
|
|
1995
2021
|
name: "prepend",
|
|
1996
2022
|
fn: g(() => [
|
|
1997
|
-
E(
|
|
2023
|
+
E(M(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(r) : e.options?.input?.prepend), 1)
|
|
1998
2024
|
]),
|
|
1999
2025
|
key: "0"
|
|
2000
2026
|
} : void 0
|
|
2001
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(
|
|
2027
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(l(X), C({
|
|
2002
2028
|
key: 1,
|
|
2003
2029
|
modelValue: r[e.key],
|
|
2004
2030
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
@@ -2007,14 +2033,14 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2007
2033
|
ref_for: !0
|
|
2008
2034
|
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r))), {
|
|
2009
2035
|
default: g(() => [
|
|
2010
|
-
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(
|
|
2036
|
+
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(l(W), {
|
|
2011
2037
|
key: s.value,
|
|
2012
2038
|
label: s.label,
|
|
2013
2039
|
value: s.value
|
|
2014
2040
|
}, null, 8, ["label", "value"]))), 128))
|
|
2015
2041
|
]),
|
|
2016
2042
|
_: 2
|
|
2017
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(
|
|
2043
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(l(Z), C({
|
|
2018
2044
|
key: 2,
|
|
2019
2045
|
modelValue: r[e.key],
|
|
2020
2046
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
@@ -2027,8 +2053,8 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2027
2053
|
item: e
|
|
2028
2054
|
})
|
|
2029
2055
|
], 2)) : (d(), b(D, { key: 1 }, [
|
|
2030
|
-
n.conf.update.type ===
|
|
2031
|
-
e.type === "input" ? (d(), y(
|
|
2056
|
+
n.conf.update.type === l(O).EDialog.Update && l(o)(e.show?.form, n.conf.update.form, l(O).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 }, [
|
|
2057
|
+
e.type === "input" ? (d(), y(l(_), C({
|
|
2032
2058
|
key: 0,
|
|
2033
2059
|
modelValue: n.conf.update.form[e.key],
|
|
2034
2060
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
@@ -2038,11 +2064,11 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2038
2064
|
e.options?.input?.prepend ? {
|
|
2039
2065
|
name: "prepend",
|
|
2040
2066
|
fn: g(() => [
|
|
2041
|
-
E(
|
|
2067
|
+
E(M(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(r) : e.options?.input?.prepend), 1)
|
|
2042
2068
|
]),
|
|
2043
2069
|
key: "0"
|
|
2044
2070
|
} : void 0
|
|
2045
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(
|
|
2071
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (d(), y(l(X), C({
|
|
2046
2072
|
key: 1,
|
|
2047
2073
|
modelValue: n.conf.update.form[e.key],
|
|
2048
2074
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
@@ -2050,14 +2076,14 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2050
2076
|
ref_for: !0
|
|
2051
2077
|
}, n.conf.update.getBind(e), z(n.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
2052
2078
|
default: g(() => [
|
|
2053
|
-
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(
|
|
2079
|
+
(d(!0), b(D, null, A(e.options?.search?.select?.data || e.options?.select?.data, (s) => (d(), y(l(W), {
|
|
2054
2080
|
key: s.value,
|
|
2055
2081
|
label: s.label,
|
|
2056
2082
|
value: s.value
|
|
2057
2083
|
}, null, 8, ["label", "value"]))), 128))
|
|
2058
2084
|
]),
|
|
2059
2085
|
_: 2
|
|
2060
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(
|
|
2086
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (d(), y(l(Z), C({
|
|
2061
2087
|
key: 2,
|
|
2062
2088
|
modelValue: n.conf.update.form[e.key],
|
|
2063
2089
|
"onUpdate:modelValue": (s) => n.conf.update.form[e.key] = s,
|
|
@@ -2070,20 +2096,20 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2070
2096
|
row: r,
|
|
2071
2097
|
item: e
|
|
2072
2098
|
}, () => [
|
|
2073
|
-
|
|
2099
|
+
l(L).customComponent[e.type ?? ""]?.table ? (d(), y(q(l(L).customComponent[e.type ?? ""]?.table), C({
|
|
2074
2100
|
key: 0,
|
|
2075
2101
|
modelValue: r[e.key],
|
|
2076
2102
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2077
2103
|
ref_for: !0
|
|
2078
2104
|
}, 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(
|
|
2105
|
+
e.options?.switch?.tableConfig?.change ? (d(), y(l(Z), C({
|
|
2080
2106
|
key: 0,
|
|
2081
2107
|
modelValue: r[e.key],
|
|
2082
2108
|
"onUpdate:modelValue": (s) => r[e.key] = s,
|
|
2083
2109
|
loading: e.options?.switch?.loadingMap?.[r[n.option.table?.rowKey]]?.loading,
|
|
2084
2110
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2085
2111
|
ref_for: !0
|
|
2086
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (d(), b("span", yt,
|
|
2112
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (d(), b("span", yt, M(r[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
2087
2113
|
], 64)) : (d(), b("span", {
|
|
2088
2114
|
key: 2,
|
|
2089
2115
|
style: ge({
|
|
@@ -2113,24 +2139,24 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2113
2139
|
item: {}
|
|
2114
2140
|
},
|
|
2115
2141
|
setup(i) {
|
|
2116
|
-
return (o, f) => (d(), y(
|
|
2142
|
+
return (o, f) => (d(), y(l(ae), {
|
|
2117
2143
|
label: o.item.item.text?.form?.label ?? o.item.item.label,
|
|
2118
2144
|
prop: o.item.item.key,
|
|
2119
2145
|
"label-width": o.item.item.text?.form?.label == "" ? 0 : o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
|
|
2120
2146
|
}, {
|
|
2121
2147
|
default: g(() => [
|
|
2122
|
-
|
|
2148
|
+
S("div", wt, [
|
|
2123
2149
|
V(o.$slots, "form-" + o.item.item.key + "-start", {
|
|
2124
2150
|
row: o.conf.update.form,
|
|
2125
2151
|
item: o.item.item
|
|
2126
2152
|
}),
|
|
2127
|
-
|
|
2128
|
-
|
|
2153
|
+
S("div", kt, [
|
|
2154
|
+
S("div", vt, [
|
|
2129
2155
|
V(o.$slots, "form-" + o.item.item.key, {
|
|
2130
2156
|
row: o.conf.update.form,
|
|
2131
2157
|
item: o.item.item
|
|
2132
2158
|
}, () => [
|
|
2133
|
-
o.item.item.type === "input" ? (d(), y(
|
|
2159
|
+
o.item.item.type === "input" ? (d(), y(l(_), C({
|
|
2134
2160
|
key: 0,
|
|
2135
2161
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2136
2162
|
"onUpdate:modelValue": f[0] || (f[0] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
@@ -2140,17 +2166,17 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2140
2166
|
o.item.item.options?.input?.prepend ? {
|
|
2141
2167
|
name: "prepend",
|
|
2142
2168
|
fn: g(() => [
|
|
2143
|
-
E(
|
|
2169
|
+
E(M(typeof o.item.item.options?.input?.prepend == "function" ? o.item.item.options?.input?.prepend(o.conf.update.form) : o.item.item.options?.input?.prepend), 1)
|
|
2144
2170
|
]),
|
|
2145
2171
|
key: "0"
|
|
2146
2172
|
} : void 0
|
|
2147
|
-
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (d(), y(
|
|
2173
|
+
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (d(), y(l(Z), C({
|
|
2148
2174
|
key: 1,
|
|
2149
2175
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2150
2176
|
"onUpdate:modelValue": f[1] || (f[1] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2151
2177
|
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2152
2178
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2153
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (d(), y(
|
|
2179
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (d(), y(l(X), C({
|
|
2154
2180
|
key: 2,
|
|
2155
2181
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2156
2182
|
"onUpdate:modelValue": f[2] || (f[2] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
@@ -2159,13 +2185,13 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2159
2185
|
style: { width: "100%" }
|
|
2160
2186
|
}), {
|
|
2161
2187
|
default: g(() => [
|
|
2162
|
-
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(
|
|
2188
|
+
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(l(W), C({
|
|
2163
2189
|
key: n.value,
|
|
2164
2190
|
ref_for: !0
|
|
2165
2191
|
}, n, z(n.on || {})), null, 16))), 128))
|
|
2166
2192
|
]),
|
|
2167
2193
|
_: 1
|
|
2168
|
-
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (d(), y(
|
|
2194
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (d(), y(l(se), C({
|
|
2169
2195
|
key: 3,
|
|
2170
2196
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2171
2197
|
"onUpdate:modelValue": f[3] || (f[3] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
@@ -2174,33 +2200,33 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2174
2200
|
style: { width: "100%" }
|
|
2175
2201
|
}), {
|
|
2176
2202
|
default: g(() => [
|
|
2177
|
-
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(
|
|
2203
|
+
(d(!0), b(D, null, A(o.conf.update.getBind(o.item.item).data, (n) => (d(), y(l(de), C({
|
|
2178
2204
|
key: n.value,
|
|
2179
2205
|
ref_for: !0
|
|
2180
2206
|
}, n, z(n.on || {})), null, 16))), 128))
|
|
2181
2207
|
]),
|
|
2182
2208
|
_: 1
|
|
2183
|
-
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (d(), y(
|
|
2209
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (d(), y(pe, C({
|
|
2184
2210
|
key: 4,
|
|
2185
2211
|
row: o.conf.update.form,
|
|
2186
2212
|
field: o.item.item.key
|
|
2187
2213
|
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2188
2214
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2189
2215
|
style: { width: "100%" }
|
|
2190
|
-
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (d(), y(
|
|
2216
|
+
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (d(), y(l(he), C({
|
|
2191
2217
|
key: 5,
|
|
2192
2218
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2193
2219
|
"onUpdate:modelValue": f[4] || (f[4] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2194
2220
|
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2195
2221
|
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2196
2222
|
style: { width: "100%" }
|
|
2197
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (d(), y(
|
|
2223
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (d(), y(l(ue), C({
|
|
2198
2224
|
key: 6,
|
|
2199
2225
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2200
2226
|
"onUpdate:modelValue": f[5] || (f[5] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
2201
2227
|
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2202
2228
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2203
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (
|
|
2229
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (l(L).customComponent[o.item.item.type] || l(L).customComponent[o.item.item.type]?.form) ? (d(), y(q(l(L).customComponent[o.item.item.type]?.form || l(L).customComponent[o.item.item.type]), C({
|
|
2204
2230
|
key: 7,
|
|
2205
2231
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
2206
2232
|
"onUpdate:modelValue": f[6] || (f[6] = (n) => o.conf.update.form[o.item.item.key] = n)
|
|
@@ -2239,7 +2265,7 @@ const ft = /* @__PURE__ */ Y(st, [["render", ut]]), pt = { class: "row flex-cent
|
|
|
2239
2265
|
};
|
|
2240
2266
|
function Dt(i, o) {
|
|
2241
2267
|
return d(), b("svg", $t, o[0] || (o[0] = [
|
|
2242
|
-
|
|
2268
|
+
S("path", {
|
|
2243
2269
|
fill: "currentColor",
|
|
2244
2270
|
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"
|
|
2245
2271
|
}, null, -1)
|
|
@@ -2251,7 +2277,7 @@ const Et = /* @__PURE__ */ Y(zt, [["render", Dt]]), Ot = {}, Ut = {
|
|
|
2251
2277
|
};
|
|
2252
2278
|
function St(i, o) {
|
|
2253
2279
|
return d(), b("svg", Ut, o[0] || (o[0] = [
|
|
2254
|
-
|
|
2280
|
+
S("path", {
|
|
2255
2281
|
fill: "currentColor",
|
|
2256
2282
|
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"
|
|
2257
2283
|
}, null, -1)
|
|
@@ -2271,77 +2297,77 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2271
2297
|
o.item?.key !== void 0 && (o.conf.search.form[o.item.key] = n);
|
|
2272
2298
|
}
|
|
2273
2299
|
});
|
|
2274
|
-
return (n,
|
|
2300
|
+
return (n, a) => l(L).customComponent[n.type ?? ""]?.search ? (d(), y(q(l(L).customComponent[n.type ?? ""]?.search), C({
|
|
2275
2301
|
key: 0,
|
|
2276
2302
|
modelValue: f.value,
|
|
2277
|
-
"onUpdate:modelValue":
|
|
2278
|
-
}, n.item.options?.search?.[n.type ?? ""], z(n.item.options?.search?.[n.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : n.type === "input" ? (d(), y(
|
|
2303
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => f.value = t)
|
|
2304
|
+
}, n.item.options?.search?.[n.type ?? ""], z(n.item.options?.search?.[n.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : n.type === "input" ? (d(), y(l(_), C({
|
|
2279
2305
|
key: 1,
|
|
2280
2306
|
modelValue: f.value,
|
|
2281
|
-
"onUpdate:modelValue":
|
|
2307
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => f.value = t),
|
|
2282
2308
|
placeholder: n.conf.search.getPlaceholder(n.item),
|
|
2283
2309
|
clearable: "",
|
|
2284
2310
|
disabled: n.item.disabled?.search
|
|
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(
|
|
2311
|
+
}, 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(l(X), C({
|
|
2286
2312
|
key: 2,
|
|
2287
2313
|
modelValue: f.value,
|
|
2288
|
-
"onUpdate:modelValue":
|
|
2289
|
-
placeholder: n.conf.search.getPlaceholder(n.item,
|
|
2314
|
+
"onUpdate:modelValue": a[2] || (a[2] = (t) => f.value = t),
|
|
2315
|
+
placeholder: n.conf.search.getPlaceholder(n.item, l(w).tCurd("placeholderSelect")),
|
|
2290
2316
|
clearable: "",
|
|
2291
2317
|
disabled: n.item.disabled?.search
|
|
2292
2318
|
}, n.item.options?.search?.switch || n.item.options?.switch, z(n.item.options?.search?.switch?.on || n.item.options?.switch?.on || {})), {
|
|
2293
2319
|
default: g(() => [
|
|
2294
|
-
(d(), y(
|
|
2320
|
+
(d(), y(l(W), {
|
|
2295
2321
|
key: n.item.options?.switch?.activeValue,
|
|
2296
2322
|
label: n.item.options?.switch?.activeText,
|
|
2297
2323
|
value: n.item.options?.switch?.activeValue
|
|
2298
2324
|
}, null, 8, ["label", "value"])),
|
|
2299
|
-
(d(), y(
|
|
2325
|
+
(d(), y(l(W), {
|
|
2300
2326
|
key: n.item.options?.switch?.inactiveValue,
|
|
2301
2327
|
label: n.item.options?.switch?.inactiveText,
|
|
2302
2328
|
value: n.item.options?.switch?.inactiveValue
|
|
2303
2329
|
}, null, 8, ["label", "value"]))
|
|
2304
2330
|
]),
|
|
2305
2331
|
_: 1
|
|
2306
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "select" ? (d(), y(
|
|
2332
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "select" ? (d(), y(l(X), C({
|
|
2307
2333
|
key: 3,
|
|
2308
2334
|
modelValue: f.value,
|
|
2309
|
-
"onUpdate:modelValue":
|
|
2310
|
-
placeholder: n.conf.search.getPlaceholder(n.item,
|
|
2335
|
+
"onUpdate:modelValue": a[3] || (a[3] = (t) => f.value = t),
|
|
2336
|
+
placeholder: n.conf.search.getPlaceholder(n.item, l(w).tCurd("placeholderSelect")),
|
|
2311
2337
|
clearable: "",
|
|
2312
2338
|
disabled: n.item.disabled?.search
|
|
2313
2339
|
}, n.item.options?.search?.select || n.item.options?.select, z(n.item.options?.search?.select?.on || n.item.options?.select?.on || {})), {
|
|
2314
2340
|
default: g(() => [
|
|
2315
|
-
(d(!0), b(D, null, A(n.item.options?.search?.select?.data || n.item.options?.select?.data || [], (t) => (d(), y(
|
|
2341
|
+
(d(!0), b(D, null, A(n.item.options?.search?.select?.data || n.item.options?.select?.data || [], (t) => (d(), y(l(W), {
|
|
2316
2342
|
key: t.value,
|
|
2317
2343
|
label: t.label,
|
|
2318
2344
|
value: t.value
|
|
2319
2345
|
}, null, 8, ["label", "value"]))), 128))
|
|
2320
2346
|
]),
|
|
2321
2347
|
_: 1
|
|
2322
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (d(), y(
|
|
2348
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (d(), y(l(se), C({
|
|
2323
2349
|
key: 4,
|
|
2324
2350
|
modelValue: f.value,
|
|
2325
|
-
"onUpdate:modelValue":
|
|
2351
|
+
"onUpdate:modelValue": a[4] || (a[4] = (t) => f.value = t),
|
|
2326
2352
|
disabled: n.item.disabled?.search
|
|
2327
2353
|
}, n.item.options?.search?.radio || n.item.options?.radio, z(n.item.options?.search?.radio?.on || n.item.options?.radio?.on || {})), {
|
|
2328
2354
|
default: g(() => [
|
|
2329
|
-
(d(!0), b(D, null, A(n.item.options?.radio?.data, (t) => (d(), y(
|
|
2355
|
+
(d(!0), b(D, null, A(n.item.options?.radio?.data, (t) => (d(), y(l(de), {
|
|
2330
2356
|
key: t.value,
|
|
2331
2357
|
label: t.label,
|
|
2332
2358
|
value: t.value
|
|
2333
2359
|
}, null, 8, ["label", "value"]))), 128))
|
|
2334
2360
|
]),
|
|
2335
2361
|
_: 1
|
|
2336
|
-
}, 16, ["modelValue", "disabled"])) : n.type === "datetime" ? (d(), y(
|
|
2362
|
+
}, 16, ["modelValue", "disabled"])) : n.type === "datetime" ? (d(), y(l(ue), C({
|
|
2337
2363
|
key: 5,
|
|
2338
2364
|
modelValue: f.value,
|
|
2339
|
-
"onUpdate:modelValue":
|
|
2365
|
+
"onUpdate:modelValue": a[5] || (a[5] = (t) => f.value = t),
|
|
2340
2366
|
disabled: n.item.disabled?.search
|
|
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 &&
|
|
2367
|
+
}, 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 && l(L).customComponent[n.type] ? (d(), y(q(l(L).customComponent[n.type]), C({
|
|
2342
2368
|
key: 6,
|
|
2343
2369
|
modelValue: f.value,
|
|
2344
|
-
"onUpdate:modelValue":
|
|
2370
|
+
"onUpdate:modelValue": a[6] || (a[6] = (t) => f.value = t)
|
|
2345
2371
|
}, 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 || {}), {
|
|
2346
2372
|
disabled: n.item.disabled?.search
|
|
2347
2373
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0);
|
|
@@ -2381,7 +2407,7 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2381
2407
|
}
|
|
2382
2408
|
},
|
|
2383
2409
|
setup(i, { expose: o }) {
|
|
2384
|
-
const f =
|
|
2410
|
+
const f = O.EDialog, n = i, a = O.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: s } = Je(n);
|
|
2385
2411
|
return o({
|
|
2386
2412
|
conf: t
|
|
2387
2413
|
}), (m, p) => {
|
|
@@ -2389,84 +2415,84 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2389
2415
|
return d(), b("div", {
|
|
2390
2416
|
class: I(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2391
2417
|
}, [
|
|
2392
|
-
|
|
2418
|
+
S("div", {
|
|
2393
2419
|
class: I(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2394
2420
|
style: { overflow: "hidden" }
|
|
2395
2421
|
}, [
|
|
2396
2422
|
V(m.$slots, "box-left"),
|
|
2397
|
-
|
|
2423
|
+
S("div", {
|
|
2398
2424
|
class: I(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
|
|
2399
2425
|
}, [
|
|
2400
2426
|
i.option.search?.show !== !1 ? (d(), b("div", Ft, [
|
|
2401
|
-
|
|
2402
|
-
model:
|
|
2427
|
+
U(l(Q), {
|
|
2428
|
+
model: l(t).search.form,
|
|
2403
2429
|
inline: "",
|
|
2404
2430
|
size: i.option.size?.search
|
|
2405
2431
|
}, {
|
|
2406
2432
|
default: g(() => [
|
|
2407
2433
|
V(m.$slots, "search-start", {
|
|
2408
|
-
row:
|
|
2434
|
+
row: l(t).search.form
|
|
2409
2435
|
}),
|
|
2410
|
-
(d(!0), b(D, null, A(
|
|
2436
|
+
(d(!0), b(D, null, A(l(t).search.column.list, (h) => (d(), b(D, {
|
|
2411
2437
|
key: h.key
|
|
2412
2438
|
}, [
|
|
2413
2439
|
V(m.$slots, "search-" + h.key + "-start", {
|
|
2414
|
-
row:
|
|
2440
|
+
row: l(t).search.form
|
|
2415
2441
|
}),
|
|
2416
|
-
(typeof h.show?.search == "function" ? h.show?.search(
|
|
2442
|
+
(typeof h.show?.search == "function" ? h.show?.search(l(t).search.form) : h.show?.search) ? (d(), y(l(ae), {
|
|
2417
2443
|
key: 0,
|
|
2418
2444
|
label: h.text?.search?.label ?? h.label
|
|
2419
2445
|
}, {
|
|
2420
2446
|
default: g(() => [
|
|
2421
2447
|
V(m.$slots, "search-" + h.key + "-left", {
|
|
2422
|
-
row:
|
|
2448
|
+
row: l(t).search.form
|
|
2423
2449
|
}),
|
|
2424
2450
|
V(m.$slots, "search-" + h.key, {
|
|
2425
|
-
row:
|
|
2451
|
+
row: l(t).search.form
|
|
2426
2452
|
}, () => [
|
|
2427
2453
|
h.options?.search?.type ? (d(), y(me, {
|
|
2428
2454
|
key: 0,
|
|
2429
2455
|
item: h,
|
|
2430
|
-
conf:
|
|
2456
|
+
conf: l(t),
|
|
2431
2457
|
type: h.options.search.type
|
|
2432
2458
|
}, null, 8, ["item", "conf", "type"])) : (d(), y(me, {
|
|
2433
2459
|
key: 1,
|
|
2434
2460
|
item: h,
|
|
2435
|
-
conf:
|
|
2461
|
+
conf: l(t),
|
|
2436
2462
|
type: h.type
|
|
2437
2463
|
}, null, 8, ["item", "conf", "type"]))
|
|
2438
2464
|
]),
|
|
2439
2465
|
V(m.$slots, "search-" + h.key + "-right", {
|
|
2440
|
-
row:
|
|
2466
|
+
row: l(t).search.form
|
|
2441
2467
|
})
|
|
2442
2468
|
]),
|
|
2443
2469
|
_: 2
|
|
2444
2470
|
}, 1032, ["label"])) : v("", !0),
|
|
2445
2471
|
V(m.$slots, "search-" + h.key + "-end", {
|
|
2446
|
-
row:
|
|
2472
|
+
row: l(t).search.form
|
|
2447
2473
|
})
|
|
2448
2474
|
], 64))), 128)),
|
|
2449
2475
|
V(m.$slots, "search-center", {
|
|
2450
|
-
row:
|
|
2476
|
+
row: l(t).search.form
|
|
2451
2477
|
}),
|
|
2452
|
-
i.option.tools?.search || i.option.tools?.reset ? (d(), y(
|
|
2478
|
+
i.option.tools?.search || i.option.tools?.reset ? (d(), y(l(ae), { key: 0 }, {
|
|
2453
2479
|
default: g(() => [
|
|
2454
|
-
i.option.tools?.search ? (d(), y(
|
|
2480
|
+
i.option.tools?.search ? (d(), y(l(T), {
|
|
2455
2481
|
key: 0,
|
|
2456
2482
|
type: "primary",
|
|
2457
|
-
onClick:
|
|
2483
|
+
onClick: l(t).search.submit
|
|
2458
2484
|
}, {
|
|
2459
2485
|
default: g(() => [
|
|
2460
|
-
E(
|
|
2486
|
+
E(M(l(w).tCurd("search")), 1)
|
|
2461
2487
|
]),
|
|
2462
2488
|
_: 1
|
|
2463
2489
|
}, 8, ["onClick"])) : v("", !0),
|
|
2464
|
-
i.option.tools?.reset ? (d(), y(
|
|
2490
|
+
i.option.tools?.reset ? (d(), y(l(T), {
|
|
2465
2491
|
key: 1,
|
|
2466
|
-
onClick:
|
|
2492
|
+
onClick: l(t).search.reset
|
|
2467
2493
|
}, {
|
|
2468
2494
|
default: g(() => [
|
|
2469
|
-
E(
|
|
2495
|
+
E(M(l(w).tCurd("reset")), 1)
|
|
2470
2496
|
]),
|
|
2471
2497
|
_: 1
|
|
2472
2498
|
}, 8, ["onClick"])) : v("", !0)
|
|
@@ -2474,84 +2500,84 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2474
2500
|
_: 1
|
|
2475
2501
|
})) : v("", !0),
|
|
2476
2502
|
V(m.$slots, "search-end", {
|
|
2477
|
-
row:
|
|
2503
|
+
row: l(t).search.form
|
|
2478
2504
|
})
|
|
2479
2505
|
]),
|
|
2480
2506
|
_: 3
|
|
2481
2507
|
}, 8, ["model", "size"])
|
|
2482
2508
|
])) : v("", !0),
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
a
|
|
2486
|
-
|
|
2509
|
+
S("div", At, [
|
|
2510
|
+
S("div", Tt, [
|
|
2511
|
+
l(a)(i.option.tools?.add) ? (d(), b("div", jt, [
|
|
2512
|
+
U(l(T), {
|
|
2487
2513
|
type: "primary",
|
|
2488
|
-
onClick: p[0] || (p[0] = (h) =>
|
|
2514
|
+
onClick: p[0] || (p[0] = (h) => l(t).update.open(l(f).Add)),
|
|
2489
2515
|
size: i.option.size?.search
|
|
2490
2516
|
}, {
|
|
2491
2517
|
default: g(() => [
|
|
2492
|
-
E(
|
|
2518
|
+
E(M(l(w).tCurd("add")), 1)
|
|
2493
2519
|
]),
|
|
2494
2520
|
_: 1
|
|
2495
2521
|
}, 8, ["size"])
|
|
2496
2522
|
])) : v("", !0),
|
|
2497
|
-
i.option.table?.selectable && a
|
|
2498
|
-
|
|
2523
|
+
i.option.table?.selectable && l(a)(i.option.tools?.delete) ? (d(), b("div", Lt, [
|
|
2524
|
+
U(l(T), {
|
|
2499
2525
|
type: "danger",
|
|
2500
|
-
onClick: p[1] || (p[1] = (h) =>
|
|
2526
|
+
onClick: p[1] || (p[1] = (h) => l(t).remove.open(l(t).table.selection.list)),
|
|
2501
2527
|
size: i.option.size?.search
|
|
2502
2528
|
}, {
|
|
2503
2529
|
default: g(() => [
|
|
2504
|
-
E(
|
|
2530
|
+
E(M(l(w).tCurd("delete")), 1)
|
|
2505
2531
|
]),
|
|
2506
2532
|
_: 1
|
|
2507
2533
|
}, 8, ["size"])
|
|
2508
2534
|
])) : v("", !0),
|
|
2509
2535
|
i.option.tools?.expand ? (d(), b("div", Bt, [
|
|
2510
|
-
|
|
2536
|
+
U(l(T), {
|
|
2511
2537
|
type: "warning",
|
|
2512
|
-
onClick: p[2] || (p[2] = (h) =>
|
|
2538
|
+
onClick: p[2] || (p[2] = (h) => l(t).table.expand.all()),
|
|
2513
2539
|
size: i.option.size?.search
|
|
2514
2540
|
}, {
|
|
2515
2541
|
default: g(() => [
|
|
2516
|
-
E(
|
|
2542
|
+
E(M(l(w).tCurd("expandCollapse")), 1)
|
|
2517
2543
|
]),
|
|
2518
2544
|
_: 1
|
|
2519
2545
|
}, 8, ["size"])
|
|
2520
2546
|
])) : v("", !0),
|
|
2521
2547
|
i.option.tools?.export?.show ? (d(), b(D, { key: 3 }, [
|
|
2522
|
-
i.option.tools?.export?.dropdown?.show ? (d(), y(
|
|
2548
|
+
i.option.tools?.export?.dropdown?.show ? (d(), y(l($e), {
|
|
2523
2549
|
key: 0,
|
|
2524
|
-
onCommand:
|
|
2550
|
+
onCommand: l(t).export.click
|
|
2525
2551
|
}, {
|
|
2526
2552
|
dropdown: g(() => [
|
|
2527
|
-
|
|
2553
|
+
U(l(De), {
|
|
2528
2554
|
size: i.option.size?.search
|
|
2529
2555
|
}, {
|
|
2530
2556
|
default: g(() => [
|
|
2531
|
-
i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || a
|
|
2557
|
+
i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || l(a)(i.option.tools?.delete)) ? (d(), y(l(ne), {
|
|
2532
2558
|
key: 0,
|
|
2533
2559
|
command: "select"
|
|
2534
2560
|
}, {
|
|
2535
2561
|
default: g(() => [
|
|
2536
|
-
E(
|
|
2562
|
+
E(M(l(w).tCurd("exportSelect")), 1)
|
|
2537
2563
|
]),
|
|
2538
2564
|
_: 1
|
|
2539
2565
|
})) : v("", !0),
|
|
2540
|
-
i.option.tools?.export?.dropdown?.page ? (d(), y(
|
|
2566
|
+
i.option.tools?.export?.dropdown?.page ? (d(), y(l(ne), {
|
|
2541
2567
|
key: 1,
|
|
2542
2568
|
command: "page"
|
|
2543
2569
|
}, {
|
|
2544
2570
|
default: g(() => [
|
|
2545
|
-
E(
|
|
2571
|
+
E(M(l(w).tCurd("exportPage")), 1)
|
|
2546
2572
|
]),
|
|
2547
2573
|
_: 1
|
|
2548
2574
|
})) : v("", !0),
|
|
2549
|
-
i.option.tools?.export?.dropdown?.all ? (d(), y(
|
|
2575
|
+
i.option.tools?.export?.dropdown?.all ? (d(), y(l(ne), {
|
|
2550
2576
|
key: 2,
|
|
2551
2577
|
command: "all"
|
|
2552
2578
|
}, {
|
|
2553
2579
|
default: g(() => [
|
|
2554
|
-
E(
|
|
2580
|
+
E(M(l(w).tCurd("exportAll")), 1)
|
|
2555
2581
|
]),
|
|
2556
2582
|
_: 1
|
|
2557
2583
|
})) : v("", !0)
|
|
@@ -2560,14 +2586,14 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2560
2586
|
}, 8, ["size"])
|
|
2561
2587
|
]),
|
|
2562
2588
|
default: g(() => [
|
|
2563
|
-
|
|
2564
|
-
|
|
2589
|
+
S("div", Rt, [
|
|
2590
|
+
U(l(T), {
|
|
2565
2591
|
type: "warning",
|
|
2566
|
-
loading:
|
|
2592
|
+
loading: l(t).export.loading,
|
|
2567
2593
|
size: i.option.size?.search
|
|
2568
2594
|
}, {
|
|
2569
2595
|
default: g(() => [
|
|
2570
|
-
E(
|
|
2596
|
+
E(M(l(w).tCurd("export")), 1)
|
|
2571
2597
|
]),
|
|
2572
2598
|
_: 1
|
|
2573
2599
|
}, 8, ["loading", "size"])
|
|
@@ -2575,14 +2601,14 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2575
2601
|
]),
|
|
2576
2602
|
_: 1
|
|
2577
2603
|
}, 8, ["onCommand"])) : (d(), b("div", It, [
|
|
2578
|
-
|
|
2604
|
+
U(l(T), {
|
|
2579
2605
|
type: "warning",
|
|
2580
|
-
loading:
|
|
2606
|
+
loading: l(t).export.loading,
|
|
2581
2607
|
size: i.option.size?.search,
|
|
2582
|
-
onClick: p[3] || (p[3] = (h) =>
|
|
2608
|
+
onClick: p[3] || (p[3] = (h) => l(t).export.run.start("all"))
|
|
2583
2609
|
}, {
|
|
2584
2610
|
default: g(() => [
|
|
2585
|
-
E(
|
|
2611
|
+
E(M(l(w).tCurd("export")), 1)
|
|
2586
2612
|
]),
|
|
2587
2613
|
_: 1
|
|
2588
2614
|
}, 8, ["loading", "size"])
|
|
@@ -2590,36 +2616,36 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2590
2616
|
], 64)) : v("", !0),
|
|
2591
2617
|
V(m.$slots, "tools-left")
|
|
2592
2618
|
]),
|
|
2593
|
-
|
|
2619
|
+
S("div", Ht, [
|
|
2594
2620
|
V(m.$slots, "tools-right"),
|
|
2595
|
-
|
|
2621
|
+
l(t).page.showTools ? (d(), y(l(ce), C({
|
|
2596
2622
|
key: 0,
|
|
2597
|
-
"current-page":
|
|
2598
|
-
"onUpdate:currentPage": p[4] || (p[4] = (h) =>
|
|
2599
|
-
"page-size":
|
|
2600
|
-
"onUpdate:pageSize": p[5] || (p[5] = (h) =>
|
|
2623
|
+
"current-page": l(t).page.num,
|
|
2624
|
+
"onUpdate:currentPage": p[4] || (p[4] = (h) => l(t).page.num = h),
|
|
2625
|
+
"page-size": l(t).page.size,
|
|
2626
|
+
"onUpdate:pageSize": p[5] || (p[5] = (h) => l(t).page.size = h),
|
|
2601
2627
|
background: "",
|
|
2602
|
-
"page-sizes":
|
|
2603
|
-
"pager-count":
|
|
2604
|
-
layout:
|
|
2605
|
-
total:
|
|
2628
|
+
"page-sizes": l(t).page.sizeList,
|
|
2629
|
+
"pager-count": l(t).page.pagerCount,
|
|
2630
|
+
layout: l(t).page.layout,
|
|
2631
|
+
total: l(t).page.total,
|
|
2606
2632
|
size: i.option.size?.table,
|
|
2607
|
-
onSizeChange:
|
|
2608
|
-
onCurrentChange:
|
|
2633
|
+
onSizeChange: l(t).table.getList,
|
|
2634
|
+
onCurrentChange: l(t).table.getList
|
|
2609
2635
|
}, 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
2636
|
i.option.tools?.expandColumn === void 0 || i.option.tools?.expandColumn ? (d(), y(u, {
|
|
2611
2637
|
key: 1,
|
|
2612
2638
|
effect: "dark",
|
|
2613
|
-
content:
|
|
2639
|
+
content: l(t).table.header.group.expand ? l(w).tCurd("mergeColumn") : l(w).tCurd("expandColumn"),
|
|
2614
2640
|
placement: "top"
|
|
2615
2641
|
}, {
|
|
2616
2642
|
default: g(() => [
|
|
2617
|
-
|
|
2643
|
+
S("div", {
|
|
2618
2644
|
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2619
2645
|
onClick: p[6] || (p[6] = //@ts-ignore
|
|
2620
|
-
(...h) =>
|
|
2646
|
+
(...h) => l(t).table.header.group.toggleExpandAll && l(t).table.header.group.toggleExpandAll(...h))
|
|
2621
2647
|
}, [
|
|
2622
|
-
|
|
2648
|
+
l(t).table.header.group.expand ? (d(), y(Et, { key: 0 })) : (d(), y(Mt, { key: 1 }))
|
|
2623
2649
|
], 2)
|
|
2624
2650
|
]),
|
|
2625
2651
|
_: 1
|
|
@@ -2628,30 +2654,30 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2628
2654
|
key: 2,
|
|
2629
2655
|
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2630
2656
|
onClick: p[7] || (p[7] = //@ts-ignore
|
|
2631
|
-
(...h) =>
|
|
2657
|
+
(...h) => l(t).table.getList && l(t).table.getList(...h))
|
|
2632
2658
|
}, [
|
|
2633
|
-
|
|
2659
|
+
U(Ze)
|
|
2634
2660
|
], 2)) : v("", !0)
|
|
2635
2661
|
])
|
|
2636
2662
|
]),
|
|
2637
|
-
|
|
2663
|
+
S("div", {
|
|
2638
2664
|
class: I(["fit-width relative form-box", [i.option.table?.fitHeight ? "col " : "", i.option.table?.editMode ? "edit-mode" : ""]])
|
|
2639
2665
|
}, [
|
|
2640
|
-
|
|
2666
|
+
S("div", {
|
|
2641
2667
|
class: I(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2642
2668
|
}, [
|
|
2643
|
-
Me((d(), y(
|
|
2669
|
+
Me((d(), y(l(Ee), C({
|
|
2644
2670
|
ref_key: "tableRef",
|
|
2645
2671
|
ref: s,
|
|
2646
|
-
data:
|
|
2672
|
+
data: l(t).table.data,
|
|
2647
2673
|
border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
|
|
2648
|
-
onSelectionChange:
|
|
2649
|
-
onSortChange:
|
|
2650
|
-
"expand-row-keys":
|
|
2651
|
-
onExpandChange:
|
|
2674
|
+
onSelectionChange: l(t).table.selection.change,
|
|
2675
|
+
onSortChange: l(t).table.sort.change,
|
|
2676
|
+
"expand-row-keys": l(t).table.expand.rowKeys,
|
|
2677
|
+
onExpandChange: l(t).table.expand.change
|
|
2652
2678
|
}, i.option.table, z(i.option.table?.on || {})), {
|
|
2653
2679
|
default: g(() => [
|
|
2654
|
-
(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || a
|
|
2680
|
+
(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || l(a)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (d(), y(l(oe), C({
|
|
2655
2681
|
key: 0,
|
|
2656
2682
|
type: "selection",
|
|
2657
2683
|
width: "40",
|
|
@@ -2660,7 +2686,7 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2660
2686
|
"show-overflow-tooltip": !1,
|
|
2661
2687
|
className: "cc1-form-selectable-column"
|
|
2662
2688
|
}, 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(
|
|
2689
|
+
(typeof i.option.table?.index == "object" ? i.option.table?.index?.show : i.option.table?.index) ? (d(), y(l(oe), C({
|
|
2664
2690
|
key: 1,
|
|
2665
2691
|
type: "index",
|
|
2666
2692
|
fixed: "left",
|
|
@@ -2670,9 +2696,9 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2670
2696
|
"show-overflow-tooltip": !1,
|
|
2671
2697
|
className: "cc1-form-index-column"
|
|
2672
2698
|
}, 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
|
-
|
|
2674
|
-
conf:
|
|
2675
|
-
columnList:
|
|
2699
|
+
U(bt, {
|
|
2700
|
+
conf: l(t),
|
|
2701
|
+
columnList: l(t).table.column.list,
|
|
2676
2702
|
option: i.option
|
|
2677
2703
|
}, G({ _: 2 }, [
|
|
2678
2704
|
A(m.$slots, (h, c) => ({
|
|
@@ -2682,7 +2708,7 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2682
2708
|
])
|
|
2683
2709
|
}))
|
|
2684
2710
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2685
|
-
a
|
|
2711
|
+
l(a)(i.option.table?.add) || l(a)(i.option.table?.update) || l(a)(i.option.table?.delete) || l(a)(i.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (d(), y(l(oe), C({
|
|
2686
2712
|
key: 2,
|
|
2687
2713
|
width: "auto",
|
|
2688
2714
|
"max-width": "200",
|
|
@@ -2691,80 +2717,80 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2691
2717
|
}, i.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2692
2718
|
header: g(() => [
|
|
2693
2719
|
V(m.$slots, "table-header-op", {}, () => [
|
|
2694
|
-
E(
|
|
2720
|
+
E(M(l(w).tCurd("operation")), 1)
|
|
2695
2721
|
])
|
|
2696
2722
|
]),
|
|
2697
2723
|
default: g(({ row: h }) => [
|
|
2698
|
-
|
|
2724
|
+
U(l(Q), {
|
|
2699
2725
|
size: i.option.size?.table
|
|
2700
2726
|
}, {
|
|
2701
2727
|
default: g(() => [
|
|
2702
2728
|
V(m.$slots, "table-op-left", { row: h }),
|
|
2703
|
-
|
|
2704
|
-
|
|
2729
|
+
l(t).update.type === l(f).Update && i.option.table?.inlineEdit && l(t).update.form[n.option.table?.rowKey] === h[n.option.table?.rowKey] ? (d(), b(D, { key: 0 }, [
|
|
2730
|
+
U(l(T), {
|
|
2705
2731
|
link: "",
|
|
2706
2732
|
type: "info",
|
|
2707
|
-
onClick:
|
|
2733
|
+
onClick: l(t).update.close
|
|
2708
2734
|
}, {
|
|
2709
2735
|
default: g(() => [
|
|
2710
|
-
E(
|
|
2736
|
+
E(M(l(w).tCurd("cancel")), 1)
|
|
2711
2737
|
]),
|
|
2712
2738
|
_: 1
|
|
2713
2739
|
}, 8, ["onClick"]),
|
|
2714
|
-
|
|
2740
|
+
U(l(T), {
|
|
2715
2741
|
link: "",
|
|
2716
2742
|
type: "primary",
|
|
2717
|
-
onClick:
|
|
2718
|
-
loading:
|
|
2743
|
+
onClick: l(t).update.submit,
|
|
2744
|
+
loading: l(t).update.loading
|
|
2719
2745
|
}, {
|
|
2720
2746
|
default: g(() => [
|
|
2721
|
-
E(
|
|
2747
|
+
E(M(l(w).tCurd("confirm")), 1)
|
|
2722
2748
|
]),
|
|
2723
2749
|
_: 1
|
|
2724
2750
|
}, 8, ["onClick", "loading"]),
|
|
2725
2751
|
V(m.$slots, "table-op-edit-right", { row: h })
|
|
2726
2752
|
], 64)) : (d(), b(D, { key: 1 }, [
|
|
2727
|
-
a
|
|
2753
|
+
l(a)(i.option.table?.add, h) ? (d(), y(l(T), {
|
|
2728
2754
|
key: 0,
|
|
2729
2755
|
link: "",
|
|
2730
2756
|
type: "primary",
|
|
2731
|
-
onClick: (c) =>
|
|
2757
|
+
onClick: (c) => l(t).update.open(l(f).Add, h)
|
|
2732
2758
|
}, {
|
|
2733
2759
|
default: g(() => [
|
|
2734
|
-
E(
|
|
2760
|
+
E(M(l(w).tCurd("add")), 1)
|
|
2735
2761
|
]),
|
|
2736
2762
|
_: 2
|
|
2737
2763
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2738
|
-
a
|
|
2764
|
+
l(a)(i.option.table?.view, h) ? (d(), y(l(T), {
|
|
2739
2765
|
key: 1,
|
|
2740
2766
|
link: "",
|
|
2741
2767
|
type: "primary",
|
|
2742
|
-
onClick: (c) =>
|
|
2768
|
+
onClick: (c) => l(t).update.open(l(f).View, h)
|
|
2743
2769
|
}, {
|
|
2744
2770
|
default: g(() => [
|
|
2745
|
-
E(
|
|
2771
|
+
E(M(l(w).tCurd("view")), 1)
|
|
2746
2772
|
]),
|
|
2747
2773
|
_: 2
|
|
2748
2774
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2749
|
-
a
|
|
2775
|
+
l(a)(i.option.table?.update, h) ? (d(), y(l(T), {
|
|
2750
2776
|
key: 2,
|
|
2751
2777
|
link: "",
|
|
2752
2778
|
type: "warning",
|
|
2753
|
-
onClick: (c) =>
|
|
2779
|
+
onClick: (c) => l(t).update.open(l(f).Update, h)
|
|
2754
2780
|
}, {
|
|
2755
2781
|
default: g(() => [
|
|
2756
|
-
E(
|
|
2782
|
+
E(M(l(w).tCurd("edit")), 1)
|
|
2757
2783
|
]),
|
|
2758
2784
|
_: 2
|
|
2759
2785
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2760
|
-
a
|
|
2786
|
+
l(a)(i.option.table?.delete, h) ? (d(), y(l(T), {
|
|
2761
2787
|
key: 3,
|
|
2762
2788
|
link: "",
|
|
2763
2789
|
type: "danger",
|
|
2764
|
-
onClick: (c) =>
|
|
2790
|
+
onClick: (c) => l(t).remove.open([h])
|
|
2765
2791
|
}, {
|
|
2766
2792
|
default: g(() => [
|
|
2767
|
-
E(
|
|
2793
|
+
E(M(l(w).tCurd("delete")), 1)
|
|
2768
2794
|
]),
|
|
2769
2795
|
_: 2
|
|
2770
2796
|
}, 1032, ["onClick"])) : v("", !0),
|
|
@@ -2779,58 +2805,58 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2779
2805
|
]),
|
|
2780
2806
|
_: 3
|
|
2781
2807
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2782
|
-
[k,
|
|
2808
|
+
[k, l(t).table.loading]
|
|
2783
2809
|
])
|
|
2784
2810
|
], 2)
|
|
2785
2811
|
], 2),
|
|
2786
|
-
|
|
2787
|
-
(i.option.page?.show === void 0 || i.option.page?.show) && !
|
|
2812
|
+
S("div", Kt, [
|
|
2813
|
+
(i.option.page?.show === void 0 || i.option.page?.show) && !l(t).page.showTools ? (d(), y(l(ce), C({
|
|
2788
2814
|
key: 0,
|
|
2789
|
-
"current-page":
|
|
2790
|
-
"onUpdate:currentPage": p[8] || (p[8] = (h) =>
|
|
2791
|
-
"page-size":
|
|
2792
|
-
"onUpdate:pageSize": p[9] || (p[9] = (h) =>
|
|
2815
|
+
"current-page": l(t).page.num,
|
|
2816
|
+
"onUpdate:currentPage": p[8] || (p[8] = (h) => l(t).page.num = h),
|
|
2817
|
+
"page-size": l(t).page.size,
|
|
2818
|
+
"onUpdate:pageSize": p[9] || (p[9] = (h) => l(t).page.size = h),
|
|
2793
2819
|
background: "",
|
|
2794
|
-
"page-sizes":
|
|
2795
|
-
"pager-count":
|
|
2796
|
-
layout:
|
|
2797
|
-
total:
|
|
2820
|
+
"page-sizes": l(t).page.sizeList,
|
|
2821
|
+
"pager-count": l(t).page.pagerCount,
|
|
2822
|
+
layout: l(t).page.layout,
|
|
2823
|
+
total: l(t).page.total,
|
|
2798
2824
|
size: i.option.size?.table,
|
|
2799
|
-
onSizeChange:
|
|
2800
|
-
onCurrentChange:
|
|
2825
|
+
onSizeChange: l(t).table.getList,
|
|
2826
|
+
onCurrentChange: l(t).table.getList
|
|
2801
2827
|
}, 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)
|
|
2802
2828
|
])
|
|
2803
2829
|
], 2),
|
|
2804
2830
|
V(m.$slots, "box-right")
|
|
2805
2831
|
], 2),
|
|
2806
|
-
|
|
2807
|
-
modelValue:
|
|
2808
|
-
"onUpdate:modelValue": p[10] || (p[10] = (h) =>
|
|
2809
|
-
title:
|
|
2810
|
-
"before-close":
|
|
2832
|
+
U(l(ie), C({
|
|
2833
|
+
modelValue: l(t).update.show,
|
|
2834
|
+
"onUpdate:modelValue": p[10] || (p[10] = (h) => l(t).update.show = h),
|
|
2835
|
+
title: l(t).update.title,
|
|
2836
|
+
"before-close": l(t).update.close
|
|
2811
2837
|
}, i.option.dialog), {
|
|
2812
2838
|
footer: g(() => [
|
|
2813
|
-
|
|
2814
|
-
|
|
2839
|
+
S("span", Pt, [
|
|
2840
|
+
U(l(Q), {
|
|
2815
2841
|
size: i.option.size?.form
|
|
2816
2842
|
}, {
|
|
2817
2843
|
default: g(() => [
|
|
2818
|
-
|
|
2819
|
-
onClick:
|
|
2844
|
+
U(l(T), {
|
|
2845
|
+
onClick: l(t).update.close
|
|
2820
2846
|
}, {
|
|
2821
2847
|
default: g(() => [
|
|
2822
|
-
E(
|
|
2848
|
+
E(M(l(w).tCurd("close")), 1)
|
|
2823
2849
|
]),
|
|
2824
2850
|
_: 1
|
|
2825
2851
|
}, 8, ["onClick"]),
|
|
2826
|
-
|
|
2852
|
+
l(t).update.type !== l(f).View ? (d(), y(l(T), {
|
|
2827
2853
|
key: 0,
|
|
2828
2854
|
type: "primary",
|
|
2829
|
-
onClick:
|
|
2830
|
-
loading:
|
|
2855
|
+
onClick: l(t).update.submit,
|
|
2856
|
+
loading: l(t).update.loading
|
|
2831
2857
|
}, {
|
|
2832
2858
|
default: g(() => [
|
|
2833
|
-
E(
|
|
2859
|
+
E(M(l(w).tCurd("submit")), 1)
|
|
2834
2860
|
]),
|
|
2835
2861
|
_: 1
|
|
2836
2862
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
@@ -2840,25 +2866,25 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2840
2866
|
])
|
|
2841
2867
|
]),
|
|
2842
2868
|
default: g(() => [
|
|
2843
|
-
|
|
2869
|
+
U(l(Q), {
|
|
2844
2870
|
ref_key: "ruleFormRef",
|
|
2845
2871
|
ref: r,
|
|
2846
|
-
model:
|
|
2847
|
-
rules:
|
|
2872
|
+
model: l(t).update.form,
|
|
2873
|
+
rules: l(t).update.rules,
|
|
2848
2874
|
size: i.option.size?.form,
|
|
2849
2875
|
class: "update-dialog-form"
|
|
2850
2876
|
}, {
|
|
2851
2877
|
default: g(() => [
|
|
2852
|
-
|
|
2853
|
-
a
|
|
2878
|
+
l(t).update.showContent ? (d(!0), b(D, { key: 0 }, A(l(t).update.formColumn, (h) => (d(), b(D, null, [
|
|
2879
|
+
l(a)(
|
|
2854
2880
|
(() => {
|
|
2855
2881
|
const c = [], $ = (B) => {
|
|
2856
2882
|
B?.item?.children ? $(B.item.children) : c.push(...B.map((R) => R.item?.show?.form));
|
|
2857
2883
|
};
|
|
2858
2884
|
return $(h), c;
|
|
2859
2885
|
})(),
|
|
2860
|
-
|
|
2861
|
-
|
|
2886
|
+
l(t).update.form,
|
|
2887
|
+
l(t).update.type
|
|
2862
2888
|
) ? (d(), b("div", {
|
|
2863
2889
|
key: 0,
|
|
2864
2890
|
class: I(["row curd-row", {
|
|
@@ -2866,16 +2892,16 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2866
2892
|
}])
|
|
2867
2893
|
}, [
|
|
2868
2894
|
V(m.$slots, "form-start", {
|
|
2869
|
-
row:
|
|
2895
|
+
row: l(t).update.form
|
|
2870
2896
|
}),
|
|
2871
2897
|
(d(!0), b(D, null, A(h, (c) => (d(), b(D, null, [
|
|
2872
|
-
a
|
|
2898
|
+
l(a)(c.item.show?.form, l(t).update.form, l(t).update.type) ? (d(), b("div", {
|
|
2873
2899
|
key: 0,
|
|
2874
|
-
class: I([c.item.form.span > 0 ? `col-${
|
|
2900
|
+
class: I([c.item.form.span > 0 ? `col-${l(t).getColumnSpan(c, h)}` : "col", `form-item-col-${c.item.key}`])
|
|
2875
2901
|
}, [
|
|
2876
2902
|
(d(!0), b(D, null, A(c.item.children ? c.children : [c], ($) => (d(), y(Vt, {
|
|
2877
2903
|
key: $.item.key,
|
|
2878
|
-
conf:
|
|
2904
|
+
conf: l(t),
|
|
2879
2905
|
item: $
|
|
2880
2906
|
}, G({ _: 2 }, [
|
|
2881
2907
|
A(m.$slots, (B, R) => ({
|
|
@@ -2888,7 +2914,7 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2888
2914
|
], 2)) : v("", !0)
|
|
2889
2915
|
], 64))), 256)),
|
|
2890
2916
|
V(m.$slots, "form-end", {
|
|
2891
|
-
row:
|
|
2917
|
+
row: l(t).update.form
|
|
2892
2918
|
})
|
|
2893
2919
|
], 2)) : v("", !0)
|
|
2894
2920
|
], 64))), 256)) : v("", !0)
|
|
@@ -2898,33 +2924,33 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2898
2924
|
]),
|
|
2899
2925
|
_: 3
|
|
2900
2926
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2901
|
-
|
|
2902
|
-
modelValue:
|
|
2903
|
-
"onUpdate:modelValue": p[11] || (p[11] = (h) =>
|
|
2904
|
-
title:
|
|
2927
|
+
U(l(ie), {
|
|
2928
|
+
modelValue: l(t).remove.show,
|
|
2929
|
+
"onUpdate:modelValue": p[11] || (p[11] = (h) => l(t).remove.show = h),
|
|
2930
|
+
title: l(t).remove.title,
|
|
2905
2931
|
"close-on-click-modal": !1
|
|
2906
2932
|
}, {
|
|
2907
2933
|
footer: g(() => [
|
|
2908
|
-
|
|
2909
|
-
|
|
2934
|
+
S("span", Jt, [
|
|
2935
|
+
U(l(Q), {
|
|
2910
2936
|
size: i.option.size?.form
|
|
2911
2937
|
}, {
|
|
2912
2938
|
default: g(() => [
|
|
2913
|
-
|
|
2914
|
-
onClick:
|
|
2939
|
+
U(l(T), {
|
|
2940
|
+
onClick: l(t).remove.close
|
|
2915
2941
|
}, {
|
|
2916
2942
|
default: g(() => [
|
|
2917
|
-
E(
|
|
2943
|
+
E(M(l(w).tCurd("close")), 1)
|
|
2918
2944
|
]),
|
|
2919
2945
|
_: 1
|
|
2920
2946
|
}, 8, ["onClick"]),
|
|
2921
|
-
|
|
2947
|
+
U(l(T), {
|
|
2922
2948
|
type: "danger",
|
|
2923
|
-
onClick:
|
|
2924
|
-
loading:
|
|
2949
|
+
onClick: l(t).remove.submit,
|
|
2950
|
+
loading: l(t).remove.loading
|
|
2925
2951
|
}, {
|
|
2926
2952
|
default: g(() => [
|
|
2927
|
-
E(
|
|
2953
|
+
E(M(l(w).tCurd("confirmDelete")), 1)
|
|
2928
2954
|
]),
|
|
2929
2955
|
_: 1
|
|
2930
2956
|
}, 8, ["onClick", "loading"])
|
|
@@ -2935,15 +2961,15 @@ const Mt = /* @__PURE__ */ Y(Ot, [["render", St]]), me = /* @__PURE__ */ N({
|
|
|
2935
2961
|
]),
|
|
2936
2962
|
default: g(() => [
|
|
2937
2963
|
i.option.dialog?.delete?.content ? (d(), b("div", Nt, [
|
|
2938
|
-
|
|
2964
|
+
U(_e, {
|
|
2939
2965
|
content: i.option.dialog?.delete?.content,
|
|
2940
|
-
value:
|
|
2966
|
+
value: l(t).remove.items
|
|
2941
2967
|
}, null, 8, ["content", "value"])
|
|
2942
|
-
])) : (d(), b("div", Wt,
|
|
2968
|
+
])) : (d(), b("div", Wt, M(l(w).tCurd("confirmDeleteMessage", l(t).remove.items.length)), 1))
|
|
2943
2969
|
]),
|
|
2944
2970
|
_: 1
|
|
2945
2971
|
}, 8, ["modelValue", "title"]),
|
|
2946
|
-
|
|
2972
|
+
U(Qe, {
|
|
2947
2973
|
ref_key: "switchConfirmRef",
|
|
2948
2974
|
ref: e,
|
|
2949
2975
|
size: i.option.size?.form
|
|
@@ -2969,8 +2995,8 @@ class Zt {
|
|
|
2969
2995
|
* @param name
|
|
2970
2996
|
*/
|
|
2971
2997
|
static exportJSONFile = (o, f) => {
|
|
2972
|
-
const n = new Blob([JSON.stringify(o)], { type: "application/json" }),
|
|
2973
|
-
t.href =
|
|
2998
|
+
const n = new Blob([JSON.stringify(o)], { type: "application/json" }), a = URL.createObjectURL(n), t = document.createElement("a");
|
|
2999
|
+
t.href = a, t.download = `${f || "config"}.json`, t.click();
|
|
2974
3000
|
};
|
|
2975
3001
|
/**
|
|
2976
3002
|
* 导入文件内容,默认为json
|
|
@@ -2978,13 +3004,13 @@ class Zt {
|
|
|
2978
3004
|
* @returns
|
|
2979
3005
|
*/
|
|
2980
3006
|
static importFile = async (o) => new Promise((f, n) => {
|
|
2981
|
-
const
|
|
2982
|
-
|
|
3007
|
+
const a = document.createElement("input");
|
|
3008
|
+
a.type = "file";
|
|
2983
3009
|
const t = o?.accept || ".json";
|
|
2984
|
-
|
|
3010
|
+
a.accept = t, a.style.display = "none", a.onchange = (e) => {
|
|
2985
3011
|
const r = e.target.files[0];
|
|
2986
3012
|
if (!r) {
|
|
2987
|
-
|
|
3013
|
+
O.fail("未选择文件"), n("未选择文件");
|
|
2988
3014
|
return;
|
|
2989
3015
|
}
|
|
2990
3016
|
const s = new FileReader();
|
|
@@ -2992,13 +3018,13 @@ class Zt {
|
|
|
2992
3018
|
const p = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
|
|
2993
3019
|
f(p);
|
|
2994
3020
|
}, s.onerror = () => {
|
|
2995
|
-
|
|
2996
|
-
}, s.readAsText(r), document.body.removeChild(
|
|
2997
|
-
}, document.body.appendChild(
|
|
3021
|
+
O.fail("文件读取失败"), n("文件读取失败");
|
|
3022
|
+
}, s.readAsText(r), document.body.removeChild(a);
|
|
3023
|
+
}, document.body.appendChild(a), a.click();
|
|
2998
3024
|
});
|
|
2999
3025
|
}
|
|
3000
3026
|
const Qt = (i, o) => {
|
|
3001
|
-
if (i.component("TCurd", qt), i.component("TFormList",
|
|
3027
|
+
if (i.component("TCurd", qt), i.component("TFormList", pe), i.component("TColumn", Ne), o?.customComponent) {
|
|
3002
3028
|
L.customComponent = o.customComponent;
|
|
3003
3029
|
for (const f in o.customComponent)
|
|
3004
3030
|
i.component(f, o.customComponent[f]);
|
|
@@ -3015,8 +3041,8 @@ export {
|
|
|
3015
3041
|
L as TForm,
|
|
3016
3042
|
F as TFormConfig,
|
|
3017
3043
|
w as TFormI18n,
|
|
3018
|
-
|
|
3019
|
-
|
|
3044
|
+
pe as TFormList,
|
|
3045
|
+
O as TSys,
|
|
3020
3046
|
xt as default,
|
|
3021
3047
|
Qt as install
|
|
3022
3048
|
};
|