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