yh-report 2.4.114 → 2.4.115

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.
@@ -870,28 +870,29 @@ function getConfig(t) {
870
870
  }
871
871
  }).then((e) => {
872
872
  if (e.data) {
873
- let r = JSON.parse(e.data.info), { id: n, name: o, code: i, description: a, config: s, chartConfig: l } = r, c = [], u;
873
+ let r = JSON.parse(e.data.info), { id: n, name: o, code: i, description: a, config: s, chartConfig: l } = r, c = [], u, f;
874
874
  if (s) {
875
875
  if (s = JSON.parse(s), Array.isArray(s)) {
876
876
  if (s.length && s[0].type === "tableSheet")
877
877
  throw ElMessage.error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版"), useRouter().back(), new Error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版");
878
- s = s.map((f) => (ItemTypes.value.includes(f.type) || (f.type = "report"), f)), c = c.concat(s);
878
+ s = s.map((d) => (ItemTypes.value.includes(d.type) || (d.type = "report"), d)), c = c.concat(s);
879
879
  } else if (s && typeof s == "object" && Array.isArray(s.options)) {
880
- let f = s.options;
881
- if (f.length && f[0].type === "tableSheet")
880
+ let d = s.options;
881
+ if (d.length && d[0].type === "tableSheet")
882
882
  throw ElMessage.error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版"), useRouter().back(), new Error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版");
883
- f = f.map((d) => (ItemTypes.value.includes(d.type) || (d.type = "report"), d)), c = c.concat(f), u = s.printConfig;
883
+ d = d.map((p) => (ItemTypes.value.includes(p.type) || (p.type = "report"), p)), c = c.concat(d), u = s.printConfig;
884
884
  }
885
885
  }
886
- return l && (l = JSON.parse(l), Array.isArray(l) ? (l.forEach((f) => {
887
- f.data || (f.data = { source: [] });
888
- }), c = c.concat(l)) : l && typeof l == "object" && (u = l)), Promise.resolve({
886
+ return l && (l = JSON.parse(l), Array.isArray(l) ? (l.forEach((d) => {
887
+ d.data || (d.data = { source: [] });
888
+ }), c = c.concat(l)) : l && typeof l == "object" && ("printConfig" in l || "exportConfig" in l ? (u = l.printConfig, f = l.exportConfig) : u = l)), Promise.resolve({
889
889
  id: n,
890
890
  name: o,
891
891
  code: i,
892
892
  description: a,
893
893
  remoteOptions: c,
894
- printConfig: u
894
+ printConfig: u,
895
+ exportConfig: f
895
896
  });
896
897
  } else
897
898
  return Promise.reject("获取报表数据异常");
@@ -1133,10 +1134,10 @@ function applyBorderOperation(t, e, r) {
1133
1134
  d.row < n && (n = d.row), d.row > o && (o = d.row), d.col < i && (i = d.col), d.col > a && (a = d.col);
1134
1135
  });
1135
1136
  const s = new Set(t.map((d) => `${d.row},${d.col}`)), l = /* @__PURE__ */ new Map(), c = r.color ? { style: r.style, color: r.color } : { style: r.style }, u = (d, p, m, g) => {
1136
- var $, y, v;
1137
+ var x, y, v;
1137
1138
  const _ = `${d},${p}`;
1138
1139
  let E = l.get(_);
1139
- E || (E = { row: d, col: p, border: cloneBorder((v = (y = ($ = e[d]) == null ? void 0 : $[p]) == null ? void 0 : y.style) == null ? void 0 : v.border) }, l.set(_, E)), E.border[m] = { ...g };
1140
+ E || (E = { row: d, col: p, border: cloneBorder((v = (y = (x = e[d]) == null ? void 0 : x[p]) == null ? void 0 : y.style) == null ? void 0 : v.border) }, l.set(_, E)), E.border[m] = { ...g };
1140
1141
  }, f = r.mode === "none";
1141
1142
  t.forEach((d) => {
1142
1143
  var _, E;
@@ -1145,9 +1146,9 @@ function applyBorderOperation(t, e, r) {
1145
1146
  const m = cloneBorder((E = p.style) == null ? void 0 : E.border);
1146
1147
  f ? (m.top = { style: "none" }, m.right = { style: "none" }, m.bottom = { style: "none" }, m.left = { style: "none" }) : getSidesForMode(d, n, o, i, a, r.mode).forEach((y) => {
1147
1148
  m[y] = { ...c };
1148
- }), l.set(`${d.row},${d.col}`, { row: d.row, col: d.col, border: m }), (f ? getSidesForMode(d, n, o, i, a, "outside") : getSidesForMode(d, n, o, i, a, r.mode)).forEach(($) => {
1149
+ }), l.set(`${d.row},${d.col}`, { row: d.row, col: d.col, border: m }), (f ? getSidesForMode(d, n, o, i, a, "outside") : getSidesForMode(d, n, o, i, a, r.mode)).forEach((x) => {
1149
1150
  var C;
1150
- const y = getNeighborSide(d, $);
1151
+ const y = getNeighborSide(d, x);
1151
1152
  if (!y) return;
1152
1153
  const v = (C = e[y.row]) == null ? void 0 : C[y.col];
1153
1154
  v && (s.has(`${y.row},${y.col}`) || v.rowSpan === 0 || v.colSpan === 0 || u(y.row, y.col, y.side, f ? { style: "none" } : { ...c }));
@@ -1249,29 +1250,29 @@ function writeReportConfigsToSheet(t, e, r, n) {
1249
1250
  const g = c.filter((y) => y.isHidden).map((y) => y.index), _ = l[p].filter((y) => !g.includes(y.col));
1250
1251
  let E = _.map((y) => y.text);
1251
1252
  p > 0 ? t.addRow(E) : i === n ? t.getRow(n + 1).values = E : t.addRow(E);
1252
- const $ = t.getRow(i + p + 1);
1253
- m && m.size && !isNaN(m.size) ? m.size > 0 ? $.height = m.size < 25 ? 25 : m.size : $.hidden = !0 : $.height = 25;
1253
+ const x = t.getRow(i + p + 1);
1254
+ m && m.size && !isNaN(m.size) ? m.size > 0 ? x.height = m.size < 25 ? 25 : m.size : x.hidden = !0 : x.height = 25;
1254
1255
  for (let y = 0; y < _.length; y++) {
1255
- const v = _[y], C = $.getCell(y + 1);
1256
- let { style: w, col: b, row: N, colSpan: R, rowSpan: A, format: k, formatType: F } = v;
1256
+ const v = _[y], C = x.getCell(y + 1);
1257
+ let { style: w, col: $, row: I, colSpan: A, rowSpan: O, format: N, formatType: U } = v;
1257
1258
  const L = {};
1258
1259
  if (w && w.color && (L.color = {
1259
1260
  argb: "FF" + ((f = w.color) == null ? void 0 : f.replace("#", ""))
1260
1261
  }), w && w.fontSize && (L.size = w.fontSize), w && w.fontFamily && (L.name = w.fontFamily), w && w.fontWeight && w.fontWeight === "bold" && (L.bold = !0), C.font = L, w && w.border) {
1261
- const T = normalizeBorder(w.border);
1262
- if (T) {
1263
- const S = themeColors[r] || "#333333", I = (B) => {
1264
- if (!(!B || !B.style || B.style === "none"))
1262
+ const D = normalizeBorder(w.border);
1263
+ if (D) {
1264
+ const S = themeColors[r] || "#333333", R = (k) => {
1265
+ if (!(!k || !k.style || k.style === "none"))
1265
1266
  return {
1266
- style: B.style,
1267
- color: { argb: "FF" + (B.color || S).replace("#", "") }
1267
+ style: k.style,
1268
+ color: { argb: "FF" + (k.color || S).replace("#", "") }
1268
1269
  };
1269
1270
  };
1270
1271
  C.border = {
1271
- top: I(T.top),
1272
- left: I(T.left),
1273
- bottom: I(T.bottom),
1274
- right: I(T.right)
1272
+ top: R(D.top),
1273
+ left: R(D.left),
1274
+ bottom: R(D.bottom),
1275
+ right: R(D.right)
1275
1276
  };
1276
1277
  }
1277
1278
  } else (!w || w.border !== !1) && (C.border = {
@@ -1289,30 +1290,30 @@ function writeReportConfigsToSheet(t, e, r, n) {
1289
1290
  }
1290
1291
  };
1291
1292
  else {
1292
- const T = `${r}${p % 2}`;
1293
+ const D = `${r}${p % 2}`;
1293
1294
  C.fill = {
1294
1295
  type: "pattern",
1295
1296
  pattern: "solid",
1296
1297
  fgColor: {
1297
- argb: "FF" + themeColors[T].replace("#", "")
1298
+ argb: "FF" + themeColors[D].replace("#", "")
1298
1299
  }
1299
1300
  };
1300
1301
  }
1301
- const O = {
1302
+ const M = {
1302
1303
  vertical: "middle",
1303
1304
  horizontal: "center",
1304
1305
  wrapText: !0
1305
1306
  };
1306
- w && w.textAlign && (O.horizontal = w.textAlign), w && w.verticalAlign && (O.vertical = w.verticalAlign === "center" ? "middle" : w.verticalAlign), C.alignment = O;
1307
- const x = A && !isNaN(A) && A > 1, D = R && !isNaN(R) && R > 1;
1308
- if (x || D) {
1309
- const T = i + p + 1, S = y + 1;
1310
- let I = T, B = S;
1311
- T && (I += A - 1), S && (B += R - 1), o.push([T, S, I, B]);
1307
+ w && w.textAlign && (M.horizontal = w.textAlign), w && w.verticalAlign && (M.vertical = w.verticalAlign === "center" ? "middle" : w.verticalAlign), C.alignment = M;
1308
+ const T = O && !isNaN(O) && O > 1, b = A && !isNaN(A) && A > 1;
1309
+ if (T || b) {
1310
+ const D = i + p + 1, S = y + 1;
1311
+ let R = D, k = S;
1312
+ D && (R += O - 1), S && (k += A - 1), o.push([D, S, R, k]);
1312
1313
  }
1313
- if (k && k === "number") {
1314
- let T = "", S = "";
1315
- F && (F.numberUseGrouping && (T = F.numberUseGrouping), F.numberDecimal && (S = F.numberDecimal)), C.numFmt = generateNumFmt(T, S), C.value = Number(v.text);
1314
+ if (N && N === "number") {
1315
+ let D = "", S = "";
1316
+ U && (U.numberUseGrouping && (D = U.numberUseGrouping), U.numberDecimal && (S = U.numberDecimal)), C.numFmt = generateNumFmt(D, S), C.value = Number(v.text);
1316
1317
  }
1317
1318
  }
1318
1319
  }
@@ -1363,275 +1364,275 @@ var dayjs_min = { exports: {} };
1363
1364
  (function(r, n) {
1364
1365
  t.exports = n();
1365
1366
  })(commonjsGlobal, function() {
1366
- var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", f = "month", d = "quarter", p = "year", m = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, $ = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(O) {
1367
- var x = ["th", "st", "nd", "rd"], D = O % 100;
1368
- return "[" + O + (x[(D - 20) % 10] || x[D] || x[0]) + "]";
1369
- } }, y = function(O, x, D) {
1370
- var T = String(O);
1371
- return !T || T.length >= x ? O : "" + Array(x + 1 - T.length).join(D) + O;
1372
- }, v = { s: y, z: function(O) {
1373
- var x = -O.utcOffset(), D = Math.abs(x), T = Math.floor(D / 60), S = D % 60;
1374
- return (x <= 0 ? "+" : "-") + y(T, 2, "0") + ":" + y(S, 2, "0");
1375
- }, m: function O(x, D) {
1376
- if (x.date() < D.date()) return -O(D, x);
1377
- var T = 12 * (D.year() - x.year()) + (D.month() - x.month()), S = x.clone().add(T, f), I = D - S < 0, B = x.clone().add(T + (I ? -1 : 1), f);
1378
- return +(-(T + (D - S) / (I ? S - B : B - S)) || 0);
1379
- }, a: function(O) {
1380
- return O < 0 ? Math.ceil(O) || 0 : Math.floor(O);
1381
- }, p: function(O) {
1382
- return { M: f, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: d }[O] || String(O || "").toLowerCase().replace(/s$/, "");
1383
- }, u: function(O) {
1384
- return O === void 0;
1367
+ var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", f = "month", d = "quarter", p = "year", m = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
1368
+ var T = ["th", "st", "nd", "rd"], b = M % 100;
1369
+ return "[" + M + (T[(b - 20) % 10] || T[b] || T[0]) + "]";
1370
+ } }, y = function(M, T, b) {
1371
+ var D = String(M);
1372
+ return !D || D.length >= T ? M : "" + Array(T + 1 - D.length).join(b) + M;
1373
+ }, v = { s: y, z: function(M) {
1374
+ var T = -M.utcOffset(), b = Math.abs(T), D = Math.floor(b / 60), S = b % 60;
1375
+ return (T <= 0 ? "+" : "-") + y(D, 2, "0") + ":" + y(S, 2, "0");
1376
+ }, m: function M(T, b) {
1377
+ if (T.date() < b.date()) return -M(b, T);
1378
+ var D = 12 * (b.year() - T.year()) + (b.month() - T.month()), S = T.clone().add(D, f), R = b - S < 0, k = T.clone().add(D + (R ? -1 : 1), f);
1379
+ return +(-(D + (b - S) / (R ? S - k : k - S)) || 0);
1380
+ }, a: function(M) {
1381
+ return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
1382
+ }, p: function(M) {
1383
+ return { M: f, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: d }[M] || String(M || "").toLowerCase().replace(/s$/, "");
1384
+ }, u: function(M) {
1385
+ return M === void 0;
1385
1386
  } }, C = "en", w = {};
1386
- w[C] = $;
1387
- var b = "$isDayjsObject", N = function(O) {
1388
- return O instanceof F || !(!O || !O[b]);
1389
- }, R = function O(x, D, T) {
1387
+ w[C] = x;
1388
+ var $ = "$isDayjsObject", I = function(M) {
1389
+ return M instanceof U || !(!M || !M[$]);
1390
+ }, A = function M(T, b, D) {
1390
1391
  var S;
1391
- if (!x) return C;
1392
- if (typeof x == "string") {
1393
- var I = x.toLowerCase();
1394
- w[I] && (S = I), D && (w[I] = D, S = I);
1395
- var B = x.split("-");
1396
- if (!S && B.length > 1) return O(B[0]);
1392
+ if (!T) return C;
1393
+ if (typeof T == "string") {
1394
+ var R = T.toLowerCase();
1395
+ w[R] && (S = R), b && (w[R] = b, S = R);
1396
+ var k = T.split("-");
1397
+ if (!S && k.length > 1) return M(k[0]);
1397
1398
  } else {
1398
- var j = x.name;
1399
- w[j] = x, S = j;
1399
+ var G = T.name;
1400
+ w[G] = T, S = G;
1400
1401
  }
1401
- return !T && S && (C = S), S || !T && C;
1402
- }, A = function(O, x) {
1403
- if (N(O)) return O.clone();
1404
- var D = typeof x == "object" ? x : {};
1405
- return D.date = O, D.args = arguments, new F(D);
1406
- }, k = v;
1407
- k.l = R, k.i = N, k.w = function(O, x) {
1408
- return A(O, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
1402
+ return !D && S && (C = S), S || !D && C;
1403
+ }, O = function(M, T) {
1404
+ if (I(M)) return M.clone();
1405
+ var b = typeof T == "object" ? T : {};
1406
+ return b.date = M, b.args = arguments, new U(b);
1407
+ }, N = v;
1408
+ N.l = A, N.i = I, N.w = function(M, T) {
1409
+ return O(M, { locale: T.$L, utc: T.$u, x: T.$x, $offset: T.$offset });
1409
1410
  };
1410
- var F = function() {
1411
- function O(D) {
1412
- this.$L = R(D.locale, null, !0), this.parse(D), this.$x = this.$x || D.x || {}, this[b] = !0;
1411
+ var U = function() {
1412
+ function M(b) {
1413
+ this.$L = A(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[$] = !0;
1413
1414
  }
1414
- var x = O.prototype;
1415
- return x.parse = function(D) {
1416
- this.$d = function(T) {
1417
- var S = T.date, I = T.utc;
1415
+ var T = M.prototype;
1416
+ return T.parse = function(b) {
1417
+ this.$d = function(D) {
1418
+ var S = D.date, R = D.utc;
1418
1419
  if (S === null) return /* @__PURE__ */ new Date(NaN);
1419
- if (k.u(S)) return /* @__PURE__ */ new Date();
1420
+ if (N.u(S)) return /* @__PURE__ */ new Date();
1420
1421
  if (S instanceof Date) return new Date(S);
1421
1422
  if (typeof S == "string" && !/Z$/i.test(S)) {
1422
- var B = S.match(_);
1423
- if (B) {
1424
- var j = B[2] - 1 || 0, X = (B[7] || "0").substring(0, 3);
1425
- return I ? new Date(Date.UTC(B[1], j, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, X)) : new Date(B[1], j, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, X);
1423
+ var k = S.match(_);
1424
+ if (k) {
1425
+ var G = k[2] - 1 || 0, W = (k[7] || "0").substring(0, 3);
1426
+ return R ? new Date(Date.UTC(k[1], G, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, W)) : new Date(k[1], G, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, W);
1426
1427
  }
1427
1428
  }
1428
1429
  return new Date(S);
1429
- }(D), this.init();
1430
- }, x.init = function() {
1431
- var D = this.$d;
1432
- this.$y = D.getFullYear(), this.$M = D.getMonth(), this.$D = D.getDate(), this.$W = D.getDay(), this.$H = D.getHours(), this.$m = D.getMinutes(), this.$s = D.getSeconds(), this.$ms = D.getMilliseconds();
1433
- }, x.$utils = function() {
1434
- return k;
1435
- }, x.isValid = function() {
1430
+ }(b), this.init();
1431
+ }, T.init = function() {
1432
+ var b = this.$d;
1433
+ this.$y = b.getFullYear(), this.$M = b.getMonth(), this.$D = b.getDate(), this.$W = b.getDay(), this.$H = b.getHours(), this.$m = b.getMinutes(), this.$s = b.getSeconds(), this.$ms = b.getMilliseconds();
1434
+ }, T.$utils = function() {
1435
+ return N;
1436
+ }, T.isValid = function() {
1436
1437
  return this.$d.toString() !== g;
1437
- }, x.isSame = function(D, T) {
1438
- var S = A(D);
1439
- return this.startOf(T) <= S && S <= this.endOf(T);
1440
- }, x.isAfter = function(D, T) {
1441
- return A(D) < this.startOf(T);
1442
- }, x.isBefore = function(D, T) {
1443
- return this.endOf(T) < A(D);
1444
- }, x.$g = function(D, T, S) {
1445
- return k.u(D) ? this[T] : this.set(S, D);
1446
- }, x.unix = function() {
1438
+ }, T.isSame = function(b, D) {
1439
+ var S = O(b);
1440
+ return this.startOf(D) <= S && S <= this.endOf(D);
1441
+ }, T.isAfter = function(b, D) {
1442
+ return O(b) < this.startOf(D);
1443
+ }, T.isBefore = function(b, D) {
1444
+ return this.endOf(D) < O(b);
1445
+ }, T.$g = function(b, D, S) {
1446
+ return N.u(b) ? this[D] : this.set(S, b);
1447
+ }, T.unix = function() {
1447
1448
  return Math.floor(this.valueOf() / 1e3);
1448
- }, x.valueOf = function() {
1449
+ }, T.valueOf = function() {
1449
1450
  return this.$d.getTime();
1450
- }, x.startOf = function(D, T) {
1451
- var S = this, I = !!k.u(T) || T, B = k.p(D), j = function(U, G) {
1452
- var V = k.w(S.$u ? Date.UTC(S.$y, G, U) : new Date(S.$y, G, U), S);
1453
- return I ? V : V.endOf(c);
1454
- }, X = function(U, G) {
1455
- return k.w(S.toDate()[U].apply(S.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), S);
1456
- }, Z = this.$W, Q = this.$M, ee = this.$D, ie = "set" + (this.$u ? "UTC" : "");
1457
- switch (B) {
1451
+ }, T.startOf = function(b, D) {
1452
+ var S = this, R = !!N.u(D) || D, k = N.p(b), G = function(F, H) {
1453
+ var j = N.w(S.$u ? Date.UTC(S.$y, H, F) : new Date(S.$y, H, F), S);
1454
+ return R ? j : j.endOf(c);
1455
+ }, W = function(F, H) {
1456
+ return N.w(S.toDate()[F].apply(S.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(H)), S);
1457
+ }, ee = this.$W, J = this.$M, ne = this.$D, ae = "set" + (this.$u ? "UTC" : "");
1458
+ switch (k) {
1458
1459
  case p:
1459
- return I ? j(1, 0) : j(31, 11);
1460
+ return R ? G(1, 0) : G(31, 11);
1460
1461
  case f:
1461
- return I ? j(1, Q) : j(0, Q + 1);
1462
+ return R ? G(1, J) : G(0, J + 1);
1462
1463
  case u:
1463
- var ae = this.$locale().weekStart || 0, se = (Z < ae ? Z + 7 : Z) - ae;
1464
- return j(I ? ee - se : ee + (6 - se), Q);
1464
+ var ie = this.$locale().weekStart || 0, se = (ee < ie ? ee + 7 : ee) - ie;
1465
+ return G(R ? ne - se : ne + (6 - se), J);
1465
1466
  case c:
1466
1467
  case m:
1467
- return X(ie + "Hours", 0);
1468
+ return W(ae + "Hours", 0);
1468
1469
  case l:
1469
- return X(ie + "Minutes", 1);
1470
+ return W(ae + "Minutes", 1);
1470
1471
  case s:
1471
- return X(ie + "Seconds", 2);
1472
+ return W(ae + "Seconds", 2);
1472
1473
  case a:
1473
- return X(ie + "Milliseconds", 3);
1474
+ return W(ae + "Milliseconds", 3);
1474
1475
  default:
1475
1476
  return this.clone();
1476
1477
  }
1477
- }, x.endOf = function(D) {
1478
- return this.startOf(D, !1);
1479
- }, x.$set = function(D, T) {
1480
- var S, I = k.p(D), B = "set" + (this.$u ? "UTC" : ""), j = (S = {}, S[c] = B + "Date", S[m] = B + "Date", S[f] = B + "Month", S[p] = B + "FullYear", S[l] = B + "Hours", S[s] = B + "Minutes", S[a] = B + "Seconds", S[i] = B + "Milliseconds", S)[I], X = I === c ? this.$D + (T - this.$W) : T;
1481
- if (I === f || I === p) {
1482
- var Z = this.clone().set(m, 1);
1483
- Z.$d[j](X), Z.init(), this.$d = Z.set(m, Math.min(this.$D, Z.daysInMonth())).$d;
1484
- } else j && this.$d[j](X);
1478
+ }, T.endOf = function(b) {
1479
+ return this.startOf(b, !1);
1480
+ }, T.$set = function(b, D) {
1481
+ var S, R = N.p(b), k = "set" + (this.$u ? "UTC" : ""), G = (S = {}, S[c] = k + "Date", S[m] = k + "Date", S[f] = k + "Month", S[p] = k + "FullYear", S[l] = k + "Hours", S[s] = k + "Minutes", S[a] = k + "Seconds", S[i] = k + "Milliseconds", S)[R], W = R === c ? this.$D + (D - this.$W) : D;
1482
+ if (R === f || R === p) {
1483
+ var ee = this.clone().set(m, 1);
1484
+ ee.$d[G](W), ee.init(), this.$d = ee.set(m, Math.min(this.$D, ee.daysInMonth())).$d;
1485
+ } else G && this.$d[G](W);
1485
1486
  return this.init(), this;
1486
- }, x.set = function(D, T) {
1487
- return this.clone().$set(D, T);
1488
- }, x.get = function(D) {
1489
- return this[k.p(D)]();
1490
- }, x.add = function(D, T) {
1491
- var S, I = this;
1492
- D = Number(D);
1493
- var B = k.p(T), j = function(Q) {
1494
- var ee = A(I);
1495
- return k.w(ee.date(ee.date() + Math.round(Q * D)), I);
1487
+ }, T.set = function(b, D) {
1488
+ return this.clone().$set(b, D);
1489
+ }, T.get = function(b) {
1490
+ return this[N.p(b)]();
1491
+ }, T.add = function(b, D) {
1492
+ var S, R = this;
1493
+ b = Number(b);
1494
+ var k = N.p(D), G = function(J) {
1495
+ var ne = O(R);
1496
+ return N.w(ne.date(ne.date() + Math.round(J * b)), R);
1496
1497
  };
1497
- if (B === f) return this.set(f, this.$M + D);
1498
- if (B === p) return this.set(p, this.$y + D);
1499
- if (B === c) return j(1);
1500
- if (B === u) return j(7);
1501
- var X = (S = {}, S[s] = n, S[l] = o, S[a] = r, S)[B] || 1, Z = this.$d.getTime() + D * X;
1502
- return k.w(Z, this);
1503
- }, x.subtract = function(D, T) {
1504
- return this.add(-1 * D, T);
1505
- }, x.format = function(D) {
1506
- var T = this, S = this.$locale();
1498
+ if (k === f) return this.set(f, this.$M + b);
1499
+ if (k === p) return this.set(p, this.$y + b);
1500
+ if (k === c) return G(1);
1501
+ if (k === u) return G(7);
1502
+ var W = (S = {}, S[s] = n, S[l] = o, S[a] = r, S)[k] || 1, ee = this.$d.getTime() + b * W;
1503
+ return N.w(ee, this);
1504
+ }, T.subtract = function(b, D) {
1505
+ return this.add(-1 * b, D);
1506
+ }, T.format = function(b) {
1507
+ var D = this, S = this.$locale();
1507
1508
  if (!this.isValid()) return S.invalidDate || g;
1508
- var I = D || "YYYY-MM-DDTHH:mm:ssZ", B = k.z(this), j = this.$H, X = this.$m, Z = this.$M, Q = S.weekdays, ee = S.months, ie = S.meridiem, ae = function(G, V, Y, q) {
1509
- return G && (G[V] || G(T, I)) || Y[V].slice(0, q);
1510
- }, se = function(G) {
1511
- return k.s(j % 12 || 12, G, "0");
1512
- }, U = ie || function(G, V, Y) {
1513
- var q = G < 12 ? "AM" : "PM";
1514
- return Y ? q.toLowerCase() : q;
1509
+ var R = b || "YYYY-MM-DDTHH:mm:ssZ", k = N.z(this), G = this.$H, W = this.$m, ee = this.$M, J = S.weekdays, ne = S.months, ae = S.meridiem, ie = function(H, j, q, X) {
1510
+ return H && (H[j] || H(D, R)) || q[j].slice(0, X);
1511
+ }, se = function(H) {
1512
+ return N.s(G % 12 || 12, H, "0");
1513
+ }, F = ae || function(H, j, q) {
1514
+ var X = H < 12 ? "AM" : "PM";
1515
+ return q ? X.toLowerCase() : X;
1515
1516
  };
1516
- return I.replace(E, function(G, V) {
1517
- return V || function(Y) {
1518
- switch (Y) {
1517
+ return R.replace(E, function(H, j) {
1518
+ return j || function(q) {
1519
+ switch (q) {
1519
1520
  case "YY":
1520
- return String(T.$y).slice(-2);
1521
+ return String(D.$y).slice(-2);
1521
1522
  case "YYYY":
1522
- return k.s(T.$y, 4, "0");
1523
+ return N.s(D.$y, 4, "0");
1523
1524
  case "M":
1524
- return Z + 1;
1525
+ return ee + 1;
1525
1526
  case "MM":
1526
- return k.s(Z + 1, 2, "0");
1527
+ return N.s(ee + 1, 2, "0");
1527
1528
  case "MMM":
1528
- return ae(S.monthsShort, Z, ee, 3);
1529
+ return ie(S.monthsShort, ee, ne, 3);
1529
1530
  case "MMMM":
1530
- return ae(ee, Z);
1531
+ return ie(ne, ee);
1531
1532
  case "D":
1532
- return T.$D;
1533
+ return D.$D;
1533
1534
  case "DD":
1534
- return k.s(T.$D, 2, "0");
1535
+ return N.s(D.$D, 2, "0");
1535
1536
  case "d":
1536
- return String(T.$W);
1537
+ return String(D.$W);
1537
1538
  case "dd":
1538
- return ae(S.weekdaysMin, T.$W, Q, 2);
1539
+ return ie(S.weekdaysMin, D.$W, J, 2);
1539
1540
  case "ddd":
1540
- return ae(S.weekdaysShort, T.$W, Q, 3);
1541
+ return ie(S.weekdaysShort, D.$W, J, 3);
1541
1542
  case "dddd":
1542
- return Q[T.$W];
1543
+ return J[D.$W];
1543
1544
  case "H":
1544
- return String(j);
1545
+ return String(G);
1545
1546
  case "HH":
1546
- return k.s(j, 2, "0");
1547
+ return N.s(G, 2, "0");
1547
1548
  case "h":
1548
1549
  return se(1);
1549
1550
  case "hh":
1550
1551
  return se(2);
1551
1552
  case "a":
1552
- return U(j, X, !0);
1553
+ return F(G, W, !0);
1553
1554
  case "A":
1554
- return U(j, X, !1);
1555
+ return F(G, W, !1);
1555
1556
  case "m":
1556
- return String(X);
1557
+ return String(W);
1557
1558
  case "mm":
1558
- return k.s(X, 2, "0");
1559
+ return N.s(W, 2, "0");
1559
1560
  case "s":
1560
- return String(T.$s);
1561
+ return String(D.$s);
1561
1562
  case "ss":
1562
- return k.s(T.$s, 2, "0");
1563
+ return N.s(D.$s, 2, "0");
1563
1564
  case "SSS":
1564
- return k.s(T.$ms, 3, "0");
1565
+ return N.s(D.$ms, 3, "0");
1565
1566
  case "Z":
1566
- return B;
1567
+ return k;
1567
1568
  }
1568
1569
  return null;
1569
- }(G) || B.replace(":", "");
1570
+ }(H) || k.replace(":", "");
1570
1571
  });
1571
- }, x.utcOffset = function() {
1572
+ }, T.utcOffset = function() {
1572
1573
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1573
- }, x.diff = function(D, T, S) {
1574
- var I, B = this, j = k.p(T), X = A(D), Z = (X.utcOffset() - this.utcOffset()) * n, Q = this - X, ee = function() {
1575
- return k.m(B, X);
1574
+ }, T.diff = function(b, D, S) {
1575
+ var R, k = this, G = N.p(D), W = O(b), ee = (W.utcOffset() - this.utcOffset()) * n, J = this - W, ne = function() {
1576
+ return N.m(k, W);
1576
1577
  };
1577
- switch (j) {
1578
+ switch (G) {
1578
1579
  case p:
1579
- I = ee() / 12;
1580
+ R = ne() / 12;
1580
1581
  break;
1581
1582
  case f:
1582
- I = ee();
1583
+ R = ne();
1583
1584
  break;
1584
1585
  case d:
1585
- I = ee() / 3;
1586
+ R = ne() / 3;
1586
1587
  break;
1587
1588
  case u:
1588
- I = (Q - Z) / 6048e5;
1589
+ R = (J - ee) / 6048e5;
1589
1590
  break;
1590
1591
  case c:
1591
- I = (Q - Z) / 864e5;
1592
+ R = (J - ee) / 864e5;
1592
1593
  break;
1593
1594
  case l:
1594
- I = Q / o;
1595
+ R = J / o;
1595
1596
  break;
1596
1597
  case s:
1597
- I = Q / n;
1598
+ R = J / n;
1598
1599
  break;
1599
1600
  case a:
1600
- I = Q / r;
1601
+ R = J / r;
1601
1602
  break;
1602
1603
  default:
1603
- I = Q;
1604
+ R = J;
1604
1605
  }
1605
- return S ? I : k.a(I);
1606
- }, x.daysInMonth = function() {
1606
+ return S ? R : N.a(R);
1607
+ }, T.daysInMonth = function() {
1607
1608
  return this.endOf(f).$D;
1608
- }, x.$locale = function() {
1609
+ }, T.$locale = function() {
1609
1610
  return w[this.$L];
1610
- }, x.locale = function(D, T) {
1611
- if (!D) return this.$L;
1612
- var S = this.clone(), I = R(D, T, !0);
1613
- return I && (S.$L = I), S;
1614
- }, x.clone = function() {
1615
- return k.w(this.$d, this);
1616
- }, x.toDate = function() {
1611
+ }, T.locale = function(b, D) {
1612
+ if (!b) return this.$L;
1613
+ var S = this.clone(), R = A(b, D, !0);
1614
+ return R && (S.$L = R), S;
1615
+ }, T.clone = function() {
1616
+ return N.w(this.$d, this);
1617
+ }, T.toDate = function() {
1617
1618
  return new Date(this.valueOf());
1618
- }, x.toJSON = function() {
1619
+ }, T.toJSON = function() {
1619
1620
  return this.isValid() ? this.toISOString() : null;
1620
- }, x.toISOString = function() {
1621
+ }, T.toISOString = function() {
1621
1622
  return this.$d.toISOString();
1622
- }, x.toString = function() {
1623
+ }, T.toString = function() {
1623
1624
  return this.$d.toUTCString();
1624
- }, O;
1625
- }(), L = F.prototype;
1626
- return A.prototype = L, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", p], ["$D", m]].forEach(function(O) {
1627
- L[O[1]] = function(x) {
1628
- return this.$g(x, O[0], O[1]);
1625
+ }, M;
1626
+ }(), L = U.prototype;
1627
+ return O.prototype = L, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", p], ["$D", m]].forEach(function(M) {
1628
+ L[M[1]] = function(T) {
1629
+ return this.$g(T, M[0], M[1]);
1629
1630
  };
1630
- }), A.extend = function(O, x) {
1631
- return O.$i || (O(x, F, A), O.$i = !0), A;
1632
- }, A.locale = R, A.isDayjs = N, A.unix = function(O) {
1633
- return A(1e3 * O);
1634
- }, A.en = w[C], A.Ls = w, A.p = {}, A;
1631
+ }), O.extend = function(M, T) {
1632
+ return M.$i || (M(T, U, O), M.$i = !0), O;
1633
+ }, O.locale = A, O.isDayjs = I, O.unix = function(M) {
1634
+ return O(1e3 * M);
1635
+ }, O.en = w[C], O.Ls = w, O.p = {}, O;
1635
1636
  });
1636
1637
  })(dayjs_min);
1637
1638
  var dayjs_minExports = dayjs_min.exports;
@@ -1833,6 +1834,9 @@ const DEFAULT_PRINT_HEADER = {
1833
1834
  header: { ...DEFAULT_PRINT_HEADER },
1834
1835
  footer: { ...DEFAULT_PRINT_FOOTER },
1835
1836
  watermark: { ...DEFAULT_PRINT_WATERMARK }
1837
+ }, DEFAULT_EXPORT_CONFIG = {
1838
+ exportAll: !1,
1839
+ pdfEnabled: !1
1836
1840
  };
1837
1841
  async function fetchReportData(t, e, r, n = !1) {
1838
1842
  if (!t.data.source)
@@ -1854,7 +1858,7 @@ async function fetchReportData(t, e, r, n = !1) {
1854
1858
  const m = a.get(p.toUpperCase()), g = m != null && m.length ? { ...i, params: [...i.params || [], ...m] } : i, _ = await getDateSourceData(p, g);
1855
1859
  let E = _.data;
1856
1860
  if (n && Array.isArray(E)) {
1857
- const $ = _.count || E.length, y = i.pageSize > 0 ? i.pageSize : FULL_FETCH_PAGE_SIZE, v = Math.min(Math.ceil($ / y), FULL_FETCH_MAX_PAGES);
1861
+ const x = _.count || E.length, y = i.pageSize > 0 ? i.pageSize : FULL_FETCH_PAGE_SIZE, v = Math.min(Math.ceil(x / y), FULL_FETCH_MAX_PAGES);
1858
1862
  for (let C = 2; C <= v; C++) {
1859
1863
  const w = await getDateSourceData(p, { ...g, pageNumber: C });
1860
1864
  if (!Array.isArray(w.data) || w.data.length === 0)
@@ -3154,37 +3158,37 @@ var divide = /* @__PURE__ */ function() {
3154
3158
  for (; !n[0] && n.length > 1; ) n.shift();
3155
3159
  }
3156
3160
  return function(n, o, i, a, s, l) {
3157
- var c, u, f, d, p, m, g, _, E, $, y, v, C, w, b, N, R, A, k, F, L = n.constructor, O = n.s == o.s ? 1 : -1, x = n.d, D = o.d;
3158
- if (!x || !x[0] || !D || !D[0])
3161
+ var c, u, f, d, p, m, g, _, E, x, y, v, C, w, $, I, A, O, N, U, L = n.constructor, M = n.s == o.s ? 1 : -1, T = n.d, b = o.d;
3162
+ if (!T || !T[0] || !b || !b[0])
3159
3163
  return new L(
3160
3164
  // Return NaN if either NaN, or both Infinity or 0.
3161
- !n.s || !o.s || (x ? D && x[0] == D[0] : !D) ? NaN : (
3165
+ !n.s || !o.s || (T ? b && T[0] == b[0] : !b) ? NaN : (
3162
3166
  // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
3163
- x && x[0] == 0 || !D ? O * 0 : O / 0
3167
+ T && T[0] == 0 || !b ? M * 0 : M / 0
3164
3168
  )
3165
3169
  );
3166
- for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), k = D.length, R = x.length, E = new L(O), $ = E.d = [], f = 0; D[f] == (x[f] || 0); f++) ;
3167
- if (D[f] > (x[f] || 0) && u--, i == null ? (w = i = L.precision, a = L.rounding) : s ? w = i + (n.e - o.e) + 1 : w = i, w < 0)
3168
- $.push(1), m = !0;
3170
+ for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), N = b.length, A = T.length, E = new L(M), x = E.d = [], f = 0; b[f] == (T[f] || 0); f++) ;
3171
+ if (b[f] > (T[f] || 0) && u--, i == null ? (w = i = L.precision, a = L.rounding) : s ? w = i + (n.e - o.e) + 1 : w = i, w < 0)
3172
+ x.push(1), m = !0;
3169
3173
  else {
3170
- if (w = w / p + 2 | 0, f = 0, k == 1) {
3171
- for (d = 0, D = D[0], w++; (f < R || d) && w--; f++)
3172
- b = d * l + (x[f] || 0), $[f] = b / D | 0, d = b % D | 0;
3173
- m = d || f < R;
3174
+ if (w = w / p + 2 | 0, f = 0, N == 1) {
3175
+ for (d = 0, b = b[0], w++; (f < A || d) && w--; f++)
3176
+ $ = d * l + (T[f] || 0), x[f] = $ / b | 0, d = $ % b | 0;
3177
+ m = d || f < A;
3174
3178
  } else {
3175
- for (d = l / (D[0] + 1) | 0, d > 1 && (D = t(D, d, l), x = t(x, d, l), k = D.length, R = x.length), N = k, y = x.slice(0, k), v = y.length; v < k; ) y[v++] = 0;
3176
- F = D.slice(), F.unshift(0), A = D[0], D[1] >= l / 2 && ++A;
3179
+ for (d = l / (b[0] + 1) | 0, d > 1 && (b = t(b, d, l), T = t(T, d, l), N = b.length, A = T.length), I = N, y = T.slice(0, N), v = y.length; v < N; ) y[v++] = 0;
3180
+ U = b.slice(), U.unshift(0), O = b[0], b[1] >= l / 2 && ++O;
3177
3181
  do
3178
- d = 0, c = e(D, y, k, v), c < 0 ? (C = y[0], k != v && (C = C * l + (y[1] || 0)), d = C / A | 0, d > 1 ? (d >= l && (d = l - 1), g = t(D, d, l), _ = g.length, v = y.length, c = e(g, y, _, v), c == 1 && (d--, r(g, k < _ ? F : D, _, l))) : (d == 0 && (c = d = 1), g = D.slice()), _ = g.length, _ < v && g.unshift(0), r(y, g, v, l), c == -1 && (v = y.length, c = e(D, y, k, v), c < 1 && (d++, r(y, k < v ? F : D, v, l))), v = y.length) : c === 0 && (d++, y = [0]), $[f++] = d, c && y[0] ? y[v++] = x[N] || 0 : (y = [x[N]], v = 1);
3179
- while ((N++ < R || y[0] !== void 0) && w--);
3182
+ d = 0, c = e(b, y, N, v), c < 0 ? (C = y[0], N != v && (C = C * l + (y[1] || 0)), d = C / O | 0, d > 1 ? (d >= l && (d = l - 1), g = t(b, d, l), _ = g.length, v = y.length, c = e(g, y, _, v), c == 1 && (d--, r(g, N < _ ? U : b, _, l))) : (d == 0 && (c = d = 1), g = b.slice()), _ = g.length, _ < v && g.unshift(0), r(y, g, v, l), c == -1 && (v = y.length, c = e(b, y, N, v), c < 1 && (d++, r(y, N < v ? U : b, v, l))), v = y.length) : c === 0 && (d++, y = [0]), x[f++] = d, c && y[0] ? y[v++] = T[I] || 0 : (y = [T[I]], v = 1);
3183
+ while ((I++ < A || y[0] !== void 0) && w--);
3180
3184
  m = y[0] !== void 0;
3181
3185
  }
3182
- $[0] || $.shift();
3186
+ x[0] || x.shift();
3183
3187
  }
3184
3188
  if (p == 1)
3185
3189
  E.e = u, inexact = m;
3186
3190
  else {
3187
- for (f = 1, d = $[0]; d >= 10; d /= 10) f++;
3191
+ for (f = 1, d = x[0]; d >= 10; d /= 10) f++;
3188
3192
  E.e = f + u * p - 1, finalise(E, s ? i + E.e + 1 : i, a, m);
3189
3193
  }
3190
3194
  return E;
@@ -3301,7 +3305,7 @@ function naturalExponential(t, e) {
3301
3305
  }
3302
3306
  }
3303
3307
  function naturalLogarithm(t, e) {
3304
- var r, n, o, i, a, s, l, c, u, f, d, p = 1, m = 10, g = t, _ = g.d, E = g.constructor, $ = E.rounding, y = E.precision;
3308
+ var r, n, o, i, a, s, l, c, u, f, d, p = 1, m = 10, g = t, _ = g.d, E = g.constructor, x = E.rounding, y = E.precision;
3305
3309
  if (g.s < 0 || !_ || !_[0] || !g.e && _[0] == 1 && _.length == 1)
3306
3310
  return new E(_ && !_[0] ? -1 / 0 : g.s != 1 ? NaN : _ ? 0 : g);
3307
3311
  if (e == null ? (external = !1, u = y) : u = e, E.precision = u += m, r = digitsToString(_), n = r.charAt(0), Math.abs(i = g.e) < 15e14) {
@@ -3309,14 +3313,14 @@ function naturalLogarithm(t, e) {
3309
3313
  g = g.times(t), r = digitsToString(g.d), n = r.charAt(0), p++;
3310
3314
  i = g.e, n > 1 ? (g = new E("0." + r), i++) : g = new E(n + "." + r.slice(1));
3311
3315
  } else
3312
- return c = getLn10(E, u + 2, y).times(i + ""), g = naturalLogarithm(new E(n + "." + r.slice(1)), u - m).plus(c), E.precision = y, e == null ? finalise(g, y, $, external = !0) : g;
3316
+ return c = getLn10(E, u + 2, y).times(i + ""), g = naturalLogarithm(new E(n + "." + r.slice(1)), u - m).plus(c), E.precision = y, e == null ? finalise(g, y, x, external = !0) : g;
3313
3317
  for (f = g, l = a = g = divide(g.minus(1), g.plus(1), u, 1), d = finalise(g.times(g), u, 1), o = 3; ; ) {
3314
3318
  if (a = finalise(a.times(d), u, 1), c = l.plus(divide(a, new E(o), u, 1)), digitsToString(c.d).slice(0, u) === digitsToString(l.d).slice(0, u))
3315
3319
  if (l = l.times(2), i !== 0 && (l = l.plus(getLn10(E, u + 2, y).times(i + ""))), l = divide(l, new E(p), u, 1), e == null)
3316
- if (checkRoundingDigits(l.d, u - m, $, s))
3320
+ if (checkRoundingDigits(l.d, u - m, x, s))
3317
3321
  E.precision = u += m, c = a = g = divide(f.minus(1), f.plus(1), u, 1), d = finalise(g.times(g), u, 1), o = s = 1;
3318
3322
  else
3319
- return finalise(l, E.precision = y, $, external = !0);
3323
+ return finalise(l, E.precision = y, x, external = !0);
3320
3324
  else
3321
3325
  return E.precision = y, l;
3322
3326
  l = c, o += 2;
@@ -7092,9 +7096,9 @@ regex.testAlphanumeric = function t(e) {
7092
7096
  if (!i.isValid(p))
7093
7097
  throw new Error("Invalid QR Code version");
7094
7098
  typeof g > "u" && (g = o.BYTE);
7095
- const _ = e.getSymbolTotalCodewords(p), E = r.getTotalCodewordsCount(p, m), $ = (_ - E) * 8;
7096
- if (g === o.MIXED) return $;
7097
- const y = $ - c(g, p);
7099
+ const _ = e.getSymbolTotalCodewords(p), E = r.getTotalCodewordsCount(p, m), x = (_ - E) * 8;
7100
+ if (g === o.MIXED) return x;
7101
+ const y = x - c(g, p);
7098
7102
  switch (g) {
7099
7103
  case o.NUMERIC:
7100
7104
  return Math.floor(y / 10 * 3);
@@ -7345,33 +7349,33 @@ var dijkstraExports = dijkstra.exports;
7345
7349
  function c(E) {
7346
7350
  return unescape(encodeURIComponent(E)).length;
7347
7351
  }
7348
- function u(E, $, y) {
7352
+ function u(E, x, y) {
7349
7353
  const v = [];
7350
7354
  let C;
7351
7355
  for (; (C = E.exec(y)) !== null; )
7352
7356
  v.push({
7353
7357
  data: C[0],
7354
7358
  index: C.index,
7355
- mode: $,
7359
+ mode: x,
7356
7360
  length: C[0].length
7357
7361
  });
7358
7362
  return v;
7359
7363
  }
7360
7364
  function f(E) {
7361
- const $ = u(a.NUMERIC, e.NUMERIC, E), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, E);
7365
+ const x = u(a.NUMERIC, e.NUMERIC, E), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, E);
7362
7366
  let v, C;
7363
- return s.isKanjiModeEnabled() ? (v = u(a.BYTE, e.BYTE, E), C = u(a.KANJI, e.KANJI, E)) : (v = u(a.BYTE_KANJI, e.BYTE, E), C = []), $.concat(y, v, C).sort(function(b, N) {
7364
- return b.index - N.index;
7365
- }).map(function(b) {
7367
+ return s.isKanjiModeEnabled() ? (v = u(a.BYTE, e.BYTE, E), C = u(a.KANJI, e.KANJI, E)) : (v = u(a.BYTE_KANJI, e.BYTE, E), C = []), x.concat(y, v, C).sort(function($, I) {
7368
+ return $.index - I.index;
7369
+ }).map(function($) {
7366
7370
  return {
7367
- data: b.data,
7368
- mode: b.mode,
7369
- length: b.length
7371
+ data: $.data,
7372
+ mode: $.mode,
7373
+ length: $.length
7370
7374
  };
7371
7375
  });
7372
7376
  }
7373
- function d(E, $) {
7374
- switch ($) {
7377
+ function d(E, x) {
7378
+ switch (x) {
7375
7379
  case e.NUMERIC:
7376
7380
  return r.getBitsLength(E);
7377
7381
  case e.ALPHANUMERIC:
@@ -7383,66 +7387,66 @@ var dijkstraExports = dijkstra.exports;
7383
7387
  }
7384
7388
  }
7385
7389
  function p(E) {
7386
- return E.reduce(function($, y) {
7387
- const v = $.length - 1 >= 0 ? $[$.length - 1] : null;
7388
- return v && v.mode === y.mode ? ($[$.length - 1].data += y.data, $) : ($.push(y), $);
7390
+ return E.reduce(function(x, y) {
7391
+ const v = x.length - 1 >= 0 ? x[x.length - 1] : null;
7392
+ return v && v.mode === y.mode ? (x[x.length - 1].data += y.data, x) : (x.push(y), x);
7389
7393
  }, []);
7390
7394
  }
7391
7395
  function m(E) {
7392
- const $ = [];
7396
+ const x = [];
7393
7397
  for (let y = 0; y < E.length; y++) {
7394
7398
  const v = E[y];
7395
7399
  switch (v.mode) {
7396
7400
  case e.NUMERIC:
7397
- $.push([
7401
+ x.push([
7398
7402
  v,
7399
7403
  { data: v.data, mode: e.ALPHANUMERIC, length: v.length },
7400
7404
  { data: v.data, mode: e.BYTE, length: v.length }
7401
7405
  ]);
7402
7406
  break;
7403
7407
  case e.ALPHANUMERIC:
7404
- $.push([
7408
+ x.push([
7405
7409
  v,
7406
7410
  { data: v.data, mode: e.BYTE, length: v.length }
7407
7411
  ]);
7408
7412
  break;
7409
7413
  case e.KANJI:
7410
- $.push([
7414
+ x.push([
7411
7415
  v,
7412
7416
  { data: v.data, mode: e.BYTE, length: c(v.data) }
7413
7417
  ]);
7414
7418
  break;
7415
7419
  case e.BYTE:
7416
- $.push([
7420
+ x.push([
7417
7421
  { data: v.data, mode: e.BYTE, length: c(v.data) }
7418
7422
  ]);
7419
7423
  }
7420
7424
  }
7421
- return $;
7425
+ return x;
7422
7426
  }
7423
- function g(E, $) {
7427
+ function g(E, x) {
7424
7428
  const y = {}, v = { start: {} };
7425
7429
  let C = ["start"];
7426
7430
  for (let w = 0; w < E.length; w++) {
7427
- const b = E[w], N = [];
7428
- for (let R = 0; R < b.length; R++) {
7429
- const A = b[R], k = "" + w + R;
7430
- N.push(k), y[k] = { node: A, lastCount: 0 }, v[k] = {};
7431
- for (let F = 0; F < C.length; F++) {
7432
- const L = C[F];
7433
- y[L] && y[L].node.mode === A.mode ? (v[L][k] = d(y[L].lastCount + A.length, A.mode) - d(y[L].lastCount, A.mode), y[L].lastCount += A.length) : (y[L] && (y[L].lastCount = A.length), v[L][k] = d(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, $));
7431
+ const $ = E[w], I = [];
7432
+ for (let A = 0; A < $.length; A++) {
7433
+ const O = $[A], N = "" + w + A;
7434
+ I.push(N), y[N] = { node: O, lastCount: 0 }, v[N] = {};
7435
+ for (let U = 0; U < C.length; U++) {
7436
+ const L = C[U];
7437
+ y[L] && y[L].node.mode === O.mode ? (v[L][N] = d(y[L].lastCount + O.length, O.mode) - d(y[L].lastCount, O.mode), y[L].lastCount += O.length) : (y[L] && (y[L].lastCount = O.length), v[L][N] = d(O.length, O.mode) + 4 + e.getCharCountIndicator(O.mode, x));
7434
7438
  }
7435
7439
  }
7436
- C = N;
7440
+ C = I;
7437
7441
  }
7438
7442
  for (let w = 0; w < C.length; w++)
7439
7443
  v[C[w]].end = 0;
7440
7444
  return { map: v, table: y };
7441
7445
  }
7442
- function _(E, $) {
7446
+ function _(E, x) {
7443
7447
  let y;
7444
7448
  const v = e.getBestModeForData(E);
7445
- if (y = e.from($, v), y !== e.BYTE && y.bit < v.bit)
7449
+ if (y = e.from(x, v), y !== e.BYTE && y.bit < v.bit)
7446
7450
  throw new Error('"' + E + '" cannot be encoded with mode ' + e.toString(y) + `.
7447
7451
  Suggested mode is: ` + e.toString(v));
7448
7452
  switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
@@ -7456,18 +7460,18 @@ var dijkstraExports = dijkstra.exports;
7456
7460
  return new o(E);
7457
7461
  }
7458
7462
  }
7459
- t.fromArray = function($) {
7460
- return $.reduce(function(y, v) {
7463
+ t.fromArray = function(x) {
7464
+ return x.reduce(function(y, v) {
7461
7465
  return typeof v == "string" ? y.push(_(v, null)) : v.data && y.push(_(v.data, v.mode)), y;
7462
7466
  }, []);
7463
- }, t.fromString = function($, y) {
7464
- const v = f($, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), b = l.find_path(w.map, "start", "end"), N = [];
7465
- for (let R = 1; R < b.length - 1; R++)
7466
- N.push(w.table[b[R]].node);
7467
- return t.fromArray(p(N));
7468
- }, t.rawSplit = function($) {
7467
+ }, t.fromString = function(x, y) {
7468
+ const v = f(x, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), $ = l.find_path(w.map, "start", "end"), I = [];
7469
+ for (let A = 1; A < $.length - 1; A++)
7470
+ I.push(w.table[$[A]].node);
7471
+ return t.fromArray(p(I));
7472
+ }, t.rawSplit = function(x) {
7469
7473
  return t.fromArray(
7470
- f($, s.isKanjiModeEnabled())
7474
+ f(x, s.isKanjiModeEnabled())
7471
7475
  );
7472
7476
  };
7473
7477
  })(segments);
@@ -7545,10 +7549,10 @@ function createCodewords(t, e, r) {
7545
7549
  let m = 0;
7546
7550
  const g = new Array(a), _ = new Array(a);
7547
7551
  let E = 0;
7548
- const $ = new Uint8Array(t.buffer);
7549
- for (let b = 0; b < a; b++) {
7550
- const N = b < l ? u : f;
7551
- g[b] = $.slice(m, m + N), _[b] = p.encode(g[b]), m += N, E = Math.max(E, N);
7552
+ const x = new Uint8Array(t.buffer);
7553
+ for (let $ = 0; $ < a; $++) {
7554
+ const I = $ < l ? u : f;
7555
+ g[$] = x.slice(m, m + I), _[$] = p.encode(g[$]), m += I, E = Math.max(E, I);
7552
7556
  }
7553
7557
  const y = new Uint8Array(n);
7554
7558
  let v = 0, C, w;
@@ -7838,7 +7842,7 @@ function renderCellStyle(t) {
7838
7842
  }), e;
7839
7843
  }
7840
7844
  function formatNumber$1(t, { numberDecimal: e, numberUseGrouping: r } = {}) {
7841
- const n = e === 0 ? Math.round(t) : t.toFixed(e);
7845
+ const n = e === 0 ? Math.round(t) : new Decimal(t).toFixed(e ?? 0);
7842
7846
  if (r) {
7843
7847
  const o = n.toString().split(".");
7844
7848
  return o[0] = o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), o.join(".");
@@ -7846,15 +7850,15 @@ function formatNumber$1(t, { numberDecimal: e, numberUseGrouping: r } = {}) {
7846
7850
  return n;
7847
7851
  }
7848
7852
  function formatCurrency(t, { numberDecimal: e, currencySymbol: r, numberUseGrouping: n } = {}) {
7849
- const o = e === 0 ? Math.round(t) : parseFloat(t.toFixed(e));
7850
- let [i, a] = o.toString().split(".");
7853
+ const o = new Decimal(t).toFixed(e > 0 ? e : 0);
7854
+ let [i, a] = o.split(".");
7851
7855
  n && (i = i.replace(/\B(?=(\d{3})+(?!\d))/g, ","));
7852
7856
  let s = `${r}${i}`;
7853
7857
  return e > 0 && (s += `.${a}`), s;
7854
7858
  }
7855
7859
  function formatPercentage(t, { numberDecimal: e } = {}, r = !1) {
7856
- const n = e === 0 ? Math.round(t) : t.toFixed(e);
7857
- return r ? `${n}‰` : `${n}%`;
7860
+ const n = r ? 1e3 : 100, o = new Decimal(t).times(n).toFixed(e ?? 0);
7861
+ return r ? `${o}‰` : `${o}%`;
7858
7862
  }
7859
7863
  function formatScientific(t, { scientificNotation: e = "e", digits: r = 6 } = {}) {
7860
7864
  return t.toExponential(r).replace(/e/, e);
@@ -7891,9 +7895,9 @@ function formatCellValue(t, e = FormatType.TEXT, r) {
7891
7895
  case FormatType.CURRENCY:
7892
7896
  return formatCurrency(n, r);
7893
7897
  case FormatType.PERCENT:
7894
- return formatPercentage(n * 100, r, !1);
7898
+ return formatPercentage(n, r, !1);
7895
7899
  case FormatType.PROMILLE:
7896
- return formatPercentage(n * 1e3, r, !0);
7900
+ return formatPercentage(n, r, !0);
7897
7901
  case FormatType.SCIENTIFIC:
7898
7902
  return formatScientific(n, r);
7899
7903
  case FormatType.DATETIME:
@@ -7923,10 +7927,10 @@ function renderImageStyle(t) {
7923
7927
  return t.width !== void 0 && e.push(`width:${t.width}px`), t.height !== void 0 && e.push(`height:${t.height}px`), t.fit && e.push(`object-fit:${t.fit}`), e.length ? e.join(";") : "";
7924
7928
  }
7925
7929
  function renderCell(t, e, r) {
7926
- var $, y, v, C, w;
7930
+ var x, y, v, C, w;
7927
7931
  const n = document.createElement("td");
7928
7932
  n.setAttribute("data-cell-config", `${e.row}-${e.col}`), n.setAttribute("rowspan", e.rowSpan), n.setAttribute("colspan", e.colSpan);
7929
- const o = (($ = e.style) == null ? void 0 : $.allowContentOverflow) === !0;
7933
+ const o = ((x = e.style) == null ? void 0 : x.allowContentOverflow) === !0;
7930
7934
  n.style.boxSizing = "border-box", n.style.position = "relative", e.rowSpan <= 1 && (o ? n.style.minHeight = `${t.size ?? 25}px` : n.style.height = `${t.size ?? 25}px`);
7931
7935
  const i = { left: "flex-start", center: "center", right: "flex-end" }, a = { top: "flex-start", center: "center", bottom: "flex-end" }, s = i[(y = e.style) == null ? void 0 : y.textAlign] || "center", l = a[(v = e.style) == null ? void 0 : v.verticalAlign] || "center", c = document.createElement("div");
7932
7936
  o ? c.style.cssText = `overflow:visible;position:relative;display:flex;align-items:${l};justify-content:${s};` : c.style.cssText = `overflow:hidden;position:absolute;inset:0;display:flex;align-items:${l};justify-content:${s};`;
@@ -7936,13 +7940,13 @@ function renderCell(t, e, r) {
7936
7940
  d = `<i class="iconfont ${e.data}"></i>`, f = !0;
7937
7941
  break;
7938
7942
  case CellType.IMAGE: {
7939
- const b = renderImageStyle(e.imageOptions);
7940
- d = `<img src="${e.rawData ?? e.data}" alt="" style="max-width:100%;max-height:100%;object-fit:contain${b ? ";" + b : ""}">`, f = !0;
7943
+ const $ = renderImageStyle(e.imageOptions);
7944
+ d = `<img src="${e.rawData ?? e.data}" alt="" style="max-width:100%;max-height:100%;object-fit:contain${$ ? ";" + $ : ""}">`, f = !0;
7941
7945
  break;
7942
7946
  }
7943
7947
  case CellType.RICH: {
7944
- const b = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : String(e.text);
7945
- b && (d = b, f = !0);
7948
+ const $ = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : String(e.text);
7949
+ $ && (d = $, f = !0);
7946
7950
  break;
7947
7951
  }
7948
7952
  default:
@@ -7951,25 +7955,25 @@ function renderCell(t, e, r) {
7951
7955
  }
7952
7956
  if (!f && e.format === FormatType.BARCODE)
7953
7957
  try {
7954
- const b = e.barcodeUrl || canvasPool.generateBarcode(u, e.barcodeOptions);
7955
- b && (d = `<img src="${b}" alt="barcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7956
- } catch (b) {
7957
- console.error(`条形码生成失败 [${e.row}:${e.col}]:`, b);
7958
+ const $ = e.barcodeUrl || canvasPool.generateBarcode(u, e.barcodeOptions);
7959
+ $ && (d = `<img src="${$}" alt="barcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7960
+ } catch ($) {
7961
+ console.error(`条形码生成失败 [${e.row}:${e.col}]:`, $);
7958
7962
  }
7959
7963
  else if (!f && e.format === FormatType.QRCODE) {
7960
- const b = e.qrcodeData;
7961
- b && (d = `<img src="${b}" alt="qrcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7964
+ const $ = e.qrcodeData;
7965
+ $ && (d = `<img src="${$}" alt="qrcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7962
7966
  }
7963
7967
  if (f)
7964
7968
  c.innerHTML = d;
7965
7969
  else {
7966
- const b = document.createElement("span");
7967
- b.style.cssText = "word-break:break-word;overflow-wrap:anywhere;", b.innerText = String(u), c.appendChild(b);
7970
+ const $ = document.createElement("span");
7971
+ $.style.cssText = "word-break:break-word;overflow-wrap:anywhere;", $.innerText = String(u), c.appendChild($);
7968
7972
  }
7969
7973
  const p = e.style || {}, m = p.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, g = p.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, _ = p.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, E = p.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
7970
7974
  if (c.style.paddingTop = `${m}px`, c.style.paddingRight = `${g}px`, c.style.paddingBottom = `${_}px`, c.style.paddingLeft = `${E}px`, n.appendChild(c), e.style && (n.setAttribute("style", renderCellStyle(e.style)), e.style.border)) {
7971
- const b = normalizeBorder(e.style.border);
7972
- b && (n.style.borderTop = getBorderCss(b.top, r), n.style.borderRight = getBorderCss(b.right, r), n.style.borderBottom = getBorderCss(b.bottom, r), n.style.borderLeft = getBorderCss(b.left, r));
7975
+ const $ = normalizeBorder(e.style.border);
7976
+ $ && (n.style.borderTop = getBorderCss($.top, r), n.style.borderRight = getBorderCss($.right, r), n.style.borderBottom = getBorderCss($.bottom, r), n.style.borderLeft = getBorderCss($.left, r));
7973
7977
  }
7974
7978
  return n.style.position = "relative", n;
7975
7979
  }
@@ -8038,16 +8042,16 @@ function renderReportByDomForPrint(t, e, r, n, o) {
8038
8042
  }
8039
8043
  u += (g.size ?? 25) - 1, _.style.height = `${g.size ?? 25}px`, f = 0;
8040
8044
  for (let E = 0; E < e.length; E++) {
8041
- const $ = e[E];
8042
- if ($.isHidden) continue;
8045
+ const x = e[E];
8046
+ if (x.isHidden) continue;
8043
8047
  const y = r[m][E];
8044
8048
  if (g && y && (g.size ?? 25) > 0) {
8045
8049
  const v = renderCell(g, y, n);
8046
- if ($.isFixed === !0 && (v.classList.add("fixed-td"), v.style.left = `${f - 1}px`), f += ($.size ?? 80) - 1, v.setAttribute("data-cell-data", `${m}-${E}`), y.rowSpan !== 0 && y.colSpan !== 0) {
8050
+ if (x.isFixed === !0 && (v.classList.add("fixed-td"), v.style.left = `${f - 1}px`), f += (x.size ?? 80) - 1, v.setAttribute("data-cell-data", `${m}-${E}`), y.rowSpan !== 0 && y.colSpan !== 0) {
8047
8051
  if ([CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN, CellType.IMAGE, CellType.RICH].includes(y.type)) {
8048
8052
  y.style && v.setAttribute("style", renderCellPrintStyle(y.style, n)), y.style && y.style.border === !1 && v.classList.add("no-border");
8049
- const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, b = w.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, N = w.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, R = w.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, A = w.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
8050
- v.style.paddingTop = `${b}px`, v.style.paddingRight = `${N}px`, v.style.paddingBottom = `${R}px`, v.style.paddingLeft = `${A}px`, v.style.boxSizing = "border-box", v.style.position = "relative", y.rowSpan <= 1 && (C ? v.style.minHeight = `${g.size ?? 25}px` : v.style.height = `${g.size ?? 25}px`);
8053
+ const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, $ = w.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, I = w.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, A = w.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, O = w.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
8054
+ v.style.paddingTop = `${$}px`, v.style.paddingRight = `${I}px`, v.style.paddingBottom = `${A}px`, v.style.paddingLeft = `${O}px`, v.style.boxSizing = "border-box", v.style.position = "relative", y.rowSpan <= 1 && (C ? v.style.minHeight = `${g.size ?? 25}px` : v.style.height = `${g.size ?? 25}px`);
8051
8055
  }
8052
8056
  _.appendChild(v);
8053
8057
  }
@@ -8067,30 +8071,30 @@ function renderReportByDom(t, e, r, n, o, i) {
8067
8071
  const f = document.createDocumentFragment(), d = [], p = [], m = /* @__PURE__ */ new Map();
8068
8072
  let g = 0;
8069
8073
  for (let E = 0; E < t.length; E++) {
8070
- const $ = t[E];
8071
- if ($.isHidden)
8074
+ const x = t[E];
8075
+ if (x.isHidden)
8072
8076
  continue;
8073
8077
  const y = document.createElement("tr");
8074
- y.dataset.ri = String(g), $.isFixed && (y.style.top = `${c - 1}px`, y.classList.add("fixed-row")), c += ($.size ?? 25) - 1, y.style.height = `${$.size ?? 25}px`, u = 0;
8078
+ y.dataset.ri = String(g), x.isFixed && (y.style.top = `${c - 1}px`, y.classList.add("fixed-row")), c += (x.size ?? 25) - 1, y.style.height = `${x.size ?? 25}px`, u = 0;
8075
8079
  for (let v = 0; v < e.length; v++) {
8076
8080
  const C = e[v];
8077
8081
  if (C.isHidden)
8078
8082
  continue;
8079
8083
  const w = r[E][v];
8080
- if ($ && w && ($.size ?? 25) > 0) {
8081
- const b = renderCell($, w, i);
8084
+ if (x && w && (x.size ?? 25) > 0) {
8085
+ const $ = renderCell(x, w, i);
8082
8086
  if (w.clickSortField) {
8083
- b.classList.add("click-sort-cell"), b.setAttribute("data-click-sort-field", w.clickSortField), b.setAttribute("data-click-sort-numeric", w.clickSortNumeric ? "1" : "0");
8084
- const N = document.createElement("span");
8085
- N.className = "click-sort-arrow", (_ = b.querySelector(":scope > div")) == null || _.appendChild(N);
8087
+ $.classList.add("click-sort-cell"), $.setAttribute("data-click-sort-field", w.clickSortField), $.setAttribute("data-click-sort-numeric", w.clickSortNumeric ? "1" : "0");
8088
+ const I = document.createElement("span");
8089
+ I.className = "click-sort-arrow", (_ = $.querySelector(":scope > div")) == null || _.appendChild(I);
8086
8090
  }
8087
- if (C.isFixed === !0 && (b.classList.add("fixed-td"), b.style.position = "sticky", b.style.left = `${u - 1}px`), u += (C.size ?? 80) - 1, b.setAttribute("data-cell-data", `${E}-${v}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8088
- if (w.style && w.style.border === !1 && b.classList.add("no-border"), y.appendChild(b), w.rowSpan > 1) {
8089
- const N = d.length;
8090
- d.push(b), p.push(w.rowSpan);
8091
- for (let R = 1; R < w.rowSpan; R++) {
8092
- const A = g + R;
8093
- m.has(A) || m.set(A, []), m.get(A).push(N);
8091
+ if (C.isFixed === !0 && ($.classList.add("fixed-td"), $.style.position = "sticky", $.style.left = `${u - 1}px`), u += (C.size ?? 80) - 1, $.setAttribute("data-cell-data", `${E}-${v}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8092
+ if (w.style && w.style.border === !1 && $.classList.add("no-border"), y.appendChild($), w.rowSpan > 1) {
8093
+ const I = d.length;
8094
+ d.push($), p.push(w.rowSpan);
8095
+ for (let A = 1; A < w.rowSpan; A++) {
8096
+ const O = g + A;
8097
+ m.has(O) || m.set(O, []), m.get(O).push(I);
8094
8098
  }
8095
8099
  }
8096
8100
  }
@@ -8100,7 +8104,7 @@ function renderReportByDom(t, e, r, n, o, i) {
8100
8104
  }
8101
8105
  if (d.length > 0) {
8102
8106
  let E = -1;
8103
- const $ = () => {
8107
+ const x = () => {
8104
8108
  var y;
8105
8109
  E >= 0 && ((y = m.get(E)) == null || y.forEach((v) => d[v].classList.remove("merge-hover"))), E = -1;
8106
8110
  };
@@ -8109,8 +8113,8 @@ function renderReportByDom(t, e, r, n, o, i) {
8109
8113
  const v = y.target.closest("tr");
8110
8114
  if (!v) return;
8111
8115
  const C = Number(v.dataset.ri);
8112
- C !== E && ($(), E = C, (w = m.get(C)) == null || w.forEach((b) => d[b].classList.add("merge-hover")));
8113
- }), s.addEventListener("mouseleave", $);
8116
+ C !== E && (x(), E = C, (w = m.get(C)) == null || w.forEach(($) => d[$].classList.add("merge-hover")));
8117
+ }), s.addEventListener("mouseleave", x);
8114
8118
  }
8115
8119
  s.appendChild(f);
8116
8120
  }
@@ -8491,10 +8495,10 @@ function getRangeValues(t, e, r) {
8491
8495
  );
8492
8496
  } else if (r.indexOf("c-") > -1) {
8493
8497
  const g = parseInt(r.split("-")[1]);
8494
- f = getCellValue(m).filter(($) => $.colGroupIndex === g).map(
8495
- ($) => {
8498
+ f = getCellValue(m).filter((x) => x.colGroupIndex === g).map(
8499
+ (x) => {
8496
8500
  var y;
8497
- return [null, void 0, ""].includes($.rawData) ? (y = $.formatType) == null ? void 0 : y.defaultCellContent : $.rawData;
8501
+ return [null, void 0, ""].includes(x.rawData) ? (y = x.formatType) == null ? void 0 : y.defaultCellContent : x.rawData;
8498
8502
  }
8499
8503
  );
8500
8504
  }
@@ -8574,8 +8578,8 @@ function evaluateFunction(t, e, r) {
8574
8578
  for (let g = 0; g < a; g++) {
8575
8579
  let _ = new Decimal(1);
8576
8580
  for (const E of i) {
8577
- const $ = parseFloat(E[g]);
8578
- _ = _.times(isNaN($) ? 0 : $);
8581
+ const x = parseFloat(E[g]);
8582
+ _ = _.times(isNaN(x) ? 0 : x);
8579
8583
  }
8580
8584
  s = s.plus(_);
8581
8585
  }
@@ -8695,11 +8699,11 @@ function loopGroupCols(t, e, r, n) {
8695
8699
  s.forEach((m, g) => {
8696
8700
  const _ = getSeparatorKey("key", m);
8697
8701
  l[_] || (l[_] = /* @__PURE__ */ new Set());
8698
- let $ = a[m].data.replace("col:", "").toUpperCase();
8702
+ let x = a[m].data.replace("col:", "").toUpperCase();
8699
8703
  if (g === 0)
8700
8704
  i.forEach((y) => {
8701
- if ($) {
8702
- let v = y[$];
8705
+ if (x) {
8706
+ let v = y[x];
8703
8707
  v || (v = "-");
8704
8708
  const C = getSeparatorKey("child", m, v), w = getSeparatorKey("data", v);
8705
8709
  l[C] ? l[C].push(y) : l[C] = [y], l[_].add(v), l[v] = [v], l[w] = [y];
@@ -8709,17 +8713,17 @@ function loopGroupCols(t, e, r, n) {
8709
8713
  let y = s[g - 1];
8710
8714
  const v = getSeparatorKey("key", y);
8711
8715
  Array.from(l[v]).forEach((w) => {
8712
- const b = getSeparatorKey("child", y, w);
8713
- let R = (l[b] || []).map((A) => {
8714
- if ($) {
8715
- let k = A[$];
8716
- k || (k = "-");
8717
- let F = !1;
8718
- const L = getSeparatorKey("child", m, w, k), O = getSeparatorKey(w, k), x = getSeparatorKey("data", O);
8719
- return l[L] ? l[L].push(A) : l[L] = [A], l[x] ? l[x].push(A) : l[x] = [A], l[_].has(O) || (F = !0), l[_].add(O), l[O] = l[w].concat([k]), F ? k : null;
8716
+ const $ = getSeparatorKey("child", y, w);
8717
+ let A = (l[$] || []).map((O) => {
8718
+ if (x) {
8719
+ let N = O[x];
8720
+ N || (N = "-");
8721
+ let U = !1;
8722
+ const L = getSeparatorKey("child", m, w, N), M = getSeparatorKey(w, N), T = getSeparatorKey("data", M);
8723
+ return l[L] ? l[L].push(O) : l[L] = [O], l[T] ? l[T].push(O) : l[T] = [O], l[_].has(M) || (U = !0), l[_].add(M), l[M] = l[w].concat([N]), U ? N : null;
8720
8724
  }
8721
- }).filter((A) => !!A);
8722
- l[b] = R;
8725
+ }).filter((O) => !!O);
8726
+ l[$] = A;
8723
8727
  });
8724
8728
  }
8725
8729
  });
@@ -8730,8 +8734,8 @@ function loopGroupCols(t, e, r, n) {
8730
8734
  if (c !== void 0) {
8731
8735
  const m = a[c], g = { order: m.groupSortOrder, numeric: m.groupSortNumeric };
8732
8736
  s.forEach((_) => {
8733
- const E = getSeparatorKey("key", _), $ = Array.from(l[E]);
8734
- $.length > 1 && $.sort(createGroupSortComparator(g)), l[E] = new Set($);
8737
+ const E = getSeparatorKey("key", _), x = Array.from(l[E]);
8738
+ x.length > 1 && x.sort(createGroupSortComparator(g)), l[E] = new Set(x);
8735
8739
  });
8736
8740
  }
8737
8741
  let u = 1, f = Math.max(...s), d = Math.min(...s);
@@ -8740,45 +8744,45 @@ function loopGroupCols(t, e, r, n) {
8740
8744
  const m = getSeparatorKey("key", f);
8741
8745
  p ? u = l[m].size : u = Array.from(l[m]).reduce((g, _) => {
8742
8746
  const E = getSeparatorKey("child", f, _);
8743
- let $ = l[E];
8744
- return g + $.length;
8747
+ let x = l[E];
8748
+ return g + x.length;
8745
8749
  }, 0);
8746
8750
  } else
8747
8751
  u = i.length;
8748
8752
  for (let m = 0; m < a.length; m++) {
8749
- const g = a[m], _ = t.findIndex(($) => $.index === o.index);
8753
+ const g = a[m], _ = t.findIndex((x) => x.index === o.index);
8750
8754
  if (m === 0) {
8751
- const $ = {
8755
+ const x = {
8752
8756
  ...o,
8753
8757
  loop: !1
8754
- }, y = Array.from({ length: u }, () => cloneDeep($));
8758
+ }, y = Array.from({ length: u }, () => cloneDeep(x));
8755
8759
  t.splice(_, 1, ...y);
8756
8760
  }
8757
8761
  let E = r[g.row];
8758
8762
  if (E && Array.isArray(E)) {
8759
- let $ = [];
8763
+ let x = [];
8760
8764
  if (s.includes(m)) {
8761
8765
  const y = getSeparatorKey("key", g.row);
8762
8766
  Array.from(l[y]).forEach((C, w) => {
8763
- const b = p && m === f ? 1 : getGroupMinChildrenLength(l, C, f, p, s), N = l[C], R = N[N.length - 1], A = getSeparatorKey("data", C), k = l[A];
8764
- let F = {
8767
+ const $ = p && m === f ? 1 : getGroupMinChildrenLength(l, C, f, p, s), I = l[C], A = I[I.length - 1], O = getSeparatorKey("data", C), N = l[O];
8768
+ let U = {
8765
8769
  ...g,
8766
- text: R,
8767
- colSpan: b,
8768
- colData: k
8770
+ text: A,
8771
+ colSpan: $,
8772
+ colData: N
8769
8773
  };
8770
- if ($.push(F), b > 1) {
8774
+ if (x.push(U), $ > 1) {
8771
8775
  let L = {
8772
8776
  ...g,
8773
- text: R,
8777
+ text: A,
8774
8778
  type: "",
8775
8779
  colSpan: 0,
8776
8780
  rowSpan: 0
8777
8781
  };
8778
- for (let O = 0; O < b - 1; O++)
8779
- $.push(L);
8782
+ for (let M = 0; M < $ - 1; M++)
8783
+ x.push(L);
8780
8784
  }
8781
- }), E.splice(g.col, 1, ...$);
8785
+ }), E.splice(g.col, 1, ...x);
8782
8786
  } else {
8783
8787
  if (m > d && m < f) {
8784
8788
  let y = findMaxLessThan(s, m);
@@ -8800,34 +8804,34 @@ function loopGroupCols(t, e, r, n) {
8800
8804
  const y = getSeparatorKey("key", f);
8801
8805
  let v = l[y] ? Array.from(l[y]) : [], C = g.data.replace("col:", "").toUpperCase();
8802
8806
  if (g.isRowColCombine) {
8803
- let w = s.map((N) => a[N].data.replace("col:", "").toUpperCase()), b = [];
8804
- v.forEach((N, R) => {
8805
- let A = {
8807
+ let w = s.map((I) => a[I].data.replace("col:", "").toUpperCase()), $ = [];
8808
+ v.forEach((I, A) => {
8809
+ let O = {
8806
8810
  ...g,
8807
8811
  combineKeys: w,
8808
- combineValues: l[N],
8809
- colGroupIndex: R
8812
+ combineValues: l[I],
8813
+ colGroupIndex: A
8810
8814
  };
8811
- b.push(A);
8812
- }), E.splice(g.col, 1, ...b);
8815
+ $.push(O);
8816
+ }), E.splice(g.col, 1, ...$);
8813
8817
  } else if (v.length)
8814
- v.forEach((w, b) => {
8815
- let N = [];
8816
- const R = getSeparatorKey("data", w);
8817
- l[R].forEach((k) => {
8818
- let F = {
8818
+ v.forEach((w, $) => {
8819
+ let I = [];
8820
+ const A = getSeparatorKey("data", w);
8821
+ l[A].forEach((N) => {
8822
+ let U = {
8819
8823
  ...g
8820
8824
  };
8821
- delete F.combineKeys, delete F.combineValues, delete F.isRowColCombine, k[C] !== void 0 ? (F.rawData = k[C], F.colData = k) : F.rawData = "", N.push(F);
8822
- }), E.splice(g.col, 1, ...N);
8825
+ delete U.combineKeys, delete U.combineValues, delete U.isRowColCombine, N[C] !== void 0 ? (U.rawData = N[C], U.colData = N) : U.rawData = "", I.push(U);
8826
+ }), E.splice(g.col, 1, ...I);
8823
8827
  });
8824
8828
  else {
8825
8829
  let w = [];
8826
- i.forEach((b) => {
8827
- let N = {
8830
+ i.forEach(($) => {
8831
+ let I = {
8828
8832
  ...g
8829
8833
  };
8830
- delete N.combineKeys, delete N.combineValues, delete N.isRowColCombine, b[C] !== void 0 ? (N.rawData = b[C], N.colData = b) : N.rawData = "", w.push(N);
8834
+ delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, $[C] !== void 0 ? (I.rawData = $[C], I.colData = $) : I.rawData = "", w.push(I);
8831
8835
  }), E.splice(g.col, 1, ...w);
8832
8836
  }
8833
8837
  } else if (g.type === CellType.FUN && p && g.colSpan !== 0) {
@@ -8845,8 +8849,8 @@ function loopGroupCols(t, e, r, n) {
8845
8849
  colData: i[0]
8846
8850
  };
8847
8851
  if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
8848
- let [w, b] = g.mergeTarget, N = r.reduce((R, A) => R.concat(A), []).filter((R) => R.row === w && R.col === b)[0];
8849
- N && (N.colSpan += u - 1);
8852
+ let [w, $] = g.mergeTarget, I = r.reduce((A, O) => A.concat(O), []).filter((A) => A.row === w && A.col === $)[0];
8853
+ I && (I.colSpan += u - 1);
8850
8854
  } else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
8851
8855
  const v = {
8852
8856
  ...g,
@@ -8967,11 +8971,11 @@ function getGroupData(t, e, r) {
8967
8971
  const m = getSeparatorKey("child", u, p);
8968
8972
  let _ = (n[m] || []).map((E) => {
8969
8973
  if (c) {
8970
- let $ = E[c];
8971
- $ || ($ = "[" + c + "]");
8974
+ let x = E[c];
8975
+ x || (x = "[" + c + "]");
8972
8976
  let y = !1;
8973
- const v = getSeparatorKey("child", i, p, $), C = getSeparatorKey(p, $), w = getSeparatorKey("data", C);
8974
- return n[v] ? n[v].push(E) : n[v] = [E], n[w] ? n[w].push(E) : n[w] = [E], n[s].has(C) || (y = !0), n[s].add(C), n[C] = n[p].concat([$]), y ? $ : null;
8977
+ const v = getSeparatorKey("child", i, p, x), C = getSeparatorKey(p, x), w = getSeparatorKey("data", C);
8978
+ return n[v] ? n[v].push(E) : n[v] = [E], n[w] ? n[w].push(E) : n[w] = [E], n[s].has(C) || (y = !0), n[s].add(C), n[C] = n[p].concat([x]), y ? x : null;
8975
8979
  }
8976
8980
  }).filter((E) => !!E);
8977
8981
  n[m] = _;
@@ -9023,56 +9027,56 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9023
9027
  let d = -1, p = null;
9024
9028
  const m = [], g = new Array(o).fill(!1);
9025
9029
  return t.forEach((_, E) => {
9026
- let $ = u[E];
9030
+ let x = u[E];
9027
9031
  if (e.includes(_.col)) {
9028
9032
  const y = getSeparatorKey("key", _.col);
9029
9033
  let v = Array.from(n[y]), C = d;
9030
9034
  const w = e.indexOf(_.col);
9031
- v.forEach((b, N) => {
9032
- let R;
9033
- E === s && (i || a) ? R = 1 : R = getGroupMinChildrenLength(n, b, s, a, i);
9034
- const A = n[b], k = A[A.length - 1], F = getSeparatorKey("data", b);
9035
- n[F];
9035
+ v.forEach(($, I) => {
9036
+ let A;
9037
+ E === s && (i || a) ? A = 1 : A = getGroupMinChildrenLength(n, $, s, a, i);
9038
+ const O = n[$], N = O[O.length - 1], U = getSeparatorKey("data", $);
9039
+ n[U];
9036
9040
  let L = {
9037
9041
  ..._,
9038
9042
  text: "",
9039
- index: N,
9040
- rowSpan: R,
9041
- rawData: formatGroupText(k),
9043
+ index: I,
9044
+ rowSpan: A,
9045
+ rawData: formatGroupText(N),
9042
9046
  groupLevel: w,
9043
- groupIndices: N,
9047
+ groupIndices: I,
9044
9048
  groupChildIndex: 0,
9045
9049
  computedType: ComputedType.loopRow
9046
9050
  };
9047
- $.push(L);
9048
- let O = {
9051
+ x.push(L);
9052
+ let M = {
9049
9053
  ..._,
9050
9054
  text: "",
9051
- rawData: formatGroupText(k),
9055
+ rawData: formatGroupText(N),
9052
9056
  colSpan: 0,
9053
9057
  rowSpan: 0,
9054
9058
  groupLevel: w,
9055
- groupIndices: N,
9059
+ groupIndices: I,
9056
9060
  computedType: ComputedType.loopRow,
9057
9061
  mergeTarget: [L.row, L.col]
9058
9062
  };
9059
- for (let x = 0; x < R - 1; x++) {
9060
- let D = cloneDeep(O);
9061
- D.index = C + x + 1, D.groupChildIndex = x + 1, $.push(D);
9063
+ for (let T = 0; T < A - 1; T++) {
9064
+ let b = cloneDeep(M);
9065
+ b.index = C + T + 1, b.groupChildIndex = T + 1, x.push(b);
9062
9066
  }
9063
- if (g[E] = !0, C += R, L.loopGroupRowIndex !== void 0 && L.loopGroupRowIndex !== "" && !isNaN(L.loopGroupRowIndex)) {
9064
- let x = cloneDeep(l[L.loopGroupRowIndex]), D = cloneDeep(c[L.loopGroupRowIndex]).map((S) => (S.type === CellType.FUN && S.fun && (S.groupIndices = N, S.groupLevel = w, S.computedType = ComputedType.loopGroup), S)), T = 0;
9067
+ if (g[E] = !0, C += A, L.loopGroupRowIndex !== void 0 && L.loopGroupRowIndex !== "" && !isNaN(L.loopGroupRowIndex)) {
9068
+ let T = cloneDeep(l[L.loopGroupRowIndex]), b = cloneDeep(c[L.loopGroupRowIndex]).map((S) => (S.type === CellType.FUN && S.fun && (S.groupIndices = I, S.groupLevel = w, S.computedType = ComputedType.loopGroup), S)), D = 0;
9065
9069
  if (w >= 0) {
9066
9070
  let S = w;
9067
9071
  for (; S >= 0; ) {
9068
- let I = e[S], j = u[I][C];
9069
- j && j.groupIndices !== void 0 && !isNaN(j.groupIndices) && (T = T + j.groupIndices), S--;
9072
+ let R = e[S], G = u[R][C];
9073
+ G && G.groupIndices !== void 0 && !isNaN(G.groupIndices) && (D = D + G.groupIndices), S--;
9070
9074
  }
9071
9075
  }
9072
- f.set(`${N}:${w}:${C}`, {
9073
- row: x,
9074
- cells: D,
9075
- removeCount: T
9076
+ f.set(`${I}:${w}:${C}`, {
9077
+ row: T,
9078
+ cells: b,
9079
+ removeCount: D
9076
9080
  });
9077
9081
  }
9078
9082
  });
@@ -9081,38 +9085,38 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9081
9085
  if (_.isRowColCombine) {
9082
9086
  const v = getSeparatorKey("key", s);
9083
9087
  let C = n[v] ? Array.from(n[v]) : [];
9084
- C.length ? C.forEach((w, b) => {
9085
- const N = getSeparatorKey("child", s, w);
9086
- let R = n[N], A = _.combineKeys ? _.combineKeys.map((L, O) => {
9087
- const x = _.combineValues ? _.combineValues[O] : void 0;
9088
+ C.length ? C.forEach((w, $) => {
9089
+ const I = getSeparatorKey("child", s, w);
9090
+ let A = n[I], O = _.combineKeys ? _.combineKeys.map((L, M) => {
9091
+ const T = _.combineValues ? _.combineValues[M] : void 0;
9088
9092
  return {
9089
9093
  key: L,
9090
- val: x
9094
+ val: T
9091
9095
  };
9092
9096
  }) : [];
9093
- const k = R.filter((L) => A.every((O) => L[O.key] === O.val));
9094
- let F = {
9097
+ const N = A.filter((L) => O.every((M) => L[M.key] === M.val));
9098
+ let U = {
9095
9099
  ..._,
9096
- index: b
9100
+ index: $
9097
9101
  };
9098
- if (delete F.combineKeys, delete F.combineValues, delete F.isRowColCombine, k && k.length) {
9099
- const L = k.map((O) => y ? O[y] : void 0);
9100
- F.rawData = _.mergedValueAggregation ? aggregateMergedValues(L, _.mergedValueAggregation) : k[0][y], F.rowData = k[0];
9102
+ if (delete U.combineKeys, delete U.combineValues, delete U.isRowColCombine, N && N.length) {
9103
+ const L = N.map((M) => y ? M[y] : void 0);
9104
+ U.rawData = _.mergedValueAggregation ? aggregateMergedValues(L, _.mergedValueAggregation) : N[0][y], U.rowData = N[0];
9101
9105
  } else
9102
- F.rawData = "", F.rowData = {};
9103
- $.push(F);
9104
- }) : r.forEach((w, b) => {
9105
- let R = (_.combineKeys ? _.combineKeys.map((k, F) => {
9106
- const L = _.combineValues ? _.combineValues[F] : void 0;
9106
+ U.rawData = "", U.rowData = {};
9107
+ x.push(U);
9108
+ }) : r.forEach((w, $) => {
9109
+ let A = (_.combineKeys ? _.combineKeys.map((N, U) => {
9110
+ const L = _.combineValues ? _.combineValues[U] : void 0;
9107
9111
  return {
9108
- key: k,
9112
+ key: N,
9109
9113
  val: L
9110
9114
  };
9111
- }) : []).every((k) => w[k.key] === k.val), A = {
9115
+ }) : []).every((N) => w[N.key] === N.val), O = {
9112
9116
  ..._,
9113
- index: b
9117
+ index: $
9114
9118
  };
9115
- delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, R ? (A.rawData = y ? w[y] : "", A.rowData = w) : (A.rawData = "", A.rowData = w), A.type === CellType.FUN && A.fun && (A.computedType = ComputedType.loopRow), $.push(A);
9119
+ delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, A ? (O.rawData = y ? w[y] : "", O.rowData = w) : (O.rawData = "", O.rowData = w), O.type === CellType.FUN && O.fun && (O.computedType = ComputedType.loopRow), x.push(O);
9116
9120
  });
9117
9121
  } else if (e.length === 0)
9118
9122
  r.forEach((v, C) => {
@@ -9120,60 +9124,60 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9120
9124
  index: C,
9121
9125
  ..._
9122
9126
  };
9123
- delete w.combineKeys, delete w.combineValues, delete w.isRowColCombine, y && v[y] !== void 0 ? w.rawData = v[y] : w.rawData = "", w.rowData = v, w.computedType = ComputedType.loopRow, $.push(w);
9127
+ delete w.combineKeys, delete w.combineValues, delete w.isRowColCombine, y && v[y] !== void 0 ? w.rawData = v[y] : w.rawData = "", w.rowData = v, w.computedType = ComputedType.loopRow, x.push(w);
9124
9128
  });
9125
9129
  else {
9126
9130
  const v = getSeparatorKey("key", s);
9127
9131
  let C = n[v] ? Array.from(n[v]) : [];
9128
9132
  if (C.length === 0) {
9129
- r.forEach((b, N) => {
9130
- let R = {
9131
- index: N,
9133
+ r.forEach(($, I) => {
9134
+ let A = {
9135
+ index: I,
9132
9136
  ..._
9133
9137
  };
9134
- delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine, y && b[y] !== void 0 ? R.rawData = b[y] : R.rawData = "", R.rowData = b, R.computedType = ComputedType.loopRow, $.push(R);
9138
+ delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, y && $[y] !== void 0 ? A.rawData = $[y] : A.rawData = "", A.rowData = $, A.computedType = ComputedType.loopRow, x.push(A);
9135
9139
  });
9136
9140
  return;
9137
9141
  }
9138
9142
  const w = [];
9139
- if (C.forEach((b, N) => {
9143
+ if (C.forEach(($, I) => {
9140
9144
  if (a) {
9141
- const R = getSeparatorKey("child", s, b);
9142
- let A = n[R] || [];
9143
- w.push(A);
9145
+ const A = getSeparatorKey("child", s, $);
9146
+ let O = n[A] || [];
9147
+ w.push(O);
9144
9148
  } else {
9145
- const R = getSeparatorKey("child", s, b);
9146
- let A = n[R] || [];
9147
- const k = i ? A.slice(0, 1) : A;
9148
- A.length > 0 ? k.forEach((F) => {
9149
+ const A = getSeparatorKey("child", s, $);
9150
+ let O = n[A] || [];
9151
+ const N = i ? O.slice(0, 1) : O;
9152
+ O.length > 0 ? N.forEach((U) => {
9149
9153
  let L = {
9150
- index: N,
9154
+ index: I,
9151
9155
  ..._,
9152
9156
  // 交叉表:函数格按当前行组聚合裂变列实例(供 jsep 按 groupIndices 过滤取值)
9153
9157
  isCrossAggregate: i
9154
9158
  };
9155
- delete L.combineKeys, delete L.combineValues, delete L.isRowColCombine, y && F && F[y] !== void 0 ? L.rawData = F[y] : L.rawData = "", L.rowData = F, L.computedType = ComputedType.loopRow, $.push(L);
9156
- }) : $.push({
9159
+ delete L.combineKeys, delete L.combineValues, delete L.isRowColCombine, y && U && U[y] !== void 0 ? L.rawData = U[y] : L.rawData = "", L.rowData = U, L.computedType = ComputedType.loopRow, x.push(L);
9160
+ }) : x.push({
9157
9161
  index: 0,
9158
9162
  ..._,
9159
9163
  isCrossAggregate: i
9160
9164
  });
9161
9165
  }
9162
9166
  }), a) {
9163
- const b = Math.max(...w.map((R) => R.length));
9167
+ const $ = Math.max(...w.map((A) => A.length));
9164
9168
  p || (p = {
9165
- count: b,
9169
+ count: $,
9166
9170
  row: _.row,
9167
9171
  index: E
9168
9172
  });
9169
- const N = {
9173
+ const I = {
9170
9174
  colIndex: E,
9171
- maxCount: b,
9175
+ maxCount: $,
9172
9176
  groupColumnLoopItems: w,
9173
9177
  dataKey: _.data ? _.data.replace("row:", "").toUpperCase() : void 0,
9174
9178
  cell: _
9175
9179
  };
9176
- m.push(N);
9180
+ m.push(I);
9177
9181
  }
9178
9182
  }
9179
9183
  } else if (_.isMergeInLoop !== !1) {
@@ -9183,8 +9187,8 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9183
9187
  index: 0
9184
9188
  };
9185
9189
  if (_.rowSpan === 0 && _.mergeTarget && _.mergeTarget.length === 2) {
9186
- let [b, N] = _.mergeTarget, R = c.reduce((A, k) => A.concat(k), []).filter((A) => A.row === b && A.col === N)[0];
9187
- R && (R.rowSpan += o - 1);
9190
+ let [$, I] = _.mergeTarget, A = c.reduce((O, N) => O.concat(N), []).filter((O) => O.row === $ && O.col === I)[0];
9191
+ A && (A.rowSpan += o - 1);
9188
9192
  } else
9189
9193
  v.rowSpan += o - 1;
9190
9194
  const C = {
@@ -9195,23 +9199,23 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9195
9199
  };
9196
9200
  delete v.isRowColCombine;
9197
9201
  let w = Array.from({ length: o - 1 }, () => cloneDeep(C));
9198
- $.push(v, ...w);
9202
+ x.push(v, ...w);
9199
9203
  } else if ((i || a) && e.length > 0) {
9200
9204
  const v = getSeparatorKey("key", s);
9201
- (n[v] ? Array.from(n[v]) : []).forEach((w, b) => {
9202
- const N = getSeparatorKey("data", w), R = n[N];
9203
- $.push({
9204
- index: b,
9205
+ (n[v] ? Array.from(n[v]) : []).forEach((w, $) => {
9206
+ const I = getSeparatorKey("data", w), A = n[I];
9207
+ x.push({
9208
+ index: $,
9205
9209
  ..._,
9206
9210
  computedType: ComputedType.loopRow,
9207
9211
  rowSpan: 1,
9208
9212
  colSpan: 1,
9209
- rowData: R ? R[0] : void 0
9213
+ rowData: A ? A[0] : void 0
9210
9214
  });
9211
9215
  });
9212
9216
  } else if (e.length > 0)
9213
9217
  for (let v = 0; v < o; v++)
9214
- $.push({
9218
+ x.push({
9215
9219
  index: v,
9216
9220
  ..._,
9217
9221
  computedType: ComputedType.loopRow,
@@ -9221,7 +9225,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9221
9225
  });
9222
9226
  else
9223
9227
  r.forEach((v, C) => {
9224
- $.push({
9228
+ x.push({
9225
9229
  index: C,
9226
9230
  ..._,
9227
9231
  computedType: ComputedType.loopRow,
@@ -9230,16 +9234,16 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9230
9234
  rowData: v
9231
9235
  });
9232
9236
  });
9233
- }), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: E, cell: $, groupColumnLoopItems: y, dataKey: v }) => {
9237
+ }), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: E, cell: x, groupColumnLoopItems: y, dataKey: v }) => {
9234
9238
  for (let C = 0; C < E; C++) {
9235
9239
  const w = [];
9236
- y.forEach((b, N) => {
9237
- const R = b[C];
9238
- let A = {
9239
- index: N,
9240
- ...$
9240
+ y.forEach(($, I) => {
9241
+ const A = $[C];
9242
+ let O = {
9243
+ index: I,
9244
+ ...x
9241
9245
  };
9242
- delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, v && R && R[v] !== void 0 ? (A.rawData = R[v], A.rowData = R) : (A.rawData = "", A.rowData = R || {}), A.computedType = ComputedType.loopRow, w.push(A);
9246
+ delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, v && A && A[v] !== void 0 ? (O.rawData = A[v], O.rowData = A) : (O.rawData = "", O.rowData = A || {}), O.computedType = ComputedType.loopRow, w.push(O);
9243
9247
  }), C === 0 ? u[_] = w : u.splice(_ + C, 0, w);
9244
9248
  }
9245
9249
  }), {
@@ -9253,69 +9257,69 @@ function loopGroupRows(t, e, r, n, o) {
9253
9257
  let s = e[a], l = o[s.data];
9254
9258
  if (!l || !l.length)
9255
9259
  continue;
9256
- let c = t.findIndex((b) => b.index === s.index), u = r[c], f = findGroupIndexs(u), d = getGroupData(f, u, l);
9260
+ let c = t.findIndex(($) => $.index === s.index), u = r[c], f = findGroupIndexs(u), d = getGroupData(f, u, l);
9257
9261
  const { groupLen: p, hasRowColCombine: m, hasGroupColumnLoop: g, maxGroupIndex: _ } = analyzeGroupStructure(u, f, l, d);
9258
9262
  if (m && g)
9259
9263
  throw new Error("不能同时设置交叉和分组列循环");
9260
9264
  const E = {
9261
9265
  ...s,
9262
9266
  loop: !1
9263
- }, $ = [], { rowBaseCols: y, loopGroupRows: v, groupColumnLoopData: C } = generateRowStructure(u, f, l, d, p, m, g, _, t, r);
9267
+ }, x = [], { rowBaseCols: y, loopGroupRows: v, groupColumnLoopData: C } = generateRowStructure(u, f, l, d, p, m, g, _, t, r);
9264
9268
  let w = transpose(y);
9265
9269
  if (w.forEach(() => {
9266
- $.push(cloneDeep(E));
9267
- }), v.forEach(({ row: b, cells: N, removeCount: R }, A) => {
9268
- let [k, F, L] = A.split(":").map((T) => parseInt(T));
9269
- b.isLoopGroupComputed = !1;
9270
- const O = L + R;
9271
- let x = w[O];
9272
- N = N.map((T, S) => {
9273
- let I = x[S];
9274
- if (S < F) {
9275
- let B = [];
9276
- w.forEach((Z, Q) => {
9277
- Q <= O && Z.forEach((ee, ie) => {
9278
- ie === S && ee.rowSpan >= 1 && ["", "field"].includes(ee.type) && B.push(Q);
9270
+ x.push(cloneDeep(E));
9271
+ }), v.forEach(({ row: $, cells: I, removeCount: A }, O) => {
9272
+ let [N, U, L] = O.split(":").map((D) => parseInt(D));
9273
+ $.isLoopGroupComputed = !1;
9274
+ const M = L + A;
9275
+ let T = w[M];
9276
+ I = I.map((D, S) => {
9277
+ let R = T[S];
9278
+ if (S < U) {
9279
+ let k = [];
9280
+ w.forEach((ee, J) => {
9281
+ J <= M && ee.forEach((ne, ae) => {
9282
+ ae === S && ne.rowSpan >= 1 && ["", "field"].includes(ne.type) && k.push(J);
9279
9283
  });
9280
9284
  });
9281
- let j = Math.max(...B), X = w[j][S];
9282
- X && (X.rowSpan += 1, T.mergeTarget = [X.row, X.col]), T.rowSpan = 0, T.colSpan = 0;
9283
- } else if (I && I.type === CellType.TEXT) {
9284
- let B = w[0][S];
9285
- B.rowSpan += 1, T.rowSpan = 0, T.colSpan = 0, T.mergeTarget = [B.row, B.col];
9285
+ let G = Math.max(...k), W = w[G][S];
9286
+ W && (W.rowSpan += 1, D.mergeTarget = [W.row, W.col]), D.rowSpan = 0, D.colSpan = 0;
9287
+ } else if (R && R.type === CellType.TEXT) {
9288
+ let k = w[0][S];
9289
+ k.rowSpan += 1, D.rowSpan = 0, D.colSpan = 0, D.mergeTarget = [k.row, k.col];
9286
9290
  }
9287
- return T.type === CellType.FUN && T.fun && (T.computedType = ComputedType.loopGroup), T.isGroup = I ? !!I.isGroup : !1, T.groupIndices = I ? I.groupIndices : !1, T.linkedMergeCell = I ? !!I.linkedMergeCell : !1, T.linkedColIndex = I ? I.linkedColIndex : { rowSpan: 1, colSpan: 1 }, T.isLoopGroupComputedCell = !0, T;
9291
+ return D.type === CellType.FUN && D.fun && (D.computedType = ComputedType.loopGroup), D.isGroup = R ? !!R.isGroup : !1, D.groupIndices = R ? R.groupIndices : !1, D.linkedMergeCell = R ? !!R.linkedMergeCell : !1, D.linkedColIndex = R ? R.linkedColIndex : { rowSpan: 1, colSpan: 1 }, D.isLoopGroupComputedCell = !0, D;
9288
9292
  });
9289
- const D = O + 1;
9290
- $.splice(D, 0, b), w.splice(D, 0, N);
9291
- }), w = mergeSameCells(w), w.forEach((b, N) => {
9292
- let R = [];
9293
- b.forEach((A) => {
9294
- A && A.groupIndices !== void 0 && !isNaN(A.groupIndices) && R.push(A.groupIndices);
9295
- }), R.length > 0 && b.forEach((A) => {
9296
- A && (A.groupIndices = R);
9293
+ const b = M + 1;
9294
+ x.splice(b, 0, $), w.splice(b, 0, I);
9295
+ }), w = mergeSameCells(w), w.forEach(($, I) => {
9296
+ let A = [];
9297
+ $.forEach((O) => {
9298
+ O && O.groupIndices !== void 0 && !isNaN(O.groupIndices) && A.push(O.groupIndices);
9299
+ }), A.length > 0 && $.forEach((O) => {
9300
+ O && (O.groupIndices = A);
9297
9301
  });
9298
- }), t.splice(c, 1, ...$), r.splice(c, 1, ...w), C) {
9299
- const { index: b, count: N } = C, R = n[b], A = [];
9300
- for (let F = 0; F < N; F++)
9301
- A.push(cloneDeep(R));
9302
- n.splice(b, 1, ...A);
9303
- for (let F = 0; F < c; F++) {
9304
- const L = r[F], O = [];
9305
- for (let x = 0; x < N; x++) {
9306
- const D = cloneDeep(L[b]);
9307
- x === 0 ? D.colSpan = N : (D.colSpan = 0, D.mergeTarget = [D.row, b]), O.push(D);
9302
+ }), t.splice(c, 1, ...x), r.splice(c, 1, ...w), C) {
9303
+ const { index: $, count: I } = C, A = n[$], O = [];
9304
+ for (let U = 0; U < I; U++)
9305
+ O.push(cloneDeep(A));
9306
+ n.splice($, 1, ...O);
9307
+ for (let U = 0; U < c; U++) {
9308
+ const L = r[U], M = [];
9309
+ for (let T = 0; T < I; T++) {
9310
+ const b = cloneDeep(L[$]);
9311
+ T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, $]), M.push(b);
9308
9312
  }
9309
- L.splice(b, L.length - b, ...O);
9313
+ L.splice($, L.length - $, ...M);
9310
9314
  }
9311
- const k = c + w.length;
9312
- for (let F = k; F < r.length; F++) {
9313
- const L = r[F], O = [];
9314
- for (let x = 0; x < N; x++) {
9315
- const D = cloneDeep(L[b]);
9316
- x === 0 ? D.colSpan = N : (D.colSpan = 0, D.mergeTarget = [D.row, b]), O.push(D);
9315
+ const N = c + w.length;
9316
+ for (let U = N; U < r.length; U++) {
9317
+ const L = r[U], M = [];
9318
+ for (let T = 0; T < I; T++) {
9319
+ const b = cloneDeep(L[$]);
9320
+ T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, $]), M.push(b);
9317
9321
  }
9318
- L.splice(b, L.length - b, ...O);
9322
+ L.splice($, L.length - $, ...M);
9319
9323
  }
9320
9324
  }
9321
9325
  }
@@ -9466,7 +9470,7 @@ function formatText(t, e) {
9466
9470
  }
9467
9471
  function formatNumber(t, e) {
9468
9472
  let r = Number(t);
9469
- return e.decimal && (r = parseFloat(r.toFixed(parseInt(e.decimal)))), r;
9473
+ return e.decimal && (r = parseFloat(new Decimal(r).toFixed(parseInt(e.decimal)))), r;
9470
9474
  }
9471
9475
  function formatDateTime(t, e) {
9472
9476
  try {
@@ -9657,10 +9661,10 @@ function buildPageDom(t, e, r, n) {
9657
9661
  const { rowConfig: o, colConfig: i, config: a, fixedRows: s, watermark: l, header: c, footer: u, pageNumber: f, totalPages: d, title: p } = t, m = document.createElement("div");
9658
9662
  m.className = "print-page-wrapper", l != null && l.enabled && m.appendChild(renderWatermarkLayer(l, r, n)), c != null && c.enabled && m.appendChild(renderPrintArea(c, { page: f, total: d, title: p }, "center"));
9659
9663
  const g = [], _ = [];
9660
- for (const $ of s)
9661
- g.push({ ...$.row }), _.push(cloneDeep(a[$.index]));
9662
- for (const $ of e)
9663
- o[$].isFixed || (g.push({ ...o[$] }), _.push(cloneDeep(a[$])));
9664
+ for (const x of s)
9665
+ g.push({ ...x.row }), _.push(cloneDeep(a[x.index]));
9666
+ for (const x of e)
9667
+ o[x].isFixed || (g.push({ ...o[x] }), _.push(cloneDeep(a[x])));
9664
9668
  const E = renderReportByDomForPrint(g, i, _, t.themeColor, t.theme);
9665
9669
  return m.appendChild(E), u != null && u.enabled && m.appendChild(renderPrintArea(u, { page: f, total: d, title: p }, "center")), m;
9666
9670
  }
@@ -9852,8 +9856,8 @@ async function paginate(t, e, r, n) {
9852
9856
  }
9853
9857
  const _ = createReportSplitState(g.reportConfig, g.themeColor, { ...s, theme: g.theme });
9854
9858
  await m();
9855
- const E = o - u, $ = splitNextReportPage(_, E, a, o);
9856
- $ ? (c.push({ type: "report", dom: $.dom }), u += $.height, _.currentRowIdx < _.visibleRows.length && d.push(_)) : (c.length > 0 && await p(), d.push(_));
9859
+ const E = o - u, x = splitNextReportPage(_, E, a, o);
9860
+ x ? (c.push({ type: "report", dom: x.dom }), u += x.height, _.currentRowIdx < _.visibleRows.length && d.push(_)) : (c.length > 0 && await p(), d.push(_));
9857
9861
  }
9858
9862
  await m(), await p();
9859
9863
  } else {
@@ -9865,11 +9869,11 @@ async function paginate(t, e, r, n) {
9865
9869
  continue;
9866
9870
  }
9867
9871
  if (E.kind === "image") {
9868
- let w = E.width, b = E.height;
9869
- E.stretch && w > 0 && (b = Math.round(b * (a / w)), w = a), _.push({ type: "image", dom: createImageDom(E.src, w, b) });
9872
+ let w = E.width, $ = E.height;
9873
+ E.stretch && w > 0 && ($ = Math.round($ * (a / w)), w = a), _.push({ type: "image", dom: createImageDom(E.src, w, $) });
9870
9874
  continue;
9871
9875
  }
9872
- const { rowConfig: $, colConfig: y, config: v } = E.reportConfig, C = renderReportByDomForPrint($, y, v, E.themeColor, E.theme);
9876
+ const { rowConfig: x, colConfig: y, config: v } = E.reportConfig, C = renderReportByDomForPrint(x, y, v, E.themeColor, E.theme);
9873
9877
  _.push({ type: "report", dom: C });
9874
9878
  }
9875
9879
  l.push({ items: _ });
@@ -10017,7 +10021,7 @@ function parseShiftConfig(t) {
10017
10021
  }), r;
10018
10022
  }
10019
10023
  function getDateRanges() {
10020
- const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), f = e.endOf("quarter").format(t), d = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), E = e.subtract(1, "year").endOf("year").format(t), $ = e.format(t), y = e.subtract(2, "day").format(t), v = e.subtract(3, "day").format(t), C = e.subtract(7, "day").format(t), w = e.subtract(15, "day").format(t), b = e.subtract(30, "day").format(t), N = e.subtract(2, "week").startOf("week").format(t), R = e.subtract(2, "month").format(t), A = e.subtract(3, "month").format(t), k = e.subtract(6, "month").format(t), F = e.subtract(1, "year").startOf("year").format(t), L = e.subtract(2, "year").startOf("year").format(t), O = e.subtract(3, "year").format(t), x = e.subtract(5, "year").format(t);
10024
+ const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), f = e.endOf("quarter").format(t), d = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), E = e.subtract(1, "year").endOf("year").format(t), x = e.format(t), y = e.subtract(2, "day").format(t), v = e.subtract(3, "day").format(t), C = e.subtract(7, "day").format(t), w = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), I = e.subtract(2, "week").startOf("week").format(t), A = e.subtract(2, "month").format(t), O = e.subtract(3, "month").format(t), N = e.subtract(6, "month").format(t), U = e.subtract(1, "year").startOf("year").format(t), L = e.subtract(2, "year").startOf("year").format(t), M = e.subtract(3, "year").format(t), T = e.subtract(5, "year").format(t);
10021
10025
  return {
10022
10026
  dateFormat: t,
10023
10027
  thisDayStart: r,
@@ -10036,20 +10040,20 @@ function getDateRanges() {
10036
10040
  thisYearEnd: g,
10037
10041
  lastYearStart: _,
10038
10042
  lastYearEnd: E,
10039
- now: $,
10043
+ now: x,
10040
10044
  twoDay: y,
10041
10045
  threeDay: v,
10042
10046
  sevenDay: C,
10043
10047
  fifteenDay: w,
10044
- thirtyDay: b,
10045
- twoWeek: N,
10046
- twoMonth: R,
10047
- threeMonth: A,
10048
- sixMonth: k,
10049
- oneYear: F,
10048
+ thirtyDay: $,
10049
+ twoWeek: I,
10050
+ twoMonth: A,
10051
+ threeMonth: O,
10052
+ sixMonth: N,
10053
+ oneYear: U,
10050
10054
  twoYear: L,
10051
- threeYear: O,
10052
- fiveYear: x
10055
+ threeYear: M,
10056
+ fiveYear: T
10053
10057
  };
10054
10058
  }
10055
10059
  function componentTransition(t, e = "date") {
@@ -10109,36 +10113,36 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10109
10113
  },
10110
10114
  emits: ["change", "addCell"],
10111
10115
  setup(t, { expose: e, emit: r }) {
10112
- const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: f, lastMonthStart: d, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: E, lastYearStart: $, lastYearEnd: y, now: v, twoDay: C, threeDay: w, sevenDay: b, fifteenDay: N, thirtyDay: R, twoWeek: A, twoMonth: k, threeMonth: F, sixMonth: L, oneYear: O, twoYear: x, threeYear: D, fiveYear: T } = getDateRanges(), S = ref([]), I = ref([]), B = computed(() => {
10113
- let M = reactive({});
10114
- return I.value.forEach((H) => {
10115
- M[H.columnName] = H;
10116
- }), M;
10116
+ const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: f, lastMonthStart: d, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: E, lastYearStart: x, lastYearEnd: y, now: v, twoDay: C, threeDay: w, sevenDay: $, fifteenDay: I, thirtyDay: A, twoWeek: O, twoMonth: N, threeMonth: U, sixMonth: L, oneYear: M, twoYear: T, threeYear: b, fiveYear: D } = getDateRanges(), S = ref([]), R = ref([]), k = computed(() => {
10117
+ let B = reactive({});
10118
+ return R.value.forEach((V) => {
10119
+ B[V.columnName] = V;
10120
+ }), B;
10117
10121
  });
10118
- let j = !1;
10122
+ let G = !1;
10119
10123
  watch(
10120
10124
  () => n.config,
10121
10125
  () => {
10122
- X();
10126
+ W();
10123
10127
  },
10124
10128
  {
10125
10129
  immediate: !0,
10126
10130
  deep: !0
10127
10131
  }
10128
10132
  );
10129
- function X() {
10130
- j = !1;
10131
- let M = [];
10133
+ function W() {
10134
+ G = !1;
10135
+ let B = [];
10132
10136
  S.value = [];
10133
- const H = [];
10137
+ const V = [];
10134
10138
  if (n.config && n.config.length)
10135
10139
  for (let z = 0; z < n.config.length; z++) {
10136
- const te = cloneDeep(n.config[z]);
10137
- let { dataType: K, dateType: oe, type: ne, selectorId: ce, remoteSearch: le, cellIndex: fe, cellIndexSort: _e, cellIndexSortOrder: ge, cellIndexSortNumeric: me, name: he, columnName: pe, defaultValue: Ee, isNull: Ce } = te, ve = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(K);
10138
- const { componentName: be, placeholerPrefix: we, type: $e } = componentTransition(K, oe);
10140
+ const Q = cloneDeep(n.config[z]);
10141
+ let { dataType: Y, dateType: oe, type: te, selectorId: ce, remoteSearch: le, cellIndex: fe, cellIndexSort: _e, cellIndexSortOrder: ge, cellIndexSortNumeric: me, name: he, columnName: pe, defaultValue: Ee, isNull: Ce } = Q, ve = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(Y);
10142
+ const { componentName: be, placeholerPrefix: we, type: $e } = componentTransition(Y, oe);
10139
10143
  let ye = {
10140
- ...te,
10141
- elWidth: te.elWidth || 210,
10144
+ ...Q,
10145
+ elWidth: Q.elWidth || 210,
10142
10146
  formItemType: be,
10143
10147
  placeholder: rct(we + he || pe),
10144
10148
  type: $e || "",
@@ -10147,50 +10151,50 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10147
10151
  shiftSegments: [],
10148
10152
  shiftValue: ""
10149
10153
  };
10150
- if (ye.shiftSegments = oe === DataParamDateTypes.DATE ? parseShiftConfig(te.shifts) : [], ye.value = Q(ye, ve), S.value.push({
10154
+ if (ye.shiftSegments = oe === DataParamDateTypes.DATE ? parseShiftConfig(Q.shifts) : [], ye.value = J(ye, ve), S.value.push({
10151
10155
  name: pe,
10152
10156
  value: ye.value,
10153
- type: ne,
10157
+ type: te,
10154
10158
  isNull: Ce
10155
- }), te.customOptions)
10156
- ye.optionData = te.customOptions.split(",").map((de) => de.trim()).filter(Boolean).map((de) => ({ label: de, value: de }));
10159
+ }), Q.customOptions)
10160
+ ye.optionData = Q.customOptions.split(",").map((de) => de.trim()).filter(Boolean).map((de) => ({ label: de, value: de }));
10157
10161
  else if (ce) {
10158
- const de = ae(ce, ye, "", le);
10159
- le || H.push(de);
10162
+ const de = ie(ce, ye, "", le);
10163
+ le || V.push(de);
10160
10164
  } else fe && (o("addCell", fe), on(`cell-change:${fe}`, (de) => {
10161
10165
  if (de = Object.values(de), de && Array.isArray(de) && de.length) {
10162
10166
  if (_e) {
10163
10167
  const xe = createGroupSortComparator({ order: ge, numeric: me });
10164
10168
  de.sort((Se, Te) => xe(Se.label, Te.label));
10165
10169
  }
10166
- ye.optionData = de, triggerRef(I);
10170
+ ye.optionData = de, triggerRef(R);
10167
10171
  }
10168
10172
  }));
10169
- M.push(ye), ne === "LT_GT_EQ" && !ve && U(ye, M, we, ne);
10173
+ B.push(ye), te === "LT_GT_EQ" && !ve && F(ye, B, we, te);
10170
10174
  }
10171
- I.value = M, Z(), nextTick(async () => {
10172
- H.length > 0 && await Promise.allSettled(H), j || J();
10175
+ R.value = B, ee(), nextTick(async () => {
10176
+ V.length > 0 && await Promise.allSettled(V), G || Z();
10173
10177
  });
10174
10178
  }
10175
- function Z() {
10176
- Object.entries(i.query).forEach(([M, H]) => {
10177
- if (!M || H === null || H === void 0 || H === "") return;
10178
- const z = Array.isArray(H) ? H.join(",") : H, te = S.value.findIndex((K) => K.name === M);
10179
- if (te > -1) {
10180
- if (M.indexOf("end_") === 0) {
10181
- S.value[te].value = z;
10182
- const K = I.value.find((oe) => oe.columnName === M);
10183
- K && (K.value = z);
10179
+ function ee() {
10180
+ Object.entries(i.query).forEach(([B, V]) => {
10181
+ if (!B || V === null || V === void 0 || V === "") return;
10182
+ const z = Array.isArray(V) ? V.join(",") : V, Q = S.value.findIndex((Y) => Y.name === B);
10183
+ if (Q > -1) {
10184
+ if (B.indexOf("end_") === 0) {
10185
+ S.value[Q].value = z;
10186
+ const Y = R.value.find((oe) => oe.columnName === B);
10187
+ Y && (Y.value = z);
10184
10188
  }
10185
10189
  return;
10186
10190
  }
10187
- S.value.push({ name: M, value: z, type: "EQ", isNull: !1 });
10191
+ S.value.push({ name: B, value: z, type: "EQ", isNull: !1 });
10188
10192
  });
10189
10193
  }
10190
- function Q(M, H) {
10191
- let { dataType: z, dateType: te, defaultValue: K, startTime: oe, endTime: ne, columnName: ce } = M, le = K || "";
10192
- if (H && K)
10193
- te && (M.type = te), te && DATE_RANGE_TYPES.includes(te) ? le = ee(K, oe, ne) : le = ie(te, K, oe);
10194
+ function J(B, V) {
10195
+ let { dataType: z, dateType: Q, defaultValue: Y, startTime: oe, endTime: te, columnName: ce } = B, le = Y || "";
10196
+ if (V && Y)
10197
+ Q && (B.type = Q), Q && DATE_RANGE_TYPES.includes(Q) ? le = ne(Y, oe, te) : le = ae(Q, Y, oe);
10194
10198
  else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(z)) {
10195
10199
  if (Array.isArray(le))
10196
10200
  return le;
@@ -10202,250 +10206,250 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10202
10206
  i.query[ce] && (le = i.query[ce]);
10203
10207
  return le;
10204
10208
  }
10205
- function ee(M, H, z) {
10206
- let K = {
10209
+ function ne(B, V, z) {
10210
+ let Y = {
10207
10211
  thisDay: [s, l],
10208
10212
  thisMonth: [u, f],
10209
10213
  lastMonth: [d, p],
10210
10214
  thisYear: [_, E],
10211
- lastYear: [$, y],
10215
+ lastYear: [x, y],
10212
10216
  now: [s, v],
10213
10217
  twoDay: [C, v],
10214
10218
  threeDay: [w, v],
10215
- sevenDay: [b, v],
10216
- fifteenDay: [N, v],
10217
- thirtyDay: [R, v],
10218
- threeMonth: [F, v],
10219
+ sevenDay: [$, v],
10220
+ fifteenDay: [I, v],
10221
+ thirtyDay: [A, v],
10222
+ threeMonth: [U, v],
10219
10223
  sixMonth: [L, v],
10220
- oneYear: [O, v],
10221
- twoYear: [x, v],
10222
- threeYear: [D, v],
10223
- fiveYear: [T, v]
10224
- }[M] || [s, l];
10225
- return H && (K[0] = re(K[0], H, a)), z && (K[1] = re(K[1], z, a)), K;
10226
- }
10227
- function ie(M, H, z) {
10228
- let K = {
10224
+ oneYear: [M, v],
10225
+ twoYear: [T, v],
10226
+ threeYear: [b, v],
10227
+ fiveYear: [D, v]
10228
+ }[B] || [s, l];
10229
+ return V && (Y[0] = re(Y[0], V, a)), z && (Y[1] = re(Y[1], z, a)), Y;
10230
+ }
10231
+ function ae(B, V, z) {
10232
+ let Y = {
10229
10233
  thisYear: _,
10230
- twoYear: x,
10231
- threeYear: D,
10232
- fiveYear: T,
10234
+ twoYear: T,
10235
+ threeYear: b,
10236
+ fiveYear: D,
10233
10237
  thisMonth: u,
10234
- twoMonth: k,
10235
- threeMonth: F,
10238
+ twoMonth: N,
10239
+ threeMonth: U,
10236
10240
  sixMonth: L,
10237
10241
  thisWeek: c,
10238
- twoWeek: A,
10242
+ twoWeek: O,
10239
10243
  thisQuarter: m,
10240
10244
  lastQuarter: g,
10241
10245
  now: v,
10242
10246
  thisDay: s,
10243
10247
  twoDay: C,
10244
10248
  threeDay: w,
10245
- sevenDay: b,
10246
- fifteenDay: N,
10247
- thirtyDay: R
10248
- }[H];
10249
- if (!K) {
10250
- let oe = dayjs().startOf(M);
10251
- oe.isValid() ? K = oe.format(a) : K = v;
10249
+ sevenDay: $,
10250
+ fifteenDay: I,
10251
+ thirtyDay: A
10252
+ }[V];
10253
+ if (!Y) {
10254
+ let oe = dayjs().startOf(B);
10255
+ oe.isValid() ? Y = oe.format(a) : Y = v;
10252
10256
  }
10253
- return z && (K = re(K, z, a)), K;
10257
+ return z && (Y = re(Y, z, a)), Y;
10254
10258
  }
10255
- function ae(M, H, z = "", te = !1) {
10259
+ function ie(B, V, z = "", Q = !1) {
10256
10260
  return axios.request({
10257
10261
  url: "/sysSelector/list",
10258
10262
  method: "POST",
10259
- data: { id: M, f_value: z, remote: te }
10260
- }).then((K) => {
10261
- K.data && Array.isArray(K.data.data) && (H.optionData = K.data.data.map(({ NAME: oe, VALUE: ne }) => ({
10263
+ data: { id: B, f_value: z, remote: Q }
10264
+ }).then((Y) => {
10265
+ Y.data && Array.isArray(Y.data.data) && (V.optionData = Y.data.data.map(({ NAME: oe, VALUE: te }) => ({
10262
10266
  label: oe,
10263
- value: ne
10264
- })), triggerRef(I));
10265
- }).catch((K) => {
10266
- console.warn(`选择器 ${M} 数据加载失败:`, K), H.optionData = [];
10267
+ value: te
10268
+ })), triggerRef(R));
10269
+ }).catch((Y) => {
10270
+ console.warn(`选择器 ${B} 数据加载失败:`, Y), V.optionData = [];
10267
10271
  });
10268
10272
  }
10269
- function se(M, H) {
10270
- H.selectorId && (H.selectorLoading = !0, axios.request({
10273
+ function se(B, V) {
10274
+ V.selectorId && (V.selectorLoading = !0, axios.request({
10271
10275
  url: "/sysSelector/list",
10272
10276
  method: "POST",
10273
- data: { id: H.selectorId, f_value: M, remote: !0 }
10277
+ data: { id: V.selectorId, f_value: B, remote: !0 }
10274
10278
  }).then((z) => {
10275
- z.data && Array.isArray(z.data.data) && (H.optionData = z.data.data.map(({ NAME: te, VALUE: K }) => ({
10276
- label: te,
10277
- value: K
10279
+ z.data && Array.isArray(z.data.data) && (V.optionData = z.data.data.map(({ NAME: Q, VALUE: Y }) => ({
10280
+ label: Q,
10281
+ value: Y
10278
10282
  })));
10279
10283
  }).finally(() => {
10280
- H.selectorLoading = !1, triggerRef(I);
10284
+ V.selectorLoading = !1, triggerRef(R);
10281
10285
  }));
10282
10286
  }
10283
- function U(M, H, z, te) {
10284
- const { columnName: K, defaultValue: oe, isNull: ne } = M;
10285
- M.placeholder = rct(z + "开始");
10286
- const ce = cloneDeep(M);
10287
- ce.name = "-", ce.columnName = `end_${K}`, ce.placeholder = rct(z + "结束");
10287
+ function F(B, V, z, Q) {
10288
+ const { columnName: Y, defaultValue: oe, isNull: te } = B;
10289
+ B.placeholder = rct(z + "开始");
10290
+ const ce = cloneDeep(B);
10291
+ ce.name = "-", ce.columnName = `end_${Y}`, ce.placeholder = rct(z + "结束");
10288
10292
  let le = oe || "";
10289
10293
  S.value.push({
10290
- name: `end_${K}`,
10294
+ name: `end_${Y}`,
10291
10295
  value: le,
10292
- type: te,
10293
- isNull: ne
10294
- }), M.selectorId && ae(M.selectorId, ce, "", !!M.remoteSearch), H.push(ce);
10296
+ type: Q,
10297
+ isNull: te
10298
+ }), B.selectorId && ie(B.selectorId, ce, "", !!B.remoteSearch), V.push(ce);
10295
10299
  }
10296
- function G(M) {
10300
+ function H(B) {
10297
10301
  return {
10298
- label: rct(M.name),
10299
- required: M.isNull,
10300
- style: M.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
10302
+ label: rct(B.name),
10303
+ required: B.isNull,
10304
+ style: B.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
10301
10305
  };
10302
10306
  }
10303
- function V(M) {
10304
- const H = {
10305
- modelValue: M.value,
10306
- type: M.type,
10307
+ function j(B) {
10308
+ const V = {
10309
+ modelValue: B.value,
10310
+ type: B.type,
10307
10311
  clearable: !0,
10308
- placeholder: M.placeholder,
10309
- "onUpdate:modelValue": (z) => Y(z, M)
10312
+ placeholder: B.placeholder,
10313
+ "onUpdate:modelValue": (z) => q(z, B)
10310
10314
  };
10311
- return M.formItemType === "ElDatePicker" && (H["value-format"] = a, DATE_RANGE_TYPES.includes(M.type) && (H.unlinkPanels = !0, H.singlePanel = !!M.singlePanel), DATE_VIEW_FORMAT[M.type] && (H.format = DATE_VIEW_FORMAT[M.type])), ["ElInput"].includes(M.formItemType) && (H.onBlur = () => q(M, "blur"), H.onKeyup = (z) => {
10312
- z.key === "Enter" && q(M, "enter");
10313
- }), ["ElSelect"].includes(M.formItemType) && (H.multiple = !0, H.collapseTags = !0, H.filterable = !0, M.remoteSearch && M.selectorId && (H.remote = !0, H.remoteMethod = (z) => se(z, M), H.loading = M.selectorLoading)), H;
10315
+ return B.formItemType === "ElDatePicker" && (V["value-format"] = a, DATE_RANGE_TYPES.includes(B.type) && (V.unlinkPanels = !0, V.singlePanel = !!B.singlePanel), DATE_VIEW_FORMAT[B.type] && (V.format = DATE_VIEW_FORMAT[B.type])), ["ElInput"].includes(B.formItemType) && (V.onBlur = () => X(B, "blur"), V.onKeyup = (z) => {
10316
+ z.key === "Enter" && X(B, "enter");
10317
+ }), ["ElSelect"].includes(B.formItemType) && (V.multiple = !0, V.collapseTags = !0, V.filterable = !0, B.remoteSearch && B.selectorId && (V.remote = !0, V.remoteMethod = (z) => se(z, B), V.loading = B.selectorLoading)), V;
10314
10318
  }
10315
- function Y(M, H) {
10316
- let z = S.value.findIndex((te) => te.name === H.columnName);
10317
- if (H.value = M, S.value[z].value = M, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(H.formItemType)) {
10319
+ function q(B, V) {
10320
+ let z = S.value.findIndex((Q) => Q.name === V.columnName);
10321
+ if (V.value = B, S.value[z].value = B, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(V.formItemType)) {
10318
10322
  if (!n.data.searchOnBlur)
10319
10323
  return !1;
10320
- j = !0, J();
10324
+ G = !0, Z();
10321
10325
  }
10322
10326
  }
10323
- function q(M, H) {
10324
- if (["ElInput", "ElInputNumber"].includes(M.formItemType)) {
10325
- if (H === "blur" && !n.data.searchOnBlur)
10327
+ function X(B, V) {
10328
+ if (["ElInput", "ElInputNumber"].includes(B.formItemType)) {
10329
+ if (V === "blur" && !n.data.searchOnBlur)
10326
10330
  return !1;
10327
- j = !0, J();
10331
+ G = !0, Z();
10328
10332
  }
10329
10333
  }
10330
- function W(M, H) {
10331
- if (H.shiftValue = M || "", !n.data.searchOnBlur)
10334
+ function K(B, V) {
10335
+ if (V.shiftValue = B || "", !n.data.searchOnBlur)
10332
10336
  return !1;
10333
- j = !0, J();
10337
+ G = !0, Z();
10334
10338
  }
10335
- function re(M, H, z) {
10336
- if (H && M) {
10337
- let te = H.split(",").map((oe) => {
10338
- let ne = oe.match(/[-+]/).index, ce = Number(oe.substring(ne)), le = oe.substring(0, ne);
10339
+ function re(B, V, z) {
10340
+ if (V && B) {
10341
+ let Q = V.split(",").map((oe) => {
10342
+ let te = oe.match(/[-+]/).index, ce = Number(oe.substring(te)), le = oe.substring(0, te);
10339
10343
  return {
10340
10344
  count: ce,
10341
10345
  type: le
10342
10346
  };
10343
- }), K = dayjs(M);
10344
- K.isValid() && (te.forEach(({ count: oe, type: ne }) => {
10345
- K = K.add(oe, ne);
10346
- }), M = K.format(z));
10347
+ }), Y = dayjs(B);
10348
+ Y.isValid() && (Q.forEach(({ count: oe, type: te }) => {
10349
+ Y = Y.add(oe, te);
10350
+ }), B = Y.format(z));
10347
10351
  }
10348
- return M;
10349
- }
10350
- function J() {
10351
- let M = cloneDeep(S.value);
10352
- M.forEach(({ name: H, value: z, type: te, isNull: K }, oe) => {
10353
- let ne = B.value[H];
10354
- if (!ne) {
10355
- Array.isArray(z) && (M[oe].value = z.join(","));
10352
+ return B;
10353
+ }
10354
+ function Z() {
10355
+ let B = cloneDeep(S.value);
10356
+ B.forEach(({ name: V, value: z, type: Q, isNull: Y }, oe) => {
10357
+ let te = k.value[V];
10358
+ if (!te) {
10359
+ Array.isArray(z) && (B[oe].value = z.join(","));
10356
10360
  return;
10357
10361
  }
10358
- if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(ne.dataType) && z)
10359
- if (ne.dateType && DATE_RANGE_TYPES.includes(ne.dateType) && z && z.length === 2) {
10362
+ if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) && z)
10363
+ if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) && z && z.length === 2) {
10360
10364
  let [fe, _e] = z;
10361
- const ge = DATE_RANGE_PERIOD_UNIT[ne.dateType];
10365
+ const ge = DATE_RANGE_PERIOD_UNIT[te.dateType];
10362
10366
  if (ge) {
10363
10367
  const he = dayjs(fe), pe = dayjs(_e);
10364
10368
  he.isValid() && (fe = he.startOf(ge).format(a)), pe.isValid() && (_e = pe.endOf(ge).format(a));
10365
10369
  }
10366
- M[oe].value = fe;
10367
- let me = `end_${ne.columnName}`;
10368
- M.some((he) => he.name === me) || M.push({
10370
+ B[oe].value = fe;
10371
+ let me = `end_${te.columnName}`;
10372
+ B.some((he) => he.name === me) || B.push({
10369
10373
  name: me,
10370
10374
  value: _e,
10371
- type: te,
10372
- isNull: K
10375
+ type: Q,
10376
+ isNull: Y
10373
10377
  });
10374
10378
  } else {
10375
10379
  let fe = dayjs(z);
10376
- if (fe.isValid() && ne.dateType) {
10377
- const _e = ne.shiftValue ? Number(ne.shiftValue) : -1, ge = ne.dateType === DataParamDateTypes.DATE ? (ne.shiftSegments || [])[_e] : void 0;
10380
+ if (fe.isValid() && te.dateType) {
10381
+ const _e = te.shiftValue ? Number(te.shiftValue) : -1, ge = te.dateType === DataParamDateTypes.DATE ? (te.shiftSegments || [])[_e] : void 0;
10378
10382
  if (ge) {
10379
10383
  const me = fe.startOf("day");
10380
- M[oe].value = me.add(ge.startMinutes, "minute").format(a);
10381
- let he = `end_${ne.columnName}`;
10382
- M.some((pe) => pe.name === he) || M.push({
10384
+ B[oe].value = me.add(ge.startMinutes, "minute").format(a);
10385
+ let he = `end_${te.columnName}`;
10386
+ B.some((pe) => pe.name === he) || B.push({
10383
10387
  name: he,
10384
10388
  value: me.add(ge.endMinutes, "minute").format(a),
10385
- type: te,
10386
- isNull: K
10389
+ type: Q,
10390
+ isNull: Y
10387
10391
  });
10388
10392
  } else {
10389
- let me = fe.startOf(ne.dateType).format(a);
10390
- M[oe].value = re(me, ne.startTime, a);
10391
- let he = fe.endOf(ne.dateType).format(a), pe = `end_${ne.columnName}`;
10392
- M.some((Ee) => Ee.name === pe) || M.push({
10393
+ let me = fe.startOf(te.dateType).format(a);
10394
+ B[oe].value = re(me, te.startTime, a);
10395
+ let he = fe.endOf(te.dateType).format(a), pe = `end_${te.columnName}`;
10396
+ B.some((Ee) => Ee.name === pe) || B.push({
10393
10397
  name: pe,
10394
- value: re(he, ne.endTime, a),
10395
- type: te,
10396
- isNull: K
10398
+ value: re(he, te.endTime, a),
10399
+ type: Q,
10400
+ isNull: Y
10397
10401
  });
10398
10402
  }
10399
10403
  }
10400
10404
  }
10401
- else Array.isArray(z) && (M[oe].value = z.join(","));
10402
- }), o("change", M);
10405
+ else Array.isArray(z) && (B[oe].value = z.join(","));
10406
+ }), o("change", B);
10403
10407
  }
10404
10408
  return e({
10405
- changeValue: J
10409
+ changeValue: Z
10406
10410
  }), onMounted(() => {
10407
- }), (M, H) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
10411
+ }), (B, V) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
10408
10412
  createVNode(unref(ElForm), { inline: "" }, {
10409
10413
  default: withCtx(() => [
10410
- (openBlock(!0), createElementBlock(Fragment, null, renderList(I.value, (z) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, G(z)), {
10414
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(R.value, (z) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, H(z)), {
10411
10415
  default: withCtx(() => {
10412
- var te;
10416
+ var Q;
10413
10417
  return [
10414
10418
  z.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
10415
10419
  key: 0,
10416
10420
  ref_for: !0
10417
- }, V(z), {
10421
+ }, j(z), {
10418
10422
  style: { width: `${z.elWidth}px` }
10419
10423
  }), {
10420
10424
  default: withCtx(() => [
10421
- (openBlock(!0), createElementBlock(Fragment, null, renderList(z.optionData, (K) => (openBlock(), createBlock(unref(ElOption), {
10422
- key: K.value,
10423
- label: K.label,
10424
- value: K.value
10425
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(z.optionData, (Y) => (openBlock(), createBlock(unref(ElOption), {
10426
+ key: Y.value,
10427
+ label: Y.label,
10428
+ value: Y.value
10425
10429
  }, null, 8, ["label", "value"]))), 128))
10426
10430
  ]),
10427
10431
  _: 2
10428
10432
  }, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
10429
10433
  key: 1,
10430
10434
  style: { width: `${z.elWidth}px` }
10431
- }, { ref_for: !0 }, V(z)), null, 16, ["style"])),
10432
- z.formItemType === "ElDatePicker" && z.type === "date" && ((te = z.shiftSegments) != null && te.length) ? (openBlock(), createBlock(unref(ElSelect), {
10435
+ }, { ref_for: !0 }, j(z)), null, 16, ["style"])),
10436
+ z.formItemType === "ElDatePicker" && z.type === "date" && ((Q = z.shiftSegments) != null && Q.length) ? (openBlock(), createBlock(unref(ElSelect), {
10433
10437
  key: 2,
10434
10438
  class: "shift-select",
10435
10439
  clearable: "",
10436
10440
  "model-value": z.shiftValue,
10437
10441
  placeholder: unref(rct)("全部班次"),
10438
- onChange: (K) => W(K, z)
10442
+ onChange: (Y) => K(Y, z)
10439
10443
  }, {
10440
10444
  default: withCtx(() => [
10441
10445
  createVNode(unref(ElOption), {
10442
10446
  value: "",
10443
10447
  label: unref(rct)("全部班次")
10444
10448
  }, null, 8, ["label"]),
10445
- (openBlock(!0), createElementBlock(Fragment, null, renderList(z.shiftSegments, (K, oe) => (openBlock(), createBlock(unref(ElOption), {
10449
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(z.shiftSegments, (Y, oe) => (openBlock(), createBlock(unref(ElOption), {
10446
10450
  key: oe,
10447
10451
  value: String(oe),
10448
- label: K.label
10452
+ label: Y.label
10449
10453
  }, null, 8, ["value", "label"]))), 128))
10450
10454
  ]),
10451
10455
  _: 2
@@ -10459,7 +10463,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10459
10463
  ]),
10460
10464
  _: 1
10461
10465
  }),
10462
- renderSlot(M.$slots, "search")
10466
+ renderSlot(B.$slots, "search")
10463
10467
  ]));
10464
10468
  }
10465
10469
  });
@@ -10492,14 +10496,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10492
10496
  },
10493
10497
  emits: ["updateData", "report-error"],
10494
10498
  setup(t, { expose: e, emit: r }) {
10495
- useCssVars((U) => ({
10496
- v97ab70c2: _.value.border,
10497
- v772d91be: _.value.background,
10498
- v53837a5b: _.value.evenBackground,
10499
- v103a94a2: _.value.fixedBackground,
10500
- v19df01e9: _.value.fixedEvenBackground,
10501
- v3e47fd77: _.value.hoverBackground,
10502
- v2614906a: _.value.activeColor
10499
+ useCssVars((F) => ({
10500
+ v6890e5fc: _.value.border,
10501
+ e5214204: _.value.background,
10502
+ v5b486bb8: _.value.evenBackground,
10503
+ v2e88201c: _.value.fixedBackground,
10504
+ v2b3b62ac: _.value.fixedEvenBackground,
10505
+ v2f2137ba: _.value.hoverBackground,
10506
+ v7dd3642d: _.value.activeColor
10503
10507
  }));
10504
10508
  const n = t, o = r, i = inject(
10505
10509
  "isPrintMode",
@@ -10508,42 +10512,42 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10508
10512
  let u = null, f = null, d = null;
10509
10513
  const p = shallowRef([]), m = shallowRef([]), g = computed(() => {
10510
10514
  if (i.value && (a != null && a.value)) {
10511
- const U = a.value;
10515
+ const F = a.value;
10512
10516
  return {
10513
- width: `${mmToPx(U.width)}px`,
10514
- padding: `${n.index === 0 ? mmToPx(U.marginTop) : 0}px ${mmToPx(U.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(U.marginBottom) : 0}px ${mmToPx(U.marginLeft)}px`
10517
+ width: `${mmToPx(F.width)}px`,
10518
+ padding: `${n.index === 0 ? mmToPx(F.marginTop) : 0}px ${mmToPx(F.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(F.marginBottom) : 0}px ${mmToPx(F.marginLeft)}px`
10515
10519
  };
10516
10520
  }
10517
10521
  return {
10518
10522
  width: n.config.widthType === "%" ? `calc(${n.config.width}% - 10px)` : `${n.config.width - 10}px`,
10519
10523
  height: n.config.fullHeight ? "calc(100% - 8px)" : `${n.config.height}px`
10520
10524
  };
10521
- }), _ = computed(() => getThemeColors(n.config.theme || "none")), E = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), $ = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((U) => U.isShow).length > 0), y = reactive({
10525
+ }), _ = computed(() => getThemeColors(n.config.theme || "none")), E = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), x = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((F) => F.isShow).length > 0), y = reactive({
10522
10526
  pageSize: 100,
10523
10527
  pageSizes: [10, 20, 50, 100, 200, 1e4],
10524
10528
  pageIndex: 1,
10525
10529
  total: 0
10526
- }), v = ref([]), C = ref([]), w = (U) => {
10527
- let G = 0, V = U;
10528
- if (U.includes("!")) {
10529
- let J = U.split("!");
10530
- G = parseInt(J[0]), V = J[1];
10530
+ }), v = ref([]), C = ref([]), w = (F) => {
10531
+ let H = 0, j = F;
10532
+ if (F.includes("!")) {
10533
+ let Z = F.split("!");
10534
+ H = parseInt(Z[0]), j = Z[1];
10531
10535
  }
10532
- let Y = V.match(/[A-Z]+/)[0], q = V.match(/\d+/)[0] - 1, W = columnToNumber(Y), re = `${G}:${q}:${W}`;
10536
+ let q = j.match(/[A-Z]+/)[0], X = j.match(/\d+/)[0] - 1, K = columnToNumber(q), re = `${H}:${X}:${K}`;
10533
10537
  C.value.includes(re) || C.value.push(re);
10534
10538
  };
10535
- function b(U) {
10536
- if (R && n.config.data.autoQuery === !1)
10537
- return R = !1, !1;
10538
- v.value = U, y.pageIndex = 1, X();
10539
+ function $(F) {
10540
+ if (A && n.config.data.autoQuery === !1)
10541
+ return A = !1, !1;
10542
+ v.value = F, y.pageIndex = 1, W();
10539
10543
  }
10540
- let N = !1, R = !0;
10544
+ let I = !1, A = !0;
10541
10545
  watch(
10542
10546
  () => [y.pageSize, y.pageIndex],
10543
- (U, G) => {
10544
- if (U && G) {
10545
- let [V, Y] = U, [q, W] = U;
10546
- V !== q && (y.pageIndex = 1), N && X();
10547
+ (F, H) => {
10548
+ if (F && H) {
10549
+ let [j, q] = F, [X, K] = F;
10550
+ j !== X && (y.pageIndex = 1), I && W();
10547
10551
  }
10548
10552
  },
10549
10553
  {
@@ -10551,268 +10555,268 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10551
10555
  deep: !0
10552
10556
  }
10553
10557
  );
10554
- function A() {
10555
- var U;
10556
- (U = s.value) == null || U.changeValue();
10558
+ function O() {
10559
+ var F;
10560
+ (F = s.value) == null || F.changeValue();
10557
10561
  }
10558
- const k = computed(() => n.config.exportMethod === "send" && window.opener), F = computed(() => k.value ? "保存" : "导出");
10562
+ const N = computed(() => n.config.exportMethod === "send" && window.opener), U = computed(() => N.value ? "保存" : "导出");
10559
10563
  async function L() {
10560
10564
  if (p.value && p.value.length) {
10561
- let U = await exportReport(
10565
+ let F = await exportReport(
10562
10566
  p.value,
10563
10567
  n.name,
10564
10568
  "excel",
10565
10569
  n.config.theme,
10566
10570
  n.config.subReprotIndex
10567
10571
  );
10568
- if (U === null) {
10572
+ if (F === null) {
10569
10573
  await ElMessageBox.alert("表格导出失败");
10570
10574
  return;
10571
10575
  }
10572
- n.config.exportMethod === "send" && window.opener ? sendReport(U) : downloadReport(U, n.name, "excel");
10576
+ n.config.exportMethod === "send" && window.opener ? sendReport(F) : downloadReport(F, n.name, "excel");
10573
10577
  } else
10574
10578
  ElMessage.success("配置未完成!");
10575
10579
  }
10576
- async function O() {
10580
+ async function M(F = !1) {
10577
10581
  if (!(n.config && c.value && n.config.data.source)) return null;
10578
- if (n.config.data.source.some((q) => q.loopTable) && m.value.length) {
10579
- const q = [];
10580
- return m.value.forEach((W) => q.push(...W)), q.length ? q : null;
10582
+ if (n.config.data.source.some((K) => K.loopTable) && m.value.length) {
10583
+ const K = [];
10584
+ return m.value.forEach((re) => K.push(...re)), K.length ? K : null;
10581
10585
  }
10582
- if (p.value.length)
10586
+ if (!F && p.value.length)
10583
10587
  return [...p.value];
10584
- let U = [];
10588
+ let H = [];
10585
10589
  try {
10586
- U = await ae(!1);
10587
- } catch (q) {
10590
+ H = await ie(F);
10591
+ } catch (K) {
10588
10592
  return o("report-error", {
10589
10593
  index: n.index,
10590
- message: getErrorMessage(q)
10594
+ message: getErrorMessage(K)
10591
10595
  }), null;
10592
10596
  }
10593
- let G = ie(U);
10594
- if (n.config.data.processData && (G = await getProcessData(n.config.data.processData, G, v.value, y)), u && u.order !== "none") {
10595
- const q = G[u.key];
10596
- Array.isArray(q) && (G[u.key] = sortRowsByField(q, u.field, u.order, u.numeric));
10597
+ let j = ae(H);
10598
+ if (n.config.data.processData && (j = await getProcessData(n.config.data.processData, j, v.value, y)), u && u.order !== "none") {
10599
+ const K = j[u.key];
10600
+ Array.isArray(K) && (j[u.key] = sortRowsByField(K, u.field, u.order, u.numeric));
10597
10601
  }
10598
- let V = [];
10599
- const Y = [];
10600
- for (let q = 0; q < n.config.tableConfig.length; q++) {
10601
- const W = n.config.tableConfig[q];
10602
- let { rowConfig: re, colConfig: J, config: M } = cloneDeep(W), H = getLoopItem(J, G, "col", M), z = getLoopItem(re, G, "row", M);
10603
- H.length && loopGroupCols(J, H, M, G), z.length && loopGroupRows(re, z, M, J, G);
10604
- const te = transformArrayToObject(G, n.config.data.source);
10605
- computeCell(M, te, void 0, q), V.push({
10606
- config: M,
10607
- rowConfig: re,
10608
- colConfig: J
10609
- }), Y.push({ config: M });
10602
+ let q = [];
10603
+ const X = [];
10604
+ for (let K = 0; K < n.config.tableConfig.length; K++) {
10605
+ const re = n.config.tableConfig[K];
10606
+ let { rowConfig: Z, colConfig: B, config: V } = cloneDeep(re), z = getLoopItem(B, j, "col", V), Q = getLoopItem(Z, j, "row", V);
10607
+ z.length && loopGroupCols(B, z, V, j), Q.length && loopGroupRows(Z, Q, V, B, j);
10608
+ const Y = transformArrayToObject(j, n.config.data.source);
10609
+ computeCell(V, Y, void 0, K), q.push({
10610
+ config: V,
10611
+ rowConfig: Z,
10612
+ colConfig: B
10613
+ }), X.push({ config: V });
10610
10614
  }
10611
- return await preGenerateBarcodes(Y), V.length ? V : null;
10615
+ return await preGenerateBarcodes(X), q.length ? q : null;
10612
10616
  }
10613
- async function x() {
10614
- const U = await O();
10615
- if (!U) {
10617
+ async function T() {
10618
+ const F = await M(!0);
10619
+ if (!F) {
10616
10620
  ElMessage.warning("当前报表没有可导出的数据");
10617
10621
  return;
10618
10622
  }
10619
- let G = await exportReport(U, n.name, "excel", n.config.theme, n.config.subReprotIndex);
10620
- if (G === null) {
10623
+ let H = await exportReport(F, n.name, "excel", n.config.theme, n.config.subReprotIndex);
10624
+ if (H === null) {
10621
10625
  await ElMessageBox.alert("表格导出失败");
10622
10626
  return;
10623
10627
  }
10624
- n.config.exportMethod === "send" && window.opener ? sendReport(G) : downloadReport(G, n.name, "excel");
10625
- }
10626
- const D = ref(!1), T = ref(!1);
10627
- async function S(U, G) {
10628
- let V = !1, { rowConfig: Y, colConfig: q, config: W } = cloneDeep(U), re = getLoopItem(q, G, "col", W), J = getLoopItem(Y, G, "row", W);
10629
- re.length && (V = !0, loopGroupCols(q, re, W, G)), J.length && (V = !0, loopGroupRows(Y, J, W, q, G));
10630
- const M = transformArrayToObject(G, n.config.data.source);
10631
- return computeCell(W, M, C.value), await preGenerateBarcodes([{ config: W }]), {
10632
- reportConfig: { config: W, rowConfig: Y, colConfig: q },
10633
- hasLoop: V
10628
+ n.config.exportMethod === "send" && window.opener ? sendReport(H) : downloadReport(H, n.name, "excel");
10629
+ }
10630
+ const b = ref(!1), D = ref(!1);
10631
+ async function S(F, H) {
10632
+ let j = !1, { rowConfig: q, colConfig: X, config: K } = cloneDeep(F), re = getLoopItem(X, H, "col", K), Z = getLoopItem(q, H, "row", K);
10633
+ re.length && (j = !0, loopGroupCols(X, re, K, H)), Z.length && (j = !0, loopGroupRows(q, Z, K, X, H));
10634
+ const B = transformArrayToObject(H, n.config.data.source);
10635
+ return computeCell(K, B, C.value), await preGenerateBarcodes([{ config: K }]), {
10636
+ reportConfig: { config: K, rowConfig: q, colConfig: X },
10637
+ hasLoop: j
10634
10638
  };
10635
10639
  }
10636
- async function I(U, G) {
10637
- const V = U[G];
10638
- if (!(!Array.isArray(V) || V.length === 0)) {
10640
+ async function R(F, H) {
10641
+ const j = F[H];
10642
+ if (!(!Array.isArray(j) || j.length === 0)) {
10639
10643
  m.value = [], l.value.innerHTML = "";
10640
- for (const Y of V) {
10641
- const q = { ...U, ...Y, [G]: [Y] }, W = [];
10644
+ for (const q of j) {
10645
+ const X = { ...F, ...q, [H]: [q] }, K = [];
10642
10646
  for (const re of n.config.tableConfig) {
10643
- const { reportConfig: J, hasLoop: M } = await S(re, q);
10644
- W.push(J), renderReportByDom(
10645
- J.rowConfig,
10646
- J.colConfig,
10647
- J.config,
10647
+ const { reportConfig: Z, hasLoop: B } = await S(re, X);
10648
+ K.push(Z), renderReportByDom(
10649
+ Z.rowConfig,
10650
+ Z.colConfig,
10651
+ Z.config,
10648
10652
  l,
10649
- M,
10653
+ B,
10650
10654
  _.value.border
10651
10655
  );
10652
10656
  }
10653
- m.value.push(W);
10657
+ m.value.push(K);
10654
10658
  }
10655
10659
  }
10656
10660
  }
10657
- async function B(U) {
10661
+ async function k(F) {
10658
10662
  if (n.config && c.value)
10659
- if (console.time("renderReport"), p.value = [], T.value = !!n.config.tableConfig, T.value) {
10663
+ if (console.time("renderReport"), p.value = [], D.value = !!n.config.tableConfig, D.value) {
10660
10664
  l.value.innerHTML = "";
10661
- const G = [];
10662
- for (let V = 0; V < n.config.tableConfig.length; V++) {
10663
- const Y = n.config.tableConfig[V];
10664
- let q = !1, { rowConfig: W, colConfig: re, config: J } = cloneDeep(Y), M = getLoopItem(re, U, "col", J), H = getLoopItem(W, U, "row", J);
10665
- M.length && (q = !0, loopGroupCols(re, M, J, U)), H.length && (q = !0, loopGroupRows(W, H, J, re, U));
10666
- const z = transformArrayToObject(U, n.config.data.source);
10667
- computeCell(J, z, C.value, V), G.push({ config: J, rowConfig: W, colConfig: re, hasLoop: q }), p.value.push({
10668
- config: J,
10669
- rowConfig: W,
10665
+ const H = [];
10666
+ for (let j = 0; j < n.config.tableConfig.length; j++) {
10667
+ const q = n.config.tableConfig[j];
10668
+ let X = !1, { rowConfig: K, colConfig: re, config: Z } = cloneDeep(q), B = getLoopItem(re, F, "col", Z), V = getLoopItem(K, F, "row", Z);
10669
+ B.length && (X = !0, loopGroupCols(re, B, Z, F)), V.length && (X = !0, loopGroupRows(K, V, Z, re, F));
10670
+ const z = transformArrayToObject(F, n.config.data.source);
10671
+ computeCell(Z, z, C.value, j), H.push({ config: Z, rowConfig: K, colConfig: re, hasLoop: X }), p.value.push({
10672
+ config: Z,
10673
+ rowConfig: K,
10670
10674
  colConfig: re
10671
10675
  });
10672
10676
  }
10673
- await preGenerateBarcodes(G), G.forEach((V) => {
10674
- renderReportByDom(V.rowConfig, V.colConfig, V.config, l, V.hasLoop, _.value.border);
10677
+ await preGenerateBarcodes(H), H.forEach((j) => {
10678
+ renderReportByDom(j.rowConfig, j.colConfig, j.config, l, j.hasLoop, _.value.border);
10675
10679
  }), console.timeEnd("renderReport"), nextTick(() => {
10676
- const V = l.value.querySelectorAll(".yh-report-table-context");
10677
- let Y = 0;
10678
- if (V.forEach((q) => {
10679
- const W = q.querySelector("table");
10680
- if (W) {
10681
- const re = W.querySelectorAll("colgroup col"), J = Array.from(re).reduce(
10682
- (M, H) => M + parseInt(H.style.width || "80", 10),
10680
+ const j = l.value.querySelectorAll(".yh-report-table-context");
10681
+ let q = 0;
10682
+ if (j.forEach((X) => {
10683
+ const K = X.querySelector("table");
10684
+ if (K) {
10685
+ const re = K.querySelectorAll("colgroup col"), Z = Array.from(re).reduce(
10686
+ (B, V) => B + parseInt(V.style.width || "80", 10),
10683
10687
  0
10684
10688
  );
10685
- Y = Math.max(Y, J);
10689
+ q = Math.max(q, Z);
10686
10690
  }
10687
- }), Y > 0) {
10688
- const q = l.value;
10689
- let W = 0;
10690
- if (q) {
10691
- const re = getComputedStyle(q);
10692
- W = q.clientWidth - parseFloat(re.paddingLeft || "0") - parseFloat(re.paddingRight || "0");
10691
+ }), q > 0) {
10692
+ const X = l.value;
10693
+ let K = 0;
10694
+ if (X) {
10695
+ const re = getComputedStyle(X);
10696
+ K = X.clientWidth - parseFloat(re.paddingLeft || "0") - parseFloat(re.paddingRight || "0");
10693
10697
  }
10694
- W > 0 && (Y = Math.max(Y, W)), V.forEach((re) => {
10695
- const J = re.querySelector("table");
10696
- if (J) {
10697
- const M = J.querySelectorAll("colgroup col"), H = Array.from(M).reduce(
10698
- (z, te) => z + parseInt(te.style.width || "80", 10),
10698
+ K > 0 && (q = Math.max(q, K)), j.forEach((re) => {
10699
+ const Z = re.querySelector("table");
10700
+ if (Z) {
10701
+ const B = Z.querySelectorAll("colgroup col"), V = Array.from(B).reduce(
10702
+ (z, Q) => z + parseInt(Q.style.width || "80", 10),
10699
10703
  0
10700
10704
  );
10701
- if (H > 0 && H < Y) {
10702
- const z = Y / H;
10703
- M.forEach((K) => {
10704
- const oe = parseInt(K.style.width || "80", 10);
10705
- K.style.width = `${Math.round(oe * z)}px`;
10705
+ if (V > 0 && V < q) {
10706
+ const z = q / V;
10707
+ B.forEach((Y) => {
10708
+ const oe = parseInt(Y.style.width || "80", 10);
10709
+ Y.style.width = `${Math.round(oe * z)}px`;
10706
10710
  });
10707
- const te = Array.from(M).map(
10708
- (K) => parseInt(K.style.width || "80", 10)
10711
+ const Q = Array.from(B).map(
10712
+ (Y) => parseInt(Y.style.width || "80", 10)
10709
10713
  );
10710
- J.querySelectorAll("tr").forEach((K) => {
10711
- let oe = 0, ne = 0;
10712
- Array.from(K.children).forEach((ce) => {
10713
- ce.classList.contains("fixed-td") && (ce.style.left = `${oe - 1}px`), ne < te.length && (oe += te[ne] - 1, ne++);
10714
+ Z.querySelectorAll("tr").forEach((Y) => {
10715
+ let oe = 0, te = 0;
10716
+ Array.from(Y.children).forEach((ce) => {
10717
+ ce.classList.contains("fixed-td") && (ce.style.left = `${oe - 1}px`), te < Q.length && (oe += Q[te] - 1, te++);
10714
10718
  });
10715
10719
  });
10716
10720
  }
10717
- J.style.width = `${Y}px`, J.style.minWidth = `${Y}px`;
10721
+ Z.style.width = `${q}px`, Z.style.minWidth = `${q}px`;
10718
10722
  }
10719
10723
  });
10720
10724
  }
10721
10725
  });
10722
10726
  } else {
10723
- let G = !1, { rowConfig: V, colConfig: Y, config: q } = cloneDeep(n.config), W = getLoopItem(Y, U, "col", q), re = getLoopItem(V, U, "row", q);
10724
- W.length && (G = !0, loopGroupCols(Y, W, q, U)), re.length && (G = !0, loopGroupRows(V, re, q, Y, U));
10725
- const J = transformArrayToObject(U, n.config.data.source);
10726
- computeCell(q, J, C.value), await preGenerateBarcodes([{ config: q }]), p.value.push({
10727
- config: q,
10728
- rowConfig: V,
10729
- colConfig: Y
10730
- }), renderReportByDom(V, Y, q, c.value, G, _.value.border), console.timeEnd("renderReport");
10727
+ let H = !1, { rowConfig: j, colConfig: q, config: X } = cloneDeep(n.config), K = getLoopItem(q, F, "col", X), re = getLoopItem(j, F, "row", X);
10728
+ K.length && (H = !0, loopGroupCols(q, K, X, F)), re.length && (H = !0, loopGroupRows(j, re, X, q, F));
10729
+ const Z = transformArrayToObject(F, n.config.data.source);
10730
+ computeCell(X, Z, C.value), await preGenerateBarcodes([{ config: X }]), p.value.push({
10731
+ config: X,
10732
+ rowConfig: j,
10733
+ colConfig: q
10734
+ }), renderReportByDom(j, q, X, c.value, H, _.value.border), console.timeEnd("renderReport");
10731
10735
  }
10732
10736
  }
10733
- function j() {
10734
- let U = 0, G = [], V = {};
10735
- return n.config.params.forEach((Y) => {
10736
- Y.isNull && (V[Y.columnName] = Y);
10737
- }), v.value.forEach((Y) => {
10738
- Y.name && V[Y.name] && !Y.value && (G.push(V[Y.name].name), U++);
10739
- }), U > 0 && Object.keys(V).length > 0 ? (ElMessage.warning({
10740
- message: `请填写必填项:${G.join(",")}`,
10737
+ function G() {
10738
+ let F = 0, H = [], j = {};
10739
+ return n.config.params.forEach((q) => {
10740
+ q.isNull && (j[q.columnName] = q);
10741
+ }), v.value.forEach((q) => {
10742
+ q.name && j[q.name] && !q.value && (H.push(j[q.name].name), F++);
10743
+ }), F > 0 && Object.keys(j).length > 0 ? (ElMessage.warning({
10744
+ message: `请填写必填项:${H.join(",")}`,
10741
10745
  grouping: !0
10742
10746
  }), !1) : !0;
10743
10747
  }
10744
- async function X() {
10745
- var G;
10746
- if (R = !1, i.value || j()) {
10747
- D.value = !0;
10748
+ async function W() {
10749
+ var H;
10750
+ if (A = !1, i.value || G()) {
10751
+ b.value = !0;
10748
10752
  try {
10749
- let V = await ae(i.value), Y = ie(V);
10750
- n.config.data.processData && (Y = await getProcessData(
10753
+ let j = await ie(i.value), q = ae(j);
10754
+ n.config.data.processData && (q = await getProcessData(
10751
10755
  n.config.data.processData,
10752
- Y,
10756
+ q,
10753
10757
  v.value,
10754
10758
  y
10755
- )), d = Y, f = { ...Y }, Z(), Y = f;
10756
- const q = (G = n.config.data.source) == null ? void 0 : G.find((W) => W.loopTable);
10757
- q && q.key ? await I(Y, q.key) : await B(Y), nextTick(ee);
10758
- } catch (V) {
10759
- console.error("数据源请求失败:", V), o("report-error", {
10759
+ )), d = q, f = { ...q }, ee(), q = f;
10760
+ const X = (H = n.config.data.source) == null ? void 0 : H.find((K) => K.loopTable);
10761
+ X && X.key ? await R(q, X.key) : await k(q), nextTick(ne);
10762
+ } catch (j) {
10763
+ console.error("数据源请求失败:", j), o("report-error", {
10760
10764
  index: n.index,
10761
- message: getErrorMessage(V)
10765
+ message: getErrorMessage(j)
10762
10766
  }), clearReportByDom(l);
10763
10767
  } finally {
10764
- D.value = !1, N = !0;
10768
+ b.value = !1, I = !0;
10765
10769
  }
10766
10770
  } else
10767
10771
  clearReportByDom(l);
10768
10772
  }
10769
- function Z() {
10770
- if (!f || !d || !u) return;
10771
- const U = d[u.key];
10772
- Array.isArray(U) && (u.order === "none" ? f[u.key] = U : f[u.key] = sortRowsByField(U, u.field, u.order, u.numeric));
10773
- }
10774
- async function Q(U) {
10775
- var M;
10776
- const G = U.target.closest("td.click-sort-cell");
10777
- if (!G) return;
10778
- const V = G.getAttribute("data-click-sort-field") || "", Y = V.indexOf(".");
10779
- if (Y < 1) return;
10780
- const q = V.slice(0, Y).toUpperCase(), W = V.slice(Y + 1).toUpperCase();
10781
- if (!q || !W || !f) return;
10782
- const re = G.getAttribute("data-click-sort-numeric") === "1";
10783
- u && u.key === q && u.field === W ? u.order = u.order === "asc" ? "desc" : u.order === "desc" ? "none" : "asc" : u = { key: q, field: W, order: "asc", numeric: re }, Z();
10784
- const J = (M = n.config.data.source) == null ? void 0 : M.find((H) => H.loopTable);
10785
- J && J.key ? await I(f, J.key) : await B(f), nextTick(ee);
10786
- }
10787
10773
  function ee() {
10788
- var U;
10789
- (U = l.value) == null || U.querySelectorAll("td.click-sort-cell").forEach((G) => {
10790
- var W;
10791
- const V = ((W = G.getAttribute("data-click-sort-field")) == null ? void 0 : W.toUpperCase()) || "", q = u && V === `${u.key}.${u.field}` && u.order !== "none" ? u.order : "";
10792
- G.dataset.sortDir = q;
10774
+ if (!f || !d || !u) return;
10775
+ const F = d[u.key];
10776
+ Array.isArray(F) && (u.order === "none" ? f[u.key] = F : f[u.key] = sortRowsByField(F, u.field, u.order, u.numeric));
10777
+ }
10778
+ async function J(F) {
10779
+ var B;
10780
+ const H = F.target.closest("td.click-sort-cell");
10781
+ if (!H) return;
10782
+ const j = H.getAttribute("data-click-sort-field") || "", q = j.indexOf(".");
10783
+ if (q < 1) return;
10784
+ const X = j.slice(0, q).toUpperCase(), K = j.slice(q + 1).toUpperCase();
10785
+ if (!X || !K || !f) return;
10786
+ const re = H.getAttribute("data-click-sort-numeric") === "1";
10787
+ u && u.key === X && u.field === K ? u.order = u.order === "asc" ? "desc" : u.order === "desc" ? "none" : "asc" : u = { key: X, field: K, order: "asc", numeric: re }, ee();
10788
+ const Z = (B = n.config.data.source) == null ? void 0 : B.find((V) => V.loopTable);
10789
+ Z && Z.key ? await R(f, Z.key) : await k(f), nextTick(ne);
10790
+ }
10791
+ function ne() {
10792
+ var F;
10793
+ (F = l.value) == null || F.querySelectorAll("td.click-sort-cell").forEach((H) => {
10794
+ var K;
10795
+ const j = ((K = H.getAttribute("data-click-sort-field")) == null ? void 0 : K.toUpperCase()) || "", X = u && j === `${u.key}.${u.field}` && u.order !== "none" ? u.order : "";
10796
+ H.dataset.sortDir = X;
10793
10797
  });
10794
10798
  }
10795
10799
  onMounted(() => {
10796
- var U;
10797
- (U = l.value) == null || U.addEventListener("click", Q);
10800
+ var F;
10801
+ (F = l.value) == null || F.addEventListener("click", J);
10798
10802
  });
10799
- function ie(U) {
10800
- let G = {};
10801
- return Array.isArray(U) || (U = [U]), U.forEach(({ key: V, data: Y }) => {
10802
- if (V !== "PARAM") {
10803
- let q = Y.filter((W) => W);
10804
- G[V] = q;
10803
+ function ae(F) {
10804
+ let H = {};
10805
+ return Array.isArray(F) || (F = [F]), F.forEach(({ key: j, data: q }) => {
10806
+ if (j !== "PARAM") {
10807
+ let X = q.filter((K) => K);
10808
+ H[j] = X;
10805
10809
  } else
10806
- G[V] = Y;
10810
+ H[j] = q;
10807
10811
  }), o("updateData", {
10808
10812
  key: n.config.id,
10809
- data: G
10810
- }), G;
10813
+ data: H
10814
+ }), H;
10811
10815
  }
10812
- async function ae(U = !1) {
10816
+ async function ie(F = !1) {
10813
10817
  if (!n.config.data.source)
10814
10818
  return [];
10815
- const { resData: G, total: V } = await fetchReportData(
10819
+ const { resData: H, total: j } = await fetchReportData(
10816
10820
  { id: n.id, data: n.config.data, tableConfig: n.config.tableConfig },
10817
10821
  v.value,
10818
10822
  {
@@ -10821,14 +10825,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10821
10825
  total: y.total,
10822
10826
  isPagination: E.value
10823
10827
  },
10824
- U
10828
+ F
10825
10829
  );
10826
- return E.value && (y.total = V), G;
10830
+ return E.value && (y.total = j), H;
10827
10831
  }
10828
10832
  function se() {
10829
10833
  if (n.config.data.pageSize !== void 0 && (y.pageSize = isNaN(n.config.data.pageSize) ? n.config.data.pagination ? 10 : 5e3 : n.config.data.pageSize), n.config.data.pagination && n.config.data.pageSizes !== void 0) {
10830
- let U = n.config.data.pageSizes.split(",").map((G) => parseInt(G));
10831
- y.pageSizes = Array.isArray(U) ? U : [10, 20, 50, 100, 200];
10834
+ let F = n.config.data.pageSizes.split(",").map((H) => parseInt(H));
10835
+ y.pageSizes = Array.isArray(F) ? F : [10, 20, 50, 100, 200];
10832
10836
  }
10833
10837
  }
10834
10838
  return se(), e({
@@ -10836,11 +10840,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10836
10840
  batchTableConfigs: m,
10837
10841
  statementTableRef: l,
10838
10842
  /** 拉数据 + 渲染(供父组件主动调用,如打印按钮触发) */
10839
- renderHandler: X,
10843
+ renderHandler: W,
10840
10844
  /** 装配导出配置(供父组件合并导出调用) */
10841
- buildExportConfigs: O
10842
- }), (U, G) => {
10843
- const V = resolveComponent("el-button"), Y = resolveComponent("el-pagination"), q = resolveDirective("loading");
10845
+ buildExportConfigs: M
10846
+ }), (F, H) => {
10847
+ const j = resolveComponent("el-button"), q = resolveComponent("el-pagination"), X = resolveDirective("loading");
10844
10848
  return openBlock(), createElementBlock("div", {
10845
10849
  class: "yh-report-view-container",
10846
10850
  style: normalizeStyle(g.value)
@@ -10851,38 +10855,38 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10851
10855
  ref_key: "conditionsRef",
10852
10856
  ref: s,
10853
10857
  onAddCell: w,
10854
- onChange: b
10858
+ onChange: $
10855
10859
  }, {
10856
10860
  search: withCtx(() => [
10857
- $.value ? (openBlock(), createBlock(V, {
10861
+ x.value ? (openBlock(), createBlock(j, {
10858
10862
  key: 0,
10859
10863
  type: "primary",
10860
- onClick: A
10864
+ onClick: O
10861
10865
  }, {
10862
10866
  default: withCtx(() => [
10863
10867
  createTextVNode(toDisplayString(unref(rct)("搜索")), 1)
10864
10868
  ]),
10865
10869
  _: 1
10866
10870
  })) : createCommentVNode("", !0),
10867
- k.value ? (openBlock(), createBlock(V, {
10871
+ N.value ? (openBlock(), createBlock(j, {
10868
10872
  key: 1,
10869
10873
  text: "",
10870
10874
  type: "primary",
10871
10875
  onClick: L
10872
10876
  }, {
10873
10877
  default: withCtx(() => [
10874
- createTextVNode(toDisplayString(unref(rct)(F.value)), 1)
10878
+ createTextVNode(toDisplayString(unref(rct)(U.value)), 1)
10875
10879
  ]),
10876
10880
  _: 1
10877
10881
  })) : createCommentVNode("", !0),
10878
- E.value && k.value ? (openBlock(), createBlock(V, {
10882
+ E.value && N.value ? (openBlock(), createBlock(j, {
10879
10883
  key: 2,
10880
10884
  text: "",
10881
10885
  type: "primary",
10882
- onClick: x
10886
+ onClick: T
10883
10887
  }, {
10884
10888
  default: withCtx(() => [
10885
- createTextVNode(toDisplayString(unref(rct)(F.value)) + toDisplayString(unref(rct)("全部")), 1)
10889
+ createTextVNode(toDisplayString(unref(rct)(U.value)) + toDisplayString(unref(rct)("全部")), 1)
10886
10890
  ]),
10887
10891
  _: 1
10888
10892
  })) : createCommentVNode("", !0)
@@ -10901,14 +10905,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10901
10905
  ref: c
10902
10906
  }, null, 512)
10903
10907
  ])), [
10904
- [q, D.value]
10908
+ [X, b.value]
10905
10909
  ]),
10906
- E.value ? withDirectives((openBlock(), createBlock(Y, {
10910
+ E.value ? withDirectives((openBlock(), createBlock(q, {
10907
10911
  key: 0,
10908
10912
  pageSize: y.pageSize,
10909
- "onUpdate:pageSize": G[0] || (G[0] = (W) => y.pageSize = W),
10913
+ "onUpdate:pageSize": H[0] || (H[0] = (K) => y.pageSize = K),
10910
10914
  "current-page": y.pageIndex,
10911
- "onUpdate:currentPage": G[1] || (G[1] = (W) => y.pageIndex = W),
10915
+ "onUpdate:currentPage": H[1] || (H[1] = (K) => y.pageIndex = K),
10912
10916
  "page-sizes": y.pageSizes,
10913
10917
  total: y.total,
10914
10918
  layout: "total, jumper, prev, pager, next, sizes"
@@ -11151,8 +11155,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11151
11155
  }));
11152
11156
  const n = t, o = r, i = inject("isPrintMode", computed(() => !1)), a = inject("printConfig", void 0), s = computed(() => {
11153
11157
  let C = {};
11154
- return colors.forEach((w, b) => {
11155
- C[`color${b}`] = w;
11158
+ return colors.forEach((w, $) => {
11159
+ C[`color${$}`] = w;
11156
11160
  }), C;
11157
11161
  }), l = ref(!1), c = ref(), u = ref([]), f = computed(() => u.value.length === 1), d = computed(() => u.value[0]), p = computed(() => f.value ? {
11158
11162
  backgroundColor: n.config.singleColor || colors[0]
@@ -11169,103 +11173,103 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11169
11173
  }), g = computed(() => n.config ? `${n.config.height}px` : "10px"), _ = async (C) => {
11170
11174
  if (C && Object.keys(C).length > 0) {
11171
11175
  const w = cloneDeep(n.config);
11172
- await $(w, C);
11176
+ await x(w, C);
11173
11177
  }
11174
11178
  }, E = {
11175
11179
  SUM(C) {
11176
- return C.map((b) => Number(b)).filter((b) => !isNaN(b)).reduce((b, N) => b + N, 0);
11180
+ return C.map(($) => Number($)).filter(($) => !isNaN($)).reduce(($, I) => $ + I, 0);
11177
11181
  },
11178
11182
  AVG(C) {
11179
- const w = C.map((b) => Number(b)).filter((b) => !isNaN(b));
11183
+ const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11180
11184
  return w.length ? E.SUM(w) / w.length : 0;
11181
11185
  },
11182
11186
  MAX(C) {
11183
- const w = C.map((b) => Number(b)).filter((b) => !isNaN(b));
11187
+ const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11184
11188
  return w.length ? Math.max(...w) : 0;
11185
11189
  },
11186
11190
  MIN(C) {
11187
- const w = C.map((b) => Number(b)).filter((b) => !isNaN(b));
11191
+ const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11188
11192
  return w.length ? Math.min(...w) : 0;
11189
11193
  },
11190
11194
  COUNT(C) {
11191
11195
  return C.length;
11192
11196
  }
11193
- }, $ = async (C, w) => {
11197
+ }, x = async (C, w) => {
11194
11198
  const {
11195
- data: { source: b },
11196
- notSingle: N,
11197
- keyIds: R,
11198
- dataIds: A,
11199
- groupBy: k,
11200
- orderBy: F,
11199
+ data: { source: $ },
11200
+ notSingle: I,
11201
+ keyIds: A,
11202
+ dataIds: O,
11203
+ groupBy: N,
11204
+ orderBy: U,
11201
11205
  cutLength: L,
11202
- singleComputed: O,
11203
- singleKey: x,
11204
- singleData: D
11206
+ singleComputed: M,
11207
+ singleKey: T,
11208
+ singleData: b
11205
11209
  } = C;
11206
- let T = {};
11207
- w && (T = {
11210
+ let D = {};
11211
+ w && (D = {
11208
11212
  ...w
11209
11213
  });
11210
- for (let S = 0; S < b.length; S++) {
11211
- const { key: I, url: B } = b[S];
11214
+ for (let S = 0; S < $.length; S++) {
11215
+ const { key: R, url: k } = $[S];
11212
11216
  try {
11213
- const j = (await getDateSourceData(B, { id: n.id })).data;
11214
- T[I] = j;
11215
- } catch (j) {
11217
+ const G = (await getDateSourceData(k, { id: n.id })).data;
11218
+ D[R] = G;
11219
+ } catch (G) {
11216
11220
  return o("report-error", {
11217
11221
  index: n.index,
11218
- message: getErrorMessage(j)
11222
+ message: getErrorMessage(G)
11219
11223
  }), l.value = !1, !1;
11220
11224
  }
11221
11225
  }
11222
- if (Object.keys(T).length === 0)
11226
+ if (Object.keys(D).length === 0)
11223
11227
  return l.value = !1, !1;
11224
- if (u.value = [], N) {
11225
- if (R.length < 2 || A.length < 2)
11228
+ if (u.value = [], I) {
11229
+ if (A.length < 2 || O.length < 2)
11226
11230
  return l.value = !1, !1;
11227
- let S = "", I = "";
11228
- R.length > 2 ? (S = R.splice(0, 2).join("."), I = R.at(0)) : (S = R.at(0), I = R.at(1));
11229
- let B = get(T, S);
11230
- if (!B)
11231
+ let S = "", R = "";
11232
+ A.length > 2 ? (S = A.splice(0, 2).join("."), R = A.at(0)) : (S = A.at(0), R = A.at(1));
11233
+ let k = get(D, S);
11234
+ if (!k)
11231
11235
  return l.value = !1, !1;
11232
- let j = B.map((ae) => ae[I]), X = "", Z = "";
11233
- A.length > 2 ? (X = A.splice(0, 2).join("."), Z = A.at(0)) : (X = A.at(0), Z = A.at(1));
11234
- let Q = [], ee = {}, ie = get(T, X);
11235
- if (!ie)
11236
+ let G = k.map((ie) => ie[R]), W = "", ee = "";
11237
+ O.length > 2 ? (W = O.splice(0, 2).join("."), ee = O.at(0)) : (W = O.at(0), ee = O.at(1));
11238
+ let J = [], ne = {}, ae = get(D, W);
11239
+ if (!ae)
11236
11240
  return l.value = !1, !1;
11237
- ie.map((ae) => {
11238
- let se = ae[I], U = ae[Z];
11239
- k ? se && j.includes(se) && (ee[se] ? ee[se].push(U) : ee[se] = [U]) : se && j.includes(se) && Q.push({
11241
+ ae.map((ie) => {
11242
+ let se = ie[R], F = ie[ee];
11243
+ N ? se && G.includes(se) && (ne[se] ? ne[se].push(F) : ne[se] = [F]) : se && G.includes(se) && J.push({
11240
11244
  label: se,
11241
- value: U
11245
+ value: F
11242
11246
  });
11243
- }), k && (Q = Object.keys(ee).map((ae) => {
11244
- let se = ee[ae];
11247
+ }), N && (J = Object.keys(ne).map((ie) => {
11248
+ let se = ne[ie];
11245
11249
  return {
11246
- label: ae,
11250
+ label: ie,
11247
11251
  value: E.SUM(se)
11248
11252
  };
11249
- })), !isNaN(L) && L > 0 && (Q = Q.splice(0, L)), u.value = Q;
11253
+ })), !isNaN(L) && L > 0 && (J = J.splice(0, L)), u.value = J;
11250
11254
  } else {
11251
- if (!D || D.length === 0)
11255
+ if (!b || b.length === 0)
11252
11256
  return l.value = !1, !1;
11253
- let S = "", I = "";
11254
- D.length > 2 ? (S = D.splice(0, 2).join("."), I = D.at(0)) : (S = D.at(0), I = D.at(1));
11255
- let B = get(T, S);
11256
- if (!B)
11257
+ let S = "", R = "";
11258
+ b.length > 2 ? (S = b.splice(0, 2).join("."), R = b.at(0)) : (S = b.at(0), R = b.at(1));
11259
+ let k = get(D, S);
11260
+ if (!k)
11257
11261
  return l.value = !1, !1;
11258
- let j = B.map((X) => X[I]);
11259
- O && (j = E[O](j)), u.value.push({
11260
- label: x,
11261
- value: j
11262
+ let G = k.map((W) => W[R]);
11263
+ M && (G = E[M](G)), u.value.push({
11264
+ label: T,
11265
+ value: G
11262
11266
  });
11263
11267
  }
11264
11268
  l.value = !1;
11265
11269
  }, y = async () => {
11266
11270
  l.value = !0;
11267
11271
  let C = cloneDeep(n.config);
11268
- C && $(C);
11272
+ C && x(C);
11269
11273
  };
11270
11274
  e({
11271
11275
  setOutData: _,
@@ -11274,21 +11278,21 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11274
11278
  y();
11275
11279
  });
11276
11280
  function v() {
11277
- var O;
11281
+ var M;
11278
11282
  if (!u.value.length) return null;
11279
- const C = Math.max(((O = c.value) == null ? void 0 : O.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, b = 2, N = document.createElement("canvas");
11280
- N.width = Math.round(C * b), N.height = Math.round(w * b);
11281
- const R = N.getContext("2d");
11282
- if (!R) return null;
11283
- R.scale(b, b);
11284
- const A = u.value, k = C / A.length, F = 14, L = Math.max(Math.round(w / 3.5), 12);
11285
- return A.forEach((x, D) => {
11286
- const T = D * k;
11287
- R.fillStyle = f.value ? n.config.singleColor || colors[0] : colors[D % colors.length], R.fillRect(T, 0, k, w), R.fillStyle = "#fff", R.textAlign = "center", R.textBaseline = "top", R.font = `${F}px sans-serif`, R.fillText(String(x.label ?? ""), T + k / 2, w * 0.08, k - 8), R.font = `bold ${L}px sans-serif`, R.fillText(String(x.value ?? ""), T + k / 2, w * 0.28, k - 8);
11288
- }), { base64: N.toDataURL("image/png"), width: C, height: w };
11283
+ const C = Math.max(((M = c.value) == null ? void 0 : M.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, $ = 2, I = document.createElement("canvas");
11284
+ I.width = Math.round(C * $), I.height = Math.round(w * $);
11285
+ const A = I.getContext("2d");
11286
+ if (!A) return null;
11287
+ A.scale($, $);
11288
+ const O = u.value, N = C / O.length, U = 14, L = Math.max(Math.round(w / 3.5), 12);
11289
+ return O.forEach((T, b) => {
11290
+ const D = b * N;
11291
+ A.fillStyle = f.value ? n.config.singleColor || colors[0] : colors[b % colors.length], A.fillRect(D, 0, N, w), A.fillStyle = "#fff", A.textAlign = "center", A.textBaseline = "top", A.font = `${U}px sans-serif`, A.fillText(String(T.label ?? ""), D + N / 2, w * 0.08, N - 8), A.font = `bold ${L}px sans-serif`, A.fillText(String(T.value ?? ""), D + N / 2, w * 0.28, N - 8);
11292
+ }), { base64: I.toDataURL("image/png"), width: C, height: w };
11289
11293
  }
11290
11294
  return (C, w) => {
11291
- const b = resolveDirective("loading");
11295
+ const $ = resolveDirective("loading");
11292
11296
  return withDirectives((openBlock(), createElementBlock("div", {
11293
11297
  ref_key: "rootRef",
11294
11298
  ref: c,
@@ -11299,15 +11303,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11299
11303
  f.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11300
11304
  createElementVNode("div", _hoisted_2$3, toDisplayString(d.value.label), 1),
11301
11305
  createElementVNode("div", _hoisted_3$2, toDisplayString(d.value.value), 1)
11302
- ], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(u.value, (N, R) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
11303
- createElementVNode("div", _hoisted_5$2, toDisplayString(N.label), 1),
11304
- createElementVNode("div", _hoisted_6$2, toDisplayString(N.value), 1)
11306
+ ], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(u.value, (I, A) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
11307
+ createElementVNode("div", _hoisted_5$2, toDisplayString(I.label), 1),
11308
+ createElementVNode("div", _hoisted_6$2, toDisplayString(I.value), 1)
11305
11309
  ]))), 256)),
11306
11310
  unref(i) ? (openBlock(), createElementBlock("div", _hoisted_7$1, [...w[0] || (w[0] = [
11307
11311
  createElementVNode("span", null, "仅展示,打印时会忽略", -1)
11308
11312
  ])])) : createCommentVNode("", !0)
11309
11313
  ], 14, _hoisted_1$3)), [
11310
- [b, l.value]
11314
+ [$, l.value]
11311
11315
  ]);
11312
11316
  };
11313
11317
  }
@@ -11363,13 +11367,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11363
11367
  C.style.position = "fixed", C.style.left = "-9999px", C.style.top = "-9999px", C.style.width = "0", C.style.height = "0", C.style.border = "none", document.body.appendChild(C);
11364
11368
  const w = C.contentDocument;
11365
11369
  w.open(), w.write(v), w.close(), C.onload = () => {
11366
- const b = C.contentWindow, N = document.title;
11370
+ const $ = C.contentWindow, I = document.title;
11367
11371
  r.statementName && (document.title = r.statementName);
11368
- const R = () => {
11369
- document.title = N;
11372
+ const A = () => {
11373
+ document.title = I;
11370
11374
  };
11371
- b.addEventListener("afterprint", R), b.print(), R(), setTimeout(() => {
11372
- b.removeEventListener("afterprint", R), C.remove(), l.value = !1;
11375
+ $.addEventListener("afterprint", A), $.print(), A(), setTimeout(() => {
11376
+ $.removeEventListener("afterprint", A), C.remove(), l.value = !1;
11373
11377
  }, 500);
11374
11378
  };
11375
11379
  }
@@ -11384,37 +11388,37 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11384
11388
  await nextTick();
11385
11389
  try {
11386
11390
  let C = function() {
11387
- L.length > 0 && (F.push({ items: L }), L = [], O = 0);
11391
+ L.length > 0 && (U.push({ items: L }), L = [], M = 0);
11388
11392
  }, w = function() {
11389
- if (R)
11390
- for (; x.length > 0; ) {
11391
- const T = x[0], S = N - O;
11393
+ if (A)
11394
+ for (; T.length > 0; ) {
11395
+ const D = T[0], S = I - M;
11392
11396
  if (S <= 0) {
11393
11397
  if (L.length === 0) break;
11394
11398
  C();
11395
11399
  continue;
11396
11400
  }
11397
- let I = splitNextReportPage(T.state, S, A, N);
11398
- if (!I) {
11401
+ let R = splitNextReportPage(D.state, S, O, I);
11402
+ if (!R) {
11399
11403
  if (L.length > 0) {
11400
11404
  C();
11401
11405
  continue;
11402
11406
  }
11403
- I = splitNextReportPage(T.state, S, A, N, !0);
11407
+ R = splitNextReportPage(D.state, S, O, I, !0);
11404
11408
  }
11405
- L.push({ type: "report", dom: I.dom }), O += I.height, T.state.currentRowIdx >= T.state.visibleRows.length && x.shift();
11409
+ L.push({ type: "report", dom: R.dom }), M += R.height, D.state.currentRowIdx >= D.state.visibleRows.length && T.shift();
11406
11410
  }
11407
11411
  };
11408
- r.silentRender && await $();
11409
- const b = !!r.autoPrint, N = getPrintContentHeightPxMeasured(r.printConfig), R = N != null, A = getPrintContentWidthPxMeasured(r.printConfig), k = [];
11410
- for (let T = 0; T < r.configs.length; T++) {
11411
- const S = r.configs[T];
11412
+ r.silentRender && await x();
11413
+ const $ = !!r.autoPrint, I = getPrintContentHeightPxMeasured(r.printConfig), A = I != null, O = getPrintContentWidthPxMeasured(r.printConfig), N = [];
11414
+ for (let D = 0; D < r.configs.length; D++) {
11415
+ const S = r.configs[D];
11412
11416
  if (S.type === "report") {
11413
- const I = d().get(T);
11414
- if (I && I.length > 0)
11415
- for (const j of I) {
11416
- const X = createReportSplitState(
11417
- j,
11417
+ const R = d().get(D);
11418
+ if (R && R.length > 0)
11419
+ for (const G of R) {
11420
+ const W = createReportSplitState(
11421
+ G,
11418
11422
  getThemeColors(S.theme || "none").border,
11419
11423
  {
11420
11424
  header: r.printConfig.header,
@@ -11424,16 +11428,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11424
11428
  theme: S.theme || "none"
11425
11429
  }
11426
11430
  );
11427
- await preGenerateBarcodes([{ config: X.config }]), k.push({ kind: "report", pending: { state: X } });
11431
+ await preGenerateBarcodes([{ config: W.config }]), N.push({ kind: "report", pending: { state: W } });
11428
11432
  }
11429
- const B = p().get(T);
11430
- if (B && B.length > 0)
11431
- for (let j = 0; j < B.length; j++) {
11432
- const X = B[j];
11433
- j > 0 && k.push({ kind: "break" });
11434
- for (const Z of X) {
11435
- const Q = createReportSplitState(
11436
- Z,
11433
+ const k = p().get(D);
11434
+ if (k && k.length > 0)
11435
+ for (let G = 0; G < k.length; G++) {
11436
+ const W = k[G];
11437
+ G > 0 && N.push({ kind: "break" });
11438
+ for (const ee of W) {
11439
+ const J = createReportSplitState(
11440
+ ee,
11437
11441
  getThemeColors(S.theme || "none").border,
11438
11442
  {
11439
11443
  header: r.printConfig.header,
@@ -11443,56 +11447,56 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11443
11447
  theme: S.theme || "none"
11444
11448
  }
11445
11449
  );
11446
- await preGenerateBarcodes([{ config: Q.config }]), k.push({ kind: "report", pending: { state: Q } });
11450
+ await preGenerateBarcodes([{ config: J.config }]), N.push({ kind: "report", pending: { state: J } });
11447
11451
  }
11448
11452
  }
11449
11453
  } else if (S.type === "label")
11450
11454
  continue;
11451
11455
  }
11452
- const F = [];
11453
- let L = [], O = 0;
11454
- const x = [];
11455
- if (R) {
11456
- for (const T of k) {
11457
- if (T.kind === "break") {
11456
+ const U = [];
11457
+ let L = [], M = 0;
11458
+ const T = [];
11459
+ if (A) {
11460
+ for (const D of N) {
11461
+ if (D.kind === "break") {
11458
11462
  C();
11459
11463
  continue;
11460
11464
  }
11461
- if (T.kind === "report") {
11462
- const S = T.pending;
11465
+ if (D.kind === "report") {
11466
+ const S = D.pending;
11463
11467
  w();
11464
- const I = N - O, B = splitNextReportPage(S.state, I, A, N);
11465
- B ? (L.push({ type: "report", dom: B.dom }), O += B.height, S.state.currentRowIdx < S.state.visibleRows.length && x.push(S)) : (L.length > 0 && C(), x.push(S));
11468
+ const R = I - M, k = splitNextReportPage(S.state, R, O, I);
11469
+ k ? (L.push({ type: "report", dom: k.dom }), M += k.height, S.state.currentRowIdx < S.state.visibleRows.length && T.push(S)) : (L.length > 0 && C(), T.push(S));
11466
11470
  }
11467
11471
  }
11468
11472
  w(), C();
11469
11473
  } else {
11470
- const T = r.printConfig, S = mmToPx(T.marginTop + T.marginBottom), I = [];
11471
- for (const B of k) {
11472
- if (B.kind === "break") {
11473
- const j = document.createElement("div");
11474
- j.style.height = `${S}px`, I.push({ type: "spacer", dom: j });
11474
+ const D = r.printConfig, S = mmToPx(D.marginTop + D.marginBottom), R = [];
11475
+ for (const k of N) {
11476
+ if (k.kind === "break") {
11477
+ const G = document.createElement("div");
11478
+ G.style.height = `${S}px`, R.push({ type: "spacer", dom: G });
11475
11479
  continue;
11476
11480
  }
11477
- if (B.kind === "report") {
11478
- const { state: j } = B.pending, { rowConfig: X, colConfig: Z, config: Q } = j, ee = renderReportByDomForPrint(X, Z, Q, j.themeColor, j.theme);
11479
- I.push({ type: "report", dom: ee });
11481
+ if (k.kind === "report") {
11482
+ const { state: G } = k.pending, { rowConfig: W, colConfig: ee, config: J } = G, ne = renderReportByDomForPrint(W, ee, J, G.themeColor, G.theme);
11483
+ R.push({ type: "report", dom: ne });
11480
11484
  }
11481
11485
  }
11482
- F.push({ items: I });
11486
+ U.push({ items: R });
11483
11487
  }
11484
- a.value = F.map((T) => T.items), await nextTick(), s.value.forEach((T) => T.remove()), s.value = [];
11485
- const D = i.value;
11486
- for (let T = 0; T < D.length && T < F.length; T++) {
11487
- const S = D[T];
11488
+ a.value = U.map((D) => D.items), await nextTick(), s.value.forEach((D) => D.remove()), s.value = [];
11489
+ const b = i.value;
11490
+ for (let D = 0; D < b.length && D < U.length; D++) {
11491
+ const S = b[D];
11488
11492
  S.innerHTML = "";
11489
- const I = F[T].items;
11490
- for (const B of I) {
11491
- const j = B.dom.cloneNode(!0);
11492
- S.appendChild(j), s.value.push(j);
11493
+ const R = U[D].items;
11494
+ for (const k of R) {
11495
+ const G = k.dom.cloneNode(!0);
11496
+ S.appendChild(G), s.value.push(G);
11493
11497
  }
11494
11498
  }
11495
- b && (await nextTick(), E(), setTimeout(() => {
11499
+ $ && (await nextTick(), E(), setTimeout(() => {
11496
11500
  n("update:visible", !1);
11497
11501
  }, 1e3));
11498
11502
  } finally {
@@ -11500,44 +11504,44 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11500
11504
  }
11501
11505
  }
11502
11506
  );
11503
- async function $() {
11507
+ async function x() {
11504
11508
  u.value = /* @__PURE__ */ new Map(), f.value = /* @__PURE__ */ new Map();
11505
11509
  const y = r.fetchAll !== !1;
11506
11510
  for (let v = 0; v < r.configs.length; v++) {
11507
11511
  const C = r.configs[v];
11508
11512
  if (C.type !== "report") continue;
11509
- const w = C, b = w.data, N = w.tableConfig;
11510
- if (!b || !N || !b.source) continue;
11511
- const R = buildPrintParamsFromConfig(w, c.query), { resData: A } = await fetchReportData(
11512
- { id: r.reportId ?? "", data: b, tableConfig: N },
11513
- R,
11514
- { pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!b.pagination },
11513
+ const w = C, $ = w.data, I = w.tableConfig;
11514
+ if (!$ || !I || !$.source) continue;
11515
+ const A = buildPrintParamsFromConfig(w, c.query), { resData: O } = await fetchReportData(
11516
+ { id: r.reportId ?? "", data: $, tableConfig: I },
11517
+ A,
11518
+ { pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!$.pagination },
11515
11519
  y
11516
11520
  );
11517
- let k = toUpdateData(A);
11518
- b.processData && (k = await getProcessData(b.processData, k, R, {
11521
+ let N = toUpdateData(O);
11522
+ $.processData && (N = await getProcessData($.processData, N, A, {
11519
11523
  pageSize: 5e3,
11520
11524
  pageIndex: 1,
11521
11525
  total: 0
11522
11526
  }));
11523
- const F = b.source, L = F.find((O) => O.loopTable);
11527
+ const U = $.source, L = U.find((M) => M.loopTable);
11524
11528
  if (L && L.key) {
11525
- const O = await renderReportToConfigs(
11529
+ const M = await renderReportToConfigs(
11530
+ I,
11526
11531
  N,
11527
- k,
11528
- F,
11532
+ U,
11529
11533
  [],
11530
11534
  L.key
11531
11535
  );
11532
- f.value.set(v, O);
11536
+ f.value.set(v, M);
11533
11537
  } else {
11534
- const O = await renderReportToConfigs(
11538
+ const M = await renderReportToConfigs(
11539
+ I,
11535
11540
  N,
11536
- k,
11537
- F,
11541
+ U,
11538
11542
  []
11539
11543
  );
11540
- u.value.set(v, O);
11544
+ u.value.set(v, M);
11541
11545
  }
11542
11546
  }
11543
11547
  }
@@ -11612,179 +11616,181 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11612
11616
  setup(t, { emit: e }) {
11613
11617
  const r = t;
11614
11618
  ref();
11615
- const n = ref(!1), o = ref(""), i = ref(""), a = ref([]), s = ref(), l = ref([]), c = ref([]), u = ref({ ...DEFAULT_PRINT_CONFIG }), f = {}, d = computed(() => {
11616
- var O;
11617
- return !!((O = u.value) != null && O.enabled);
11619
+ const n = ref(!1), o = ref(""), i = ref(""), a = ref([]), s = ref(), l = ref([]), c = ref([]), u = ref({ ...DEFAULT_PRINT_CONFIG }), f = ref({ ...DEFAULT_EXPORT_CONFIG }), d = {}, p = computed(() => {
11620
+ var T;
11621
+ return !!((T = u.value) != null && T.enabled);
11618
11622
  });
11619
- provide("printConfig", u), provide("isPrintMode", d);
11620
- const p = computed(() => {
11621
- if (!d.value) return {};
11622
- const O = u.value;
11623
+ provide("printConfig", u), provide("isPrintMode", p);
11624
+ const m = computed(() => {
11625
+ if (!p.value) return {};
11626
+ const T = u.value;
11623
11627
  return {
11624
- "--print-content-width": `${mmToPx(O.width - O.marginLeft - O.marginRight)}px`
11628
+ "--print-content-width": `${mmToPx(T.width - T.marginLeft - T.marginRight)}px`
11625
11629
  };
11626
11630
  });
11627
11631
  watch(
11628
11632
  () => r.id,
11629
- (O) => {
11630
- m(O);
11633
+ (T) => {
11634
+ g(T);
11631
11635
  }
11632
11636
  );
11633
- function m(O) {
11634
- O ? (i.value = "", a.value = [], n.value = !0, getConfig(O).then(async (x) => {
11635
- let { name: D, remoteOptions: T, printConfig: S } = x;
11636
- o.value = D, c.value = T, S && (u.value = { ...DEFAULT_PRINT_CONFIG, ...S });
11637
- }).catch((x) => {
11638
- console.error("获取报表配置失败:", x), i.value = getErrorMessage(x);
11637
+ function g(T) {
11638
+ T ? (i.value = "", a.value = [], n.value = !0, getConfig(T).then(async (b) => {
11639
+ let { name: D, remoteOptions: S, printConfig: R, exportConfig: k } = b;
11640
+ o.value = D, c.value = S, R && (u.value = { ...DEFAULT_PRINT_CONFIG, ...R }), f.value = { ...DEFAULT_EXPORT_CONFIG, ...k || {} };
11641
+ }).catch((b) => {
11642
+ console.error("获取报表配置失败:", b), i.value = getErrorMessage(b);
11639
11643
  }).finally(() => {
11640
11644
  n.value = !1;
11641
11645
  })) : i.value = "报表ID不能为空";
11642
11646
  }
11643
- function g({ index: O, message: x }) {
11644
- a.value.some((D) => D.key === O) || a.value.push({ key: O, message: x });
11647
+ function _({ index: T, message: b }) {
11648
+ a.value.some((D) => D.key === T) || a.value.push({ key: T, message: b });
11645
11649
  }
11646
- function _(O) {
11647
- const x = a.value.indexOf(O);
11648
- x > -1 && a.value.splice(x, 1);
11650
+ function E(T) {
11651
+ const b = a.value.indexOf(T);
11652
+ b > -1 && a.value.splice(b, 1);
11649
11653
  }
11650
- const E = ref(!1);
11651
- function $(O) {
11652
- f[O.key] = O.data, l.value.forEach((x) => {
11654
+ const x = ref(!1);
11655
+ function y(T) {
11656
+ d[T.key] = T.data, l.value.forEach((b) => {
11653
11657
  var D;
11654
- (D = x == null ? void 0 : x.setOutData) == null || D.call(x, f);
11658
+ (D = b == null ? void 0 : b.setOutData) == null || D.call(b, d);
11655
11659
  });
11656
11660
  }
11657
- function y(O, x) {
11658
- O ? l.value[x] = O : delete l.value[x];
11659
- }
11660
- async function v() {
11661
- var j, X;
11662
- const O = F.value || [], x = c.value.filter((Z) => Z.type === "report").length, D = c.value.length - x;
11663
- let T = 0, S = 0;
11664
- const I = [], B = [];
11665
- for (let Z = 0; Z < c.value.length; Z++) {
11666
- const Q = c.value[Z];
11667
- if (Q.type === "report") {
11668
- const ee = O[T];
11669
- if (T += 1, !(ee != null && ee.buildExportConfigs)) continue;
11670
- w(`正在获取表格数据(${T}/${x})...`);
11671
- const ie = await ee.buildExportConfigs();
11661
+ function v(T, b) {
11662
+ T ? l.value[b] = T : delete l.value[b];
11663
+ }
11664
+ async function C() {
11665
+ var W, ee;
11666
+ const T = L.value || [], b = c.value.filter((J) => J.type === "report").length, D = c.value.length - b;
11667
+ let S = 0, R = 0;
11668
+ const k = [], G = [];
11669
+ for (let J = 0; J < c.value.length; J++) {
11670
+ const ne = c.value[J];
11671
+ if (ne.type === "report") {
11672
+ const ae = T[S];
11673
+ if (S += 1, !(ae != null && ae.buildExportConfigs)) continue;
11674
+ $(`正在获取表格数据(${S}/${b})...`);
11675
+ const ie = await ae.buildExportConfigs(!!f.value.exportAll);
11672
11676
  if (!ie) continue;
11673
- const ae = getThemeColors(Q.theme || "none").border;
11674
- I.push({ type: "report", reportConfig: ie, subReportIndex: Q.subReprotIndex || 0 }), ie.forEach((se) => B.push({ type: "report", reportConfig: se, themeColor: ae, theme: Q.theme || "none" }));
11677
+ const se = getThemeColors(ne.theme || "none").border;
11678
+ k.push({ type: "report", reportConfig: ie, subReportIndex: ne.subReprotIndex || 0 }), ie.forEach((F) => G.push({ type: "report", reportConfig: F, themeColor: se, theme: ne.theme || "none" }));
11675
11679
  } else {
11676
- S += 1, w(`正在截取图表/指标卡(${S}/${D})...`);
11677
- const ee = l.value[Z];
11678
- if (!ee) continue;
11680
+ R += 1, $(`正在截取图表/指标卡(${R}/${D})...`);
11681
+ const ae = l.value[J];
11682
+ if (!ae) continue;
11679
11683
  let ie = null;
11680
- Q.type === "label" ? ie = ((j = ee.getLabelImage) == null ? void 0 : j.call(ee)) || null : ie = ((X = ee.getChartImage) == null ? void 0 : X.call(ee)) || null, ie && (I.push({ type: "image", image: ie }), B.push({
11684
+ ne.type === "label" ? ie = ((W = ae.getLabelImage) == null ? void 0 : W.call(ae)) || null : ie = ((ee = ae.getChartImage) == null ? void 0 : ee.call(ae)) || null, ie && (k.push({ type: "image", image: ie }), G.push({
11681
11685
  type: "image",
11682
11686
  src: ie.base64,
11683
11687
  width: ie.width,
11684
11688
  height: ie.height,
11685
- stretch: Q.type !== "label"
11689
+ stretch: ne.type !== "label"
11686
11690
  }));
11687
11691
  }
11688
11692
  }
11689
- return { mergeItems: I, printItems: B };
11693
+ return { mergeItems: k, printItems: G };
11690
11694
  }
11691
- let C = null;
11692
- function w(O) {
11693
- C || (C = ElLoading.service({
11695
+ let w = null;
11696
+ function $(T) {
11697
+ w || (w = ElLoading.service({
11694
11698
  target: s.value ?? void 0,
11695
11699
  background: "rgba(255, 255, 255, 0.75)"
11696
- })), C.setText(O);
11700
+ })), w.setText(T);
11697
11701
  }
11698
- function b() {
11699
- C == null || C.close(), C = null;
11702
+ function I() {
11703
+ w == null || w.close(), w = null;
11700
11704
  }
11701
- async function N(O) {
11702
- w("正在准备导出...");
11705
+ async function A(T) {
11706
+ $("正在准备导出...");
11703
11707
  try {
11704
- const { mergeItems: x, printItems: D } = await v();
11705
- if (!x.length) {
11708
+ const { mergeItems: b, printItems: D } = await C();
11709
+ if (!b.length) {
11706
11710
  ElMessage.warning("当前报表没有可导出的内容");
11707
11711
  return;
11708
11712
  }
11709
- if (O === "excel") {
11710
- w("正在生成 Excel 文件...");
11711
- const T = await exportReportMerged(x, o.value || "报表导出", "gray");
11712
- T && downloadReport(T, o.value || "报表导出", "excel");
11713
- } else O.startsWith("pdf") && await exportReportByBrowser(D, u.value, o.value, {
11714
- onProgress: (T) => w(T),
11715
- orientation: O === "pdf-landscape" ? "landscape" : "portrait",
11716
- singlePage: O === "pdf-single"
11713
+ if (T === "excel") {
11714
+ $("正在生成 Excel 文件...");
11715
+ const S = await exportReportMerged(b, o.value || "报表导出", "gray");
11716
+ S && downloadReport(S, o.value || "报表导出", "excel");
11717
+ } else T.startsWith("pdf") && await exportReportByBrowser(D, u.value, o.value, {
11718
+ onProgress: (S) => $(S),
11719
+ orientation: T === "pdf-landscape" ? "landscape" : "portrait",
11720
+ singlePage: T === "pdf-single"
11717
11721
  });
11718
11722
  } finally {
11719
- b();
11723
+ I();
11720
11724
  }
11721
11725
  }
11722
- const R = ref(!1), A = ref(/* @__PURE__ */ new Map()), k = ref(/* @__PURE__ */ new Map()), F = ref([]);
11723
- async function L() {
11724
- var D, T;
11725
- if (F.value) {
11726
- const S = F.value.filter((I) => I && typeof I.renderHandler == "function").map((I) => I.renderHandler());
11727
- S.length > 0 && (n.value = !0, await Promise.all(S), n.value = !1);
11726
+ const O = ref(!1), N = ref(/* @__PURE__ */ new Map()), U = ref(/* @__PURE__ */ new Map()), L = ref([]);
11727
+ async function M() {
11728
+ var D, S;
11729
+ if (L.value) {
11730
+ const R = L.value.filter((k) => k && typeof k.renderHandler == "function").map((k) => k.renderHandler());
11731
+ R.length > 0 && (n.value = !0, await Promise.all(R), n.value = !1);
11728
11732
  }
11729
- const O = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
11730
- if (F.value) {
11731
- for (let S = 0; S < c.value.length; S++)
11732
- if (c.value[S].type === "report") {
11733
- const I = F.value.find((B, j) => c.value.filter((Z) => Z.type === "report")[j] === c.value[S]);
11734
- I && ((T = (D = c.value[S].data) == null ? void 0 : D.source) != null && T.some((B) => B.loopTable) ? I.batchTableConfigs && x.set(
11735
- S,
11736
- I.batchTableConfigs.map((B) => B.length > 0 ? [B[0]] : [])
11737
- ) : I.tableConfig && O.set(S, I.tableConfig.length > 0 ? [I.tableConfig[0]] : []));
11733
+ const T = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
11734
+ if (L.value) {
11735
+ for (let R = 0; R < c.value.length; R++)
11736
+ if (c.value[R].type === "report") {
11737
+ const k = L.value.find((G, W) => c.value.filter((J) => J.type === "report")[W] === c.value[R]);
11738
+ k && ((S = (D = c.value[R].data) == null ? void 0 : D.source) != null && S.some((G) => G.loopTable) ? k.batchTableConfigs && b.set(
11739
+ R,
11740
+ k.batchTableConfigs.map((G) => G.length > 0 ? [G[0]] : [])
11741
+ ) : k.tableConfig && T.set(R, k.tableConfig.length > 0 ? [k.tableConfig[0]] : []));
11738
11742
  }
11739
11743
  }
11740
- A.value = O, k.value = x, R.value = !0;
11744
+ N.value = T, U.value = b, O.value = !0;
11741
11745
  }
11742
11746
  return onMounted(() => {
11743
- m(r.id);
11744
- }), (O, x) => {
11747
+ g(r.id);
11748
+ }), (T, b) => {
11745
11749
  const D = resolveDirective("loading");
11746
11750
  return openBlock(), createElementBlock(Fragment, null, [
11747
11751
  createElementVNode("div", _hoisted_1$1, [
11748
11752
  createElementVNode("span", _hoisted_2$1, toDisplayString(o.value), 1),
11749
- d.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
11753
+ p.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
11750
11754
  createVNode(unref(ElDropdown), {
11751
11755
  trigger: "click",
11752
- onCommand: N
11756
+ onCommand: A
11753
11757
  }, {
11754
11758
  dropdown: withCtx(() => [
11755
11759
  createVNode(unref(ElDropdownMenu), null, {
11756
11760
  default: withCtx(() => [
11757
11761
  createVNode(unref(ElDropdownItem), { command: "excel" }, {
11758
- default: withCtx(() => [...x[2] || (x[2] = [
11759
- createElementVNode("i", { class: "yhreport-icon report-excel" }, null, -1),
11760
- createTextVNode("导出Excel", -1)
11761
- ])]),
11762
- _: 1
11763
- }),
11764
- createVNode(unref(ElDropdownItem), {
11765
- command: "pdf",
11766
- divided: ""
11767
- }, {
11768
- default: withCtx(() => [...x[3] || (x[3] = [
11769
- createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11770
- createTextVNode("导出PDF(纵向)", -1)
11771
- ])]),
11762
+ default: withCtx(() => [
11763
+ b[2] || (b[2] = createElementVNode("i", { class: "yhreport-icon report-excel" }, null, -1)),
11764
+ createTextVNode(toDisplayString(f.value.exportAll ? "导出Excel(全部数据)" : "导出Excel"), 1)
11765
+ ]),
11772
11766
  _: 1
11773
11767
  }),
11774
- createVNode(unref(ElDropdownItem), { command: "pdf-landscape" }, {
11775
- default: withCtx(() => [...x[4] || (x[4] = [
11776
- createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11777
- createTextVNode("导出PDF(横向)", -1)
11778
- ])]),
11779
- _: 1
11780
- }),
11781
- createVNode(unref(ElDropdownItem), { command: "pdf-single" }, {
11782
- default: withCtx(() => [...x[5] || (x[5] = [
11783
- createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11784
- createTextVNode("导出PDF(屏幕宽度)", -1)
11785
- ])]),
11786
- _: 1
11787
- })
11768
+ f.value.pdfEnabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11769
+ createVNode(unref(ElDropdownItem), {
11770
+ command: "pdf",
11771
+ divided: ""
11772
+ }, {
11773
+ default: withCtx(() => [...b[3] || (b[3] = [
11774
+ createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11775
+ createTextVNode("导出PDF(纵向)", -1)
11776
+ ])]),
11777
+ _: 1
11778
+ }),
11779
+ createVNode(unref(ElDropdownItem), { command: "pdf-landscape" }, {
11780
+ default: withCtx(() => [...b[4] || (b[4] = [
11781
+ createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11782
+ createTextVNode("导出PDF(横向)", -1)
11783
+ ])]),
11784
+ _: 1
11785
+ }),
11786
+ createVNode(unref(ElDropdownItem), { command: "pdf-single" }, {
11787
+ default: withCtx(() => [...b[5] || (b[5] = [
11788
+ createElementVNode("i", { class: "yhreport-icon report-pdf" }, null, -1),
11789
+ createTextVNode("导出PDF(屏幕宽度)", -1)
11790
+ ])]),
11791
+ _: 1
11792
+ })
11793
+ ], 64)) : createCommentVNode("", !0)
11788
11794
  ]),
11789
11795
  _: 1
11790
11796
  })
@@ -11794,7 +11800,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11794
11800
  type: "primary",
11795
11801
  size: "small"
11796
11802
  }, {
11797
- default: withCtx(() => [...x[1] || (x[1] = [
11803
+ default: withCtx(() => [...b[1] || (b[1] = [
11798
11804
  createElementVNode("i", { class: "yhreport-icon report-export" }, null, -1),
11799
11805
  createTextVNode(" 导出报表 ", -1)
11800
11806
  ])]),
@@ -11805,13 +11811,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11805
11811
  })
11806
11812
  ]))
11807
11813
  ]),
11808
- d.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
11814
+ p.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
11809
11815
  createVNode(unref(ElButton), {
11810
11816
  type: "primary",
11811
11817
  size: "small",
11812
- onClick: L
11818
+ onClick: M
11813
11819
  }, {
11814
- default: withCtx(() => [...x[6] || (x[6] = [
11820
+ default: withCtx(() => [...b[6] || (b[6] = [
11815
11821
  createTextVNode(" 打印预览 ", -1)
11816
11822
  ])]),
11817
11823
  _: 1
@@ -11825,69 +11831,69 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11825
11831
  }, null, 8, ["sub-title"])
11826
11832
  ])) : withDirectives((openBlock(), createElementBlock("section", {
11827
11833
  key: 2,
11828
- class: normalizeClass(["yh-report-viewer-wrapper", { "print-mode": d.value }]),
11829
- style: normalizeStyle(p.value),
11834
+ class: normalizeClass(["yh-report-viewer-wrapper", { "print-mode": p.value }]),
11835
+ style: normalizeStyle(m.value),
11830
11836
  ref_key: "viewWrapper",
11831
11837
  ref: s
11832
11838
  }, [
11833
- (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (T) => (openBlock(), createBlock(unref(ElAlert), {
11834
- key: T.key,
11839
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (S) => (openBlock(), createBlock(unref(ElAlert), {
11840
+ key: S.key,
11835
11841
  class: "yh-report-data-source-error",
11836
11842
  type: "error",
11837
11843
  "show-icon": "",
11838
11844
  closable: !0,
11839
- title: T.message,
11840
- onClose: (S) => _(T)
11845
+ title: S.message,
11846
+ onClose: (R) => E(S)
11841
11847
  }, null, 8, ["title", "onClose"]))), 128)),
11842
- (openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (T, S) => (openBlock(), createElementBlock(Fragment, null, [
11843
- T.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
11848
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (S, R) => (openBlock(), createElementBlock(Fragment, null, [
11849
+ S.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
11844
11850
  key: 0,
11845
- "is-print-mode": d.value,
11851
+ "is-print-mode": p.value,
11846
11852
  ref_for: !0,
11847
11853
  ref_key: "reportViewItemRefs",
11848
- ref: F,
11849
- index: S,
11854
+ ref: L,
11855
+ index: R,
11850
11856
  length: c.value.length,
11851
11857
  id: t.id,
11852
11858
  name: o.value,
11853
- config: T,
11854
- onUpdateData: $,
11855
- onReportError: g
11856
- }, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : T.type === "label" ? (openBlock(), createBlock(labelItem, {
11859
+ config: S,
11860
+ onUpdateData: y,
11861
+ onReportError: _
11862
+ }, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : S.type === "label" ? (openBlock(), createBlock(labelItem, {
11857
11863
  key: 1,
11858
11864
  ref_for: !0,
11859
- ref: (I) => y(I, S),
11860
- index: S,
11865
+ ref: (k) => v(k, R),
11866
+ index: R,
11861
11867
  length: c.value.length,
11862
11868
  id: t.id,
11863
- config: T,
11864
- onReportError: g
11869
+ config: S,
11870
+ onReportError: _
11865
11871
  }, null, 8, ["index", "length", "id", "config"])) : (openBlock(), createBlock(_sfc_main$4, {
11866
11872
  key: 2,
11867
11873
  ref_for: !0,
11868
- ref: (I) => y(I, S),
11869
- config: T,
11874
+ ref: (k) => v(k, R),
11875
+ config: S,
11870
11876
  id: t.id,
11871
- index: S,
11877
+ index: R,
11872
11878
  length: c.value.length
11873
11879
  }, null, 8, ["config", "id", "index", "length"]))
11874
11880
  ], 64))), 256)),
11875
- withDirectives(createElementVNode("div", _hoisted_6$1, [...x[7] || (x[7] = [
11881
+ withDirectives(createElementVNode("div", _hoisted_6$1, [...b[7] || (b[7] = [
11876
11882
  createElementVNode("i", { class: "iconfont icon-backtop" }, null, -1)
11877
11883
  ])], 512), [
11878
- [vShow, E.value]
11884
+ [vShow, x.value]
11879
11885
  ])
11880
11886
  ], 6)), [
11881
11887
  [D, n.value]
11882
11888
  ]),
11883
11889
  createVNode(_sfc_main$2, {
11884
- visible: R.value,
11885
- "onUpdate:visible": x[0] || (x[0] = (T) => R.value = T),
11890
+ visible: O.value,
11891
+ "onUpdate:visible": b[0] || (b[0] = (S) => O.value = S),
11886
11892
  configs: c.value,
11887
11893
  "print-config": u.value,
11888
11894
  "statement-name": o.value,
11889
- "table-configs": A.value,
11890
- "batch-table-configs": k.value
11895
+ "table-configs": N.value,
11896
+ "batch-table-configs": U.value
11891
11897
  }, null, 8, ["visible", "configs", "print-config", "statement-name", "table-configs", "batch-table-configs"])
11892
11898
  ], 64);
11893
11899
  };
@@ -12139,7 +12145,7 @@ function usePrinterClient() {
12139
12145
  }
12140
12146
  if (!g)
12141
12147
  throw ElMessage.error("未找到可用打印机"), new Error("未找到可用打印机");
12142
- const _ = p.printConfig, E = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, $ = await printerClient.printReport({
12148
+ const _ = p.printConfig, E = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, x = await printerClient.printReport({
12143
12149
  options: p.remoteOptions,
12144
12150
  printConfig: p.printConfig,
12145
12151
  statementName: p.name,
@@ -12148,7 +12154,7 @@ function usePrinterClient() {
12148
12154
  copies: f,
12149
12155
  pageSize: E
12150
12156
  });
12151
- return $.success ? ElMessage.success(`打印已发送:${g},共 ${$.copies || f} 份`) : ElMessage.error($.message || "打印失败"), $;
12157
+ return x.success ? ElMessage.success(`打印已发送:${g},共 ${x.copies || f} 份`) : ElMessage.error(x.message || "打印失败"), x;
12152
12158
  } finally {
12153
12159
  printerClient.printing.value = !1;
12154
12160
  }
@@ -12244,9 +12250,9 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12244
12250
  `打印机:${n.value}`,
12245
12251
  `时间:${m}`,
12246
12252
  "如能正常打印,说明连接与打印机配置正确"
12247
- ], _ = g.map((E, $) => {
12248
- const y = { ...defaultCell, text: E, row: $ + 1, col: 1 };
12249
- return y.style = { ...y.style, fontWeight: $ === 0 ? "bold" : "normal" }, [y];
12253
+ ], _ = g.map((E, x) => {
12254
+ const y = { ...defaultCell, text: E, row: x + 1, col: 1 };
12255
+ return y.style = { ...y.style, fontWeight: x === 0 ? "bold" : "normal" }, [y];
12250
12256
  });
12251
12257
  return [
12252
12258
  {
@@ -12273,7 +12279,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12273
12279
  ];
12274
12280
  }
12275
12281
  return (m, g) => {
12276
- const _ = resolveComponent("YhIcon"), E = resolveComponent("el-button"), $ = resolveComponent("el-input"), y = resolveComponent("el-divider"), v = resolveComponent("el-popover");
12282
+ const _ = resolveComponent("YhIcon"), E = resolveComponent("el-button"), x = resolveComponent("el-input"), y = resolveComponent("el-divider"), v = resolveComponent("el-popover");
12277
12283
  return openBlock(), createBlock(v, {
12278
12284
  placement: "bottom",
12279
12285
  "popper-class": "yh-printer-popover",
@@ -12304,7 +12310,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12304
12310
  createElementVNode("span", _hoisted_4, toDisplayString(l.value), 1)
12305
12311
  ]),
12306
12312
  createElementVNode("div", _hoisted_5, [
12307
- createVNode($, {
12313
+ createVNode(x, {
12308
12314
  modelValue: i.value,
12309
12315
  "onUpdate:modelValue": g[0] || (g[0] = (C) => i.value = C),
12310
12316
  size: "small",
@@ -12382,7 +12388,7 @@ async function registerRoute(t, e) {
12382
12388
  title: "报表列表",
12383
12389
  icon: "iconfont icon-s-grid"
12384
12390
  },
12385
- component: () => import("./StatementList-DcYuvG-K.mjs")
12391
+ component: () => import("./StatementList-BFaOwqOO.mjs")
12386
12392
  }), e.addRoute("Index", {
12387
12393
  path: "statement/design/:id",
12388
12394
  name: "报表设计",
@@ -12391,7 +12397,7 @@ async function registerRoute(t, e) {
12391
12397
  title: "报表设计",
12392
12398
  icon: "iconfont icon-s-grid"
12393
12399
  },
12394
- component: () => import("./StatementDesign-Cxh5YK4D.mjs")
12400
+ component: () => import("./StatementDesign-OzMH3MVW.mjs")
12395
12401
  }), e.addRoute("Index", {
12396
12402
  path: "statement/detail/:id",
12397
12403
  name: "后台报表查看",
@@ -12400,7 +12406,7 @@ async function registerRoute(t, e) {
12400
12406
  title: "后台报表查看",
12401
12407
  icon: "iconfont icon-s-grid"
12402
12408
  },
12403
- component: () => import("./StatementDetail-Cx7VdXGa.mjs")
12409
+ component: () => import("./StatementDetail-DkOrmDr6.mjs")
12404
12410
  })), e.addRoute({
12405
12411
  path: "/statementdetail/:id",
12406
12412
  name: "报表查看",
@@ -12411,7 +12417,7 @@ async function registerRoute(t, e) {
12411
12417
  isWhite: !0
12412
12418
  },
12413
12419
  props: !0,
12414
- component: () => import("./StatementDetail-Cx7VdXGa.mjs")
12420
+ component: () => import("./StatementDetail-DkOrmDr6.mjs")
12415
12421
  }), e.hasRoute("Index") && e.addRoute("Index", {
12416
12422
  path: "innerStatementdetail/:id",
12417
12423
  name: "系统内报表查看",
@@ -12422,7 +12428,7 @@ async function registerRoute(t, e) {
12422
12428
  noPadding: !0
12423
12429
  },
12424
12430
  props: !0,
12425
- component: () => import("./StatementDetail-Cx7VdXGa.mjs")
12431
+ component: () => import("./StatementDetail-DkOrmDr6.mjs")
12426
12432
  });
12427
12433
  }
12428
12434
  const index = {
@@ -12488,31 +12494,32 @@ function dynamicReportView(t) {
12488
12494
  );
12489
12495
  }
12490
12496
  export {
12491
- applyBorderOperation as A,
12492
- validateAndCompleteTableConfig as B,
12497
+ getLoopSourceColumns as A,
12498
+ applyBorderOperation as B,
12493
12499
  CellType as C,
12494
- DEFAULT_PRINT_CONFIG as D,
12495
- DEFAULT_PRINT_HEADER as E,
12500
+ DEFAULT_EXPORT_CONFIG as D,
12501
+ validateAndCompleteTableConfig as E,
12496
12502
  FormatType as F,
12497
- DEFAULT_PRINT_FOOTER as G,
12498
- DEFAULT_PRINT_WATERMARK as H,
12499
- chartsTypeList as I,
12500
- getDateSourceColumns as J,
12501
- getDateSourceList as K,
12502
- getDateSourceData as L,
12503
- transformArrayToObject as M,
12504
- _sfc_main$1 as N,
12505
- _sfc_main$2 as O,
12506
- ItemTypes as P,
12507
- getReportDefaultOption as Q,
12508
- PrinterClient as R,
12509
- index as S,
12503
+ DEFAULT_PRINT_HEADER as G,
12504
+ DEFAULT_PRINT_FOOTER as H,
12505
+ DEFAULT_PRINT_WATERMARK as I,
12506
+ chartsTypeList as J,
12507
+ getDateSourceColumns as K,
12508
+ getDateSourceList as L,
12509
+ getDateSourceData as M,
12510
+ transformArrayToObject as N,
12511
+ _sfc_main$1 as O,
12512
+ _sfc_main$2 as P,
12513
+ ItemTypes as Q,
12514
+ getReportDefaultOption as R,
12515
+ PrinterClient as S,
12510
12516
  TypeItems as T,
12511
- dynamicReportView as U,
12512
- fetchReportForPrint as V,
12513
- printReportByBrowser as W,
12514
- silenceExport as X,
12515
- usePrinterClient as Y,
12517
+ index as U,
12518
+ dynamicReportView as V,
12519
+ fetchReportForPrint as W,
12520
+ printReportByBrowser as X,
12521
+ silenceExport as Y,
12522
+ usePrinterClient as Z,
12516
12523
  _export_sfc as _,
12517
12524
  del as a,
12518
12525
  defaultCol as b,
@@ -12521,24 +12528,24 @@ export {
12521
12528
  defaultCell as e,
12522
12529
  defaultRow as f,
12523
12530
  getList as g,
12524
- completeBasicReportProperties as h,
12525
- getConfig as i,
12526
- getThemeColors as j,
12527
- renderCellStyle as k,
12528
- getBorderCss as l,
12529
- componentTransition as m,
12531
+ DEFAULT_PRINT_CONFIG as h,
12532
+ completeBasicReportProperties as i,
12533
+ getConfig as j,
12534
+ getThemeColors as k,
12535
+ renderCellStyle as l,
12536
+ getBorderCss as m,
12530
12537
  normalizeBorder as n,
12531
- mmToPx as o,
12538
+ componentTransition as o,
12532
12539
  parseExpression as p,
12533
- colors as q,
12540
+ mmToPx as q,
12534
12541
  rct as r,
12535
12542
  save as s,
12536
- chartItem as t,
12537
- DataSourceColumnDataType as u,
12538
- DATE_RANGE_TYPES as v,
12539
- parseShiftOffset as w,
12540
- formatShiftOffset as x,
12541
- numberToColumn as y,
12542
- getLoopSourceColumns as z
12543
- };
12544
- //# sourceMappingURL=index-Dm_dNt8a.mjs.map
12543
+ colors as t,
12544
+ chartItem as u,
12545
+ DataSourceColumnDataType as v,
12546
+ DATE_RANGE_TYPES as w,
12547
+ parseShiftOffset as x,
12548
+ formatShiftOffset as y,
12549
+ numberToColumn as z
12550
+ };
12551
+ //# sourceMappingURL=index-D5s-AlK7.mjs.map