@aspire-ui/element-component-pro 1.0.13 → 1.0.15

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