yh-report 2.4.114 → 2.4.116

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