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.
@@ -1,6 +1,6 @@
1
- var Se = Object.defineProperty;
2
- var xe = (t, e, r) => e in t ? Se(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var ae = (t, e, r) => xe(t, typeof e != "symbol" ? e + "" : e, r);
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, C = { 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(N) {
955
- var T = ["th", "st", "nd", "rd"], x = N % 100;
956
- return "[" + N + (T[(x - 20) % 10] || T[x] || T[0]) + "]";
957
- } }, y = function(N, T, x) {
958
- var A = String(N);
959
- return !A || A.length >= T ? N : "" + Array(T + 1 - A.length).join(x) + N;
960
- }, E = { s: y, z: function(N) {
961
- var T = -N.utcOffset(), x = Math.abs(T), A = Math.floor(x / 60), R = x % 60;
962
- return (T <= 0 ? "+" : "-") + y(A, 2, "0") + ":" + y(R, 2, "0");
963
- }, m: function N(T, x) {
964
- if (T.date() < x.date()) return -N(x, T);
965
- var A = 12 * (x.year() - T.year()) + (x.month() - T.month()), R = T.clone().add(A, d), F = x - R < 0, G = T.clone().add(A + (F ? -1 : 1), d);
966
- return +(-(A + (x - R) / (F ? R - G : G - R)) || 0);
967
- }, a: function(N) {
968
- return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
969
- }, p: function(N) {
970
- return { M: d, y: p, w: u, d: c, D: m, h: l, m: s, s: a, ms: i, Q: f }[N] || String(N || "").toLowerCase().replace(/s$/, "");
971
- }, u: function(N) {
972
- return N === void 0;
973
- } }, w = "en", b = {};
974
- b[w] = C;
975
- var $ = "$isDayjsObject", D = function(N) {
976
- return N instanceof L || !(!N || !N[$]);
977
- }, O = function N(T, x, A) {
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 (!T) return w;
980
- if (typeof T == "string") {
981
- var F = T.toLowerCase();
982
- b[F] && (R = F), x && (b[F] = x, R = F);
983
- var G = T.split("-");
984
- if (!R && G.length > 1) return N(G[0]);
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 j = T.name;
987
- b[j] = T, R = j;
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(N, T) {
991
- if (D(N)) return N.clone();
992
- var x = typeof T == "object" ? T : {};
993
- return x.date = N, x.args = arguments, new L(x);
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 = O, I.i = D, I.w = function(N, T) {
996
- return S(N, { locale: T.$L, utc: T.$u, x: T.$x, $offset: T.$offset });
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 L = function() {
999
- function N(x) {
1000
- this.$L = O(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[$] = !0;
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 T = N.prototype;
1003
- return T.parse = function(x) {
1002
+ var O = k.prototype;
1003
+ return O.parse = function(x) {
1004
1004
  this.$d = function(A) {
1005
- var R = A.date, F = A.utc;
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 G = R.match(_);
1011
- if (G) {
1012
- var j = G[2] - 1 || 0, W = (G[7] || "0").substring(0, 3);
1013
- return F ? new Date(Date.UTC(G[1], j, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, W)) : new Date(G[1], j, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, W);
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
- }, T.init = function() {
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
- }, T.$utils = function() {
1021
+ }, O.$utils = function() {
1022
1022
  return I;
1023
- }, T.isValid = function() {
1023
+ }, O.isValid = function() {
1024
1024
  return this.$d.toString() !== g;
1025
- }, T.isSame = function(x, A) {
1025
+ }, O.isSame = function(x, A) {
1026
1026
  var R = S(x);
1027
1027
  return this.startOf(A) <= R && R <= this.endOf(A);
1028
- }, T.isAfter = function(x, A) {
1028
+ }, O.isAfter = function(x, A) {
1029
1029
  return S(x) < this.startOf(A);
1030
- }, T.isBefore = function(x, A) {
1030
+ }, O.isBefore = function(x, A) {
1031
1031
  return this.endOf(A) < S(x);
1032
- }, T.$g = function(x, A, R) {
1032
+ }, O.$g = function(x, A, R) {
1033
1033
  return I.u(x) ? this[A] : this.set(R, x);
1034
- }, T.unix = function() {
1034
+ }, O.unix = function() {
1035
1035
  return Math.floor(this.valueOf() / 1e3);
1036
- }, T.valueOf = function() {
1036
+ }, O.valueOf = function() {
1037
1037
  return this.$d.getTime();
1038
- }, T.startOf = function(x, A) {
1039
- var R = this, F = !!I.u(A) || A, G = I.p(x), j = function(J, Y) {
1040
- var Q = I.w(R.$u ? Date.UTC(R.$y, Y, J) : new Date(R.$y, Y, J), R);
1041
- return F ? Q : Q.endOf(c);
1042
- }, W = function(J, Y) {
1043
- return I.w(R.toDate()[J].apply(R.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Y)), R);
1044
- }, M = this.$W, B = this.$M, U = this.$D, H = "set" + (this.$u ? "UTC" : "");
1045
- switch (G) {
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 F ? j(1, 0) : j(31, 11);
1047
+ return L ? V(1, 0) : V(31, 11);
1048
1048
  case d:
1049
- return F ? j(1, B) : j(0, B + 1);
1049
+ return L ? V(1, Q) : V(0, Q + 1);
1050
1050
  case u:
1051
- var z = this.$locale().weekStart || 0, K = (M < z ? M + 7 : M) - z;
1052
- return j(F ? U - K : U + (6 - K), B);
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 W(H + "Hours", 0);
1055
+ return X(oe + "Hours", 0);
1056
1056
  case l:
1057
- return W(H + "Minutes", 1);
1057
+ return X(oe + "Minutes", 1);
1058
1058
  case s:
1059
- return W(H + "Seconds", 2);
1059
+ return X(oe + "Seconds", 2);
1060
1060
  case a:
1061
- return W(H + "Milliseconds", 3);
1061
+ return X(oe + "Milliseconds", 3);
1062
1062
  default:
1063
1063
  return this.clone();
1064
1064
  }
1065
- }, T.endOf = function(x) {
1065
+ }, O.endOf = function(x) {
1066
1066
  return this.startOf(x, !1);
1067
- }, T.$set = function(x, A) {
1068
- var R, F = I.p(x), G = "set" + (this.$u ? "UTC" : ""), j = (R = {}, R[c] = G + "Date", R[m] = G + "Date", R[d] = G + "Month", R[p] = G + "FullYear", R[l] = G + "Hours", R[s] = G + "Minutes", R[a] = G + "Seconds", R[i] = G + "Milliseconds", R)[F], W = F === c ? this.$D + (A - this.$W) : A;
1069
- if (F === d || F === p) {
1070
- var M = this.clone().set(m, 1);
1071
- M.$d[j](W), M.init(), this.$d = M.set(m, Math.min(this.$D, M.daysInMonth())).$d;
1072
- } else j && this.$d[j](W);
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
- }, T.set = function(x, A) {
1074
+ }, O.set = function(x, A) {
1075
1075
  return this.clone().$set(x, A);
1076
- }, T.get = function(x) {
1076
+ }, O.get = function(x) {
1077
1077
  return this[I.p(x)]();
1078
- }, T.add = function(x, A) {
1079
- var R, F = this;
1078
+ }, O.add = function(x, A) {
1079
+ var R, L = this;
1080
1080
  x = Number(x);
1081
- var G = I.p(A), j = function(B) {
1082
- var U = S(F);
1083
- return I.w(U.date(U.date() + Math.round(B * x)), F);
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 (G === d) return this.set(d, this.$M + x);
1086
- if (G === p) return this.set(p, this.$y + x);
1087
- if (G === c) return j(1);
1088
- if (G === u) return j(7);
1089
- var W = (R = {}, R[s] = n, R[l] = o, R[a] = r, R)[G] || 1, M = this.$d.getTime() + x * W;
1090
- return I.w(M, this);
1091
- }, T.subtract = function(x, A) {
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
- }, T.format = function(x) {
1093
+ }, O.format = function(x) {
1094
1094
  var A = this, R = this.$locale();
1095
1095
  if (!this.isValid()) return R.invalidDate || g;
1096
- var F = x || "YYYY-MM-DDTHH:mm:ssZ", G = I.z(this), j = this.$H, W = this.$m, M = this.$M, B = R.weekdays, U = R.months, H = R.meridiem, z = function(Y, Q, re, ne) {
1097
- return Y && (Y[Q] || Y(A, F)) || re[Q].slice(0, ne);
1098
- }, K = function(Y) {
1099
- return I.s(j % 12 || 12, Y, "0");
1100
- }, J = H || function(Y, Q, re) {
1101
- var ne = Y < 12 ? "AM" : "PM";
1102
- return re ? ne.toLowerCase() : ne;
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 F.replace(v, function(Y, Q) {
1105
- return Q || function(re) {
1106
- switch (re) {
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 M + 1;
1112
+ return Z + 1;
1113
1113
  case "MM":
1114
- return I.s(M + 1, 2, "0");
1114
+ return I.s(Z + 1, 2, "0");
1115
1115
  case "MMM":
1116
- return z(R.monthsShort, M, U, 3);
1116
+ return le(R.monthsShort, Z, re, 3);
1117
1117
  case "MMMM":
1118
- return z(U, M);
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 z(R.weekdaysMin, A.$W, B, 2);
1126
+ return le(R.weekdaysMin, A.$W, Q, 2);
1127
1127
  case "ddd":
1128
- return z(R.weekdaysShort, A.$W, B, 3);
1128
+ return le(R.weekdaysShort, A.$W, Q, 3);
1129
1129
  case "dddd":
1130
- return B[A.$W];
1130
+ return Q[A.$W];
1131
1131
  case "H":
1132
- return String(j);
1132
+ return String(V);
1133
1133
  case "HH":
1134
- return I.s(j, 2, "0");
1134
+ return I.s(V, 2, "0");
1135
1135
  case "h":
1136
- return K(1);
1136
+ return fe(1);
1137
1137
  case "hh":
1138
- return K(2);
1138
+ return fe(2);
1139
1139
  case "a":
1140
- return J(j, W, !0);
1140
+ return G(V, X, !0);
1141
1141
  case "A":
1142
- return J(j, W, !1);
1142
+ return G(V, X, !1);
1143
1143
  case "m":
1144
- return String(W);
1144
+ return String(X);
1145
1145
  case "mm":
1146
- return I.s(W, 2, "0");
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 G;
1154
+ return j;
1155
1155
  }
1156
1156
  return null;
1157
- }(Y) || G.replace(":", "");
1157
+ }(U) || j.replace(":", "");
1158
1158
  });
1159
- }, T.utcOffset = function() {
1159
+ }, O.utcOffset = function() {
1160
1160
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1161
- }, T.diff = function(x, A, R) {
1162
- var F, G = this, j = I.p(A), W = S(x), M = (W.utcOffset() - this.utcOffset()) * n, B = this - W, U = function() {
1163
- return I.m(G, W);
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 (j) {
1165
+ switch (V) {
1166
1166
  case p:
1167
- F = U() / 12;
1167
+ L = re() / 12;
1168
1168
  break;
1169
1169
  case d:
1170
- F = U();
1170
+ L = re();
1171
1171
  break;
1172
1172
  case f:
1173
- F = U() / 3;
1173
+ L = re() / 3;
1174
1174
  break;
1175
1175
  case u:
1176
- F = (B - M) / 6048e5;
1176
+ L = (Q - Z) / 6048e5;
1177
1177
  break;
1178
1178
  case c:
1179
- F = (B - M) / 864e5;
1179
+ L = (Q - Z) / 864e5;
1180
1180
  break;
1181
1181
  case l:
1182
- F = B / o;
1182
+ L = Q / o;
1183
1183
  break;
1184
1184
  case s:
1185
- F = B / n;
1185
+ L = Q / n;
1186
1186
  break;
1187
1187
  case a:
1188
- F = B / r;
1188
+ L = Q / r;
1189
1189
  break;
1190
1190
  default:
1191
- F = B;
1191
+ L = Q;
1192
1192
  }
1193
- return R ? F : I.a(F);
1194
- }, T.daysInMonth = function() {
1193
+ return R ? L : I.a(L);
1194
+ }, O.daysInMonth = function() {
1195
1195
  return this.endOf(d).$D;
1196
- }, T.$locale = function() {
1197
- return b[this.$L];
1198
- }, T.locale = function(x, A) {
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(), F = O(x, A, !0);
1201
- return F && (R.$L = F), R;
1202
- }, T.clone = function() {
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
- }, T.toDate = function() {
1204
+ }, O.toDate = function() {
1205
1205
  return new Date(this.valueOf());
1206
- }, T.toJSON = function() {
1206
+ }, O.toJSON = function() {
1207
1207
  return this.isValid() ? this.toISOString() : null;
1208
- }, T.toISOString = function() {
1208
+ }, O.toISOString = function() {
1209
1209
  return this.$d.toISOString();
1210
- }, T.toString = function() {
1210
+ }, O.toString = function() {
1211
1211
  return this.$d.toUTCString();
1212
- }, N;
1213
- }(), k = L.prototype;
1214
- return S.prototype = k, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", d], ["$y", p], ["$D", m]].forEach(function(N) {
1215
- k[N[1]] = function(T) {
1216
- return this.$g(T, N[0], N[1]);
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(N, T) {
1219
- return N.$i || (N(T, L, S), N.$i = !0), S;
1220
- }, S.locale = O, S.isDayjs = D, S.unix = function(N) {
1221
- return S(1e3 * N);
1222
- }, S.en = b[w], S.Ls = b, S.p = {}, S;
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), C = e.format(t), y = e.subtract(2, "day").format(t), E = e.subtract(3, "day").format(t), w = e.subtract(7, "day").format(t), b = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), D = e.subtract(2, "week").startOf("week").format(t), O = e.subtract(2, "month").format(t), S = e.subtract(3, "month").format(t), I = e.subtract(6, "month").format(t), L = e.subtract(1, "year").startOf("year").format(t), k = e.subtract(2, "year").startOf("year").format(t), N = e.subtract(3, "year").format(t), T = e.subtract(5, "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: C,
1291
+ now: b,
1292
1292
  twoDay: y,
1293
1293
  threeDay: E,
1294
1294
  sevenDay: w,
1295
- fifteenDay: b,
1295
+ fifteenDay: C,
1296
1296
  thirtyDay: $,
1297
1297
  twoWeek: D,
1298
- twoMonth: O,
1298
+ twoMonth: T,
1299
1299
  threeMonth: S,
1300
1300
  sixMonth: I,
1301
- oneYear: L,
1302
- twoYear: k,
1303
- threeYear: N,
1304
- fiveYear: T
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: C, lastYearEnd: y, now: E, twoDay: w, threeDay: b, sevenDay: $, fifteenDay: D, thirtyDay: O, twoWeek: S, twoMonth: I, threeMonth: L, sixMonth: k, oneYear: N, twoYear: T, threeYear: x, fiveYear: A } = getDateRanges(), R = ref([]), F = ref([]), G = computed(() => {
1379
- let V = reactive({});
1380
- return F.value.forEach((X) => {
1381
- V[X.columnName] = X;
1382
- }), V;
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 j = !1;
1384
+ let V = !1;
1385
1385
  watch(
1386
1386
  () => n.config,
1387
1387
  () => {
1388
- W();
1388
+ X();
1389
1389
  },
1390
1390
  {
1391
1391
  immediate: !0,
1392
1392
  deep: !0
1393
1393
  }
1394
1394
  );
1395
- function W() {
1396
- j = !1;
1397
- let V = [];
1395
+ function X() {
1396
+ V = !1;
1397
+ let N = [];
1398
1398
  R.value = [];
1399
- const X = [];
1399
+ const F = [];
1400
1400
  if (n.config && n.config.length)
1401
- for (let q = 0; q < n.config.length; q++) {
1402
- const ee = cloneDeep(n.config[q]);
1403
- let { dataType: Z, dateType: oe, type: te, selectorId: se, cellIndex: ie, cellIndexSort: le, cellIndexSortOrder: he, cellIndexSortNumeric: pe, name: ge, columnName: fe, defaultValue: me, isNull: Ee } = ee, ye = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(Z);
1404
- const { componentName: ve, placeholerPrefix: _e, type: we } = componentTransition(Z, oe);
1405
- let de = {
1406
- ...ee,
1407
- elWidth: ee.elWidth || 210,
1408
- formItemType: ve,
1409
- placeholder: rct(_e + ge || fe),
1410
- type: we || "",
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 (de.value = B(de, ye), R.value.push({
1415
- name: fe,
1416
- value: de.value,
1414
+ if (he.value = Q(he, _e), R.value.push({
1415
+ name: ye,
1416
+ value: he.value,
1417
1417
  type: te,
1418
- isNull: Ee
1419
- }), ee.customOptions)
1420
- de.optionData = ee.customOptions.split(",").map((ce) => ce.trim()).filter(Boolean).map((ce) => ({ label: ce, value: ce }));
1421
- else if (se) {
1422
- const ce = z(se, de);
1423
- X.push(ce);
1424
- } else ie && (o("addCell", ie), on(`cell-change:${ie}`, (ce) => {
1425
- if (ce = Object.values(ce), ce && Array.isArray(ce) && ce.length) {
1426
- if (le) {
1427
- const Ce = createGroupSortComparator({ order: he, numeric: pe });
1428
- ce.sort((be, $e) => Ce(be.label, $e.label));
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
- de.optionData = ce, triggerRef(F);
1430
+ he.optionData = ue, triggerRef(L);
1431
1431
  }
1432
1432
  }));
1433
- V.push(de), te === "LT_GT_EQ" && !ye && K(de, V, _e, te);
1433
+ N.push(he), te === "LT_GT_EQ" && !_e && G(he, N, Ee, te);
1434
1434
  }
1435
- F.value = V, M(), nextTick(async () => {
1436
- X.length > 0 && await Promise.allSettled(X), j || ue();
1435
+ L.value = N, Z(), nextTick(async () => {
1436
+ F.length > 0 && await Promise.allSettled(F), V || ee();
1437
1437
  });
1438
1438
  }
1439
- function M() {
1440
- Object.entries(i.query).forEach(([V, X]) => {
1441
- if (!V || X === null || X === void 0 || X === "") return;
1442
- const q = Array.isArray(X) ? X.join(",") : X, ee = R.value.findIndex((Z) => Z.name === V);
1443
- if (ee > -1) {
1444
- if (V.indexOf("end_") === 0) {
1445
- R.value[ee].value = q;
1446
- const Z = F.value.find((oe) => oe.columnName === V);
1447
- Z && (Z.value = q);
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: V, value: q, type: "EQ", isNull: !1 });
1451
+ R.value.push({ name: N, value: z, type: "EQ", isNull: !1 });
1452
1452
  });
1453
1453
  }
1454
- function B(V, X) {
1455
- let { dataType: q, dateType: ee, defaultValue: Z, startTime: oe, endTime: te, columnName: se } = V, ie = Z || "";
1456
- if (X && Z)
1457
- ee && (V.type = ee), ee && DATE_RANGE_TYPES.includes(ee) ? ie = U(Z, oe, te) : ie = H(ee, Z, oe);
1458
- else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(q)) {
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[se]) {
1462
- let le = i.query[se];
1463
- ie = Array.isArray(le) ? le : String(le).split(",");
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[se] && (ie = i.query[se]);
1466
+ i.query[ae] && (ie = i.query[ae]);
1467
1467
  return ie;
1468
1468
  }
1469
- function U(V, X, q) {
1470
- let Z = {
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: [C, y],
1475
+ lastYear: [b, y],
1476
1476
  now: [s, E],
1477
1477
  twoDay: [w, E],
1478
- threeDay: [b, E],
1478
+ threeDay: [C, E],
1479
1479
  sevenDay: [$, E],
1480
1480
  fifteenDay: [D, E],
1481
- thirtyDay: [O, E],
1482
- threeMonth: [L, E],
1483
- sixMonth: [k, E],
1484
- oneYear: [N, E],
1485
- twoYear: [T, E],
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
- }[V] || [s, l];
1489
- return X && (Z[0] = ne(Z[0], X, a)), q && (Z[1] = ne(Z[1], q, a)), Z;
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 H(V, X, q) {
1492
- let Z = {
1491
+ function oe(N, F, z) {
1492
+ let W = {
1493
1493
  thisYear: _,
1494
- twoYear: T,
1494
+ twoYear: O,
1495
1495
  threeYear: x,
1496
1496
  fiveYear: A,
1497
1497
  thisMonth: u,
1498
1498
  twoMonth: I,
1499
- threeMonth: L,
1500
- sixMonth: k,
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: b,
1508
+ threeDay: C,
1509
1509
  sevenDay: $,
1510
1510
  fifteenDay: D,
1511
- thirtyDay: O
1512
- }[X];
1513
- if (!Z) {
1514
- let oe = dayjs().startOf(V);
1515
- oe.isValid() ? Z = oe.format(a) : Z = E;
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 q && (Z = ne(Z, q, a)), Z;
1517
+ return z && (W = K(W, z, a)), W;
1518
1518
  }
1519
- function z(V, X) {
1519
+ function le(N, F, z = "", J = !1) {
1520
1520
  return axios.request({
1521
- url: `/windowDesign/getSelectorList?selectorId=${V}`,
1522
- method: "POST"
1523
- }).then((q) => {
1524
- q.data && q.data.data && (X.optionData = q.data.data.map(({ name: ee, value: Z }) => ({
1525
- label: ee,
1526
- value: Z
1527
- })), triggerRef(F));
1528
- }).catch((q) => {
1529
- console.warn(`选择器 ${V} 数据加载失败:`, q), X.optionData = [];
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 K(V, X, q, ee) {
1533
- const { columnName: Z, defaultValue: oe, isNull: te } = V;
1534
- V.placeholder = rct(q + "开始");
1535
- const se = cloneDeep(V);
1536
- se.name = "-", se.columnName = `end_${Z}`, se.placeholder = rct(q + "结束");
1537
- let ie = oe || "";
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_${Z}`,
1554
+ name: `end_${W}`,
1540
1555
  value: ie,
1541
- type: ee,
1556
+ type: J,
1542
1557
  isNull: te
1543
- }), V.selectorId && z(V.selectorId, se), X.push(se);
1558
+ }), N.selectorId && le(N.selectorId, ae, "", !!N.remoteSearch), F.push(ae);
1544
1559
  }
1545
- function J(V) {
1560
+ function U(N) {
1546
1561
  return {
1547
- label: rct(V.name),
1548
- required: V.isNull,
1549
- style: V.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
1562
+ label: rct(N.name),
1563
+ required: N.isNull,
1564
+ style: N.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
1550
1565
  };
1551
1566
  }
1552
- function Y(V) {
1553
- const X = {
1554
- modelValue: V.value,
1555
- type: V.type,
1567
+ function H(N) {
1568
+ const F = {
1569
+ modelValue: N.value,
1570
+ type: N.type,
1556
1571
  clearable: !0,
1557
- placeholder: V.placeholder,
1558
- "onUpdate:modelValue": (q) => Q(q, V)
1572
+ placeholder: N.placeholder,
1573
+ "onUpdate:modelValue": (z) => q(z, N)
1559
1574
  };
1560
- return V.formItemType === "ElDatePicker" && (X["value-format"] = a, DATE_RANGE_TYPES.includes(V.type) && (X.unlinkPanels = !0, X.singlePanel = !!V.singlePanel), DATE_VIEW_FORMAT[V.type] && (X.format = DATE_VIEW_FORMAT[V.type])), ["ElInput"].includes(V.formItemType) && (X.onBlur = () => re(V, "blur"), X.onKeyup = (q) => {
1561
- q.key === "Enter" && re(V, "enter");
1562
- }), ["ElSelect"].includes(V.formItemType) && (X.multiple = !0, X.collapseTags = !0, X.filterable = !0), X;
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 Q(V, X) {
1565
- let q = R.value.findIndex((ee) => ee.name === X.columnName);
1566
- if (X.value = V, R.value[q].value = V, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(X.formItemType)) {
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
- j = !0, ue();
1584
+ V = !0, ee();
1570
1585
  }
1571
1586
  }
1572
- function re(V, X) {
1573
- if (["ElInput", "ElInputNumber"].includes(V.formItemType)) {
1574
- if (X === "blur" && !n.data.searchOnBlur)
1587
+ function Y(N, F) {
1588
+ if (["ElInput", "ElInputNumber"].includes(N.formItemType)) {
1589
+ if (F === "blur" && !n.data.searchOnBlur)
1575
1590
  return !1;
1576
- j = !0, ue();
1591
+ V = !0, ee();
1577
1592
  }
1578
1593
  }
1579
- function ne(V, X, q) {
1580
- if (X && V) {
1581
- let ee = X.split(",").map((oe) => {
1582
- let te = oe.match(/[-+]/).index, se = Number(oe.substring(te)), ie = oe.substring(0, 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: se,
1599
+ count: ae,
1585
1600
  type: ie
1586
1601
  };
1587
- }), Z = dayjs(V);
1588
- Z.isValid() && (ee.forEach(({ count: oe, type: te }) => {
1589
- Z = Z.add(oe, te);
1590
- }), V = Z.format(q));
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 V;
1607
+ return N;
1593
1608
  }
1594
- function ue() {
1595
- let V = cloneDeep(R.value);
1596
- V.forEach(({ name: X, value: q, type: ee, isNull: Z }, oe) => {
1597
- let te = G.value[X];
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(q) && (V[oe].value = q.join(","));
1614
+ Array.isArray(z) && (N[ne].value = z.join(","));
1600
1615
  return;
1601
1616
  }
1602
- if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) && q)
1603
- if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) && q && q.length === 2) {
1604
- let [le, he] = q;
1605
- const pe = DATE_RANGE_PERIOD_UNIT[te.dateType];
1606
- if (pe) {
1607
- const fe = dayjs(le), me = dayjs(he);
1608
- fe.isValid() && (le = fe.startOf(pe).format(a)), me.isValid() && (he = me.endOf(pe).format(a));
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
- V[oe].value = le;
1611
- let ge = `end_${te.columnName}`;
1612
- V.some((fe) => fe.name === ge) || V.push({
1613
- name: ge,
1614
- value: he,
1615
- type: ee,
1616
- isNull: Z
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 le = dayjs(q);
1620
- if (le.isValid() && te.dateType) {
1621
- let he = le.startOf(te.dateType).format(a);
1622
- V[oe].value = ne(he, te.startTime, a);
1623
- let pe = le.endOf(te.dateType).format(a), ge = `end_${te.columnName}`;
1624
- V.some((fe) => fe.name === ge) || V.push({
1625
- name: ge,
1626
- value: ne(pe, te.endTime, a),
1627
- type: ee,
1628
- isNull: Z
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(q) && (V[oe].value = q.join(","));
1633
- }), o("change", V);
1647
+ else Array.isArray(z) && (N[ne].value = z.join(","));
1648
+ }), o("change", N);
1634
1649
  }
1635
1650
  return e({
1636
- changeValue: ue
1651
+ changeValue: ee
1637
1652
  }), onMounted(() => {
1638
- }), (V, X) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
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(F.value, (q) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, J(q)), {
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
- q.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(q.formItemType), mergeProps({
1658
+ z.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
1644
1659
  key: 0,
1645
1660
  ref_for: !0
1646
- }, Y(q), {
1647
- style: { width: `${q.elWidth}px` }
1661
+ }, H(z), {
1662
+ style: { width: `${z.elWidth}px` }
1648
1663
  }), {
1649
1664
  default: withCtx(() => [
1650
- (openBlock(!0), createElementBlock(Fragment, null, renderList(q.optionData, (ee) => (openBlock(), createBlock(unref(ElOption), {
1651
- key: ee.value,
1652
- label: ee.label,
1653
- value: ee.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(q.formItemType), mergeProps({
1672
+ }, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(z.formItemType), mergeProps({
1658
1673
  key: 1,
1659
- style: { width: `${q.elWidth}px` }
1660
- }, { ref_for: !0 }, Y(q)), null, 16, ["style"]))
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, q.isShow]
1679
+ [vShow, z.isShow]
1665
1680
  ])), 256))
1666
1681
  ]),
1667
1682
  _: 1
1668
1683
  }),
1669
- renderSlot(V.$slots, "search")
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, C, y, E, w, b, $, D, O, S, I, L, k = n.constructor, N = n.s == o.s ? 1 : -1, T = n.d, x = o.d;
2981
- if (!T || !T[0] || !x || !x[0])
2982
- return new k(
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 || (T ? x && T[0] == x[0] : !x) ? NaN : (
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
- T && T[0] == 0 || !x ? N * 0 : N / 0
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, O = T.length, v = new k(N), C = v.d = [], d = 0; x[d] == (T[d] || 0); d++) ;
2990
- if (x[d] > (T[d] || 0) && u--, i == null ? (b = i = k.precision, a = k.rounding) : s ? b = i + (n.e - o.e) + 1 : b = i, b < 0)
2991
- C.push(1), m = !0;
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 (b = b / p + 2 | 0, d = 0, I == 1) {
2994
- for (f = 0, x = x[0], b++; (d < O || f) && b--; d++)
2995
- $ = f * l + (T[d] || 0), C[d] = $ / x | 0, f = $ % x | 0;
2996
- m = f || d < O;
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), T = t(T, f, l), I = x.length, O = T.length), D = I, y = T.slice(0, I), E = y.length; E < I; ) y[E++] = 0;
2999
- L = x.slice(), L.unshift(0), S = x[0], x[1] >= l / 2 && ++S;
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 < _ ? L : 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 ? L : x, E, l))), E = y.length) : c === 0 && (f++, y = [0]), C[d++] = f, c && y[0] ? y[E++] = T[D] || 0 : (y = [T[D]], E = 1);
3002
- while ((D++ < O || y[0] !== void 0) && b--);
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
- C[0] || C.shift();
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 = C[0]; f >= 10; f /= 10) d++;
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, C = v.rounding, y = v.precision;
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, C, external = !0) : g;
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, C, s))
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, C, external = !0);
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 C, y, E;
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 = (C = e[f]) == null ? void 0 : C[p]) == null ? void 0 : y.style) == null ? void 0 : E.border) }, l.set(_, v)), v.border[m] = { ...g };
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((C) => {
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, C);
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), C = (_ - v) * 8;
7043
- if (g === o.MIXED) return C;
7044
- const y = C - c(g, p);
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, C, y) {
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: C,
7317
+ mode: b,
7303
7318
  length: w[0].length
7304
7319
  });
7305
7320
  return E;
7306
7321
  }
7307
7322
  function d(v) {
7308
- const C = u(a.NUMERIC, e.NUMERIC, v), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, v);
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 = []), C.concat(y, E, w).sort(function($, D) {
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, C) {
7321
- switch (C) {
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(C, y) {
7334
- const E = C.length - 1 >= 0 ? C[C.length - 1] : null;
7335
- return E && E.mode === y.mode ? (C[C.length - 1].data += y.data, C) : (C.push(y), C);
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 C = [];
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
- C.push([
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
- C.push([
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
- C.push([
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
- C.push([
7378
+ b.push([
7364
7379
  { data: E.data, mode: e.BYTE, length: c(E.data) }
7365
7380
  ]);
7366
7381
  }
7367
7382
  }
7368
- return C;
7383
+ return b;
7369
7384
  }
7370
- function g(v, C) {
7385
+ function g(v, b) {
7371
7386
  const y = {}, E = { start: {} };
7372
7387
  let w = ["start"];
7373
- for (let b = 0; b < v.length; b++) {
7374
- const $ = v[b], D = [];
7375
- for (let O = 0; O < $.length; O++) {
7376
- const S = $[O], I = "" + b + O;
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 L = 0; L < w.length; L++) {
7379
- const k = w[L];
7380
- y[k] && y[k].node.mode === S.mode ? (E[k][I] = f(y[k].lastCount + S.length, S.mode) - f(y[k].lastCount, S.mode), y[k].lastCount += S.length) : (y[k] && (y[k].lastCount = S.length), E[k][I] = f(S.length, S.mode) + 4 + e.getCharCountIndicator(S.mode, C));
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 b = 0; b < w.length; b++)
7386
- E[w[b]].end = 0;
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, C) {
7404
+ function _(v, b) {
7390
7405
  let y;
7391
7406
  const E = e.getBestModeForData(v);
7392
- if (y = e.from(C, E), y !== e.BYTE && y.bit < E.bit)
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(C) {
7407
- return C.reduce(function(y, E) {
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(C, y) {
7411
- const E = d(C, s.isKanjiModeEnabled()), w = m(E), b = g(w, y), $ = l.find_path(b.map, "start", "end"), D = [];
7412
- for (let O = 1; O < $.length - 1; O++)
7413
- D.push(b.table[$[O]].node);
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(C) {
7430
+ }, t.rawSplit = function(b) {
7416
7431
  return t.fromArray(
7417
- d(C, s.isKanjiModeEnabled())
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 C = new Uint8Array(t.buffer);
7510
+ const b = new Uint8Array(t.buffer);
7496
7511
  for (let $ = 0; $ < a; $++) {
7497
7512
  const D = $ < l ? u : d;
7498
- g[$] = C.slice(m, m + D), _[$] = p.encode(g[$]), m += D, v = Math.max(v, D);
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, b;
7516
+ let E = 0, w, C;
7502
7517
  for (w = 0; w < v; w++)
7503
- for (b = 0; b < a; b++)
7504
- w < g[b].length && (y[E++] = g[b][w]);
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 (b = 0; b < a; b++)
7507
- y[E++] = _[b][w];
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
- ae(this, "pool", []);
7689
- ae(this, "maxSize", 10);
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 C, y, E, w, b;
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 = ((C = e.style) == null ? void 0 : C.allowContentOverflow) === !0;
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) ? ((b = e.formatType) == null ? void 0 : b.defaultCellContent) || "" : 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 C = ((u = _.style) == null ? void 0 : u.allowContentOverflow) === !0, y = _.style || {}, E = y.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, w = y.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, b = y.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, $ = y.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
7991
- v.style.paddingTop = `${E}px`, v.style.paddingRight = `${w}px`, v.style.paddingBottom = `${b}px`, v.style.paddingLeft = `${$}px`, v.style.boxSizing = "border-box", v.style.position = "relative", _.rowSpan <= 1 && (C ? v.style.minHeight = `${f.size ?? 25}px` : v.style.height = `${f.size ?? 25}px`);
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 _ = 0; _ < t.length; _++) {
8010
- const v = t[_];
8011
- if (v.isHidden)
8025
+ for (let v = 0; v < t.length; v++) {
8026
+ const b = t[v];
8027
+ if (b.isHidden)
8012
8028
  continue;
8013
- const C = document.createElement("tr");
8014
- C.dataset.ri = String(g), v.isFixed && (C.style.top = `${c - 1}px`, C.classList.add("fixed-row")), c += (v.size ?? 25) - 1, C.style.height = `${v.size ?? 25}px`, u = 0;
8015
- for (let y = 0; y < e.length; y++) {
8016
- const E = e[y];
8017
- if (E.isHidden)
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 w = r[_][y];
8020
- if (v && w && (v.size ?? 25) > 0) {
8021
- const b = renderCell(v, w, i);
8022
- if (E.isFixed === !0 && (b.classList.add("fixed-td"), b.style.position = "sticky", b.style.left = `${u - 1}px`), u += (E.size ?? 80) - 1, b.setAttribute("data-cell-data", `${_}-${y}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8023
- if (w.style && w.style.border === !1 && b.classList.add("no-border"), C.appendChild(b), w.rowSpan > 1) {
8024
- const $ = f.length;
8025
- f.push(b), p.push(w.rowSpan);
8026
- for (let D = 1; D < w.rowSpan; D++) {
8027
- const O = g + D;
8028
- m.has(O) || m.set(O, []), m.get(O).push($);
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(C), g++;
8055
+ d.appendChild(y), g++;
8035
8056
  }
8036
8057
  if (f.length > 0) {
8037
- let _ = -1;
8038
- const v = () => {
8039
- var C;
8040
- _ >= 0 && ((C = m.get(_)) == null || C.forEach((y) => f[y].classList.remove("merge-hover"))), _ = -1;
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", (C) => {
8043
- var w;
8044
- const y = C.target.closest("tr");
8045
- if (!y) return;
8046
- const E = Number(y.dataset.ri);
8047
- E !== _ && (v(), _ = E, (w = m.get(E)) == null || w.forEach((b) => f[b].classList.add("merge-hover")));
8048
- }), s.addEventListener("mouseleave", v);
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((C) => C.colGroupIndex === g).map(
8416
- (C) => {
8436
+ d = getCellValue(m).filter((b) => b.colGroupIndex === g).map(
8437
+ (b) => {
8417
8438
  var y;
8418
- return [null, void 0, ""].includes(C.rawData) ? (y = C.formatType) == null ? void 0 : y.defaultCellContent : C.rawData;
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 C = parseFloat(v[g]);
8499
- _ = _.times(isNaN(C) ? 0 : C);
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 C = a[m].data.replace("col:", "").toUpperCase();
8658
+ let b = a[m].data.replace("col:", "").toUpperCase();
8620
8659
  if (g === 0)
8621
8660
  i.forEach((y) => {
8622
- if (C) {
8623
- let E = y[C];
8661
+ if (b) {
8662
+ let E = y[b];
8624
8663
  E || (E = "-");
8625
- const w = getSeparatorKey("child", m, E), b = getSeparatorKey("data", E);
8626
- l[w] ? l[w].push(y) : l[w] = [y], l[_].add(E), l[E] = [E], l[b] = [y];
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((b) => {
8633
- const $ = getSeparatorKey("child", y, b);
8634
- let O = (l[$] || []).map((S) => {
8635
- if (C) {
8636
- let I = S[C];
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 L = !1;
8639
- const k = getSeparatorKey("child", m, b, I), N = getSeparatorKey(b, I), T = getSeparatorKey("data", N);
8640
- return l[k] ? l[k].push(S) : l[k] = [S], l[T] ? l[T].push(S) : l[T] = [S], l[_].has(N) || (L = !0), l[_].add(N), l[N] = l[b].concat([I]), L ? I : null;
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[$] = O;
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", _), C = Array.from(l[v]);
8655
- C.length > 1 && C.sort(createGroupSortComparator(g)), l[v] = new Set(C);
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 C = l[v];
8665
- return g + C.length;
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((C) => C.index === o.index);
8709
+ const g = a[m], _ = t.findIndex((b) => b.index === o.index);
8671
8710
  if (m === 0) {
8672
- const C = {
8711
+ const b = {
8673
8712
  ...o,
8674
8713
  loop: !1
8675
- }, y = Array.from({ length: u }, () => cloneDeep(C));
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 C = [];
8719
+ let b = [];
8681
8720
  if (s.includes(m)) {
8682
8721
  const y = getSeparatorKey("key", g.row);
8683
- Array.from(l[y]).forEach((w, b) => {
8684
- const $ = p && m === d ? 1 : getGroupMinChildrenLength(l, w, d, p, s), D = l[w], O = D[D.length - 1], S = getSeparatorKey("data", w), I = l[S];
8685
- let L = {
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: O,
8726
+ text: T,
8688
8727
  colSpan: $,
8689
8728
  colData: I
8690
8729
  };
8691
- if (C.push(L), $ > 1) {
8692
- let k = {
8730
+ if (b.push(B), $ > 1) {
8731
+ let M = {
8693
8732
  ...g,
8694
- text: O,
8733
+ text: T,
8695
8734
  type: "",
8696
8735
  colSpan: 0,
8697
8736
  rowSpan: 0
8698
8737
  };
8699
- for (let N = 0; N < $ - 1; N++)
8700
- C.push(k);
8738
+ for (let k = 0; k < $ - 1; k++)
8739
+ b.push(M);
8701
8740
  }
8702
- }), v.splice(g.col, 1, ...C);
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 b = w.colData;
8710
- return Array.isArray(b) && (b = b[0]), {
8748
+ let C = w.colData;
8749
+ return Array.isArray(C) && (C = C[0]), {
8711
8750
  ...g,
8712
- colData: b,
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 b = s.map((D) => a[D].data.replace("col:", "").toUpperCase()), $ = [];
8725
- E.forEach((D, O) => {
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: b,
8767
+ combineKeys: C,
8729
8768
  combineValues: l[D],
8730
- colGroupIndex: O
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((b, $) => {
8774
+ E.forEach((C, $) => {
8736
8775
  let D = [];
8737
- const O = getSeparatorKey("data", b);
8738
- l[O].forEach((I) => {
8739
- let L = {
8776
+ const T = getSeparatorKey("data", C);
8777
+ l[T].forEach((I) => {
8778
+ let B = {
8740
8779
  ...g
8741
8780
  };
8742
- delete L.combineKeys, delete L.combineValues, delete L.isRowColCombine, I[w] !== void 0 ? (L.rawData = I[w], L.colData = I) : L.rawData = "", D.push(L);
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 b = [];
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 = "", b.push(D);
8752
- }), v.splice(g.col, 1, ...b);
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 [b, $] = g.mergeTarget, D = r.reduce((O, S) => O.concat(S), []).filter((O) => O.row === b && O.col === $)[0];
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 C = v[c];
8892
- C || (C = "[" + c + "]");
8930
+ let b = v[c];
8931
+ b || (b = "[" + c + "]");
8893
8932
  let y = !1;
8894
- const E = getSeparatorKey("child", i, p, C), w = getSeparatorKey(p, C), b = getSeparatorKey("data", w);
8895
- return n[E] ? n[E].push(v) : n[E] = [v], n[b] ? n[b].push(v) : n[b] = [v], n[s].has(w) || (y = !0), n[s].add(w), n[w] = n[p].concat([C]), y ? C : null;
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 C = u[v];
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 b = e.indexOf(_.col);
8990
+ const C = e.indexOf(_.col);
8952
8991
  E.forEach(($, D) => {
8953
- let O;
8954
- v === s && (i || a) ? O = 1 : O = getGroupMinChildrenLength(n, $, s, a, i);
8955
- const S = n[$], I = S[S.length - 1], L = getSeparatorKey("data", $);
8956
- n[L];
8957
- let k = {
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: O,
9000
+ rowSpan: T,
8962
9001
  rawData: formatGroupText(I),
8963
- groupLevel: b,
9002
+ groupLevel: C,
8964
9003
  groupIndices: D,
8965
9004
  groupChildIndex: 0,
8966
9005
  computedType: ComputedType.loopRow
8967
9006
  };
8968
- C.push(k);
8969
- let N = {
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: b,
9014
+ groupLevel: C,
8976
9015
  groupIndices: D,
8977
9016
  computedType: ComputedType.loopRow,
8978
- mergeTarget: [k.row, k.col]
9017
+ mergeTarget: [M.row, M.col]
8979
9018
  };
8980
- for (let T = 0; T < O - 1; T++) {
8981
- let x = cloneDeep(N);
8982
- x.index = w + T + 1, x.groupChildIndex = T + 1, C.push(x);
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 += O, k.loopGroupRowIndex !== void 0 && k.loopGroupRowIndex !== "" && !isNaN(k.loopGroupRowIndex)) {
8985
- let T = cloneDeep(l[k.loopGroupRowIndex]), x = cloneDeep(c[k.loopGroupRowIndex]).map((R) => (R.type === CellType.FUN && R.fun && (R.groupIndices = D, R.groupLevel = b, R.computedType = ComputedType.loopGroup), R)), A = 0;
8986
- if (b >= 0) {
8987
- let R = b;
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 F = e[R], j = u[F][w];
8990
- j && j.groupIndices !== void 0 && !isNaN(j.groupIndices) && (A = A + j.groupIndices), R--;
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}:${b}:${w}`, {
8994
- row: T,
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((b, $) => {
9006
- const D = getSeparatorKey("child", s, b);
9007
- let O = n[D], S = _.combineKeys ? _.combineKeys.map((k, N) => {
9008
- const T = _.combineValues ? _.combineValues[N] : void 0;
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: k,
9011
- val: T
9049
+ key: M,
9050
+ val: O
9012
9051
  };
9013
9052
  }) : [];
9014
- const I = O.filter((k) => S.every((N) => k[N.key] === N.val));
9015
- let L = {
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 L.combineKeys, delete L.combineValues, delete L.isRowColCombine, I && I.length) {
9020
- const k = I.map((N) => y ? N[y] : void 0);
9021
- L.rawData = _.mergedValueAggregation ? aggregateMergedValues(k, _.mergedValueAggregation) : I[0][y], L.rowData = I[0];
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
- L.rawData = "", L.rowData = {};
9024
- C.push(L);
9025
- }) : r.forEach((b, $) => {
9026
- let O = (_.combineKeys ? _.combineKeys.map((I, L) => {
9027
- const k = _.combineValues ? _.combineValues[L] : void 0;
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: k
9069
+ val: M
9031
9070
  };
9032
- }) : []).every((I) => b[I.key] === I.val), S = {
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, O ? (S.rawData = y ? b[y] : "", S.rowData = b) : (S.rawData = "", S.rowData = b), S.type === CellType.FUN && S.fun && (S.computedType = ComputedType.loopRow), C.push(S);
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 b = {
9079
+ let C = {
9041
9080
  index: w,
9042
9081
  ..._
9043
9082
  };
9044
- delete b.combineKeys, delete b.combineValues, delete b.isRowColCombine, y && E[y] !== void 0 ? b.rawData = E[y] : b.rawData = "", b.rowData = E, b.computedType = ComputedType.loopRow, C.push(b);
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 O = {
9090
+ let T = {
9052
9091
  index: D,
9053
9092
  ..._
9054
9093
  };
9055
- delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, y && $[y] !== void 0 ? O.rawData = $[y] : O.rawData = "", O.rowData = $, O.computedType = ComputedType.loopRow, C.push(O);
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 b = [];
9098
+ const C = [];
9060
9099
  if (w.forEach(($, D) => {
9061
9100
  if (a) {
9062
- const O = getSeparatorKey("child", s, $);
9063
- let S = n[O] || [];
9064
- b.push(S);
9101
+ const T = getSeparatorKey("child", s, $);
9102
+ let S = n[T] || [];
9103
+ C.push(S);
9065
9104
  } else {
9066
- const O = getSeparatorKey("child", s, $);
9067
- let S = n[O] || [];
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((L) => {
9070
- let k = {
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 k.combineKeys, delete k.combineValues, delete k.isRowColCombine, y && L && L[y] !== void 0 ? k.rawData = L[y] : k.rawData = "", k.rowData = L, k.computedType = ComputedType.loopRow, C.push(k);
9077
- }) : C.push({
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(...b.map((O) => O.length));
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: b,
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, O = c.reduce((S, I) => S.concat(I), []).filter((S) => S.row === $ && S.col === D)[0];
9108
- O && (O.rowSpan += o - 1);
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 b = Array.from({ length: o - 1 }, () => cloneDeep(w));
9119
- C.push(E, ...b);
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((b, $) => {
9123
- const D = getSeparatorKey("data", b), O = n[D];
9124
- C.push({
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: O ? O[0] : void 0
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
- C.push({
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
- C.push({
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: C, groupColumnLoopItems: y, dataKey: E }) => {
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 b = [];
9195
+ const C = [];
9157
9196
  y.forEach(($, D) => {
9158
- const O = $[w];
9197
+ const T = $[w];
9159
9198
  let S = {
9160
9199
  index: D,
9161
- ...C
9200
+ ...b
9162
9201
  };
9163
- delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, E && O && O[E] !== void 0 ? (S.rawData = O[E], S.rowData = O) : (S.rawData = "", S.rowData = O || {}), S.computedType = ComputedType.loopRow, b.push(S);
9164
- }), w === 0 ? u[_] = b : u.splice(_ + w, 0, b);
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
- }, C = [], { rowBaseCols: y, loopGroupRows: E, groupColumnLoopData: w } = generateRowStructure(u, d, l, f, p, m, g, _, t, r);
9185
- let b = transpose(y);
9186
- if (b.forEach(() => {
9187
- C.push(cloneDeep(v));
9188
- }), E.forEach(({ row: $, cells: D, removeCount: O }, S) => {
9189
- let [I, L, k] = S.split(":").map((A) => parseInt(A));
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 N = k + O;
9192
- let T = b[N];
9230
+ const k = M + T;
9231
+ let O = C[k];
9193
9232
  D = D.map((A, R) => {
9194
- let F = T[R];
9195
- if (R < L) {
9196
- let G = [];
9197
- b.forEach((M, B) => {
9198
- B <= N && M.forEach((U, H) => {
9199
- H === R && U.rowSpan >= 1 && ["", "field"].includes(U.type) && G.push(B);
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 j = Math.max(...G), W = b[j][R];
9203
- W && (W.rowSpan += 1, A.mergeTarget = [W.row, W.col]), A.rowSpan = 0, A.colSpan = 0;
9204
- } else if (F && F.type === CellType.TEXT) {
9205
- let G = b[0][R];
9206
- G.rowSpan += 1, A.rowSpan = 0, A.colSpan = 0, A.mergeTarget = [G.row, G.col];
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 = F ? !!F.isGroup : !1, A.groupIndices = F ? F.groupIndices : !1, A.linkedMergeCell = F ? !!F.linkedMergeCell : !1, A.linkedColIndex = F ? F.linkedColIndex : { rowSpan: 1, colSpan: 1 }, A.isLoopGroupComputedCell = !0, A;
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 = N + 1;
9211
- C.splice(x, 0, $), b.splice(x, 0, D);
9212
- }), b = mergeSameCells(b), b.forEach(($, D) => {
9213
- let O = [];
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) && O.push(S.groupIndices);
9216
- }), O.length > 0 && $.forEach((S) => {
9217
- S && (S.groupIndices = O);
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, ...C), r.splice(c, 1, ...b), w) {
9220
- const { index: $, count: D } = w, O = n[$], S = [];
9221
- for (let L = 0; L < D; L++)
9222
- S.push(cloneDeep(O));
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 L = 0; L < c; L++) {
9225
- const k = r[L], N = [];
9226
- for (let T = 0; T < D; T++) {
9227
- const x = cloneDeep(k[$]);
9228
- T === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
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
- k.splice($, k.length - $, ...N);
9269
+ M.splice($, M.length - $, ...k);
9231
9270
  }
9232
- const I = c + b.length;
9233
- for (let L = I; L < r.length; L++) {
9234
- const k = r[L], N = [];
9235
- for (let T = 0; T < D; T++) {
9236
- const x = cloneDeep(k[$]);
9237
- T === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
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
- k.splice($, k.length - $, ...N);
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 C = m[v];
9561
- if (C && C.isHidden)
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 b = a.getRow(l + v + 1);
9567
- C && C.size && !isNaN(C.size) ? C.size > 0 ? b.height = C.size < 25 ? 25 : C.size : b.hidden = !0 : b.height = 25;
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[$], O = b.getCell($ + 1);
9570
- let { style: S, col: I, row: L, colSpan: k, rowSpan: N, format: T, formatType: x } = D;
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), O.font = A, S && S.border) {
9575
- const j = normalizeBorder(S.border);
9576
- if (j) {
9577
- const W = themeColors[r] || "#333333", M = (B) => {
9578
- if (!(!B || !B.style || B.style === "none"))
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: B.style,
9581
- color: { argb: "FF" + (B.color || W).replace("#", "") }
9619
+ style: Q.style,
9620
+ color: { argb: "FF" + (Q.color || X).replace("#", "") }
9582
9621
  };
9583
9622
  };
9584
- O.border = {
9585
- top: M(j.top),
9586
- left: M(j.left),
9587
- bottom: M(j.bottom),
9588
- right: M(j.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) && (O.border = {
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
- O.fill = {
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 j = `${r}${v % 2}`;
9607
- O.fill = {
9645
+ const V = `${r}${v % 2}`;
9646
+ T.fill = {
9608
9647
  type: "pattern",
9609
9648
  pattern: "solid",
9610
9649
  fgColor: {
9611
- argb: "FF" + themeColors[j].replace("#", "")
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), O.alignment = R;
9621
- const F = N && !isNaN(N) && N > 1, G = k && !isNaN(k) && k > 1;
9622
- if (F || G) {
9623
- const j = l + v + 1, W = $ + 1;
9624
- let M = j, B = W;
9625
- j && (M += N - 1), W && (B += k - 1), s.push([j, W, M, B]);
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 (T && T === "number") {
9628
- let j = "", W = "";
9629
- x && (x.numberUseGrouping && (j = x.numberUseGrouping), x.numberDecimal && (W = x.numberDecimal)), O.numFmt = generateNumFmt(j, W), O.value = Number(D.text);
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((M) => ({
9733
- v1f6da291: p.value.border,
9734
- v507c6dda: p.value.background,
9735
- v037dc34d: p.value.evenBackground,
9736
- v47318afd: p.value.fixedBackground,
9737
- v5ff2ff92: p.value.fixedEvenBackground,
9738
- e4d25a76: p.value.hoverBackground,
9739
- v7dce3cb8: p.value.activeColor
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(), u = shallowRef([]), d = shallowRef([]), f = computed(() => {
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 M = a.value;
9787
+ const G = a.value;
9747
9788
  return {
9748
- width: `${mmToPx(M.width)}px`,
9749
- padding: `${n.index === 0 ? mmToPx(M.marginTop) : 0}px ${mmToPx(M.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(M.marginBottom) : 0}px ${mmToPx(M.marginLeft)}px`
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
- }), p = computed(() => getThemeColors(n.config.theme || "none")), m = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), g = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.length > 0), _ = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((M) => M.isShow).length > 0), v = reactive({
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
- }), C = ref([]), y = ref([]), E = (M) => {
9762
- let B = 0, U = M;
9763
- if (M.includes("!")) {
9764
- let Y = M.split("!");
9765
- B = parseInt(Y[0]), U = Y[1];
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 H = U.match(/[A-Z]+/)[0], z = U.match(/\d+/)[0] - 1, K = columnToNumber(H), J = `${B}:${z}:${K}`;
9768
- y.value.includes(J) || y.value.push(J);
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 w(M) {
9771
- if ($ && n.config.data.autoQuery === !1)
9772
- return $ = !1, !1;
9773
- C.value = M, v.pageIndex = 1, F();
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 b = !1, $ = !0;
9816
+ let T = !1, S = !0;
9776
9817
  watch(
9777
- () => [v.pageSize, v.pageIndex],
9778
- (M, B) => {
9779
- if (M && B) {
9780
- let [U, H] = M, [z, K] = M;
9781
- U !== z && (v.pageIndex = 1), b && F();
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 D() {
9790
- var M;
9791
- (M = s.value) == null || M.changeValue();
9792
- }
9793
- const O = computed(() => n.config.exportMethod === "send" && window.opener), S = computed(() => O.value ? "保存" : "导出");
9794
- async function I() {
9795
- if (u.value && u.value.length) {
9796
- let M = await exportReport(
9797
- u.value,
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 (M === null) {
9844
+ if (G === null) {
9804
9845
  await ElMessageBox.alert("表格导出失败");
9805
9846
  return;
9806
9847
  }
9807
- n.config.exportMethod === "send" && window.opener ? sendReport(M) : downloadReport(M, n.name, "excel");
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 L() {
9852
+ async function O() {
9812
9853
  if (n.config && c.value && n.config.data.source) {
9813
- let M = [];
9854
+ let G = [];
9814
9855
  try {
9815
- M = await j(!0);
9816
- } catch (z) {
9856
+ G = await le(!0);
9857
+ } catch (Y) {
9817
9858
  o("report-error", {
9818
9859
  index: n.index,
9819
- message: getErrorMessage(z)
9860
+ message: getErrorMessage(Y)
9820
9861
  });
9821
9862
  return;
9822
9863
  }
9823
- let B = G(M);
9824
- n.config.data.processData && (B = await getProcessData(
9864
+ let U = oe(G);
9865
+ if (n.config.data.processData && (U = await getProcessData(
9825
9866
  n.config.data.processData,
9826
- B,
9827
- C.value,
9828
- v
9829
- ));
9830
- let U = [];
9831
- const H = [];
9832
- for (let z = 0; z < n.config.tableConfig.length; z++) {
9833
- const K = n.config.tableConfig[z];
9834
- let { rowConfig: J, colConfig: Y, config: Q } = cloneDeep(K), re = getLoopItem(Y, B, "col", Q), ne = getLoopItem(J, B, "row", Q);
9835
- re.length && loopGroupCols(Y, re, Q, B), ne.length && loopGroupRows(J, ne, Q, Y, B);
9836
- const ue = transformArrayToObject(B, n.config.data.source);
9837
- computeCell(Q, ue, void 0, z), U.push({
9838
- config: Q,
9839
- rowConfig: J,
9840
- colConfig: Y
9841
- }), H.push({ config: Q });
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(H), U && U.length) {
9844
- let z = await exportReport(
9845
- U,
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 (z === null) {
9895
+ if (Y === null) {
9852
9896
  await ElMessageBox.alert("表格导出失败");
9853
9897
  return;
9854
9898
  }
9855
- n.config.exportMethod === "send" && window.opener ? sendReport(z) : downloadReport(z, n.name, "excel");
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 k = ref(!1), N = ref(!1);
9862
- async function T(M, B) {
9863
- let U = !1, { rowConfig: H, colConfig: z, config: K } = cloneDeep(M), J = getLoopItem(z, B, "col", K), Y = getLoopItem(H, B, "row", K);
9864
- J.length && (U = !0, loopGroupCols(z, J, K, B)), Y.length && (U = !0, loopGroupRows(H, Y, K, z, B));
9865
- const Q = transformArrayToObject(B, n.config.data.source);
9866
- return computeCell(K, Q, y.value), await preGenerateBarcodes([{ config: K }]), {
9867
- reportConfig: { config: K, rowConfig: H, colConfig: z },
9868
- hasLoop: U
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 x(M, B) {
9872
- const U = M[B];
9873
- if (!(!Array.isArray(U) || U.length === 0)) {
9874
- d.value = [], l.value.innerHTML = "";
9875
- for (const H of U) {
9876
- const z = { ...M, ...H, [B]: [H] }, K = [];
9877
- for (const J of n.config.tableConfig) {
9878
- const { reportConfig: Y, hasLoop: Q } = await T(J, z);
9879
- K.push(Y), renderReportByDom(
9880
- Y.rowConfig,
9881
- Y.colConfig,
9882
- Y.config,
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
- Q,
9885
- p.value.border
9928
+ F,
9929
+ _.value.border
9886
9930
  );
9887
9931
  }
9888
- d.value.push(K);
9932
+ m.value.push(K);
9889
9933
  }
9890
9934
  }
9891
9935
  }
9892
- async function A(M) {
9936
+ async function j(G) {
9893
9937
  if (n.config && c.value)
9894
- if (console.time("renderReport"), u.value = [], N.value = !!n.config.tableConfig, N.value) {
9938
+ if (console.time("renderReport"), p.value = [], A.value = !!n.config.tableConfig, A.value) {
9895
9939
  l.value.innerHTML = "";
9896
- const B = [];
9897
- for (let U = 0; U < n.config.tableConfig.length; U++) {
9898
- const H = n.config.tableConfig[U];
9899
- let z = !1, { rowConfig: K, colConfig: J, config: Y } = cloneDeep(H), Q = getLoopItem(J, M, "col", Y), re = getLoopItem(K, M, "row", Y);
9900
- Q.length && (z = !0, loopGroupCols(J, Q, Y, M)), re.length && (z = !0, loopGroupRows(K, re, Y, J, M));
9901
- const ne = transformArrayToObject(M, n.config.data.source);
9902
- computeCell(Y, ne, y.value, U), B.push({ config: Y, rowConfig: K, colConfig: J, hasLoop: z }), u.value.push({
9903
- config: Y,
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: J
9949
+ colConfig: ee
9906
9950
  });
9907
9951
  }
9908
- await preGenerateBarcodes(B), B.forEach((U) => {
9909
- renderReportByDom(U.rowConfig, U.colConfig, U.config, l, U.hasLoop, p.value.border);
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 U = l.value.querySelectorAll(".yh-report-table-context");
9912
- let H = 0;
9913
- if (U.forEach((z) => {
9914
- const K = z.querySelector("table");
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 J = K.querySelectorAll("colgroup col"), Y = Array.from(J).reduce(
9917
- (Q, re) => Q + parseInt(re.style.width || "80", 10),
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
- H = Math.max(H, Y);
9964
+ q = Math.max(q, N);
9921
9965
  }
9922
- }), H > 0) {
9923
- const z = l.value;
9966
+ }), q > 0) {
9967
+ const Y = l.value;
9924
9968
  let K = 0;
9925
- if (z) {
9926
- const J = getComputedStyle(z);
9927
- K = z.clientWidth - parseFloat(J.paddingLeft || "0") - parseFloat(J.paddingRight || "0");
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 && (H = Math.max(H, K)), U.forEach((J) => {
9930
- const Y = J.querySelector("table");
9931
- if (Y) {
9932
- const Q = Y.querySelectorAll("colgroup col"), re = Array.from(Q).reduce(
9933
- (ne, ue) => ne + parseInt(ue.style.width || "80", 10),
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 (re > 0 && re < H) {
9937
- const ne = H / re;
9938
- Q.forEach((V) => {
9939
- const X = parseInt(V.style.width || "80", 10);
9940
- V.style.width = `${Math.round(X * ne)}px`;
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 ue = Array.from(Q).map(
9943
- (V) => parseInt(V.style.width || "80", 10)
9986
+ const W = Array.from(F).map(
9987
+ (ne) => parseInt(ne.style.width || "80", 10)
9944
9988
  );
9945
- Y.querySelectorAll("tr").forEach((V) => {
9946
- let X = 0, q = 0;
9947
- Array.from(V.children).forEach((ee) => {
9948
- ee.classList.contains("fixed-td") && (ee.style.left = `${X - 1}px`), q < ue.length && (X += ue[q] - 1, q++);
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
- Y.style.width = `${H}px`, Y.style.minWidth = `${H}px`;
9996
+ N.style.width = `${q}px`, N.style.minWidth = `${q}px`;
9953
9997
  }
9954
9998
  });
9955
9999
  }
9956
10000
  });
9957
10001
  } else {
9958
- let B = !1, { rowConfig: U, colConfig: H, config: z } = cloneDeep(n.config), K = getLoopItem(H, M, "col", z), J = getLoopItem(U, M, "row", z);
9959
- K.length && (B = !0, loopGroupCols(H, K, z, M)), J.length && (B = !0, loopGroupRows(U, J, z, H, M));
9960
- const Y = transformArrayToObject(M, n.config.data.source);
9961
- computeCell(z, Y, y.value), await preGenerateBarcodes([{ config: z }]), u.value.push({
9962
- config: z,
9963
- rowConfig: U,
9964
- colConfig: H
9965
- }), renderReportByDom(U, H, z, c.value, B, p.value.border), console.timeEnd("renderReport");
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 R() {
9969
- let M = 0, B = [], U = {};
9970
- return n.config.params.forEach((H) => {
9971
- H.isNull && (U[H.columnName] = H);
9972
- }), C.value.forEach((H) => {
9973
- H.name && U[H.name] && !H.value && (B.push(U[H.name].name), M++);
9974
- }), M > 0 && Object.keys(U).length > 0 ? (ElMessage.warning({
9975
- message: `请填写必填项:${B.join(",")}`,
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 F() {
9980
- var B;
9981
- if ($ = !1, i.value || R()) {
9982
- k.value = !0;
10023
+ async function X() {
10024
+ var U;
10025
+ if (S = !1, i.value || V()) {
10026
+ x.value = !0;
9983
10027
  try {
9984
- let U = await j(i.value), H = G(U);
9985
- n.config.data.processData && (H = await getProcessData(
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
- H,
9988
- C.value,
9989
- v
9990
- ));
9991
- const z = (B = n.config.data.source) == null ? void 0 : B.find((K) => K.loopTable);
9992
- z && z.key ? await x(H, z.key) : await A(H);
9993
- } catch (U) {
9994
- console.error("数据源请求失败:", U), o("report-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(U)
10040
+ message: getErrorMessage(H)
9997
10041
  }), clearReportByDom(l);
9998
10042
  } finally {
9999
- k.value = !1, b = !0;
10043
+ x.value = !1, T = !0;
10000
10044
  }
10001
10045
  } else
10002
10046
  clearReportByDom(l);
10003
10047
  }
10004
- function G(M) {
10005
- let B = {};
10006
- return Array.isArray(M) || (M = [M]), M.forEach(({ key: U, data: H }) => {
10007
- if (U !== "PARAM") {
10008
- let z = H.filter((K) => K);
10009
- B[U] = z;
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
- B[U] = H;
10085
+ U[H] = q;
10012
10086
  }), o("updateData", {
10013
10087
  key: n.config.id,
10014
- data: B
10015
- }), B;
10088
+ data: U
10089
+ }), U;
10016
10090
  }
10017
- async function j(M = !1) {
10091
+ async function le(G = !1) {
10018
10092
  if (n.config.data.source) {
10019
- let B = {
10093
+ let U = {
10020
10094
  id: n.id
10021
10095
  };
10022
- g.value && (B.params = cloneDeep(C.value));
10023
- const U = collectCellQueryConditions(
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
- m.value ? M ? (B.pageSize = v.total, B.pageNumber = 1) : (B.pageSize = v.pageSize, B.pageNumber = v.pageIndex) : (B.pageSize = v.pageSize, B.pageNumber = 1);
10028
- let H = [], z = {};
10029
- C.value.forEach(({ name: K, value: J }) => {
10030
- K && (z[K.toUpperCase()] = J);
10031
- }), H.push({ key: "PARAM", data: z });
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: J, url: Y } = n.config.data.source[K];
10034
- if (Y) {
10035
- const Q = U.get(Y.toUpperCase()), re = Q != null && Q.length ? { ...B, params: [...B.params || [], ...Q] } : B, ne = await getDateSourceData(Y, re);
10036
- H.push({ key: J, data: ne.data }), m.value && (v.total = ne.count || ne.data.length);
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 H;
10113
+ return q;
10040
10114
  } else
10041
10115
  return [];
10042
10116
  }
10043
- function W() {
10044
- if (n.config.data.pageSize !== void 0 && (v.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) {
10045
- let M = n.config.data.pageSizes.split(",").map((B) => parseInt(B));
10046
- v.pageSizes = Array.isArray(M) ? M : [10, 20, 50, 100, 200];
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 W(), e({
10050
- tableConfig: u,
10051
- batchTableConfigs: d,
10123
+ return fe(), e({
10124
+ tableConfig: p,
10125
+ batchTableConfigs: m,
10052
10126
  statementTableRef: l,
10053
10127
  /** 拉数据 + 渲染(供父组件主动调用,如打印按钮触发) */
10054
- renderHandler: F
10055
- }), (M, B) => {
10056
- const U = resolveComponent("el-button"), H = resolveComponent("el-pagination"), z = resolveDirective("loading");
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(f.value)
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: E,
10067
- onChange: w
10140
+ onAddCell: $,
10141
+ onChange: D
10068
10142
  }, {
10069
10143
  search: withCtx(() => [
10070
- _.value ? (openBlock(), createBlock(U, {
10144
+ y.value ? (openBlock(), createBlock(H, {
10071
10145
  key: 0,
10072
10146
  type: "primary",
10073
- onClick: D
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(U, {
10154
+ createVNode(H, {
10081
10155
  text: "",
10082
10156
  type: "primary",
10083
- onClick: I
10157
+ onClick: k
10084
10158
  }, {
10085
10159
  default: withCtx(() => [
10086
- createTextVNode(toDisplayString(unref(rct)(S.value)), 1)
10160
+ createTextVNode(toDisplayString(unref(rct)(M.value)), 1)
10087
10161
  ]),
10088
10162
  _: 1
10089
10163
  }),
10090
- m.value ? (openBlock(), createBlock(U, {
10164
+ v.value ? (openBlock(), createBlock(H, {
10091
10165
  key: 1,
10092
10166
  text: "",
10093
10167
  type: "primary",
10094
- onClick: L
10168
+ onClick: O
10095
10169
  }, {
10096
10170
  default: withCtx(() => [
10097
- createTextVNode(toDisplayString(unref(rct)(S.value)) + toDisplayString(unref(rct)("全部")), 1)
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
- [z, k.value]
10190
+ [Y, x.value]
10117
10191
  ]),
10118
- m.value ? withDirectives((openBlock(), createBlock(H, {
10192
+ v.value ? withDirectives((openBlock(), createBlock(q, {
10119
10193
  key: 0,
10120
- pageSize: v.pageSize,
10121
- "onUpdate:pageSize": B[0] || (B[0] = (K) => v.pageSize = K),
10122
- "current-page": v.pageIndex,
10123
- "onUpdate:currentPage": B[1] || (B[1] = (K) => v.pageIndex = K),
10124
- "page-sizes": v.pageSizes,
10125
- total: v.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, b) => w + b, 0);
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: b,
10478
+ notSingle: C,
10405
10479
  keyIds: $,
10406
10480
  dataIds: D,
10407
- groupBy: O,
10481
+ groupBy: T,
10408
10482
  orderBy: S,
10409
10483
  cutLength: I,
10410
- singleComputed: L,
10411
- singleKey: k,
10412
- singleData: N
10484
+ singleComputed: B,
10485
+ singleKey: M,
10486
+ singleData: k
10413
10487
  } = y;
10414
- let T = {};
10415
- E && (T = {
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 F = (await getDateSourceData(R, { id: n.id })).data;
10422
- T[A] = F;
10423
- } catch (F) {
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(F)
10500
+ message: getErrorMessage(L)
10427
10501
  }), l.value = !1, !1;
10428
10502
  }
10429
10503
  }
10430
- if (Object.keys(T).length === 0)
10504
+ if (Object.keys(O).length === 0)
10431
10505
  return l.value = !1, !1;
10432
- if (c.value = [], b) {
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(T, x);
10511
+ let R = get(O, x);
10438
10512
  if (!R)
10439
10513
  return l.value = !1, !1;
10440
- let F = R.map((U) => U[A]), G = "", j = "";
10441
- D.length > 2 ? (G = D.splice(0, 2).join("."), j = D.at(0)) : (G = D.at(0), j = D.at(1));
10442
- let W = [], M = {}, B = get(T, G);
10443
- if (!B)
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
- B.map((U) => {
10446
- let H = U[A], z = U[j];
10447
- O ? H && F.includes(H) && (M[H] ? M[H].push(z) : M[H] = [z]) : H && F.includes(H) && W.push({
10448
- label: H,
10449
- value: z
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
- }), O && (W = Object.keys(M).map((U) => {
10452
- let H = M[U];
10525
+ }), T && (X = Object.keys(Z).map((re) => {
10526
+ let oe = Z[re];
10453
10527
  return {
10454
- label: U,
10455
- value: _.SUM(H)
10528
+ label: re,
10529
+ value: _.SUM(oe)
10456
10530
  };
10457
- })), !isNaN(I) && I > 0 && (W = W.splice(0, I)), c.value = W;
10531
+ })), !isNaN(I) && I > 0 && (X = X.splice(0, I)), c.value = X;
10458
10532
  } else {
10459
- if (!N || N.length === 0)
10533
+ if (!k || k.length === 0)
10460
10534
  return l.value = !1, !1;
10461
10535
  let x = "", A = "";
10462
- N.length > 2 ? (x = N.splice(0, 2).join("."), A = N.at(0)) : (x = N.at(0), A = N.at(1));
10463
- let R = get(T, x);
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 F = R.map((G) => G[A]);
10467
- L && (F = _[L](F)), c.value.push({
10468
- label: k,
10469
- value: F
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
- }, C = async () => {
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
- C();
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, (b, $) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
10493
- createElementVNode("div", _hoisted_5$1, toDisplayString(b.label), 1),
10494
- createElementVNode("div", _hoisted_6$1, toDisplayString(b.value), 1)
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 C of s)
10658
- g.push({ ...C.row }), _.push(cloneDeep(a[C.index]));
10659
- for (const C of e)
10660
- o[C].isFixed || (g.push({ ...o[C] }), _.push(cloneDeep(a[C])));
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 b = w.contentDocument;
10904
- b.open(), b.write(E), b.close(), w.onload = () => {
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
- k.length > 0 && (L.push({ items: k }), k = [], N = 0);
10922
- }, b = function() {
10923
- if (O)
10924
- for (; T.length > 0; ) {
10925
- const A = T[0], R = D - N;
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 (k.length === 0) break;
11001
+ if (M.length === 0) break;
10928
11002
  w();
10929
11003
  continue;
10930
11004
  }
10931
- let F = splitNextReportPage(A.state, R, S, D);
10932
- if (!F) {
10933
- if (k.length > 0) {
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
- F = splitNextReportPage(A.state, R, S, D, !0);
11011
+ L = splitNextReportPage(A.state, R, S, D, !0);
10938
11012
  }
10939
- k.push({ type: "report", dom: F.dom }), N += F.height, A.state.currentRowIdx >= A.state.visibleRows.length && T.shift();
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 C();
10943
- const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig), O = D != null, S = getPrintContentWidthPxMeasured(r.printConfig), I = [];
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 F = f().get(A);
10948
- if (F && F.length > 0)
10949
- for (const j of F) {
10950
- const W = createReportSplitState(
10951
- j,
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: W.config }]), I.push({ kind: "report", pending: { state: W } });
11034
+ await preGenerateBarcodes([{ config: X.config }]), I.push({ kind: "report", pending: { state: X } });
10961
11035
  }
10962
- const G = p().get(A);
10963
- if (G && G.length > 0)
10964
- for (let j = 0; j < G.length; j++) {
10965
- const W = G[j];
10966
- j > 0 && I.push({ kind: "break" });
10967
- for (const M of W) {
10968
- const B = createReportSplitState(
10969
- M,
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: B.config }]), I.push({ kind: "report", pending: { state: B } });
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 L = [];
10985
- let k = [], N = 0;
10986
- const T = [];
10987
- if (O) {
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
- b();
10996
- const F = D - N, G = splitNextReportPage(R.state, F, S, D);
10997
- G ? (k.push({ type: "report", dom: G.dom }), N += G.height, R.state.currentRowIdx < R.state.visibleRows.length && T.push(R)) : (k.length > 0 && w(), T.push(R));
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
- b(), w();
11074
+ C(), w();
11001
11075
  } else {
11002
- const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom), F = [];
11003
- for (const G of I) {
11004
- if (G.kind === "break") {
11005
- const j = document.createElement("div");
11006
- j.style.height = `${R}px`, F.push({ type: "spacer", dom: j });
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 (G.kind === "report") {
11010
- const { state: j } = G.pending, { rowConfig: W, colConfig: M, config: B } = j, U = renderReportByDomForPrint(W, M, B, j.themeColor);
11011
- F.push({ type: "report", dom: U });
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
- L.push({ items: F });
11088
+ B.push({ items: L });
11015
11089
  }
11016
- a.value = L.map((A) => A.items), await nextTick(), s.value.forEach((A) => A.remove()), s.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 < L.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 F = L[A].items;
11022
- for (const G of F) {
11023
- const j = G.dom.cloneNode(!0);
11024
- R.appendChild(j), s.value.push(j);
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 C() {
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 b = w, $ = b.data, D = b.tableConfig;
11115
+ const C = w, $ = C.data, D = C.tableConfig;
11042
11116
  if (!$ || !D || !$.source) continue;
11043
- const O = buildPrintParamsFromConfig(b, c.query), { resData: S } = await fetchReportData(
11117
+ const T = buildPrintParamsFromConfig(C, c.query), { resData: S } = await fetchReportData(
11044
11118
  { id: r.reportId ?? "", data: $, tableConfig: D },
11045
- O,
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, O, {
11124
+ $.processData && (I = await getProcessData($.processData, I, T, {
11051
11125
  pageSize: 5e3,
11052
11126
  pageIndex: 1,
11053
11127
  total: 0
11054
11128
  }));
11055
- const L = $.source, k = L.find((N) => N.loopTable);
11056
- if (k && k.key) {
11057
- const N = await renderReportToConfigs(
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
- L,
11134
+ B,
11061
11135
  [],
11062
- k.key
11136
+ M.key
11063
11137
  );
11064
- d.value.set(E, N);
11138
+ d.value.set(E, k);
11065
11139
  } else {
11066
- const N = await renderReportToConfigs(
11140
+ const k = await renderReportToConfigs(
11067
11141
  D,
11068
11142
  I,
11069
- L,
11143
+ B,
11070
11144
  []
11071
11145
  );
11072
- u.value.set(E, N);
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, b) => (openBlock(), createElementBlock("div", {
11111
- key: b,
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 (O) => {
11164
- let { name: S, remoteOptions: I, printConfig: L } = O;
11165
- o.value = S, c.value = I, L && (u.value = { ...DEFAULT_PRINT_CONFIG, ...L });
11166
- }).catch((O) => {
11167
- console.error("获取报表配置失败:", O), i.value = getErrorMessage(O);
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: O }) {
11173
- a.value.some((S) => S.key === D) || a.value.push({ key: D, message: O });
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 O = a.value.indexOf(D);
11177
- O > -1 && a.value.splice(O, 1);
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 C(D) {
11181
- var O;
11182
- d[D.key] = D.data, (O = l.value) == null || O.forEach((S) => {
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()), b = ref([]);
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 (b.value) {
11190
- const L = b.value.filter((k) => k && typeof k.renderHandler == "function").map((k) => k.renderHandler());
11191
- L.length > 0 && (n.value = !0, await Promise.all(L), n.value = !1);
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(), O = /* @__PURE__ */ new Map();
11194
- if (b.value) {
11195
- for (let L = 0; L < c.value.length; L++)
11196
- if (c.value[L].type === "report") {
11197
- const k = b.value.find((N, T) => c.value.filter((A) => A.type === "report")[T] === c.value[L]);
11198
- k && ((I = (S = c.value[L].data) == null ? void 0 : S.source) != null && I.some((N) => N.loopTable) ? k.batchTableConfigs && O.set(
11199
- L,
11200
- k.batchTableConfigs.map((N) => N.length > 0 ? [N[0]] : [])
11201
- ) : k.tableConfig && D.set(L, k.tableConfig.length > 0 ? [k.tableConfig[0]] : []));
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 = O, y.value = !0;
11278
+ E.value = D, w.value = T, y.value = !0;
11205
11279
  }
11206
11280
  return onMounted(() => {
11207
11281
  m(r.id);
11208
- }), (D, O) => {
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(() => [...O[1] || (O[1] = [
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: (L) => _(I)
11318
+ onClose: (B) => _(I)
11245
11319
  }, null, 8, ["title", "onClose"]))), 128)),
11246
- (openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (I, L) => (openBlock(), createElementBlock(Fragment, null, [
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: b,
11253
- index: L,
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: C,
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: L,
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: L,
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, [...O[2] || (O[2] = [
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": O[0] || (O[0] = (I) => y.value = I),
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
- ae(this, "status", ref("disconnected"));
11393
+ se(this, "status", ref("disconnected"));
11320
11394
  /** 打印机列表 */
11321
- ae(this, "printers", ref([]));
11395
+ se(this, "printers", ref([]));
11322
11396
  /** 当前选中的打印机 name(Header 下拉选的,业务 print 不传 printerName 时用它) */
11323
- ae(this, "selectedPrinter", ref(null));
11397
+ se(this, "selectedPrinter", ref(null));
11324
11398
  /** 是否正在打印中(业务 print 流程中) */
11325
- ae(this, "printing", ref(!1));
11399
+ se(this, "printing", ref(!1));
11326
11400
  // ===== 内部状态 =====
11327
- ae(this, "ws", null);
11328
- ae(this, "url", "");
11329
- ae(this, "manualClosed", !1);
11330
- ae(this, "reconnectTimer", null);
11331
- ae(this, "reconnectDelay", 1e3);
11332
- ae(this, "retryCount", 0);
11333
- ae(this, "pollTimer", null);
11334
- ae(this, "seq", 0);
11335
- ae(this, "pending", /* @__PURE__ */ new Map());
11336
- ae(this, "statusListeners", /* @__PURE__ */ new Set());
11337
- ae(this, "printersListeners", /* @__PURE__ */ new Set());
11338
- ae(this, "selectListeners", /* @__PURE__ */ new Set());
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, C = await printerClient.printReport({
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 C.success ? ElMessage.success(`打印已发送:${g},共 ${C.copies || d} 份`) : ElMessage.error(C.message || "打印失败"), C;
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, C) => {
11654
- const y = { ...defaultCell, text: v, row: C + 1, col: 1 };
11655
- return y.style = { ...y.style, fontWeight: C === 0 ? "bold" : "normal" }, [y];
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"), C = resolveComponent("el-input"), y = resolveComponent("el-divider"), E = resolveComponent("el-popover");
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(C, {
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: (b) => n.value = w.name
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: C } = g.reportConfig, y = renderReportByDomForPrint(_, v, C, g.themeColor);
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-BUvwSwtN.mjs")
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-CWDZPlRW.mjs").then((r) => r.S)
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-DqLC6v-J.mjs")
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-DqLC6v-J.mjs")
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-DqLC6v-J.mjs")
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
- getConfig as h,
12051
- completeBasicReportProperties as i,
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
- DATE_RANGE_TYPES as v,
12065
- DataSourceColumnDataType as w,
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-BYb-0zSY.mjs.map
12144
+ //# sourceMappingURL=index-y062xBj5.mjs.map