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