yh-report 2.4.103 → 2.4.105
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-CWDZPlRW.mjs → StatementDesign-csORhOKk.mjs} +11375 -11135
- package/StatementDesign-csORhOKk.mjs.map +1 -0
- package/{StatementDetail-DqLC6v-J.mjs → StatementDetail-BNwo9DYN.mjs} +2 -2
- package/{StatementDetail-DqLC6v-J.mjs.map → StatementDetail-BNwo9DYN.mjs.map} +1 -1
- package/{StatementList-BUvwSwtN.mjs → StatementList-syYCKJkk.mjs} +2 -2
- package/{StatementList-BUvwSwtN.mjs.map → StatementList-syYCKJkk.mjs.map} +1 -1
- package/index-Civ6qylU.mjs +5 -0
- package/index-Civ6qylU.mjs.map +1 -0
- package/{index-BYb-0zSY.mjs → index-y062xBj5.mjs} +1141 -1067
- package/index-y062xBj5.mjs.map +1 -0
- package/index.es.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/StatementDesign-CWDZPlRW.mjs.map +0 -1
- package/index-BYb-0zSY.mjs.map +0 -1
- package/index-CP_WthEx.mjs +0 -5
- package/index-CP_WthEx.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var De = (t, e, r) => e in t ? xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var se = (t, e, r) => De(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import { ref, computed, defineComponent, reactive, watch, nextTick, triggerRef, onMounted, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, withDirectives, createBlock, mergeProps, resolveDynamicComponent, vShow, renderSlot, onUnmounted, useCssVars, inject, shallowRef, resolveComponent, resolveDirective, normalizeStyle, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeClass, onBeforeUnmount, provide, withKeys, markRaw, h } from "vue";
|
|
5
5
|
import { ElMessage, ElForm, ElFormItem, ElOption, ElLoading, ElMessageBox, ElDialog, ElButton, ElResult, ElAlert } from "element-plus";
|
|
6
6
|
import http from "@/libs/api.request";
|
|
@@ -951,171 +951,171 @@ function requireDayjs_min() {
|
|
|
951
951
|
(function(r, n) {
|
|
952
952
|
t.exports = n();
|
|
953
953
|
})(commonjsGlobal, function() {
|
|
954
|
-
var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", d = "month", f = "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+)?$/, v = /\[([^\]]+)]|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,
|
|
955
|
-
var
|
|
956
|
-
return "[" +
|
|
957
|
-
} }, y = function(
|
|
958
|
-
var A = String(
|
|
959
|
-
return !A || A.length >=
|
|
960
|
-
}, E = { s: y, z: function(
|
|
961
|
-
var
|
|
962
|
-
return (
|
|
963
|
-
}, m: function
|
|
964
|
-
if (
|
|
965
|
-
var A = 12 * (x.year() -
|
|
966
|
-
return +(-(A + (x - R) / (
|
|
967
|
-
}, a: function(
|
|
968
|
-
return
|
|
969
|
-
}, p: function(
|
|
970
|
-
return { M: d, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: f }[
|
|
971
|
-
}, u: function(
|
|
972
|
-
return
|
|
973
|
-
} }, w = "en",
|
|
974
|
-
|
|
975
|
-
var $ = "$isDayjsObject", D = function(
|
|
976
|
-
return
|
|
977
|
-
},
|
|
954
|
+
var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", d = "month", f = "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+)?$/, v = /\[([^\]]+)]|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, b = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
|
|
955
|
+
var O = ["th", "st", "nd", "rd"], x = k % 100;
|
|
956
|
+
return "[" + k + (O[(x - 20) % 10] || O[x] || O[0]) + "]";
|
|
957
|
+
} }, y = function(k, O, x) {
|
|
958
|
+
var A = String(k);
|
|
959
|
+
return !A || A.length >= O ? k : "" + Array(O + 1 - A.length).join(x) + k;
|
|
960
|
+
}, E = { s: y, z: function(k) {
|
|
961
|
+
var O = -k.utcOffset(), x = Math.abs(O), A = Math.floor(x / 60), R = x % 60;
|
|
962
|
+
return (O <= 0 ? "+" : "-") + y(A, 2, "0") + ":" + y(R, 2, "0");
|
|
963
|
+
}, m: function k(O, x) {
|
|
964
|
+
if (O.date() < x.date()) return -k(x, O);
|
|
965
|
+
var A = 12 * (x.year() - O.year()) + (x.month() - O.month()), R = O.clone().add(A, d), L = x - R < 0, j = O.clone().add(A + (L ? -1 : 1), d);
|
|
966
|
+
return +(-(A + (x - R) / (L ? R - j : j - R)) || 0);
|
|
967
|
+
}, a: function(k) {
|
|
968
|
+
return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
|
|
969
|
+
}, p: function(k) {
|
|
970
|
+
return { M: d, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: f }[k] || String(k || "").toLowerCase().replace(/s$/, "");
|
|
971
|
+
}, u: function(k) {
|
|
972
|
+
return k === void 0;
|
|
973
|
+
} }, w = "en", C = {};
|
|
974
|
+
C[w] = b;
|
|
975
|
+
var $ = "$isDayjsObject", D = function(k) {
|
|
976
|
+
return k instanceof B || !(!k || !k[$]);
|
|
977
|
+
}, T = function k(O, x, A) {
|
|
978
978
|
var R;
|
|
979
|
-
if (!
|
|
980
|
-
if (typeof
|
|
981
|
-
var
|
|
982
|
-
|
|
983
|
-
var
|
|
984
|
-
if (!R &&
|
|
979
|
+
if (!O) return w;
|
|
980
|
+
if (typeof O == "string") {
|
|
981
|
+
var L = O.toLowerCase();
|
|
982
|
+
C[L] && (R = L), x && (C[L] = x, R = L);
|
|
983
|
+
var j = O.split("-");
|
|
984
|
+
if (!R && j.length > 1) return k(j[0]);
|
|
985
985
|
} else {
|
|
986
|
-
var
|
|
987
|
-
|
|
986
|
+
var V = O.name;
|
|
987
|
+
C[V] = O, R = V;
|
|
988
988
|
}
|
|
989
989
|
return !A && R && (w = R), R || !A && w;
|
|
990
|
-
}, S = function(
|
|
991
|
-
if (D(
|
|
992
|
-
var x = typeof
|
|
993
|
-
return x.date =
|
|
990
|
+
}, S = function(k, O) {
|
|
991
|
+
if (D(k)) return k.clone();
|
|
992
|
+
var x = typeof O == "object" ? O : {};
|
|
993
|
+
return x.date = k, x.args = arguments, new B(x);
|
|
994
994
|
}, I = E;
|
|
995
|
-
I.l =
|
|
996
|
-
return S(
|
|
995
|
+
I.l = T, I.i = D, I.w = function(k, O) {
|
|
996
|
+
return S(k, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
|
|
997
997
|
};
|
|
998
|
-
var
|
|
999
|
-
function
|
|
1000
|
-
this.$L =
|
|
998
|
+
var B = function() {
|
|
999
|
+
function k(x) {
|
|
1000
|
+
this.$L = T(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[$] = !0;
|
|
1001
1001
|
}
|
|
1002
|
-
var
|
|
1003
|
-
return
|
|
1002
|
+
var O = k.prototype;
|
|
1003
|
+
return O.parse = function(x) {
|
|
1004
1004
|
this.$d = function(A) {
|
|
1005
|
-
var R = A.date,
|
|
1005
|
+
var R = A.date, L = A.utc;
|
|
1006
1006
|
if (R === null) return /* @__PURE__ */ new Date(NaN);
|
|
1007
1007
|
if (I.u(R)) return /* @__PURE__ */ new Date();
|
|
1008
1008
|
if (R instanceof Date) return new Date(R);
|
|
1009
1009
|
if (typeof R == "string" && !/Z$/i.test(R)) {
|
|
1010
|
-
var
|
|
1011
|
-
if (
|
|
1012
|
-
var
|
|
1013
|
-
return
|
|
1010
|
+
var j = R.match(_);
|
|
1011
|
+
if (j) {
|
|
1012
|
+
var V = j[2] - 1 || 0, X = (j[7] || "0").substring(0, 3);
|
|
1013
|
+
return L ? new Date(Date.UTC(j[1], V, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, X)) : new Date(j[1], V, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, X);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
return new Date(R);
|
|
1017
1017
|
}(x), this.init();
|
|
1018
|
-
},
|
|
1018
|
+
}, O.init = function() {
|
|
1019
1019
|
var x = this.$d;
|
|
1020
1020
|
this.$y = x.getFullYear(), this.$M = x.getMonth(), this.$D = x.getDate(), this.$W = x.getDay(), this.$H = x.getHours(), this.$m = x.getMinutes(), this.$s = x.getSeconds(), this.$ms = x.getMilliseconds();
|
|
1021
|
-
},
|
|
1021
|
+
}, O.$utils = function() {
|
|
1022
1022
|
return I;
|
|
1023
|
-
},
|
|
1023
|
+
}, O.isValid = function() {
|
|
1024
1024
|
return this.$d.toString() !== g;
|
|
1025
|
-
},
|
|
1025
|
+
}, O.isSame = function(x, A) {
|
|
1026
1026
|
var R = S(x);
|
|
1027
1027
|
return this.startOf(A) <= R && R <= this.endOf(A);
|
|
1028
|
-
},
|
|
1028
|
+
}, O.isAfter = function(x, A) {
|
|
1029
1029
|
return S(x) < this.startOf(A);
|
|
1030
|
-
},
|
|
1030
|
+
}, O.isBefore = function(x, A) {
|
|
1031
1031
|
return this.endOf(A) < S(x);
|
|
1032
|
-
},
|
|
1032
|
+
}, O.$g = function(x, A, R) {
|
|
1033
1033
|
return I.u(x) ? this[A] : this.set(R, x);
|
|
1034
|
-
},
|
|
1034
|
+
}, O.unix = function() {
|
|
1035
1035
|
return Math.floor(this.valueOf() / 1e3);
|
|
1036
|
-
},
|
|
1036
|
+
}, O.valueOf = function() {
|
|
1037
1037
|
return this.$d.getTime();
|
|
1038
|
-
},
|
|
1039
|
-
var R = this,
|
|
1040
|
-
var
|
|
1041
|
-
return
|
|
1042
|
-
},
|
|
1043
|
-
return I.w(R.toDate()[
|
|
1044
|
-
},
|
|
1045
|
-
switch (
|
|
1038
|
+
}, O.startOf = function(x, A) {
|
|
1039
|
+
var R = this, L = !!I.u(A) || A, j = I.p(x), V = function(G, U) {
|
|
1040
|
+
var H = I.w(R.$u ? Date.UTC(R.$y, U, G) : new Date(R.$y, U, G), R);
|
|
1041
|
+
return L ? H : H.endOf(c);
|
|
1042
|
+
}, X = function(G, U) {
|
|
1043
|
+
return I.w(R.toDate()[G].apply(R.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), R);
|
|
1044
|
+
}, Z = this.$W, Q = this.$M, re = this.$D, oe = "set" + (this.$u ? "UTC" : "");
|
|
1045
|
+
switch (j) {
|
|
1046
1046
|
case p:
|
|
1047
|
-
return
|
|
1047
|
+
return L ? V(1, 0) : V(31, 11);
|
|
1048
1048
|
case d:
|
|
1049
|
-
return
|
|
1049
|
+
return L ? V(1, Q) : V(0, Q + 1);
|
|
1050
1050
|
case u:
|
|
1051
|
-
var
|
|
1052
|
-
return
|
|
1051
|
+
var le = this.$locale().weekStart || 0, fe = (Z < le ? Z + 7 : Z) - le;
|
|
1052
|
+
return V(L ? re - fe : re + (6 - fe), Q);
|
|
1053
1053
|
case c:
|
|
1054
1054
|
case m:
|
|
1055
|
-
return
|
|
1055
|
+
return X(oe + "Hours", 0);
|
|
1056
1056
|
case l:
|
|
1057
|
-
return
|
|
1057
|
+
return X(oe + "Minutes", 1);
|
|
1058
1058
|
case s:
|
|
1059
|
-
return
|
|
1059
|
+
return X(oe + "Seconds", 2);
|
|
1060
1060
|
case a:
|
|
1061
|
-
return
|
|
1061
|
+
return X(oe + "Milliseconds", 3);
|
|
1062
1062
|
default:
|
|
1063
1063
|
return this.clone();
|
|
1064
1064
|
}
|
|
1065
|
-
},
|
|
1065
|
+
}, O.endOf = function(x) {
|
|
1066
1066
|
return this.startOf(x, !1);
|
|
1067
|
-
},
|
|
1068
|
-
var R,
|
|
1069
|
-
if (
|
|
1070
|
-
var
|
|
1071
|
-
|
|
1072
|
-
} else
|
|
1067
|
+
}, O.$set = function(x, A) {
|
|
1068
|
+
var R, L = I.p(x), j = "set" + (this.$u ? "UTC" : ""), V = (R = {}, R[c] = j + "Date", R[m] = j + "Date", R[d] = j + "Month", R[p] = j + "FullYear", R[l] = j + "Hours", R[s] = j + "Minutes", R[a] = j + "Seconds", R[i] = j + "Milliseconds", R)[L], X = L === c ? this.$D + (A - this.$W) : A;
|
|
1069
|
+
if (L === d || L === p) {
|
|
1070
|
+
var Z = this.clone().set(m, 1);
|
|
1071
|
+
Z.$d[V](X), Z.init(), this.$d = Z.set(m, Math.min(this.$D, Z.daysInMonth())).$d;
|
|
1072
|
+
} else V && this.$d[V](X);
|
|
1073
1073
|
return this.init(), this;
|
|
1074
|
-
},
|
|
1074
|
+
}, O.set = function(x, A) {
|
|
1075
1075
|
return this.clone().$set(x, A);
|
|
1076
|
-
},
|
|
1076
|
+
}, O.get = function(x) {
|
|
1077
1077
|
return this[I.p(x)]();
|
|
1078
|
-
},
|
|
1079
|
-
var R,
|
|
1078
|
+
}, O.add = function(x, A) {
|
|
1079
|
+
var R, L = this;
|
|
1080
1080
|
x = Number(x);
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1083
|
-
return I.w(
|
|
1081
|
+
var j = I.p(A), V = function(Q) {
|
|
1082
|
+
var re = S(L);
|
|
1083
|
+
return I.w(re.date(re.date() + Math.round(Q * x)), L);
|
|
1084
1084
|
};
|
|
1085
|
-
if (
|
|
1086
|
-
if (
|
|
1087
|
-
if (
|
|
1088
|
-
if (
|
|
1089
|
-
var
|
|
1090
|
-
return I.w(
|
|
1091
|
-
},
|
|
1085
|
+
if (j === d) return this.set(d, this.$M + x);
|
|
1086
|
+
if (j === p) return this.set(p, this.$y + x);
|
|
1087
|
+
if (j === c) return V(1);
|
|
1088
|
+
if (j === u) return V(7);
|
|
1089
|
+
var X = (R = {}, R[s] = n, R[l] = o, R[a] = r, R)[j] || 1, Z = this.$d.getTime() + x * X;
|
|
1090
|
+
return I.w(Z, this);
|
|
1091
|
+
}, O.subtract = function(x, A) {
|
|
1092
1092
|
return this.add(-1 * x, A);
|
|
1093
|
-
},
|
|
1093
|
+
}, O.format = function(x) {
|
|
1094
1094
|
var A = this, R = this.$locale();
|
|
1095
1095
|
if (!this.isValid()) return R.invalidDate || g;
|
|
1096
|
-
var
|
|
1097
|
-
return
|
|
1098
|
-
},
|
|
1099
|
-
return I.s(
|
|
1100
|
-
},
|
|
1101
|
-
var
|
|
1102
|
-
return
|
|
1096
|
+
var L = x || "YYYY-MM-DDTHH:mm:ssZ", j = I.z(this), V = this.$H, X = this.$m, Z = this.$M, Q = R.weekdays, re = R.months, oe = R.meridiem, le = function(U, H, q, Y) {
|
|
1097
|
+
return U && (U[H] || U(A, L)) || q[H].slice(0, Y);
|
|
1098
|
+
}, fe = function(U) {
|
|
1099
|
+
return I.s(V % 12 || 12, U, "0");
|
|
1100
|
+
}, G = oe || function(U, H, q) {
|
|
1101
|
+
var Y = U < 12 ? "AM" : "PM";
|
|
1102
|
+
return q ? Y.toLowerCase() : Y;
|
|
1103
1103
|
};
|
|
1104
|
-
return
|
|
1105
|
-
return
|
|
1106
|
-
switch (
|
|
1104
|
+
return L.replace(v, function(U, H) {
|
|
1105
|
+
return H || function(q) {
|
|
1106
|
+
switch (q) {
|
|
1107
1107
|
case "YY":
|
|
1108
1108
|
return String(A.$y).slice(-2);
|
|
1109
1109
|
case "YYYY":
|
|
1110
1110
|
return I.s(A.$y, 4, "0");
|
|
1111
1111
|
case "M":
|
|
1112
|
-
return
|
|
1112
|
+
return Z + 1;
|
|
1113
1113
|
case "MM":
|
|
1114
|
-
return I.s(
|
|
1114
|
+
return I.s(Z + 1, 2, "0");
|
|
1115
1115
|
case "MMM":
|
|
1116
|
-
return
|
|
1116
|
+
return le(R.monthsShort, Z, re, 3);
|
|
1117
1117
|
case "MMMM":
|
|
1118
|
-
return
|
|
1118
|
+
return le(re, Z);
|
|
1119
1119
|
case "D":
|
|
1120
1120
|
return A.$D;
|
|
1121
1121
|
case "DD":
|
|
@@ -1123,27 +1123,27 @@ function requireDayjs_min() {
|
|
|
1123
1123
|
case "d":
|
|
1124
1124
|
return String(A.$W);
|
|
1125
1125
|
case "dd":
|
|
1126
|
-
return
|
|
1126
|
+
return le(R.weekdaysMin, A.$W, Q, 2);
|
|
1127
1127
|
case "ddd":
|
|
1128
|
-
return
|
|
1128
|
+
return le(R.weekdaysShort, A.$W, Q, 3);
|
|
1129
1129
|
case "dddd":
|
|
1130
|
-
return
|
|
1130
|
+
return Q[A.$W];
|
|
1131
1131
|
case "H":
|
|
1132
|
-
return String(
|
|
1132
|
+
return String(V);
|
|
1133
1133
|
case "HH":
|
|
1134
|
-
return I.s(
|
|
1134
|
+
return I.s(V, 2, "0");
|
|
1135
1135
|
case "h":
|
|
1136
|
-
return
|
|
1136
|
+
return fe(1);
|
|
1137
1137
|
case "hh":
|
|
1138
|
-
return
|
|
1138
|
+
return fe(2);
|
|
1139
1139
|
case "a":
|
|
1140
|
-
return
|
|
1140
|
+
return G(V, X, !0);
|
|
1141
1141
|
case "A":
|
|
1142
|
-
return
|
|
1142
|
+
return G(V, X, !1);
|
|
1143
1143
|
case "m":
|
|
1144
|
-
return String(
|
|
1144
|
+
return String(X);
|
|
1145
1145
|
case "mm":
|
|
1146
|
-
return I.s(
|
|
1146
|
+
return I.s(X, 2, "0");
|
|
1147
1147
|
case "s":
|
|
1148
1148
|
return String(A.$s);
|
|
1149
1149
|
case "ss":
|
|
@@ -1151,75 +1151,75 @@ function requireDayjs_min() {
|
|
|
1151
1151
|
case "SSS":
|
|
1152
1152
|
return I.s(A.$ms, 3, "0");
|
|
1153
1153
|
case "Z":
|
|
1154
|
-
return
|
|
1154
|
+
return j;
|
|
1155
1155
|
}
|
|
1156
1156
|
return null;
|
|
1157
|
-
}(
|
|
1157
|
+
}(U) || j.replace(":", "");
|
|
1158
1158
|
});
|
|
1159
|
-
},
|
|
1159
|
+
}, O.utcOffset = function() {
|
|
1160
1160
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1161
|
-
},
|
|
1162
|
-
var
|
|
1163
|
-
return I.m(
|
|
1161
|
+
}, O.diff = function(x, A, R) {
|
|
1162
|
+
var L, j = this, V = I.p(A), X = S(x), Z = (X.utcOffset() - this.utcOffset()) * n, Q = this - X, re = function() {
|
|
1163
|
+
return I.m(j, X);
|
|
1164
1164
|
};
|
|
1165
|
-
switch (
|
|
1165
|
+
switch (V) {
|
|
1166
1166
|
case p:
|
|
1167
|
-
|
|
1167
|
+
L = re() / 12;
|
|
1168
1168
|
break;
|
|
1169
1169
|
case d:
|
|
1170
|
-
|
|
1170
|
+
L = re();
|
|
1171
1171
|
break;
|
|
1172
1172
|
case f:
|
|
1173
|
-
|
|
1173
|
+
L = re() / 3;
|
|
1174
1174
|
break;
|
|
1175
1175
|
case u:
|
|
1176
|
-
|
|
1176
|
+
L = (Q - Z) / 6048e5;
|
|
1177
1177
|
break;
|
|
1178
1178
|
case c:
|
|
1179
|
-
|
|
1179
|
+
L = (Q - Z) / 864e5;
|
|
1180
1180
|
break;
|
|
1181
1181
|
case l:
|
|
1182
|
-
|
|
1182
|
+
L = Q / o;
|
|
1183
1183
|
break;
|
|
1184
1184
|
case s:
|
|
1185
|
-
|
|
1185
|
+
L = Q / n;
|
|
1186
1186
|
break;
|
|
1187
1187
|
case a:
|
|
1188
|
-
|
|
1188
|
+
L = Q / r;
|
|
1189
1189
|
break;
|
|
1190
1190
|
default:
|
|
1191
|
-
|
|
1191
|
+
L = Q;
|
|
1192
1192
|
}
|
|
1193
|
-
return R ?
|
|
1194
|
-
},
|
|
1193
|
+
return R ? L : I.a(L);
|
|
1194
|
+
}, O.daysInMonth = function() {
|
|
1195
1195
|
return this.endOf(d).$D;
|
|
1196
|
-
},
|
|
1197
|
-
return
|
|
1198
|
-
},
|
|
1196
|
+
}, O.$locale = function() {
|
|
1197
|
+
return C[this.$L];
|
|
1198
|
+
}, O.locale = function(x, A) {
|
|
1199
1199
|
if (!x) return this.$L;
|
|
1200
|
-
var R = this.clone(),
|
|
1201
|
-
return
|
|
1202
|
-
},
|
|
1200
|
+
var R = this.clone(), L = T(x, A, !0);
|
|
1201
|
+
return L && (R.$L = L), R;
|
|
1202
|
+
}, O.clone = function() {
|
|
1203
1203
|
return I.w(this.$d, this);
|
|
1204
|
-
},
|
|
1204
|
+
}, O.toDate = function() {
|
|
1205
1205
|
return new Date(this.valueOf());
|
|
1206
|
-
},
|
|
1206
|
+
}, O.toJSON = function() {
|
|
1207
1207
|
return this.isValid() ? this.toISOString() : null;
|
|
1208
|
-
},
|
|
1208
|
+
}, O.toISOString = function() {
|
|
1209
1209
|
return this.$d.toISOString();
|
|
1210
|
-
},
|
|
1210
|
+
}, O.toString = function() {
|
|
1211
1211
|
return this.$d.toUTCString();
|
|
1212
|
-
},
|
|
1213
|
-
}(),
|
|
1214
|
-
return S.prototype =
|
|
1215
|
-
k[
|
|
1216
|
-
return this.$g(
|
|
1212
|
+
}, k;
|
|
1213
|
+
}(), M = B.prototype;
|
|
1214
|
+
return S.prototype = M, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", d], ["$y", p], ["$D", m]].forEach(function(k) {
|
|
1215
|
+
M[k[1]] = function(O) {
|
|
1216
|
+
return this.$g(O, k[0], k[1]);
|
|
1217
1217
|
};
|
|
1218
|
-
}), S.extend = function(
|
|
1219
|
-
return
|
|
1220
|
-
}, S.locale =
|
|
1221
|
-
return S(1e3 *
|
|
1222
|
-
}, S.en =
|
|
1218
|
+
}), S.extend = function(k, O) {
|
|
1219
|
+
return k.$i || (k(O, B, S), k.$i = !0), S;
|
|
1220
|
+
}, S.locale = T, S.isDayjs = D, S.unix = function(k) {
|
|
1221
|
+
return S(1e3 * k);
|
|
1222
|
+
}, S.en = C[w], S.Ls = C, S.p = {}, S;
|
|
1223
1223
|
});
|
|
1224
1224
|
}(dayjs_min)), dayjs_min.exports;
|
|
1225
1225
|
}
|
|
@@ -1269,7 +1269,7 @@ const DATE_RANGE_TYPES = [
|
|
|
1269
1269
|
[DataParamDateTypes.YEARRANGE]: "YYYY"
|
|
1270
1270
|
};
|
|
1271
1271
|
function getDateRanges() {
|
|
1272
|
-
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), d = e.endOf("quarter").format(t), f = 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), v = e.subtract(1, "year").endOf("year").format(t),
|
|
1272
|
+
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), d = e.endOf("quarter").format(t), f = 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), v = e.subtract(1, "year").endOf("year").format(t), b = e.format(t), y = e.subtract(2, "day").format(t), E = e.subtract(3, "day").format(t), w = e.subtract(7, "day").format(t), C = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), D = e.subtract(2, "week").startOf("week").format(t), T = e.subtract(2, "month").format(t), S = e.subtract(3, "month").format(t), I = e.subtract(6, "month").format(t), B = e.subtract(1, "year").startOf("year").format(t), M = e.subtract(2, "year").startOf("year").format(t), k = e.subtract(3, "year").format(t), O = e.subtract(5, "year").format(t);
|
|
1273
1273
|
return {
|
|
1274
1274
|
dateFormat: t,
|
|
1275
1275
|
thisDayStart: r,
|
|
@@ -1288,20 +1288,20 @@ function getDateRanges() {
|
|
|
1288
1288
|
thisYearEnd: g,
|
|
1289
1289
|
lastYearStart: _,
|
|
1290
1290
|
lastYearEnd: v,
|
|
1291
|
-
now:
|
|
1291
|
+
now: b,
|
|
1292
1292
|
twoDay: y,
|
|
1293
1293
|
threeDay: E,
|
|
1294
1294
|
sevenDay: w,
|
|
1295
|
-
fifteenDay:
|
|
1295
|
+
fifteenDay: C,
|
|
1296
1296
|
thirtyDay: $,
|
|
1297
1297
|
twoWeek: D,
|
|
1298
|
-
twoMonth:
|
|
1298
|
+
twoMonth: T,
|
|
1299
1299
|
threeMonth: S,
|
|
1300
1300
|
sixMonth: I,
|
|
1301
|
-
oneYear:
|
|
1302
|
-
twoYear:
|
|
1303
|
-
threeYear:
|
|
1304
|
-
fiveYear:
|
|
1301
|
+
oneYear: B,
|
|
1302
|
+
twoYear: M,
|
|
1303
|
+
threeYear: k,
|
|
1304
|
+
fiveYear: O
|
|
1305
1305
|
};
|
|
1306
1306
|
}
|
|
1307
1307
|
function componentTransition(t, e = "date") {
|
|
@@ -1375,129 +1375,129 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1375
1375
|
},
|
|
1376
1376
|
emits: ["change", "addCell"],
|
|
1377
1377
|
setup(t, { expose: e, emit: r }) {
|
|
1378
|
-
const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: d, lastMonthStart: f, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: v, lastYearStart:
|
|
1379
|
-
let
|
|
1380
|
-
return
|
|
1381
|
-
|
|
1382
|
-
}),
|
|
1378
|
+
const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: d, lastMonthStart: f, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: v, lastYearStart: b, lastYearEnd: y, now: E, twoDay: w, threeDay: C, sevenDay: $, fifteenDay: D, thirtyDay: T, twoWeek: S, twoMonth: I, threeMonth: B, sixMonth: M, oneYear: k, twoYear: O, threeYear: x, fiveYear: A } = getDateRanges(), R = ref([]), L = ref([]), j = computed(() => {
|
|
1379
|
+
let N = reactive({});
|
|
1380
|
+
return L.value.forEach((F) => {
|
|
1381
|
+
N[F.columnName] = F;
|
|
1382
|
+
}), N;
|
|
1383
1383
|
});
|
|
1384
|
-
let
|
|
1384
|
+
let V = !1;
|
|
1385
1385
|
watch(
|
|
1386
1386
|
() => n.config,
|
|
1387
1387
|
() => {
|
|
1388
|
-
|
|
1388
|
+
X();
|
|
1389
1389
|
},
|
|
1390
1390
|
{
|
|
1391
1391
|
immediate: !0,
|
|
1392
1392
|
deep: !0
|
|
1393
1393
|
}
|
|
1394
1394
|
);
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1397
|
-
let
|
|
1395
|
+
function X() {
|
|
1396
|
+
V = !1;
|
|
1397
|
+
let N = [];
|
|
1398
1398
|
R.value = [];
|
|
1399
|
-
const
|
|
1399
|
+
const F = [];
|
|
1400
1400
|
if (n.config && n.config.length)
|
|
1401
|
-
for (let
|
|
1402
|
-
const
|
|
1403
|
-
let { dataType:
|
|
1404
|
-
const { componentName:
|
|
1405
|
-
let
|
|
1406
|
-
...
|
|
1407
|
-
elWidth:
|
|
1408
|
-
formItemType:
|
|
1409
|
-
placeholder: rct(
|
|
1410
|
-
type:
|
|
1401
|
+
for (let z = 0; z < n.config.length; z++) {
|
|
1402
|
+
const J = cloneDeep(n.config[z]);
|
|
1403
|
+
let { dataType: W, dateType: ne, type: te, selectorId: ae, remoteSearch: ie, cellIndex: ce, cellIndexSort: pe, cellIndexSortOrder: ge, cellIndexSortNumeric: me, name: de, columnName: ye, defaultValue: Te, isNull: ve } = J, _e = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(W);
|
|
1404
|
+
const { componentName: we, placeholerPrefix: Ee, type: Ce } = componentTransition(W, ne);
|
|
1405
|
+
let he = {
|
|
1406
|
+
...J,
|
|
1407
|
+
elWidth: J.elWidth || 210,
|
|
1408
|
+
formItemType: we,
|
|
1409
|
+
placeholder: rct(Ee + de || ye),
|
|
1410
|
+
type: Ce || "",
|
|
1411
1411
|
optionData: [],
|
|
1412
1412
|
value: ""
|
|
1413
1413
|
};
|
|
1414
|
-
if (
|
|
1415
|
-
name:
|
|
1416
|
-
value:
|
|
1414
|
+
if (he.value = Q(he, _e), R.value.push({
|
|
1415
|
+
name: ye,
|
|
1416
|
+
value: he.value,
|
|
1417
1417
|
type: te,
|
|
1418
|
-
isNull:
|
|
1419
|
-
}),
|
|
1420
|
-
|
|
1421
|
-
else if (
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1424
|
-
} else
|
|
1425
|
-
if (
|
|
1426
|
-
if (
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1418
|
+
isNull: ve
|
|
1419
|
+
}), J.customOptions)
|
|
1420
|
+
he.optionData = J.customOptions.split(",").map((ue) => ue.trim()).filter(Boolean).map((ue) => ({ label: ue, value: ue }));
|
|
1421
|
+
else if (ae) {
|
|
1422
|
+
const ue = le(ae, he, "", ie);
|
|
1423
|
+
ie || F.push(ue);
|
|
1424
|
+
} else ce && (o("addCell", ce), on(`cell-change:${ce}`, (ue) => {
|
|
1425
|
+
if (ue = Object.values(ue), ue && Array.isArray(ue) && ue.length) {
|
|
1426
|
+
if (pe) {
|
|
1427
|
+
const be = createGroupSortComparator({ order: ge, numeric: me });
|
|
1428
|
+
ue.sort(($e, Se) => be($e.label, Se.label));
|
|
1429
1429
|
}
|
|
1430
|
-
|
|
1430
|
+
he.optionData = ue, triggerRef(L);
|
|
1431
1431
|
}
|
|
1432
1432
|
}));
|
|
1433
|
-
|
|
1433
|
+
N.push(he), te === "LT_GT_EQ" && !_e && G(he, N, Ee, te);
|
|
1434
1434
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1435
|
+
L.value = N, Z(), nextTick(async () => {
|
|
1436
|
+
F.length > 0 && await Promise.allSettled(F), V || ee();
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
Object.entries(i.query).forEach(([
|
|
1441
|
-
if (!
|
|
1442
|
-
const
|
|
1443
|
-
if (
|
|
1444
|
-
if (
|
|
1445
|
-
R.value[
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1439
|
+
function Z() {
|
|
1440
|
+
Object.entries(i.query).forEach(([N, F]) => {
|
|
1441
|
+
if (!N || F === null || F === void 0 || F === "") return;
|
|
1442
|
+
const z = Array.isArray(F) ? F.join(",") : F, J = R.value.findIndex((W) => W.name === N);
|
|
1443
|
+
if (J > -1) {
|
|
1444
|
+
if (N.indexOf("end_") === 0) {
|
|
1445
|
+
R.value[J].value = z;
|
|
1446
|
+
const W = L.value.find((ne) => ne.columnName === N);
|
|
1447
|
+
W && (W.value = z);
|
|
1448
1448
|
}
|
|
1449
1449
|
return;
|
|
1450
1450
|
}
|
|
1451
|
-
R.value.push({ name:
|
|
1451
|
+
R.value.push({ name: N, value: z, type: "EQ", isNull: !1 });
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
let { dataType:
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1458
|
-
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(
|
|
1454
|
+
function Q(N, F) {
|
|
1455
|
+
let { dataType: z, dateType: J, defaultValue: W, startTime: ne, endTime: te, columnName: ae } = N, ie = W || "";
|
|
1456
|
+
if (F && W)
|
|
1457
|
+
J && (N.type = J), J && DATE_RANGE_TYPES.includes(J) ? ie = re(W, ne, te) : ie = oe(J, W, ne);
|
|
1458
|
+
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(z)) {
|
|
1459
1459
|
if (Array.isArray(ie))
|
|
1460
1460
|
return ie;
|
|
1461
|
-
if (i.query[
|
|
1462
|
-
let
|
|
1463
|
-
ie = Array.isArray(
|
|
1461
|
+
if (i.query[ae]) {
|
|
1462
|
+
let ce = i.query[ae];
|
|
1463
|
+
ie = Array.isArray(ce) ? ce : String(ce).split(",");
|
|
1464
1464
|
} else typeof ie == "string" && ie ? ie = ie.split(",") : ie = [];
|
|
1465
1465
|
} else
|
|
1466
|
-
i.query[
|
|
1466
|
+
i.query[ae] && (ie = i.query[ae]);
|
|
1467
1467
|
return ie;
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1470
|
-
let
|
|
1469
|
+
function re(N, F, z) {
|
|
1470
|
+
let W = {
|
|
1471
1471
|
thisDay: [s, l],
|
|
1472
1472
|
thisMonth: [u, d],
|
|
1473
1473
|
lastMonth: [f, p],
|
|
1474
1474
|
thisYear: [_, v],
|
|
1475
|
-
lastYear: [
|
|
1475
|
+
lastYear: [b, y],
|
|
1476
1476
|
now: [s, E],
|
|
1477
1477
|
twoDay: [w, E],
|
|
1478
|
-
threeDay: [
|
|
1478
|
+
threeDay: [C, E],
|
|
1479
1479
|
sevenDay: [$, E],
|
|
1480
1480
|
fifteenDay: [D, E],
|
|
1481
|
-
thirtyDay: [
|
|
1482
|
-
threeMonth: [
|
|
1483
|
-
sixMonth: [
|
|
1484
|
-
oneYear: [
|
|
1485
|
-
twoYear: [
|
|
1481
|
+
thirtyDay: [T, E],
|
|
1482
|
+
threeMonth: [B, E],
|
|
1483
|
+
sixMonth: [M, E],
|
|
1484
|
+
oneYear: [k, E],
|
|
1485
|
+
twoYear: [O, E],
|
|
1486
1486
|
threeYear: [x, E],
|
|
1487
1487
|
fiveYear: [A, E]
|
|
1488
|
-
}[
|
|
1489
|
-
return
|
|
1488
|
+
}[N] || [s, l];
|
|
1489
|
+
return F && (W[0] = K(W[0], F, a)), z && (W[1] = K(W[1], z, a)), W;
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
let
|
|
1491
|
+
function oe(N, F, z) {
|
|
1492
|
+
let W = {
|
|
1493
1493
|
thisYear: _,
|
|
1494
|
-
twoYear:
|
|
1494
|
+
twoYear: O,
|
|
1495
1495
|
threeYear: x,
|
|
1496
1496
|
fiveYear: A,
|
|
1497
1497
|
thisMonth: u,
|
|
1498
1498
|
twoMonth: I,
|
|
1499
|
-
threeMonth:
|
|
1500
|
-
sixMonth:
|
|
1499
|
+
threeMonth: B,
|
|
1500
|
+
sixMonth: M,
|
|
1501
1501
|
thisWeek: c,
|
|
1502
1502
|
twoWeek: S,
|
|
1503
1503
|
thisQuarter: m,
|
|
@@ -1505,168 +1505,183 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1505
1505
|
now: E,
|
|
1506
1506
|
thisDay: s,
|
|
1507
1507
|
twoDay: w,
|
|
1508
|
-
threeDay:
|
|
1508
|
+
threeDay: C,
|
|
1509
1509
|
sevenDay: $,
|
|
1510
1510
|
fifteenDay: D,
|
|
1511
|
-
thirtyDay:
|
|
1512
|
-
}[
|
|
1513
|
-
if (!
|
|
1514
|
-
let
|
|
1515
|
-
|
|
1511
|
+
thirtyDay: T
|
|
1512
|
+
}[F];
|
|
1513
|
+
if (!W) {
|
|
1514
|
+
let ne = dayjs().startOf(N);
|
|
1515
|
+
ne.isValid() ? W = ne.format(a) : W = E;
|
|
1516
1516
|
}
|
|
1517
|
-
return
|
|
1517
|
+
return z && (W = K(W, z, a)), W;
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function le(N, F, z = "", J = !1) {
|
|
1520
1520
|
return axios.request({
|
|
1521
|
-
url:
|
|
1522
|
-
method: "POST"
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1521
|
+
url: "/sysSelector/list",
|
|
1522
|
+
method: "POST",
|
|
1523
|
+
data: { id: N, f_value: z, remote: J }
|
|
1524
|
+
}).then((W) => {
|
|
1525
|
+
W.data && Array.isArray(W.data.data) && (F.optionData = W.data.data.map(({ NAME: ne, VALUE: te }) => ({
|
|
1526
|
+
label: ne,
|
|
1527
|
+
value: te
|
|
1528
|
+
})), triggerRef(L));
|
|
1529
|
+
}).catch((W) => {
|
|
1530
|
+
console.warn(`选择器 ${N} 数据加载失败:`, W), F.optionData = [];
|
|
1530
1531
|
});
|
|
1531
1532
|
}
|
|
1532
|
-
function
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1533
|
+
function fe(N, F) {
|
|
1534
|
+
F.selectorId && (F.selectorLoading = !0, axios.request({
|
|
1535
|
+
url: "/sysSelector/list",
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
data: { id: F.selectorId, f_value: N, remote: !0 }
|
|
1538
|
+
}).then((z) => {
|
|
1539
|
+
z.data && Array.isArray(z.data.data) && (F.optionData = z.data.data.map(({ NAME: J, VALUE: W }) => ({
|
|
1540
|
+
label: J,
|
|
1541
|
+
value: W
|
|
1542
|
+
})));
|
|
1543
|
+
}).finally(() => {
|
|
1544
|
+
F.selectorLoading = !1, triggerRef(L);
|
|
1545
|
+
}));
|
|
1546
|
+
}
|
|
1547
|
+
function G(N, F, z, J) {
|
|
1548
|
+
const { columnName: W, defaultValue: ne, isNull: te } = N;
|
|
1549
|
+
N.placeholder = rct(z + "开始");
|
|
1550
|
+
const ae = cloneDeep(N);
|
|
1551
|
+
ae.name = "-", ae.columnName = `end_${W}`, ae.placeholder = rct(z + "结束");
|
|
1552
|
+
let ie = ne || "";
|
|
1538
1553
|
R.value.push({
|
|
1539
|
-
name: `end_${
|
|
1554
|
+
name: `end_${W}`,
|
|
1540
1555
|
value: ie,
|
|
1541
|
-
type:
|
|
1556
|
+
type: J,
|
|
1542
1557
|
isNull: te
|
|
1543
|
-
}),
|
|
1558
|
+
}), N.selectorId && le(N.selectorId, ae, "", !!N.remoteSearch), F.push(ae);
|
|
1544
1559
|
}
|
|
1545
|
-
function
|
|
1560
|
+
function U(N) {
|
|
1546
1561
|
return {
|
|
1547
|
-
label: rct(
|
|
1548
|
-
required:
|
|
1549
|
-
style:
|
|
1562
|
+
label: rct(N.name),
|
|
1563
|
+
required: N.isNull,
|
|
1564
|
+
style: N.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
|
|
1550
1565
|
};
|
|
1551
1566
|
}
|
|
1552
|
-
function
|
|
1553
|
-
const
|
|
1554
|
-
modelValue:
|
|
1555
|
-
type:
|
|
1567
|
+
function H(N) {
|
|
1568
|
+
const F = {
|
|
1569
|
+
modelValue: N.value,
|
|
1570
|
+
type: N.type,
|
|
1556
1571
|
clearable: !0,
|
|
1557
|
-
placeholder:
|
|
1558
|
-
"onUpdate:modelValue": (
|
|
1572
|
+
placeholder: N.placeholder,
|
|
1573
|
+
"onUpdate:modelValue": (z) => q(z, N)
|
|
1559
1574
|
};
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
}), ["ElSelect"].includes(
|
|
1575
|
+
return N.formItemType === "ElDatePicker" && (F["value-format"] = a, DATE_RANGE_TYPES.includes(N.type) && (F.unlinkPanels = !0, F.singlePanel = !!N.singlePanel), DATE_VIEW_FORMAT[N.type] && (F.format = DATE_VIEW_FORMAT[N.type])), ["ElInput"].includes(N.formItemType) && (F.onBlur = () => Y(N, "blur"), F.onKeyup = (z) => {
|
|
1576
|
+
z.key === "Enter" && Y(N, "enter");
|
|
1577
|
+
}), ["ElSelect"].includes(N.formItemType) && (F.multiple = !0, F.collapseTags = !0, F.filterable = !0, N.remoteSearch && N.selectorId && (F.remote = !0, F.remoteMethod = (z) => fe(z, N), F.loading = N.selectorLoading)), F;
|
|
1563
1578
|
}
|
|
1564
|
-
function
|
|
1565
|
-
let
|
|
1566
|
-
if (
|
|
1579
|
+
function q(N, F) {
|
|
1580
|
+
let z = R.value.findIndex((J) => J.name === F.columnName);
|
|
1581
|
+
if (F.value = N, R.value[z].value = N, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(F.formItemType)) {
|
|
1567
1582
|
if (!n.data.searchOnBlur)
|
|
1568
1583
|
return !1;
|
|
1569
|
-
|
|
1584
|
+
V = !0, ee();
|
|
1570
1585
|
}
|
|
1571
1586
|
}
|
|
1572
|
-
function
|
|
1573
|
-
if (["ElInput", "ElInputNumber"].includes(
|
|
1574
|
-
if (
|
|
1587
|
+
function Y(N, F) {
|
|
1588
|
+
if (["ElInput", "ElInputNumber"].includes(N.formItemType)) {
|
|
1589
|
+
if (F === "blur" && !n.data.searchOnBlur)
|
|
1575
1590
|
return !1;
|
|
1576
|
-
|
|
1591
|
+
V = !0, ee();
|
|
1577
1592
|
}
|
|
1578
1593
|
}
|
|
1579
|
-
function
|
|
1580
|
-
if (
|
|
1581
|
-
let
|
|
1582
|
-
let te =
|
|
1594
|
+
function K(N, F, z) {
|
|
1595
|
+
if (F && N) {
|
|
1596
|
+
let J = F.split(",").map((ne) => {
|
|
1597
|
+
let te = ne.match(/[-+]/).index, ae = Number(ne.substring(te)), ie = ne.substring(0, te);
|
|
1583
1598
|
return {
|
|
1584
|
-
count:
|
|
1599
|
+
count: ae,
|
|
1585
1600
|
type: ie
|
|
1586
1601
|
};
|
|
1587
|
-
}),
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
}),
|
|
1602
|
+
}), W = dayjs(N);
|
|
1603
|
+
W.isValid() && (J.forEach(({ count: ne, type: te }) => {
|
|
1604
|
+
W = W.add(ne, te);
|
|
1605
|
+
}), N = W.format(z));
|
|
1591
1606
|
}
|
|
1592
|
-
return
|
|
1607
|
+
return N;
|
|
1593
1608
|
}
|
|
1594
|
-
function
|
|
1595
|
-
let
|
|
1596
|
-
|
|
1597
|
-
let te =
|
|
1609
|
+
function ee() {
|
|
1610
|
+
let N = cloneDeep(R.value);
|
|
1611
|
+
N.forEach(({ name: F, value: z, type: J, isNull: W }, ne) => {
|
|
1612
|
+
let te = j.value[F];
|
|
1598
1613
|
if (!te) {
|
|
1599
|
-
Array.isArray(
|
|
1614
|
+
Array.isArray(z) && (N[ne].value = z.join(","));
|
|
1600
1615
|
return;
|
|
1601
1616
|
}
|
|
1602
|
-
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) &&
|
|
1603
|
-
if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) &&
|
|
1604
|
-
let [
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
const
|
|
1608
|
-
|
|
1617
|
+
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) && z)
|
|
1618
|
+
if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) && z && z.length === 2) {
|
|
1619
|
+
let [ce, pe] = z;
|
|
1620
|
+
const ge = DATE_RANGE_PERIOD_UNIT[te.dateType];
|
|
1621
|
+
if (ge) {
|
|
1622
|
+
const de = dayjs(ce), ye = dayjs(pe);
|
|
1623
|
+
de.isValid() && (ce = de.startOf(ge).format(a)), ye.isValid() && (pe = ye.endOf(ge).format(a));
|
|
1609
1624
|
}
|
|
1610
|
-
|
|
1611
|
-
let
|
|
1612
|
-
|
|
1613
|
-
name:
|
|
1614
|
-
value:
|
|
1615
|
-
type:
|
|
1616
|
-
isNull:
|
|
1625
|
+
N[ne].value = ce;
|
|
1626
|
+
let me = `end_${te.columnName}`;
|
|
1627
|
+
N.some((de) => de.name === me) || N.push({
|
|
1628
|
+
name: me,
|
|
1629
|
+
value: pe,
|
|
1630
|
+
type: J,
|
|
1631
|
+
isNull: W
|
|
1617
1632
|
});
|
|
1618
1633
|
} else {
|
|
1619
|
-
let
|
|
1620
|
-
if (
|
|
1621
|
-
let
|
|
1622
|
-
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
name:
|
|
1626
|
-
value:
|
|
1627
|
-
type:
|
|
1628
|
-
isNull:
|
|
1634
|
+
let ce = dayjs(z);
|
|
1635
|
+
if (ce.isValid() && te.dateType) {
|
|
1636
|
+
let pe = ce.startOf(te.dateType).format(a);
|
|
1637
|
+
N[ne].value = K(pe, te.startTime, a);
|
|
1638
|
+
let ge = ce.endOf(te.dateType).format(a), me = `end_${te.columnName}`;
|
|
1639
|
+
N.some((de) => de.name === me) || N.push({
|
|
1640
|
+
name: me,
|
|
1641
|
+
value: K(ge, te.endTime, a),
|
|
1642
|
+
type: J,
|
|
1643
|
+
isNull: W
|
|
1629
1644
|
});
|
|
1630
1645
|
}
|
|
1631
1646
|
}
|
|
1632
|
-
else Array.isArray(
|
|
1633
|
-
}), o("change",
|
|
1647
|
+
else Array.isArray(z) && (N[ne].value = z.join(","));
|
|
1648
|
+
}), o("change", N);
|
|
1634
1649
|
}
|
|
1635
1650
|
return e({
|
|
1636
|
-
changeValue:
|
|
1651
|
+
changeValue: ee
|
|
1637
1652
|
}), onMounted(() => {
|
|
1638
|
-
}), (
|
|
1653
|
+
}), (N, F) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
1639
1654
|
createVNode(unref(ElForm), { inline: "" }, {
|
|
1640
1655
|
default: withCtx(() => [
|
|
1641
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1656
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(L.value, (z) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, U(z)), {
|
|
1642
1657
|
default: withCtx(() => [
|
|
1643
|
-
|
|
1658
|
+
z.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
|
|
1644
1659
|
key: 0,
|
|
1645
1660
|
ref_for: !0
|
|
1646
|
-
},
|
|
1647
|
-
style: { width: `${
|
|
1661
|
+
}, H(z), {
|
|
1662
|
+
style: { width: `${z.elWidth}px` }
|
|
1648
1663
|
}), {
|
|
1649
1664
|
default: withCtx(() => [
|
|
1650
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1651
|
-
key:
|
|
1652
|
-
label:
|
|
1653
|
-
value:
|
|
1665
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(z.optionData, (J) => (openBlock(), createBlock(unref(ElOption), {
|
|
1666
|
+
key: J.value,
|
|
1667
|
+
label: J.label,
|
|
1668
|
+
value: J.value
|
|
1654
1669
|
}, null, 8, ["label", "value"]))), 128))
|
|
1655
1670
|
]),
|
|
1656
1671
|
_: 2
|
|
1657
|
-
}, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
1672
|
+
}, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
|
|
1658
1673
|
key: 1,
|
|
1659
|
-
style: { width: `${
|
|
1660
|
-
}, { ref_for: !0 },
|
|
1674
|
+
style: { width: `${z.elWidth}px` }
|
|
1675
|
+
}, { ref_for: !0 }, H(z)), null, 16, ["style"]))
|
|
1661
1676
|
]),
|
|
1662
1677
|
_: 2
|
|
1663
1678
|
}, 1040)), [
|
|
1664
|
-
[vShow,
|
|
1679
|
+
[vShow, z.isShow]
|
|
1665
1680
|
])), 256))
|
|
1666
1681
|
]),
|
|
1667
1682
|
_: 1
|
|
1668
1683
|
}),
|
|
1669
|
-
renderSlot(
|
|
1684
|
+
renderSlot(N.$slots, "search")
|
|
1670
1685
|
]));
|
|
1671
1686
|
}
|
|
1672
1687
|
});
|
|
@@ -1697,7 +1712,7 @@ function getDateSourceData(t, e = {
|
|
|
1697
1712
|
data: e
|
|
1698
1713
|
}).then((r) => {
|
|
1699
1714
|
var n;
|
|
1700
|
-
return r != null && r.data && ((n = r.data) != null && n.data) ? Promise.resolve(r.data) : Promise.resolve([]);
|
|
1715
|
+
return r != null && r.data && ((n = r.data) != null && n.data) ? Promise.resolve(r.data) : Array.isArray(r == null ? void 0 : r.data) ? Promise.resolve({ data: r.data, count: r.data.length }) : Promise.resolve({ data: [], count: 0 });
|
|
1701
1716
|
});
|
|
1702
1717
|
}
|
|
1703
1718
|
var zhCn$1 = { exports: {} };
|
|
@@ -2977,37 +2992,37 @@ var divide = /* @__PURE__ */ function() {
|
|
|
2977
2992
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
2978
2993
|
}
|
|
2979
2994
|
return function(n, o, i, a, s, l) {
|
|
2980
|
-
var c, u, d, f, p, m, g, _, v,
|
|
2981
|
-
if (!
|
|
2982
|
-
return new
|
|
2995
|
+
var c, u, d, f, p, m, g, _, v, b, y, E, w, C, $, D, T, S, I, B, M = n.constructor, k = n.s == o.s ? 1 : -1, O = n.d, x = o.d;
|
|
2996
|
+
if (!O || !O[0] || !x || !x[0])
|
|
2997
|
+
return new M(
|
|
2983
2998
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
2984
|
-
!n.s || !o.s || (
|
|
2999
|
+
!n.s || !o.s || (O ? x && O[0] == x[0] : !x) ? NaN : (
|
|
2985
3000
|
// Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
|
|
2986
|
-
|
|
3001
|
+
O && O[0] == 0 || !x ? k * 0 : k / 0
|
|
2987
3002
|
)
|
|
2988
3003
|
);
|
|
2989
|
-
for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), I = x.length,
|
|
2990
|
-
if (x[d] > (
|
|
2991
|
-
|
|
3004
|
+
for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), I = x.length, T = O.length, v = new M(k), b = v.d = [], d = 0; x[d] == (O[d] || 0); d++) ;
|
|
3005
|
+
if (x[d] > (O[d] || 0) && u--, i == null ? (C = i = M.precision, a = M.rounding) : s ? C = i + (n.e - o.e) + 1 : C = i, C < 0)
|
|
3006
|
+
b.push(1), m = !0;
|
|
2992
3007
|
else {
|
|
2993
|
-
if (
|
|
2994
|
-
for (f = 0, x = x[0],
|
|
2995
|
-
$ = f * l + (
|
|
2996
|
-
m = f || d <
|
|
3008
|
+
if (C = C / p + 2 | 0, d = 0, I == 1) {
|
|
3009
|
+
for (f = 0, x = x[0], C++; (d < T || f) && C--; d++)
|
|
3010
|
+
$ = f * l + (O[d] || 0), b[d] = $ / x | 0, f = $ % x | 0;
|
|
3011
|
+
m = f || d < T;
|
|
2997
3012
|
} else {
|
|
2998
|
-
for (f = l / (x[0] + 1) | 0, f > 1 && (x = t(x, f, l),
|
|
2999
|
-
|
|
3013
|
+
for (f = l / (x[0] + 1) | 0, f > 1 && (x = t(x, f, l), O = t(O, f, l), I = x.length, T = O.length), D = I, y = O.slice(0, I), E = y.length; E < I; ) y[E++] = 0;
|
|
3014
|
+
B = x.slice(), B.unshift(0), S = x[0], x[1] >= l / 2 && ++S;
|
|
3000
3015
|
do
|
|
3001
|
-
f = 0, c = e(x, y, I, E), c < 0 ? (w = y[0], I != E && (w = w * l + (y[1] || 0)), f = w / S | 0, f > 1 ? (f >= l && (f = l - 1), g = t(x, f, l), _ = g.length, E = y.length, c = e(g, y, _, E), c == 1 && (f--, r(g, I < _ ?
|
|
3002
|
-
while ((D++ <
|
|
3016
|
+
f = 0, c = e(x, y, I, E), c < 0 ? (w = y[0], I != E && (w = w * l + (y[1] || 0)), f = w / S | 0, f > 1 ? (f >= l && (f = l - 1), g = t(x, f, l), _ = g.length, E = y.length, c = e(g, y, _, E), c == 1 && (f--, r(g, I < _ ? B : x, _, l))) : (f == 0 && (c = f = 1), g = x.slice()), _ = g.length, _ < E && g.unshift(0), r(y, g, E, l), c == -1 && (E = y.length, c = e(x, y, I, E), c < 1 && (f++, r(y, I < E ? B : x, E, l))), E = y.length) : c === 0 && (f++, y = [0]), b[d++] = f, c && y[0] ? y[E++] = O[D] || 0 : (y = [O[D]], E = 1);
|
|
3017
|
+
while ((D++ < T || y[0] !== void 0) && C--);
|
|
3003
3018
|
m = y[0] !== void 0;
|
|
3004
3019
|
}
|
|
3005
|
-
|
|
3020
|
+
b[0] || b.shift();
|
|
3006
3021
|
}
|
|
3007
3022
|
if (p == 1)
|
|
3008
3023
|
v.e = u, inexact = m;
|
|
3009
3024
|
else {
|
|
3010
|
-
for (d = 1, f =
|
|
3025
|
+
for (d = 1, f = b[0]; f >= 10; f /= 10) d++;
|
|
3011
3026
|
v.e = d + u * p - 1, finalise(v, s ? i + v.e + 1 : i, a, m);
|
|
3012
3027
|
}
|
|
3013
3028
|
return v;
|
|
@@ -3124,7 +3139,7 @@ function naturalExponential(t, e) {
|
|
|
3124
3139
|
}
|
|
3125
3140
|
}
|
|
3126
3141
|
function naturalLogarithm(t, e) {
|
|
3127
|
-
var r, n, o, i, a, s, l, c, u, d, f, p = 1, m = 10, g = t, _ = g.d, v = g.constructor,
|
|
3142
|
+
var r, n, o, i, a, s, l, c, u, d, f, p = 1, m = 10, g = t, _ = g.d, v = g.constructor, b = v.rounding, y = v.precision;
|
|
3128
3143
|
if (g.s < 0 || !_ || !_[0] || !g.e && _[0] == 1 && _.length == 1)
|
|
3129
3144
|
return new v(_ && !_[0] ? -1 / 0 : g.s != 1 ? NaN : _ ? 0 : g);
|
|
3130
3145
|
if (e == null ? (external = !1, u = y) : u = e, v.precision = u += m, r = digitsToString(_), n = r.charAt(0), Math.abs(i = g.e) < 15e14) {
|
|
@@ -3132,14 +3147,14 @@ function naturalLogarithm(t, e) {
|
|
|
3132
3147
|
g = g.times(t), r = digitsToString(g.d), n = r.charAt(0), p++;
|
|
3133
3148
|
i = g.e, n > 1 ? (g = new v("0." + r), i++) : g = new v(n + "." + r.slice(1));
|
|
3134
3149
|
} else
|
|
3135
|
-
return c = getLn10(v, u + 2, y).times(i + ""), g = naturalLogarithm(new v(n + "." + r.slice(1)), u - m).plus(c), v.precision = y, e == null ? finalise(g, y,
|
|
3150
|
+
return c = getLn10(v, u + 2, y).times(i + ""), g = naturalLogarithm(new v(n + "." + r.slice(1)), u - m).plus(c), v.precision = y, e == null ? finalise(g, y, b, external = !0) : g;
|
|
3136
3151
|
for (d = g, l = a = g = divide(g.minus(1), g.plus(1), u, 1), f = finalise(g.times(g), u, 1), o = 3; ; ) {
|
|
3137
3152
|
if (a = finalise(a.times(f), u, 1), c = l.plus(divide(a, new v(o), u, 1)), digitsToString(c.d).slice(0, u) === digitsToString(l.d).slice(0, u))
|
|
3138
3153
|
if (l = l.times(2), i !== 0 && (l = l.plus(getLn10(v, u + 2, y).times(i + ""))), l = divide(l, new v(p), u, 1), e == null)
|
|
3139
|
-
if (checkRoundingDigits(l.d, u - m,
|
|
3154
|
+
if (checkRoundingDigits(l.d, u - m, b, s))
|
|
3140
3155
|
v.precision = u += m, c = a = g = divide(d.minus(1), d.plus(1), u, 1), f = finalise(g.times(g), u, 1), o = s = 1;
|
|
3141
3156
|
else
|
|
3142
|
-
return finalise(l, v.precision = y,
|
|
3157
|
+
return finalise(l, v.precision = y, b, external = !0);
|
|
3143
3158
|
else
|
|
3144
3159
|
return v.precision = y, l;
|
|
3145
3160
|
l = c, o += 2;
|
|
@@ -3586,10 +3601,10 @@ function applyBorderOperation(t, e, r) {
|
|
|
3586
3601
|
f.row < n && (n = f.row), f.row > o && (o = f.row), f.col < i && (i = f.col), f.col > a && (a = f.col);
|
|
3587
3602
|
});
|
|
3588
3603
|
const s = new Set(t.map((f) => `${f.row},${f.col}`)), l = /* @__PURE__ */ new Map(), c = r.color ? { style: r.style, color: r.color } : { style: r.style }, u = (f, p, m, g) => {
|
|
3589
|
-
var
|
|
3604
|
+
var b, y, E;
|
|
3590
3605
|
const _ = `${f},${p}`;
|
|
3591
3606
|
let v = l.get(_);
|
|
3592
|
-
v || (v = { row: f, col: p, border: cloneBorder((E = (y = (
|
|
3607
|
+
v || (v = { row: f, col: p, border: cloneBorder((E = (y = (b = e[f]) == null ? void 0 : b[p]) == null ? void 0 : y.style) == null ? void 0 : E.border) }, l.set(_, v)), v.border[m] = { ...g };
|
|
3593
3608
|
}, d = r.mode === "none";
|
|
3594
3609
|
t.forEach((f) => {
|
|
3595
3610
|
var _, v;
|
|
@@ -3598,9 +3613,9 @@ function applyBorderOperation(t, e, r) {
|
|
|
3598
3613
|
const m = cloneBorder((v = p.style) == null ? void 0 : v.border);
|
|
3599
3614
|
d ? (m.top = { style: "none" }, m.right = { style: "none" }, m.bottom = { style: "none" }, m.left = { style: "none" }) : getSidesForMode(f, n, o, i, a, r.mode).forEach((y) => {
|
|
3600
3615
|
m[y] = { ...c };
|
|
3601
|
-
}), l.set(`${f.row},${f.col}`, { row: f.row, col: f.col, border: m }), (d ? getSidesForMode(f, n, o, i, a, "outside") : getSidesForMode(f, n, o, i, a, r.mode)).forEach((
|
|
3616
|
+
}), l.set(`${f.row},${f.col}`, { row: f.row, col: f.col, border: m }), (d ? getSidesForMode(f, n, o, i, a, "outside") : getSidesForMode(f, n, o, i, a, r.mode)).forEach((b) => {
|
|
3602
3617
|
var w;
|
|
3603
|
-
const y = getNeighborSide(f,
|
|
3618
|
+
const y = getNeighborSide(f, b);
|
|
3604
3619
|
if (!y) return;
|
|
3605
3620
|
const E = (w = e[y.row]) == null ? void 0 : w[y.col];
|
|
3606
3621
|
E && (s.has(`${y.row},${y.col}`) || E.rowSpan === 0 || E.colSpan === 0 || u(y.row, y.col, y.side, d ? { style: "none" } : { ...c }));
|
|
@@ -7039,9 +7054,9 @@ regex.testAlphanumeric = function t(e) {
|
|
|
7039
7054
|
if (!i.isValid(p))
|
|
7040
7055
|
throw new Error("Invalid QR Code version");
|
|
7041
7056
|
typeof g > "u" && (g = o.BYTE);
|
|
7042
|
-
const _ = e.getSymbolTotalCodewords(p), v = r.getTotalCodewordsCount(p, m),
|
|
7043
|
-
if (g === o.MIXED) return
|
|
7044
|
-
const y =
|
|
7057
|
+
const _ = e.getSymbolTotalCodewords(p), v = r.getTotalCodewordsCount(p, m), b = (_ - v) * 8;
|
|
7058
|
+
if (g === o.MIXED) return b;
|
|
7059
|
+
const y = b - c(g, p);
|
|
7045
7060
|
switch (g) {
|
|
7046
7061
|
case o.NUMERIC:
|
|
7047
7062
|
return Math.floor(y / 10 * 3);
|
|
@@ -7292,22 +7307,22 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7292
7307
|
function c(v) {
|
|
7293
7308
|
return unescape(encodeURIComponent(v)).length;
|
|
7294
7309
|
}
|
|
7295
|
-
function u(v,
|
|
7310
|
+
function u(v, b, y) {
|
|
7296
7311
|
const E = [];
|
|
7297
7312
|
let w;
|
|
7298
7313
|
for (; (w = v.exec(y)) !== null; )
|
|
7299
7314
|
E.push({
|
|
7300
7315
|
data: w[0],
|
|
7301
7316
|
index: w.index,
|
|
7302
|
-
mode:
|
|
7317
|
+
mode: b,
|
|
7303
7318
|
length: w[0].length
|
|
7304
7319
|
});
|
|
7305
7320
|
return E;
|
|
7306
7321
|
}
|
|
7307
7322
|
function d(v) {
|
|
7308
|
-
const
|
|
7323
|
+
const b = u(a.NUMERIC, e.NUMERIC, v), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, v);
|
|
7309
7324
|
let E, w;
|
|
7310
|
-
return s.isKanjiModeEnabled() ? (E = u(a.BYTE, e.BYTE, v), w = u(a.KANJI, e.KANJI, v)) : (E = u(a.BYTE_KANJI, e.BYTE, v), w = []),
|
|
7325
|
+
return s.isKanjiModeEnabled() ? (E = u(a.BYTE, e.BYTE, v), w = u(a.KANJI, e.KANJI, v)) : (E = u(a.BYTE_KANJI, e.BYTE, v), w = []), b.concat(y, E, w).sort(function($, D) {
|
|
7311
7326
|
return $.index - D.index;
|
|
7312
7327
|
}).map(function($) {
|
|
7313
7328
|
return {
|
|
@@ -7317,8 +7332,8 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7317
7332
|
};
|
|
7318
7333
|
});
|
|
7319
7334
|
}
|
|
7320
|
-
function f(v,
|
|
7321
|
-
switch (
|
|
7335
|
+
function f(v, b) {
|
|
7336
|
+
switch (b) {
|
|
7322
7337
|
case e.NUMERIC:
|
|
7323
7338
|
return r.getBitsLength(v);
|
|
7324
7339
|
case e.ALPHANUMERIC:
|
|
@@ -7330,66 +7345,66 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7330
7345
|
}
|
|
7331
7346
|
}
|
|
7332
7347
|
function p(v) {
|
|
7333
|
-
return v.reduce(function(
|
|
7334
|
-
const E =
|
|
7335
|
-
return E && E.mode === y.mode ? (
|
|
7348
|
+
return v.reduce(function(b, y) {
|
|
7349
|
+
const E = b.length - 1 >= 0 ? b[b.length - 1] : null;
|
|
7350
|
+
return E && E.mode === y.mode ? (b[b.length - 1].data += y.data, b) : (b.push(y), b);
|
|
7336
7351
|
}, []);
|
|
7337
7352
|
}
|
|
7338
7353
|
function m(v) {
|
|
7339
|
-
const
|
|
7354
|
+
const b = [];
|
|
7340
7355
|
for (let y = 0; y < v.length; y++) {
|
|
7341
7356
|
const E = v[y];
|
|
7342
7357
|
switch (E.mode) {
|
|
7343
7358
|
case e.NUMERIC:
|
|
7344
|
-
|
|
7359
|
+
b.push([
|
|
7345
7360
|
E,
|
|
7346
7361
|
{ data: E.data, mode: e.ALPHANUMERIC, length: E.length },
|
|
7347
7362
|
{ data: E.data, mode: e.BYTE, length: E.length }
|
|
7348
7363
|
]);
|
|
7349
7364
|
break;
|
|
7350
7365
|
case e.ALPHANUMERIC:
|
|
7351
|
-
|
|
7366
|
+
b.push([
|
|
7352
7367
|
E,
|
|
7353
7368
|
{ data: E.data, mode: e.BYTE, length: E.length }
|
|
7354
7369
|
]);
|
|
7355
7370
|
break;
|
|
7356
7371
|
case e.KANJI:
|
|
7357
|
-
|
|
7372
|
+
b.push([
|
|
7358
7373
|
E,
|
|
7359
7374
|
{ data: E.data, mode: e.BYTE, length: c(E.data) }
|
|
7360
7375
|
]);
|
|
7361
7376
|
break;
|
|
7362
7377
|
case e.BYTE:
|
|
7363
|
-
|
|
7378
|
+
b.push([
|
|
7364
7379
|
{ data: E.data, mode: e.BYTE, length: c(E.data) }
|
|
7365
7380
|
]);
|
|
7366
7381
|
}
|
|
7367
7382
|
}
|
|
7368
|
-
return
|
|
7383
|
+
return b;
|
|
7369
7384
|
}
|
|
7370
|
-
function g(v,
|
|
7385
|
+
function g(v, b) {
|
|
7371
7386
|
const y = {}, E = { start: {} };
|
|
7372
7387
|
let w = ["start"];
|
|
7373
|
-
for (let
|
|
7374
|
-
const $ = v[
|
|
7375
|
-
for (let
|
|
7376
|
-
const S = $[
|
|
7388
|
+
for (let C = 0; C < v.length; C++) {
|
|
7389
|
+
const $ = v[C], D = [];
|
|
7390
|
+
for (let T = 0; T < $.length; T++) {
|
|
7391
|
+
const S = $[T], I = "" + C + T;
|
|
7377
7392
|
D.push(I), y[I] = { node: S, lastCount: 0 }, E[I] = {};
|
|
7378
|
-
for (let
|
|
7379
|
-
const
|
|
7380
|
-
y[
|
|
7393
|
+
for (let B = 0; B < w.length; B++) {
|
|
7394
|
+
const M = w[B];
|
|
7395
|
+
y[M] && y[M].node.mode === S.mode ? (E[M][I] = f(y[M].lastCount + S.length, S.mode) - f(y[M].lastCount, S.mode), y[M].lastCount += S.length) : (y[M] && (y[M].lastCount = S.length), E[M][I] = f(S.length, S.mode) + 4 + e.getCharCountIndicator(S.mode, b));
|
|
7381
7396
|
}
|
|
7382
7397
|
}
|
|
7383
7398
|
w = D;
|
|
7384
7399
|
}
|
|
7385
|
-
for (let
|
|
7386
|
-
E[w[
|
|
7400
|
+
for (let C = 0; C < w.length; C++)
|
|
7401
|
+
E[w[C]].end = 0;
|
|
7387
7402
|
return { map: E, table: y };
|
|
7388
7403
|
}
|
|
7389
|
-
function _(v,
|
|
7404
|
+
function _(v, b) {
|
|
7390
7405
|
let y;
|
|
7391
7406
|
const E = e.getBestModeForData(v);
|
|
7392
|
-
if (y = e.from(
|
|
7407
|
+
if (y = e.from(b, E), y !== e.BYTE && y.bit < E.bit)
|
|
7393
7408
|
throw new Error('"' + v + '" cannot be encoded with mode ' + e.toString(y) + `.
|
|
7394
7409
|
Suggested mode is: ` + e.toString(E));
|
|
7395
7410
|
switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
|
|
@@ -7403,18 +7418,18 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7403
7418
|
return new o(v);
|
|
7404
7419
|
}
|
|
7405
7420
|
}
|
|
7406
|
-
t.fromArray = function(
|
|
7407
|
-
return
|
|
7421
|
+
t.fromArray = function(b) {
|
|
7422
|
+
return b.reduce(function(y, E) {
|
|
7408
7423
|
return typeof E == "string" ? y.push(_(E, null)) : E.data && y.push(_(E.data, E.mode)), y;
|
|
7409
7424
|
}, []);
|
|
7410
|
-
}, t.fromString = function(
|
|
7411
|
-
const E = d(
|
|
7412
|
-
for (let
|
|
7413
|
-
D.push(
|
|
7425
|
+
}, t.fromString = function(b, y) {
|
|
7426
|
+
const E = d(b, s.isKanjiModeEnabled()), w = m(E), C = g(w, y), $ = l.find_path(C.map, "start", "end"), D = [];
|
|
7427
|
+
for (let T = 1; T < $.length - 1; T++)
|
|
7428
|
+
D.push(C.table[$[T]].node);
|
|
7414
7429
|
return t.fromArray(p(D));
|
|
7415
|
-
}, t.rawSplit = function(
|
|
7430
|
+
}, t.rawSplit = function(b) {
|
|
7416
7431
|
return t.fromArray(
|
|
7417
|
-
d(
|
|
7432
|
+
d(b, s.isKanjiModeEnabled())
|
|
7418
7433
|
);
|
|
7419
7434
|
};
|
|
7420
7435
|
})(segments);
|
|
@@ -7492,19 +7507,19 @@ function createCodewords(t, e, r) {
|
|
|
7492
7507
|
let m = 0;
|
|
7493
7508
|
const g = new Array(a), _ = new Array(a);
|
|
7494
7509
|
let v = 0;
|
|
7495
|
-
const
|
|
7510
|
+
const b = new Uint8Array(t.buffer);
|
|
7496
7511
|
for (let $ = 0; $ < a; $++) {
|
|
7497
7512
|
const D = $ < l ? u : d;
|
|
7498
|
-
g[$] =
|
|
7513
|
+
g[$] = b.slice(m, m + D), _[$] = p.encode(g[$]), m += D, v = Math.max(v, D);
|
|
7499
7514
|
}
|
|
7500
7515
|
const y = new Uint8Array(n);
|
|
7501
|
-
let E = 0, w,
|
|
7516
|
+
let E = 0, w, C;
|
|
7502
7517
|
for (w = 0; w < v; w++)
|
|
7503
|
-
for (
|
|
7504
|
-
w < g[
|
|
7518
|
+
for (C = 0; C < a; C++)
|
|
7519
|
+
w < g[C].length && (y[E++] = g[C][w]);
|
|
7505
7520
|
for (w = 0; w < f; w++)
|
|
7506
|
-
for (
|
|
7507
|
-
y[E++] = _[
|
|
7521
|
+
for (C = 0; C < a; C++)
|
|
7522
|
+
y[E++] = _[C][w];
|
|
7508
7523
|
return y;
|
|
7509
7524
|
}
|
|
7510
7525
|
function createSymbol(t, e, r, n) {
|
|
@@ -7685,8 +7700,8 @@ browser.toString = renderCanvas.bind(null, function(t, e, r) {
|
|
|
7685
7700
|
});
|
|
7686
7701
|
class CanvasPool {
|
|
7687
7702
|
constructor() {
|
|
7688
|
-
|
|
7689
|
-
|
|
7703
|
+
se(this, "pool", []);
|
|
7704
|
+
se(this, "maxSize", 10);
|
|
7690
7705
|
}
|
|
7691
7706
|
// 最多缓存 10 个 canvas
|
|
7692
7707
|
/**
|
|
@@ -7870,10 +7885,10 @@ function renderImageStyle(t) {
|
|
|
7870
7885
|
return t.width !== void 0 && e.push(`width:${t.width}px`), t.height !== void 0 && e.push(`height:${t.height}px`), t.fit && e.push(`object-fit:${t.fit}`), e.length ? e.join(";") : "";
|
|
7871
7886
|
}
|
|
7872
7887
|
function renderCell(t, e, r) {
|
|
7873
|
-
var
|
|
7888
|
+
var b, y, E, w, C;
|
|
7874
7889
|
const n = document.createElement("td");
|
|
7875
7890
|
n.setAttribute("data-cell-config", `${e.row}-${e.col}`), n.setAttribute("rowspan", e.rowSpan), n.setAttribute("colspan", e.colSpan);
|
|
7876
|
-
const o = ((
|
|
7891
|
+
const o = ((b = e.style) == null ? void 0 : b.allowContentOverflow) === !0;
|
|
7877
7892
|
n.style.boxSizing = "border-box", n.style.position = "relative", e.rowSpan <= 1 && (o ? n.style.minHeight = `${t.size ?? 25}px` : n.style.height = `${t.size ?? 25}px`);
|
|
7878
7893
|
const i = { left: "flex-start", center: "center", right: "flex-end" }, a = { top: "flex-start", center: "center", bottom: "flex-end" }, s = i[(y = e.style) == null ? void 0 : y.textAlign] || "center", l = a[(E = e.style) == null ? void 0 : E.verticalAlign] || "center", c = document.createElement("div");
|
|
7879
7894
|
o ? c.style.cssText = `overflow:visible;position:relative;display:flex;align-items:${l};justify-content:${s};` : c.style.cssText = `overflow:hidden;position:absolute;inset:0;display:flex;align-items:${l};justify-content:${s};`;
|
|
@@ -7893,7 +7908,7 @@ function renderCell(t, e, r) {
|
|
|
7893
7908
|
break;
|
|
7894
7909
|
}
|
|
7895
7910
|
default:
|
|
7896
|
-
u = [void 0, null, ""].includes(e.text) ? ((
|
|
7911
|
+
u = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : e.text;
|
|
7897
7912
|
break;
|
|
7898
7913
|
}
|
|
7899
7914
|
if (!d && e.format === FormatType.BARCODE)
|
|
@@ -7987,8 +8002,8 @@ function renderReportByDomForPrint(t, e, r, n) {
|
|
|
7987
8002
|
if (g.isFixed === !0 && (v.classList.add("fixed-td"), v.style.left = `${l - 1}px`), l += (g.size ?? 80) - 1, v.setAttribute("data-cell-data", `${d}-${m}`), _.rowSpan !== 0 && _.colSpan !== 0) {
|
|
7988
8003
|
if ([CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN, CellType.IMAGE, CellType.RICH].includes(_.type)) {
|
|
7989
8004
|
_.style && v.setAttribute("style", renderCellPrintStyle(_.style, n)), _.style && _.style.border === !1 && v.classList.add("no-border");
|
|
7990
|
-
const
|
|
7991
|
-
v.style.paddingTop = `${E}px`, v.style.paddingRight = `${w}px`, v.style.paddingBottom = `${
|
|
8005
|
+
const b = ((u = _.style) == null ? void 0 : u.allowContentOverflow) === !0, y = _.style || {}, E = y.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, w = y.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, C = y.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, $ = y.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
|
|
8006
|
+
v.style.paddingTop = `${E}px`, v.style.paddingRight = `${w}px`, v.style.paddingBottom = `${C}px`, v.style.paddingLeft = `${$}px`, v.style.boxSizing = "border-box", v.style.position = "relative", _.rowSpan <= 1 && (b ? v.style.minHeight = `${f.size ?? 25}px` : v.style.height = `${f.size ?? 25}px`);
|
|
7992
8007
|
}
|
|
7993
8008
|
p.appendChild(v);
|
|
7994
8009
|
}
|
|
@@ -7999,6 +8014,7 @@ function renderReportByDomForPrint(t, e, r, n) {
|
|
|
7999
8014
|
return i.appendChild(c), o;
|
|
8000
8015
|
}
|
|
8001
8016
|
function renderReportByDom(t, e, r, n, o, i) {
|
|
8017
|
+
var _;
|
|
8002
8018
|
const a = document.createElement("div"), s = document.createElement("table");
|
|
8003
8019
|
a.className = "yh-report-table-context", a.appendChild(s), n.value.appendChild(a), s.innerHTML = "";
|
|
8004
8020
|
const l = renderColgroup(e, s);
|
|
@@ -8006,46 +8022,51 @@ function renderReportByDom(t, e, r, n, o, i) {
|
|
|
8006
8022
|
let c = 0, u = 0;
|
|
8007
8023
|
const d = document.createDocumentFragment(), f = [], p = [], m = /* @__PURE__ */ new Map();
|
|
8008
8024
|
let g = 0;
|
|
8009
|
-
for (let
|
|
8010
|
-
const
|
|
8011
|
-
if (
|
|
8025
|
+
for (let v = 0; v < t.length; v++) {
|
|
8026
|
+
const b = t[v];
|
|
8027
|
+
if (b.isHidden)
|
|
8012
8028
|
continue;
|
|
8013
|
-
const
|
|
8014
|
-
|
|
8015
|
-
for (let
|
|
8016
|
-
const
|
|
8017
|
-
if (
|
|
8029
|
+
const y = document.createElement("tr");
|
|
8030
|
+
y.dataset.ri = String(g), b.isFixed && (y.style.top = `${c - 1}px`, y.classList.add("fixed-row")), c += (b.size ?? 25) - 1, y.style.height = `${b.size ?? 25}px`, u = 0;
|
|
8031
|
+
for (let E = 0; E < e.length; E++) {
|
|
8032
|
+
const w = e[E];
|
|
8033
|
+
if (w.isHidden)
|
|
8018
8034
|
continue;
|
|
8019
|
-
const
|
|
8020
|
-
if (
|
|
8021
|
-
const
|
|
8022
|
-
if (
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8035
|
+
const C = r[v][E];
|
|
8036
|
+
if (b && C && (b.size ?? 25) > 0) {
|
|
8037
|
+
const $ = renderCell(b, C, i);
|
|
8038
|
+
if (C.clickSortField) {
|
|
8039
|
+
$.classList.add("click-sort-cell"), $.setAttribute("data-click-sort-field", C.clickSortField), $.setAttribute("data-click-sort-numeric", C.clickSortNumeric ? "1" : "0");
|
|
8040
|
+
const D = document.createElement("span");
|
|
8041
|
+
D.className = "click-sort-arrow", (_ = $.querySelector(":scope > div")) == null || _.appendChild(D);
|
|
8042
|
+
}
|
|
8043
|
+
if (w.isFixed === !0 && ($.classList.add("fixed-td"), $.style.position = "sticky", $.style.left = `${u - 1}px`), u += (w.size ?? 80) - 1, $.setAttribute("data-cell-data", `${v}-${E}`), !(C.rowSpan === 0 || C.colSpan === 0)) {
|
|
8044
|
+
if (C.style && C.style.border === !1 && $.classList.add("no-border"), y.appendChild($), C.rowSpan > 1) {
|
|
8045
|
+
const D = f.length;
|
|
8046
|
+
f.push($), p.push(C.rowSpan);
|
|
8047
|
+
for (let T = 1; T < C.rowSpan; T++) {
|
|
8048
|
+
const S = g + T;
|
|
8049
|
+
m.has(S) || m.set(S, []), m.get(S).push(D);
|
|
8029
8050
|
}
|
|
8030
8051
|
}
|
|
8031
8052
|
}
|
|
8032
8053
|
}
|
|
8033
8054
|
}
|
|
8034
|
-
d.appendChild(
|
|
8055
|
+
d.appendChild(y), g++;
|
|
8035
8056
|
}
|
|
8036
8057
|
if (f.length > 0) {
|
|
8037
|
-
let
|
|
8038
|
-
const
|
|
8039
|
-
var
|
|
8040
|
-
|
|
8058
|
+
let v = -1;
|
|
8059
|
+
const b = () => {
|
|
8060
|
+
var y;
|
|
8061
|
+
v >= 0 && ((y = m.get(v)) == null || y.forEach((E) => f[E].classList.remove("merge-hover"))), v = -1;
|
|
8041
8062
|
};
|
|
8042
|
-
s.addEventListener("mouseover", (
|
|
8043
|
-
var
|
|
8044
|
-
const
|
|
8045
|
-
if (!
|
|
8046
|
-
const
|
|
8047
|
-
|
|
8048
|
-
}), s.addEventListener("mouseleave",
|
|
8063
|
+
s.addEventListener("mouseover", (y) => {
|
|
8064
|
+
var C;
|
|
8065
|
+
const E = y.target.closest("tr");
|
|
8066
|
+
if (!E) return;
|
|
8067
|
+
const w = Number(E.dataset.ri);
|
|
8068
|
+
w !== v && (b(), v = w, (C = m.get(w)) == null || C.forEach(($) => f[$].classList.add("merge-hover")));
|
|
8069
|
+
}), s.addEventListener("mouseleave", b);
|
|
8049
8070
|
}
|
|
8050
8071
|
s.appendChild(d);
|
|
8051
8072
|
}
|
|
@@ -8412,10 +8433,10 @@ function getRangeValues(t, e, r) {
|
|
|
8412
8433
|
);
|
|
8413
8434
|
} else if (r.indexOf("c-") > -1) {
|
|
8414
8435
|
const g = parseInt(r.split("-")[1]);
|
|
8415
|
-
d = getCellValue(m).filter((
|
|
8416
|
-
(
|
|
8436
|
+
d = getCellValue(m).filter((b) => b.colGroupIndex === g).map(
|
|
8437
|
+
(b) => {
|
|
8417
8438
|
var y;
|
|
8418
|
-
return [null, void 0, ""].includes(
|
|
8439
|
+
return [null, void 0, ""].includes(b.rawData) ? (y = b.formatType) == null ? void 0 : y.defaultCellContent : b.rawData;
|
|
8419
8440
|
}
|
|
8420
8441
|
);
|
|
8421
8442
|
}
|
|
@@ -8495,8 +8516,8 @@ function evaluateFunction(t, e, r) {
|
|
|
8495
8516
|
for (let g = 0; g < a; g++) {
|
|
8496
8517
|
let _ = new Decimal(1);
|
|
8497
8518
|
for (const v of i) {
|
|
8498
|
-
const
|
|
8499
|
-
_ = _.times(isNaN(
|
|
8519
|
+
const b = parseFloat(v[g]);
|
|
8520
|
+
_ = _.times(isNaN(b) ? 0 : b);
|
|
8500
8521
|
}
|
|
8501
8522
|
s = s.plus(_);
|
|
8502
8523
|
}
|
|
@@ -8605,6 +8626,24 @@ async function preGenerateBarcodes(t) {
|
|
|
8605
8626
|
}
|
|
8606
8627
|
e.length > 0 && await Promise.all(e);
|
|
8607
8628
|
}
|
|
8629
|
+
function resolveFieldKey(t, e) {
|
|
8630
|
+
const r = t.find((o) => o && typeof o == "object");
|
|
8631
|
+
return !r || e in r ? e : Object.keys(r).find((o) => o.toUpperCase() === e.toUpperCase()) || e;
|
|
8632
|
+
}
|
|
8633
|
+
function sortRowsByField(t, e, r, n = !1) {
|
|
8634
|
+
const o = resolveFieldKey(t, e), i = r === "desc" ? -1 : 1;
|
|
8635
|
+
return [...t].sort((a, s) => {
|
|
8636
|
+
const l = a == null ? void 0 : a[o], c = s == null ? void 0 : s[o], u = l == null || l === "", d = c == null || c === "";
|
|
8637
|
+
if (u || d) return u && d ? 0 : u ? 1 : -1;
|
|
8638
|
+
let f;
|
|
8639
|
+
if (n) {
|
|
8640
|
+
const p = parseFloat(l), m = parseFloat(c), g = isNaN(p) ? Number.POSITIVE_INFINITY : p, _ = isNaN(m) ? Number.POSITIVE_INFINITY : m;
|
|
8641
|
+
f = g - _;
|
|
8642
|
+
} else
|
|
8643
|
+
f = String(l).localeCompare(String(c), "zh-CN");
|
|
8644
|
+
return f * i;
|
|
8645
|
+
});
|
|
8646
|
+
}
|
|
8608
8647
|
function loopGroupCols(t, e, r, n) {
|
|
8609
8648
|
e.forEach((o) => {
|
|
8610
8649
|
let i = n[o.data], a = [], s = [];
|
|
@@ -8616,31 +8655,31 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8616
8655
|
s.forEach((m, g) => {
|
|
8617
8656
|
const _ = getSeparatorKey("key", m);
|
|
8618
8657
|
l[_] || (l[_] = /* @__PURE__ */ new Set());
|
|
8619
|
-
let
|
|
8658
|
+
let b = a[m].data.replace("col:", "").toUpperCase();
|
|
8620
8659
|
if (g === 0)
|
|
8621
8660
|
i.forEach((y) => {
|
|
8622
|
-
if (
|
|
8623
|
-
let E = y[
|
|
8661
|
+
if (b) {
|
|
8662
|
+
let E = y[b];
|
|
8624
8663
|
E || (E = "-");
|
|
8625
|
-
const w = getSeparatorKey("child", m, E),
|
|
8626
|
-
l[w] ? l[w].push(y) : l[w] = [y], l[_].add(E), l[E] = [E], l[
|
|
8664
|
+
const w = getSeparatorKey("child", m, E), C = getSeparatorKey("data", E);
|
|
8665
|
+
l[w] ? l[w].push(y) : l[w] = [y], l[_].add(E), l[E] = [E], l[C] = [y];
|
|
8627
8666
|
}
|
|
8628
8667
|
});
|
|
8629
8668
|
else {
|
|
8630
8669
|
let y = s[g - 1];
|
|
8631
8670
|
const E = getSeparatorKey("key", y);
|
|
8632
|
-
Array.from(l[E]).forEach((
|
|
8633
|
-
const $ = getSeparatorKey("child", y,
|
|
8634
|
-
let
|
|
8635
|
-
if (
|
|
8636
|
-
let I = S[
|
|
8671
|
+
Array.from(l[E]).forEach((C) => {
|
|
8672
|
+
const $ = getSeparatorKey("child", y, C);
|
|
8673
|
+
let T = (l[$] || []).map((S) => {
|
|
8674
|
+
if (b) {
|
|
8675
|
+
let I = S[b];
|
|
8637
8676
|
I || (I = "-");
|
|
8638
|
-
let
|
|
8639
|
-
const
|
|
8640
|
-
return l[
|
|
8677
|
+
let B = !1;
|
|
8678
|
+
const M = getSeparatorKey("child", m, C, I), k = getSeparatorKey(C, I), O = getSeparatorKey("data", k);
|
|
8679
|
+
return l[M] ? l[M].push(S) : l[M] = [S], l[O] ? l[O].push(S) : l[O] = [S], l[_].has(k) || (B = !0), l[_].add(k), l[k] = l[C].concat([I]), B ? I : null;
|
|
8641
8680
|
}
|
|
8642
8681
|
}).filter((S) => !!S);
|
|
8643
|
-
l[$] =
|
|
8682
|
+
l[$] = T;
|
|
8644
8683
|
});
|
|
8645
8684
|
}
|
|
8646
8685
|
});
|
|
@@ -8651,8 +8690,8 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8651
8690
|
if (c !== void 0) {
|
|
8652
8691
|
const m = a[c], g = { order: m.groupSortOrder, numeric: m.groupSortNumeric };
|
|
8653
8692
|
s.forEach((_) => {
|
|
8654
|
-
const v = getSeparatorKey("key", _),
|
|
8655
|
-
|
|
8693
|
+
const v = getSeparatorKey("key", _), b = Array.from(l[v]);
|
|
8694
|
+
b.length > 1 && b.sort(createGroupSortComparator(g)), l[v] = new Set(b);
|
|
8656
8695
|
});
|
|
8657
8696
|
}
|
|
8658
8697
|
let u = 1, d = Math.max(...s), f = Math.min(...s);
|
|
@@ -8661,55 +8700,55 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8661
8700
|
const m = getSeparatorKey("key", d);
|
|
8662
8701
|
p ? u = l[m].size : u = Array.from(l[m]).reduce((g, _) => {
|
|
8663
8702
|
const v = getSeparatorKey("child", d, _);
|
|
8664
|
-
let
|
|
8665
|
-
return g +
|
|
8703
|
+
let b = l[v];
|
|
8704
|
+
return g + b.length;
|
|
8666
8705
|
}, 0);
|
|
8667
8706
|
} else
|
|
8668
8707
|
u = i.length;
|
|
8669
8708
|
for (let m = 0; m < a.length; m++) {
|
|
8670
|
-
const g = a[m], _ = t.findIndex((
|
|
8709
|
+
const g = a[m], _ = t.findIndex((b) => b.index === o.index);
|
|
8671
8710
|
if (m === 0) {
|
|
8672
|
-
const
|
|
8711
|
+
const b = {
|
|
8673
8712
|
...o,
|
|
8674
8713
|
loop: !1
|
|
8675
|
-
}, y = Array.from({ length: u }, () => cloneDeep(
|
|
8714
|
+
}, y = Array.from({ length: u }, () => cloneDeep(b));
|
|
8676
8715
|
t.splice(_, 1, ...y);
|
|
8677
8716
|
}
|
|
8678
8717
|
let v = r[g.row];
|
|
8679
8718
|
if (v && Array.isArray(v)) {
|
|
8680
|
-
let
|
|
8719
|
+
let b = [];
|
|
8681
8720
|
if (s.includes(m)) {
|
|
8682
8721
|
const y = getSeparatorKey("key", g.row);
|
|
8683
|
-
Array.from(l[y]).forEach((w,
|
|
8684
|
-
const $ = p && m === d ? 1 : getGroupMinChildrenLength(l, w, d, p, s), D = l[w],
|
|
8685
|
-
let
|
|
8722
|
+
Array.from(l[y]).forEach((w, C) => {
|
|
8723
|
+
const $ = p && m === d ? 1 : getGroupMinChildrenLength(l, w, d, p, s), D = l[w], T = D[D.length - 1], S = getSeparatorKey("data", w), I = l[S];
|
|
8724
|
+
let B = {
|
|
8686
8725
|
...g,
|
|
8687
|
-
text:
|
|
8726
|
+
text: T,
|
|
8688
8727
|
colSpan: $,
|
|
8689
8728
|
colData: I
|
|
8690
8729
|
};
|
|
8691
|
-
if (
|
|
8692
|
-
let
|
|
8730
|
+
if (b.push(B), $ > 1) {
|
|
8731
|
+
let M = {
|
|
8693
8732
|
...g,
|
|
8694
|
-
text:
|
|
8733
|
+
text: T,
|
|
8695
8734
|
type: "",
|
|
8696
8735
|
colSpan: 0,
|
|
8697
8736
|
rowSpan: 0
|
|
8698
8737
|
};
|
|
8699
|
-
for (let
|
|
8700
|
-
|
|
8738
|
+
for (let k = 0; k < $ - 1; k++)
|
|
8739
|
+
b.push(M);
|
|
8701
8740
|
}
|
|
8702
|
-
}), v.splice(g.col, 1, ...
|
|
8741
|
+
}), v.splice(g.col, 1, ...b);
|
|
8703
8742
|
} else {
|
|
8704
8743
|
if (m > f && m < d) {
|
|
8705
8744
|
let y = findMaxLessThan(s, m);
|
|
8706
8745
|
if (y !== null) {
|
|
8707
8746
|
let E = r[y].slice(o.index, o.index + u);
|
|
8708
8747
|
E = E.map((w) => {
|
|
8709
|
-
let
|
|
8710
|
-
return Array.isArray(
|
|
8748
|
+
let C = w.colData;
|
|
8749
|
+
return Array.isArray(C) && (C = C[0]), {
|
|
8711
8750
|
...g,
|
|
8712
|
-
colData:
|
|
8751
|
+
colData: C,
|
|
8713
8752
|
colSpan: w.colSpan,
|
|
8714
8753
|
rowSpan: w.rowSpan
|
|
8715
8754
|
};
|
|
@@ -8721,35 +8760,35 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8721
8760
|
const y = getSeparatorKey("key", d);
|
|
8722
8761
|
let E = l[y] ? Array.from(l[y]) : [], w = g.data.replace("col:", "").toUpperCase();
|
|
8723
8762
|
if (g.isRowColCombine) {
|
|
8724
|
-
let
|
|
8725
|
-
E.forEach((D,
|
|
8763
|
+
let C = s.map((D) => a[D].data.replace("col:", "").toUpperCase()), $ = [];
|
|
8764
|
+
E.forEach((D, T) => {
|
|
8726
8765
|
let S = {
|
|
8727
8766
|
...g,
|
|
8728
|
-
combineKeys:
|
|
8767
|
+
combineKeys: C,
|
|
8729
8768
|
combineValues: l[D],
|
|
8730
|
-
colGroupIndex:
|
|
8769
|
+
colGroupIndex: T
|
|
8731
8770
|
};
|
|
8732
8771
|
$.push(S);
|
|
8733
8772
|
}), v.splice(g.col, 1, ...$);
|
|
8734
8773
|
} else if (E.length)
|
|
8735
|
-
E.forEach((
|
|
8774
|
+
E.forEach((C, $) => {
|
|
8736
8775
|
let D = [];
|
|
8737
|
-
const
|
|
8738
|
-
l[
|
|
8739
|
-
let
|
|
8776
|
+
const T = getSeparatorKey("data", C);
|
|
8777
|
+
l[T].forEach((I) => {
|
|
8778
|
+
let B = {
|
|
8740
8779
|
...g
|
|
8741
8780
|
};
|
|
8742
|
-
delete
|
|
8781
|
+
delete B.combineKeys, delete B.combineValues, delete B.isRowColCombine, I[w] !== void 0 ? (B.rawData = I[w], B.colData = I) : B.rawData = "", D.push(B);
|
|
8743
8782
|
}), v.splice(g.col, 1, ...D);
|
|
8744
8783
|
});
|
|
8745
8784
|
else {
|
|
8746
|
-
let
|
|
8785
|
+
let C = [];
|
|
8747
8786
|
i.forEach(($) => {
|
|
8748
8787
|
let D = {
|
|
8749
8788
|
...g
|
|
8750
8789
|
};
|
|
8751
|
-
delete D.combineKeys, delete D.combineValues, delete D.isRowColCombine, $[w] !== void 0 ? (D.rawData = $[w], D.colData = $) : D.rawData = "",
|
|
8752
|
-
}), v.splice(g.col, 1, ...
|
|
8790
|
+
delete D.combineKeys, delete D.combineValues, delete D.isRowColCombine, $[w] !== void 0 ? (D.rawData = $[w], D.colData = $) : D.rawData = "", C.push(D);
|
|
8791
|
+
}), v.splice(g.col, 1, ...C);
|
|
8753
8792
|
}
|
|
8754
8793
|
} else if (g.type === CellType.FUN && p && g.colSpan !== 0) {
|
|
8755
8794
|
let y = [];
|
|
@@ -8766,7 +8805,7 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8766
8805
|
colData: i[0]
|
|
8767
8806
|
};
|
|
8768
8807
|
if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
|
|
8769
|
-
let [
|
|
8808
|
+
let [C, $] = g.mergeTarget, D = r.reduce((T, S) => T.concat(S), []).filter((T) => T.row === C && T.col === $)[0];
|
|
8770
8809
|
D && (D.colSpan += u - 1);
|
|
8771
8810
|
} else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
|
|
8772
8811
|
const E = {
|
|
@@ -8888,11 +8927,11 @@ function getGroupData(t, e, r) {
|
|
|
8888
8927
|
const m = getSeparatorKey("child", u, p);
|
|
8889
8928
|
let _ = (n[m] || []).map((v) => {
|
|
8890
8929
|
if (c) {
|
|
8891
|
-
let
|
|
8892
|
-
|
|
8930
|
+
let b = v[c];
|
|
8931
|
+
b || (b = "[" + c + "]");
|
|
8893
8932
|
let y = !1;
|
|
8894
|
-
const E = getSeparatorKey("child", i, p,
|
|
8895
|
-
return n[E] ? n[E].push(v) : n[E] = [v], n[
|
|
8933
|
+
const E = getSeparatorKey("child", i, p, b), w = getSeparatorKey(p, b), C = getSeparatorKey("data", w);
|
|
8934
|
+
return n[E] ? n[E].push(v) : n[E] = [v], n[C] ? n[C].push(v) : n[C] = [v], n[s].has(w) || (y = !0), n[s].add(w), n[w] = n[p].concat([b]), y ? b : null;
|
|
8896
8935
|
}
|
|
8897
8936
|
}).filter((v) => !!v);
|
|
8898
8937
|
n[m] = _;
|
|
@@ -8944,54 +8983,54 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
8944
8983
|
let f = -1, p = null;
|
|
8945
8984
|
const m = [], g = new Array(o).fill(!1);
|
|
8946
8985
|
return t.forEach((_, v) => {
|
|
8947
|
-
let
|
|
8986
|
+
let b = u[v];
|
|
8948
8987
|
if (e.includes(_.col)) {
|
|
8949
8988
|
const y = getSeparatorKey("key", _.col);
|
|
8950
8989
|
let E = Array.from(n[y]), w = f;
|
|
8951
|
-
const
|
|
8990
|
+
const C = e.indexOf(_.col);
|
|
8952
8991
|
E.forEach(($, D) => {
|
|
8953
|
-
let
|
|
8954
|
-
v === s && (i || a) ?
|
|
8955
|
-
const S = n[$], I = S[S.length - 1],
|
|
8956
|
-
n[
|
|
8957
|
-
let
|
|
8992
|
+
let T;
|
|
8993
|
+
v === s && (i || a) ? T = 1 : T = getGroupMinChildrenLength(n, $, s, a, i);
|
|
8994
|
+
const S = n[$], I = S[S.length - 1], B = getSeparatorKey("data", $);
|
|
8995
|
+
n[B];
|
|
8996
|
+
let M = {
|
|
8958
8997
|
..._,
|
|
8959
8998
|
text: "",
|
|
8960
8999
|
index: D,
|
|
8961
|
-
rowSpan:
|
|
9000
|
+
rowSpan: T,
|
|
8962
9001
|
rawData: formatGroupText(I),
|
|
8963
|
-
groupLevel:
|
|
9002
|
+
groupLevel: C,
|
|
8964
9003
|
groupIndices: D,
|
|
8965
9004
|
groupChildIndex: 0,
|
|
8966
9005
|
computedType: ComputedType.loopRow
|
|
8967
9006
|
};
|
|
8968
|
-
|
|
8969
|
-
let
|
|
9007
|
+
b.push(M);
|
|
9008
|
+
let k = {
|
|
8970
9009
|
..._,
|
|
8971
9010
|
text: "",
|
|
8972
9011
|
rawData: formatGroupText(I),
|
|
8973
9012
|
colSpan: 0,
|
|
8974
9013
|
rowSpan: 0,
|
|
8975
|
-
groupLevel:
|
|
9014
|
+
groupLevel: C,
|
|
8976
9015
|
groupIndices: D,
|
|
8977
9016
|
computedType: ComputedType.loopRow,
|
|
8978
|
-
mergeTarget: [
|
|
9017
|
+
mergeTarget: [M.row, M.col]
|
|
8979
9018
|
};
|
|
8980
|
-
for (let
|
|
8981
|
-
let x = cloneDeep(
|
|
8982
|
-
x.index = w +
|
|
9019
|
+
for (let O = 0; O < T - 1; O++) {
|
|
9020
|
+
let x = cloneDeep(k);
|
|
9021
|
+
x.index = w + O + 1, x.groupChildIndex = O + 1, b.push(x);
|
|
8983
9022
|
}
|
|
8984
|
-
if (g[v] = !0, w +=
|
|
8985
|
-
let
|
|
8986
|
-
if (
|
|
8987
|
-
let R =
|
|
9023
|
+
if (g[v] = !0, w += T, M.loopGroupRowIndex !== void 0 && M.loopGroupRowIndex !== "" && !isNaN(M.loopGroupRowIndex)) {
|
|
9024
|
+
let O = cloneDeep(l[M.loopGroupRowIndex]), x = cloneDeep(c[M.loopGroupRowIndex]).map((R) => (R.type === CellType.FUN && R.fun && (R.groupIndices = D, R.groupLevel = C, R.computedType = ComputedType.loopGroup), R)), A = 0;
|
|
9025
|
+
if (C >= 0) {
|
|
9026
|
+
let R = C;
|
|
8988
9027
|
for (; R >= 0; ) {
|
|
8989
|
-
let
|
|
8990
|
-
|
|
9028
|
+
let L = e[R], V = u[L][w];
|
|
9029
|
+
V && V.groupIndices !== void 0 && !isNaN(V.groupIndices) && (A = A + V.groupIndices), R--;
|
|
8991
9030
|
}
|
|
8992
9031
|
}
|
|
8993
|
-
d.set(`${D}:${
|
|
8994
|
-
row:
|
|
9032
|
+
d.set(`${D}:${C}:${w}`, {
|
|
9033
|
+
row: O,
|
|
8995
9034
|
cells: x,
|
|
8996
9035
|
removeCount: A
|
|
8997
9036
|
});
|
|
@@ -9002,86 +9041,86 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9002
9041
|
if (_.isRowColCombine) {
|
|
9003
9042
|
const E = getSeparatorKey("key", s);
|
|
9004
9043
|
let w = n[E] ? Array.from(n[E]) : [];
|
|
9005
|
-
w.length ? w.forEach((
|
|
9006
|
-
const D = getSeparatorKey("child", s,
|
|
9007
|
-
let
|
|
9008
|
-
const
|
|
9044
|
+
w.length ? w.forEach((C, $) => {
|
|
9045
|
+
const D = getSeparatorKey("child", s, C);
|
|
9046
|
+
let T = n[D], S = _.combineKeys ? _.combineKeys.map((M, k) => {
|
|
9047
|
+
const O = _.combineValues ? _.combineValues[k] : void 0;
|
|
9009
9048
|
return {
|
|
9010
|
-
key:
|
|
9011
|
-
val:
|
|
9049
|
+
key: M,
|
|
9050
|
+
val: O
|
|
9012
9051
|
};
|
|
9013
9052
|
}) : [];
|
|
9014
|
-
const I =
|
|
9015
|
-
let
|
|
9053
|
+
const I = T.filter((M) => S.every((k) => M[k.key] === k.val));
|
|
9054
|
+
let B = {
|
|
9016
9055
|
..._,
|
|
9017
9056
|
index: $
|
|
9018
9057
|
};
|
|
9019
|
-
if (delete
|
|
9020
|
-
const
|
|
9021
|
-
|
|
9058
|
+
if (delete B.combineKeys, delete B.combineValues, delete B.isRowColCombine, I && I.length) {
|
|
9059
|
+
const M = I.map((k) => y ? k[y] : void 0);
|
|
9060
|
+
B.rawData = _.mergedValueAggregation ? aggregateMergedValues(M, _.mergedValueAggregation) : I[0][y], B.rowData = I[0];
|
|
9022
9061
|
} else
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
}) : r.forEach((
|
|
9026
|
-
let
|
|
9027
|
-
const
|
|
9062
|
+
B.rawData = "", B.rowData = {};
|
|
9063
|
+
b.push(B);
|
|
9064
|
+
}) : r.forEach((C, $) => {
|
|
9065
|
+
let T = (_.combineKeys ? _.combineKeys.map((I, B) => {
|
|
9066
|
+
const M = _.combineValues ? _.combineValues[B] : void 0;
|
|
9028
9067
|
return {
|
|
9029
9068
|
key: I,
|
|
9030
|
-
val:
|
|
9069
|
+
val: M
|
|
9031
9070
|
};
|
|
9032
|
-
}) : []).every((I) =>
|
|
9071
|
+
}) : []).every((I) => C[I.key] === I.val), S = {
|
|
9033
9072
|
..._,
|
|
9034
9073
|
index: $
|
|
9035
9074
|
};
|
|
9036
|
-
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine,
|
|
9075
|
+
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, T ? (S.rawData = y ? C[y] : "", S.rowData = C) : (S.rawData = "", S.rowData = C), S.type === CellType.FUN && S.fun && (S.computedType = ComputedType.loopRow), b.push(S);
|
|
9037
9076
|
});
|
|
9038
9077
|
} else if (e.length === 0)
|
|
9039
9078
|
r.forEach((E, w) => {
|
|
9040
|
-
let
|
|
9079
|
+
let C = {
|
|
9041
9080
|
index: w,
|
|
9042
9081
|
..._
|
|
9043
9082
|
};
|
|
9044
|
-
delete
|
|
9083
|
+
delete C.combineKeys, delete C.combineValues, delete C.isRowColCombine, y && E[y] !== void 0 ? C.rawData = E[y] : C.rawData = "", C.rowData = E, C.computedType = ComputedType.loopRow, b.push(C);
|
|
9045
9084
|
});
|
|
9046
9085
|
else {
|
|
9047
9086
|
const E = getSeparatorKey("key", s);
|
|
9048
9087
|
let w = n[E] ? Array.from(n[E]) : [];
|
|
9049
9088
|
if (w.length === 0) {
|
|
9050
9089
|
r.forEach(($, D) => {
|
|
9051
|
-
let
|
|
9090
|
+
let T = {
|
|
9052
9091
|
index: D,
|
|
9053
9092
|
..._
|
|
9054
9093
|
};
|
|
9055
|
-
delete
|
|
9094
|
+
delete T.combineKeys, delete T.combineValues, delete T.isRowColCombine, y && $[y] !== void 0 ? T.rawData = $[y] : T.rawData = "", T.rowData = $, T.computedType = ComputedType.loopRow, b.push(T);
|
|
9056
9095
|
});
|
|
9057
9096
|
return;
|
|
9058
9097
|
}
|
|
9059
|
-
const
|
|
9098
|
+
const C = [];
|
|
9060
9099
|
if (w.forEach(($, D) => {
|
|
9061
9100
|
if (a) {
|
|
9062
|
-
const
|
|
9063
|
-
let S = n[
|
|
9064
|
-
|
|
9101
|
+
const T = getSeparatorKey("child", s, $);
|
|
9102
|
+
let S = n[T] || [];
|
|
9103
|
+
C.push(S);
|
|
9065
9104
|
} else {
|
|
9066
|
-
const
|
|
9067
|
-
let S = n[
|
|
9105
|
+
const T = getSeparatorKey("child", s, $);
|
|
9106
|
+
let S = n[T] || [];
|
|
9068
9107
|
const I = i ? S.slice(0, 1) : S;
|
|
9069
|
-
S.length > 0 ? I.forEach((
|
|
9070
|
-
let
|
|
9108
|
+
S.length > 0 ? I.forEach((B) => {
|
|
9109
|
+
let M = {
|
|
9071
9110
|
index: D,
|
|
9072
9111
|
..._,
|
|
9073
9112
|
// 交叉表:函数格按当前行组聚合裂变列实例(供 jsep 按 groupIndices 过滤取值)
|
|
9074
9113
|
isCrossAggregate: i
|
|
9075
9114
|
};
|
|
9076
|
-
delete
|
|
9077
|
-
}) :
|
|
9115
|
+
delete M.combineKeys, delete M.combineValues, delete M.isRowColCombine, y && B && B[y] !== void 0 ? M.rawData = B[y] : M.rawData = "", M.rowData = B, M.computedType = ComputedType.loopRow, b.push(M);
|
|
9116
|
+
}) : b.push({
|
|
9078
9117
|
index: 0,
|
|
9079
9118
|
..._,
|
|
9080
9119
|
isCrossAggregate: i
|
|
9081
9120
|
});
|
|
9082
9121
|
}
|
|
9083
9122
|
}), a) {
|
|
9084
|
-
const $ = Math.max(...
|
|
9123
|
+
const $ = Math.max(...C.map((T) => T.length));
|
|
9085
9124
|
p || (p = {
|
|
9086
9125
|
count: $,
|
|
9087
9126
|
row: _.row,
|
|
@@ -9090,7 +9129,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9090
9129
|
const D = {
|
|
9091
9130
|
colIndex: v,
|
|
9092
9131
|
maxCount: $,
|
|
9093
|
-
groupColumnLoopItems:
|
|
9132
|
+
groupColumnLoopItems: C,
|
|
9094
9133
|
dataKey: _.data ? _.data.replace("row:", "").toUpperCase() : void 0,
|
|
9095
9134
|
cell: _
|
|
9096
9135
|
};
|
|
@@ -9104,8 +9143,8 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9104
9143
|
index: 0
|
|
9105
9144
|
};
|
|
9106
9145
|
if (_.rowSpan === 0 && _.mergeTarget && _.mergeTarget.length === 2) {
|
|
9107
|
-
let [$, D] = _.mergeTarget,
|
|
9108
|
-
|
|
9146
|
+
let [$, D] = _.mergeTarget, T = c.reduce((S, I) => S.concat(I), []).filter((S) => S.row === $ && S.col === D)[0];
|
|
9147
|
+
T && (T.rowSpan += o - 1);
|
|
9109
9148
|
} else
|
|
9110
9149
|
E.rowSpan += o - 1;
|
|
9111
9150
|
const w = {
|
|
@@ -9115,24 +9154,24 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9115
9154
|
mergeTarget: [E.row, E.col]
|
|
9116
9155
|
};
|
|
9117
9156
|
delete E.isRowColCombine;
|
|
9118
|
-
let
|
|
9119
|
-
|
|
9157
|
+
let C = Array.from({ length: o - 1 }, () => cloneDeep(w));
|
|
9158
|
+
b.push(E, ...C);
|
|
9120
9159
|
} else if ((i || a) && e.length > 0) {
|
|
9121
9160
|
const E = getSeparatorKey("key", s);
|
|
9122
|
-
(n[E] ? Array.from(n[E]) : []).forEach((
|
|
9123
|
-
const D = getSeparatorKey("data",
|
|
9124
|
-
|
|
9161
|
+
(n[E] ? Array.from(n[E]) : []).forEach((C, $) => {
|
|
9162
|
+
const D = getSeparatorKey("data", C), T = n[D];
|
|
9163
|
+
b.push({
|
|
9125
9164
|
index: $,
|
|
9126
9165
|
..._,
|
|
9127
9166
|
computedType: ComputedType.loopRow,
|
|
9128
9167
|
rowSpan: 1,
|
|
9129
9168
|
colSpan: 1,
|
|
9130
|
-
rowData:
|
|
9169
|
+
rowData: T ? T[0] : void 0
|
|
9131
9170
|
});
|
|
9132
9171
|
});
|
|
9133
9172
|
} else if (e.length > 0)
|
|
9134
9173
|
for (let E = 0; E < o; E++)
|
|
9135
|
-
|
|
9174
|
+
b.push({
|
|
9136
9175
|
index: E,
|
|
9137
9176
|
..._,
|
|
9138
9177
|
computedType: ComputedType.loopRow,
|
|
@@ -9142,7 +9181,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9142
9181
|
});
|
|
9143
9182
|
else
|
|
9144
9183
|
r.forEach((E, w) => {
|
|
9145
|
-
|
|
9184
|
+
b.push({
|
|
9146
9185
|
index: w,
|
|
9147
9186
|
..._,
|
|
9148
9187
|
computedType: ComputedType.loopRow,
|
|
@@ -9151,17 +9190,17 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9151
9190
|
rowData: E
|
|
9152
9191
|
});
|
|
9153
9192
|
});
|
|
9154
|
-
}), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: v, cell:
|
|
9193
|
+
}), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: v, cell: b, groupColumnLoopItems: y, dataKey: E }) => {
|
|
9155
9194
|
for (let w = 0; w < v; w++) {
|
|
9156
|
-
const
|
|
9195
|
+
const C = [];
|
|
9157
9196
|
y.forEach(($, D) => {
|
|
9158
|
-
const
|
|
9197
|
+
const T = $[w];
|
|
9159
9198
|
let S = {
|
|
9160
9199
|
index: D,
|
|
9161
|
-
...
|
|
9200
|
+
...b
|
|
9162
9201
|
};
|
|
9163
|
-
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, E &&
|
|
9164
|
-
}), w === 0 ? u[_] =
|
|
9202
|
+
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, E && T && T[E] !== void 0 ? (S.rawData = T[E], S.rowData = T) : (S.rawData = "", S.rowData = T || {}), S.computedType = ComputedType.loopRow, C.push(S);
|
|
9203
|
+
}), w === 0 ? u[_] = C : u.splice(_ + w, 0, C);
|
|
9165
9204
|
}
|
|
9166
9205
|
}), {
|
|
9167
9206
|
rowBaseCols: u,
|
|
@@ -9181,62 +9220,62 @@ function loopGroupRows(t, e, r, n, o) {
|
|
|
9181
9220
|
const v = {
|
|
9182
9221
|
...s,
|
|
9183
9222
|
loop: !1
|
|
9184
|
-
},
|
|
9185
|
-
let
|
|
9186
|
-
if (
|
|
9187
|
-
|
|
9188
|
-
}), E.forEach(({ row: $, cells: D, removeCount:
|
|
9189
|
-
let [I,
|
|
9223
|
+
}, b = [], { rowBaseCols: y, loopGroupRows: E, groupColumnLoopData: w } = generateRowStructure(u, d, l, f, p, m, g, _, t, r);
|
|
9224
|
+
let C = transpose(y);
|
|
9225
|
+
if (C.forEach(() => {
|
|
9226
|
+
b.push(cloneDeep(v));
|
|
9227
|
+
}), E.forEach(({ row: $, cells: D, removeCount: T }, S) => {
|
|
9228
|
+
let [I, B, M] = S.split(":").map((A) => parseInt(A));
|
|
9190
9229
|
$.isLoopGroupComputed = !1;
|
|
9191
|
-
const
|
|
9192
|
-
let
|
|
9230
|
+
const k = M + T;
|
|
9231
|
+
let O = C[k];
|
|
9193
9232
|
D = D.map((A, R) => {
|
|
9194
|
-
let
|
|
9195
|
-
if (R <
|
|
9196
|
-
let
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9233
|
+
let L = O[R];
|
|
9234
|
+
if (R < B) {
|
|
9235
|
+
let j = [];
|
|
9236
|
+
C.forEach((Z, Q) => {
|
|
9237
|
+
Q <= k && Z.forEach((re, oe) => {
|
|
9238
|
+
oe === R && re.rowSpan >= 1 && ["", "field"].includes(re.type) && j.push(Q);
|
|
9200
9239
|
});
|
|
9201
9240
|
});
|
|
9202
|
-
let
|
|
9203
|
-
|
|
9204
|
-
} else if (
|
|
9205
|
-
let
|
|
9206
|
-
|
|
9241
|
+
let V = Math.max(...j), X = C[V][R];
|
|
9242
|
+
X && (X.rowSpan += 1, A.mergeTarget = [X.row, X.col]), A.rowSpan = 0, A.colSpan = 0;
|
|
9243
|
+
} else if (L && L.type === CellType.TEXT) {
|
|
9244
|
+
let j = C[0][R];
|
|
9245
|
+
j.rowSpan += 1, A.rowSpan = 0, A.colSpan = 0, A.mergeTarget = [j.row, j.col];
|
|
9207
9246
|
}
|
|
9208
|
-
return A.type === CellType.FUN && A.fun && (A.computedType = ComputedType.loopGroup), A.isGroup =
|
|
9247
|
+
return A.type === CellType.FUN && A.fun && (A.computedType = ComputedType.loopGroup), A.isGroup = L ? !!L.isGroup : !1, A.groupIndices = L ? L.groupIndices : !1, A.linkedMergeCell = L ? !!L.linkedMergeCell : !1, A.linkedColIndex = L ? L.linkedColIndex : { rowSpan: 1, colSpan: 1 }, A.isLoopGroupComputedCell = !0, A;
|
|
9209
9248
|
});
|
|
9210
|
-
const x =
|
|
9211
|
-
|
|
9212
|
-
}),
|
|
9213
|
-
let
|
|
9249
|
+
const x = k + 1;
|
|
9250
|
+
b.splice(x, 0, $), C.splice(x, 0, D);
|
|
9251
|
+
}), C = mergeSameCells(C), C.forEach(($, D) => {
|
|
9252
|
+
let T = [];
|
|
9214
9253
|
$.forEach((S) => {
|
|
9215
|
-
S && S.groupIndices !== void 0 && !isNaN(S.groupIndices) &&
|
|
9216
|
-
}),
|
|
9217
|
-
S && (S.groupIndices =
|
|
9254
|
+
S && S.groupIndices !== void 0 && !isNaN(S.groupIndices) && T.push(S.groupIndices);
|
|
9255
|
+
}), T.length > 0 && $.forEach((S) => {
|
|
9256
|
+
S && (S.groupIndices = T);
|
|
9218
9257
|
});
|
|
9219
|
-
}), t.splice(c, 1, ...
|
|
9220
|
-
const { index: $, count: D } = w,
|
|
9221
|
-
for (let
|
|
9222
|
-
S.push(cloneDeep(
|
|
9258
|
+
}), t.splice(c, 1, ...b), r.splice(c, 1, ...C), w) {
|
|
9259
|
+
const { index: $, count: D } = w, T = n[$], S = [];
|
|
9260
|
+
for (let B = 0; B < D; B++)
|
|
9261
|
+
S.push(cloneDeep(T));
|
|
9223
9262
|
n.splice($, 1, ...S);
|
|
9224
|
-
for (let
|
|
9225
|
-
const
|
|
9226
|
-
for (let
|
|
9227
|
-
const x = cloneDeep(
|
|
9228
|
-
|
|
9263
|
+
for (let B = 0; B < c; B++) {
|
|
9264
|
+
const M = r[B], k = [];
|
|
9265
|
+
for (let O = 0; O < D; O++) {
|
|
9266
|
+
const x = cloneDeep(M[$]);
|
|
9267
|
+
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), k.push(x);
|
|
9229
9268
|
}
|
|
9230
|
-
|
|
9269
|
+
M.splice($, M.length - $, ...k);
|
|
9231
9270
|
}
|
|
9232
|
-
const I = c +
|
|
9233
|
-
for (let
|
|
9234
|
-
const
|
|
9235
|
-
for (let
|
|
9236
|
-
const x = cloneDeep(
|
|
9237
|
-
|
|
9271
|
+
const I = c + C.length;
|
|
9272
|
+
for (let B = I; B < r.length; B++) {
|
|
9273
|
+
const M = r[B], k = [];
|
|
9274
|
+
for (let O = 0; O < D; O++) {
|
|
9275
|
+
const x = cloneDeep(M[$]);
|
|
9276
|
+
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), k.push(x);
|
|
9238
9277
|
}
|
|
9239
|
-
|
|
9278
|
+
M.splice($, M.length - $, ...k);
|
|
9240
9279
|
}
|
|
9241
9280
|
}
|
|
9242
9281
|
}
|
|
@@ -9557,45 +9596,45 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9557
9596
|
var g, _;
|
|
9558
9597
|
let { config: f, colConfig: p, rowConfig: m } = u;
|
|
9559
9598
|
for (let v = 0; v < f.length; v++) {
|
|
9560
|
-
const
|
|
9561
|
-
if (
|
|
9599
|
+
const b = m[v];
|
|
9600
|
+
if (b && b.isHidden)
|
|
9562
9601
|
continue;
|
|
9563
9602
|
const y = p.filter(($) => $.isHidden).map(($) => $.index), E = f[v].filter(($) => !y.includes($.col));
|
|
9564
9603
|
let w = E.map(($) => $.text);
|
|
9565
9604
|
v > 0 ? a.addRow(w) : l === 0 ? a.getRow(1).values = w : a.addRow(w);
|
|
9566
|
-
const
|
|
9567
|
-
|
|
9605
|
+
const C = a.getRow(l + v + 1);
|
|
9606
|
+
b && b.size && !isNaN(b.size) ? b.size > 0 ? C.height = b.size < 25 ? 25 : b.size : C.hidden = !0 : C.height = 25;
|
|
9568
9607
|
for (let $ = 0; $ < E.length; $++) {
|
|
9569
|
-
const D = E[$],
|
|
9570
|
-
let { style: S, col: I, row:
|
|
9608
|
+
const D = E[$], T = C.getCell($ + 1);
|
|
9609
|
+
let { style: S, col: I, row: B, colSpan: M, rowSpan: k, format: O, formatType: x } = D;
|
|
9571
9610
|
const A = {};
|
|
9572
9611
|
if (S && S.color && (A.color = {
|
|
9573
9612
|
argb: "FF" + ((g = S.color) == null ? void 0 : g.replace("#", ""))
|
|
9574
|
-
}), S && S.fontSize && (A.size = S.fontSize), S && S.fontFamily && (A.name = S.fontFamily), S && S.fontWeight && S.fontWeight === "bold" && (A.bold = !0),
|
|
9575
|
-
const
|
|
9576
|
-
if (
|
|
9577
|
-
const
|
|
9578
|
-
if (!(!
|
|
9613
|
+
}), S && S.fontSize && (A.size = S.fontSize), S && S.fontFamily && (A.name = S.fontFamily), S && S.fontWeight && S.fontWeight === "bold" && (A.bold = !0), T.font = A, S && S.border) {
|
|
9614
|
+
const V = normalizeBorder(S.border);
|
|
9615
|
+
if (V) {
|
|
9616
|
+
const X = themeColors[r] || "#333333", Z = (Q) => {
|
|
9617
|
+
if (!(!Q || !Q.style || Q.style === "none"))
|
|
9579
9618
|
return {
|
|
9580
|
-
style:
|
|
9581
|
-
color: { argb: "FF" + (
|
|
9619
|
+
style: Q.style,
|
|
9620
|
+
color: { argb: "FF" + (Q.color || X).replace("#", "") }
|
|
9582
9621
|
};
|
|
9583
9622
|
};
|
|
9584
|
-
|
|
9585
|
-
top:
|
|
9586
|
-
left:
|
|
9587
|
-
bottom:
|
|
9588
|
-
right:
|
|
9623
|
+
T.border = {
|
|
9624
|
+
top: Z(V.top),
|
|
9625
|
+
left: Z(V.left),
|
|
9626
|
+
bottom: Z(V.bottom),
|
|
9627
|
+
right: Z(V.right)
|
|
9589
9628
|
};
|
|
9590
9629
|
}
|
|
9591
|
-
} else (!S || S.border !== !1) && (
|
|
9630
|
+
} else (!S || S.border !== !1) && (T.border = {
|
|
9592
9631
|
top: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9593
9632
|
left: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9594
9633
|
bottom: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9595
9634
|
right: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } }
|
|
9596
9635
|
});
|
|
9597
9636
|
if (S && S.backgroundColor)
|
|
9598
|
-
|
|
9637
|
+
T.fill = {
|
|
9599
9638
|
type: "pattern",
|
|
9600
9639
|
pattern: "solid",
|
|
9601
9640
|
fgColor: {
|
|
@@ -9603,12 +9642,12 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9603
9642
|
}
|
|
9604
9643
|
};
|
|
9605
9644
|
else {
|
|
9606
|
-
const
|
|
9607
|
-
|
|
9645
|
+
const V = `${r}${v % 2}`;
|
|
9646
|
+
T.fill = {
|
|
9608
9647
|
type: "pattern",
|
|
9609
9648
|
pattern: "solid",
|
|
9610
9649
|
fgColor: {
|
|
9611
|
-
argb: "FF" + themeColors[
|
|
9650
|
+
argb: "FF" + themeColors[V].replace("#", "")
|
|
9612
9651
|
}
|
|
9613
9652
|
};
|
|
9614
9653
|
}
|
|
@@ -9617,16 +9656,16 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9617
9656
|
horizontal: "center",
|
|
9618
9657
|
wrapText: !0
|
|
9619
9658
|
};
|
|
9620
|
-
S && S.textAlign && (R.horizontal = S.textAlign), S && S.verticalAlign && (R.vertical = S.verticalAlign === "center" ? "middle" : S.verticalAlign),
|
|
9621
|
-
const
|
|
9622
|
-
if (
|
|
9623
|
-
const
|
|
9624
|
-
let
|
|
9625
|
-
|
|
9659
|
+
S && S.textAlign && (R.horizontal = S.textAlign), S && S.verticalAlign && (R.vertical = S.verticalAlign === "center" ? "middle" : S.verticalAlign), T.alignment = R;
|
|
9660
|
+
const L = k && !isNaN(k) && k > 1, j = M && !isNaN(M) && M > 1;
|
|
9661
|
+
if (L || j) {
|
|
9662
|
+
const V = l + v + 1, X = $ + 1;
|
|
9663
|
+
let Z = V, Q = X;
|
|
9664
|
+
V && (Z += k - 1), X && (Q += M - 1), s.push([V, X, Z, Q]);
|
|
9626
9665
|
}
|
|
9627
|
-
if (
|
|
9628
|
-
let
|
|
9629
|
-
x && (x.numberUseGrouping && (
|
|
9666
|
+
if (O && O === "number") {
|
|
9667
|
+
let V = "", X = "";
|
|
9668
|
+
x && (x.numberUseGrouping && (V = x.numberUseGrouping), x.numberDecimal && (X = x.numberDecimal)), T.numFmt = generateNumFmt(V, X), T.value = Number(D.text);
|
|
9630
9669
|
}
|
|
9631
9670
|
}
|
|
9632
9671
|
}
|
|
@@ -9729,56 +9768,58 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9729
9768
|
},
|
|
9730
9769
|
emits: ["updateData", "report-error"],
|
|
9731
9770
|
setup(t, { expose: e, emit: r }) {
|
|
9732
|
-
useCssVars((
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9771
|
+
useCssVars((G) => ({
|
|
9772
|
+
v30d8426c: _.value.border,
|
|
9773
|
+
v6d8d40cc: _.value.background,
|
|
9774
|
+
v52e4b686: _.value.evenBackground,
|
|
9775
|
+
v36ae0238: _.value.fixedBackground,
|
|
9776
|
+
v3b43a89e: _.value.fixedEvenBackground,
|
|
9777
|
+
v2b0e46ac: _.value.hoverBackground,
|
|
9778
|
+
bd1c87c2: _.value.activeColor
|
|
9740
9779
|
}));
|
|
9741
9780
|
const n = t, o = r, i = inject(
|
|
9742
9781
|
"isPrintMode",
|
|
9743
9782
|
computed(() => !1)
|
|
9744
|
-
), a = inject("printConfig", void 0), s = ref(), l = ref(), c = ref()
|
|
9783
|
+
), a = inject("printConfig", void 0), s = ref(), l = ref(), c = ref();
|
|
9784
|
+
let u = null, d = null, f = null;
|
|
9785
|
+
const p = shallowRef([]), m = shallowRef([]), g = computed(() => {
|
|
9745
9786
|
if (i.value && (a != null && a.value)) {
|
|
9746
|
-
const
|
|
9787
|
+
const G = a.value;
|
|
9747
9788
|
return {
|
|
9748
|
-
width: `${mmToPx(
|
|
9749
|
-
padding: `${n.index === 0 ? mmToPx(
|
|
9789
|
+
width: `${mmToPx(G.width)}px`,
|
|
9790
|
+
padding: `${n.index === 0 ? mmToPx(G.marginTop) : 0}px ${mmToPx(G.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(G.marginBottom) : 0}px ${mmToPx(G.marginLeft)}px`
|
|
9750
9791
|
};
|
|
9751
9792
|
}
|
|
9752
9793
|
return {
|
|
9753
9794
|
width: n.config.widthType === "%" ? `calc(${n.config.width}% - 10px)` : `${n.config.width - 10}px`,
|
|
9754
9795
|
height: n.config.fullHeight ? "calc(100% - 8px)" : `${n.config.height}px`
|
|
9755
9796
|
};
|
|
9756
|
-
}),
|
|
9797
|
+
}), _ = computed(() => getThemeColors(n.config.theme || "none")), v = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), b = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.length > 0), y = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((G) => G.isShow).length > 0), E = reactive({
|
|
9757
9798
|
pageSize: 100,
|
|
9758
9799
|
pageSizes: [10, 20, 50, 100, 200, 1e4],
|
|
9759
9800
|
pageIndex: 1,
|
|
9760
9801
|
total: 0
|
|
9761
|
-
}),
|
|
9762
|
-
let
|
|
9763
|
-
if (
|
|
9764
|
-
let
|
|
9765
|
-
|
|
9802
|
+
}), w = ref([]), C = ref([]), $ = (G) => {
|
|
9803
|
+
let U = 0, H = G;
|
|
9804
|
+
if (G.includes("!")) {
|
|
9805
|
+
let N = G.split("!");
|
|
9806
|
+
U = parseInt(N[0]), H = N[1];
|
|
9766
9807
|
}
|
|
9767
|
-
let
|
|
9768
|
-
|
|
9808
|
+
let q = H.match(/[A-Z]+/)[0], Y = H.match(/\d+/)[0] - 1, K = columnToNumber(q), ee = `${U}:${Y}:${K}`;
|
|
9809
|
+
C.value.includes(ee) || C.value.push(ee);
|
|
9769
9810
|
};
|
|
9770
|
-
function
|
|
9771
|
-
if (
|
|
9772
|
-
return
|
|
9773
|
-
|
|
9811
|
+
function D(G) {
|
|
9812
|
+
if (S && n.config.data.autoQuery === !1)
|
|
9813
|
+
return S = !1, !1;
|
|
9814
|
+
w.value = G, E.pageIndex = 1, X();
|
|
9774
9815
|
}
|
|
9775
|
-
let
|
|
9816
|
+
let T = !1, S = !0;
|
|
9776
9817
|
watch(
|
|
9777
|
-
() => [
|
|
9778
|
-
(
|
|
9779
|
-
if (
|
|
9780
|
-
let [
|
|
9781
|
-
|
|
9818
|
+
() => [E.pageSize, E.pageIndex],
|
|
9819
|
+
(G, U) => {
|
|
9820
|
+
if (G && U) {
|
|
9821
|
+
let [H, q] = G, [Y, K] = G;
|
|
9822
|
+
H !== Y && (E.pageIndex = 1), T && X();
|
|
9782
9823
|
}
|
|
9783
9824
|
},
|
|
9784
9825
|
{
|
|
@@ -9786,315 +9827,348 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9786
9827
|
deep: !0
|
|
9787
9828
|
}
|
|
9788
9829
|
);
|
|
9789
|
-
function
|
|
9790
|
-
var
|
|
9791
|
-
(
|
|
9792
|
-
}
|
|
9793
|
-
const
|
|
9794
|
-
async function
|
|
9795
|
-
if (
|
|
9796
|
-
let
|
|
9797
|
-
|
|
9830
|
+
function I() {
|
|
9831
|
+
var G;
|
|
9832
|
+
(G = s.value) == null || G.changeValue();
|
|
9833
|
+
}
|
|
9834
|
+
const B = computed(() => n.config.exportMethod === "send" && window.opener), M = computed(() => B.value ? "保存" : "导出");
|
|
9835
|
+
async function k() {
|
|
9836
|
+
if (p.value && p.value.length) {
|
|
9837
|
+
let G = await exportReport(
|
|
9838
|
+
p.value,
|
|
9798
9839
|
n.name,
|
|
9799
9840
|
"excel",
|
|
9800
9841
|
n.config.theme,
|
|
9801
9842
|
n.config.subReprotIndex
|
|
9802
9843
|
);
|
|
9803
|
-
if (
|
|
9844
|
+
if (G === null) {
|
|
9804
9845
|
await ElMessageBox.alert("表格导出失败");
|
|
9805
9846
|
return;
|
|
9806
9847
|
}
|
|
9807
|
-
n.config.exportMethod === "send" && window.opener ? sendReport(
|
|
9848
|
+
n.config.exportMethod === "send" && window.opener ? sendReport(G) : downloadReport(G, n.name, "excel");
|
|
9808
9849
|
} else
|
|
9809
9850
|
ElMessage.success("配置未完成!");
|
|
9810
9851
|
}
|
|
9811
|
-
async function
|
|
9852
|
+
async function O() {
|
|
9812
9853
|
if (n.config && c.value && n.config.data.source) {
|
|
9813
|
-
let
|
|
9854
|
+
let G = [];
|
|
9814
9855
|
try {
|
|
9815
|
-
|
|
9816
|
-
} catch (
|
|
9856
|
+
G = await le(!0);
|
|
9857
|
+
} catch (Y) {
|
|
9817
9858
|
o("report-error", {
|
|
9818
9859
|
index: n.index,
|
|
9819
|
-
message: getErrorMessage(
|
|
9860
|
+
message: getErrorMessage(Y)
|
|
9820
9861
|
});
|
|
9821
9862
|
return;
|
|
9822
9863
|
}
|
|
9823
|
-
let
|
|
9824
|
-
n.config.data.processData && (
|
|
9864
|
+
let U = oe(G);
|
|
9865
|
+
if (n.config.data.processData && (U = await getProcessData(
|
|
9825
9866
|
n.config.data.processData,
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
))
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
const
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9867
|
+
U,
|
|
9868
|
+
w.value,
|
|
9869
|
+
E
|
|
9870
|
+
)), u && u.order !== "none") {
|
|
9871
|
+
const Y = U[u.key];
|
|
9872
|
+
Array.isArray(Y) && (U[u.key] = sortRowsByField(Y, u.field, u.order, u.numeric));
|
|
9873
|
+
}
|
|
9874
|
+
let H = [];
|
|
9875
|
+
const q = [];
|
|
9876
|
+
for (let Y = 0; Y < n.config.tableConfig.length; Y++) {
|
|
9877
|
+
const K = n.config.tableConfig[Y];
|
|
9878
|
+
let { rowConfig: ee, colConfig: N, config: F } = cloneDeep(K), z = getLoopItem(N, U, "col", F), J = getLoopItem(ee, U, "row", F);
|
|
9879
|
+
z.length && loopGroupCols(N, z, F, U), J.length && loopGroupRows(ee, J, F, N, U);
|
|
9880
|
+
const W = transformArrayToObject(U, n.config.data.source);
|
|
9881
|
+
computeCell(F, W, void 0, Y), H.push({
|
|
9882
|
+
config: F,
|
|
9883
|
+
rowConfig: ee,
|
|
9884
|
+
colConfig: N
|
|
9885
|
+
}), q.push({ config: F });
|
|
9842
9886
|
}
|
|
9843
|
-
if (await preGenerateBarcodes(
|
|
9844
|
-
let
|
|
9845
|
-
|
|
9887
|
+
if (await preGenerateBarcodes(q), H && H.length) {
|
|
9888
|
+
let Y = await exportReport(
|
|
9889
|
+
H,
|
|
9846
9890
|
n.name,
|
|
9847
9891
|
"excel",
|
|
9848
9892
|
n.config.theme,
|
|
9849
9893
|
n.config.subReprotIndex
|
|
9850
9894
|
);
|
|
9851
|
-
if (
|
|
9895
|
+
if (Y === null) {
|
|
9852
9896
|
await ElMessageBox.alert("表格导出失败");
|
|
9853
9897
|
return;
|
|
9854
9898
|
}
|
|
9855
|
-
n.config.exportMethod === "send" && window.opener ? sendReport(
|
|
9899
|
+
n.config.exportMethod === "send" && window.opener ? sendReport(Y) : downloadReport(Y, n.name, "excel");
|
|
9856
9900
|
} else
|
|
9857
9901
|
ElMessage.warning("当前报表没有可导出的数据");
|
|
9858
9902
|
} else
|
|
9859
9903
|
ElMessage.warning("当前报表没有可导出的数据");
|
|
9860
9904
|
}
|
|
9861
|
-
const
|
|
9862
|
-
async function
|
|
9863
|
-
let
|
|
9864
|
-
|
|
9865
|
-
const
|
|
9866
|
-
return computeCell(K,
|
|
9867
|
-
reportConfig: { config: K, rowConfig:
|
|
9868
|
-
hasLoop:
|
|
9905
|
+
const x = ref(!1), A = ref(!1);
|
|
9906
|
+
async function R(G, U) {
|
|
9907
|
+
let H = !1, { rowConfig: q, colConfig: Y, config: K } = cloneDeep(G), ee = getLoopItem(Y, U, "col", K), N = getLoopItem(q, U, "row", K);
|
|
9908
|
+
ee.length && (H = !0, loopGroupCols(Y, ee, K, U)), N.length && (H = !0, loopGroupRows(q, N, K, Y, U));
|
|
9909
|
+
const F = transformArrayToObject(U, n.config.data.source);
|
|
9910
|
+
return computeCell(K, F, C.value), await preGenerateBarcodes([{ config: K }]), {
|
|
9911
|
+
reportConfig: { config: K, rowConfig: q, colConfig: Y },
|
|
9912
|
+
hasLoop: H
|
|
9869
9913
|
};
|
|
9870
9914
|
}
|
|
9871
|
-
async function
|
|
9872
|
-
const
|
|
9873
|
-
if (!(!Array.isArray(
|
|
9874
|
-
|
|
9875
|
-
for (const
|
|
9876
|
-
const
|
|
9877
|
-
for (const
|
|
9878
|
-
const { reportConfig:
|
|
9879
|
-
K.push(
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9915
|
+
async function L(G, U) {
|
|
9916
|
+
const H = G[U];
|
|
9917
|
+
if (!(!Array.isArray(H) || H.length === 0)) {
|
|
9918
|
+
m.value = [], l.value.innerHTML = "";
|
|
9919
|
+
for (const q of H) {
|
|
9920
|
+
const Y = { ...G, ...q, [U]: [q] }, K = [];
|
|
9921
|
+
for (const ee of n.config.tableConfig) {
|
|
9922
|
+
const { reportConfig: N, hasLoop: F } = await R(ee, Y);
|
|
9923
|
+
K.push(N), renderReportByDom(
|
|
9924
|
+
N.rowConfig,
|
|
9925
|
+
N.colConfig,
|
|
9926
|
+
N.config,
|
|
9883
9927
|
l,
|
|
9884
|
-
|
|
9885
|
-
|
|
9928
|
+
F,
|
|
9929
|
+
_.value.border
|
|
9886
9930
|
);
|
|
9887
9931
|
}
|
|
9888
|
-
|
|
9932
|
+
m.value.push(K);
|
|
9889
9933
|
}
|
|
9890
9934
|
}
|
|
9891
9935
|
}
|
|
9892
|
-
async function
|
|
9936
|
+
async function j(G) {
|
|
9893
9937
|
if (n.config && c.value)
|
|
9894
|
-
if (console.time("renderReport"),
|
|
9938
|
+
if (console.time("renderReport"), p.value = [], A.value = !!n.config.tableConfig, A.value) {
|
|
9895
9939
|
l.value.innerHTML = "";
|
|
9896
|
-
const
|
|
9897
|
-
for (let
|
|
9898
|
-
const
|
|
9899
|
-
let
|
|
9900
|
-
|
|
9901
|
-
const
|
|
9902
|
-
computeCell(
|
|
9903
|
-
config:
|
|
9940
|
+
const U = [];
|
|
9941
|
+
for (let H = 0; H < n.config.tableConfig.length; H++) {
|
|
9942
|
+
const q = n.config.tableConfig[H];
|
|
9943
|
+
let Y = !1, { rowConfig: K, colConfig: ee, config: N } = cloneDeep(q), F = getLoopItem(ee, G, "col", N), z = getLoopItem(K, G, "row", N);
|
|
9944
|
+
F.length && (Y = !0, loopGroupCols(ee, F, N, G)), z.length && (Y = !0, loopGroupRows(K, z, N, ee, G));
|
|
9945
|
+
const J = transformArrayToObject(G, n.config.data.source);
|
|
9946
|
+
computeCell(N, J, C.value, H), U.push({ config: N, rowConfig: K, colConfig: ee, hasLoop: Y }), p.value.push({
|
|
9947
|
+
config: N,
|
|
9904
9948
|
rowConfig: K,
|
|
9905
|
-
colConfig:
|
|
9949
|
+
colConfig: ee
|
|
9906
9950
|
});
|
|
9907
9951
|
}
|
|
9908
|
-
await preGenerateBarcodes(
|
|
9909
|
-
renderReportByDom(
|
|
9952
|
+
await preGenerateBarcodes(U), U.forEach((H) => {
|
|
9953
|
+
renderReportByDom(H.rowConfig, H.colConfig, H.config, l, H.hasLoop, _.value.border);
|
|
9910
9954
|
}), console.timeEnd("renderReport"), nextTick(() => {
|
|
9911
|
-
const
|
|
9912
|
-
let
|
|
9913
|
-
if (
|
|
9914
|
-
const K =
|
|
9955
|
+
const H = l.value.querySelectorAll(".yh-report-table-context");
|
|
9956
|
+
let q = 0;
|
|
9957
|
+
if (H.forEach((Y) => {
|
|
9958
|
+
const K = Y.querySelector("table");
|
|
9915
9959
|
if (K) {
|
|
9916
|
-
const
|
|
9917
|
-
(
|
|
9960
|
+
const ee = K.querySelectorAll("colgroup col"), N = Array.from(ee).reduce(
|
|
9961
|
+
(F, z) => F + parseInt(z.style.width || "80", 10),
|
|
9918
9962
|
0
|
|
9919
9963
|
);
|
|
9920
|
-
|
|
9964
|
+
q = Math.max(q, N);
|
|
9921
9965
|
}
|
|
9922
|
-
}),
|
|
9923
|
-
const
|
|
9966
|
+
}), q > 0) {
|
|
9967
|
+
const Y = l.value;
|
|
9924
9968
|
let K = 0;
|
|
9925
|
-
if (
|
|
9926
|
-
const
|
|
9927
|
-
K =
|
|
9969
|
+
if (Y) {
|
|
9970
|
+
const ee = getComputedStyle(Y);
|
|
9971
|
+
K = Y.clientWidth - parseFloat(ee.paddingLeft || "0") - parseFloat(ee.paddingRight || "0");
|
|
9928
9972
|
}
|
|
9929
|
-
K > 0 && (
|
|
9930
|
-
const
|
|
9931
|
-
if (
|
|
9932
|
-
const
|
|
9933
|
-
(
|
|
9973
|
+
K > 0 && (q = Math.max(q, K)), H.forEach((ee) => {
|
|
9974
|
+
const N = ee.querySelector("table");
|
|
9975
|
+
if (N) {
|
|
9976
|
+
const F = N.querySelectorAll("colgroup col"), z = Array.from(F).reduce(
|
|
9977
|
+
(J, W) => J + parseInt(W.style.width || "80", 10),
|
|
9934
9978
|
0
|
|
9935
9979
|
);
|
|
9936
|
-
if (
|
|
9937
|
-
const
|
|
9938
|
-
|
|
9939
|
-
const
|
|
9940
|
-
|
|
9980
|
+
if (z > 0 && z < q) {
|
|
9981
|
+
const J = q / z;
|
|
9982
|
+
F.forEach((ne) => {
|
|
9983
|
+
const te = parseInt(ne.style.width || "80", 10);
|
|
9984
|
+
ne.style.width = `${Math.round(te * J)}px`;
|
|
9941
9985
|
});
|
|
9942
|
-
const
|
|
9943
|
-
(
|
|
9986
|
+
const W = Array.from(F).map(
|
|
9987
|
+
(ne) => parseInt(ne.style.width || "80", 10)
|
|
9944
9988
|
);
|
|
9945
|
-
|
|
9946
|
-
let
|
|
9947
|
-
Array.from(
|
|
9948
|
-
|
|
9989
|
+
N.querySelectorAll("tr").forEach((ne) => {
|
|
9990
|
+
let te = 0, ae = 0;
|
|
9991
|
+
Array.from(ne.children).forEach((ie) => {
|
|
9992
|
+
ie.classList.contains("fixed-td") && (ie.style.left = `${te - 1}px`), ae < W.length && (te += W[ae] - 1, ae++);
|
|
9949
9993
|
});
|
|
9950
9994
|
});
|
|
9951
9995
|
}
|
|
9952
|
-
|
|
9996
|
+
N.style.width = `${q}px`, N.style.minWidth = `${q}px`;
|
|
9953
9997
|
}
|
|
9954
9998
|
});
|
|
9955
9999
|
}
|
|
9956
10000
|
});
|
|
9957
10001
|
} else {
|
|
9958
|
-
let
|
|
9959
|
-
K.length && (
|
|
9960
|
-
const
|
|
9961
|
-
computeCell(
|
|
9962
|
-
config:
|
|
9963
|
-
rowConfig:
|
|
9964
|
-
colConfig:
|
|
9965
|
-
}), renderReportByDom(
|
|
10002
|
+
let U = !1, { rowConfig: H, colConfig: q, config: Y } = cloneDeep(n.config), K = getLoopItem(q, G, "col", Y), ee = getLoopItem(H, G, "row", Y);
|
|
10003
|
+
K.length && (U = !0, loopGroupCols(q, K, Y, G)), ee.length && (U = !0, loopGroupRows(H, ee, Y, q, G));
|
|
10004
|
+
const N = transformArrayToObject(G, n.config.data.source);
|
|
10005
|
+
computeCell(Y, N, C.value), await preGenerateBarcodes([{ config: Y }]), p.value.push({
|
|
10006
|
+
config: Y,
|
|
10007
|
+
rowConfig: H,
|
|
10008
|
+
colConfig: q
|
|
10009
|
+
}), renderReportByDom(H, q, Y, c.value, U, _.value.border), console.timeEnd("renderReport");
|
|
9966
10010
|
}
|
|
9967
10011
|
}
|
|
9968
|
-
function
|
|
9969
|
-
let
|
|
9970
|
-
return n.config.params.forEach((
|
|
9971
|
-
|
|
9972
|
-
}),
|
|
9973
|
-
|
|
9974
|
-
}),
|
|
9975
|
-
message: `请填写必填项:${
|
|
10012
|
+
function V() {
|
|
10013
|
+
let G = 0, U = [], H = {};
|
|
10014
|
+
return n.config.params.forEach((q) => {
|
|
10015
|
+
q.isNull && (H[q.columnName] = q);
|
|
10016
|
+
}), w.value.forEach((q) => {
|
|
10017
|
+
q.name && H[q.name] && !q.value && (U.push(H[q.name].name), G++);
|
|
10018
|
+
}), G > 0 && Object.keys(H).length > 0 ? (ElMessage.warning({
|
|
10019
|
+
message: `请填写必填项:${U.join(",")}`,
|
|
9976
10020
|
grouping: !0
|
|
9977
10021
|
}), !1) : !0;
|
|
9978
10022
|
}
|
|
9979
|
-
async function
|
|
9980
|
-
var
|
|
9981
|
-
if (
|
|
9982
|
-
|
|
10023
|
+
async function X() {
|
|
10024
|
+
var U;
|
|
10025
|
+
if (S = !1, i.value || V()) {
|
|
10026
|
+
x.value = !0;
|
|
9983
10027
|
try {
|
|
9984
|
-
let
|
|
9985
|
-
n.config.data.processData && (
|
|
10028
|
+
let H = await le(i.value), q = oe(H);
|
|
10029
|
+
n.config.data.processData && (q = await getProcessData(
|
|
9986
10030
|
n.config.data.processData,
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
));
|
|
9991
|
-
const
|
|
9992
|
-
|
|
9993
|
-
} catch (
|
|
9994
|
-
console.error("数据源请求失败:",
|
|
10031
|
+
q,
|
|
10032
|
+
w.value,
|
|
10033
|
+
E
|
|
10034
|
+
)), f = q, d = { ...q }, Z(), q = d;
|
|
10035
|
+
const Y = (U = n.config.data.source) == null ? void 0 : U.find((K) => K.loopTable);
|
|
10036
|
+
Y && Y.key ? await L(q, Y.key) : await j(q), nextTick(re);
|
|
10037
|
+
} catch (H) {
|
|
10038
|
+
console.error("数据源请求失败:", H), o("report-error", {
|
|
9995
10039
|
index: n.index,
|
|
9996
|
-
message: getErrorMessage(
|
|
10040
|
+
message: getErrorMessage(H)
|
|
9997
10041
|
}), clearReportByDom(l);
|
|
9998
10042
|
} finally {
|
|
9999
|
-
|
|
10043
|
+
x.value = !1, T = !0;
|
|
10000
10044
|
}
|
|
10001
10045
|
} else
|
|
10002
10046
|
clearReportByDom(l);
|
|
10003
10047
|
}
|
|
10004
|
-
function
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10048
|
+
function Z() {
|
|
10049
|
+
if (!d || !f || !u) return;
|
|
10050
|
+
const G = f[u.key];
|
|
10051
|
+
Array.isArray(G) && (u.order === "none" ? d[u.key] = G : d[u.key] = sortRowsByField(G, u.field, u.order, u.numeric));
|
|
10052
|
+
}
|
|
10053
|
+
async function Q(G) {
|
|
10054
|
+
var F;
|
|
10055
|
+
const U = G.target.closest("td.click-sort-cell");
|
|
10056
|
+
if (!U) return;
|
|
10057
|
+
const H = U.getAttribute("data-click-sort-field") || "", q = H.indexOf(".");
|
|
10058
|
+
if (q < 1) return;
|
|
10059
|
+
const Y = H.slice(0, q).toUpperCase(), K = H.slice(q + 1).toUpperCase();
|
|
10060
|
+
if (!Y || !K || !d) return;
|
|
10061
|
+
const ee = U.getAttribute("data-click-sort-numeric") === "1";
|
|
10062
|
+
u && u.key === Y && u.field === K ? u.order = u.order === "asc" ? "desc" : u.order === "desc" ? "none" : "asc" : u = { key: Y, field: K, order: "asc", numeric: ee }, Z();
|
|
10063
|
+
const N = (F = n.config.data.source) == null ? void 0 : F.find((z) => z.loopTable);
|
|
10064
|
+
N && N.key ? await L(d, N.key) : await j(d), nextTick(re);
|
|
10065
|
+
}
|
|
10066
|
+
function re() {
|
|
10067
|
+
var G;
|
|
10068
|
+
(G = l.value) == null || G.querySelectorAll("td.click-sort-cell").forEach((U) => {
|
|
10069
|
+
var K;
|
|
10070
|
+
const H = ((K = U.getAttribute("data-click-sort-field")) == null ? void 0 : K.toUpperCase()) || "", Y = u && H === `${u.key}.${u.field}` && u.order !== "none" ? u.order : "";
|
|
10071
|
+
U.dataset.sortDir = Y;
|
|
10072
|
+
});
|
|
10073
|
+
}
|
|
10074
|
+
onMounted(() => {
|
|
10075
|
+
var G;
|
|
10076
|
+
(G = l.value) == null || G.addEventListener("click", Q);
|
|
10077
|
+
});
|
|
10078
|
+
function oe(G) {
|
|
10079
|
+
let U = {};
|
|
10080
|
+
return Array.isArray(G) || (G = [G]), G.forEach(({ key: H, data: q }) => {
|
|
10081
|
+
if (H !== "PARAM") {
|
|
10082
|
+
let Y = q.filter((K) => K);
|
|
10083
|
+
U[H] = Y;
|
|
10010
10084
|
} else
|
|
10011
|
-
|
|
10085
|
+
U[H] = q;
|
|
10012
10086
|
}), o("updateData", {
|
|
10013
10087
|
key: n.config.id,
|
|
10014
|
-
data:
|
|
10015
|
-
}),
|
|
10088
|
+
data: U
|
|
10089
|
+
}), U;
|
|
10016
10090
|
}
|
|
10017
|
-
async function
|
|
10091
|
+
async function le(G = !1) {
|
|
10018
10092
|
if (n.config.data.source) {
|
|
10019
|
-
let
|
|
10093
|
+
let U = {
|
|
10020
10094
|
id: n.id
|
|
10021
10095
|
};
|
|
10022
|
-
|
|
10023
|
-
const
|
|
10096
|
+
b.value && (U.params = cloneDeep(w.value));
|
|
10097
|
+
const H = collectCellQueryConditions(
|
|
10024
10098
|
n.config.tableConfig,
|
|
10025
10099
|
n.config.data.source
|
|
10026
10100
|
);
|
|
10027
|
-
|
|
10028
|
-
let
|
|
10029
|
-
|
|
10030
|
-
K && (
|
|
10031
|
-
}),
|
|
10101
|
+
v.value ? G ? (U.pageSize = E.total, U.pageNumber = 1) : (U.pageSize = E.pageSize, U.pageNumber = E.pageIndex) : (U.pageSize = E.pageSize, U.pageNumber = 1);
|
|
10102
|
+
let q = [], Y = {};
|
|
10103
|
+
w.value.forEach(({ name: K, value: ee }) => {
|
|
10104
|
+
K && (Y[K.toUpperCase()] = ee);
|
|
10105
|
+
}), q.push({ key: "PARAM", data: Y });
|
|
10032
10106
|
for (let K = 0; K < n.config.data.source.length; K++) {
|
|
10033
|
-
const { key:
|
|
10034
|
-
if (
|
|
10035
|
-
const
|
|
10036
|
-
|
|
10107
|
+
const { key: ee, url: N } = n.config.data.source[K];
|
|
10108
|
+
if (N) {
|
|
10109
|
+
const F = H.get(N.toUpperCase()), z = F != null && F.length ? { ...U, params: [...U.params || [], ...F] } : U, J = await getDateSourceData(N, z);
|
|
10110
|
+
q.push({ key: ee, data: J.data }), v.value && (E.total = J.count || J.data.length);
|
|
10037
10111
|
}
|
|
10038
10112
|
}
|
|
10039
|
-
return
|
|
10113
|
+
return q;
|
|
10040
10114
|
} else
|
|
10041
10115
|
return [];
|
|
10042
10116
|
}
|
|
10043
|
-
function
|
|
10044
|
-
if (n.config.data.pageSize !== void 0 && (
|
|
10045
|
-
let
|
|
10046
|
-
|
|
10117
|
+
function fe() {
|
|
10118
|
+
if (n.config.data.pageSize !== void 0 && (E.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) {
|
|
10119
|
+
let G = n.config.data.pageSizes.split(",").map((U) => parseInt(U));
|
|
10120
|
+
E.pageSizes = Array.isArray(G) ? G : [10, 20, 50, 100, 200];
|
|
10047
10121
|
}
|
|
10048
10122
|
}
|
|
10049
|
-
return
|
|
10050
|
-
tableConfig:
|
|
10051
|
-
batchTableConfigs:
|
|
10123
|
+
return fe(), e({
|
|
10124
|
+
tableConfig: p,
|
|
10125
|
+
batchTableConfigs: m,
|
|
10052
10126
|
statementTableRef: l,
|
|
10053
10127
|
/** 拉数据 + 渲染(供父组件主动调用,如打印按钮触发) */
|
|
10054
|
-
renderHandler:
|
|
10055
|
-
}), (
|
|
10056
|
-
const
|
|
10128
|
+
renderHandler: X
|
|
10129
|
+
}), (G, U) => {
|
|
10130
|
+
const H = resolveComponent("el-button"), q = resolveComponent("el-pagination"), Y = resolveDirective("loading");
|
|
10057
10131
|
return openBlock(), createElementBlock("div", {
|
|
10058
10132
|
class: "yh-report-view-container",
|
|
10059
|
-
style: normalizeStyle(
|
|
10133
|
+
style: normalizeStyle(g.value)
|
|
10060
10134
|
}, [
|
|
10061
10135
|
withDirectives(createVNode(_sfc_main$7, {
|
|
10062
10136
|
config: n.config.params,
|
|
10063
10137
|
data: n.config.data,
|
|
10064
10138
|
ref_key: "conditionsRef",
|
|
10065
10139
|
ref: s,
|
|
10066
|
-
onAddCell:
|
|
10067
|
-
onChange:
|
|
10140
|
+
onAddCell: $,
|
|
10141
|
+
onChange: D
|
|
10068
10142
|
}, {
|
|
10069
10143
|
search: withCtx(() => [
|
|
10070
|
-
|
|
10144
|
+
y.value ? (openBlock(), createBlock(H, {
|
|
10071
10145
|
key: 0,
|
|
10072
10146
|
type: "primary",
|
|
10073
|
-
onClick:
|
|
10147
|
+
onClick: I
|
|
10074
10148
|
}, {
|
|
10075
10149
|
default: withCtx(() => [
|
|
10076
10150
|
createTextVNode(toDisplayString(unref(rct)("搜索")), 1)
|
|
10077
10151
|
]),
|
|
10078
10152
|
_: 1
|
|
10079
10153
|
})) : createCommentVNode("", !0),
|
|
10080
|
-
createVNode(
|
|
10154
|
+
createVNode(H, {
|
|
10081
10155
|
text: "",
|
|
10082
10156
|
type: "primary",
|
|
10083
|
-
onClick:
|
|
10157
|
+
onClick: k
|
|
10084
10158
|
}, {
|
|
10085
10159
|
default: withCtx(() => [
|
|
10086
|
-
createTextVNode(toDisplayString(unref(rct)(
|
|
10160
|
+
createTextVNode(toDisplayString(unref(rct)(M.value)), 1)
|
|
10087
10161
|
]),
|
|
10088
10162
|
_: 1
|
|
10089
10163
|
}),
|
|
10090
|
-
|
|
10164
|
+
v.value ? (openBlock(), createBlock(H, {
|
|
10091
10165
|
key: 1,
|
|
10092
10166
|
text: "",
|
|
10093
10167
|
type: "primary",
|
|
10094
|
-
onClick:
|
|
10168
|
+
onClick: O
|
|
10095
10169
|
}, {
|
|
10096
10170
|
default: withCtx(() => [
|
|
10097
|
-
createTextVNode(toDisplayString(unref(rct)(
|
|
10171
|
+
createTextVNode(toDisplayString(unref(rct)(M.value)) + toDisplayString(unref(rct)("全部")), 1)
|
|
10098
10172
|
]),
|
|
10099
10173
|
_: 1
|
|
10100
10174
|
})) : createCommentVNode("", !0)
|
|
@@ -10113,16 +10187,16 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10113
10187
|
ref: c
|
|
10114
10188
|
}, null, 512)
|
|
10115
10189
|
])), [
|
|
10116
|
-
[
|
|
10190
|
+
[Y, x.value]
|
|
10117
10191
|
]),
|
|
10118
|
-
|
|
10192
|
+
v.value ? withDirectives((openBlock(), createBlock(q, {
|
|
10119
10193
|
key: 0,
|
|
10120
|
-
pageSize:
|
|
10121
|
-
"onUpdate:pageSize":
|
|
10122
|
-
"current-page":
|
|
10123
|
-
"onUpdate:currentPage":
|
|
10124
|
-
"page-sizes":
|
|
10125
|
-
total:
|
|
10194
|
+
pageSize: E.pageSize,
|
|
10195
|
+
"onUpdate:pageSize": U[0] || (U[0] = (K) => E.pageSize = K),
|
|
10196
|
+
"current-page": E.pageIndex,
|
|
10197
|
+
"onUpdate:currentPage": U[1] || (U[1] = (K) => E.pageIndex = K),
|
|
10198
|
+
"page-sizes": E.pageSizes,
|
|
10199
|
+
total: E.total,
|
|
10126
10200
|
layout: "total, jumper, prev, pager, next, sizes"
|
|
10127
10201
|
}, null, 8, ["pageSize", "current-page", "page-sizes", "total"])), [
|
|
10128
10202
|
[vShow, !unref(i)]
|
|
@@ -10381,7 +10455,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10381
10455
|
}
|
|
10382
10456
|
}, _ = {
|
|
10383
10457
|
SUM(y) {
|
|
10384
|
-
return y.map((w) => Number(w)).filter((w) => !isNaN(w)).reduce((w,
|
|
10458
|
+
return y.map((w) => Number(w)).filter((w) => !isNaN(w)).reduce((w, C) => w + C, 0);
|
|
10385
10459
|
},
|
|
10386
10460
|
AVG(y) {
|
|
10387
10461
|
const E = y.map((w) => Number(w)).filter((w) => !isNaN(w));
|
|
@@ -10401,76 +10475,76 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10401
10475
|
}, v = async (y, E) => {
|
|
10402
10476
|
const {
|
|
10403
10477
|
data: { source: w },
|
|
10404
|
-
notSingle:
|
|
10478
|
+
notSingle: C,
|
|
10405
10479
|
keyIds: $,
|
|
10406
10480
|
dataIds: D,
|
|
10407
|
-
groupBy:
|
|
10481
|
+
groupBy: T,
|
|
10408
10482
|
orderBy: S,
|
|
10409
10483
|
cutLength: I,
|
|
10410
|
-
singleComputed:
|
|
10411
|
-
singleKey:
|
|
10412
|
-
singleData:
|
|
10484
|
+
singleComputed: B,
|
|
10485
|
+
singleKey: M,
|
|
10486
|
+
singleData: k
|
|
10413
10487
|
} = y;
|
|
10414
|
-
let
|
|
10415
|
-
E && (
|
|
10488
|
+
let O = {};
|
|
10489
|
+
E && (O = {
|
|
10416
10490
|
...E
|
|
10417
10491
|
});
|
|
10418
10492
|
for (let x = 0; x < w.length; x++) {
|
|
10419
10493
|
const { key: A, url: R } = w[x];
|
|
10420
10494
|
try {
|
|
10421
|
-
const
|
|
10422
|
-
|
|
10423
|
-
} catch (
|
|
10495
|
+
const L = (await getDateSourceData(R, { id: n.id })).data;
|
|
10496
|
+
O[A] = L;
|
|
10497
|
+
} catch (L) {
|
|
10424
10498
|
return o("report-error", {
|
|
10425
10499
|
index: n.index,
|
|
10426
|
-
message: getErrorMessage(
|
|
10500
|
+
message: getErrorMessage(L)
|
|
10427
10501
|
}), l.value = !1, !1;
|
|
10428
10502
|
}
|
|
10429
10503
|
}
|
|
10430
|
-
if (Object.keys(
|
|
10504
|
+
if (Object.keys(O).length === 0)
|
|
10431
10505
|
return l.value = !1, !1;
|
|
10432
|
-
if (c.value = [],
|
|
10506
|
+
if (c.value = [], C) {
|
|
10433
10507
|
if ($.length < 2 || D.length < 2)
|
|
10434
10508
|
return l.value = !1, !1;
|
|
10435
10509
|
let x = "", A = "";
|
|
10436
10510
|
$.length > 2 ? (x = $.splice(0, 2).join("."), A = $.at(0)) : (x = $.at(0), A = $.at(1));
|
|
10437
|
-
let R = get(
|
|
10511
|
+
let R = get(O, x);
|
|
10438
10512
|
if (!R)
|
|
10439
10513
|
return l.value = !1, !1;
|
|
10440
|
-
let
|
|
10441
|
-
D.length > 2 ? (
|
|
10442
|
-
let
|
|
10443
|
-
if (!
|
|
10514
|
+
let L = R.map((re) => re[A]), j = "", V = "";
|
|
10515
|
+
D.length > 2 ? (j = D.splice(0, 2).join("."), V = D.at(0)) : (j = D.at(0), V = D.at(1));
|
|
10516
|
+
let X = [], Z = {}, Q = get(O, j);
|
|
10517
|
+
if (!Q)
|
|
10444
10518
|
return l.value = !1, !1;
|
|
10445
|
-
|
|
10446
|
-
let
|
|
10447
|
-
|
|
10448
|
-
label:
|
|
10449
|
-
value:
|
|
10519
|
+
Q.map((re) => {
|
|
10520
|
+
let oe = re[A], le = re[V];
|
|
10521
|
+
T ? oe && L.includes(oe) && (Z[oe] ? Z[oe].push(le) : Z[oe] = [le]) : oe && L.includes(oe) && X.push({
|
|
10522
|
+
label: oe,
|
|
10523
|
+
value: le
|
|
10450
10524
|
});
|
|
10451
|
-
}),
|
|
10452
|
-
let
|
|
10525
|
+
}), T && (X = Object.keys(Z).map((re) => {
|
|
10526
|
+
let oe = Z[re];
|
|
10453
10527
|
return {
|
|
10454
|
-
label:
|
|
10455
|
-
value: _.SUM(
|
|
10528
|
+
label: re,
|
|
10529
|
+
value: _.SUM(oe)
|
|
10456
10530
|
};
|
|
10457
|
-
})), !isNaN(I) && I > 0 && (
|
|
10531
|
+
})), !isNaN(I) && I > 0 && (X = X.splice(0, I)), c.value = X;
|
|
10458
10532
|
} else {
|
|
10459
|
-
if (!
|
|
10533
|
+
if (!k || k.length === 0)
|
|
10460
10534
|
return l.value = !1, !1;
|
|
10461
10535
|
let x = "", A = "";
|
|
10462
|
-
|
|
10463
|
-
let R = get(
|
|
10536
|
+
k.length > 2 ? (x = k.splice(0, 2).join("."), A = k.at(0)) : (x = k.at(0), A = k.at(1));
|
|
10537
|
+
let R = get(O, x);
|
|
10464
10538
|
if (!R)
|
|
10465
10539
|
return l.value = !1, !1;
|
|
10466
|
-
let
|
|
10467
|
-
|
|
10468
|
-
label:
|
|
10469
|
-
value:
|
|
10540
|
+
let L = R.map((j) => j[A]);
|
|
10541
|
+
B && (L = _[B](L)), c.value.push({
|
|
10542
|
+
label: M,
|
|
10543
|
+
value: L
|
|
10470
10544
|
});
|
|
10471
10545
|
}
|
|
10472
10546
|
l.value = !1;
|
|
10473
|
-
},
|
|
10547
|
+
}, b = async () => {
|
|
10474
10548
|
l.value = !0;
|
|
10475
10549
|
let y = cloneDeep(n.config);
|
|
10476
10550
|
y && v(y);
|
|
@@ -10478,7 +10552,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10478
10552
|
return e({
|
|
10479
10553
|
setOutData: g
|
|
10480
10554
|
}), onMounted(() => {
|
|
10481
|
-
|
|
10555
|
+
b();
|
|
10482
10556
|
}), (y, E) => {
|
|
10483
10557
|
const w = resolveDirective("loading");
|
|
10484
10558
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
@@ -10489,9 +10563,9 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10489
10563
|
u.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
10490
10564
|
createElementVNode("div", _hoisted_2$3, toDisplayString(d.value.label), 1),
|
|
10491
10565
|
createElementVNode("div", _hoisted_3$2, toDisplayString(d.value.value), 1)
|
|
10492
|
-
], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(c.value, (
|
|
10493
|
-
createElementVNode("div", _hoisted_5$1, toDisplayString(
|
|
10494
|
-
createElementVNode("div", _hoisted_6$1, toDisplayString(
|
|
10566
|
+
], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(c.value, (C, $) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
10567
|
+
createElementVNode("div", _hoisted_5$1, toDisplayString(C.label), 1),
|
|
10568
|
+
createElementVNode("div", _hoisted_6$1, toDisplayString(C.value), 1)
|
|
10495
10569
|
]))), 256)),
|
|
10496
10570
|
unref(i) ? (openBlock(), createElementBlock("div", _hoisted_7$1, [...E[0] || (E[0] = [
|
|
10497
10571
|
createElementVNode("span", null, "仅展示,打印时会忽略", -1)
|
|
@@ -10654,10 +10728,10 @@ function buildPageDom(t, e, r, n) {
|
|
|
10654
10728
|
const { rowConfig: o, colConfig: i, config: a, fixedRows: s, watermark: l, header: c, footer: u, pageNumber: d, totalPages: f, title: p } = t, m = document.createElement("div");
|
|
10655
10729
|
m.className = "print-page-wrapper", l != null && l.enabled && m.appendChild(renderWatermarkLayer(l, r, n)), c != null && c.enabled && m.appendChild(renderPrintArea(c, { page: d, total: f, title: p }, "center"));
|
|
10656
10730
|
const g = [], _ = [];
|
|
10657
|
-
for (const
|
|
10658
|
-
g.push({ ...
|
|
10659
|
-
for (const
|
|
10660
|
-
o[
|
|
10731
|
+
for (const b of s)
|
|
10732
|
+
g.push({ ...b.row }), _.push(cloneDeep(a[b.index]));
|
|
10733
|
+
for (const b of e)
|
|
10734
|
+
o[b].isFixed || (g.push({ ...o[b] }), _.push(cloneDeep(a[b])));
|
|
10661
10735
|
const v = renderReportByDomForPrint(g, i, _, t.themeColor);
|
|
10662
10736
|
return m.appendChild(v), u != null && u.enabled && m.appendChild(renderPrintArea(u, { page: d, total: f, title: p }, "center")), m;
|
|
10663
10737
|
}
|
|
@@ -10900,8 +10974,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10900
10974
|
contentWidthPx: y
|
|
10901
10975
|
}), w = document.createElement("iframe");
|
|
10902
10976
|
w.style.position = "fixed", w.style.left = "-9999px", w.style.top = "-9999px", w.style.width = "0", w.style.height = "0", w.style.border = "none", document.body.appendChild(w);
|
|
10903
|
-
const
|
|
10904
|
-
|
|
10977
|
+
const C = w.contentDocument;
|
|
10978
|
+
C.open(), C.write(E), C.close(), w.onload = () => {
|
|
10905
10979
|
w.contentWindow.print(), setTimeout(() => {
|
|
10906
10980
|
w.remove(), l.value = !1;
|
|
10907
10981
|
}, 500);
|
|
@@ -10918,37 +10992,37 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10918
10992
|
await nextTick();
|
|
10919
10993
|
try {
|
|
10920
10994
|
let w = function() {
|
|
10921
|
-
|
|
10922
|
-
},
|
|
10923
|
-
if (
|
|
10924
|
-
for (;
|
|
10925
|
-
const A =
|
|
10995
|
+
M.length > 0 && (B.push({ items: M }), M = [], k = 0);
|
|
10996
|
+
}, C = function() {
|
|
10997
|
+
if (T)
|
|
10998
|
+
for (; O.length > 0; ) {
|
|
10999
|
+
const A = O[0], R = D - k;
|
|
10926
11000
|
if (R <= 0) {
|
|
10927
|
-
if (
|
|
11001
|
+
if (M.length === 0) break;
|
|
10928
11002
|
w();
|
|
10929
11003
|
continue;
|
|
10930
11004
|
}
|
|
10931
|
-
let
|
|
10932
|
-
if (!
|
|
10933
|
-
if (
|
|
11005
|
+
let L = splitNextReportPage(A.state, R, S, D);
|
|
11006
|
+
if (!L) {
|
|
11007
|
+
if (M.length > 0) {
|
|
10934
11008
|
w();
|
|
10935
11009
|
continue;
|
|
10936
11010
|
}
|
|
10937
|
-
|
|
11011
|
+
L = splitNextReportPage(A.state, R, S, D, !0);
|
|
10938
11012
|
}
|
|
10939
|
-
|
|
11013
|
+
M.push({ type: "report", dom: L.dom }), k += L.height, A.state.currentRowIdx >= A.state.visibleRows.length && O.shift();
|
|
10940
11014
|
}
|
|
10941
11015
|
};
|
|
10942
|
-
r.silentRender && await
|
|
10943
|
-
const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig),
|
|
11016
|
+
r.silentRender && await b();
|
|
11017
|
+
const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig), T = D != null, S = getPrintContentWidthPxMeasured(r.printConfig), I = [];
|
|
10944
11018
|
for (let A = 0; A < r.configs.length; A++) {
|
|
10945
11019
|
const R = r.configs[A];
|
|
10946
11020
|
if (R.type === "report") {
|
|
10947
|
-
const
|
|
10948
|
-
if (
|
|
10949
|
-
for (const
|
|
10950
|
-
const
|
|
10951
|
-
|
|
11021
|
+
const L = f().get(A);
|
|
11022
|
+
if (L && L.length > 0)
|
|
11023
|
+
for (const V of L) {
|
|
11024
|
+
const X = createReportSplitState(
|
|
11025
|
+
V,
|
|
10952
11026
|
getThemeColors(R.theme || "none").border,
|
|
10953
11027
|
{
|
|
10954
11028
|
header: r.printConfig.header,
|
|
@@ -10957,16 +11031,16 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10957
11031
|
title: r.statementName
|
|
10958
11032
|
}
|
|
10959
11033
|
);
|
|
10960
|
-
await preGenerateBarcodes([{ config:
|
|
11034
|
+
await preGenerateBarcodes([{ config: X.config }]), I.push({ kind: "report", pending: { state: X } });
|
|
10961
11035
|
}
|
|
10962
|
-
const
|
|
10963
|
-
if (
|
|
10964
|
-
for (let
|
|
10965
|
-
const
|
|
10966
|
-
|
|
10967
|
-
for (const
|
|
10968
|
-
const
|
|
10969
|
-
|
|
11036
|
+
const j = p().get(A);
|
|
11037
|
+
if (j && j.length > 0)
|
|
11038
|
+
for (let V = 0; V < j.length; V++) {
|
|
11039
|
+
const X = j[V];
|
|
11040
|
+
V > 0 && I.push({ kind: "break" });
|
|
11041
|
+
for (const Z of X) {
|
|
11042
|
+
const Q = createReportSplitState(
|
|
11043
|
+
Z,
|
|
10970
11044
|
getThemeColors(R.theme || "none").border,
|
|
10971
11045
|
{
|
|
10972
11046
|
header: r.printConfig.header,
|
|
@@ -10975,16 +11049,16 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10975
11049
|
title: r.statementName
|
|
10976
11050
|
}
|
|
10977
11051
|
);
|
|
10978
|
-
await preGenerateBarcodes([{ config:
|
|
11052
|
+
await preGenerateBarcodes([{ config: Q.config }]), I.push({ kind: "report", pending: { state: Q } });
|
|
10979
11053
|
}
|
|
10980
11054
|
}
|
|
10981
11055
|
} else if (R.type === "label")
|
|
10982
11056
|
continue;
|
|
10983
11057
|
}
|
|
10984
|
-
const
|
|
10985
|
-
let
|
|
10986
|
-
const
|
|
10987
|
-
if (
|
|
11058
|
+
const B = [];
|
|
11059
|
+
let M = [], k = 0;
|
|
11060
|
+
const O = [];
|
|
11061
|
+
if (T) {
|
|
10988
11062
|
for (const A of I) {
|
|
10989
11063
|
if (A.kind === "break") {
|
|
10990
11064
|
w();
|
|
@@ -10992,36 +11066,36 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10992
11066
|
}
|
|
10993
11067
|
if (A.kind === "report") {
|
|
10994
11068
|
const R = A.pending;
|
|
10995
|
-
|
|
10996
|
-
const
|
|
10997
|
-
|
|
11069
|
+
C();
|
|
11070
|
+
const L = D - k, j = splitNextReportPage(R.state, L, S, D);
|
|
11071
|
+
j ? (M.push({ type: "report", dom: j.dom }), k += j.height, R.state.currentRowIdx < R.state.visibleRows.length && O.push(R)) : (M.length > 0 && w(), O.push(R));
|
|
10998
11072
|
}
|
|
10999
11073
|
}
|
|
11000
|
-
|
|
11074
|
+
C(), w();
|
|
11001
11075
|
} else {
|
|
11002
|
-
const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom),
|
|
11003
|
-
for (const
|
|
11004
|
-
if (
|
|
11005
|
-
const
|
|
11006
|
-
|
|
11076
|
+
const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom), L = [];
|
|
11077
|
+
for (const j of I) {
|
|
11078
|
+
if (j.kind === "break") {
|
|
11079
|
+
const V = document.createElement("div");
|
|
11080
|
+
V.style.height = `${R}px`, L.push({ type: "spacer", dom: V });
|
|
11007
11081
|
continue;
|
|
11008
11082
|
}
|
|
11009
|
-
if (
|
|
11010
|
-
const { state:
|
|
11011
|
-
|
|
11083
|
+
if (j.kind === "report") {
|
|
11084
|
+
const { state: V } = j.pending, { rowConfig: X, colConfig: Z, config: Q } = V, re = renderReportByDomForPrint(X, Z, Q, V.themeColor);
|
|
11085
|
+
L.push({ type: "report", dom: re });
|
|
11012
11086
|
}
|
|
11013
11087
|
}
|
|
11014
|
-
|
|
11088
|
+
B.push({ items: L });
|
|
11015
11089
|
}
|
|
11016
|
-
a.value =
|
|
11090
|
+
a.value = B.map((A) => A.items), await nextTick(), s.value.forEach((A) => A.remove()), s.value = [];
|
|
11017
11091
|
const x = i.value;
|
|
11018
|
-
for (let A = 0; A < x.length && A <
|
|
11092
|
+
for (let A = 0; A < x.length && A < B.length; A++) {
|
|
11019
11093
|
const R = x[A];
|
|
11020
11094
|
R.innerHTML = "";
|
|
11021
|
-
const
|
|
11022
|
-
for (const
|
|
11023
|
-
const
|
|
11024
|
-
R.appendChild(
|
|
11095
|
+
const L = B[A].items;
|
|
11096
|
+
for (const j of L) {
|
|
11097
|
+
const V = j.dom.cloneNode(!0);
|
|
11098
|
+
R.appendChild(V), s.value.push(V);
|
|
11025
11099
|
}
|
|
11026
11100
|
}
|
|
11027
11101
|
$ && (await nextTick(), v(), setTimeout(() => {
|
|
@@ -11032,44 +11106,44 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11032
11106
|
}
|
|
11033
11107
|
}
|
|
11034
11108
|
);
|
|
11035
|
-
async function
|
|
11109
|
+
async function b() {
|
|
11036
11110
|
u.value = /* @__PURE__ */ new Map(), d.value = /* @__PURE__ */ new Map();
|
|
11037
11111
|
const y = r.fetchAll !== !1;
|
|
11038
11112
|
for (let E = 0; E < r.configs.length; E++) {
|
|
11039
11113
|
const w = r.configs[E];
|
|
11040
11114
|
if (w.type !== "report") continue;
|
|
11041
|
-
const
|
|
11115
|
+
const C = w, $ = C.data, D = C.tableConfig;
|
|
11042
11116
|
if (!$ || !D || !$.source) continue;
|
|
11043
|
-
const
|
|
11117
|
+
const T = buildPrintParamsFromConfig(C, c.query), { resData: S } = await fetchReportData(
|
|
11044
11118
|
{ id: r.reportId ?? "", data: $, tableConfig: D },
|
|
11045
|
-
|
|
11119
|
+
T,
|
|
11046
11120
|
{ pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!$.pagination },
|
|
11047
11121
|
y
|
|
11048
11122
|
);
|
|
11049
11123
|
let I = toUpdateData(S);
|
|
11050
|
-
$.processData && (I = await getProcessData($.processData, I,
|
|
11124
|
+
$.processData && (I = await getProcessData($.processData, I, T, {
|
|
11051
11125
|
pageSize: 5e3,
|
|
11052
11126
|
pageIndex: 1,
|
|
11053
11127
|
total: 0
|
|
11054
11128
|
}));
|
|
11055
|
-
const
|
|
11056
|
-
if (
|
|
11057
|
-
const
|
|
11129
|
+
const B = $.source, M = B.find((k) => k.loopTable);
|
|
11130
|
+
if (M && M.key) {
|
|
11131
|
+
const k = await renderReportToConfigs(
|
|
11058
11132
|
D,
|
|
11059
11133
|
I,
|
|
11060
|
-
|
|
11134
|
+
B,
|
|
11061
11135
|
[],
|
|
11062
|
-
|
|
11136
|
+
M.key
|
|
11063
11137
|
);
|
|
11064
|
-
d.value.set(E,
|
|
11138
|
+
d.value.set(E, k);
|
|
11065
11139
|
} else {
|
|
11066
|
-
const
|
|
11140
|
+
const k = await renderReportToConfigs(
|
|
11067
11141
|
D,
|
|
11068
11142
|
I,
|
|
11069
|
-
|
|
11143
|
+
B,
|
|
11070
11144
|
[]
|
|
11071
11145
|
);
|
|
11072
|
-
u.value.set(E,
|
|
11146
|
+
u.value.set(E, k);
|
|
11073
11147
|
}
|
|
11074
11148
|
}
|
|
11075
11149
|
}
|
|
@@ -11107,8 +11181,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11107
11181
|
ref: o
|
|
11108
11182
|
}, [
|
|
11109
11183
|
createElementVNode("div", _hoisted_2$2, [
|
|
11110
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w,
|
|
11111
|
-
key:
|
|
11184
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w, C) => (openBlock(), createElementBlock("div", {
|
|
11185
|
+
key: C,
|
|
11112
11186
|
class: "print-preview-page",
|
|
11113
11187
|
style: normalizeStyle(m.value)
|
|
11114
11188
|
}, [
|
|
@@ -11160,52 +11234,52 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11160
11234
|
}
|
|
11161
11235
|
);
|
|
11162
11236
|
function m(D) {
|
|
11163
|
-
D ? (i.value = "", a.value = [], n.value = !0, getConfig(D).then(async (
|
|
11164
|
-
let { name: S, remoteOptions: I, printConfig:
|
|
11165
|
-
o.value = S, c.value = I,
|
|
11166
|
-
}).catch((
|
|
11167
|
-
console.error("获取报表配置失败:",
|
|
11237
|
+
D ? (i.value = "", a.value = [], n.value = !0, getConfig(D).then(async (T) => {
|
|
11238
|
+
let { name: S, remoteOptions: I, printConfig: B } = T;
|
|
11239
|
+
o.value = S, c.value = I, B && (u.value = { ...DEFAULT_PRINT_CONFIG, ...B });
|
|
11240
|
+
}).catch((T) => {
|
|
11241
|
+
console.error("获取报表配置失败:", T), i.value = getErrorMessage(T);
|
|
11168
11242
|
}).finally(() => {
|
|
11169
11243
|
n.value = !1;
|
|
11170
11244
|
})) : i.value = "报表ID不能为空";
|
|
11171
11245
|
}
|
|
11172
|
-
function g({ index: D, message:
|
|
11173
|
-
a.value.some((S) => S.key === D) || a.value.push({ key: D, message:
|
|
11246
|
+
function g({ index: D, message: T }) {
|
|
11247
|
+
a.value.some((S) => S.key === D) || a.value.push({ key: D, message: T });
|
|
11174
11248
|
}
|
|
11175
11249
|
function _(D) {
|
|
11176
|
-
const
|
|
11177
|
-
|
|
11250
|
+
const T = a.value.indexOf(D);
|
|
11251
|
+
T > -1 && a.value.splice(T, 1);
|
|
11178
11252
|
}
|
|
11179
11253
|
const v = ref(!1);
|
|
11180
|
-
function
|
|
11181
|
-
var
|
|
11182
|
-
d[D.key] = D.data, (
|
|
11254
|
+
function b(D) {
|
|
11255
|
+
var T;
|
|
11256
|
+
d[D.key] = D.data, (T = l.value) == null || T.forEach((S) => {
|
|
11183
11257
|
S.setOutData(d);
|
|
11184
11258
|
});
|
|
11185
11259
|
}
|
|
11186
|
-
const y = ref(!1), E = ref(/* @__PURE__ */ new Map()), w = ref(/* @__PURE__ */ new Map()),
|
|
11260
|
+
const y = ref(!1), E = ref(/* @__PURE__ */ new Map()), w = ref(/* @__PURE__ */ new Map()), C = ref([]);
|
|
11187
11261
|
async function $() {
|
|
11188
11262
|
var S, I;
|
|
11189
|
-
if (
|
|
11190
|
-
const
|
|
11191
|
-
|
|
11263
|
+
if (C.value) {
|
|
11264
|
+
const B = C.value.filter((M) => M && typeof M.renderHandler == "function").map((M) => M.renderHandler());
|
|
11265
|
+
B.length > 0 && (n.value = !0, await Promise.all(B), n.value = !1);
|
|
11192
11266
|
}
|
|
11193
|
-
const D = /* @__PURE__ */ new Map(),
|
|
11194
|
-
if (
|
|
11195
|
-
for (let
|
|
11196
|
-
if (c.value[
|
|
11197
|
-
const
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
) :
|
|
11267
|
+
const D = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
11268
|
+
if (C.value) {
|
|
11269
|
+
for (let B = 0; B < c.value.length; B++)
|
|
11270
|
+
if (c.value[B].type === "report") {
|
|
11271
|
+
const M = C.value.find((k, O) => c.value.filter((A) => A.type === "report")[O] === c.value[B]);
|
|
11272
|
+
M && ((I = (S = c.value[B].data) == null ? void 0 : S.source) != null && I.some((k) => k.loopTable) ? M.batchTableConfigs && T.set(
|
|
11273
|
+
B,
|
|
11274
|
+
M.batchTableConfigs.map((k) => k.length > 0 ? [k[0]] : [])
|
|
11275
|
+
) : M.tableConfig && D.set(B, M.tableConfig.length > 0 ? [M.tableConfig[0]] : []));
|
|
11202
11276
|
}
|
|
11203
11277
|
}
|
|
11204
|
-
E.value = D, w.value =
|
|
11278
|
+
E.value = D, w.value = T, y.value = !0;
|
|
11205
11279
|
}
|
|
11206
11280
|
return onMounted(() => {
|
|
11207
11281
|
m(r.id);
|
|
11208
|
-
}), (D,
|
|
11282
|
+
}), (D, T) => {
|
|
11209
11283
|
const S = resolveDirective("loading");
|
|
11210
11284
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
11211
11285
|
createElementVNode("div", _hoisted_1$1, toDisplayString(o.value), 1),
|
|
@@ -11215,7 +11289,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11215
11289
|
size: "small",
|
|
11216
11290
|
onClick: $
|
|
11217
11291
|
}, {
|
|
11218
|
-
default: withCtx(() => [...
|
|
11292
|
+
default: withCtx(() => [...T[1] || (T[1] = [
|
|
11219
11293
|
createTextVNode(" 打印预览 ", -1)
|
|
11220
11294
|
])]),
|
|
11221
11295
|
_: 1
|
|
@@ -11241,28 +11315,28 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11241
11315
|
"show-icon": "",
|
|
11242
11316
|
closable: !0,
|
|
11243
11317
|
title: I.message,
|
|
11244
|
-
onClose: (
|
|
11318
|
+
onClose: (B) => _(I)
|
|
11245
11319
|
}, null, 8, ["title", "onClose"]))), 128)),
|
|
11246
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (I,
|
|
11320
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (I, B) => (openBlock(), createElementBlock(Fragment, null, [
|
|
11247
11321
|
I.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
|
|
11248
11322
|
key: 0,
|
|
11249
11323
|
"is-print-mode": f.value,
|
|
11250
11324
|
ref_for: !0,
|
|
11251
11325
|
ref_key: "reportViewItemRefs",
|
|
11252
|
-
ref:
|
|
11253
|
-
index:
|
|
11326
|
+
ref: C,
|
|
11327
|
+
index: B,
|
|
11254
11328
|
length: c.value.length,
|
|
11255
11329
|
id: t.id,
|
|
11256
11330
|
name: o.value,
|
|
11257
11331
|
config: I,
|
|
11258
|
-
onUpdateData:
|
|
11332
|
+
onUpdateData: b,
|
|
11259
11333
|
onReportError: g
|
|
11260
11334
|
}, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : I.type === "label" ? (openBlock(), createBlock(labelItem, {
|
|
11261
11335
|
key: 1,
|
|
11262
11336
|
ref_for: !0,
|
|
11263
11337
|
ref_key: "chartViewItemRef",
|
|
11264
11338
|
ref: l,
|
|
11265
|
-
index:
|
|
11339
|
+
index: B,
|
|
11266
11340
|
length: c.value.length,
|
|
11267
11341
|
id: t.id,
|
|
11268
11342
|
config: I,
|
|
@@ -11274,11 +11348,11 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11274
11348
|
ref: l,
|
|
11275
11349
|
config: I,
|
|
11276
11350
|
id: t.id,
|
|
11277
|
-
index:
|
|
11351
|
+
index: B,
|
|
11278
11352
|
length: c.value.length
|
|
11279
11353
|
}, null, 8, ["config", "id", "index", "length"]))
|
|
11280
11354
|
], 64))), 256)),
|
|
11281
|
-
withDirectives(createElementVNode("div", _hoisted_4$1, [...
|
|
11355
|
+
withDirectives(createElementVNode("div", _hoisted_4$1, [...T[2] || (T[2] = [
|
|
11282
11356
|
createElementVNode("i", { class: "iconfont icon-backtop" }, null, -1)
|
|
11283
11357
|
])], 512), [
|
|
11284
11358
|
[vShow, v.value]
|
|
@@ -11288,7 +11362,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11288
11362
|
]),
|
|
11289
11363
|
createVNode(_sfc_main$2, {
|
|
11290
11364
|
visible: y.value,
|
|
11291
|
-
"onUpdate:visible":
|
|
11365
|
+
"onUpdate:visible": T[0] || (T[0] = (I) => y.value = I),
|
|
11292
11366
|
configs: c.value,
|
|
11293
11367
|
"print-config": u.value,
|
|
11294
11368
|
"statement-name": o.value,
|
|
@@ -11316,26 +11390,26 @@ class PrinterClient {
|
|
|
11316
11390
|
constructor() {
|
|
11317
11391
|
// ===== 响应式状态(供 Composable 直接暴露) =====
|
|
11318
11392
|
/** 连接状态 */
|
|
11319
|
-
|
|
11393
|
+
se(this, "status", ref("disconnected"));
|
|
11320
11394
|
/** 打印机列表 */
|
|
11321
|
-
|
|
11395
|
+
se(this, "printers", ref([]));
|
|
11322
11396
|
/** 当前选中的打印机 name(Header 下拉选的,业务 print 不传 printerName 时用它) */
|
|
11323
|
-
|
|
11397
|
+
se(this, "selectedPrinter", ref(null));
|
|
11324
11398
|
/** 是否正在打印中(业务 print 流程中) */
|
|
11325
|
-
|
|
11399
|
+
se(this, "printing", ref(!1));
|
|
11326
11400
|
// ===== 内部状态 =====
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11401
|
+
se(this, "ws", null);
|
|
11402
|
+
se(this, "url", "");
|
|
11403
|
+
se(this, "manualClosed", !1);
|
|
11404
|
+
se(this, "reconnectTimer", null);
|
|
11405
|
+
se(this, "reconnectDelay", 1e3);
|
|
11406
|
+
se(this, "retryCount", 0);
|
|
11407
|
+
se(this, "pollTimer", null);
|
|
11408
|
+
se(this, "seq", 0);
|
|
11409
|
+
se(this, "pending", /* @__PURE__ */ new Map());
|
|
11410
|
+
se(this, "statusListeners", /* @__PURE__ */ new Set());
|
|
11411
|
+
se(this, "printersListeners", /* @__PURE__ */ new Set());
|
|
11412
|
+
se(this, "selectListeners", /* @__PURE__ */ new Set());
|
|
11339
11413
|
}
|
|
11340
11414
|
/** 当前服务地址 */
|
|
11341
11415
|
getUrl() {
|
|
@@ -11545,7 +11619,7 @@ function usePrinterClient() {
|
|
|
11545
11619
|
}
|
|
11546
11620
|
if (!g)
|
|
11547
11621
|
throw ElMessage.error("未找到可用打印机"), new Error("未找到可用打印机");
|
|
11548
|
-
const _ = p.printConfig, v = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0,
|
|
11622
|
+
const _ = p.printConfig, v = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, b = await printerClient.printReport({
|
|
11549
11623
|
options: p.remoteOptions,
|
|
11550
11624
|
printConfig: p.printConfig,
|
|
11551
11625
|
statementName: p.name,
|
|
@@ -11554,7 +11628,7 @@ function usePrinterClient() {
|
|
|
11554
11628
|
copies: d,
|
|
11555
11629
|
pageSize: v
|
|
11556
11630
|
});
|
|
11557
|
-
return
|
|
11631
|
+
return b.success ? ElMessage.success(`打印已发送:${g},共 ${b.copies || d} 份`) : ElMessage.error(b.message || "打印失败"), b;
|
|
11558
11632
|
} finally {
|
|
11559
11633
|
printerClient.printing.value = !1;
|
|
11560
11634
|
}
|
|
@@ -11650,9 +11724,9 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11650
11724
|
`打印机:${n.value}`,
|
|
11651
11725
|
`时间:${m}`,
|
|
11652
11726
|
"如能正常打印,说明连接与打印机配置正确"
|
|
11653
|
-
], _ = g.map((v,
|
|
11654
|
-
const y = { ...defaultCell, text: v, row:
|
|
11655
|
-
return y.style = { ...y.style, fontWeight:
|
|
11727
|
+
], _ = g.map((v, b) => {
|
|
11728
|
+
const y = { ...defaultCell, text: v, row: b + 1, col: 1 };
|
|
11729
|
+
return y.style = { ...y.style, fontWeight: b === 0 ? "bold" : "normal" }, [y];
|
|
11656
11730
|
});
|
|
11657
11731
|
return [
|
|
11658
11732
|
{
|
|
@@ -11679,7 +11753,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11679
11753
|
];
|
|
11680
11754
|
}
|
|
11681
11755
|
return (m, g) => {
|
|
11682
|
-
const _ = resolveComponent("YhIcon"), v = resolveComponent("el-button"),
|
|
11756
|
+
const _ = resolveComponent("YhIcon"), v = resolveComponent("el-button"), b = resolveComponent("el-input"), y = resolveComponent("el-divider"), E = resolveComponent("el-popover");
|
|
11683
11757
|
return openBlock(), createBlock(E, {
|
|
11684
11758
|
placement: "bottom",
|
|
11685
11759
|
"popper-class": "yh-printer-popover",
|
|
@@ -11710,7 +11784,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11710
11784
|
createElementVNode("span", _hoisted_4, toDisplayString(l.value), 1)
|
|
11711
11785
|
]),
|
|
11712
11786
|
createElementVNode("div", _hoisted_5, [
|
|
11713
|
-
createVNode(
|
|
11787
|
+
createVNode(b, {
|
|
11714
11788
|
modelValue: i.value,
|
|
11715
11789
|
"onUpdate:modelValue": g[0] || (g[0] = (w) => i.value = w),
|
|
11716
11790
|
size: "small",
|
|
@@ -11740,7 +11814,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11740
11814
|
unref(r).length === 0 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(unref(e) === "connected" ? "未检测到打印机" : "连接后显示打印机列表"), 1)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(unref(r), (w) => (openBlock(), createElementBlock("div", {
|
|
11741
11815
|
key: w.name,
|
|
11742
11816
|
class: "action-item printer-item",
|
|
11743
|
-
onClick: (
|
|
11817
|
+
onClick: (C) => n.value = w.name
|
|
11744
11818
|
}, [
|
|
11745
11819
|
createElementVNode("span", {
|
|
11746
11820
|
class: normalizeClass(["printer-radio", { active: unref(n) === w.name }])
|
|
@@ -11879,7 +11953,7 @@ function paginate(t, e, r) {
|
|
|
11879
11953
|
E.style.height = `${p}px`, m.push({ type: "spacer", dom: E });
|
|
11880
11954
|
continue;
|
|
11881
11955
|
}
|
|
11882
|
-
const { rowConfig: _, colConfig: v, config:
|
|
11956
|
+
const { rowConfig: _, colConfig: v, config: b } = g.reportConfig, y = renderReportByDomForPrint(_, v, b, g.themeColor);
|
|
11883
11957
|
m.push({ type: "report", dom: y });
|
|
11884
11958
|
}
|
|
11885
11959
|
s.push({ items: m });
|
|
@@ -11911,7 +11985,7 @@ async function registerRoute(t, e) {
|
|
|
11911
11985
|
title: "报表列表",
|
|
11912
11986
|
icon: "iconfont icon-s-grid"
|
|
11913
11987
|
},
|
|
11914
|
-
component: () => import("./StatementList-
|
|
11988
|
+
component: () => import("./StatementList-syYCKJkk.mjs")
|
|
11915
11989
|
}), e.addRoute("Index", {
|
|
11916
11990
|
path: "statement/design/:id",
|
|
11917
11991
|
name: "报表设计",
|
|
@@ -11920,7 +11994,7 @@ async function registerRoute(t, e) {
|
|
|
11920
11994
|
title: "报表设计",
|
|
11921
11995
|
icon: "iconfont icon-s-grid"
|
|
11922
11996
|
},
|
|
11923
|
-
component: () => import("./StatementDesign-
|
|
11997
|
+
component: () => import("./StatementDesign-csORhOKk.mjs").then((r) => r.S)
|
|
11924
11998
|
}), e.addRoute("Index", {
|
|
11925
11999
|
path: "statement/detail/:id",
|
|
11926
12000
|
name: "后台报表查看",
|
|
@@ -11929,7 +12003,7 @@ async function registerRoute(t, e) {
|
|
|
11929
12003
|
title: "后台报表查看",
|
|
11930
12004
|
icon: "iconfont icon-s-grid"
|
|
11931
12005
|
},
|
|
11932
|
-
component: () => import("./StatementDetail-
|
|
12006
|
+
component: () => import("./StatementDetail-BNwo9DYN.mjs")
|
|
11933
12007
|
})), e.addRoute({
|
|
11934
12008
|
path: "/statementdetail/:id",
|
|
11935
12009
|
name: "报表查看",
|
|
@@ -11940,7 +12014,7 @@ async function registerRoute(t, e) {
|
|
|
11940
12014
|
isWhite: !0
|
|
11941
12015
|
},
|
|
11942
12016
|
props: !0,
|
|
11943
|
-
component: () => import("./StatementDetail-
|
|
12017
|
+
component: () => import("./StatementDetail-BNwo9DYN.mjs")
|
|
11944
12018
|
}), e.hasRoute("Index") && e.addRoute("Index", {
|
|
11945
12019
|
path: "innerStatementdetail/:id",
|
|
11946
12020
|
name: "系统内报表查看",
|
|
@@ -11951,7 +12025,7 @@ async function registerRoute(t, e) {
|
|
|
11951
12025
|
noPadding: !0
|
|
11952
12026
|
},
|
|
11953
12027
|
props: !0,
|
|
11954
|
-
component: () => import("./StatementDetail-
|
|
12028
|
+
component: () => import("./StatementDetail-BNwo9DYN.mjs")
|
|
11955
12029
|
});
|
|
11956
12030
|
}
|
|
11957
12031
|
const index = {
|
|
@@ -12047,8 +12121,8 @@ export {
|
|
|
12047
12121
|
defaultCell as e,
|
|
12048
12122
|
defaultRow as f,
|
|
12049
12123
|
getList as g,
|
|
12050
|
-
|
|
12051
|
-
|
|
12124
|
+
completeBasicReportProperties as h,
|
|
12125
|
+
getConfig as i,
|
|
12052
12126
|
getThemeColors as j,
|
|
12053
12127
|
renderCellStyle as k,
|
|
12054
12128
|
getBorderCss as l,
|
|
@@ -12061,10 +12135,10 @@ export {
|
|
|
12061
12135
|
save as s,
|
|
12062
12136
|
_export_sfc as t,
|
|
12063
12137
|
chartItem as u,
|
|
12064
|
-
|
|
12065
|
-
|
|
12138
|
+
DataSourceColumnDataType as v,
|
|
12139
|
+
DATE_RANGE_TYPES as w,
|
|
12066
12140
|
numberToColumn as x,
|
|
12067
12141
|
applyBorderOperation as y,
|
|
12068
12142
|
validateAndCompleteTableConfig as z
|
|
12069
12143
|
};
|
|
12070
|
-
//# sourceMappingURL=index-
|
|
12144
|
+
//# sourceMappingURL=index-y062xBj5.mjs.map
|