joy-admin-components 0.2.11 → 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 q, onMounted as Xe, h as Le, mergeModels as Ge, useAttrs as kt, useModel as _t, computed as ne, watch as Pe, resolveComponent as M, unref as G, openBlock as D, createBlock as Y, mergeProps as he, createSlots as St, withCtx as j, createElementVNode as oe, toDisplayString as le, renderSlot as re, createVNode as R, 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 Ue, 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 = q(null), r = () => e.default ? e.default().filter((u) => u.type !== Symbol.for("v-cmt")).map((u) => u.type === Symbol.for("v-fgt") ? u.children : u).flat().map(
15
- (u) => {
16
- var 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 Pt = it.exports;
124
- const Ut = /* @__PURE__ */ st(Pt);
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 Rt = ct.exports;
191
- const jt = /* @__PURE__ */ st(Rt), 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": "全选",
@@ -202,6 +202,10 @@ const jt = /* @__PURE__ */ st(Rt), Ve = {
202
202
  "chong-zhi": "重置",
203
203
  "guan-bi": "关闭",
204
204
  "zhan-kai": "展开",
205
+ "qu-xiao": "取消",
206
+ "ti-jiao": "提交",
207
+ "que-ding": "确定",
208
+ "que-ding-guan-bi-ma": "确定关闭吗",
205
209
  // Excel 工具相关
206
210
  excel: {
207
211
  fieldsMappingRequired: "请输入列字段映射",
@@ -232,6 +236,10 @@ const jt = /* @__PURE__ */ st(Rt), Ve = {
232
236
  "chong-zhi": "Reset",
233
237
  "guan-bi": "Collapse",
234
238
  "zhan-kai": "Expand",
239
+ "qu-xiao": "Cancel",
240
+ "ti-jiao": "Submit",
241
+ "que-ding": "Confirm",
242
+ "que-ding-guan-bi-ma": "Are you sure to close?",
235
243
  // Excel utilities
236
244
  excel: {
237
245
  fieldsMappingRequired: "Please enter column field mapping",
@@ -248,192 +256,192 @@ const jt = /* @__PURE__ */ st(Rt), Ve = {
248
256
  tools: {
249
257
  keysLengthError: "Keys length must be greater than 2, default first two are label and value"
250
258
  }
251
- }, qt = {
259
+ }, Ht = {
252
260
  zh_cn: Ve,
253
261
  en_us: Me
254
262
  };
255
- let pe = null;
256
- function Bt(n = null) {
257
- if (n) {
258
- const { global: e } = n;
259
- 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;
260
268
  }
261
- return pe || (pe = Dt({
269
+ return ye || (ye = Mt({
262
270
  legacy: !1,
263
271
  locale: "zh_cn",
264
272
  fallbackLocale: "zh_cn",
265
- messages: qt
266
- })), pe;
273
+ messages: Ht
274
+ })), ye;
267
275
  }
268
- function Re() {
269
- return pe || Bt();
276
+ function Pe() {
277
+ return ye || Nt();
270
278
  }
271
- function je() {
272
- return Re().global.t;
279
+ function Re() {
280
+ return Pe().global.t;
273
281
  }
274
- Se.extend(Ut);
275
- Se.extend(jt);
276
- async function In(n, e) {
277
- const { fields: t, range: o = 1 } = e;
278
- if (!t) {
279
- const l = je();
280
- 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"));
281
289
  }
282
- let a = new nt.Workbook();
283
- await a.xlsx.load(n);
284
- const r = {};
285
- return a.eachSheet(function(l, u) {
286
- const d = [];
287
- l.eachRow(function(k, x) {
288
- if (x > o) {
289
- let C = {}, v = !0;
290
- Object.keys(t).forEach((b) => {
291
- const g = k.getCell(t[b]).value;
292
- C[b] = g, g && (v = !1);
293
- }), 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);
294
302
  }
295
- }), r[l._name] = d;
296
- }), a = null, r;
303
+ }), o[a._name] = c;
304
+ }), s = null, o;
297
305
  }
298
- const Yt = {
306
+ const Zt = {
299
307
  columnWidth: 30
300
308
  };
301
- async function Kt(n, e, t = [], o = {}) {
302
- if (!n || !e)
309
+ async function Gt(t, e, n = [], l = {}) {
310
+ if (!t || !e)
303
311
  return;
304
- const { columnStyle: a } = o, { columnWidth: r } = Yt;
305
- e.forEach((d) => {
306
- 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;
307
315
  });
308
- const { workbook: l, worksheet: u } = Ht();
309
- 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);
310
318
  try {
311
- const d = await l.xlsx.writeBuffer(), k = new File([d], n, {
319
+ const c = await a.xlsx.writeBuffer(), b = new File([c], t, {
312
320
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
313
321
  });
314
- Et(k);
315
- } catch (d) {
316
- console.log(d);
322
+ Vt(b);
323
+ } catch (c) {
324
+ console.log(c);
317
325
  }
318
326
  }
319
- function Ht() {
320
- const n = new nt.Workbook();
321
- n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date();
322
- const e = n.addWorksheet("Sheet1");
323
- 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 };
324
332
  }
325
- async function Nt(n, e, t) {
326
- const o = Object.keys(t);
327
- for (const a of o) {
328
- const r = t[a], { type: l } = r;
329
- 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) {
330
338
  case "IMG":
331
- await Zt(n, e, a);
339
+ await Xt(t, e, s);
332
340
  break;
333
341
  }
334
342
  }
335
343
  }
336
- async function Zt(n, e, t, o) {
337
- const a = e.getColumn(t), r = a.values;
338
- e.getColumn(t).width = 20, e.eachRow((l, u) => {
339
- 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);
340
348
  });
341
- for (let l = 0, u = r.length; l < u; l++) {
342
- if (l < 2)
349
+ for (let a = 0, r = o.length; a < r; a++) {
350
+ if (a < 2)
343
351
  continue;
344
- let d = r[l];
345
- 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, {
346
354
  width: 100,
347
355
  height: 50,
348
- col: a._number - 1,
349
- row: l - 1
356
+ col: s._number - 1,
357
+ row: a - 1
350
358
  }));
351
359
  }
352
360
  }
353
- async function Gt(n, e, t, o) {
354
- const { col: a, row: r, width: l, height: u } = o, { success: d, base64: k } = await Wt(t, 0.3);
355
- if (d) {
356
- const x = n.addImage({
357
- 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,
358
366
  extension: "jpeg"
359
367
  });
360
- e.addImage(x, {
361
- tl: { col: a, row: r },
362
- ext: { width: l, height: u }
368
+ e.addImage(C, {
369
+ tl: { col: s, row: o },
370
+ ext: { width: a, height: r }
363
371
  });
364
372
  }
365
373
  }
366
- function Wt(n, e = 1) {
367
- const t = new Image();
368
- return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((o, a) => {
369
- t.onload = () => {
370
- const r = document.createElement("canvas");
371
- r.width = t.width, r.height = t.height, r.getContext("2d").drawImage(t, 0, 0, r.width, r.height), 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({
372
380
  success: !0,
373
381
  //canvas.toDataURL的方法将图片的绝对路径转换为base64编码
374
- base64: r.toDataURL("image/jpeg", e)
382
+ base64: o.toDataURL("image/jpeg", e)
375
383
  });
376
- }, t.onerror = () => {
377
- o({ success: !1 });
384
+ }, n.onerror = () => {
385
+ l({ success: !1 });
378
386
  };
379
387
  });
380
388
  }
381
- function Jt(n) {
382
- if (n < 26)
383
- return String.fromCharCode(65 + n);
389
+ function tn(t) {
390
+ if (t < 26)
391
+ return String.fromCharCode(65 + t);
384
392
  {
385
- const e = String.fromCharCode(65 + Math.floor((n - 26) / 26)), t = String.fromCharCode(65 + (n - 26) % 26);
386
- 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;
387
395
  }
388
396
  }
389
- function Fn(n) {
397
+ function Vn(t) {
390
398
  return new Promise((e) => {
391
399
  setTimeout(() => {
392
400
  e();
393
- }, n);
401
+ }, t);
394
402
  });
395
403
  }
396
- function Ln(n) {
397
- return JSON.parse(JSON.stringify(n));
404
+ function Mn(t) {
405
+ return JSON.parse(JSON.stringify(t));
398
406
  }
399
- function Tn(n) {
400
- let e = [], t = {}, o = (a, r) => Object.prototype.hasOwnProperty.call(a, r);
401
- for (const a of n) {
402
- t[a.id] = {
403
- ...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,
404
412
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
405
- children: o(t, a.id) ? t[a.id].children : []
413
+ children: l(n, s.id) ? n[s.id].children : []
406
414
  };
407
- const r = t[a.id];
408
- 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] = {
409
417
  children: []
410
- }), t[a.pid].children.push(r));
418
+ }), n[s.pid].children.push(o));
411
419
  }
412
420
  return e;
413
421
  }
