joy-admin-components 0.2.35 → 0.2.37

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,7 +1,7 @@
1
1
  import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as It, ElText as Lt, ElLink as Je } from "element-plus";
2
- import { defineComponent as ot, ref as U, onMounted as lt, h as De, mergeModels as Xe, useAttrs as Ft, useModel as Tt, computed as ce, watch as Re, resolveComponent as M, unref as K, openBlock as F, createBlock as H, mergeProps as ge, createSlots as at, withCtx as D, createElementVNode as re, toDisplayString as Q, renderSlot as te, createVNode as O, createTextVNode as ne, createCommentVNode as de, createElementBlock as ie, Fragment as Me, renderList as st, withModifiers as Ve, nextTick as we, resolveDynamicComponent as rt, withKeys as Dt, normalizeStyle as zt, normalizeClass as qe, reactive as Ie, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
2
+ import { defineComponent as ot, ref as U, onMounted as lt, h as ze, mergeModels as Xe, useAttrs as Ft, useModel as Tt, computed as ce, watch as Re, resolveComponent as M, unref as K, openBlock as F, createBlock as H, mergeProps as ge, createSlots as at, withCtx as D, createElementVNode as re, toDisplayString as Q, renderSlot as te, createVNode as O, createTextVNode as ne, createCommentVNode as de, createElementBlock as ie, Fragment as Me, renderList as st, withModifiers as Ve, nextTick as we, resolveDynamicComponent as rt, withKeys as Dt, normalizeStyle as zt, normalizeClass as qe, reactive as Ie, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
3
3
  import { saveAs as it } from "file-saver";
4
- import Le from "exceljs";
4
+ import Fe from "exceljs";
5
5
  import $e from "dayjs";
6
6
  import { createI18n as At, useI18n as pe } from "vue-i18n";
7
7
  import { debounce as Be, cloneDeep as ct, isArray as Qe } from "lodash";
@@ -10,11 +10,11 @@ import { createNamespacedHelpers as Ye, useStore as ut, mapState as Pt, mapGette
10
10
  import { VxeUI as ke } from "vxe-pc-ui";
11
11
  const Vn = ot({
12
12
  name: "LayOutForm",
13
- setup(t, { slots: e, attrs: n, emit: a }) {
14
- const s = U(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(
13
+ setup(e, { slots: t, attrs: n, emit: a }) {
14
+ const s = U(null), o = () => t.default ? t.default().filter((r) => r.type !== Symbol.for("v-cmt")).map((r) => r.type === Symbol.for("v-fgt") ? r.children : r).flat().map(
15
15
  (r) => {
16
16
  var i;
17
- return De(
17
+ return ze(
18
18
  St,
19
19
  { span: ((i = r.props) == null ? void 0 : i.span) || 24 },
20
20
  {
@@ -27,23 +27,23 @@ const Vn = ot({
27
27
  a("ref", s.value);
28
28
  });
29
29
  function l() {
30
- return De(
30
+ return ze(
31
31
  _t,
32
32
  { ...n, ref: s },
33
- () => De($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
33
+ () => ze($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
34
34
  );
35
35
  }
36
36
  return l;
37
37
  }
38
38
  });
39
39
  var dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
40
- function ft(t) {
41
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
40
+ function ft(e) {
41
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
42
42
  }
43
43
  var ht = { exports: {} };
44
- (function(t, e) {
44
+ (function(e, t) {
45
45
  (function(n, a) {
46
- t.exports = a();
46
+ e.exports = a();
47
47
  })(dt, function() {
48
48
  var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
49
49
  return function(o, l, r) {
@@ -57,23 +57,23 @@ var ht = { exports: {} };
57
57
  }, i.local = function() {
58
58
  return r(this.toDate(), { locale: this.$L, utc: !1 });
59
59
  };
60
- var p = i.parse;
60
+ var y = i.parse;
61
61
  i.parse = function(c) {
62
- c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), p.call(this, c);
62
+ c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), y.call(this, c);
63
63
  };
64
- var b = i.init;
64
+ var p = i.init;
65
65
  i.init = function() {
66
66
  if (this.$u) {
67
67
  var c = this.$d;
68
68
  this.$y = c.getUTCFullYear(), this.$M = c.getUTCMonth(), this.$D = c.getUTCDate(), this.$W = c.getUTCDay(), this.$H = c.getUTCHours(), this.$m = c.getUTCMinutes(), this.$s = c.getUTCSeconds(), this.$ms = c.getUTCMilliseconds();
69
69
  } else
70
- b.call(this);
70
+ p.call(this);
71
71
  };
72
- var y = i.utcOffset;
72
+ var v = i.utcOffset;
73
73
  i.utcOffset = function(c, h) {
74
74
  var x = this.$utils().u;
75
75
  if (x(c))
76
- return this.$u ? 0 : x(this.$offset) ? y.call(this) : this.$offset;
76
+ return this.$u ? 0 : x(this.$offset) ? v.call(this) : this.$offset;
77
77
  if (typeof c == "string" && (c = function(V) {
78
78
  V === void 0 && (V = "");
79
79
  var B = V.match(a);
@@ -123,9 +123,9 @@ var ht = { exports: {} };
123
123
  var Yt = ht.exports;
124
124
  const Kt = /* @__PURE__ */ ft(Yt);
125
125
  var mt = { exports: {} };
126
- (function(t, e) {
126
+ (function(e, t) {
127
127
  (function(n, a) {
128
- t.exports = a();
128
+ e.exports = a();
129
129
  })(dt, function() {
130
130
  var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
131
131
  return function(s, o, l) {
@@ -137,15 +137,15 @@ var mt = { exports: {} };
137
137
  return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: x, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[E] = V), V;
138
138
  }(m, f);
139
139
  return h.formatToParts(c);
140
- }, p = function(g, m) {
140
+ }, y = function(g, m) {
141
141
  for (var f = i(g, m), c = [], h = 0; h < f.length; h += 1) {
142
142
  var x = f[h], k = x.type, C = x.value, E = n[k];
143
143
  E >= 0 && (c[E] = parseInt(C, 10));
144
144
  }
145
145
  var V = c[3], B = V === 24 ? 0 : V, I = c[0] + "-" + c[1] + "-" + c[2] + " " + B + ":" + c[4] + ":" + c[5] + ":000", $ = +g;
146
146
  return (l.utc(I).valueOf() - ($ -= $ % 1e3)) / 6e4;
147
- }, b = o.prototype;
148
- b.tz = function(g, m) {
147
+ }, p = o.prototype;
148
+ p.tz = function(g, m) {
149
149
  g === void 0 && (g = r);
150
150
  var f, c = this.utcOffset(), h = this.toDate(), x = h.toLocaleString("en-US", { timeZone: g }), k = Math.round((h - new Date(x)) / 1e3 / 60), C = 15 * -Math.round(h.getTimezoneOffset() / 15) - k;
151
151
  if (!Number(C))
@@ -155,28 +155,28 @@ var mt = { exports: {} };
155
155
  f = f.add(c - E, "minute");
156
156
  }
157
157
  return f.$x.$timezone = g, f;
158
- }, b.offsetName = function(g) {
158
+ }, p.offsetName = function(g) {
159
159
  var m = this.$x.$timezone || l.tz.guess(), f = i(this.valueOf(), m, { timeZoneName: g }).find(function(c) {
160
160
  return c.type.toLowerCase() === "timezonename";
161
161
  });
162
162
  return f && f.value;
163
163
  };
164
- var y = b.startOf;
165
- b.startOf = function(g, m) {
164
+ var v = p.startOf;
165
+ p.startOf = function(g, m) {
166
166
  if (!this.$x || !this.$x.$timezone)
167
- return y.call(this, g, m);
167
+ return v.call(this, g, m);
168
168
  var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
- return y.call(f, g, m).tz(this.$x.$timezone, !0);
169
+ return v.call(f, g, m).tz(this.$x.$timezone, !0);
170
170
  }, l.tz = function(g, m, f) {
171
- var c = f && m, h = f || m || r, x = p(+l(), h);
171
+ var c = f && m, h = f || m || r, x = y(+l(), h);
172
172
  if (typeof g != "string")
173
173
  return l(g).tz(h);
174
174
  var k = function(B, I, $) {
175
- var W = B - 60 * I * 1e3, v = p(W, $);
176
- if (I === v)
175
+ var W = B - 60 * I * 1e3, b = y(W, $);
176
+ if (I === b)
177
177
  return [W, I];
178
- var w = p(W -= 60 * (v - I) * 1e3, $);
179
- return v === w ? [W, v] : [B - 60 * Math.min(v, w) * 1e3, Math.max(v, w)];
178
+ var w = y(W -= 60 * (b - I) * 1e3, $);
179
+ return b === w ? [W, b] : [B - 60 * Math.min(b, w) * 1e3, Math.max(b, w)];
180
180
  }(l.utc(g, c).valueOf(), x, h), C = k[0], E = k[1], V = l(C).utcOffset(E);
181
181
  return V.$x.$timezone = h, V;
182
182
  }, l.tz.guess = function() {
@@ -263,10 +263,10 @@ const Nt = /* @__PURE__ */ ft(Ht), Ae = {
263
263
  en_us: je
264
264
  };
265
265
  let be = null;
266
- function Zt(t = null) {
267
- if (t) {
268
- const { global: e } = t;
269
- return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", Ae) : e.setLocaleMessage("zh_cn", Ae), e.messages.value.en_us ? e.mergeLocaleMessage("en_us", je) : e.setLocaleMessage("en_us", je), be = t, t;
266
+ function Zt(e = null) {
267
+ if (e) {
268
+ const { global: t } = e;
269
+ return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn", Ae) : t.setLocaleMessage("zh_cn", Ae), t.messages.value.en_us ? t.mergeLocaleMessage("en_us", je) : t.setLocaleMessage("en_us", je), be = e, e;
270
270
  }
271
271
  return be || (be = At({
272
272
  legacy: !1,
@@ -283,24 +283,24 @@ function Ce() {
283
283
  }
284
284
  $e.extend(Kt);
285
285
  $e.extend(Nt);
286
- async function qn(t, e) {
287
- const { fields: n, range: a = 1 } = e;
286
+ async function qn(e, t) {
287
+ const { fields: n, range: a = 1 } = t;
288
288
  if (!n) {
289
289
  const l = Ce();
290
290
  throw new Error(l("excel.fieldsMappingRequired"));
291
291
  }
292
- let s = new Le.Workbook();
293
- await s.xlsx.load(t);
292
+ let s = new Fe.Workbook();
293
+ await s.xlsx.load(e);
294
294
  const o = {};
295
295
  return s.eachSheet(function(l, r) {
296
296
  const i = [];
297
- l.eachRow(function(p, b) {
298
- if (b > a) {
299
- let y = {}, g = !0;
297
+ l.eachRow(function(y, p) {
298
+ if (p > a) {
299
+ let v = {}, g = !0;
300
300
  Object.keys(n).forEach((m) => {
301
- const f = p.getCell(n[m]).value;
302
- y[m] = f, f && (g = !1);
303
- }), g || i.push(y);
301
+ const f = y.getCell(n[m]).value;
302
+ v[m] = f, f && (g = !1);
303
+ }), g || i.push(v);
304
304
  }
305
305
  }), o[l._name] = i;
306
306
  }), s = null, o;
@@ -308,51 +308,51 @@ async function qn(t, e) {
308
308
  const gt = {
309
309
  columnWidth: 30
310
310
  };
311
- async function An(t, e, n = [], a = {}) {
312
- if (!t || !e)
311
+ async function An(e, t, n = [], a = {}) {
312
+ if (!e || !t)
313
313
  return;
314
314
  const { columnStyle: s } = a, { columnWidth: o } = gt;
315
- e.forEach((i) => {
315
+ t.forEach((i) => {
316
316
  i.width = i.width ? i.width : o;
317
317
  });
318
318
  const { workbook: l, worksheet: r } = Gt();
319
- r.columns = e, r.addRows(n), s && await Jt(l, r, s);
319
+ r.columns = t, r.addRows(n), s && await Jt(l, r, s);
320
320
  try {
321
- const i = await l.xlsx.writeBuffer(), p = new File([i], t, {
321
+ const i = await l.xlsx.writeBuffer(), y = new File([i], e, {
322
322
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
323
323
  });
324
- it(p);
324
+ it(y);
325
325
  } catch (i) {
326
326
  console.log(i);
327
327
  }
328
328
  }
329
329
  function Gt() {
330
- const t = new Le.Workbook();
331
- t.creator = "distributor System", t.lastModifiedBy = "distributor System", t.created = /* @__PURE__ */ new Date(), t.modified = /* @__PURE__ */ new Date(), t.lastPrinted = /* @__PURE__ */ new Date();
332
- const e = t.addWorksheet("Sheet1");
333
- return { workbook: t, worksheet: e };
330
+ const e = new Fe.Workbook();
331
+ e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date();
332
+ const t = e.addWorksheet("Sheet1");
333
+ return { workbook: e, worksheet: t };
334
334
  }
335
- async function Jt(t, e, n) {
335
+ async function Jt(e, t, n) {
336
336
  const a = Object.keys(n);
337
337
  for (const s of a) {
338
338
  const o = n[s], { type: l } = o;
339
339
  switch (l) {
340
340
  case "IMG":
341
- await Xt(t, e, s);
341
+ await Xt(e, t, s);
342
342
  break;
343
343
  }
344
344
  }
345
345
  }
346
- async function Xt(t, e, n, a) {
347
- const s = e.getColumn(n), o = s.values;
348
- e.getColumn(n).width = 20, e.eachRow((l, r) => {
346
+ async function Xt(e, t, n, a) {
347
+ const s = t.getColumn(n), o = s.values;
348
+ t.getColumn(n).width = 20, t.eachRow((l, r) => {
349
349
  r > 1 && (l.height = 40);
350
350
  });
351
351
  for (let l = 0, r = o.length; l < r; l++) {
352
352
  if (l < 2)
353
353
  continue;
354
354
  let i = o[l];
355
- i && (e.getCell(s.letter + l).value = "", await Qt(t, e, i, {
355
+ i && (t.getCell(s.letter + l).value = "", await Qt(e, t, i, {
356
356
  width: 100,
357
357
  height: 50,
358
358
  col: s._number - 1,
@@ -360,28 +360,28 @@ async function Xt(t, e, n, a) {
360
360
  }));
361
361
  }
362
362
  }
363
- async function Qt(t, e, n, a) {
364
- const { col: s, row: o, width: l, height: r } = a, { success: i, base64: p } = await en(n, 0.3);
363
+ async function Qt(e, t, n, a) {
364
+ const { col: s, row: o, width: l, height: r } = a, { success: i, base64: y } = await en(n, 0.3);
365
365
  if (i) {
366
- const b = t.addImage({
367
- base64: p,
366
+ const p = e.addImage({
367
+ base64: y,
368
368
  extension: "jpeg"
369
369
  });
370
- e.addImage(b, {
370
+ t.addImage(p, {
371
371
  tl: { col: s, row: o },
372
372
  ext: { width: l, height: r }
373
373
  });
374
374
  }
375
375
  }
376
- function en(t, e = 1) {
376
+ function en(e, t = 1) {
377
377
  const n = new Image();
378
- return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a, s) => {
378
+ return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((a, s) => {
379
379
  n.onload = () => {
380
380
  const o = document.createElement("canvas");
381
381
  o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), a({
382
382
  success: !0,
383
383
  //canvas.toDataURL的方法将图片的绝对路径转换为base64编码
384
- base64: o.toDataURL("image/jpeg", e)
384
+ base64: o.toDataURL("image/jpeg", t)
385
385
  });
386
386
  }, n.onerror = () => {
387
387
  a({ success: !1 });
@@ -389,37 +389,37 @@ function en(t, e = 1) {
389
389
  });
390
390
  }
391
391
  const Ue = "---";
392
- async function tn(t, e) {
393
- const { fields: n, range: a = 1 } = e;
392
+ async function tn(e, t) {
393
+ const { fields: n, range: a = 1 } = t;
394
394
  if (!n) {
395
395
  const l = Ce();
396
396
  throw new Error(l("excel.fieldsMappingRequired"));
397
397
  }
398
- let s = new Le.Workbook();
399
- await s.xlsx.load(t);
398
+ let s = new Fe.Workbook();
399
+ await s.xlsx.load(e);
400
400
  const o = {};
401
401
  return s.eachSheet(function(l, r) {
402
402
  if (l.state == "visible") {
403
- const i = [], p = n[l._name];
404
- if (p) {
405
- let b = Object.values(p).some((g) => g.includes("image")), y = {};
406
- b && (l.getImages().forEach((m) => {
403
+ const i = [], y = n[l._name];
404
+ if (y) {
405
+ let p = Object.values(y).some((g) => g.includes("image")), v = {};
406
+ p && (l.getImages().forEach((m) => {
407
407
  const { tl: f } = m.range, c = s.model.media.find((h) => h.index === m.imageId);
408
408
  if (c) {
409
409
  const h = c.buffer.toString("base64"), x = `data:image/${c.extension};base64,${h}`, k = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
410
- y[k] ? y[k].push(x) : y[k] = [x];
410
+ v[k] ? v[k].push(x) : v[k] = [x];
411
411
  }
412
- }), console.log("withImages-imageMap", y)), l.eachRow(function(g, m) {
412
+ }), console.log("withImages-imageMap", v)), l.eachRow(function(g, m) {
413
413
  if (m > a) {
414
414
  let f = {}, c = !0;
415
- Object.keys(p).forEach((h) => {
415
+ Object.keys(y).forEach((h) => {
416
416
  var V;
417
- let [x, k] = p[h].split(Ue);
417
+ let [x, k] = y[h].split(Ue);
418
418
  const C = g.getCell(x);
419
419
  let E;
420
- if (k == "image" && b) {
420
+ if (k == "image" && p) {
421
421
  const B = C._column._number, I = `${m}_${B}`;
422
- E = y[I] || "";
422
+ E = v[I] || "";
423
423
  } else
424
424
  C.result != null ? E = C.result : (V = C.value) != null && V.richText ? E = C.value.richText.reduce((B, I) => B + I.text, "") : C.type == 4 && C.value ? E = $e(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : E = C.value;
425
425
  E && k == "option" && (E = E.split(Ue)[1]), f[h] = E, E && (c = !1);
@@ -430,19 +430,19 @@ async function tn(t, e) {
430
430
  }
431
431
  }), s = null, o;
432
432
  }
433
- async function nn(t, e) {
434
- if (!t || e.length == 0)
433
+ async function nn(e, t) {
434
+ if (!e || t.length == 0)
435
435
  return;
436
- const n = on(e);
436
+ const n = on(t);
437
437
  n.eachSheet(function(a, s) {
438
- const { columnWidth: o } = gt, { tableHeader: l, tableData: r } = e[a._name];
438
+ const { columnWidth: o } = gt, { tableHeader: l, tableData: r } = t[a._name];
439
439
  l.forEach((i) => {
440
440
  if (i.required) {
441
- const p = i.style || {}, { font: b = {} } = p;
441
+ const y = i.style || {}, { font: p = {} } = y;
442
442
  i.style = {
443
- ...p,
443
+ ...y,
444
444
  font: {
445
- ...b,
445
+ ...p,
446
446
  color: {
447
447
  argb: "FFFF0000"
448
448
  }
@@ -450,15 +450,15 @@ async function nn(t, e) {
450
450
  };
451
451
  }
452
452
  }), a.columns = l, a.addRows(r), l.forEach((i) => {
453
- const { header: p, key: b, width: y, option: g } = i, m = a.getColumn(b);
454
- if (m.width = y || o, g) {
455
- const f = n.addWorksheet(b);
453
+ const { header: y, key: p, width: v, option: g } = i, m = a.getColumn(p);
454
+ if (m.width = v || o, g) {
455
+ const f = n.addWorksheet(p);
456
456
  f.state = "hidden", f.getColumn(1).values = g.map((c) => `${c.label}${Ue}${c.value}`), Array(100).fill("").forEach((c, h) => {
457
457
  if (h > 0) {
458
458
  const x = Ce();
459
459
  a.getCell(`${m.letter}${h}`).dataValidation = {
460
460
  type: "list",
461
- formulae: [`${b}!$A$1:$A$${g.length}`],
461
+ formulae: [`${p}!$A$1:$A$${g.length}`],
462
462
  showErrorMessage: !0,
463
463
  error: x("excel.invalidInput"),
464
464
  errorStyle: "stop",
@@ -470,7 +470,7 @@ async function nn(t, e) {
470
470
  });
471
471
  });
472
472
  try {
473
- const a = await n.xlsx.writeBuffer(), s = new File([a], t, {
473
+ const a = await n.xlsx.writeBuffer(), s = new File([a], e, {
474
474
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
475
475
  });
476
476
  it(s);
@@ -478,127 +478,127 @@ async function nn(t, e) {
478
478
  console.log(a);
479
479
  }
480
480
  }
481
- function on(t) {
482
- const e = Ce(), n = new Le.Workbook();
483
- return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(t).sort((s, o) => {
484
- const l = t[s].sort ?? 0, r = t[o].sort ?? 0;
481
+ function on(e) {
482
+ const t = Ce(), n = new Fe.Workbook();
483
+ return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((s, o) => {
484
+ const l = e[s].sort ?? 0, r = e[o].sort ?? 0;
485
485
  return l - r;
486
486
  }).forEach((s) => {
487
487
  let o = s, l = !1;
488
- /[\\/:*?\[\]]/g.test(s) && (s = s.replace(/[\\/:*?\[\]]/g, ""), l = !0), s.length > 31 && (s = s.substring(0, 31).trim(), l = !0, console.warn(e("excel.sheetNameTooLong", [o, s]))), l && (t[s] = t[o], delete t[o]), n.addWorksheet(s);
488
+ /[\\/:*?\[\]]/g.test(s) && (s = s.replace(/[\\/:*?\[\]]/g, ""), l = !0), s.length > 31 && (s = s.substring(0, 31).trim(), l = !0, console.warn(t("excel.sheetNameTooLong", [o, s]))), l && (e[s] = e[o], delete e[o]), n.addWorksheet(s);
489
489
  }), n;
490
490
  }
491
- function ln(t) {
492
- if (t < 26)
493
- return String.fromCharCode(65 + t);
491
+ function ln(e) {
492
+ if (e < 26)
493
+ return String.fromCharCode(65 + e);
494
494
  {
495
- const e = String.fromCharCode(65 + Math.floor((t - 26) / 26)), n = String.fromCharCode(65 + (t - 26) % 26);
496
- return e + n;
495
+ const t = String.fromCharCode(65 + Math.floor((e - 26) / 26)), n = String.fromCharCode(65 + (e - 26) % 26);
496
+ return t + n;
497
497
  }
498
498
  }
499
- function jn(t) {
500
- return new Promise((e) => {
499
+ function jn(e) {
500
+ return new Promise((t) => {
501
501
  setTimeout(() => {
502
- e();
503
- }, t);
502
+ t();
503
+ }, e);
504
504
  });
505
505
  }
506
- function Un(t) {
507
- return JSON.parse(JSON.stringify(t));
506
+ function Un(e) {
507
+ return JSON.parse(JSON.stringify(e));
508
508
  }
509
- function Pn(t) {
510
- let e = [], n = {}, a = (s, o) => Object.prototype.hasOwnProperty.call(s, o);
511
- for (const s of t) {
509
+ function Pn(e) {
510
+ let t = [], n = {}, a = (s, o) => Object.prototype.hasOwnProperty.call(s, o);
511
+ for (const s of e) {
512
512
  n[s.id] = {
513
513
  ...s,
514
514
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
515
515
  children: a(n, s.id) ? n[s.id].children : []
516
516
  };
517
517
  const o = n[s.id];
518
- s.pid == -1 ? e.push(o) : (a(n, s.pid) || (n[s.pid] = {
518
+ s.pid == -1 ? t.push(o) : (a(n, s.pid) || (n[s.pid] = {
519
519
  children: []
520
520
  }), n[s.pid].children.push(o));
521
521
  }
522
- return e;
522
+ return t;
523
523
  }
524
- function pt(t, e = " ") {
525
- return t ? t.split(e).filter((n) => n.trim()) : [];
524
+ function pt(e, t = " ") {
525
+ return e ? e.split(t).filter((n) => n.trim()) : [];
526
526
  }
527
527
  class et {
528
- constructor(e, n = ["label", "value", "labelEn"]) {
529
- this.list = e.map((a) => ({
528
+ constructor(t, n = ["label", "value", "labelEn"]) {
529
+ this.list = t.map((a) => ({
530
530
  ...a,
531
531
  label: a[n[0]],
532
532
  labelEn: a[n[2]] ?? a[n[0]] ?? "",
533
533
  value: a[n[1]]
534
534
  })), this.map = new Map(this.list.map((a) => [a[n[1]], a]));
535
535
  }
536
- getName(e) {
537
- if (!this.has(e))
536
+ getName(t) {
537
+ if (!this.has(t))
538
538
  return "-";
539
- const n = Ke().global.locale, { label: a, labelEn: s } = this.map.get(e);
539
+ const n = Ke().global.locale, { label: a, labelEn: s } = this.map.get(t);
540
540
  return (n.value == "zh_cn" ? a : s) ?? a ?? "-";
541
541
  }
542
- getTag(e) {
543
- if (!this.has(e))
542
+ getTag(t) {
543
+ if (!this.has(t))
544
544
  return "info";
545
- const { tag: n = "info" } = this.map.get(e);
545
+ const { tag: n = "info" } = this.map.get(t);
546
546
  return n;
547
547
  }
548
- getItem(e) {
549
- return this.has(e) ? this.map.get(e) : null;
548
+ getItem(t) {
549
+ return this.has(t) ? this.map.get(t) : null;
550
550
  }
551
- getColor(e) {
552
- if (!this.has(e))
551
+ getColor(t) {
552
+ if (!this.has(t))
553
553
  return null;
554
- const { color: n } = this.map.get(e);
554
+ const { color: n } = this.map.get(t);
555
555
  return n;
556
556
  }
557
- has(e) {
558
- return this.map.has(e);
557
+ has(t) {
558
+ return this.map.has(t);
559
559
  }
560
560
  }
561
- function Rn(t, e = [], n = "i18nName") {
562
- if (t.length == 0)
561
+ function Rn(e, t = [], n = "i18nName") {
562
+ if (e.length == 0)
563
563
  return new et([]);
564
- if (e.length < 2) {
564
+ if (t.length < 2) {
565
565
  const s = Ce();
566
566
  throw new Error(s("tools.keysLengthError"));
567
567
  }
568
- let a = t.map((s) => {
568
+ let a = e.map((s) => {
569
569
  let o = {};
570
- return n && (o.labelEn = s[n]), e.forEach((l, r) => {
570
+ return n && (o.labelEn = s[n]), t.forEach((l, r) => {
571
571
  r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
572
572
  }), o;
573
573
  });
574
574
  return new et(a);
575
575
  }
576
- function Bn(t) {
577
- return t ? t.replace(/<[^>]+>/g, "") : "";
576
+ function Bn(e) {
577
+ return e ? e.replace(/<[^>]+>/g, "") : "";
578
578
  }
579
- function Yn(t) {
580
- return t ? (t.includes("\\\\u") && (t = t.replace(/\\/g, "")), t.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
579
+ function Yn(e) {
580
+ return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (t) => String.fromCharCode(parseInt(t.replace(/\\u/g, ""), 16)))) : "";
581
581
  }
582
- function Kn(t, e = 10) {
583
- let n = 1048576 * e;
584
- return !(t.size > n);
582
+ function Kn(e, t = 10) {
583
+ let n = 1048576 * t;
584
+ return !(e.size > n);
585
585
  }
586
- function Hn(t) {
587
- return Array.from(10).fill(0).map((n, a) => t + "_" + a);
586
+ function Hn(e) {
587
+ return Array.from(10).fill(0).map((n, a) => e + "_" + a);
588
588
  }
589
- function Nn(t) {
590
- let e = {};
591
- return t.map((n, a) => {
589
+ function Nn(e) {
590
+ let t = {};
591
+ return e.map((n, a) => {
592
592
  let { key: s, option: o, type: l } = n, r = ln(a);
593
- o ? e[s] = `${r}---option` : l === "image" ? e[s] = `${r}---image` : e[s] = r;
594
- }), e;
593
+ o ? t[s] = `${r}---option` : l === "image" ? t[s] = `${r}---image` : t[s] = r;
594
+ }), t;
595
595
  }
596
- function Wn(t, e) {
597
- return e.split(".").reduce((n, a) => n && n[a], t);
596
+ function Wn(e, t) {
597
+ return t.split(".").reduce((n, a) => n && n[a], e);
598
598
  }
599
- const Se = (t, e) => {
600
- const n = t.__vccOpts || t;
601
- for (const [a, s] of e)
599
+ const Se = (e, t) => {
600
+ const n = e.__vccOpts || e;
601
+ for (const [a, s] of t)
602
602
  n[a] = s;
603
603
  return n;
604
604
  }, an = ["onClick"], sn = {
@@ -640,71 +640,71 @@ const Se = (t, e) => {
640
640
  modelModifiers: {}
641
641
  }),
642
642
  emits: /* @__PURE__ */ Xe(["success", "change", "changeAll"], ["update:modelValue"]),
643
- setup(t, { emit: e }) {
644
- const n = t, a = Ft(), { t: s, locale: o } = pe(), l = Tt(t, "modelValue"), r = ce(() => a["value-key"] != null), i = U(""), p = ce(() => {
643
+ setup(e, { emit: t }) {
644
+ const n = e, a = Ft(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = U(""), y = ce(() => {
645
645
  if (a.remote !== void 0)
646
646
  return n.data;
647
- const v = pt(i.value), { data: w, labelValue: G } = n, ee = w || g.value;
648
- if (v.length == 0)
647
+ const b = pt(i.value), { data: w, labelValue: G } = n, ee = w || g.value;
648
+ if (b.length == 0)
649
649
  return ee;
650
650
  const { label: _, labelEn: ye } = G;
651
651
  let z = o.value == "en_us" ? ye || "i18nName" : _;
652
- return v.length == 1 ? ee.filter(
653
- (ue) => ue[z].toLowerCase().includes(v[0].toLowerCase())
652
+ return b.length == 1 ? ee.filter(
653
+ (ue) => ue[z].toLowerCase().includes(b[0].toLowerCase())
654
654
  ) : ee.filter((ue) => {
655
655
  let ve = !1;
656
- return ve = v.some((Ee) => ue[z].toLowerCase() == Ee.toLowerCase()), ve;
656
+ return ve = b.some((Ee) => ue[z].toLowerCase() == Ee.toLowerCase()), ve;
657
657
  });
658
- }), b = ce({
658
+ }), p = ce({
659
659
  get() {
660
- return a.multiple == null || l.value == null ? !1 : l.value.length == p.value.length;
660
+ return a.multiple == null || l.value == null ? !1 : l.value.length == y.value.length;
661
661
  },
662
- set(v) {
663
- return v;
662
+ set(b) {
663
+ return b;
664
664
  }
665
- }), y = e, g = U([]), m = async () => {
666
- const { data: v } = await n.api();
667
- g.value = [...v], y("success", g);
665
+ }), v = t, g = U([]), m = async () => {
666
+ const { data: b } = await n.api();
667
+ g.value = [...b], v("success", g);
668
668
  };
669
669
  n.api && m();
670
- function f(v) {
671
- y("change", v), c.value && we(() => {
670
+ function f(b) {
671
+ v("change", b), c.value && we(() => {
672
672
  n.optionClick && n.optionClick(c.value), c.value = null;
673
673
  });
674
674
  }
675
675
  const c = U(null);
676
- function h(v) {
677
- c.value = v;
676
+ function h(b) {
677
+ c.value = b;
678
678
  }
679
- const x = n.labelValue.label.split("-"), k = (v) => {
679
+ const x = n.labelValue.label.split("-"), k = (b) => {
680
680
  if (x.length == 1) {
681
681
  if (n.changeLocal)
682
- return s(v[n.labelValue.label]);
683
- let w = o.value == "en_us" ? v[n.labelValue.labelEn || "i18nName"] : v[n.labelValue.label];
684
- return w = w || v[n.labelValue.label], w + "";
682
+ return s(b[n.labelValue.label]);
683
+ let w = o.value == "en_us" ? b[n.labelValue.labelEn || "i18nName"] : b[n.labelValue.label];
684
+ return w = w || b[n.labelValue.label], w + "";
685
685
  } else {
686
686
  let w = [];
687
687
  return x.forEach((G) => {
688
- w.push(v[G]);
688
+ w.push(b[G]);
689
689
  }), w.join("-");
690
690
  }
691
691
  };
692
- function C(v) {
692
+ function C(b) {
693
693
  let w = n.data ? n.data : g.value;
694
- l.value = v ? w.map((G) => r.value ? G : G[n.labelValue.value]) : [], we(() => {
695
- y("change", l.value), y("changeAll", l.value, w);
694
+ l.value = b ? w.map((G) => r.value ? G : G[n.labelValue.value]) : [], we(() => {
695
+ v("change", l.value), v("changeAll", l.value, w);
696
696
  });
697
697
  }
698
- function E(v) {
699
- y("change", r.value ? v : v[n.labelValue.value]), we(() => {
700
- n.optionClick && n.optionClick(v);
698
+ function E(b) {
699
+ v("change", r.value ? b : b[n.labelValue.value]), we(() => {
700
+ n.optionClick && n.optionClick(b);
701
701
  });
702
702
  }
703
- function V(v) {
704
- return l.value.length >= n.maxLimit && !l.value.includes(v[n.labelValue.value]);
703
+ function V(b) {
704
+ return l.value.length >= n.maxLimit && !l.value.includes(b[n.labelValue.value]);
705
705
  }
706
- function B(v) {
707
- return v.map((w) => ({
706
+ function B(b) {
707
+ return b.map((w) => ({
708
708
  ...w,
709
709
  label: k(w),
710
710
  value: r.value ? w : w[n.labelValue.value]
@@ -713,9 +713,9 @@ const Se = (t, e) => {
713
713
  const I = U([]), $ = n.data ? n.data : g.value;
714
714
  I.value = B($), Re(
715
715
  () => n.data ? n.data : g.value,
716
- (v) => {
716
+ (b) => {
717
717
  var G;
718
- const w = B(v);
718
+ const w = B(b);
719
719
  if (w.length !== I.value.length)
720
720
  I.value = w;
721
721
  else {
@@ -731,7 +731,7 @@ const Se = (t, e) => {
731
731
  { deep: !0 }
732
732
  );
733
733
  const W = ce(() => I.value);
734
- return (v, w) => {
734
+ return (b, w) => {
735
735
  const G = M("el-checkbox"), ee = M("el-select-v2"), _ = M("el-option"), ye = M("el-select");
736
736
  return K(a).v2 != null ? (F(), H(ee, ge({
737
737
  key: 0,
@@ -756,15 +756,15 @@ const Se = (t, e) => {
756
756
  K(a).multiple != null ? {
757
757
  name: "header",
758
758
  fn: D(() => [
759
- te(v.$slots, "header", {}, () => [
759
+ te(b.$slots, "header", {}, () => [
760
760
  O(G, {
761
761
  class: "mgl20",
762
- modelValue: b.value,
763
- "onUpdate:modelValue": w[0] || (w[0] = (z) => b.value = z),
762
+ modelValue: p.value,
763
+ "onUpdate:modelValue": w[0] || (w[0] = (z) => p.value = z),
764
764
  onChange: C
765
765
  }, {
766
766
  default: D(() => [
767
- ne(Q(v.$t("quan-xuan")), 1)
767
+ ne(Q(b.$t("quan-xuan")), 1)
768
768
  ]),
769
769
  _: 1
770
770
  }, 8, ["modelValue"])
@@ -781,27 +781,27 @@ const Se = (t, e) => {
781
781
  "collapse-tags-tooltip": "",
782
782
  "filter-method": K(a).remote != null ? void 0 : (z) => i.value = z,
783
783
  clearable: ""
784
- }, K(a), { onClear: t.optionClick }), {
784
+ }, K(a), { onClear: e.optionClick }), {
785
785
  default: D(() => [
786
- K(a).multiple != null && t.showCheckAll && t.maxLimit == null ? te(v.$slots, "header", { key: 0 }, () => [
786
+ K(a).multiple != null && e.showCheckAll && e.maxLimit == null ? te(b.$slots, "header", { key: 0 }, () => [
787
787
  O(G, {
788
788
  class: "mgl20",
789
- modelValue: b.value,
790
- "onUpdate:modelValue": w[2] || (w[2] = (z) => b.value = z),
789
+ modelValue: p.value,
790
+ "onUpdate:modelValue": w[2] || (w[2] = (z) => p.value = z),
791
791
  onChange: C
792
792
  }, {
793
793
  default: D(() => [
794
- ne(Q(v.$t("quan-xuan")), 1)
794
+ ne(Q(b.$t("quan-xuan")), 1)
795
795
  ]),
796
796
  _: 1
797
797
  }, 8, ["modelValue"])
798
798
  ], !0) : de("", !0),
799
- (F(!0), ie(Me, null, st(p.value, (z, fe) => (F(), H(_, {
799
+ (F(!0), ie(Me, null, st(y.value, (z, fe) => (F(), H(_, {
800
800
  key: fe,
801
801
  label: k(z),
802
- disabled: K(a).multiple != null && t.maxLimit > 0 ? V(z) : !1,
802
+ disabled: K(a).multiple != null && e.maxLimit > 0 ? V(z) : !1,
803
803
  onClick: Ve((ue) => E(z), ["stop"]),
804
- value: r.value ? z : z[t.labelValue.value]
804
+ value: r.value ? z : z[e.labelValue.value]
805
805
  }, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
806
806
  ]),
807
807
  _: 3
@@ -817,11 +817,11 @@ const cn = ot({
817
817
  }
818
818
  }
819
819
  });
820
- function un(t, e, n, a, s, o) {
820
+ function un(e, t, n, a, s, o) {
821
821
  const l = M("el-icon");
822
822
  return F(), H(l, { class: "cmp-icon" }, {
823
823
  default: D(() => [
824
- (F(), H(rt(t.name)))
824
+ (F(), H(rt(e.name)))
825
825
  ]),
826
826
  _: 1
827
827
  });
@@ -829,8 +829,8 @@ function un(t, e, n, a, s, o) {
829
829
  const yt = /* @__PURE__ */ Se(cn, [["render", un], ["__scopeId", "data-v-733f9daa"]]), Zn = {
830
830
  __name: "index",
831
831
  emits: ["ok", "no"],
832
- setup(t, { emit: e }) {
833
- const n = e, a = Be(() => {
832
+ setup(e, { emit: t }) {
833
+ const n = t, a = Be(() => {
834
834
  n("ok");
835
835
  }, 500);
836
836
  function s() {
@@ -869,8 +869,8 @@ const dn = ["accept"], fn = {
869
869
  }
870
870
  },
871
871
  emits: ["fileChange"],
872
- setup(t, { emit: e }) {
873
- const n = t, a = U(null), s = U(!1);
872
+ setup(e, { emit: t }) {
873
+ const n = e, a = U(null), s = U(!1);
874
874
  async function o(l) {
875
875
  s.value = !0;
876
876
  let r = l.target.files[0];
@@ -889,7 +889,7 @@ const dn = ["accept"], fn = {
889
889
  O(i, {
890
890
  loading: s.value,
891
891
  class: "mgr10",
892
- onClick: r[0] || (r[0] = (p) => a.value.click())
892
+ onClick: r[0] || (r[0] = (y) => a.value.click())
893
893
  }, {
894
894
  default: D(() => [
895
895
  ne(Q(l.$t("dao-ru")), 1)
@@ -900,7 +900,7 @@ const dn = ["accept"], fn = {
900
900
  onChange: o,
901
901
  ref_key: "input",
902
902
  ref: a,
903
- accept: t.accept,
903
+ accept: e.accept,
904
904
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
905
905
  type: "file"
906
906
  }, null, 40, dn)
@@ -908,23 +908,23 @@ const dn = ["accept"], fn = {
908
908
  };
909
909
  }
910
910
  }, Gn = /* @__PURE__ */ Se(fn, [["__scopeId", "data-v-6f9ede29"]]);
911
- function Pe(t) {
912
- let e = {};
913
- return t.forEach((n) => {
911
+ function Pe(e) {
912
+ let t = {};
913
+ return e.forEach((n) => {
914
914
  const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
915
915
  if (a)
916
916
  if (s == "input" && (o != null && o.multiple))
917
- e[a] = pt(l);
917
+ t[a] = pt(l);
918
918
  else if (s == "date")
919
919
  if (r.includes("range")) {
920
- const [i, p] = a;
921
- let [b, y] = l || [];
922
- b && r == "daterange" && (b = $e(b).format("YYYY-MM-DD 00:00:00"), y = $e(y).format("YYYY-MM-DD 23:59:59")), e[i] = b, e[p] = y;
920
+ const [i, y] = a;
921
+ let [p, v] = l || [];
922
+ p && r == "daterange" && (p = $e(p).format("YYYY-MM-DD 00:00:00"), v = $e(v).format("YYYY-MM-DD 23:59:59")), t[i] = p, t[y] = v;
923
923
  } else
924
- e[a] = l;
924
+ t[a] = l;
925
925
  else
926
- e[a] = l;
927
- }), e;
926
+ t[a] = l;
927
+ }), t;
928
928
  }
929
929
  const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { class: "right" }, yn = {
930
930
  __name: "index",
@@ -935,15 +935,15 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
935
935
  }
936
936
  },
937
937
  emits: ["confirm", "reset", "visibleChange"],
938
- setup(t, { expose: e, emit: n }) {
939
- const a = t, s = n, o = U(!0), l = U(null), { t: r } = pe(), i = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
940
- function p() {
938
+ setup(e, { expose: t, emit: n }) {
939
+ const a = e, s = n, o = U(!0), l = U(null), { t: r } = pe(), i = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
940
+ function y() {
941
941
  s("confirm");
942
942
  }
943
- function b(h) {
943
+ function p(h) {
944
944
  h.option.onClear && h.option.onClear(), s("confirm");
945
945
  }
946
- function y() {
946
+ function v() {
947
947
  s("reset");
948
948
  }
949
949
  function g() {
@@ -959,11 +959,11 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
959
959
  x && (h.value = x.value);
960
960
  });
961
961
  }
962
- return e({ getPrm: m, reset: c }), (h, x) => {
962
+ return t({ getPrm: m, reset: c }), (h, x) => {
963
963
  const k = M("el-input"), C = M("el-date-picker"), E = M("el-form-item"), V = M("el-form"), B = M("el-link"), I = M("el-button");
964
964
  return F(), ie("div", {
965
965
  class: "searchBar-container mgt10 mgb10",
966
- onKeydown: Dt(p, ["enter"])
966
+ onKeydown: Dt(y, ["enter"])
967
967
  }, [
968
968
  re("div", {
969
969
  class: "searchBar",
@@ -971,10 +971,10 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
971
971
  }, [
972
972
  O(V, {
973
973
  inline: "",
974
- model: t.form.data
974
+ model: e.form.data
975
975
  }, {
976
976
  default: D(() => [
977
- (F(!0), ie(Me, null, st(t.form.items.filter(($) => !$.hidden), ($) => (F(), ie(Me, {
977
+ (F(!0), ie(Me, null, st(e.form.items.filter(($) => !$.hidden), ($) => (F(), ie(Me, {
978
978
  key: $.key
979
979
  }, [
980
980
  $.type == "br" ? (F(), ie("br", hn)) : (F(), H(E, {
@@ -982,7 +982,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
982
982
  label: $.name
983
983
  }, {
984
984
  default: D(() => {
985
- var W, v;
985
+ var W, b;
986
986
  return [
987
987
  $.type === "input" ? (F(), H(k, {
988
988
  key: 0,
@@ -994,12 +994,12 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
994
994
  }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : $.type === "custom" ? (F(), H(rt($.render), { key: 1 })) : de("", !0),
995
995
  $.type === "select" ? (F(), H(rn, ge({
996
996
  key: 2,
997
- class: ((v = $.option) == null ? void 0 : v.class) || "w150",
997
+ class: ((b = $.option) == null ? void 0 : b.class) || "w150",
998
998
  modelValue: $.value,
999
999
  "onUpdate:modelValue": (w) => $.value = w
1000
1000
  }, { ref_for: !0 }, $.option, {
1001
- onChange: p,
1002
- onClear: (w) => b($)
1001
+ onChange: y,
1002
+ onClear: (w) => p($)
1003
1003
  }), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : de("", !0),
1004
1004
  $.type === "date" ? (F(), H(C, {
1005
1005
  key: 3,
@@ -1045,7 +1045,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
1045
1045
  }),
1046
1046
  O(I, {
1047
1047
  type: "primary",
1048
- onClick: p
1048
+ onClick: y
1049
1049
  }, {
1050
1050
  default: D(() => [
1051
1051
  ne(Q(h.$t("shai-xuan")), 1)
@@ -1054,7 +1054,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
1054
1054
  }),
1055
1055
  O(I, {
1056
1056
  type: "primary",
1057
- onClick: y
1057
+ onClick: v
1058
1058
  }, {
1059
1059
  default: D(() => [
1060
1060
  ne(Q(h.$t("chong-zhi")), 1)
@@ -1098,13 +1098,13 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
1098
1098
  // 是否启用单元格选区复制功能
1099
1099
  };
1100
1100
  let _e = { ...vt };
1101
- function Jn(t) {
1101
+ function Jn(e) {
1102
1102
  _e = {
1103
1103
  ..._e,
1104
- ...t,
1104
+ ...e,
1105
1105
  responseDataKeys: {
1106
1106
  ..._e.responseDataKeys,
1107
- ...t.responseDataKeys || {}
1107
+ ...e.responseDataKeys || {}
1108
1108
  }
1109
1109
  };
1110
1110
  }
@@ -1150,14 +1150,14 @@ const wn = { class: "center" }, Cn = {
1150
1150
  default: () => ({})
1151
1151
  }
1152
1152
  },
1153
- setup(t, { expose: e }) {
1154
- const { t: n, locale: a } = pe(), s = jt(), o = bn(), l = t, r = U(!1), i = U([]);
1153
+ setup(e, { expose: t }) {
1154
+ const { t: n, locale: a } = pe(), s = jt(), o = bn(), l = e, r = U(!1), i = U([]);
1155
1155
  l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
1156
- const p = ce(() => {
1156
+ const y = ce(() => {
1157
1157
  const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1158
1158
  return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
1159
- }), b = ct(l.searchForm.items), y = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, m = Ie({
1160
- [y]: 1,
1159
+ }), p = ct(l.searchForm.items), v = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, m = Ie({
1160
+ [v]: 1,
1161
1161
  [g]: l.searchForm.defaultPageSize || o.defaultPageSize,
1162
1162
  total: 0
1163
1163
  }), f = U(null), c = U(null), h = U(450), x = Be(() => {
@@ -1176,10 +1176,10 @@ const wn = { class: "center" }, Cn = {
1176
1176
  if (!d || !d.$el)
1177
1177
  return !1;
1178
1178
  const u = d.$el;
1179
- return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", z), u.removeEventListener("mousemove", fe), u.removeEventListener("mouseup", ue), u.removeEventListener("keydown", Fe), u.addEventListener("mousedown", z), u.addEventListener("mousemove", fe), u.addEventListener("mouseup", ue), u.addEventListener("keydown", Fe), !0;
1179
+ return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", z), u.removeEventListener("mousemove", fe), u.removeEventListener("mouseup", ue), u.removeEventListener("keydown", Te), u.addEventListener("mousedown", z), u.addEventListener("mousemove", fe), u.addEventListener("mouseup", ue), u.addEventListener("keydown", Te), !0;
1180
1180
  };
1181
1181
  lt(() => {
1182
- x(), window.addEventListener("resize", k), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
1182
+ x(), window.addEventListener("resize", k), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
1183
1183
  C();
1184
1184
  }, 500));
1185
1185
  }), Ot(() => {
@@ -1192,7 +1192,7 @@ const wn = { class: "center" }, Cn = {
1192
1192
  const d = f.value;
1193
1193
  if (d && d.$el) {
1194
1194
  const u = d.$el;
1195
- u.removeEventListener("mousedown", z), u.removeEventListener("mousemove", fe), u.removeEventListener("mouseup", ue), u.removeEventListener("keydown", Fe);
1195
+ u.removeEventListener("mousedown", z), u.removeEventListener("mousemove", fe), u.removeEventListener("mouseup", ue), u.removeEventListener("keydown", Te);
1196
1196
  }
1197
1197
  }
1198
1198
  });
@@ -1200,7 +1200,7 @@ const wn = { class: "center" }, Cn = {
1200
1200
  let V;
1201
1201
  async function B(d) {
1202
1202
  const { dataFormat: u } = l.tableConfig;
1203
- d[y] != 1 && (d.nextSearchAfter = V), r.value = !0;
1203
+ d[v] != 1 && (d.nextSearchAfter = V), r.value = !0;
1204
1204
  const { code: S, data: T = {} } = await l.api(d).finally(() => {
1205
1205
  r.value = !1, l.searchForm.selections = [];
1206
1206
  });
@@ -1217,7 +1217,7 @@ const wn = { class: "center" }, Cn = {
1217
1217
  Z = T[q];
1218
1218
  break;
1219
1219
  }
1220
- i.value = u ? u(P) : P, m.total = Z, V = T.nextSearchAfter, l.searchForm.enableCellCopy && we(() => {
1220
+ i.value = u ? u(P) : P, m.total = Z, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
1221
1221
  setTimeout(() => {
1222
1222
  C();
1223
1223
  }, 100);
@@ -1236,7 +1236,7 @@ const wn = { class: "center" }, Cn = {
1236
1236
  function $() {
1237
1237
  const { reset: d } = l.tableConfig;
1238
1238
  d && d(), l.searchForm.items.forEach((u) => {
1239
- const S = b.find((T) => Qe(u.key) && Qe(T.key) ? u.key.join(",") == T.key.join(",") : T.key == u.key);
1239
+ const S = p.find((T) => Qe(u.key) && Qe(T.key) ? u.key.join(",") == T.key.join(",") : T.key == u.key);
1240
1240
  S && (u.value = S.value);
1241
1241
  }), I();
1242
1242
  }
@@ -1244,7 +1244,7 @@ const wn = { class: "center" }, Cn = {
1244
1244
  function W() {
1245
1245
  return { ...m, ...Pe(l.searchForm.items) };
1246
1246
  }
1247
- const v = () => {
1247
+ const b = () => {
1248
1248
  const d = f.value;
1249
1249
  d && d.clearSort();
1250
1250
  }, w = Ie({
@@ -1404,7 +1404,7 @@ const wn = { class: "center" }, Cn = {
1404
1404
  const le = S.filter((ae) => ae.fixed === "right").indexOf(R);
1405
1405
  j = he[le];
1406
1406
  } else if (!X && !N && oe.closest(".vxe-table--body-wrapper")) {
1407
- const me = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((Te) => Te.fixed === "left").length, ae = J - le;
1407
+ const me = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = J - le;
1408
1408
  j = he[ae + me];
1409
1409
  }
1410
1410
  if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
@@ -1452,7 +1452,7 @@ const wn = { class: "center" }, Cn = {
1452
1452
  const le = S.filter((ae) => ae.fixed === "right").indexOf(J);
1453
1453
  j = he[le];
1454
1454
  } else if (!R && !X && oe.closest(".vxe-table--body-wrapper")) {
1455
- const me = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((Te) => Te.fixed === "left").length, ae = Y - le;
1455
+ const me = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = Y - le;
1456
1456
  j = he[ae + me];
1457
1457
  }
1458
1458
  if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
@@ -1470,8 +1470,8 @@ const wn = { class: "center" }, Cn = {
1470
1470
  } catch (A) {
1471
1471
  console.error("复制失败:", A);
1472
1472
  }
1473
- }, Fe = (d) => {
1474
- l.searchForm.enableCellCopy && ((d.ctrlKey || d.metaKey) && d.key === "c" ? _.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
1473
+ }, Te = (d) => {
1474
+ !l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? _.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
1475
1475
  }, Ne = () => {
1476
1476
  _.isSelecting = !1;
1477
1477
  }, We = (d) => {
@@ -1480,9 +1480,9 @@ const wn = { class: "center" }, Cn = {
1480
1480
  return;
1481
1481
  u.$el.contains(d.target) || ve();
1482
1482
  }, Ct = (d) => {
1483
- m[y] = d, I();
1483
+ m[v] = d, I();
1484
1484
  }, xt = (d) => {
1485
- m[g] = d, m[y] = 1, I();
1485
+ m[g] = d, m[v] = 1, I();
1486
1486
  };
1487
1487
  function Ze() {
1488
1488
  const d = f.value.getCheckboxRecords();
@@ -1496,15 +1496,15 @@ const wn = { class: "center" }, Cn = {
1496
1496
  l.searchForm.selections = S;
1497
1497
  }
1498
1498
  };
1499
- return e({ tableRef: f, getList: I, getPrm: W, clearSort: v, calculateTableHeight: x }), (d, u) => {
1499
+ return t({ tableRef: f, getList: I, getPrm: W, clearSort: b, calculateTableHeight: x }), (d, u) => {
1500
1500
  var A;
1501
1501
  const S = M("el-button"), T = M("el-checkbox"), P = M("el-text"), Z = M("vxe-column"), q = M("VxeTable"), se = M("el-pagination");
1502
1502
  return F(), ie("div", {
1503
- class: qe({ box: t.searchForm.showShadow })
1503
+ class: qe({ box: e.searchForm.showShadow })
1504
1504
  }, [
1505
- t.searchForm.showSearch ? (F(), H(vn, {
1505
+ e.searchForm.showSearch ? (F(), H(vn, {
1506
1506
  key: 0,
1507
- form: t.searchForm,
1507
+ form: e.searchForm,
1508
1508
  onReset: $,
1509
1509
  onConfirm: u[1] || (u[1] = (L) => I()),
1510
1510
  onVisibleChange: K(x)
@@ -1531,11 +1531,11 @@ const wn = { class: "center" }, Cn = {
1531
1531
  ref: c
1532
1532
  }, [
1533
1533
  O(q, ge({
1534
- id: p.value,
1534
+ id: y.value,
1535
1535
  ref_key: "tableRef",
1536
1536
  ref: f,
1537
- loading: t.loading || r.value,
1538
- data: t.api ? i.value : t.data,
1537
+ loading: e.loading || r.value,
1538
+ data: e.api ? i.value : e.data,
1539
1539
  border: ""
1540
1540
  }, ee.value, {
1541
1541
  height: E.value,
@@ -1544,7 +1544,7 @@ const wn = { class: "center" }, Cn = {
1544
1544
  onSortChange: (A = ee.value["sort-config"]) == null ? void 0 : A.sortChange
1545
1545
  }), {
1546
1546
  default: D(() => [
1547
- t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (F(), H(Z, {
1547
+ e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (F(), H(Z, {
1548
1548
  key: 0,
1549
1549
  type: "checkbox",
1550
1550
  width: K(a) == "zh_cn" ? 80 : 150,
@@ -1584,23 +1584,23 @@ const wn = { class: "center" }, Cn = {
1584
1584
  _: 3
1585
1585
  }, 16, ["id", "loading", "data", "height", "onSortChange"])
1586
1586
  ], 512),
1587
- t.searchForm.showPage ? (F(), H(se, {
1587
+ e.searchForm.showPage ? (F(), H(se, {
1588
1588
  key: 1,
1589
- "current-page": m[K(y)],
1590
- "onUpdate:currentPage": u[2] || (u[2] = (L) => m[K(y)] = L),
1589
+ "current-page": m[K(v)],
1590
+ "onUpdate:currentPage": u[2] || (u[2] = (L) => m[K(v)] = L),
1591
1591
  class: "myPagination mgt10",
1592
1592
  background: "",
1593
1593
  layout: "total, sizes, prev, pager, next",
1594
1594
  total: m.total,
1595
1595
  "page-size": m[K(g)],
1596
- "page-sizes": t.searchForm.pageSizes || K(o).pageSizes,
1596
+ "page-sizes": e.searchForm.pageSizes || K(o).pageSizes,
1597
1597
  onCurrentChange: Ct,
1598
1598
  onSizeChange: xt
1599
1599
  }, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : de("", !0)
1600
1600
  ], 2);
1601
1601
  };
1602
1602
  }
1603
- }, Qn = /* @__PURE__ */ Se(Cn, [["__scopeId", "data-v-5496c3dc"]]), eo = {
1603
+ }, Qn = /* @__PURE__ */ Se(Cn, [["__scopeId", "data-v-c022c16d"]]), eo = {
1604
1604
  __name: "index",
1605
1605
  props: {
1606
1606
  sheetsConfig: {
@@ -1612,10 +1612,10 @@ const wn = { class: "center" }, Cn = {
1612
1612
  required: !0
1613
1613
  }
1614
1614
  },
1615
- setup(t) {
1616
- const e = t;
1615
+ setup(e) {
1616
+ const t = e;
1617
1617
  function n() {
1618
- nn(e.fileName, e.sheetsConfig);
1618
+ nn(t.fileName, t.sheetsConfig);
1619
1619
  }
1620
1620
  return (a, s) => {
1621
1621
  const o = M("el-link");
@@ -1631,22 +1631,22 @@ const wn = { class: "center" }, Cn = {
1631
1631
  };
1632
1632
  }
1633
1633
  }, xn = {
1634
- mounted(t, e) {
1635
- e.value && tt(t);
1634
+ mounted(e, t) {
1635
+ t.value && tt(e);
1636
1636
  },
1637
- updated(t, e) {
1638
- e.value ? tt(t) : nt(t);
1637
+ updated(e, t) {
1638
+ t.value ? tt(e) : nt(e);
1639
1639
  },
1640
- beforeUnmount(t) {
1641
- nt(t);
1640
+ beforeUnmount(e) {
1641
+ nt(e);
1642
1642
  }
1643
1643
  };
1644
- async function tt(t) {
1644
+ async function tt(e) {
1645
1645
  await g();
1646
- const e = t.querySelector(".el-dialog");
1647
- if (!e)
1646
+ const t = e.querySelector(".el-dialog");
1647
+ if (!t)
1648
1648
  return;
1649
- const n = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-overlay");
1649
+ const n = e.querySelector(".el-dialog__header"), a = e.querySelector(".el-overlay");
1650
1650
  a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
1651
1651
  let s = !1, o = {
1652
1652
  // 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
@@ -1674,33 +1674,33 @@ async function tt(t) {
1674
1674
  y: 0
1675
1675
  }
1676
1676
  };
1677
- n.addEventListener("mousedown", i), document.addEventListener("mousemove", p), document.addEventListener("mouseup", b), window.addEventListener("resize", y);
1677
+ n.addEventListener("mousedown", i), document.addEventListener("mousemove", y), document.addEventListener("mouseup", p), window.addEventListener("resize", v);
1678
1678
  function l() {
1679
1679
  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();
1680
1680
  }
1681
1681
  function r() {
1682
1682
  let m = o.drag.y - o.mouse.y + o.dialog.y, f = o.drag.x - o.mouse.x + o.dialog.x;
1683
- e.style.cssText += `position: absolute; top: calc(${m}px - ${o.dialog.marginTop}); left: ${f}px;`;
1683
+ t.style.cssText += `position: absolute; top: calc(${m}px - ${o.dialog.marginTop}); left: ${f}px;`;
1684
1684
  }
1685
1685
  function i(m) {
1686
1686
  m.button === 0 && (o.window = {
1687
1687
  width: document.body.clientWidth,
1688
1688
  height: document.body.clientHeight
1689
- }, o.dialog = e.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(e).marginTop, o.mouse = {
1689
+ }, o.dialog = t.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(t).marginTop, o.mouse = {
1690
1690
  x: m.clientX,
1691
1691
  y: m.clientY
1692
1692
  }, s = !0);
1693
1693
  }
1694
- function p(m) {
1694
+ function y(m) {
1695
1695
  s && (o.drag = {
1696
1696
  x: m.clientX,
1697
1697
  y: m.clientY
1698
1698
  }, a.style.userSelect = "none", l());
1699
1699
  }
1700
- function b(m) {
1700
+ function p(m) {
1701
1701
  a.style.userSelect = "auto", s = !1;
1702
1702
  }
1703
- function y(m) {
1703
+ function v(m) {
1704
1704
  }
1705
1705
  function g() {
1706
1706
  return new Promise((m, f) => {
@@ -1709,10 +1709,10 @@ async function tt(t) {
1709
1709
  }, 500);
1710
1710
  });
1711
1711
  }
1712
- t.__mouseDown__ = i, t.__mouseUp__ = b, t.__mouseMove__ = p, t.__sizeChange__ = y;
1712
+ e.__mouseDown__ = i, e.__mouseUp__ = p, e.__mouseMove__ = y, e.__sizeChange__ = v;
1713
1713
  }
1714
- function nt(t) {
1715
- document.removeEventListener("mousedown", t.__mouseDown__), document.removeEventListener("mousemove", t.__mouseMove__), document.removeEventListener("mouseup", t.__mouseUp__), window.removeEventListener("resize", t.__sizeChange__);
1714
+ function nt(e) {
1715
+ document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
1716
1716
  }
1717
1717
  const kn = {
1718
1718
  key: 0,
@@ -1736,8 +1736,8 @@ const kn = {
1736
1736
  }
1737
1737
  },
1738
1738
  emits: ["confirm"],
1739
- setup(t, { emit: e }) {
1740
- const n = t, a = e, { t: s } = pe(), o = Be(() => {
1739
+ setup(e, { emit: t }) {
1740
+ const n = e, a = t, { t: s } = pe(), o = Be(() => {
1741
1741
  a("confirm");
1742
1742
  }, 300);
1743
1743
  async function l() {
@@ -1749,13 +1749,13 @@ const kn = {
1749
1749
  }) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
1750
1750
  }
1751
1751
  return (r, i) => {
1752
- const p = M("el-button"), b = M("el-drawer"), y = M("el-dialog");
1753
- return t.layer.type ? (F(), H(b, {
1752
+ const y = M("el-button"), p = M("el-drawer"), v = M("el-dialog");
1753
+ return e.layer.type ? (F(), H(p, {
1754
1754
  key: 0,
1755
- modelValue: t.layer.show,
1756
- "onUpdate:modelValue": i[0] || (i[0] = (g) => t.layer.show = g),
1757
- size: t.layer.width || "100%",
1758
- title: t.layer.title,
1755
+ modelValue: e.layer.show,
1756
+ "onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
1757
+ size: e.layer.width || "100%",
1758
+ title: e.layer.title,
1759
1759
  direction: "rtl",
1760
1760
  "append-to-body": "",
1761
1761
  "before-close": l,
@@ -1764,17 +1764,17 @@ const kn = {
1764
1764
  default: D(() => [
1765
1765
  te(r.$slots, "default"),
1766
1766
  i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
1767
- t.layer.showButton ? (F(), ie("div", kn, [
1767
+ e.layer.showButton ? (F(), ie("div", kn, [
1768
1768
  te(r.$slots, "btn", {}, () => [
1769
- O(p, { onClick: l }, {
1769
+ O(y, { onClick: l }, {
1770
1770
  default: D(() => [
1771
1771
  ne(Q(r.$t("qu-xiao")), 1)
1772
1772
  ]),
1773
1773
  _: 1
1774
1774
  }),
1775
- O(p, {
1775
+ O(y, {
1776
1776
  type: "primary",
1777
- loading: t.loading,
1777
+ loading: e.loading,
1778
1778
  onClick: K(o)
1779
1779
  }, {
1780
1780
  default: D(() => [
@@ -1787,12 +1787,12 @@ const kn = {
1787
1787
  ]),
1788
1788
  _: 3
1789
1789
  }, 8, ["modelValue", "size", "title"])) : Vt((F(), ie("div", _n, [
1790
- O(y, {
1790
+ O(v, {
1791
1791
  "close-on-click-modal": !1,
1792
- modelValue: t.layer.show,
1793
- "onUpdate:modelValue": i[1] || (i[1] = (g) => t.layer.show = g),
1794
- title: t.layer.title,
1795
- width: t.layer.width || 500,
1792
+ modelValue: e.layer.show,
1793
+ "onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
1794
+ title: e.layer.title,
1795
+ width: e.layer.width || 500,
1796
1796
  center: ""
1797
1797
  }, at({
1798
1798
  default: D(() => [
@@ -1800,17 +1800,17 @@ const kn = {
1800
1800
  ]),
1801
1801
  _: 2
1802
1802
  }, [
1803
- t.layer.showButton ? {
1803
+ e.layer.showButton ? {
1804
1804
  name: "footer",
1805
1805
  fn: D(() => [
1806
1806
  te(r.$slots, "btn", {}, () => [
1807
- O(p, { onClick: l }, {
1807
+ O(y, { onClick: l }, {
1808
1808
  default: D(() => [
1809
1809
  ne(Q(r.$t("qu-xiao")), 1)
1810
1810
  ]),
1811
1811
  _: 1
1812
1812
  }),
1813
- O(p, {
1813
+ O(y, {
1814
1814
  type: "primary",
1815
1815
  onClick: K(o)
1816
1816
  }, {
@@ -1825,44 +1825,44 @@ const kn = {
1825
1825
  } : void 0
1826
1826
  ]), 1032, ["modelValue", "title", "width"])
1827
1827
  ])), [
1828
- [K(xn), t.layer.show]
1828
+ [K(xn), e.layer.show]
1829
1829
  ]);
1830
1830
  };
1831
1831
  }
1832
1832
  };
1833
- function no(t, e = {}) {
1833
+ function no(e, t = {}) {
1834
1834
  const n = Ce(), a = {
1835
1835
  inForm: !0,
1836
1836
  required: !0,
1837
- ...e
1837
+ ...t
1838
1838
  }, s = {
1839
1839
  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}$/,
1840
1840
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1841
1841
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1842
- }[t], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
1843
- return o ? function(p, b, y) {
1842
+ }[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
1843
+ return o ? function(y, p, v) {
1844
1844
  if (r) {
1845
- s.test(b) ? y() : y(new Error(i));
1845
+ s.test(p) ? v() : v(new Error(i));
1846
1846
  return;
1847
1847
  }
1848
- b && !s.test(b) ? y(new Error(i)) : y();
1848
+ p && !s.test(p) ? v(new Error(i)) : v();
1849
1849
  } : s.test(l);
1850
1850
  }
1851
1851
  class oo {
1852
- constructor(e = {}) {
1852
+ constructor(t = {}) {
1853
1853
  this.config = {
1854
- clientCode: e.clientCode || "one-portal",
1855
- casServerUrl: `https://one-portal${e.isTest ? "-test" : ""}.joy-group.com/api`,
1856
- casPortalUrl: `https://one-portal${e.isTest ? "-test" : ""}.joy-group.com`,
1857
- serviceUrl: e.serviceUrl || window.location.origin + "/cas/callback",
1858
- tokenKey: e.tokenKey || "one_portal_token",
1859
- userKey: e.userKey || "one_portal_user",
1860
- debug: e.debug || !1,
1861
- autoLogin: e.autoLogin !== !1,
1854
+ clientCode: t.clientCode || "one-portal",
1855
+ casServerUrl: `https://one-portal${t.isTest ? "-test" : ""}.joy-group.com/api`,
1856
+ casPortalUrl: `https://one-portal${t.isTest ? "-test" : ""}.joy-group.com`,
1857
+ serviceUrl: t.serviceUrl || window.location.origin + "/cas/callback",
1858
+ tokenKey: t.tokenKey || "one_portal_token",
1859
+ userKey: t.userKey || "one_portal_user",
1860
+ debug: t.debug || !1,
1861
+ autoLogin: t.autoLogin !== !1,
1862
1862
  // 默认开启自动登录
1863
- loginCallback: e.loginCallback || null,
1864
- logoutCallback: e.logoutCallback || null,
1865
- errorCallback: e.errorCallback || null
1863
+ loginCallback: t.loginCallback || null,
1864
+ logoutCallback: t.logoutCallback || null,
1865
+ errorCallback: t.errorCallback || null
1866
1866
  }, this.token = null, this.user = null, this.init();
1867
1867
  }
1868
1868
  /**
@@ -1879,10 +1879,10 @@ class oo {
1879
1879
  loadFromStorage() {
1880
1880
  try {
1881
1881
  this.token = localStorage.getItem(this.config.tokenKey);
1882
- const e = localStorage.getItem(this.config.userKey);
1883
- e && (this.user = JSON.parse(e)), this.log("从本地存储加载数据:", { token: !!this.token, user: !!this.user });
1884
- } catch (e) {
1885
- this.log("加载本地存储数据失败:", e);
1882
+ const t = localStorage.getItem(this.config.userKey);
1883
+ t && (this.user = JSON.parse(t)), this.log("从本地存储加载数据:", { token: !!this.token, user: !!this.user });
1884
+ } catch (t) {
1885
+ this.log("加载本地存储数据失败:", t);
1886
1886
  }
1887
1887
  }
1888
1888
  /**
@@ -1891,8 +1891,8 @@ class oo {
1891
1891
  saveToStorage() {
1892
1892
  try {
1893
1893
  this.token && localStorage.setItem(this.config.tokenKey, this.token), this.user && localStorage.setItem(this.config.userKey, JSON.stringify(this.user)), this.log("数据已保存到本地存储");
1894
- } catch (e) {
1895
- this.log("保存到本地存储失败:", e);
1894
+ } catch (t) {
1895
+ this.log("保存到本地存储失败:", t);
1896
1896
  }
1897
1897
  }
1898
1898
  /**
@@ -1901,8 +1901,8 @@ class oo {
1901
1901
  clearStorage() {
1902
1902
  try {
1903
1903
  localStorage.removeItem(this.config.tokenKey), localStorage.removeItem(this.config.userKey), this.log("本地存储已清除");
1904
- } catch (e) {
1905
- this.log("清除本地存储失败:", e);
1904
+ } catch (t) {
1905
+ this.log("清除本地存储失败:", t);
1906
1906
  }
1907
1907
  }
1908
1908
  /**
@@ -1927,16 +1927,16 @@ class oo {
1927
1927
  * 登录 - 跳转到CAS登录页面
1928
1928
  */
1929
1929
  login() {
1930
- const e = `${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;
1931
- this.log("跳转到CAS登录页面:", e), window.location.href = e;
1930
+ const t = `${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;
1931
+ this.log("跳转到CAS登录页面:", t), window.location.href = t;
1932
1932
  }
1933
1933
  /**
1934
1934
  * 验证ST票据
1935
1935
  */
1936
- async validateTicket(e) {
1936
+ async validateTicket(t) {
1937
1937
  try {
1938
- this.log("验证ST票据:", e);
1939
- const n = await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${e}`, {
1938
+ this.log("验证ST票据:", t);
1939
+ const n = await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${t}`, {
1940
1940
  method: "GET",
1941
1941
  headers: {
1942
1942
  "Content-Type": "application/json"
@@ -1956,13 +1956,13 @@ class oo {
1956
1956
  * 清除URL中的ticket参数
1957
1957
  */
1958
1958
  clearTicketFromUrl() {
1959
- const e = new URL(window.location);
1960
- e.searchParams.delete("ticket"), window.history.replaceState({}, document.title, e.toString());
1959
+ const t = new URL(window.location);
1960
+ t.searchParams.delete("ticket"), window.history.replaceState({}, document.title, t.toString());
1961
1961
  }
1962
1962
  /**
1963
1963
  * 登出
1964
1964
  */
1965
- async logout(e = !0) {
1965
+ async logout(t = !0) {
1966
1966
  try {
1967
1967
  if (this.log("用户登出"), this.token)
1968
1968
  try {
@@ -1977,7 +1977,7 @@ class oo {
1977
1977
  } catch (n) {
1978
1978
  this.log("调用服务端登出接口失败:", n);
1979
1979
  }
1980
- this.token = null, this.user = null, this.clearStorage(), this.config.logoutCallback && this.config.logoutCallback(), e && this.login();
1980
+ this.token = null, this.user = null, this.clearStorage(), this.config.logoutCallback && this.config.logoutCallback(), t && this.login();
1981
1981
  } catch (n) {
1982
1982
  this.log("登出失败:", n), this.handleError(n);
1983
1983
  }
@@ -1985,7 +1985,7 @@ class oo {
1985
1985
  /**
1986
1986
  * 发送带认证的HTTP请求
1987
1987
  */
1988
- async request(e, n = {}) {
1988
+ async request(t, n = {}) {
1989
1989
  const a = {
1990
1990
  headers: {
1991
1991
  "Content-Type": "application/json",
@@ -1995,7 +1995,7 @@ class oo {
1995
1995
  };
1996
1996
  a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
1997
1997
  try {
1998
- const s = await fetch(e, a);
1998
+ const s = await fetch(t, a);
1999
1999
  return s.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : s;
2000
2000
  } catch (s) {
2001
2001
  throw this.log("请求失败:", s), s;
@@ -2006,15 +2006,15 @@ class oo {
2006
2006
  */
2007
2007
  async fetchUserInfo() {
2008
2008
  try {
2009
- const e = await this.request(`${this.config.casServerUrl}/auth/user`);
2010
- if (e && e.ok) {
2011
- const n = await e.json();
2009
+ const t = await this.request(`${this.config.casServerUrl}/auth/user`);
2010
+ if (t && t.ok) {
2011
+ const n = await t.json();
2012
2012
  if (n.success && n.data)
2013
2013
  return this.user = n.data, this.saveToStorage(), this.user;
2014
2014
  }
2015
2015
  return null;
2016
- } catch (e) {
2017
- return this.log("获取用户信息失败:", e), null;
2016
+ } catch (t) {
2017
+ return this.log("获取用户信息失败:", t), null;
2018
2018
  }
2019
2019
  }
2020
2020
  /**
@@ -2026,14 +2026,14 @@ class oo {
2026
2026
  /**
2027
2027
  * 错误处理
2028
2028
  */
2029
- handleError(e) {
2030
- this.log("发生错误:", e), this.config.errorCallback && this.config.errorCallback(e);
2029
+ handleError(t) {
2030
+ this.log("发生错误:", t), this.config.errorCallback && this.config.errorCallback(t);
2031
2031
  }
2032
2032
  /**
2033
2033
  * 日志输出
2034
2034
  */
2035
- log(...e) {
2036
- this.config.debug && console.log("[OnePortal CAS SDK]", ...e);
2035
+ log(...t) {
2036
+ this.config.debug && console.log("[OnePortal CAS SDK]", ...t);
2037
2037
  }
2038
2038
  /**
2039
2039
  * 检查登录状态并自动处理
@@ -2044,200 +2044,199 @@ class oo {
2044
2044
  /**
2045
2045
  * 设置配置
2046
2046
  */
2047
- setConfig(e, n) {
2048
- this.config[e] = n;
2047
+ setConfig(t, n) {
2048
+ this.config[t] = n;
2049
2049
  }
2050
2050
  /**
2051
2051
  * 获取配置
2052
2052
  */
2053
- getConfig(e) {
2054
- return this.config[e];
2053
+ getConfig(t) {
2054
+ return this.config[t];
2055
2055
  }
2056
2056
  }
2057
- function lo(t, e = {}) {
2057
+ function lo(e, t = {}) {
2058
2058
  const a = Object.assign({
2059
2059
  manual: !1,
2060
2060
  // 手动执行
2061
2061
  log: !1,
2062
2062
  params: null,
2063
2063
  format: null
2064
- }, e), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, p = U([]), b = U(!1), y = (g) => {
2064
+ }, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y = U([]), p = U(!1), v = (g) => {
2065
2065
  const m = g || l;
2066
- b.value = !0, t(m).then((f) => {
2066
+ p.value = !0, e(m).then((f) => {
2067
2067
  const { code: c, data: h, msg: x } = f;
2068
2068
  if (r) {
2069
2069
  const { records: k, rows: C } = h || {}, E = k || C ? k || C : h;
2070
- p.value = ze(E, i), r(f);
2070
+ y.value = Oe(E, i), r(f);
2071
2071
  }
2072
2072
  if (h) {
2073
2073
  if (h.records != null || h.rows != null) {
2074
2074
  const { records: k, rows: C, total: E = 0 } = h || {};
2075
- m && m.total != null && (l.total = parseInt(E)), p.value = ze(k || C || [], i);
2075
+ m && m.total != null && (l.total = parseInt(E)), y.value = Oe(k || C || [], i);
2076
2076
  } else
2077
- p.value = ze(h, i);
2078
- o && console.log("useRequest-res", p.value);
2077
+ y.value = Oe(h, i);
2078
+ o && console.log("useRequest-res", y.value);
2079
2079
  }
2080
2080
  }).catch((f) => {
2081
2081
  r && (console.log("useRequestErr", f), r({ code: 500 }));
2082
2082
  }).finally(() => {
2083
- b.value = !1;
2083
+ p.value = !1;
2084
2084
  });
2085
2085
  };
2086
- return s || y(), [b, p, y];
2086
+ return s || v(), [p, y, v];
2087
2087
  }
2088
- function ao(t) {
2089
- const e = U(t), n = U(""), a = U("");
2090
- return Re(e, (s) => {
2088
+ function ao(e) {
2089
+ const t = U(e), n = U(""), a = U("");
2090
+ return Re(t, (s) => {
2091
2091
  const o = s || ["", ""];
2092
2092
  n.value = o[0], a.value = o[1];
2093
- }), [e, n, a];
2093
+ }), [t, n, a];
2094
2094
  }
2095
- function so(t) {
2096
- return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
2095
+ function so(e) {
2096
+ return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
2097
2097
  }
2098
- function ze(t, e) {
2099
- if (!e)
2100
- return t;
2101
- if (t instanceof Array)
2102
- return t.map((a) => {
2098
+ function Oe(e, t) {
2099
+ if (!t)
2100
+ return e;
2101
+ if (e instanceof Array)
2102
+ return e.map((a) => {
2103
2103
  let s = {};
2104
- return e.forEach((o) => s[o] = a[o]), s;
2104
+ return t.forEach((o) => s[o] = a[o]), s;
2105
2105
  });
2106
2106
  let n = {};
2107
- return e.forEach((a) => n[a] = t[a]), n;
2107
+ return t.forEach((a) => n[a] = e[a]), n;
2108
2108
  }
2109
- function ro(t, e = []) {
2110
- const { locale: n } = pe(), a = U(t());
2109
+ function ro(e, t = []) {
2110
+ const { locale: n } = pe(), a = U(e());
2111
2111
  return Re(
2112
- [n, ...e],
2112
+ [n, ...t],
2113
2113
  () => {
2114
- a.value = t();
2114
+ a.value = e();
2115
2115
  },
2116
2116
  { immediate: !0 }
2117
2117
  ), a;
2118
2118
  }
2119
- function io(t, e = "zh_cn", n = "en_us") {
2120
- if (!t)
2119
+ function io(e, t = "zh_cn", n = "en_us") {
2120
+ if (!e)
2121
2121
  return "-";
2122
- const a = { en_us: n, zh_cn: e }, o = Ke().global.locale.value;
2123
- return t[a[o]] || t[e] || "-";
2122
+ const a = { en_us: n, zh_cn: t }, o = Ke().global.locale.value;
2123
+ return e[a[o]] || e[t] || "-";
2124
2124
  }
2125
- function co(t, e) {
2125
+ function co(e, t) {
2126
2126
  let n = Pt;
2127
- return typeof t == "string" && t.length > 0 && (n = Ye(t).mapState), bt(e, n);
2127
+ return typeof e == "string" && e.length > 0 && (n = Ye(e).mapState), bt(t, n);
2128
2128
  }
2129
- function uo(t, e) {
2129
+ function uo(e, t) {
2130
2130
  let n = Rt;
2131
- return typeof t == "string" && t.length > 0 && (n = Ye(t).mapGetters), bt(e, n);
2131
+ return typeof e == "string" && e.length > 0 && (n = Ye(e).mapGetters), bt(t, n);
2132
2132
  }
2133
- function fo(t, e) {
2133
+ function fo(e, t) {
2134
2134
  let n = Bt;
2135
- return typeof t == "string" && t.length > 0 && (n = Ye(t).mapActions), $n(e, n);
2135
+ return typeof e == "string" && e.length > 0 && (n = Ye(e).mapActions), $n(t, n);
2136
2136
  }
2137
- function bt(t, e) {
2138
- const n = ut(), a = e(t), s = {};
2137
+ function bt(e, t) {
2138
+ const n = ut(), a = t(e), s = {};
2139
2139
  return Object.keys(a).forEach((o) => {
2140
2140
  const l = a[o].bind({ $store: n });
2141
2141
  s[o] = ce(l);
2142
2142
  }), s;
2143
2143
  }
2144
- function $n(t, e) {
2145
- const n = ut(), a = e(t), s = {};
2144
+ function $n(e, t) {
2145
+ const n = ut(), a = t(e), s = {};
2146
2146
  return Object.keys(a).forEach((o) => {
2147
2147
  s[o] = a[o].bind({ $store: n });
2148
2148
  }), s;
2149
2149
  }
2150
- function Oe(t) {
2151
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qt(t);
2150
+ function Le(e) {
2151
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !qt(e);
2152
2152
  }
2153
2153
  function ho() {
2154
2154
  ke.renderer.add("Enum", {
2155
2155
  // 默认显示模板
2156
- renderTableDefault(t, e) {
2156
+ renderTableDefault(e, t) {
2157
2157
  let n;
2158
- if ([null, void 0].includes(e.row[e.column.field]))
2158
+ if ([null, void 0].includes(t.row[t.column.field]))
2159
2159
  return "-";
2160
- const a = e.row[e.column.field];
2161
- if (t.type == "tag") {
2160
+ const a = t.row[t.column.field];
2161
+ if (e.type == "tag") {
2162
2162
  let s;
2163
2163
  return O(M("el-text"), {
2164
- type: t.enum.getTag(a)
2165
- }, Oe(s = t.enum.getName(a)) ? s : {
2164
+ type: e.enum.getTag(a)
2165
+ }, Le(s = e.enum.getName(a)) ? s : {
2166
2166
  default: () => [s]
2167
2167
  });
2168
2168
  }
2169
- return O(M("el-text"), null, Oe(n = t.enum.getName(a)) ? n : {
2169
+ return O(M("el-text"), null, Le(n = e.enum.getName(a)) ? n : {
2170
2170
  default: () => [n]
2171
2171
  });
2172
2172
  }
2173
2173
  }), ke.renderer.add("InputNumber", {
2174
2174
  // 默认显示模板
2175
- renderTableDefault(t, e) {
2175
+ renderTableDefault(e, t) {
2176
2176
  return O(It, ge({
2177
- modelValue: e.row[e.column.field],
2178
- "onUpdate:modelValue": (n) => e.row[e.column.field] = n
2179
- }, t.props, {
2177
+ modelValue: t.row[t.column.field],
2178
+ "onUpdate:modelValue": (n) => t.row[t.column.field] = n
2179
+ }, e.props, {
2180
2180
  "step-strictly": !0,
2181
2181
  "value-on-clear": 0
2182
2182
  }), null);
2183
2183
  }
2184
2184
  }), ke.renderer.add("TrueFalse", {
2185
2185
  // 默认显示模板
2186
- renderTableDefault(t, e) {
2186
+ renderTableDefault(e, t) {
2187
2187
  const {
2188
2188
  locale: n
2189
2189
  } = pe();
2190
2190
  let a = n.value == "zh_cn";
2191
2191
  return O(Lt, {
2192
- type: e.row[e.column.field] ? "success" : "danger"
2192
+ type: t.row[t.column.field] ? "success" : "danger"
2193
2193
  }, {
2194
- default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
2194
+ default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
2195
2195
  });
2196
2196
  }
2197
2197
  }), ke.renderer.add("I18n", {
2198
2198
  // 默认显示模板
2199
- renderTableDefault(t, e) {
2199
+ renderTableDefault(e, t) {
2200
2200
  const {
2201
2201
  locale: n
2202
2202
  } = pe();
2203
- let a = n.value == "zh_cn" ? e.column.field : t.fieldEn;
2204
- return e.row[a] || e.row[e.column.field];
2203
+ let a = n.value == "zh_cn" ? t.column.field : e.fieldEn;
2204
+ return t.row[a] || t.row[t.column.field];
2205
2205
  }
2206
2206
  }), ke.renderer.add("Link", {
2207
2207
  // 默认显示模板
2208
- renderTableDefault(t, e) {
2209
- var r;
2210
- let n = e.column.field;
2208
+ renderTableDefault(e, t) {
2209
+ let n = t.column.field;
2211
2210
  const a = Ut(), {
2212
2211
  multiple: s,
2213
- to: o
2214
- } = t;
2215
- if (!s)
2216
- return O(Je, {
2212
+ to: o,
2213
+ openType: l = "system"
2214
+ } = e, r = t.row[n];
2215
+ function i(y, p) {
2216
+ l == "blank" ? window.open(y) : a.push({
2217
+ path: y,
2218
+ query: {
2219
+ [n]: p
2220
+ }
2221
+ });
2222
+ }
2223
+ if (s) {
2224
+ const y = (r == null ? void 0 : r.split(",")) || [];
2225
+ return y.map((p, v) => O("span", null, [O(Je, {
2217
2226
  underline: "never",
2218
2227
  type: "primary",
2219
- onclick: () => a.push({
2220
- path: o,
2221
- query: {
2222
- [n]: e.row[n]
2223
- }
2224
- })
2225
- }, {
2226
- default: () => [e.row[n]]
2227
- });
2228
- const l = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
2229
- return l.map((i, p) => O("span", null, [O(Je, {
2228
+ onclick: () => i(l == "stystem" ? o : p, p)
2229
+ }, Le(p) ? p : {
2230
+ default: () => [p]
2231
+ }), v < y.length - 1 ? "," : ""]));
2232
+ }
2233
+ return O(Je, {
2230
2234
  underline: "never",
2231
2235
  type: "primary",
2232
- onclick: () => a.push({
2233
- path: o,
2234
- query: {
2235
- [n]: i
2236
- }
2237
- })
2238
- }, Oe(i) ? i : {
2239
- default: () => [i]
2240
- }), p < l.length - 1 ? "," : ""]));
2236
+ onclick: () => i(l == "stystem" ? o : r, r)
2237
+ }, Le(r) ? r : {
2238
+ default: () => [r]
2239
+ });
2241
2240
  }
2242
2241
  });
2243
2242
  }