cc1-form 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cc1-form.js +787 -754
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/text.vue.d.ts +6 -0
- package/dist/components/TCurd/index.d.ts +15 -1
- package/dist/components/TCurd/index.vue.d.ts +47 -17
- package/dist/components/TCurd/indexType.d.ts +28 -1
- package/dist/utils/TFormConfig.d.ts +4 -0
- package/dist/utils/TFormI18n.d.ts +2 -0
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElMessage as ce, ElLoading as me, ElForm as
|
|
1
|
+
import { ElMessage as ce, ElLoading as me, ElForm as q, ElFormItem as te, ElInput as x, ElSwitch as Z, ElSelect as G, ElOption as K, ElRadioGroup as le, ElRadio as ne, ElTreeSelect as ue, ElDatePicker as ie, ElDialog as ae, ElButton as L, ElTableColumn as ee, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as oe, ElPagination as de, ElTable as ye } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as
|
|
3
|
+
import { defineComponent as J, reactive as re, onMounted as fe, resolveComponent as _, createElementBlock as b, createCommentVNode as v, openBlock as u, renderSlot as C, createVNode as D, withCtx as y, createTextVNode as U, Fragment as $, renderList as A, createBlock as g, normalizeClass as I, normalizeStyle as pe, ref as N, unref as a, createElementVNode as E, mergeProps as V, toHandlers as z, resolveDynamicComponent as W, nextTick as be, toDisplayString as O, computed as we, getCurrentInstance as ke, createSlots as Q, withModifiers as ve, resolveDirective as Ce, withDirectives as Ve, normalizeProps as ze, guardReactiveProps as $e } from "vue";
|
|
4
4
|
class M {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
@@ -26,13 +26,13 @@ class M {
|
|
|
26
26
|
* @param data 数据
|
|
27
27
|
* @returns 是否显示
|
|
28
28
|
*/
|
|
29
|
-
static isFun = (
|
|
29
|
+
static isFun = (o, ...p) => Array.isArray(o) ? o.some((s) => typeof s == "function" ? s(...p) : s) : typeof o == "function" ? o(...p) : o;
|
|
30
30
|
/**
|
|
31
31
|
* 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
|
|
32
32
|
*/
|
|
33
33
|
static getRouterParams = () => {
|
|
34
|
-
const
|
|
35
|
-
return Object.keys(
|
|
34
|
+
const o = this.router.currentRoute.value.query || {}, p = this.router.currentRoute.value.params || {};
|
|
35
|
+
return Object.keys(o).length ? o : Object.keys(p).length ? p : {};
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* 模块赋值
|
|
@@ -42,10 +42,10 @@ class M {
|
|
|
42
42
|
* 加载模块
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
|
-
static loadModule = async (
|
|
46
|
-
if (!M.moduleObj[
|
|
47
|
-
throw new Error(`模块${
|
|
48
|
-
const p = await M.moduleObj[
|
|
45
|
+
static loadModule = async (o) => {
|
|
46
|
+
if (!M.moduleObj[o])
|
|
47
|
+
throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
|
|
48
|
+
const p = await M.moduleObj[o]();
|
|
49
49
|
return p.default ?? p;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -62,19 +62,19 @@ class M {
|
|
|
62
62
|
* @param type 消息类型
|
|
63
63
|
* @param options 其他选项
|
|
64
64
|
*/
|
|
65
|
-
static showMessage(
|
|
65
|
+
static showMessage(o, p, s = {}) {
|
|
66
66
|
const l = Date.now();
|
|
67
|
-
if (!this.tipMessages[
|
|
68
|
-
this.tipMessages[
|
|
67
|
+
if (!this.tipMessages[o] || l - this.tipMessages[o] > this.tipMessagesGap) {
|
|
68
|
+
this.tipMessages[o] = l;
|
|
69
69
|
const t = Object.assign(
|
|
70
70
|
{
|
|
71
|
-
message:
|
|
71
|
+
message: o,
|
|
72
72
|
type: p
|
|
73
73
|
},
|
|
74
74
|
s
|
|
75
75
|
);
|
|
76
76
|
ce(t), setTimeout(() => {
|
|
77
|
-
delete this.tipMessages[
|
|
77
|
+
delete this.tipMessages[o];
|
|
78
78
|
}, this.tipMessagesGap);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -83,16 +83,16 @@ class M {
|
|
|
83
83
|
* @param content
|
|
84
84
|
* @param options
|
|
85
85
|
*/
|
|
86
|
-
static fail = (
|
|
87
|
-
this.showMessage(
|
|
86
|
+
static fail = (o, p = {}) => {
|
|
87
|
+
this.showMessage(o, "error", p);
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* 成功提示
|
|
91
91
|
* @param content
|
|
92
92
|
* @param options
|
|
93
93
|
*/
|
|
94
|
-
static success = (
|
|
95
|
-
this.showMessage(
|
|
94
|
+
static success = (o, p = {}) => {
|
|
95
|
+
this.showMessage(o, "success", p);
|
|
96
96
|
};
|
|
97
97
|
static loadingObj = null;
|
|
98
98
|
static loadingTimer = null;
|
|
@@ -101,9 +101,9 @@ class M {
|
|
|
101
101
|
* @param show
|
|
102
102
|
* @param text
|
|
103
103
|
*/
|
|
104
|
-
static loading = (
|
|
104
|
+
static loading = (o = !0, p = "Loading...") => {
|
|
105
105
|
Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
|
|
106
|
-
|
|
106
|
+
o ? this.loadingObj = me.service({
|
|
107
107
|
lock: !0,
|
|
108
108
|
text: p,
|
|
109
109
|
background: "rgba(0, 0, 0, 0.3)"
|
|
@@ -115,34 +115,34 @@ class M {
|
|
|
115
115
|
* @param url 地址
|
|
116
116
|
* @param isCenter 是否居中
|
|
117
117
|
*/
|
|
118
|
-
static openUrl = (
|
|
118
|
+
static openUrl = (o, p = !0) => {
|
|
119
119
|
if (p) {
|
|
120
120
|
let s = screen.width / 2 - 500, l = screen.height / 2 - 800 / 2 - 30;
|
|
121
121
|
window.open(
|
|
122
|
-
|
|
122
|
+
o,
|
|
123
123
|
"_blank",
|
|
124
124
|
"toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + l + ", left=" + s
|
|
125
125
|
);
|
|
126
126
|
} else
|
|
127
|
-
window.open(
|
|
127
|
+
window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
|
|
128
128
|
};
|
|
129
129
|
/**
|
|
130
130
|
* 根据dom id截图并返回图片数据
|
|
131
131
|
* @param param
|
|
132
132
|
* @returns
|
|
133
133
|
*/
|
|
134
|
-
static getImgPic = (
|
|
135
|
-
let l = document.getElementById(
|
|
134
|
+
static getImgPic = (o) => new Promise(async (p, s) => {
|
|
135
|
+
let l = document.getElementById(o.id);
|
|
136
136
|
const t = await M.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
138
|
t(l, {
|
|
139
139
|
logging: !1,
|
|
140
140
|
allowTaint: !0,
|
|
141
141
|
scale: window.devicePixelRatio,
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
144
|
-
windowWidth:
|
|
145
|
-
windowHeight:
|
|
142
|
+
width: o.windowWidth,
|
|
143
|
+
height: o.windowHeight,
|
|
144
|
+
windowWidth: o.windowWidth,
|
|
145
|
+
windowHeight: o.windowHeight,
|
|
146
146
|
useCORS: !0,
|
|
147
147
|
backgroundColor: "#ffffff00"
|
|
148
148
|
}).then(function(e) {
|
|
@@ -154,7 +154,7 @@ class M {
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class T {
|
|
158
158
|
/**
|
|
159
159
|
* 全局配置对象
|
|
160
160
|
*/
|
|
@@ -303,6 +303,10 @@ class A {
|
|
|
303
303
|
},
|
|
304
304
|
/** 表格配置 */
|
|
305
305
|
table: {
|
|
306
|
+
/**
|
|
307
|
+
* 是否显示序号-默认不显示
|
|
308
|
+
*/
|
|
309
|
+
index: !1,
|
|
306
310
|
/** 表头标签宽度 默认100px */
|
|
307
311
|
labelWidth: "100px",
|
|
308
312
|
/** 表格组件大小 - 默认default */
|
|
@@ -511,11 +515,11 @@ class A {
|
|
|
511
515
|
*
|
|
512
516
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
513
517
|
*/
|
|
514
|
-
static setConfig = (
|
|
515
|
-
|
|
518
|
+
static setConfig = (o) => {
|
|
519
|
+
T.config = ObjectUtil.deepMerge(T.config, o);
|
|
516
520
|
};
|
|
517
521
|
}
|
|
518
|
-
class
|
|
522
|
+
class j {
|
|
519
523
|
/**
|
|
520
524
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
521
525
|
*
|
|
@@ -533,8 +537,8 @@ class B {
|
|
|
533
537
|
* @param field - 字段的 key 值
|
|
534
538
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
535
539
|
*/
|
|
536
|
-
static findOptions = (
|
|
537
|
-
const s =
|
|
540
|
+
static findOptions = (o, p) => {
|
|
541
|
+
const s = o.column.find((t) => t.key === p), l = (t) => t.replace(/-([a-z])/g, (e, r) => r.toUpperCase());
|
|
538
542
|
if (s)
|
|
539
543
|
return s.options[l(s.type)];
|
|
540
544
|
};
|
|
@@ -554,8 +558,8 @@ class B {
|
|
|
554
558
|
}))
|
|
555
559
|
)
|
|
556
560
|
*/
|
|
557
|
-
static setOptionsData = (
|
|
558
|
-
const l =
|
|
561
|
+
static setOptionsData = (o, p, s) => {
|
|
562
|
+
const l = j.findOptions(o, p);
|
|
559
563
|
l && (l.data = s);
|
|
560
564
|
};
|
|
561
565
|
static form = {
|
|
@@ -567,14 +571,14 @@ class B {
|
|
|
567
571
|
* @param treeData 树形数据
|
|
568
572
|
* @param option 组件配置
|
|
569
573
|
*/
|
|
570
|
-
parentId: (
|
|
571
|
-
const t =
|
|
572
|
-
|
|
574
|
+
parentId: (o, p, s, l) => {
|
|
575
|
+
const t = T.config.table.rowKey;
|
|
576
|
+
o ? p.type === M.EDialog.Add ? (p.form.parentId = o[t], p.form.sort = o.children.length + 1) : p.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), j.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: s }]);
|
|
573
577
|
}
|
|
574
578
|
}
|
|
575
579
|
};
|
|
576
580
|
}
|
|
577
|
-
const
|
|
581
|
+
const Ue = {
|
|
578
582
|
search: "搜索",
|
|
579
583
|
add: "新增",
|
|
580
584
|
edit: "编辑",
|
|
@@ -593,6 +597,7 @@ const $e = {
|
|
|
593
597
|
cancel: "取消",
|
|
594
598
|
submit: "提交",
|
|
595
599
|
confirm: "确认",
|
|
600
|
+
deleteTitle: "删除提示",
|
|
596
601
|
confirmDelete: "确认删除",
|
|
597
602
|
confirmDeleteMessage: "确认要删除【{count}】条数据吗?",
|
|
598
603
|
placeholderInput: "请输入",
|
|
@@ -611,24 +616,24 @@ const $e = {
|
|
|
611
616
|
};
|
|
612
617
|
class w {
|
|
613
618
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
614
|
-
static t(
|
|
615
|
-
if (typeof
|
|
616
|
-
return
|
|
617
|
-
|
|
619
|
+
static t(o, ...p) {
|
|
620
|
+
if (typeof o == "function")
|
|
621
|
+
return o(...p);
|
|
622
|
+
o = String(o);
|
|
618
623
|
let s = 0;
|
|
619
|
-
return
|
|
624
|
+
return o.replace(/{([^}]+)}/g, (l, t) => s < p.length ? String(p[s++]) : `{${t}}`);
|
|
620
625
|
}
|
|
621
|
-
static setI18n = (
|
|
622
|
-
w.curd = ObjectUtil.deepMerge(w.curd,
|
|
626
|
+
static setI18n = (o) => {
|
|
627
|
+
w.curd = ObjectUtil.deepMerge(w.curd, o);
|
|
623
628
|
};
|
|
624
629
|
/** 解析curd国际化值 */
|
|
625
|
-
static tCurd(
|
|
626
|
-
return this.t(this.curd[
|
|
630
|
+
static tCurd(o, ...p) {
|
|
631
|
+
return this.t(this.curd[o], ...p);
|
|
627
632
|
}
|
|
628
633
|
/** curd表单 */
|
|
629
|
-
static curd =
|
|
634
|
+
static curd = Ue;
|
|
630
635
|
}
|
|
631
|
-
class
|
|
636
|
+
class P {
|
|
632
637
|
/**
|
|
633
638
|
* ID 生成函数,默认使用 `StrUtil.uuid()`,可覆盖为自定义实现
|
|
634
639
|
*/
|
|
@@ -638,14 +643,14 @@ class H {
|
|
|
638
643
|
* @param field 字段名
|
|
639
644
|
* @param row 行数据
|
|
640
645
|
*/
|
|
641
|
-
static setId = (
|
|
642
|
-
p[
|
|
643
|
-
const l =
|
|
644
|
-
p[
|
|
646
|
+
static setId = (o, p, s) => {
|
|
647
|
+
p[o] || (p[o] = []);
|
|
648
|
+
const l = T.config.table.rowKey;
|
|
649
|
+
p[o].forEach((t) => {
|
|
645
650
|
s.forEach((e) => {
|
|
646
651
|
let r = e.default ?? "";
|
|
647
652
|
e.type === "number" && (r = e.default ?? 0), e.type === "boolean" && (r = e.default ?? !1), e.type === "time" && (r = e.default ?? /* @__PURE__ */ new Date()), t[e.value] === void 0 && (t[e.value] = r);
|
|
648
|
-
}), t[l] || (t[l] =
|
|
653
|
+
}), t[l] || (t[l] = P.getIdFun());
|
|
649
654
|
});
|
|
650
655
|
};
|
|
651
656
|
/**
|
|
@@ -655,17 +660,17 @@ class H {
|
|
|
655
660
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
656
661
|
* @param callback 回调函数
|
|
657
662
|
*/
|
|
658
|
-
static add = (
|
|
663
|
+
static add = (o, p, s, l) => {
|
|
659
664
|
const t = JSONUtil.cp(s);
|
|
660
|
-
|
|
661
|
-
const e =
|
|
662
|
-
p[
|
|
665
|
+
P.setId(o, p, s);
|
|
666
|
+
const e = T.config.table.rowKey;
|
|
667
|
+
p[o].push(
|
|
663
668
|
t.reduce(
|
|
664
669
|
(r, d) => {
|
|
665
670
|
let m = d.default ?? "";
|
|
666
671
|
return d.type === "number" && (m = d.default ?? 0), d.type === "boolean" && (m = d.default ?? !1), d.type === "time" && (m = d.default ?? /* @__PURE__ */ new Date()), r[d.value] = m, r;
|
|
667
672
|
},
|
|
668
|
-
{ [e]:
|
|
673
|
+
{ [e]: P.getIdFun() }
|
|
669
674
|
)
|
|
670
675
|
), l?.(p);
|
|
671
676
|
};
|
|
@@ -676,9 +681,9 @@ class H {
|
|
|
676
681
|
* @param item 元素-如:{_id:''}
|
|
677
682
|
* @param callback 回调函数
|
|
678
683
|
*/
|
|
679
|
-
static remove = (
|
|
680
|
-
const t =
|
|
681
|
-
p[
|
|
684
|
+
static remove = (o, p, s, l) => {
|
|
685
|
+
const t = T.config.table.rowKey;
|
|
686
|
+
p[o] = p[o].filter((e) => e[t] !== s[t]), l?.(p);
|
|
682
687
|
};
|
|
683
688
|
/**
|
|
684
689
|
* 获取没有id的数据
|
|
@@ -686,21 +691,21 @@ class H {
|
|
|
686
691
|
* @param childernField 子级字段-如:list、children
|
|
687
692
|
* @returns 没有id的数据
|
|
688
693
|
*/
|
|
689
|
-
static getNoIdData = (
|
|
690
|
-
const s = JSONUtil.cp(
|
|
694
|
+
static getNoIdData = (o, p) => {
|
|
695
|
+
const s = JSONUtil.cp(o), l = T.config.table.rowKey;
|
|
691
696
|
return s.forEach((t) => {
|
|
692
|
-
t[l] && delete t[l], p && t[p] &&
|
|
697
|
+
t[l] && delete t[l], p && t[p] && P.getNoIdData(t[p], p);
|
|
693
698
|
}), s;
|
|
694
699
|
};
|
|
695
700
|
}
|
|
696
|
-
const
|
|
701
|
+
const De = {
|
|
697
702
|
key: 0,
|
|
698
703
|
class: "column curd-form-com-list",
|
|
699
704
|
style: { width: "100%", gap: "10px" }
|
|
700
|
-
},
|
|
705
|
+
}, Ee = { key: 0 }, Oe = {
|
|
701
706
|
class: "row items-center",
|
|
702
707
|
style: { gap: "10px", width: "100%" }
|
|
703
|
-
},
|
|
708
|
+
}, Se = { key: 1 }, se = /* @__PURE__ */ J({
|
|
704
709
|
__name: "list",
|
|
705
710
|
props: {
|
|
706
711
|
row: {
|
|
@@ -738,33 +743,33 @@ const Ue = {
|
|
|
738
743
|
}
|
|
739
744
|
},
|
|
740
745
|
emits: ["change"],
|
|
741
|
-
setup(
|
|
742
|
-
const p =
|
|
746
|
+
setup(n, { emit: o }) {
|
|
747
|
+
const p = n, s = re({
|
|
743
748
|
show: !1,
|
|
744
749
|
add: (t, e, r) => {
|
|
745
|
-
|
|
750
|
+
P.add(t, e, r, () => {
|
|
746
751
|
l("change");
|
|
747
752
|
});
|
|
748
753
|
},
|
|
749
754
|
remove: (t, e, r) => {
|
|
750
|
-
|
|
755
|
+
P.remove(t, e, r, () => {
|
|
751
756
|
l("change");
|
|
752
757
|
});
|
|
753
758
|
}
|
|
754
759
|
});
|
|
755
760
|
fe(() => {
|
|
756
|
-
|
|
761
|
+
P.setId(p.field, p.row, p.itemFields), s.show = !0;
|
|
757
762
|
});
|
|
758
|
-
const l =
|
|
763
|
+
const l = o;
|
|
759
764
|
return (t, e) => {
|
|
760
765
|
const r = _("el-button"), d = _("el-input");
|
|
761
|
-
return s.show ? (
|
|
762
|
-
C(t.$slots, "list-start", { row:
|
|
763
|
-
|
|
764
|
-
|
|
766
|
+
return s.show ? (u(), b("div", De, [
|
|
767
|
+
C(t.$slots, "list-start", { row: n.row }),
|
|
768
|
+
n.addBottom ? v("", !0) : (u(), b("div", Ee, [
|
|
769
|
+
D(r, {
|
|
765
770
|
link: "",
|
|
766
771
|
type: "primary",
|
|
767
|
-
onClick: e[0] || (e[0] = (m) => s.add(
|
|
772
|
+
onClick: e[0] || (e[0] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
768
773
|
}, {
|
|
769
774
|
default: y(() => e[3] || (e[3] = [
|
|
770
775
|
U("添加")
|
|
@@ -772,27 +777,27 @@ const Ue = {
|
|
|
772
777
|
_: 1
|
|
773
778
|
})
|
|
774
779
|
])),
|
|
775
|
-
(
|
|
780
|
+
(u(!0), b($, null, A(n.row[n.field], (m) => (u(), b("div", Oe, [
|
|
776
781
|
C(t.$slots, "item-start", {
|
|
777
782
|
item: m,
|
|
778
|
-
row:
|
|
783
|
+
row: n.row
|
|
779
784
|
}),
|
|
780
|
-
(
|
|
785
|
+
(u(!0), b($, null, A(n.itemFields, (c) => (u(), g(d, {
|
|
781
786
|
modelValue: m[c.value],
|
|
782
|
-
"onUpdate:modelValue": (
|
|
783
|
-
style: pe({ width:
|
|
784
|
-
class: I(
|
|
785
|
-
placeholder: c[
|
|
786
|
-
onChange: e[1] || (e[1] = (
|
|
787
|
+
"onUpdate:modelValue": (f) => m[c.value] = f,
|
|
788
|
+
style: pe({ width: n.inputWidth }),
|
|
789
|
+
class: I(n.inputClass),
|
|
790
|
+
placeholder: c[n.label] || c[n.value],
|
|
791
|
+
onChange: e[1] || (e[1] = (f) => l("change"))
|
|
787
792
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
788
793
|
C(t.$slots, "item-end", {
|
|
789
794
|
item: m,
|
|
790
|
-
row:
|
|
795
|
+
row: n.row
|
|
791
796
|
}),
|
|
792
|
-
|
|
797
|
+
D(r, {
|
|
793
798
|
link: "",
|
|
794
799
|
type: "danger",
|
|
795
|
-
onClick: (c) => s.remove(
|
|
800
|
+
onClick: (c) => s.remove(n.field, n.row, m)
|
|
796
801
|
}, {
|
|
797
802
|
default: y(() => e[4] || (e[4] = [
|
|
798
803
|
U("删除")
|
|
@@ -800,11 +805,11 @@ const Ue = {
|
|
|
800
805
|
_: 2
|
|
801
806
|
}, 1032, ["onClick"])
|
|
802
807
|
]))), 256)),
|
|
803
|
-
|
|
804
|
-
|
|
808
|
+
n.addBottom ? (u(), b("div", Se, [
|
|
809
|
+
D(r, {
|
|
805
810
|
link: "",
|
|
806
811
|
type: "primary",
|
|
807
|
-
onClick: e[2] || (e[2] = (m) => s.add(
|
|
812
|
+
onClick: e[2] || (e[2] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
808
813
|
}, {
|
|
809
814
|
default: y(() => e[5] || (e[5] = [
|
|
810
815
|
U("添加")
|
|
@@ -812,14 +817,14 @@ const Ue = {
|
|
|
812
817
|
_: 1
|
|
813
818
|
})
|
|
814
819
|
])) : v("", !0),
|
|
815
|
-
C(t.$slots, "list-end", { row:
|
|
820
|
+
C(t.$slots, "list-end", { row: n.row })
|
|
816
821
|
])) : v("", !0);
|
|
817
822
|
};
|
|
818
823
|
}
|
|
819
|
-
}),
|
|
824
|
+
}), Me = {
|
|
820
825
|
class: "row form-item-content",
|
|
821
826
|
style: { width: "100%" }
|
|
822
|
-
},
|
|
827
|
+
}, Te = { class: "col" }, Ae = { class: "col" }, Fe = ["innerHTML"], Le = /* @__PURE__ */ J({
|
|
823
828
|
__name: "column",
|
|
824
829
|
props: {
|
|
825
830
|
/**
|
|
@@ -835,8 +840,8 @@ const Ue = {
|
|
|
835
840
|
default: ""
|
|
836
841
|
}
|
|
837
842
|
},
|
|
838
|
-
setup(
|
|
839
|
-
const p = M.isFun, s = M.EDialog, l = N(), t =
|
|
843
|
+
setup(n, { expose: o }) {
|
|
844
|
+
const p = M.isFun, s = M.EDialog, l = N(), t = n, e = re({
|
|
840
845
|
rules: {},
|
|
841
846
|
show: !0,
|
|
842
847
|
form: {},
|
|
@@ -848,7 +853,7 @@ const Ue = {
|
|
|
848
853
|
getOn: (r) => r.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
849
854
|
getColumnSpan: (r, d) => {
|
|
850
855
|
if (r.item.form?.spanCol) {
|
|
851
|
-
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((
|
|
856
|
+
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((i) => !M.isFun(i.item.show?.form, e.form, e.type)).reduce((i, h) => i + (h.item.form?.span || c), 0);
|
|
852
857
|
return (r.item.form?.span || c) + k;
|
|
853
858
|
}
|
|
854
859
|
return r.item.form?.span;
|
|
@@ -857,7 +862,7 @@ const Ue = {
|
|
|
857
862
|
const r = t.option;
|
|
858
863
|
e.formColumn = [], e.rules = {}, e.formDefault = {};
|
|
859
864
|
const d = [], m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2;
|
|
860
|
-
let
|
|
865
|
+
let f = [];
|
|
861
866
|
const k = (h) => {
|
|
862
867
|
if (h.children) {
|
|
863
868
|
h.children.forEach((S) => {
|
|
@@ -867,8 +872,8 @@ const Ue = {
|
|
|
867
872
|
}
|
|
868
873
|
if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
|
|
869
874
|
h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
|
|
870
|
-
const S = h.form.span,
|
|
871
|
-
if (
|
|
875
|
+
const S = h.form.span, B = f.reduce((R, Y) => R + Y.span, S), F = f.length;
|
|
876
|
+
if (f.push({ item: h, span: S }), (F === 1 && f[0].span === 0 || B >= m || S === 0 && F > 1) && (d.push(f), f = []), h.rules) {
|
|
872
877
|
const R = {
|
|
873
878
|
input: w.tCurd("placeholderInput"),
|
|
874
879
|
select: w.tCurd("placeholderSelect")
|
|
@@ -882,161 +887,161 @@ const Ue = {
|
|
|
882
887
|
] : h.rules;
|
|
883
888
|
}
|
|
884
889
|
}
|
|
885
|
-
},
|
|
886
|
-
h.isForm = S, Array.isArray(h.children) && h.children.forEach((
|
|
890
|
+
}, i = (h, S) => {
|
|
891
|
+
h.isForm = S, Array.isArray(h.children) && h.children.forEach((B) => i(B, S));
|
|
887
892
|
};
|
|
888
893
|
r.column.forEach((h) => {
|
|
889
|
-
|
|
890
|
-
}),
|
|
894
|
+
i(h, !0), k(h);
|
|
895
|
+
}), f.length > 0 && d.push(f), e.formColumn = d, e.form = JSONUtil.cp(e.formDefault);
|
|
891
896
|
}
|
|
892
897
|
});
|
|
893
|
-
return e.initColumnForm(),
|
|
898
|
+
return e.initColumnForm(), o({
|
|
894
899
|
ref: l,
|
|
895
900
|
conf: e
|
|
896
|
-
}), (r, d) => (
|
|
901
|
+
}), (r, d) => (u(), g(a(q), {
|
|
897
902
|
ref_key: "ruleFormRef",
|
|
898
903
|
ref: l,
|
|
899
904
|
model: e.form,
|
|
900
905
|
rules: e.rules
|
|
901
906
|
}, {
|
|
902
907
|
default: y(() => [
|
|
903
|
-
e.show ? (
|
|
904
|
-
|
|
905
|
-
m.map((
|
|
908
|
+
e.show ? (u(!0), b($, { key: 0 }, A(e.formColumn, (m, c) => (u(), b($, { key: c }, [
|
|
909
|
+
a(p)(
|
|
910
|
+
m.map((f) => f.item?.show?.form),
|
|
906
911
|
e.form,
|
|
907
912
|
e.type
|
|
908
|
-
) ? (
|
|
913
|
+
) ? (u(), b("div", {
|
|
909
914
|
key: 0,
|
|
910
915
|
class: I(["row curd-row", {
|
|
911
|
-
stripe:
|
|
916
|
+
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
912
917
|
}])
|
|
913
918
|
}, [
|
|
914
919
|
C(r.$slots, "form-start", {
|
|
915
920
|
row: e.form
|
|
916
921
|
}),
|
|
917
|
-
(
|
|
918
|
-
key:
|
|
922
|
+
(u(!0), b($, null, A(m, (f) => (u(), b($, {
|
|
923
|
+
key: f.item.key
|
|
919
924
|
}, [
|
|
920
|
-
|
|
925
|
+
a(p)(f.item.show?.form, e.form, e.type) ? (u(), b("div", {
|
|
921
926
|
key: 0,
|
|
922
|
-
class: I([
|
|
927
|
+
class: I([f.item.form.span > 0 ? `col-${e.getColumnSpan(f, m)}` : "col", `form-item-col-${f.item.key}`])
|
|
923
928
|
}, [
|
|
924
|
-
|
|
925
|
-
label:
|
|
926
|
-
prop:
|
|
927
|
-
"label-width":
|
|
929
|
+
D(a(te), {
|
|
930
|
+
label: f.item.text?.form?.label ?? f.item.label,
|
|
931
|
+
prop: f.item.key,
|
|
932
|
+
"label-width": f.item.text?.form?.label == "" ? 0 : f.item.form?.labelWidth || n.option.form?.labelWidth || "100px"
|
|
928
933
|
}, {
|
|
929
934
|
default: y(() => [
|
|
930
|
-
|
|
931
|
-
C(r.$slots, "form-" +
|
|
935
|
+
E("div", Me, [
|
|
936
|
+
C(r.$slots, "form-" + f.item.key + "-start", {
|
|
932
937
|
row: e.form,
|
|
933
|
-
item:
|
|
938
|
+
item: f.item
|
|
934
939
|
}),
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
C(r.$slots, "form-" +
|
|
940
|
+
E("div", Te, [
|
|
941
|
+
E("div", Ae, [
|
|
942
|
+
C(r.$slots, "form-" + f.item.key, {
|
|
938
943
|
row: e.form,
|
|
939
|
-
item:
|
|
944
|
+
item: f.item
|
|
940
945
|
}, () => [
|
|
941
|
-
|
|
946
|
+
f.item.type === "input" ? (u(), g(a(x), V({
|
|
942
947
|
key: 0,
|
|
943
|
-
modelValue: e.form[
|
|
944
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
948
|
+
modelValue: e.form[f.item.key],
|
|
949
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
945
950
|
ref_for: !0
|
|
946
|
-
}, e.getBind(
|
|
947
|
-
disabled: e.getDisabled(
|
|
948
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
951
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
952
|
+
disabled: e.getDisabled(f.item)
|
|
953
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "switch" ? (u(), g(a(Z), V({
|
|
949
954
|
key: 1,
|
|
950
|
-
modelValue: e.form[
|
|
951
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
955
|
+
modelValue: e.form[f.item.key],
|
|
956
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
952
957
|
ref_for: !0
|
|
953
|
-
}, e.getBind(
|
|
954
|
-
disabled: e.getDisabled(
|
|
955
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
958
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
959
|
+
disabled: e.getDisabled(f.item)
|
|
960
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "select" ? (u(), g(a(G), V({
|
|
956
961
|
key: 2,
|
|
957
|
-
modelValue: e.form[
|
|
958
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
962
|
+
modelValue: e.form[f.item.key],
|
|
963
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
959
964
|
ref_for: !0
|
|
960
|
-
}, e.getBind(
|
|
961
|
-
disabled: e.getDisabled(
|
|
965
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
966
|
+
disabled: e.getDisabled(f.item),
|
|
962
967
|
style: { width: "100%" }
|
|
963
968
|
}), {
|
|
964
969
|
default: y(() => [
|
|
965
|
-
(
|
|
970
|
+
(u(!0), b($, null, A(f.item.options?.select?.data, (k) => (u(), g(a(K), {
|
|
966
971
|
key: k.value,
|
|
967
972
|
label: k.label,
|
|
968
973
|
value: k.value
|
|
969
974
|
}, null, 8, ["label", "value"]))), 128))
|
|
970
975
|
]),
|
|
971
976
|
_: 2
|
|
972
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
977
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "radio" ? (u(), g(a(le), V({
|
|
973
978
|
key: 3,
|
|
974
|
-
modelValue: e.form[
|
|
975
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
979
|
+
modelValue: e.form[f.item.key],
|
|
980
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
976
981
|
ref_for: !0
|
|
977
|
-
}, e.getBind(
|
|
978
|
-
disabled: e.getDisabled(
|
|
982
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
983
|
+
disabled: e.getDisabled(f.item),
|
|
979
984
|
style: { width: "100%" }
|
|
980
985
|
}), {
|
|
981
986
|
default: y(() => [
|
|
982
|
-
(
|
|
987
|
+
(u(!0), b($, null, A(f.item.options?.radio?.data, (k) => (u(), g(a(ne), {
|
|
983
988
|
key: k.value,
|
|
984
989
|
label: k.label,
|
|
985
990
|
value: k.value
|
|
986
991
|
}, null, 8, ["label", "value"]))), 128))
|
|
987
992
|
]),
|
|
988
993
|
_: 2
|
|
989
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
994
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "list" ? (u(), g(se, V({
|
|
990
995
|
key: 4,
|
|
991
996
|
row: e.form,
|
|
992
|
-
field:
|
|
997
|
+
field: f.item.key,
|
|
993
998
|
ref_for: !0
|
|
994
|
-
}, e.getBind(
|
|
995
|
-
disabled: e.getDisabled(
|
|
999
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1000
|
+
disabled: e.getDisabled(f.item),
|
|
996
1001
|
style: { width: "100%" }
|
|
997
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
1002
|
+
}), null, 16, ["row", "field", "disabled"])) : f.item.type === "treeSelect" ? (u(), g(a(ue), V({
|
|
998
1003
|
key: 5,
|
|
999
|
-
modelValue: e.form[
|
|
1000
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1004
|
+
modelValue: e.form[f.item.key],
|
|
1005
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1001
1006
|
ref_for: !0
|
|
1002
|
-
}, e.getBind(
|
|
1003
|
-
disabled: e.getDisabled(
|
|
1007
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1008
|
+
disabled: e.getDisabled(f.item),
|
|
1004
1009
|
style: { width: "100%" }
|
|
1005
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1010
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "datetime" ? (u(), g(a(ie), V({
|
|
1006
1011
|
key: 6,
|
|
1007
|
-
modelValue: e.form[
|
|
1008
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1012
|
+
modelValue: e.form[f.item.key],
|
|
1013
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1009
1014
|
ref_for: !0
|
|
1010
|
-
}, e.getBind(
|
|
1011
|
-
disabled: e.getDisabled(
|
|
1012
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1015
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1016
|
+
disabled: e.getDisabled(f.item)
|
|
1017
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type && (a(j).customComponent[f.item.type] || a(j).customComponent[f.item.type]?.form) ? (u(), g(W(a(j).customComponent[f.item.type]?.form || a(j).customComponent[f.item.type]), V({
|
|
1013
1018
|
key: 7,
|
|
1014
|
-
modelValue: e.form[
|
|
1015
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1019
|
+
modelValue: e.form[f.item.key],
|
|
1020
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1016
1021
|
ref_for: !0
|
|
1017
|
-
}, e.getBind(
|
|
1018
|
-
disabled: e.getDisabled(
|
|
1022
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1023
|
+
disabled: e.getDisabled(f.item)
|
|
1019
1024
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
1020
1025
|
]),
|
|
1021
|
-
C(r.$slots, "form-" +
|
|
1026
|
+
C(r.$slots, "form-" + f.item.key + "-right", {
|
|
1022
1027
|
row: e.form,
|
|
1023
|
-
item:
|
|
1028
|
+
item: f.item
|
|
1024
1029
|
})
|
|
1025
1030
|
]),
|
|
1026
|
-
C(r.$slots, "form-" +
|
|
1031
|
+
C(r.$slots, "form-" + f.item.key + "-tip", {
|
|
1027
1032
|
row: e.form,
|
|
1028
|
-
item:
|
|
1033
|
+
item: f.item
|
|
1029
1034
|
}, () => [
|
|
1030
|
-
|
|
1035
|
+
f.item.form?.tipText ? (u(), b("div", {
|
|
1031
1036
|
key: 0,
|
|
1032
1037
|
class: "form-tip-text",
|
|
1033
|
-
innerHTML: typeof
|
|
1038
|
+
innerHTML: typeof f.item.form?.tipText == "function" ? f.item.form?.tipText(e.form, e.type) : f.item.form?.tipText
|
|
1034
1039
|
}, null, 8, Fe)) : v("", !0)
|
|
1035
1040
|
])
|
|
1036
1041
|
]),
|
|
1037
|
-
C(r.$slots, "form-" +
|
|
1042
|
+
C(r.$slots, "form-" + f.item.key + "-end", {
|
|
1038
1043
|
row: e.form,
|
|
1039
|
-
item:
|
|
1044
|
+
item: f.item
|
|
1040
1045
|
})
|
|
1041
1046
|
])
|
|
1042
1047
|
]),
|
|
@@ -1054,7 +1059,7 @@ const Ue = {
|
|
|
1054
1059
|
}, 8, ["model", "rules"]));
|
|
1055
1060
|
}
|
|
1056
1061
|
});
|
|
1057
|
-
class
|
|
1062
|
+
class je {
|
|
1058
1063
|
/**
|
|
1059
1064
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
1060
1065
|
*
|
|
@@ -1062,9 +1067,9 @@ class Le {
|
|
|
1062
1067
|
* @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
|
|
1063
1068
|
* @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
|
|
1064
1069
|
*/
|
|
1065
|
-
static exportToExcel = async (
|
|
1066
|
-
if (!
|
|
1067
|
-
const l = await M.loadModule("xlsx"), t =
|
|
1070
|
+
static exportToExcel = async (o, p, s) => {
|
|
1071
|
+
if (!o || o.length === 0) return;
|
|
1072
|
+
const l = await M.loadModule("xlsx"), t = o.map((d) => {
|
|
1068
1073
|
const m = {};
|
|
1069
1074
|
return p.forEach((c) => {
|
|
1070
1075
|
m[c.label] = d[c.key];
|
|
@@ -1073,9 +1078,9 @@ class Le {
|
|
|
1073
1078
|
l.utils.book_append_sheet(r, e, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(r, `${s}.xlsx`);
|
|
1074
1079
|
};
|
|
1075
1080
|
}
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
option:
|
|
1081
|
+
const H = M.EDialog, Be = (n) => {
|
|
1082
|
+
const o = N(), p = N(), s = N(), l = re({
|
|
1083
|
+
option: n.option,
|
|
1079
1084
|
/** 查询区域相关配置对象 */
|
|
1080
1085
|
search: {
|
|
1081
1086
|
/** 查询表单列集合 */
|
|
@@ -1092,18 +1097,18 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1092
1097
|
/** 组装实际要搜索的数据对象 */
|
|
1093
1098
|
getFormData: () => {
|
|
1094
1099
|
let t = {};
|
|
1095
|
-
|
|
1100
|
+
n.option.column.forEach((r) => {
|
|
1096
1101
|
(typeof r.show?.search == "function" ? r.show?.search(l.search.form) : r.show?.search) && (t[r.key] = l.search.form[r.key]);
|
|
1097
1102
|
});
|
|
1098
|
-
const e =
|
|
1103
|
+
const e = n.option.search?.before?.(t);
|
|
1099
1104
|
return e && (t = e), t;
|
|
1100
1105
|
},
|
|
1101
1106
|
/** 重置搜索表单 */
|
|
1102
1107
|
reset: () => {
|
|
1103
1108
|
const t = l.search.formDefault;
|
|
1104
1109
|
Object.keys(t).forEach((e) => {
|
|
1105
|
-
|
|
1106
|
-
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1,
|
|
1110
|
+
n.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
|
|
1111
|
+
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, n.option.init !== !1 && l.table.getList();
|
|
1107
1112
|
},
|
|
1108
1113
|
/** 提交搜索表单 */
|
|
1109
1114
|
submit: () => {
|
|
@@ -1117,19 +1122,19 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1117
1122
|
/** 总条数 */
|
|
1118
1123
|
total: 0,
|
|
1119
1124
|
/** 分页控件的布局方式 */
|
|
1120
|
-
layout:
|
|
1125
|
+
layout: n.option.page?.layout || T.config.pagination.layout,
|
|
1121
1126
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1122
|
-
showTools:
|
|
1127
|
+
showTools: n.option.page?.showTools || T.config.pagination.showTools,
|
|
1123
1128
|
/** 当前每页条数 */
|
|
1124
|
-
size:
|
|
1129
|
+
size: n.option.page?.size || T.config.pagination.size,
|
|
1125
1130
|
/** 支持切换的每页条数选项 */
|
|
1126
|
-
sizeList:
|
|
1131
|
+
sizeList: n.option.page?.sizeList || T.config.pagination.pageSizes,
|
|
1127
1132
|
/** 分页器计数 */
|
|
1128
|
-
pagerCount:
|
|
1133
|
+
pagerCount: n.option.page?.pagerCount || T.config.pagination.pagerCount,
|
|
1129
1134
|
/** 获取分页查询参数 */
|
|
1130
1135
|
getQuery: (t = {}) => ({
|
|
1131
|
-
[
|
|
1132
|
-
[
|
|
1136
|
+
[T.config.field.page.size]: t.size || l.page.size,
|
|
1137
|
+
[T.config.field.page.num]: t.num || l.page.num,
|
|
1133
1138
|
...l.search.getFormData()
|
|
1134
1139
|
})
|
|
1135
1140
|
},
|
|
@@ -1161,7 +1166,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1161
1166
|
const t = (e) => {
|
|
1162
1167
|
let r = [];
|
|
1163
1168
|
return e.forEach((d) => {
|
|
1164
|
-
r.push(d[
|
|
1169
|
+
r.push(d[n.option.table.rowKey]), d.children && d.children.length > 0 && (r = r.concat(t(d.children)));
|
|
1165
1170
|
}), r;
|
|
1166
1171
|
};
|
|
1167
1172
|
l.table.expand.rowKeys = t(l.table.data);
|
|
@@ -1202,12 +1207,12 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1202
1207
|
/** 获取数据列表接口实现 */
|
|
1203
1208
|
getList: async () => {
|
|
1204
1209
|
l.table.loading = !0;
|
|
1205
|
-
const t =
|
|
1210
|
+
const t = n.option.api.list;
|
|
1206
1211
|
try {
|
|
1207
1212
|
await l.initApiData("init");
|
|
1208
1213
|
let e = {};
|
|
1209
1214
|
if (l.table.sort.prop) {
|
|
1210
|
-
const { props: h, order: S } =
|
|
1215
|
+
const { props: h, order: S } = T.config.table.sort;
|
|
1211
1216
|
e = {
|
|
1212
1217
|
[h.field]: l.table.sort.prop,
|
|
1213
1218
|
[S.field]: l.table.sort.order
|
|
@@ -1216,13 +1221,13 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1216
1221
|
const r = await t({
|
|
1217
1222
|
...l.page.getQuery(),
|
|
1218
1223
|
...e
|
|
1219
|
-
}), d =
|
|
1224
|
+
}), d = T.config.field.result, m = r.data || { [d.list]: r };
|
|
1220
1225
|
let c = (Array.isArray(m[d.list]), m[d.list]);
|
|
1221
|
-
const
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1226
|
+
const f = l.update.formColumn.flat(), i = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((B) => {
|
|
1227
|
+
const F = f.find((R) => R.item.key === B);
|
|
1228
|
+
F && ["select", "radio"].includes(F.item.type) && (F.item.table.format || (F.item.table.format = (R) => F.item.options[F.item.type].data?.find((Y) => Y.value == R[B])?.label || R[B]));
|
|
1224
1229
|
}), h));
|
|
1225
|
-
l.table.data =
|
|
1230
|
+
l.table.data = n.option.data ? await n.option.data(i, c) : i, l.page.total = m[d.total] || 0;
|
|
1226
1231
|
} catch (e) {
|
|
1227
1232
|
console.error(e);
|
|
1228
1233
|
} finally {
|
|
@@ -1242,12 +1247,12 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1242
1247
|
l.table.selection.list = [];
|
|
1243
1248
|
const r = s.value;
|
|
1244
1249
|
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1245
|
-
const d =
|
|
1246
|
-
const k = (
|
|
1247
|
-
for (const h of
|
|
1250
|
+
const d = n.option.table?.rowKey, m = l.table.data, c = (f) => {
|
|
1251
|
+
const k = (i) => {
|
|
1252
|
+
for (const h of i) {
|
|
1248
1253
|
if (d != null && d !== "") {
|
|
1249
|
-
if (h[d] ===
|
|
1250
|
-
} else if (h ===
|
|
1254
|
+
if (h[d] === f[d]) return h;
|
|
1255
|
+
} else if (h === f)
|
|
1251
1256
|
return h;
|
|
1252
1257
|
if (Array.isArray(h.children) && h.children.length) {
|
|
1253
1258
|
const S = k(h.children);
|
|
@@ -1258,13 +1263,13 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1258
1263
|
return k(m);
|
|
1259
1264
|
};
|
|
1260
1265
|
be(() => {
|
|
1261
|
-
t.forEach((
|
|
1262
|
-
const k = c(
|
|
1266
|
+
t.forEach((f) => {
|
|
1267
|
+
const k = c(f) ?? f;
|
|
1263
1268
|
if (e) {
|
|
1264
|
-
const
|
|
1269
|
+
const i = () => {
|
|
1265
1270
|
r.toggleRowSelection(k, !0, !1);
|
|
1266
1271
|
};
|
|
1267
|
-
e(
|
|
1272
|
+
e(f) !== !1 && i();
|
|
1268
1273
|
} else
|
|
1269
1274
|
r.toggleRowSelection(k, !0, !1);
|
|
1270
1275
|
});
|
|
@@ -1279,13 +1284,13 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1279
1284
|
order: "",
|
|
1280
1285
|
/** 排序变更回调 */
|
|
1281
1286
|
change: (t) => {
|
|
1282
|
-
|
|
1283
|
-
const e =
|
|
1287
|
+
T.config.table.sort.resetPage && (l.page.num = 1);
|
|
1288
|
+
const e = T.config.table.sort;
|
|
1284
1289
|
if (e.change) {
|
|
1285
1290
|
e.change(t, l);
|
|
1286
1291
|
return;
|
|
1287
1292
|
}
|
|
1288
|
-
l.table.sort.prop = t.prop, t.order === null ? l.table.sort.order = "" : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
|
|
1293
|
+
l.table.sort.prop = t.prop, t.order === null ? (l.table.sort.order = "", l.table.sort.prop = "") : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
|
|
1289
1294
|
}
|
|
1290
1295
|
}
|
|
1291
1296
|
},
|
|
@@ -1295,22 +1300,22 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1295
1300
|
run: {
|
|
1296
1301
|
/** 执行指定方式的导出(如select、page、all) */
|
|
1297
1302
|
start: async (t) => {
|
|
1298
|
-
let e = await l.export.run[t](), r =
|
|
1303
|
+
let e = await l.export.run[t](), r = n.option.column;
|
|
1299
1304
|
const d = ObjectUtil.deepMerge(
|
|
1300
1305
|
{
|
|
1301
1306
|
data: e,
|
|
1302
1307
|
columns: r
|
|
1303
1308
|
},
|
|
1304
1309
|
{}
|
|
1305
|
-
), m =
|
|
1306
|
-
m.before && m.before(d),
|
|
1310
|
+
), m = n.option.tools?.export || {};
|
|
1311
|
+
m.before && m.before(d), je.exportToExcel(d.data, d.columns, m.fileName);
|
|
1307
1312
|
},
|
|
1308
1313
|
/** 获取当前选中项进行导出 */
|
|
1309
1314
|
select: async () => {
|
|
1310
1315
|
l.export.loading = !0;
|
|
1311
1316
|
try {
|
|
1312
|
-
if (
|
|
1313
|
-
await
|
|
1317
|
+
if (n.option.tools?.export?.select) {
|
|
1318
|
+
await n.option.tools?.export?.select({
|
|
1314
1319
|
...l.page.getQuery(),
|
|
1315
1320
|
items: l.table.selection.list
|
|
1316
1321
|
});
|
|
@@ -1329,8 +1334,8 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1329
1334
|
page: async () => {
|
|
1330
1335
|
l.export.loading = !0;
|
|
1331
1336
|
try {
|
|
1332
|
-
if (
|
|
1333
|
-
await
|
|
1337
|
+
if (n.option.tools?.export?.page) {
|
|
1338
|
+
await n.option.tools?.export?.page({
|
|
1334
1339
|
...l.page.getQuery()
|
|
1335
1340
|
});
|
|
1336
1341
|
return;
|
|
@@ -1348,19 +1353,19 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1348
1353
|
all: async () => {
|
|
1349
1354
|
l.export.loading = !0;
|
|
1350
1355
|
try {
|
|
1351
|
-
if (
|
|
1352
|
-
await
|
|
1356
|
+
if (n.option.tools?.export?.all) {
|
|
1357
|
+
await n.option.tools?.export?.all({
|
|
1353
1358
|
...l.page.getQuery()
|
|
1354
1359
|
});
|
|
1355
1360
|
return;
|
|
1356
1361
|
}
|
|
1357
|
-
const t =
|
|
1362
|
+
const t = n.option.api.list, e = await t({
|
|
1358
1363
|
...l.page.getQuery({
|
|
1359
1364
|
size: 999999,
|
|
1360
1365
|
num: 1
|
|
1361
1366
|
})
|
|
1362
1367
|
});
|
|
1363
|
-
return (e.data || { [
|
|
1368
|
+
return (e.data || { [T.config.field.result.list]: e })[T.config.field.result.list];
|
|
1364
1369
|
} catch (t) {
|
|
1365
1370
|
console.error(t);
|
|
1366
1371
|
} finally {
|
|
@@ -1388,7 +1393,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1388
1393
|
/** 弹窗loading */
|
|
1389
1394
|
loading: !1,
|
|
1390
1395
|
/** 当前操作类型,插入或修改 */
|
|
1391
|
-
type:
|
|
1396
|
+
type: H.Update,
|
|
1392
1397
|
/** 当前操作表单数据 */
|
|
1393
1398
|
form: {},
|
|
1394
1399
|
/** 表单默认值 */
|
|
@@ -1396,17 +1401,17 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1396
1401
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1397
1402
|
formColumn: [],
|
|
1398
1403
|
/** 判断是否禁用当前字段 */
|
|
1399
|
-
getDisabled: (t, e = !1) =>
|
|
1404
|
+
getDisabled: (t, e = !1) => n.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === H.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === H.Add ? "create" : "update"],
|
|
1400
1405
|
/** 获取表单组件绑定属性 */
|
|
1401
|
-
getBind: (t) => t.options?.[l.update.type ===
|
|
1406
|
+
getBind: (t) => t.options?.[l.update.type === H.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
|
|
1402
1407
|
/** 获取表单组件事件属性 */
|
|
1403
1408
|
getOn: (t, e) => {
|
|
1404
|
-
const d = t.options?.[l.update.type ===
|
|
1409
|
+
const d = t.options?.[l.update.type === H.Add ? "formAdd" : "formUpdate"]?.[t.type]?.on || t.options?.[t.type]?.on || {}, m = {};
|
|
1405
1410
|
return Object.keys(d).forEach((c) => {
|
|
1406
|
-
const
|
|
1407
|
-
typeof
|
|
1408
|
-
return
|
|
1409
|
-
} : m[c] =
|
|
1411
|
+
const f = d[c];
|
|
1412
|
+
typeof f == "function" ? m[c] = function(...k) {
|
|
1413
|
+
return f.apply(this, [...k, e || l.update.form, t]);
|
|
1414
|
+
} : m[c] = f;
|
|
1410
1415
|
}), m;
|
|
1411
1416
|
},
|
|
1412
1417
|
/** 获取表单组件绑定属性和事件 */
|
|
@@ -1428,10 +1433,10 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1428
1433
|
data: {},
|
|
1429
1434
|
/** 返回编辑时与原值的变更数据,用于局部更新API */
|
|
1430
1435
|
getApiData: (t) => {
|
|
1431
|
-
if (
|
|
1436
|
+
if (n.option.form?.editAll)
|
|
1432
1437
|
return t;
|
|
1433
1438
|
let e = {
|
|
1434
|
-
[
|
|
1439
|
+
[n.option.table?.rowKey]: l.update.edit.data[n.option.table?.rowKey]
|
|
1435
1440
|
};
|
|
1436
1441
|
return Object.keys(l.update.edit.data).forEach((r) => {
|
|
1437
1442
|
t[r] !== l.update.edit.data[r] && (e[r] = t[r]);
|
|
@@ -1445,8 +1450,8 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1445
1450
|
M.loading(!0);
|
|
1446
1451
|
try {
|
|
1447
1452
|
l.update.type = t;
|
|
1448
|
-
const r = t ===
|
|
1449
|
-
l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t ===
|
|
1453
|
+
const r = t === H.Add;
|
|
1454
|
+
l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === H.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await n.option.form?.openBefore?.(l.update.form, l.update), (!n.option.table?.inlineEdit || r) && (l.update.show = !0, l.update.showContent = !0), n.option.form?.openAfter?.(l.update.form, l.update);
|
|
1450
1455
|
} catch (r) {
|
|
1451
1456
|
console.error(r);
|
|
1452
1457
|
} finally {
|
|
@@ -1457,19 +1462,19 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1457
1462
|
/** 提交增改表单操作 */
|
|
1458
1463
|
submit: () => {
|
|
1459
1464
|
FunUtil.throttle(async () => {
|
|
1460
|
-
await p.value?.validate(async (d, m) => new Promise((c,
|
|
1461
|
-
d || (M.fail(w.tCurd("checkFormData")),
|
|
1465
|
+
await p.value?.validate(async (d, m) => new Promise((c, f) => {
|
|
1466
|
+
d || (M.fail(w.tCurd("checkFormData")), f(!1)), c();
|
|
1462
1467
|
})), l.update.loading = !0;
|
|
1463
|
-
const t = l.update.type ===
|
|
1468
|
+
const t = l.update.type === H.Add ? n.option.api.create : n.option.api.update;
|
|
1464
1469
|
try {
|
|
1465
|
-
await
|
|
1470
|
+
await n.option.form?.submitBefore?.(l.update.form, l.update);
|
|
1466
1471
|
} catch {
|
|
1467
1472
|
l.update.loading = !1;
|
|
1468
1473
|
return;
|
|
1469
1474
|
}
|
|
1470
1475
|
let e = ObjectUtil.deepMerge(l.update.form, {});
|
|
1471
1476
|
delete e.children;
|
|
1472
|
-
const r = new Set(
|
|
1477
|
+
const r = new Set(n.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
|
|
1473
1478
|
Object.keys(e).forEach((d) => {
|
|
1474
1479
|
if (r.has(d) && e[d] != null) {
|
|
1475
1480
|
const m = new Date(e[d]).getTime();
|
|
@@ -1480,7 +1485,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1480
1485
|
if (!t) return;
|
|
1481
1486
|
await t({
|
|
1482
1487
|
...e
|
|
1483
|
-
}), l.update.close(), await l.table.getList(),
|
|
1488
|
+
}), l.update.close(), await l.table.getList(), n.option.form?.submitAfter?.(e, l.update);
|
|
1484
1489
|
} catch (d) {
|
|
1485
1490
|
console.error(d);
|
|
1486
1491
|
} finally {
|
|
@@ -1490,7 +1495,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1490
1495
|
},
|
|
1491
1496
|
/** 关闭弹窗和内容 */
|
|
1492
1497
|
close: () => {
|
|
1493
|
-
l.update.show = !1,
|
|
1498
|
+
l.update.show = !1, n.option.table?.inlineEdit && (l.update.form = {}), setTimeout(() => {
|
|
1494
1499
|
l.update.showContent = !1;
|
|
1495
1500
|
}, 350);
|
|
1496
1501
|
}
|
|
@@ -1498,7 +1503,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1498
1503
|
/** 删除操作弹窗与数据对象 */
|
|
1499
1504
|
remove: {
|
|
1500
1505
|
/** 删除弹窗标题 */
|
|
1501
|
-
title: w.tCurd("
|
|
1506
|
+
title: w.tCurd("deleteTitle"),
|
|
1502
1507
|
/** 删除弹窗显示控制 */
|
|
1503
1508
|
show: !1,
|
|
1504
1509
|
/** 待删除数据项集合 */
|
|
@@ -1521,11 +1526,11 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1521
1526
|
submit: () => {
|
|
1522
1527
|
FunUtil.throttle(async () => {
|
|
1523
1528
|
l.remove.loading = !0;
|
|
1524
|
-
const t =
|
|
1529
|
+
const t = n.option.api.delete;
|
|
1525
1530
|
try {
|
|
1526
1531
|
if (!t) return;
|
|
1527
1532
|
await t({
|
|
1528
|
-
[
|
|
1533
|
+
[n.option.table?.rowKey]: l.remove.items.map((e) => e[n.option.table?.rowKey]),
|
|
1529
1534
|
items: l.remove.items
|
|
1530
1535
|
}), M.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
|
|
1531
1536
|
} catch (e) {
|
|
@@ -1555,8 +1560,8 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1555
1560
|
try {
|
|
1556
1561
|
let c = await d.options?.[d.type]?.dataApi?.(l.update.form, l.update.type);
|
|
1557
1562
|
if (c) {
|
|
1558
|
-
const
|
|
1559
|
-
!Array.isArray(c) &&
|
|
1563
|
+
const f = d.options?.[d.type]?.dataPath;
|
|
1564
|
+
!Array.isArray(c) && f && (c = ObjectUtil.getPathValue(c, f)), d.options[d.type].data = c, d.options.search[d.type].data = c, d.options.formAdd[d.type].data = c, d.options.formUpdate[d.type].data = c, l.apiDataMap[d.key] = c;
|
|
1560
1565
|
}
|
|
1561
1566
|
} catch {
|
|
1562
1567
|
}
|
|
@@ -1564,17 +1569,17 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1564
1569
|
e.push(m);
|
|
1565
1570
|
}
|
|
1566
1571
|
};
|
|
1567
|
-
return
|
|
1572
|
+
return n.option.column.forEach((d) => {
|
|
1568
1573
|
r(d);
|
|
1569
1574
|
}), await Promise.all(e), !0;
|
|
1570
1575
|
},
|
|
1571
1576
|
/** 初始化curd配置(option默认值合并等) */
|
|
1572
1577
|
initCurdConfig: () => {
|
|
1573
|
-
const t = ObjectUtil.deepMerge(
|
|
1574
|
-
t.table.emptyText = w.tCurd("noData"),
|
|
1575
|
-
const e = ObjectUtil.deepMerge(t,
|
|
1578
|
+
const t = ObjectUtil.deepMerge(T.config, {});
|
|
1579
|
+
t.table.emptyText = w.tCurd("noData"), n.option.size = n.option.size || {}, t.table.size = n.option.size.table || t.size.table, t.form.size = n.option.size.form || t.size.form, t.size.search = n.option.size.search || t.size.search;
|
|
1580
|
+
const e = ObjectUtil.deepMerge(t, n.option || {});
|
|
1576
1581
|
Object.keys(e).forEach((r) => {
|
|
1577
|
-
|
|
1582
|
+
n.option[r] = e[r];
|
|
1578
1583
|
});
|
|
1579
1584
|
},
|
|
1580
1585
|
/**
|
|
@@ -1583,7 +1588,7 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1583
1588
|
* @returns
|
|
1584
1589
|
*/
|
|
1585
1590
|
initColumnOptions: () => {
|
|
1586
|
-
let t = JSONUtil.cp(
|
|
1591
|
+
let t = JSONUtil.cp(T.config.columnConfig);
|
|
1587
1592
|
t.options = ObjectUtil.deepMerge(
|
|
1588
1593
|
{
|
|
1589
1594
|
switch: {
|
|
@@ -1603,25 +1608,25 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1603
1608
|
return;
|
|
1604
1609
|
}
|
|
1605
1610
|
} else d === "type" ? r.type = r.type || t.type : r[d] = ObjectUtil.deepMerge(t[d], r[d] || {});
|
|
1606
|
-
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size =
|
|
1607
|
-
r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ?
|
|
1611
|
+
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = n.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
|
|
1612
|
+
r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ? n.option.size.search : n.option.size.form;
|
|
1608
1613
|
}), r.table = ObjectUtil.deepMerge(r.table, r.options[r.type].table || {});
|
|
1609
1614
|
}
|
|
1610
1615
|
r.type === "switch" && (r.options.switch.tableBeforeChange = async (d, m) => {
|
|
1611
1616
|
const c = r.options?.switch;
|
|
1612
1617
|
try {
|
|
1613
|
-
c.tableConfig?.confirm && await
|
|
1618
|
+
c.tableConfig?.confirm && await o.value?.open({
|
|
1614
1619
|
title: w.tCurd("confirmModify"),
|
|
1615
1620
|
content: w.tCurd("confirmSwitchMessage")
|
|
1616
1621
|
});
|
|
1617
1622
|
try {
|
|
1618
|
-
if (!
|
|
1619
|
-
const
|
|
1620
|
-
c.loadingMap || (c.loadingMap = {}), c.loadingMap[
|
|
1621
|
-
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue,
|
|
1622
|
-
if (!
|
|
1623
|
+
if (!n.option.api.update && !c.tableConfig?.api) return;
|
|
1624
|
+
const f = m[n.option.table?.rowKey];
|
|
1625
|
+
c.loadingMap || (c.loadingMap = {}), c.loadingMap[f] || (c.loadingMap[f] = { loading: !1 }), c.loadingMap[f].loading = !0;
|
|
1626
|
+
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, i = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
|
|
1627
|
+
if (!i) return;
|
|
1623
1628
|
try {
|
|
1624
|
-
await
|
|
1629
|
+
await i(
|
|
1625
1630
|
{
|
|
1626
1631
|
...m,
|
|
1627
1632
|
[d]: k
|
|
@@ -1631,122 +1636,122 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1631
1636
|
} catch {
|
|
1632
1637
|
return !1;
|
|
1633
1638
|
} finally {
|
|
1634
|
-
c.loadingMap[
|
|
1639
|
+
c.loadingMap[f].loading = !1;
|
|
1635
1640
|
}
|
|
1636
1641
|
return M.success(w.tCurd("operationSuccess")), c.tableConfig?.loadList && (l.table.loading = !0, l.table.getList(), l.table.loading = !1), !0;
|
|
1637
|
-
} catch (
|
|
1638
|
-
return console.error(
|
|
1642
|
+
} catch (f) {
|
|
1643
|
+
return console.error(f), !1;
|
|
1639
1644
|
} finally {
|
|
1640
1645
|
l.table.loading = !1;
|
|
1641
1646
|
}
|
|
1642
1647
|
} catch {
|
|
1643
1648
|
return !1;
|
|
1644
1649
|
}
|
|
1645
|
-
}), r.type === "treeSelect" && (r.options.treeSelect.rowKey =
|
|
1650
|
+
}), r.type === "treeSelect" && (r.options.treeSelect.rowKey = n.option.table?.rowKey, r.options.treeSelect.nodeKey = n.option.table?.rowKey);
|
|
1646
1651
|
};
|
|
1647
|
-
|
|
1652
|
+
n.option.column.forEach(e), n.option.table?.column?.forEach(e);
|
|
1648
1653
|
},
|
|
1649
1654
|
getColumnSpan: (t, e) => {
|
|
1650
1655
|
if (t.item.form?.spanCol) {
|
|
1651
|
-
const r =
|
|
1656
|
+
const r = T.config.form.defaultSpan, m = e.filter((c) => !M.isFun(c.item.show?.form, l.update.form, l.update.type)).reduce((c, f) => c + (f.item.form?.span || r), 0);
|
|
1652
1657
|
return (t.item?.form.span || r) + m;
|
|
1653
1658
|
}
|
|
1654
1659
|
return t.item.form.span;
|
|
1655
1660
|
},
|
|
1656
1661
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1657
1662
|
initColumnForm: () => {
|
|
1658
|
-
const t =
|
|
1663
|
+
const t = n.option;
|
|
1659
1664
|
l.update.formColumn = [], l.table.column.show = {
|
|
1660
1665
|
list: [],
|
|
1661
1666
|
listSource: []
|
|
1662
1667
|
};
|
|
1663
|
-
const e = [], r =
|
|
1668
|
+
const e = [], r = n.option.form?.maxSpan || 12, d = n.option.form?.defaultSpan || r / 2;
|
|
1664
1669
|
let m = [];
|
|
1665
|
-
const c = (
|
|
1666
|
-
if (
|
|
1667
|
-
l.table.column.show.list.push(
|
|
1670
|
+
const c = (i) => {
|
|
1671
|
+
if (i.children) {
|
|
1672
|
+
l.table.column.show.list.push(i.key), i.children.forEach((h) => {
|
|
1668
1673
|
c(h);
|
|
1669
1674
|
});
|
|
1670
1675
|
return;
|
|
1671
1676
|
}
|
|
1672
|
-
if (l.update.formDefault[
|
|
1673
|
-
|
|
1674
|
-
let h =
|
|
1675
|
-
const
|
|
1676
|
-
if (m.push({ item:
|
|
1677
|
-
const
|
|
1677
|
+
if (l.update.formDefault[i.key] = i.value, i.table.table && (i.show.table && l.table.column.show.list.push(i.key), i.table.table && l.table.column.show.listSource.push(i.key)), !(i.isForm && typeof i.show?.form == "boolean") || i.show?.form) {
|
|
1678
|
+
i.form = i.form || { span: d }, i.form.span = i.form.span ?? d;
|
|
1679
|
+
let h = i.form.span, S = m.reduce((F, R) => F + R.span, h);
|
|
1680
|
+
const B = m.length;
|
|
1681
|
+
if (m.push({ item: i, span: h }), (B === 1 && m[0].span === 0 || S >= r || h === 0 && B > 1) && (e.push(m), m = []), i.rules) {
|
|
1682
|
+
const F = {
|
|
1678
1683
|
input: w.tCurd("placeholderInput"),
|
|
1679
1684
|
select: w.tCurd("placeholderSelect")
|
|
1680
|
-
}, R = (
|
|
1681
|
-
l.update.rules[
|
|
1685
|
+
}, R = (F[i.type] || F.input) + i.label;
|
|
1686
|
+
l.update.rules[i.key] = typeof i.rules == "boolean" ? [
|
|
1682
1687
|
{
|
|
1683
1688
|
required: !0,
|
|
1684
1689
|
message: R,
|
|
1685
1690
|
trigger: "blur"
|
|
1686
1691
|
}
|
|
1687
|
-
] :
|
|
1692
|
+
] : i.rules;
|
|
1688
1693
|
}
|
|
1689
1694
|
}
|
|
1690
|
-
},
|
|
1691
|
-
|
|
1695
|
+
}, f = (i, h) => {
|
|
1696
|
+
i.isForm = h, Array.isArray(i.children) && i.children.forEach((S) => f(S, h));
|
|
1692
1697
|
};
|
|
1693
|
-
t.column.forEach((
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
|
|
1697
|
-
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((
|
|
1698
|
-
const k =
|
|
1699
|
-
k && Object.keys(k).forEach((
|
|
1700
|
-
l.search.formDefault[
|
|
1701
|
-
}), t.column.forEach((
|
|
1702
|
-
|
|
1698
|
+
t.column.forEach((i) => {
|
|
1699
|
+
i.isForm = !0, f(i, !0), c(i);
|
|
1700
|
+
}), n.option.table?.column?.forEach((i) => {
|
|
1701
|
+
f(i, !1), c(i);
|
|
1702
|
+
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((i) => i.table?.table), l.search.column.list.sort((i, h) => i.sort?.search - h.sort?.search), l.table.column.list.sort((i, h) => i.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
|
|
1703
|
+
const k = n.option.search?.formDefault;
|
|
1704
|
+
k && Object.keys(k).forEach((i) => {
|
|
1705
|
+
l.search.formDefault[i] = k[i];
|
|
1706
|
+
}), t.column.forEach((i) => {
|
|
1707
|
+
i.show?.search || (l.search.formDefault[i.key] = void 0);
|
|
1703
1708
|
}), l.search.form = ObjectUtil.deepMerge(l.search.formDefault, {});
|
|
1704
1709
|
}
|
|
1705
1710
|
});
|
|
1706
1711
|
return l.init(), fe(() => {
|
|
1707
|
-
|
|
1708
|
-
}), { conf: l, switchConfirmRef:
|
|
1709
|
-
},
|
|
1712
|
+
n.option.init !== !1 && l.table.getList();
|
|
1713
|
+
}), { conf: l, switchConfirmRef: o, ruleFormRef: p, tableRef: s };
|
|
1714
|
+
}, Re = { class: "dialog-footer" }, Ie = /* @__PURE__ */ J({
|
|
1710
1715
|
__name: "switchConfirm",
|
|
1711
1716
|
props: {
|
|
1712
1717
|
size: {}
|
|
1713
1718
|
},
|
|
1714
|
-
setup(
|
|
1719
|
+
setup(n, { expose: o }) {
|
|
1715
1720
|
const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
|
|
1716
1721
|
let t = null, e = null;
|
|
1717
|
-
const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((
|
|
1718
|
-
t =
|
|
1722
|
+
const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((f, k) => {
|
|
1723
|
+
t = f, e = k;
|
|
1719
1724
|
})), d = () => {
|
|
1720
1725
|
p.value = !1, t?.(!0), t = null, e = null;
|
|
1721
1726
|
}, m = () => {
|
|
1722
1727
|
p.value = !1, e?.(new Error("用户取消操作")), t = null, e = null;
|
|
1723
1728
|
};
|
|
1724
|
-
return
|
|
1729
|
+
return o({
|
|
1725
1730
|
open: r
|
|
1726
|
-
}), (c,
|
|
1731
|
+
}), (c, f) => {
|
|
1727
1732
|
const k = _("el-form");
|
|
1728
|
-
return
|
|
1733
|
+
return u(), g(a(ae), {
|
|
1729
1734
|
modelValue: p.value,
|
|
1730
|
-
"onUpdate:modelValue":
|
|
1735
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => p.value = i),
|
|
1731
1736
|
title: s.value,
|
|
1732
1737
|
"close-on-click-modal": !1,
|
|
1733
1738
|
width: "400px"
|
|
1734
1739
|
}, {
|
|
1735
1740
|
footer: y(() => [
|
|
1736
|
-
|
|
1741
|
+
D(k, { size: c.size }, {
|
|
1737
1742
|
default: y(() => [
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
default: y(() =>
|
|
1743
|
+
E("span", Re, [
|
|
1744
|
+
D(a(L), { onClick: m }, {
|
|
1745
|
+
default: y(() => f[1] || (f[1] = [
|
|
1741
1746
|
U("取消")
|
|
1742
1747
|
])),
|
|
1743
1748
|
_: 1
|
|
1744
1749
|
}),
|
|
1745
|
-
|
|
1750
|
+
D(a(L), {
|
|
1746
1751
|
type: "primary",
|
|
1747
1752
|
onClick: d
|
|
1748
1753
|
}, {
|
|
1749
|
-
default: y(() =>
|
|
1754
|
+
default: y(() => f[2] || (f[2] = [
|
|
1750
1755
|
U("确认")
|
|
1751
1756
|
])),
|
|
1752
1757
|
_: 1
|
|
@@ -1757,84 +1762,97 @@ const P = M.EDialog, Be = (i) => {
|
|
|
1757
1762
|
}, 8, ["size"])
|
|
1758
1763
|
]),
|
|
1759
1764
|
default: y(() => [
|
|
1760
|
-
|
|
1765
|
+
E("div", null, O(l.value), 1)
|
|
1761
1766
|
]),
|
|
1762
1767
|
_: 1
|
|
1763
1768
|
}, 8, ["modelValue", "title"]);
|
|
1764
1769
|
};
|
|
1765
1770
|
}
|
|
1766
|
-
}), X = (
|
|
1767
|
-
const p =
|
|
1768
|
-
for (const [s, l] of
|
|
1771
|
+
}), X = (n, o) => {
|
|
1772
|
+
const p = n.__vccOpts || n;
|
|
1773
|
+
for (const [s, l] of o)
|
|
1769
1774
|
p[s] = l;
|
|
1770
1775
|
return p;
|
|
1771
|
-
},
|
|
1776
|
+
}, He = {}, Pe = {
|
|
1772
1777
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1773
1778
|
viewBox: "0 0 1024 1024"
|
|
1774
1779
|
};
|
|
1775
|
-
function
|
|
1776
|
-
return
|
|
1777
|
-
|
|
1780
|
+
function Ke(n, o) {
|
|
1781
|
+
return u(), b("svg", Pe, o[0] || (o[0] = [
|
|
1782
|
+
E("path", {
|
|
1778
1783
|
fill: "currentColor",
|
|
1779
1784
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
1780
1785
|
}, null, -1)
|
|
1781
1786
|
]));
|
|
1782
1787
|
}
|
|
1783
|
-
const
|
|
1788
|
+
const Ne = /* @__PURE__ */ X(He, [["render", Ke]]), We = ["innerHTML"], Je = /* @__PURE__ */ J({
|
|
1789
|
+
__name: "text",
|
|
1790
|
+
props: {
|
|
1791
|
+
content: {},
|
|
1792
|
+
value: {}
|
|
1793
|
+
},
|
|
1794
|
+
setup(n) {
|
|
1795
|
+
const o = n, p = we(() => typeof o.content == "function" ? o.content(o.value) : o.content);
|
|
1796
|
+
return (s, l) => typeof p.value == "object" ? (u(), g(W(p.value), { key: 0 })) : (u(), b("div", {
|
|
1797
|
+
key: 1,
|
|
1798
|
+
innerHTML: p.value
|
|
1799
|
+
}, null, 8, We));
|
|
1800
|
+
}
|
|
1801
|
+
}), qe = {}, Qe = {
|
|
1784
1802
|
"data-v-58697b5c": "",
|
|
1785
1803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1786
1804
|
viewBox: "0 0 1024 1024"
|
|
1787
1805
|
};
|
|
1788
|
-
function
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1806
|
+
function Ge(n, o) {
|
|
1807
|
+
return u(), b("svg", Qe, o[0] || (o[0] = [
|
|
1808
|
+
E("path", {
|
|
1791
1809
|
fill: "currentColor",
|
|
1792
1810
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
1793
1811
|
}, null, -1)
|
|
1794
1812
|
]));
|
|
1795
1813
|
}
|
|
1796
|
-
const
|
|
1814
|
+
const Xe = /* @__PURE__ */ X(qe, [["render", Ge]]), Ye = {}, Ze = {
|
|
1797
1815
|
"data-v-58697b5c": "",
|
|
1798
1816
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1799
1817
|
viewBox: "0 0 1024 1024"
|
|
1800
1818
|
};
|
|
1801
|
-
function
|
|
1802
|
-
return
|
|
1803
|
-
|
|
1819
|
+
function xe(n, o) {
|
|
1820
|
+
return u(), b("svg", Ze, o[0] || (o[0] = [
|
|
1821
|
+
E("path", {
|
|
1804
1822
|
fill: "currentColor",
|
|
1805
1823
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
|
|
1806
1824
|
}, null, -1)
|
|
1807
1825
|
]));
|
|
1808
1826
|
}
|
|
1809
|
-
const
|
|
1827
|
+
const _e = /* @__PURE__ */ X(Ye, [["render", xe]]), et = {}, tt = {
|
|
1810
1828
|
"data-v-58697b5c": "",
|
|
1811
1829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
1830
|
viewBox: "0 0 1024 1024"
|
|
1813
1831
|
};
|
|
1814
|
-
function
|
|
1815
|
-
return
|
|
1816
|
-
|
|
1832
|
+
function ot(n, o) {
|
|
1833
|
+
return u(), b("svg", tt, o[0] || (o[0] = [
|
|
1834
|
+
E("path", {
|
|
1817
1835
|
fill: "currentColor",
|
|
1818
1836
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
|
|
1819
1837
|
}, null, -1)
|
|
1820
1838
|
]));
|
|
1821
1839
|
}
|
|
1822
|
-
const
|
|
1840
|
+
const at = /* @__PURE__ */ X(et, [["render", ot]]), lt = { class: "row flex-center table-header-label inline" }, nt = { class: "table-header-tooltip" }, it = ["innerHTML"], rt = ["onClick"], st = { key: 1 }, dt = ["onClick", "innerHTML"], ut = /* @__PURE__ */ J({
|
|
1823
1841
|
__name: "tableColumn",
|
|
1824
1842
|
props: {
|
|
1825
1843
|
conf: {},
|
|
1826
1844
|
columnList: {},
|
|
1827
1845
|
option: {}
|
|
1828
1846
|
},
|
|
1829
|
-
setup(
|
|
1830
|
-
const
|
|
1847
|
+
setup(n) {
|
|
1848
|
+
const o = M.isFun, p = ke().type;
|
|
1831
1849
|
return (s, l) => {
|
|
1832
1850
|
const t = _("el-tooltip");
|
|
1833
|
-
return
|
|
1851
|
+
return u(!0), b($, null, A(s.columnList, (e) => (u(), b($, {
|
|
1834
1852
|
key: e.key
|
|
1835
1853
|
}, [
|
|
1836
|
-
s.conf.table.column.show.list.includes(e.key) ? (
|
|
1837
|
-
e.table?.header?.groupKey === void 0 || e.table.header.show ? (
|
|
1854
|
+
s.conf.table.column.show.list.includes(e.key) ? (u(), b($, { key: 0 }, [
|
|
1855
|
+
e.table?.header?.groupKey === void 0 || e.table.header.show ? (u(), g(a(ee), V({
|
|
1838
1856
|
key: 0,
|
|
1839
1857
|
prop: e.key,
|
|
1840
1858
|
label: e.label,
|
|
@@ -1842,29 +1860,29 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1842
1860
|
}, e.table), {
|
|
1843
1861
|
header: y(() => [
|
|
1844
1862
|
C(s.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1845
|
-
|
|
1846
|
-
e.table?.header?.tooltip ? (
|
|
1863
|
+
E("div", lt, [
|
|
1864
|
+
e.table?.header?.tooltip ? (u(), g(t, {
|
|
1847
1865
|
key: 0,
|
|
1848
1866
|
effect: "dark",
|
|
1849
1867
|
placement: "top"
|
|
1850
1868
|
}, {
|
|
1851
1869
|
content: y(() => [
|
|
1852
|
-
|
|
1870
|
+
E("div", {
|
|
1853
1871
|
innerHTML: e.table?.header?.tooltip
|
|
1854
|
-
}, null, 8,
|
|
1872
|
+
}, null, 8, it)
|
|
1855
1873
|
]),
|
|
1856
1874
|
default: y(() => [
|
|
1857
|
-
|
|
1858
|
-
|
|
1875
|
+
E("span", nt, [
|
|
1876
|
+
D(Xe)
|
|
1859
1877
|
])
|
|
1860
1878
|
]),
|
|
1861
1879
|
_: 2
|
|
1862
1880
|
}, 1024)) : v("", !0),
|
|
1863
1881
|
U(" " + O(e.label) + " ", 1),
|
|
1864
|
-
e.table?.header?.group !== void 0 ? (
|
|
1882
|
+
e.table?.header?.group !== void 0 ? (u(), b("span", {
|
|
1865
1883
|
key: 1,
|
|
1866
1884
|
class: "table-header-plus",
|
|
1867
|
-
onClick:
|
|
1885
|
+
onClick: ve(
|
|
1868
1886
|
() => {
|
|
1869
1887
|
e.table.header.group = !e.table.header.group, s.columnList.forEach((r) => {
|
|
1870
1888
|
r.table?.header?.groupKey === e.key && (r.table.header.show = !e.table.header.group);
|
|
@@ -1873,28 +1891,28 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1873
1891
|
["stop"]
|
|
1874
1892
|
)
|
|
1875
1893
|
}, [
|
|
1876
|
-
e.table.header.group ? (
|
|
1877
|
-
], 8,
|
|
1894
|
+
e.table.header.group ? (u(), g(_e, { key: 0 })) : (u(), g(at, { key: 1 }))
|
|
1895
|
+
], 8, rt)) : v("", !0)
|
|
1878
1896
|
])
|
|
1879
1897
|
])
|
|
1880
1898
|
]),
|
|
1881
1899
|
default: y(({ row: r }) => [
|
|
1882
|
-
e.children ? (
|
|
1900
|
+
e.children ? (u(), b($, { key: 0 }, [
|
|
1883
1901
|
l[0] || (l[0] = U(" ")),
|
|
1884
|
-
(
|
|
1902
|
+
(u(), g(W(a(p)), {
|
|
1885
1903
|
conf: s.conf,
|
|
1886
1904
|
columnList: e.children,
|
|
1887
1905
|
option: s.option
|
|
1888
|
-
},
|
|
1889
|
-
|
|
1906
|
+
}, Q({ _: 2 }, [
|
|
1907
|
+
A(s.$slots, (d, m) => ({
|
|
1890
1908
|
name: m,
|
|
1891
1909
|
fn: y((c) => [
|
|
1892
1910
|
C(s.$slots, m, V({ ref_for: !0 }, c || {}))
|
|
1893
1911
|
])
|
|
1894
1912
|
}))
|
|
1895
1913
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1896
|
-
], 64)) : (
|
|
1897
|
-
s.option.table?.editMode ? (
|
|
1914
|
+
], 64)) : (u(), b($, { key: 1 }, [
|
|
1915
|
+
s.option.table?.editMode ? (u(), b("div", {
|
|
1898
1916
|
key: 0,
|
|
1899
1917
|
class: I(["row", ["table-edit-" + e.key]]),
|
|
1900
1918
|
style: { width: "100%" }
|
|
@@ -1903,14 +1921,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1903
1921
|
row: r,
|
|
1904
1922
|
item: e
|
|
1905
1923
|
}),
|
|
1906
|
-
e.type === "input" ? (
|
|
1924
|
+
e.type === "input" ? (u(), g(a(x), V({
|
|
1907
1925
|
key: 0,
|
|
1908
1926
|
modelValue: r[e.key],
|
|
1909
1927
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1910
1928
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1911
1929
|
class: "col",
|
|
1912
1930
|
ref_for: !0
|
|
1913
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))),
|
|
1931
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), Q({ _: 2 }, [
|
|
1914
1932
|
e.options?.input?.prepend ? {
|
|
1915
1933
|
name: "prepend",
|
|
1916
1934
|
fn: y(() => [
|
|
@@ -1918,7 +1936,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1918
1936
|
]),
|
|
1919
1937
|
key: "0"
|
|
1920
1938
|
} : void 0
|
|
1921
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (
|
|
1939
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), g(a(G), V({
|
|
1922
1940
|
key: 1,
|
|
1923
1941
|
modelValue: r[e.key],
|
|
1924
1942
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
@@ -1927,14 +1945,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1927
1945
|
ref_for: !0
|
|
1928
1946
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), {
|
|
1929
1947
|
default: y(() => [
|
|
1930
|
-
(
|
|
1948
|
+
(u(!0), b($, null, A(e.options?.search?.select?.data || e.options?.select?.data, (d) => (u(), g(a(K), {
|
|
1931
1949
|
key: d.value,
|
|
1932
1950
|
label: d.label,
|
|
1933
1951
|
value: d.value
|
|
1934
1952
|
}, null, 8, ["label", "value"]))), 128))
|
|
1935
1953
|
]),
|
|
1936
1954
|
_: 2
|
|
1937
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (
|
|
1955
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (u(), g(a(Z), V({
|
|
1938
1956
|
key: 2,
|
|
1939
1957
|
modelValue: r[e.key],
|
|
1940
1958
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
@@ -1946,15 +1964,15 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1946
1964
|
row: r,
|
|
1947
1965
|
item: e
|
|
1948
1966
|
})
|
|
1949
|
-
], 2)) : (
|
|
1950
|
-
s.conf.update.type ===
|
|
1951
|
-
e.type === "input" ? (
|
|
1967
|
+
], 2)) : (u(), b($, { key: 1 }, [
|
|
1968
|
+
s.conf.update.type === a(M).EDialog.Update && a(o)(e.show?.form, s.conf.update.form, a(M).EDialog.Update) && s.option.table?.inlineEdit && s.conf.update.form[s.option.table?.rowKey] === r[s.option.table?.rowKey] && (e.type === "input" || e.type === "select") ? (u(), b($, { key: 0 }, [
|
|
1969
|
+
e.type === "input" ? (u(), g(a(x), V({
|
|
1952
1970
|
key: 0,
|
|
1953
1971
|
modelValue: s.conf.update.form[e.key],
|
|
1954
1972
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
1955
1973
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1956
1974
|
ref_for: !0
|
|
1957
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }),
|
|
1975
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), Q({ _: 2 }, [
|
|
1958
1976
|
e.options?.input?.prepend ? {
|
|
1959
1977
|
name: "prepend",
|
|
1960
1978
|
fn: y(() => [
|
|
@@ -1962,7 +1980,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1962
1980
|
]),
|
|
1963
1981
|
key: "0"
|
|
1964
1982
|
} : void 0
|
|
1965
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (
|
|
1983
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), g(a(G), V({
|
|
1966
1984
|
key: 1,
|
|
1967
1985
|
modelValue: s.conf.update.form[e.key],
|
|
1968
1986
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
@@ -1970,14 +1988,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1970
1988
|
ref_for: !0
|
|
1971
1989
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
1972
1990
|
default: y(() => [
|
|
1973
|
-
(
|
|
1991
|
+
(u(!0), b($, null, A(e.options?.search?.select?.data || e.options?.select?.data, (d) => (u(), g(a(K), {
|
|
1974
1992
|
key: d.value,
|
|
1975
1993
|
label: d.label,
|
|
1976
1994
|
value: d.value
|
|
1977
1995
|
}, null, 8, ["label", "value"]))), 128))
|
|
1978
1996
|
]),
|
|
1979
1997
|
_: 2
|
|
1980
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (
|
|
1998
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (u(), g(a(Z), V({
|
|
1981
1999
|
key: 2,
|
|
1982
2000
|
modelValue: s.conf.update.form[e.key],
|
|
1983
2001
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
@@ -1990,21 +2008,21 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1990
2008
|
row: r,
|
|
1991
2009
|
item: e
|
|
1992
2010
|
}, () => [
|
|
1993
|
-
|
|
2011
|
+
a(j).customComponent[e.type ?? ""]?.table ? (u(), g(W(a(j).customComponent[e.type ?? ""]?.table), V({
|
|
1994
2012
|
key: 0,
|
|
1995
2013
|
modelValue: r[e.key],
|
|
1996
2014
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1997
2015
|
ref_for: !0
|
|
1998
|
-
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (
|
|
1999
|
-
e.options?.switch?.tableConfig?.change ? (
|
|
2016
|
+
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (u(), b($, { key: 1 }, [
|
|
2017
|
+
e.options?.switch?.tableConfig?.change ? (u(), g(a(Z), V({
|
|
2000
2018
|
key: 0,
|
|
2001
2019
|
modelValue: r[e.key],
|
|
2002
2020
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
2003
2021
|
loading: e.options?.switch?.loadingMap?.[r[s.option.table?.rowKey]]?.loading,
|
|
2004
2022
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2005
2023
|
ref_for: !0
|
|
2006
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (
|
|
2007
|
-
], 64)) : (
|
|
2024
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), b("span", st, O(r[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
2025
|
+
], 64)) : (u(), b("span", {
|
|
2008
2026
|
key: 2,
|
|
2009
2027
|
style: pe({
|
|
2010
2028
|
"--table-text-click-color": e.table?.click?.color
|
|
@@ -2012,7 +2030,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2012
2030
|
class: I({ "table-text-click": e.table?.click?.callback }),
|
|
2013
2031
|
onClick: (d) => e.table?.click?.callback?.(r),
|
|
2014
2032
|
innerHTML: e.table?.format ? e.table?.format(r) : r[e.key]
|
|
2015
|
-
}, null, 14,
|
|
2033
|
+
}, null, 14, dt))
|
|
2016
2034
|
])
|
|
2017
2035
|
], 64))
|
|
2018
2036
|
], 64))
|
|
@@ -2023,175 +2041,175 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2023
2041
|
], 64))), 128);
|
|
2024
2042
|
};
|
|
2025
2043
|
}
|
|
2026
|
-
}),
|
|
2044
|
+
}), ft = {
|
|
2027
2045
|
class: "row form-item-content",
|
|
2028
2046
|
style: { width: "100%" }
|
|
2029
|
-
},
|
|
2047
|
+
}, pt = { class: "col column form-item-content-item" }, ct = { class: "col" }, mt = ["innerHTML"], ht = /* @__PURE__ */ J({
|
|
2030
2048
|
__name: "formColumn",
|
|
2031
2049
|
props: {
|
|
2032
2050
|
conf: {},
|
|
2033
2051
|
item: {}
|
|
2034
2052
|
},
|
|
2035
|
-
setup(
|
|
2036
|
-
return (
|
|
2037
|
-
label:
|
|
2038
|
-
prop:
|
|
2039
|
-
"label-width":
|
|
2053
|
+
setup(n) {
|
|
2054
|
+
return (o, p) => (u(), g(a(te), {
|
|
2055
|
+
label: o.item.item.text?.form?.label ?? o.item.item.label,
|
|
2056
|
+
prop: o.item.item.key,
|
|
2057
|
+
"label-width": o.item.item.text?.form?.label == "" ? 0 : o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
|
|
2040
2058
|
}, {
|
|
2041
2059
|
default: y(() => [
|
|
2042
|
-
|
|
2043
|
-
C(
|
|
2044
|
-
row:
|
|
2045
|
-
item:
|
|
2060
|
+
E("div", ft, [
|
|
2061
|
+
C(o.$slots, "form-" + o.item.item.key + "-start", {
|
|
2062
|
+
row: o.conf.update.form,
|
|
2063
|
+
item: o.item.item
|
|
2046
2064
|
}),
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
C(
|
|
2050
|
-
row:
|
|
2051
|
-
item:
|
|
2065
|
+
E("div", pt, [
|
|
2066
|
+
E("div", ct, [
|
|
2067
|
+
C(o.$slots, "form-" + o.item.item.key, {
|
|
2068
|
+
row: o.conf.update.form,
|
|
2069
|
+
item: o.item.item
|
|
2052
2070
|
}, () => [
|
|
2053
|
-
|
|
2071
|
+
o.item.item.type === "input" ? (u(), g(a(x), V({
|
|
2054
2072
|
key: 0,
|
|
2055
|
-
modelValue:
|
|
2056
|
-
"onUpdate:modelValue": p[0] || (p[0] = (s) =>
|
|
2057
|
-
},
|
|
2058
|
-
disabled:
|
|
2059
|
-
}),
|
|
2060
|
-
|
|
2073
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2074
|
+
"onUpdate:modelValue": p[0] || (p[0] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2075
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2076
|
+
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2077
|
+
}), Q({ _: 2 }, [
|
|
2078
|
+
o.item.item.options?.input?.prepend ? {
|
|
2061
2079
|
name: "prepend",
|
|
2062
2080
|
fn: y(() => [
|
|
2063
|
-
U(O(typeof
|
|
2081
|
+
U(O(typeof o.item.item.options?.input?.prepend == "function" ? o.item.item.options?.input?.prepend(o.conf.update.form) : o.item.item.options?.input?.prepend), 1)
|
|
2064
2082
|
]),
|
|
2065
2083
|
key: "0"
|
|
2066
2084
|
} : void 0
|
|
2067
|
-
]), 1040, ["modelValue", "disabled"])) :
|
|
2085
|
+
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (u(), g(a(Z), V({
|
|
2068
2086
|
key: 1,
|
|
2069
|
-
modelValue:
|
|
2070
|
-
"onUpdate:modelValue": p[1] || (p[1] = (s) =>
|
|
2071
|
-
},
|
|
2072
|
-
disabled:
|
|
2073
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2087
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2088
|
+
"onUpdate:modelValue": p[1] || (p[1] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2089
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2090
|
+
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2091
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (u(), g(a(G), V({
|
|
2074
2092
|
key: 2,
|
|
2075
|
-
modelValue:
|
|
2076
|
-
"onUpdate:modelValue": p[2] || (p[2] = (s) =>
|
|
2077
|
-
},
|
|
2078
|
-
disabled:
|
|
2093
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2094
|
+
"onUpdate:modelValue": p[2] || (p[2] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2095
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2096
|
+
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2079
2097
|
style: { width: "100%" }
|
|
2080
2098
|
}), {
|
|
2081
2099
|
default: y(() => [
|
|
2082
|
-
(
|
|
2100
|
+
(u(!0), b($, null, A(o.conf.update.getBind(o.item.item).data, (s) => (u(), g(a(K), {
|
|
2083
2101
|
key: s.value,
|
|
2084
2102
|
label: s.label,
|
|
2085
2103
|
value: s.value
|
|
2086
2104
|
}, null, 8, ["label", "value"]))), 128))
|
|
2087
2105
|
]),
|
|
2088
2106
|
_: 1
|
|
2089
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2107
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (u(), g(a(le), V({
|
|
2090
2108
|
key: 3,
|
|
2091
|
-
modelValue:
|
|
2092
|
-
"onUpdate:modelValue": p[3] || (p[3] = (s) =>
|
|
2093
|
-
},
|
|
2094
|
-
disabled:
|
|
2109
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2110
|
+
"onUpdate:modelValue": p[3] || (p[3] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2111
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2112
|
+
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2095
2113
|
style: { width: "100%" }
|
|
2096
2114
|
}), {
|
|
2097
2115
|
default: y(() => [
|
|
2098
|
-
(
|
|
2116
|
+
(u(!0), b($, null, A(o.conf.update.getBind(o.item.item).data, (s) => (u(), g(a(ne), {
|
|
2099
2117
|
key: s.value,
|
|
2100
2118
|
label: s.label,
|
|
2101
2119
|
value: s.value
|
|
2102
2120
|
}, null, 8, ["label", "value"]))), 128))
|
|
2103
2121
|
]),
|
|
2104
2122
|
_: 1
|
|
2105
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2123
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (u(), g(se, V({
|
|
2106
2124
|
key: 4,
|
|
2107
|
-
row:
|
|
2108
|
-
field:
|
|
2109
|
-
},
|
|
2110
|
-
disabled:
|
|
2125
|
+
row: o.conf.update.form,
|
|
2126
|
+
field: o.item.item.key
|
|
2127
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2128
|
+
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2111
2129
|
style: { width: "100%" }
|
|
2112
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
2130
|
+
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (u(), g(a(ue), V({
|
|
2113
2131
|
key: 5,
|
|
2114
|
-
modelValue:
|
|
2115
|
-
"onUpdate:modelValue": p[4] || (p[4] = (s) =>
|
|
2116
|
-
},
|
|
2117
|
-
disabled:
|
|
2132
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2133
|
+
"onUpdate:modelValue": p[4] || (p[4] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2134
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2135
|
+
disabled: o.conf.update.getDisabled(o.item.item),
|
|
2118
2136
|
style: { width: "100%" }
|
|
2119
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2137
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (u(), g(a(ie), V({
|
|
2120
2138
|
key: 6,
|
|
2121
|
-
modelValue:
|
|
2122
|
-
"onUpdate:modelValue": p[5] || (p[5] = (s) =>
|
|
2123
|
-
},
|
|
2124
|
-
disabled:
|
|
2125
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2139
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2140
|
+
"onUpdate:modelValue": p[5] || (p[5] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2141
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2142
|
+
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2143
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(j).customComponent[o.item.item.type] || a(j).customComponent[o.item.item.type]?.form) ? (u(), g(W(a(j).customComponent[o.item.item.type]?.form || a(j).customComponent[o.item.item.type]), V({
|
|
2126
2144
|
key: 7,
|
|
2127
|
-
modelValue:
|
|
2128
|
-
"onUpdate:modelValue": p[6] || (p[6] = (s) =>
|
|
2129
|
-
},
|
|
2130
|
-
disabled:
|
|
2145
|
+
modelValue: o.conf.update.form[o.item.item.key],
|
|
2146
|
+
"onUpdate:modelValue": p[6] || (p[6] = (s) => o.conf.update.form[o.item.item.key] = s)
|
|
2147
|
+
}, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
|
|
2148
|
+
disabled: o.conf.update.getDisabled(o.item.item)
|
|
2131
2149
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0)
|
|
2132
2150
|
]),
|
|
2133
|
-
C(
|
|
2134
|
-
row:
|
|
2135
|
-
item:
|
|
2151
|
+
C(o.$slots, "form-" + o.item.item.key + "-right", {
|
|
2152
|
+
row: o.conf.update.form,
|
|
2153
|
+
item: o.item.item
|
|
2136
2154
|
})
|
|
2137
2155
|
]),
|
|
2138
|
-
C(
|
|
2139
|
-
row:
|
|
2140
|
-
item:
|
|
2156
|
+
C(o.$slots, "form-" + o.item.item.key + "-tip", {
|
|
2157
|
+
row: o.conf.update.form,
|
|
2158
|
+
item: o.item.item
|
|
2141
2159
|
}, () => [
|
|
2142
|
-
|
|
2160
|
+
o.item.item.form?.tipText ? (u(), b("div", {
|
|
2143
2161
|
key: 0,
|
|
2144
2162
|
class: "form-tip-text",
|
|
2145
|
-
innerHTML: typeof
|
|
2146
|
-
}, null, 8,
|
|
2163
|
+
innerHTML: typeof o.item.item.form?.tipText == "function" ? o.item.item.form?.tipText(o.conf.update.form, o.conf.update.type) : o.item.item.form?.tipText
|
|
2164
|
+
}, null, 8, mt)) : v("", !0)
|
|
2147
2165
|
])
|
|
2148
2166
|
]),
|
|
2149
|
-
C(
|
|
2150
|
-
row:
|
|
2151
|
-
item:
|
|
2167
|
+
C(o.$slots, "form-" + o.item.item.key + "-end", {
|
|
2168
|
+
row: o.conf.update.form,
|
|
2169
|
+
item: o.item.item
|
|
2152
2170
|
})
|
|
2153
2171
|
])
|
|
2154
2172
|
]),
|
|
2155
2173
|
_: 3
|
|
2156
2174
|
}, 8, ["label", "prop", "label-width"]));
|
|
2157
2175
|
}
|
|
2158
|
-
}),
|
|
2176
|
+
}), gt = {}, yt = {
|
|
2159
2177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2160
2178
|
viewBox: "64 64 896 896"
|
|
2161
2179
|
};
|
|
2162
|
-
function
|
|
2163
|
-
return
|
|
2164
|
-
|
|
2180
|
+
function bt(n, o) {
|
|
2181
|
+
return u(), b("svg", yt, o[0] || (o[0] = [
|
|
2182
|
+
E("path", {
|
|
2165
2183
|
fill: "currentColor",
|
|
2166
2184
|
d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
|
|
2167
2185
|
}, null, -1)
|
|
2168
2186
|
]));
|
|
2169
2187
|
}
|
|
2170
|
-
const
|
|
2188
|
+
const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {}, vt = {
|
|
2171
2189
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2172
2190
|
viewBox: "64 64 896 896"
|
|
2173
2191
|
};
|
|
2174
|
-
function
|
|
2175
|
-
return
|
|
2176
|
-
|
|
2192
|
+
function Ct(n, o) {
|
|
2193
|
+
return u(), b("svg", vt, o[0] || (o[0] = [
|
|
2194
|
+
E("path", {
|
|
2177
2195
|
fill: "currentColor",
|
|
2178
2196
|
d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
|
|
2179
2197
|
}, null, -1)
|
|
2180
2198
|
]));
|
|
2181
2199
|
}
|
|
2182
|
-
const
|
|
2200
|
+
const Vt = /* @__PURE__ */ X(kt, [["render", Ct]]), zt = {
|
|
2183
2201
|
key: 0,
|
|
2184
2202
|
class: "relative curd-search fit-width"
|
|
2185
|
-
},
|
|
2203
|
+
}, $t = { class: "mb-10 flex justify-between items-center fit-width" }, Ut = {
|
|
2186
2204
|
class: "flex items-center",
|
|
2187
2205
|
style: { gap: "10px" }
|
|
2188
|
-
},
|
|
2206
|
+
}, Dt = { key: 0 }, Et = { key: 1 }, Ot = { key: 2 }, St = { class: "export-btn" }, Mt = {
|
|
2189
2207
|
key: 1,
|
|
2190
2208
|
class: "export-btn"
|
|
2191
|
-
},
|
|
2209
|
+
}, Tt = {
|
|
2192
2210
|
class: "flex items-center table-tools-right",
|
|
2193
2211
|
style: { gap: "10px" }
|
|
2194
|
-
},
|
|
2212
|
+
}, At = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, Ft = { class: "dialog-footer" }, Lt = { key: 0 }, jt = { key: 1 }, Bt = { class: "dialog-footer" }, Rt = /* @__PURE__ */ J({
|
|
2195
2213
|
__name: "index",
|
|
2196
2214
|
props: {
|
|
2197
2215
|
/**
|
|
@@ -2201,163 +2219,163 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2201
2219
|
default: {}
|
|
2202
2220
|
}
|
|
2203
2221
|
},
|
|
2204
|
-
setup(
|
|
2205
|
-
const p = M.EDialog, s =
|
|
2206
|
-
return
|
|
2222
|
+
setup(n, { expose: o }) {
|
|
2223
|
+
const p = M.EDialog, s = n, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } = Be(s);
|
|
2224
|
+
return o({
|
|
2207
2225
|
conf: t
|
|
2208
2226
|
}), (m, c) => {
|
|
2209
|
-
const
|
|
2210
|
-
return
|
|
2211
|
-
class: I(["relative cc1-form-box", [
|
|
2227
|
+
const f = _("el-tooltip"), k = Ce("loading");
|
|
2228
|
+
return u(), b("div", {
|
|
2229
|
+
class: I(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2212
2230
|
}, [
|
|
2213
|
-
|
|
2214
|
-
class: I(["row", [
|
|
2231
|
+
E("div", {
|
|
2232
|
+
class: I(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2215
2233
|
style: { overflow: "hidden" }
|
|
2216
2234
|
}, [
|
|
2217
2235
|
C(m.$slots, "box-left"),
|
|
2218
|
-
|
|
2219
|
-
class: I(["column fit-width no-wrap", [
|
|
2236
|
+
E("div", {
|
|
2237
|
+
class: I(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
|
|
2220
2238
|
}, [
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
model:
|
|
2239
|
+
n.option.search?.show !== !1 ? (u(), b("div", zt, [
|
|
2240
|
+
D(a(q), {
|
|
2241
|
+
model: a(t).search.form,
|
|
2224
2242
|
inline: "",
|
|
2225
|
-
size:
|
|
2243
|
+
size: n.option.size?.search
|
|
2226
2244
|
}, {
|
|
2227
2245
|
default: y(() => [
|
|
2228
2246
|
C(m.$slots, "search-start", {
|
|
2229
|
-
row:
|
|
2247
|
+
row: a(t).search.form
|
|
2230
2248
|
}),
|
|
2231
|
-
(
|
|
2232
|
-
key:
|
|
2249
|
+
(u(!0), b($, null, A(a(t).search.column.list, (i) => (u(), b($, {
|
|
2250
|
+
key: i.key
|
|
2233
2251
|
}, [
|
|
2234
|
-
C(m.$slots, "search-" +
|
|
2235
|
-
row:
|
|
2252
|
+
C(m.$slots, "search-" + i.key + "-start", {
|
|
2253
|
+
row: a(t).search.form
|
|
2236
2254
|
}),
|
|
2237
|
-
(typeof
|
|
2255
|
+
(typeof i.show?.search == "function" ? i.show?.search(a(t).search.form) : i.show?.search) ? (u(), g(a(te), {
|
|
2238
2256
|
key: 0,
|
|
2239
|
-
label:
|
|
2257
|
+
label: i.text?.search?.label ?? i.label
|
|
2240
2258
|
}, {
|
|
2241
2259
|
default: y(() => [
|
|
2242
|
-
C(m.$slots, "search-" +
|
|
2243
|
-
row:
|
|
2260
|
+
C(m.$slots, "search-" + i.key + "-left", {
|
|
2261
|
+
row: a(t).search.form
|
|
2244
2262
|
}),
|
|
2245
|
-
C(m.$slots, "search-" +
|
|
2246
|
-
row:
|
|
2263
|
+
C(m.$slots, "search-" + i.key, {
|
|
2264
|
+
row: a(t).search.form
|
|
2247
2265
|
}, () => [
|
|
2248
|
-
|
|
2266
|
+
a(j).customComponent[i.type ?? ""]?.search ? (u(), g(W(a(j).customComponent[i.type ?? ""]?.search), V({
|
|
2249
2267
|
key: 0,
|
|
2250
|
-
modelValue:
|
|
2251
|
-
"onUpdate:modelValue": (h) =>
|
|
2268
|
+
modelValue: a(t).search.form[i.key],
|
|
2269
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2252
2270
|
ref_for: !0
|
|
2253
|
-
},
|
|
2271
|
+
}, i.options?.search?.[i.type ?? ""], z(i.options?.search?.[i.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type === "input" ? (u(), g(a(x), V({
|
|
2254
2272
|
key: 1,
|
|
2255
|
-
modelValue:
|
|
2256
|
-
"onUpdate:modelValue": (h) =>
|
|
2257
|
-
placeholder:
|
|
2273
|
+
modelValue: a(t).search.form[i.key],
|
|
2274
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2275
|
+
placeholder: a(t).search.getPlaceholder(i),
|
|
2258
2276
|
clearable: "",
|
|
2259
|
-
disabled:
|
|
2277
|
+
disabled: i.disabled?.search,
|
|
2260
2278
|
ref_for: !0
|
|
2261
|
-
},
|
|
2279
|
+
}, i.options?.search?.input || i.options?.input, z(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (u(), g(a(G), V({
|
|
2262
2280
|
key: 2,
|
|
2263
|
-
modelValue:
|
|
2264
|
-
"onUpdate:modelValue": (h) =>
|
|
2265
|
-
placeholder:
|
|
2281
|
+
modelValue: a(t).search.form[i.key],
|
|
2282
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2283
|
+
placeholder: a(t).search.getPlaceholder(i, a(w).tCurd("placeholderSelect")),
|
|
2266
2284
|
clearable: "",
|
|
2267
|
-
disabled:
|
|
2285
|
+
disabled: i.disabled?.search,
|
|
2268
2286
|
ref_for: !0
|
|
2269
|
-
},
|
|
2287
|
+
}, i.options?.search?.switch || i.options?.switch, z(i.options?.search?.switch?.on || i.options?.switch?.on || {})), {
|
|
2270
2288
|
default: y(() => [
|
|
2271
|
-
(
|
|
2272
|
-
key:
|
|
2273
|
-
label:
|
|
2274
|
-
value:
|
|
2289
|
+
(u(), g(a(K), {
|
|
2290
|
+
key: i.options?.switch?.activeValue,
|
|
2291
|
+
label: i.options?.switch?.activeText,
|
|
2292
|
+
value: i.options?.switch?.activeValue
|
|
2275
2293
|
}, null, 8, ["label", "value"])),
|
|
2276
|
-
(
|
|
2277
|
-
key:
|
|
2278
|
-
label:
|
|
2279
|
-
value:
|
|
2294
|
+
(u(), g(a(K), {
|
|
2295
|
+
key: i.options?.switch?.inactiveValue,
|
|
2296
|
+
label: i.options?.switch?.inactiveText,
|
|
2297
|
+
value: i.options?.switch?.inactiveValue
|
|
2280
2298
|
}, null, 8, ["label", "value"]))
|
|
2281
2299
|
]),
|
|
2282
2300
|
_: 2
|
|
2283
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2301
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (u(), g(a(G), V({
|
|
2284
2302
|
key: 3,
|
|
2285
|
-
modelValue:
|
|
2286
|
-
"onUpdate:modelValue": (h) =>
|
|
2287
|
-
placeholder:
|
|
2303
|
+
modelValue: a(t).search.form[i.key],
|
|
2304
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2305
|
+
placeholder: a(t).search.getPlaceholder(i, a(w).tCurd("placeholderSelect")),
|
|
2288
2306
|
clearable: "",
|
|
2289
|
-
disabled:
|
|
2307
|
+
disabled: i.disabled?.search,
|
|
2290
2308
|
ref_for: !0
|
|
2291
|
-
},
|
|
2309
|
+
}, i.options?.search?.select || i.options?.select, z(i.options?.search?.select?.on || i.options?.select?.on || {})), {
|
|
2292
2310
|
default: y(() => [
|
|
2293
|
-
(
|
|
2311
|
+
(u(!0), b($, null, A(i.options?.select?.data, (h) => (u(), g(a(K), {
|
|
2294
2312
|
key: h.value,
|
|
2295
2313
|
label: h.label,
|
|
2296
2314
|
value: h.value
|
|
2297
2315
|
}, null, 8, ["label", "value"]))), 128))
|
|
2298
2316
|
]),
|
|
2299
2317
|
_: 2
|
|
2300
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2318
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "radio" ? (u(), g(a(le), V({
|
|
2301
2319
|
key: 4,
|
|
2302
|
-
modelValue:
|
|
2303
|
-
"onUpdate:modelValue": (h) =>
|
|
2304
|
-
disabled:
|
|
2320
|
+
modelValue: a(t).search.form[i.key],
|
|
2321
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2322
|
+
disabled: i.disabled?.search,
|
|
2305
2323
|
ref_for: !0
|
|
2306
|
-
},
|
|
2324
|
+
}, i.options?.search?.radio || i.options?.radio, z(i.options?.search?.radio?.on || i.options?.radio?.on || {})), {
|
|
2307
2325
|
default: y(() => [
|
|
2308
|
-
(
|
|
2326
|
+
(u(!0), b($, null, A(i.options?.radio?.data, (h) => (u(), g(a(ne), {
|
|
2309
2327
|
key: h.value,
|
|
2310
2328
|
label: h.label,
|
|
2311
2329
|
value: h.value
|
|
2312
2330
|
}, null, 8, ["label", "value"]))), 128))
|
|
2313
2331
|
]),
|
|
2314
2332
|
_: 2
|
|
2315
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
2333
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type === "datetime" ? (u(), g(a(ie), V({
|
|
2316
2334
|
key: 5,
|
|
2317
|
-
modelValue:
|
|
2318
|
-
"onUpdate:modelValue": (h) =>
|
|
2319
|
-
disabled:
|
|
2335
|
+
modelValue: a(t).search.form[i.key],
|
|
2336
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2337
|
+
disabled: i.disabled?.search,
|
|
2320
2338
|
ref_for: !0
|
|
2321
|
-
},
|
|
2339
|
+
}, i.options?.search?.datetime || i.options?.datetime, z(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && a(j).customComponent[i.type] ? (u(), g(W(a(j).customComponent[i.type]), V({
|
|
2322
2340
|
key: 6,
|
|
2323
|
-
modelValue:
|
|
2324
|
-
"onUpdate:modelValue": (h) =>
|
|
2341
|
+
modelValue: a(t).search.form[i.key],
|
|
2342
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2325
2343
|
ref_for: !0
|
|
2326
|
-
},
|
|
2327
|
-
disabled:
|
|
2344
|
+
}, i.options?.search?.[i.type] || i.options?.[i.type], z(i.options?.search?.[i.type]?.on || i.options?.[i.type]?.on || {}), {
|
|
2345
|
+
disabled: i.disabled?.search
|
|
2328
2346
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2329
2347
|
]),
|
|
2330
|
-
C(m.$slots, "search-" +
|
|
2331
|
-
row:
|
|
2348
|
+
C(m.$slots, "search-" + i.key + "-right", {
|
|
2349
|
+
row: a(t).search.form
|
|
2332
2350
|
})
|
|
2333
2351
|
]),
|
|
2334
2352
|
_: 2
|
|
2335
2353
|
}, 1032, ["label"])) : v("", !0),
|
|
2336
|
-
C(m.$slots, "search-" +
|
|
2337
|
-
row:
|
|
2354
|
+
C(m.$slots, "search-" + i.key + "-end", {
|
|
2355
|
+
row: a(t).search.form
|
|
2338
2356
|
})
|
|
2339
2357
|
], 64))), 128)),
|
|
2340
2358
|
C(m.$slots, "search-center", {
|
|
2341
|
-
row:
|
|
2359
|
+
row: a(t).search.form
|
|
2342
2360
|
}),
|
|
2343
|
-
|
|
2361
|
+
n.option.tools?.search || n.option.tools?.reset ? (u(), g(a(te), { key: 0 }, {
|
|
2344
2362
|
default: y(() => [
|
|
2345
|
-
|
|
2363
|
+
n.option.tools?.search ? (u(), g(a(L), {
|
|
2346
2364
|
key: 0,
|
|
2347
2365
|
type: "primary",
|
|
2348
|
-
onClick:
|
|
2366
|
+
onClick: a(t).search.submit
|
|
2349
2367
|
}, {
|
|
2350
2368
|
default: y(() => [
|
|
2351
|
-
U(O(
|
|
2369
|
+
U(O(a(w).tCurd("search")), 1)
|
|
2352
2370
|
]),
|
|
2353
2371
|
_: 1
|
|
2354
2372
|
}, 8, ["onClick"])) : v("", !0),
|
|
2355
|
-
|
|
2373
|
+
n.option.tools?.reset ? (u(), g(a(L), {
|
|
2356
2374
|
key: 1,
|
|
2357
|
-
onClick:
|
|
2375
|
+
onClick: a(t).search.reset
|
|
2358
2376
|
}, {
|
|
2359
2377
|
default: y(() => [
|
|
2360
|
-
U(O(
|
|
2378
|
+
U(O(a(w).tCurd("reset")), 1)
|
|
2361
2379
|
]),
|
|
2362
2380
|
_: 1
|
|
2363
2381
|
}, 8, ["onClick"])) : v("", !0)
|
|
@@ -2365,84 +2383,84 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2365
2383
|
_: 1
|
|
2366
2384
|
})) : v("", !0),
|
|
2367
2385
|
C(m.$slots, "search-end", {
|
|
2368
|
-
row:
|
|
2386
|
+
row: a(t).search.form
|
|
2369
2387
|
})
|
|
2370
2388
|
]),
|
|
2371
2389
|
_: 3
|
|
2372
2390
|
}, 8, ["model", "size"])
|
|
2373
2391
|
])) : v("", !0),
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2392
|
+
E("div", $t, [
|
|
2393
|
+
E("div", Ut, [
|
|
2394
|
+
a(l)(n.option.tools?.add) ? (u(), b("div", Dt, [
|
|
2395
|
+
D(a(L), {
|
|
2378
2396
|
type: "primary",
|
|
2379
|
-
onClick: c[0] || (c[0] = (
|
|
2380
|
-
size:
|
|
2397
|
+
onClick: c[0] || (c[0] = (i) => a(t).update.open(a(p).Add)),
|
|
2398
|
+
size: n.option.size?.search
|
|
2381
2399
|
}, {
|
|
2382
2400
|
default: y(() => [
|
|
2383
|
-
U(O(
|
|
2401
|
+
U(O(a(w).tCurd("add")), 1)
|
|
2384
2402
|
]),
|
|
2385
2403
|
_: 1
|
|
2386
2404
|
}, 8, ["size"])
|
|
2387
2405
|
])) : v("", !0),
|
|
2388
|
-
|
|
2389
|
-
|
|
2406
|
+
n.option.table?.selectable && a(l)(n.option.tools?.delete) ? (u(), b("div", Et, [
|
|
2407
|
+
D(a(L), {
|
|
2390
2408
|
type: "danger",
|
|
2391
|
-
onClick: c[1] || (c[1] = (
|
|
2392
|
-
size:
|
|
2409
|
+
onClick: c[1] || (c[1] = (i) => a(t).remove.open(a(t).table.selection.list)),
|
|
2410
|
+
size: n.option.size?.search
|
|
2393
2411
|
}, {
|
|
2394
2412
|
default: y(() => [
|
|
2395
|
-
U(O(
|
|
2413
|
+
U(O(a(w).tCurd("delete")), 1)
|
|
2396
2414
|
]),
|
|
2397
2415
|
_: 1
|
|
2398
2416
|
}, 8, ["size"])
|
|
2399
2417
|
])) : v("", !0),
|
|
2400
|
-
|
|
2401
|
-
|
|
2418
|
+
n.option.tools?.expand ? (u(), b("div", Ot, [
|
|
2419
|
+
D(a(L), {
|
|
2402
2420
|
type: "warning",
|
|
2403
|
-
onClick: c[2] || (c[2] = (
|
|
2404
|
-
size:
|
|
2421
|
+
onClick: c[2] || (c[2] = (i) => a(t).table.expand.all()),
|
|
2422
|
+
size: n.option.size?.search
|
|
2405
2423
|
}, {
|
|
2406
2424
|
default: y(() => [
|
|
2407
|
-
U(O(
|
|
2425
|
+
U(O(a(w).tCurd("expandCollapse")), 1)
|
|
2408
2426
|
]),
|
|
2409
2427
|
_: 1
|
|
2410
2428
|
}, 8, ["size"])
|
|
2411
2429
|
])) : v("", !0),
|
|
2412
|
-
|
|
2413
|
-
|
|
2430
|
+
n.option.tools?.export?.show ? (u(), b($, { key: 3 }, [
|
|
2431
|
+
n.option.tools?.export?.dropdown?.show ? (u(), g(a(he), {
|
|
2414
2432
|
key: 0,
|
|
2415
|
-
onCommand:
|
|
2433
|
+
onCommand: a(t).export.click
|
|
2416
2434
|
}, {
|
|
2417
2435
|
dropdown: y(() => [
|
|
2418
|
-
|
|
2419
|
-
size:
|
|
2436
|
+
D(a(ge), {
|
|
2437
|
+
size: n.option.size?.search
|
|
2420
2438
|
}, {
|
|
2421
2439
|
default: y(() => [
|
|
2422
|
-
|
|
2440
|
+
n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || a(l)(n.option.tools?.delete)) ? (u(), g(a(oe), {
|
|
2423
2441
|
key: 0,
|
|
2424
2442
|
command: "select"
|
|
2425
2443
|
}, {
|
|
2426
2444
|
default: y(() => [
|
|
2427
|
-
U(O(
|
|
2445
|
+
U(O(a(w).tCurd("exportSelect")), 1)
|
|
2428
2446
|
]),
|
|
2429
2447
|
_: 1
|
|
2430
2448
|
})) : v("", !0),
|
|
2431
|
-
|
|
2449
|
+
n.option.tools?.export?.dropdown?.page ? (u(), g(a(oe), {
|
|
2432
2450
|
key: 1,
|
|
2433
2451
|
command: "page"
|
|
2434
2452
|
}, {
|
|
2435
2453
|
default: y(() => [
|
|
2436
|
-
U(O(
|
|
2454
|
+
U(O(a(w).tCurd("exportPage")), 1)
|
|
2437
2455
|
]),
|
|
2438
2456
|
_: 1
|
|
2439
2457
|
})) : v("", !0),
|
|
2440
|
-
|
|
2458
|
+
n.option.tools?.export?.dropdown?.all ? (u(), g(a(oe), {
|
|
2441
2459
|
key: 2,
|
|
2442
2460
|
command: "all"
|
|
2443
2461
|
}, {
|
|
2444
2462
|
default: y(() => [
|
|
2445
|
-
U(O(
|
|
2463
|
+
U(O(a(w).tCurd("exportAll")), 1)
|
|
2446
2464
|
]),
|
|
2447
2465
|
_: 1
|
|
2448
2466
|
})) : v("", !0)
|
|
@@ -2451,29 +2469,29 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2451
2469
|
}, 8, ["size"])
|
|
2452
2470
|
]),
|
|
2453
2471
|
default: y(() => [
|
|
2454
|
-
|
|
2455
|
-
|
|
2472
|
+
E("div", St, [
|
|
2473
|
+
D(a(L), {
|
|
2456
2474
|
type: "warning",
|
|
2457
|
-
loading:
|
|
2458
|
-
size:
|
|
2475
|
+
loading: a(t).export.loading,
|
|
2476
|
+
size: n.option.size?.search
|
|
2459
2477
|
}, {
|
|
2460
2478
|
default: y(() => [
|
|
2461
|
-
U(O(
|
|
2479
|
+
U(O(a(w).tCurd("export")), 1)
|
|
2462
2480
|
]),
|
|
2463
2481
|
_: 1
|
|
2464
2482
|
}, 8, ["loading", "size"])
|
|
2465
2483
|
])
|
|
2466
2484
|
]),
|
|
2467
2485
|
_: 1
|
|
2468
|
-
}, 8, ["onCommand"])) : (
|
|
2469
|
-
|
|
2486
|
+
}, 8, ["onCommand"])) : (u(), b("div", Mt, [
|
|
2487
|
+
D(a(L), {
|
|
2470
2488
|
type: "warning",
|
|
2471
|
-
loading:
|
|
2472
|
-
size:
|
|
2473
|
-
onClick: c[3] || (c[3] = (
|
|
2489
|
+
loading: a(t).export.loading,
|
|
2490
|
+
size: n.option.size?.search,
|
|
2491
|
+
onClick: c[3] || (c[3] = (i) => a(t).export.run.start("all"))
|
|
2474
2492
|
}, {
|
|
2475
2493
|
default: y(() => [
|
|
2476
|
-
U(O(
|
|
2494
|
+
U(O(a(w).tCurd("export")), 1)
|
|
2477
2495
|
]),
|
|
2478
2496
|
_: 1
|
|
2479
2497
|
}, 8, ["loading", "size"])
|
|
@@ -2481,68 +2499,68 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2481
2499
|
], 64)) : v("", !0),
|
|
2482
2500
|
C(m.$slots, "tools-left")
|
|
2483
2501
|
]),
|
|
2484
|
-
|
|
2502
|
+
E("div", Tt, [
|
|
2485
2503
|
C(m.$slots, "tools-right"),
|
|
2486
|
-
|
|
2504
|
+
a(t).page.showTools ? (u(), g(a(de), V({
|
|
2487
2505
|
key: 0,
|
|
2488
|
-
"current-page":
|
|
2489
|
-
"onUpdate:currentPage": c[4] || (c[4] = (
|
|
2490
|
-
"page-size":
|
|
2491
|
-
"onUpdate:pageSize": c[5] || (c[5] = (
|
|
2506
|
+
"current-page": a(t).page.num,
|
|
2507
|
+
"onUpdate:currentPage": c[4] || (c[4] = (i) => a(t).page.num = i),
|
|
2508
|
+
"page-size": a(t).page.size,
|
|
2509
|
+
"onUpdate:pageSize": c[5] || (c[5] = (i) => a(t).page.size = i),
|
|
2492
2510
|
background: "",
|
|
2493
|
-
"page-sizes":
|
|
2494
|
-
"pager-count":
|
|
2495
|
-
layout:
|
|
2496
|
-
total:
|
|
2497
|
-
size:
|
|
2498
|
-
onSizeChange:
|
|
2499
|
-
onCurrentChange:
|
|
2500
|
-
},
|
|
2501
|
-
|
|
2511
|
+
"page-sizes": a(t).page.sizeList,
|
|
2512
|
+
"pager-count": a(t).page.pagerCount,
|
|
2513
|
+
layout: a(t).page.layout,
|
|
2514
|
+
total: a(t).page.total,
|
|
2515
|
+
size: n.option.size?.table,
|
|
2516
|
+
onSizeChange: a(t).table.getList,
|
|
2517
|
+
onCurrentChange: a(t).table.getList
|
|
2518
|
+
}, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
|
|
2519
|
+
n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (u(), g(f, {
|
|
2502
2520
|
key: 1,
|
|
2503
2521
|
effect: "dark",
|
|
2504
|
-
content:
|
|
2522
|
+
content: a(t).table.header.group.expand ? a(w).tCurd("mergeColumn") : a(w).tCurd("expandColumn"),
|
|
2505
2523
|
placement: "top"
|
|
2506
2524
|
}, {
|
|
2507
2525
|
default: y(() => [
|
|
2508
|
-
|
|
2509
|
-
class: I(["refresh-btn", [
|
|
2526
|
+
E("div", {
|
|
2527
|
+
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2510
2528
|
onClick: c[6] || (c[6] = //@ts-ignore
|
|
2511
|
-
(...
|
|
2529
|
+
(...i) => a(t).table.header.group.toggleExpandAll && a(t).table.header.group.toggleExpandAll(...i))
|
|
2512
2530
|
}, [
|
|
2513
|
-
|
|
2531
|
+
a(t).table.header.group.expand ? (u(), g(wt, { key: 0 })) : (u(), g(Vt, { key: 1 }))
|
|
2514
2532
|
], 2)
|
|
2515
2533
|
]),
|
|
2516
2534
|
_: 1
|
|
2517
2535
|
}, 8, ["content"])) : v("", !0),
|
|
2518
|
-
|
|
2536
|
+
n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (u(), b("div", {
|
|
2519
2537
|
key: 2,
|
|
2520
|
-
class: I(["refresh-btn", [
|
|
2538
|
+
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2521
2539
|
onClick: c[7] || (c[7] = //@ts-ignore
|
|
2522
|
-
(...
|
|
2540
|
+
(...i) => a(t).table.getList && a(t).table.getList(...i))
|
|
2523
2541
|
}, [
|
|
2524
|
-
|
|
2542
|
+
D(Ne)
|
|
2525
2543
|
], 2)) : v("", !0)
|
|
2526
2544
|
])
|
|
2527
2545
|
]),
|
|
2528
|
-
|
|
2529
|
-
class: I(["fit-width relative form-box", [
|
|
2546
|
+
E("div", {
|
|
2547
|
+
class: I(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : "", n.option.table?.editMode ? "edit-mode" : ""]])
|
|
2530
2548
|
}, [
|
|
2531
|
-
|
|
2532
|
-
class: I(["column form-box-content", [
|
|
2549
|
+
E("div", {
|
|
2550
|
+
class: I(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2533
2551
|
}, [
|
|
2534
|
-
|
|
2552
|
+
Ve((u(), g(a(ye), V({
|
|
2535
2553
|
ref_key: "tableRef",
|
|
2536
2554
|
ref: d,
|
|
2537
|
-
data:
|
|
2538
|
-
border:
|
|
2539
|
-
onSelectionChange:
|
|
2540
|
-
onSortChange:
|
|
2541
|
-
"expand-row-keys":
|
|
2542
|
-
onExpandChange:
|
|
2543
|
-
},
|
|
2555
|
+
data: a(t).table.data,
|
|
2556
|
+
border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
|
|
2557
|
+
onSelectionChange: a(t).table.selection.change,
|
|
2558
|
+
onSortChange: a(t).table.sort.change,
|
|
2559
|
+
"expand-row-keys": a(t).table.expand.rowKeys,
|
|
2560
|
+
onExpandChange: a(t).table.expand.change
|
|
2561
|
+
}, n.option.table, z(n.option.table?.on || {})), {
|
|
2544
2562
|
default: y(() => [
|
|
2545
|
-
(typeof
|
|
2563
|
+
(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) || a(l)(n.option.tools?.delete) || n.option.tools?.export?.show && n.option.tools?.export?.select ? (u(), g(a(ee), V({
|
|
2546
2564
|
key: 0,
|
|
2547
2565
|
type: "selection",
|
|
2548
2566
|
width: "40",
|
|
@@ -2550,106 +2568,116 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2550
2568
|
fixed: "left",
|
|
2551
2569
|
"show-overflow-tooltip": !1,
|
|
2552
2570
|
className: "cc1-form-selectable-column"
|
|
2553
|
-
}, typeof
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2571
|
+
}, typeof n.option.table?.selectable == "object" ? n.option.table?.selectable : {}, z(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
|
|
2572
|
+
(typeof n.option.table?.index == "object" ? n.option.table?.index?.show : n.option.table?.index) ? (u(), g(a(ee), V({
|
|
2573
|
+
key: 1,
|
|
2574
|
+
type: "index",
|
|
2575
|
+
fixed: "left",
|
|
2576
|
+
width: "40",
|
|
2577
|
+
align: "center",
|
|
2578
|
+
label: "#",
|
|
2579
|
+
"show-overflow-tooltip": !1,
|
|
2580
|
+
className: "cc1-form-index-column"
|
|
2581
|
+
}, typeof n.option.table?.index == "object" ? n.option.table?.index : {}, z(typeof n.option.table?.index == "object" ? n.option.table?.index?.on || {} : {})), null, 16)) : v("", !0),
|
|
2582
|
+
D(ut, {
|
|
2583
|
+
conf: a(t),
|
|
2584
|
+
columnList: a(t).table.column.list,
|
|
2585
|
+
option: n.option
|
|
2586
|
+
}, Q({ _: 2 }, [
|
|
2587
|
+
A(m.$slots, (i, h) => ({
|
|
2560
2588
|
name: h,
|
|
2561
2589
|
fn: y((S) => [
|
|
2562
|
-
C(m.$slots, h,
|
|
2590
|
+
C(m.$slots, h, ze($e(S || {})))
|
|
2563
2591
|
])
|
|
2564
2592
|
}))
|
|
2565
2593
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2566
|
-
|
|
2567
|
-
key:
|
|
2594
|
+
a(l)(n.option.table?.add) || a(l)(n.option.table?.update) || a(l)(n.option.table?.delete) || a(l)(n.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (u(), g(a(ee), V({
|
|
2595
|
+
key: 2,
|
|
2568
2596
|
width: "auto",
|
|
2569
2597
|
"max-width": "200",
|
|
2570
2598
|
align: "center",
|
|
2571
2599
|
fixed: "right"
|
|
2572
|
-
},
|
|
2600
|
+
}, n.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2573
2601
|
header: y(() => [
|
|
2574
2602
|
C(m.$slots, "table-header-op", {}, () => [
|
|
2575
|
-
U(O(
|
|
2603
|
+
U(O(a(w).tCurd("operation")), 1)
|
|
2576
2604
|
])
|
|
2577
2605
|
]),
|
|
2578
|
-
default: y(({ row:
|
|
2579
|
-
|
|
2580
|
-
size:
|
|
2606
|
+
default: y(({ row: i }) => [
|
|
2607
|
+
D(a(q), {
|
|
2608
|
+
size: n.option.size?.table
|
|
2581
2609
|
}, {
|
|
2582
2610
|
default: y(() => [
|
|
2583
|
-
C(m.$slots, "table-op-left", { row:
|
|
2584
|
-
|
|
2585
|
-
|
|
2611
|
+
C(m.$slots, "table-op-left", { row: i }),
|
|
2612
|
+
a(t).update.type === a(p).Update && n.option.table?.inlineEdit && a(t).update.form[s.option.table?.rowKey] === i[s.option.table?.rowKey] ? (u(), b($, { key: 0 }, [
|
|
2613
|
+
D(a(L), {
|
|
2586
2614
|
link: "",
|
|
2587
2615
|
type: "info",
|
|
2588
|
-
onClick:
|
|
2616
|
+
onClick: a(t).update.close
|
|
2589
2617
|
}, {
|
|
2590
2618
|
default: y(() => [
|
|
2591
|
-
U(O(
|
|
2619
|
+
U(O(a(w).tCurd("cancel")), 1)
|
|
2592
2620
|
]),
|
|
2593
2621
|
_: 1
|
|
2594
2622
|
}, 8, ["onClick"]),
|
|
2595
|
-
|
|
2623
|
+
D(a(L), {
|
|
2596
2624
|
link: "",
|
|
2597
2625
|
type: "primary",
|
|
2598
|
-
onClick:
|
|
2599
|
-
loading:
|
|
2626
|
+
onClick: a(t).update.submit,
|
|
2627
|
+
loading: a(t).update.loading
|
|
2600
2628
|
}, {
|
|
2601
2629
|
default: y(() => [
|
|
2602
|
-
U(O(
|
|
2630
|
+
U(O(a(w).tCurd("confirm")), 1)
|
|
2603
2631
|
]),
|
|
2604
2632
|
_: 1
|
|
2605
2633
|
}, 8, ["onClick", "loading"]),
|
|
2606
|
-
C(m.$slots, "table-op-edit-right", { row:
|
|
2607
|
-
], 64)) : (
|
|
2608
|
-
|
|
2634
|
+
C(m.$slots, "table-op-edit-right", { row: i })
|
|
2635
|
+
], 64)) : (u(), b($, { key: 1 }, [
|
|
2636
|
+
a(l)(n.option.table?.add, i) ? (u(), g(a(L), {
|
|
2609
2637
|
key: 0,
|
|
2610
2638
|
link: "",
|
|
2611
2639
|
type: "primary",
|
|
2612
|
-
onClick: (h) =>
|
|
2640
|
+
onClick: (h) => a(t).update.open(a(p).Add, i)
|
|
2613
2641
|
}, {
|
|
2614
2642
|
default: y(() => [
|
|
2615
|
-
U(O(
|
|
2643
|
+
U(O(a(w).tCurd("add")), 1)
|
|
2616
2644
|
]),
|
|
2617
2645
|
_: 2
|
|
2618
2646
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2619
|
-
|
|
2647
|
+
a(l)(n.option.table?.view, i) ? (u(), g(a(L), {
|
|
2620
2648
|
key: 1,
|
|
2621
2649
|
link: "",
|
|
2622
2650
|
type: "primary",
|
|
2623
|
-
onClick: (h) =>
|
|
2651
|
+
onClick: (h) => a(t).update.open(a(p).View, i)
|
|
2624
2652
|
}, {
|
|
2625
2653
|
default: y(() => [
|
|
2626
|
-
U(O(
|
|
2654
|
+
U(O(a(w).tCurd("view")), 1)
|
|
2627
2655
|
]),
|
|
2628
2656
|
_: 2
|
|
2629
2657
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2630
|
-
|
|
2658
|
+
a(l)(n.option.table?.update, i) ? (u(), g(a(L), {
|
|
2631
2659
|
key: 2,
|
|
2632
2660
|
link: "",
|
|
2633
2661
|
type: "warning",
|
|
2634
|
-
onClick: (h) =>
|
|
2662
|
+
onClick: (h) => a(t).update.open(a(p).Update, i)
|
|
2635
2663
|
}, {
|
|
2636
2664
|
default: y(() => [
|
|
2637
|
-
U(O(
|
|
2665
|
+
U(O(a(w).tCurd("edit")), 1)
|
|
2638
2666
|
]),
|
|
2639
2667
|
_: 2
|
|
2640
2668
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2641
|
-
|
|
2669
|
+
a(l)(n.option.table?.delete, i) ? (u(), g(a(L), {
|
|
2642
2670
|
key: 3,
|
|
2643
2671
|
link: "",
|
|
2644
2672
|
type: "danger",
|
|
2645
|
-
onClick: (h) =>
|
|
2673
|
+
onClick: (h) => a(t).remove.open([i])
|
|
2646
2674
|
}, {
|
|
2647
2675
|
default: y(() => [
|
|
2648
|
-
U(O(
|
|
2676
|
+
U(O(a(w).tCurd("delete")), 1)
|
|
2649
2677
|
]),
|
|
2650
2678
|
_: 2
|
|
2651
2679
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2652
|
-
C(m.$slots, "table-op-right", { row:
|
|
2680
|
+
C(m.$slots, "table-op-right", { row: i })
|
|
2653
2681
|
], 64))
|
|
2654
2682
|
]),
|
|
2655
2683
|
_: 2
|
|
@@ -2660,58 +2688,58 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2660
2688
|
]),
|
|
2661
2689
|
_: 3
|
|
2662
2690
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2663
|
-
[k,
|
|
2691
|
+
[k, a(t).table.loading]
|
|
2664
2692
|
])
|
|
2665
2693
|
], 2)
|
|
2666
2694
|
], 2),
|
|
2667
|
-
|
|
2668
|
-
(
|
|
2695
|
+
E("div", At, [
|
|
2696
|
+
(n.option.page?.show === void 0 || n.option.page?.show) && !a(t).page.showTools ? (u(), g(a(de), V({
|
|
2669
2697
|
key: 0,
|
|
2670
|
-
"current-page":
|
|
2671
|
-
"onUpdate:currentPage": c[8] || (c[8] = (
|
|
2672
|
-
"page-size":
|
|
2673
|
-
"onUpdate:pageSize": c[9] || (c[9] = (
|
|
2698
|
+
"current-page": a(t).page.num,
|
|
2699
|
+
"onUpdate:currentPage": c[8] || (c[8] = (i) => a(t).page.num = i),
|
|
2700
|
+
"page-size": a(t).page.size,
|
|
2701
|
+
"onUpdate:pageSize": c[9] || (c[9] = (i) => a(t).page.size = i),
|
|
2674
2702
|
background: "",
|
|
2675
|
-
"page-sizes":
|
|
2676
|
-
"pager-count":
|
|
2677
|
-
layout:
|
|
2678
|
-
total:
|
|
2679
|
-
size:
|
|
2680
|
-
onSizeChange:
|
|
2681
|
-
onCurrentChange:
|
|
2682
|
-
},
|
|
2703
|
+
"page-sizes": a(t).page.sizeList,
|
|
2704
|
+
"pager-count": a(t).page.pagerCount,
|
|
2705
|
+
layout: a(t).page.layout,
|
|
2706
|
+
total: a(t).page.total,
|
|
2707
|
+
size: n.option.size?.table,
|
|
2708
|
+
onSizeChange: a(t).table.getList,
|
|
2709
|
+
onCurrentChange: a(t).table.getList
|
|
2710
|
+
}, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2683
2711
|
])
|
|
2684
2712
|
], 2),
|
|
2685
2713
|
C(m.$slots, "box-right")
|
|
2686
2714
|
], 2),
|
|
2687
|
-
|
|
2688
|
-
modelValue:
|
|
2689
|
-
"onUpdate:modelValue": c[10] || (c[10] = (
|
|
2690
|
-
title:
|
|
2691
|
-
"before-close":
|
|
2692
|
-
},
|
|
2715
|
+
D(a(ae), V({
|
|
2716
|
+
modelValue: a(t).update.show,
|
|
2717
|
+
"onUpdate:modelValue": c[10] || (c[10] = (i) => a(t).update.show = i),
|
|
2718
|
+
title: a(t).update.title,
|
|
2719
|
+
"before-close": a(t).update.close
|
|
2720
|
+
}, n.option.dialog), {
|
|
2693
2721
|
footer: y(() => [
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
size:
|
|
2722
|
+
E("span", Ft, [
|
|
2723
|
+
D(a(q), {
|
|
2724
|
+
size: n.option.size?.form
|
|
2697
2725
|
}, {
|
|
2698
2726
|
default: y(() => [
|
|
2699
|
-
|
|
2700
|
-
onClick:
|
|
2727
|
+
D(a(L), {
|
|
2728
|
+
onClick: a(t).update.close
|
|
2701
2729
|
}, {
|
|
2702
2730
|
default: y(() => [
|
|
2703
|
-
U(O(
|
|
2731
|
+
U(O(a(w).tCurd("close")), 1)
|
|
2704
2732
|
]),
|
|
2705
2733
|
_: 1
|
|
2706
2734
|
}, 8, ["onClick"]),
|
|
2707
|
-
|
|
2735
|
+
a(t).update.type !== a(p).View ? (u(), g(a(L), {
|
|
2708
2736
|
key: 0,
|
|
2709
2737
|
type: "primary",
|
|
2710
|
-
onClick:
|
|
2711
|
-
loading:
|
|
2738
|
+
onClick: a(t).update.submit,
|
|
2739
|
+
loading: a(t).update.loading
|
|
2712
2740
|
}, {
|
|
2713
2741
|
default: y(() => [
|
|
2714
|
-
U(O(
|
|
2742
|
+
U(O(a(w).tCurd("submit")), 1)
|
|
2715
2743
|
]),
|
|
2716
2744
|
_: 1
|
|
2717
2745
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
@@ -2721,55 +2749,55 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2721
2749
|
])
|
|
2722
2750
|
]),
|
|
2723
2751
|
default: y(() => [
|
|
2724
|
-
|
|
2752
|
+
D(a(q), {
|
|
2725
2753
|
ref_key: "ruleFormRef",
|
|
2726
2754
|
ref: r,
|
|
2727
|
-
model:
|
|
2728
|
-
rules:
|
|
2729
|
-
size:
|
|
2755
|
+
model: a(t).update.form,
|
|
2756
|
+
rules: a(t).update.rules,
|
|
2757
|
+
size: n.option.size?.form,
|
|
2730
2758
|
class: "update-dialog-form"
|
|
2731
2759
|
}, {
|
|
2732
2760
|
default: y(() => [
|
|
2733
|
-
|
|
2734
|
-
|
|
2761
|
+
a(t).update.showContent ? (u(!0), b($, { key: 0 }, A(a(t).update.formColumn, (i) => (u(), b($, null, [
|
|
2762
|
+
a(l)(
|
|
2735
2763
|
(() => {
|
|
2736
|
-
const h = [], S = (
|
|
2737
|
-
|
|
2764
|
+
const h = [], S = (B) => {
|
|
2765
|
+
B?.item?.children ? S(B.item.children) : h.push(...B.map((F) => F.item?.show?.form));
|
|
2738
2766
|
};
|
|
2739
|
-
return S(
|
|
2767
|
+
return S(i), h;
|
|
2740
2768
|
})(),
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
) ? (
|
|
2769
|
+
a(t).update.form,
|
|
2770
|
+
a(t).update.type
|
|
2771
|
+
) ? (u(), b("div", {
|
|
2744
2772
|
key: 0,
|
|
2745
2773
|
class: I(["row curd-row", {
|
|
2746
|
-
stripe:
|
|
2774
|
+
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
2747
2775
|
}])
|
|
2748
2776
|
}, [
|
|
2749
2777
|
C(m.$slots, "form-start", {
|
|
2750
|
-
row:
|
|
2778
|
+
row: a(t).update.form
|
|
2751
2779
|
}),
|
|
2752
|
-
(
|
|
2753
|
-
|
|
2780
|
+
(u(!0), b($, null, A(i, (h) => (u(), b($, null, [
|
|
2781
|
+
a(l)(h.item.show?.form, a(t).update.form, a(t).update.type) ? (u(), b("div", {
|
|
2754
2782
|
key: 0,
|
|
2755
|
-
class: I([h.item.form.span > 0 ? `col-${
|
|
2783
|
+
class: I([h.item.form.span > 0 ? `col-${a(t).getColumnSpan(h, i)}` : "col", `form-item-col-${h.item.key}`])
|
|
2756
2784
|
}, [
|
|
2757
|
-
(
|
|
2785
|
+
(u(!0), b($, null, A(h.item.children ? h.children : [h], (S) => (u(), g(ht, {
|
|
2758
2786
|
key: S.item.key,
|
|
2759
|
-
conf:
|
|
2787
|
+
conf: a(t),
|
|
2760
2788
|
item: S
|
|
2761
|
-
},
|
|
2762
|
-
|
|
2763
|
-
name:
|
|
2789
|
+
}, Q({ _: 2 }, [
|
|
2790
|
+
A(m.$slots, (B, F) => ({
|
|
2791
|
+
name: F,
|
|
2764
2792
|
fn: y((R) => [
|
|
2765
|
-
C(m.$slots,
|
|
2793
|
+
C(m.$slots, F, V({ ref_for: !0 }, R || {}))
|
|
2766
2794
|
])
|
|
2767
2795
|
}))
|
|
2768
2796
|
]), 1032, ["conf", "item"]))), 128))
|
|
2769
2797
|
], 2)) : v("", !0)
|
|
2770
2798
|
], 64))), 256)),
|
|
2771
2799
|
C(m.$slots, "form-end", {
|
|
2772
|
-
row:
|
|
2800
|
+
row: a(t).update.form
|
|
2773
2801
|
})
|
|
2774
2802
|
], 2)) : v("", !0)
|
|
2775
2803
|
], 64))), 256)) : v("", !0)
|
|
@@ -2779,33 +2807,33 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2779
2807
|
]),
|
|
2780
2808
|
_: 3
|
|
2781
2809
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2782
|
-
|
|
2783
|
-
modelValue:
|
|
2784
|
-
"onUpdate:modelValue": c[11] || (c[11] = (
|
|
2785
|
-
title:
|
|
2810
|
+
D(a(ae), {
|
|
2811
|
+
modelValue: a(t).remove.show,
|
|
2812
|
+
"onUpdate:modelValue": c[11] || (c[11] = (i) => a(t).remove.show = i),
|
|
2813
|
+
title: a(t).remove.title,
|
|
2786
2814
|
"close-on-click-modal": !1
|
|
2787
2815
|
}, {
|
|
2788
2816
|
footer: y(() => [
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
size:
|
|
2817
|
+
E("span", Bt, [
|
|
2818
|
+
D(a(q), {
|
|
2819
|
+
size: n.option.size?.form
|
|
2792
2820
|
}, {
|
|
2793
2821
|
default: y(() => [
|
|
2794
|
-
|
|
2795
|
-
onClick:
|
|
2822
|
+
D(a(L), {
|
|
2823
|
+
onClick: a(t).remove.close
|
|
2796
2824
|
}, {
|
|
2797
2825
|
default: y(() => [
|
|
2798
|
-
U(O(
|
|
2826
|
+
U(O(a(w).tCurd("close")), 1)
|
|
2799
2827
|
]),
|
|
2800
2828
|
_: 1
|
|
2801
2829
|
}, 8, ["onClick"]),
|
|
2802
|
-
|
|
2830
|
+
D(a(L), {
|
|
2803
2831
|
type: "danger",
|
|
2804
|
-
onClick:
|
|
2805
|
-
loading:
|
|
2832
|
+
onClick: a(t).remove.submit,
|
|
2833
|
+
loading: a(t).remove.loading
|
|
2806
2834
|
}, {
|
|
2807
2835
|
default: y(() => [
|
|
2808
|
-
U(O(
|
|
2836
|
+
U(O(a(w).tCurd("confirmDelete")), 1)
|
|
2809
2837
|
]),
|
|
2810
2838
|
_: 1
|
|
2811
2839
|
}, 8, ["onClick", "loading"])
|
|
@@ -2815,37 +2843,42 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2815
2843
|
])
|
|
2816
2844
|
]),
|
|
2817
2845
|
default: y(() => [
|
|
2818
|
-
|
|
2846
|
+
n.option.dialog?.delete?.content ? (u(), b("div", Lt, [
|
|
2847
|
+
D(Je, {
|
|
2848
|
+
content: n.option.dialog?.delete?.content,
|
|
2849
|
+
value: a(t).remove.items
|
|
2850
|
+
}, null, 8, ["content", "value"])
|
|
2851
|
+
])) : (u(), b("div", jt, O(a(w).tCurd("confirmDeleteMessage", a(t).remove.items.length)), 1))
|
|
2819
2852
|
]),
|
|
2820
2853
|
_: 1
|
|
2821
2854
|
}, 8, ["modelValue", "title"]),
|
|
2822
|
-
|
|
2855
|
+
D(Ie, {
|
|
2823
2856
|
ref_key: "switchConfirmRef",
|
|
2824
2857
|
ref: e,
|
|
2825
|
-
size:
|
|
2858
|
+
size: n.option.size?.form
|
|
2826
2859
|
}, null, 8, ["size"])
|
|
2827
2860
|
], 2);
|
|
2828
2861
|
};
|
|
2829
2862
|
}
|
|
2830
2863
|
});
|
|
2831
|
-
class
|
|
2864
|
+
class Nt {
|
|
2832
2865
|
/**
|
|
2833
2866
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2834
2867
|
*
|
|
2835
2868
|
* @param href - 文件的远程地址
|
|
2836
2869
|
* @param name - 下载后的文件名,默认 `'download.png'`
|
|
2837
2870
|
*/
|
|
2838
|
-
static async download(
|
|
2871
|
+
static async download(o, p = "download.png") {
|
|
2839
2872
|
const s = document.createElement("a");
|
|
2840
|
-
s.style.display = "none", s.href =
|
|
2873
|
+
s.style.display = "none", s.href = o, s.setAttribute("download", p), typeof s.download > "u" && s.setAttribute("target", "_blank"), document.body.appendChild(s), s.click(), document.body.removeChild(s), window.URL.revokeObjectURL(o);
|
|
2841
2874
|
}
|
|
2842
2875
|
/**
|
|
2843
2876
|
* 将json对象或者json数组导出为json文件保存
|
|
2844
2877
|
* @param data
|
|
2845
2878
|
* @param name
|
|
2846
2879
|
*/
|
|
2847
|
-
static exportJSONFile = (
|
|
2848
|
-
const s = new Blob([JSON.stringify(
|
|
2880
|
+
static exportJSONFile = (o, p) => {
|
|
2881
|
+
const s = new Blob([JSON.stringify(o)], { type: "application/json" }), l = URL.createObjectURL(s), t = document.createElement("a");
|
|
2849
2882
|
t.href = l, t.download = `${p || "config"}.json`, t.click();
|
|
2850
2883
|
};
|
|
2851
2884
|
/**
|
|
@@ -2853,10 +2886,10 @@ class Rt {
|
|
|
2853
2886
|
* @param param
|
|
2854
2887
|
* @returns
|
|
2855
2888
|
*/
|
|
2856
|
-
static importFile = async (
|
|
2889
|
+
static importFile = async (o) => new Promise((p, s) => {
|
|
2857
2890
|
const l = document.createElement("input");
|
|
2858
2891
|
l.type = "file";
|
|
2859
|
-
const t =
|
|
2892
|
+
const t = o?.accept || ".json";
|
|
2860
2893
|
l.accept = t, l.style.display = "none", l.onchange = (e) => {
|
|
2861
2894
|
const r = e.target.files[0];
|
|
2862
2895
|
if (!r) {
|
|
@@ -2873,26 +2906,26 @@ class Rt {
|
|
|
2873
2906
|
}, document.body.appendChild(l), l.click();
|
|
2874
2907
|
});
|
|
2875
2908
|
}
|
|
2876
|
-
const
|
|
2877
|
-
if (
|
|
2878
|
-
|
|
2879
|
-
for (const p in
|
|
2880
|
-
|
|
2909
|
+
const It = (n, o) => {
|
|
2910
|
+
if (n.component("TCurd", Rt), n.component("TFormList", se), n.component("TColumn", Le), o?.customComponent) {
|
|
2911
|
+
j.customComponent = o.customComponent;
|
|
2912
|
+
for (const p in o.customComponent)
|
|
2913
|
+
n.component(p, o.customComponent[p]);
|
|
2881
2914
|
}
|
|
2882
|
-
},
|
|
2883
|
-
install:
|
|
2915
|
+
}, Wt = {
|
|
2916
|
+
install: It
|
|
2884
2917
|
};
|
|
2885
2918
|
export {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2919
|
+
P as ArrUtil,
|
|
2920
|
+
je as ExcelUtil,
|
|
2921
|
+
Le as TColumn,
|
|
2922
|
+
Rt as TCurd,
|
|
2923
|
+
Nt as TFile,
|
|
2924
|
+
j as TForm,
|
|
2925
|
+
T as TFormConfig,
|
|
2893
2926
|
w as TFormI18n,
|
|
2894
2927
|
se as TFormList,
|
|
2895
2928
|
M as TSys,
|
|
2896
|
-
|
|
2897
|
-
|
|
2929
|
+
Wt as default,
|
|
2930
|
+
It as install
|
|
2898
2931
|
};
|