yh-report 2.4.104 → 2.4.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{StatementDesign-DdGNl0Uw.mjs → StatementDesign-BXeVF_g5.mjs} +13751 -14149
- package/StatementDesign-BXeVF_g5.mjs.map +1 -0
- package/{StatementDetail-wBMBzex2.mjs → StatementDetail-BBbOEaRv.mjs} +2 -2
- package/{StatementDetail-wBMBzex2.mjs.map → StatementDetail-BBbOEaRv.mjs.map} +1 -1
- package/{StatementList-CWZQHrla.mjs → StatementList-DquZ1_6N.mjs} +2 -2
- package/{StatementList-CWZQHrla.mjs.map → StatementList-DquZ1_6N.mjs.map} +1 -1
- package/{index-CYPpaOha.mjs → index-CE09dj2a.mjs} +1229 -1223
- package/index-CE09dj2a.mjs.map +1 -0
- package/index-DSG-7Oqx.mjs +5 -0
- package/index-DSG-7Oqx.mjs.map +1 -0
- package/index.es.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/StatementDesign-DdGNl0Uw.mjs.map +0 -1
- package/index-CYPpaOha.mjs.map +0 -1
- package/index-DT_8pv6P.mjs +0 -5
- package/index-DT_8pv6P.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
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,
|
|
5
|
-
import { ElMessage, ElForm, ElFormItem, ElOption, ElLoading, ElMessageBox, ElDialog, ElButton, ElResult, ElAlert } from "element-plus";
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var Re = (t, e, r) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var ce = (t, e, r) => Re(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { ref, computed, defineComponent, reactive, watch, nextTick, triggerRef, onMounted, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, withDirectives, createBlock, mergeProps, resolveDynamicComponent, createCommentVNode, vShow, renderSlot, onUnmounted, useCssVars, inject, shallowRef, resolveComponent, resolveDirective, normalizeStyle, createTextVNode, toDisplayString, createElementVNode, normalizeClass, onBeforeUnmount, provide, withKeys, markRaw, h } from "vue";
|
|
5
|
+
import { ElMessage, ElForm, ElFormItem, ElOption, ElSelect, ElLoading, ElMessageBox, ElDialog, ElButton, ElResult, ElAlert } from "element-plus";
|
|
6
6
|
import http from "@/libs/api.request";
|
|
7
7
|
import { cloneDeep, get } from "lodash-es";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
@@ -945,285 +945,283 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
|
945
945
|
function getDefaultExportFromCjs(t) {
|
|
946
946
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
947
947
|
}
|
|
948
|
-
var dayjs_min = { exports: {} }
|
|
949
|
-
function
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
})(
|
|
954
|
-
var
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
return F ? new Date(Date.UTC(j[1], V, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, W)) : new Date(j[1], V, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, W);
|
|
1014
|
-
}
|
|
948
|
+
var dayjs_min = { exports: {} };
|
|
949
|
+
(function(t, e) {
|
|
950
|
+
(function(r, n) {
|
|
951
|
+
t.exports = n();
|
|
952
|
+
})(commonjsGlobal, function() {
|
|
953
|
+
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(N) {
|
|
954
|
+
var O = ["th", "st", "nd", "rd"], x = N % 100;
|
|
955
|
+
return "[" + N + (O[(x - 20) % 10] || O[x] || O[0]) + "]";
|
|
956
|
+
} }, y = function(N, O, x) {
|
|
957
|
+
var A = String(N);
|
|
958
|
+
return !A || A.length >= O ? N : "" + Array(O + 1 - A.length).join(x) + N;
|
|
959
|
+
}, E = { s: y, z: function(N) {
|
|
960
|
+
var O = -N.utcOffset(), x = Math.abs(O), A = Math.floor(x / 60), R = x % 60;
|
|
961
|
+
return (O <= 0 ? "+" : "-") + y(A, 2, "0") + ":" + y(R, 2, "0");
|
|
962
|
+
}, m: function N(O, x) {
|
|
963
|
+
if (O.date() < x.date()) return -N(x, O);
|
|
964
|
+
var A = 12 * (x.year() - O.year()) + (x.month() - O.month()), R = O.clone().add(A, d), L = x - R < 0, G = O.clone().add(A + (L ? -1 : 1), d);
|
|
965
|
+
return +(-(A + (x - R) / (L ? R - G : G - R)) || 0);
|
|
966
|
+
}, a: function(N) {
|
|
967
|
+
return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
|
|
968
|
+
}, p: function(N) {
|
|
969
|
+
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$/, "");
|
|
970
|
+
}, u: function(N) {
|
|
971
|
+
return N === void 0;
|
|
972
|
+
} }, w = "en", C = {};
|
|
973
|
+
C[w] = b;
|
|
974
|
+
var $ = "$isDayjsObject", D = function(N) {
|
|
975
|
+
return N instanceof B || !(!N || !N[$]);
|
|
976
|
+
}, T = function N(O, x, A) {
|
|
977
|
+
var R;
|
|
978
|
+
if (!O) return w;
|
|
979
|
+
if (typeof O == "string") {
|
|
980
|
+
var L = O.toLowerCase();
|
|
981
|
+
C[L] && (R = L), x && (C[L] = x, R = L);
|
|
982
|
+
var G = O.split("-");
|
|
983
|
+
if (!R && G.length > 1) return N(G[0]);
|
|
984
|
+
} else {
|
|
985
|
+
var j = O.name;
|
|
986
|
+
C[j] = O, R = j;
|
|
987
|
+
}
|
|
988
|
+
return !A && R && (w = R), R || !A && w;
|
|
989
|
+
}, S = function(N, O) {
|
|
990
|
+
if (D(N)) return N.clone();
|
|
991
|
+
var x = typeof O == "object" ? O : {};
|
|
992
|
+
return x.date = N, x.args = arguments, new B(x);
|
|
993
|
+
}, I = E;
|
|
994
|
+
I.l = T, I.i = D, I.w = function(N, O) {
|
|
995
|
+
return S(N, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
|
|
996
|
+
};
|
|
997
|
+
var B = function() {
|
|
998
|
+
function N(x) {
|
|
999
|
+
this.$L = T(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[$] = !0;
|
|
1000
|
+
}
|
|
1001
|
+
var O = N.prototype;
|
|
1002
|
+
return O.parse = function(x) {
|
|
1003
|
+
this.$d = function(A) {
|
|
1004
|
+
var R = A.date, L = A.utc;
|
|
1005
|
+
if (R === null) return /* @__PURE__ */ new Date(NaN);
|
|
1006
|
+
if (I.u(R)) return /* @__PURE__ */ new Date();
|
|
1007
|
+
if (R instanceof Date) return new Date(R);
|
|
1008
|
+
if (typeof R == "string" && !/Z$/i.test(R)) {
|
|
1009
|
+
var G = R.match(_);
|
|
1010
|
+
if (G) {
|
|
1011
|
+
var j = G[2] - 1 || 0, X = (G[7] || "0").substring(0, 3);
|
|
1012
|
+
return L ? new Date(Date.UTC(G[1], j, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, X)) : new Date(G[1], j, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, X);
|
|
1015
1013
|
}
|
|
1016
|
-
return new Date(R);
|
|
1017
|
-
}(x), this.init();
|
|
1018
|
-
}, O.init = function() {
|
|
1019
|
-
var x = this.$d;
|
|
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
|
-
}, O.$utils = function() {
|
|
1022
|
-
return I;
|
|
1023
|
-
}, O.isValid = function() {
|
|
1024
|
-
return this.$d.toString() !== g;
|
|
1025
|
-
}, O.isSame = function(x, A) {
|
|
1026
|
-
var R = S(x);
|
|
1027
|
-
return this.startOf(A) <= R && R <= this.endOf(A);
|
|
1028
|
-
}, O.isAfter = function(x, A) {
|
|
1029
|
-
return S(x) < this.startOf(A);
|
|
1030
|
-
}, O.isBefore = function(x, A) {
|
|
1031
|
-
return this.endOf(A) < S(x);
|
|
1032
|
-
}, O.$g = function(x, A, R) {
|
|
1033
|
-
return I.u(x) ? this[A] : this.set(R, x);
|
|
1034
|
-
}, O.unix = function() {
|
|
1035
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
1036
|
-
}, O.valueOf = function() {
|
|
1037
|
-
return this.$d.getTime();
|
|
1038
|
-
}, O.startOf = function(x, A) {
|
|
1039
|
-
var R = this, F = !!I.u(A) || A, j = I.p(x), V = function(Z, K) {
|
|
1040
|
-
var Q = I.w(R.$u ? Date.UTC(R.$y, K, Z) : new Date(R.$y, K, Z), R);
|
|
1041
|
-
return F ? Q : Q.endOf(c);
|
|
1042
|
-
}, W = function(Z, K) {
|
|
1043
|
-
return I.w(R.toDate()[Z].apply(R.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), R);
|
|
1044
|
-
}, M = this.$W, B = this.$M, U = this.$D, H = "set" + (this.$u ? "UTC" : "");
|
|
1045
|
-
switch (j) {
|
|
1046
|
-
case p:
|
|
1047
|
-
return F ? V(1, 0) : V(31, 11);
|
|
1048
|
-
case d:
|
|
1049
|
-
return F ? V(1, B) : V(0, B + 1);
|
|
1050
|
-
case u:
|
|
1051
|
-
var z = this.$locale().weekStart || 0, X = (M < z ? M + 7 : M) - z;
|
|
1052
|
-
return V(F ? U - X : U + (6 - X), B);
|
|
1053
|
-
case c:
|
|
1054
|
-
case m:
|
|
1055
|
-
return W(H + "Hours", 0);
|
|
1056
|
-
case l:
|
|
1057
|
-
return W(H + "Minutes", 1);
|
|
1058
|
-
case s:
|
|
1059
|
-
return W(H + "Seconds", 2);
|
|
1060
|
-
case a:
|
|
1061
|
-
return W(H + "Milliseconds", 3);
|
|
1062
|
-
default:
|
|
1063
|
-
return this.clone();
|
|
1064
1014
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
var
|
|
1090
|
-
return
|
|
1091
|
-
},
|
|
1092
|
-
return
|
|
1093
|
-
},
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
case "HH":
|
|
1134
|
-
return I.s(V, 2, "0");
|
|
1135
|
-
case "h":
|
|
1136
|
-
return X(1);
|
|
1137
|
-
case "hh":
|
|
1138
|
-
return X(2);
|
|
1139
|
-
case "a":
|
|
1140
|
-
return Z(V, W, !0);
|
|
1141
|
-
case "A":
|
|
1142
|
-
return Z(V, W, !1);
|
|
1143
|
-
case "m":
|
|
1144
|
-
return String(W);
|
|
1145
|
-
case "mm":
|
|
1146
|
-
return I.s(W, 2, "0");
|
|
1147
|
-
case "s":
|
|
1148
|
-
return String(A.$s);
|
|
1149
|
-
case "ss":
|
|
1150
|
-
return I.s(A.$s, 2, "0");
|
|
1151
|
-
case "SSS":
|
|
1152
|
-
return I.s(A.$ms, 3, "0");
|
|
1153
|
-
case "Z":
|
|
1154
|
-
return j;
|
|
1155
|
-
}
|
|
1156
|
-
return null;
|
|
1157
|
-
}(K) || j.replace(":", "");
|
|
1158
|
-
});
|
|
1159
|
-
}, O.utcOffset = function() {
|
|
1160
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1161
|
-
}, O.diff = function(x, A, R) {
|
|
1162
|
-
var F, j = this, V = I.p(A), W = S(x), M = (W.utcOffset() - this.utcOffset()) * n, B = this - W, U = function() {
|
|
1163
|
-
return I.m(j, W);
|
|
1164
|
-
};
|
|
1165
|
-
switch (V) {
|
|
1166
|
-
case p:
|
|
1167
|
-
F = U() / 12;
|
|
1168
|
-
break;
|
|
1169
|
-
case d:
|
|
1170
|
-
F = U();
|
|
1171
|
-
break;
|
|
1172
|
-
case f:
|
|
1173
|
-
F = U() / 3;
|
|
1174
|
-
break;
|
|
1175
|
-
case u:
|
|
1176
|
-
F = (B - M) / 6048e5;
|
|
1177
|
-
break;
|
|
1178
|
-
case c:
|
|
1179
|
-
F = (B - M) / 864e5;
|
|
1180
|
-
break;
|
|
1181
|
-
case l:
|
|
1182
|
-
F = B / o;
|
|
1183
|
-
break;
|
|
1184
|
-
case s:
|
|
1185
|
-
F = B / n;
|
|
1186
|
-
break;
|
|
1187
|
-
case a:
|
|
1188
|
-
F = B / r;
|
|
1189
|
-
break;
|
|
1190
|
-
default:
|
|
1191
|
-
F = B;
|
|
1192
|
-
}
|
|
1193
|
-
return R ? F : I.a(F);
|
|
1194
|
-
}, O.daysInMonth = function() {
|
|
1195
|
-
return this.endOf(d).$D;
|
|
1196
|
-
}, O.$locale = function() {
|
|
1197
|
-
return b[this.$L];
|
|
1198
|
-
}, O.locale = function(x, A) {
|
|
1199
|
-
if (!x) return this.$L;
|
|
1200
|
-
var R = this.clone(), F = T(x, A, !0);
|
|
1201
|
-
return F && (R.$L = F), R;
|
|
1202
|
-
}, O.clone = function() {
|
|
1203
|
-
return I.w(this.$d, this);
|
|
1204
|
-
}, O.toDate = function() {
|
|
1205
|
-
return new Date(this.valueOf());
|
|
1206
|
-
}, O.toJSON = function() {
|
|
1207
|
-
return this.isValid() ? this.toISOString() : null;
|
|
1208
|
-
}, O.toISOString = function() {
|
|
1209
|
-
return this.$d.toISOString();
|
|
1210
|
-
}, O.toString = function() {
|
|
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(O) {
|
|
1216
|
-
return this.$g(O, N[0], N[1]);
|
|
1015
|
+
return new Date(R);
|
|
1016
|
+
}(x), this.init();
|
|
1017
|
+
}, O.init = function() {
|
|
1018
|
+
var x = this.$d;
|
|
1019
|
+
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();
|
|
1020
|
+
}, O.$utils = function() {
|
|
1021
|
+
return I;
|
|
1022
|
+
}, O.isValid = function() {
|
|
1023
|
+
return this.$d.toString() !== g;
|
|
1024
|
+
}, O.isSame = function(x, A) {
|
|
1025
|
+
var R = S(x);
|
|
1026
|
+
return this.startOf(A) <= R && R <= this.endOf(A);
|
|
1027
|
+
}, O.isAfter = function(x, A) {
|
|
1028
|
+
return S(x) < this.startOf(A);
|
|
1029
|
+
}, O.isBefore = function(x, A) {
|
|
1030
|
+
return this.endOf(A) < S(x);
|
|
1031
|
+
}, O.$g = function(x, A, R) {
|
|
1032
|
+
return I.u(x) ? this[A] : this.set(R, x);
|
|
1033
|
+
}, O.unix = function() {
|
|
1034
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1035
|
+
}, O.valueOf = function() {
|
|
1036
|
+
return this.$d.getTime();
|
|
1037
|
+
}, O.startOf = function(x, A) {
|
|
1038
|
+
var R = this, L = !!I.u(A) || A, G = I.p(x), j = function(U, F) {
|
|
1039
|
+
var V = I.w(R.$u ? Date.UTC(R.$y, F, U) : new Date(R.$y, F, U), R);
|
|
1040
|
+
return L ? V : V.endOf(c);
|
|
1041
|
+
}, X = function(U, F) {
|
|
1042
|
+
return I.w(R.toDate()[U].apply(R.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), R);
|
|
1043
|
+
}, J = this.$W, Q = this.$M, ie = this.$D, ae = "set" + (this.$u ? "UTC" : "");
|
|
1044
|
+
switch (G) {
|
|
1045
|
+
case p:
|
|
1046
|
+
return L ? j(1, 0) : j(31, 11);
|
|
1047
|
+
case d:
|
|
1048
|
+
return L ? j(1, Q) : j(0, Q + 1);
|
|
1049
|
+
case u:
|
|
1050
|
+
var ue = this.$locale().weekStart || 0, ye = (J < ue ? J + 7 : J) - ue;
|
|
1051
|
+
return j(L ? ie - ye : ie + (6 - ye), Q);
|
|
1052
|
+
case c:
|
|
1053
|
+
case m:
|
|
1054
|
+
return X(ae + "Hours", 0);
|
|
1055
|
+
case l:
|
|
1056
|
+
return X(ae + "Minutes", 1);
|
|
1057
|
+
case s:
|
|
1058
|
+
return X(ae + "Seconds", 2);
|
|
1059
|
+
case a:
|
|
1060
|
+
return X(ae + "Milliseconds", 3);
|
|
1061
|
+
default:
|
|
1062
|
+
return this.clone();
|
|
1063
|
+
}
|
|
1064
|
+
}, O.endOf = function(x) {
|
|
1065
|
+
return this.startOf(x, !1);
|
|
1066
|
+
}, O.$set = function(x, A) {
|
|
1067
|
+
var R, L = 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)[L], X = L === c ? this.$D + (A - this.$W) : A;
|
|
1068
|
+
if (L === d || L === p) {
|
|
1069
|
+
var J = this.clone().set(m, 1);
|
|
1070
|
+
J.$d[j](X), J.init(), this.$d = J.set(m, Math.min(this.$D, J.daysInMonth())).$d;
|
|
1071
|
+
} else j && this.$d[j](X);
|
|
1072
|
+
return this.init(), this;
|
|
1073
|
+
}, O.set = function(x, A) {
|
|
1074
|
+
return this.clone().$set(x, A);
|
|
1075
|
+
}, O.get = function(x) {
|
|
1076
|
+
return this[I.p(x)]();
|
|
1077
|
+
}, O.add = function(x, A) {
|
|
1078
|
+
var R, L = this;
|
|
1079
|
+
x = Number(x);
|
|
1080
|
+
var G = I.p(A), j = function(Q) {
|
|
1081
|
+
var ie = S(L);
|
|
1082
|
+
return I.w(ie.date(ie.date() + Math.round(Q * x)), L);
|
|
1217
1083
|
};
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1084
|
+
if (G === d) return this.set(d, this.$M + x);
|
|
1085
|
+
if (G === p) return this.set(p, this.$y + x);
|
|
1086
|
+
if (G === c) return j(1);
|
|
1087
|
+
if (G === u) return j(7);
|
|
1088
|
+
var X = (R = {}, R[s] = n, R[l] = o, R[a] = r, R)[G] || 1, J = this.$d.getTime() + x * X;
|
|
1089
|
+
return I.w(J, this);
|
|
1090
|
+
}, O.subtract = function(x, A) {
|
|
1091
|
+
return this.add(-1 * x, A);
|
|
1092
|
+
}, O.format = function(x) {
|
|
1093
|
+
var A = this, R = this.$locale();
|
|
1094
|
+
if (!this.isValid()) return R.invalidDate || g;
|
|
1095
|
+
var L = x || "YYYY-MM-DDTHH:mm:ssZ", G = I.z(this), j = this.$H, X = this.$m, J = this.$M, Q = R.weekdays, ie = R.months, ae = R.meridiem, ue = function(F, V, H, z) {
|
|
1096
|
+
return F && (F[V] || F(A, L)) || H[V].slice(0, z);
|
|
1097
|
+
}, ye = function(F) {
|
|
1098
|
+
return I.s(j % 12 || 12, F, "0");
|
|
1099
|
+
}, U = ae || function(F, V, H) {
|
|
1100
|
+
var z = F < 12 ? "AM" : "PM";
|
|
1101
|
+
return H ? z.toLowerCase() : z;
|
|
1102
|
+
};
|
|
1103
|
+
return L.replace(v, function(F, V) {
|
|
1104
|
+
return V || function(H) {
|
|
1105
|
+
switch (H) {
|
|
1106
|
+
case "YY":
|
|
1107
|
+
return String(A.$y).slice(-2);
|
|
1108
|
+
case "YYYY":
|
|
1109
|
+
return I.s(A.$y, 4, "0");
|
|
1110
|
+
case "M":
|
|
1111
|
+
return J + 1;
|
|
1112
|
+
case "MM":
|
|
1113
|
+
return I.s(J + 1, 2, "0");
|
|
1114
|
+
case "MMM":
|
|
1115
|
+
return ue(R.monthsShort, J, ie, 3);
|
|
1116
|
+
case "MMMM":
|
|
1117
|
+
return ue(ie, J);
|
|
1118
|
+
case "D":
|
|
1119
|
+
return A.$D;
|
|
1120
|
+
case "DD":
|
|
1121
|
+
return I.s(A.$D, 2, "0");
|
|
1122
|
+
case "d":
|
|
1123
|
+
return String(A.$W);
|
|
1124
|
+
case "dd":
|
|
1125
|
+
return ue(R.weekdaysMin, A.$W, Q, 2);
|
|
1126
|
+
case "ddd":
|
|
1127
|
+
return ue(R.weekdaysShort, A.$W, Q, 3);
|
|
1128
|
+
case "dddd":
|
|
1129
|
+
return Q[A.$W];
|
|
1130
|
+
case "H":
|
|
1131
|
+
return String(j);
|
|
1132
|
+
case "HH":
|
|
1133
|
+
return I.s(j, 2, "0");
|
|
1134
|
+
case "h":
|
|
1135
|
+
return ye(1);
|
|
1136
|
+
case "hh":
|
|
1137
|
+
return ye(2);
|
|
1138
|
+
case "a":
|
|
1139
|
+
return U(j, X, !0);
|
|
1140
|
+
case "A":
|
|
1141
|
+
return U(j, X, !1);
|
|
1142
|
+
case "m":
|
|
1143
|
+
return String(X);
|
|
1144
|
+
case "mm":
|
|
1145
|
+
return I.s(X, 2, "0");
|
|
1146
|
+
case "s":
|
|
1147
|
+
return String(A.$s);
|
|
1148
|
+
case "ss":
|
|
1149
|
+
return I.s(A.$s, 2, "0");
|
|
1150
|
+
case "SSS":
|
|
1151
|
+
return I.s(A.$ms, 3, "0");
|
|
1152
|
+
case "Z":
|
|
1153
|
+
return G;
|
|
1154
|
+
}
|
|
1155
|
+
return null;
|
|
1156
|
+
}(F) || G.replace(":", "");
|
|
1157
|
+
});
|
|
1158
|
+
}, O.utcOffset = function() {
|
|
1159
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1160
|
+
}, O.diff = function(x, A, R) {
|
|
1161
|
+
var L, G = this, j = I.p(A), X = S(x), J = (X.utcOffset() - this.utcOffset()) * n, Q = this - X, ie = function() {
|
|
1162
|
+
return I.m(G, X);
|
|
1163
|
+
};
|
|
1164
|
+
switch (j) {
|
|
1165
|
+
case p:
|
|
1166
|
+
L = ie() / 12;
|
|
1167
|
+
break;
|
|
1168
|
+
case d:
|
|
1169
|
+
L = ie();
|
|
1170
|
+
break;
|
|
1171
|
+
case f:
|
|
1172
|
+
L = ie() / 3;
|
|
1173
|
+
break;
|
|
1174
|
+
case u:
|
|
1175
|
+
L = (Q - J) / 6048e5;
|
|
1176
|
+
break;
|
|
1177
|
+
case c:
|
|
1178
|
+
L = (Q - J) / 864e5;
|
|
1179
|
+
break;
|
|
1180
|
+
case l:
|
|
1181
|
+
L = Q / o;
|
|
1182
|
+
break;
|
|
1183
|
+
case s:
|
|
1184
|
+
L = Q / n;
|
|
1185
|
+
break;
|
|
1186
|
+
case a:
|
|
1187
|
+
L = Q / r;
|
|
1188
|
+
break;
|
|
1189
|
+
default:
|
|
1190
|
+
L = Q;
|
|
1191
|
+
}
|
|
1192
|
+
return R ? L : I.a(L);
|
|
1193
|
+
}, O.daysInMonth = function() {
|
|
1194
|
+
return this.endOf(d).$D;
|
|
1195
|
+
}, O.$locale = function() {
|
|
1196
|
+
return C[this.$L];
|
|
1197
|
+
}, O.locale = function(x, A) {
|
|
1198
|
+
if (!x) return this.$L;
|
|
1199
|
+
var R = this.clone(), L = T(x, A, !0);
|
|
1200
|
+
return L && (R.$L = L), R;
|
|
1201
|
+
}, O.clone = function() {
|
|
1202
|
+
return I.w(this.$d, this);
|
|
1203
|
+
}, O.toDate = function() {
|
|
1204
|
+
return new Date(this.valueOf());
|
|
1205
|
+
}, O.toJSON = function() {
|
|
1206
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1207
|
+
}, O.toISOString = function() {
|
|
1208
|
+
return this.$d.toISOString();
|
|
1209
|
+
}, O.toString = function() {
|
|
1210
|
+
return this.$d.toUTCString();
|
|
1211
|
+
}, N;
|
|
1212
|
+
}(), M = B.prototype;
|
|
1213
|
+
return S.prototype = M, [["$ms", i], ["$s", a], ["$m", s], ["$H", l], ["$W", c], ["$M", d], ["$y", p], ["$D", m]].forEach(function(N) {
|
|
1214
|
+
M[N[1]] = function(O) {
|
|
1215
|
+
return this.$g(O, N[0], N[1]);
|
|
1216
|
+
};
|
|
1217
|
+
}), S.extend = function(N, O) {
|
|
1218
|
+
return N.$i || (N(O, B, S), N.$i = !0), S;
|
|
1219
|
+
}, S.locale = T, S.isDayjs = D, S.unix = function(N) {
|
|
1220
|
+
return S(1e3 * N);
|
|
1221
|
+
}, S.en = C[w], S.Ls = C, S.p = {}, S;
|
|
1222
|
+
});
|
|
1223
|
+
})(dayjs_min);
|
|
1224
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
1227
1225
|
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
1228
1226
|
var quarterOfYear$1 = { exports: {} };
|
|
1229
1227
|
(function(t, e) {
|
|
@@ -1267,9 +1265,25 @@ const DATE_RANGE_TYPES = [
|
|
|
1267
1265
|
[DataParamDateTypes.QUARTER]: "YYYY[Q]Q",
|
|
1268
1266
|
[DataParamDateTypes.MONTHRANGE]: "YYYY-MM",
|
|
1269
1267
|
[DataParamDateTypes.YEARRANGE]: "YYYY"
|
|
1270
|
-
}
|
|
1268
|
+
}, SHIFT_TIME_RE = /^\d{1,2}(?::\d{1,2})?$/;
|
|
1269
|
+
function parseShiftTime(t) {
|
|
1270
|
+
if (!t || !SHIFT_TIME_RE.test(t)) return null;
|
|
1271
|
+
const [e, r] = t.split(":").map(Number);
|
|
1272
|
+
return e > 24 || r > 59 ? null : e * 60 + r;
|
|
1273
|
+
}
|
|
1274
|
+
function parseShiftConfig(t) {
|
|
1275
|
+
if (!t) return [];
|
|
1276
|
+
const e = t.split(",").map((n) => n.trim()).filter(Boolean), r = [];
|
|
1277
|
+
return e.forEach((n, o) => {
|
|
1278
|
+
let i = n, a = "";
|
|
1279
|
+
const s = n.indexOf("|");
|
|
1280
|
+
s > -1 && (a = n.slice(0, s).trim(), i = n.slice(s + 1).trim());
|
|
1281
|
+
const [l, c] = i.split("-").map((f) => f.trim()), u = parseShiftTime(l), d = parseShiftTime(c);
|
|
1282
|
+
u === null || d === null || d === 0 || (a || (a = e.length === 2 ? o === 0 ? "早班" : "晚班" : e.length === 3 ? ["早班", "中班", "晚班"][o] : `班次${o + 1}`), r.push({ label: a, startMinutes: u, endMinutes: d, crossDay: d <= u }));
|
|
1283
|
+
}), r;
|
|
1284
|
+
}
|
|
1271
1285
|
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),
|
|
1286
|
+
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), N = e.subtract(3, "year").format(t), O = e.subtract(5, "year").format(t);
|
|
1273
1287
|
return {
|
|
1274
1288
|
dateFormat: t,
|
|
1275
1289
|
thisDayStart: r,
|
|
@@ -1288,18 +1302,18 @@ function getDateRanges() {
|
|
|
1288
1302
|
thisYearEnd: g,
|
|
1289
1303
|
lastYearStart: _,
|
|
1290
1304
|
lastYearEnd: v,
|
|
1291
|
-
now:
|
|
1305
|
+
now: b,
|
|
1292
1306
|
twoDay: y,
|
|
1293
1307
|
threeDay: E,
|
|
1294
1308
|
sevenDay: w,
|
|
1295
|
-
fifteenDay:
|
|
1309
|
+
fifteenDay: C,
|
|
1296
1310
|
thirtyDay: $,
|
|
1297
1311
|
twoWeek: D,
|
|
1298
1312
|
twoMonth: T,
|
|
1299
1313
|
threeMonth: S,
|
|
1300
1314
|
sixMonth: I,
|
|
1301
|
-
oneYear:
|
|
1302
|
-
twoYear:
|
|
1315
|
+
oneYear: B,
|
|
1316
|
+
twoYear: M,
|
|
1303
1317
|
threeYear: N,
|
|
1304
1318
|
fiveYear: O
|
|
1305
1319
|
};
|
|
@@ -1375,129 +1389,131 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1375
1389
|
},
|
|
1376
1390
|
emits: ["change", "addCell"],
|
|
1377
1391
|
setup(t, { expose: e, emit: r }) {
|
|
1378
|
-
const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: d, lastMonthStart: f, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: v, lastYearStart:
|
|
1379
|
-
let
|
|
1380
|
-
return
|
|
1381
|
-
|
|
1382
|
-
}),
|
|
1392
|
+
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: N, twoYear: O, threeYear: x, fiveYear: A } = getDateRanges(), R = ref([]), L = ref([]), G = computed(() => {
|
|
1393
|
+
let k = reactive({});
|
|
1394
|
+
return L.value.forEach((Y) => {
|
|
1395
|
+
k[Y.columnName] = Y;
|
|
1396
|
+
}), k;
|
|
1383
1397
|
});
|
|
1384
|
-
let
|
|
1398
|
+
let j = !1;
|
|
1385
1399
|
watch(
|
|
1386
1400
|
() => n.config,
|
|
1387
1401
|
() => {
|
|
1388
|
-
|
|
1402
|
+
X();
|
|
1389
1403
|
},
|
|
1390
1404
|
{
|
|
1391
1405
|
immediate: !0,
|
|
1392
1406
|
deep: !0
|
|
1393
1407
|
}
|
|
1394
1408
|
);
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1397
|
-
let
|
|
1409
|
+
function X() {
|
|
1410
|
+
j = !1;
|
|
1411
|
+
let k = [];
|
|
1398
1412
|
R.value = [];
|
|
1399
|
-
const
|
|
1413
|
+
const Y = [];
|
|
1400
1414
|
if (n.config && n.config.length)
|
|
1401
|
-
for (let
|
|
1402
|
-
const ee = cloneDeep(n.config[
|
|
1403
|
-
let { dataType:
|
|
1404
|
-
const { componentName:
|
|
1405
|
-
let
|
|
1415
|
+
for (let q = 0; q < n.config.length; q++) {
|
|
1416
|
+
const ee = cloneDeep(n.config[q]);
|
|
1417
|
+
let { dataType: K, dateType: re, type: oe, selectorId: de, remoteSearch: le, cellIndex: fe, cellIndexSort: ve, cellIndexSortOrder: me, cellIndexSortNumeric: _e, name: pe, columnName: ge, defaultValue: we, isNull: $e } = ee, Ce = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(K);
|
|
1418
|
+
const { componentName: Se, placeholerPrefix: be, type: xe } = componentTransition(K, re);
|
|
1419
|
+
let Ee = {
|
|
1406
1420
|
...ee,
|
|
1407
1421
|
elWidth: ee.elWidth || 210,
|
|
1408
|
-
formItemType:
|
|
1409
|
-
placeholder: rct(
|
|
1410
|
-
type:
|
|
1422
|
+
formItemType: Se,
|
|
1423
|
+
placeholder: rct(be + pe || ge),
|
|
1424
|
+
type: xe || "",
|
|
1411
1425
|
optionData: [],
|
|
1412
|
-
value: ""
|
|
1426
|
+
value: "",
|
|
1427
|
+
shiftSegments: [],
|
|
1428
|
+
shiftValue: ""
|
|
1413
1429
|
};
|
|
1414
|
-
if (
|
|
1415
|
-
name:
|
|
1416
|
-
value:
|
|
1417
|
-
type:
|
|
1418
|
-
isNull:
|
|
1430
|
+
if (Ee.shiftSegments = re === DataParamDateTypes.DATE ? parseShiftConfig(ee.shifts) : [], Ee.value = Q(Ee, Ce), R.value.push({
|
|
1431
|
+
name: ge,
|
|
1432
|
+
value: Ee.value,
|
|
1433
|
+
type: oe,
|
|
1434
|
+
isNull: $e
|
|
1419
1435
|
}), ee.customOptions)
|
|
1420
|
-
|
|
1421
|
-
else if (
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1424
|
-
} else
|
|
1425
|
-
if (
|
|
1426
|
-
if (
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1436
|
+
Ee.optionData = ee.customOptions.split(",").map((he) => he.trim()).filter(Boolean).map((he) => ({ label: he, value: he }));
|
|
1437
|
+
else if (de) {
|
|
1438
|
+
const he = ue(de, Ee, "", le);
|
|
1439
|
+
le || Y.push(he);
|
|
1440
|
+
} else fe && (o("addCell", fe), on(`cell-change:${fe}`, (he) => {
|
|
1441
|
+
if (he = Object.values(he), he && Array.isArray(he) && he.length) {
|
|
1442
|
+
if (ve) {
|
|
1443
|
+
const De = createGroupSortComparator({ order: me, numeric: _e });
|
|
1444
|
+
he.sort((Te, Oe) => De(Te.label, Oe.label));
|
|
1429
1445
|
}
|
|
1430
|
-
|
|
1446
|
+
Ee.optionData = he, triggerRef(L);
|
|
1431
1447
|
}
|
|
1432
1448
|
}));
|
|
1433
|
-
|
|
1449
|
+
k.push(Ee), oe === "LT_GT_EQ" && !Ce && U(Ee, k, be, oe);
|
|
1434
1450
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1451
|
+
L.value = k, J(), nextTick(async () => {
|
|
1452
|
+
Y.length > 0 && await Promise.allSettled(Y), j || se();
|
|
1437
1453
|
});
|
|
1438
1454
|
}
|
|
1439
|
-
function
|
|
1440
|
-
Object.entries(i.query).forEach(([
|
|
1441
|
-
if (!
|
|
1442
|
-
const
|
|
1455
|
+
function J() {
|
|
1456
|
+
Object.entries(i.query).forEach(([k, Y]) => {
|
|
1457
|
+
if (!k || Y === null || Y === void 0 || Y === "") return;
|
|
1458
|
+
const q = Array.isArray(Y) ? Y.join(",") : Y, ee = R.value.findIndex((K) => K.name === k);
|
|
1443
1459
|
if (ee > -1) {
|
|
1444
|
-
if (
|
|
1445
|
-
R.value[ee].value =
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1460
|
+
if (k.indexOf("end_") === 0) {
|
|
1461
|
+
R.value[ee].value = q;
|
|
1462
|
+
const K = L.value.find((re) => re.columnName === k);
|
|
1463
|
+
K && (K.value = q);
|
|
1448
1464
|
}
|
|
1449
1465
|
return;
|
|
1450
1466
|
}
|
|
1451
|
-
R.value.push({ name:
|
|
1467
|
+
R.value.push({ name: k, value: q, type: "EQ", isNull: !1 });
|
|
1452
1468
|
});
|
|
1453
1469
|
}
|
|
1454
|
-
function
|
|
1455
|
-
let { dataType:
|
|
1456
|
-
if (
|
|
1457
|
-
ee && (
|
|
1458
|
-
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(
|
|
1459
|
-
if (Array.isArray(
|
|
1460
|
-
return
|
|
1461
|
-
if (i.query[
|
|
1462
|
-
let
|
|
1463
|
-
|
|
1464
|
-
} else typeof
|
|
1470
|
+
function Q(k, Y) {
|
|
1471
|
+
let { dataType: q, dateType: ee, defaultValue: K, startTime: re, endTime: oe, columnName: de } = k, le = K || "";
|
|
1472
|
+
if (Y && K)
|
|
1473
|
+
ee && (k.type = ee), ee && DATE_RANGE_TYPES.includes(ee) ? le = ie(K, re, oe) : le = ae(ee, K, re);
|
|
1474
|
+
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(q)) {
|
|
1475
|
+
if (Array.isArray(le))
|
|
1476
|
+
return le;
|
|
1477
|
+
if (i.query[de]) {
|
|
1478
|
+
let fe = i.query[de];
|
|
1479
|
+
le = Array.isArray(fe) ? fe : String(fe).split(",");
|
|
1480
|
+
} else typeof le == "string" && le ? le = le.split(",") : le = [];
|
|
1465
1481
|
} else
|
|
1466
|
-
i.query[
|
|
1467
|
-
return
|
|
1482
|
+
i.query[de] && (le = i.query[de]);
|
|
1483
|
+
return le;
|
|
1468
1484
|
}
|
|
1469
|
-
function
|
|
1470
|
-
let
|
|
1485
|
+
function ie(k, Y, q) {
|
|
1486
|
+
let K = {
|
|
1471
1487
|
thisDay: [s, l],
|
|
1472
1488
|
thisMonth: [u, d],
|
|
1473
1489
|
lastMonth: [f, p],
|
|
1474
1490
|
thisYear: [_, v],
|
|
1475
|
-
lastYear: [
|
|
1491
|
+
lastYear: [b, y],
|
|
1476
1492
|
now: [s, E],
|
|
1477
1493
|
twoDay: [w, E],
|
|
1478
|
-
threeDay: [
|
|
1494
|
+
threeDay: [C, E],
|
|
1479
1495
|
sevenDay: [$, E],
|
|
1480
1496
|
fifteenDay: [D, E],
|
|
1481
1497
|
thirtyDay: [T, E],
|
|
1482
|
-
threeMonth: [
|
|
1483
|
-
sixMonth: [
|
|
1498
|
+
threeMonth: [B, E],
|
|
1499
|
+
sixMonth: [M, E],
|
|
1484
1500
|
oneYear: [N, E],
|
|
1485
1501
|
twoYear: [O, E],
|
|
1486
1502
|
threeYear: [x, E],
|
|
1487
1503
|
fiveYear: [A, E]
|
|
1488
|
-
}[
|
|
1489
|
-
return
|
|
1504
|
+
}[k] || [s, l];
|
|
1505
|
+
return Y && (K[0] = ne(K[0], Y, a)), q && (K[1] = ne(K[1], q, a)), K;
|
|
1490
1506
|
}
|
|
1491
|
-
function
|
|
1492
|
-
let
|
|
1507
|
+
function ae(k, Y, q) {
|
|
1508
|
+
let K = {
|
|
1493
1509
|
thisYear: _,
|
|
1494
1510
|
twoYear: O,
|
|
1495
1511
|
threeYear: x,
|
|
1496
1512
|
fiveYear: A,
|
|
1497
1513
|
thisMonth: u,
|
|
1498
1514
|
twoMonth: I,
|
|
1499
|
-
threeMonth:
|
|
1500
|
-
sixMonth:
|
|
1515
|
+
threeMonth: B,
|
|
1516
|
+
sixMonth: M,
|
|
1501
1517
|
thisWeek: c,
|
|
1502
1518
|
twoWeek: S,
|
|
1503
1519
|
thisQuarter: m,
|
|
@@ -1505,183 +1521,232 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1505
1521
|
now: E,
|
|
1506
1522
|
thisDay: s,
|
|
1507
1523
|
twoDay: w,
|
|
1508
|
-
threeDay:
|
|
1524
|
+
threeDay: C,
|
|
1509
1525
|
sevenDay: $,
|
|
1510
1526
|
fifteenDay: D,
|
|
1511
1527
|
thirtyDay: T
|
|
1512
|
-
}[
|
|
1513
|
-
if (!
|
|
1514
|
-
let
|
|
1515
|
-
|
|
1528
|
+
}[Y];
|
|
1529
|
+
if (!K) {
|
|
1530
|
+
let re = dayjs().startOf(k);
|
|
1531
|
+
re.isValid() ? K = re.format(a) : K = E;
|
|
1516
1532
|
}
|
|
1517
|
-
return
|
|
1533
|
+
return q && (K = ne(K, q, a)), K;
|
|
1518
1534
|
}
|
|
1519
|
-
function
|
|
1535
|
+
function ue(k, Y, q = "", ee = !1) {
|
|
1520
1536
|
return axios.request({
|
|
1521
1537
|
url: "/sysSelector/list",
|
|
1522
1538
|
method: "POST",
|
|
1523
|
-
data: { id:
|
|
1524
|
-
}).then((
|
|
1525
|
-
|
|
1526
|
-
label:
|
|
1527
|
-
value:
|
|
1528
|
-
})), triggerRef(
|
|
1529
|
-
}).catch((
|
|
1530
|
-
console.warn(`选择器 ${
|
|
1539
|
+
data: { id: k, f_value: q, remote: ee }
|
|
1540
|
+
}).then((K) => {
|
|
1541
|
+
K.data && Array.isArray(K.data.data) && (Y.optionData = K.data.data.map(({ NAME: re, VALUE: oe }) => ({
|
|
1542
|
+
label: re,
|
|
1543
|
+
value: oe
|
|
1544
|
+
})), triggerRef(L));
|
|
1545
|
+
}).catch((K) => {
|
|
1546
|
+
console.warn(`选择器 ${k} 数据加载失败:`, K), Y.optionData = [];
|
|
1531
1547
|
});
|
|
1532
1548
|
}
|
|
1533
|
-
function
|
|
1534
|
-
|
|
1549
|
+
function ye(k, Y) {
|
|
1550
|
+
Y.selectorId && (Y.selectorLoading = !0, axios.request({
|
|
1535
1551
|
url: "/sysSelector/list",
|
|
1536
1552
|
method: "POST",
|
|
1537
|
-
data: { id:
|
|
1538
|
-
}).then((
|
|
1539
|
-
|
|
1553
|
+
data: { id: Y.selectorId, f_value: k, remote: !0 }
|
|
1554
|
+
}).then((q) => {
|
|
1555
|
+
q.data && Array.isArray(q.data.data) && (Y.optionData = q.data.data.map(({ NAME: ee, VALUE: K }) => ({
|
|
1540
1556
|
label: ee,
|
|
1541
|
-
value:
|
|
1557
|
+
value: K
|
|
1542
1558
|
})));
|
|
1543
1559
|
}).finally(() => {
|
|
1544
|
-
|
|
1560
|
+
Y.selectorLoading = !1, triggerRef(L);
|
|
1545
1561
|
}));
|
|
1546
1562
|
}
|
|
1547
|
-
function
|
|
1548
|
-
const { columnName:
|
|
1549
|
-
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1552
|
-
let
|
|
1563
|
+
function U(k, Y, q, ee) {
|
|
1564
|
+
const { columnName: K, defaultValue: re, isNull: oe } = k;
|
|
1565
|
+
k.placeholder = rct(q + "开始");
|
|
1566
|
+
const de = cloneDeep(k);
|
|
1567
|
+
de.name = "-", de.columnName = `end_${K}`, de.placeholder = rct(q + "结束");
|
|
1568
|
+
let le = re || "";
|
|
1553
1569
|
R.value.push({
|
|
1554
|
-
name: `end_${
|
|
1555
|
-
value:
|
|
1570
|
+
name: `end_${K}`,
|
|
1571
|
+
value: le,
|
|
1556
1572
|
type: ee,
|
|
1557
|
-
isNull:
|
|
1558
|
-
}),
|
|
1573
|
+
isNull: oe
|
|
1574
|
+
}), k.selectorId && ue(k.selectorId, de, "", !!k.remoteSearch), Y.push(de);
|
|
1559
1575
|
}
|
|
1560
|
-
function
|
|
1576
|
+
function F(k) {
|
|
1561
1577
|
return {
|
|
1562
|
-
label: rct(
|
|
1563
|
-
required:
|
|
1564
|
-
style:
|
|
1578
|
+
label: rct(k.name),
|
|
1579
|
+
required: k.isNull,
|
|
1580
|
+
style: k.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
|
|
1565
1581
|
};
|
|
1566
1582
|
}
|
|
1567
|
-
function
|
|
1568
|
-
const
|
|
1569
|
-
modelValue:
|
|
1570
|
-
type:
|
|
1583
|
+
function V(k) {
|
|
1584
|
+
const Y = {
|
|
1585
|
+
modelValue: k.value,
|
|
1586
|
+
type: k.type,
|
|
1571
1587
|
clearable: !0,
|
|
1572
|
-
placeholder:
|
|
1573
|
-
"onUpdate:modelValue": (
|
|
1588
|
+
placeholder: k.placeholder,
|
|
1589
|
+
"onUpdate:modelValue": (q) => H(q, k)
|
|
1574
1590
|
};
|
|
1575
|
-
return
|
|
1576
|
-
|
|
1577
|
-
}), ["ElSelect"].includes(
|
|
1591
|
+
return k.formItemType === "ElDatePicker" && (Y["value-format"] = a, DATE_RANGE_TYPES.includes(k.type) && (Y.unlinkPanels = !0, Y.singlePanel = !!k.singlePanel), DATE_VIEW_FORMAT[k.type] && (Y.format = DATE_VIEW_FORMAT[k.type])), ["ElInput"].includes(k.formItemType) && (Y.onBlur = () => z(k, "blur"), Y.onKeyup = (q) => {
|
|
1592
|
+
q.key === "Enter" && z(k, "enter");
|
|
1593
|
+
}), ["ElSelect"].includes(k.formItemType) && (Y.multiple = !0, Y.collapseTags = !0, Y.filterable = !0, k.remoteSearch && k.selectorId && (Y.remote = !0, Y.remoteMethod = (q) => ye(q, k), Y.loading = k.selectorLoading)), Y;
|
|
1578
1594
|
}
|
|
1579
|
-
function
|
|
1580
|
-
let
|
|
1581
|
-
if (
|
|
1595
|
+
function H(k, Y) {
|
|
1596
|
+
let q = R.value.findIndex((ee) => ee.name === Y.columnName);
|
|
1597
|
+
if (Y.value = k, R.value[q].value = k, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(Y.formItemType)) {
|
|
1582
1598
|
if (!n.data.searchOnBlur)
|
|
1583
1599
|
return !1;
|
|
1584
|
-
|
|
1600
|
+
j = !0, se();
|
|
1585
1601
|
}
|
|
1586
1602
|
}
|
|
1587
|
-
function
|
|
1588
|
-
if (["ElInput", "ElInputNumber"].includes(
|
|
1589
|
-
if (
|
|
1603
|
+
function z(k, Y) {
|
|
1604
|
+
if (["ElInput", "ElInputNumber"].includes(k.formItemType)) {
|
|
1605
|
+
if (Y === "blur" && !n.data.searchOnBlur)
|
|
1590
1606
|
return !1;
|
|
1591
|
-
|
|
1607
|
+
j = !0, se();
|
|
1592
1608
|
}
|
|
1593
1609
|
}
|
|
1594
|
-
function
|
|
1595
|
-
if (
|
|
1596
|
-
|
|
1597
|
-
|
|
1610
|
+
function W(k, Y) {
|
|
1611
|
+
if (Y.shiftValue = k || "", !n.data.searchOnBlur)
|
|
1612
|
+
return !1;
|
|
1613
|
+
j = !0, se();
|
|
1614
|
+
}
|
|
1615
|
+
function te(k) {
|
|
1616
|
+
return `${String(Math.floor(k / 60)).padStart(2, "0")}:${String(k % 60).padStart(2, "0")}`;
|
|
1617
|
+
}
|
|
1618
|
+
function Z(k) {
|
|
1619
|
+
return k.crossDay ? `${k.label}(前日${te(k.startMinutes)}-当日${te(k.endMinutes)})` : `${k.label}(${te(k.startMinutes)}-${te(k.endMinutes)})`;
|
|
1620
|
+
}
|
|
1621
|
+
function ne(k, Y, q) {
|
|
1622
|
+
if (Y && k) {
|
|
1623
|
+
let ee = Y.split(",").map((re) => {
|
|
1624
|
+
let oe = re.match(/[-+]/).index, de = Number(re.substring(oe)), le = re.substring(0, oe);
|
|
1598
1625
|
return {
|
|
1599
|
-
count:
|
|
1600
|
-
type:
|
|
1626
|
+
count: de,
|
|
1627
|
+
type: le
|
|
1601
1628
|
};
|
|
1602
|
-
}),
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
}),
|
|
1629
|
+
}), K = dayjs(k);
|
|
1630
|
+
K.isValid() && (ee.forEach(({ count: re, type: oe }) => {
|
|
1631
|
+
K = K.add(re, oe);
|
|
1632
|
+
}), k = K.format(q));
|
|
1606
1633
|
}
|
|
1607
|
-
return
|
|
1608
|
-
}
|
|
1609
|
-
function
|
|
1610
|
-
let
|
|
1611
|
-
|
|
1612
|
-
let
|
|
1613
|
-
if (!
|
|
1614
|
-
Array.isArray(
|
|
1634
|
+
return k;
|
|
1635
|
+
}
|
|
1636
|
+
function se() {
|
|
1637
|
+
let k = cloneDeep(R.value);
|
|
1638
|
+
k.forEach(({ name: Y, value: q, type: ee, isNull: K }, re) => {
|
|
1639
|
+
let oe = G.value[Y];
|
|
1640
|
+
if (!oe) {
|
|
1641
|
+
Array.isArray(q) && (k[re].value = q.join(","));
|
|
1615
1642
|
return;
|
|
1616
1643
|
}
|
|
1617
|
-
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(
|
|
1618
|
-
if (
|
|
1619
|
-
let [
|
|
1620
|
-
const
|
|
1621
|
-
if (
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1644
|
+
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(oe.dataType) && q)
|
|
1645
|
+
if (oe.dateType && DATE_RANGE_TYPES.includes(oe.dateType) && q && q.length === 2) {
|
|
1646
|
+
let [fe, ve] = q;
|
|
1647
|
+
const me = DATE_RANGE_PERIOD_UNIT[oe.dateType];
|
|
1648
|
+
if (me) {
|
|
1649
|
+
const pe = dayjs(fe), ge = dayjs(ve);
|
|
1650
|
+
pe.isValid() && (fe = pe.startOf(me).format(a)), ge.isValid() && (ve = ge.endOf(me).format(a));
|
|
1624
1651
|
}
|
|
1625
|
-
|
|
1626
|
-
let
|
|
1627
|
-
|
|
1628
|
-
name:
|
|
1629
|
-
value:
|
|
1652
|
+
k[re].value = fe;
|
|
1653
|
+
let _e = `end_${oe.columnName}`;
|
|
1654
|
+
k.some((pe) => pe.name === _e) || k.push({
|
|
1655
|
+
name: _e,
|
|
1656
|
+
value: ve,
|
|
1630
1657
|
type: ee,
|
|
1631
|
-
isNull:
|
|
1658
|
+
isNull: K
|
|
1632
1659
|
});
|
|
1633
1660
|
} else {
|
|
1634
|
-
let
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1661
|
+
let fe = dayjs(q);
|
|
1662
|
+
if (fe.isValid() && oe.dateType) {
|
|
1663
|
+
const ve = oe.shiftValue ? Number(oe.shiftValue) : -1, me = oe.dateType === DataParamDateTypes.DATE ? (oe.shiftSegments || [])[ve] : void 0;
|
|
1664
|
+
if (me) {
|
|
1665
|
+
const _e = fe.startOf("day");
|
|
1666
|
+
let pe = _e.add(me.startMinutes, "minute");
|
|
1667
|
+
me.crossDay && (pe = pe.subtract(1, "day")), k[re].value = pe.format(a);
|
|
1668
|
+
let ge = `end_${oe.columnName}`;
|
|
1669
|
+
k.some((we) => we.name === ge) || k.push({
|
|
1670
|
+
name: ge,
|
|
1671
|
+
value: _e.add(me.endMinutes, "minute").format(a),
|
|
1672
|
+
type: ee,
|
|
1673
|
+
isNull: K
|
|
1674
|
+
});
|
|
1675
|
+
} else {
|
|
1676
|
+
let _e = fe.startOf(oe.dateType).format(a);
|
|
1677
|
+
k[re].value = ne(_e, oe.startTime, a);
|
|
1678
|
+
let pe = fe.endOf(oe.dateType).format(a), ge = `end_${oe.columnName}`;
|
|
1679
|
+
k.some((we) => we.name === ge) || k.push({
|
|
1680
|
+
name: ge,
|
|
1681
|
+
value: ne(pe, oe.endTime, a),
|
|
1682
|
+
type: ee,
|
|
1683
|
+
isNull: K
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1645
1686
|
}
|
|
1646
1687
|
}
|
|
1647
|
-
else Array.isArray(
|
|
1648
|
-
}), o("change",
|
|
1688
|
+
else Array.isArray(q) && (k[re].value = q.join(","));
|
|
1689
|
+
}), o("change", k);
|
|
1649
1690
|
}
|
|
1650
1691
|
return e({
|
|
1651
|
-
changeValue:
|
|
1692
|
+
changeValue: se
|
|
1652
1693
|
}), onMounted(() => {
|
|
1653
|
-
}), (
|
|
1694
|
+
}), (k, Y) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
1654
1695
|
createVNode(unref(ElForm), { inline: "" }, {
|
|
1655
1696
|
default: withCtx(() => [
|
|
1656
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1657
|
-
default: withCtx(() =>
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
style:
|
|
1675
|
-
|
|
1676
|
-
|
|
1697
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(L.value, (q) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, F(q)), {
|
|
1698
|
+
default: withCtx(() => {
|
|
1699
|
+
var ee;
|
|
1700
|
+
return [
|
|
1701
|
+
q.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(q.formItemType), mergeProps({
|
|
1702
|
+
key: 0,
|
|
1703
|
+
ref_for: !0
|
|
1704
|
+
}, V(q), {
|
|
1705
|
+
style: { width: `${q.elWidth}px` }
|
|
1706
|
+
}), {
|
|
1707
|
+
default: withCtx(() => [
|
|
1708
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(q.optionData, (K) => (openBlock(), createBlock(unref(ElOption), {
|
|
1709
|
+
key: K.value,
|
|
1710
|
+
label: K.label,
|
|
1711
|
+
value: K.value
|
|
1712
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1713
|
+
]),
|
|
1714
|
+
_: 2
|
|
1715
|
+
}, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(q.formItemType), mergeProps({
|
|
1716
|
+
key: 1,
|
|
1717
|
+
style: { width: `${q.elWidth}px` }
|
|
1718
|
+
}, { ref_for: !0 }, V(q)), null, 16, ["style"])),
|
|
1719
|
+
q.formItemType === "ElDatePicker" && q.type === "date" && ((ee = q.shiftSegments) != null && ee.length) ? (openBlock(), createBlock(unref(ElSelect), {
|
|
1720
|
+
key: 2,
|
|
1721
|
+
class: "shift-select",
|
|
1722
|
+
clearable: "",
|
|
1723
|
+
"model-value": q.shiftValue,
|
|
1724
|
+
placeholder: unref(rct)("全部班次"),
|
|
1725
|
+
onChange: (K) => W(K, q)
|
|
1726
|
+
}, {
|
|
1727
|
+
default: withCtx(() => [
|
|
1728
|
+
createVNode(unref(ElOption), {
|
|
1729
|
+
value: "",
|
|
1730
|
+
label: unref(rct)("全部班次")
|
|
1731
|
+
}, null, 8, ["label"]),
|
|
1732
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(q.shiftSegments, (K, re) => (openBlock(), createBlock(unref(ElOption), {
|
|
1733
|
+
key: re,
|
|
1734
|
+
value: String(re),
|
|
1735
|
+
label: Z(K)
|
|
1736
|
+
}, null, 8, ["value", "label"]))), 128))
|
|
1737
|
+
]),
|
|
1738
|
+
_: 2
|
|
1739
|
+
}, 1032, ["model-value", "placeholder", "onChange"])) : createCommentVNode("", !0)
|
|
1740
|
+
];
|
|
1741
|
+
}),
|
|
1677
1742
|
_: 2
|
|
1678
1743
|
}, 1040)), [
|
|
1679
|
-
[vShow,
|
|
1744
|
+
[vShow, q.isShow]
|
|
1680
1745
|
])), 256))
|
|
1681
1746
|
]),
|
|
1682
1747
|
_: 1
|
|
1683
1748
|
}),
|
|
1684
|
-
renderSlot(
|
|
1749
|
+
renderSlot(k.$slots, "search")
|
|
1685
1750
|
]));
|
|
1686
1751
|
}
|
|
1687
1752
|
});
|
|
@@ -1712,13 +1777,13 @@ function getDateSourceData(t, e = {
|
|
|
1712
1777
|
data: e
|
|
1713
1778
|
}).then((r) => {
|
|
1714
1779
|
var n;
|
|
1715
|
-
return r != null && r.data && ((n = r.data) != null && n.data) ? Promise.resolve(r.data) : Promise.resolve([]);
|
|
1780
|
+
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 });
|
|
1716
1781
|
});
|
|
1717
1782
|
}
|
|
1718
1783
|
var zhCn$1 = { exports: {} };
|
|
1719
1784
|
(function(t, e) {
|
|
1720
1785
|
(function(r, n) {
|
|
1721
|
-
t.exports = n(
|
|
1786
|
+
t.exports = n(dayjs_minExports);
|
|
1722
1787
|
})(commonjsGlobal, function(r) {
|
|
1723
1788
|
function n(a) {
|
|
1724
1789
|
return a && typeof a == "object" && "default" in a ? a : { default: a };
|
|
@@ -2992,37 +3057,37 @@ var divide = /* @__PURE__ */ function() {
|
|
|
2992
3057
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
2993
3058
|
}
|
|
2994
3059
|
return function(n, o, i, a, s, l) {
|
|
2995
|
-
var c, u, d, f, p, m, g, _, v,
|
|
3060
|
+
var c, u, d, f, p, m, g, _, v, b, y, E, w, C, $, D, T, S, I, B, M = n.constructor, N = n.s == o.s ? 1 : -1, O = n.d, x = o.d;
|
|
2996
3061
|
if (!O || !O[0] || !x || !x[0])
|
|
2997
|
-
return new
|
|
3062
|
+
return new M(
|
|
2998
3063
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
2999
3064
|
!n.s || !o.s || (O ? x && O[0] == x[0] : !x) ? NaN : (
|
|
3000
3065
|
// Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
|
|
3001
3066
|
O && O[0] == 0 || !x ? N * 0 : N / 0
|
|
3002
3067
|
)
|
|
3003
3068
|
);
|
|
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
|
|
3005
|
-
if (x[d] > (O[d] || 0) && u--, i == null ? (
|
|
3006
|
-
|
|
3069
|
+
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(N), b = v.d = [], d = 0; x[d] == (O[d] || 0); d++) ;
|
|
3070
|
+
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)
|
|
3071
|
+
b.push(1), m = !0;
|
|
3007
3072
|
else {
|
|
3008
|
-
if (
|
|
3009
|
-
for (f = 0, x = x[0],
|
|
3010
|
-
$ = f * l + (O[d] || 0),
|
|
3073
|
+
if (C = C / p + 2 | 0, d = 0, I == 1) {
|
|
3074
|
+
for (f = 0, x = x[0], C++; (d < T || f) && C--; d++)
|
|
3075
|
+
$ = f * l + (O[d] || 0), b[d] = $ / x | 0, f = $ % x | 0;
|
|
3011
3076
|
m = f || d < T;
|
|
3012
3077
|
} else {
|
|
3013
3078
|
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
|
-
|
|
3079
|
+
B = x.slice(), B.unshift(0), S = x[0], x[1] >= l / 2 && ++S;
|
|
3015
3080
|
do
|
|
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 < _ ?
|
|
3017
|
-
while ((D++ < T || y[0] !== void 0) &&
|
|
3081
|
+
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);
|
|
3082
|
+
while ((D++ < T || y[0] !== void 0) && C--);
|
|
3018
3083
|
m = y[0] !== void 0;
|
|
3019
3084
|
}
|
|
3020
|
-
|
|
3085
|
+
b[0] || b.shift();
|
|
3021
3086
|
}
|
|
3022
3087
|
if (p == 1)
|
|
3023
3088
|
v.e = u, inexact = m;
|
|
3024
3089
|
else {
|
|
3025
|
-
for (d = 1, f =
|
|
3090
|
+
for (d = 1, f = b[0]; f >= 10; f /= 10) d++;
|
|
3026
3091
|
v.e = d + u * p - 1, finalise(v, s ? i + v.e + 1 : i, a, m);
|
|
3027
3092
|
}
|
|
3028
3093
|
return v;
|
|
@@ -3139,7 +3204,7 @@ function naturalExponential(t, e) {
|
|
|
3139
3204
|
}
|
|
3140
3205
|
}
|
|
3141
3206
|
function naturalLogarithm(t, e) {
|
|
3142
|
-
var r, n, o, i, a, s, l, c, u, d, f, p = 1, m = 10, g = t, _ = g.d, v = g.constructor,
|
|
3207
|
+
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;
|
|
3143
3208
|
if (g.s < 0 || !_ || !_[0] || !g.e && _[0] == 1 && _.length == 1)
|
|
3144
3209
|
return new v(_ && !_[0] ? -1 / 0 : g.s != 1 ? NaN : _ ? 0 : g);
|
|
3145
3210
|
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) {
|
|
@@ -3147,14 +3212,14 @@ function naturalLogarithm(t, e) {
|
|
|
3147
3212
|
g = g.times(t), r = digitsToString(g.d), n = r.charAt(0), p++;
|
|
3148
3213
|
i = g.e, n > 1 ? (g = new v("0." + r), i++) : g = new v(n + "." + r.slice(1));
|
|
3149
3214
|
} else
|
|
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,
|
|
3215
|
+
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;
|
|
3151
3216
|
for (d = g, l = a = g = divide(g.minus(1), g.plus(1), u, 1), f = finalise(g.times(g), u, 1), o = 3; ; ) {
|
|
3152
3217
|
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))
|
|
3153
3218
|
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)
|
|
3154
|
-
if (checkRoundingDigits(l.d, u - m,
|
|
3219
|
+
if (checkRoundingDigits(l.d, u - m, b, s))
|
|
3155
3220
|
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;
|
|
3156
3221
|
else
|
|
3157
|
-
return finalise(l, v.precision = y,
|
|
3222
|
+
return finalise(l, v.precision = y, b, external = !0);
|
|
3158
3223
|
else
|
|
3159
3224
|
return v.precision = y, l;
|
|
3160
3225
|
l = c, o += 2;
|
|
@@ -3601,10 +3666,10 @@ function applyBorderOperation(t, e, r) {
|
|
|
3601
3666
|
f.row < n && (n = f.row), f.row > o && (o = f.row), f.col < i && (i = f.col), f.col > a && (a = f.col);
|
|
3602
3667
|
});
|
|
3603
3668
|
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) => {
|
|
3604
|
-
var
|
|
3669
|
+
var b, y, E;
|
|
3605
3670
|
const _ = `${f},${p}`;
|
|
3606
3671
|
let v = l.get(_);
|
|
3607
|
-
v || (v = { row: f, col: p, border: cloneBorder((E = (y = (
|
|
3672
|
+
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 };
|
|
3608
3673
|
}, d = r.mode === "none";
|
|
3609
3674
|
t.forEach((f) => {
|
|
3610
3675
|
var _, v;
|
|
@@ -3613,9 +3678,9 @@ function applyBorderOperation(t, e, r) {
|
|
|
3613
3678
|
const m = cloneBorder((v = p.style) == null ? void 0 : v.border);
|
|
3614
3679
|
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) => {
|
|
3615
3680
|
m[y] = { ...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((
|
|
3681
|
+
}), 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) => {
|
|
3617
3682
|
var w;
|
|
3618
|
-
const y = getNeighborSide(f,
|
|
3683
|
+
const y = getNeighborSide(f, b);
|
|
3619
3684
|
if (!y) return;
|
|
3620
3685
|
const E = (w = e[y.row]) == null ? void 0 : w[y.col];
|
|
3621
3686
|
E && (s.has(`${y.row},${y.col}`) || E.rowSpan === 0 || E.colSpan === 0 || u(y.row, y.col, y.side, d ? { style: "none" } : { ...c }));
|
|
@@ -7054,9 +7119,9 @@ regex.testAlphanumeric = function t(e) {
|
|
|
7054
7119
|
if (!i.isValid(p))
|
|
7055
7120
|
throw new Error("Invalid QR Code version");
|
|
7056
7121
|
typeof g > "u" && (g = o.BYTE);
|
|
7057
|
-
const _ = e.getSymbolTotalCodewords(p), v = r.getTotalCodewordsCount(p, m),
|
|
7058
|
-
if (g === o.MIXED) return
|
|
7059
|
-
const y =
|
|
7122
|
+
const _ = e.getSymbolTotalCodewords(p), v = r.getTotalCodewordsCount(p, m), b = (_ - v) * 8;
|
|
7123
|
+
if (g === o.MIXED) return b;
|
|
7124
|
+
const y = b - c(g, p);
|
|
7060
7125
|
switch (g) {
|
|
7061
7126
|
case o.NUMERIC:
|
|
7062
7127
|
return Math.floor(y / 10 * 3);
|
|
@@ -7307,22 +7372,22 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7307
7372
|
function c(v) {
|
|
7308
7373
|
return unescape(encodeURIComponent(v)).length;
|
|
7309
7374
|
}
|
|
7310
|
-
function u(v,
|
|
7375
|
+
function u(v, b, y) {
|
|
7311
7376
|
const E = [];
|
|
7312
7377
|
let w;
|
|
7313
7378
|
for (; (w = v.exec(y)) !== null; )
|
|
7314
7379
|
E.push({
|
|
7315
7380
|
data: w[0],
|
|
7316
7381
|
index: w.index,
|
|
7317
|
-
mode:
|
|
7382
|
+
mode: b,
|
|
7318
7383
|
length: w[0].length
|
|
7319
7384
|
});
|
|
7320
7385
|
return E;
|
|
7321
7386
|
}
|
|
7322
7387
|
function d(v) {
|
|
7323
|
-
const
|
|
7388
|
+
const b = u(a.NUMERIC, e.NUMERIC, v), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, v);
|
|
7324
7389
|
let E, w;
|
|
7325
|
-
return s.isKanjiModeEnabled() ? (E = u(a.BYTE, e.BYTE, v), w = u(a.KANJI, e.KANJI, v)) : (E = u(a.BYTE_KANJI, e.BYTE, v), w = []),
|
|
7390
|
+
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) {
|
|
7326
7391
|
return $.index - D.index;
|
|
7327
7392
|
}).map(function($) {
|
|
7328
7393
|
return {
|
|
@@ -7332,8 +7397,8 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7332
7397
|
};
|
|
7333
7398
|
});
|
|
7334
7399
|
}
|
|
7335
|
-
function f(v,
|
|
7336
|
-
switch (
|
|
7400
|
+
function f(v, b) {
|
|
7401
|
+
switch (b) {
|
|
7337
7402
|
case e.NUMERIC:
|
|
7338
7403
|
return r.getBitsLength(v);
|
|
7339
7404
|
case e.ALPHANUMERIC:
|
|
@@ -7345,66 +7410,66 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7345
7410
|
}
|
|
7346
7411
|
}
|
|
7347
7412
|
function p(v) {
|
|
7348
|
-
return v.reduce(function(
|
|
7349
|
-
const E =
|
|
7350
|
-
return E && E.mode === y.mode ? (
|
|
7413
|
+
return v.reduce(function(b, y) {
|
|
7414
|
+
const E = b.length - 1 >= 0 ? b[b.length - 1] : null;
|
|
7415
|
+
return E && E.mode === y.mode ? (b[b.length - 1].data += y.data, b) : (b.push(y), b);
|
|
7351
7416
|
}, []);
|
|
7352
7417
|
}
|
|
7353
7418
|
function m(v) {
|
|
7354
|
-
const
|
|
7419
|
+
const b = [];
|
|
7355
7420
|
for (let y = 0; y < v.length; y++) {
|
|
7356
7421
|
const E = v[y];
|
|
7357
7422
|
switch (E.mode) {
|
|
7358
7423
|
case e.NUMERIC:
|
|
7359
|
-
|
|
7424
|
+
b.push([
|
|
7360
7425
|
E,
|
|
7361
7426
|
{ data: E.data, mode: e.ALPHANUMERIC, length: E.length },
|
|
7362
7427
|
{ data: E.data, mode: e.BYTE, length: E.length }
|
|
7363
7428
|
]);
|
|
7364
7429
|
break;
|
|
7365
7430
|
case e.ALPHANUMERIC:
|
|
7366
|
-
|
|
7431
|
+
b.push([
|
|
7367
7432
|
E,
|
|
7368
7433
|
{ data: E.data, mode: e.BYTE, length: E.length }
|
|
7369
7434
|
]);
|
|
7370
7435
|
break;
|
|
7371
7436
|
case e.KANJI:
|
|
7372
|
-
|
|
7437
|
+
b.push([
|
|
7373
7438
|
E,
|
|
7374
7439
|
{ data: E.data, mode: e.BYTE, length: c(E.data) }
|
|
7375
7440
|
]);
|
|
7376
7441
|
break;
|
|
7377
7442
|
case e.BYTE:
|
|
7378
|
-
|
|
7443
|
+
b.push([
|
|
7379
7444
|
{ data: E.data, mode: e.BYTE, length: c(E.data) }
|
|
7380
7445
|
]);
|
|
7381
7446
|
}
|
|
7382
7447
|
}
|
|
7383
|
-
return
|
|
7448
|
+
return b;
|
|
7384
7449
|
}
|
|
7385
|
-
function g(v,
|
|
7450
|
+
function g(v, b) {
|
|
7386
7451
|
const y = {}, E = { start: {} };
|
|
7387
7452
|
let w = ["start"];
|
|
7388
|
-
for (let
|
|
7389
|
-
const $ = v[
|
|
7453
|
+
for (let C = 0; C < v.length; C++) {
|
|
7454
|
+
const $ = v[C], D = [];
|
|
7390
7455
|
for (let T = 0; T < $.length; T++) {
|
|
7391
|
-
const S = $[T], I = "" +
|
|
7456
|
+
const S = $[T], I = "" + C + T;
|
|
7392
7457
|
D.push(I), y[I] = { node: S, lastCount: 0 }, E[I] = {};
|
|
7393
|
-
for (let
|
|
7394
|
-
const
|
|
7395
|
-
y[
|
|
7458
|
+
for (let B = 0; B < w.length; B++) {
|
|
7459
|
+
const M = w[B];
|
|
7460
|
+
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));
|
|
7396
7461
|
}
|
|
7397
7462
|
}
|
|
7398
7463
|
w = D;
|
|
7399
7464
|
}
|
|
7400
|
-
for (let
|
|
7401
|
-
E[w[
|
|
7465
|
+
for (let C = 0; C < w.length; C++)
|
|
7466
|
+
E[w[C]].end = 0;
|
|
7402
7467
|
return { map: E, table: y };
|
|
7403
7468
|
}
|
|
7404
|
-
function _(v,
|
|
7469
|
+
function _(v, b) {
|
|
7405
7470
|
let y;
|
|
7406
7471
|
const E = e.getBestModeForData(v);
|
|
7407
|
-
if (y = e.from(
|
|
7472
|
+
if (y = e.from(b, E), y !== e.BYTE && y.bit < E.bit)
|
|
7408
7473
|
throw new Error('"' + v + '" cannot be encoded with mode ' + e.toString(y) + `.
|
|
7409
7474
|
Suggested mode is: ` + e.toString(E));
|
|
7410
7475
|
switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
|
|
@@ -7418,18 +7483,18 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7418
7483
|
return new o(v);
|
|
7419
7484
|
}
|
|
7420
7485
|
}
|
|
7421
|
-
t.fromArray = function(
|
|
7422
|
-
return
|
|
7486
|
+
t.fromArray = function(b) {
|
|
7487
|
+
return b.reduce(function(y, E) {
|
|
7423
7488
|
return typeof E == "string" ? y.push(_(E, null)) : E.data && y.push(_(E.data, E.mode)), y;
|
|
7424
7489
|
}, []);
|
|
7425
|
-
}, t.fromString = function(
|
|
7426
|
-
const E = d(
|
|
7490
|
+
}, t.fromString = function(b, y) {
|
|
7491
|
+
const E = d(b, s.isKanjiModeEnabled()), w = m(E), C = g(w, y), $ = l.find_path(C.map, "start", "end"), D = [];
|
|
7427
7492
|
for (let T = 1; T < $.length - 1; T++)
|
|
7428
|
-
D.push(
|
|
7493
|
+
D.push(C.table[$[T]].node);
|
|
7429
7494
|
return t.fromArray(p(D));
|
|
7430
|
-
}, t.rawSplit = function(
|
|
7495
|
+
}, t.rawSplit = function(b) {
|
|
7431
7496
|
return t.fromArray(
|
|
7432
|
-
d(
|
|
7497
|
+
d(b, s.isKanjiModeEnabled())
|
|
7433
7498
|
);
|
|
7434
7499
|
};
|
|
7435
7500
|
})(segments);
|
|
@@ -7507,19 +7572,19 @@ function createCodewords(t, e, r) {
|
|
|
7507
7572
|
let m = 0;
|
|
7508
7573
|
const g = new Array(a), _ = new Array(a);
|
|
7509
7574
|
let v = 0;
|
|
7510
|
-
const
|
|
7575
|
+
const b = new Uint8Array(t.buffer);
|
|
7511
7576
|
for (let $ = 0; $ < a; $++) {
|
|
7512
7577
|
const D = $ < l ? u : d;
|
|
7513
|
-
g[$] =
|
|
7578
|
+
g[$] = b.slice(m, m + D), _[$] = p.encode(g[$]), m += D, v = Math.max(v, D);
|
|
7514
7579
|
}
|
|
7515
7580
|
const y = new Uint8Array(n);
|
|
7516
|
-
let E = 0, w,
|
|
7581
|
+
let E = 0, w, C;
|
|
7517
7582
|
for (w = 0; w < v; w++)
|
|
7518
|
-
for (
|
|
7519
|
-
w < g[
|
|
7583
|
+
for (C = 0; C < a; C++)
|
|
7584
|
+
w < g[C].length && (y[E++] = g[C][w]);
|
|
7520
7585
|
for (w = 0; w < f; w++)
|
|
7521
|
-
for (
|
|
7522
|
-
y[E++] = _[
|
|
7586
|
+
for (C = 0; C < a; C++)
|
|
7587
|
+
y[E++] = _[C][w];
|
|
7523
7588
|
return y;
|
|
7524
7589
|
}
|
|
7525
7590
|
function createSymbol(t, e, r, n) {
|
|
@@ -7700,8 +7765,8 @@ browser.toString = renderCanvas.bind(null, function(t, e, r) {
|
|
|
7700
7765
|
});
|
|
7701
7766
|
class CanvasPool {
|
|
7702
7767
|
constructor() {
|
|
7703
|
-
|
|
7704
|
-
|
|
7768
|
+
ce(this, "pool", []);
|
|
7769
|
+
ce(this, "maxSize", 10);
|
|
7705
7770
|
}
|
|
7706
7771
|
// 最多缓存 10 个 canvas
|
|
7707
7772
|
/**
|
|
@@ -7885,10 +7950,10 @@ function renderImageStyle(t) {
|
|
|
7885
7950
|
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(";") : "";
|
|
7886
7951
|
}
|
|
7887
7952
|
function renderCell(t, e, r) {
|
|
7888
|
-
var
|
|
7953
|
+
var b, y, E, w, C;
|
|
7889
7954
|
const n = document.createElement("td");
|
|
7890
7955
|
n.setAttribute("data-cell-config", `${e.row}-${e.col}`), n.setAttribute("rowspan", e.rowSpan), n.setAttribute("colspan", e.colSpan);
|
|
7891
|
-
const o = ((
|
|
7956
|
+
const o = ((b = e.style) == null ? void 0 : b.allowContentOverflow) === !0;
|
|
7892
7957
|
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`);
|
|
7893
7958
|
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");
|
|
7894
7959
|
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};`;
|
|
@@ -7908,7 +7973,7 @@ function renderCell(t, e, r) {
|
|
|
7908
7973
|
break;
|
|
7909
7974
|
}
|
|
7910
7975
|
default:
|
|
7911
|
-
u = [void 0, null, ""].includes(e.text) ? ((
|
|
7976
|
+
u = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : e.text;
|
|
7912
7977
|
break;
|
|
7913
7978
|
}
|
|
7914
7979
|
if (!d && e.format === FormatType.BARCODE)
|
|
@@ -8002,8 +8067,8 @@ function renderReportByDomForPrint(t, e, r, n) {
|
|
|
8002
8067
|
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) {
|
|
8003
8068
|
if ([CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN, CellType.IMAGE, CellType.RICH].includes(_.type)) {
|
|
8004
8069
|
_.style && v.setAttribute("style", renderCellPrintStyle(_.style, n)), _.style && _.style.border === !1 && v.classList.add("no-border");
|
|
8005
|
-
const
|
|
8006
|
-
v.style.paddingTop = `${E}px`, v.style.paddingRight = `${w}px`, v.style.paddingBottom = `${
|
|
8070
|
+
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;
|
|
8071
|
+
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`);
|
|
8007
8072
|
}
|
|
8008
8073
|
p.appendChild(v);
|
|
8009
8074
|
}
|
|
@@ -8014,6 +8079,7 @@ function renderReportByDomForPrint(t, e, r, n) {
|
|
|
8014
8079
|
return i.appendChild(c), o;
|
|
8015
8080
|
}
|
|
8016
8081
|
function renderReportByDom(t, e, r, n, o, i) {
|
|
8082
|
+
var _;
|
|
8017
8083
|
const a = document.createElement("div"), s = document.createElement("table");
|
|
8018
8084
|
a.className = "yh-report-table-context", a.appendChild(s), n.value.appendChild(a), s.innerHTML = "";
|
|
8019
8085
|
const l = renderColgroup(e, s);
|
|
@@ -8021,46 +8087,51 @@ function renderReportByDom(t, e, r, n, o, i) {
|
|
|
8021
8087
|
let c = 0, u = 0;
|
|
8022
8088
|
const d = document.createDocumentFragment(), f = [], p = [], m = /* @__PURE__ */ new Map();
|
|
8023
8089
|
let g = 0;
|
|
8024
|
-
for (let
|
|
8025
|
-
const
|
|
8026
|
-
if (
|
|
8090
|
+
for (let v = 0; v < t.length; v++) {
|
|
8091
|
+
const b = t[v];
|
|
8092
|
+
if (b.isHidden)
|
|
8027
8093
|
continue;
|
|
8028
|
-
const
|
|
8029
|
-
|
|
8030
|
-
for (let
|
|
8031
|
-
const
|
|
8032
|
-
if (
|
|
8094
|
+
const y = document.createElement("tr");
|
|
8095
|
+
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;
|
|
8096
|
+
for (let E = 0; E < e.length; E++) {
|
|
8097
|
+
const w = e[E];
|
|
8098
|
+
if (w.isHidden)
|
|
8033
8099
|
continue;
|
|
8034
|
-
const
|
|
8035
|
-
if (
|
|
8036
|
-
const
|
|
8037
|
-
if (
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8100
|
+
const C = r[v][E];
|
|
8101
|
+
if (b && C && (b.size ?? 25) > 0) {
|
|
8102
|
+
const $ = renderCell(b, C, i);
|
|
8103
|
+
if (C.clickSortField) {
|
|
8104
|
+
$.classList.add("click-sort-cell"), $.setAttribute("data-click-sort-field", C.clickSortField), $.setAttribute("data-click-sort-numeric", C.clickSortNumeric ? "1" : "0");
|
|
8105
|
+
const D = document.createElement("span");
|
|
8106
|
+
D.className = "click-sort-arrow", (_ = $.querySelector(":scope > div")) == null || _.appendChild(D);
|
|
8107
|
+
}
|
|
8108
|
+
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)) {
|
|
8109
|
+
if (C.style && C.style.border === !1 && $.classList.add("no-border"), y.appendChild($), C.rowSpan > 1) {
|
|
8110
|
+
const D = f.length;
|
|
8111
|
+
f.push($), p.push(C.rowSpan);
|
|
8112
|
+
for (let T = 1; T < C.rowSpan; T++) {
|
|
8113
|
+
const S = g + T;
|
|
8114
|
+
m.has(S) || m.set(S, []), m.get(S).push(D);
|
|
8044
8115
|
}
|
|
8045
8116
|
}
|
|
8046
8117
|
}
|
|
8047
8118
|
}
|
|
8048
8119
|
}
|
|
8049
|
-
d.appendChild(
|
|
8120
|
+
d.appendChild(y), g++;
|
|
8050
8121
|
}
|
|
8051
8122
|
if (f.length > 0) {
|
|
8052
|
-
let
|
|
8053
|
-
const
|
|
8054
|
-
var
|
|
8055
|
-
|
|
8123
|
+
let v = -1;
|
|
8124
|
+
const b = () => {
|
|
8125
|
+
var y;
|
|
8126
|
+
v >= 0 && ((y = m.get(v)) == null || y.forEach((E) => f[E].classList.remove("merge-hover"))), v = -1;
|
|
8056
8127
|
};
|
|
8057
|
-
s.addEventListener("mouseover", (
|
|
8058
|
-
var
|
|
8059
|
-
const
|
|
8060
|
-
if (!
|
|
8061
|
-
const
|
|
8062
|
-
|
|
8063
|
-
}), s.addEventListener("mouseleave",
|
|
8128
|
+
s.addEventListener("mouseover", (y) => {
|
|
8129
|
+
var C;
|
|
8130
|
+
const E = y.target.closest("tr");
|
|
8131
|
+
if (!E) return;
|
|
8132
|
+
const w = Number(E.dataset.ri);
|
|
8133
|
+
w !== v && (b(), v = w, (C = m.get(w)) == null || C.forEach(($) => f[$].classList.add("merge-hover")));
|
|
8134
|
+
}), s.addEventListener("mouseleave", b);
|
|
8064
8135
|
}
|
|
8065
8136
|
s.appendChild(d);
|
|
8066
8137
|
}
|
|
@@ -8427,10 +8498,10 @@ function getRangeValues(t, e, r) {
|
|
|
8427
8498
|
);
|
|
8428
8499
|
} else if (r.indexOf("c-") > -1) {
|
|
8429
8500
|
const g = parseInt(r.split("-")[1]);
|
|
8430
|
-
d = getCellValue(m).filter((
|
|
8431
|
-
(
|
|
8501
|
+
d = getCellValue(m).filter((b) => b.colGroupIndex === g).map(
|
|
8502
|
+
(b) => {
|
|
8432
8503
|
var y;
|
|
8433
|
-
return [null, void 0, ""].includes(
|
|
8504
|
+
return [null, void 0, ""].includes(b.rawData) ? (y = b.formatType) == null ? void 0 : y.defaultCellContent : b.rawData;
|
|
8434
8505
|
}
|
|
8435
8506
|
);
|
|
8436
8507
|
}
|
|
@@ -8510,8 +8581,8 @@ function evaluateFunction(t, e, r) {
|
|
|
8510
8581
|
for (let g = 0; g < a; g++) {
|
|
8511
8582
|
let _ = new Decimal(1);
|
|
8512
8583
|
for (const v of i) {
|
|
8513
|
-
const
|
|
8514
|
-
_ = _.times(isNaN(
|
|
8584
|
+
const b = parseFloat(v[g]);
|
|
8585
|
+
_ = _.times(isNaN(b) ? 0 : b);
|
|
8515
8586
|
}
|
|
8516
8587
|
s = s.plus(_);
|
|
8517
8588
|
}
|
|
@@ -8620,6 +8691,24 @@ async function preGenerateBarcodes(t) {
|
|
|
8620
8691
|
}
|
|
8621
8692
|
e.length > 0 && await Promise.all(e);
|
|
8622
8693
|
}
|
|
8694
|
+
function resolveFieldKey(t, e) {
|
|
8695
|
+
const r = t.find((o) => o && typeof o == "object");
|
|
8696
|
+
return !r || e in r ? e : Object.keys(r).find((o) => o.toUpperCase() === e.toUpperCase()) || e;
|
|
8697
|
+
}
|
|
8698
|
+
function sortRowsByField(t, e, r, n = !1) {
|
|
8699
|
+
const o = resolveFieldKey(t, e), i = r === "desc" ? -1 : 1;
|
|
8700
|
+
return [...t].sort((a, s) => {
|
|
8701
|
+
const l = a == null ? void 0 : a[o], c = s == null ? void 0 : s[o], u = l == null || l === "", d = c == null || c === "";
|
|
8702
|
+
if (u || d) return u && d ? 0 : u ? 1 : -1;
|
|
8703
|
+
let f;
|
|
8704
|
+
if (n) {
|
|
8705
|
+
const p = parseFloat(l), m = parseFloat(c), g = isNaN(p) ? Number.POSITIVE_INFINITY : p, _ = isNaN(m) ? Number.POSITIVE_INFINITY : m;
|
|
8706
|
+
f = g - _;
|
|
8707
|
+
} else
|
|
8708
|
+
f = String(l).localeCompare(String(c), "zh-CN");
|
|
8709
|
+
return f * i;
|
|
8710
|
+
});
|
|
8711
|
+
}
|
|
8623
8712
|
function loopGroupCols(t, e, r, n) {
|
|
8624
8713
|
e.forEach((o) => {
|
|
8625
8714
|
let i = n[o.data], a = [], s = [];
|
|
@@ -8631,28 +8720,28 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8631
8720
|
s.forEach((m, g) => {
|
|
8632
8721
|
const _ = getSeparatorKey("key", m);
|
|
8633
8722
|
l[_] || (l[_] = /* @__PURE__ */ new Set());
|
|
8634
|
-
let
|
|
8723
|
+
let b = a[m].data.replace("col:", "").toUpperCase();
|
|
8635
8724
|
if (g === 0)
|
|
8636
8725
|
i.forEach((y) => {
|
|
8637
|
-
if (
|
|
8638
|
-
let E = y[
|
|
8726
|
+
if (b) {
|
|
8727
|
+
let E = y[b];
|
|
8639
8728
|
E || (E = "-");
|
|
8640
|
-
const w = getSeparatorKey("child", m, E),
|
|
8641
|
-
l[w] ? l[w].push(y) : l[w] = [y], l[_].add(E), l[E] = [E], l[
|
|
8729
|
+
const w = getSeparatorKey("child", m, E), C = getSeparatorKey("data", E);
|
|
8730
|
+
l[w] ? l[w].push(y) : l[w] = [y], l[_].add(E), l[E] = [E], l[C] = [y];
|
|
8642
8731
|
}
|
|
8643
8732
|
});
|
|
8644
8733
|
else {
|
|
8645
8734
|
let y = s[g - 1];
|
|
8646
8735
|
const E = getSeparatorKey("key", y);
|
|
8647
|
-
Array.from(l[E]).forEach((
|
|
8648
|
-
const $ = getSeparatorKey("child", y,
|
|
8736
|
+
Array.from(l[E]).forEach((C) => {
|
|
8737
|
+
const $ = getSeparatorKey("child", y, C);
|
|
8649
8738
|
let T = (l[$] || []).map((S) => {
|
|
8650
|
-
if (
|
|
8651
|
-
let I = S[
|
|
8739
|
+
if (b) {
|
|
8740
|
+
let I = S[b];
|
|
8652
8741
|
I || (I = "-");
|
|
8653
|
-
let
|
|
8654
|
-
const
|
|
8655
|
-
return l[
|
|
8742
|
+
let B = !1;
|
|
8743
|
+
const M = getSeparatorKey("child", m, C, I), N = getSeparatorKey(C, I), O = getSeparatorKey("data", N);
|
|
8744
|
+
return l[M] ? l[M].push(S) : l[M] = [S], l[O] ? l[O].push(S) : l[O] = [S], l[_].has(N) || (B = !0), l[_].add(N), l[N] = l[C].concat([I]), B ? I : null;
|
|
8656
8745
|
}
|
|
8657
8746
|
}).filter((S) => !!S);
|
|
8658
8747
|
l[$] = T;
|
|
@@ -8666,8 +8755,8 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8666
8755
|
if (c !== void 0) {
|
|
8667
8756
|
const m = a[c], g = { order: m.groupSortOrder, numeric: m.groupSortNumeric };
|
|
8668
8757
|
s.forEach((_) => {
|
|
8669
|
-
const v = getSeparatorKey("key", _),
|
|
8670
|
-
|
|
8758
|
+
const v = getSeparatorKey("key", _), b = Array.from(l[v]);
|
|
8759
|
+
b.length > 1 && b.sort(createGroupSortComparator(g)), l[v] = new Set(b);
|
|
8671
8760
|
});
|
|
8672
8761
|
}
|
|
8673
8762
|
let u = 1, d = Math.max(...s), f = Math.min(...s);
|
|
@@ -8676,35 +8765,35 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8676
8765
|
const m = getSeparatorKey("key", d);
|
|
8677
8766
|
p ? u = l[m].size : u = Array.from(l[m]).reduce((g, _) => {
|
|
8678
8767
|
const v = getSeparatorKey("child", d, _);
|
|
8679
|
-
let
|
|
8680
|
-
return g +
|
|
8768
|
+
let b = l[v];
|
|
8769
|
+
return g + b.length;
|
|
8681
8770
|
}, 0);
|
|
8682
8771
|
} else
|
|
8683
8772
|
u = i.length;
|
|
8684
8773
|
for (let m = 0; m < a.length; m++) {
|
|
8685
|
-
const g = a[m], _ = t.findIndex((
|
|
8774
|
+
const g = a[m], _ = t.findIndex((b) => b.index === o.index);
|
|
8686
8775
|
if (m === 0) {
|
|
8687
|
-
const
|
|
8776
|
+
const b = {
|
|
8688
8777
|
...o,
|
|
8689
8778
|
loop: !1
|
|
8690
|
-
}, y = Array.from({ length: u }, () => cloneDeep(
|
|
8779
|
+
}, y = Array.from({ length: u }, () => cloneDeep(b));
|
|
8691
8780
|
t.splice(_, 1, ...y);
|
|
8692
8781
|
}
|
|
8693
8782
|
let v = r[g.row];
|
|
8694
8783
|
if (v && Array.isArray(v)) {
|
|
8695
|
-
let
|
|
8784
|
+
let b = [];
|
|
8696
8785
|
if (s.includes(m)) {
|
|
8697
8786
|
const y = getSeparatorKey("key", g.row);
|
|
8698
|
-
Array.from(l[y]).forEach((w,
|
|
8787
|
+
Array.from(l[y]).forEach((w, C) => {
|
|
8699
8788
|
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];
|
|
8700
|
-
let
|
|
8789
|
+
let B = {
|
|
8701
8790
|
...g,
|
|
8702
8791
|
text: T,
|
|
8703
8792
|
colSpan: $,
|
|
8704
8793
|
colData: I
|
|
8705
8794
|
};
|
|
8706
|
-
if (
|
|
8707
|
-
let
|
|
8795
|
+
if (b.push(B), $ > 1) {
|
|
8796
|
+
let M = {
|
|
8708
8797
|
...g,
|
|
8709
8798
|
text: T,
|
|
8710
8799
|
type: "",
|
|
@@ -8712,19 +8801,19 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8712
8801
|
rowSpan: 0
|
|
8713
8802
|
};
|
|
8714
8803
|
for (let N = 0; N < $ - 1; N++)
|
|
8715
|
-
|
|
8804
|
+
b.push(M);
|
|
8716
8805
|
}
|
|
8717
|
-
}), v.splice(g.col, 1, ...
|
|
8806
|
+
}), v.splice(g.col, 1, ...b);
|
|
8718
8807
|
} else {
|
|
8719
8808
|
if (m > f && m < d) {
|
|
8720
8809
|
let y = findMaxLessThan(s, m);
|
|
8721
8810
|
if (y !== null) {
|
|
8722
8811
|
let E = r[y].slice(o.index, o.index + u);
|
|
8723
8812
|
E = E.map((w) => {
|
|
8724
|
-
let
|
|
8725
|
-
return Array.isArray(
|
|
8813
|
+
let C = w.colData;
|
|
8814
|
+
return Array.isArray(C) && (C = C[0]), {
|
|
8726
8815
|
...g,
|
|
8727
|
-
colData:
|
|
8816
|
+
colData: C,
|
|
8728
8817
|
colSpan: w.colSpan,
|
|
8729
8818
|
rowSpan: w.rowSpan
|
|
8730
8819
|
};
|
|
@@ -8736,35 +8825,35 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8736
8825
|
const y = getSeparatorKey("key", d);
|
|
8737
8826
|
let E = l[y] ? Array.from(l[y]) : [], w = g.data.replace("col:", "").toUpperCase();
|
|
8738
8827
|
if (g.isRowColCombine) {
|
|
8739
|
-
let
|
|
8828
|
+
let C = s.map((D) => a[D].data.replace("col:", "").toUpperCase()), $ = [];
|
|
8740
8829
|
E.forEach((D, T) => {
|
|
8741
8830
|
let S = {
|
|
8742
8831
|
...g,
|
|
8743
|
-
combineKeys:
|
|
8832
|
+
combineKeys: C,
|
|
8744
8833
|
combineValues: l[D],
|
|
8745
8834
|
colGroupIndex: T
|
|
8746
8835
|
};
|
|
8747
8836
|
$.push(S);
|
|
8748
8837
|
}), v.splice(g.col, 1, ...$);
|
|
8749
8838
|
} else if (E.length)
|
|
8750
|
-
E.forEach((
|
|
8839
|
+
E.forEach((C, $) => {
|
|
8751
8840
|
let D = [];
|
|
8752
|
-
const T = getSeparatorKey("data",
|
|
8841
|
+
const T = getSeparatorKey("data", C);
|
|
8753
8842
|
l[T].forEach((I) => {
|
|
8754
|
-
let
|
|
8843
|
+
let B = {
|
|
8755
8844
|
...g
|
|
8756
8845
|
};
|
|
8757
|
-
delete
|
|
8846
|
+
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);
|
|
8758
8847
|
}), v.splice(g.col, 1, ...D);
|
|
8759
8848
|
});
|
|
8760
8849
|
else {
|
|
8761
|
-
let
|
|
8850
|
+
let C = [];
|
|
8762
8851
|
i.forEach(($) => {
|
|
8763
8852
|
let D = {
|
|
8764
8853
|
...g
|
|
8765
8854
|
};
|
|
8766
|
-
delete D.combineKeys, delete D.combineValues, delete D.isRowColCombine, $[w] !== void 0 ? (D.rawData = $[w], D.colData = $) : D.rawData = "",
|
|
8767
|
-
}), v.splice(g.col, 1, ...
|
|
8855
|
+
delete D.combineKeys, delete D.combineValues, delete D.isRowColCombine, $[w] !== void 0 ? (D.rawData = $[w], D.colData = $) : D.rawData = "", C.push(D);
|
|
8856
|
+
}), v.splice(g.col, 1, ...C);
|
|
8768
8857
|
}
|
|
8769
8858
|
} else if (g.type === CellType.FUN && p && g.colSpan !== 0) {
|
|
8770
8859
|
let y = [];
|
|
@@ -8781,7 +8870,7 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8781
8870
|
colData: i[0]
|
|
8782
8871
|
};
|
|
8783
8872
|
if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
|
|
8784
|
-
let [
|
|
8873
|
+
let [C, $] = g.mergeTarget, D = r.reduce((T, S) => T.concat(S), []).filter((T) => T.row === C && T.col === $)[0];
|
|
8785
8874
|
D && (D.colSpan += u - 1);
|
|
8786
8875
|
} else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
|
|
8787
8876
|
const E = {
|
|
@@ -8903,11 +8992,11 @@ function getGroupData(t, e, r) {
|
|
|
8903
8992
|
const m = getSeparatorKey("child", u, p);
|
|
8904
8993
|
let _ = (n[m] || []).map((v) => {
|
|
8905
8994
|
if (c) {
|
|
8906
|
-
let
|
|
8907
|
-
|
|
8995
|
+
let b = v[c];
|
|
8996
|
+
b || (b = "[" + c + "]");
|
|
8908
8997
|
let y = !1;
|
|
8909
|
-
const E = getSeparatorKey("child", i, p,
|
|
8910
|
-
return n[E] ? n[E].push(v) : n[E] = [v], n[
|
|
8998
|
+
const E = getSeparatorKey("child", i, p, b), w = getSeparatorKey(p, b), C = getSeparatorKey("data", w);
|
|
8999
|
+
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;
|
|
8911
9000
|
}
|
|
8912
9001
|
}).filter((v) => !!v);
|
|
8913
9002
|
n[m] = _;
|
|
@@ -8959,53 +9048,53 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
8959
9048
|
let f = -1, p = null;
|
|
8960
9049
|
const m = [], g = new Array(o).fill(!1);
|
|
8961
9050
|
return t.forEach((_, v) => {
|
|
8962
|
-
let
|
|
9051
|
+
let b = u[v];
|
|
8963
9052
|
if (e.includes(_.col)) {
|
|
8964
9053
|
const y = getSeparatorKey("key", _.col);
|
|
8965
9054
|
let E = Array.from(n[y]), w = f;
|
|
8966
|
-
const
|
|
9055
|
+
const C = e.indexOf(_.col);
|
|
8967
9056
|
E.forEach(($, D) => {
|
|
8968
9057
|
let T;
|
|
8969
9058
|
v === s && (i || a) ? T = 1 : T = getGroupMinChildrenLength(n, $, s, a, i);
|
|
8970
|
-
const S = n[$], I = S[S.length - 1],
|
|
8971
|
-
n[
|
|
8972
|
-
let
|
|
9059
|
+
const S = n[$], I = S[S.length - 1], B = getSeparatorKey("data", $);
|
|
9060
|
+
n[B];
|
|
9061
|
+
let M = {
|
|
8973
9062
|
..._,
|
|
8974
9063
|
text: "",
|
|
8975
9064
|
index: D,
|
|
8976
9065
|
rowSpan: T,
|
|
8977
9066
|
rawData: formatGroupText(I),
|
|
8978
|
-
groupLevel:
|
|
9067
|
+
groupLevel: C,
|
|
8979
9068
|
groupIndices: D,
|
|
8980
9069
|
groupChildIndex: 0,
|
|
8981
9070
|
computedType: ComputedType.loopRow
|
|
8982
9071
|
};
|
|
8983
|
-
|
|
9072
|
+
b.push(M);
|
|
8984
9073
|
let N = {
|
|
8985
9074
|
..._,
|
|
8986
9075
|
text: "",
|
|
8987
9076
|
rawData: formatGroupText(I),
|
|
8988
9077
|
colSpan: 0,
|
|
8989
9078
|
rowSpan: 0,
|
|
8990
|
-
groupLevel:
|
|
9079
|
+
groupLevel: C,
|
|
8991
9080
|
groupIndices: D,
|
|
8992
9081
|
computedType: ComputedType.loopRow,
|
|
8993
|
-
mergeTarget: [
|
|
9082
|
+
mergeTarget: [M.row, M.col]
|
|
8994
9083
|
};
|
|
8995
9084
|
for (let O = 0; O < T - 1; O++) {
|
|
8996
9085
|
let x = cloneDeep(N);
|
|
8997
|
-
x.index = w + O + 1, x.groupChildIndex = O + 1,
|
|
9086
|
+
x.index = w + O + 1, x.groupChildIndex = O + 1, b.push(x);
|
|
8998
9087
|
}
|
|
8999
|
-
if (g[v] = !0, w += T,
|
|
9000
|
-
let O = cloneDeep(l[
|
|
9001
|
-
if (
|
|
9002
|
-
let R =
|
|
9088
|
+
if (g[v] = !0, w += T, M.loopGroupRowIndex !== void 0 && M.loopGroupRowIndex !== "" && !isNaN(M.loopGroupRowIndex)) {
|
|
9089
|
+
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;
|
|
9090
|
+
if (C >= 0) {
|
|
9091
|
+
let R = C;
|
|
9003
9092
|
for (; R >= 0; ) {
|
|
9004
|
-
let
|
|
9005
|
-
|
|
9093
|
+
let L = e[R], j = u[L][w];
|
|
9094
|
+
j && j.groupIndices !== void 0 && !isNaN(j.groupIndices) && (A = A + j.groupIndices), R--;
|
|
9006
9095
|
}
|
|
9007
9096
|
}
|
|
9008
|
-
d.set(`${D}:${
|
|
9097
|
+
d.set(`${D}:${C}:${w}`, {
|
|
9009
9098
|
row: O,
|
|
9010
9099
|
cells: x,
|
|
9011
9100
|
removeCount: A
|
|
@@ -9017,46 +9106,46 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9017
9106
|
if (_.isRowColCombine) {
|
|
9018
9107
|
const E = getSeparatorKey("key", s);
|
|
9019
9108
|
let w = n[E] ? Array.from(n[E]) : [];
|
|
9020
|
-
w.length ? w.forEach((
|
|
9021
|
-
const D = getSeparatorKey("child", s,
|
|
9022
|
-
let T = n[D], S = _.combineKeys ? _.combineKeys.map((
|
|
9109
|
+
w.length ? w.forEach((C, $) => {
|
|
9110
|
+
const D = getSeparatorKey("child", s, C);
|
|
9111
|
+
let T = n[D], S = _.combineKeys ? _.combineKeys.map((M, N) => {
|
|
9023
9112
|
const O = _.combineValues ? _.combineValues[N] : void 0;
|
|
9024
9113
|
return {
|
|
9025
|
-
key:
|
|
9114
|
+
key: M,
|
|
9026
9115
|
val: O
|
|
9027
9116
|
};
|
|
9028
9117
|
}) : [];
|
|
9029
|
-
const I = T.filter((
|
|
9030
|
-
let
|
|
9118
|
+
const I = T.filter((M) => S.every((N) => M[N.key] === N.val));
|
|
9119
|
+
let B = {
|
|
9031
9120
|
..._,
|
|
9032
9121
|
index: $
|
|
9033
9122
|
};
|
|
9034
|
-
if (delete
|
|
9035
|
-
const
|
|
9036
|
-
|
|
9123
|
+
if (delete B.combineKeys, delete B.combineValues, delete B.isRowColCombine, I && I.length) {
|
|
9124
|
+
const M = I.map((N) => y ? N[y] : void 0);
|
|
9125
|
+
B.rawData = _.mergedValueAggregation ? aggregateMergedValues(M, _.mergedValueAggregation) : I[0][y], B.rowData = I[0];
|
|
9037
9126
|
} else
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
}) : r.forEach((
|
|
9041
|
-
let T = (_.combineKeys ? _.combineKeys.map((I,
|
|
9042
|
-
const
|
|
9127
|
+
B.rawData = "", B.rowData = {};
|
|
9128
|
+
b.push(B);
|
|
9129
|
+
}) : r.forEach((C, $) => {
|
|
9130
|
+
let T = (_.combineKeys ? _.combineKeys.map((I, B) => {
|
|
9131
|
+
const M = _.combineValues ? _.combineValues[B] : void 0;
|
|
9043
9132
|
return {
|
|
9044
9133
|
key: I,
|
|
9045
|
-
val:
|
|
9134
|
+
val: M
|
|
9046
9135
|
};
|
|
9047
|
-
}) : []).every((I) =>
|
|
9136
|
+
}) : []).every((I) => C[I.key] === I.val), S = {
|
|
9048
9137
|
..._,
|
|
9049
9138
|
index: $
|
|
9050
9139
|
};
|
|
9051
|
-
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, T ? (S.rawData = y ?
|
|
9140
|
+
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);
|
|
9052
9141
|
});
|
|
9053
9142
|
} else if (e.length === 0)
|
|
9054
9143
|
r.forEach((E, w) => {
|
|
9055
|
-
let
|
|
9144
|
+
let C = {
|
|
9056
9145
|
index: w,
|
|
9057
9146
|
..._
|
|
9058
9147
|
};
|
|
9059
|
-
delete
|
|
9148
|
+
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);
|
|
9060
9149
|
});
|
|
9061
9150
|
else {
|
|
9062
9151
|
const E = getSeparatorKey("key", s);
|
|
@@ -9067,36 +9156,36 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9067
9156
|
index: D,
|
|
9068
9157
|
..._
|
|
9069
9158
|
};
|
|
9070
|
-
delete T.combineKeys, delete T.combineValues, delete T.isRowColCombine, y && $[y] !== void 0 ? T.rawData = $[y] : T.rawData = "", T.rowData = $, T.computedType = ComputedType.loopRow,
|
|
9159
|
+
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);
|
|
9071
9160
|
});
|
|
9072
9161
|
return;
|
|
9073
9162
|
}
|
|
9074
|
-
const
|
|
9163
|
+
const C = [];
|
|
9075
9164
|
if (w.forEach(($, D) => {
|
|
9076
9165
|
if (a) {
|
|
9077
9166
|
const T = getSeparatorKey("child", s, $);
|
|
9078
9167
|
let S = n[T] || [];
|
|
9079
|
-
|
|
9168
|
+
C.push(S);
|
|
9080
9169
|
} else {
|
|
9081
9170
|
const T = getSeparatorKey("child", s, $);
|
|
9082
9171
|
let S = n[T] || [];
|
|
9083
9172
|
const I = i ? S.slice(0, 1) : S;
|
|
9084
|
-
S.length > 0 ? I.forEach((
|
|
9085
|
-
let
|
|
9173
|
+
S.length > 0 ? I.forEach((B) => {
|
|
9174
|
+
let M = {
|
|
9086
9175
|
index: D,
|
|
9087
9176
|
..._,
|
|
9088
9177
|
// 交叉表:函数格按当前行组聚合裂变列实例(供 jsep 按 groupIndices 过滤取值)
|
|
9089
9178
|
isCrossAggregate: i
|
|
9090
9179
|
};
|
|
9091
|
-
delete
|
|
9092
|
-
}) :
|
|
9180
|
+
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);
|
|
9181
|
+
}) : b.push({
|
|
9093
9182
|
index: 0,
|
|
9094
9183
|
..._,
|
|
9095
9184
|
isCrossAggregate: i
|
|
9096
9185
|
});
|
|
9097
9186
|
}
|
|
9098
9187
|
}), a) {
|
|
9099
|
-
const $ = Math.max(...
|
|
9188
|
+
const $ = Math.max(...C.map((T) => T.length));
|
|
9100
9189
|
p || (p = {
|
|
9101
9190
|
count: $,
|
|
9102
9191
|
row: _.row,
|
|
@@ -9105,7 +9194,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9105
9194
|
const D = {
|
|
9106
9195
|
colIndex: v,
|
|
9107
9196
|
maxCount: $,
|
|
9108
|
-
groupColumnLoopItems:
|
|
9197
|
+
groupColumnLoopItems: C,
|
|
9109
9198
|
dataKey: _.data ? _.data.replace("row:", "").toUpperCase() : void 0,
|
|
9110
9199
|
cell: _
|
|
9111
9200
|
};
|
|
@@ -9130,13 +9219,13 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9130
9219
|
mergeTarget: [E.row, E.col]
|
|
9131
9220
|
};
|
|
9132
9221
|
delete E.isRowColCombine;
|
|
9133
|
-
let
|
|
9134
|
-
|
|
9222
|
+
let C = Array.from({ length: o - 1 }, () => cloneDeep(w));
|
|
9223
|
+
b.push(E, ...C);
|
|
9135
9224
|
} else if ((i || a) && e.length > 0) {
|
|
9136
9225
|
const E = getSeparatorKey("key", s);
|
|
9137
|
-
(n[E] ? Array.from(n[E]) : []).forEach((
|
|
9138
|
-
const D = getSeparatorKey("data",
|
|
9139
|
-
|
|
9226
|
+
(n[E] ? Array.from(n[E]) : []).forEach((C, $) => {
|
|
9227
|
+
const D = getSeparatorKey("data", C), T = n[D];
|
|
9228
|
+
b.push({
|
|
9140
9229
|
index: $,
|
|
9141
9230
|
..._,
|
|
9142
9231
|
computedType: ComputedType.loopRow,
|
|
@@ -9147,7 +9236,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9147
9236
|
});
|
|
9148
9237
|
} else if (e.length > 0)
|
|
9149
9238
|
for (let E = 0; E < o; E++)
|
|
9150
|
-
|
|
9239
|
+
b.push({
|
|
9151
9240
|
index: E,
|
|
9152
9241
|
..._,
|
|
9153
9242
|
computedType: ComputedType.loopRow,
|
|
@@ -9157,7 +9246,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9157
9246
|
});
|
|
9158
9247
|
else
|
|
9159
9248
|
r.forEach((E, w) => {
|
|
9160
|
-
|
|
9249
|
+
b.push({
|
|
9161
9250
|
index: w,
|
|
9162
9251
|
..._,
|
|
9163
9252
|
computedType: ComputedType.loopRow,
|
|
@@ -9166,17 +9255,17 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9166
9255
|
rowData: E
|
|
9167
9256
|
});
|
|
9168
9257
|
});
|
|
9169
|
-
}), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: v, cell:
|
|
9258
|
+
}), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: v, cell: b, groupColumnLoopItems: y, dataKey: E }) => {
|
|
9170
9259
|
for (let w = 0; w < v; w++) {
|
|
9171
|
-
const
|
|
9260
|
+
const C = [];
|
|
9172
9261
|
y.forEach(($, D) => {
|
|
9173
9262
|
const T = $[w];
|
|
9174
9263
|
let S = {
|
|
9175
9264
|
index: D,
|
|
9176
|
-
...
|
|
9265
|
+
...b
|
|
9177
9266
|
};
|
|
9178
|
-
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,
|
|
9179
|
-
}), w === 0 ? u[_] =
|
|
9267
|
+
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);
|
|
9268
|
+
}), w === 0 ? u[_] = C : u.splice(_ + w, 0, C);
|
|
9180
9269
|
}
|
|
9181
9270
|
}), {
|
|
9182
9271
|
rowBaseCols: u,
|
|
@@ -9196,62 +9285,62 @@ function loopGroupRows(t, e, r, n, o) {
|
|
|
9196
9285
|
const v = {
|
|
9197
9286
|
...s,
|
|
9198
9287
|
loop: !1
|
|
9199
|
-
},
|
|
9200
|
-
let
|
|
9201
|
-
if (
|
|
9202
|
-
|
|
9288
|
+
}, b = [], { rowBaseCols: y, loopGroupRows: E, groupColumnLoopData: w } = generateRowStructure(u, d, l, f, p, m, g, _, t, r);
|
|
9289
|
+
let C = transpose(y);
|
|
9290
|
+
if (C.forEach(() => {
|
|
9291
|
+
b.push(cloneDeep(v));
|
|
9203
9292
|
}), E.forEach(({ row: $, cells: D, removeCount: T }, S) => {
|
|
9204
|
-
let [I,
|
|
9293
|
+
let [I, B, M] = S.split(":").map((A) => parseInt(A));
|
|
9205
9294
|
$.isLoopGroupComputed = !1;
|
|
9206
|
-
const N =
|
|
9207
|
-
let O =
|
|
9295
|
+
const N = M + T;
|
|
9296
|
+
let O = C[N];
|
|
9208
9297
|
D = D.map((A, R) => {
|
|
9209
|
-
let
|
|
9210
|
-
if (R <
|
|
9211
|
-
let
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9298
|
+
let L = O[R];
|
|
9299
|
+
if (R < B) {
|
|
9300
|
+
let G = [];
|
|
9301
|
+
C.forEach((J, Q) => {
|
|
9302
|
+
Q <= N && J.forEach((ie, ae) => {
|
|
9303
|
+
ae === R && ie.rowSpan >= 1 && ["", "field"].includes(ie.type) && G.push(Q);
|
|
9215
9304
|
});
|
|
9216
9305
|
});
|
|
9217
|
-
let
|
|
9218
|
-
|
|
9219
|
-
} else if (
|
|
9220
|
-
let
|
|
9221
|
-
|
|
9306
|
+
let j = Math.max(...G), X = C[j][R];
|
|
9307
|
+
X && (X.rowSpan += 1, A.mergeTarget = [X.row, X.col]), A.rowSpan = 0, A.colSpan = 0;
|
|
9308
|
+
} else if (L && L.type === CellType.TEXT) {
|
|
9309
|
+
let G = C[0][R];
|
|
9310
|
+
G.rowSpan += 1, A.rowSpan = 0, A.colSpan = 0, A.mergeTarget = [G.row, G.col];
|
|
9222
9311
|
}
|
|
9223
|
-
return A.type === CellType.FUN && A.fun && (A.computedType = ComputedType.loopGroup), A.isGroup =
|
|
9312
|
+
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;
|
|
9224
9313
|
});
|
|
9225
9314
|
const x = N + 1;
|
|
9226
|
-
|
|
9227
|
-
}),
|
|
9315
|
+
b.splice(x, 0, $), C.splice(x, 0, D);
|
|
9316
|
+
}), C = mergeSameCells(C), C.forEach(($, D) => {
|
|
9228
9317
|
let T = [];
|
|
9229
9318
|
$.forEach((S) => {
|
|
9230
9319
|
S && S.groupIndices !== void 0 && !isNaN(S.groupIndices) && T.push(S.groupIndices);
|
|
9231
9320
|
}), T.length > 0 && $.forEach((S) => {
|
|
9232
9321
|
S && (S.groupIndices = T);
|
|
9233
9322
|
});
|
|
9234
|
-
}), t.splice(c, 1, ...
|
|
9323
|
+
}), t.splice(c, 1, ...b), r.splice(c, 1, ...C), w) {
|
|
9235
9324
|
const { index: $, count: D } = w, T = n[$], S = [];
|
|
9236
|
-
for (let
|
|
9325
|
+
for (let B = 0; B < D; B++)
|
|
9237
9326
|
S.push(cloneDeep(T));
|
|
9238
9327
|
n.splice($, 1, ...S);
|
|
9239
|
-
for (let
|
|
9240
|
-
const
|
|
9328
|
+
for (let B = 0; B < c; B++) {
|
|
9329
|
+
const M = r[B], N = [];
|
|
9241
9330
|
for (let O = 0; O < D; O++) {
|
|
9242
|
-
const x = cloneDeep(
|
|
9331
|
+
const x = cloneDeep(M[$]);
|
|
9243
9332
|
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
|
|
9244
9333
|
}
|
|
9245
|
-
|
|
9334
|
+
M.splice($, M.length - $, ...N);
|
|
9246
9335
|
}
|
|
9247
|
-
const I = c +
|
|
9248
|
-
for (let
|
|
9249
|
-
const
|
|
9336
|
+
const I = c + C.length;
|
|
9337
|
+
for (let B = I; B < r.length; B++) {
|
|
9338
|
+
const M = r[B], N = [];
|
|
9250
9339
|
for (let O = 0; O < D; O++) {
|
|
9251
|
-
const x = cloneDeep(
|
|
9340
|
+
const x = cloneDeep(M[$]);
|
|
9252
9341
|
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
|
|
9253
9342
|
}
|
|
9254
|
-
|
|
9343
|
+
M.splice($, M.length - $, ...N);
|
|
9255
9344
|
}
|
|
9256
9345
|
}
|
|
9257
9346
|
}
|
|
@@ -9572,35 +9661,35 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9572
9661
|
var g, _;
|
|
9573
9662
|
let { config: f, colConfig: p, rowConfig: m } = u;
|
|
9574
9663
|
for (let v = 0; v < f.length; v++) {
|
|
9575
|
-
const
|
|
9576
|
-
if (
|
|
9664
|
+
const b = m[v];
|
|
9665
|
+
if (b && b.isHidden)
|
|
9577
9666
|
continue;
|
|
9578
9667
|
const y = p.filter(($) => $.isHidden).map(($) => $.index), E = f[v].filter(($) => !y.includes($.col));
|
|
9579
9668
|
let w = E.map(($) => $.text);
|
|
9580
9669
|
v > 0 ? a.addRow(w) : l === 0 ? a.getRow(1).values = w : a.addRow(w);
|
|
9581
|
-
const
|
|
9582
|
-
|
|
9670
|
+
const C = a.getRow(l + v + 1);
|
|
9671
|
+
b && b.size && !isNaN(b.size) ? b.size > 0 ? C.height = b.size < 25 ? 25 : b.size : C.hidden = !0 : C.height = 25;
|
|
9583
9672
|
for (let $ = 0; $ < E.length; $++) {
|
|
9584
|
-
const D = E[$], T =
|
|
9585
|
-
let { style: S, col: I, row:
|
|
9673
|
+
const D = E[$], T = C.getCell($ + 1);
|
|
9674
|
+
let { style: S, col: I, row: B, colSpan: M, rowSpan: N, format: O, formatType: x } = D;
|
|
9586
9675
|
const A = {};
|
|
9587
9676
|
if (S && S.color && (A.color = {
|
|
9588
9677
|
argb: "FF" + ((g = S.color) == null ? void 0 : g.replace("#", ""))
|
|
9589
9678
|
}), 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) {
|
|
9590
|
-
const
|
|
9591
|
-
if (
|
|
9592
|
-
const
|
|
9593
|
-
if (!(!
|
|
9679
|
+
const j = normalizeBorder(S.border);
|
|
9680
|
+
if (j) {
|
|
9681
|
+
const X = themeColors[r] || "#333333", J = (Q) => {
|
|
9682
|
+
if (!(!Q || !Q.style || Q.style === "none"))
|
|
9594
9683
|
return {
|
|
9595
|
-
style:
|
|
9596
|
-
color: { argb: "FF" + (
|
|
9684
|
+
style: Q.style,
|
|
9685
|
+
color: { argb: "FF" + (Q.color || X).replace("#", "") }
|
|
9597
9686
|
};
|
|
9598
9687
|
};
|
|
9599
9688
|
T.border = {
|
|
9600
|
-
top:
|
|
9601
|
-
left:
|
|
9602
|
-
bottom:
|
|
9603
|
-
right:
|
|
9689
|
+
top: J(j.top),
|
|
9690
|
+
left: J(j.left),
|
|
9691
|
+
bottom: J(j.bottom),
|
|
9692
|
+
right: J(j.right)
|
|
9604
9693
|
};
|
|
9605
9694
|
}
|
|
9606
9695
|
} else (!S || S.border !== !1) && (T.border = {
|
|
@@ -9618,12 +9707,12 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9618
9707
|
}
|
|
9619
9708
|
};
|
|
9620
9709
|
else {
|
|
9621
|
-
const
|
|
9710
|
+
const j = `${r}${v % 2}`;
|
|
9622
9711
|
T.fill = {
|
|
9623
9712
|
type: "pattern",
|
|
9624
9713
|
pattern: "solid",
|
|
9625
9714
|
fgColor: {
|
|
9626
|
-
argb: "FF" + themeColors[
|
|
9715
|
+
argb: "FF" + themeColors[j].replace("#", "")
|
|
9627
9716
|
}
|
|
9628
9717
|
};
|
|
9629
9718
|
}
|
|
@@ -9633,15 +9722,15 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9633
9722
|
wrapText: !0
|
|
9634
9723
|
};
|
|
9635
9724
|
S && S.textAlign && (R.horizontal = S.textAlign), S && S.verticalAlign && (R.vertical = S.verticalAlign === "center" ? "middle" : S.verticalAlign), T.alignment = R;
|
|
9636
|
-
const
|
|
9637
|
-
if (
|
|
9638
|
-
const
|
|
9639
|
-
let
|
|
9640
|
-
|
|
9725
|
+
const L = N && !isNaN(N) && N > 1, G = M && !isNaN(M) && M > 1;
|
|
9726
|
+
if (L || G) {
|
|
9727
|
+
const j = l + v + 1, X = $ + 1;
|
|
9728
|
+
let J = j, Q = X;
|
|
9729
|
+
j && (J += N - 1), X && (Q += M - 1), s.push([j, X, J, Q]);
|
|
9641
9730
|
}
|
|
9642
9731
|
if (O && O === "number") {
|
|
9643
|
-
let
|
|
9644
|
-
x && (x.numberUseGrouping && (
|
|
9732
|
+
let j = "", X = "";
|
|
9733
|
+
x && (x.numberUseGrouping && (j = x.numberUseGrouping), x.numberDecimal && (X = x.numberDecimal)), T.numFmt = generateNumFmt(j, X), T.value = Number(D.text);
|
|
9645
9734
|
}
|
|
9646
9735
|
}
|
|
9647
9736
|
}
|
|
@@ -9744,56 +9833,58 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9744
9833
|
},
|
|
9745
9834
|
emits: ["updateData", "report-error"],
|
|
9746
9835
|
setup(t, { expose: e, emit: r }) {
|
|
9747
|
-
useCssVars((
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9836
|
+
useCssVars((U) => ({
|
|
9837
|
+
v30d8426c: _.value.border,
|
|
9838
|
+
v6d8d40cc: _.value.background,
|
|
9839
|
+
v52e4b686: _.value.evenBackground,
|
|
9840
|
+
v36ae0238: _.value.fixedBackground,
|
|
9841
|
+
v3b43a89e: _.value.fixedEvenBackground,
|
|
9842
|
+
v2b0e46ac: _.value.hoverBackground,
|
|
9843
|
+
bd1c87c2: _.value.activeColor
|
|
9755
9844
|
}));
|
|
9756
9845
|
const n = t, o = r, i = inject(
|
|
9757
9846
|
"isPrintMode",
|
|
9758
9847
|
computed(() => !1)
|
|
9759
|
-
), a = inject("printConfig", void 0), s = ref(), l = ref(), c = ref()
|
|
9848
|
+
), a = inject("printConfig", void 0), s = ref(), l = ref(), c = ref();
|
|
9849
|
+
let u = null, d = null, f = null;
|
|
9850
|
+
const p = shallowRef([]), m = shallowRef([]), g = computed(() => {
|
|
9760
9851
|
if (i.value && (a != null && a.value)) {
|
|
9761
|
-
const
|
|
9852
|
+
const U = a.value;
|
|
9762
9853
|
return {
|
|
9763
|
-
width: `${mmToPx(
|
|
9764
|
-
padding: `${n.index === 0 ? mmToPx(
|
|
9854
|
+
width: `${mmToPx(U.width)}px`,
|
|
9855
|
+
padding: `${n.index === 0 ? mmToPx(U.marginTop) : 0}px ${mmToPx(U.marginLeft)}px ${n.index === n.length - 1 ? mmToPx(U.marginBottom) : 0}px ${mmToPx(U.marginLeft)}px`
|
|
9765
9856
|
};
|
|
9766
9857
|
}
|
|
9767
9858
|
return {
|
|
9768
9859
|
width: n.config.widthType === "%" ? `calc(${n.config.width}% - 10px)` : `${n.config.width - 10}px`,
|
|
9769
9860
|
height: n.config.fullHeight ? "calc(100% - 8px)" : `${n.config.height}px`
|
|
9770
9861
|
};
|
|
9771
|
-
}),
|
|
9862
|
+
}), _ = 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((U) => U.isShow).length > 0), E = reactive({
|
|
9772
9863
|
pageSize: 100,
|
|
9773
9864
|
pageSizes: [10, 20, 50, 100, 200, 1e4],
|
|
9774
9865
|
pageIndex: 1,
|
|
9775
9866
|
total: 0
|
|
9776
|
-
}),
|
|
9777
|
-
let
|
|
9778
|
-
if (
|
|
9779
|
-
let
|
|
9780
|
-
|
|
9867
|
+
}), w = ref([]), C = ref([]), $ = (U) => {
|
|
9868
|
+
let F = 0, V = U;
|
|
9869
|
+
if (U.includes("!")) {
|
|
9870
|
+
let Z = U.split("!");
|
|
9871
|
+
F = parseInt(Z[0]), V = Z[1];
|
|
9781
9872
|
}
|
|
9782
|
-
let H =
|
|
9783
|
-
|
|
9873
|
+
let H = V.match(/[A-Z]+/)[0], z = V.match(/\d+/)[0] - 1, W = columnToNumber(H), te = `${F}:${z}:${W}`;
|
|
9874
|
+
C.value.includes(te) || C.value.push(te);
|
|
9784
9875
|
};
|
|
9785
|
-
function
|
|
9786
|
-
if (
|
|
9787
|
-
return
|
|
9788
|
-
|
|
9876
|
+
function D(U) {
|
|
9877
|
+
if (S && n.config.data.autoQuery === !1)
|
|
9878
|
+
return S = !1, !1;
|
|
9879
|
+
w.value = U, E.pageIndex = 1, X();
|
|
9789
9880
|
}
|
|
9790
|
-
let
|
|
9881
|
+
let T = !1, S = !0;
|
|
9791
9882
|
watch(
|
|
9792
|
-
() => [
|
|
9793
|
-
(
|
|
9794
|
-
if (
|
|
9795
|
-
let [
|
|
9796
|
-
|
|
9883
|
+
() => [E.pageSize, E.pageIndex],
|
|
9884
|
+
(U, F) => {
|
|
9885
|
+
if (U && F) {
|
|
9886
|
+
let [V, H] = U, [z, W] = U;
|
|
9887
|
+
V !== z && (E.pageIndex = 1), T && X();
|
|
9797
9888
|
}
|
|
9798
9889
|
},
|
|
9799
9890
|
{
|
|
@@ -9801,33 +9892,33 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9801
9892
|
deep: !0
|
|
9802
9893
|
}
|
|
9803
9894
|
);
|
|
9804
|
-
function
|
|
9805
|
-
var
|
|
9806
|
-
(
|
|
9807
|
-
}
|
|
9808
|
-
const
|
|
9809
|
-
async function
|
|
9810
|
-
if (
|
|
9811
|
-
let
|
|
9812
|
-
|
|
9895
|
+
function I() {
|
|
9896
|
+
var U;
|
|
9897
|
+
(U = s.value) == null || U.changeValue();
|
|
9898
|
+
}
|
|
9899
|
+
const B = computed(() => n.config.exportMethod === "send" && window.opener), M = computed(() => B.value ? "保存" : "导出");
|
|
9900
|
+
async function N() {
|
|
9901
|
+
if (p.value && p.value.length) {
|
|
9902
|
+
let U = await exportReport(
|
|
9903
|
+
p.value,
|
|
9813
9904
|
n.name,
|
|
9814
9905
|
"excel",
|
|
9815
9906
|
n.config.theme,
|
|
9816
9907
|
n.config.subReprotIndex
|
|
9817
9908
|
);
|
|
9818
|
-
if (
|
|
9909
|
+
if (U === null) {
|
|
9819
9910
|
await ElMessageBox.alert("表格导出失败");
|
|
9820
9911
|
return;
|
|
9821
9912
|
}
|
|
9822
|
-
n.config.exportMethod === "send" && window.opener ? sendReport(
|
|
9913
|
+
n.config.exportMethod === "send" && window.opener ? sendReport(U) : downloadReport(U, n.name, "excel");
|
|
9823
9914
|
} else
|
|
9824
9915
|
ElMessage.success("配置未完成!");
|
|
9825
9916
|
}
|
|
9826
|
-
async function
|
|
9917
|
+
async function O() {
|
|
9827
9918
|
if (n.config && c.value && n.config.data.source) {
|
|
9828
|
-
let
|
|
9919
|
+
let U = [];
|
|
9829
9920
|
try {
|
|
9830
|
-
|
|
9921
|
+
U = await ue(!0);
|
|
9831
9922
|
} catch (z) {
|
|
9832
9923
|
o("report-error", {
|
|
9833
9924
|
index: n.index,
|
|
@@ -9835,29 +9926,32 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9835
9926
|
});
|
|
9836
9927
|
return;
|
|
9837
9928
|
}
|
|
9838
|
-
let
|
|
9839
|
-
n.config.data.processData && (
|
|
9929
|
+
let F = ae(U);
|
|
9930
|
+
if (n.config.data.processData && (F = await getProcessData(
|
|
9840
9931
|
n.config.data.processData,
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
))
|
|
9845
|
-
|
|
9932
|
+
F,
|
|
9933
|
+
w.value,
|
|
9934
|
+
E
|
|
9935
|
+
)), u && u.order !== "none") {
|
|
9936
|
+
const z = F[u.key];
|
|
9937
|
+
Array.isArray(z) && (F[u.key] = sortRowsByField(z, u.field, u.order, u.numeric));
|
|
9938
|
+
}
|
|
9939
|
+
let V = [];
|
|
9846
9940
|
const H = [];
|
|
9847
9941
|
for (let z = 0; z < n.config.tableConfig.length; z++) {
|
|
9848
|
-
const
|
|
9849
|
-
let { rowConfig:
|
|
9850
|
-
|
|
9851
|
-
const
|
|
9852
|
-
computeCell(
|
|
9853
|
-
config:
|
|
9854
|
-
rowConfig:
|
|
9855
|
-
colConfig:
|
|
9856
|
-
}), H.push({ config:
|
|
9942
|
+
const W = n.config.tableConfig[z];
|
|
9943
|
+
let { rowConfig: te, colConfig: Z, config: ne } = cloneDeep(W), se = getLoopItem(Z, F, "col", ne), k = getLoopItem(te, F, "row", ne);
|
|
9944
|
+
se.length && loopGroupCols(Z, se, ne, F), k.length && loopGroupRows(te, k, ne, Z, F);
|
|
9945
|
+
const Y = transformArrayToObject(F, n.config.data.source);
|
|
9946
|
+
computeCell(ne, Y, void 0, z), V.push({
|
|
9947
|
+
config: ne,
|
|
9948
|
+
rowConfig: te,
|
|
9949
|
+
colConfig: Z
|
|
9950
|
+
}), H.push({ config: ne });
|
|
9857
9951
|
}
|
|
9858
|
-
if (await preGenerateBarcodes(H),
|
|
9952
|
+
if (await preGenerateBarcodes(H), V && V.length) {
|
|
9859
9953
|
let z = await exportReport(
|
|
9860
|
-
|
|
9954
|
+
V,
|
|
9861
9955
|
n.name,
|
|
9862
9956
|
"excel",
|
|
9863
9957
|
n.config.theme,
|
|
@@ -9873,243 +9967,273 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9873
9967
|
} else
|
|
9874
9968
|
ElMessage.warning("当前报表没有可导出的数据");
|
|
9875
9969
|
}
|
|
9876
|
-
const
|
|
9877
|
-
async function
|
|
9878
|
-
let
|
|
9879
|
-
|
|
9880
|
-
const
|
|
9881
|
-
return computeCell(
|
|
9882
|
-
reportConfig: { config:
|
|
9883
|
-
hasLoop:
|
|
9970
|
+
const x = ref(!1), A = ref(!1);
|
|
9971
|
+
async function R(U, F) {
|
|
9972
|
+
let V = !1, { rowConfig: H, colConfig: z, config: W } = cloneDeep(U), te = getLoopItem(z, F, "col", W), Z = getLoopItem(H, F, "row", W);
|
|
9973
|
+
te.length && (V = !0, loopGroupCols(z, te, W, F)), Z.length && (V = !0, loopGroupRows(H, Z, W, z, F));
|
|
9974
|
+
const ne = transformArrayToObject(F, n.config.data.source);
|
|
9975
|
+
return computeCell(W, ne, C.value), await preGenerateBarcodes([{ config: W }]), {
|
|
9976
|
+
reportConfig: { config: W, rowConfig: H, colConfig: z },
|
|
9977
|
+
hasLoop: V
|
|
9884
9978
|
};
|
|
9885
9979
|
}
|
|
9886
|
-
async function
|
|
9887
|
-
const
|
|
9888
|
-
if (!(!Array.isArray(
|
|
9889
|
-
|
|
9890
|
-
for (const H of
|
|
9891
|
-
const z = { ...
|
|
9892
|
-
for (const
|
|
9893
|
-
const { reportConfig:
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9980
|
+
async function L(U, F) {
|
|
9981
|
+
const V = U[F];
|
|
9982
|
+
if (!(!Array.isArray(V) || V.length === 0)) {
|
|
9983
|
+
m.value = [], l.value.innerHTML = "";
|
|
9984
|
+
for (const H of V) {
|
|
9985
|
+
const z = { ...U, ...H, [F]: [H] }, W = [];
|
|
9986
|
+
for (const te of n.config.tableConfig) {
|
|
9987
|
+
const { reportConfig: Z, hasLoop: ne } = await R(te, z);
|
|
9988
|
+
W.push(Z), renderReportByDom(
|
|
9989
|
+
Z.rowConfig,
|
|
9990
|
+
Z.colConfig,
|
|
9991
|
+
Z.config,
|
|
9898
9992
|
l,
|
|
9899
|
-
|
|
9900
|
-
|
|
9993
|
+
ne,
|
|
9994
|
+
_.value.border
|
|
9901
9995
|
);
|
|
9902
9996
|
}
|
|
9903
|
-
|
|
9997
|
+
m.value.push(W);
|
|
9904
9998
|
}
|
|
9905
9999
|
}
|
|
9906
10000
|
}
|
|
9907
|
-
async function
|
|
10001
|
+
async function G(U) {
|
|
9908
10002
|
if (n.config && c.value)
|
|
9909
|
-
if (console.time("renderReport"),
|
|
10003
|
+
if (console.time("renderReport"), p.value = [], A.value = !!n.config.tableConfig, A.value) {
|
|
9910
10004
|
l.value.innerHTML = "";
|
|
9911
|
-
const
|
|
9912
|
-
for (let
|
|
9913
|
-
const H = n.config.tableConfig[
|
|
9914
|
-
let z = !1, { rowConfig:
|
|
9915
|
-
|
|
9916
|
-
const
|
|
9917
|
-
computeCell(
|
|
9918
|
-
config:
|
|
9919
|
-
rowConfig:
|
|
9920
|
-
colConfig:
|
|
10005
|
+
const F = [];
|
|
10006
|
+
for (let V = 0; V < n.config.tableConfig.length; V++) {
|
|
10007
|
+
const H = n.config.tableConfig[V];
|
|
10008
|
+
let z = !1, { rowConfig: W, colConfig: te, config: Z } = cloneDeep(H), ne = getLoopItem(te, U, "col", Z), se = getLoopItem(W, U, "row", Z);
|
|
10009
|
+
ne.length && (z = !0, loopGroupCols(te, ne, Z, U)), se.length && (z = !0, loopGroupRows(W, se, Z, te, U));
|
|
10010
|
+
const k = transformArrayToObject(U, n.config.data.source);
|
|
10011
|
+
computeCell(Z, k, C.value, V), F.push({ config: Z, rowConfig: W, colConfig: te, hasLoop: z }), p.value.push({
|
|
10012
|
+
config: Z,
|
|
10013
|
+
rowConfig: W,
|
|
10014
|
+
colConfig: te
|
|
9921
10015
|
});
|
|
9922
10016
|
}
|
|
9923
|
-
await preGenerateBarcodes(
|
|
9924
|
-
renderReportByDom(
|
|
10017
|
+
await preGenerateBarcodes(F), F.forEach((V) => {
|
|
10018
|
+
renderReportByDom(V.rowConfig, V.colConfig, V.config, l, V.hasLoop, _.value.border);
|
|
9925
10019
|
}), console.timeEnd("renderReport"), nextTick(() => {
|
|
9926
|
-
const
|
|
10020
|
+
const V = l.value.querySelectorAll(".yh-report-table-context");
|
|
9927
10021
|
let H = 0;
|
|
9928
|
-
if (
|
|
9929
|
-
const
|
|
9930
|
-
if (
|
|
9931
|
-
const
|
|
9932
|
-
(
|
|
10022
|
+
if (V.forEach((z) => {
|
|
10023
|
+
const W = z.querySelector("table");
|
|
10024
|
+
if (W) {
|
|
10025
|
+
const te = W.querySelectorAll("colgroup col"), Z = Array.from(te).reduce(
|
|
10026
|
+
(ne, se) => ne + parseInt(se.style.width || "80", 10),
|
|
9933
10027
|
0
|
|
9934
10028
|
);
|
|
9935
|
-
H = Math.max(H,
|
|
10029
|
+
H = Math.max(H, Z);
|
|
9936
10030
|
}
|
|
9937
10031
|
}), H > 0) {
|
|
9938
10032
|
const z = l.value;
|
|
9939
|
-
let
|
|
10033
|
+
let W = 0;
|
|
9940
10034
|
if (z) {
|
|
9941
|
-
const
|
|
9942
|
-
|
|
10035
|
+
const te = getComputedStyle(z);
|
|
10036
|
+
W = z.clientWidth - parseFloat(te.paddingLeft || "0") - parseFloat(te.paddingRight || "0");
|
|
9943
10037
|
}
|
|
9944
|
-
|
|
9945
|
-
const
|
|
9946
|
-
if (
|
|
9947
|
-
const
|
|
9948
|
-
(
|
|
10038
|
+
W > 0 && (H = Math.max(H, W)), V.forEach((te) => {
|
|
10039
|
+
const Z = te.querySelector("table");
|
|
10040
|
+
if (Z) {
|
|
10041
|
+
const ne = Z.querySelectorAll("colgroup col"), se = Array.from(ne).reduce(
|
|
10042
|
+
(k, Y) => k + parseInt(Y.style.width || "80", 10),
|
|
9949
10043
|
0
|
|
9950
10044
|
);
|
|
9951
|
-
if (
|
|
9952
|
-
const
|
|
9953
|
-
|
|
9954
|
-
const
|
|
9955
|
-
|
|
10045
|
+
if (se > 0 && se < H) {
|
|
10046
|
+
const k = H / se;
|
|
10047
|
+
ne.forEach((q) => {
|
|
10048
|
+
const ee = parseInt(q.style.width || "80", 10);
|
|
10049
|
+
q.style.width = `${Math.round(ee * k)}px`;
|
|
9956
10050
|
});
|
|
9957
|
-
const
|
|
9958
|
-
(
|
|
10051
|
+
const Y = Array.from(ne).map(
|
|
10052
|
+
(q) => parseInt(q.style.width || "80", 10)
|
|
9959
10053
|
);
|
|
9960
|
-
|
|
9961
|
-
let
|
|
9962
|
-
Array.from(
|
|
9963
|
-
|
|
10054
|
+
Z.querySelectorAll("tr").forEach((q) => {
|
|
10055
|
+
let ee = 0, K = 0;
|
|
10056
|
+
Array.from(q.children).forEach((re) => {
|
|
10057
|
+
re.classList.contains("fixed-td") && (re.style.left = `${ee - 1}px`), K < Y.length && (ee += Y[K] - 1, K++);
|
|
9964
10058
|
});
|
|
9965
10059
|
});
|
|
9966
10060
|
}
|
|
9967
|
-
|
|
10061
|
+
Z.style.width = `${H}px`, Z.style.minWidth = `${H}px`;
|
|
9968
10062
|
}
|
|
9969
10063
|
});
|
|
9970
10064
|
}
|
|
9971
10065
|
});
|
|
9972
10066
|
} else {
|
|
9973
|
-
let
|
|
9974
|
-
|
|
9975
|
-
const
|
|
9976
|
-
computeCell(z,
|
|
10067
|
+
let F = !1, { rowConfig: V, colConfig: H, config: z } = cloneDeep(n.config), W = getLoopItem(H, U, "col", z), te = getLoopItem(V, U, "row", z);
|
|
10068
|
+
W.length && (F = !0, loopGroupCols(H, W, z, U)), te.length && (F = !0, loopGroupRows(V, te, z, H, U));
|
|
10069
|
+
const Z = transformArrayToObject(U, n.config.data.source);
|
|
10070
|
+
computeCell(z, Z, C.value), await preGenerateBarcodes([{ config: z }]), p.value.push({
|
|
9977
10071
|
config: z,
|
|
9978
|
-
rowConfig:
|
|
10072
|
+
rowConfig: V,
|
|
9979
10073
|
colConfig: H
|
|
9980
|
-
}), renderReportByDom(
|
|
10074
|
+
}), renderReportByDom(V, H, z, c.value, F, _.value.border), console.timeEnd("renderReport");
|
|
9981
10075
|
}
|
|
9982
10076
|
}
|
|
9983
|
-
function
|
|
9984
|
-
let
|
|
10077
|
+
function j() {
|
|
10078
|
+
let U = 0, F = [], V = {};
|
|
9985
10079
|
return n.config.params.forEach((H) => {
|
|
9986
|
-
H.isNull && (
|
|
9987
|
-
}),
|
|
9988
|
-
H.name &&
|
|
9989
|
-
}),
|
|
9990
|
-
message: `请填写必填项:${
|
|
10080
|
+
H.isNull && (V[H.columnName] = H);
|
|
10081
|
+
}), w.value.forEach((H) => {
|
|
10082
|
+
H.name && V[H.name] && !H.value && (F.push(V[H.name].name), U++);
|
|
10083
|
+
}), U > 0 && Object.keys(V).length > 0 ? (ElMessage.warning({
|
|
10084
|
+
message: `请填写必填项:${F.join(",")}`,
|
|
9991
10085
|
grouping: !0
|
|
9992
10086
|
}), !1) : !0;
|
|
9993
10087
|
}
|
|
9994
|
-
async function
|
|
9995
|
-
var
|
|
9996
|
-
if (
|
|
9997
|
-
|
|
10088
|
+
async function X() {
|
|
10089
|
+
var F;
|
|
10090
|
+
if (S = !1, i.value || j()) {
|
|
10091
|
+
x.value = !0;
|
|
9998
10092
|
try {
|
|
9999
|
-
let
|
|
10093
|
+
let V = await ue(i.value), H = ae(V);
|
|
10000
10094
|
n.config.data.processData && (H = await getProcessData(
|
|
10001
10095
|
n.config.data.processData,
|
|
10002
10096
|
H,
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
));
|
|
10006
|
-
const z = (
|
|
10007
|
-
z && z.key ? await
|
|
10008
|
-
} catch (
|
|
10009
|
-
console.error("数据源请求失败:",
|
|
10097
|
+
w.value,
|
|
10098
|
+
E
|
|
10099
|
+
)), f = H, d = { ...H }, J(), H = d;
|
|
10100
|
+
const z = (F = n.config.data.source) == null ? void 0 : F.find((W) => W.loopTable);
|
|
10101
|
+
z && z.key ? await L(H, z.key) : await G(H), nextTick(ie);
|
|
10102
|
+
} catch (V) {
|
|
10103
|
+
console.error("数据源请求失败:", V), o("report-error", {
|
|
10010
10104
|
index: n.index,
|
|
10011
|
-
message: getErrorMessage(
|
|
10105
|
+
message: getErrorMessage(V)
|
|
10012
10106
|
}), clearReportByDom(l);
|
|
10013
10107
|
} finally {
|
|
10014
|
-
|
|
10108
|
+
x.value = !1, T = !0;
|
|
10015
10109
|
}
|
|
10016
10110
|
} else
|
|
10017
10111
|
clearReportByDom(l);
|
|
10018
10112
|
}
|
|
10019
|
-
function
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10113
|
+
function J() {
|
|
10114
|
+
if (!d || !f || !u) return;
|
|
10115
|
+
const U = f[u.key];
|
|
10116
|
+
Array.isArray(U) && (u.order === "none" ? d[u.key] = U : d[u.key] = sortRowsByField(U, u.field, u.order, u.numeric));
|
|
10117
|
+
}
|
|
10118
|
+
async function Q(U) {
|
|
10119
|
+
var ne;
|
|
10120
|
+
const F = U.target.closest("td.click-sort-cell");
|
|
10121
|
+
if (!F) return;
|
|
10122
|
+
const V = F.getAttribute("data-click-sort-field") || "", H = V.indexOf(".");
|
|
10123
|
+
if (H < 1) return;
|
|
10124
|
+
const z = V.slice(0, H).toUpperCase(), W = V.slice(H + 1).toUpperCase();
|
|
10125
|
+
if (!z || !W || !d) return;
|
|
10126
|
+
const te = F.getAttribute("data-click-sort-numeric") === "1";
|
|
10127
|
+
u && u.key === z && u.field === W ? u.order = u.order === "asc" ? "desc" : u.order === "desc" ? "none" : "asc" : u = { key: z, field: W, order: "asc", numeric: te }, J();
|
|
10128
|
+
const Z = (ne = n.config.data.source) == null ? void 0 : ne.find((se) => se.loopTable);
|
|
10129
|
+
Z && Z.key ? await L(d, Z.key) : await G(d), nextTick(ie);
|
|
10130
|
+
}
|
|
10131
|
+
function ie() {
|
|
10132
|
+
var U;
|
|
10133
|
+
(U = l.value) == null || U.querySelectorAll("td.click-sort-cell").forEach((F) => {
|
|
10134
|
+
var W;
|
|
10135
|
+
const V = ((W = F.getAttribute("data-click-sort-field")) == null ? void 0 : W.toUpperCase()) || "", z = u && V === `${u.key}.${u.field}` && u.order !== "none" ? u.order : "";
|
|
10136
|
+
F.dataset.sortDir = z;
|
|
10137
|
+
});
|
|
10138
|
+
}
|
|
10139
|
+
onMounted(() => {
|
|
10140
|
+
var U;
|
|
10141
|
+
(U = l.value) == null || U.addEventListener("click", Q);
|
|
10142
|
+
});
|
|
10143
|
+
function ae(U) {
|
|
10144
|
+
let F = {};
|
|
10145
|
+
return Array.isArray(U) || (U = [U]), U.forEach(({ key: V, data: H }) => {
|
|
10146
|
+
if (V !== "PARAM") {
|
|
10147
|
+
let z = H.filter((W) => W);
|
|
10148
|
+
F[V] = z;
|
|
10025
10149
|
} else
|
|
10026
|
-
|
|
10150
|
+
F[V] = H;
|
|
10027
10151
|
}), o("updateData", {
|
|
10028
10152
|
key: n.config.id,
|
|
10029
|
-
data:
|
|
10030
|
-
}),
|
|
10153
|
+
data: F
|
|
10154
|
+
}), F;
|
|
10031
10155
|
}
|
|
10032
|
-
async function
|
|
10156
|
+
async function ue(U = !1) {
|
|
10033
10157
|
if (n.config.data.source) {
|
|
10034
|
-
let
|
|
10158
|
+
let F = {
|
|
10035
10159
|
id: n.id
|
|
10036
10160
|
};
|
|
10037
|
-
|
|
10038
|
-
const
|
|
10161
|
+
b.value && (F.params = cloneDeep(w.value));
|
|
10162
|
+
const V = collectCellQueryConditions(
|
|
10039
10163
|
n.config.tableConfig,
|
|
10040
10164
|
n.config.data.source
|
|
10041
10165
|
);
|
|
10042
|
-
|
|
10166
|
+
v.value ? U ? (F.pageSize = E.total, F.pageNumber = 1) : (F.pageSize = E.pageSize, F.pageNumber = E.pageIndex) : (F.pageSize = E.pageSize, F.pageNumber = 1);
|
|
10043
10167
|
let H = [], z = {};
|
|
10044
|
-
|
|
10045
|
-
|
|
10168
|
+
w.value.forEach(({ name: W, value: te }) => {
|
|
10169
|
+
W && (z[W.toUpperCase()] = te);
|
|
10046
10170
|
}), H.push({ key: "PARAM", data: z });
|
|
10047
|
-
for (let
|
|
10048
|
-
const { key:
|
|
10049
|
-
if (
|
|
10050
|
-
const
|
|
10051
|
-
H.push({ key:
|
|
10171
|
+
for (let W = 0; W < n.config.data.source.length; W++) {
|
|
10172
|
+
const { key: te, url: Z } = n.config.data.source[W];
|
|
10173
|
+
if (Z) {
|
|
10174
|
+
const ne = V.get(Z.toUpperCase()), se = ne != null && ne.length ? { ...F, params: [...F.params || [], ...ne] } : F, k = await getDateSourceData(Z, se);
|
|
10175
|
+
H.push({ key: te, data: k.data }), v.value && (E.total = k.count || k.data.length);
|
|
10052
10176
|
}
|
|
10053
10177
|
}
|
|
10054
10178
|
return H;
|
|
10055
10179
|
} else
|
|
10056
10180
|
return [];
|
|
10057
10181
|
}
|
|
10058
|
-
function
|
|
10059
|
-
if (n.config.data.pageSize !== void 0 && (
|
|
10060
|
-
let
|
|
10061
|
-
|
|
10182
|
+
function ye() {
|
|
10183
|
+
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) {
|
|
10184
|
+
let U = n.config.data.pageSizes.split(",").map((F) => parseInt(F));
|
|
10185
|
+
E.pageSizes = Array.isArray(U) ? U : [10, 20, 50, 100, 200];
|
|
10062
10186
|
}
|
|
10063
10187
|
}
|
|
10064
|
-
return
|
|
10065
|
-
tableConfig:
|
|
10066
|
-
batchTableConfigs:
|
|
10188
|
+
return ye(), e({
|
|
10189
|
+
tableConfig: p,
|
|
10190
|
+
batchTableConfigs: m,
|
|
10067
10191
|
statementTableRef: l,
|
|
10068
10192
|
/** 拉数据 + 渲染(供父组件主动调用,如打印按钮触发) */
|
|
10069
|
-
renderHandler:
|
|
10070
|
-
}), (
|
|
10071
|
-
const
|
|
10193
|
+
renderHandler: X
|
|
10194
|
+
}), (U, F) => {
|
|
10195
|
+
const V = resolveComponent("el-button"), H = resolveComponent("el-pagination"), z = resolveDirective("loading");
|
|
10072
10196
|
return openBlock(), createElementBlock("div", {
|
|
10073
10197
|
class: "yh-report-view-container",
|
|
10074
|
-
style: normalizeStyle(
|
|
10198
|
+
style: normalizeStyle(g.value)
|
|
10075
10199
|
}, [
|
|
10076
10200
|
withDirectives(createVNode(_sfc_main$7, {
|
|
10077
10201
|
config: n.config.params,
|
|
10078
10202
|
data: n.config.data,
|
|
10079
10203
|
ref_key: "conditionsRef",
|
|
10080
10204
|
ref: s,
|
|
10081
|
-
onAddCell:
|
|
10082
|
-
onChange:
|
|
10205
|
+
onAddCell: $,
|
|
10206
|
+
onChange: D
|
|
10083
10207
|
}, {
|
|
10084
10208
|
search: withCtx(() => [
|
|
10085
|
-
|
|
10209
|
+
y.value ? (openBlock(), createBlock(V, {
|
|
10086
10210
|
key: 0,
|
|
10087
10211
|
type: "primary",
|
|
10088
|
-
onClick:
|
|
10212
|
+
onClick: I
|
|
10089
10213
|
}, {
|
|
10090
10214
|
default: withCtx(() => [
|
|
10091
10215
|
createTextVNode(toDisplayString(unref(rct)("搜索")), 1)
|
|
10092
10216
|
]),
|
|
10093
10217
|
_: 1
|
|
10094
10218
|
})) : createCommentVNode("", !0),
|
|
10095
|
-
createVNode(
|
|
10219
|
+
createVNode(V, {
|
|
10096
10220
|
text: "",
|
|
10097
10221
|
type: "primary",
|
|
10098
|
-
onClick:
|
|
10222
|
+
onClick: N
|
|
10099
10223
|
}, {
|
|
10100
10224
|
default: withCtx(() => [
|
|
10101
|
-
createTextVNode(toDisplayString(unref(rct)(
|
|
10225
|
+
createTextVNode(toDisplayString(unref(rct)(M.value)), 1)
|
|
10102
10226
|
]),
|
|
10103
10227
|
_: 1
|
|
10104
10228
|
}),
|
|
10105
|
-
|
|
10229
|
+
v.value ? (openBlock(), createBlock(V, {
|
|
10106
10230
|
key: 1,
|
|
10107
10231
|
text: "",
|
|
10108
10232
|
type: "primary",
|
|
10109
|
-
onClick:
|
|
10233
|
+
onClick: O
|
|
10110
10234
|
}, {
|
|
10111
10235
|
default: withCtx(() => [
|
|
10112
|
-
createTextVNode(toDisplayString(unref(rct)(
|
|
10236
|
+
createTextVNode(toDisplayString(unref(rct)(M.value)) + toDisplayString(unref(rct)("全部")), 1)
|
|
10113
10237
|
]),
|
|
10114
10238
|
_: 1
|
|
10115
10239
|
})) : createCommentVNode("", !0)
|
|
@@ -10128,16 +10252,16 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10128
10252
|
ref: c
|
|
10129
10253
|
}, null, 512)
|
|
10130
10254
|
])), [
|
|
10131
|
-
[z,
|
|
10255
|
+
[z, x.value]
|
|
10132
10256
|
]),
|
|
10133
|
-
|
|
10257
|
+
v.value ? withDirectives((openBlock(), createBlock(H, {
|
|
10134
10258
|
key: 0,
|
|
10135
|
-
pageSize:
|
|
10136
|
-
"onUpdate:pageSize":
|
|
10137
|
-
"current-page":
|
|
10138
|
-
"onUpdate:currentPage":
|
|
10139
|
-
"page-sizes":
|
|
10140
|
-
total:
|
|
10259
|
+
pageSize: E.pageSize,
|
|
10260
|
+
"onUpdate:pageSize": F[0] || (F[0] = (W) => E.pageSize = W),
|
|
10261
|
+
"current-page": E.pageIndex,
|
|
10262
|
+
"onUpdate:currentPage": F[1] || (F[1] = (W) => E.pageIndex = W),
|
|
10263
|
+
"page-sizes": E.pageSizes,
|
|
10264
|
+
total: E.total,
|
|
10141
10265
|
layout: "total, jumper, prev, pager, next, sizes"
|
|
10142
10266
|
}, null, 8, ["pageSize", "current-page", "page-sizes", "total"])), [
|
|
10143
10267
|
[vShow, !unref(i)]
|
|
@@ -10396,7 +10520,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10396
10520
|
}
|
|
10397
10521
|
}, _ = {
|
|
10398
10522
|
SUM(y) {
|
|
10399
|
-
return y.map((w) => Number(w)).filter((w) => !isNaN(w)).reduce((w,
|
|
10523
|
+
return y.map((w) => Number(w)).filter((w) => !isNaN(w)).reduce((w, C) => w + C, 0);
|
|
10400
10524
|
},
|
|
10401
10525
|
AVG(y) {
|
|
10402
10526
|
const E = y.map((w) => Number(w)).filter((w) => !isNaN(w));
|
|
@@ -10416,14 +10540,14 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10416
10540
|
}, v = async (y, E) => {
|
|
10417
10541
|
const {
|
|
10418
10542
|
data: { source: w },
|
|
10419
|
-
notSingle:
|
|
10543
|
+
notSingle: C,
|
|
10420
10544
|
keyIds: $,
|
|
10421
10545
|
dataIds: D,
|
|
10422
10546
|
groupBy: T,
|
|
10423
10547
|
orderBy: S,
|
|
10424
10548
|
cutLength: I,
|
|
10425
|
-
singleComputed:
|
|
10426
|
-
singleKey:
|
|
10549
|
+
singleComputed: B,
|
|
10550
|
+
singleKey: M,
|
|
10427
10551
|
singleData: N
|
|
10428
10552
|
} = y;
|
|
10429
10553
|
let O = {};
|
|
@@ -10433,18 +10557,18 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10433
10557
|
for (let x = 0; x < w.length; x++) {
|
|
10434
10558
|
const { key: A, url: R } = w[x];
|
|
10435
10559
|
try {
|
|
10436
|
-
const
|
|
10437
|
-
O[A] =
|
|
10438
|
-
} catch (
|
|
10560
|
+
const L = (await getDateSourceData(R, { id: n.id })).data;
|
|
10561
|
+
O[A] = L;
|
|
10562
|
+
} catch (L) {
|
|
10439
10563
|
return o("report-error", {
|
|
10440
10564
|
index: n.index,
|
|
10441
|
-
message: getErrorMessage(
|
|
10565
|
+
message: getErrorMessage(L)
|
|
10442
10566
|
}), l.value = !1, !1;
|
|
10443
10567
|
}
|
|
10444
10568
|
}
|
|
10445
10569
|
if (Object.keys(O).length === 0)
|
|
10446
10570
|
return l.value = !1, !1;
|
|
10447
|
-
if (c.value = [],
|
|
10571
|
+
if (c.value = [], C) {
|
|
10448
10572
|
if ($.length < 2 || D.length < 2)
|
|
10449
10573
|
return l.value = !1, !1;
|
|
10450
10574
|
let x = "", A = "";
|
|
@@ -10452,24 +10576,24 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10452
10576
|
let R = get(O, x);
|
|
10453
10577
|
if (!R)
|
|
10454
10578
|
return l.value = !1, !1;
|
|
10455
|
-
let
|
|
10456
|
-
D.length > 2 ? (
|
|
10457
|
-
let
|
|
10458
|
-
if (!
|
|
10579
|
+
let L = R.map((ie) => ie[A]), G = "", j = "";
|
|
10580
|
+
D.length > 2 ? (G = D.splice(0, 2).join("."), j = D.at(0)) : (G = D.at(0), j = D.at(1));
|
|
10581
|
+
let X = [], J = {}, Q = get(O, G);
|
|
10582
|
+
if (!Q)
|
|
10459
10583
|
return l.value = !1, !1;
|
|
10460
|
-
|
|
10461
|
-
let
|
|
10462
|
-
T ?
|
|
10463
|
-
label:
|
|
10464
|
-
value:
|
|
10584
|
+
Q.map((ie) => {
|
|
10585
|
+
let ae = ie[A], ue = ie[j];
|
|
10586
|
+
T ? ae && L.includes(ae) && (J[ae] ? J[ae].push(ue) : J[ae] = [ue]) : ae && L.includes(ae) && X.push({
|
|
10587
|
+
label: ae,
|
|
10588
|
+
value: ue
|
|
10465
10589
|
});
|
|
10466
|
-
}), T && (
|
|
10467
|
-
let
|
|
10590
|
+
}), T && (X = Object.keys(J).map((ie) => {
|
|
10591
|
+
let ae = J[ie];
|
|
10468
10592
|
return {
|
|
10469
|
-
label:
|
|
10470
|
-
value: _.SUM(
|
|
10593
|
+
label: ie,
|
|
10594
|
+
value: _.SUM(ae)
|
|
10471
10595
|
};
|
|
10472
|
-
})), !isNaN(I) && I > 0 && (
|
|
10596
|
+
})), !isNaN(I) && I > 0 && (X = X.splice(0, I)), c.value = X;
|
|
10473
10597
|
} else {
|
|
10474
10598
|
if (!N || N.length === 0)
|
|
10475
10599
|
return l.value = !1, !1;
|
|
@@ -10478,14 +10602,14 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10478
10602
|
let R = get(O, x);
|
|
10479
10603
|
if (!R)
|
|
10480
10604
|
return l.value = !1, !1;
|
|
10481
|
-
let
|
|
10482
|
-
|
|
10483
|
-
label:
|
|
10484
|
-
value:
|
|
10605
|
+
let L = R.map((G) => G[A]);
|
|
10606
|
+
B && (L = _[B](L)), c.value.push({
|
|
10607
|
+
label: M,
|
|
10608
|
+
value: L
|
|
10485
10609
|
});
|
|
10486
10610
|
}
|
|
10487
10611
|
l.value = !1;
|
|
10488
|
-
},
|
|
10612
|
+
}, b = async () => {
|
|
10489
10613
|
l.value = !0;
|
|
10490
10614
|
let y = cloneDeep(n.config);
|
|
10491
10615
|
y && v(y);
|
|
@@ -10493,7 +10617,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10493
10617
|
return e({
|
|
10494
10618
|
setOutData: g
|
|
10495
10619
|
}), onMounted(() => {
|
|
10496
|
-
|
|
10620
|
+
b();
|
|
10497
10621
|
}), (y, E) => {
|
|
10498
10622
|
const w = resolveDirective("loading");
|
|
10499
10623
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
@@ -10504,9 +10628,9 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10504
10628
|
u.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
10505
10629
|
createElementVNode("div", _hoisted_2$3, toDisplayString(d.value.label), 1),
|
|
10506
10630
|
createElementVNode("div", _hoisted_3$2, toDisplayString(d.value.value), 1)
|
|
10507
|
-
], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(c.value, (
|
|
10508
|
-
createElementVNode("div", _hoisted_5$1, toDisplayString(
|
|
10509
|
-
createElementVNode("div", _hoisted_6$1, toDisplayString(
|
|
10631
|
+
], 64)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(c.value, (C, $) => (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
10632
|
+
createElementVNode("div", _hoisted_5$1, toDisplayString(C.label), 1),
|
|
10633
|
+
createElementVNode("div", _hoisted_6$1, toDisplayString(C.value), 1)
|
|
10510
10634
|
]))), 256)),
|
|
10511
10635
|
unref(i) ? (openBlock(), createElementBlock("div", _hoisted_7$1, [...E[0] || (E[0] = [
|
|
10512
10636
|
createElementVNode("span", null, "仅展示,打印时会忽略", -1)
|
|
@@ -10669,10 +10793,10 @@ function buildPageDom(t, e, r, n) {
|
|
|
10669
10793
|
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");
|
|
10670
10794
|
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"));
|
|
10671
10795
|
const g = [], _ = [];
|
|
10672
|
-
for (const
|
|
10673
|
-
g.push({ ...
|
|
10674
|
-
for (const
|
|
10675
|
-
o[
|
|
10796
|
+
for (const b of s)
|
|
10797
|
+
g.push({ ...b.row }), _.push(cloneDeep(a[b.index]));
|
|
10798
|
+
for (const b of e)
|
|
10799
|
+
o[b].isFixed || (g.push({ ...o[b] }), _.push(cloneDeep(a[b])));
|
|
10676
10800
|
const v = renderReportByDomForPrint(g, i, _, t.themeColor);
|
|
10677
10801
|
return m.appendChild(v), u != null && u.enabled && m.appendChild(renderPrintArea(u, { page: d, total: f, title: p }, "center")), m;
|
|
10678
10802
|
}
|
|
@@ -10915,8 +11039,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10915
11039
|
contentWidthPx: y
|
|
10916
11040
|
}), w = document.createElement("iframe");
|
|
10917
11041
|
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);
|
|
10918
|
-
const
|
|
10919
|
-
|
|
11042
|
+
const C = w.contentDocument;
|
|
11043
|
+
C.open(), C.write(E), C.close(), w.onload = () => {
|
|
10920
11044
|
w.contentWindow.print(), setTimeout(() => {
|
|
10921
11045
|
w.remove(), l.value = !1;
|
|
10922
11046
|
}, 500);
|
|
@@ -10933,37 +11057,37 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10933
11057
|
await nextTick();
|
|
10934
11058
|
try {
|
|
10935
11059
|
let w = function() {
|
|
10936
|
-
|
|
10937
|
-
},
|
|
11060
|
+
M.length > 0 && (B.push({ items: M }), M = [], N = 0);
|
|
11061
|
+
}, C = function() {
|
|
10938
11062
|
if (T)
|
|
10939
11063
|
for (; O.length > 0; ) {
|
|
10940
11064
|
const A = O[0], R = D - N;
|
|
10941
11065
|
if (R <= 0) {
|
|
10942
|
-
if (
|
|
11066
|
+
if (M.length === 0) break;
|
|
10943
11067
|
w();
|
|
10944
11068
|
continue;
|
|
10945
11069
|
}
|
|
10946
|
-
let
|
|
10947
|
-
if (!
|
|
10948
|
-
if (
|
|
11070
|
+
let L = splitNextReportPage(A.state, R, S, D);
|
|
11071
|
+
if (!L) {
|
|
11072
|
+
if (M.length > 0) {
|
|
10949
11073
|
w();
|
|
10950
11074
|
continue;
|
|
10951
11075
|
}
|
|
10952
|
-
|
|
11076
|
+
L = splitNextReportPage(A.state, R, S, D, !0);
|
|
10953
11077
|
}
|
|
10954
|
-
|
|
11078
|
+
M.push({ type: "report", dom: L.dom }), N += L.height, A.state.currentRowIdx >= A.state.visibleRows.length && O.shift();
|
|
10955
11079
|
}
|
|
10956
11080
|
};
|
|
10957
|
-
r.silentRender && await
|
|
11081
|
+
r.silentRender && await b();
|
|
10958
11082
|
const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig), T = D != null, S = getPrintContentWidthPxMeasured(r.printConfig), I = [];
|
|
10959
11083
|
for (let A = 0; A < r.configs.length; A++) {
|
|
10960
11084
|
const R = r.configs[A];
|
|
10961
11085
|
if (R.type === "report") {
|
|
10962
|
-
const
|
|
10963
|
-
if (
|
|
10964
|
-
for (const
|
|
10965
|
-
const
|
|
10966
|
-
|
|
11086
|
+
const L = f().get(A);
|
|
11087
|
+
if (L && L.length > 0)
|
|
11088
|
+
for (const j of L) {
|
|
11089
|
+
const X = createReportSplitState(
|
|
11090
|
+
j,
|
|
10967
11091
|
getThemeColors(R.theme || "none").border,
|
|
10968
11092
|
{
|
|
10969
11093
|
header: r.printConfig.header,
|
|
@@ -10972,16 +11096,16 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10972
11096
|
title: r.statementName
|
|
10973
11097
|
}
|
|
10974
11098
|
);
|
|
10975
|
-
await preGenerateBarcodes([{ config:
|
|
11099
|
+
await preGenerateBarcodes([{ config: X.config }]), I.push({ kind: "report", pending: { state: X } });
|
|
10976
11100
|
}
|
|
10977
|
-
const
|
|
10978
|
-
if (
|
|
10979
|
-
for (let
|
|
10980
|
-
const
|
|
10981
|
-
|
|
10982
|
-
for (const
|
|
10983
|
-
const
|
|
10984
|
-
|
|
11101
|
+
const G = p().get(A);
|
|
11102
|
+
if (G && G.length > 0)
|
|
11103
|
+
for (let j = 0; j < G.length; j++) {
|
|
11104
|
+
const X = G[j];
|
|
11105
|
+
j > 0 && I.push({ kind: "break" });
|
|
11106
|
+
for (const J of X) {
|
|
11107
|
+
const Q = createReportSplitState(
|
|
11108
|
+
J,
|
|
10985
11109
|
getThemeColors(R.theme || "none").border,
|
|
10986
11110
|
{
|
|
10987
11111
|
header: r.printConfig.header,
|
|
@@ -10990,14 +11114,14 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10990
11114
|
title: r.statementName
|
|
10991
11115
|
}
|
|
10992
11116
|
);
|
|
10993
|
-
await preGenerateBarcodes([{ config:
|
|
11117
|
+
await preGenerateBarcodes([{ config: Q.config }]), I.push({ kind: "report", pending: { state: Q } });
|
|
10994
11118
|
}
|
|
10995
11119
|
}
|
|
10996
11120
|
} else if (R.type === "label")
|
|
10997
11121
|
continue;
|
|
10998
11122
|
}
|
|
10999
|
-
const
|
|
11000
|
-
let
|
|
11123
|
+
const B = [];
|
|
11124
|
+
let M = [], N = 0;
|
|
11001
11125
|
const O = [];
|
|
11002
11126
|
if (T) {
|
|
11003
11127
|
for (const A of I) {
|
|
@@ -11007,36 +11131,36 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11007
11131
|
}
|
|
11008
11132
|
if (A.kind === "report") {
|
|
11009
11133
|
const R = A.pending;
|
|
11010
|
-
|
|
11011
|
-
const
|
|
11012
|
-
|
|
11134
|
+
C();
|
|
11135
|
+
const L = D - N, G = splitNextReportPage(R.state, L, S, D);
|
|
11136
|
+
G ? (M.push({ type: "report", dom: G.dom }), N += G.height, R.state.currentRowIdx < R.state.visibleRows.length && O.push(R)) : (M.length > 0 && w(), O.push(R));
|
|
11013
11137
|
}
|
|
11014
11138
|
}
|
|
11015
|
-
|
|
11139
|
+
C(), w();
|
|
11016
11140
|
} else {
|
|
11017
|
-
const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom),
|
|
11018
|
-
for (const
|
|
11019
|
-
if (
|
|
11020
|
-
const
|
|
11021
|
-
|
|
11141
|
+
const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom), L = [];
|
|
11142
|
+
for (const G of I) {
|
|
11143
|
+
if (G.kind === "break") {
|
|
11144
|
+
const j = document.createElement("div");
|
|
11145
|
+
j.style.height = `${R}px`, L.push({ type: "spacer", dom: j });
|
|
11022
11146
|
continue;
|
|
11023
11147
|
}
|
|
11024
|
-
if (
|
|
11025
|
-
const { state:
|
|
11026
|
-
|
|
11148
|
+
if (G.kind === "report") {
|
|
11149
|
+
const { state: j } = G.pending, { rowConfig: X, colConfig: J, config: Q } = j, ie = renderReportByDomForPrint(X, J, Q, j.themeColor);
|
|
11150
|
+
L.push({ type: "report", dom: ie });
|
|
11027
11151
|
}
|
|
11028
11152
|
}
|
|
11029
|
-
|
|
11153
|
+
B.push({ items: L });
|
|
11030
11154
|
}
|
|
11031
|
-
a.value =
|
|
11155
|
+
a.value = B.map((A) => A.items), await nextTick(), s.value.forEach((A) => A.remove()), s.value = [];
|
|
11032
11156
|
const x = i.value;
|
|
11033
|
-
for (let A = 0; A < x.length && A <
|
|
11157
|
+
for (let A = 0; A < x.length && A < B.length; A++) {
|
|
11034
11158
|
const R = x[A];
|
|
11035
11159
|
R.innerHTML = "";
|
|
11036
|
-
const
|
|
11037
|
-
for (const
|
|
11038
|
-
const
|
|
11039
|
-
R.appendChild(
|
|
11160
|
+
const L = B[A].items;
|
|
11161
|
+
for (const G of L) {
|
|
11162
|
+
const j = G.dom.cloneNode(!0);
|
|
11163
|
+
R.appendChild(j), s.value.push(j);
|
|
11040
11164
|
}
|
|
11041
11165
|
}
|
|
11042
11166
|
$ && (await nextTick(), v(), setTimeout(() => {
|
|
@@ -11047,15 +11171,15 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11047
11171
|
}
|
|
11048
11172
|
}
|
|
11049
11173
|
);
|
|
11050
|
-
async function
|
|
11174
|
+
async function b() {
|
|
11051
11175
|
u.value = /* @__PURE__ */ new Map(), d.value = /* @__PURE__ */ new Map();
|
|
11052
11176
|
const y = r.fetchAll !== !1;
|
|
11053
11177
|
for (let E = 0; E < r.configs.length; E++) {
|
|
11054
11178
|
const w = r.configs[E];
|
|
11055
11179
|
if (w.type !== "report") continue;
|
|
11056
|
-
const
|
|
11180
|
+
const C = w, $ = C.data, D = C.tableConfig;
|
|
11057
11181
|
if (!$ || !D || !$.source) continue;
|
|
11058
|
-
const T = buildPrintParamsFromConfig(
|
|
11182
|
+
const T = buildPrintParamsFromConfig(C, c.query), { resData: S } = await fetchReportData(
|
|
11059
11183
|
{ id: r.reportId ?? "", data: $, tableConfig: D },
|
|
11060
11184
|
T,
|
|
11061
11185
|
{ pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!$.pagination },
|
|
@@ -11067,21 +11191,21 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11067
11191
|
pageIndex: 1,
|
|
11068
11192
|
total: 0
|
|
11069
11193
|
}));
|
|
11070
|
-
const
|
|
11071
|
-
if (
|
|
11194
|
+
const B = $.source, M = B.find((N) => N.loopTable);
|
|
11195
|
+
if (M && M.key) {
|
|
11072
11196
|
const N = await renderReportToConfigs(
|
|
11073
11197
|
D,
|
|
11074
11198
|
I,
|
|
11075
|
-
|
|
11199
|
+
B,
|
|
11076
11200
|
[],
|
|
11077
|
-
|
|
11201
|
+
M.key
|
|
11078
11202
|
);
|
|
11079
11203
|
d.value.set(E, N);
|
|
11080
11204
|
} else {
|
|
11081
11205
|
const N = await renderReportToConfigs(
|
|
11082
11206
|
D,
|
|
11083
11207
|
I,
|
|
11084
|
-
|
|
11208
|
+
B,
|
|
11085
11209
|
[]
|
|
11086
11210
|
);
|
|
11087
11211
|
u.value.set(E, N);
|
|
@@ -11122,8 +11246,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11122
11246
|
ref: o
|
|
11123
11247
|
}, [
|
|
11124
11248
|
createElementVNode("div", _hoisted_2$2, [
|
|
11125
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w,
|
|
11126
|
-
key:
|
|
11249
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w, C) => (openBlock(), createElementBlock("div", {
|
|
11250
|
+
key: C,
|
|
11127
11251
|
class: "print-preview-page",
|
|
11128
11252
|
style: normalizeStyle(m.value)
|
|
11129
11253
|
}, [
|
|
@@ -11176,8 +11300,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11176
11300
|
);
|
|
11177
11301
|
function m(D) {
|
|
11178
11302
|
D ? (i.value = "", a.value = [], n.value = !0, getConfig(D).then(async (T) => {
|
|
11179
|
-
let { name: S, remoteOptions: I, printConfig:
|
|
11180
|
-
o.value = S, c.value = I,
|
|
11303
|
+
let { name: S, remoteOptions: I, printConfig: B } = T;
|
|
11304
|
+
o.value = S, c.value = I, B && (u.value = { ...DEFAULT_PRINT_CONFIG, ...B });
|
|
11181
11305
|
}).catch((T) => {
|
|
11182
11306
|
console.error("获取报表配置失败:", T), i.value = getErrorMessage(T);
|
|
11183
11307
|
}).finally(() => {
|
|
@@ -11192,28 +11316,28 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11192
11316
|
T > -1 && a.value.splice(T, 1);
|
|
11193
11317
|
}
|
|
11194
11318
|
const v = ref(!1);
|
|
11195
|
-
function
|
|
11319
|
+
function b(D) {
|
|
11196
11320
|
var T;
|
|
11197
11321
|
d[D.key] = D.data, (T = l.value) == null || T.forEach((S) => {
|
|
11198
11322
|
S.setOutData(d);
|
|
11199
11323
|
});
|
|
11200
11324
|
}
|
|
11201
|
-
const y = ref(!1), E = ref(/* @__PURE__ */ new Map()), w = ref(/* @__PURE__ */ new Map()),
|
|
11325
|
+
const y = ref(!1), E = ref(/* @__PURE__ */ new Map()), w = ref(/* @__PURE__ */ new Map()), C = ref([]);
|
|
11202
11326
|
async function $() {
|
|
11203
11327
|
var S, I;
|
|
11204
|
-
if (
|
|
11205
|
-
const
|
|
11206
|
-
|
|
11328
|
+
if (C.value) {
|
|
11329
|
+
const B = C.value.filter((M) => M && typeof M.renderHandler == "function").map((M) => M.renderHandler());
|
|
11330
|
+
B.length > 0 && (n.value = !0, await Promise.all(B), n.value = !1);
|
|
11207
11331
|
}
|
|
11208
11332
|
const D = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
11209
|
-
if (
|
|
11210
|
-
for (let
|
|
11211
|
-
if (c.value[
|
|
11212
|
-
const
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
) :
|
|
11333
|
+
if (C.value) {
|
|
11334
|
+
for (let B = 0; B < c.value.length; B++)
|
|
11335
|
+
if (c.value[B].type === "report") {
|
|
11336
|
+
const M = C.value.find((N, O) => c.value.filter((A) => A.type === "report")[O] === c.value[B]);
|
|
11337
|
+
M && ((I = (S = c.value[B].data) == null ? void 0 : S.source) != null && I.some((N) => N.loopTable) ? M.batchTableConfigs && T.set(
|
|
11338
|
+
B,
|
|
11339
|
+
M.batchTableConfigs.map((N) => N.length > 0 ? [N[0]] : [])
|
|
11340
|
+
) : M.tableConfig && D.set(B, M.tableConfig.length > 0 ? [M.tableConfig[0]] : []));
|
|
11217
11341
|
}
|
|
11218
11342
|
}
|
|
11219
11343
|
E.value = D, w.value = T, y.value = !0;
|
|
@@ -11256,28 +11380,28 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11256
11380
|
"show-icon": "",
|
|
11257
11381
|
closable: !0,
|
|
11258
11382
|
title: I.message,
|
|
11259
|
-
onClose: (
|
|
11383
|
+
onClose: (B) => _(I)
|
|
11260
11384
|
}, null, 8, ["title", "onClose"]))), 128)),
|
|
11261
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (I,
|
|
11385
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (I, B) => (openBlock(), createElementBlock(Fragment, null, [
|
|
11262
11386
|
I.type === "report" ? (openBlock(), createBlock(_sfc_main$6, {
|
|
11263
11387
|
key: 0,
|
|
11264
11388
|
"is-print-mode": f.value,
|
|
11265
11389
|
ref_for: !0,
|
|
11266
11390
|
ref_key: "reportViewItemRefs",
|
|
11267
|
-
ref:
|
|
11268
|
-
index:
|
|
11391
|
+
ref: C,
|
|
11392
|
+
index: B,
|
|
11269
11393
|
length: c.value.length,
|
|
11270
11394
|
id: t.id,
|
|
11271
11395
|
name: o.value,
|
|
11272
11396
|
config: I,
|
|
11273
|
-
onUpdateData:
|
|
11397
|
+
onUpdateData: b,
|
|
11274
11398
|
onReportError: g
|
|
11275
11399
|
}, null, 8, ["is-print-mode", "index", "length", "id", "name", "config"])) : I.type === "label" ? (openBlock(), createBlock(labelItem, {
|
|
11276
11400
|
key: 1,
|
|
11277
11401
|
ref_for: !0,
|
|
11278
11402
|
ref_key: "chartViewItemRef",
|
|
11279
11403
|
ref: l,
|
|
11280
|
-
index:
|
|
11404
|
+
index: B,
|
|
11281
11405
|
length: c.value.length,
|
|
11282
11406
|
id: t.id,
|
|
11283
11407
|
config: I,
|
|
@@ -11289,7 +11413,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11289
11413
|
ref: l,
|
|
11290
11414
|
config: I,
|
|
11291
11415
|
id: t.id,
|
|
11292
|
-
index:
|
|
11416
|
+
index: B,
|
|
11293
11417
|
length: c.value.length
|
|
11294
11418
|
}, null, 8, ["config", "id", "index", "length"]))
|
|
11295
11419
|
], 64))), 256)),
|
|
@@ -11331,26 +11455,26 @@ class PrinterClient {
|
|
|
11331
11455
|
constructor() {
|
|
11332
11456
|
// ===== 响应式状态(供 Composable 直接暴露) =====
|
|
11333
11457
|
/** 连接状态 */
|
|
11334
|
-
|
|
11458
|
+
ce(this, "status", ref("disconnected"));
|
|
11335
11459
|
/** 打印机列表 */
|
|
11336
|
-
|
|
11460
|
+
ce(this, "printers", ref([]));
|
|
11337
11461
|
/** 当前选中的打印机 name(Header 下拉选的,业务 print 不传 printerName 时用它) */
|
|
11338
|
-
|
|
11462
|
+
ce(this, "selectedPrinter", ref(null));
|
|
11339
11463
|
/** 是否正在打印中(业务 print 流程中) */
|
|
11340
|
-
|
|
11464
|
+
ce(this, "printing", ref(!1));
|
|
11341
11465
|
// ===== 内部状态 =====
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11466
|
+
ce(this, "ws", null);
|
|
11467
|
+
ce(this, "url", "");
|
|
11468
|
+
ce(this, "manualClosed", !1);
|
|
11469
|
+
ce(this, "reconnectTimer", null);
|
|
11470
|
+
ce(this, "reconnectDelay", 1e3);
|
|
11471
|
+
ce(this, "retryCount", 0);
|
|
11472
|
+
ce(this, "pollTimer", null);
|
|
11473
|
+
ce(this, "seq", 0);
|
|
11474
|
+
ce(this, "pending", /* @__PURE__ */ new Map());
|
|
11475
|
+
ce(this, "statusListeners", /* @__PURE__ */ new Set());
|
|
11476
|
+
ce(this, "printersListeners", /* @__PURE__ */ new Set());
|
|
11477
|
+
ce(this, "selectListeners", /* @__PURE__ */ new Set());
|
|
11354
11478
|
}
|
|
11355
11479
|
/** 当前服务地址 */
|
|
11356
11480
|
getUrl() {
|
|
@@ -11560,7 +11684,7 @@ function usePrinterClient() {
|
|
|
11560
11684
|
}
|
|
11561
11685
|
if (!g)
|
|
11562
11686
|
throw ElMessage.error("未找到可用打印机"), new Error("未找到可用打印机");
|
|
11563
|
-
const _ = p.printConfig, v = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0,
|
|
11687
|
+
const _ = p.printConfig, v = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, b = await printerClient.printReport({
|
|
11564
11688
|
options: p.remoteOptions,
|
|
11565
11689
|
printConfig: p.printConfig,
|
|
11566
11690
|
statementName: p.name,
|
|
@@ -11569,7 +11693,7 @@ function usePrinterClient() {
|
|
|
11569
11693
|
copies: d,
|
|
11570
11694
|
pageSize: v
|
|
11571
11695
|
});
|
|
11572
|
-
return
|
|
11696
|
+
return b.success ? ElMessage.success(`打印已发送:${g},共 ${b.copies || d} 份`) : ElMessage.error(b.message || "打印失败"), b;
|
|
11573
11697
|
} finally {
|
|
11574
11698
|
printerClient.printing.value = !1;
|
|
11575
11699
|
}
|
|
@@ -11665,9 +11789,9 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11665
11789
|
`打印机:${n.value}`,
|
|
11666
11790
|
`时间:${m}`,
|
|
11667
11791
|
"如能正常打印,说明连接与打印机配置正确"
|
|
11668
|
-
], _ = g.map((v,
|
|
11669
|
-
const y = { ...defaultCell, text: v, row:
|
|
11670
|
-
return y.style = { ...y.style, fontWeight:
|
|
11792
|
+
], _ = g.map((v, b) => {
|
|
11793
|
+
const y = { ...defaultCell, text: v, row: b + 1, col: 1 };
|
|
11794
|
+
return y.style = { ...y.style, fontWeight: b === 0 ? "bold" : "normal" }, [y];
|
|
11671
11795
|
});
|
|
11672
11796
|
return [
|
|
11673
11797
|
{
|
|
@@ -11694,7 +11818,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11694
11818
|
];
|
|
11695
11819
|
}
|
|
11696
11820
|
return (m, g) => {
|
|
11697
|
-
const _ = resolveComponent("YhIcon"), v = resolveComponent("el-button"),
|
|
11821
|
+
const _ = resolveComponent("YhIcon"), v = resolveComponent("el-button"), b = resolveComponent("el-input"), y = resolveComponent("el-divider"), E = resolveComponent("el-popover");
|
|
11698
11822
|
return openBlock(), createBlock(E, {
|
|
11699
11823
|
placement: "bottom",
|
|
11700
11824
|
"popper-class": "yh-printer-popover",
|
|
@@ -11725,7 +11849,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11725
11849
|
createElementVNode("span", _hoisted_4, toDisplayString(l.value), 1)
|
|
11726
11850
|
]),
|
|
11727
11851
|
createElementVNode("div", _hoisted_5, [
|
|
11728
|
-
createVNode(
|
|
11852
|
+
createVNode(b, {
|
|
11729
11853
|
modelValue: i.value,
|
|
11730
11854
|
"onUpdate:modelValue": g[0] || (g[0] = (w) => i.value = w),
|
|
11731
11855
|
size: "small",
|
|
@@ -11755,7 +11879,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
|
|
|
11755
11879
|
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", {
|
|
11756
11880
|
key: w.name,
|
|
11757
11881
|
class: "action-item printer-item",
|
|
11758
|
-
onClick: (
|
|
11882
|
+
onClick: (C) => n.value = w.name
|
|
11759
11883
|
}, [
|
|
11760
11884
|
createElementVNode("span", {
|
|
11761
11885
|
class: normalizeClass(["printer-radio", { active: unref(n) === w.name }])
|
|
@@ -11894,7 +12018,7 @@ function paginate(t, e, r) {
|
|
|
11894
12018
|
E.style.height = `${p}px`, m.push({ type: "spacer", dom: E });
|
|
11895
12019
|
continue;
|
|
11896
12020
|
}
|
|
11897
|
-
const { rowConfig: _, colConfig: v, config:
|
|
12021
|
+
const { rowConfig: _, colConfig: v, config: b } = g.reportConfig, y = renderReportByDomForPrint(_, v, b, g.themeColor);
|
|
11898
12022
|
m.push({ type: "report", dom: y });
|
|
11899
12023
|
}
|
|
11900
12024
|
s.push({ items: m });
|
|
@@ -11911,123 +12035,6 @@ function printHTMLViaIframe(t) {
|
|
|
11911
12035
|
}, 500);
|
|
11912
12036
|
};
|
|
11913
12037
|
}
|
|
11914
|
-
async function reportDatasources() {
|
|
11915
|
-
var r;
|
|
11916
|
-
const t = await http.request({ url: "/windowDesign/getDatasourceList", method: "POST" }), e = (((r = t == null ? void 0 : t.data) == null ? void 0 : r.data) || []).map((n) => ({
|
|
11917
|
-
id: n.id,
|
|
11918
|
-
name: n.name,
|
|
11919
|
-
url: n.url
|
|
11920
|
-
}));
|
|
11921
|
-
return JSON.stringify({
|
|
11922
|
-
count: e.length,
|
|
11923
|
-
datasources: e,
|
|
11924
|
-
hint: "url 即报表配置 data.source[].url 要填的值"
|
|
11925
|
-
});
|
|
11926
|
-
}
|
|
11927
|
-
async function reportDatasourceColumns(t) {
|
|
11928
|
-
var o;
|
|
11929
|
-
const e = String((t == null ? void 0 : t.datasourceId) || "").trim();
|
|
11930
|
-
if (!e)
|
|
11931
|
-
return JSON.stringify({ error: "datasourceId 不能为空,先调用 report_datasources 获取" });
|
|
11932
|
-
const r = await http.request({
|
|
11933
|
-
url: "/windowDesign/getColumns",
|
|
11934
|
-
method: "POST",
|
|
11935
|
-
data: { datasourceId: e }
|
|
11936
|
-
}), n = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.data) || [];
|
|
11937
|
-
return JSON.stringify({ datasourceId: e, columns: n });
|
|
11938
|
-
}
|
|
11939
|
-
function validateDraft(t) {
|
|
11940
|
-
const e = String((t == null ? void 0 : t.name) || "").trim(), r = String((t == null ? void 0 : t.code) || "").trim(), n = t == null ? void 0 : t.options;
|
|
11941
|
-
return !e || !r ? { error: "name 与 code 必填(code 为报表英文编码)" } : !Array.isArray(n) || !n.length ? { error: "options 必须是非空数组(报表配置项,每个元素一个 report/图表块)" } : { draft: { name: e, code: r, description: String((t == null ? void 0 : t.description) || ""), options: n } };
|
|
11942
|
-
}
|
|
11943
|
-
function createReportDesignSkill(t) {
|
|
11944
|
-
return {
|
|
11945
|
-
name: "report_design",
|
|
11946
|
-
label: "报表设计",
|
|
11947
|
-
description: '生成 yh-report 报表配置并应用到报表设计器画布(生成查询表格类报表:明细表、统计表)。本技能由报表设计器内的"AI 生成"入口触发;运行/导出已有报表不属于本技能',
|
|
11948
|
-
temperature: 0.4,
|
|
11949
|
-
tools: [
|
|
11950
|
-
{
|
|
11951
|
-
type: "function",
|
|
11952
|
-
function: {
|
|
11953
|
-
name: "report_datasources",
|
|
11954
|
-
description: "查询报表可用的数据源列表(id、名称、url)。生成配置前必须先调用,data.source[].url 只能用返回的真实值",
|
|
11955
|
-
parameters: { type: "object", properties: {} }
|
|
11956
|
-
}
|
|
11957
|
-
},
|
|
11958
|
-
{
|
|
11959
|
-
type: "function",
|
|
11960
|
-
function: {
|
|
11961
|
-
name: "report_datasource_columns",
|
|
11962
|
-
description: "查询指定数据源的字段清单(列名、名称、类型)。生成表格列与查询条件前必须先调用,字段名只能用返回的真实值",
|
|
11963
|
-
parameters: {
|
|
11964
|
-
type: "object",
|
|
11965
|
-
properties: {
|
|
11966
|
-
datasourceId: { type: "string", description: "数据源 id(report_datasources 返回的 id)" }
|
|
11967
|
-
},
|
|
11968
|
-
required: ["datasourceId"]
|
|
11969
|
-
}
|
|
11970
|
-
}
|
|
11971
|
-
}
|
|
11972
|
-
],
|
|
11973
|
-
localTools: {
|
|
11974
|
-
report_datasources: () => wrapErr(reportDatasources()),
|
|
11975
|
-
report_datasource_columns: (e) => wrapErr(reportDatasourceColumns(e))
|
|
11976
|
-
},
|
|
11977
|
-
prompt: `你现在负责生成 yh-report 报表配置草稿。硬边界:草稿经 apply_design 应用到当前设计器画布,由用户审核并自行保存,你不调用任何保存接口。
|
|
11978
|
-
|
|
11979
|
-
【生成流程(严格按序)】
|
|
11980
|
-
1. report_datasources 查真实数据源 → 向用户确认用哪个(数据源多时给候选项);
|
|
11981
|
-
2. report_datasource_columns 查该数据源真实字段;
|
|
11982
|
-
3. 按下方骨架生成配置(字段名、url 只能用查询到的真实值,禁止编造);
|
|
11983
|
-
4. 调用 apply_design,draft 为 {name, code, description, options} 整体应用;应用失败时按返回的 message 修正后重试。告知用户"草稿已应用到画布(可 Ctrl+Z 撤销),请检查后自行保存"。
|
|
11984
|
-
|
|
11985
|
-
【report 项骨架(options 数组元素,type='report')】
|
|
11986
|
-
{
|
|
11987
|
-
"id": "report-" + 随机串,
|
|
11988
|
-
"type": "report",
|
|
11989
|
-
"tableConfig": [{
|
|
11990
|
-
"config": [[
|
|
11991
|
-
{"type":"TEXT","format":"TEXT","colSpan":1,"rowSpan":1,"col":列,"row":行,"text":"标题文字","data":null,"style":{}}
|
|
11992
|
-
]],
|
|
11993
|
-
"rowConfig": [{"size":28,"data":"key1","loop":true,"index":0}],
|
|
11994
|
-
"colConfig": [{"size":80,"loop":false,"index":0}]
|
|
11995
|
-
}],
|
|
11996
|
-
"params": [
|
|
11997
|
-
{"key":"key1","columnName":"真实列名","name":"参数中文名","defaultValue":"","dataType":"STRING","type":"LIKE","isNull":false,"isShow":true}
|
|
11998
|
-
],
|
|
11999
|
-
"data": {
|
|
12000
|
-
"source": [{"key":"key1","url":"数据源url","name":"数据源名","columns":[{"columnName":"真实列名","name":"列中文名","dataType":"STRING","selectorId":""}],"loopTable":false}],
|
|
12001
|
-
"pagination": true, "pageSize": 20, "autoQuery": true, "processData": ""
|
|
12002
|
-
},
|
|
12003
|
-
"width": 900, "height": 500, "theme": "blue"
|
|
12004
|
-
}
|
|
12005
|
-
|
|
12006
|
-
【字段约定】
|
|
12007
|
-
- config:单元格二维数组。标题行用 TEXT 格式(text 填文字,colSpan 合并);数据列的单元格 data 填 "row:列名"(绑定 source 字段),row/col 从 1 起连续编号;
|
|
12008
|
-
- rowConfig:data 为 key1 且 loop=true 表示该行按数据循环;colConfig 每数据列一项(size 为列宽);
|
|
12009
|
-
- params:查询条件,type 用 LIKE(模糊)/EQ/GT/LT/BETWEEN;columnName 必须是数据源真实列名;
|
|
12010
|
-
- data.source:一个报表默认一个数据源(key=key1);columns 是要展示的字段(顺序即列顺序),只放用户需要的字段,全字段罗列是坏设计;
|
|
12011
|
-
- 列宽参考:日期/编号 110,名称类 140,数量/金额 90,备注 200。
|
|
12012
|
-
|
|
12013
|
-
【设计准则】
|
|
12014
|
-
- 标题行居中加粗(style 可留空由设计器默认),报表名 + 数据范围说明;
|
|
12015
|
-
- 用户没提的维度不要擅自加查询条件;需求不明时先用 ask_user 问清数据范围与展示字段;
|
|
12016
|
-
- config/rowConfig/colConfig 的行列数必须自洽(col 最大值 = 数据列数,编号连续不跳号)。`
|
|
12017
|
-
};
|
|
12018
|
-
}
|
|
12019
|
-
async function wrapErr(t) {
|
|
12020
|
-
try {
|
|
12021
|
-
return await t;
|
|
12022
|
-
} catch (e) {
|
|
12023
|
-
return JSON.stringify({ error: `工具执行失败: ${(e == null ? void 0 : e.message) || String(e)}` });
|
|
12024
|
-
}
|
|
12025
|
-
}
|
|
12026
|
-
function registerReportDesignSkillFromApp(t) {
|
|
12027
|
-
var r;
|
|
12028
|
-
const e = ((r = t == null ? void 0 : t.config) == null ? void 0 : r.globalProperties) || {};
|
|
12029
|
-
e.$hasAi && typeof e.$registerSkill == "function" && e.$registerSkill(createReportDesignSkill(e.$router));
|
|
12030
|
-
}
|
|
12031
12038
|
let rct = (t) => t;
|
|
12032
12039
|
const silenceExport = async (t) => {
|
|
12033
12040
|
let { name: e, remoteOptions: r } = await getConfig(t);
|
|
@@ -12043,7 +12050,7 @@ async function registerRoute(t, e) {
|
|
|
12043
12050
|
title: "报表列表",
|
|
12044
12051
|
icon: "iconfont icon-s-grid"
|
|
12045
12052
|
},
|
|
12046
|
-
component: () => import("./StatementList-
|
|
12053
|
+
component: () => import("./StatementList-DquZ1_6N.mjs")
|
|
12047
12054
|
}), e.addRoute("Index", {
|
|
12048
12055
|
path: "statement/design/:id",
|
|
12049
12056
|
name: "报表设计",
|
|
@@ -12052,7 +12059,7 @@ async function registerRoute(t, e) {
|
|
|
12052
12059
|
title: "报表设计",
|
|
12053
12060
|
icon: "iconfont icon-s-grid"
|
|
12054
12061
|
},
|
|
12055
|
-
component: () => import("./StatementDesign-
|
|
12062
|
+
component: () => import("./StatementDesign-BXeVF_g5.mjs").then((r) => r.S)
|
|
12056
12063
|
}), e.addRoute("Index", {
|
|
12057
12064
|
path: "statement/detail/:id",
|
|
12058
12065
|
name: "后台报表查看",
|
|
@@ -12061,7 +12068,7 @@ async function registerRoute(t, e) {
|
|
|
12061
12068
|
title: "后台报表查看",
|
|
12062
12069
|
icon: "iconfont icon-s-grid"
|
|
12063
12070
|
},
|
|
12064
|
-
component: () => import("./StatementDetail-
|
|
12071
|
+
component: () => import("./StatementDetail-BBbOEaRv.mjs")
|
|
12065
12072
|
})), e.addRoute({
|
|
12066
12073
|
path: "/statementdetail/:id",
|
|
12067
12074
|
name: "报表查看",
|
|
@@ -12072,7 +12079,7 @@ async function registerRoute(t, e) {
|
|
|
12072
12079
|
isWhite: !0
|
|
12073
12080
|
},
|
|
12074
12081
|
props: !0,
|
|
12075
|
-
component: () => import("./StatementDetail-
|
|
12082
|
+
component: () => import("./StatementDetail-BBbOEaRv.mjs")
|
|
12076
12083
|
}), e.hasRoute("Index") && e.addRoute("Index", {
|
|
12077
12084
|
path: "innerStatementdetail/:id",
|
|
12078
12085
|
name: "系统内报表查看",
|
|
@@ -12083,7 +12090,7 @@ async function registerRoute(t, e) {
|
|
|
12083
12090
|
noPadding: !0
|
|
12084
12091
|
},
|
|
12085
12092
|
props: !0,
|
|
12086
|
-
component: () => import("./StatementDetail-
|
|
12093
|
+
component: () => import("./StatementDetail-BBbOEaRv.mjs")
|
|
12087
12094
|
});
|
|
12088
12095
|
}
|
|
12089
12096
|
const index = {
|
|
@@ -12109,13 +12116,13 @@ const index = {
|
|
|
12109
12116
|
menuType: "WINDOW"
|
|
12110
12117
|
}), o(async () => {
|
|
12111
12118
|
!a || !a.hasRoute("Index") || registerRoute(s.isAdmin, a);
|
|
12112
|
-
}),
|
|
12119
|
+
}), l && (e != null && e.printEnabled) && l.registerSlot({
|
|
12113
12120
|
location: "HEADER_RIGHT",
|
|
12114
12121
|
component: markRaw(PrinterHeaderButton)
|
|
12115
12122
|
});
|
|
12116
12123
|
} else {
|
|
12117
12124
|
let { router: n, isAdmin: o = !1 } = e;
|
|
12118
|
-
registerRoute(o, n)
|
|
12125
|
+
registerRoute(o, n);
|
|
12119
12126
|
}
|
|
12120
12127
|
}
|
|
12121
12128
|
};
|
|
@@ -12161,17 +12168,16 @@ export {
|
|
|
12161
12168
|
getDateSourceData as J,
|
|
12162
12169
|
transformArrayToObject as K,
|
|
12163
12170
|
_sfc_main$2 as L,
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12171
|
+
ItemTypes as M,
|
|
12172
|
+
getReportDefaultOption as N,
|
|
12173
|
+
index as O,
|
|
12167
12174
|
PrinterClient as P,
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12175
|
+
dynamicReportView as Q,
|
|
12176
|
+
fetchReportForPrint as R,
|
|
12177
|
+
printReportByBrowser as S,
|
|
12171
12178
|
TypeItems as T,
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
usePrinterClient as W,
|
|
12179
|
+
silenceExport as U,
|
|
12180
|
+
usePrinterClient as V,
|
|
12175
12181
|
_sfc_main$1 as _,
|
|
12176
12182
|
del as a,
|
|
12177
12183
|
defaultCol as b,
|
|
@@ -12200,4 +12206,4 @@ export {
|
|
|
12200
12206
|
applyBorderOperation as y,
|
|
12201
12207
|
validateAndCompleteTableConfig as z
|
|
12202
12208
|
};
|
|
12203
|
-
//# sourceMappingURL=index-
|
|
12209
|
+
//# sourceMappingURL=index-CE09dj2a.mjs.map
|