joy-admin-components 0.2.16 → 0.2.19

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 re, 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 se, Fragment as Oe, renderList as rt, withModifiers as Me, nextTick as Se, resolveDynamicComponent as st, 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 r = R(null), o = () => e.default ? e.default().filter((s) => s.type !== Symbol.for("v-cmt")).map((s) => s.type === Symbol.for("v-fgt") ? s.children : s).flat().map(
15
+ (s) => {
16
+ var i;
17
+ return Te(
18
+ St,
19
+ { span: ((i = s.props) == null ? void 0 : i.span) || 24 },
20
20
  {
21
- default: () => r
21
+ default: () => s
22
22
  }
23
23
  );
24
24
  }
25
25
  ) : null;
26
- nt(() => {
27
- l("ref", s.value);
26
+ lt(() => {
27
+ a("ref", r.value);
28
28
  });
29
- function a() {
30
- return Ie(
31
- Ct,
32
- { ...n, ref: s },
33
- () => Ie(xt, { gutter: n.gutter ?? 20 }, { default: () => o() })
29
+ function l() {
30
+ return Te(
31
+ _t,
32
+ { ...n, ref: r },
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, r = /([+-]|\d\d)/g;
49
+ return function(o, l, s) {
50
+ var i = l.prototype;
51
+ s.utc = function(u) {
52
+ var h = { date: u, utc: !0, args: arguments };
53
+ return new l(h);
54
+ }, i.utc = function(u) {
55
+ var h = s(this.toDate(), { locale: this.$L, utc: !0 });
56
+ return u ? h.add(this.utcOffset(), n) : h;
57
+ }, i.local = function() {
58
+ return s(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 v = i.parse;
61
+ i.parse = function(u) {
62
+ u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), v.call(this, u);
63
63
  };
64
- var C = c.init;
65
- c.init = function() {
64
+ var w = i.init;
65
+ i.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
+ w.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 b = i.utcOffset;
73
+ i.utcOffset = function(u, h) {
74
+ var k = this.$utils().u;
75
+ if (k(u))
76
+ return this.$u ? 0 : k(this.$offset) ? b.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(r) || ["-", 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 = i.format;
96
+ i.format = function(u) {
97
+ var h = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
+ return p.call(this, h);
99
+ }, i.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
+ }, i.isUTC = function() {
103
103
  return !!this.$u;
104
- }, c.toISOString = function() {
104
+ }, i.toISOString = function() {
105
105
  return this.toDate().toISOString();
106
- }, c.toString = function() {
106
+ }, i.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 = i.toDate;
110
+ i.toDate = function(u) {
111
+ return u === "s" && this.$offset ? s(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 = i.diff;
114
+ i.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 = s(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(r, o, l) {
132
+ var s, i = 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
+ }, v = function(p, g) {
141
+ for (var m = i(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
+ }, w = o.prototype;
148
+ w.tz = function(p, g) {
149
+ p === void 0 && (p = s);
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
+ }, w.offsetName = function(p) {
159
+ var g = this.$x.$timezone || l.tz.guess(), m = i(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 b = w.startOf;
165
+ w.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 b.call(this, p, g);
168
+ var m = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
+ return b.call(m, p, g).tz(this.$x.$timezone, !0);
170
+ }, l.tz = function(p, g, m) {
171
+ var u = m && g, h = m || g || s, k = v(+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 = v(x, d);
176
+ if (F === O)
177
+ return [x, F];
178
+ var A = v(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
+ s = 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();
291
- await s.xlsx.load(t);
292
+ let r = new Ee.Workbook();
293
+ await r.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 r.eachSheet(function(l, s) {
296
+ const i = [];
297
+ l.eachRow(function(v, w) {
298
+ if (w > a) {
299
+ let b = {}, 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 = v.getCell(n[g]).value;
302
+ b[g] = m, m && (p = !1);
303
+ }), p || i.push(b);
302
304
  }
303
- }), o[a._name] = c;
304
- }), s = null, o;
305
+ }), o[l._name] = i;
306
+ }), r = 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: r } = a, { columnWidth: o } = gt;
315
+ e.forEach((i) => {
316
+ i.width = i.width ? i.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: s } = Gt();
319
+ s.columns = e, s.addRows(n), r && await Jt(l, s, r);
318
320
  try {
319
- const c = await a.xlsx.writeBuffer(), b = new File([c], t, {
321
+ const i = await l.xlsx.writeBuffer(), v = new File([i], t, {
320
322
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
321
323
  });
322
- Vt(b);
323
- } catch (c) {
324
- console.log(c);
324
+ it(v);
325
+ } catch (i) {
326
+ console.log(i);
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 r of a) {
338
+ const o = n[r], { type: l } = o;
339
+ switch (l) {
338
340
  case "IMG":
339
- await Xt(t, e, s);
341
+ await Xt(t, e, r);
340
342
  break;
341
343
  }
342
344
  }
343
345
  }
344
- async function Xt(t, e, n, l) {
345
- const s = e.getColumn(n), o = s.values;
346
- e.getColumn(n).width = 20, e.eachRow((a, r) => {
347
- r > 1 && (a.height = 40);
346
+ async function Xt(t, e, n, a) {
347
+ const r = e.getColumn(n), o = r.values;
348
+ e.getColumn(n).width = 20, e.eachRow((l, s) => {
349
+ s > 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, s = o.length; l < s; 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 i = o[l];
355
+ i && (e.getCell(r.letter + l).value = "", await Qt(t, e, i, {
354
356
  width: 100,
355
357
  height: 50,
356
- col: s._number - 1,
357
- row: a - 1
358
+ col: r._number - 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: r, row: o, width: l, height: s } = a, { success: i, base64: v } = await en(n, 0.3);
365
+ if (i) {
366
+ const w = t.addImage({
367
+ base64: v,
366
368
  extension: "jpeg"
367
369
  });
368
- e.addImage(C, {
369
- tl: { col: s, row: o },
370
- ext: { width: a, height: r }
370
+ e.addImage(w, {
371
+ tl: { col: r, row: o },
372
+ ext: { width: l, height: s }
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, r) => {
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 r = new Ee.Workbook();
399
+ await r.xlsx.load(t);
400
+ const o = {};
401
+ return r.eachSheet(function(l, s) {
402
+ if (l.state == "visible") {
403
+ const i = [], v = n[l._name];
404
+ if (v) {
405
+ let w = Object.values(v).some((p) => p.includes("image")), b = {};
406
+ w && (l.getImages().forEach((g) => {
407
+ const { tl: m } = g.range, u = r.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
+ b[_] ? b[_].push(k) : b[_] = [k];
411
+ }
412
+ }), console.log("withImages-imageMap", b)), l.eachRow(function(p, g) {
413
+ if (g > a) {
414
+ let m = {}, u = !0;
415
+ Object.keys(v).forEach((h) => {
416
+ var E;
417
+ let [k, _] = v[h].split(je);
418
+ const C = p.getCell(k);
419
+ let S;
420
+ if (_ == "image" && w) {
421
+ const Y = C._column._number, F = `${g}_${Y}`;
422
+ S = b[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 || i.push(m);
427
+ }
428
+ }), o[l._name] = i;
429
+ }
430
+ }
431
+ }), r = 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, r) {
438
+ const { columnWidth: o } = gt, { tableHeader: l, tableData: s } = e[a._name];
439
+ l.forEach((i) => {
440
+ if (i.required) {
441
+ const v = i.style || {}, { font: w = {} } = v;
442
+ i.style = {
443
+ ...v,
444
+ font: {
445
+ ...w,
446
+ color: {
447
+ argb: "FFFF0000"
448
+ }
449
+ }
450
+ };
451
+ }
452
+ }), a.columns = l, a.addRows(s), l.forEach((i) => {
453
+ const { header: v, key: w, width: b, option: p } = i, g = a.getColumn(w);
454
+ if (g.width = b || o, p) {
455
+ const m = n.addWorksheet(w);
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: [`${w}!$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(), r = new File([a], t, {
474
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
475
+ });
476
+ it(r);
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((r, o) => {
484
+ const l = t[r].sort ?? 0, s = t[o].sort ?? 0;
485
+ return l - s;
486
+ }).forEach((r) => {
487
+ let o = r, l = !1;
488
+ /[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), l = !0), r.length > 31 && (r = r.substring(0, 31).trim(), l = !0, console.warn(e("excel.sheetNameTooLong", [o, r]))), l && (t[r] = t[o], delete t[o]), n.addWorksheet(r);
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);
409
- for (const s of t) {
410
- n[s.id] = {
411
- ...s,
509
+ function Pn(t) {
510
+ let e = [], n = {}, a = (r, o) => Object.prototype.hasOwnProperty.call(r, o);
511
+ for (const r of t) {
512
+ n[r.id] = {
513
+ ...r,
412
514
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
413
- children: l(n, s.id) ? n[s.id].children : []
515
+ children: a(n, r.id) ? n[r.id].children : []
414
516
  };
415
- const o = n[s.id];
416
- s.pid == -1 ? e.push(o) : (l(n, s.pid) || (n[s.pid] = {
517
+ const o = n[r.id];
518
+ r.pid == -1 ? e.push(o) : (a(n, r.pid) || (n[r.pid] = {
417
519
  children: []
418
- }), n[s.pid].children.push(o));
520
+ }), n[r.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: r } = this.map.get(e);
540
+ return (n.value == "zh_cn" ? a : r) || 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();
464
- throw new Error(s("tools.keysLengthError"));
565
+ const r = ve();
566
+ throw new Error(r("tools.keysLengthError"));
465
567
  }
466
- let l = t.map((s) => {
568
+ let a = t.map((r) => {
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 = r[n]), e.forEach((l, s) => {
571
+ s === 0 ? o.label = r[l] : s === 1 ? o.value = r[l] : o[l] = r[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: r, option: o, type: l } = n, s = ln(a);
593
+ o ? e[r] = `${s}---option` : l === "image" ? e[r] = `${s}---image` : e[r] = s;
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, r] of e)
602
+ n[a] = r;
501
603
  return n;
502
- }, nn = ["onClick"], on = {
604
+ }, an = ["onClick"], rn = {
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: r, locale: o } = me(), l = Tt(t, "modelValue"), s = re(() => a["value-key"] != null), i = R(""), v = re(() => {
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(i.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 y = o.value == "en_us" ? ue || "i18nName" : oe;
652
+ return d.length == 1 ? A.filter(
653
+ (ie) => ie[y].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[y].toLowerCase() == be.toLowerCase()
556
658
  ), pe;
557
659
  });
558
- }), C = se({
660
+ }), w = re({
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 == v.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
+ }), b = e, p = R([]), g = async () => {
668
+ const { data: d } = await n.api();
669
+ p.value = [...d], b("success", p);
568
670
  };
569
671
  n.api && g();
570
- function h(u) {
571
- w("change", u);
672
+ function m(d) {
673
+ b("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 r(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) => s.value ? O : O[n.labelValue.value]
692
+ ) : [], Se(() => {
693
+ b("change", l.value), b("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), b("change", s.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: s.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 = re(() => 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] = (y) => l.value = y)
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: y }) => [
644
746
  ae("div", {
645
- onClick: (ge) => k(p)
646
- }, J(p.label), 9, nn)
747
+ onClick: (ge) => _(y)
748
+ }, J(y.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: w.value,
759
+ "onUpdate:modelValue": x[0] || (x[0] = (y) => w.value = y),
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] = (y) => l.value = y),
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 : (y) => i.value = y,
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: w.value,
786
+ "onUpdate:modelValue": x[2] || (x[2] = (y) => w.value = y),
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), se(Oe, null, rt(v.value, (y, 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(y),
798
+ disabled: H(a).multiple != null && t.maxLimit > 0 ? C(y) : !1,
799
+ onClick: Me((ie) => _(y), ["stop"]),
800
+ value: s.value ? y : y[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
+ }, sn = /* @__PURE__ */ _e(rn, [["__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, r, o) {
817
+ const l = z("el-icon");
818
+ return L(), B(l, { class: "cmp-icon" }, {
819
+ default: D(() => [
820
+ (L(), B(st(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
- function s() {
832
+ function r() {
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),
737
- onCancel: s
835
+ return (o, l) => {
836
+ const s = z("el-popconfirm");
837
+ return L(), B(s, he(o.$attrs, {
838
+ onConfirm: H(a),
839
+ onCancel: r
738
840
  }), {
739
- reference: T(() => [
841
+ reference: D(() => [
740
842
  X(o.$slots, "default")
741
843
  ]),
742
844
  _: 3
@@ -744,69 +846,81 @@ 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: () => ({})
859
+ },
860
+ fileChange: {
861
+ type: Function,
862
+ required: !0
757
863
  }
758
864
  },
759
865
  emits: ["fileChange"],
760
866
  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;
867
+ const n = t, a = R(null), r = R(!1);
868
+ async function o(l) {
869
+ r.value = !0;
870
+ let s = l.target.files[0];
871
+ const i = await tn(s, n.fields).catch(() => {
872
+ r.value = !1;
873
+ }).finally(() => {
874
+ a.value.value = null;
875
+ });
876
+ await n.fileChange(i).finally(() => {
877
+ r.value = !1;
878
+ });
765
879
  }
766
- return (o, a) => {
767
- const r = F("el-button");
768
- return L(), re("span", null, [
769
- V(r, {
770
- loading: t.loading,
880
+ return (l, s) => {
881
+ const i = z("el-button");
882
+ return L(), se("span", null, [
883
+ q(i, {
884
+ loading: r.value,
771
885
  class: "mgr10",
772
- onClick: a[0] || (a[0] = (c) => l.value.click())
886
+ onClick: s[0] || (s[0] = (v) => a.value.click())
773
887
  }, {
774
- default: T(() => [
775
- Q(J(o.$t("dao-ru")), 1)
888
+ default: D(() => [
889
+ Q(J(l.$t("dao-ru")), 1)
776
890
  ]),
777
891
  _: 1
778
892
  }, 8, ["loading"]),
779
893
  ae("input", {
780
- onChange: s,
894
+ onChange: o,
781
895
  ref_key: "input",
782
- ref: l,
896
+ ref: a,
783
897
  accept: t.accept,
784
898
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
785
899
  type: "file"
786
- }, null, 40, rn)
900
+ }, null, 40, dn)
787
901
  ]);
788
902
  };
789
903
  }
790
- }, Hn = /* @__PURE__ */ xe(cn, [["__scopeId", "data-v-5f1449ad"]]);
791
- function qe(t) {
904
+ }, Gn = /* @__PURE__ */ _e(fn, [["__scopeId", "data-v-6f9ede29"]]);
905
+ function Ue(t) {
792
906
  let e = {};
793
907
  return t.forEach((n) => {
794
- const { key: l, type: s, option: o = {}, value: a, dateType: r = "date" } = n;
795
- if (l)
796
- if (s == "input" && (o != null && o.multiple))
797
- e[l] = ht(a);
798
- 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;
908
+ const { key: a, type: r, option: o = {}, value: l, dateType: s = "date" } = n;
909
+ if (a)
910
+ if (r == "input" && (o != null && o.multiple))
911
+ e[a] = pt(l);
912
+ else if (r == "date")
913
+ if (s.includes("range")) {
914
+ const [i, v] = a;
915
+ let [w, b] = l || [];
916
+ w && s == "daterange" && (w = ke(w).format("YYYY-MM-DD 00:00:00"), b = ke(b).format("YYYY-MM-DD 23:59:59")), e[i] = w, e[v] = b;
803
917
  } else
804
- e[l] = a;
918
+ e[a] = l;
805
919
  else
806
- e[l] = a;
920
+ e[a] = l;
807
921
  }), e;
808
922
  }
809
- const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { class: "right" }, mn = {
923
+ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { class: "right" }, yn = {
810
924
  __name: "index",
811
925
  props: {
812
926
  form: {
@@ -816,83 +930,83 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
816
930
  },
817
931
  emits: ["confirm", "reset", "visibleChange"],
818
932
  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() {
821
- s("confirm");
933
+ const a = t, r = n, o = R(!0), l = R(null), { t: s } = me(), i = re(() => o.value ? s("guan-bi") : s("zhan-kai"));
934
+ function v() {
935
+ r("confirm");
822
936
  }
823
- function C(m) {
824
- m.option.onClear && m.option.onClear(), s("confirm");
937
+ function w(h) {
938
+ h.option.onClear && h.option.onClear(), r("confirm");
825
939
  }
826
- function w() {
827
- s("reset");
940
+ function b() {
941
+ r("reset");
828
942
  }
829
- function y() {
830
- s("confirm");
943
+ function p() {
944
+ r("confirm");
831
945
  }
832
946
  function g() {
833
- return qe(l.form.items);
947
+ return Ue(a.form.items);
834
948
  }
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);
949
+ const m = ct(a.form.items);
950
+ function u() {
951
+ a.form.items.forEach((h) => {
952
+ const k = m.find((_) => _.key == h.key);
953
+ k && (h.value = k.value);
840
954
  });
841
955
  }
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");
844
- return L(), re("div", {
956
+ return e({ getPrm: g, reset: u }), (h, k) => {
957
+ 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");
958
+ return L(), se("div", {
845
959
  class: "searchBar-container mgt10 mgb10",
846
- onKeydown: It(b, ["enter"])
960
+ onKeydown: Dt(v, ["enter"])
847
961
  }, [
848
962
  ae("div", {
849
963
  class: "searchBar",
850
- style: Tt({ height: o.value ? "auto" : "42px" })
964
+ style: zt({ height: o.value ? "auto" : "42px" })
851
965
  }, [
852
- V(E, {
966
+ q(E, {
853
967
  inline: "",
854
968
  model: t.form.data
855
969
  }, {
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
970
+ default: D(() => [
971
+ (L(!0), se(Oe, null, rt(t.form.items.filter((d) => !d.hidden), (d) => (L(), se(Oe, {
972
+ key: d.key
859
973
  }, [
860
- u.type == "br" ? (L(), re("br", un)) : (L(), B(M, {
974
+ d.type == "br" ? (L(), se("br", hn)) : (L(), B(S, {
861
975
  key: 1,
862
- label: u.name
976
+ label: d.name
863
977
  }, {
864
- default: T(() => {
865
- var v, z;
978
+ default: D(() => {
979
+ var x, O;
866
980
  return [
867
- u.type === "input" ? (L(), B(k, {
981
+ d.type === "input" ? (L(), B(_, {
868
982
  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"),
983
+ modelValue: d.value,
984
+ "onUpdate:modelValue": (A) => d.value = A,
985
+ class: Ve(((x = d.option) == null ? void 0 : x.class) || "w150"),
986
+ placeholder: h.$t("qing-shu-ru"),
873
987
  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({
988
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(), B(st(d.render), { key: 1 })) : ce("", !0),
989
+ d.type === "select" ? (L(), B(sn, he({
876
990
  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)
991
+ class: ((O = d.option) == null ? void 0 : O.class) || "w150",
992
+ modelValue: d.value,
993
+ "onUpdate:modelValue": (A) => d.value = A
994
+ }, { ref_for: !0 }, d.option, {
995
+ onChange: v,
996
+ onClear: (A) => w(d)
883
997
  }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
884
- u.type === "date" ? (L(), B(S, {
998
+ d.type === "date" ? (L(), B(C, {
885
999
  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")
1000
+ class: Ve({ datetimerange: "w300", daterange: "w200" }[d.dateType] || "w100"),
1001
+ modelValue: d.value,
1002
+ "onUpdate:modelValue": (A) => d.value = A,
1003
+ "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[d.dateType] || "YYYY-MM-DD",
1004
+ type: d.dateType || "date",
1005
+ onFocus: (A) => l.value = d,
1006
+ onChange: (A) => p(),
1007
+ placeholder: h.$t("qing-xuan-ze"),
1008
+ "start-placeholder": h.$t("kai-shi-shi-jian"),
1009
+ "end-placeholder": h.$t("jie-shu-shi-jian")
896
1010
  }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : ce("", !0)
897
1011
  ];
898
1012
  }),
@@ -903,51 +1017,51 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
903
1017
  _: 1
904
1018
  }, 8, ["model"])
905
1019
  ], 4),
906
- ae("div", dn, [
907
- ae("div", fn, [
908
- X(m.$slots, "table-header-left", {}, void 0, !0)
1020
+ ae("div", mn, [
1021
+ ae("div", gn, [
1022
+ X(h.$slots, "table-header-left", {}, void 0, !0)
909
1023
  ]),
910
- ae("div", hn, [
911
- V(W, {
1024
+ ae("div", pn, [
1025
+ q(Y, {
912
1026
  underline: "never",
913
1027
  class: "mgr10",
914
- onClick: _[0] || (_[0] = () => {
915
- s("visibleChange", !o.value), o.value = !o.value;
1028
+ onClick: k[0] || (k[0] = () => {
1029
+ r("visibleChange", !o.value), o.value = !o.value;
916
1030
  })
917
1031
  }, {
918
- default: T(() => [
919
- V(mt, {
1032
+ default: D(() => [
1033
+ q(yt, {
920
1034
  name: o.value ? "ArrowUp" : "ArrowDown"
921
1035
  }, null, 8, ["name"]),
922
- Q(" " + J(c.value), 1)
1036
+ Q(" " + J(i.value), 1)
923
1037
  ]),
924
1038
  _: 1
925
1039
  }),
926
- V(A, {
1040
+ q(F, {
927
1041
  type: "primary",
928
- onClick: b
1042
+ onClick: v
929
1043
  }, {
930
- default: T(() => [
931
- Q(J(m.$t("shai-xuan")), 1)
1044
+ default: D(() => [
1045
+ Q(J(h.$t("shai-xuan")), 1)
932
1046
  ]),
933
1047
  _: 1
934
1048
  }),
935
- V(A, {
1049
+ q(F, {
936
1050
  type: "primary",
937
- onClick: w
1051
+ onClick: b
938
1052
  }, {
939
- default: T(() => [
940
- Q(J(m.$t("chong-zhi")), 1)
1053
+ default: D(() => [
1054
+ Q(J(h.$t("chong-zhi")), 1)
941
1055
  ]),
942
1056
  _: 1
943
1057
  }),
944
- X(m.$slots, "btn", {}, void 0, !0)
1058
+ X(h.$slots, "btn", {}, void 0, !0)
945
1059
  ])
946
1060
  ])
947
1061
  ], 32);
948
1062
  };
949
1063
  }
950
- }, gn = /* @__PURE__ */ xe(mn, [["__scopeId", "data-v-3c0a6716"]]), gt = {
1064
+ }, vn = /* @__PURE__ */ _e(yn, [["__scopeId", "data-v-3c0a6716"]]), vt = {
951
1065
  // 分页参数名
952
1066
  pageNoKey: "pageNo",
953
1067
  // 页码参数名
@@ -977,8 +1091,8 @@ const un = { key: 0 }, dn = { class: "btns" }, fn = { class: "left" }, hn = { cl
977
1091
  enableCellCopy: !0
978
1092
  // 是否启用单元格选区复制功能
979
1093
  };
980
- let Ce = { ...gt };
981
- function Nn(t) {
1094
+ let Ce = { ...vt };
1095
+ function Jn(t) {
982
1096
  Ce = {
983
1097
  ...Ce,
984
1098
  ...t,
@@ -988,13 +1102,13 @@ function Nn(t) {
988
1102
  }
989
1103
  };
990
1104
  }
991
- function pn() {
1105
+ function bn() {
992
1106
  return Ce;
993
1107
  }
994
- function Zn() {
995
- Ce = { ...gt };
1108
+ function Xn() {
1109
+ Ce = { ...vt };
996
1110
  }
997
- const yn = { class: "center" }, vn = {
1111
+ const wn = { class: "center" }, xn = {
998
1112
  __name: "index",
999
1113
  props: {
1000
1114
  // 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
@@ -1031,110 +1145,110 @@ const yn = { class: "center" }, vn = {
1031
1145
  }
1032
1146
  },
1033
1147
  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({
1040
- [w]: 1,
1041
- [y]: a.searchForm.defaultPageSize || o.defaultPageSize,
1148
+ const { t: n, locale: a } = me(), r = jt(), o = bn(), l = t, s = R(!1), i = R([]);
1149
+ 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 = []);
1150
+ const v = re(() => {
1151
+ const f = r.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1152
+ return l.id ? `listPageId-${f}-${l.id}` : `listPageId-${f}`;
1153
+ }), w = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, p = l.searchForm.pageSizeKey || o.pageSizeKey, g = $e({
1154
+ [b]: 1,
1155
+ [p]: l.searchForm.defaultPageSize || o.defaultPageSize,
1042
1156
  total: 0
1043
- }), h = R(null), f = R(null), m = R(450), _ = Ue(() => {
1044
- _e(() => {
1045
- if (!f.value)
1157
+ }), m = R(null), u = R(null), h = R(450), k = Re(() => {
1158
+ Se(() => {
1159
+ if (!u.value)
1046
1160
  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);
1161
+ const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U, M = 200;
1162
+ h.value = Math.max(W, M);
1049
1163
  });
1050
- }, 100), k = () => {
1051
- _();
1052
- }, S = () => {
1053
- if (!a.searchForm.enableCellCopy)
1164
+ }, 100), _ = () => {
1165
+ k();
1166
+ }, C = () => {
1167
+ if (!l.searchForm.enableCellCopy)
1054
1168
  return !1;
1055
- const d = h.value;
1056
- if (!d || !d.$el)
1169
+ const f = m.value;
1170
+ if (!f || !f.$el)
1057
1171
  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;
1172
+ const c = f.$el;
1173
+ 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
1174
  };
1061
- nt(() => {
1062
- _(), window.addEventListener("resize", k), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ke), document.addEventListener("mousedown", He), setTimeout(() => {
1063
- S();
1175
+ lt(() => {
1176
+ k(), window.addEventListener("resize", _), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
1177
+ C();
1064
1178
  }, 500));
1065
- }), Ft(() => {
1066
- a.searchForm.enableCellCopy && setTimeout(() => {
1067
- S();
1179
+ }), Ot(() => {
1180
+ l.searchForm.enableCellCopy && setTimeout(() => {
1181
+ C();
1068
1182
  }, 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);
1183
+ }), Mt(() => {
1184
+ if (window.removeEventListener("resize", _), l.searchForm.enableCellCopy) {
1185
+ document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", We);
1186
+ const f = m.value;
1187
+ if (f && f.$el) {
1188
+ const c = f.$el;
1189
+ c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Le);
1076
1190
  }
1077
1191
  }
1078
1192
  });
1079
- const M = se(() => ue.value.height || m.value);
1193
+ const S = re(() => ue.value.height || h.value);
1080
1194
  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 = [];
1195
+ async function Y(f) {
1196
+ const { dataFormat: c } = l.tableConfig;
1197
+ f[b] != 1 && (f.nextSearchAfter = E), s.value = !0;
1198
+ const { code: $, data: T = {} } = await l.api(f).finally(() => {
1199
+ s.value = !1, l.searchForm.selections = [];
1086
1200
  });
1087
- if (x == 200) {
1088
- let j = [];
1089
- for (const D of o.responseDataKeys.rows)
1090
- if (I[D]) {
1091
- j = I[D];
1201
+ if ($ == 200) {
1202
+ let U = [];
1203
+ for (const M of o.responseDataKeys.rows)
1204
+ if (T[M]) {
1205
+ U = T[M];
1092
1206
  break;
1093
1207
  }
1094
- let N = 0;
1095
- for (const D of o.responseDataKeys.total)
1096
- if (I[D] !== void 0) {
1097
- N = I[D];
1208
+ let W = 0;
1209
+ for (const M of o.responseDataKeys.total)
1210
+ if (T[M] !== void 0) {
1211
+ W = T[M];
1098
1212
  break;
1099
1213
  }
1100
- c.value = i ? i(j) : j, g.total = N, E = I.nextSearchAfter, a.searchForm.enableCellCopy && _e(() => {
1214
+ i.value = c ? c(U) : U, g.total = W, E = T.nextSearchAfter, l.searchForm.enableCellCopy && Se(() => {
1101
1215
  setTimeout(() => {
1102
- S();
1216
+ C();
1103
1217
  }, 100);
1104
1218
  });
1105
1219
  }
1106
1220
  }
1107
- function A(d = {}) {
1108
- const { searchData: i = () => ({}) } = a.tableConfig, x = i();
1109
- W({ ...g, ...qe(a.searchForm.items), ...d, ...x });
1221
+ function F(f = {}) {
1222
+ const { searchData: c = () => ({}) } = l.tableConfig, $ = c();
1223
+ Y({ ...g, ...Ue(l.searchForm.items), ...f, ...$ });
1110
1224
  }
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();
1225
+ function d() {
1226
+ const { reset: f } = l.tableConfig;
1227
+ f && f(), l.searchForm.items.forEach((c) => {
1228
+ const $ = w.find((T) => Qe(c.key) && Qe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
1229
+ $ && (c.value = $.value);
1230
+ }), F();
1117
1231
  }
1118
- a.api && a.immediate && A();
1119
- function v() {
1120
- return { ...g, ...qe(a.searchForm.items) };
1232
+ l.api && l.immediate && F();
1233
+ function x() {
1234
+ return { ...g, ...Ue(l.searchForm.items) };
1121
1235
  }
1122
- const z = () => {
1123
- const d = h.value;
1124
- d && d.clearSort();
1125
- }, q = ke({
1236
+ const O = () => {
1237
+ const f = m.value;
1238
+ f && f.clearSort();
1239
+ }, A = $e({
1126
1240
  storage: !0
1127
- }), oe = ke({
1241
+ }), oe = $e({
1128
1242
  drag: !0,
1129
1243
  resizable: !0,
1130
1244
  maxFixedSize: 0
1131
- }), ue = se(() => {
1132
- const { customConfig: d, columnConfig: i, ...x } = a.tableConfig;
1245
+ }), ue = re(() => {
1246
+ const { customConfig: f, columnConfig: c, ...$ } = l.tableConfig;
1133
1247
  return {
1134
1248
  headerAlign: "left",
1135
1249
  align: "center",
1136
- customConfig: { ...q, ...d },
1137
- columnConfig: { ...oe, ...i },
1250
+ customConfig: { ...A, ...f },
1251
+ columnConfig: { ...oe, ...c },
1138
1252
  // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1139
1253
  "virtual-x-config": {
1140
1254
  enabled: !1,
@@ -1142,9 +1256,9 @@ const yn = { class: "center" }, vn = {
1142
1256
  },
1143
1257
  // 纵向虚拟滚动 大于100条开启
1144
1258
  "virtual-y-config": { enabled: !0, gt: 100 },
1145
- ...x
1259
+ ...$
1146
1260
  };
1147
- }), p = ke({
1261
+ }), y = $e({
1148
1262
  isSelecting: !1,
1149
1263
  // 是否正在选择
1150
1264
  startCell: null,
@@ -1153,71 +1267,71 @@ const yn = { class: "center" }, vn = {
1153
1267
  // 结束单元格
1154
1268
  selectedCells: []
1155
1269
  // 选中的单元格列表 [{ 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"))
1270
+ }), ge = (f) => {
1271
+ const c = f.closest(".vxe-body--column");
1272
+ if (!c || c.classList.contains("col--checkbox") || c.classList.contains("col--seq"))
1159
1273
  return null;
1160
- const x = i.closest(".vxe-body--row");
1161
- if (!x)
1274
+ const $ = c.closest(".vxe-body--row");
1275
+ if (!$)
1162
1276
  return null;
1163
- const I = h.value;
1164
- if (!I)
1277
+ const T = m.value;
1278
+ if (!T)
1165
1279
  return null;
1166
- let j = -1;
1167
- const N = x.getAttribute("data-rowid");
1168
- if (N != null)
1169
- j = parseInt(N, 10);
1280
+ let U = -1;
1281
+ const W = $.getAttribute("data-rowid");
1282
+ if (W != null)
1283
+ U = parseInt(W, 10);
1170
1284
  else {
1171
- const O = x.parentElement;
1172
- j = Array.from(O.querySelectorAll(".vxe-body--row")).indexOf(x);
1285
+ const V = $.parentElement;
1286
+ U = Array.from(V.querySelectorAll(".vxe-body--row")).indexOf($);
1173
1287
  }
1174
- if (j < 0)
1288
+ if (U < 0)
1175
1289
  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[$]));
1290
+ let M = -1;
1291
+ const le = c.getAttribute("data-colid");
1292
+ if (le && (M = T.getColumns().findIndex((I) => I.id === le)), M < 0) {
1293
+ 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();
1294
+ if (K) {
1295
+ const G = P.filter((N) => N.fixed === "left");
1296
+ I < G.length && (M = P.indexOf(G[I]));
1183
1297
  } else if (Z) {
1184
- const G = P.filter((H) => H.fixed === "right");
1185
- $ < G.length && (D = P.indexOf(G[$]));
1298
+ const G = P.filter((N) => N.fixed === "right");
1299
+ I < G.length && (M = P.indexOf(G[I]));
1186
1300
  } else {
1187
- const G = a.searchForm.showCheckBox ? 1 : 0;
1188
- D = P.filter((ee) => ee.fixed === "left").length + $ - G;
1301
+ const G = l.searchForm.showCheckBox ? 1 : 0;
1302
+ M = P.filter((ee) => ee.fixed === "left").length + I - G;
1189
1303
  }
1190
1304
  }
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();
1305
+ return M < 0 ? null : { rowIndex: U, colIndex: M, cell: c };
1306
+ }, ie = (f) => {
1307
+ const c = ge(f.target);
1308
+ if (!c) {
1309
+ Ie();
1196
1310
  return;
1197
1311
  }
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)
1312
+ y.isSelecting = !0, y.startCell = {
1313
+ rowIndex: c.rowIndex,
1314
+ colIndex: c.colIndex
1315
+ }, y.endCell = { ...y.startCell }, Ke(), He();
1316
+ }, pe = (f) => {
1317
+ if (!y.isSelecting)
1204
1318
  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)
1319
+ const c = ge(f.target);
1320
+ c && (y.endCell = {
1321
+ rowIndex: c.rowIndex,
1322
+ colIndex: c.colIndex
1323
+ }, Ke(), He());
1324
+ }, be = () => {
1325
+ y.isSelecting = !1;
1326
+ }, Ie = () => {
1327
+ y.selectedCells = [], y.startCell = null, y.endCell = null;
1328
+ const f = m.value;
1329
+ if (!f)
1216
1330
  return;
1217
- d.$el.querySelectorAll(
1331
+ f.$el.querySelectorAll(
1218
1332
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1219
- ).forEach((x) => {
1220
- x.classList.remove(
1333
+ ).forEach(($) => {
1334
+ $.classList.remove(
1221
1335
  "cell-selected",
1222
1336
  "cell-border-top",
1223
1337
  "cell-border-right",
@@ -1225,228 +1339,228 @@ const yn = { class: "center" }, vn = {
1225
1339
  "cell-border-left"
1226
1340
  );
1227
1341
  });
1228
- }, Be = () => {
1229
- if (!p.startCell || !p.endCell) {
1230
- p.selectedCells = [];
1342
+ }, Ke = () => {
1343
+ if (!y.startCell || !y.endCell) {
1344
+ y.selectedCells = [];
1231
1345
  return;
1232
1346
  }
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: $
1347
+ const f = y.startCell.rowIndex, c = y.endCell.rowIndex, $ = y.startCell.colIndex, T = y.endCell.colIndex, U = Math.min(f, c), W = Math.max(f, c), M = Math.min($, T), le = Math.max($, T);
1348
+ y.selectedCells = [];
1349
+ for (let V = U; V <= W; V++)
1350
+ for (let I = M; I <= le; I++)
1351
+ y.selectedCells.push({
1352
+ rowIndex: V,
1353
+ colIndex: I
1240
1354
  });
1241
- }, Ye = () => {
1242
- _e(() => {
1243
- const d = h.value;
1244
- if (!d)
1355
+ }, He = () => {
1356
+ Se(() => {
1357
+ const f = m.value;
1358
+ if (!f)
1245
1359
  return;
1246
- const i = d.$el;
1247
- if (i.querySelectorAll(
1360
+ const c = f.$el;
1361
+ if (c.querySelectorAll(
1248
1362
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1249
- ).forEach((Y) => {
1250
- Y.classList.remove(
1363
+ ).forEach((K) => {
1364
+ K.classList.remove(
1251
1365
  "cell-selected",
1252
1366
  "cell-border-top",
1253
1367
  "cell-border-right",
1254
1368
  "cell-border-bottom",
1255
1369
  "cell-border-left"
1256
1370
  );
1257
- }), p.selectedCells.length === 0)
1371
+ }), y.selectedCells.length === 0)
1258
1372
  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")
1373
+ const $ = f.getColumns(), T = y.selectedCells.map((K) => K.rowIndex), U = y.selectedCells.map((K) => K.colIndex), W = Math.min(...T), M = Math.max(...T), le = Math.min(...U), V = Math.max(...U), I = [
1374
+ c.querySelector(".vxe-table--body-wrapper tbody"),
1375
+ c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1376
+ c.querySelector(".vxe-table--fixed-right-wrapper tbody")
1263
1377
  ].filter(Boolean);
1264
- p.selectedCells.forEach(({ rowIndex: Y, colIndex: Z }) => {
1265
- const P = x[Z];
1378
+ y.selectedCells.forEach(({ rowIndex: K, colIndex: Z }) => {
1379
+ const P = $[Z];
1266
1380
  if (!P)
1267
1381
  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)
1382
+ const G = P.fixed === "left", N = P.fixed === "right";
1383
+ for (const ee of I) {
1384
+ const we = ee.querySelectorAll(".vxe-body--row")[K];
1385
+ if (!we)
1272
1386
  continue;
1273
- const de = Array.from(be.querySelectorAll(".vxe-body--column"));
1274
- let U = null;
1387
+ const de = Array.from(we.querySelectorAll(".vxe-body--column"));
1388
+ let j = null;
1275
1389
  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];
1390
+ const te = $.filter((ne) => ne.fixed === "left").indexOf(P);
1391
+ j = de[te];
1392
+ } else if (N && ee.closest(".vxe-table--fixed-right-wrapper")) {
1393
+ const te = $.filter((ne) => ne.fixed === "right").indexOf(P);
1394
+ j = de[te];
1395
+ } else if (!G && !N && ee.closest(".vxe-table--body-wrapper")) {
1396
+ const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne = Z - te;
1397
+ j = de[ne + fe];
1284
1398
  }
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");
1399
+ if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
1400
+ 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
1401
  break;
1288
1402
  }
1289
1403
  }
1290
1404
  });
1291
1405
  });
1292
- }, yt = async () => {
1293
- if (p.selectedCells.length === 0)
1406
+ }, wt = async () => {
1407
+ if (y.selectedCells.length === 0)
1294
1408
  return;
1295
- const d = h.value;
1296
- if (!d)
1409
+ const f = m.value;
1410
+ if (!f)
1297
1411
  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];
1412
+ const c = f.$el, $ = f.getColumns(), T = [...new Set(y.selectedCells.map((V) => V.rowIndex))].sort(
1413
+ (V, I) => V - I
1414
+ ), U = [...new Set(y.selectedCells.map((V) => V.colIndex))].sort(
1415
+ (V, I) => V - I
1416
+ ), W = [
1417
+ c.querySelector(".vxe-table--body-wrapper tbody"),
1418
+ c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1419
+ c.querySelector(".vxe-table--fixed-right-wrapper tbody")
1420
+ ].filter(Boolean), M = [];
1421
+ T.forEach((V) => {
1422
+ const I = [];
1423
+ U.forEach((K) => {
1424
+ const Z = $[K];
1311
1425
  if (!Z) {
1312
- $.push("");
1426
+ I.push("");
1313
1427
  return;
1314
1428
  }
1315
1429
  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)
1430
+ let N = "";
1431
+ for (const ee of W) {
1432
+ const we = ee.querySelectorAll(".vxe-body--row")[V];
1433
+ if (!we)
1320
1434
  continue;
1321
- const de = Array.from(be.querySelectorAll(".vxe-body--column"));
1322
- let U = null;
1435
+ const de = Array.from(we.querySelectorAll(".vxe-body--column"));
1436
+ let j = null;
1323
1437
  if (P && ee.closest(".vxe-table--fixed-left-wrapper")) {
1324
- const te = x.filter((ne) => ne.fixed === "left").indexOf(Z);
1325
- U = de[te];
1438
+ const te = $.filter((ne) => ne.fixed === "left").indexOf(Z);
1439
+ j = de[te];
1326
1440
  } 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];
1441
+ const te = $.filter((ne) => ne.fixed === "right").indexOf(Z);
1442
+ j = de[te];
1329
1443
  } 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];
1444
+ const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne = K - te;
1445
+ j = de[ne + fe];
1332
1446
  }
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, " ");
1447
+ if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
1448
+ N = j.innerText || j.textContent || "", N = N.trim(), N = N.replace(/\n/g, " ").replace(/\s+/g, " ");
1335
1449
  break;
1336
1450
  }
1337
1451
  }
1338
- $.push(H);
1339
- }), D.push($.join(" "));
1452
+ I.push(N);
1453
+ }), M.push(I.join(" "));
1340
1454
  });
1341
- const le = D.join(`
1455
+ const le = M.join(`
1342
1456
  `);
1343
1457
  try {
1344
1458
  await navigator.clipboard.writeText(le);
1345
- } catch (O) {
1346
- console.error("复制失败:", O);
1459
+ } catch (V) {
1460
+ console.error("复制失败:", V);
1347
1461
  }
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)
1462
+ }, Le = (f) => {
1463
+ l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" && Ie());
1464
+ }, Ne = () => {
1465
+ y.isSelecting = !1;
1466
+ }, We = (f) => {
1467
+ const c = m.value;
1468
+ if (!c || !c.$el)
1355
1469
  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();
1470
+ c.$el.contains(f.target) || Ie();
1471
+ }, xt = (f) => {
1472
+ g[b] = f, F();
1473
+ }, Ct = (f) => {
1474
+ g[p] = f, g[b] = 1, F();
1361
1475
  };
1362
- function Ne() {
1363
- const d = h.value.getCheckboxRecords();
1364
- a.searchForm.selections = d;
1476
+ function Ze() {
1477
+ const f = m.value.getCheckboxRecords();
1478
+ l.searchForm.selections = f;
1365
1479
  }
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;
1480
+ const Ge = (f) => {
1481
+ const c = m.value;
1482
+ if (c) {
1483
+ c.toggleCheckboxRow(f);
1484
+ const $ = m.value.getCheckboxRecords();
1485
+ l.searchForm.selections = $;
1372
1486
  }
1373
1487
  };
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");
1377
- return L(), re("div", {
1378
- class: Oe({ box: t.searchForm.showShadow })
1488
+ return e({ tableRef: m, getList: F, getPrm: x, clearSort: O, calculateTableHeight: k }), (f, c) => {
1489
+ var V;
1490
+ const $ = z("el-button"), T = z("el-checkbox"), U = z("el-text"), W = z("vxe-column"), M = z("VxeTable"), le = z("el-pagination");
1491
+ return L(), se("div", {
1492
+ class: Ve({ box: t.searchForm.showShadow })
1379
1493
  }, [
1380
- t.searchForm.showSearch ? (L(), B(gn, {
1494
+ t.searchForm.showSearch ? (L(), B(vn, {
1381
1495
  key: 0,
1382
1496
  form: t.searchForm,
1383
- onReset: u,
1384
- onConfirm: i[1] || (i[1] = ($) => A()),
1385
- onVisibleChange: K(_)
1497
+ onReset: d,
1498
+ onConfirm: c[1] || (c[1] = (I) => F()),
1499
+ onVisibleChange: H(k)
1386
1500
  }, {
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, {
1501
+ btn: D(() => [
1502
+ c[3] || (c[3] = ae("span", { class: "mgr10" }, null, -1)),
1503
+ X(f.$slots, "search-bar-btn", {}, void 0, !0),
1504
+ q($, {
1391
1505
  class: "mgl10",
1392
1506
  round: "",
1393
- onClick: i[0] || (i[0] = ($) => h.value.openCustom())
1507
+ onClick: c[0] || (c[0] = (I) => m.value.openCustom())
1394
1508
  }, {
1395
- default: T(() => [
1396
- V(mt, { name: "Tools" })
1509
+ default: D(() => [
1510
+ q(yt, { name: "Tools" })
1397
1511
  ]),
1398
1512
  _: 1
1399
1513
  })
1400
1514
  ]),
1401
1515
  _: 3
1402
1516
  }, 8, ["form", "onVisibleChange"])) : ce("", !0),
1403
- X(d.$slots, "table-header-left", {}, void 0, !0),
1517
+ X(f.$slots, "table-header-left", {}, void 0, !0),
1404
1518
  ae("div", {
1405
1519
  ref_key: "tableContentRef",
1406
- ref: f
1520
+ ref: u
1407
1521
  }, [
1408
- V(D, he({
1409
- id: b.value,
1522
+ q(M, he({
1523
+ id: v.value,
1410
1524
  ref_key: "tableRef",
1411
- ref: h,
1412
- loading: t.loading || r.value,
1413
- data: t.api ? c.value : t.data,
1525
+ ref: m,
1526
+ loading: t.loading || s.value,
1527
+ data: t.api ? i.value : t.data,
1414
1528
  border: ""
1415
1529
  }, ue.value, {
1416
- height: M.value,
1417
- onCheckboxChange: Ne,
1418
- onCheckboxAll: Ne,
1419
- onSortChange: (O = ue.value["sort-config"]) == null ? void 0 : O.sortChange
1530
+ height: S.value,
1531
+ onCheckboxChange: Ze,
1532
+ onCheckboxAll: Ze,
1533
+ onSortChange: (V = ue.value["sort-config"]) == null ? void 0 : V.sortChange
1420
1534
  }), {
1421
- default: T(() => [
1422
- t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), B(N, {
1535
+ default: D(() => [
1536
+ t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), B(W, {
1423
1537
  key: 0,
1424
1538
  type: "checkbox",
1425
- width: K(l) == "zh_cn" ? 80 : 150,
1426
- title: d.$t("xu-hao"),
1539
+ width: H(a) == "zh_cn" ? 80 : 150,
1540
+ title: f.$t("xu-hao"),
1427
1541
  fixed: "left"
1428
1542
  }, {
1429
- checkbox: T(({ rowIndex: $, row: Y, checked: Z, disabled: P, indeterminate: G }) => [
1430
- ae("div", yn, [
1431
- Z ? (L(), B(I, {
1543
+ checkbox: D(({ rowIndex: I, row: K, checked: Z, disabled: P, indeterminate: G }) => [
1544
+ ae("div", wn, [
1545
+ Z ? (L(), B(T, {
1432
1546
  key: 0,
1433
1547
  checked: !0,
1434
1548
  disabled: P,
1435
1549
  size: "default",
1436
- onClick: De((H) => !P && Ze(Y), ["stop"])
1437
- }, null, 8, ["disabled", "onClick"])) : (L(), B(I, {
1550
+ onClick: Me((N) => !P && Ge(K), ["stop"])
1551
+ }, null, 8, ["disabled", "onClick"])) : (L(), B(T, {
1438
1552
  key: 1,
1439
1553
  disabled: P,
1440
1554
  checked: !1,
1441
1555
  size: "default",
1442
- onClick: De((H) => !P && Ze(Y), ["stop"])
1556
+ onClick: Me((N) => !P && Ge(K), ["stop"])
1443
1557
  }, null, 8, ["disabled", "onClick"])),
1444
- V(j, {
1558
+ q(U, {
1445
1559
  type: "info",
1446
1560
  class: "mgl5"
1447
1561
  }, {
1448
- default: T(() => [
1449
- Q(J($ + 1), 1)
1562
+ default: D(() => [
1563
+ Q(J(I + 1), 1)
1450
1564
  ]),
1451
1565
  _: 2
1452
1566
  }, 1024)
@@ -1454,28 +1568,28 @@ const yn = { class: "center" }, vn = {
1454
1568
  ]),
1455
1569
  _: 1
1456
1570
  }, 8, ["width", "title"])) : ce("", !0),
1457
- X(d.$slots, "default", {}, void 0, !0)
1571
+ X(f.$slots, "default", {}, void 0, !0)
1458
1572
  ]),
1459
1573
  _: 3
1460
1574
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1461
1575
  ], 512),
1462
1576
  t.searchForm.showPage ? (L(), B(le, {
1463
1577
  key: 1,
1464
- "current-page": g[K(w)],
1465
- "onUpdate:currentPage": i[2] || (i[2] = ($) => g[K(w)] = $),
1578
+ "current-page": g[H(b)],
1579
+ "onUpdate:currentPage": c[2] || (c[2] = (I) => g[H(b)] = I),
1466
1580
  class: "myPagination mgt10",
1467
1581
  background: "",
1468
1582
  layout: "total, sizes, prev, pager, next",
1469
1583
  total: g.total,
1470
- "page-size": g[K(y)],
1471
- "page-sizes": t.searchForm.pageSizes || K(o).pageSizes,
1472
- onCurrentChange: vt,
1473
- onSizeChange: bt
1584
+ "page-size": g[H(p)],
1585
+ "page-sizes": t.searchForm.pageSizes || H(o).pageSizes,
1586
+ onCurrentChange: xt,
1587
+ onSizeChange: Ct
1474
1588
  }, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : ce("", !0)
1475
1589
  ], 2);
1476
1590
  };
1477
1591
  }
1478
- }, Gn = /* @__PURE__ */ xe(vn, [["__scopeId", "data-v-d93cad32"]]), Wn = {
1592
+ }, Qn = /* @__PURE__ */ _e(xn, [["__scopeId", "data-v-d93cad32"]]), eo = {
1479
1593
  __name: "index",
1480
1594
  props: {
1481
1595
  sheetsConfig: {
@@ -1490,40 +1604,40 @@ const yn = { class: "center" }, vn = {
1490
1604
  setup(t) {
1491
1605
  const e = t;
1492
1606
  function n() {
1493
- Gt(e.fileName, e.sheetsConfig);
1607
+ nn(e.fileName, e.sheetsConfig);
1494
1608
  }
1495
- return (l, s) => {
1496
- const o = F("el-link");
1609
+ return (a, r) => {
1610
+ const o = z("el-link");
1497
1611
  return L(), B(o, he({
1498
1612
  type: "primary",
1499
1613
  underline: "never"
1500
- }, l.$attrs, { onClick: n }), {
1501
- default: T(() => [
1502
- Q(J(l.$t("xia-zai-dao-ru-mo-ban")), 1)
1614
+ }, a.$attrs, { onClick: n }), {
1615
+ default: D(() => [
1616
+ Q(J(a.$t("xia-zai-dao-ru-mo-ban")), 1)
1503
1617
  ]),
1504
1618
  _: 1
1505
1619
  }, 16);
1506
1620
  };
1507
1621
  }
1508
- }, bn = {
1622
+ }, Cn = {
1509
1623
  mounted(t, e) {
1510
- e.value && Qe(t);
1624
+ e.value && tt(t);
1511
1625
  },
1512
1626
  updated(t, e) {
1513
- e.value ? Qe(t) : et(t);
1627
+ e.value ? tt(t) : nt(t);
1514
1628
  },
1515
1629
  beforeUnmount(t) {
1516
- et(t);
1630
+ nt(t);
1517
1631
  }
1518
1632
  };
1519
- async function Qe(t) {
1520
- await y();
1633
+ async function tt(t) {
1634
+ await p();
1521
1635
  const e = t.querySelector(".el-dialog");
1522
1636
  if (!e)
1523
1637
  return;
1524
- const n = t.querySelector(".el-dialog__header"), l = t.querySelector(".el-overlay");
1525
- l.style.cssText += "overflow: hidden;", n.style.cursor = "move";
1526
- let s = !1, o = {
1638
+ const n = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-overlay");
1639
+ a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
1640
+ let r = !1, o = {
1527
1641
  // 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
1528
1642
  window: {
1529
1643
  // window信息
@@ -1549,50 +1663,50 @@ async function Qe(t) {
1549
1663
  y: 0
1550
1664
  }
1551
1665
  };
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();
1666
+ n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", w), window.addEventListener("resize", b);
1667
+ function l() {
1668
+ 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), s();
1555
1669
  }
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;`;
1670
+ function s() {
1671
+ let g = o.drag.y - o.mouse.y + o.dialog.y, m = o.drag.x - o.mouse.x + o.dialog.x;
1672
+ e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${m}px;`;
1559
1673
  }
1560
- function c(g) {
1674
+ function i(g) {
1561
1675
  g.button === 0 && (o.window = {
1562
1676
  width: document.body.clientWidth,
1563
1677
  height: document.body.clientHeight
1564
1678
  }, o.dialog = e.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(e).marginTop, o.mouse = {
1565
1679
  x: g.clientX,
1566
1680
  y: g.clientY
1567
- }, s = !0);
1681
+ }, r = !0);
1568
1682
  }
1569
- function b(g) {
1570
- s && (o.drag = {
1683
+ function v(g) {
1684
+ r && (o.drag = {
1571
1685
  x: g.clientX,
1572
1686
  y: g.clientY
1573
- }, l.style.userSelect = "none", a());
1574
- }
1575
- function C(g) {
1576
- l.style.userSelect = "auto", s = !1;
1687
+ }, a.style.userSelect = "none", l());
1577
1688
  }
1578
1689
  function w(g) {
1690
+ a.style.userSelect = "auto", r = !1;
1579
1691
  }
1580
- function y() {
1581
- return new Promise((g, h) => {
1692
+ function b(g) {
1693
+ }
1694
+ function p() {
1695
+ return new Promise((g, m) => {
1582
1696
  setTimeout(() => {
1583
1697
  g();
1584
1698
  }, 500);
1585
1699
  });
1586
1700
  }
1587
- t.__mouseDown__ = c, t.__mouseUp__ = C, t.__mouseMove__ = b, t.__sizeChange__ = w;
1701
+ t.__mouseDown__ = i, t.__mouseUp__ = w, t.__mouseMove__ = v, t.__sizeChange__ = b;
1588
1702
  }
1589
- function et(t) {
1703
+ function nt(t) {
1590
1704
  document.removeEventListener("mousedown", t.__mouseDown__), document.removeEventListener("mousemove", t.__mouseMove__), document.removeEventListener("mouseup", t.__mouseUp__), window.removeEventListener("resize", t.__sizeChange__);
1591
1705
  }
1592
- const wn = {
1706
+ const kn = {
1593
1707
  key: 0,
1594
1708
  class: "drawer-btn"
1595
- }, Cn = { key: 1 }, Jn = {
1709
+ }, _n = { key: 1 }, to = {
1596
1710
  __name: "index",
1597
1711
  props: {
1598
1712
  layer: {
@@ -1612,48 +1726,48 @@ const wn = {
1612
1726
  },
1613
1727
  emits: ["confirm"],
1614
1728
  setup(t, { emit: e }) {
1615
- const n = t, l = e, { t: s } = me(), o = Ue(() => {
1616
- l("confirm");
1729
+ const n = t, a = e, { t: r } = me(), o = Re(() => {
1730
+ a("confirm");
1617
1731
  }, 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"), {
1620
- confirmButtonText: s("que-ding"),
1621
- cancelButtonText: s("qu-xiao"),
1732
+ async function l() {
1733
+ n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(r("que-ding-guan-bi-ma"), {
1734
+ confirmButtonText: r("que-ding"),
1735
+ cancelButtonText: r("qu-xiao"),
1622
1736
  type: "warning"
1623
1737
  }).catch(() => {
1624
1738
  }) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
1625
1739
  }
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, {
1740
+ return (s, i) => {
1741
+ const v = z("el-button"), w = z("el-drawer"), b = z("el-dialog");
1742
+ return t.layer.type ? (L(), B(w, {
1629
1743
  key: 0,
1630
1744
  modelValue: t.layer.show,
1631
- "onUpdate:modelValue": c[0] || (c[0] = (y) => t.layer.show = y),
1745
+ "onUpdate:modelValue": i[0] || (i[0] = (p) => t.layer.show = p),
1632
1746
  size: t.layer.width || "100%",
1633
1747
  title: t.layer.title,
1634
1748
  direction: "rtl",
1635
1749
  "append-to-body": "",
1636
- "before-close": a,
1750
+ "before-close": l,
1637
1751
  class: "drawer-content"
1638
1752
  }, {
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)
1753
+ default: D(() => [
1754
+ X(s.$slots, "default"),
1755
+ i[2] || (i[2] = ae("p", { class: "mgt50" }, null, -1)),
1756
+ t.layer.showButton ? (L(), se("div", kn, [
1757
+ X(s.$slots, "btn", {}, () => [
1758
+ q(v, { onClick: l }, {
1759
+ default: D(() => [
1760
+ Q(J(s.$t("qu-xiao")), 1)
1647
1761
  ]),
1648
1762
  _: 1
1649
1763
  }),
1650
- V(b, {
1764
+ q(v, {
1651
1765
  type: "primary",
1652
1766
  loading: t.loading,
1653
- onClick: K(o)
1767
+ onClick: H(o)
1654
1768
  }, {
1655
- default: T(() => [
1656
- Q(J(r.$t("ti-jiao")), 1)
1769
+ default: D(() => [
1770
+ Q(J(s.$t("ti-jiao")), 1)
1657
1771
  ]),
1658
1772
  _: 1
1659
1773
  }, 8, ["loading", "onClick"])
@@ -1661,36 +1775,36 @@ const wn = {
1661
1775
  ])) : ce("", !0)
1662
1776
  ]),
1663
1777
  _: 3
1664
- }, 8, ["modelValue", "size", "title"])) : Dt((L(), re("div", Cn, [
1665
- V(w, {
1778
+ }, 8, ["modelValue", "size", "title"])) : Vt((L(), se("div", _n, [
1779
+ q(b, {
1666
1780
  "close-on-click-modal": !1,
1667
1781
  modelValue: t.layer.show,
1668
- "onUpdate:modelValue": c[1] || (c[1] = (y) => t.layer.show = y),
1782
+ "onUpdate:modelValue": i[1] || (i[1] = (p) => t.layer.show = p),
1669
1783
  title: t.layer.title,
1670
1784
  width: t.layer.width || 500,
1671
1785
  center: ""
1672
- }, ot({
1673
- default: T(() => [
1674
- X(r.$slots, "default")
1786
+ }, at({
1787
+ default: D(() => [
1788
+ X(s.$slots, "default")
1675
1789
  ]),
1676
1790
  _: 2
1677
1791
  }, [
1678
1792
  t.layer.showButton ? {
1679
1793
  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)
1794
+ fn: D(() => [
1795
+ X(s.$slots, "btn", {}, () => [
1796
+ q(v, { onClick: l }, {
1797
+ default: D(() => [
1798
+ Q(J(s.$t("qu-xiao")), 1)
1685
1799
  ]),
1686
1800
  _: 1
1687
1801
  }),
1688
- V(b, {
1802
+ q(v, {
1689
1803
  type: "primary",
1690
- onClick: K(o)
1804
+ onClick: H(o)
1691
1805
  }, {
1692
- default: T(() => [
1693
- Q(J(r.$t("ti-jiao")), 1)
1806
+ default: D(() => [
1807
+ Q(J(s.$t("ti-jiao")), 1)
1694
1808
  ]),
1695
1809
  _: 1
1696
1810
  }, 8, ["onClick"])
@@ -1700,30 +1814,30 @@ const wn = {
1700
1814
  } : void 0
1701
1815
  ]), 1032, ["modelValue", "title", "width"])
1702
1816
  ])), [
1703
- [K(bn), t.layer.show]
1817
+ [H(Cn), t.layer.show]
1704
1818
  ]);
1705
1819
  };
1706
1820
  }
1707
1821
  };
1708
- function Xn(t, e = {}) {
1709
- const n = Re(), l = {
1822
+ function no(t, e = {}) {
1823
+ const n = ve(), a = {
1710
1824
  inForm: !0,
1711
1825
  required: !0,
1712
1826
  ...e
1713
- }, s = {
1827
+ }, r = {
1714
1828
  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
1829
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1716
1830
  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));
1831
+ }[t], { inForm: o, value: l, required: s, msg: i = n("validate.invalidInput") } = a;
1832
+ return o ? function(v, w, b) {
1833
+ if (s) {
1834
+ r.test(w) ? b() : b(new Error(i));
1721
1835
  return;
1722
1836
  }
1723
- C && !s.test(C) ? w(new Error(c)) : w();
1724
- } : s.test(a);
1837
+ w && !r.test(w) ? b(new Error(i)) : b();
1838
+ } : r.test(l);
1725
1839
  }
1726
- class Qn {
1840
+ class oo {
1727
1841
  constructor(e = {}) {
1728
1842
  this.config = {
1729
1843
  clientCode: e.clientCode || "one-portal",
@@ -1819,10 +1933,10 @@ class Qn {
1819
1933
  });
1820
1934
  if (!n.ok)
1821
1935
  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票据验证失败");
1936
+ const a = await n.json();
1937
+ if (a.success && a.data)
1938
+ 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;
1939
+ throw new Error(a.message || "ST票据验证失败");
1826
1940
  } catch (n) {
1827
1941
  return this.log("ST票据验证失败:", n), this.handleError(n), !1;
1828
1942
  }
@@ -1861,19 +1975,19 @@ class Qn {
1861
1975
  * 发送带认证的HTTP请求
1862
1976
  */
1863
1977
  async request(e, n = {}) {
1864
- const l = {
1978
+ const a = {
1865
1979
  headers: {
1866
1980
  "Content-Type": "application/json",
1867
1981
  ...n.headers
1868
1982
  },
1869
1983
  ...n
1870
1984
  };
1871
- l.headers.appId = this.config.clientCode, this.token && (l.headers.Authorization = `Bearer ${this.token}`);
1985
+ a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
1872
1986
  try {
1873
- const s = await fetch(e, l);
1874
- return s.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : s;
1875
- } catch (s) {
1876
- throw this.log("请求失败:", s), s;
1987
+ const r = await fetch(e, a);
1988
+ return r.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : r;
1989
+ } catch (r) {
1990
+ throw this.log("请求失败:", r), r;
1877
1991
  }
1878
1992
  }
1879
1993
  /**
@@ -1929,126 +2043,126 @@ class Qn {
1929
2043
  return this.config[e];
1930
2044
  }
1931
2045
  }
1932
- function eo(t, e = {}) {
1933
- const l = Object.assign({
2046
+ function lo(t, e = {}) {
2047
+ const a = Object.assign({
1934
2048
  manual: !1,
1935
2049
  // 手动执行
1936
2050
  log: !1,
1937
2051
  params: null,
1938
2052
  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);
2053
+ }, e), { manual: r, log: o, params: l = {}, cb: s, format: i } = a, v = R([]), w = R(!1), b = (p) => {
2054
+ const g = p || l;
2055
+ w.value = !0, t(g).then((m) => {
2056
+ const { code: u, data: h, msg: k } = m;
2057
+ if (s) {
2058
+ const { records: _, rows: C } = h || {}, S = _ || C ? _ || C : h;
2059
+ v.value = De(S, i), s(m);
1946
2060
  }
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);
2061
+ if (h) {
2062
+ if (h.records != null || h.rows != null) {
2063
+ const { records: _, rows: C, total: S = 0 } = h || {};
2064
+ g && g.total != null && (l.total = parseInt(S)), v.value = De(_ || C || [], i);
1951
2065
  } else
1952
- b.value = Te(m, c);
1953
- o && console.log("useRequest-res", b.value);
2066
+ v.value = De(h, i);
2067
+ o && console.log("useRequest-res", v.value);
1954
2068
  }
1955
- }).catch((h) => {
1956
- r && (console.log("useRequestErr", h), r({ code: 500 }));
2069
+ }).catch((m) => {
2070
+ s && (console.log("useRequestErr", m), s({ code: 500 }));
1957
2071
  }).finally(() => {
1958
- C.value = !1;
2072
+ w.value = !1;
1959
2073
  });
1960
2074
  };
1961
- return s || w(), [C, b, w];
2075
+ return r || b(), [w, v, b];
1962
2076
  }
1963
- function to(t) {
1964
- const e = R(t), n = R(""), l = R("");
1965
- return Ae(e, (s) => {
1966
- const o = s || ["", ""];
1967
- n.value = o[0], l.value = o[1];
1968
- }), [e, n, l];
2077
+ function ao(t) {
2078
+ const e = R(t), n = R(""), a = R("");
2079
+ return Pe(e, (r) => {
2080
+ const o = r || ["", ""];
2081
+ n.value = o[0], a.value = o[1];
2082
+ }), [e, n, a];
1969
2083
  }
1970
- function no(t) {
2084
+ function ro(t) {
1971
2085
  return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
1972
2086
  }
1973
- function Te(t, e) {
2087
+ function De(t, e) {
1974
2088
  if (!e)
1975
2089
  return t;
1976
2090
  if (t instanceof Array)
1977
- return t.map((l) => {
1978
- let s = {};
1979
- return e.forEach((o) => s[o] = l[o]), s;
2091
+ return t.map((a) => {
2092
+ let r = {};
2093
+ return e.forEach((o) => r[o] = a[o]), r;
1980
2094
  });
1981
2095
  let n = {};
1982
- return e.forEach((l) => n[l] = t[l]), n;
2096
+ return e.forEach((a) => n[a] = t[a]), n;
1983
2097
  }
1984
- function oo(t, e = []) {
1985
- const { locale: n } = me(), l = R(t());
1986
- return Ae(
2098
+ function so(t, e = []) {
2099
+ const { locale: n } = me(), a = R(t());
2100
+ return Pe(
1987
2101
  [n, ...e],
1988
2102
  () => {
1989
- l.value = t();
2103
+ a.value = t();
1990
2104
  },
1991
2105
  { immediate: !0 }
1992
- ), l;
2106
+ ), a;
1993
2107
  }
1994
- function lo(t, e = "zh_cn", n = "en_us") {
2108
+ function io(t, e = "zh_cn", n = "en_us") {
1995
2109
  if (!t)
1996
2110
  return "-";
1997
- const l = { en_us: n, zh_cn: e }, o = Pe().global.locale.value;
1998
- return t[l[o]] || t[e] || "-";
2111
+ const a = { en_us: n, zh_cn: e }, o = Ye().global.locale.value;
2112
+ return t[a[o]] || t[e] || "-";
1999
2113
  }
2000
- function ao(t, e) {
2001
- let n = Ut;
2002
- return typeof t == "string" && t.length > 0 && (n = je(t).mapState), pt(e, n);
2114
+ function co(t, e) {
2115
+ let n = Pt;
2116
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapState), bt(e, n);
2003
2117
  }
2004
- function so(t, e) {
2005
- let n = jt;
2006
- return typeof t == "string" && t.length > 0 && (n = je(t).mapGetters), pt(e, n);
2118
+ function uo(t, e) {
2119
+ let n = Rt;
2120
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapGetters), bt(e, n);
2007
2121
  }
2008
- function ro(t, e) {
2009
- let n = Pt;
2010
- return typeof t == "string" && t.length > 0 && (n = je(t).mapActions), xn(e, n);
2122
+ function fo(t, e) {
2123
+ let n = Bt;
2124
+ return typeof t == "string" && t.length > 0 && (n = Be(t).mapActions), $n(e, n);
2011
2125
  }
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);
2017
- }), s;
2126
+ function bt(t, e) {
2127
+ const n = ut(), a = e(t), r = {};
2128
+ return Object.keys(a).forEach((o) => {
2129
+ const l = a[o].bind({ $store: n });
2130
+ r[o] = re(l);
2131
+ }), r;
2018
2132
  }
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 });
2023
- }), s;
2133
+ function $n(t, e) {
2134
+ const n = ut(), a = e(t), r = {};
2135
+ return Object.keys(a).forEach((o) => {
2136
+ r[o] = a[o].bind({ $store: n });
2137
+ }), r;
2024
2138
  }
2025
- function Fe(t) {
2026
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Ot(t);
2139
+ function ze(t) {
2140
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qt(t);
2027
2141
  }
2028
- function io() {
2029
- we.renderer.add("Enum", {
2142
+ function ho() {
2143
+ xe.renderer.add("Enum", {
2030
2144
  // 默认显示模板
2031
2145
  renderTableDefault(t, e) {
2032
2146
  let n;
2033
2147
  if ([null, void 0].includes(e.row[e.column.field]))
2034
2148
  return "-";
2035
- const l = e.row[e.column.field];
2149
+ const a = e.row[e.column.field];
2036
2150
  if (t.type == "tag") {
2037
- let s;
2038
- return V(F("el-text"), {
2039
- type: t.enum.getTag(l)
2040
- }, Fe(s = t.enum.getName(l)) ? s : {
2041
- default: () => [s]
2151
+ let r;
2152
+ return q(z("el-text"), {
2153
+ type: t.enum.getTag(a)
2154
+ }, ze(r = t.enum.getName(a)) ? r : {
2155
+ default: () => [r]
2042
2156
  });
2043
2157
  }
2044
- return V(F("el-text"), null, Fe(n = t.enum.getName(l)) ? n : {
2158
+ return q(z("el-text"), null, ze(n = t.enum.getName(a)) ? n : {
2045
2159
  default: () => [n]
2046
2160
  });
2047
2161
  }
2048
- }), we.renderer.add("InputNumber", {
2162
+ }), xe.renderer.add("InputNumber", {
2049
2163
  // 默认显示模板
2050
2164
  renderTableDefault(t, e) {
2051
- return V(St, he({
2165
+ return q(It, he({
2052
2166
  modelValue: e.row[e.column.field],
2053
2167
  "onUpdate:modelValue": (n) => e.row[e.column.field] = n
2054
2168
  }, t.props, {
@@ -2056,42 +2170,42 @@ function io() {
2056
2170
  "value-on-clear": 0
2057
2171
  }), null);
2058
2172
  }
2059
- }), we.renderer.add("TrueFalse", {
2173
+ }), xe.renderer.add("TrueFalse", {
2060
2174
  // 默认显示模板
2061
2175
  renderTableDefault(t, e) {
2062
2176
  const {
2063
2177
  locale: n
2064
2178
  } = me();
2065
- let l = n.value == "zh_cn";
2066
- return V($t, {
2179
+ let a = n.value == "zh_cn";
2180
+ return q(Lt, {
2067
2181
  type: e.row[e.column.field] ? "success" : "danger"
2068
2182
  }, {
2069
- default: () => [e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"]
2183
+ default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
2070
2184
  });
2071
2185
  }
2072
- }), we.renderer.add("I18n", {
2186
+ }), xe.renderer.add("I18n", {
2073
2187
  // 默认显示模板
2074
2188
  renderTableDefault(t, e) {
2075
2189
  const {
2076
2190
  locale: n
2077
2191
  } = me();
2078
- let l = n.value == "zh_cn" ? e.column.field : t.fieldEn;
2079
- return e.row[l] || e.row[e.column.field];
2192
+ let a = n.value == "zh_cn" ? e.column.field : t.fieldEn;
2193
+ return e.row[a] || e.row[e.column.field];
2080
2194
  }
2081
- }), we.renderer.add("Link", {
2195
+ }), xe.renderer.add("Link", {
2082
2196
  // 默认显示模板
2083
2197
  renderTableDefault(t, e) {
2084
- var r;
2198
+ var s;
2085
2199
  let n = e.column.field;
2086
- const l = At(), {
2087
- multiple: s,
2200
+ const a = Ut(), {
2201
+ multiple: r,
2088
2202
  to: o
2089
2203
  } = t;
2090
- if (!s)
2091
- return V(Ge, {
2204
+ if (!r)
2205
+ return q(Je, {
2092
2206
  underline: "never",
2093
2207
  type: "primary",
2094
- onclick: () => l.push({
2208
+ onclick: () => a.push({
2095
2209
  path: o,
2096
2210
  query: {
2097
2211
  [n]: e.row[n]
@@ -2100,64 +2214,64 @@ function io() {
2100
2214
  }, {
2101
2215
  default: () => [e.row[n]]
2102
2216
  });
2103
- const a = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
2104
- return a.map((c, b) => V("span", null, [V(Ge, {
2217
+ const l = ((s = e.row[n]) == null ? void 0 : s.split(",")) || [];
2218
+ return l.map((i, v) => q("span", null, [q(Je, {
2105
2219
  underline: "never",
2106
2220
  type: "primary",
2107
- onclick: () => l.push({
2221
+ onclick: () => a.push({
2108
2222
  path: o,
2109
2223
  query: {
2110
- [n]: c
2224
+ [n]: i
2111
2225
  }
2112
2226
  })
2113
- }, Fe(c) ? c : {
2114
- default: () => [c]
2115
- }), b < a.length - 1 ? "," : ""]));
2227
+ }, ze(i) ? i : {
2228
+ default: () => [i]
2229
+ }), v < l.length - 1 ? "," : ""]));
2116
2230
  }
2117
2231
  });
2118
2232
  }
2119
2233
  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
2234
+ sn as CmpDictionary,
2235
+ yt as CmpIcon,
2236
+ Zn as ConfrimButton,
2237
+ eo as DownExcelTemp,
2238
+ Gn as ImportButton,
2239
+ Vn as LayOutForm,
2240
+ to as Layer,
2241
+ Qn as ListPage,
2242
+ oo as OnePortalCasSDK,
2243
+ vn as SearchBar,
2244
+ et as StatusMap,
2245
+ Un as _toRaw,
2246
+ ro as _typeOf,
2247
+ Rn as arrToStatusMap,
2248
+ Pn as arrayToTree,
2249
+ Kn as checkFileSize,
2250
+ no as creatValidator,
2251
+ Nn as createImportFields,
2252
+ Hn as createListPageId,
2253
+ Ae as en_us,
2254
+ An as exportExcel,
2255
+ Ye as getI18n,
2256
+ ve as getI18nT,
2257
+ bn as getListPageConfig,
2258
+ io as getLocaleValue,
2259
+ Wn as getValueBykey,
2260
+ qn as importExcel,
2261
+ Wt as messages,
2262
+ ho as registerVxeRenderers,
2263
+ Xn as resetListPageConfig,
2264
+ Jn as setListPageConfig,
2265
+ Zt as setupI18n,
2266
+ jn as sleep,
2267
+ pt as stringToArray,
2268
+ Bn as stripHtmlTags,
2269
+ Yn as unicode2Str,
2270
+ fo as useActions,
2271
+ ao as useDatePicker,
2272
+ uo as useGetters,
2273
+ so as useI18nReState,
2274
+ lo as useRequest,
2275
+ co as useState,
2276
+ qe as zh_cn
2163
2277
  };