@ecan-bi/tools 1.0.12 → 1.0.13
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/dist/index.es.js +818 -816
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +14 -6
- package/types/hooks/useTransformChartDataByAttrKey.d.ts +0 -25
- package/types/hooks/useTransformChartDataByAttrValue.d.ts +0 -23
- package/types/hooks/useValueFormatter.d.ts +0 -2
- package/types/hooks/useVariablesInText.d.ts +0 -12
- package/types/index.d.ts +0 -53
- package/types/indicator.d.ts +0 -4
- package/types/utils/constant.d.ts +0 -1
- package/types/utils/runCode.d.ts +0 -4
- package/types/utils/transformProps.d.ts +0 -21
- package/types/utils/util.d.ts +0 -31
package/dist/index.es.js
CHANGED
|
@@ -1,59 +1,95 @@
|
|
|
1
|
-
/*! @ecan-bi/tools@1.0.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/*! @ecan-bi/tools@1.0.13 */
|
|
2
|
+
var Pe = Object.defineProperty, qe = Object.defineProperties;
|
|
3
|
+
var Xe = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var de = Object.getOwnPropertySymbols;
|
|
5
|
+
var Ke = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var Be = (e, o, l) => o in e ? Pe(e, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[o] = l, C = (e, o) => {
|
|
7
|
+
for (var l in o || (o = {}))
|
|
8
|
+
Ke.call(o, l) && Be(e, l, o[l]);
|
|
9
|
+
if (de)
|
|
10
|
+
for (var l of de(o))
|
|
11
|
+
Ue.call(o, l) && Be(e, l, o[l]);
|
|
12
|
+
return e;
|
|
13
|
+
}, Y = (e, o) => qe(e, Xe(o));
|
|
14
|
+
var Se = (e, o) => {
|
|
15
|
+
var l = {};
|
|
16
|
+
for (var t in e)
|
|
17
|
+
Ke.call(e, t) && o.indexOf(t) < 0 && (l[t] = e[t]);
|
|
18
|
+
if (e != null && de)
|
|
19
|
+
for (var t of de(e))
|
|
20
|
+
o.indexOf(t) < 0 && Ue.call(e, t) && (l[t] = e[t]);
|
|
21
|
+
return l;
|
|
22
|
+
};
|
|
23
|
+
var We = (e, o, l) => new Promise((t, m) => {
|
|
24
|
+
var s = (n) => {
|
|
25
|
+
try {
|
|
26
|
+
d(l.next(n));
|
|
27
|
+
} catch (i) {
|
|
28
|
+
m(i);
|
|
29
|
+
}
|
|
30
|
+
}, r = (n) => {
|
|
31
|
+
try {
|
|
32
|
+
d(l.throw(n));
|
|
33
|
+
} catch (i) {
|
|
34
|
+
m(i);
|
|
35
|
+
}
|
|
36
|
+
}, d = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(s, r);
|
|
37
|
+
d((l = l.apply(e, o)).next());
|
|
38
|
+
});
|
|
39
|
+
import { unref as V, computed as oe } from "vue";
|
|
40
|
+
import $ from "dayjs";
|
|
41
|
+
import { cloneDeep as fe } from "lodash-es";
|
|
42
|
+
const we = (e, o) => {
|
|
43
|
+
const l = C({
|
|
44
|
+
dayjs: $
|
|
45
|
+
}, o);
|
|
10
46
|
let t = "";
|
|
11
|
-
const
|
|
12
|
-
for (const
|
|
13
|
-
t += `${
|
|
47
|
+
const m = [];
|
|
48
|
+
for (const d in l)
|
|
49
|
+
t += `${d},`, m.push(l[d]);
|
|
14
50
|
t = t.replace(/,$/, "");
|
|
15
|
-
const
|
|
16
|
-
let
|
|
51
|
+
const s = `function (${t}){return ${e}}`;
|
|
52
|
+
let r;
|
|
17
53
|
try {
|
|
18
|
-
|
|
19
|
-
} catch {
|
|
54
|
+
r = Function(`"use strict";return (${s})`)()(...m);
|
|
55
|
+
} catch (d) {
|
|
20
56
|
return e;
|
|
21
57
|
}
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
58
|
+
return r;
|
|
59
|
+
}, ie = (e = "", { textData: o, codeData: l } = {}, { useNewline: t = !1, useSpace: m = !1 } = {}) => {
|
|
60
|
+
const s = C({}, o), r = (e || "").match(/\{(.+?)\}/g);
|
|
61
|
+
if (r == null || r.length === 0)
|
|
26
62
|
return e;
|
|
27
|
-
for (let
|
|
28
|
-
const
|
|
29
|
-
let i =
|
|
30
|
-
const
|
|
31
|
-
for (let
|
|
32
|
-
const u =
|
|
33
|
-
|
|
63
|
+
for (let d = 0; d < r.length; d++) {
|
|
64
|
+
const n = r[d];
|
|
65
|
+
let i = n.slice(1, -1).trim();
|
|
66
|
+
const f = /[\u4e00-\u9fa5a-z-_A-Z0-9]*/g, a = i.match(f);
|
|
67
|
+
for (let b = 0; b < a.length; b++) {
|
|
68
|
+
const u = a[b], S = s[u];
|
|
69
|
+
S != null && (i = i.replace(u, S));
|
|
34
70
|
}
|
|
35
|
-
(/\(.*\)/g.test(i) || /[+/\\*]/g.test(i)) && (i =
|
|
71
|
+
(/\(.*\)/g.test(i) || /[+/\\*]/g.test(i)) && (i = we(i, l)), e = e.replace(n, i);
|
|
36
72
|
}
|
|
37
|
-
return t && (e = e == null ? void 0 : e.replace(/\n|\\n/g, "<br/>")),
|
|
38
|
-
},
|
|
73
|
+
return t && (e = e == null ? void 0 : e.replace(/\n|\\n/g, "<br/>")), m && (e = e == null ? void 0 : e.replace(/\s{2,}?/g, " ")), e = e.replace(/Qfw\((.*?)\)/, (d, n) => o != null && o.Qfw ? o == null ? void 0 : o.Qfw(n) : n), e;
|
|
74
|
+
}, K = (e, o) => {
|
|
39
75
|
if (typeof e == "string" && typeof o == "string")
|
|
40
76
|
return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());
|
|
41
77
|
if (typeof e == "string" && Array.isArray(o)) {
|
|
42
78
|
const l = o.length;
|
|
43
79
|
for (let t = 0; t < l; t++) {
|
|
44
|
-
const
|
|
45
|
-
if (typeof
|
|
80
|
+
const m = o[t];
|
|
81
|
+
if (typeof m == "string" && e.toLocaleLowerCase().includes(m.toLocaleLowerCase()))
|
|
46
82
|
return !0;
|
|
47
83
|
}
|
|
48
84
|
}
|
|
49
85
|
return !1;
|
|
50
|
-
},
|
|
86
|
+
}, W = (e, o) => Object.prototype.hasOwnProperty.call(e, o), ue = (e) => {
|
|
51
87
|
const o = [];
|
|
52
88
|
for (const l of e)
|
|
53
|
-
l.conditions ? o.push(...
|
|
89
|
+
l.conditions ? o.push(...ue(l.conditions)) : (l == null ? void 0 : l.dataType) === "component" && o.push(l);
|
|
54
90
|
return o;
|
|
55
91
|
};
|
|
56
|
-
function
|
|
92
|
+
function Je(e) {
|
|
57
93
|
const o = e.split("-");
|
|
58
94
|
let l = "";
|
|
59
95
|
if (o != null && o.length)
|
|
@@ -70,21 +106,21 @@ function Re(e) {
|
|
|
70
106
|
}
|
|
71
107
|
return l;
|
|
72
108
|
}
|
|
73
|
-
const
|
|
74
|
-
`),
|
|
75
|
-
var
|
|
76
|
-
const l = e.match(/\{(.+?)\}/g), t = ((
|
|
77
|
-
`)) == null ? void 0 :
|
|
78
|
-
let
|
|
109
|
+
const Ze = (e) => e.replace(/\\n/g, `
|
|
110
|
+
`), Oe = (e = "", o) => {
|
|
111
|
+
var r;
|
|
112
|
+
const l = e.match(/\{(.+?)\}/g), t = ((r = e.split(`
|
|
113
|
+
`)) == null ? void 0 : r.length) - 1;
|
|
114
|
+
let m = "";
|
|
79
115
|
if (t)
|
|
80
|
-
for (let
|
|
81
|
-
|
|
116
|
+
for (let d = 0; d < t; d++)
|
|
117
|
+
m += `
|
|
82
118
|
`;
|
|
83
|
-
let
|
|
119
|
+
let s = e;
|
|
84
120
|
if (l != null && l.length) {
|
|
85
|
-
for (const
|
|
86
|
-
const
|
|
87
|
-
|
|
121
|
+
for (const d of l) {
|
|
122
|
+
const n = ie(
|
|
123
|
+
d,
|
|
88
124
|
{
|
|
89
125
|
textData: o
|
|
90
126
|
},
|
|
@@ -93,61 +129,63 @@ const Ye = (e) => e.replace(/\\n/g, `
|
|
|
93
129
|
useSpace: !1
|
|
94
130
|
}
|
|
95
131
|
);
|
|
96
|
-
|
|
132
|
+
n && (s = s.replace(d, n));
|
|
97
133
|
}
|
|
98
|
-
return `${
|
|
134
|
+
return `${m}{text|${s}}`;
|
|
99
135
|
} else
|
|
100
136
|
return e;
|
|
101
137
|
};
|
|
102
|
-
function
|
|
103
|
-
let o = "", l = "", t = "",
|
|
138
|
+
function el(e) {
|
|
139
|
+
let o = "", l = "", t = "", m = "";
|
|
104
140
|
e.indexOf(".") > -1 ? (l = e.split(".")[0], t = e.split(".")[1]) : l = e;
|
|
105
|
-
let
|
|
106
|
-
for (
|
|
107
|
-
|
|
108
|
-
return o = o.split("").reverse().join(""), e.indexOf(".") > -1 ?
|
|
141
|
+
let s = 0, r = 0;
|
|
142
|
+
for (r = l.length - 1; r >= 0; )
|
|
143
|
+
s % 3 === 0 && s !== 0 ? l[r] === "-" ? o += l[r] : o += "," + l[r] : o += l[r], r--, s++;
|
|
144
|
+
return o = o.split("").reverse().join(""), e.indexOf(".") > -1 ? m = o + "." + t : m = o, m;
|
|
109
145
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
(
|
|
142
|
-
|
|
146
|
+
function ll(s) {
|
|
147
|
+
return We(this, arguments, function* ({ graphicConfig: e, request: o, INDICATOR_URL: l = "", PAGE_ID: t, dataSourceId: m }) {
|
|
148
|
+
var r;
|
|
149
|
+
try {
|
|
150
|
+
const { leftAxisList: d = [], rightAxisList: n = [], queryColumnList: i = [], indicators: f = [] } = V(e), a = [...d, ...n, ...i, ...f], b = {};
|
|
151
|
+
for (const u of a) {
|
|
152
|
+
const { indexCode: S = "", parentId: A = "" } = u;
|
|
153
|
+
A && !W(u, "calcType") && !b[A] && (b[A] = S);
|
|
154
|
+
}
|
|
155
|
+
if ((r = Object.keys(b)) != null && r.length) {
|
|
156
|
+
const u = [];
|
|
157
|
+
for (const x in b)
|
|
158
|
+
u.push(
|
|
159
|
+
new Promise((c, y) => {
|
|
160
|
+
o.post(
|
|
161
|
+
`${l}/diagram/hrpIndexWithComplex`,
|
|
162
|
+
{
|
|
163
|
+
pageId: t,
|
|
164
|
+
indexGuid: x,
|
|
165
|
+
indexCode: b[x],
|
|
166
|
+
dataSourceId: m
|
|
167
|
+
}
|
|
168
|
+
).then((g) => {
|
|
169
|
+
var v;
|
|
170
|
+
const { success: w, data: N = [] } = g.data;
|
|
171
|
+
w && ((v = N == null ? void 0 : N.dataViewColumns) != null && v.length) ? c(N.dataViewColumns) : y(N);
|
|
172
|
+
}).catch((g) => {
|
|
173
|
+
y(g);
|
|
174
|
+
});
|
|
175
|
+
})
|
|
176
|
+
);
|
|
177
|
+
return (yield Promise.all(u)).reduce(
|
|
178
|
+
(x, c) => x.filter((y) => c.find((g) => g.typeGuid === y.typeGuid))
|
|
179
|
+
).filter((x) => x.typeGuid);
|
|
180
|
+
}
|
|
181
|
+
} catch (d) {
|
|
143
182
|
}
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
return [];
|
|
183
|
+
return [];
|
|
184
|
+
});
|
|
147
185
|
}
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
const
|
|
186
|
+
const ol = ["table", "bar", "combograph", "line", "pie", "radar", "scatter", "list", "circulate"];
|
|
187
|
+
let ze = /* @__PURE__ */ new Map();
|
|
188
|
+
const tl = [
|
|
151
189
|
"keyValue",
|
|
152
190
|
"conditionKey",
|
|
153
191
|
"conditionLabel",
|
|
@@ -156,181 +194,172 @@ const _e = [
|
|
|
156
194
|
"customValue",
|
|
157
195
|
"id",
|
|
158
196
|
"keyName"
|
|
159
|
-
],
|
|
160
|
-
const { around: l, unit: t, id:
|
|
161
|
-
let
|
|
162
|
-
const { pageMode:
|
|
163
|
-
let
|
|
164
|
-
if (
|
|
165
|
-
const
|
|
166
|
-
if (!
|
|
197
|
+
], ce = (e) => ze.get(e), il = (e, o = {}) => {
|
|
198
|
+
const { around: l, unit: t, id: m } = e;
|
|
199
|
+
let s = "";
|
|
200
|
+
const { pageMode: r = "", componentList: d = [] } = (o == null ? void 0 : o.graphicConfig) || {};
|
|
201
|
+
let n = null, i = null;
|
|
202
|
+
if (r === "design") {
|
|
203
|
+
const f = d == null ? void 0 : d.find((c) => c.id === m);
|
|
204
|
+
if (!f)
|
|
167
205
|
return [];
|
|
168
|
-
const { interval:
|
|
169
|
-
if (
|
|
170
|
-
const { type: c, value:
|
|
206
|
+
const { interval: a, intervalUnit: b, startTime: u, endTime: S, operate: A, useCurrentTime: x } = f || {};
|
|
207
|
+
if (x && (n = $().subtract(a, b), i = $()), u && (n = $(u)), S && (i = $(S)), A) {
|
|
208
|
+
const { type: c, value: y, mode: g } = A;
|
|
171
209
|
switch (c) {
|
|
172
210
|
case "add":
|
|
173
|
-
|
|
211
|
+
n = n && n.add(y, g), i = i && i.add(y, g);
|
|
174
212
|
break;
|
|
175
213
|
case "minus":
|
|
176
|
-
|
|
214
|
+
n = n && n.subtract(y, g), i = i && i.subtract(y, g);
|
|
177
215
|
}
|
|
178
216
|
}
|
|
179
217
|
} else {
|
|
180
|
-
const
|
|
181
|
-
|
|
218
|
+
const f = ce(m) || {};
|
|
219
|
+
V(f.startTime) && (n = $(V(f.startTime))), V(f.endTime) && (i = $(V(f.endTime)));
|
|
182
220
|
}
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
|
|
221
|
+
if (n && i) {
|
|
222
|
+
const f = i.diff(n, t.toLowerCase());
|
|
223
|
+
s = `${l === "before" ? "-" : ""}${f + 1}`;
|
|
186
224
|
}
|
|
187
|
-
return
|
|
188
|
-
},
|
|
225
|
+
return s ? [s] : [];
|
|
226
|
+
}, _e = (e, o) => {
|
|
189
227
|
if (o)
|
|
190
|
-
|
|
228
|
+
W(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), W(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), W(e, "dataType") && delete e.dataType;
|
|
191
229
|
else {
|
|
192
|
-
const { calcWays: l = [], dateCalcTypes: t = [], activeKey:
|
|
193
|
-
if (
|
|
194
|
-
const
|
|
195
|
-
(
|
|
196
|
-
around:
|
|
230
|
+
const { calcWays: l = [], dateCalcTypes: t = [], activeKey: m, componentId: s = "" } = e;
|
|
231
|
+
if (m === 5 && (l != null && l.length) && (t != null && t.length) && s) {
|
|
232
|
+
const r = l[0].split("-");
|
|
233
|
+
(r == null ? void 0 : r.length) > 1 && r[0] === "rangeValue" && (e.calcWays = il({
|
|
234
|
+
around: r[1],
|
|
197
235
|
unit: t[0],
|
|
198
|
-
id:
|
|
236
|
+
id: s
|
|
199
237
|
})), delete e.radioValue;
|
|
200
238
|
}
|
|
201
|
-
if (
|
|
239
|
+
if (W(e, "dataType")) {
|
|
202
240
|
if (e.fieldType === "DATE" && (e.label = e.fieldName), e.dataType === "component")
|
|
203
241
|
if (e.fieldValue === "PARENT") {
|
|
204
|
-
let
|
|
205
|
-
|
|
242
|
+
let r = e.modelKey;
|
|
243
|
+
r && e.prop && (r += `-${e.prop}`), e.fieldValue = "${" + r + "}";
|
|
206
244
|
} else
|
|
207
245
|
e.fieldValue = "${" + e.fieldValue + "}";
|
|
208
246
|
delete e.dataType;
|
|
209
247
|
}
|
|
210
|
-
|
|
248
|
+
W(e, "activeKey") && delete e.activeKey, W(e, "radioValue") && delete e.radioValue, W(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), W(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), e.dataType !== "component" && e.useCurrentTime && (e.fieldValue = $().format(e.dateFormat)), W(e, "modelKey") && delete e.modelKey, W(e, "prop") && delete e.prop, delete e.useCurrentTime;
|
|
211
249
|
}
|
|
212
|
-
},
|
|
250
|
+
}, le = (e, o) => {
|
|
213
251
|
const l = [];
|
|
214
|
-
return e != null && e.length &&
|
|
252
|
+
return e != null && e.length && fe(e).forEach((t) => {
|
|
215
253
|
if (t.join && t.conditions) {
|
|
216
|
-
const
|
|
217
|
-
t.conditions.forEach((
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
l.push({
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
l.push({
|
|
228
|
-
[r]: O([d], o),
|
|
229
|
-
...f
|
|
230
|
-
});
|
|
254
|
+
const m = !t.conditions.some((s) => s.join && s.conditions);
|
|
255
|
+
t.conditions.forEach((s, r) => {
|
|
256
|
+
_e(s, o);
|
|
257
|
+
const d = {};
|
|
258
|
+
if (r < t.conditions.length - 1 && (d.join = t.join), m)
|
|
259
|
+
l.push(C(C({}, d), s));
|
|
260
|
+
else if (s.join && s.conditions) {
|
|
261
|
+
const n = o ? "sqlConditions" : "conditions";
|
|
262
|
+
l.push(C({
|
|
263
|
+
[n]: le([s], o)
|
|
264
|
+
}, d));
|
|
231
265
|
} else
|
|
232
|
-
l.push({
|
|
233
|
-
...f,
|
|
234
|
-
...d
|
|
235
|
-
});
|
|
266
|
+
l.push(C(C({}, d), s));
|
|
236
267
|
});
|
|
237
268
|
} else
|
|
238
|
-
|
|
269
|
+
_e(t, o), l.push(t);
|
|
239
270
|
}), l;
|
|
240
|
-
},
|
|
271
|
+
}, Ae = (e = {}, o) => {
|
|
241
272
|
if (e != null && e.sortCpnts && o) {
|
|
242
|
-
const w =
|
|
273
|
+
const w = Qe(e);
|
|
243
274
|
w && (o.sort = w);
|
|
244
275
|
}
|
|
245
276
|
const {
|
|
246
277
|
label: l,
|
|
247
278
|
name: t,
|
|
248
|
-
location:
|
|
249
|
-
show:
|
|
250
|
-
indexCode:
|
|
251
|
-
indexCodeNum:
|
|
252
|
-
calcType:
|
|
279
|
+
location: m,
|
|
280
|
+
show: s,
|
|
281
|
+
indexCode: r,
|
|
282
|
+
indexCodeNum: d,
|
|
283
|
+
calcType: n = "COLUMN",
|
|
253
284
|
builtInFormula: i,
|
|
254
|
-
builtInValueSource:
|
|
255
|
-
builtInCalcWay:
|
|
256
|
-
formula:
|
|
285
|
+
builtInValueSource: f,
|
|
286
|
+
builtInCalcWay: a,
|
|
287
|
+
formula: b,
|
|
257
288
|
conditions: u,
|
|
258
|
-
aggregate:
|
|
259
|
-
distinct:
|
|
260
|
-
dimByCount:
|
|
289
|
+
aggregate: S,
|
|
290
|
+
distinct: A,
|
|
291
|
+
dimByCount: x,
|
|
261
292
|
dataTo: c
|
|
262
293
|
} = e;
|
|
263
|
-
let
|
|
264
|
-
if (u && (
|
|
294
|
+
let y;
|
|
295
|
+
if (u && (y = le(u)), n === "COMPONENT") {
|
|
265
296
|
const w = {};
|
|
266
|
-
return
|
|
297
|
+
return me(w, f), {
|
|
267
298
|
label: l.trim(),
|
|
268
299
|
columnName: t,
|
|
269
|
-
show:
|
|
270
|
-
calcType:
|
|
271
|
-
componentAlias:
|
|
300
|
+
show: s,
|
|
301
|
+
calcType: n,
|
|
302
|
+
componentAlias: a,
|
|
272
303
|
componentValue: w.fieldValue || null
|
|
273
304
|
};
|
|
274
305
|
}
|
|
275
|
-
const
|
|
306
|
+
const g = {
|
|
276
307
|
label: l.trim(),
|
|
277
308
|
columnName: t,
|
|
278
|
-
location:
|
|
279
|
-
show:
|
|
280
|
-
calcType: c === "1" ? "VIEW" :
|
|
281
|
-
hrpIndexCode:
|
|
282
|
-
hrpIndexCodeNum:
|
|
283
|
-
aggregate:
|
|
309
|
+
location: m,
|
|
310
|
+
show: s,
|
|
311
|
+
calcType: c === "1" ? "VIEW" : n,
|
|
312
|
+
hrpIndexCode: r,
|
|
313
|
+
hrpIndexCodeNum: d,
|
|
314
|
+
aggregate: S,
|
|
284
315
|
builtInFormula: i,
|
|
285
|
-
builtInValueSource:
|
|
286
|
-
formula:
|
|
287
|
-
conditions:
|
|
316
|
+
builtInValueSource: f,
|
|
317
|
+
formula: b,
|
|
318
|
+
conditions: y
|
|
288
319
|
};
|
|
289
320
|
if (i === "DATE_OFFSET") {
|
|
290
|
-
const w =
|
|
321
|
+
const w = a.split("-");
|
|
291
322
|
if ((w == null ? void 0 : w.length) === 3) {
|
|
292
323
|
let N = w[0];
|
|
293
|
-
return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), {
|
|
294
|
-
...A,
|
|
324
|
+
return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), Y(C({}, g), {
|
|
295
325
|
calcWays: [N],
|
|
296
326
|
dateCalcTypes: [w[1]]
|
|
297
|
-
};
|
|
327
|
+
});
|
|
298
328
|
}
|
|
299
329
|
} else
|
|
300
|
-
return t === "the_count" && (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}, $e = (e) => {
|
|
330
|
+
return t === "the_count" && (g.calcType = "AGGREGATE", g.distinct = !!A, g.typeGuid = x), Y(C({}, g), {
|
|
331
|
+
builtInCalcWay: a
|
|
332
|
+
});
|
|
333
|
+
}, nl = (e) => {
|
|
305
334
|
if (!e)
|
|
306
335
|
return [];
|
|
307
|
-
const o =
|
|
336
|
+
const o = fe((e == null ? void 0 : e.controlList) || []).filter((S) => S.conditionKey !== "parentCode"), {
|
|
308
337
|
classificationList: l = [],
|
|
309
338
|
rowHeaderList: t = [],
|
|
310
|
-
dimensionList:
|
|
311
|
-
seriesList:
|
|
312
|
-
leftAxisList:
|
|
313
|
-
rightAxisList:
|
|
314
|
-
queryColumnList:
|
|
339
|
+
dimensionList: m = [],
|
|
340
|
+
seriesList: s = [],
|
|
341
|
+
leftAxisList: r = [],
|
|
342
|
+
rightAxisList: d = [],
|
|
343
|
+
queryColumnList: n = [],
|
|
315
344
|
indicators: i = []
|
|
316
345
|
} = e;
|
|
317
|
-
|
|
318
|
-
const
|
|
346
|
+
He(o);
|
|
347
|
+
const f = [
|
|
319
348
|
...l,
|
|
320
349
|
...t,
|
|
321
|
-
...
|
|
322
|
-
...
|
|
323
|
-
...a,
|
|
324
|
-
...f,
|
|
350
|
+
...m,
|
|
351
|
+
...s,
|
|
325
352
|
...r,
|
|
353
|
+
...d,
|
|
354
|
+
...n,
|
|
326
355
|
...i
|
|
327
|
-
],
|
|
328
|
-
for (const
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
331
|
-
const
|
|
332
|
-
const
|
|
333
|
-
return c != null && c.dateFormat && (
|
|
356
|
+
], a = [];
|
|
357
|
+
for (const S of f) {
|
|
358
|
+
const A = ue((S == null ? void 0 : S.conditions) || []);
|
|
359
|
+
if (A != null && A.length) {
|
|
360
|
+
const x = A.filter((c) => (c == null ? void 0 : c.dataType) === "component").map((c) => {
|
|
361
|
+
const y = {};
|
|
362
|
+
return c != null && c.dateFormat && (y.format = c.dateFormat), c.fieldValue === "PARENT" && (y.id = "PARENT", y.keyName = c.modelKey, y.modelKey = c.modelKey, y.prop = c.prop), C({
|
|
334
363
|
conditionKey: c.fieldName,
|
|
335
364
|
conditionLabel: c.fieldName,
|
|
336
365
|
conditionName: c.fieldName,
|
|
@@ -341,94 +370,93 @@ const _e = [
|
|
|
341
370
|
notGlobal: !0,
|
|
342
371
|
indexCode: c.indexCode,
|
|
343
372
|
typeGuid: c.typeGuid,
|
|
344
|
-
indexCodeNum: c.indexCodeNum
|
|
345
|
-
|
|
346
|
-
};
|
|
373
|
+
indexCodeNum: c.indexCodeNum
|
|
374
|
+
}, y);
|
|
347
375
|
});
|
|
348
|
-
if (
|
|
349
|
-
for (const c of
|
|
350
|
-
|
|
376
|
+
if (x != null && x.length)
|
|
377
|
+
for (const c of x)
|
|
378
|
+
a.find((y) => y.keyName === c.keyName) || a.push(c);
|
|
351
379
|
}
|
|
352
380
|
}
|
|
353
|
-
const
|
|
354
|
-
for (let
|
|
355
|
-
const
|
|
356
|
-
if ((
|
|
381
|
+
const b = a.length, u = o;
|
|
382
|
+
for (let S = 0; S < b; S++) {
|
|
383
|
+
const A = a[S];
|
|
384
|
+
if ((A == null ? void 0 : A.conditionKey) === "parentCode")
|
|
357
385
|
continue;
|
|
358
386
|
const {
|
|
359
|
-
id:
|
|
387
|
+
id: x,
|
|
360
388
|
keyName: c,
|
|
361
|
-
prop:
|
|
362
|
-
format:
|
|
389
|
+
prop: y,
|
|
390
|
+
format: g,
|
|
363
391
|
modelKey: w,
|
|
364
392
|
dataType: N = "component",
|
|
365
|
-
customValue:
|
|
366
|
-
} =
|
|
367
|
-
|
|
393
|
+
customValue: v
|
|
394
|
+
} = A, E = $e(A);
|
|
395
|
+
me(E, x, { prop: y, dateFormat: g, modelKey: w, keyName: c }), N === "" && (E.fieldValue = v || ""), u.push(E);
|
|
368
396
|
}
|
|
369
|
-
for (let
|
|
370
|
-
const
|
|
371
|
-
|
|
397
|
+
for (let S = u.length - 1; S >= 0; S--) {
|
|
398
|
+
const A = u[S];
|
|
399
|
+
A.globalCondition || ue(u).find((c) => c.alias === A.alias && c.globalCondition) && u.splice(S, 1);
|
|
372
400
|
}
|
|
373
401
|
return u;
|
|
374
402
|
};
|
|
375
|
-
function
|
|
403
|
+
function $e(e) {
|
|
376
404
|
const {
|
|
377
405
|
id: o,
|
|
378
406
|
keyName: l,
|
|
379
407
|
conditionLabel: t,
|
|
380
|
-
conditionKey:
|
|
381
|
-
conditionValueType:
|
|
382
|
-
prop:
|
|
383
|
-
rule:
|
|
384
|
-
notGlobal:
|
|
408
|
+
conditionKey: m,
|
|
409
|
+
conditionValueType: s,
|
|
410
|
+
prop: r,
|
|
411
|
+
rule: d = "NONE",
|
|
412
|
+
notGlobal: n = !1,
|
|
385
413
|
indexCode: i,
|
|
386
|
-
typeGuid:
|
|
387
|
-
indexCodeNum:
|
|
388
|
-
dataType:
|
|
414
|
+
typeGuid: f,
|
|
415
|
+
indexCodeNum: a,
|
|
416
|
+
dataType: b = "component"
|
|
389
417
|
} = e;
|
|
390
418
|
let u = l || o;
|
|
391
|
-
u &&
|
|
392
|
-
let
|
|
393
|
-
return
|
|
394
|
-
rule:
|
|
419
|
+
u && r && (u += `-${r}`);
|
|
420
|
+
let S = d;
|
|
421
|
+
return S === "NONE" && (["startTime", "endTime"].includes(r) ? S = r === "startTime" ? "GREATER_EQUAL" : "LESS_EQUAL" : l != null && l.includes("startTime") ? S = r === "GREATER_EQUAL" : l != null && l.includes("endTime") ? S = r === "LESS_EQUAL" : S = "EQUAL"), o === "PARENT" && (u = e.modelKey, u && r && (u += `-${r}`), S = d), {
|
|
422
|
+
rule: S,
|
|
395
423
|
label: t,
|
|
396
|
-
fieldName:
|
|
424
|
+
fieldName: m,
|
|
397
425
|
fieldValue: "",
|
|
398
426
|
// 在关联控件中取
|
|
399
427
|
// dateFormat: 'YYYY-MM',
|
|
400
|
-
valueType:
|
|
428
|
+
valueType: s,
|
|
401
429
|
alias: u,
|
|
402
|
-
globalCondition: !
|
|
430
|
+
globalCondition: !n,
|
|
403
431
|
indexCode: i,
|
|
404
|
-
typeGuid:
|
|
405
|
-
indexCodeNum:
|
|
406
|
-
dataType:
|
|
432
|
+
typeGuid: f,
|
|
433
|
+
indexCodeNum: a,
|
|
434
|
+
dataType: b
|
|
407
435
|
};
|
|
408
436
|
}
|
|
409
|
-
function
|
|
437
|
+
function He(e) {
|
|
410
438
|
if (e != null && e.length)
|
|
411
439
|
for (const o of e)
|
|
412
440
|
if (o != null && o.conditions)
|
|
413
|
-
|
|
441
|
+
He(o.conditions);
|
|
414
442
|
else {
|
|
415
443
|
const {
|
|
416
444
|
id: l,
|
|
417
445
|
keyName: t,
|
|
418
|
-
prop:
|
|
419
|
-
modelKey:
|
|
420
|
-
format:
|
|
421
|
-
dataType:
|
|
422
|
-
customValue:
|
|
423
|
-
} = o, i =
|
|
424
|
-
|
|
425
|
-
for (const
|
|
426
|
-
o[
|
|
427
|
-
for (const
|
|
428
|
-
delete o[
|
|
446
|
+
prop: m,
|
|
447
|
+
modelKey: s,
|
|
448
|
+
format: r,
|
|
449
|
+
dataType: d = "component",
|
|
450
|
+
customValue: n
|
|
451
|
+
} = o, i = $e(o);
|
|
452
|
+
me(i, l, { prop: m, dateFormat: r, modelKey: s, keyName: t }), d === "" && (i.fieldValue = n || "");
|
|
453
|
+
for (const f in i)
|
|
454
|
+
o[f] = i[f];
|
|
455
|
+
for (const f of tl)
|
|
456
|
+
delete o[f];
|
|
429
457
|
}
|
|
430
458
|
}
|
|
431
|
-
function
|
|
459
|
+
function rl(e) {
|
|
432
460
|
const o = [];
|
|
433
461
|
if (e != null && e.length) {
|
|
434
462
|
for (const l of e)
|
|
@@ -439,7 +467,7 @@ function He(e) {
|
|
|
439
467
|
valueType: l.variableType,
|
|
440
468
|
alias: l.keyName || ""
|
|
441
469
|
};
|
|
442
|
-
|
|
470
|
+
me(t, l.id, {
|
|
443
471
|
dateFormat: l.format,
|
|
444
472
|
prop: l.dateTypeValue,
|
|
445
473
|
keyName: l.keyName,
|
|
@@ -451,107 +479,107 @@ function He(e) {
|
|
|
451
479
|
}
|
|
452
480
|
return o;
|
|
453
481
|
}
|
|
454
|
-
function
|
|
455
|
-
const { prop: t = "", dateFormat:
|
|
456
|
-
if (o === "PARENT" &&
|
|
457
|
-
const
|
|
458
|
-
let
|
|
482
|
+
function me(e, o, l) {
|
|
483
|
+
const { prop: t = "", dateFormat: m = "", modelKey: s = "", keyName: r = "", operateValue: d, operateMode: n, operateType: i } = l || {}, f = s || r;
|
|
484
|
+
if (o === "PARENT" && f && t) {
|
|
485
|
+
const y = window.config.record;
|
|
486
|
+
let g = t, w = m;
|
|
459
487
|
const N = t.match(/\{(.+?)\}/g);
|
|
460
488
|
if (N != null && N.length) {
|
|
461
|
-
const
|
|
462
|
-
|
|
489
|
+
const v = N[0].slice(1, -1).trim();
|
|
490
|
+
g = t.replace(N[0], ""), w = v, e.dateFormat = w;
|
|
463
491
|
}
|
|
464
|
-
if (
|
|
465
|
-
const
|
|
466
|
-
|
|
492
|
+
if (y && y[f]) {
|
|
493
|
+
const v = V(y[f][g]);
|
|
494
|
+
$.isDayjs(v) ? e.fieldValue = v.format(w || "YYYY-MM-DD") : e.fieldValue = v;
|
|
467
495
|
}
|
|
468
496
|
return;
|
|
469
497
|
}
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
let
|
|
473
|
-
if (
|
|
498
|
+
const a = ce(o) || {}, { value: b, format: u = "YYYY-MM-DD", type: S = "", useCurrentTime: A, RECORD: x } = a || {}, c = m || u;
|
|
499
|
+
if (K(a.type, "date")) {
|
|
500
|
+
let y;
|
|
501
|
+
if (A ? b ? y = V(b) : y = $() : y = V(b), d && n && i)
|
|
474
502
|
switch (i) {
|
|
475
503
|
case "add":
|
|
476
|
-
|
|
504
|
+
y = y.add(d, n);
|
|
477
505
|
break;
|
|
478
506
|
case "minus":
|
|
479
|
-
|
|
507
|
+
y = y.subtract(d, n);
|
|
480
508
|
break;
|
|
481
509
|
}
|
|
482
|
-
e.fieldValue =
|
|
483
|
-
} else if (
|
|
484
|
-
let
|
|
510
|
+
e.fieldValue = y == null ? void 0 : y.format(c), e.dateFormat = c;
|
|
511
|
+
} else if (S === "ecanRangePicker") {
|
|
512
|
+
let y = t;
|
|
485
513
|
if (!t) {
|
|
486
|
-
const w =
|
|
487
|
-
w != null && w.length && (
|
|
514
|
+
const w = r && r.split("-");
|
|
515
|
+
w != null && w.length && (y = w[w.length - 1]);
|
|
488
516
|
}
|
|
489
|
-
if (!
|
|
517
|
+
if (!y)
|
|
490
518
|
return;
|
|
491
|
-
let
|
|
492
|
-
if (
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
495
|
-
const w =
|
|
519
|
+
let g = null;
|
|
520
|
+
if (V(a[y]) && (g = $(V(a[y]))), d && n && i) {
|
|
521
|
+
if (d === "rangeValue") {
|
|
522
|
+
if (a.startTime && a.endTime) {
|
|
523
|
+
const w = V(a.endTime).diff(V(a.startTime), n) + 1;
|
|
496
524
|
switch (i) {
|
|
497
525
|
case "add":
|
|
498
|
-
|
|
526
|
+
g = g && g.add(w, n);
|
|
499
527
|
break;
|
|
500
528
|
case "minus":
|
|
501
|
-
|
|
529
|
+
g = g && g.subtract(w, n);
|
|
502
530
|
}
|
|
503
531
|
}
|
|
504
|
-
} else if (!isNaN(+
|
|
532
|
+
} else if (!isNaN(+d))
|
|
505
533
|
switch (i) {
|
|
506
534
|
case "add":
|
|
507
|
-
|
|
535
|
+
g = g && g.add(d, n);
|
|
508
536
|
break;
|
|
509
537
|
case "minus":
|
|
510
|
-
|
|
538
|
+
g = g && g.subtract(d, n);
|
|
511
539
|
}
|
|
512
540
|
}
|
|
513
|
-
if (
|
|
514
|
-
const w =
|
|
515
|
-
w && (e.fieldValue =
|
|
541
|
+
if (g && (e.fieldValue = g == null ? void 0 : g.format(c)), y === "rangeValue" && a.startTime && a.endTime) {
|
|
542
|
+
const w = Je(c);
|
|
543
|
+
w && (e.fieldValue = V(a.endTime).diff(V(a.startTime), w) + 1);
|
|
516
544
|
}
|
|
517
545
|
e.dateFormat = c;
|
|
518
546
|
} else
|
|
519
|
-
|
|
547
|
+
K(S, ol) ? s && x ? e.fieldValue = x[s] : !s && x ? e.fieldValue = x.value : e.fieldValue = V(b) : e.fieldValue = V(b);
|
|
520
548
|
}
|
|
521
|
-
const
|
|
549
|
+
const se = (e) => {
|
|
522
550
|
var o;
|
|
523
551
|
if (e) {
|
|
524
|
-
const l = Array.isArray(e) ?
|
|
525
|
-
let t = "",
|
|
526
|
-
const
|
|
527
|
-
for (const
|
|
528
|
-
if (
|
|
529
|
-
const i =
|
|
530
|
-
|
|
552
|
+
const l = Array.isArray(e) ? fe(e) : [fe(e)];
|
|
553
|
+
let t = "", m = [];
|
|
554
|
+
const s = [], r = [], d = [];
|
|
555
|
+
for (const n of l) {
|
|
556
|
+
if (n.defaultCode && (n.label = n.columnName, delete n.defaultCode), n.type === "CUSTOM" && (m = n.customOrderColumns), t = n.type, s.push(n.label), (o = n.columnName) != null && o.includes("_ecanrepeat_")) {
|
|
557
|
+
const i = n.columnName.split("_ecanrepeat_");
|
|
558
|
+
r.push(i[0]);
|
|
531
559
|
} else
|
|
532
|
-
|
|
533
|
-
|
|
560
|
+
r.push(n.columnName);
|
|
561
|
+
d.push(n.order);
|
|
534
562
|
}
|
|
535
|
-
return t !== "CUSTOM" && (
|
|
536
|
-
label:
|
|
537
|
-
columnName:
|
|
563
|
+
return t !== "CUSTOM" && (s == null ? void 0 : s.length) > 1 && (t = "COMBINATION"), t === "CUSTOM" ? {
|
|
564
|
+
label: s.join(","),
|
|
565
|
+
columnName: r.join(","),
|
|
538
566
|
type: t,
|
|
539
|
-
customOrderColumns:
|
|
567
|
+
customOrderColumns: m
|
|
540
568
|
} : {
|
|
541
|
-
label:
|
|
542
|
-
columnName:
|
|
543
|
-
order:
|
|
569
|
+
label: s.join(","),
|
|
570
|
+
columnName: r.join(","),
|
|
571
|
+
order: d.join(","),
|
|
544
572
|
type: t
|
|
545
573
|
};
|
|
546
574
|
} else
|
|
547
575
|
return e;
|
|
548
|
-
},
|
|
576
|
+
}, Qe = (e) => {
|
|
549
577
|
const { sortCpnts: o = [] } = e;
|
|
550
578
|
let l, t = "";
|
|
551
|
-
for (const
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
t =
|
|
579
|
+
for (const m of o) {
|
|
580
|
+
const s = ce(m) || {}, { type: r, RECORD: d } = s;
|
|
581
|
+
if (K(r, "image") && K(d == null ? void 0 : d.value, ["asc", "desc"])) {
|
|
582
|
+
t = d.value.toUpperCase();
|
|
555
583
|
break;
|
|
556
584
|
}
|
|
557
585
|
}
|
|
@@ -561,443 +589,436 @@ const re = (e) => {
|
|
|
561
589
|
order: t,
|
|
562
590
|
type: "NORMAL"
|
|
563
591
|
}), l;
|
|
564
|
-
},
|
|
565
|
-
var
|
|
566
|
-
const { graphicConfig: l, type: t, globalModel:
|
|
567
|
-
|
|
568
|
-
let
|
|
569
|
-
const
|
|
592
|
+
}, al = (e, o = {}) => {
|
|
593
|
+
var Ne, Fe, ve, ke, Ve, Ie, he, Ge, De, je;
|
|
594
|
+
const { graphicConfig: l, type: t, globalModel: m, isGroupTable: s = !1 } = e;
|
|
595
|
+
m && (ze = m);
|
|
596
|
+
let r = e.pageId;
|
|
597
|
+
const d = K(t, "pivottable");
|
|
570
598
|
let {
|
|
571
|
-
source:
|
|
599
|
+
source: n,
|
|
572
600
|
dataViewId: i,
|
|
573
|
-
plugin:
|
|
601
|
+
plugin: f = "1",
|
|
574
602
|
// 插件类型
|
|
575
|
-
layer:
|
|
603
|
+
layer: a,
|
|
576
604
|
// 后台图表类型,值分0,1
|
|
577
|
-
chartType:
|
|
605
|
+
chartType: b,
|
|
578
606
|
// 前端图表类型
|
|
579
607
|
classificationList: u = [],
|
|
580
|
-
rowHeaderList:
|
|
581
|
-
dimensionList:
|
|
608
|
+
rowHeaderList: S = [],
|
|
609
|
+
dimensionList: A = [],
|
|
582
610
|
// 文本组件的维度列表
|
|
583
|
-
seriesList:
|
|
611
|
+
seriesList: x = [],
|
|
584
612
|
leftAxisList: c = [],
|
|
585
|
-
rightAxisList:
|
|
586
|
-
queryColumnList:
|
|
613
|
+
rightAxisList: y = [],
|
|
614
|
+
queryColumnList: g = [],
|
|
587
615
|
indicators: w = [],
|
|
588
616
|
controlList: N = [],
|
|
589
|
-
formFields:
|
|
590
|
-
variableList:
|
|
591
|
-
variableConditions:
|
|
617
|
+
formFields: v = {},
|
|
618
|
+
variableList: E = [],
|
|
619
|
+
variableConditions: Z = [],
|
|
592
620
|
// dataSourceId, // 所属数据源ID
|
|
593
|
-
idxLibMode:
|
|
621
|
+
idxLibMode: re,
|
|
594
622
|
// 指标库模式, source= INDICATOR_LIB时候必填, NORMAL_YEAR_TABLE = 普通年表, WITH_DATE_DIM_TABLE = 带有时间维度表
|
|
595
|
-
preview:
|
|
623
|
+
preview: ye = !1,
|
|
596
624
|
// 预览开关
|
|
597
|
-
edvDataSetId:
|
|
625
|
+
edvDataSetId: Le
|
|
598
626
|
// 数据集id
|
|
599
|
-
} = l || {},
|
|
600
|
-
if ((l == null ? void 0 : l.pageMode) === "design" ? (
|
|
601
|
-
const
|
|
602
|
-
if (!
|
|
603
|
-
const
|
|
604
|
-
|
|
627
|
+
} = l || {}, I = [];
|
|
628
|
+
if ((l == null ? void 0 : l.pageMode) === "design" ? (I = ((Ne = l.sqlConditions) != null ? Ne : []).map((L) => {
|
|
629
|
+
const T = {};
|
|
630
|
+
if (!W(L, "globalCondition") && !L.join && (T.globalCondition = !0), !L.join) {
|
|
631
|
+
const p = L.rule || "EQUAL";
|
|
632
|
+
T.rule = p === "NONE" ? "EQUAL" : p;
|
|
605
633
|
}
|
|
606
|
-
return {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
}), X != null && X.length && (V = V.concat(X))) : (V = $e(l), M != null && M.length && (V = V.concat(He(M)))), V != null && V.length) {
|
|
611
|
-
const L = V.filter((T) => T.globalCondition), C = V.filter((T) => !T.globalCondition);
|
|
612
|
-
(L == null ? void 0 : L.length) > 1 && (V = [
|
|
634
|
+
return C(C({}, L), T);
|
|
635
|
+
}), Z != null && Z.length && (I = I.concat(Z))) : (I = nl(l), E != null && E.length && (I = I.concat(rl(E)))), I != null && I.length) {
|
|
636
|
+
const L = I.filter((p) => p.globalCondition), T = I.filter((p) => !p.globalCondition);
|
|
637
|
+
(L == null ? void 0 : L.length) > 1 && (I = [
|
|
613
638
|
{
|
|
614
639
|
join: "&&",
|
|
615
640
|
conditions: L
|
|
616
641
|
},
|
|
617
|
-
...
|
|
642
|
+
...T
|
|
618
643
|
]);
|
|
619
644
|
}
|
|
620
|
-
|
|
621
|
-
let
|
|
622
|
-
const
|
|
623
|
-
let
|
|
645
|
+
I != null && I.length && (I = le(I, "1")), a == null && (K(t, ["table", "card"]) || K(t, ["list", "circulate"]) && (u == null ? void 0 : u.length) > 1 ? a = "1" : K(t, ["select", "checkbox", "radio"]) ? a = "3" : a = "2");
|
|
646
|
+
let H;
|
|
647
|
+
const Ce = [];
|
|
648
|
+
let xe = "";
|
|
624
649
|
if (Array.isArray(u) && u.length > 0 && (!["ecanList", "ecanCirculate"].includes(t) || (u == null ? void 0 : u.length) === 1)) {
|
|
625
650
|
const L = u.length;
|
|
626
|
-
for (let
|
|
627
|
-
const
|
|
628
|
-
label:
|
|
629
|
-
name:
|
|
630
|
-
show:
|
|
631
|
-
sort:
|
|
632
|
-
customGroup:
|
|
633
|
-
conditions:
|
|
634
|
-
dateFormat:
|
|
635
|
-
typeGuid:
|
|
636
|
-
truncations:
|
|
637
|
-
} =
|
|
638
|
-
if (
|
|
639
|
-
|
|
640
|
-
label:
|
|
641
|
-
columnName:
|
|
642
|
-
show:
|
|
643
|
-
sort:
|
|
644
|
-
customGroup:
|
|
645
|
-
conditions:
|
|
646
|
-
typeGuid:
|
|
647
|
-
},
|
|
648
|
-
const
|
|
649
|
-
if (Array.isArray(
|
|
650
|
-
const
|
|
651
|
-
for (let
|
|
652
|
-
const
|
|
653
|
-
|
|
651
|
+
for (let T = 0; T < L; T++) {
|
|
652
|
+
const p = u[T] || {}, {
|
|
653
|
+
label: G = "",
|
|
654
|
+
name: D = "",
|
|
655
|
+
show: j = !1,
|
|
656
|
+
sort: Q,
|
|
657
|
+
customGroup: q,
|
|
658
|
+
conditions: F,
|
|
659
|
+
dateFormat: k,
|
|
660
|
+
typeGuid: R = "",
|
|
661
|
+
truncations: M = []
|
|
662
|
+
} = p;
|
|
663
|
+
if (j || L === 1) {
|
|
664
|
+
xe = R, H = {
|
|
665
|
+
label: G.trim(),
|
|
666
|
+
columnName: D,
|
|
667
|
+
show: j,
|
|
668
|
+
sort: Qe(p) || se(Q) || Q,
|
|
669
|
+
customGroup: q,
|
|
670
|
+
conditions: le(F),
|
|
671
|
+
typeGuid: R
|
|
672
|
+
}, k && (H.dateFormat = k), D === "the_date" && !H.dateFormat && (H.dateFormat = "YYYY-MM");
|
|
673
|
+
const h = {};
|
|
674
|
+
if (Array.isArray(M) && M.length > 0) {
|
|
675
|
+
const U = M.length;
|
|
676
|
+
for (let _ = 0; _ < U; _++) {
|
|
677
|
+
const z = M[_] || {}, { rule: P = "", num: X = 0, name: ee = "" } = z;
|
|
678
|
+
P && X && (h.num = X, h.rule = P, ee && (h.otherGroupName = ee));
|
|
654
679
|
}
|
|
655
680
|
}
|
|
656
|
-
if ((
|
|
657
|
-
|
|
681
|
+
if ((Fe = Object.keys(h)) != null && Fe.length && (H.truncation = h), K(t, ["scatter", "valueline"]))
|
|
682
|
+
Ce.push(H);
|
|
658
683
|
else
|
|
659
684
|
break;
|
|
660
685
|
}
|
|
661
686
|
}
|
|
662
687
|
}
|
|
663
|
-
let
|
|
664
|
-
if (Array.isArray(
|
|
665
|
-
const L =
|
|
666
|
-
for (let
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
669
|
-
|
|
670
|
-
label:
|
|
671
|
-
columnName:
|
|
672
|
-
show:
|
|
673
|
-
sort:
|
|
674
|
-
customGroup:
|
|
675
|
-
conditions:
|
|
676
|
-
typeGuid:
|
|
688
|
+
let Te;
|
|
689
|
+
if (Array.isArray(x) && x.length > 0) {
|
|
690
|
+
const L = x.length;
|
|
691
|
+
for (let T = 0; T < L; T++) {
|
|
692
|
+
const p = x[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, typeGuid: k } = p;
|
|
693
|
+
if (j || L === 1) {
|
|
694
|
+
Te = {
|
|
695
|
+
label: G.trim(),
|
|
696
|
+
columnName: D,
|
|
697
|
+
show: j,
|
|
698
|
+
sort: se(Q),
|
|
699
|
+
customGroup: q,
|
|
700
|
+
conditions: le(F),
|
|
701
|
+
typeGuid: k
|
|
677
702
|
};
|
|
678
703
|
break;
|
|
679
704
|
}
|
|
680
705
|
}
|
|
681
706
|
}
|
|
682
|
-
const
|
|
707
|
+
const B = [];
|
|
683
708
|
c == null || c.forEach((L) => {
|
|
684
|
-
L.location = "LEFT",
|
|
685
|
-
}),
|
|
686
|
-
L.location = "RIGHT",
|
|
709
|
+
L.location = "LEFT", B.push(Ae(L, H));
|
|
710
|
+
}), y == null || y.forEach((L) => {
|
|
711
|
+
L.location = "RIGHT", B.push(Ae(L, H));
|
|
687
712
|
});
|
|
688
|
-
let
|
|
689
|
-
(
|
|
690
|
-
L.location = "LEFT",
|
|
713
|
+
let ae = w;
|
|
714
|
+
(ke = (ve = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : ve.indicators) != null && ke.length && (ae = o.pivotTableCal.indicators), ae == null || ae.forEach((L) => {
|
|
715
|
+
L.location = "LEFT", B.push(Ae(L, H));
|
|
691
716
|
});
|
|
692
|
-
const
|
|
693
|
-
["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (
|
|
694
|
-
const { label:
|
|
695
|
-
let
|
|
717
|
+
const J = [];
|
|
718
|
+
["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (g = u), (Ie = (Ve = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : Ve.dimensions) != null && Ie.length && (g = o.pivotTableCal.dimensions), g == null || g.forEach((L) => {
|
|
719
|
+
const { label: T, name: p, location: G, show: D, indexCode: j, sort: Q, typeGuid: q, indexCodeNum: F, dateFormat: k, conditions: R } = L;
|
|
720
|
+
let M = se(Q);
|
|
696
721
|
if (o.sort) {
|
|
697
|
-
const { field:
|
|
698
|
-
let
|
|
699
|
-
!
|
|
700
|
-
columnName:
|
|
722
|
+
const { field: U, order: _ } = o.sort;
|
|
723
|
+
let z = B.find((P) => P.label === U);
|
|
724
|
+
!z && T === U && (z = L), z && (M = {
|
|
725
|
+
columnName: z.columnName,
|
|
701
726
|
label: o.sort.field,
|
|
702
|
-
order:
|
|
727
|
+
order: _.toUpperCase(),
|
|
703
728
|
type: "NORMAL"
|
|
704
729
|
});
|
|
705
730
|
}
|
|
706
|
-
const
|
|
707
|
-
label:
|
|
708
|
-
columnName:
|
|
709
|
-
location:
|
|
710
|
-
show:
|
|
711
|
-
sort:
|
|
731
|
+
const h = {
|
|
732
|
+
label: T,
|
|
733
|
+
columnName: p,
|
|
734
|
+
location: G,
|
|
735
|
+
show: D,
|
|
736
|
+
sort: M,
|
|
712
737
|
calcType: "COLUMN",
|
|
713
|
-
hrpIndexCode:
|
|
714
|
-
hrpIndexCodeNum:
|
|
715
|
-
conditions:
|
|
716
|
-
typeGuid:
|
|
738
|
+
hrpIndexCode: j,
|
|
739
|
+
hrpIndexCodeNum: F,
|
|
740
|
+
conditions: le(R),
|
|
741
|
+
typeGuid: q
|
|
717
742
|
};
|
|
718
|
-
|
|
743
|
+
k && (h.dateFormat = k), p === "the_date" && !h.dateFormat && (h.dateFormat = "YYYY-MM"), J.push(h);
|
|
719
744
|
});
|
|
720
|
-
let
|
|
721
|
-
if (Array.isArray(
|
|
722
|
-
const L =
|
|
723
|
-
for (let
|
|
724
|
-
const
|
|
725
|
-
let
|
|
745
|
+
let ne = [], O = [];
|
|
746
|
+
if (Array.isArray(S) && S.length > 0 ? O = S : Array.isArray(A) && A.length > 0 && (O = A), O != null && O.length) {
|
|
747
|
+
const L = O.length;
|
|
748
|
+
for (let T = 0; T < L; T++) {
|
|
749
|
+
const p = O[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, truncations: k, typeGuid: R = "", dateFormat: M } = p;
|
|
750
|
+
let h = se(Q);
|
|
726
751
|
if (o.sort) {
|
|
727
|
-
const { field:
|
|
728
|
-
let
|
|
729
|
-
!
|
|
730
|
-
columnName:
|
|
752
|
+
const { field: z, order: P } = o.sort;
|
|
753
|
+
let X = B.find((ee) => ee.label === z);
|
|
754
|
+
!X && p.label === z && (X = p), X && (h = {
|
|
755
|
+
columnName: X.columnName,
|
|
731
756
|
label: o.sort.field,
|
|
732
|
-
order:
|
|
757
|
+
order: P.toUpperCase(),
|
|
733
758
|
type: "NORMAL"
|
|
734
759
|
});
|
|
735
760
|
}
|
|
736
|
-
const
|
|
737
|
-
label:
|
|
738
|
-
columnName:
|
|
739
|
-
show:
|
|
740
|
-
sort:
|
|
741
|
-
customGroup:
|
|
742
|
-
conditions:
|
|
743
|
-
typeGuid:
|
|
761
|
+
const U = {
|
|
762
|
+
label: G.trim(),
|
|
763
|
+
columnName: D,
|
|
764
|
+
show: j,
|
|
765
|
+
sort: h,
|
|
766
|
+
customGroup: q,
|
|
767
|
+
conditions: le(F),
|
|
768
|
+
typeGuid: R
|
|
744
769
|
};
|
|
745
|
-
|
|
746
|
-
const
|
|
747
|
-
if (Array.isArray(
|
|
748
|
-
const
|
|
749
|
-
for (let
|
|
750
|
-
const
|
|
751
|
-
|
|
770
|
+
M && (U.dateFormat = M), D === "the_date" && !U.dateFormat && (U.dateFormat = "YYYY-MM");
|
|
771
|
+
const _ = {};
|
|
772
|
+
if (Array.isArray(k) && k.length > 0) {
|
|
773
|
+
const z = k.length;
|
|
774
|
+
for (let P = 0; P < z; P++) {
|
|
775
|
+
const X = k[P] || {}, { rule: ee = "", num: Re = 0, name: Ye = "" } = X;
|
|
776
|
+
ee && Re && (_.num = Re, _.rule = ee, Ye && (_.otherGroupName = Ye));
|
|
752
777
|
}
|
|
753
778
|
}
|
|
754
|
-
(
|
|
779
|
+
(he = Object.keys(_)) != null && he.length && (U.truncation = _), ne.push(U);
|
|
755
780
|
}
|
|
756
781
|
}
|
|
757
|
-
let
|
|
782
|
+
let ge = [], pe;
|
|
758
783
|
if (o != null && o.pivotTableCal) {
|
|
759
784
|
let L = [];
|
|
760
785
|
const {
|
|
761
|
-
calc:
|
|
762
|
-
filter:
|
|
763
|
-
truncations:
|
|
764
|
-
sorts:
|
|
765
|
-
aggregateMethod:
|
|
766
|
-
rowDimensionKeys:
|
|
767
|
-
colDimensionKeys:
|
|
786
|
+
calc: T = [],
|
|
787
|
+
filter: p = [],
|
|
788
|
+
truncations: G = [],
|
|
789
|
+
sorts: D = [],
|
|
790
|
+
aggregateMethod: j = [],
|
|
791
|
+
rowDimensionKeys: Q = [],
|
|
792
|
+
colDimensionKeys: q = []
|
|
768
793
|
} = o.pivotTableCal;
|
|
769
|
-
if (
|
|
770
|
-
for (const
|
|
771
|
-
const { type:
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
if (E != null && E.length)
|
|
777
|
-
for (const p of E) {
|
|
778
|
-
const F = q.find((j) => j.columnName === p.key);
|
|
779
|
-
F && (F.truncation = {
|
|
780
|
-
num: p.num,
|
|
781
|
-
rule: p.rule
|
|
782
|
-
});
|
|
794
|
+
if (B.push(...T), p != null && p.length)
|
|
795
|
+
for (const F of p) {
|
|
796
|
+
const Me = F, { type: k } = Me, R = Se(Me, ["type"]);
|
|
797
|
+
k === "indicators" ? L = B : k === "dimension" && (L = J);
|
|
798
|
+
const M = L.find((h) => h.columnName === F.fieldName);
|
|
799
|
+
M && (M.conditions || (M.conditions = []), M.conditions.push(R));
|
|
783
800
|
}
|
|
784
801
|
if (G != null && G.length)
|
|
785
|
-
for (const
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
...h,
|
|
791
|
-
columnName: I.columnName
|
|
802
|
+
for (const F of G) {
|
|
803
|
+
const k = J.find((R) => R.columnName === F.key);
|
|
804
|
+
k && (k.truncation = {
|
|
805
|
+
num: F.num,
|
|
806
|
+
rule: F.rule
|
|
792
807
|
});
|
|
793
808
|
}
|
|
794
|
-
if (
|
|
795
|
-
for (const
|
|
796
|
-
const F =
|
|
797
|
-
|
|
809
|
+
if (D != null && D.length)
|
|
810
|
+
for (const F of D) {
|
|
811
|
+
const Ee = F, { fieldType: k, columnData: R } = Ee, M = Se(Ee, ["fieldType", "columnData"]);
|
|
812
|
+
k === "indicators" ? (L = B, pe = R) : k === "dimension" && (L = J);
|
|
813
|
+
const h = L.find((U) => U.label === M.label);
|
|
814
|
+
h && (h.sort = Y(C({}, M), {
|
|
815
|
+
columnName: h.columnName
|
|
816
|
+
}));
|
|
817
|
+
}
|
|
818
|
+
if ((Ge = Object.keys(j)) != null && Ge.length)
|
|
819
|
+
for (const F in j) {
|
|
820
|
+
const k = J.find((R) => R.label === F);
|
|
821
|
+
k && ((De = j[F]) != null && De.length) && (k.aggregateMethod = j[F]);
|
|
798
822
|
}
|
|
799
|
-
|
|
800
|
-
for (const
|
|
801
|
-
|
|
823
|
+
ne = [], ge = [];
|
|
824
|
+
for (const F of J)
|
|
825
|
+
Q.includes(F.columnName) ? ne.push(F) : q.includes(F.columnName) && ge.push(F);
|
|
802
826
|
}
|
|
803
|
-
if (
|
|
804
|
-
if (
|
|
827
|
+
if (K(t, ["text", "proportion", "counter"]) ? b = "zb" : K(t, ["valueline"]) && (b = "valueline"), s || t === "card") {
|
|
828
|
+
if (ne.length === 0 || B.length === 0)
|
|
805
829
|
return;
|
|
806
|
-
|
|
830
|
+
b = "grouptable";
|
|
807
831
|
} else {
|
|
808
|
-
if (
|
|
832
|
+
if (a === "1" && J.length === 0)
|
|
809
833
|
return;
|
|
810
|
-
if (
|
|
834
|
+
if (a === "2" && B.length === 0)
|
|
811
835
|
return;
|
|
812
|
-
if (
|
|
836
|
+
if (a === "3" && (!xe && n !== "EDV_DATA_SET" || !v.labelField || !v.valueField))
|
|
813
837
|
return;
|
|
814
|
-
if (
|
|
838
|
+
if (a === "3" && t === "ecanDataSelect" && B.length === 0)
|
|
815
839
|
return;
|
|
816
840
|
}
|
|
817
|
-
if (
|
|
841
|
+
if (A != null && A.length && (a = "1", b = "grouptable"), !r) {
|
|
818
842
|
const { pathname: L } = window == null ? void 0 : window.location;
|
|
819
843
|
if (L) {
|
|
820
|
-
const
|
|
821
|
-
|
|
844
|
+
const T = L.split("/");
|
|
845
|
+
T != null && T.length && (r = T[T.length - 1]);
|
|
822
846
|
}
|
|
823
847
|
}
|
|
824
|
-
let
|
|
825
|
-
if (!
|
|
826
|
-
const L =
|
|
848
|
+
let be;
|
|
849
|
+
if (!K(t, ["scatter", "valueline"]) && ((je = Object.keys(v)) != null && je.length)) {
|
|
850
|
+
const L = ue(N).find((p) => p.conditionKey === "parentCode"), T = {};
|
|
827
851
|
if (L) {
|
|
828
|
-
const
|
|
829
|
-
if (
|
|
830
|
-
|
|
852
|
+
const p = ce(L.id) || {};
|
|
853
|
+
if (p != null && p.itemCodes)
|
|
854
|
+
T.parentItemCodes = p.itemCodes;
|
|
831
855
|
else
|
|
832
856
|
return;
|
|
833
857
|
}
|
|
834
|
-
t === "ecanDataSelect" && (
|
|
858
|
+
t === "ecanDataSelect" && (T.indicatorList = B.filter((p) => p.show)), n === "EDV_DATA_SET" && (T.edvDataSetId = Le), be = C({
|
|
835
859
|
url: "/diagram/formData",
|
|
836
|
-
source:
|
|
860
|
+
source: n,
|
|
837
861
|
dataViewId: i,
|
|
838
862
|
plugin: "4",
|
|
839
|
-
layer:
|
|
863
|
+
layer: a,
|
|
840
864
|
chartType: "normalSelect",
|
|
841
|
-
rangeIndexTypeGuid:
|
|
865
|
+
rangeIndexTypeGuid: xe,
|
|
842
866
|
type: t === "ecanDataSelect" ? "normalSelectData" : "normalSelect",
|
|
843
|
-
labelField:
|
|
844
|
-
valueField:
|
|
845
|
-
pageId:
|
|
846
|
-
sqlConditions:
|
|
867
|
+
labelField: v.labelField,
|
|
868
|
+
valueField: v.valueField,
|
|
869
|
+
pageId: r,
|
|
870
|
+
sqlConditions: I,
|
|
847
871
|
idxLibMode: "WITH_DATE_DIM_TABLE",
|
|
848
|
-
keyName: e.keyName
|
|
849
|
-
|
|
850
|
-
};
|
|
872
|
+
keyName: e.keyName
|
|
873
|
+
}, T);
|
|
851
874
|
} else {
|
|
852
875
|
let L = {};
|
|
853
|
-
|
|
854
|
-
classifications:
|
|
876
|
+
K(t, ["scatter", "valueline"]) ? L = {
|
|
877
|
+
classifications: Ce
|
|
855
878
|
} : L = {
|
|
856
|
-
classification:
|
|
857
|
-
},
|
|
879
|
+
classification: H
|
|
880
|
+
}, be = C({
|
|
858
881
|
url: "/diagram",
|
|
859
|
-
source:
|
|
882
|
+
source: n,
|
|
860
883
|
dataViewId: i,
|
|
861
|
-
plugin:
|
|
862
|
-
layer:
|
|
863
|
-
chartType:
|
|
864
|
-
series:
|
|
865
|
-
indicatorList:
|
|
866
|
-
queryColumns:
|
|
884
|
+
plugin: d ? "5" : f,
|
|
885
|
+
layer: a,
|
|
886
|
+
chartType: d ? "pivot-table" : b,
|
|
887
|
+
series: Te,
|
|
888
|
+
indicatorList: B,
|
|
889
|
+
queryColumns: s ? [] : J,
|
|
867
890
|
pageFlag: !0,
|
|
868
|
-
pageId:
|
|
869
|
-
edvDataSetId:
|
|
870
|
-
sqlConditions:
|
|
871
|
-
const { fieldValue:
|
|
872
|
-
return
|
|
873
|
-
...C,
|
|
874
|
-
...E
|
|
875
|
-
};
|
|
891
|
+
pageId: r,
|
|
892
|
+
edvDataSetId: Le || "",
|
|
893
|
+
sqlConditions: I.map((T) => {
|
|
894
|
+
const { fieldValue: p } = T, G = {};
|
|
895
|
+
return p && Array.isArray(p) && (G.fieldValue = JSON.stringify(p)), C(C({}, T), G);
|
|
876
896
|
}),
|
|
877
|
-
idxLibMode:
|
|
878
|
-
preview:
|
|
879
|
-
rowHeaders:
|
|
897
|
+
idxLibMode: re,
|
|
898
|
+
preview: ye,
|
|
899
|
+
rowHeaders: ne,
|
|
880
900
|
keyName: e.keyName,
|
|
881
901
|
// 透视表指标排序相关入参
|
|
882
|
-
columnData:
|
|
883
|
-
columnHeaders:
|
|
884
|
-
|
|
885
|
-
};
|
|
902
|
+
columnData: pe,
|
|
903
|
+
columnHeaders: ge
|
|
904
|
+
}, L);
|
|
886
905
|
}
|
|
887
|
-
return
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
},
|
|
906
|
+
return be;
|
|
907
|
+
}, dl = () => {
|
|
908
|
+
console.log("This is indicator");
|
|
909
|
+
}, sl = {
|
|
910
|
+
formatIndicatorParams: al,
|
|
911
|
+
formatTest: dl
|
|
912
|
+
}, fl = (e = [], o) => {
|
|
891
913
|
let { name: l = "name", types: t = [] } = o || {};
|
|
892
914
|
l = (l == null ? void 0 : l.trim()) || l;
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
const
|
|
896
|
-
for (let
|
|
897
|
-
const u = t[
|
|
898
|
-
|
|
915
|
+
const m = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), r = e.length, d = t.length;
|
|
916
|
+
if (r === 1) {
|
|
917
|
+
const f = [];
|
|
918
|
+
for (let b = 0; b < d; b++) {
|
|
919
|
+
const u = t[b], { label: S, value: A } = u, x = Y(C({}, e[0]), { value: e[0][A] });
|
|
920
|
+
m.add(S), f.push(x);
|
|
899
921
|
}
|
|
900
|
-
const
|
|
901
|
-
|
|
922
|
+
const a = e[0][l] || "";
|
|
923
|
+
s.set(a, f);
|
|
902
924
|
} else
|
|
903
|
-
for (let
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
for (let u = 0; u <
|
|
907
|
-
const
|
|
908
|
-
if (
|
|
909
|
-
const
|
|
910
|
-
|
|
925
|
+
for (let f = 0; f < r; f++) {
|
|
926
|
+
const a = e[f], b = a[l];
|
|
927
|
+
m.add(b);
|
|
928
|
+
for (let u = 0; u < d; u++) {
|
|
929
|
+
const S = t[u], { label: A, value: x } = S, c = Y(C({}, a), { value: a[x] });
|
|
930
|
+
if (s.has(A)) {
|
|
931
|
+
const y = s.get(A);
|
|
932
|
+
y.push(c), s.set(A, y);
|
|
911
933
|
} else
|
|
912
|
-
|
|
934
|
+
s.set(A, [c]);
|
|
913
935
|
}
|
|
914
936
|
}
|
|
915
|
-
const
|
|
916
|
-
for (const [
|
|
937
|
+
const n = Array.from(m), i = [];
|
|
938
|
+
for (const [f, a] of s)
|
|
917
939
|
i.push({
|
|
918
|
-
name:
|
|
919
|
-
data:
|
|
940
|
+
name: f,
|
|
941
|
+
data: a
|
|
920
942
|
});
|
|
921
943
|
return {
|
|
922
|
-
dimensions:
|
|
944
|
+
dimensions: n,
|
|
923
945
|
dataset: i
|
|
924
946
|
};
|
|
925
|
-
},
|
|
926
|
-
let { name: l = "name", value: t = "value", type:
|
|
927
|
-
l = l == null ? void 0 : l.trim(), t = t == null ? void 0 : t.trim(),
|
|
928
|
-
const
|
|
929
|
-
for (let
|
|
930
|
-
const
|
|
931
|
-
if (
|
|
932
|
-
const
|
|
933
|
-
|
|
947
|
+
}, ul = (e, o) => {
|
|
948
|
+
let { name: l = "name", value: t = "value", type: m = "type" } = o || {};
|
|
949
|
+
l = l == null ? void 0 : l.trim(), t = t == null ? void 0 : t.trim(), m = m == null ? void 0 : m.trim();
|
|
950
|
+
const s = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), d = e.length;
|
|
951
|
+
for (let f = 0; f < d; f++) {
|
|
952
|
+
const a = e[f], b = a[l] || "", u = a[t] || "", S = a[m] || "";
|
|
953
|
+
if (s.add(b), r.has(S)) {
|
|
954
|
+
const A = r.get(S);
|
|
955
|
+
A.push(C({ name: b, value: u }, a)), r.set(S, A);
|
|
934
956
|
} else
|
|
935
|
-
|
|
957
|
+
r.set(S, [C({ name: b, value: u }, a)]);
|
|
936
958
|
}
|
|
937
|
-
const
|
|
938
|
-
for (const [
|
|
959
|
+
const n = Array.from(s), i = [];
|
|
960
|
+
for (const [f, a] of r)
|
|
939
961
|
i.push({
|
|
940
|
-
name:
|
|
941
|
-
data:
|
|
962
|
+
name: f,
|
|
963
|
+
data: a
|
|
942
964
|
});
|
|
943
965
|
return {
|
|
944
|
-
dimensions:
|
|
966
|
+
dimensions: n,
|
|
945
967
|
dataset: i
|
|
946
968
|
};
|
|
947
|
-
},
|
|
948
|
-
var
|
|
969
|
+
}, te = (e, o) => {
|
|
970
|
+
var m;
|
|
949
971
|
if (console.log("This is useValueFormatter"), e == null)
|
|
950
972
|
return o;
|
|
951
973
|
const l = e.match(/\{.*\}/g);
|
|
952
974
|
if (l == null || l.length === 0)
|
|
953
975
|
return o;
|
|
954
976
|
const t = l.length;
|
|
955
|
-
for (let
|
|
956
|
-
const
|
|
957
|
-
if (
|
|
977
|
+
for (let s = 0; s < t; s++) {
|
|
978
|
+
const r = l[s];
|
|
979
|
+
if (r == null || r === "")
|
|
958
980
|
break;
|
|
959
|
-
let
|
|
960
|
-
|
|
981
|
+
let d = (m = r.slice(1, -1)) == null ? void 0 : m.trim();
|
|
982
|
+
d = d == null ? void 0 : d.replace(/value/g, o);
|
|
961
983
|
try {
|
|
962
|
-
let
|
|
963
|
-
(/\(.*\)/g.test(
|
|
964
|
-
} catch {
|
|
965
|
-
e = e.replace(
|
|
984
|
+
let n = d;
|
|
985
|
+
(/\(.*\)/g.test(d) || /[+/\\*]/g.test(d)) && (n = we(d)), e = e.replace(r, n);
|
|
986
|
+
} catch (n) {
|
|
987
|
+
e = e.replace(r, d);
|
|
966
988
|
}
|
|
967
989
|
}
|
|
968
990
|
return e;
|
|
969
991
|
};
|
|
970
|
-
function
|
|
992
|
+
function cl(e) {
|
|
971
993
|
return e.isShowMarkLine ? {
|
|
972
994
|
markLine: {
|
|
973
995
|
data: [{ type: e.markLineType }]
|
|
974
996
|
}
|
|
975
997
|
} : {};
|
|
976
998
|
}
|
|
977
|
-
const
|
|
999
|
+
const ml = (e, o, l) => {
|
|
978
1000
|
switch (e.type) {
|
|
979
1001
|
case "bar":
|
|
980
|
-
return
|
|
1002
|
+
return yl(e, o, l);
|
|
981
1003
|
case "line":
|
|
982
|
-
return
|
|
1004
|
+
return xl(e, o, l);
|
|
983
1005
|
case "pie":
|
|
984
|
-
return
|
|
1006
|
+
return gl(e, o, l);
|
|
985
1007
|
case "comboGraph":
|
|
986
|
-
return
|
|
1008
|
+
return bl(e, o, l);
|
|
987
1009
|
default:
|
|
988
1010
|
return {};
|
|
989
1011
|
}
|
|
990
|
-
},
|
|
991
|
-
const t = e.yAxisLabelFormatter,
|
|
992
|
-
const { gradientShow: i, gradientColors:
|
|
993
|
-
for (let
|
|
994
|
-
const c = {
|
|
995
|
-
...u[S],
|
|
1012
|
+
}, yl = (e, o, l) => {
|
|
1013
|
+
const t = e.yAxisLabelFormatter, m = e.xAxisLabelFormatter, { dimensions: s = [], dataset: r = [] } = o, d = oe(() => {
|
|
1014
|
+
const { gradientShow: i, gradientColors: f, gradientOffset: a, barBorderRadius: b } = e, u = r, S = u.length, A = [];
|
|
1015
|
+
for (let x = 0; x < S; x++) {
|
|
1016
|
+
const c = Y(C({}, u[x]), {
|
|
996
1017
|
type: "bar",
|
|
997
1018
|
barWidth: e.barWidth,
|
|
998
1019
|
showBackground: e.showBarBackground
|
|
999
|
-
}, { isStack:
|
|
1000
|
-
if (
|
|
1020
|
+
}), { isStack: y, stackColumns: g } = e;
|
|
1021
|
+
if (y && g.includes(u[x].name || !g) && (c.stack = "stack"), c.label = {
|
|
1001
1022
|
show: e.labelShow,
|
|
1002
1023
|
fontSize: e.labelFontSize,
|
|
1003
1024
|
position: e.labelPosition,
|
|
@@ -1005,20 +1026,19 @@ const Ze = (e, o, l) => {
|
|
|
1005
1026
|
width: e.labelWidth,
|
|
1006
1027
|
overflow: e.labelOverflow,
|
|
1007
1028
|
formatter: (w) => {
|
|
1008
|
-
let N = "",
|
|
1009
|
-
|
|
1010
|
-
const { seriesName:
|
|
1011
|
-
return N +=
|
|
1012
|
-
|
|
1029
|
+
let N = "", v = e.labelFormatter;
|
|
1030
|
+
v === "" && (v = "{c}");
|
|
1031
|
+
const { seriesName: E, name: Z, value: re, data: ye } = w || {};
|
|
1032
|
+
return N += ie(
|
|
1033
|
+
v,
|
|
1013
1034
|
{
|
|
1014
|
-
textData: {
|
|
1015
|
-
name:
|
|
1016
|
-
value:
|
|
1017
|
-
a:
|
|
1018
|
-
b:
|
|
1019
|
-
c:
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1035
|
+
textData: C({
|
|
1036
|
+
name: Z,
|
|
1037
|
+
value: re,
|
|
1038
|
+
a: E,
|
|
1039
|
+
b: Z,
|
|
1040
|
+
c: re || 0
|
|
1041
|
+
}, ye)
|
|
1022
1042
|
},
|
|
1023
1043
|
{
|
|
1024
1044
|
useNewline: !0,
|
|
@@ -1034,80 +1054,78 @@ const Ze = (e, o, l) => {
|
|
|
1034
1054
|
y2: e.isUseHorizontalAxis ? 0 : 1,
|
|
1035
1055
|
colorStops: [{
|
|
1036
1056
|
offset: 0,
|
|
1037
|
-
color: e.colors[
|
|
1057
|
+
color: e.colors[x]
|
|
1038
1058
|
}, {
|
|
1039
|
-
offset:
|
|
1040
|
-
color:
|
|
1059
|
+
offset: a,
|
|
1060
|
+
color: f[x]
|
|
1041
1061
|
}, {
|
|
1042
1062
|
offset: 1,
|
|
1043
|
-
color:
|
|
1063
|
+
color: f[x]
|
|
1044
1064
|
}]
|
|
1045
1065
|
}
|
|
1046
|
-
}),
|
|
1047
|
-
const w =
|
|
1066
|
+
}), b) {
|
|
1067
|
+
const w = b.split(",");
|
|
1048
1068
|
if (w != null && w.length) {
|
|
1049
1069
|
const N = [];
|
|
1050
|
-
for (const
|
|
1051
|
-
const
|
|
1052
|
-
isNaN(
|
|
1070
|
+
for (const v of w) {
|
|
1071
|
+
const E = parseFloat(v);
|
|
1072
|
+
isNaN(E) || N.push(E);
|
|
1053
1073
|
}
|
|
1054
1074
|
c.itemStyle.barBorderRadius = N;
|
|
1055
1075
|
}
|
|
1056
1076
|
}
|
|
1057
1077
|
e.isShowMarkLine && (c.markLine = {
|
|
1058
1078
|
data: [{ type: e.markLineType }]
|
|
1059
|
-
}),
|
|
1079
|
+
}), A.push(c);
|
|
1060
1080
|
}
|
|
1061
|
-
return
|
|
1062
|
-
}),
|
|
1063
|
-
let
|
|
1064
|
-
return i && typeof i == "object" ?
|
|
1065
|
-
...i,
|
|
1081
|
+
return A;
|
|
1082
|
+
}), n = oe(() => s.map((i) => {
|
|
1083
|
+
let f = {};
|
|
1084
|
+
return i && typeof i == "object" ? f = Y(C({}, i), {
|
|
1066
1085
|
textStyle: {
|
|
1067
1086
|
fontSize: l
|
|
1068
1087
|
}
|
|
1069
|
-
} :
|
|
1088
|
+
}) : f = {
|
|
1070
1089
|
value: i,
|
|
1071
1090
|
textStyle: {
|
|
1072
1091
|
fontSize: l
|
|
1073
1092
|
}
|
|
1074
|
-
},
|
|
1093
|
+
}, f;
|
|
1075
1094
|
}));
|
|
1076
1095
|
return {
|
|
1077
1096
|
tooltip: {
|
|
1078
1097
|
trigger: "axis",
|
|
1079
1098
|
show: e.tooltipShow,
|
|
1080
1099
|
formatter: (i) => {
|
|
1081
|
-
const
|
|
1082
|
-
let
|
|
1083
|
-
|
|
1084
|
-
for (let u = 0; u <
|
|
1085
|
-
const { marker:
|
|
1100
|
+
const f = i.length;
|
|
1101
|
+
let a = "", b = e.tooltipFormatter;
|
|
1102
|
+
b === "" && (b = "{marker} {a} {c}");
|
|
1103
|
+
for (let u = 0; u < f; u++) {
|
|
1104
|
+
const { marker: S, seriesName: A, name: x, value: c, data: y } = i[u] || {};
|
|
1086
1105
|
if (u === 0) {
|
|
1087
|
-
let
|
|
1088
|
-
typeof
|
|
1106
|
+
let g = x;
|
|
1107
|
+
typeof x == "string" && x[0] === "0" && !isNaN(+x) && (g = (+x).toString()), a += `${te(m, g)}<br/>`;
|
|
1089
1108
|
}
|
|
1090
|
-
|
|
1091
|
-
|
|
1109
|
+
a += ie(
|
|
1110
|
+
b,
|
|
1092
1111
|
{
|
|
1093
|
-
textData: {
|
|
1094
|
-
marker:
|
|
1095
|
-
name:
|
|
1112
|
+
textData: C({
|
|
1113
|
+
marker: S,
|
|
1114
|
+
name: x,
|
|
1096
1115
|
value: c,
|
|
1097
|
-
Qfw:
|
|
1098
|
-
a:
|
|
1099
|
-
b:
|
|
1100
|
-
c: c || 0
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1116
|
+
Qfw: el,
|
|
1117
|
+
a: A,
|
|
1118
|
+
b: x,
|
|
1119
|
+
c: c || 0
|
|
1120
|
+
}, y)
|
|
1103
1121
|
},
|
|
1104
1122
|
{
|
|
1105
1123
|
useNewline: !0,
|
|
1106
1124
|
useSpace: !0
|
|
1107
1125
|
}
|
|
1108
|
-
),
|
|
1126
|
+
), a += "<br/>";
|
|
1109
1127
|
}
|
|
1110
|
-
return
|
|
1128
|
+
return a;
|
|
1111
1129
|
},
|
|
1112
1130
|
// valueFormatter: (value) => {
|
|
1113
1131
|
// return useVariablesInText(chartsOptions.tooltipValueFormatter as string, { value })
|
|
@@ -1140,20 +1158,20 @@ const Ze = (e, o, l) => {
|
|
|
1140
1158
|
itemHeight: e.legendItemHeight,
|
|
1141
1159
|
itemWidth: e.legendItemWidth,
|
|
1142
1160
|
itemGap: e.legendItemGap,
|
|
1143
|
-
data:
|
|
1161
|
+
data: r.map((i, f) => ({
|
|
1144
1162
|
name: i.name,
|
|
1145
1163
|
itemStyle: {
|
|
1146
|
-
color: e.colors[
|
|
1164
|
+
color: e.colors[f]
|
|
1147
1165
|
},
|
|
1148
1166
|
icon: e.legendType
|
|
1149
1167
|
})),
|
|
1150
|
-
formatter: (i) =>
|
|
1168
|
+
formatter: (i) => Oe(e.legendFormatter, {
|
|
1151
1169
|
name: i
|
|
1152
1170
|
})
|
|
1153
1171
|
},
|
|
1154
1172
|
xAxis: {
|
|
1155
1173
|
type: e.isUseHorizontalAxis ? "value" : "category",
|
|
1156
|
-
data: e.isUseHorizontalAxis ? null :
|
|
1174
|
+
data: e.isUseHorizontalAxis ? null : V(n),
|
|
1157
1175
|
inverse: e.isUseHorizontalAxis ? e.xAxisInverse : e.axisInverse,
|
|
1158
1176
|
minInterval: e.xAxisMinInterval,
|
|
1159
1177
|
splitLine: {
|
|
@@ -1175,7 +1193,7 @@ const Ze = (e, o, l) => {
|
|
|
1175
1193
|
overflow: e.xAxisLabelOverflow,
|
|
1176
1194
|
fontSize: e.xAxisLabelFontSize,
|
|
1177
1195
|
formatter(i) {
|
|
1178
|
-
return typeof i == "string" && i[0] === "0" && !isNaN(+i) && (i = (+i).toString()),
|
|
1196
|
+
return typeof i == "string" && i[0] === "0" && !isNaN(+i) && (i = (+i).toString()), te(m, i);
|
|
1179
1197
|
}
|
|
1180
1198
|
},
|
|
1181
1199
|
axisLine: {
|
|
@@ -1197,7 +1215,7 @@ const Ze = (e, o, l) => {
|
|
|
1197
1215
|
},
|
|
1198
1216
|
yAxis: {
|
|
1199
1217
|
type: e.isUseHorizontalAxis ? "category" : "value",
|
|
1200
|
-
data: e.isUseHorizontalAxis ?
|
|
1218
|
+
data: e.isUseHorizontalAxis ? V(s) : null,
|
|
1201
1219
|
inverse: e.isUseHorizontalAxis ? e.axisInverse : e.yAxisInverse,
|
|
1202
1220
|
minInterval: e.yAxisMinInterval,
|
|
1203
1221
|
splitLine: {
|
|
@@ -1218,7 +1236,7 @@ const Ze = (e, o, l) => {
|
|
|
1218
1236
|
width: e.yAxisLabelWidth,
|
|
1219
1237
|
overflow: e.yAxisLabelOverflow,
|
|
1220
1238
|
formatter(i) {
|
|
1221
|
-
return
|
|
1239
|
+
return te(t, i);
|
|
1222
1240
|
}
|
|
1223
1241
|
},
|
|
1224
1242
|
axisLine: {
|
|
@@ -1235,29 +1253,28 @@ const Ze = (e, o, l) => {
|
|
|
1235
1253
|
},
|
|
1236
1254
|
max: e.yAxisMaxValue || null
|
|
1237
1255
|
},
|
|
1238
|
-
series:
|
|
1256
|
+
series: V(d)
|
|
1239
1257
|
};
|
|
1240
|
-
},
|
|
1241
|
-
const t = e.yAxisLabelFormatter,
|
|
1242
|
-
let
|
|
1243
|
-
return i && typeof i == "object" ?
|
|
1244
|
-
...i,
|
|
1258
|
+
}, xl = (e, o, l) => {
|
|
1259
|
+
const t = e.yAxisLabelFormatter, m = e.xAxisLabelFormatter, { dimensions: s = [], dataset: r = [] } = o, d = oe(() => s.map((i) => {
|
|
1260
|
+
let f = {};
|
|
1261
|
+
return i && typeof i == "object" ? f = Y(C({}, i), {
|
|
1245
1262
|
textStyle: {
|
|
1246
1263
|
fontSize: l
|
|
1247
1264
|
}
|
|
1248
|
-
} :
|
|
1265
|
+
}) : f = {
|
|
1249
1266
|
value: i,
|
|
1250
1267
|
textStyle: {
|
|
1251
1268
|
fontSize: l
|
|
1252
1269
|
}
|
|
1253
|
-
},
|
|
1254
|
-
})),
|
|
1255
|
-
const i = [],
|
|
1256
|
-
for (let
|
|
1257
|
-
const
|
|
1258
|
-
e.shadowColor && (
|
|
1259
|
-
type: "line"
|
|
1260
|
-
|
|
1270
|
+
}, f;
|
|
1271
|
+
})), n = oe(() => {
|
|
1272
|
+
const i = [], f = r.length;
|
|
1273
|
+
for (let a = 0; a < f; a++) {
|
|
1274
|
+
const b = {};
|
|
1275
|
+
e.shadowColor && (b.shadowColor = e.shadowColor, b.shadowBlur = e.shadowBlur, b.shadowOffsetY = e.shadowOffsetY, b.shadowOffsetX = e.shadowOffsetX), i.push(C(Y(C({
|
|
1276
|
+
type: "line"
|
|
1277
|
+
}, r[a]), {
|
|
1261
1278
|
symbolSize: e.symbolSize,
|
|
1262
1279
|
smooth: e.smooth,
|
|
1263
1280
|
areaStyle: {
|
|
@@ -1269,21 +1286,19 @@ const Ze = (e, o, l) => {
|
|
|
1269
1286
|
y2: 1,
|
|
1270
1287
|
colorStops: [{
|
|
1271
1288
|
offset: 0,
|
|
1272
|
-
color: e.colors[
|
|
1289
|
+
color: e.colors[a]
|
|
1273
1290
|
}, {
|
|
1274
1291
|
offset: 1,
|
|
1275
1292
|
color: e.areaGradientColor || "transparent"
|
|
1276
1293
|
}],
|
|
1277
1294
|
global: !1
|
|
1278
|
-
} : e.colors[
|
|
1295
|
+
} : e.colors[a],
|
|
1279
1296
|
opacity: e.areaStyleOpacity
|
|
1280
1297
|
},
|
|
1281
|
-
lineStyle: {
|
|
1282
|
-
width: e.lineStyleWidth
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
...Je(e)
|
|
1286
|
-
});
|
|
1298
|
+
lineStyle: C({
|
|
1299
|
+
width: e.lineStyleWidth
|
|
1300
|
+
}, b)
|
|
1301
|
+
}), cl(e)));
|
|
1287
1302
|
}
|
|
1288
1303
|
return i;
|
|
1289
1304
|
});
|
|
@@ -1292,31 +1307,30 @@ const Ze = (e, o, l) => {
|
|
|
1292
1307
|
trigger: "axis",
|
|
1293
1308
|
show: e.tooltipShow,
|
|
1294
1309
|
formatter: (i) => {
|
|
1295
|
-
const
|
|
1296
|
-
let
|
|
1297
|
-
|
|
1298
|
-
for (let u = 0; u <
|
|
1299
|
-
const { marker:
|
|
1300
|
-
u === 0 && (
|
|
1301
|
-
|
|
1310
|
+
const f = i.length;
|
|
1311
|
+
let a = "", b = e.tooltipFormatter;
|
|
1312
|
+
b === "" && (b = "{marker} {a} {c}");
|
|
1313
|
+
for (let u = 0; u < f; u++) {
|
|
1314
|
+
const { marker: S, seriesName: A, name: x, value: c, data: y } = i[u] || {};
|
|
1315
|
+
u === 0 && (a += `${x}<br/>`), a += ie(
|
|
1316
|
+
b,
|
|
1302
1317
|
{
|
|
1303
|
-
textData: {
|
|
1304
|
-
marker:
|
|
1305
|
-
name:
|
|
1318
|
+
textData: C({
|
|
1319
|
+
marker: S,
|
|
1320
|
+
name: x,
|
|
1306
1321
|
value: c,
|
|
1307
|
-
a:
|
|
1308
|
-
b:
|
|
1309
|
-
c
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1322
|
+
a: A,
|
|
1323
|
+
b: x,
|
|
1324
|
+
c
|
|
1325
|
+
}, y)
|
|
1312
1326
|
},
|
|
1313
1327
|
{
|
|
1314
1328
|
useNewline: !0,
|
|
1315
1329
|
useSpace: !0
|
|
1316
1330
|
}
|
|
1317
|
-
),
|
|
1331
|
+
), a += "<br/>";
|
|
1318
1332
|
}
|
|
1319
|
-
return
|
|
1333
|
+
return a;
|
|
1320
1334
|
},
|
|
1321
1335
|
textStyle: {
|
|
1322
1336
|
color: e.tooltipTextStyleColor,
|
|
@@ -1328,7 +1342,7 @@ const Ze = (e, o, l) => {
|
|
|
1328
1342
|
xAxis: {
|
|
1329
1343
|
name: e.xAxisName,
|
|
1330
1344
|
type: "category",
|
|
1331
|
-
data:
|
|
1345
|
+
data: V(d),
|
|
1332
1346
|
minInterval: e.xAxisMinInterval,
|
|
1333
1347
|
splitLine: {
|
|
1334
1348
|
show: e.xAxisSplitLineShow,
|
|
@@ -1343,7 +1357,7 @@ const Ze = (e, o, l) => {
|
|
|
1343
1357
|
width: e.xAxisLabelWidth,
|
|
1344
1358
|
overflow: e.xAxisLabelOverflow,
|
|
1345
1359
|
formatter(i) {
|
|
1346
|
-
return
|
|
1360
|
+
return te(m, i);
|
|
1347
1361
|
}
|
|
1348
1362
|
},
|
|
1349
1363
|
axisLine: {
|
|
@@ -1369,7 +1383,7 @@ const Ze = (e, o, l) => {
|
|
|
1369
1383
|
fontSize: l,
|
|
1370
1384
|
color: e.yAxisLabelColor,
|
|
1371
1385
|
formatter(i) {
|
|
1372
|
-
return
|
|
1386
|
+
return te(t, i);
|
|
1373
1387
|
}
|
|
1374
1388
|
},
|
|
1375
1389
|
axisLine: {
|
|
@@ -1389,17 +1403,16 @@ const Ze = (e, o, l) => {
|
|
|
1389
1403
|
fontSize: l
|
|
1390
1404
|
}
|
|
1391
1405
|
},
|
|
1392
|
-
series:
|
|
1406
|
+
series: V(n)
|
|
1393
1407
|
};
|
|
1394
|
-
},
|
|
1408
|
+
}, gl = (e, o, l) => {
|
|
1395
1409
|
const { dataset: t = [] } = o;
|
|
1396
|
-
let { data:
|
|
1410
|
+
let { data: m = [] } = t[0] || {};
|
|
1397
1411
|
if (Array.isArray(e.colors)) {
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
label:
|
|
1401
|
-
|
|
1402
|
-
}));
|
|
1412
|
+
const s = e.isUseLabelColors, r = e.colors;
|
|
1413
|
+
m = m.map((d, n) => C({
|
|
1414
|
+
label: s ? { color: r[n] } : {}
|
|
1415
|
+
}, d));
|
|
1403
1416
|
}
|
|
1404
1417
|
return {
|
|
1405
1418
|
title: {
|
|
@@ -1416,22 +1429,21 @@ const Ze = (e, o, l) => {
|
|
|
1416
1429
|
tooltip: {
|
|
1417
1430
|
show: e.tooltipShow,
|
|
1418
1431
|
trigger: e.tooltipTrigger,
|
|
1419
|
-
formatter: (
|
|
1420
|
-
const { marker:
|
|
1421
|
-
return
|
|
1432
|
+
formatter: (s) => {
|
|
1433
|
+
const { marker: r, seriesName: d, name: n, value: i, percent: f, data: a } = s || {};
|
|
1434
|
+
return ie(
|
|
1422
1435
|
e.tooltipFormatter,
|
|
1423
1436
|
{
|
|
1424
|
-
textData: {
|
|
1425
|
-
marker:
|
|
1426
|
-
name:
|
|
1437
|
+
textData: C({
|
|
1438
|
+
marker: r,
|
|
1439
|
+
name: n,
|
|
1427
1440
|
value: i,
|
|
1428
|
-
percent:
|
|
1429
|
-
a:
|
|
1430
|
-
b:
|
|
1441
|
+
percent: f,
|
|
1442
|
+
a: d,
|
|
1443
|
+
b: n,
|
|
1431
1444
|
c: i,
|
|
1432
|
-
d:
|
|
1433
|
-
|
|
1434
|
-
}
|
|
1445
|
+
d: f
|
|
1446
|
+
}, a)
|
|
1435
1447
|
},
|
|
1436
1448
|
{
|
|
1437
1449
|
useNewline: !0,
|
|
@@ -1458,7 +1470,7 @@ const Ze = (e, o, l) => {
|
|
|
1458
1470
|
},
|
|
1459
1471
|
series: [
|
|
1460
1472
|
{
|
|
1461
|
-
data:
|
|
1473
|
+
data: m,
|
|
1462
1474
|
type: "pie",
|
|
1463
1475
|
radius: [e.innerRadius, e.outerRadius],
|
|
1464
1476
|
center: [e.centerLeft, e.centerTop],
|
|
@@ -1470,7 +1482,7 @@ const Ze = (e, o, l) => {
|
|
|
1470
1482
|
color: e.labelColor,
|
|
1471
1483
|
fontSize: l === 18 ? l : e.labelFontSize,
|
|
1472
1484
|
position: e.labelPosition,
|
|
1473
|
-
formatter:
|
|
1485
|
+
formatter: Ze(e.labelFormatter)
|
|
1474
1486
|
},
|
|
1475
1487
|
labelLine: {
|
|
1476
1488
|
show: e.labelLineShow,
|
|
@@ -1488,37 +1500,34 @@ const Ze = (e, o, l) => {
|
|
|
1488
1500
|
}
|
|
1489
1501
|
]
|
|
1490
1502
|
};
|
|
1491
|
-
},
|
|
1492
|
-
const { dimensions: t = [], dataset:
|
|
1503
|
+
}, bl = (e, o, l) => {
|
|
1504
|
+
const { dimensions: t = [], dataset: m = [] } = o, s = oe(() => t.map((n) => {
|
|
1493
1505
|
let i = {};
|
|
1494
|
-
return
|
|
1495
|
-
...r,
|
|
1506
|
+
return n && typeof n == "object" ? i = Y(C({}, n), {
|
|
1496
1507
|
textStyle: {
|
|
1497
1508
|
fontSize: l
|
|
1498
1509
|
}
|
|
1499
|
-
} : i = {
|
|
1500
|
-
value:
|
|
1510
|
+
}) : i = {
|
|
1511
|
+
value: n,
|
|
1501
1512
|
textStyle: {
|
|
1502
1513
|
fontSize: l
|
|
1503
1514
|
}
|
|
1504
1515
|
}, i;
|
|
1505
|
-
})),
|
|
1506
|
-
const
|
|
1507
|
-
for (let
|
|
1508
|
-
const
|
|
1509
|
-
let
|
|
1516
|
+
})), r = oe(() => {
|
|
1517
|
+
const n = [], i = m.length, f = e.seriesTypes;
|
|
1518
|
+
for (let a = 0; a < i; a++) {
|
|
1519
|
+
const b = f[a], { type: u, axisIndex: S } = b || {};
|
|
1520
|
+
let A = C({
|
|
1510
1521
|
type: u,
|
|
1511
|
-
yAxisIndex:
|
|
1512
|
-
|
|
1513
|
-
};
|
|
1522
|
+
yAxisIndex: S
|
|
1523
|
+
}, m[a]);
|
|
1514
1524
|
if (u === "line") {
|
|
1515
|
-
const
|
|
1516
|
-
e.shadowColor && (
|
|
1517
|
-
...b,
|
|
1525
|
+
const x = {};
|
|
1526
|
+
e.shadowColor && (x.shadowColor = e.shadowColor, x.shadowBlur = e.shadowBlur, x.shadowOffsetY = e.shadowOffsetY, x.shadowOffsetX = e.shadowOffsetX), A = Y(C({}, A), {
|
|
1518
1527
|
symbolSize: e.symbolSize,
|
|
1519
1528
|
smooth: e.smooth,
|
|
1520
1529
|
itemStyle: {
|
|
1521
|
-
color: e.colors[
|
|
1530
|
+
color: e.colors[a]
|
|
1522
1531
|
},
|
|
1523
1532
|
areaStyle: {
|
|
1524
1533
|
color: e.areaGradientShow ? {
|
|
@@ -1529,70 +1538,68 @@ const Ze = (e, o, l) => {
|
|
|
1529
1538
|
y2: 1,
|
|
1530
1539
|
colorStops: [{
|
|
1531
1540
|
offset: 0,
|
|
1532
|
-
color: e.colors[
|
|
1541
|
+
color: e.colors[a]
|
|
1533
1542
|
}, {
|
|
1534
1543
|
offset: 1,
|
|
1535
1544
|
color: e.areaGradientColor || "transparent"
|
|
1536
1545
|
}],
|
|
1537
1546
|
global: !1
|
|
1538
|
-
} : e.colors[
|
|
1547
|
+
} : e.colors[a],
|
|
1539
1548
|
opacity: e.areaStyleOpacity
|
|
1540
1549
|
},
|
|
1541
|
-
lineStyle: {
|
|
1542
|
-
width: e.lineStyleWidth
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
};
|
|
1550
|
+
lineStyle: C({
|
|
1551
|
+
width: e.lineStyleWidth
|
|
1552
|
+
}, x)
|
|
1553
|
+
});
|
|
1546
1554
|
}
|
|
1547
1555
|
if (u === "bar") {
|
|
1548
|
-
const { gradientShow:
|
|
1556
|
+
const { gradientShow: x, gradientColors: c, gradientOffset: y } = e, g = {};
|
|
1549
1557
|
if (e.barBorderRadius) {
|
|
1550
1558
|
const w = e.barBorderRadius.split(",");
|
|
1551
1559
|
if (w != null && w.length) {
|
|
1552
1560
|
const N = [];
|
|
1553
|
-
for (const
|
|
1554
|
-
const
|
|
1555
|
-
isNaN(
|
|
1561
|
+
for (const v of w) {
|
|
1562
|
+
const E = parseFloat(v);
|
|
1563
|
+
isNaN(E) || N.push(E);
|
|
1556
1564
|
}
|
|
1557
|
-
|
|
1565
|
+
g.borderRadius = N;
|
|
1558
1566
|
}
|
|
1559
1567
|
}
|
|
1560
|
-
|
|
1568
|
+
x && (g.color = {
|
|
1561
1569
|
x: 0,
|
|
1562
1570
|
y: 0,
|
|
1563
1571
|
x2: 0,
|
|
1564
1572
|
y2: 1,
|
|
1565
1573
|
colorStops: [{
|
|
1566
1574
|
offset: 0,
|
|
1567
|
-
color: e.colors[
|
|
1575
|
+
color: e.colors[a]
|
|
1568
1576
|
}, {
|
|
1569
|
-
offset:
|
|
1570
|
-
color: c[
|
|
1577
|
+
offset: y,
|
|
1578
|
+
color: c[a]
|
|
1571
1579
|
}, {
|
|
1572
1580
|
offset: 1,
|
|
1573
|
-
color: c[
|
|
1581
|
+
color: c[a]
|
|
1574
1582
|
}]
|
|
1575
|
-
}),
|
|
1576
|
-
...b,
|
|
1583
|
+
}), A = Y(C({}, A), {
|
|
1577
1584
|
barWidth: e.barWidth,
|
|
1578
|
-
itemStyle:
|
|
1579
|
-
};
|
|
1585
|
+
itemStyle: g
|
|
1586
|
+
});
|
|
1580
1587
|
}
|
|
1581
|
-
e.isShowMarkLine && (
|
|
1588
|
+
e.isShowMarkLine && (A.markLine = {
|
|
1582
1589
|
data: [{ type: e.markLineType }]
|
|
1583
|
-
}),
|
|
1590
|
+
}), n.push(A);
|
|
1584
1591
|
}
|
|
1585
|
-
return
|
|
1586
|
-
}),
|
|
1587
|
-
const
|
|
1588
|
-
return
|
|
1592
|
+
return n;
|
|
1593
|
+
}), d = oe(() => {
|
|
1594
|
+
const n = e.yAxis;
|
|
1595
|
+
return n == null ? void 0 : n.map((i, f) => ({
|
|
1589
1596
|
type: "value",
|
|
1590
1597
|
minInterval: e.yAxisMinInterval,
|
|
1591
1598
|
splitLine: {
|
|
1592
|
-
show:
|
|
1599
|
+
show: f === 0 ? e.yAxisLeftSplitLineShow : e.yAxisRightSplitLineShow,
|
|
1593
1600
|
lineStyle: {
|
|
1594
1601
|
color: e.yAxisSplitLineStyleColor,
|
|
1595
|
-
type:
|
|
1602
|
+
type: f === 0 ? e.yAxisLeftSplitLineType : e.yAxisRightSplitLineType
|
|
1596
1603
|
}
|
|
1597
1604
|
},
|
|
1598
1605
|
splitArea: {
|
|
@@ -1602,8 +1609,8 @@ const Ze = (e, o, l) => {
|
|
|
1602
1609
|
fontSize: l,
|
|
1603
1610
|
show: e.yAxisLabelShow,
|
|
1604
1611
|
color: e.yAxisLabelColor,
|
|
1605
|
-
formatter(
|
|
1606
|
-
return
|
|
1612
|
+
formatter(a) {
|
|
1613
|
+
return te(i.axisLabelFormatter, a);
|
|
1607
1614
|
}
|
|
1608
1615
|
},
|
|
1609
1616
|
axisLine: {
|
|
@@ -1612,11 +1619,11 @@ const Ze = (e, o, l) => {
|
|
|
1612
1619
|
color: e.yAxisLineStyleColor
|
|
1613
1620
|
}
|
|
1614
1621
|
},
|
|
1615
|
-
name:
|
|
1622
|
+
name: f === 0 ? e.yAxisLeftName : e.yAxisRightName,
|
|
1616
1623
|
nameTextStyle: {
|
|
1617
1624
|
fontSize: e.yAxisLabelFontSize,
|
|
1618
1625
|
color: e.yAxisLabelColor,
|
|
1619
|
-
align:
|
|
1626
|
+
align: f === 0 ? "right" : "left"
|
|
1620
1627
|
},
|
|
1621
1628
|
max: e.yAxisMaxValue || null
|
|
1622
1629
|
}));
|
|
@@ -1635,35 +1642,34 @@ const Ze = (e, o, l) => {
|
|
|
1635
1642
|
tooltip: {
|
|
1636
1643
|
trigger: "axis",
|
|
1637
1644
|
show: e.tooltipShow,
|
|
1638
|
-
formatter: (
|
|
1639
|
-
const i =
|
|
1640
|
-
let
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1645
|
+
formatter: (n) => {
|
|
1646
|
+
const i = n.length;
|
|
1647
|
+
let f = "", a = e.tooltipFormatter;
|
|
1648
|
+
a === "" && (a = "{marker} {a} {c}");
|
|
1649
|
+
const b = e.seriesTypes;
|
|
1643
1650
|
for (let u = 0; u < i; u++) {
|
|
1644
|
-
const
|
|
1645
|
-
u === 0 && (
|
|
1651
|
+
const S = b[u], { tooltipFormatter: A } = S || {}, { marker: x, seriesName: c, name: y, value: g, data: w } = n[u] || {};
|
|
1652
|
+
u === 0 && (f += `${y}<br/>`), f += ie(
|
|
1646
1653
|
// 如果系列有提示框组件就使用自定义,没有就用默认的
|
|
1647
|
-
|
|
1654
|
+
A || a,
|
|
1648
1655
|
{
|
|
1649
|
-
textData: {
|
|
1650
|
-
marker:
|
|
1651
|
-
name:
|
|
1652
|
-
value:
|
|
1656
|
+
textData: C({
|
|
1657
|
+
marker: x,
|
|
1658
|
+
name: y,
|
|
1659
|
+
value: g,
|
|
1653
1660
|
seriesName: c,
|
|
1654
1661
|
a: c,
|
|
1655
|
-
b:
|
|
1656
|
-
c:
|
|
1657
|
-
|
|
1658
|
-
}
|
|
1662
|
+
b: y,
|
|
1663
|
+
c: g
|
|
1664
|
+
}, w)
|
|
1659
1665
|
},
|
|
1660
1666
|
{
|
|
1661
1667
|
useNewline: !0,
|
|
1662
1668
|
useSpace: !0
|
|
1663
1669
|
}
|
|
1664
|
-
),
|
|
1670
|
+
), f += "<br/>";
|
|
1665
1671
|
}
|
|
1666
|
-
return
|
|
1672
|
+
return f;
|
|
1667
1673
|
},
|
|
1668
1674
|
textStyle: {
|
|
1669
1675
|
color: e.tooltipTextStyleColor || "#333",
|
|
@@ -1676,7 +1682,7 @@ const Ze = (e, o, l) => {
|
|
|
1676
1682
|
name: e.xAxisName,
|
|
1677
1683
|
minInterval: e.xAxisMinInterval,
|
|
1678
1684
|
type: "category",
|
|
1679
|
-
data:
|
|
1685
|
+
data: V(s),
|
|
1680
1686
|
splitLine: {
|
|
1681
1687
|
show: e.xAxisSplitLineShow,
|
|
1682
1688
|
lineStyle: {
|
|
@@ -1699,10 +1705,10 @@ const Ze = (e, o, l) => {
|
|
|
1699
1705
|
show: e.xAxisTickShow
|
|
1700
1706
|
}
|
|
1701
1707
|
},
|
|
1702
|
-
yAxis:
|
|
1703
|
-
series:
|
|
1708
|
+
yAxis: V(d),
|
|
1709
|
+
series: V(r)
|
|
1704
1710
|
};
|
|
1705
|
-
},
|
|
1711
|
+
}, Sl = (e) => ({
|
|
1706
1712
|
title: {
|
|
1707
1713
|
text: e.titleText,
|
|
1708
1714
|
subtext: e.titleSubtext,
|
|
@@ -1721,20 +1727,16 @@ const Ze = (e, o, l) => {
|
|
|
1721
1727
|
containLabel: e.gridContainLabel
|
|
1722
1728
|
},
|
|
1723
1729
|
color: e.colors
|
|
1724
|
-
}),
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
useVariablesInText: oe,
|
|
1734
|
-
transformProps: il,
|
|
1735
|
-
getIndicatorParams: Ue
|
|
1736
|
-
};
|
|
1730
|
+
}), Al = (e, o, l = 12) => C(C({}, Sl(e)), ml(e, o, l)), pl = Y(C({}, sl), {
|
|
1731
|
+
runCode: we,
|
|
1732
|
+
useTransformChartDataByAttrKey: fl,
|
|
1733
|
+
useTransformChartDataByAttrValue: ul,
|
|
1734
|
+
useValueFormatter: te,
|
|
1735
|
+
useVariablesInText: ie,
|
|
1736
|
+
transformProps: Al,
|
|
1737
|
+
getIndicatorParams: ll
|
|
1738
|
+
});
|
|
1737
1739
|
export {
|
|
1738
|
-
|
|
1740
|
+
pl as default
|
|
1739
1741
|
};
|
|
1740
1742
|
//# sourceMappingURL=index.es.js.map
|