414
- function ut(n, e = " ") {
415
- return n ? n.split(e).filter((t) => t.trim()) : [];
422
+ function ht(t, e = " ") {
423
+ return t ? t.split(e).filter((n) => n.trim()) : [];
416
424
  }
417
- class Je {
418
- constructor(e, t = ["label", "value", "labelEn"]) {
419
- this.list = e.map((o) => ({
420
- ...o,
421
- label: o[t[0]],
422
- labelEn: o[t[2]] || o[t[0]] || "",
423
- value: o[t[1]]
424
- })), 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]));
425
433
  }
426
434
  getName(e) {
427
435
  if (!this.has(e))
428
436
  return "-";
429
- const t = Re().global.locale, { label: o, labelEn: a } = this.map.get(e);
430
- 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 || "-";
431
439
  }
432
440
  getTag(e) {
433
441
  if (!this.has(e))
434
442
  return "info";
435
- const { tag: t = "info" } = this.map.get(e);
436
- return t;
443
+ const { tag: n = "info" } = this.map.get(e);
444
+ return n;
437
445
  }
438
446
  getItem(e) {
439
447
  return this.has(e) ? this.map.get(e) : null;
@@ -441,59 +449,59 @@ class Je {
441
449
  getColor(e) {
442
450
  if (!this.has(e))
443
451
  return null;
444
- const { color: t } = this.map.get(e);
445
- return t;
452
+ const { color: n } = this.map.get(e);
453
+ return n;
446
454
  }
447
455
  has(e) {
448
456
  return this.map.has(e);
449
457
  }
450
458
  }
451
- function En(n, e = [], t = "i18nName") {
452
- if (n.length == 0)
453
- return new Je([]);
459
+ function An(t, e = [], n = "i18nName") {
460
+ if (t.length == 0)
461
+ return new Xe([]);
454
462
  if (e.length < 2) {
455
- const a = je();
456
- throw new Error(a("tools.keysLengthError"));
463
+ const s = Re();
464
+ throw new Error(s("tools.keysLengthError"));
457
465
  }
458
- let o = n.map((a) => {
459
- let r = {};
460
- return t && (r.labelEn = a[t]), e.forEach((l, u) => {
461
- u === 0 ? r.label = a[l] : u === 1 ? r.value = a[l] : r[l] = a[l];
462
- }), 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;
463
471
  });
464
- return new Je(o);
472
+ return new Xe(l);
465
473
  }
466
- function Dn(n) {
467
- return n ? n.replace(/<[^>]+>/g, "") : "";
474
+ function Un(t) {
475
+ return t ? t.replace(/<[^>]+>/g, "") : "";
468
476
  }
469
- function zn(n) {
470
- 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)))) : "";
471
479
  }
472
- function On(n, e = 10) {
473
- let t = 1048576 * e;
474
- return !(n.size > t);
480
+ function Pn(t, e = 10) {
481
+ let n = 1048576 * e;
482
+ return !(t.size > n);
475
483
  }
476
- function Vn(n) {
477
- 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);
478
486
  }
479
- function Mn(n) {
487
+ function Bn(t) {
480
488
  let e = {};
481
- return n.map((t, o) => {
482
- let { key: a, option: r, type: l } = t, u = Jt(o);
483
- 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;
484
492
  }), e;
485
493
  }
486
- function An(n, e) {
487
- 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);
488
496
  }
