@aspire-ui/element-component-pro 1.0.19 → 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.
@@ -1,39 +1,146 @@
1
- import { reactive as Ze, defineComponent as oe, h as ue, useSlots as Fe, ref as z, computed as C, onMounted as me, nextTick as Ke, onUnmounted as ke, watch as U, unref as pe } from "vue";
2
- import { MessageBox as Qe } from "element-ui";
3
- const fe = Ze({});
4
- function $e(c, e) {
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 c;
6
+ return s;
7
7
  for (const n in e)
8
8
  if (Object.prototype.hasOwnProperty.call(e, n)) {
9
- const t = c[n], o = e[n];
10
- Ee(o) ? Ee(t) ? c[n] = $e(
9
+ const t = s[n], o = e[n];
10
+ Oe(o) ? Oe(t) ? s[n] = Te(
11
11
  t,
12
12
  o
13
- ) : c[n] = { ...o } : c[n] = o;
13
+ ) : s[n] = { ...o } : s[n] = o;
14
14
  }
15
- return c;
15
+ return s;
16
16
  }
17
- function Ee(c) {
18
- if (!c || typeof c != "object")
17
+ function Oe(s) {
18
+ if (!s || typeof s != "object")
19
19
  return !1;
20
- const e = Object.getPrototypeOf(c);
20
+ const e = Object.getPrototypeOf(s);
21
21
  return e === Object.prototype || e === null;
22
22
  }
23
- function Be() {
23
+ function Re() {
24
24
  return {
25
- getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? fe : fe[t] ?? {})),
25
+ getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? pe : pe[t] ?? {})),
26
26
  setSetting: (t, o) => {
27
- const r = fe[t];
28
- r ? fe[t] = $e({ ...r }, o) : fe[t] = { ...o };
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 = fe[t] ?? {};
32
- return $e({ ...r }, o);
31
+ const r = pe[t] ?? {};
32
+ return Te({ ...r }, o);
33
33
  }
34
34
  };
35
35
  }
