joy-admin-components 0.2.60 → 0.2.62

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.
@@ -13,10 +13,13 @@ const qn = nt({
13
13
  setup(e, { slots: t, attrs: n, emit: a }) {
14
14
  const s = P(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
- var i;
16
+ var i, p;
17
17
  return ze(
18
18
  St,
19
- { span: ((i = r.props) == null ? void 0 : i.span) || 24 },
19
+ {
20
+ span: ((i = r.props) == null ? void 0 : i.span) || 24,
21
+ ...(p = r.props) == null ? void 0 : p.colProps
22
+ },
20
23
  {
21
24
  default: () => r
22
25
  }
@@ -49,17 +52,17 @@ var ht = { exports: {} };
49
52
  return function(o, l, r) {
50
53
  var i = l.prototype;
51
54
  r.utc = function(c) {
52
- var p = { date: c, utc: !0, args: arguments };
53
- return new l(p);
55
+ var y = { date: c, utc: !0, args: arguments };
56
+ return new l(y);
54
57
  }, i.utc = function(c) {
55
- var p = r(this.toDate(), { locale: this.$L, utc: !0 });
56
- return c ? p.add(this.utcOffset(), n) : p;
58
+ var y = r(this.toDate(), { locale: this.$L, utc: !0 });
59
+ return c ? y.add(this.utcOffset(), n) : y;
57
60
  }, i.local = function() {
58
61
  return r(this.toDate(), { locale: this.$L, utc: !1 });
59
62
  };
60
- var v = i.parse;
63
+ var p = i.parse;
61
64
  i.parse = function(c) {
62
- c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), v.call(this, c);
65
+ c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), p.call(this, c);
63
66
  };
64
67
  var m = i.init;
65
68
  i.init = function() {
@@ -70,7 +73,7 @@ var ht = { exports: {} };
70
73
  m.call(this);
71
74
  };
72
75
  var b = i.utcOffset;
73
- i.utcOffset = function(c, p) {
76
+ i.utcOffset = function(c, y) {
74
77
  var w = this.$utils().u;
75
78
  if (w(c))
76
79
  return this.$u ? 0 : w(this.$offset) ? b.call(this) : this.$offset;
@@ -85,17 +88,17 @@ var ht = { exports: {} };
85
88
  return this;
86
89
  var x = Math.abs(c) <= 16 ? 60 * c : c;
87
90
  if (x === 0)
88
- return this.utc(p);
91
+ return this.utc(y);
89
92
  var C = this.clone();
90
- if (p)
93
+ if (y)
91
94
  return C.$offset = x, C.$u = !1, C;
92
95
  var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
93
96
  return (C = this.local().add(x + S, n)).$offset = x, C.$x.$localOffset = S, C;
94
97
  };
95
98
  var g = i.format;
96
99
  i.format = function(c) {
97
- var p = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
98
- return g.call(this, p);
100
+ var y = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
101
+ return g.call(this, y);
99
102
  }, i.valueOf = function() {
100
103
  var c = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
101
104
  return this.$d.valueOf() - 6e4 * c;
@@ -111,11 +114,11 @@ var ht = { exports: {} };
111
114
  return c === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : h.call(this);
112
115
  };
113
116
  var f = i.diff;
114
- i.diff = function(c, p, w) {
117
+ i.diff = function(c, y, w) {
115
118
  if (c && this.$u === c.$u)
116
- return f.call(this, c, p, w);
119
+ return f.call(this, c, y, w);
117
120
  var x = this.local(), C = r(c).local();
118
- return f.call(x, C, p, w);
121
+ return f.call(x, C, y, w);
119
122
  };
120
123
  };
121
124
  });
@@ -131,15 +134,15 @@ var mt = { exports: {} };
131
134
  return function(s, o, l) {
132
135
  var r, i = function(g, h, f) {
133
136
  f === void 0 && (f = {});
134
- var c = new Date(g), p = function(w, x) {
137
+ var c = new Date(g), y = function(w, x) {
135
138
  x === void 0 && (x = {});
136
139
  var C = x.timeZoneName || "short", S = w + "|" + C, M = a[S];
137
140
  return M || (M = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[S] = M), M;
138
141
  }(h, f);
139
- return p.formatToParts(c);
140
- }, v = function(g, h) {
141
- for (var f = i(g, h), c = [], p = 0; p < f.length; p += 1) {
142
- var w = f[p], x = w.type, C = w.value, S = n[x];
142
+ return y.formatToParts(c);
143
+ }, p = function(g, h) {
144
+ for (var f = i(g, h), c = [], y = 0; y < f.length; y += 1) {
145
+ var w = f[y], x = w.type, C = w.value, S = n[x];
143
146
  S >= 0 && (c[S] = parseInt(C, 10));
144
147
  }
145
148
  var M = c[3], Y = M === 24 ? 0 : M, E = c[0] + "-" + c[1] + "-" + c[2] + " " + Y + ":" + c[4] + ":" + c[5] + ":000", G = +g;
@@ -147,7 +150,7 @@ var mt = { exports: {} };
147
150
  }, m = o.prototype;
148
151
  m.tz = function(g, h) {
149
152
  g === void 0 && (g = r);
150
- var f, c = this.utcOffset(), p = this.toDate(), w = p.toLocaleString("en-US", { timeZone: g }), x = Math.round((p - new Date(w)) / 1e3 / 60), C = 15 * -Math.round(p.getTimezoneOffset() / 15) - x;
153
+ var f, c = this.utcOffset(), y = this.toDate(), w = y.toLocaleString("en-US", { timeZone: g }), x = Math.round((y - new Date(w)) / 1e3 / 60), C = 15 * -Math.round(y.getTimezoneOffset() / 15) - x;
151
154
  if (!Number(C))
152
155
  f = this.utcOffset(0, h);
153
156
  else if (f = l(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), h) {
@@ -168,17 +171,17 @@ var mt = { exports: {} };
168
171
  var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
169
172
  return b.call(f, g, h).tz(this.$x.$timezone, !0);
170
173
  }, l.tz = function(g, h, f) {
171
- var c = f && h, p = f || h || r, w = v(+l(), p);
174
+ var c = f && h, y = f || h || r, w = p(+l(), y);
172
175
  if (typeof g != "string")
173
- return l(g).tz(p);
176
+ return l(g).tz(y);
174
177
  var x = function(Y, E, G) {
175
- var _ = Y - 60 * E * 1e3, y = v(_, G);
176
- if (E === y)
178
+ var _ = Y - 60 * E * 1e3, v = p(_, G);
179
+ if (E === v)
177
180
  return [_, E];
178
- var k = v(_ -= 60 * (y - E) * 1e3, G);
179
- return y === k ? [_, y] : [Y - 60 * Math.min(y, k) * 1e3, Math.max(y, k)];
180
- }(l.utc(g, c).valueOf(), w, p), C = x[0], S = x[1], M = l(C).utcOffset(S);
181
- return M.$x.$timezone = p, M;
181
+ var k = p(_ -= 60 * (v - E) * 1e3, G);
182
+ return v === k ? [_, v] : [Y - 60 * Math.min(v, k) * 1e3, Math.max(v, k)];
183
+ }(l.utc(g, c).valueOf(), w, y), C = x[0], S = x[1], M = l(C).utcOffset(S);
184
+ return M.$x.$timezone = y, M;
182
185
  }, l.tz.guess = function() {
183
186
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
184
187
  }, l.tz.setDefault = function(g) {
@@ -294,11 +297,11 @@ async function An(e, t) {
294
297
  const o = {};
295
298
  return s.eachSheet(function(l, r) {
296
299
  const i = [];
297
- l.eachRow(function(v, m) {
300
+ l.eachRow(function(p, m) {
298
301
  if (m > a) {
299
302
  let b = {}, g = !0;
300
303
  Object.keys(n).forEach((h) => {
301
- const f = v.getCell(n[h]).value;
304
+ const f = p.getCell(n[h]).value;
302
305
  b[h] = f, f && (g = !1);
303
306
  }), g || i.push(b);
304
307
  }
@@ -318,10 +321,10 @@ async function Un(e, t, n = [], a = {}) {
318
321
  const { workbook: l, worksheet: r } = Gt();
319
322
  r.columns = t, r.addRows(n), s && await Jt(l, r, s);
320
323
  try {
321
- const i = await l.xlsx.writeBuffer(), v = new File([i], e, {
324
+ const i = await l.xlsx.writeBuffer(), p = new File([i], e, {
322
325
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
323
326
  });
324
- it(v);
327
+ it(p);
325
328
  } catch (i) {
326
329
  console.log(i);
327
330
  }
@@ -361,10 +364,10 @@ async function Xt(e, t, n, a) {
361
364
  }
362
365
  }
363
366
  async function Qt(e, t, n, a) {
364
- const { col: s, row: o, width: l, height: r } = a, { success: i, base64: v } = await en(n, 0.3);
367
+ const { col: s, row: o, width: l, height: r } = a, { success: i, base64: p } = await en(n, 0.3);
365
368
  if (i) {
366
369
  const m = e.addImage({
367
- base64: v,
370
+ base64: p,
368
371
  extension: "jpeg"
369
372
  });
370
373
  t.addImage(m, {
@@ -400,13 +403,13 @@ async function tn(e, t) {
400
403
  const o = {};
401
404
  return s.eachSheet(function(l, r) {
402
405
  if (l.state == "visible") {
403
- const i = [], v = n[l._name];
404
- if (v) {
405
- let m = Object.values(v).some((g) => g.includes("image")), b = {};
406
+ const i = [], p = n[l._name];
407
+ if (p) {
408
+ let m = Object.values(p).some((g) => g.includes("image")), b = {};
406
409
  m && (l.getImages().forEach((h) => {
407
- const { tl: f } = h.range, c = s.model.media.find((p) => p.index === h.imageId);
410
+ const { tl: f } = h.range, c = s.model.media.find((y) => y.index === h.imageId);
408
411
  if (c) {
409
- const p = c.buffer.toString("base64"), w = `data:image/${c.extension};base64,${p}`, x = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
412
+ const y = c.buffer.toString("base64"), w = `data:image/${c.extension};base64,${y}`, x = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
410
413
  b[x] ? b[x].push(w) : b[x] = [w];
411
414
  }
412
415
  }), console.log("withImages-imageMap", b)), l.eachRow(function(g, h) {
@@ -414,9 +417,9 @@ async function tn(e, t) {
414
417
  let f = {
415
418
  _excelRowNumber: h
416
419
  }, c = !0;
417
- Object.keys(v).forEach((p) => {
420
+ Object.keys(p).forEach((y) => {
418
421
  var M;
419
- let [w, x] = v[p].split(Ue);
422
+ let [w, x] = p[y].split(Ue);
420
423
  const C = g.getCell(w);
421
424
  let S;
422
425
  if (x == "image" && m) {
@@ -424,7 +427,7 @@ async function tn(e, t) {
424
427
  S = b[E] || "";
425
428
  } else
426
429
  C.result != null ? S = C.result : (M = C.value) != null && M.richText ? S = C.value.richText.reduce((Y, E) => Y + E.text, "") : C.type == 4 && C.value ? S = $e(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = C.value;
427
- S && x == "option" && (S = S.split(Ue)[1]), f[p] = S, S && (c = !1);
430
+ S && x == "option" && (S = S.split(Ue)[1]), f[y] = S, S && (c = !1);
428
431
  }), c || i.push(f);
429
432
  }
430
433
  }), o[l._name] = i;
@@ -447,9 +450,9 @@ async function on(e, t) {
447
450
  continue;
448
451
  const { tableHeader: l, tableData: r } = o;
449
452
  l.forEach((i) => {
450
- const { style: v = {}, required: m } = i, { font: b = {} } = v;
453
+ const { style: p = {}, required: m } = i, { font: b = {} } = p;
451
454
  i.style = {
452
- ...v,
455
+ ...p,
453
456
  font: {
454
457
  ...b,
455
458
  color: {
@@ -458,14 +461,14 @@ async function on(e, t) {
458
461
  }
459
462
  };
460
463
  }), a.columns = l, a.addRows(r), l.forEach((i) => {
461
- let { header: v, key: m, width: b, option: g, numFmt: h, locked: f, optionFormater: c } = i;
462
- const p = a.getColumn(m);
463
- if (p.numFmt = nn[h] || h, p.width = b || s, p.protection = { locked: f === !0 }, g) {
464
+ let { header: p, key: m, width: b, option: g, numFmt: h, locked: f, optionFormater: c } = i;
465
+ const y = a.getColumn(m);
466
+ if (y.numFmt = nn[h] || h, y.width = b || s, y.protection = { locked: f === !0 }, g) {
464
467
  const w = n.addWorksheet(m);
465
468
  w.state = "hidden", c || (c = (x) => `${x.label}${Ue}${x.value}`), w.getColumn(1).values = g.map(c), Array(100).fill("").forEach((x, C) => {
466
469
  if (C > 0) {
467
470
  const S = Ce();
468
- a.getCell(`${p.letter}${C}`).dataValidation = {
471
+ a.getCell(`${y.letter}${C}`).dataValidation = {
469
472
  type: "list",
470
473
  formulae: [`${m}!$A$1:$A$${g.length}`],
471
474
  showErrorMessage: !0,
@@ -657,71 +660,71 @@ const Se = (e, t) => {
657
660
  }),
658
661
  emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
659
662
  setup(e, { emit: t }) {
660
- const n = e, a = It(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), v = ce(() => {
663
+ const n = e, a = It(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), p = ce(() => {
661
664
  if (a.remote !== void 0)
662
665
  return n.data;
663
- const y = pt(i.value), { data: k, labelValue: T } = n, J = k || g.value;
664
- if (y.length == 0)
666
+ const v = pt(i.value), { data: k, labelValue: T } = n, J = k || g.value;
667
+ if (v.length == 0)
665
668
  return J;
666
669
  const { label: $, labelEn: ye } = T;
667
670
  let O = o.value == "en_us" ? ye || "i18nName" : $;
668
- return y.length == 1 ? J.filter(
669
- (de) => de[O].toLowerCase().includes(y[0].toLowerCase())
671
+ return v.length == 1 ? J.filter(
672
+ (de) => de[O].toLowerCase().includes(v[0].toLowerCase())
670
673
  ) : J.filter((de) => {
671
674
  let ve = !1;
672
- return ve = y.some((Le) => de[O].toLowerCase() == Le.toLowerCase()), ve;
675
+ return ve = v.some((Le) => de[O].toLowerCase() == Le.toLowerCase()), ve;
673
676
  });
674
677
  }), m = ce({
675
678
  get() {
676
- return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
679
+ return a.multiple == null || l.value == null ? !1 : l.value.length == p.value.length;
677
680
  },
678
- set(y) {
679
- return y;
681
+ set(v) {
682
+ return v;
680
683
  }
681
684
  }), b = t, g = P([]), h = async () => {
682
- const { data: y } = await n.api();
683
- g.value = [...y], b("success", g);
685
+ const { data: v } = await n.api();
686
+ g.value = [...v], b("success", g);
684
687
  };
685
688
  n.api && h();
686
- function f(y) {
687
- b("change", y), c.value && we(() => {
689
+ function f(v) {
690
+ b("change", v), c.value && we(() => {
688
691
  n.optionClick && n.optionClick(c.value), c.value = null;
689
692
  });
690
693
  }
691
694
  const c = P(null);
692
- function p(y) {
693
- c.value = y;
695
+ function y(v) {
696
+ c.value = v;
694
697
  }
695
- const w = n.labelValue.label.split("-"), x = (y) => {
698
+ const w = n.labelValue.label.split("-"), x = (v) => {
696
699
  if (w.length == 1) {
697
700
  if (n.changeLocal)
698
- return s(y[n.labelValue.label]);
699
- let k = o.value == "en_us" ? y[n.labelValue.labelEn || "i18nName"] : y[n.labelValue.label];
700
- return k = k || y[n.labelValue.label], k + "";
701
+ return s(v[n.labelValue.label]);
702
+ let k = o.value == "en_us" ? v[n.labelValue.labelEn || "i18nName"] : v[n.labelValue.label];
703
+ return k = k || v[n.labelValue.label], k + "";
701
704
  } else {
702
705
  let k = [];
703
706
  return w.forEach((T) => {
704
- k.push(y[T]);
707
+ k.push(v[T]);
705
708
  }), k.join("-");
706
709
  }
707
710
  };
708
- function C(y) {
711
+ function C(v) {
709
712
  let k = n.data ? n.data : g.value;
710
- l.value = y ? k.map((T) => r.value ? T : T[n.labelValue.value]) : [], we(() => {
713
+ l.value = v ? k.map((T) => r.value ? T : T[n.labelValue.value]) : [], we(() => {
711
714
  b("change", l.value), b("changeAll", l.value, k);
712
715
  });
713
716
  }
714
- function S(y) {
715
- b("change", r.value ? y : y[n.labelValue.value]), we(() => {
716
- n.optionClick && n.optionClick(y);
717
+ function S(v) {
718
+ b("change", r.value ? v : v[n.labelValue.value]), we(() => {
719
+ n.optionClick && n.optionClick(v);
717
720
  });
718
721
  }
719
- function M(y) {
720
- const k = r.value ? y : y[n.labelValue.value], T = r.value ? l.value.some((J) => J[n.labelValue.value] === y[n.labelValue.value]) : l.value.includes(k);
722
+ function M(v) {
723
+ const k = r.value ? v : v[n.labelValue.value], T = r.value ? l.value.some((J) => J[n.labelValue.value] === v[n.labelValue.value]) : l.value.includes(k);
721
724
  return !!(n.maxLimit > 0 && l.value.length >= n.maxLimit && !T || n.minLimit > 0 && l.value.length === n.minLimit && T);
722
725
  }
723
- function Y(y) {
724
- return y.map((k) => ({
726
+ function Y(v) {
727
+ return v.map((k) => ({
725
728
  ...k,
726
729
  label: x(k),
727
730
  value: r.value ? k : k[n.labelValue.value]
@@ -730,9 +733,9 @@ const Se = (e, t) => {
730
733
  const E = P([]), G = n.data ? n.data : g.value;
731
734
  E.value = Y(G), Pe(
732
735
  () => n.data ? n.data : g.value,
733
- (y) => {
736
+ (v) => {
734
737
  var T;
735
- const k = Y(y);
738
+ const k = Y(v);
736
739
  if (k.length !== E.value.length)
737
740
  E.value = k;
738
741
  else {
@@ -747,11 +750,11 @@ const Se = (e, t) => {
747
750
  },
748
751
  { deep: !0 }
749
752
  );
750
- const _ = ce(() => a.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? E.value.map((y) => ({
751
- ...y,
752
- disabled: M(y)
753
+ const _ = ce(() => a.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? E.value.map((v) => ({
754
+ ...v,
755
+ disabled: M(v)
753
756
  })) : E.value);
754
- return (y, k) => {
757
+ return (v, k) => {
755
758
  const T = q("el-checkbox"), J = q("el-select-v2"), $ = q("el-option"), ye = q("el-select");
756
759
  return H(a).v2 != null ? (I(), N(J, ue({
757
760
  key: 0,
@@ -768,7 +771,7 @@ const Se = (e, t) => {
768
771
  }), lt({
769
772
  default: z(({ item: O }) => [
770
773
  re("div", {
771
- onClick: (he) => p(O)
774
+ onClick: (he) => y(O)
772
775
  }, te(O.label), 9, sn)
773
776
  ]),
774
777
  _: 2
@@ -776,7 +779,7 @@ const Se = (e, t) => {
776
779
  H(a).multiple != null ? {
777
780
  name: "header",
778
781
  fn: z(() => [
779
- ee(y.$slots, "header", {}, () => [
782
+ ee(v.$slots, "header", {}, () => [
780
783
  V(T, {
781
784
  class: "mgl20",
782
785
  modelValue: m.value,
@@ -784,7 +787,7 @@ const Se = (e, t) => {
784
787
  onChange: C
785
788
  }, {
786
789
  default: z(() => [
787
- ne(te(y.$t("quan-xuan")), 1)
790
+ ne(te(v.$t("quan-xuan")), 1)
788
791
  ]),
789
792
  _: 1
790
793
  }, 8, ["modelValue"])
@@ -803,7 +806,7 @@ const Se = (e, t) => {
803
806
  clearable: ""
804
807
  }, H(a), { onClear: e.optionClick }), {
805
808
  default: z(() => [
806
- H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? ee(y.$slots, "header", { key: 0 }, () => [
809
+ H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? ee(v.$slots, "header", { key: 0 }, () => [
807
810
  V(T, {
808
811
  class: "mgl20",
809
812
  modelValue: m.value,
@@ -811,12 +814,12 @@ const Se = (e, t) => {
811
814
  onChange: C
812
815
  }, {
813
816
  default: z(() => [
814
- ne(te(y.$t("quan-xuan")), 1)
817
+ ne(te(v.$t("quan-xuan")), 1)
815
818
  ]),
816
819
  _: 1
817
820
  }, 8, ["modelValue"])
818
821
  ], !0) : fe("", !0),
819
- (I(!0), ie(Oe, null, at(v.value, (O, he) => (I(), N($, {
822
+ (I(!0), ie(Oe, null, at(p.value, (O, he) => (I(), N($, {
820
823
  key: he,
821
824
  label: x(O),
822
825
  disabled: H(a).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? M(O) : !1,
@@ -910,7 +913,7 @@ const fn = ["accept"], hn = {
910
913
  type: "primary",
911
914
  loading: s.value,
912
915
  class: "mgr10",
913
- onClick: r[0] || (r[0] = (v) => a.value.click())
916
+ onClick: r[0] || (r[0] = (p) => a.value.click())
914
917
  }, l.$attrs), {
915
918
  default: z(() => [
916
919
  ee(l.$slots, "default", {}, () => [
@@ -940,9 +943,9 @@ function je(e) {
940
943
  t[a] = pt(l);
941
944
  else if (s == "date")
942
945
  if (r.includes("range")) {
943
- const [i, v] = a;
946
+ const [i, p] = a;
944
947
  let [m, b] = l || [];
945
- m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"), b = $e(b).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[v] = b;
948
+ m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"), b = $e(b).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[p] = b;
946
949
  } else
947
950
  t[a] = l;
948
951
  else
@@ -963,7 +966,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
963
966
  datetimerange: "YYYY-MM-DD HH:mm:ss",
964
967
  daterange: "YYYY-MM-DD",
965
968
  month: "YYYY-MM"
966
- }, v = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
969
+ }, p = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
967
970
  function m() {
968
971
  s("confirm");
969
972
  }
@@ -980,13 +983,13 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
980
983
  return je(a.form.items);
981
984
  }
982
985
  const c = ct(a.form.items);
983
- function p() {
986
+ function y() {
984
987
  a.form.items.forEach((w) => {
985
988
  const x = c.find((C) => C.key == w.key);
986
989
  x && (w.value = x.value);
987
990
  });
988
991
  }
989
- return t({ getPrm: f, reset: p }), (w, x) => {
992
+ return t({ getPrm: f, reset: y }), (w, x) => {
990
993
  const C = q("el-input"), S = q("el-date-picker"), M = q("el-form-item"), Y = q("el-form"), E = q("el-link"), G = q("el-button");
991
994
  return I(), ie("div", {
992
995
  class: "searchBar-container mgt10 mgb10",
@@ -1009,13 +1012,13 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
1009
1012
  label: _.name
1010
1013
  }, {
1011
1014
  default: z(() => {
1012
- var y, k;
1015
+ var v, k;
1013
1016
  return [
1014
1017
  _.type === "input" ? (I(), N(C, {
1015
1018
  key: 0,
1016
1019
  modelValue: _.value,
1017
1020
  "onUpdate:modelValue": (T) => _.value = T,
1018
- class: rt(((y = _.option) == null ? void 0 : y.class) || "w150"),
1021
+ class: rt(((v = _.option) == null ? void 0 : v.class) || "w150"),
1019
1022
  placeholder: w.$t("qing-shu-ru"),
1020
1023
  clearable: ""
1021
1024
  }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (I(), N(st(_.render), { key: 1 })) : fe("", !0),
@@ -1066,7 +1069,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
1066
1069
  V(yt, {
1067
1070
  name: o.value ? "ArrowUp" : "ArrowDown"
1068
1071
  }, null, 8, ["name"]),
1069
- ne(" " + te(v.value), 1)
1072
+ ne(" " + te(p.value), 1)
1070
1073
  ]),
1071
1074
  _: 1
1072
1075
  }),
@@ -1180,19 +1183,19 @@ const Cn = { class: "center" }, xn = {
1180
1183
  setup(e, { expose: t }) {
1181
1184
  const { t: n, locale: a } = pe(), s = Ut(), o = wn(), l = e, r = P(!1), i = P([]);
1182
1185
  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 = []);
1183
- const v = ce(() => {
1186
+ const p = ce(() => {
1184
1187
  const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
1185
1188
  return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
1186
1189
  }), m = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ee({
1187
1190
  [b]: 1,
1188
1191
  [g]: l.searchForm.defaultPageSize || o.defaultPageSize,
1189
1192
  total: 0
1190
- }), f = P(null), c = P(null), p = P(450), w = Re(() => {
1193
+ }), f = P(null), c = P(null), y = P(450), w = Re(() => {
1191
1194
  we(() => {
1192
1195
  if (!c.value)
1193
1196
  return;
1194
1197
  const u = c.value.getBoundingClientRect(), L = window.innerHeight, D = u.top, R = 100, Z = L - D - R, A = 200;
1195
- p.value = Math.max(Z, A);
1198
+ y.value = Math.max(Z, A);
1196
1199
  });
1197
1200
  }, 100), x = () => {
1198
1201
  w();
@@ -1223,7 +1226,7 @@ const Cn = { class: "center" }, xn = {
1223
1226
  }
1224
1227
  }
1225
1228
  });
1226
- const S = ce(() => J.value.height || p.value);
1229
+ const S = ce(() => J.value.height || y.value);
1227
1230
  let M;
1228
1231
  async function Y(d) {
1229
1232
  const { dataFormat: u } = l.tableConfig;
@@ -1271,7 +1274,7 @@ const Cn = { class: "center" }, xn = {
1271
1274
  function _() {
1272
1275
  return { ...h, ...je(l.searchForm.items) };
1273
1276
  }
1274
- const y = () => {
1277
+ const v = () => {
1275
1278
  const d = f.value;
1276
1279
  d && d.clearSort();
1277
1280
  }, k = Ee({
@@ -1523,7 +1526,7 @@ const Cn = { class: "center" }, xn = {
1523
1526
  l.searchForm.selections = L;
1524
1527
  }
1525
1528
  };
1526
- return t({ tableRef: f, getList: E, getPrm: _, clearSort: y, calculateTableHeight: w }), (d, u) => {
1529
+ return t({ tableRef: f, getList: E, getPrm: _, clearSort: v, calculateTableHeight: w }), (d, u) => {
1527
1530
  var U;
1528
1531
  const L = q("el-button"), D = q("el-checkbox"), R = q("el-text"), Z = q("vxe-column"), A = q("VxeTable"), se = q("el-pagination");
1529
1532
  return I(), ie("div", {
@@ -1558,7 +1561,7 @@ const Cn = { class: "center" }, xn = {
1558
1561
  ref: c
1559
1562
  }, [
1560
1563
  V(A, ue({
1561
- id: v.value,
1564
+ id: p.value,
1562
1565
  ref_key: "tableRef",
1563
1566
  ref: f,
1564
1567
  loading: e.loading || r.value,
@@ -1703,7 +1706,7 @@ async function et(e) {
1703
1706
  y: 0
1704
1707
  }
1705
1708
  };
1706
- n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", m), window.addEventListener("resize", b);
1709
+ n.addEventListener("mousedown", i), document.addEventListener("mousemove", p), document.addEventListener("mouseup", m), window.addEventListener("resize", b);
1707
1710
  function l() {
1708
1711
  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();
1709
1712
  }
@@ -1720,7 +1723,7 @@ async function et(e) {
1720
1723
  y: h.clientY
1721
1724
  }, s = !0);
1722
1725
  }
1723
- function v(h) {
1726
+ function p(h) {
1724
1727
  s && (o.drag = {
1725
1728
  x: h.clientX,
1726
1729
  y: h.clientY
@@ -1738,7 +1741,7 @@ async function et(e) {
1738
1741
  }, 500);
1739
1742
  });
1740
1743
  }
1741
- e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = v, e.__sizeChange__ = b;
1744
+ e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = p, e.__sizeChange__ = b;
1742
1745
  }
1743
1746
  function tt(e) {
1744
1747
  document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
@@ -1770,15 +1773,15 @@ const _n = {
1770
1773
  a("confirm");
1771
1774
  }, 300);
1772
1775
  async function l() {
1773
- n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Lt.confirm(s("que-ding-guan-bi-ma"), {
1776
+ n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : n.layer.closeConfirm ? await Lt.confirm(s("que-ding-guan-bi-ma"), {
1774
1777
  confirmButtonText: s("que-ding"),
1775
1778
  cancelButtonText: s("qu-xiao"),
1776
1779
  type: "warning"
1777
1780
  }).catch(() => {
1778
- }) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
1781
+ }) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
1779
1782
  }
1780
1783
  return (r, i) => {
1781
- const v = q("el-button"), m = q("el-drawer"), b = q("el-dialog");
1784
+ const p = q("el-button"), m = q("el-drawer"), b = q("el-dialog");
1782
1785
  return e.layer.type ? (I(), N(m, {
1783
1786
  key: 0,
1784
1787
  modelValue: e.layer.show,
@@ -1795,13 +1798,13 @@ const _n = {
1795
1798
  i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
1796
1799
  e.layer.showButton ? (I(), ie("div", _n, [
1797
1800
  ee(r.$slots, "btn", {}, () => [
1798
- V(v, { onClick: l }, {
1801
+ V(p, { onClick: l }, {
1799
1802
  default: z(() => [
1800
1803
  ne(te(r.$t("qu-xiao")), 1)
1801
1804
  ]),
1802
1805
  _: 1
1803
1806
  }),
1804
- V(v, {
1807
+ V(p, {
1805
1808
  type: "primary",
1806
1809
  loading: e.loading,
1807
1810
  onClick: H(o)
@@ -1833,13 +1836,13 @@ const _n = {
1833
1836
  name: "footer",
1834
1837
  fn: z(() => [
1835
1838
  ee(r.$slots, "btn", {}, () => [
1836
- V(v, { onClick: l }, {
1839
+ V(p, { onClick: l }, {
1837
1840
  default: z(() => [
1838
1841
  ne(te(r.$t("qu-xiao")), 1)
1839
1842
  ]),
1840
1843
  _: 1
1841
1844
  }),
1842
- V(v, {
1845
+ V(p, {
1843
1846
  type: "primary",
1844
1847
  onClick: H(o)
1845
1848
  }, {
@@ -1869,7 +1872,7 @@ function oo(e, t = {}) {
1869
1872
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
1870
1873
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
1871
1874
  }[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
1872
- return o ? function(v, m, b) {
1875
+ return o ? function(p, m, b) {
1873
1876
  if (r) {
1874
1877
  s.test(m) ? b() : b(new Error(i));
1875
1878
  return;
@@ -2090,21 +2093,21 @@ function ao(e, t = {}) {
2090
2093
  log: !1,
2091
2094
  params: null,
2092
2095
  format: null
2093
- }, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = P([]), m = P(!1), b = (g) => {
2096
+ }, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, p = P([]), m = P(!1), b = (g) => {
2094
2097
  const h = g || l;
2095
2098
  m.value = !0, e(h).then((f) => {
2096
- const { code: c, data: p, msg: w } = f;
2099
+ const { code: c, data: y, msg: w } = f;
2097
2100
  if (r) {
2098
- const { records: x, rows: C } = p || {}, S = x || C ? x || C : p;
2099
- v.value = Me(S, i), r(f);
2101
+ const { records: x, rows: C } = y || {}, S = x || C ? x || C : y;
2102
+ p.value = Me(S, i), r(f);
2100
2103
  }
2101
- if (p) {
2102
- if (p.records != null || p.rows != null) {
2103
- const { records: x, rows: C, total: S = 0 } = p || {};
2104
- h && h.total != null && (l.total = parseInt(S)), v.value = Me(x || C || [], i);
2104
+ if (y) {
2105
+ if (y.records != null || y.rows != null) {
2106
+ const { records: x, rows: C, total: S = 0 } = y || {};
2107
+ h && h.total != null && (l.total = parseInt(S)), p.value = Me(x || C || [], i);
2105
2108
  } else
2106
- v.value = Me(p, i);
2107
- o && console.log("useRequest-res", v.value);
2109
+ p.value = Me(y, i);
2110
+ o && console.log("useRequest-res", p.value);
2108
2111
  }
2109
2112
  }).catch((f) => {
2110
2113
  r && (console.log("useRequestErr", f), r({ code: 500 }));
@@ -2112,7 +2115,7 @@ function ao(e, t = {}) {
2112
2115
  m.value = !1;
2113
2116
  });
2114
2117
  };
2115
- return s || b(), [m, v, b];
2118
+ return s || b(), [m, p, b];
2116
2119
  }
2117
2120
  function so(e) {
2118
2121
  const t = P(e), n = P(""), a = P("");
@@ -2241,23 +2244,23 @@ function mo() {
2241
2244
  to: o,
2242
2245
  openType: l = "system"
2243
2246
  } = e, r = t.row[n];
2244
- function i(v, m) {
2245
- l == "blank" ? window.open(v) : a.push({
2246
- path: v,
2247
+ function i(p, m) {
2248
+ l == "blank" ? window.open(p) : a.push({
2249
+ path: p,
2247
2250
  query: {
2248
2251
  [n]: m
2249
2252
  }
2250
2253
  });
2251
2254
  }
2252
2255
  if (s) {
2253
- const v = (r == null ? void 0 : r.split(",")) || [];
2254
- return v.map((m, b) => V("span", null, [V(Ge, {
2256
+ const p = (r == null ? void 0 : r.split(",")) || [];
2257
+ return p.map((m, b) => V("span", null, [V(Ge, {
2255
2258
  underline: "never",
2256
2259
  type: "primary",
2257
2260
  onclick: () => i(l == "stystem" ? o : m, m)
2258
2261
  }, Fe(m) ? m : {
2259
2262
  default: () => [m]
2260
- }), b < v.length - 1 ? "," : ""]));
2263
+ }), b < p.length - 1 ? "," : ""]));
2261
2264
  }
2262
2265
  return V(Ge, {
2263
2266
  underline: "never",
@@ -1,2 +1,2 @@
1
- (function(g,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("element-plus"),require("vue"),require("file-saver"),require("exceljs"),require("dayjs"),require("vue-i18n"),require("lodash"),require("vue-router"),require("vuex"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","file-saver","exceljs","dayjs","vue-i18n","lodash","vue-router","vuex","vxe-pc-ui"],Z):(g=typeof globalThis<"u"?globalThis:g||self,Z(g.JoyAdminComponents={},g.ElementPlus,g.Vue,g.fileSaver,g.ExcelJS,g.dayjs,g.VueI18n,g._,g.VueRouter,g.Vuex,g.VxeUI))})(this,function(g,Z,e,Ie,pe,ue,ee,ne,ve,te,fe){"use strict";const Qe=e.defineComponent({name:"LayOutForm",setup(t,{slots:o,attrs:n,emit:r}){const i=e.ref(null),l=()=>o.default?o.default().filter(s=>s.type!==Symbol.for("v-cmt")).map(s=>s.type===Symbol.for("v-fgt")?s.children:s).flat().map(s=>{var c;return e.h(Z.ElCol,{span:((c=s.props)==null?void 0:c.span)||24},{default:()=>s})}):null;e.onMounted(()=>{r("ref",i.value)});function a(){return e.h(Z.ElForm,{...n,ref:i},()=>e.h(Z.ElRow,{gutter:n.gutter??20},{default:()=>l()}))}return a}});var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Be={exports:{}};(function(t,o){(function(n,r){t.exports=r()})(Fe,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(l,a,s){var c=a.prototype;s.utc=function(d){var C={date:d,utc:!0,args:arguments};return new a(C)},c.utc=function(d){var C=s(this.toDate(),{locale:this.$L,utc:!0});return d?C.add(this.utcOffset(),n):C},c.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var w=c.parse;c.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),w.call(this,d)};var p=c.init;c.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else p.call(this)};var x=c.utcOffset;c.utcOffset=function(d,C){var k=this.$utils().u;if(k(d))return this.$u?0:k(this.$offset)?x.call(this):this.$offset;if(typeof d=="string"&&(d=function(B){B===void 0&&(B="");var P=B.match(r);if(!P)return null;var I=(""+P[0]).match(i)||["-",0,0],Y=I[0],V=60*+I[1]+ +I[2];return V===0?0:Y==="+"?V:-V}(d),d===null))return this;var _=Math.abs(d)<=16?60*d:d;if(_===0)return this.utc(C);var S=this.clone();if(C)return S.$offset=_,S.$u=!1,S;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(_+T,n)).$offset=_,S.$x.$localOffset=T,S};var y=c.format;c.format=function(d){var C=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,C)},c.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var h=c.toDate;c.toDate=function(d){return d==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var m=c.diff;c.diff=function(d,C,k){if(d&&this.$u===d.$u)return m.call(this,d,C,k);var _=this.local(),S=s(d).local();return m.call(_,S,C,k)}}})})(Be);var et=Be.exports;const tt=De(et);var Me={exports:{}};(function(t,o){(function(n,r){t.exports=r()})(Fe,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,l,a){var s,c=function(y,h,m){m===void 0&&(m={});var d=new Date(y),C=function(k,_){_===void 0&&(_={});var S=_.timeZoneName||"short",T=k+"|"+S,B=r[T];return B||(B=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:k,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),r[T]=B),B}(h,m);return C.formatToParts(d)},w=function(y,h){for(var m=c(y,h),d=[],C=0;C<m.length;C+=1){var k=m[C],_=k.type,S=k.value,T=n[_];T>=0&&(d[T]=parseInt(S,10))}var B=d[3],P=B===24?0:B,I=d[0]+"-"+d[1]+"-"+d[2]+" "+P+":"+d[4]+":"+d[5]+":000",Y=+y;return(a.utc(I).valueOf()-(Y-=Y%1e3))/6e4},p=l.prototype;p.tz=function(y,h){y===void 0&&(y=s);var m,d=this.utcOffset(),C=this.toDate(),k=C.toLocaleString("en-US",{timeZone:y}),_=Math.round((C-new Date(k))/1e3/60),S=15*-Math.round(C.getTimezoneOffset()/15)-_;if(!Number(S))m=this.utcOffset(0,h);else if(m=a(k,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),h){var T=m.utcOffset();m=m.add(d-T,"minute")}return m.$x.$timezone=y,m},p.offsetName=function(y){var h=this.$x.$timezone||a.tz.guess(),m=c(this.valueOf(),h,{timeZoneName:y}).find(function(d){return d.type.toLowerCase()==="timezonename"});return m&&m.value};var x=p.startOf;p.startOf=function(y,h){if(!this.$x||!this.$x.$timezone)return x.call(this,y,h);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return x.call(m,y,h).tz(this.$x.$timezone,!0)},a.tz=function(y,h,m){var d=m&&h,C=m||h||s,k=w(+a(),C);if(typeof y!="string")return a(y).tz(C);var _=function(P,I,Y){var V=P-60*I*1e3,b=w(V,Y);if(I===b)return[V,I];var $=w(V-=60*(b-I)*1e3,Y);return b===$?[V,b]:[P-60*Math.min(b,$)*1e3,Math.max(b,$)]}(a.utc(y,d).valueOf(),k,C),S=_[0],T=_[1],B=a(S).utcOffset(T);return B.$x.$timezone=C,B},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(y){s=y}}})})(Me);var ot=Me.exports;const nt=De(ot),ye={"dao-ru":"导入","quan-xuan":"全选","xia-zai-dao-ru-mo-ban":"下载导入模板","xu-hao":"序号","qing-shu-ru":"请输入","qing-xuan-ze":"请选择","kai-shi-shi-jian":"开始时间","jie-shu-shi-jian":"结束时间","shai-xuan":"筛选","chong-zhi":"重置","guan-bi":"关闭","zhan-kai":"展开","qu-xiao":"取消","ti-jiao":"提交","que-ding":"确定","que-ding-guan-bi-ma":"确定关闭吗","xia-zai-dao-ru-mo-ban":"下载导入模板",excel:{fieldsMappingRequired:"请输入列字段映射",invalidInput:"非法输入",invalidOption:"请输入有效选项!",copyFailed:"复制失败",sheetNameTooLong:'Sheet名称 "{0}" 长度超过31个字符,已自动截断为 "{1}"'},validate:{invalidInput:"请输入正确内容"},tools:{keysLengthError:"keys 长度必须大于2 默认前两位为 label value"}},Ce={"dao-ru":"Import","quan-xuan":"Select All","xia-zai-dao-ru-mo-ban":"Download Import Template","xu-hao":"No.","qing-shu-ru":"Please enter","qing-xuan-ze":"Please select","kai-shi-shi-jian":"Start Time","jie-shu-shi-jian":"End Time","shai-xuan":"Filter","chong-zhi":"Reset","guan-bi":"Collapse","zhan-kai":"Expand","qu-xiao":"Cancel","ti-jiao":"Submit","que-ding":"Confirm","que-ding-guan-bi-ma":"Are you sure to close?","xia-zai-dao-ru-mo-ban":"Download Import Template",excel:{fieldsMappingRequired:"Please enter column field mapping",invalidInput:"Invalid input",invalidOption:"Please enter a valid option!",copyFailed:"Copy failed",sheetNameTooLong:'Sheet name "{0}" exceeds 31 characters, automatically truncated to "{1}"'},validate:{invalidInput:"Please enter valid content"},tools:{keysLengthError:"Keys length must be greater than 2, default first two are label and value"}},ze={zh_cn:ye,en_us:Ce};let se=null;function Oe(t=null){if(t){const{global:o}=t;return o.messages.value.zh_cn?o.mergeLocaleMessage("zh_cn",ye):o.setLocaleMessage("zh_cn",ye),o.messages.value.en_us?o.mergeLocaleMessage("en_us",Ce):o.setLocaleMessage("en_us",Ce),se=t,t}return se||(se=ee.createI18n({legacy:!1,locale:"zh_cn",fallbackLocale:"zh_cn",messages:ze})),se}function be(){return se||Oe()}function le(){return be().global.t}ue.extend(tt),ue.extend(nt);async function lt(t,o){const{fields:n,range:r=1}=o;if(!n){const a=le();throw new Error(a("excel.fieldsMappingRequired"))}let i=new pe.Workbook;await i.xlsx.load(t);const l={};return i.eachSheet(function(a,s){const c=[];a.eachRow(function(w,p){if(p>r){let x={},y=!0;Object.keys(n).forEach(h=>{const m=w.getCell(n[h]).value;x[h]=m,m&&(y=!1)}),y||c.push(x)}}),l[a._name]=c}),i=null,l}const Ne={columnWidth:30};async function at(t,o,n=[],r={}){if(!t||!o)return;const{columnStyle:i}=r,{columnWidth:l}=Ne;o.forEach(c=>{c.width=c.width?c.width:l});const{workbook:a,worksheet:s}=rt();s.columns=o,s.addRows(n),i&&await it(a,s,i);try{const c=await a.xlsx.writeBuffer(),w=new File([c],t,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});Ie.saveAs(w)}catch(c){console.log(c)}}function rt(){const t=new pe.Workbook;t.creator="distributor System",t.lastModifiedBy="distributor System",t.created=new Date,t.modified=new Date,t.lastPrinted=new Date;const o=t.addWorksheet("Sheet1");return{workbook:t,worksheet:o}}async function it(t,o,n){const r=Object.keys(n);for(const i of r){const l=n[i],{type:a}=l;switch(a){case"IMG":await st(t,o,i);break}}}async function st(t,o,n,r){const i=o.getColumn(n),l=i.values;o.getColumn(n).width=20,o.eachRow((a,s)=>{s>1&&(a.height=40)});for(let a=0,s=l.length;a<s;a++){if(a<2)continue;let c=l[a];c&&(o.getCell(i.letter+a).value="",await ct(t,o,c,{width:100,height:50,col:i._number-1,row:a-1}))}}async function ct(t,o,n,r){const{col:i,row:l,width:a,height:s}=r,{success:c,base64:w}=await dt(n,.3);if(c){const p=t.addImage({base64:w,extension:"jpeg"});o.addImage(p,{tl:{col:i,row:l},ext:{width:a,height:s}})}}function dt(t,o=1){const n=new Image;return n.setAttribute("crossOrigin","anonymous"),n.crossOrigin="anonymous",n.src=t,new Promise((r,i)=>{n.onload=()=>{const l=document.createElement("canvas");l.width=n.width,l.height=n.height,l.getContext("2d").drawImage(n,0,0,l.width,l.height),r({success:!0,base64:l.toDataURL("image/jpeg",o)})},n.onerror=()=>{r({success:!1})}})}const ke="---";async function qe(t,o){const{fields:n,range:r=1}=o;if(!n){const a=le();throw new Error(a("excel.fieldsMappingRequired"))}let i=new pe.Workbook;await i.xlsx.load(t);const l={};return i.eachSheet(function(a,s){if(a.state=="visible"){const c=[],w=n[a._name];if(w){let p=Object.values(w).some(y=>y.includes("image")),x={};p&&(a.getImages().forEach(h=>{const{tl:m}=h.range,d=i.model.media.find(C=>C.index===h.imageId);if(d){const C=d.buffer.toString("base64"),k=`data:image/${d.extension};base64,${C}`,_=`${Math.ceil(m.row)}_${Math.ceil(m.col)}`;x[_]?x[_].push(k):x[_]=[k]}}),console.log("withImages-imageMap",x)),a.eachRow(function(y,h){if(h>r){let m={_excelRowNumber:h},d=!0;Object.keys(w).forEach(C=>{var B;let[k,_]=w[C].split(ke);const S=y.getCell(k);let T;if(_=="image"&&p){const P=S._column._number,I=`${h}_${P}`;T=x[I]||""}else S.result!=null?T=S.result:(B=S.value)!=null&&B.richText?T=S.value.richText.reduce((P,I)=>P+I.text,""):S.type==4&&S.value?T=ue(S.value).utc().format("YYYY-MM-DD HH:mm:ss"):T=S.value;T&&_=="option"&&(T=T.split(ke)[1]),m[C]=T,T&&(d=!1)}),d||c.push(m)}}),l[a._name]=c}}}),i=null,l}const ut={date:"yyyy-mm-dd",number:"0",string:"@"};async function Ae(t,o){if(!t||o.length==0)return;const n=ft(o);for(const r of n.worksheets){const{columnWidth:i}=Ne,l=o[r.name];if(!l)continue;const{tableHeader:a,tableData:s}=l;a.forEach(c=>{const{style:w={},required:p}=c,{font:x={}}=w;c.style={...w,font:{...x,color:{argb:p?"FFFF0000":void 0}}}}),r.columns=a,r.addRows(s),a.forEach(c=>{let{header:w,key:p,width:x,option:y,numFmt:h,locked:m,optionFormater:d}=c;const C=r.getColumn(p);if(C.numFmt=ut[h]||h,C.width=x||i,C.protection={locked:m===!0},y){const k=n.addWorksheet(p);k.state="hidden",d||(d=_=>`${_.label}${ke}${_.value}`),k.getColumn(1).values=y.map(d),Array(100).fill("").forEach((_,S)=>{if(S>0){const T=le();r.getCell(`${C.letter}${S}`).dataValidation={type:"list",formulae:[`${p}!$A$1:$A$${y.length}`],showErrorMessage:!0,error:T("excel.invalidInput"),errorStyle:"stop",errorMessage:T("excel.invalidOption")}}})}}),a.some(c=>c.locked)&&await r.protect("6737187214",{selectLockedCells:!0,selectUnlockedCells:!0})}try{const r=await n.xlsx.writeBuffer(),i=new File([r],t,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});Ie.saveAs(i)}catch(r){console.log(r)}}function ft(t){const o=le(),n=new pe.Workbook;return n.creator="distributor System",n.lastModifiedBy="distributor System",n.created=new Date,n.modified=new Date,n.lastPrinted=new Date,Object.keys(t).sort((i,l)=>{const a=t[i].sort??0,s=t[l].sort??0;return a-s}).forEach(i=>{let l=i,a=!1;/[\\/:*?\[\]]/g.test(i)&&(i=i.replace(/[\\/:*?\[\]]/g,""),a=!0),i.length>31&&(i=i.substring(0,31).trim(),a=!0,console.warn(o("excel.sheetNameTooLong",[l,i]))),a&&(t[i]=t[l],delete t[l]),n.addWorksheet(i)}),n}function mt(t){if(t<26)return String.fromCharCode(65+t);{const o=String.fromCharCode(65+Math.floor((t-26)/26)),n=String.fromCharCode(65+(t-26)%26);return o+n}}function ht(t){return new Promise(o=>{setTimeout(()=>{o()},t)})}function gt(t){return JSON.parse(JSON.stringify(t))}function pt(t){let o=[],n={},r=(i,l)=>Object.prototype.hasOwnProperty.call(i,l);for(const i of t){n[i.id]={...i,children:r(n,i.id)?n[i.id].children:[]};const l=n[i.id];i.pid==-1?o.push(l):(r(n,i.pid)||(n[i.pid]={children:[]}),n[i.pid].children.push(l))}return o}function Se(t,o=" "){return t?t.split(o).filter(n=>n.trim()):[]}class _e{constructor(o,n=["label","value","labelEn"]){this.list=o.map(r=>({...r,label:r[n[0]],labelEn:r[n[2]]??r[n[0]]??"",value:r[n[1]]})),this.map=new Map(this.list.map(r=>[r[n[1]],r]))}getName(o){if(!this.has(o))return"-";const n=be().global.locale,{label:r,labelEn:i}=this.map.get(o);return(n.value=="zh_cn"?r:i)??r??"-"}getTag(o){if(!this.has(o))return"info";const{tag:n="info"}=this.map.get(o);return n}getItem(o){return this.has(o)?this.map.get(o):null}getColor(o){if(!this.has(o))return null;const{color:n}=this.map.get(o);return n}has(o){return this.map.has(o)}}function yt(t,o=[],n="i18nName"){if(t.length==0)return new _e([]);if(o.length<2){const i=le();throw new Error(i("tools.keysLengthError"))}let r=t.map(i=>{let l={};return n&&(l.labelEn=i[n]),o.forEach((a,s)=>{s===0?l.label=i[a]:s===1?l.value=i[a]:l[a]=i[a]}),l});return new _e(r)}function Ct(t){return t?t.replace(/<[^>]+>/g,""):""}function bt(t){return t?(t.includes("\\\\u")&&(t=t.replace(/\\/g,"")),t.replace(/\\u[\dA-F]{4}/gi,o=>String.fromCharCode(parseInt(o.replace(/\\u/g,""),16)))):""}function wt(t,o=10){let n=1048576*o;return!(t.size>n)}function xt(t){return Array.from(10).fill(0).map((n,r)=>t+"_"+r)}function kt(t){let o={};return t.map((n,r)=>{let{key:i,option:l,type:a,optionFormater:s}=n,c=mt(r);l&&!s?o[i]=`${c}---option`:a==="image"?o[i]=`${c}---image`:o[i]=c}),o}function St(t,o){return o.split(".").reduce((n,r)=>n&&n[r],t)}const ao="",me=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},_t=["onClick"],Pe=me({__name:"index",props:e.mergeModels({api:{type:Function},showCheckAll:{type:Boolean,default:!0},maxLimit:{type:Number,default:void 0},minLimit:{type:Number,default:void 0},optionClick:{type:Function,default:()=>{}},data:{type:Array},labelValue:{type:Object,default:()=>({label:"label",labelEn:"labelEn",value:"value"})},changeLocal:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["success","change","changeAll"],["update:modelValue"]),setup(t,{emit:o}){const n=t,r=e.useAttrs(),{t:i,locale:l}=ee.useI18n(),a=e.useModel(t,"modelValue"),s=e.computed(()=>r["value-key"]!=null),c=e.ref(""),w=e.computed(()=>{if(r.remote!==void 0)return n.data;const b=Se(c.value),{data:$,labelValue:F}=n,H=$||y.value;if(b.length==0)return H;const{label:E,labelEn:ce}=F;let M=l.value=="en_us"?ce||"i18nName":E;return b.length==1?H.filter(oe=>oe[M].toLowerCase().includes(b[0].toLowerCase())):H.filter(oe=>{let de=!1;return de=b.some(xe=>oe[M].toLowerCase()==xe.toLowerCase()),de})}),p=e.computed({get(){return r.multiple==null||a.value==null?!1:a.value.length==w.value.length},set(b){return b}}),x=o,y=e.ref([]),h=async()=>{const{data:b}=await n.api();y.value=[...b],x("success",y)};n.api&&h();function m(b){x("change",b),d.value&&e.nextTick(()=>{n.optionClick&&n.optionClick(d.value),d.value=null})}const d=e.ref(null);function C(b){d.value=b}const k=n.labelValue.label.split("-"),_=b=>{if(k.length==1){if(n.changeLocal)return i(b[n.labelValue.label]);let $=l.value=="en_us"?b[n.labelValue.labelEn||"i18nName"]:b[n.labelValue.label];return $=$||b[n.labelValue.label],$+""}else{let $=[];return k.forEach(F=>{$.push(b[F])}),$.join("-")}};function S(b){let $=n.data?n.data:y.value;a.value=b?$.map(F=>s.value?F:F[n.labelValue.value]):[],e.nextTick(()=>{x("change",a.value),x("changeAll",a.value,$)})}function T(b){x("change",s.value?b:b[n.labelValue.value]),e.nextTick(()=>{n.optionClick&&n.optionClick(b)})}function B(b){const $=s.value?b:b[n.labelValue.value],F=s.value?a.value.some(H=>H[n.labelValue.value]===b[n.labelValue.value]):a.value.includes($);return!!(n.maxLimit>0&&a.value.length>=n.maxLimit&&!F||n.minLimit>0&&a.value.length===n.minLimit&&F)}function P(b){return b.map($=>({...$,label:_($),value:s.value?$:$[n.labelValue.value]}))}const I=e.ref([]),Y=n.data?n.data:y.value;I.value=P(Y),e.watch(()=>n.data?n.data:y.value,b=>{var F;const $=P(b);if($.length!==I.value.length)I.value=$;else{let H=!1;for(let E=0;E<$.length;E++)if($[E].value!==((F=I.value[E])==null?void 0:F.value)){H=!0;break}H&&(I.value=$)}},{deep:!0});const V=e.computed(()=>r.multiple!==void 0&&(n.maxLimit>0||n.minLimit>0)?I.value.map(b=>({...b,disabled:B(b)})):I.value);return(b,$)=>{const F=e.resolveComponent("el-checkbox"),H=e.resolveComponent("el-select-v2"),E=e.resolveComponent("el-option"),ce=e.resolveComponent("el-select");return e.unref(r).v2!=null?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0,options:V.value,modelValue:a.value,"onUpdate:modelValue":$[1]||($[1]=M=>a.value=M)},e.unref(r),{filterable:"","collapse-tags":"","collapse-tags-tooltip":"",clearable:"",onChange:m,onClear:m}),e.createSlots({default:e.withCtx(({item:M})=>[e.createElementVNode("div",{onClick:ae=>C(M)},e.toDisplayString(M.label),9,_t)]),_:2},[e.unref(r).multiple!=null?{name:"header",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"header",{},()=>[e.createVNode(F,{class:"mgl20",modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=M=>p.value=M),onChange:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0)]),key:"0"}:void 0]),1040,["options","modelValue"])):(e.openBlock(),e.createBlock(ce,e.mergeProps({key:1,modelValue:a.value,"onUpdate:modelValue":$[3]||($[3]=M=>a.value=M),filterable:"","collapse-tags":"","collapse-tags-tooltip":"","filter-method":e.unref(r).remote!=null?void 0:M=>c.value=M,clearable:""},e.unref(r),{onClear:t.optionClick}),{default:e.withCtx(()=>[e.unref(r).multiple!=null&&t.showCheckAll&&t.maxLimit==null?e.renderSlot(b.$slots,"header",{key:0},()=>[e.createVNode(F,{class:"mgl20",modelValue:p.value,"onUpdate:modelValue":$[2]||($[2]=M=>p.value=M),onChange:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(M,ae)=>(e.openBlock(),e.createBlock(E,{key:ae,label:_(M),disabled:e.unref(r).multiple!=null&&(t.maxLimit>0||t.minLimit>0)?B(M):!1,onClick:e.withModifiers(oe=>T(M),["stop"]),value:s.value?M:M[t.labelValue.value]},null,8,["label","disabled","onClick","value"]))),128))]),_:3},16,["modelValue","filter-method","onClear"]))}}},[["__scopeId","data-v-078a95a6"]]),io="",$t=e.defineComponent({props:{name:{tyepe:String,required:!0}}});function Vt(t,o,n,r,i,l){const a=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(a,{class:"cmp-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.name)))]),_:1})}const $e=me($t,[["render",Vt],["__scopeId","data-v-733f9daa"]]),Et={__name:"index",emits:["ok","no"],setup(t,{emit:o}){const n=o,r=ne.debounce(()=>{n("ok")},500);function i(){n("no")}return(l,a)=>{const s=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(s,e.mergeProps(l.$attrs,{onConfirm:e.unref(r),onCancel:i}),{reference:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["onConfirm"])])}}},so="",Tt=["accept"],Lt=me({__name:"index",props:{accept:{type:String,default:".xlsx,.xls"},fields:{type:Object,default:()=>({})},fileChange:{type:Function,required:!0}},emits:["fileChange"],setup(t,{emit:o}){const n=t,r=e.ref(null),i=e.ref(!1);async function l(a){i.value=!0;let s=a.target.files[0];const c=await qe(s,n.fields).catch(()=>{i.value=!1}).finally(()=>{r.value.value=null});await n.fileChange(c).finally(()=>{i.value=!1})}return(a,s)=>{const c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(c,e.mergeProps({type:"primary",loading:i.value,class:"mgr10",onClick:s[0]||(s[0]=w=>r.value.click())},a.$attrs),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.$t("dao-ru")),1)],!0)]),_:3},16,["loading"]),e.createElementVNode("input",{onChange:l,ref_key:"input",ref:r,accept:t.accept,style:{position:"absolute",width:"0px",height:"0px",opacity:"0"},type:"file"},null,40,Tt)])}}},[["__scopeId","data-v-f5e86876"]]);function Ve(t){let o={};return t.forEach(n=>{const{key:r,type:i,option:l={},value:a,dateType:s="date"}=n;if(r)if(i=="input"&&(l!=null&&l.multiple))o[r]=Se(a);else if(i=="date")if(s.includes("range")){const[c,w]=r;let[p,x]=a||[];p&&s=="daterange"&&(p=ue(p).format("YYYY-MM-DD 00:00:00"),x=ue(x).format("YYYY-MM-DD 23:59:59")),o[c]=p,o[w]=x}else o[r]=a;else o[r]=a}),o}const uo="",It={key:0},vt={class:"btns"},Ft={class:"left"},Dt={class:"right"},je=me({__name:"index",props:{form:{type:Object,required:!0}},emits:["confirm","reset","visibleChange"],setup(t,{expose:o,emit:n}){const r=t,i=n,l=e.ref(!0),a=e.ref(null),{t:s}=ee.useI18n(),c={datetimerange:"YYYY-MM-DD HH:mm:ss",daterange:"YYYY-MM-DD",month:"YYYY-MM"},w=e.computed(()=>l.value?s("guan-bi"):s("zhan-kai"));function p(){i("confirm")}function x(k){k.option.onClear&&k.option.onClear(),i("confirm")}function y(){i("reset")}function h(){i("confirm")}function m(){return Ve(r.form.items)}const d=ne.cloneDeep(r.form.items);function C(){r.form.items.forEach(k=>{const _=d.find(S=>S.key==k.key);_&&(k.value=_.value)})}return o({getPrm:m,reset:C}),(k,_)=>{const S=e.resolveComponent("el-input"),T=e.resolveComponent("el-date-picker"),B=e.resolveComponent("el-form-item"),P=e.resolveComponent("el-form"),I=e.resolveComponent("el-link"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:"searchBar-container mgt10 mgb10",onKeydown:e.withKeys(p,["enter"])},[e.createElementVNode("div",{class:"searchBar",style:e.normalizeStyle({height:l.value?"auto":"42px"})},[e.createVNode(P,{inline:"",model:t.form.data},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.form.items.filter(V=>!V.hidden),V=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V.key},[V.type=="br"?(e.openBlock(),e.createElementBlock("br",It)):(e.openBlock(),e.createBlock(B,{key:1,label:V.name},{default:e.withCtx(()=>{var b,$;return[V.type==="input"?(e.openBlock(),e.createBlock(S,{key:0,modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,class:e.normalizeClass(((b=V.option)==null?void 0:b.class)||"w150"),placeholder:k.$t("qing-shu-ru"),clearable:""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"])):V.type==="custom"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.render),{key:1})):e.createCommentVNode("",!0),V.type==="select"?(e.openBlock(),e.createBlock(Pe,e.mergeProps({key:2,class:(($=V.option)==null?void 0:$.class)||"w150",modelValue:V.value,"onUpdate:modelValue":F=>V.value=F},{ref_for:!0},V.option,{onChange:p,onClear:F=>x(V)}),null,16,["class","modelValue","onUpdate:modelValue","onClear"])):e.createCommentVNode("",!0),V.type==="date"?(e.openBlock(),e.createBlock(T,e.mergeProps({key:3,class:{datetimerange:"w300",daterange:"w200"}[V.dateType]||"w100",modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,"value-format":c[V.dateType]||"YYYY-MM-DD",type:V.dateType||"date",onFocus:F=>a.value=V,onChange:F=>h(),placeholder:k.$t("qing-xuan-ze"),"start-placeholder":k.$t("kai-shi-shi-jian"),"end-placeholder":k.$t("jie-shu-shi-jian")},{ref_for:!0},V.option),null,16,["class","modelValue","onUpdate:modelValue","value-format","type","onFocus","onChange","placeholder","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0)]}),_:2},1032,["label"]))],64))),128))]),_:1},8,["model"])],4),e.createElementVNode("div",vt,[e.createElementVNode("div",Ft,[e.renderSlot(k.$slots,"table-header-left",{},void 0,!0)]),e.createElementVNode("div",Dt,[e.createVNode(I,{underline:"never",class:"mgr10",onClick:_[0]||(_[0]=()=>{i("visibleChange",!l.value),l.value=!l.value})},{default:e.withCtx(()=>[e.createVNode($e,{name:l.value?"ArrowUp":"ArrowDown"},null,8,["name"]),e.createTextVNode(" "+e.toDisplayString(w.value),1)]),_:1}),e.createVNode(Y,{type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.$t("shai-xuan")),1)]),_:1}),e.createVNode(Y,{type:"primary",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.$t("chong-zhi")),1)]),_:1}),e.renderSlot(k.$slots,"btn",{},void 0,!0)])])],32)}}},[["__scopeId","data-v-6c7679eb"]]),Re={pageNoKey:"pageNo",pageSizeKey:"pageSize",totalKey:"total",defaultPageSize:10,pageSizes:[10,50,100,500],responseDataKeys:{rows:["rows","records","list"],total:["totalRows","total"]},showSearch:!1,showPage:!1,showShadow:!1,showCheckBox:!1,enableCellCopy:!0};let he={...Re};function Bt(t){he={...he,...t,responseDataKeys:{...he.responseDataKeys,...t.responseDataKeys||{}}}}function Ue(){return he}function Mt(){he={...Re}}const mo="",zt={class:"center"},Ot=me({__name:"index",props:{id:{type:String,required:!1},loading:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},searchForm:{type:Object,default:()=>({items:[],selections:[]})},api:{type:Function},data:{type:Array},tableConfig:{type:Object,default:()=>({})}},setup(t,{expose:o}){const{t:n,locale:r}=ee.useI18n(),i=ve.useRoute(),l=Ue(),a=t,s=e.ref(!1),c=e.ref([]);a.searchForm.showSearch===void 0&&(a.searchForm.showSearch=l.showSearch),a.searchForm.showPage===void 0&&(a.searchForm.showPage=l.showPage),a.searchForm.showShadow===void 0&&(a.searchForm.showShadow=l.showShadow),a.searchForm.showCheckBox===void 0&&(a.searchForm.showCheckBox=l.showCheckBox),a.searchForm.enableCellCopy===void 0&&(a.searchForm.enableCellCopy=l.enableCellCopy),a.searchForm.selections||(a.searchForm.selections=[]);const w=e.computed(()=>{const f=i.path.replace(/\//g,"-").replace(/^-/,"")||"default-table";return a.id?`listPageId-${f}-${a.id}`:`listPageId-${f}`}),p=ne.cloneDeep(a.searchForm.items),x=a.searchForm.pageNoKey||l.pageNoKey,y=a.searchForm.pageSizeKey||l.pageSizeKey,h=e.reactive({[x]:1,[y]:a.searchForm.defaultPageSize||l.defaultPageSize,total:0}),m=e.ref(null),d=e.ref(null),C=e.ref(450),k=ne.debounce(()=>{e.nextTick(()=>{if(!d.value)return;const u=d.value.getBoundingClientRect(),L=window.innerHeight,D=u.top,q=100,U=L-D-q,z=200;C.value=Math.max(U,z)})},100),_=()=>{k()},S=()=>{if(!a.searchForm.enableCellCopy&&!l.enableCellCopy)return!1;const f=m.value;if(!f||!f.$el)return!1;const u=f.$el;return u.classList.add("cell-copy-enabled"),u.setAttribute("tabindex","-1"),u.removeEventListener("mousedown",M),u.removeEventListener("mousemove",ae),u.removeEventListener("mouseup",oe),u.removeEventListener("keydown",Te),u.addEventListener("mousedown",M),u.addEventListener("mousemove",ae),u.addEventListener("mouseup",oe),u.addEventListener("keydown",Te),!0};e.onMounted(()=>{k(),window.addEventListener("resize",_),(a.searchForm.enableCellCopy||l.enableCellCopy)&&(document.addEventListener("mouseup",Ze),document.addEventListener("mousedown",Ge),setTimeout(()=>{S()},500))}),e.onUpdated(()=>{(a.searchForm.enableCellCopy||l.enableCellCopy)&&setTimeout(()=>{S()},500)}),e.onUnmounted(()=>{if(window.removeEventListener("resize",_),a.searchForm.enableCellCopy||l.enableCellCopy){document.removeEventListener("mouseup",Ze),document.removeEventListener("mousedown",Ge);const f=m.value;if(f&&f.$el){const u=f.$el;u.removeEventListener("mousedown",M),u.removeEventListener("mousemove",ae),u.removeEventListener("mouseup",oe),u.removeEventListener("keydown",Te)}}});const T=e.computed(()=>H.value.height||C.value);let B;async function P(f){const{dataFormat:u}=a.tableConfig;f[x]!=1&&(f.nextSearchAfter=B),s.value=!0;const{code:L,data:D={}}=await a.api(f).finally(()=>{s.value=!1,a.searchForm.selections=[]});if(L==200){let q=[];for(const z of l.responseDataKeys.rows)if(D[z]){q=D[z];break}let U=0;for(const z of l.responseDataKeys.total)if(D[z]!==void 0){U=D[z];break}c.value=u?u(q):q,h.total=U,B=D.nextSearchAfter,(a.searchForm.enableCellCopy||l.enableCellCopy)&&e.nextTick(()=>{setTimeout(()=>{S()},100)})}}function I(f={}){const{searchData:u=()=>({})}=a.tableConfig,L=u();P({...h,...Ve(a.searchForm.items),...f,...L})}function Y(){const{reset:f}=a.tableConfig;f&&f(),a.searchForm.items.forEach(u=>{const L=p.find(D=>ne.isArray(u.key)&&ne.isArray(D.key)?u.key.join(",")==D.key.join(","):D.key==u.key);L&&(u.value=L.value)}),I()}a.api&&a.immediate&&I();function V(){return{...h,...Ve(a.searchForm.items)}}const b=()=>{const f=m.value;f&&f.clearSort()},$=e.reactive({storage:!0}),F=e.reactive({drag:!0,resizable:!0,maxFixedSize:0}),H=e.computed(()=>{const{customConfig:f,columnConfig:u,...L}=a.tableConfig;return{headerAlign:"left",align:"center",customConfig:{...$,...f},columnConfig:{...F,...u},"virtual-x-config":{enabled:!1,scrollToLeftOnChange:!1},"virtual-y-config":{enabled:!0,gt:100},...L}}),E=e.reactive({isSelecting:!1,startCell:null,endCell:null,selectedCells:[]}),ce=f=>{const u=f.closest(".vxe-body--column");if(!u||u.classList.contains("col--checkbox")||u.classList.contains("col--seq"))return null;const L=u.closest(".vxe-body--row");if(!L)return null;const D=m.value;if(!D)return null;let q=-1;const U=L.getAttribute("data-rowid");if(U!=null)q=parseInt(U,10);else{const O=L.parentElement;q=Array.from(O.querySelectorAll(".vxe-body--row")).indexOf(L)}if(q<0)return null;let z=-1;const Q=u.getAttribute("data-colid");if(Q&&(z=D.getColumns().findIndex(v=>v.id===Q)),z<0){const v=Array.from(L.querySelectorAll(".vxe-body--column")).indexOf(u),j=!!u.closest(".vxe-table--fixed-left-wrapper"),K=!!u.closest(".vxe-table--fixed-right-wrapper"),A=D.getColumns();if(j){const W=A.filter(R=>R.fixed==="left");v<W.length&&(z=A.indexOf(W[v]))}else if(K){const W=A.filter(R=>R.fixed==="right");v<W.length&&(z=A.indexOf(W[v]))}else{const W=a.searchForm.showCheckBox?1:0;z=A.filter(G=>G.fixed==="left").length+v-W}}return z<0?null:{rowIndex:q,colIndex:z,cell:u}},M=f=>{const u=ce(f.target);if(!u){de();return}E.isSelecting=!0,E.startCell={rowIndex:u.rowIndex,colIndex:u.colIndex},E.endCell={...E.startCell},xe(),We()},ae=f=>{if(!E.isSelecting)return;const u=ce(f.target);u&&(E.endCell={rowIndex:u.rowIndex,colIndex:u.colIndex},xe(),We())},oe=()=>{E.isSelecting=!1},de=()=>{E.selectedCells=[],E.startCell=null,E.endCell=null;const f=m.value;if(!f)return;f.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(L=>{L.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")})},xe=()=>{if(!E.startCell||!E.endCell){E.selectedCells=[];return}const f=E.startCell.rowIndex,u=E.endCell.rowIndex,L=E.startCell.colIndex,D=E.endCell.colIndex,q=Math.min(f,u),U=Math.max(f,u),z=Math.min(L,D),Q=Math.max(L,D);E.selectedCells=[];for(let O=q;O<=U;O++)for(let v=z;v<=Q;v++)E.selectedCells.push({rowIndex:O,colIndex:v})},We=()=>{e.nextTick(()=>{const f=m.value;if(!f)return;const u=f.$el;if(u.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(j=>{j.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")}),E.selectedCells.length===0)return;const L=f.getColumns(),D=E.selectedCells.map(j=>j.rowIndex),q=E.selectedCells.map(j=>j.colIndex),U=Math.min(...D),z=Math.max(...D),Q=Math.min(...q),O=Math.max(...q),v=[u.querySelector(".vxe-table--body-wrapper tbody"),u.querySelector(".vxe-table--fixed-left-wrapper tbody"),u.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean);E.selectedCells.forEach(({rowIndex:j,colIndex:K})=>{const A=L[K];if(!A)return;const W=A.fixed==="left",R=A.fixed==="right";for(const G of v){const ge=G.querySelectorAll(".vxe-body--row")[j];if(!ge)continue;const re=Array.from(ge.querySelectorAll(".vxe-body--column"));let N=null;if(W&&G.closest(".vxe-table--fixed-left-wrapper")){const J=L.filter(X=>X.fixed==="left").indexOf(A);N=re[J]}else if(R&&G.closest(".vxe-table--fixed-right-wrapper")){const J=L.filter(X=>X.fixed==="right").indexOf(A);N=re[J]}else if(!W&&!R&&G.closest(".vxe-table--body-wrapper")){const ie=a.searchForm.showCheckBox?1:0,J=L.filter(Le=>Le.fixed==="left").length,X=K-J;N=re[X+ie]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){N.classList.add("cell-selected"),j===U&&N.classList.add("cell-border-top"),j===z&&N.classList.add("cell-border-bottom"),K===Q&&N.classList.add("cell-border-left"),K===O&&N.classList.add("cell-border-right");break}}})})},to=async()=>{if(E.selectedCells.length===0)return;const f=m.value;if(!f)return;const u=f.$el,L=f.getColumns(),D=[...new Set(E.selectedCells.map(O=>O.rowIndex))].sort((O,v)=>O-v),q=[...new Set(E.selectedCells.map(O=>O.colIndex))].sort((O,v)=>O-v),U=[u.querySelector(".vxe-table--body-wrapper tbody"),u.querySelector(".vxe-table--fixed-left-wrapper tbody"),u.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean),z=[];D.forEach(O=>{const v=[];q.forEach(j=>{const K=L[j];if(!K){v.push("");return}const A=K.fixed==="left",W=K.fixed==="right";let R="";for(const G of U){const ge=G.querySelectorAll(".vxe-body--row")[O];if(!ge)continue;const re=Array.from(ge.querySelectorAll(".vxe-body--column"));let N=null;if(A&&G.closest(".vxe-table--fixed-left-wrapper")){const J=L.filter(X=>X.fixed==="left").indexOf(K);N=re[J]}else if(W&&G.closest(".vxe-table--fixed-right-wrapper")){const J=L.filter(X=>X.fixed==="right").indexOf(K);N=re[J]}else if(!A&&!W&&G.closest(".vxe-table--body-wrapper")){const ie=a.searchForm.showCheckBox?1:0,J=L.filter(Le=>Le.fixed==="left").length,X=j-J;N=re[X+ie]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){R=N.innerText||N.textContent||"",R=R.trim(),R=R.replace(/\n/g," ").replace(/\s+/g," ");break}}v.push(R)}),z.push(v.join(" "))});const Q=z.join(`
2
- `);try{await navigator.clipboard.writeText(Q)}catch(O){console.error("复制失败:",O)}},Te=f=>{!a.searchForm.enableCellCopy&&!l.enableCellCopy||((f.ctrlKey||f.metaKey)&&f.key==="c"?E.selectedCells.length>0&&(f.preventDefault(),f.stopPropagation(),to()):f.key==="Escape"&&de())},Ze=()=>{E.isSelecting=!1},Ge=f=>{const u=m.value;if(!u||!u.$el)return;u.$el.contains(f.target)||de()},oo=f=>{h[x]=f,I()},no=f=>{h[y]=f,h[x]=1,I()};function Je(){const f=m.value.getCheckboxRecords();a.searchForm.selections=f}const Xe=f=>{const u=m.value;if(u){u.toggleCheckboxRow(f);const L=m.value.getCheckboxRecords();a.searchForm.selections=L}};return o({tableRef:m,getList:I,getPrm:V,clearSort:b,calculateTableHeight:k}),(f,u)=>{var O;const L=e.resolveComponent("el-button"),D=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-text"),U=e.resolveComponent("vxe-column"),z=e.resolveComponent("VxeTable"),Q=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({box:t.searchForm.showShadow})},[t.searchForm.showSearch?(e.openBlock(),e.createBlock(je,{key:0,form:t.searchForm,onReset:Y,onConfirm:u[1]||(u[1]=v=>I()),onVisibleChange:e.unref(k)},{btn:e.withCtx(()=>[u[3]||(u[3]=e.createElementVNode("span",{class:"mgr10"},null,-1)),e.renderSlot(f.$slots,"search-bar-btn",{},void 0,!0),e.createVNode(L,{class:"mgl10",round:"",onClick:u[0]||(u[0]=v=>m.value.openCustom())},{default:e.withCtx(()=>[e.createVNode($e,{name:"Tools"})]),_:1})]),_:3},8,["form","onVisibleChange"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"table-header-left",{},void 0,!0),e.createElementVNode("div",{ref_key:"tableContentRef",ref:d},[e.createVNode(z,e.mergeProps({id:w.value,ref_key:"tableRef",ref:m,loading:t.loading||s.value,data:t.api?c.value:t.data,border:""},H.value,{height:T.value,onCheckboxChange:Je,onCheckboxAll:Je,onSortChange:(O=H.value["sort-config"])==null?void 0:O.sortChange}),{default:e.withCtx(()=>[t.searchForm.showCheckBox==null||t.searchForm.showCheckBox?(e.openBlock(),e.createBlock(U,{key:0,type:"checkbox",width:e.unref(r)=="zh_cn"?80:150,title:f.$t("xu-hao"),fixed:"left"},{checkbox:e.withCtx(({rowIndex:v,row:j,checked:K,disabled:A,indeterminate:W})=>[e.createElementVNode("div",zt,[K?(e.openBlock(),e.createBlock(D,{key:0,checked:!0,disabled:A,size:"default",onClick:e.withModifiers(R=>!A&&Xe(j),["stop"])},null,8,["disabled","onClick"])):(e.openBlock(),e.createBlock(D,{key:1,disabled:A,checked:!1,size:"default",onClick:e.withModifiers(R=>!A&&Xe(j),["stop"])},null,8,["disabled","onClick"])),e.createVNode(q,{type:"info",class:"mgl5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v+1),1)]),_:2},1024)])]),_:1},8,["width","title"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},16,["id","loading","data","height","onSortChange"])],512),t.searchForm.showPage?(e.openBlock(),e.createBlock(Q,{key:1,"current-page":h[e.unref(x)],"onUpdate:currentPage":u[2]||(u[2]=v=>h[e.unref(x)]=v),class:"myPagination mgt10",background:"",layout:"total, sizes, prev, pager, next",total:h.total,"page-size":h[e.unref(y)],"page-sizes":t.searchForm.pageSizes||e.unref(l).pageSizes,onCurrentChange:oo,onSizeChange:no},null,8,["current-page","total","page-size","page-sizes"])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-c022c16d"]]),Nt={__name:"index",props:{sheetsConfig:{type:Object,required:!0},fileName:{type:String,required:!0}},setup(t){const o=t;function n(){Ae(o.fileName,o.sheetsConfig)}return(r,i)=>{const l=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(l,e.mergeProps({type:"primary",underline:"never"},r.$attrs,{onClick:n}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(r.$t("xia-zai-dao-ru-mo-ban")),1)])]),_:3},16)}}},qt={mounted(t,o){o.value&&Ye(t)},updated(t,o){o.value?Ye(t):He(t)},beforeUnmount(t){He(t)}};async function Ye(t){await y();const o=t.querySelector(".el-dialog");if(!o)return;const n=t.querySelector(".el-dialog__header"),r=t.querySelector(".el-overlay");r.style.cssText+="overflow: hidden;",n.style.cursor="move";let i=!1,l={window:{width:0,height:0},dialog:{x:0,y:0,width:0,height:0,marginTop:""},mouse:{x:0,y:0},drag:{x:0,y:0}};n.addEventListener("mousedown",c),document.addEventListener("mousemove",w),document.addEventListener("mouseup",p),window.addEventListener("resize",x);function a(){l.mouse.x-l.drag.x>=l.dialog.x&&(l.drag.x=l.mouse.x-l.dialog.x),l.drag.x-l.mouse.x>=l.window.width-(l.dialog.x+l.dialog.width)&&(l.drag.x=l.mouse.x+l.window.width-l.dialog.x-l.dialog.width),l.mouse.y-l.drag.y>=l.dialog.y&&(l.drag.y=l.mouse.y-l.dialog.y),l.drag.y-l.mouse.y>=l.window.height-(l.dialog.y+l.dialog.height)&&(l.drag.y=l.mouse.y+l.window.height-l.dialog.y-l.dialog.height),s()}function s(){let h=l.drag.y-l.mouse.y+l.dialog.y,m=l.drag.x-l.mouse.x+l.dialog.x;o.style.cssText+=`position: absolute; top: calc(${h}px - ${l.dialog.marginTop}); left: ${m}px;`}function c(h){h.button===0&&(l.window={width:document.body.clientWidth,height:document.body.clientHeight},l.dialog=o.getBoundingClientRect(),l.dialog.marginTop=window.getComputedStyle(o).marginTop,l.mouse={x:h.clientX,y:h.clientY},i=!0)}function w(h){i&&(l.drag={x:h.clientX,y:h.clientY},r.style.userSelect="none",a())}function p(h){r.style.userSelect="auto",i=!1}function x(h){}function y(){return new Promise((h,m)=>{setTimeout(()=>{h()},500)})}t.__mouseDown__=c,t.__mouseUp__=p,t.__mouseMove__=w,t.__sizeChange__=x}function He(t){document.removeEventListener("mousedown",t.__mouseDown__),document.removeEventListener("mousemove",t.__mouseMove__),document.removeEventListener("mouseup",t.__mouseUp__),window.removeEventListener("resize",t.__sizeChange__)}const go="",At={key:0,class:"drawer-btn"},Pt={key:1},jt={__name:"index",props:{layer:{type:Object,default:()=>({show:!1,type:"layer",title:"",showButton:!1}),required:!0},loading:{type:Boolean,default:!1}},emits:["confirm"],setup(t,{emit:o}){const n=t,r=o,{t:i}=ee.useI18n(),l=ne.debounce(()=>{r("confirm")},300);async function a(){n.layer.type=="drawer"?n.layer.onClose?n.layer.onClose():await Z.ElMessageBox.confirm(i("que-ding-guan-bi-ma"),{confirmButtonText:i("que-ding"),cancelButtonText:i("qu-xiao"),type:"warning"}).catch(()=>{})=="confirm"&&(n.layer.show=!1):n.layer.show=!1}return(s,c)=>{const w=e.resolveComponent("el-button"),p=e.resolveComponent("el-drawer"),x=e.resolveComponent("el-dialog");return t.layer.type?(e.openBlock(),e.createBlock(p,{key:0,modelValue:t.layer.show,"onUpdate:modelValue":c[0]||(c[0]=y=>t.layer.show=y),size:t.layer.width||"100%",title:t.layer.title,direction:"rtl","append-to-body":"","before-close":a,class:"drawer-content"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default"),c[2]||(c[2]=e.createElementVNode("p",{class:"mgt50"},null,-1)),t.layer.showButton?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(s.$slots,"btn",{},()=>[e.createVNode(w,{onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("qu-xiao")),1)]),_:1}),e.createVNode(w,{type:"primary",loading:t.loading,onClick:e.unref(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("ti-jiao")),1)]),_:1},8,["loading","onClick"])])])):e.createCommentVNode("",!0)]),_:3},8,["modelValue","size","title"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(x,{"close-on-click-modal":!1,modelValue:t.layer.show,"onUpdate:modelValue":c[1]||(c[1]=y=>t.layer.show=y),title:t.layer.title,width:t.layer.width||500,center:""},e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[t.layer.showButton?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"btn",{},()=>[e.createVNode(w,{onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("qu-xiao")),1)]),_:1}),e.createVNode(w,{type:"primary",onClick:e.unref(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("ti-jiao")),1)]),_:1},8,["onClick"])])]),key:"0"}:void 0]),1032,["modelValue","title","width"])])),[[e.unref(qt),t.layer.show]])}}};function Rt(t,o={}){const n=le(),r={inForm:!0,required:!0,...o},i={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}$/,password:/(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/}[t],{inForm:l,value:a,required:s,msg:c=n("validate.invalidInput")}=r;return l?function(w,p,x){if(s){i.test(p)?x():x(new Error(c));return}p&&!i.test(p)?x(new Error(c)):x()}:i.test(a)}class Ut{constructor(o={}){this.config={clientCode:o.clientCode||"one-portal",casServerUrl:`https://one-portal${o.isTest?"-test":""}.joy-group.com/api`,casPortalUrl:`https://one-portal${o.isTest?"-test":""}.joy-group.com`,serviceUrl:o.serviceUrl||window.location.origin+"/cas/callback",tokenKey:o.tokenKey||"one_portal_token",userKey:o.userKey||"one_portal_user",debug:o.debug||!1,autoLogin:o.autoLogin!==!1,loginCallback:o.loginCallback||null,logoutCallback:o.logoutCallback||null,errorCallback:o.errorCallback||null},this.token=null,this.user=null,this.init()}init(){this.log("OnePortal CAS SDK 初始化中..."),this.loadFromStorage();const n=new URLSearchParams(window.location.search).get("ticket");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())}loadFromStorage(){try{this.token=localStorage.getItem(this.config.tokenKey);const o=localStorage.getItem(this.config.userKey);o&&(this.user=JSON.parse(o)),this.log("从本地存储加载数据:",{token:!!this.token,user:!!this.user})}catch(o){this.log("加载本地存储数据失败:",o)}}saveToStorage(){try{this.token&&localStorage.setItem(this.config.tokenKey,this.token),this.user&&localStorage.setItem(this.config.userKey,JSON.stringify(this.user)),this.log("数据已保存到本地存储")}catch(o){this.log("保存到本地存储失败:",o)}}clearStorage(){try{localStorage.removeItem(this.config.tokenKey),localStorage.removeItem(this.config.userKey),this.log("本地存储已清除")}catch(o){this.log("清除本地存储失败:",o)}}isLoggedIn(){return!!(this.token&&this.user)}getUser(){return this.user}getToken(){return this.token}login(){const o=`${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;this.log("跳转到CAS登录页面:",o),window.location.href=o}async validateTicket(o){try{this.log("验证ST票据:",o);const n=await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${o}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);const r=await n.json();if(r.success&&r.data)return this.token=r.data.token,this.user=r.data.user,this.saveToStorage(),this.clearTicketFromUrl(),this.log("ST票据验证成功,用户登录成功:",this.user),this.config.loginCallback&&this.config.loginCallback(this.user,this.token),!0;throw new Error(r.message||"ST票据验证失败")}catch(n){return this.log("ST票据验证失败:",n),this.handleError(n),!1}}clearTicketFromUrl(){const o=new URL(window.location);o.searchParams.delete("ticket"),window.history.replaceState({},document.title,o.toString())}async logout(o=!0){try{if(this.log("用户登出"),this.token)try{await fetch(`${this.config.casServerUrl}/auth/logout`,{method:"POST",headers:{AppId:this.config.clientCode,Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}})}catch(n){this.log("调用服务端登出接口失败:",n)}this.token=null,this.user=null,this.clearStorage(),this.config.logoutCallback&&this.config.logoutCallback(),o&&this.login()}catch(n){this.log("登出失败:",n),this.handleError(n)}}async request(o,n={}){const r={headers:{"Content-Type":"application/json",...n.headers},...n};r.headers.appId=this.config.clientCode,this.token&&(r.headers.Authorization=`Bearer ${this.token}`);try{const i=await fetch(o,r);return i.status===401?(this.log("Token已过期,需要重新登录"),this.logout(),null):i}catch(i){throw this.log("请求失败:",i),i}}async fetchUserInfo(){try{const o=await this.request(`${this.config.casServerUrl}/auth/user`);if(o&&o.ok){const n=await o.json();if(n.success&&n.data)return this.user=n.data,this.saveToStorage(),this.user}return null}catch(o){return this.log("获取用户信息失败:",o),null}}async refreshToken(){this.log("Token刷新功能暂未实现")}handleError(o){this.log("发生错误:",o),this.config.errorCallback&&this.config.errorCallback(o)}log(...o){this.config.debug&&console.log("[OnePortal CAS SDK]",...o)}checkLoginStatus(){return!this.isLoggedIn()&&this.config.autoLogin?(this.login(),!1):this.isLoggedIn()}setConfig(o,n){this.config[o]=n}getConfig(o){return this.config[o]}}function Yt(t,o={}){const r=Object.assign({manual:!1,log:!1,params:null,format:null},o),{manual:i,log:l,params:a={},cb:s,format:c}=r,w=e.ref([]),p=e.ref(!1),x=y=>{const h=y||a;p.value=!0,t(h).then(m=>{const{code:d,data:C,msg:k}=m;if(s){const{records:_,rows:S}=C||{},T=_||S?_||S:C;w.value=Ee(T,c),s(m)}if(C){if(C.records!=null||C.rows!=null){const{records:_,rows:S,total:T=0}=C||{};h&&h.total!=null&&(a.total=parseInt(T)),w.value=Ee(_||S||[],c)}else w.value=Ee(C,c);l&&console.log("useRequest-res",w.value)}}).catch(m=>{s&&(console.log("useRequestErr",m),s({code:500}))}).finally(()=>{p.value=!1})};return i||x(),[p,w,x]}function Ht(t){const o=e.ref(t),n=e.ref(""),r=e.ref("");return e.watch(o,i=>{const l=i||["",""];n.value=l[0],r.value=l[1]}),[o,n,r]}function Kt(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function Ee(t,o){if(!o)return t;if(t instanceof Array)return t.map(r=>{let i={};return o.forEach(l=>i[l]=r[l]),i});let n={};return o.forEach(r=>n[r]=t[r]),n}function Wt(t,o=[]){const{locale:n}=ee.useI18n(),r=e.ref(t());return e.watch([n,...o],()=>{r.value=t()},{immediate:!0}),r}function Zt(t,o="zh_cn",n="en_us"){if(!t)return"-";const r={en_us:n,zh_cn:o},l=be().global.locale.value;return t[r[l]]||t[o]||"-"}function Gt(t,o){let n=te.mapState;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapState),Ke(o,n)}function Jt(t,o){let n=te.mapGetters;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapGetters),Ke(o,n)}function Xt(t,o){let n=te.mapActions;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapActions),Qt(o,n)}function Ke(t,o){const n=te.useStore(),r=o(t),i={};return Object.keys(r).forEach(l=>{const a=r[l].bind({$store:n});i[l]=e.computed(a)}),i}function Qt(t,o){const n=te.useStore(),r=o(t),i={};return Object.keys(r).forEach(l=>{i[l]=r[l].bind({$store:n})}),i}function we(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function eo(){fe.VxeUI.renderer.add("Enum",{renderTableDefault(t,o){let n;if([null,void 0].includes(o.row[o.column.field]))return"-";const r=o.row[o.column.field];if(t.type=="tag"){let i;return e.createVNode(e.resolveComponent("el-text"),{type:t.enum.getTag(r)},we(i=t.enum.getName(r))?i:{default:()=>[i]})}return e.createVNode(e.resolveComponent("el-text"),null,we(n=t.enum.getName(r))?n:{default:()=>[n]})}}),fe.VxeUI.renderer.add("InputNumber",{renderTableDefault(t,o){return e.createVNode(Z.ElInputNumber,e.mergeProps({modelValue:o.row[o.column.field],"onUpdate:modelValue":n=>o.row[o.column.field]=n},t.props,{"step-strictly":!0,"value-on-clear":0}),null)}}),fe.VxeUI.renderer.add("TrueFalse",{renderTableDefault(t,o){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn";return e.createVNode(Z.ElText,{type:o.row[o.column.field]?"success":"danger"},{default:()=>[o.row[o.column.field]?r?"是":"YES":r?"否":"NO"]})}}),fe.VxeUI.renderer.add("I18n",{renderTableDefault(t,o){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn"?o.column.field:t.fieldEn;return o.row[r]||o.row[o.column.field]}}),fe.VxeUI.renderer.add("Link",{renderTableDefault(t,o){let n=o.column.field;const r=ve.useRouter(),{multiple:i,to:l,openType:a="system"}=t,s=o.row[n];function c(w,p){a=="blank"?window.open(w):r.push({path:w,query:{[n]:p}})}if(i){const w=(s==null?void 0:s.split(","))||[];return w.map((p,x)=>e.createVNode("span",null,[e.createVNode(Z.ElLink,{underline:"never",type:"primary",onclick:()=>c(a=="stystem"?l:p,p)},we(p)?p:{default:()=>[p]}),x<w.length-1?",":""]))}return e.createVNode(Z.ElLink,{underline:"never",type:"primary",onclick:()=>c(a=="stystem"?l:s,s)},we(s)?s:{default:()=>[s]})}})}g.CmpDictionary=Pe,g.CmpIcon=$e,g.ConfrimButton=Et,g.DownExcelTemp=Nt,g.ImportButton=Lt,g.LayOutForm=Qe,g.Layer=jt,g.ListPage=Ot,g.OnePortalCasSDK=Ut,g.SearchBar=je,g.StatusMap=_e,g._toRaw=gt,g._typeOf=Kt,g.arrToStatusMap=yt,g.arrayToTree=pt,g.checkFileSize=wt,g.creatValidator=Rt,g.createImportFields=kt,g.createListPageId=xt,g.en_us=Ce,g.exportExcel=at,g.exportExcelMuilti=Ae,g.getI18n=be,g.getI18nT=le,g.getListPageConfig=Ue,g.getLocaleValue=Zt,g.getValueBykey=St,g.importExcel=lt,g.importExcelMuilti=qe,g.messages=ze,g.registerVxeRenderers=eo,g.resetListPageConfig=Mt,g.setListPageConfig=Bt,g.setupI18n=Oe,g.sleep=ht,g.stringToArray=Se,g.stripHtmlTags=Ct,g.unicode2Str=bt,g.useActions=Xt,g.useDatePicker=Ht,g.useGetters=Jt,g.useI18nReState=Wt,g.useRequest=Yt,g.useState=Gt,g.zh_cn=ye,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
1
+ (function(g,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("element-plus"),require("vue"),require("file-saver"),require("exceljs"),require("dayjs"),require("vue-i18n"),require("lodash"),require("vue-router"),require("vuex"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","file-saver","exceljs","dayjs","vue-i18n","lodash","vue-router","vuex","vxe-pc-ui"],Z):(g=typeof globalThis<"u"?globalThis:g||self,Z(g.JoyAdminComponents={},g.ElementPlus,g.Vue,g.fileSaver,g.ExcelJS,g.dayjs,g.VueI18n,g._,g.VueRouter,g.Vuex,g.VxeUI))})(this,function(g,Z,e,Ie,pe,ue,ee,ne,ve,te,fe){"use strict";const Qe=e.defineComponent({name:"LayOutForm",setup(t,{slots:o,attrs:n,emit:r}){const s=e.ref(null),l=()=>o.default?o.default().filter(i=>i.type!==Symbol.for("v-cmt")).map(i=>i.type===Symbol.for("v-fgt")?i.children:i).flat().map(i=>{var c,C;return e.h(Z.ElCol,{span:((c=i.props)==null?void 0:c.span)||24,...(C=i.props)==null?void 0:C.colProps},{default:()=>i})}):null;e.onMounted(()=>{r("ref",s.value)});function a(){return e.h(Z.ElForm,{...n,ref:s},()=>e.h(Z.ElRow,{gutter:n.gutter??20},{default:()=>l()}))}return a}});var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Be={exports:{}};(function(t,o){(function(n,r){t.exports=r()})(Fe,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(l,a,i){var c=a.prototype;i.utc=function(d){var b={date:d,utc:!0,args:arguments};return new a(b)},c.utc=function(d){var b=i(this.toDate(),{locale:this.$L,utc:!0});return d?b.add(this.utcOffset(),n):b},c.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var C=c.parse;c.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),C.call(this,d)};var p=c.init;c.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else p.call(this)};var x=c.utcOffset;c.utcOffset=function(d,b){var k=this.$utils().u;if(k(d))return this.$u?0:k(this.$offset)?x.call(this):this.$offset;if(typeof d=="string"&&(d=function(B){B===void 0&&(B="");var P=B.match(r);if(!P)return null;var I=(""+P[0]).match(s)||["-",0,0],Y=I[0],V=60*+I[1]+ +I[2];return V===0?0:Y==="+"?V:-V}(d),d===null))return this;var _=Math.abs(d)<=16?60*d:d;if(_===0)return this.utc(b);var S=this.clone();if(b)return S.$offset=_,S.$u=!1,S;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(_+T,n)).$offset=_,S.$x.$localOffset=T,S};var y=c.format;c.format=function(d){var b=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,b)},c.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var h=c.toDate;c.toDate=function(d){return d==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var m=c.diff;c.diff=function(d,b,k){if(d&&this.$u===d.$u)return m.call(this,d,b,k);var _=this.local(),S=i(d).local();return m.call(_,S,b,k)}}})})(Be);var et=Be.exports;const tt=De(et);var Me={exports:{}};(function(t,o){(function(n,r){t.exports=r()})(Fe,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(s,l,a){var i,c=function(y,h,m){m===void 0&&(m={});var d=new Date(y),b=function(k,_){_===void 0&&(_={});var S=_.timeZoneName||"short",T=k+"|"+S,B=r[T];return B||(B=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:k,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),r[T]=B),B}(h,m);return b.formatToParts(d)},C=function(y,h){for(var m=c(y,h),d=[],b=0;b<m.length;b+=1){var k=m[b],_=k.type,S=k.value,T=n[_];T>=0&&(d[T]=parseInt(S,10))}var B=d[3],P=B===24?0:B,I=d[0]+"-"+d[1]+"-"+d[2]+" "+P+":"+d[4]+":"+d[5]+":000",Y=+y;return(a.utc(I).valueOf()-(Y-=Y%1e3))/6e4},p=l.prototype;p.tz=function(y,h){y===void 0&&(y=i);var m,d=this.utcOffset(),b=this.toDate(),k=b.toLocaleString("en-US",{timeZone:y}),_=Math.round((b-new Date(k))/1e3/60),S=15*-Math.round(b.getTimezoneOffset()/15)-_;if(!Number(S))m=this.utcOffset(0,h);else if(m=a(k,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),h){var T=m.utcOffset();m=m.add(d-T,"minute")}return m.$x.$timezone=y,m},p.offsetName=function(y){var h=this.$x.$timezone||a.tz.guess(),m=c(this.valueOf(),h,{timeZoneName:y}).find(function(d){return d.type.toLowerCase()==="timezonename"});return m&&m.value};var x=p.startOf;p.startOf=function(y,h){if(!this.$x||!this.$x.$timezone)return x.call(this,y,h);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return x.call(m,y,h).tz(this.$x.$timezone,!0)},a.tz=function(y,h,m){var d=m&&h,b=m||h||i,k=C(+a(),b);if(typeof y!="string")return a(y).tz(b);var _=function(P,I,Y){var V=P-60*I*1e3,w=C(V,Y);if(I===w)return[V,I];var $=C(V-=60*(w-I)*1e3,Y);return w===$?[V,w]:[P-60*Math.min(w,$)*1e3,Math.max(w,$)]}(a.utc(y,d).valueOf(),k,b),S=_[0],T=_[1],B=a(S).utcOffset(T);return B.$x.$timezone=b,B},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(y){i=y}}})})(Me);var ot=Me.exports;const nt=De(ot),ye={"dao-ru":"导入","quan-xuan":"全选","xia-zai-dao-ru-mo-ban":"下载导入模板","xu-hao":"序号","qing-shu-ru":"请输入","qing-xuan-ze":"请选择","kai-shi-shi-jian":"开始时间","jie-shu-shi-jian":"结束时间","shai-xuan":"筛选","chong-zhi":"重置","guan-bi":"关闭","zhan-kai":"展开","qu-xiao":"取消","ti-jiao":"提交","que-ding":"确定","que-ding-guan-bi-ma":"确定关闭吗","xia-zai-dao-ru-mo-ban":"下载导入模板",excel:{fieldsMappingRequired:"请输入列字段映射",invalidInput:"非法输入",invalidOption:"请输入有效选项!",copyFailed:"复制失败",sheetNameTooLong:'Sheet名称 "{0}" 长度超过31个字符,已自动截断为 "{1}"'},validate:{invalidInput:"请输入正确内容"},tools:{keysLengthError:"keys 长度必须大于2 默认前两位为 label value"}},Ce={"dao-ru":"Import","quan-xuan":"Select All","xia-zai-dao-ru-mo-ban":"Download Import Template","xu-hao":"No.","qing-shu-ru":"Please enter","qing-xuan-ze":"Please select","kai-shi-shi-jian":"Start Time","jie-shu-shi-jian":"End Time","shai-xuan":"Filter","chong-zhi":"Reset","guan-bi":"Collapse","zhan-kai":"Expand","qu-xiao":"Cancel","ti-jiao":"Submit","que-ding":"Confirm","que-ding-guan-bi-ma":"Are you sure to close?","xia-zai-dao-ru-mo-ban":"Download Import Template",excel:{fieldsMappingRequired:"Please enter column field mapping",invalidInput:"Invalid input",invalidOption:"Please enter a valid option!",copyFailed:"Copy failed",sheetNameTooLong:'Sheet name "{0}" exceeds 31 characters, automatically truncated to "{1}"'},validate:{invalidInput:"Please enter valid content"},tools:{keysLengthError:"Keys length must be greater than 2, default first two are label and value"}},ze={zh_cn:ye,en_us:Ce};let ie=null;function Oe(t=null){if(t){const{global:o}=t;return o.messages.value.zh_cn?o.mergeLocaleMessage("zh_cn",ye):o.setLocaleMessage("zh_cn",ye),o.messages.value.en_us?o.mergeLocaleMessage("en_us",Ce):o.setLocaleMessage("en_us",Ce),ie=t,t}return ie||(ie=ee.createI18n({legacy:!1,locale:"zh_cn",fallbackLocale:"zh_cn",messages:ze})),ie}function be(){return ie||Oe()}function le(){return be().global.t}ue.extend(tt),ue.extend(nt);async function lt(t,o){const{fields:n,range:r=1}=o;if(!n){const a=le();throw new Error(a("excel.fieldsMappingRequired"))}let s=new pe.Workbook;await s.xlsx.load(t);const l={};return s.eachSheet(function(a,i){const c=[];a.eachRow(function(C,p){if(p>r){let x={},y=!0;Object.keys(n).forEach(h=>{const m=C.getCell(n[h]).value;x[h]=m,m&&(y=!1)}),y||c.push(x)}}),l[a._name]=c}),s=null,l}const Ne={columnWidth:30};async function at(t,o,n=[],r={}){if(!t||!o)return;const{columnStyle:s}=r,{columnWidth:l}=Ne;o.forEach(c=>{c.width=c.width?c.width:l});const{workbook:a,worksheet:i}=rt();i.columns=o,i.addRows(n),s&&await st(a,i,s);try{const c=await a.xlsx.writeBuffer(),C=new File([c],t,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});Ie.saveAs(C)}catch(c){console.log(c)}}function rt(){const t=new pe.Workbook;t.creator="distributor System",t.lastModifiedBy="distributor System",t.created=new Date,t.modified=new Date,t.lastPrinted=new Date;const o=t.addWorksheet("Sheet1");return{workbook:t,worksheet:o}}async function st(t,o,n){const r=Object.keys(n);for(const s of r){const l=n[s],{type:a}=l;switch(a){case"IMG":await it(t,o,s);break}}}async function it(t,o,n,r){const s=o.getColumn(n),l=s.values;o.getColumn(n).width=20,o.eachRow((a,i)=>{i>1&&(a.height=40)});for(let a=0,i=l.length;a<i;a++){if(a<2)continue;let c=l[a];c&&(o.getCell(s.letter+a).value="",await ct(t,o,c,{width:100,height:50,col:s._number-1,row:a-1}))}}async function ct(t,o,n,r){const{col:s,row:l,width:a,height:i}=r,{success:c,base64:C}=await dt(n,.3);if(c){const p=t.addImage({base64:C,extension:"jpeg"});o.addImage(p,{tl:{col:s,row:l},ext:{width:a,height:i}})}}function dt(t,o=1){const n=new Image;return n.setAttribute("crossOrigin","anonymous"),n.crossOrigin="anonymous",n.src=t,new Promise((r,s)=>{n.onload=()=>{const l=document.createElement("canvas");l.width=n.width,l.height=n.height,l.getContext("2d").drawImage(n,0,0,l.width,l.height),r({success:!0,base64:l.toDataURL("image/jpeg",o)})},n.onerror=()=>{r({success:!1})}})}const ke="---";async function qe(t,o){const{fields:n,range:r=1}=o;if(!n){const a=le();throw new Error(a("excel.fieldsMappingRequired"))}let s=new pe.Workbook;await s.xlsx.load(t);const l={};return s.eachSheet(function(a,i){if(a.state=="visible"){const c=[],C=n[a._name];if(C){let p=Object.values(C).some(y=>y.includes("image")),x={};p&&(a.getImages().forEach(h=>{const{tl:m}=h.range,d=s.model.media.find(b=>b.index===h.imageId);if(d){const b=d.buffer.toString("base64"),k=`data:image/${d.extension};base64,${b}`,_=`${Math.ceil(m.row)}_${Math.ceil(m.col)}`;x[_]?x[_].push(k):x[_]=[k]}}),console.log("withImages-imageMap",x)),a.eachRow(function(y,h){if(h>r){let m={_excelRowNumber:h},d=!0;Object.keys(C).forEach(b=>{var B;let[k,_]=C[b].split(ke);const S=y.getCell(k);let T;if(_=="image"&&p){const P=S._column._number,I=`${h}_${P}`;T=x[I]||""}else S.result!=null?T=S.result:(B=S.value)!=null&&B.richText?T=S.value.richText.reduce((P,I)=>P+I.text,""):S.type==4&&S.value?T=ue(S.value).utc().format("YYYY-MM-DD HH:mm:ss"):T=S.value;T&&_=="option"&&(T=T.split(ke)[1]),m[b]=T,T&&(d=!1)}),d||c.push(m)}}),l[a._name]=c}}}),s=null,l}const ut={date:"yyyy-mm-dd",number:"0",string:"@"};async function Ae(t,o){if(!t||o.length==0)return;const n=ft(o);for(const r of n.worksheets){const{columnWidth:s}=Ne,l=o[r.name];if(!l)continue;const{tableHeader:a,tableData:i}=l;a.forEach(c=>{const{style:C={},required:p}=c,{font:x={}}=C;c.style={...C,font:{...x,color:{argb:p?"FFFF0000":void 0}}}}),r.columns=a,r.addRows(i),a.forEach(c=>{let{header:C,key:p,width:x,option:y,numFmt:h,locked:m,optionFormater:d}=c;const b=r.getColumn(p);if(b.numFmt=ut[h]||h,b.width=x||s,b.protection={locked:m===!0},y){const k=n.addWorksheet(p);k.state="hidden",d||(d=_=>`${_.label}${ke}${_.value}`),k.getColumn(1).values=y.map(d),Array(100).fill("").forEach((_,S)=>{if(S>0){const T=le();r.getCell(`${b.letter}${S}`).dataValidation={type:"list",formulae:[`${p}!$A$1:$A$${y.length}`],showErrorMessage:!0,error:T("excel.invalidInput"),errorStyle:"stop",errorMessage:T("excel.invalidOption")}}})}}),a.some(c=>c.locked)&&await r.protect("6737187214",{selectLockedCells:!0,selectUnlockedCells:!0})}try{const r=await n.xlsx.writeBuffer(),s=new File([r],t,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});Ie.saveAs(s)}catch(r){console.log(r)}}function ft(t){const o=le(),n=new pe.Workbook;return n.creator="distributor System",n.lastModifiedBy="distributor System",n.created=new Date,n.modified=new Date,n.lastPrinted=new Date,Object.keys(t).sort((s,l)=>{const a=t[s].sort??0,i=t[l].sort??0;return a-i}).forEach(s=>{let l=s,a=!1;/[\\/:*?\[\]]/g.test(s)&&(s=s.replace(/[\\/:*?\[\]]/g,""),a=!0),s.length>31&&(s=s.substring(0,31).trim(),a=!0,console.warn(o("excel.sheetNameTooLong",[l,s]))),a&&(t[s]=t[l],delete t[l]),n.addWorksheet(s)}),n}function mt(t){if(t<26)return String.fromCharCode(65+t);{const o=String.fromCharCode(65+Math.floor((t-26)/26)),n=String.fromCharCode(65+(t-26)%26);return o+n}}function ht(t){return new Promise(o=>{setTimeout(()=>{o()},t)})}function gt(t){return JSON.parse(JSON.stringify(t))}function pt(t){let o=[],n={},r=(s,l)=>Object.prototype.hasOwnProperty.call(s,l);for(const s of t){n[s.id]={...s,children:r(n,s.id)?n[s.id].children:[]};const l=n[s.id];s.pid==-1?o.push(l):(r(n,s.pid)||(n[s.pid]={children:[]}),n[s.pid].children.push(l))}return o}function Se(t,o=" "){return t?t.split(o).filter(n=>n.trim()):[]}class _e{constructor(o,n=["label","value","labelEn"]){this.list=o.map(r=>({...r,label:r[n[0]],labelEn:r[n[2]]??r[n[0]]??"",value:r[n[1]]})),this.map=new Map(this.list.map(r=>[r[n[1]],r]))}getName(o){if(!this.has(o))return"-";const n=be().global.locale,{label:r,labelEn:s}=this.map.get(o);return(n.value=="zh_cn"?r:s)??r??"-"}getTag(o){if(!this.has(o))return"info";const{tag:n="info"}=this.map.get(o);return n}getItem(o){return this.has(o)?this.map.get(o):null}getColor(o){if(!this.has(o))return null;const{color:n}=this.map.get(o);return n}has(o){return this.map.has(o)}}function yt(t,o=[],n="i18nName"){if(t.length==0)return new _e([]);if(o.length<2){const s=le();throw new Error(s("tools.keysLengthError"))}let r=t.map(s=>{let l={};return n&&(l.labelEn=s[n]),o.forEach((a,i)=>{i===0?l.label=s[a]:i===1?l.value=s[a]:l[a]=s[a]}),l});return new _e(r)}function Ct(t){return t?t.replace(/<[^>]+>/g,""):""}function bt(t){return t?(t.includes("\\\\u")&&(t=t.replace(/\\/g,"")),t.replace(/\\u[\dA-F]{4}/gi,o=>String.fromCharCode(parseInt(o.replace(/\\u/g,""),16)))):""}function wt(t,o=10){let n=1048576*o;return!(t.size>n)}function xt(t){return Array.from(10).fill(0).map((n,r)=>t+"_"+r)}function kt(t){let o={};return t.map((n,r)=>{let{key:s,option:l,type:a,optionFormater:i}=n,c=mt(r);l&&!i?o[s]=`${c}---option`:a==="image"?o[s]=`${c}---image`:o[s]=c}),o}function St(t,o){return o.split(".").reduce((n,r)=>n&&n[r],t)}const ao="",me=(t,o)=>{const n=t.__vccOpts||t;for(const[r,s]of o)n[r]=s;return n},_t=["onClick"],Pe=me({__name:"index",props:e.mergeModels({api:{type:Function},showCheckAll:{type:Boolean,default:!0},maxLimit:{type:Number,default:void 0},minLimit:{type:Number,default:void 0},optionClick:{type:Function,default:()=>{}},data:{type:Array},labelValue:{type:Object,default:()=>({label:"label",labelEn:"labelEn",value:"value"})},changeLocal:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["success","change","changeAll"],["update:modelValue"]),setup(t,{emit:o}){const n=t,r=e.useAttrs(),{t:s,locale:l}=ee.useI18n(),a=e.useModel(t,"modelValue"),i=e.computed(()=>r["value-key"]!=null),c=e.ref(""),C=e.computed(()=>{if(r.remote!==void 0)return n.data;const w=Se(c.value),{data:$,labelValue:F}=n,H=$||y.value;if(w.length==0)return H;const{label:E,labelEn:ce}=F;let M=l.value=="en_us"?ce||"i18nName":E;return w.length==1?H.filter(oe=>oe[M].toLowerCase().includes(w[0].toLowerCase())):H.filter(oe=>{let de=!1;return de=w.some(xe=>oe[M].toLowerCase()==xe.toLowerCase()),de})}),p=e.computed({get(){return r.multiple==null||a.value==null?!1:a.value.length==C.value.length},set(w){return w}}),x=o,y=e.ref([]),h=async()=>{const{data:w}=await n.api();y.value=[...w],x("success",y)};n.api&&h();function m(w){x("change",w),d.value&&e.nextTick(()=>{n.optionClick&&n.optionClick(d.value),d.value=null})}const d=e.ref(null);function b(w){d.value=w}const k=n.labelValue.label.split("-"),_=w=>{if(k.length==1){if(n.changeLocal)return s(w[n.labelValue.label]);let $=l.value=="en_us"?w[n.labelValue.labelEn||"i18nName"]:w[n.labelValue.label];return $=$||w[n.labelValue.label],$+""}else{let $=[];return k.forEach(F=>{$.push(w[F])}),$.join("-")}};function S(w){let $=n.data?n.data:y.value;a.value=w?$.map(F=>i.value?F:F[n.labelValue.value]):[],e.nextTick(()=>{x("change",a.value),x("changeAll",a.value,$)})}function T(w){x("change",i.value?w:w[n.labelValue.value]),e.nextTick(()=>{n.optionClick&&n.optionClick(w)})}function B(w){const $=i.value?w:w[n.labelValue.value],F=i.value?a.value.some(H=>H[n.labelValue.value]===w[n.labelValue.value]):a.value.includes($);return!!(n.maxLimit>0&&a.value.length>=n.maxLimit&&!F||n.minLimit>0&&a.value.length===n.minLimit&&F)}function P(w){return w.map($=>({...$,label:_($),value:i.value?$:$[n.labelValue.value]}))}const I=e.ref([]),Y=n.data?n.data:y.value;I.value=P(Y),e.watch(()=>n.data?n.data:y.value,w=>{var F;const $=P(w);if($.length!==I.value.length)I.value=$;else{let H=!1;for(let E=0;E<$.length;E++)if($[E].value!==((F=I.value[E])==null?void 0:F.value)){H=!0;break}H&&(I.value=$)}},{deep:!0});const V=e.computed(()=>r.multiple!==void 0&&(n.maxLimit>0||n.minLimit>0)?I.value.map(w=>({...w,disabled:B(w)})):I.value);return(w,$)=>{const F=e.resolveComponent("el-checkbox"),H=e.resolveComponent("el-select-v2"),E=e.resolveComponent("el-option"),ce=e.resolveComponent("el-select");return e.unref(r).v2!=null?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0,options:V.value,modelValue:a.value,"onUpdate:modelValue":$[1]||($[1]=M=>a.value=M)},e.unref(r),{filterable:"","collapse-tags":"","collapse-tags-tooltip":"",clearable:"",onChange:m,onClear:m}),e.createSlots({default:e.withCtx(({item:M})=>[e.createElementVNode("div",{onClick:ae=>b(M)},e.toDisplayString(M.label),9,_t)]),_:2},[e.unref(r).multiple!=null?{name:"header",fn:e.withCtx(()=>[e.renderSlot(w.$slots,"header",{},()=>[e.createVNode(F,{class:"mgl20",modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=M=>p.value=M),onChange:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0)]),key:"0"}:void 0]),1040,["options","modelValue"])):(e.openBlock(),e.createBlock(ce,e.mergeProps({key:1,modelValue:a.value,"onUpdate:modelValue":$[3]||($[3]=M=>a.value=M),filterable:"","collapse-tags":"","collapse-tags-tooltip":"","filter-method":e.unref(r).remote!=null?void 0:M=>c.value=M,clearable:""},e.unref(r),{onClear:t.optionClick}),{default:e.withCtx(()=>[e.unref(r).multiple!=null&&t.showCheckAll&&t.maxLimit==null?e.renderSlot(w.$slots,"header",{key:0},()=>[e.createVNode(F,{class:"mgl20",modelValue:p.value,"onUpdate:modelValue":$[2]||($[2]=M=>p.value=M),onChange:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(M,ae)=>(e.openBlock(),e.createBlock(E,{key:ae,label:_(M),disabled:e.unref(r).multiple!=null&&(t.maxLimit>0||t.minLimit>0)?B(M):!1,onClick:e.withModifiers(oe=>T(M),["stop"]),value:i.value?M:M[t.labelValue.value]},null,8,["label","disabled","onClick","value"]))),128))]),_:3},16,["modelValue","filter-method","onClear"]))}}},[["__scopeId","data-v-078a95a6"]]),so="",$t=e.defineComponent({props:{name:{tyepe:String,required:!0}}});function Vt(t,o,n,r,s,l){const a=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(a,{class:"cmp-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.name)))]),_:1})}const $e=me($t,[["render",Vt],["__scopeId","data-v-733f9daa"]]),Et={__name:"index",emits:["ok","no"],setup(t,{emit:o}){const n=o,r=ne.debounce(()=>{n("ok")},500);function s(){n("no")}return(l,a)=>{const i=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(i,e.mergeProps(l.$attrs,{onConfirm:e.unref(r),onCancel:s}),{reference:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["onConfirm"])])}}},io="",Tt=["accept"],Lt=me({__name:"index",props:{accept:{type:String,default:".xlsx,.xls"},fields:{type:Object,default:()=>({})},fileChange:{type:Function,required:!0}},emits:["fileChange"],setup(t,{emit:o}){const n=t,r=e.ref(null),s=e.ref(!1);async function l(a){s.value=!0;let i=a.target.files[0];const c=await qe(i,n.fields).catch(()=>{s.value=!1}).finally(()=>{r.value.value=null});await n.fileChange(c).finally(()=>{s.value=!1})}return(a,i)=>{const c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(c,e.mergeProps({type:"primary",loading:s.value,class:"mgr10",onClick:i[0]||(i[0]=C=>r.value.click())},a.$attrs),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.$t("dao-ru")),1)],!0)]),_:3},16,["loading"]),e.createElementVNode("input",{onChange:l,ref_key:"input",ref:r,accept:t.accept,style:{position:"absolute",width:"0px",height:"0px",opacity:"0"},type:"file"},null,40,Tt)])}}},[["__scopeId","data-v-f5e86876"]]);function Ve(t){let o={};return t.forEach(n=>{const{key:r,type:s,option:l={},value:a,dateType:i="date"}=n;if(r)if(s=="input"&&(l!=null&&l.multiple))o[r]=Se(a);else if(s=="date")if(i.includes("range")){const[c,C]=r;let[p,x]=a||[];p&&i=="daterange"&&(p=ue(p).format("YYYY-MM-DD 00:00:00"),x=ue(x).format("YYYY-MM-DD 23:59:59")),o[c]=p,o[C]=x}else o[r]=a;else o[r]=a}),o}const uo="",It={key:0},vt={class:"btns"},Ft={class:"left"},Dt={class:"right"},je=me({__name:"index",props:{form:{type:Object,required:!0}},emits:["confirm","reset","visibleChange"],setup(t,{expose:o,emit:n}){const r=t,s=n,l=e.ref(!0),a=e.ref(null),{t:i}=ee.useI18n(),c={datetimerange:"YYYY-MM-DD HH:mm:ss",daterange:"YYYY-MM-DD",month:"YYYY-MM"},C=e.computed(()=>l.value?i("guan-bi"):i("zhan-kai"));function p(){s("confirm")}function x(k){k.option.onClear&&k.option.onClear(),s("confirm")}function y(){s("reset")}function h(){s("confirm")}function m(){return Ve(r.form.items)}const d=ne.cloneDeep(r.form.items);function b(){r.form.items.forEach(k=>{const _=d.find(S=>S.key==k.key);_&&(k.value=_.value)})}return o({getPrm:m,reset:b}),(k,_)=>{const S=e.resolveComponent("el-input"),T=e.resolveComponent("el-date-picker"),B=e.resolveComponent("el-form-item"),P=e.resolveComponent("el-form"),I=e.resolveComponent("el-link"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:"searchBar-container mgt10 mgb10",onKeydown:e.withKeys(p,["enter"])},[e.createElementVNode("div",{class:"searchBar",style:e.normalizeStyle({height:l.value?"auto":"42px"})},[e.createVNode(P,{inline:"",model:t.form.data},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.form.items.filter(V=>!V.hidden),V=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V.key},[V.type=="br"?(e.openBlock(),e.createElementBlock("br",It)):(e.openBlock(),e.createBlock(B,{key:1,label:V.name},{default:e.withCtx(()=>{var w,$;return[V.type==="input"?(e.openBlock(),e.createBlock(S,{key:0,modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,class:e.normalizeClass(((w=V.option)==null?void 0:w.class)||"w150"),placeholder:k.$t("qing-shu-ru"),clearable:""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"])):V.type==="custom"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.render),{key:1})):e.createCommentVNode("",!0),V.type==="select"?(e.openBlock(),e.createBlock(Pe,e.mergeProps({key:2,class:(($=V.option)==null?void 0:$.class)||"w150",modelValue:V.value,"onUpdate:modelValue":F=>V.value=F},{ref_for:!0},V.option,{onChange:p,onClear:F=>x(V)}),null,16,["class","modelValue","onUpdate:modelValue","onClear"])):e.createCommentVNode("",!0),V.type==="date"?(e.openBlock(),e.createBlock(T,e.mergeProps({key:3,class:{datetimerange:"w300",daterange:"w200"}[V.dateType]||"w100",modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,"value-format":c[V.dateType]||"YYYY-MM-DD",type:V.dateType||"date",onFocus:F=>a.value=V,onChange:F=>h(),placeholder:k.$t("qing-xuan-ze"),"start-placeholder":k.$t("kai-shi-shi-jian"),"end-placeholder":k.$t("jie-shu-shi-jian")},{ref_for:!0},V.option),null,16,["class","modelValue","onUpdate:modelValue","value-format","type","onFocus","onChange","placeholder","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0)]}),_:2},1032,["label"]))],64))),128))]),_:1},8,["model"])],4),e.createElementVNode("div",vt,[e.createElementVNode("div",Ft,[e.renderSlot(k.$slots,"table-header-left",{},void 0,!0)]),e.createElementVNode("div",Dt,[e.createVNode(I,{underline:"never",class:"mgr10",onClick:_[0]||(_[0]=()=>{s("visibleChange",!l.value),l.value=!l.value})},{default:e.withCtx(()=>[e.createVNode($e,{name:l.value?"ArrowUp":"ArrowDown"},null,8,["name"]),e.createTextVNode(" "+e.toDisplayString(C.value),1)]),_:1}),e.createVNode(Y,{type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.$t("shai-xuan")),1)]),_:1}),e.createVNode(Y,{type:"primary",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.$t("chong-zhi")),1)]),_:1}),e.renderSlot(k.$slots,"btn",{},void 0,!0)])])],32)}}},[["__scopeId","data-v-6c7679eb"]]),Re={pageNoKey:"pageNo",pageSizeKey:"pageSize",totalKey:"total",defaultPageSize:10,pageSizes:[10,50,100,500],responseDataKeys:{rows:["rows","records","list"],total:["totalRows","total"]},showSearch:!1,showPage:!1,showShadow:!1,showCheckBox:!1,enableCellCopy:!0};let he={...Re};function Bt(t){he={...he,...t,responseDataKeys:{...he.responseDataKeys,...t.responseDataKeys||{}}}}function Ue(){return he}function Mt(){he={...Re}}const mo="",zt={class:"center"},Ot=me({__name:"index",props:{id:{type:String,required:!1},loading:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},searchForm:{type:Object,default:()=>({items:[],selections:[]})},api:{type:Function},data:{type:Array},tableConfig:{type:Object,default:()=>({})}},setup(t,{expose:o}){const{t:n,locale:r}=ee.useI18n(),s=ve.useRoute(),l=Ue(),a=t,i=e.ref(!1),c=e.ref([]);a.searchForm.showSearch===void 0&&(a.searchForm.showSearch=l.showSearch),a.searchForm.showPage===void 0&&(a.searchForm.showPage=l.showPage),a.searchForm.showShadow===void 0&&(a.searchForm.showShadow=l.showShadow),a.searchForm.showCheckBox===void 0&&(a.searchForm.showCheckBox=l.showCheckBox),a.searchForm.enableCellCopy===void 0&&(a.searchForm.enableCellCopy=l.enableCellCopy),a.searchForm.selections||(a.searchForm.selections=[]);const C=e.computed(()=>{const f=s.path.replace(/\//g,"-").replace(/^-/,"")||"default-table";return a.id?`listPageId-${f}-${a.id}`:`listPageId-${f}`}),p=ne.cloneDeep(a.searchForm.items),x=a.searchForm.pageNoKey||l.pageNoKey,y=a.searchForm.pageSizeKey||l.pageSizeKey,h=e.reactive({[x]:1,[y]:a.searchForm.defaultPageSize||l.defaultPageSize,total:0}),m=e.ref(null),d=e.ref(null),b=e.ref(450),k=ne.debounce(()=>{e.nextTick(()=>{if(!d.value)return;const u=d.value.getBoundingClientRect(),L=window.innerHeight,D=u.top,q=100,U=L-D-q,z=200;b.value=Math.max(U,z)})},100),_=()=>{k()},S=()=>{if(!a.searchForm.enableCellCopy&&!l.enableCellCopy)return!1;const f=m.value;if(!f||!f.$el)return!1;const u=f.$el;return u.classList.add("cell-copy-enabled"),u.setAttribute("tabindex","-1"),u.removeEventListener("mousedown",M),u.removeEventListener("mousemove",ae),u.removeEventListener("mouseup",oe),u.removeEventListener("keydown",Te),u.addEventListener("mousedown",M),u.addEventListener("mousemove",ae),u.addEventListener("mouseup",oe),u.addEventListener("keydown",Te),!0};e.onMounted(()=>{k(),window.addEventListener("resize",_),(a.searchForm.enableCellCopy||l.enableCellCopy)&&(document.addEventListener("mouseup",Ze),document.addEventListener("mousedown",Ge),setTimeout(()=>{S()},500))}),e.onUpdated(()=>{(a.searchForm.enableCellCopy||l.enableCellCopy)&&setTimeout(()=>{S()},500)}),e.onUnmounted(()=>{if(window.removeEventListener("resize",_),a.searchForm.enableCellCopy||l.enableCellCopy){document.removeEventListener("mouseup",Ze),document.removeEventListener("mousedown",Ge);const f=m.value;if(f&&f.$el){const u=f.$el;u.removeEventListener("mousedown",M),u.removeEventListener("mousemove",ae),u.removeEventListener("mouseup",oe),u.removeEventListener("keydown",Te)}}});const T=e.computed(()=>H.value.height||b.value);let B;async function P(f){const{dataFormat:u}=a.tableConfig;f[x]!=1&&(f.nextSearchAfter=B),i.value=!0;const{code:L,data:D={}}=await a.api(f).finally(()=>{i.value=!1,a.searchForm.selections=[]});if(L==200){let q=[];for(const z of l.responseDataKeys.rows)if(D[z]){q=D[z];break}let U=0;for(const z of l.responseDataKeys.total)if(D[z]!==void 0){U=D[z];break}c.value=u?u(q):q,h.total=U,B=D.nextSearchAfter,(a.searchForm.enableCellCopy||l.enableCellCopy)&&e.nextTick(()=>{setTimeout(()=>{S()},100)})}}function I(f={}){const{searchData:u=()=>({})}=a.tableConfig,L=u();P({...h,...Ve(a.searchForm.items),...f,...L})}function Y(){const{reset:f}=a.tableConfig;f&&f(),a.searchForm.items.forEach(u=>{const L=p.find(D=>ne.isArray(u.key)&&ne.isArray(D.key)?u.key.join(",")==D.key.join(","):D.key==u.key);L&&(u.value=L.value)}),I()}a.api&&a.immediate&&I();function V(){return{...h,...Ve(a.searchForm.items)}}const w=()=>{const f=m.value;f&&f.clearSort()},$=e.reactive({storage:!0}),F=e.reactive({drag:!0,resizable:!0,maxFixedSize:0}),H=e.computed(()=>{const{customConfig:f,columnConfig:u,...L}=a.tableConfig;return{headerAlign:"left",align:"center",customConfig:{...$,...f},columnConfig:{...F,...u},"virtual-x-config":{enabled:!1,scrollToLeftOnChange:!1},"virtual-y-config":{enabled:!0,gt:100},...L}}),E=e.reactive({isSelecting:!1,startCell:null,endCell:null,selectedCells:[]}),ce=f=>{const u=f.closest(".vxe-body--column");if(!u||u.classList.contains("col--checkbox")||u.classList.contains("col--seq"))return null;const L=u.closest(".vxe-body--row");if(!L)return null;const D=m.value;if(!D)return null;let q=-1;const U=L.getAttribute("data-rowid");if(U!=null)q=parseInt(U,10);else{const O=L.parentElement;q=Array.from(O.querySelectorAll(".vxe-body--row")).indexOf(L)}if(q<0)return null;let z=-1;const Q=u.getAttribute("data-colid");if(Q&&(z=D.getColumns().findIndex(v=>v.id===Q)),z<0){const v=Array.from(L.querySelectorAll(".vxe-body--column")).indexOf(u),j=!!u.closest(".vxe-table--fixed-left-wrapper"),K=!!u.closest(".vxe-table--fixed-right-wrapper"),A=D.getColumns();if(j){const W=A.filter(R=>R.fixed==="left");v<W.length&&(z=A.indexOf(W[v]))}else if(K){const W=A.filter(R=>R.fixed==="right");v<W.length&&(z=A.indexOf(W[v]))}else{const W=a.searchForm.showCheckBox?1:0;z=A.filter(G=>G.fixed==="left").length+v-W}}return z<0?null:{rowIndex:q,colIndex:z,cell:u}},M=f=>{const u=ce(f.target);if(!u){de();return}E.isSelecting=!0,E.startCell={rowIndex:u.rowIndex,colIndex:u.colIndex},E.endCell={...E.startCell},xe(),We()},ae=f=>{if(!E.isSelecting)return;const u=ce(f.target);u&&(E.endCell={rowIndex:u.rowIndex,colIndex:u.colIndex},xe(),We())},oe=()=>{E.isSelecting=!1},de=()=>{E.selectedCells=[],E.startCell=null,E.endCell=null;const f=m.value;if(!f)return;f.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(L=>{L.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")})},xe=()=>{if(!E.startCell||!E.endCell){E.selectedCells=[];return}const f=E.startCell.rowIndex,u=E.endCell.rowIndex,L=E.startCell.colIndex,D=E.endCell.colIndex,q=Math.min(f,u),U=Math.max(f,u),z=Math.min(L,D),Q=Math.max(L,D);E.selectedCells=[];for(let O=q;O<=U;O++)for(let v=z;v<=Q;v++)E.selectedCells.push({rowIndex:O,colIndex:v})},We=()=>{e.nextTick(()=>{const f=m.value;if(!f)return;const u=f.$el;if(u.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(j=>{j.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")}),E.selectedCells.length===0)return;const L=f.getColumns(),D=E.selectedCells.map(j=>j.rowIndex),q=E.selectedCells.map(j=>j.colIndex),U=Math.min(...D),z=Math.max(...D),Q=Math.min(...q),O=Math.max(...q),v=[u.querySelector(".vxe-table--body-wrapper tbody"),u.querySelector(".vxe-table--fixed-left-wrapper tbody"),u.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean);E.selectedCells.forEach(({rowIndex:j,colIndex:K})=>{const A=L[K];if(!A)return;const W=A.fixed==="left",R=A.fixed==="right";for(const G of v){const ge=G.querySelectorAll(".vxe-body--row")[j];if(!ge)continue;const re=Array.from(ge.querySelectorAll(".vxe-body--column"));let N=null;if(W&&G.closest(".vxe-table--fixed-left-wrapper")){const J=L.filter(X=>X.fixed==="left").indexOf(A);N=re[J]}else if(R&&G.closest(".vxe-table--fixed-right-wrapper")){const J=L.filter(X=>X.fixed==="right").indexOf(A);N=re[J]}else if(!W&&!R&&G.closest(".vxe-table--body-wrapper")){const se=a.searchForm.showCheckBox?1:0,J=L.filter(Le=>Le.fixed==="left").length,X=K-J;N=re[X+se]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){N.classList.add("cell-selected"),j===U&&N.classList.add("cell-border-top"),j===z&&N.classList.add("cell-border-bottom"),K===Q&&N.classList.add("cell-border-left"),K===O&&N.classList.add("cell-border-right");break}}})})},to=async()=>{if(E.selectedCells.length===0)return;const f=m.value;if(!f)return;const u=f.$el,L=f.getColumns(),D=[...new Set(E.selectedCells.map(O=>O.rowIndex))].sort((O,v)=>O-v),q=[...new Set(E.selectedCells.map(O=>O.colIndex))].sort((O,v)=>O-v),U=[u.querySelector(".vxe-table--body-wrapper tbody"),u.querySelector(".vxe-table--fixed-left-wrapper tbody"),u.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean),z=[];D.forEach(O=>{const v=[];q.forEach(j=>{const K=L[j];if(!K){v.push("");return}const A=K.fixed==="left",W=K.fixed==="right";let R="";for(const G of U){const ge=G.querySelectorAll(".vxe-body--row")[O];if(!ge)continue;const re=Array.from(ge.querySelectorAll(".vxe-body--column"));let N=null;if(A&&G.closest(".vxe-table--fixed-left-wrapper")){const J=L.filter(X=>X.fixed==="left").indexOf(K);N=re[J]}else if(W&&G.closest(".vxe-table--fixed-right-wrapper")){const J=L.filter(X=>X.fixed==="right").indexOf(K);N=re[J]}else if(!A&&!W&&G.closest(".vxe-table--body-wrapper")){const se=a.searchForm.showCheckBox?1:0,J=L.filter(Le=>Le.fixed==="left").length,X=j-J;N=re[X+se]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){R=N.innerText||N.textContent||"",R=R.trim(),R=R.replace(/\n/g," ").replace(/\s+/g," ");break}}v.push(R)}),z.push(v.join(" "))});const Q=z.join(`
2
+ `);try{await navigator.clipboard.writeText(Q)}catch(O){console.error("复制失败:",O)}},Te=f=>{!a.searchForm.enableCellCopy&&!l.enableCellCopy||((f.ctrlKey||f.metaKey)&&f.key==="c"?E.selectedCells.length>0&&(f.preventDefault(),f.stopPropagation(),to()):f.key==="Escape"&&de())},Ze=()=>{E.isSelecting=!1},Ge=f=>{const u=m.value;if(!u||!u.$el)return;u.$el.contains(f.target)||de()},oo=f=>{h[x]=f,I()},no=f=>{h[y]=f,h[x]=1,I()};function Je(){const f=m.value.getCheckboxRecords();a.searchForm.selections=f}const Xe=f=>{const u=m.value;if(u){u.toggleCheckboxRow(f);const L=m.value.getCheckboxRecords();a.searchForm.selections=L}};return o({tableRef:m,getList:I,getPrm:V,clearSort:w,calculateTableHeight:k}),(f,u)=>{var O;const L=e.resolveComponent("el-button"),D=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-text"),U=e.resolveComponent("vxe-column"),z=e.resolveComponent("VxeTable"),Q=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({box:t.searchForm.showShadow})},[t.searchForm.showSearch?(e.openBlock(),e.createBlock(je,{key:0,form:t.searchForm,onReset:Y,onConfirm:u[1]||(u[1]=v=>I()),onVisibleChange:e.unref(k)},{btn:e.withCtx(()=>[u[3]||(u[3]=e.createElementVNode("span",{class:"mgr10"},null,-1)),e.renderSlot(f.$slots,"search-bar-btn",{},void 0,!0),e.createVNode(L,{class:"mgl10",round:"",onClick:u[0]||(u[0]=v=>m.value.openCustom())},{default:e.withCtx(()=>[e.createVNode($e,{name:"Tools"})]),_:1})]),_:3},8,["form","onVisibleChange"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"table-header-left",{},void 0,!0),e.createElementVNode("div",{ref_key:"tableContentRef",ref:d},[e.createVNode(z,e.mergeProps({id:C.value,ref_key:"tableRef",ref:m,loading:t.loading||i.value,data:t.api?c.value:t.data,border:""},H.value,{height:T.value,onCheckboxChange:Je,onCheckboxAll:Je,onSortChange:(O=H.value["sort-config"])==null?void 0:O.sortChange}),{default:e.withCtx(()=>[t.searchForm.showCheckBox==null||t.searchForm.showCheckBox?(e.openBlock(),e.createBlock(U,{key:0,type:"checkbox",width:e.unref(r)=="zh_cn"?80:150,title:f.$t("xu-hao"),fixed:"left"},{checkbox:e.withCtx(({rowIndex:v,row:j,checked:K,disabled:A,indeterminate:W})=>[e.createElementVNode("div",zt,[K?(e.openBlock(),e.createBlock(D,{key:0,checked:!0,disabled:A,size:"default",onClick:e.withModifiers(R=>!A&&Xe(j),["stop"])},null,8,["disabled","onClick"])):(e.openBlock(),e.createBlock(D,{key:1,disabled:A,checked:!1,size:"default",onClick:e.withModifiers(R=>!A&&Xe(j),["stop"])},null,8,["disabled","onClick"])),e.createVNode(q,{type:"info",class:"mgl5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v+1),1)]),_:2},1024)])]),_:1},8,["width","title"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},16,["id","loading","data","height","onSortChange"])],512),t.searchForm.showPage?(e.openBlock(),e.createBlock(Q,{key:1,"current-page":h[e.unref(x)],"onUpdate:currentPage":u[2]||(u[2]=v=>h[e.unref(x)]=v),class:"myPagination mgt10",background:"",layout:"total, sizes, prev, pager, next",total:h.total,"page-size":h[e.unref(y)],"page-sizes":t.searchForm.pageSizes||e.unref(l).pageSizes,onCurrentChange:oo,onSizeChange:no},null,8,["current-page","total","page-size","page-sizes"])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-c022c16d"]]),Nt={__name:"index",props:{sheetsConfig:{type:Object,required:!0},fileName:{type:String,required:!0}},setup(t){const o=t;function n(){Ae(o.fileName,o.sheetsConfig)}return(r,s)=>{const l=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(l,e.mergeProps({type:"primary",underline:"never"},r.$attrs,{onClick:n}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(r.$t("xia-zai-dao-ru-mo-ban")),1)])]),_:3},16)}}},qt={mounted(t,o){o.value&&Ye(t)},updated(t,o){o.value?Ye(t):He(t)},beforeUnmount(t){He(t)}};async function Ye(t){await y();const o=t.querySelector(".el-dialog");if(!o)return;const n=t.querySelector(".el-dialog__header"),r=t.querySelector(".el-overlay");r.style.cssText+="overflow: hidden;",n.style.cursor="move";let s=!1,l={window:{width:0,height:0},dialog:{x:0,y:0,width:0,height:0,marginTop:""},mouse:{x:0,y:0},drag:{x:0,y:0}};n.addEventListener("mousedown",c),document.addEventListener("mousemove",C),document.addEventListener("mouseup",p),window.addEventListener("resize",x);function a(){l.mouse.x-l.drag.x>=l.dialog.x&&(l.drag.x=l.mouse.x-l.dialog.x),l.drag.x-l.mouse.x>=l.window.width-(l.dialog.x+l.dialog.width)&&(l.drag.x=l.mouse.x+l.window.width-l.dialog.x-l.dialog.width),l.mouse.y-l.drag.y>=l.dialog.y&&(l.drag.y=l.mouse.y-l.dialog.y),l.drag.y-l.mouse.y>=l.window.height-(l.dialog.y+l.dialog.height)&&(l.drag.y=l.mouse.y+l.window.height-l.dialog.y-l.dialog.height),i()}function i(){let h=l.drag.y-l.mouse.y+l.dialog.y,m=l.drag.x-l.mouse.x+l.dialog.x;o.style.cssText+=`position: absolute; top: calc(${h}px - ${l.dialog.marginTop}); left: ${m}px;`}function c(h){h.button===0&&(l.window={width:document.body.clientWidth,height:document.body.clientHeight},l.dialog=o.getBoundingClientRect(),l.dialog.marginTop=window.getComputedStyle(o).marginTop,l.mouse={x:h.clientX,y:h.clientY},s=!0)}function C(h){s&&(l.drag={x:h.clientX,y:h.clientY},r.style.userSelect="none",a())}function p(h){r.style.userSelect="auto",s=!1}function x(h){}function y(){return new Promise((h,m)=>{setTimeout(()=>{h()},500)})}t.__mouseDown__=c,t.__mouseUp__=p,t.__mouseMove__=C,t.__sizeChange__=x}function He(t){document.removeEventListener("mousedown",t.__mouseDown__),document.removeEventListener("mousemove",t.__mouseMove__),document.removeEventListener("mouseup",t.__mouseUp__),window.removeEventListener("resize",t.__sizeChange__)}const go="",At={key:0,class:"drawer-btn"},Pt={key:1},jt={__name:"index",props:{layer:{type:Object,default:()=>({show:!1,type:"layer",title:"",showButton:!1}),required:!0},loading:{type:Boolean,default:!1}},emits:["confirm"],setup(t,{emit:o}){const n=t,r=o,{t:s}=ee.useI18n(),l=ne.debounce(()=>{r("confirm")},300);async function a(){n.layer.type=="drawer"?n.layer.onClose?n.layer.onClose():n.layer.closeConfirm?await Z.ElMessageBox.confirm(s("que-ding-guan-bi-ma"),{confirmButtonText:s("que-ding"),cancelButtonText:s("qu-xiao"),type:"warning"}).catch(()=>{})=="confirm"&&(n.layer.show=!1):n.layer.show=!1:n.layer.show=!1}return(i,c)=>{const C=e.resolveComponent("el-button"),p=e.resolveComponent("el-drawer"),x=e.resolveComponent("el-dialog");return t.layer.type?(e.openBlock(),e.createBlock(p,{key:0,modelValue:t.layer.show,"onUpdate:modelValue":c[0]||(c[0]=y=>t.layer.show=y),size:t.layer.width||"100%",title:t.layer.title,direction:"rtl","append-to-body":"","before-close":a,class:"drawer-content"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default"),c[2]||(c[2]=e.createElementVNode("p",{class:"mgt50"},null,-1)),t.layer.showButton?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(i.$slots,"btn",{},()=>[e.createVNode(C,{onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.$t("qu-xiao")),1)]),_:1}),e.createVNode(C,{type:"primary",loading:t.loading,onClick:e.unref(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.$t("ti-jiao")),1)]),_:1},8,["loading","onClick"])])])):e.createCommentVNode("",!0)]),_:3},8,["modelValue","size","title"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(x,{"close-on-click-modal":!1,modelValue:t.layer.show,"onUpdate:modelValue":c[1]||(c[1]=y=>t.layer.show=y),title:t.layer.title,width:t.layer.width||500,center:""},e.createSlots({default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:2},[t.layer.showButton?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"btn",{},()=>[e.createVNode(C,{onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.$t("qu-xiao")),1)]),_:1}),e.createVNode(C,{type:"primary",onClick:e.unref(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.$t("ti-jiao")),1)]),_:1},8,["onClick"])])]),key:"0"}:void 0]),1032,["modelValue","title","width"])])),[[e.unref(qt),t.layer.show]])}}};function Rt(t,o={}){const n=le(),r={inForm:!0,required:!0,...o},s={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}$/,password:/(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/}[t],{inForm:l,value:a,required:i,msg:c=n("validate.invalidInput")}=r;return l?function(C,p,x){if(i){s.test(p)?x():x(new Error(c));return}p&&!s.test(p)?x(new Error(c)):x()}:s.test(a)}class Ut{constructor(o={}){this.config={clientCode:o.clientCode||"one-portal",casServerUrl:`https://one-portal${o.isTest?"-test":""}.joy-group.com/api`,casPortalUrl:`https://one-portal${o.isTest?"-test":""}.joy-group.com`,serviceUrl:o.serviceUrl||window.location.origin+"/cas/callback",tokenKey:o.tokenKey||"one_portal_token",userKey:o.userKey||"one_portal_user",debug:o.debug||!1,autoLogin:o.autoLogin!==!1,loginCallback:o.loginCallback||null,logoutCallback:o.logoutCallback||null,errorCallback:o.errorCallback||null},this.token=null,this.user=null,this.init()}init(){this.log("OnePortal CAS SDK 初始化中..."),this.loadFromStorage();const n=new URLSearchParams(window.location.search).get("ticket");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())}loadFromStorage(){try{this.token=localStorage.getItem(this.config.tokenKey);const o=localStorage.getItem(this.config.userKey);o&&(this.user=JSON.parse(o)),this.log("从本地存储加载数据:",{token:!!this.token,user:!!this.user})}catch(o){this.log("加载本地存储数据失败:",o)}}saveToStorage(){try{this.token&&localStorage.setItem(this.config.tokenKey,this.token),this.user&&localStorage.setItem(this.config.userKey,JSON.stringify(this.user)),this.log("数据已保存到本地存储")}catch(o){this.log("保存到本地存储失败:",o)}}clearStorage(){try{localStorage.removeItem(this.config.tokenKey),localStorage.removeItem(this.config.userKey),this.log("本地存储已清除")}catch(o){this.log("清除本地存储失败:",o)}}isLoggedIn(){return!!(this.token&&this.user)}getUser(){return this.user}getToken(){return this.token}login(){const o=`${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;this.log("跳转到CAS登录页面:",o),window.location.href=o}async validateTicket(o){try{this.log("验证ST票据:",o);const n=await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${o}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);const r=await n.json();if(r.success&&r.data)return this.token=r.data.token,this.user=r.data.user,this.saveToStorage(),this.clearTicketFromUrl(),this.log("ST票据验证成功,用户登录成功:",this.user),this.config.loginCallback&&this.config.loginCallback(this.user,this.token),!0;throw new Error(r.message||"ST票据验证失败")}catch(n){return this.log("ST票据验证失败:",n),this.handleError(n),!1}}clearTicketFromUrl(){const o=new URL(window.location);o.searchParams.delete("ticket"),window.history.replaceState({},document.title,o.toString())}async logout(o=!0){try{if(this.log("用户登出"),this.token)try{await fetch(`${this.config.casServerUrl}/auth/logout`,{method:"POST",headers:{AppId:this.config.clientCode,Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}})}catch(n){this.log("调用服务端登出接口失败:",n)}this.token=null,this.user=null,this.clearStorage(),this.config.logoutCallback&&this.config.logoutCallback(),o&&this.login()}catch(n){this.log("登出失败:",n),this.handleError(n)}}async request(o,n={}){const r={headers:{"Content-Type":"application/json",...n.headers},...n};r.headers.appId=this.config.clientCode,this.token&&(r.headers.Authorization=`Bearer ${this.token}`);try{const s=await fetch(o,r);return s.status===401?(this.log("Token已过期,需要重新登录"),this.logout(),null):s}catch(s){throw this.log("请求失败:",s),s}}async fetchUserInfo(){try{const o=await this.request(`${this.config.casServerUrl}/auth/user`);if(o&&o.ok){const n=await o.json();if(n.success&&n.data)return this.user=n.data,this.saveToStorage(),this.user}return null}catch(o){return this.log("获取用户信息失败:",o),null}}async refreshToken(){this.log("Token刷新功能暂未实现")}handleError(o){this.log("发生错误:",o),this.config.errorCallback&&this.config.errorCallback(o)}log(...o){this.config.debug&&console.log("[OnePortal CAS SDK]",...o)}checkLoginStatus(){return!this.isLoggedIn()&&this.config.autoLogin?(this.login(),!1):this.isLoggedIn()}setConfig(o,n){this.config[o]=n}getConfig(o){return this.config[o]}}function Yt(t,o={}){const r=Object.assign({manual:!1,log:!1,params:null,format:null},o),{manual:s,log:l,params:a={},cb:i,format:c}=r,C=e.ref([]),p=e.ref(!1),x=y=>{const h=y||a;p.value=!0,t(h).then(m=>{const{code:d,data:b,msg:k}=m;if(i){const{records:_,rows:S}=b||{},T=_||S?_||S:b;C.value=Ee(T,c),i(m)}if(b){if(b.records!=null||b.rows!=null){const{records:_,rows:S,total:T=0}=b||{};h&&h.total!=null&&(a.total=parseInt(T)),C.value=Ee(_||S||[],c)}else C.value=Ee(b,c);l&&console.log("useRequest-res",C.value)}}).catch(m=>{i&&(console.log("useRequestErr",m),i({code:500}))}).finally(()=>{p.value=!1})};return s||x(),[p,C,x]}function Ht(t){const o=e.ref(t),n=e.ref(""),r=e.ref("");return e.watch(o,s=>{const l=s||["",""];n.value=l[0],r.value=l[1]}),[o,n,r]}function Kt(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function Ee(t,o){if(!o)return t;if(t instanceof Array)return t.map(r=>{let s={};return o.forEach(l=>s[l]=r[l]),s});let n={};return o.forEach(r=>n[r]=t[r]),n}function Wt(t,o=[]){const{locale:n}=ee.useI18n(),r=e.ref(t());return e.watch([n,...o],()=>{r.value=t()},{immediate:!0}),r}function Zt(t,o="zh_cn",n="en_us"){if(!t)return"-";const r={en_us:n,zh_cn:o},l=be().global.locale.value;return t[r[l]]||t[o]||"-"}function Gt(t,o){let n=te.mapState;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapState),Ke(o,n)}function Jt(t,o){let n=te.mapGetters;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapGetters),Ke(o,n)}function Xt(t,o){let n=te.mapActions;return typeof t=="string"&&t.length>0&&(n=te.createNamespacedHelpers(t).mapActions),Qt(o,n)}function Ke(t,o){const n=te.useStore(),r=o(t),s={};return Object.keys(r).forEach(l=>{const a=r[l].bind({$store:n});s[l]=e.computed(a)}),s}function Qt(t,o){const n=te.useStore(),r=o(t),s={};return Object.keys(r).forEach(l=>{s[l]=r[l].bind({$store:n})}),s}function we(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function eo(){fe.VxeUI.renderer.add("Enum",{renderTableDefault(t,o){let n;if([null,void 0].includes(o.row[o.column.field]))return"-";const r=o.row[o.column.field];if(t.type=="tag"){let s;return e.createVNode(e.resolveComponent("el-text"),{type:t.enum.getTag(r)},we(s=t.enum.getName(r))?s:{default:()=>[s]})}return e.createVNode(e.resolveComponent("el-text"),null,we(n=t.enum.getName(r))?n:{default:()=>[n]})}}),fe.VxeUI.renderer.add("InputNumber",{renderTableDefault(t,o){return e.createVNode(Z.ElInputNumber,e.mergeProps({modelValue:o.row[o.column.field],"onUpdate:modelValue":n=>o.row[o.column.field]=n},t.props,{"step-strictly":!0,"value-on-clear":0}),null)}}),fe.VxeUI.renderer.add("TrueFalse",{renderTableDefault(t,o){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn";return e.createVNode(Z.ElText,{type:o.row[o.column.field]?"success":"danger"},{default:()=>[o.row[o.column.field]?r?"是":"YES":r?"否":"NO"]})}}),fe.VxeUI.renderer.add("I18n",{renderTableDefault(t,o){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn"?o.column.field:t.fieldEn;return o.row[r]||o.row[o.column.field]}}),fe.VxeUI.renderer.add("Link",{renderTableDefault(t,o){let n=o.column.field;const r=ve.useRouter(),{multiple:s,to:l,openType:a="system"}=t,i=o.row[n];function c(C,p){a=="blank"?window.open(C):r.push({path:C,query:{[n]:p}})}if(s){const C=(i==null?void 0:i.split(","))||[];return C.map((p,x)=>e.createVNode("span",null,[e.createVNode(Z.ElLink,{underline:"never",type:"primary",onclick:()=>c(a=="stystem"?l:p,p)},we(p)?p:{default:()=>[p]}),x<C.length-1?",":""]))}return e.createVNode(Z.ElLink,{underline:"never",type:"primary",onclick:()=>c(a=="stystem"?l:i,i)},we(i)?i:{default:()=>[i]})}})}g.CmpDictionary=Pe,g.CmpIcon=$e,g.ConfrimButton=Et,g.DownExcelTemp=Nt,g.ImportButton=Lt,g.LayOutForm=Qe,g.Layer=jt,g.ListPage=Ot,g.OnePortalCasSDK=Ut,g.SearchBar=je,g.StatusMap=_e,g._toRaw=gt,g._typeOf=Kt,g.arrToStatusMap=yt,g.arrayToTree=pt,g.checkFileSize=wt,g.creatValidator=Rt,g.createImportFields=kt,g.createListPageId=xt,g.en_us=Ce,g.exportExcel=at,g.exportExcelMuilti=Ae,g.getI18n=be,g.getI18nT=le,g.getListPageConfig=Ue,g.getLocaleValue=Zt,g.getValueBykey=St,g.importExcel=lt,g.importExcelMuilti=qe,g.messages=ze,g.registerVxeRenderers=eo,g.resetListPageConfig=Mt,g.setListPageConfig=Bt,g.setupI18n=Oe,g.sleep=ht,g.stringToArray=Se,g.stripHtmlTags=Ct,g.unicode2Str=bt,g.useActions=Xt,g.useDatePicker=Ht,g.useGetters=Jt,g.useI18nReState=Wt,g.useRequest=Yt,g.useState=Gt,g.zh_cn=ye,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joy-admin-components",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "main": "./dist/joy-admin-components.umd.js",
5
5
  "module": "./dist/joy-admin-components.es.js",
6
6
  "types": "./src/index.d.ts",