yh-report 2.4.117 → 2.4.119

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.
@@ -1253,25 +1253,25 @@ function writeReportConfigsToSheet(t, e, r, n) {
1253
1253
  m && m.size && !isNaN(m.size) ? m.size > 0 ? $.height = m.size < 25 ? 25 : m.size : $.hidden = !0 : $.height = 25;
1254
1254
  for (let y = 0; y < _.length; y++) {
1255
1255
  const v = _[y], C = $.getCell(y + 1);
1256
- let { style: w, col: x, row: I, colSpan: A, rowSpan: O, format: N, formatType: U } = v;
1257
- const L = {};
1258
- if (w && w.color && (L.color = {
1256
+ let { style: w, col: x, row: R, colSpan: D, rowSpan: O, format: N, formatType: G } = v;
1257
+ const F = {};
1258
+ if (w && w.color && (F.color = {
1259
1259
  argb: "FF" + ((f = w.color) == null ? void 0 : f.replace("#", ""))
1260
- }), 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 D = normalizeBorder(w.border);
1262
- if (D) {
1263
- const S = themeColors[r] || "#333333", R = (k) => {
1264
- if (!(!k || !k.style || k.style === "none"))
1260
+ }), w && w.fontSize && (F.size = w.fontSize), w && w.fontFamily && (F.name = w.fontFamily), w && w.fontWeight && w.fontWeight === "bold" && (F.bold = !0), C.font = F, w && w.border) {
1261
+ const S = normalizeBorder(w.border);
1262
+ if (S) {
1263
+ const b = themeColors[r] || "#333333", I = (M) => {
1264
+ if (!(!M || !M.style || M.style === "none"))
1265
1265
  return {
1266
- style: k.style,
1267
- color: { argb: "FF" + (k.color || S).replace("#", "") }
1266
+ style: M.style,
1267
+ color: { argb: "FF" + (M.color || b).replace("#", "") }
1268
1268
  };
1269
1269
  };
1270
1270
  C.border = {
1271
- top: R(D.top),
1272
- left: R(D.left),
1273
- bottom: R(D.bottom),
1274
- right: R(D.right)
1271
+ top: I(S.top),
1272
+ left: I(S.left),
1273
+ bottom: I(S.bottom),
1274
+ right: I(S.right)
1275
1275
  };
1276
1276
  }
1277
1277
  } else (!w || w.border !== !1) && (C.border = {
@@ -1289,30 +1289,30 @@ function writeReportConfigsToSheet(t, e, r, n) {
1289
1289
  }
1290
1290
  };
1291
1291
  else {
1292
- const D = `${r}${p % 2}`;
1292
+ const S = `${r}${p % 2}`;
1293
1293
  C.fill = {
1294
1294
  type: "pattern",
1295
1295
  pattern: "solid",
1296
1296
  fgColor: {
1297
- argb: "FF" + themeColors[D].replace("#", "")
1297
+ argb: "FF" + themeColors[S].replace("#", "")
1298
1298
  }
1299
1299
  };
1300
1300
  }
1301
- const M = {
1301
+ const k = {
1302
1302
  vertical: "middle",
1303
1303
  horizontal: "center",
1304
1304
  wrapText: !0
1305
1305
  };
1306
- w && w.textAlign && (M.horizontal = w.textAlign), w && w.verticalAlign && (M.vertical = w.verticalAlign === "center" ? "middle" : w.verticalAlign), C.alignment = M;
1307
- const T = O && !isNaN(O) && O > 1, b = A && !isNaN(A) && A > 1;
1308
- if (T || b) {
1309
- const D = i + p + 1, S = y + 1;
1310
- let R = D, k = S;
1311
- D && (R += O - 1), S && (k += A - 1), o.push([D, S, R, k]);
1306
+ w && w.textAlign && (k.horizontal = w.textAlign), w && w.verticalAlign && (k.vertical = w.verticalAlign === "center" ? "middle" : w.verticalAlign), C.alignment = k;
1307
+ const A = O && !isNaN(O) && O > 1, T = D && !isNaN(D) && D > 1;
1308
+ if (A || T) {
1309
+ const S = i + p + 1, b = y + 1;
1310
+ let I = S, M = b;
1311
+ S && (I += O - 1), b && (M += D - 1), o.push([S, b, I, M]);
1312
1312
  }
1313
1313
  if (N && N === "number") {
1314
- let D = "", S = "";
1315
- U && (U.numberUseGrouping && (D = U.numberUseGrouping), U.numberDecimal && (S = U.numberDecimal)), C.numFmt = generateNumFmt(D, S), C.value = Number(v.text);
1314
+ let S = "", b = "";
1315
+ G && (G.numberUseGrouping && (S = G.numberUseGrouping), G.numberDecimal && (b = G.numberDecimal)), C.numFmt = generateNumFmt(S, b), C.value = Number(v.text);
1316
1316
  }
1317
1317
  }
1318
1318
  }
@@ -1363,274 +1363,274 @@ var dayjs_min = { exports: {} };
1363
1363
  (function(r, n) {
1364
1364
  t.exports = n();
1365
1365
  })(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(M) {
1367
- var T = ["th", "st", "nd", "rd"], b = M % 100;
1368
- return "[" + M + (T[(b - 20) % 10] || T[b] || T[0]) + "]";
1369
- } }, y = function(M, T, b) {
1370
- var D = String(M);
1371
- return !D || D.length >= T ? M : "" + Array(T + 1 - D.length).join(b) + M;
1372
- }, v = { s: y, z: function(M) {
1373
- var T = -M.utcOffset(), b = Math.abs(T), D = Math.floor(b / 60), S = b % 60;
1374
- return (T <= 0 ? "+" : "-") + y(D, 2, "0") + ":" + y(S, 2, "0");
1375
- }, m: function M(T, b) {
1376
- if (T.date() < b.date()) return -M(b, T);
1377
- 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);
1378
- return +(-(D + (b - S) / (R ? S - k : k - S)) || 0);
1379
- }, a: function(M) {
1380
- return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
1381
- }, p: function(M) {
1382
- 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$/, "");
1383
- }, u: function(M) {
1384
- return M === void 0;
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(k) {
1367
+ var A = ["th", "st", "nd", "rd"], T = k % 100;
1368
+ return "[" + k + (A[(T - 20) % 10] || A[T] || A[0]) + "]";
1369
+ } }, y = function(k, A, T) {
1370
+ var S = String(k);
1371
+ return !S || S.length >= A ? k : "" + Array(A + 1 - S.length).join(T) + k;
1372
+ }, v = { s: y, z: function(k) {
1373
+ var A = -k.utcOffset(), T = Math.abs(A), S = Math.floor(T / 60), b = T % 60;
1374
+ return (A <= 0 ? "+" : "-") + y(S, 2, "0") + ":" + y(b, 2, "0");
1375
+ }, m: function k(A, T) {
1376
+ if (A.date() < T.date()) return -k(T, A);
1377
+ var S = 12 * (T.year() - A.year()) + (T.month() - A.month()), b = A.clone().add(S, f), I = T - b < 0, M = A.clone().add(S + (I ? -1 : 1), f);
1378
+ return +(-(S + (T - b) / (I ? b - M : M - b)) || 0);
1379
+ }, a: function(k) {
1380
+ return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
1381
+ }, p: function(k) {
1382
+ return { M: f, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: d }[k] || String(k || "").toLowerCase().replace(/s$/, "");
1383
+ }, u: function(k) {
1384
+ return k === void 0;
1385
1385
  } }, C = "en", w = {};
1386
1386
  w[C] = $;
1387
- var x = "$isDayjsObject", I = function(M) {
1388
- return M instanceof U || !(!M || !M[x]);
1389
- }, A = function M(T, b, D) {
1390
- var S;
1391
- if (!T) return C;
1392
- if (typeof T == "string") {
1393
- var R = T.toLowerCase();
1394
- w[R] && (S = R), b && (w[R] = b, S = R);
1395
- var k = T.split("-");
1396
- if (!S && k.length > 1) return M(k[0]);
1387
+ var x = "$isDayjsObject", R = function(k) {
1388
+ return k instanceof G || !(!k || !k[x]);
1389
+ }, D = function k(A, T, S) {
1390
+ var b;
1391
+ if (!A) return C;
1392
+ if (typeof A == "string") {
1393
+ var I = A.toLowerCase();
1394
+ w[I] && (b = I), T && (w[I] = T, b = I);
1395
+ var M = A.split("-");
1396
+ if (!b && M.length > 1) return k(M[0]);
1397
1397
  } else {
1398
- var G = T.name;
1399
- w[G] = T, S = G;
1398
+ var U = A.name;
1399
+ w[U] = A, b = U;
1400
1400
  }
1401
- return !D && S && (C = S), S || !D && C;
1402
- }, O = function(M, T) {
1403
- if (I(M)) return M.clone();
1404
- var b = typeof T == "object" ? T : {};
1405
- return b.date = M, b.args = arguments, new U(b);
1401
+ return !S && b && (C = b), b || !S && C;
1402
+ }, O = function(k, A) {
1403
+ if (R(k)) return k.clone();
1404
+ var T = typeof A == "object" ? A : {};
1405
+ return T.date = k, T.args = arguments, new G(T);
1406
1406
  }, N = v;
1407
- N.l = A, N.i = I, N.w = function(M, T) {
1408
- return O(M, { locale: T.$L, utc: T.$u, x: T.$x, $offset: T.$offset });
1407
+ N.l = D, N.i = R, N.w = function(k, A) {
1408
+ return O(k, { locale: A.$L, utc: A.$u, x: A.$x, $offset: A.$offset });
1409
1409
  };
1410
- var U = function() {
1411
- function M(b) {
1412
- this.$L = A(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[x] = !0;
1410
+ var G = function() {
1411
+ function k(T) {
1412
+ this.$L = D(T.locale, null, !0), this.parse(T), this.$x = this.$x || T.x || {}, this[x] = !0;
1413
1413
  }
1414
- var T = M.prototype;
1415
- return T.parse = function(b) {
1416
- this.$d = function(D) {
1417
- var S = D.date, R = D.utc;
1418
- if (S === null) return /* @__PURE__ */ new Date(NaN);
1419
- if (N.u(S)) return /* @__PURE__ */ new Date();
1420
- if (S instanceof Date) return new Date(S);
1421
- if (typeof S == "string" && !/Z$/i.test(S)) {
1422
- var k = S.match(_);
1423
- if (k) {
1424
- var G = k[2] - 1 || 0, W = (k[7] || "0").substring(0, 3);
1425
- 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);
1414
+ var A = k.prototype;
1415
+ return A.parse = function(T) {
1416
+ this.$d = function(S) {
1417
+ var b = S.date, I = S.utc;
1418
+ if (b === null) return /* @__PURE__ */ new Date(NaN);
1419
+ if (N.u(b)) return /* @__PURE__ */ new Date();
1420
+ if (b instanceof Date) return new Date(b);
1421
+ if (typeof b == "string" && !/Z$/i.test(b)) {
1422
+ var M = b.match(_);
1423
+ if (M) {
1424
+ var U = M[2] - 1 || 0, q = (M[7] || "0").substring(0, 3);
1425
+ return I ? new Date(Date.UTC(M[1], U, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, q)) : new Date(M[1], U, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, q);
1426
1426
  }
1427
1427
  }
1428
- return new Date(S);
1429
- }(b), this.init();
1430
- }, T.init = function() {
1431
- var b = this.$d;
1432
- 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();
1433
- }, T.$utils = function() {
1428
+ return new Date(b);
1429
+ }(T), this.init();
1430
+ }, A.init = function() {
1431
+ var T = this.$d;
1432
+ this.$y = T.getFullYear(), this.$M = T.getMonth(), this.$D = T.getDate(), this.$W = T.getDay(), this.$H = T.getHours(), this.$m = T.getMinutes(), this.$s = T.getSeconds(), this.$ms = T.getMilliseconds();
1433
+ }, A.$utils = function() {
1434
1434
  return N;
1435
- }, T.isValid = function() {
1435
+ }, A.isValid = function() {
1436
1436
  return this.$d.toString() !== g;
1437
- }, T.isSame = function(b, D) {
1438
- var S = O(b);
1439
- return this.startOf(D) <= S && S <= this.endOf(D);
1440
- }, T.isAfter = function(b, D) {
1441
- return O(b) < this.startOf(D);
1442
- }, T.isBefore = function(b, D) {
1443
- return this.endOf(D) < O(b);
1444
- }, T.$g = function(b, D, S) {
1445
- return N.u(b) ? this[D] : this.set(S, b);
1446
- }, T.unix = function() {
1437
+ }, A.isSame = function(T, S) {
1438
+ var b = O(T);
1439
+ return this.startOf(S) <= b && b <= this.endOf(S);
1440
+ }, A.isAfter = function(T, S) {
1441
+ return O(T) < this.startOf(S);
1442
+ }, A.isBefore = function(T, S) {
1443
+ return this.endOf(S) < O(T);
1444
+ }, A.$g = function(T, S, b) {
1445
+ return N.u(T) ? this[S] : this.set(b, T);
1446
+ }, A.unix = function() {
1447
1447
  return Math.floor(this.valueOf() / 1e3);
1448
- }, T.valueOf = function() {
1448
+ }, A.valueOf = function() {
1449
1449
  return this.$d.getTime();
1450
- }, T.startOf = function(b, D) {
1451
- var S = this, R = !!N.u(D) || D, k = N.p(b), G = function(F, H) {
1452
- var j = N.w(S.$u ? Date.UTC(S.$y, H, F) : new Date(S.$y, H, F), S);
1453
- return R ? j : j.endOf(c);
1454
- }, W = function(F, H) {
1455
- return N.w(S.toDate()[F].apply(S.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(H)), S);
1456
- }, ee = this.$W, J = this.$M, ne = this.$D, ae = "set" + (this.$u ? "UTC" : "");
1457
- switch (k) {
1450
+ }, A.startOf = function(T, S) {
1451
+ var b = this, I = !!N.u(S) || S, M = N.p(T), U = function(L, H) {
1452
+ var j = N.w(b.$u ? Date.UTC(b.$y, H, L) : new Date(b.$y, H, L), b);
1453
+ return I ? j : j.endOf(c);
1454
+ }, q = function(L, H) {
1455
+ return N.w(b.toDate()[L].apply(b.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(H)), b);
1456
+ }, J = this.$W, ee = this.$M, ie = this.$D, se = "set" + (this.$u ? "UTC" : "");
1457
+ switch (M) {
1458
1458
  case p:
1459
- return R ? G(1, 0) : G(31, 11);
1459
+ return I ? U(1, 0) : U(31, 11);
1460
1460
  case f:
1461
- return R ? G(1, J) : G(0, J + 1);
1461
+ return I ? U(1, ee) : U(0, ee + 1);
1462
1462
  case u:
1463
- var ie = this.$locale().weekStart || 0, se = (ee < ie ? ee + 7 : ee) - ie;
1464
- return G(R ? ne - se : ne + (6 - se), J);
1463
+ var ae = this.$locale().weekStart || 0, oe = (J < ae ? J + 7 : J) - ae;
1464
+ return U(I ? ie - oe : ie + (6 - oe), ee);
1465
1465
  case c:
1466
1466
  case m:
1467
- return W(ae + "Hours", 0);
1467
+ return q(se + "Hours", 0);
1468
1468
  case l:
1469
- return W(ae + "Minutes", 1);
1469
+ return q(se + "Minutes", 1);
1470
1470
  case s:
1471
- return W(ae + "Seconds", 2);
1471
+ return q(se + "Seconds", 2);
1472
1472
  case a:
1473
- return W(ae + "Milliseconds", 3);
1473
+ return q(se + "Milliseconds", 3);
1474
1474
  default:
1475
1475
  return this.clone();
1476
1476
  }
1477
- }, T.endOf = function(b) {
1478
- return this.startOf(b, !1);
1479
- }, T.$set = function(b, D) {
1480
- 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;
1481
- if (R === f || R === p) {
1482
- var ee = this.clone().set(m, 1);
1483
- ee.$d[G](W), ee.init(), this.$d = ee.set(m, Math.min(this.$D, ee.daysInMonth())).$d;
1484
- } else G && this.$d[G](W);
1477
+ }, A.endOf = function(T) {
1478
+ return this.startOf(T, !1);
1479
+ }, A.$set = function(T, S) {
1480
+ var b, I = N.p(T), M = "set" + (this.$u ? "UTC" : ""), U = (b = {}, b[c] = M + "Date", b[m] = M + "Date", b[f] = M + "Month", b[p] = M + "FullYear", b[l] = M + "Hours", b[s] = M + "Minutes", b[a] = M + "Seconds", b[i] = M + "Milliseconds", b)[I], q = I === c ? this.$D + (S - this.$W) : S;
1481
+ if (I === f || I === p) {
1482
+ var J = this.clone().set(m, 1);
1483
+ J.$d[U](q), J.init(), this.$d = J.set(m, Math.min(this.$D, J.daysInMonth())).$d;
1484
+ } else U && this.$d[U](q);
1485
1485
  return this.init(), this;
1486
- }, T.set = function(b, D) {
1487
- return this.clone().$set(b, D);
1488
- }, T.get = function(b) {
1489
- return this[N.p(b)]();
1490
- }, T.add = function(b, D) {
1491
- var S, R = this;
1492
- b = Number(b);
1493
- var k = N.p(D), G = function(J) {
1494
- var ne = O(R);
1495
- return N.w(ne.date(ne.date() + Math.round(J * b)), R);
1486
+ }, A.set = function(T, S) {
1487
+ return this.clone().$set(T, S);
1488
+ }, A.get = function(T) {
1489
+ return this[N.p(T)]();
1490
+ }, A.add = function(T, S) {
1491
+ var b, I = this;
1492
+ T = Number(T);
1493
+ var M = N.p(S), U = function(ee) {
1494
+ var ie = O(I);
1495
+ return N.w(ie.date(ie.date() + Math.round(ee * T)), I);
1496
1496
  };
1497
- if (k === f) return this.set(f, this.$M + b);
1498
- if (k === p) return this.set(p, this.$y + b);
1499
- if (k === c) return G(1);
1500
- if (k === u) return G(7);
1501
- var W = (S = {}, S[s] = n, S[l] = o, S[a] = r, S)[k] || 1, ee = this.$d.getTime() + b * W;
1502
- return N.w(ee, this);
1503
- }, T.subtract = function(b, D) {
1504
- return this.add(-1 * b, D);
1505
- }, T.format = function(b) {
1506
- var D = this, S = this.$locale();
1507
- if (!this.isValid()) return S.invalidDate || g;
1508
- 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) {
1509
- return H && (H[j] || H(D, R)) || q[j].slice(0, X);
1510
- }, se = function(H) {
1511
- return N.s(G % 12 || 12, H, "0");
1512
- }, F = ae || function(H, j, q) {
1513
- var X = H < 12 ? "AM" : "PM";
1514
- return q ? X.toLowerCase() : X;
1497
+ if (M === f) return this.set(f, this.$M + T);
1498
+ if (M === p) return this.set(p, this.$y + T);
1499
+ if (M === c) return U(1);
1500
+ if (M === u) return U(7);
1501
+ var q = (b = {}, b[s] = n, b[l] = o, b[a] = r, b)[M] || 1, J = this.$d.getTime() + T * q;
1502
+ return N.w(J, this);
1503
+ }, A.subtract = function(T, S) {
1504
+ return this.add(-1 * T, S);
1505
+ }, A.format = function(T) {
1506
+ var S = this, b = this.$locale();
1507
+ if (!this.isValid()) return b.invalidDate || g;
1508
+ var I = T || "YYYY-MM-DDTHH:mm:ssZ", M = N.z(this), U = this.$H, q = this.$m, J = this.$M, ee = b.weekdays, ie = b.months, se = b.meridiem, ae = function(H, j, Y, W) {
1509
+ return H && (H[j] || H(S, I)) || Y[j].slice(0, W);
1510
+ }, oe = function(H) {
1511
+ return N.s(U % 12 || 12, H, "0");
1512
+ }, L = se || function(H, j, Y) {
1513
+ var W = H < 12 ? "AM" : "PM";
1514
+ return Y ? W.toLowerCase() : W;
1515
1515
  };
1516
- return R.replace(E, function(H, j) {
1517
- return j || function(q) {
1518
- switch (q) {
1516
+ return I.replace(E, function(H, j) {
1517
+ return j || function(Y) {
1518
+ switch (Y) {
1519
1519
  case "YY":
1520
- return String(D.$y).slice(-2);
1520
+ return String(S.$y).slice(-2);
1521
1521
  case "YYYY":
1522
- return N.s(D.$y, 4, "0");
1522
+ return N.s(S.$y, 4, "0");
1523
1523
  case "M":
1524
- return ee + 1;
1524
+ return J + 1;
1525
1525
  case "MM":
1526
- return N.s(ee + 1, 2, "0");
1526
+ return N.s(J + 1, 2, "0");
1527
1527
  case "MMM":
1528
- return ie(S.monthsShort, ee, ne, 3);
1528
+ return ae(b.monthsShort, J, ie, 3);
1529
1529
  case "MMMM":
1530
- return ie(ne, ee);
1530
+ return ae(ie, J);
1531
1531
  case "D":
1532
- return D.$D;
1532
+ return S.$D;
1533
1533
  case "DD":
1534
- return N.s(D.$D, 2, "0");
1534
+ return N.s(S.$D, 2, "0");
1535
1535
  case "d":
1536
- return String(D.$W);
1536
+ return String(S.$W);
1537
1537
  case "dd":
1538
- return ie(S.weekdaysMin, D.$W, J, 2);
1538
+ return ae(b.weekdaysMin, S.$W, ee, 2);
1539
1539
  case "ddd":
1540
- return ie(S.weekdaysShort, D.$W, J, 3);
1540
+ return ae(b.weekdaysShort, S.$W, ee, 3);
1541
1541
  case "dddd":
1542
- return J[D.$W];
1542
+ return ee[S.$W];
1543
1543
  case "H":
1544
- return String(G);
1544
+ return String(U);
1545
1545
  case "HH":
1546
- return N.s(G, 2, "0");
1546
+ return N.s(U, 2, "0");
1547
1547
  case "h":
1548
- return se(1);
1548
+ return oe(1);
1549
1549
  case "hh":
1550
- return se(2);
1550
+ return oe(2);
1551
1551
  case "a":
1552
- return F(G, W, !0);
1552
+ return L(U, q, !0);
1553
1553
  case "A":
1554
- return F(G, W, !1);
1554
+ return L(U, q, !1);
1555
1555
  case "m":
1556
- return String(W);
1556
+ return String(q);
1557
1557
  case "mm":
1558
- return N.s(W, 2, "0");
1558
+ return N.s(q, 2, "0");
1559
1559
  case "s":
1560
- return String(D.$s);
1560
+ return String(S.$s);
1561
1561
  case "ss":
1562
- return N.s(D.$s, 2, "0");
1562
+ return N.s(S.$s, 2, "0");
1563
1563
  case "SSS":
1564
- return N.s(D.$ms, 3, "0");
1564
+ return N.s(S.$ms, 3, "0");
1565
1565
  case "Z":
1566
- return k;
1566
+ return M;
1567
1567
  }
1568
1568
  return null;
1569
- }(H) || k.replace(":", "");
1569
+ }(H) || M.replace(":", "");
1570
1570
  });
1571
- }, T.utcOffset = function() {
1571
+ }, A.utcOffset = function() {
1572
1572
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1573
- }, T.diff = function(b, D, S) {
1574
- var R, k = this, G = N.p(D), W = O(b), ee = (W.utcOffset() - this.utcOffset()) * n, J = this - W, ne = function() {
1575
- return N.m(k, W);
1573
+ }, A.diff = function(T, S, b) {
1574
+ var I, M = this, U = N.p(S), q = O(T), J = (q.utcOffset() - this.utcOffset()) * n, ee = this - q, ie = function() {
1575
+ return N.m(M, q);
1576
1576
  };
1577
- switch (G) {
1577
+ switch (U) {
1578
1578
  case p:
1579
- R = ne() / 12;
1579
+ I = ie() / 12;
1580
1580
  break;
1581
1581
  case f:
1582
- R = ne();
1582
+ I = ie();
1583
1583
  break;
1584
1584
  case d:
1585
- R = ne() / 3;
1585
+ I = ie() / 3;
1586
1586
  break;
1587
1587
  case u:
1588
- R = (J - ee) / 6048e5;
1588
+ I = (ee - J) / 6048e5;
1589
1589
  break;
1590
1590
  case c:
1591
- R = (J - ee) / 864e5;
1591
+ I = (ee - J) / 864e5;
1592
1592
  break;
1593
1593
  case l:
1594
- R = J / o;
1594
+ I = ee / o;
1595
1595
  break;
1596
1596
  case s:
1597
- R = J / n;
1597
+ I = ee / n;
1598
1598
  break;
1599
1599
  case a:
1600
- R = J / r;
1600
+ I = ee / r;
1601
1601
  break;
1602
1602
  default:
1603
- R = J;
1603
+ I = ee;
1604
1604
  }
1605
- return S ? R : N.a(R);
1606
- }, T.daysInMonth = function() {
1605
+ return b ? I : N.a(I);
1606
+ }, A.daysInMonth = function() {
1607
1607
  return this.endOf(f).$D;
1608
- }, T.$locale = function() {
1608
+ }, A.$locale = function() {
1609
1609
  return w[this.$L];
1610
- }, T.locale = function(b, D) {
1611
- if (!b) return this.$L;
1612
- var S = this.clone(), R = A(b, D, !0);
1613
- return R && (S.$L = R), S;
1614
- }, T.clone = function() {
1610
+ }, A.locale = function(T, S) {
1611
+ if (!T) return this.$L;
1612
+ var b = this.clone(), I = D(T, S, !0);
1613
+ return I && (b.$L = I), b;
1614
+ }, A.clone = function() {
1615
1615
  return N.w(this.$d, this);
1616
- }, T.toDate = function() {
1616
+ }, A.toDate = function() {
1617
1617
  return new Date(this.valueOf());
1618
- }, T.toJSON = function() {
1618
+ }, A.toJSON = function() {
1619
1619
  return this.isValid() ? this.toISOString() : null;
1620
- }, T.toISOString = function() {
1620
+ }, A.toISOString = function() {
1621
1621
  return this.$d.toISOString();
1622
- }, T.toString = function() {
1622
+ }, A.toString = function() {
1623
1623
  return this.$d.toUTCString();
1624
- }, M;
1625
- }(), L = U.prototype;
1626
- return O.prototype = L, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", p], ["$D", m]].forEach(function(M) {
1627
- L[M[1]] = function(T) {
1628
- return this.$g(T, M[0], M[1]);
1624
+ }, k;
1625
+ }(), F = G.prototype;
1626
+ return O.prototype = F, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", p], ["$D", m]].forEach(function(k) {
1627
+ F[k[1]] = function(A) {
1628
+ return this.$g(A, k[0], k[1]);
1629
1629
  };
1630
- }), O.extend = function(M, T) {
1631
- return M.$i || (M(T, U, O), M.$i = !0), O;
1632
- }, O.locale = A, O.isDayjs = I, O.unix = function(M) {
1633
- return O(1e3 * M);
1630
+ }), O.extend = function(k, A) {
1631
+ return k.$i || (k(A, G, O), k.$i = !0), O;
1632
+ }, O.locale = D, O.isDayjs = R, O.unix = function(k) {
1633
+ return O(1e3 * k);
1634
1634
  }, O.en = w[C], O.Ls = w, O.p = {}, O;
1635
1635
  });
1636
1636
  })(dayjs_min);
@@ -1795,10 +1795,13 @@ function pxToMm(t) {
1795
1795
  return t / measureMmToPxRatio();
1796
1796
  }
1797
1797
  function getPrintContentWidthPx(t) {
1798
- return mmToPx(t.width - t.marginLeft - t.marginRight);
1798
+ const e = typeof t.width == "number" ? t.width : coerceMm(t.width, DEFAULT_PRINT_CONFIG.width), r = typeof t.marginLeft == "number" ? t.marginLeft : coerceMm(t.marginLeft, DEFAULT_PRINT_CONFIG.marginLeft), n = typeof t.marginRight == "number" ? t.marginRight : coerceMm(t.marginRight, DEFAULT_PRINT_CONFIG.marginRight);
1799
+ return mmToPx(e - r - n);
1799
1800
  }
1800
1801
  function getPrintContentHeightPx(t) {
1801
- return t.height == null ? null : mmToPx(t.height - t.marginTop - t.marginBottom);
1802
+ if (t.height == null || t.height === "") return null;
1803
+ const e = typeof t.height == "number" ? t.height : coerceMm(t.height, DEFAULT_PRINT_CONFIG.height), r = typeof t.marginTop == "number" ? t.marginTop : coerceMm(t.marginTop, DEFAULT_PRINT_CONFIG.marginTop), n = typeof t.marginBottom == "number" ? t.marginBottom : coerceMm(t.marginBottom, DEFAULT_PRINT_CONFIG.marginBottom);
1804
+ return mmToPx(e - r - n);
1802
1805
  }
1803
1806
  function getPrintContentWidthPxMeasured(t) {
1804
1807
  return mmToPx(t.width - t.marginLeft - t.marginRight);
@@ -1833,7 +1836,24 @@ const DEFAULT_PRINT_HEADER = {
1833
1836
  header: { ...DEFAULT_PRINT_HEADER },
1834
1837
  footer: { ...DEFAULT_PRINT_FOOTER },
1835
1838
  watermark: { ...DEFAULT_PRINT_WATERMARK }
1836
- }, DEFAULT_EXPORT_CONFIG = {
1839
+ };
1840
+ function coerceMm(t, e) {
1841
+ if (typeof t == "number" && Number.isFinite(t)) return t;
1842
+ if (typeof t == "string") {
1843
+ const r = t.trim().toLowerCase();
1844
+ if (r === "auto" || r === "") return e;
1845
+ const n = parseFloat(r);
1846
+ if (Number.isFinite(n)) return n;
1847
+ }
1848
+ return e;
1849
+ }
1850
+ function normalizePrintConfig(t) {
1851
+ const e = { ...DEFAULT_PRINT_CONFIG };
1852
+ if (!t || typeof t != "object") return e;
1853
+ const r = { ...e, ...t };
1854
+ return r.enabled = !!r.enabled, r.width = coerceMm(r.width, e.width), r.height = r.height == null || r.height === "" || r.height === "auto" ? void 0 : coerceMm(r.height, e.height), r.marginTop = coerceMm(r.marginTop, e.marginTop), r.marginBottom = coerceMm(r.marginBottom, e.marginBottom), r.marginLeft = coerceMm(r.marginLeft, e.marginLeft), r.marginRight = coerceMm(r.marginRight, e.marginRight), r.header && typeof r.header == "object" && (r.header = { ...e.header, ...r.header, height: coerceMm(r.header.height, e.header.height) }), r.footer && typeof r.footer == "object" && (r.footer = { ...e.footer, ...r.footer, height: coerceMm(r.footer.height, e.footer.height) }), r;
1855
+ }
1856
+ const DEFAULT_EXPORT_CONFIG = {
1837
1857
  exportAll: !1,
1838
1858
  pdfEnabled: !1
1839
1859
  };
@@ -3157,29 +3177,29 @@ var divide = /* @__PURE__ */ function() {
3157
3177
  for (; !n[0] && n.length > 1; ) n.shift();
3158
3178
  }
3159
3179
  return function(n, o, i, a, s, l) {
3160
- var c, u, f, d, p, m, g, _, E, $, y, v, C, w, x, I, A, O, N, U, L = n.constructor, M = n.s == o.s ? 1 : -1, T = n.d, b = o.d;
3161
- if (!T || !T[0] || !b || !b[0])
3162
- return new L(
3180
+ var c, u, f, d, p, m, g, _, E, $, y, v, C, w, x, R, D, O, N, G, F = n.constructor, k = n.s == o.s ? 1 : -1, A = n.d, T = o.d;
3181
+ if (!A || !A[0] || !T || !T[0])
3182
+ return new F(
3163
3183
  // Return NaN if either NaN, or both Infinity or 0.
3164
- !n.s || !o.s || (T ? b && T[0] == b[0] : !b) ? NaN : (
3184
+ !n.s || !o.s || (A ? T && A[0] == T[0] : !T) ? NaN : (
3165
3185
  // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
3166
- T && T[0] == 0 || !b ? M * 0 : M / 0
3186
+ A && A[0] == 0 || !T ? k * 0 : k / 0
3167
3187
  )
3168
3188
  );
3169
- 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), $ = E.d = [], f = 0; b[f] == (T[f] || 0); f++) ;
3170
- 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)
3189
+ for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), N = T.length, D = A.length, E = new F(k), $ = E.d = [], f = 0; T[f] == (A[f] || 0); f++) ;
3190
+ if (T[f] > (A[f] || 0) && u--, i == null ? (w = i = F.precision, a = F.rounding) : s ? w = i + (n.e - o.e) + 1 : w = i, w < 0)
3171
3191
  $.push(1), m = !0;
3172
3192
  else {
3173
3193
  if (w = w / p + 2 | 0, f = 0, N == 1) {
3174
- for (d = 0, b = b[0], w++; (f < A || d) && w--; f++)
3175
- x = d * l + (T[f] || 0), $[f] = x / b | 0, d = x % b | 0;
3176
- m = d || f < A;
3194
+ for (d = 0, T = T[0], w++; (f < D || d) && w--; f++)
3195
+ x = d * l + (A[f] || 0), $[f] = x / T | 0, d = x % T | 0;
3196
+ m = d || f < D;
3177
3197
  } else {
3178
- 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;
3179
- U = b.slice(), U.unshift(0), O = b[0], b[1] >= l / 2 && ++O;
3198
+ for (d = l / (T[0] + 1) | 0, d > 1 && (T = t(T, d, l), A = t(A, d, l), N = T.length, D = A.length), R = N, y = A.slice(0, N), v = y.length; v < N; ) y[v++] = 0;
3199
+ G = T.slice(), G.unshift(0), O = T[0], T[1] >= l / 2 && ++O;
3180
3200
  do
3181
- 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]), $[f++] = d, c && y[0] ? y[v++] = T[I] || 0 : (y = [T[I]], v = 1);
3182
- while ((I++ < A || y[0] !== void 0) && w--);
3201
+ d = 0, c = e(T, 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(T, d, l), _ = g.length, v = y.length, c = e(g, y, _, v), c == 1 && (d--, r(g, N < _ ? G : T, _, l))) : (d == 0 && (c = d = 1), g = T.slice()), _ = g.length, _ < v && g.unshift(0), r(y, g, v, l), c == -1 && (v = y.length, c = e(T, y, N, v), c < 1 && (d++, r(y, N < v ? G : T, v, l))), v = y.length) : c === 0 && (d++, y = [0]), $[f++] = d, c && y[0] ? y[v++] = A[R] || 0 : (y = [A[R]], v = 1);
3202
+ while ((R++ < D || y[0] !== void 0) && w--);
3183
3203
  m = y[0] !== void 0;
3184
3204
  }
3185
3205
  $[0] || $.shift();
@@ -7363,8 +7383,8 @@ var dijkstraExports = dijkstra.exports;
7363
7383
  function f(E) {
7364
7384
  const $ = u(a.NUMERIC, e.NUMERIC, E), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, E);
7365
7385
  let v, C;
7366
- 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(x, I) {
7367
- return x.index - I.index;
7386
+ 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(x, R) {
7387
+ return x.index - R.index;
7368
7388
  }).map(function(x) {
7369
7389
  return {
7370
7390
  data: x.data,
@@ -7427,16 +7447,16 @@ var dijkstraExports = dijkstra.exports;
7427
7447
  const y = {}, v = { start: {} };
7428
7448
  let C = ["start"];
7429
7449
  for (let w = 0; w < E.length; w++) {
7430
- const x = E[w], I = [];
7431
- for (let A = 0; A < x.length; A++) {
7432
- const O = x[A], N = "" + w + A;
7433
- I.push(N), y[N] = { node: O, lastCount: 0 }, v[N] = {};
7434
- for (let U = 0; U < C.length; U++) {
7435
- const L = C[U];
7436
- 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, $));
7450
+ const x = E[w], R = [];
7451
+ for (let D = 0; D < x.length; D++) {
7452
+ const O = x[D], N = "" + w + D;
7453
+ R.push(N), y[N] = { node: O, lastCount: 0 }, v[N] = {};
7454
+ for (let G = 0; G < C.length; G++) {
7455
+ const F = C[G];
7456
+ y[F] && y[F].node.mode === O.mode ? (v[F][N] = d(y[F].lastCount + O.length, O.mode) - d(y[F].lastCount, O.mode), y[F].lastCount += O.length) : (y[F] && (y[F].lastCount = O.length), v[F][N] = d(O.length, O.mode) + 4 + e.getCharCountIndicator(O.mode, $));
7437
7457
  }
7438
7458
  }
7439
- C = I;
7459
+ C = R;
7440
7460
  }
7441
7461
  for (let w = 0; w < C.length; w++)
7442
7462
  v[C[w]].end = 0;
@@ -7464,10 +7484,10 @@ var dijkstraExports = dijkstra.exports;
7464
7484
  return typeof v == "string" ? y.push(_(v, null)) : v.data && y.push(_(v.data, v.mode)), y;
7465
7485
  }, []);
7466
7486
  }, t.fromString = function($, y) {
7467
- const v = f($, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), x = l.find_path(w.map, "start", "end"), I = [];
7468
- for (let A = 1; A < x.length - 1; A++)
7469
- I.push(w.table[x[A]].node);
7470
- return t.fromArray(p(I));
7487
+ const v = f($, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), x = l.find_path(w.map, "start", "end"), R = [];
7488
+ for (let D = 1; D < x.length - 1; D++)
7489
+ R.push(w.table[x[D]].node);
7490
+ return t.fromArray(p(R));
7471
7491
  }, t.rawSplit = function($) {
7472
7492
  return t.fromArray(
7473
7493
  f($, s.isKanjiModeEnabled())
@@ -7550,8 +7570,8 @@ function createCodewords(t, e, r) {
7550
7570
  let E = 0;
7551
7571
  const $ = new Uint8Array(t.buffer);
7552
7572
  for (let x = 0; x < a; x++) {
7553
- const I = x < l ? u : f;
7554
- g[x] = $.slice(m, m + I), _[x] = p.encode(g[x]), m += I, E = Math.max(E, I);
7573
+ const R = x < l ? u : f;
7574
+ g[x] = $.slice(m, m + R), _[x] = p.encode(g[x]), m += R, E = Math.max(E, R);
7555
7575
  }
7556
7576
  const y = new Uint8Array(n);
7557
7577
  let v = 0, C, w;
@@ -8052,8 +8072,8 @@ function renderReportByDomForPrint(t, e, r, n, o) {
8052
8072
  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) {
8053
8073
  if ([CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN, CellType.IMAGE, CellType.RICH].includes(y.type)) {
8054
8074
  y.style && v.setAttribute("style", renderCellPrintStyle(y.style, n)), y.style && y.style.border === !1 && v.classList.add("no-border");
8055
- const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, x = 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;
8056
- v.style.paddingTop = `${x}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`);
8075
+ const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, x = w.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, R = w.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, D = w.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, O = w.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
8076
+ v.style.paddingTop = `${x}px`, v.style.paddingRight = `${R}px`, v.style.paddingBottom = `${D}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`);
8057
8077
  }
8058
8078
  _.appendChild(v);
8059
8079
  }
@@ -8087,16 +8107,16 @@ function renderReportByDom(t, e, r, n, o, i) {
8087
8107
  const x = renderCell($, w, i);
8088
8108
  if (w.clickSortField) {
8089
8109
  x.classList.add("click-sort-cell"), x.setAttribute("data-click-sort-field", w.clickSortField), x.setAttribute("data-click-sort-numeric", w.clickSortNumeric ? "1" : "0");
8090
- const I = document.createElement("span");
8091
- I.className = "click-sort-arrow", (_ = x.querySelector(":scope > div")) == null || _.appendChild(I);
8110
+ const R = document.createElement("span");
8111
+ R.className = "click-sort-arrow", (_ = x.querySelector(":scope > div")) == null || _.appendChild(R);
8092
8112
  }
8093
8113
  if (C.isFixed === !0 && (x.classList.add("fixed-td"), x.style.position = "sticky", x.style.left = `${u - 1}px`), u += (C.size ?? 80) - 1, x.setAttribute("data-cell-data", `${E}-${v}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8094
8114
  if (w.style && w.style.border === !1 && x.classList.add("no-border"), y.appendChild(x), w.rowSpan > 1) {
8095
- const I = d.length;
8115
+ const R = d.length;
8096
8116
  d.push(x), p.push(w.rowSpan);
8097
- for (let A = 1; A < w.rowSpan; A++) {
8098
- const O = g + A;
8099
- m.has(O) || m.set(O, []), m.get(O).push(I);
8117
+ for (let D = 1; D < w.rowSpan; D++) {
8118
+ const O = g + D;
8119
+ m.has(O) || m.set(O, []), m.get(O).push(R);
8100
8120
  }
8101
8121
  }
8102
8122
  }
@@ -8716,16 +8736,16 @@ function loopGroupCols(t, e, r, n) {
8716
8736
  const v = getSeparatorKey("key", y);
8717
8737
  Array.from(l[v]).forEach((w) => {
8718
8738
  const x = getSeparatorKey("child", y, w);
8719
- let A = (l[x] || []).map((O) => {
8739
+ let D = (l[x] || []).map((O) => {
8720
8740
  if ($) {
8721
8741
  let N = O[$];
8722
8742
  N || (N = "-");
8723
- let U = !1;
8724
- const L = getSeparatorKey("child", m, w, N), M = getSeparatorKey(w, N), T = getSeparatorKey("data", M);
8725
- 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;
8743
+ let G = !1;
8744
+ const F = getSeparatorKey("child", m, w, N), k = getSeparatorKey(w, N), A = getSeparatorKey("data", k);
8745
+ return l[F] ? l[F].push(O) : l[F] = [O], l[A] ? l[A].push(O) : l[A] = [O], l[_].has(k) || (G = !0), l[_].add(k), l[k] = l[w].concat([N]), G ? N : null;
8726
8746
  }
8727
8747
  }).filter((O) => !!O);
8728
- l[x] = A;
8748
+ l[x] = D;
8729
8749
  });
8730
8750
  }
8731
8751
  });
@@ -8766,23 +8786,23 @@ function loopGroupCols(t, e, r, n) {
8766
8786
  if (s.includes(m)) {
8767
8787
  const y = getSeparatorKey("key", g.row);
8768
8788
  Array.from(l[y]).forEach((C, w) => {
8769
- const x = 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];
8770
- let U = {
8789
+ const x = p && m === f ? 1 : getGroupMinChildrenLength(l, C, f, p, s), R = l[C], D = R[R.length - 1], O = getSeparatorKey("data", C), N = l[O];
8790
+ let G = {
8771
8791
  ...g,
8772
- text: A,
8792
+ text: D,
8773
8793
  colSpan: x,
8774
8794
  colData: N
8775
8795
  };
8776
- if ($.push(U), x > 1) {
8777
- let L = {
8796
+ if ($.push(G), x > 1) {
8797
+ let F = {
8778
8798
  ...g,
8779
- text: A,
8799
+ text: D,
8780
8800
  type: "",
8781
8801
  colSpan: 0,
8782
8802
  rowSpan: 0
8783
8803
  };
8784
- for (let M = 0; M < x - 1; M++)
8785
- $.push(L);
8804
+ for (let k = 0; k < x - 1; k++)
8805
+ $.push(F);
8786
8806
  }
8787
8807
  }), E.splice(g.col, 1, ...$);
8788
8808
  } else {
@@ -8806,34 +8826,34 @@ function loopGroupCols(t, e, r, n) {
8806
8826
  const y = getSeparatorKey("key", f);
8807
8827
  let v = l[y] ? Array.from(l[y]) : [], C = g.data.replace("col:", "").toUpperCase();
8808
8828
  if (g.isRowColCombine) {
8809
- let w = s.map((I) => a[I].data.replace("col:", "").toUpperCase()), x = [];
8810
- v.forEach((I, A) => {
8829
+ let w = s.map((R) => a[R].data.replace("col:", "").toUpperCase()), x = [];
8830
+ v.forEach((R, D) => {
8811
8831
  let O = {
8812
8832
  ...g,
8813
8833
  combineKeys: w,
8814
- combineValues: l[I],
8815
- colGroupIndex: A
8834
+ combineValues: l[R],
8835
+ colGroupIndex: D
8816
8836
  };
8817
8837
  x.push(O);
8818
8838
  }), E.splice(g.col, 1, ...x);
8819
8839
  } else if (v.length)
8820
8840
  v.forEach((w, x) => {
8821
- let I = [];
8822
- const A = getSeparatorKey("data", w);
8823
- l[A].forEach((N) => {
8824
- let U = {
8841
+ let R = [];
8842
+ const D = getSeparatorKey("data", w);
8843
+ l[D].forEach((N) => {
8844
+ let G = {
8825
8845
  ...g
8826
8846
  };
8827
- 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);
8828
- }), E.splice(g.col, 1, ...I);
8847
+ delete G.combineKeys, delete G.combineValues, delete G.isRowColCombine, N[C] !== void 0 ? (G.rawData = N[C], G.colData = N) : G.rawData = "", R.push(G);
8848
+ }), E.splice(g.col, 1, ...R);
8829
8849
  });
8830
8850
  else {
8831
8851
  let w = [];
8832
8852
  i.forEach((x) => {
8833
- let I = {
8853
+ let R = {
8834
8854
  ...g
8835
8855
  };
8836
- delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, x[C] !== void 0 ? (I.rawData = x[C], I.colData = x) : I.rawData = "", w.push(I);
8856
+ delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine, x[C] !== void 0 ? (R.rawData = x[C], R.colData = x) : R.rawData = "", w.push(R);
8837
8857
  }), E.splice(g.col, 1, ...w);
8838
8858
  }
8839
8859
  } else if (g.type === CellType.FUN && p && g.colSpan !== 0) {
@@ -8851,8 +8871,8 @@ function loopGroupCols(t, e, r, n) {
8851
8871
  colData: i[0]
8852
8872
  };
8853
8873
  if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
8854
- let [w, x] = g.mergeTarget, I = r.reduce((A, O) => A.concat(O), []).filter((A) => A.row === w && A.col === x)[0];
8855
- I && (I.colSpan += u - 1);
8874
+ let [w, x] = g.mergeTarget, R = r.reduce((D, O) => D.concat(O), []).filter((D) => D.row === w && D.col === x)[0];
8875
+ R && (R.colSpan += u - 1);
8856
8876
  } else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
8857
8877
  const v = {
8858
8878
  ...g,
@@ -9034,51 +9054,51 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9034
9054
  const y = getSeparatorKey("key", _.col);
9035
9055
  let v = Array.from(n[y]), C = d;
9036
9056
  const w = e.indexOf(_.col);
9037
- v.forEach((x, I) => {
9038
- let A;
9039
- E === s && (i || a) ? A = 1 : A = getGroupMinChildrenLength(n, x, s, a, i);
9040
- const O = n[x], N = O[O.length - 1], U = getSeparatorKey("data", x);
9041
- n[U];
9042
- let L = {
9057
+ v.forEach((x, R) => {
9058
+ let D;
9059
+ E === s && (i || a) ? D = 1 : D = getGroupMinChildrenLength(n, x, s, a, i);
9060
+ const O = n[x], N = O[O.length - 1], G = getSeparatorKey("data", x);
9061
+ n[G];
9062
+ let F = {
9043
9063
  ..._,
9044
9064
  text: "",
9045
- index: I,
9046
- rowSpan: A,
9065
+ index: R,
9066
+ rowSpan: D,
9047
9067
  rawData: formatGroupText(N),
9048
9068
  groupLevel: w,
9049
- groupIndices: I,
9069
+ groupIndices: R,
9050
9070
  groupChildIndex: 0,
9051
9071
  computedType: ComputedType.loopRow
9052
9072
  };
9053
- $.push(L);
9054
- let M = {
9073
+ $.push(F);
9074
+ let k = {
9055
9075
  ..._,
9056
9076
  text: "",
9057
9077
  rawData: formatGroupText(N),
9058
9078
  colSpan: 0,
9059
9079
  rowSpan: 0,
9060
9080
  groupLevel: w,
9061
- groupIndices: I,
9081
+ groupIndices: R,
9062
9082
  computedType: ComputedType.loopRow,
9063
- mergeTarget: [L.row, L.col]
9083
+ mergeTarget: [F.row, F.col]
9064
9084
  };
9065
- for (let T = 0; T < A - 1; T++) {
9066
- let b = cloneDeep(M);
9067
- b.index = C + T + 1, b.groupChildIndex = T + 1, $.push(b);
9085
+ for (let A = 0; A < D - 1; A++) {
9086
+ let T = cloneDeep(k);
9087
+ T.index = C + A + 1, T.groupChildIndex = A + 1, $.push(T);
9068
9088
  }
9069
- if (g[E] = !0, C += A, L.loopGroupRowIndex !== void 0 && L.loopGroupRowIndex !== "" && !isNaN(L.loopGroupRowIndex)) {
9070
- 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;
9089
+ if (g[E] = !0, C += D, F.loopGroupRowIndex !== void 0 && F.loopGroupRowIndex !== "" && !isNaN(F.loopGroupRowIndex)) {
9090
+ let A = cloneDeep(l[F.loopGroupRowIndex]), T = cloneDeep(c[F.loopGroupRowIndex]).map((b) => (b.type === CellType.FUN && b.fun && (b.groupIndices = R, b.groupLevel = w, b.computedType = ComputedType.loopGroup), b)), S = 0;
9071
9091
  if (w >= 0) {
9072
- let S = w;
9073
- for (; S >= 0; ) {
9074
- let R = e[S], G = u[R][C];
9075
- G && G.groupIndices !== void 0 && !isNaN(G.groupIndices) && (D = D + G.groupIndices), S--;
9092
+ let b = w;
9093
+ for (; b >= 0; ) {
9094
+ let I = e[b], U = u[I][C];
9095
+ U && U.groupIndices !== void 0 && !isNaN(U.groupIndices) && (S = S + U.groupIndices), b--;
9076
9096
  }
9077
9097
  }
9078
- f.set(`${I}:${w}:${C}`, {
9079
- row: T,
9080
- cells: b,
9081
- removeCount: D
9098
+ f.set(`${R}:${w}:${C}`, {
9099
+ row: A,
9100
+ cells: T,
9101
+ removeCount: S
9082
9102
  });
9083
9103
  }
9084
9104
  });
@@ -9088,37 +9108,37 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9088
9108
  const v = getSeparatorKey("key", s);
9089
9109
  let C = n[v] ? Array.from(n[v]) : [];
9090
9110
  C.length ? C.forEach((w, x) => {
9091
- const I = getSeparatorKey("child", s, w);
9092
- let A = n[I], O = _.combineKeys ? _.combineKeys.map((L, M) => {
9093
- const T = _.combineValues ? _.combineValues[M] : void 0;
9111
+ const R = getSeparatorKey("child", s, w);
9112
+ let D = n[R], O = _.combineKeys ? _.combineKeys.map((F, k) => {
9113
+ const A = _.combineValues ? _.combineValues[k] : void 0;
9094
9114
  return {
9095
- key: L,
9096
- val: T
9115
+ key: F,
9116
+ val: A
9097
9117
  };
9098
9118
  }) : [];
9099
- const N = A.filter((L) => O.every((M) => L[M.key] === M.val));
9100
- let U = {
9119
+ const N = D.filter((F) => O.every((k) => F[k.key] === k.val));
9120
+ let G = {
9101
9121
  ..._,
9102
9122
  index: x
9103
9123
  };
9104
- if (delete U.combineKeys, delete U.combineValues, delete U.isRowColCombine, N && N.length) {
9105
- const L = N.map((M) => y ? M[y] : void 0);
9106
- U.rawData = _.mergedValueAggregation ? aggregateMergedValues(L, _.mergedValueAggregation) : N[0][y], U.rowData = N[0];
9124
+ if (delete G.combineKeys, delete G.combineValues, delete G.isRowColCombine, N && N.length) {
9125
+ const F = N.map((k) => y ? k[y] : void 0);
9126
+ G.rawData = _.mergedValueAggregation ? aggregateMergedValues(F, _.mergedValueAggregation) : N[0][y], G.rowData = N[0];
9107
9127
  } else
9108
- U.rawData = "", U.rowData = {};
9109
- $.push(U);
9128
+ G.rawData = "", G.rowData = {};
9129
+ $.push(G);
9110
9130
  }) : r.forEach((w, x) => {
9111
- let A = (_.combineKeys ? _.combineKeys.map((N, U) => {
9112
- const L = _.combineValues ? _.combineValues[U] : void 0;
9131
+ let D = (_.combineKeys ? _.combineKeys.map((N, G) => {
9132
+ const F = _.combineValues ? _.combineValues[G] : void 0;
9113
9133
  return {
9114
9134
  key: N,
9115
- val: L
9135
+ val: F
9116
9136
  };
9117
9137
  }) : []).every((N) => w[N.key] === N.val), O = {
9118
9138
  ..._,
9119
9139
  index: x
9120
9140
  };
9121
- 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), $.push(O);
9141
+ delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, D ? (O.rawData = y ? w[y] : "", O.rowData = w) : (O.rawData = "", O.rowData = w), O.type === CellType.FUN && O.fun && (O.computedType = ComputedType.loopRow), $.push(O);
9122
9142
  });
9123
9143
  } else if (e.length === 0)
9124
9144
  r.forEach((v, C) => {
@@ -9132,33 +9152,33 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9132
9152
  const v = getSeparatorKey("key", s);
9133
9153
  let C = n[v] ? Array.from(n[v]) : [];
9134
9154
  if (C.length === 0) {
9135
- r.forEach((x, I) => {
9136
- let A = {
9137
- index: I,
9155
+ r.forEach((x, R) => {
9156
+ let D = {
9157
+ index: R,
9138
9158
  ..._
9139
9159
  };
9140
- delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, y && x[y] !== void 0 ? A.rawData = x[y] : A.rawData = "", A.rowData = x, A.computedType = ComputedType.loopRow, $.push(A);
9160
+ delete D.combineKeys, delete D.combineValues, delete D.isRowColCombine, y && x[y] !== void 0 ? D.rawData = x[y] : D.rawData = "", D.rowData = x, D.computedType = ComputedType.loopRow, $.push(D);
9141
9161
  });
9142
9162
  return;
9143
9163
  }
9144
9164
  const w = [];
9145
- if (C.forEach((x, I) => {
9165
+ if (C.forEach((x, R) => {
9146
9166
  if (a) {
9147
- const A = getSeparatorKey("child", s, x);
9148
- let O = n[A] || [];
9167
+ const D = getSeparatorKey("child", s, x);
9168
+ let O = n[D] || [];
9149
9169
  w.push(O);
9150
9170
  } else {
9151
- const A = getSeparatorKey("child", s, x);
9152
- let O = n[A] || [];
9171
+ const D = getSeparatorKey("child", s, x);
9172
+ let O = n[D] || [];
9153
9173
  const N = i ? O.slice(0, 1) : O;
9154
- O.length > 0 ? N.forEach((U) => {
9155
- let L = {
9156
- index: I,
9174
+ O.length > 0 ? N.forEach((G) => {
9175
+ let F = {
9176
+ index: R,
9157
9177
  ..._,
9158
9178
  // 交叉表:函数格按当前行组聚合裂变列实例(供 jsep 按 groupIndices 过滤取值)
9159
9179
  isCrossAggregate: i
9160
9180
  };
9161
- 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, $.push(L);
9181
+ delete F.combineKeys, delete F.combineValues, delete F.isRowColCombine, y && G && G[y] !== void 0 ? F.rawData = G[y] : F.rawData = "", F.rowData = G, F.computedType = ComputedType.loopRow, $.push(F);
9162
9182
  }) : $.push({
9163
9183
  index: 0,
9164
9184
  ..._,
@@ -9166,20 +9186,20 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9166
9186
  });
9167
9187
  }
9168
9188
  }), a) {
9169
- const x = Math.max(...w.map((A) => A.length));
9189
+ const x = Math.max(...w.map((D) => D.length));
9170
9190
  p || (p = {
9171
9191
  count: x,
9172
9192
  row: _.row,
9173
9193
  index: E
9174
9194
  });
9175
- const I = {
9195
+ const R = {
9176
9196
  colIndex: E,
9177
9197
  maxCount: x,
9178
9198
  groupColumnLoopItems: w,
9179
9199
  dataKey: _.data ? _.data.replace("row:", "").toUpperCase() : void 0,
9180
9200
  cell: _
9181
9201
  };
9182
- m.push(I);
9202
+ m.push(R);
9183
9203
  }
9184
9204
  }
9185
9205
  } else if (_.isMergeInLoop !== !1) {
@@ -9189,8 +9209,8 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9189
9209
  index: 0
9190
9210
  };
9191
9211
  if (_.rowSpan === 0 && _.mergeTarget && _.mergeTarget.length === 2) {
9192
- let [x, I] = _.mergeTarget, A = c.reduce((O, N) => O.concat(N), []).filter((O) => O.row === x && O.col === I)[0];
9193
- A && (A.rowSpan += o - 1);
9212
+ let [x, R] = _.mergeTarget, D = c.reduce((O, N) => O.concat(N), []).filter((O) => O.row === x && O.col === R)[0];
9213
+ D && (D.rowSpan += o - 1);
9194
9214
  } else
9195
9215
  v.rowSpan += o - 1;
9196
9216
  const C = {
@@ -9205,14 +9225,14 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9205
9225
  } else if ((i || a) && e.length > 0) {
9206
9226
  const v = getSeparatorKey("key", s);
9207
9227
  (n[v] ? Array.from(n[v]) : []).forEach((w, x) => {
9208
- const I = getSeparatorKey("data", w), A = n[I];
9228
+ const R = getSeparatorKey("data", w), D = n[R];
9209
9229
  $.push({
9210
9230
  index: x,
9211
9231
  ..._,
9212
9232
  computedType: ComputedType.loopRow,
9213
9233
  rowSpan: 1,
9214
9234
  colSpan: 1,
9215
- rowData: A ? A[0] : void 0
9235
+ rowData: D ? D[0] : void 0
9216
9236
  });
9217
9237
  });
9218
9238
  } else if (e.length > 0)
@@ -9239,13 +9259,13 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9239
9259
  }), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: E, cell: $, groupColumnLoopItems: y, dataKey: v }) => {
9240
9260
  for (let C = 0; C < E; C++) {
9241
9261
  const w = [];
9242
- y.forEach((x, I) => {
9243
- const A = x[C];
9262
+ y.forEach((x, R) => {
9263
+ const D = x[C];
9244
9264
  let O = {
9245
- index: I,
9265
+ index: R,
9246
9266
  ...$
9247
9267
  };
9248
- 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);
9268
+ delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, v && D && D[v] !== void 0 ? (O.rawData = D[v], O.rowData = D) : (O.rawData = "", O.rowData = D || {}), O.computedType = ComputedType.loopRow, w.push(O);
9249
9269
  }), C === 0 ? u[_] = w : u.splice(_ + C, 0, w);
9250
9270
  }
9251
9271
  }), {
@@ -9270,58 +9290,58 @@ function loopGroupRows(t, e, r, n, o) {
9270
9290
  let w = transpose(y);
9271
9291
  if (w.forEach(() => {
9272
9292
  $.push(cloneDeep(E));
9273
- }), v.forEach(({ row: x, cells: I, removeCount: A }, O) => {
9274
- let [N, U, L] = O.split(":").map((D) => parseInt(D));
9293
+ }), v.forEach(({ row: x, cells: R, removeCount: D }, O) => {
9294
+ let [N, G, F] = O.split(":").map((S) => parseInt(S));
9275
9295
  x.isLoopGroupComputed = !1;
9276
- const M = L + A;
9277
- let T = w[M];
9278
- I = I.map((D, S) => {
9279
- let R = T[S];
9280
- if (S < U) {
9281
- let k = [];
9282
- w.forEach((ee, J) => {
9283
- J <= M && ee.forEach((ne, ae) => {
9284
- ae === S && ne.rowSpan >= 1 && ["", "field"].includes(ne.type) && k.push(J);
9296
+ const k = F + D;
9297
+ let A = w[k];
9298
+ R = R.map((S, b) => {
9299
+ let I = A[b];
9300
+ if (b < G) {
9301
+ let M = [];
9302
+ w.forEach((J, ee) => {
9303
+ ee <= k && J.forEach((ie, se) => {
9304
+ se === b && ie.rowSpan >= 1 && ["", "field"].includes(ie.type) && M.push(ee);
9285
9305
  });
9286
9306
  });
9287
- let G = Math.max(...k), W = w[G][S];
9288
- W && (W.rowSpan += 1, D.mergeTarget = [W.row, W.col]), D.rowSpan = 0, D.colSpan = 0;
9289
- } else if (R && R.type === CellType.TEXT) {
9290
- let k = w[0][S];
9291
- k.rowSpan += 1, D.rowSpan = 0, D.colSpan = 0, D.mergeTarget = [k.row, k.col];
9307
+ let U = Math.max(...M), q = w[U][b];
9308
+ q && (q.rowSpan += 1, S.mergeTarget = [q.row, q.col]), S.rowSpan = 0, S.colSpan = 0;
9309
+ } else if (I && I.type === CellType.TEXT) {
9310
+ let M = w[0][b];
9311
+ M.rowSpan += 1, S.rowSpan = 0, S.colSpan = 0, S.mergeTarget = [M.row, M.col];
9292
9312
  }
9293
- 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;
9313
+ return S.type === CellType.FUN && S.fun && (S.computedType = ComputedType.loopGroup), S.isGroup = I ? !!I.isGroup : !1, S.groupIndices = I ? I.groupIndices : !1, S.linkedMergeCell = I ? !!I.linkedMergeCell : !1, S.linkedColIndex = I ? I.linkedColIndex : { rowSpan: 1, colSpan: 1 }, S.isLoopGroupComputedCell = !0, S;
9294
9314
  });
9295
- const b = M + 1;
9296
- $.splice(b, 0, x), w.splice(b, 0, I);
9297
- }), w = mergeSameCells(w), w.forEach((x, I) => {
9298
- let A = [];
9315
+ const T = k + 1;
9316
+ $.splice(T, 0, x), w.splice(T, 0, R);
9317
+ }), w = mergeSameCells(w), w.forEach((x, R) => {
9318
+ let D = [];
9299
9319
  x.forEach((O) => {
9300
- O && O.groupIndices !== void 0 && !isNaN(O.groupIndices) && A.push(O.groupIndices);
9301
- }), A.length > 0 && x.forEach((O) => {
9302
- O && (O.groupIndices = A);
9320
+ O && O.groupIndices !== void 0 && !isNaN(O.groupIndices) && D.push(O.groupIndices);
9321
+ }), D.length > 0 && x.forEach((O) => {
9322
+ O && (O.groupIndices = D);
9303
9323
  });
9304
9324
  }), t.splice(c, 1, ...$), r.splice(c, 1, ...w), C) {
9305
- const { index: x, count: I } = C, A = n[x], O = [];
9306
- for (let U = 0; U < I; U++)
9307
- O.push(cloneDeep(A));
9325
+ const { index: x, count: R } = C, D = n[x], O = [];
9326
+ for (let G = 0; G < R; G++)
9327
+ O.push(cloneDeep(D));
9308
9328
  n.splice(x, 1, ...O);
9309
- for (let U = 0; U < c; U++) {
9310
- const L = r[U], M = [];
9311
- for (let T = 0; T < I; T++) {
9312
- const b = cloneDeep(L[x]);
9313
- T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, x]), M.push(b);
9329
+ for (let G = 0; G < c; G++) {
9330
+ const F = r[G], k = [];
9331
+ for (let A = 0; A < R; A++) {
9332
+ const T = cloneDeep(F[x]);
9333
+ A === 0 ? T.colSpan = R : (T.colSpan = 0, T.mergeTarget = [T.row, x]), k.push(T);
9314
9334
  }
9315
- L.splice(x, L.length - x, ...M);
9335
+ F.splice(x, F.length - x, ...k);
9316
9336
  }
9317
9337
  const N = c + w.length;
9318
- for (let U = N; U < r.length; U++) {
9319
- const L = r[U], M = [];
9320
- for (let T = 0; T < I; T++) {
9321
- const b = cloneDeep(L[x]);
9322
- T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, x]), M.push(b);
9338
+ for (let G = N; G < r.length; G++) {
9339
+ const F = r[G], k = [];
9340
+ for (let A = 0; A < R; A++) {
9341
+ const T = cloneDeep(F[x]);
9342
+ A === 0 ? T.colSpan = R : (T.colSpan = 0, T.mergeTarget = [T.row, x]), k.push(T);
9323
9343
  }
9324
- L.splice(x, L.length - x, ...M);
9344
+ F.splice(x, F.length - x, ...k);
9325
9345
  }
9326
9346
  }
9327
9347
  }
@@ -9760,11 +9780,11 @@ function buildPrintDocumentHTML(t) {
9760
9780
  }
9761
9781
  const yieldToUI = () => new Promise((t) => setTimeout(t, 0));
9762
9782
  async function printReportByBrowser(t, e, r) {
9763
- const n = await getConfig(t), o = {
9783
+ const n = await getConfig(t), o = normalizePrintConfig({
9764
9784
  ...DEFAULT_PRINT_CONFIG,
9765
9785
  ...n.printConfig || {},
9766
9786
  ...(r == null ? void 0 : r.printConfig) || {}
9767
- }, i = await buildPendingItems(n.id, n.remoteOptions || [], e || {}), a = await paginate(i, o, n.name), s = getPrintContentWidthPx(o), l = buildPrintDocumentHTML({ pages: a, printConfig: o, contentWidthPx: s, docTitle: n.name });
9787
+ }), i = await buildPendingItems(n.id, n.remoteOptions || [], e || {}), a = await paginate(i, o, n.name), s = getPrintContentWidthPx(o), l = buildPrintDocumentHTML({ pages: a, printConfig: o, contentWidthPx: s, docTitle: n.name });
9768
9788
  printHTMLViaIframe(l, n.name);
9769
9789
  }
9770
9790
  async function buildPendingItems(t, e, r) {
@@ -10027,7 +10047,7 @@ function parseShiftConfig(t) {
10027
10047
  }), r;
10028
10048
  }
10029
10049
  function getDateRanges() {
10030
- 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), x = 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);
10050
+ 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), x = e.subtract(30, "day").format(t), R = e.subtract(2, "week").startOf("week").format(t), D = e.subtract(2, "month").format(t), O = e.subtract(3, "month").format(t), N = e.subtract(6, "month").format(t), G = e.subtract(1, "year").startOf("year").format(t), F = e.subtract(2, "year").startOf("year").format(t), k = e.subtract(3, "year").format(t), A = e.subtract(5, "year").format(t);
10031
10051
  return {
10032
10052
  dateFormat: t,
10033
10053
  thisDayStart: r,
@@ -10052,14 +10072,14 @@ function getDateRanges() {
10052
10072
  sevenDay: C,
10053
10073
  fifteenDay: w,
10054
10074
  thirtyDay: x,
10055
- twoWeek: I,
10056
- twoMonth: A,
10075
+ twoWeek: R,
10076
+ twoMonth: D,
10057
10077
  threeMonth: O,
10058
10078
  sixMonth: N,
10059
- oneYear: U,
10060
- twoYear: L,
10061
- threeYear: M,
10062
- fiveYear: T
10079
+ oneYear: G,
10080
+ twoYear: F,
10081
+ threeYear: k,
10082
+ fiveYear: A
10063
10083
  };
10064
10084
  }
10065
10085
  function componentTransition(t, e = "date") {
@@ -10119,33 +10139,33 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10119
10139
  },
10120
10140
  emits: ["change", "addCell"],
10121
10141
  setup(t, { expose: e, emit: r }) {
10122
- 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: x, 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(() => {
10142
+ 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: x, fifteenDay: R, thirtyDay: D, twoWeek: O, twoMonth: N, threeMonth: G, sixMonth: F, oneYear: k, twoYear: A, threeYear: T, fiveYear: S } = getDateRanges(), b = ref([]), I = ref([]), M = computed(() => {
10123
10143
  let B = reactive({});
10124
- return R.value.forEach((V) => {
10144
+ return I.value.forEach((V) => {
10125
10145
  B[V.columnName] = V;
10126
10146
  }), B;
10127
10147
  });
10128
- let G = !1;
10148
+ let U = !1;
10129
10149
  watch(
10130
10150
  () => n.config,
10131
10151
  () => {
10132
- W();
10152
+ q();
10133
10153
  },
10134
10154
  {
10135
10155
  immediate: !0,
10136
10156
  deep: !0
10137
10157
  }
10138
10158
  );
10139
- function W() {
10140
- G = !1;
10159
+ function q() {
10160
+ U = !1;
10141
10161
  let B = [];
10142
- S.value = [];
10162
+ b.value = [];
10143
10163
  const V = [];
10144
10164
  if (n.config && n.config.length)
10145
10165
  for (let z = 0; z < n.config.length; z++) {
10146
10166
  const Q = cloneDeep(n.config[z]);
10147
- 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);
10148
- const { componentName: be, placeholerPrefix: we, type: xe } = componentTransition(Y, oe);
10167
+ let { dataType: K, dateType: re, 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(K);
10168
+ const { componentName: be, placeholerPrefix: we, type: xe } = componentTransition(K, re);
10149
10169
  let ye = {
10150
10170
  ...Q,
10151
10171
  elWidth: Q.elWidth || 210,
@@ -10157,7 +10177,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10157
10177
  shiftSegments: [],
10158
10178
  shiftValue: ""
10159
10179
  };
10160
- if (ye.shiftSegments = oe === DataParamDateTypes.DATE ? parseShiftConfig(Q.shifts) : [], ye.value = J(ye, ve), S.value.push({
10180
+ if (ye.shiftSegments = re === DataParamDateTypes.DATE ? parseShiftConfig(Q.shifts) : [], ye.value = ee(ye, ve), b.value.push({
10161
10181
  name: pe,
10162
10182
  value: ye.value,
10163
10183
  type: te,
@@ -10165,7 +10185,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10165
10185
  }), Q.customOptions)
10166
10186
  ye.optionData = Q.customOptions.split(",").map((de) => de.trim()).filter(Boolean).map((de) => ({ label: de, value: de }));
10167
10187
  else if (ce) {
10168
- const de = ie(ce, ye, "", le);
10188
+ const de = ae(ce, ye, "", le);
10169
10189
  le || V.push(de);
10170
10190
  } else fe && (o("addCell", fe), on(`cell-change:${fe}`, (de) => {
10171
10191
  if (de = Object.values(de), de && Array.isArray(de) && de.length) {
@@ -10173,34 +10193,34 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10173
10193
  const $e = createGroupSortComparator({ order: ge, numeric: me });
10174
10194
  de.sort((Se, Te) => $e(Se.label, Te.label));
10175
10195
  }
10176
- ye.optionData = de, triggerRef(R);
10196
+ ye.optionData = de, triggerRef(I);
10177
10197
  }
10178
10198
  }));
10179
- B.push(ye), te === "LT_GT_EQ" && !ve && F(ye, B, we, te);
10199
+ B.push(ye), te === "LT_GT_EQ" && !ve && L(ye, B, we, te);
10180
10200
  }
10181
- R.value = B, ee(), nextTick(async () => {
10182
- V.length > 0 && await Promise.allSettled(V), G || Z();
10201
+ I.value = B, J(), nextTick(async () => {
10202
+ V.length > 0 && await Promise.allSettled(V), U || Z();
10183
10203
  });
10184
10204
  }
10185
- function ee() {
10205
+ function J() {
10186
10206
  Object.entries(i.query).forEach(([B, V]) => {
10187
10207
  if (!B || V === null || V === void 0 || V === "") return;
10188
- const z = Array.isArray(V) ? V.join(",") : V, Q = S.value.findIndex((Y) => Y.name === B);
10208
+ const z = Array.isArray(V) ? V.join(",") : V, Q = b.value.findIndex((K) => K.name === B);
10189
10209
  if (Q > -1) {
10190
10210
  if (B.indexOf("end_") === 0) {
10191
- S.value[Q].value = z;
10192
- const Y = R.value.find((oe) => oe.columnName === B);
10193
- Y && (Y.value = z);
10211
+ b.value[Q].value = z;
10212
+ const K = I.value.find((re) => re.columnName === B);
10213
+ K && (K.value = z);
10194
10214
  }
10195
10215
  return;
10196
10216
  }
10197
- S.value.push({ name: B, value: z, type: "EQ", isNull: !1 });
10217
+ b.value.push({ name: B, value: z, type: "EQ", isNull: !1 });
10198
10218
  });
10199
10219
  }
10200
- function J(B, V) {
10201
- let { dataType: z, dateType: Q, defaultValue: Y, startTime: oe, endTime: te, columnName: ce } = B, le = Y || "";
10202
- if (V && Y)
10203
- Q && (B.type = Q), Q && DATE_RANGE_TYPES.includes(Q) ? le = ne(Y, oe, te) : le = ae(Q, Y, oe);
10220
+ function ee(B, V) {
10221
+ let { dataType: z, dateType: Q, defaultValue: K, startTime: re, endTime: te, columnName: ce } = B, le = K || "";
10222
+ if (V && K)
10223
+ Q && (B.type = Q), Q && DATE_RANGE_TYPES.includes(Q) ? le = ie(K, re, te) : le = se(Q, K, re);
10204
10224
  else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(z)) {
10205
10225
  if (Array.isArray(le))
10206
10226
  return le;
@@ -10212,8 +10232,8 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10212
10232
  i.query[ce] && (le = i.query[ce]);
10213
10233
  return le;
10214
10234
  }
10215
- function ne(B, V, z) {
10216
- let Y = {
10235
+ function ie(B, V, z) {
10236
+ let K = {
10217
10237
  thisDay: [s, l],
10218
10238
  thisMonth: [u, f],
10219
10239
  lastMonth: [d, p],
@@ -10223,27 +10243,27 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10223
10243
  twoDay: [C, v],
10224
10244
  threeDay: [w, v],
10225
10245
  sevenDay: [x, v],
10226
- fifteenDay: [I, v],
10227
- thirtyDay: [A, v],
10228
- threeMonth: [U, v],
10229
- sixMonth: [L, v],
10230
- oneYear: [M, v],
10231
- twoYear: [T, v],
10232
- threeYear: [b, v],
10233
- fiveYear: [D, v]
10246
+ fifteenDay: [R, v],
10247
+ thirtyDay: [D, v],
10248
+ threeMonth: [G, v],
10249
+ sixMonth: [F, v],
10250
+ oneYear: [k, v],
10251
+ twoYear: [A, v],
10252
+ threeYear: [T, v],
10253
+ fiveYear: [S, v]
10234
10254
  }[B] || [s, l];
10235
- return V && (Y[0] = re(Y[0], V, a)), z && (Y[1] = re(Y[1], z, a)), Y;
10255
+ return V && (K[0] = ne(K[0], V, a)), z && (K[1] = ne(K[1], z, a)), K;
10236
10256
  }
10237
- function ae(B, V, z) {
10238
- let Y = {
10257
+ function se(B, V, z) {
10258
+ let K = {
10239
10259
  thisYear: _,
10240
- twoYear: T,
10241
- threeYear: b,
10242
- fiveYear: D,
10260
+ twoYear: A,
10261
+ threeYear: T,
10262
+ fiveYear: S,
10243
10263
  thisMonth: u,
10244
10264
  twoMonth: N,
10245
- threeMonth: U,
10246
- sixMonth: L,
10265
+ threeMonth: G,
10266
+ sixMonth: F,
10247
10267
  thisWeek: c,
10248
10268
  twoWeek: O,
10249
10269
  thisQuarter: m,
@@ -10253,55 +10273,55 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10253
10273
  twoDay: C,
10254
10274
  threeDay: w,
10255
10275
  sevenDay: x,
10256
- fifteenDay: I,
10257
- thirtyDay: A
10276
+ fifteenDay: R,
10277
+ thirtyDay: D
10258
10278
  }[V];
10259
- if (!Y) {
10260
- let oe = dayjs().startOf(B);
10261
- oe.isValid() ? Y = oe.format(a) : Y = v;
10279
+ if (!K) {
10280
+ let re = dayjs().startOf(B);
10281
+ re.isValid() ? K = re.format(a) : K = v;
10262
10282
  }
10263
- return z && (Y = re(Y, z, a)), Y;
10283
+ return z && (K = ne(K, z, a)), K;
10264
10284
  }
10265
- function ie(B, V, z = "", Q = !1) {
10285
+ function ae(B, V, z = "", Q = !1) {
10266
10286
  return axios.request({
10267
10287
  url: "/sysSelector/list",
10268
10288
  method: "POST",
10269
10289
  data: { id: B, f_value: z, remote: Q }
10270
- }).then((Y) => {
10271
- Y.data && Array.isArray(Y.data.data) && (V.optionData = Y.data.data.map(({ NAME: oe, VALUE: te }) => ({
10272
- label: oe,
10290
+ }).then((K) => {
10291
+ K.data && Array.isArray(K.data.data) && (V.optionData = K.data.data.map(({ NAME: re, VALUE: te }) => ({
10292
+ label: re,
10273
10293
  value: te
10274
- })), triggerRef(R));
10275
- }).catch((Y) => {
10276
- console.warn(`选择器 ${B} 数据加载失败:`, Y), V.optionData = [];
10294
+ })), triggerRef(I));
10295
+ }).catch((K) => {
10296
+ console.warn(`选择器 ${B} 数据加载失败:`, K), V.optionData = [];
10277
10297
  });
10278
10298
  }
10279
- function se(B, V) {
10299
+ function oe(B, V) {
10280
10300
  V.selectorId && (V.selectorLoading = !0, axios.request({
10281
10301
  url: "/sysSelector/list",
10282
10302
  method: "POST",
10283
10303
  data: { id: V.selectorId, f_value: B, remote: !0 }
10284
10304
  }).then((z) => {
10285
- z.data && Array.isArray(z.data.data) && (V.optionData = z.data.data.map(({ NAME: Q, VALUE: Y }) => ({
10305
+ z.data && Array.isArray(z.data.data) && (V.optionData = z.data.data.map(({ NAME: Q, VALUE: K }) => ({
10286
10306
  label: Q,
10287
- value: Y
10307
+ value: K
10288
10308
  })));
10289
10309
  }).finally(() => {
10290
- V.selectorLoading = !1, triggerRef(R);
10310
+ V.selectorLoading = !1, triggerRef(I);
10291
10311
  }));
10292
10312
  }
10293
- function F(B, V, z, Q) {
10294
- const { columnName: Y, defaultValue: oe, isNull: te } = B;
10313
+ function L(B, V, z, Q) {
10314
+ const { columnName: K, defaultValue: re, isNull: te } = B;
10295
10315
  B.placeholder = rct(z + "开始");
10296
10316
  const ce = cloneDeep(B);
10297
- ce.name = "-", ce.columnName = `end_${Y}`, ce.placeholder = rct(z + "结束");
10298
- let le = oe || "";
10299
- S.value.push({
10300
- name: `end_${Y}`,
10317
+ ce.name = "-", ce.columnName = `end_${K}`, ce.placeholder = rct(z + "结束");
10318
+ let le = re || "";
10319
+ b.value.push({
10320
+ name: `end_${K}`,
10301
10321
  value: le,
10302
10322
  type: Q,
10303
10323
  isNull: te
10304
- }), B.selectorId && ie(B.selectorId, ce, "", !!B.remoteSearch), V.push(ce);
10324
+ }), B.selectorId && ae(B.selectorId, ce, "", !!B.remoteSearch), V.push(ce);
10305
10325
  }
10306
10326
  function H(B) {
10307
10327
  return {
@@ -10316,53 +10336,53 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10316
10336
  type: B.type,
10317
10337
  clearable: !0,
10318
10338
  placeholder: B.placeholder,
10319
- "onUpdate:modelValue": (z) => q(z, B)
10339
+ "onUpdate:modelValue": (z) => Y(z, B)
10320
10340
  };
10321
- 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) => {
10322
- z.key === "Enter" && X(B, "enter");
10323
- }), ["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;
10341
+ 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 = () => W(B, "blur"), V.onKeyup = (z) => {
10342
+ z.key === "Enter" && W(B, "enter");
10343
+ }), ["ElSelect"].includes(B.formItemType) && (V.multiple = !0, V.collapseTags = !0, V.filterable = !0, B.remoteSearch && B.selectorId && (V.remote = !0, V.remoteMethod = (z) => oe(z, B), V.loading = B.selectorLoading)), V;
10324
10344
  }
10325
- function q(B, V) {
10326
- let z = S.value.findIndex((Q) => Q.name === V.columnName);
10327
- if (V.value = B, S.value[z].value = B, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(V.formItemType)) {
10345
+ function Y(B, V) {
10346
+ let z = b.value.findIndex((Q) => Q.name === V.columnName);
10347
+ if (V.value = B, b.value[z].value = B, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(V.formItemType)) {
10328
10348
  if (!n.data.searchOnBlur)
10329
10349
  return !1;
10330
- G = !0, Z();
10350
+ U = !0, Z();
10331
10351
  }
10332
10352
  }
10333
- function X(B, V) {
10353
+ function W(B, V) {
10334
10354
  if (["ElInput", "ElInputNumber"].includes(B.formItemType)) {
10335
10355
  if (V === "blur" && !n.data.searchOnBlur)
10336
10356
  return !1;
10337
- G = !0, Z();
10357
+ U = !0, Z();
10338
10358
  }
10339
10359
  }
10340
- function K(B, V) {
10360
+ function X(B, V) {
10341
10361
  if (V.shiftValue = B || "", !n.data.searchOnBlur)
10342
10362
  return !1;
10343
- G = !0, Z();
10363
+ U = !0, Z();
10344
10364
  }
10345
- function re(B, V, z) {
10365
+ function ne(B, V, z) {
10346
10366
  if (V && B) {
10347
- let Q = V.split(",").map((oe) => {
10348
- let te = oe.match(/[-+]/).index, ce = Number(oe.substring(te)), le = oe.substring(0, te);
10367
+ let Q = V.split(",").map((re) => {
10368
+ let te = re.match(/[-+]/).index, ce = Number(re.substring(te)), le = re.substring(0, te);
10349
10369
  return {
10350
10370
  count: ce,
10351
10371
  type: le
10352
10372
  };
10353
- }), Y = dayjs(B);
10354
- Y.isValid() && (Q.forEach(({ count: oe, type: te }) => {
10355
- Y = Y.add(oe, te);
10356
- }), B = Y.format(z));
10373
+ }), K = dayjs(B);
10374
+ K.isValid() && (Q.forEach(({ count: re, type: te }) => {
10375
+ K = K.add(re, te);
10376
+ }), B = K.format(z));
10357
10377
  }
10358
10378
  return B;
10359
10379
  }
10360
10380
  function Z() {
10361
- let B = cloneDeep(S.value);
10362
- B.forEach(({ name: V, value: z, type: Q, isNull: Y }, oe) => {
10363
- let te = k.value[V];
10381
+ let B = cloneDeep(b.value);
10382
+ B.forEach(({ name: V, value: z, type: Q, isNull: K }, re) => {
10383
+ let te = M.value[V];
10364
10384
  if (!te) {
10365
- Array.isArray(z) && (B[oe].value = z.join(","));
10385
+ Array.isArray(z) && (B[re].value = z.join(","));
10366
10386
  return;
10367
10387
  }
10368
10388
  if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) && z)
@@ -10373,13 +10393,13 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10373
10393
  const he = dayjs(fe), pe = dayjs(_e);
10374
10394
  he.isValid() && (fe = he.startOf(ge).format(a)), pe.isValid() && (_e = pe.endOf(ge).format(a));
10375
10395
  }
10376
- B[oe].value = fe;
10396
+ B[re].value = fe;
10377
10397
  let me = `end_${te.columnName}`;
10378
10398
  B.some((he) => he.name === me) || B.push({
10379
10399
  name: me,
10380
10400
  value: _e,
10381
10401
  type: Q,
10382
- isNull: Y
10402
+ isNull: K
10383
10403
  });
10384
10404
  } else {
10385
10405
  let fe = dayjs(z);
@@ -10387,28 +10407,28 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10387
10407
  const _e = te.shiftValue ? Number(te.shiftValue) : -1, ge = te.dateType === DataParamDateTypes.DATE ? (te.shiftSegments || [])[_e] : void 0;
10388
10408
  if (ge) {
10389
10409
  const me = fe.startOf("day");
10390
- B[oe].value = me.add(ge.startMinutes, "minute").format(a);
10410
+ B[re].value = me.add(ge.startMinutes, "minute").format(a);
10391
10411
  let he = `end_${te.columnName}`;
10392
10412
  B.some((pe) => pe.name === he) || B.push({
10393
10413
  name: he,
10394
10414
  value: me.add(ge.endMinutes, "minute").format(a),
10395
10415
  type: Q,
10396
- isNull: Y
10416
+ isNull: K
10397
10417
  });
10398
10418
  } else {
10399
10419
  let me = fe.startOf(te.dateType).format(a);
10400
- B[oe].value = re(me, te.startTime, a);
10420
+ B[re].value = ne(me, te.startTime, a);
10401
10421
  let he = fe.endOf(te.dateType).format(a), pe = `end_${te.columnName}`;
10402
10422
  B.some((Ee) => Ee.name === pe) || B.push({
10403
10423
  name: pe,
10404
- value: re(he, te.endTime, a),
10424
+ value: ne(he, te.endTime, a),
10405
10425
  type: Q,
10406
- isNull: Y
10426
+ isNull: K
10407
10427
  });
10408
10428
  }
10409
10429
  }
10410
10430
  }
10411
- else Array.isArray(z) && (B[oe].value = z.join(","));
10431
+ else Array.isArray(z) && (B[re].value = z.join(","));
10412
10432
  }), o("change", B);
10413
10433
  }
10414
10434
  return e({
@@ -10417,7 +10437,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10417
10437
  }), (B, V) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
10418
10438
  createVNode(unref(ElForm), { inline: "" }, {
10419
10439
  default: withCtx(() => [
10420
- (openBlock(!0), createElementBlock(Fragment, null, renderList(R.value, (z) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, H(z)), {
10440
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(I.value, (z) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, H(z)), {
10421
10441
  default: withCtx(() => {
10422
10442
  var Q;
10423
10443
  return [
@@ -10428,10 +10448,10 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10428
10448
  style: { width: `${z.elWidth}px` }
10429
10449
  }), {
10430
10450
  default: withCtx(() => [
10431
- (openBlock(!0), createElementBlock(Fragment, null, renderList(z.optionData, (Y) => (openBlock(), createBlock(unref(ElOption), {
10432
- key: Y.value,
10433
- label: Y.label,
10434
- value: Y.value
10451
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(z.optionData, (K) => (openBlock(), createBlock(unref(ElOption), {
10452
+ key: K.value,
10453
+ label: K.label,
10454
+ value: K.value
10435
10455
  }, null, 8, ["label", "value"]))), 128))
10436
10456
  ]),
10437
10457
  _: 2
@@ -10445,17 +10465,17 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10445
10465
  clearable: "",
10446
10466
  "model-value": z.shiftValue,
10447
10467
  placeholder: unref(rct)("全部班次"),
10448
- onChange: (Y) => K(Y, z)
10468
+ onChange: (K) => X(K, z)
10449
10469
  }, {
10450
10470
  default: withCtx(() => [
10451
10471
  createVNode(unref(ElOption), {
10452
10472
  value: "",
10453
10473
  label: unref(rct)("全部班次")
10454
10474
  }, null, 8, ["label"]),
10455
- (openBlock(!0), createElementBlock(Fragment, null, renderList(z.shiftSegments, (Y, oe) => (openBlock(), createBlock(unref(ElOption), {
10456
- key: oe,
10457
- value: String(oe),
10458
- label: Y.label
10475
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(z.shiftSegments, (K, re) => (openBlock(), createBlock(unref(ElOption), {
10476
+ key: re,
10477
+ value: String(re),
10478
+ label: K.label
10459
10479
  }, null, 8, ["value", "label"]))), 128))
10460
10480
  ]),
10461
10481
  _: 2
@@ -10502,14 +10522,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10502
10522
  },
10503
10523
  emits: ["updateData", "report-error"],
10504
10524
  setup(t, { expose: e, emit: r }) {
10505
- useCssVars((F) => ({
10506
- v6890e5fc: _.value.border,
10507
- e5214204: _.value.background,
10508
- v5b486bb8: _.value.evenBackground,
10509
- v2e88201c: _.value.fixedBackground,
10510
- v2b3b62ac: _.value.fixedEvenBackground,
10511
- v2f2137ba: _.value.hoverBackground,
10512
- v7dd3642d: _.value.activeColor
10525
+ useCssVars((L) => ({
10526
+ v023404ba: _.value.border,
10527
+ v3e924b25: _.value.background,
10528
+ a98a2742: _.value.evenBackground,
10529
+ d1ccf7aa: _.value.fixedBackground,
10530
+ e85b9b36: _.value.fixedEvenBackground,
10531
+ v4502681a: _.value.hoverBackground,
10532
+ v1de40634: _.value.activeColor
10513
10533
  }));
10514
10534
  const n = t, o = r, i = inject(
10515
10535
  "isPrintMode",
@@ -10518,42 +10538,42 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10518
10538
  let u = null, f = null, d = null;
10519
10539
  const p = shallowRef([]), m = shallowRef([]), g = computed(() => {
10520
10540
  if (i.value && (a != null && a.value)) {
10521
- const F = a.value;
10541
+ const L = a.value;
10522
10542
  return {
10523
- width: `${mmToPx(F.width)}px`,
10524
- 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`
10543
+ width: `${mmToPx(L.width)}px`,
10544
+ padding: `${n.index === 0 ? mmToPx(L.marginTop) : 0}px ${mmToPx(L.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(L.marginBottom) : 0}px ${mmToPx(L.marginLeft)}px`
10525
10545
  };
10526
10546
  }
10527
10547
  return {
10528
10548
  width: n.config.widthType === "%" ? `calc(${n.config.width}% - 10px)` : `${n.config.width - 10}px`,
10529
10549
  height: n.config.fullHeight ? "calc(100% - 8px)" : `${n.config.height}px`
10530
10550
  };
10531
- }), _ = 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((F) => F.isShow).length > 0), y = reactive({
10551
+ }), _ = 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((L) => L.isShow).length > 0), y = reactive({
10532
10552
  pageSize: 100,
10533
10553
  pageSizes: [10, 20, 50, 100, 200, 1e4],
10534
10554
  pageIndex: 1,
10535
10555
  total: 0
10536
- }), v = ref([]), C = ref([]), w = (F) => {
10537
- let H = 0, j = F;
10538
- if (F.includes("!")) {
10539
- let Z = F.split("!");
10556
+ }), v = ref([]), C = ref([]), w = (L) => {
10557
+ let H = 0, j = L;
10558
+ if (L.includes("!")) {
10559
+ let Z = L.split("!");
10540
10560
  H = parseInt(Z[0]), j = Z[1];
10541
10561
  }
10542
- let q = j.match(/[A-Z]+/)[0], X = j.match(/\d+/)[0] - 1, K = columnToNumber(q), re = `${H}:${X}:${K}`;
10543
- C.value.includes(re) || C.value.push(re);
10562
+ let Y = j.match(/[A-Z]+/)[0], W = j.match(/\d+/)[0] - 1, X = columnToNumber(Y), ne = `${H}:${W}:${X}`;
10563
+ C.value.includes(ne) || C.value.push(ne);
10544
10564
  };
10545
- function x(F) {
10546
- if (A && n.config.data.autoQuery === !1)
10547
- return A = !1, !1;
10548
- v.value = F, y.pageIndex = 1, W();
10565
+ function x(L) {
10566
+ if (D && n.config.data.autoQuery === !1)
10567
+ return D = !1, !1;
10568
+ v.value = L, y.pageIndex = 1, q();
10549
10569
  }
10550
- let I = !1, A = !0;
10570
+ let R = !1, D = !0;
10551
10571
  watch(
10552
10572
  () => [y.pageSize, y.pageIndex],
10553
- (F, H) => {
10554
- if (F && H) {
10555
- let [j, q] = F, [X, K] = F;
10556
- j !== X && (y.pageIndex = 1), I && W();
10573
+ (L, H) => {
10574
+ if (L && H) {
10575
+ let [j, Y] = L, [W, X] = L;
10576
+ j !== W && (y.pageIndex = 1), R && q();
10557
10577
  }
10558
10578
  },
10559
10579
  {
@@ -10562,96 +10582,96 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10562
10582
  }
10563
10583
  );
10564
10584
  function O() {
10565
- var F;
10566
- (F = s.value) == null || F.changeValue();
10585
+ var L;
10586
+ (L = s.value) == null || L.changeValue();
10567
10587
  }
10568
- const N = computed(() => n.config.exportMethod === "send" && window.opener), U = computed(() => N.value ? "保存" : "导出");
10569
- async function L() {
10588
+ const N = computed(() => n.config.exportMethod === "send" && window.opener), G = computed(() => N.value ? "保存" : "导出");
10589
+ async function F() {
10570
10590
  if (p.value && p.value.length) {
10571
- let F = await exportReport(
10591
+ let L = await exportReport(
10572
10592
  p.value,
10573
10593
  n.name,
10574
10594
  "excel",
10575
10595
  n.config.theme,
10576
10596
  n.config.subReprotIndex
10577
10597
  );
10578
- if (F === null) {
10598
+ if (L === null) {
10579
10599
  await ElMessageBox.alert("表格导出失败");
10580
10600
  return;
10581
10601
  }
10582
- n.config.exportMethod === "send" && window.opener ? sendReport(F) : downloadReport(F, n.name, "excel");
10602
+ n.config.exportMethod === "send" && window.opener ? sendReport(L) : downloadReport(L, n.name, "excel");
10583
10603
  } else
10584
10604
  ElMessage.success("配置未完成!");
10585
10605
  }
10586
- async function M(F = !1) {
10606
+ async function k(L = !1) {
10587
10607
  if (!(n.config && c.value && n.config.data.source)) return null;
10588
- if (n.config.data.source.some((K) => K.loopTable) && m.value.length) {
10589
- const K = [];
10590
- return m.value.forEach((re) => K.push(...re)), K.length ? K : null;
10608
+ if (n.config.data.source.some((X) => X.loopTable) && m.value.length) {
10609
+ const X = [];
10610
+ return m.value.forEach((ne) => X.push(...ne)), X.length ? X : null;
10591
10611
  }
10592
- if (!F && p.value.length)
10612
+ if (!L && p.value.length)
10593
10613
  return [...p.value];
10594
10614
  let H = [];
10595
10615
  try {
10596
- H = await ie(F);
10597
- } catch (K) {
10616
+ H = await ae(L);
10617
+ } catch (X) {
10598
10618
  return o("report-error", {
10599
10619
  index: n.index,
10600
- message: getErrorMessage(K)
10620
+ message: getErrorMessage(X)
10601
10621
  }), null;
10602
10622
  }
10603
- let j = ae(H);
10623
+ let j = se(H);
10604
10624
  if (n.config.data.processData && (j = await getProcessData(n.config.data.processData, j, v.value, y)), u && u.order !== "none") {
10605
- const K = j[u.key];
10606
- Array.isArray(K) && (j[u.key] = sortRowsByField(K, u.field, u.order, u.numeric));
10625
+ const X = j[u.key];
10626
+ Array.isArray(X) && (j[u.key] = sortRowsByField(X, u.field, u.order, u.numeric));
10607
10627
  }
10608
- let q = [];
10609
- const X = [];
10610
- for (let K = 0; K < n.config.tableConfig.length; K++) {
10611
- const re = n.config.tableConfig[K];
10612
- let { rowConfig: Z, colConfig: B, config: V } = cloneDeep(re), z = getLoopItem(B, j, "col", V), Q = getLoopItem(Z, j, "row", V);
10628
+ let Y = [];
10629
+ const W = [];
10630
+ for (let X = 0; X < n.config.tableConfig.length; X++) {
10631
+ const ne = n.config.tableConfig[X];
10632
+ let { rowConfig: Z, colConfig: B, config: V } = cloneDeep(ne), z = getLoopItem(B, j, "col", V), Q = getLoopItem(Z, j, "row", V);
10613
10633
  z.length && loopGroupCols(B, z, V, j), Q.length && loopGroupRows(Z, Q, V, B, j);
10614
- const Y = transformArrayToObject(j, n.config.data.source);
10615
- computeCell(V, Y, void 0, K), q.push({
10634
+ const K = transformArrayToObject(j, n.config.data.source);
10635
+ computeCell(V, K, void 0, X), Y.push({
10616
10636
  config: V,
10617
10637
  rowConfig: Z,
10618
10638
  colConfig: B
10619
- }), X.push({ config: V });
10639
+ }), W.push({ config: V });
10620
10640
  }
10621
- return await preGenerateBarcodes(X), q.length ? q : null;
10641
+ return await preGenerateBarcodes(W), Y.length ? Y : null;
10622
10642
  }
10623
- async function T() {
10624
- const F = await M(!0);
10625
- if (!F) {
10643
+ async function A() {
10644
+ const L = await k(!0);
10645
+ if (!L) {
10626
10646
  ElMessage.warning("当前报表没有可导出的数据");
10627
10647
  return;
10628
10648
  }
10629
- let H = await exportReport(F, n.name, "excel", n.config.theme, n.config.subReprotIndex);
10649
+ let H = await exportReport(L, n.name, "excel", n.config.theme, n.config.subReprotIndex);
10630
10650
  if (H === null) {
10631
10651
  await ElMessageBox.alert("表格导出失败");
10632
10652
  return;
10633
10653
  }
10634
10654
  n.config.exportMethod === "send" && window.opener ? sendReport(H) : downloadReport(H, n.name, "excel");
10635
10655
  }
10636
- const b = ref(!1), D = ref(!1);
10637
- async function S(F, H) {
10638
- let j = !1, { rowConfig: q, colConfig: X, config: K } = cloneDeep(F), re = getLoopItem(X, H, "col", K), Z = getLoopItem(q, H, "row", K);
10639
- re.length && (j = !0, loopGroupCols(X, re, K, H)), Z.length && (j = !0, loopGroupRows(q, Z, K, X, H));
10656
+ const T = ref(!1), S = ref(!1);
10657
+ async function b(L, H) {
10658
+ let j = !1, { rowConfig: Y, colConfig: W, config: X } = cloneDeep(L), ne = getLoopItem(W, H, "col", X), Z = getLoopItem(Y, H, "row", X);
10659
+ ne.length && (j = !0, loopGroupCols(W, ne, X, H)), Z.length && (j = !0, loopGroupRows(Y, Z, X, W, H));
10640
10660
  const B = transformArrayToObject(H, n.config.data.source);
10641
- return computeCell(K, B, C.value), await preGenerateBarcodes([{ config: K }]), {
10642
- reportConfig: { config: K, rowConfig: q, colConfig: X },
10661
+ return computeCell(X, B, C.value), await preGenerateBarcodes([{ config: X }]), {
10662
+ reportConfig: { config: X, rowConfig: Y, colConfig: W },
10643
10663
  hasLoop: j
10644
10664
  };
10645
10665
  }
10646
- async function R(F, H) {
10647
- const j = F[H];
10666
+ async function I(L, H) {
10667
+ const j = L[H];
10648
10668
  if (!(!Array.isArray(j) || j.length === 0)) {
10649
10669
  m.value = [], l.value.innerHTML = "";
10650
- for (const q of j) {
10651
- const X = { ...F, ...q, [H]: [q] }, K = [];
10652
- for (const re of n.config.tableConfig) {
10653
- const { reportConfig: Z, hasLoop: B } = await S(re, X);
10654
- K.push(Z), renderReportByDom(
10670
+ for (const Y of j) {
10671
+ const W = { ...L, ...Y, [H]: [Y] }, X = [];
10672
+ for (const ne of n.config.tableConfig) {
10673
+ const { reportConfig: Z, hasLoop: B } = await b(ne, W);
10674
+ X.push(Z), renderReportByDom(
10655
10675
  Z.rowConfig,
10656
10676
  Z.colConfig,
10657
10677
  Z.config,
@@ -10660,166 +10680,166 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10660
10680
  _.value.border
10661
10681
  );
10662
10682
  }
10663
- m.value.push(K);
10683
+ m.value.push(X);
10664
10684
  }
10665
10685
  }
10666
10686
  }
10667
- async function k(F) {
10687
+ async function M(L) {
10668
10688
  if (n.config && c.value)
10669
- if (console.time("renderReport"), p.value = [], D.value = !!n.config.tableConfig, D.value) {
10689
+ if (console.time("renderReport"), p.value = [], S.value = !!n.config.tableConfig, S.value) {
10670
10690
  l.value.innerHTML = "";
10671
10691
  const H = [];
10672
10692
  for (let j = 0; j < n.config.tableConfig.length; j++) {
10673
- const q = n.config.tableConfig[j];
10674
- let X = !1, { rowConfig: K, colConfig: re, config: Z } = cloneDeep(q), B = getLoopItem(re, F, "col", Z), V = getLoopItem(K, F, "row", Z);
10675
- B.length && (X = !0, loopGroupCols(re, B, Z, F)), V.length && (X = !0, loopGroupRows(K, V, Z, re, F));
10676
- const z = transformArrayToObject(F, n.config.data.source);
10677
- computeCell(Z, z, C.value, j), H.push({ config: Z, rowConfig: K, colConfig: re, hasLoop: X }), p.value.push({
10693
+ const Y = n.config.tableConfig[j];
10694
+ let W = !1, { rowConfig: X, colConfig: ne, config: Z } = cloneDeep(Y), B = getLoopItem(ne, L, "col", Z), V = getLoopItem(X, L, "row", Z);
10695
+ B.length && (W = !0, loopGroupCols(ne, B, Z, L)), V.length && (W = !0, loopGroupRows(X, V, Z, ne, L));
10696
+ const z = transformArrayToObject(L, n.config.data.source);
10697
+ computeCell(Z, z, C.value, j), H.push({ config: Z, rowConfig: X, colConfig: ne, hasLoop: W }), p.value.push({
10678
10698
  config: Z,
10679
- rowConfig: K,
10680
- colConfig: re
10699
+ rowConfig: X,
10700
+ colConfig: ne
10681
10701
  });
10682
10702
  }
10683
10703
  await preGenerateBarcodes(H), H.forEach((j) => {
10684
10704
  renderReportByDom(j.rowConfig, j.colConfig, j.config, l, j.hasLoop, _.value.border);
10685
10705
  }), console.timeEnd("renderReport"), nextTick(() => {
10686
10706
  const j = l.value.querySelectorAll(".yh-report-table-context");
10687
- let q = 0;
10688
- if (j.forEach((X) => {
10689
- const K = X.querySelector("table");
10690
- if (K) {
10691
- const re = K.querySelectorAll("colgroup col"), Z = Array.from(re).reduce(
10707
+ let Y = 0;
10708
+ if (j.forEach((W) => {
10709
+ const X = W.querySelector("table");
10710
+ if (X) {
10711
+ const ne = X.querySelectorAll("colgroup col"), Z = Array.from(ne).reduce(
10692
10712
  (B, V) => B + parseInt(V.style.width || "80", 10),
10693
10713
  0
10694
10714
  );
10695
- q = Math.max(q, Z);
10715
+ Y = Math.max(Y, Z);
10696
10716
  }
10697
- }), q > 0) {
10698
- const X = l.value;
10699
- let K = 0;
10700
- if (X) {
10701
- const re = getComputedStyle(X);
10702
- K = X.clientWidth - parseFloat(re.paddingLeft || "0") - parseFloat(re.paddingRight || "0");
10717
+ }), Y > 0) {
10718
+ const W = l.value;
10719
+ let X = 0;
10720
+ if (W) {
10721
+ const ne = getComputedStyle(W);
10722
+ X = W.clientWidth - parseFloat(ne.paddingLeft || "0") - parseFloat(ne.paddingRight || "0");
10703
10723
  }
10704
- K > 0 && (q = Math.max(q, K)), j.forEach((re) => {
10705
- const Z = re.querySelector("table");
10724
+ X > 0 && (Y = Math.max(Y, X)), j.forEach((ne) => {
10725
+ const Z = ne.querySelector("table");
10706
10726
  if (Z) {
10707
10727
  const B = Z.querySelectorAll("colgroup col"), V = Array.from(B).reduce(
10708
10728
  (z, Q) => z + parseInt(Q.style.width || "80", 10),
10709
10729
  0
10710
10730
  );
10711
- if (V > 0 && V < q) {
10712
- const z = q / V;
10713
- B.forEach((Y) => {
10714
- const oe = parseInt(Y.style.width || "80", 10);
10715
- Y.style.width = `${Math.round(oe * z)}px`;
10731
+ if (V > 0 && V < Y) {
10732
+ const z = Y / V;
10733
+ B.forEach((K) => {
10734
+ const re = parseInt(K.style.width || "80", 10);
10735
+ K.style.width = `${Math.round(re * z)}px`;
10716
10736
  });
10717
10737
  const Q = Array.from(B).map(
10718
- (Y) => parseInt(Y.style.width || "80", 10)
10738
+ (K) => parseInt(K.style.width || "80", 10)
10719
10739
  );
10720
- Z.querySelectorAll("tr").forEach((Y) => {
10721
- let oe = 0, te = 0;
10722
- Array.from(Y.children).forEach((ce) => {
10723
- ce.classList.contains("fixed-td") && (ce.style.left = `${oe - 1}px`), te < Q.length && (oe += Q[te] - 1, te++);
10740
+ Z.querySelectorAll("tr").forEach((K) => {
10741
+ let re = 0, te = 0;
10742
+ Array.from(K.children).forEach((ce) => {
10743
+ ce.classList.contains("fixed-td") && (ce.style.left = `${re - 1}px`), te < Q.length && (re += Q[te] - 1, te++);
10724
10744
  });
10725
10745
  });
10726
10746
  }
10727
- Z.style.width = `${q}px`, Z.style.minWidth = `${q}px`;
10747
+ Z.style.width = `${Y}px`, Z.style.minWidth = `${Y}px`;
10728
10748
  }
10729
10749
  });
10730
10750
  }
10731
10751
  });
10732
10752
  } else {
10733
- let H = !1, { rowConfig: j, colConfig: q, config: X } = cloneDeep(n.config), K = getLoopItem(q, F, "col", X), re = getLoopItem(j, F, "row", X);
10734
- K.length && (H = !0, loopGroupCols(q, K, X, F)), re.length && (H = !0, loopGroupRows(j, re, X, q, F));
10735
- const Z = transformArrayToObject(F, n.config.data.source);
10736
- computeCell(X, Z, C.value), await preGenerateBarcodes([{ config: X }]), p.value.push({
10737
- config: X,
10753
+ let H = !1, { rowConfig: j, colConfig: Y, config: W } = cloneDeep(n.config), X = getLoopItem(Y, L, "col", W), ne = getLoopItem(j, L, "row", W);
10754
+ X.length && (H = !0, loopGroupCols(Y, X, W, L)), ne.length && (H = !0, loopGroupRows(j, ne, W, Y, L));
10755
+ const Z = transformArrayToObject(L, n.config.data.source);
10756
+ computeCell(W, Z, C.value), await preGenerateBarcodes([{ config: W }]), p.value.push({
10757
+ config: W,
10738
10758
  rowConfig: j,
10739
- colConfig: q
10740
- }), renderReportByDom(j, q, X, c.value, H, _.value.border), console.timeEnd("renderReport");
10759
+ colConfig: Y
10760
+ }), renderReportByDom(j, Y, W, c.value, H, _.value.border), console.timeEnd("renderReport");
10741
10761
  }
10742
10762
  }
10743
- function G() {
10744
- let F = 0, H = [], j = {};
10745
- return n.config.params.forEach((q) => {
10746
- q.isNull && (j[q.columnName] = q);
10747
- }), v.value.forEach((q) => {
10748
- q.name && j[q.name] && !q.value && (H.push(j[q.name].name), F++);
10749
- }), F > 0 && Object.keys(j).length > 0 ? (ElMessage.warning({
10763
+ function U() {
10764
+ let L = 0, H = [], j = {};
10765
+ return n.config.params.forEach((Y) => {
10766
+ Y.isNull && (j[Y.columnName] = Y);
10767
+ }), v.value.forEach((Y) => {
10768
+ Y.name && j[Y.name] && !Y.value && (H.push(j[Y.name].name), L++);
10769
+ }), L > 0 && Object.keys(j).length > 0 ? (ElMessage.warning({
10750
10770
  message: `请填写必填项:${H.join(",")}`,
10751
10771
  grouping: !0
10752
10772
  }), !1) : !0;
10753
10773
  }
10754
- async function W() {
10774
+ async function q() {
10755
10775
  var H;
10756
- if (A = !1, i.value || G()) {
10757
- b.value = !0;
10776
+ if (D = !1, i.value || U()) {
10777
+ T.value = !0;
10758
10778
  try {
10759
- let j = await ie(i.value), q = ae(j);
10760
- n.config.data.processData && (q = await getProcessData(
10779
+ let j = await ae(i.value), Y = se(j);
10780
+ n.config.data.processData && (Y = await getProcessData(
10761
10781
  n.config.data.processData,
10762
- q,
10782
+ Y,
10763
10783
  v.value,
10764
10784
  y
10765
- )), d = q, f = { ...q }, ee(), q = f;
10766
- const X = (H = n.config.data.source) == null ? void 0 : H.find((K) => K.loopTable);
10767
- X && X.key ? await R(q, X.key) : await k(q), nextTick(ne);
10785
+ )), d = Y, f = { ...Y }, J(), Y = f;
10786
+ const W = (H = n.config.data.source) == null ? void 0 : H.find((X) => X.loopTable);
10787
+ W && W.key ? await I(Y, W.key) : await M(Y), nextTick(ie);
10768
10788
  } catch (j) {
10769
10789
  console.error("数据源请求失败:", j), o("report-error", {
10770
10790
  index: n.index,
10771
10791
  message: getErrorMessage(j)
10772
- }), clearReportByDom(l);
10792
+ }), await M({});
10773
10793
  } finally {
10774
- b.value = !1, I = !0;
10794
+ T.value = !1, R = !0;
10775
10795
  }
10776
10796
  } else
10777
10797
  clearReportByDom(l);
10778
10798
  }
10779
- function ee() {
10799
+ function J() {
10780
10800
  if (!f || !d || !u) return;
10781
- const F = d[u.key];
10782
- Array.isArray(F) && (u.order === "none" ? f[u.key] = F : f[u.key] = sortRowsByField(F, u.field, u.order, u.numeric));
10801
+ const L = d[u.key];
10802
+ Array.isArray(L) && (u.order === "none" ? f[u.key] = L : f[u.key] = sortRowsByField(L, u.field, u.order, u.numeric));
10783
10803
  }
10784
- async function J(F) {
10804
+ async function ee(L) {
10785
10805
  var B;
10786
- const H = F.target.closest("td.click-sort-cell");
10806
+ const H = L.target.closest("td.click-sort-cell");
10787
10807
  if (!H) return;
10788
- const j = H.getAttribute("data-click-sort-field") || "", q = j.indexOf(".");
10789
- if (q < 1) return;
10790
- const X = j.slice(0, q).toUpperCase(), K = j.slice(q + 1).toUpperCase();
10791
- if (!X || !K || !f) return;
10792
- const re = H.getAttribute("data-click-sort-numeric") === "1";
10793
- 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();
10808
+ const j = H.getAttribute("data-click-sort-field") || "", Y = j.indexOf(".");
10809
+ if (Y < 1) return;
10810
+ const W = j.slice(0, Y).toUpperCase(), X = j.slice(Y + 1).toUpperCase();
10811
+ if (!W || !X || !f) return;
10812
+ const ne = H.getAttribute("data-click-sort-numeric") === "1";
10813
+ u && u.key === W && u.field === X ? u.order = u.order === "asc" ? "desc" : u.order === "desc" ? "none" : "asc" : u = { key: W, field: X, order: "asc", numeric: ne }, J();
10794
10814
  const Z = (B = n.config.data.source) == null ? void 0 : B.find((V) => V.loopTable);
10795
- Z && Z.key ? await R(f, Z.key) : await k(f), nextTick(ne);
10796
- }
10797
- function ne() {
10798
- var F;
10799
- (F = l.value) == null || F.querySelectorAll("td.click-sort-cell").forEach((H) => {
10800
- var K;
10801
- 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 : "";
10802
- H.dataset.sortDir = X;
10815
+ Z && Z.key ? await I(f, Z.key) : await M(f), nextTick(ie);
10816
+ }
10817
+ function ie() {
10818
+ var L;
10819
+ (L = l.value) == null || L.querySelectorAll("td.click-sort-cell").forEach((H) => {
10820
+ var X;
10821
+ const j = ((X = H.getAttribute("data-click-sort-field")) == null ? void 0 : X.toUpperCase()) || "", W = u && j === `${u.key}.${u.field}` && u.order !== "none" ? u.order : "";
10822
+ H.dataset.sortDir = W;
10803
10823
  });
10804
10824
  }
10805
10825
  onMounted(() => {
10806
- var F;
10807
- (F = l.value) == null || F.addEventListener("click", J);
10826
+ var L;
10827
+ (L = l.value) == null || L.addEventListener("click", ee);
10808
10828
  });
10809
- function ae(F) {
10829
+ function se(L) {
10810
10830
  let H = {};
10811
- return Array.isArray(F) || (F = [F]), F.forEach(({ key: j, data: q }) => {
10831
+ return Array.isArray(L) || (L = [L]), L.forEach(({ key: j, data: Y }) => {
10812
10832
  if (j !== "PARAM") {
10813
- let X = q.filter((K) => K);
10814
- H[j] = X;
10833
+ let W = Y.filter((X) => X);
10834
+ H[j] = W;
10815
10835
  } else
10816
- H[j] = q;
10836
+ H[j] = Y;
10817
10837
  }), o("updateData", {
10818
10838
  key: n.config.id,
10819
10839
  data: H
10820
10840
  }), H;
10821
10841
  }
10822
- async function ie(F = !1) {
10842
+ async function ae(L = !1) {
10823
10843
  if (!n.config.data.source)
10824
10844
  return [];
10825
10845
  const { resData: H, total: j } = await fetchReportData(
@@ -10831,26 +10851,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10831
10851
  total: y.total,
10832
10852
  isPagination: E.value
10833
10853
  },
10834
- F
10854
+ L
10835
10855
  );
10836
10856
  return E.value && (y.total = j), H;
10837
10857
  }
10838
- function se() {
10858
+ function oe() {
10839
10859
  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) {
10840
- let F = n.config.data.pageSizes.split(",").map((H) => parseInt(H));
10841
- y.pageSizes = Array.isArray(F) ? F : [10, 20, 50, 100, 200];
10860
+ let L = n.config.data.pageSizes.split(",").map((H) => parseInt(H));
10861
+ y.pageSizes = Array.isArray(L) ? L : [10, 20, 50, 100, 200];
10842
10862
  }
10843
10863
  }
10844
- return se(), e({
10864
+ return oe(), e({
10845
10865
  tableConfig: p,
10846
10866
  batchTableConfigs: m,
10847
10867
  statementTableRef: l,
10848
10868
  /** 拉数据 + 渲染(供父组件主动调用,如打印按钮触发) */
10849
- renderHandler: W,
10869
+ renderHandler: q,
10850
10870
  /** 装配导出配置(供父组件合并导出调用) */
10851
- buildExportConfigs: M
10852
- }), (F, H) => {
10853
- const j = resolveComponent("el-button"), q = resolveComponent("el-pagination"), X = resolveDirective("loading");
10871
+ buildExportConfigs: k
10872
+ }), (L, H) => {
10873
+ const j = resolveComponent("el-button"), Y = resolveComponent("el-pagination"), W = resolveDirective("loading");
10854
10874
  return openBlock(), createElementBlock("div", {
10855
10875
  class: "yh-report-view-container",
10856
10876
  style: normalizeStyle(g.value)
@@ -10878,10 +10898,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10878
10898
  key: 1,
10879
10899
  text: "",
10880
10900
  type: "primary",
10881
- onClick: L
10901
+ onClick: F
10882
10902
  }, {
10883
10903
  default: withCtx(() => [
10884
- createTextVNode(toDisplayString(unref(rct)(U.value)), 1)
10904
+ createTextVNode(toDisplayString(unref(rct)(G.value)), 1)
10885
10905
  ]),
10886
10906
  _: 1
10887
10907
  })) : createCommentVNode("", !0),
@@ -10889,10 +10909,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10889
10909
  key: 2,
10890
10910
  text: "",
10891
10911
  type: "primary",
10892
- onClick: T
10912
+ onClick: A
10893
10913
  }, {
10894
10914
  default: withCtx(() => [
10895
- createTextVNode(toDisplayString(unref(rct)(U.value)) + toDisplayString(unref(rct)("全部")), 1)
10915
+ createTextVNode(toDisplayString(unref(rct)(G.value)) + toDisplayString(unref(rct)("全部")), 1)
10896
10916
  ]),
10897
10917
  _: 1
10898
10918
  })) : createCommentVNode("", !0)
@@ -10911,14 +10931,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10911
10931
  ref: c
10912
10932
  }, null, 512)
10913
10933
  ])), [
10914
- [X, b.value]
10934
+ [W, T.value]
10915
10935
  ]),
10916
- E.value ? withDirectives((openBlock(), createBlock(q, {
10936
+ E.value ? withDirectives((openBlock(), createBlock(Y, {
10917
10937
  key: 0,
10918
10938
  pageSize: y.pageSize,
10919
- "onUpdate:pageSize": H[0] || (H[0] = (K) => y.pageSize = K),
10939
+ "onUpdate:pageSize": H[0] || (H[0] = (X) => y.pageSize = X),
10920
10940
  "current-page": y.pageIndex,
10921
- "onUpdate:currentPage": H[1] || (H[1] = (K) => y.pageIndex = K),
10941
+ "onUpdate:currentPage": H[1] || (H[1] = (X) => y.pageIndex = X),
10922
10942
  "page-sizes": y.pageSizes,
10923
10943
  total: y.total,
10924
10944
  layout: "total, jumper, prev, pager, next, sizes"
@@ -11183,7 +11203,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11183
11203
  }
11184
11204
  }, E = {
11185
11205
  SUM(C) {
11186
- return C.map((x) => Number(x)).filter((x) => !isNaN(x)).reduce((x, I) => x + I, 0);
11206
+ return C.map((x) => Number(x)).filter((x) => !isNaN(x)).reduce((x, R) => x + R, 0);
11187
11207
  },
11188
11208
  AVG(C) {
11189
11209
  const w = C.map((x) => Number(x)).filter((x) => !isNaN(x));
@@ -11203,72 +11223,72 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11203
11223
  }, $ = async (C, w) => {
11204
11224
  const {
11205
11225
  data: { source: x },
11206
- notSingle: I,
11207
- keyIds: A,
11226
+ notSingle: R,
11227
+ keyIds: D,
11208
11228
  dataIds: O,
11209
11229
  groupBy: N,
11210
- orderBy: U,
11211
- cutLength: L,
11212
- singleComputed: M,
11213
- singleKey: T,
11214
- singleData: b
11230
+ orderBy: G,
11231
+ cutLength: F,
11232
+ singleComputed: k,
11233
+ singleKey: A,
11234
+ singleData: T
11215
11235
  } = C;
11216
- let D = {};
11217
- w && (D = {
11236
+ let S = {};
11237
+ w && (S = {
11218
11238
  ...w
11219
11239
  });
11220
- for (let S = 0; S < x.length; S++) {
11221
- const { key: R, url: k } = x[S];
11240
+ for (let b = 0; b < x.length; b++) {
11241
+ const { key: I, url: M } = x[b];
11222
11242
  try {
11223
- const G = (await getDateSourceData(k, { id: n.id })).data;
11224
- D[R] = G;
11225
- } catch (G) {
11243
+ const U = (await getDateSourceData(M, { id: n.id })).data;
11244
+ S[I] = U;
11245
+ } catch (U) {
11226
11246
  return o("report-error", {
11227
11247
  index: n.index,
11228
- message: getErrorMessage(G)
11248
+ message: getErrorMessage(U)
11229
11249
  }), l.value = !1, !1;
11230
11250
  }
11231
11251
  }
11232
- if (Object.keys(D).length === 0)
11252
+ if (Object.keys(S).length === 0)
11233
11253
  return l.value = !1, !1;
11234
- if (u.value = [], I) {
11235
- if (A.length < 2 || O.length < 2)
11254
+ if (u.value = [], R) {
11255
+ if (D.length < 2 || O.length < 2)
11236
11256
  return l.value = !1, !1;
11237
- let S = "", R = "";
11238
- A.length > 2 ? (S = A.splice(0, 2).join("."), R = A.at(0)) : (S = A.at(0), R = A.at(1));
11239
- let k = get(D, S);
11240
- if (!k)
11257
+ let b = "", I = "";
11258
+ D.length > 2 ? (b = D.splice(0, 2).join("."), I = D.at(0)) : (b = D.at(0), I = D.at(1));
11259
+ let M = get(S, b);
11260
+ if (!M)
11241
11261
  return l.value = !1, !1;
11242
- let G = k.map((ie) => ie[R]), W = "", ee = "";
11243
- O.length > 2 ? (W = O.splice(0, 2).join("."), ee = O.at(0)) : (W = O.at(0), ee = O.at(1));
11244
- let J = [], ne = {}, ae = get(D, W);
11245
- if (!ae)
11262
+ let U = M.map((ae) => ae[I]), q = "", J = "";
11263
+ O.length > 2 ? (q = O.splice(0, 2).join("."), J = O.at(0)) : (q = O.at(0), J = O.at(1));
11264
+ let ee = [], ie = {}, se = get(S, q);
11265
+ if (!se)
11246
11266
  return l.value = !1, !1;
11247
- ae.map((ie) => {
11248
- let se = ie[R], F = ie[ee];
11249
- N ? se && G.includes(se) && (ne[se] ? ne[se].push(F) : ne[se] = [F]) : se && G.includes(se) && J.push({
11250
- label: se,
11251
- value: F
11267
+ se.map((ae) => {
11268
+ let oe = ae[I], L = ae[J];
11269
+ N ? oe && U.includes(oe) && (ie[oe] ? ie[oe].push(L) : ie[oe] = [L]) : oe && U.includes(oe) && ee.push({
11270
+ label: oe,
11271
+ value: L
11252
11272
  });
11253
- }), N && (J = Object.keys(ne).map((ie) => {
11254
- let se = ne[ie];
11273
+ }), N && (ee = Object.keys(ie).map((ae) => {
11274
+ let oe = ie[ae];
11255
11275
  return {
11256
- label: ie,
11257
- value: E.SUM(se)
11276
+ label: ae,
11277
+ value: E.SUM(oe)
11258
11278
  };
11259
- })), !isNaN(L) && L > 0 && (J = J.splice(0, L)), u.value = J;
11279
+ })), !isNaN(F) && F > 0 && (ee = ee.splice(0, F)), u.value = ee;
11260
11280
  } else {
11261
- if (!b || b.length === 0)
11281
+ if (!T || T.length === 0)
11262
11282
  return l.value = !1, !1;
11263
- let S = "", R = "";
11264
- b.length > 2 ? (S = b.splice(0, 2).join("."), R = b.at(0)) : (S = b.at(0), R = b.at(1));
11265
- let k = get(D, S);
11266
- if (!k)
11283
+ let b = "", I = "";
11284
+ T.length > 2 ? (b = T.splice(0, 2).join("."), I = T.at(0)) : (b = T.at(0), I = T.at(1));
11285
+ let M = get(S, b);
11286
+ if (!M)
11267
11287
  return l.value = !1, !1;
11268
- let G = k.map((W) => W[R]);
11269
- M && (G = E[M](G)), u.value.push({
11270
- label: T,
11271
- value: G
11288
+ let U = M.map((q) => q[I]);
11289
+ k && (U = E[k](U)), u.value.push({
11290
+ label: A,
11291
+ value: U
11272
11292
  });
11273
11293
  }
11274
11294
  l.value = !1;
@@ -11284,18 +11304,18 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11284
11304
  y();
11285
11305
  });
11286
11306
  function v() {
11287
- var M;
11307
+ var k;
11288
11308
  if (!u.value.length) return null;
11289
- const C = Math.max(((M = c.value) == null ? void 0 : M.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, x = 2, I = document.createElement("canvas");
11290
- I.width = Math.round(C * x), I.height = Math.round(w * x);
11291
- const A = I.getContext("2d");
11292
- if (!A) return null;
11293
- A.scale(x, x);
11294
- const O = u.value, N = C / O.length, U = 14, L = Math.max(Math.round(w / 3.5), 12);
11295
- return O.forEach((T, b) => {
11296
- const D = b * N;
11297
- 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);
11298
- }), { base64: I.toDataURL("image/png"), width: C, height: w };
11309
+ const C = Math.max(((k = c.value) == null ? void 0 : k.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, x = 2, R = document.createElement("canvas");
11310
+ R.width = Math.round(C * x), R.height = Math.round(w * x);
11311
+ const D = R.getContext("2d");
11312
+ if (!D) return null;
11313
+ D.scale(x, x);
11314
+ const O = u.value, N = C / O.length, G = 14, F = Math.max(Math.round(w / 3.5), 12);
11315
+ return O.forEach((A, T) => {
11316
+ const S = T * N;
11317
+ D.fillStyle = f.value ? n.config.singleColor || colors[0] : colors[T % colors.length], D.fillRect(S, 0, N, w), D.fillStyle = "#fff", D.textAlign = "center", D.textBaseline = "top", D.font = `${G}px sans-serif`, D.fillText(String(A.label ?? ""), S + N / 2, w * 0.08, N - 8), D.font = `bold ${F}px sans-serif`, D.fillText(String(A.value ?? ""), S + N / 2, w * 0.28, N - 8);
11318
+ }), { base64: R.toDataURL("image/png"), width: C, height: w };
11299
11319
  }
11300
11320
  return (C, w) => {
11301
11321
  const x = resolveDirective("loading");
@@ -11309,9 +11329,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11309
11329
  f.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11310
11330
  createElementVNode("div", _hoisted_2$3, toDisplayString(d.value.label), 1),
11311
11331
  createElementVNode("div", _hoisted_3$2, toDisplayString(d.value.value), 1)
11312
- ], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(u.value, (I, A) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
11313
- createElementVNode("div", _hoisted_5$2, toDisplayString(I.label), 1),
11314
- createElementVNode("div", _hoisted_6$2, toDisplayString(I.value), 1)
11332
+ ], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(u.value, (R, D) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
11333
+ createElementVNode("div", _hoisted_5$2, toDisplayString(R.label), 1),
11334
+ createElementVNode("div", _hoisted_6$2, toDisplayString(R.value), 1)
11315
11335
  ]))), 256)),
11316
11336
  unref(i) ? (openBlock(), createElementBlock("div", _hoisted_7$1, [...w[0] || (w[0] = [
11317
11337
  createElementVNode("span", null, "仅展示,打印时会忽略", -1)
@@ -11373,13 +11393,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11373
11393
  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);
11374
11394
  const w = C.contentDocument;
11375
11395
  w.open(), w.write(v), w.close(), C.onload = () => {
11376
- const x = C.contentWindow, I = document.title;
11396
+ const x = C.contentWindow, R = document.title;
11377
11397
  r.statementName && (document.title = r.statementName);
11378
- const A = () => {
11379
- document.title = I;
11398
+ const D = () => {
11399
+ document.title = R;
11380
11400
  };
11381
- x.addEventListener("afterprint", A), x.print(), A(), setTimeout(() => {
11382
- x.removeEventListener("afterprint", A), C.remove(), l.value = !1;
11401
+ x.addEventListener("afterprint", D), x.print(), D(), setTimeout(() => {
11402
+ x.removeEventListener("afterprint", D), C.remove(), l.value = !1;
11383
11403
  }, 500);
11384
11404
  };
11385
11405
  }
@@ -11394,112 +11414,112 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11394
11414
  await nextTick();
11395
11415
  try {
11396
11416
  let C = function() {
11397
- L.length > 0 && (U.push({ items: L }), L = [], M = 0);
11417
+ F.length > 0 && (G.push({ items: F }), F = [], k = 0);
11398
11418
  }, w = function() {
11399
- if (A)
11400
- for (; T.length > 0; ) {
11401
- const D = T[0], S = I - M;
11402
- if (S <= 0) {
11403
- if (L.length === 0) break;
11419
+ if (D)
11420
+ for (; A.length > 0; ) {
11421
+ const S = A[0], b = R - k;
11422
+ if (b <= 0) {
11423
+ if (F.length === 0) break;
11404
11424
  C();
11405
11425
  continue;
11406
11426
  }
11407
- let R = splitNextReportPage(D.state, S, O, I);
11408
- if (!R) {
11409
- if (L.length > 0) {
11427
+ let I = splitNextReportPage(S.state, b, O, R);
11428
+ if (!I) {
11429
+ if (F.length > 0) {
11410
11430
  C();
11411
11431
  continue;
11412
11432
  }
11413
- R = splitNextReportPage(D.state, S, O, I, !0);
11433
+ I = splitNextReportPage(S.state, b, O, R, !0);
11414
11434
  }
11415
- L.push({ type: "report", dom: R.dom }), M += R.height, D.state.currentRowIdx >= D.state.visibleRows.length && T.shift();
11435
+ F.push({ type: "report", dom: I.dom }), k += I.height, S.state.currentRowIdx >= S.state.visibleRows.length && A.shift();
11416
11436
  }
11417
11437
  };
11418
11438
  r.silentRender && await $();
11419
- const x = !!r.autoPrint, I = getPrintContentHeightPxMeasured(r.printConfig), A = I != null, O = getPrintContentWidthPxMeasured(r.printConfig), N = [];
11420
- for (let D = 0; D < r.configs.length; D++) {
11421
- const S = r.configs[D];
11422
- if (S.type === "report") {
11423
- const R = d().get(D);
11424
- if (R && R.length > 0)
11425
- for (const G of R) {
11426
- const W = createReportSplitState(
11427
- G,
11428
- getThemeColors(S.theme || "none").border,
11439
+ const x = !!r.autoPrint, R = getPrintContentHeightPxMeasured(r.printConfig), D = R != null, O = getPrintContentWidthPxMeasured(r.printConfig), N = [];
11440
+ for (let S = 0; S < r.configs.length; S++) {
11441
+ const b = r.configs[S];
11442
+ if (b.type === "report") {
11443
+ const I = d().get(S);
11444
+ if (I && I.length > 0)
11445
+ for (const U of I) {
11446
+ const q = createReportSplitState(
11447
+ U,
11448
+ getThemeColors(b.theme || "none").border,
11429
11449
  {
11430
11450
  header: r.printConfig.header,
11431
11451
  footer: r.printConfig.footer,
11432
11452
  watermark: r.printConfig.watermark,
11433
11453
  title: r.statementName,
11434
- theme: S.theme || "none"
11454
+ theme: b.theme || "none"
11435
11455
  }
11436
11456
  );
11437
- await preGenerateBarcodes([{ config: W.config }]), N.push({ kind: "report", pending: { state: W } });
11457
+ await preGenerateBarcodes([{ config: q.config }]), N.push({ kind: "report", pending: { state: q } });
11438
11458
  }
11439
- const k = p().get(D);
11440
- if (k && k.length > 0)
11441
- for (let G = 0; G < k.length; G++) {
11442
- const W = k[G];
11443
- G > 0 && N.push({ kind: "break" });
11444
- for (const ee of W) {
11445
- const J = createReportSplitState(
11446
- ee,
11447
- getThemeColors(S.theme || "none").border,
11459
+ const M = p().get(S);
11460
+ if (M && M.length > 0)
11461
+ for (let U = 0; U < M.length; U++) {
11462
+ const q = M[U];
11463
+ U > 0 && N.push({ kind: "break" });
11464
+ for (const J of q) {
11465
+ const ee = createReportSplitState(
11466
+ J,
11467
+ getThemeColors(b.theme || "none").border,
11448
11468
  {
11449
11469
  header: r.printConfig.header,
11450
11470
  footer: r.printConfig.footer,
11451
11471
  watermark: r.printConfig.watermark,
11452
11472
  title: r.statementName,
11453
- theme: S.theme || "none"
11473
+ theme: b.theme || "none"
11454
11474
  }
11455
11475
  );
11456
- await preGenerateBarcodes([{ config: J.config }]), N.push({ kind: "report", pending: { state: J } });
11476
+ await preGenerateBarcodes([{ config: ee.config }]), N.push({ kind: "report", pending: { state: ee } });
11457
11477
  }
11458
11478
  }
11459
- } else if (S.type === "label")
11479
+ } else if (b.type === "label")
11460
11480
  continue;
11461
11481
  }
11462
- const U = [];
11463
- let L = [], M = 0;
11464
- const T = [];
11465
- if (A) {
11466
- for (const D of N) {
11467
- if (D.kind === "break") {
11482
+ const G = [];
11483
+ let F = [], k = 0;
11484
+ const A = [];
11485
+ if (D) {
11486
+ for (const S of N) {
11487
+ if (S.kind === "break") {
11468
11488
  C();
11469
11489
  continue;
11470
11490
  }
11471
- if (D.kind === "report") {
11472
- const S = D.pending;
11491
+ if (S.kind === "report") {
11492
+ const b = S.pending;
11473
11493
  w();
11474
- const R = I - M, k = splitNextReportPage(S.state, R, O, I);
11475
- 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));
11494
+ const I = R - k, M = splitNextReportPage(b.state, I, O, R);
11495
+ M ? (F.push({ type: "report", dom: M.dom }), k += M.height, b.state.currentRowIdx < b.state.visibleRows.length && A.push(b)) : (F.length > 0 && C(), A.push(b));
11476
11496
  }
11477
11497
  }
11478
11498
  w(), C();
11479
11499
  } else {
11480
- const D = r.printConfig, S = mmToPx(D.marginTop + D.marginBottom), R = [];
11481
- for (const k of N) {
11482
- if (k.kind === "break") {
11483
- const G = document.createElement("div");
11484
- G.style.height = `${S}px`, R.push({ type: "spacer", dom: G });
11500
+ const S = r.printConfig, b = mmToPx(S.marginTop + S.marginBottom), I = [];
11501
+ for (const M of N) {
11502
+ if (M.kind === "break") {
11503
+ const U = document.createElement("div");
11504
+ U.style.height = `${b}px`, I.push({ type: "spacer", dom: U });
11485
11505
  continue;
11486
11506
  }
11487
- if (k.kind === "report") {
11488
- const { state: G } = k.pending, { rowConfig: W, colConfig: ee, config: J } = G, ne = renderReportByDomForPrint(W, ee, J, G.themeColor, G.theme);
11489
- R.push({ type: "report", dom: ne });
11507
+ if (M.kind === "report") {
11508
+ const { state: U } = M.pending, { rowConfig: q, colConfig: J, config: ee } = U, ie = renderReportByDomForPrint(q, J, ee, U.themeColor, U.theme);
11509
+ I.push({ type: "report", dom: ie });
11490
11510
  }
11491
11511
  }
11492
- U.push({ items: R });
11512
+ G.push({ items: I });
11493
11513
  }
11494
- a.value = U.map((D) => D.items), await nextTick(), s.value.forEach((D) => D.remove()), s.value = [];
11495
- const b = i.value;
11496
- for (let D = 0; D < b.length && D < U.length; D++) {
11497
- const S = b[D];
11498
- S.innerHTML = "";
11499
- const R = U[D].items;
11500
- for (const k of R) {
11501
- const G = k.dom.cloneNode(!0);
11502
- S.appendChild(G), s.value.push(G);
11514
+ a.value = G.map((S) => S.items), await nextTick(), s.value.forEach((S) => S.remove()), s.value = [];
11515
+ const T = i.value;
11516
+ for (let S = 0; S < T.length && S < G.length; S++) {
11517
+ const b = T[S];
11518
+ b.innerHTML = "";
11519
+ const I = G[S].items;
11520
+ for (const M of I) {
11521
+ const U = M.dom.cloneNode(!0);
11522
+ b.appendChild(U), s.value.push(U);
11503
11523
  }
11504
11524
  }
11505
11525
  x && (await nextTick(), E(), setTimeout(() => {
@@ -11516,38 +11536,38 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11516
11536
  for (let v = 0; v < r.configs.length; v++) {
11517
11537
  const C = r.configs[v];
11518
11538
  if (C.type !== "report") continue;
11519
- const w = C, x = w.data, I = w.tableConfig;
11520
- if (!x || !I || !x.source) continue;
11521
- const A = buildPrintParamsFromConfig(w, c.query), { resData: O } = await fetchReportData(
11522
- { id: r.reportId ?? "", data: x, tableConfig: I },
11523
- A,
11539
+ const w = C, x = w.data, R = w.tableConfig;
11540
+ if (!x || !R || !x.source) continue;
11541
+ const D = buildPrintParamsFromConfig(w, c.query), { resData: O } = await fetchReportData(
11542
+ { id: r.reportId ?? "", data: x, tableConfig: R },
11543
+ D,
11524
11544
  { pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!x.pagination },
11525
11545
  y
11526
11546
  );
11527
11547
  let N = toUpdateData(O);
11528
- x.processData && (N = await getProcessData(x.processData, N, A, {
11548
+ x.processData && (N = await getProcessData(x.processData, N, D, {
11529
11549
  pageSize: 5e3,
11530
11550
  pageIndex: 1,
11531
11551
  total: 0
11532
11552
  }));
11533
- const U = x.source, L = U.find((M) => M.loopTable);
11534
- if (L && L.key) {
11535
- const M = await renderReportToConfigs(
11536
- I,
11553
+ const G = x.source, F = G.find((k) => k.loopTable);
11554
+ if (F && F.key) {
11555
+ const k = await renderReportToConfigs(
11556
+ R,
11537
11557
  N,
11538
- U,
11558
+ G,
11539
11559
  [],
11540
- L.key
11560
+ F.key
11541
11561
  );
11542
- f.value.set(v, M);
11562
+ f.value.set(v, k);
11543
11563
  } else {
11544
- const M = await renderReportToConfigs(
11545
- I,
11564
+ const k = await renderReportToConfigs(
11565
+ R,
11546
11566
  N,
11547
- U,
11567
+ G,
11548
11568
  []
11549
11569
  );
11550
- u.value.set(v, M);
11570
+ u.value.set(v, k);
11551
11571
  }
11552
11572
  }
11553
11573
  }
@@ -11620,146 +11640,150 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11620
11640
  },
11621
11641
  emits: ["updateData"],
11622
11642
  setup(t, { emit: e }) {
11623
- const r = t;
11643
+ const r = t, n = inject("yhReportDraftData", null), o = !!(n && n.draft);
11624
11644
  ref();
11625
- 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(() => {
11626
- var T;
11627
- return !!((T = u.value) != null && T.enabled);
11645
+ const i = ref(!1), a = ref(""), s = ref(""), l = ref([]), c = ref(), u = ref([]), f = ref([]), d = ref({ ...DEFAULT_PRINT_CONFIG }), p = ref({ ...DEFAULT_EXPORT_CONFIG }), m = {}, g = computed(() => {
11646
+ var S;
11647
+ return !!((S = d.value) != null && S.enabled);
11628
11648
  });
11629
- provide("printConfig", u), provide("isPrintMode", p);
11630
- const m = computed(() => {
11631
- if (!p.value) return {};
11632
- const T = u.value;
11649
+ provide("printConfig", d), provide("isPrintMode", g);
11650
+ const _ = computed(() => {
11651
+ if (!g.value) return {};
11652
+ const S = d.value;
11633
11653
  return {
11634
- "--print-content-width": `${mmToPx(T.width - T.marginLeft - T.marginRight)}px`
11654
+ "--print-content-width": `${mmToPx(S.width - S.marginLeft - S.marginRight)}px`
11635
11655
  };
11636
11656
  });
11637
11657
  watch(
11638
11658
  () => r.id,
11639
- (T) => {
11640
- g(T);
11659
+ (S) => {
11660
+ E(S);
11641
11661
  }
11642
11662
  );
11643
- function g(T) {
11644
- T ? (i.value = "", a.value = [], n.value = !0, getConfig(T).then(async (b) => {
11645
- let { name: D, remoteOptions: S, printConfig: R, exportConfig: k } = b;
11646
- o.value = D, c.value = S, R && (u.value = { ...DEFAULT_PRINT_CONFIG, ...R }), f.value = { ...DEFAULT_EXPORT_CONFIG, ...k || {} };
11663
+ function E(S) {
11664
+ if (o) {
11665
+ s.value = "", l.value = [], i.value = !1, a.value = n.draft.name || "", f.value = n.draft.options || [];
11666
+ return;
11667
+ }
11668
+ S ? (s.value = "", l.value = [], i.value = !0, getConfig(S).then(async (b) => {
11669
+ let { name: I, remoteOptions: M, printConfig: U, exportConfig: q } = b;
11670
+ a.value = I, f.value = M, U && (d.value = normalizePrintConfig(U)), p.value = { ...DEFAULT_EXPORT_CONFIG, ...q || {} };
11647
11671
  }).catch((b) => {
11648
- console.error("获取报表配置失败:", b), i.value = getErrorMessage(b);
11672
+ console.error("获取报表配置失败:", b), s.value = getErrorMessage(b);
11649
11673
  }).finally(() => {
11650
- n.value = !1;
11651
- })) : i.value = "报表ID不能为空";
11674
+ i.value = !1;
11675
+ })) : s.value = "报表ID不能为空";
11652
11676
  }
11653
- function _({ index: T, message: b }) {
11654
- a.value.some((D) => D.key === T) || a.value.push({ key: T, message: b });
11677
+ function $({ index: S, message: b }) {
11678
+ l.value.some((I) => I.key === S) || l.value.push({ key: S, message: b });
11655
11679
  }
11656
- function E(T) {
11657
- const b = a.value.indexOf(T);
11658
- b > -1 && a.value.splice(b, 1);
11680
+ function y(S) {
11681
+ const b = l.value.indexOf(S);
11682
+ b > -1 && l.value.splice(b, 1);
11659
11683
  }
11660
- const $ = ref(!1);
11661
- function y(T) {
11662
- d[T.key] = T.data, l.value.forEach((b) => {
11663
- var D;
11664
- (D = b == null ? void 0 : b.setOutData) == null || D.call(b, d);
11684
+ const v = ref(!1);
11685
+ function C(S) {
11686
+ m[S.key] = S.data, u.value.forEach((b) => {
11687
+ var I;
11688
+ (I = b == null ? void 0 : b.setOutData) == null || I.call(b, m);
11665
11689
  });
11666
11690
  }
11667
- function v(T, b) {
11668
- T ? l.value[b] = T : delete l.value[b];
11669
- }
11670
- async function C() {
11671
- var W, ee;
11672
- const T = L.value || [], b = c.value.filter((J) => J.type === "report").length, D = c.value.length - b;
11673
- let S = 0, R = 0;
11674
- const k = [], G = [];
11675
- for (let J = 0; J < c.value.length; J++) {
11676
- const ne = c.value[J];
11677
- if (ne.type === "report") {
11678
- const ae = T[S];
11679
- if (S += 1, !(ae != null && ae.buildExportConfigs)) continue;
11680
- x(`正在获取表格数据(${S}/${b})...`);
11681
- const ie = await ae.buildExportConfigs(!!f.value.exportAll);
11682
- if (!ie) continue;
11683
- const se = getThemeColors(ne.theme || "none").border;
11684
- 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" }));
11691
+ function w(S, b) {
11692
+ S ? u.value[b] = S : delete u.value[b];
11693
+ }
11694
+ async function x() {
11695
+ var ee, ie;
11696
+ const S = A.value || [], b = f.value.filter((se) => se.type === "report").length, I = f.value.length - b;
11697
+ let M = 0, U = 0;
11698
+ const q = [], J = [];
11699
+ for (let se = 0; se < f.value.length; se++) {
11700
+ const ae = f.value[se];
11701
+ if (ae.type === "report") {
11702
+ const oe = S[M];
11703
+ if (M += 1, !(oe != null && oe.buildExportConfigs)) continue;
11704
+ D(`正在获取表格数据(${M}/${b})...`);
11705
+ const L = await oe.buildExportConfigs(!!p.value.exportAll);
11706
+ if (!L) continue;
11707
+ const H = getThemeColors(ae.theme || "none").border;
11708
+ q.push({ type: "report", reportConfig: L, subReportIndex: ae.subReprotIndex || 0 }), L.forEach((j) => J.push({ type: "report", reportConfig: j, themeColor: H, theme: ae.theme || "none" }));
11685
11709
  } else {
11686
- R += 1, x(`正在截取图表/指标卡(${R}/${D})...`);
11687
- const ae = l.value[J];
11688
- if (!ae) continue;
11689
- let ie = null;
11690
- 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({
11710
+ U += 1, D(`正在截取图表/指标卡(${U}/${I})...`);
11711
+ const oe = u.value[se];
11712
+ if (!oe) continue;
11713
+ let L = null;
11714
+ ae.type === "label" ? L = ((ee = oe.getLabelImage) == null ? void 0 : ee.call(oe)) || null : L = ((ie = oe.getChartImage) == null ? void 0 : ie.call(oe)) || null, L && (q.push({ type: "image", image: L }), J.push({
11691
11715
  type: "image",
11692
- src: ie.base64,
11693
- width: ie.width,
11694
- height: ie.height,
11695
- stretch: ne.type !== "label"
11716
+ src: L.base64,
11717
+ width: L.width,
11718
+ height: L.height,
11719
+ stretch: ae.type !== "label"
11696
11720
  }));
11697
11721
  }
11698
11722
  }
11699
- return { mergeItems: k, printItems: G };
11723
+ return { mergeItems: q, printItems: J };
11700
11724
  }
11701
- let w = null;
11702
- function x(T) {
11703
- w || (w = ElLoading.service({
11704
- target: s.value ?? void 0,
11725
+ let R = null;
11726
+ function D(S) {
11727
+ R || (R = ElLoading.service({
11728
+ target: c.value ?? void 0,
11705
11729
  background: "rgba(255, 255, 255, 0.75)"
11706
- })), w.setText(T);
11730
+ })), R.setText(S);
11707
11731
  }
11708
- function I() {
11709
- w == null || w.close(), w = null;
11732
+ function O() {
11733
+ R == null || R.close(), R = null;
11710
11734
  }
11711
- async function A(T) {
11712
- x("正在准备导出...");
11735
+ async function N(S) {
11736
+ D("正在准备导出...");
11713
11737
  try {
11714
- const { mergeItems: b, printItems: D } = await C();
11738
+ const { mergeItems: b, printItems: I } = await x();
11715
11739
  if (!b.length) {
11716
11740
  ElMessage.warning("当前报表没有可导出的内容");
11717
11741
  return;
11718
11742
  }
11719
- if (T === "excel") {
11720
- x("正在生成 Excel 文件...");
11721
- const S = await exportReportMerged(b, o.value || "报表导出", "gray");
11722
- S && downloadReport(S, o.value || "报表导出", "excel");
11723
- } else T.startsWith("pdf") && await exportReportByBrowser(D, u.value, o.value, {
11724
- onProgress: (S) => x(S),
11725
- orientation: T === "pdf-landscape" ? "landscape" : "portrait",
11726
- singlePage: T === "pdf-single"
11743
+ if (S === "excel") {
11744
+ D("正在生成 Excel 文件...");
11745
+ const M = await exportReportMerged(b, a.value || "报表导出", "gray");
11746
+ M && downloadReport(M, a.value || "报表导出", "excel");
11747
+ } else S.startsWith("pdf") && await exportReportByBrowser(I, d.value, a.value, {
11748
+ onProgress: (M) => D(M),
11749
+ orientation: S === "pdf-landscape" ? "landscape" : "portrait",
11750
+ singlePage: S === "pdf-single"
11727
11751
  });
11728
11752
  } finally {
11729
- I();
11753
+ O();
11730
11754
  }
11731
11755
  }
11732
- const O = ref(!1), N = ref(/* @__PURE__ */ new Map()), U = ref(/* @__PURE__ */ new Map()), L = ref([]);
11733
- async function M() {
11734
- var D, S;
11735
- if (L.value) {
11736
- const R = L.value.filter((k) => k && typeof k.renderHandler == "function").map((k) => k.renderHandler());
11737
- R.length > 0 && (n.value = !0, await Promise.all(R), n.value = !1);
11756
+ const G = ref(!1), F = ref(/* @__PURE__ */ new Map()), k = ref(/* @__PURE__ */ new Map()), A = ref([]);
11757
+ async function T() {
11758
+ var I, M;
11759
+ if (A.value) {
11760
+ const U = A.value.filter((q) => q && typeof q.renderHandler == "function").map((q) => q.renderHandler());
11761
+ U.length > 0 && (i.value = !0, await Promise.all(U), i.value = !1);
11738
11762
  }
11739
- const T = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
11740
- if (L.value) {
11741
- for (let R = 0; R < c.value.length; R++)
11742
- if (c.value[R].type === "report") {
11743
- const k = L.value.find((G, W) => c.value.filter((J) => J.type === "report")[W] === c.value[R]);
11744
- k && ((S = (D = c.value[R].data) == null ? void 0 : D.source) != null && S.some((G) => G.loopTable) ? k.batchTableConfigs && b.set(
11745
- R,
11746
- k.batchTableConfigs.map((G) => G.length > 0 ? [G[0]] : [])
11747
- ) : k.tableConfig && T.set(R, k.tableConfig.length > 0 ? [k.tableConfig[0]] : []));
11763
+ const S = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
11764
+ if (A.value) {
11765
+ for (let U = 0; U < f.value.length; U++)
11766
+ if (f.value[U].type === "report") {
11767
+ const q = A.value.find((J, ee) => f.value.filter((se) => se.type === "report")[ee] === f.value[U]);
11768
+ q && ((M = (I = f.value[U].data) == null ? void 0 : I.source) != null && M.some((J) => J.loopTable) ? q.batchTableConfigs && b.set(
11769
+ U,
11770
+ q.batchTableConfigs.map((J) => J.length > 0 ? [J[0]] : [])
11771
+ ) : q.tableConfig && S.set(U, q.tableConfig.length > 0 ? [q.tableConfig[0]] : []));
11748
11772
  }
11749
11773
  }
11750
- N.value = T, U.value = b, O.value = !0;
11774
+ F.value = S, k.value = b, G.value = !0;
11751
11775
  }
11752
11776
  return onMounted(() => {
11753
- g(r.id);
11754
- }), (T, b) => {
11755
- const D = resolveDirective("loading");
11777
+ E(r.id);
11778
+ }), (S, b) => {
11779
+ const I = resolveDirective("loading");
11756
11780
  return openBlock(), createElementBlock(Fragment, null, [
11757
11781
  createElementVNode("div", _hoisted_1$1, [
11758
- createElementVNode("span", _hoisted_2$1, toDisplayString(o.value), 1),
11759
- p.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
11782
+ createElementVNode("span", _hoisted_2$1, toDisplayString(a.value), 1),
11783
+ g.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
11760
11784
  createVNode(unref(ElDropdown), {
11761
11785
  trigger: "click",
11762
- onCommand: A
11786
+ onCommand: N
11763
11787
  }, {
11764
11788
  dropdown: withCtx(() => [
11765
11789
  createVNode(unref(ElDropdownMenu), null, {
@@ -11767,11 +11791,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11767
11791
  createVNode(unref(ElDropdownItem), { command: "excel" }, {
11768
11792
  default: withCtx(() => [
11769
11793
  b[2] || (b[2] = createElementVNode("i", { class: "yhreport-icon report-excel" }, null, -1)),
11770
- createTextVNode(toDisplayString(f.value.exportAll ? "导出Excel(全部数据)" : "导出Excel"), 1)
11794
+ createTextVNode(toDisplayString(p.value.exportAll ? "导出Excel(全部数据)" : "导出Excel"), 1)
11771
11795
  ]),
11772
11796
  _: 1
11773
11797
  }),
11774
- f.value.pdfEnabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11798
+ p.value.pdfEnabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11775
11799
  createVNode(unref(ElDropdownItem), {
11776
11800
  command: "pdf",
11777
11801
  divided: ""
@@ -11817,11 +11841,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11817
11841
  })
11818
11842
  ]))
11819
11843
  ]),
11820
- p.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
11844
+ g.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
11821
11845
  createVNode(unref(ElButton), {
11822
11846
  type: "primary",
11823
11847
  size: "small",
11824
- onClick: M
11848
+ onClick: T
11825
11849
  }, {
11826
11850
  default: withCtx(() => [...b[6] || (b[6] = [
11827
11851
  createTextVNode(" 打印预览 ", -1)
@@ -11829,77 +11853,77 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11829
11853
  _: 1
11830
11854
  })
11831
11855
  ])) : createCommentVNode("", !0),
11832
- i.value ? (openBlock(), createElementBlock("section", _hoisted_5$1, [
11856
+ s.value ? (openBlock(), createElementBlock("section", _hoisted_5$1, [
11833
11857
  createVNode(unref(ElResult), {
11834
11858
  icon: "error",
11835
11859
  title: "报表加载失败",
11836
- "sub-title": i.value
11860
+ "sub-title": s.value
11837
11861
  }, null, 8, ["sub-title"])
11838
11862
  ])) : withDirectives((openBlock(), createElementBlock("section", {
11839
11863
  key: 2,
11840
- class: normalizeClass(["yh-report-viewer-wrapper", { "print-mode": p.value }]),
11841
- style: normalizeStyle(m.value),
11864
+ class: normalizeClass(["yh-report-viewer-wrapper", { "print-mode": g.value }]),
11865
+ style: normalizeStyle(_.value),
11842
11866
  ref_key: "viewWrapper",
11843
- ref: s
11867
+ ref: c
11844
11868
  }, [
11845
- (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (S) => (openBlock(), createBlock(unref(ElAlert), {
11846
- key: S.key,
11869
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (M) => (openBlock(), createBlock(unref(ElAlert), {
11870
+ key: M.key,
11847
11871
  class: "yh-report-data-source-error",
11848
11872
  type: "error",
11849
11873
  "show-icon": "",
11850
11874
  closable: !0,
11851
- title: S.message,
11852
- onClose: (R) => E(S)
11875
+ title: M.message,
11876
+ onClose: (U) => y(M)
11853
11877
  }, null, 8, ["title", "onClose"]))), 128)),
11854
- (openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (S, R) => (openBlock(), createElementBlock(Fragment, null, [
11855
- S.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
11878
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (M, U) => (openBlock(), createElementBlock(Fragment, null, [
11879
+ M.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
11856
11880
  key: 0,
11857
- "is-print-mode": p.value,
11881
+ "is-print-mode": g.value,
11858
11882
  ref_for: !0,
11859
11883
  ref_key: "reportViewItemRefs",
11860
- ref: L,
11861
- index: R,
11862
- length: c.value.length,
11884
+ ref: A,
11885
+ index: U,
11886
+ length: f.value.length,
11863
11887
  id: t.id,
11864
- name: o.value,
11865
- config: S,
11866
- onUpdateData: y,
11867
- onReportError: _
11868
- }, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : S.type === "label" ? (openBlock(), createBlock(labelItem, {
11888
+ name: a.value,
11889
+ config: M,
11890
+ onUpdateData: C,
11891
+ onReportError: $
11892
+ }, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : M.type === "label" ? (openBlock(), createBlock(labelItem, {
11869
11893
  key: 1,
11870
11894
  ref_for: !0,
11871
- ref: (k) => v(k, R),
11872
- index: R,
11873
- length: c.value.length,
11895
+ ref: (q) => w(q, U),
11896
+ index: U,
11897
+ length: f.value.length,
11874
11898
  id: t.id,
11875
- config: S,
11876
- onReportError: _
11899
+ config: M,
11900
+ onReportError: $
11877
11901
  }, null, 8, ["index", "length", "id", "config"])) : (openBlock(), createBlock(_sfc_main$4, {
11878
11902
  key: 2,
11879
11903
  ref_for: !0,
11880
- ref: (k) => v(k, R),
11881
- config: S,
11904
+ ref: (q) => w(q, U),
11905
+ config: M,
11882
11906
  id: t.id,
11883
- index: R,
11884
- length: c.value.length
11907
+ index: U,
11908
+ length: f.value.length
11885
11909
  }, null, 8, ["config", "id", "index", "length"]))
11886
11910
  ], 64))), 256)),
11887
11911
  withDirectives(createElementVNode("div", _hoisted_6$1, [...b[7] || (b[7] = [
11888
11912
  createElementVNode("i", { class: "iconfont icon-backtop" }, null, -1)
11889
11913
  ])], 512), [
11890
- [vShow, $.value]
11914
+ [vShow, v.value]
11891
11915
  ])
11892
11916
  ], 6)), [
11893
- [D, n.value]
11917
+ [I, i.value]
11894
11918
  ]),
11895
11919
  createVNode(_sfc_main$2, {
11896
- visible: O.value,
11897
- "onUpdate:visible": b[0] || (b[0] = (S) => O.value = S),
11898
- configs: c.value,
11899
- "print-config": u.value,
11900
- "statement-name": o.value,
11901
- "table-configs": N.value,
11902
- "batch-table-configs": U.value
11920
+ visible: G.value,
11921
+ "onUpdate:visible": b[0] || (b[0] = (M) => G.value = M),
11922
+ configs: f.value,
11923
+ "print-config": d.value,
11924
+ "statement-name": a.value,
11925
+ "table-configs": F.value,
11926
+ "batch-table-configs": k.value
11903
11927
  }, null, 8, ["visible", "configs", "print-config", "statement-name", "table-configs", "batch-table-configs"])
11904
11928
  ], 64);
11905
11929
  };
@@ -12083,7 +12107,7 @@ const printerClient = new PrinterClient(), printerOptions = computed(
12083
12107
  }))
12084
12108
  );
12085
12109
  async function fetchReportForPrint(t, e, r) {
12086
- const n = await getConfig(t), o = { ...DEFAULT_PRINT_CONFIG, ...n.printConfig || {} }, i = {}, a = !!(r != null && r.isPagination), s = (r == null ? void 0 : r.pageSize) ?? 5e3, l = (r == null ? void 0 : r.pageIndex) ?? 1;
12110
+ const n = await getConfig(t), o = normalizePrintConfig({ ...DEFAULT_PRINT_CONFIG, ...n.printConfig || {} }), i = {}, a = !!(r != null && r.isPagination), s = (r == null ? void 0 : r.pageSize) ?? 5e3, l = (r == null ? void 0 : r.pageIndex) ?? 1;
12087
12111
  for (const c of n.remoteOptions || []) {
12088
12112
  if (c.type !== "report")
12089
12113
  continue;
@@ -12394,7 +12418,7 @@ async function registerRoute(t, e) {
12394
12418
  title: "报表列表",
12395
12419
  icon: "iconfont icon-s-grid"
12396
12420
  },
12397
- component: () => import("./StatementList-D1c4iGOZ.mjs")
12421
+ component: () => import("./StatementList-5Bk_kecm.mjs")
12398
12422
  }), e.addRoute("Index", {
12399
12423
  path: "statement/design/:id",
12400
12424
  name: "报表设计",
@@ -12403,7 +12427,7 @@ async function registerRoute(t, e) {
12403
12427
  title: "报表设计",
12404
12428
  icon: "iconfont icon-s-grid"
12405
12429
  },
12406
- component: () => import("./StatementDesign-DhAUZTV6.mjs")
12430
+ component: () => import("./StatementDesign-Bh4L1Dek.mjs")
12407
12431
  }), e.addRoute("Index", {
12408
12432
  path: "statement/detail/:id",
12409
12433
  name: "后台报表查看",
@@ -12412,7 +12436,7 @@ async function registerRoute(t, e) {
12412
12436
  title: "后台报表查看",
12413
12437
  icon: "iconfont icon-s-grid"
12414
12438
  },
12415
- component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12439
+ component: () => import("./StatementDetail-BzwPa27e.mjs")
12416
12440
  })) : e.hasRoute("Index") && (e.addRoute("Index", {
12417
12441
  path: "statement/design/:id",
12418
12442
  name: "报表设计",
@@ -12421,7 +12445,7 @@ async function registerRoute(t, e) {
12421
12445
  title: "报表设计",
12422
12446
  icon: "iconfont icon-s-grid"
12423
12447
  },
12424
- component: () => import("./StatementDesign-DhAUZTV6.mjs")
12448
+ component: () => import("./StatementDesign-Bh4L1Dek.mjs")
12425
12449
  }), e.addRoute("Index", {
12426
12450
  path: "statement/detail/:id",
12427
12451
  name: "前台报表查看",
@@ -12430,7 +12454,7 @@ async function registerRoute(t, e) {
12430
12454
  title: "报表查看",
12431
12455
  icon: "iconfont icon-s-grid"
12432
12456
  },
12433
- component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12457
+ component: () => import("./StatementDetail-BzwPa27e.mjs")
12434
12458
  })), e.addRoute({
12435
12459
  path: "/statementdetail/:id",
12436
12460
  name: "报表查看",
@@ -12441,7 +12465,7 @@ async function registerRoute(t, e) {
12441
12465
  isWhite: !0
12442
12466
  },
12443
12467
  props: !0,
12444
- component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12468
+ component: () => import("./StatementDetail-BzwPa27e.mjs")
12445
12469
  }), e.hasRoute("Index") && e.addRoute("Index", {
12446
12470
  path: "innerStatementdetail/:id",
12447
12471
  name: "系统内报表查看",
@@ -12452,7 +12476,7 @@ async function registerRoute(t, e) {
12452
12476
  noPadding: !0
12453
12477
  },
12454
12478
  props: !0,
12455
- component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12479
+ component: () => import("./StatementDetail-BzwPa27e.mjs")
12456
12480
  });
12457
12481
  }
12458
12482
  const index = {
@@ -12478,7 +12502,7 @@ const index = {
12478
12502
  url: "/admin/statement/list",
12479
12503
  menuType: "WINDOW"
12480
12504
  }), c == null || c({
12481
- "/statement/list": () => import("./StatementList-D1c4iGOZ.mjs")
12505
+ "/statement/list": () => import("./StatementList-5Bk_kecm.mjs")
12482
12506
  }), o(async () => {
12483
12507
  !a || !a.hasRoute("Index") || registerRoute(s.isAdmin, a);
12484
12508
  }), l && (e != null && e.printEnabled) && l.registerSlot({
@@ -12521,32 +12545,33 @@ function dynamicReportView(t) {
12521
12545
  );
12522
12546
  }
12523
12547
  export {
12524
- getLoopSourceColumns as A,
12525
- applyBorderOperation as B,
12548
+ usePrinterClient as $,
12549
+ numberToColumn as A,
12550
+ getLoopSourceColumns as B,
12526
12551
  CellType as C,
12527
12552
  DEFAULT_EXPORT_CONFIG as D,
12528
- validateAndCompleteTableConfig as E,
12553
+ applyBorderOperation as E,
12529
12554
  FormatType as F,
12530
- DEFAULT_PRINT_HEADER as G,
12531
- DEFAULT_PRINT_FOOTER as H,
12532
- DEFAULT_PRINT_WATERMARK as I,
12533
- chartsTypeList as J,
12534
- getDateSourceColumns as K,
12535
- getDateSourceList as L,
12536
- getDateSourceData as M,
12537
- transformArrayToObject as N,
12538
- _sfc_main$1 as O,
12539
- _sfc_main$2 as P,
12540
- ItemTypes as Q,
12541
- getReportDefaultOption as R,
12542
- PrinterClient as S,
12555
+ validateAndCompleteTableConfig as G,
12556
+ DEFAULT_PRINT_HEADER as H,
12557
+ DEFAULT_PRINT_FOOTER as I,
12558
+ DEFAULT_PRINT_WATERMARK as J,
12559
+ chartsTypeList as K,
12560
+ getDateSourceColumns as L,
12561
+ getDateSourceList as M,
12562
+ getDateSourceData as N,
12563
+ transformArrayToObject as O,
12564
+ _sfc_main$1 as P,
12565
+ _sfc_main$2 as Q,
12566
+ ItemTypes as R,
12567
+ getReportDefaultOption as S,
12543
12568
  TypeItems as T,
12544
- index as U,
12545
- dynamicReportView as V,
12546
- fetchReportForPrint as W,
12547
- printReportByBrowser as X,
12548
- silenceExport as Y,
12549
- usePrinterClient as Z,
12569
+ PrinterClient as U,
12570
+ index as V,
12571
+ dynamicReportView as W,
12572
+ fetchReportForPrint as X,
12573
+ printReportByBrowser as Y,
12574
+ silenceExport as Z,
12550
12575
  _export_sfc as _,
12551
12576
  del as a,
12552
12577
  defaultCol as b,
@@ -12560,19 +12585,19 @@ export {
12560
12585
  getConfig as j,
12561
12586
  getThemeColors as k,
12562
12587
  renderCellStyle as l,
12563
- getBorderCss as m,
12564
- normalizeBorder as n,
12565
- componentTransition as o,
12588
+ normalizeBorder as m,
12589
+ normalizePrintConfig as n,
12590
+ getBorderCss as o,
12566
12591
  parseExpression as p,
12567
- mmToPx as q,
12592
+ componentTransition as q,
12568
12593
  rct as r,
12569
12594
  save as s,
12570
- colors as t,
12571
- chartItem as u,
12572
- DataSourceColumnDataType as v,
12573
- DATE_RANGE_TYPES as w,
12574
- parseShiftOffset as x,
12575
- formatShiftOffset as y,
12576
- numberToColumn as z
12577
- };
12578
- //# sourceMappingURL=index-DgsSvRRw.mjs.map
12595
+ mmToPx as t,
12596
+ colors as u,
12597
+ chartItem as v,
12598
+ DataSourceColumnDataType as w,
12599
+ DATE_RANGE_TYPES as x,
12600
+ parseShiftOffset as y,
12601
+ formatShiftOffset as z
12602
+ };
12603
+ //# sourceMappingURL=index-DwoZb3xJ.mjs.map