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.
- package/StatementDesign-zRr4KtsS.mjs +70420 -0
- package/StatementDesign-zRr4KtsS.mjs.map +1 -0
- package/{StatementDetail-Cx7VdXGa.mjs → StatementDetail-BsKRc5j0.mjs} +2 -2
- package/{StatementDetail-Cx7VdXGa.mjs.map → StatementDetail-BsKRc5j0.mjs.map} +1 -1
- package/{StatementList-DcYuvG-K.mjs → StatementList-B3Qwcj7x.mjs} +2 -2
- package/{StatementList-DcYuvG-K.mjs.map → StatementList-B3Qwcj7x.mjs.map} +1 -1
- package/{index-Dm_dNt8a.mjs → index-CoL_uZKj.mjs} +1200 -1187
- package/index-CoL_uZKj.mjs.map +1 -0
- package/index.es.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/StatementDesign-Cxh5YK4D.mjs +0 -52147
- package/StatementDesign-Cxh5YK4D.mjs.map +0 -1
- package/index-Dm_dNt8a.mjs.map +0 -1
|
@@ -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((
|
|
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
|
|
881
|
-
if (
|
|
880
|
+
let d = s.options;
|
|
881
|
+
if (d.length && d[0].type === "tableSheet")
|
|
882
882
|
throw ElMessage.error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版"), useRouter().back(), new Error("当前报表版本不支持老版本数据,如须使用老数据请不要升级本版");
|
|
883
|
-
|
|
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((
|
|
887
|
-
|
|
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
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
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:
|
|
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
|
|
1262
|
-
if (
|
|
1263
|
-
const S = themeColors[r] || "#333333",
|
|
1264
|
-
if (!(!
|
|
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:
|
|
1267
|
-
color: { argb: "FF" + (
|
|
1266
|
+
style: k.style,
|
|
1267
|
+
color: { argb: "FF" + (k.color || S).replace("#", "") }
|
|
1268
1268
|
};
|
|
1269
1269
|
};
|
|
1270
1270
|
C.border = {
|
|
1271
|
-
top:
|
|
1272
|
-
left:
|
|
1273
|
-
bottom:
|
|
1274
|
-
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
|
|
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[
|
|
1297
|
+
argb: "FF" + themeColors[D].replace("#", "")
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1301
|
+
const M = {
|
|
1302
1302
|
vertical: "middle",
|
|
1303
1303
|
horizontal: "center",
|
|
1304
1304
|
wrapText: !0
|
|
1305
1305
|
};
|
|
1306
|
-
w && w.textAlign && (
|
|
1307
|
-
const
|
|
1308
|
-
if (
|
|
1309
|
-
const
|
|
1310
|
-
let
|
|
1311
|
-
|
|
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 (
|
|
1314
|
-
let
|
|
1315
|
-
|
|
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(
|
|
1367
|
-
var
|
|
1368
|
-
return "[" +
|
|
1369
|
-
} }, y = function(
|
|
1370
|
-
var
|
|
1371
|
-
return !
|
|
1372
|
-
}, v = { s: y, z: function(
|
|
1373
|
-
var
|
|
1374
|
-
return (
|
|
1375
|
-
}, m: function
|
|
1376
|
-
if (
|
|
1377
|
-
var
|
|
1378
|
-
return +(-(
|
|
1379
|
-
}, a: function(
|
|
1380
|
-
return
|
|
1381
|
-
}, p: function(
|
|
1382
|
-
return { M: f, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: d }[
|
|
1383
|
-
}, u: function(
|
|
1384
|
-
return
|
|
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
|
|
1388
|
-
return
|
|
1389
|
-
},
|
|
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 (!
|
|
1392
|
-
if (typeof
|
|
1393
|
-
var
|
|
1394
|
-
w[
|
|
1395
|
-
var
|
|
1396
|
-
if (!S &&
|
|
1391
|
+
if (!T) return C;
|
|
1392
|
+
if (typeof T == "string") {
|
|
1393
|
+
var R = T.toLowerCase();
|
|
1394
|
+
w[R] && (S = R), b && (w[R] = b, S = R);
|
|
1395
|
+
var k = T.split("-");
|
|
1396
|
+
if (!S && k.length > 1) return M(k[0]);
|
|
1397
1397
|
} else {
|
|
1398
|
-
var
|
|
1399
|
-
w[
|
|
1398
|
+
var G = T.name;
|
|
1399
|
+
w[G] = T, S = G;
|
|
1400
1400
|
}
|
|
1401
|
-
return !
|
|
1402
|
-
},
|
|
1403
|
-
if (
|
|
1404
|
-
var
|
|
1405
|
-
return
|
|
1406
|
-
},
|
|
1407
|
-
|
|
1408
|
-
return
|
|
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
|
|
1411
|
-
function
|
|
1412
|
-
this.$L =
|
|
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
|
|
1415
|
-
return
|
|
1416
|
-
this.$d = function(
|
|
1417
|
-
var S =
|
|
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 (
|
|
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
|
|
1423
|
-
if (
|
|
1424
|
-
var
|
|
1425
|
-
return
|
|
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
|
-
}(
|
|
1430
|
-
},
|
|
1431
|
-
var
|
|
1432
|
-
this.$y =
|
|
1433
|
-
},
|
|
1434
|
-
return
|
|
1435
|
-
},
|
|
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
|
-
},
|
|
1438
|
-
var S =
|
|
1439
|
-
return this.startOf(
|
|
1440
|
-
},
|
|
1441
|
-
return
|
|
1442
|
-
},
|
|
1443
|
-
return this.endOf(
|
|
1444
|
-
},
|
|
1445
|
-
return
|
|
1446
|
-
},
|
|
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
|
-
},
|
|
1448
|
+
}, T.valueOf = function() {
|
|
1449
1449
|
return this.$d.getTime();
|
|
1450
|
-
},
|
|
1451
|
-
var S = this,
|
|
1452
|
-
var
|
|
1453
|
-
return
|
|
1454
|
-
},
|
|
1455
|
-
return
|
|
1456
|
-
},
|
|
1457
|
-
switch (
|
|
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
|
|
1459
|
+
return R ? G(1, 0) : G(31, 11);
|
|
1460
1460
|
case f:
|
|
1461
|
-
return
|
|
1461
|
+
return R ? G(1, J) : G(0, J + 1);
|
|
1462
1462
|
case u:
|
|
1463
|
-
var
|
|
1464
|
-
return
|
|
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
|
|
1467
|
+
return W(ae + "Hours", 0);
|
|
1468
1468
|
case l:
|
|
1469
|
-
return
|
|
1469
|
+
return W(ae + "Minutes", 1);
|
|
1470
1470
|
case s:
|
|
1471
|
-
return
|
|
1471
|
+
return W(ae + "Seconds", 2);
|
|
1472
1472
|
case a:
|
|
1473
|
-
return
|
|
1473
|
+
return W(ae + "Milliseconds", 3);
|
|
1474
1474
|
default:
|
|
1475
1475
|
return this.clone();
|
|
1476
1476
|
}
|
|
1477
|
-
},
|
|
1478
|
-
return this.startOf(
|
|
1479
|
-
},
|
|
1480
|
-
var S,
|
|
1481
|
-
if (
|
|
1482
|
-
var
|
|
1483
|
-
|
|
1484
|
-
} else
|
|
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
|
-
},
|
|
1487
|
-
return this.clone().$set(
|
|
1488
|
-
},
|
|
1489
|
-
return this[
|
|
1490
|
-
},
|
|
1491
|
-
var S,
|
|
1492
|
-
|
|
1493
|
-
var
|
|
1494
|
-
var
|
|
1495
|
-
return
|
|
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 (
|
|
1498
|
-
if (
|
|
1499
|
-
if (
|
|
1500
|
-
if (
|
|
1501
|
-
var
|
|
1502
|
-
return
|
|
1503
|
-
},
|
|
1504
|
-
return this.add(-1 *
|
|
1505
|
-
},
|
|
1506
|
-
var
|
|
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
|
|
1509
|
-
return
|
|
1510
|
-
}, se = function(
|
|
1511
|
-
return
|
|
1512
|
-
},
|
|
1513
|
-
var
|
|
1514
|
-
return
|
|
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
|
|
1517
|
-
return
|
|
1518
|
-
switch (
|
|
1516
|
+
return R.replace(E, function(H, j) {
|
|
1517
|
+
return j || function(q) {
|
|
1518
|
+
switch (q) {
|
|
1519
1519
|
case "YY":
|
|
1520
|
-
return String(
|
|
1520
|
+
return String(D.$y).slice(-2);
|
|
1521
1521
|
case "YYYY":
|
|
1522
|
-
return
|
|
1522
|
+
return N.s(D.$y, 4, "0");
|
|
1523
1523
|
case "M":
|
|
1524
|
-
return
|
|
1524
|
+
return ee + 1;
|
|
1525
1525
|
case "MM":
|
|
1526
|
-
return
|
|
1526
|
+
return N.s(ee + 1, 2, "0");
|
|
1527
1527
|
case "MMM":
|
|
1528
|
-
return
|
|
1528
|
+
return ie(S.monthsShort, ee, ne, 3);
|
|
1529
1529
|
case "MMMM":
|
|
1530
|
-
return
|
|
1530
|
+
return ie(ne, ee);
|
|
1531
1531
|
case "D":
|
|
1532
|
-
return
|
|
1532
|
+
return D.$D;
|
|
1533
1533
|
case "DD":
|
|
1534
|
-
return
|
|
1534
|
+
return N.s(D.$D, 2, "0");
|
|
1535
1535
|
case "d":
|
|
1536
|
-
return String(
|
|
1536
|
+
return String(D.$W);
|
|
1537
1537
|
case "dd":
|
|
1538
|
-
return
|
|
1538
|
+
return ie(S.weekdaysMin, D.$W, J, 2);
|
|
1539
1539
|
case "ddd":
|
|
1540
|
-
return
|
|
1540
|
+
return ie(S.weekdaysShort, D.$W, J, 3);
|
|
1541
1541
|
case "dddd":
|
|
1542
|
-
return
|
|
1542
|
+
return J[D.$W];
|
|
1543
1543
|
case "H":
|
|
1544
|
-
return String(
|
|
1544
|
+
return String(G);
|
|
1545
1545
|
case "HH":
|
|
1546
|
-
return
|
|
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
|
|
1552
|
+
return F(G, W, !0);
|
|
1553
1553
|
case "A":
|
|
1554
|
-
return
|
|
1554
|
+
return F(G, W, !1);
|
|
1555
1555
|
case "m":
|
|
1556
|
-
return String(
|
|
1556
|
+
return String(W);
|
|
1557
1557
|
case "mm":
|
|
1558
|
-
return
|
|
1558
|
+
return N.s(W, 2, "0");
|
|
1559
1559
|
case "s":
|
|
1560
|
-
return String(
|
|
1560
|
+
return String(D.$s);
|
|
1561
1561
|
case "ss":
|
|
1562
|
-
return
|
|
1562
|
+
return N.s(D.$s, 2, "0");
|
|
1563
1563
|
case "SSS":
|
|
1564
|
-
return
|
|
1564
|
+
return N.s(D.$ms, 3, "0");
|
|
1565
1565
|
case "Z":
|
|
1566
|
-
return
|
|
1566
|
+
return k;
|
|
1567
1567
|
}
|
|
1568
1568
|
return null;
|
|
1569
|
-
}(
|
|
1569
|
+
}(H) || k.replace(":", "");
|
|
1570
1570
|
});
|
|
1571
|
-
},
|
|
1571
|
+
}, T.utcOffset = function() {
|
|
1572
1572
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1573
|
-
},
|
|
1574
|
-
var
|
|
1575
|
-
return
|
|
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 (
|
|
1577
|
+
switch (G) {
|
|
1578
1578
|
case p:
|
|
1579
|
-
|
|
1579
|
+
R = ne() / 12;
|
|
1580
1580
|
break;
|
|
1581
1581
|
case f:
|
|
1582
|
-
|
|
1582
|
+
R = ne();
|
|
1583
1583
|
break;
|
|
1584
1584
|
case d:
|
|
1585
|
-
|
|
1585
|
+
R = ne() / 3;
|
|
1586
1586
|
break;
|
|
1587
1587
|
case u:
|
|
1588
|
-
|
|
1588
|
+
R = (J - ee) / 6048e5;
|
|
1589
1589
|
break;
|
|
1590
1590
|
case c:
|
|
1591
|
-
|
|
1591
|
+
R = (J - ee) / 864e5;
|
|
1592
1592
|
break;
|
|
1593
1593
|
case l:
|
|
1594
|
-
|
|
1594
|
+
R = J / o;
|
|
1595
1595
|
break;
|
|
1596
1596
|
case s:
|
|
1597
|
-
|
|
1597
|
+
R = J / n;
|
|
1598
1598
|
break;
|
|
1599
1599
|
case a:
|
|
1600
|
-
|
|
1600
|
+
R = J / r;
|
|
1601
1601
|
break;
|
|
1602
1602
|
default:
|
|
1603
|
-
|
|
1603
|
+
R = J;
|
|
1604
1604
|
}
|
|
1605
|
-
return S ?
|
|
1606
|
-
},
|
|
1605
|
+
return S ? R : N.a(R);
|
|
1606
|
+
}, T.daysInMonth = function() {
|
|
1607
1607
|
return this.endOf(f).$D;
|
|
1608
|
-
},
|
|
1608
|
+
}, T.$locale = function() {
|
|
1609
1609
|
return w[this.$L];
|
|
1610
|
-
},
|
|
1611
|
-
if (!
|
|
1612
|
-
var S = this.clone(),
|
|
1613
|
-
return
|
|
1614
|
-
},
|
|
1615
|
-
return
|
|
1616
|
-
},
|
|
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
|
-
},
|
|
1618
|
+
}, T.toJSON = function() {
|
|
1619
1619
|
return this.isValid() ? this.toISOString() : null;
|
|
1620
|
-
},
|
|
1620
|
+
}, T.toISOString = function() {
|
|
1621
1621
|
return this.$d.toISOString();
|
|
1622
|
-
},
|
|
1622
|
+
}, T.toString = function() {
|
|
1623
1623
|
return this.$d.toUTCString();
|
|
1624
|
-
},
|
|
1625
|
-
}(), L =
|
|
1626
|
-
return
|
|
1627
|
-
L[
|
|
1628
|
-
return this.$g(
|
|
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
|
-
}),
|
|
1631
|
-
return
|
|
1632
|
-
},
|
|
1633
|
-
return
|
|
1634
|
-
},
|
|
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,
|
|
3158
|
-
if (!
|
|
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 || (
|
|
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
|
-
|
|
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)),
|
|
3167
|
-
if (
|
|
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,
|
|
3171
|
-
for (d = 0,
|
|
3172
|
-
|
|
3173
|
-
m = d || f <
|
|
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 / (
|
|
3176
|
-
|
|
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(
|
|
3179
|
-
while ((
|
|
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(
|
|
7364
|
-
return
|
|
7365
|
-
}).map(function(
|
|
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:
|
|
7368
|
-
mode:
|
|
7369
|
-
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
|
|
7428
|
-
for (let
|
|
7429
|
-
const
|
|
7430
|
-
|
|
7431
|
-
for (let
|
|
7432
|
-
const L = C[
|
|
7433
|
-
y[L] && y[L].node.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 =
|
|
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),
|
|
7465
|
-
for (let
|
|
7466
|
-
|
|
7467
|
-
return t.fromArray(p(
|
|
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
|
|
7550
|
-
const
|
|
7551
|
-
g[
|
|
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
|
|
7850
|
-
let [
|
|
7851
|
-
n && (
|
|
7852
|
-
let
|
|
7853
|
-
return
|
|
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 =
|
|
7857
|
-
return r ? `${
|
|
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),
|
|
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
|
|
7900
|
+
return formatPercentage(n, r, !1);
|
|
7895
7901
|
case FormatType.PROMILLE:
|
|
7896
|
-
return formatPercentage(n
|
|
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
|
|
7940
|
-
d = `<img src="${e.rawData ?? e.data}" alt="" style="max-width:100%;max-height:100%;object-fit:contain${
|
|
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
|
|
7945
|
-
|
|
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
|
|
7955
|
-
|
|
7956
|
-
} catch (
|
|
7957
|
-
console.error(`条形码生成失败 [${e.row}:${e.col}]:`,
|
|
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
|
|
7961
|
-
|
|
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
|
|
7967
|
-
|
|
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
|
|
7972
|
-
|
|
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 || {},
|
|
8050
|
-
v.style.paddingTop = `${
|
|
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
|
|
8087
|
+
const x = renderCell($, w, i);
|
|
8082
8088
|
if (w.clickSortField) {
|
|
8083
|
-
|
|
8084
|
-
const
|
|
8085
|
-
|
|
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 && (
|
|
8088
|
-
if (w.style && w.style.border === !1 &&
|
|
8089
|
-
const
|
|
8090
|
-
d.push(
|
|
8091
|
-
for (let
|
|
8092
|
-
const
|
|
8093
|
-
m.has(
|
|
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((
|
|
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 (
|
|
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
|
|
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) =>
|
|
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(
|
|
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
|
|
8713
|
-
let
|
|
8718
|
+
const x = getSeparatorKey("child", y, w);
|
|
8719
|
+
let A = (l[x] || []).map((O) => {
|
|
8714
8720
|
if ($) {
|
|
8715
|
-
let
|
|
8716
|
-
|
|
8717
|
-
let
|
|
8718
|
-
const L = getSeparatorKey("child", m, w,
|
|
8719
|
-
return l[L] ? l[L].push(
|
|
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((
|
|
8722
|
-
l[
|
|
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
|
|
8764
|
-
let
|
|
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:
|
|
8767
|
-
colSpan:
|
|
8768
|
-
colData:
|
|
8772
|
+
text: A,
|
|
8773
|
+
colSpan: x,
|
|
8774
|
+
colData: N
|
|
8769
8775
|
};
|
|
8770
|
-
if ($.push(
|
|
8776
|
+
if ($.push(U), x > 1) {
|
|
8771
8777
|
let L = {
|
|
8772
8778
|
...g,
|
|
8773
|
-
text:
|
|
8779
|
+
text: A,
|
|
8774
8780
|
type: "",
|
|
8775
8781
|
colSpan: 0,
|
|
8776
8782
|
rowSpan: 0
|
|
8777
8783
|
};
|
|
8778
|
-
for (let
|
|
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((
|
|
8804
|
-
v.forEach((
|
|
8805
|
-
let
|
|
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[
|
|
8809
|
-
colGroupIndex:
|
|
8814
|
+
combineValues: l[I],
|
|
8815
|
+
colGroupIndex: A
|
|
8810
8816
|
};
|
|
8811
|
-
|
|
8812
|
-
}), E.splice(g.col, 1, ...
|
|
8817
|
+
x.push(O);
|
|
8818
|
+
}), E.splice(g.col, 1, ...x);
|
|
8813
8819
|
} else if (v.length)
|
|
8814
|
-
v.forEach((w,
|
|
8815
|
-
let
|
|
8816
|
-
const
|
|
8817
|
-
l[
|
|
8818
|
-
let
|
|
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
|
|
8822
|
-
}), E.splice(g.col, 1, ...
|
|
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((
|
|
8827
|
-
let
|
|
8832
|
+
i.forEach((x) => {
|
|
8833
|
+
let I = {
|
|
8828
8834
|
...g
|
|
8829
8835
|
};
|
|
8830
|
-
delete
|
|
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,
|
|
8849
|
-
|
|
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((
|
|
9032
|
-
let
|
|
9033
|
-
E === s && (i || a) ?
|
|
9034
|
-
const
|
|
9035
|
-
n[
|
|
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:
|
|
9040
|
-
rowSpan:
|
|
9041
|
-
rawData: formatGroupText(
|
|
9045
|
+
index: I,
|
|
9046
|
+
rowSpan: A,
|
|
9047
|
+
rawData: formatGroupText(N),
|
|
9042
9048
|
groupLevel: w,
|
|
9043
|
-
groupIndices:
|
|
9049
|
+
groupIndices: I,
|
|
9044
9050
|
groupChildIndex: 0,
|
|
9045
9051
|
computedType: ComputedType.loopRow
|
|
9046
9052
|
};
|
|
9047
9053
|
$.push(L);
|
|
9048
|
-
let
|
|
9054
|
+
let M = {
|
|
9049
9055
|
..._,
|
|
9050
9056
|
text: "",
|
|
9051
|
-
rawData: formatGroupText(
|
|
9057
|
+
rawData: formatGroupText(N),
|
|
9052
9058
|
colSpan: 0,
|
|
9053
9059
|
rowSpan: 0,
|
|
9054
9060
|
groupLevel: w,
|
|
9055
|
-
groupIndices:
|
|
9061
|
+
groupIndices: I,
|
|
9056
9062
|
computedType: ComputedType.loopRow,
|
|
9057
9063
|
mergeTarget: [L.row, L.col]
|
|
9058
9064
|
};
|
|
9059
|
-
for (let
|
|
9060
|
-
let
|
|
9061
|
-
|
|
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 +=
|
|
9064
|
-
let
|
|
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
|
|
9069
|
-
|
|
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(`${
|
|
9073
|
-
row:
|
|
9074
|
-
cells:
|
|
9075
|
-
removeCount:
|
|
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,
|
|
9085
|
-
const
|
|
9086
|
-
let
|
|
9087
|
-
const
|
|
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:
|
|
9096
|
+
val: T
|
|
9091
9097
|
};
|
|
9092
9098
|
}) : [];
|
|
9093
|
-
const
|
|
9094
|
-
let
|
|
9099
|
+
const N = A.filter((L) => O.every((M) => L[M.key] === M.val));
|
|
9100
|
+
let U = {
|
|
9095
9101
|
..._,
|
|
9096
|
-
index:
|
|
9102
|
+
index: x
|
|
9097
9103
|
};
|
|
9098
|
-
if (delete
|
|
9099
|
-
const L =
|
|
9100
|
-
|
|
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
|
-
|
|
9103
|
-
$.push(
|
|
9104
|
-
}) : r.forEach((w,
|
|
9105
|
-
let
|
|
9106
|
-
const L = _.combineValues ? _.combineValues[
|
|
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:
|
|
9114
|
+
key: N,
|
|
9109
9115
|
val: L
|
|
9110
9116
|
};
|
|
9111
|
-
}) : []).every((
|
|
9117
|
+
}) : []).every((N) => w[N.key] === N.val), O = {
|
|
9112
9118
|
..._,
|
|
9113
|
-
index:
|
|
9119
|
+
index: x
|
|
9114
9120
|
};
|
|
9115
|
-
delete
|
|
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((
|
|
9130
|
-
let
|
|
9131
|
-
index:
|
|
9135
|
+
r.forEach((x, I) => {
|
|
9136
|
+
let A = {
|
|
9137
|
+
index: I,
|
|
9132
9138
|
..._
|
|
9133
9139
|
};
|
|
9134
|
-
delete
|
|
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((
|
|
9145
|
+
if (C.forEach((x, I) => {
|
|
9140
9146
|
if (a) {
|
|
9141
|
-
const
|
|
9142
|
-
let
|
|
9143
|
-
w.push(
|
|
9147
|
+
const A = getSeparatorKey("child", s, x);
|
|
9148
|
+
let O = n[A] || [];
|
|
9149
|
+
w.push(O);
|
|
9144
9150
|
} else {
|
|
9145
|
-
const
|
|
9146
|
-
let
|
|
9147
|
-
const
|
|
9148
|
-
|
|
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:
|
|
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 &&
|
|
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
|
|
9169
|
+
const x = Math.max(...w.map((A) => A.length));
|
|
9164
9170
|
p || (p = {
|
|
9165
|
-
count:
|
|
9171
|
+
count: x,
|
|
9166
9172
|
row: _.row,
|
|
9167
9173
|
index: E
|
|
9168
9174
|
});
|
|
9169
|
-
const
|
|
9175
|
+
const I = {
|
|
9170
9176
|
colIndex: E,
|
|
9171
|
-
maxCount:
|
|
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(
|
|
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 [
|
|
9187
|
-
|
|
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,
|
|
9202
|
-
const
|
|
9207
|
+
(n[v] ? Array.from(n[v]) : []).forEach((w, x) => {
|
|
9208
|
+
const I = getSeparatorKey("data", w), A = n[I];
|
|
9203
9209
|
$.push({
|
|
9204
|
-
index:
|
|
9210
|
+
index: x,
|
|
9205
9211
|
..._,
|
|
9206
9212
|
computedType: ComputedType.loopRow,
|
|
9207
9213
|
rowSpan: 1,
|
|
9208
9214
|
colSpan: 1,
|
|
9209
|
-
rowData:
|
|
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((
|
|
9237
|
-
const
|
|
9238
|
-
let
|
|
9239
|
-
index:
|
|
9242
|
+
y.forEach((x, I) => {
|
|
9243
|
+
const A = x[C];
|
|
9244
|
+
let O = {
|
|
9245
|
+
index: I,
|
|
9240
9246
|
...$
|
|
9241
9247
|
};
|
|
9242
|
-
delete
|
|
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((
|
|
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:
|
|
9268
|
-
let [
|
|
9269
|
-
|
|
9270
|
-
const
|
|
9271
|
-
let
|
|
9272
|
-
|
|
9273
|
-
let
|
|
9274
|
-
if (S <
|
|
9275
|
-
let
|
|
9276
|
-
w.forEach((
|
|
9277
|
-
|
|
9278
|
-
|
|
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
|
|
9282
|
-
|
|
9283
|
-
} else if (
|
|
9284
|
-
let
|
|
9285
|
-
|
|
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
|
|
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
|
|
9290
|
-
$.splice(
|
|
9291
|
-
}), w = mergeSameCells(w), w.forEach((
|
|
9292
|
-
let
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
}),
|
|
9296
|
-
|
|
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:
|
|
9300
|
-
for (let
|
|
9301
|
-
|
|
9302
|
-
n.splice(
|
|
9303
|
-
for (let
|
|
9304
|
-
const L = r[
|
|
9305
|
-
for (let
|
|
9306
|
-
const
|
|
9307
|
-
|
|
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(
|
|
9315
|
+
L.splice(x, L.length - x, ...M);
|
|
9310
9316
|
}
|
|
9311
|
-
const
|
|
9312
|
-
for (let
|
|
9313
|
-
const L = r[
|
|
9314
|
-
for (let
|
|
9315
|
-
const
|
|
9316
|
-
|
|
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(
|
|
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
|
-
|
|
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,
|
|
9869
|
-
E.stretch && w > 0 && (
|
|
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),
|
|
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:
|
|
10045
|
-
twoWeek:
|
|
10046
|
-
twoMonth:
|
|
10047
|
-
threeMonth:
|
|
10048
|
-
sixMonth:
|
|
10049
|
-
oneYear:
|
|
10054
|
+
thirtyDay: x,
|
|
10055
|
+
twoWeek: I,
|
|
10056
|
+
twoMonth: A,
|
|
10057
|
+
threeMonth: O,
|
|
10058
|
+
sixMonth: N,
|
|
10059
|
+
oneYear: U,
|
|
10050
10060
|
twoYear: L,
|
|
10051
|
-
threeYear:
|
|
10052
|
-
fiveYear:
|
|
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:
|
|
10113
|
-
let
|
|
10114
|
-
return
|
|
10115
|
-
|
|
10116
|
-
}),
|
|
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
|
|
10128
|
+
let G = !1;
|
|
10119
10129
|
watch(
|
|
10120
10130
|
() => n.config,
|
|
10121
10131
|
() => {
|
|
10122
|
-
|
|
10132
|
+
W();
|
|
10123
10133
|
},
|
|
10124
10134
|
{
|
|
10125
10135
|
immediate: !0,
|
|
10126
10136
|
deep: !0
|
|
10127
10137
|
}
|
|
10128
10138
|
);
|
|
10129
|
-
function
|
|
10130
|
-
|
|
10131
|
-
let
|
|
10139
|
+
function W() {
|
|
10140
|
+
G = !1;
|
|
10141
|
+
let B = [];
|
|
10132
10142
|
S.value = [];
|
|
10133
|
-
const
|
|
10143
|
+
const V = [];
|
|
10134
10144
|
if (n.config && n.config.length)
|
|
10135
10145
|
for (let z = 0; z < n.config.length; z++) {
|
|
10136
|
-
const
|
|
10137
|
-
let { dataType:
|
|
10138
|
-
const { componentName: be, placeholerPrefix: we, type:
|
|
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
|
-
...
|
|
10141
|
-
elWidth:
|
|
10150
|
+
...Q,
|
|
10151
|
+
elWidth: Q.elWidth || 210,
|
|
10142
10152
|
formItemType: be,
|
|
10143
10153
|
placeholder: rct(we + he || pe),
|
|
10144
|
-
type:
|
|
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(
|
|
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:
|
|
10163
|
+
type: te,
|
|
10154
10164
|
isNull: Ce
|
|
10155
|
-
}),
|
|
10156
|
-
ye.optionData =
|
|
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 =
|
|
10159
|
-
le ||
|
|
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
|
|
10164
|
-
de.sort((Se, Te) =>
|
|
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(
|
|
10176
|
+
ye.optionData = de, triggerRef(R);
|
|
10167
10177
|
}
|
|
10168
10178
|
}));
|
|
10169
|
-
|
|
10179
|
+
B.push(ye), te === "LT_GT_EQ" && !ve && F(ye, B, we, te);
|
|
10170
10180
|
}
|
|
10171
|
-
|
|
10172
|
-
|
|
10181
|
+
R.value = B, ee(), nextTick(async () => {
|
|
10182
|
+
V.length > 0 && await Promise.allSettled(V), G || Z();
|
|
10173
10183
|
});
|
|
10174
10184
|
}
|
|
10175
|
-
function
|
|
10176
|
-
Object.entries(i.query).forEach(([
|
|
10177
|
-
if (!
|
|
10178
|
-
const z = Array.isArray(
|
|
10179
|
-
if (
|
|
10180
|
-
if (
|
|
10181
|
-
S.value[
|
|
10182
|
-
const
|
|
10183
|
-
|
|
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:
|
|
10197
|
+
S.value.push({ name: B, value: z, type: "EQ", isNull: !1 });
|
|
10188
10198
|
});
|
|
10189
10199
|
}
|
|
10190
|
-
function
|
|
10191
|
-
let { dataType: z, dateType:
|
|
10192
|
-
if (
|
|
10193
|
-
|
|
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
|
|
10206
|
-
let
|
|
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: [
|
|
10216
|
-
fifteenDay: [
|
|
10217
|
-
thirtyDay: [
|
|
10218
|
-
threeMonth: [
|
|
10225
|
+
sevenDay: [x, v],
|
|
10226
|
+
fifteenDay: [I, v],
|
|
10227
|
+
thirtyDay: [A, v],
|
|
10228
|
+
threeMonth: [U, v],
|
|
10219
10229
|
sixMonth: [L, v],
|
|
10220
|
-
oneYear: [
|
|
10221
|
-
twoYear: [
|
|
10222
|
-
threeYear: [
|
|
10223
|
-
fiveYear: [
|
|
10224
|
-
}[
|
|
10225
|
-
return
|
|
10226
|
-
}
|
|
10227
|
-
function
|
|
10228
|
-
let
|
|
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:
|
|
10231
|
-
threeYear:
|
|
10232
|
-
fiveYear:
|
|
10240
|
+
twoYear: T,
|
|
10241
|
+
threeYear: b,
|
|
10242
|
+
fiveYear: D,
|
|
10233
10243
|
thisMonth: u,
|
|
10234
|
-
twoMonth:
|
|
10235
|
-
threeMonth:
|
|
10244
|
+
twoMonth: N,
|
|
10245
|
+
threeMonth: U,
|
|
10236
10246
|
sixMonth: L,
|
|
10237
10247
|
thisWeek: c,
|
|
10238
|
-
twoWeek:
|
|
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:
|
|
10246
|
-
fifteenDay:
|
|
10247
|
-
thirtyDay:
|
|
10248
|
-
}[
|
|
10249
|
-
if (!
|
|
10250
|
-
let oe = dayjs().startOf(
|
|
10251
|
-
oe.isValid() ?
|
|
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 && (
|
|
10263
|
+
return z && (Y = re(Y, z, a)), Y;
|
|
10254
10264
|
}
|
|
10255
|
-
function
|
|
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:
|
|
10260
|
-
}).then((
|
|
10261
|
-
|
|
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:
|
|
10264
|
-
})), triggerRef(
|
|
10265
|
-
}).catch((
|
|
10266
|
-
console.warn(`选择器 ${
|
|
10273
|
+
value: te
|
|
10274
|
+
})), triggerRef(R));
|
|
10275
|
+
}).catch((Y) => {
|
|
10276
|
+
console.warn(`选择器 ${B} 数据加载失败:`, Y), V.optionData = [];
|
|
10267
10277
|
});
|
|
10268
10278
|
}
|
|
10269
|
-
function se(
|
|
10270
|
-
|
|
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:
|
|
10283
|
+
data: { id: V.selectorId, f_value: B, remote: !0 }
|
|
10274
10284
|
}).then((z) => {
|
|
10275
|
-
z.data && Array.isArray(z.data.data) && (
|
|
10276
|
-
label:
|
|
10277
|
-
value:
|
|
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
|
-
|
|
10290
|
+
V.selectorLoading = !1, triggerRef(R);
|
|
10281
10291
|
}));
|
|
10282
10292
|
}
|
|
10283
|
-
function
|
|
10284
|
-
const { columnName:
|
|
10285
|
-
|
|
10286
|
-
const ce = cloneDeep(
|
|
10287
|
-
ce.name = "-", ce.columnName = `end_${
|
|
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_${
|
|
10300
|
+
name: `end_${Y}`,
|
|
10291
10301
|
value: le,
|
|
10292
|
-
type:
|
|
10293
|
-
isNull:
|
|
10294
|
-
}),
|
|
10302
|
+
type: Q,
|
|
10303
|
+
isNull: te
|
|
10304
|
+
}), B.selectorId && ie(B.selectorId, ce, "", !!B.remoteSearch), V.push(ce);
|
|
10295
10305
|
}
|
|
10296
|
-
function
|
|
10306
|
+
function H(B) {
|
|
10297
10307
|
return {
|
|
10298
|
-
label: rct(
|
|
10299
|
-
required:
|
|
10300
|
-
style:
|
|
10308
|
+
label: rct(B.name),
|
|
10309
|
+
required: B.isNull,
|
|
10310
|
+
style: B.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
|
|
10301
10311
|
};
|
|
10302
10312
|
}
|
|
10303
|
-
function
|
|
10304
|
-
const
|
|
10305
|
-
modelValue:
|
|
10306
|
-
type:
|
|
10313
|
+
function j(B) {
|
|
10314
|
+
const V = {
|
|
10315
|
+
modelValue: B.value,
|
|
10316
|
+
type: B.type,
|
|
10307
10317
|
clearable: !0,
|
|
10308
|
-
placeholder:
|
|
10309
|
-
"onUpdate:modelValue": (z) =>
|
|
10318
|
+
placeholder: B.placeholder,
|
|
10319
|
+
"onUpdate:modelValue": (z) => q(z, B)
|
|
10310
10320
|
};
|
|
10311
|
-
return
|
|
10312
|
-
z.key === "Enter" &&
|
|
10313
|
-
}), ["ElSelect"].includes(
|
|
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
|
|
10316
|
-
let z = S.value.findIndex((
|
|
10317
|
-
if (
|
|
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
|
-
|
|
10330
|
+
G = !0, Z();
|
|
10321
10331
|
}
|
|
10322
10332
|
}
|
|
10323
|
-
function
|
|
10324
|
-
if (["ElInput", "ElInputNumber"].includes(
|
|
10325
|
-
if (
|
|
10333
|
+
function X(B, V) {
|
|
10334
|
+
if (["ElInput", "ElInputNumber"].includes(B.formItemType)) {
|
|
10335
|
+
if (V === "blur" && !n.data.searchOnBlur)
|
|
10326
10336
|
return !1;
|
|
10327
|
-
|
|
10337
|
+
G = !0, Z();
|
|
10328
10338
|
}
|
|
10329
10339
|
}
|
|
10330
|
-
function
|
|
10331
|
-
if (
|
|
10340
|
+
function K(B, V) {
|
|
10341
|
+
if (V.shiftValue = B || "", !n.data.searchOnBlur)
|
|
10332
10342
|
return !1;
|
|
10333
|
-
|
|
10343
|
+
G = !0, Z();
|
|
10334
10344
|
}
|
|
10335
|
-
function re(
|
|
10336
|
-
if (
|
|
10337
|
-
let
|
|
10338
|
-
let
|
|
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
|
-
}),
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
}),
|
|
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
|
|
10349
|
-
}
|
|
10350
|
-
function
|
|
10351
|
-
let
|
|
10352
|
-
|
|
10353
|
-
let
|
|
10354
|
-
if (!
|
|
10355
|
-
Array.isArray(z) && (
|
|
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(
|
|
10359
|
-
if (
|
|
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[
|
|
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
|
-
|
|
10367
|
-
let me = `end_${
|
|
10368
|
-
|
|
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:
|
|
10372
|
-
isNull:
|
|
10381
|
+
type: Q,
|
|
10382
|
+
isNull: Y
|
|
10373
10383
|
});
|
|
10374
10384
|
} else {
|
|
10375
10385
|
let fe = dayjs(z);
|
|
10376
|
-
if (fe.isValid() &&
|
|
10377
|
-
const _e =
|
|
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
|
-
|
|
10381
|
-
let he = `end_${
|
|
10382
|
-
|
|
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:
|
|
10386
|
-
isNull:
|
|
10395
|
+
type: Q,
|
|
10396
|
+
isNull: Y
|
|
10387
10397
|
});
|
|
10388
10398
|
} else {
|
|
10389
|
-
let me = fe.startOf(
|
|
10390
|
-
|
|
10391
|
-
let he = fe.endOf(
|
|
10392
|
-
|
|
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,
|
|
10395
|
-
type:
|
|
10396
|
-
isNull:
|
|
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) && (
|
|
10402
|
-
}), o("change",
|
|
10411
|
+
else Array.isArray(z) && (B[oe].value = z.join(","));
|
|
10412
|
+
}), o("change", B);
|
|
10403
10413
|
}
|
|
10404
10414
|
return e({
|
|
10405
|
-
changeValue:
|
|
10415
|
+
changeValue: Z
|
|
10406
10416
|
}), onMounted(() => {
|
|
10407
|
-
}), (
|
|
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(
|
|
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
|
|
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
|
-
},
|
|
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, (
|
|
10422
|
-
key:
|
|
10423
|
-
label:
|
|
10424
|
-
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 },
|
|
10432
|
-
z.formItemType === "ElDatePicker" && z.type === "date" && ((
|
|
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: (
|
|
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, (
|
|
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:
|
|
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(
|
|
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((
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
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
|
|
10521
|
+
const F = a.value;
|
|
10512
10522
|
return {
|
|
10513
|
-
width: `${mmToPx(
|
|
10514
|
-
padding: `${n.index === 0 ? mmToPx(
|
|
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((
|
|
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 = (
|
|
10527
|
-
let
|
|
10528
|
-
if (
|
|
10529
|
-
let
|
|
10530
|
-
|
|
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
|
|
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
|
|
10536
|
-
if (
|
|
10537
|
-
return
|
|
10538
|
-
v.value =
|
|
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
|
|
10550
|
+
let I = !1, A = !0;
|
|
10541
10551
|
watch(
|
|
10542
10552
|
() => [y.pageSize, y.pageIndex],
|
|
10543
|
-
(
|
|
10544
|
-
if (
|
|
10545
|
-
let [
|
|
10546
|
-
|
|
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
|
|
10555
|
-
var
|
|
10556
|
-
(
|
|
10564
|
+
function O() {
|
|
10565
|
+
var F;
|
|
10566
|
+
(F = s.value) == null || F.changeValue();
|
|
10557
10567
|
}
|
|
10558
|
-
const
|
|
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
|
|
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 (
|
|
10578
|
+
if (F === null) {
|
|
10569
10579
|
await ElMessageBox.alert("表格导出失败");
|
|
10570
10580
|
return;
|
|
10571
10581
|
}
|
|
10572
|
-
n.config.exportMethod === "send" && window.opener ? sendReport(
|
|
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
|
|
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((
|
|
10579
|
-
const
|
|
10580
|
-
return m.value.forEach((
|
|
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
|
|
10594
|
+
let H = [];
|
|
10585
10595
|
try {
|
|
10586
|
-
|
|
10587
|
-
} catch (
|
|
10596
|
+
H = await ie(F);
|
|
10597
|
+
} catch (K) {
|
|
10588
10598
|
return o("report-error", {
|
|
10589
10599
|
index: n.index,
|
|
10590
|
-
message: getErrorMessage(
|
|
10600
|
+
message: getErrorMessage(K)
|
|
10591
10601
|
}), null;
|
|
10592
10602
|
}
|
|
10593
|
-
let
|
|
10594
|
-
if (n.config.data.processData && (
|
|
10595
|
-
const
|
|
10596
|
-
Array.isArray(
|
|
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
|
|
10599
|
-
const
|
|
10600
|
-
for (let
|
|
10601
|
-
const
|
|
10602
|
-
let { rowConfig:
|
|
10603
|
-
|
|
10604
|
-
const
|
|
10605
|
-
computeCell(
|
|
10606
|
-
config:
|
|
10607
|
-
rowConfig:
|
|
10608
|
-
colConfig:
|
|
10609
|
-
}),
|
|
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(
|
|
10621
|
+
return await preGenerateBarcodes(X), q.length ? q : null;
|
|
10612
10622
|
}
|
|
10613
|
-
async function
|
|
10614
|
-
const
|
|
10615
|
-
if (!
|
|
10623
|
+
async function T() {
|
|
10624
|
+
const F = await M(!0);
|
|
10625
|
+
if (!F) {
|
|
10616
10626
|
ElMessage.warning("当前报表没有可导出的数据");
|
|
10617
10627
|
return;
|
|
10618
10628
|
}
|
|
10619
|
-
let
|
|
10620
|
-
if (
|
|
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(
|
|
10625
|
-
}
|
|
10626
|
-
const
|
|
10627
|
-
async function S(
|
|
10628
|
-
let
|
|
10629
|
-
re.length && (
|
|
10630
|
-
const
|
|
10631
|
-
return computeCell(
|
|
10632
|
-
reportConfig: { config:
|
|
10633
|
-
hasLoop:
|
|
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
|
|
10637
|
-
const
|
|
10638
|
-
if (!(!Array.isArray(
|
|
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
|
|
10641
|
-
const
|
|
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:
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
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
|
-
|
|
10659
|
+
B,
|
|
10650
10660
|
_.value.border
|
|
10651
10661
|
);
|
|
10652
10662
|
}
|
|
10653
|
-
m.value.push(
|
|
10663
|
+
m.value.push(K);
|
|
10654
10664
|
}
|
|
10655
10665
|
}
|
|
10656
10666
|
}
|
|
10657
|
-
async function
|
|
10667
|
+
async function k(F) {
|
|
10658
10668
|
if (n.config && c.value)
|
|
10659
|
-
if (console.time("renderReport"), p.value = [],
|
|
10669
|
+
if (console.time("renderReport"), p.value = [], D.value = !!n.config.tableConfig, D.value) {
|
|
10660
10670
|
l.value.innerHTML = "";
|
|
10661
|
-
const
|
|
10662
|
-
for (let
|
|
10663
|
-
const
|
|
10664
|
-
let
|
|
10665
|
-
|
|
10666
|
-
const z = transformArrayToObject(
|
|
10667
|
-
computeCell(
|
|
10668
|
-
config:
|
|
10669
|
-
rowConfig:
|
|
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(
|
|
10674
|
-
renderReportByDom(
|
|
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
|
|
10677
|
-
let
|
|
10678
|
-
if (
|
|
10679
|
-
const
|
|
10680
|
-
if (
|
|
10681
|
-
const re =
|
|
10682
|
-
(
|
|
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
|
-
|
|
10695
|
+
q = Math.max(q, Z);
|
|
10686
10696
|
}
|
|
10687
|
-
}),
|
|
10688
|
-
const
|
|
10689
|
-
let
|
|
10690
|
-
if (
|
|
10691
|
-
const re = getComputedStyle(
|
|
10692
|
-
|
|
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
|
-
|
|
10695
|
-
const
|
|
10696
|
-
if (
|
|
10697
|
-
const
|
|
10698
|
-
(z,
|
|
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 (
|
|
10702
|
-
const z =
|
|
10703
|
-
|
|
10704
|
-
const oe = parseInt(
|
|
10705
|
-
|
|
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
|
|
10708
|
-
(
|
|
10717
|
+
const Q = Array.from(B).map(
|
|
10718
|
+
(Y) => parseInt(Y.style.width || "80", 10)
|
|
10709
10719
|
);
|
|
10710
|
-
|
|
10711
|
-
let oe = 0,
|
|
10712
|
-
Array.from(
|
|
10713
|
-
ce.classList.contains("fixed-td") && (ce.style.left = `${oe - 1}px`),
|
|
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
|
-
|
|
10727
|
+
Z.style.width = `${q}px`, Z.style.minWidth = `${q}px`;
|
|
10718
10728
|
}
|
|
10719
10729
|
});
|
|
10720
10730
|
}
|
|
10721
10731
|
});
|
|
10722
10732
|
} else {
|
|
10723
|
-
let
|
|
10724
|
-
|
|
10725
|
-
const
|
|
10726
|
-
computeCell(
|
|
10727
|
-
config:
|
|
10728
|
-
rowConfig:
|
|
10729
|
-
colConfig:
|
|
10730
|
-
}), renderReportByDom(
|
|
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
|
|
10734
|
-
let
|
|
10735
|
-
return n.config.params.forEach((
|
|
10736
|
-
|
|
10737
|
-
}), v.value.forEach((
|
|
10738
|
-
|
|
10739
|
-
}),
|
|
10740
|
-
message: `请填写必填项:${
|
|
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
|
|
10745
|
-
var
|
|
10746
|
-
if (
|
|
10747
|
-
|
|
10754
|
+
async function W() {
|
|
10755
|
+
var H;
|
|
10756
|
+
if (A = !1, i.value || G()) {
|
|
10757
|
+
b.value = !0;
|
|
10748
10758
|
try {
|
|
10749
|
-
let
|
|
10750
|
-
n.config.data.processData && (
|
|
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
|
-
|
|
10762
|
+
q,
|
|
10753
10763
|
v.value,
|
|
10754
10764
|
y
|
|
10755
|
-
)), d =
|
|
10756
|
-
const
|
|
10757
|
-
|
|
10758
|
-
} catch (
|
|
10759
|
-
console.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(
|
|
10771
|
+
message: getErrorMessage(j)
|
|
10762
10772
|
}), clearReportByDom(l);
|
|
10763
10773
|
} finally {
|
|
10764
|
-
|
|
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
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
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
|
|
10797
|
-
(
|
|
10806
|
+
var F;
|
|
10807
|
+
(F = l.value) == null || F.addEventListener("click", J);
|
|
10798
10808
|
});
|
|
10799
|
-
function
|
|
10800
|
-
let
|
|
10801
|
-
return Array.isArray(
|
|
10802
|
-
if (
|
|
10803
|
-
let
|
|
10804
|
-
|
|
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
|
-
|
|
10816
|
+
H[j] = q;
|
|
10807
10817
|
}), o("updateData", {
|
|
10808
10818
|
key: n.config.id,
|
|
10809
|
-
data:
|
|
10810
|
-
}),
|
|
10819
|
+
data: H
|
|
10820
|
+
}), H;
|
|
10811
10821
|
}
|
|
10812
|
-
async function
|
|
10822
|
+
async function ie(F = !1) {
|
|
10813
10823
|
if (!n.config.data.source)
|
|
10814
10824
|
return [];
|
|
10815
|
-
const { resData:
|
|
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
|
-
|
|
10834
|
+
F
|
|
10825
10835
|
);
|
|
10826
|
-
return E.value && (y.total =
|
|
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
|
|
10831
|
-
y.pageSizes = Array.isArray(
|
|
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:
|
|
10849
|
+
renderHandler: W,
|
|
10840
10850
|
/** 装配导出配置(供父组件合并导出调用) */
|
|
10841
|
-
buildExportConfigs:
|
|
10842
|
-
}), (
|
|
10843
|
-
const
|
|
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:
|
|
10864
|
+
onChange: x
|
|
10855
10865
|
}, {
|
|
10856
10866
|
search: withCtx(() => [
|
|
10857
|
-
$.value ? (openBlock(), createBlock(
|
|
10867
|
+
$.value ? (openBlock(), createBlock(j, {
|
|
10858
10868
|
key: 0,
|
|
10859
10869
|
type: "primary",
|
|
10860
|
-
onClick:
|
|
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
|
-
|
|
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)(
|
|
10884
|
+
createTextVNode(toDisplayString(unref(rct)(U.value)), 1)
|
|
10875
10885
|
]),
|
|
10876
10886
|
_: 1
|
|
10877
10887
|
})) : createCommentVNode("", !0),
|
|
10878
|
-
E.value &&
|
|
10888
|
+
E.value && N.value ? (openBlock(), createBlock(j, {
|
|
10879
10889
|
key: 2,
|
|
10880
10890
|
text: "",
|
|
10881
10891
|
type: "primary",
|
|
10882
|
-
onClick:
|
|
10892
|
+
onClick: T
|
|
10883
10893
|
}, {
|
|
10884
10894
|
default: withCtx(() => [
|
|
10885
|
-
createTextVNode(toDisplayString(unref(rct)(
|
|
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
|
-
[
|
|
10914
|
+
[X, b.value]
|
|
10905
10915
|
]),
|
|
10906
|
-
E.value ? withDirectives((openBlock(), createBlock(
|
|
10916
|
+
E.value ? withDirectives((openBlock(), createBlock(q, {
|
|
10907
10917
|
key: 0,
|
|
10908
10918
|
pageSize: y.pageSize,
|
|
10909
|
-
"onUpdate:pageSize":
|
|
10919
|
+
"onUpdate:pageSize": H[0] || (H[0] = (K) => y.pageSize = K),
|
|
10910
10920
|
"current-page": y.pageIndex,
|
|
10911
|
-
"onUpdate:currentPage":
|
|
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,
|
|
11155
|
-
C[`color${
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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:
|
|
11196
|
-
notSingle:
|
|
11197
|
-
keyIds:
|
|
11198
|
-
dataIds:
|
|
11199
|
-
groupBy:
|
|
11200
|
-
orderBy:
|
|
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:
|
|
11203
|
-
singleKey:
|
|
11204
|
-
singleData:
|
|
11212
|
+
singleComputed: M,
|
|
11213
|
+
singleKey: T,
|
|
11214
|
+
singleData: b
|
|
11205
11215
|
} = C;
|
|
11206
|
-
let
|
|
11207
|
-
w && (
|
|
11216
|
+
let D = {};
|
|
11217
|
+
w && (D = {
|
|
11208
11218
|
...w
|
|
11209
11219
|
});
|
|
11210
|
-
for (let S = 0; S <
|
|
11211
|
-
const { key:
|
|
11220
|
+
for (let S = 0; S < x.length; S++) {
|
|
11221
|
+
const { key: R, url: k } = x[S];
|
|
11212
11222
|
try {
|
|
11213
|
-
const
|
|
11214
|
-
|
|
11215
|
-
} catch (
|
|
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(
|
|
11228
|
+
message: getErrorMessage(G)
|
|
11219
11229
|
}), l.value = !1, !1;
|
|
11220
11230
|
}
|
|
11221
11231
|
}
|
|
11222
|
-
if (Object.keys(
|
|
11232
|
+
if (Object.keys(D).length === 0)
|
|
11223
11233
|
return l.value = !1, !1;
|
|
11224
|
-
if (u.value = [],
|
|
11225
|
-
if (
|
|
11234
|
+
if (u.value = [], I) {
|
|
11235
|
+
if (A.length < 2 || O.length < 2)
|
|
11226
11236
|
return l.value = !1, !1;
|
|
11227
|
-
let S = "",
|
|
11228
|
-
|
|
11229
|
-
let
|
|
11230
|
-
if (!
|
|
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
|
|
11233
|
-
|
|
11234
|
-
let
|
|
11235
|
-
if (!
|
|
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
|
-
|
|
11238
|
-
let se =
|
|
11239
|
-
|
|
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:
|
|
11251
|
+
value: F
|
|
11242
11252
|
});
|
|
11243
|
-
}),
|
|
11244
|
-
let se =
|
|
11253
|
+
}), N && (J = Object.keys(ne).map((ie) => {
|
|
11254
|
+
let se = ne[ie];
|
|
11245
11255
|
return {
|
|
11246
|
-
label:
|
|
11256
|
+
label: ie,
|
|
11247
11257
|
value: E.SUM(se)
|
|
11248
11258
|
};
|
|
11249
|
-
})), !isNaN(L) && L > 0 && (
|
|
11259
|
+
})), !isNaN(L) && L > 0 && (J = J.splice(0, L)), u.value = J;
|
|
11250
11260
|
} else {
|
|
11251
|
-
if (!
|
|
11261
|
+
if (!b || b.length === 0)
|
|
11252
11262
|
return l.value = !1, !1;
|
|
11253
|
-
let S = "",
|
|
11254
|
-
|
|
11255
|
-
let
|
|
11256
|
-
if (!
|
|
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
|
|
11259
|
-
|
|
11260
|
-
label:
|
|
11261
|
-
value:
|
|
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
|
|
11287
|
+
var M;
|
|
11278
11288
|
if (!u.value.length) return null;
|
|
11279
|
-
const C = Math.max(((
|
|
11280
|
-
|
|
11281
|
-
const
|
|
11282
|
-
if (!
|
|
11283
|
-
|
|
11284
|
-
const
|
|
11285
|
-
return
|
|
11286
|
-
const
|
|
11287
|
-
|
|
11288
|
-
}), { base64:
|
|
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
|
|
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, (
|
|
11303
|
-
createElementVNode("div", _hoisted_5$2, toDisplayString(
|
|
11304
|
-
createElementVNode("div", _hoisted_6$2, toDisplayString(
|
|
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
|
-
[
|
|
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
|
|
11376
|
+
const x = C.contentWindow, I = document.title;
|
|
11367
11377
|
r.statementName && (document.title = r.statementName);
|
|
11368
|
-
const
|
|
11369
|
-
document.title =
|
|
11378
|
+
const A = () => {
|
|
11379
|
+
document.title = I;
|
|
11370
11380
|
};
|
|
11371
|
-
|
|
11372
|
-
|
|
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 && (
|
|
11397
|
+
L.length > 0 && (U.push({ items: L }), L = [], M = 0);
|
|
11388
11398
|
}, w = function() {
|
|
11389
|
-
if (
|
|
11390
|
-
for (;
|
|
11391
|
-
const
|
|
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
|
|
11398
|
-
if (!
|
|
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
|
-
|
|
11413
|
+
R = splitNextReportPage(D.state, S, O, I, !0);
|
|
11404
11414
|
}
|
|
11405
|
-
L.push({ type: "report", dom:
|
|
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
|
|
11410
|
-
for (let
|
|
11411
|
-
const S = r.configs[
|
|
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
|
|
11414
|
-
if (
|
|
11415
|
-
for (const
|
|
11416
|
-
const
|
|
11417
|
-
|
|
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:
|
|
11437
|
+
await preGenerateBarcodes([{ config: W.config }]), N.push({ kind: "report", pending: { state: W } });
|
|
11428
11438
|
}
|
|
11429
|
-
const
|
|
11430
|
-
if (
|
|
11431
|
-
for (let
|
|
11432
|
-
const
|
|
11433
|
-
|
|
11434
|
-
for (const
|
|
11435
|
-
const
|
|
11436
|
-
|
|
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:
|
|
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
|
|
11453
|
-
let L = [],
|
|
11454
|
-
const
|
|
11455
|
-
if (
|
|
11456
|
-
for (const
|
|
11457
|
-
if (
|
|
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 (
|
|
11462
|
-
const S =
|
|
11471
|
+
if (D.kind === "report") {
|
|
11472
|
+
const S = D.pending;
|
|
11463
11473
|
w();
|
|
11464
|
-
const
|
|
11465
|
-
|
|
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
|
|
11471
|
-
for (const
|
|
11472
|
-
if (
|
|
11473
|
-
const
|
|
11474
|
-
|
|
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 (
|
|
11478
|
-
const { state:
|
|
11479
|
-
|
|
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
|
-
|
|
11492
|
+
U.push({ items: R });
|
|
11483
11493
|
}
|
|
11484
|
-
a.value =
|
|
11485
|
-
const
|
|
11486
|
-
for (let
|
|
11487
|
-
const S = D
|
|
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
|
|
11490
|
-
for (const
|
|
11491
|
-
const
|
|
11492
|
-
S.appendChild(
|
|
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
|
-
|
|
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,
|
|
11510
|
-
if (!
|
|
11511
|
-
const
|
|
11512
|
-
{ id: r.reportId ?? "", data:
|
|
11513
|
-
|
|
11514
|
-
{ pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!
|
|
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
|
|
11518
|
-
|
|
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
|
|
11533
|
+
const U = x.source, L = U.find((M) => M.loopTable);
|
|
11524
11534
|
if (L && L.key) {
|
|
11525
|
-
const
|
|
11535
|
+
const M = await renderReportToConfigs(
|
|
11536
|
+
I,
|
|
11526
11537
|
N,
|
|
11527
|
-
|
|
11528
|
-
F,
|
|
11538
|
+
U,
|
|
11529
11539
|
[],
|
|
11530
11540
|
L.key
|
|
11531
11541
|
);
|
|
11532
|
-
f.value.set(v,
|
|
11542
|
+
f.value.set(v, M);
|
|
11533
11543
|
} else {
|
|
11534
|
-
const
|
|
11544
|
+
const M = await renderReportToConfigs(
|
|
11545
|
+
I,
|
|
11535
11546
|
N,
|
|
11536
|
-
|
|
11537
|
-
F,
|
|
11547
|
+
U,
|
|
11538
11548
|
[]
|
|
11539
11549
|
);
|
|
11540
|
-
u.value.set(v,
|
|
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
|
|
11617
|
-
return !!((
|
|
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",
|
|
11620
|
-
const
|
|
11621
|
-
if (!
|
|
11622
|
-
const
|
|
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(
|
|
11634
|
+
"--print-content-width": `${mmToPx(T.width - T.marginLeft - T.marginRight)}px`
|
|
11625
11635
|
};
|
|
11626
11636
|
});
|
|
11627
11637
|
watch(
|
|
11628
11638
|
() => r.id,
|
|
11629
|
-
(
|
|
11630
|
-
|
|
11639
|
+
(T) => {
|
|
11640
|
+
g(T);
|
|
11631
11641
|
}
|
|
11632
11642
|
);
|
|
11633
|
-
function
|
|
11634
|
-
|
|
11635
|
-
let { name: D, remoteOptions:
|
|
11636
|
-
o.value = D, c.value =
|
|
11637
|
-
}).catch((
|
|
11638
|
-
console.error("获取报表配置失败:",
|
|
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
|
|
11644
|
-
a.value.some((D) => D.key ===
|
|
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
|
|
11647
|
-
const
|
|
11648
|
-
|
|
11656
|
+
function E(T) {
|
|
11657
|
+
const b = a.value.indexOf(T);
|
|
11658
|
+
b > -1 && a.value.splice(b, 1);
|
|
11649
11659
|
}
|
|
11650
|
-
const
|
|
11651
|
-
function
|
|
11652
|
-
|
|
11660
|
+
const $ = ref(!1);
|
|
11661
|
+
function y(T) {
|
|
11662
|
+
d[T.key] = T.data, l.value.forEach((b) => {
|
|
11653
11663
|
var D;
|
|
11654
|
-
(D =
|
|
11664
|
+
(D = b == null ? void 0 : b.setOutData) == null || D.call(b, d);
|
|
11655
11665
|
});
|
|
11656
11666
|
}
|
|
11657
|
-
function
|
|
11658
|
-
|
|
11659
|
-
}
|
|
11660
|
-
async function
|
|
11661
|
-
var
|
|
11662
|
-
const
|
|
11663
|
-
let
|
|
11664
|
-
const
|
|
11665
|
-
for (let
|
|
11666
|
-
const
|
|
11667
|
-
if (
|
|
11668
|
-
const
|
|
11669
|
-
if (
|
|
11670
|
-
|
|
11671
|
-
const ie = await
|
|
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
|
|
11674
|
-
|
|
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
|
-
|
|
11677
|
-
const
|
|
11678
|
-
if (!
|
|
11686
|
+
R += 1, x(`正在截取图表/指标卡(${R}/${D})...`);
|
|
11687
|
+
const ae = l.value[J];
|
|
11688
|
+
if (!ae) continue;
|
|
11679
11689
|
let ie = null;
|
|
11680
|
-
|
|
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:
|
|
11695
|
+
stretch: ne.type !== "label"
|
|
11686
11696
|
}));
|
|
11687
11697
|
}
|
|
11688
11698
|
}
|
|
11689
|
-
return { mergeItems:
|
|
11699
|
+
return { mergeItems: k, printItems: G };
|
|
11690
11700
|
}
|
|
11691
|
-
let
|
|
11692
|
-
function
|
|
11693
|
-
|
|
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
|
-
})),
|
|
11706
|
+
})), w.setText(T);
|
|
11697
11707
|
}
|
|
11698
|
-
function
|
|
11699
|
-
|
|
11708
|
+
function I() {
|
|
11709
|
+
w == null || w.close(), w = null;
|
|
11700
11710
|
}
|
|
11701
|
-
async function
|
|
11702
|
-
|
|
11711
|
+
async function A(T) {
|
|
11712
|
+
x("正在准备导出...");
|
|
11703
11713
|
try {
|
|
11704
|
-
const { mergeItems:
|
|
11705
|
-
if (!
|
|
11714
|
+
const { mergeItems: b, printItems: D } = await C();
|
|
11715
|
+
if (!b.length) {
|
|
11706
11716
|
ElMessage.warning("当前报表没有可导出的内容");
|
|
11707
11717
|
return;
|
|
11708
11718
|
}
|
|
11709
|
-
if (
|
|
11710
|
-
|
|
11711
|
-
const
|
|
11712
|
-
|
|
11713
|
-
} else
|
|
11714
|
-
onProgress: (
|
|
11715
|
-
orientation:
|
|
11716
|
-
singlePage:
|
|
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
|
-
|
|
11729
|
+
I();
|
|
11720
11730
|
}
|
|
11721
11731
|
}
|
|
11722
|
-
const
|
|
11723
|
-
async function
|
|
11724
|
-
var D,
|
|
11725
|
-
if (
|
|
11726
|
-
const
|
|
11727
|
-
|
|
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
|
|
11730
|
-
if (
|
|
11731
|
-
for (let
|
|
11732
|
-
if (c.value[
|
|
11733
|
-
const
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
) :
|
|
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
|
-
|
|
11750
|
+
N.value = T, U.value = b, O.value = !0;
|
|
11741
11751
|
}
|
|
11742
11752
|
return onMounted(() => {
|
|
11743
|
-
|
|
11744
|
-
}), (
|
|
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
|
-
|
|
11759
|
+
p.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
11750
11760
|
createVNode(unref(ElDropdown), {
|
|
11751
11761
|
trigger: "click",
|
|
11752
|
-
onCommand:
|
|
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(() => [
|
|
11759
|
-
createElementVNode("i", { class: "yhreport-icon report-excel" }, null, -1),
|
|
11760
|
-
createTextVNode("导出Excel",
|
|
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
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
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(() => [...
|
|
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
|
-
|
|
11820
|
+
p.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
11809
11821
|
createVNode(unref(ElButton), {
|
|
11810
11822
|
type: "primary",
|
|
11811
11823
|
size: "small",
|
|
11812
|
-
onClick:
|
|
11824
|
+
onClick: M
|
|
11813
11825
|
}, {
|
|
11814
|
-
default: withCtx(() => [...
|
|
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":
|
|
11829
|
-
style: normalizeStyle(
|
|
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, (
|
|
11834
|
-
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:
|
|
11840
|
-
onClose: (
|
|
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, (
|
|
11843
|
-
|
|
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":
|
|
11857
|
+
"is-print-mode": p.value,
|
|
11846
11858
|
ref_for: !0,
|
|
11847
11859
|
ref_key: "reportViewItemRefs",
|
|
11848
|
-
ref:
|
|
11849
|
-
index:
|
|
11860
|
+
ref: L,
|
|
11861
|
+
index: R,
|
|
11850
11862
|
length: c.value.length,
|
|
11851
11863
|
id: t.id,
|
|
11852
11864
|
name: o.value,
|
|
11853
|
-
config:
|
|
11854
|
-
onUpdateData:
|
|
11855
|
-
onReportError:
|
|
11856
|
-
}, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) :
|
|
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: (
|
|
11860
|
-
index:
|
|
11871
|
+
ref: (k) => v(k, R),
|
|
11872
|
+
index: R,
|
|
11861
11873
|
length: c.value.length,
|
|
11862
11874
|
id: t.id,
|
|
11863
|
-
config:
|
|
11864
|
-
onReportError:
|
|
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: (
|
|
11869
|
-
config:
|
|
11880
|
+
ref: (k) => v(k, R),
|
|
11881
|
+
config: S,
|
|
11870
11882
|
id: t.id,
|
|
11871
|
-
index:
|
|
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, [...
|
|
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,
|
|
11890
|
+
[vShow, $.value]
|
|
11879
11891
|
])
|
|
11880
11892
|
], 6)), [
|
|
11881
11893
|
[D, n.value]
|
|
11882
11894
|
]),
|
|
11883
11895
|
createVNode(_sfc_main$2, {
|
|
11884
|
-
visible:
|
|
11885
|
-
"onUpdate:visible":
|
|
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":
|
|
11890
|
-
"batch-table-configs":
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
12492
|
-
|
|
12503
|
+
getLoopSourceColumns as A,
|
|
12504
|
+
applyBorderOperation as B,
|
|
12493
12505
|
CellType as C,
|
|
12494
|
-
|
|
12495
|
-
|
|
12506
|
+
DEFAULT_EXPORT_CONFIG as D,
|
|
12507
|
+
validateAndCompleteTableConfig as E,
|
|
12496
12508
|
FormatType as F,
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
_sfc_main$
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
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
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
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
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
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
|
-
|
|
12544
|
+
componentTransition as o,
|
|
12532
12545
|
parseExpression as p,
|
|
12533
|
-
|
|
12546
|
+
mmToPx as q,
|
|
12534
12547
|
rct as r,
|
|
12535
12548
|
save as s,
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
};
|
|
12544
|
-
//# sourceMappingURL=index-
|
|
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
|