joy-admin-components 0.1.44 → 0.1.45

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 dt, ElRow as ft, ElCol as ht, ElInputNumber as mt, ElText as gt, ElLink as je } from "element-plus";
2
- import { defineComponent as Ye, ref as q, onMounted as He, h as ke, mergeModels as qe, useAttrs as pt, useModel as vt, computed as ce, resolveComponent as O, openBlock as L, createBlock as U, mergeProps as me, unref as K, withCtx as R, renderSlot as ae, createVNode as G, createTextVNode as ee, toDisplayString as te, createCommentVNode as se, createElementBlock as le, Fragment as Se, renderList as Ne, withModifiers as Ie, resolveDynamicComponent as Ke, createElementVNode as re, withKeys as bt, normalizeStyle as yt, normalizeClass as Ee, reactive as pe, nextTick as _e, onUpdated as Ct, onUnmounted as xt, watch as Ze } from "vue";
3
- import { saveAs as wt } from "file-saver";
4
- import Ge from "exceljs";
1
+ import { ElForm as ht, ElRow as mt, ElCol as gt, ElInputNumber as pt, ElText as vt, ElLink as Pe } from "element-plus";
2
+ import { defineComponent as Ne, ref as q, onMounted as Ke, h as _e, mergeModels as Be, useAttrs as bt, useModel as yt, computed as se, resolveComponent as O, openBlock as T, createBlock as U, mergeProps as me, unref as Z, withCtx as R, renderSlot as ie, createVNode as W, createTextVNode as te, toDisplayString as ne, createCommentVNode as ce, createElementBlock as re, Fragment as Ie, renderList as Ze, withModifiers as Ee, resolveDynamicComponent as Ge, createElementVNode as ae, withKeys as Ct, normalizeStyle as xt, normalizeClass as Le, reactive as pe, nextTick as $e, onUpdated as wt, onUnmounted as kt, watch as We } from "vue";
3
+ import { saveAs as _t } from "file-saver";
4
+ import Je from "exceljs";
5
5
  import ve from "dayjs";
6
- import { createI18n as kt, useI18n as ue } from "vue-i18n";
7
- import { debounce as We, cloneDeep as Je, isArray as Pe } from "lodash";
8
- import { createNamespacedHelpers as Oe, useStore as Qe, mapState as _t, mapGetters as $t, mapActions as St } from "vuex";
6
+ import { createI18n as $t, useI18n as de } from "vue-i18n";
7
+ import { debounce as Qe, cloneDeep as Xe, isArray as Ye } from "lodash";
8
+ import { useRoute as St, useRouter as It } from "vue-router";
9
+ import { createNamespacedHelpers as De, useStore as et, mapState as Et, mapGetters as Lt, mapActions as Tt } from "vuex";
9
10
  import { VxeUI as he } from "vxe-pc-ui";
