@aspire-ui/element-component-pro 1.0.18 → 1.0.20
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/ProTable/ProTable.vue.d.ts +1 -104
- package/dist/ProTable/components/CellRenderers.d.ts +92 -0
- package/dist/ProTable/components/TableColumnGroup.vue.d.ts +39 -0
- package/dist/ProTable/types/index.d.ts +2 -0
- package/dist/element-component-pro.es.js +1096 -1045
- package/dist/element-component-pro.es.js.map +1 -1
- package/dist/element-component-pro.umd.js +2 -2
- package/dist/element-component-pro.umd.js.map +1 -1
- package/dist/index.d.ts +1 -104
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ProForm/ProForm.vue +1 -1
- package/src/ProTable/ProTable.vue +57 -126
- package/src/ProTable/components/CellRenderers.ts +59 -0
- package/src/ProTable/components/TableColumnGroup.vue +101 -0
- package/src/ProTable/types/index.ts +2 -0
|
@@ -1,39 +1,146 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { MessageBox as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import { reactive as et, defineComponent as ne, h as de, useSlots as he, ref as z, computed as y, onMounted as ve, nextTick as Le, onUnmounted as Be, watch as X, unref as me } from "vue";
|
|
2
|
+
import { MessageBox as tt } from "element-ui";
|
|
3
|
+
const pe = et({});
|
|
4
|
+
function Te(s, e) {
|
|
5
5
|
if (!e)
|
|
6
|
-
return
|
|
6
|
+
return s;
|
|
7
7
|
for (const n in e)
|
|
8
8
|
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
|
9
|
-
const t =
|
|
10
|
-
|
|
9
|
+
const t = s[n], o = e[n];
|
|
10
|
+
Oe(o) ? Oe(t) ? s[n] = Te(
|
|
11
11
|
t,
|
|
12
12
|
o
|
|
13
|
-
) :
|
|
13
|
+
) : s[n] = { ...o } : s[n] = o;
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return s;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!
|
|
17
|
+
function Oe(s) {
|
|
18
|
+
if (!s || typeof s != "object")
|
|
19
19
|
return !1;
|
|
20
|
-
const e = Object.getPrototypeOf(
|
|
20
|
+
const e = Object.getPrototypeOf(s);
|
|
21
21
|
return e === Object.prototype || e === null;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Re() {
|
|
24
24
|
return {
|
|
25
|
-
getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ?
|
|
25
|
+
getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? pe : pe[t] ?? {})),
|
|
26
26
|
setSetting: (t, o) => {
|
|
27
|
-
const r =
|
|
28
|
-
r ?
|
|
27
|
+
const r = pe[t];
|
|
28
|
+
r ? pe[t] = Te({ ...r }, o) : pe[t] = { ...o };
|
|
29
29
|
},
|
|
30
30
|
mergeSettings: (t, o) => {
|
|
31
|
-
const r =
|
|
32
|
-
return
|
|
31
|
+
const r = pe[t] ?? {};
|
|
32
|
+
return Te({ ...r }, o);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const je = ne({
|
|
37
|
+
name: "EcpProTableDefaultCellRenderer",
|
|
38
|
+
props: {
|
|
39
|
+
column: { type: Object, required: !0 },
|
|
40
|
+
record: { type: Object, required: !0 },
|
|
41
|
+
index: { type: Number, required: !0 },
|
|
42
|
+
value: { required: !1 }
|
|
43
|
+
},
|
|
44
|
+
setup(s) {
|
|
45
|
+
return () => {
|
|
46
|
+
var n, t;
|
|
47
|
+
const e = s.column;
|
|
48
|
+
if (e != null && e.customRender) {
|
|
49
|
+
const o = e.customRender({ text: s.value, record: s.record, index: s.index });
|
|
50
|
+
return typeof o == "string" || typeof o == "number" ? de("span", String(o)) : o;
|
|
51
|
+
}
|
|
52
|
+
if (e != null && e.valueEnum) {
|
|
53
|
+
const o = ((t = (n = e.valueEnum) == null ? void 0 : n[s.value]) == null ? void 0 : t.text) ?? s.value;
|
|
54
|
+
return de("span", o == null ? "" : String(o));
|
|
55
|
+
}
|
|
56
|
+
return de("span", s.value == null ? "" : String(s.value));
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}), qe = ne({
|
|
60
|
+
name: "EcpProTableBodyCellRenderer",
|
|
61
|
+
props: {
|
|
62
|
+
slotRender: { type: Function, required: !0 },
|
|
63
|
+
column: { type: Object, required: !0 },
|
|
64
|
+
record: { type: Object, required: !0 },
|
|
65
|
+
index: { type: Number, required: !0 },
|
|
66
|
+
value: { required: !1 },
|
|
67
|
+
customRender: { type: Function, required: !1 },
|
|
68
|
+
valueEnum: { type: Object, required: !1 }
|
|
69
|
+
},
|
|
70
|
+
setup(s) {
|
|
71
|
+
return () => {
|
|
72
|
+
const e = s.slotRender, n = e == null ? void 0 : e({ column: s.column, record: s.record, index: s.index, value: s.value });
|
|
73
|
+
if (((a) => a == null ? [] : Array.isArray(a) ? a.filter((p) => p != null && p !== !1 && !p.isComment) : [a])(n).length > 0)
|
|
74
|
+
return n;
|
|
75
|
+
const r = { ...s.column };
|
|
76
|
+
return s.customRender && (r.customRender = s.customRender), s.valueEnum && (r.valueEnum = s.valueEnum), de(je, { props: { column: r, record: s.record, index: s.index, value: s.value } });
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}), nt = /* @__PURE__ */ ne({
|
|
80
|
+
__name: "TableColumnGroup",
|
|
81
|
+
props: {
|
|
82
|
+
column: null,
|
|
83
|
+
effectiveProps: null,
|
|
84
|
+
getColumnWidth: null
|
|
85
|
+
},
|
|
86
|
+
setup(s) {
|
|
87
|
+
const e = s, n = he();
|
|
88
|
+
return { __sfc: !0, props: e, $scopedSlots: n, shouldShowColumn: (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, DefaultCellRenderer: je, BodyCellRenderer: qe };
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
function ae(s, e, n, t, o, r, a, p) {
|
|
92
|
+
var m = typeof s == "function" ? s.options : s;
|
|
93
|
+
e && (m.render = e, m.staticRenderFns = n, m._compiled = !0), t && (m.functional = !0), r && (m._scopeId = "data-v-" + r);
|
|
94
|
+
var h;
|
|
95
|
+
if (a ? (h = function(C) {
|
|
96
|
+
C = C || // cached call
|
|
97
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
98
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !C && typeof __VUE_SSR_CONTEXT__ < "u" && (C = __VUE_SSR_CONTEXT__), o && o.call(this, C), C && C._registeredComponents && C._registeredComponents.add(a);
|
|
99
|
+
}, m._ssrRegister = h) : o && (h = p ? function() {
|
|
100
|
+
o.call(
|
|
101
|
+
this,
|
|
102
|
+
(m.functional ? this.parent : this).$root.$options.shadowRoot
|
|
103
|
+
);
|
|
104
|
+
} : o), h)
|
|
105
|
+
if (m.functional) {
|
|
106
|
+
m._injectStyles = h;
|
|
107
|
+
var O = m.render;
|
|
108
|
+
m.render = function(c, x) {
|
|
109
|
+
return h.call(x), O(c, x);
|
|
110
|
+
};
|
|
111
|
+
} else {
|
|
112
|
+
var b = m.beforeCreate;
|
|
113
|
+
m.beforeCreate = b ? [].concat(b, h) : [h];
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
exports: s,
|
|
117
|
+
options: m
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
var ot = function() {
|
|
121
|
+
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
122
|
+
return e.column.children && e.column.children.length > 0 ? n("el-table-column", { attrs: { label: e.column.title, align: e.column.align || "left", fixed: e.column.fixed } }, [e._l(e.column.children, function(o) {
|
|
123
|
+
return [t.shouldShowColumn(o) ? n("TableColumnGroup", { key: o.key || o.dataIndex || o.title, attrs: { column: o, "effective-props": e.effectiveProps, "get-column-width": e.getColumnWidth } }) : e._e()];
|
|
124
|
+
})], 2) : n("el-table-column", { attrs: { prop: e.column.dataIndex, label: e.column.title, "min-width": e.getColumnWidth(e.column), fixed: e.column.fixed, align: e.column.align || "left", sortable: e.column.sortable, formatter: e.column.formatter, "show-overflow-tooltip": e.column.ellipsis !== !1 && e.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "default", fn: function(o) {
|
|
125
|
+
return [e.column.dataIndex && t.$scopedSlots[e.column.dataIndex] ? e._t(e.column.dataIndex, null, { row: o.row, column: e.column, index: o.$index, value: o.row[e.column.dataIndex] }) : t.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": t.$scopedSlots.bodyCell, column: e.column, record: o.row, index: o.$index, value: o.row[e.column.dataIndex], "custom-render": e.column.customRender, "value-enum": e.column.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: e.column, record: o.row, index: o.$index, value: o.row[e.column.dataIndex] } })];
|
|
126
|
+
} }, { key: "header", fn: function() {
|
|
127
|
+
return [e.column.dataIndex && t.$scopedSlots[`header-${e.column.dataIndex}`] ? e._t(`header-${e.column.dataIndex}`, null, { column: e.column }) : t.$scopedSlots.headerCell ? e._t("headerCell", null, { column: e.column }) : [n("span", [e._v(e._s(e.column.title))]), e.column.helpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
128
|
+
return [Array.isArray(e.column.helpMessage) ? n("span", e._l(e.column.helpMessage, function(o, r) {
|
|
129
|
+
return n("div", { key: r }, [e._v(e._s(o))]);
|
|
130
|
+
}), 0) : n("span", [e._v(e._s(e.column.helpMessage))])];
|
|
131
|
+
}, proxy: !0 }], null, !1, 347236738) }, [n("i", { staticClass: "el-icon-question" })]) : e._e()]];
|
|
132
|
+
}, proxy: !0 }], null, !0) });
|
|
133
|
+
}, lt = [], at = /* @__PURE__ */ ae(
|
|
134
|
+
nt,
|
|
135
|
+
ot,
|
|
136
|
+
lt,
|
|
137
|
+
!1,
|
|
138
|
+
null,
|
|
139
|
+
null,
|
|
140
|
+
null,
|
|
141
|
+
null
|
|
142
|
+
);
|
|
143
|
+
const st = at.exports, rt = /* @__PURE__ */ ne({
|
|
37
144
|
__name: "ProTable",
|
|
38
145
|
props: {
|
|
39
146
|
columns: null,
|
|
@@ -77,396 +184,340 @@ const Ye = /* @__PURE__ */ oe({
|
|
|
77
184
|
load: null
|
|
78
185
|
},
|
|
79
186
|
emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
|
|
80
|
-
setup(
|
|
81
|
-
const t =
|
|
82
|
-
|
|
83
|
-
props: {
|
|
84
|
-
column: { type: Object, required: !0 },
|
|
85
|
-
record: { type: Object, required: !0 },
|
|
86
|
-
index: { type: Number, required: !0 },
|
|
87
|
-
value: { required: !1 }
|
|
88
|
-
},
|
|
89
|
-
setup(l) {
|
|
90
|
-
return () => {
|
|
91
|
-
var _, k;
|
|
92
|
-
const s = l.column;
|
|
93
|
-
if (s != null && s.customRender) {
|
|
94
|
-
const W = s.customRender({ text: l.value, record: l.record, index: l.index });
|
|
95
|
-
return typeof W == "string" || typeof W == "number" ? ue("span", String(W)) : W;
|
|
96
|
-
}
|
|
97
|
-
if (s != null && s.valueEnum) {
|
|
98
|
-
const W = ((k = (_ = s.valueEnum) == null ? void 0 : _[l.value]) == null ? void 0 : k.text) ?? l.value;
|
|
99
|
-
return ue("span", W == null ? "" : String(W));
|
|
100
|
-
}
|
|
101
|
-
return ue("span", l.value == null ? "" : String(l.value));
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
}), r = oe({
|
|
105
|
-
name: "EcpProTableBodyCellRenderer",
|
|
106
|
-
props: {
|
|
107
|
-
slotRender: { type: Function, required: !0 },
|
|
108
|
-
column: { type: Object, required: !0 },
|
|
109
|
-
record: { type: Object, required: !0 },
|
|
110
|
-
index: { type: Number, required: !0 },
|
|
111
|
-
value: { required: !1 },
|
|
112
|
-
customRender: { type: Function, required: !1 },
|
|
113
|
-
valueEnum: { type: Object, required: !1 }
|
|
114
|
-
},
|
|
115
|
-
setup(l) {
|
|
116
|
-
return () => {
|
|
117
|
-
const s = l.slotRender, _ = s == null ? void 0 : s({ column: l.column, record: l.record, index: l.index, value: l.value });
|
|
118
|
-
if (((Q) => Q == null ? [] : Array.isArray(Q) ? Q.filter((le) => le != null && le !== !1 && !le.isComment) : [Q])(_).length > 0)
|
|
119
|
-
return _;
|
|
120
|
-
const I = { ...l.column };
|
|
121
|
-
return l.customRender && (I.customRender = l.customRender), l.valueEnum && (I.valueEnum = l.valueEnum), ue(o, { props: { column: I, record: l.record, index: l.index, value: l.value } });
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}), a = Fe(), v = z(), u = z(), P = z(0), $ = z(t.loading ?? !1), m = z([]), S = z({}), p = z([]), x = z({}), g = z([]), V = z(null), { mergeSettings: O } = Be(), y = C(() => O("ProTable", { ...t, ...x.value })), q = C(() => {
|
|
125
|
-
const l = y.value.pagination;
|
|
187
|
+
setup(s, { expose: e, emit: n }) {
|
|
188
|
+
const t = s, o = he(), r = z(), a = z(), p = z(0), m = z(t.loading ?? !1), h = z([]), O = z({}), b = z([]), C = z({}), c = z([]), x = z(null), { mergeSettings: B } = Re(), F = y(() => B("ProTable", { ...t, ...C.value })), N = y(() => {
|
|
189
|
+
const l = F.value.pagination;
|
|
126
190
|
return l && typeof l == "object" ? {
|
|
127
191
|
pageSize: l.pageSize ?? 10,
|
|
128
192
|
pageSizes: l.pageSizes ?? [10, 20, 50, 100]
|
|
129
193
|
} : { pageSize: 10, pageSizes: [10, 20, 50, 100] };
|
|
130
|
-
}),
|
|
194
|
+
}), P = z({
|
|
131
195
|
page: 1,
|
|
132
|
-
pageSize:
|
|
133
|
-
pageSizes:
|
|
196
|
+
pageSize: N.value.pageSize,
|
|
197
|
+
pageSizes: N.value.pageSizes,
|
|
134
198
|
total: 0
|
|
135
|
-
}),
|
|
136
|
-
() =>
|
|
137
|
-
),
|
|
138
|
-
|
|
199
|
+
}), G = y(() => !!F.value.title || !!o.tableTitle || !!o.toolbar), I = y(() => x.value !== null ? x.value : !!t.pagination && typeof t.pagination == "object"), S = y(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.small : !1), d = y(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.background : !1), $ = y(() => F.value.rowKey || "id"), R = y(() => new Set(c.value.map((l) => l[$.value]))), j = y(
|
|
200
|
+
() => b.value.filter((l) => !l.hideInTable && !l.defaultHidden)
|
|
201
|
+
), L = y(() => {
|
|
202
|
+
const l = /* @__PURE__ */ new Map(), u = (g) => {
|
|
203
|
+
for (const k of g)
|
|
204
|
+
k.children && k.children.length > 0 ? u(k.children) : k.id && l.set(k.id, k);
|
|
205
|
+
};
|
|
206
|
+
return u(j.value), l;
|
|
207
|
+
}), Z = y(() => Array.from(L.value.values())), J = y(() => {
|
|
208
|
+
var u, g;
|
|
139
209
|
let l = 0;
|
|
140
|
-
return
|
|
141
|
-
}), Y = (l) => typeof l == "number" && l > 0,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
210
|
+
return F.value.rowSelection && (l += Number(F.value.rowSelection.width) || 48), F.value.showIndexColumn && (l += Number((u = F.value.indexColumnProps) == null ? void 0 : u.width) || 60), F.value.actionColumn && (l += Number((g = F.value.actionColumn) == null ? void 0 : g.width) || 150), l;
|
|
211
|
+
}), Y = (l) => typeof l == "number" && l > 0, Q = y(() => Z.value.filter((u) => _(u) && Y(u.width)).reduce((u, g) => u + (typeof g.width == "number" ? g.width : 0), 0)), ee = y(() => Z.value.filter((u) => _(u) && typeof u.width == "string").reduce((u, g) => u + (Number(oe(g)) || 80), 0)), U = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, te = (l) => {
|
|
212
|
+
if (!F.value.spanMethod)
|
|
213
|
+
return [1, 1];
|
|
214
|
+
const u = L.value.get(l.column.id);
|
|
215
|
+
return F.value.spanMethod({
|
|
216
|
+
...l,
|
|
217
|
+
column: { ...u, dataIndex: l.column.property, title: l.column.label }
|
|
218
|
+
});
|
|
219
|
+
}, oe = (l) => {
|
|
220
|
+
const u = l.width;
|
|
221
|
+
if (Y(u) && Q.value > 0 && p.value > 0 && typeof u == "number") {
|
|
222
|
+
const g = p.value - J.value - ee.value;
|
|
223
|
+
let k = Math.floor(g * u / Q.value);
|
|
224
|
+
const q = U(l.minWidth) ?? 60, K = U(l.maxWidth);
|
|
225
|
+
return k = Math.max(q, k), K != null && (k = Math.min(K, k)), k;
|
|
148
226
|
}
|
|
149
|
-
if (typeof
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
return k != null && (
|
|
227
|
+
if (typeof u == "string") {
|
|
228
|
+
const g = U(u) ?? 80, k = U(l.minWidth), q = U(l.maxWidth);
|
|
229
|
+
let K = g;
|
|
230
|
+
return k != null && (K = Math.max(k, K)), q != null && (K = Math.min(q, K)), K;
|
|
153
231
|
}
|
|
154
|
-
return l.
|
|
155
|
-
},
|
|
156
|
-
var
|
|
157
|
-
const l = (
|
|
158
|
-
return l ?
|
|
232
|
+
return l.minWidth;
|
|
233
|
+
}, _ = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, E = y(() => {
|
|
234
|
+
var u;
|
|
235
|
+
const l = (u = F.value.rowSelection) == null ? void 0 : u.getCheckboxProps;
|
|
236
|
+
return l ? h.value.filter((g) => {
|
|
159
237
|
var k;
|
|
160
|
-
return !((k = l(
|
|
161
|
-
}) :
|
|
162
|
-
}),
|
|
163
|
-
const l =
|
|
164
|
-
return l > 0 && l <
|
|
165
|
-
}),
|
|
166
|
-
var
|
|
167
|
-
return ((k = (
|
|
168
|
-
},
|
|
169
|
-
var
|
|
170
|
-
return ((k = (
|
|
171
|
-
},
|
|
172
|
-
const l =
|
|
173
|
-
n("selection-change", { keys: l, rows:
|
|
174
|
-
},
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
},
|
|
238
|
+
return !((k = l(g)) != null && k.disabled);
|
|
239
|
+
}) : h.value;
|
|
240
|
+
}), D = y(() => E.value.length > 0), i = y(() => E.value.length === 0 ? !1 : E.value.every((l) => R.value.has(l[$.value]))), v = y(() => {
|
|
241
|
+
const l = E.value.filter((u) => R.value.has(u[$.value])).length;
|
|
242
|
+
return l > 0 && l < E.value.length;
|
|
243
|
+
}), A = (l) => R.value.has(l[$.value]), V = (l) => {
|
|
244
|
+
var u, g, k;
|
|
245
|
+
return ((k = (g = (u = F.value.rowSelection) == null ? void 0 : u.getCheckboxProps) == null ? void 0 : g.call(u, l)) == null ? void 0 : k.disabled) ?? !1;
|
|
246
|
+
}, W = (l) => {
|
|
247
|
+
var u, g, k;
|
|
248
|
+
return ((k = (g = (u = F.value.rowSelection) == null ? void 0 : u.getRadioProps) == null ? void 0 : g.call(u, l)) == null ? void 0 : k.disabled) ?? !1;
|
|
249
|
+
}, H = () => {
|
|
250
|
+
const l = c.value.map((u) => u[$.value]);
|
|
251
|
+
n("selection-change", { keys: l, rows: c.value });
|
|
252
|
+
}, ie = (l, u) => {
|
|
253
|
+
const g = l[$.value];
|
|
254
|
+
u ? c.value = [...c.value.filter((k) => k[$.value] !== g), l] : c.value = c.value.filter((k) => k[$.value] !== g), H();
|
|
255
|
+
}, _e = (l) => {
|
|
256
|
+
c.value = [l], H();
|
|
257
|
+
}, ge = (l) => {
|
|
180
258
|
if (l) {
|
|
181
|
-
const
|
|
182
|
-
|
|
259
|
+
const u = new Set(c.value.map((k) => k[$.value])), g = E.value.filter((k) => !u.has(k[$.value]));
|
|
260
|
+
c.value = [...c.value, ...g];
|
|
183
261
|
} else {
|
|
184
|
-
const
|
|
185
|
-
|
|
262
|
+
const u = new Set(h.value.map((g) => g[$.value]));
|
|
263
|
+
c.value = c.value.filter((g) => !u.has(g[$.value]));
|
|
186
264
|
}
|
|
187
|
-
|
|
265
|
+
H();
|
|
188
266
|
}, se = async (l) => {
|
|
189
267
|
if (!t.api) {
|
|
190
268
|
if (t.dataSource)
|
|
191
269
|
return;
|
|
192
|
-
|
|
270
|
+
h.value = [];
|
|
193
271
|
return;
|
|
194
272
|
}
|
|
195
|
-
|
|
273
|
+
m.value = !0;
|
|
196
274
|
try {
|
|
197
|
-
const
|
|
198
|
-
[
|
|
199
|
-
[k]: (l == null ? void 0 : l.pageSize) ??
|
|
275
|
+
const u = F.value.fetchSetting ?? {}, g = u.pageField ?? "page", k = u.sizeField ?? "pageSize", q = u.listField ?? "list", K = u.totalField ?? "total", le = {
|
|
276
|
+
[g]: (l == null ? void 0 : l.page) ?? P.value.page,
|
|
277
|
+
[k]: (l == null ? void 0 : l.pageSize) ?? P.value.pageSize,
|
|
200
278
|
...t.searchInfo,
|
|
201
279
|
...l == null ? void 0 : l.searchInfo
|
|
202
280
|
};
|
|
203
|
-
(l == null ? void 0 : l.page) != null && (
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
} catch (
|
|
209
|
-
n("fetch-error",
|
|
281
|
+
(l == null ? void 0 : l.page) != null && (P.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (P.value.pageSize = l.pageSize);
|
|
282
|
+
const re = t.beforeFetch ? t.beforeFetch(le) : le, $e = await t.api(re);
|
|
283
|
+
O.value = $e || {};
|
|
284
|
+
const Fe = t.afterFetch ? t.afterFetch($e) : $e, ze = Fe[q] ?? Fe.items ?? Fe.list ?? [], Ee = Fe[K] ?? 0;
|
|
285
|
+
h.value = ze, P.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
|
|
286
|
+
} catch (u) {
|
|
287
|
+
n("fetch-error", u);
|
|
210
288
|
} finally {
|
|
211
|
-
|
|
289
|
+
m.value = !1;
|
|
212
290
|
}
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
},
|
|
291
|
+
}, be = () => se(void 0), ye = (l) => {
|
|
292
|
+
F.value.clearSelectOnPageChange && (c.value = []), P.value.pageSize = l, P.value.page = 1, se(void 0);
|
|
293
|
+
}, we = (l) => {
|
|
294
|
+
F.value.clearSelectOnPageChange && (c.value = []), P.value.page = l, se(void 0);
|
|
295
|
+
}, Ce = (l, u, g) => n("row-click", l, g), xe = (l, u, g) => n("row-dblclick", l, g), Pe = ({ prop: l, order: u }) => n("sort-change", { prop: l, order: u }), Se = (l, u) => n("expand-change", l, u), fe = (l) => h.value.findIndex((u) => u[$.value] === l), ce = {
|
|
218
296
|
setProps: (l) => {
|
|
219
|
-
|
|
297
|
+
C.value = { ...C.value, ...l };
|
|
220
298
|
},
|
|
221
299
|
reload: (l) => se(l),
|
|
222
300
|
redoHeight: () => {
|
|
223
|
-
var l,
|
|
224
|
-
(
|
|
301
|
+
var l, u;
|
|
302
|
+
(u = (l = r.value) == null ? void 0 : l.doLayout) == null || u.call(l);
|
|
225
303
|
},
|
|
226
304
|
setLoading: (l) => {
|
|
227
|
-
|
|
305
|
+
m.value = l;
|
|
228
306
|
},
|
|
229
|
-
getDataSource: () =>
|
|
230
|
-
getRawDataSource: () =>
|
|
307
|
+
getDataSource: () => h.value,
|
|
308
|
+
getRawDataSource: () => O.value,
|
|
231
309
|
setTableData: (l) => {
|
|
232
|
-
|
|
310
|
+
h.value = l ?? [];
|
|
233
311
|
},
|
|
234
|
-
getColumns: () =>
|
|
312
|
+
getColumns: () => b.value,
|
|
235
313
|
setColumns: (l) => {
|
|
236
314
|
if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
|
|
237
|
-
const
|
|
238
|
-
k.length && (
|
|
315
|
+
const u = l, g = (t.columns ?? []).filter((q) => u.includes(q.key ?? q.dataIndex)), k = u.map((q) => g.find((K) => (K.key ?? K.dataIndex) === q)).filter(Boolean);
|
|
316
|
+
k.length && (b.value = k);
|
|
239
317
|
} else
|
|
240
|
-
|
|
318
|
+
b.value = l ?? [];
|
|
241
319
|
},
|
|
242
320
|
setPagination: (l) => {
|
|
243
|
-
l != null && l.page && (
|
|
321
|
+
l != null && l.page && (P.value.page = l.page), l != null && l.pageSize && (P.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (P.value.total = l.total);
|
|
244
322
|
},
|
|
245
|
-
getSelectRowKeys: () =>
|
|
246
|
-
getSelectRows: () =>
|
|
323
|
+
getSelectRowKeys: () => c.value.map((l) => l[$.value]),
|
|
324
|
+
getSelectRows: () => c.value,
|
|
247
325
|
clearSelectedRowKeys: () => {
|
|
248
|
-
|
|
326
|
+
c.value = [], H();
|
|
249
327
|
},
|
|
250
328
|
setSelectedRowKeys: (l) => {
|
|
251
|
-
const
|
|
329
|
+
const u = new Set(l), g = h.value.filter((k) => u.has(k[$.value]));
|
|
252
330
|
l.forEach((k) => {
|
|
253
|
-
|
|
254
|
-
}),
|
|
331
|
+
g.some((q) => q[$.value] === k) || g.push({ [$.value]: k });
|
|
332
|
+
}), c.value = g, H();
|
|
255
333
|
},
|
|
256
334
|
deleteSelectRowByKey: (l) => {
|
|
257
|
-
|
|
335
|
+
c.value = c.value.filter((u) => u[$.value] !== l), H();
|
|
258
336
|
},
|
|
259
|
-
updateTableData: (l,
|
|
260
|
-
l < 0 || l >=
|
|
337
|
+
updateTableData: (l, u, g) => {
|
|
338
|
+
l < 0 || l >= h.value.length || (h.value = [...h.value], h.value[l] = { ...h.value[l], [u]: g });
|
|
261
339
|
},
|
|
262
|
-
updateTableDataRecord: (l,
|
|
263
|
-
const
|
|
264
|
-
if (!(
|
|
265
|
-
return
|
|
340
|
+
updateTableDataRecord: (l, u) => {
|
|
341
|
+
const g = fe(l);
|
|
342
|
+
if (!(g < 0))
|
|
343
|
+
return h.value = [...h.value], h.value[g] = { ...h.value[g], ...u }, h.value[g];
|
|
266
344
|
},
|
|
267
345
|
deleteTableDataRecord: (l) => {
|
|
268
|
-
const
|
|
269
|
-
|
|
346
|
+
const u = Array.isArray(l) ? l : [l], g = new Set(u);
|
|
347
|
+
h.value = h.value.filter((k) => !g.has(k[$.value]));
|
|
270
348
|
},
|
|
271
|
-
insertTableDataRecord: (l,
|
|
272
|
-
const
|
|
273
|
-
return
|
|
349
|
+
insertTableDataRecord: (l, u) => {
|
|
350
|
+
const g = [...h.value];
|
|
351
|
+
return u == null || u >= g.length ? g.push(l) : g.splice(u, 0, l), h.value = g, l;
|
|
274
352
|
},
|
|
275
|
-
getPaginationRef: () =>
|
|
276
|
-
getShowPagination: () =>
|
|
353
|
+
getPaginationRef: () => I.value ? { page: P.value.page, pageSize: Number(P.value.pageSize) || 10, total: P.value.total } : !1,
|
|
354
|
+
getShowPagination: () => I.value,
|
|
277
355
|
setShowPagination: (l) => {
|
|
278
|
-
|
|
356
|
+
x.value = l;
|
|
279
357
|
},
|
|
280
|
-
getRowSelection: () =>
|
|
358
|
+
getRowSelection: () => F.value.rowSelection,
|
|
281
359
|
expandAll: () => {
|
|
282
360
|
var k;
|
|
283
|
-
const l = ((k =
|
|
284
|
-
const
|
|
285
|
-
return
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
Array.isArray(
|
|
289
|
-
}),
|
|
361
|
+
const l = ((k = F.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (q) => {
|
|
362
|
+
const K = [];
|
|
363
|
+
return q.forEach((le) => {
|
|
364
|
+
K.push(le);
|
|
365
|
+
const re = le[l];
|
|
366
|
+
Array.isArray(re) && re.length > 0 && K.push(...u(re));
|
|
367
|
+
}), K;
|
|
290
368
|
};
|
|
291
|
-
|
|
292
|
-
var
|
|
293
|
-
return (
|
|
369
|
+
u(h.value).forEach((q) => {
|
|
370
|
+
var K, le;
|
|
371
|
+
return (le = (K = r.value) == null ? void 0 : K.toggleRowExpansion) == null ? void 0 : le.call(K, q, !0);
|
|
294
372
|
});
|
|
295
373
|
},
|
|
296
374
|
collapseAll: () => {
|
|
297
375
|
var k;
|
|
298
|
-
const l = ((k =
|
|
299
|
-
const
|
|
300
|
-
return
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
Array.isArray(
|
|
304
|
-
}),
|
|
376
|
+
const l = ((k = F.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (q) => {
|
|
377
|
+
const K = [];
|
|
378
|
+
return q.forEach((le) => {
|
|
379
|
+
K.push(le);
|
|
380
|
+
const re = le[l];
|
|
381
|
+
Array.isArray(re) && re.length > 0 && K.push(...u(re));
|
|
382
|
+
}), K;
|
|
305
383
|
};
|
|
306
|
-
|
|
307
|
-
var
|
|
308
|
-
return (
|
|
384
|
+
u(h.value).forEach((q) => {
|
|
385
|
+
var K, le;
|
|
386
|
+
return (le = (K = r.value) == null ? void 0 : K.toggleRowExpansion) == null ? void 0 : le.call(K, q, !1);
|
|
309
387
|
});
|
|
310
388
|
}
|
|
311
389
|
};
|
|
312
|
-
e(
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
390
|
+
e(ce);
|
|
391
|
+
const ue = () => {
|
|
392
|
+
const l = (u, g = "") => u.map((k, q) => {
|
|
393
|
+
const K = `${g}-${q}`;
|
|
394
|
+
return {
|
|
395
|
+
...k,
|
|
396
|
+
id: k.id || K,
|
|
397
|
+
children: k.children ? l(k.children, K) : void 0
|
|
398
|
+
};
|
|
399
|
+
});
|
|
400
|
+
b.value = l(t.columns ?? []);
|
|
401
|
+
}, f = () => {
|
|
402
|
+
t.api && F.value.immediate !== !1 ? se(void 0) : t.dataSource && (h.value = [...t.dataSource], !t.api && t.pagination !== !1 && (P.value.total = t.dataSource.length));
|
|
403
|
+
}, w = () => {
|
|
404
|
+
a.value && (p.value = a.value.offsetWidth || 0);
|
|
319
405
|
};
|
|
320
|
-
let
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
|
|
406
|
+
let M = null, T = null;
|
|
407
|
+
return ve(() => {
|
|
408
|
+
ue(), n("register", ce), f(), typeof window < "u" && (window.addEventListener("resize", w), M = new ResizeObserver(w), Le(() => {
|
|
409
|
+
w(), T = a.value, T && (M == null || M.observe(T));
|
|
324
410
|
}));
|
|
325
|
-
}),
|
|
326
|
-
typeof window < "u" && (window.removeEventListener("resize",
|
|
327
|
-
}),
|
|
328
|
-
!t.api && t.dataSource && (
|
|
329
|
-
}, { deep: !0 }),
|
|
330
|
-
|
|
331
|
-
}), { __sfc: !0,
|
|
411
|
+
}), Be(() => {
|
|
412
|
+
typeof window < "u" && (window.removeEventListener("resize", w), M && T && (M.unobserve(T), T = null));
|
|
413
|
+
}), X(() => t.columns, ue, { deep: !0 }), X(() => t.dataSource, () => {
|
|
414
|
+
!t.api && t.dataSource && (h.value = [...t.dataSource]);
|
|
415
|
+
}, { deep: !0 }), X(() => t.loading, (l) => {
|
|
416
|
+
m.value = l ?? !1;
|
|
417
|
+
}), { __sfc: !0, props: t, emit: n, slots: o, tableRef: r, tableWrapRef: a, containerWidth: p, loading: m, innerData: h, rawDataSource: O, innerColumns: b, innerProps: C, selectedRows: c, showPaginationRef: x, mergeSettings: B, effectiveProps: F, defaultPagination: N, pagination: P, showTitleBar: G, showPagination: I, paginationSmall: S, paginationBackground: d, rowKeyField: $, selectedKeysSet: R, displayColumns: j, flatColumnsMap: L, allFlatColumns: Z, fixedColumnsWidth: J, isRatioWidth: Y, totalRatio: Q, fixedDataColumnsWidth: ee, parseWidthPx: U, spanMethodAdapter: te, getColumnWidth: oe, shouldShowColumn: _, selectableRows: E, hasSelectableRows: D, isAllCurrentPageSelected: i, isIndeterminate: v, isRowSelected: A, getCheckboxDisabled: V, getRadioDisabled: W, emitSelectionChange: H, handleCheckboxChange: ie, handleRadioSelect: _e, handleSelectAll: ge, fetchData: se, handleReload: be, handleSizeChange: ye, handleCurrentChange: we, handleRowClick: Ce, handleRowDblclick: xe, handleSortChange: Pe, handleExpandChange: Se, findRowIndex: fe, tableAction: ce, syncColumns: ue, loadData: f, updateContainerWidth: w, resizeObserver: M, observedEl: T, TableColumnGroup: st, BodyCellRenderer: qe };
|
|
332
418
|
}
|
|
333
419
|
});
|
|
334
|
-
|
|
335
|
-
var
|
|
336
|
-
e && (u.render = e, u.staticRenderFns = n, u._compiled = !0), t && (u.functional = !0), r && (u._scopeId = "data-v-" + r);
|
|
337
|
-
var P;
|
|
338
|
-
if (a ? (P = function(S) {
|
|
339
|
-
S = S || // cached call
|
|
340
|
-
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
341
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !S && typeof __VUE_SSR_CONTEXT__ < "u" && (S = __VUE_SSR_CONTEXT__), o && o.call(this, S), S && S._registeredComponents && S._registeredComponents.add(a);
|
|
342
|
-
}, u._ssrRegister = P) : o && (P = v ? function() {
|
|
343
|
-
o.call(
|
|
344
|
-
this,
|
|
345
|
-
(u.functional ? this.parent : this).$root.$options.shadowRoot
|
|
346
|
-
);
|
|
347
|
-
} : o), P)
|
|
348
|
-
if (u.functional) {
|
|
349
|
-
u._injectStyles = P;
|
|
350
|
-
var $ = u.render;
|
|
351
|
-
u.render = function(p, x) {
|
|
352
|
-
return P.call(x), $(p, x);
|
|
353
|
-
};
|
|
354
|
-
} else {
|
|
355
|
-
var m = u.beforeCreate;
|
|
356
|
-
u.beforeCreate = m ? [].concat(m, P) : [P];
|
|
357
|
-
}
|
|
358
|
-
return {
|
|
359
|
-
exports: c,
|
|
360
|
-
options: u
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
var et = function() {
|
|
364
|
-
var o, r, a, v;
|
|
420
|
+
var it = function() {
|
|
421
|
+
var o, r, a, p;
|
|
365
422
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
366
|
-
return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(
|
|
367
|
-
return n("div", { key:
|
|
423
|
+
return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(m, h) {
|
|
424
|
+
return n("div", { key: h }, [e._v(e._s(m))]);
|
|
368
425
|
}), 0) : n("span", [e._v(e._s(t.effectiveProps.titleHelpMessage))])]), n("i", { staticClass: "el-icon-question" })], 2) : e._e()], 1), n("div", { staticClass: "ecp-pro-table__toolbar" }, [e._t("tableTitle"), e._t("toolbar"), e._t("toolbar-right", function() {
|
|
369
|
-
var
|
|
370
|
-
return [((
|
|
371
|
-
})], 2)]) : e._e(), n("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [n("el-table", e._b({ ref: "tableRef", attrs: { data: t.innerData, "row-key": t.effectiveProps.rowKey, border: t.effectiveProps.bordered, stripe: t.effectiveProps.striped, size: t.effectiveProps.size, "max-height": t.effectiveProps.maxHeight, height: t.effectiveProps.height, "default-sort": t.effectiveProps.defaultSort, "span-method": t.
|
|
426
|
+
var m;
|
|
427
|
+
return [((m = t.effectiveProps.tableSetting) == null ? void 0 : m.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
|
|
428
|
+
})], 2)]) : e._e(), n("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [n("el-table", e._b({ ref: "tableRef", attrs: { data: t.innerData, "row-key": t.effectiveProps.rowKey, border: t.effectiveProps.bordered, stripe: t.effectiveProps.striped, size: t.effectiveProps.size, "max-height": t.effectiveProps.maxHeight, height: t.effectiveProps.height, "default-sort": t.effectiveProps.defaultSort, "span-method": t.spanMethodAdapter, "tree-props": t.effectiveProps.treeProps, "default-expand-all": t.effectiveProps.defaultExpandAll, "expand-row-keys": t.effectiveProps.expandRowKeys || [], lazy: t.effectiveProps.lazy, load: t.effectiveProps.load, "row-class-name": t.effectiveProps.rowClassName }, on: { "row-click": t.handleRowClick, "row-dblclick": t.handleRowDblclick, "sort-change": t.handleSortChange, "expand-change": t.handleExpandChange } }, "el-table", t.effectiveProps.tableProps, !1), [t.effectiveProps.rowSelection ? n("el-table-column", { attrs: { width: t.effectiveProps.rowSelection.width || 48, fixed: t.effectiveProps.rowSelection.fixed, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function(m) {
|
|
372
429
|
return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isAllCurrentPageSelected, indeterminate: t.isIndeterminate, disabled: !t.hasSelectableRows }, on: { change: t.handleSelectAll } }) : n("span")];
|
|
373
|
-
} }, { key: "default", fn: function(
|
|
374
|
-
var
|
|
375
|
-
return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(
|
|
376
|
-
|
|
377
|
-
} } }) : n("el-radio", { attrs: { value: (
|
|
378
|
-
return t.handleRadioSelect(
|
|
379
|
-
} }, nativeOn: { click: function(
|
|
380
|
-
|
|
430
|
+
} }, { key: "default", fn: function(m) {
|
|
431
|
+
var h;
|
|
432
|
+
return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(m.row), disabled: t.getCheckboxDisabled(m.row) }, on: { change: (O) => t.handleCheckboxChange(m.row, O) }, nativeOn: { click: function(O) {
|
|
433
|
+
O.stopPropagation();
|
|
434
|
+
} } }) : n("el-radio", { attrs: { value: (h = t.selectedRows[0]) == null ? void 0 : h[t.rowKeyField], label: m.row[t.rowKeyField], disabled: t.getRadioDisabled(m.row) }, on: { change: function(O) {
|
|
435
|
+
return t.handleRadioSelect(m.row);
|
|
436
|
+
} }, nativeOn: { click: function(O) {
|
|
437
|
+
O.stopPropagation();
|
|
381
438
|
} } }, [n("span")])];
|
|
382
|
-
} }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((
|
|
383
|
-
return [t.shouldShowColumn(
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}), 0) : n("span", [e._v(e._s(u.helpMessage))])]), n("i", { staticClass: "el-icon-question" })], 2) : e._e()]];
|
|
387
|
-
} }, { key: "default", fn: function(P) {
|
|
388
|
-
return [u.dataIndex && e.$scopedSlots[u.dataIndex] ? e._t(u.dataIndex, null, { row: P.row, column: u, index: P.$index, value: P.row[u.dataIndex] }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: u, record: P.row, index: P.$index, value: P.row[u.dataIndex], "custom-render": u.customRender, "value-enum": u.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: u, record: P.row, index: P.$index, value: P.row[u.dataIndex] } })];
|
|
389
|
-
} }], null, !0) }) : e._e()];
|
|
390
|
-
}), t.effectiveProps.actionColumn ? n("el-table-column", { attrs: { label: t.effectiveProps.actionColumn.title || "操作", width: t.effectiveProps.actionColumn.width || 150, fixed: t.effectiveProps.actionColumn.fixed || "right", align: t.effectiveProps.actionColumn.align || "center" }, scopedSlots: e._u([{ key: "default", fn: function(u) {
|
|
391
|
-
return [e.$scopedSlots.action ? e._t("action", null, { record: u.row, column: t.effectiveProps.actionColumn, index: u.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: u.row, index: u.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
|
|
439
|
+
} }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((p = t.effectiveProps.indexColumnProps) == null ? void 0 : p.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(m) {
|
|
440
|
+
return [t.shouldShowColumn(m) ? n(t.TableColumnGroup, { key: m.key || m.dataIndex || m.title, attrs: { column: m, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
|
|
441
|
+
}), t.effectiveProps.actionColumn ? n("el-table-column", { attrs: { label: t.effectiveProps.actionColumn.title || "操作", width: t.effectiveProps.actionColumn.width || 150, fixed: t.effectiveProps.actionColumn.fixed || "right", align: t.effectiveProps.actionColumn.align || "center" }, scopedSlots: e._u([{ key: "default", fn: function(m) {
|
|
442
|
+
return [e.$scopedSlots.action ? e._t("action", null, { record: m.row, column: t.effectiveProps.actionColumn, index: m.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: m.row, index: m.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
|
|
392
443
|
} }], null, !0) }) : e._e()], 2)], 1), t.showPagination ? n("div", { staticClass: "ecp-pro-table__pagination" }, [n("el-pagination", e._b({ attrs: { "current-page": t.pagination.page, "page-sizes": t.pagination.pageSizes, "page-size": t.pagination.pageSize, total: t.pagination.total, small: t.paginationSmall, background: t.paginationBackground, layout: (t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" ? t.effectiveProps.pagination.layout : null) || "total, sizes, prev, pager, next, jumper" }, on: { "size-change": t.handleSizeChange, "current-change": t.handleCurrentChange } }, "el-pagination", t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" && t.effectiveProps.pagination.props || {}, !1))], 1) : e._e()]);
|
|
393
|
-
},
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
444
|
+
}, ct = [], ut = /* @__PURE__ */ ae(
|
|
445
|
+
rt,
|
|
446
|
+
it,
|
|
447
|
+
ct,
|
|
397
448
|
!1,
|
|
398
449
|
null,
|
|
399
|
-
"
|
|
450
|
+
"ce606251",
|
|
400
451
|
null,
|
|
401
452
|
null
|
|
402
453
|
);
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
454
|
+
const He = ut.exports, Ne = (s) => Array.isArray(s) ? s.length > 0 : s != null && String(s).trim() !== "", Ie = (s) => Array.isArray(s) ? s.map((e) => String(e)).join(", ") : s == null ? "" : typeof s == "object" ? JSON.stringify(s) : String(s), De = (s, e) => {
|
|
455
|
+
if (!s)
|
|
405
456
|
return null;
|
|
406
|
-
if (
|
|
457
|
+
if (s === !0)
|
|
407
458
|
return {
|
|
408
|
-
content:
|
|
459
|
+
content: Ie(e),
|
|
409
460
|
placement: "top",
|
|
410
461
|
effect: "dark",
|
|
411
|
-
disabled: !
|
|
462
|
+
disabled: !Ne(e)
|
|
412
463
|
};
|
|
413
|
-
if (typeof
|
|
464
|
+
if (typeof s == "string")
|
|
414
465
|
return {
|
|
415
|
-
content:
|
|
466
|
+
content: s,
|
|
416
467
|
placement: "top",
|
|
417
468
|
effect: "dark"
|
|
418
469
|
};
|
|
419
|
-
const n = { ...
|
|
420
|
-
return Object.prototype.hasOwnProperty.call(n, "content") || (n.content =
|
|
421
|
-
},
|
|
470
|
+
const n = { ...s };
|
|
471
|
+
return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ie(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Ne(n.content)), n;
|
|
472
|
+
}, dt = /* @__PURE__ */ ne({
|
|
422
473
|
__name: "TableAction",
|
|
423
474
|
props: {
|
|
424
475
|
actions: { default: () => [] },
|
|
425
476
|
dropDownActions: { default: () => [] },
|
|
426
477
|
stopButtonPropagation: { type: Boolean, default: !1 }
|
|
427
478
|
},
|
|
428
|
-
setup(
|
|
429
|
-
const e =
|
|
430
|
-
const { ifShow:
|
|
431
|
-
return typeof
|
|
432
|
-
}), r =
|
|
433
|
-
var
|
|
434
|
-
e.stopButtonPropagation && x.stopPropagation(), (
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
var
|
|
439
|
-
e.stopButtonPropagation &&
|
|
479
|
+
setup(s) {
|
|
480
|
+
const e = s, n = (c) => De(c) || {}, t = (c) => c.type ? c.type : c.color === "error" ? "danger" : c.color === "success" ? "success" : c.color === "warning" ? "warning" : "text", o = (c) => c.filter((x) => {
|
|
481
|
+
const { ifShow: B } = x;
|
|
482
|
+
return typeof B == "boolean" ? B : typeof B == "function" ? B(x) : !0;
|
|
483
|
+
}), r = y(() => o(e.actions || [])), a = y(() => o(e.dropDownActions || [])), p = (c, x) => {
|
|
484
|
+
var B;
|
|
485
|
+
e.stopButtonPropagation && x.stopPropagation(), (B = c.onClick) == null || B.call(c, x);
|
|
486
|
+
}, m = (c, x) => {
|
|
487
|
+
p(c, x);
|
|
488
|
+
}, h = (c, x, B) => {
|
|
489
|
+
var F, N, P, G;
|
|
490
|
+
e.stopButtonPropagation && B.stopPropagation(), c.popConfirm && (x === "confirm" ? (N = (F = c.popConfirm).confirm) == null || N.call(F) : (G = (P = c.popConfirm).cancel) == null || G.call(P));
|
|
440
491
|
};
|
|
441
|
-
return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick:
|
|
442
|
-
|
|
443
|
-
}, handlePopConfirmCancel: (
|
|
444
|
-
|
|
445
|
-
}, handleDropdownCommand: (
|
|
446
|
-
var
|
|
447
|
-
const x = Number(
|
|
448
|
-
if (!(!
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
confirmButtonText:
|
|
453
|
-
cancelButtonText:
|
|
492
|
+
return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick: p, handleActionClick: m, handlePopConfirm: h, handlePopConfirmConfirm: (c, x) => {
|
|
493
|
+
h(c, "confirm", x);
|
|
494
|
+
}, handlePopConfirmCancel: (c, x) => {
|
|
495
|
+
h(c, "cancel", x);
|
|
496
|
+
}, handleDropdownCommand: (c) => {
|
|
497
|
+
var F;
|
|
498
|
+
const x = Number(c), B = a.value[x];
|
|
499
|
+
if (!(!B || B.disabled)) {
|
|
500
|
+
if (B.popConfirm) {
|
|
501
|
+
const N = B.popConfirm.title, P = B.popConfirm.okText || "确定", G = B.popConfirm.cancelText || "取消";
|
|
502
|
+
tt.confirm(N, "提示", {
|
|
503
|
+
confirmButtonText: P,
|
|
504
|
+
cancelButtonText: G,
|
|
454
505
|
type: "warning"
|
|
455
506
|
}).then(() => {
|
|
456
|
-
var
|
|
457
|
-
return (
|
|
507
|
+
var I, S;
|
|
508
|
+
return (S = (I = B.popConfirm) == null ? void 0 : I.confirm) == null ? void 0 : S.call(I);
|
|
458
509
|
}).catch(() => {
|
|
459
|
-
var
|
|
460
|
-
return (
|
|
510
|
+
var I, S;
|
|
511
|
+
return (S = (I = B.popConfirm) == null ? void 0 : I.cancel) == null ? void 0 : S.call(I);
|
|
461
512
|
});
|
|
462
513
|
return;
|
|
463
514
|
}
|
|
464
|
-
(
|
|
515
|
+
(F = B.onClick) == null || F.call(B, {});
|
|
465
516
|
}
|
|
466
517
|
} };
|
|
467
518
|
}
|
|
468
519
|
});
|
|
469
|
-
var
|
|
520
|
+
var ft = function() {
|
|
470
521
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
471
522
|
return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(o, r) {
|
|
472
523
|
return n("span", { key: `action-${r}`, staticClass: "ecp-table-action__item" }, [o.popConfirm ? n("el-popconfirm", { attrs: { title: o.popConfirm.title, "confirm-button-text": o.popConfirm.okText || "确定", "cancel-button-text": o.popConfirm.cancelText || "取消" }, on: { confirm: function(a) {
|
|
@@ -481,29 +532,29 @@ var lt = function() {
|
|
|
481
532
|
}), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(o, r) {
|
|
482
533
|
return n("el-dropdown-item", { key: `dropdown-${r}`, attrs: { command: r, disabled: o.disabled, divided: !!o.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])]);
|
|
483
534
|
}), 1)], 1) : e._e()], 2);
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
535
|
+
}, pt = [], mt = /* @__PURE__ */ ae(
|
|
536
|
+
dt,
|
|
537
|
+
ft,
|
|
538
|
+
pt,
|
|
488
539
|
!1,
|
|
489
540
|
null,
|
|
490
541
|
"45a58e7c",
|
|
491
542
|
null,
|
|
492
543
|
null
|
|
493
544
|
);
|
|
494
|
-
const
|
|
495
|
-
function
|
|
496
|
-
const e = z(null), n = () =>
|
|
497
|
-
const a =
|
|
545
|
+
const Ge = mt.exports;
|
|
546
|
+
function un(s) {
|
|
547
|
+
const e = z(null), n = () => s ? me(s) : void 0, t = () => {
|
|
548
|
+
const a = me(e);
|
|
498
549
|
if (!a)
|
|
499
550
|
throw new Error("ProTable instance has not been registered");
|
|
500
551
|
return a;
|
|
501
552
|
}, o = (a) => {
|
|
502
553
|
e.value = a;
|
|
503
|
-
const
|
|
504
|
-
|
|
554
|
+
const p = n();
|
|
555
|
+
p && Object.keys(p).length > 0 && a.setProps(p);
|
|
505
556
|
};
|
|
506
|
-
return
|
|
557
|
+
return s && X(
|
|
507
558
|
() => n(),
|
|
508
559
|
(a) => {
|
|
509
560
|
a && e.value && e.value.setProps(a);
|
|
@@ -525,25 +576,25 @@ function tn(c) {
|
|
|
525
576
|
clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
|
|
526
577
|
setSelectedRowKeys: (a) => t().setSelectedRowKeys(a),
|
|
527
578
|
deleteSelectRowByKey: (a) => t().deleteSelectRowByKey(a),
|
|
528
|
-
updateTableData: (a,
|
|
529
|
-
updateTableDataRecord: (a,
|
|
579
|
+
updateTableData: (a, p, m) => t().updateTableData(a, p, m),
|
|
580
|
+
updateTableDataRecord: (a, p) => t().updateTableDataRecord(a, p),
|
|
530
581
|
deleteTableDataRecord: (a) => t().deleteTableDataRecord(a),
|
|
531
|
-
insertTableDataRecord: (a,
|
|
582
|
+
insertTableDataRecord: (a, p) => t().insertTableDataRecord(a, p),
|
|
532
583
|
getPaginationRef: () => t().getPaginationRef(),
|
|
533
584
|
getShowPagination: () => t().getShowPagination(),
|
|
534
585
|
setShowPagination: (a) => t().setShowPagination(a),
|
|
535
586
|
getRowSelection: () => t().getRowSelection(),
|
|
536
587
|
expandAll: () => {
|
|
537
|
-
var a,
|
|
538
|
-
return (
|
|
588
|
+
var a, p;
|
|
589
|
+
return (p = (a = t()).expandAll) == null ? void 0 : p.call(a);
|
|
539
590
|
},
|
|
540
591
|
collapseAll: () => {
|
|
541
|
-
var a,
|
|
542
|
-
return (
|
|
592
|
+
var a, p;
|
|
593
|
+
return (p = (a = t()).collapseAll) == null ? void 0 : p.call(a);
|
|
543
594
|
}
|
|
544
595
|
}];
|
|
545
596
|
}
|
|
546
|
-
const
|
|
597
|
+
const vt = /* @__PURE__ */ ne({
|
|
547
598
|
__name: "ApiSelect",
|
|
548
599
|
props: {
|
|
549
600
|
value: null,
|
|
@@ -559,23 +610,23 @@ const rt = /* @__PURE__ */ oe({
|
|
|
559
610
|
multiple: { type: Boolean }
|
|
560
611
|
},
|
|
561
612
|
emits: ["input", "change"],
|
|
562
|
-
setup(
|
|
563
|
-
const n =
|
|
564
|
-
n.lazy &&
|
|
565
|
-
},
|
|
613
|
+
setup(s, { expose: e }) {
|
|
614
|
+
const n = s, t = z(!1), o = z([]), r = z([]), a = (b) => b == null ? "null" : JSON.stringify(p(b)), p = (b) => Array.isArray(b) ? b.map(p) : b !== null && typeof b == "object" ? Object.keys(b).sort().reduce((C, c) => (C[c] = p(b[c]), C), {}) : b, m = z(a(n.params ?? null)), h = (b) => {
|
|
615
|
+
n.lazy && b && (a(n.params ?? null) !== m.value || o.value.length === 0) && O();
|
|
616
|
+
}, O = async () => {
|
|
566
617
|
if (n.api) {
|
|
567
618
|
t.value = !0;
|
|
568
619
|
try {
|
|
569
|
-
const
|
|
570
|
-
r.value =
|
|
571
|
-
const
|
|
572
|
-
o.value =
|
|
573
|
-
const
|
|
620
|
+
const b = await n.api(n.params), C = Array.isArray(b) ? b : (b == null ? void 0 : b.list) ?? (b == null ? void 0 : b.data) ?? [];
|
|
621
|
+
r.value = C;
|
|
622
|
+
const c = n.labelField ?? "label", x = n.valueField ?? "value";
|
|
623
|
+
o.value = C.map((B) => {
|
|
624
|
+
const F = B;
|
|
574
625
|
return {
|
|
575
|
-
label: String(
|
|
576
|
-
value:
|
|
626
|
+
label: String(F[c] ?? F.label ?? ""),
|
|
627
|
+
value: F[x] ?? F.value
|
|
577
628
|
};
|
|
578
|
-
}),
|
|
629
|
+
}), m.value = a(n.params ?? null);
|
|
579
630
|
} finally {
|
|
580
631
|
t.value = !1;
|
|
581
632
|
}
|
|
@@ -585,21 +636,21 @@ const rt = /* @__PURE__ */ oe({
|
|
|
585
636
|
options: o,
|
|
586
637
|
rawOptions: r,
|
|
587
638
|
loading: t,
|
|
588
|
-
fetchOptions:
|
|
589
|
-
}),
|
|
590
|
-
n.lazy ||
|
|
591
|
-
}),
|
|
639
|
+
fetchOptions: O
|
|
640
|
+
}), ve(() => {
|
|
641
|
+
n.lazy || O();
|
|
642
|
+
}), X(
|
|
592
643
|
() => n.api,
|
|
593
644
|
() => {
|
|
594
|
-
n.lazy ? (o.value = [], r.value = []) :
|
|
645
|
+
n.lazy ? (o.value = [], r.value = []) : O();
|
|
595
646
|
},
|
|
596
647
|
{ deep: !0 }
|
|
597
|
-
),
|
|
598
|
-
a(n.params ?? null) !==
|
|
599
|
-
}, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys:
|
|
648
|
+
), X(() => n.params, () => {
|
|
649
|
+
a(n.params ?? null) !== m.value && (n.lazy ? (o.value = [], r.value = []) : O());
|
|
650
|
+
}, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: p, lastFetchedParamsKey: m, onVisibleChange: h, fetchOptions: O };
|
|
600
651
|
}
|
|
601
652
|
});
|
|
602
|
-
var
|
|
653
|
+
var ht = function() {
|
|
603
654
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
604
655
|
return n("el-select", e._b({ on: { input: function(o) {
|
|
605
656
|
return e.$emit("input", o);
|
|
@@ -608,19 +659,19 @@ var it = function() {
|
|
|
608
659
|
}, "visible-change": t.onVisibleChange } }, "el-select", { ...e.$attrs, value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, !1), e._l(t.options, function(o) {
|
|
609
660
|
return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
|
|
610
661
|
}), 1);
|
|
611
|
-
},
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
662
|
+
}, _t = [], gt = /* @__PURE__ */ ae(
|
|
663
|
+
vt,
|
|
664
|
+
ht,
|
|
665
|
+
_t,
|
|
615
666
|
!1,
|
|
616
667
|
null,
|
|
617
668
|
null,
|
|
618
669
|
null,
|
|
619
670
|
null
|
|
620
671
|
);
|
|
621
|
-
const
|
|
622
|
-
function
|
|
623
|
-
const e =
|
|
672
|
+
const bt = gt.exports;
|
|
673
|
+
function Ve(s) {
|
|
674
|
+
const e = s.trim();
|
|
624
675
|
if (!e)
|
|
625
676
|
return "";
|
|
626
677
|
let n = 0, t = "";
|
|
@@ -636,48 +687,48 @@ function Ie(c) {
|
|
|
636
687
|
}
|
|
637
688
|
return t;
|
|
638
689
|
}
|
|
639
|
-
function Ae(
|
|
640
|
-
return
|
|
690
|
+
function Ae(s) {
|
|
691
|
+
return s.replace(/,/g, "").trim();
|
|
641
692
|
}
|
|
642
|
-
function
|
|
643
|
-
if (!
|
|
644
|
-
return
|
|
645
|
-
const t =
|
|
646
|
-
let o = t ?
|
|
693
|
+
function yt(s, e, n) {
|
|
694
|
+
if (!s || s === "-")
|
|
695
|
+
return s;
|
|
696
|
+
const t = s[0] === "-";
|
|
697
|
+
let o = t ? s.slice(1) : s;
|
|
647
698
|
const r = o.indexOf(".");
|
|
648
699
|
if (r === -1) {
|
|
649
|
-
const
|
|
650
|
-
return o =
|
|
700
|
+
const O = Math.max(0, e);
|
|
701
|
+
return o = O > 0 ? o.slice(0, O) : o, t ? "-" + o : o;
|
|
651
702
|
}
|
|
652
703
|
let a = o.slice(0, r);
|
|
653
704
|
e > 0 && (a = a.slice(0, e));
|
|
654
|
-
const
|
|
705
|
+
const p = o.slice(r + 1), m = p === "" && o.endsWith(".");
|
|
655
706
|
if (n <= 0)
|
|
656
707
|
return t ? "-" + a : a;
|
|
657
|
-
if (
|
|
708
|
+
if (m)
|
|
658
709
|
return (t ? "-" : "") + a + ".";
|
|
659
|
-
const
|
|
660
|
-
return (t ? "-" : "") + a + "." +
|
|
710
|
+
const h = p.slice(0, n);
|
|
711
|
+
return (t ? "-" : "") + a + "." + h;
|
|
661
712
|
}
|
|
662
|
-
function
|
|
663
|
-
const n = Math.pow(10,
|
|
713
|
+
function wt(s, e) {
|
|
714
|
+
const n = Math.pow(10, s) - 1;
|
|
664
715
|
return e <= 0 ? n : n + (1 - Math.pow(10, -e));
|
|
665
716
|
}
|
|
666
|
-
function
|
|
667
|
-
const t =
|
|
668
|
-
return Math.abs(
|
|
717
|
+
function We(s, e, n) {
|
|
718
|
+
const t = wt(e, n), o = s < 0 ? -1 : 1;
|
|
719
|
+
return Math.abs(s) <= t ? s : o * t;
|
|
669
720
|
}
|
|
670
|
-
function
|
|
721
|
+
function Ct(s, e, n) {
|
|
671
722
|
if (e <= 0)
|
|
672
723
|
switch (n) {
|
|
673
724
|
case "floor":
|
|
674
|
-
return Math.floor(
|
|
725
|
+
return Math.floor(s);
|
|
675
726
|
case "ceil":
|
|
676
|
-
return Math.ceil(
|
|
727
|
+
return Math.ceil(s);
|
|
677
728
|
default:
|
|
678
|
-
return Math.round(
|
|
729
|
+
return Math.round(s);
|
|
679
730
|
}
|
|
680
|
-
const t = Math.pow(10, e), o =
|
|
731
|
+
const t = Math.pow(10, e), o = s * t;
|
|
681
732
|
let r;
|
|
682
733
|
switch (n) {
|
|
683
734
|
case "floor":
|
|
@@ -691,26 +742,26 @@ function mt(c, e, n) {
|
|
|
691
742
|
}
|
|
692
743
|
return r / t;
|
|
693
744
|
}
|
|
694
|
-
function
|
|
695
|
-
let o =
|
|
696
|
-
return o =
|
|
745
|
+
function ke(s, e, n, t) {
|
|
746
|
+
let o = We(s, e, n);
|
|
747
|
+
return o = Ct(o, n, t), o = We(o, e, n), o;
|
|
697
748
|
}
|
|
698
|
-
function
|
|
699
|
-
return Number.isNaN(
|
|
749
|
+
function xt(s, e) {
|
|
750
|
+
return Number.isNaN(s) || !Number.isFinite(s) ? "" : s.toFixed(Math.max(0, e));
|
|
700
751
|
}
|
|
701
|
-
function
|
|
702
|
-
if (Number.isNaN(
|
|
752
|
+
function Ke(s, e) {
|
|
753
|
+
if (Number.isNaN(s) || !Number.isFinite(s))
|
|
703
754
|
return "";
|
|
704
|
-
const n =
|
|
705
|
-
return e <= 0 || a === void 0 ? (t ? "-" : "") +
|
|
755
|
+
const n = s.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), p = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
756
|
+
return e <= 0 || a === void 0 ? (t ? "-" : "") + p : (t ? "-" : "") + p + "." + a;
|
|
706
757
|
}
|
|
707
|
-
function
|
|
708
|
-
if (Number.isNaN(
|
|
758
|
+
function Pt(s, e) {
|
|
759
|
+
if (Number.isNaN(s) || !Number.isFinite(s))
|
|
709
760
|
return "";
|
|
710
|
-
let n =
|
|
761
|
+
let n = s.toFixed(Math.max(0, e));
|
|
711
762
|
return n = n.replace(/(\.\d*?)0+$/, "$1"), n = n.replace(/\.$/, ""), n;
|
|
712
763
|
}
|
|
713
|
-
const
|
|
764
|
+
const St = /* @__PURE__ */ ne({
|
|
714
765
|
__name: "FormattedNumberInput",
|
|
715
766
|
props: {
|
|
716
767
|
value: null,
|
|
@@ -722,94 +773,94 @@ const _t = /* @__PURE__ */ oe({
|
|
|
722
773
|
inputLimit: { type: Boolean, default: !0 }
|
|
723
774
|
},
|
|
724
775
|
emits: ["input"],
|
|
725
|
-
setup(
|
|
726
|
-
const n =
|
|
727
|
-
function
|
|
728
|
-
if (
|
|
776
|
+
setup(s, { emit: e }) {
|
|
777
|
+
const n = s, t = z(!1), o = z(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
|
|
778
|
+
function p(c) {
|
|
779
|
+
if (c == null || c === "")
|
|
729
780
|
return null;
|
|
730
|
-
if (typeof
|
|
731
|
-
return Number.isFinite(
|
|
732
|
-
const x = Ae(String(
|
|
781
|
+
if (typeof c == "number")
|
|
782
|
+
return Number.isFinite(c) ? c : null;
|
|
783
|
+
const x = Ae(String(c));
|
|
733
784
|
if (x === "" || x === "-")
|
|
734
785
|
return null;
|
|
735
|
-
const
|
|
736
|
-
return Number.isFinite(
|
|
786
|
+
const B = Number(x);
|
|
787
|
+
return Number.isFinite(B) ? B : null;
|
|
737
788
|
}
|
|
738
|
-
function
|
|
789
|
+
function m() {
|
|
739
790
|
if (t.value)
|
|
740
791
|
return;
|
|
741
|
-
const
|
|
742
|
-
if (
|
|
792
|
+
const c = p(n.value);
|
|
793
|
+
if (c === null) {
|
|
743
794
|
o.value = "";
|
|
744
795
|
return;
|
|
745
796
|
}
|
|
746
|
-
o.value =
|
|
747
|
-
|
|
797
|
+
o.value = Ke(
|
|
798
|
+
ke(c, r(), a(), n.rounding),
|
|
748
799
|
a()
|
|
749
800
|
);
|
|
750
801
|
}
|
|
751
|
-
|
|
802
|
+
X(
|
|
752
803
|
() => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
|
|
753
|
-
() =>
|
|
804
|
+
() => m(),
|
|
754
805
|
{ immediate: !0, deep: !0 }
|
|
755
806
|
);
|
|
756
|
-
function
|
|
757
|
-
e("input",
|
|
807
|
+
function h(c) {
|
|
808
|
+
e("input", xt(c, a()));
|
|
758
809
|
}
|
|
759
|
-
function
|
|
760
|
-
let x =
|
|
761
|
-
if (n.inputLimit !== !1 && (x =
|
|
810
|
+
function O(c) {
|
|
811
|
+
let x = Ve(c);
|
|
812
|
+
if (n.inputLimit !== !1 && (x = yt(x, r(), a())), o.value = x, x === "" || x === "-")
|
|
762
813
|
return;
|
|
763
|
-
const
|
|
764
|
-
if (!Number.isFinite(
|
|
814
|
+
const B = Number(x);
|
|
815
|
+
if (!Number.isFinite(B))
|
|
765
816
|
return;
|
|
766
|
-
const
|
|
767
|
-
|
|
817
|
+
const F = ke(B, r(), a(), n.rounding);
|
|
818
|
+
h(F);
|
|
768
819
|
}
|
|
769
|
-
function
|
|
820
|
+
function b() {
|
|
770
821
|
t.value = !0;
|
|
771
|
-
const
|
|
822
|
+
const c = Ae(o.value), x = p(c === "" ? n.value : c);
|
|
772
823
|
if (x === null) {
|
|
773
824
|
o.value = "";
|
|
774
825
|
return;
|
|
775
826
|
}
|
|
776
|
-
o.value =
|
|
777
|
-
|
|
827
|
+
o.value = Pt(
|
|
828
|
+
ke(x, r(), a(), n.rounding),
|
|
778
829
|
a()
|
|
779
830
|
);
|
|
780
831
|
}
|
|
781
|
-
function
|
|
832
|
+
function C() {
|
|
782
833
|
t.value = !1;
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
834
|
+
const c = Ae(o.value);
|
|
835
|
+
if (c === "" || c === "-") {
|
|
785
836
|
o.value = "", e("input", void 0);
|
|
786
837
|
return;
|
|
787
838
|
}
|
|
788
|
-
const x = Number(
|
|
839
|
+
const x = Number(Ve(c));
|
|
789
840
|
if (!Number.isFinite(x)) {
|
|
790
841
|
o.value = "", e("input", void 0);
|
|
791
842
|
return;
|
|
792
843
|
}
|
|
793
|
-
const
|
|
794
|
-
o.value =
|
|
844
|
+
const B = ke(x, r(), a(), n.rounding);
|
|
845
|
+
o.value = Ke(B, a()), h(B);
|
|
795
846
|
}
|
|
796
|
-
return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber:
|
|
847
|
+
return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber: p, syncDisplayFromValue: m, emitStoredValue: h, onInput: O, onFocus: b, onBlur: C };
|
|
797
848
|
}
|
|
798
849
|
});
|
|
799
|
-
var
|
|
850
|
+
var Ft = function() {
|
|
800
851
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
801
852
|
return n("el-input", e._b({ attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled }, on: { input: t.onInput, focus: t.onFocus, blur: t.onBlur } }, "el-input", e.$attrs, !1));
|
|
802
|
-
},
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
853
|
+
}, kt = [], Bt = /* @__PURE__ */ ae(
|
|
854
|
+
St,
|
|
855
|
+
Ft,
|
|
856
|
+
kt,
|
|
806
857
|
!1,
|
|
807
858
|
null,
|
|
808
859
|
null,
|
|
809
860
|
null,
|
|
810
861
|
null
|
|
811
862
|
);
|
|
812
|
-
const
|
|
863
|
+
const Me = Bt.exports, Rt = /* @__PURE__ */ ne({
|
|
813
864
|
__name: "TreeSelect",
|
|
814
865
|
props: {
|
|
815
866
|
value: null,
|
|
@@ -826,107 +877,107 @@ const Re = yt.exports, wt = /* @__PURE__ */ oe({
|
|
|
826
877
|
clearable: { type: Boolean }
|
|
827
878
|
},
|
|
828
879
|
emits: ["input"],
|
|
829
|
-
setup(
|
|
830
|
-
const n =
|
|
880
|
+
setup(s, { emit: e }) {
|
|
881
|
+
const n = s, t = z(), o = z(), r = z(!1), a = z(!1), p = z(""), m = z([]), h = z({}), O = y(() => ({
|
|
831
882
|
label: n.labelField,
|
|
832
883
|
children: n.childrenField
|
|
833
884
|
}));
|
|
834
|
-
function
|
|
835
|
-
const
|
|
836
|
-
return Y[n.labelField ?? "label"] =
|
|
885
|
+
function b(R) {
|
|
886
|
+
const j = n.labelField ?? "label", L = n.valueField ?? "value", Z = n.childrenField ?? "children", J = R[Z], Y = {};
|
|
887
|
+
return Y[n.labelField ?? "label"] = R[j] ?? R.label, Y[n.valueField ?? "value"] = R[L] ?? R.value, Array.isArray(J) && J.length && (Y[n.childrenField ?? "children"] = J.map((Q) => b(Q))), Y;
|
|
837
888
|
}
|
|
838
|
-
function
|
|
839
|
-
const
|
|
840
|
-
for (const
|
|
841
|
-
const ee = String(
|
|
842
|
-
|
|
843
|
-
const te =
|
|
844
|
-
Array.isArray(te) && te.length && Object.assign(
|
|
889
|
+
function C(R, j = "") {
|
|
890
|
+
const L = {}, Z = n.labelField ?? "label", J = n.valueField ?? "value", Y = n.childrenField ?? "children";
|
|
891
|
+
for (const Q of R) {
|
|
892
|
+
const ee = String(Q[Z] ?? Q.label ?? ""), U = Q[J] ?? Q.value;
|
|
893
|
+
U != null && (L[String(U)] = j ? j + " / " + ee : ee);
|
|
894
|
+
const te = Q[Y] ?? Q.children;
|
|
895
|
+
Array.isArray(te) && te.length && Object.assign(L, C(te, ee));
|
|
845
896
|
}
|
|
846
|
-
return
|
|
897
|
+
return L;
|
|
847
898
|
}
|
|
848
|
-
function
|
|
849
|
-
const
|
|
850
|
-
return Array.isArray(
|
|
899
|
+
function c() {
|
|
900
|
+
const R = n.treeData;
|
|
901
|
+
return Array.isArray(R) && R.length > 0;
|
|
851
902
|
}
|
|
852
|
-
function x(
|
|
853
|
-
|
|
903
|
+
function x(R) {
|
|
904
|
+
m.value = R, h.value = C(R);
|
|
854
905
|
}
|
|
855
|
-
function
|
|
856
|
-
const
|
|
857
|
-
if (!Array.isArray(
|
|
906
|
+
function B() {
|
|
907
|
+
const R = n.treeData;
|
|
908
|
+
if (!Array.isArray(R) || R.length === 0)
|
|
858
909
|
return;
|
|
859
|
-
const
|
|
860
|
-
x(
|
|
910
|
+
const j = R.map((L) => b(L));
|
|
911
|
+
x(j);
|
|
861
912
|
}
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
913
|
+
const F = y(() => n.value == null || n.value === "" ? "" : h.value[String(n.value)] ?? String(n.value)), N = (R, j) => {
|
|
914
|
+
if (!R)
|
|
864
915
|
return !0;
|
|
865
|
-
const
|
|
866
|
-
return String(
|
|
916
|
+
const L = n.labelField ?? "label";
|
|
917
|
+
return String(j[L] ?? j.label ?? "").toLowerCase().includes(R.toLowerCase());
|
|
867
918
|
};
|
|
868
|
-
|
|
869
|
-
var
|
|
870
|
-
(
|
|
919
|
+
X(p, (R) => {
|
|
920
|
+
var j;
|
|
921
|
+
(j = o.value) == null || j.filter(R);
|
|
871
922
|
});
|
|
872
|
-
let
|
|
873
|
-
function
|
|
874
|
-
n.disabled || (r.value = !0, n.lazy && !
|
|
875
|
-
|
|
876
|
-
t.value && !t.value.contains(
|
|
877
|
-
}, document.addEventListener("click",
|
|
923
|
+
let P = null;
|
|
924
|
+
function G() {
|
|
925
|
+
n.disabled || (r.value = !0, n.lazy && !c() && $(), Le(() => {
|
|
926
|
+
P = (R) => {
|
|
927
|
+
t.value && !t.value.contains(R.target) && I();
|
|
928
|
+
}, document.addEventListener("click", P);
|
|
878
929
|
}));
|
|
879
930
|
}
|
|
880
|
-
function
|
|
881
|
-
r.value = !1,
|
|
931
|
+
function I() {
|
|
932
|
+
r.value = !1, p.value = "", P && (document.removeEventListener("click", P), P = null);
|
|
882
933
|
}
|
|
883
|
-
function
|
|
934
|
+
function S() {
|
|
884
935
|
e("input", void 0);
|
|
885
936
|
}
|
|
886
|
-
function
|
|
887
|
-
const
|
|
888
|
-
e("input",
|
|
937
|
+
function d(R) {
|
|
938
|
+
const j = n.valueField ?? "value", L = R[j] ?? R.value;
|
|
939
|
+
e("input", L), I();
|
|
889
940
|
}
|
|
890
|
-
async function
|
|
891
|
-
if (!(!n.api ||
|
|
941
|
+
async function $() {
|
|
942
|
+
if (!(!n.api || c())) {
|
|
892
943
|
a.value = !0;
|
|
893
944
|
try {
|
|
894
|
-
const
|
|
895
|
-
|
|
945
|
+
const R = await n.api(n.params), j = Array.isArray(R) ? R : (R == null ? void 0 : R.list) ?? (R == null ? void 0 : R.data) ?? [];
|
|
946
|
+
m.value = j.map((L) => b(L)), h.value = C(m.value);
|
|
896
947
|
} finally {
|
|
897
948
|
a.value = !1;
|
|
898
949
|
}
|
|
899
950
|
}
|
|
900
951
|
}
|
|
901
|
-
return
|
|
902
|
-
|
|
903
|
-
}),
|
|
904
|
-
|
|
905
|
-
}, { deep: !0 }),
|
|
906
|
-
|
|
907
|
-
}, { deep: !0 }),
|
|
908
|
-
|
|
909
|
-
}, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText:
|
|
952
|
+
return ve(() => {
|
|
953
|
+
c() ? B() : n.lazy || $();
|
|
954
|
+
}), X(() => n.treeData, () => {
|
|
955
|
+
c() ? B() : (m.value = [], h.value = {}, !n.lazy && n.api && $());
|
|
956
|
+
}, { deep: !0 }), X(() => n.api, () => {
|
|
957
|
+
c() || (n.lazy ? (m.value = [], h.value = {}) : $());
|
|
958
|
+
}, { deep: !0 }), X(() => n.params, () => {
|
|
959
|
+
c() || (n.lazy ? (m.value = [], h.value = {}) : $());
|
|
960
|
+
}, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: p, treeData: m, flatLabelMap: h, treeProps: O, normalizeNode: b, buildFlatLabelMap: C, hasTreeDataProp: c, applyTreeData: x, syncFromTreeDataProp: B, displayText: F, filterNodeMethod: N, clickOutsideHandler: P, openDropdown: G, closeDropdown: I, clearValue: S, onNodeClick: d, fetchData: $ };
|
|
910
961
|
}
|
|
911
962
|
});
|
|
912
|
-
var
|
|
963
|
+
var Mt = function() {
|
|
913
964
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
914
965
|
return n("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [n("el-input", { staticClass: "ecp-tree-select__input", attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled, clearable: e.clearable, readonly: "", "suffix-icon": "el-icon-arrow-down" }, on: { focus: t.openDropdown, clear: t.clearValue } }), n("transition", { attrs: { name: "el-zoom-in-top" } }, [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? n("div", { staticClass: "ecp-tree-select__filter-inner" }, [n("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(o) {
|
|
915
966
|
o.stopPropagation();
|
|
916
967
|
} }, model: { value: t.filterText, callback: function(o) {
|
|
917
968
|
t.filterText = o;
|
|
918
969
|
}, expression: "filterText" } })], 1) : e._e(), n("el-tree", { directives: [{ name: "show", rawName: "v-show", value: !t.loading, expression: "!loading" }], ref: "treeRef", attrs: { data: t.treeData, props: t.treeProps, "node-key": e.valueField, "filter-node-method": e.filterable ? t.filterNodeMethod : void 0, "highlight-current": !0, "default-expand-all": "" }, on: { "node-click": t.onNodeClick } }), t.loading ? n("div", { staticClass: "ecp-tree-select__loading" }, [n("i", { staticClass: "el-icon-loading" }), e._v(" 加载中... ")]) : e._e()], 1)])], 1);
|
|
919
|
-
},
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
970
|
+
}, $t = [], At = /* @__PURE__ */ ae(
|
|
971
|
+
Rt,
|
|
972
|
+
Mt,
|
|
973
|
+
$t,
|
|
923
974
|
!1,
|
|
924
975
|
null,
|
|
925
976
|
"f30bba11",
|
|
926
977
|
null,
|
|
927
978
|
null
|
|
928
979
|
);
|
|
929
|
-
const
|
|
980
|
+
const Tt = At.exports, Dt = /* @__PURE__ */ ne({
|
|
930
981
|
__name: "ProFormItem",
|
|
931
982
|
props: {
|
|
932
983
|
schema: null,
|
|
@@ -939,8 +990,8 @@ const St = Pt.exports, Ft = /* @__PURE__ */ oe({
|
|
|
939
990
|
customComponents: null,
|
|
940
991
|
registerFieldInstance: null
|
|
941
992
|
},
|
|
942
|
-
setup(
|
|
943
|
-
const e =
|
|
993
|
+
setup(s) {
|
|
994
|
+
const e = s, n = /* @__PURE__ */ new Set([
|
|
944
995
|
"input",
|
|
945
996
|
"select",
|
|
946
997
|
"api-select",
|
|
@@ -954,75 +1005,75 @@ const St = Pt.exports, Ft = /* @__PURE__ */ oe({
|
|
|
954
1005
|
"checkbox",
|
|
955
1006
|
"radio"
|
|
956
1007
|
]), t = z(null);
|
|
957
|
-
|
|
958
|
-
var
|
|
959
|
-
e.schema.component === "api-select" && ((
|
|
960
|
-
}),
|
|
961
|
-
var
|
|
962
|
-
e.schema.component === "api-select" && ((
|
|
1008
|
+
ve(() => {
|
|
1009
|
+
var d;
|
|
1010
|
+
e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, t.value));
|
|
1011
|
+
}), Be(() => {
|
|
1012
|
+
var d;
|
|
1013
|
+
e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, null));
|
|
963
1014
|
});
|
|
964
|
-
const o =
|
|
1015
|
+
const o = he(), r = y(() => ({
|
|
965
1016
|
schema: e.schema,
|
|
966
1017
|
values: e.formModel,
|
|
967
1018
|
model: e.formModel,
|
|
968
1019
|
field: e.schema.field
|
|
969
|
-
})), a =
|
|
970
|
-
const
|
|
971
|
-
return
|
|
972
|
-
}),
|
|
973
|
-
const
|
|
974
|
-
return
|
|
975
|
-
}),
|
|
1020
|
+
})), a = y(() => {
|
|
1021
|
+
const d = e.schema.ifShow;
|
|
1022
|
+
return d === void 0 ? !0 : typeof d == "boolean" ? d : d(r.value);
|
|
1023
|
+
}), p = y(() => {
|
|
1024
|
+
const d = e.schema.show;
|
|
1025
|
+
return d === void 0 ? !0 : typeof d == "boolean" ? d : d(r.value);
|
|
1026
|
+
}), m = y(() => {
|
|
976
1027
|
if (e.formDisabled)
|
|
977
1028
|
return !0;
|
|
978
|
-
const
|
|
979
|
-
return
|
|
980
|
-
}),
|
|
981
|
-
const
|
|
982
|
-
return
|
|
983
|
-
}),
|
|
984
|
-
const
|
|
985
|
-
if (!
|
|
1029
|
+
const d = e.schema.dynamicDisabled;
|
|
1030
|
+
return d === void 0 ? !1 : typeof d == "boolean" ? d : d(r.value);
|
|
1031
|
+
}), h = y(() => {
|
|
1032
|
+
const d = e.schema.dynamicRules;
|
|
1033
|
+
return d ? Array.isArray(d) ? d : d(r.value) : e.schema.rules;
|
|
1034
|
+
}), O = y(() => {
|
|
1035
|
+
const d = e.schema.componentProps;
|
|
1036
|
+
if (!d)
|
|
986
1037
|
return { props: {}, listeners: {} };
|
|
987
|
-
const
|
|
1038
|
+
const $ = typeof d == "function" ? d({
|
|
988
1039
|
...r.value,
|
|
989
1040
|
formActionType: e.formActionType
|
|
990
|
-
}) : { ...
|
|
991
|
-
for (const [
|
|
992
|
-
if (
|
|
993
|
-
const
|
|
994
|
-
|
|
1041
|
+
}) : { ...d }, R = {}, j = {};
|
|
1042
|
+
for (const [L, Z] of Object.entries($))
|
|
1043
|
+
if (L.length > 2 && /^on[A-Za-z]/.test(L) && typeof Z == "function") {
|
|
1044
|
+
const J = L.slice(2).charAt(0).toLowerCase() + L.slice(3);
|
|
1045
|
+
j[J] = Z;
|
|
995
1046
|
} else
|
|
996
|
-
|
|
997
|
-
return { props:
|
|
998
|
-
}),
|
|
999
|
-
const
|
|
1000
|
-
if (!
|
|
1047
|
+
R[L] = Z;
|
|
1048
|
+
return { props: R, listeners: j };
|
|
1049
|
+
}), b = y(() => O.value.props), C = y(() => O.value.listeners), c = y(() => e.schema.colon ?? e.colon ?? !1), x = y(() => {
|
|
1050
|
+
const d = e.schema.tooltip;
|
|
1051
|
+
if (!d)
|
|
1001
1052
|
return null;
|
|
1002
|
-
const
|
|
1003
|
-
return
|
|
1004
|
-
}),
|
|
1005
|
-
const
|
|
1006
|
-
return Array.isArray(
|
|
1007
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1010
|
-
}),
|
|
1011
|
-
var
|
|
1012
|
-
(
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1053
|
+
const $ = typeof d == "function" ? d(r.value) : d;
|
|
1054
|
+
return De($, e.formModel[e.schema.field]);
|
|
1055
|
+
}), B = y(() => x.value ? "el-tooltip" : "span"), F = y(() => x.value || {}), N = y(() => !!o.default), P = (d) => {
|
|
1056
|
+
const $ = d == null ? void 0 : d.options;
|
|
1057
|
+
return Array.isArray($) ? $ : void 0;
|
|
1058
|
+
}, G = y(() => {
|
|
1059
|
+
const d = e.schema.component;
|
|
1060
|
+
return d == null ? null : typeof d == "string" ? n.has(d) ? null : e.customComponents && e.customComponents[d] || d : d;
|
|
1061
|
+
}), I = (d) => {
|
|
1062
|
+
var $;
|
|
1063
|
+
($ = e.onFieldChange) == null || $.call(e, e.schema.field, d);
|
|
1064
|
+
}, S = y(() => {
|
|
1065
|
+
const d = e.schema.render;
|
|
1066
|
+
return d ? {
|
|
1016
1067
|
render() {
|
|
1017
|
-
const
|
|
1018
|
-
return Array.isArray(
|
|
1068
|
+
const $ = d(r.value);
|
|
1069
|
+
return Array.isArray($) ? de("span", $) : $;
|
|
1019
1070
|
}
|
|
1020
1071
|
} : null;
|
|
1021
1072
|
});
|
|
1022
|
-
return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow:
|
|
1073
|
+
return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow: p, effectiveDisabled: m, effectiveRules: h, effectiveComponentPropsAndListeners: O, effectiveComponentProps: b, effectiveComponentListeners: C, showColon: c, normalizedTooltip: x, fieldWrapperComponent: B, fieldWrapperProps: F, hasSlot: N, getOptions: P, resolvedCustomComponent: G, setFieldValue: I, renderComponent: S, ApiSelect: bt, FormattedNumberInput: Me, TreeSelect: Tt };
|
|
1023
1074
|
}
|
|
1024
1075
|
});
|
|
1025
|
-
var
|
|
1076
|
+
var zt = function() {
|
|
1026
1077
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
1027
1078
|
return t.shouldRender ? n("el-form-item", { directives: [{ name: "show", rawName: "v-show", value: t.shouldShow, expression: "shouldShow" }], attrs: { prop: e.schema.field, required: e.schema.required, rules: t.effectiveRules, "label-width": e.schema.labelWidth } }, [n("template", { slot: "label" }, [n("span", [e._v(" " + e._s(e.schema.label)), t.showColon ? n("span", { staticClass: "ecp-pro-form-item__colon" }, [e._v(":")]) : e._e()]), e.schema.helpMessage ? n("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [n("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(o, r) {
|
|
1028
1079
|
return n("div", { key: r, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(o) + " ")]);
|
|
@@ -1051,17 +1102,17 @@ var kt = function() {
|
|
|
1051
1102
|
}, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
|
|
1052
1103
|
return n("el-radio", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
|
|
1053
1104
|
}), 1) : e._e()], 1)]], 2) : e._e();
|
|
1054
|
-
},
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1105
|
+
}, Et = [], Ot = /* @__PURE__ */ ae(
|
|
1106
|
+
Dt,
|
|
1107
|
+
zt,
|
|
1108
|
+
Et,
|
|
1058
1109
|
!1,
|
|
1059
1110
|
null,
|
|
1060
1111
|
"48d7960b",
|
|
1061
1112
|
null,
|
|
1062
1113
|
null
|
|
1063
1114
|
);
|
|
1064
|
-
const
|
|
1115
|
+
const Je = Ot.exports, Nt = /* @__PURE__ */ ne({
|
|
1065
1116
|
__name: "FormActions",
|
|
1066
1117
|
props: {
|
|
1067
1118
|
showActionButtonGroup: { type: Boolean, default: !0 },
|
|
@@ -1078,28 +1129,28 @@ const qe = Rt.exports, Mt = /* @__PURE__ */ oe({
|
|
|
1078
1129
|
actionColOptions: null
|
|
1079
1130
|
},
|
|
1080
1131
|
emits: ["submit", "reset", "toggle"],
|
|
1081
|
-
setup(
|
|
1132
|
+
setup(s) {
|
|
1082
1133
|
return { __sfc: !0 };
|
|
1083
1134
|
}
|
|
1084
1135
|
});
|
|
1085
|
-
var
|
|
1136
|
+
var It = function() {
|
|
1086
1137
|
var e = this, n = e._self._c;
|
|
1087
1138
|
return e._self._setupProxy, n("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? n("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
|
|
1088
1139
|
return e.$emit("submit");
|
|
1089
1140
|
} } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? n("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
|
|
1090
1141
|
return e.$emit("reset");
|
|
1091
1142
|
} } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
|
|
1092
|
-
},
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1143
|
+
}, Vt = [], Wt = /* @__PURE__ */ ae(
|
|
1144
|
+
Nt,
|
|
1145
|
+
It,
|
|
1146
|
+
Vt,
|
|
1096
1147
|
!1,
|
|
1097
1148
|
null,
|
|
1098
1149
|
"489c88d2",
|
|
1099
1150
|
null,
|
|
1100
1151
|
null
|
|
1101
1152
|
);
|
|
1102
|
-
const
|
|
1153
|
+
const Ue = Wt.exports, Kt = /* @__PURE__ */ ne({
|
|
1103
1154
|
__name: "ProForm",
|
|
1104
1155
|
props: {
|
|
1105
1156
|
schemas: null,
|
|
@@ -1132,181 +1183,181 @@ const He = Tt.exports, Dt = /* @__PURE__ */ oe({
|
|
|
1132
1183
|
components: null
|
|
1133
1184
|
},
|
|
1134
1185
|
emits: ["submit", "reset", "register", "update:modelValue"],
|
|
1135
|
-
setup(
|
|
1136
|
-
const t =
|
|
1137
|
-
const
|
|
1138
|
-
return
|
|
1139
|
-
}, { getSetting:
|
|
1140
|
-
...
|
|
1141
|
-
...
|
|
1142
|
-
...
|
|
1143
|
-
})),
|
|
1144
|
-
let
|
|
1145
|
-
for (const
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1148
|
-
if (
|
|
1186
|
+
setup(s, { expose: e, emit: n }) {
|
|
1187
|
+
const t = s, o = he(), r = z(), a = z(), p = z(!1), m = z(!0), h = z({}), O = z({}), b = z([]), C = z({}), c = z(/* @__PURE__ */ new Map()), x = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (f, w, M) => {
|
|
1188
|
+
const T = M ?? (typeof window < "u" ? window.innerWidth : 1920), l = f ?? {}, u = w ?? {}, g = u.span ?? 8;
|
|
1189
|
+
return T >= x.xl ? l.xl ?? u.xl ?? l.lg ?? u.lg ?? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.lg ? l.lg ?? u.lg ?? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.md ? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.sm ? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : l.xs ?? u.xs ?? l.span ?? g;
|
|
1190
|
+
}, { getSetting: F } = Re(), N = y(() => ({ ...F("ProForm"), ...t, ...C.value })), P = y(() => N.value.modelValue), G = y(() => P.value !== void 0), I = y(() => G.value ? P.value ?? {} : h.value), S = y(() => ({
|
|
1191
|
+
...F("ProForm").components ?? {},
|
|
1192
|
+
...N.value.components ?? {},
|
|
1193
|
+
...C.value.components ?? {}
|
|
1194
|
+
})), d = y(() => N.value.actionColOptions ?? { span: 24 }), $ = z(typeof window < "u" ? window.innerWidth : 1920), R = (f, w, M, T) => {
|
|
1195
|
+
let l = 24, u = 1, g = 0;
|
|
1196
|
+
for (const k of f) {
|
|
1197
|
+
const q = B(k.colProps, w, T);
|
|
1198
|
+
if (q > l) {
|
|
1199
|
+
if (u++, u > M)
|
|
1149
1200
|
break;
|
|
1150
|
-
|
|
1201
|
+
l = 24 - q;
|
|
1151
1202
|
} else
|
|
1152
|
-
|
|
1153
|
-
|
|
1203
|
+
l -= q;
|
|
1204
|
+
g++;
|
|
1154
1205
|
}
|
|
1155
|
-
return
|
|
1156
|
-
},
|
|
1157
|
-
const
|
|
1158
|
-
if (!
|
|
1206
|
+
return g;
|
|
1207
|
+
}, j = y(() => {
|
|
1208
|
+
const f = b.value.filter((l) => J(l));
|
|
1209
|
+
if (!N.value.showAdvancedButton)
|
|
1159
1210
|
return !1;
|
|
1160
|
-
const w =
|
|
1161
|
-
return
|
|
1162
|
-
}),
|
|
1163
|
-
const
|
|
1164
|
-
if (!
|
|
1165
|
-
return
|
|
1166
|
-
const w =
|
|
1167
|
-
return
|
|
1168
|
-
}),
|
|
1169
|
-
let w = !0,
|
|
1170
|
-
return typeof
|
|
1171
|
-
}, Y = (
|
|
1172
|
-
const
|
|
1173
|
-
return
|
|
1174
|
-
if (!(w && Object.prototype.hasOwnProperty.call(
|
|
1175
|
-
if (
|
|
1176
|
-
|
|
1211
|
+
const w = N.value.alwaysShowLines ?? 1, M = N.value.baseColProps, T = R(f, M, w, $.value);
|
|
1212
|
+
return f.length > T;
|
|
1213
|
+
}), L = y(() => N.value.formListeners ?? {}), Z = y(() => {
|
|
1214
|
+
const f = b.value.filter((l) => J(l));
|
|
1215
|
+
if (!N.value.showAdvancedButton || !m.value)
|
|
1216
|
+
return f;
|
|
1217
|
+
const w = N.value.alwaysShowLines ?? 1, M = N.value.baseColProps, T = R(f, M, w, $.value);
|
|
1218
|
+
return f.slice(0, T);
|
|
1219
|
+
}), J = (f) => {
|
|
1220
|
+
let w = !0, M = !0;
|
|
1221
|
+
return typeof f.ifShow == "function" && (w = f.ifShow({ schema: f, values: I.value, model: I.value, field: f.field })), typeof f.ifShow == "boolean" && (w = f.ifShow), typeof f.show == "function" && (M = f.show({ schema: f, values: I.value, model: I.value, field: f.field })), typeof f.show == "boolean" && (M = f.show), w && M;
|
|
1222
|
+
}, Y = (f) => f.colProps ?? N.value.baseColProps ?? {}, Q = (f) => f.slot || f.field, ee = (f, w = !0) => {
|
|
1223
|
+
const M = w ? { ...f ?? {} } : {}, T = N.value.initialValues ?? t.initialValues;
|
|
1224
|
+
return b.value.forEach((l) => {
|
|
1225
|
+
if (!(w && Object.prototype.hasOwnProperty.call(M, l.field))) {
|
|
1226
|
+
if (l.defaultValue !== void 0) {
|
|
1227
|
+
M[l.field] = l.defaultValue;
|
|
1177
1228
|
return;
|
|
1178
1229
|
}
|
|
1179
|
-
|
|
1230
|
+
T && Object.prototype.hasOwnProperty.call(T, l.field) && (M[l.field] = T[l.field]);
|
|
1180
1231
|
}
|
|
1181
|
-
}),
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
|
-
}, te = (
|
|
1185
|
-
const w = ee({ ...
|
|
1186
|
-
return
|
|
1187
|
-
},
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
var
|
|
1191
|
-
(
|
|
1192
|
-
}),
|
|
1193
|
-
},
|
|
1194
|
-
const w = { ...
|
|
1195
|
-
return
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1232
|
+
}), M;
|
|
1233
|
+
}, U = (f, w = !0) => {
|
|
1234
|
+
h.value = f, w && n("update:modelValue", f);
|
|
1235
|
+
}, te = (f) => {
|
|
1236
|
+
const w = ee({ ...I.value, ...f });
|
|
1237
|
+
return U(w), w;
|
|
1238
|
+
}, oe = () => {
|
|
1239
|
+
const f = {};
|
|
1240
|
+
b.value.forEach((w) => {
|
|
1241
|
+
var M;
|
|
1242
|
+
(M = w.rules) != null && M.length && (f[w.field] = w.rules);
|
|
1243
|
+
}), U(ee(I.value), !1), O.value = f;
|
|
1244
|
+
}, _ = (f) => {
|
|
1245
|
+
const w = { ...f };
|
|
1246
|
+
return b.value.forEach((M) => {
|
|
1247
|
+
const T = M.ifShow;
|
|
1248
|
+
if (T === void 0)
|
|
1198
1249
|
return;
|
|
1199
|
-
(typeof
|
|
1250
|
+
(typeof T == "boolean" ? T : T({ schema: M, values: f, model: f, field: M.field })) || delete w[M.field];
|
|
1200
1251
|
}), w;
|
|
1201
|
-
},
|
|
1202
|
-
const w =
|
|
1203
|
-
if (!(
|
|
1252
|
+
}, E = (f) => {
|
|
1253
|
+
const w = _(f), M = C.value.fieldMapToTime;
|
|
1254
|
+
if (!(M != null && M.length))
|
|
1204
1255
|
return w;
|
|
1205
|
-
const
|
|
1206
|
-
return
|
|
1207
|
-
const
|
|
1208
|
-
Array.isArray(
|
|
1209
|
-
}),
|
|
1210
|
-
},
|
|
1211
|
-
var
|
|
1256
|
+
const T = { ...w };
|
|
1257
|
+
return M.forEach(([l, [u, g]]) => {
|
|
1258
|
+
const k = T[l];
|
|
1259
|
+
Array.isArray(k) && k.length === 2 && (delete T[l], T[u] = k[0], T[g] = k[1]);
|
|
1260
|
+
}), T;
|
|
1261
|
+
}, D = async () => {
|
|
1262
|
+
var f;
|
|
1212
1263
|
try {
|
|
1213
|
-
await ((
|
|
1264
|
+
await ((f = r.value) == null ? void 0 : f.validate()), N.value.submitFunc ? await N.value.submitFunc() : (p.value = !0, n("submit", E({ ...I.value })));
|
|
1214
1265
|
} catch (w) {
|
|
1215
1266
|
console.error("Form validation failed:", w);
|
|
1216
1267
|
} finally {
|
|
1217
|
-
|
|
1268
|
+
p.value = !1;
|
|
1218
1269
|
}
|
|
1219
1270
|
}, i = async () => {
|
|
1220
|
-
var
|
|
1221
|
-
|
|
1222
|
-
},
|
|
1223
|
-
var
|
|
1224
|
-
(
|
|
1225
|
-
},
|
|
1226
|
-
te({ [
|
|
1227
|
-
},
|
|
1271
|
+
var f;
|
|
1272
|
+
N.value.resetFunc ? await N.value.resetFunc() : ((f = r.value) == null || f.resetFields(), oe(), n("reset"), N.value.submitOnReset && await D());
|
|
1273
|
+
}, v = (f) => (te(f), Promise.resolve()), A = () => E({ ...I.value }), V = async () => {
|
|
1274
|
+
var f;
|
|
1275
|
+
(f = r.value) == null || f.resetFields(), U(ee(void 0, !1));
|
|
1276
|
+
}, W = (f, w) => {
|
|
1277
|
+
te({ [f]: w });
|
|
1278
|
+
}, H = (f) => {
|
|
1228
1279
|
var w;
|
|
1229
|
-
return ((w = r.value) == null ? void 0 : w.validate(
|
|
1230
|
-
},
|
|
1231
|
-
r.value.validateField(w, (
|
|
1232
|
-
}))) : r.value.validate() : Promise.resolve(),
|
|
1233
|
-
var
|
|
1234
|
-
const
|
|
1235
|
-
return
|
|
1236
|
-
},
|
|
1280
|
+
return ((w = r.value) == null ? void 0 : w.validate(f)) ?? Promise.resolve();
|
|
1281
|
+
}, ie = (f) => r.value ? f != null && f.length ? Promise.all(f.map((w) => new Promise((M, T) => {
|
|
1282
|
+
r.value.validateField(w, (l) => l ? M(void 0) : T(new Error("Validation failed")));
|
|
1283
|
+
}))) : r.value.validate() : Promise.resolve(), _e = async (f, w) => {
|
|
1284
|
+
var T;
|
|
1285
|
+
const M = (T = a.value) == null ? void 0 : T.querySelector(`[data-field="${f}"]`);
|
|
1286
|
+
return M && M.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
|
|
1287
|
+
}, ge = (f) => {
|
|
1237
1288
|
var w;
|
|
1238
|
-
(w = r.value) == null || w.clearValidate(
|
|
1239
|
-
},
|
|
1240
|
-
(Array.isArray(
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1289
|
+
(w = r.value) == null || w.clearValidate(f);
|
|
1290
|
+
}, se = async (f) => {
|
|
1291
|
+
(Array.isArray(f) ? f : [f]).forEach((M) => {
|
|
1292
|
+
const T = b.value.findIndex((l) => l.field === M.field);
|
|
1293
|
+
T >= 0 && (b.value[T] = { ...b.value[T], ...M });
|
|
1243
1294
|
});
|
|
1244
|
-
},
|
|
1245
|
-
if (
|
|
1246
|
-
|
|
1295
|
+
}, be = async (f, w, M) => {
|
|
1296
|
+
if (M)
|
|
1297
|
+
b.value.unshift(f);
|
|
1247
1298
|
else if (w) {
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1299
|
+
const T = b.value.findIndex((l) => l.field === w);
|
|
1300
|
+
b.value.splice(T + 1, 0, f);
|
|
1250
1301
|
} else
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
},
|
|
1254
|
-
const w = Array.isArray(
|
|
1255
|
-
|
|
1256
|
-
},
|
|
1257
|
-
|
|
1258
|
-
},
|
|
1259
|
-
w ?
|
|
1260
|
-
},
|
|
1261
|
-
function
|
|
1262
|
-
const
|
|
1263
|
-
if (!
|
|
1302
|
+
b.value.push(f);
|
|
1303
|
+
oe();
|
|
1304
|
+
}, ye = async (f) => {
|
|
1305
|
+
const w = Array.isArray(f) ? f : [f];
|
|
1306
|
+
b.value = b.value.filter((M) => !w.includes(M.field));
|
|
1307
|
+
}, we = async (f) => {
|
|
1308
|
+
C.value = { ...C.value, ...f }, f.schemas && (b.value = [...f.schemas], oe());
|
|
1309
|
+
}, Ce = (f, w) => {
|
|
1310
|
+
w ? c.value.set(f, w) : c.value.delete(f);
|
|
1311
|
+
}, xe = (f) => c.value.get(f) ?? null;
|
|
1312
|
+
function Pe(f, w = !1) {
|
|
1313
|
+
const M = c.value.get(f);
|
|
1314
|
+
if (!M)
|
|
1264
1315
|
return [];
|
|
1265
|
-
const
|
|
1266
|
-
return w ? (
|
|
1316
|
+
const T = M;
|
|
1317
|
+
return w ? (T == null ? void 0 : T.rawOptions) ?? [] : (T == null ? void 0 : T.options) ?? [];
|
|
1267
1318
|
}
|
|
1268
|
-
const
|
|
1269
|
-
const w =
|
|
1319
|
+
const Se = (f) => {
|
|
1320
|
+
const w = c.value.get(f);
|
|
1270
1321
|
if (!w)
|
|
1271
1322
|
return !1;
|
|
1272
|
-
const
|
|
1273
|
-
return (
|
|
1274
|
-
},
|
|
1275
|
-
getFieldsValue:
|
|
1276
|
-
setFieldsValue:
|
|
1277
|
-
resetFields:
|
|
1278
|
-
validate:
|
|
1279
|
-
validateFields:
|
|
1280
|
-
submit:
|
|
1281
|
-
scrollToField:
|
|
1282
|
-
clearValidate:
|
|
1283
|
-
updateSchema:
|
|
1284
|
-
appendSchemaByField:
|
|
1285
|
-
removeSchemaByField:
|
|
1286
|
-
setProps:
|
|
1287
|
-
getComponentInstance:
|
|
1288
|
-
getFieldOptions:
|
|
1289
|
-
isFieldLoading:
|
|
1323
|
+
const M = w;
|
|
1324
|
+
return (M == null ? void 0 : M.loading) ?? !1;
|
|
1325
|
+
}, fe = {
|
|
1326
|
+
getFieldsValue: A,
|
|
1327
|
+
setFieldsValue: v,
|
|
1328
|
+
resetFields: V,
|
|
1329
|
+
validate: H,
|
|
1330
|
+
validateFields: ie,
|
|
1331
|
+
submit: D,
|
|
1332
|
+
scrollToField: _e,
|
|
1333
|
+
clearValidate: ge,
|
|
1334
|
+
updateSchema: se,
|
|
1335
|
+
appendSchemaByField: be,
|
|
1336
|
+
removeSchemaByField: ye,
|
|
1337
|
+
setProps: we,
|
|
1338
|
+
getComponentInstance: xe,
|
|
1339
|
+
getFieldOptions: Pe,
|
|
1340
|
+
isFieldLoading: Se
|
|
1290
1341
|
};
|
|
1291
1342
|
e({
|
|
1292
|
-
...
|
|
1293
|
-
registerFieldInstance:
|
|
1343
|
+
...fe,
|
|
1344
|
+
registerFieldInstance: Ce
|
|
1294
1345
|
});
|
|
1295
1346
|
const ce = () => {
|
|
1296
|
-
|
|
1297
|
-
},
|
|
1298
|
-
typeof window < "u" && (
|
|
1347
|
+
b.value = [...t.schemas ?? []], oe();
|
|
1348
|
+
}, ue = () => {
|
|
1349
|
+
typeof window < "u" && ($.value = window.innerWidth);
|
|
1299
1350
|
};
|
|
1300
|
-
return
|
|
1301
|
-
ce(), n("register",
|
|
1302
|
-
}),
|
|
1303
|
-
typeof window < "u" && window.removeEventListener("resize",
|
|
1304
|
-
}),
|
|
1305
|
-
!
|
|
1306
|
-
}, { deep: !0, immediate: !0 }),
|
|
1351
|
+
return ve(() => {
|
|
1352
|
+
ce(), n("register", fe), typeof window < "u" && window.addEventListener("resize", ue);
|
|
1353
|
+
}), Be(() => {
|
|
1354
|
+
typeof window < "u" && window.removeEventListener("resize", ue);
|
|
1355
|
+
}), X(() => P.value, (f) => {
|
|
1356
|
+
!G.value || f === void 0 || U(ee(f), !1);
|
|
1357
|
+
}, { deep: !0, immediate: !0 }), X(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: p, collapsed: m, formModel: h, formRules: O, innerSchemas: b, innerProps: C, fieldInstanceMap: c, BREAKPOINTS: x, getEffectiveSpan: B, getComponentSetting: F, effectiveProps: N, controlledModelValue: P, isControlled: G, currentFormModel: I, formCustomComponents: S, effectiveActionColOptions: d, windowWidth: $, getVisibleSchemaCount: R, hasMoreFields: j, formListeners: L, displaySchemas: Z, shouldShow: J, getColProps: Y, getSlotName: Q, resolveSchemaModel: ee, applyFormModel: U, updateFormModel: te, initForm: oe, filterByIfShow: _, processFieldMapToTime: E, handleSubmit: D, handleReset: i, setFieldsValue: v, getFieldsValue: A, resetFields: V, handleFieldChange: W, validate: H, validateFields: ie, scrollToField: _e, clearValidate: ge, updateSchema: se, appendSchemaByField: be, removeSchemaByField: ye, setProps: we, registerFieldInstance: Ce, getComponentInstance: xe, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: fe, syncSchemas: ce, handleResize: ue, ProFormItem: Je, FormActions: Ue };
|
|
1307
1358
|
}
|
|
1308
1359
|
});
|
|
1309
|
-
var
|
|
1360
|
+
var Lt = function() {
|
|
1310
1361
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
1311
1362
|
return n("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [n("el-form", e._g(e._b({ ref: "formRef", staticClass: "ecp-pro-form", attrs: { model: t.currentFormModel, rules: t.formRules, "label-width": t.effectiveProps.labelWidth, "label-position": t.effectiveProps.labelPosition, size: t.effectiveProps.size, disabled: t.effectiveProps.disabled } }, "el-form", e.$attrs, !1), t.formListeners), [e._t("formHeader"), n("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(o) {
|
|
1312
1363
|
var r, a;
|
|
@@ -1316,97 +1367,97 @@ var zt = function() {
|
|
|
1316
1367
|
} } }, [n("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), n("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), n("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), n("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), n("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? n("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(o) {
|
|
1317
1368
|
t.collapsed = !t.collapsed;
|
|
1318
1369
|
} } }, [n("i", { staticClass: "el-icon-d-arrow-left", class: t.collapsed ? "down" : "up" }), e._v(" " + e._s(t.collapsed ? "展开" : "收起") + " ")]) : e._e(), e._t("formFooter")], 2)], 1);
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1370
|
+
}, jt = [], qt = /* @__PURE__ */ ae(
|
|
1371
|
+
Kt,
|
|
1372
|
+
Lt,
|
|
1373
|
+
jt,
|
|
1323
1374
|
!1,
|
|
1324
1375
|
null,
|
|
1325
|
-
"
|
|
1376
|
+
"cf7b3b35",
|
|
1326
1377
|
null,
|
|
1327
1378
|
null
|
|
1328
1379
|
);
|
|
1329
|
-
const
|
|
1330
|
-
function
|
|
1331
|
-
const e = z(null), n = z(
|
|
1332
|
-
e.value =
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1380
|
+
const Xe = qt.exports;
|
|
1381
|
+
function dn(s) {
|
|
1382
|
+
const e = z(null), n = z(s ? me(s) : void 0), t = () => s ? me(s) : void 0, o = (S) => {
|
|
1383
|
+
e.value = S;
|
|
1384
|
+
const d = t();
|
|
1385
|
+
d && Object.keys(d).length > 0 && S.setProps(d);
|
|
1335
1386
|
};
|
|
1336
|
-
|
|
1387
|
+
s && X(
|
|
1337
1388
|
() => t(),
|
|
1338
|
-
(
|
|
1339
|
-
n.value =
|
|
1389
|
+
(S) => {
|
|
1390
|
+
n.value = S, S && e.value && e.value.setProps(S);
|
|
1340
1391
|
},
|
|
1341
1392
|
{ deep: !0 }
|
|
1342
1393
|
);
|
|
1343
1394
|
const r = () => {
|
|
1344
|
-
var
|
|
1345
|
-
return ((
|
|
1346
|
-
}, a = async (
|
|
1347
|
-
var
|
|
1348
|
-
await ((
|
|
1349
|
-
},
|
|
1350
|
-
var
|
|
1351
|
-
await ((
|
|
1352
|
-
},
|
|
1353
|
-
var
|
|
1354
|
-
return ((
|
|
1355
|
-
},
|
|
1356
|
-
var
|
|
1357
|
-
return ((
|
|
1358
|
-
},
|
|
1359
|
-
var
|
|
1360
|
-
return ((
|
|
1361
|
-
},
|
|
1362
|
-
var
|
|
1363
|
-
return ((
|
|
1364
|
-
},
|
|
1365
|
-
var
|
|
1366
|
-
(
|
|
1367
|
-
},
|
|
1368
|
-
var
|
|
1369
|
-
return ((
|
|
1370
|
-
}, x = (
|
|
1371
|
-
var
|
|
1372
|
-
return ((
|
|
1373
|
-
},
|
|
1374
|
-
var
|
|
1375
|
-
return ((
|
|
1376
|
-
},
|
|
1377
|
-
var
|
|
1378
|
-
n.value = { ...n.value, ...
|
|
1379
|
-
},
|
|
1380
|
-
var
|
|
1381
|
-
return ((
|
|
1395
|
+
var S;
|
|
1396
|
+
return ((S = e.value) == null ? void 0 : S.getFieldsValue()) ?? {};
|
|
1397
|
+
}, a = async (S) => {
|
|
1398
|
+
var d;
|
|
1399
|
+
await ((d = e.value) == null ? void 0 : d.setFieldsValue(S));
|
|
1400
|
+
}, p = async () => {
|
|
1401
|
+
var S;
|
|
1402
|
+
await ((S = e.value) == null ? void 0 : S.resetFields());
|
|
1403
|
+
}, m = (S) => {
|
|
1404
|
+
var d;
|
|
1405
|
+
return ((d = e.value) == null ? void 0 : d.validate(S)) ?? Promise.resolve();
|
|
1406
|
+
}, h = (S) => {
|
|
1407
|
+
var d;
|
|
1408
|
+
return ((d = e.value) == null ? void 0 : d.validateFields(S)) ?? Promise.resolve();
|
|
1409
|
+
}, O = () => {
|
|
1410
|
+
var S;
|
|
1411
|
+
return ((S = e.value) == null ? void 0 : S.submit()) ?? Promise.resolve();
|
|
1412
|
+
}, b = (S, d) => {
|
|
1413
|
+
var $;
|
|
1414
|
+
return (($ = e.value) == null ? void 0 : $.scrollToField(S, d)) ?? Promise.resolve();
|
|
1415
|
+
}, C = (S) => {
|
|
1416
|
+
var d;
|
|
1417
|
+
(d = e.value) == null || d.clearValidate(S);
|
|
1418
|
+
}, c = (S) => {
|
|
1419
|
+
var d;
|
|
1420
|
+
return ((d = e.value) == null ? void 0 : d.updateSchema(S)) ?? Promise.resolve();
|
|
1421
|
+
}, x = (S, d, $) => {
|
|
1422
|
+
var R;
|
|
1423
|
+
return ((R = e.value) == null ? void 0 : R.appendSchemaByField(S, d, $)) ?? Promise.resolve();
|
|
1424
|
+
}, B = (S) => {
|
|
1425
|
+
var d;
|
|
1426
|
+
return ((d = e.value) == null ? void 0 : d.removeSchemaByField(S)) ?? Promise.resolve();
|
|
1427
|
+
}, F = async (S) => {
|
|
1428
|
+
var d;
|
|
1429
|
+
n.value = { ...n.value, ...S }, await ((d = e.value) == null ? void 0 : d.setProps(S));
|
|
1430
|
+
}, N = (S) => {
|
|
1431
|
+
var d;
|
|
1432
|
+
return ((d = e.value) == null ? void 0 : d.getComponentInstance(S)) ?? null;
|
|
1382
1433
|
};
|
|
1383
|
-
function
|
|
1384
|
-
return e.value ?
|
|
1434
|
+
function P(S, d = !1) {
|
|
1435
|
+
return e.value ? d ? e.value.getFieldOptions(S, !0) : e.value.getFieldOptions(S) : [];
|
|
1385
1436
|
}
|
|
1386
1437
|
return [o, {
|
|
1387
1438
|
register: o,
|
|
1388
1439
|
formAction: e,
|
|
1389
1440
|
getFieldsValue: r,
|
|
1390
1441
|
setFieldsValue: a,
|
|
1391
|
-
resetFields:
|
|
1392
|
-
validate:
|
|
1393
|
-
validateFields:
|
|
1394
|
-
submit:
|
|
1395
|
-
scrollToField:
|
|
1396
|
-
clearValidate:
|
|
1397
|
-
updateSchema:
|
|
1442
|
+
resetFields: p,
|
|
1443
|
+
validate: m,
|
|
1444
|
+
validateFields: h,
|
|
1445
|
+
submit: O,
|
|
1446
|
+
scrollToField: b,
|
|
1447
|
+
clearValidate: C,
|
|
1448
|
+
updateSchema: c,
|
|
1398
1449
|
appendSchemaByField: x,
|
|
1399
|
-
removeSchemaByField:
|
|
1400
|
-
setProps:
|
|
1401
|
-
getComponentInstance:
|
|
1402
|
-
getFieldOptions:
|
|
1403
|
-
isFieldLoading: (
|
|
1404
|
-
var
|
|
1405
|
-
return ((
|
|
1450
|
+
removeSchemaByField: B,
|
|
1451
|
+
setProps: F,
|
|
1452
|
+
getComponentInstance: N,
|
|
1453
|
+
getFieldOptions: P,
|
|
1454
|
+
isFieldLoading: (S) => {
|
|
1455
|
+
var d;
|
|
1456
|
+
return ((d = e.value) == null ? void 0 : d.isFieldLoading(S)) ?? !1;
|
|
1406
1457
|
}
|
|
1407
1458
|
}];
|
|
1408
1459
|
}
|
|
1409
|
-
const
|
|
1460
|
+
const Ht = /* @__PURE__ */ ne({
|
|
1410
1461
|
__name: "ProDescriptions",
|
|
1411
1462
|
props: {
|
|
1412
1463
|
title: null,
|
|
@@ -1421,8 +1472,8 @@ const Nt = /* @__PURE__ */ oe({
|
|
|
1421
1472
|
collapseOptions: { default: () => ({ canExpand: !1, defaultExpand: !0, expandButtonText: "展开", collapseButtonText: "收起", visibleRows: 1 }) }
|
|
1422
1473
|
},
|
|
1423
1474
|
emits: ["register"],
|
|
1424
|
-
setup(
|
|
1425
|
-
const t =
|
|
1475
|
+
setup(s, { expose: e, emit: n }) {
|
|
1476
|
+
const t = s, o = z({}), r = z({}), a = z([]), p = z(typeof window < "u" ? window.innerWidth : 1920), m = z(!0), h = ne({
|
|
1426
1477
|
name: "EcpDescriptionValueRenderer",
|
|
1427
1478
|
props: {
|
|
1428
1479
|
schema: { type: Object, required: !0 },
|
|
@@ -1430,100 +1481,100 @@ const Nt = /* @__PURE__ */ oe({
|
|
|
1430
1481
|
record: { type: Object, required: !0 },
|
|
1431
1482
|
emptyText: { type: String, default: "-" }
|
|
1432
1483
|
},
|
|
1433
|
-
setup(
|
|
1484
|
+
setup(_) {
|
|
1434
1485
|
return () => {
|
|
1435
|
-
const
|
|
1436
|
-
const
|
|
1437
|
-
return
|
|
1486
|
+
const E = _.schema, D = _.record, i = _.value, v = (A) => {
|
|
1487
|
+
const V = O(E, A === _.emptyText ? i : A, D), W = de("span", A);
|
|
1488
|
+
return V ? de("el-tooltip", { props: V }, [W]) : W;
|
|
1438
1489
|
};
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
return
|
|
1490
|
+
if (E.render) {
|
|
1491
|
+
const A = E.render(i, D);
|
|
1492
|
+
return A == null || A === "" ? v(_.emptyText) : typeof A == "string" || typeof A == "number" ? v(String(A)) : A;
|
|
1442
1493
|
}
|
|
1443
|
-
return Array.isArray(i) ?
|
|
1494
|
+
return Array.isArray(i) ? v(i.length ? i.join(", ") : _.emptyText) : i == null || i === "" ? v(_.emptyText) : v(typeof i == "object" ? JSON.stringify(i) : String(i));
|
|
1444
1495
|
};
|
|
1445
1496
|
}
|
|
1446
|
-
}),
|
|
1447
|
-
const i =
|
|
1497
|
+
}), O = (_, E, D) => {
|
|
1498
|
+
const i = _.tooltip;
|
|
1448
1499
|
if (!i)
|
|
1449
1500
|
return null;
|
|
1450
|
-
const
|
|
1451
|
-
return
|
|
1452
|
-
}, { mergeSettings:
|
|
1453
|
-
if (typeof
|
|
1454
|
-
return Math.max(1,
|
|
1455
|
-
const
|
|
1456
|
-
return
|
|
1457
|
-
},
|
|
1458
|
-
...
|
|
1459
|
-
dataIndex:
|
|
1460
|
-
}))),
|
|
1461
|
-
const
|
|
1462
|
-
let
|
|
1463
|
-
const i =
|
|
1464
|
-
return
|
|
1465
|
-
const
|
|
1466
|
-
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
}),
|
|
1470
|
-
}),
|
|
1471
|
-
var
|
|
1472
|
-
if (!
|
|
1473
|
-
return
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1476
|
-
}),
|
|
1477
|
-
var
|
|
1478
|
-
const
|
|
1479
|
-
return !!
|
|
1480
|
-
}),
|
|
1481
|
-
var
|
|
1501
|
+
const v = typeof i == "function" ? i({ value: E, record: D, schema: _ }) : i;
|
|
1502
|
+
return De(v, E);
|
|
1503
|
+
}, { mergeSettings: b } = Re(), C = y(() => b("ProDescriptions", { ...t, ...o.value })), c = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, x = (_, E) => {
|
|
1504
|
+
if (typeof _ == "number")
|
|
1505
|
+
return Math.max(1, _);
|
|
1506
|
+
const D = _ ?? {};
|
|
1507
|
+
return E >= c.xxl ? D.xxl ?? D.xl ?? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.xl ? D.xl ?? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.lg ? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.md ? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.sm ? D.sm ?? D.xs ?? 2 : D.xs ?? 1;
|
|
1508
|
+
}, B = y(() => x(C.value.column, p.value)), F = y(() => C.value.data ?? r.value ?? {}), N = y(() => (a.value.length ? a.value : C.value.schema ?? []).filter((_) => _.dataIndex || _.field ? typeof _.show == "function" ? _.show(F.value) : _.show !== !1 : !1).map((_) => ({
|
|
1509
|
+
..._,
|
|
1510
|
+
dataIndex: _.dataIndex || _.field || ""
|
|
1511
|
+
}))), P = y(() => {
|
|
1512
|
+
const _ = [];
|
|
1513
|
+
let E = { items: [] }, D = 0;
|
|
1514
|
+
const i = B.value;
|
|
1515
|
+
return N.value.forEach((v, A) => {
|
|
1516
|
+
const V = N.value.length - A, W = Math.max(1, Math.min(v.span ?? 1, i)), H = V === 1 ? i - D || i : W;
|
|
1517
|
+
D + H > i && (_.push(E), E = { items: [] }, D = 0);
|
|
1518
|
+
const ie = V === 1 && D < i ? Math.max(1, i - D) : H;
|
|
1519
|
+
E.items.push({ ...v, _span: ie }), D += ie, D >= i && (_.push(E), E = { items: [] }, D = 0);
|
|
1520
|
+
}), E.items.length > 0 && _.push(E), _;
|
|
1521
|
+
}), G = y(() => {
|
|
1522
|
+
var E;
|
|
1523
|
+
if (!I.value || m.value)
|
|
1524
|
+
return P.value;
|
|
1525
|
+
const _ = Math.max(1, ((E = C.value.collapseOptions) == null ? void 0 : E.visibleRows) ?? 1);
|
|
1526
|
+
return P.value.slice(0, _);
|
|
1527
|
+
}), I = y(() => {
|
|
1528
|
+
var E, D;
|
|
1529
|
+
const _ = Math.max(1, ((E = C.value.collapseOptions) == null ? void 0 : E.visibleRows) ?? 1);
|
|
1530
|
+
return !!C.value.useCollapse && !!((D = C.value.collapseOptions) != null && D.canExpand) && P.value.length > _;
|
|
1531
|
+
}), S = y(() => !!C.value.title || !!C.value.helpMessage || I.value), d = y(() => {
|
|
1532
|
+
var _, E;
|
|
1482
1533
|
return {
|
|
1483
|
-
expand: ((
|
|
1484
|
-
collapse: ((
|
|
1534
|
+
expand: ((_ = C.value.collapseOptions) == null ? void 0 : _.expandButtonText) ?? "展开",
|
|
1535
|
+
collapse: ((E = C.value.collapseOptions) == null ? void 0 : E.collapseButtonText) ?? "收起"
|
|
1485
1536
|
};
|
|
1486
|
-
}),
|
|
1487
|
-
gridTemplateColumns: `repeat(${
|
|
1488
|
-
})),
|
|
1489
|
-
gridColumn: `span ${
|
|
1490
|
-
}),
|
|
1491
|
-
minWidth:
|
|
1492
|
-
...
|
|
1493
|
-
}),
|
|
1494
|
-
minWidth:
|
|
1495
|
-
...
|
|
1496
|
-
}),
|
|
1497
|
-
a.value = [...
|
|
1537
|
+
}), $ = y(() => ({
|
|
1538
|
+
gridTemplateColumns: `repeat(${B.value}, minmax(0, 1fr))`
|
|
1539
|
+
})), R = (_) => ({
|
|
1540
|
+
gridColumn: `span ${_._span}`
|
|
1541
|
+
}), j = (_) => ({
|
|
1542
|
+
minWidth: _.labelMinWidth ? `${_.labelMinWidth}px` : void 0,
|
|
1543
|
+
..._.labelStyle ?? {}
|
|
1544
|
+
}), L = (_) => ({
|
|
1545
|
+
minWidth: _.contentMinWidth ? `${_.contentMinWidth}px` : void 0,
|
|
1546
|
+
..._.contentStyle ?? {}
|
|
1547
|
+
}), Z = (_) => F.value[_.dataIndex], J = () => {
|
|
1548
|
+
a.value = [...C.value.schema ?? []];
|
|
1498
1549
|
}, Y = () => {
|
|
1499
|
-
r.value = { ...
|
|
1500
|
-
},
|
|
1501
|
-
o.value = { ...o.value, ...
|
|
1502
|
-
}, ee = async (
|
|
1503
|
-
r.value = { ...r.value, ...
|
|
1504
|
-
},
|
|
1505
|
-
setProps:
|
|
1550
|
+
r.value = { ...C.value.data ?? {} };
|
|
1551
|
+
}, Q = async (_) => {
|
|
1552
|
+
o.value = { ...o.value, ..._ }, _.schema && (a.value = [..._.schema]), _.data && (r.value = { ..._.data });
|
|
1553
|
+
}, ee = async (_) => {
|
|
1554
|
+
r.value = { ...r.value, ..._ }, o.value = { ...o.value, data: r.value };
|
|
1555
|
+
}, U = () => ({ ...C.value.data ?? r.value ?? {} }), te = {
|
|
1556
|
+
setProps: Q,
|
|
1506
1557
|
setData: ee,
|
|
1507
|
-
getData:
|
|
1558
|
+
getData: U
|
|
1508
1559
|
};
|
|
1509
1560
|
e(te);
|
|
1510
|
-
const
|
|
1511
|
-
typeof window < "u" && (
|
|
1561
|
+
const oe = () => {
|
|
1562
|
+
typeof window < "u" && (p.value = window.innerWidth);
|
|
1512
1563
|
};
|
|
1513
|
-
return
|
|
1514
|
-
var
|
|
1515
|
-
|
|
1516
|
-
}),
|
|
1517
|
-
typeof window < "u" && window.removeEventListener("resize",
|
|
1518
|
-
}),
|
|
1519
|
-
var
|
|
1520
|
-
return (
|
|
1521
|
-
}, (
|
|
1522
|
-
|
|
1523
|
-
}), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth:
|
|
1564
|
+
return ve(() => {
|
|
1565
|
+
var _;
|
|
1566
|
+
J(), Y(), m.value = ((_ = C.value.collapseOptions) == null ? void 0 : _.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", oe);
|
|
1567
|
+
}), Be(() => {
|
|
1568
|
+
typeof window < "u" && window.removeEventListener("resize", oe);
|
|
1569
|
+
}), X(() => C.value.schema, J, { deep: !0 }), X(() => C.value.data, Y, { deep: !0 }), X(() => {
|
|
1570
|
+
var _;
|
|
1571
|
+
return (_ = C.value.collapseOptions) == null ? void 0 : _.defaultExpand;
|
|
1572
|
+
}, (_) => {
|
|
1573
|
+
_ !== void 0 && (m.value = _);
|
|
1574
|
+
}), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: p, expanded: m, DescriptionValueRenderer: h, normalizeTooltip: O, mergeSettings: b, effectiveProps: C, breakpoints: c, resolveColumn: x, currentColumn: B, effectiveData: F, visibleSchema: N, normalizedRows: P, renderedRows: G, showCollapseButton: I, showHeader: S, collapseButtonText: d, bodyStyle: $, getItemStyle: R, getLabelStyle: j, getContentStyle: L, getItemValue: Z, syncSchema: J, syncData: Y, setProps: Q, setData: ee, getData: U, descriptionAction: te, updateWindowWidth: oe };
|
|
1524
1575
|
}
|
|
1525
1576
|
});
|
|
1526
|
-
var
|
|
1577
|
+
var Gt = function() {
|
|
1527
1578
|
var o;
|
|
1528
1579
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
1529
1580
|
return n("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? n("div", { staticClass: "ecp-pro-descriptions__header" }, [n("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? n("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(r, a) {
|
|
@@ -1536,33 +1587,33 @@ var It = function() {
|
|
|
1536
1587
|
`is-${t.effectiveProps.size}`,
|
|
1537
1588
|
{ "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
|
|
1538
1589
|
], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(r, a) {
|
|
1539
|
-
return [e._l(r.items, function(
|
|
1540
|
-
return [n("div", { key: `${a}-${
|
|
1590
|
+
return [e._l(r.items, function(p) {
|
|
1591
|
+
return [n("div", { key: `${a}-${p.dataIndex || p.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(p) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(p) }, [e._v(" " + e._s(p.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(p) }, [e.$scopedSlots[p.slot || p.dataIndex] ? e._t(p.slot || p.dataIndex, null, { value: t.getItemValue(p), record: t.effectiveData, schema: p }) : n(t.DescriptionValueRenderer, { attrs: { schema: p, value: t.getItemValue(p), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
|
|
1541
1592
|
})];
|
|
1542
1593
|
})], 2)]);
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1594
|
+
}, Jt = [], Ut = /* @__PURE__ */ ae(
|
|
1595
|
+
Ht,
|
|
1596
|
+
Gt,
|
|
1597
|
+
Jt,
|
|
1547
1598
|
!1,
|
|
1548
1599
|
null,
|
|
1549
1600
|
"656036f6",
|
|
1550
1601
|
null,
|
|
1551
1602
|
null
|
|
1552
1603
|
);
|
|
1553
|
-
const
|
|
1554
|
-
function
|
|
1555
|
-
const e = z(null), n = () =>
|
|
1556
|
-
const a =
|
|
1604
|
+
const Ze = Ut.exports;
|
|
1605
|
+
function fn(s) {
|
|
1606
|
+
const e = z(null), n = () => s ? me(s) : void 0, t = () => {
|
|
1607
|
+
const a = me(e);
|
|
1557
1608
|
if (!a)
|
|
1558
1609
|
throw new Error("ProDescriptions instance has not been registered");
|
|
1559
1610
|
return a;
|
|
1560
1611
|
}, o = (a) => {
|
|
1561
1612
|
e.value = a;
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1613
|
+
const p = n();
|
|
1614
|
+
p && Object.keys(p).length > 0 && a.setProps(p);
|
|
1564
1615
|
};
|
|
1565
|
-
return
|
|
1616
|
+
return s && X(
|
|
1566
1617
|
() => n(),
|
|
1567
1618
|
(a) => {
|
|
1568
1619
|
a && e.value && e.value.setProps(a);
|
|
@@ -1574,7 +1625,7 @@ function on(c) {
|
|
|
1574
1625
|
getData: () => t().getData()
|
|
1575
1626
|
}];
|
|
1576
1627
|
}
|
|
1577
|
-
const
|
|
1628
|
+
const Xt = /* @__PURE__ */ ne({
|
|
1578
1629
|
__name: "CollapseContainer",
|
|
1579
1630
|
props: {
|
|
1580
1631
|
title: null,
|
|
@@ -1595,36 +1646,36 @@ const Kt = /* @__PURE__ */ oe({
|
|
|
1595
1646
|
contentStyle: { default: () => ({}) }
|
|
1596
1647
|
},
|
|
1597
1648
|
emits: ["update:expanded", "change", "collapse", "expand"],
|
|
1598
|
-
setup(
|
|
1599
|
-
const t =
|
|
1600
|
-
const
|
|
1601
|
-
return delete
|
|
1602
|
-
...
|
|
1603
|
-
class:
|
|
1604
|
-
style:
|
|
1649
|
+
setup(s, { expose: e, emit: n }) {
|
|
1650
|
+
const t = s, o = he(), { mergeSettings: r } = Re(), a = z(t.expanded ?? t.defaultExpand), p = y(() => r("CollapseContainer", { ...t })), m = y(() => p.value.canExpand ?? p.value.canExpan ?? !0), h = y(() => p.value.expanded !== void 0), O = y(() => h.value ? !!p.value.expanded : a.value), b = y(() => !!o.title || !!o.action || !!p.value.title || !!p.value.helpMessage || m.value), C = y(() => m.value), c = y(() => {
|
|
1651
|
+
const P = p.value.wrapperProps ?? {}, G = P.class, I = P.style, S = { ...P };
|
|
1652
|
+
return delete S.class, delete S.style, {
|
|
1653
|
+
...S,
|
|
1654
|
+
class: G,
|
|
1655
|
+
style: I
|
|
1605
1656
|
};
|
|
1606
1657
|
}), x = () => {
|
|
1607
|
-
!
|
|
1658
|
+
!p.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
|
|
1608
1659
|
window.dispatchEvent(new Event("resize"));
|
|
1609
1660
|
}, 220);
|
|
1610
|
-
},
|
|
1611
|
-
|
|
1612
|
-
},
|
|
1613
|
-
|
|
1614
|
-
},
|
|
1615
|
-
|
|
1661
|
+
}, B = (P) => {
|
|
1662
|
+
h.value || (a.value = P), n("update:expanded", P), n("change", P), n(P ? "expand" : "collapse"), x();
|
|
1663
|
+
}, F = () => {
|
|
1664
|
+
m.value && B(!O.value);
|
|
1665
|
+
}, N = () => {
|
|
1666
|
+
C.value && F();
|
|
1616
1667
|
};
|
|
1617
|
-
return
|
|
1618
|
-
|
|
1619
|
-
}),
|
|
1620
|
-
t.expanded === void 0 && (a.value =
|
|
1668
|
+
return X(() => t.expanded, (P) => {
|
|
1669
|
+
P !== void 0 && (a.value = P);
|
|
1670
|
+
}), X(() => t.defaultExpand, (P) => {
|
|
1671
|
+
t.expanded === void 0 && (a.value = P);
|
|
1621
1672
|
}), e({
|
|
1622
|
-
setExpanded:
|
|
1623
|
-
toggleExpand:
|
|
1624
|
-
}), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps:
|
|
1673
|
+
setExpanded: B,
|
|
1674
|
+
toggleExpand: F
|
|
1675
|
+
}), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: p, resolvedCanExpan: m, isControlled: h, mergedExpanded: O, showHeader: b, canToggleByHeader: C, wrapperProps: c, triggerWindowResize: x, setExpanded: B, toggleExpand: F, handleHeaderClick: N };
|
|
1625
1676
|
}
|
|
1626
1677
|
});
|
|
1627
|
-
var
|
|
1678
|
+
var Zt = function() {
|
|
1628
1679
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
1629
1680
|
return n("div", e._b({ directives: [{ name: "loading", rawName: "v-loading", value: t.effectiveProps.loading, expression: "effectiveProps.loading" }], staticClass: "ecp-collapse-container", class: {
|
|
1630
1681
|
"is-expanded": t.mergedExpanded,
|
|
@@ -1639,24 +1690,24 @@ var Lt = function() {
|
|
|
1639
1690
|
} } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(o) {
|
|
1640
1691
|
return o.stopPropagation(), t.toggleExpand.apply(null, arguments);
|
|
1641
1692
|
} } }, [e._v(" " + e._s(t.mergedExpanded ? t.effectiveProps.collapseButtonText : t.effectiveProps.expandButtonText) + " "), n("i", { staticClass: "el-icon-arrow-down", class: { "is-expanded": t.mergedExpanded } })]) : e._e()], 2) : e._e()]) : e._e(), n("el-collapse-transition", [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.mergedExpanded, expression: "mergedExpanded" }], staticClass: "ecp-collapse-container__body", class: t.effectiveProps.contentClass, style: t.effectiveProps.contentStyle }, [e._t("default")], 2)])], 1);
|
|
1642
|
-
},
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1693
|
+
}, Qt = [], Yt = /* @__PURE__ */ ae(
|
|
1694
|
+
Xt,
|
|
1695
|
+
Zt,
|
|
1696
|
+
Qt,
|
|
1646
1697
|
!1,
|
|
1647
1698
|
null,
|
|
1648
1699
|
"087dba3a",
|
|
1649
1700
|
null,
|
|
1650
1701
|
null
|
|
1651
1702
|
);
|
|
1652
|
-
const
|
|
1703
|
+
const Qe = Yt.exports, en = {
|
|
1653
1704
|
name: "ProTableForm",
|
|
1654
1705
|
model: {
|
|
1655
1706
|
prop: "modelValue",
|
|
1656
1707
|
event: "update:modelValue"
|
|
1657
1708
|
}
|
|
1658
|
-
},
|
|
1659
|
-
...
|
|
1709
|
+
}, tn = /* @__PURE__ */ ne({
|
|
1710
|
+
...en,
|
|
1660
1711
|
props: {
|
|
1661
1712
|
modelValue: { default: () => ({}) },
|
|
1662
1713
|
columns: null,
|
|
@@ -1678,8 +1729,8 @@ const Ge = qt.exports, Ht = {
|
|
|
1678
1729
|
actionColumn: null
|
|
1679
1730
|
},
|
|
1680
1731
|
emits: ["update:modelValue"],
|
|
1681
|
-
setup(
|
|
1682
|
-
const t =
|
|
1732
|
+
setup(s, { expose: e, emit: n }) {
|
|
1733
|
+
const t = s, o = z(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", p = y(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), m = y(() => "left"), h = y(() => {
|
|
1683
1734
|
const i = t.actionColumn;
|
|
1684
1735
|
return {
|
|
1685
1736
|
width: (i == null ? void 0 : i.width) ?? t.actionWidth,
|
|
@@ -1688,180 +1739,180 @@ const Ge = qt.exports, Ht = {
|
|
|
1688
1739
|
fixed: (i == null ? void 0 : i.fixed) === void 0 ? "right" : i.fixed
|
|
1689
1740
|
};
|
|
1690
1741
|
});
|
|
1691
|
-
function
|
|
1742
|
+
function O(i) {
|
|
1692
1743
|
return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
|
|
1693
1744
|
}
|
|
1694
|
-
const
|
|
1745
|
+
const b = y(() => {
|
|
1695
1746
|
const i = [];
|
|
1696
|
-
t.fixedRows.forEach((
|
|
1747
|
+
t.fixedRows.forEach((V) => {
|
|
1697
1748
|
i.push({
|
|
1698
1749
|
_type: "fixed",
|
|
1699
|
-
rowKey:
|
|
1700
|
-
rowLabel:
|
|
1750
|
+
rowKey: V.rowKey,
|
|
1751
|
+
rowLabel: V.label
|
|
1701
1752
|
});
|
|
1702
1753
|
});
|
|
1703
|
-
const
|
|
1704
|
-
return ((
|
|
1705
|
-
i.push({ _type: "competitor", _index:
|
|
1754
|
+
const v = t.modelValue;
|
|
1755
|
+
return ((v && typeof v == "object" ? v[r()] : void 0) ?? []).forEach((V, W) => {
|
|
1756
|
+
i.push({ _type: "competitor", _index: W });
|
|
1706
1757
|
}), i;
|
|
1707
|
-
}),
|
|
1758
|
+
}), C = y(() => {
|
|
1708
1759
|
const i = t.modelValue;
|
|
1709
1760
|
return ((i && typeof i == "object" ? i[r()] : void 0) ?? []).length > t.minCompetitors;
|
|
1710
1761
|
});
|
|
1711
|
-
function
|
|
1762
|
+
function c() {
|
|
1712
1763
|
const i = t.modelValue;
|
|
1713
1764
|
return !i || typeof i != "object" ? {} : JSON.parse(JSON.stringify(i));
|
|
1714
1765
|
}
|
|
1715
1766
|
function x(i) {
|
|
1716
|
-
const
|
|
1717
|
-
if (!
|
|
1718
|
-
const
|
|
1719
|
-
for (const
|
|
1720
|
-
|
|
1721
|
-
return
|
|
1767
|
+
const v = t.modelValue;
|
|
1768
|
+
if (!v || typeof v != "object") {
|
|
1769
|
+
const W = {};
|
|
1770
|
+
for (const H of t.columns)
|
|
1771
|
+
W[H.key] = "";
|
|
1772
|
+
return W;
|
|
1722
1773
|
}
|
|
1723
|
-
const
|
|
1724
|
-
if (
|
|
1725
|
-
return
|
|
1726
|
-
const
|
|
1727
|
-
for (const
|
|
1728
|
-
|
|
1729
|
-
return
|
|
1774
|
+
const A = v[i];
|
|
1775
|
+
if (A && typeof A == "object" && !Array.isArray(A))
|
|
1776
|
+
return A;
|
|
1777
|
+
const V = {};
|
|
1778
|
+
for (const W of t.columns)
|
|
1779
|
+
V[W.key] = "";
|
|
1780
|
+
return V;
|
|
1730
1781
|
}
|
|
1731
|
-
function
|
|
1782
|
+
function B(i) {
|
|
1732
1783
|
n("update:modelValue", i);
|
|
1733
1784
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return x(i)[
|
|
1785
|
+
function F(i, v) {
|
|
1786
|
+
return x(i)[v] ?? "";
|
|
1736
1787
|
}
|
|
1737
|
-
function
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1788
|
+
function N(i, v, A) {
|
|
1789
|
+
const V = c(), W = { ...V[i] || {} };
|
|
1790
|
+
W[v] = A, V[i] = W, B(V);
|
|
1740
1791
|
}
|
|
1741
|
-
function
|
|
1792
|
+
function P() {
|
|
1742
1793
|
const i = t.modelValue;
|
|
1743
1794
|
if (!i || typeof i != "object")
|
|
1744
1795
|
return [];
|
|
1745
|
-
const
|
|
1746
|
-
return Array.isArray(
|
|
1796
|
+
const v = i[r()];
|
|
1797
|
+
return Array.isArray(v) ? v : [];
|
|
1747
1798
|
}
|
|
1748
|
-
function
|
|
1749
|
-
const
|
|
1750
|
-
return
|
|
1799
|
+
function G(i) {
|
|
1800
|
+
const v = P()[i], A = a();
|
|
1801
|
+
return v ? String(v[A] ?? "") : "";
|
|
1751
1802
|
}
|
|
1752
|
-
function
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1803
|
+
function I(i, v) {
|
|
1804
|
+
const A = c(), V = [...P()], W = { ...V[i] || {} };
|
|
1805
|
+
W[a()] = v, V[i] = W, A[r()] = V, B(A);
|
|
1755
1806
|
}
|
|
1756
|
-
function
|
|
1757
|
-
const
|
|
1758
|
-
return
|
|
1807
|
+
function S(i, v) {
|
|
1808
|
+
const A = P()[i];
|
|
1809
|
+
return A ? A[v] ?? "" : "";
|
|
1759
1810
|
}
|
|
1760
|
-
function
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1811
|
+
function d(i, v, A) {
|
|
1812
|
+
const V = c(), W = [...P()], H = { ...W[i] || {} };
|
|
1813
|
+
H[v] = A, W[i] = H, V[r()] = W, B(V);
|
|
1763
1814
|
}
|
|
1764
|
-
function
|
|
1765
|
-
return i._type === "fixed" ?
|
|
1815
|
+
function $(i, v) {
|
|
1816
|
+
return i._type === "fixed" ? F(i.rowKey, v.key) : S(i._index, v.key);
|
|
1766
1817
|
}
|
|
1767
|
-
function
|
|
1768
|
-
i._type === "fixed" ?
|
|
1818
|
+
function R(i, v, A) {
|
|
1819
|
+
i._type === "fixed" ? N(i.rowKey, v.key, A) : d(i._index, v.key, A);
|
|
1769
1820
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return (
|
|
1821
|
+
function j(i, v) {
|
|
1822
|
+
return (A) => R(i.row, v, A);
|
|
1772
1823
|
}
|
|
1773
|
-
function
|
|
1824
|
+
function L() {
|
|
1774
1825
|
const i = { [a()]: "" };
|
|
1775
|
-
for (const
|
|
1776
|
-
i[
|
|
1826
|
+
for (const v of t.columns)
|
|
1827
|
+
i[v.key] = "";
|
|
1777
1828
|
return i;
|
|
1778
1829
|
}
|
|
1779
|
-
function
|
|
1780
|
-
const i =
|
|
1781
|
-
|
|
1830
|
+
function Z() {
|
|
1831
|
+
const i = c(), v = [...P()];
|
|
1832
|
+
v.push(L()), i[r()] = v, B(i);
|
|
1782
1833
|
}
|
|
1783
|
-
function
|
|
1784
|
-
if (!
|
|
1834
|
+
function J(i) {
|
|
1835
|
+
if (!C.value)
|
|
1785
1836
|
return;
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1837
|
+
const v = c(), A = [...P()];
|
|
1838
|
+
A.splice(i, 1), v[r()] = A, B(v);
|
|
1788
1839
|
}
|
|
1789
|
-
function Y(i,
|
|
1790
|
-
return `${i}.${
|
|
1840
|
+
function Y(i, v) {
|
|
1841
|
+
return `${i}.${v}`;
|
|
1791
1842
|
}
|
|
1792
|
-
function
|
|
1843
|
+
function Q(i) {
|
|
1793
1844
|
return `${r()}.${i}.${a()}`;
|
|
1794
1845
|
}
|
|
1795
|
-
function ee(i,
|
|
1796
|
-
return `${r()}.${i}.${
|
|
1846
|
+
function ee(i, v) {
|
|
1847
|
+
return `${r()}.${i}.${v}`;
|
|
1797
1848
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return i.component === "formatted-number" ?
|
|
1849
|
+
function U(i) {
|
|
1850
|
+
return i.component === "formatted-number" ? Me : "el-input";
|
|
1800
1851
|
}
|
|
1801
1852
|
function te(i) {
|
|
1802
|
-
const
|
|
1853
|
+
const v = i.componentProps || {};
|
|
1803
1854
|
return i.component === "formatted-number" ? {
|
|
1804
1855
|
integerDigits: 5,
|
|
1805
1856
|
decimalPlaces: 6,
|
|
1806
1857
|
rounding: "round",
|
|
1807
1858
|
inputLimit: !0,
|
|
1808
|
-
...
|
|
1809
|
-
} : { ...
|
|
1859
|
+
...v
|
|
1860
|
+
} : { ...v };
|
|
1810
1861
|
}
|
|
1811
|
-
function
|
|
1812
|
-
const
|
|
1813
|
-
if (
|
|
1862
|
+
function oe(i) {
|
|
1863
|
+
const v = i.row;
|
|
1864
|
+
if (v._type === "fixed")
|
|
1814
1865
|
return {
|
|
1815
|
-
row:
|
|
1866
|
+
row: v,
|
|
1816
1867
|
rowType: "fixed",
|
|
1817
|
-
rowKey:
|
|
1818
|
-
rowLabel:
|
|
1868
|
+
rowKey: v.rowKey,
|
|
1869
|
+
rowLabel: v.rowLabel
|
|
1819
1870
|
};
|
|
1820
|
-
const
|
|
1871
|
+
const A = v._index;
|
|
1821
1872
|
return {
|
|
1822
|
-
row:
|
|
1873
|
+
row: v,
|
|
1823
1874
|
rowType: "competitor",
|
|
1824
|
-
rowIndex:
|
|
1825
|
-
value:
|
|
1826
|
-
updateValue: (
|
|
1875
|
+
rowIndex: A,
|
|
1876
|
+
value: G(A),
|
|
1877
|
+
updateValue: (V) => I(A, V)
|
|
1827
1878
|
};
|
|
1828
1879
|
}
|
|
1829
|
-
const
|
|
1830
|
-
const i = {},
|
|
1831
|
-
for (const
|
|
1832
|
-
for (const
|
|
1833
|
-
|
|
1834
|
-
return
|
|
1835
|
-
i[`${r()}.${
|
|
1836
|
-
for (const
|
|
1837
|
-
|
|
1880
|
+
const _ = y(() => {
|
|
1881
|
+
const i = {}, v = (V) => [{ required: !0, message: `请输入${V}`, trigger: "blur" }];
|
|
1882
|
+
for (const V of t.fixedRows)
|
|
1883
|
+
for (const W of t.columns)
|
|
1884
|
+
W.rules ? i[`${V.rowKey}.${W.key}`] = W.rules : W.required && (i[`${V.rowKey}.${W.key}`] = v(W.title));
|
|
1885
|
+
return P().forEach((V, W) => {
|
|
1886
|
+
i[`${r()}.${W}.${a()}`] = v("友商名称");
|
|
1887
|
+
for (const H of t.columns)
|
|
1888
|
+
H.rules ? i[`${r()}.${W}.${H.key}`] = H.rules : H.required && (i[`${r()}.${W}.${H.key}`] = v(H.title));
|
|
1838
1889
|
}), { ...i, ...t.rules || {} };
|
|
1839
1890
|
});
|
|
1840
|
-
function
|
|
1891
|
+
function E() {
|
|
1841
1892
|
return new Promise((i) => {
|
|
1842
|
-
const
|
|
1843
|
-
if (!
|
|
1893
|
+
const v = o.value;
|
|
1894
|
+
if (!v || typeof v.validate != "function") {
|
|
1844
1895
|
i(!0);
|
|
1845
1896
|
return;
|
|
1846
1897
|
}
|
|
1847
|
-
|
|
1848
|
-
i(
|
|
1898
|
+
v.validate((A) => {
|
|
1899
|
+
i(A);
|
|
1849
1900
|
});
|
|
1850
1901
|
});
|
|
1851
1902
|
}
|
|
1852
|
-
function
|
|
1853
|
-
var
|
|
1854
|
-
(
|
|
1903
|
+
function D(i) {
|
|
1904
|
+
var v, A;
|
|
1905
|
+
(A = (v = o.value) == null ? void 0 : v.clearValidate) == null || A.call(v, i);
|
|
1855
1906
|
}
|
|
1856
1907
|
return e({
|
|
1857
|
-
validate:
|
|
1858
|
-
clearValidate:
|
|
1859
|
-
addCompetitor:
|
|
1860
|
-
removeCompetitor:
|
|
1861
|
-
}), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed:
|
|
1908
|
+
validate: E,
|
|
1909
|
+
clearValidate: D,
|
|
1910
|
+
addCompetitor: Z,
|
|
1911
|
+
removeCompetitor: J
|
|
1912
|
+
}), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: p, firstColumnFixed: m, actionColumnBind: h, rowKeyFn: O, tableRows: b, canDeleteCompetitor: C, cloneModel: c, ensureFixedBlock: x, emitNext: B, getFixedMetric: F, setFixedMetric: N, competitorList: P, getCompetitorName: G, setCompetitorName: I, getCompetitorMetric: S, setCompetitorMetric: d, getCellValue: $, setCellValue: R, slotUpdateHandler: j, emptyCompetitorRow: L, addCompetitor: Z, removeCompetitor: J, fixedMetricProp: Y, competitorNameProp: Q, competitorMetricProp: ee, cellComponent: U, cellBind: te, firstColumnScope: oe, mergedRules: _, validate: E, clearValidate: D };
|
|
1862
1913
|
}
|
|
1863
1914
|
});
|
|
1864
|
-
var
|
|
1915
|
+
var nn = function() {
|
|
1865
1916
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
1866
1917
|
return n("div", { staticClass: "ecp-pro-table-form" }, [n("el-form", { ref: "formRef", staticClass: "ecp-pro-table-form__form", attrs: { model: e.modelValue, rules: t.mergedRules, "label-width": e.labelWidth } }, [n("el-table", { staticClass: "ecp-pro-table-form__table", attrs: { data: t.tableRows, border: e.bordered, "row-key": t.rowKeyFn, "header-cell-class-name": "ecp-pro-table-form__header-cell" } }, [t.showFirstColumnComputed ? n("el-table-column", { attrs: { "min-width": e.firstColMinWidth, fixed: t.firstColumnFixed }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
1867
1918
|
return [e._t("firstColumnHeader", function() {
|
|
@@ -1897,66 +1948,66 @@ var Ut = function() {
|
|
|
1897
1948
|
} } }, [e._v(" 删除 ")]) : n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: "" } }, [e._v(" 删除 ")])];
|
|
1898
1949
|
}, { row: o.row, canDelete: t.canDeleteCompetitor, addCompetitor: t.addCompetitor, removeCompetitor: t.removeCompetitor })];
|
|
1899
1950
|
} }], null, !0) }, "el-table-column", t.actionColumnBind, !1)) : e._e()], 2)], 1)], 1);
|
|
1900
|
-
},
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1951
|
+
}, on = [], ln = /* @__PURE__ */ ae(
|
|
1952
|
+
tn,
|
|
1953
|
+
nn,
|
|
1954
|
+
on,
|
|
1904
1955
|
!1,
|
|
1905
1956
|
null,
|
|
1906
1957
|
"44aa7592",
|
|
1907
1958
|
null,
|
|
1908
1959
|
null
|
|
1909
1960
|
);
|
|
1910
|
-
const
|
|
1911
|
-
{ name: "ProTable", component:
|
|
1912
|
-
{ name: "TableAction", component:
|
|
1913
|
-
{ name: "ProForm", component:
|
|
1914
|
-
{ name: "ProFormItem", component:
|
|
1915
|
-
{ name: "FormActions", component:
|
|
1916
|
-
{ name: "FormattedNumberInput", component:
|
|
1917
|
-
{ name: "ProDescriptions", component:
|
|
1918
|
-
{ name: "CollapseContainer", component:
|
|
1919
|
-
{ name: "ProTableForm", component:
|
|
1961
|
+
const Ye = ln.exports, an = [
|
|
1962
|
+
{ name: "ProTable", component: He },
|
|
1963
|
+
{ name: "TableAction", component: Ge },
|
|
1964
|
+
{ name: "ProForm", component: Xe },
|
|
1965
|
+
{ name: "ProFormItem", component: Je },
|
|
1966
|
+
{ name: "FormActions", component: Ue },
|
|
1967
|
+
{ name: "FormattedNumberInput", component: Me },
|
|
1968
|
+
{ name: "ProDescriptions", component: Ze },
|
|
1969
|
+
{ name: "CollapseContainer", component: Qe },
|
|
1970
|
+
{ name: "ProTableForm", component: Ye }
|
|
1920
1971
|
];
|
|
1921
|
-
function
|
|
1922
|
-
|
|
1923
|
-
|
|
1972
|
+
function sn(s) {
|
|
1973
|
+
an.forEach(({ name: e, component: n }) => {
|
|
1974
|
+
s.component(e, n);
|
|
1924
1975
|
});
|
|
1925
1976
|
}
|
|
1926
|
-
const
|
|
1927
|
-
install:
|
|
1928
|
-
ProTable:
|
|
1929
|
-
ProForm:
|
|
1930
|
-
ProDescriptions:
|
|
1931
|
-
CollapseContainer:
|
|
1932
|
-
TableAction:
|
|
1933
|
-
FormattedNumberInput:
|
|
1934
|
-
ProTableForm:
|
|
1977
|
+
const pn = {
|
|
1978
|
+
install: sn,
|
|
1979
|
+
ProTable: He,
|
|
1980
|
+
ProForm: Xe,
|
|
1981
|
+
ProDescriptions: Ze,
|
|
1982
|
+
CollapseContainer: Qe,
|
|
1983
|
+
TableAction: Ge,
|
|
1984
|
+
FormattedNumberInput: Me,
|
|
1985
|
+
ProTableForm: Ye
|
|
1935
1986
|
};
|
|
1936
1987
|
export {
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1988
|
+
Qe as CollapseContainer,
|
|
1989
|
+
Ue as FormActions,
|
|
1990
|
+
Me as FormattedNumberInput,
|
|
1991
|
+
Ze as ProDescriptions,
|
|
1992
|
+
Xe as ProForm,
|
|
1993
|
+
Je as ProFormItem,
|
|
1994
|
+
He as ProTable,
|
|
1995
|
+
Ye as ProTableForm,
|
|
1996
|
+
Ge as TableAction,
|
|
1997
|
+
yt as applyNumericInputDigitLimits,
|
|
1998
|
+
We as clampByIntegerDigits,
|
|
1999
|
+
pn as default,
|
|
2000
|
+
Ke as formatWithThousands,
|
|
2001
|
+
sn as install,
|
|
2002
|
+
ke as normalizeNumericValue,
|
|
2003
|
+
Pt as numberToEditString,
|
|
2004
|
+
Ct as roundToDecimals,
|
|
2005
|
+
Ve as sanitizeNumericInput,
|
|
1955
2006
|
Ae as stripNumberGrouping,
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
2007
|
+
xt as toFixedDecimalString,
|
|
2008
|
+
Re as useComponentSetting,
|
|
2009
|
+
fn as useDescription,
|
|
2010
|
+
dn as useForm,
|
|
2011
|
+
un as useProTable
|
|
1961
2012
|
};
|
|
1962
2013
|
//# sourceMappingURL=element-component-pro.es.js.map
|