cc1-form 1.2.12 → 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 +630 -611
- 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 +9 -1
- package/dist/components/TCurd/index.vue.d.ts +20 -2
- package/dist/components/TCurd/indexType.d.ts +13 -1
- 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
|
*/
|
|
@@ -515,11 +515,11 @@ class A {
|
|
|
515
515
|
*
|
|
516
516
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
517
517
|
*/
|
|
518
|
-
static setConfig = (
|
|
519
|
-
|
|
518
|
+
static setConfig = (o) => {
|
|
519
|
+
T.config = ObjectUtil.deepMerge(T.config, o);
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
class
|
|
522
|
+
class j {
|
|
523
523
|
/**
|
|
524
524
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
525
525
|
*
|
|
@@ -537,8 +537,8 @@ class L {
|
|
|
537
537
|
* @param field - 字段的 key 值
|
|
538
538
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
539
539
|
*/
|
|
540
|
-
static findOptions = (
|
|
541
|
-
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());
|
|
542
542
|
if (s)
|
|
543
543
|
return s.options[l(s.type)];
|
|
544
544
|
};
|
|
@@ -558,8 +558,8 @@ class L {
|
|
|
558
558
|
}))
|
|
559
559
|
)
|
|
560
560
|
*/
|
|
561
|
-
static setOptionsData = (
|
|
562
|
-
const l =
|
|
561
|
+
static setOptionsData = (o, p, s) => {
|
|
562
|
+
const l = j.findOptions(o, p);
|
|
563
563
|
l && (l.data = s);
|
|
564
564
|
};
|
|
565
565
|
static form = {
|
|
@@ -571,14 +571,14 @@ class L {
|
|
|
571
571
|
* @param treeData 树形数据
|
|
572
572
|
* @param option 组件配置
|
|
573
573
|
*/
|
|
574
|
-
parentId: (
|
|
575
|
-
const t =
|
|
576
|
-
|
|
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 }]);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const Ue = {
|
|
582
582
|
search: "搜索",
|
|
583
583
|
add: "新增",
|
|
584
584
|
edit: "编辑",
|
|
@@ -597,6 +597,7 @@ const $e = {
|
|
|
597
597
|
cancel: "取消",
|
|
598
598
|
submit: "提交",
|
|
599
599
|
confirm: "确认",
|
|
600
|
+
deleteTitle: "删除提示",
|
|
600
601
|
confirmDelete: "确认删除",
|
|
601
602
|
confirmDeleteMessage: "确认要删除【{count}】条数据吗?",
|
|
602
603
|
placeholderInput: "请输入",
|
|
@@ -615,24 +616,24 @@ const $e = {
|
|
|
615
616
|
};
|
|
616
617
|
class w {
|
|
617
618
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
618
|
-
static t(
|
|
619
|
-
if (typeof
|
|
620
|
-
return
|
|
621
|
-
|
|
619
|
+
static t(o, ...p) {
|
|
620
|
+
if (typeof o == "function")
|
|
621
|
+
return o(...p);
|
|
622
|
+
o = String(o);
|
|
622
623
|
let s = 0;
|
|
623
|
-
return
|
|
624
|
+
return o.replace(/{([^}]+)}/g, (l, t) => s < p.length ? String(p[s++]) : `{${t}}`);
|
|
624
625
|
}
|
|
625
|
-
static setI18n = (
|
|
626
|
-
w.curd = ObjectUtil.deepMerge(w.curd,
|
|
626
|
+
static setI18n = (o) => {
|
|
627
|
+
w.curd = ObjectUtil.deepMerge(w.curd, o);
|
|
627
628
|
};
|
|
628
629
|
/** 解析curd国际化值 */
|
|
629
|
-
static tCurd(
|
|
630
|
-
return this.t(this.curd[
|
|
630
|
+
static tCurd(o, ...p) {
|
|
631
|
+
return this.t(this.curd[o], ...p);
|
|
631
632
|
}
|
|
632
633
|
/** curd表单 */
|
|
633
|
-
static curd =
|
|
634
|
+
static curd = Ue;
|
|
634
635
|
}
|
|
635
|
-
class
|
|
636
|
+
class P {
|
|
636
637
|
/**
|
|
637
638
|
* ID 生成函数,默认使用 `StrUtil.uuid()`,可覆盖为自定义实现
|
|
638
639
|
*/
|
|
@@ -642,14 +643,14 @@ class H {
|
|
|
642
643
|
* @param field 字段名
|
|
643
644
|
* @param row 行数据
|
|
644
645
|
*/
|
|
645
|
-
static setId = (
|
|
646
|
-
p[
|
|
647
|
-
const l =
|
|
648
|
-
p[
|
|
646
|
+
static setId = (o, p, s) => {
|
|
647
|
+
p[o] || (p[o] = []);
|
|
648
|
+
const l = T.config.table.rowKey;
|
|
649
|
+
p[o].forEach((t) => {
|
|
649
650
|
s.forEach((e) => {
|
|
650
651
|
let r = e.default ?? "";
|
|
651
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);
|
|
652
|
-
}), t[l] || (t[l] =
|
|
653
|
+
}), t[l] || (t[l] = P.getIdFun());
|
|
653
654
|
});
|
|
654
655
|
};
|
|
655
656
|
/**
|
|
@@ -659,17 +660,17 @@ class H {
|
|
|
659
660
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
660
661
|
* @param callback 回调函数
|
|
661
662
|
*/
|
|
662
|
-
static add = (
|
|
663
|
+
static add = (o, p, s, l) => {
|
|
663
664
|
const t = JSONUtil.cp(s);
|
|
664
|
-
|
|
665
|
-
const e =
|
|
666
|
-
p[
|
|
665
|
+
P.setId(o, p, s);
|
|
666
|
+
const e = T.config.table.rowKey;
|
|
667
|
+
p[o].push(
|
|
667
668
|
t.reduce(
|
|
668
669
|
(r, d) => {
|
|
669
670
|
let m = d.default ?? "";
|
|
670
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;
|
|
671
672
|
},
|
|
672
|
-
{ [e]:
|
|
673
|
+
{ [e]: P.getIdFun() }
|
|
673
674
|
)
|
|
674
675
|
), l?.(p);
|
|
675
676
|
};
|
|
@@ -680,9 +681,9 @@ class H {
|
|
|
680
681
|
* @param item 元素-如:{_id:''}
|
|
681
682
|
* @param callback 回调函数
|
|
682
683
|
*/
|
|
683
|
-
static remove = (
|
|
684
|
-
const t =
|
|
685
|
-
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);
|
|
686
687
|
};
|
|
687
688
|
/**
|
|
688
689
|
* 获取没有id的数据
|
|
@@ -690,21 +691,21 @@ class H {
|
|
|
690
691
|
* @param childernField 子级字段-如:list、children
|
|
691
692
|
* @returns 没有id的数据
|
|
692
693
|
*/
|
|
693
|
-
static getNoIdData = (
|
|
694
|
-
const s = JSONUtil.cp(
|
|
694
|
+
static getNoIdData = (o, p) => {
|
|
695
|
+
const s = JSONUtil.cp(o), l = T.config.table.rowKey;
|
|
695
696
|
return s.forEach((t) => {
|
|
696
|
-
t[l] && delete t[l], p && t[p] &&
|
|
697
|
+
t[l] && delete t[l], p && t[p] && P.getNoIdData(t[p], p);
|
|
697
698
|
}), s;
|
|
698
699
|
};
|
|
699
700
|
}
|
|
700
|
-
const
|
|
701
|
+
const De = {
|
|
701
702
|
key: 0,
|
|
702
703
|
class: "column curd-form-com-list",
|
|
703
704
|
style: { width: "100%", gap: "10px" }
|
|
704
|
-
},
|
|
705
|
+
}, Ee = { key: 0 }, Oe = {
|
|
705
706
|
class: "row items-center",
|
|
706
707
|
style: { gap: "10px", width: "100%" }
|
|
707
|
-
},
|
|
708
|
+
}, Se = { key: 1 }, se = /* @__PURE__ */ J({
|
|
708
709
|
__name: "list",
|
|
709
710
|
props: {
|
|
710
711
|
row: {
|
|
@@ -742,30 +743,30 @@ const Ue = {
|
|
|
742
743
|
}
|
|
743
744
|
},
|
|
744
745
|
emits: ["change"],
|
|
745
|
-
setup(n, { emit:
|
|
746
|
+
setup(n, { emit: o }) {
|
|
746
747
|
const p = n, s = re({
|
|
747
748
|
show: !1,
|
|
748
749
|
add: (t, e, r) => {
|
|
749
|
-
|
|
750
|
+
P.add(t, e, r, () => {
|
|
750
751
|
l("change");
|
|
751
752
|
});
|
|
752
753
|
},
|
|
753
754
|
remove: (t, e, r) => {
|
|
754
|
-
|
|
755
|
+
P.remove(t, e, r, () => {
|
|
755
756
|
l("change");
|
|
756
757
|
});
|
|
757
758
|
}
|
|
758
759
|
});
|
|
759
760
|
fe(() => {
|
|
760
|
-
|
|
761
|
+
P.setId(p.field, p.row, p.itemFields), s.show = !0;
|
|
761
762
|
});
|
|
762
|
-
const l =
|
|
763
|
+
const l = o;
|
|
763
764
|
return (t, e) => {
|
|
764
765
|
const r = _("el-button"), d = _("el-input");
|
|
765
|
-
return s.show ? (
|
|
766
|
+
return s.show ? (u(), b("div", De, [
|
|
766
767
|
C(t.$slots, "list-start", { row: n.row }),
|
|
767
|
-
n.addBottom ? v("", !0) : (
|
|
768
|
-
|
|
768
|
+
n.addBottom ? v("", !0) : (u(), b("div", Ee, [
|
|
769
|
+
D(r, {
|
|
769
770
|
link: "",
|
|
770
771
|
type: "primary",
|
|
771
772
|
onClick: e[0] || (e[0] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
@@ -776,24 +777,24 @@ const Ue = {
|
|
|
776
777
|
_: 1
|
|
777
778
|
})
|
|
778
779
|
])),
|
|
779
|
-
(
|
|
780
|
+
(u(!0), b($, null, A(n.row[n.field], (m) => (u(), b("div", Oe, [
|
|
780
781
|
C(t.$slots, "item-start", {
|
|
781
782
|
item: m,
|
|
782
783
|
row: n.row
|
|
783
784
|
}),
|
|
784
|
-
(
|
|
785
|
+
(u(!0), b($, null, A(n.itemFields, (c) => (u(), g(d, {
|
|
785
786
|
modelValue: m[c.value],
|
|
786
|
-
"onUpdate:modelValue": (
|
|
787
|
+
"onUpdate:modelValue": (f) => m[c.value] = f,
|
|
787
788
|
style: pe({ width: n.inputWidth }),
|
|
788
789
|
class: I(n.inputClass),
|
|
789
790
|
placeholder: c[n.label] || c[n.value],
|
|
790
|
-
onChange: e[1] || (e[1] = (
|
|
791
|
+
onChange: e[1] || (e[1] = (f) => l("change"))
|
|
791
792
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
792
793
|
C(t.$slots, "item-end", {
|
|
793
794
|
item: m,
|
|
794
795
|
row: n.row
|
|
795
796
|
}),
|
|
796
|
-
|
|
797
|
+
D(r, {
|
|
797
798
|
link: "",
|
|
798
799
|
type: "danger",
|
|
799
800
|
onClick: (c) => s.remove(n.field, n.row, m)
|
|
@@ -804,8 +805,8 @@ const Ue = {
|
|
|
804
805
|
_: 2
|
|
805
806
|
}, 1032, ["onClick"])
|
|
806
807
|
]))), 256)),
|
|
807
|
-
n.addBottom ? (
|
|
808
|
-
|
|
808
|
+
n.addBottom ? (u(), b("div", Se, [
|
|
809
|
+
D(r, {
|
|
809
810
|
link: "",
|
|
810
811
|
type: "primary",
|
|
811
812
|
onClick: e[2] || (e[2] = (m) => s.add(n.field, n.row, n.itemFields))
|
|
@@ -820,10 +821,10 @@ const Ue = {
|
|
|
820
821
|
])) : v("", !0);
|
|
821
822
|
};
|
|
822
823
|
}
|
|
823
|
-
}),
|
|
824
|
+
}), Me = {
|
|
824
825
|
class: "row form-item-content",
|
|
825
826
|
style: { width: "100%" }
|
|
826
|
-
},
|
|
827
|
+
}, Te = { class: "col" }, Ae = { class: "col" }, Fe = ["innerHTML"], Le = /* @__PURE__ */ J({
|
|
827
828
|
__name: "column",
|
|
828
829
|
props: {
|
|
829
830
|
/**
|
|
@@ -839,7 +840,7 @@ const Ue = {
|
|
|
839
840
|
default: ""
|
|
840
841
|
}
|
|
841
842
|
},
|
|
842
|
-
setup(n, { expose:
|
|
843
|
+
setup(n, { expose: o }) {
|
|
843
844
|
const p = M.isFun, s = M.EDialog, l = N(), t = n, e = re({
|
|
844
845
|
rules: {},
|
|
845
846
|
show: !0,
|
|
@@ -861,7 +862,7 @@ const Ue = {
|
|
|
861
862
|
const r = t.option;
|
|
862
863
|
e.formColumn = [], e.rules = {}, e.formDefault = {};
|
|
863
864
|
const d = [], m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2;
|
|
864
|
-
let
|
|
865
|
+
let f = [];
|
|
865
866
|
const k = (h) => {
|
|
866
867
|
if (h.children) {
|
|
867
868
|
h.children.forEach((S) => {
|
|
@@ -871,8 +872,8 @@ const Ue = {
|
|
|
871
872
|
}
|
|
872
873
|
if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
|
|
873
874
|
h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
|
|
874
|
-
const S = h.form.span, B =
|
|
875
|
-
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) {
|
|
876
877
|
const R = {
|
|
877
878
|
input: w.tCurd("placeholderInput"),
|
|
878
879
|
select: w.tCurd("placeholderSelect")
|
|
@@ -891,25 +892,25 @@ const Ue = {
|
|
|
891
892
|
};
|
|
892
893
|
r.column.forEach((h) => {
|
|
893
894
|
i(h, !0), k(h);
|
|
894
|
-
}),
|
|
895
|
+
}), f.length > 0 && d.push(f), e.formColumn = d, e.form = JSONUtil.cp(e.formDefault);
|
|
895
896
|
}
|
|
896
897
|
});
|
|
897
|
-
return e.initColumnForm(),
|
|
898
|
+
return e.initColumnForm(), o({
|
|
898
899
|
ref: l,
|
|
899
900
|
conf: e
|
|
900
|
-
}), (r, d) => (
|
|
901
|
+
}), (r, d) => (u(), g(a(q), {
|
|
901
902
|
ref_key: "ruleFormRef",
|
|
902
903
|
ref: l,
|
|
903
904
|
model: e.form,
|
|
904
905
|
rules: e.rules
|
|
905
906
|
}, {
|
|
906
907
|
default: y(() => [
|
|
907
|
-
e.show ? (
|
|
908
|
-
|
|
909
|
-
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),
|
|
910
911
|
e.form,
|
|
911
912
|
e.type
|
|
912
|
-
) ? (
|
|
913
|
+
) ? (u(), b("div", {
|
|
913
914
|
key: 0,
|
|
914
915
|
class: I(["row curd-row", {
|
|
915
916
|
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
@@ -918,129 +919,129 @@ const Ue = {
|
|
|
918
919
|
C(r.$slots, "form-start", {
|
|
919
920
|
row: e.form
|
|
920
921
|
}),
|
|
921
|
-
(
|
|
922
|
-
key:
|
|
922
|
+
(u(!0), b($, null, A(m, (f) => (u(), b($, {
|
|
923
|
+
key: f.item.key
|
|
923
924
|
}, [
|
|
924
|
-
|
|
925
|
+
a(p)(f.item.show?.form, e.form, e.type) ? (u(), b("div", {
|
|
925
926
|
key: 0,
|
|
926
|
-
class: I([
|
|
927
|
+
class: I([f.item.form.span > 0 ? `col-${e.getColumnSpan(f, m)}` : "col", `form-item-col-${f.item.key}`])
|
|
927
928
|
}, [
|
|
928
|
-
|
|
929
|
-
label:
|
|
930
|
-
prop:
|
|
931
|
-
"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"
|
|
932
933
|
}, {
|
|
933
934
|
default: y(() => [
|
|
934
|
-
|
|
935
|
-
C(r.$slots, "form-" +
|
|
935
|
+
E("div", Me, [
|
|
936
|
+
C(r.$slots, "form-" + f.item.key + "-start", {
|
|
936
937
|
row: e.form,
|
|
937
|
-
item:
|
|
938
|
+
item: f.item
|
|
938
939
|
}),
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
C(r.$slots, "form-" +
|
|
940
|
+
E("div", Te, [
|
|
941
|
+
E("div", Ae, [
|
|
942
|
+
C(r.$slots, "form-" + f.item.key, {
|
|
942
943
|
row: e.form,
|
|
943
|
-
item:
|
|
944
|
+
item: f.item
|
|
944
945
|
}, () => [
|
|
945
|
-
|
|
946
|
+
f.item.type === "input" ? (u(), g(a(x), V({
|
|
946
947
|
key: 0,
|
|
947
|
-
modelValue: e.form[
|
|
948
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
948
|
+
modelValue: e.form[f.item.key],
|
|
949
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
949
950
|
ref_for: !0
|
|
950
|
-
}, e.getBind(
|
|
951
|
-
disabled: e.getDisabled(
|
|
952
|
-
}), 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({
|
|
953
954
|
key: 1,
|
|
954
|
-
modelValue: e.form[
|
|
955
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
955
|
+
modelValue: e.form[f.item.key],
|
|
956
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
956
957
|
ref_for: !0
|
|
957
|
-
}, e.getBind(
|
|
958
|
-
disabled: e.getDisabled(
|
|
959
|
-
}), 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({
|
|
960
961
|
key: 2,
|
|
961
|
-
modelValue: e.form[
|
|
962
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
962
|
+
modelValue: e.form[f.item.key],
|
|
963
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
963
964
|
ref_for: !0
|
|
964
|
-
}, e.getBind(
|
|
965
|
-
disabled: e.getDisabled(
|
|
965
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
966
|
+
disabled: e.getDisabled(f.item),
|
|
966
967
|
style: { width: "100%" }
|
|
967
968
|
}), {
|
|
968
969
|
default: y(() => [
|
|
969
|
-
(
|
|
970
|
+
(u(!0), b($, null, A(f.item.options?.select?.data, (k) => (u(), g(a(K), {
|
|
970
971
|
key: k.value,
|
|
971
972
|
label: k.label,
|
|
972
973
|
value: k.value
|
|
973
974
|
}, null, 8, ["label", "value"]))), 128))
|
|
974
975
|
]),
|
|
975
976
|
_: 2
|
|
976
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
977
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "radio" ? (u(), g(a(le), V({
|
|
977
978
|
key: 3,
|
|
978
|
-
modelValue: e.form[
|
|
979
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
979
|
+
modelValue: e.form[f.item.key],
|
|
980
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
980
981
|
ref_for: !0
|
|
981
|
-
}, e.getBind(
|
|
982
|
-
disabled: e.getDisabled(
|
|
982
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
983
|
+
disabled: e.getDisabled(f.item),
|
|
983
984
|
style: { width: "100%" }
|
|
984
985
|
}), {
|
|
985
986
|
default: y(() => [
|
|
986
|
-
(
|
|
987
|
+
(u(!0), b($, null, A(f.item.options?.radio?.data, (k) => (u(), g(a(ne), {
|
|
987
988
|
key: k.value,
|
|
988
989
|
label: k.label,
|
|
989
990
|
value: k.value
|
|
990
991
|
}, null, 8, ["label", "value"]))), 128))
|
|
991
992
|
]),
|
|
992
993
|
_: 2
|
|
993
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
994
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "list" ? (u(), g(se, V({
|
|
994
995
|
key: 4,
|
|
995
996
|
row: e.form,
|
|
996
|
-
field:
|
|
997
|
+
field: f.item.key,
|
|
997
998
|
ref_for: !0
|
|
998
|
-
}, e.getBind(
|
|
999
|
-
disabled: e.getDisabled(
|
|
999
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1000
|
+
disabled: e.getDisabled(f.item),
|
|
1000
1001
|
style: { width: "100%" }
|
|
1001
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
1002
|
+
}), null, 16, ["row", "field", "disabled"])) : f.item.type === "treeSelect" ? (u(), g(a(ue), V({
|
|
1002
1003
|
key: 5,
|
|
1003
|
-
modelValue: e.form[
|
|
1004
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1004
|
+
modelValue: e.form[f.item.key],
|
|
1005
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1005
1006
|
ref_for: !0
|
|
1006
|
-
}, e.getBind(
|
|
1007
|
-
disabled: e.getDisabled(
|
|
1007
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1008
|
+
disabled: e.getDisabled(f.item),
|
|
1008
1009
|
style: { width: "100%" }
|
|
1009
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1010
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : f.item.type === "datetime" ? (u(), g(a(ie), V({
|
|
1010
1011
|
key: 6,
|
|
1011
|
-
modelValue: e.form[
|
|
1012
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1012
|
+
modelValue: e.form[f.item.key],
|
|
1013
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1013
1014
|
ref_for: !0
|
|
1014
|
-
}, e.getBind(
|
|
1015
|
-
disabled: e.getDisabled(
|
|
1016
|
-
}), 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({
|
|
1017
1018
|
key: 7,
|
|
1018
|
-
modelValue: e.form[
|
|
1019
|
-
"onUpdate:modelValue": (k) => e.form[
|
|
1019
|
+
modelValue: e.form[f.item.key],
|
|
1020
|
+
"onUpdate:modelValue": (k) => e.form[f.item.key] = k,
|
|
1020
1021
|
ref_for: !0
|
|
1021
|
-
}, e.getBind(
|
|
1022
|
-
disabled: e.getDisabled(
|
|
1022
|
+
}, e.getBind(f.item), z(e.getOn(f.item)), {
|
|
1023
|
+
disabled: e.getDisabled(f.item)
|
|
1023
1024
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
1024
1025
|
]),
|
|
1025
|
-
C(r.$slots, "form-" +
|
|
1026
|
+
C(r.$slots, "form-" + f.item.key + "-right", {
|
|
1026
1027
|
row: e.form,
|
|
1027
|
-
item:
|
|
1028
|
+
item: f.item
|
|
1028
1029
|
})
|
|
1029
1030
|
]),
|
|
1030
|
-
C(r.$slots, "form-" +
|
|
1031
|
+
C(r.$slots, "form-" + f.item.key + "-tip", {
|
|
1031
1032
|
row: e.form,
|
|
1032
|
-
item:
|
|
1033
|
+
item: f.item
|
|
1033
1034
|
}, () => [
|
|
1034
|
-
|
|
1035
|
+
f.item.form?.tipText ? (u(), b("div", {
|
|
1035
1036
|
key: 0,
|
|
1036
1037
|
class: "form-tip-text",
|
|
1037
|
-
innerHTML: typeof
|
|
1038
|
+
innerHTML: typeof f.item.form?.tipText == "function" ? f.item.form?.tipText(e.form, e.type) : f.item.form?.tipText
|
|
1038
1039
|
}, null, 8, Fe)) : v("", !0)
|
|
1039
1040
|
])
|
|
1040
1041
|
]),
|
|
1041
|
-
C(r.$slots, "form-" +
|
|
1042
|
+
C(r.$slots, "form-" + f.item.key + "-end", {
|
|
1042
1043
|
row: e.form,
|
|
1043
|
-
item:
|
|
1044
|
+
item: f.item
|
|
1044
1045
|
})
|
|
1045
1046
|
])
|
|
1046
1047
|
]),
|
|
@@ -1066,9 +1067,9 @@ class je {
|
|
|
1066
1067
|
* @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
|
|
1067
1068
|
* @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
|
|
1068
1069
|
*/
|
|
1069
|
-
static exportToExcel = async (
|
|
1070
|
-
if (!
|
|
1071
|
-
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) => {
|
|
1072
1073
|
const m = {};
|
|
1073
1074
|
return p.forEach((c) => {
|
|
1074
1075
|
m[c.label] = d[c.key];
|
|
@@ -1077,8 +1078,8 @@ class je {
|
|
|
1077
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`);
|
|
1078
1079
|
};
|
|
1079
1080
|
}
|
|
1080
|
-
const
|
|
1081
|
-
const
|
|
1081
|
+
const H = M.EDialog, Be = (n) => {
|
|
1082
|
+
const o = N(), p = N(), s = N(), l = re({
|
|
1082
1083
|
option: n.option,
|
|
1083
1084
|
/** 查询区域相关配置对象 */
|
|
1084
1085
|
search: {
|
|
@@ -1121,19 +1122,19 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1121
1122
|
/** 总条数 */
|
|
1122
1123
|
total: 0,
|
|
1123
1124
|
/** 分页控件的布局方式 */
|
|
1124
|
-
layout: n.option.page?.layout ||
|
|
1125
|
+
layout: n.option.page?.layout || T.config.pagination.layout,
|
|
1125
1126
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1126
|
-
showTools: n.option.page?.showTools ||
|
|
1127
|
+
showTools: n.option.page?.showTools || T.config.pagination.showTools,
|
|
1127
1128
|
/** 当前每页条数 */
|
|
1128
|
-
size: n.option.page?.size ||
|
|
1129
|
+
size: n.option.page?.size || T.config.pagination.size,
|
|
1129
1130
|
/** 支持切换的每页条数选项 */
|
|
1130
|
-
sizeList: n.option.page?.sizeList ||
|
|
1131
|
+
sizeList: n.option.page?.sizeList || T.config.pagination.pageSizes,
|
|
1131
1132
|
/** 分页器计数 */
|
|
1132
|
-
pagerCount: n.option.page?.pagerCount ||
|
|
1133
|
+
pagerCount: n.option.page?.pagerCount || T.config.pagination.pagerCount,
|
|
1133
1134
|
/** 获取分页查询参数 */
|
|
1134
1135
|
getQuery: (t = {}) => ({
|
|
1135
|
-
[
|
|
1136
|
-
[
|
|
1136
|
+
[T.config.field.page.size]: t.size || l.page.size,
|
|
1137
|
+
[T.config.field.page.num]: t.num || l.page.num,
|
|
1137
1138
|
...l.search.getFormData()
|
|
1138
1139
|
})
|
|
1139
1140
|
},
|
|
@@ -1211,7 +1212,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1211
1212
|
await l.initApiData("init");
|
|
1212
1213
|
let e = {};
|
|
1213
1214
|
if (l.table.sort.prop) {
|
|
1214
|
-
const { props: h, order: S } =
|
|
1215
|
+
const { props: h, order: S } = T.config.table.sort;
|
|
1215
1216
|
e = {
|
|
1216
1217
|
[h.field]: l.table.sort.prop,
|
|
1217
1218
|
[S.field]: l.table.sort.order
|
|
@@ -1220,11 +1221,11 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1220
1221
|
const r = await t({
|
|
1221
1222
|
...l.page.getQuery(),
|
|
1222
1223
|
...e
|
|
1223
|
-
}), d =
|
|
1224
|
+
}), d = T.config.field.result, m = r.data || { [d.list]: r };
|
|
1224
1225
|
let c = (Array.isArray(m[d.list]), m[d.list]);
|
|
1225
|
-
const
|
|
1226
|
-
const
|
|
1227
|
-
|
|
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]));
|
|
1228
1229
|
}), h));
|
|
1229
1230
|
l.table.data = n.option.data ? await n.option.data(i, c) : i, l.page.total = m[d.total] || 0;
|
|
1230
1231
|
} catch (e) {
|
|
@@ -1246,12 +1247,12 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1246
1247
|
l.table.selection.list = [];
|
|
1247
1248
|
const r = s.value;
|
|
1248
1249
|
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1249
|
-
const d = n.option.table?.rowKey, m = l.table.data, c = (
|
|
1250
|
+
const d = n.option.table?.rowKey, m = l.table.data, c = (f) => {
|
|
1250
1251
|
const k = (i) => {
|
|
1251
1252
|
for (const h of i) {
|
|
1252
1253
|
if (d != null && d !== "") {
|
|
1253
|
-
if (h[d] ===
|
|
1254
|
-
} else if (h ===
|
|
1254
|
+
if (h[d] === f[d]) return h;
|
|
1255
|
+
} else if (h === f)
|
|
1255
1256
|
return h;
|
|
1256
1257
|
if (Array.isArray(h.children) && h.children.length) {
|
|
1257
1258
|
const S = k(h.children);
|
|
@@ -1262,13 +1263,13 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1262
1263
|
return k(m);
|
|
1263
1264
|
};
|
|
1264
1265
|
be(() => {
|
|
1265
|
-
t.forEach((
|
|
1266
|
-
const k = c(
|
|
1266
|
+
t.forEach((f) => {
|
|
1267
|
+
const k = c(f) ?? f;
|
|
1267
1268
|
if (e) {
|
|
1268
1269
|
const i = () => {
|
|
1269
1270
|
r.toggleRowSelection(k, !0, !1);
|
|
1270
1271
|
};
|
|
1271
|
-
e(
|
|
1272
|
+
e(f) !== !1 && i();
|
|
1272
1273
|
} else
|
|
1273
1274
|
r.toggleRowSelection(k, !0, !1);
|
|
1274
1275
|
});
|
|
@@ -1283,8 +1284,8 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1283
1284
|
order: "",
|
|
1284
1285
|
/** 排序变更回调 */
|
|
1285
1286
|
change: (t) => {
|
|
1286
|
-
|
|
1287
|
-
const e =
|
|
1287
|
+
T.config.table.sort.resetPage && (l.page.num = 1);
|
|
1288
|
+
const e = T.config.table.sort;
|
|
1288
1289
|
if (e.change) {
|
|
1289
1290
|
e.change(t, l);
|
|
1290
1291
|
return;
|
|
@@ -1364,7 +1365,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1364
1365
|
num: 1
|
|
1365
1366
|
})
|
|
1366
1367
|
});
|
|
1367
|
-
return (e.data || { [
|
|
1368
|
+
return (e.data || { [T.config.field.result.list]: e })[T.config.field.result.list];
|
|
1368
1369
|
} catch (t) {
|
|
1369
1370
|
console.error(t);
|
|
1370
1371
|
} finally {
|
|
@@ -1392,7 +1393,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1392
1393
|
/** 弹窗loading */
|
|
1393
1394
|
loading: !1,
|
|
1394
1395
|
/** 当前操作类型,插入或修改 */
|
|
1395
|
-
type:
|
|
1396
|
+
type: H.Update,
|
|
1396
1397
|
/** 当前操作表单数据 */
|
|
1397
1398
|
form: {},
|
|
1398
1399
|
/** 表单默认值 */
|
|
@@ -1400,17 +1401,17 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1400
1401
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1401
1402
|
formColumn: [],
|
|
1402
1403
|
/** 判断是否禁用当前字段 */
|
|
1403
|
-
getDisabled: (t, e = !1) => n.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type ===
|
|
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"],
|
|
1404
1405
|
/** 获取表单组件绑定属性 */
|
|
1405
|
-
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] || {},
|
|
1406
1407
|
/** 获取表单组件事件属性 */
|
|
1407
1408
|
getOn: (t, e) => {
|
|
1408
|
-
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 = {};
|
|
1409
1410
|
return Object.keys(d).forEach((c) => {
|
|
1410
|
-
const
|
|
1411
|
-
typeof
|
|
1412
|
-
return
|
|
1413
|
-
} : 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;
|
|
1414
1415
|
}), m;
|
|
1415
1416
|
},
|
|
1416
1417
|
/** 获取表单组件绑定属性和事件 */
|
|
@@ -1449,8 +1450,8 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1449
1450
|
M.loading(!0);
|
|
1450
1451
|
try {
|
|
1451
1452
|
l.update.type = t;
|
|
1452
|
-
const r = t ===
|
|
1453
|
-
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);
|
|
1454
1455
|
} catch (r) {
|
|
1455
1456
|
console.error(r);
|
|
1456
1457
|
} finally {
|
|
@@ -1461,10 +1462,10 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1461
1462
|
/** 提交增改表单操作 */
|
|
1462
1463
|
submit: () => {
|
|
1463
1464
|
FunUtil.throttle(async () => {
|
|
1464
|
-
await p.value?.validate(async (d, m) => new Promise((c,
|
|
1465
|
-
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();
|
|
1466
1467
|
})), l.update.loading = !0;
|
|
1467
|
-
const t = l.update.type ===
|
|
1468
|
+
const t = l.update.type === H.Add ? n.option.api.create : n.option.api.update;
|
|
1468
1469
|
try {
|
|
1469
1470
|
await n.option.form?.submitBefore?.(l.update.form, l.update);
|
|
1470
1471
|
} catch {
|
|
@@ -1502,7 +1503,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1502
1503
|
/** 删除操作弹窗与数据对象 */
|
|
1503
1504
|
remove: {
|
|
1504
1505
|
/** 删除弹窗标题 */
|
|
1505
|
-
title: w.tCurd("
|
|
1506
|
+
title: w.tCurd("deleteTitle"),
|
|
1506
1507
|
/** 删除弹窗显示控制 */
|
|
1507
1508
|
show: !1,
|
|
1508
1509
|
/** 待删除数据项集合 */
|
|
@@ -1559,8 +1560,8 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1559
1560
|
try {
|
|
1560
1561
|
let c = await d.options?.[d.type]?.dataApi?.(l.update.form, l.update.type);
|
|
1561
1562
|
if (c) {
|
|
1562
|
-
const
|
|
1563
|
-
!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;
|
|
1564
1565
|
}
|
|
1565
1566
|
} catch {
|
|
1566
1567
|
}
|
|
@@ -1574,7 +1575,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1574
1575
|
},
|
|
1575
1576
|
/** 初始化curd配置(option默认值合并等) */
|
|
1576
1577
|
initCurdConfig: () => {
|
|
1577
|
-
const t = ObjectUtil.deepMerge(
|
|
1578
|
+
const t = ObjectUtil.deepMerge(T.config, {});
|
|
1578
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;
|
|
1579
1580
|
const e = ObjectUtil.deepMerge(t, n.option || {});
|
|
1580
1581
|
Object.keys(e).forEach((r) => {
|
|
@@ -1587,7 +1588,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1587
1588
|
* @returns
|
|
1588
1589
|
*/
|
|
1589
1590
|
initColumnOptions: () => {
|
|
1590
|
-
let t = JSONUtil.cp(
|
|
1591
|
+
let t = JSONUtil.cp(T.config.columnConfig);
|
|
1591
1592
|
t.options = ObjectUtil.deepMerge(
|
|
1592
1593
|
{
|
|
1593
1594
|
switch: {
|
|
@@ -1614,14 +1615,14 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1614
1615
|
r.type === "switch" && (r.options.switch.tableBeforeChange = async (d, m) => {
|
|
1615
1616
|
const c = r.options?.switch;
|
|
1616
1617
|
try {
|
|
1617
|
-
c.tableConfig?.confirm && await
|
|
1618
|
+
c.tableConfig?.confirm && await o.value?.open({
|
|
1618
1619
|
title: w.tCurd("confirmModify"),
|
|
1619
1620
|
content: w.tCurd("confirmSwitchMessage")
|
|
1620
1621
|
});
|
|
1621
1622
|
try {
|
|
1622
1623
|
if (!n.option.api.update && !c.tableConfig?.api) return;
|
|
1623
|
-
const
|
|
1624
|
-
c.loadingMap || (c.loadingMap = {}), c.loadingMap[
|
|
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;
|
|
1625
1626
|
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, i = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
|
|
1626
1627
|
if (!i) return;
|
|
1627
1628
|
try {
|
|
@@ -1635,11 +1636,11 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1635
1636
|
} catch {
|
|
1636
1637
|
return !1;
|
|
1637
1638
|
} finally {
|
|
1638
|
-
c.loadingMap[
|
|
1639
|
+
c.loadingMap[f].loading = !1;
|
|
1639
1640
|
}
|
|
1640
1641
|
return M.success(w.tCurd("operationSuccess")), c.tableConfig?.loadList && (l.table.loading = !0, l.table.getList(), l.table.loading = !1), !0;
|
|
1641
|
-
} catch (
|
|
1642
|
-
return console.error(
|
|
1642
|
+
} catch (f) {
|
|
1643
|
+
return console.error(f), !1;
|
|
1643
1644
|
} finally {
|
|
1644
1645
|
l.table.loading = !1;
|
|
1645
1646
|
}
|
|
@@ -1652,7 +1653,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1652
1653
|
},
|
|
1653
1654
|
getColumnSpan: (t, e) => {
|
|
1654
1655
|
if (t.item.form?.spanCol) {
|
|
1655
|
-
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);
|
|
1656
1657
|
return (t.item?.form.span || r) + m;
|
|
1657
1658
|
}
|
|
1658
1659
|
return t.item.form.span;
|
|
@@ -1675,13 +1676,13 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1675
1676
|
}
|
|
1676
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) {
|
|
1677
1678
|
i.form = i.form || { span: d }, i.form.span = i.form.span ?? d;
|
|
1678
|
-
let h = i.form.span, S = m.reduce((
|
|
1679
|
+
let h = i.form.span, S = m.reduce((F, R) => F + R.span, h);
|
|
1679
1680
|
const B = m.length;
|
|
1680
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) {
|
|
1681
|
-
const
|
|
1682
|
+
const F = {
|
|
1682
1683
|
input: w.tCurd("placeholderInput"),
|
|
1683
1684
|
select: w.tCurd("placeholderSelect")
|
|
1684
|
-
}, R = (
|
|
1685
|
+
}, R = (F[i.type] || F.input) + i.label;
|
|
1685
1686
|
l.update.rules[i.key] = typeof i.rules == "boolean" ? [
|
|
1686
1687
|
{
|
|
1687
1688
|
required: !0,
|
|
@@ -1691,13 +1692,13 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1691
1692
|
] : i.rules;
|
|
1692
1693
|
}
|
|
1693
1694
|
}
|
|
1694
|
-
},
|
|
1695
|
-
i.isForm = h, Array.isArray(i.children) && i.children.forEach((S) =>
|
|
1695
|
+
}, f = (i, h) => {
|
|
1696
|
+
i.isForm = h, Array.isArray(i.children) && i.children.forEach((S) => f(S, h));
|
|
1696
1697
|
};
|
|
1697
1698
|
t.column.forEach((i) => {
|
|
1698
|
-
i.isForm = !0,
|
|
1699
|
+
i.isForm = !0, f(i, !0), c(i);
|
|
1699
1700
|
}), n.option.table?.column?.forEach((i) => {
|
|
1700
|
-
|
|
1701
|
+
f(i, !1), c(i);
|
|
1701
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;
|
|
1702
1703
|
const k = n.option.search?.formDefault;
|
|
1703
1704
|
k && Object.keys(k).forEach((i) => {
|
|
@@ -1709,48 +1710,48 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1709
1710
|
});
|
|
1710
1711
|
return l.init(), fe(() => {
|
|
1711
1712
|
n.option.init !== !1 && l.table.getList();
|
|
1712
|
-
}), { conf: l, switchConfirmRef:
|
|
1713
|
-
},
|
|
1713
|
+
}), { conf: l, switchConfirmRef: o, ruleFormRef: p, tableRef: s };
|
|
1714
|
+
}, Re = { class: "dialog-footer" }, Ie = /* @__PURE__ */ J({
|
|
1714
1715
|
__name: "switchConfirm",
|
|
1715
1716
|
props: {
|
|
1716
1717
|
size: {}
|
|
1717
1718
|
},
|
|
1718
|
-
setup(n, { expose:
|
|
1719
|
+
setup(n, { expose: o }) {
|
|
1719
1720
|
const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
|
|
1720
1721
|
let t = null, e = null;
|
|
1721
|
-
const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((
|
|
1722
|
-
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;
|
|
1723
1724
|
})), d = () => {
|
|
1724
1725
|
p.value = !1, t?.(!0), t = null, e = null;
|
|
1725
1726
|
}, m = () => {
|
|
1726
1727
|
p.value = !1, e?.(new Error("用户取消操作")), t = null, e = null;
|
|
1727
1728
|
};
|
|
1728
|
-
return
|
|
1729
|
+
return o({
|
|
1729
1730
|
open: r
|
|
1730
|
-
}), (c,
|
|
1731
|
+
}), (c, f) => {
|
|
1731
1732
|
const k = _("el-form");
|
|
1732
|
-
return
|
|
1733
|
+
return u(), g(a(ae), {
|
|
1733
1734
|
modelValue: p.value,
|
|
1734
|
-
"onUpdate:modelValue":
|
|
1735
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => p.value = i),
|
|
1735
1736
|
title: s.value,
|
|
1736
1737
|
"close-on-click-modal": !1,
|
|
1737
1738
|
width: "400px"
|
|
1738
1739
|
}, {
|
|
1739
1740
|
footer: y(() => [
|
|
1740
|
-
|
|
1741
|
+
D(k, { size: c.size }, {
|
|
1741
1742
|
default: y(() => [
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
default: y(() =>
|
|
1743
|
+
E("span", Re, [
|
|
1744
|
+
D(a(L), { onClick: m }, {
|
|
1745
|
+
default: y(() => f[1] || (f[1] = [
|
|
1745
1746
|
U("取消")
|
|
1746
1747
|
])),
|
|
1747
1748
|
_: 1
|
|
1748
1749
|
}),
|
|
1749
|
-
|
|
1750
|
+
D(a(L), {
|
|
1750
1751
|
type: "primary",
|
|
1751
1752
|
onClick: d
|
|
1752
1753
|
}, {
|
|
1753
|
-
default: y(() =>
|
|
1754
|
+
default: y(() => f[2] || (f[2] = [
|
|
1754
1755
|
U("确认")
|
|
1755
1756
|
])),
|
|
1756
1757
|
_: 1
|
|
@@ -1761,69 +1762,82 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1761
1762
|
}, 8, ["size"])
|
|
1762
1763
|
]),
|
|
1763
1764
|
default: y(() => [
|
|
1764
|
-
|
|
1765
|
+
E("div", null, O(l.value), 1)
|
|
1765
1766
|
]),
|
|
1766
1767
|
_: 1
|
|
1767
1768
|
}, 8, ["modelValue", "title"]);
|
|
1768
1769
|
};
|
|
1769
1770
|
}
|
|
1770
|
-
}), X = (n,
|
|
1771
|
+
}), X = (n, o) => {
|
|
1771
1772
|
const p = n.__vccOpts || n;
|
|
1772
|
-
for (const [s, l] of
|
|
1773
|
+
for (const [s, l] of o)
|
|
1773
1774
|
p[s] = l;
|
|
1774
1775
|
return p;
|
|
1775
|
-
},
|
|
1776
|
+
}, He = {}, Pe = {
|
|
1776
1777
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1777
1778
|
viewBox: "0 0 1024 1024"
|
|
1778
1779
|
};
|
|
1779
|
-
function
|
|
1780
|
-
return
|
|
1781
|
-
|
|
1780
|
+
function Ke(n, o) {
|
|
1781
|
+
return u(), b("svg", Pe, o[0] || (o[0] = [
|
|
1782
|
+
E("path", {
|
|
1782
1783
|
fill: "currentColor",
|
|
1783
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"
|
|
1784
1785
|
}, null, -1)
|
|
1785
1786
|
]));
|
|
1786
1787
|
}
|
|
1787
|
-
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 = {
|
|
1788
1802
|
"data-v-58697b5c": "",
|
|
1789
1803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1790
1804
|
viewBox: "0 0 1024 1024"
|
|
1791
1805
|
};
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
1794
|
-
|
|
1806
|
+
function Ge(n, o) {
|
|
1807
|
+
return u(), b("svg", Qe, o[0] || (o[0] = [
|
|
1808
|
+
E("path", {
|
|
1795
1809
|
fill: "currentColor",
|
|
1796
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"
|
|
1797
1811
|
}, null, -1)
|
|
1798
1812
|
]));
|
|
1799
1813
|
}
|
|
1800
|
-
const
|
|
1814
|
+
const Xe = /* @__PURE__ */ X(qe, [["render", Ge]]), Ye = {}, Ze = {
|
|
1801
1815
|
"data-v-58697b5c": "",
|
|
1802
1816
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1803
1817
|
viewBox: "0 0 1024 1024"
|
|
1804
1818
|
};
|
|
1805
|
-
function
|
|
1806
|
-
return
|
|
1807
|
-
|
|
1819
|
+
function xe(n, o) {
|
|
1820
|
+
return u(), b("svg", Ze, o[0] || (o[0] = [
|
|
1821
|
+
E("path", {
|
|
1808
1822
|
fill: "currentColor",
|
|
1809
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"
|
|
1810
1824
|
}, null, -1)
|
|
1811
1825
|
]));
|
|
1812
1826
|
}
|
|
1813
|
-
const
|
|
1827
|
+
const _e = /* @__PURE__ */ X(Ye, [["render", xe]]), et = {}, tt = {
|
|
1814
1828
|
"data-v-58697b5c": "",
|
|
1815
1829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1816
1830
|
viewBox: "0 0 1024 1024"
|
|
1817
1831
|
};
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1820
|
-
|
|
1832
|
+
function ot(n, o) {
|
|
1833
|
+
return u(), b("svg", tt, o[0] || (o[0] = [
|
|
1834
|
+
E("path", {
|
|
1821
1835
|
fill: "currentColor",
|
|
1822
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"
|
|
1823
1837
|
}, null, -1)
|
|
1824
1838
|
]));
|
|
1825
1839
|
}
|
|
1826
|
-
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({
|
|
1827
1841
|
__name: "tableColumn",
|
|
1828
1842
|
props: {
|
|
1829
1843
|
conf: {},
|
|
@@ -1831,14 +1845,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1831
1845
|
option: {}
|
|
1832
1846
|
},
|
|
1833
1847
|
setup(n) {
|
|
1834
|
-
const
|
|
1848
|
+
const o = M.isFun, p = ke().type;
|
|
1835
1849
|
return (s, l) => {
|
|
1836
1850
|
const t = _("el-tooltip");
|
|
1837
|
-
return
|
|
1851
|
+
return u(!0), b($, null, A(s.columnList, (e) => (u(), b($, {
|
|
1838
1852
|
key: e.key
|
|
1839
1853
|
}, [
|
|
1840
|
-
s.conf.table.column.show.list.includes(e.key) ? (
|
|
1841
|
-
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({
|
|
1842
1856
|
key: 0,
|
|
1843
1857
|
prop: e.key,
|
|
1844
1858
|
label: e.label,
|
|
@@ -1846,29 +1860,29 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1846
1860
|
}, e.table), {
|
|
1847
1861
|
header: y(() => [
|
|
1848
1862
|
C(s.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1849
|
-
|
|
1850
|
-
e.table?.header?.tooltip ? (
|
|
1863
|
+
E("div", lt, [
|
|
1864
|
+
e.table?.header?.tooltip ? (u(), g(t, {
|
|
1851
1865
|
key: 0,
|
|
1852
1866
|
effect: "dark",
|
|
1853
1867
|
placement: "top"
|
|
1854
1868
|
}, {
|
|
1855
1869
|
content: y(() => [
|
|
1856
|
-
|
|
1870
|
+
E("div", {
|
|
1857
1871
|
innerHTML: e.table?.header?.tooltip
|
|
1858
|
-
}, null, 8,
|
|
1872
|
+
}, null, 8, it)
|
|
1859
1873
|
]),
|
|
1860
1874
|
default: y(() => [
|
|
1861
|
-
|
|
1862
|
-
|
|
1875
|
+
E("span", nt, [
|
|
1876
|
+
D(Xe)
|
|
1863
1877
|
])
|
|
1864
1878
|
]),
|
|
1865
1879
|
_: 2
|
|
1866
1880
|
}, 1024)) : v("", !0),
|
|
1867
1881
|
U(" " + O(e.label) + " ", 1),
|
|
1868
|
-
e.table?.header?.group !== void 0 ? (
|
|
1882
|
+
e.table?.header?.group !== void 0 ? (u(), b("span", {
|
|
1869
1883
|
key: 1,
|
|
1870
1884
|
class: "table-header-plus",
|
|
1871
|
-
onClick:
|
|
1885
|
+
onClick: ve(
|
|
1872
1886
|
() => {
|
|
1873
1887
|
e.table.header.group = !e.table.header.group, s.columnList.forEach((r) => {
|
|
1874
1888
|
r.table?.header?.groupKey === e.key && (r.table.header.show = !e.table.header.group);
|
|
@@ -1877,28 +1891,28 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1877
1891
|
["stop"]
|
|
1878
1892
|
)
|
|
1879
1893
|
}, [
|
|
1880
|
-
e.table.header.group ? (
|
|
1881
|
-
], 8,
|
|
1894
|
+
e.table.header.group ? (u(), g(_e, { key: 0 })) : (u(), g(at, { key: 1 }))
|
|
1895
|
+
], 8, rt)) : v("", !0)
|
|
1882
1896
|
])
|
|
1883
1897
|
])
|
|
1884
1898
|
]),
|
|
1885
1899
|
default: y(({ row: r }) => [
|
|
1886
|
-
e.children ? (
|
|
1900
|
+
e.children ? (u(), b($, { key: 0 }, [
|
|
1887
1901
|
l[0] || (l[0] = U(" ")),
|
|
1888
|
-
(
|
|
1902
|
+
(u(), g(W(a(p)), {
|
|
1889
1903
|
conf: s.conf,
|
|
1890
1904
|
columnList: e.children,
|
|
1891
1905
|
option: s.option
|
|
1892
|
-
},
|
|
1893
|
-
|
|
1906
|
+
}, Q({ _: 2 }, [
|
|
1907
|
+
A(s.$slots, (d, m) => ({
|
|
1894
1908
|
name: m,
|
|
1895
1909
|
fn: y((c) => [
|
|
1896
1910
|
C(s.$slots, m, V({ ref_for: !0 }, c || {}))
|
|
1897
1911
|
])
|
|
1898
1912
|
}))
|
|
1899
1913
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1900
|
-
], 64)) : (
|
|
1901
|
-
s.option.table?.editMode ? (
|
|
1914
|
+
], 64)) : (u(), b($, { key: 1 }, [
|
|
1915
|
+
s.option.table?.editMode ? (u(), b("div", {
|
|
1902
1916
|
key: 0,
|
|
1903
1917
|
class: I(["row", ["table-edit-" + e.key]]),
|
|
1904
1918
|
style: { width: "100%" }
|
|
@@ -1907,14 +1921,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1907
1921
|
row: r,
|
|
1908
1922
|
item: e
|
|
1909
1923
|
}),
|
|
1910
|
-
e.type === "input" ? (
|
|
1924
|
+
e.type === "input" ? (u(), g(a(x), V({
|
|
1911
1925
|
key: 0,
|
|
1912
1926
|
modelValue: r[e.key],
|
|
1913
1927
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1914
1928
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1915
1929
|
class: "col",
|
|
1916
1930
|
ref_for: !0
|
|
1917
|
-
}, 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 }, [
|
|
1918
1932
|
e.options?.input?.prepend ? {
|
|
1919
1933
|
name: "prepend",
|
|
1920
1934
|
fn: y(() => [
|
|
@@ -1922,7 +1936,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1922
1936
|
]),
|
|
1923
1937
|
key: "0"
|
|
1924
1938
|
} : void 0
|
|
1925
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (
|
|
1939
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), g(a(G), V({
|
|
1926
1940
|
key: 1,
|
|
1927
1941
|
modelValue: r[e.key],
|
|
1928
1942
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
@@ -1931,14 +1945,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1931
1945
|
ref_for: !0
|
|
1932
1946
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), {
|
|
1933
1947
|
default: y(() => [
|
|
1934
|
-
(
|
|
1948
|
+
(u(!0), b($, null, A(e.options?.search?.select?.data || e.options?.select?.data, (d) => (u(), g(a(K), {
|
|
1935
1949
|
key: d.value,
|
|
1936
1950
|
label: d.label,
|
|
1937
1951
|
value: d.value
|
|
1938
1952
|
}, null, 8, ["label", "value"]))), 128))
|
|
1939
1953
|
]),
|
|
1940
1954
|
_: 2
|
|
1941
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (
|
|
1955
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (u(), g(a(Z), V({
|
|
1942
1956
|
key: 2,
|
|
1943
1957
|
modelValue: r[e.key],
|
|
1944
1958
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
@@ -1950,15 +1964,15 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1950
1964
|
row: r,
|
|
1951
1965
|
item: e
|
|
1952
1966
|
})
|
|
1953
|
-
], 2)) : (
|
|
1954
|
-
s.conf.update.type ===
|
|
1955
|
-
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({
|
|
1956
1970
|
key: 0,
|
|
1957
1971
|
modelValue: s.conf.update.form[e.key],
|
|
1958
1972
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
1959
1973
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1960
1974
|
ref_for: !0
|
|
1961
|
-
}, 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 }, [
|
|
1962
1976
|
e.options?.input?.prepend ? {
|
|
1963
1977
|
name: "prepend",
|
|
1964
1978
|
fn: y(() => [
|
|
@@ -1966,7 +1980,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1966
1980
|
]),
|
|
1967
1981
|
key: "0"
|
|
1968
1982
|
} : void 0
|
|
1969
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (
|
|
1983
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), g(a(G), V({
|
|
1970
1984
|
key: 1,
|
|
1971
1985
|
modelValue: s.conf.update.form[e.key],
|
|
1972
1986
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
@@ -1974,14 +1988,14 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1974
1988
|
ref_for: !0
|
|
1975
1989
|
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
1976
1990
|
default: y(() => [
|
|
1977
|
-
(
|
|
1991
|
+
(u(!0), b($, null, A(e.options?.search?.select?.data || e.options?.select?.data, (d) => (u(), g(a(K), {
|
|
1978
1992
|
key: d.value,
|
|
1979
1993
|
label: d.label,
|
|
1980
1994
|
value: d.value
|
|
1981
1995
|
}, null, 8, ["label", "value"]))), 128))
|
|
1982
1996
|
]),
|
|
1983
1997
|
_: 2
|
|
1984
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (
|
|
1998
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (u(), g(a(Z), V({
|
|
1985
1999
|
key: 2,
|
|
1986
2000
|
modelValue: s.conf.update.form[e.key],
|
|
1987
2001
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
@@ -1994,21 +2008,21 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1994
2008
|
row: r,
|
|
1995
2009
|
item: e
|
|
1996
2010
|
}, () => [
|
|
1997
|
-
|
|
2011
|
+
a(j).customComponent[e.type ?? ""]?.table ? (u(), g(W(a(j).customComponent[e.type ?? ""]?.table), V({
|
|
1998
2012
|
key: 0,
|
|
1999
2013
|
modelValue: r[e.key],
|
|
2000
2014
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
2001
2015
|
ref_for: !0
|
|
2002
|
-
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (
|
|
2003
|
-
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({
|
|
2004
2018
|
key: 0,
|
|
2005
2019
|
modelValue: r[e.key],
|
|
2006
2020
|
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
2007
2021
|
loading: e.options?.switch?.loadingMap?.[r[s.option.table?.rowKey]]?.loading,
|
|
2008
2022
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2009
2023
|
ref_for: !0
|
|
2010
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (
|
|
2011
|
-
], 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", {
|
|
2012
2026
|
key: 2,
|
|
2013
2027
|
style: pe({
|
|
2014
2028
|
"--table-text-click-color": e.table?.click?.color
|
|
@@ -2016,7 +2030,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2016
2030
|
class: I({ "table-text-click": e.table?.click?.callback }),
|
|
2017
2031
|
onClick: (d) => e.table?.click?.callback?.(r),
|
|
2018
2032
|
innerHTML: e.table?.format ? e.table?.format(r) : r[e.key]
|
|
2019
|
-
}, null, 14,
|
|
2033
|
+
}, null, 14, dt))
|
|
2020
2034
|
])
|
|
2021
2035
|
], 64))
|
|
2022
2036
|
], 64))
|
|
@@ -2027,175 +2041,175 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2027
2041
|
], 64))), 128);
|
|
2028
2042
|
};
|
|
2029
2043
|
}
|
|
2030
|
-
}),
|
|
2044
|
+
}), ft = {
|
|
2031
2045
|
class: "row form-item-content",
|
|
2032
2046
|
style: { width: "100%" }
|
|
2033
|
-
},
|
|
2047
|
+
}, pt = { class: "col column form-item-content-item" }, ct = { class: "col" }, mt = ["innerHTML"], ht = /* @__PURE__ */ J({
|
|
2034
2048
|
__name: "formColumn",
|
|
2035
2049
|
props: {
|
|
2036
2050
|
conf: {},
|
|
2037
2051
|
item: {}
|
|
2038
2052
|
},
|
|
2039
2053
|
setup(n) {
|
|
2040
|
-
return (
|
|
2041
|
-
label:
|
|
2042
|
-
prop:
|
|
2043
|
-
"label-width":
|
|
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
|
|
2044
2058
|
}, {
|
|
2045
2059
|
default: y(() => [
|
|
2046
|
-
|
|
2047
|
-
C(
|
|
2048
|
-
row:
|
|
2049
|
-
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
|
|
2050
2064
|
}),
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
C(
|
|
2054
|
-
row:
|
|
2055
|
-
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
|
|
2056
2070
|
}, () => [
|
|
2057
|
-
|
|
2071
|
+
o.item.item.type === "input" ? (u(), g(a(x), V({
|
|
2058
2072
|
key: 0,
|
|
2059
|
-
modelValue:
|
|
2060
|
-
"onUpdate:modelValue": p[0] || (p[0] = (s) =>
|
|
2061
|
-
},
|
|
2062
|
-
disabled:
|
|
2063
|
-
}),
|
|
2064
|
-
|
|
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 ? {
|
|
2065
2079
|
name: "prepend",
|
|
2066
2080
|
fn: y(() => [
|
|
2067
|
-
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)
|
|
2068
2082
|
]),
|
|
2069
2083
|
key: "0"
|
|
2070
2084
|
} : void 0
|
|
2071
|
-
]), 1040, ["modelValue", "disabled"])) :
|
|
2085
|
+
]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (u(), g(a(Z), V({
|
|
2072
2086
|
key: 1,
|
|
2073
|
-
modelValue:
|
|
2074
|
-
"onUpdate:modelValue": p[1] || (p[1] = (s) =>
|
|
2075
|
-
},
|
|
2076
|
-
disabled:
|
|
2077
|
-
}), 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({
|
|
2078
2092
|
key: 2,
|
|
2079
|
-
modelValue:
|
|
2080
|
-
"onUpdate:modelValue": p[2] || (p[2] = (s) =>
|
|
2081
|
-
},
|
|
2082
|
-
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),
|
|
2083
2097
|
style: { width: "100%" }
|
|
2084
2098
|
}), {
|
|
2085
2099
|
default: y(() => [
|
|
2086
|
-
(
|
|
2100
|
+
(u(!0), b($, null, A(o.conf.update.getBind(o.item.item).data, (s) => (u(), g(a(K), {
|
|
2087
2101
|
key: s.value,
|
|
2088
2102
|
label: s.label,
|
|
2089
2103
|
value: s.value
|
|
2090
2104
|
}, null, 8, ["label", "value"]))), 128))
|
|
2091
2105
|
]),
|
|
2092
2106
|
_: 1
|
|
2093
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2107
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (u(), g(a(le), V({
|
|
2094
2108
|
key: 3,
|
|
2095
|
-
modelValue:
|
|
2096
|
-
"onUpdate:modelValue": p[3] || (p[3] = (s) =>
|
|
2097
|
-
},
|
|
2098
|
-
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),
|
|
2099
2113
|
style: { width: "100%" }
|
|
2100
2114
|
}), {
|
|
2101
2115
|
default: y(() => [
|
|
2102
|
-
(
|
|
2116
|
+
(u(!0), b($, null, A(o.conf.update.getBind(o.item.item).data, (s) => (u(), g(a(ne), {
|
|
2103
2117
|
key: s.value,
|
|
2104
2118
|
label: s.label,
|
|
2105
2119
|
value: s.value
|
|
2106
2120
|
}, null, 8, ["label", "value"]))), 128))
|
|
2107
2121
|
]),
|
|
2108
2122
|
_: 1
|
|
2109
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2123
|
+
}, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (u(), g(se, V({
|
|
2110
2124
|
key: 4,
|
|
2111
|
-
row:
|
|
2112
|
-
field:
|
|
2113
|
-
},
|
|
2114
|
-
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),
|
|
2115
2129
|
style: { width: "100%" }
|
|
2116
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
2130
|
+
}), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (u(), g(a(ue), V({
|
|
2117
2131
|
key: 5,
|
|
2118
|
-
modelValue:
|
|
2119
|
-
"onUpdate:modelValue": p[4] || (p[4] = (s) =>
|
|
2120
|
-
},
|
|
2121
|
-
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),
|
|
2122
2136
|
style: { width: "100%" }
|
|
2123
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2137
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (u(), g(a(ie), V({
|
|
2124
2138
|
key: 6,
|
|
2125
|
-
modelValue:
|
|
2126
|
-
"onUpdate:modelValue": p[5] || (p[5] = (s) =>
|
|
2127
|
-
},
|
|
2128
|
-
disabled:
|
|
2129
|
-
}), 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({
|
|
2130
2144
|
key: 7,
|
|
2131
|
-
modelValue:
|
|
2132
|
-
"onUpdate:modelValue": p[6] || (p[6] = (s) =>
|
|
2133
|
-
},
|
|
2134
|
-
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)
|
|
2135
2149
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0)
|
|
2136
2150
|
]),
|
|
2137
|
-
C(
|
|
2138
|
-
row:
|
|
2139
|
-
item:
|
|
2151
|
+
C(o.$slots, "form-" + o.item.item.key + "-right", {
|
|
2152
|
+
row: o.conf.update.form,
|
|
2153
|
+
item: o.item.item
|
|
2140
2154
|
})
|
|
2141
2155
|
]),
|
|
2142
|
-
C(
|
|
2143
|
-
row:
|
|
2144
|
-
item:
|
|
2156
|
+
C(o.$slots, "form-" + o.item.item.key + "-tip", {
|
|
2157
|
+
row: o.conf.update.form,
|
|
2158
|
+
item: o.item.item
|
|
2145
2159
|
}, () => [
|
|
2146
|
-
|
|
2160
|
+
o.item.item.form?.tipText ? (u(), b("div", {
|
|
2147
2161
|
key: 0,
|
|
2148
2162
|
class: "form-tip-text",
|
|
2149
|
-
innerHTML: typeof
|
|
2150
|
-
}, 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)
|
|
2151
2165
|
])
|
|
2152
2166
|
]),
|
|
2153
|
-
C(
|
|
2154
|
-
row:
|
|
2155
|
-
item:
|
|
2167
|
+
C(o.$slots, "form-" + o.item.item.key + "-end", {
|
|
2168
|
+
row: o.conf.update.form,
|
|
2169
|
+
item: o.item.item
|
|
2156
2170
|
})
|
|
2157
2171
|
])
|
|
2158
2172
|
]),
|
|
2159
2173
|
_: 3
|
|
2160
2174
|
}, 8, ["label", "prop", "label-width"]));
|
|
2161
2175
|
}
|
|
2162
|
-
}),
|
|
2176
|
+
}), gt = {}, yt = {
|
|
2163
2177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2164
2178
|
viewBox: "64 64 896 896"
|
|
2165
2179
|
};
|
|
2166
|
-
function
|
|
2167
|
-
return
|
|
2168
|
-
|
|
2180
|
+
function bt(n, o) {
|
|
2181
|
+
return u(), b("svg", yt, o[0] || (o[0] = [
|
|
2182
|
+
E("path", {
|
|
2169
2183
|
fill: "currentColor",
|
|
2170
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"
|
|
2171
2185
|
}, null, -1)
|
|
2172
2186
|
]));
|
|
2173
2187
|
}
|
|
2174
|
-
const
|
|
2188
|
+
const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {}, vt = {
|
|
2175
2189
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2176
2190
|
viewBox: "64 64 896 896"
|
|
2177
2191
|
};
|
|
2178
|
-
function
|
|
2179
|
-
return
|
|
2180
|
-
|
|
2192
|
+
function Ct(n, o) {
|
|
2193
|
+
return u(), b("svg", vt, o[0] || (o[0] = [
|
|
2194
|
+
E("path", {
|
|
2181
2195
|
fill: "currentColor",
|
|
2182
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"
|
|
2183
2197
|
}, null, -1)
|
|
2184
2198
|
]));
|
|
2185
2199
|
}
|
|
2186
|
-
const
|
|
2200
|
+
const Vt = /* @__PURE__ */ X(kt, [["render", Ct]]), zt = {
|
|
2187
2201
|
key: 0,
|
|
2188
2202
|
class: "relative curd-search fit-width"
|
|
2189
|
-
},
|
|
2203
|
+
}, $t = { class: "mb-10 flex justify-between items-center fit-width" }, Ut = {
|
|
2190
2204
|
class: "flex items-center",
|
|
2191
2205
|
style: { gap: "10px" }
|
|
2192
|
-
},
|
|
2206
|
+
}, Dt = { key: 0 }, Et = { key: 1 }, Ot = { key: 2 }, St = { class: "export-btn" }, Mt = {
|
|
2193
2207
|
key: 1,
|
|
2194
2208
|
class: "export-btn"
|
|
2195
|
-
},
|
|
2209
|
+
}, Tt = {
|
|
2196
2210
|
class: "flex items-center table-tools-right",
|
|
2197
2211
|
style: { gap: "10px" }
|
|
2198
|
-
},
|
|
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({
|
|
2199
2213
|
__name: "index",
|
|
2200
2214
|
props: {
|
|
2201
2215
|
/**
|
|
@@ -2205,163 +2219,163 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2205
2219
|
default: {}
|
|
2206
2220
|
}
|
|
2207
2221
|
},
|
|
2208
|
-
setup(n, { expose:
|
|
2209
|
-
const p = M.EDialog, s = n, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } =
|
|
2210
|
-
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({
|
|
2211
2225
|
conf: t
|
|
2212
2226
|
}), (m, c) => {
|
|
2213
|
-
const
|
|
2214
|
-
return
|
|
2227
|
+
const f = _("el-tooltip"), k = Ce("loading");
|
|
2228
|
+
return u(), b("div", {
|
|
2215
2229
|
class: I(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2216
2230
|
}, [
|
|
2217
|
-
|
|
2231
|
+
E("div", {
|
|
2218
2232
|
class: I(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2219
2233
|
style: { overflow: "hidden" }
|
|
2220
2234
|
}, [
|
|
2221
2235
|
C(m.$slots, "box-left"),
|
|
2222
|
-
|
|
2236
|
+
E("div", {
|
|
2223
2237
|
class: I(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
|
|
2224
2238
|
}, [
|
|
2225
|
-
n.option.search?.show !== !1 ? (
|
|
2226
|
-
|
|
2227
|
-
model:
|
|
2239
|
+
n.option.search?.show !== !1 ? (u(), b("div", zt, [
|
|
2240
|
+
D(a(q), {
|
|
2241
|
+
model: a(t).search.form,
|
|
2228
2242
|
inline: "",
|
|
2229
2243
|
size: n.option.size?.search
|
|
2230
2244
|
}, {
|
|
2231
2245
|
default: y(() => [
|
|
2232
2246
|
C(m.$slots, "search-start", {
|
|
2233
|
-
row:
|
|
2247
|
+
row: a(t).search.form
|
|
2234
2248
|
}),
|
|
2235
|
-
(
|
|
2249
|
+
(u(!0), b($, null, A(a(t).search.column.list, (i) => (u(), b($, {
|
|
2236
2250
|
key: i.key
|
|
2237
2251
|
}, [
|
|
2238
2252
|
C(m.$slots, "search-" + i.key + "-start", {
|
|
2239
|
-
row:
|
|
2253
|
+
row: a(t).search.form
|
|
2240
2254
|
}),
|
|
2241
|
-
(typeof i.show?.search == "function" ? i.show?.search(
|
|
2255
|
+
(typeof i.show?.search == "function" ? i.show?.search(a(t).search.form) : i.show?.search) ? (u(), g(a(te), {
|
|
2242
2256
|
key: 0,
|
|
2243
2257
|
label: i.text?.search?.label ?? i.label
|
|
2244
2258
|
}, {
|
|
2245
2259
|
default: y(() => [
|
|
2246
2260
|
C(m.$slots, "search-" + i.key + "-left", {
|
|
2247
|
-
row:
|
|
2261
|
+
row: a(t).search.form
|
|
2248
2262
|
}),
|
|
2249
2263
|
C(m.$slots, "search-" + i.key, {
|
|
2250
|
-
row:
|
|
2264
|
+
row: a(t).search.form
|
|
2251
2265
|
}, () => [
|
|
2252
|
-
|
|
2266
|
+
a(j).customComponent[i.type ?? ""]?.search ? (u(), g(W(a(j).customComponent[i.type ?? ""]?.search), V({
|
|
2253
2267
|
key: 0,
|
|
2254
|
-
modelValue:
|
|
2255
|
-
"onUpdate:modelValue": (h) =>
|
|
2268
|
+
modelValue: a(t).search.form[i.key],
|
|
2269
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2256
2270
|
ref_for: !0
|
|
2257
|
-
}, i.options?.search?.[i.type ?? ""], z(i.options?.search?.[i.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type === "input" ? (
|
|
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({
|
|
2258
2272
|
key: 1,
|
|
2259
|
-
modelValue:
|
|
2260
|
-
"onUpdate:modelValue": (h) =>
|
|
2261
|
-
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),
|
|
2262
2276
|
clearable: "",
|
|
2263
2277
|
disabled: i.disabled?.search,
|
|
2264
2278
|
ref_for: !0
|
|
2265
|
-
}, 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" ? (
|
|
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({
|
|
2266
2280
|
key: 2,
|
|
2267
|
-
modelValue:
|
|
2268
|
-
"onUpdate:modelValue": (h) =>
|
|
2269
|
-
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")),
|
|
2270
2284
|
clearable: "",
|
|
2271
2285
|
disabled: i.disabled?.search,
|
|
2272
2286
|
ref_for: !0
|
|
2273
2287
|
}, i.options?.search?.switch || i.options?.switch, z(i.options?.search?.switch?.on || i.options?.switch?.on || {})), {
|
|
2274
2288
|
default: y(() => [
|
|
2275
|
-
(
|
|
2289
|
+
(u(), g(a(K), {
|
|
2276
2290
|
key: i.options?.switch?.activeValue,
|
|
2277
2291
|
label: i.options?.switch?.activeText,
|
|
2278
2292
|
value: i.options?.switch?.activeValue
|
|
2279
2293
|
}, null, 8, ["label", "value"])),
|
|
2280
|
-
(
|
|
2294
|
+
(u(), g(a(K), {
|
|
2281
2295
|
key: i.options?.switch?.inactiveValue,
|
|
2282
2296
|
label: i.options?.switch?.inactiveText,
|
|
2283
2297
|
value: i.options?.switch?.inactiveValue
|
|
2284
2298
|
}, null, 8, ["label", "value"]))
|
|
2285
2299
|
]),
|
|
2286
2300
|
_: 2
|
|
2287
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (
|
|
2301
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (u(), g(a(G), V({
|
|
2288
2302
|
key: 3,
|
|
2289
|
-
modelValue:
|
|
2290
|
-
"onUpdate:modelValue": (h) =>
|
|
2291
|
-
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")),
|
|
2292
2306
|
clearable: "",
|
|
2293
2307
|
disabled: i.disabled?.search,
|
|
2294
2308
|
ref_for: !0
|
|
2295
2309
|
}, i.options?.search?.select || i.options?.select, z(i.options?.search?.select?.on || i.options?.select?.on || {})), {
|
|
2296
2310
|
default: y(() => [
|
|
2297
|
-
(
|
|
2311
|
+
(u(!0), b($, null, A(i.options?.select?.data, (h) => (u(), g(a(K), {
|
|
2298
2312
|
key: h.value,
|
|
2299
2313
|
label: h.label,
|
|
2300
2314
|
value: h.value
|
|
2301
2315
|
}, null, 8, ["label", "value"]))), 128))
|
|
2302
2316
|
]),
|
|
2303
2317
|
_: 2
|
|
2304
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "radio" ? (
|
|
2318
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "radio" ? (u(), g(a(le), V({
|
|
2305
2319
|
key: 4,
|
|
2306
|
-
modelValue:
|
|
2307
|
-
"onUpdate:modelValue": (h) =>
|
|
2320
|
+
modelValue: a(t).search.form[i.key],
|
|
2321
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2308
2322
|
disabled: i.disabled?.search,
|
|
2309
2323
|
ref_for: !0
|
|
2310
2324
|
}, i.options?.search?.radio || i.options?.radio, z(i.options?.search?.radio?.on || i.options?.radio?.on || {})), {
|
|
2311
2325
|
default: y(() => [
|
|
2312
|
-
(
|
|
2326
|
+
(u(!0), b($, null, A(i.options?.radio?.data, (h) => (u(), g(a(ne), {
|
|
2313
2327
|
key: h.value,
|
|
2314
2328
|
label: h.label,
|
|
2315
2329
|
value: h.value
|
|
2316
2330
|
}, null, 8, ["label", "value"]))), 128))
|
|
2317
2331
|
]),
|
|
2318
2332
|
_: 2
|
|
2319
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type === "datetime" ? (
|
|
2333
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type === "datetime" ? (u(), g(a(ie), V({
|
|
2320
2334
|
key: 5,
|
|
2321
|
-
modelValue:
|
|
2322
|
-
"onUpdate:modelValue": (h) =>
|
|
2335
|
+
modelValue: a(t).search.form[i.key],
|
|
2336
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2323
2337
|
disabled: i.disabled?.search,
|
|
2324
2338
|
ref_for: !0
|
|
2325
|
-
}, 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 &&
|
|
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({
|
|
2326
2340
|
key: 6,
|
|
2327
|
-
modelValue:
|
|
2328
|
-
"onUpdate:modelValue": (h) =>
|
|
2341
|
+
modelValue: a(t).search.form[i.key],
|
|
2342
|
+
"onUpdate:modelValue": (h) => a(t).search.form[i.key] = h,
|
|
2329
2343
|
ref_for: !0
|
|
2330
2344
|
}, i.options?.search?.[i.type] || i.options?.[i.type], z(i.options?.search?.[i.type]?.on || i.options?.[i.type]?.on || {}), {
|
|
2331
2345
|
disabled: i.disabled?.search
|
|
2332
2346
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2333
2347
|
]),
|
|
2334
2348
|
C(m.$slots, "search-" + i.key + "-right", {
|
|
2335
|
-
row:
|
|
2349
|
+
row: a(t).search.form
|
|
2336
2350
|
})
|
|
2337
2351
|
]),
|
|
2338
2352
|
_: 2
|
|
2339
2353
|
}, 1032, ["label"])) : v("", !0),
|
|
2340
2354
|
C(m.$slots, "search-" + i.key + "-end", {
|
|
2341
|
-
row:
|
|
2355
|
+
row: a(t).search.form
|
|
2342
2356
|
})
|
|
2343
2357
|
], 64))), 128)),
|
|
2344
2358
|
C(m.$slots, "search-center", {
|
|
2345
|
-
row:
|
|
2359
|
+
row: a(t).search.form
|
|
2346
2360
|
}),
|
|
2347
|
-
n.option.tools?.search || n.option.tools?.reset ? (
|
|
2361
|
+
n.option.tools?.search || n.option.tools?.reset ? (u(), g(a(te), { key: 0 }, {
|
|
2348
2362
|
default: y(() => [
|
|
2349
|
-
n.option.tools?.search ? (
|
|
2363
|
+
n.option.tools?.search ? (u(), g(a(L), {
|
|
2350
2364
|
key: 0,
|
|
2351
2365
|
type: "primary",
|
|
2352
|
-
onClick:
|
|
2366
|
+
onClick: a(t).search.submit
|
|
2353
2367
|
}, {
|
|
2354
2368
|
default: y(() => [
|
|
2355
|
-
U(O(
|
|
2369
|
+
U(O(a(w).tCurd("search")), 1)
|
|
2356
2370
|
]),
|
|
2357
2371
|
_: 1
|
|
2358
2372
|
}, 8, ["onClick"])) : v("", !0),
|
|
2359
|
-
n.option.tools?.reset ? (
|
|
2373
|
+
n.option.tools?.reset ? (u(), g(a(L), {
|
|
2360
2374
|
key: 1,
|
|
2361
|
-
onClick:
|
|
2375
|
+
onClick: a(t).search.reset
|
|
2362
2376
|
}, {
|
|
2363
2377
|
default: y(() => [
|
|
2364
|
-
U(O(
|
|
2378
|
+
U(O(a(w).tCurd("reset")), 1)
|
|
2365
2379
|
]),
|
|
2366
2380
|
_: 1
|
|
2367
2381
|
}, 8, ["onClick"])) : v("", !0)
|
|
@@ -2369,84 +2383,84 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2369
2383
|
_: 1
|
|
2370
2384
|
})) : v("", !0),
|
|
2371
2385
|
C(m.$slots, "search-end", {
|
|
2372
|
-
row:
|
|
2386
|
+
row: a(t).search.form
|
|
2373
2387
|
})
|
|
2374
2388
|
]),
|
|
2375
2389
|
_: 3
|
|
2376
2390
|
}, 8, ["model", "size"])
|
|
2377
2391
|
])) : v("", !0),
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2392
|
+
E("div", $t, [
|
|
2393
|
+
E("div", Ut, [
|
|
2394
|
+
a(l)(n.option.tools?.add) ? (u(), b("div", Dt, [
|
|
2395
|
+
D(a(L), {
|
|
2382
2396
|
type: "primary",
|
|
2383
|
-
onClick: c[0] || (c[0] = (i) =>
|
|
2397
|
+
onClick: c[0] || (c[0] = (i) => a(t).update.open(a(p).Add)),
|
|
2384
2398
|
size: n.option.size?.search
|
|
2385
2399
|
}, {
|
|
2386
2400
|
default: y(() => [
|
|
2387
|
-
U(O(
|
|
2401
|
+
U(O(a(w).tCurd("add")), 1)
|
|
2388
2402
|
]),
|
|
2389
2403
|
_: 1
|
|
2390
2404
|
}, 8, ["size"])
|
|
2391
2405
|
])) : v("", !0),
|
|
2392
|
-
n.option.table?.selectable &&
|
|
2393
|
-
|
|
2406
|
+
n.option.table?.selectable && a(l)(n.option.tools?.delete) ? (u(), b("div", Et, [
|
|
2407
|
+
D(a(L), {
|
|
2394
2408
|
type: "danger",
|
|
2395
|
-
onClick: c[1] || (c[1] = (i) =>
|
|
2409
|
+
onClick: c[1] || (c[1] = (i) => a(t).remove.open(a(t).table.selection.list)),
|
|
2396
2410
|
size: n.option.size?.search
|
|
2397
2411
|
}, {
|
|
2398
2412
|
default: y(() => [
|
|
2399
|
-
U(O(
|
|
2413
|
+
U(O(a(w).tCurd("delete")), 1)
|
|
2400
2414
|
]),
|
|
2401
2415
|
_: 1
|
|
2402
2416
|
}, 8, ["size"])
|
|
2403
2417
|
])) : v("", !0),
|
|
2404
|
-
n.option.tools?.expand ? (
|
|
2405
|
-
|
|
2418
|
+
n.option.tools?.expand ? (u(), b("div", Ot, [
|
|
2419
|
+
D(a(L), {
|
|
2406
2420
|
type: "warning",
|
|
2407
|
-
onClick: c[2] || (c[2] = (i) =>
|
|
2421
|
+
onClick: c[2] || (c[2] = (i) => a(t).table.expand.all()),
|
|
2408
2422
|
size: n.option.size?.search
|
|
2409
2423
|
}, {
|
|
2410
2424
|
default: y(() => [
|
|
2411
|
-
U(O(
|
|
2425
|
+
U(O(a(w).tCurd("expandCollapse")), 1)
|
|
2412
2426
|
]),
|
|
2413
2427
|
_: 1
|
|
2414
2428
|
}, 8, ["size"])
|
|
2415
2429
|
])) : v("", !0),
|
|
2416
|
-
n.option.tools?.export?.show ? (
|
|
2417
|
-
n.option.tools?.export?.dropdown?.show ? (
|
|
2430
|
+
n.option.tools?.export?.show ? (u(), b($, { key: 3 }, [
|
|
2431
|
+
n.option.tools?.export?.dropdown?.show ? (u(), g(a(he), {
|
|
2418
2432
|
key: 0,
|
|
2419
|
-
onCommand:
|
|
2433
|
+
onCommand: a(t).export.click
|
|
2420
2434
|
}, {
|
|
2421
2435
|
dropdown: y(() => [
|
|
2422
|
-
|
|
2436
|
+
D(a(ge), {
|
|
2423
2437
|
size: n.option.size?.search
|
|
2424
2438
|
}, {
|
|
2425
2439
|
default: y(() => [
|
|
2426
|
-
n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable ||
|
|
2440
|
+
n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || a(l)(n.option.tools?.delete)) ? (u(), g(a(oe), {
|
|
2427
2441
|
key: 0,
|
|
2428
2442
|
command: "select"
|
|
2429
2443
|
}, {
|
|
2430
2444
|
default: y(() => [
|
|
2431
|
-
U(O(
|
|
2445
|
+
U(O(a(w).tCurd("exportSelect")), 1)
|
|
2432
2446
|
]),
|
|
2433
2447
|
_: 1
|
|
2434
2448
|
})) : v("", !0),
|
|
2435
|
-
n.option.tools?.export?.dropdown?.page ? (
|
|
2449
|
+
n.option.tools?.export?.dropdown?.page ? (u(), g(a(oe), {
|
|
2436
2450
|
key: 1,
|
|
2437
2451
|
command: "page"
|
|
2438
2452
|
}, {
|
|
2439
2453
|
default: y(() => [
|
|
2440
|
-
U(O(
|
|
2454
|
+
U(O(a(w).tCurd("exportPage")), 1)
|
|
2441
2455
|
]),
|
|
2442
2456
|
_: 1
|
|
2443
2457
|
})) : v("", !0),
|
|
2444
|
-
n.option.tools?.export?.dropdown?.all ? (
|
|
2458
|
+
n.option.tools?.export?.dropdown?.all ? (u(), g(a(oe), {
|
|
2445
2459
|
key: 2,
|
|
2446
2460
|
command: "all"
|
|
2447
2461
|
}, {
|
|
2448
2462
|
default: y(() => [
|
|
2449
|
-
U(O(
|
|
2463
|
+
U(O(a(w).tCurd("exportAll")), 1)
|
|
2450
2464
|
]),
|
|
2451
2465
|
_: 1
|
|
2452
2466
|
})) : v("", !0)
|
|
@@ -2455,29 +2469,29 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2455
2469
|
}, 8, ["size"])
|
|
2456
2470
|
]),
|
|
2457
2471
|
default: y(() => [
|
|
2458
|
-
|
|
2459
|
-
|
|
2472
|
+
E("div", St, [
|
|
2473
|
+
D(a(L), {
|
|
2460
2474
|
type: "warning",
|
|
2461
|
-
loading:
|
|
2475
|
+
loading: a(t).export.loading,
|
|
2462
2476
|
size: n.option.size?.search
|
|
2463
2477
|
}, {
|
|
2464
2478
|
default: y(() => [
|
|
2465
|
-
U(O(
|
|
2479
|
+
U(O(a(w).tCurd("export")), 1)
|
|
2466
2480
|
]),
|
|
2467
2481
|
_: 1
|
|
2468
2482
|
}, 8, ["loading", "size"])
|
|
2469
2483
|
])
|
|
2470
2484
|
]),
|
|
2471
2485
|
_: 1
|
|
2472
|
-
}, 8, ["onCommand"])) : (
|
|
2473
|
-
|
|
2486
|
+
}, 8, ["onCommand"])) : (u(), b("div", Mt, [
|
|
2487
|
+
D(a(L), {
|
|
2474
2488
|
type: "warning",
|
|
2475
|
-
loading:
|
|
2489
|
+
loading: a(t).export.loading,
|
|
2476
2490
|
size: n.option.size?.search,
|
|
2477
|
-
onClick: c[3] || (c[3] = (i) =>
|
|
2491
|
+
onClick: c[3] || (c[3] = (i) => a(t).export.run.start("all"))
|
|
2478
2492
|
}, {
|
|
2479
2493
|
default: y(() => [
|
|
2480
|
-
U(O(
|
|
2494
|
+
U(O(a(w).tCurd("export")), 1)
|
|
2481
2495
|
]),
|
|
2482
2496
|
_: 1
|
|
2483
2497
|
}, 8, ["loading", "size"])
|
|
@@ -2485,68 +2499,68 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2485
2499
|
], 64)) : v("", !0),
|
|
2486
2500
|
C(m.$slots, "tools-left")
|
|
2487
2501
|
]),
|
|
2488
|
-
|
|
2502
|
+
E("div", Tt, [
|
|
2489
2503
|
C(m.$slots, "tools-right"),
|
|
2490
|
-
|
|
2504
|
+
a(t).page.showTools ? (u(), g(a(de), V({
|
|
2491
2505
|
key: 0,
|
|
2492
|
-
"current-page":
|
|
2493
|
-
"onUpdate:currentPage": c[4] || (c[4] = (i) =>
|
|
2494
|
-
"page-size":
|
|
2495
|
-
"onUpdate:pageSize": c[5] || (c[5] = (i) =>
|
|
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),
|
|
2496
2510
|
background: "",
|
|
2497
|
-
"page-sizes":
|
|
2498
|
-
"pager-count":
|
|
2499
|
-
layout:
|
|
2500
|
-
total:
|
|
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,
|
|
2501
2515
|
size: n.option.size?.table,
|
|
2502
|
-
onSizeChange:
|
|
2503
|
-
onCurrentChange:
|
|
2516
|
+
onSizeChange: a(t).table.getList,
|
|
2517
|
+
onCurrentChange: a(t).table.getList
|
|
2504
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),
|
|
2505
|
-
n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (
|
|
2519
|
+
n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (u(), g(f, {
|
|
2506
2520
|
key: 1,
|
|
2507
2521
|
effect: "dark",
|
|
2508
|
-
content:
|
|
2522
|
+
content: a(t).table.header.group.expand ? a(w).tCurd("mergeColumn") : a(w).tCurd("expandColumn"),
|
|
2509
2523
|
placement: "top"
|
|
2510
2524
|
}, {
|
|
2511
2525
|
default: y(() => [
|
|
2512
|
-
|
|
2526
|
+
E("div", {
|
|
2513
2527
|
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2514
2528
|
onClick: c[6] || (c[6] = //@ts-ignore
|
|
2515
|
-
(...i) =>
|
|
2529
|
+
(...i) => a(t).table.header.group.toggleExpandAll && a(t).table.header.group.toggleExpandAll(...i))
|
|
2516
2530
|
}, [
|
|
2517
|
-
|
|
2531
|
+
a(t).table.header.group.expand ? (u(), g(wt, { key: 0 })) : (u(), g(Vt, { key: 1 }))
|
|
2518
2532
|
], 2)
|
|
2519
2533
|
]),
|
|
2520
2534
|
_: 1
|
|
2521
2535
|
}, 8, ["content"])) : v("", !0),
|
|
2522
|
-
n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (
|
|
2536
|
+
n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (u(), b("div", {
|
|
2523
2537
|
key: 2,
|
|
2524
2538
|
class: I(["refresh-btn", [n.option.size?.search]]),
|
|
2525
2539
|
onClick: c[7] || (c[7] = //@ts-ignore
|
|
2526
|
-
(...i) =>
|
|
2540
|
+
(...i) => a(t).table.getList && a(t).table.getList(...i))
|
|
2527
2541
|
}, [
|
|
2528
|
-
|
|
2542
|
+
D(Ne)
|
|
2529
2543
|
], 2)) : v("", !0)
|
|
2530
2544
|
])
|
|
2531
2545
|
]),
|
|
2532
|
-
|
|
2546
|
+
E("div", {
|
|
2533
2547
|
class: I(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : "", n.option.table?.editMode ? "edit-mode" : ""]])
|
|
2534
2548
|
}, [
|
|
2535
|
-
|
|
2549
|
+
E("div", {
|
|
2536
2550
|
class: I(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2537
2551
|
}, [
|
|
2538
|
-
|
|
2552
|
+
Ve((u(), g(a(ye), V({
|
|
2539
2553
|
ref_key: "tableRef",
|
|
2540
2554
|
ref: d,
|
|
2541
|
-
data:
|
|
2555
|
+
data: a(t).table.data,
|
|
2542
2556
|
border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
|
|
2543
|
-
onSelectionChange:
|
|
2544
|
-
onSortChange:
|
|
2545
|
-
"expand-row-keys":
|
|
2546
|
-
onExpandChange:
|
|
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
|
|
2547
2561
|
}, n.option.table, z(n.option.table?.on || {})), {
|
|
2548
2562
|
default: y(() => [
|
|
2549
|
-
(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) ||
|
|
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({
|
|
2550
2564
|
key: 0,
|
|
2551
2565
|
type: "selection",
|
|
2552
2566
|
width: "40",
|
|
@@ -2555,7 +2569,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2555
2569
|
"show-overflow-tooltip": !1,
|
|
2556
2570
|
className: "cc1-form-selectable-column"
|
|
2557
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),
|
|
2558
|
-
(typeof n.option.table?.index == "object" ? n.option.table?.index?.show : n.option.table?.index) ? (
|
|
2572
|
+
(typeof n.option.table?.index == "object" ? n.option.table?.index?.show : n.option.table?.index) ? (u(), g(a(ee), V({
|
|
2559
2573
|
key: 1,
|
|
2560
2574
|
type: "index",
|
|
2561
2575
|
fixed: "left",
|
|
@@ -2565,19 +2579,19 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2565
2579
|
"show-overflow-tooltip": !1,
|
|
2566
2580
|
className: "cc1-form-index-column"
|
|
2567
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),
|
|
2568
|
-
|
|
2569
|
-
conf:
|
|
2570
|
-
columnList:
|
|
2582
|
+
D(ut, {
|
|
2583
|
+
conf: a(t),
|
|
2584
|
+
columnList: a(t).table.column.list,
|
|
2571
2585
|
option: n.option
|
|
2572
|
-
},
|
|
2573
|
-
|
|
2586
|
+
}, Q({ _: 2 }, [
|
|
2587
|
+
A(m.$slots, (i, h) => ({
|
|
2574
2588
|
name: h,
|
|
2575
2589
|
fn: y((S) => [
|
|
2576
|
-
C(m.$slots, h,
|
|
2590
|
+
C(m.$slots, h, ze($e(S || {})))
|
|
2577
2591
|
])
|
|
2578
2592
|
}))
|
|
2579
2593
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2580
|
-
|
|
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({
|
|
2581
2595
|
key: 2,
|
|
2582
2596
|
width: "auto",
|
|
2583
2597
|
"max-width": "200",
|
|
@@ -2586,80 +2600,80 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2586
2600
|
}, n.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2587
2601
|
header: y(() => [
|
|
2588
2602
|
C(m.$slots, "table-header-op", {}, () => [
|
|
2589
|
-
U(O(
|
|
2603
|
+
U(O(a(w).tCurd("operation")), 1)
|
|
2590
2604
|
])
|
|
2591
2605
|
]),
|
|
2592
2606
|
default: y(({ row: i }) => [
|
|
2593
|
-
|
|
2607
|
+
D(a(q), {
|
|
2594
2608
|
size: n.option.size?.table
|
|
2595
2609
|
}, {
|
|
2596
2610
|
default: y(() => [
|
|
2597
2611
|
C(m.$slots, "table-op-left", { row: i }),
|
|
2598
|
-
|
|
2599
|
-
|
|
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), {
|
|
2600
2614
|
link: "",
|
|
2601
2615
|
type: "info",
|
|
2602
|
-
onClick:
|
|
2616
|
+
onClick: a(t).update.close
|
|
2603
2617
|
}, {
|
|
2604
2618
|
default: y(() => [
|
|
2605
|
-
U(O(
|
|
2619
|
+
U(O(a(w).tCurd("cancel")), 1)
|
|
2606
2620
|
]),
|
|
2607
2621
|
_: 1
|
|
2608
2622
|
}, 8, ["onClick"]),
|
|
2609
|
-
|
|
2623
|
+
D(a(L), {
|
|
2610
2624
|
link: "",
|
|
2611
2625
|
type: "primary",
|
|
2612
|
-
onClick:
|
|
2613
|
-
loading:
|
|
2626
|
+
onClick: a(t).update.submit,
|
|
2627
|
+
loading: a(t).update.loading
|
|
2614
2628
|
}, {
|
|
2615
2629
|
default: y(() => [
|
|
2616
|
-
U(O(
|
|
2630
|
+
U(O(a(w).tCurd("confirm")), 1)
|
|
2617
2631
|
]),
|
|
2618
2632
|
_: 1
|
|
2619
2633
|
}, 8, ["onClick", "loading"]),
|
|
2620
2634
|
C(m.$slots, "table-op-edit-right", { row: i })
|
|
2621
|
-
], 64)) : (
|
|
2622
|
-
|
|
2635
|
+
], 64)) : (u(), b($, { key: 1 }, [
|
|
2636
|
+
a(l)(n.option.table?.add, i) ? (u(), g(a(L), {
|
|
2623
2637
|
key: 0,
|
|
2624
2638
|
link: "",
|
|
2625
2639
|
type: "primary",
|
|
2626
|
-
onClick: (h) =>
|
|
2640
|
+
onClick: (h) => a(t).update.open(a(p).Add, i)
|
|
2627
2641
|
}, {
|
|
2628
2642
|
default: y(() => [
|
|
2629
|
-
U(O(
|
|
2643
|
+
U(O(a(w).tCurd("add")), 1)
|
|
2630
2644
|
]),
|
|
2631
2645
|
_: 2
|
|
2632
2646
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2633
|
-
|
|
2647
|
+
a(l)(n.option.table?.view, i) ? (u(), g(a(L), {
|
|
2634
2648
|
key: 1,
|
|
2635
2649
|
link: "",
|
|
2636
2650
|
type: "primary",
|
|
2637
|
-
onClick: (h) =>
|
|
2651
|
+
onClick: (h) => a(t).update.open(a(p).View, i)
|
|
2638
2652
|
}, {
|
|
2639
2653
|
default: y(() => [
|
|
2640
|
-
U(O(
|
|
2654
|
+
U(O(a(w).tCurd("view")), 1)
|
|
2641
2655
|
]),
|
|
2642
2656
|
_: 2
|
|
2643
2657
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2644
|
-
|
|
2658
|
+
a(l)(n.option.table?.update, i) ? (u(), g(a(L), {
|
|
2645
2659
|
key: 2,
|
|
2646
2660
|
link: "",
|
|
2647
2661
|
type: "warning",
|
|
2648
|
-
onClick: (h) =>
|
|
2662
|
+
onClick: (h) => a(t).update.open(a(p).Update, i)
|
|
2649
2663
|
}, {
|
|
2650
2664
|
default: y(() => [
|
|
2651
|
-
U(O(
|
|
2665
|
+
U(O(a(w).tCurd("edit")), 1)
|
|
2652
2666
|
]),
|
|
2653
2667
|
_: 2
|
|
2654
2668
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2655
|
-
|
|
2669
|
+
a(l)(n.option.table?.delete, i) ? (u(), g(a(L), {
|
|
2656
2670
|
key: 3,
|
|
2657
2671
|
link: "",
|
|
2658
2672
|
type: "danger",
|
|
2659
|
-
onClick: (h) =>
|
|
2673
|
+
onClick: (h) => a(t).remove.open([i])
|
|
2660
2674
|
}, {
|
|
2661
2675
|
default: y(() => [
|
|
2662
|
-
U(O(
|
|
2676
|
+
U(O(a(w).tCurd("delete")), 1)
|
|
2663
2677
|
]),
|
|
2664
2678
|
_: 2
|
|
2665
2679
|
}, 1032, ["onClick"])) : v("", !0),
|
|
@@ -2674,58 +2688,58 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2674
2688
|
]),
|
|
2675
2689
|
_: 3
|
|
2676
2690
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2677
|
-
[k,
|
|
2691
|
+
[k, a(t).table.loading]
|
|
2678
2692
|
])
|
|
2679
2693
|
], 2)
|
|
2680
2694
|
], 2),
|
|
2681
|
-
|
|
2682
|
-
(n.option.page?.show === void 0 || n.option.page?.show) && !
|
|
2695
|
+
E("div", At, [
|
|
2696
|
+
(n.option.page?.show === void 0 || n.option.page?.show) && !a(t).page.showTools ? (u(), g(a(de), V({
|
|
2683
2697
|
key: 0,
|
|
2684
|
-
"current-page":
|
|
2685
|
-
"onUpdate:currentPage": c[8] || (c[8] = (i) =>
|
|
2686
|
-
"page-size":
|
|
2687
|
-
"onUpdate:pageSize": c[9] || (c[9] = (i) =>
|
|
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),
|
|
2688
2702
|
background: "",
|
|
2689
|
-
"page-sizes":
|
|
2690
|
-
"pager-count":
|
|
2691
|
-
layout:
|
|
2692
|
-
total:
|
|
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,
|
|
2693
2707
|
size: n.option.size?.table,
|
|
2694
|
-
onSizeChange:
|
|
2695
|
-
onCurrentChange:
|
|
2708
|
+
onSizeChange: a(t).table.getList,
|
|
2709
|
+
onCurrentChange: a(t).table.getList
|
|
2696
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)
|
|
2697
2711
|
])
|
|
2698
2712
|
], 2),
|
|
2699
2713
|
C(m.$slots, "box-right")
|
|
2700
2714
|
], 2),
|
|
2701
|
-
|
|
2702
|
-
modelValue:
|
|
2703
|
-
"onUpdate:modelValue": c[10] || (c[10] = (i) =>
|
|
2704
|
-
title:
|
|
2705
|
-
"before-close":
|
|
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
|
|
2706
2720
|
}, n.option.dialog), {
|
|
2707
2721
|
footer: y(() => [
|
|
2708
|
-
|
|
2709
|
-
|
|
2722
|
+
E("span", Ft, [
|
|
2723
|
+
D(a(q), {
|
|
2710
2724
|
size: n.option.size?.form
|
|
2711
2725
|
}, {
|
|
2712
2726
|
default: y(() => [
|
|
2713
|
-
|
|
2714
|
-
onClick:
|
|
2727
|
+
D(a(L), {
|
|
2728
|
+
onClick: a(t).update.close
|
|
2715
2729
|
}, {
|
|
2716
2730
|
default: y(() => [
|
|
2717
|
-
U(O(
|
|
2731
|
+
U(O(a(w).tCurd("close")), 1)
|
|
2718
2732
|
]),
|
|
2719
2733
|
_: 1
|
|
2720
2734
|
}, 8, ["onClick"]),
|
|
2721
|
-
|
|
2735
|
+
a(t).update.type !== a(p).View ? (u(), g(a(L), {
|
|
2722
2736
|
key: 0,
|
|
2723
2737
|
type: "primary",
|
|
2724
|
-
onClick:
|
|
2725
|
-
loading:
|
|
2738
|
+
onClick: a(t).update.submit,
|
|
2739
|
+
loading: a(t).update.loading
|
|
2726
2740
|
}, {
|
|
2727
2741
|
default: y(() => [
|
|
2728
|
-
U(O(
|
|
2742
|
+
U(O(a(w).tCurd("submit")), 1)
|
|
2729
2743
|
]),
|
|
2730
2744
|
_: 1
|
|
2731
2745
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
@@ -2735,55 +2749,55 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2735
2749
|
])
|
|
2736
2750
|
]),
|
|
2737
2751
|
default: y(() => [
|
|
2738
|
-
|
|
2752
|
+
D(a(q), {
|
|
2739
2753
|
ref_key: "ruleFormRef",
|
|
2740
2754
|
ref: r,
|
|
2741
|
-
model:
|
|
2742
|
-
rules:
|
|
2755
|
+
model: a(t).update.form,
|
|
2756
|
+
rules: a(t).update.rules,
|
|
2743
2757
|
size: n.option.size?.form,
|
|
2744
2758
|
class: "update-dialog-form"
|
|
2745
2759
|
}, {
|
|
2746
2760
|
default: y(() => [
|
|
2747
|
-
|
|
2748
|
-
|
|
2761
|
+
a(t).update.showContent ? (u(!0), b($, { key: 0 }, A(a(t).update.formColumn, (i) => (u(), b($, null, [
|
|
2762
|
+
a(l)(
|
|
2749
2763
|
(() => {
|
|
2750
2764
|
const h = [], S = (B) => {
|
|
2751
|
-
B?.item?.children ? S(B.item.children) : h.push(...B.map((
|
|
2765
|
+
B?.item?.children ? S(B.item.children) : h.push(...B.map((F) => F.item?.show?.form));
|
|
2752
2766
|
};
|
|
2753
2767
|
return S(i), h;
|
|
2754
2768
|
})(),
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
) ? (
|
|
2769
|
+
a(t).update.form,
|
|
2770
|
+
a(t).update.type
|
|
2771
|
+
) ? (u(), b("div", {
|
|
2758
2772
|
key: 0,
|
|
2759
2773
|
class: I(["row curd-row", {
|
|
2760
2774
|
stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
|
|
2761
2775
|
}])
|
|
2762
2776
|
}, [
|
|
2763
2777
|
C(m.$slots, "form-start", {
|
|
2764
|
-
row:
|
|
2778
|
+
row: a(t).update.form
|
|
2765
2779
|
}),
|
|
2766
|
-
(
|
|
2767
|
-
|
|
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", {
|
|
2768
2782
|
key: 0,
|
|
2769
|
-
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}`])
|
|
2770
2784
|
}, [
|
|
2771
|
-
(
|
|
2785
|
+
(u(!0), b($, null, A(h.item.children ? h.children : [h], (S) => (u(), g(ht, {
|
|
2772
2786
|
key: S.item.key,
|
|
2773
|
-
conf:
|
|
2787
|
+
conf: a(t),
|
|
2774
2788
|
item: S
|
|
2775
|
-
},
|
|
2776
|
-
|
|
2777
|
-
name:
|
|
2789
|
+
}, Q({ _: 2 }, [
|
|
2790
|
+
A(m.$slots, (B, F) => ({
|
|
2791
|
+
name: F,
|
|
2778
2792
|
fn: y((R) => [
|
|
2779
|
-
C(m.$slots,
|
|
2793
|
+
C(m.$slots, F, V({ ref_for: !0 }, R || {}))
|
|
2780
2794
|
])
|
|
2781
2795
|
}))
|
|
2782
2796
|
]), 1032, ["conf", "item"]))), 128))
|
|
2783
2797
|
], 2)) : v("", !0)
|
|
2784
2798
|
], 64))), 256)),
|
|
2785
2799
|
C(m.$slots, "form-end", {
|
|
2786
|
-
row:
|
|
2800
|
+
row: a(t).update.form
|
|
2787
2801
|
})
|
|
2788
2802
|
], 2)) : v("", !0)
|
|
2789
2803
|
], 64))), 256)) : v("", !0)
|
|
@@ -2793,33 +2807,33 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2793
2807
|
]),
|
|
2794
2808
|
_: 3
|
|
2795
2809
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2796
|
-
|
|
2797
|
-
modelValue:
|
|
2798
|
-
"onUpdate:modelValue": c[11] || (c[11] = (i) =>
|
|
2799
|
-
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,
|
|
2800
2814
|
"close-on-click-modal": !1
|
|
2801
2815
|
}, {
|
|
2802
2816
|
footer: y(() => [
|
|
2803
|
-
|
|
2804
|
-
|
|
2817
|
+
E("span", Bt, [
|
|
2818
|
+
D(a(q), {
|
|
2805
2819
|
size: n.option.size?.form
|
|
2806
2820
|
}, {
|
|
2807
2821
|
default: y(() => [
|
|
2808
|
-
|
|
2809
|
-
onClick:
|
|
2822
|
+
D(a(L), {
|
|
2823
|
+
onClick: a(t).remove.close
|
|
2810
2824
|
}, {
|
|
2811
2825
|
default: y(() => [
|
|
2812
|
-
U(O(
|
|
2826
|
+
U(O(a(w).tCurd("close")), 1)
|
|
2813
2827
|
]),
|
|
2814
2828
|
_: 1
|
|
2815
2829
|
}, 8, ["onClick"]),
|
|
2816
|
-
|
|
2830
|
+
D(a(L), {
|
|
2817
2831
|
type: "danger",
|
|
2818
|
-
onClick:
|
|
2819
|
-
loading:
|
|
2832
|
+
onClick: a(t).remove.submit,
|
|
2833
|
+
loading: a(t).remove.loading
|
|
2820
2834
|
}, {
|
|
2821
2835
|
default: y(() => [
|
|
2822
|
-
U(O(
|
|
2836
|
+
U(O(a(w).tCurd("confirmDelete")), 1)
|
|
2823
2837
|
]),
|
|
2824
2838
|
_: 1
|
|
2825
2839
|
}, 8, ["onClick", "loading"])
|
|
@@ -2829,11 +2843,16 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2829
2843
|
])
|
|
2830
2844
|
]),
|
|
2831
2845
|
default: y(() => [
|
|
2832
|
-
|
|
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))
|
|
2833
2852
|
]),
|
|
2834
2853
|
_: 1
|
|
2835
2854
|
}, 8, ["modelValue", "title"]),
|
|
2836
|
-
|
|
2855
|
+
D(Ie, {
|
|
2837
2856
|
ref_key: "switchConfirmRef",
|
|
2838
2857
|
ref: e,
|
|
2839
2858
|
size: n.option.size?.form
|
|
@@ -2842,24 +2861,24 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
|
|
|
2842
2861
|
};
|
|
2843
2862
|
}
|
|
2844
2863
|
});
|
|
2845
|
-
class
|
|
2864
|
+
class Nt {
|
|
2846
2865
|
/**
|
|
2847
2866
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2848
2867
|
*
|
|
2849
2868
|
* @param href - 文件的远程地址
|
|
2850
2869
|
* @param name - 下载后的文件名,默认 `'download.png'`
|
|
2851
2870
|
*/
|
|
2852
|
-
static async download(
|
|
2871
|
+
static async download(o, p = "download.png") {
|
|
2853
2872
|
const s = document.createElement("a");
|
|
2854
|
-
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);
|
|
2855
2874
|
}
|
|
2856
2875
|
/**
|
|
2857
2876
|
* 将json对象或者json数组导出为json文件保存
|
|
2858
2877
|
* @param data
|
|
2859
2878
|
* @param name
|
|
2860
2879
|
*/
|
|
2861
|
-
static exportJSONFile = (
|
|
2862
|
-
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");
|
|
2863
2882
|
t.href = l, t.download = `${p || "config"}.json`, t.click();
|
|
2864
2883
|
};
|
|
2865
2884
|
/**
|
|
@@ -2867,10 +2886,10 @@ class Rt {
|
|
|
2867
2886
|
* @param param
|
|
2868
2887
|
* @returns
|
|
2869
2888
|
*/
|
|
2870
|
-
static importFile = async (
|
|
2889
|
+
static importFile = async (o) => new Promise((p, s) => {
|
|
2871
2890
|
const l = document.createElement("input");
|
|
2872
2891
|
l.type = "file";
|
|
2873
|
-
const t =
|
|
2892
|
+
const t = o?.accept || ".json";
|
|
2874
2893
|
l.accept = t, l.style.display = "none", l.onchange = (e) => {
|
|
2875
2894
|
const r = e.target.files[0];
|
|
2876
2895
|
if (!r) {
|
|
@@ -2887,26 +2906,26 @@ class Rt {
|
|
|
2887
2906
|
}, document.body.appendChild(l), l.click();
|
|
2888
2907
|
});
|
|
2889
2908
|
}
|
|
2890
|
-
const
|
|
2891
|
-
if (n.component("TCurd",
|
|
2892
|
-
|
|
2893
|
-
for (const p in
|
|
2894
|
-
n.component(p,
|
|
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]);
|
|
2895
2914
|
}
|
|
2896
|
-
},
|
|
2897
|
-
install:
|
|
2915
|
+
}, Wt = {
|
|
2916
|
+
install: It
|
|
2898
2917
|
};
|
|
2899
2918
|
export {
|
|
2900
|
-
|
|
2919
|
+
P as ArrUtil,
|
|
2901
2920
|
je as ExcelUtil,
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2921
|
+
Le as TColumn,
|
|
2922
|
+
Rt as TCurd,
|
|
2923
|
+
Nt as TFile,
|
|
2924
|
+
j as TForm,
|
|
2925
|
+
T as TFormConfig,
|
|
2907
2926
|
w as TFormI18n,
|
|
2908
2927
|
se as TFormList,
|
|
2909
2928
|
M as TSys,
|
|
2910
|
-
|
|
2911
|
-
|
|
2929
|
+
Wt as default,
|
|
2930
|
+
It as install
|
|
2912
2931
|
};
|