@aspire-ui/element-component-pro 1.0.14 → 1.0.16

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