489
- const we = (n, e) => {
490
- const t = n.__vccOpts || n;
491
- for (const [o, a] of e)
492
- t[o] = a;
493
- return t;
494
- }, 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 = {
495
503
  __name: "index",
496
- props: /* @__PURE__ */ Ge({
504
+ props: /* @__PURE__ */ We({
497
505
  api: {
498
506
  type: Function
499
507
  },
@@ -529,128 +537,128 @@ const we = (n, e) => {
529
537
  modelValue: {},
530
538
  modelModifiers: {}
531
539
  }),
532
- emits: /* @__PURE__ */ Ge(["success", "change", "changeAll"], ["update:modelValue"]),
533
- setup(n, { emit: e }) {
534
- const t = n, o = kt(), { t: a, locale: r } = ve(), l = _t(n, "modelValue"), u = ne(() => o["value-key"] != null), d = q(""), k = ne(() => {
535
- if (o.remote !== void 0)
536
- return t.data;
537
- const i = ut(d.value), { data: p, labelValue: L } = t, O = p || v.value;
538
- if (i.length == 0)
539
- return O;
540
- const { label: ee, labelEn: ie } = L;
541
- let m = r.value == "en_us" ? ie || "i18nName" : ee;
542
- return i.length == 1 ? O.filter(
543
- (ae) => ae[m].toLowerCase().includes(i[0].toLowerCase())
544
- ) : O.filter((ae) => {
545
- let me = !1;
546
- return me = i.some(
547
- (be) => ae[m].toLowerCase() == be.toLowerCase()
548
- ), 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;
549
557
  });
550
- }), x = ne({
558
+ }), C = se({
551
559
  get() {
552
- 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;
553
561
  },
554
- set(i) {
555
- return i;
562
+ set(u) {
563
+ return u;
556
564
  }
557
- }), C = e, v = q([]), b = async () => {
558
- const { data: i } = await t.api();
559
- 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);
560
568
  };
561
- t.api && b();
562
- function g(i) {
563
- C("change", i);
569
+ n.api && g();
570
+ function h(u) {
571
+ w("change", u);
564
572
  }
565
- const f = t.labelValue.label.split("-"), h = (i) => {
573
+ const f = n.labelValue.label.split("-"), m = (u) => {
566
574
  if (f.length == 1) {
567
- if (t.changeLocal)
568
- return a(i[t.labelValue.label]);
569
- let p = r.value == "en_us" ? i[t.labelValue.labelEn || "i18nName"] : i[t.labelValue.label];
570
- 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;
571
579
  } else {
572
- let p = [];
573
- return f.forEach((L) => {
574
- p.push(i[L]);
575
- }), p.join("-");
580
+ let v = [];
581
+ return f.forEach((z) => {
582
+ v.push(u[z]);
583
+ }), v.join("-");
576
584
  }
577
585
  };
578
- function _(i) {
579
- let p = t.data ? t.data : v.value;
580
- l.value = i ? p.map(
581
- (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]
582
590
  ) : [], _e(() => {
583
- C("change", l.value), C("changeAll", l.value, p);
591
+ w("change", a.value), w("changeAll", a.value, v);
584
592
  });
585
593
  }
586
- function w(i) {
587
- 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]);
588
596
  }
589
- function S(i) {
590
- 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]);
591
599
  }
592
- function z(i) {
593
- return i.map((p) => ({
594
- ...p,
595
- label: h(p),
596
- 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]
597
605
  }));
598
606
  }
599
- const I = q([]), W = t.data ? t.data : v.value;
600
- I.value = z(W), Pe(
601
- () => t.data ? t.data : v.value,
602
- (i) => {
603
- var L;
604
- const p = z(i);
605
- if (p.length !== I.value.length)
606
- 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;
607
615
  else {
608
- let O = !1;
609
- for (let ee = 0; ee < p.length; ee++)
610
- if (p[ee].value !== ((L = I.value[ee]) == null ? void 0 : L.value)) {
611
- 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;
612
620
  break;
613
621
  }
614
- O && (I.value = p);
622
+ q && (E.value = v);
615
623
  }
616
624
  },
617
625
  { deep: !0 }
618
626
  );
619
- const V = ne(() => I.value);
620
- return (i, p) => {
621
- const L = M("el-checkbox"), O = M("el-select-v2"), ee = M("el-option"), ie = M("el-select");
622
- 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({
623
631
  key: 0,
624
- options: V.value,
625
- modelValue: l.value,
626
- "onUpdate:modelValue": p[1] || (p[1] = (m) => l.value = m)
627
- }, G(o), {
632
+ options: A.value,
633
+ modelValue: a.value,
634
+ "onUpdate:modelValue": v[1] || (v[1] = (p) => a.value = p)
635
+ }, K(l), {
628
636
  filterable: "",
629
637
  "collapse-tags": "",
630
638
  "collapse-tags-tooltip": "",
631
639
  clearable: "",
632
- onChange: g,
633
- onClear: g
634
- }), St({
635
- default: j(({ item: m }) => [
636
- oe("div", {
637
- onClick: (ge) => w(m)
638
- }, 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)
639
647
  ]),
640
648
  _: 2
641
649
  }, [
642
- G(o).multiple != null ? {
650
+ K(l).multiple != null ? {
643
651
  name: "header",
644
- fn: j(() => [
645
- re(i.$slots, "header", {}, () => [
646
- R(L, {
652
+ fn: T(() => [
653
+ X(u.$slots, "header", {}, () => [
654
+ V(z, {
647
655
  class: "mgl20",
648
- modelValue: x.value,
649
- "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),
650
658
  onChange: _
651
659
  }, {
652
- default: j(() => [
653
- se(le(i.$t("quan-xuan")), 1)
660
+ default: T(() => [
661
+ Q(J(u.$t("quan-xuan")), 1)
654
662
  ]),
655
663
  _: 1
656
664
  }, 8, ["modelValue"])
@@ -658,44 +666,44 @@ const we = (n, e) => {
658
666
  ]),
659
667
  key: "0"
660
668
  } : void 0
661
- ]), 1040, ["options", "modelValue"])) : (D(), Y(ie, he({
669
+ ]), 1040, ["options", "modelValue"])) : (L(), B(ue, he({
662
670
  key: 1,
663
- modelValue: l.value,
664
- "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),
665
673
  filterable: "",
666
674
  "collapse-tags": "",
667
675
  "collapse-tags-tooltip": "",
668
- "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,
669
677
  clearable: ""
670
- }, G(o), { onClear: n.optionClick }), {
671
- default: j(() => [
672
- G(o).multiple != null && n.showCheckAll && n.maxLimit == null ? re(i.$slots, "header", { key: 0 }, () => [
673
- R(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, {
674
682
  class: "mgl20",
675
- modelValue: x.value,
676
- "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),
677
685
  onChange: _
678
686
  }, {
679
- default: j(() => [
680
- se(le(i.$t("quan-xuan")), 1)
687
+ default: T(() => [
688
+ Q(J(u.$t("quan-xuan")), 1)
681
689
  ]),
682
690
  _: 1
683
691
  }, 8, ["modelValue"])
684
- ], !0) : fe("", !0),
685
- (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, {
686
694
  key: ge,
687
- label: h(m),
688
- disabled: G(o).multiple != null && n.maxLimit > 0 ? S(m) : !1,
689
- onClick: ze((ae) => w(m), ["stop"]),
690
- 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]
691
699
  }, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
692
700
  ]),
693
701
  _: 3
694
702
  }, 16, ["modelValue", "filter-method", "onClear"]));
695
703
  };
696
704
  }
697
- }, en = /* @__PURE__ */ we(Xt, [["__scopeId", "data-v-d12f3c20"]]);
698
- const tn = Qe({
705
+ }, ln = /* @__PURE__ */ xe(on, [["__scopeId", "data-v-d12f3c20"]]);
706
+ const an = tt({
699
707
  props: {
700
708
  name: {
701
709
  tyepe: String,
@@ -703,40 +711,40 @@ const tn = Qe({
703
711
  }
704
712
  }
705
713
  });
706
- function nn(n, e, t, o, a, r) {
707
- const l = M("el-icon");
708
- return D(), Y(l, { class: "cmp-icon" }, {
709
- default: j(() => [
710
- (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)))
711
719
  ]),
712
720
  _: 1
713
721
  });
714
722
  }
715
- const dt = /* @__PURE__ */ we(tn, [["render", nn], ["__scopeId", "data-v-733f9daa"]]), Pn = {
723
+ const mt = /* @__PURE__ */ xe(an, [["render", sn], ["__scopeId", "data-v-733f9daa"]]), Kn = {
716
724
  __name: "index",
717
725
  emits: ["ok", "no"],
718
- setup(n, { emit: e }) {
719
- const t = e, o = ot(() => {
720
- t("ok");
726
+ setup(t, { emit: e }) {
727
+ const n = e, l = Ue(() => {
728
+ n("ok");
721
729
  }, 500);
722
- function a() {
723
- t("no");
730
+ function s() {
731
+ n("no");
724
732
  }
725
- return (r, l) => {
726
- const u = M("el-popconfirm");
727
- return D(), Y(u, he(r.$attrs, {
728
- onConfirm: G(o),
729
- 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
730
738
  }), {
731
- reference: j(() => [
732
- re(r.$slots, "default")
739
+ reference: T(() => [
740
+ X(o.$slots, "default")
733
741
  ]),
734
742
  _: 3
735
743
  }, 16, ["onConfirm"]);
736
744
  };
737
745
  }
738
746
  };
739
- const on = ["accept"], ln = {
747
+ const rn = ["accept"], cn = {
740
748
  __name: "index",
741
749
  props: {
742
750
  accept: {
@@ -749,56 +757,56 @@ const on = ["accept"], ln = {
749
757
  }
750
758
  },
751
759
  emits: ["fileChange"],
752
- setup(n, { emit: e }) {
753
- const t = e, o = q(null);
754
- function a(r) {
755
- let l = r.target.files[0];
756
- 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;
757
765
  }
758
- return (r, l) => {
759
- const u = M("el-button");
760
- return D(), de("span", null, [
761
- R(u, {
762
- 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,
763
771
  class: "mgr10",
764
- onClick: l[0] || (l[0] = (d) => o.value.click())
772
+ onClick: a[0] || (a[0] = (c) => l.value.click())
765
773
  }, {
766
- default: j(() => [
767
- se(le(r.$t("dao-ru")), 1)
774
+ default: T(() => [
775
+ Q(J(o.$t("dao-ru")), 1)
768
776
  ]),
769
777
  _: 1
770
778
  }, 8, ["loading"]),
771
- oe("input", {
772
- onChange: a,
779
+ ae("input", {
780
+ onChange: s,
773
781
  ref_key: "input",
774
- ref: o,
775
- accept: n.accept,
782
+ ref: l,
783
+ accept: t.accept,
776
784
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
777
785
  type: "file"
778
- }, null, 40, on)
786
+ }, null, 40, rn)
779
787
  ]);
780
788
  };
781
789
  }
782
- }, Un = /* @__PURE__ */ we(ln, [["__scopeId", "data-v-5f1449ad"]]);
783
- function Ae(n) {
790
+ }, Hn = /* @__PURE__ */ xe(cn, [["__scopeId", "data-v-5f1449ad"]]);
791
+ function qe(t) {
784
792
  let e = {};
785
- return n.forEach((t) => {
786
- const { key: o, type: a, option: r = {}, value: l, dateType: u = "date" } = t;
787
- if (o)
788
- if (a == "input" && (r != null && r.multiple))
789
- e[o] = ut(l);
790
- else if (a == "date")
791
- if (u.includes("range")) {
792
- const [d, k] = o;
793
- let [x, C] = l || [];
794
- 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;
795
803
  } else
796
- e[o] = l;
804
+ e[l] = a;
797
805
  else
798
- e[o] = l;
806
+ e[l] = a;
799
807
  }), e;
800
808
  }
801
- 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 = {
802
810
  __name: "index",
803
811
  props: {
804
812
  form: {
@@ -807,85 +815,85 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
807
815
  }
808
816
  },
809
817
  emits: ["confirm", "reset", "visibleChange"],
810
- setup(n, { expose: e, emit: t }) {
811
- const o = n, a = t, r = q(!0), l = q(null), { t: u } = ve(), d = ne(() => r.value ? u("guan-bi") : u("zhan-kai"));
812
- function k() {
813
- 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");
814
822
  }
815
- function x(h) {
816
- h.option.onClear && h.option.onClear(), a("confirm");
823
+ function C(m) {
824
+ m.option.onClear && m.option.onClear(), s("confirm");
817
825
  }
818
- function C() {
819
- a("reset");
826
+ function w() {
827
+ s("reset");
820
828
  }
821
- function v() {
822
- a("confirm");
829
+ function y() {
830
+ s("confirm");
823
831
  }
824
- function b() {
825
- return Ae(o.form.items);
832
+ function g() {
833
+ return qe(l.form.items);
826
834
  }
827
- const g = lt(o.form.items);
835
+ const h = rt(l.form.items);
828
836
  function f() {
829
- o.form.items.forEach((h) => {
830
- const _ = g.find((w) => w.key == h.key);
831
- _ && (h.value = _.value);
837
+ l.form.items.forEach((m) => {
838
+ const _ = h.find((k) => k.key == m.key);
839
+ _ && (m.value = _.value);
832
840
  });
833
841
  }
834
- return e({ getPrm: b, reset: f }), (h, _) => {
835
- 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");
836
- 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", {
837
845
  class: "searchBar-container mgt10 mgb10",
838
- onKeydown: $t(k, ["enter"])
846
+ onKeydown: It(b, ["enter"])
839
847
  }, [
840
- oe("div", {
848
+ ae("div", {
841
849
  class: "searchBar",
842
- style: It({ height: r.value ? "auto" : "42px" })
850
+ style: Tt({ height: o.value ? "auto" : "42px" })
843
851
  }, [
844
- R(I, {
852
+ V(E, {
845
853
  inline: "",
846
- model: n.form.data
854
+ model: t.form.data
847
855
  }, {
848
- default: j(() => [
849
- (D(!0), de(De, null, et(n.form.items.filter((i) => !i.hidden), (i) => (D(), de(De, {
850
- 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
851
859
  }, [
852
- i.type == "br" ? (D(), de("br", an)) : (D(), Y(z, {
860
+ u.type == "br" ? (L(), re("br", un)) : (L(), B(M, {
853
861
  key: 1,
854
- label: i.name
862
+ label: u.name
855
863
  }, {
856
- default: j(() => {
857
- var p, L;
864
+ default: T(() => {
865
+ var v, z;
858
866
  return [
859
- i.type === "input" ? (D(), Y(w, {
867
+ u.type === "input" ? (L(), B(k, {
860
868
  key: 0,
861
- modelValue: i.value,
862
- "onUpdate:modelValue": (O) => i.value = O,
863
- class: Oe(((p = i.option) == null ? void 0 : p.class) || "w150"),
864
- 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"),
865
873
  clearable: ""
866
- }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : i.type === "custom" ? (D(), Y(tt(i.render), { key: 1 })) : fe("", !0),
867
- 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({
868
876
  key: 2,
869
- class: ((L = i.option) == null ? void 0 : L.class) || "w150",
870
- modelValue: i.value,
871
- "onUpdate:modelValue": (O) => i.value = O
872
- }, { ref_for: !0 }, i.option, {
873
- onChange: k,
874
- onClear: (O) => x(i)
875
- }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : fe("", !0),
876
- 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, {
877
885
  key: 3,
878
- class: Oe({ datetimerange: "w300", daterange: "w200" }[i.dateType] || "w100"),
879
- modelValue: i.value,
880
- "onUpdate:modelValue": (O) => i.value = O,
881
- "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[i.dateType] || "YYYY-MM-DD",
882
- type: i.dateType || "date",
883
- onFocus: (O) => l.value = i,
884
- onChange: (O) => v(),
885
- placeholder: h.$t("qing-xuan-ze"),
886
- "start-placeholder": h.$t("kai-shi-shi-jian"),
887
- "end-placeholder": h.$t("jie-shu-shi-jian")
888
- }, 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)
889
897
  ];
890
898
  }),
891
899
  _: 2
@@ -895,51 +903,51 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
895
903
  _: 1
896
904
  }, 8, ["model"])
897
905
  ], 4),
898
- oe("div", rn, [
899
- oe("div", sn, [
900
- 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)
901
909
  ]),
902
- oe("div", cn, [
903
- R(W, {
910
+ ae("div", hn, [
911
+ V(W, {
904
912
  underline: "never",
905
913
  class: "mgr10",
906
914
  onClick: _[0] || (_[0] = () => {
907
- a("visibleChange", !r.value), r.value = !r.value;
915
+ s("visibleChange", !o.value), o.value = !o.value;
908
916
  })
909
917
  }, {
910
- default: j(() => [
911
- R(dt, {
912
- name: r.value ? "ArrowUp" : "ArrowDown"
918
+ default: T(() => [
919
+ V(mt, {
920
+ name: o.value ? "ArrowUp" : "ArrowDown"
913
921
  }, null, 8, ["name"]),
914
- se(" " + le(d.value), 1)
922
+ Q(" " + J(c.value), 1)
915
923
  ]),
916
924
  _: 1
917
925
  }),
918
- R(V, {
926
+ V(A, {
919
927
  type: "primary",
920
- onClick: k
928
+ onClick: b
921
929
  }, {
922
- default: j(() => [
923
- se(le(h.$t("shai-xuan")), 1)
930
+ default: T(() => [
931
+ Q(J(m.$t("shai-xuan")), 1)
924
932
  ]),
925
933
  _: 1
926
934
  }),
927
- R(V, {
935
+ V(A, {
928
936
  type: "primary",
929
- onClick: C
937
+ onClick: w
930
938
  }, {
931
- default: j(() => [
932
- se(le(h.$t("chong-zhi")), 1)
939
+ default: T(() => [
940
+ Q(J(m.$t("chong-zhi")), 1)
933
941
  ]),
934
942
  _: 1
935
943
  }),
936
- re(h.$slots, "btn", {}, void 0, !0)
944
+ X(m.$slots, "btn", {}, void 0, !0)
937
945
  ])
938
946
  ])
939
947
  ], 32);
940
948
  };
941
949
  }
942
- }, dn = /* @__PURE__ */ we(un, [["__scopeId", "data-v-3c0a6716"]]), ft = {
950
+ }, gn = /* @__PURE__ */ xe(mn, [["__scopeId", "data-v-3c0a6716"]]), gt = {
943
951
  // 分页参数名
944
952
  pageNoKey: "pageNo",
945
953
  // 页码参数名
@@ -969,24 +977,24 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
969
977
  enableCellCopy: !0
970
978
  // 是否启用单元格选区复制功能
971
979
  };
972
- let xe = { ...ft };
973
- function Rn(n) {
974
- xe = {
975
- ...xe,
976
- ...n,
980
+ let Ce = { ...gt };
981
+ function Nn(t) {
982
+ Ce = {
983
+ ...Ce,
984
+ ...t,
977
985
  responseDataKeys: {
978
- ...xe.responseDataKeys,
979
- ...n.responseDataKeys || {}
986
+ ...Ce.responseDataKeys,
987
+ ...t.responseDataKeys || {}
980
988
  }
981
989
  };
982
990
  }
983
- function fn() {
984
- return xe;
991
+ function pn() {
992
+ return Ce;
985
993
  }
986
- function jn() {
987
- xe = { ...ft };
994
+ function Zn() {
995
+ Ce = { ...gt };
988
996
  }
989
- const hn = { class: "center" }, gn = {
997
+ const yn = { class: "center" }, vn = {
990
998
  __name: "index",
991
999
  props: {
992
1000
  // 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
@@ -1022,111 +1030,111 @@ const hn = { class: "center" }, gn = {
1022
1030
  default: () => ({})
1023
1031
  }
1024
1032
  },
1025
- setup(n, { expose: e }) {
1026
- const { t, locale: o } = ve(), a = zt(), r = fn(), l = n, u = q(!1), d = q([]);
1027
- 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 = []);
1028
- const k = ne(() => {
1029
- const c = a.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1030
- return l.id ? `listPageId-${c}-${l.id}` : `listPageId-${c}`;
1031
- }), x = lt(l.searchForm.items), C = l.searchForm.pageNoKey || r.pageNoKey, v = l.searchForm.pageSizeKey || r.pageSizeKey, b = ke({
1032
- [C]: 1,
1033
- [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,
1034
1042
  total: 0
1035
- }), g = q(null), f = q(null), h = q(450), _ = ot(() => {
1043
+ }), h = R(null), f = R(null), m = R(450), _ = Ue(() => {
1036
1044
  _e(() => {
1037
1045
  if (!f.value)
1038
1046
  return;
1039
- const s = f.value.getBoundingClientRect(), y = window.innerHeight, F = s.top, P = 100, H = y - F - P, T = 200;
1040
- 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);
1041
1049
  });
1042
- }, 100), w = () => {
1050
+ }, 100), k = () => {
1043
1051
  _();
1044
1052
  }, S = () => {
1045
- if (!l.searchForm.enableCellCopy)
1053
+ if (!a.searchForm.enableCellCopy)
1046
1054
  return !1;
1047
- const c = g.value;
1048
- if (!c || !c.$el)
1055
+ const d = h.value;
1056
+ if (!d || !d.$el)
1049
1057
  return !1;
1050
- const s = c.$el;
1051
- 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;
1052
1060
  };
1053
- Xe(() => {
1054
- _(), 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(() => {
1055
1063
  S();
1056
1064
  }, 500));
1057
1065
  }), Ft(() => {
1058
- l.searchForm.enableCellCopy && setTimeout(() => {
1066
+ a.searchForm.enableCellCopy && setTimeout(() => {
1059
1067
  S();
1060
1068
  }, 500);
1061
- }), Lt(() => {
1062
- if (window.removeEventListener("resize", w), l.searchForm.enableCellCopy) {
1063
- document.removeEventListener("mouseup", Ye), document.removeEventListener("mousedown", Ke);
1064
- const c = g.value;
1065
- if (c && c.$el) {
1066
- const s = c.$el;
1067
- 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);
1068
1076
  }
1069
1077
  }
1070
1078
  });
1071
- const z = ne(() => ie.value.height || h.value);
1072
- let I;
1073
- async function W(c) {
1074
- const { dataFormat: s } = l.tableConfig;
1075
- c[C] != 1 && (c.nextSearchAfter = I), u.value = !0;
1076
- const { code: y, data: F = {} } = await l.api(c).finally(() => {
1077
- 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 = [];
1078
1086
  });
1079
- if (y == 200) {
1080
- let P = [];
1081
- for (const T of r.responseDataKeys.rows)
1082
- if (F[T]) {
1083
- P = 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];
1084
1092
  break;
1085
1093
  }
1086
- let H = 0;
1087
- for (const T of r.responseDataKeys.total)
1088
- if (F[T] !== void 0) {
1089
- 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];
1090
1098
  break;
1091
1099
  }
1092
- d.value = s ? s(P) : P, 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(() => {
1093
1101
  setTimeout(() => {
1094
1102
  S();
1095
1103
  }, 100);
1096
1104
  });
1097
1105
  }
1098
1106
  }
1099
- function V(c = {}) {
1100
- const { searchData: s = () => ({}) } = l.tableConfig, y = s();
1101
- 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 });
1102
1110
  }
1103
- function i() {
1104
- const { reset: c } = l.tableConfig;
1105
- c && c(), l.searchForm.items.forEach((s) => {
1106
- const y = x.find((F) => We(s.key) && We(F.key) ? s.key.join(",") == F.key.join(",") : F.key == s.key);
1107
- y && (s.value = y.value);
1108
- }), 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();
1109
1117
  }
1110
- l.api && l.immediate && V();
1111
- function p() {
1112
- return { ...b, ...Ae(l.searchForm.items) };
1118
+ a.api && a.immediate && A();
1119
+ function v() {
1120
+ return { ...g, ...qe(a.searchForm.items) };
1113
1121
  }
1114
- const L = () => {
1115
- const c = g.value;
1116
- c && c.clearSort();
1117
- }, O = ke({
1122
+ const z = () => {
1123
+ const d = h.value;
1124
+ d && d.clearSort();
1125
+ }, q = ke({
1118
1126
  storage: !0
1119
- }), ee = ke({
1127
+ }), oe = ke({
1120
1128
  drag: !0,
1121
1129
  resizable: !0,
1122
1130
  maxFixedSize: 0
1123
- }), ie = ne(() => {
1124
- const { customConfig: c, columnConfig: s, ...y } = l.tableConfig;
1131
+ }), ue = se(() => {
1132
+ const { customConfig: d, columnConfig: i, ...x } = a.tableConfig;
1125
1133
  return {
1126
1134
  headerAlign: "left",
1127
1135
  align: "center",
1128
- customConfig: { ...O, ...c },
1129
- columnConfig: { ...ee, ...s },
1136
+ customConfig: { ...q, ...d },
1137
+ columnConfig: { ...oe, ...i },
1130
1138
  // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
1131
1139
  "virtual-x-config": {
1132
1140
  enabled: !1,
@@ -1134,9 +1142,9 @@ const hn = { class: "center" }, gn = {
1134
1142
  },
1135
1143
  // 纵向虚拟滚动 大于100条开启
1136
1144
  "virtual-y-config": { enabled: !0, gt: 100 },
1137
- ...y
1145
+ ...x
1138
1146
  };
1139
- }), m = ke({
1147
+ }), p = ke({
1140
1148
  isSelecting: !1,
1141
1149
  // 是否正在选择
1142
1150
  startCell: null,
@@ -1145,71 +1153,71 @@ const hn = { class: "center" }, gn = {
1145
1153
  // 结束单元格
1146
1154
  selectedCells: []
1147
1155
  // 选中的单元格列表 [{ rowIndex, colIndex }]
1148
- }), ge = (c) => {
1149
- const s = c.closest(".vxe-body--column");
1150
- 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"))
1151
1159
  return null;
1152
- const y = s.closest(".vxe-body--row");
1153
- if (!y)
1160
+ const x = i.closest(".vxe-body--row");
1161
+ if (!x)
1154
1162
  return null;
1155
- const F = g.value;
1156
- if (!F)
1163
+ const I = h.value;
1164
+ if (!I)
1157
1165
  return null;
1158
- let P = -1;
1159
- const H = y.getAttribute("data-rowid");
1160
- if (H != null)
1161
- P = parseInt(H, 10);
1166
+ let j = -1;
1167
+ const N = x.getAttribute("data-rowid");
1168
+ if (N != null)
1169
+ j = parseInt(N, 10);
1162
1170
  else {
1163
- const E = y.parentElement;
1164
- P = 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);
1165
1173
  }
1166
- if (P < 0)
1174
+ if (j < 0)
1167
1175
  return null;
1168
- let T = -1;
1169
- const te = s.getAttribute("data-colid");
1170
- if (te && (T = F.getColumns().findIndex(($) => $.id === te)), T < 0) {
1171
- 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"), U = F.getColumns();
1172
- if (B) {
1173
- const Z = U.filter((K) => K.fixed === "left");
1174
- $ < Z.length && (T = U.indexOf(Z[$]));
1175
- } else if (N) {
1176
- const Z = U.filter((K) => K.fixed === "right");
1177
- $ < Z.length && (T = U.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[$]));
1178
1186
  } else {
1179
- const Z = l.searchForm.showCheckBox ? 1 : 0;
1180
- T = U.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;
1181
1189
  }
1182
1190
  }
1183
- return T < 0 ? null : { rowIndex: P, colIndex: T, cell: s };
1184
- }, ae = (c) => {
1185
- const s = ge(c.target);
1186
- 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) {
1187
1195
  $e();
1188
1196
  return;
1189
1197
  }
1190
- m.isSelecting = !0, m.startCell = {
1191
- rowIndex: s.rowIndex,
1192
- colIndex: s.colIndex
1193
- }, m.endCell = { ...m.startCell }, qe(), Be();
1194
- }, me = (c) => {
1195
- 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)
1196
1204
  return;
1197
- const s = ge(c.target);
1198
- s && (m.endCell = {
1199
- rowIndex: s.rowIndex,
1200
- colIndex: s.colIndex
1201
- }, qe(), Be());
1202
- }, be = () => {
1203
- 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;
1204
1212
  }, $e = () => {
1205
- m.selectedCells = [], m.startCell = null, m.endCell = null;
1206
- const c = g.value;
1207
- if (!c)
1213
+ p.selectedCells = [], p.startCell = null, p.endCell = null;
1214
+ const d = h.value;
1215
+ if (!d)
1208
1216
  return;
1209
- c.$el.querySelectorAll(
1217
+ d.$el.querySelectorAll(
1210
1218
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1211
- ).forEach((y) => {
1212
- y.classList.remove(
1219
+ ).forEach((x) => {
1220
+ x.classList.remove(
1213
1221
  "cell-selected",
1214
1222
  "cell-border-top",
1215
1223
  "cell-border-right",
@@ -1217,257 +1225,257 @@ const hn = { class: "center" }, gn = {
1217
1225
  "cell-border-left"
1218
1226
  );
1219
1227
  });
1220
- }, qe = () => {
1221
- if (!m.startCell || !m.endCell) {
1222
- m.selectedCells = [];
1228
+ }, Be = () => {
1229
+ if (!p.startCell || !p.endCell) {
1230
+ p.selectedCells = [];
1223
1231
  return;
1224
1232
  }
1225
- const c = m.startCell.rowIndex, s = m.endCell.rowIndex, y = m.startCell.colIndex, F = m.endCell.colIndex, P = Math.min(c, s), H = Math.max(c, s), T = Math.min(y, F), te = Math.max(y, F);
1226
- m.selectedCells = [];
1227
- for (let E = P; E <= H; E++)
1228
- for (let $ = T; $ <= te; $++)
1229
- m.selectedCells.push({
1230
- 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,
1231
1239
  colIndex: $
1232
1240
  });
1233
- }, Be = () => {
1241
+ }, Ye = () => {
1234
1242
  _e(() => {
1235
- const c = g.value;
1236
- if (!c)
1243
+ const d = h.value;
1244
+ if (!d)
1237
1245
  return;
1238
- const s = c.$el;
1239
- if (s.querySelectorAll(
1246
+ const i = d.$el;
1247
+ if (i.querySelectorAll(
1240
1248
  ".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
1241
- ).forEach((B) => {
1242
- B.classList.remove(
1249
+ ).forEach((Y) => {
1250
+ Y.classList.remove(
1243
1251
  "cell-selected",
1244
1252
  "cell-border-top",
1245
1253
  "cell-border-right",
1246
1254
  "cell-border-bottom",
1247
1255
  "cell-border-left"
1248
1256
  );
1249
- }), m.selectedCells.length === 0)
1257
+ }), p.selectedCells.length === 0)
1250
1258
  return;
1251
- const y = c.getColumns(), F = m.selectedCells.map((B) => B.rowIndex), P = m.selectedCells.map((B) => B.colIndex), H = Math.min(...F), T = Math.max(...F), te = Math.min(...P), E = Math.max(...P), $ = [
1252
- s.querySelector(".vxe-table--body-wrapper tbody"),
1253
- s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1254
- 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")
1255
1263
  ].filter(Boolean);
1256
- m.selectedCells.forEach(({ rowIndex: B, colIndex: N }) => {
1257
- const U = y[N];
1258
- if (!U)
1264
+ p.selectedCells.forEach(({ rowIndex: Y, colIndex: Z }) => {
1265
+ const P = x[Z];
1266
+ if (!P)
1259
1267
  return;
1260
- const Z = U.fixed === "left", K = U.fixed === "right";
1261
- for (const J of $) {
1262
- const ye = J.querySelectorAll(".vxe-body--row")[B];
1263
- 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)
1264
1272
  continue;
1265
- const ce = Array.from(ye.querySelectorAll(".vxe-body--column"));
1266
- let A = null;
1267
- if (Z && J.closest(".vxe-table--fixed-left-wrapper")) {
1268
- const Q = y.filter((X) => X.fixed === "left").indexOf(U);
1269
- A = ce[Q];
1270
- } else if (K && J.closest(".vxe-table--fixed-right-wrapper")) {
1271
- const Q = y.filter((X) => X.fixed === "right").indexOf(U);
1272
- A = ce[Q];
1273
- } else if (!Z && !K && J.closest(".vxe-table--body-wrapper")) {
1274
- const ue = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((Fe) => Fe.fixed === "left").length, X = N - Q;
1275
- 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];
1276
1284
  }
1277
- if (A && !A.classList.contains("col--checkbox") && !A.classList.contains("col--seq")) {
1278
- 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");
1279
1287
  break;
1280
1288
  }
1281
1289
  }
1282
1290
  });
1283
1291
  });
1284
- }, gt = async () => {
1285
- if (m.selectedCells.length === 0)
1292
+ }, yt = async () => {
1293
+ if (p.selectedCells.length === 0)
1286
1294
  return;
1287
- const c = g.value;
1288
- if (!c)
1295
+ const d = h.value;
1296
+ if (!d)
1289
1297
  return;
1290
- const s = c.$el, y = c.getColumns(), F = [...new Set(m.selectedCells.map((E) => E.rowIndex))].sort(
1291
- (E, $) => E - $
1292
- ), P = [...new Set(m.selectedCells.map((E) => E.colIndex))].sort(
1293
- (E, $) => E - $
1294
- ), H = [
1295
- s.querySelector(".vxe-table--body-wrapper tbody"),
1296
- s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
1297
- s.querySelector(".vxe-table--fixed-right-wrapper tbody")
1298
- ].filter(Boolean), T = [];
1299
- 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) => {
1300
1308
  const $ = [];
1301
- P.forEach((B) => {
1302
- const N = y[B];
1303
- if (!N) {
1309
+ j.forEach((Y) => {
1310
+ const Z = x[Y];
1311
+ if (!Z) {
1304
1312
  $.push("");
1305
1313
  return;
1306
1314
  }
1307
- const U = N.fixed === "left", Z = N.fixed === "right";
1308
- let K = "";
1309
- for (const J of H) {
1310
- const ye = J.querySelectorAll(".vxe-body--row")[E];
1311
- 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)
1312
1320
  continue;
1313
- const ce = Array.from(ye.querySelectorAll(".vxe-body--column"));
1314
- let A = null;
1315
- if (U && J.closest(".vxe-table--fixed-left-wrapper")) {
1316
- const Q = y.filter((X) => X.fixed === "left").indexOf(N);
1317
- A = ce[Q];
1318
- } else if (Z && J.closest(".vxe-table--fixed-right-wrapper")) {
1319
- const Q = y.filter((X) => X.fixed === "right").indexOf(N);
1320
- A = ce[Q];
1321
- } else if (!U && !Z && J.closest(".vxe-table--body-wrapper")) {
1322
- const ue = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((Fe) => Fe.fixed === "left").length, X = B - Q;
1323
- 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];
1324
1332
  }
1325
- if (A && !A.classList.contains("col--checkbox") && !A.classList.contains("col--seq")) {
1326
- 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, " ");
1327
1335
  break;
1328
1336
  }
1329
1337
  }
1330
- $.push(K);
1331
- }), T.push($.join(" "));
1338
+ $.push(H);
1339
+ }), D.push($.join(" "));
1332
1340
  });
1333
- const te = T.join(`
1341
+ const le = D.join(`
1334
1342
  `);
1335
1343
  try {
1336
- await navigator.clipboard.writeText(te);
1337
- } catch (E) {
1338
- console.error("复制失败:", E);
1344
+ await navigator.clipboard.writeText(le);
1345
+ } catch (O) {
1346
+ console.error("复制失败:", O);
1339
1347
  }
1340
- }, Ie = (c) => {
1341
- l.searchForm.enableCellCopy && ((c.ctrlKey || c.metaKey) && c.key === "c" ? m.selectedCells.length > 0 && (c.preventDefault(), c.stopPropagation(), gt()) : c.key === "Escape" && $e());
1342
- }, Ye = () => {
1343
- m.isSelecting = !1;
1344
- }, Ke = (c) => {
1345
- const s = g.value;
1346
- 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)
1347
1355
  return;
1348
- s.$el.contains(c.target) || $e();
1349
- }, mt = (c) => {
1350
- b[C] = c, V();
1351
- }, pt = (c) => {
1352
- 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();
1353
1361
  };
1354
- function He() {
1355
- const c = g.value.getCheckboxRecords();
1356
- l.searchForm.selections = c;
1362
+ function Ne() {
1363
+ const d = h.value.getCheckboxRecords();
1364
+ a.searchForm.selections = d;
1357
1365
  }
1358
- const Ne = (c) => {
1359
- const s = g.value;
1360
- if (s) {
1361
- s.toggleCheckboxRow(c);
1362
- const y = g.value.getCheckboxRecords();
1363
- 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;
1364
1372
  }
1365
1373
  };
1366
- return e({ tableRef: g, getList: V, getPrm: p, clearSort: L, calculateTableHeight: _ }), (c, s) => {
1367
- var E;
1368
- const y = M("el-button"), F = M("el-checkbox"), P = M("el-text"), H = M("vxe-column"), T = M("VxeTable"), te = M("el-pagination");
1369
- return D(), de("div", {
1370
- 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 })
1371
1379
  }, [
1372
- n.searchForm.showSearch ? (D(), Y(dn, {
1380
+ t.searchForm.showSearch ? (L(), B(gn, {
1373
1381
  key: 0,
1374
- form: n.searchForm,
1375
- onReset: i,
1376
- onConfirm: s[1] || (s[1] = ($) => V()),
1377
- onVisibleChange: G(_)
1382
+ form: t.searchForm,
1383
+ onReset: u,
1384
+ onConfirm: i[1] || (i[1] = ($) => A()),
1385
+ onVisibleChange: K(_)
1378
1386
  }, {
1379
- btn: j(() => [
1380
- s[3] || (s[3] = oe("span", { class: "mgr10" }, null, -1)),
1381
- re(c.$slots, "search-bar-btn", {}, void 0, !0),
1382
- R(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, {
1383
1391
  class: "mgl10",
1384
1392
  round: "",
1385
- onClick: s[0] || (s[0] = ($) => g.value.openCustom())
1393
+ onClick: i[0] || (i[0] = ($) => h.value.openCustom())
1386
1394
  }, {
1387
- default: j(() => [
1388
- R(dt, { name: "Tools" })
1395
+ default: T(() => [
1396
+ V(mt, { name: "Tools" })
1389
1397
  ]),
1390
1398
  _: 1
1391
1399
  })
1392
1400
  ]),
1393
1401
  _: 3
1394
- }, 8, ["form", "onVisibleChange"])) : fe("", !0),
1395
- re(c.$slots, "table-header-left", {}, void 0, !0),
1396
- oe("div", {
1402
+ }, 8, ["form", "onVisibleChange"])) : ce("", !0),
1403
+ X(d.$slots, "table-header-left", {}, void 0, !0),
1404
+ ae("div", {
1397
1405
  ref_key: "tableContentRef",
1398
1406
  ref: f
1399
1407
  }, [
1400
- R(T, he({
1401
- id: k.value,
1408
+ V(D, he({
1409
+ id: b.value,
1402
1410
  ref_key: "tableRef",
1403
- ref: g,
1404
- loading: n.loading || u.value,
1405
- data: n.api ? d.value : n.data,
1411
+ ref: h,
1412
+ loading: t.loading || r.value,
1413
+ data: t.api ? c.value : t.data,
1406
1414
  border: ""
1407
- }, ie.value, {
1408
- height: z.value,
1409
- onCheckboxChange: He,
1410
- onCheckboxAll: He,
1411
- 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
1412
1420
  }), {
1413
- default: j(() => [
1414
- n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (D(), Y(H, {
1421
+ default: T(() => [
1422
+ t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), B(N, {
1415
1423
  key: 0,
1416
1424
  type: "checkbox",
1417
- width: G(o) == "zh_cn" ? 80 : 150,
1418
- title: c.$t("xu-hao"),
1425
+ width: K(l) == "zh_cn" ? 80 : 150,
1426
+ title: d.$t("xu-hao"),
1419
1427
  fixed: "left"
1420
1428
  }, {
1421
- checkbox: j(({ rowIndex: $, row: B, checked: N, disabled: U, indeterminate: Z }) => [
1422
- oe("div", hn, [
1423
- 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, {
1424
1432
  key: 0,
1425
1433
  checked: !0,
1426
- disabled: U,
1434
+ disabled: P,
1427
1435
  size: "default",
1428
- onClick: ze((K) => !U && Ne(B), ["stop"])
1429
- }, null, 8, ["disabled", "onClick"])) : (D(), Y(F, {
1436
+ onClick: De((H) => !P && Ze(Y), ["stop"])
1437
+ }, null, 8, ["disabled", "onClick"])) : (L(), B(I, {
1430
1438
  key: 1,
1431
- disabled: U,
1439
+ disabled: P,
1432
1440
  checked: !1,
1433
1441
  size: "default",
1434
- onClick: ze((K) => !U && Ne(B), ["stop"])
1442
+ onClick: De((H) => !P && Ze(Y), ["stop"])
1435
1443
  }, null, 8, ["disabled", "onClick"])),
1436
- R(P, {
1444
+ V(j, {
1437
1445
  type: "info",
1438
1446
  class: "mgl5"
1439
1447
  }, {
1440
- default: j(() => [
1441
- se(le($ + 1), 1)
1448
+ default: T(() => [
1449
+ Q(J($ + 1), 1)
1442
1450
  ]),
1443
1451
  _: 2
1444
1452
  }, 1024)
1445
1453
  ])
1446
1454
  ]),
1447
1455
  _: 1
1448
- }, 8, ["width", "title"])) : fe("", !0),
1449
- re(c.$slots, "default", {}, void 0, !0)
1456
+ }, 8, ["width", "title"])) : ce("", !0),
1457
+ X(d.$slots, "default", {}, void 0, !0)
1450
1458
  ]),
1451
1459
  _: 3
1452
1460
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1453
1461
  ], 512),
1454
- n.searchForm.showPage ? (D(), Y(te, {
1462
+ t.searchForm.showPage ? (L(), B(le, {
1455
1463
  key: 1,
1456
- "current-page": b[G(C)],
1457
- "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)] = $),
1458
1466
  class: "myPagination mgt10",
1459
1467
  background: "",
1460
1468
  layout: "total, sizes, prev, pager, next",
1461
- total: b.total,
1462
- "page-size": b[G(v)],
1463
- "page-sizes": n.searchForm.pageSizes || G(r).pageSizes,
1464
- onCurrentChange: mt,
1465
- onSizeChange: pt
1466
- }, 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)
1467
1475
  ], 2);
1468
1476
  };
1469
1477
  }
1470
- }, qn = /* @__PURE__ */ we(gn, [["__scopeId", "data-v-d93cad32"]]), Bn = {
1478
+ }, Gn = /* @__PURE__ */ xe(vn, [["__scopeId", "data-v-d93cad32"]]), Wn = {
1471
1479
  __name: "index",
1472
1480
  props: {
1473
1481
  sheetsConfig: {
@@ -1479,44 +1487,243 @@ const hn = { class: "center" }, gn = {
1479
1487
  required: !0
1480
1488
  }
1481
1489
  },
1482
- setup(n) {
1483
- const e = n;
1484
- function t() {
1485
- Kt(e.fileName, e.sheetsConfig);
1490
+ setup(t) {
1491
+ const e = t;
1492
+ function n() {
1493
+ Gt(e.fileName, e.sheetsConfig);
1486
1494
  }
1487
- return (o, a) => {
1488
- const r = M("el-link");
1489
- return D(), Y(r, he({
1495
+ return (l, s) => {
1496
+ const o = F("el-link");
1497
+ return L(), B(o, he({
1490
1498
  type: "primary",
1491
1499
  underline: "never"
1492
- }, o.$attrs, { onClick: t }), {
1493
- default: j(() => [
1494
- 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)
1495
1503
  ]),
1496
1504
  _: 1
1497
1505
  }, 16);
1498
1506
  };
1499
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
+ }
1500
1518
  };
1501
- function Yn(n, e = {}) {
1502
- const t = je(), 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 = {
1503
1710
  inForm: !0,
1504
1711
  required: !0,
1505
1712
  ...e
1506
- }, a = {
1713
+ }, s = {
1507
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}$/,
1508
1715
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1509
1716
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1510
- }[n], { inForm: r, value: l, required: u, msg: d = t("validate.invalidInput") } = o;
1511
- return r ? function(k, x, C) {
1512
- if (u) {
1513
- 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));
1514
1721
  return;
1515
1722
  }
1516
- x && !a.test(x) ? C(new Error(d)) : C();
1517
- } : a.test(l);
1723
+ C && !s.test(C) ? w(new Error(c)) : w();
1724
+ } : s.test(a);
1518
1725
  }
1519
- class Kn {
1726
+ class Qn {
1520
1727
  constructor(e = {}) {
1521
1728
  this.config = {
1522
1729
  clientCode: e.clientCode || "one-portal",
@@ -1538,8 +1745,8 @@ class Kn {
1538
1745
  */
1539
1746
  init() {
1540
1747
  this.log("OnePortal CAS SDK 初始化中..."), this.loadFromStorage();
1541
- const t = new URLSearchParams(window.location.search).get("ticket");
1542
- 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());
1543
1750
  }
1544
1751
  /**
1545
1752
  * 从本地存储加载数据
@@ -1604,20 +1811,20 @@ class Kn {
1604
1811
  async validateTicket(e) {
1605
1812
  try {
1606
1813
  this.log("验证ST票据:", e);
1607
- const t = await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${e}`, {
1814
+ const n = await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${e}`, {
1608
1815
  method: "GET",
1609
1816
  headers: {
1610
1817
  "Content-Type": "application/json"
1611
1818
  }
1612
1819
  });
1613
- if (!t.ok)
1614
- throw new Error(`HTTP ${t.status}: ${t.statusText}`);
1615
- const o = await t.json();
1616
- if (o.success && o.data)
1617
- 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;
1618
- throw new Error(o.message || "ST票据验证失败");
1619
- } catch (t) {
1620
- 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;
1621
1828
  }
1622
1829
  }
1623
1830
  /**
@@ -1642,31 +1849,31 @@ class Kn {
1642
1849
  "Content-Type": "application/json"
1643
1850
  }
1644
1851
  });
1645
- } catch (t) {
1646
- this.log("调用服务端登出接口失败:", t);
1852
+ } catch (n) {
1853
+ this.log("调用服务端登出接口失败:", n);
1647
1854
  }
1648
1855
  this.token = null, this.user = null, this.clearStorage(), this.config.logoutCallback && this.config.logoutCallback(), e && this.login();
1649
- } catch (t) {
1650
- this.log("登出失败:", t), this.handleError(t);
1856
+ } catch (n) {
1857
+ this.log("登出失败:", n), this.handleError(n);
1651
1858
  }
1652
1859
  }
1653
1860
  /**
1654
1861
  * 发送带认证的HTTP请求
1655
1862
  */
1656
- async request(e, t = {}) {
1657
- const o = {
1863
+ async request(e, n = {}) {
1864
+ const l = {
1658
1865
  headers: {
1659
1866
  "Content-Type": "application/json",
1660
- ...t.headers
1867
+ ...n.headers
1661
1868
  },
1662
- ...t
1869
+ ...n
1663
1870
  };
1664
- 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}`);
1665
1872
  try {
1666
- const a = await fetch(e, o);
1667
- return a.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : a;
1668
- } catch (a) {
1669
- 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;
1670
1877
  }
1671
1878
  }
1672
1879
  /**
@@ -1676,9 +1883,9 @@ class Kn {
1676
1883
  try {
1677
1884
  const e = await this.request(`${this.config.casServerUrl}/auth/user`);
1678
1885
  if (e && e.ok) {
1679
- const t = await e.json();
1680
- if (t.success && t.data)
1681
- 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;
1682
1889
  }
1683
1890
  return null;
1684
1891
  } catch (e) {
@@ -1712,8 +1919,8 @@ class Kn {
1712
1919
  /**
1713
1920
  * 设置配置
1714
1921
  */
1715
- setConfig(e, t) {
1716
- this.config[e] = t;
1922
+ setConfig(e, n) {
1923
+ this.config[e] = n;
1717
1924
  }
1718
1925
  /**
1719
1926
  * 获取配置
@@ -1722,234 +1929,235 @@ class Kn {
1722
1929
  return this.config[e];
1723
1930
  }
1724
1931
  }
1725
- function Hn(n, e = {}) {
1726
- const o = Object.assign({
1932
+ function eo(t, e = {}) {
1933
+ const l = Object.assign({
1727
1934
  manual: !1,
1728
1935
  // 手动执行
1729
1936
  log: !1,
1730
1937
  params: null,
1731
1938
  format: null
1732
- }, e), { manual: a, log: r, params: l = {}, cb: u, format: d } = o, k = q([]), x = q(!1), C = (v) => {
1733
- const b = v || l;
1734
- x.value = !0, n(b).then((g) => {
1735
- const { code: f, data: h, msg: _ } = g;
1736
- if (u) {
1737
- const { records: w, rows: S } = h || {}, z = w || S ? w || S : h;
1738
- 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);
1739
1946
  }
1740
- if (h) {
1741
- if (h.records != null || h.rows != null) {
1742
- const { records: w, rows: S, total: z = 0 } = h || {};
1743
- 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);
1744
1951
  } else
1745
- k.value = Te(h, d);
1746
- r && console.log("useRequest-res", k.value);
1952
+ b.value = Te(m, c);
1953
+ o && console.log("useRequest-res", b.value);
1747
1954
  }
1748
- }).catch((g) => {
1749
- u && (console.log("useRequestErr", g), u({ code: 500 }));
1955
+ }).catch((h) => {
1956
+ r && (console.log("useRequestErr", h), r({ code: 500 }));
1750
1957
  }).finally(() => {
1751
- x.value = !1;
1958
+ C.value = !1;
1752
1959
  });
1753
1960
  };
1754
- return a || C(), [x, k, C];
1961
+ return s || w(), [C, b, w];
1755
1962
  }
1756
- function Nn(n) {
1757
- const e = q(n), t = q(""), o = q("");
1758
- return Pe(e, (a) => {
1759
- const r = a || ["", ""];
1760
- t.value = r[0], o.value = r[1];
1761
- }), [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];
1762
1969
  }
1763
- function Zn(n) {
1764
- 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();
1765
1972
  }
1766
- function Te(n, e) {
1973
+ function Te(t, e) {
1767
1974
  if (!e)
1768
- return n;
1769
- if (n instanceof Array)
1770
- return n.map((o) => {
1771
- let a = {};
1772
- 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;
1773
1980
  });
1774
- let t = {};
1775
- return e.forEach((o) => t[o] = n[o]), t;
1981
+ let n = {};
1982
+ return e.forEach((l) => n[l] = t[l]), n;
1776
1983
  }
1777
- function Gn(n, e = []) {
1778
- const { locale: t } = ve(), o = q(n());
1779
- return Pe(
1780
- [t, ...e],
1984
+ function oo(t, e = []) {
1985
+ const { locale: n } = me(), l = R(t());
1986
+ return Ae(
1987
+ [n, ...e],
1781
1988
  () => {
1782
- o.value = n();
1989
+ l.value = t();
1783
1990
  },
1784
1991
  { immediate: !0 }
1785
- ), o;
1992
+ ), l;
1786
1993
  }
1787
- function Wn(n, e = "zh_cn", t = "en_us") {
1788
- if (!n)
1994
+ function lo(t, e = "zh_cn", n = "en_us") {
1995
+ if (!t)
1789
1996
  return "-";
1790
- const o = { en_us: t, zh_cn: e }, r = Re().global.locale.value;
1791
- 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] || "-";
1792
1999
  }
1793
- function Jn(n, e) {
1794
- let t = Vt;
1795
- return typeof n == "string" && n.length > 0 && (t = Ue(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);
1796
2003
  }
1797
- function Qn(n, e) {
1798
- let t = Mt;
1799
- return typeof n == "string" && n.length > 0 && (t = Ue(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);
1800
2007
  }
1801
- function Xn(n, e) {
1802
- let t = At;
1803
- return typeof n == "string" && n.length > 0 && (t = Ue(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);
1804
2011
  }
1805
- function ht(n, e) {
1806
- const t = at(), o = e(n), a = {};
1807
- return Object.keys(o).forEach((r) => {
1808
- const l = o[r].bind({ $store: t });
1809
- a[r] = ne(l);
1810
- }), 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;
1811
2018
  }
1812
- function mn(n, e) {
1813
- const t = at(), o = e(n), a = {};
1814
- return Object.keys(o).forEach((r) => {
1815
- a[r] = o[r].bind({ $store: t });
1816
- }), 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;
1817
2024
  }
1818
- function Ee(n) {
1819
- 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);
1820
2027
  }
1821
- function eo() {
1822
- Ce.renderer.add("Enum", {
2028
+ function io() {
2029
+ we.renderer.add("Enum", {
1823
2030
  // 默认显示模板
1824
- renderTableDefault(n, e) {
1825
- let t;
2031
+ renderTableDefault(t, e) {
2032
+ let n;
1826
2033
  if ([null, void 0].includes(e.row[e.column.field]))
1827
2034
  return "-";
1828
- const o = e.row[e.column.field];
1829
- if (n.type == "tag") {
1830
- let a;
1831
- return R(M("el-text"), {
1832
- type: n.enum.getTag(o)
1833
- }, Ee(a = n.enum.getName(o)) ? a : {
1834
- 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]
1835
2042
  });
1836
2043
  }
1837
- return R(M("el-text"), null, Ee(t = n.enum.getName(o)) ? t : {
1838
- default: () => [t]
2044
+ return V(F("el-text"), null, Fe(n = t.enum.getName(l)) ? n : {
2045
+ default: () => [n]
1839
2046
  });
1840
2047
  }
1841
- }), Ce.renderer.add("InputNumber", {
2048
+ }), we.renderer.add("InputNumber", {
1842
2049
  // 默认显示模板
1843
- renderTableDefault(n, e) {
1844
- return R(xt, he({
2050
+ renderTableDefault(t, e) {
2051
+ return V(St, he({
1845
2052
  modelValue: e.row[e.column.field],
1846
- "onUpdate:modelValue": (t) => e.row[e.column.field] = t
1847
- }, n.props, {
2053
+ "onUpdate:modelValue": (n) => e.row[e.column.field] = n
2054
+ }, t.props, {
1848
2055
  "step-strictly": !0,
1849
2056
  "value-on-clear": 0
1850
2057
  }), null);
1851
2058
  }
1852
- }), Ce.renderer.add("TrueFalse", {
2059
+ }), we.renderer.add("TrueFalse", {
1853
2060
  // 默认显示模板
1854
- renderTableDefault(n, e) {
2061
+ renderTableDefault(t, e) {
1855
2062
  const {
1856
- locale: t
1857
- } = ve();
1858
- let o = t.value == "zh_cn";
1859
- return R(wt, {
2063
+ locale: n
2064
+ } = me();
2065
+ let l = n.value == "zh_cn";
2066
+ return V($t, {
1860
2067
  type: e.row[e.column.field] ? "success" : "danger"
1861
2068
  }, {
1862
- default: () => [e.row[e.column.field] ? o ? "是" : "YES" : o ? "否" : "NO"]
2069
+ default: () => [e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"]
1863
2070
  });
1864
2071
  }
1865
- }), Ce.renderer.add("I18n", {
2072
+ }), we.renderer.add("I18n", {
1866
2073
  // 默认显示模板
1867
- renderTableDefault(n, e) {
2074
+ renderTableDefault(t, e) {
1868
2075
  const {
1869
- locale: t
1870
- } = ve();
1871
- let o = t.value == "zh_cn" ? e.column.field : n.fieldEn;
1872
- 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];
1873
2080
  }
1874
- }), Ce.renderer.add("Link", {
2081
+ }), we.renderer.add("Link", {
1875
2082
  // 默认显示模板
1876
- renderTableDefault(n, e) {
1877
- var u;
1878
- let t = e.column.field;
1879
- const o = Ot(), {
1880
- multiple: a,
1881
- to: r
1882
- } = n;
1883
- if (!a)
1884
- return R(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, {
1885
2092
  underline: "never",
1886
2093
  type: "primary",
1887
- onclick: () => o.push({
1888
- path: r,
2094
+ onclick: () => l.push({
2095
+ path: o,
1889
2096
  query: {
1890
- [t]: e.row[t]
2097
+ [n]: e.row[n]
1891
2098
  }
1892
2099
  })
1893
2100
  }, {
1894
- default: () => [e.row[t]]
2101
+ default: () => [e.row[n]]
1895
2102
  });
1896
- const l = ((u = e.row[t]) == null ? void 0 : u.split(",")) || [];
1897
- return l.map((d, k) => R("span", null, [R(Ze, {
2103
+ const a = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
2104
+ return a.map((c, b) => V("span", null, [V(Ge, {
1898
2105
  underline: "never",
1899
2106
  type: "primary",
1900
- onclick: () => o.push({
1901
- path: r,
2107
+ onclick: () => l.push({
2108
+ path: o,
1902
2109
  query: {
1903
- [t]: d
2110
+ [n]: c
1904
2111
  }
1905
2112
  })
1906
- }, Ee(d) ? d : {
1907
- default: () => [d]
1908
- }), k < l.length - 1 ? "," : ""]));
2113
+ }, Fe(c) ? c : {
2114
+ default: () => [c]
2115
+ }), b < a.length - 1 ? "," : ""]));
1909
2116
  }
1910
2117
  });
1911
2118
  }
1912
2119
  export {
1913
- en as CmpDictionary,
1914
- dt as CmpIcon,
1915
- Pn as ConfrimButton,
1916
- Bn as DownExcelTemp,
1917
- Un as ImportButton,
1918
- $n as LayOutForm,
1919
- qn as ListPage,
1920
- Kn as OnePortalCasSDK,
1921
- dn as SearchBar,
1922
- Je as StatusMap,
1923
- Ln as _toRaw,
1924
- Zn as _typeOf,
1925
- En as arrToStatusMap,
1926
- Tn as arrayToTree,
1927
- On as checkFileSize,
1928
- Yn as creatValidator,
1929
- Mn as createImportFields,
1930
- 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,
1931
2139
  Me as en_us,
1932
- Kt as exportExcel,
1933
- Re as getI18n,
1934
- je as getI18nT,
1935
- fn as getListPageConfig,
1936
- Wn as getLocaleValue,
1937
- An as getValueBykey,
1938
- In as importExcel,
1939
- qt as messages,
1940
- eo as registerVxeRenderers,
1941
- jn as resetListPageConfig,
1942
- Rn as setListPageConfig,
1943
- Bt as setupI18n,
1944
- Fn as sleep,
1945
- ut as stringToArray,
1946
- Dn as stripHtmlTags,
1947
- zn as unicode2Str,
1948
- Xn as useActions,
1949
- Nn as useDatePicker,
1950
- Qn as useGetters,
1951
- Gn as useI18nReState,
1952
- Hn as useRequest,
1953
- Jn as useState,
2140
+ Gt as exportExcel,
2141
+ Pe as getI18n,
2142
+ Re as getI18nT,
2143
+ pn as getListPageConfig,
2144
+ lo as getLocaleValue,
2145
+ Yn as getValueBykey,
2146
+ On as importExcel,
2147
+ Ht as messages,
2148
+ io as registerVxeRenderers,
2149
+ Zn as resetListPageConfig,
2150
+ Nn as setListPageConfig,
2151
+ Nt as setupI18n,
2152
+ Vn as sleep,
2153
+ ht as stringToArray,
2154
+ Un as stripHtmlTags,
2155
+ jn as unicode2Str,
2156
+ ro as useActions,
2157
+ to as useDatePicker,
2158
+ so as useGetters,
2159
+ oo as useI18nReState,
2160
+ eo as useRequest,
2161
+ ao as useState,
1954
2162
  Ve as zh_cn
1955
2163
  };