joy-admin-components 0.2.12 → 0.2.16

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