36
- const Ye = /* @__PURE__ */ oe({
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(c, { expose: e, emit: n }) {
81
- const t = c, o = oe({
82
- name: "EcpProTableDefaultCellRenderer",
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
- }), A = z({
194
+ }), P = z({
131
195
  page: 1,
132
- pageSize: q.value.pageSize,
133
- pageSizes: q.value.pageSizes,
196
+ pageSize: N.value.pageSize,
197
+ pageSizes: N.value.pageSizes,
134
198
  total: 0
135
- }), F = C(() => !!y.value.title || !!a.tableTitle || !!a.toolbar), f = C(() => V.value !== null ? V.value : !!t.pagination && typeof t.pagination == "object"), K = C(() => y.value.pagination && typeof y.value.pagination == "object" ? !!y.value.pagination.small : !1), M = C(() => y.value.pagination && typeof y.value.pagination == "object" ? !!y.value.pagination.background : !1), D = C(() => y.value.rowKey || "id"), j = C(() => new Set(g.value.map((l) => l[D.value]))), G = C(
136
- () => p.value.filter((l) => !l.hideInTable && !l.defaultHidden)
137
- ), H = C(() => {
138
- var s, _;
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 y.value.rowSelection && (l += Number(y.value.rowSelection.width) || 48), y.value.showIndexColumn && (l += Number((s = y.value.indexColumnProps) == null ? void 0 : s.width) || 60), y.value.actionColumn && (l += Number((_ = y.value.actionColumn) == null ? void 0 : _.width) || 150), l;
141
- }), Y = (l) => typeof l == "number" && l > 0, X = C(() => G.value.filter((s) => ne(s) && Y(s.width)).reduce((s, _) => s + (typeof _.width == "number" ? _.width : 0), 0)), ee = C(() => G.value.filter((s) => ne(s) && typeof s.width == "string").reduce((s, _) => s + (Number(te(_)) || 80), 0)), J = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, te = (l) => {
142
- const s = l.width;
143
- if (Y(s) && X.value > 0 && P.value > 0 && typeof s == "number") {
144
- const _ = P.value - H.value - ee.value;
145
- let k = Math.floor(_ * s / X.value);
146
- const W = J(l.minWidth) ?? 60, I = J(l.maxWidth);
147
- return k = Math.max(W, k), I != null && (k = Math.min(I, k)), k;
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 s == "string") {
150
- const _ = J(s) ?? 80, k = J(l.minWidth), W = J(l.maxWidth);
151
- let I = _;
152
- return k != null && (I = Math.max(k, I)), W != null && (I = Math.min(W, I)), I;
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.width;
155
- }, ne = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, b = C(() => {
156
- var s;
157
- const l = (s = y.value.rowSelection) == null ? void 0 : s.getCheckboxProps;
158
- return l ? m.value.filter((_) => {
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(_)) != null && k.disabled);
161
- }) : m.value;
162
- }), N = C(() => b.value.length > 0), T = C(() => b.value.length === 0 ? !1 : b.value.every((l) => j.value.has(l[D.value]))), i = C(() => {
163
- const l = b.value.filter((s) => j.value.has(s[D.value])).length;
164
- return l > 0 && l < b.value.length;
165
- }), h = (l) => j.value.has(l[D.value]), R = (l) => {
166
- var s, _, k;
167
- return ((k = (_ = (s = y.value.rowSelection) == null ? void 0 : s.getCheckboxProps) == null ? void 0 : _.call(s, l)) == null ? void 0 : k.disabled) ?? !1;
168
- }, L = (l) => {
169
- var s, _, k;
170
- return ((k = (_ = (s = y.value.rowSelection) == null ? void 0 : s.getRadioProps) == null ? void 0 : _.call(s, l)) == null ? void 0 : k.disabled) ?? !1;
171
- }, E = () => {
172
- const l = g.value.map((s) => s[D.value]);
173
- n("selection-change", { keys: l, rows: g.value });
174
- }, Z = (l, s) => {
175
- const _ = l[D.value];
176
- s ? g.value = [...g.value.filter((k) => k[D.value] !== _), l] : g.value = g.value.filter((k) => k[D.value] !== _), E();
177
- }, re = (l) => {
178
- g.value = [l], E();
179
- }, he = (l) => {
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 s = new Set(g.value.map((k) => k[D.value])), _ = b.value.filter((k) => !s.has(k[D.value]));
182
- g.value = [...g.value, ..._];
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 s = new Set(m.value.map((_) => _[D.value]));
185
- g.value = g.value.filter((_) => !s.has(_[D.value]));
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
- E();
265
+ H();
188
266
  }, se = async (l) => {
189
267
  if (!t.api) {
190
268
  if (t.dataSource)
191
269
  return;
192
- m.value = [];
270
+ h.value = [];
193
271
  return;
194
272
  }
195
- $.value = !0;
273
+ m.value = !0;
196
274
  try {
197
- const s = y.value.fetchSetting ?? {}, _ = s.pageField ?? "page", k = s.sizeField ?? "pageSize", W = s.listField ?? "list", I = s.totalField ?? "total", Q = {
198
- [_]: (l == null ? void 0 : l.page) ?? A.value.page,
199
- [k]: (l == null ? void 0 : l.pageSize) ?? A.value.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 && (A.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (A.value.pageSize = l.pageSize);
204
- const le = t.beforeFetch ? t.beforeFetch(Q) : Q, Me = await t.api(le);
205
- S.value = Me || {};
206
- const Pe = t.afterFetch ? t.afterFetch(Me) : Me, De = Pe[W] ?? Pe.items ?? Pe.list ?? [], ze = Pe[I] ?? 0;
207
- m.value = De, A.value.total = ze, n("fetch-success", { items: De, total: ze });
208
- } catch (s) {
209
- n("fetch-error", s);
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
- $.value = !1;
289
+ m.value = !1;
212
290
  }
213
- }, _e = () => se(void 0), ge = (l) => {
214
- y.value.clearSelectOnPageChange && (g.value = []), A.value.pageSize = l, A.value.page = 1, se(void 0);
215
- }, be = (l) => {
216
- y.value.clearSelectOnPageChange && (g.value = []), A.value.page = l, se(void 0);
217
- }, ye = (l, s, _) => n("row-click", l, _), we = (l, s, _) => n("row-dblclick", l, _), Ce = ({ prop: l, order: s }) => n("sort-change", { prop: l, order: s }), xe = (l, s) => n("expand-change", l, s), ve = (l) => m.value.findIndex((s) => s[D.value] === l), ie = {
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
- x.value = { ...x.value, ...l };
297
+ C.value = { ...C.value, ...l };
220
298
  },
221
299
  reload: (l) => se(l),
222
300
  redoHeight: () => {
223
- var l, s;
224
- (s = (l = v.value) == null ? void 0 : l.doLayout) == null || s.call(l);
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
- $.value = l;
305
+ m.value = l;
228
306
  },
229
- getDataSource: () => m.value,
230
- getRawDataSource: () => S.value,
307
+ getDataSource: () => h.value,
308
+ getRawDataSource: () => O.value,
231
309
  setTableData: (l) => {
232
- m.value = l ?? [];
310
+ h.value = l ?? [];
233
311
  },
234
- getColumns: () => p.value,
312
+ getColumns: () => b.value,
235
313
  setColumns: (l) => {
236
314
  if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
237
- const s = l, _ = (t.columns ?? []).filter((W) => s.includes(W.key ?? W.dataIndex)), k = s.map((W) => _.find((I) => (I.key ?? I.dataIndex) === W)).filter(Boolean);
238
- k.length && (p.value = k);
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
- p.value = l ?? [];
318
+ b.value = l ?? [];
241
319
  },
242
320
  setPagination: (l) => {
243
- l != null && l.page && (A.value.page = l.page), l != null && l.pageSize && (A.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (A.value.total = l.total);
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: () => g.value.map((l) => l[D.value]),
246
- getSelectRows: () => g.value,
323
+ getSelectRowKeys: () => c.value.map((l) => l[$.value]),
324
+ getSelectRows: () => c.value,
247
325
  clearSelectedRowKeys: () => {
248
- g.value = [], E();
326
+ c.value = [], H();
249
327
  },
250
328
  setSelectedRowKeys: (l) => {
251
- const s = new Set(l), _ = m.value.filter((k) => s.has(k[D.value]));
329
+ const u = new Set(l), g = h.value.filter((k) => u.has(k[$.value]));
252
330
  l.forEach((k) => {
253
- _.some((W) => W[D.value] === k) || _.push({ [D.value]: k });
254
- }), g.value = _, E();
331
+ g.some((q) => q[$.value] === k) || g.push({ [$.value]: k });
332
+ }), c.value = g, H();
255
333
  },
256
334
  deleteSelectRowByKey: (l) => {
257
- g.value = g.value.filter((s) => s[D.value] !== l), E();
335
+ c.value = c.value.filter((u) => u[$.value] !== l), H();
258
336
  },
259
- updateTableData: (l, s, _) => {
260
- l < 0 || l >= m.value.length || (m.value = [...m.value], m.value[l] = { ...m.value[l], [s]: _ });
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, s) => {
263
- const _ = ve(l);
264
- if (!(_ < 0))
265
- return m.value = [...m.value], m.value[_] = { ...m.value[_], ...s }, m.value[_];
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 s = Array.isArray(l) ? l : [l], _ = new Set(s);
269
- m.value = m.value.filter((k) => !_.has(k[D.value]));
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, s) => {
272
- const _ = [...m.value];
273
- return s == null || s >= _.length ? _.push(l) : _.splice(s, 0, l), m.value = _, l;
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: () => f.value ? { page: A.value.page, pageSize: Number(A.value.pageSize) || 10, total: A.value.total } : !1,
276
- getShowPagination: () => f.value,
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
- V.value = l;
356
+ x.value = l;
279
357
  },
280
- getRowSelection: () => y.value.rowSelection,
358
+ getRowSelection: () => F.value.rowSelection,
281
359
  expandAll: () => {
282
360
  var k;
283
- const l = ((k = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
284
- const I = [];
285
- return W.forEach((Q) => {
286
- I.push(Q);
287
- const le = Q[l];
288
- Array.isArray(le) && le.length > 0 && I.push(...s(le));
289
- }), I;
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
- s(m.value).forEach((W) => {
292
- var I, Q;
293
- return (Q = (I = v.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Q.call(I, W, !0);
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 = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
299
- const I = [];
300
- return W.forEach((Q) => {
301
- I.push(Q);
302
- const le = Q[l];
303
- Array.isArray(le) && le.length > 0 && I.push(...s(le));
304
- }), I;
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
- s(m.value).forEach((W) => {
307
- var I, Q;
308
- return (Q = (I = v.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Q.call(I, W, !1);
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(ie);
313
- const ce = () => {
314
- p.value = [...t.columns ?? []];
315
- }, de = () => {
316
- t.api && y.value.immediate !== !1 ? se(void 0) : t.dataSource && (m.value = [...t.dataSource], !t.api && t.pagination !== !1 && (A.value.total = t.dataSource.length));
317
- }, d = () => {
318
- u.value && (P.value = u.value.offsetWidth || 0);
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 w = null, B = null;
321
- return me(() => {
322
- ce(), n("register", ie), de(), typeof window < "u" && (window.addEventListener("resize", d), w = new ResizeObserver(d), Ke(() => {
323
- d(), B = u.value, B && (w == null || w.observe(B));
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
- }), ke(() => {
326
- typeof window < "u" && (window.removeEventListener("resize", d), w && B && (w.unobserve(B), B = null));
327
- }), U(() => t.columns, ce, { deep: !0 }), U(() => t.dataSource, () => {
328
- !t.api && t.dataSource && (m.value = [...t.dataSource]);
329
- }, { deep: !0 }), U(() => t.loading, (l) => {
330
- $.value = l ?? !1;
331
- }), { __sfc: !0, DefaultCellRenderer: o, BodyCellRenderer: r, props: t, emit: n, slots: a, tableRef: v, tableWrapRef: u, containerWidth: P, loading: $, innerData: m, rawDataSource: S, innerColumns: p, innerProps: x, selectedRows: g, showPaginationRef: V, mergeSettings: O, effectiveProps: y, defaultPagination: q, pagination: A, showTitleBar: F, showPagination: f, paginationSmall: K, paginationBackground: M, rowKeyField: D, selectedKeysSet: j, displayColumns: G, fixedColumnsWidth: H, isRatioWidth: Y, totalRatio: X, fixedDataColumnsWidth: ee, parseWidthPx: J, getColumnWidth: te, shouldShowColumn: ne, selectableRows: b, hasSelectableRows: N, isAllCurrentPageSelected: T, isIndeterminate: i, isRowSelected: h, getCheckboxDisabled: R, getRadioDisabled: L, emitSelectionChange: E, handleCheckboxChange: Z, handleRadioSelect: re, handleSelectAll: he, fetchData: se, handleReload: _e, handleSizeChange: ge, handleCurrentChange: be, handleRowClick: ye, handleRowDblclick: we, handleSortChange: Ce, handleExpandChange: xe, findRowIndex: ve, tableAction: ie, syncColumns: ce, loadData: de, updateContainerWidth: d, resizeObserver: w, observedEl: B };
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
- function ae(c, e, n, t, o, r, a, v) {
335
- var u = typeof c == "function" ? c.options : c;
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(u, P) {
367
- return n("div", { key: P }, [e._v(e._s(u))]);
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 u;
370
- return [((u = t.effectiveProps.tableSetting) == null ? void 0 : u.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
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.effectiveProps.spanMethod, "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(u) {
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(u) {
374
- var P;
375
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(u.row), disabled: t.getCheckboxDisabled(u.row) }, on: { change: ($) => t.handleCheckboxChange(u.row, $) }, nativeOn: { click: function($) {
376
- $.stopPropagation();
377
- } } }) : n("el-radio", { attrs: { value: (P = t.selectedRows[0]) == null ? void 0 : P[t.rowKeyField], label: u.row[t.rowKeyField], disabled: t.getRadioDisabled(u.row) }, on: { change: function($) {
378
- return t.handleRadioSelect(u.row);
379
- } }, nativeOn: { click: function($) {
380
- $.stopPropagation();
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: ((v = t.effectiveProps.indexColumnProps) == null ? void 0 : v.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(u) {
383
- return [t.shouldShowColumn(u) ? n("el-table-column", { key: u.dataIndex || u.key || u.title, attrs: { prop: u.dataIndex, label: u.title, width: t.getColumnWidth(u), "min-width": t.isRatioWidth(u.width) ? void 0 : u.minWidth, fixed: u.fixed, align: u.align || "left", sortable: u.sortable, formatter: u.formatter, "show-overflow-tooltip": u.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(P) {
384
- return [u.dataIndex && e.$scopedSlots[`header-${u.dataIndex}`] ? e._t(`header-${u.dataIndex}`, null, { column: u }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: u }) : [n("span", [e._v(e._s(u.title))]), u.helpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(u.helpMessage) ? n("span", e._l(u.helpMessage, function($, m) {
385
- return n("div", { key: m }, [e._v(e._s($))]);
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
- }, tt = [], nt = /* @__PURE__ */ ae(
394
- Ye,
395
- et,
396
- tt,
444
+ }, ct = [], ut = /* @__PURE__ */ ae(
445
+ rt,
446
+ it,
447
+ ct,
397
448
  !1,
398
449
  null,
399
- "f3d27813",
450
+ "ce606251",
400
451
  null,
401
452
  null
402
453
  );
403
- const Le = nt.exports, Oe = (c) => Array.isArray(c) ? c.length > 0 : c != null && String(c).trim() !== "", Ne = (c) => Array.isArray(c) ? c.map((e) => String(e)).join(", ") : c == null ? "" : typeof c == "object" ? JSON.stringify(c) : String(c), Te = (c, e) => {
404
- if (!c)
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 (c === !0)
457
+ if (s === !0)
407
458
  return {
408
- content: Ne(e),
459
+ content: Ie(e),
409
460
  placement: "top",
410
461
  effect: "dark",
411
- disabled: !Oe(e)
462
+ disabled: !Ne(e)
412
463
  };
413
- if (typeof c == "string")
464
+ if (typeof s == "string")
414
465
  return {
415
- content: c,
466
+ content: s,
416
467
  placement: "top",
417
468
  effect: "dark"
418
469
  };
419
- const n = { ...c };
420
- return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ne(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 = !Oe(n.content)), n;
421
- }, ot = /* @__PURE__ */ oe({
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(c) {
429
- const e = c, n = (p) => Te(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", o = (p) => p.filter((x) => {
430
- const { ifShow: g } = x;
431
- return typeof g == "boolean" ? g : typeof g == "function" ? g(x) : !0;
432
- }), r = C(() => o(e.actions || [])), a = C(() => o(e.dropDownActions || [])), v = (p, x) => {
433
- var g;
434
- e.stopButtonPropagation && x.stopPropagation(), (g = p.onClick) == null || g.call(p, x);
435
- }, u = (p, x) => {
436
- v(p, x);
437
- }, P = (p, x, g) => {
438
- var V, O, y, q;
439
- e.stopButtonPropagation && g.stopPropagation(), p.popConfirm && (x === "confirm" ? (O = (V = p.popConfirm).confirm) == null || O.call(V) : (q = (y = p.popConfirm).cancel) == null || q.call(y));
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: v, handleActionClick: u, handlePopConfirm: P, handlePopConfirmConfirm: (p, x) => {
442
- P(p, "confirm", x);
443
- }, handlePopConfirmCancel: (p, x) => {
444
- P(p, "cancel", x);
445
- }, handleDropdownCommand: (p) => {
446
- var V;
447
- const x = Number(p), g = a.value[x];
448
- if (!(!g || g.disabled)) {
449
- if (g.popConfirm) {
450
- const O = g.popConfirm.title, y = g.popConfirm.okText || "确定", q = g.popConfirm.cancelText || "取消";
451
- Qe.confirm(O, "提示", {
452
- confirmButtonText: y,
453
- cancelButtonText: q,
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 A, F;
457
- return (F = (A = g.popConfirm) == null ? void 0 : A.confirm) == null ? void 0 : F.call(A);
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 A, F;
460
- return (F = (A = g.popConfirm) == null ? void 0 : A.cancel) == null ? void 0 : F.call(A);
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
- (V = g.onClick) == null || V.call(g, {});
515
+ (F = B.onClick) == null || F.call(B, {});
465
516
  }
466
517
  } };
467
518
  }
468
519
  });
469
- var lt = function() {
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
- }, at = [], st = /* @__PURE__ */ ae(
485
- ot,
486
- lt,
487
- at,
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 je = st.exports;
495
- function tn(c) {
496
- const e = z(null), n = () => c ? pe(c) : void 0, t = () => {
497
- const a = pe(e);
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 v = n();
504
- v && Object.keys(v).length > 0 && a.setProps(v);
554
+ const p = n();
555
+ p && Object.keys(p).length > 0 && a.setProps(p);
505
556
  };
506
- return c && U(
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, v, u) => t().updateTableData(a, v, u),
529
- updateTableDataRecord: (a, v) => t().updateTableDataRecord(a, v),
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, v) => t().insertTableDataRecord(a, v),
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, v;
538
- return (v = (a = t()).expandAll) == null ? void 0 : v.call(a);
588
+ var a, p;
589
+ return (p = (a = t()).expandAll) == null ? void 0 : p.call(a);
539
590
  },
540
591
  collapseAll: () => {
541
- var a, v;
542
- return (v = (a = t()).collapseAll) == null ? void 0 : v.call(a);
592
+ var a, p;
593
+ return (p = (a = t()).collapseAll) == null ? void 0 : p.call(a);
543
594
  }
544
595
  }];
545
596
  }
546
- const rt = /* @__PURE__ */ oe({
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(c, { expose: e }) {
563
- const n = c, t = z(!1), o = z([]), r = z([]), a = (m) => m == null ? "null" : JSON.stringify(v(m)), v = (m) => Array.isArray(m) ? m.map(v) : m !== null && typeof m == "object" ? Object.keys(m).sort().reduce((S, p) => (S[p] = v(m[p]), S), {}) : m, u = z(a(n.params ?? null)), P = (m) => {
564
- n.lazy && m && (a(n.params ?? null) !== u.value || o.value.length === 0) && $();
565
- }, $ = async () => {
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 m = await n.api(n.params), S = Array.isArray(m) ? m : (m == null ? void 0 : m.list) ?? (m == null ? void 0 : m.data) ?? [];
570
- r.value = S;
571
- const p = n.labelField ?? "label", x = n.valueField ?? "value";
572
- o.value = S.map((g) => {
573
- const V = g;
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(V[p] ?? V.label ?? ""),
576
- value: V[x] ?? V.value
626
+ label: String(F[c] ?? F.label ?? ""),
627
+ value: F[x] ?? F.value
577
628
  };
578
- }), u.value = a(n.params ?? null);
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
- }), me(() => {
590
- n.lazy || $();
591
- }), U(
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
- ), U(() => n.params, () => {
598
- a(n.params ?? null) !== u.value && (n.lazy ? (o.value = [], r.value = []) : $());
599
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: v, lastFetchedParamsKey: u, onVisibleChange: P, fetchOptions: $ };
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 it = function() {
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
- }, ct = [], ut = /* @__PURE__ */ ae(
612
- rt,
613
- it,
614
- ct,
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 dt = ut.exports;
622
- function Ie(c) {
623
- const e = c.trim();
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(c) {
640
- return c.replace(/,/g, "").trim();
690
+ function Ae(s) {
691
+ return s.replace(/,/g, "").trim();
641
692
  }
642
- function ft(c, e, n) {
643
- if (!c || c === "-")
644
- return c;
645
- const t = c[0] === "-";
646
- let o = t ? c.slice(1) : c;
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 $ = Math.max(0, e);
650
- return o = $ > 0 ? o.slice(0, $) : o, t ? "-" + o : 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 v = o.slice(r + 1), u = v === "" && o.endsWith(".");
705
+ const p = o.slice(r + 1), m = p === "" && o.endsWith(".");
655
706
  if (n <= 0)
656
707
  return t ? "-" + a : a;
657
- if (u)
708
+ if (m)
658
709
  return (t ? "-" : "") + a + ".";
659
- const P = v.slice(0, n);
660
- return (t ? "-" : "") + a + "." + P;
710
+ const h = p.slice(0, n);
711
+ return (t ? "-" : "") + a + "." + h;
661
712
  }
662
- function pt(c, e) {
663
- const n = Math.pow(10, c) - 1;
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 Ve(c, e, n) {
667
- const t = pt(e, n), o = c < 0 ? -1 : 1;
668
- return Math.abs(c) <= t ? c : o * t;
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 mt(c, e, n) {
721
+ function Ct(s, e, n) {
671
722
  if (e <= 0)
672
723
  switch (n) {
673
724
  case "floor":
674
- return Math.floor(c);
725
+ return Math.floor(s);
675
726
  case "ceil":
676
- return Math.ceil(c);
727
+ return Math.ceil(s);
677
728
  default:
678
- return Math.round(c);
729
+ return Math.round(s);
679
730
  }
680
- const t = Math.pow(10, e), o = c * t;
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 Se(c, e, n, t) {
695
- let o = Ve(c, e, n);
696
- return o = mt(o, n, t), o = Ve(o, e, n), 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 vt(c, e) {
699
- return Number.isNaN(c) || !Number.isFinite(c) ? "" : c.toFixed(Math.max(0, e));
749
+ function xt(s, e) {
750
+ return Number.isNaN(s) || !Number.isFinite(s) ? "" : s.toFixed(Math.max(0, e));
700
751
  }
701
- function We(c, e) {
702
- if (Number.isNaN(c) || !Number.isFinite(c))
752
+ function Ke(s, e) {
753
+ if (Number.isNaN(s) || !Number.isFinite(s))
703
754
  return "";
704
- const n = c.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), v = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
705
- return e <= 0 || a === void 0 ? (t ? "-" : "") + v : (t ? "-" : "") + v + "." + a;
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 ht(c, e) {
708
- if (Number.isNaN(c) || !Number.isFinite(c))
758
+ function Pt(s, e) {
759
+ if (Number.isNaN(s) || !Number.isFinite(s))
709
760
  return "";
710
- let n = c.toFixed(Math.max(0, e));
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 _t = /* @__PURE__ */ oe({
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(c, { emit: e }) {
726
- const n = c, t = z(!1), o = z(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
727
- function v(p) {
728
- if (p == null || p === "")
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 p == "number")
731
- return Number.isFinite(p) ? p : null;
732
- const x = Ae(String(p));
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 g = Number(x);
736
- return Number.isFinite(g) ? g : null;
786
+ const B = Number(x);
787
+ return Number.isFinite(B) ? B : null;
737
788
  }
738
- function u() {
789
+ function m() {
739
790
  if (t.value)
740
791
  return;
741
- const p = v(n.value);
742
- if (p === null) {
792
+ const c = p(n.value);
793
+ if (c === null) {
743
794
  o.value = "";
744
795
  return;
745
796
  }
746
- o.value = We(
747
- Se(p, r(), a(), n.rounding),
797
+ o.value = Ke(
798
+ ke(c, r(), a(), n.rounding),
748
799
  a()
749
800
  );
750
801
  }
751
- U(
802
+ X(
752
803
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
753
- () => u(),
804
+ () => m(),
754
805
  { immediate: !0, deep: !0 }
755
806
  );
756
- function P(p) {
757
- e("input", vt(p, a()));
807
+ function h(c) {
808
+ e("input", xt(c, a()));
758
809
  }
759
- function $(p) {
760
- let x = Ie(p);
761
- if (n.inputLimit !== !1 && (x = ft(x, r(), a())), o.value = x, x === "" || 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 g = Number(x);
764
- if (!Number.isFinite(g))
814
+ const B = Number(x);
815
+ if (!Number.isFinite(B))
765
816
  return;
766
- const V = Se(g, r(), a(), n.rounding);
767
- P(V);
817
+ const F = ke(B, r(), a(), n.rounding);
818
+ h(F);
768
819
  }
769
- function m() {
820
+ function b() {
770
821
  t.value = !0;
771
- const p = Ae(o.value), x = v(p === "" ? n.value : p);
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 = ht(
777
- Se(x, r(), a(), n.rounding),
827
+ o.value = Pt(
828
+ ke(x, r(), a(), n.rounding),
778
829
  a()
779
830
  );
780
831
  }
781
- function S() {
832
+ function C() {
782
833
  t.value = !1;
783
- const p = Ae(o.value);
784
- if (p === "" || p === "-") {
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(Ie(p));
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 g = Se(x, r(), a(), n.rounding);
794
- o.value = We(g, a()), P(g);
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: v, syncDisplayFromValue: u, emitStoredValue: P, onInput: $, onFocus: m, onBlur: S };
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 gt = function() {
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
- }, bt = [], yt = /* @__PURE__ */ ae(
803
- _t,
804
- gt,
805
- bt,
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 Re = yt.exports, wt = /* @__PURE__ */ oe({
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(c, { emit: e }) {
830
- const n = c, t = z(), o = z(), r = z(!1), a = z(!1), v = z(""), u = z([]), P = z({}), $ = C(() => ({
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 m(M) {
835
- const D = n.labelField ?? "label", j = n.valueField ?? "value", G = n.childrenField ?? "children", H = M[G], Y = {};
836
- return Y[n.labelField ?? "label"] = M[D] ?? M.label, Y[n.valueField ?? "value"] = M[j] ?? M.value, Array.isArray(H) && H.length && (Y[n.childrenField ?? "children"] = H.map((X) => m(X))), Y;
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 S(M, D = "") {
839
- const j = {}, G = n.labelField ?? "label", H = n.valueField ?? "value", Y = n.childrenField ?? "children";
840
- for (const X of M) {
841
- const ee = String(X[G] ?? X.label ?? ""), J = X[H] ?? X.value;
842
- J != null && (j[String(J)] = D ? D + " / " + ee : ee);
843
- const te = X[Y] ?? X.children;
844
- Array.isArray(te) && te.length && Object.assign(j, S(te, ee));
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 j;
897
+ return L;
847
898
  }
848
- function p() {
849
- const M = n.treeData;
850
- return Array.isArray(M) && M.length > 0;
899
+ function c() {
900
+ const R = n.treeData;
901
+ return Array.isArray(R) && R.length > 0;
851
902
  }
852
- function x(M) {
853
- u.value = M, P.value = S(M);
903
+ function x(R) {
904
+ m.value = R, h.value = C(R);
854
905
  }
855
- function g() {
856
- const M = n.treeData;
857
- if (!Array.isArray(M) || M.length === 0)
906
+ function B() {
907
+ const R = n.treeData;
908
+ if (!Array.isArray(R) || R.length === 0)
858
909
  return;
859
- const D = M.map((j) => m(j));
860
- x(D);
910
+ const j = R.map((L) => b(L));
911
+ x(j);
861
912
  }
862
- const V = C(() => n.value == null || n.value === "" ? "" : P.value[String(n.value)] ?? String(n.value)), O = (M, D) => {
863
- if (!M)
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 j = n.labelField ?? "label";
866
- return String(D[j] ?? D.label ?? "").toLowerCase().includes(M.toLowerCase());
916
+ const L = n.labelField ?? "label";
917
+ return String(j[L] ?? j.label ?? "").toLowerCase().includes(R.toLowerCase());
867
918
  };
868
- U(v, (M) => {
869
- var D;
870
- (D = o.value) == null || D.filter(M);
919
+ X(p, (R) => {
920
+ var j;
921
+ (j = o.value) == null || j.filter(R);
871
922
  });
872
- let y = null;
873
- function q() {
874
- n.disabled || (r.value = !0, n.lazy && !p() && K(), Ke(() => {
875
- y = (M) => {
876
- t.value && !t.value.contains(M.target) && A();
877
- }, document.addEventListener("click", y);
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 A() {
881
- r.value = !1, v.value = "", y && (document.removeEventListener("click", y), y = null);
931
+ function I() {
932
+ r.value = !1, p.value = "", P && (document.removeEventListener("click", P), P = null);
882
933
  }
883
- function F() {
934
+ function S() {
884
935
  e("input", void 0);
885
936
  }
886
- function f(M) {
887
- const D = n.valueField ?? "value", j = M[D] ?? M.value;
888
- e("input", j), A();
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 K() {
891
- if (!(!n.api || p())) {
941
+ async function $() {
942
+ if (!(!n.api || c())) {
892
943
  a.value = !0;
893
944
  try {
894
- const M = await n.api(n.params), D = Array.isArray(M) ? M : (M == null ? void 0 : M.list) ?? (M == null ? void 0 : M.data) ?? [];
895
- u.value = D.map((j) => m(j)), P.value = S(u.value);
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 me(() => {
902
- p() ? g() : n.lazy || K();
903
- }), U(() => n.treeData, () => {
904
- p() ? g() : (u.value = [], P.value = {}, !n.lazy && n.api && K());
905
- }, { deep: !0 }), U(() => n.api, () => {
906
- p() || (n.lazy ? (u.value = [], P.value = {}) : K());
907
- }, { deep: !0 }), U(() => n.params, () => {
908
- p() || (n.lazy ? (u.value = [], P.value = {}) : K());
909
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: v, treeData: u, flatLabelMap: P, treeProps: $, normalizeNode: m, buildFlatLabelMap: S, hasTreeDataProp: p, applyTreeData: x, syncFromTreeDataProp: g, displayText: V, filterNodeMethod: O, clickOutsideHandler: y, openDropdown: q, closeDropdown: A, clearValue: F, onNodeClick: f, fetchData: K };
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 Ct = function() {
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
- }, xt = [], Pt = /* @__PURE__ */ ae(
920
- wt,
921
- Ct,
922
- xt,
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 St = Pt.exports, Ft = /* @__PURE__ */ oe({
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(c) {
943
- const e = c, n = /* @__PURE__ */ new Set([
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
- me(() => {
958
- var f;
959
- e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, t.value));
960
- }), ke(() => {
961
- var f;
962
- e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, null));
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 = Fe(), r = C(() => ({
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 = C(() => {
970
- const f = e.schema.ifShow;
971
- return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
972
- }), v = C(() => {
973
- const f = e.schema.show;
974
- return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
975
- }), u = C(() => {
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 f = e.schema.dynamicDisabled;
979
- return f === void 0 ? !1 : typeof f == "boolean" ? f : f(r.value);
980
- }), P = C(() => {
981
- const f = e.schema.dynamicRules;
982
- return f ? Array.isArray(f) ? f : f(r.value) : e.schema.rules;
983
- }), $ = C(() => {
984
- const f = e.schema.componentProps;
985
- if (!f)
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 K = typeof f == "function" ? f({
1038
+ const $ = typeof d == "function" ? d({
988
1039
  ...r.value,
989
1040
  formActionType: e.formActionType
990
- }) : { ...f }, M = {}, D = {};
991
- for (const [j, G] of Object.entries(K))
992
- if (j.length > 2 && /^on[A-Za-z]/.test(j) && typeof G == "function") {
993
- const H = j.slice(2).charAt(0).toLowerCase() + j.slice(3);
994
- D[H] = G;
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
- M[j] = G;
997
- return { props: M, listeners: D };
998
- }), m = C(() => $.value.props), S = C(() => $.value.listeners), p = C(() => e.schema.colon ?? e.colon ?? !1), x = C(() => {
999
- const f = e.schema.tooltip;
1000
- if (!f)
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 K = typeof f == "function" ? f(r.value) : f;
1003
- return Te(K, e.formModel[e.schema.field]);
1004
- }), g = C(() => x.value ? "el-tooltip" : "span"), V = C(() => x.value || {}), O = C(() => !!o.default), y = (f) => {
1005
- const K = f == null ? void 0 : f.options;
1006
- return Array.isArray(K) ? K : void 0;
1007
- }, q = C(() => {
1008
- const f = e.schema.component;
1009
- return f == null ? null : typeof f == "string" ? n.has(f) ? null : e.customComponents && e.customComponents[f] || f : f;
1010
- }), A = (f) => {
1011
- var K;
1012
- (K = e.onFieldChange) == null || K.call(e, e.schema.field, f);
1013
- }, F = C(() => {
1014
- const f = e.schema.render;
1015
- return f ? {
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 K = f(r.value);
1018
- return Array.isArray(K) ? ue("span", K) : K;
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: v, effectiveDisabled: u, effectiveRules: P, effectiveComponentPropsAndListeners: $, effectiveComponentProps: m, effectiveComponentListeners: S, showColon: p, normalizedTooltip: x, fieldWrapperComponent: g, fieldWrapperProps: V, hasSlot: O, getOptions: y, resolvedCustomComponent: q, setFieldValue: A, renderComponent: F, ApiSelect: dt, FormattedNumberInput: Re, TreeSelect: St };
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 kt = function() {
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
- }, Bt = [], Rt = /* @__PURE__ */ ae(
1055
- Ft,
1056
- kt,
1057
- Bt,
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 qe = Rt.exports, Mt = /* @__PURE__ */ oe({
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(c) {
1132
+ setup(s) {
1082
1133
  return { __sfc: !0 };
1083
1134
  }
1084
1135
  });
1085
- var At = function() {
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
- }, $t = [], Tt = /* @__PURE__ */ ae(
1093
- Mt,
1094
- At,
1095
- $t,
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 He = Tt.exports, Dt = /* @__PURE__ */ oe({
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(c, { expose: e, emit: n }) {
1136
- const t = c, o = Fe(), r = z(), a = z(), v = z(!1), u = z(!0), P = z({}), $ = z({}), m = z([]), S = z({}), p = z(/* @__PURE__ */ new Map()), x = { xl: 1920, lg: 1200, md: 992, sm: 768 }, g = (d, w, B) => {
1137
- const l = B ?? (typeof window < "u" ? window.innerWidth : 1920), s = d ?? {}, _ = w ?? {}, k = _.span ?? 8;
1138
- return l >= x.xl ? s.xl ?? _.xl ?? s.lg ?? _.lg ?? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.lg ? s.lg ?? _.lg ?? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.md ? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.sm ? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : s.xs ?? _.xs ?? s.span ?? k;
1139
- }, { getSetting: V } = Be(), O = C(() => ({ ...V("ProForm"), ...t, ...S.value })), y = C(() => O.value.modelValue), q = C(() => y.value !== void 0), A = C(() => q.value ? y.value ?? {} : P.value), F = C(() => ({
1140
- ...V("ProForm").components ?? {},
1141
- ...O.value.components ?? {},
1142
- ...S.value.components ?? {}
1143
- })), f = C(() => O.value.actionColOptions ?? { span: 24 }), K = z(typeof window < "u" ? window.innerWidth : 1920), M = (d, w, B, l) => {
1144
- let s = 24, _ = 1, k = 0;
1145
- for (const W of d) {
1146
- const I = g(W.colProps, w, l);
1147
- if (I > s) {
1148
- if (_++, _ > B)
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
- s = 24 - I;
1201
+ l = 24 - q;
1151
1202
  } else
1152
- s -= I;
1153
- k++;
1203
+ l -= q;
1204
+ g++;
1154
1205
  }
1155
- return k;
1156
- }, D = C(() => {
1157
- const d = m.value.filter((s) => H(s));
1158
- if (!O.value.showAdvancedButton)
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 = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1161
- return d.length > l;
1162
- }), j = C(() => O.value.formListeners ?? {}), G = C(() => {
1163
- const d = m.value.filter((s) => H(s));
1164
- if (!O.value.showAdvancedButton || !u.value)
1165
- return d;
1166
- const w = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1167
- return d.slice(0, l);
1168
- }), H = (d) => {
1169
- let w = !0, B = !0;
1170
- return typeof d.ifShow == "function" && (w = d.ifShow({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.ifShow == "boolean" && (w = d.ifShow), typeof d.show == "function" && (B = d.show({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.show == "boolean" && (B = d.show), w && B;
1171
- }, Y = (d) => d.colProps ?? O.value.baseColProps ?? {}, X = (d) => d.slot || d.field, ee = (d, w = !0) => {
1172
- const B = w ? { ...d ?? {} } : {}, l = O.value.initialValues ?? t.initialValues;
1173
- return m.value.forEach((s) => {
1174
- if (!(w && Object.prototype.hasOwnProperty.call(B, s.field))) {
1175
- if (s.defaultValue !== void 0) {
1176
- B[s.field] = s.defaultValue;
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
- l && Object.prototype.hasOwnProperty.call(l, s.field) && (B[s.field] = l[s.field]);
1230
+ T && Object.prototype.hasOwnProperty.call(T, l.field) && (M[l.field] = T[l.field]);
1180
1231
  }
1181
- }), B;
1182
- }, J = (d, w = !0) => {
1183
- P.value = d, w && n("update:modelValue", d);
1184
- }, te = (d) => {
1185
- const w = ee({ ...A.value, ...d });
1186
- return J(w), w;
1187
- }, ne = () => {
1188
- const d = {};
1189
- m.value.forEach((w) => {
1190
- var B;
1191
- (B = w.rules) != null && B.length && (d[w.field] = w.rules);
1192
- }), J(ee(A.value), !1), $.value = d;
1193
- }, b = (d) => {
1194
- const w = { ...d };
1195
- return m.value.forEach((B) => {
1196
- const l = B.ifShow;
1197
- if (l === void 0)
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 l == "boolean" ? l : l({ schema: B, values: d, model: d, field: B.field })) || delete w[B.field];
1250
+ (typeof T == "boolean" ? T : T({ schema: M, values: f, model: f, field: M.field })) || delete w[M.field];
1200
1251
  }), w;
1201
- }, N = (d) => {
1202
- const w = b(d), B = S.value.fieldMapToTime;
1203
- if (!(B != null && B.length))
1252
+ }, E = (f) => {
1253
+ const w = _(f), M = C.value.fieldMapToTime;
1254
+ if (!(M != null && M.length))
1204
1255
  return w;
1205
- const l = { ...w };
1206
- return B.forEach(([s, [_, k]]) => {
1207
- const W = l[s];
1208
- Array.isArray(W) && W.length === 2 && (delete l[s], l[_] = W[0], l[k] = W[1]);
1209
- }), l;
1210
- }, T = async () => {
1211
- var d;
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 ((d = r.value) == null ? void 0 : d.validate()), O.value.submitFunc ? await O.value.submitFunc() : (v.value = !0, n("submit", N({ ...A.value })));
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
- v.value = !1;
1268
+ p.value = !1;
1218
1269
  }
1219
1270
  }, i = async () => {
1220
- var d;
1221
- O.value.resetFunc ? await O.value.resetFunc() : ((d = r.value) == null || d.resetFields(), ne(), n("reset"), O.value.submitOnReset && await T());
1222
- }, h = (d) => (te(d), Promise.resolve()), R = () => N({ ...A.value }), L = async () => {
1223
- var d;
1224
- (d = r.value) == null || d.resetFields(), J(ee(void 0, !1));
1225
- }, E = (d, w) => {
1226
- te({ [d]: w });
1227
- }, Z = (d) => {
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(d)) ?? Promise.resolve();
1230
- }, re = (d) => r.value ? d != null && d.length ? Promise.all(d.map((w) => new Promise((B, l) => {
1231
- r.value.validateField(w, (s) => s ? B(void 0) : l(new Error("Validation failed")));
1232
- }))) : r.value.validate() : Promise.resolve(), he = async (d, w) => {
1233
- var l;
1234
- const B = (l = a.value) == null ? void 0 : l.querySelector(`[data-field="${d}"]`);
1235
- return B && B.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
1236
- }, se = (d) => {
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(d);
1239
- }, _e = async (d) => {
1240
- (Array.isArray(d) ? d : [d]).forEach((B) => {
1241
- const l = m.value.findIndex((s) => s.field === B.field);
1242
- l >= 0 && (m.value[l] = { ...m.value[l], ...B });
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
- }, ge = async (d, w, B) => {
1245
- if (B)
1246
- m.value.unshift(d);
1295
+ }, be = async (f, w, M) => {
1296
+ if (M)
1297
+ b.value.unshift(f);
1247
1298
  else if (w) {
1248
- const l = m.value.findIndex((s) => s.field === w);
1249
- m.value.splice(l + 1, 0, d);
1299
+ const T = b.value.findIndex((l) => l.field === w);
1300
+ b.value.splice(T + 1, 0, f);
1250
1301
  } else
1251
- m.value.push(d);
1252
- ne();
1253
- }, be = async (d) => {
1254
- const w = Array.isArray(d) ? d : [d];
1255
- m.value = m.value.filter((B) => !w.includes(B.field));
1256
- }, ye = async (d) => {
1257
- S.value = { ...S.value, ...d }, d.schemas && (m.value = [...d.schemas], ne());
1258
- }, we = (d, w) => {
1259
- w ? p.value.set(d, w) : p.value.delete(d);
1260
- }, Ce = (d) => p.value.get(d) ?? null;
1261
- function xe(d, w = !1) {
1262
- const B = p.value.get(d);
1263
- if (!B)
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 l = B;
1266
- return w ? (l == null ? void 0 : l.rawOptions) ?? [] : (l == null ? void 0 : l.options) ?? [];
1316
+ const T = M;
1317
+ return w ? (T == null ? void 0 : T.rawOptions) ?? [] : (T == null ? void 0 : T.options) ?? [];
1267
1318
  }
1268
- const ve = (d) => {
1269
- const w = p.value.get(d);
1319
+ const Se = (f) => {
1320
+ const w = c.value.get(f);
1270
1321
  if (!w)
1271
1322
  return !1;
1272
- const B = w;
1273
- return (B == null ? void 0 : B.loading) ?? !1;
1274
- }, ie = {
1275
- getFieldsValue: R,
1276
- setFieldsValue: h,
1277
- resetFields: L,
1278
- validate: Z,
1279
- validateFields: re,
1280
- submit: T,
1281
- scrollToField: he,
1282
- clearValidate: se,
1283
- updateSchema: _e,
1284
- appendSchemaByField: ge,
1285
- removeSchemaByField: be,
1286
- setProps: ye,
1287
- getComponentInstance: Ce,
1288
- getFieldOptions: xe,
1289
- isFieldLoading: ve
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
- ...ie,
1293
- registerFieldInstance: we
1343
+ ...fe,
1344
+ registerFieldInstance: Ce
1294
1345
  });
1295
1346
  const ce = () => {
1296
- m.value = [...t.schemas ?? []], ne();
1297
- }, de = () => {
1298
- typeof window < "u" && (K.value = window.innerWidth);
1347
+ b.value = [...t.schemas ?? []], oe();
1348
+ }, ue = () => {
1349
+ typeof window < "u" && ($.value = window.innerWidth);
1299
1350
  };
1300
- return me(() => {
1301
- ce(), n("register", ie), typeof window < "u" && window.addEventListener("resize", de);
1302
- }), ke(() => {
1303
- typeof window < "u" && window.removeEventListener("resize", de);
1304
- }), U(() => y.value, (d) => {
1305
- !q.value || d === void 0 || J(ee(d), !1);
1306
- }, { deep: !0, immediate: !0 }), U(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: v, collapsed: u, formModel: P, formRules: $, innerSchemas: m, innerProps: S, fieldInstanceMap: p, BREAKPOINTS: x, getEffectiveSpan: g, getComponentSetting: V, effectiveProps: O, controlledModelValue: y, isControlled: q, currentFormModel: A, formCustomComponents: F, effectiveActionColOptions: f, windowWidth: K, getVisibleSchemaCount: M, hasMoreFields: D, formListeners: j, displaySchemas: G, shouldShow: H, getColProps: Y, getSlotName: X, resolveSchemaModel: ee, applyFormModel: J, updateFormModel: te, initForm: ne, filterByIfShow: b, processFieldMapToTime: N, handleSubmit: T, handleReset: i, setFieldsValue: h, getFieldsValue: R, resetFields: L, handleFieldChange: E, validate: Z, validateFields: re, scrollToField: he, clearValidate: se, updateSchema: _e, appendSchemaByField: ge, removeSchemaByField: be, setProps: ye, registerFieldInstance: we, getComponentInstance: Ce, getFieldOptions: xe, isFieldLoading: ve, formActionRef: ie, syncSchemas: ce, handleResize: de, ProFormItem: qe, FormActions: He };
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 zt = function() {
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
- }, Et = [], Ot = /* @__PURE__ */ ae(
1320
- Dt,
1321
- zt,
1322
- Et,
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 Je = Ot.exports;
1330
- function nn(c) {
1331
- const e = z(null), n = z(c ? pe(c) : void 0), t = () => c ? pe(c) : void 0, o = (F) => {
1332
- e.value = F;
1333
- const f = t();
1334
- f && Object.keys(f).length > 0 && F.setProps(f);
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
- c && U(
1387
+ s && X(
1337
1388
  () => t(),
1338
- (F) => {
1339
- n.value = F, F && e.value && e.value.setProps(F);
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 F;
1345
- return ((F = e.value) == null ? void 0 : F.getFieldsValue()) ?? {};
1346
- }, a = async (F) => {
1347
- var f;
1348
- await ((f = e.value) == null ? void 0 : f.setFieldsValue(F));
1349
- }, v = async () => {
1350
- var F;
1351
- await ((F = e.value) == null ? void 0 : F.resetFields());
1352
- }, u = (F) => {
1353
- var f;
1354
- return ((f = e.value) == null ? void 0 : f.validate(F)) ?? Promise.resolve();
1355
- }, P = (F) => {
1356
- var f;
1357
- return ((f = e.value) == null ? void 0 : f.validateFields(F)) ?? Promise.resolve();
1358
- }, $ = () => {
1359
- var F;
1360
- return ((F = e.value) == null ? void 0 : F.submit()) ?? Promise.resolve();
1361
- }, m = (F, f) => {
1362
- var K;
1363
- return ((K = e.value) == null ? void 0 : K.scrollToField(F, f)) ?? Promise.resolve();
1364
- }, S = (F) => {
1365
- var f;
1366
- (f = e.value) == null || f.clearValidate(F);
1367
- }, p = (F) => {
1368
- var f;
1369
- return ((f = e.value) == null ? void 0 : f.updateSchema(F)) ?? Promise.resolve();
1370
- }, x = (F, f, K) => {
1371
- var M;
1372
- return ((M = e.value) == null ? void 0 : M.appendSchemaByField(F, f, K)) ?? Promise.resolve();
1373
- }, g = (F) => {
1374
- var f;
1375
- return ((f = e.value) == null ? void 0 : f.removeSchemaByField(F)) ?? Promise.resolve();
1376
- }, V = async (F) => {
1377
- var f;
1378
- n.value = { ...n.value, ...F }, await ((f = e.value) == null ? void 0 : f.setProps(F));
1379
- }, O = (F) => {
1380
- var f;
1381
- return ((f = e.value) == null ? void 0 : f.getComponentInstance(F)) ?? null;
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 y(F, f = !1) {
1384
- return e.value ? f ? e.value.getFieldOptions(F, !0) : e.value.getFieldOptions(F) : [];
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: v,
1392
- validate: u,
1393
- validateFields: P,
1394
- submit: $,
1395
- scrollToField: m,
1396
- clearValidate: S,
1397
- updateSchema: p,
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: g,
1400
- setProps: V,
1401
- getComponentInstance: O,
1402
- getFieldOptions: y,
1403
- isFieldLoading: (F) => {
1404
- var f;
1405
- return ((f = e.value) == null ? void 0 : f.isFieldLoading(F)) ?? !1;
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 Nt = /* @__PURE__ */ oe({
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(c, { expose: e, emit: n }) {
1425
- const t = c, o = z({}), r = z({}), a = z([]), v = z(typeof window < "u" ? window.innerWidth : 1920), u = z(!0), P = oe({
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(b) {
1484
+ setup(_) {
1434
1485
  return () => {
1435
- const N = b.schema, T = b.record, i = b.value, h = (R) => {
1436
- const L = $(N, R === b.emptyText ? i : R, T), E = ue("span", R);
1437
- return L ? ue("el-tooltip", { props: L }, [E]) : E;
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 (N.render) {
1440
- const R = N.render(i, T);
1441
- return R == null || R === "" ? h(b.emptyText) : typeof R == "string" || typeof R == "number" ? h(String(R)) : R;
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) ? h(i.length ? i.join(", ") : b.emptyText) : i == null || i === "" ? h(b.emptyText) : h(typeof i == "object" ? JSON.stringify(i) : String(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
- }), $ = (b, N, T) => {
1447
- const i = b.tooltip;
1497
+ }), O = (_, E, D) => {
1498
+ const i = _.tooltip;
1448
1499
  if (!i)
1449
1500
  return null;
1450
- const h = typeof i == "function" ? i({ value: N, record: T, schema: b }) : i;
1451
- return Te(h, N);
1452
- }, { mergeSettings: m } = Be(), S = C(() => m("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, x = (b, N) => {
1453
- if (typeof b == "number")
1454
- return Math.max(1, b);
1455
- const T = b ?? {};
1456
- return N >= p.xxl ? T.xxl ?? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.xl ? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.lg ? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.md ? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.sm ? T.sm ?? T.xs ?? 2 : T.xs ?? 1;
1457
- }, g = C(() => x(S.value.column, v.value)), V = C(() => S.value.data ?? r.value ?? {}), O = C(() => (a.value.length ? a.value : S.value.schema ?? []).filter((b) => b.dataIndex || b.field ? typeof b.show == "function" ? b.show(V.value) : b.show !== !1 : !1).map((b) => ({
1458
- ...b,
1459
- dataIndex: b.dataIndex || b.field || ""
1460
- }))), y = C(() => {
1461
- const b = [];
1462
- let N = { items: [] }, T = 0;
1463
- const i = g.value;
1464
- return O.value.forEach((h, R) => {
1465
- const L = O.value.length - R, E = Math.max(1, Math.min(h.span ?? 1, i)), Z = L === 1 ? i - T || i : E;
1466
- T + Z > i && (b.push(N), N = { items: [] }, T = 0);
1467
- const re = L === 1 && T < i ? Math.max(1, i - T) : Z;
1468
- N.items.push({ ...h, _span: re }), T += re, T >= i && (b.push(N), N = { items: [] }, T = 0);
1469
- }), N.items.length > 0 && b.push(N), b;
1470
- }), q = C(() => {
1471
- var N;
1472
- if (!A.value || u.value)
1473
- return y.value;
1474
- const b = Math.max(1, ((N = S.value.collapseOptions) == null ? void 0 : N.visibleRows) ?? 1);
1475
- return y.value.slice(0, b);
1476
- }), A = C(() => {
1477
- var N, T;
1478
- const b = Math.max(1, ((N = S.value.collapseOptions) == null ? void 0 : N.visibleRows) ?? 1);
1479
- return !!S.value.useCollapse && !!((T = S.value.collapseOptions) != null && T.canExpand) && y.value.length > b;
1480
- }), F = C(() => !!S.value.title || !!S.value.helpMessage || A.value), f = C(() => {
1481
- var b, N;
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: ((b = S.value.collapseOptions) == null ? void 0 : b.expandButtonText) ?? "展开",
1484
- collapse: ((N = S.value.collapseOptions) == null ? void 0 : N.collapseButtonText) ?? "收起"
1534
+ expand: ((_ = C.value.collapseOptions) == null ? void 0 : _.expandButtonText) ?? "展开",
1535
+ collapse: ((E = C.value.collapseOptions) == null ? void 0 : E.collapseButtonText) ?? "收起"
1485
1536
  };
1486
- }), K = C(() => ({
1487
- gridTemplateColumns: `repeat(${g.value}, minmax(0, 1fr))`
1488
- })), M = (b) => ({
1489
- gridColumn: `span ${b._span}`
1490
- }), D = (b) => ({
1491
- minWidth: b.labelMinWidth ? `${b.labelMinWidth}px` : void 0,
1492
- ...b.labelStyle ?? {}
1493
- }), j = (b) => ({
1494
- minWidth: b.contentMinWidth ? `${b.contentMinWidth}px` : void 0,
1495
- ...b.contentStyle ?? {}
1496
- }), G = (b) => V.value[b.dataIndex], H = () => {
1497
- a.value = [...S.value.schema ?? []];
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 = { ...S.value.data ?? {} };
1500
- }, X = async (b) => {
1501
- o.value = { ...o.value, ...b }, b.schema && (a.value = [...b.schema]), b.data && (r.value = { ...b.data });
1502
- }, ee = async (b) => {
1503
- r.value = { ...r.value, ...b }, o.value = { ...o.value, data: r.value };
1504
- }, J = () => ({ ...S.value.data ?? r.value ?? {} }), te = {
1505
- setProps: X,
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: J
1558
+ getData: U
1508
1559
  };
1509
1560
  e(te);
1510
- const ne = () => {
1511
- typeof window < "u" && (v.value = window.innerWidth);
1561
+ const oe = () => {
1562
+ typeof window < "u" && (p.value = window.innerWidth);
1512
1563
  };
1513
- return me(() => {
1514
- var b;
1515
- H(), Y(), u.value = ((b = S.value.collapseOptions) == null ? void 0 : b.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", ne);
1516
- }), ke(() => {
1517
- typeof window < "u" && window.removeEventListener("resize", ne);
1518
- }), U(() => S.value.schema, H, { deep: !0 }), U(() => S.value.data, Y, { deep: !0 }), U(() => {
1519
- var b;
1520
- return (b = S.value.collapseOptions) == null ? void 0 : b.defaultExpand;
1521
- }, (b) => {
1522
- b !== void 0 && (u.value = b);
1523
- }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: v, expanded: u, DescriptionValueRenderer: P, normalizeTooltip: $, mergeSettings: m, effectiveProps: S, breakpoints: p, resolveColumn: x, currentColumn: g, effectiveData: V, visibleSchema: O, normalizedRows: y, renderedRows: q, showCollapseButton: A, showHeader: F, collapseButtonText: f, bodyStyle: K, getItemStyle: M, getLabelStyle: D, getContentStyle: j, getItemValue: G, syncSchema: H, syncData: Y, setProps: X, setData: ee, getData: J, descriptionAction: te, updateWindowWidth: ne };
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 It = function() {
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(v) {
1540
- return [n("div", { key: `${a}-${v.dataIndex || v.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(v) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(v) }, [e._v(" " + e._s(v.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(v) }, [e.$scopedSlots[v.slot || v.dataIndex] ? e._t(v.slot || v.dataIndex, null, { value: t.getItemValue(v), record: t.effectiveData, schema: v }) : n(t.DescriptionValueRenderer, { attrs: { schema: v, value: t.getItemValue(v), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
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
- }, Vt = [], Wt = /* @__PURE__ */ ae(
1544
- Nt,
1545
- It,
1546
- Vt,
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 Ue = Wt.exports;
1554
- function on(c) {
1555
- const e = z(null), n = () => c ? pe(c) : void 0, t = () => {
1556
- const a = pe(e);
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 v = n();
1563
- v && Object.keys(v).length > 0 && a.setProps(v);
1613
+ const p = n();
1614
+ p && Object.keys(p).length > 0 && a.setProps(p);
1564
1615
  };
1565
- return c && U(
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 Kt = /* @__PURE__ */ oe({
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(c, { expose: e, emit: n }) {
1599
- const t = c, o = Fe(), { mergeSettings: r } = Be(), a = z(t.expanded ?? t.defaultExpand), v = C(() => r("CollapseContainer", { ...t })), u = C(() => v.value.canExpand ?? v.value.canExpan ?? !0), P = C(() => v.value.expanded !== void 0), $ = C(() => P.value ? !!v.value.expanded : a.value), m = C(() => !!o.title || !!o.action || !!v.value.title || !!v.value.helpMessage || u.value), S = C(() => u.value), p = C(() => {
1600
- const y = v.value.wrapperProps ?? {}, q = y.class, A = y.style, F = { ...y };
1601
- return delete F.class, delete F.style, {
1602
- ...F,
1603
- class: q,
1604
- style: A
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
- !v.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1658
+ !p.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1608
1659
  window.dispatchEvent(new Event("resize"));
1609
1660
  }, 220);
1610
- }, g = (y) => {
1611
- P.value || (a.value = y), n("update:expanded", y), n("change", y), n(y ? "expand" : "collapse"), x();
1612
- }, V = () => {
1613
- u.value && g(!$.value);
1614
- }, O = () => {
1615
- S.value && V();
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 U(() => t.expanded, (y) => {
1618
- y !== void 0 && (a.value = y);
1619
- }), U(() => t.defaultExpand, (y) => {
1620
- t.expanded === void 0 && (a.value = y);
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: g,
1623
- toggleExpand: V
1624
- }), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: v, resolvedCanExpan: u, isControlled: P, mergedExpanded: $, showHeader: m, canToggleByHeader: S, wrapperProps: p, triggerWindowResize: x, setExpanded: g, toggleExpand: V, handleHeaderClick: O };
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 Lt = function() {
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
- }, jt = [], qt = /* @__PURE__ */ ae(
1643
- Kt,
1644
- Lt,
1645
- jt,
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 Ge = qt.exports, Ht = {
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
- }, Jt = /* @__PURE__ */ oe({
1659
- ...Ht,
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(c, { expose: e, emit: n }) {
1682
- const t = c, o = z(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", v = C(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), u = C(() => "left"), P = C(() => {
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 $(i) {
1742
+ function O(i) {
1692
1743
  return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
1693
1744
  }
1694
- const m = C(() => {
1745
+ const b = y(() => {
1695
1746
  const i = [];
1696
- t.fixedRows.forEach((L) => {
1747
+ t.fixedRows.forEach((V) => {
1697
1748
  i.push({
1698
1749
  _type: "fixed",
1699
- rowKey: L.rowKey,
1700
- rowLabel: L.label
1750
+ rowKey: V.rowKey,
1751
+ rowLabel: V.label
1701
1752
  });
1702
1753
  });
1703
- const h = t.modelValue;
1704
- return ((h && typeof h == "object" ? h[r()] : void 0) ?? []).forEach((L, E) => {
1705
- i.push({ _type: "competitor", _index: E });
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
- }), S = C(() => {
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 p() {
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 h = t.modelValue;
1717
- if (!h || typeof h != "object") {
1718
- const E = {};
1719
- for (const Z of t.columns)
1720
- E[Z.key] = "";
1721
- return E;
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 R = h[i];
1724
- if (R && typeof R == "object" && !Array.isArray(R))
1725
- return R;
1726
- const L = {};
1727
- for (const E of t.columns)
1728
- L[E.key] = "";
1729
- return L;
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 g(i) {
1782
+ function B(i) {
1732
1783
  n("update:modelValue", i);
1733
1784
  }
1734
- function V(i, h) {
1735
- return x(i)[h] ?? "";
1785
+ function F(i, v) {
1786
+ return x(i)[v] ?? "";
1736
1787
  }
1737
- function O(i, h, R) {
1738
- const L = p(), E = { ...L[i] || {} };
1739
- E[h] = R, L[i] = E, g(L);
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 y() {
1792
+ function P() {
1742
1793
  const i = t.modelValue;
1743
1794
  if (!i || typeof i != "object")
1744
1795
  return [];
1745
- const h = i[r()];
1746
- return Array.isArray(h) ? h : [];
1796
+ const v = i[r()];
1797
+ return Array.isArray(v) ? v : [];
1747
1798
  }
1748
- function q(i) {
1749
- const h = y()[i], R = a();
1750
- return h ? String(h[R] ?? "") : "";
1799
+ function G(i) {
1800
+ const v = P()[i], A = a();
1801
+ return v ? String(v[A] ?? "") : "";
1751
1802
  }
1752
- function A(i, h) {
1753
- const R = p(), L = [...y()], E = { ...L[i] || {} };
1754
- E[a()] = h, L[i] = E, R[r()] = L, g(R);
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 F(i, h) {
1757
- const R = y()[i];
1758
- return R ? R[h] ?? "" : "";
1807
+ function S(i, v) {
1808
+ const A = P()[i];
1809
+ return A ? A[v] ?? "" : "";
1759
1810
  }
1760
- function f(i, h, R) {
1761
- const L = p(), E = [...y()], Z = { ...E[i] || {} };
1762
- Z[h] = R, E[i] = Z, L[r()] = E, g(L);
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 K(i, h) {
1765
- return i._type === "fixed" ? V(i.rowKey, h.key) : F(i._index, h.key);
1815
+ function $(i, v) {
1816
+ return i._type === "fixed" ? F(i.rowKey, v.key) : S(i._index, v.key);
1766
1817
  }
1767
- function M(i, h, R) {
1768
- i._type === "fixed" ? O(i.rowKey, h.key, R) : f(i._index, h.key, R);
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 D(i, h) {
1771
- return (R) => M(i.row, h, R);
1821
+ function j(i, v) {
1822
+ return (A) => R(i.row, v, A);
1772
1823
  }
1773
- function j() {
1824
+ function L() {
1774
1825
  const i = { [a()]: "" };
1775
- for (const h of t.columns)
1776
- i[h.key] = "";
1826
+ for (const v of t.columns)
1827
+ i[v.key] = "";
1777
1828
  return i;
1778
1829
  }
1779
- function G() {
1780
- const i = p(), h = [...y()];
1781
- h.push(j()), i[r()] = h, g(i);
1830
+ function Z() {
1831
+ const i = c(), v = [...P()];
1832
+ v.push(L()), i[r()] = v, B(i);
1782
1833
  }
1783
- function H(i) {
1784
- if (!S.value)
1834
+ function J(i) {
1835
+ if (!C.value)
1785
1836
  return;
1786
- const h = p(), R = [...y()];
1787
- R.splice(i, 1), h[r()] = R, g(h);
1837
+ const v = c(), A = [...P()];
1838
+ A.splice(i, 1), v[r()] = A, B(v);
1788
1839
  }
1789
- function Y(i, h) {
1790
- return `${i}.${h}`;
1840
+ function Y(i, v) {
1841
+ return `${i}.${v}`;
1791
1842
  }
1792
- function X(i) {
1843
+ function Q(i) {
1793
1844
  return `${r()}.${i}.${a()}`;
1794
1845
  }
1795
- function ee(i, h) {
1796
- return `${r()}.${i}.${h}`;
1846
+ function ee(i, v) {
1847
+ return `${r()}.${i}.${v}`;
1797
1848
  }
1798
- function J(i) {
1799
- return i.component === "formatted-number" ? Re : "el-input";
1849
+ function U(i) {
1850
+ return i.component === "formatted-number" ? Me : "el-input";
1800
1851
  }
1801
1852
  function te(i) {
1802
- const h = i.componentProps || {};
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
- ...h
1809
- } : { ...h };
1859
+ ...v
1860
+ } : { ...v };
1810
1861
  }
1811
- function ne(i) {
1812
- const h = i.row;
1813
- if (h._type === "fixed")
1862
+ function oe(i) {
1863
+ const v = i.row;
1864
+ if (v._type === "fixed")
1814
1865
  return {
1815
- row: h,
1866
+ row: v,
1816
1867
  rowType: "fixed",
1817
- rowKey: h.rowKey,
1818
- rowLabel: h.rowLabel
1868
+ rowKey: v.rowKey,
1869
+ rowLabel: v.rowLabel
1819
1870
  };
1820
- const R = h._index;
1871
+ const A = v._index;
1821
1872
  return {
1822
- row: h,
1873
+ row: v,
1823
1874
  rowType: "competitor",
1824
- rowIndex: R,
1825
- value: q(R),
1826
- updateValue: (L) => A(R, L)
1875
+ rowIndex: A,
1876
+ value: G(A),
1877
+ updateValue: (V) => I(A, V)
1827
1878
  };
1828
1879
  }
1829
- const b = C(() => {
1830
- const i = {}, h = (L) => [{ required: !0, message: `请输入${L}`, trigger: "blur" }];
1831
- for (const L of t.fixedRows)
1832
- for (const E of t.columns)
1833
- E.rules ? i[`${L.rowKey}.${E.key}`] = E.rules : E.required && (i[`${L.rowKey}.${E.key}`] = h(E.title));
1834
- return y().forEach((L, E) => {
1835
- i[`${r()}.${E}.${a()}`] = h("友商名称");
1836
- for (const Z of t.columns)
1837
- Z.rules ? i[`${r()}.${E}.${Z.key}`] = Z.rules : Z.required && (i[`${r()}.${E}.${Z.key}`] = h(Z.title));
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 N() {
1891
+ function E() {
1841
1892
  return new Promise((i) => {
1842
- const h = o.value;
1843
- if (!h || typeof h.validate != "function") {
1893
+ const v = o.value;
1894
+ if (!v || typeof v.validate != "function") {
1844
1895
  i(!0);
1845
1896
  return;
1846
1897
  }
1847
- h.validate((R) => {
1848
- i(R);
1898
+ v.validate((A) => {
1899
+ i(A);
1849
1900
  });
1850
1901
  });
1851
1902
  }
1852
- function T(i) {
1853
- var h, R;
1854
- (R = (h = o.value) == null ? void 0 : h.clearValidate) == null || R.call(h, i);
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: N,
1858
- clearValidate: T,
1859
- addCompetitor: G,
1860
- removeCompetitor: H
1861
- }), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: v, firstColumnFixed: u, actionColumnBind: P, rowKeyFn: $, tableRows: m, canDeleteCompetitor: S, cloneModel: p, ensureFixedBlock: x, emitNext: g, getFixedMetric: V, setFixedMetric: O, competitorList: y, getCompetitorName: q, setCompetitorName: A, getCompetitorMetric: F, setCompetitorMetric: f, getCellValue: K, setCellValue: M, slotUpdateHandler: D, emptyCompetitorRow: j, addCompetitor: G, removeCompetitor: H, fixedMetricProp: Y, competitorNameProp: X, competitorMetricProp: ee, cellComponent: J, cellBind: te, firstColumnScope: ne, mergedRules: b, validate: N, clearValidate: T };
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 Ut = function() {
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
- }, Gt = [], Xt = /* @__PURE__ */ ae(
1901
- Jt,
1902
- Ut,
1903
- Gt,
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 Xe = Xt.exports, Zt = [
1911
- { name: "ProTable", component: Le },
1912
- { name: "TableAction", component: je },
1913
- { name: "ProForm", component: Je },
1914
- { name: "ProFormItem", component: qe },
1915
- { name: "FormActions", component: He },
1916
- { name: "FormattedNumberInput", component: Re },
1917
- { name: "ProDescriptions", component: Ue },
1918
- { name: "CollapseContainer", component: Ge },
1919
- { name: "ProTableForm", component: Xe }
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 Qt(c) {
1922
- Zt.forEach(({ name: e, component: n }) => {
1923
- c.component(e, n);
1972
+ function sn(s) {
1973
+ an.forEach(({ name: e, component: n }) => {
1974
+ s.component(e, n);
1924
1975
  });
1925
1976
  }
1926
- const ln = {
1927
- install: Qt,
1928
- ProTable: Le,
1929
- ProForm: Je,
1930
- ProDescriptions: Ue,
1931
- CollapseContainer: Ge,
1932
- TableAction: je,
1933
- FormattedNumberInput: Re,
1934
- ProTableForm: Xe
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
- Ge as CollapseContainer,
1938
- He as FormActions,
1939
- Re as FormattedNumberInput,
1940
- Ue as ProDescriptions,
1941
- Je as ProForm,
1942
- qe as ProFormItem,
1943
- Le as ProTable,
1944
- Xe as ProTableForm,
1945
- je as TableAction,
1946
- ft as applyNumericInputDigitLimits,
1947
- Ve as clampByIntegerDigits,
1948
- ln as default,
1949
- We as formatWithThousands,
1950
- Qt as install,
1951
- Se as normalizeNumericValue,
1952
- ht as numberToEditString,
1953
- mt as roundToDecimals,
1954
- Ie as sanitizeNumericInput,
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
- vt as toFixedDecimalString,
1957
- Be as useComponentSetting,
1958
- on as useDescription,
1959
- nn as useForm,
1960
- tn as useProTable
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