yh-report 2.4.103 → 2.4.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{StatementDesign-CWDZPlRW.mjs → StatementDesign-DdGNl0Uw.mjs} +9866 -9694
- package/StatementDesign-DdGNl0Uw.mjs.map +1 -0
- package/{StatementDetail-DqLC6v-J.mjs → StatementDetail-wBMBzex2.mjs} +2 -2
- package/{StatementDetail-DqLC6v-J.mjs.map → StatementDetail-wBMBzex2.mjs.map} +1 -1
- package/{StatementList-BUvwSwtN.mjs → StatementList-CWZQHrla.mjs} +2 -2
- package/{StatementList-BUvwSwtN.mjs.map → StatementList-CWZQHrla.mjs.map} +1 -1
- package/{index-BYb-0zSY.mjs → index-CYPpaOha.mjs} +640 -507
- package/index-CYPpaOha.mjs.map +1 -0
- package/index-DT_8pv6P.mjs +5 -0
- package/index-DT_8pv6P.mjs.map +1 -0
- package/index.es.js +1 -1
- package/package.json +1 -1
- package/StatementDesign-CWDZPlRW.mjs.map +0 -1
- package/index-BYb-0zSY.mjs.map +0 -1
- package/index-CP_WthEx.mjs +0 -5
- package/index-CP_WthEx.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ae = (t, e, r) =>
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var De = (t, e, r) => e in t ? xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var ae = (t, e, r) => De(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import { ref, computed, defineComponent, reactive, watch, nextTick, triggerRef, onMounted, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, withDirectives, createBlock, mergeProps, resolveDynamicComponent, vShow, renderSlot, onUnmounted, useCssVars, inject, shallowRef, resolveComponent, resolveDirective, normalizeStyle, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeClass, onBeforeUnmount, provide, withKeys, markRaw, h } from "vue";
|
|
5
5
|
import { ElMessage, ElForm, ElFormItem, ElOption, ElLoading, ElMessageBox, ElDialog, ElButton, ElResult, ElAlert } from "element-plus";
|
|
6
6
|
import http from "@/libs/api.request";
|
|
@@ -952,18 +952,18 @@ function requireDayjs_min() {
|
|
|
952
952
|
t.exports = n();
|
|
953
953
|
})(commonjsGlobal, function() {
|
|
954
954
|
var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", d = "month", f = "quarter", p = "year", m = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, v = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, C = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(N) {
|
|
955
|
-
var
|
|
956
|
-
return "[" + N + (
|
|
957
|
-
} }, y = function(N,
|
|
955
|
+
var O = ["th", "st", "nd", "rd"], x = N % 100;
|
|
956
|
+
return "[" + N + (O[(x - 20) % 10] || O[x] || O[0]) + "]";
|
|
957
|
+
} }, y = function(N, O, x) {
|
|
958
958
|
var A = String(N);
|
|
959
|
-
return !A || A.length >=
|
|
959
|
+
return !A || A.length >= O ? N : "" + Array(O + 1 - A.length).join(x) + N;
|
|
960
960
|
}, E = { s: y, z: function(N) {
|
|
961
|
-
var
|
|
962
|
-
return (
|
|
963
|
-
}, m: function N(
|
|
964
|
-
if (
|
|
965
|
-
var A = 12 * (x.year() -
|
|
966
|
-
return +(-(A + (x - R) / (F ? R -
|
|
961
|
+
var O = -N.utcOffset(), x = Math.abs(O), A = Math.floor(x / 60), R = x % 60;
|
|
962
|
+
return (O <= 0 ? "+" : "-") + y(A, 2, "0") + ":" + y(R, 2, "0");
|
|
963
|
+
}, m: function N(O, x) {
|
|
964
|
+
if (O.date() < x.date()) return -N(x, O);
|
|
965
|
+
var A = 12 * (x.year() - O.year()) + (x.month() - O.month()), R = O.clone().add(A, d), F = x - R < 0, j = O.clone().add(A + (F ? -1 : 1), d);
|
|
966
|
+
return +(-(A + (x - R) / (F ? R - j : j - R)) || 0);
|
|
967
967
|
}, a: function(N) {
|
|
968
968
|
return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
|
|
969
969
|
}, p: function(N) {
|
|
@@ -974,82 +974,82 @@ function requireDayjs_min() {
|
|
|
974
974
|
b[w] = C;
|
|
975
975
|
var $ = "$isDayjsObject", D = function(N) {
|
|
976
976
|
return N instanceof L || !(!N || !N[$]);
|
|
977
|
-
},
|
|
977
|
+
}, T = function N(O, x, A) {
|
|
978
978
|
var R;
|
|
979
|
-
if (!
|
|
980
|
-
if (typeof
|
|
981
|
-
var F =
|
|
979
|
+
if (!O) return w;
|
|
980
|
+
if (typeof O == "string") {
|
|
981
|
+
var F = O.toLowerCase();
|
|
982
982
|
b[F] && (R = F), x && (b[F] = x, R = F);
|
|
983
|
-
var
|
|
984
|
-
if (!R &&
|
|
983
|
+
var j = O.split("-");
|
|
984
|
+
if (!R && j.length > 1) return N(j[0]);
|
|
985
985
|
} else {
|
|
986
|
-
var
|
|
987
|
-
b[
|
|
986
|
+
var V = O.name;
|
|
987
|
+
b[V] = O, R = V;
|
|
988
988
|
}
|
|
989
989
|
return !A && R && (w = R), R || !A && w;
|
|
990
|
-
}, S = function(N,
|
|
990
|
+
}, S = function(N, O) {
|
|
991
991
|
if (D(N)) return N.clone();
|
|
992
|
-
var x = typeof
|
|
992
|
+
var x = typeof O == "object" ? O : {};
|
|
993
993
|
return x.date = N, x.args = arguments, new L(x);
|
|
994
994
|
}, I = E;
|
|
995
|
-
I.l =
|
|
996
|
-
return S(N, { locale:
|
|
995
|
+
I.l = T, I.i = D, I.w = function(N, O) {
|
|
996
|
+
return S(N, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
|
|
997
997
|
};
|
|
998
998
|
var L = function() {
|
|
999
999
|
function N(x) {
|
|
1000
|
-
this.$L =
|
|
1000
|
+
this.$L = T(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[$] = !0;
|
|
1001
1001
|
}
|
|
1002
|
-
var
|
|
1003
|
-
return
|
|
1002
|
+
var O = N.prototype;
|
|
1003
|
+
return O.parse = function(x) {
|
|
1004
1004
|
this.$d = function(A) {
|
|
1005
1005
|
var R = A.date, F = A.utc;
|
|
1006
1006
|
if (R === null) return /* @__PURE__ */ new Date(NaN);
|
|
1007
1007
|
if (I.u(R)) return /* @__PURE__ */ new Date();
|
|
1008
1008
|
if (R instanceof Date) return new Date(R);
|
|
1009
1009
|
if (typeof R == "string" && !/Z$/i.test(R)) {
|
|
1010
|
-
var
|
|
1011
|
-
if (
|
|
1012
|
-
var
|
|
1013
|
-
return F ? new Date(Date.UTC(
|
|
1010
|
+
var j = R.match(_);
|
|
1011
|
+
if (j) {
|
|
1012
|
+
var V = j[2] - 1 || 0, W = (j[7] || "0").substring(0, 3);
|
|
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
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
return new Date(R);
|
|
1017
1017
|
}(x), this.init();
|
|
1018
|
-
},
|
|
1018
|
+
}, O.init = function() {
|
|
1019
1019
|
var x = this.$d;
|
|
1020
1020
|
this.$y = x.getFullYear(), this.$M = x.getMonth(), this.$D = x.getDate(), this.$W = x.getDay(), this.$H = x.getHours(), this.$m = x.getMinutes(), this.$s = x.getSeconds(), this.$ms = x.getMilliseconds();
|
|
1021
|
-
},
|
|
1021
|
+
}, O.$utils = function() {
|
|
1022
1022
|
return I;
|
|
1023
|
-
},
|
|
1023
|
+
}, O.isValid = function() {
|
|
1024
1024
|
return this.$d.toString() !== g;
|
|
1025
|
-
},
|
|
1025
|
+
}, O.isSame = function(x, A) {
|
|
1026
1026
|
var R = S(x);
|
|
1027
1027
|
return this.startOf(A) <= R && R <= this.endOf(A);
|
|
1028
|
-
},
|
|
1028
|
+
}, O.isAfter = function(x, A) {
|
|
1029
1029
|
return S(x) < this.startOf(A);
|
|
1030
|
-
},
|
|
1030
|
+
}, O.isBefore = function(x, A) {
|
|
1031
1031
|
return this.endOf(A) < S(x);
|
|
1032
|
-
},
|
|
1032
|
+
}, O.$g = function(x, A, R) {
|
|
1033
1033
|
return I.u(x) ? this[A] : this.set(R, x);
|
|
1034
|
-
},
|
|
1034
|
+
}, O.unix = function() {
|
|
1035
1035
|
return Math.floor(this.valueOf() / 1e3);
|
|
1036
|
-
},
|
|
1036
|
+
}, O.valueOf = function() {
|
|
1037
1037
|
return this.$d.getTime();
|
|
1038
|
-
},
|
|
1039
|
-
var R = this, F = !!I.u(A) || A,
|
|
1040
|
-
var Q = I.w(R.$u ? Date.UTC(R.$y,
|
|
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
1041
|
return F ? Q : Q.endOf(c);
|
|
1042
|
-
}, W = function(
|
|
1043
|
-
return I.w(R.toDate()[
|
|
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
1044
|
}, M = this.$W, B = this.$M, U = this.$D, H = "set" + (this.$u ? "UTC" : "");
|
|
1045
|
-
switch (
|
|
1045
|
+
switch (j) {
|
|
1046
1046
|
case p:
|
|
1047
|
-
return F ?
|
|
1047
|
+
return F ? V(1, 0) : V(31, 11);
|
|
1048
1048
|
case d:
|
|
1049
|
-
return F ?
|
|
1049
|
+
return F ? V(1, B) : V(0, B + 1);
|
|
1050
1050
|
case u:
|
|
1051
|
-
var z = this.$locale().weekStart || 0,
|
|
1052
|
-
return
|
|
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
1053
|
case c:
|
|
1054
1054
|
case m:
|
|
1055
1055
|
return W(H + "Hours", 0);
|
|
@@ -1062,46 +1062,46 @@ function requireDayjs_min() {
|
|
|
1062
1062
|
default:
|
|
1063
1063
|
return this.clone();
|
|
1064
1064
|
}
|
|
1065
|
-
},
|
|
1065
|
+
}, O.endOf = function(x) {
|
|
1066
1066
|
return this.startOf(x, !1);
|
|
1067
|
-
},
|
|
1068
|
-
var R, F = I.p(x),
|
|
1067
|
+
}, O.$set = function(x, A) {
|
|
1068
|
+
var R, F = I.p(x), j = "set" + (this.$u ? "UTC" : ""), V = (R = {}, R[c] = j + "Date", R[m] = j + "Date", R[d] = j + "Month", R[p] = j + "FullYear", R[l] = j + "Hours", R[s] = j + "Minutes", R[a] = j + "Seconds", R[i] = j + "Milliseconds", R)[F], W = F === c ? this.$D + (A - this.$W) : A;
|
|
1069
1069
|
if (F === d || F === p) {
|
|
1070
1070
|
var M = this.clone().set(m, 1);
|
|
1071
|
-
M.$d[
|
|
1072
|
-
} else
|
|
1071
|
+
M.$d[V](W), M.init(), this.$d = M.set(m, Math.min(this.$D, M.daysInMonth())).$d;
|
|
1072
|
+
} else V && this.$d[V](W);
|
|
1073
1073
|
return this.init(), this;
|
|
1074
|
-
},
|
|
1074
|
+
}, O.set = function(x, A) {
|
|
1075
1075
|
return this.clone().$set(x, A);
|
|
1076
|
-
},
|
|
1076
|
+
}, O.get = function(x) {
|
|
1077
1077
|
return this[I.p(x)]();
|
|
1078
|
-
},
|
|
1078
|
+
}, O.add = function(x, A) {
|
|
1079
1079
|
var R, F = this;
|
|
1080
1080
|
x = Number(x);
|
|
1081
|
-
var
|
|
1081
|
+
var j = I.p(A), V = function(B) {
|
|
1082
1082
|
var U = S(F);
|
|
1083
1083
|
return I.w(U.date(U.date() + Math.round(B * x)), F);
|
|
1084
1084
|
};
|
|
1085
|
-
if (
|
|
1086
|
-
if (
|
|
1087
|
-
if (
|
|
1088
|
-
if (
|
|
1089
|
-
var W = (R = {}, R[s] = n, R[l] = o, R[a] = r, R)[
|
|
1085
|
+
if (j === d) return this.set(d, this.$M + x);
|
|
1086
|
+
if (j === p) return this.set(p, this.$y + x);
|
|
1087
|
+
if (j === c) return V(1);
|
|
1088
|
+
if (j === u) return V(7);
|
|
1089
|
+
var W = (R = {}, R[s] = n, R[l] = o, R[a] = r, R)[j] || 1, M = this.$d.getTime() + x * W;
|
|
1090
1090
|
return I.w(M, this);
|
|
1091
|
-
},
|
|
1091
|
+
}, O.subtract = function(x, A) {
|
|
1092
1092
|
return this.add(-1 * x, A);
|
|
1093
|
-
},
|
|
1093
|
+
}, O.format = function(x) {
|
|
1094
1094
|
var A = this, R = this.$locale();
|
|
1095
1095
|
if (!this.isValid()) return R.invalidDate || g;
|
|
1096
|
-
var F = x || "YYYY-MM-DDTHH:mm:ssZ",
|
|
1097
|
-
return
|
|
1098
|
-
},
|
|
1099
|
-
return I.s(
|
|
1100
|
-
},
|
|
1101
|
-
var
|
|
1102
|
-
return re ?
|
|
1096
|
+
var F = x || "YYYY-MM-DDTHH:mm:ssZ", j = I.z(this), V = this.$H, W = this.$m, M = this.$M, B = R.weekdays, U = R.months, H = R.meridiem, z = function(K, Q, re, oe) {
|
|
1097
|
+
return K && (K[Q] || K(A, F)) || re[Q].slice(0, oe);
|
|
1098
|
+
}, X = function(K) {
|
|
1099
|
+
return I.s(V % 12 || 12, K, "0");
|
|
1100
|
+
}, Z = H || function(K, Q, re) {
|
|
1101
|
+
var oe = K < 12 ? "AM" : "PM";
|
|
1102
|
+
return re ? oe.toLowerCase() : oe;
|
|
1103
1103
|
};
|
|
1104
|
-
return F.replace(v, function(
|
|
1104
|
+
return F.replace(v, function(K, Q) {
|
|
1105
1105
|
return Q || function(re) {
|
|
1106
1106
|
switch (re) {
|
|
1107
1107
|
case "YY":
|
|
@@ -1129,17 +1129,17 @@ function requireDayjs_min() {
|
|
|
1129
1129
|
case "dddd":
|
|
1130
1130
|
return B[A.$W];
|
|
1131
1131
|
case "H":
|
|
1132
|
-
return String(
|
|
1132
|
+
return String(V);
|
|
1133
1133
|
case "HH":
|
|
1134
|
-
return I.s(
|
|
1134
|
+
return I.s(V, 2, "0");
|
|
1135
1135
|
case "h":
|
|
1136
|
-
return
|
|
1136
|
+
return X(1);
|
|
1137
1137
|
case "hh":
|
|
1138
|
-
return
|
|
1138
|
+
return X(2);
|
|
1139
1139
|
case "a":
|
|
1140
|
-
return
|
|
1140
|
+
return Z(V, W, !0);
|
|
1141
1141
|
case "A":
|
|
1142
|
-
return
|
|
1142
|
+
return Z(V, W, !1);
|
|
1143
1143
|
case "m":
|
|
1144
1144
|
return String(W);
|
|
1145
1145
|
case "mm":
|
|
@@ -1151,18 +1151,18 @@ function requireDayjs_min() {
|
|
|
1151
1151
|
case "SSS":
|
|
1152
1152
|
return I.s(A.$ms, 3, "0");
|
|
1153
1153
|
case "Z":
|
|
1154
|
-
return
|
|
1154
|
+
return j;
|
|
1155
1155
|
}
|
|
1156
1156
|
return null;
|
|
1157
|
-
}(
|
|
1157
|
+
}(K) || j.replace(":", "");
|
|
1158
1158
|
});
|
|
1159
|
-
},
|
|
1159
|
+
}, O.utcOffset = function() {
|
|
1160
1160
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1161
|
-
},
|
|
1162
|
-
var F,
|
|
1163
|
-
return I.m(
|
|
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
1164
|
};
|
|
1165
|
-
switch (
|
|
1165
|
+
switch (V) {
|
|
1166
1166
|
case p:
|
|
1167
1167
|
F = U() / 12;
|
|
1168
1168
|
break;
|
|
@@ -1191,33 +1191,33 @@ function requireDayjs_min() {
|
|
|
1191
1191
|
F = B;
|
|
1192
1192
|
}
|
|
1193
1193
|
return R ? F : I.a(F);
|
|
1194
|
-
},
|
|
1194
|
+
}, O.daysInMonth = function() {
|
|
1195
1195
|
return this.endOf(d).$D;
|
|
1196
|
-
},
|
|
1196
|
+
}, O.$locale = function() {
|
|
1197
1197
|
return b[this.$L];
|
|
1198
|
-
},
|
|
1198
|
+
}, O.locale = function(x, A) {
|
|
1199
1199
|
if (!x) return this.$L;
|
|
1200
|
-
var R = this.clone(), F =
|
|
1200
|
+
var R = this.clone(), F = T(x, A, !0);
|
|
1201
1201
|
return F && (R.$L = F), R;
|
|
1202
|
-
},
|
|
1202
|
+
}, O.clone = function() {
|
|
1203
1203
|
return I.w(this.$d, this);
|
|
1204
|
-
},
|
|
1204
|
+
}, O.toDate = function() {
|
|
1205
1205
|
return new Date(this.valueOf());
|
|
1206
|
-
},
|
|
1206
|
+
}, O.toJSON = function() {
|
|
1207
1207
|
return this.isValid() ? this.toISOString() : null;
|
|
1208
|
-
},
|
|
1208
|
+
}, O.toISOString = function() {
|
|
1209
1209
|
return this.$d.toISOString();
|
|
1210
|
-
},
|
|
1210
|
+
}, O.toString = function() {
|
|
1211
1211
|
return this.$d.toUTCString();
|
|
1212
1212
|
}, N;
|
|
1213
1213
|
}(), k = L.prototype;
|
|
1214
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(
|
|
1216
|
-
return this.$g(
|
|
1215
|
+
k[N[1]] = function(O) {
|
|
1216
|
+
return this.$g(O, N[0], N[1]);
|
|
1217
1217
|
};
|
|
1218
|
-
}), S.extend = function(N,
|
|
1219
|
-
return N.$i || (N(
|
|
1220
|
-
}, S.locale =
|
|
1218
|
+
}), S.extend = function(N, O) {
|
|
1219
|
+
return N.$i || (N(O, L, S), N.$i = !0), S;
|
|
1220
|
+
}, S.locale = T, S.isDayjs = D, S.unix = function(N) {
|
|
1221
1221
|
return S(1e3 * N);
|
|
1222
1222
|
}, S.en = b[w], S.Ls = b, S.p = {}, S;
|
|
1223
1223
|
});
|
|
@@ -1269,7 +1269,7 @@ const DATE_RANGE_TYPES = [
|
|
|
1269
1269
|
[DataParamDateTypes.YEARRANGE]: "YYYY"
|
|
1270
1270
|
};
|
|
1271
1271
|
function getDateRanges() {
|
|
1272
|
-
const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), d = e.endOf("quarter").format(t), f = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), v = e.subtract(1, "year").endOf("year").format(t), C = e.format(t), y = e.subtract(2, "day").format(t), E = e.subtract(3, "day").format(t), w = e.subtract(7, "day").format(t), b = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), D = e.subtract(2, "week").startOf("week").format(t),
|
|
1272
|
+
const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), d = e.endOf("quarter").format(t), f = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), v = e.subtract(1, "year").endOf("year").format(t), C = e.format(t), y = e.subtract(2, "day").format(t), E = e.subtract(3, "day").format(t), w = e.subtract(7, "day").format(t), b = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), D = e.subtract(2, "week").startOf("week").format(t), T = e.subtract(2, "month").format(t), S = e.subtract(3, "month").format(t), I = e.subtract(6, "month").format(t), L = e.subtract(1, "year").startOf("year").format(t), k = e.subtract(2, "year").startOf("year").format(t), N = e.subtract(3, "year").format(t), O = e.subtract(5, "year").format(t);
|
|
1273
1273
|
return {
|
|
1274
1274
|
dateFormat: t,
|
|
1275
1275
|
thisDayStart: r,
|
|
@@ -1295,13 +1295,13 @@ function getDateRanges() {
|
|
|
1295
1295
|
fifteenDay: b,
|
|
1296
1296
|
thirtyDay: $,
|
|
1297
1297
|
twoWeek: D,
|
|
1298
|
-
twoMonth:
|
|
1298
|
+
twoMonth: T,
|
|
1299
1299
|
threeMonth: S,
|
|
1300
1300
|
sixMonth: I,
|
|
1301
1301
|
oneYear: L,
|
|
1302
1302
|
twoYear: k,
|
|
1303
1303
|
threeYear: N,
|
|
1304
|
-
fiveYear:
|
|
1304
|
+
fiveYear: O
|
|
1305
1305
|
};
|
|
1306
1306
|
}
|
|
1307
1307
|
function componentTransition(t, e = "date") {
|
|
@@ -1375,13 +1375,13 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1375
1375
|
},
|
|
1376
1376
|
emits: ["change", "addCell"],
|
|
1377
1377
|
setup(t, { expose: e, emit: r }) {
|
|
1378
|
-
const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: d, lastMonthStart: f, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: v, lastYearStart: C, lastYearEnd: y, now: E, twoDay: w, threeDay: b, sevenDay: $, fifteenDay: D, thirtyDay:
|
|
1379
|
-
let
|
|
1380
|
-
return F.value.forEach((
|
|
1381
|
-
|
|
1382
|
-
}),
|
|
1378
|
+
const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: d, lastMonthStart: f, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: v, lastYearStart: C, lastYearEnd: y, now: E, twoDay: w, threeDay: b, sevenDay: $, fifteenDay: D, thirtyDay: T, twoWeek: S, twoMonth: I, threeMonth: L, sixMonth: k, oneYear: N, twoYear: O, threeYear: x, fiveYear: A } = getDateRanges(), R = ref([]), F = ref([]), j = computed(() => {
|
|
1379
|
+
let G = reactive({});
|
|
1380
|
+
return F.value.forEach((q) => {
|
|
1381
|
+
G[q.columnName] = q;
|
|
1382
|
+
}), G;
|
|
1383
1383
|
});
|
|
1384
|
-
let
|
|
1384
|
+
let V = !1;
|
|
1385
1385
|
watch(
|
|
1386
1386
|
() => n.config,
|
|
1387
1387
|
() => {
|
|
@@ -1393,69 +1393,69 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1393
1393
|
}
|
|
1394
1394
|
);
|
|
1395
1395
|
function W() {
|
|
1396
|
-
|
|
1397
|
-
let
|
|
1396
|
+
V = !1;
|
|
1397
|
+
let G = [];
|
|
1398
1398
|
R.value = [];
|
|
1399
|
-
const
|
|
1399
|
+
const q = [];
|
|
1400
1400
|
if (n.config && n.config.length)
|
|
1401
|
-
for (let
|
|
1402
|
-
const ee = cloneDeep(n.config[
|
|
1403
|
-
let { dataType:
|
|
1404
|
-
const { componentName:
|
|
1405
|
-
let
|
|
1401
|
+
for (let Y = 0; Y < n.config.length; Y++) {
|
|
1402
|
+
const ee = cloneDeep(n.config[Y]);
|
|
1403
|
+
let { dataType: J, dateType: ne, type: te, selectorId: se, remoteSearch: ie, cellIndex: le, cellIndexSort: pe, cellIndexSortOrder: ge, cellIndexSortNumeric: me, name: de, columnName: ye, defaultValue: Te, isNull: ve } = ee, _e = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(J);
|
|
1404
|
+
const { componentName: we, placeholerPrefix: Ee, type: Ce } = componentTransition(J, ne);
|
|
1405
|
+
let he = {
|
|
1406
1406
|
...ee,
|
|
1407
1407
|
elWidth: ee.elWidth || 210,
|
|
1408
|
-
formItemType:
|
|
1409
|
-
placeholder: rct(
|
|
1410
|
-
type:
|
|
1408
|
+
formItemType: we,
|
|
1409
|
+
placeholder: rct(Ee + de || ye),
|
|
1410
|
+
type: Ce || "",
|
|
1411
1411
|
optionData: [],
|
|
1412
1412
|
value: ""
|
|
1413
1413
|
};
|
|
1414
|
-
if (
|
|
1415
|
-
name:
|
|
1416
|
-
value:
|
|
1414
|
+
if (he.value = B(he, _e), R.value.push({
|
|
1415
|
+
name: ye,
|
|
1416
|
+
value: he.value,
|
|
1417
1417
|
type: te,
|
|
1418
|
-
isNull:
|
|
1418
|
+
isNull: ve
|
|
1419
1419
|
}), ee.customOptions)
|
|
1420
|
-
|
|
1420
|
+
he.optionData = ee.customOptions.split(",").map((ce) => ce.trim()).filter(Boolean).map((ce) => ({ label: ce, value: ce }));
|
|
1421
1421
|
else if (se) {
|
|
1422
|
-
const ce = z(se,
|
|
1423
|
-
|
|
1424
|
-
} else
|
|
1422
|
+
const ce = z(se, he, "", ie);
|
|
1423
|
+
ie || q.push(ce);
|
|
1424
|
+
} else le && (o("addCell", le), on(`cell-change:${le}`, (ce) => {
|
|
1425
1425
|
if (ce = Object.values(ce), ce && Array.isArray(ce) && ce.length) {
|
|
1426
|
-
if (
|
|
1427
|
-
const
|
|
1428
|
-
ce.sort((
|
|
1426
|
+
if (pe) {
|
|
1427
|
+
const be = createGroupSortComparator({ order: ge, numeric: me });
|
|
1428
|
+
ce.sort(($e, Se) => be($e.label, Se.label));
|
|
1429
1429
|
}
|
|
1430
|
-
|
|
1430
|
+
he.optionData = ce, triggerRef(F);
|
|
1431
1431
|
}
|
|
1432
1432
|
}));
|
|
1433
|
-
|
|
1433
|
+
G.push(he), te === "LT_GT_EQ" && !_e && Z(he, G, Ee, te);
|
|
1434
1434
|
}
|
|
1435
|
-
F.value =
|
|
1436
|
-
|
|
1435
|
+
F.value = G, M(), nextTick(async () => {
|
|
1436
|
+
q.length > 0 && await Promise.allSettled(q), V || fe();
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
function M() {
|
|
1440
|
-
Object.entries(i.query).forEach(([
|
|
1441
|
-
if (!
|
|
1442
|
-
const
|
|
1440
|
+
Object.entries(i.query).forEach(([G, q]) => {
|
|
1441
|
+
if (!G || q === null || q === void 0 || q === "") return;
|
|
1442
|
+
const Y = Array.isArray(q) ? q.join(",") : q, ee = R.value.findIndex((J) => J.name === G);
|
|
1443
1443
|
if (ee > -1) {
|
|
1444
|
-
if (
|
|
1445
|
-
R.value[ee].value =
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1444
|
+
if (G.indexOf("end_") === 0) {
|
|
1445
|
+
R.value[ee].value = Y;
|
|
1446
|
+
const J = F.value.find((ne) => ne.columnName === G);
|
|
1447
|
+
J && (J.value = Y);
|
|
1448
1448
|
}
|
|
1449
1449
|
return;
|
|
1450
1450
|
}
|
|
1451
|
-
R.value.push({ name:
|
|
1451
|
+
R.value.push({ name: G, value: Y, type: "EQ", isNull: !1 });
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
|
-
function B(
|
|
1455
|
-
let { dataType:
|
|
1456
|
-
if (
|
|
1457
|
-
ee && (
|
|
1458
|
-
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(
|
|
1454
|
+
function B(G, q) {
|
|
1455
|
+
let { dataType: Y, dateType: ee, defaultValue: J, startTime: ne, endTime: te, columnName: se } = G, ie = J || "";
|
|
1456
|
+
if (q && J)
|
|
1457
|
+
ee && (G.type = ee), ee && DATE_RANGE_TYPES.includes(ee) ? ie = U(J, ne, te) : ie = H(ee, J, ne);
|
|
1458
|
+
else if ([DataSourceColumnDataType.LIST, DataSourceColumnDataType.TABLE].includes(Y)) {
|
|
1459
1459
|
if (Array.isArray(ie))
|
|
1460
1460
|
return ie;
|
|
1461
1461
|
if (i.query[se]) {
|
|
@@ -1466,8 +1466,8 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1466
1466
|
i.query[se] && (ie = i.query[se]);
|
|
1467
1467
|
return ie;
|
|
1468
1468
|
}
|
|
1469
|
-
function U(
|
|
1470
|
-
let
|
|
1469
|
+
function U(G, q, Y) {
|
|
1470
|
+
let J = {
|
|
1471
1471
|
thisDay: [s, l],
|
|
1472
1472
|
thisMonth: [u, d],
|
|
1473
1473
|
lastMonth: [f, p],
|
|
@@ -1478,20 +1478,20 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1478
1478
|
threeDay: [b, E],
|
|
1479
1479
|
sevenDay: [$, E],
|
|
1480
1480
|
fifteenDay: [D, E],
|
|
1481
|
-
thirtyDay: [
|
|
1481
|
+
thirtyDay: [T, E],
|
|
1482
1482
|
threeMonth: [L, E],
|
|
1483
1483
|
sixMonth: [k, E],
|
|
1484
1484
|
oneYear: [N, E],
|
|
1485
|
-
twoYear: [
|
|
1485
|
+
twoYear: [O, E],
|
|
1486
1486
|
threeYear: [x, E],
|
|
1487
1487
|
fiveYear: [A, E]
|
|
1488
|
-
}[
|
|
1489
|
-
return
|
|
1488
|
+
}[G] || [s, l];
|
|
1489
|
+
return q && (J[0] = ue(J[0], q, a)), Y && (J[1] = ue(J[1], Y, a)), J;
|
|
1490
1490
|
}
|
|
1491
|
-
function H(
|
|
1492
|
-
let
|
|
1491
|
+
function H(G, q, Y) {
|
|
1492
|
+
let J = {
|
|
1493
1493
|
thisYear: _,
|
|
1494
|
-
twoYear:
|
|
1494
|
+
twoYear: O,
|
|
1495
1495
|
threeYear: x,
|
|
1496
1496
|
fiveYear: A,
|
|
1497
1497
|
thisMonth: u,
|
|
@@ -1508,165 +1508,180 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
|
|
|
1508
1508
|
threeDay: b,
|
|
1509
1509
|
sevenDay: $,
|
|
1510
1510
|
fifteenDay: D,
|
|
1511
|
-
thirtyDay:
|
|
1512
|
-
}[
|
|
1513
|
-
if (!
|
|
1514
|
-
let
|
|
1515
|
-
|
|
1511
|
+
thirtyDay: T
|
|
1512
|
+
}[q];
|
|
1513
|
+
if (!J) {
|
|
1514
|
+
let ne = dayjs().startOf(G);
|
|
1515
|
+
ne.isValid() ? J = ne.format(a) : J = E;
|
|
1516
1516
|
}
|
|
1517
|
-
return
|
|
1517
|
+
return Y && (J = ue(J, Y, a)), J;
|
|
1518
1518
|
}
|
|
1519
|
-
function z(
|
|
1519
|
+
function z(G, q, Y = "", ee = !1) {
|
|
1520
1520
|
return axios.request({
|
|
1521
|
-
url:
|
|
1522
|
-
method: "POST"
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1521
|
+
url: "/sysSelector/list",
|
|
1522
|
+
method: "POST",
|
|
1523
|
+
data: { id: G, f_value: Y, remote: ee }
|
|
1524
|
+
}).then((J) => {
|
|
1525
|
+
J.data && Array.isArray(J.data.data) && (q.optionData = J.data.data.map(({ NAME: ne, VALUE: te }) => ({
|
|
1526
|
+
label: ne,
|
|
1527
|
+
value: te
|
|
1527
1528
|
})), triggerRef(F));
|
|
1528
|
-
}).catch((
|
|
1529
|
-
console.warn(`选择器 ${
|
|
1529
|
+
}).catch((J) => {
|
|
1530
|
+
console.warn(`选择器 ${G} 数据加载失败:`, J), q.optionData = [];
|
|
1530
1531
|
});
|
|
1531
1532
|
}
|
|
1532
|
-
function
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1533
|
+
function X(G, q) {
|
|
1534
|
+
q.selectorId && (q.selectorLoading = !0, axios.request({
|
|
1535
|
+
url: "/sysSelector/list",
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
data: { id: q.selectorId, f_value: G, remote: !0 }
|
|
1538
|
+
}).then((Y) => {
|
|
1539
|
+
Y.data && Array.isArray(Y.data.data) && (q.optionData = Y.data.data.map(({ NAME: ee, VALUE: J }) => ({
|
|
1540
|
+
label: ee,
|
|
1541
|
+
value: J
|
|
1542
|
+
})));
|
|
1543
|
+
}).finally(() => {
|
|
1544
|
+
q.selectorLoading = !1, triggerRef(F);
|
|
1545
|
+
}));
|
|
1546
|
+
}
|
|
1547
|
+
function Z(G, q, Y, ee) {
|
|
1548
|
+
const { columnName: J, defaultValue: ne, isNull: te } = G;
|
|
1549
|
+
G.placeholder = rct(Y + "开始");
|
|
1550
|
+
const se = cloneDeep(G);
|
|
1551
|
+
se.name = "-", se.columnName = `end_${J}`, se.placeholder = rct(Y + "结束");
|
|
1552
|
+
let ie = ne || "";
|
|
1538
1553
|
R.value.push({
|
|
1539
|
-
name: `end_${
|
|
1554
|
+
name: `end_${J}`,
|
|
1540
1555
|
value: ie,
|
|
1541
1556
|
type: ee,
|
|
1542
1557
|
isNull: te
|
|
1543
|
-
}),
|
|
1558
|
+
}), G.selectorId && z(G.selectorId, se, "", !!G.remoteSearch), q.push(se);
|
|
1544
1559
|
}
|
|
1545
|
-
function
|
|
1560
|
+
function K(G) {
|
|
1546
1561
|
return {
|
|
1547
|
-
label: rct(
|
|
1548
|
-
required:
|
|
1549
|
-
style:
|
|
1562
|
+
label: rct(G.name),
|
|
1563
|
+
required: G.isNull,
|
|
1564
|
+
style: G.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {}
|
|
1550
1565
|
};
|
|
1551
1566
|
}
|
|
1552
|
-
function
|
|
1553
|
-
const
|
|
1554
|
-
modelValue:
|
|
1555
|
-
type:
|
|
1567
|
+
function Q(G) {
|
|
1568
|
+
const q = {
|
|
1569
|
+
modelValue: G.value,
|
|
1570
|
+
type: G.type,
|
|
1556
1571
|
clearable: !0,
|
|
1557
|
-
placeholder:
|
|
1558
|
-
"onUpdate:modelValue": (
|
|
1572
|
+
placeholder: G.placeholder,
|
|
1573
|
+
"onUpdate:modelValue": (Y) => re(Y, G)
|
|
1559
1574
|
};
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
}), ["ElSelect"].includes(
|
|
1575
|
+
return G.formItemType === "ElDatePicker" && (q["value-format"] = a, DATE_RANGE_TYPES.includes(G.type) && (q.unlinkPanels = !0, q.singlePanel = !!G.singlePanel), DATE_VIEW_FORMAT[G.type] && (q.format = DATE_VIEW_FORMAT[G.type])), ["ElInput"].includes(G.formItemType) && (q.onBlur = () => oe(G, "blur"), q.onKeyup = (Y) => {
|
|
1576
|
+
Y.key === "Enter" && oe(G, "enter");
|
|
1577
|
+
}), ["ElSelect"].includes(G.formItemType) && (q.multiple = !0, q.collapseTags = !0, q.filterable = !0, G.remoteSearch && G.selectorId && (q.remote = !0, q.remoteMethod = (Y) => X(Y, G), q.loading = G.selectorLoading)), q;
|
|
1563
1578
|
}
|
|
1564
|
-
function
|
|
1565
|
-
let
|
|
1566
|
-
if (
|
|
1579
|
+
function re(G, q) {
|
|
1580
|
+
let Y = R.value.findIndex((ee) => ee.name === q.columnName);
|
|
1581
|
+
if (q.value = G, R.value[Y].value = G, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(q.formItemType)) {
|
|
1567
1582
|
if (!n.data.searchOnBlur)
|
|
1568
1583
|
return !1;
|
|
1569
|
-
|
|
1584
|
+
V = !0, fe();
|
|
1570
1585
|
}
|
|
1571
1586
|
}
|
|
1572
|
-
function
|
|
1573
|
-
if (["ElInput", "ElInputNumber"].includes(
|
|
1574
|
-
if (
|
|
1587
|
+
function oe(G, q) {
|
|
1588
|
+
if (["ElInput", "ElInputNumber"].includes(G.formItemType)) {
|
|
1589
|
+
if (q === "blur" && !n.data.searchOnBlur)
|
|
1575
1590
|
return !1;
|
|
1576
|
-
|
|
1591
|
+
V = !0, fe();
|
|
1577
1592
|
}
|
|
1578
1593
|
}
|
|
1579
|
-
function
|
|
1580
|
-
if (
|
|
1581
|
-
let ee =
|
|
1582
|
-
let te =
|
|
1594
|
+
function ue(G, q, Y) {
|
|
1595
|
+
if (q && G) {
|
|
1596
|
+
let ee = q.split(",").map((ne) => {
|
|
1597
|
+
let te = ne.match(/[-+]/).index, se = Number(ne.substring(te)), ie = ne.substring(0, te);
|
|
1583
1598
|
return {
|
|
1584
1599
|
count: se,
|
|
1585
1600
|
type: ie
|
|
1586
1601
|
};
|
|
1587
|
-
}),
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
}),
|
|
1602
|
+
}), J = dayjs(G);
|
|
1603
|
+
J.isValid() && (ee.forEach(({ count: ne, type: te }) => {
|
|
1604
|
+
J = J.add(ne, te);
|
|
1605
|
+
}), G = J.format(Y));
|
|
1591
1606
|
}
|
|
1592
|
-
return
|
|
1607
|
+
return G;
|
|
1593
1608
|
}
|
|
1594
|
-
function
|
|
1595
|
-
let
|
|
1596
|
-
|
|
1597
|
-
let te =
|
|
1609
|
+
function fe() {
|
|
1610
|
+
let G = cloneDeep(R.value);
|
|
1611
|
+
G.forEach(({ name: q, value: Y, type: ee, isNull: J }, ne) => {
|
|
1612
|
+
let te = j.value[q];
|
|
1598
1613
|
if (!te) {
|
|
1599
|
-
Array.isArray(
|
|
1614
|
+
Array.isArray(Y) && (G[ne].value = Y.join(","));
|
|
1600
1615
|
return;
|
|
1601
1616
|
}
|
|
1602
|
-
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) &&
|
|
1603
|
-
if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) &&
|
|
1604
|
-
let [le,
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
const
|
|
1608
|
-
|
|
1617
|
+
if ([DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(te.dataType) && Y)
|
|
1618
|
+
if (te.dateType && DATE_RANGE_TYPES.includes(te.dateType) && Y && Y.length === 2) {
|
|
1619
|
+
let [le, pe] = Y;
|
|
1620
|
+
const ge = DATE_RANGE_PERIOD_UNIT[te.dateType];
|
|
1621
|
+
if (ge) {
|
|
1622
|
+
const de = dayjs(le), ye = dayjs(pe);
|
|
1623
|
+
de.isValid() && (le = de.startOf(ge).format(a)), ye.isValid() && (pe = ye.endOf(ge).format(a));
|
|
1609
1624
|
}
|
|
1610
|
-
|
|
1611
|
-
let
|
|
1612
|
-
|
|
1613
|
-
name:
|
|
1614
|
-
value:
|
|
1625
|
+
G[ne].value = le;
|
|
1626
|
+
let me = `end_${te.columnName}`;
|
|
1627
|
+
G.some((de) => de.name === me) || G.push({
|
|
1628
|
+
name: me,
|
|
1629
|
+
value: pe,
|
|
1615
1630
|
type: ee,
|
|
1616
|
-
isNull:
|
|
1631
|
+
isNull: J
|
|
1617
1632
|
});
|
|
1618
1633
|
} else {
|
|
1619
|
-
let le = dayjs(
|
|
1634
|
+
let le = dayjs(Y);
|
|
1620
1635
|
if (le.isValid() && te.dateType) {
|
|
1621
|
-
let
|
|
1622
|
-
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
name:
|
|
1626
|
-
value:
|
|
1636
|
+
let pe = le.startOf(te.dateType).format(a);
|
|
1637
|
+
G[ne].value = ue(pe, te.startTime, a);
|
|
1638
|
+
let ge = le.endOf(te.dateType).format(a), me = `end_${te.columnName}`;
|
|
1639
|
+
G.some((de) => de.name === me) || G.push({
|
|
1640
|
+
name: me,
|
|
1641
|
+
value: ue(ge, te.endTime, a),
|
|
1627
1642
|
type: ee,
|
|
1628
|
-
isNull:
|
|
1643
|
+
isNull: J
|
|
1629
1644
|
});
|
|
1630
1645
|
}
|
|
1631
1646
|
}
|
|
1632
|
-
else Array.isArray(
|
|
1633
|
-
}), o("change",
|
|
1647
|
+
else Array.isArray(Y) && (G[ne].value = Y.join(","));
|
|
1648
|
+
}), o("change", G);
|
|
1634
1649
|
}
|
|
1635
1650
|
return e({
|
|
1636
|
-
changeValue:
|
|
1651
|
+
changeValue: fe
|
|
1637
1652
|
}), onMounted(() => {
|
|
1638
|
-
}), (
|
|
1653
|
+
}), (G, q) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
1639
1654
|
createVNode(unref(ElForm), { inline: "" }, {
|
|
1640
1655
|
default: withCtx(() => [
|
|
1641
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(F.value, (
|
|
1656
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(F.value, (Y) => withDirectives((openBlock(), createBlock(unref(ElFormItem), mergeProps({ ref_for: !0 }, K(Y)), {
|
|
1642
1657
|
default: withCtx(() => [
|
|
1643
|
-
|
|
1658
|
+
Y.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(Y.formItemType), mergeProps({
|
|
1644
1659
|
key: 0,
|
|
1645
1660
|
ref_for: !0
|
|
1646
|
-
}, Y
|
|
1647
|
-
style: { width: `${
|
|
1661
|
+
}, Q(Y), {
|
|
1662
|
+
style: { width: `${Y.elWidth}px` }
|
|
1648
1663
|
}), {
|
|
1649
1664
|
default: withCtx(() => [
|
|
1650
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1665
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(Y.optionData, (ee) => (openBlock(), createBlock(unref(ElOption), {
|
|
1651
1666
|
key: ee.value,
|
|
1652
1667
|
label: ee.label,
|
|
1653
1668
|
value: ee.value
|
|
1654
1669
|
}, null, 8, ["label", "value"]))), 128))
|
|
1655
1670
|
]),
|
|
1656
1671
|
_: 2
|
|
1657
|
-
}, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
1672
|
+
}, 1040, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(Y.formItemType), mergeProps({
|
|
1658
1673
|
key: 1,
|
|
1659
|
-
style: { width: `${
|
|
1660
|
-
}, { ref_for: !0 }, Y
|
|
1674
|
+
style: { width: `${Y.elWidth}px` }
|
|
1675
|
+
}, { ref_for: !0 }, Q(Y)), null, 16, ["style"]))
|
|
1661
1676
|
]),
|
|
1662
1677
|
_: 2
|
|
1663
1678
|
}, 1040)), [
|
|
1664
|
-
[vShow,
|
|
1679
|
+
[vShow, Y.isShow]
|
|
1665
1680
|
])), 256))
|
|
1666
1681
|
]),
|
|
1667
1682
|
_: 1
|
|
1668
1683
|
}),
|
|
1669
|
-
renderSlot(
|
|
1684
|
+
renderSlot(G.$slots, "search")
|
|
1670
1685
|
]));
|
|
1671
1686
|
}
|
|
1672
1687
|
});
|
|
@@ -2977,29 +2992,29 @@ var divide = /* @__PURE__ */ function() {
|
|
|
2977
2992
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
2978
2993
|
}
|
|
2979
2994
|
return function(n, o, i, a, s, l) {
|
|
2980
|
-
var c, u, d, f, p, m, g, _, v, C, y, E, w, b, $, D,
|
|
2981
|
-
if (!
|
|
2995
|
+
var c, u, d, f, p, m, g, _, v, C, y, E, w, b, $, D, T, S, I, L, k = n.constructor, N = n.s == o.s ? 1 : -1, O = n.d, x = o.d;
|
|
2996
|
+
if (!O || !O[0] || !x || !x[0])
|
|
2982
2997
|
return new k(
|
|
2983
2998
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
2984
|
-
!n.s || !o.s || (
|
|
2999
|
+
!n.s || !o.s || (O ? x && O[0] == x[0] : !x) ? NaN : (
|
|
2985
3000
|
// Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
|
|
2986
|
-
|
|
3001
|
+
O && O[0] == 0 || !x ? N * 0 : N / 0
|
|
2987
3002
|
)
|
|
2988
3003
|
);
|
|
2989
|
-
for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), I = x.length,
|
|
2990
|
-
if (x[d] > (
|
|
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 k(N), C = v.d = [], d = 0; x[d] == (O[d] || 0); d++) ;
|
|
3005
|
+
if (x[d] > (O[d] || 0) && u--, i == null ? (b = i = k.precision, a = k.rounding) : s ? b = i + (n.e - o.e) + 1 : b = i, b < 0)
|
|
2991
3006
|
C.push(1), m = !0;
|
|
2992
3007
|
else {
|
|
2993
3008
|
if (b = b / p + 2 | 0, d = 0, I == 1) {
|
|
2994
|
-
for (f = 0, x = x[0], b++; (d <
|
|
2995
|
-
$ = f * l + (
|
|
2996
|
-
m = f || d <
|
|
3009
|
+
for (f = 0, x = x[0], b++; (d < T || f) && b--; d++)
|
|
3010
|
+
$ = f * l + (O[d] || 0), C[d] = $ / x | 0, f = $ % x | 0;
|
|
3011
|
+
m = f || d < T;
|
|
2997
3012
|
} else {
|
|
2998
|
-
for (f = l / (x[0] + 1) | 0, f > 1 && (x = t(x, f, l),
|
|
3013
|
+
for (f = l / (x[0] + 1) | 0, f > 1 && (x = t(x, f, l), O = t(O, f, l), I = x.length, T = O.length), D = I, y = O.slice(0, I), E = y.length; E < I; ) y[E++] = 0;
|
|
2999
3014
|
L = x.slice(), L.unshift(0), S = x[0], x[1] >= l / 2 && ++S;
|
|
3000
3015
|
do
|
|
3001
|
-
f = 0, c = e(x, y, I, E), c < 0 ? (w = y[0], I != E && (w = w * l + (y[1] || 0)), f = w / S | 0, f > 1 ? (f >= l && (f = l - 1), g = t(x, f, l), _ = g.length, E = y.length, c = e(g, y, _, E), c == 1 && (f--, r(g, I < _ ? L : x, _, l))) : (f == 0 && (c = f = 1), g = x.slice()), _ = g.length, _ < E && g.unshift(0), r(y, g, E, l), c == -1 && (E = y.length, c = e(x, y, I, E), c < 1 && (f++, r(y, I < E ? L : x, E, l))), E = y.length) : c === 0 && (f++, y = [0]), C[d++] = f, c && y[0] ? y[E++] =
|
|
3002
|
-
while ((D++ <
|
|
3016
|
+
f = 0, c = e(x, y, I, E), c < 0 ? (w = y[0], I != E && (w = w * l + (y[1] || 0)), f = w / S | 0, f > 1 ? (f >= l && (f = l - 1), g = t(x, f, l), _ = g.length, E = y.length, c = e(g, y, _, E), c == 1 && (f--, r(g, I < _ ? L : x, _, l))) : (f == 0 && (c = f = 1), g = x.slice()), _ = g.length, _ < E && g.unshift(0), r(y, g, E, l), c == -1 && (E = y.length, c = e(x, y, I, E), c < 1 && (f++, r(y, I < E ? L : x, E, l))), E = y.length) : c === 0 && (f++, y = [0]), C[d++] = f, c && y[0] ? y[E++] = O[D] || 0 : (y = [O[D]], E = 1);
|
|
3017
|
+
while ((D++ < T || y[0] !== void 0) && b--);
|
|
3003
3018
|
m = y[0] !== void 0;
|
|
3004
3019
|
}
|
|
3005
3020
|
C[0] || C.shift();
|
|
@@ -7372,8 +7387,8 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7372
7387
|
let w = ["start"];
|
|
7373
7388
|
for (let b = 0; b < v.length; b++) {
|
|
7374
7389
|
const $ = v[b], D = [];
|
|
7375
|
-
for (let
|
|
7376
|
-
const S = $[
|
|
7390
|
+
for (let T = 0; T < $.length; T++) {
|
|
7391
|
+
const S = $[T], I = "" + b + T;
|
|
7377
7392
|
D.push(I), y[I] = { node: S, lastCount: 0 }, E[I] = {};
|
|
7378
7393
|
for (let L = 0; L < w.length; L++) {
|
|
7379
7394
|
const k = w[L];
|
|
@@ -7409,8 +7424,8 @@ var dijkstraExports = dijkstra.exports;
|
|
|
7409
7424
|
}, []);
|
|
7410
7425
|
}, t.fromString = function(C, y) {
|
|
7411
7426
|
const E = d(C, s.isKanjiModeEnabled()), w = m(E), b = g(w, y), $ = l.find_path(b.map, "start", "end"), D = [];
|
|
7412
|
-
for (let
|
|
7413
|
-
D.push(b.table[$[
|
|
7427
|
+
for (let T = 1; T < $.length - 1; T++)
|
|
7428
|
+
D.push(b.table[$[T]].node);
|
|
7414
7429
|
return t.fromArray(p(D));
|
|
7415
7430
|
}, t.rawSplit = function(C) {
|
|
7416
7431
|
return t.fromArray(
|
|
@@ -8024,8 +8039,8 @@ function renderReportByDom(t, e, r, n, o, i) {
|
|
|
8024
8039
|
const $ = f.length;
|
|
8025
8040
|
f.push(b), p.push(w.rowSpan);
|
|
8026
8041
|
for (let D = 1; D < w.rowSpan; D++) {
|
|
8027
|
-
const
|
|
8028
|
-
m.has(
|
|
8042
|
+
const T = g + D;
|
|
8043
|
+
m.has(T) || m.set(T, []), m.get(T).push($);
|
|
8029
8044
|
}
|
|
8030
8045
|
}
|
|
8031
8046
|
}
|
|
@@ -8631,16 +8646,16 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8631
8646
|
const E = getSeparatorKey("key", y);
|
|
8632
8647
|
Array.from(l[E]).forEach((b) => {
|
|
8633
8648
|
const $ = getSeparatorKey("child", y, b);
|
|
8634
|
-
let
|
|
8649
|
+
let T = (l[$] || []).map((S) => {
|
|
8635
8650
|
if (C) {
|
|
8636
8651
|
let I = S[C];
|
|
8637
8652
|
I || (I = "-");
|
|
8638
8653
|
let L = !1;
|
|
8639
|
-
const k = getSeparatorKey("child", m, b, I), N = getSeparatorKey(b, I),
|
|
8640
|
-
return l[k] ? l[k].push(S) : l[k] = [S], l[
|
|
8654
|
+
const k = getSeparatorKey("child", m, b, I), N = getSeparatorKey(b, I), O = getSeparatorKey("data", N);
|
|
8655
|
+
return l[k] ? l[k].push(S) : l[k] = [S], l[O] ? l[O].push(S) : l[O] = [S], l[_].has(N) || (L = !0), l[_].add(N), l[N] = l[b].concat([I]), L ? I : null;
|
|
8641
8656
|
}
|
|
8642
8657
|
}).filter((S) => !!S);
|
|
8643
|
-
l[$] =
|
|
8658
|
+
l[$] = T;
|
|
8644
8659
|
});
|
|
8645
8660
|
}
|
|
8646
8661
|
});
|
|
@@ -8681,17 +8696,17 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8681
8696
|
if (s.includes(m)) {
|
|
8682
8697
|
const y = getSeparatorKey("key", g.row);
|
|
8683
8698
|
Array.from(l[y]).forEach((w, b) => {
|
|
8684
|
-
const $ = p && m === d ? 1 : getGroupMinChildrenLength(l, w, d, p, s), D = l[w],
|
|
8699
|
+
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];
|
|
8685
8700
|
let L = {
|
|
8686
8701
|
...g,
|
|
8687
|
-
text:
|
|
8702
|
+
text: T,
|
|
8688
8703
|
colSpan: $,
|
|
8689
8704
|
colData: I
|
|
8690
8705
|
};
|
|
8691
8706
|
if (C.push(L), $ > 1) {
|
|
8692
8707
|
let k = {
|
|
8693
8708
|
...g,
|
|
8694
|
-
text:
|
|
8709
|
+
text: T,
|
|
8695
8710
|
type: "",
|
|
8696
8711
|
colSpan: 0,
|
|
8697
8712
|
rowSpan: 0
|
|
@@ -8722,20 +8737,20 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8722
8737
|
let E = l[y] ? Array.from(l[y]) : [], w = g.data.replace("col:", "").toUpperCase();
|
|
8723
8738
|
if (g.isRowColCombine) {
|
|
8724
8739
|
let b = s.map((D) => a[D].data.replace("col:", "").toUpperCase()), $ = [];
|
|
8725
|
-
E.forEach((D,
|
|
8740
|
+
E.forEach((D, T) => {
|
|
8726
8741
|
let S = {
|
|
8727
8742
|
...g,
|
|
8728
8743
|
combineKeys: b,
|
|
8729
8744
|
combineValues: l[D],
|
|
8730
|
-
colGroupIndex:
|
|
8745
|
+
colGroupIndex: T
|
|
8731
8746
|
};
|
|
8732
8747
|
$.push(S);
|
|
8733
8748
|
}), v.splice(g.col, 1, ...$);
|
|
8734
8749
|
} else if (E.length)
|
|
8735
8750
|
E.forEach((b, $) => {
|
|
8736
8751
|
let D = [];
|
|
8737
|
-
const
|
|
8738
|
-
l[
|
|
8752
|
+
const T = getSeparatorKey("data", b);
|
|
8753
|
+
l[T].forEach((I) => {
|
|
8739
8754
|
let L = {
|
|
8740
8755
|
...g
|
|
8741
8756
|
};
|
|
@@ -8766,7 +8781,7 @@ function loopGroupCols(t, e, r, n) {
|
|
|
8766
8781
|
colData: i[0]
|
|
8767
8782
|
};
|
|
8768
8783
|
if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
|
|
8769
|
-
let [b, $] = g.mergeTarget, D = r.reduce((
|
|
8784
|
+
let [b, $] = g.mergeTarget, D = r.reduce((T, S) => T.concat(S), []).filter((T) => T.row === b && T.col === $)[0];
|
|
8770
8785
|
D && (D.colSpan += u - 1);
|
|
8771
8786
|
} else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
|
|
8772
8787
|
const E = {
|
|
@@ -8950,15 +8965,15 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
8950
8965
|
let E = Array.from(n[y]), w = f;
|
|
8951
8966
|
const b = e.indexOf(_.col);
|
|
8952
8967
|
E.forEach(($, D) => {
|
|
8953
|
-
let
|
|
8954
|
-
v === s && (i || a) ?
|
|
8968
|
+
let T;
|
|
8969
|
+
v === s && (i || a) ? T = 1 : T = getGroupMinChildrenLength(n, $, s, a, i);
|
|
8955
8970
|
const S = n[$], I = S[S.length - 1], L = getSeparatorKey("data", $);
|
|
8956
8971
|
n[L];
|
|
8957
8972
|
let k = {
|
|
8958
8973
|
..._,
|
|
8959
8974
|
text: "",
|
|
8960
8975
|
index: D,
|
|
8961
|
-
rowSpan:
|
|
8976
|
+
rowSpan: T,
|
|
8962
8977
|
rawData: formatGroupText(I),
|
|
8963
8978
|
groupLevel: b,
|
|
8964
8979
|
groupIndices: D,
|
|
@@ -8977,21 +8992,21 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
8977
8992
|
computedType: ComputedType.loopRow,
|
|
8978
8993
|
mergeTarget: [k.row, k.col]
|
|
8979
8994
|
};
|
|
8980
|
-
for (let
|
|
8995
|
+
for (let O = 0; O < T - 1; O++) {
|
|
8981
8996
|
let x = cloneDeep(N);
|
|
8982
|
-
x.index = w +
|
|
8997
|
+
x.index = w + O + 1, x.groupChildIndex = O + 1, C.push(x);
|
|
8983
8998
|
}
|
|
8984
|
-
if (g[v] = !0, w +=
|
|
8985
|
-
let
|
|
8999
|
+
if (g[v] = !0, w += T, k.loopGroupRowIndex !== void 0 && k.loopGroupRowIndex !== "" && !isNaN(k.loopGroupRowIndex)) {
|
|
9000
|
+
let O = cloneDeep(l[k.loopGroupRowIndex]), x = cloneDeep(c[k.loopGroupRowIndex]).map((R) => (R.type === CellType.FUN && R.fun && (R.groupIndices = D, R.groupLevel = b, R.computedType = ComputedType.loopGroup), R)), A = 0;
|
|
8986
9001
|
if (b >= 0) {
|
|
8987
9002
|
let R = b;
|
|
8988
9003
|
for (; R >= 0; ) {
|
|
8989
|
-
let F = e[R],
|
|
8990
|
-
|
|
9004
|
+
let F = e[R], V = u[F][w];
|
|
9005
|
+
V && V.groupIndices !== void 0 && !isNaN(V.groupIndices) && (A = A + V.groupIndices), R--;
|
|
8991
9006
|
}
|
|
8992
9007
|
}
|
|
8993
9008
|
d.set(`${D}:${b}:${w}`, {
|
|
8994
|
-
row:
|
|
9009
|
+
row: O,
|
|
8995
9010
|
cells: x,
|
|
8996
9011
|
removeCount: A
|
|
8997
9012
|
});
|
|
@@ -9004,14 +9019,14 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9004
9019
|
let w = n[E] ? Array.from(n[E]) : [];
|
|
9005
9020
|
w.length ? w.forEach((b, $) => {
|
|
9006
9021
|
const D = getSeparatorKey("child", s, b);
|
|
9007
|
-
let
|
|
9008
|
-
const
|
|
9022
|
+
let T = n[D], S = _.combineKeys ? _.combineKeys.map((k, N) => {
|
|
9023
|
+
const O = _.combineValues ? _.combineValues[N] : void 0;
|
|
9009
9024
|
return {
|
|
9010
9025
|
key: k,
|
|
9011
|
-
val:
|
|
9026
|
+
val: O
|
|
9012
9027
|
};
|
|
9013
9028
|
}) : [];
|
|
9014
|
-
const I =
|
|
9029
|
+
const I = T.filter((k) => S.every((N) => k[N.key] === N.val));
|
|
9015
9030
|
let L = {
|
|
9016
9031
|
..._,
|
|
9017
9032
|
index: $
|
|
@@ -9023,7 +9038,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9023
9038
|
L.rawData = "", L.rowData = {};
|
|
9024
9039
|
C.push(L);
|
|
9025
9040
|
}) : r.forEach((b, $) => {
|
|
9026
|
-
let
|
|
9041
|
+
let T = (_.combineKeys ? _.combineKeys.map((I, L) => {
|
|
9027
9042
|
const k = _.combineValues ? _.combineValues[L] : void 0;
|
|
9028
9043
|
return {
|
|
9029
9044
|
key: I,
|
|
@@ -9033,7 +9048,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9033
9048
|
..._,
|
|
9034
9049
|
index: $
|
|
9035
9050
|
};
|
|
9036
|
-
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine,
|
|
9051
|
+
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, T ? (S.rawData = y ? b[y] : "", S.rowData = b) : (S.rawData = "", S.rowData = b), S.type === CellType.FUN && S.fun && (S.computedType = ComputedType.loopRow), C.push(S);
|
|
9037
9052
|
});
|
|
9038
9053
|
} else if (e.length === 0)
|
|
9039
9054
|
r.forEach((E, w) => {
|
|
@@ -9048,23 +9063,23 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9048
9063
|
let w = n[E] ? Array.from(n[E]) : [];
|
|
9049
9064
|
if (w.length === 0) {
|
|
9050
9065
|
r.forEach(($, D) => {
|
|
9051
|
-
let
|
|
9066
|
+
let T = {
|
|
9052
9067
|
index: D,
|
|
9053
9068
|
..._
|
|
9054
9069
|
};
|
|
9055
|
-
delete
|
|
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, C.push(T);
|
|
9056
9071
|
});
|
|
9057
9072
|
return;
|
|
9058
9073
|
}
|
|
9059
9074
|
const b = [];
|
|
9060
9075
|
if (w.forEach(($, D) => {
|
|
9061
9076
|
if (a) {
|
|
9062
|
-
const
|
|
9063
|
-
let S = n[
|
|
9077
|
+
const T = getSeparatorKey("child", s, $);
|
|
9078
|
+
let S = n[T] || [];
|
|
9064
9079
|
b.push(S);
|
|
9065
9080
|
} else {
|
|
9066
|
-
const
|
|
9067
|
-
let S = n[
|
|
9081
|
+
const T = getSeparatorKey("child", s, $);
|
|
9082
|
+
let S = n[T] || [];
|
|
9068
9083
|
const I = i ? S.slice(0, 1) : S;
|
|
9069
9084
|
S.length > 0 ? I.forEach((L) => {
|
|
9070
9085
|
let k = {
|
|
@@ -9081,7 +9096,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9081
9096
|
});
|
|
9082
9097
|
}
|
|
9083
9098
|
}), a) {
|
|
9084
|
-
const $ = Math.max(...b.map((
|
|
9099
|
+
const $ = Math.max(...b.map((T) => T.length));
|
|
9085
9100
|
p || (p = {
|
|
9086
9101
|
count: $,
|
|
9087
9102
|
row: _.row,
|
|
@@ -9104,8 +9119,8 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9104
9119
|
index: 0
|
|
9105
9120
|
};
|
|
9106
9121
|
if (_.rowSpan === 0 && _.mergeTarget && _.mergeTarget.length === 2) {
|
|
9107
|
-
let [$, D] = _.mergeTarget,
|
|
9108
|
-
|
|
9122
|
+
let [$, D] = _.mergeTarget, T = c.reduce((S, I) => S.concat(I), []).filter((S) => S.row === $ && S.col === D)[0];
|
|
9123
|
+
T && (T.rowSpan += o - 1);
|
|
9109
9124
|
} else
|
|
9110
9125
|
E.rowSpan += o - 1;
|
|
9111
9126
|
const w = {
|
|
@@ -9120,14 +9135,14 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9120
9135
|
} else if ((i || a) && e.length > 0) {
|
|
9121
9136
|
const E = getSeparatorKey("key", s);
|
|
9122
9137
|
(n[E] ? Array.from(n[E]) : []).forEach((b, $) => {
|
|
9123
|
-
const D = getSeparatorKey("data", b),
|
|
9138
|
+
const D = getSeparatorKey("data", b), T = n[D];
|
|
9124
9139
|
C.push({
|
|
9125
9140
|
index: $,
|
|
9126
9141
|
..._,
|
|
9127
9142
|
computedType: ComputedType.loopRow,
|
|
9128
9143
|
rowSpan: 1,
|
|
9129
9144
|
colSpan: 1,
|
|
9130
|
-
rowData:
|
|
9145
|
+
rowData: T ? T[0] : void 0
|
|
9131
9146
|
});
|
|
9132
9147
|
});
|
|
9133
9148
|
} else if (e.length > 0)
|
|
@@ -9155,12 +9170,12 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
|
|
|
9155
9170
|
for (let w = 0; w < v; w++) {
|
|
9156
9171
|
const b = [];
|
|
9157
9172
|
y.forEach(($, D) => {
|
|
9158
|
-
const
|
|
9173
|
+
const T = $[w];
|
|
9159
9174
|
let S = {
|
|
9160
9175
|
index: D,
|
|
9161
9176
|
...C
|
|
9162
9177
|
};
|
|
9163
|
-
delete S.combineKeys, delete S.combineValues, delete S.isRowColCombine, E &&
|
|
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, b.push(S);
|
|
9164
9179
|
}), w === 0 ? u[_] = b : u.splice(_ + w, 0, b);
|
|
9165
9180
|
}
|
|
9166
9181
|
}), {
|
|
@@ -9185,56 +9200,56 @@ function loopGroupRows(t, e, r, n, o) {
|
|
|
9185
9200
|
let b = transpose(y);
|
|
9186
9201
|
if (b.forEach(() => {
|
|
9187
9202
|
C.push(cloneDeep(v));
|
|
9188
|
-
}), E.forEach(({ row: $, cells: D, removeCount:
|
|
9203
|
+
}), E.forEach(({ row: $, cells: D, removeCount: T }, S) => {
|
|
9189
9204
|
let [I, L, k] = S.split(":").map((A) => parseInt(A));
|
|
9190
9205
|
$.isLoopGroupComputed = !1;
|
|
9191
|
-
const N = k +
|
|
9192
|
-
let
|
|
9206
|
+
const N = k + T;
|
|
9207
|
+
let O = b[N];
|
|
9193
9208
|
D = D.map((A, R) => {
|
|
9194
|
-
let F =
|
|
9209
|
+
let F = O[R];
|
|
9195
9210
|
if (R < L) {
|
|
9196
|
-
let
|
|
9211
|
+
let j = [];
|
|
9197
9212
|
b.forEach((M, B) => {
|
|
9198
9213
|
B <= N && M.forEach((U, H) => {
|
|
9199
|
-
H === R && U.rowSpan >= 1 && ["", "field"].includes(U.type) &&
|
|
9214
|
+
H === R && U.rowSpan >= 1 && ["", "field"].includes(U.type) && j.push(B);
|
|
9200
9215
|
});
|
|
9201
9216
|
});
|
|
9202
|
-
let
|
|
9217
|
+
let V = Math.max(...j), W = b[V][R];
|
|
9203
9218
|
W && (W.rowSpan += 1, A.mergeTarget = [W.row, W.col]), A.rowSpan = 0, A.colSpan = 0;
|
|
9204
9219
|
} else if (F && F.type === CellType.TEXT) {
|
|
9205
|
-
let
|
|
9206
|
-
|
|
9220
|
+
let j = b[0][R];
|
|
9221
|
+
j.rowSpan += 1, A.rowSpan = 0, A.colSpan = 0, A.mergeTarget = [j.row, j.col];
|
|
9207
9222
|
}
|
|
9208
9223
|
return A.type === CellType.FUN && A.fun && (A.computedType = ComputedType.loopGroup), A.isGroup = F ? !!F.isGroup : !1, A.groupIndices = F ? F.groupIndices : !1, A.linkedMergeCell = F ? !!F.linkedMergeCell : !1, A.linkedColIndex = F ? F.linkedColIndex : { rowSpan: 1, colSpan: 1 }, A.isLoopGroupComputedCell = !0, A;
|
|
9209
9224
|
});
|
|
9210
9225
|
const x = N + 1;
|
|
9211
9226
|
C.splice(x, 0, $), b.splice(x, 0, D);
|
|
9212
9227
|
}), b = mergeSameCells(b), b.forEach(($, D) => {
|
|
9213
|
-
let
|
|
9228
|
+
let T = [];
|
|
9214
9229
|
$.forEach((S) => {
|
|
9215
|
-
S && S.groupIndices !== void 0 && !isNaN(S.groupIndices) &&
|
|
9216
|
-
}),
|
|
9217
|
-
S && (S.groupIndices =
|
|
9230
|
+
S && S.groupIndices !== void 0 && !isNaN(S.groupIndices) && T.push(S.groupIndices);
|
|
9231
|
+
}), T.length > 0 && $.forEach((S) => {
|
|
9232
|
+
S && (S.groupIndices = T);
|
|
9218
9233
|
});
|
|
9219
9234
|
}), t.splice(c, 1, ...C), r.splice(c, 1, ...b), w) {
|
|
9220
|
-
const { index: $, count: D } = w,
|
|
9235
|
+
const { index: $, count: D } = w, T = n[$], S = [];
|
|
9221
9236
|
for (let L = 0; L < D; L++)
|
|
9222
|
-
S.push(cloneDeep(
|
|
9237
|
+
S.push(cloneDeep(T));
|
|
9223
9238
|
n.splice($, 1, ...S);
|
|
9224
9239
|
for (let L = 0; L < c; L++) {
|
|
9225
9240
|
const k = r[L], N = [];
|
|
9226
|
-
for (let
|
|
9241
|
+
for (let O = 0; O < D; O++) {
|
|
9227
9242
|
const x = cloneDeep(k[$]);
|
|
9228
|
-
|
|
9243
|
+
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
|
|
9229
9244
|
}
|
|
9230
9245
|
k.splice($, k.length - $, ...N);
|
|
9231
9246
|
}
|
|
9232
9247
|
const I = c + b.length;
|
|
9233
9248
|
for (let L = I; L < r.length; L++) {
|
|
9234
9249
|
const k = r[L], N = [];
|
|
9235
|
-
for (let
|
|
9250
|
+
for (let O = 0; O < D; O++) {
|
|
9236
9251
|
const x = cloneDeep(k[$]);
|
|
9237
|
-
|
|
9252
|
+
O === 0 ? x.colSpan = D : (x.colSpan = 0, x.mergeTarget = [x.row, $]), N.push(x);
|
|
9238
9253
|
}
|
|
9239
9254
|
k.splice($, k.length - $, ...N);
|
|
9240
9255
|
}
|
|
@@ -9566,14 +9581,14 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9566
9581
|
const b = a.getRow(l + v + 1);
|
|
9567
9582
|
C && C.size && !isNaN(C.size) ? C.size > 0 ? b.height = C.size < 25 ? 25 : C.size : b.hidden = !0 : b.height = 25;
|
|
9568
9583
|
for (let $ = 0; $ < E.length; $++) {
|
|
9569
|
-
const D = E[$],
|
|
9570
|
-
let { style: S, col: I, row: L, colSpan: k, rowSpan: N, format:
|
|
9584
|
+
const D = E[$], T = b.getCell($ + 1);
|
|
9585
|
+
let { style: S, col: I, row: L, colSpan: k, rowSpan: N, format: O, formatType: x } = D;
|
|
9571
9586
|
const A = {};
|
|
9572
9587
|
if (S && S.color && (A.color = {
|
|
9573
9588
|
argb: "FF" + ((g = S.color) == null ? void 0 : g.replace("#", ""))
|
|
9574
|
-
}), S && S.fontSize && (A.size = S.fontSize), S && S.fontFamily && (A.name = S.fontFamily), S && S.fontWeight && S.fontWeight === "bold" && (A.bold = !0),
|
|
9575
|
-
const
|
|
9576
|
-
if (
|
|
9589
|
+
}), 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 V = normalizeBorder(S.border);
|
|
9591
|
+
if (V) {
|
|
9577
9592
|
const W = themeColors[r] || "#333333", M = (B) => {
|
|
9578
9593
|
if (!(!B || !B.style || B.style === "none"))
|
|
9579
9594
|
return {
|
|
@@ -9581,21 +9596,21 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9581
9596
|
color: { argb: "FF" + (B.color || W).replace("#", "") }
|
|
9582
9597
|
};
|
|
9583
9598
|
};
|
|
9584
|
-
|
|
9585
|
-
top: M(
|
|
9586
|
-
left: M(
|
|
9587
|
-
bottom: M(
|
|
9588
|
-
right: M(
|
|
9599
|
+
T.border = {
|
|
9600
|
+
top: M(V.top),
|
|
9601
|
+
left: M(V.left),
|
|
9602
|
+
bottom: M(V.bottom),
|
|
9603
|
+
right: M(V.right)
|
|
9589
9604
|
};
|
|
9590
9605
|
}
|
|
9591
|
-
} else (!S || S.border !== !1) && (
|
|
9606
|
+
} else (!S || S.border !== !1) && (T.border = {
|
|
9592
9607
|
top: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9593
9608
|
left: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9594
9609
|
bottom: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } },
|
|
9595
9610
|
right: { style: "thin", color: { argb: "FF" + themeColors[r].replace("#", "") } }
|
|
9596
9611
|
});
|
|
9597
9612
|
if (S && S.backgroundColor)
|
|
9598
|
-
|
|
9613
|
+
T.fill = {
|
|
9599
9614
|
type: "pattern",
|
|
9600
9615
|
pattern: "solid",
|
|
9601
9616
|
fgColor: {
|
|
@@ -9603,12 +9618,12 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9603
9618
|
}
|
|
9604
9619
|
};
|
|
9605
9620
|
else {
|
|
9606
|
-
const
|
|
9607
|
-
|
|
9621
|
+
const V = `${r}${v % 2}`;
|
|
9622
|
+
T.fill = {
|
|
9608
9623
|
type: "pattern",
|
|
9609
9624
|
pattern: "solid",
|
|
9610
9625
|
fgColor: {
|
|
9611
|
-
argb: "FF" + themeColors[
|
|
9626
|
+
argb: "FF" + themeColors[V].replace("#", "")
|
|
9612
9627
|
}
|
|
9613
9628
|
};
|
|
9614
9629
|
}
|
|
@@ -9617,16 +9632,16 @@ const exportExcel = async (t, e, r = "gray", n = 0) => {
|
|
|
9617
9632
|
horizontal: "center",
|
|
9618
9633
|
wrapText: !0
|
|
9619
9634
|
};
|
|
9620
|
-
S && S.textAlign && (R.horizontal = S.textAlign), S && S.verticalAlign && (R.vertical = S.verticalAlign === "center" ? "middle" : S.verticalAlign),
|
|
9621
|
-
const F = N && !isNaN(N) && N > 1,
|
|
9622
|
-
if (F ||
|
|
9623
|
-
const
|
|
9624
|
-
let M =
|
|
9625
|
-
|
|
9635
|
+
S && S.textAlign && (R.horizontal = S.textAlign), S && S.verticalAlign && (R.vertical = S.verticalAlign === "center" ? "middle" : S.verticalAlign), T.alignment = R;
|
|
9636
|
+
const F = N && !isNaN(N) && N > 1, j = k && !isNaN(k) && k > 1;
|
|
9637
|
+
if (F || j) {
|
|
9638
|
+
const V = l + v + 1, W = $ + 1;
|
|
9639
|
+
let M = V, B = W;
|
|
9640
|
+
V && (M += N - 1), W && (B += k - 1), s.push([V, W, M, B]);
|
|
9626
9641
|
}
|
|
9627
|
-
if (
|
|
9628
|
-
let
|
|
9629
|
-
x && (x.numberUseGrouping && (
|
|
9642
|
+
if (O && O === "number") {
|
|
9643
|
+
let V = "", W = "";
|
|
9644
|
+
x && (x.numberUseGrouping && (V = x.numberUseGrouping), x.numberDecimal && (W = x.numberDecimal)), T.numFmt = generateNumFmt(V, W), T.value = Number(D.text);
|
|
9630
9645
|
}
|
|
9631
9646
|
}
|
|
9632
9647
|
}
|
|
@@ -9761,11 +9776,11 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9761
9776
|
}), C = ref([]), y = ref([]), E = (M) => {
|
|
9762
9777
|
let B = 0, U = M;
|
|
9763
9778
|
if (M.includes("!")) {
|
|
9764
|
-
let
|
|
9765
|
-
B = parseInt(
|
|
9779
|
+
let K = M.split("!");
|
|
9780
|
+
B = parseInt(K[0]), U = K[1];
|
|
9766
9781
|
}
|
|
9767
|
-
let H = U.match(/[A-Z]+/)[0], z = U.match(/\d+/)[0] - 1,
|
|
9768
|
-
y.value.includes(
|
|
9782
|
+
let H = U.match(/[A-Z]+/)[0], z = U.match(/\d+/)[0] - 1, X = columnToNumber(H), Z = `${B}:${z}:${X}`;
|
|
9783
|
+
y.value.includes(Z) || y.value.push(Z);
|
|
9769
9784
|
};
|
|
9770
9785
|
function w(M) {
|
|
9771
9786
|
if ($ && n.config.data.autoQuery === !1)
|
|
@@ -9777,7 +9792,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9777
9792
|
() => [v.pageSize, v.pageIndex],
|
|
9778
9793
|
(M, B) => {
|
|
9779
9794
|
if (M && B) {
|
|
9780
|
-
let [U, H] = M, [z,
|
|
9795
|
+
let [U, H] = M, [z, X] = M;
|
|
9781
9796
|
U !== z && (v.pageIndex = 1), b && F();
|
|
9782
9797
|
}
|
|
9783
9798
|
},
|
|
@@ -9790,7 +9805,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9790
9805
|
var M;
|
|
9791
9806
|
(M = s.value) == null || M.changeValue();
|
|
9792
9807
|
}
|
|
9793
|
-
const
|
|
9808
|
+
const T = computed(() => n.config.exportMethod === "send" && window.opener), S = computed(() => T.value ? "保存" : "导出");
|
|
9794
9809
|
async function I() {
|
|
9795
9810
|
if (u.value && u.value.length) {
|
|
9796
9811
|
let M = await exportReport(
|
|
@@ -9812,7 +9827,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9812
9827
|
if (n.config && c.value && n.config.data.source) {
|
|
9813
9828
|
let M = [];
|
|
9814
9829
|
try {
|
|
9815
|
-
M = await
|
|
9830
|
+
M = await V(!0);
|
|
9816
9831
|
} catch (z) {
|
|
9817
9832
|
o("report-error", {
|
|
9818
9833
|
index: n.index,
|
|
@@ -9820,7 +9835,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9820
9835
|
});
|
|
9821
9836
|
return;
|
|
9822
9837
|
}
|
|
9823
|
-
let B =
|
|
9838
|
+
let B = j(M);
|
|
9824
9839
|
n.config.data.processData && (B = await getProcessData(
|
|
9825
9840
|
n.config.data.processData,
|
|
9826
9841
|
B,
|
|
@@ -9830,14 +9845,14 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9830
9845
|
let U = [];
|
|
9831
9846
|
const H = [];
|
|
9832
9847
|
for (let z = 0; z < n.config.tableConfig.length; z++) {
|
|
9833
|
-
const
|
|
9834
|
-
let { rowConfig:
|
|
9835
|
-
re.length && loopGroupCols(
|
|
9848
|
+
const X = n.config.tableConfig[z];
|
|
9849
|
+
let { rowConfig: Z, colConfig: K, config: Q } = cloneDeep(X), re = getLoopItem(K, B, "col", Q), oe = getLoopItem(Z, B, "row", Q);
|
|
9850
|
+
re.length && loopGroupCols(K, re, Q, B), oe.length && loopGroupRows(Z, oe, Q, K, B);
|
|
9836
9851
|
const ue = transformArrayToObject(B, n.config.data.source);
|
|
9837
9852
|
computeCell(Q, ue, void 0, z), U.push({
|
|
9838
9853
|
config: Q,
|
|
9839
|
-
rowConfig:
|
|
9840
|
-
colConfig:
|
|
9854
|
+
rowConfig: Z,
|
|
9855
|
+
colConfig: K
|
|
9841
9856
|
}), H.push({ config: Q });
|
|
9842
9857
|
}
|
|
9843
9858
|
if (await preGenerateBarcodes(H), U && U.length) {
|
|
@@ -9859,12 +9874,12 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9859
9874
|
ElMessage.warning("当前报表没有可导出的数据");
|
|
9860
9875
|
}
|
|
9861
9876
|
const k = ref(!1), N = ref(!1);
|
|
9862
|
-
async function
|
|
9863
|
-
let U = !1, { rowConfig: H, colConfig: z, config:
|
|
9864
|
-
|
|
9877
|
+
async function O(M, B) {
|
|
9878
|
+
let U = !1, { rowConfig: H, colConfig: z, config: X } = cloneDeep(M), Z = getLoopItem(z, B, "col", X), K = getLoopItem(H, B, "row", X);
|
|
9879
|
+
Z.length && (U = !0, loopGroupCols(z, Z, X, B)), K.length && (U = !0, loopGroupRows(H, K, X, z, B));
|
|
9865
9880
|
const Q = transformArrayToObject(B, n.config.data.source);
|
|
9866
|
-
return computeCell(
|
|
9867
|
-
reportConfig: { config:
|
|
9881
|
+
return computeCell(X, Q, y.value), await preGenerateBarcodes([{ config: X }]), {
|
|
9882
|
+
reportConfig: { config: X, rowConfig: H, colConfig: z },
|
|
9868
9883
|
hasLoop: U
|
|
9869
9884
|
};
|
|
9870
9885
|
}
|
|
@@ -9873,19 +9888,19 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9873
9888
|
if (!(!Array.isArray(U) || U.length === 0)) {
|
|
9874
9889
|
d.value = [], l.value.innerHTML = "";
|
|
9875
9890
|
for (const H of U) {
|
|
9876
|
-
const z = { ...M, ...H, [B]: [H] },
|
|
9877
|
-
for (const
|
|
9878
|
-
const { reportConfig:
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9891
|
+
const z = { ...M, ...H, [B]: [H] }, X = [];
|
|
9892
|
+
for (const Z of n.config.tableConfig) {
|
|
9893
|
+
const { reportConfig: K, hasLoop: Q } = await O(Z, z);
|
|
9894
|
+
X.push(K), renderReportByDom(
|
|
9895
|
+
K.rowConfig,
|
|
9896
|
+
K.colConfig,
|
|
9897
|
+
K.config,
|
|
9883
9898
|
l,
|
|
9884
9899
|
Q,
|
|
9885
9900
|
p.value.border
|
|
9886
9901
|
);
|
|
9887
9902
|
}
|
|
9888
|
-
d.value.push(
|
|
9903
|
+
d.value.push(X);
|
|
9889
9904
|
}
|
|
9890
9905
|
}
|
|
9891
9906
|
}
|
|
@@ -9896,13 +9911,13 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9896
9911
|
const B = [];
|
|
9897
9912
|
for (let U = 0; U < n.config.tableConfig.length; U++) {
|
|
9898
9913
|
const H = n.config.tableConfig[U];
|
|
9899
|
-
let z = !1, { rowConfig:
|
|
9900
|
-
Q.length && (z = !0, loopGroupCols(
|
|
9901
|
-
const
|
|
9902
|
-
computeCell(
|
|
9903
|
-
config:
|
|
9904
|
-
rowConfig:
|
|
9905
|
-
colConfig:
|
|
9914
|
+
let z = !1, { rowConfig: X, colConfig: Z, config: K } = cloneDeep(H), Q = getLoopItem(Z, M, "col", K), re = getLoopItem(X, M, "row", K);
|
|
9915
|
+
Q.length && (z = !0, loopGroupCols(Z, Q, K, M)), re.length && (z = !0, loopGroupRows(X, re, K, Z, M));
|
|
9916
|
+
const oe = transformArrayToObject(M, n.config.data.source);
|
|
9917
|
+
computeCell(K, oe, y.value, U), B.push({ config: K, rowConfig: X, colConfig: Z, hasLoop: z }), u.value.push({
|
|
9918
|
+
config: K,
|
|
9919
|
+
rowConfig: X,
|
|
9920
|
+
colConfig: Z
|
|
9906
9921
|
});
|
|
9907
9922
|
}
|
|
9908
9923
|
await preGenerateBarcodes(B), B.forEach((U) => {
|
|
@@ -9911,54 +9926,54 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9911
9926
|
const U = l.value.querySelectorAll(".yh-report-table-context");
|
|
9912
9927
|
let H = 0;
|
|
9913
9928
|
if (U.forEach((z) => {
|
|
9914
|
-
const
|
|
9915
|
-
if (
|
|
9916
|
-
const
|
|
9929
|
+
const X = z.querySelector("table");
|
|
9930
|
+
if (X) {
|
|
9931
|
+
const Z = X.querySelectorAll("colgroup col"), K = Array.from(Z).reduce(
|
|
9917
9932
|
(Q, re) => Q + parseInt(re.style.width || "80", 10),
|
|
9918
9933
|
0
|
|
9919
9934
|
);
|
|
9920
|
-
H = Math.max(H,
|
|
9935
|
+
H = Math.max(H, K);
|
|
9921
9936
|
}
|
|
9922
9937
|
}), H > 0) {
|
|
9923
9938
|
const z = l.value;
|
|
9924
|
-
let
|
|
9939
|
+
let X = 0;
|
|
9925
9940
|
if (z) {
|
|
9926
|
-
const
|
|
9927
|
-
|
|
9941
|
+
const Z = getComputedStyle(z);
|
|
9942
|
+
X = z.clientWidth - parseFloat(Z.paddingLeft || "0") - parseFloat(Z.paddingRight || "0");
|
|
9928
9943
|
}
|
|
9929
|
-
|
|
9930
|
-
const
|
|
9931
|
-
if (
|
|
9932
|
-
const Q =
|
|
9933
|
-
(
|
|
9944
|
+
X > 0 && (H = Math.max(H, X)), U.forEach((Z) => {
|
|
9945
|
+
const K = Z.querySelector("table");
|
|
9946
|
+
if (K) {
|
|
9947
|
+
const Q = K.querySelectorAll("colgroup col"), re = Array.from(Q).reduce(
|
|
9948
|
+
(oe, ue) => oe + parseInt(ue.style.width || "80", 10),
|
|
9934
9949
|
0
|
|
9935
9950
|
);
|
|
9936
9951
|
if (re > 0 && re < H) {
|
|
9937
|
-
const
|
|
9938
|
-
Q.forEach((
|
|
9939
|
-
const
|
|
9940
|
-
|
|
9952
|
+
const oe = H / re;
|
|
9953
|
+
Q.forEach((fe) => {
|
|
9954
|
+
const G = parseInt(fe.style.width || "80", 10);
|
|
9955
|
+
fe.style.width = `${Math.round(G * oe)}px`;
|
|
9941
9956
|
});
|
|
9942
9957
|
const ue = Array.from(Q).map(
|
|
9943
|
-
(
|
|
9958
|
+
(fe) => parseInt(fe.style.width || "80", 10)
|
|
9944
9959
|
);
|
|
9945
|
-
|
|
9946
|
-
let
|
|
9947
|
-
Array.from(
|
|
9948
|
-
|
|
9960
|
+
K.querySelectorAll("tr").forEach((fe) => {
|
|
9961
|
+
let G = 0, q = 0;
|
|
9962
|
+
Array.from(fe.children).forEach((Y) => {
|
|
9963
|
+
Y.classList.contains("fixed-td") && (Y.style.left = `${G - 1}px`), q < ue.length && (G += ue[q] - 1, q++);
|
|
9949
9964
|
});
|
|
9950
9965
|
});
|
|
9951
9966
|
}
|
|
9952
|
-
|
|
9967
|
+
K.style.width = `${H}px`, K.style.minWidth = `${H}px`;
|
|
9953
9968
|
}
|
|
9954
9969
|
});
|
|
9955
9970
|
}
|
|
9956
9971
|
});
|
|
9957
9972
|
} else {
|
|
9958
|
-
let B = !1, { rowConfig: U, colConfig: H, config: z } = cloneDeep(n.config),
|
|
9959
|
-
|
|
9960
|
-
const
|
|
9961
|
-
computeCell(z,
|
|
9973
|
+
let B = !1, { rowConfig: U, colConfig: H, config: z } = cloneDeep(n.config), X = getLoopItem(H, M, "col", z), Z = getLoopItem(U, M, "row", z);
|
|
9974
|
+
X.length && (B = !0, loopGroupCols(H, X, z, M)), Z.length && (B = !0, loopGroupRows(U, Z, z, H, M));
|
|
9975
|
+
const K = transformArrayToObject(M, n.config.data.source);
|
|
9976
|
+
computeCell(z, K, y.value), await preGenerateBarcodes([{ config: z }]), u.value.push({
|
|
9962
9977
|
config: z,
|
|
9963
9978
|
rowConfig: U,
|
|
9964
9979
|
colConfig: H
|
|
@@ -9981,14 +9996,14 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
9981
9996
|
if ($ = !1, i.value || R()) {
|
|
9982
9997
|
k.value = !0;
|
|
9983
9998
|
try {
|
|
9984
|
-
let U = await
|
|
9999
|
+
let U = await V(i.value), H = j(U);
|
|
9985
10000
|
n.config.data.processData && (H = await getProcessData(
|
|
9986
10001
|
n.config.data.processData,
|
|
9987
10002
|
H,
|
|
9988
10003
|
C.value,
|
|
9989
10004
|
v
|
|
9990
10005
|
));
|
|
9991
|
-
const z = (B = n.config.data.source) == null ? void 0 : B.find((
|
|
10006
|
+
const z = (B = n.config.data.source) == null ? void 0 : B.find((X) => X.loopTable);
|
|
9992
10007
|
z && z.key ? await x(H, z.key) : await A(H);
|
|
9993
10008
|
} catch (U) {
|
|
9994
10009
|
console.error("数据源请求失败:", U), o("report-error", {
|
|
@@ -10001,11 +10016,11 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10001
10016
|
} else
|
|
10002
10017
|
clearReportByDom(l);
|
|
10003
10018
|
}
|
|
10004
|
-
function
|
|
10019
|
+
function j(M) {
|
|
10005
10020
|
let B = {};
|
|
10006
10021
|
return Array.isArray(M) || (M = [M]), M.forEach(({ key: U, data: H }) => {
|
|
10007
10022
|
if (U !== "PARAM") {
|
|
10008
|
-
let z = H.filter((
|
|
10023
|
+
let z = H.filter((X) => X);
|
|
10009
10024
|
B[U] = z;
|
|
10010
10025
|
} else
|
|
10011
10026
|
B[U] = H;
|
|
@@ -10014,7 +10029,7 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10014
10029
|
data: B
|
|
10015
10030
|
}), B;
|
|
10016
10031
|
}
|
|
10017
|
-
async function
|
|
10032
|
+
async function V(M = !1) {
|
|
10018
10033
|
if (n.config.data.source) {
|
|
10019
10034
|
let B = {
|
|
10020
10035
|
id: n.id
|
|
@@ -10026,14 +10041,14 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10026
10041
|
);
|
|
10027
10042
|
m.value ? M ? (B.pageSize = v.total, B.pageNumber = 1) : (B.pageSize = v.pageSize, B.pageNumber = v.pageIndex) : (B.pageSize = v.pageSize, B.pageNumber = 1);
|
|
10028
10043
|
let H = [], z = {};
|
|
10029
|
-
C.value.forEach(({ name:
|
|
10030
|
-
|
|
10044
|
+
C.value.forEach(({ name: X, value: Z }) => {
|
|
10045
|
+
X && (z[X.toUpperCase()] = Z);
|
|
10031
10046
|
}), H.push({ key: "PARAM", data: z });
|
|
10032
|
-
for (let
|
|
10033
|
-
const { key:
|
|
10034
|
-
if (
|
|
10035
|
-
const Q = U.get(
|
|
10036
|
-
H.push({ key:
|
|
10047
|
+
for (let X = 0; X < n.config.data.source.length; X++) {
|
|
10048
|
+
const { key: Z, url: K } = n.config.data.source[X];
|
|
10049
|
+
if (K) {
|
|
10050
|
+
const Q = U.get(K.toUpperCase()), re = Q != null && Q.length ? { ...B, params: [...B.params || [], ...Q] } : B, oe = await getDateSourceData(K, re);
|
|
10051
|
+
H.push({ key: Z, data: oe.data }), m.value && (v.total = oe.count || oe.data.length);
|
|
10037
10052
|
}
|
|
10038
10053
|
}
|
|
10039
10054
|
return H;
|
|
@@ -10118,9 +10133,9 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10118
10133
|
m.value ? withDirectives((openBlock(), createBlock(H, {
|
|
10119
10134
|
key: 0,
|
|
10120
10135
|
pageSize: v.pageSize,
|
|
10121
|
-
"onUpdate:pageSize": B[0] || (B[0] = (
|
|
10136
|
+
"onUpdate:pageSize": B[0] || (B[0] = (X) => v.pageSize = X),
|
|
10122
10137
|
"current-page": v.pageIndex,
|
|
10123
|
-
"onUpdate:currentPage": B[1] || (B[1] = (
|
|
10138
|
+
"onUpdate:currentPage": B[1] || (B[1] = (X) => v.pageIndex = X),
|
|
10124
10139
|
"page-sizes": v.pageSizes,
|
|
10125
10140
|
total: v.total,
|
|
10126
10141
|
layout: "total, jumper, prev, pager, next, sizes"
|
|
@@ -10404,22 +10419,22 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10404
10419
|
notSingle: b,
|
|
10405
10420
|
keyIds: $,
|
|
10406
10421
|
dataIds: D,
|
|
10407
|
-
groupBy:
|
|
10422
|
+
groupBy: T,
|
|
10408
10423
|
orderBy: S,
|
|
10409
10424
|
cutLength: I,
|
|
10410
10425
|
singleComputed: L,
|
|
10411
10426
|
singleKey: k,
|
|
10412
10427
|
singleData: N
|
|
10413
10428
|
} = y;
|
|
10414
|
-
let
|
|
10415
|
-
E && (
|
|
10429
|
+
let O = {};
|
|
10430
|
+
E && (O = {
|
|
10416
10431
|
...E
|
|
10417
10432
|
});
|
|
10418
10433
|
for (let x = 0; x < w.length; x++) {
|
|
10419
10434
|
const { key: A, url: R } = w[x];
|
|
10420
10435
|
try {
|
|
10421
10436
|
const F = (await getDateSourceData(R, { id: n.id })).data;
|
|
10422
|
-
|
|
10437
|
+
O[A] = F;
|
|
10423
10438
|
} catch (F) {
|
|
10424
10439
|
return o("report-error", {
|
|
10425
10440
|
index: n.index,
|
|
@@ -10427,28 +10442,28 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10427
10442
|
}), l.value = !1, !1;
|
|
10428
10443
|
}
|
|
10429
10444
|
}
|
|
10430
|
-
if (Object.keys(
|
|
10445
|
+
if (Object.keys(O).length === 0)
|
|
10431
10446
|
return l.value = !1, !1;
|
|
10432
10447
|
if (c.value = [], b) {
|
|
10433
10448
|
if ($.length < 2 || D.length < 2)
|
|
10434
10449
|
return l.value = !1, !1;
|
|
10435
10450
|
let x = "", A = "";
|
|
10436
10451
|
$.length > 2 ? (x = $.splice(0, 2).join("."), A = $.at(0)) : (x = $.at(0), A = $.at(1));
|
|
10437
|
-
let R = get(
|
|
10452
|
+
let R = get(O, x);
|
|
10438
10453
|
if (!R)
|
|
10439
10454
|
return l.value = !1, !1;
|
|
10440
|
-
let F = R.map((U) => U[A]),
|
|
10441
|
-
D.length > 2 ? (
|
|
10442
|
-
let W = [], M = {}, B = get(
|
|
10455
|
+
let F = R.map((U) => U[A]), j = "", V = "";
|
|
10456
|
+
D.length > 2 ? (j = D.splice(0, 2).join("."), V = D.at(0)) : (j = D.at(0), V = D.at(1));
|
|
10457
|
+
let W = [], M = {}, B = get(O, j);
|
|
10443
10458
|
if (!B)
|
|
10444
10459
|
return l.value = !1, !1;
|
|
10445
10460
|
B.map((U) => {
|
|
10446
|
-
let H = U[A], z = U[
|
|
10447
|
-
|
|
10461
|
+
let H = U[A], z = U[V];
|
|
10462
|
+
T ? H && F.includes(H) && (M[H] ? M[H].push(z) : M[H] = [z]) : H && F.includes(H) && W.push({
|
|
10448
10463
|
label: H,
|
|
10449
10464
|
value: z
|
|
10450
10465
|
});
|
|
10451
|
-
}),
|
|
10466
|
+
}), T && (W = Object.keys(M).map((U) => {
|
|
10452
10467
|
let H = M[U];
|
|
10453
10468
|
return {
|
|
10454
10469
|
label: U,
|
|
@@ -10460,10 +10475,10 @@ const DEFAULT_PRINT_HEADER = {
|
|
|
10460
10475
|
return l.value = !1, !1;
|
|
10461
10476
|
let x = "", A = "";
|
|
10462
10477
|
N.length > 2 ? (x = N.splice(0, 2).join("."), A = N.at(0)) : (x = N.at(0), A = N.at(1));
|
|
10463
|
-
let R = get(
|
|
10478
|
+
let R = get(O, x);
|
|
10464
10479
|
if (!R)
|
|
10465
10480
|
return l.value = !1, !1;
|
|
10466
|
-
let F = R.map((
|
|
10481
|
+
let F = R.map((j) => j[A]);
|
|
10467
10482
|
L && (F = _[L](F)), c.value.push({
|
|
10468
10483
|
label: k,
|
|
10469
10484
|
value: F
|
|
@@ -10920,9 +10935,9 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10920
10935
|
let w = function() {
|
|
10921
10936
|
k.length > 0 && (L.push({ items: k }), k = [], N = 0);
|
|
10922
10937
|
}, b = function() {
|
|
10923
|
-
if (
|
|
10924
|
-
for (;
|
|
10925
|
-
const A =
|
|
10938
|
+
if (T)
|
|
10939
|
+
for (; O.length > 0; ) {
|
|
10940
|
+
const A = O[0], R = D - N;
|
|
10926
10941
|
if (R <= 0) {
|
|
10927
10942
|
if (k.length === 0) break;
|
|
10928
10943
|
w();
|
|
@@ -10936,19 +10951,19 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10936
10951
|
}
|
|
10937
10952
|
F = splitNextReportPage(A.state, R, S, D, !0);
|
|
10938
10953
|
}
|
|
10939
|
-
k.push({ type: "report", dom: F.dom }), N += F.height, A.state.currentRowIdx >= A.state.visibleRows.length &&
|
|
10954
|
+
k.push({ type: "report", dom: F.dom }), N += F.height, A.state.currentRowIdx >= A.state.visibleRows.length && O.shift();
|
|
10940
10955
|
}
|
|
10941
10956
|
};
|
|
10942
10957
|
r.silentRender && await C();
|
|
10943
|
-
const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig),
|
|
10958
|
+
const $ = !!r.autoPrint, D = getPrintContentHeightPxMeasured(r.printConfig), T = D != null, S = getPrintContentWidthPxMeasured(r.printConfig), I = [];
|
|
10944
10959
|
for (let A = 0; A < r.configs.length; A++) {
|
|
10945
10960
|
const R = r.configs[A];
|
|
10946
10961
|
if (R.type === "report") {
|
|
10947
10962
|
const F = f().get(A);
|
|
10948
10963
|
if (F && F.length > 0)
|
|
10949
|
-
for (const
|
|
10964
|
+
for (const V of F) {
|
|
10950
10965
|
const W = createReportSplitState(
|
|
10951
|
-
|
|
10966
|
+
V,
|
|
10952
10967
|
getThemeColors(R.theme || "none").border,
|
|
10953
10968
|
{
|
|
10954
10969
|
header: r.printConfig.header,
|
|
@@ -10959,11 +10974,11 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10959
10974
|
);
|
|
10960
10975
|
await preGenerateBarcodes([{ config: W.config }]), I.push({ kind: "report", pending: { state: W } });
|
|
10961
10976
|
}
|
|
10962
|
-
const
|
|
10963
|
-
if (
|
|
10964
|
-
for (let
|
|
10965
|
-
const W =
|
|
10966
|
-
|
|
10977
|
+
const j = p().get(A);
|
|
10978
|
+
if (j && j.length > 0)
|
|
10979
|
+
for (let V = 0; V < j.length; V++) {
|
|
10980
|
+
const W = j[V];
|
|
10981
|
+
V > 0 && I.push({ kind: "break" });
|
|
10967
10982
|
for (const M of W) {
|
|
10968
10983
|
const B = createReportSplitState(
|
|
10969
10984
|
M,
|
|
@@ -10983,8 +10998,8 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10983
10998
|
}
|
|
10984
10999
|
const L = [];
|
|
10985
11000
|
let k = [], N = 0;
|
|
10986
|
-
const
|
|
10987
|
-
if (
|
|
11001
|
+
const O = [];
|
|
11002
|
+
if (T) {
|
|
10988
11003
|
for (const A of I) {
|
|
10989
11004
|
if (A.kind === "break") {
|
|
10990
11005
|
w();
|
|
@@ -10993,21 +11008,21 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
10993
11008
|
if (A.kind === "report") {
|
|
10994
11009
|
const R = A.pending;
|
|
10995
11010
|
b();
|
|
10996
|
-
const F = D - N,
|
|
10997
|
-
|
|
11011
|
+
const F = D - N, j = splitNextReportPage(R.state, F, S, D);
|
|
11012
|
+
j ? (k.push({ type: "report", dom: j.dom }), N += j.height, R.state.currentRowIdx < R.state.visibleRows.length && O.push(R)) : (k.length > 0 && w(), O.push(R));
|
|
10998
11013
|
}
|
|
10999
11014
|
}
|
|
11000
11015
|
b(), w();
|
|
11001
11016
|
} else {
|
|
11002
11017
|
const A = r.printConfig, R = mmToPx(A.marginTop + A.marginBottom), F = [];
|
|
11003
|
-
for (const
|
|
11004
|
-
if (
|
|
11005
|
-
const
|
|
11006
|
-
|
|
11018
|
+
for (const j of I) {
|
|
11019
|
+
if (j.kind === "break") {
|
|
11020
|
+
const V = document.createElement("div");
|
|
11021
|
+
V.style.height = `${R}px`, F.push({ type: "spacer", dom: V });
|
|
11007
11022
|
continue;
|
|
11008
11023
|
}
|
|
11009
|
-
if (
|
|
11010
|
-
const { state:
|
|
11024
|
+
if (j.kind === "report") {
|
|
11025
|
+
const { state: V } = j.pending, { rowConfig: W, colConfig: M, config: B } = V, U = renderReportByDomForPrint(W, M, B, V.themeColor);
|
|
11011
11026
|
F.push({ type: "report", dom: U });
|
|
11012
11027
|
}
|
|
11013
11028
|
}
|
|
@@ -11019,9 +11034,9 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11019
11034
|
const R = x[A];
|
|
11020
11035
|
R.innerHTML = "";
|
|
11021
11036
|
const F = L[A].items;
|
|
11022
|
-
for (const
|
|
11023
|
-
const
|
|
11024
|
-
R.appendChild(
|
|
11037
|
+
for (const j of F) {
|
|
11038
|
+
const V = j.dom.cloneNode(!0);
|
|
11039
|
+
R.appendChild(V), s.value.push(V);
|
|
11025
11040
|
}
|
|
11026
11041
|
}
|
|
11027
11042
|
$ && (await nextTick(), v(), setTimeout(() => {
|
|
@@ -11040,14 +11055,14 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11040
11055
|
if (w.type !== "report") continue;
|
|
11041
11056
|
const b = w, $ = b.data, D = b.tableConfig;
|
|
11042
11057
|
if (!$ || !D || !$.source) continue;
|
|
11043
|
-
const
|
|
11058
|
+
const T = buildPrintParamsFromConfig(b, c.query), { resData: S } = await fetchReportData(
|
|
11044
11059
|
{ id: r.reportId ?? "", data: $, tableConfig: D },
|
|
11045
|
-
|
|
11060
|
+
T,
|
|
11046
11061
|
{ pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!$.pagination },
|
|
11047
11062
|
y
|
|
11048
11063
|
);
|
|
11049
11064
|
let I = toUpdateData(S);
|
|
11050
|
-
$.processData && (I = await getProcessData($.processData, I,
|
|
11065
|
+
$.processData && (I = await getProcessData($.processData, I, T, {
|
|
11051
11066
|
pageSize: 5e3,
|
|
11052
11067
|
pageIndex: 1,
|
|
11053
11068
|
total: 0
|
|
@@ -11160,26 +11175,26 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11160
11175
|
}
|
|
11161
11176
|
);
|
|
11162
11177
|
function m(D) {
|
|
11163
|
-
D ? (i.value = "", a.value = [], n.value = !0, getConfig(D).then(async (
|
|
11164
|
-
let { name: S, remoteOptions: I, printConfig: L } =
|
|
11178
|
+
D ? (i.value = "", a.value = [], n.value = !0, getConfig(D).then(async (T) => {
|
|
11179
|
+
let { name: S, remoteOptions: I, printConfig: L } = T;
|
|
11165
11180
|
o.value = S, c.value = I, L && (u.value = { ...DEFAULT_PRINT_CONFIG, ...L });
|
|
11166
|
-
}).catch((
|
|
11167
|
-
console.error("获取报表配置失败:",
|
|
11181
|
+
}).catch((T) => {
|
|
11182
|
+
console.error("获取报表配置失败:", T), i.value = getErrorMessage(T);
|
|
11168
11183
|
}).finally(() => {
|
|
11169
11184
|
n.value = !1;
|
|
11170
11185
|
})) : i.value = "报表ID不能为空";
|
|
11171
11186
|
}
|
|
11172
|
-
function g({ index: D, message:
|
|
11173
|
-
a.value.some((S) => S.key === D) || a.value.push({ key: D, message:
|
|
11187
|
+
function g({ index: D, message: T }) {
|
|
11188
|
+
a.value.some((S) => S.key === D) || a.value.push({ key: D, message: T });
|
|
11174
11189
|
}
|
|
11175
11190
|
function _(D) {
|
|
11176
|
-
const
|
|
11177
|
-
|
|
11191
|
+
const T = a.value.indexOf(D);
|
|
11192
|
+
T > -1 && a.value.splice(T, 1);
|
|
11178
11193
|
}
|
|
11179
11194
|
const v = ref(!1);
|
|
11180
11195
|
function C(D) {
|
|
11181
|
-
var
|
|
11182
|
-
d[D.key] = D.data, (
|
|
11196
|
+
var T;
|
|
11197
|
+
d[D.key] = D.data, (T = l.value) == null || T.forEach((S) => {
|
|
11183
11198
|
S.setOutData(d);
|
|
11184
11199
|
});
|
|
11185
11200
|
}
|
|
@@ -11190,22 +11205,22 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11190
11205
|
const L = b.value.filter((k) => k && typeof k.renderHandler == "function").map((k) => k.renderHandler());
|
|
11191
11206
|
L.length > 0 && (n.value = !0, await Promise.all(L), n.value = !1);
|
|
11192
11207
|
}
|
|
11193
|
-
const D = /* @__PURE__ */ new Map(),
|
|
11208
|
+
const D = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
11194
11209
|
if (b.value) {
|
|
11195
11210
|
for (let L = 0; L < c.value.length; L++)
|
|
11196
11211
|
if (c.value[L].type === "report") {
|
|
11197
|
-
const k = b.value.find((N,
|
|
11198
|
-
k && ((I = (S = c.value[L].data) == null ? void 0 : S.source) != null && I.some((N) => N.loopTable) ? k.batchTableConfigs &&
|
|
11212
|
+
const k = b.value.find((N, O) => c.value.filter((A) => A.type === "report")[O] === c.value[L]);
|
|
11213
|
+
k && ((I = (S = c.value[L].data) == null ? void 0 : S.source) != null && I.some((N) => N.loopTable) ? k.batchTableConfigs && T.set(
|
|
11199
11214
|
L,
|
|
11200
11215
|
k.batchTableConfigs.map((N) => N.length > 0 ? [N[0]] : [])
|
|
11201
11216
|
) : k.tableConfig && D.set(L, k.tableConfig.length > 0 ? [k.tableConfig[0]] : []));
|
|
11202
11217
|
}
|
|
11203
11218
|
}
|
|
11204
|
-
E.value = D, w.value =
|
|
11219
|
+
E.value = D, w.value = T, y.value = !0;
|
|
11205
11220
|
}
|
|
11206
11221
|
return onMounted(() => {
|
|
11207
11222
|
m(r.id);
|
|
11208
|
-
}), (D,
|
|
11223
|
+
}), (D, T) => {
|
|
11209
11224
|
const S = resolveDirective("loading");
|
|
11210
11225
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
11211
11226
|
createElementVNode("div", _hoisted_1$1, toDisplayString(o.value), 1),
|
|
@@ -11215,7 +11230,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11215
11230
|
size: "small",
|
|
11216
11231
|
onClick: $
|
|
11217
11232
|
}, {
|
|
11218
|
-
default: withCtx(() => [...
|
|
11233
|
+
default: withCtx(() => [...T[1] || (T[1] = [
|
|
11219
11234
|
createTextVNode(" 打印预览 ", -1)
|
|
11220
11235
|
])]),
|
|
11221
11236
|
_: 1
|
|
@@ -11278,7 +11293,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11278
11293
|
length: c.value.length
|
|
11279
11294
|
}, null, 8, ["config", "id", "index", "length"]))
|
|
11280
11295
|
], 64))), 256)),
|
|
11281
|
-
withDirectives(createElementVNode("div", _hoisted_4$1, [...
|
|
11296
|
+
withDirectives(createElementVNode("div", _hoisted_4$1, [...T[2] || (T[2] = [
|
|
11282
11297
|
createElementVNode("i", { class: "iconfont icon-backtop" }, null, -1)
|
|
11283
11298
|
])], 512), [
|
|
11284
11299
|
[vShow, v.value]
|
|
@@ -11288,7 +11303,7 @@ const _hoisted_1$2 = { class: "print-preview-toolbar" }, _hoisted_2$2 = { class:
|
|
|
11288
11303
|
]),
|
|
11289
11304
|
createVNode(_sfc_main$2, {
|
|
11290
11305
|
visible: y.value,
|
|
11291
|
-
"onUpdate:visible":
|
|
11306
|
+
"onUpdate:visible": T[0] || (T[0] = (I) => y.value = I),
|
|
11292
11307
|
configs: c.value,
|
|
11293
11308
|
"print-config": u.value,
|
|
11294
11309
|
"statement-name": o.value,
|
|
@@ -11896,6 +11911,123 @@ function printHTMLViaIframe(t) {
|
|
|
11896
11911
|
}, 500);
|
|
11897
11912
|
};
|
|
11898
11913
|
}
|
|
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
|
+
}
|
|
11899
12031
|
let rct = (t) => t;
|
|
11900
12032
|
const silenceExport = async (t) => {
|
|
11901
12033
|
let { name: e, remoteOptions: r } = await getConfig(t);
|
|
@@ -11911,7 +12043,7 @@ async function registerRoute(t, e) {
|
|
|
11911
12043
|
title: "报表列表",
|
|
11912
12044
|
icon: "iconfont icon-s-grid"
|
|
11913
12045
|
},
|
|
11914
|
-
component: () => import("./StatementList-
|
|
12046
|
+
component: () => import("./StatementList-CWZQHrla.mjs")
|
|
11915
12047
|
}), e.addRoute("Index", {
|
|
11916
12048
|
path: "statement/design/:id",
|
|
11917
12049
|
name: "报表设计",
|
|
@@ -11920,7 +12052,7 @@ async function registerRoute(t, e) {
|
|
|
11920
12052
|
title: "报表设计",
|
|
11921
12053
|
icon: "iconfont icon-s-grid"
|
|
11922
12054
|
},
|
|
11923
|
-
component: () => import("./StatementDesign-
|
|
12055
|
+
component: () => import("./StatementDesign-DdGNl0Uw.mjs").then((r) => r.S)
|
|
11924
12056
|
}), e.addRoute("Index", {
|
|
11925
12057
|
path: "statement/detail/:id",
|
|
11926
12058
|
name: "后台报表查看",
|
|
@@ -11929,7 +12061,7 @@ async function registerRoute(t, e) {
|
|
|
11929
12061
|
title: "后台报表查看",
|
|
11930
12062
|
icon: "iconfont icon-s-grid"
|
|
11931
12063
|
},
|
|
11932
|
-
component: () => import("./StatementDetail-
|
|
12064
|
+
component: () => import("./StatementDetail-wBMBzex2.mjs")
|
|
11933
12065
|
})), e.addRoute({
|
|
11934
12066
|
path: "/statementdetail/:id",
|
|
11935
12067
|
name: "报表查看",
|
|
@@ -11940,7 +12072,7 @@ async function registerRoute(t, e) {
|
|
|
11940
12072
|
isWhite: !0
|
|
11941
12073
|
},
|
|
11942
12074
|
props: !0,
|
|
11943
|
-
component: () => import("./StatementDetail-
|
|
12075
|
+
component: () => import("./StatementDetail-wBMBzex2.mjs")
|
|
11944
12076
|
}), e.hasRoute("Index") && e.addRoute("Index", {
|
|
11945
12077
|
path: "innerStatementdetail/:id",
|
|
11946
12078
|
name: "系统内报表查看",
|
|
@@ -11951,7 +12083,7 @@ async function registerRoute(t, e) {
|
|
|
11951
12083
|
noPadding: !0
|
|
11952
12084
|
},
|
|
11953
12085
|
props: !0,
|
|
11954
|
-
component: () => import("./StatementDetail-
|
|
12086
|
+
component: () => import("./StatementDetail-wBMBzex2.mjs")
|
|
11955
12087
|
});
|
|
11956
12088
|
}
|
|
11957
12089
|
const index = {
|
|
@@ -11977,13 +12109,13 @@ const index = {
|
|
|
11977
12109
|
menuType: "WINDOW"
|
|
11978
12110
|
}), o(async () => {
|
|
11979
12111
|
!a || !a.hasRoute("Index") || registerRoute(s.isAdmin, a);
|
|
11980
|
-
}), l && (e != null && e.printEnabled) && l.registerSlot({
|
|
12112
|
+
}), registerReportDesignSkillFromApp(t), l && (e != null && e.printEnabled) && l.registerSlot({
|
|
11981
12113
|
location: "HEADER_RIGHT",
|
|
11982
12114
|
component: markRaw(PrinterHeaderButton)
|
|
11983
12115
|
});
|
|
11984
12116
|
} else {
|
|
11985
12117
|
let { router: n, isAdmin: o = !1 } = e;
|
|
11986
|
-
registerRoute(o, n);
|
|
12118
|
+
registerRoute(o, n), registerReportDesignSkillFromApp(t);
|
|
11987
12119
|
}
|
|
11988
12120
|
}
|
|
11989
12121
|
};
|
|
@@ -12029,16 +12161,17 @@ export {
|
|
|
12029
12161
|
getDateSourceData as J,
|
|
12030
12162
|
transformArrayToObject as K,
|
|
12031
12163
|
_sfc_main$2 as L,
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12164
|
+
validateDraft as M,
|
|
12165
|
+
ItemTypes as N,
|
|
12166
|
+
getReportDefaultOption as O,
|
|
12035
12167
|
PrinterClient as P,
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12168
|
+
index as Q,
|
|
12169
|
+
dynamicReportView as R,
|
|
12170
|
+
fetchReportForPrint as S,
|
|
12039
12171
|
TypeItems as T,
|
|
12040
|
-
|
|
12041
|
-
|
|
12172
|
+
printReportByBrowser as U,
|
|
12173
|
+
silenceExport as V,
|
|
12174
|
+
usePrinterClient as W,
|
|
12042
12175
|
_sfc_main$1 as _,
|
|
12043
12176
|
del as a,
|
|
12044
12177
|
defaultCol as b,
|
|
@@ -12047,8 +12180,8 @@ export {
|
|
|
12047
12180
|
defaultCell as e,
|
|
12048
12181
|
defaultRow as f,
|
|
12049
12182
|
getList as g,
|
|
12050
|
-
|
|
12051
|
-
|
|
12183
|
+
completeBasicReportProperties as h,
|
|
12184
|
+
getConfig as i,
|
|
12052
12185
|
getThemeColors as j,
|
|
12053
12186
|
renderCellStyle as k,
|
|
12054
12187
|
getBorderCss as l,
|
|
@@ -12061,10 +12194,10 @@ export {
|
|
|
12061
12194
|
save as s,
|
|
12062
12195
|
_export_sfc as t,
|
|
12063
12196
|
chartItem as u,
|
|
12064
|
-
|
|
12065
|
-
|
|
12197
|
+
DataSourceColumnDataType as v,
|
|
12198
|
+
DATE_RANGE_TYPES as w,
|
|
12066
12199
|
numberToColumn as x,
|
|
12067
12200
|
applyBorderOperation as y,
|
|
12068
12201
|
validateAndCompleteTableConfig as z
|
|
12069
12202
|
};
|
|
12070
|
-
//# sourceMappingURL=index-
|
|
12203
|
+
//# sourceMappingURL=index-CYPpaOha.mjs.map
|