joy-admin-components 0.2.16 → 0.2.17

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,194 +1,194 @@
1
- import { ElForm as Ct, ElRow as xt, ElCol as kt, ElMessageBox as _t, ElInputNumber as St, ElText as $t, ElLink as Ge } from "element-plus";
2
- import { defineComponent as tt, ref as R, onMounted as nt, h as Ie, mergeModels as We, useAttrs as Lt, useModel as Et, computed as se, watch as Ae, resolveComponent as F, unref as K, openBlock as L, createBlock as B, mergeProps as he, createSlots as ot, withCtx as T, createElementVNode as ae, toDisplayString as J, renderSlot as X, createVNode as V, createTextVNode as Q, createCommentVNode as ce, createElementBlock as re, Fragment as ze, renderList as lt, withModifiers as De, nextTick as _e, resolveDynamicComponent as at, withKeys as It, normalizeStyle as Tt, normalizeClass as Oe, reactive as ke, onUpdated as Ft, onUnmounted as zt, withDirectives as Dt, isVNode as Ot } from "vue";
3
- import { saveAs as Vt } from "file-saver";
4
- import st from "exceljs";
5
- import Se from "dayjs";
6
- import { createI18n as Mt, useI18n as me } from "vue-i18n";
7
- import { debounce as Ue, cloneDeep as rt, isArray as Je } from "lodash";
8
- import { useRoute as qt, useRouter as At } from "vue-router";
9
- import { createNamespacedHelpers as je, useStore as it, mapState as Ut, mapGetters as jt, mapActions as Pt } from "vuex";
10
- import { VxeUI as we } from "vxe-pc-ui";
11
- const Dn = tt({
1
+ import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as It, ElText as Lt, ElLink as Je } from "element-plus";
2
+ import { defineComponent as ot, ref as R, onMounted as lt, h as Te, mergeModels as Xe, useAttrs as Ft, useModel as Tt, computed as se, watch as Pe, resolveComponent as z, unref as H, openBlock as L, createBlock as B, mergeProps as he, createSlots as at, withCtx as D, createElementVNode as ae, toDisplayString as J, renderSlot as X, createVNode as q, createTextVNode as Q, createCommentVNode as ce, createElementBlock as re, Fragment as Oe, renderList as st, withModifiers as Me, nextTick as Se, resolveDynamicComponent as rt, withKeys as Dt, normalizeStyle as zt, normalizeClass as Ve, reactive as $e, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
3
+ import { saveAs as it } from "file-saver";
4
+ import Ee from "exceljs";
5
+ import ke from "dayjs";
6
+ import { createI18n as At, useI18n as me } from "vue-i18n";
7
+ import { debounce as Re, cloneDeep as ct, isArray as Qe } from "lodash";
8
+ import { useRoute as jt, useRouter as Ut } from "vue-router";
9
+ import { createNamespacedHelpers as Be, useStore as ut, mapState as Pt, mapGetters as Rt, mapActions as Bt } from "vuex";
10
+ import { VxeUI as xe } from "vxe-pc-ui";
11
+ const Vn = ot({
12
12
  name: "LayOutForm",
13
- setup(t, { slots: e, attrs: n, emit: l }) {
14
- const s = R(null), o = () => e.default ? e.default().filter((r) => r.type !== Symbol.for("v-cmt")).map((r) => r.type === Symbol.for("v-fgt") ? r.children : r).flat().map(
15
- (r) => {
16
- var c;
17
- return Ie(
18
- kt,
19
- { span: ((c = r.props) == null ? void 0 : c.span) || 24 },
13
+ setup(t, { slots: e, attrs: n, emit: a }) {
14
+ const s = R(null), o = () => e.default ? e.default().filter((i) => i.type !== Symbol.for("v-cmt")).map((i) => i.type === Symbol.for("v-fgt") ? i.children : i).flat().map(
15
+ (i) => {
16
+ var r;
17
+ return Te(
18
+ St,
19
+ { span: ((r = i.props) == null ? void 0 : r.span) || 24 },
20
20
  {
21
- default: () => r
21
+ default: () => i
22
22
  }
23
23
  );
24
24
  }
25
25
  ) : null;
26
- nt(() => {
27
- l("ref", s.value);
26
+ lt(() => {
27
+ a("ref", s.value);
28
28
  });
29
- function a() {
30
- return Ie(
31
- Ct,
29
+ function l() {
30
+ return Te(
31
+ _t,
32
32
  { ...n, ref: s },
33
- () => Ie(xt, { gutter: n.gutter ?? 20 }, { default: () => o() })
33
+ () => Te($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
34
34
  );
35
35
  }
36
- return a;
36
+ return l;
37
37
  }
38
38
  });
39
- var ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
40
- function ut(t) {
39
+ var dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
40
+ function ft(t) {
41
41
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
42
42
  }
43
- var dt = { exports: {} };
43
+ var ht = { exports: {} };
44
44
  (function(t, e) {
45
- (function(n, l) {
46
- t.exports = l();
47
- })(ct, function() {
48
- var n = "minute", l = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
49
- return function(o, a, r) {
50
- var c = a.prototype;
51
- r.utc = function(f) {
52
- var m = { date: f, utc: !0, args: arguments };
53
- return new a(m);
54
- }, c.utc = function(f) {
55
- var m = r(this.toDate(), { locale: this.$L, utc: !0 });
56
- return f ? m.add(this.utcOffset(), n) : m;
57
- }, c.local = function() {
58
- return r(this.toDate(), { locale: this.$L, utc: !1 });
45
+ (function(n, a) {
46
+ t.exports = a();
47
+ })(dt, function() {
48
+ var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
49
+ return function(o, l, i) {
50
+ var r = l.prototype;
51
+ i.utc = function(u) {
52
+ var h = { date: u, utc: !0, args: arguments };
53
+ return new l(h);
54
+ }, r.utc = function(u) {
55
+ var h = i(this.toDate(), { locale: this.$L, utc: !0 });
56
+ return u ? h.add(this.utcOffset(), n) : h;
57
+ }, r.local = function() {
58
+ return i(this.toDate(), { locale: this.$L, utc: !1 });
59
59
  };
60
- var b = c.parse;
61
- c.parse = function(f) {
62
- f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), b.call(this, f);
60
+ var y = r.parse;
61
+ r.parse = function(u) {
62
+ u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), y.call(this, u);
63
63
  };
64
- var C = c.init;
65
- c.init = function() {
64
+ var b = r.init;
65
+ r.init = function() {
66
66
  if (this.$u) {
67
- var f = this.$d;
68
- this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
67
+ var u = this.$d;
68
+ this.$y = u.getUTCFullYear(), this.$M = u.getUTCMonth(), this.$D = u.getUTCDate(), this.$W = u.getUTCDay(), this.$H = u.getUTCHours(), this.$m = u.getUTCMinutes(), this.$s = u.getUTCSeconds(), this.$ms = u.getUTCMilliseconds();
69
69
  } else
70
- C.call(this);
70
+ b.call(this);
71
71
  };
72
- var w = c.utcOffset;
73
- c.utcOffset = function(f, m) {
74
- var _ = this.$utils().u;
75
- if (_(f))
76
- return this.$u ? 0 : _(this.$offset) ? w.call(this) : this.$offset;
77
- if (typeof f == "string" && (f = function(E) {
72
+ var w = r.utcOffset;
73
+ r.utcOffset = function(u, h) {
74
+ var k = this.$utils().u;
75
+ if (k(u))
76
+ return this.$u ? 0 : k(this.$offset) ? w.call(this) : this.$offset;
77
+ if (typeof u == "string" && (u = function(E) {
78
78
  E === void 0 && (E = "");
79
- var W = E.match(l);
80
- if (!W)
79
+ var Y = E.match(a);
80
+ if (!Y)
81
81
  return null;
82
- var A = ("" + W[0]).match(s) || ["-", 0, 0], u = A[0], v = 60 * +A[1] + +A[2];
83
- return v === 0 ? 0 : u === "+" ? v : -v;
84
- }(f), f === null))
82
+ var F = ("" + Y[0]).match(s) || ["-", 0, 0], d = F[0], x = 60 * +F[1] + +F[2];
83
+ return x === 0 ? 0 : d === "+" ? x : -x;
84
+ }(u), u === null))
85
85
  return this;
86
- var k = Math.abs(f) <= 16 ? 60 * f : f;
87
- if (k === 0)
88
- return this.utc(m);
89
- var S = this.clone();
90
- if (m)
91
- return S.$offset = k, S.$u = !1, S;
92
- var M = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
93
- return (S = this.local().add(k + M, n)).$offset = k, S.$x.$localOffset = M, S;
86
+ var _ = Math.abs(u) <= 16 ? 60 * u : u;
87
+ if (_ === 0)
88
+ return this.utc(h);
89
+ var C = this.clone();
90
+ if (h)
91
+ return C.$offset = _, C.$u = !1, C;
92
+ var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
93
+ return (C = this.local().add(_ + S, n)).$offset = _, C.$x.$localOffset = S, C;
94
94
  };
95
- var y = c.format;
96
- c.format = function(f) {
97
- var m = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
- return y.call(this, m);
99
- }, c.valueOf = function() {
100
- var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
101
- return this.$d.valueOf() - 6e4 * f;
102
- }, c.isUTC = function() {
95
+ var p = r.format;
96
+ r.format = function(u) {
97
+ var h = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
+ return p.call(this, h);
99
+ }, r.valueOf = function() {
100
+ var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
101
+ return this.$d.valueOf() - 6e4 * u;
102
+ }, r.isUTC = function() {
103
103
  return !!this.$u;
104
- }, c.toISOString = function() {
104
+ }, r.toISOString = function() {
105
105
  return this.toDate().toISOString();
106
- }, c.toString = function() {
106
+ }, r.toString = function() {
107
107
  return this.toDate().toUTCString();
108
108
  };
109
- var g = c.toDate;
110
- c.toDate = function(f) {
111
- return f === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
109
+ var g = r.toDate;
110
+ r.toDate = function(u) {
111
+ return u === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
112
112
  };
113
- var h = c.diff;
114
- c.diff = function(f, m, _) {
115
- if (f && this.$u === f.$u)
116
- return h.call(this, f, m, _);
117
- var k = this.local(), S = r(f).local();
118
- return h.call(k, S, m, _);
113
+ var m = r.diff;
114
+ r.diff = function(u, h, k) {
115
+ if (u && this.$u === u.$u)
116
+ return m.call(this, u, h, k);
117
+ var _ = this.local(), C = i(u).local();
118
+ return m.call(_, C, h, k);
119
119
  };
120
120
  };
121
121
  });
122
- })(dt);
123
- var Rt = dt.exports;
124
- const Bt = /* @__PURE__ */ ut(Rt);
125
- var ft = { exports: {} };
122
+ })(ht);
123
+ var Yt = ht.exports;
124
+ const Kt = /* @__PURE__ */ ft(Yt);
125
+ var mt = { exports: {} };
126
126
  (function(t, e) {
127
- (function(n, l) {
128
- t.exports = l();
129
- })(ct, function() {
130
- var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, l = {};
131
- return function(s, o, a) {
132
- var r, c = function(y, g, h) {
133
- h === void 0 && (h = {});
134
- var f = new Date(y), m = function(_, k) {
135
- k === void 0 && (k = {});
136
- var S = k.timeZoneName || "short", M = _ + "|" + S, E = l[M];
137
- return E || (E = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: _, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: S }), l[M] = E), E;
138
- }(g, h);
139
- return m.formatToParts(f);
140
- }, b = function(y, g) {
141
- for (var h = c(y, g), f = [], m = 0; m < h.length; m += 1) {
142
- var _ = h[m], k = _.type, S = _.value, M = n[k];
143
- M >= 0 && (f[M] = parseInt(S, 10));
127
+ (function(n, a) {
128
+ t.exports = a();
129
+ })(dt, function() {
130
+ var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
131
+ return function(s, o, l) {
132
+ var i, r = function(p, g, m) {
133
+ m === void 0 && (m = {});
134
+ var u = new Date(p), h = function(k, _) {
135
+ _ === void 0 && (_ = {});
136
+ var C = _.timeZoneName || "short", S = k + "|" + C, E = a[S];
137
+ return E || (E = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: k, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[S] = E), E;
138
+ }(g, m);
139
+ return h.formatToParts(u);
140
+ }, y = function(p, g) {
141
+ for (var m = r(p, g), u = [], h = 0; h < m.length; h += 1) {
142
+ var k = m[h], _ = k.type, C = k.value, S = n[_];
143
+ S >= 0 && (u[S] = parseInt(C, 10));
144
144
  }
145
- var E = f[3], W = E === 24 ? 0 : E, A = f[0] + "-" + f[1] + "-" + f[2] + " " + W + ":" + f[4] + ":" + f[5] + ":000", u = +y;
146
- return (a.utc(A).valueOf() - (u -= u % 1e3)) / 6e4;
147
- }, C = o.prototype;
148
- C.tz = function(y, g) {
149
- y === void 0 && (y = r);
150
- var h, f = this.utcOffset(), m = this.toDate(), _ = m.toLocaleString("en-US", { timeZone: y }), k = Math.round((m - new Date(_)) / 1e3 / 60), S = 15 * -Math.round(m.getTimezoneOffset() / 15) - k;
151
- if (!Number(S))
152
- h = this.utcOffset(0, g);
153
- else if (h = a(_, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(S, !0), g) {
154
- var M = h.utcOffset();
155
- h = h.add(f - M, "minute");
145
+ var E = u[3], Y = E === 24 ? 0 : E, F = u[0] + "-" + u[1] + "-" + u[2] + " " + Y + ":" + u[4] + ":" + u[5] + ":000", d = +p;
146
+ return (l.utc(F).valueOf() - (d -= d % 1e3)) / 6e4;
147
+ }, b = o.prototype;
148
+ b.tz = function(p, g) {
149
+ p === void 0 && (p = i);
150
+ var m, u = this.utcOffset(), h = this.toDate(), k = h.toLocaleString("en-US", { timeZone: p }), _ = Math.round((h - new Date(k)) / 1e3 / 60), C = 15 * -Math.round(h.getTimezoneOffset() / 15) - _;
151
+ if (!Number(C))
152
+ m = this.utcOffset(0, g);
153
+ else if (m = l(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), g) {
154
+ var S = m.utcOffset();
155
+ m = m.add(u - S, "minute");
156
156
  }
157
- return h.$x.$timezone = y, h;
158
- }, C.offsetName = function(y) {
159
- var g = this.$x.$timezone || a.tz.guess(), h = c(this.valueOf(), g, { timeZoneName: y }).find(function(f) {
160
- return f.type.toLowerCase() === "timezonename";
157
+ return m.$x.$timezone = p, m;
158
+ }, b.offsetName = function(p) {
159
+ var g = this.$x.$timezone || l.tz.guess(), m = r(this.valueOf(), g, { timeZoneName: p }).find(function(u) {
160
+ return u.type.toLowerCase() === "timezonename";
161
161
  });
162
- return h && h.value;
162
+ return m && m.value;
163
163
  };
164
- var w = C.startOf;
165
- C.startOf = function(y, g) {
164
+ var w = b.startOf;
165
+ b.startOf = function(p, g) {
166
166
  if (!this.$x || !this.$x.$timezone)
167
- return w.call(this, y, g);
168
- var h = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
- return w.call(h, y, g).tz(this.$x.$timezone, !0);
170
- }, a.tz = function(y, g, h) {
171
- var f = h && g, m = h || g || r, _ = b(+a(), m);
172
- if (typeof y != "string")
173
- return a(y).tz(m);
174
- var k = function(W, A, u) {
175
- var v = W - 60 * A * 1e3, z = b(v, u);
176
- if (A === z)
177
- return [v, A];
178
- var q = b(v -= 60 * (z - A) * 1e3, u);
179
- return z === q ? [v, z] : [W - 60 * Math.min(z, q) * 1e3, Math.max(z, q)];
180
- }(a.utc(y, f).valueOf(), _, m), S = k[0], M = k[1], E = a(S).utcOffset(M);
181
- return E.$x.$timezone = m, E;
182
- }, a.tz.guess = function() {
167
+ return w.call(this, p, g);
168
+ var m = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
+ return w.call(m, p, g).tz(this.$x.$timezone, !0);
170
+ }, l.tz = function(p, g, m) {
171
+ var u = m && g, h = m || g || i, k = y(+l(), h);
172
+ if (typeof p != "string")
173
+ return l(p).tz(h);
174
+ var _ = function(Y, F, d) {
175
+ var x = Y - 60 * F * 1e3, O = y(x, d);
176
+ if (F === O)
177
+ return [x, F];
178
+ var A = y(x -= 60 * (O - F) * 1e3, d);
179
+ return O === A ? [x, O] : [Y - 60 * Math.min(O, A) * 1e3, Math.max(O, A)];
180
+ }(l.utc(p, u).valueOf(), k, h), C = _[0], S = _[1], E = l(C).utcOffset(S);
181
+ return E.$x.$timezone = h, E;
182
+ }, l.tz.guess = function() {
183
183
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
184
- }, a.tz.setDefault = function(y) {
185
- r = y;
184
+ }, l.tz.setDefault = function(p) {
185
+ i = p;
186
186
  };
187
187
  };
188
188
  });
189
- })(ft);
190
- var Yt = ft.exports;
191
- const Kt = /* @__PURE__ */ ut(Yt), Ve = {
189
+ })(mt);
190
+ var Ht = mt.exports;
191
+ const Nt = /* @__PURE__ */ ft(Ht), qe = {
192
192
  // 组件通用文本
193
193
  "dao-ru": "导入",
194
194
  "quan-xuan": "全选",
@@ -206,6 +206,7 @@ const Kt = /* @__PURE__ */ ut(Yt), Ve = {
206
206
  "ti-jiao": "提交",
207
207
  "que-ding": "确定",
208
208
  "que-ding-guan-bi-ma": "确定关闭吗",
209
+ "xia-zai-dao-ru-mo-ban": "下载导入模板",
209
210
  // Excel 工具相关
210
211
  excel: {
211
212
  fieldsMappingRequired: "请输入列字段映射",
@@ -222,7 +223,7 @@ const Kt = /* @__PURE__ */ ut(Yt), Ve = {
222
223
  tools: {
223
224
  keysLengthError: "keys 长度必须大于2 默认前两位为 label value"
224
225
  }
225
- }, Me = {
226
+ }, Ae = {
226
227
  // Common component text
227
228
  "dao-ru": "Import",
228
229
  "quan-xuan": "Select All",
@@ -240,6 +241,7 @@ const Kt = /* @__PURE__ */ ut(Yt), Ve = {
240
241
  "ti-jiao": "Submit",
241
242
  "que-ding": "Confirm",
242
243
  "que-ding-guan-bi-ma": "Are you sure to close?",
244
+ "xia-zai-dao-ru-mo-ban": "Download Import Template",
243
245
  // Excel utilities
244
246
  excel: {
245
247
  fieldsMappingRequired: "Please enter column field mapping",
@@ -256,137 +258,237 @@ const Kt = /* @__PURE__ */ ut(Yt), Ve = {
256
258
  tools: {
257
259
  keysLengthError: "Keys length must be greater than 2, default first two are label and value"
258
260
  }
259
- }, Ht = {
260
- zh_cn: Ve,
261
- en_us: Me
261
+ }, Wt = {
262
+ zh_cn: qe,
263
+ en_us: Ae
262
264
  };
263
265
  let ye = null;
264
- function Nt(t = null) {
266
+ function Zt(t = null) {
265
267
  if (t) {
266
268
  const { global: e } = t;
267
- return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", Ve) : e.setLocaleMessage("zh_cn", Ve), e.messages.value.en_us ? e.mergeLocaleMessage("en_us", Me) : e.setLocaleMessage("en_us", Me), ye = t, t;
269
+ return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", qe) : e.setLocaleMessage("zh_cn", qe), e.messages.value.en_us ? e.mergeLocaleMessage("en_us", Ae) : e.setLocaleMessage("en_us", Ae), ye = t, t;
268
270
  }
269
- return ye || (ye = Mt({
271
+ return ye || (ye = At({
270
272
  legacy: !1,
271
273
  locale: "zh_cn",
272
274
  fallbackLocale: "zh_cn",
273
- messages: Ht
275
+ messages: Wt
274
276
  })), ye;
275
277
  }
276
- function Pe() {
277
- return ye || Nt();
278
+ function Ye() {
279
+ return ye || Zt();
278
280
  }
279
- function Re() {
280
- return Pe().global.t;
281
+ function ve() {
282
+ return Ye().global.t;
281
283
  }
282
- Se.extend(Bt);
283
- Se.extend(Kt);
284
- async function On(t, e) {
285
- const { fields: n, range: l = 1 } = e;
284
+ ke.extend(Kt);
285
+ ke.extend(Nt);
286
+ async function qn(t, e) {
287
+ const { fields: n, range: a = 1 } = e;
286
288
  if (!n) {
287
- const a = Re();
288
- throw new Error(a("excel.fieldsMappingRequired"));
289
+ const l = ve();
290
+ throw new Error(l("excel.fieldsMappingRequired"));
289
291
  }
290
- let s = new st.Workbook();
292
+ let s = new Ee.Workbook();
291
293
  await s.xlsx.load(t);
292
294
  const o = {};
293
- return s.eachSheet(function(a, r) {
294
- const c = [];
295
- a.eachRow(function(b, C) {
296
- if (C > l) {
297
- let w = {}, y = !0;
295
+ return s.eachSheet(function(l, i) {
296
+ const r = [];
297
+ l.eachRow(function(y, b) {
298
+ if (b > a) {
299
+ let w = {}, p = !0;
298
300
  Object.keys(n).forEach((g) => {
299
- const h = b.getCell(n[g]).value;
300
- w[g] = h, h && (y = !1);
301
- }), y || c.push(w);
301
+ const m = y.getCell(n[g]).value;
302
+ w[g] = m, m && (p = !1);
303
+ }), p || r.push(w);
302
304
  }
303
- }), o[a._name] = c;
305
+ }), o[l._name] = r;
304
306
  }), s = null, o;
305
307
  }
306
- const Zt = {
308
+ const gt = {
307
309
  columnWidth: 30
308
310
  };
309
- async function Gt(t, e, n = [], l = {}) {
311
+ async function An(t, e, n = [], a = {}) {
310
312
  if (!t || !e)
311
313
  return;
312
- const { columnStyle: s } = l, { columnWidth: o } = Zt;
313
- e.forEach((c) => {
314
- c.width = c.width ? c.width : o;
314
+ const { columnStyle: s } = a, { columnWidth: o } = gt;
315
+ e.forEach((r) => {
316
+ r.width = r.width ? r.width : o;
315
317
  });
316
- const { workbook: a, worksheet: r } = Wt();
317
- r.columns = e, r.addRows(n), s && await Jt(a, r, s);
318
+ const { workbook: l, worksheet: i } = Gt();
319
+ i.columns = e, i.addRows(n), s && await Jt(l, i, s);
318
320
  try {
319
- const c = await a.xlsx.writeBuffer(), b = new File([c], t, {
321
+ const r = await l.xlsx.writeBuffer(), y = new File([r], t, {
320
322
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
321
323
  });
322
- Vt(b);
323
- } catch (c) {
324
- console.log(c);
324
+ it(y);
325
+ } catch (r) {
326
+ console.log(r);
325
327
  }
326
328
  }
327
- function Wt() {
328
- const t = new st.Workbook();
329
+ function Gt() {
330
+ const t = new Ee.Workbook();
329
331
  t.creator = "distributor System", t.lastModifiedBy = "distributor System", t.created = /* @__PURE__ */ new Date(), t.modified = /* @__PURE__ */ new Date(), t.lastPrinted = /* @__PURE__ */ new Date();
330
332
  const e = t.addWorksheet("Sheet1");
331
333
  return { workbook: t, worksheet: e };
332
334
  }
333
335
  async function Jt(t, e, n) {
334
- const l = Object.keys(n);
335
- for (const s of l) {
336
- const o = n[s], { type: a } = o;
337
- switch (a) {
336
+ const a = Object.keys(n);
337
+ for (const s of a) {
338
+ const o = n[s], { type: l } = o;
339
+ switch (l) {
338
340
  case "IMG":
339
341
  await Xt(t, e, s);
340
342
  break;
341
343
  }
342
344
  }
343
345
  }
344
- async function Xt(t, e, n, l) {
346
+ async function Xt(t, e, n, a) {
345
347
  const s = e.getColumn(n), o = s.values;
346
- e.getColumn(n).width = 20, e.eachRow((a, r) => {
347
- r > 1 && (a.height = 40);
348
+ e.getColumn(n).width = 20, e.eachRow((l, i) => {
349
+ i > 1 && (l.height = 40);
348
350
  });
349
- for (let a = 0, r = o.length; a < r; a++) {
350
- if (a < 2)
351
+ for (let l = 0, i = o.length; l < i; l++) {
352
+ if (l < 2)
351
353
  continue;
352
- let c = o[a];
353
- c && (e.getCell(s.letter + a).value = "", await Qt(t, e, c, {
354
+ let r = o[l];
355
+ r && (e.getCell(s.letter + l).value = "", await Qt(t, e, r, {
354
356
  width: 100,
355
357
  height: 50,
356
358
  col: s._number - 1,
357
- row: a - 1
359
+ row: l - 1
358
360
  }));
359
361
  }
360
362
  }
361
- async function Qt(t, e, n, l) {
362
- const { col: s, row: o, width: a, height: r } = l, { success: c, base64: b } = await en(n, 0.3);
363
- if (c) {
364
- const C = t.addImage({
365
- base64: b,
363
+ async function Qt(t, e, n, a) {
364
+ const { col: s, row: o, width: l, height: i } = a, { success: r, base64: y } = await en(n, 0.3);
365
+ if (r) {
366
+ const b = t.addImage({
367
+ base64: y,
366
368
  extension: "jpeg"
367
369
  });
368
- e.addImage(C, {
370
+ e.addImage(b, {
369
371
  tl: { col: s, row: o },
370
- ext: { width: a, height: r }
372
+ ext: { width: l, height: i }
371
373
  });
372
374
  }
373
375
  }
374
376
  function en(t, e = 1) {
375
377
  const n = new Image();
376
- return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((l, s) => {
378
+ return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a, s) => {
377
379
  n.onload = () => {
378
380
  const o = document.createElement("canvas");
379
- o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), l({
381
+ o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), a({
380
382
  success: !0,
381
383
  //canvas.toDataURL的方法将图片的绝对路径转换为base64编码
382
384
  base64: o.toDataURL("image/jpeg", e)
383
385
  });
384
386
  }, n.onerror = () => {
385
- l({ success: !1 });
387
+ a({ success: !1 });
386
388
  };
387
389
  });
388
390
  }
389
- function tn(t) {
391
+ const je = "---";
392
+ async function tn(t, e) {
393
+ const { fields: n, range: a = 1 } = e;
394
+ if (!n) {
395
+ const l = ve();
396
+ throw new Error(l("excel.fieldsMappingRequired"));
397
+ }
398
+ let s = new Ee.Workbook();
399
+ await s.xlsx.load(t);
400
+ const o = {};
401
+ return s.eachSheet(function(l, i) {
402
+ if (l.state == "visible") {
403
+ const r = [], y = n[l._name];
404
+ if (y) {
405
+ let b = Object.values(y).some((p) => p.includes("image")), w = {};
406
+ b && (l.getImages().forEach((g) => {
407
+ const { tl: m } = g.range, u = s.model.media.find((h) => h.index === g.imageId);
408
+ if (u) {
409
+ const h = u.buffer.toString("base64"), k = `data:image/${u.extension};base64,${h}`, _ = `${Math.ceil(m.row)}_${Math.ceil(m.col)}`;
410
+ w[_] ? w[_].push(k) : w[_] = [k];
411
+ }
412
+ }), console.log("withImages-imageMap", w)), l.eachRow(function(p, g) {
413
+ if (g > a) {
414
+ let m = {}, u = !0;
415
+ Object.keys(y).forEach((h) => {
416
+ var E;
417
+ let [k, _] = y[h].split(je);
418
+ const C = p.getCell(k);
419
+ let S;
420
+ if (_ == "image" && b) {
421
+ const Y = C._column._number, F = `${g}_${Y}`;
422
+ S = w[F] || "";
423
+ } else
424
+ C.result != null ? S = C.result : (E = C.value) != null && E.richText ? S = C.value.richText.reduce((Y, F) => Y + F.text, "") : C.type == 4 && C.value ? S = ke(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = C.value;
425
+ S && _ == "option" && (S = S.split(je)[1]), m[h] = S, S && (u = !1);
426
+ }), u || r.push(m);
427
+ }
428
+ }), o[l._name] = r;
429
+ }
430
+ }
431
+ }), s = null, o;
432
+ }
433
+ async function nn(t, e) {
434
+ if (!t || e.length == 0)
435
+ return;
436
+ const n = on(e);
437
+ n.eachSheet(function(a, s) {
438
+ const { columnWidth: o } = gt, { tableHeader: l, tableData: i } = e[a._name];
439
+ l.forEach((r) => {
440
+ if (r.required) {
441
+ const y = r.style || {}, { font: b = {} } = y;
442
+ r.style = {
443
+ ...y,
444
+ font: {
445
+ ...b,
446
+ color: {
447
+ argb: "FFFF0000"
448
+ }
449
+ }
450
+ };
451
+ }
452
+ }), a.columns = l, a.addRows(i), l.forEach((r) => {
453
+ const { header: y, key: b, width: w, option: p } = r, g = a.getColumn(b);
454
+ if (g.width = w || o, p) {
455
+ const m = n.addWorksheet(b);
456
+ m.state = "hidden", m.getColumn(1).values = p.map((u) => `${u.label}${je}${u.value}`), Array(100).fill("").forEach((u, h) => {
457
+ if (h > 0) {
458
+ const k = ve();
459
+ a.getCell(`${g.letter}${h}`).dataValidation = {
460
+ type: "list",
461
+ formulae: [`${b}!$A$1:$A$${p.length}`],
462
+ showErrorMessage: !0,
463
+ error: k("excel.invalidInput"),
464
+ errorStyle: "stop",
465
+ errorMessage: k("excel.invalidOption")
466
+ };
467
+ }
468
+ });
469
+ }
470
+ });
471
+ });
472
+ try {
473
+ const a = await n.xlsx.writeBuffer(), s = new File([a], t, {
474
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
475
+ });
476
+ it(s);
477
+ } catch (a) {
478
+ console.log(a);
479
+ }
480
+ }
481
+ function on(t) {
482
+ const e = ve(), n = new Ee.Workbook();
483
+ return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(t).sort((s, o) => {
484
+ const l = t[s].sort ?? 0, i = t[o].sort ?? 0;
485
+ return l - i;
486
+ }).forEach((s) => {
487
+ let o = s, l = !1;
488
+ /[\\/:*?\[\]]/g.test(s) && (s = s.replace(/[\\/:*?\[\]]/g, ""), l = !0), s.length > 31 && (s = s.substring(0, 31).trim(), l = !0, console.warn(e("excel.sheetNameTooLong", [o, s]))), l && (t[s] = t[o], delete t[o]), n.addWorksheet(s);
489
+ }), n;
490
+ }
491
+ function ln(t) {
390
492
  if (t < 26)
391
493
  return String.fromCharCode(65 + t);
392
494
  {
@@ -394,48 +496,48 @@ function tn(t) {
394
496
  return e + n;
395
497
  }
396
498
  }
397
- function Vn(t) {
499
+ function jn(t) {
398
500
  return new Promise((e) => {
399
501
  setTimeout(() => {
400
502
  e();
401
503
  }, t);
402
504
  });
403
505
  }
404
- function Mn(t) {
506
+ function Un(t) {
405
507
  return JSON.parse(JSON.stringify(t));
406
508
  }
407
- function qn(t) {
408
- let e = [], n = {}, l = (s, o) => Object.prototype.hasOwnProperty.call(s, o);
509
+ function Pn(t) {
510
+ let e = [], n = {}, a = (s, o) => Object.prototype.hasOwnProperty.call(s, o);
409
511
  for (const s of t) {
410
512
  n[s.id] = {
411
513
  ...s,
412
514
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
413
- children: l(n, s.id) ? n[s.id].children : []
515
+ children: a(n, s.id) ? n[s.id].children : []
414
516
  };
415
517
  const o = n[s.id];
416
- s.pid == -1 ? e.push(o) : (l(n, s.pid) || (n[s.pid] = {
518
+ s.pid == -1 ? e.push(o) : (a(n, s.pid) || (n[s.pid] = {
417
519
  children: []
418
520
  }), n[s.pid].children.push(o));
419
521
  }
420
522
  return e;
421
523
  }
422
- function ht(t, e = " ") {
524
+ function pt(t, e = " ") {
423
525
  return t ? t.split(e).filter((n) => n.trim()) : [];
424
526
  }
425
- class Xe {
527
+ class et {
426
528
  constructor(e, n = ["label", "value", "labelEn"]) {
427
- this.list = e.map((l) => ({
428
- ...l,
429
- label: l[n[0]],
430
- labelEn: l[n[2]] || l[n[0]] || "",
431
- value: l[n[1]]
432
- })), this.map = new Map(this.list.map((l) => [l[n[1]], l]));
529
+ this.list = e.map((a) => ({
530
+ ...a,
531
+ label: a[n[0]],
532
+ labelEn: a[n[2]] || a[n[0]] || "",
533
+ value: a[n[1]]
534
+ })), this.map = new Map(this.list.map((a) => [a[n[1]], a]));
433
535
  }
434
536
  getName(e) {
435
537
  if (!this.has(e))
436
538
  return "-";
437
- const n = Pe().global.locale, { label: l, labelEn: s } = this.map.get(e);
438
- return (n.value == "zh_cn" ? l : s) || l || "-";
539
+ const n = Ye().global.locale, { label: a, labelEn: s } = this.map.get(e);
540
+ return (n.value == "zh_cn" ? a : s) || a || "-";
439
541
  }
440
542
  getTag(e) {
441
543
  if (!this.has(e))
@@ -456,52 +558,52 @@ class Xe {
456
558
  return this.map.has(e);
457
559
  }
458
560
  }
459
- function An(t, e = [], n = "i18nName") {
561
+ function Rn(t, e = [], n = "i18nName") {
460
562
  if (t.length == 0)
461
- return new Xe([]);
563
+ return new et([]);
462
564
  if (e.length < 2) {
463
- const s = Re();
565
+ const s = ve();
464
566
  throw new Error(s("tools.keysLengthError"));
465
567
  }
466
- let l = t.map((s) => {
568
+ let a = t.map((s) => {
467
569
  let o = {};
468
- return n && (o.labelEn = s[n]), e.forEach((a, r) => {
469
- r === 0 ? o.label = s[a] : r === 1 ? o.value = s[a] : o[a] = s[a];
570
+ return n && (o.labelEn = s[n]), e.forEach((l, i) => {
571
+ i === 0 ? o.label = s[l] : i === 1 ? o.value = s[l] : o[l] = s[l];
470
572
  }), o;
471
573
  });
472
- return new Xe(l);
574
+ return new et(a);
473
575
  }
474
- function Un(t) {
576
+ function Bn(t) {
475
577
  return t ? t.replace(/<[^>]+>/g, "") : "";
476
578
  }
477
- function jn(t) {
579
+ function Yn(t) {
478
580
  return t ? (t.includes("\\\\u") && (t = t.replace(/\\/g, "")), t.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
479
581
  }
480
- function Pn(t, e = 10) {
582
+ function Kn(t, e = 10) {
481
583
  let n = 1048576 * e;
482
584
  return !(t.size > n);
483
585
  }
484
- function Rn(t) {
485
- return Array.from(10).fill(0).map((n, l) => t + "_" + l);
586
+ function Hn(t) {
587
+ return Array.from(10).fill(0).map((n, a) => t + "_" + a);
486
588
  }
487
- function Bn(t) {
589
+ function Nn(t) {
488
590
  let e = {};
489
- return t.map((n, l) => {
490
- let { key: s, option: o, type: a } = n, r = tn(l);
491
- o ? e[s] = `${r}---option` : a === "image" ? e[s] = `${r}---image` : e[s] = r;
591
+ return t.map((n, a) => {
592
+ let { key: s, option: o, type: l } = n, i = ln(a);
593
+ o ? e[s] = `${i}---option` : l === "image" ? e[s] = `${i}---image` : e[s] = i;
492
594
  }), e;
493
595
  }
494
- function Yn(t, e) {
495
- return e.split(".").reduce((n, l) => n && n[l], t);
596
+ function Wn(t, e) {
597
+ return e.split(".").reduce((n, a) => n && n[a], t);
496
598
  }
497
- const xe = (t, e) => {
599
+ const _e = (t, e) => {
498
600
  const n = t.__vccOpts || t;
499
- for (const [l, s] of e)
500
- n[l] = s;
601
+ for (const [a, s] of e)
602
+ n[a] = s;
501
603
  return n;
502
- }, nn = ["onClick"], on = {
604
+ }, an = ["onClick"], sn = {
503
605
  __name: "index",
504
- props: /* @__PURE__ */ We({
606
+ props: /* @__PURE__ */ Xe({
505
607
  api: {
506
608
  type: Function
507
609
  },
@@ -537,128 +639,128 @@ const xe = (t, e) => {
537
639
  modelValue: {},
538
640
  modelModifiers: {}
539
641
  }),
540
- emits: /* @__PURE__ */ We(["success", "change", "changeAll"], ["update:modelValue"]),
642
+ emits: /* @__PURE__ */ Xe(["success", "change", "changeAll"], ["update:modelValue"]),
541
643
  setup(t, { emit: e }) {
542
- const n = t, l = Lt(), { t: s, locale: o } = me(), a = Et(t, "modelValue"), r = se(() => l["value-key"] != null), c = R(""), b = se(() => {
543
- if (l.remote !== void 0)
644
+ const n = t, a = Ft(), { t: s, locale: o } = me(), l = Tt(t, "modelValue"), i = se(() => a["value-key"] != null), r = R(""), y = se(() => {
645
+ if (a.remote !== void 0)
544
646
  return n.data;
545
- const u = ht(c.value), { data: v, labelValue: z } = n, q = v || y.value;
546
- if (u.length == 0)
547
- return q;
548
- const { label: oe, labelEn: ue } = z;
549
- let p = o.value == "en_us" ? ue || "i18nName" : oe;
550
- return u.length == 1 ? q.filter(
551
- (ie) => ie[p].toLowerCase().includes(u[0].toLowerCase())
552
- ) : q.filter((ie) => {
647
+ const d = pt(r.value), { data: x, labelValue: O } = n, A = x || p.value;
648
+ if (d.length == 0)
649
+ return A;
650
+ const { label: oe, labelEn: ue } = O;
651
+ let v = o.value == "en_us" ? ue || "i18nName" : oe;
652
+ return d.length == 1 ? A.filter(
653
+ (ie) => ie[v].toLowerCase().includes(d[0].toLowerCase())
654
+ ) : A.filter((ie) => {
553
655
  let pe = !1;
554
- return pe = u.some(
555
- (ve) => ie[p].toLowerCase() == ve.toLowerCase()
656
+ return pe = d.some(
657
+ (be) => ie[v].toLowerCase() == be.toLowerCase()
556
658
  ), pe;
557
659
  });
558
- }), C = se({
660
+ }), b = se({
559
661
  get() {
560
- return l.multiple == null || a.value == null ? !1 : a.value.length == b.value.length;
662
+ return a.multiple == null || l.value == null ? !1 : l.value.length == y.value.length;
561
663
  },
562
- set(u) {
563
- return u;
664
+ set(d) {
665
+ return d;
564
666
  }
565
- }), w = e, y = R([]), g = async () => {
566
- const { data: u } = await n.api();
567
- y.value = [...u], w("success", y);
667
+ }), w = e, p = R([]), g = async () => {
668
+ const { data: d } = await n.api();
669
+ p.value = [...d], w("success", p);
568
670
  };
569
671
  n.api && g();
570
- function h(u) {
571
- w("change", u);
672
+ function m(d) {
673
+ w("change", d);
572
674
  }
573
- const f = n.labelValue.label.split("-"), m = (u) => {
574
- if (f.length == 1) {
675
+ const u = n.labelValue.label.split("-"), h = (d) => {
676
+ if (u.length == 1) {
575
677
  if (n.changeLocal)
576
- return s(u[n.labelValue.label]);
577
- let v = o.value == "en_us" ? u[n.labelValue.labelEn || "i18nName"] : u[n.labelValue.label];
578
- return v = v || u[n.labelValue.label], v;
678
+ return s(d[n.labelValue.label]);
679
+ let x = o.value == "en_us" ? d[n.labelValue.labelEn || "i18nName"] : d[n.labelValue.label];
680
+ return x = x || d[n.labelValue.label], x;
579
681
  } else {
580
- let v = [];
581
- return f.forEach((z) => {
582
- v.push(u[z]);
583
- }), v.join("-");
682
+ let x = [];
683
+ return u.forEach((O) => {
684
+ x.push(d[O]);
685
+ }), x.join("-");
584
686
  }
585
687
  };
586
- function _(u) {
587
- let v = n.data ? n.data : y.value;
588
- a.value = u ? v.map(
589
- (z) => r.value ? z : z[n.labelValue.value]
590
- ) : [], _e(() => {
591
- w("change", a.value), w("changeAll", a.value, v);
688
+ function k(d) {
689
+ let x = n.data ? n.data : p.value;
690
+ l.value = d ? x.map(
691
+ (O) => i.value ? O : O[n.labelValue.value]
692
+ ) : [], Se(() => {
693
+ w("change", l.value), w("changeAll", l.value, x);
592
694
  });
593
695
  }
594
- function k(u) {
595
- n.optionClick && n.optionClick(u), w("change", r.value ? u : u[n.labelValue.value]);
696
+ function _(d) {
697
+ n.optionClick && n.optionClick(d), w("change", i.value ? d : d[n.labelValue.value]);
596
698
  }
597
- function S(u) {
598
- return a.value.length >= n.maxLimit && !a.value.includes(u[n.labelValue.value]);
699
+ function C(d) {
700
+ return l.value.length >= n.maxLimit && !l.value.includes(d[n.labelValue.value]);
599
701
  }
600
- function M(u) {
601
- return u.map((v) => ({
602
- ...v,
603
- label: m(v),
604
- value: r.value ? v : v[n.labelValue.value]
702
+ function S(d) {
703
+ return d.map((x) => ({
704
+ ...x,
705
+ label: h(x),
706
+ value: i.value ? x : x[n.labelValue.value]
605
707
  }));
606
708
  }
607
- const E = R([]), W = n.data ? n.data : y.value;
608
- E.value = M(W), Ae(
609
- () => n.data ? n.data : y.value,
610
- (u) => {
611
- var z;
612
- const v = M(u);
613
- if (v.length !== E.value.length)
614
- E.value = v;
709
+ const E = R([]), Y = n.data ? n.data : p.value;
710
+ E.value = S(Y), Pe(
711
+ () => n.data ? n.data : p.value,
712
+ (d) => {
713
+ var O;
714
+ const x = S(d);
715
+ if (x.length !== E.value.length)
716
+ E.value = x;
615
717
  else {
616
- let q = !1;
617
- for (let oe = 0; oe < v.length; oe++)
618
- if (v[oe].value !== ((z = E.value[oe]) == null ? void 0 : z.value)) {
619
- q = !0;
718
+ let A = !1;
719
+ for (let oe = 0; oe < x.length; oe++)
720
+ if (x[oe].value !== ((O = E.value[oe]) == null ? void 0 : O.value)) {
721
+ A = !0;
620
722
  break;
621
723
  }
622
- q && (E.value = v);
724
+ A && (E.value = x);
623
725
  }
624
726
  },
625
727
  { deep: !0 }
626
728
  );
627
- const A = se(() => E.value);
628
- return (u, v) => {
629
- const z = F("el-checkbox"), q = F("el-select-v2"), oe = F("el-option"), ue = F("el-select");
630
- return K(l).v2 != null ? (L(), B(q, he({
729
+ const F = se(() => E.value);
730
+ return (d, x) => {
731
+ const O = z("el-checkbox"), A = z("el-select-v2"), oe = z("el-option"), ue = z("el-select");
732
+ return H(a).v2 != null ? (L(), B(A, he({
631
733
  key: 0,
632
- options: A.value,
633
- modelValue: a.value,
634
- "onUpdate:modelValue": v[1] || (v[1] = (p) => a.value = p)
635
- }, K(l), {
734
+ options: F.value,
735
+ modelValue: l.value,
736
+ "onUpdate:modelValue": x[1] || (x[1] = (v) => l.value = v)
737
+ }, H(a), {
636
738
  filterable: "",
637
739
  "collapse-tags": "",
638
740
  "collapse-tags-tooltip": "",
639
741
  clearable: "",
640
- onChange: h,
641
- onClear: h
642
- }), ot({
643
- default: T(({ item: p }) => [
742
+ onChange: m,
743
+ onClear: m
744
+ }), at({
745
+ default: D(({ item: v }) => [
644
746
  ae("div", {
645
- onClick: (ge) => k(p)
646
- }, J(p.label), 9, nn)
747
+ onClick: (ge) => _(v)
748
+ }, J(v.label), 9, an)
647
749
  ]),
648
750
  _: 2
649
751
  }, [
650
- K(l).multiple != null ? {
752
+ H(a).multiple != null ? {
651
753
  name: "header",
652
- fn: T(() => [
653
- X(u.$slots, "header", {}, () => [
654
- V(z, {
754
+ fn: D(() => [
755
+ X(d.$slots, "header", {}, () => [
756
+ q(O, {
655
757
  class: "mgl20",
656
- modelValue: C.value,
657
- "onUpdate:modelValue": v[0] || (v[0] = (p) => C.value = p),
658
- onChange: _
758
+ modelValue: b.value,
759
+ "onUpdate:modelValue": x[0] || (x[0] = (v) => b.value = v),
760
+ onChange: k
659
761
  }, {
660
- default: T(() => [
661
- Q(J(u.$t("quan-xuan")), 1)
762
+ default: D(() => [
763
+ Q(J(d.$t("quan-xuan")), 1)
662
764
  ]),
663
765
  _: 1
664
766
  }, 8, ["modelValue"])
@@ -668,42 +770,42 @@ const xe = (t, e) => {
668
770
  } : void 0
669
771
  ]), 1040, ["options", "modelValue"])) : (L(), B(ue, he({
670
772
  key: 1,
671
- modelValue: a.value,
672
- "onUpdate:modelValue": v[3] || (v[3] = (p) => a.value = p),
773
+ modelValue: l.value,
774
+ "onUpdate:modelValue": x[3] || (x[3] = (v) => l.value = v),
673
775
  filterable: "",
674
776
  "collapse-tags": "",
675
777
  "collapse-tags-tooltip": "",
676
- "filter-method": K(l).remote != null ? void 0 : (p) => c.value = p,
778
+ "filter-method": H(a).remote != null ? void 0 : (v) => r.value = v,
677
779
  clearable: ""
678
- }, K(l), { onClear: t.optionClick }), {
679
- default: T(() => [
680
- K(l).multiple != null && t.showCheckAll && t.maxLimit == null ? X(u.$slots, "header", { key: 0 }, () => [
681
- V(z, {
780
+ }, H(a), { onClear: t.optionClick }), {
781
+ default: D(() => [
782
+ H(a).multiple != null && t.showCheckAll && t.maxLimit == null ? X(d.$slots, "header", { key: 0 }, () => [
783
+ q(O, {
682
784
  class: "mgl20",
683
- modelValue: C.value,
684
- "onUpdate:modelValue": v[2] || (v[2] = (p) => C.value = p),
685
- onChange: _
785
+ modelValue: b.value,
786
+ "onUpdate:modelValue": x[2] || (x[2] = (v) => b.value = v),
787
+ onChange: k
686
788
  }, {
687
- default: T(() => [
688
- Q(J(u.$t("quan-xuan")), 1)
789
+ default: D(() => [
790
+ Q(J(d.$t("quan-xuan")), 1)
689
791
  ]),
690
792
  _: 1
691
793
  }, 8, ["modelValue"])
692
794
  ], !0) : ce("", !0),
693
- (L(!0), re(ze, null, lt(b.value, (p, ge) => (L(), B(oe, {
795
+ (L(!0), re(Oe, null, st(y.value, (v, ge) => (L(), B(oe, {
694
796
  key: ge,
695
- label: m(p),
696
- disabled: K(l).multiple != null && t.maxLimit > 0 ? S(p) : !1,
697
- onClick: De((ie) => k(p), ["stop"]),
698
- value: r.value ? p : p[t.labelValue.value]
797
+ label: h(v),
798
+ disabled: H(a).multiple != null && t.maxLimit > 0 ? C(v) : !1,
799
+ onClick: Me((ie) => _(v), ["stop"]),
800
+ value: i.value ? v : v[t.labelValue.value]
699
801
  }, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
700
802
  ]),
701
803
  _: 3
702
804
  }, 16, ["modelValue", "filter-method", "onClear"]));
703
805
  };
704
806
  }
705
- }, ln = /* @__PURE__ */ xe(on, [["__scopeId", "data-v-d12f3c20"]]);
706
- const an = tt({
807
+ }, rn = /* @__PURE__ */ _e(sn, [["__scopeId", "data-v-d12f3c20"]]);
808
+ const cn = ot({
707
809
  props: {
708
810
  name: {
709
811
  tyepe: String,
@@ -711,32 +813,32 @@ const an = tt({
711
813
  }
712
814
  }
713
815
  });
714
- function sn(t, e, n, l, s, o) {
715
- const a = F("el-icon");
716
- return L(), B(a, { class: "cmp-icon" }, {
717
- default: T(() => [
718
- (L(), B(at(t.name)))
816
+ function un(t, e, n, a, s, o) {
817
+ const l = z("el-icon");
818
+ return L(), B(l, { class: "cmp-icon" }, {
819
+ default: D(() => [
820
+ (L(), B(rt(t.name)))
719
821
  ]),
720
822
  _: 1
721
823
  });
722
824
  }
723
- const mt = /* @__PURE__ */ xe(an, [["render", sn], ["__scopeId", "data-v-733f9daa"]]), Kn = {
825
+ const yt = /* @__PURE__ */ _e(cn, [["render", un], ["__scopeId", "data-v-733f9daa"]]), Zn = {
724
826
  __name: "index",
725
827
  emits: ["ok", "no"],
726
828
  setup(t, { emit: e }) {
727
- const n = e, l = Ue(() => {
829
+ const n = e, a = Re(() => {
728
830
  n("ok");
729
831
  }, 500);
730
832
  function s() {
731
833
  n("no");
732
834
  }
733
- return (o, a) => {
734
- const r = F("el-popconfirm");
735
- return L(), B(r, he(o.$attrs, {
736
- onConfirm: K(l),
835
+ return (o, l) => {
836
+ const i = z("el-popconfirm");
837
+ return L(), B(i, he(o.$attrs, {
838
+ onConfirm: H(a),
737
839
  onCancel: s
738
840
  }), {
739
- reference: T(() => [
841
+ reference: D(() => [
740
842
  X(o.$slots, "default")
741
843
  ]),
742
844
  _: 3
@@ -744,69 +846,73 @@ const mt = /* @__PURE__ */ xe(an, [["render", sn], ["__scopeId", "data-v-733f9da
744
846
  };
745
847
  }
746
848
  };
747
- const rn = ["accept"], cn = {
849
+ const dn = ["accept"], fn = {
748
850
  __name: "index",
749
851
  props: {
750
852
  accept: {
751
853
  type: String,
752
854
  default: ".xlsx,.xls"
753
855
  },
754
- loading: {
755
- type: Boolean,
756
- default: !1
856
+ fields: {
857
+ type: Object,
858
+ default: () => ({})
757
859
  }
758
860
  },
759
861
  emits: ["fileChange"],
760
862
  setup(t, { emit: e }) {
761
- const n = e, l = R(null);
762
- function s(o) {
763
- let a = o.target.files[0];
764
- n("fileChange", a), l.value.value = null;
863
+ const n = t, a = e, s = R(null), o = R(!1);
864
+ async function l(i) {
865
+ o.value = !0;
866
+ let r = i.target.files[0];
867
+ const y = await tn(r, n.fields).finally(() => {
868
+ o.value = !1, s.value.value = null;
869
+ });
870
+ a("fileChange", y);
765
871
  }
766
- return (o, a) => {
767
- const r = F("el-button");
872
+ return (i, r) => {
873
+ const y = z("el-button");
768
874
  return L(), re("span", null, [
769
- V(r, {
770
- loading: t.loading,
875
+ q(y, {
876
+ loading: o.value,
771
877
  class: "mgr10",
772
- onClick: a[0] || (a[0] = (c) => l.value.click())
878
+ onClick: r[0] || (r[0] = (b) => s.value.click())
773
879
  }, {
774
- default: T(() => [
775
- Q(J(o.$t("dao-ru")), 1)
880
+ default: D(() => [
881
+ Q(J(i.$t("dao-ru")), 1)
776
882
  ]),
777
883
  _: 1
778
884
  }, 8, ["loading"]),
779
885
  ae("input", {
780
- onChange: s,
886
+ onChange: l,
781
887
  ref_key: "input",
782
- ref: l,
888
+ ref: s,
783
889
  accept: t.accept,
784
890
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
785
891
  type: "file"
786
- }, null, 40, rn)
892
+ }, null, 40, dn)
787
893
  ]);
788
894
  };
789
895
  }
790
- }, Hn = /* @__PURE__ */ xe(cn, [["__scopeId", "data-v-5f1449ad"]]);
791
- function qe(t) {
896
+ }, Gn = /* @__PURE__ */ _e(fn, [["__scopeId", "data-v-74e50b2f"]]);
897
+ function Ue(t) {
792
898
  let e = {};
793
899
  return t.forEach((n) => {
794
- const { key: l, type: s, option: o = {}, value: a, dateType: r = "date" } = n;
795
- if (l)
900
+ const { key: a, type: s, option: o = {}, value: l, dateType: i = "date" } = n;
901
+ if (a)
796
902
  if (s == "input" && (o != null && o.multiple))
797
- e[l] = ht(a);
903
+ e[a] = pt(l);
798
904
  else if (s == "date")
799
- if (r.includes("range")) {
800
- const [c, b] = l;
801
- let [C, w] = a || [];
802
- C && r == "daterange" && (C = Se(C).format("YYYY-MM-DD 00:00:00"), w = Se(w).format("YYYY-MM-DD 23:59:59")), e[c] = C, e[b] = w;
905
+ if (i.includes("range")) {
906
+ const [r, y] = a;
907
+ let [b, w] = l || [];
908
+ b && i == "daterange" && (b = ke(b).format("YYYY-MM-DD 00:00:00"), w = ke(w).format("YYYY-MM-DD 23:59:59")), e[r] = b, e[y] = w;
803
909
  } else
804
- e[l] = a;
910
+ e[a] = l;
805
911
  else
806
- e[l] = a;
912
+ e[a] = l;
807
913
  }), e;
808
914
  }
809
- const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { class: "right" }, mn = {
915
+ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { class: "right" }, yn = {
810
916
  __name: "index",
811
917
  props: {
812
918
  form: {
@@ -816,83 +922,83 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
816
922
  },
817
923
  emits: ["confirm", "reset", "visibleChange"],
818
924
  setup(t, { expose: e, emit: n }) {
819
- const l = t, s = n, o = R(!0), a = R(null), { t: r } = me(), c = se(() => o.value ? r("guan-bi") : r("zhan-kai"));
820
- function b() {
925
+ const a = t, s = n, o = R(!0), l = R(null), { t: i } = me(), r = se(() => o.value ? i("guan-bi") : i("zhan-kai"));
926
+ function y() {
821
927
  s("confirm");
822
928
  }
823
- function C(m) {
824
- m.option.onClear && m.option.onClear(), s("confirm");
929
+ function b(h) {
930
+ h.option.onClear && h.option.onClear(), s("confirm");
825
931
  }
826
932
  function w() {
827
933
  s("reset");
828
934
  }
829
- function y() {
935
+ function p() {
830
936
  s("confirm");
831
937
  }
832
938
  function g() {
833
- return qe(l.form.items);
939
+ return Ue(a.form.items);
834
940
  }
835
- const h = rt(l.form.items);
836
- function f() {
837
- l.form.items.forEach((m) => {
838
- const _ = h.find((k) => k.key == m.key);
839
- _ && (m.value = _.value);
941
+ const m = ct(a.form.items);
942
+ function u() {
943
+ a.form.items.forEach((h) => {
944
+ const k = m.find((_) => _.key == h.key);
945
+ k && (h.value = k.value);
840
946
  });
841
947
  }
842
- return e({ getPrm: g, reset: f }), (m, _) => {
843
- const k = F("el-input"), S = F("el-date-picker"), M = F("el-form-item"), E = F("el-form"), W = F("el-link"), A = F("el-button");
948
+ return e({ getPrm: g, reset: u }), (h, k) => {
949
+ const _ = z("el-input"), C = z("el-date-picker"), S = z("el-form-item"), E = z("el-form"), Y = z("el-link"), F = z("el-button");
844
950
  return L(), re("div", {
845
951
  class: "searchBar-container mgt10 mgb10",
846
- onKeydown: It(b, ["enter"])
952
+ onKeydown: Dt(y, ["enter"])
847
953
  }, [
848
954
  ae("div", {
849
955
  class: "searchBar",
850
- style: Tt({ height: o.value ? "auto" : "42px" })
956
+ style: zt({ height: o.value ? "auto" : "42px" })
851
957
  }, [
852
- V(E, {
958
+ q(E, {
853
959
  inline: "",
854
960
  model: t.form.data
855
961
  }, {
856
- default: T(() => [
857
- (L(!0), re(ze, null, lt(t.form.items.filter((u) => !u.hidden), (u) => (L(), re(ze, {
858
- key: u.key
962
+ default: D(() => [
963
+ (L(!0), re(Oe, null, st(t.form.items.filter((d) => !d.hidden), (d) => (L(), re(Oe, {
964
+ key: d.key
859
965
  }, [
860
- u.type == "br" ? (L(), re("br", un)) : (L(), B(M, {
966
+ d.type == "br" ? (L(), re("br", hn)) : (L(), B(S, {
861
967
  key: 1,
862
- label: u.name
968
+ label: d.name
863
969
  }, {
864
- default: T(() => {
865
- var v, z;
970
+ default: D(() => {
971
+ var x, O;
866
972
  return [
867
- u.type === "input" ? (L(), B(k, {
973
+ d.type === "input" ? (L(), B(_, {
868
974
  key: 0,
869
- modelValue: u.value,
870
- "onUpdate:modelValue": (q) => u.value = q,
871
- class: Oe(((v = u.option) == null ? void 0 : v.class) || "w150"),
872
- placeholder: m.$t("qing-shu-ru"),
975
+ modelValue: d.value,
976
+ "onUpdate:modelValue": (A) => d.value = A,
977
+ class: Ve(((x = d.option) == null ? void 0 : x.class) || "w150"),
978
+ placeholder: h.$t("qing-shu-ru"),
873
979
  clearable: ""
874
- }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : u.type === "custom" ? (L(), B(at(u.render), { key: 1 })) : ce("", !0),
875
- u.type === "select" ? (L(), B(ln, he({
980
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(), B(rt(d.render), { key: 1 })) : ce("", !0),
981
+ d.type === "select" ? (L(), B(rn, he({
876
982
  key: 2,
877
- class: ((z = u.option) == null ? void 0 : z.class) || "w150",
878
- modelValue: u.value,
879
- "onUpdate:modelValue": (q) => u.value = q
880
- }, { ref_for: !0 }, u.option, {
881
- onChange: b,
882
- onClear: (q) => C(u)
983
+ class: ((O = d.option) == null ? void 0 : O.class) || "w150",
984
+ modelValue: d.value,
985
+ "onUpdate:modelValue": (A) => d.value = A
986
+ }, { ref_for: !0 }, d.option, {
987
+ onChange: y,
988
+ onClear: (A) => b(d)
883
989
  }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
884
- u.type === "date" ? (L(), B(S, {
990
+ d.type === "date" ? (L(), B(C, {
885
991
  key: 3,
886
- class: Oe({ datetimerange: "w300", daterange: "w200" }[u.dateType] || "w100"),
887
- modelValue: u.value,
888
- "onUpdate:modelValue": (q) => u.value = q,
889
- "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[u.dateType] || "YYYY-MM-DD",
890
- type: u.dateType || "date",
891
- onFocus: (q) => a.value = u,
892
- onChange: (q) => y(),
893
- placeholder: m.$t("qing-xuan-ze"),
894
- "start-placeholder": m.$t("kai-shi-shi-jian"),
895
- "end-placeholder": m.$t("jie-shu-shi-jian")
992
+ class: Ve({ datetimerange: "w300", daterange: "w200" }[d.dateType] || "w100"),
993
+ modelValue: d.value,
994
+ "onUpdate:modelValue": (A) => d.value = A,
995
+ "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[d.dateType] || "YYYY-MM-DD",
996
+ type: d.dateType || "date",
997
+ onFocus: (A) => l.value = d,
998
+ onChange: (A) => p(),
999
+ placeholder: h.$t("qing-xuan-ze"),
1000
+ "start-placeholder": h.$t("kai-shi-shi-jian"),
1001
+ "end-placeholder": h.$t("jie-shu-shi-jian")
896
1002
  }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : ce("", !0)
897
1003
  ];
898
1004
  }),
@@ -903,51 +1009,51 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
903
1009
  _: 1
904
1010
  }, 8, ["model"])
905
1011
  ], 4),
906
- ae("div", dn, [
907
- ae("div", fn, [
908
- X(m.$slots, "table-header-left", {}, void 0, !0)
1012
+ ae("div", mn, [
1013
+ ae("div", gn, [
1014
+ X(h.$slots, "table-header-left", {}, void 0, !0)
909
1015
  ]),
910
- ae("div", hn, [
911
- V(W, {
1016
+ ae("div", pn, [
1017
+ q(Y, {
912
1018
  underline: "never",
913
1019
  class: "mgr10",
914
- onClick: _[0] || (_[0] = () => {
1020
+ onClick: k[0] || (k[0] = () => {
915
1021
  s("visibleChange", !o.value), o.value = !o.value;
916
1022
  })
917
1023
  }, {
918
- default: T(() => [
919
- V(mt, {
1024
+ default: D(() => [
1025
+ q(yt, {
920
1026
  name: o.value ? "ArrowUp" : "ArrowDown"
921
1027
  }, null, 8, ["name"]),
922
- Q(" " + J(c.value), 1)
1028
+ Q(" " + J(r.value), 1)
923
1029
  ]),
924
1030
  _: 1
925
1031
  }),
926
- V(A, {
1032
+ q(F, {
927
1033
  type: "primary",
928
- onClick: b
1034
+ onClick: y
929
1035
  }, {
930
- default: T(() => [
931
- Q(J(m.$t("shai-xuan")), 1)
1036
+ default: D(() => [
1037
+ Q(J(h.$t("shai-xuan")), 1)
932
1038
  ]),
933
1039
  _: 1
934
1040
  }),
935
- V(A, {
1041
+ q(F, {
936
1042
  type: "primary",
937
1043
  onClick: w
938
1044
  }, {
939
- default: T(() => [
940
- Q(J(m.$t("chong-zhi")), 1)
1045
+ default: D(() => [
1046
+ Q(J(h.$t("chong-zhi")), 1)
941
1047
  ]),
942
1048
  _: 1
943
1049
  }),
944
- X(m.$slots, "btn", {}, void 0, !0)
1050
+ X(h.$slots, "btn", {}, void 0, !0)
945
1051
  ])
946
1052
  ])
947
1053
  ], 32);
948
1054
  };
949
1055
  }
950
- }, gn = /* @__PURE__ */ xe(mn, [["__scopeId", "data-v-3c0a6716"]]), gt = {
1056
+ }, vn = /* @__PURE__ */ _e(yn, [["__scopeId", "data-v-3c0a6716"]]), vt = {
951
1057
  // 分页参数名
952
1058
  pageNoKey: "pageNo",
953
1059
  // 页码参数名
@@ -977,8 +1083,8 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
977
1083
  enableCellCopy: !0
978
1084
  // 是否启用单元格选区复制功能
979
1085
  };
980
- let Ce = { ...gt };
981
- function Nn(t) {
1086
+ let Ce = { ...vt };
1087
+ function Jn(t) {
982
1088
  Ce = {
983
1089
  ...Ce,
984
1090
  ...t,
@@ -988,13 +1094,13 @@ function Nn(t) {
988
1094
  }
989
1095
  };
990
1096
  }
991
- function pn() {
1097
+ function bn() {
992
1098
  return Ce;
993
1099
  }
994
- function Zn() {
995
- Ce = { ...gt };
1100
+ function Xn() {
1101
+ Ce = { ...vt };
996
1102
  }
997
- const yn = { class: "center" }, vn = {
1103
+ const wn = { class: "center" }, xn = {
998
1104
  __name: "index",
999
1105
  props: {
1000
1106
  // 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
@@ -1031,110 +1137,110 @@ const yn = { class: "center" }, vn = {
1031
1137
  }
1032
1138
  },
1033
1139
  setup(t, { expose: e }) {
1034
- const { t: n, locale: l } = me(), s = qt(), o = pn(), a = t, r = R(!1), c = R([]);
1035
- a.searchForm.showSearch === void 0 && (a.searchForm.showSearch = o.showSearch), a.searchForm.showPage === void 0 && (a.searchForm.showPage = o.showPage), a.searchForm.showShadow === void 0 && (a.searchForm.showShadow = o.showShadow), a.searchForm.showCheckBox === void 0 && (a.searchForm.showCheckBox = o.showCheckBox), a.searchForm.enableCellCopy === void 0 && (a.searchForm.enableCellCopy = o.enableCellCopy), a.searchForm.selections || (a.searchForm.selections = []);
1036
- const b = se(() => {
1037
- const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1038
- return a.id ? `listPageId-${d}-${a.id}` : `listPageId-${d}`;
1039
- }), C = rt(a.searchForm.items), w = a.searchForm.pageNoKey || o.pageNoKey, y = a.searchForm.pageSizeKey || o.pageSizeKey, g = ke({
1140
+ const { t: n, locale: a } = me(), s = jt(), o = bn(), l = t, i = R(!1), r = R([]);
1141
+ l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
1142
+ const y = se(() => {
1143
+ const f = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1144
+ return l.id ? `listPageId-${f}-${l.id}` : `listPageId-${f}`;
1145
+ }), b = ct(l.searchForm.items), w = l.searchForm.pageNoKey || o.pageNoKey, p = l.searchForm.pageSizeKey || o.pageSizeKey, g = $e({
1040
1146
  [w]: 1,
1041
- [y]: a.searchForm.defaultPageSize || o.defaultPageSize,
1147
+ [p]: l.searchForm.defaultPageSize || o.defaultPageSize,
1042
1148
  total: 0
1043
- }), h = R(null), f = R(null), m = R(450), _ = Ue(() => {
1044
- _e(() => {
1045
- if (!f.value)
1149
+ }), m = R(null), u = R(null), h = R(450), k = Re(() => {
1150
+ Se(() => {
1151
+ if (!u.value)
1046
1152
  return;
1047
- const i = f.value.getBoundingClientRect(), x = window.innerHeight, I = i.top, j = 100, N = x - I - j, D = 200;
1048
- m.value = Math.max(N, D);
1153
+ const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U, M = 200;
1154
+ h.value = Math.max(W, M);
1049
1155
  });
1050
- }, 100), k = () => {
1051
- _();
1052
- }, S = () => {
1053
- if (!a.searchForm.enableCellCopy)
1156
+ }, 100), _ = () => {
1157
+ k();
1158
+ }, C = () => {
1159
+ if (!l.searchForm.enableCellCopy)
1054
1160
  return !1;
1055
- const d = h.value;
1056
- if (!d || !d.$el)
1161
+ const f = m.value;
1162
+ if (!f || !f.$el)
1057
1163
  return !1;
1058
- const i = d.$el;
1059
- return i.classList.add("cell-copy-enabled"), i.setAttribute("tabindex", "-1"), i.removeEventListener("mousedown", ie), i.removeEventListener("mousemove", pe), i.removeEventListener("mouseup", ve), i.removeEventListener("keydown", Le), i.addEventListener("mousedown", ie), i.addEventListener("mousemove", pe), i.addEventListener("mouseup", ve), i.addEventListener("keydown", Le), !0;
1164
+ const c = f.$el;
1165
+ return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Le), c.addEventListener("mousedown", ie), c.addEventListener("mousemove", pe), c.addEventListener("mouseup", be), c.addEventListener("keydown", Le), !0;
1060
1166
  };
1061
- nt(() => {
1062
- _(), window.addEventListener("resize", k), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ke), document.addEventListener("mousedown", He), setTimeout(() => {
1063
- S();
1167
+ lt(() => {
1168
+ k(), window.addEventListener("resize", _), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
1169
+ C();
1064
1170
  }, 500));
1065
- }), Ft(() => {
1066
- a.searchForm.enableCellCopy && setTimeout(() => {
1067
- S();
1171
+ }), Ot(() => {
1172
+ l.searchForm.enableCellCopy && setTimeout(() => {
1173
+ C();
1068
1174
  }, 500);
1069
- }), zt(() => {
1070
- if (window.removeEventListener("resize", k), a.searchForm.enableCellCopy) {
1071
- document.removeEventListener("mouseup", Ke), document.removeEventListener("mousedown", He);
1072
- const d = h.value;
1073
- if (d && d.$el) {
1074
- const i = d.$el;
1075
- i.removeEventListener("mousedown", ie), i.removeEventListener("mousemove", pe), i.removeEventListener("mouseup", ve), i.removeEventListener("keydown", Le);
1175
+ }), Mt(() => {
1176
+ if (window.removeEventListener("resize", _), l.searchForm.enableCellCopy) {
1177
+ document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", We);
1178
+ const f = m.value;
1179
+ if (f && f.$el) {
1180
+ const c = f.$el;
1181
+ c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Le);
1076
1182
  }
1077
1183
  }
1078
1184
  });
1079
- const M = se(() => ue.value.height || m.value);
1185
+ const S = se(() => ue.value.height || h.value);
1080
1186
  let E;
1081
- async function W(d) {
1082
- const { dataFormat: i } = a.tableConfig;
1083
- d[w] != 1 && (d.nextSearchAfter = E), r.value = !0;
1084
- const { code: x, data: I = {} } = await a.api(d).finally(() => {
1085
- r.value = !1, a.searchForm.selections = [];
1187
+ async function Y(f) {
1188
+ const { dataFormat: c } = l.tableConfig;
1189
+ f[w] != 1 && (f.nextSearchAfter = E), i.value = !0;
1190
+ const { code: $, data: T = {} } = await l.api(f).finally(() => {
1191
+ i.value = !1, l.searchForm.selections = [];
1086
1192
  });
1087
- if (x == 200) {
1088
- let j = [];
1089
- for (const D of o.responseDataKeys.rows)
1090
- if (I[D]) {
1091
- j = I[D];
1193
+ if ($ == 200) {
1194
+ let U = [];
1195
+ for (const M of o.responseDataKeys.rows)
1196
+ if (T[M]) {
1197
+ U = T[M];
1092
1198
  break;
1093
1199
  }
1094
- let N = 0;
1095
- for (const D of o.responseDataKeys.total)
1096
- if (I[D] !== void 0) {
1097
- N = I[D];
1200
+ let W = 0;
1201
+ for (const M of o.responseDataKeys.total)
1202
+ if (T[M] !== void 0) {
1203
+ W = T[M];
1098
1204
  break;
1099
1205
  }
1100
- c.value = i ? i(j) : j, g.total = N, E = I.nextSearchAfter, a.searchForm.enableCellCopy && _e(() => {
1206
+ r.value = c ? c(U) : U, g.total = W, E = T.nextSearchAfter, l.searchForm.enableCellCopy && Se(() => {
1101
1207
  setTimeout(() => {
1102
- S();
1208
+ C();
1103
1209
  }, 100);
1104
1210
  });
1105
1211
  }
1106
1212
  }
1107
- function A(d = {}) {
1108
- const { searchData: i = () => ({}) } = a.tableConfig, x = i();
1109
- W({ ...g, ...qe(a.searchForm.items), ...d, ...x });
1213
+ function F(f = {}) {
1214
+ const { searchData: c = () => ({}) } = l.tableConfig, $ = c();
1215
+ Y({ ...g, ...Ue(l.searchForm.items), ...f, ...$ });
1110
1216
  }
1111
- function u() {
1112
- const { reset: d } = a.tableConfig;
1113
- d && d(), a.searchForm.items.forEach((i) => {
1114
- const x = C.find((I) => Je(i.key) && Je(I.key) ? i.key.join(",") == I.key.join(",") : I.key == i.key);
1115
- x && (i.value = x.value);
1116
- }), A();
1217
+ function d() {
1218
+ const { reset: f } = l.tableConfig;
1219
+ f && f(), l.searchForm.items.forEach((c) => {
1220
+ const $ = b.find((T) => Qe(c.key) && Qe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
1221
+ $ && (c.value = $.value);
1222
+ }), F();
1117
1223
  }
1118
- a.api && a.immediate && A();
1119
- function v() {
1120
- return { ...g, ...qe(a.searchForm.items) };
1224
+ l.api && l.immediate && F();
1225
+ function x() {
1226
+ return { ...g, ...Ue(l.searchForm.items) };
1121
1227
  }
1122
- const z = () => {
1123
- const d = h.value;
1124
- d && d.clearSort();
1125
- }, q = ke({
1228
+ const O = () => {
1229
+ const f = m.value;
1230
+ f && f.clearSort();
1231
+ }, A = $e({
1126
1232
  storage: !0
1127
- }), oe = ke({
1233
+ }), oe = $e({
1128
1234
  drag: !0,
1129
1235
  resizable: !0,
1130
1236
  maxFixedSize: 0
1131
1237
  }), ue = se(() => {
1132
- const { customConfig: d, columnConfig: i, ...x } = a.tableConfig;
1238
+ const { customConfig: f, columnConfig: c, ...$ } = l.tableConfig;
1133
1239
  return {
1134
1240
  headerAlign: "left",
1135
1241
  align: "center",
1136
- customConfig: { ...q, ...d },
1137
- columnConfig: { ...oe, ...i },
1242
+ customConfig: { ...A, ...f },
1243
+ columnConfig: { ...oe, ...c },
1138
1244
  // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1139
1245
  "virtual-x-config": {
1140
1246
  enabled: !1,
@@ -1142,9 +1248,9 @@ const yn = { class: "center" }, vn = {
1142
1248
  },
1143
1249
  // 纵向虚拟滚动 大于100条开启
1144
1250
  "virtual-y-config": { enabled: !0, gt: 100 },
1145
- ...x
1251
+ ...$
1146
1252
  };
1147
- }), p = ke({
1253
+ }), v = $e({
1148
1254
  isSelecting: !1,
1149
1255
  // 是否正在选择
1150
1256
  startCell: null,
@@ -1153,71 +1259,71 @@ const yn = { class: "center" }, vn = {
1153
1259
  // 结束单元格
1154
1260
  selectedCells: []
1155
1261
  // 选中的单元格列表 [{ rowIndex, colIndex }]
1156
- }), ge = (d) => {
1157
- const i = d.closest(".vxe-body--column");
1158
- if (!i || i.classList.contains("col--checkbox") || i.classList.contains("col--seq"))
1262
+ }), ge = (f) => {
1263
+ const c = f.closest(".vxe-body--column");
1264
+ if (!c || c.classList.contains("col--checkbox") || c.classList.contains("col--seq"))
1159
1265
  return null;
1160
- const x = i.closest(".vxe-body--row");
1161
- if (!x)
1266
+ const $ = c.closest(".vxe-body--row");
1267
+ if (!$)
1162
1268
  return null;
1163
- const I = h.value;
1164
- if (!I)
1269
+ const T = m.value;
1270
+ if (!T)
1165
1271
  return null;
1166
- let j = -1;
1167
- const N = x.getAttribute("data-rowid");
1168
- if (N != null)
1169
- j = parseInt(N, 10);
1272
+ let U = -1;
1273
+ const W = $.getAttribute("data-rowid");
1274
+ if (W != null)
1275
+ U = parseInt(W, 10);
1170
1276
  else {
1171
- const O = x.parentElement;
1172
- j = Array.from(O.querySelectorAll(".vxe-body--row")).indexOf(x);
1277
+ const V = $.parentElement;
1278
+ U = Array.from(V.querySelectorAll(".vxe-body--row")).indexOf($);
1173
1279
  }
1174
- if (j < 0)
1280
+ if (U < 0)
1175
1281
  return null;
1176
- let D = -1;
1177
- const le = i.getAttribute("data-colid");
1178
- if (le && (D = I.getColumns().findIndex(($) => $.id === le)), D < 0) {
1179
- const $ = Array.from(x.querySelectorAll(".vxe-body--column")).indexOf(i), Y = !!i.closest(".vxe-table--fixed-left-wrapper"), Z = !!i.closest(".vxe-table--fixed-right-wrapper"), P = I.getColumns();
1180
- if (Y) {
1181
- const G = P.filter((H) => H.fixed === "left");
1182
- $ < G.length && (D = P.indexOf(G[$]));
1282
+ let M = -1;
1283
+ const le = c.getAttribute("data-colid");
1284
+ if (le && (M = T.getColumns().findIndex((I) => I.id === le)), M < 0) {
1285
+ const I = Array.from($.querySelectorAll(".vxe-body--column")).indexOf(c), K = !!c.closest(".vxe-table--fixed-left-wrapper"), Z = !!c.closest(".vxe-table--fixed-right-wrapper"), P = T.getColumns();
1286
+ if (K) {
1287
+ const G = P.filter((N) => N.fixed === "left");
1288
+ I < G.length && (M = P.indexOf(G[I]));
1183
1289
  } else if (Z) {
1184
- const G = P.filter((H) => H.fixed === "right");
1185
- $ < G.length && (D = P.indexOf(G[$]));
1290
+ const G = P.filter((N) => N.fixed === "right");
1291
+ I < G.length && (M = P.indexOf(G[I]));
1186
1292
  } else {
1187
- const G = a.searchForm.showCheckBox ? 1 : 0;
1188
- D = P.filter((ee) => ee.fixed === "left").length + $ - G;
1293
+ const G = l.searchForm.showCheckBox ? 1 : 0;
1294
+ M = P.filter((ee) => ee.fixed === "left").length + I - G;
1189
1295
  }
1190
1296
  }
1191
- return D < 0 ? null : { rowIndex: j, colIndex: D, cell: i };
1192
- }, ie = (d) => {
1193
- const i = ge(d.target);
1194
- if (!i) {
1195
- $e();
1297
+ return M < 0 ? null : { rowIndex: U, colIndex: M, cell: c };
1298
+ }, ie = (f) => {
1299
+ const c = ge(f.target);
1300
+ if (!c) {
1301
+ Ie();
1196
1302
  return;
1197
1303
  }
1198
- p.isSelecting = !0, p.startCell = {
1199
- rowIndex: i.rowIndex,
1200
- colIndex: i.colIndex
1201
- }, p.endCell = { ...p.startCell }, Be(), Ye();
1202
- }, pe = (d) => {
1203
- if (!p.isSelecting)
1304
+ v.isSelecting = !0, v.startCell = {
1305
+ rowIndex: c.rowIndex,
1306
+ colIndex: c.colIndex
1307
+ }, v.endCell = { ...v.startCell }, Ke(), He();
1308
+ }, pe = (f) => {
1309
+ if (!v.isSelecting)
1204
1310
  return;
1205
- const i = ge(d.target);
1206
- i && (p.endCell = {
1207
- rowIndex: i.rowIndex,
1208
- colIndex: i.colIndex
1209
- }, Be(), Ye());
1210
- }, ve = () => {
1211
- p.isSelecting = !1;
1212
- }, $e = () => {
1213
- p.selectedCells = [], p.startCell = null, p.endCell = null;
1214
- const d = h.value;
1215
- if (!d)
1311
+ const c = ge(f.target);
1312
+ c && (v.endCell = {
1313
+ rowIndex: c.rowIndex,
1314
+ colIndex: c.colIndex
1315
+ }, Ke(), He());
1316
+ }, be = () => {
1317
+ v.isSelecting = !1;
1318
+ }, Ie = () => {
1319
+ v.selectedCells = [], v.startCell = null, v.endCell = null;
1320
+ const f = m.value;
1321
+ if (!f)
1216
1322
  return;
1217
- d.$el.querySelectorAll(
1323
+ f.$el.querySelectorAll(
1218
1324
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1219
- ).forEach((x) => {
1220
- x.classList.remove(
1325
+ ).forEach(($) => {
1326
+ $.classList.remove(
1221
1327
  "cell-selected",
1222
1328
  "cell-border-top",
1223
1329
  "cell-border-right",
@@ -1225,228 +1331,228 @@ const yn = { class: "center" }, vn = {
1225
1331
  "cell-border-left"
1226
1332
  );
1227
1333
  });
1228
- }, Be = () => {
1229
- if (!p.startCell || !p.endCell) {
1230
- p.selectedCells = [];
1334
+ }, Ke = () => {
1335
+ if (!v.startCell || !v.endCell) {
1336
+ v.selectedCells = [];
1231
1337
  return;
1232
1338
  }
1233
- const d = p.startCell.rowIndex, i = p.endCell.rowIndex, x = p.startCell.colIndex, I = p.endCell.colIndex, j = Math.min(d, i), N = Math.max(d, i), D = Math.min(x, I), le = Math.max(x, I);
1234
- p.selectedCells = [];
1235
- for (let O = j; O <= N; O++)
1236
- for (let $ = D; $ <= le; $++)
1237
- p.selectedCells.push({
1238
- rowIndex: O,
1239
- colIndex: $
1339
+ const f = v.startCell.rowIndex, c = v.endCell.rowIndex, $ = v.startCell.colIndex, T = v.endCell.colIndex, U = Math.min(f, c), W = Math.max(f, c), M = Math.min($, T), le = Math.max($, T);
1340
+ v.selectedCells = [];
1341
+ for (let V = U; V <= W; V++)
1342
+ for (let I = M; I <= le; I++)
1343
+ v.selectedCells.push({
1344
+ rowIndex: V,
1345
+ colIndex: I
1240
1346
  });
1241
- }, Ye = () => {
1242
- _e(() => {
1243
- const d = h.value;
1244
- if (!d)
1347
+ }, He = () => {
1348
+ Se(() => {
1349
+ const f = m.value;
1350
+ if (!f)
1245
1351
  return;
1246
- const i = d.$el;
1247
- if (i.querySelectorAll(
1352
+ const c = f.$el;
1353
+ if (c.querySelectorAll(
1248
1354
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1249
- ).forEach((Y) => {
1250
- Y.classList.remove(
1355
+ ).forEach((K) => {
1356
+ K.classList.remove(
1251
1357
  "cell-selected",
1252
1358
  "cell-border-top",
1253
1359
  "cell-border-right",
1254
1360
  "cell-border-bottom",
1255
1361
  "cell-border-left"
1256
1362
  );
1257
- }), p.selectedCells.length === 0)
1363
+ }), v.selectedCells.length === 0)
1258
1364
  return;
1259
- const x = d.getColumns(), I = p.selectedCells.map((Y) => Y.rowIndex), j = p.selectedCells.map((Y) => Y.colIndex), N = Math.min(...I), D = Math.max(...I), le = Math.min(...j), O = Math.max(...j), $ = [
1260
- i.querySelector(".vxe-table--body-wrapper tbody"),
1261
- i.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1262
- i.querySelector(".vxe-table--fixed-right-wrapper tbody")
1365
+ const $ = f.getColumns(), T = v.selectedCells.map((K) => K.rowIndex), U = v.selectedCells.map((K) => K.colIndex), W = Math.min(...T), M = Math.max(...T), le = Math.min(...U), V = Math.max(...U), I = [
1366
+ c.querySelector(".vxe-table--body-wrapper tbody"),
1367
+ c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1368
+ c.querySelector(".vxe-table--fixed-right-wrapper tbody")
1263
1369
  ].filter(Boolean);
1264
- p.selectedCells.forEach(({ rowIndex: Y, colIndex: Z }) => {
1265
- const P = x[Z];
1370
+ v.selectedCells.forEach(({ rowIndex: K, colIndex: Z }) => {
1371
+ const P = $[Z];
1266
1372
  if (!P)
1267
1373
  return;
1268
- const G = P.fixed === "left", H = P.fixed === "right";
1269
- for (const ee of $) {
1270
- const be = ee.querySelectorAll(".vxe-body--row")[Y];
1271
- if (!be)
1374
+ const G = P.fixed === "left", N = P.fixed === "right";
1375
+ for (const ee of I) {
1376
+ const we = ee.querySelectorAll(".vxe-body--row")[K];
1377
+ if (!we)
1272
1378
  continue;
1273
- const de = Array.from(be.querySelectorAll(".vxe-body--column"));
1274
- let U = null;
1379
+ const de = Array.from(we.querySelectorAll(".vxe-body--column"));
1380
+ let j = null;
1275
1381
  if (G && ee.closest(".vxe-table--fixed-left-wrapper")) {
1276
- const te = x.filter((ne) => ne.fixed === "left").indexOf(P);
1277
- U = de[te];
1278
- } else if (H && ee.closest(".vxe-table--fixed-right-wrapper")) {
1279
- const te = x.filter((ne) => ne.fixed === "right").indexOf(P);
1280
- U = de[te];
1281
- } else if (!G && !H && ee.closest(".vxe-table--body-wrapper")) {
1282
- const fe = a.searchForm.showCheckBox ? 1 : 0, te = x.filter((Ee) => Ee.fixed === "left").length, ne = Z - te;
1283
- U = de[ne + fe];
1382
+ const te = $.filter((ne) => ne.fixed === "left").indexOf(P);
1383
+ j = de[te];
1384
+ } else if (N && ee.closest(".vxe-table--fixed-right-wrapper")) {
1385
+ const te = $.filter((ne) => ne.fixed === "right").indexOf(P);
1386
+ j = de[te];
1387
+ } else if (!G && !N && ee.closest(".vxe-table--body-wrapper")) {
1388
+ const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne = Z - te;
1389
+ j = de[ne + fe];
1284
1390
  }
1285
- if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
1286
- U.classList.add("cell-selected"), Y === N && U.classList.add("cell-border-top"), Y === D && U.classList.add("cell-border-bottom"), Z === le && U.classList.add("cell-border-left"), Z === O && U.classList.add("cell-border-right");
1391
+ if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
1392
+ j.classList.add("cell-selected"), K === W && j.classList.add("cell-border-top"), K === M && j.classList.add("cell-border-bottom"), Z === le && j.classList.add("cell-border-left"), Z === V && j.classList.add("cell-border-right");
1287
1393
  break;
1288
1394
  }
1289
1395
  }
1290
1396
  });
1291
1397
  });
1292
- }, yt = async () => {
1293
- if (p.selectedCells.length === 0)
1398
+ }, wt = async () => {
1399
+ if (v.selectedCells.length === 0)
1294
1400
  return;
1295
- const d = h.value;
1296
- if (!d)
1401
+ const f = m.value;
1402
+ if (!f)
1297
1403
  return;
1298
- const i = d.$el, x = d.getColumns(), I = [...new Set(p.selectedCells.map((O) => O.rowIndex))].sort(
1299
- (O, $) => O - $
1300
- ), j = [...new Set(p.selectedCells.map((O) => O.colIndex))].sort(
1301
- (O, $) => O - $
1302
- ), N = [
1303
- i.querySelector(".vxe-table--body-wrapper tbody"),
1304
- i.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1305
- i.querySelector(".vxe-table--fixed-right-wrapper tbody")
1306
- ].filter(Boolean), D = [];
1307
- I.forEach((O) => {
1308
- const $ = [];
1309
- j.forEach((Y) => {
1310
- const Z = x[Y];
1404
+ const c = f.$el, $ = f.getColumns(), T = [...new Set(v.selectedCells.map((V) => V.rowIndex))].sort(
1405
+ (V, I) => V - I
1406
+ ), U = [...new Set(v.selectedCells.map((V) => V.colIndex))].sort(
1407
+ (V, I) => V - I
1408
+ ), W = [
1409
+ c.querySelector(".vxe-table--body-wrapper tbody"),
1410
+ c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1411
+ c.querySelector(".vxe-table--fixed-right-wrapper tbody")
1412
+ ].filter(Boolean), M = [];
1413
+ T.forEach((V) => {
1414
+ const I = [];
1415
+ U.forEach((K) => {
1416
+ const Z = $[K];
1311
1417
  if (!Z) {
1312
- $.push("");
1418
+ I.push("");
1313
1419
  return;
1314
1420
  }
1315
1421
  const P = Z.fixed === "left", G = Z.fixed === "right";
1316
- let H = "";
1317
- for (const ee of N) {
1318
- const be = ee.querySelectorAll(".vxe-body--row")[O];
1319
- if (!be)
1422
+ let N = "";
1423
+ for (const ee of W) {
1424
+ const we = ee.querySelectorAll(".vxe-body--row")[V];
1425
+ if (!we)
1320
1426
  continue;
1321
- const de = Array.from(be.querySelectorAll(".vxe-body--column"));
1322
- let U = null;
1427
+ const de = Array.from(we.querySelectorAll(".vxe-body--column"));
1428
+ let j = null;
1323
1429
  if (P && ee.closest(".vxe-table--fixed-left-wrapper")) {
1324
- const te = x.filter((ne) => ne.fixed === "left").indexOf(Z);
1325
- U = de[te];
1430
+ const te = $.filter((ne) => ne.fixed === "left").indexOf(Z);
1431
+ j = de[te];
1326
1432
  } else if (G && ee.closest(".vxe-table--fixed-right-wrapper")) {
1327
- const te = x.filter((ne) => ne.fixed === "right").indexOf(Z);
1328
- U = de[te];
1433
+ const te = $.filter((ne) => ne.fixed === "right").indexOf(Z);
1434
+ j = de[te];
1329
1435
  } else if (!P && !G && ee.closest(".vxe-table--body-wrapper")) {
1330
- const fe = a.searchForm.showCheckBox ? 1 : 0, te = x.filter((Ee) => Ee.fixed === "left").length, ne = Y - te;
1331
- U = de[ne + fe];
1436
+ const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne = K - te;
1437
+ j = de[ne + fe];
1332
1438
  }
1333
- if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
1334
- H = U.innerText || U.textContent || "", H = H.trim(), H = H.replace(/\n/g, " ").replace(/\s+/g, " ");
1439
+ if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
1440
+ N = j.innerText || j.textContent || "", N = N.trim(), N = N.replace(/\n/g, " ").replace(/\s+/g, " ");
1335
1441
  break;
1336
1442
  }
1337
1443
  }
1338
- $.push(H);
1339
- }), D.push($.join(" "));
1444
+ I.push(N);
1445
+ }), M.push(I.join(" "));
1340
1446
  });
1341
- const le = D.join(`
1447
+ const le = M.join(`
1342
1448
  `);
1343
1449
  try {
1344
1450
  await navigator.clipboard.writeText(le);
1345
- } catch (O) {
1346
- console.error("复制失败:", O);
1451
+ } catch (V) {
1452
+ console.error("复制失败:", V);
1347
1453
  }
1348
- }, Le = (d) => {
1349
- a.searchForm.enableCellCopy && ((d.ctrlKey || d.metaKey) && d.key === "c" ? p.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), yt()) : d.key === "Escape" && $e());
1350
- }, Ke = () => {
1351
- p.isSelecting = !1;
1352
- }, He = (d) => {
1353
- const i = h.value;
1354
- if (!i || !i.$el)
1454
+ }, Le = (f) => {
1455
+ l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? v.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" && Ie());
1456
+ }, Ne = () => {
1457
+ v.isSelecting = !1;
1458
+ }, We = (f) => {
1459
+ const c = m.value;
1460
+ if (!c || !c.$el)
1355
1461
  return;
1356
- i.$el.contains(d.target) || $e();
1357
- }, vt = (d) => {
1358
- g[w] = d, A();
1359
- }, bt = (d) => {
1360
- g[y] = d, g[w] = 1, A();
1462
+ c.$el.contains(f.target) || Ie();
1463
+ }, xt = (f) => {
1464
+ g[w] = f, F();
1465
+ }, Ct = (f) => {
1466
+ g[p] = f, g[w] = 1, F();
1361
1467
  };
1362
- function Ne() {
1363
- const d = h.value.getCheckboxRecords();
1364
- a.searchForm.selections = d;
1468
+ function Ze() {
1469
+ const f = m.value.getCheckboxRecords();
1470
+ l.searchForm.selections = f;
1365
1471
  }
1366
- const Ze = (d) => {
1367
- const i = h.value;
1368
- if (i) {
1369
- i.toggleCheckboxRow(d);
1370
- const x = h.value.getCheckboxRecords();
1371
- a.searchForm.selections = x;
1472
+ const Ge = (f) => {
1473
+ const c = m.value;
1474
+ if (c) {
1475
+ c.toggleCheckboxRow(f);
1476
+ const $ = m.value.getCheckboxRecords();
1477
+ l.searchForm.selections = $;
1372
1478
  }
1373
1479
  };
1374
- return e({ tableRef: h, getList: A, getPrm: v, clearSort: z, calculateTableHeight: _ }), (d, i) => {
1375
- var O;
1376
- const x = F("el-button"), I = F("el-checkbox"), j = F("el-text"), N = F("vxe-column"), D = F("VxeTable"), le = F("el-pagination");
1480
+ return e({ tableRef: m, getList: F, getPrm: x, clearSort: O, calculateTableHeight: k }), (f, c) => {
1481
+ var V;
1482
+ const $ = z("el-button"), T = z("el-checkbox"), U = z("el-text"), W = z("vxe-column"), M = z("VxeTable"), le = z("el-pagination");
1377
1483
  return L(), re("div", {
1378
- class: Oe({ box: t.searchForm.showShadow })
1484
+ class: Ve({ box: t.searchForm.showShadow })
1379
1485
  }, [
1380
- t.searchForm.showSearch ? (L(), B(gn, {
1486
+ t.searchForm.showSearch ? (L(), B(vn, {
1381
1487
  key: 0,
1382
1488
  form: t.searchForm,
1383
- onReset: u,
1384
- onConfirm: i[1] || (i[1] = ($) => A()),
1385
- onVisibleChange: K(_)
1489
+ onReset: d,
1490
+ onConfirm: c[1] || (c[1] = (I) => F()),
1491
+ onVisibleChange: H(k)
1386
1492
  }, {
1387
- btn: T(() => [
1388
- i[3] || (i[3] = ae("span", { class: "mgr10" }, null, -1)),
1389
- X(d.$slots, "search-bar-btn", {}, void 0, !0),
1390
- V(x, {
1493
+ btn: D(() => [
1494
+ c[3] || (c[3] = ae("span", { class: "mgr10" }, null, -1)),
1495
+ X(f.$slots, "search-bar-btn", {}, void 0, !0),
1496
+ q($, {
1391
1497
  class: "mgl10",
1392
1498
  round: "",
1393
- onClick: i[0] || (i[0] = ($) => h.value.openCustom())
1499
+ onClick: c[0] || (c[0] = (I) => m.value.openCustom())
1394
1500
  }, {
1395
- default: T(() => [
1396
- V(mt, { name: "Tools" })
1501
+ default: D(() => [
1502
+ q(yt, { name: "Tools" })
1397
1503
  ]),
1398
1504
  _: 1
1399
1505
  })
1400
1506
  ]),
1401
1507
  _: 3
1402
1508
  }, 8, ["form", "onVisibleChange"])) : ce("", !0),
1403
- X(d.$slots, "table-header-left", {}, void 0, !0),
1509
+ X(f.$slots, "table-header-left", {}, void 0, !0),
1404
1510
  ae("div", {
1405
1511
  ref_key: "tableContentRef",
1406
- ref: f
1512
+ ref: u
1407
1513
  }, [
1408
- V(D, he({
1409
- id: b.value,
1514
+ q(M, he({
1515
+ id: y.value,
1410
1516
  ref_key: "tableRef",
1411
- ref: h,
1412
- loading: t.loading || r.value,
1413
- data: t.api ? c.value : t.data,
1517
+ ref: m,
1518
+ loading: t.loading || i.value,
1519
+ data: t.api ? r.value : t.data,
1414
1520
  border: ""
1415
1521
  }, ue.value, {
1416
- height: M.value,
1417
- onCheckboxChange: Ne,
1418
- onCheckboxAll: Ne,
1419
- onSortChange: (O = ue.value["sort-config"]) == null ? void 0 : O.sortChange
1522
+ height: S.value,
1523
+ onCheckboxChange: Ze,
1524
+ onCheckboxAll: Ze,
1525
+ onSortChange: (V = ue.value["sort-config"]) == null ? void 0 : V.sortChange
1420
1526
  }), {
1421
- default: T(() => [
1422
- t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), B(N, {
1527
+ default: D(() => [
1528
+ t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), B(W, {
1423
1529
  key: 0,
1424
1530
  type: "checkbox",
1425
- width: K(l) == "zh_cn" ? 80 : 150,
1426
- title: d.$t("xu-hao"),
1531
+ width: H(a) == "zh_cn" ? 80 : 150,
1532
+ title: f.$t("xu-hao"),
1427
1533
  fixed: "left"
1428
1534
  }, {
1429
- checkbox: T(({ rowIndex: $, row: Y, checked: Z, disabled: P, indeterminate: G }) => [
1430
- ae("div", yn, [
1431
- Z ? (L(), B(I, {
1535
+ checkbox: D(({ rowIndex: I, row: K, checked: Z, disabled: P, indeterminate: G }) => [
1536
+ ae("div", wn, [
1537
+ Z ? (L(), B(T, {
1432
1538
  key: 0,
1433
1539
  checked: !0,
1434
1540
  disabled: P,
1435
1541
  size: "default",
1436
- onClick: De((H) => !P && Ze(Y), ["stop"])
1437
- }, null, 8, ["disabled", "onClick"])) : (L(), B(I, {
1542
+ onClick: Me((N) => !P && Ge(K), ["stop"])
1543
+ }, null, 8, ["disabled", "onClick"])) : (L(), B(T, {
1438
1544
  key: 1,
1439
1545
  disabled: P,
1440
1546
  checked: !1,
1441
1547
  size: "default",
1442
- onClick: De((H) => !P && Ze(Y), ["stop"])
1548
+ onClick: Me((N) => !P && Ge(K), ["stop"])
1443
1549
  }, null, 8, ["disabled", "onClick"])),
1444
- V(j, {
1550
+ q(U, {
1445
1551
  type: "info",
1446
1552
  class: "mgl5"
1447
1553
  }, {
1448
- default: T(() => [
1449
- Q(J($ + 1), 1)
1554
+ default: D(() => [
1555
+ Q(J(I + 1), 1)
1450
1556
  ]),
1451
1557
  _: 2
1452
1558
  }, 1024)
@@ -1454,28 +1560,28 @@ const yn = { class: "center" }, vn = {
1454
1560
  ]),
1455
1561
  _: 1
1456
1562
  }, 8, ["width", "title"])) : ce("", !0),
1457
- X(d.$slots, "default", {}, void 0, !0)
1563
+ X(f.$slots, "default", {}, void 0, !0)
1458
1564
  ]),
1459
1565
  _: 3
1460
1566
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1461
1567
  ], 512),
1462
1568
  t.searchForm.showPage ? (L(), B(le, {
1463
1569
  key: 1,
1464
- "current-page": g[K(w)],
1465
- "onUpdate:currentPage": i[2] || (i[2] = ($) => g[K(w)] = $),
1570
+ "current-page": g[H(w)],
1571
+ "onUpdate:currentPage": c[2] || (c[2] = (I) => g[H(w)] = I),
1466
1572
  class: "myPagination mgt10",
1467
1573
  background: "",
1468
1574
  layout: "total, sizes, prev, pager, next",
1469
1575
  total: g.total,
1470
- "page-size": g[K(y)],
1471
- "page-sizes": t.searchForm.pageSizes || K(o).pageSizes,
1472
- onCurrentChange: vt,
1473
- onSizeChange: bt
1576
+ "page-size": g[H(p)],
1577
+ "page-sizes": t.searchForm.pageSizes || H(o).pageSizes,
1578
+ onCurrentChange: xt,
1579
+ onSizeChange: Ct
1474
1580
  }, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : ce("", !0)
1475
1581
  ], 2);
1476
1582
  };
1477
1583
  }
1478
- }, Gn = /* @__PURE__ */ xe(vn, [["__scopeId", "data-v-d93cad32"]]), Wn = {
1584
+ }, Qn = /* @__PURE__ */ _e(xn, [["__scopeId", "data-v-d93cad32"]]), eo = {
1479
1585
  __name: "index",
1480
1586
  props: {
1481
1587
  sheetsConfig: {
@@ -1490,39 +1596,39 @@ const yn = { class: "center" }, vn = {
1490
1596
  setup(t) {
1491
1597
  const e = t;
1492
1598
  function n() {
1493
- Gt(e.fileName, e.sheetsConfig);
1599
+ nn(e.fileName, e.sheetsConfig);
1494
1600
  }
1495
- return (l, s) => {
1496
- const o = F("el-link");
1601
+ return (a, s) => {
1602
+ const o = z("el-link");
1497
1603
  return L(), B(o, he({
1498
1604
  type: "primary",
1499
1605
  underline: "never"
1500
- }, l.$attrs, { onClick: n }), {
1501
- default: T(() => [
1502
- Q(J(l.$t("xia-zai-dao-ru-mo-ban")), 1)
1606
+ }, a.$attrs, { onClick: n }), {
1607
+ default: D(() => [
1608
+ Q(J(a.$t("xia-zai-dao-ru-mo-ban")), 1)
1503
1609
  ]),
1504
1610
  _: 1
1505
1611
  }, 16);
1506
1612
  };
1507
1613
  }
1508
- }, bn = {
1614
+ }, Cn = {
1509
1615
  mounted(t, e) {
1510
- e.value && Qe(t);
1616
+ e.value && tt(t);
1511
1617
  },
1512
1618
  updated(t, e) {
1513
- e.value ? Qe(t) : et(t);
1619
+ e.value ? tt(t) : nt(t);
1514
1620
  },
1515
1621
  beforeUnmount(t) {
1516
- et(t);
1622
+ nt(t);
1517
1623
  }
1518
1624
  };
1519
- async function Qe(t) {
1520
- await y();
1625
+ async function tt(t) {
1626
+ await p();
1521
1627
  const e = t.querySelector(".el-dialog");
1522
1628
  if (!e)
1523
1629
  return;
1524
- const n = t.querySelector(".el-dialog__header"), l = t.querySelector(".el-overlay");
1525
- l.style.cssText += "overflow: hidden;", n.style.cursor = "move";
1630
+ const n = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-overlay");
1631
+ a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
1526
1632
  let s = !1, o = {
1527
1633
  // 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
1528
1634
  window: {
@@ -1549,15 +1655,15 @@ async function Qe(t) {
1549
1655
  y: 0
1550
1656
  }
1551
1657
  };
1552
- n.addEventListener("mousedown", c), document.addEventListener("mousemove", b), document.addEventListener("mouseup", C), window.addEventListener("resize", w);
1553
- function a() {
1554
- o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), r();
1658
+ n.addEventListener("mousedown", r), document.addEventListener("mousemove", y), document.addEventListener("mouseup", b), window.addEventListener("resize", w);
1659
+ function l() {
1660
+ o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), i();
1555
1661
  }
1556
- function r() {
1557
- let g = o.drag.y - o.mouse.y + o.dialog.y, h = o.drag.x - o.mouse.x + o.dialog.x;
1558
- e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${h}px;`;
1662
+ function i() {
1663
+ let g = o.drag.y - o.mouse.y + o.dialog.y, m = o.drag.x - o.mouse.x + o.dialog.x;
1664
+ e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${m}px;`;
1559
1665
  }
1560
- function c(g) {
1666
+ function r(g) {
1561
1667
  g.button === 0 && (o.window = {
1562
1668
  width: document.body.clientWidth,
1563
1669
  height: document.body.clientHeight
@@ -1566,33 +1672,33 @@ async function Qe(t) {
1566
1672
  y: g.clientY
1567
1673
  }, s = !0);
1568
1674
  }
1569
- function b(g) {
1675
+ function y(g) {
1570
1676
  s && (o.drag = {
1571
1677
  x: g.clientX,
1572
1678
  y: g.clientY
1573
- }, l.style.userSelect = "none", a());
1679
+ }, a.style.userSelect = "none", l());
1574
1680
  }
1575
- function C(g) {
1576
- l.style.userSelect = "auto", s = !1;
1681
+ function b(g) {
1682
+ a.style.userSelect = "auto", s = !1;
1577
1683
  }
1578
1684
  function w(g) {
1579
1685
  }
1580
- function y() {
1581
- return new Promise((g, h) => {
1686
+ function p() {
1687
+ return new Promise((g, m) => {
1582
1688
  setTimeout(() => {
1583
1689
  g();
1584
1690
  }, 500);
1585
1691
  });
1586
1692
  }
1587
- t.__mouseDown__ = c, t.__mouseUp__ = C, t.__mouseMove__ = b, t.__sizeChange__ = w;
1693
+ t.__mouseDown__ = r, t.__mouseUp__ = b, t.__mouseMove__ = y, t.__sizeChange__ = w;
1588
1694
  }
1589
- function et(t) {
1695
+ function nt(t) {
1590
1696
  document.removeEventListener("mousedown", t.__mouseDown__), document.removeEventListener("mousemove", t.__mouseMove__), document.removeEventListener("mouseup", t.__mouseUp__), window.removeEventListener("resize", t.__sizeChange__);
1591
1697
  }
1592
- const wn = {
1698
+ const kn = {
1593
1699
  key: 0,
1594
1700
  class: "drawer-btn"
1595
- }, Cn = { key: 1 }, Jn = {
1701
+ }, _n = { key: 1 }, to = {
1596
1702
  __name: "index",
1597
1703
  props: {
1598
1704
  layer: {
@@ -1612,48 +1718,48 @@ const wn = {
1612
1718
  },
1613
1719
  emits: ["confirm"],
1614
1720
  setup(t, { emit: e }) {
1615
- const n = t, l = e, { t: s } = me(), o = Ue(() => {
1616
- l("confirm");
1721
+ const n = t, a = e, { t: s } = me(), o = Re(() => {
1722
+ a("confirm");
1617
1723
  }, 300);
1618
- async function a() {
1619
- n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await _t.confirm(s("que-ding-guan-bi-ma"), {
1724
+ async function l() {
1725
+ n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(s("que-ding-guan-bi-ma"), {
1620
1726
  confirmButtonText: s("que-ding"),
1621
1727
  cancelButtonText: s("qu-xiao"),
1622
1728
  type: "warning"
1623
1729
  }).catch(() => {
1624
1730
  }) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
1625
1731
  }
1626
- return (r, c) => {
1627
- const b = F("el-button"), C = F("el-drawer"), w = F("el-dialog");
1628
- return t.layer.type ? (L(), B(C, {
1732
+ return (i, r) => {
1733
+ const y = z("el-button"), b = z("el-drawer"), w = z("el-dialog");
1734
+ return t.layer.type ? (L(), B(b, {
1629
1735
  key: 0,
1630
1736
  modelValue: t.layer.show,
1631
- "onUpdate:modelValue": c[0] || (c[0] = (y) => t.layer.show = y),
1737
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => t.layer.show = p),
1632
1738
  size: t.layer.width || "100%",
1633
1739
  title: t.layer.title,
1634
1740
  direction: "rtl",
1635
1741
  "append-to-body": "",
1636
- "before-close": a,
1742
+ "before-close": l,
1637
1743
  class: "drawer-content"
1638
1744
  }, {
1639
- default: T(() => [
1640
- X(r.$slots, "default"),
1641
- c[2] || (c[2] = ae("p", { class: "mgt50" }, null, -1)),
1642
- t.layer.showButton ? (L(), re("div", wn, [
1643
- X(r.$slots, "btn", {}, () => [
1644
- V(b, { onClick: a }, {
1645
- default: T(() => [
1646
- Q(J(r.$t("qu-xiao")), 1)
1745
+ default: D(() => [
1746
+ X(i.$slots, "default"),
1747
+ r[2] || (r[2] = ae("p", { class: "mgt50" }, null, -1)),
1748
+ t.layer.showButton ? (L(), re("div", kn, [
1749
+ X(i.$slots, "btn", {}, () => [
1750
+ q(y, { onClick: l }, {
1751
+ default: D(() => [
1752
+ Q(J(i.$t("qu-xiao")), 1)
1647
1753
  ]),
1648
1754
  _: 1
1649
1755
  }),
1650
- V(b, {
1756
+ q(y, {
1651
1757
  type: "primary",
1652
1758
  loading: t.loading,
1653
- onClick: K(o)
1759
+ onClick: H(o)
1654
1760
  }, {
1655
- default: T(() => [
1656
- Q(J(r.$t("ti-jiao")), 1)
1761
+ default: D(() => [
1762
+ Q(J(i.$t("ti-jiao")), 1)
1657
1763
  ]),
1658
1764
  _: 1
1659
1765
  }, 8, ["loading", "onClick"])
@@ -1661,36 +1767,36 @@ const wn = {
1661
1767
  ])) : ce("", !0)
1662
1768
  ]),
1663
1769
  _: 3
1664
- }, 8, ["modelValue", "size", "title"])) : Dt((L(), re("div", Cn, [
1665
- V(w, {
1770
+ }, 8, ["modelValue", "size", "title"])) : Vt((L(), re("div", _n, [
1771
+ q(w, {
1666
1772
  "close-on-click-modal": !1,
1667
1773
  modelValue: t.layer.show,
1668
- "onUpdate:modelValue": c[1] || (c[1] = (y) => t.layer.show = y),
1774
+ "onUpdate:modelValue": r[1] || (r[1] = (p) => t.layer.show = p),
1669
1775
  title: t.layer.title,
1670
1776
  width: t.layer.width || 500,
1671
1777
  center: ""
1672
- }, ot({
1673
- default: T(() => [
1674
- X(r.$slots, "default")
1778
+ }, at({
1779
+ default: D(() => [
1780
+ X(i.$slots, "default")
1675
1781
  ]),
1676
1782
  _: 2
1677
1783
  }, [
1678
1784
  t.layer.showButton ? {
1679
1785
  name: "footer",
1680
- fn: T(() => [
1681
- X(r.$slots, "btn", {}, () => [
1682
- V(b, { onClick: a }, {
1683
- default: T(() => [
1684
- Q(J(r.$t("qu-xiao")), 1)
1786
+ fn: D(() => [
1787
+ X(i.$slots, "btn", {}, () => [
1788
+ q(y, { onClick: l }, {
1789
+ default: D(() => [
1790
+ Q(J(i.$t("qu-xiao")), 1)
1685
1791
  ]),
1686
1792
  _: 1
1687
1793
  }),
1688
- V(b, {
1794
+ q(y, {
1689
1795
  type: "primary",
1690
- onClick: K(o)
1796
+ onClick: H(o)
1691
1797
  }, {
1692
- default: T(() => [
1693
- Q(J(r.$t("ti-jiao")), 1)
1798
+ default: D(() => [
1799
+ Q(J(i.$t("ti-jiao")), 1)
1694
1800
  ]),
1695
1801
  _: 1
1696
1802
  }, 8, ["onClick"])
@@ -1700,13 +1806,13 @@ const wn = {
1700
1806
  } : void 0
1701
1807
  ]), 1032, ["modelValue", "title", "width"])
1702
1808
  ])), [
1703
- [K(bn), t.layer.show]
1809
+ [H(Cn), t.layer.show]
1704
1810
  ]);
1705
1811
  };
1706
1812
  }
1707
1813
  };
1708
- function Xn(t, e = {}) {
1709
- const n = Re(), l = {
1814
+ function no(t, e = {}) {
1815
+ const n = ve(), a = {
1710
1816
  inForm: !0,
1711
1817
  required: !0,
1712
1818
  ...e
@@ -1714,16 +1820,16 @@ function Xn(t, e = {}) {
1714
1820
  phone: /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
1715
1821
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1716
1822
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1717
- }[t], { inForm: o, value: a, required: r, msg: c = n("validate.invalidInput") } = l;
1718
- return o ? function(b, C, w) {
1719
- if (r) {
1720
- s.test(C) ? w() : w(new Error(c));
1823
+ }[t], { inForm: o, value: l, required: i, msg: r = n("validate.invalidInput") } = a;
1824
+ return o ? function(y, b, w) {
1825
+ if (i) {
1826
+ s.test(b) ? w() : w(new Error(r));
1721
1827
  return;
1722
1828
  }
1723
- C && !s.test(C) ? w(new Error(c)) : w();
1724
- } : s.test(a);
1829
+ b && !s.test(b) ? w(new Error(r)) : w();
1830
+ } : s.test(l);
1725
1831
  }
1726
- class Qn {
1832
+ class oo {
1727
1833
  constructor(e = {}) {
1728
1834
  this.config = {
1729
1835
  clientCode: e.clientCode || "one-portal",
@@ -1819,10 +1925,10 @@ class Qn {
1819
1925
  });
1820
1926
  if (!n.ok)
1821
1927
  throw new Error(`HTTP ${n.status}: ${n.statusText}`);
1822
- const l = await n.json();
1823
- if (l.success && l.data)
1824
- return this.token = l.data.token, this.user = l.data.user, this.saveToStorage(), this.clearTicketFromUrl(), this.log("ST票据验证成功,用户登录成功:", this.user), this.config.loginCallback && this.config.loginCallback(this.user, this.token), !0;
1825
- throw new Error(l.message || "ST票据验证失败");
1928
+ const a = await n.json();
1929
+ if (a.success && a.data)
1930
+ return this.token = a.data.token, this.user = a.data.user, this.saveToStorage(), this.clearTicketFromUrl(), this.log("ST票据验证成功,用户登录成功:", this.user), this.config.loginCallback && this.config.loginCallback(this.user, this.token), !0;
1931
+ throw new Error(a.message || "ST票据验证失败");
1826
1932
  } catch (n) {
1827
1933
  return this.log("ST票据验证失败:", n), this.handleError(n), !1;
1828
1934
  }
@@ -1861,16 +1967,16 @@ class Qn {
1861
1967
  * 发送带认证的HTTP请求
1862
1968
  */
1863
1969
  async request(e, n = {}) {
1864
- const l = {
1970
+ const a = {
1865
1971
  headers: {
1866
1972
  "Content-Type": "application/json",
1867
1973
  ...n.headers
1868
1974
  },
1869
1975
  ...n
1870
1976
  };
1871
- l.headers.appId = this.config.clientCode, this.token && (l.headers.Authorization = `Bearer ${this.token}`);
1977
+ a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
1872
1978
  try {
1873
- const s = await fetch(e, l);
1979
+ const s = await fetch(e, a);
1874
1980
  return s.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : s;
1875
1981
  } catch (s) {
1876
1982
  throw this.log("请求失败:", s), s;
@@ -1929,126 +2035,126 @@ class Qn {
1929
2035
  return this.config[e];
1930
2036
  }
1931
2037
  }
1932
- function eo(t, e = {}) {
1933
- const l = Object.assign({
2038
+ function lo(t, e = {}) {
2039
+ const a = Object.assign({
1934
2040
  manual: !1,
1935
2041
  // 手动执行
1936
2042
  log: !1,
1937
2043
  params: null,
1938
2044
  format: null
1939
- }, e), { manual: s, log: o, params: a = {}, cb: r, format: c } = l, b = R([]), C = R(!1), w = (y) => {
1940
- const g = y || a;
1941
- C.value = !0, t(g).then((h) => {
1942
- const { code: f, data: m, msg: _ } = h;
1943
- if (r) {
1944
- const { records: k, rows: S } = m || {}, M = k || S ? k || S : m;
1945
- b.value = Te(M, c), r(h);
2045
+ }, e), { manual: s, log: o, params: l = {}, cb: i, format: r } = a, y = R([]), b = R(!1), w = (p) => {
2046
+ const g = p || l;
2047
+ b.value = !0, t(g).then((m) => {
2048
+ const { code: u, data: h, msg: k } = m;
2049
+ if (i) {
2050
+ const { records: _, rows: C } = h || {}, S = _ || C ? _ || C : h;
2051
+ y.value = De(S, r), i(m);
1946
2052
  }
1947
- if (m) {
1948
- if (m.records != null || m.rows != null) {
1949
- const { records: k, rows: S, total: M = 0 } = m || {};
1950
- g && g.total != null && (a.total = parseInt(M)), b.value = Te(k || S || [], c);
2053
+ if (h) {
2054
+ if (h.records != null || h.rows != null) {
2055
+ const { records: _, rows: C, total: S = 0 } = h || {};
2056
+ g && g.total != null && (l.total = parseInt(S)), y.value = De(_ || C || [], r);
1951
2057
  } else
1952
- b.value = Te(m, c);
1953
- o && console.log("useRequest-res", b.value);
2058
+ y.value = De(h, r);
2059
+ o && console.log("useRequest-res", y.value);
1954
2060
  }
1955
- }).catch((h) => {
1956
- r && (console.log("useRequestErr", h), r({ code: 500 }));
2061
+ }).catch((m) => {
2062
+ i && (console.log("useRequestErr", m), i({ code: 500 }));
1957
2063
  }).finally(() => {
1958
- C.value = !1;
2064
+ b.value = !1;
1959
2065
  });
1960
2066
  };
1961
- return s || w(), [C, b, w];
2067
+ return s || w(), [b, y, w];
1962
2068
  }
1963
- function to(t) {
1964
- const e = R(t), n = R(""), l = R("");
1965
- return Ae(e, (s) => {
2069
+ function ao(t) {
2070
+ const e = R(t), n = R(""), a = R("");
2071
+ return Pe(e, (s) => {
1966
2072
  const o = s || ["", ""];
1967
- n.value = o[0], l.value = o[1];
1968
- }), [e, n, l];
2073
+ n.value = o[0], a.value = o[1];
2074
+ }), [e, n, a];
1969
2075
  }
1970
- function no(t) {
2076
+ function so(t) {
1971
2077
  return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
1972
2078
  }
1973
- function Te(t, e) {
2079
+ function De(t, e) {
1974
2080
  if (!e)
1975
2081
  return t;
1976
2082
  if (t instanceof Array)
1977
- return t.map((l) => {
2083
+ return t.map((a) => {
1978
2084
  let s = {};
1979
- return e.forEach((o) => s[o] = l[o]), s;
2085
+ return e.forEach((o) => s[o] = a[o]), s;
1980
2086
  });
1981
2087
  let n = {};
1982
- return e.forEach((l) => n[l] = t[l]), n;
2088
+ return e.forEach((a) => n[a] = t[a]), n;
1983
2089
  }
1984
- function oo(t, e = []) {
1985
- const { locale: n } = me(), l = R(t());
1986
- return Ae(
2090
+ function ro(t, e = []) {
2091
+ const { locale: n } = me(), a = R(t());
2092
+ return Pe(
1987
2093
  [n, ...e],
1988
2094
  () => {
1989
- l.value = t();
2095
+ a.value = t();
1990
2096
  },
1991
2097
  { immediate: !0 }
1992
- ), l;
2098
+ ), a;
1993
2099
  }
1994
- function lo(t, e = "zh_cn", n = "en_us") {
2100
+ function io(t, e = "zh_cn", n = "en_us") {
1995
2101
  if (!t)
1996
2102
  return "-";
1997
- const l = { en_us: n, zh_cn: e }, o = Pe().global.locale.value;
1998
- return t[l[o]] || t[e] || "-";
2103
+ const a = { en_us: n, zh_cn: e }, o = Ye().global.locale.value;
2104
+ return t[a[o]] || t[e] || "-";
1999
2105
  }
2000
- function ao(t, e) {
2001
- let n = Ut;
2002
- return typeof t == "string" && t.length > 0 && (n = je(t).mapState), pt(e, n);
2106
+ function co(t, e) {
2107
+ let n = Pt;
2108
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapState), bt(e, n);
2003
2109
  }
2004
- function so(t, e) {
2005
- let n = jt;
2006
- return typeof t == "string" && t.length > 0 && (n = je(t).mapGetters), pt(e, n);
2110
+ function uo(t, e) {
2111
+ let n = Rt;
2112
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapGetters), bt(e, n);
2007
2113
  }
2008
- function ro(t, e) {
2009
- let n = Pt;
2010
- return typeof t == "string" && t.length > 0 && (n = je(t).mapActions), xn(e, n);
2114
+ function fo(t, e) {
2115
+ let n = Bt;
2116
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapActions), $n(e, n);
2011
2117
  }
2012
- function pt(t, e) {
2013
- const n = it(), l = e(t), s = {};
2014
- return Object.keys(l).forEach((o) => {
2015
- const a = l[o].bind({ $store: n });
2016
- s[o] = se(a);
2118
+ function bt(t, e) {
2119
+ const n = ut(), a = e(t), s = {};
2120
+ return Object.keys(a).forEach((o) => {
2121
+ const l = a[o].bind({ $store: n });
2122
+ s[o] = se(l);
2017
2123
  }), s;
2018
2124
  }
2019
- function xn(t, e) {
2020
- const n = it(), l = e(t), s = {};
2021
- return Object.keys(l).forEach((o) => {
2022
- s[o] = l[o].bind({ $store: n });
2125
+ function $n(t, e) {
2126
+ const n = ut(), a = e(t), s = {};
2127
+ return Object.keys(a).forEach((o) => {
2128
+ s[o] = a[o].bind({ $store: n });
2023
2129
  }), s;
2024
2130
  }
2025
- function Fe(t) {
2026
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Ot(t);
2131
+ function ze(t) {
2132
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qt(t);
2027
2133
  }
2028
- function io() {
2029
- we.renderer.add("Enum", {
2134
+ function ho() {
2135
+ xe.renderer.add("Enum", {
2030
2136
  // 默认显示模板
2031
2137
  renderTableDefault(t, e) {
2032
2138
  let n;
2033
2139
  if ([null, void 0].includes(e.row[e.column.field]))
2034
2140
  return "-";
2035
- const l = e.row[e.column.field];
2141
+ const a = e.row[e.column.field];
2036
2142
  if (t.type == "tag") {
2037
2143
  let s;
2038
- return V(F("el-text"), {
2039
- type: t.enum.getTag(l)
2040
- }, Fe(s = t.enum.getName(l)) ? s : {
2144
+ return q(z("el-text"), {
2145
+ type: t.enum.getTag(a)
2146
+ }, ze(s = t.enum.getName(a)) ? s : {
2041
2147
  default: () => [s]
2042
2148
  });
2043
2149
  }
2044
- return V(F("el-text"), null, Fe(n = t.enum.getName(l)) ? n : {
2150
+ return q(z("el-text"), null, ze(n = t.enum.getName(a)) ? n : {
2045
2151
  default: () => [n]
2046
2152
  });
2047
2153
  }
2048
- }), we.renderer.add("InputNumber", {
2154
+ }), xe.renderer.add("InputNumber", {
2049
2155
  // 默认显示模板
2050
2156
  renderTableDefault(t, e) {
2051
- return V(St, he({
2157
+ return q(It, he({
2052
2158
  modelValue: e.row[e.column.field],
2053
2159
  "onUpdate:modelValue": (n) => e.row[e.column.field] = n
2054
2160
  }, t.props, {
@@ -2056,42 +2162,42 @@ function io() {
2056
2162
  "value-on-clear": 0
2057
2163
  }), null);
2058
2164
  }
2059
- }), we.renderer.add("TrueFalse", {
2165
+ }), xe.renderer.add("TrueFalse", {
2060
2166
  // 默认显示模板
2061
2167
  renderTableDefault(t, e) {
2062
2168
  const {
2063
2169
  locale: n
2064
2170
  } = me();
2065
- let l = n.value == "zh_cn";
2066
- return V($t, {
2171
+ let a = n.value == "zh_cn";
2172
+ return q(Lt, {
2067
2173
  type: e.row[e.column.field] ? "success" : "danger"
2068
2174
  }, {
2069
- default: () => [e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"]
2175
+ default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
2070
2176
  });
2071
2177
  }
2072
- }), we.renderer.add("I18n", {
2178
+ }), xe.renderer.add("I18n", {
2073
2179
  // 默认显示模板
2074
2180
  renderTableDefault(t, e) {
2075
2181
  const {
2076
2182
  locale: n
2077
2183
  } = me();
2078
- let l = n.value == "zh_cn" ? e.column.field : t.fieldEn;
2079
- return e.row[l] || e.row[e.column.field];
2184
+ let a = n.value == "zh_cn" ? e.column.field : t.fieldEn;
2185
+ return e.row[a] || e.row[e.column.field];
2080
2186
  }
2081
- }), we.renderer.add("Link", {
2187
+ }), xe.renderer.add("Link", {
2082
2188
  // 默认显示模板
2083
2189
  renderTableDefault(t, e) {
2084
- var r;
2190
+ var i;
2085
2191
  let n = e.column.field;
2086
- const l = At(), {
2192
+ const a = Ut(), {
2087
2193
  multiple: s,
2088
2194
  to: o
2089
2195
  } = t;
2090
2196
  if (!s)
2091
- return V(Ge, {
2197
+ return q(Je, {
2092
2198
  underline: "never",
2093
2199
  type: "primary",
2094
- onclick: () => l.push({
2200
+ onclick: () => a.push({
2095
2201
  path: o,
2096
2202
  query: {
2097
2203
  [n]: e.row[n]
@@ -2100,64 +2206,64 @@ function io() {
2100
2206
  }, {
2101
2207
  default: () => [e.row[n]]
2102
2208
  });
2103
- const a = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
2104
- return a.map((c, b) => V("span", null, [V(Ge, {
2209
+ const l = ((i = e.row[n]) == null ? void 0 : i.split(",")) || [];
2210
+ return l.map((r, y) => q("span", null, [q(Je, {
2105
2211
  underline: "never",
2106
2212
  type: "primary",
2107
- onclick: () => l.push({
2213
+ onclick: () => a.push({
2108
2214
  path: o,
2109
2215
  query: {
2110
- [n]: c
2216
+ [n]: r
2111
2217
  }
2112
2218
  })
2113
- }, Fe(c) ? c : {
2114
- default: () => [c]
2115
- }), b < a.length - 1 ? "," : ""]));
2219
+ }, ze(r) ? r : {
2220
+ default: () => [r]
2221
+ }), y < l.length - 1 ? "," : ""]));
2116
2222
  }
2117
2223
  });
2118
2224
  }
2119
2225
  export {
2120
- ln as CmpDictionary,
2121
- mt as CmpIcon,
2122
- Kn as ConfrimButton,
2123
- Wn as DownExcelTemp,
2124
- Hn as ImportButton,
2125
- Dn as LayOutForm,
2126
- Jn as Layer,
2127
- Gn as ListPage,
2128
- Qn as OnePortalCasSDK,
2129
- gn as SearchBar,
2130
- Xe as StatusMap,
2131
- Mn as _toRaw,
2132
- no as _typeOf,
2133
- An as arrToStatusMap,
2134
- qn as arrayToTree,
2135
- Pn as checkFileSize,
2136
- Xn as creatValidator,
2137
- Bn as createImportFields,
2138
- Rn as createListPageId,
2139
- Me as en_us,
2140
- Gt as exportExcel,
2141
- Pe as getI18n,
2142
- Re as getI18nT,
2143
- pn as getListPageConfig,
2144
- lo as getLocaleValue,
2145
- Yn as getValueBykey,
2146
- On as importExcel,
2147
- Ht as messages,
2148
- io as registerVxeRenderers,
2149
- Zn as resetListPageConfig,
2150
- Nn as setListPageConfig,
2151
- Nt as setupI18n,
2152
- Vn as sleep,
2153
- ht as stringToArray,
2154
- Un as stripHtmlTags,
2155
- jn as unicode2Str,
2156
- ro as useActions,
2157
- to as useDatePicker,
2158
- so as useGetters,
2159
- oo as useI18nReState,
2160
- eo as useRequest,
2161
- ao as useState,
2162
- Ve as zh_cn
2226
+ rn as CmpDictionary,
2227
+ yt as CmpIcon,
2228
+ Zn as ConfrimButton,
2229
+ eo as DownExcelTemp,
2230
+ Gn as ImportButton,
2231
+ Vn as LayOutForm,
2232
+ to as Layer,
2233
+ Qn as ListPage,
2234
+ oo as OnePortalCasSDK,
2235
+ vn as SearchBar,
2236
+ et as StatusMap,
2237
+ Un as _toRaw,
2238
+ so as _typeOf,
2239
+ Rn as arrToStatusMap,
2240
+ Pn as arrayToTree,
2241
+ Kn as checkFileSize,
2242
+ no as creatValidator,
2243
+ Nn as createImportFields,
2244
+ Hn as createListPageId,
2245
+ Ae as en_us,
2246
+ An as exportExcel,
2247
+ Ye as getI18n,
2248
+ ve as getI18nT,
2249
+ bn as getListPageConfig,
2250
+ io as getLocaleValue,
2251
+ Wn as getValueBykey,
2252
+ qn as importExcel,
2253
+ Wt as messages,
2254
+ ho as registerVxeRenderers,
2255
+ Xn as resetListPageConfig,
2256
+ Jn as setListPageConfig,
2257
+ Zt as setupI18n,
2258
+ jn as sleep,
2259
+ pt as stringToArray,
2260
+ Bn as stripHtmlTags,
2261
+ Yn as unicode2Str,
2262
+ fo as useActions,
2263
+ ao as useDatePicker,
2264
+ uo as useGetters,
2265
+ ro as useI18nReState,
2266
+ lo as useRequest,
2267
+ co as useState,
2268
+ qe as zh_cn
2163
2269
  };