10
- import { useRouter as It } from "vue-router";
11
- const gn = Ye({
11
+ const bn = Ne({
12
12
  name: "LayOutForm",
13
- setup(n, { slots: e, attrs: t, emit: l }) {
14
- const o = q(null), r = () => e.default ? e.default().filter((d) => d.type !== Symbol.for("v-cmt")).map((d) => d.type === Symbol.for("v-fgt") ? d.children : d).flat().map(
13
+ setup(n, { slots: e, attrs: t, emit: o }) {
14
+ const r = q(null), l = () => e.default ? e.default().filter((d) => d.type !== Symbol.for("v-cmt")).map((d) => d.type === Symbol.for("v-fgt") ? d.children : d).flat().map(
15
15
  (d) => {
16
- var i;
17
- return ke(
18
- ht,
19
- { span: ((i = d.props) == null ? void 0 : i.span) || 24 },
16
+ var c;
17
+ return _e(
18
+ gt,
19
+ { span: ((c = d.props) == null ? void 0 : c.span) || 24 },
20
20
  {
21
21
  default: () => d
22
22
  }
23
23
  );
24
24
  }
25
25
  ) : null;
26
- He(() => {
27
- l("ref", o.value);
26
+ Ke(() => {
27
+ o("ref", r.value);
28
28
  });
29
29
  function a() {
30
- return ke(
31
- dt,
32
- { ...t, ref: o },
33
- () => ke(ft, { gutter: t.gutter ?? 20 }, { default: () => r() })
30
+ return _e(
31
+ ht,
32
+ { ...t, ref: r },
33
+ () => _e(mt, { gutter: t.gutter ?? 20 }, { default: () => l() })
34
34
  );
35
35
  }
36
36
  return a;
37
37
  }
38
38
  });
39
- var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
40
- function et(n) {
39
+ var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
40
+ function nt(n) {
41
41
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
42
42
  }
43
- var tt = { exports: {} };
43
+ var ot = { exports: {} };
44
44
  (function(n, e) {
45
- (function(t, l) {
46
- n.exports = l();
47
- })(Xe, function() {
48
- var t = "minute", l = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
49
- return function(r, a, d) {
50
- var i = a.prototype;
45
+ (function(t, o) {
46
+ n.exports = o();
47
+ })(tt, function() {
48
+ var t = "minute", o = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
49
+ return function(l, a, d) {
50
+ var c = a.prototype;
51
51
  d.utc = function(u) {
52
52
  var f = { date: u, utc: !0, args: arguments };
53
53
  return new a(f);
54
- }, i.utc = function(u) {
54
+ }, c.utc = function(u) {
55
55
  var f = d(this.toDate(), { locale: this.$L, utc: !0 });
56
56
  return u ? f.add(this.utcOffset(), t) : f;
57
- }, i.local = function() {
57
+ }, c.local = function() {
58
58
  return d(this.toDate(), { locale: this.$L, utc: !1 });
59
59
  };
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);
60
+ var w = c.parse;
61
+ c.parse = function(u) {
62
+ u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), w.call(this, u);
63
63
  };
64
- var g = i.init;
65
- i.init = function() {
64
+ var C = c.init;
65
+ c.init = function() {
66
66
  if (this.$u) {
67
67
  var u = this.$d;
68
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
- g.call(this);
70
+ C.call(this);
71
71
  };
72
- var k = i.utcOffset;
73
- i.utcOffset = function(u, f) {
74
- var $ = this.$utils().u;
75
- if ($(u))
76
- return this.$u ? 0 : $(this.$offset) ? k.call(this) : this.$offset;
77
- if (typeof u == "string" && (u = function(T) {
78
- T === void 0 && (T = "");
79
- var Y = T.match(l);
80
- if (!Y)
72
+ var b = c.utcOffset;
73
+ c.utcOffset = function(u, f) {
74
+ var _ = this.$utils().u;
75
+ if (_(u))
76
+ return this.$u ? 0 : _(this.$offset) ? b.call(this) : this.$offset;
77
+ if (typeof u == "string" && (u = function($) {
78
+ $ === void 0 && ($ = "");
79
+ var B = $.match(o);
80
+ if (!B)
81
81
  return null;
82
- var _ = ("" + Y[0]).match(o) || ["-", 0, 0], y = _[0], p = 60 * +_[1] + +_[2];
83
- return p === 0 ? 0 : y === "+" ? p : -p;
82
+ var S = ("" + B[0]).match(r) || ["-", 0, 0], v = S[0], Y = 60 * +S[1] + +S[2];
83
+ return Y === 0 ? 0 : v === "+" ? Y : -Y;
84
84
  }(u), u === null))
85
85
  return this;
86
86
  var h = Math.abs(u) <= 16 ? 60 * u : u;
87
87
  if (h === 0)
88
88
  return this.utc(f);
89
- var m = this.clone();
89
+ var g = this.clone();
90
90
  if (f)
91
- return m.$offset = h, m.$u = !1, m;
92
- var I = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
93
- return (m = this.local().add(h + I, t)).$offset = h, m.$x.$localOffset = I, m;
91
+ return g.$offset = h, g.$u = !1, g;
92
+ var E = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
93
+ return (g = this.local().add(h + E, t)).$offset = h, g.$x.$localOffset = E, g;
94
94
  };
95
- var x = i.format;
96
- i.format = function(u) {
95
+ var m = c.format;
96
+ c.format = function(u) {
97
97
  var f = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
- return x.call(this, f);
99
- }, i.valueOf = function() {
98
+ return m.call(this, f);
99
+ }, c.valueOf = function() {
100
100
  var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
101
101
  return this.$d.valueOf() - 6e4 * u;
102
- }, i.isUTC = function() {
102
+ }, c.isUTC = function() {
103
103
  return !!this.$u;
104
- }, i.toISOString = function() {
104
+ }, c.toISOString = function() {
105
105
  return this.toDate().toISOString();
106
- }, i.toString = function() {
106
+ }, c.toString = function() {
107
107
  return this.toDate().toUTCString();
108
108
  };
109
- var w = i.toDate;
110
- i.toDate = function(u) {
111
- return u === "s" && this.$offset ? d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : w.call(this);
109
+ var x = c.toDate;
110
+ c.toDate = function(u) {
111
+ return u === "s" && this.$offset ? d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : x.call(this);
112
112
  };
113
- var b = i.diff;
114
- i.diff = function(u, f, $) {
113
+ var p = c.diff;
114
+ c.diff = function(u, f, _) {
115
115
  if (u && this.$u === u.$u)
116
- return b.call(this, u, f, $);
117
- var h = this.local(), m = d(u).local();
118
- return b.call(h, m, f, $);
116
+ return p.call(this, u, f, _);
117
+ var h = this.local(), g = d(u).local();
118
+ return p.call(h, g, f, _);
119
119
  };
120
120
  };
121
121
  });
122
- })(tt);
123
- var Et = tt.exports;
124
- const Lt = /* @__PURE__ */ et(Et);
125
- var nt = { exports: {} };
122
+ })(ot);
123
+ var Ft = ot.exports;
124
+ const Ot = /* @__PURE__ */ nt(Ft);
125
+ var lt = { exports: {} };
126
126
  (function(n, e) {
127
- (function(t, l) {
128
- n.exports = l();
129
- })(Xe, function() {
130
- var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, l = {};
131
- return function(o, r, a) {
132
- var d, i = function(x, w, b) {
133
- b === void 0 && (b = {});
134
- var u = new Date(x), f = function($, h) {
127
+ (function(t, o) {
128
+ n.exports = o();
129
+ })(tt, function() {
130
+ var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
131
+ return function(r, l, a) {
132
+ var d, c = function(m, x, p) {
133
+ p === void 0 && (p = {});
134
+ var u = new Date(m), f = function(_, h) {
135
135
  h === void 0 && (h = {});
136
- var m = h.timeZoneName || "short", I = $ + "|" + m, T = l[I];
137
- return T || (T = 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: m }), l[I] = T), T;
138
- }(w, b);
136
+ var g = h.timeZoneName || "short", E = _ + "|" + g, $ = o[E];
137
+ return $ || ($ = 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: g }), o[E] = $), $;
138
+ }(x, p);
139
139
  return f.formatToParts(u);
140
- }, v = function(x, w) {
141
- for (var b = i(x, w), u = [], f = 0; f < b.length; f += 1) {
142
- var $ = b[f], h = $.type, m = $.value, I = t[h];
143
- I >= 0 && (u[I] = parseInt(m, 10));
140
+ }, w = function(m, x) {
141
+ for (var p = c(m, x), u = [], f = 0; f < p.length; f += 1) {
142
+ var _ = p[f], h = _.type, g = _.value, E = t[h];
143
+ E >= 0 && (u[E] = parseInt(g, 10));
144
144
  }
145
- var T = u[3], Y = T === 24 ? 0 : T, _ = u[0] + "-" + u[1] + "-" + u[2] + " " + Y + ":" + u[4] + ":" + u[5] + ":000", y = +x;
146
- return (a.utc(_).valueOf() - (y -= y % 1e3)) / 6e4;
147
- }, g = r.prototype;
148
- g.tz = function(x, w) {
149
- x === void 0 && (x = d);
150
- var b, u = this.utcOffset(), f = this.toDate(), $ = f.toLocaleString("en-US", { timeZone: x }), h = Math.round((f - new Date($)) / 1e3 / 60), m = 15 * -Math.round(f.getTimezoneOffset() / 15) - h;
151
- if (!Number(m))
152
- b = this.utcOffset(0, w);
153
- else if (b = a($, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(m, !0), w) {
154
- var I = b.utcOffset();
155
- b = b.add(u - I, "minute");
145
+ var $ = u[3], B = $ === 24 ? 0 : $, S = u[0] + "-" + u[1] + "-" + u[2] + " " + B + ":" + u[4] + ":" + u[5] + ":000", v = +m;
146
+ return (a.utc(S).valueOf() - (v -= v % 1e3)) / 6e4;
147
+ }, C = l.prototype;
148
+ C.tz = function(m, x) {
149
+ m === void 0 && (m = d);
150
+ var p, u = this.utcOffset(), f = this.toDate(), _ = f.toLocaleString("en-US", { timeZone: m }), h = Math.round((f - new Date(_)) / 1e3 / 60), g = 15 * -Math.round(f.getTimezoneOffset() / 15) - h;
151
+ if (!Number(g))
152
+ p = this.utcOffset(0, x);
153
+ else if (p = a(_, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(g, !0), x) {
154
+ var E = p.utcOffset();
155
+ p = p.add(u - E, "minute");
156
156
  }
157
- return b.$x.$timezone = x, b;
158
- }, g.offsetName = function(x) {
159
- var w = this.$x.$timezone || a.tz.guess(), b = i(this.valueOf(), w, { timeZoneName: x }).find(function(u) {
157
+ return p.$x.$timezone = m, p;
158
+ }, C.offsetName = function(m) {
159
+ var x = this.$x.$timezone || a.tz.guess(), p = c(this.valueOf(), x, { timeZoneName: m }).find(function(u) {
160
160
  return u.type.toLowerCase() === "timezonename";
161
161
  });
162
- return b && b.value;
162
+ return p && p.value;
163
163
  };
164
- var k = g.startOf;
165
- g.startOf = function(x, w) {
164
+ var b = C.startOf;
165
+ C.startOf = function(m, x) {
166
166
  if (!this.$x || !this.$x.$timezone)
167
- return k.call(this, x, w);
168
- var b = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
- return k.call(b, x, w).tz(this.$x.$timezone, !0);
170
- }, a.tz = function(x, w, b) {
171
- var u = b && w, f = b || w || d, $ = v(+a(), f);
172
- if (typeof x != "string")
173
- return a(x).tz(f);
174
- var h = function(Y, _, y) {
175
- var p = Y - 60 * _ * 1e3, P = v(p, y);
176
- if (_ === P)
177
- return [p, _];
178
- var z = v(p -= 60 * (P - _) * 1e3, y);
179
- return P === z ? [p, P] : [Y - 60 * Math.min(P, z) * 1e3, Math.max(P, z)];
180
- }(a.utc(x, u).valueOf(), $, f), m = h[0], I = h[1], T = a(m).utcOffset(I);
181
- return T.$x.$timezone = f, T;
167
+ return b.call(this, m, x);
168
+ var p = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
+ return b.call(p, m, x).tz(this.$x.$timezone, !0);
170
+ }, a.tz = function(m, x, p) {
171
+ var u = p && x, f = p || x || d, _ = w(+a(), f);
172
+ if (typeof m != "string")
173
+ return a(m).tz(f);
174
+ var h = function(B, S, v) {
175
+ var Y = B - 60 * S * 1e3, H = w(Y, v);
176
+ if (S === H)
177
+ return [Y, S];
178
+ var z = w(Y -= 60 * (H - S) * 1e3, v);
179
+ return H === z ? [Y, H] : [B - 60 * Math.min(H, z) * 1e3, Math.max(H, z)];
180
+ }(a.utc(m, u).valueOf(), _, f), g = h[0], E = h[1], $ = a(g).utcOffset(E);
181
+ return $.$x.$timezone = f, $;
182
182
  }, a.tz.guess = function() {
183
183
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
184
- }, a.tz.setDefault = function(x) {
185
- d = x;
184
+ }, a.tz.setDefault = function(m) {
185
+ d = m;
186
186
  };
187
187
  };
188
188
  });
189
- })(nt);
190
- var Tt = nt.exports;
191
- const Ft = /* @__PURE__ */ et(Tt), Le = {
189
+ })(lt);
190
+ var Dt = lt.exports;
191
+ const zt = /* @__PURE__ */ nt(Dt), Te = {
192
192
  // 组件通用文本
193
193
  "dao-ru": "导入",
194
194
  "quan-xuan": "全选",
@@ -218,7 +218,7 @@ const Ft = /* @__PURE__ */ et(Tt), Le = {
218
218
  tools: {
219
219
  keysLengthError: "keys 长度必须大于2 默认前两位为 label value"
220
220
  }
221
- }, Te = {
221
+ }, Fe = {
222
222
  // Common component text
223
223
  "dao-ru": "Import",
224
224
  "quan-xuan": "Select All",
@@ -248,137 +248,137 @@ const Ft = /* @__PURE__ */ et(Tt), Le = {
248
248
  tools: {
249
249
  keysLengthError: "Keys length must be greater than 2, default first two are label and value"
250
250
  }
251
- }, Ot = {
252
- zh_cn: Le,
253
- en: Te
251
+ }, Mt = {
252
+ zh_cn: Te,
253
+ en: Fe
254
254
  };
255
- let ie = null;
256
- function Dt(n = null) {
255
+ let ue = null;
256
+ function Rt(n = null) {
257
257
  if (n) {
258
258
  const { global: e } = n;
259
- return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", Le) : e.setLocaleMessage("zh_cn", Le), e.messages.value.en ? e.mergeLocaleMessage("en", Te) : e.setLocaleMessage("en", Te), ie = n, n;
259
+ return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", Te) : e.setLocaleMessage("zh_cn", Te), e.messages.value.en ? e.mergeLocaleMessage("en", Fe) : e.setLocaleMessage("en", Fe), ue = n, n;
260
260
  }
261
- return ie || (ie = kt({
261
+ return ue || (ue = $t({
262
262
  legacy: !1,
263
263
  locale: "zh_cn",
264
264
  fallbackLocale: "zh_cn",
265
- messages: Ot
266
- })), ie;
265
+ messages: Mt
266
+ })), ue;
267
267
  }
268
- function ot() {
269
- return ie || Dt();
268
+ function rt() {
269
+ return ue || Rt();
270
270
  }
271
- function De() {
272
- return ot().global.t;
271
+ function ze() {
272
+ return rt().global.t;
273
273
  }
274
- ve.extend(Lt);
275
- ve.extend(Ft);
276
- async function pn(n, e) {
277
- const { fields: t, range: l = 1 } = e;
274
+ ve.extend(Ot);
275
+ ve.extend(zt);
276
+ async function yn(n, e) {
277
+ const { fields: t, range: o = 1 } = e;
278
278
  if (!t) {
279
- const a = De();
279
+ const a = ze();
280
280
  throw new Error(a("excel.fieldsMappingRequired"));
281
281
  }
282
- let o = new Ge.Workbook();
283
- await o.xlsx.load(n);
284
- const r = {};
285
- return o.eachSheet(function(a, d) {
286
- const i = [];
287
- a.eachRow(function(v, g) {
288
- if (g > l) {
289
- let k = {}, x = !0;
290
- Object.keys(t).forEach((w) => {
291
- const b = v.getCell(t[w]).value;
292
- k[w] = b, b && (x = !1);
293
- }), x || i.push(k);
282
+ let r = new Je.Workbook();
283
+ await r.xlsx.load(n);
284
+ const l = {};
285
+ return r.eachSheet(function(a, d) {
286
+ const c = [];
287
+ a.eachRow(function(w, C) {
288
+ if (C > o) {
289
+ let b = {}, m = !0;
290
+ Object.keys(t).forEach((x) => {
291
+ const p = w.getCell(t[x]).value;
292
+ b[x] = p, p && (m = !1);
293
+ }), m || c.push(b);
294
294
  }
295
- }), r[a._name] = i;
296
- }), o = null, r;
295
+ }), l[a._name] = c;
296
+ }), r = null, l;
297
297
  }
298
- const zt = {
298
+ const At = {
299
299
  columnWidth: 30
300
300
  };
301
- async function Mt(n, e, t = [], l = {}) {
301
+ async function Vt(n, e, t = [], o = {}) {
302
302
  if (!n || !e)
303
303
  return;
304
- const { columnStyle: o } = l, { columnWidth: r } = zt;
305
- e.forEach((i) => {
306
- i.width = i.width ? i.width : r;
304
+ const { columnStyle: r } = o, { columnWidth: l } = At;
305
+ e.forEach((c) => {
306
+ c.width = c.width ? c.width : l;
307
307
  });
308
- const { workbook: a, worksheet: d } = Rt();
309
- d.columns = e, d.addRows(t), o && await At(a, d, o);
308
+ const { workbook: a, worksheet: d } = Ut();
309
+ d.columns = e, d.addRows(t), r && await jt(a, d, r);
310
310
  try {
311
- const i = await a.xlsx.writeBuffer(), v = new File([i], n, {
311
+ const c = await a.xlsx.writeBuffer(), w = new File([c], n, {
312
312
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
313
313
  });
314
- wt(v);
315
- } catch (i) {
316
- console.log(i);
314
+ _t(w);
315
+ } catch (c) {
316
+ console.log(c);
317
317
  }
318
318
  }
319
- function Rt() {
320
- const n = new Ge.Workbook();
319
+ function Ut() {
320
+ const n = new Je.Workbook();
321
321
  n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date();
322
322
  const e = n.addWorksheet("Sheet1");
323
323
  return { workbook: n, worksheet: e };
324
324
  }
325
- async function At(n, e, t) {
326
- const l = Object.keys(t);
327
- for (const o of l) {
328
- const r = t[o], { type: a } = r;
325
+ async function jt(n, e, t) {
326
+ const o = Object.keys(t);
327
+ for (const r of o) {
328
+ const l = t[r], { type: a } = l;
329
329
  switch (a) {
330
330
  case "IMG":
331
- await Vt(n, e, o);
331
+ await qt(n, e, r);
332
332
  break;
333
333
  }
334
334
  }
335
335
  }
336
- async function Vt(n, e, t, l) {
337
- const o = e.getColumn(t), r = o.values;
336
+ async function qt(n, e, t, o) {
337
+ const r = e.getColumn(t), l = r.values;
338
338
  e.getColumn(t).width = 20, e.eachRow((a, d) => {
339
339
  d > 1 && (a.height = 40);
340
340
  });
341
- for (let a = 0, d = r.length; a < d; a++) {
341
+ for (let a = 0, d = l.length; a < d; a++) {
342
342
  if (a < 2)
343
343
  continue;
344
- let i = r[a];
345
- i && (e.getCell(o.letter + a).value = "", await Ut(n, e, i, {
344
+ let c = l[a];
345
+ c && (e.getCell(r.letter + a).value = "", await Pt(n, e, c, {
346
346
  width: 100,
347
347
  height: 50,
348
- col: o._number - 1,
348
+ col: r._number - 1,
349
349
  row: a - 1
350
350
  }));
351
351
  }
352
352
  }
353
- async function Ut(n, e, t, l) {
354
- const { col: o, row: r, width: a, height: d } = l, { success: i, base64: v } = await jt(t, 0.3);
355
- if (i) {
356
- const g = n.addImage({
357
- base64: v,
353
+ async function Pt(n, e, t, o) {
354
+ const { col: r, row: l, width: a, height: d } = o, { success: c, base64: w } = await Bt(t, 0.3);
355
+ if (c) {
356
+ const C = n.addImage({
357
+ base64: w,
358
358
  extension: "jpeg"
359
359
  });
360
- e.addImage(g, {
361
- tl: { col: o, row: r },
360
+ e.addImage(C, {
361
+ tl: { col: r, row: l },
362
362
  ext: { width: a, height: d }
363
363
  });
364
364
  }
365
365
  }
366
- function jt(n, e = 1) {
366
+ function Bt(n, e = 1) {
367
367
  const t = new Image();
368
- return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((l, o) => {
368
+ return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((o, r) => {
369
369
  t.onload = () => {
370
- const r = document.createElement("canvas");
371
- r.width = t.width, r.height = t.height, r.getContext("2d").drawImage(t, 0, 0, r.width, r.height), l({
370
+ const l = document.createElement("canvas");
371
+ l.width = t.width, l.height = t.height, l.getContext("2d").drawImage(t, 0, 0, l.width, l.height), o({
372
372
  success: !0,
373
373
  //canvas.toDataURL的方法将图片的绝对路径转换为base64编码
374
- base64: r.toDataURL("image/jpeg", e)
374
+ base64: l.toDataURL("image/jpeg", e)
375
375
  });
376
376
  }, t.onerror = () => {
377
- l({ success: !1 });
377
+ o({ success: !1 });
378
378
  };
379
379
  });
380
380
  }
381
- function qt(n) {
381
+ function Yt(n) {
382
382
  if (n < 26)
383
383
  return String.fromCharCode(65 + n);
384
384
  {
@@ -386,52 +386,52 @@ function qt(n) {
386
386
  return e + t;
387
387
  }
388
388
  }
389
- function vn(n) {
389
+ function Cn(n) {
390
390
  return new Promise((e) => {
391
391
  setTimeout(() => {
392
392
  e();
393
393
  }, n);
394
394
  });
395
395
  }
396
- function bn(n) {
396
+ function xn(n) {
397
397
  return JSON.parse(JSON.stringify(n));
398
398
  }
399
- function yn(n) {
400
- let e = [], t = {}, l = (o, r) => Object.prototype.hasOwnProperty.call(o, r);
401
- for (const o of n) {
402
- t[o.id] = {
403
- ...o,
399
+ function wn(n) {
400
+ let e = [], t = {}, o = (r, l) => Object.prototype.hasOwnProperty.call(r, l);
401
+ for (const r of n) {
402
+ t[r.id] = {
403
+ ...r,
404
404
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
405
- children: l(t, o.id) ? t[o.id].children : []
405
+ children: o(t, r.id) ? t[r.id].children : []
406
406
  };
407
- const r = t[o.id];
408
- o.pid == -1 ? e.push(r) : (l(t, o.pid) || (t[o.pid] = {
407
+ const l = t[r.id];
408
+ r.pid == -1 ? e.push(l) : (o(t, r.pid) || (t[r.pid] = {
409
409
  children: []
410
- }), t[o.pid].children.push(r));
410
+ }), t[r.pid].children.push(l));
411
411
  }
412
412
  return e;
413
413
  }
414
- function lt(n, e = " ") {
414
+ function at(n, e = " ") {
415
415
  return n ? n.split(e).filter((t) => t.trim()) : [];
416
416
  }
417
- class Be {
417
+ class He {
418
418
  constructor(e, t = ["label", "value", "labelEn"]) {
419
419
  this.list = e, this.map = new Map(
420
- e.map((l) => {
421
- let o = {
422
- ...l,
423
- label: l[t[0]],
424
- value: l[t[1]]
420
+ e.map((o) => {
421
+ let r = {
422
+ ...o,
423
+ label: o[t[0]],
424
+ value: o[t[1]]
425
425
  };
426
- return t[2] && (o.labelEn = l[t[2]]), [l[t[1]], o];
426
+ return t[2] && (r.labelEn = o[t[2]]), [o[t[1]], r];
427
427
  })
428
428
  );
429
429
  }
430
430
  getName(e, t) {
431
431
  if (!this.has(e))
432
432
  return "-";
433
- const { label: l, labelEn: o } = this.map.get(e);
434
- return (t == "zh_cn" ? l : o) || l || "-";
433
+ const { label: o, labelEn: r } = this.map.get(e);
434
+ return (t == "zh_cn" ? o : r) || o || "-";
435
435
  }
436
436
  getTag(e) {
437
437
  if (!this.has(e))
@@ -452,52 +452,52 @@ class Be {
452
452
  return this.map.has(e);
453
453
  }
454
454
  }
455
- function Cn(n, e = [], t = "i18nName") {
455
+ function kn(n, e = [], t = "i18nName") {
456
456
  if (n.length == 0)
457
- return new Be([]);
457
+ return new He([]);
458
458
  if (e.length < 2) {
459
- const o = De();
460
- throw new Error(o("tools.keysLengthError"));
459
+ const r = ze();
460
+ throw new Error(r("tools.keysLengthError"));
461
461
  }
462
- let l = n.map((o) => {
463
- let r = {};
464
- return t && (r.labelEn = o[t]), e.forEach((a, d) => {
465
- d === 0 ? r.label = o[a] : d === 1 ? r.value = o[a] : r[a] = o[a];
466
- }), r;
462
+ let o = n.map((r) => {
463
+ let l = {};
464
+ return t && (l.labelEn = r[t]), e.forEach((a, d) => {
465
+ d === 0 ? l.label = r[a] : d === 1 ? l.value = r[a] : l[a] = r[a];
466
+ }), l;
467
467
  });
468
- return new Be(l);
468
+ return new He(o);
469
469
  }
470
- function xn(n) {
470
+ function _n(n) {
471
471
  return n ? n.replace(/<[^>]+>/g, "") : "";
472
472
  }
473
- function wn(n) {
473
+ function $n(n) {
474
474
  return n ? (n.includes("\\\\u") && (n = n.replace(/\\/g, "")), n.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
475
475
  }
476
- function kn(n, e = 10) {
476
+ function Sn(n, e = 10) {
477
477
  let t = 1048576 * e;
478
478
  return !(n.size > t);
479
479
  }
480
- function _n(n) {
481
- return Array.from(10).fill(0).map((t, l) => n + "_" + l);
480
+ function In(n) {
481
+ return Array.from(10).fill(0).map((t, o) => n + "_" + o);
482
482
  }
483
- function $n(n) {
483
+ function En(n) {
484
484
  let e = {};
485
- return n.map((t, l) => {
486
- let { key: o, option: r, type: a } = t, d = qt(l);
487
- r ? e[o] = `${d}---option` : a === "image" ? e[o] = `${d}---image` : e[o] = d;
485
+ return n.map((t, o) => {
486
+ let { key: r, option: l, type: a } = t, d = Yt(o);
487
+ l ? e[r] = `${d}---option` : a === "image" ? e[r] = `${d}---image` : e[r] = d;
488
488
  }), e;
489
489
  }
490
- function Sn(n, e) {
491
- return e.split(".").reduce((t, l) => t && t[l], n);
490
+ function Ln(n, e) {
491
+ return e.split(".").reduce((t, o) => t && t[o], n);
492
492
  }
493
493
  const ge = (n, e) => {
494
494
  const t = n.__vccOpts || n;
495
- for (const [l, o] of e)
496
- t[l] = o;
495
+ for (const [o, r] of e)
496
+ t[o] = r;
497
497
  return t;
498
- }, Pt = {
498
+ }, Ht = {
499
499
  __name: "index",
500
- props: /* @__PURE__ */ qe({
500
+ props: /* @__PURE__ */ Be({
501
501
  api: {
502
502
  type: Function
503
503
  },
@@ -533,95 +533,95 @@ const ge = (n, e) => {
533
533
  modelValue: {},
534
534
  modelModifiers: {}
535
535
  }),
536
- emits: /* @__PURE__ */ qe(["success", "change"], ["update:modelValue"]),
536
+ emits: /* @__PURE__ */ Be(["success", "change"], ["update:modelValue"]),
537
537
  setup(n, { emit: e }) {
538
- const t = n, l = pt(), { t: o, locale: r } = ue(), a = vt(n, "modelValue"), d = q(""), i = ce(() => {
539
- if (l.remote !== void 0)
538
+ const t = n, o = bt(), { t: r, locale: l } = de(), a = yt(n, "modelValue"), d = q(""), c = se(() => {
539
+ if (o.remote !== void 0)
540
540
  return t.data;
541
- const h = lt(d.value), { data: m, labelValue: I } = t, T = m || k.value;
541
+ const h = at(d.value), { data: g, labelValue: E } = t, $ = g || b.value;
542
542
  if (h.length == 0)
543
- return T;
544
- const { label: Y, labelEn: _ } = I;
545
- let y = r.value == "en_us" ? _ || "i18nName" : Y;
546
- return h.length == 1 ? T.filter(
547
- (P) => P[y].toLowerCase().includes(h[0].toLowerCase())
548
- ) : T.filter((P) => {
543
+ return $;
544
+ const { label: B, labelEn: S } = E;
545
+ let v = l.value == "en_us" ? S || "i18nName" : B;
546
+ return h.length == 1 ? $.filter(
547
+ (H) => H[v].toLowerCase().includes(h[0].toLowerCase())
548
+ ) : $.filter((H) => {
549
549
  let z = !1;
550
- return z = h.some((de) => P[y].toLowerCase() == de.toLowerCase()), z;
550
+ return z = h.some((k) => H[v].toLowerCase() == k.toLowerCase()), z;
551
551
  });
552
- }), v = ce({
552
+ }), w = se({
553
553
  get() {
554
- return l.multiple == null || a.value == null ? !1 : a.value.length == i.value.length;
554
+ return o.multiple == null || a.value == null ? !1 : a.value.length == c.value.length;
555
555
  },
556
556
  set(h) {
557
557
  return h;
558
558
  }
559
- }), g = e, k = q([]), x = async () => {
559
+ }), C = e, b = q([]), m = async () => {
560
560
  const { data: h } = await t.api();
561
- k.value = [...h], g("success", k);
561
+ b.value = [...h], C("success", b);
562
562
  };
563
- t.api && x();
564
- const w = t.labelValue.label.split("-"), b = (h) => {
565
- if (w.length == 1) {
563
+ t.api && m();
564
+ const x = t.labelValue.label.split("-"), p = (h) => {
565
+ if (x.length == 1) {
566
566
  if (t.changeLocal)
567
- return o(h[t.labelValue.label]);
568
- let m = r.value == "en_us" ? h[t.labelValue.labelEn || "i18nName"] : h[t.labelValue.label];
569
- return m = m || h[t.labelValue.label], m;
567
+ return r(h[t.labelValue.label]);
568
+ let g = l.value == "en_us" ? h[t.labelValue.labelEn || "i18nName"] : h[t.labelValue.label];
569
+ return g = g || h[t.labelValue.label], g;
570
570
  } else {
571
- let m = [];
572
- return w.forEach((I) => {
573
- m.push(h[I]);
574
- }), m.join("-");
571
+ let g = [];
572
+ return x.forEach((E) => {
573
+ g.push(h[E]);
574
+ }), g.join("-");
575
575
  }
576
576
  };
577
577
  function u(h) {
578
- a.value = h ? i.value.map((m) => m[t.labelValue.value]) : [], g("change", a.value);
578
+ a.value = h ? c.value.map((g) => g[t.labelValue.value]) : [], C("change", a.value);
579
579
  }
580
580
  function f(h) {
581
- t.optionClick(h), g("change", l["value-key"] ? h : h[t.labelValue.value]);
581
+ t.optionClick(h), C("change", o["value-key"] ? h : h[t.labelValue.value]);
582
582
  }
583
- function $(h) {
583
+ function _(h) {
584
584
  return a.value.length >= t.maxLimit && !a.value.includes(h[t.labelValue.value]);
585
585
  }
586
- return (h, m) => {
587
- const I = O("el-checkbox"), T = O("el-option"), Y = O("el-select");
588
- return L(), U(Y, me({
586
+ return (h, g) => {
587
+ const E = O("el-checkbox"), $ = O("el-option"), B = O("el-select");
588
+ return T(), U(B, me({
589
589
  modelValue: a.value,
590
- "onUpdate:modelValue": m[1] || (m[1] = (_) => a.value = _),
590
+ "onUpdate:modelValue": g[1] || (g[1] = (S) => a.value = S),
591
591
  filterable: "",
592
592
  "collapse-tags": "",
593
593
  "collapse-tags-tooltip": "",
594
- "filter-method": K(l).remote != null ? void 0 : (_) => d.value = _,
594
+ "filter-method": Z(o).remote != null ? void 0 : (S) => d.value = S,
595
595
  clearable: ""
596
- }, K(l), { onClear: n.optionClick }), {
596
+ }, Z(o), { onClear: n.optionClick }), {
597
597
  default: R(() => [
598
- K(l).multiple != null && n.showCheckAll && n.maxLimit == null ? ae(h.$slots, "header", { key: 0 }, () => [
599
- G(I, {
598
+ Z(o).multiple != null && n.showCheckAll && n.maxLimit == null ? ie(h.$slots, "header", { key: 0 }, () => [
599
+ W(E, {
600
600
  class: "mgl20",
601
- modelValue: v.value,
602
- "onUpdate:modelValue": m[0] || (m[0] = (_) => v.value = _),
601
+ modelValue: w.value,
602
+ "onUpdate:modelValue": g[0] || (g[0] = (S) => w.value = S),
603
603
  onChange: u
604
604
  }, {
605
605
  default: R(() => [
606
- ee(te(h.$t("quan-xuan")), 1)
606
+ te(ne(h.$t("quan-xuan")), 1)
607
607
  ]),
608
608
  _: 1
609
609
  }, 8, ["modelValue"])
610
- ], !0) : se("", !0),
611
- (L(!0), le(Se, null, Ne(i.value, (_, y) => (L(), U(T, {
612
- key: y,
613
- label: b(_),
614
- disabled: K(l).multiple != null && n.maxLimit > 0 ? $(_) : !1,
615
- onClick: Ie((p) => f(_), ["stop"]),
616
- value: K(l)["value-key"] ? _ : _[n.labelValue.value]
610
+ ], !0) : ce("", !0),
611
+ (T(!0), re(Ie, null, Ze(c.value, (S, v) => (T(), U($, {
612
+ key: v,
613
+ label: p(S),
614
+ disabled: Z(o).multiple != null && n.maxLimit > 0 ? _(S) : !1,
615
+ onClick: Ee((Y) => f(S), ["stop"]),
616
+ value: Z(o)["value-key"] ? S : S[n.labelValue.value]
617
617
  }, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
618
618
  ]),
619
619
  _: 3
620
620
  }, 16, ["modelValue", "filter-method", "onClear"]);
621
621
  };
622
622
  }
623
- }, Bt = /* @__PURE__ */ ge(Pt, [["__scopeId", "data-v-34eb8641"]]);
624
- const Yt = Ye({
623
+ }, Nt = /* @__PURE__ */ ge(Ht, [["__scopeId", "data-v-34eb8641"]]);
624
+ const Kt = Ne({
625
625
  props: {
626
626
  name: {
627
627
  tyepe: String,
@@ -629,38 +629,38 @@ const Yt = Ye({
629
629
  }
630
630
  }
631
631
  });
632
- function Ht(n, e, t, l, o, r) {
632
+ function Zt(n, e, t, o, r, l) {
633
633
  const a = O("el-icon");
634
- return L(), U(a, { class: "cmp-icon" }, {
634
+ return T(), U(a, { class: "cmp-icon" }, {
635
635
  default: R(() => [
636
- (L(), U(Ke(n.name)))
636
+ (T(), U(Ge(n.name)))
637
637
  ]),
638
638
  _: 1
639
639
  });
640
640
  }
641
- const rt = /* @__PURE__ */ ge(Yt, [["render", Ht], ["__scopeId", "data-v-733f9daa"]]), In = {
641
+ const st = /* @__PURE__ */ ge(Kt, [["render", Zt], ["__scopeId", "data-v-733f9daa"]]), Tn = {
642
642
  __name: "index",
643
643
  emits: ["ok", "no"],
644
644
  setup(n, { emit: e }) {
645
- const t = e, l = We(() => {
645
+ const t = e, o = Qe(() => {
646
646
  t("ok");
647
647
  }, 500);
648
- function o() {
648
+ function r() {
649
649
  t("no");
650
650
  }
651
- return (r, a) => {
652
- const d = O("el-link"), i = O("el-popconfirm");
653
- return L(), U(i, me(r.$attrs, {
654
- onConfirm: K(l),
655
- onCancel: o
651
+ return (l, a) => {
652
+ const d = O("el-link"), c = O("el-popconfirm");
653
+ return T(), U(c, me(l.$attrs, {
654
+ onConfirm: Z(o),
655
+ onCancel: r
656
656
  }), {
657
657
  reference: R(() => [
658
- G(d, {
658
+ W(d, {
659
659
  underline: "never",
660
- type: r.$attrs.type
660
+ type: l.$attrs.type
661
661
  }, {
662
662
  default: R(() => [
663
- ae(r.$slots, "default")
663
+ ie(l.$slots, "default")
664
664
  ]),
665
665
  _: 3
666
666
  }, 8, ["type"])
@@ -670,7 +670,7 @@ const rt = /* @__PURE__ */ ge(Yt, [["render", Ht], ["__scopeId", "data-v-733f9da
670
670
  };
671
671
  }
672
672
  };
673
- const Nt = ["accept"], Kt = {
673
+ const Gt = ["accept"], Wt = {
674
674
  __name: "index",
675
675
  props: {
676
676
  accept: {
@@ -684,55 +684,55 @@ const Nt = ["accept"], Kt = {
684
684
  },
685
685
  emits: ["fileChange"],
686
686
  setup(n, { emit: e }) {
687
- const t = e, l = q(null);
688
- function o(r) {
689
- let a = r.target.files[0];
690
- t("fileChange", a), l.value.value = null;
687
+ const t = e, o = q(null);
688
+ function r(l) {
689
+ let a = l.target.files[0];
690
+ t("fileChange", a), o.value.value = null;
691
691
  }
692
- return (r, a) => {
692
+ return (l, a) => {
693
693
  const d = O("el-button");
694
- return L(), le("span", null, [
695
- G(d, {
694
+ return T(), re("span", null, [
695
+ W(d, {
696
696
  loading: n.loading,
697
697
  class: "mgr10",
698
- onClick: a[0] || (a[0] = (i) => l.value.click())
698
+ onClick: a[0] || (a[0] = (c) => o.value.click())
699
699
  }, {
700
700
  default: R(() => [
701
- ee(te(r.$t("dao-ru")), 1)
701
+ te(ne(l.$t("dao-ru")), 1)
702
702
  ]),
703
703
  _: 1
704
704
  }, 8, ["loading"]),
705
- re("input", {
706
- onChange: o,
705
+ ae("input", {
706
+ onChange: r,
707
707
  ref_key: "input",
708
- ref: l,
708
+ ref: o,
709
709
  accept: n.accept,
710
710
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
711
711
  type: "file"
712
- }, null, 40, Nt)
712
+ }, null, 40, Gt)
713
713
  ]);
714
714
  };
715
715
  }
716
- }, En = /* @__PURE__ */ ge(Kt, [["__scopeId", "data-v-5f1449ad"]]);
717
- function Fe(n) {
716
+ }, Fn = /* @__PURE__ */ ge(Wt, [["__scopeId", "data-v-5f1449ad"]]);
717
+ function Oe(n) {
718
718
  let e = {};
719
719
  return n.forEach((t) => {
720
- const { key: l, type: o, option: r = {}, value: a, dateType: d } = t;
721
- if (l)
722
- if (o == "input" && (r != null && r.multiple))
723
- e[l] = lt(a);
724
- else if (o == "date")
720
+ const { key: o, type: r, option: l = {}, value: a, dateType: d } = t;
721
+ if (o)
722
+ if (r == "input" && (l != null && l.multiple))
723
+ e[o] = at(a);
724
+ else if (r == "date")
725
725
  if (d.includes("range")) {
726
- const [i, v] = l;
727
- let [g, k] = a || [];
728
- g && d == "daterange" && (g = ve(g).format("YYYY-MM-DD 00:00:00"), k = ve(k).format("YYYY-MM-DD 23:59:59")), e[i] = g, e[v] = k;
726
+ const [c, w] = o;
727
+ let [C, b] = a || [];
728
+ C && d == "daterange" && (C = ve(C).format("YYYY-MM-DD 00:00:00"), b = ve(b).format("YYYY-MM-DD 23:59:59")), e[c] = C, e[w] = b;
729
729
  } else
730
- e[l] = a;
730
+ e[o] = a;
731
731
  else
732
- e[l] = a;
732
+ e[o] = a;
733
733
  }), e;
734
734
  }
735
- const Zt = { key: 0 }, Gt = { class: "btns" }, Wt = { class: "left" }, Jt = { class: "right" }, Qt = {
735
+ const Jt = { key: 0 }, Qt = { class: "btns" }, Xt = { class: "left" }, en = { class: "right" }, tn = {
736
736
  __name: "index",
737
737
  props: {
738
738
  form: {
@@ -742,84 +742,84 @@ const Zt = { key: 0 }, Gt = { class: "btns" }, Wt = { class: "left" }, Jt = { cl
742
742
  },
743
743
  emits: ["confirm", "reset", "visibleChange"],
744
744
  setup(n, { expose: e, emit: t }) {
745
- const l = n, o = t, r = q(!0), a = q(null), { t: d } = ue(), i = ce(() => r.value ? d("guan-bi") : d("zhan-kai"));
746
- function v() {
747
- o("confirm");
745
+ const o = n, r = t, l = q(!0), a = q(null), { t: d } = de(), c = se(() => l.value ? d("guan-bi") : d("zhan-kai"));
746
+ function w() {
747
+ r("confirm");
748
748
  }
749
- function g(f) {
750
- f.option.onClear && f.option.onClear(), o("confirm");
749
+ function C(f) {
750
+ f.option.onClear && f.option.onClear(), r("confirm");
751
751
  }
752
- function k() {
753
- o("reset");
752
+ function b() {
753
+ r("reset");
754
754
  }
755
- function x() {
756
- o("confirm");
755
+ function m() {
756
+ r("confirm");
757
757
  }
758
- function w() {
759
- return Fe(l.form.items);
758
+ function x() {
759
+ return Oe(o.form.items);
760
760
  }
761
- const b = Je(l.form.items);
761
+ const p = Xe(o.form.items);
762
762
  function u() {
763
- l.form.items.forEach((f) => {
764
- const $ = b.find((h) => h.key == f.key);
765
- $ && (f.value = $.value);
763
+ o.form.items.forEach((f) => {
764
+ const _ = p.find((h) => h.key == f.key);
765
+ _ && (f.value = _.value);
766
766
  });
767
767
  }
768
- return e({ getPrm: w, reset: u }), (f, $) => {
769
- const h = O("el-input"), m = O("el-date-picker"), I = O("el-form-item"), T = O("el-form"), Y = O("el-link"), _ = O("el-button");
770
- return L(), le("div", {
768
+ return e({ getPrm: x, reset: u }), (f, _) => {
769
+ const h = O("el-input"), g = O("el-date-picker"), E = O("el-form-item"), $ = O("el-form"), B = O("el-link"), S = O("el-button");
770
+ return T(), re("div", {
771
771
  class: "searchBar-container mgt10 mgb10",
772
- onKeydown: bt(v, ["enter"])
772
+ onKeydown: Ct(w, ["enter"])
773
773
  }, [
774
- re("div", {
774
+ ae("div", {
775
775
  class: "searchBar",
776
- style: yt({ height: r.value ? "auto" : "42px" })
776
+ style: xt({ height: l.value ? "auto" : "42px" })
777
777
  }, [
778
- G(T, {
778
+ W($, {
779
779
  inline: "",
780
780
  model: n.form.data
781
781
  }, {
782
782
  default: R(() => [
783
- (L(!0), le(Se, null, Ne(n.form.items.filter((y) => !y.hidden), (y) => (L(), le(Se, {
784
- key: y.key
783
+ (T(!0), re(Ie, null, Ze(n.form.items.filter((v) => !v.hidden), (v) => (T(), re(Ie, {
784
+ key: v.key
785
785
  }, [
786
- y.type == "br" ? (L(), le("br", Zt)) : (L(), U(I, {
786
+ v.type == "br" ? (T(), re("br", Jt)) : (T(), U(E, {
787
787
  key: 1,
788
- label: y.name
788
+ label: v.name
789
789
  }, {
790
790
  default: R(() => {
791
- var p, P;
791
+ var Y, H;
792
792
  return [
793
- y.type === "input" ? (L(), U(h, {
793
+ v.type === "input" ? (T(), U(h, {
794
794
  key: 0,
795
- modelValue: y.value,
796
- "onUpdate:modelValue": (z) => y.value = z,
797
- class: Ee(((p = y.option) == null ? void 0 : p.class) || "w150"),
795
+ modelValue: v.value,
796
+ "onUpdate:modelValue": (z) => v.value = z,
797
+ class: Le(((Y = v.option) == null ? void 0 : Y.class) || "w150"),
798
798
  placeholder: f.$t("qing-shu-ru"),
799
799
  clearable: ""
800
- }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : y.type === "custom" ? (L(), U(Ke(y.render), { key: 1 })) : se("", !0),
801
- y.type === "select" ? (L(), U(Bt, me({
800
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : v.type === "custom" ? (T(), U(Ge(v.render), { key: 1 })) : ce("", !0),
801
+ v.type === "select" ? (T(), U(Nt, me({
802
802
  key: 2,
803
- class: ((P = y.option) == null ? void 0 : P.class) || "w150",
804
- modelValue: y.value,
805
- "onUpdate:modelValue": (z) => y.value = z
806
- }, { ref_for: !0 }, y.option, {
807
- onChange: v,
808
- onClear: (z) => g(y)
809
- }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : se("", !0),
810
- y.type === "date" ? (L(), U(m, {
803
+ class: ((H = v.option) == null ? void 0 : H.class) || "w150",
804
+ modelValue: v.value,
805
+ "onUpdate:modelValue": (z) => v.value = z
806
+ }, { ref_for: !0 }, v.option, {
807
+ onChange: w,
808
+ onClear: (z) => C(v)
809
+ }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
810
+ v.type === "date" ? (T(), U(g, {
811
811
  key: 3,
812
- class: Ee({ datetimerange: "w300", daterange: "w200" }[y.dateType] || "w100"),
813
- modelValue: y.value,
814
- "onUpdate:modelValue": (z) => y.value = z,
815
- "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[y.dateType] || "YYYY-MM-DD",
816
- type: y.dateType || "date",
817
- onFocus: (z) => a.value = y,
818
- onChange: (z) => x(),
812
+ class: Le({ datetimerange: "w300", daterange: "w200" }[v.dateType] || "w100"),
813
+ modelValue: v.value,
814
+ "onUpdate:modelValue": (z) => v.value = z,
815
+ "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[v.dateType] || "YYYY-MM-DD",
816
+ type: v.dateType || "date",
817
+ onFocus: (z) => a.value = v,
818
+ onChange: (z) => m(),
819
819
  placeholder: f.$t("qing-xuan-ze"),
820
820
  "start-placeholder": f.$t("kai-shi-shi-jian"),
821
821
  "end-placeholder": f.$t("jie-shu-shi-jian")
822
- }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : se("", !0)
822
+ }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : ce("", !0)
823
823
  ];
824
824
  }),
825
825
  _: 2
@@ -829,58 +829,58 @@ const Zt = { key: 0 }, Gt = { class: "btns" }, Wt = { class: "left" }, Jt = { cl
829
829
  _: 1
830
830
  }, 8, ["model"])
831
831
  ], 4),
832
- re("div", Gt, [
833
- re("div", Wt, [
834
- ae(f.$slots, "table-header-left", {}, void 0, !0)
832
+ ae("div", Qt, [
833
+ ae("div", Xt, [
834
+ ie(f.$slots, "table-header-left", {}, void 0, !0)
835
835
  ]),
836
- re("div", Jt, [
837
- G(Y, {
836
+ ae("div", en, [
837
+ W(B, {
838
838
  underline: "never",
839
839
  class: "mgr10",
840
- onClick: $[0] || ($[0] = () => {
841
- o("visibleChange", !r.value), r.value = !r.value;
840
+ onClick: _[0] || (_[0] = () => {
841
+ r("visibleChange", !l.value), l.value = !l.value;
842
842
  })
843
843
  }, {
844
844
  default: R(() => [
845
- G(rt, {
846
- name: r.value ? "ArrowUp" : "ArrowDown"
845
+ W(st, {
846
+ name: l.value ? "ArrowUp" : "ArrowDown"
847
847
  }, null, 8, ["name"]),
848
- ee(" " + te(i.value), 1)
848
+ te(" " + ne(c.value), 1)
849
849
  ]),
850
850
  _: 1
851
851
  }),
852
- G(_, {
852
+ W(S, {
853
853
  type: "primary",
854
- onClick: v
854
+ onClick: w
855
855
  }, {
856
856
  default: R(() => [
857
- ee(te(f.$t("shai-xuan")), 1)
857
+ te(ne(f.$t("shai-xuan")), 1)
858
858
  ]),
859
859
  _: 1
860
860
  }),
861
- G(_, {
861
+ W(S, {
862
862
  type: "primary",
863
- onClick: k
863
+ onClick: b
864
864
  }, {
865
865
  default: R(() => [
866
- ee(te(f.$t("chong-zhi")), 1)
866
+ te(ne(f.$t("chong-zhi")), 1)
867
867
  ]),
868
868
  _: 1
869
869
  }),
870
- ae(f.$slots, "btn", {}, void 0, !0)
870
+ ie(f.$slots, "btn", {}, void 0, !0)
871
871
  ])
872
872
  ])
873
873
  ], 32);
874
874
  };
875
875
  }
876
- }, Xt = /* @__PURE__ */ ge(Qt, [["__scopeId", "data-v-32ac9990"]]);
877
- const en = { class: "center" }, tn = {
876
+ }, nn = /* @__PURE__ */ ge(tn, [["__scopeId", "data-v-32ac9990"]]);
877
+ const on = { class: "center" }, ln = {
878
878
  __name: "index",
879
879
  props: {
880
- // 表格id 本地存储列设置时使用
880
+ // 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
881
881
  id: {
882
882
  type: String,
883
- required: !0
883
+ required: !1
884
884
  },
885
885
  loading: {
886
886
  type: Boolean,
@@ -916,91 +916,111 @@ const en = { class: "center" }, tn = {
916
916
  }
917
917
  },
918
918
  setup(n, { expose: e }) {
919
- const { t, locale: l } = ue(), o = n, r = q(!1), a = q([]);
920
- o.searchForm.selections = [], console.log("单元格复制功能默认启用,若不需要请在searchForm中设置enableCellCopy为false123", o.searchForm.enableCellCopy), o.searchForm.enableCellCopy == null && (o.searchForm.enableCellCopy = !0);
921
- const d = Je(o.searchForm.items), i = o.searchForm.pageNoKey || "pageNo", v = pe({
922
- [i]: 1,
919
+ const { t, locale: o } = de(), r = St(), l = n, a = q(!1), d = q([]);
920
+ l.searchForm.selections = [];
921
+ const c = se(() => {
922
+ const i = r.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
923
+ return l.id ? `listPageId-${i}-${l.id}` : `listPageId-${i}`;
924
+ });
925
+ l.searchForm.enableCellCopy == null && (l.searchForm.enableCellCopy = !0);
926
+ const w = Xe(l.searchForm.items), C = l.searchForm.pageNoKey || "pageNo", b = pe({
927
+ [C]: 1,
923
928
  pageSize: 10,
924
929
  total: 0
925
- }), g = q(null), k = q(null), x = q(450), w = We(() => {
926
- _e(() => {
927
- if (!k.value)
930
+ }), m = q(null), x = q(null), p = q(450), u = Qe(() => {
931
+ $e(() => {
932
+ if (!x.value)
928
933
  return;
929
- const s = k.value.getBoundingClientRect(), C = window.innerHeight, E = s.top, A = 100, Z = C - E - A, V = 200;
930
- x.value = Math.max(Z, V);
934
+ const s = x.value.getBoundingClientRect(), y = window.innerHeight, L = s.top, A = 100, G = y - L - A, V = 200;
935
+ p.value = Math.max(G, V);
931
936
  });
932
- }, 100), b = () => {
933
- w();
934
- }, u = () => {
935
- if (!o.searchForm.enableCellCopy)
937
+ }, 100), f = () => {
938
+ u();
939
+ }, _ = () => {
940
+ if (!l.searchForm.enableCellCopy)
936
941
  return !1;
937
- const c = g.value;
938
- if (!c || !c.$el)
942
+ const i = m.value;
943
+ if (!i || !i.$el)
939
944
  return !1;
940
- const s = c.$el;
941
- return s.classList.add("cell-copy-enabled"), s.setAttribute("tabindex", "-1"), s.removeEventListener("mousedown", z), s.removeEventListener("mousemove", de), s.removeEventListener("mouseup", be), s.removeEventListener("keydown", Ce), s.addEventListener("mousedown", z), s.addEventListener("mousemove", de), s.addEventListener("mouseup", be), s.addEventListener("keydown", Ce), !0;
945
+ const s = i.$el;
946
+ return s.classList.add("cell-copy-enabled"), s.setAttribute("tabindex", "-1"), s.removeEventListener("mousedown", be), s.removeEventListener("mousemove", ye), s.removeEventListener("mouseup", Ce), s.removeEventListener("keydown", we), s.addEventListener("mousedown", be), s.addEventListener("mousemove", ye), s.addEventListener("mouseup", Ce), s.addEventListener("keydown", we), !0;
942
947
  };
943
- He(() => {
944
- w(), window.addEventListener("resize", b), o.searchForm.enableCellCopy && (document.addEventListener("mouseup", Re), document.addEventListener("mousedown", Ae), setTimeout(() => {
945
- u();
948
+ Ke(() => {
949
+ u(), window.addEventListener("resize", f), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ve), document.addEventListener("mousedown", Ue), setTimeout(() => {
950
+ _();
946
951
  }, 500));
947
- }), Ct(() => {
948
- o.searchForm.enableCellCopy && setTimeout(() => {
949
- u();
952
+ }), wt(() => {
953
+ l.searchForm.enableCellCopy && setTimeout(() => {
954
+ _();
950
955
  }, 500);
951
- }), xt(() => {
952
- if (window.removeEventListener("resize", b), o.searchForm.enableCellCopy) {
953
- document.removeEventListener("mouseup", Re), document.removeEventListener("mousedown", Ae);
954
- const c = g.value;
955
- if (c && c.$el) {
956
- const s = c.$el;
957
- s.removeEventListener("mousedown", z), s.removeEventListener("mousemove", de), s.removeEventListener("mouseup", be), s.removeEventListener("keydown", Ce);
956
+ }), kt(() => {
957
+ if (window.removeEventListener("resize", f), l.searchForm.enableCellCopy) {
958
+ document.removeEventListener("mouseup", Ve), document.removeEventListener("mousedown", Ue);
959
+ const i = m.value;
960
+ if (i && i.$el) {
961
+ const s = i.$el;
962
+ s.removeEventListener("mousedown", be), s.removeEventListener("mousemove", ye), s.removeEventListener("mouseup", Ce), s.removeEventListener("keydown", we);
958
963
  }
959
964
  }
960
965
  });
961
- const f = ce(() => xe.value.height || x.value);
962
- let $;
963
- async function h(c) {
964
- const { dataFormat: s } = o.tableConfig;
965
- c.pageNo != 1 && (c.nextSearchAfter = $), r.value = !0;
966
- const { code: C, data: E = {} } = await o.api(c).finally(() => {
967
- r.value = !1, o.searchForm.selections = [];
966
+ const h = se(() => z.value.height || p.value);
967
+ let g;
968
+ async function E(i) {
969
+ const { dataFormat: s } = l.tableConfig;
970
+ i.pageNo != 1 && (i.nextSearchAfter = g), a.value = !0;
971
+ const { code: y, data: L = {} } = await l.api(i).finally(() => {
972
+ a.value = !1, l.searchForm.selections = [];
968
973
  });
969
- if (C == 200) {
970
- let A = E.rows || E.records || [];
971
- a.value = s ? s(A) : A, v.total = E.totalRows || E.total || 0, $ = E.nextSearchAfter, o.searchForm.enableCellCopy && _e(() => {
974
+ if (y == 200) {
975
+ let A = L.rows || L.records || [];
976
+ d.value = s ? s(A) : A, b.total = L.totalRows || L.total || 0, g = L.nextSearchAfter, l.searchForm.enableCellCopy && $e(() => {
972
977
  setTimeout(() => {
973
- u();
978
+ _();
974
979
  }, 100);
975
980
  });
976
981
  }
977
982
  }
978
- function m(c = {}) {
979
- const { searchData: s = () => ({}) } = o.tableConfig, C = s();
980
- h({ ...v, ...Fe(o.searchForm.items), ...c, ...C });
983
+ function $(i = {}) {
984
+ const { searchData: s = () => ({}) } = l.tableConfig, y = s();
985
+ E({ ...b, ...Oe(l.searchForm.items), ...i, ...y });
981
986
  }
982
- function I() {
983
- const { reset: c } = o.tableConfig;
984
- c && c(), o.searchForm.items.forEach((s) => {
985
- const C = d.find((E) => Pe(s.key) && Pe(E.key) ? s.key.join(",") == E.key.join(",") : E.key == s.key);
986
- C && (s.value = C.value);
987
- }), m();
987
+ function B() {
988
+ const { reset: i } = l.tableConfig;
989
+ i && i(), l.searchForm.items.forEach((s) => {
990
+ const y = w.find((L) => Ye(s.key) && Ye(L.key) ? s.key.join(",") == L.key.join(",") : L.key == s.key);
991
+ y && (s.value = y.value);
992
+ }), $();
988
993
  }
989
- o.api && o.immediate && m();
990
- function T() {
991
- return { ...v, ...Fe(o.searchForm.items) };
994
+ l.api && l.immediate && $();
995
+ function S() {
996
+ return { ...b, ...Oe(l.searchForm.items) };
992
997
  }
993
- const Y = () => {
994
- const c = g.value;
995
- c && c.clearSort();
996
- }, _ = pe({
998
+ const v = () => {
999
+ const i = m.value;
1000
+ i && i.clearSort();
1001
+ }, Y = pe({
997
1002
  storage: !0
998
- }), y = pe({
999
- width: "auto",
1003
+ }), H = pe({
1000
1004
  drag: !0,
1001
1005
  resizable: !0,
1002
1006
  maxFixedSize: 0
1003
- }), p = pe({
1007
+ }), z = se(() => {
1008
+ const { customConfig: i, columnConfig: s, ...y } = l.tableConfig;
1009
+ return {
1010
+ headerAlign: "left",
1011
+ align: "center",
1012
+ customConfig: { ...Y, ...i },
1013
+ columnConfig: { ...H, ...s },
1014
+ // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1015
+ "virtual-x-config": {
1016
+ enabled: !1,
1017
+ scrollToLeftOnChange: !1
1018
+ },
1019
+ // 纵向虚拟滚动 大于100条开启
1020
+ "virtual-y-config": { enabled: !0, gt: 100 },
1021
+ ...y
1022
+ };
1023
+ }), k = pe({
1004
1024
  isSelecting: !1,
1005
1025
  // 是否正在选择
1006
1026
  startCell: null,
@@ -1009,71 +1029,71 @@ const en = { class: "center" }, tn = {
1009
1029
  // 结束单元格
1010
1030
  selectedCells: []
1011
1031
  // 选中的单元格列表 [{ rowIndex, colIndex }]
1012
- }), P = (c) => {
1013
- const s = c.closest(".vxe-body--column");
1032
+ }), Me = (i) => {
1033
+ const s = i.closest(".vxe-body--column");
1014
1034
  if (!s || s.classList.contains("col--checkbox") || s.classList.contains("col--seq"))
1015
1035
  return null;
1016
- const C = s.closest(".vxe-body--row");
1017
- if (!C)
1036
+ const y = s.closest(".vxe-body--row");
1037
+ if (!y)
1018
1038
  return null;
1019
- const E = g.value;
1020
- if (!E)
1039
+ const L = m.value;
1040
+ if (!L)
1021
1041
  return null;
1022
1042
  let A = -1;
1023
- const Z = C.getAttribute("data-rowid");
1024
- if (Z != null)
1025
- A = parseInt(Z, 10);
1043
+ const G = y.getAttribute("data-rowid");
1044
+ if (G != null)
1045
+ A = parseInt(G, 10);
1026
1046
  else {
1027
- const F = C.parentElement;
1028
- A = Array.from(F.querySelectorAll(".vxe-body--row")).indexOf(C);
1047
+ const F = y.parentElement;
1048
+ A = Array.from(F.querySelectorAll(".vxe-body--row")).indexOf(y);
1029
1049
  }
1030
1050
  if (A < 0)
1031
1051
  return null;
1032
1052
  let V = -1;
1033
- const X = s.getAttribute("data-colid");
1034
- if (X && (V = E.getColumns().findIndex((S) => S.id === X)), V < 0) {
1035
- const S = Array.from(C.querySelectorAll(".vxe-body--column")).indexOf(s), j = !!s.closest(".vxe-table--fixed-left-wrapper"), H = !!s.closest(".vxe-table--fixed-right-wrapper"), M = E.getColumns();
1053
+ const ee = s.getAttribute("data-colid");
1054
+ if (ee && (V = L.getColumns().findIndex((I) => I.id === ee)), V < 0) {
1055
+ const I = Array.from(y.querySelectorAll(".vxe-body--column")).indexOf(s), j = !!s.closest(".vxe-table--fixed-left-wrapper"), N = !!s.closest(".vxe-table--fixed-right-wrapper"), M = L.getColumns();
1036
1056
  if (j) {
1037
- const N = M.filter((B) => B.fixed === "left");
1038
- S < N.length && (V = M.indexOf(N[S]));
1039
- } else if (H) {
1040
- const N = M.filter((B) => B.fixed === "right");
1041
- S < N.length && (V = M.indexOf(N[S]));
1057
+ const K = M.filter((P) => P.fixed === "left");
1058
+ I < K.length && (V = M.indexOf(K[I]));
1059
+ } else if (N) {
1060
+ const K = M.filter((P) => P.fixed === "right");
1061
+ I < K.length && (V = M.indexOf(K[I]));
1042
1062
  } else {
1043
- const N = o.searchForm.showCheckBox ? 1 : 0;
1044
- V = M.filter((W) => W.fixed === "left").length + S - N;
1063
+ const K = l.searchForm.showCheckBox ? 1 : 0;
1064
+ V = M.filter((J) => J.fixed === "left").length + I - K;
1045
1065
  }
1046
1066
  }
1047
1067
  return V < 0 ? null : { rowIndex: A, colIndex: V, cell: s };
1048
- }, z = (c) => {
1049
- const s = P(c.target);
1068
+ }, be = (i) => {
1069
+ const s = Me(i.target);
1050
1070
  if (!s) {
1051
- ye();
1071
+ xe();
1052
1072
  return;
1053
1073
  }
1054
- p.isSelecting = !0, p.startCell = {
1074
+ k.isSelecting = !0, k.startCell = {
1055
1075
  rowIndex: s.rowIndex,
1056
1076
  colIndex: s.colIndex
1057
- }, p.endCell = { ...p.startCell }, ze(), Me();
1058
- }, de = (c) => {
1059
- if (!p.isSelecting)
1077
+ }, k.endCell = { ...k.startCell }, Re(), Ae();
1078
+ }, ye = (i) => {
1079
+ if (!k.isSelecting)
1060
1080
  return;
1061
- const s = P(c.target);
1062
- s && (p.endCell = {
1081
+ const s = Me(i.target);
1082
+ s && (k.endCell = {
1063
1083
  rowIndex: s.rowIndex,
1064
1084
  colIndex: s.colIndex
1065
- }, ze(), Me());
1066
- }, be = () => {
1067
- p.isSelecting = !1;
1068
- }, ye = () => {
1069
- p.selectedCells = [], p.startCell = null, p.endCell = null;
1070
- const c = g.value;
1071
- if (!c)
1085
+ }, Re(), Ae());
1086
+ }, Ce = () => {
1087
+ k.isSelecting = !1;
1088
+ }, xe = () => {
1089
+ k.selectedCells = [], k.startCell = null, k.endCell = null;
1090
+ const i = m.value;
1091
+ if (!i)
1072
1092
  return;
1073
- c.$el.querySelectorAll(
1093
+ i.$el.querySelectorAll(
1074
1094
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1075
- ).forEach((C) => {
1076
- C.classList.remove(
1095
+ ).forEach((y) => {
1096
+ y.classList.remove(
1077
1097
  "cell-selected",
1078
1098
  "cell-border-top",
1079
1099
  "cell-border-right",
@@ -1081,25 +1101,25 @@ const en = { class: "center" }, tn = {
1081
1101
  "cell-border-left"
1082
1102
  );
1083
1103
  });
1084
- }, ze = () => {
1085
- if (!p.startCell || !p.endCell) {
1086
- p.selectedCells = [];
1104
+ }, Re = () => {
1105
+ if (!k.startCell || !k.endCell) {
1106
+ k.selectedCells = [];
1087
1107
  return;
1088
1108
  }
1089
- const c = p.startCell.rowIndex, s = p.endCell.rowIndex, C = p.startCell.colIndex, E = p.endCell.colIndex, A = Math.min(c, s), Z = Math.max(c, s), V = Math.min(C, E), X = Math.max(C, E);
1090
- p.selectedCells = [];
1091
- for (let F = A; F <= Z; F++)
1092
- for (let S = V; S <= X; S++)
1093
- p.selectedCells.push({
1109
+ const i = k.startCell.rowIndex, s = k.endCell.rowIndex, y = k.startCell.colIndex, L = k.endCell.colIndex, A = Math.min(i, s), G = Math.max(i, s), V = Math.min(y, L), ee = Math.max(y, L);
1110
+ k.selectedCells = [];
1111
+ for (let F = A; F <= G; F++)
1112
+ for (let I = V; I <= ee; I++)
1113
+ k.selectedCells.push({
1094
1114
  rowIndex: F,
1095
- colIndex: S
1115
+ colIndex: I
1096
1116
  });
1097
- }, Me = () => {
1098
- _e(() => {
1099
- const c = g.value;
1100
- if (!c)
1117
+ }, Ae = () => {
1118
+ $e(() => {
1119
+ const i = m.value;
1120
+ if (!i)
1101
1121
  return;
1102
- const s = c.$el;
1122
+ const s = i.$el;
1103
1123
  if (s.querySelectorAll(
1104
1124
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1105
1125
  ).forEach((j) => {
@@ -1110,242 +1130,226 @@ const en = { class: "center" }, tn = {
1110
1130
  "cell-border-bottom",
1111
1131
  "cell-border-left"
1112
1132
  );
1113
- }), p.selectedCells.length === 0)
1133
+ }), k.selectedCells.length === 0)
1114
1134
  return;
1115
- const C = c.getColumns(), E = p.selectedCells.map((j) => j.rowIndex), A = p.selectedCells.map((j) => j.colIndex), Z = Math.min(...E), V = Math.max(...E), X = Math.min(...A), F = Math.max(...A), S = [
1135
+ const y = i.getColumns(), L = k.selectedCells.map((j) => j.rowIndex), A = k.selectedCells.map((j) => j.colIndex), G = Math.min(...L), V = Math.max(...L), ee = Math.min(...A), F = Math.max(...A), I = [
1116
1136
  s.querySelector(".vxe-table--body-wrapper tbody"),
1117
1137
  s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1118
1138
  s.querySelector(".vxe-table--fixed-right-wrapper tbody")
1119
1139
  ].filter(Boolean);
1120
- p.selectedCells.forEach(({ rowIndex: j, colIndex: H }) => {
1121
- const M = C[H];
1140
+ k.selectedCells.forEach(({ rowIndex: j, colIndex: N }) => {
1141
+ const M = y[N];
1122
1142
  if (!M)
1123
1143
  return;
1124
- const N = M.fixed === "left", B = M.fixed === "right";
1125
- for (const W of S) {
1126
- const fe = W.querySelectorAll(".vxe-body--row")[j];
1144
+ const K = M.fixed === "left", P = M.fixed === "right";
1145
+ for (const J of I) {
1146
+ const fe = J.querySelectorAll(".vxe-body--row")[j];
1127
1147
  if (!fe)
1128
1148
  continue;
1129
- const ne = Array.from(fe.querySelectorAll(".vxe-body--column"));
1149
+ const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
1130
1150
  let D = null;
1131
- if (N && W.closest(".vxe-table--fixed-left-wrapper")) {
1132
- const J = C.filter((Q) => Q.fixed === "left").indexOf(M);
1133
- D = ne[J];
1134
- } else if (B && W.closest(".vxe-table--fixed-right-wrapper")) {
1135
- const J = C.filter((Q) => Q.fixed === "right").indexOf(M);
1136
- D = ne[J];
1137
- } else if (!N && !B && W.closest(".vxe-table--body-wrapper")) {
1138
- const oe = o.searchForm.showCheckBox ? 1 : 0, J = C.filter((we) => we.fixed === "left").length, Q = H - J;
1139
- D = ne[Q + oe];
1151
+ if (K && J.closest(".vxe-table--fixed-left-wrapper")) {
1152
+ const Q = y.filter((X) => X.fixed === "left").indexOf(M);
1153
+ D = oe[Q];
1154
+ } else if (P && J.closest(".vxe-table--fixed-right-wrapper")) {
1155
+ const Q = y.filter((X) => X.fixed === "right").indexOf(M);
1156
+ D = oe[Q];
1157
+ } else if (!K && !P && J.closest(".vxe-table--body-wrapper")) {
1158
+ const le = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((ke) => ke.fixed === "left").length, X = N - Q;
1159
+ D = oe[X + le];
1140
1160
  }
1141
1161
  if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
1142
- D.classList.add("cell-selected"), j === Z && D.classList.add("cell-border-top"), j === V && D.classList.add("cell-border-bottom"), H === X && D.classList.add("cell-border-left"), H === F && D.classList.add("cell-border-right");
1162
+ D.classList.add("cell-selected"), j === G && D.classList.add("cell-border-top"), j === V && D.classList.add("cell-border-bottom"), N === ee && D.classList.add("cell-border-left"), N === F && D.classList.add("cell-border-right");
1143
1163
  break;
1144
1164
  }
1145
1165
  }
1146
1166
  });
1147
1167
  });
1148
- }, st = async () => {
1149
- if (p.selectedCells.length === 0)
1168
+ }, ct = async () => {
1169
+ if (k.selectedCells.length === 0)
1150
1170
  return;
1151
- const c = g.value;
1152
- if (!c)
1171
+ const i = m.value;
1172
+ if (!i)
1153
1173
  return;
1154
- const s = c.$el, C = c.getColumns(), E = [...new Set(p.selectedCells.map((F) => F.rowIndex))].sort(
1155
- (F, S) => F - S
1156
- ), A = [...new Set(p.selectedCells.map((F) => F.colIndex))].sort(
1157
- (F, S) => F - S
1158
- ), Z = [
1174
+ const s = i.$el, y = i.getColumns(), L = [...new Set(k.selectedCells.map((F) => F.rowIndex))].sort(
1175
+ (F, I) => F - I
1176
+ ), A = [...new Set(k.selectedCells.map((F) => F.colIndex))].sort(
1177
+ (F, I) => F - I
1178
+ ), G = [
1159
1179
  s.querySelector(".vxe-table--body-wrapper tbody"),
1160
1180
  s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1161
1181
  s.querySelector(".vxe-table--fixed-right-wrapper tbody")
1162
1182
  ].filter(Boolean), V = [];
1163
- E.forEach((F) => {
1164
- const S = [];
1183
+ L.forEach((F) => {
1184
+ const I = [];
1165
1185
  A.forEach((j) => {
1166
- const H = C[j];
1167
- if (!H) {
1168
- S.push("");
1186
+ const N = y[j];
1187
+ if (!N) {
1188
+ I.push("");
1169
1189
  return;
1170
1190
  }
1171
- const M = H.fixed === "left", N = H.fixed === "right";
1172
- let B = "";
1173
- for (const W of Z) {
1174
- const fe = W.querySelectorAll(".vxe-body--row")[F];
1191
+ const M = N.fixed === "left", K = N.fixed === "right";
1192
+ let P = "";
1193
+ for (const J of G) {
1194
+ const fe = J.querySelectorAll(".vxe-body--row")[F];
1175
1195
  if (!fe)
1176
1196
  continue;
1177
- const ne = Array.from(fe.querySelectorAll(".vxe-body--column"));
1197
+ const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
1178
1198
  let D = null;
1179
- if (M && W.closest(".vxe-table--fixed-left-wrapper")) {
1180
- const J = C.filter((Q) => Q.fixed === "left").indexOf(H);
1181
- D = ne[J];
1182
- } else if (N && W.closest(".vxe-table--fixed-right-wrapper")) {
1183
- const J = C.filter((Q) => Q.fixed === "right").indexOf(H);
1184
- D = ne[J];
1185
- } else if (!M && !N && W.closest(".vxe-table--body-wrapper")) {
1186
- const oe = o.searchForm.showCheckBox ? 1 : 0, J = C.filter((we) => we.fixed === "left").length, Q = j - J;
1187
- D = ne[Q + oe];
1199
+ if (M && J.closest(".vxe-table--fixed-left-wrapper")) {
1200
+ const Q = y.filter((X) => X.fixed === "left").indexOf(N);
1201
+ D = oe[Q];
1202
+ } else if (K && J.closest(".vxe-table--fixed-right-wrapper")) {
1203
+ const Q = y.filter((X) => X.fixed === "right").indexOf(N);
1204
+ D = oe[Q];
1205
+ } else if (!M && !K && J.closest(".vxe-table--body-wrapper")) {
1206
+ const le = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((ke) => ke.fixed === "left").length, X = j - Q;
1207
+ D = oe[X + le];
1188
1208
  }
1189
1209
  if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
1190
- B = D.innerText || D.textContent || "", B = B.trim(), B = B.replace(/\n/g, " ").replace(/\s+/g, " ");
1210
+ P = D.innerText || D.textContent || "", P = P.trim(), P = P.replace(/\n/g, " ").replace(/\s+/g, " ");
1191
1211
  break;
1192
1212
  }
1193
1213
  }
1194
- S.push(B);
1195
- }), V.push(S.join(" "));
1214
+ I.push(P);
1215
+ }), V.push(I.join(" "));
1196
1216
  });
1197
- const X = V.join(`
1217
+ const ee = V.join(`
1198
1218
  `);
1199
1219
  try {
1200
- await navigator.clipboard.writeText(X);
1220
+ await navigator.clipboard.writeText(ee);
1201
1221
  } catch (F) {
1202
1222
  console.error("复制失败:", F);
1203
1223
  }
1204
- }, Ce = (c) => {
1205
- o.searchForm.enableCellCopy && ((c.ctrlKey || c.metaKey) && c.key === "c" ? p.selectedCells.length > 0 && (c.preventDefault(), c.stopPropagation(), st()) : c.key === "Escape" && ye());
1206
- }, Re = () => {
1207
- p.isSelecting = !1;
1208
- }, Ae = (c) => {
1209
- const s = g.value;
1224
+ }, we = (i) => {
1225
+ l.searchForm.enableCellCopy && ((i.ctrlKey || i.metaKey) && i.key === "c" ? k.selectedCells.length > 0 && (i.preventDefault(), i.stopPropagation(), ct()) : i.key === "Escape" && xe());
1226
+ }, Ve = () => {
1227
+ k.isSelecting = !1;
1228
+ }, Ue = (i) => {
1229
+ const s = m.value;
1210
1230
  if (!s || !s.$el)
1211
1231
  return;
1212
- s.$el.contains(c.target) || ye();
1213
- }, xe = ce(() => {
1214
- const { customConfig: c, columnConfig: s, ...C } = o.tableConfig;
1215
- return {
1216
- headerAlign: "left",
1217
- align: "center",
1218
- customConfig: { ..._, ...c },
1219
- columnConfig: { ...y, ...s },
1220
- // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1221
- "virtual-x-config": {
1222
- enabled: !1,
1223
- scrollToLeftOnChange: !1
1224
- },
1225
- // 纵向虚拟滚动 大于100条开启
1226
- "virtual-y-config": { enabled: !0, gt: 100 },
1227
- ...C
1228
- };
1229
- }), it = (c) => {
1230
- v.pageNo = c, m();
1231
- }, ct = (c) => {
1232
- v.pageSize = c, v[i] = 1, m();
1232
+ s.$el.contains(i.target) || xe();
1233
+ }, ut = (i) => {
1234
+ b.pageNo = i, $();
1235
+ }, dt = (i) => {
1236
+ b.pageSize = i, b[C] = 1, $();
1233
1237
  };
1234
- function Ve() {
1235
- const c = g.value.getCheckboxRecords();
1236
- o.searchForm.selections = c;
1238
+ function je() {
1239
+ const i = m.value.getCheckboxRecords();
1240
+ l.searchForm.selections = i;
1237
1241
  }
1238
- const Ue = (c) => {
1239
- const s = g.value;
1242
+ const qe = (i) => {
1243
+ const s = m.value;
1240
1244
  if (s) {
1241
- s.toggleCheckboxRow(c);
1242
- const C = g.value.getCheckboxRecords();
1243
- o.searchForm.selections = C;
1245
+ s.toggleCheckboxRow(i);
1246
+ const y = m.value.getCheckboxRecords();
1247
+ l.searchForm.selections = y;
1244
1248
  }
1245
1249
  };
1246
- return e({ tableRef: g, getList: m, getPrm: T, clearSort: Y, calculateTableHeight: w }), (c, s) => {
1250
+ return e({ tableRef: m, getList: $, getPrm: S, clearSort: v, calculateTableHeight: u }), (i, s) => {
1247
1251
  var F;
1248
- const C = O("el-button"), E = O("el-checkbox"), A = O("el-text"), Z = O("vxe-column"), V = O("VxeTable"), X = O("el-pagination");
1249
- return L(), le("div", {
1250
- class: Ee({ box: n.searchForm.showShadow })
1252
+ const y = O("el-button"), L = O("el-checkbox"), A = O("el-text"), G = O("vxe-column"), V = O("VxeTable"), ee = O("el-pagination");
1253
+ return T(), re("div", {
1254
+ class: Le({ box: n.searchForm.showShadow })
1251
1255
  }, [
1252
- n.searchForm.showSearch ? (L(), U(Xt, {
1256
+ n.searchForm.showSearch ? (T(), U(nn, {
1253
1257
  key: 0,
1254
1258
  form: n.searchForm,
1255
- onReset: I,
1256
- onConfirm: s[1] || (s[1] = (S) => m()),
1257
- onVisibleChange: K(w)
1259
+ onReset: B,
1260
+ onConfirm: s[1] || (s[1] = (I) => $()),
1261
+ onVisibleChange: Z(u)
1258
1262
  }, {
1259
1263
  btn: R(() => [
1260
- ae(c.$slots, "search-bar-btn", {}, void 0, !0),
1261
- G(C, {
1264
+ ie(i.$slots, "search-bar-btn", {}, void 0, !0),
1265
+ W(y, {
1262
1266
  round: "",
1263
- onClick: s[0] || (s[0] = (S) => g.value.openCustom())
1267
+ onClick: s[0] || (s[0] = (I) => m.value.openCustom())
1264
1268
  }, {
1265
1269
  default: R(() => [
1266
- G(rt, { name: "Tools" })
1270
+ W(st, { name: "Tools" })
1267
1271
  ]),
1268
1272
  _: 1
1269
1273
  })
1270
1274
  ]),
1271
1275
  _: 3
1272
- }, 8, ["form", "onVisibleChange"])) : se("", !0),
1273
- ae(c.$slots, "table-header-left", {}, void 0, !0),
1274
- re("div", {
1276
+ }, 8, ["form", "onVisibleChange"])) : ce("", !0),
1277
+ ie(i.$slots, "table-header-left", {}, void 0, !0),
1278
+ ae("div", {
1275
1279
  ref_key: "tableContentRef",
1276
- ref: k
1280
+ ref: x
1277
1281
  }, [
1278
- G(V, me({
1279
- id: n.id,
1282
+ W(V, me({
1283
+ id: c.value,
1280
1284
  ref_key: "tableRef",
1281
- ref: g,
1282
- loading: n.loading || r.value,
1283
- data: n.api ? a.value : n.data,
1285
+ ref: m,
1286
+ loading: n.loading || a.value,
1287
+ data: n.api ? d.value : n.data,
1284
1288
  border: ""
1285
- }, xe.value, {
1286
- height: f.value,
1287
- onCheckboxChange: Ve,
1288
- onCheckboxAll: Ve,
1289
- onSortChange: (F = xe.value["sort-config"]) == null ? void 0 : F.sortChange
1289
+ }, z.value, {
1290
+ height: h.value,
1291
+ onCheckboxChange: je,
1292
+ onCheckboxAll: je,
1293
+ onSortChange: (F = z.value["sort-config"]) == null ? void 0 : F.sortChange
1290
1294
  }), {
1291
1295
  default: R(() => [
1292
- n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (L(), U(Z, {
1296
+ n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (T(), U(G, {
1293
1297
  key: 0,
1294
1298
  type: "checkbox",
1295
- width: K(l) == "zh_cn" ? 80 : 150,
1296
- title: c.$t("xu-hao"),
1299
+ width: Z(o) == "zh_cn" ? 80 : 150,
1300
+ title: i.$t("xu-hao"),
1297
1301
  fixed: "left"
1298
1302
  }, {
1299
- checkbox: R(({ rowIndex: S, row: j, checked: H, disabled: M, indeterminate: N }) => [
1300
- re("div", en, [
1301
- H ? (L(), U(E, {
1303
+ checkbox: R(({ rowIndex: I, row: j, checked: N, disabled: M, indeterminate: K }) => [
1304
+ ae("div", on, [
1305
+ N ? (T(), U(L, {
1302
1306
  key: 0,
1303
1307
  checked: !0,
1304
1308
  disabled: M,
1305
1309
  size: "default",
1306
- onClick: Ie((B) => !M && Ue(j), ["stop"])
1307
- }, null, 8, ["disabled", "onClick"])) : (L(), U(E, {
1310
+ onClick: Ee((P) => !M && qe(j), ["stop"])
1311
+ }, null, 8, ["disabled", "onClick"])) : (T(), U(L, {
1308
1312
  key: 1,
1309
1313
  disabled: M,
1310
1314
  checked: !1,
1311
1315
  size: "default",
1312
- onClick: Ie((B) => !M && Ue(j), ["stop"])
1316
+ onClick: Ee((P) => !M && qe(j), ["stop"])
1313
1317
  }, null, 8, ["disabled", "onClick"])),
1314
- G(A, {
1318
+ W(A, {
1315
1319
  type: "info",
1316
1320
  class: "mgl5"
1317
1321
  }, {
1318
1322
  default: R(() => [
1319
- ee(te(S + 1), 1)
1323
+ te(ne(I + 1), 1)
1320
1324
  ]),
1321
1325
  _: 2
1322
1326
  }, 1024)
1323
1327
  ])
1324
1328
  ]),
1325
1329
  _: 1
1326
- }, 8, ["width", "title"])) : se("", !0),
1327
- ae(c.$slots, "default", {}, void 0, !0)
1330
+ }, 8, ["width", "title"])) : ce("", !0),
1331
+ ie(i.$slots, "default", {}, void 0, !0)
1328
1332
  ]),
1329
1333
  _: 3
1330
1334
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1331
1335
  ], 512),
1332
- n.searchForm.showPage ? (L(), U(X, {
1336
+ n.searchForm.showPage ? (T(), U(ee, {
1333
1337
  key: 1,
1334
- "current-page": v[K(i)],
1335
- "onUpdate:currentPage": s[2] || (s[2] = (S) => v[K(i)] = S),
1338
+ "current-page": b[Z(C)],
1339
+ "onUpdate:currentPage": s[2] || (s[2] = (I) => b[Z(C)] = I),
1336
1340
  class: "myPagination mgt10",
1337
1341
  background: "",
1338
1342
  layout: "total, sizes, prev, pager, next",
1339
- total: v.total,
1340
- "page-size": v.pageSize,
1343
+ total: b.total,
1344
+ "page-size": b.pageSize,
1341
1345
  "page-sizes": [10, 50, 100, 500],
1342
- onCurrentChange: it,
1343
- onSizeChange: ct
1344
- }, null, 8, ["current-page", "total", "page-size"])) : se("", !0)
1346
+ onCurrentChange: ut,
1347
+ onSizeChange: dt
1348
+ }, null, 8, ["current-page", "total", "page-size"])) : ce("", !0)
1345
1349
  ], 2);
1346
1350
  };
1347
1351
  }
1348
- }, Ln = /* @__PURE__ */ ge(tn, [["__scopeId", "data-v-8b6ee274"]]), Tn = {
1352
+ }, On = /* @__PURE__ */ ge(ln, [["__scopeId", "data-v-b945dd6e"]]), Dn = {
1349
1353
  __name: "index",
1350
1354
  props: {
1351
1355
  sheetsConfig: {
@@ -1360,41 +1364,41 @@ const en = { class: "center" }, tn = {
1360
1364
  setup(n) {
1361
1365
  const e = n;
1362
1366
  function t() {
1363
- Mt(e.fileName, e.sheetsConfig);
1367
+ Vt(e.fileName, e.sheetsConfig);
1364
1368
  }
1365
- return (l, o) => {
1366
- const r = O("el-link");
1367
- return L(), U(r, me({
1369
+ return (o, r) => {
1370
+ const l = O("el-link");
1371
+ return T(), U(l, me({
1368
1372
  type: "primary",
1369
1373
  underline: "never"
1370
- }, l.$attrs, { onClick: t }), {
1374
+ }, o.$attrs, { onClick: t }), {
1371
1375
  default: R(() => [
1372
- ee(te(l.$t("xia-zai-dao-ru-mo-ban")), 1)
1376
+ te(ne(o.$t("xia-zai-dao-ru-mo-ban")), 1)
1373
1377
  ]),
1374
1378
  _: 1
1375
1379
  }, 16);
1376
1380
  };
1377
1381
  }
1378
1382
  };
1379
- function Fn(n, e = {}) {
1380
- const t = De(), l = {
1383
+ function zn(n, e = {}) {
1384
+ const t = ze(), o = {
1381
1385
  inForm: !0,
1382
1386
  required: !0,
1383
1387
  ...e
1384
- }, o = {
1388
+ }, r = {
1385
1389
  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}$/,
1386
1390
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1387
1391
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1388
- }[n], { inForm: r, value: a, required: d, msg: i = t("validate.invalidInput") } = l;
1389
- return r ? function(v, g, k) {
1392
+ }[n], { inForm: l, value: a, required: d, msg: c = t("validate.invalidInput") } = o;
1393
+ return l ? function(w, C, b) {
1390
1394
  if (d) {
1391
- o.test(g) ? k() : k(new Error(i));
1395
+ r.test(C) ? b() : b(new Error(c));
1392
1396
  return;
1393
1397
  }
1394
- g && !o.test(g) ? k(new Error(i)) : k();
1395
- } : o.test(a);
1398
+ C && !r.test(C) ? b(new Error(c)) : b();
1399
+ } : r.test(a);
1396
1400
  }
1397
- class On {
1401
+ class Mn {
1398
1402
  constructor(e = {}) {
1399
1403
  this.config = {
1400
1404
  clientCode: e.clientCode || "one-portal",
@@ -1490,10 +1494,10 @@ class On {
1490
1494
  });
1491
1495
  if (!t.ok)
1492
1496
  throw new Error(`HTTP ${t.status}: ${t.statusText}`);
1493
- const l = await t.json();
1494
- if (l.success && l.data)
1495
- 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;
1496
- throw new Error(l.message || "ST票据验证失败");
1497
+ const o = await t.json();
1498
+ if (o.success && o.data)
1499
+ return this.token = o.data.token, this.user = o.data.user, this.saveToStorage(), this.clearTicketFromUrl(), this.log("ST票据验证成功,用户登录成功:", this.user), this.config.loginCallback && this.config.loginCallback(this.user, this.token), !0;
1500
+ throw new Error(o.message || "ST票据验证失败");
1497
1501
  } catch (t) {
1498
1502
  return this.log("ST票据验证失败:", t), this.handleError(t), !1;
1499
1503
  }
@@ -1532,19 +1536,19 @@ class On {
1532
1536
  * 发送带认证的HTTP请求
1533
1537
  */
1534
1538
  async request(e, t = {}) {
1535
- const l = {
1539
+ const o = {
1536
1540
  headers: {
1537
1541
  "Content-Type": "application/json",
1538
1542
  ...t.headers
1539
1543
  },
1540
1544
  ...t
1541
1545
  };
1542
- l.headers.appId = this.config.clientCode, this.token && (l.headers.Authorization = `Bearer ${this.token}`);
1546
+ o.headers.appId = this.config.clientCode, this.token && (o.headers.Authorization = `Bearer ${this.token}`);
1543
1547
  try {
1544
- const o = await fetch(e, l);
1545
- return o.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : o;
1546
- } catch (o) {
1547
- throw this.log("请求失败:", o), o;
1548
+ const r = await fetch(e, o);
1549
+ return r.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : r;
1550
+ } catch (r) {
1551
+ throw this.log("请求失败:", r), r;
1548
1552
  }
1549
1553
  }
1550
1554
  /**
@@ -1600,100 +1604,100 @@ class On {
1600
1604
  return this.config[e];
1601
1605
  }
1602
1606
  }
1603
- function Dn(n, e = {}) {
1604
- const l = Object.assign({
1607
+ function Rn(n, e = {}) {
1608
+ const o = Object.assign({
1605
1609
  manual: !1,
1606
1610
  // 手动执行
1607
1611
  log: !1,
1608
1612
  params: null,
1609
1613
  format: null
1610
- }, e), { manual: o, log: r, params: a = {}, cb: d, format: i } = l, v = q([]), g = q(!1), k = (x) => {
1611
- const w = x || a;
1612
- g.value = !0, n(w).then((b) => {
1613
- const { code: u, data: f, msg: $ } = b;
1614
+ }, e), { manual: r, log: l, params: a = {}, cb: d, format: c } = o, w = q([]), C = q(!1), b = (m) => {
1615
+ const x = m || a;
1616
+ C.value = !0, n(x).then((p) => {
1617
+ const { code: u, data: f, msg: _ } = p;
1614
1618
  if (d) {
1615
- const { records: h, rows: m } = f || {}, I = h || m ? h || m : f;
1616
- v.value = $e(I, i), d(b);
1619
+ const { records: h, rows: g } = f || {}, E = h || g ? h || g : f;
1620
+ w.value = Se(E, c), d(p);
1617
1621
  }
1618
1622
  if (f) {
1619
1623
  if (f.records != null || f.rows != null) {
1620
- const { records: h, rows: m, total: I = 0 } = f || {};
1621
- w && w.total != null && (a.total = parseInt(I)), v.value = $e(h || m || [], i);
1624
+ const { records: h, rows: g, total: E = 0 } = f || {};
1625
+ x && x.total != null && (a.total = parseInt(E)), w.value = Se(h || g || [], c);
1622
1626
  } else
1623
- v.value = $e(f, i);
1624
- r && console.log("useRequest-res", v.value);
1627
+ w.value = Se(f, c);
1628
+ l && console.log("useRequest-res", w.value);
1625
1629
  }
1626
- }).catch((b) => {
1627
- d && (console.log("useRequestErr", b), d({ code: 500 }));
1630
+ }).catch((p) => {
1631
+ d && (console.log("useRequestErr", p), d({ code: 500 }));
1628
1632
  }).finally(() => {
1629
- g.value = !1;
1633
+ C.value = !1;
1630
1634
  });
1631
1635
  };
1632
- return o || k(), [g, v, k];
1636
+ return r || b(), [C, w, b];
1633
1637
  }
1634
- function zn(n) {
1635
- const e = q(n), t = q(""), l = q("");
1636
- return Ze(e, (o) => {
1637
- const r = o || ["", ""];
1638
- t.value = r[0], l.value = r[1];
1639
- }), [e, t, l];
1638
+ function An(n) {
1639
+ const e = q(n), t = q(""), o = q("");
1640
+ return We(e, (r) => {
1641
+ const l = r || ["", ""];
1642
+ t.value = l[0], o.value = l[1];
1643
+ }), [e, t, o];
1640
1644
  }
1641
- function Mn(n) {
1645
+ function Vn(n) {
1642
1646
  return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
1643
1647
  }
1644
- function $e(n, e) {
1648
+ function Se(n, e) {
1645
1649
  if (!e)
1646
1650
  return n;
1647
1651
  if (n instanceof Array)
1648
- return n.map((l) => {
1649
- let o = {};
1650
- return e.forEach((r) => o[r] = l[r]), o;
1652
+ return n.map((o) => {
1653
+ let r = {};
1654
+ return e.forEach((l) => r[l] = o[l]), r;
1651
1655
  });
1652
1656
  let t = {};
1653
- return e.forEach((l) => t[l] = n[l]), t;
1657
+ return e.forEach((o) => t[o] = n[o]), t;
1654
1658
  }
1655
- function Rn(n, e = []) {
1656
- const { locale: t } = ue(), l = q(n());
1657
- return Ze(
1659
+ function Un(n, e = []) {
1660
+ const { locale: t } = de(), o = q(n());
1661
+ return We(
1658
1662
  [t, ...e],
1659
1663
  () => {
1660
- l.value = n();
1664
+ o.value = n();
1661
1665
  },
1662
1666
  { immediate: !0 }
1663
- ), l;
1667
+ ), o;
1664
1668
  }
1665
- function An(n, e = "zh_cn", t = "en_us") {
1669
+ function jn(n, e = "zh_cn", t = "en_us") {
1666
1670
  if (!n)
1667
1671
  return "-";
1668
- const l = { en_us: t, zh_cn: e }, r = ot().global.locale.value;
1669
- return n[l[r]] || n[e] || "-";
1672
+ const o = { en_us: t, zh_cn: e }, l = rt().global.locale.value;
1673
+ return n[o[l]] || n[e] || "-";
1670
1674
  }
1671
- function Vn(n, e) {
1672
- let t = _t;
1673
- return typeof n == "string" && n.length > 0 && (t = Oe(n).mapState), at(e, t);
1675
+ function qn(n, e) {
1676
+ let t = Et;
1677
+ return typeof n == "string" && n.length > 0 && (t = De(n).mapState), it(e, t);
1674
1678
  }
1675
- function Un(n, e) {
1676
- let t = $t;
1677
- return typeof n == "string" && n.length > 0 && (t = Oe(n).mapGetters), at(e, t);
1679
+ function Pn(n, e) {
1680
+ let t = Lt;
1681
+ return typeof n == "string" && n.length > 0 && (t = De(n).mapGetters), it(e, t);
1678
1682
  }
1679
- function jn(n, e) {
1680
- let t = St;
1681
- return typeof n == "string" && n.length > 0 && (t = Oe(n).mapActions), nn(e, t);
1683
+ function Bn(n, e) {
1684
+ let t = Tt;
1685
+ return typeof n == "string" && n.length > 0 && (t = De(n).mapActions), rn(e, t);
1682
1686
  }
1683
- function at(n, e) {
1684
- const t = Qe(), l = e(n), o = {};
1685
- return Object.keys(l).forEach((r) => {
1686
- const a = l[r].bind({ $store: t });
1687
- o[r] = ce(a);
1688
- }), o;
1687
+ function it(n, e) {
1688
+ const t = et(), o = e(n), r = {};
1689
+ return Object.keys(o).forEach((l) => {
1690
+ const a = o[l].bind({ $store: t });
1691
+ r[l] = se(a);
1692
+ }), r;
1689
1693
  }
1690
- function nn(n, e) {
1691
- const t = Qe(), l = e(n), o = {};
1692
- return Object.keys(l).forEach((r) => {
1693
- o[r] = l[r].bind({ $store: t });
1694
- }), o;
1694
+ function rn(n, e) {
1695
+ const t = et(), o = e(n), r = {};
1696
+ return Object.keys(o).forEach((l) => {
1697
+ r[l] = o[l].bind({ $store: t });
1698
+ }), r;
1695
1699
  }
1696
- const on = {
1700
+ const an = {
1697
1701
  __name: "EnumRender",
1698
1702
  props: {
1699
1703
  renderOpts: {
@@ -1708,123 +1712,123 @@ const on = {
1708
1712
  },
1709
1713
  setup(n) {
1710
1714
  const e = n, t = e.params.row[e.params.column.field];
1711
- return (l, o) => {
1712
- const r = O("el-text");
1713
- return n.renderOpts.text ? (L(), U(r, { key: 0 }, {
1715
+ return (o, r) => {
1716
+ const l = O("el-text");
1717
+ return n.renderOpts.text ? (T(), U(l, { key: 0 }, {
1714
1718
  default: R(() => [
1715
- ee(te(n.renderOpts.enum.getName(K(t))), 1)
1719
+ te(ne(n.renderOpts.enum.getName(Z(t))), 1)
1716
1720
  ]),
1717
1721
  _: 1
1718
- })) : (L(), U(r, {
1722
+ })) : (T(), U(l, {
1719
1723
  key: 1,
1720
- type: n.renderOpts.enum.getTag(K(t))
1724
+ type: n.renderOpts.enum.getTag(Z(t))
1721
1725
  }, {
1722
1726
  default: R(() => [
1723
- ee(te(n.renderOpts.enum.getName(K(t))), 1)
1727
+ te(ne(n.renderOpts.enum.getName(Z(t))), 1)
1724
1728
  ]),
1725
1729
  _: 1
1726
1730
  }, 8, ["type"]));
1727
1731
  };
1728
1732
  }
1729
1733
  };
1730
- function qn() {
1734
+ function Yn() {
1731
1735
  he.renderer.add("Enum", {
1732
1736
  // 默认显示模板
1733
1737
  renderTableDefault(n, e) {
1734
- return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(on, { renderOpts: n, params: e });
1738
+ return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(an, { renderOpts: n, params: e });
1735
1739
  }
1736
1740
  }), he.renderer.add("InputNumber", {
1737
1741
  // 默认显示模板
1738
1742
  renderTableDefault(n, e) {
1739
- return /* @__PURE__ */ React.createElement(mt, { "v-model": e.row[e.column.field], ...n.props, "step-strictly": !0, "value-on-clear": 0 });
1743
+ return /* @__PURE__ */ React.createElement(pt, { "v-model": e.row[e.column.field], ...n.props, "step-strictly": !0, "value-on-clear": 0 });
1740
1744
  }
1741
1745
  }), he.renderer.add("TrueFalse", {
1742
1746
  // 默认显示模板
1743
1747
  renderTableDefault(n, e) {
1744
- const { locale: t } = ue();
1745
- let l = t.value == "zh_cn";
1748
+ const { locale: t } = de();
1749
+ let o = t.value == "zh_cn";
1746
1750
  return /* @__PURE__ */ React.createElement(
1747
- gt,
1751
+ vt,
1748
1752
  {
1749
1753
  type: e.row[e.column.field] ? "success" : "danger"
1750
1754
  },
1751
- e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"
1755
+ e.row[e.column.field] ? o ? "是" : "YES" : o ? "否" : "NO"
1752
1756
  );
1753
1757
  }
1754
1758
  }), he.renderer.add("I18n", {
1755
1759
  // 默认显示模板
1756
1760
  renderTableDefault(n, e) {
1757
- const { locale: t } = ue();
1758
- let l = t.value == "zh_cn" ? e.column.field : n.fieldEn;
1759
- return e.row[l] || e.row[e.column.field];
1761
+ const { locale: t } = de();
1762
+ let o = t.value == "zh_cn" ? e.column.field : n.fieldEn;
1763
+ return e.row[o] || e.row[e.column.field];
1760
1764
  }
1761
1765
  }), he.renderer.add("Link", {
1762
1766
  // 默认显示模板
1763
1767
  renderTableDefault(n, e) {
1764
1768
  var d;
1765
1769
  let t = e.column.field;
1766
- const l = It(), { multiple: o, to: r } = n;
1767
- if (!o)
1770
+ const o = It(), { multiple: r, to: l } = n;
1771
+ if (!r)
1768
1772
  return /* @__PURE__ */ React.createElement(
1769
- je,
1773
+ Pe,
1770
1774
  {
1771
1775
  underline: "never",
1772
1776
  type: "primary",
1773
- onclick: () => l.push({ path: r, query: { [t]: e.row[t] } })
1777
+ onclick: () => o.push({ path: l, query: { [t]: e.row[t] } })
1774
1778
  },
1775
1779
  e.row[t]
1776
1780
  );
1777
1781
  const a = ((d = e.row[t]) == null ? void 0 : d.split(",")) || [];
1778
- return a.map((i, v) => /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
1779
- je,
1782
+ return a.map((c, w) => /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
1783
+ Pe,
1780
1784
  {
1781
1785
  underline: "never",
1782
1786
  type: "primary",
1783
- onclick: () => l.push({ path: r, query: { [t]: i } })
1787
+ onclick: () => o.push({ path: l, query: { [t]: c } })
1784
1788
  },
1785
- i
1786
- ), v < a.length - 1 ? "," : ""));
1789
+ c
1790
+ ), w < a.length - 1 ? "," : ""));
1787
1791
  }
1788
1792
  });
1789
1793
  }
1790
1794
  export {
1791
- Bt as CmpDictionary,
1792
- rt as CmpIcon,
1793
- In as ConfrimButton,
1794
- Tn as DownExcelTemp,
1795
- En as ImportButton,
1796
- gn as LayOutForm,
1797
- Ln as ListPage,
1798
- On as OnePortalCasSDK,
1799
- Xt as SearchBar,
1800
- Be as StatusMap,
1801
- bn as _toRaw,
1802
- Mn as _typeOf,
1803
- Cn as arrToStatusMap,
1804
- yn as arrayToTree,
1805
- kn as checkFileSize,
1806
- Fn as creatValidator,
1807
- $n as createImportFields,
1808
- _n as createListPageId,
1809
- Te as en,
1810
- Mt as exportExcel,
1811
- ot as getI18n,
1812
- De as getI18nT,
1813
- An as getLocaleValue,
1814
- Sn as getValueBykey,
1815
- pn as importExcel,
1816
- Ot as messages,
1817
- qn as registerVxeRenderers,
1818
- Dt as setupI18n,
1819
- vn as sleep,
1820
- lt as stringToArray,
1821
- xn as stripHtmlTags,
1822
- wn as unicode2Str,
1823
- jn as useActions,
1824
- zn as useDatePicker,
1825
- Un as useGetters,
1826
- Rn as useI18nReState,
1827
- Dn as useRequest,
1828
- Vn as useState,
1829
- Le as zhCn
1795
+ Nt as CmpDictionary,
1796
+ st as CmpIcon,
1797
+ Tn as ConfrimButton,
1798
+ Dn as DownExcelTemp,
1799
+ Fn as ImportButton,
1800
+ bn as LayOutForm,
1801
+ On as ListPage,
1802
+ Mn as OnePortalCasSDK,
1803
+ nn as SearchBar,
1804
+ He as StatusMap,
1805
+ xn as _toRaw,
1806
+ Vn as _typeOf,
1807
+ kn as arrToStatusMap,
1808
+ wn as arrayToTree,
1809
+ Sn as checkFileSize,
1810
+ zn as creatValidator,
1811
+ En as createImportFields,
1812
+ In as createListPageId,
1813
+ Fe as en,
1814
+ Vt as exportExcel,
1815
+ rt as getI18n,
1816
+ ze as getI18nT,
1817
+ jn as getLocaleValue,
1818
+ Ln as getValueBykey,
1819
+ yn as importExcel,
1820
+ Mt as messages,
1821
+ Yn as registerVxeRenderers,
1822
+ Rt as setupI18n,
1823
+ Cn as sleep,
1824
+ at as stringToArray,
1825
+ _n as stripHtmlTags,
1826
+ $n as unicode2Str,
1827
+ Bn as useActions,
1828
+ An as useDatePicker,
1829
+ Pn as useGetters,
1830
+ Un as useI18nReState,
1831
+ Rn as useRequest,
1832
+ qn as useState,
1833
+ Te as zhCn
1830
1834
  };