yh-report 2.0.13 → 2.0.15
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-b4a2f41e.mjs → StatementDesign-60ed7af8.mjs} +1583 -1556
- package/{StatementDesign-b4a2f41e.mjs.map → StatementDesign-60ed7af8.mjs.map} +1 -1
- package/{StatementDetail-edc9161f.mjs → StatementDetail-4a23ab2b.mjs} +2 -2
- package/{StatementDetail-edc9161f.mjs.map → StatementDetail-4a23ab2b.mjs.map} +1 -1
- package/{StatementList-5d581f19.mjs → StatementList-2352f290.mjs} +2 -2
- package/{StatementList-5d581f19.mjs.map → StatementList-2352f290.mjs.map} +1 -1
- package/{index-0e5f0fbf.mjs → index-e5ac46f6.mjs} +869 -835
- package/index-e5ac46f6.mjs.map +1 -0
- package/index.es.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/index-0e5f0fbf.mjs.map +0 -1
|
@@ -41,34 +41,34 @@ function validateAndCompleteStatementOption(t) {
|
|
|
41
41
|
...t,
|
|
42
42
|
id: `report-${Date.now()}`
|
|
43
43
|
};
|
|
44
|
-
e.rowConfig.length === 0 && (e.rowConfig = Array.from({ length: 5 }, (n,
|
|
44
|
+
e.rowConfig.length === 0 && (e.rowConfig = Array.from({ length: 5 }, (n, d) => ({
|
|
45
45
|
size: 25,
|
|
46
46
|
data: void 0,
|
|
47
47
|
loop: !1,
|
|
48
|
-
index:
|
|
49
|
-
}))), e.colConfig.length === 0 && (e.colConfig = Array.from({ length: 10 }, (n,
|
|
48
|
+
index: d
|
|
49
|
+
}))), e.colConfig.length === 0 && (e.colConfig = Array.from({ length: 10 }, (n, d) => ({
|
|
50
50
|
...defaultCol
|
|
51
51
|
})));
|
|
52
|
-
const r = e.rowConfig.length,
|
|
53
|
-
return e.config.length, e.config = e.config.map((n,
|
|
52
|
+
const r = e.rowConfig.length, a = e.colConfig.length;
|
|
53
|
+
return e.config.length, e.config = e.config.map((n, d) => (n.length, n.slice(0, a).map((s, g) => (Object.keys(s).length, Object.keys(defaultCell).length, {
|
|
54
54
|
...defaultCell,
|
|
55
55
|
...s,
|
|
56
|
-
row:
|
|
57
|
-
col:
|
|
56
|
+
row: d,
|
|
57
|
+
col: g
|
|
58
58
|
})).concat(
|
|
59
|
-
Array.from({ length:
|
|
59
|
+
Array.from({ length: a - n.length }, (s, g) => ({
|
|
60
60
|
...defaultCell,
|
|
61
|
-
row:
|
|
62
|
-
col: n.length +
|
|
61
|
+
row: d,
|
|
62
|
+
col: n.length + g
|
|
63
63
|
// 填充列时,列索引从当前行已有列数开始
|
|
64
64
|
}))
|
|
65
65
|
))).concat(
|
|
66
|
-
Array.from({ length: r - e.config.length }, (n,
|
|
67
|
-
const s = e.config.length +
|
|
68
|
-
return Array(
|
|
66
|
+
Array.from({ length: r - e.config.length }, (n, d) => {
|
|
67
|
+
const s = e.config.length + d;
|
|
68
|
+
return Array(a).fill(0).map((g, u) => ({
|
|
69
69
|
...defaultCell,
|
|
70
70
|
row: s,
|
|
71
|
-
col:
|
|
71
|
+
col: u
|
|
72
72
|
}));
|
|
73
73
|
})
|
|
74
74
|
), e.rowConfig = e.rowConfig.map((n) => (Object.keys(n).length, Object.keys(defaultRow).length, {
|
|
@@ -126,29 +126,29 @@ const TypeItems = ref([
|
|
|
126
126
|
type: "label"
|
|
127
127
|
}
|
|
128
128
|
]), ItemTypes = computed(() => TypeItems.value.map((t) => t.type)), colors = ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272"], renderItem = (t, e) => {
|
|
129
|
-
const r = t.dataIndex,
|
|
129
|
+
const r = t.dataIndex, a = e.value();
|
|
130
130
|
let n = e.value(1);
|
|
131
|
-
Array.isArray(n) && (n = n.map((
|
|
132
|
-
const
|
|
133
|
-
let x =
|
|
131
|
+
Array.isArray(n) && (n = n.map((M) => String.fromCharCode(M)).join(""));
|
|
132
|
+
const d = e.getWidth(), s = e.getHeight(), g = colors[r % 6], u = t.dataInsideLength;
|
|
133
|
+
let x = d * 0.01;
|
|
134
134
|
x < 10 && (x = 10), x > 15 && (x = 15);
|
|
135
135
|
let C = s * 0.5;
|
|
136
136
|
C < 60 && (C = 60);
|
|
137
|
-
const E = (
|
|
137
|
+
const E = (d - x * 2 - x * (u - 1)) / u, k = 8, m = x + r * (E + x), w = (e.getHeight() - C) / 2;
|
|
138
138
|
return {
|
|
139
139
|
type: "group",
|
|
140
140
|
children: [
|
|
141
141
|
{
|
|
142
142
|
type: "rect",
|
|
143
143
|
shape: {
|
|
144
|
-
x:
|
|
145
|
-
y:
|
|
144
|
+
x: m,
|
|
145
|
+
y: w,
|
|
146
146
|
width: E,
|
|
147
147
|
height: C,
|
|
148
|
-
r:
|
|
148
|
+
r: k
|
|
149
149
|
},
|
|
150
150
|
style: {
|
|
151
|
-
fill:
|
|
151
|
+
fill: g,
|
|
152
152
|
stroke: "#fff",
|
|
153
153
|
lineWidth: 1,
|
|
154
154
|
shadowBlur: 4,
|
|
@@ -160,7 +160,7 @@ const TypeItems = ref([
|
|
|
160
160
|
style: {
|
|
161
161
|
text: `${n}
|
|
162
162
|
|
|
163
|
-
${
|
|
163
|
+
${a}`,
|
|
164
164
|
fill: "#fff",
|
|
165
165
|
// 自动反色可改为:echarts.color.lift(color, 0.8)
|
|
166
166
|
fontSize: 14,
|
|
@@ -168,7 +168,7 @@ ${i}`,
|
|
|
168
168
|
align: "center",
|
|
169
169
|
verticalAlign: "middle"
|
|
170
170
|
},
|
|
171
|
-
position: [
|
|
171
|
+
position: [m + E / 2, w + C / 2]
|
|
172
172
|
}
|
|
173
173
|
]
|
|
174
174
|
};
|
|
@@ -688,122 +688,122 @@ ${i}`,
|
|
|
688
688
|
rowConfig: [],
|
|
689
689
|
colConfig: []
|
|
690
690
|
}, setXAxisData = (t, e) => {
|
|
691
|
-
let { option: r } = t, { xDataId:
|
|
692
|
-
if (
|
|
691
|
+
let { option: r } = t, { xDataId: a } = r, n, d;
|
|
692
|
+
if (a.length === 3 ? (e && e[a[0]] && (n = e[a[0]][a[1]]), d = a[2]) : (n = e[a[0]], d = a[1]), !n)
|
|
693
693
|
return r;
|
|
694
694
|
let s = [];
|
|
695
695
|
if (t.groupBy) {
|
|
696
|
-
let
|
|
697
|
-
n.forEach((
|
|
698
|
-
|
|
699
|
-
}), s = [...
|
|
696
|
+
let g = /* @__PURE__ */ new Set();
|
|
697
|
+
n.forEach((u) => {
|
|
698
|
+
g.add(u[d]);
|
|
699
|
+
}), s = [...g];
|
|
700
700
|
} else
|
|
701
|
-
s = n.map((
|
|
701
|
+
s = n.map((g) => g[d]);
|
|
702
702
|
return t.type == "rowBar" ? r.yAxis.data = s : ["line", "bar"].includes(t.type) ? r.xAxis.data = s : t.type == "radar" && (r.radar.indicator = s), r;
|
|
703
703
|
}, setYAxisData = (t, e) => {
|
|
704
|
-
let { option: r } = t, { yDataId:
|
|
705
|
-
if (r.xDataId && (r.xDataId.length === 3 ? (e && e[r.xDataId[0]] && (n = e[r.xDataId[0]][r.xDataId[1]]),
|
|
704
|
+
let { option: r } = t, { yDataId: a } = r, n = [], d = "";
|
|
705
|
+
if (r.xDataId && (r.xDataId.length === 3 ? (e && e[r.xDataId[0]] && (n = e[r.xDataId[0]][r.xDataId[1]]), d = r.xDataId[2]) : (n = e[r.xDataId[0]], d = r.xDataId[1])), n)
|
|
706
706
|
if (t.groupBy) {
|
|
707
707
|
let s = /* @__PURE__ */ new Set();
|
|
708
|
-
n.forEach((
|
|
709
|
-
s.add(
|
|
708
|
+
n.forEach((g) => {
|
|
709
|
+
s.add(g[d]);
|
|
710
710
|
}), n = [...s];
|
|
711
711
|
} else
|
|
712
|
-
n = n.map((s) => s[
|
|
712
|
+
n = n.map((s) => s[d]);
|
|
713
713
|
if (t.type == "radar") {
|
|
714
714
|
r.series[0].data = [];
|
|
715
|
-
for (let s of
|
|
716
|
-
let
|
|
717
|
-
s.length === 3 ? (e[s[0]] && (
|
|
715
|
+
for (let s of a) {
|
|
716
|
+
let g, u;
|
|
717
|
+
s.length === 3 ? (e[s[0]] && (g = e[s[0]][s[1]]), u = s[2]) : (g = e[s[0]], u = s[1]);
|
|
718
718
|
let x = [];
|
|
719
719
|
if (t.groupBy && n) {
|
|
720
720
|
let C = {};
|
|
721
|
-
|
|
722
|
-
let
|
|
723
|
-
|
|
721
|
+
g.forEach((E) => {
|
|
722
|
+
let k = E[d], m = E[u];
|
|
723
|
+
k && !isNaN(m) && (C[k] || (C[k] = 0), C[k] = m);
|
|
724
724
|
}), x = n.map((E) => C[E]);
|
|
725
725
|
} else
|
|
726
|
-
x =
|
|
726
|
+
x = g.map((C) => C[u]);
|
|
727
727
|
t.orderBy && t.orderBy !== "NONE" && (x = x.sort((C, E) => t.orderBy === "ASC" ? C - E : E - C), !isNaN(t.cutLength) && t.cutLength > 0 && (x = x.slice(0, t.cutLength))), r.series[0].data.push({
|
|
728
728
|
value: x
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
731
|
} else if (t.type == "treemap") {
|
|
732
|
-
if (
|
|
733
|
-
let [s,
|
|
732
|
+
if (a && a.length) {
|
|
733
|
+
let [s, g] = a[0];
|
|
734
734
|
if (e[s][0]) {
|
|
735
|
-
let
|
|
736
|
-
if (
|
|
735
|
+
let u = e[s][0][g];
|
|
736
|
+
if (u) {
|
|
737
737
|
let x = r.series[0].data[0].name.split(":")[0];
|
|
738
|
-
r.series[0].data[0].name = `${x}:${
|
|
738
|
+
r.series[0].data[0].name = `${x}:${u}`;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
742
|
} else {
|
|
743
743
|
let s = cloneDeep(r.series);
|
|
744
|
-
|
|
745
|
-
for (let
|
|
746
|
-
let
|
|
747
|
-
|
|
744
|
+
a.length && (r.series = []);
|
|
745
|
+
for (let g = 0; g < a.length; g++) {
|
|
746
|
+
let u = a[g], x, C;
|
|
747
|
+
u.length === 3 ? (e[u[0]] && (x = e[u[0]][u[1]]), C = u[2]) : (x = e[u[0]], C = u[1]);
|
|
748
748
|
let E = cloneDeep(s[0]);
|
|
749
749
|
E.data = [];
|
|
750
|
-
let
|
|
751
|
-
if (x &&
|
|
750
|
+
let k = [];
|
|
751
|
+
if (x && d && n) {
|
|
752
752
|
switch (t.type) {
|
|
753
753
|
case "line":
|
|
754
754
|
case "rowBar":
|
|
755
755
|
case "bar":
|
|
756
756
|
if (t.groupBy) {
|
|
757
|
-
let
|
|
758
|
-
x.forEach((
|
|
759
|
-
let
|
|
760
|
-
|
|
761
|
-
}),
|
|
757
|
+
let m = {};
|
|
758
|
+
x.forEach((w) => {
|
|
759
|
+
let M = w[d], B = w[C];
|
|
760
|
+
M && !isNaN(B) && (m[M] || (m[M] = 0), m[M] = B);
|
|
761
|
+
}), k = n.map((w) => m[w]);
|
|
762
762
|
} else
|
|
763
|
-
|
|
764
|
-
t.orderBy && t.orderBy !== "NONE" && (
|
|
763
|
+
k = x.map((m) => m[C]);
|
|
764
|
+
t.orderBy && t.orderBy !== "NONE" && (k = k.sort((m, w) => t.orderBy === "ASC" ? m - w : w - m), !isNaN(t.cutLength) && t.cutLength > 0 && (k = k.slice(0, t.cutLength)));
|
|
765
765
|
break;
|
|
766
766
|
case "pie":
|
|
767
767
|
if (t.groupBy) {
|
|
768
|
-
let
|
|
769
|
-
x.forEach((
|
|
770
|
-
let
|
|
771
|
-
|
|
772
|
-
}),
|
|
768
|
+
let m = {};
|
|
769
|
+
x.forEach((w) => {
|
|
770
|
+
let M = w[d], B = w[C];
|
|
771
|
+
M && !isNaN(B) && (m[M] || (m[M] = 0), m[M] = B);
|
|
772
|
+
}), k = n.map((w) => ({ value: m[w], name: w }));
|
|
773
773
|
} else
|
|
774
|
-
|
|
775
|
-
t.orderBy && t.orderBy !== "NONE" && (
|
|
774
|
+
k = x.map((m) => ({ value: m[C], name: m[d] }));
|
|
775
|
+
t.orderBy && t.orderBy !== "NONE" && (k = k.sort((m, w) => t.orderBy === "ASC" ? m - w : w - m), !isNaN(t.cutLength) && t.cutLength > 0 && (k = k.slice(0, t.cutLength)));
|
|
776
776
|
break;
|
|
777
777
|
case "scatter":
|
|
778
778
|
if (t.groupBy) {
|
|
779
|
-
let
|
|
780
|
-
x.forEach((
|
|
781
|
-
let
|
|
782
|
-
|
|
783
|
-
}),
|
|
779
|
+
let m = {};
|
|
780
|
+
x.forEach((w) => {
|
|
781
|
+
let M = w[d], B = w[C];
|
|
782
|
+
M && !isNaN(B) && (m[M] || (m[M] = 0), m[M] = B);
|
|
783
|
+
}), k = n.map((w) => [w, m[w]]);
|
|
784
784
|
} else
|
|
785
|
-
|
|
786
|
-
t.orderBy && t.orderBy !== "NONE" && (
|
|
785
|
+
k = x.map((m) => [m[d], m[C]]);
|
|
786
|
+
t.orderBy && t.orderBy !== "NONE" && (k = k.sort((m, w) => t.orderBy === "ASC" ? m - w : w - m), !isNaN(t.cutLength) && t.cutLength > 0 && (k = k.slice(0, t.cutLength)));
|
|
787
787
|
break;
|
|
788
788
|
case "label":
|
|
789
789
|
if (t.groupBy) {
|
|
790
|
-
let
|
|
791
|
-
x.forEach((
|
|
792
|
-
let
|
|
793
|
-
|
|
794
|
-
}),
|
|
795
|
-
const
|
|
796
|
-
return [
|
|
790
|
+
let m = {};
|
|
791
|
+
x.forEach((w) => {
|
|
792
|
+
let M = w[d], B = w[C];
|
|
793
|
+
M && !isNaN(B) && (m[M] || (m[M] = 0), m[M] = B);
|
|
794
|
+
}), k = n.map((w) => {
|
|
795
|
+
const M = w ? w.split("").map((B) => B.charCodeAt()) : [];
|
|
796
|
+
return [m[w], M];
|
|
797
797
|
});
|
|
798
798
|
} else
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
return [
|
|
799
|
+
k = x.map((m) => {
|
|
800
|
+
const w = m[d] ? m[d].split("").map((M) => M.charCodeAt()) : [];
|
|
801
|
+
return [m[C], w];
|
|
802
802
|
});
|
|
803
|
-
t.orderBy && t.orderBy !== "NONE" && (
|
|
803
|
+
t.orderBy && t.orderBy !== "NONE" && (k = k.sort((m, w) => t.orderBy === "ASC" ? m - w : w - m), !isNaN(t.cutLength) && t.cutLength > 0 && (k = k.slice(0, t.cutLength))), E.renderItem = renderItem;
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
806
|
-
E.data =
|
|
806
|
+
E.data = k;
|
|
807
807
|
}
|
|
808
808
|
r.series.push(E);
|
|
809
809
|
}
|
|
@@ -834,18 +834,18 @@ function getConfig(t) {
|
|
|
834
834
|
id: t
|
|
835
835
|
}
|
|
836
836
|
}).then((e) => {
|
|
837
|
-
let r = JSON.parse(e.data.info), { id:
|
|
838
|
-
if (
|
|
839
|
-
if (
|
|
837
|
+
let r = JSON.parse(e.data.info), { id: a, name: n, code: d, description: s, config: g, chartConfig: u } = r, x = [];
|
|
838
|
+
if (g && (g = JSON.parse(g), Array.isArray(g) && g.length)) {
|
|
839
|
+
if (g[0].type === "tableSheet")
|
|
840
840
|
throw ElMessage.error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线"), useRouter().back(), new Error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线");
|
|
841
|
-
|
|
841
|
+
g = g.map((C) => (ItemTypes.value.includes(C.type) || (C.type = "report"), C)), x = x.concat(g);
|
|
842
842
|
}
|
|
843
|
-
return
|
|
843
|
+
return u && (u = JSON.parse(u), Array.isArray(u) && (u.forEach((C) => {
|
|
844
844
|
C.data || (C.data = { source: [] });
|
|
845
|
-
}), x = x.concat(
|
|
846
|
-
id:
|
|
845
|
+
}), x = x.concat(u))), Promise.resolve({
|
|
846
|
+
id: a,
|
|
847
847
|
name: n,
|
|
848
|
-
code:
|
|
848
|
+
code: d,
|
|
849
849
|
description: s,
|
|
850
850
|
remoteOptions: x
|
|
851
851
|
});
|
|
@@ -873,291 +873,291 @@ function getDefaultExportFromCjs(t) {
|
|
|
873
873
|
}
|
|
874
874
|
var dayjs_min = { exports: {} };
|
|
875
875
|
(function(t, e) {
|
|
876
|
-
(function(r,
|
|
877
|
-
t.exports =
|
|
876
|
+
(function(r, a) {
|
|
877
|
+
t.exports = a();
|
|
878
878
|
})(commonjsGlobal, function() {
|
|
879
|
-
var r = 1e3,
|
|
880
|
-
var
|
|
881
|
-
return "[" +
|
|
882
|
-
} }, W = function(
|
|
883
|
-
var
|
|
884
|
-
return !
|
|
885
|
-
}, ne = { s: W, z: function(
|
|
886
|
-
var
|
|
887
|
-
return (
|
|
888
|
-
}, m: function
|
|
889
|
-
if (
|
|
890
|
-
return -
|
|
891
|
-
var
|
|
892
|
-
return +(-(
|
|
893
|
-
}, a: function(
|
|
894
|
-
return
|
|
895
|
-
}, p: function(
|
|
896
|
-
return { M: E, y:
|
|
897
|
-
}, u: function(
|
|
898
|
-
return
|
|
879
|
+
var r = 1e3, a = 6e4, n = 36e5, d = "millisecond", s = "second", g = "minute", u = "hour", x = "day", C = "week", E = "month", k = "quarter", m = "year", w = "date", M = "Invalid Date", B = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, J = /\[([^\]]+)]|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, j = { 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(p) {
|
|
880
|
+
var c = ["th", "st", "nd", "rd"], o = p % 100;
|
|
881
|
+
return "[" + p + (c[(o - 20) % 10] || c[o] || c[0]) + "]";
|
|
882
|
+
} }, W = function(p, c, o) {
|
|
883
|
+
var f = String(p);
|
|
884
|
+
return !f || f.length >= c ? p : "" + Array(c + 1 - f.length).join(o) + p;
|
|
885
|
+
}, ne = { s: W, z: function(p) {
|
|
886
|
+
var c = -p.utcOffset(), o = Math.abs(c), f = Math.floor(o / 60), l = o % 60;
|
|
887
|
+
return (c <= 0 ? "+" : "-") + W(f, 2, "0") + ":" + W(l, 2, "0");
|
|
888
|
+
}, m: function p(c, o) {
|
|
889
|
+
if (c.date() < o.date())
|
|
890
|
+
return -p(o, c);
|
|
891
|
+
var f = 12 * (o.year() - c.year()) + (o.month() - c.month()), l = c.clone().add(f, E), y = o - l < 0, i = c.clone().add(f + (y ? -1 : 1), E);
|
|
892
|
+
return +(-(f + (o - l) / (y ? l - i : i - l)) || 0);
|
|
893
|
+
}, a: function(p) {
|
|
894
|
+
return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
|
|
895
|
+
}, p: function(p) {
|
|
896
|
+
return { M: E, y: m, w: C, d: x, D: w, h: u, m: g, s, ms: d, Q: k }[p] || String(p || "").toLowerCase().replace(/s$/, "");
|
|
897
|
+
}, u: function(p) {
|
|
898
|
+
return p === void 0;
|
|
899
899
|
} }, Q = "en", q = {};
|
|
900
|
-
q[Q] =
|
|
901
|
-
var re = "$isDayjsObject", Z = function(
|
|
902
|
-
return
|
|
903
|
-
}, ee = function
|
|
904
|
-
var
|
|
905
|
-
if (!
|
|
900
|
+
q[Q] = j;
|
|
901
|
+
var re = "$isDayjsObject", Z = function(p) {
|
|
902
|
+
return p instanceof v || !(!p || !p[re]);
|
|
903
|
+
}, ee = function p(c, o, f) {
|
|
904
|
+
var l;
|
|
905
|
+
if (!c)
|
|
906
906
|
return Q;
|
|
907
|
-
if (typeof
|
|
908
|
-
var y =
|
|
909
|
-
q[y] && (
|
|
910
|
-
var
|
|
911
|
-
if (!
|
|
912
|
-
return
|
|
907
|
+
if (typeof c == "string") {
|
|
908
|
+
var y = c.toLowerCase();
|
|
909
|
+
q[y] && (l = y), o && (q[y] = o, l = y);
|
|
910
|
+
var i = c.split("-");
|
|
911
|
+
if (!l && i.length > 1)
|
|
912
|
+
return p(i[0]);
|
|
913
913
|
} else {
|
|
914
|
-
var
|
|
915
|
-
q[
|
|
914
|
+
var D = c.name;
|
|
915
|
+
q[D] = c, l = D;
|
|
916
916
|
}
|
|
917
|
-
return !
|
|
918
|
-
}, X = function(
|
|
919
|
-
if (Z(
|
|
920
|
-
return
|
|
921
|
-
var o = typeof
|
|
922
|
-
return o.date =
|
|
923
|
-
},
|
|
924
|
-
|
|
925
|
-
return X(
|
|
917
|
+
return !f && l && (Q = l), l || !f && Q;
|
|
918
|
+
}, X = function(p, c) {
|
|
919
|
+
if (Z(p))
|
|
920
|
+
return p.clone();
|
|
921
|
+
var o = typeof c == "object" ? c : {};
|
|
922
|
+
return o.date = p, o.args = arguments, new v(o);
|
|
923
|
+
}, H = ne;
|
|
924
|
+
H.l = ee, H.i = Z, H.w = function(p, c) {
|
|
925
|
+
return X(p, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
|
926
926
|
};
|
|
927
|
-
var
|
|
928
|
-
function
|
|
927
|
+
var v = function() {
|
|
928
|
+
function p(o) {
|
|
929
929
|
this.$L = ee(o.locale, null, !0), this.parse(o), this.$x = this.$x || o.x || {}, this[re] = !0;
|
|
930
930
|
}
|
|
931
|
-
var
|
|
932
|
-
return
|
|
933
|
-
this.$d = function(
|
|
934
|
-
var
|
|
935
|
-
if (
|
|
931
|
+
var c = p.prototype;
|
|
932
|
+
return c.parse = function(o) {
|
|
933
|
+
this.$d = function(f) {
|
|
934
|
+
var l = f.date, y = f.utc;
|
|
935
|
+
if (l === null)
|
|
936
936
|
return /* @__PURE__ */ new Date(NaN);
|
|
937
|
-
if (
|
|
937
|
+
if (H.u(l))
|
|
938
938
|
return /* @__PURE__ */ new Date();
|
|
939
|
-
if (
|
|
940
|
-
return new Date(
|
|
941
|
-
if (typeof
|
|
942
|
-
var
|
|
943
|
-
if (
|
|
944
|
-
var
|
|
945
|
-
return y ? new Date(Date.UTC(
|
|
939
|
+
if (l instanceof Date)
|
|
940
|
+
return new Date(l);
|
|
941
|
+
if (typeof l == "string" && !/Z$/i.test(l)) {
|
|
942
|
+
var i = l.match(B);
|
|
943
|
+
if (i) {
|
|
944
|
+
var D = i[2] - 1 || 0, S = (i[7] || "0").substring(0, 3);
|
|
945
|
+
return y ? new Date(Date.UTC(i[1], D, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, S)) : new Date(i[1], D, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, S);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
-
return new Date(
|
|
948
|
+
return new Date(l);
|
|
949
949
|
}(o), this.init();
|
|
950
|
-
},
|
|
950
|
+
}, c.init = function() {
|
|
951
951
|
var o = this.$d;
|
|
952
952
|
this.$y = o.getFullYear(), this.$M = o.getMonth(), this.$D = o.getDate(), this.$W = o.getDay(), this.$H = o.getHours(), this.$m = o.getMinutes(), this.$s = o.getSeconds(), this.$ms = o.getMilliseconds();
|
|
953
|
-
},
|
|
954
|
-
return
|
|
955
|
-
},
|
|
956
|
-
return this.$d.toString() !==
|
|
957
|
-
},
|
|
958
|
-
var
|
|
959
|
-
return this.startOf(
|
|
960
|
-
},
|
|
961
|
-
return X(o) < this.startOf(
|
|
962
|
-
},
|
|
963
|
-
return this.endOf(
|
|
964
|
-
},
|
|
965
|
-
return
|
|
966
|
-
},
|
|
953
|
+
}, c.$utils = function() {
|
|
954
|
+
return H;
|
|
955
|
+
}, c.isValid = function() {
|
|
956
|
+
return this.$d.toString() !== M;
|
|
957
|
+
}, c.isSame = function(o, f) {
|
|
958
|
+
var l = X(o);
|
|
959
|
+
return this.startOf(f) <= l && l <= this.endOf(f);
|
|
960
|
+
}, c.isAfter = function(o, f) {
|
|
961
|
+
return X(o) < this.startOf(f);
|
|
962
|
+
}, c.isBefore = function(o, f) {
|
|
963
|
+
return this.endOf(f) < X(o);
|
|
964
|
+
}, c.$g = function(o, f, l) {
|
|
965
|
+
return H.u(o) ? this[f] : this.set(l, o);
|
|
966
|
+
}, c.unix = function() {
|
|
967
967
|
return Math.floor(this.valueOf() / 1e3);
|
|
968
|
-
},
|
|
968
|
+
}, c.valueOf = function() {
|
|
969
969
|
return this.$d.getTime();
|
|
970
|
-
},
|
|
971
|
-
var
|
|
972
|
-
var
|
|
973
|
-
return y ?
|
|
974
|
-
},
|
|
975
|
-
return
|
|
976
|
-
},
|
|
977
|
-
switch (
|
|
978
|
-
case
|
|
979
|
-
return y ?
|
|
970
|
+
}, c.startOf = function(o, f) {
|
|
971
|
+
var l = this, y = !!H.u(f) || f, i = H.p(o), D = function(T, _) {
|
|
972
|
+
var $ = H.w(l.$u ? Date.UTC(l.$y, _, T) : new Date(l.$y, _, T), l);
|
|
973
|
+
return y ? $ : $.endOf(x);
|
|
974
|
+
}, S = function(T, _) {
|
|
975
|
+
return H.w(l.toDate()[T].apply(l.toDate("s"), (y ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(_)), l);
|
|
976
|
+
}, P = this.$W, V = this.$M, L = this.$D, N = "set" + (this.$u ? "UTC" : "");
|
|
977
|
+
switch (i) {
|
|
978
|
+
case m:
|
|
979
|
+
return y ? D(1, 0) : D(31, 11);
|
|
980
980
|
case E:
|
|
981
|
-
return y ?
|
|
981
|
+
return y ? D(1, V) : D(0, V + 1);
|
|
982
982
|
case C:
|
|
983
|
-
var
|
|
984
|
-
return
|
|
983
|
+
var F = this.$locale().weekStart || 0, O = (P < F ? P + 7 : P) - F;
|
|
984
|
+
return D(y ? L - O : L + (6 - O), V);
|
|
985
985
|
case x:
|
|
986
|
-
case
|
|
987
|
-
return
|
|
988
|
-
case
|
|
989
|
-
return
|
|
990
|
-
case
|
|
991
|
-
return
|
|
986
|
+
case w:
|
|
987
|
+
return S(N + "Hours", 0);
|
|
988
|
+
case u:
|
|
989
|
+
return S(N + "Minutes", 1);
|
|
990
|
+
case g:
|
|
991
|
+
return S(N + "Seconds", 2);
|
|
992
992
|
case s:
|
|
993
|
-
return
|
|
993
|
+
return S(N + "Milliseconds", 3);
|
|
994
994
|
default:
|
|
995
995
|
return this.clone();
|
|
996
996
|
}
|
|
997
|
-
},
|
|
997
|
+
}, c.endOf = function(o) {
|
|
998
998
|
return this.startOf(o, !1);
|
|
999
|
-
},
|
|
1000
|
-
var
|
|
1001
|
-
if (y === E || y ===
|
|
1002
|
-
var
|
|
1003
|
-
|
|
999
|
+
}, c.$set = function(o, f) {
|
|
1000
|
+
var l, y = H.p(o), i = "set" + (this.$u ? "UTC" : ""), D = (l = {}, l[x] = i + "Date", l[w] = i + "Date", l[E] = i + "Month", l[m] = i + "FullYear", l[u] = i + "Hours", l[g] = i + "Minutes", l[s] = i + "Seconds", l[d] = i + "Milliseconds", l)[y], S = y === x ? this.$D + (f - this.$W) : f;
|
|
1001
|
+
if (y === E || y === m) {
|
|
1002
|
+
var P = this.clone().set(w, 1);
|
|
1003
|
+
P.$d[D](S), P.init(), this.$d = P.set(w, Math.min(this.$D, P.daysInMonth())).$d;
|
|
1004
1004
|
} else
|
|
1005
|
-
|
|
1005
|
+
D && this.$d[D](S);
|
|
1006
1006
|
return this.init(), this;
|
|
1007
|
-
},
|
|
1008
|
-
return this.clone().$set(o,
|
|
1009
|
-
},
|
|
1010
|
-
return this[
|
|
1011
|
-
},
|
|
1012
|
-
var
|
|
1007
|
+
}, c.set = function(o, f) {
|
|
1008
|
+
return this.clone().$set(o, f);
|
|
1009
|
+
}, c.get = function(o) {
|
|
1010
|
+
return this[H.p(o)]();
|
|
1011
|
+
}, c.add = function(o, f) {
|
|
1012
|
+
var l, y = this;
|
|
1013
1013
|
o = Number(o);
|
|
1014
|
-
var
|
|
1014
|
+
var i = H.p(f), D = function(V) {
|
|
1015
1015
|
var L = X(y);
|
|
1016
|
-
return
|
|
1016
|
+
return H.w(L.date(L.date() + Math.round(V * o)), y);
|
|
1017
1017
|
};
|
|
1018
|
-
if (
|
|
1018
|
+
if (i === E)
|
|
1019
1019
|
return this.set(E, this.$M + o);
|
|
1020
|
-
if (
|
|
1021
|
-
return this.set(
|
|
1022
|
-
if (
|
|
1023
|
-
return
|
|
1024
|
-
if (
|
|
1025
|
-
return
|
|
1026
|
-
var
|
|
1027
|
-
return
|
|
1028
|
-
},
|
|
1029
|
-
return this.add(-1 * o,
|
|
1030
|
-
},
|
|
1031
|
-
var
|
|
1020
|
+
if (i === m)
|
|
1021
|
+
return this.set(m, this.$y + o);
|
|
1022
|
+
if (i === x)
|
|
1023
|
+
return D(1);
|
|
1024
|
+
if (i === C)
|
|
1025
|
+
return D(7);
|
|
1026
|
+
var S = (l = {}, l[g] = a, l[u] = n, l[s] = r, l)[i] || 1, P = this.$d.getTime() + o * S;
|
|
1027
|
+
return H.w(P, this);
|
|
1028
|
+
}, c.subtract = function(o, f) {
|
|
1029
|
+
return this.add(-1 * o, f);
|
|
1030
|
+
}, c.format = function(o) {
|
|
1031
|
+
var f = this, l = this.$locale();
|
|
1032
1032
|
if (!this.isValid())
|
|
1033
|
-
return
|
|
1034
|
-
var y = o || "YYYY-MM-DDTHH:mm:ssZ",
|
|
1035
|
-
return
|
|
1036
|
-
},
|
|
1037
|
-
return
|
|
1038
|
-
}, T =
|
|
1039
|
-
var I =
|
|
1040
|
-
return
|
|
1033
|
+
return l.invalidDate || M;
|
|
1034
|
+
var y = o || "YYYY-MM-DDTHH:mm:ssZ", i = H.z(this), D = this.$H, S = this.$m, P = this.$M, V = l.weekdays, L = l.months, N = l.meridiem, F = function(_, $, A, I) {
|
|
1035
|
+
return _ && (_[$] || _(f, y)) || A[$].slice(0, I);
|
|
1036
|
+
}, O = function(_) {
|
|
1037
|
+
return H.s(D % 12 || 12, _, "0");
|
|
1038
|
+
}, T = N || function(_, $, A) {
|
|
1039
|
+
var I = _ < 12 ? "AM" : "PM";
|
|
1040
|
+
return A ? I.toLowerCase() : I;
|
|
1041
1041
|
};
|
|
1042
|
-
return y.replace(J, function(
|
|
1043
|
-
return
|
|
1044
|
-
switch (
|
|
1042
|
+
return y.replace(J, function(_, $) {
|
|
1043
|
+
return $ || function(A) {
|
|
1044
|
+
switch (A) {
|
|
1045
1045
|
case "YY":
|
|
1046
|
-
return String(
|
|
1046
|
+
return String(f.$y).slice(-2);
|
|
1047
1047
|
case "YYYY":
|
|
1048
|
-
return
|
|
1048
|
+
return H.s(f.$y, 4, "0");
|
|
1049
1049
|
case "M":
|
|
1050
|
-
return
|
|
1050
|
+
return P + 1;
|
|
1051
1051
|
case "MM":
|
|
1052
|
-
return
|
|
1052
|
+
return H.s(P + 1, 2, "0");
|
|
1053
1053
|
case "MMM":
|
|
1054
|
-
return
|
|
1054
|
+
return F(l.monthsShort, P, L, 3);
|
|
1055
1055
|
case "MMMM":
|
|
1056
|
-
return
|
|
1056
|
+
return F(L, P);
|
|
1057
1057
|
case "D":
|
|
1058
|
-
return
|
|
1058
|
+
return f.$D;
|
|
1059
1059
|
case "DD":
|
|
1060
|
-
return
|
|
1060
|
+
return H.s(f.$D, 2, "0");
|
|
1061
1061
|
case "d":
|
|
1062
|
-
return String(
|
|
1062
|
+
return String(f.$W);
|
|
1063
1063
|
case "dd":
|
|
1064
|
-
return
|
|
1064
|
+
return F(l.weekdaysMin, f.$W, V, 2);
|
|
1065
1065
|
case "ddd":
|
|
1066
|
-
return
|
|
1066
|
+
return F(l.weekdaysShort, f.$W, V, 3);
|
|
1067
1067
|
case "dddd":
|
|
1068
|
-
return
|
|
1068
|
+
return V[f.$W];
|
|
1069
1069
|
case "H":
|
|
1070
|
-
return String(
|
|
1070
|
+
return String(D);
|
|
1071
1071
|
case "HH":
|
|
1072
|
-
return
|
|
1072
|
+
return H.s(D, 2, "0");
|
|
1073
1073
|
case "h":
|
|
1074
|
-
return
|
|
1074
|
+
return O(1);
|
|
1075
1075
|
case "hh":
|
|
1076
|
-
return
|
|
1076
|
+
return O(2);
|
|
1077
1077
|
case "a":
|
|
1078
|
-
return T(S,
|
|
1078
|
+
return T(D, S, !0);
|
|
1079
1079
|
case "A":
|
|
1080
|
-
return T(S,
|
|
1080
|
+
return T(D, S, !1);
|
|
1081
1081
|
case "m":
|
|
1082
|
-
return String(
|
|
1082
|
+
return String(S);
|
|
1083
1083
|
case "mm":
|
|
1084
|
-
return
|
|
1084
|
+
return H.s(S, 2, "0");
|
|
1085
1085
|
case "s":
|
|
1086
|
-
return String(
|
|
1086
|
+
return String(f.$s);
|
|
1087
1087
|
case "ss":
|
|
1088
|
-
return
|
|
1088
|
+
return H.s(f.$s, 2, "0");
|
|
1089
1089
|
case "SSS":
|
|
1090
|
-
return
|
|
1090
|
+
return H.s(f.$ms, 3, "0");
|
|
1091
1091
|
case "Z":
|
|
1092
|
-
return
|
|
1092
|
+
return i;
|
|
1093
1093
|
}
|
|
1094
1094
|
return null;
|
|
1095
|
-
}(
|
|
1095
|
+
}(_) || i.replace(":", "");
|
|
1096
1096
|
});
|
|
1097
|
-
},
|
|
1097
|
+
}, c.utcOffset = function() {
|
|
1098
1098
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1099
|
-
},
|
|
1100
|
-
var y,
|
|
1101
|
-
return
|
|
1099
|
+
}, c.diff = function(o, f, l) {
|
|
1100
|
+
var y, i = this, D = H.p(f), S = X(o), P = (S.utcOffset() - this.utcOffset()) * a, V = this - S, L = function() {
|
|
1101
|
+
return H.m(i, S);
|
|
1102
1102
|
};
|
|
1103
|
-
switch (
|
|
1104
|
-
case
|
|
1103
|
+
switch (D) {
|
|
1104
|
+
case m:
|
|
1105
1105
|
y = L() / 12;
|
|
1106
1106
|
break;
|
|
1107
1107
|
case E:
|
|
1108
1108
|
y = L();
|
|
1109
1109
|
break;
|
|
1110
|
-
case
|
|
1110
|
+
case k:
|
|
1111
1111
|
y = L() / 3;
|
|
1112
1112
|
break;
|
|
1113
1113
|
case C:
|
|
1114
|
-
y = (
|
|
1114
|
+
y = (V - P) / 6048e5;
|
|
1115
1115
|
break;
|
|
1116
1116
|
case x:
|
|
1117
|
-
y = (
|
|
1117
|
+
y = (V - P) / 864e5;
|
|
1118
1118
|
break;
|
|
1119
|
-
case
|
|
1120
|
-
y =
|
|
1119
|
+
case u:
|
|
1120
|
+
y = V / n;
|
|
1121
1121
|
break;
|
|
1122
|
-
case
|
|
1123
|
-
y =
|
|
1122
|
+
case g:
|
|
1123
|
+
y = V / a;
|
|
1124
1124
|
break;
|
|
1125
1125
|
case s:
|
|
1126
|
-
y =
|
|
1126
|
+
y = V / r;
|
|
1127
1127
|
break;
|
|
1128
1128
|
default:
|
|
1129
|
-
y =
|
|
1129
|
+
y = V;
|
|
1130
1130
|
}
|
|
1131
|
-
return
|
|
1132
|
-
},
|
|
1131
|
+
return l ? y : H.a(y);
|
|
1132
|
+
}, c.daysInMonth = function() {
|
|
1133
1133
|
return this.endOf(E).$D;
|
|
1134
|
-
},
|
|
1134
|
+
}, c.$locale = function() {
|
|
1135
1135
|
return q[this.$L];
|
|
1136
|
-
},
|
|
1136
|
+
}, c.locale = function(o, f) {
|
|
1137
1137
|
if (!o)
|
|
1138
1138
|
return this.$L;
|
|
1139
|
-
var
|
|
1140
|
-
return y && (
|
|
1141
|
-
},
|
|
1142
|
-
return
|
|
1143
|
-
},
|
|
1139
|
+
var l = this.clone(), y = ee(o, f, !0);
|
|
1140
|
+
return y && (l.$L = y), l;
|
|
1141
|
+
}, c.clone = function() {
|
|
1142
|
+
return H.w(this.$d, this);
|
|
1143
|
+
}, c.toDate = function() {
|
|
1144
1144
|
return new Date(this.valueOf());
|
|
1145
|
-
},
|
|
1145
|
+
}, c.toJSON = function() {
|
|
1146
1146
|
return this.isValid() ? this.toISOString() : null;
|
|
1147
|
-
},
|
|
1147
|
+
}, c.toISOString = function() {
|
|
1148
1148
|
return this.$d.toISOString();
|
|
1149
|
-
},
|
|
1149
|
+
}, c.toString = function() {
|
|
1150
1150
|
return this.$d.toUTCString();
|
|
1151
|
-
},
|
|
1152
|
-
}(),
|
|
1153
|
-
return X.prototype =
|
|
1154
|
-
|
|
1155
|
-
return this.$g(
|
|
1151
|
+
}, p;
|
|
1152
|
+
}(), b = v.prototype;
|
|
1153
|
+
return X.prototype = b, [["$ms", d], ["$s", s], ["$m", g], ["$H", u], ["$W", x], ["$M", E], ["$y", m], ["$D", w]].forEach(function(p) {
|
|
1154
|
+
b[p[1]] = function(c) {
|
|
1155
|
+
return this.$g(c, p[0], p[1]);
|
|
1156
1156
|
};
|
|
1157
|
-
}), X.extend = function(
|
|
1158
|
-
return
|
|
1159
|
-
}, X.locale = ee, X.isDayjs = Z, X.unix = function(
|
|
1160
|
-
return X(1e3 *
|
|
1157
|
+
}), X.extend = function(p, c) {
|
|
1158
|
+
return p.$i || (p(c, v, X), p.$i = !0), X;
|
|
1159
|
+
}, X.locale = ee, X.isDayjs = Z, X.unix = function(p) {
|
|
1160
|
+
return X(1e3 * p);
|
|
1161
1161
|
}, X.en = q[Q], X.Ls = q, X.p = {}, X;
|
|
1162
1162
|
});
|
|
1163
1163
|
})(dayjs_min);
|
|
@@ -1174,55 +1174,55 @@ function copyString(t) {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
1176
|
function componentTransition(t, e = "date") {
|
|
1177
|
-
let r = "ElInput",
|
|
1177
|
+
let r = "ElInput", a = "筛选", n = "";
|
|
1178
1178
|
switch (t) {
|
|
1179
1179
|
case "STRING":
|
|
1180
|
-
r = "ElInput",
|
|
1180
|
+
r = "ElInput", a = "筛选", n = "text";
|
|
1181
1181
|
break;
|
|
1182
1182
|
case "LIST":
|
|
1183
|
-
r = "ElSelect",
|
|
1183
|
+
r = "ElSelect", a = "请选择";
|
|
1184
1184
|
break;
|
|
1185
1185
|
case "TABLE":
|
|
1186
|
-
r = "ElSelect",
|
|
1186
|
+
r = "ElSelect", a = "请选择";
|
|
1187
1187
|
break;
|
|
1188
1188
|
case "TREE":
|
|
1189
|
-
r = "ElTreeSelect",
|
|
1189
|
+
r = "ElTreeSelect", a = "请选择";
|
|
1190
1190
|
break;
|
|
1191
1191
|
case "EDITOR":
|
|
1192
|
-
r = "ElInput",
|
|
1192
|
+
r = "ElInput", a = "筛选", n = "textarea";
|
|
1193
1193
|
break;
|
|
1194
1194
|
case "BOOL":
|
|
1195
|
-
r = "ElSwitch",
|
|
1195
|
+
r = "ElSwitch", a = "请选择";
|
|
1196
1196
|
break;
|
|
1197
1197
|
case "LONG":
|
|
1198
|
-
r = "ElInputNumber",
|
|
1198
|
+
r = "ElInputNumber", a = "筛选";
|
|
1199
1199
|
break;
|
|
1200
1200
|
case "PLONG":
|
|
1201
|
-
r = "ElInputNumber",
|
|
1201
|
+
r = "ElInputNumber", a = "筛选";
|
|
1202
1202
|
break;
|
|
1203
1203
|
case "DOUBLE":
|
|
1204
|
-
r = "ElInputNumber",
|
|
1204
|
+
r = "ElInputNumber", a = "筛选";
|
|
1205
1205
|
break;
|
|
1206
1206
|
case "DATE":
|
|
1207
|
-
r = "ElDatePicker",
|
|
1207
|
+
r = "ElDatePicker", a = "请选择", n = e;
|
|
1208
1208
|
break;
|
|
1209
1209
|
case "DATETIME":
|
|
1210
|
-
r = "ElDatePicker",
|
|
1210
|
+
r = "ElDatePicker", a = "请选择", n = e;
|
|
1211
1211
|
break;
|
|
1212
1212
|
case "TIME":
|
|
1213
|
-
r = "ElTimePicker",
|
|
1213
|
+
r = "ElTimePicker", a = "请选择", n = "time";
|
|
1214
1214
|
break;
|
|
1215
1215
|
case "TEXT":
|
|
1216
|
-
r = "ElInput",
|
|
1216
|
+
r = "ElInput", a = "筛选", n = "text";
|
|
1217
1217
|
break;
|
|
1218
1218
|
case "COLOR":
|
|
1219
|
-
r = "ElColorPicker",
|
|
1219
|
+
r = "ElColorPicker", a = "请选择";
|
|
1220
1220
|
break;
|
|
1221
1221
|
default:
|
|
1222
|
-
r = "ElInput",
|
|
1222
|
+
r = "ElInput", a = "筛选", n = "text";
|
|
1223
1223
|
break;
|
|
1224
1224
|
}
|
|
1225
|
-
return { componentName: r, placeholerPrefix:
|
|
1225
|
+
return { componentName: r, placeholerPrefix: a, type: n };
|
|
1226
1226
|
}
|
|
1227
1227
|
const _hoisted_1$1 = { class: "yh-statement-view-conditions" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1228
1228
|
__name: "report-conditions",
|
|
@@ -1231,86 +1231,86 @@ const _hoisted_1$1 = { class: "yh-statement-view-conditions" }, _sfc_main$4 = /*
|
|
|
1231
1231
|
},
|
|
1232
1232
|
emits: ["change"],
|
|
1233
1233
|
setup(t, { emit: e }) {
|
|
1234
|
-
const r = t,
|
|
1234
|
+
const r = t, a = dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), n = dayjs().endOf("day").format("YYYY-MM-DD HH:mm:ss"), d = dayjs().startOf("month").format("YYYY-MM-DD HH:mm:ss"), s = dayjs().endOf("month").format("YYYY-MM-DD HH:mm:ss"), g = dayjs().add(-2, "month").startOf("month").format("YYYY-MM-DD HH:mm:ss"), u = dayjs().endOf("month").format("YYYY-MM-DD HH:mm:ss"), x = dayjs().startOf("year").format("YYYY-MM-DD HH:mm:ss"), C = dayjs().endOf("year").format("YYYY-MM-DD HH:mm:ss"), E = ref([]), k = ref([]);
|
|
1235
1235
|
watch(
|
|
1236
1236
|
() => r.config,
|
|
1237
1237
|
() => {
|
|
1238
|
-
|
|
1238
|
+
m();
|
|
1239
1239
|
},
|
|
1240
1240
|
{
|
|
1241
1241
|
immediate: !0,
|
|
1242
1242
|
deep: !0
|
|
1243
1243
|
}
|
|
1244
1244
|
);
|
|
1245
|
-
function
|
|
1245
|
+
function m() {
|
|
1246
1246
|
let B = [];
|
|
1247
1247
|
if (E.value = [], r.config && r.config.length) {
|
|
1248
1248
|
for (let J = 0; J < r.config.length; J++) {
|
|
1249
|
-
const
|
|
1250
|
-
let { dataType: W, dateType: ne, type: Q, selectorId: q, name: re, columnName: Z, defaultValue: ee, isNull: X } =
|
|
1251
|
-
const { componentName:
|
|
1252
|
-
|
|
1253
|
-
let
|
|
1254
|
-
if (
|
|
1249
|
+
const j = cloneDeep(r.config[J]);
|
|
1250
|
+
let { dataType: W, dateType: ne, type: Q, selectorId: q, name: re, columnName: Z, defaultValue: ee, isNull: X } = j, H = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(W);
|
|
1251
|
+
const { componentName: v, placeholerPrefix: b, type: p } = componentTransition(W, ne);
|
|
1252
|
+
j.formItemType = v, j.placeholder = b + re || Z, p && (j.type = p), j.optionData = [];
|
|
1253
|
+
let c = ee || "";
|
|
1254
|
+
if (H)
|
|
1255
1255
|
switch (ee) {
|
|
1256
1256
|
case "today":
|
|
1257
|
-
|
|
1257
|
+
c = a;
|
|
1258
1258
|
break;
|
|
1259
1259
|
case "thisMonth":
|
|
1260
|
-
|
|
1260
|
+
c = d;
|
|
1261
1261
|
break;
|
|
1262
1262
|
case "threeMonth":
|
|
1263
|
-
|
|
1263
|
+
c = g;
|
|
1264
1264
|
break;
|
|
1265
1265
|
case "thisYear":
|
|
1266
|
-
|
|
1266
|
+
c = x;
|
|
1267
1267
|
break;
|
|
1268
1268
|
}
|
|
1269
|
-
if (
|
|
1269
|
+
if (j.value = c, E.value.push({
|
|
1270
1270
|
name: Z,
|
|
1271
|
-
value:
|
|
1271
|
+
value: c,
|
|
1272
1272
|
type: Q,
|
|
1273
1273
|
isNull: X
|
|
1274
1274
|
}), q && axios.request({
|
|
1275
1275
|
url: `/windowDesign/getSelectorList?selectorId=${q}`,
|
|
1276
1276
|
method: "POST"
|
|
1277
1277
|
}).then((o) => {
|
|
1278
|
-
o.data && o.data.data && (
|
|
1279
|
-
label:
|
|
1280
|
-
value:
|
|
1278
|
+
o.data && o.data.data && (j.optionData = o.data.data.map(({ name: f, value: l }) => ({
|
|
1279
|
+
label: f,
|
|
1280
|
+
value: l
|
|
1281
1281
|
})));
|
|
1282
|
-
}), B.push(
|
|
1283
|
-
|
|
1284
|
-
const o = cloneDeep(
|
|
1285
|
-
o.name = "-", o.columnName = `end_${Z}`, o.placeholder =
|
|
1286
|
-
let
|
|
1287
|
-
if (
|
|
1282
|
+
}), B.push(j), Q === "LT_GT_EQ") {
|
|
1283
|
+
j.placeholder = b + "开始";
|
|
1284
|
+
const o = cloneDeep(j);
|
|
1285
|
+
o.name = "-", o.columnName = `end_${Z}`, o.placeholder = b + "结束";
|
|
1286
|
+
let f = ee || "";
|
|
1287
|
+
if (H)
|
|
1288
1288
|
switch (ee) {
|
|
1289
1289
|
case "today":
|
|
1290
|
-
|
|
1290
|
+
f = n;
|
|
1291
1291
|
break;
|
|
1292
1292
|
case "thisMonth":
|
|
1293
|
-
|
|
1293
|
+
f = s;
|
|
1294
1294
|
break;
|
|
1295
1295
|
case "threeMonth":
|
|
1296
|
-
|
|
1296
|
+
f = u;
|
|
1297
1297
|
break;
|
|
1298
1298
|
case "thisYear":
|
|
1299
|
-
|
|
1299
|
+
f = C;
|
|
1300
1300
|
break;
|
|
1301
1301
|
}
|
|
1302
1302
|
E.value.push({
|
|
1303
1303
|
name: `end_${Z}`,
|
|
1304
|
-
value:
|
|
1304
|
+
value: f,
|
|
1305
1305
|
type: Q,
|
|
1306
1306
|
isNull: X
|
|
1307
1307
|
}), q && axios.request({
|
|
1308
1308
|
url: `/windowDesign/getSelectorList?selectorId=${q}`,
|
|
1309
1309
|
method: "POST"
|
|
1310
|
-
}).then((
|
|
1311
|
-
|
|
1310
|
+
}).then((l) => {
|
|
1311
|
+
l.data && l.data.data && (o.optionData = l.data.data.map(({ name: y, value: i }) => ({
|
|
1312
1312
|
label: y,
|
|
1313
|
-
value:
|
|
1313
|
+
value: i
|
|
1314
1314
|
})));
|
|
1315
1315
|
}), B.push(o);
|
|
1316
1316
|
}
|
|
@@ -1319,55 +1319,55 @@ const _hoisted_1$1 = { class: "yh-statement-view-conditions" }, _sfc_main$4 = /*
|
|
|
1319
1319
|
e("change", E.value);
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
|
-
|
|
1322
|
+
k.value = B;
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1325
|
-
let
|
|
1326
|
-
J.value = B, E.value[
|
|
1324
|
+
function w(B, J) {
|
|
1325
|
+
let j = E.value.findIndex((W) => W.name === J.columnName);
|
|
1326
|
+
J.value = B, E.value[j].value = B, ["ElSelect", "ElTreeSelect", "ElSwitch", "ElDatePicker", "ElTimePicker", "ElColorPicker"].includes(J.formItemType) && e("change", E.value);
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function M(B) {
|
|
1329
1329
|
["ElInput", "ElInputNumber"].includes(B.formItemType) && e("change", E.value);
|
|
1330
1330
|
}
|
|
1331
1331
|
return (B, J) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1332
1332
|
createVNode(unref(ElForm), { inline: "" }, {
|
|
1333
1333
|
default: withCtx(() => [
|
|
1334
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1335
|
-
label:
|
|
1336
|
-
style: normalizeStyle(
|
|
1334
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(k.value, (j) => withDirectives((openBlock(), createBlock(unref(ElFormItem), {
|
|
1335
|
+
label: j.name,
|
|
1336
|
+
style: normalizeStyle(j.columnName.indexOf("end_") > -1 ? { marginLeft: "-22px" } : {})
|
|
1337
1337
|
}, {
|
|
1338
1338
|
default: withCtx(() => [
|
|
1339
|
-
|
|
1339
|
+
j.formItemType === "ElSelect" ? (openBlock(), createBlock(resolveDynamicComponent(j.formItemType), {
|
|
1340
1340
|
key: 0,
|
|
1341
|
-
"model-value":
|
|
1342
|
-
type:
|
|
1341
|
+
"model-value": j.value,
|
|
1342
|
+
type: j.type,
|
|
1343
1343
|
clearable: "",
|
|
1344
|
-
placeholder:
|
|
1345
|
-
"onUpdate:modelValue": (W) =>
|
|
1344
|
+
placeholder: j.placeholder,
|
|
1345
|
+
"onUpdate:modelValue": (W) => w(W, j)
|
|
1346
1346
|
}, {
|
|
1347
1347
|
default: withCtx(() => [
|
|
1348
1348
|
createElementVNode("template", null, [
|
|
1349
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1349
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(j.optionData, (W) => (openBlock(), createBlock(unref(ElOption), {
|
|
1350
1350
|
label: W.label,
|
|
1351
1351
|
value: W.value
|
|
1352
1352
|
}, null, 8, ["label", "value"]))), 256))
|
|
1353
1353
|
])
|
|
1354
1354
|
]),
|
|
1355
1355
|
_: 2
|
|
1356
|
-
}, 1032, ["model-value", "type", "placeholder", "onUpdate:modelValue"])) : (openBlock(), createBlock(resolveDynamicComponent(
|
|
1356
|
+
}, 1032, ["model-value", "type", "placeholder", "onUpdate:modelValue"])) : (openBlock(), createBlock(resolveDynamicComponent(j.formItemType), {
|
|
1357
1357
|
key: 1,
|
|
1358
|
-
"model-value":
|
|
1359
|
-
type:
|
|
1358
|
+
"model-value": j.value,
|
|
1359
|
+
type: j.type,
|
|
1360
1360
|
clearable: "",
|
|
1361
1361
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
1362
|
-
placeholder:
|
|
1363
|
-
onBlur: (W) =>
|
|
1364
|
-
onKeyup: withKeys((W) =>
|
|
1365
|
-
"onUpdate:modelValue": (W) =>
|
|
1362
|
+
placeholder: j.placeholder,
|
|
1363
|
+
onBlur: (W) => M(j),
|
|
1364
|
+
onKeyup: withKeys((W) => M(j), ["enter"]),
|
|
1365
|
+
"onUpdate:modelValue": (W) => w(W, j)
|
|
1366
1366
|
}, null, 40, ["model-value", "type", "placeholder", "onBlur", "onKeyup", "onUpdate:modelValue"]))
|
|
1367
1367
|
]),
|
|
1368
1368
|
_: 2
|
|
1369
1369
|
}, 1032, ["label", "style"])), [
|
|
1370
|
-
[vShow,
|
|
1370
|
+
[vShow, j.isShow]
|
|
1371
1371
|
])), 256))
|
|
1372
1372
|
]),
|
|
1373
1373
|
_: 1
|
|
@@ -1401,8 +1401,8 @@ function getDateSourceData(t, e = {
|
|
|
1401
1401
|
method: "POST",
|
|
1402
1402
|
data: e
|
|
1403
1403
|
}).then((r) => {
|
|
1404
|
-
var
|
|
1405
|
-
return r != null && r.data && ((
|
|
1404
|
+
var a;
|
|
1405
|
+
return r != null && r.data && ((a = r.data) != null && a.data) ? Promise.resolve(r.data) : Promise.resolve([]);
|
|
1406
1406
|
});
|
|
1407
1407
|
}
|
|
1408
1408
|
function renderCellStyle(t) {
|
|
@@ -1436,27 +1436,27 @@ function renderCellStyle(t) {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
function formatNumber(t, { numberDecimal: e, numberUseGrouping: r } = {}) {
|
|
1438
1438
|
typeof t == "string" && (t = t.replace(/,/g, "")), t = parseFloat(t), isNaN(t) && (t = 0);
|
|
1439
|
-
const
|
|
1439
|
+
const a = e === 0 ? Math.round(t) : t.toFixed(e);
|
|
1440
1440
|
if (r) {
|
|
1441
|
-
const n =
|
|
1441
|
+
const n = a.toString().split(".");
|
|
1442
1442
|
return n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), n.join(".");
|
|
1443
1443
|
} else
|
|
1444
|
-
return
|
|
1444
|
+
return a;
|
|
1445
1445
|
}
|
|
1446
|
-
function formatCurrency(t, { numberDecimal: e, currencySymbol: r, numberUseGrouping:
|
|
1446
|
+
function formatCurrency(t, { numberDecimal: e, currencySymbol: r, numberUseGrouping: a } = {}) {
|
|
1447
1447
|
if (typeof t == "string" && (t = t.replace(/,/g, "")), t = parseFloat(t), isNaN(t))
|
|
1448
1448
|
throw new Error("Invalid number input");
|
|
1449
1449
|
const n = e === 0 ? Math.round(t) : parseFloat(t.toFixed(e));
|
|
1450
|
-
let [
|
|
1451
|
-
|
|
1452
|
-
let
|
|
1453
|
-
return e > 0 && (
|
|
1450
|
+
let [d, s] = n.toString().split(".");
|
|
1451
|
+
a && (d = d.replace(/\B(?=(\d{3})+(?!\d))/g, ","));
|
|
1452
|
+
let g = `${r}${d}`;
|
|
1453
|
+
return e > 0 && (g += `.${s}`), g;
|
|
1454
1454
|
}
|
|
1455
1455
|
function formatPercentage(t, { numberDecimal: e } = {}, r = !1) {
|
|
1456
1456
|
if (typeof t == "string" && (t = t.replace(/,/g, "")), t = parseFloat(t), isNaN(t))
|
|
1457
1457
|
return t;
|
|
1458
|
-
const
|
|
1459
|
-
return r ? `${
|
|
1458
|
+
const a = e === 0 ? Math.round(t) : t.toFixed(e);
|
|
1459
|
+
return r ? `${a}‰` : `${a}%`;
|
|
1460
1460
|
}
|
|
1461
1461
|
function formatScientific(t, { scientificNotation: e = "e", digits: r = 6 } = {}) {
|
|
1462
1462
|
return typeof t == "string" && (t = t.replace(/,/g, "")), t = parseFloat(t), isNaN(t) ? t : t.toExponential(r).replace(/e/, e);
|
|
@@ -1466,14 +1466,14 @@ function formatDatetime(t, { date: e = "YYYY-MM-DD HH:mm:ss" } = {}) {
|
|
|
1466
1466
|
return t;
|
|
1467
1467
|
let r;
|
|
1468
1468
|
if (typeof t == "number") {
|
|
1469
|
-
const
|
|
1470
|
-
r = dayjs(
|
|
1469
|
+
const a = t < 1e10 ? t * 1e3 : t;
|
|
1470
|
+
r = dayjs(a);
|
|
1471
1471
|
} else if (typeof t == "string") {
|
|
1472
|
-
const
|
|
1473
|
-
if (isNaN(
|
|
1472
|
+
const a = Number(t);
|
|
1473
|
+
if (isNaN(a))
|
|
1474
1474
|
r = dayjs(t);
|
|
1475
1475
|
else {
|
|
1476
|
-
const n =
|
|
1476
|
+
const n = a < 1e10 ? a * 1e3 : a;
|
|
1477
1477
|
r = dayjs(n);
|
|
1478
1478
|
}
|
|
1479
1479
|
} else
|
|
@@ -1500,19 +1500,19 @@ function formatCellValue(t, e, r) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
var zhCn$1 = { exports: {} };
|
|
1502
1502
|
(function(t, e) {
|
|
1503
|
-
(function(r,
|
|
1504
|
-
t.exports =
|
|
1503
|
+
(function(r, a) {
|
|
1504
|
+
t.exports = a(dayjs_minExports);
|
|
1505
1505
|
})(commonjsGlobal, function(r) {
|
|
1506
|
-
function
|
|
1506
|
+
function a(s) {
|
|
1507
1507
|
return s && typeof s == "object" && "default" in s ? s : { default: s };
|
|
1508
1508
|
}
|
|
1509
|
-
var n =
|
|
1510
|
-
return
|
|
1511
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(s,
|
|
1512
|
-
var
|
|
1513
|
-
return
|
|
1509
|
+
var n = a(r), d = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(s, g) {
|
|
1510
|
+
return g === "W" ? s + "周" : s + "日";
|
|
1511
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(s, g) {
|
|
1512
|
+
var u = 100 * s + g;
|
|
1513
|
+
return u < 600 ? "凌晨" : u < 900 ? "早上" : u < 1100 ? "上午" : u < 1300 ? "中午" : u < 1800 ? "下午" : "晚上";
|
|
1514
1514
|
} };
|
|
1515
|
-
return n.default.locale(
|
|
1515
|
+
return n.default.locale(d, null, !0), d;
|
|
1516
1516
|
});
|
|
1517
1517
|
})(zhCn$1);
|
|
1518
1518
|
var zhCnExports = zhCn$1.exports;
|
|
@@ -1551,13 +1551,13 @@ class Hooks {
|
|
|
1551
1551
|
* @param {?boolean} [first=false] Will add the hook to the top of the list (defaults to the bottom)
|
|
1552
1552
|
* @public
|
|
1553
1553
|
*/
|
|
1554
|
-
add(e, r,
|
|
1554
|
+
add(e, r, a) {
|
|
1555
1555
|
if (typeof arguments[0] != "string")
|
|
1556
1556
|
for (let n in arguments[0])
|
|
1557
1557
|
this.add(n, arguments[0][n], arguments[1]);
|
|
1558
1558
|
else
|
|
1559
1559
|
(Array.isArray(e) ? e : [e]).forEach(function(n) {
|
|
1560
|
-
this[n] = this[n] || [], r && this[n][
|
|
1560
|
+
this[n] = this[n] || [], r && this[n][a ? "unshift" : "push"](r);
|
|
1561
1561
|
}, this);
|
|
1562
1562
|
}
|
|
1563
1563
|
/**
|
|
@@ -1570,8 +1570,8 @@ class Hooks {
|
|
|
1570
1570
|
* @public
|
|
1571
1571
|
*/
|
|
1572
1572
|
run(e, r) {
|
|
1573
|
-
this[e] = this[e] || [], this[e].forEach(function(
|
|
1574
|
-
|
|
1573
|
+
this[e] = this[e] || [], this[e].forEach(function(a) {
|
|
1574
|
+
a.call(r && r.context ? r.context : r, r);
|
|
1575
1575
|
});
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
@@ -1629,8 +1629,8 @@ class Jsep {
|
|
|
1629
1629
|
* @param {boolean} [isRightAssociative=false] whether operator is right-associative
|
|
1630
1630
|
* @returns {Jsep}
|
|
1631
1631
|
*/
|
|
1632
|
-
static addBinaryOp(e, r,
|
|
1633
|
-
return Jsep.max_binop_len = Math.max(e.length, Jsep.max_binop_len), Jsep.binary_ops[e] = r,
|
|
1632
|
+
static addBinaryOp(e, r, a) {
|
|
1633
|
+
return Jsep.max_binop_len = Math.max(e.length, Jsep.max_binop_len), Jsep.binary_ops[e] = r, a ? Jsep.right_associative.add(e) : Jsep.right_associative.delete(e), Jsep;
|
|
1634
1634
|
}
|
|
1635
1635
|
/**
|
|
1636
1636
|
* @method addIdentifierChar
|
|
@@ -1788,8 +1788,8 @@ class Jsep {
|
|
|
1788
1788
|
*/
|
|
1789
1789
|
runHook(e, r) {
|
|
1790
1790
|
if (Jsep.hooks[e]) {
|
|
1791
|
-
const
|
|
1792
|
-
return Jsep.hooks.run(e,
|
|
1791
|
+
const a = { context: this, node: r };
|
|
1792
|
+
return Jsep.hooks.run(e, a), a.node;
|
|
1793
1793
|
}
|
|
1794
1794
|
return r;
|
|
1795
1795
|
}
|
|
@@ -1801,8 +1801,8 @@ class Jsep {
|
|
|
1801
1801
|
searchHook(e) {
|
|
1802
1802
|
if (Jsep.hooks[e]) {
|
|
1803
1803
|
const r = { context: this };
|
|
1804
|
-
return Jsep.hooks[e].find(function(
|
|
1805
|
-
return
|
|
1804
|
+
return Jsep.hooks[e].find(function(a) {
|
|
1805
|
+
return a.call(r.context, r), r.node;
|
|
1806
1806
|
}), r.node;
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
@@ -1833,14 +1833,14 @@ class Jsep {
|
|
|
1833
1833
|
* @returns {jsep.Expression[]}
|
|
1834
1834
|
*/
|
|
1835
1835
|
gobbleExpressions(e) {
|
|
1836
|
-
let r = [],
|
|
1836
|
+
let r = [], a, n;
|
|
1837
1837
|
for (; this.index < this.expr.length; )
|
|
1838
|
-
if (
|
|
1838
|
+
if (a = this.code, a === Jsep.SEMCOL_CODE || a === Jsep.COMMA_CODE)
|
|
1839
1839
|
this.index++;
|
|
1840
1840
|
else if (n = this.gobbleExpression())
|
|
1841
1841
|
r.push(n);
|
|
1842
1842
|
else if (this.index < this.expr.length) {
|
|
1843
|
-
if (
|
|
1843
|
+
if (a === e)
|
|
1844
1844
|
break;
|
|
1845
1845
|
this.throwError('Unexpected "' + this.char + '"');
|
|
1846
1846
|
}
|
|
@@ -1877,32 +1877,32 @@ class Jsep {
|
|
|
1877
1877
|
* @returns {?jsep.BinaryExpression}
|
|
1878
1878
|
*/
|
|
1879
1879
|
gobbleBinaryExpression() {
|
|
1880
|
-
let e, r,
|
|
1880
|
+
let e, r, a, n, d, s, g, u, x;
|
|
1881
1881
|
if (s = this.gobbleToken(), !s || (r = this.gobbleBinaryOp(), !r))
|
|
1882
1882
|
return s;
|
|
1883
|
-
for (
|
|
1884
|
-
if (
|
|
1883
|
+
for (d = { value: r, prec: Jsep.binaryPrecedence(r), right_a: Jsep.right_associative.has(r) }, g = this.gobbleToken(), g || this.throwError("Expected expression after " + r), n = [s, d, g]; r = this.gobbleBinaryOp(); ) {
|
|
1884
|
+
if (a = Jsep.binaryPrecedence(r), a === 0) {
|
|
1885
1885
|
this.index -= r.length;
|
|
1886
1886
|
break;
|
|
1887
1887
|
}
|
|
1888
|
-
|
|
1889
|
-
const C = (E) =>
|
|
1888
|
+
d = { value: r, prec: a, right_a: Jsep.right_associative.has(r) }, x = r;
|
|
1889
|
+
const C = (E) => d.right_a && E.right_a ? a > E.prec : a <= E.prec;
|
|
1890
1890
|
for (; n.length > 2 && C(n[n.length - 2]); )
|
|
1891
|
-
|
|
1891
|
+
g = n.pop(), r = n.pop().value, s = n.pop(), e = {
|
|
1892
1892
|
type: Jsep.BINARY_EXP,
|
|
1893
1893
|
operator: r,
|
|
1894
1894
|
left: s,
|
|
1895
|
-
right:
|
|
1895
|
+
right: g
|
|
1896
1896
|
}, n.push(e);
|
|
1897
|
-
e = this.gobbleToken(), e || this.throwError("Expected expression after " + x), n.push(
|
|
1897
|
+
e = this.gobbleToken(), e || this.throwError("Expected expression after " + x), n.push(d, e);
|
|
1898
1898
|
}
|
|
1899
|
-
for (
|
|
1899
|
+
for (u = n.length - 1, e = n[u]; u > 1; )
|
|
1900
1900
|
e = {
|
|
1901
1901
|
type: Jsep.BINARY_EXP,
|
|
1902
|
-
operator: n[
|
|
1903
|
-
left: n[
|
|
1902
|
+
operator: n[u - 1].value,
|
|
1903
|
+
left: n[u - 2],
|
|
1904
1904
|
right: e
|
|
1905
|
-
},
|
|
1905
|
+
}, u -= 2;
|
|
1906
1906
|
return e;
|
|
1907
1907
|
}
|
|
1908
1908
|
/**
|
|
@@ -1911,7 +1911,7 @@ class Jsep {
|
|
|
1911
1911
|
* @returns {boolean|jsep.Expression}
|
|
1912
1912
|
*/
|
|
1913
1913
|
gobbleToken() {
|
|
1914
|
-
let e, r,
|
|
1914
|
+
let e, r, a, n;
|
|
1915
1915
|
if (this.gobbleSpaces(), n = this.searchHook("gobble-token"), n)
|
|
1916
1916
|
return this.runHook("after-token", n);
|
|
1917
1917
|
if (e = this.code, Jsep.isDecimalDigit(e) || e === Jsep.PERIOD_CODE)
|
|
@@ -1921,18 +1921,18 @@ class Jsep {
|
|
|
1921
1921
|
else if (e === Jsep.OBRACK_CODE)
|
|
1922
1922
|
n = this.gobbleArray();
|
|
1923
1923
|
else {
|
|
1924
|
-
for (r = this.expr.substr(this.index, Jsep.max_unop_len),
|
|
1924
|
+
for (r = this.expr.substr(this.index, Jsep.max_unop_len), a = r.length; a > 0; ) {
|
|
1925
1925
|
if (Jsep.unary_ops.hasOwnProperty(r) && (!Jsep.isIdentifierStart(this.code) || this.index + r.length < this.expr.length && !Jsep.isIdentifierPart(this.expr.charCodeAt(this.index + r.length)))) {
|
|
1926
|
-
this.index +=
|
|
1927
|
-
const
|
|
1928
|
-
return
|
|
1926
|
+
this.index += a;
|
|
1927
|
+
const d = this.gobbleToken();
|
|
1928
|
+
return d || this.throwError("missing unaryOp argument"), this.runHook("after-token", {
|
|
1929
1929
|
type: Jsep.UNARY_EXP,
|
|
1930
1930
|
operator: r,
|
|
1931
|
-
argument:
|
|
1931
|
+
argument: d,
|
|
1932
1932
|
prefix: !0
|
|
1933
1933
|
});
|
|
1934
1934
|
}
|
|
1935
|
-
r = r.substr(0, --
|
|
1935
|
+
r = r.substr(0, --a);
|
|
1936
1936
|
}
|
|
1937
1937
|
Jsep.isIdentifierStart(e) ? (n = this.gobbleIdentifier(), Jsep.literals.hasOwnProperty(n.name) ? n = {
|
|
1938
1938
|
type: Jsep.LITERAL,
|
|
@@ -1954,11 +1954,11 @@ class Jsep {
|
|
|
1954
1954
|
this.gobbleSpaces();
|
|
1955
1955
|
let r = this.code;
|
|
1956
1956
|
for (; r === Jsep.PERIOD_CODE || r === Jsep.OBRACK_CODE || r === Jsep.OPAREN_CODE || r === Jsep.QUMARK_CODE; ) {
|
|
1957
|
-
let
|
|
1957
|
+
let a;
|
|
1958
1958
|
if (r === Jsep.QUMARK_CODE) {
|
|
1959
1959
|
if (this.expr.charCodeAt(this.index + 1) !== Jsep.PERIOD_CODE)
|
|
1960
1960
|
break;
|
|
1961
|
-
|
|
1961
|
+
a = !0, this.index += 2, this.gobbleSpaces(), r = this.code;
|
|
1962
1962
|
}
|
|
1963
1963
|
this.index++, r === Jsep.OBRACK_CODE ? (e = {
|
|
1964
1964
|
type: Jsep.MEMBER_EXP,
|
|
@@ -1969,12 +1969,12 @@ class Jsep {
|
|
|
1969
1969
|
type: Jsep.CALL_EXP,
|
|
1970
1970
|
arguments: this.gobbleArguments(Jsep.CPAREN_CODE),
|
|
1971
1971
|
callee: e
|
|
1972
|
-
} : (r === Jsep.PERIOD_CODE ||
|
|
1972
|
+
} : (r === Jsep.PERIOD_CODE || a) && (a && this.index--, this.gobbleSpaces(), e = {
|
|
1973
1973
|
type: Jsep.MEMBER_EXP,
|
|
1974
1974
|
computed: !1,
|
|
1975
1975
|
object: e,
|
|
1976
1976
|
property: this.gobbleIdentifier()
|
|
1977
|
-
}),
|
|
1977
|
+
}), a && (e.optional = !0), this.gobbleSpaces(), r = this.code;
|
|
1978
1978
|
}
|
|
1979
1979
|
return e;
|
|
1980
1980
|
}
|
|
@@ -1984,7 +1984,7 @@ class Jsep {
|
|
|
1984
1984
|
* @returns {jsep.Literal}
|
|
1985
1985
|
*/
|
|
1986
1986
|
gobbleNumericLiteral() {
|
|
1987
|
-
let e = "", r,
|
|
1987
|
+
let e = "", r, a;
|
|
1988
1988
|
for (; Jsep.isDecimalDigit(this.code); )
|
|
1989
1989
|
e += this.expr.charAt(this.index++);
|
|
1990
1990
|
if (this.code === Jsep.PERIOD_CODE)
|
|
@@ -1995,7 +1995,7 @@ class Jsep {
|
|
|
1995
1995
|
e += this.expr.charAt(this.index++);
|
|
1996
1996
|
Jsep.isDecimalDigit(this.expr.charCodeAt(this.index - 1)) || this.throwError("Expected exponent (" + e + this.char + ")");
|
|
1997
1997
|
}
|
|
1998
|
-
return
|
|
1998
|
+
return a = this.code, Jsep.isIdentifierStart(a) ? this.throwError("Variable names cannot start with a number (" + e + this.char + ")") : (a === Jsep.PERIOD_CODE || e.length === 1 && e.charCodeAt(0) === Jsep.PERIOD_CODE) && this.throwError("Unexpected period"), {
|
|
1999
1999
|
type: Jsep.LITERAL,
|
|
2000
2000
|
value: parseFloat(e),
|
|
2001
2001
|
raw: e
|
|
@@ -2008,15 +2008,15 @@ class Jsep {
|
|
|
2008
2008
|
*/
|
|
2009
2009
|
gobbleStringLiteral() {
|
|
2010
2010
|
let e = "";
|
|
2011
|
-
const r = this.index,
|
|
2011
|
+
const r = this.index, a = this.expr.charAt(this.index++);
|
|
2012
2012
|
let n = !1;
|
|
2013
2013
|
for (; this.index < this.expr.length; ) {
|
|
2014
|
-
let
|
|
2015
|
-
if (
|
|
2014
|
+
let d = this.expr.charAt(this.index++);
|
|
2015
|
+
if (d === a) {
|
|
2016
2016
|
n = !0;
|
|
2017
2017
|
break;
|
|
2018
|
-
} else if (
|
|
2019
|
-
switch (
|
|
2018
|
+
} else if (d === "\\")
|
|
2019
|
+
switch (d = this.expr.charAt(this.index++), d) {
|
|
2020
2020
|
case "n":
|
|
2021
2021
|
e += `
|
|
2022
2022
|
`;
|
|
@@ -2037,10 +2037,10 @@ class Jsep {
|
|
|
2037
2037
|
e += "\v";
|
|
2038
2038
|
break;
|
|
2039
2039
|
default:
|
|
2040
|
-
e +=
|
|
2040
|
+
e += d;
|
|
2041
2041
|
}
|
|
2042
2042
|
else
|
|
2043
|
-
e +=
|
|
2043
|
+
e += d;
|
|
2044
2044
|
}
|
|
2045
2045
|
return n || this.throwError('Unclosed quote after "' + e + '"'), {
|
|
2046
2046
|
type: Jsep.LITERAL,
|
|
@@ -2075,14 +2075,14 @@ class Jsep {
|
|
|
2075
2075
|
*/
|
|
2076
2076
|
gobbleArguments(e) {
|
|
2077
2077
|
const r = [];
|
|
2078
|
-
let
|
|
2078
|
+
let a = !1, n = 0;
|
|
2079
2079
|
for (; this.index < this.expr.length; ) {
|
|
2080
2080
|
this.gobbleSpaces();
|
|
2081
|
-
let
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2081
|
+
let d = this.code;
|
|
2082
|
+
if (d === e) {
|
|
2083
|
+
a = !0, this.index++, e === Jsep.CPAREN_CODE && n && n >= r.length && this.throwError("Unexpected token " + String.fromCharCode(e));
|
|
2084
2084
|
break;
|
|
2085
|
-
} else if (
|
|
2085
|
+
} else if (d === Jsep.COMMA_CODE) {
|
|
2086
2086
|
if (this.index++, n++, n !== r.length) {
|
|
2087
2087
|
if (e === Jsep.CPAREN_CODE)
|
|
2088
2088
|
this.throwError("Unexpected token ,");
|
|
@@ -2097,7 +2097,7 @@ class Jsep {
|
|
|
2097
2097
|
(!s || s.type === Jsep.COMPOUND) && this.throwError("Expected comma"), r.push(s);
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
|
-
return
|
|
2100
|
+
return a || this.throwError("Expected " + String.fromCharCode(e)), r;
|
|
2101
2101
|
}
|
|
2102
2102
|
/**
|
|
2103
2103
|
* Responsible for parsing a group of things within parentheses `()`
|
|
@@ -2243,20 +2243,20 @@ var ternary = {
|
|
|
2243
2243
|
t.hooks.add("after-expression", function(r) {
|
|
2244
2244
|
if (r.node && this.code === t.QUMARK_CODE) {
|
|
2245
2245
|
this.index++;
|
|
2246
|
-
const
|
|
2246
|
+
const a = r.node, n = this.gobbleExpression();
|
|
2247
2247
|
if (n || this.throwError("Expected expression"), this.gobbleSpaces(), this.code === t.COLON_CODE) {
|
|
2248
2248
|
this.index++;
|
|
2249
|
-
const
|
|
2250
|
-
if (
|
|
2249
|
+
const d = this.gobbleExpression();
|
|
2250
|
+
if (d || this.throwError("Expected expression"), r.node = {
|
|
2251
2251
|
type: CONDITIONAL_EXP,
|
|
2252
|
-
test:
|
|
2252
|
+
test: a,
|
|
2253
2253
|
consequent: n,
|
|
2254
|
-
alternate:
|
|
2255
|
-
},
|
|
2256
|
-
let s =
|
|
2254
|
+
alternate: d
|
|
2255
|
+
}, a.operator && t.binary_ops[a.operator] <= 0.9) {
|
|
2256
|
+
let s = a;
|
|
2257
2257
|
for (; s.right.operator && t.binary_ops[s.right.operator] <= 0.9; )
|
|
2258
2258
|
s = s.right;
|
|
2259
|
-
r.node.test = s.right, s.right = r.node, r.node =
|
|
2259
|
+
r.node.test = s.right, s.right = r.node, r.node = a;
|
|
2260
2260
|
}
|
|
2261
2261
|
} else
|
|
2262
2262
|
this.throwError("Expected :");
|
|
@@ -2276,12 +2276,17 @@ function changeConfig(config) {
|
|
|
2276
2276
|
config.flat().forEach((cell) => {
|
|
2277
2277
|
let key = `${cell.row}:${cell.col}`;
|
|
2278
2278
|
if (cell.type === CellType.FUN && needComputedCell.set(key, cell), cell.colSpan !== 0 && cell.rowSpan !== 0) {
|
|
2279
|
-
if (cell.type === CellType.FIELD &&
|
|
2279
|
+
if (cell.type === CellType.FIELD && (cell.colData || cell.rowData)) {
|
|
2280
2280
|
let t = {
|
|
2281
2281
|
...cell.colData,
|
|
2282
2282
|
...cell.rowData
|
|
2283
2283
|
};
|
|
2284
|
-
cell.
|
|
2284
|
+
if (cell.format === FormatType.STRING && cell.fun)
|
|
2285
|
+
cell.text = cell.fun.replace(/\$\{([a-zA-Z0-9\_\-]+)\}/g, (e, r) => (r = r.toUpperCase(), t[r] ?? e));
|
|
2286
|
+
else {
|
|
2287
|
+
let e = cell.data.replace("row:", "").toUpperCase();
|
|
2288
|
+
cell.text = t[e];
|
|
2289
|
+
}
|
|
2285
2290
|
}
|
|
2286
2291
|
if (cell.format && (cell.text = formatCellValue(cell.text || "", cell.format, cell.formatType)), cell.customRender) {
|
|
2287
2292
|
let data = {
|
|
@@ -2304,8 +2309,8 @@ function changeConfig(config) {
|
|
|
2304
2309
|
function computeCell(t) {
|
|
2305
2310
|
changeConfig(t), Array.from(needComputedCell.values()).forEach((e) => {
|
|
2306
2311
|
if (e.type === CellType.FUN && e.fun) {
|
|
2307
|
-
const { isError: r, result:
|
|
2308
|
-
r || (e.text =
|
|
2312
|
+
const { isError: r, result: a } = parseExpression(e.fun, !0);
|
|
2313
|
+
r || (e.text = a, e.type = CellType.TEXT);
|
|
2309
2314
|
}
|
|
2310
2315
|
}), innerConfig = {}, needComputedCell = /* @__PURE__ */ new Map();
|
|
2311
2316
|
}
|
|
@@ -2314,11 +2319,11 @@ function parseExpression(t, e = !1) {
|
|
|
2314
2319
|
const r = t.trim();
|
|
2315
2320
|
if (!r)
|
|
2316
2321
|
throw new Error("请输入一个表达式");
|
|
2317
|
-
const
|
|
2318
|
-
let
|
|
2319
|
-
return e && (
|
|
2322
|
+
const a = r.startsWith("=") ? r.slice(1) : r, n = jsep(a);
|
|
2323
|
+
let d = null;
|
|
2324
|
+
return e && (d = evaluateExpression(n)), {
|
|
2320
2325
|
isError: !1,
|
|
2321
|
-
result:
|
|
2326
|
+
result: d
|
|
2322
2327
|
};
|
|
2323
2328
|
} catch (r) {
|
|
2324
2329
|
return console.error(r), {
|
|
@@ -2333,9 +2338,9 @@ function evaluateExpression(t) {
|
|
|
2333
2338
|
switch (t.type) {
|
|
2334
2339
|
case "Literal":
|
|
2335
2340
|
if (typeof t.value == "string") {
|
|
2336
|
-
const
|
|
2337
|
-
if (
|
|
2338
|
-
return getRangeValues(
|
|
2341
|
+
const d = t.value.match(/^(['"]?)([A-Z]+\d+):([A-Z]+\d+)\1$/i);
|
|
2342
|
+
if (d)
|
|
2343
|
+
return getRangeValues(d[2], d[3]);
|
|
2339
2344
|
}
|
|
2340
2345
|
return t.value;
|
|
2341
2346
|
case "Identifier":
|
|
@@ -2378,9 +2383,9 @@ function evaluateExpression(t) {
|
|
|
2378
2383
|
if (s)
|
|
2379
2384
|
return getRangeValues(s[2], s[3]);
|
|
2380
2385
|
}
|
|
2381
|
-
const
|
|
2382
|
-
if (typeof
|
|
2383
|
-
return
|
|
2386
|
+
const a = evaluateExpression(t.object), n = t.computed ? evaluateExpression(t.property) : t.property.name;
|
|
2387
|
+
if (typeof a == "object" && a !== null)
|
|
2388
|
+
return a[n];
|
|
2384
2389
|
throw new Error(`无法获取非对象值的属性: ${n}`);
|
|
2385
2390
|
default:
|
|
2386
2391
|
throw new Error(`不支持的节点类型: ${t.type}`);
|
|
@@ -2388,37 +2393,37 @@ function evaluateExpression(t) {
|
|
|
2388
2393
|
}
|
|
2389
2394
|
function getRangeValues(t, e) {
|
|
2390
2395
|
let r = -1;
|
|
2391
|
-
const
|
|
2392
|
-
|
|
2396
|
+
const a = t.match(/[A-Z]+/);
|
|
2397
|
+
a && (r = columnToNumber(a[0]));
|
|
2393
2398
|
let n = -1;
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2399
|
+
const d = t.match(/\d+/);
|
|
2400
|
+
d && (n = parseInt(d[0]) - 1);
|
|
2396
2401
|
let s = -1;
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2399
|
-
let
|
|
2402
|
+
const g = e.match(/[A-Z]+/);
|
|
2403
|
+
g && (s = columnToNumber(g[0]));
|
|
2404
|
+
let u = -1;
|
|
2400
2405
|
const x = e.match(/\d+/);
|
|
2401
|
-
x && (
|
|
2406
|
+
x && (u = parseInt(x[0]) - 1);
|
|
2402
2407
|
const C = [];
|
|
2403
|
-
for (let E = n; E <=
|
|
2404
|
-
for (let
|
|
2405
|
-
const
|
|
2406
|
-
C.push(...getCellValue(
|
|
2408
|
+
for (let E = n; E <= u; E++)
|
|
2409
|
+
for (let k = r; k <= s; k++) {
|
|
2410
|
+
const m = `${E}:${k}`;
|
|
2411
|
+
C.push(...getCellValue(m));
|
|
2407
2412
|
}
|
|
2408
2413
|
return C;
|
|
2409
2414
|
}
|
|
2410
2415
|
function evaluateFunction(t, e) {
|
|
2411
|
-
const r = e.map((
|
|
2416
|
+
const r = e.map((a) => evaluateExpression(a));
|
|
2412
2417
|
switch (t.toUpperCase()) {
|
|
2413
2418
|
case "SUM":
|
|
2414
|
-
return r.flat().reduce((s,
|
|
2415
|
-
const
|
|
2416
|
-
return s + (isNaN(
|
|
2419
|
+
return r.flat().reduce((s, g) => {
|
|
2420
|
+
const u = parseFloat(g);
|
|
2421
|
+
return s + (isNaN(u) ? 0 : u);
|
|
2417
2422
|
}, 0);
|
|
2418
2423
|
case "AVERAGE":
|
|
2419
2424
|
case "AVG":
|
|
2420
2425
|
const n = r.flat().filter((s) => !isNaN(parseFloat(s)));
|
|
2421
|
-
return n.length > 0 ? n.reduce((s,
|
|
2426
|
+
return n.length > 0 ? n.reduce((s, g) => s + parseFloat(g), 0) / n.length : 0;
|
|
2422
2427
|
case "IF":
|
|
2423
2428
|
if (r.length !== 3)
|
|
2424
2429
|
throw new Error(`IF函数需要3个参数,但提供了${r.length}个`);
|
|
@@ -2426,8 +2431,8 @@ function evaluateFunction(t, e) {
|
|
|
2426
2431
|
case "NOW":
|
|
2427
2432
|
return (/* @__PURE__ */ new Date()).toLocaleString();
|
|
2428
2433
|
case "TODAY":
|
|
2429
|
-
const
|
|
2430
|
-
return `${
|
|
2434
|
+
const d = /* @__PURE__ */ new Date();
|
|
2435
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
2431
2436
|
case "MAX":
|
|
2432
2437
|
return Math.max(
|
|
2433
2438
|
...r.flat().map(Number).filter((s) => !isNaN(s))
|
|
@@ -2467,25 +2472,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2467
2472
|
},
|
|
2468
2473
|
emits: ["updateData"],
|
|
2469
2474
|
setup(t, { emit: e }) {
|
|
2470
|
-
const r = t,
|
|
2475
|
+
const r = t, a = ref(), n = ref(), d = computed(() => ({
|
|
2471
2476
|
width: r.config.widthType === "%" ? `calc(${r.config.width}% - 10px)` : `${r.config.width - 10}px`,
|
|
2472
2477
|
height: r.config.fullHeight ? "calc(100% - 8px)" : `${r.config.height}px`
|
|
2473
|
-
})), s = computed(() => r.config && r.config.data ? !!r.config.data.pagination : !1),
|
|
2478
|
+
})), s = computed(() => r.config && r.config.data ? !!r.config.data.pagination : !1), g = computed(() => r.config.params && Array.isArray(r.config.params) && r.config.params.length > 0), u = reactive({
|
|
2474
2479
|
pageSize: 100,
|
|
2475
2480
|
pageSizes: [10, 20, 50, 100, 200, 1e4],
|
|
2476
2481
|
pageIndex: 1,
|
|
2477
2482
|
total: 0
|
|
2478
2483
|
}), x = ref([]);
|
|
2479
|
-
function C(
|
|
2480
|
-
x.value =
|
|
2484
|
+
function C(v) {
|
|
2485
|
+
x.value = v, u.pageIndex = 1, Z();
|
|
2481
2486
|
}
|
|
2482
2487
|
let E = !1;
|
|
2483
2488
|
watch(
|
|
2484
|
-
() => [
|
|
2485
|
-
(
|
|
2486
|
-
if (
|
|
2487
|
-
let [
|
|
2488
|
-
|
|
2489
|
+
() => [u.pageSize, u.pageIndex],
|
|
2490
|
+
(v, b) => {
|
|
2491
|
+
if (v && b) {
|
|
2492
|
+
let [p, c] = v, [o, f] = v;
|
|
2493
|
+
p !== o && (u.pageIndex = 1), E && Z();
|
|
2489
2494
|
}
|
|
2490
2495
|
},
|
|
2491
2496
|
{
|
|
@@ -2493,428 +2498,457 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2493
2498
|
deep: !0
|
|
2494
2499
|
}
|
|
2495
2500
|
);
|
|
2496
|
-
function
|
|
2497
|
-
|
|
2501
|
+
function k() {
|
|
2502
|
+
u.pageIndex = 1, Z();
|
|
2498
2503
|
}
|
|
2499
|
-
const
|
|
2500
|
-
function b
|
|
2501
|
-
return
|
|
2504
|
+
const m = ref(!1);
|
|
2505
|
+
function w(v, b, p, c) {
|
|
2506
|
+
return v.reduce((f, l) => {
|
|
2507
|
+
if (l.loop)
|
|
2508
|
+
return f.push(l), f;
|
|
2509
|
+
if (!l.data)
|
|
2510
|
+
return f;
|
|
2511
|
+
const y = b[l.data];
|
|
2512
|
+
if (!y)
|
|
2513
|
+
return f;
|
|
2514
|
+
let i;
|
|
2515
|
+
if (l.dataIndex !== void 0 && !isNaN(l.dataIndex))
|
|
2516
|
+
Array.isArray(y) && l.dataIndex >= 0 && l.dataIndex < y.length ? i = y[l.dataIndex] : i = void 0;
|
|
2517
|
+
else if (typeof y == "object" && y !== null)
|
|
2518
|
+
i = y;
|
|
2519
|
+
else
|
|
2520
|
+
return f;
|
|
2521
|
+
if (l = { ...l, data: i }, p === "row" && l.index !== void 0 && l.index > 0 && l.index < c.length) {
|
|
2522
|
+
const D = c[l.index], S = D.length;
|
|
2523
|
+
for (let P = 0; P < S; P++) {
|
|
2524
|
+
const V = D[P];
|
|
2525
|
+
V.rowData = l.data;
|
|
2526
|
+
}
|
|
2527
|
+
} else if (p === "col" && l.index !== void 0 && l.index > 0) {
|
|
2528
|
+
const D = c.length;
|
|
2529
|
+
for (let S = 0; S < D; S++) {
|
|
2530
|
+
const P = c[S];
|
|
2531
|
+
l.index < P.length && (P[l.index].colData = l.data);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
return f;
|
|
2535
|
+
}, []);
|
|
2502
2536
|
}
|
|
2503
|
-
function
|
|
2504
|
-
const
|
|
2505
|
-
for (let o = 0; o <
|
|
2506
|
-
|
|
2507
|
-
for (let
|
|
2508
|
-
|
|
2537
|
+
function M(v) {
|
|
2538
|
+
const b = v.length, p = v[0].length, c = [];
|
|
2539
|
+
for (let o = 0; o < p; o++) {
|
|
2540
|
+
c[o] = [];
|
|
2541
|
+
for (let f = 0; f < b; f++)
|
|
2542
|
+
c[o][f] = v[f][o];
|
|
2509
2543
|
}
|
|
2510
|
-
return
|
|
2544
|
+
return c;
|
|
2511
2545
|
}
|
|
2512
|
-
function B(
|
|
2513
|
-
if (
|
|
2514
|
-
let
|
|
2515
|
-
|
|
2546
|
+
function B(v, b, p, c, o) {
|
|
2547
|
+
if (c) {
|
|
2548
|
+
let i = o.findIndex((D) => D === p);
|
|
2549
|
+
p = o[i - 1];
|
|
2516
2550
|
}
|
|
2517
|
-
let
|
|
2518
|
-
return Object.keys(
|
|
2551
|
+
let f = v[b], l = `${p}-${f.join("-")}`;
|
|
2552
|
+
return Object.keys(v).filter((i) => i.indexOf(l) > -1).map((i) => v[i]).reduce((i, D) => i + D.length, 0);
|
|
2519
2553
|
}
|
|
2520
|
-
function J(
|
|
2521
|
-
const
|
|
2522
|
-
return
|
|
2554
|
+
function J(v, b) {
|
|
2555
|
+
const p = v.filter((c) => c < b);
|
|
2556
|
+
return p.length === 0 ? null : Math.max(...p);
|
|
2523
2557
|
}
|
|
2524
|
-
function
|
|
2525
|
-
|
|
2526
|
-
let
|
|
2527
|
-
|
|
2528
|
-
|
|
2558
|
+
function j(v, b, p, c) {
|
|
2559
|
+
b.forEach((o) => {
|
|
2560
|
+
let f = c[o.data], l = p[o.index], y = [];
|
|
2561
|
+
l.forEach((O, T) => {
|
|
2562
|
+
O.type === CellType.FIELD && O.data && O.isGroup && y.push(T);
|
|
2529
2563
|
});
|
|
2530
|
-
let
|
|
2531
|
-
y.forEach((
|
|
2532
|
-
|
|
2533
|
-
let
|
|
2564
|
+
let i = {};
|
|
2565
|
+
y.forEach((O, T) => {
|
|
2566
|
+
i[O] || (i[O] = /* @__PURE__ */ new Set());
|
|
2567
|
+
let $ = l[O].data.replace("row:", "").toUpperCase();
|
|
2534
2568
|
if (T === 0)
|
|
2535
|
-
|
|
2536
|
-
if (
|
|
2537
|
-
let I =
|
|
2569
|
+
f.forEach((A) => {
|
|
2570
|
+
if ($) {
|
|
2571
|
+
let I = A[$];
|
|
2538
2572
|
if (I) {
|
|
2539
|
-
const
|
|
2540
|
-
|
|
2573
|
+
const Y = `${O}-${I}`;
|
|
2574
|
+
i[Y] ? i[Y].push(A) : i[Y] = [A], i[O].add(I), i[I] = [I];
|
|
2541
2575
|
}
|
|
2542
2576
|
}
|
|
2543
2577
|
});
|
|
2544
2578
|
else {
|
|
2545
|
-
let
|
|
2546
|
-
Array.from(
|
|
2547
|
-
const
|
|
2548
|
-
let z =
|
|
2549
|
-
if (
|
|
2550
|
-
let K = G[
|
|
2579
|
+
let A = y[T - 1];
|
|
2580
|
+
Array.from(i[A]).forEach((Y) => {
|
|
2581
|
+
const U = `${A}-${Y}`;
|
|
2582
|
+
let z = i[U].map((G) => {
|
|
2583
|
+
if ($) {
|
|
2584
|
+
let K = G[$];
|
|
2551
2585
|
if (K) {
|
|
2552
2586
|
let te = !1;
|
|
2553
|
-
const
|
|
2554
|
-
return
|
|
2587
|
+
const ae = `${O}-${Y}-${K}`, ie = `${Y}-${K}`;
|
|
2588
|
+
return i[ae] ? i[ae].push(G) : i[ae] = [G], i[O].has(ie) || (te = !0), i[O].add(ie), i[ie] = i[Y].concat([K]), te ? K : null;
|
|
2555
2589
|
}
|
|
2556
2590
|
}
|
|
2557
2591
|
}).filter((G) => !!G);
|
|
2558
|
-
|
|
2592
|
+
i[U] = z;
|
|
2559
2593
|
});
|
|
2560
2594
|
}
|
|
2561
2595
|
});
|
|
2562
|
-
let
|
|
2563
|
-
const
|
|
2564
|
-
y.length > 0 ?
|
|
2565
|
-
let
|
|
2566
|
-
return
|
|
2567
|
-
}, 0) :
|
|
2568
|
-
const
|
|
2596
|
+
let D = 1, S = Math.max(...y);
|
|
2597
|
+
const P = l.some((O) => O.isRowColCombine);
|
|
2598
|
+
y.length > 0 ? P ? D = i[S].size : D = Array.from(i[S]).reduce((O, T) => {
|
|
2599
|
+
let _ = i[`${S}-${T}`];
|
|
2600
|
+
return O + _.length;
|
|
2601
|
+
}, 0) : D = f.length;
|
|
2602
|
+
const V = {
|
|
2569
2603
|
...o,
|
|
2570
2604
|
loop: !1
|
|
2571
|
-
}, L = Array.from({ length:
|
|
2572
|
-
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2575
|
-
let
|
|
2576
|
-
if (y.includes(
|
|
2577
|
-
console.log(
|
|
2578
|
-
let
|
|
2579
|
-
...
|
|
2605
|
+
}, L = Array.from({ length: D }, () => cloneDeep(V));
|
|
2606
|
+
v.splice(o.index, 1, ...L);
|
|
2607
|
+
const N = Array.from({ length: l.length }, () => []);
|
|
2608
|
+
l.forEach((O, T) => {
|
|
2609
|
+
let _ = N[T];
|
|
2610
|
+
if (y.includes(O.col))
|
|
2611
|
+
console.log(i[O.col], T, O.col), Array.from(i[O.col]).forEach((A, I) => {
|
|
2612
|
+
let Y = P && T === S ? 1 : B(i, A, S, P, y), U = i[A], R = U[i[A].length - 1], z = {
|
|
2613
|
+
...O,
|
|
2580
2614
|
text: R,
|
|
2581
|
-
rowSpan:
|
|
2582
|
-
rowData:
|
|
2615
|
+
rowSpan: Y,
|
|
2616
|
+
rowData: U
|
|
2583
2617
|
};
|
|
2584
|
-
|
|
2618
|
+
_.push(z);
|
|
2585
2619
|
let G = {
|
|
2586
|
-
...
|
|
2620
|
+
...O,
|
|
2587
2621
|
text: R,
|
|
2588
2622
|
type: "",
|
|
2589
2623
|
colSpan: 0,
|
|
2590
2624
|
rowSpan: 0
|
|
2591
2625
|
};
|
|
2592
|
-
for (let K = 0; K <
|
|
2593
|
-
|
|
2626
|
+
for (let K = 0; K < Y - 1; K++)
|
|
2627
|
+
_.push(G);
|
|
2594
2628
|
});
|
|
2595
|
-
else if (
|
|
2596
|
-
let
|
|
2597
|
-
|
|
2598
|
-
let
|
|
2599
|
-
const
|
|
2629
|
+
else if (O.data) {
|
|
2630
|
+
let $ = i[S] ? Array.from(i[S]) : [], A = O.data.replace("row:", "").toUpperCase();
|
|
2631
|
+
O.isRowColCombine ? $.length ? $.forEach((I, Y) => {
|
|
2632
|
+
let U = i[`${S}-${I}`], R = O.combineKeys.map((K, te) => {
|
|
2633
|
+
const ae = O.combineValues[te];
|
|
2600
2634
|
return {
|
|
2601
2635
|
key: K,
|
|
2602
|
-
val:
|
|
2636
|
+
val: ae
|
|
2603
2637
|
};
|
|
2604
2638
|
});
|
|
2605
|
-
const z =
|
|
2639
|
+
const z = U.filter((K) => R.every((te) => K[te.key] === te.val));
|
|
2606
2640
|
let G = {
|
|
2607
|
-
...
|
|
2641
|
+
...O
|
|
2608
2642
|
};
|
|
2609
2643
|
if (delete G.combineKeys, delete G.combineValues, delete G.isRowColCombine, z && z.length) {
|
|
2610
2644
|
const K = z[0];
|
|
2611
|
-
G.text = K[
|
|
2645
|
+
G.text = K[A], G.rowData = K;
|
|
2612
2646
|
} else
|
|
2613
2647
|
G.text = "", G.rowData = {};
|
|
2614
|
-
|
|
2615
|
-
}) :
|
|
2616
|
-
let
|
|
2617
|
-
const K =
|
|
2648
|
+
_.push(G);
|
|
2649
|
+
}) : f.forEach((I) => {
|
|
2650
|
+
let U = O.combineKeys.map((z, G) => {
|
|
2651
|
+
const K = O.combineValues[G];
|
|
2618
2652
|
return {
|
|
2619
2653
|
key: z,
|
|
2620
2654
|
val: K
|
|
2621
2655
|
};
|
|
2622
2656
|
}).every((z) => I[z.key] === z.val), R = {
|
|
2623
|
-
...
|
|
2657
|
+
...O
|
|
2624
2658
|
};
|
|
2625
|
-
delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine,
|
|
2626
|
-
}) :
|
|
2627
|
-
|
|
2659
|
+
delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine, U ? (R.text = I[A], R.rowData = I) : R.text = "", _.push(R);
|
|
2660
|
+
}) : $.length ? $.forEach((I, Y) => {
|
|
2661
|
+
i[`${S}-${I}`].forEach((R) => {
|
|
2628
2662
|
let z = {
|
|
2629
|
-
...
|
|
2663
|
+
...O
|
|
2630
2664
|
};
|
|
2631
|
-
delete z.combineKeys, delete z.combineValues, delete z.isRowColCombine, R[
|
|
2665
|
+
delete z.combineKeys, delete z.combineValues, delete z.isRowColCombine, R[A] ? (z.text = R[A], z.rowData = R) : z.text = "", _.push(z);
|
|
2632
2666
|
});
|
|
2633
|
-
}) :
|
|
2634
|
-
let
|
|
2635
|
-
...
|
|
2667
|
+
}) : f.forEach((I) => {
|
|
2668
|
+
let Y = {
|
|
2669
|
+
...O
|
|
2636
2670
|
};
|
|
2637
|
-
delete
|
|
2671
|
+
delete Y.combineKeys, delete Y.combineValues, delete Y.isRowColCombine, I[A] ? (Y.text = I[A], Y.rowData = I) : Y.text = "", _.push(Y);
|
|
2638
2672
|
});
|
|
2639
2673
|
} else {
|
|
2640
|
-
const
|
|
2641
|
-
...
|
|
2642
|
-
rowData:
|
|
2674
|
+
const $ = {
|
|
2675
|
+
...O,
|
|
2676
|
+
rowData: f[0]
|
|
2643
2677
|
};
|
|
2644
|
-
if (
|
|
2645
|
-
let [
|
|
2646
|
-
R && (R.rowSpan +=
|
|
2678
|
+
if (O.rowSpan === 0 && O.mergeTarget && O.mergeTarget.length === 2) {
|
|
2679
|
+
let [Y, U] = O.mergeTarget, R = p.reduce((z, G) => z.concat(G), []).filter((z) => z.row === Y && z.col === U)[0];
|
|
2680
|
+
R && (R.rowSpan += D - 1);
|
|
2647
2681
|
} else
|
|
2648
|
-
|
|
2649
|
-
const
|
|
2650
|
-
...
|
|
2682
|
+
$.rowSpan += D - 1;
|
|
2683
|
+
const A = {
|
|
2684
|
+
...O,
|
|
2651
2685
|
type: "",
|
|
2652
2686
|
colSpan: 0,
|
|
2653
2687
|
rowSpan: 0
|
|
2654
2688
|
};
|
|
2655
|
-
delete
|
|
2656
|
-
let I = Array.from({ length:
|
|
2657
|
-
|
|
2689
|
+
delete $.isRowColCombine;
|
|
2690
|
+
let I = Array.from({ length: D - 1 }, () => cloneDeep(A));
|
|
2691
|
+
_.push($, ...I);
|
|
2658
2692
|
}
|
|
2659
2693
|
});
|
|
2660
|
-
const
|
|
2661
|
-
|
|
2694
|
+
const F = M(N);
|
|
2695
|
+
p.splice(o.index, 1, ...F);
|
|
2662
2696
|
});
|
|
2663
2697
|
}
|
|
2664
|
-
function W(
|
|
2665
|
-
|
|
2666
|
-
let
|
|
2667
|
-
|
|
2668
|
-
let
|
|
2669
|
-
|
|
2698
|
+
function W(v, b, p, c) {
|
|
2699
|
+
b.forEach((o) => {
|
|
2700
|
+
let f = c[o.data], l = [], y = [];
|
|
2701
|
+
p.forEach((L, N) => {
|
|
2702
|
+
let F = L[o.index];
|
|
2703
|
+
F.type === CellType.FIELD && F.data && F.isGroup && y.push(N), l.push(F);
|
|
2670
2704
|
});
|
|
2671
|
-
let
|
|
2672
|
-
y.forEach((L,
|
|
2673
|
-
|
|
2674
|
-
let
|
|
2675
|
-
if (
|
|
2676
|
-
|
|
2677
|
-
if (
|
|
2678
|
-
let
|
|
2679
|
-
if (
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2705
|
+
let i = {};
|
|
2706
|
+
y.forEach((L, N) => {
|
|
2707
|
+
i[L] || (i[L] = /* @__PURE__ */ new Set());
|
|
2708
|
+
let O = l[L].data.replace("col:", "").toUpperCase();
|
|
2709
|
+
if (N === 0)
|
|
2710
|
+
f.forEach((T) => {
|
|
2711
|
+
if (O) {
|
|
2712
|
+
let _ = T[O];
|
|
2713
|
+
if (_) {
|
|
2714
|
+
const $ = `${L}-${_}`;
|
|
2715
|
+
i[$] ? i[$].push(T) : i[$] = [T], i[L].add(_), i[_] = [_], i[`${_}-data`] = [T];
|
|
2682
2716
|
}
|
|
2683
2717
|
}
|
|
2684
2718
|
});
|
|
2685
2719
|
else {
|
|
2686
|
-
let T = y[
|
|
2687
|
-
Array.from(
|
|
2688
|
-
const
|
|
2689
|
-
let
|
|
2690
|
-
if (
|
|
2691
|
-
let R =
|
|
2720
|
+
let T = y[N - 1];
|
|
2721
|
+
Array.from(i[T]).forEach(($) => {
|
|
2722
|
+
const A = `${T}-${$}`;
|
|
2723
|
+
let Y = i[A].map((U) => {
|
|
2724
|
+
if (O) {
|
|
2725
|
+
let R = U[O];
|
|
2692
2726
|
if (R) {
|
|
2693
2727
|
let z = !1;
|
|
2694
|
-
const G = `${L}-${
|
|
2695
|
-
return
|
|
2728
|
+
const G = `${L}-${$}-${R}`, K = `${$}-${R}`;
|
|
2729
|
+
return i[G] ? i[G].push(U) : i[G] = [U], i[K + "-data"] ? i[K + "-data"].push(U) : i[K + "-data"] = [U], i[L].has(K) || (z = !0), i[L].add(K), i[K] = i[$].concat([R]), z ? R : null;
|
|
2696
2730
|
}
|
|
2697
2731
|
}
|
|
2698
|
-
}).filter((
|
|
2699
|
-
|
|
2732
|
+
}).filter((U) => !!U);
|
|
2733
|
+
i[A] = Y;
|
|
2700
2734
|
});
|
|
2701
2735
|
}
|
|
2702
2736
|
});
|
|
2703
|
-
let
|
|
2704
|
-
const
|
|
2705
|
-
y.length > 0 ?
|
|
2706
|
-
let
|
|
2707
|
-
return L +
|
|
2708
|
-
}, 0) :
|
|
2709
|
-
for (let L = 0; L <
|
|
2710
|
-
const
|
|
2737
|
+
let D = 1, S = Math.max(...y), P = Math.min(...y);
|
|
2738
|
+
const V = l.some((L) => L.isRowColCombine);
|
|
2739
|
+
y.length > 0 ? V ? D = i[S].size : D = Array.from(i[S]).reduce((L, N) => {
|
|
2740
|
+
let F = i[`${S}-${N}`];
|
|
2741
|
+
return L + F.length;
|
|
2742
|
+
}, 0) : D = f.length;
|
|
2743
|
+
for (let L = 0; L < l.length; L++) {
|
|
2744
|
+
const N = l[L];
|
|
2711
2745
|
if (L === 0) {
|
|
2712
|
-
const
|
|
2746
|
+
const O = {
|
|
2713
2747
|
...o,
|
|
2714
2748
|
loop: !1
|
|
2715
|
-
}, T = Array.from({ length:
|
|
2716
|
-
|
|
2749
|
+
}, T = Array.from({ length: D }, () => cloneDeep(O));
|
|
2750
|
+
v.splice(o.index, 1, ...T);
|
|
2717
2751
|
}
|
|
2718
|
-
let
|
|
2719
|
-
if (
|
|
2720
|
-
let
|
|
2752
|
+
let F = p[N.row];
|
|
2753
|
+
if (F && Array.isArray(F)) {
|
|
2754
|
+
let O = [];
|
|
2721
2755
|
if (y.includes(L))
|
|
2722
|
-
Array.from(
|
|
2723
|
-
let
|
|
2724
|
-
...
|
|
2756
|
+
Array.from(i[N.row]).forEach((_, $) => {
|
|
2757
|
+
let A = V && L === S ? 1 : B(i, _, S, V, y), I = i[_][i[_].length - 1], Y = {
|
|
2758
|
+
...N,
|
|
2725
2759
|
text: I,
|
|
2726
|
-
colSpan:
|
|
2727
|
-
colData:
|
|
2760
|
+
colSpan: A,
|
|
2761
|
+
colData: i[_ + "-data"]
|
|
2728
2762
|
};
|
|
2729
|
-
if (
|
|
2730
|
-
let
|
|
2731
|
-
...
|
|
2763
|
+
if (O.push(Y), A > 1) {
|
|
2764
|
+
let U = {
|
|
2765
|
+
...N,
|
|
2732
2766
|
text: I,
|
|
2733
2767
|
type: "",
|
|
2734
2768
|
colSpan: 0,
|
|
2735
2769
|
rowSpan: 0
|
|
2736
2770
|
};
|
|
2737
|
-
for (let R = 0; R <
|
|
2738
|
-
|
|
2771
|
+
for (let R = 0; R < A - 1; R++)
|
|
2772
|
+
O.push(U);
|
|
2739
2773
|
}
|
|
2740
|
-
}),
|
|
2774
|
+
}), F.splice(N.col, 1, ...O);
|
|
2741
2775
|
else {
|
|
2742
|
-
if (L >
|
|
2776
|
+
if (L > P && L < S) {
|
|
2743
2777
|
let T = J(y, L);
|
|
2744
2778
|
if (T !== null) {
|
|
2745
|
-
let
|
|
2746
|
-
|
|
2747
|
-
let
|
|
2748
|
-
return Array.isArray(
|
|
2749
|
-
...
|
|
2750
|
-
colData:
|
|
2751
|
-
colSpan:
|
|
2752
|
-
rowSpan:
|
|
2779
|
+
let _ = p[T].slice(o.index, o.index + D);
|
|
2780
|
+
_ = _.map(($) => {
|
|
2781
|
+
let A = $.colData;
|
|
2782
|
+
return Array.isArray(A) && (A = A[0]), {
|
|
2783
|
+
...N,
|
|
2784
|
+
colData: A,
|
|
2785
|
+
colSpan: $.colSpan,
|
|
2786
|
+
rowSpan: $.rowSpan
|
|
2753
2787
|
};
|
|
2754
|
-
}),
|
|
2788
|
+
}), F.splice(o.index, 1, ..._);
|
|
2755
2789
|
continue;
|
|
2756
2790
|
}
|
|
2757
2791
|
}
|
|
2758
|
-
if (
|
|
2759
|
-
let T =
|
|
2760
|
-
if (
|
|
2761
|
-
let
|
|
2762
|
-
T.forEach((I,
|
|
2763
|
-
let
|
|
2764
|
-
...
|
|
2765
|
-
combineKeys:
|
|
2766
|
-
combineValues:
|
|
2792
|
+
if (N.data) {
|
|
2793
|
+
let T = i[S] ? Array.from(i[S]) : [], _ = N.data.replace("col:", "").toUpperCase();
|
|
2794
|
+
if (N.isRowColCombine) {
|
|
2795
|
+
let $ = y.map((I) => l[I].data.replace("col:", "").toUpperCase()), A = [];
|
|
2796
|
+
T.forEach((I, Y) => {
|
|
2797
|
+
let U = {
|
|
2798
|
+
...N,
|
|
2799
|
+
combineKeys: $,
|
|
2800
|
+
combineValues: i[I]
|
|
2767
2801
|
};
|
|
2768
|
-
|
|
2769
|
-
}),
|
|
2802
|
+
A.push(U);
|
|
2803
|
+
}), F.splice(N.col, 1, ...A);
|
|
2770
2804
|
} else if (T.length)
|
|
2771
|
-
T.forEach((A
|
|
2772
|
-
let I =
|
|
2773
|
-
I.forEach((
|
|
2805
|
+
T.forEach(($, A) => {
|
|
2806
|
+
let I = i[`${S}-${$}`], Y = [];
|
|
2807
|
+
I.forEach((U) => {
|
|
2774
2808
|
let R = {
|
|
2775
|
-
...
|
|
2809
|
+
...N
|
|
2776
2810
|
};
|
|
2777
|
-
delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine,
|
|
2778
|
-
}),
|
|
2811
|
+
delete R.combineKeys, delete R.combineValues, delete R.isRowColCombine, U[_] ? (R.text = U[_], R.colData = U) : R.text = "", Y.push(R);
|
|
2812
|
+
}), F.splice(N.col, 1, ...Y);
|
|
2779
2813
|
});
|
|
2780
2814
|
else {
|
|
2781
|
-
let
|
|
2782
|
-
|
|
2815
|
+
let $ = [];
|
|
2816
|
+
f.forEach((A) => {
|
|
2783
2817
|
let I = {
|
|
2784
|
-
...
|
|
2818
|
+
...N
|
|
2785
2819
|
};
|
|
2786
|
-
delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, _
|
|
2787
|
-
}),
|
|
2820
|
+
delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, A[_] ? (I.text = A[_], I.colData = A) : I.text = "", $.push(I);
|
|
2821
|
+
}), F.splice(N.col, 1, ...$);
|
|
2788
2822
|
}
|
|
2789
2823
|
} else {
|
|
2790
2824
|
const T = {
|
|
2791
|
-
...
|
|
2792
|
-
colData:
|
|
2825
|
+
...N,
|
|
2826
|
+
colData: f[0]
|
|
2793
2827
|
};
|
|
2794
|
-
if (
|
|
2795
|
-
let [
|
|
2796
|
-
|
|
2828
|
+
if (N.colSpan === 0 && N.mergeTarget && N.mergeTarget.length === 2 && N.row === N.mergeTarget[0]) {
|
|
2829
|
+
let [A, I] = N.mergeTarget, Y = p.reduce((U, R) => U.concat(R), []).filter((U) => U.row === A && U.col === I)[0];
|
|
2830
|
+
Y && (Y.colSpan += D - 1);
|
|
2797
2831
|
} else
|
|
2798
|
-
(!Array.isArray(
|
|
2799
|
-
const
|
|
2800
|
-
...
|
|
2832
|
+
(!Array.isArray(N.mergeTarget) || N.mergeTarget.length !== 2) && (T.colSpan = D);
|
|
2833
|
+
const _ = {
|
|
2834
|
+
...N,
|
|
2801
2835
|
colSpan: 0,
|
|
2802
2836
|
rowSpan: 0
|
|
2803
2837
|
};
|
|
2804
|
-
let
|
|
2805
|
-
|
|
2838
|
+
let $ = Array.from({ length: D - 1 }, () => cloneDeep(_));
|
|
2839
|
+
F.splice(N.col, 1, T, ...$);
|
|
2806
2840
|
}
|
|
2807
2841
|
}
|
|
2808
2842
|
}
|
|
2809
2843
|
}
|
|
2810
2844
|
});
|
|
2811
2845
|
}
|
|
2812
|
-
function ne(
|
|
2846
|
+
function ne(v) {
|
|
2813
2847
|
if (r.config && n.value) {
|
|
2814
2848
|
n.value.innerHTML = "", console.time("transformConfig");
|
|
2815
|
-
let { rowConfig:
|
|
2816
|
-
o && W(
|
|
2849
|
+
let { rowConfig: b, colConfig: p, config: c } = cloneDeep(r.config), o = w(p, v, "col", c), f = w(b, v, "row", c);
|
|
2850
|
+
o && W(p, o, c, v), f && j(b, f, c, v), computeCell(c), console.timeEnd("transformConfig"), console.time("renderReportByDom"), re(b, p, c, n), console.timeEnd("renderReportByDom");
|
|
2817
2851
|
}
|
|
2818
2852
|
}
|
|
2819
|
-
function Q(
|
|
2820
|
-
const
|
|
2821
|
-
let
|
|
2822
|
-
return
|
|
2853
|
+
function Q(v) {
|
|
2854
|
+
const b = document.createElement("colgroup");
|
|
2855
|
+
let p = 0;
|
|
2856
|
+
return v.forEach((c) => {
|
|
2823
2857
|
const o = document.createElement("col");
|
|
2824
|
-
|
|
2825
|
-
}), n.value && (n.value.style.width = `${
|
|
2858
|
+
p += c.size, o.style.width = `${c.size}px`, b.appendChild(o);
|
|
2859
|
+
}), n.value && (n.value.style.width = `${p}px`), b;
|
|
2826
2860
|
}
|
|
2827
|
-
function q(
|
|
2828
|
-
const
|
|
2829
|
-
|
|
2830
|
-
let
|
|
2831
|
-
switch (
|
|
2861
|
+
function q(v, b) {
|
|
2862
|
+
const p = document.createElement("td");
|
|
2863
|
+
p.setAttribute("data-cell-config", `${b.row}-${b.col}`), p.setAttribute("rowspan", b.rowSpan), p.setAttribute("colspan", b.colSpan);
|
|
2864
|
+
let c = "";
|
|
2865
|
+
switch (b.type) {
|
|
2832
2866
|
case "icon":
|
|
2833
|
-
|
|
2867
|
+
p.innerHTML = `<i class="iconfont ${b.data}"></i>`;
|
|
2834
2868
|
break;
|
|
2835
2869
|
case "image":
|
|
2836
|
-
|
|
2870
|
+
p.innerHTML = `<img src="${b.data}" alt="">`;
|
|
2837
2871
|
break;
|
|
2838
2872
|
default:
|
|
2839
|
-
|
|
2873
|
+
c = b.text !== void 0 && b.text !== null ? b.text : "";
|
|
2840
2874
|
break;
|
|
2841
2875
|
}
|
|
2842
|
-
return [CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN].includes(
|
|
2876
|
+
return [CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN].includes(b.type) && b.style && p.setAttribute("style", renderCellStyle(b.style)), p.innerText = c, p;
|
|
2843
2877
|
}
|
|
2844
|
-
function re(
|
|
2845
|
-
const o = Q(
|
|
2846
|
-
|
|
2847
|
-
let
|
|
2848
|
-
const
|
|
2849
|
-
for (let y = 0; y <
|
|
2850
|
-
const
|
|
2851
|
-
|
|
2852
|
-
for (let
|
|
2853
|
-
const
|
|
2854
|
-
if (
|
|
2855
|
-
const
|
|
2856
|
-
|
|
2878
|
+
function re(v, b, p, c) {
|
|
2879
|
+
const o = Q(b);
|
|
2880
|
+
c.value.appendChild(o);
|
|
2881
|
+
let f = 0;
|
|
2882
|
+
const l = document.createDocumentFragment();
|
|
2883
|
+
for (let y = 0; y < v.length; y++) {
|
|
2884
|
+
const i = v[y], D = document.createElement("tr");
|
|
2885
|
+
i.isFixed && (D.style.top = `${f - 1}px`, D.classList.add("fixed-row")), f += i.size, D.style.height = `${i.size}px`;
|
|
2886
|
+
for (let S = 0; S < b.length; S++) {
|
|
2887
|
+
const P = p[y][S];
|
|
2888
|
+
if (i && P && i.size > 0) {
|
|
2889
|
+
const V = q(i, P);
|
|
2890
|
+
V.setAttribute("data-cell-data", `${y}-${S}`), P.rowSpan === 0 || P.colSpan === 0 || D.appendChild(V);
|
|
2857
2891
|
}
|
|
2858
2892
|
}
|
|
2859
|
-
|
|
2893
|
+
l.appendChild(D);
|
|
2860
2894
|
}
|
|
2861
|
-
|
|
2895
|
+
c.value.appendChild(l);
|
|
2862
2896
|
}
|
|
2863
2897
|
async function Z() {
|
|
2864
|
-
|
|
2865
|
-
let
|
|
2866
|
-
r.config.data.processData && (
|
|
2898
|
+
m.value = !0;
|
|
2899
|
+
let v = await X(), b = ee(v);
|
|
2900
|
+
r.config.data.processData && (b = await getProcessData(r.config.data.processData, b, x.value)), ne(b), m.value = !1;
|
|
2867
2901
|
}
|
|
2868
|
-
function ee(
|
|
2869
|
-
let
|
|
2870
|
-
return Array.isArray(
|
|
2871
|
-
let o =
|
|
2872
|
-
|
|
2902
|
+
function ee(v) {
|
|
2903
|
+
let b = {};
|
|
2904
|
+
return Array.isArray(v) || (v = [v]), v.map(({ key: p, data: c }) => {
|
|
2905
|
+
let o = c.filter((f) => f);
|
|
2906
|
+
b[p] = o;
|
|
2873
2907
|
}), e("updateData", {
|
|
2874
2908
|
key: r.config.id,
|
|
2875
|
-
data:
|
|
2876
|
-
}),
|
|
2909
|
+
data: b
|
|
2910
|
+
}), b;
|
|
2877
2911
|
}
|
|
2878
2912
|
async function X() {
|
|
2879
2913
|
if (r.config.data.source) {
|
|
2880
|
-
let
|
|
2881
|
-
|
|
2882
|
-
let
|
|
2883
|
-
for (let
|
|
2884
|
-
const { key:
|
|
2914
|
+
let v = {};
|
|
2915
|
+
g.value && (v.params = cloneDeep(x.value)), s.value && (v.pageSize = u.pageSize, v.pageNumber = u.pageIndex);
|
|
2916
|
+
let b = [];
|
|
2917
|
+
for (let p = 0; p < r.config.data.source.length; p++) {
|
|
2918
|
+
const { key: c, url: o } = r.config.data.source[p];
|
|
2885
2919
|
if (o) {
|
|
2886
|
-
const
|
|
2887
|
-
|
|
2920
|
+
const f = await getDateSourceData(o, v);
|
|
2921
|
+
b.push({ key: c, data: f.data }), s.value && (u.total = f.count || f.data.length);
|
|
2888
2922
|
}
|
|
2889
2923
|
}
|
|
2890
|
-
return
|
|
2924
|
+
return b;
|
|
2891
2925
|
} else
|
|
2892
2926
|
return [];
|
|
2893
2927
|
}
|
|
2894
|
-
async function
|
|
2895
|
-
if (r.config.data.pagination && (r.config.data.pageSize !== void 0 && (
|
|
2896
|
-
let
|
|
2897
|
-
|
|
2928
|
+
async function H() {
|
|
2929
|
+
if (r.config.data.pagination && (r.config.data.pageSize !== void 0 && (u.pageSize = isNaN(r.config.data.pageSize) ? 10 : r.config.data.pageSize), r.config.data.pageSizes !== void 0)) {
|
|
2930
|
+
let v = r.config.data.pageSizes.split(",").map((b) => parseInt(b));
|
|
2931
|
+
u.pageSizes = Array.isArray(v) ? v : [10, 20, 50, 100, 200];
|
|
2898
2932
|
}
|
|
2899
2933
|
E = !0;
|
|
2900
2934
|
}
|
|
2901
2935
|
return onMounted(async () => {
|
|
2902
|
-
|
|
2903
|
-
}), (
|
|
2904
|
-
const
|
|
2936
|
+
H();
|
|
2937
|
+
}), (v, b) => {
|
|
2938
|
+
const p = resolveComponent("el-button"), c = resolveComponent("el-pagination"), o = resolveDirective("loading");
|
|
2905
2939
|
return openBlock(), createElementBlock("div", {
|
|
2906
2940
|
class: "yh-report-view-container",
|
|
2907
|
-
style: normalizeStyle(unref(
|
|
2941
|
+
style: normalizeStyle(unref(d))
|
|
2908
2942
|
}, [
|
|
2909
2943
|
createVNode(_sfc_main$4, {
|
|
2910
2944
|
config: r.config.params,
|
|
2911
2945
|
onChange: C
|
|
2912
2946
|
}, {
|
|
2913
2947
|
search: withCtx(() => [
|
|
2914
|
-
unref(
|
|
2948
|
+
unref(g) ? (openBlock(), createBlock(p, {
|
|
2915
2949
|
key: 0,
|
|
2916
2950
|
type: "primary",
|
|
2917
|
-
onClick:
|
|
2951
|
+
onClick: k
|
|
2918
2952
|
}, {
|
|
2919
2953
|
default: withCtx(() => [
|
|
2920
2954
|
createTextVNode(" 搜索 ")
|
|
@@ -2927,23 +2961,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2927
2961
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
2928
2962
|
class: "yh-statement-table-container",
|
|
2929
2963
|
ref_key: "statementTableRef",
|
|
2930
|
-
ref:
|
|
2964
|
+
ref: a
|
|
2931
2965
|
}, [
|
|
2932
2966
|
createElementVNode("table", {
|
|
2933
2967
|
ref_key: "tableBodyRef",
|
|
2934
2968
|
ref: n
|
|
2935
2969
|
}, null, 512)
|
|
2936
2970
|
])), [
|
|
2937
|
-
[o,
|
|
2971
|
+
[o, m.value]
|
|
2938
2972
|
]),
|
|
2939
|
-
unref(s) ? (openBlock(), createBlock(
|
|
2973
|
+
unref(s) ? (openBlock(), createBlock(c, {
|
|
2940
2974
|
key: 0,
|
|
2941
|
-
pageSize:
|
|
2942
|
-
"onUpdate:pageSize":
|
|
2943
|
-
"current-page":
|
|
2944
|
-
"onUpdate:currentPage":
|
|
2945
|
-
"page-sizes":
|
|
2946
|
-
total:
|
|
2975
|
+
pageSize: u.pageSize,
|
|
2976
|
+
"onUpdate:pageSize": b[0] || (b[0] = (f) => u.pageSize = f),
|
|
2977
|
+
"current-page": u.pageIndex,
|
|
2978
|
+
"onUpdate:currentPage": b[1] || (b[1] = (f) => u.pageIndex = f),
|
|
2979
|
+
"page-sizes": u.pageSizes,
|
|
2980
|
+
total: u.total,
|
|
2947
2981
|
layout: "total, jumper, prev, pager, next, sizes"
|
|
2948
2982
|
}, null, 8, ["pageSize", "current-page", "page-sizes", "total"])) : createCommentVNode("", !0)
|
|
2949
2983
|
], 4);
|
|
@@ -2952,42 +2986,42 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2952
2986
|
}), chartsTypeList = ["line", "rowBar", "bar", "scatter", "treemap", "label"], getChartData = async (t, e) => {
|
|
2953
2987
|
const {
|
|
2954
2988
|
data: { source: r },
|
|
2955
|
-
seriesData:
|
|
2989
|
+
seriesData: a,
|
|
2956
2990
|
xAisData: n,
|
|
2957
|
-
yAisData:
|
|
2991
|
+
yAisData: d,
|
|
2958
2992
|
type: s
|
|
2959
2993
|
} = t;
|
|
2960
|
-
let
|
|
2994
|
+
let g = {
|
|
2961
2995
|
...e
|
|
2962
2996
|
};
|
|
2963
|
-
for (let
|
|
2964
|
-
const { key: x, url: C } = r[
|
|
2965
|
-
|
|
2997
|
+
for (let u = 0; u < r.length; u++) {
|
|
2998
|
+
const { key: x, url: C } = r[u], E = (await getDateSourceData(C, {})).data;
|
|
2999
|
+
g[x] = E;
|
|
2966
3000
|
}
|
|
2967
|
-
if (Object.keys(
|
|
3001
|
+
if (Object.keys(g).length === 0)
|
|
2968
3002
|
return !1;
|
|
2969
|
-
if (
|
|
2970
|
-
const x = new Function("allData",
|
|
3003
|
+
if (a) {
|
|
3004
|
+
const x = new Function("allData", a)(g);
|
|
2971
3005
|
t.option.series.forEach((C) => {
|
|
2972
3006
|
C.data = x;
|
|
2973
3007
|
});
|
|
2974
3008
|
} else
|
|
2975
|
-
t.option = setYAxisData(t,
|
|
3009
|
+
t.option = setYAxisData(t, g);
|
|
2976
3010
|
if (chartsTypeList.includes(s)) {
|
|
2977
3011
|
if (n) {
|
|
2978
|
-
const
|
|
2979
|
-
t.option.xAxis.data =
|
|
3012
|
+
const u = new Function("allData", n);
|
|
3013
|
+
t.option.xAxis.data = u(g);
|
|
2980
3014
|
} else
|
|
2981
|
-
t.option = setXAxisData(t,
|
|
2982
|
-
if (
|
|
2983
|
-
const x = new Function("allData",
|
|
3015
|
+
t.option = setXAxisData(t, g);
|
|
3016
|
+
if (d) {
|
|
3017
|
+
const x = new Function("allData", d)(g);
|
|
2984
3018
|
t.option.yAxis.data = x;
|
|
2985
3019
|
}
|
|
2986
3020
|
}
|
|
2987
3021
|
}, chartItem_vue_vue_type_style_index_0_scoped_5bbf4c7d_lang = "", _export_sfc = (t, e) => {
|
|
2988
3022
|
const r = t.__vccOpts || t;
|
|
2989
|
-
for (const [
|
|
2990
|
-
r[
|
|
3023
|
+
for (const [a, n] of e)
|
|
3024
|
+
r[a] = n;
|
|
2991
3025
|
return r;
|
|
2992
3026
|
}, _sfc_main$2 = {
|
|
2993
3027
|
__name: "chart-item",
|
|
@@ -3002,12 +3036,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3002
3036
|
}
|
|
3003
3037
|
},
|
|
3004
3038
|
setup(t, { expose: e }) {
|
|
3005
|
-
const r = t,
|
|
3006
|
-
let
|
|
3039
|
+
const r = t, a = ref(), n = ref(null);
|
|
3040
|
+
let d = null;
|
|
3007
3041
|
watch(
|
|
3008
3042
|
() => r.chartData.option,
|
|
3009
3043
|
(E) => {
|
|
3010
|
-
|
|
3044
|
+
d && d.setOption(E, {
|
|
3011
3045
|
notMerge: !0
|
|
3012
3046
|
});
|
|
3013
3047
|
},
|
|
@@ -3019,39 +3053,39 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3019
3053
|
},
|
|
3020
3054
|
{ deep: !0 }
|
|
3021
3055
|
);
|
|
3022
|
-
const s = ref(!1),
|
|
3056
|
+
const s = ref(!1), g = (E) => {
|
|
3023
3057
|
if (n.value = E, E && Object.keys(E).length > 0) {
|
|
3024
|
-
const
|
|
3025
|
-
|
|
3058
|
+
const k = cloneDeep(r.chartData);
|
|
3059
|
+
u(k);
|
|
3026
3060
|
}
|
|
3027
|
-
},
|
|
3028
|
-
r.isView && await getChartData(E, n.value), E.type === "label" && E.option.series.forEach((
|
|
3029
|
-
|
|
3030
|
-
}),
|
|
3061
|
+
}, u = async (E) => {
|
|
3062
|
+
r.isView && await getChartData(E, n.value), E.type === "label" && E.option.series.forEach((k) => {
|
|
3063
|
+
k.renderItem = renderItem;
|
|
3064
|
+
}), d.setOption(E.option), s.value = !1;
|
|
3031
3065
|
}, x = async () => {
|
|
3032
|
-
s.value = !0,
|
|
3066
|
+
s.value = !0, d = echarts.init(a.value);
|
|
3033
3067
|
let E = cloneDeep(r.chartData);
|
|
3034
|
-
await
|
|
3068
|
+
await u(E);
|
|
3035
3069
|
}, C = () => {
|
|
3036
3070
|
nextTick(() => {
|
|
3037
|
-
|
|
3071
|
+
d.resize();
|
|
3038
3072
|
});
|
|
3039
3073
|
};
|
|
3040
3074
|
return e({
|
|
3041
|
-
setOutData:
|
|
3075
|
+
setOutData: g
|
|
3042
3076
|
}), onMounted(() => {
|
|
3043
3077
|
x(), window.addEventListener("resize", C);
|
|
3044
3078
|
}), onUnmounted(() => {
|
|
3045
3079
|
window.removeEventListener("resize", C);
|
|
3046
|
-
}), (E,
|
|
3047
|
-
const
|
|
3080
|
+
}), (E, k) => {
|
|
3081
|
+
const m = resolveDirective("loading");
|
|
3048
3082
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
3049
3083
|
ref_key: "chartRef",
|
|
3050
|
-
ref:
|
|
3084
|
+
ref: a,
|
|
3051
3085
|
"element-loading-text": "正在加载数据......",
|
|
3052
3086
|
class: "chart chart-common"
|
|
3053
3087
|
}, null, 512)), [
|
|
3054
|
-
[
|
|
3088
|
+
[m, s.value]
|
|
3055
3089
|
]);
|
|
3056
3090
|
};
|
|
3057
3091
|
}
|
|
@@ -3063,7 +3097,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3063
3097
|
outData: null
|
|
3064
3098
|
},
|
|
3065
3099
|
setup(t, { expose: e }) {
|
|
3066
|
-
const r = t,
|
|
3100
|
+
const r = t, a = ref();
|
|
3067
3101
|
watch(
|
|
3068
3102
|
() => r.outData,
|
|
3069
3103
|
(s) => {
|
|
@@ -3072,36 +3106,36 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3072
3106
|
{ deep: !0 }
|
|
3073
3107
|
);
|
|
3074
3108
|
const n = computed(() => {
|
|
3075
|
-
let s = r.config.widthUnit || "px",
|
|
3109
|
+
let s = r.config.widthUnit || "px", g = r.config.heightUnit || "px";
|
|
3076
3110
|
if (r.config.isSuspend) {
|
|
3077
|
-
let
|
|
3111
|
+
let u = {
|
|
3078
3112
|
position: "absolute",
|
|
3079
3113
|
left: r.config.left + "px",
|
|
3080
3114
|
top: r.config.top + "px",
|
|
3081
3115
|
zIndex: 100,
|
|
3082
|
-
height: r.config.height +
|
|
3116
|
+
height: r.config.height + g
|
|
3083
3117
|
};
|
|
3084
|
-
return s === "%" ?
|
|
3118
|
+
return s === "%" ? u.width = `calc( ${r.config.width}${s} - 10px)` : u.width = `${r.config.width - 10}${s}`, u;
|
|
3085
3119
|
} else {
|
|
3086
|
-
let
|
|
3087
|
-
height: r.config.height +
|
|
3120
|
+
let u = {
|
|
3121
|
+
height: r.config.height + g
|
|
3088
3122
|
};
|
|
3089
|
-
return s === "%" ?
|
|
3123
|
+
return s === "%" ? u.width = `calc( ${r.config.width}${s} - 10px)` : u.width = `${r.config.width - 10}${s}`, u;
|
|
3090
3124
|
}
|
|
3091
3125
|
});
|
|
3092
3126
|
return e({
|
|
3093
3127
|
setOutData: (s) => {
|
|
3094
|
-
var
|
|
3095
|
-
(
|
|
3128
|
+
var g;
|
|
3129
|
+
(g = a.value) == null || g.setOutData(s);
|
|
3096
3130
|
}
|
|
3097
|
-
}), (s,
|
|
3131
|
+
}), (s, g) => (openBlock(), createElementBlock("div", {
|
|
3098
3132
|
class: "yh-report-view-container chart-view-item",
|
|
3099
3133
|
style: normalizeStyle(unref(n))
|
|
3100
3134
|
}, [
|
|
3101
3135
|
createVNode(chartItem, {
|
|
3102
3136
|
"is-view": "",
|
|
3103
3137
|
ref_key: "chartItemRef",
|
|
3104
|
-
ref:
|
|
3138
|
+
ref: a,
|
|
3105
3139
|
"chart-data": r.config
|
|
3106
3140
|
}, null, 8, ["chart-data"])
|
|
3107
3141
|
], 4));
|
|
@@ -3117,34 +3151,34 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3117
3151
|
setup(t, { emit: e }) {
|
|
3118
3152
|
const r = t;
|
|
3119
3153
|
ref();
|
|
3120
|
-
const
|
|
3154
|
+
const a = ref(!1), n = ref(!1), d = ref(""), s = ref(), g = ref(), u = ref([]), x = {};
|
|
3121
3155
|
watch(
|
|
3122
3156
|
() => r.id,
|
|
3123
|
-
(
|
|
3124
|
-
C(
|
|
3157
|
+
(m) => {
|
|
3158
|
+
C(m);
|
|
3125
3159
|
}
|
|
3126
3160
|
);
|
|
3127
|
-
function C(
|
|
3128
|
-
|
|
3129
|
-
let { name:
|
|
3130
|
-
|
|
3161
|
+
function C(m) {
|
|
3162
|
+
m ? (n.value = !1, a.value = !0, getConfig(m).then(async (w) => {
|
|
3163
|
+
let { name: M, remoteOptions: B } = w;
|
|
3164
|
+
d.value = M, u.value = B;
|
|
3131
3165
|
}).finally(() => {
|
|
3132
|
-
|
|
3166
|
+
a.value = !1;
|
|
3133
3167
|
})) : n.value = !0;
|
|
3134
3168
|
}
|
|
3135
3169
|
const E = ref(!1);
|
|
3136
|
-
function
|
|
3137
|
-
var
|
|
3138
|
-
x[
|
|
3139
|
-
|
|
3170
|
+
function k(m) {
|
|
3171
|
+
var w;
|
|
3172
|
+
x[m.key] = m.data, (w = g.value) == null || w.forEach((M) => {
|
|
3173
|
+
M.setOutData(x);
|
|
3140
3174
|
});
|
|
3141
3175
|
}
|
|
3142
3176
|
return onMounted(() => {
|
|
3143
3177
|
C(r.id);
|
|
3144
|
-
}), (
|
|
3145
|
-
const
|
|
3178
|
+
}), (m, w) => {
|
|
3179
|
+
const M = resolveDirective("loading");
|
|
3146
3180
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3147
|
-
createElementVNode("div", _hoisted_1, toDisplayString(
|
|
3181
|
+
createElementVNode("div", _hoisted_1, toDisplayString(d.value), 1),
|
|
3148
3182
|
n.value ? (openBlock(), createBlock(unref(ElEmpty), {
|
|
3149
3183
|
key: 1,
|
|
3150
3184
|
class: "yh-statement-table-viewer-container",
|
|
@@ -3153,7 +3187,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3153
3187
|
default: withCtx(() => [
|
|
3154
3188
|
createVNode(unref(ElButton), {
|
|
3155
3189
|
type: "primary",
|
|
3156
|
-
onClick:
|
|
3190
|
+
onClick: w[0] || (w[0] = (B) => m.$router.back())
|
|
3157
3191
|
}, {
|
|
3158
3192
|
default: withCtx(() => [
|
|
3159
3193
|
createTextVNode(" 返回 ")
|
|
@@ -3168,18 +3202,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3168
3202
|
ref_key: "viewWrapper",
|
|
3169
3203
|
ref: s
|
|
3170
3204
|
}, [
|
|
3171
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
3205
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (B, J) => (openBlock(), createElementBlock(Fragment, null, [
|
|
3172
3206
|
B.type === "report" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
3173
3207
|
key: 0,
|
|
3174
3208
|
index: J,
|
|
3175
3209
|
config: B,
|
|
3176
|
-
onUpdateData:
|
|
3210
|
+
onUpdateData: k
|
|
3177
3211
|
}, null, 8, ["index", "config"])) : (openBlock(), createBlock(_sfc_main$1, {
|
|
3178
3212
|
key: 1,
|
|
3179
3213
|
config: B,
|
|
3180
3214
|
ref_for: !0,
|
|
3181
3215
|
ref_key: "chartViewItemRef",
|
|
3182
|
-
ref:
|
|
3216
|
+
ref: g,
|
|
3183
3217
|
index: J
|
|
3184
3218
|
}, null, 8, ["config", "index"]))
|
|
3185
3219
|
], 64))), 256)),
|
|
@@ -3187,14 +3221,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3187
3221
|
[vShow, E.value]
|
|
3188
3222
|
])
|
|
3189
3223
|
])), [
|
|
3190
|
-
[
|
|
3224
|
+
[M, a.value]
|
|
3191
3225
|
])
|
|
3192
3226
|
], 64);
|
|
3193
3227
|
};
|
|
3194
3228
|
}
|
|
3195
3229
|
}), reportRun_vue_vue_type_style_index_0_lang = "", index = {
|
|
3196
3230
|
install(t, e) {
|
|
3197
|
-
let { router: r, pinia:
|
|
3231
|
+
let { router: r, pinia: a, isAdmin: n = !1 } = e;
|
|
3198
3232
|
n && (r.addRoute("Index", {
|
|
3199
3233
|
path: "statement/list",
|
|
3200
3234
|
name: "报表列表",
|
|
@@ -3203,7 +3237,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3203
3237
|
title: "报表列表",
|
|
3204
3238
|
icon: "iconfont icon-s-grid"
|
|
3205
3239
|
},
|
|
3206
|
-
component: () => import("./StatementList-
|
|
3240
|
+
component: () => import("./StatementList-2352f290.mjs")
|
|
3207
3241
|
}), r.addRoute("Index", {
|
|
3208
3242
|
path: "statement/design/:id",
|
|
3209
3243
|
name: "报表设计",
|
|
@@ -3212,17 +3246,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3212
3246
|
title: "报表设计",
|
|
3213
3247
|
icon: "iconfont icon-s-grid"
|
|
3214
3248
|
},
|
|
3215
|
-
component: () => import("./StatementDesign-
|
|
3216
|
-
})
|
|
3217
|
-
path: "
|
|
3249
|
+
component: () => import("./StatementDesign-60ed7af8.mjs")
|
|
3250
|
+
}), r.addRoute("Index", {
|
|
3251
|
+
path: "statement/detail/:id",
|
|
3218
3252
|
name: "后台报表查看",
|
|
3219
3253
|
meta: {
|
|
3220
|
-
id: "
|
|
3254
|
+
id: "StatementDetail",
|
|
3221
3255
|
title: "后台报表查看",
|
|
3222
3256
|
icon: "iconfont icon-s-grid"
|
|
3223
3257
|
},
|
|
3224
|
-
component: () => import("./StatementDetail-
|
|
3225
|
-
}), r.addRoute({
|
|
3258
|
+
component: () => import("./StatementDetail-4a23ab2b.mjs")
|
|
3259
|
+
})), r.addRoute({
|
|
3226
3260
|
path: "/statementdetail/:id",
|
|
3227
3261
|
name: "报表查看",
|
|
3228
3262
|
meta: {
|
|
@@ -3230,7 +3264,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3230
3264
|
title: "报表查看",
|
|
3231
3265
|
icon: "iconfont icon-s-grid"
|
|
3232
3266
|
},
|
|
3233
|
-
component: () => import("./StatementDetail-
|
|
3267
|
+
component: () => import("./StatementDetail-4a23ab2b.mjs")
|
|
3234
3268
|
});
|
|
3235
3269
|
}
|
|
3236
3270
|
};
|
|
@@ -3286,4 +3320,4 @@ export {
|
|
|
3286
3320
|
renderCellStyle as r,
|
|
3287
3321
|
save as s
|
|
3288
3322
|
};
|
|
3289
|
-
//# sourceMappingURL=index-
|
|
3323
|
+
//# sourceMappingURL=index-e5ac46f6.mjs.map
|