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