cc1-form 1.2.4 → 1.2.5
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.css +1 -1
- package/dist/cc1-form.js +986 -1013
- package/dist/cc1-form.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElMessage as
|
|
1
|
+
import { ElMessage as me, ElLoading as pe, ElForm as P, ElFormItem as Q, ElInput as Y, ElSwitch as G, ElSelect as J, ElOption as K, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as ee, ElButton as T, ElTableColumn as te, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as _, ElPagination as ie, ElTable as ye } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
class
|
|
3
|
+
import { defineComponent as H, reactive as le, onMounted as ue, resolveComponent as X, openBlock as u, createElementBlock as y, renderSlot as C, createVNode as x, withCtx as p, createTextVNode as D, createCommentVNode as k, Fragment as $, renderList as M, createBlock as h, normalizeClass as B, normalizeStyle as ce, ref as N, unref as o, createElementVNode as E, mergeProps as v, toHandlers as z, resolveDynamicComponent as W, toDisplayString as U, getCurrentInstance as be, createSlots as oe, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
|
|
4
|
+
class S {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
7
7
|
*/
|
|
@@ -26,13 +26,13 @@ class U {
|
|
|
26
26
|
* @param data 数据
|
|
27
27
|
* @returns 是否显示
|
|
28
28
|
*/
|
|
29
|
-
static isFun = (
|
|
29
|
+
static isFun = (d, ...c) => Array.isArray(d) ? d.some((a) => typeof a == "function" ? a(...c) : a) : typeof d == "function" ? d(...c) : d;
|
|
30
30
|
/**
|
|
31
31
|
* 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
|
|
32
32
|
*/
|
|
33
33
|
static getRouterParams = () => {
|
|
34
|
-
const
|
|
35
|
-
return Object.keys(
|
|
34
|
+
const d = this.router.currentRoute.value.query || {}, c = this.router.currentRoute.value.params || {};
|
|
35
|
+
return Object.keys(d).length ? d : Object.keys(c).length ? c : {};
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* 模块赋值
|
|
@@ -42,11 +42,11 @@ class U {
|
|
|
42
42
|
* 加载模块
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
|
-
static loadModule = async (
|
|
46
|
-
if (!
|
|
47
|
-
throw new Error(`模块${
|
|
48
|
-
const
|
|
49
|
-
return
|
|
45
|
+
static loadModule = async (d) => {
|
|
46
|
+
if (!S.moduleObj[d])
|
|
47
|
+
throw new Error(`模块${d}未加载,请赋值如:TSys.moduleObj = { ${d}: ()=>import('${d}') }`);
|
|
48
|
+
const c = await S.moduleObj[d]();
|
|
49
|
+
return c.default ?? c;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
52
|
* 提示信息对象管理
|
|
@@ -62,19 +62,19 @@ class U {
|
|
|
62
62
|
* @param type 消息类型
|
|
63
63
|
* @param options 其他选项
|
|
64
64
|
*/
|
|
65
|
-
static showMessage(
|
|
66
|
-
const
|
|
67
|
-
if (!this.tipMessages[
|
|
68
|
-
this.tipMessages[
|
|
65
|
+
static showMessage(d, c, a = {}) {
|
|
66
|
+
const i = Date.now();
|
|
67
|
+
if (!this.tipMessages[d] || i - this.tipMessages[d] > this.tipMessagesGap) {
|
|
68
|
+
this.tipMessages[d] = i;
|
|
69
69
|
const l = Object.assign(
|
|
70
70
|
{
|
|
71
|
-
message:
|
|
72
|
-
type:
|
|
71
|
+
message: d,
|
|
72
|
+
type: c
|
|
73
73
|
},
|
|
74
|
-
|
|
74
|
+
a
|
|
75
75
|
);
|
|
76
|
-
|
|
77
|
-
delete this.tipMessages[
|
|
76
|
+
me(l), setTimeout(() => {
|
|
77
|
+
delete this.tipMessages[d];
|
|
78
78
|
}, this.tipMessagesGap);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -83,16 +83,16 @@ class U {
|
|
|
83
83
|
* @param content
|
|
84
84
|
* @param options
|
|
85
85
|
*/
|
|
86
|
-
static fail = (
|
|
87
|
-
this.showMessage(
|
|
86
|
+
static fail = (d, c = {}) => {
|
|
87
|
+
this.showMessage(d, "error", c);
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* 成功提示
|
|
91
91
|
* @param content
|
|
92
92
|
* @param options
|
|
93
93
|
*/
|
|
94
|
-
static success = (
|
|
95
|
-
this.showMessage(
|
|
94
|
+
static success = (d, c = {}) => {
|
|
95
|
+
this.showMessage(d, "success", c);
|
|
96
96
|
};
|
|
97
97
|
static loadingObj = null;
|
|
98
98
|
static loadingTimer = null;
|
|
@@ -101,11 +101,11 @@ class U {
|
|
|
101
101
|
* @param show
|
|
102
102
|
* @param text
|
|
103
103
|
*/
|
|
104
|
-
static loading = (
|
|
104
|
+
static loading = (d = !0, c = "Loading...") => {
|
|
105
105
|
Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
|
|
106
|
-
|
|
106
|
+
d ? this.loadingObj = pe.service({
|
|
107
107
|
lock: !0,
|
|
108
|
-
text:
|
|
108
|
+
text: c,
|
|
109
109
|
background: "rgba(0, 0, 0, 0.3)"
|
|
110
110
|
}) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
|
|
111
111
|
}, 50);
|
|
@@ -115,46 +115,46 @@ class U {
|
|
|
115
115
|
* @param url 地址
|
|
116
116
|
* @param isCenter 是否居中
|
|
117
117
|
*/
|
|
118
|
-
static openUrl = (
|
|
119
|
-
if (
|
|
120
|
-
let
|
|
118
|
+
static openUrl = (d, c = !0) => {
|
|
119
|
+
if (c) {
|
|
120
|
+
let a = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
|
|
121
121
|
window.open(
|
|
122
|
-
|
|
122
|
+
d,
|
|
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=" + i + ", left=" + a
|
|
125
125
|
);
|
|
126
126
|
} else
|
|
127
|
-
window.open(
|
|
127
|
+
window.open(d, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
|
|
128
128
|
};
|
|
129
129
|
/**
|
|
130
130
|
* 根据dom id截图并返回图片数据
|
|
131
131
|
* @param param
|
|
132
132
|
* @returns
|
|
133
133
|
*/
|
|
134
|
-
static getImgPic = (
|
|
135
|
-
let
|
|
136
|
-
const l = await
|
|
134
|
+
static getImgPic = (d) => new Promise(async (c, a) => {
|
|
135
|
+
let i = document.getElementById(d.id);
|
|
136
|
+
const l = await S.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
|
-
l(
|
|
138
|
+
l(i, {
|
|
139
139
|
logging: !1,
|
|
140
140
|
allowTaint: !0,
|
|
141
141
|
scale: window.devicePixelRatio,
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
144
|
-
windowWidth:
|
|
145
|
-
windowHeight:
|
|
142
|
+
width: d.windowWidth,
|
|
143
|
+
height: d.windowHeight,
|
|
144
|
+
windowWidth: d.windowWidth,
|
|
145
|
+
windowHeight: d.windowHeight,
|
|
146
146
|
useCORS: !0,
|
|
147
147
|
backgroundColor: "#ffffff00"
|
|
148
|
-
}).then(function(
|
|
149
|
-
let
|
|
150
|
-
|
|
148
|
+
}).then(function(t) {
|
|
149
|
+
let r = t.toDataURL("image/png");
|
|
150
|
+
c(r);
|
|
151
151
|
});
|
|
152
|
-
} catch (
|
|
153
|
-
t
|
|
152
|
+
} catch (t) {
|
|
153
|
+
a(t);
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class O {
|
|
158
158
|
/**
|
|
159
159
|
* 全局配置对象
|
|
160
160
|
*/
|
|
@@ -507,11 +507,11 @@ class E {
|
|
|
507
507
|
*
|
|
508
508
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
509
509
|
*/
|
|
510
|
-
static setConfig = (
|
|
511
|
-
|
|
510
|
+
static setConfig = (d) => {
|
|
511
|
+
O.config = ObjectUtil.deepMerge(O.config, d);
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
|
-
class
|
|
514
|
+
class A {
|
|
515
515
|
/**
|
|
516
516
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
517
517
|
*
|
|
@@ -529,10 +529,10 @@ class L {
|
|
|
529
529
|
* @param field - 字段的 key 值
|
|
530
530
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
531
531
|
*/
|
|
532
|
-
static findOptions = (
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
535
|
-
return
|
|
532
|
+
static findOptions = (d, c) => {
|
|
533
|
+
const a = d.column.find((l) => l.key === c), i = (l) => l.replace(/-([a-z])/g, (t, r) => r.toUpperCase());
|
|
534
|
+
if (a)
|
|
535
|
+
return a.options[i(a.type)];
|
|
536
536
|
};
|
|
537
537
|
/**
|
|
538
538
|
* 更新组件数据
|
|
@@ -550,9 +550,9 @@ class L {
|
|
|
550
550
|
}))
|
|
551
551
|
)
|
|
552
552
|
*/
|
|
553
|
-
static setOptionsData = (
|
|
554
|
-
const
|
|
555
|
-
|
|
553
|
+
static setOptionsData = (d, c, a) => {
|
|
554
|
+
const i = A.findOptions(d, c);
|
|
555
|
+
i && (i.data = a);
|
|
556
556
|
};
|
|
557
557
|
static form = {
|
|
558
558
|
openBefore: {
|
|
@@ -563,9 +563,9 @@ class L {
|
|
|
563
563
|
* @param treeData 树形数据
|
|
564
564
|
* @param option 组件配置
|
|
565
565
|
*/
|
|
566
|
-
parentId: (
|
|
567
|
-
const l =
|
|
568
|
-
|
|
566
|
+
parentId: (d, c, a, i) => {
|
|
567
|
+
const l = O.config.table.rowKey;
|
|
568
|
+
d ? c.type === S.EDialog.Add ? (c.form.parentId = d[l], c.form.sort = d.children.length + 1) : c.form.parentId = d.parentId.substring(d.parentId.lastIndexOf(",") + 1) : (c.form.parentId = "0", c.form.sort = a.length + 1), A.setOptionsData(i, "parentId", [{ [l]: "0", title: "根", children: a }]);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
};
|
|
@@ -605,24 +605,24 @@ const Ve = {
|
|
|
605
605
|
};
|
|
606
606
|
class b {
|
|
607
607
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
608
|
-
static t(
|
|
609
|
-
if (typeof
|
|
610
|
-
return
|
|
611
|
-
|
|
612
|
-
let
|
|
613
|
-
return
|
|
608
|
+
static t(d, ...c) {
|
|
609
|
+
if (typeof d == "function")
|
|
610
|
+
return d(...c);
|
|
611
|
+
d = String(d);
|
|
612
|
+
let a = 0;
|
|
613
|
+
return d.replace(/{([^}]+)}/g, (i, l) => a < c.length ? String(c[a++]) : `{${l}}`);
|
|
614
614
|
}
|
|
615
|
-
static setI18n = (
|
|
616
|
-
b.curd = ObjectUtil.deepMerge(b.curd,
|
|
615
|
+
static setI18n = (d) => {
|
|
616
|
+
b.curd = ObjectUtil.deepMerge(b.curd, d);
|
|
617
617
|
};
|
|
618
618
|
/** 解析curd国际化值 */
|
|
619
|
-
static tCurd(
|
|
620
|
-
return this.t(this.curd[
|
|
619
|
+
static tCurd(d, ...c) {
|
|
620
|
+
return this.t(this.curd[d], ...c);
|
|
621
621
|
}
|
|
622
622
|
/** curd表单 */
|
|
623
623
|
static curd = Ve;
|
|
624
624
|
}
|
|
625
|
-
class
|
|
625
|
+
class R {
|
|
626
626
|
/**
|
|
627
627
|
* ID 生成函数,默认使用 `StrUtil.uuid()`,可覆盖为自定义实现
|
|
628
628
|
*/
|
|
@@ -632,14 +632,14 @@ class P {
|
|
|
632
632
|
* @param field 字段名
|
|
633
633
|
* @param row 行数据
|
|
634
634
|
*/
|
|
635
|
-
static setId = (
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
let
|
|
641
|
-
|
|
642
|
-
}), l[
|
|
635
|
+
static setId = (d, c, a) => {
|
|
636
|
+
c[d] || (c[d] = []);
|
|
637
|
+
const i = O.config.table.rowKey;
|
|
638
|
+
c[d].forEach((l) => {
|
|
639
|
+
a.forEach((t) => {
|
|
640
|
+
let r = t.default ?? "";
|
|
641
|
+
t.type === "number" && (r = t.default ?? 0), t.type === "boolean" && (r = t.default ?? !1), t.type === "time" && (r = t.default ?? /* @__PURE__ */ new Date()), l[t.value] === void 0 && (l[t.value] = r);
|
|
642
|
+
}), l[i] || (l[i] = R.getIdFun());
|
|
643
643
|
});
|
|
644
644
|
};
|
|
645
645
|
/**
|
|
@@ -649,19 +649,19 @@ class P {
|
|
|
649
649
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
650
650
|
* @param callback 回调函数
|
|
651
651
|
*/
|
|
652
|
-
static add = (
|
|
653
|
-
const l = JSONUtil.cp(
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
|
|
652
|
+
static add = (d, c, a, i) => {
|
|
653
|
+
const l = JSONUtil.cp(a);
|
|
654
|
+
R.setId(d, c, a);
|
|
655
|
+
const t = O.config.table.rowKey;
|
|
656
|
+
c[d].push(
|
|
657
657
|
l.reduce(
|
|
658
|
-
(
|
|
659
|
-
let
|
|
660
|
-
return
|
|
658
|
+
(r, m) => {
|
|
659
|
+
let f = m.default ?? "";
|
|
660
|
+
return m.type === "number" && (f = m.default ?? 0), m.type === "boolean" && (f = m.default ?? !1), m.type === "time" && (f = m.default ?? /* @__PURE__ */ new Date()), r[m.value] = f, r;
|
|
661
661
|
},
|
|
662
|
-
{ [
|
|
662
|
+
{ [t]: R.getIdFun() }
|
|
663
663
|
)
|
|
664
|
-
),
|
|
664
|
+
), i?.(c);
|
|
665
665
|
};
|
|
666
666
|
/**
|
|
667
667
|
* 删除数组元素
|
|
@@ -670,9 +670,9 @@ class P {
|
|
|
670
670
|
* @param item 元素-如:{_id:''}
|
|
671
671
|
* @param callback 回调函数
|
|
672
672
|
*/
|
|
673
|
-
static remove = (
|
|
674
|
-
const l =
|
|
675
|
-
|
|
673
|
+
static remove = (d, c, a, i) => {
|
|
674
|
+
const l = O.config.table.rowKey;
|
|
675
|
+
c[d] = c[d].filter((t) => t[l] !== a[l]), i?.(c);
|
|
676
676
|
};
|
|
677
677
|
/**
|
|
678
678
|
* 获取没有id的数据
|
|
@@ -680,21 +680,21 @@ class P {
|
|
|
680
680
|
* @param childernField 子级字段-如:list、children
|
|
681
681
|
* @returns 没有id的数据
|
|
682
682
|
*/
|
|
683
|
-
static getNoIdData = (
|
|
684
|
-
const
|
|
685
|
-
return
|
|
686
|
-
l[
|
|
687
|
-
}),
|
|
683
|
+
static getNoIdData = (d, c) => {
|
|
684
|
+
const a = JSONUtil.cp(d), i = O.config.table.rowKey;
|
|
685
|
+
return a.forEach((l) => {
|
|
686
|
+
l[i] && delete l[i], c && l[c] && R.getNoIdData(l[c], c);
|
|
687
|
+
}), a;
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
const
|
|
690
|
+
const xe = {
|
|
691
691
|
key: 0,
|
|
692
692
|
class: "column curd-form-com-list",
|
|
693
693
|
style: { width: "100%", gap: "10px" }
|
|
694
|
-
},
|
|
694
|
+
}, ze = { key: 0 }, De = {
|
|
695
695
|
class: "row items-center",
|
|
696
696
|
style: { gap: "10px", width: "100%" }
|
|
697
|
-
},
|
|
697
|
+
}, $e = { key: 1 }, ne = /* @__PURE__ */ H({
|
|
698
698
|
__name: "list",
|
|
699
699
|
props: {
|
|
700
700
|
row: {
|
|
@@ -732,88 +732,88 @@ const ze = {
|
|
|
732
732
|
}
|
|
733
733
|
},
|
|
734
734
|
emits: ["change"],
|
|
735
|
-
setup(
|
|
736
|
-
const
|
|
735
|
+
setup(e, { emit: d }) {
|
|
736
|
+
const c = e, a = le({
|
|
737
737
|
show: !1,
|
|
738
|
-
add: (l,
|
|
739
|
-
|
|
740
|
-
|
|
738
|
+
add: (l, t, r) => {
|
|
739
|
+
R.add(l, t, r, () => {
|
|
740
|
+
i("change");
|
|
741
741
|
});
|
|
742
742
|
},
|
|
743
|
-
remove: (l,
|
|
744
|
-
|
|
745
|
-
|
|
743
|
+
remove: (l, t, r) => {
|
|
744
|
+
R.remove(l, t, r, () => {
|
|
745
|
+
i("change");
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
748
|
});
|
|
749
749
|
ue(() => {
|
|
750
|
-
|
|
750
|
+
R.setId(c.field, c.row, c.itemFields), a.show = !0;
|
|
751
751
|
});
|
|
752
|
-
const
|
|
753
|
-
return (l,
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
C(l.$slots, "list-start", { row:
|
|
757
|
-
|
|
758
|
-
|
|
752
|
+
const i = d;
|
|
753
|
+
return (l, t) => {
|
|
754
|
+
const r = X("el-button"), m = X("el-input");
|
|
755
|
+
return a.show ? (u(), y("div", xe, [
|
|
756
|
+
C(l.$slots, "list-start", { row: e.row }),
|
|
757
|
+
e.addBottom ? k("", !0) : (u(), y("div", ze, [
|
|
758
|
+
x(r, {
|
|
759
759
|
link: "",
|
|
760
760
|
type: "primary",
|
|
761
|
-
onClick:
|
|
761
|
+
onClick: t[0] || (t[0] = (f) => a.add(e.field, e.row, e.itemFields))
|
|
762
762
|
}, {
|
|
763
|
-
default:
|
|
764
|
-
|
|
765
|
-
])),
|
|
763
|
+
default: p(() => [...t[3] || (t[3] = [
|
|
764
|
+
D("添加", -1)
|
|
765
|
+
])]),
|
|
766
766
|
_: 1
|
|
767
767
|
})
|
|
768
768
|
])),
|
|
769
|
-
(u(!0), y(
|
|
769
|
+
(u(!0), y($, null, M(e.row[e.field], (f) => (u(), y("div", De, [
|
|
770
770
|
C(l.$slots, "item-start", {
|
|
771
|
-
item:
|
|
772
|
-
row:
|
|
771
|
+
item: f,
|
|
772
|
+
row: e.row
|
|
773
773
|
}),
|
|
774
|
-
(u(!0), y(
|
|
775
|
-
modelValue:
|
|
776
|
-
"onUpdate:modelValue": (n) =>
|
|
777
|
-
style:
|
|
778
|
-
class:
|
|
779
|
-
placeholder: g[
|
|
780
|
-
onChange:
|
|
774
|
+
(u(!0), y($, null, M(e.itemFields, (g) => (u(), h(m, {
|
|
775
|
+
modelValue: f[g.value],
|
|
776
|
+
"onUpdate:modelValue": (n) => f[g.value] = n,
|
|
777
|
+
style: ce({ width: e.inputWidth }),
|
|
778
|
+
class: B(e.inputClass),
|
|
779
|
+
placeholder: g[e.label] || g[e.value],
|
|
780
|
+
onChange: t[1] || (t[1] = (n) => i("change"))
|
|
781
781
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
782
782
|
C(l.$slots, "item-end", {
|
|
783
|
-
item:
|
|
784
|
-
row:
|
|
783
|
+
item: f,
|
|
784
|
+
row: e.row
|
|
785
785
|
}),
|
|
786
|
-
|
|
786
|
+
x(r, {
|
|
787
787
|
link: "",
|
|
788
788
|
type: "danger",
|
|
789
|
-
onClick: (g) =>
|
|
789
|
+
onClick: (g) => a.remove(e.field, e.row, f)
|
|
790
790
|
}, {
|
|
791
|
-
default:
|
|
792
|
-
|
|
793
|
-
])),
|
|
794
|
-
_:
|
|
795
|
-
},
|
|
791
|
+
default: p(() => [...t[4] || (t[4] = [
|
|
792
|
+
D("删除", -1)
|
|
793
|
+
])]),
|
|
794
|
+
_: 1
|
|
795
|
+
}, 8, ["onClick"])
|
|
796
796
|
]))), 256)),
|
|
797
|
-
|
|
798
|
-
|
|
797
|
+
e.addBottom ? (u(), y("div", $e, [
|
|
798
|
+
x(r, {
|
|
799
799
|
link: "",
|
|
800
800
|
type: "primary",
|
|
801
|
-
onClick:
|
|
801
|
+
onClick: t[2] || (t[2] = (f) => a.add(e.field, e.row, e.itemFields))
|
|
802
802
|
}, {
|
|
803
|
-
default:
|
|
804
|
-
|
|
805
|
-
])),
|
|
803
|
+
default: p(() => [...t[5] || (t[5] = [
|
|
804
|
+
D("添加", -1)
|
|
805
|
+
])]),
|
|
806
806
|
_: 1
|
|
807
807
|
})
|
|
808
808
|
])) : k("", !0),
|
|
809
|
-
C(l.$slots, "list-end", { row:
|
|
809
|
+
C(l.$slots, "list-end", { row: e.row })
|
|
810
810
|
])) : k("", !0);
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
|
-
}),
|
|
813
|
+
}), Se = {
|
|
814
814
|
class: "row form-item-content",
|
|
815
815
|
style: { width: "100%" }
|
|
816
|
-
},
|
|
816
|
+
}, Ue = { class: "col" }, Oe = { class: "col" }, Ee = ["innerHTML"], Fe = /* @__PURE__ */ H({
|
|
817
817
|
__name: "column",
|
|
818
818
|
props: {
|
|
819
819
|
/**
|
|
@@ -829,220 +829,209 @@ const ze = {
|
|
|
829
829
|
default: ""
|
|
830
830
|
}
|
|
831
831
|
},
|
|
832
|
-
setup(
|
|
833
|
-
const
|
|
832
|
+
setup(e, { expose: d }) {
|
|
833
|
+
const c = S.isFun, a = S.EDialog, i = N(), l = e, t = le({
|
|
834
834
|
rules: {},
|
|
835
835
|
show: !0,
|
|
836
836
|
form: {},
|
|
837
837
|
formDefault: {},
|
|
838
|
-
type: l.type ||
|
|
838
|
+
type: l.type || a.Add,
|
|
839
839
|
formColumn: [],
|
|
840
|
-
getDisabled: (
|
|
841
|
-
getBind: (
|
|
842
|
-
getOn: (
|
|
843
|
-
getColumnSpan: (
|
|
844
|
-
if (
|
|
845
|
-
const
|
|
846
|
-
return (
|
|
840
|
+
getDisabled: (r) => t.type === a.View ? r.disabled?.view === void 0 ? !0 : r.disabled?.view : r.disabled?.[t.type === a.Add ? "create" : "update"],
|
|
841
|
+
getBind: (r) => r.options?.[t.type === a.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
|
|
842
|
+
getOn: (r) => r.options?.[t.type === a.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
843
|
+
getColumnSpan: (r, m) => {
|
|
844
|
+
if (r.item.form?.spanCol) {
|
|
845
|
+
const f = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || f / 2, s = m.filter((V) => !S.isFun(V.item.show?.form, t.form, t.type)).reduce((V, w) => V + (w.item.form?.span || g), 0);
|
|
846
|
+
return (r.item.form?.span || g) + s;
|
|
847
847
|
}
|
|
848
|
-
return
|
|
848
|
+
return r.item.form?.span;
|
|
849
849
|
},
|
|
850
850
|
initColumnForm: () => {
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
const
|
|
851
|
+
const r = l.option;
|
|
852
|
+
t.formColumn = [], t.rules = {}, t.formDefault = {};
|
|
853
|
+
const m = [], f = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || f / 2;
|
|
854
854
|
let n = [];
|
|
855
|
-
const
|
|
855
|
+
const s = (w) => {
|
|
856
856
|
if (w.children) {
|
|
857
|
-
w.children.forEach((
|
|
858
|
-
|
|
857
|
+
w.children.forEach((F) => {
|
|
858
|
+
s(F);
|
|
859
859
|
});
|
|
860
860
|
return;
|
|
861
861
|
}
|
|
862
|
-
if (
|
|
862
|
+
if (t.formDefault[w.key] = w.value, w.isForm && (typeof w.show?.form != "boolean" || w.show?.form)) {
|
|
863
863
|
w.form = w.form || { span: g }, w.form.span = w.form.span ?? g;
|
|
864
|
-
const
|
|
865
|
-
if (n.push({ item: w, span:
|
|
866
|
-
const
|
|
864
|
+
const F = w.form.span, L = n.reduce((q, Z) => q + Z.span, F), j = n.length;
|
|
865
|
+
if (n.push({ item: w, span: F }), (j === 1 && n[0].span === 0 || L >= f || F === 0 && j > 1) && (m.push(n), n = []), w.rules) {
|
|
866
|
+
const q = {
|
|
867
867
|
input: b.tCurd("placeholderInput"),
|
|
868
868
|
select: b.tCurd("placeholderSelect")
|
|
869
|
-
},
|
|
870
|
-
|
|
869
|
+
}, Z = (q[w.type] || q.input) + w.label;
|
|
870
|
+
t.rules[w.key] = typeof w.rules == "boolean" ? [
|
|
871
871
|
{
|
|
872
872
|
required: !0,
|
|
873
|
-
message:
|
|
873
|
+
message: Z,
|
|
874
874
|
trigger: "blur"
|
|
875
875
|
}
|
|
876
876
|
] : w.rules;
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
|
-
}, V = (w,
|
|
880
|
-
w.isForm =
|
|
879
|
+
}, V = (w, F) => {
|
|
880
|
+
w.isForm = F, Array.isArray(w.children) && w.children.forEach((L) => V(L, F));
|
|
881
881
|
};
|
|
882
|
-
|
|
883
|
-
V(w, !0),
|
|
884
|
-
}), n.length > 0 &&
|
|
882
|
+
r.column.forEach((w) => {
|
|
883
|
+
V(w, !0), s(w);
|
|
884
|
+
}), n.length > 0 && m.push(n), t.formColumn = m, t.form = JSONUtil.cp(t.formDefault);
|
|
885
885
|
}
|
|
886
886
|
});
|
|
887
|
-
return
|
|
888
|
-
ref:
|
|
889
|
-
conf:
|
|
890
|
-
}), (
|
|
887
|
+
return t.initColumnForm(), d({
|
|
888
|
+
ref: i,
|
|
889
|
+
conf: t
|
|
890
|
+
}), (r, m) => (u(), h(o(P), {
|
|
891
891
|
ref_key: "ruleFormRef",
|
|
892
|
-
ref:
|
|
893
|
-
model:
|
|
894
|
-
rules:
|
|
892
|
+
ref: i,
|
|
893
|
+
model: t.form,
|
|
894
|
+
rules: t.rules
|
|
895
895
|
}, {
|
|
896
|
-
default:
|
|
897
|
-
|
|
898
|
-
o(
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
896
|
+
default: p(() => [
|
|
897
|
+
t.show ? (u(!0), y($, { key: 0 }, M(t.formColumn, (f, g) => (u(), y($, { key: g }, [
|
|
898
|
+
o(c)(
|
|
899
|
+
f.map((n) => n.item?.show?.form),
|
|
900
|
+
t.form,
|
|
901
|
+
t.type
|
|
902
902
|
) ? (u(), y("div", {
|
|
903
903
|
key: 0,
|
|
904
|
-
class:
|
|
905
|
-
stripe:
|
|
904
|
+
class: B(["row curd-row", {
|
|
905
|
+
stripe: e.option.form?.stripe === void 0 ? !0 : e.option.form?.stripe
|
|
906
906
|
}])
|
|
907
907
|
}, [
|
|
908
|
-
C(
|
|
909
|
-
row:
|
|
908
|
+
C(r.$slots, "form-start", {
|
|
909
|
+
row: t.form
|
|
910
910
|
}),
|
|
911
|
-
(u(!0), y(
|
|
911
|
+
(u(!0), y($, null, M(f, (n) => (u(), y($, {
|
|
912
912
|
key: n.item.key
|
|
913
913
|
}, [
|
|
914
|
-
o(
|
|
914
|
+
o(c)(n.item.show?.form, t.form, t.type) ? (u(), y("div", {
|
|
915
915
|
key: 0,
|
|
916
|
-
class:
|
|
916
|
+
class: B([n.item.form.span > 0 ? `col-${t.getColumnSpan(n, f)}` : "col", `form-item-col-${n.item.key}`])
|
|
917
917
|
}, [
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
"hide-label": typeof n.item.text?.form?.label == "boolean" ? !n.item.text?.form?.label : !1
|
|
921
|
-
}),
|
|
922
|
-
label: typeof n.item.text?.form?.label == "string" ? n.item.text?.form?.label : n.item.label,
|
|
918
|
+
x(o(Q), {
|
|
919
|
+
label: n.item.text?.form?.label ?? n.item.label,
|
|
923
920
|
prop: n.item.key,
|
|
924
|
-
"label-width": n.item.form?.labelWidth ||
|
|
921
|
+
"label-width": n.item.text?.form?.label == "" ? 0 : n.item.form?.labelWidth || e.option.form?.labelWidth || "100px"
|
|
925
922
|
}, {
|
|
926
|
-
default:
|
|
927
|
-
|
|
928
|
-
C(
|
|
929
|
-
row:
|
|
923
|
+
default: p(() => [
|
|
924
|
+
E("div", Se, [
|
|
925
|
+
C(r.$slots, "form-" + n.item.key + "-start", {
|
|
926
|
+
row: t.form,
|
|
930
927
|
item: n.item
|
|
931
928
|
}),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
C(
|
|
935
|
-
row:
|
|
929
|
+
E("div", Ue, [
|
|
930
|
+
E("div", Oe, [
|
|
931
|
+
C(r.$slots, "form-" + n.item.key, {
|
|
932
|
+
row: t.form,
|
|
936
933
|
item: n.item
|
|
937
934
|
}, () => [
|
|
938
|
-
n.item.type === "input" ? (u(), h(o(
|
|
935
|
+
n.item.type === "input" ? (u(), h(o(Y), v({
|
|
939
936
|
key: 0,
|
|
940
|
-
modelValue:
|
|
941
|
-
"onUpdate:modelValue": (
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "switch" ? (u(), h(o(X), v({
|
|
937
|
+
modelValue: t.form[n.item.key],
|
|
938
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
939
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
940
|
+
disabled: t.getDisabled(n.item)
|
|
941
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "switch" ? (u(), h(o(G), v({
|
|
946
942
|
key: 1,
|
|
947
|
-
modelValue:
|
|
948
|
-
"onUpdate:modelValue": (
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "select" ? (u(), h(o(W), v({
|
|
943
|
+
modelValue: t.form[n.item.key],
|
|
944
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
945
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
946
|
+
disabled: t.getDisabled(n.item)
|
|
947
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "select" ? (u(), h(o(J), v({
|
|
953
948
|
key: 2,
|
|
954
|
-
modelValue:
|
|
955
|
-
"onUpdate:modelValue": (
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
disabled: e.getDisabled(n.item),
|
|
949
|
+
modelValue: t.form[n.item.key],
|
|
950
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
951
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
952
|
+
disabled: t.getDisabled(n.item),
|
|
959
953
|
style: { width: "100%" }
|
|
960
954
|
}), {
|
|
961
|
-
default:
|
|
962
|
-
(u(!0), y(
|
|
963
|
-
key:
|
|
964
|
-
label:
|
|
965
|
-
value:
|
|
955
|
+
default: p(() => [
|
|
956
|
+
(u(!0), y($, null, M(n.item.options?.select?.data, (s) => (u(), h(o(K), {
|
|
957
|
+
key: s.value,
|
|
958
|
+
label: s.label,
|
|
959
|
+
value: s.value
|
|
966
960
|
}, null, 8, ["label", "value"]))), 128))
|
|
967
961
|
]),
|
|
968
962
|
_: 2
|
|
969
963
|
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "radio" ? (u(), h(o(re), v({
|
|
970
964
|
key: 3,
|
|
971
|
-
modelValue:
|
|
972
|
-
"onUpdate:modelValue": (
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
disabled: e.getDisabled(n.item),
|
|
965
|
+
modelValue: t.form[n.item.key],
|
|
966
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
967
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
968
|
+
disabled: t.getDisabled(n.item),
|
|
976
969
|
style: { width: "100%" }
|
|
977
970
|
}), {
|
|
978
|
-
default:
|
|
979
|
-
(u(!0), y(
|
|
980
|
-
key:
|
|
981
|
-
label:
|
|
982
|
-
value:
|
|
971
|
+
default: p(() => [
|
|
972
|
+
(u(!0), y($, null, M(n.item.options?.radio?.data, (s) => (u(), h(o(se), {
|
|
973
|
+
key: s.value,
|
|
974
|
+
label: s.label,
|
|
975
|
+
value: s.value
|
|
983
976
|
}, null, 8, ["label", "value"]))), 128))
|
|
984
977
|
]),
|
|
985
978
|
_: 2
|
|
986
979
|
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "list" ? (u(), h(ne, v({
|
|
987
980
|
key: 4,
|
|
988
|
-
row:
|
|
989
|
-
field: n.item.key
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
disabled: e.getDisabled(n.item),
|
|
981
|
+
row: t.form,
|
|
982
|
+
field: n.item.key
|
|
983
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
984
|
+
disabled: t.getDisabled(n.item),
|
|
993
985
|
style: { width: "100%" }
|
|
994
986
|
}), null, 16, ["row", "field", "disabled"])) : n.item.type === "treeSelect" ? (u(), h(o(de), v({
|
|
995
987
|
key: 5,
|
|
996
|
-
modelValue:
|
|
997
|
-
"onUpdate:modelValue": (
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
disabled: e.getDisabled(n.item),
|
|
988
|
+
modelValue: t.form[n.item.key],
|
|
989
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
990
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
991
|
+
disabled: t.getDisabled(n.item),
|
|
1001
992
|
style: { width: "100%" }
|
|
1002
993
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "datetime" ? (u(), h(o(ae), v({
|
|
1003
994
|
key: 6,
|
|
1004
|
-
modelValue:
|
|
1005
|
-
"onUpdate:modelValue": (
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type && (o(L).customComponent[n.item.type] || o(L).customComponent[n.item.type]?.form) ? (u(), h(q(o(L).customComponent[n.item.type]?.form || o(L).customComponent[n.item.type]), v({
|
|
995
|
+
modelValue: t.form[n.item.key],
|
|
996
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
997
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
998
|
+
disabled: t.getDisabled(n.item)
|
|
999
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type && (o(A).customComponent[n.item.type] || o(A).customComponent[n.item.type]?.form) ? (u(), h(W(o(A).customComponent[n.item.type]?.form || o(A).customComponent[n.item.type]), v({
|
|
1010
1000
|
key: 7,
|
|
1011
|
-
modelValue:
|
|
1012
|
-
"onUpdate:modelValue": (
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
disabled: e.getDisabled(n.item)
|
|
1001
|
+
modelValue: t.form[n.item.key],
|
|
1002
|
+
"onUpdate:modelValue": (s) => t.form[n.item.key] = s
|
|
1003
|
+
}, { ref_for: !0 }, t.getBind(n.item), z(t.getOn(n.item)), {
|
|
1004
|
+
disabled: t.getDisabled(n.item)
|
|
1016
1005
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
|
|
1017
1006
|
]),
|
|
1018
|
-
C(
|
|
1019
|
-
row:
|
|
1007
|
+
C(r.$slots, "form-" + n.item.key + "-right", {
|
|
1008
|
+
row: t.form,
|
|
1020
1009
|
item: n.item
|
|
1021
1010
|
})
|
|
1022
1011
|
]),
|
|
1023
|
-
C(
|
|
1024
|
-
row:
|
|
1012
|
+
C(r.$slots, "form-" + n.item.key + "-tip", {
|
|
1013
|
+
row: t.form,
|
|
1025
1014
|
item: n.item
|
|
1026
1015
|
}, () => [
|
|
1027
1016
|
n.item.form?.tipText ? (u(), y("div", {
|
|
1028
1017
|
key: 0,
|
|
1029
1018
|
class: "form-tip-text",
|
|
1030
|
-
innerHTML: typeof n.item.form?.tipText == "function" ? n.item.form?.tipText(
|
|
1031
|
-
}, null, 8,
|
|
1019
|
+
innerHTML: typeof n.item.form?.tipText == "function" ? n.item.form?.tipText(t.form, t.type) : n.item.form?.tipText
|
|
1020
|
+
}, null, 8, Ee)) : k("", !0)
|
|
1032
1021
|
])
|
|
1033
1022
|
]),
|
|
1034
|
-
C(
|
|
1035
|
-
row:
|
|
1023
|
+
C(r.$slots, "form-" + n.item.key + "-end", {
|
|
1024
|
+
row: t.form,
|
|
1036
1025
|
item: n.item
|
|
1037
1026
|
})
|
|
1038
1027
|
])
|
|
1039
1028
|
]),
|
|
1040
1029
|
_: 2
|
|
1041
|
-
}, 1032, ["
|
|
1030
|
+
}, 1032, ["label", "prop", "label-width"])
|
|
1042
1031
|
], 2)) : k("", !0)
|
|
1043
1032
|
], 64))), 128)),
|
|
1044
|
-
C(
|
|
1045
|
-
row:
|
|
1033
|
+
C(r.$slots, "form-end", {
|
|
1034
|
+
row: t.form
|
|
1046
1035
|
})
|
|
1047
1036
|
], 2)) : k("", !0)
|
|
1048
1037
|
], 64))), 128)) : k("", !0)
|
|
@@ -1051,7 +1040,7 @@ const ze = {
|
|
|
1051
1040
|
}, 8, ["model", "rules"]));
|
|
1052
1041
|
}
|
|
1053
1042
|
});
|
|
1054
|
-
class
|
|
1043
|
+
class Te {
|
|
1055
1044
|
/**
|
|
1056
1045
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
1057
1046
|
*
|
|
@@ -1059,20 +1048,20 @@ class Me {
|
|
|
1059
1048
|
* @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
|
|
1060
1049
|
* @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
|
|
1061
1050
|
*/
|
|
1062
|
-
static exportToExcel = async (
|
|
1063
|
-
if (!
|
|
1064
|
-
const
|
|
1065
|
-
const
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1068
|
-
}),
|
|
1069
|
-
}),
|
|
1070
|
-
|
|
1051
|
+
static exportToExcel = async (d, c, a) => {
|
|
1052
|
+
if (!d || d.length === 0) return;
|
|
1053
|
+
const i = await S.loadModule("xlsx"), l = d.map((m) => {
|
|
1054
|
+
const f = {};
|
|
1055
|
+
return c.forEach((g) => {
|
|
1056
|
+
f[g.label] = m[g.key];
|
|
1057
|
+
}), f;
|
|
1058
|
+
}), t = i.utils.json_to_sheet(l), r = i.utils.book_new();
|
|
1059
|
+
i.utils.book_append_sheet(r, t, "Sheet1"), a ? typeof a == "function" && (a = a()) : a = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(r, `${a}.xlsx`);
|
|
1071
1060
|
};
|
|
1072
1061
|
}
|
|
1073
|
-
const
|
|
1074
|
-
const
|
|
1075
|
-
option:
|
|
1062
|
+
const I = S.EDialog, Me = (e) => {
|
|
1063
|
+
const d = N(), c = N(), a = le({
|
|
1064
|
+
option: e.option,
|
|
1076
1065
|
/** 查询区域相关配置对象 */
|
|
1077
1066
|
search: {
|
|
1078
1067
|
/** 查询表单列集合 */
|
|
@@ -1085,26 +1074,26 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1085
1074
|
/** 搜索表单默认值 */
|
|
1086
1075
|
formDefault: {},
|
|
1087
1076
|
/** 获取占位符 */
|
|
1088
|
-
getPlaceholder: (
|
|
1077
|
+
getPlaceholder: (i, l = b.tCurd("placeholderInput")) => i.text?.search?.placeholder === void 0 ? `${l}${i.label}` : i.text?.search?.placeholder,
|
|
1089
1078
|
/** 组装实际要搜索的数据对象 */
|
|
1090
1079
|
getFormData: () => {
|
|
1091
|
-
let
|
|
1092
|
-
|
|
1093
|
-
(typeof
|
|
1080
|
+
let i = {};
|
|
1081
|
+
e.option.column.forEach((t) => {
|
|
1082
|
+
(typeof t.show?.search == "function" ? t.show?.search(a.search.form) : t.show?.search) && (i[t.key] = a.search.form[t.key]);
|
|
1094
1083
|
});
|
|
1095
|
-
const l =
|
|
1096
|
-
return l && (
|
|
1084
|
+
const l = e.option.search?.before?.(i);
|
|
1085
|
+
return l && (i = l), i;
|
|
1097
1086
|
},
|
|
1098
1087
|
/** 重置搜索表单 */
|
|
1099
1088
|
reset: () => {
|
|
1100
|
-
const
|
|
1101
|
-
Object.keys(
|
|
1102
|
-
|
|
1103
|
-
}),
|
|
1089
|
+
const i = a.search.formDefault;
|
|
1090
|
+
Object.keys(i).forEach((l) => {
|
|
1091
|
+
e.option.search?.resetMode === "none" ? i[l] = void 0 : i[l] = a.search.formDefault[l];
|
|
1092
|
+
}), a.search.form = JSONUtil.cp(i), a.page.num = 1, e.option.init !== !1 && a.table.getList();
|
|
1104
1093
|
},
|
|
1105
1094
|
/** 提交搜索表单 */
|
|
1106
1095
|
submit: () => {
|
|
1107
|
-
|
|
1096
|
+
a.page.num = 1, a.table.getList();
|
|
1108
1097
|
}
|
|
1109
1098
|
},
|
|
1110
1099
|
/** 分页区域相关配置对象 */
|
|
@@ -1114,20 +1103,20 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1114
1103
|
/** 总条数 */
|
|
1115
1104
|
total: 0,
|
|
1116
1105
|
/** 分页控件的布局方式 */
|
|
1117
|
-
layout:
|
|
1106
|
+
layout: e.option.page?.layout || O.config.pagination.layout,
|
|
1118
1107
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1119
|
-
showTools:
|
|
1108
|
+
showTools: e.option.page?.showTools || O.config.pagination.showTools,
|
|
1120
1109
|
/** 当前每页条数 */
|
|
1121
|
-
size:
|
|
1110
|
+
size: e.option.page?.size || O.config.pagination.size,
|
|
1122
1111
|
/** 支持切换的每页条数选项 */
|
|
1123
|
-
sizeList:
|
|
1112
|
+
sizeList: e.option.page?.sizeList || O.config.pagination.pageSizes,
|
|
1124
1113
|
/** 分页器计数 */
|
|
1125
|
-
pagerCount:
|
|
1114
|
+
pagerCount: e.option.page?.pagerCount || O.config.pagination.pagerCount,
|
|
1126
1115
|
/** 获取分页查询参数 */
|
|
1127
|
-
getQuery: (
|
|
1128
|
-
[
|
|
1129
|
-
[
|
|
1130
|
-
...
|
|
1116
|
+
getQuery: (i = {}) => ({
|
|
1117
|
+
[O.config.field.page.size]: i.size || a.page.size,
|
|
1118
|
+
[O.config.field.page.num]: i.num || a.page.num,
|
|
1119
|
+
...a.search.getFormData()
|
|
1131
1120
|
})
|
|
1132
1121
|
},
|
|
1133
1122
|
/** 表格区域相关配置对象 */
|
|
@@ -1135,7 +1124,7 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1135
1124
|
/** 操作列相关配置 */
|
|
1136
1125
|
op: {
|
|
1137
1126
|
/** 动态计算操作列宽度 */
|
|
1138
|
-
width: (...
|
|
1127
|
+
width: (...i) => i.filter((t) => t).length * 30 + 60
|
|
1139
1128
|
},
|
|
1140
1129
|
/** 表格加载中状态 */
|
|
1141
1130
|
loading: !1,
|
|
@@ -1148,22 +1137,22 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1148
1137
|
/** 已经展开的行key集合 */
|
|
1149
1138
|
rowKeys: [],
|
|
1150
1139
|
/** 行展开触发变更函数 */
|
|
1151
|
-
change: (
|
|
1140
|
+
change: (i, l) => {
|
|
1152
1141
|
},
|
|
1153
1142
|
/** 全部展开/收起 */
|
|
1154
1143
|
all: () => {
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1144
|
+
if (a.table.expand.isExpand)
|
|
1145
|
+
a.table.expand.rowKeys = [];
|
|
1157
1146
|
else {
|
|
1158
|
-
const
|
|
1159
|
-
let
|
|
1160
|
-
return l.forEach((
|
|
1161
|
-
|
|
1162
|
-
}),
|
|
1147
|
+
const i = (l) => {
|
|
1148
|
+
let t = [];
|
|
1149
|
+
return l.forEach((r) => {
|
|
1150
|
+
t.push(r[e.option.table.rowKey]), r.children && r.children.length > 0 && (t = t.concat(i(r.children)));
|
|
1151
|
+
}), t;
|
|
1163
1152
|
};
|
|
1164
|
-
|
|
1153
|
+
a.table.expand.rowKeys = i(a.table.data);
|
|
1165
1154
|
}
|
|
1166
|
-
|
|
1155
|
+
a.table.expand.isExpand = !a.table.expand.isExpand;
|
|
1167
1156
|
}
|
|
1168
1157
|
},
|
|
1169
1158
|
/** 表格列相关配置 */
|
|
@@ -1180,32 +1169,32 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1180
1169
|
},
|
|
1181
1170
|
/** 获取数据列表接口实现 */
|
|
1182
1171
|
getList: async () => {
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1172
|
+
a.table.loading = !0;
|
|
1173
|
+
const i = e.option.api.list;
|
|
1185
1174
|
try {
|
|
1186
|
-
await
|
|
1175
|
+
await a.initApiData("init");
|
|
1187
1176
|
let l = {};
|
|
1188
|
-
if (
|
|
1189
|
-
const { props:
|
|
1177
|
+
if (a.table.sort.prop) {
|
|
1178
|
+
const { props: s, order: V } = O.config.table.sort;
|
|
1190
1179
|
l = {
|
|
1191
|
-
[
|
|
1192
|
-
[V.field]:
|
|
1180
|
+
[s.field]: a.table.sort.prop,
|
|
1181
|
+
[V.field]: a.table.sort.order
|
|
1193
1182
|
};
|
|
1194
1183
|
}
|
|
1195
|
-
const
|
|
1196
|
-
...
|
|
1184
|
+
const t = await i({
|
|
1185
|
+
...a.page.getQuery(),
|
|
1197
1186
|
...l
|
|
1198
|
-
}),
|
|
1199
|
-
let
|
|
1200
|
-
const g =
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
}),
|
|
1204
|
-
|
|
1187
|
+
}), r = O.config.field.result, m = t.data || { [r.list]: t };
|
|
1188
|
+
let f = (Array.isArray(m[r.list]), m[r.list]);
|
|
1189
|
+
const g = a.update.formColumn.flat(), n = JSONUtil.cp(f).map((s) => (Object.keys(s).forEach((w) => {
|
|
1190
|
+
const F = g.find((L) => L.item.key === w);
|
|
1191
|
+
F && ["select", "radio"].includes(F.item.type) && (F.item.table.format || (F.item.table.format = (L) => F.item.options[F.item.type].data?.find((j) => j.value == L[w])?.label || L[w]));
|
|
1192
|
+
}), s));
|
|
1193
|
+
a.table.data = e.option.data ? await e.option.data(n, f) : n, a.page.total = m[r.total] || 0;
|
|
1205
1194
|
} catch (l) {
|
|
1206
1195
|
console.error(l);
|
|
1207
1196
|
} finally {
|
|
1208
|
-
|
|
1197
|
+
a.table.loading = !1;
|
|
1209
1198
|
}
|
|
1210
1199
|
},
|
|
1211
1200
|
/** 表格多选相关配置 */
|
|
@@ -1213,8 +1202,8 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1213
1202
|
/** 已选数据项 */
|
|
1214
1203
|
list: [],
|
|
1215
1204
|
/** 选中状态回调 */
|
|
1216
|
-
change: (
|
|
1217
|
-
|
|
1205
|
+
change: (i) => {
|
|
1206
|
+
a.table.selection.list = i;
|
|
1218
1207
|
}
|
|
1219
1208
|
},
|
|
1220
1209
|
/** 表格排序相关配置 */
|
|
@@ -1224,14 +1213,14 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1224
1213
|
/** 当前排序顺序值 */
|
|
1225
1214
|
order: "",
|
|
1226
1215
|
/** 排序变更回调 */
|
|
1227
|
-
change: (
|
|
1228
|
-
|
|
1229
|
-
const l =
|
|
1216
|
+
change: (i) => {
|
|
1217
|
+
O.config.table.sort.resetPage && (a.page.num = 1);
|
|
1218
|
+
const l = O.config.table.sort;
|
|
1230
1219
|
if (l.change) {
|
|
1231
|
-
l.change(
|
|
1220
|
+
l.change(i, a);
|
|
1232
1221
|
return;
|
|
1233
1222
|
}
|
|
1234
|
-
|
|
1223
|
+
a.table.sort.prop = i.prop, i.order === null ? a.table.sort.order = "" : a.table.sort.order = i.order === "ascending" ? l.order.asc : l.order.desc, a.table.getList();
|
|
1235
1224
|
}
|
|
1236
1225
|
}
|
|
1237
1226
|
},
|
|
@@ -1240,82 +1229,82 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1240
1229
|
/** 导出逻辑方法集合 */
|
|
1241
1230
|
run: {
|
|
1242
1231
|
/** 执行指定方式的导出(如select、page、all) */
|
|
1243
|
-
start: async (
|
|
1244
|
-
let l = await
|
|
1245
|
-
const
|
|
1232
|
+
start: async (i) => {
|
|
1233
|
+
let l = await a.export.run[i](), t = e.option.column;
|
|
1234
|
+
const r = JSONUtil.cp({
|
|
1246
1235
|
data: l,
|
|
1247
|
-
columns:
|
|
1248
|
-
}),
|
|
1249
|
-
|
|
1236
|
+
columns: t
|
|
1237
|
+
}), m = e.option.tools?.export || {};
|
|
1238
|
+
m.before && m.before(r), Te.exportToExcel(r.data, r.columns, m.fileName);
|
|
1250
1239
|
},
|
|
1251
1240
|
/** 获取当前选中项进行导出 */
|
|
1252
1241
|
select: async () => {
|
|
1253
|
-
|
|
1242
|
+
a.export.loading = !0;
|
|
1254
1243
|
try {
|
|
1255
|
-
if (
|
|
1256
|
-
await
|
|
1257
|
-
...
|
|
1258
|
-
items:
|
|
1244
|
+
if (e.option.tools?.export?.select) {
|
|
1245
|
+
await e.option.tools?.export?.select({
|
|
1246
|
+
...a.page.getQuery(),
|
|
1247
|
+
items: a.table.selection.list
|
|
1259
1248
|
});
|
|
1260
1249
|
return;
|
|
1261
1250
|
}
|
|
1262
|
-
if (
|
|
1263
|
-
throw
|
|
1264
|
-
return
|
|
1265
|
-
} catch (
|
|
1266
|
-
console.error(
|
|
1251
|
+
if (a.table.selection.list.length === 0)
|
|
1252
|
+
throw S.fail(b.tCurd("selectDataToExport")), new Error(b.tCurd("selectDataToExport"));
|
|
1253
|
+
return a.table.selection.list;
|
|
1254
|
+
} catch (i) {
|
|
1255
|
+
console.error(i);
|
|
1267
1256
|
} finally {
|
|
1268
|
-
|
|
1257
|
+
a.export.loading = !1;
|
|
1269
1258
|
}
|
|
1270
1259
|
},
|
|
1271
1260
|
/** 导出当前页的数据 */
|
|
1272
1261
|
page: async () => {
|
|
1273
|
-
|
|
1262
|
+
a.export.loading = !0;
|
|
1274
1263
|
try {
|
|
1275
|
-
if (
|
|
1276
|
-
await
|
|
1277
|
-
...
|
|
1264
|
+
if (e.option.tools?.export?.page) {
|
|
1265
|
+
await e.option.tools?.export?.page({
|
|
1266
|
+
...a.page.getQuery()
|
|
1278
1267
|
});
|
|
1279
1268
|
return;
|
|
1280
1269
|
}
|
|
1281
|
-
if (
|
|
1282
|
-
throw
|
|
1283
|
-
return
|
|
1284
|
-
} catch (
|
|
1285
|
-
console.error(
|
|
1270
|
+
if (a.table.data.length === 0)
|
|
1271
|
+
throw S.fail(b.tCurd("noData")), new Error(b.tCurd("noData"));
|
|
1272
|
+
return a.table.data;
|
|
1273
|
+
} catch (i) {
|
|
1274
|
+
console.error(i);
|
|
1286
1275
|
} finally {
|
|
1287
|
-
|
|
1276
|
+
a.export.loading = !1;
|
|
1288
1277
|
}
|
|
1289
1278
|
},
|
|
1290
1279
|
/** 导出所有数据 */
|
|
1291
1280
|
all: async () => {
|
|
1292
|
-
|
|
1281
|
+
a.export.loading = !0;
|
|
1293
1282
|
try {
|
|
1294
|
-
if (
|
|
1295
|
-
await
|
|
1296
|
-
...
|
|
1283
|
+
if (e.option.tools?.export?.all) {
|
|
1284
|
+
await e.option.tools?.export?.all({
|
|
1285
|
+
...a.page.getQuery()
|
|
1297
1286
|
});
|
|
1298
1287
|
return;
|
|
1299
1288
|
}
|
|
1300
|
-
const
|
|
1301
|
-
...
|
|
1289
|
+
const i = e.option.api.list, l = await i({
|
|
1290
|
+
...a.page.getQuery({
|
|
1302
1291
|
size: 999999,
|
|
1303
1292
|
num: 1
|
|
1304
1293
|
})
|
|
1305
1294
|
});
|
|
1306
|
-
return (l.data || { [
|
|
1307
|
-
} catch (
|
|
1308
|
-
console.error(
|
|
1295
|
+
return (l.data || { [O.config.field.result.list]: l })[O.config.field.result.list];
|
|
1296
|
+
} catch (i) {
|
|
1297
|
+
console.error(i);
|
|
1309
1298
|
} finally {
|
|
1310
|
-
|
|
1299
|
+
a.export.loading = !1;
|
|
1311
1300
|
}
|
|
1312
1301
|
}
|
|
1313
1302
|
},
|
|
1314
1303
|
/** 导出时loading状态 */
|
|
1315
1304
|
loading: !1,
|
|
1316
1305
|
/** 执行导出操作的触发函数 */
|
|
1317
|
-
click: (
|
|
1318
|
-
|
|
1306
|
+
click: (i) => {
|
|
1307
|
+
a.export.loading || a.export.run.start(i);
|
|
1319
1308
|
}
|
|
1320
1309
|
},
|
|
1321
1310
|
/** 表单增删改弹窗相关对象 */
|
|
@@ -1331,7 +1320,7 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1331
1320
|
/** 弹窗loading */
|
|
1332
1321
|
loading: !1,
|
|
1333
1322
|
/** 当前操作类型,插入或修改 */
|
|
1334
|
-
type:
|
|
1323
|
+
type: I.Add,
|
|
1335
1324
|
/** 当前操作表单数据 */
|
|
1336
1325
|
form: {},
|
|
1337
1326
|
/** 表单默认值 */
|
|
@@ -1339,19 +1328,19 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1339
1328
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1340
1329
|
formColumn: [],
|
|
1341
1330
|
/** 判断是否禁用当前字段 */
|
|
1342
|
-
getDisabled: (
|
|
1331
|
+
getDisabled: (i) => a.update.type === I.View ? i.disabled?.view === void 0 ? !0 : i.disabled?.view : i.disabled?.[a.update.type === I.Add ? "create" : "update"],
|
|
1343
1332
|
/** 获取表单组件绑定属性 */
|
|
1344
|
-
getBind: (
|
|
1333
|
+
getBind: (i) => i.options?.[a.update.type === I.Add ? "formAdd" : "formUpdate"]?.[i.type] || i.options?.[i.type] || {},
|
|
1345
1334
|
/** 获取表单组件事件属性 */
|
|
1346
|
-
getOn: (
|
|
1335
|
+
getOn: (i) => i.options?.[a.update.type === I.Add ? "formAdd" : "formUpdate"]?.[i.type]?.on || i.options?.[i.type]?.on || {},
|
|
1347
1336
|
/** 获取表单组件绑定属性和事件 */
|
|
1348
|
-
getOptions: (
|
|
1337
|
+
getOptions: (i) => {
|
|
1349
1338
|
try {
|
|
1350
|
-
const
|
|
1351
|
-
return
|
|
1352
|
-
options:
|
|
1339
|
+
const t = a.update.formColumn.flat().find((r) => r.item.key === i)?.item;
|
|
1340
|
+
return t ? {
|
|
1341
|
+
options: t.options,
|
|
1353
1342
|
// @ts-ignore
|
|
1354
|
-
bind:
|
|
1343
|
+
bind: a.update.getBind(t)
|
|
1355
1344
|
} : { options: {}, bind: {} };
|
|
1356
1345
|
} catch {
|
|
1357
1346
|
return { options: {}, bind: {} };
|
|
@@ -1362,71 +1351,71 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1362
1351
|
/** 当前编辑的数据原始项对象 */
|
|
1363
1352
|
data: {},
|
|
1364
1353
|
/** 返回编辑时与原值的变更数据,用于局部更新API */
|
|
1365
|
-
getApiData: (
|
|
1366
|
-
if (
|
|
1367
|
-
return
|
|
1354
|
+
getApiData: (i) => {
|
|
1355
|
+
if (e.option.form?.editAll)
|
|
1356
|
+
return i;
|
|
1368
1357
|
let l = {
|
|
1369
|
-
[
|
|
1358
|
+
[e.option.table?.rowKey]: a.update.edit.data[e.option.table?.rowKey]
|
|
1370
1359
|
};
|
|
1371
|
-
return Object.keys(
|
|
1372
|
-
|
|
1360
|
+
return Object.keys(a.update.edit.data).forEach((t) => {
|
|
1361
|
+
i[t] !== a.update.edit.data[t] && (l[t] = i[t]);
|
|
1373
1362
|
}), l;
|
|
1374
1363
|
}
|
|
1375
1364
|
},
|
|
1376
1365
|
view: {},
|
|
1377
1366
|
/** 打开增改弹窗 */
|
|
1378
|
-
open: (
|
|
1379
|
-
|
|
1380
|
-
|
|
1367
|
+
open: (i, l) => {
|
|
1368
|
+
a.update.showContent || FunUtil.throttle(async () => {
|
|
1369
|
+
S.loading(!0);
|
|
1381
1370
|
try {
|
|
1382
|
-
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1385
|
-
} catch (
|
|
1386
|
-
console.error(
|
|
1371
|
+
a.update.type = i, await a.initApiData("update");
|
|
1372
|
+
const t = i === I.Add;
|
|
1373
|
+
a.update.edit.data = l, a.update.title = b.tCurd(t ? "add" : i === I.View ? "view" : "edit"), a.update.form = JSONUtil.cp(t ? a.update.formDefault : l), await e.option.form?.openBefore?.(a.update.form, a.update), (!e.option.table?.inlineEdit || t) && (a.update.show = !0, a.update.showContent = !0), e.option.form?.openAfter?.(a.update.form, a.update);
|
|
1374
|
+
} catch (t) {
|
|
1375
|
+
console.error(t);
|
|
1387
1376
|
} finally {
|
|
1388
|
-
|
|
1377
|
+
S.loading(!1);
|
|
1389
1378
|
}
|
|
1390
1379
|
});
|
|
1391
1380
|
},
|
|
1392
1381
|
/** 提交增改表单操作 */
|
|
1393
1382
|
submit: () => {
|
|
1394
1383
|
FunUtil.throttle(async () => {
|
|
1395
|
-
await
|
|
1396
|
-
|
|
1397
|
-
})),
|
|
1398
|
-
const
|
|
1384
|
+
await c.value?.validate(async (r, m) => new Promise((f, g) => {
|
|
1385
|
+
r || (S.fail(b.tCurd("checkFormData")), g(!1)), f();
|
|
1386
|
+
})), a.update.loading = !0;
|
|
1387
|
+
const i = a.update.type === I.Add ? e.option.api.create : e.option.api.update;
|
|
1399
1388
|
try {
|
|
1400
|
-
await
|
|
1389
|
+
await e.option.form?.submitBefore?.(a.update.form, a.update);
|
|
1401
1390
|
} catch {
|
|
1402
|
-
|
|
1391
|
+
a.update.loading = !1;
|
|
1403
1392
|
return;
|
|
1404
1393
|
}
|
|
1405
|
-
let l = JSONUtil.cp(
|
|
1394
|
+
let l = JSONUtil.cp(a.update.form);
|
|
1406
1395
|
delete l.children;
|
|
1407
|
-
const
|
|
1408
|
-
Object.keys(l).forEach((
|
|
1409
|
-
if (
|
|
1410
|
-
const
|
|
1411
|
-
isNaN(
|
|
1396
|
+
const t = new Set(e.option.column.filter((r) => r.type === "datetime").map((r) => r.key));
|
|
1397
|
+
Object.keys(l).forEach((r) => {
|
|
1398
|
+
if (t.has(r) && l[r] != null) {
|
|
1399
|
+
const m = new Date(l[r]).getTime();
|
|
1400
|
+
isNaN(m) || (l[r] = m);
|
|
1412
1401
|
}
|
|
1413
1402
|
});
|
|
1414
1403
|
try {
|
|
1415
|
-
if (!
|
|
1416
|
-
await
|
|
1404
|
+
if (!i) return;
|
|
1405
|
+
await i({
|
|
1417
1406
|
...l
|
|
1418
|
-
}),
|
|
1419
|
-
} catch (
|
|
1420
|
-
console.error(
|
|
1407
|
+
}), a.update.close(), await a.table.getList(), e.option.form?.submitAfter?.(l, a.update);
|
|
1408
|
+
} catch (r) {
|
|
1409
|
+
console.error(r);
|
|
1421
1410
|
} finally {
|
|
1422
|
-
|
|
1411
|
+
a.update.loading = !1;
|
|
1423
1412
|
}
|
|
1424
1413
|
});
|
|
1425
1414
|
},
|
|
1426
1415
|
/** 关闭弹窗和内容 */
|
|
1427
1416
|
close: () => {
|
|
1428
|
-
|
|
1429
|
-
|
|
1417
|
+
a.update.show = !1, e.option.table?.inlineEdit && (a.update.form = {}), setTimeout(() => {
|
|
1418
|
+
a.update.showContent = !1;
|
|
1430
1419
|
}, 350);
|
|
1431
1420
|
}
|
|
1432
1421
|
},
|
|
@@ -1442,74 +1431,74 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1442
1431
|
loading: !1,
|
|
1443
1432
|
/** 关闭删除弹窗 */
|
|
1444
1433
|
close: () => {
|
|
1445
|
-
|
|
1434
|
+
a.remove.show = !1;
|
|
1446
1435
|
},
|
|
1447
1436
|
/** 打开删除弹窗并设置待删除项 */
|
|
1448
|
-
open: (
|
|
1449
|
-
if (
|
|
1450
|
-
|
|
1437
|
+
open: (i) => {
|
|
1438
|
+
if (i.length === 0) {
|
|
1439
|
+
S.fail(b.tCurd("selectDataToDelete"));
|
|
1451
1440
|
return;
|
|
1452
1441
|
}
|
|
1453
|
-
|
|
1442
|
+
a.remove.items = i, a.remove.show = !0;
|
|
1454
1443
|
},
|
|
1455
1444
|
/** 执行删除实际操作 */
|
|
1456
1445
|
submit: () => {
|
|
1457
1446
|
FunUtil.throttle(async () => {
|
|
1458
|
-
|
|
1459
|
-
const
|
|
1447
|
+
a.remove.loading = !0;
|
|
1448
|
+
const i = e.option.api.delete;
|
|
1460
1449
|
try {
|
|
1461
|
-
if (!
|
|
1462
|
-
await
|
|
1463
|
-
[
|
|
1464
|
-
items:
|
|
1465
|
-
}),
|
|
1450
|
+
if (!i) return;
|
|
1451
|
+
await i({
|
|
1452
|
+
[e.option.table?.rowKey]: a.remove.items.map((l) => l[e.option.table?.rowKey]),
|
|
1453
|
+
items: a.remove.items
|
|
1454
|
+
}), S.success(b.tCurd("operationSuccess")), a.table.data.length <= 1 && a.page.num > 1 && (a.page.num -= 1), a.remove.close(), await a.table.getList();
|
|
1466
1455
|
} catch (l) {
|
|
1467
1456
|
console.error(l);
|
|
1468
1457
|
} finally {
|
|
1469
|
-
|
|
1458
|
+
a.remove.loading = !1;
|
|
1470
1459
|
}
|
|
1471
1460
|
});
|
|
1472
1461
|
}
|
|
1473
1462
|
},
|
|
1474
1463
|
/** 初始化curd关联所有默认与依赖配置及表单列 */
|
|
1475
1464
|
init: () => {
|
|
1476
|
-
|
|
1465
|
+
a.initCurdConfig(), a.initColumnOptions(), a.initColumnForm();
|
|
1477
1466
|
},
|
|
1478
1467
|
/** 下拉请求等数据缓存 */
|
|
1479
1468
|
apiDataMap: {},
|
|
1480
1469
|
/** 获取并绑定curd中所有下拉数据等远程依赖 */
|
|
1481
|
-
initApiData: async (
|
|
1482
|
-
const l = [],
|
|
1483
|
-
if (
|
|
1484
|
-
|
|
1470
|
+
initApiData: async (i) => {
|
|
1471
|
+
const l = [], t = (r) => {
|
|
1472
|
+
if (r.children && r.children.length) {
|
|
1473
|
+
r.children.forEach((m) => t(m));
|
|
1485
1474
|
return;
|
|
1486
1475
|
}
|
|
1487
|
-
if (
|
|
1488
|
-
if (
|
|
1489
|
-
const
|
|
1476
|
+
if (r.options?.[r.type]?.dataApi && r.options?.[r.type]?.dataApiConfig?.[i]) {
|
|
1477
|
+
if (a.apiDataMap[r.key] && r.options?.[r.type]?.dataApiConfig?.once) return;
|
|
1478
|
+
const m = (async () => {
|
|
1490
1479
|
try {
|
|
1491
|
-
let
|
|
1492
|
-
if (
|
|
1493
|
-
const g =
|
|
1494
|
-
!Array.isArray(
|
|
1480
|
+
let f = await r.options?.[r.type]?.dataApi?.(a.update.form, i);
|
|
1481
|
+
if (f) {
|
|
1482
|
+
const g = r.options?.[r.type]?.dataPath;
|
|
1483
|
+
!Array.isArray(f) && g && (f = ObjectUtil.getPathValue(f, g)), r.options[r.type].data = f, r.options.search[r.type].data = f, r.options.formAdd[r.type].data = f, r.options.formUpdate[r.type].data = f, a.apiDataMap[r.key] = f;
|
|
1495
1484
|
}
|
|
1496
1485
|
} catch {
|
|
1497
1486
|
}
|
|
1498
1487
|
})();
|
|
1499
|
-
l.push(
|
|
1488
|
+
l.push(m);
|
|
1500
1489
|
}
|
|
1501
1490
|
};
|
|
1502
|
-
return
|
|
1503
|
-
|
|
1491
|
+
return e.option.column.forEach((r) => {
|
|
1492
|
+
t(r);
|
|
1504
1493
|
}), await Promise.all(l), !0;
|
|
1505
1494
|
},
|
|
1506
1495
|
/** 初始化curd配置(option默认值合并等) */
|
|
1507
1496
|
initCurdConfig: () => {
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1510
|
-
const l = ObjectUtil.deepMerge(
|
|
1511
|
-
Object.keys(l).forEach((
|
|
1512
|
-
|
|
1497
|
+
const i = JSONUtil.cp(O.config);
|
|
1498
|
+
i.table.emptyText = b.tCurd("noData"), e.option.size = e.option.size || {}, i.table.size = e.option.size.table || i.size.table, i.form.size = e.option.size.form || i.size.form, i.size.search = e.option.size.search || i.size.search;
|
|
1499
|
+
const l = ObjectUtil.deepMerge(i, e.option || {});
|
|
1500
|
+
Object.keys(l).forEach((t) => {
|
|
1501
|
+
e.option[t] = l[t];
|
|
1513
1502
|
});
|
|
1514
1503
|
},
|
|
1515
1504
|
/**
|
|
@@ -1518,171 +1507,172 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1518
1507
|
* @returns
|
|
1519
1508
|
*/
|
|
1520
1509
|
initColumnOptions: () => {
|
|
1521
|
-
let
|
|
1522
|
-
|
|
1510
|
+
let i = JSONUtil.cp(O.config.columnConfig);
|
|
1511
|
+
i.options = ObjectUtil.deepMerge(
|
|
1523
1512
|
{
|
|
1524
1513
|
switch: {
|
|
1525
1514
|
activeText: b.tCurd("switchOn"),
|
|
1526
1515
|
inactiveText: b.tCurd("switchOff")
|
|
1527
1516
|
}
|
|
1528
1517
|
},
|
|
1529
|
-
|
|
1518
|
+
i.options
|
|
1530
1519
|
);
|
|
1531
|
-
const l = (
|
|
1532
|
-
for (const
|
|
1533
|
-
if (
|
|
1534
|
-
if (
|
|
1535
|
-
|
|
1536
|
-
l(
|
|
1520
|
+
const l = (t) => {
|
|
1521
|
+
for (const r in i) {
|
|
1522
|
+
if (r === "table") {
|
|
1523
|
+
if (t.table = ObjectUtil.deepMerge(i.table, t.table || {}), t.children) {
|
|
1524
|
+
t.children.forEach((f) => {
|
|
1525
|
+
l(f);
|
|
1537
1526
|
});
|
|
1538
1527
|
return;
|
|
1539
1528
|
}
|
|
1540
|
-
} else
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
}),
|
|
1529
|
+
} else r === "type" ? t.type = t.type || i.type : t[r] = ObjectUtil.deepMerge(i[r], t[r] || {});
|
|
1530
|
+
t.options = t.options || {}, t.options[t.type] = t.options[t.type] || {}, t.options[t.type].size = e.option.size.form, ["search", "formAdd", "formUpdate"].forEach((f) => {
|
|
1531
|
+
t.options[f] = t.options[f] || JSONUtil.cp(t.options), t.options[f][t.type] = t.options[f][t.type] || {}, t.options[f][t.type].size = f === "search" ? e.option.size.search : e.option.size.form;
|
|
1532
|
+
}), t.table = ObjectUtil.deepMerge(t.table, t.options[t.type].table || {});
|
|
1544
1533
|
}
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1534
|
+
t.type === "switch" && (t.options.switch.tableBeforeChange = async (r, m) => {
|
|
1535
|
+
const f = t.options?.switch;
|
|
1547
1536
|
try {
|
|
1548
|
-
|
|
1537
|
+
f.tableConfig?.confirm && await d.value?.open({
|
|
1549
1538
|
title: b.tCurd("confirmModify"),
|
|
1550
1539
|
content: b.tCurd("confirmSwitchMessage")
|
|
1551
1540
|
});
|
|
1552
1541
|
try {
|
|
1553
|
-
if (!
|
|
1554
|
-
const g =
|
|
1555
|
-
|
|
1556
|
-
const n =
|
|
1542
|
+
if (!e.option.api.update && !f.tableConfig?.api) return;
|
|
1543
|
+
const g = m[e.option.table?.rowKey];
|
|
1544
|
+
f.loadingMap || (f.loadingMap = {}), f.loadingMap[g] || (f.loadingMap[g] = { loading: !1 }), f.loadingMap[g].loading = !0;
|
|
1545
|
+
const n = m[r] === f.activeValue ? f.inactiveValue : f.activeValue, s = f.tableConfig?.api ? f.tableConfig.api : e.option.api.update;
|
|
1546
|
+
if (!s) return;
|
|
1557
1547
|
try {
|
|
1558
|
-
await
|
|
1548
|
+
await s(
|
|
1559
1549
|
{
|
|
1560
|
-
...
|
|
1561
|
-
[
|
|
1550
|
+
...m,
|
|
1551
|
+
[r]: n
|
|
1562
1552
|
},
|
|
1563
1553
|
"switch"
|
|
1564
1554
|
);
|
|
1565
1555
|
} catch {
|
|
1566
1556
|
return !1;
|
|
1567
1557
|
} finally {
|
|
1568
|
-
|
|
1558
|
+
f.loadingMap[g].loading = !1;
|
|
1569
1559
|
}
|
|
1570
|
-
return
|
|
1560
|
+
return S.success(b.tCurd("operationSuccess")), f.tableConfig?.loadList && (a.table.loading = !0, a.table.getList(), a.table.loading = !1), !0;
|
|
1571
1561
|
} catch (g) {
|
|
1572
1562
|
return console.error(g), !1;
|
|
1573
1563
|
} finally {
|
|
1574
|
-
|
|
1564
|
+
a.table.loading = !1;
|
|
1575
1565
|
}
|
|
1576
1566
|
} catch {
|
|
1577
1567
|
return !1;
|
|
1578
1568
|
}
|
|
1579
|
-
}),
|
|
1569
|
+
}), t.type === "treeSelect" && (t.options.treeSelect.rowKey = e.option.table?.rowKey, t.options.treeSelect.nodeKey = e.option.table?.rowKey);
|
|
1580
1570
|
};
|
|
1581
|
-
|
|
1571
|
+
e.option.column.forEach(l), e.option.table?.column?.forEach(l);
|
|
1582
1572
|
},
|
|
1583
|
-
getColumnSpan: (
|
|
1584
|
-
if (
|
|
1585
|
-
const
|
|
1586
|
-
return (
|
|
1573
|
+
getColumnSpan: (i, l) => {
|
|
1574
|
+
if (i.item.form?.spanCol) {
|
|
1575
|
+
const t = O.config.form.defaultSpan, m = l.filter((f) => !S.isFun(f.item.show?.form, a.update.form, a.update.type)).reduce((f, g) => f + (g.item.form?.span || t), 0);
|
|
1576
|
+
return (i.item?.form.span || t) + m;
|
|
1587
1577
|
}
|
|
1588
|
-
return
|
|
1578
|
+
return i.item.form.span;
|
|
1589
1579
|
},
|
|
1590
1580
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1591
1581
|
initColumnForm: () => {
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1582
|
+
const i = e.option;
|
|
1583
|
+
a.update.formColumn = [], a.table.column.show = {
|
|
1594
1584
|
list: [],
|
|
1595
1585
|
listSource: []
|
|
1596
1586
|
};
|
|
1597
|
-
const l = [],
|
|
1598
|
-
let
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1601
|
-
|
|
1602
|
-
|
|
1587
|
+
const l = [], t = e.option.form?.maxSpan || 12, r = e.option.form?.defaultSpan || t / 2;
|
|
1588
|
+
let m = [];
|
|
1589
|
+
const f = (s) => {
|
|
1590
|
+
if (s.children) {
|
|
1591
|
+
a.table.column.show.list.push(s.key), s.children.forEach((V) => {
|
|
1592
|
+
f(V);
|
|
1603
1593
|
});
|
|
1604
1594
|
return;
|
|
1605
1595
|
}
|
|
1606
|
-
if (
|
|
1607
|
-
|
|
1608
|
-
let V =
|
|
1609
|
-
const
|
|
1610
|
-
if (
|
|
1611
|
-
const
|
|
1596
|
+
if (a.update.formDefault[s.key] = s.value, s.table.table && (s.show.table && a.table.column.show.list.push(s.key), s.table.table && a.table.column.show.listSource.push(s.key)), !(s.isForm && typeof s.show?.form == "boolean") || s.show?.form) {
|
|
1597
|
+
s.form = s.form || { span: r }, s.form.span = s.form.span ?? r;
|
|
1598
|
+
let V = s.form.span, w = m.reduce((L, j) => L + j.span, V);
|
|
1599
|
+
const F = m.length;
|
|
1600
|
+
if (m.push({ item: s, span: V }), (F === 1 && m[0].span === 0 || w >= t || V === 0 && F > 1) && (l.push(m), m = []), s.rules) {
|
|
1601
|
+
const L = {
|
|
1612
1602
|
input: b.tCurd("placeholderInput"),
|
|
1613
1603
|
select: b.tCurd("placeholderSelect")
|
|
1614
|
-
},
|
|
1615
|
-
|
|
1604
|
+
}, j = (L[s.type] || L.input) + s.label;
|
|
1605
|
+
a.update.rules[s.key] = typeof s.rules == "boolean" ? [
|
|
1616
1606
|
{
|
|
1617
1607
|
required: !0,
|
|
1618
|
-
message:
|
|
1608
|
+
message: j,
|
|
1619
1609
|
trigger: "blur"
|
|
1620
1610
|
}
|
|
1621
|
-
] :
|
|
1611
|
+
] : s.rules;
|
|
1622
1612
|
}
|
|
1623
1613
|
}
|
|
1624
|
-
}, g = (
|
|
1625
|
-
|
|
1614
|
+
}, g = (s, V) => {
|
|
1615
|
+
s.isForm = V, Array.isArray(s.children) && s.children.forEach((w) => g(w, V));
|
|
1626
1616
|
};
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
}),
|
|
1630
|
-
g(
|
|
1631
|
-
}),
|
|
1632
|
-
const n =
|
|
1633
|
-
n && Object.keys(n).forEach((
|
|
1634
|
-
|
|
1635
|
-
}),
|
|
1636
|
-
|
|
1637
|
-
}),
|
|
1617
|
+
i.column.forEach((s) => {
|
|
1618
|
+
s.isForm = !0, g(s, !0), f(s);
|
|
1619
|
+
}), e.option.table?.column?.forEach((s) => {
|
|
1620
|
+
g(s, !1), f(s);
|
|
1621
|
+
}), a.search.column.list = i.column.concat(i.table?.column || []), a.table.column.list = a.search.column.list.filter((s) => s.table?.table), a.search.column.list.sort((s, V) => s.sort?.search - V.sort?.search), a.table.column.list.sort((s, V) => s.sort?.table - V.sort?.table), m.length > 0 && l.push(m), a.update.formColumn = l;
|
|
1622
|
+
const n = e.option.search?.formDefault;
|
|
1623
|
+
n && Object.keys(n).forEach((s) => {
|
|
1624
|
+
a.search.formDefault[s] = n[s];
|
|
1625
|
+
}), i.column.forEach((s) => {
|
|
1626
|
+
s.show?.search || (a.search.formDefault[s.key] = void 0);
|
|
1627
|
+
}), a.search.form = JSONUtil.cp(a.search.formDefault);
|
|
1638
1628
|
}
|
|
1639
1629
|
});
|
|
1640
|
-
return
|
|
1641
|
-
|
|
1642
|
-
}), { conf:
|
|
1643
|
-
},
|
|
1630
|
+
return a.init(), ue(() => {
|
|
1631
|
+
e.option.init !== !1 && a.table.getList();
|
|
1632
|
+
}), { conf: a, switchConfirmRef: d, ruleFormRef: c };
|
|
1633
|
+
}, Ae = { class: "dialog-footer" }, Le = /* @__PURE__ */ H({
|
|
1644
1634
|
__name: "switchConfirm",
|
|
1645
1635
|
props: {
|
|
1646
1636
|
size: {}
|
|
1647
1637
|
},
|
|
1648
|
-
setup(
|
|
1649
|
-
const
|
|
1650
|
-
let l = null,
|
|
1651
|
-
const
|
|
1652
|
-
l = n,
|
|
1653
|
-
})),
|
|
1654
|
-
|
|
1655
|
-
},
|
|
1656
|
-
|
|
1638
|
+
setup(e, { expose: d }) {
|
|
1639
|
+
const c = N(!1), a = N("确认修改"), i = N("确认要修改状态吗?");
|
|
1640
|
+
let l = null, t = null;
|
|
1641
|
+
const r = (g) => (g?.title && (a.value = g.title), g?.content && (i.value = g.content), c.value = !0, new Promise((n, s) => {
|
|
1642
|
+
l = n, t = s;
|
|
1643
|
+
})), m = () => {
|
|
1644
|
+
c.value = !1, l?.(!0), l = null, t = null;
|
|
1645
|
+
}, f = () => {
|
|
1646
|
+
c.value = !1, t?.(new Error("用户取消操作")), l = null, t = null;
|
|
1657
1647
|
};
|
|
1658
|
-
return
|
|
1659
|
-
open:
|
|
1648
|
+
return d({
|
|
1649
|
+
open: r
|
|
1660
1650
|
}), (g, n) => {
|
|
1661
|
-
const
|
|
1651
|
+
const s = X("el-form");
|
|
1662
1652
|
return u(), h(o(ee), {
|
|
1663
|
-
modelValue:
|
|
1664
|
-
"onUpdate:modelValue": n[0] || (n[0] = (V) =>
|
|
1665
|
-
title:
|
|
1653
|
+
modelValue: c.value,
|
|
1654
|
+
"onUpdate:modelValue": n[0] || (n[0] = (V) => c.value = V),
|
|
1655
|
+
title: a.value,
|
|
1666
1656
|
"close-on-click-modal": !1,
|
|
1667
1657
|
width: "400px"
|
|
1668
1658
|
}, {
|
|
1669
|
-
footer:
|
|
1670
|
-
|
|
1671
|
-
default:
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
default:
|
|
1675
|
-
|
|
1676
|
-
])),
|
|
1659
|
+
footer: p(() => [
|
|
1660
|
+
x(s, { size: e.size }, {
|
|
1661
|
+
default: p(() => [
|
|
1662
|
+
E("span", Ae, [
|
|
1663
|
+
x(o(T), { onClick: f }, {
|
|
1664
|
+
default: p(() => [...n[1] || (n[1] = [
|
|
1665
|
+
D("取消", -1)
|
|
1666
|
+
])]),
|
|
1677
1667
|
_: 1
|
|
1678
1668
|
}),
|
|
1679
|
-
|
|
1669
|
+
x(o(T), {
|
|
1680
1670
|
type: "primary",
|
|
1681
|
-
onClick:
|
|
1671
|
+
onClick: m
|
|
1682
1672
|
}, {
|
|
1683
|
-
default:
|
|
1684
|
-
|
|
1685
|
-
])),
|
|
1673
|
+
default: p(() => [...n[2] || (n[2] = [
|
|
1674
|
+
D("确认", -1)
|
|
1675
|
+
])]),
|
|
1686
1676
|
_: 1
|
|
1687
1677
|
})
|
|
1688
1678
|
])
|
|
@@ -1690,157 +1680,151 @@ const R = U.EDialog, Ae = (i) => {
|
|
|
1690
1680
|
_: 1
|
|
1691
1681
|
}, 8, ["size"])
|
|
1692
1682
|
]),
|
|
1693
|
-
default:
|
|
1694
|
-
|
|
1683
|
+
default: p(() => [
|
|
1684
|
+
E("div", null, U(i.value), 1)
|
|
1695
1685
|
]),
|
|
1696
1686
|
_: 1
|
|
1697
1687
|
}, 8, ["modelValue", "title"]);
|
|
1698
1688
|
};
|
|
1699
1689
|
}
|
|
1700
|
-
}),
|
|
1701
|
-
const
|
|
1702
|
-
for (const [
|
|
1703
|
-
|
|
1704
|
-
return
|
|
1705
|
-
},
|
|
1690
|
+
}), fe = (e, d) => {
|
|
1691
|
+
const c = e.__vccOpts || e;
|
|
1692
|
+
for (const [a, i] of d)
|
|
1693
|
+
c[a] = i;
|
|
1694
|
+
return c;
|
|
1695
|
+
}, Be = {}, je = {
|
|
1706
1696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1707
1697
|
viewBox: "0 0 1024 1024"
|
|
1708
1698
|
};
|
|
1709
|
-
function
|
|
1710
|
-
return u(), y("svg",
|
|
1711
|
-
|
|
1699
|
+
function Ie(e, d) {
|
|
1700
|
+
return u(), y("svg", je, [...d[0] || (d[0] = [
|
|
1701
|
+
E("path", {
|
|
1712
1702
|
fill: "currentColor",
|
|
1713
1703
|
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"
|
|
1714
1704
|
}, null, -1)
|
|
1715
|
-
]));
|
|
1705
|
+
])]);
|
|
1716
1706
|
}
|
|
1717
|
-
const
|
|
1707
|
+
const Re = /* @__PURE__ */ fe(Be, [["render", Ie]]), Pe = {}, Ke = {
|
|
1718
1708
|
"data-v-58697b5c": "",
|
|
1719
1709
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1720
1710
|
viewBox: "0 0 1024 1024"
|
|
1721
1711
|
};
|
|
1722
|
-
function
|
|
1723
|
-
return u(), y("svg",
|
|
1724
|
-
|
|
1712
|
+
function Ne(e, d) {
|
|
1713
|
+
return u(), y("svg", Ke, [...d[0] || (d[0] = [
|
|
1714
|
+
E("path", {
|
|
1725
1715
|
fill: "currentColor",
|
|
1726
1716
|
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"
|
|
1727
1717
|
}, null, -1)
|
|
1728
|
-
]));
|
|
1718
|
+
])]);
|
|
1729
1719
|
}
|
|
1730
|
-
const
|
|
1720
|
+
const He = /* @__PURE__ */ fe(Pe, [["render", Ne]]), Je = { class: "row flex-center table-header-label inline" }, We = { class: "table-header-tooltip" }, qe = { key: 1 }, Qe = ["onClick", "innerHTML"], Ge = /* @__PURE__ */ H({
|
|
1731
1721
|
__name: "tableColumn",
|
|
1732
1722
|
props: {
|
|
1733
1723
|
conf: {},
|
|
1734
1724
|
columnList: {},
|
|
1735
1725
|
option: {}
|
|
1736
1726
|
},
|
|
1737
|
-
setup(
|
|
1738
|
-
const
|
|
1739
|
-
return (
|
|
1740
|
-
const l =
|
|
1741
|
-
return u(!0), y(
|
|
1742
|
-
key:
|
|
1727
|
+
setup(e) {
|
|
1728
|
+
const d = S.isFun, c = be().type;
|
|
1729
|
+
return (a, i) => {
|
|
1730
|
+
const l = X("el-tooltip");
|
|
1731
|
+
return u(!0), y($, null, M(e.columnList, (t) => (u(), y($, {
|
|
1732
|
+
key: t.key
|
|
1743
1733
|
}, [
|
|
1744
|
-
|
|
1734
|
+
e.conf.table.column.show.list.includes(t.key) ? (u(), h(o(te), v({
|
|
1745
1735
|
key: 0,
|
|
1746
|
-
prop:
|
|
1747
|
-
label:
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
e.table?.tooltip ? (u(), h(l, {
|
|
1736
|
+
prop: t.key,
|
|
1737
|
+
label: t.label
|
|
1738
|
+
}, { ref_for: !0 }, t.table), {
|
|
1739
|
+
header: p(() => [
|
|
1740
|
+
C(a.$slots, "table-header-" + t.key, { item: t }, () => [
|
|
1741
|
+
E("div", Je, [
|
|
1742
|
+
t.table?.tooltip ? (u(), h(l, {
|
|
1754
1743
|
key: 0,
|
|
1755
1744
|
effect: "dark",
|
|
1756
|
-
content:
|
|
1745
|
+
content: t.table?.tooltip,
|
|
1757
1746
|
placement: "top"
|
|
1758
1747
|
}, {
|
|
1759
|
-
default:
|
|
1760
|
-
|
|
1761
|
-
|
|
1748
|
+
default: p(() => [
|
|
1749
|
+
E("span", We, [
|
|
1750
|
+
x(He)
|
|
1762
1751
|
])
|
|
1763
1752
|
]),
|
|
1764
|
-
_:
|
|
1765
|
-
},
|
|
1766
|
-
|
|
1753
|
+
_: 1
|
|
1754
|
+
}, 8, ["content"])) : k("", !0),
|
|
1755
|
+
D(" " + U(t.label), 1)
|
|
1767
1756
|
])
|
|
1768
1757
|
])
|
|
1769
1758
|
]),
|
|
1770
|
-
default:
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
(u(), h(
|
|
1774
|
-
conf:
|
|
1775
|
-
columnList:
|
|
1776
|
-
option:
|
|
1759
|
+
default: p(({ row: r }) => [
|
|
1760
|
+
t.children ? (u(), y($, { key: 0 }, [
|
|
1761
|
+
i[0] || (i[0] = D(" ", -1)),
|
|
1762
|
+
(u(), h(W(o(c)), {
|
|
1763
|
+
conf: e.conf,
|
|
1764
|
+
columnList: t.children,
|
|
1765
|
+
option: e.option
|
|
1777
1766
|
}, oe({ _: 2 }, [
|
|
1778
|
-
|
|
1779
|
-
name:
|
|
1780
|
-
fn:
|
|
1781
|
-
C(
|
|
1767
|
+
M(a.$slots, (m, f) => ({
|
|
1768
|
+
name: f,
|
|
1769
|
+
fn: p((g) => [
|
|
1770
|
+
C(a.$slots, f, v({ ref_for: !0 }, g || {}))
|
|
1782
1771
|
])
|
|
1783
1772
|
}))
|
|
1784
1773
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1785
|
-
], 64)) : (u(), y(
|
|
1786
|
-
|
|
1787
|
-
|
|
1774
|
+
], 64)) : (u(), y($, { key: 1 }, [
|
|
1775
|
+
e.conf.update.type === o(S).EDialog.Update && o(d)(t.show?.form, e.conf.update.form, o(S).EDialog.Update) && e.option.table?.inlineEdit && e.conf.update.form[e.option.table?.rowKey] === r[e.option.table?.rowKey] && (t.type === "input" || t.type === "select") ? (u(), y($, { key: 0 }, [
|
|
1776
|
+
t.type === "input" ? (u(), h(o(Y), v({
|
|
1788
1777
|
key: 0,
|
|
1789
|
-
modelValue:
|
|
1790
|
-
"onUpdate:modelValue": (
|
|
1791
|
-
disabled:
|
|
1792
|
-
|
|
1793
|
-
}, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), h(o(W), v({
|
|
1778
|
+
modelValue: e.conf.update.form[t.key],
|
|
1779
|
+
"onUpdate:modelValue": (m) => e.conf.update.form[t.key] = m,
|
|
1780
|
+
disabled: e.conf.update.getDisabled(t)
|
|
1781
|
+
}, { ref_for: !0 }, e.conf.update.getBind(t), z(e.conf.update.getOn(t)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "select" ? (u(), h(o(J), v({
|
|
1794
1782
|
key: 1,
|
|
1795
|
-
modelValue:
|
|
1796
|
-
"onUpdate:modelValue": (
|
|
1797
|
-
disabled:
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
value: c.value
|
|
1783
|
+
modelValue: e.conf.update.form[t.key],
|
|
1784
|
+
"onUpdate:modelValue": (m) => e.conf.update.form[t.key] = m,
|
|
1785
|
+
disabled: e.conf.update.getDisabled(t)
|
|
1786
|
+
}, { ref_for: !0 }, e.conf.update.getBind(t), z(e.conf.update.getOn(t)), { style: { width: "100%" } }), {
|
|
1787
|
+
default: p(() => [
|
|
1788
|
+
(u(!0), y($, null, M(t.options?.search?.select?.data || t.options?.select?.data, (m) => (u(), h(o(K), {
|
|
1789
|
+
key: m.value,
|
|
1790
|
+
label: m.label,
|
|
1791
|
+
value: m.value
|
|
1805
1792
|
}, null, 8, ["label", "value"]))), 128))
|
|
1806
1793
|
]),
|
|
1807
1794
|
_: 2
|
|
1808
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1795
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "switch" ? (u(), h(o(G), v({
|
|
1809
1796
|
key: 2,
|
|
1810
|
-
modelValue:
|
|
1811
|
-
"onUpdate:modelValue": (
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
disabled: t.conf.update.getDisabled(e)
|
|
1797
|
+
modelValue: e.conf.update.form[t.key],
|
|
1798
|
+
"onUpdate:modelValue": (m) => e.conf.update.form[t.key] = m
|
|
1799
|
+
}, { ref_for: !0 }, e.conf.update.getBind(t), z(e.conf.update.getOn(t)), {
|
|
1800
|
+
disabled: e.conf.update.getDisabled(t)
|
|
1815
1801
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
|
|
1816
|
-
], 64)) : C(
|
|
1802
|
+
], 64)) : C(a.$slots, "table-" + t.key, {
|
|
1817
1803
|
key: 1,
|
|
1818
|
-
row:
|
|
1819
|
-
item:
|
|
1804
|
+
row: r,
|
|
1805
|
+
item: t
|
|
1820
1806
|
}, () => [
|
|
1821
|
-
o(
|
|
1807
|
+
o(A).customComponent[t.type ?? ""]?.table ? (u(), h(W(o(A).customComponent[t.type ?? ""]?.table), v({
|
|
1822
1808
|
key: 0,
|
|
1823
|
-
modelValue:
|
|
1824
|
-
"onUpdate:modelValue": (
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
e.options?.switch?.tableConfig?.change ? (u(), h(o(X), v({
|
|
1809
|
+
modelValue: r[t.key],
|
|
1810
|
+
"onUpdate:modelValue": (m) => r[t.key] = m
|
|
1811
|
+
}, { ref_for: !0 }, t.options?.[t.type ?? ""], z(t.options?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : t.type === "switch" ? (u(), y($, { key: 1 }, [
|
|
1812
|
+
t.options?.switch?.tableConfig?.change ? (u(), h(o(G), v({
|
|
1828
1813
|
key: 0,
|
|
1829
|
-
modelValue:
|
|
1830
|
-
"onUpdate:modelValue": (
|
|
1831
|
-
loading:
|
|
1832
|
-
"before-change": () =>
|
|
1833
|
-
|
|
1834
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), y("span", Qe, O(s[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
1814
|
+
modelValue: r[t.key],
|
|
1815
|
+
"onUpdate:modelValue": (m) => r[t.key] = m,
|
|
1816
|
+
loading: t.options?.switch?.loadingMap?.[r[e.option.table?.rowKey]]?.loading,
|
|
1817
|
+
"before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, r)
|
|
1818
|
+
}, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), y("span", qe, U(r[t.key] === t.options?.switch?.activeValue ? t.options?.switch?.activeText : t.options?.switch?.inactiveText), 1))
|
|
1835
1819
|
], 64)) : (u(), y("span", {
|
|
1836
1820
|
key: 2,
|
|
1837
|
-
style:
|
|
1838
|
-
"--table-text-click-color":
|
|
1821
|
+
style: ce({
|
|
1822
|
+
"--table-text-click-color": t.table?.click?.color
|
|
1839
1823
|
}),
|
|
1840
|
-
class:
|
|
1841
|
-
onClick: (
|
|
1842
|
-
innerHTML:
|
|
1843
|
-
}, null, 14,
|
|
1824
|
+
class: B({ "table-text-click": t.table?.click?.callback }),
|
|
1825
|
+
onClick: (m) => t.table?.click?.callback?.(r),
|
|
1826
|
+
innerHTML: t.table?.format ? t.table?.format(r) : r[t.key]
|
|
1827
|
+
}, null, 14, Qe))
|
|
1844
1828
|
])
|
|
1845
1829
|
], 64))
|
|
1846
1830
|
]),
|
|
@@ -1849,132 +1833,129 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
1849
1833
|
], 64))), 128);
|
|
1850
1834
|
};
|
|
1851
1835
|
}
|
|
1852
|
-
}),
|
|
1836
|
+
}), Xe = {
|
|
1853
1837
|
class: "row form-item-content",
|
|
1854
1838
|
style: { width: "100%" }
|
|
1855
|
-
},
|
|
1839
|
+
}, Ye = { class: "col column form-item-content-item" }, Ze = { class: "col" }, _e = ["innerHTML"], et = /* @__PURE__ */ H({
|
|
1856
1840
|
__name: "formColumn",
|
|
1857
1841
|
props: {
|
|
1858
1842
|
conf: {},
|
|
1859
1843
|
item: {}
|
|
1860
1844
|
},
|
|
1861
|
-
setup(
|
|
1862
|
-
return (
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
label: typeof a.item.item.text?.form?.label == "string" ? a.item.item.text?.form?.label : a.item.item.label,
|
|
1867
|
-
prop: a.item.item.key,
|
|
1868
|
-
"label-width": a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
|
|
1845
|
+
setup(e) {
|
|
1846
|
+
return (d, c) => (u(), h(o(Q), {
|
|
1847
|
+
label: e.item.item.text?.form?.label ?? e.item.item.label,
|
|
1848
|
+
prop: e.item.item.key,
|
|
1849
|
+
"label-width": e.item.item.text?.form?.label == "" ? 0 : e.item.item.form?.labelWidth || e.conf.option.form?.labelWidth
|
|
1869
1850
|
}, {
|
|
1870
|
-
default:
|
|
1871
|
-
|
|
1872
|
-
C(
|
|
1873
|
-
row:
|
|
1874
|
-
item:
|
|
1851
|
+
default: p(() => [
|
|
1852
|
+
E("div", Xe, [
|
|
1853
|
+
C(d.$slots, "form-" + e.item.item.key + "-start", {
|
|
1854
|
+
row: e.conf.update.form,
|
|
1855
|
+
item: e.item.item
|
|
1875
1856
|
}),
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
C(
|
|
1879
|
-
row:
|
|
1880
|
-
item:
|
|
1857
|
+
E("div", Ye, [
|
|
1858
|
+
E("div", Ze, [
|
|
1859
|
+
C(d.$slots, "form-" + e.item.item.key, {
|
|
1860
|
+
row: e.conf.update.form,
|
|
1861
|
+
item: e.item.item
|
|
1881
1862
|
}, () => [
|
|
1882
|
-
|
|
1863
|
+
e.item.item.type === "input" ? (u(), h(o(Y), v({
|
|
1883
1864
|
key: 0,
|
|
1884
|
-
modelValue:
|
|
1885
|
-
"onUpdate:modelValue":
|
|
1886
|
-
},
|
|
1887
|
-
disabled:
|
|
1888
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
1865
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1866
|
+
"onUpdate:modelValue": c[0] || (c[0] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1867
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1868
|
+
disabled: e.conf.update.getDisabled(e.item.item)
|
|
1869
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.item.type === "switch" ? (u(), h(o(G), v({
|
|
1889
1870
|
key: 1,
|
|
1890
|
-
modelValue:
|
|
1891
|
-
"onUpdate:modelValue":
|
|
1892
|
-
},
|
|
1893
|
-
disabled:
|
|
1894
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
1871
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1872
|
+
"onUpdate:modelValue": c[1] || (c[1] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1873
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1874
|
+
disabled: e.conf.update.getDisabled(e.item.item)
|
|
1875
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.item.type === "select" ? (u(), h(o(J), v({
|
|
1895
1876
|
key: 2,
|
|
1896
|
-
modelValue:
|
|
1897
|
-
"onUpdate:modelValue":
|
|
1898
|
-
},
|
|
1899
|
-
disabled:
|
|
1877
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1878
|
+
"onUpdate:modelValue": c[2] || (c[2] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1879
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1880
|
+
disabled: e.conf.update.getDisabled(e.item.item),
|
|
1900
1881
|
style: { width: "100%" }
|
|
1901
1882
|
}), {
|
|
1902
|
-
default:
|
|
1903
|
-
(u(!0), y(
|
|
1904
|
-
key:
|
|
1905
|
-
label:
|
|
1906
|
-
value:
|
|
1883
|
+
default: p(() => [
|
|
1884
|
+
(u(!0), y($, null, M(e.conf.update.getBind(e.item.item).data, (a) => (u(), h(o(K), {
|
|
1885
|
+
key: a.value,
|
|
1886
|
+
label: a.label,
|
|
1887
|
+
value: a.value
|
|
1907
1888
|
}, null, 8, ["label", "value"]))), 128))
|
|
1908
1889
|
]),
|
|
1909
1890
|
_: 1
|
|
1910
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
1891
|
+
}, 16, ["modelValue", "disabled"])) : e.item.item.type === "radio" ? (u(), h(o(re), v({
|
|
1911
1892
|
key: 3,
|
|
1912
|
-
modelValue:
|
|
1913
|
-
"onUpdate:modelValue":
|
|
1914
|
-
},
|
|
1915
|
-
disabled:
|
|
1893
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1894
|
+
"onUpdate:modelValue": c[3] || (c[3] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1895
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1896
|
+
disabled: e.conf.update.getDisabled(e.item.item),
|
|
1916
1897
|
style: { width: "100%" }
|
|
1917
1898
|
}), {
|
|
1918
|
-
default:
|
|
1919
|
-
(u(!0), y(
|
|
1920
|
-
key:
|
|
1921
|
-
label:
|
|
1922
|
-
value:
|
|
1899
|
+
default: p(() => [
|
|
1900
|
+
(u(!0), y($, null, M(e.conf.update.getBind(e.item.item).data, (a) => (u(), h(o(se), {
|
|
1901
|
+
key: a.value,
|
|
1902
|
+
label: a.label,
|
|
1903
|
+
value: a.value
|
|
1923
1904
|
}, null, 8, ["label", "value"]))), 128))
|
|
1924
1905
|
]),
|
|
1925
1906
|
_: 1
|
|
1926
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
1907
|
+
}, 16, ["modelValue", "disabled"])) : e.item.item.type === "list" ? (u(), h(ne, v({
|
|
1927
1908
|
key: 4,
|
|
1928
|
-
row:
|
|
1929
|
-
field:
|
|
1930
|
-
},
|
|
1931
|
-
disabled:
|
|
1909
|
+
row: e.conf.update.form,
|
|
1910
|
+
field: e.item.item.key
|
|
1911
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1912
|
+
disabled: e.conf.update.getDisabled(e.item.item),
|
|
1932
1913
|
style: { width: "100%" }
|
|
1933
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
1914
|
+
}), null, 16, ["row", "field", "disabled"])) : e.item.item.type === "treeSelect" ? (u(), h(o(de), v({
|
|
1934
1915
|
key: 5,
|
|
1935
|
-
modelValue:
|
|
1936
|
-
"onUpdate:modelValue":
|
|
1937
|
-
},
|
|
1938
|
-
disabled:
|
|
1916
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1917
|
+
"onUpdate:modelValue": c[4] || (c[4] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1918
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1919
|
+
disabled: e.conf.update.getDisabled(e.item.item),
|
|
1939
1920
|
style: { width: "100%" }
|
|
1940
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
1921
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.item.type === "datetime" ? (u(), h(o(ae), v({
|
|
1941
1922
|
key: 6,
|
|
1942
|
-
modelValue:
|
|
1943
|
-
"onUpdate:modelValue":
|
|
1944
|
-
},
|
|
1945
|
-
disabled:
|
|
1946
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
1923
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1924
|
+
"onUpdate:modelValue": c[5] || (c[5] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1925
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1926
|
+
disabled: e.conf.update.getDisabled(e.item.item)
|
|
1927
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.item.type && (o(A).customComponent[e.item.item.type] || o(A).customComponent[e.item.item.type]?.form) ? (u(), h(W(o(A).customComponent[e.item.item.type]?.form || o(A).customComponent[e.item.item.type]), v({
|
|
1947
1928
|
key: 7,
|
|
1948
|
-
modelValue:
|
|
1949
|
-
"onUpdate:modelValue":
|
|
1950
|
-
},
|
|
1951
|
-
disabled:
|
|
1929
|
+
modelValue: e.conf.update.form[e.item.item.key],
|
|
1930
|
+
"onUpdate:modelValue": c[6] || (c[6] = (a) => e.conf.update.form[e.item.item.key] = a)
|
|
1931
|
+
}, e.conf.update.getBind(e.item.item), z(e.conf.update.getOn(e.item.item)), {
|
|
1932
|
+
disabled: e.conf.update.getDisabled(e.item.item)
|
|
1952
1933
|
}), null, 16, ["modelValue", "disabled"])) : k("", !0)
|
|
1953
1934
|
]),
|
|
1954
|
-
C(
|
|
1955
|
-
row:
|
|
1956
|
-
item:
|
|
1935
|
+
C(d.$slots, "form-" + e.item.item.key + "-right", {
|
|
1936
|
+
row: e.conf.update.form,
|
|
1937
|
+
item: e.item.item
|
|
1957
1938
|
})
|
|
1958
1939
|
]),
|
|
1959
|
-
C(
|
|
1960
|
-
row:
|
|
1961
|
-
item:
|
|
1940
|
+
C(d.$slots, "form-" + e.item.item.key + "-tip", {
|
|
1941
|
+
row: e.conf.update.form,
|
|
1942
|
+
item: e.item.item
|
|
1962
1943
|
}, () => [
|
|
1963
|
-
|
|
1944
|
+
e.item.item.form?.tipText ? (u(), y("div", {
|
|
1964
1945
|
key: 0,
|
|
1965
1946
|
class: "form-tip-text",
|
|
1966
|
-
innerHTML: typeof
|
|
1947
|
+
innerHTML: typeof e.item.item.form?.tipText == "function" ? e.item.item.form?.tipText(e.conf.update.form, e.conf.update.type) : e.item.item.form?.tipText
|
|
1967
1948
|
}, null, 8, _e)) : k("", !0)
|
|
1968
1949
|
])
|
|
1969
1950
|
]),
|
|
1970
|
-
C(
|
|
1971
|
-
row:
|
|
1972
|
-
item:
|
|
1951
|
+
C(d.$slots, "form-" + e.item.item.key + "-end", {
|
|
1952
|
+
row: e.conf.update.form,
|
|
1953
|
+
item: e.item.item
|
|
1973
1954
|
})
|
|
1974
1955
|
])
|
|
1975
1956
|
]),
|
|
1976
1957
|
_: 3
|
|
1977
|
-
}, 8, ["
|
|
1958
|
+
}, 8, ["label", "prop", "label-width"]));
|
|
1978
1959
|
}
|
|
1979
1960
|
}), tt = {
|
|
1980
1961
|
key: 0,
|
|
@@ -1988,7 +1969,7 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
1988
1969
|
}, dt = {
|
|
1989
1970
|
class: "flex items-center table-tools-right",
|
|
1990
1971
|
style: { gap: "10px" }
|
|
1991
|
-
}, ut = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" },
|
|
1972
|
+
}, ut = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, ct = { class: "dialog-footer" }, ft = { class: "dialog-footer" }, mt = /* @__PURE__ */ H({
|
|
1992
1973
|
__name: "index",
|
|
1993
1974
|
props: {
|
|
1994
1975
|
/**
|
|
@@ -1998,222 +1979,214 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
1998
1979
|
default: {}
|
|
1999
1980
|
}
|
|
2000
1981
|
},
|
|
2001
|
-
setup(
|
|
2002
|
-
const
|
|
2003
|
-
return
|
|
1982
|
+
setup(e, { expose: d }) {
|
|
1983
|
+
const c = S.EDialog, a = e, i = S.isFun, { conf: l, switchConfirmRef: t, ruleFormRef: r } = Me(a);
|
|
1984
|
+
return d({
|
|
2004
1985
|
conf: l
|
|
2005
|
-
}), (
|
|
1986
|
+
}), (m, f) => {
|
|
2006
1987
|
const g = we("loading");
|
|
2007
1988
|
return u(), y("div", {
|
|
2008
|
-
class:
|
|
1989
|
+
class: B(["relative cc1-form-box", [e.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2009
1990
|
}, [
|
|
2010
|
-
|
|
2011
|
-
class:
|
|
1991
|
+
E("div", {
|
|
1992
|
+
class: B(["row", [e.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2012
1993
|
style: { overflow: "hidden" }
|
|
2013
1994
|
}, [
|
|
2014
|
-
C(
|
|
2015
|
-
|
|
2016
|
-
class:
|
|
1995
|
+
C(m.$slots, "box-left"),
|
|
1996
|
+
E("div", {
|
|
1997
|
+
class: B(["column fit-width no-wrap", [e.option.table?.fitHeight ? "col" : ""]])
|
|
2017
1998
|
}, [
|
|
2018
|
-
|
|
2019
|
-
|
|
1999
|
+
e.option.search?.show !== !1 ? (u(), y("div", tt, [
|
|
2000
|
+
x(o(P), {
|
|
2020
2001
|
model: o(l).search.form,
|
|
2021
2002
|
inline: "",
|
|
2022
|
-
size:
|
|
2003
|
+
size: e.option.size?.search
|
|
2023
2004
|
}, {
|
|
2024
|
-
default:
|
|
2025
|
-
C(
|
|
2005
|
+
default: p(() => [
|
|
2006
|
+
C(m.$slots, "search-start", {
|
|
2026
2007
|
row: o(l).search.form
|
|
2027
2008
|
}),
|
|
2028
|
-
(u(!0), y(
|
|
2009
|
+
(u(!0), y($, null, M(o(l).search.column.list, (n) => (u(), y($, {
|
|
2029
2010
|
key: n.key
|
|
2030
2011
|
}, [
|
|
2031
|
-
(typeof n.show?.search == "function" ? n.show?.search(o(l).search.form) : n.show?.search) ? (u(), h(o(
|
|
2012
|
+
(typeof n.show?.search == "function" ? n.show?.search(o(l).search.form) : n.show?.search) ? (u(), h(o(Q), {
|
|
2032
2013
|
key: 0,
|
|
2033
|
-
label:
|
|
2034
|
-
class: j({
|
|
2035
|
-
"hide-label": typeof n.text?.search?.label == "boolean" ? !n.text?.search?.label : !1
|
|
2036
|
-
})
|
|
2014
|
+
label: n.text?.search?.label ?? n.label
|
|
2037
2015
|
}, {
|
|
2038
|
-
default:
|
|
2039
|
-
C(
|
|
2016
|
+
default: p(() => [
|
|
2017
|
+
C(m.$slots, "search-" + n.key, {
|
|
2040
2018
|
row: o(l).search.form
|
|
2041
2019
|
}, () => [
|
|
2042
|
-
n.type === "input" ? (u(), h(o(
|
|
2020
|
+
n.type === "input" ? (u(), h(o(Y), v({
|
|
2043
2021
|
key: 0,
|
|
2044
2022
|
modelValue: o(l).search.form[n.key],
|
|
2045
|
-
"onUpdate:modelValue": (
|
|
2023
|
+
"onUpdate:modelValue": (s) => o(l).search.form[n.key] = s,
|
|
2046
2024
|
placeholder: o(l).search.getPlaceholder(n),
|
|
2047
2025
|
clearable: "",
|
|
2048
|
-
disabled: n.disabled?.search
|
|
2049
|
-
|
|
2050
|
-
}, n.options?.search?.input || n.options?.input, D(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (u(), h(o(W), v({
|
|
2026
|
+
disabled: n.disabled?.search
|
|
2027
|
+
}, { ref_for: !0 }, n.options?.search?.input || n.options?.input, z(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (u(), h(o(J), v({
|
|
2051
2028
|
key: 1,
|
|
2052
2029
|
modelValue: o(l).search.form[n.key],
|
|
2053
|
-
"onUpdate:modelValue": (
|
|
2030
|
+
"onUpdate:modelValue": (s) => o(l).search.form[n.key] = s,
|
|
2054
2031
|
placeholder: o(l).search.getPlaceholder(n, o(b).tCurd("placeholderSelect")),
|
|
2055
2032
|
clearable: "",
|
|
2056
|
-
disabled: n.disabled?.search
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
(u(), h(o(N), {
|
|
2033
|
+
disabled: n.disabled?.search
|
|
2034
|
+
}, { ref_for: !0 }, n.options?.search?.switch || n.options?.switch, z(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
|
|
2035
|
+
default: p(() => [
|
|
2036
|
+
(u(), h(o(K), {
|
|
2061
2037
|
key: n.options?.switch?.activeValue,
|
|
2062
2038
|
label: n.options?.switch?.activeText,
|
|
2063
2039
|
value: n.options?.switch?.activeValue
|
|
2064
2040
|
}, null, 8, ["label", "value"])),
|
|
2065
|
-
(u(), h(o(
|
|
2041
|
+
(u(), h(o(K), {
|
|
2066
2042
|
key: n.options?.switch?.inactiveValue,
|
|
2067
2043
|
label: n.options?.switch?.inactiveText,
|
|
2068
2044
|
value: n.options?.switch?.inactiveValue
|
|
2069
2045
|
}, null, 8, ["label", "value"]))
|
|
2070
2046
|
]),
|
|
2071
2047
|
_: 2
|
|
2072
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (u(), h(o(
|
|
2048
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (u(), h(o(J), v({
|
|
2073
2049
|
key: 2,
|
|
2074
2050
|
modelValue: o(l).search.form[n.key],
|
|
2075
|
-
"onUpdate:modelValue": (
|
|
2051
|
+
"onUpdate:modelValue": (s) => o(l).search.form[n.key] = s,
|
|
2076
2052
|
placeholder: o(l).search.getPlaceholder(n, o(b).tCurd("placeholderSelect")),
|
|
2077
2053
|
clearable: "",
|
|
2078
|
-
disabled: n.disabled?.search
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
value: d.value
|
|
2054
|
+
disabled: n.disabled?.search
|
|
2055
|
+
}, { ref_for: !0 }, n.options?.search?.select || n.options?.select, z(n.options?.search?.select?.on || n.options?.select?.on || {})), {
|
|
2056
|
+
default: p(() => [
|
|
2057
|
+
(u(!0), y($, null, M(n.options?.select?.data, (s) => (u(), h(o(K), {
|
|
2058
|
+
key: s.value,
|
|
2059
|
+
label: s.label,
|
|
2060
|
+
value: s.value
|
|
2086
2061
|
}, null, 8, ["label", "value"]))), 128))
|
|
2087
2062
|
]),
|
|
2088
2063
|
_: 2
|
|
2089
2064
|
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "datetime" ? (u(), h(o(ae), v({
|
|
2090
2065
|
key: 3,
|
|
2091
2066
|
modelValue: o(l).search.form[n.key],
|
|
2092
|
-
"onUpdate:modelValue": (
|
|
2093
|
-
disabled: n.disabled?.search
|
|
2094
|
-
|
|
2095
|
-
}, n.options?.search?.datetime || n.options?.datetime, D(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && o(L).customComponent[n.type] ? (u(), h(q(o(L).customComponent[n.type]), v({
|
|
2067
|
+
"onUpdate:modelValue": (s) => o(l).search.form[n.key] = s,
|
|
2068
|
+
disabled: n.disabled?.search
|
|
2069
|
+
}, { ref_for: !0 }, n.options?.search?.datetime || n.options?.datetime, z(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && o(A).customComponent[n.type] ? (u(), h(W(o(A).customComponent[n.type]), v({
|
|
2096
2070
|
key: 4,
|
|
2097
2071
|
modelValue: o(l).search.form[n.key],
|
|
2098
|
-
"onUpdate:modelValue": (
|
|
2099
|
-
|
|
2100
|
-
}, n.options?.search?.[n.type] || n.options?.[n.type], D(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
|
|
2072
|
+
"onUpdate:modelValue": (s) => o(l).search.form[n.key] = s
|
|
2073
|
+
}, { ref_for: !0 }, n.options?.search?.[n.type] || n.options?.[n.type], z(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
|
|
2101
2074
|
disabled: n.disabled?.search
|
|
2102
2075
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
|
|
2103
2076
|
]),
|
|
2104
|
-
C(
|
|
2077
|
+
C(m.$slots, "search-" + n.key + "-right", {
|
|
2105
2078
|
row: o(l).search.form
|
|
2106
2079
|
})
|
|
2107
2080
|
]),
|
|
2108
2081
|
_: 2
|
|
2109
|
-
}, 1032, ["label"
|
|
2082
|
+
}, 1032, ["label"])) : k("", !0)
|
|
2110
2083
|
], 64))), 128)),
|
|
2111
|
-
C(
|
|
2084
|
+
C(m.$slots, "search-center", {
|
|
2112
2085
|
row: o(l).search.form
|
|
2113
2086
|
}),
|
|
2114
|
-
|
|
2115
|
-
default:
|
|
2116
|
-
|
|
2087
|
+
e.option.tools?.search || e.option.tools?.reset ? (u(), h(o(Q), { key: 0 }, {
|
|
2088
|
+
default: p(() => [
|
|
2089
|
+
e.option.tools?.search ? (u(), h(o(T), {
|
|
2117
2090
|
key: 0,
|
|
2118
2091
|
type: "primary",
|
|
2119
2092
|
onClick: o(l).search.submit
|
|
2120
2093
|
}, {
|
|
2121
|
-
default:
|
|
2122
|
-
|
|
2094
|
+
default: p(() => [
|
|
2095
|
+
D(U(o(b).tCurd("search")), 1)
|
|
2123
2096
|
]),
|
|
2124
2097
|
_: 1
|
|
2125
2098
|
}, 8, ["onClick"])) : k("", !0),
|
|
2126
|
-
|
|
2099
|
+
e.option.tools?.reset ? (u(), h(o(T), {
|
|
2127
2100
|
key: 1,
|
|
2128
2101
|
onClick: o(l).search.reset
|
|
2129
2102
|
}, {
|
|
2130
|
-
default:
|
|
2131
|
-
|
|
2103
|
+
default: p(() => [
|
|
2104
|
+
D(U(o(b).tCurd("reset")), 1)
|
|
2132
2105
|
]),
|
|
2133
2106
|
_: 1
|
|
2134
2107
|
}, 8, ["onClick"])) : k("", !0)
|
|
2135
2108
|
]),
|
|
2136
2109
|
_: 1
|
|
2137
2110
|
})) : k("", !0),
|
|
2138
|
-
C(
|
|
2111
|
+
C(m.$slots, "search-end", {
|
|
2139
2112
|
row: o(l).search.form
|
|
2140
2113
|
})
|
|
2141
2114
|
]),
|
|
2142
2115
|
_: 3
|
|
2143
2116
|
}, 8, ["model", "size"])
|
|
2144
2117
|
])) : k("", !0),
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
o(
|
|
2148
|
-
|
|
2118
|
+
E("div", ot, [
|
|
2119
|
+
E("div", at, [
|
|
2120
|
+
o(i)(e.option.tools?.add) ? (u(), y("div", lt, [
|
|
2121
|
+
x(o(T), {
|
|
2149
2122
|
type: "primary",
|
|
2150
|
-
onClick:
|
|
2151
|
-
size:
|
|
2123
|
+
onClick: f[0] || (f[0] = (n) => o(l).update.open(o(c).Add)),
|
|
2124
|
+
size: e.option.size?.search
|
|
2152
2125
|
}, {
|
|
2153
|
-
default:
|
|
2154
|
-
|
|
2126
|
+
default: p(() => [
|
|
2127
|
+
D(U(o(b).tCurd("add")), 1)
|
|
2155
2128
|
]),
|
|
2156
2129
|
_: 1
|
|
2157
2130
|
}, 8, ["size"])
|
|
2158
2131
|
])) : k("", !0),
|
|
2159
|
-
|
|
2160
|
-
|
|
2132
|
+
e.option.table?.selectable && o(i)(e.option.tools?.delete) ? (u(), y("div", nt, [
|
|
2133
|
+
x(o(T), {
|
|
2161
2134
|
type: "danger",
|
|
2162
|
-
onClick:
|
|
2163
|
-
size:
|
|
2135
|
+
onClick: f[1] || (f[1] = (n) => o(l).remove.open(o(l).table.selection.list)),
|
|
2136
|
+
size: e.option.size?.search
|
|
2164
2137
|
}, {
|
|
2165
|
-
default:
|
|
2166
|
-
|
|
2138
|
+
default: p(() => [
|
|
2139
|
+
D(U(o(b).tCurd("delete")), 1)
|
|
2167
2140
|
]),
|
|
2168
2141
|
_: 1
|
|
2169
2142
|
}, 8, ["size"])
|
|
2170
2143
|
])) : k("", !0),
|
|
2171
|
-
|
|
2172
|
-
|
|
2144
|
+
e.option.tools?.expand ? (u(), y("div", it, [
|
|
2145
|
+
x(o(T), {
|
|
2173
2146
|
type: "warning",
|
|
2174
|
-
onClick:
|
|
2175
|
-
size:
|
|
2147
|
+
onClick: f[2] || (f[2] = (n) => o(l).table.expand.all()),
|
|
2148
|
+
size: e.option.size?.search
|
|
2176
2149
|
}, {
|
|
2177
|
-
default:
|
|
2178
|
-
|
|
2150
|
+
default: p(() => [
|
|
2151
|
+
D(U(o(b).tCurd("expandCollapse")), 1)
|
|
2179
2152
|
]),
|
|
2180
2153
|
_: 1
|
|
2181
2154
|
}, 8, ["size"])
|
|
2182
2155
|
])) : k("", !0),
|
|
2183
|
-
|
|
2184
|
-
|
|
2156
|
+
e.option.tools?.export?.show ? (u(), y($, { key: 3 }, [
|
|
2157
|
+
e.option.tools?.export?.dropdown?.show ? (u(), h(o(he), {
|
|
2185
2158
|
key: 0,
|
|
2186
2159
|
onCommand: o(l).export.click
|
|
2187
2160
|
}, {
|
|
2188
|
-
dropdown:
|
|
2189
|
-
|
|
2190
|
-
size:
|
|
2161
|
+
dropdown: p(() => [
|
|
2162
|
+
x(o(ge), {
|
|
2163
|
+
size: e.option.size?.search
|
|
2191
2164
|
}, {
|
|
2192
|
-
default:
|
|
2193
|
-
|
|
2165
|
+
default: p(() => [
|
|
2166
|
+
e.option.tools?.export?.dropdown?.select && (e.option.table?.selectable || o(i)(e.option.tools?.delete)) ? (u(), h(o(_), {
|
|
2194
2167
|
key: 0,
|
|
2195
2168
|
command: "select"
|
|
2196
2169
|
}, {
|
|
2197
|
-
default:
|
|
2198
|
-
|
|
2170
|
+
default: p(() => [
|
|
2171
|
+
D(U(o(b).tCurd("exportSelect")), 1)
|
|
2199
2172
|
]),
|
|
2200
2173
|
_: 1
|
|
2201
2174
|
})) : k("", !0),
|
|
2202
|
-
|
|
2175
|
+
e.option.tools?.export?.dropdown?.page ? (u(), h(o(_), {
|
|
2203
2176
|
key: 1,
|
|
2204
2177
|
command: "page"
|
|
2205
2178
|
}, {
|
|
2206
|
-
default:
|
|
2207
|
-
|
|
2179
|
+
default: p(() => [
|
|
2180
|
+
D(U(o(b).tCurd("exportPage")), 1)
|
|
2208
2181
|
]),
|
|
2209
2182
|
_: 1
|
|
2210
2183
|
})) : k("", !0),
|
|
2211
|
-
|
|
2184
|
+
e.option.tools?.export?.dropdown?.all ? (u(), h(o(_), {
|
|
2212
2185
|
key: 2,
|
|
2213
2186
|
command: "all"
|
|
2214
2187
|
}, {
|
|
2215
|
-
default:
|
|
2216
|
-
|
|
2188
|
+
default: p(() => [
|
|
2189
|
+
D(U(o(b).tCurd("exportAll")), 1)
|
|
2217
2190
|
]),
|
|
2218
2191
|
_: 1
|
|
2219
2192
|
})) : k("", !0)
|
|
@@ -2221,15 +2194,15 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2221
2194
|
_: 1
|
|
2222
2195
|
}, 8, ["size"])
|
|
2223
2196
|
]),
|
|
2224
|
-
default:
|
|
2225
|
-
|
|
2226
|
-
|
|
2197
|
+
default: p(() => [
|
|
2198
|
+
E("div", rt, [
|
|
2199
|
+
x(o(T), {
|
|
2227
2200
|
type: "warning",
|
|
2228
2201
|
loading: o(l).export.loading,
|
|
2229
|
-
size:
|
|
2202
|
+
size: e.option.size?.search
|
|
2230
2203
|
}, {
|
|
2231
|
-
default:
|
|
2232
|
-
|
|
2204
|
+
default: p(() => [
|
|
2205
|
+
D(U(o(b).tCurd("export")), 1)
|
|
2233
2206
|
]),
|
|
2234
2207
|
_: 1
|
|
2235
2208
|
}, 8, ["loading", "size"])
|
|
@@ -2237,64 +2210,64 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2237
2210
|
]),
|
|
2238
2211
|
_: 1
|
|
2239
2212
|
}, 8, ["onCommand"])) : (u(), y("div", st, [
|
|
2240
|
-
|
|
2213
|
+
x(o(T), {
|
|
2241
2214
|
type: "warning",
|
|
2242
2215
|
loading: o(l).export.loading,
|
|
2243
|
-
size:
|
|
2244
|
-
onClick:
|
|
2216
|
+
size: e.option.size?.search,
|
|
2217
|
+
onClick: f[3] || (f[3] = (n) => o(l).export.run.start("all"))
|
|
2245
2218
|
}, {
|
|
2246
|
-
default:
|
|
2247
|
-
|
|
2219
|
+
default: p(() => [
|
|
2220
|
+
D(U(o(b).tCurd("export")), 1)
|
|
2248
2221
|
]),
|
|
2249
2222
|
_: 1
|
|
2250
2223
|
}, 8, ["loading", "size"])
|
|
2251
2224
|
]))
|
|
2252
2225
|
], 64)) : k("", !0),
|
|
2253
|
-
C(
|
|
2226
|
+
C(m.$slots, "tools-left")
|
|
2254
2227
|
]),
|
|
2255
|
-
|
|
2256
|
-
C(
|
|
2228
|
+
E("div", dt, [
|
|
2229
|
+
C(m.$slots, "tools-right"),
|
|
2257
2230
|
o(l).page.showTools ? (u(), h(o(ie), v({
|
|
2258
2231
|
key: 0,
|
|
2259
2232
|
"current-page": o(l).page.num,
|
|
2260
|
-
"onUpdate:currentPage":
|
|
2233
|
+
"onUpdate:currentPage": f[4] || (f[4] = (n) => o(l).page.num = n),
|
|
2261
2234
|
"page-size": o(l).page.size,
|
|
2262
|
-
"onUpdate:pageSize":
|
|
2235
|
+
"onUpdate:pageSize": f[5] || (f[5] = (n) => o(l).page.size = n),
|
|
2263
2236
|
background: "",
|
|
2264
2237
|
"page-sizes": o(l).page.sizeList,
|
|
2265
2238
|
"pager-count": o(l).page.pagerCount,
|
|
2266
2239
|
layout: o(l).page.layout,
|
|
2267
2240
|
total: o(l).page.total,
|
|
2268
|
-
size:
|
|
2241
|
+
size: e.option.size?.table,
|
|
2269
2242
|
onSizeChange: o(l).table.getList,
|
|
2270
2243
|
onCurrentChange: o(l).table.getList
|
|
2271
|
-
},
|
|
2272
|
-
|
|
2244
|
+
}, e.option.page?.pagination || {}, z(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0),
|
|
2245
|
+
e.option.tools?.refresh === void 0 || e.option.tools?.refresh ? (u(), y("div", {
|
|
2273
2246
|
key: 1,
|
|
2274
|
-
class:
|
|
2275
|
-
onClick:
|
|
2247
|
+
class: B(["refresh-btn", [e.option.size?.search]]),
|
|
2248
|
+
onClick: f[6] || (f[6] = //@ts-ignore
|
|
2276
2249
|
(...n) => o(l).table.getList && o(l).table.getList(...n))
|
|
2277
2250
|
}, [
|
|
2278
|
-
|
|
2251
|
+
x(Re)
|
|
2279
2252
|
], 2)) : k("", !0)
|
|
2280
2253
|
])
|
|
2281
2254
|
]),
|
|
2282
|
-
|
|
2283
|
-
class:
|
|
2255
|
+
E("div", {
|
|
2256
|
+
class: B(["fit-width relative form-box", [e.option.table?.fitHeight ? "col " : ""]])
|
|
2284
2257
|
}, [
|
|
2285
|
-
|
|
2286
|
-
class:
|
|
2258
|
+
E("div", {
|
|
2259
|
+
class: B(["column form-box-content", [e.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2287
2260
|
}, [
|
|
2288
2261
|
ke((u(), h(o(ye), v({
|
|
2289
2262
|
data: o(l).table.data,
|
|
2290
|
-
border:
|
|
2263
|
+
border: e.option.table?.border === void 0 ? !0 : e.option.table?.border,
|
|
2291
2264
|
onSelectionChange: o(l).table.selection.change,
|
|
2292
2265
|
onSortChange: o(l).table.sort.change,
|
|
2293
2266
|
"expand-row-keys": o(l).table.expand.rowKeys,
|
|
2294
2267
|
onExpandChange: o(l).table.expand.change
|
|
2295
|
-
},
|
|
2296
|
-
default:
|
|
2297
|
-
(typeof
|
|
2268
|
+
}, e.option.table, z(e.option.table?.on || {})), {
|
|
2269
|
+
default: p(() => [
|
|
2270
|
+
(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || o(i)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (u(), h(o(te), v({
|
|
2298
2271
|
key: 0,
|
|
2299
2272
|
type: "selection",
|
|
2300
2273
|
width: "40",
|
|
@@ -2302,105 +2275,105 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2302
2275
|
fixed: "left",
|
|
2303
2276
|
"show-overflow-tooltip": !1,
|
|
2304
2277
|
className: "cc1-form-selectable-column"
|
|
2305
|
-
}, typeof
|
|
2306
|
-
|
|
2278
|
+
}, typeof e.option.table?.selectable == "object" ? e.option.table?.selectable : {}, z(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.on || {} : {})), null, 16)) : k("", !0),
|
|
2279
|
+
x(Ge, {
|
|
2307
2280
|
conf: o(l),
|
|
2308
2281
|
columnList: o(l).table.column.list,
|
|
2309
|
-
option:
|
|
2282
|
+
option: e.option
|
|
2310
2283
|
}, oe({ _: 2 }, [
|
|
2311
|
-
|
|
2312
|
-
name:
|
|
2313
|
-
fn:
|
|
2314
|
-
C(
|
|
2284
|
+
M(m.$slots, (n, s) => ({
|
|
2285
|
+
name: s,
|
|
2286
|
+
fn: p((V) => [
|
|
2287
|
+
C(m.$slots, s, Ce(ve(V || {})))
|
|
2315
2288
|
])
|
|
2316
2289
|
}))
|
|
2317
2290
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2318
|
-
o(
|
|
2291
|
+
o(i)(e.option.table?.add) || o(i)(e.option.table?.update) || o(i)(e.option.table?.delete) || o(i)(e.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (u(), h(o(te), v({
|
|
2319
2292
|
key: 1,
|
|
2320
|
-
width: o(l).table.op.width(o(
|
|
2293
|
+
width: o(l).table.op.width(o(i)(e.option.table?.add), o(i)(e.option.table?.update), o(i)(e.option.table?.delete), o(i)(e.option.table?.view), m.$slots["table-op-left"], m.$slots["table-op-right"]),
|
|
2321
2294
|
align: "center",
|
|
2322
2295
|
fixed: "right"
|
|
2323
|
-
},
|
|
2324
|
-
header:
|
|
2325
|
-
C(
|
|
2326
|
-
|
|
2296
|
+
}, e.option.table?.operate), {
|
|
2297
|
+
header: p(() => [
|
|
2298
|
+
C(m.$slots, "table-header-op", {}, () => [
|
|
2299
|
+
D(U(o(b).tCurd("operation")), 1)
|
|
2327
2300
|
])
|
|
2328
2301
|
]),
|
|
2329
|
-
default:
|
|
2330
|
-
|
|
2331
|
-
size:
|
|
2302
|
+
default: p(({ row: n }) => [
|
|
2303
|
+
x(o(P), {
|
|
2304
|
+
size: e.option.size?.table
|
|
2332
2305
|
}, {
|
|
2333
|
-
default:
|
|
2334
|
-
C(
|
|
2335
|
-
o(l).update.type === o(
|
|
2336
|
-
|
|
2306
|
+
default: p(() => [
|
|
2307
|
+
C(m.$slots, "table-op-left", { row: n }),
|
|
2308
|
+
o(l).update.type === o(c).Update && e.option.table?.inlineEdit && o(l).update.form[a.option.table?.rowKey] === n[a.option.table?.rowKey] ? (u(), y($, { key: 0 }, [
|
|
2309
|
+
x(o(T), {
|
|
2337
2310
|
link: "",
|
|
2338
2311
|
type: "info",
|
|
2339
2312
|
onClick: o(l).update.close
|
|
2340
2313
|
}, {
|
|
2341
|
-
default:
|
|
2342
|
-
|
|
2314
|
+
default: p(() => [
|
|
2315
|
+
D(U(o(b).tCurd("cancel")), 1)
|
|
2343
2316
|
]),
|
|
2344
2317
|
_: 1
|
|
2345
2318
|
}, 8, ["onClick"]),
|
|
2346
|
-
|
|
2319
|
+
x(o(T), {
|
|
2347
2320
|
link: "",
|
|
2348
2321
|
type: "primary",
|
|
2349
2322
|
onClick: o(l).update.submit,
|
|
2350
2323
|
loading: o(l).update.loading
|
|
2351
2324
|
}, {
|
|
2352
|
-
default:
|
|
2353
|
-
|
|
2325
|
+
default: p(() => [
|
|
2326
|
+
D(U(o(b).tCurd("confirm")), 1)
|
|
2354
2327
|
]),
|
|
2355
2328
|
_: 1
|
|
2356
2329
|
}, 8, ["onClick", "loading"]),
|
|
2357
|
-
C(
|
|
2358
|
-
], 64)) : (u(), y(
|
|
2359
|
-
o(
|
|
2330
|
+
C(m.$slots, "table-op-edit-right", { row: n })
|
|
2331
|
+
], 64)) : (u(), y($, { key: 1 }, [
|
|
2332
|
+
o(i)(e.option.table?.add, n) ? (u(), h(o(T), {
|
|
2360
2333
|
key: 0,
|
|
2361
2334
|
link: "",
|
|
2362
2335
|
type: "primary",
|
|
2363
|
-
onClick: (
|
|
2336
|
+
onClick: (s) => o(l).update.open(o(c).Add, n)
|
|
2364
2337
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
|
|
2338
|
+
default: p(() => [
|
|
2339
|
+
D(U(o(b).tCurd("add")), 1)
|
|
2367
2340
|
]),
|
|
2368
|
-
_:
|
|
2369
|
-
},
|
|
2370
|
-
o(
|
|
2341
|
+
_: 1
|
|
2342
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2343
|
+
o(i)(e.option.table?.view, n) ? (u(), h(o(T), {
|
|
2371
2344
|
key: 1,
|
|
2372
2345
|
link: "",
|
|
2373
2346
|
type: "primary",
|
|
2374
|
-
onClick: (
|
|
2347
|
+
onClick: (s) => o(l).update.open(o(c).View, n)
|
|
2375
2348
|
}, {
|
|
2376
|
-
default:
|
|
2377
|
-
|
|
2349
|
+
default: p(() => [
|
|
2350
|
+
D(U(o(b).tCurd("view")), 1)
|
|
2378
2351
|
]),
|
|
2379
|
-
_:
|
|
2380
|
-
},
|
|
2381
|
-
o(
|
|
2352
|
+
_: 1
|
|
2353
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2354
|
+
o(i)(e.option.table?.update, n) ? (u(), h(o(T), {
|
|
2382
2355
|
key: 2,
|
|
2383
2356
|
link: "",
|
|
2384
2357
|
type: "warning",
|
|
2385
|
-
onClick: (
|
|
2358
|
+
onClick: (s) => o(l).update.open(o(c).Update, n)
|
|
2386
2359
|
}, {
|
|
2387
|
-
default:
|
|
2388
|
-
|
|
2360
|
+
default: p(() => [
|
|
2361
|
+
D(U(o(b).tCurd("edit")), 1)
|
|
2389
2362
|
]),
|
|
2390
|
-
_:
|
|
2391
|
-
},
|
|
2392
|
-
o(
|
|
2363
|
+
_: 1
|
|
2364
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2365
|
+
o(i)(e.option.table?.delete, n) ? (u(), h(o(T), {
|
|
2393
2366
|
key: 3,
|
|
2394
2367
|
link: "",
|
|
2395
2368
|
type: "danger",
|
|
2396
|
-
onClick: (
|
|
2369
|
+
onClick: (s) => o(l).remove.open([n])
|
|
2397
2370
|
}, {
|
|
2398
|
-
default:
|
|
2399
|
-
|
|
2371
|
+
default: p(() => [
|
|
2372
|
+
D(U(o(b).tCurd("delete")), 1)
|
|
2400
2373
|
]),
|
|
2401
|
-
_:
|
|
2402
|
-
},
|
|
2403
|
-
C(
|
|
2374
|
+
_: 1
|
|
2375
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2376
|
+
C(m.$slots, "table-op-right", { row: n })
|
|
2404
2377
|
], 64))
|
|
2405
2378
|
]),
|
|
2406
2379
|
_: 2
|
|
@@ -2415,54 +2388,54 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2415
2388
|
])
|
|
2416
2389
|
], 2)
|
|
2417
2390
|
], 2),
|
|
2418
|
-
|
|
2419
|
-
(
|
|
2391
|
+
E("div", ut, [
|
|
2392
|
+
(e.option.page?.show === void 0 || e.option.page?.show) && !o(l).page.showTools ? (u(), h(o(ie), v({
|
|
2420
2393
|
key: 0,
|
|
2421
2394
|
"current-page": o(l).page.num,
|
|
2422
|
-
"onUpdate:currentPage":
|
|
2395
|
+
"onUpdate:currentPage": f[7] || (f[7] = (n) => o(l).page.num = n),
|
|
2423
2396
|
"page-size": o(l).page.size,
|
|
2424
|
-
"onUpdate:pageSize":
|
|
2397
|
+
"onUpdate:pageSize": f[8] || (f[8] = (n) => o(l).page.size = n),
|
|
2425
2398
|
background: "",
|
|
2426
2399
|
"page-sizes": o(l).page.sizeList,
|
|
2427
2400
|
"pager-count": o(l).page.pagerCount,
|
|
2428
2401
|
layout: o(l).page.layout,
|
|
2429
2402
|
total: o(l).page.total,
|
|
2430
|
-
size:
|
|
2403
|
+
size: e.option.size?.table,
|
|
2431
2404
|
onSizeChange: o(l).table.getList,
|
|
2432
2405
|
onCurrentChange: o(l).table.getList
|
|
2433
|
-
},
|
|
2406
|
+
}, e.option.page?.pagination || {}, z(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0)
|
|
2434
2407
|
])
|
|
2435
2408
|
], 2),
|
|
2436
|
-
C(
|
|
2409
|
+
C(m.$slots, "box-right")
|
|
2437
2410
|
], 2),
|
|
2438
|
-
|
|
2411
|
+
x(o(ee), v({
|
|
2439
2412
|
modelValue: o(l).update.show,
|
|
2440
|
-
"onUpdate:modelValue":
|
|
2413
|
+
"onUpdate:modelValue": f[9] || (f[9] = (n) => o(l).update.show = n),
|
|
2441
2414
|
title: o(l).update.title,
|
|
2442
2415
|
"before-close": o(l).update.close
|
|
2443
|
-
},
|
|
2444
|
-
footer:
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
size:
|
|
2416
|
+
}, e.option.dialog), {
|
|
2417
|
+
footer: p(() => [
|
|
2418
|
+
E("span", ct, [
|
|
2419
|
+
x(o(P), {
|
|
2420
|
+
size: e.option.size?.form
|
|
2448
2421
|
}, {
|
|
2449
|
-
default:
|
|
2450
|
-
|
|
2422
|
+
default: p(() => [
|
|
2423
|
+
x(o(T), {
|
|
2451
2424
|
onClick: o(l).update.close
|
|
2452
2425
|
}, {
|
|
2453
|
-
default:
|
|
2454
|
-
|
|
2426
|
+
default: p(() => [
|
|
2427
|
+
D(U(o(b).tCurd("close")), 1)
|
|
2455
2428
|
]),
|
|
2456
2429
|
_: 1
|
|
2457
2430
|
}, 8, ["onClick"]),
|
|
2458
|
-
o(l).update.type !== o(
|
|
2431
|
+
o(l).update.type !== o(c).View ? (u(), h(o(T), {
|
|
2459
2432
|
key: 0,
|
|
2460
2433
|
type: "primary",
|
|
2461
2434
|
onClick: o(l).update.submit,
|
|
2462
2435
|
loading: o(l).update.loading
|
|
2463
2436
|
}, {
|
|
2464
|
-
default:
|
|
2465
|
-
|
|
2437
|
+
default: p(() => [
|
|
2438
|
+
D(U(o(b).tCurd("submit")), 1)
|
|
2466
2439
|
]),
|
|
2467
2440
|
_: 1
|
|
2468
2441
|
}, 8, ["onClick", "loading"])) : k("", !0)
|
|
@@ -2471,54 +2444,54 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2471
2444
|
}, 8, ["size"])
|
|
2472
2445
|
])
|
|
2473
2446
|
]),
|
|
2474
|
-
default:
|
|
2475
|
-
|
|
2447
|
+
default: p(() => [
|
|
2448
|
+
x(o(P), {
|
|
2476
2449
|
ref_key: "ruleFormRef",
|
|
2477
|
-
ref:
|
|
2450
|
+
ref: r,
|
|
2478
2451
|
model: o(l).update.form,
|
|
2479
2452
|
rules: o(l).update.rules,
|
|
2480
|
-
size:
|
|
2453
|
+
size: e.option.size?.form
|
|
2481
2454
|
}, {
|
|
2482
|
-
default:
|
|
2483
|
-
o(l).update.showContent ? (u(!0), y(
|
|
2484
|
-
o(
|
|
2455
|
+
default: p(() => [
|
|
2456
|
+
o(l).update.showContent ? (u(!0), y($, { key: 0 }, M(o(l).update.formColumn, (n) => (u(), y($, null, [
|
|
2457
|
+
o(i)(
|
|
2485
2458
|
(() => {
|
|
2486
|
-
const
|
|
2487
|
-
w?.item?.children ? V(w.item.children) :
|
|
2459
|
+
const s = [], V = (w) => {
|
|
2460
|
+
w?.item?.children ? V(w.item.children) : s.push(...w.map((F) => F.item?.show?.form));
|
|
2488
2461
|
};
|
|
2489
|
-
return V(n),
|
|
2462
|
+
return V(n), s;
|
|
2490
2463
|
})(),
|
|
2491
2464
|
o(l).update.form,
|
|
2492
2465
|
o(l).update.type
|
|
2493
2466
|
) ? (u(), y("div", {
|
|
2494
2467
|
key: 0,
|
|
2495
|
-
class:
|
|
2496
|
-
stripe:
|
|
2468
|
+
class: B(["row curd-row", {
|
|
2469
|
+
stripe: e.option.form?.stripe === void 0 ? !0 : e.option.form?.stripe
|
|
2497
2470
|
}])
|
|
2498
2471
|
}, [
|
|
2499
|
-
C(
|
|
2472
|
+
C(m.$slots, "form-start", {
|
|
2500
2473
|
row: o(l).update.form
|
|
2501
2474
|
}),
|
|
2502
|
-
(u(!0), y(
|
|
2503
|
-
o(
|
|
2475
|
+
(u(!0), y($, null, M(n, (s) => (u(), y($, null, [
|
|
2476
|
+
o(i)(s.item.show?.form, o(l).update.form, o(l).update.type) ? (u(), y("div", {
|
|
2504
2477
|
key: 0,
|
|
2505
|
-
class:
|
|
2478
|
+
class: B([s.item.form.span > 0 ? `col-${o(l).getColumnSpan(s, n)}` : "col", `form-item-col-${s.item.key}`])
|
|
2506
2479
|
}, [
|
|
2507
|
-
(u(!0), y(
|
|
2480
|
+
(u(!0), y($, null, M(s.item.children ? s.children : [s], (V) => (u(), h(et, {
|
|
2508
2481
|
key: V.item.key,
|
|
2509
2482
|
conf: o(l),
|
|
2510
2483
|
item: V
|
|
2511
2484
|
}, oe({ _: 2 }, [
|
|
2512
|
-
|
|
2513
|
-
name:
|
|
2514
|
-
fn:
|
|
2515
|
-
C(
|
|
2485
|
+
M(m.$slots, (w, F) => ({
|
|
2486
|
+
name: F,
|
|
2487
|
+
fn: p((L) => [
|
|
2488
|
+
C(m.$slots, F, v({ ref_for: !0 }, L || {}))
|
|
2516
2489
|
])
|
|
2517
2490
|
}))
|
|
2518
2491
|
]), 1032, ["conf", "item"]))), 128))
|
|
2519
2492
|
], 2)) : k("", !0)
|
|
2520
2493
|
], 64))), 256)),
|
|
2521
|
-
C(
|
|
2494
|
+
C(m.$slots, "form-end", {
|
|
2522
2495
|
row: o(l).update.form
|
|
2523
2496
|
})
|
|
2524
2497
|
], 2)) : k("", !0)
|
|
@@ -2529,33 +2502,33 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2529
2502
|
]),
|
|
2530
2503
|
_: 3
|
|
2531
2504
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2532
|
-
|
|
2505
|
+
x(o(ee), {
|
|
2533
2506
|
modelValue: o(l).remove.show,
|
|
2534
|
-
"onUpdate:modelValue":
|
|
2507
|
+
"onUpdate:modelValue": f[10] || (f[10] = (n) => o(l).remove.show = n),
|
|
2535
2508
|
title: o(l).remove.title,
|
|
2536
2509
|
"close-on-click-modal": !1
|
|
2537
2510
|
}, {
|
|
2538
|
-
footer:
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
size:
|
|
2511
|
+
footer: p(() => [
|
|
2512
|
+
E("span", ft, [
|
|
2513
|
+
x(o(P), {
|
|
2514
|
+
size: e.option.size?.form
|
|
2542
2515
|
}, {
|
|
2543
|
-
default:
|
|
2544
|
-
|
|
2516
|
+
default: p(() => [
|
|
2517
|
+
x(o(T), {
|
|
2545
2518
|
onClick: o(l).remove.close
|
|
2546
2519
|
}, {
|
|
2547
|
-
default:
|
|
2548
|
-
|
|
2520
|
+
default: p(() => [
|
|
2521
|
+
D(U(o(b).tCurd("close")), 1)
|
|
2549
2522
|
]),
|
|
2550
2523
|
_: 1
|
|
2551
2524
|
}, 8, ["onClick"]),
|
|
2552
|
-
|
|
2525
|
+
x(o(T), {
|
|
2553
2526
|
type: "danger",
|
|
2554
2527
|
onClick: o(l).remove.submit,
|
|
2555
2528
|
loading: o(l).remove.loading
|
|
2556
2529
|
}, {
|
|
2557
|
-
default:
|
|
2558
|
-
|
|
2530
|
+
default: p(() => [
|
|
2531
|
+
D(U(o(b).tCurd("confirmDelete")), 1)
|
|
2559
2532
|
]),
|
|
2560
2533
|
_: 1
|
|
2561
2534
|
}, 8, ["onClick", "loading"])
|
|
@@ -2564,15 +2537,15 @@ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-cen
|
|
|
2564
2537
|
}, 8, ["size"])
|
|
2565
2538
|
])
|
|
2566
2539
|
]),
|
|
2567
|
-
default:
|
|
2568
|
-
|
|
2540
|
+
default: p(() => [
|
|
2541
|
+
E("div", null, U(o(b).tCurd("confirmDeleteMessage", o(l).remove.items.length)), 1)
|
|
2569
2542
|
]),
|
|
2570
2543
|
_: 1
|
|
2571
2544
|
}, 8, ["modelValue", "title"]),
|
|
2572
|
-
|
|
2545
|
+
x(Le, {
|
|
2573
2546
|
ref_key: "switchConfirmRef",
|
|
2574
|
-
ref:
|
|
2575
|
-
size:
|
|
2547
|
+
ref: t,
|
|
2548
|
+
size: e.option.size?.form
|
|
2576
2549
|
}, null, 8, ["size"])
|
|
2577
2550
|
], 2);
|
|
2578
2551
|
};
|
|
@@ -2585,64 +2558,64 @@ class bt {
|
|
|
2585
2558
|
* @param href - 文件的远程地址
|
|
2586
2559
|
* @param name - 下载后的文件名,默认 `'download.png'`
|
|
2587
2560
|
*/
|
|
2588
|
-
static async download(
|
|
2589
|
-
const
|
|
2590
|
-
|
|
2561
|
+
static async download(d, c = "download.png") {
|
|
2562
|
+
const a = document.createElement("a");
|
|
2563
|
+
a.style.display = "none", a.href = d, a.setAttribute("download", c), typeof a.download > "u" && a.setAttribute("target", "_blank"), document.body.appendChild(a), a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(d);
|
|
2591
2564
|
}
|
|
2592
2565
|
/**
|
|
2593
2566
|
* 将json对象或者json数组导出为json文件保存
|
|
2594
2567
|
* @param data
|
|
2595
2568
|
* @param name
|
|
2596
2569
|
*/
|
|
2597
|
-
static exportJSONFile = (
|
|
2598
|
-
const
|
|
2599
|
-
l.href =
|
|
2570
|
+
static exportJSONFile = (d, c) => {
|
|
2571
|
+
const a = new Blob([JSON.stringify(d)], { type: "application/json" }), i = URL.createObjectURL(a), l = document.createElement("a");
|
|
2572
|
+
l.href = i, l.download = `${c || "config"}.json`, l.click();
|
|
2600
2573
|
};
|
|
2601
2574
|
/**
|
|
2602
2575
|
* 导入文件内容,默认为json
|
|
2603
2576
|
* @param param
|
|
2604
2577
|
* @returns
|
|
2605
2578
|
*/
|
|
2606
|
-
static importFile = async (
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
const l =
|
|
2610
|
-
|
|
2611
|
-
const
|
|
2612
|
-
if (!
|
|
2613
|
-
|
|
2579
|
+
static importFile = async (d) => new Promise((c, a) => {
|
|
2580
|
+
const i = document.createElement("input");
|
|
2581
|
+
i.type = "file";
|
|
2582
|
+
const l = d?.accept || ".json";
|
|
2583
|
+
i.accept = l, i.style.display = "none", i.onchange = (t) => {
|
|
2584
|
+
const r = t.target.files[0];
|
|
2585
|
+
if (!r) {
|
|
2586
|
+
S.fail("未选择文件"), a("未选择文件");
|
|
2614
2587
|
return;
|
|
2615
2588
|
}
|
|
2616
|
-
const
|
|
2617
|
-
|
|
2618
|
-
const g = l == ".json" ? JSON.parse(
|
|
2619
|
-
|
|
2620
|
-
},
|
|
2621
|
-
|
|
2622
|
-
},
|
|
2623
|
-
}, document.body.appendChild(
|
|
2589
|
+
const m = new FileReader();
|
|
2590
|
+
m.onload = async (f) => {
|
|
2591
|
+
const g = l == ".json" ? JSON.parse(f.target.result) : f.target.result;
|
|
2592
|
+
c(g);
|
|
2593
|
+
}, m.onerror = () => {
|
|
2594
|
+
S.fail("文件读取失败"), a("文件读取失败");
|
|
2595
|
+
}, m.readAsText(r), document.body.removeChild(i);
|
|
2596
|
+
}, document.body.appendChild(i), i.click();
|
|
2624
2597
|
});
|
|
2625
2598
|
}
|
|
2626
|
-
const
|
|
2627
|
-
if (
|
|
2628
|
-
|
|
2629
|
-
for (const
|
|
2630
|
-
|
|
2599
|
+
const pt = (e, d) => {
|
|
2600
|
+
if (e.component("TCurd", mt), e.component("TFormList", ne), e.component("TColumn", Fe), d?.customComponent) {
|
|
2601
|
+
A.customComponent = d.customComponent;
|
|
2602
|
+
for (const c in d.customComponent)
|
|
2603
|
+
e.component(c, d.customComponent[c]);
|
|
2631
2604
|
}
|
|
2632
2605
|
}, wt = {
|
|
2633
|
-
install:
|
|
2606
|
+
install: pt
|
|
2634
2607
|
};
|
|
2635
2608
|
export {
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2609
|
+
R as ArrUtil,
|
|
2610
|
+
Te as ExcelUtil,
|
|
2611
|
+
Fe as TColumn,
|
|
2612
|
+
mt as TCurd,
|
|
2640
2613
|
bt as TFile,
|
|
2641
|
-
|
|
2642
|
-
|
|
2614
|
+
A as TForm,
|
|
2615
|
+
O as TFormConfig,
|
|
2643
2616
|
b as TFormI18n,
|
|
2644
2617
|
ne as TFormList,
|
|
2645
|
-
|
|
2618
|
+
S as TSys,
|
|
2646
2619
|
wt as default,
|
|
2647
|
-
|
|
2620
|
+
pt as install
|
|
2648
2621
|
};
|