joy-admin-components 0.1.43 → 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, onUnmounted as Ct, watch as Ze } from "vue";
3
- import { saveAs as xt } 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 wt, 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 kt, mapGetters as _t, mapActions as $t } 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 St } from "vue-router";
11
- const mn = 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((u) => u.type !== Symbol.for("v-cmt")).map((u) => u.type === Symbol.for("v-fgt") ? u.children : u).flat().map(
15
- (u) => {
16
- var i;
17
- return ke(
18
- ht,
19
- { span: ((i = u.props) == null ? void 0 : i.span) || 24 },
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
+ (d) => {
16
+ var c;
17
+ return _e(
18
+ gt,
19
+ { span: ((c = d.props) == null ? void 0 : c.span) || 24 },
20
20
  {
21
- default: () => u
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, u) {
50
- var i = a.prototype;
51
- u.utc = function(d) {
52
- var f = { date: d, utc: !0, args: arguments };
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
+ d.utc = function(u) {
52
+ var f = { date: u, utc: !0, args: arguments };
53
53
  return new a(f);
54
- }, i.utc = function(d) {
55
- var f = u(this.toDate(), { locale: this.$L, utc: !0 });
56
- return d ? f.add(this.utcOffset(), t) : f;
57
- }, i.local = function() {
58
- return u(this.toDate(), { locale: this.$L, utc: !1 });
54
+ }, c.utc = function(u) {
55
+ var f = d(this.toDate(), { locale: this.$L, utc: !0 });
56
+ return u ? f.add(this.utcOffset(), t) : f;
57
+ }, c.local = function() {
58
+ return d(this.toDate(), { locale: this.$L, utc: !1 });
59
59
  };
60
- var v = i.parse;
61
- i.parse = function(d) {
62
- d.utc && (this.$u = !0), this.$utils().u(d.$offset) || (this.$offset = d.$offset), v.call(this, d);
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
- var d = this.$d;
68
- this.$y = d.getUTCFullYear(), this.$M = d.getUTCMonth(), this.$D = d.getUTCDate(), this.$W = d.getUTCDay(), this.$H = d.getUTCHours(), this.$m = d.getUTCMinutes(), this.$s = d.getUTCSeconds(), this.$ms = d.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
- g.call(this);
70
+ C.call(this);
71
71
  };
72
- var k = i.utcOffset;
73
- i.utcOffset = function(d, f) {
74
- var $ = this.$utils().u;
75
- if ($(d))
76
- return this.$u ? 0 : $(this.$offset) ? k.call(this) : this.$offset;
77
- if (typeof d == "string" && (d = 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;
84
- }(d), d === null))
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
+ }(u), u === null))
85
85
  return this;
86
- var h = Math.abs(d) <= 16 ? 60 * d : d;
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(d) {
97
- var f = d || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
- return x.call(this, f);
99
- }, i.valueOf = function() {
100
- var d = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
101
- return this.$d.valueOf() - 6e4 * d;
102
- }, i.isUTC = function() {
95
+ var m = c.format;
96
+ c.format = function(u) {
97
+ var f = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
+ return m.call(this, f);
99
+ }, c.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
+ }, 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(d) {
111
- return d === "s" && this.$offset ? u(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(d, f, $) {
115
- if (d && this.$u === d.$u)
116
- return b.call(this, d, f, $);
117
- var h = this.local(), m = u(d).local();
118
- return b.call(h, m, f, $);
113
+ var p = c.diff;
114
+ c.diff = function(u, f, _) {
115
+ if (u && this.$u === u.$u)
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 It = tt.exports;
124
- const Et = /* @__PURE__ */ et(It);
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 u, i = function(x, w, b) {
133
- b === void 0 && (b = {});
134
- var d = 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);
139
- return f.formatToParts(d);
140
- }, v = function(x, w) {
141
- for (var b = i(x, w), d = [], f = 0; f < b.length; f += 1) {
142
- var $ = b[f], h = $.type, m = $.value, I = t[h];
143
- I >= 0 && (d[I] = parseInt(m, 10));
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
+ return f.formatToParts(u);
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 = d[3], Y = T === 24 ? 0 : T, _ = d[0] + "-" + d[1] + "-" + d[2] + " " + Y + ":" + d[4] + ":" + d[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 = u);
150
- var b, d = 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(d - 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(d) {
160
- return d.type.toLowerCase() === "timezonename";
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
+ 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 d = b && w, f = b || w || u, $ = 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, d).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
- u = x;
184
+ }, a.tz.setDefault = function(m) {
185
+ d = m;
186
186
  };
187
187
  };
188
188
  });
189
- })(nt);
190
- var Lt = nt.exports;
191
- const Tt = /* @__PURE__ */ et(Lt), 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 Tt = /* @__PURE__ */ et(Lt), 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 Tt = /* @__PURE__ */ et(Lt), Le = {
248
248
  tools: {
249
249
  keysLengthError: "Keys length must be greater than 2, default first two are label and value"
250
250
  }
251
- }, Ft = {
252
- zh_cn: Le,
253
- en: Te
251
+ }, Mt = {
252
+ zh_cn: Te,
253
+ en: Fe
254
254
  };
255
- let ie = null;
256
- function Ot(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 = wt({
261
+ return ue || (ue = $t({
262
262
  legacy: !1,
263
263
  locale: "zh_cn",
264
264
  fallbackLocale: "zh_cn",
265
- messages: Ft
266
- })), ie;
265
+ messages: Mt
266
+ })), ue;
267
267
  }
268
- function ot() {
269
- return ie || Ot();
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(Et);
275
- ve.extend(Tt);
276
- async function gn(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, u) {
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 Dt = {
298
+ const At = {
299
299
  columnWidth: 30
300
300
  };
301
- async function zt(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 } = Dt;
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: u } = Mt();
309
- u.columns = e, u.addRows(t), o && await Rt(a, u, 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
- xt(v);
315
- } catch (i) {
316
- console.log(i);
314
+ _t(w);
315
+ } catch (c) {
316
+ console.log(c);
317
317
  }
318
318
  }
319
- function Mt() {
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 Rt(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 At(n, e, o);
331
+ await qt(n, e, r);
332
332
  break;
333
333
  }
334
334
  }
335
335
  }
336
- async function At(n, e, t, l) {
337
- const o = e.getColumn(t), r = o.values;
338
- e.getColumn(t).width = 20, e.eachRow((a, u) => {
339
- u > 1 && (a.height = 40);
336
+ async function qt(n, e, t, o) {
337
+ const r = e.getColumn(t), l = r.values;
338
+ e.getColumn(t).width = 20, e.eachRow((a, d) => {
339
+ d > 1 && (a.height = 40);
340
340
  });
341
- for (let a = 0, u = r.length; a < u; 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 Vt(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 Vt(n, e, t, l) {
354
- const { col: o, row: r, width: a, height: u } = l, { success: i, base64: v } = await Ut(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 },
362
- ext: { width: a, height: u }
360
+ e.addImage(C, {
361
+ tl: { col: r, row: l },
362
+ ext: { width: a, height: d }
363
363
  });
364
364
  }
365
365
  }
366
- function Ut(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 jt(n) {
381
+ function Yt(n) {
382
382
  if (n < 26)
383
383
  return String.fromCharCode(65 + n);
384
384
  {
@@ -386,52 +386,52 @@ function jt(n) {
386
386
  return e + t;
387
387
  }
388
388
  }
389
- function pn(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 vn(n) {
396
+ function xn(n) {
397
397
  return JSON.parse(JSON.stringify(n));
398
398
  }
399
- function bn(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 yn(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, u) => {
465
- u === 0 ? r.label = o[a] : u === 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 Cn(n) {
470
+ function _n(n) {
471
471
  return n ? n.replace(/<[^>]+>/g, "") : "";
472
472
  }
473
- function xn(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 wn(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 kn(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, u = jt(l);
487
- r ? e[o] = `${u}---option` : a === "image" ? e[o] = `${u}---image` : e[o] = u;
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 $n(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
- }, qt = {
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"), u = 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(u.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
- function d(h) {
578
- a.value = h ? i.value.map((m) => m[t.labelValue.value]) : [], g("change", a.value);
577
+ function u(h) {
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 : (_) => u.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 = _),
603
- onChange: d
601
+ modelValue: w.value,
602
+ "onUpdate:modelValue": g[0] || (g[0] = (S) => w.value = S),
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
- }, Pt = /* @__PURE__ */ ge(qt, [["__scopeId", "data-v-34eb8641"]]);
624
- const Bt = 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 Bt = Ye({
629
629
  }
630
630
  }
631
631
  });
632
- function Yt(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(Bt, [["render", Yt], ["__scopeId", "data-v-733f9daa"]]), Sn = {
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 u = 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(u, {
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(Bt, [["render", Yt], ["__scopeId", "data-v-733f9da
670
670
  };
671
671
  }
672
672
  };
673
- const Ht = ["accept"], Nt = {
673
+ const Gt = ["accept"], Wt = {
674
674
  __name: "index",
675
675
  props: {
676
676
  accept: {
@@ -684,55 +684,55 @@ const Ht = ["accept"], Nt = {
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) => {
693
- const u = O("el-button");
694
- return L(), le("span", null, [
695
- G(u, {
692
+ return (l, a) => {
693
+ const d = O("el-button");
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, Ht)
712
+ }, null, 40, Gt)
713
713
  ]);
714
714
  };
715
715
  }
716
- }, In = /* @__PURE__ */ ge(Nt, [["__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: u } = t;
721
- if (l)
722
- if (o == "input" && (r != null && r.multiple))
723
- e[l] = lt(a);
724
- else if (o == "date")
725
- if (u.includes("range")) {
726
- const [i, v] = l;
727
- let [g, k] = a || [];
728
- g && u == "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;
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
+ if (d.includes("range")) {
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 Kt = { key: 0 }, Zt = { class: "btns" }, Gt = { class: "left" }, Wt = { class: "right" }, Jt = {
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 Kt = { key: 0 }, Zt = { class: "btns" }, Gt = { class: "left" }, Wt = { 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: u } = ue(), i = ce(() => r.value ? u("guan-bi") : u("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);
762
- function d() {
763
- l.form.items.forEach((f) => {
764
- const $ = b.find((h) => h.key == f.key);
765
- $ && (f.value = $.value);
761
+ const p = Xe(o.form.items);
762
+ function u() {
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: d }), (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", Kt)) : (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(Pt, 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 Kt = { key: 0 }, Zt = { class: "btns" }, Gt = { class: "left" }, Wt = { cl
829
829
  _: 1
830
830
  }, 8, ["model"])
831
831
  ], 4),
832
- re("div", Zt, [
833
- re("div", Gt, [
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", Wt, [
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
- }, Qt = /* @__PURE__ */ ge(Jt, [["__scopeId", "data-v-32ac9990"]]);
877
- const Xt = { class: "center" }, en = {
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,87 +916,111 @@ const Xt = { class: "center" }, en = {
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 u = 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
- }, d = () => {
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
- d();
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
- if (window.removeEventListener("resize", b), o.searchForm.enableCellCopy) {
949
- document.removeEventListener("mouseup", Re), document.removeEventListener("mousedown", Ae);
950
- const c = g.value;
951
- if (c && c.$el) {
952
- const s = c.$el;
953
- s.removeEventListener("mousedown", z), s.removeEventListener("mousemove", de), s.removeEventListener("mouseup", be), s.removeEventListener("keydown", Ce);
952
+ }), wt(() => {
953
+ l.searchForm.enableCellCopy && setTimeout(() => {
954
+ _();
955
+ }, 500);
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);
954
963
  }
955
964
  }
956
965
  });
957
- const f = ce(() => xe.value.height || x.value);
958
- let $;
959
- async function h(c) {
960
- const { dataFormat: s } = o.tableConfig;
961
- c.pageNo != 1 && (c.nextSearchAfter = $), r.value = !0;
962
- const { code: C, data: E = {} } = await o.api(c).finally(() => {
963
- 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 = [];
964
973
  });
965
- if (C == 200) {
966
- let A = E.rows || E.records || [];
967
- 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(() => {
968
977
  setTimeout(() => {
969
- d();
978
+ _();
970
979
  }, 100);
971
980
  });
972
981
  }
973
982
  }
974
- function m(c = {}) {
975
- const { searchData: s = () => ({}) } = o.tableConfig, C = s();
976
- 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 });
977
986
  }
978
- function I() {
979
- const { reset: c } = o.tableConfig;
980
- c && c(), o.searchForm.items.forEach((s) => {
981
- const C = u.find((E) => Pe(s.key) && Pe(E.key) ? s.key.join(",") == E.key.join(",") : E.key == s.key);
982
- C && (s.value = C.value);
983
- }), 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
+ }), $();
984
993
  }
985
- o.api && o.immediate && m();
986
- function T() {
987
- return { ...v, ...Fe(o.searchForm.items) };
994
+ l.api && l.immediate && $();
995
+ function S() {
996
+ return { ...b, ...Oe(l.searchForm.items) };
988
997
  }
989
- const Y = () => {
990
- const c = g.value;
991
- c && c.clearSort();
992
- }, _ = pe({
998
+ const v = () => {
999
+ const i = m.value;
1000
+ i && i.clearSort();
1001
+ }, Y = pe({
993
1002
  storage: !0
994
- }), y = pe({
995
- width: "auto",
1003
+ }), H = pe({
996
1004
  drag: !0,
997
1005
  resizable: !0,
998
1006
  maxFixedSize: 0
999
- }), 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({
1000
1024
  isSelecting: !1,
1001
1025
  // 是否正在选择
1002
1026
  startCell: null,
@@ -1005,71 +1029,71 @@ const Xt = { class: "center" }, en = {
1005
1029
  // 结束单元格
1006
1030
  selectedCells: []
1007
1031
  // 选中的单元格列表 [{ rowIndex, colIndex }]
1008
- }), P = (c) => {
1009
- const s = c.closest(".vxe-body--column");
1032
+ }), Me = (i) => {
1033
+ const s = i.closest(".vxe-body--column");
1010
1034
  if (!s || s.classList.contains("col--checkbox") || s.classList.contains("col--seq"))
1011
1035
  return null;
1012
- const C = s.closest(".vxe-body--row");
1013
- if (!C)
1036
+ const y = s.closest(".vxe-body--row");
1037
+ if (!y)
1014
1038
  return null;
1015
- const E = g.value;
1016
- if (!E)
1039
+ const L = m.value;
1040
+ if (!L)
1017
1041
  return null;
1018
1042
  let A = -1;
1019
- const Z = C.getAttribute("data-rowid");
1020
- if (Z != null)
1021
- A = parseInt(Z, 10);
1043
+ const G = y.getAttribute("data-rowid");
1044
+ if (G != null)
1045
+ A = parseInt(G, 10);
1022
1046
  else {
1023
- const F = C.parentElement;
1024
- 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);
1025
1049
  }
1026
1050
  if (A < 0)
1027
1051
  return null;
1028
1052
  let V = -1;
1029
- const X = s.getAttribute("data-colid");
1030
- if (X && (V = E.getColumns().findIndex((S) => S.id === X)), V < 0) {
1031
- 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();
1032
1056
  if (j) {
1033
- const N = M.filter((B) => B.fixed === "left");
1034
- S < N.length && (V = M.indexOf(N[S]));
1035
- } else if (H) {
1036
- const N = M.filter((B) => B.fixed === "right");
1037
- 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]));
1038
1062
  } else {
1039
- const N = o.searchForm.showCheckBox ? 1 : 0;
1040
- 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;
1041
1065
  }
1042
1066
  }
1043
1067
  return V < 0 ? null : { rowIndex: A, colIndex: V, cell: s };
1044
- }, z = (c) => {
1045
- const s = P(c.target);
1068
+ }, be = (i) => {
1069
+ const s = Me(i.target);
1046
1070
  if (!s) {
1047
- ye();
1071
+ xe();
1048
1072
  return;
1049
1073
  }
1050
- p.isSelecting = !0, p.startCell = {
1074
+ k.isSelecting = !0, k.startCell = {
1051
1075
  rowIndex: s.rowIndex,
1052
1076
  colIndex: s.colIndex
1053
- }, p.endCell = { ...p.startCell }, ze(), Me();
1054
- }, de = (c) => {
1055
- if (!p.isSelecting)
1077
+ }, k.endCell = { ...k.startCell }, Re(), Ae();
1078
+ }, ye = (i) => {
1079
+ if (!k.isSelecting)
1056
1080
  return;
1057
- const s = P(c.target);
1058
- s && (p.endCell = {
1081
+ const s = Me(i.target);
1082
+ s && (k.endCell = {
1059
1083
  rowIndex: s.rowIndex,
1060
1084
  colIndex: s.colIndex
1061
- }, ze(), Me());
1062
- }, be = () => {
1063
- p.isSelecting = !1;
1064
- }, ye = () => {
1065
- p.selectedCells = [], p.startCell = null, p.endCell = null;
1066
- const c = g.value;
1067
- 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)
1068
1092
  return;
1069
- c.$el.querySelectorAll(
1093
+ i.$el.querySelectorAll(
1070
1094
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1071
- ).forEach((C) => {
1072
- C.classList.remove(
1095
+ ).forEach((y) => {
1096
+ y.classList.remove(
1073
1097
  "cell-selected",
1074
1098
  "cell-border-top",
1075
1099
  "cell-border-right",
@@ -1077,25 +1101,25 @@ const Xt = { class: "center" }, en = {
1077
1101
  "cell-border-left"
1078
1102
  );
1079
1103
  });
1080
- }, ze = () => {
1081
- if (!p.startCell || !p.endCell) {
1082
- p.selectedCells = [];
1104
+ }, Re = () => {
1105
+ if (!k.startCell || !k.endCell) {
1106
+ k.selectedCells = [];
1083
1107
  return;
1084
1108
  }
1085
- 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);
1086
- p.selectedCells = [];
1087
- for (let F = A; F <= Z; F++)
1088
- for (let S = V; S <= X; S++)
1089
- 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({
1090
1114
  rowIndex: F,
1091
- colIndex: S
1115
+ colIndex: I
1092
1116
  });
1093
- }, Me = () => {
1094
- _e(() => {
1095
- const c = g.value;
1096
- if (!c)
1117
+ }, Ae = () => {
1118
+ $e(() => {
1119
+ const i = m.value;
1120
+ if (!i)
1097
1121
  return;
1098
- const s = c.$el;
1122
+ const s = i.$el;
1099
1123
  if (s.querySelectorAll(
1100
1124
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1101
1125
  ).forEach((j) => {
@@ -1106,242 +1130,226 @@ const Xt = { class: "center" }, en = {
1106
1130
  "cell-border-bottom",
1107
1131
  "cell-border-left"
1108
1132
  );
1109
- }), p.selectedCells.length === 0)
1133
+ }), k.selectedCells.length === 0)
1110
1134
  return;
1111
- 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 = [
1112
1136
  s.querySelector(".vxe-table--body-wrapper tbody"),
1113
1137
  s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1114
1138
  s.querySelector(".vxe-table--fixed-right-wrapper tbody")
1115
1139
  ].filter(Boolean);
1116
- p.selectedCells.forEach(({ rowIndex: j, colIndex: H }) => {
1117
- const M = C[H];
1140
+ k.selectedCells.forEach(({ rowIndex: j, colIndex: N }) => {
1141
+ const M = y[N];
1118
1142
  if (!M)
1119
1143
  return;
1120
- const N = M.fixed === "left", B = M.fixed === "right";
1121
- for (const W of S) {
1122
- 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];
1123
1147
  if (!fe)
1124
1148
  continue;
1125
- const ne = Array.from(fe.querySelectorAll(".vxe-body--column"));
1149
+ const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
1126
1150
  let D = null;
1127
- if (N && W.closest(".vxe-table--fixed-left-wrapper")) {
1128
- const J = C.filter((Q) => Q.fixed === "left").indexOf(M);
1129
- D = ne[J];
1130
- } else if (B && W.closest(".vxe-table--fixed-right-wrapper")) {
1131
- const J = C.filter((Q) => Q.fixed === "right").indexOf(M);
1132
- D = ne[J];
1133
- } else if (!N && !B && W.closest(".vxe-table--body-wrapper")) {
1134
- const oe = o.searchForm.showCheckBox ? 1 : 0, J = C.filter((we) => we.fixed === "left").length, Q = H - J;
1135
- 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];
1136
1160
  }
1137
1161
  if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
1138
- 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");
1139
1163
  break;
1140
1164
  }
1141
1165
  }
1142
1166
  });
1143
1167
  });
1144
- }, st = async () => {
1145
- if (p.selectedCells.length === 0)
1168
+ }, ct = async () => {
1169
+ if (k.selectedCells.length === 0)
1146
1170
  return;
1147
- const c = g.value;
1148
- if (!c)
1171
+ const i = m.value;
1172
+ if (!i)
1149
1173
  return;
1150
- const s = c.$el, C = c.getColumns(), E = [...new Set(p.selectedCells.map((F) => F.rowIndex))].sort(
1151
- (F, S) => F - S
1152
- ), A = [...new Set(p.selectedCells.map((F) => F.colIndex))].sort(
1153
- (F, S) => F - S
1154
- ), 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 = [
1155
1179
  s.querySelector(".vxe-table--body-wrapper tbody"),
1156
1180
  s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1157
1181
  s.querySelector(".vxe-table--fixed-right-wrapper tbody")
1158
1182
  ].filter(Boolean), V = [];
1159
- E.forEach((F) => {
1160
- const S = [];
1183
+ L.forEach((F) => {
1184
+ const I = [];
1161
1185
  A.forEach((j) => {
1162
- const H = C[j];
1163
- if (!H) {
1164
- S.push("");
1186
+ const N = y[j];
1187
+ if (!N) {
1188
+ I.push("");
1165
1189
  return;
1166
1190
  }
1167
- const M = H.fixed === "left", N = H.fixed === "right";
1168
- let B = "";
1169
- for (const W of Z) {
1170
- 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];
1171
1195
  if (!fe)
1172
1196
  continue;
1173
- const ne = Array.from(fe.querySelectorAll(".vxe-body--column"));
1197
+ const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
1174
1198
  let D = null;
1175
- if (M && W.closest(".vxe-table--fixed-left-wrapper")) {
1176
- const J = C.filter((Q) => Q.fixed === "left").indexOf(H);
1177
- D = ne[J];
1178
- } else if (N && W.closest(".vxe-table--fixed-right-wrapper")) {
1179
- const J = C.filter((Q) => Q.fixed === "right").indexOf(H);
1180
- D = ne[J];
1181
- } else if (!M && !N && W.closest(".vxe-table--body-wrapper")) {
1182
- const oe = o.searchForm.showCheckBox ? 1 : 0, J = C.filter((we) => we.fixed === "left").length, Q = j - J;
1183
- 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];
1184
1208
  }
1185
1209
  if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
1186
- 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, " ");
1187
1211
  break;
1188
1212
  }
1189
1213
  }
1190
- S.push(B);
1191
- }), V.push(S.join(" "));
1214
+ I.push(P);
1215
+ }), V.push(I.join(" "));
1192
1216
  });
1193
- const X = V.join(`
1217
+ const ee = V.join(`
1194
1218
  `);
1195
1219
  try {
1196
- await navigator.clipboard.writeText(X);
1220
+ await navigator.clipboard.writeText(ee);
1197
1221
  } catch (F) {
1198
1222
  console.error("复制失败:", F);
1199
1223
  }
1200
- }, Ce = (c) => {
1201
- o.searchForm.enableCellCopy && ((c.ctrlKey || c.metaKey) && c.key === "c" ? p.selectedCells.length > 0 && (c.preventDefault(), c.stopPropagation(), st()) : c.key === "Escape" && ye());
1202
- }, Re = () => {
1203
- p.isSelecting = !1;
1204
- }, Ae = (c) => {
1205
- 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;
1206
1230
  if (!s || !s.$el)
1207
1231
  return;
1208
- s.$el.contains(c.target) || ye();
1209
- }, xe = ce(() => {
1210
- const { customConfig: c, columnConfig: s, ...C } = o.tableConfig;
1211
- return {
1212
- headerAlign: "left",
1213
- align: "center",
1214
- customConfig: { ..._, ...c },
1215
- columnConfig: { ...y, ...s },
1216
- // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1217
- "virtual-x-config": {
1218
- enabled: !1,
1219
- scrollToLeftOnChange: !1
1220
- },
1221
- // 纵向虚拟滚动 大于100条开启
1222
- "virtual-y-config": { enabled: !0, gt: 100 },
1223
- ...C
1224
- };
1225
- }), it = (c) => {
1226
- v.pageNo = c, m();
1227
- }, ct = (c) => {
1228
- 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, $();
1229
1237
  };
1230
- function Ve() {
1231
- const c = g.value.getCheckboxRecords();
1232
- o.searchForm.selections = c;
1238
+ function je() {
1239
+ const i = m.value.getCheckboxRecords();
1240
+ l.searchForm.selections = i;
1233
1241
  }
1234
- const Ue = (c) => {
1235
- const s = g.value;
1242
+ const qe = (i) => {
1243
+ const s = m.value;
1236
1244
  if (s) {
1237
- s.toggleCheckboxRow(c);
1238
- const C = g.value.getCheckboxRecords();
1239
- o.searchForm.selections = C;
1245
+ s.toggleCheckboxRow(i);
1246
+ const y = m.value.getCheckboxRecords();
1247
+ l.searchForm.selections = y;
1240
1248
  }
1241
1249
  };
1242
- 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) => {
1243
1251
  var F;
1244
- const C = O("el-button"), E = O("el-checkbox"), A = O("el-text"), Z = O("vxe-column"), V = O("VxeTable"), X = O("el-pagination");
1245
- return L(), le("div", {
1246
- 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 })
1247
1255
  }, [
1248
- n.searchForm.showSearch ? (L(), U(Qt, {
1256
+ n.searchForm.showSearch ? (T(), U(nn, {
1249
1257
  key: 0,
1250
1258
  form: n.searchForm,
1251
- onReset: I,
1252
- onConfirm: s[1] || (s[1] = (S) => m()),
1253
- onVisibleChange: K(w)
1259
+ onReset: B,
1260
+ onConfirm: s[1] || (s[1] = (I) => $()),
1261
+ onVisibleChange: Z(u)
1254
1262
  }, {
1255
1263
  btn: R(() => [
1256
- ae(c.$slots, "search-bar-btn", {}, void 0, !0),
1257
- G(C, {
1264
+ ie(i.$slots, "search-bar-btn", {}, void 0, !0),
1265
+ W(y, {
1258
1266
  round: "",
1259
- onClick: s[0] || (s[0] = (S) => g.value.openCustom())
1267
+ onClick: s[0] || (s[0] = (I) => m.value.openCustom())
1260
1268
  }, {
1261
1269
  default: R(() => [
1262
- G(rt, { name: "Tools" })
1270
+ W(st, { name: "Tools" })
1263
1271
  ]),
1264
1272
  _: 1
1265
1273
  })
1266
1274
  ]),
1267
1275
  _: 3
1268
- }, 8, ["form", "onVisibleChange"])) : se("", !0),
1269
- ae(c.$slots, "table-header-left", {}, void 0, !0),
1270
- re("div", {
1276
+ }, 8, ["form", "onVisibleChange"])) : ce("", !0),
1277
+ ie(i.$slots, "table-header-left", {}, void 0, !0),
1278
+ ae("div", {
1271
1279
  ref_key: "tableContentRef",
1272
- ref: k
1280
+ ref: x
1273
1281
  }, [
1274
- G(V, me({
1275
- id: n.id,
1282
+ W(V, me({
1283
+ id: c.value,
1276
1284
  ref_key: "tableRef",
1277
- ref: g,
1278
- loading: n.loading || r.value,
1279
- data: n.api ? a.value : n.data,
1285
+ ref: m,
1286
+ loading: n.loading || a.value,
1287
+ data: n.api ? d.value : n.data,
1280
1288
  border: ""
1281
- }, xe.value, {
1282
- height: f.value,
1283
- onCheckboxChange: Ve,
1284
- onCheckboxAll: Ve,
1285
- 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
1286
1294
  }), {
1287
1295
  default: R(() => [
1288
- n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (L(), U(Z, {
1296
+ n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (T(), U(G, {
1289
1297
  key: 0,
1290
1298
  type: "checkbox",
1291
- width: K(l) == "zh_cn" ? 80 : 150,
1292
- title: c.$t("xu-hao"),
1299
+ width: Z(o) == "zh_cn" ? 80 : 150,
1300
+ title: i.$t("xu-hao"),
1293
1301
  fixed: "left"
1294
1302
  }, {
1295
- checkbox: R(({ rowIndex: S, row: j, checked: H, disabled: M, indeterminate: N }) => [
1296
- re("div", Xt, [
1297
- 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, {
1298
1306
  key: 0,
1299
1307
  checked: !0,
1300
1308
  disabled: M,
1301
1309
  size: "default",
1302
- onClick: Ie((B) => !M && Ue(j), ["stop"])
1303
- }, null, 8, ["disabled", "onClick"])) : (L(), U(E, {
1310
+ onClick: Ee((P) => !M && qe(j), ["stop"])
1311
+ }, null, 8, ["disabled", "onClick"])) : (T(), U(L, {
1304
1312
  key: 1,
1305
1313
  disabled: M,
1306
1314
  checked: !1,
1307
1315
  size: "default",
1308
- onClick: Ie((B) => !M && Ue(j), ["stop"])
1316
+ onClick: Ee((P) => !M && qe(j), ["stop"])
1309
1317
  }, null, 8, ["disabled", "onClick"])),
1310
- G(A, {
1318
+ W(A, {
1311
1319
  type: "info",
1312
1320
  class: "mgl5"
1313
1321
  }, {
1314
1322
  default: R(() => [
1315
- ee(te(S + 1), 1)
1323
+ te(ne(I + 1), 1)
1316
1324
  ]),
1317
1325
  _: 2
1318
1326
  }, 1024)
1319
1327
  ])
1320
1328
  ]),
1321
1329
  _: 1
1322
- }, 8, ["width", "title"])) : se("", !0),
1323
- ae(c.$slots, "default", {}, void 0, !0)
1330
+ }, 8, ["width", "title"])) : ce("", !0),
1331
+ ie(i.$slots, "default", {}, void 0, !0)
1324
1332
  ]),
1325
1333
  _: 3
1326
1334
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1327
1335
  ], 512),
1328
- n.searchForm.showPage ? (L(), U(X, {
1336
+ n.searchForm.showPage ? (T(), U(ee, {
1329
1337
  key: 1,
1330
- "current-page": v[K(i)],
1331
- "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),
1332
1340
  class: "myPagination mgt10",
1333
1341
  background: "",
1334
1342
  layout: "total, sizes, prev, pager, next",
1335
- total: v.total,
1336
- "page-size": v.pageSize,
1343
+ total: b.total,
1344
+ "page-size": b.pageSize,
1337
1345
  "page-sizes": [10, 50, 100, 500],
1338
- onCurrentChange: it,
1339
- onSizeChange: ct
1340
- }, 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)
1341
1349
  ], 2);
1342
1350
  };
1343
1351
  }
1344
- }, En = /* @__PURE__ */ ge(en, [["__scopeId", "data-v-1515c739"]]), Ln = {
1352
+ }, On = /* @__PURE__ */ ge(ln, [["__scopeId", "data-v-b945dd6e"]]), Dn = {
1345
1353
  __name: "index",
1346
1354
  props: {
1347
1355
  sheetsConfig: {
@@ -1356,41 +1364,41 @@ const Xt = { class: "center" }, en = {
1356
1364
  setup(n) {
1357
1365
  const e = n;
1358
1366
  function t() {
1359
- zt(e.fileName, e.sheetsConfig);
1367
+ Vt(e.fileName, e.sheetsConfig);
1360
1368
  }
1361
- return (l, o) => {
1362
- const r = O("el-link");
1363
- return L(), U(r, me({
1369
+ return (o, r) => {
1370
+ const l = O("el-link");
1371
+ return T(), U(l, me({
1364
1372
  type: "primary",
1365
1373
  underline: "never"
1366
- }, l.$attrs, { onClick: t }), {
1374
+ }, o.$attrs, { onClick: t }), {
1367
1375
  default: R(() => [
1368
- ee(te(l.$t("xia-zai-dao-ru-mo-ban")), 1)
1376
+ te(ne(o.$t("xia-zai-dao-ru-mo-ban")), 1)
1369
1377
  ]),
1370
1378
  _: 1
1371
1379
  }, 16);
1372
1380
  };
1373
1381
  }
1374
1382
  };
1375
- function Tn(n, e = {}) {
1376
- const t = De(), l = {
1383
+ function zn(n, e = {}) {
1384
+ const t = ze(), o = {
1377
1385
  inForm: !0,
1378
1386
  required: !0,
1379
1387
  ...e
1380
- }, o = {
1388
+ }, r = {
1381
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}$/,
1382
1390
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1383
1391
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1384
- }[n], { inForm: r, value: a, required: u, msg: i = t("validate.invalidInput") } = l;
1385
- return r ? function(v, g, k) {
1386
- if (u) {
1387
- o.test(g) ? k() : k(new Error(i));
1392
+ }[n], { inForm: l, value: a, required: d, msg: c = t("validate.invalidInput") } = o;
1393
+ return l ? function(w, C, b) {
1394
+ if (d) {
1395
+ r.test(C) ? b() : b(new Error(c));
1388
1396
  return;
1389
1397
  }
1390
- g && !o.test(g) ? k(new Error(i)) : k();
1391
- } : o.test(a);
1398
+ C && !r.test(C) ? b(new Error(c)) : b();
1399
+ } : r.test(a);
1392
1400
  }
1393
- class Fn {
1401
+ class Mn {
1394
1402
  constructor(e = {}) {
1395
1403
  this.config = {
1396
1404
  clientCode: e.clientCode || "one-portal",
@@ -1486,10 +1494,10 @@ class Fn {
1486
1494
  });
1487
1495
  if (!t.ok)
1488
1496
  throw new Error(`HTTP ${t.status}: ${t.statusText}`);
1489
- const l = await t.json();
1490
- if (l.success && l.data)
1491
- 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;
1492
- 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票据验证失败");
1493
1501
  } catch (t) {
1494
1502
  return this.log("ST票据验证失败:", t), this.handleError(t), !1;
1495
1503
  }
@@ -1528,19 +1536,19 @@ class Fn {
1528
1536
  * 发送带认证的HTTP请求
1529
1537
  */
1530
1538
  async request(e, t = {}) {
1531
- const l = {
1539
+ const o = {
1532
1540
  headers: {
1533
1541
  "Content-Type": "application/json",
1534
1542
  ...t.headers
1535
1543
  },
1536
1544
  ...t
1537
1545
  };
1538
- 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}`);
1539
1547
  try {
1540
- const o = await fetch(e, l);
1541
- return o.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : o;
1542
- } catch (o) {
1543
- 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;
1544
1552
  }
1545
1553
  }
1546
1554
  /**
@@ -1596,100 +1604,100 @@ class Fn {
1596
1604
  return this.config[e];
1597
1605
  }
1598
1606
  }
1599
- function On(n, e = {}) {
1600
- const l = Object.assign({
1607
+ function Rn(n, e = {}) {
1608
+ const o = Object.assign({
1601
1609
  manual: !1,
1602
1610
  // 手动执行
1603
1611
  log: !1,
1604
1612
  params: null,
1605
1613
  format: null
1606
- }, e), { manual: o, log: r, params: a = {}, cb: u, format: i } = l, v = q([]), g = q(!1), k = (x) => {
1607
- const w = x || a;
1608
- g.value = !0, n(w).then((b) => {
1609
- const { code: d, data: f, msg: $ } = b;
1610
- if (u) {
1611
- const { records: h, rows: m } = f || {}, I = h || m ? h || m : f;
1612
- v.value = $e(I, i), u(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;
1618
+ if (d) {
1619
+ const { records: h, rows: g } = f || {}, E = h || g ? h || g : f;
1620
+ w.value = Se(E, c), d(p);
1613
1621
  }
1614
1622
  if (f) {
1615
1623
  if (f.records != null || f.rows != null) {
1616
- const { records: h, rows: m, total: I = 0 } = f || {};
1617
- 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);
1618
1626
  } else
1619
- v.value = $e(f, i);
1620
- r && console.log("useRequest-res", v.value);
1627
+ w.value = Se(f, c);
1628
+ l && console.log("useRequest-res", w.value);
1621
1629
  }
1622
- }).catch((b) => {
1623
- u && (console.log("useRequestErr", b), u({ code: 500 }));
1630
+ }).catch((p) => {
1631
+ d && (console.log("useRequestErr", p), d({ code: 500 }));
1624
1632
  }).finally(() => {
1625
- g.value = !1;
1633
+ C.value = !1;
1626
1634
  });
1627
1635
  };
1628
- return o || k(), [g, v, k];
1636
+ return r || b(), [C, w, b];
1629
1637
  }
1630
- function Dn(n) {
1631
- const e = q(n), t = q(""), l = q("");
1632
- return Ze(e, (o) => {
1633
- const r = o || ["", ""];
1634
- t.value = r[0], l.value = r[1];
1635
- }), [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];
1636
1644
  }
1637
- function zn(n) {
1645
+ function Vn(n) {
1638
1646
  return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
1639
1647
  }
1640
- function $e(n, e) {
1648
+ function Se(n, e) {
1641
1649
  if (!e)
1642
1650
  return n;
1643
1651
  if (n instanceof Array)
1644
- return n.map((l) => {
1645
- let o = {};
1646
- 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;
1647
1655
  });
1648
1656
  let t = {};
1649
- return e.forEach((l) => t[l] = n[l]), t;
1657
+ return e.forEach((o) => t[o] = n[o]), t;
1650
1658
  }
1651
- function Mn(n, e = []) {
1652
- const { locale: t } = ue(), l = q(n());
1653
- return Ze(
1659
+ function Un(n, e = []) {
1660
+ const { locale: t } = de(), o = q(n());
1661
+ return We(
1654
1662
  [t, ...e],
1655
1663
  () => {
1656
- l.value = n();
1664
+ o.value = n();
1657
1665
  },
1658
1666
  { immediate: !0 }
1659
- ), l;
1667
+ ), o;
1660
1668
  }
1661
- function Rn(n, e = "zh_cn", t = "en_us") {
1669
+ function jn(n, e = "zh_cn", t = "en_us") {
1662
1670
  if (!n)
1663
1671
  return "-";
1664
- const l = { en_us: t, zh_cn: e }, r = ot().global.locale.value;
1665
- 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] || "-";
1666
1674
  }
1667
- function An(n, e) {
1668
- let t = kt;
1669
- 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);
1670
1678
  }
1671
- function Vn(n, e) {
1672
- let t = _t;
1673
- 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);
1674
1682
  }
1675
- function Un(n, e) {
1676
- let t = $t;
1677
- return typeof n == "string" && n.length > 0 && (t = Oe(n).mapActions), tn(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);
1678
1686
  }
1679
- function at(n, e) {
1680
- const t = Qe(), l = e(n), o = {};
1681
- return Object.keys(l).forEach((r) => {
1682
- const a = l[r].bind({ $store: t });
1683
- o[r] = ce(a);
1684
- }), 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;
1685
1693
  }
1686
- function tn(n, e) {
1687
- const t = Qe(), l = e(n), o = {};
1688
- return Object.keys(l).forEach((r) => {
1689
- o[r] = l[r].bind({ $store: t });
1690
- }), 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;
1691
1699
  }
1692
- const nn = {
1700
+ const an = {
1693
1701
  __name: "EnumRender",
1694
1702
  props: {
1695
1703
  renderOpts: {
@@ -1704,123 +1712,123 @@ const nn = {
1704
1712
  },
1705
1713
  setup(n) {
1706
1714
  const e = n, t = e.params.row[e.params.column.field];
1707
- return (l, o) => {
1708
- const r = O("el-text");
1709
- 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 }, {
1710
1718
  default: R(() => [
1711
- ee(te(n.renderOpts.enum.getName(K(t))), 1)
1719
+ te(ne(n.renderOpts.enum.getName(Z(t))), 1)
1712
1720
  ]),
1713
1721
  _: 1
1714
- })) : (L(), U(r, {
1722
+ })) : (T(), U(l, {
1715
1723
  key: 1,
1716
- type: n.renderOpts.enum.getTag(K(t))
1724
+ type: n.renderOpts.enum.getTag(Z(t))
1717
1725
  }, {
1718
1726
  default: R(() => [
1719
- ee(te(n.renderOpts.enum.getName(K(t))), 1)
1727
+ te(ne(n.renderOpts.enum.getName(Z(t))), 1)
1720
1728
  ]),
1721
1729
  _: 1
1722
1730
  }, 8, ["type"]));
1723
1731
  };
1724
1732
  }
1725
1733
  };
1726
- function jn() {
1734
+ function Yn() {
1727
1735
  he.renderer.add("Enum", {
1728
1736
  // 默认显示模板
1729
1737
  renderTableDefault(n, e) {
1730
- return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(nn, { renderOpts: n, params: e });
1738
+ return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(an, { renderOpts: n, params: e });
1731
1739
  }
1732
1740
  }), he.renderer.add("InputNumber", {
1733
1741
  // 默认显示模板
1734
1742
  renderTableDefault(n, e) {
1735
- 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 });
1736
1744
  }
1737
1745
  }), he.renderer.add("TrueFalse", {
1738
1746
  // 默认显示模板
1739
1747
  renderTableDefault(n, e) {
1740
- const { locale: t } = ue();
1741
- let l = t.value == "zh_cn";
1748
+ const { locale: t } = de();
1749
+ let o = t.value == "zh_cn";
1742
1750
  return /* @__PURE__ */ React.createElement(
1743
- gt,
1751
+ vt,
1744
1752
  {
1745
1753
  type: e.row[e.column.field] ? "success" : "danger"
1746
1754
  },
1747
- e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"
1755
+ e.row[e.column.field] ? o ? "是" : "YES" : o ? "否" : "NO"
1748
1756
  );
1749
1757
  }
1750
1758
  }), he.renderer.add("I18n", {
1751
1759
  // 默认显示模板
1752
1760
  renderTableDefault(n, e) {
1753
- const { locale: t } = ue();
1754
- let l = t.value == "zh_cn" ? e.column.field : n.fieldEn;
1755
- 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];
1756
1764
  }
1757
1765
  }), he.renderer.add("Link", {
1758
1766
  // 默认显示模板
1759
1767
  renderTableDefault(n, e) {
1760
- var u;
1768
+ var d;
1761
1769
  let t = e.column.field;
1762
- const l = St(), { multiple: o, to: r } = n;
1763
- if (!o)
1770
+ const o = It(), { multiple: r, to: l } = n;
1771
+ if (!r)
1764
1772
  return /* @__PURE__ */ React.createElement(
1765
- je,
1773
+ Pe,
1766
1774
  {
1767
1775
  underline: "never",
1768
1776
  type: "primary",
1769
- onclick: () => l.push({ path: r, query: { [t]: e.row[t] } })
1777
+ onclick: () => o.push({ path: l, query: { [t]: e.row[t] } })
1770
1778
  },
1771
1779
  e.row[t]
1772
1780
  );
1773
- const a = ((u = e.row[t]) == null ? void 0 : u.split(",")) || [];
1774
- return a.map((i, v) => /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
1775
- je,
1781
+ const a = ((d = e.row[t]) == null ? void 0 : d.split(",")) || [];
1782
+ return a.map((c, w) => /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
1783
+ Pe,
1776
1784
  {
1777
1785
  underline: "never",
1778
1786
  type: "primary",
1779
- onclick: () => l.push({ path: r, query: { [t]: i } })
1787
+ onclick: () => o.push({ path: l, query: { [t]: c } })
1780
1788
  },
1781
- i
1782
- ), v < a.length - 1 ? "," : ""));
1789
+ c
1790
+ ), w < a.length - 1 ? "," : ""));
1783
1791
  }
1784
1792
  });
1785
1793
  }
1786
1794
  export {
1787
- Pt as CmpDictionary,
1788
- rt as CmpIcon,
1789
- Sn as ConfrimButton,
1790
- Ln as DownExcelTemp,
1791
- In as ImportButton,
1792
- mn as LayOutForm,
1793
- En as ListPage,
1794
- Fn as OnePortalCasSDK,
1795
- Qt as SearchBar,
1796
- Be as StatusMap,
1797
- vn as _toRaw,
1798
- zn as _typeOf,
1799
- yn as arrToStatusMap,
1800
- bn as arrayToTree,
1801
- wn as checkFileSize,
1802
- Tn as creatValidator,
1803
- _n as createImportFields,
1804
- kn as createListPageId,
1805
- Te as en,
1806
- zt as exportExcel,
1807
- ot as getI18n,
1808
- De as getI18nT,
1809
- Rn as getLocaleValue,
1810
- $n as getValueBykey,
1811
- gn as importExcel,
1812
- Ft as messages,
1813
- jn as registerVxeRenderers,
1814
- Ot as setupI18n,
1815
- pn as sleep,
1816
- lt as stringToArray,
1817
- Cn as stripHtmlTags,
1818
- xn as unicode2Str,
1819
- Un as useActions,
1820
- Dn as useDatePicker,
1821
- Vn as useGetters,
1822
- Mn as useI18nReState,
1823
- On as useRequest,
1824
- An as useState,
1825
- 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
1826
1834
  };