@ecan-bi/tools 1.0.17 → 1.0.19
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 +132 -131
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @ecan-bi/tools@1.0.
|
|
2
|
-
var
|
|
1
|
+
/*! @ecan-bi/tools@1.0.19 */
|
|
2
|
+
var Pe = Object.defineProperty, qe = Object.defineProperties;
|
|
3
3
|
var Xe = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var
|
|
4
|
+
var de = Object.getOwnPropertySymbols;
|
|
5
5
|
var Ke = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var Be = (e, o, l) => o in e ?
|
|
6
|
+
var Be = (e, o, l) => o in e ? Pe(e, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[o] = l, C = (e, o) => {
|
|
7
7
|
for (var l in o || (o = {}))
|
|
8
8
|
Ke.call(o, l) && Be(e, l, o[l]);
|
|
9
|
-
if (
|
|
10
|
-
for (var l of
|
|
9
|
+
if (de)
|
|
10
|
+
for (var l of de(o))
|
|
11
11
|
Ue.call(o, l) && Be(e, l, o[l]);
|
|
12
12
|
return e;
|
|
13
13
|
}, Y = (e, o) => qe(e, Xe(o));
|
|
@@ -15,8 +15,8 @@ var Se = (e, o) => {
|
|
|
15
15
|
var l = {};
|
|
16
16
|
for (var t in e)
|
|
17
17
|
Ke.call(e, t) && o.indexOf(t) < 0 && (l[t] = e[t]);
|
|
18
|
-
if (e != null &&
|
|
19
|
-
for (var t of
|
|
18
|
+
if (e != null && de)
|
|
19
|
+
for (var t of de(e))
|
|
20
20
|
o.indexOf(t) < 0 && Ue.call(e, t) && (l[t] = e[t]);
|
|
21
21
|
return l;
|
|
22
22
|
};
|
|
@@ -38,7 +38,7 @@ var We = (e, o, l) => new Promise((t, y) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { unref as V, computed as oe } from "vue";
|
|
40
40
|
import $ from "dayjs";
|
|
41
|
-
import { cloneDeep as
|
|
41
|
+
import { cloneDeep as fe } from "lodash-es";
|
|
42
42
|
const we = (e, o) => {
|
|
43
43
|
const l = C({
|
|
44
44
|
dayjs: $
|
|
@@ -83,10 +83,10 @@ const we = (e, o) => {
|
|
|
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), ue = (e) => {
|
|
87
87
|
const o = [];
|
|
88
88
|
for (const l of e)
|
|
89
|
-
l.conditions ? o.push(...
|
|
89
|
+
l.conditions ? o.push(...ue(l.conditions)) : (l == null ? void 0 : l.dataType) === "component" && o.push(l);
|
|
90
90
|
return o;
|
|
91
91
|
};
|
|
92
92
|
function Je(e) {
|
|
@@ -154,31 +154,32 @@ function ll(s) {
|
|
|
154
154
|
}
|
|
155
155
|
if ((r = Object.keys(b)) != null && r.length) {
|
|
156
156
|
const u = [];
|
|
157
|
-
for (const
|
|
157
|
+
for (const g in b)
|
|
158
158
|
u.push(
|
|
159
159
|
new Promise((c, m) => {
|
|
160
160
|
o.post(
|
|
161
161
|
`${l}/diagram/hrpIndexWithComplex`,
|
|
162
162
|
{
|
|
163
163
|
pageId: t,
|
|
164
|
-
indexGuid:
|
|
165
|
-
indexCode: b[
|
|
164
|
+
indexGuid: g,
|
|
165
|
+
indexCode: b[g],
|
|
166
166
|
dataSourceId: y
|
|
167
167
|
}
|
|
168
|
-
).then((
|
|
168
|
+
).then((x) => {
|
|
169
169
|
var v;
|
|
170
|
-
const { success: w, data: N = [] } =
|
|
170
|
+
const { success: w, data: N = [] } = x.data;
|
|
171
171
|
w && ((v = N == null ? void 0 : N.dataViewColumns) != null && v.length) ? c(N.dataViewColumns) : m(N);
|
|
172
|
-
}).catch((
|
|
173
|
-
m(
|
|
172
|
+
}).catch((x) => {
|
|
173
|
+
console.error(x), m(x);
|
|
174
174
|
});
|
|
175
175
|
})
|
|
176
176
|
);
|
|
177
177
|
return (yield Promise.all(u)).reduce(
|
|
178
|
-
(
|
|
179
|
-
).filter((
|
|
178
|
+
(g, c) => g.filter((m) => c.find((x) => x.typeGuid === m.typeGuid))
|
|
179
|
+
).filter((g) => g.typeGuid);
|
|
180
180
|
}
|
|
181
181
|
} catch (d) {
|
|
182
|
+
console.error(d);
|
|
182
183
|
}
|
|
183
184
|
return [];
|
|
184
185
|
});
|
|
@@ -194,7 +195,7 @@ const tl = [
|
|
|
194
195
|
"customValue",
|
|
195
196
|
"id",
|
|
196
197
|
"keyName"
|
|
197
|
-
],
|
|
198
|
+
], ce = (e) => ze.get(e), il = (e, o = {}) => {
|
|
198
199
|
const { around: l, unit: t, id: y } = e;
|
|
199
200
|
let s = "";
|
|
200
201
|
const { pageMode: r = "", componentList: d = [] } = (o == null ? void 0 : o.graphicConfig) || {};
|
|
@@ -203,19 +204,19 @@ const tl = [
|
|
|
203
204
|
const f = d == null ? void 0 : d.find((c) => c.id === y);
|
|
204
205
|
if (!f)
|
|
205
206
|
return [];
|
|
206
|
-
const { interval: a, intervalUnit: b, startTime: u, endTime: S, operate: A, useCurrentTime:
|
|
207
|
-
if (
|
|
208
|
-
const { type: c, value: m, mode:
|
|
207
|
+
const { interval: a, intervalUnit: b, startTime: u, endTime: S, operate: A, useCurrentTime: g } = f || {};
|
|
208
|
+
if (g && (n = $().subtract(a, b), i = $()), u && (n = $(u)), S && (i = $(S)), A) {
|
|
209
|
+
const { type: c, value: m, mode: x } = A;
|
|
209
210
|
switch (c) {
|
|
210
211
|
case "add":
|
|
211
|
-
n = n && n.add(m,
|
|
212
|
+
n = n && n.add(m, x), i = i && i.add(m, x);
|
|
212
213
|
break;
|
|
213
214
|
case "minus":
|
|
214
|
-
n = n && n.subtract(m,
|
|
215
|
+
n = n && n.subtract(m, x), i = i && i.subtract(m, x);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
} else {
|
|
218
|
-
const f =
|
|
219
|
+
const f = ce(y) || {};
|
|
219
220
|
V(f.startTime) && (n = $(V(f.startTime))), V(f.endTime) && (i = $(V(f.endTime)));
|
|
220
221
|
}
|
|
221
222
|
if (n && i) {
|
|
@@ -249,7 +250,7 @@ const tl = [
|
|
|
249
250
|
}
|
|
250
251
|
}, le = (e, o) => {
|
|
251
252
|
const l = [];
|
|
252
|
-
return e != null && e.length &&
|
|
253
|
+
return e != null && e.length && fe(e).forEach((t) => {
|
|
253
254
|
if (t.join && t.conditions) {
|
|
254
255
|
const y = !t.conditions.some((s) => s.join && s.conditions);
|
|
255
256
|
t.conditions.forEach((s, r) => {
|
|
@@ -270,7 +271,7 @@ const tl = [
|
|
|
270
271
|
}), l;
|
|
271
272
|
}, Ae = (e = {}, o) => {
|
|
272
273
|
if (e != null && e.sortCpnts && o) {
|
|
273
|
-
const w =
|
|
274
|
+
const w = Qe(e);
|
|
274
275
|
w && (o.sort = w);
|
|
275
276
|
}
|
|
276
277
|
const {
|
|
@@ -288,13 +289,13 @@ const tl = [
|
|
|
288
289
|
conditions: u,
|
|
289
290
|
aggregate: S,
|
|
290
291
|
distinct: A,
|
|
291
|
-
dimByCount:
|
|
292
|
+
dimByCount: g,
|
|
292
293
|
dataTo: c
|
|
293
294
|
} = e;
|
|
294
295
|
let m;
|
|
295
296
|
if (u && (m = le(u)), n === "COMPONENT") {
|
|
296
297
|
const w = {};
|
|
297
|
-
return
|
|
298
|
+
return ye(w, f), {
|
|
298
299
|
label: l.trim(),
|
|
299
300
|
columnName: t,
|
|
300
301
|
show: s,
|
|
@@ -303,7 +304,7 @@ const tl = [
|
|
|
303
304
|
componentValue: w.fieldValue || null
|
|
304
305
|
};
|
|
305
306
|
}
|
|
306
|
-
const
|
|
307
|
+
const x = {
|
|
307
308
|
label: l.trim(),
|
|
308
309
|
columnName: t,
|
|
309
310
|
location: y,
|
|
@@ -321,19 +322,19 @@ const tl = [
|
|
|
321
322
|
const w = a.split("-");
|
|
322
323
|
if ((w == null ? void 0 : w.length) === 3) {
|
|
323
324
|
let N = w[0];
|
|
324
|
-
return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), Y(C({},
|
|
325
|
+
return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), Y(C({}, x), {
|
|
325
326
|
calcWays: [N],
|
|
326
327
|
dateCalcTypes: [w[1]]
|
|
327
328
|
});
|
|
328
329
|
}
|
|
329
330
|
} else
|
|
330
|
-
return t === "the_count" && (
|
|
331
|
+
return t === "the_count" && (x.calcType = "AGGREGATE", x.distinct = !!A, x.typeGuid = g), Y(C({}, x), {
|
|
331
332
|
builtInCalcWay: a
|
|
332
333
|
});
|
|
333
334
|
}, nl = (e) => {
|
|
334
335
|
if (!e)
|
|
335
336
|
return [];
|
|
336
|
-
const o =
|
|
337
|
+
const o = fe((e == null ? void 0 : e.controlList) || []).filter((S) => S.conditionKey !== "parentCode"), {
|
|
337
338
|
classificationList: l = [],
|
|
338
339
|
rowHeaderList: t = [],
|
|
339
340
|
dimensionList: y = [],
|
|
@@ -355,9 +356,9 @@ const tl = [
|
|
|
355
356
|
...i
|
|
356
357
|
], a = [];
|
|
357
358
|
for (const S of f) {
|
|
358
|
-
const A =
|
|
359
|
+
const A = ue((S == null ? void 0 : S.conditions) || []);
|
|
359
360
|
if (A != null && A.length) {
|
|
360
|
-
const
|
|
361
|
+
const g = A.filter((c) => (c == null ? void 0 : c.dataType) === "component").map((c) => {
|
|
361
362
|
const m = {};
|
|
362
363
|
return c != null && c.dateFormat && (m.format = c.dateFormat), c.fieldValue === "PARENT" && (m.id = "PARENT", m.keyName = c.modelKey, m.modelKey = c.modelKey, m.prop = c.prop), C({
|
|
363
364
|
conditionKey: c.fieldName,
|
|
@@ -373,8 +374,8 @@ const tl = [
|
|
|
373
374
|
indexCodeNum: c.indexCodeNum
|
|
374
375
|
}, m);
|
|
375
376
|
});
|
|
376
|
-
if (
|
|
377
|
-
for (const c of
|
|
377
|
+
if (g != null && g.length)
|
|
378
|
+
for (const c of g)
|
|
378
379
|
a.find((m) => m.keyName === c.keyName) || a.push(c);
|
|
379
380
|
}
|
|
380
381
|
}
|
|
@@ -384,19 +385,19 @@ const tl = [
|
|
|
384
385
|
if ((A == null ? void 0 : A.conditionKey) === "parentCode")
|
|
385
386
|
continue;
|
|
386
387
|
const {
|
|
387
|
-
id:
|
|
388
|
+
id: g,
|
|
388
389
|
keyName: c,
|
|
389
390
|
prop: m,
|
|
390
|
-
format:
|
|
391
|
+
format: x,
|
|
391
392
|
modelKey: w,
|
|
392
393
|
dataType: N = "component",
|
|
393
394
|
customValue: v
|
|
394
395
|
} = A, E = $e(A);
|
|
395
|
-
|
|
396
|
+
ye(E, g, { prop: m, dateFormat: x, modelKey: w, keyName: c }), N === "" && (E.fieldValue = v || ""), u.push(E);
|
|
396
397
|
}
|
|
397
398
|
for (let S = u.length - 1; S >= 0; S--) {
|
|
398
399
|
const A = u[S];
|
|
399
|
-
A.globalCondition ||
|
|
400
|
+
A.globalCondition || ue(u).find((c) => c.alias === A.alias && c.globalCondition) && u.splice(S, 1);
|
|
400
401
|
}
|
|
401
402
|
return u;
|
|
402
403
|
};
|
|
@@ -449,7 +450,7 @@ function He(e) {
|
|
|
449
450
|
dataType: d = "component",
|
|
450
451
|
customValue: n
|
|
451
452
|
} = o, i = $e(o);
|
|
452
|
-
|
|
453
|
+
ye(i, l, { prop: y, dateFormat: r, modelKey: s, keyName: t }), d === "" && (i.fieldValue = n || "");
|
|
453
454
|
for (const f in i)
|
|
454
455
|
o[f] = i[f];
|
|
455
456
|
for (const f of tl)
|
|
@@ -467,7 +468,7 @@ function rl(e) {
|
|
|
467
468
|
valueType: l.variableType,
|
|
468
469
|
alias: l.keyName || ""
|
|
469
470
|
};
|
|
470
|
-
|
|
471
|
+
ye(t, l.id, {
|
|
471
472
|
dateFormat: l.format,
|
|
472
473
|
prop: l.dateTypeValue,
|
|
473
474
|
keyName: l.keyName,
|
|
@@ -479,23 +480,23 @@ function rl(e) {
|
|
|
479
480
|
}
|
|
480
481
|
return o;
|
|
481
482
|
}
|
|
482
|
-
function
|
|
483
|
+
function ye(e, o, l) {
|
|
483
484
|
const { prop: t = "", dateFormat: y = "", modelKey: s = "", keyName: r = "", operateValue: d, operateMode: n, operateType: i } = l || {}, f = s || r;
|
|
484
485
|
if (o === "PARENT" && f && t) {
|
|
485
486
|
const m = window.config.record;
|
|
486
|
-
let
|
|
487
|
+
let x = t, w = y;
|
|
487
488
|
const N = t.match(/\{(.+?)\}/g);
|
|
488
489
|
if (N != null && N.length) {
|
|
489
490
|
const v = N[0].slice(1, -1).trim();
|
|
490
|
-
|
|
491
|
+
x = t.replace(N[0], ""), w = v, e.dateFormat = w;
|
|
491
492
|
}
|
|
492
493
|
if (m && m[f]) {
|
|
493
|
-
const v = V(m[f][
|
|
494
|
+
const v = V(m[f][x]);
|
|
494
495
|
$.isDayjs(v) ? e.fieldValue = v.format(w || "YYYY-MM-DD") : e.fieldValue = v;
|
|
495
496
|
}
|
|
496
497
|
return;
|
|
497
498
|
}
|
|
498
|
-
const a =
|
|
499
|
+
const a = ce(o) || {}, { value: b, format: u = "YYYY-MM-DD", type: S = "", useCurrentTime: A, RECORD: g } = a || {}, c = y || u;
|
|
499
500
|
if (K(a.type, "date")) {
|
|
500
501
|
let m;
|
|
501
502
|
if (A ? b ? m = V(b) : m = $() : m = V(b), d && n && i)
|
|
@@ -516,40 +517,40 @@ function me(e, o, l) {
|
|
|
516
517
|
}
|
|
517
518
|
if (!m)
|
|
518
519
|
return;
|
|
519
|
-
let
|
|
520
|
-
if (V(a[m]) && (
|
|
520
|
+
let x = null;
|
|
521
|
+
if (V(a[m]) && (x = $(V(a[m]))), d && n && i) {
|
|
521
522
|
if (d === "rangeValue") {
|
|
522
523
|
if (a.startTime && a.endTime) {
|
|
523
524
|
const w = V(a.endTime).diff(V(a.startTime), n) + 1;
|
|
524
525
|
switch (i) {
|
|
525
526
|
case "add":
|
|
526
|
-
|
|
527
|
+
x = x && x.add(w, n);
|
|
527
528
|
break;
|
|
528
529
|
case "minus":
|
|
529
|
-
|
|
530
|
+
x = x && x.subtract(w, n);
|
|
530
531
|
}
|
|
531
532
|
}
|
|
532
533
|
} else if (!isNaN(+d))
|
|
533
534
|
switch (i) {
|
|
534
535
|
case "add":
|
|
535
|
-
|
|
536
|
+
x = x && x.add(d, n);
|
|
536
537
|
break;
|
|
537
538
|
case "minus":
|
|
538
|
-
|
|
539
|
+
x = x && x.subtract(d, n);
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
|
-
if (
|
|
542
|
+
if (x && (e.fieldValue = x == null ? void 0 : x.format(c)), m === "rangeValue" && a.startTime && a.endTime) {
|
|
542
543
|
const w = Je(c);
|
|
543
544
|
w && (e.fieldValue = V(a.endTime).diff(V(a.startTime), w) + 1);
|
|
544
545
|
}
|
|
545
546
|
e.dateFormat = c;
|
|
546
547
|
} else
|
|
547
|
-
K(S, ol) ? s &&
|
|
548
|
+
K(S, ol) ? s && g ? e.fieldValue = g[s] : !s && g ? e.fieldValue = g.value : e.fieldValue = V(b) : e.fieldValue = V(b);
|
|
548
549
|
}
|
|
549
|
-
const
|
|
550
|
+
const se = (e) => {
|
|
550
551
|
var o;
|
|
551
552
|
if (e) {
|
|
552
|
-
const l = Array.isArray(e) ?
|
|
553
|
+
const l = Array.isArray(e) ? fe(e) : [fe(e)];
|
|
553
554
|
let t = "", y = [];
|
|
554
555
|
const s = [], r = [], d = [];
|
|
555
556
|
for (const n of l) {
|
|
@@ -573,11 +574,11 @@ const fe = (e) => {
|
|
|
573
574
|
};
|
|
574
575
|
} else
|
|
575
576
|
return e;
|
|
576
|
-
},
|
|
577
|
+
}, Qe = (e) => {
|
|
577
578
|
const { sortCpnts: o = [] } = e;
|
|
578
579
|
let l, t = "";
|
|
579
580
|
for (const y of o) {
|
|
580
|
-
const s =
|
|
581
|
+
const s = ce(y) || {}, { type: r, RECORD: d } = s;
|
|
581
582
|
if (K(r, "image") && K(d == null ? void 0 : d.value, ["asc", "desc"])) {
|
|
582
583
|
t = d.value.toUpperCase();
|
|
583
584
|
break;
|
|
@@ -608,10 +609,10 @@ const fe = (e) => {
|
|
|
608
609
|
rowHeaderList: S = [],
|
|
609
610
|
dimensionList: A = [],
|
|
610
611
|
// 文本组件的维度列表
|
|
611
|
-
seriesList:
|
|
612
|
+
seriesList: g = [],
|
|
612
613
|
leftAxisList: c = [],
|
|
613
614
|
rightAxisList: m = [],
|
|
614
|
-
queryColumnList:
|
|
615
|
+
queryColumnList: x = [],
|
|
615
616
|
indicators: w = [],
|
|
616
617
|
controlList: N = [],
|
|
617
618
|
formFields: v = {},
|
|
@@ -620,7 +621,7 @@ const fe = (e) => {
|
|
|
620
621
|
// dataSourceId, // 所属数据源ID
|
|
621
622
|
idxLibMode: re,
|
|
622
623
|
// 指标库模式, source= INDICATOR_LIB时候必填, NORMAL_YEAR_TABLE = 普通年表, WITH_DATE_DIM_TABLE = 带有时间维度表
|
|
623
|
-
preview:
|
|
624
|
+
preview: me = !1,
|
|
624
625
|
// 预览开关
|
|
625
626
|
edvDataSetId: Le
|
|
626
627
|
// 数据集id
|
|
@@ -645,7 +646,7 @@ const fe = (e) => {
|
|
|
645
646
|
I != null && I.length && (I = le(I, "1")), a == null && (K(t, ["table", "card"]) || K(t, ["list", "circulate"]) && (u == null ? void 0 : u.length) > 1 ? a = "1" : K(t, ["select", "checkbox", "radio"]) ? a = "3" : a = "2");
|
|
646
647
|
let H;
|
|
647
648
|
const Ce = [];
|
|
648
|
-
let
|
|
649
|
+
let xe = "";
|
|
649
650
|
if (Array.isArray(u) && u.length > 0 && (!["ecanList", "ecanCirculate"].includes(t) || (u == null ? void 0 : u.length) === 1)) {
|
|
650
651
|
const L = u.length;
|
|
651
652
|
for (let T = 0; T < L; T++) {
|
|
@@ -653,7 +654,7 @@ const fe = (e) => {
|
|
|
653
654
|
label: G = "",
|
|
654
655
|
name: D = "",
|
|
655
656
|
show: j = !1,
|
|
656
|
-
sort:
|
|
657
|
+
sort: Q,
|
|
657
658
|
customGroup: q,
|
|
658
659
|
conditions: F,
|
|
659
660
|
dateFormat: k,
|
|
@@ -661,11 +662,11 @@ const fe = (e) => {
|
|
|
661
662
|
truncations: M = []
|
|
662
663
|
} = p;
|
|
663
664
|
if (j || L === 1) {
|
|
664
|
-
|
|
665
|
+
xe = R, H = {
|
|
665
666
|
label: G.trim(),
|
|
666
667
|
columnName: D,
|
|
667
668
|
show: j,
|
|
668
|
-
sort:
|
|
669
|
+
sort: Qe(p) || se(Q) || Q,
|
|
669
670
|
customGroup: q,
|
|
670
671
|
conditions: le(F),
|
|
671
672
|
typeGuid: R
|
|
@@ -674,8 +675,8 @@ const fe = (e) => {
|
|
|
674
675
|
if (Array.isArray(M) && M.length > 0) {
|
|
675
676
|
const U = M.length;
|
|
676
677
|
for (let _ = 0; _ < U; _++) {
|
|
677
|
-
const z = M[_] || {}, { rule:
|
|
678
|
-
|
|
678
|
+
const z = M[_] || {}, { rule: P = "", num: X = 0, name: ee = "" } = z;
|
|
679
|
+
P && X && (h.num = X, h.rule = P, ee && (h.otherGroupName = ee));
|
|
679
680
|
}
|
|
680
681
|
}
|
|
681
682
|
if ((Fe = Object.keys(h)) != null && Fe.length && (H.truncation = h), K(t, ["scatter", "valueline"]))
|
|
@@ -686,16 +687,16 @@ const fe = (e) => {
|
|
|
686
687
|
}
|
|
687
688
|
}
|
|
688
689
|
let Te;
|
|
689
|
-
if (Array.isArray(
|
|
690
|
-
const L =
|
|
690
|
+
if (Array.isArray(g) && g.length > 0) {
|
|
691
|
+
const L = g.length;
|
|
691
692
|
for (let T = 0; T < L; T++) {
|
|
692
|
-
const p =
|
|
693
|
+
const p = g[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, typeGuid: k } = p;
|
|
693
694
|
if (j || L === 1) {
|
|
694
695
|
Te = {
|
|
695
696
|
label: G.trim(),
|
|
696
697
|
columnName: D,
|
|
697
698
|
show: j,
|
|
698
|
-
sort:
|
|
699
|
+
sort: se(Q),
|
|
699
700
|
customGroup: q,
|
|
700
701
|
conditions: le(F),
|
|
701
702
|
typeGuid: k
|
|
@@ -715,12 +716,12 @@ const fe = (e) => {
|
|
|
715
716
|
L.location = "LEFT", B.push(Ae(L, H));
|
|
716
717
|
});
|
|
717
718
|
const J = [];
|
|
718
|
-
["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (
|
|
719
|
-
const { label: T, name: p, location: G, show: D, indexCode: j, sort:
|
|
720
|
-
let M =
|
|
719
|
+
["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (x = u), (Ie = (Ve = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : Ve.dimensions) != null && Ie.length && (x = o.pivotTableCal.dimensions), x == null || x.forEach((L) => {
|
|
720
|
+
const { label: T, name: p, location: G, show: D, indexCode: j, sort: Q, typeGuid: q, indexCodeNum: F, dateFormat: k, conditions: R } = L;
|
|
721
|
+
let M = se(Q);
|
|
721
722
|
if (o.sort) {
|
|
722
723
|
const { field: U, order: _ } = o.sort;
|
|
723
|
-
let z = B.find((
|
|
724
|
+
let z = B.find((P) => P.label === U);
|
|
724
725
|
!z && T === U && (z = L), z && (M = {
|
|
725
726
|
columnName: z.columnName,
|
|
726
727
|
label: o.sort.field,
|
|
@@ -746,15 +747,15 @@ const fe = (e) => {
|
|
|
746
747
|
if (Array.isArray(S) && S.length > 0 ? O = S : Array.isArray(A) && A.length > 0 && (O = A), O != null && O.length) {
|
|
747
748
|
const L = O.length;
|
|
748
749
|
for (let T = 0; T < L; T++) {
|
|
749
|
-
const p = O[T] || {}, { label: G = "", name: D = "", show: j = !1, sort:
|
|
750
|
-
let h =
|
|
750
|
+
const p = O[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, truncations: k, typeGuid: R = "", dateFormat: M } = p;
|
|
751
|
+
let h = se(Q);
|
|
751
752
|
if (o.sort) {
|
|
752
|
-
const { field: z, order:
|
|
753
|
+
const { field: z, order: P } = o.sort;
|
|
753
754
|
let X = B.find((ee) => ee.label === z);
|
|
754
755
|
!X && p.label === z && (X = p), X && (h = {
|
|
755
756
|
columnName: X.columnName,
|
|
756
757
|
label: o.sort.field,
|
|
757
|
-
order:
|
|
758
|
+
order: P.toUpperCase(),
|
|
758
759
|
type: "NORMAL"
|
|
759
760
|
});
|
|
760
761
|
}
|
|
@@ -771,15 +772,15 @@ const fe = (e) => {
|
|
|
771
772
|
const _ = {};
|
|
772
773
|
if (Array.isArray(k) && k.length > 0) {
|
|
773
774
|
const z = k.length;
|
|
774
|
-
for (let
|
|
775
|
-
const X = k[
|
|
775
|
+
for (let P = 0; P < z; P++) {
|
|
776
|
+
const X = k[P] || {}, { rule: ee = "", num: Re = 0, name: Ye = "" } = X;
|
|
776
777
|
ee && Re && (_.num = Re, _.rule = ee, Ye && (_.otherGroupName = Ye));
|
|
777
778
|
}
|
|
778
779
|
}
|
|
779
780
|
(he = Object.keys(_)) != null && he.length && (U.truncation = _), ne.push(U);
|
|
780
781
|
}
|
|
781
782
|
}
|
|
782
|
-
let
|
|
783
|
+
let ge = [], pe;
|
|
783
784
|
if (o != null && o.pivotTableCal) {
|
|
784
785
|
let L = [];
|
|
785
786
|
const {
|
|
@@ -788,7 +789,7 @@ const fe = (e) => {
|
|
|
788
789
|
truncations: G = [],
|
|
789
790
|
sorts: D = [],
|
|
790
791
|
aggregateMethod: j = [],
|
|
791
|
-
rowDimensionKeys:
|
|
792
|
+
rowDimensionKeys: Q = [],
|
|
792
793
|
colDimensionKeys: q = []
|
|
793
794
|
} = o.pivotTableCal;
|
|
794
795
|
if (B.push(...T), p != null && p.length)
|
|
@@ -820,9 +821,9 @@ const fe = (e) => {
|
|
|
820
821
|
const k = J.find((R) => R.label === F);
|
|
821
822
|
k && ((De = j[F]) != null && De.length) && (k.aggregateMethod = j[F]);
|
|
822
823
|
}
|
|
823
|
-
ne = [],
|
|
824
|
+
ne = [], ge = [];
|
|
824
825
|
for (const F of J)
|
|
825
|
-
|
|
826
|
+
Q.includes(F.columnName) ? ne.push(F) : q.includes(F.columnName) && ge.push(F);
|
|
826
827
|
}
|
|
827
828
|
if (K(t, ["text", "proportion", "counter"]) ? b = "zb" : K(t, ["valueline"]) && (b = "valueline"), s || t === "card") {
|
|
828
829
|
if (ne.length === 0 || B.length === 0)
|
|
@@ -833,7 +834,7 @@ const fe = (e) => {
|
|
|
833
834
|
return;
|
|
834
835
|
if (a === "2" && B.length === 0)
|
|
835
836
|
return;
|
|
836
|
-
if (a === "3" && (!
|
|
837
|
+
if (a === "3" && (!xe && n !== "EDV_DATA_SET" || !v.labelField || !v.valueField))
|
|
837
838
|
return;
|
|
838
839
|
if (a === "3" && t === "ecanDataSelect" && B.length === 0)
|
|
839
840
|
return;
|
|
@@ -845,24 +846,24 @@ const fe = (e) => {
|
|
|
845
846
|
T != null && T.length && (r = T[T.length - 1]);
|
|
846
847
|
}
|
|
847
848
|
}
|
|
848
|
-
let
|
|
849
|
+
let be;
|
|
849
850
|
if (!K(t, ["scatter", "valueline"]) && ((je = Object.keys(v)) != null && je.length)) {
|
|
850
|
-
const L =
|
|
851
|
+
const L = ue(N).find((p) => p.conditionKey === "parentCode"), T = {};
|
|
851
852
|
if (L) {
|
|
852
|
-
const p =
|
|
853
|
+
const p = ce(L.id) || {};
|
|
853
854
|
if (p != null && p.itemCodes)
|
|
854
855
|
T.parentItemCodes = p.itemCodes;
|
|
855
856
|
else
|
|
856
857
|
return;
|
|
857
858
|
}
|
|
858
|
-
t === "ecanDataSelect" && (T.indicatorList = B.filter((p) => p.show)), n === "EDV_DATA_SET" && (T.edvDataSetId = Le),
|
|
859
|
+
t === "ecanDataSelect" && (T.indicatorList = B.filter((p) => p.show)), n === "EDV_DATA_SET" && (T.edvDataSetId = Le), be = C({
|
|
859
860
|
url: "/diagram/formData",
|
|
860
861
|
source: n,
|
|
861
862
|
dataViewId: i,
|
|
862
863
|
plugin: "4",
|
|
863
864
|
layer: a,
|
|
864
865
|
chartType: "normalSelect",
|
|
865
|
-
rangeIndexTypeGuid:
|
|
866
|
+
rangeIndexTypeGuid: xe,
|
|
866
867
|
type: t === "ecanDataSelect" ? "normalSelectData" : "normalSelect",
|
|
867
868
|
labelField: v.labelField,
|
|
868
869
|
valueField: v.valueField,
|
|
@@ -877,7 +878,7 @@ const fe = (e) => {
|
|
|
877
878
|
classifications: Ce
|
|
878
879
|
} : L = {
|
|
879
880
|
classification: H
|
|
880
|
-
},
|
|
881
|
+
}, be = C({
|
|
881
882
|
url: "/diagram",
|
|
882
883
|
source: n,
|
|
883
884
|
dataViewId: i,
|
|
@@ -895,15 +896,15 @@ const fe = (e) => {
|
|
|
895
896
|
return p && Array.isArray(p) && (G.fieldValue = JSON.stringify(p)), C(C({}, T), G);
|
|
896
897
|
}),
|
|
897
898
|
idxLibMode: re,
|
|
898
|
-
preview:
|
|
899
|
+
preview: me,
|
|
899
900
|
rowHeaders: ne,
|
|
900
901
|
keyName: e.keyName,
|
|
901
902
|
// 透视表指标排序相关入参
|
|
902
903
|
columnData: pe,
|
|
903
|
-
columnHeaders:
|
|
904
|
+
columnHeaders: ge
|
|
904
905
|
}, L);
|
|
905
906
|
}
|
|
906
|
-
return
|
|
907
|
+
return be;
|
|
907
908
|
}, dl = {
|
|
908
909
|
formatIndicatorParams: al
|
|
909
910
|
}, sl = (e = [], o) => {
|
|
@@ -913,8 +914,8 @@ const fe = (e) => {
|
|
|
913
914
|
if (r === 1) {
|
|
914
915
|
const f = [];
|
|
915
916
|
for (let b = 0; b < d; b++) {
|
|
916
|
-
const u = t[b], { label: S, value: A } = u,
|
|
917
|
-
y.add(S), f.push(
|
|
917
|
+
const u = t[b], { label: S, value: A } = u, g = Y(C({}, e[0]), { value: e[0][A] });
|
|
918
|
+
y.add(S), f.push(g);
|
|
918
919
|
}
|
|
919
920
|
const a = e[0][l] || "";
|
|
920
921
|
s.set(a, f);
|
|
@@ -923,7 +924,7 @@ const fe = (e) => {
|
|
|
923
924
|
const a = e[f], b = a[l];
|
|
924
925
|
y.add(b);
|
|
925
926
|
for (let u = 0; u < d; u++) {
|
|
926
|
-
const S = t[u], { label: A, value:
|
|
927
|
+
const S = t[u], { label: A, value: g } = S, c = Y(C({}, a), { value: a[g] });
|
|
927
928
|
if (s.has(A)) {
|
|
928
929
|
const m = s.get(A);
|
|
929
930
|
m.push(c), s.set(A, m);
|
|
@@ -1009,13 +1010,13 @@ const cl = (e, o, l) => {
|
|
|
1009
1010
|
}, yl = (e, o, l) => {
|
|
1010
1011
|
const t = e.yAxisLabelFormatter, y = e.xAxisLabelFormatter, { dimensions: s = [], dataset: r = [] } = o, d = oe(() => {
|
|
1011
1012
|
const { gradientShow: i, gradientColors: f, gradientOffset: a, barBorderRadius: b } = e, u = r, S = u.length, A = [];
|
|
1012
|
-
for (let
|
|
1013
|
-
const c = Y(C({}, u[
|
|
1013
|
+
for (let g = 0; g < S; g++) {
|
|
1014
|
+
const c = Y(C({}, u[g]), {
|
|
1014
1015
|
type: "bar",
|
|
1015
1016
|
barWidth: e.barWidth,
|
|
1016
1017
|
showBackground: e.showBarBackground
|
|
1017
|
-
}), { isStack: m, stackColumns:
|
|
1018
|
-
if (m &&
|
|
1018
|
+
}), { isStack: m, stackColumns: x } = e;
|
|
1019
|
+
if (m && x.includes(u[g].name || !x) && (c.stack = "stack"), c.label = {
|
|
1019
1020
|
show: e.labelShow,
|
|
1020
1021
|
fontSize: e.labelFontSize,
|
|
1021
1022
|
position: e.labelPosition,
|
|
@@ -1025,7 +1026,7 @@ const cl = (e, o, l) => {
|
|
|
1025
1026
|
formatter: (w) => {
|
|
1026
1027
|
let N = "", v = e.labelFormatter;
|
|
1027
1028
|
v === "" && (v = "{c}");
|
|
1028
|
-
const { seriesName: E, name: Z, value: re, data:
|
|
1029
|
+
const { seriesName: E, name: Z, value: re, data: me } = w || {};
|
|
1029
1030
|
return N += ie(
|
|
1030
1031
|
v,
|
|
1031
1032
|
{
|
|
@@ -1035,7 +1036,7 @@ const cl = (e, o, l) => {
|
|
|
1035
1036
|
a: E,
|
|
1036
1037
|
b: Z,
|
|
1037
1038
|
c: re || 0
|
|
1038
|
-
},
|
|
1039
|
+
}, me)
|
|
1039
1040
|
},
|
|
1040
1041
|
{
|
|
1041
1042
|
useNewline: !0,
|
|
@@ -1051,13 +1052,13 @@ const cl = (e, o, l) => {
|
|
|
1051
1052
|
y2: e.isUseHorizontalAxis ? 0 : 1,
|
|
1052
1053
|
colorStops: [{
|
|
1053
1054
|
offset: 0,
|
|
1054
|
-
color: e.colors[
|
|
1055
|
+
color: e.colors[g]
|
|
1055
1056
|
}, {
|
|
1056
1057
|
offset: a,
|
|
1057
|
-
color: f[
|
|
1058
|
+
color: f[g]
|
|
1058
1059
|
}, {
|
|
1059
1060
|
offset: 1,
|
|
1060
|
-
color: f[
|
|
1061
|
+
color: f[g]
|
|
1061
1062
|
}]
|
|
1062
1063
|
}
|
|
1063
1064
|
}), b) {
|
|
@@ -1098,21 +1099,21 @@ const cl = (e, o, l) => {
|
|
|
1098
1099
|
let a = "", b = e.tooltipFormatter;
|
|
1099
1100
|
b === "" && (b = "{marker} {a} {c}");
|
|
1100
1101
|
for (let u = 0; u < f; u++) {
|
|
1101
|
-
const { marker: S, seriesName: A, name:
|
|
1102
|
+
const { marker: S, seriesName: A, name: g, value: c, data: m } = i[u] || {};
|
|
1102
1103
|
if (u === 0) {
|
|
1103
|
-
let
|
|
1104
|
-
typeof
|
|
1104
|
+
let x = g;
|
|
1105
|
+
typeof g == "string" && g[0] === "0" && !isNaN(+g) && (x = (+g).toString()), a += `${te(y, x)}<br/>`;
|
|
1105
1106
|
}
|
|
1106
1107
|
a += ie(
|
|
1107
1108
|
b,
|
|
1108
1109
|
{
|
|
1109
1110
|
textData: C({
|
|
1110
1111
|
marker: S,
|
|
1111
|
-
name:
|
|
1112
|
+
name: g,
|
|
1112
1113
|
value: c,
|
|
1113
1114
|
Qfw: el,
|
|
1114
1115
|
a: A,
|
|
1115
|
-
b:
|
|
1116
|
+
b: g,
|
|
1116
1117
|
c: c || 0
|
|
1117
1118
|
}, m)
|
|
1118
1119
|
},
|
|
@@ -1308,16 +1309,16 @@ const cl = (e, o, l) => {
|
|
|
1308
1309
|
let a = "", b = e.tooltipFormatter;
|
|
1309
1310
|
b === "" && (b = "{marker} {a} {c}");
|
|
1310
1311
|
for (let u = 0; u < f; u++) {
|
|
1311
|
-
const { marker: S, seriesName: A, name:
|
|
1312
|
-
u === 0 && (a += `${
|
|
1312
|
+
const { marker: S, seriesName: A, name: g, value: c, data: m } = i[u] || {};
|
|
1313
|
+
u === 0 && (a += `${g}<br/>`), a += ie(
|
|
1313
1314
|
b,
|
|
1314
1315
|
{
|
|
1315
1316
|
textData: C({
|
|
1316
1317
|
marker: S,
|
|
1317
|
-
name:
|
|
1318
|
+
name: g,
|
|
1318
1319
|
value: c,
|
|
1319
1320
|
a: A,
|
|
1320
|
-
b:
|
|
1321
|
+
b: g,
|
|
1321
1322
|
c
|
|
1322
1323
|
}, m)
|
|
1323
1324
|
},
|
|
@@ -1519,8 +1520,8 @@ const cl = (e, o, l) => {
|
|
|
1519
1520
|
yAxisIndex: S
|
|
1520
1521
|
}, y[a]);
|
|
1521
1522
|
if (u === "line") {
|
|
1522
|
-
const
|
|
1523
|
-
e.shadowColor && (
|
|
1523
|
+
const g = {};
|
|
1524
|
+
e.shadowColor && (g.shadowColor = e.shadowColor, g.shadowBlur = e.shadowBlur, g.shadowOffsetY = e.shadowOffsetY, g.shadowOffsetX = e.shadowOffsetX), A = Y(C({}, A), {
|
|
1524
1525
|
symbolSize: e.symbolSize,
|
|
1525
1526
|
smooth: e.smooth,
|
|
1526
1527
|
itemStyle: {
|
|
@@ -1546,11 +1547,11 @@ const cl = (e, o, l) => {
|
|
|
1546
1547
|
},
|
|
1547
1548
|
lineStyle: C({
|
|
1548
1549
|
width: e.lineStyleWidth
|
|
1549
|
-
},
|
|
1550
|
+
}, g)
|
|
1550
1551
|
});
|
|
1551
1552
|
}
|
|
1552
1553
|
if (u === "bar") {
|
|
1553
|
-
const { gradientShow:
|
|
1554
|
+
const { gradientShow: g, gradientColors: c, gradientOffset: m } = e, x = {};
|
|
1554
1555
|
if (e.barBorderRadius) {
|
|
1555
1556
|
const w = e.barBorderRadius.split(",");
|
|
1556
1557
|
if (w != null && w.length) {
|
|
@@ -1559,10 +1560,10 @@ const cl = (e, o, l) => {
|
|
|
1559
1560
|
const E = parseFloat(v);
|
|
1560
1561
|
isNaN(E) || N.push(E);
|
|
1561
1562
|
}
|
|
1562
|
-
|
|
1563
|
+
x.borderRadius = N;
|
|
1563
1564
|
}
|
|
1564
1565
|
}
|
|
1565
|
-
|
|
1566
|
+
g && (x.color = {
|
|
1566
1567
|
x: 0,
|
|
1567
1568
|
y: 0,
|
|
1568
1569
|
x2: 0,
|
|
@@ -1579,7 +1580,7 @@ const cl = (e, o, l) => {
|
|
|
1579
1580
|
}]
|
|
1580
1581
|
}), A = Y(C({}, A), {
|
|
1581
1582
|
barWidth: e.barWidth,
|
|
1582
|
-
itemStyle:
|
|
1583
|
+
itemStyle: x
|
|
1583
1584
|
});
|
|
1584
1585
|
}
|
|
1585
1586
|
e.isShowMarkLine && (A.markLine = {
|
|
@@ -1645,19 +1646,19 @@ const cl = (e, o, l) => {
|
|
|
1645
1646
|
a === "" && (a = "{marker} {a} {c}");
|
|
1646
1647
|
const b = e.seriesTypes;
|
|
1647
1648
|
for (let u = 0; u < i; u++) {
|
|
1648
|
-
const S = b[u], { tooltipFormatter: A } = S || {}, { marker:
|
|
1649
|
+
const S = b[u], { tooltipFormatter: A } = S || {}, { marker: g, seriesName: c, name: m, value: x, data: w } = n[u] || {};
|
|
1649
1650
|
u === 0 && (f += `${m}<br/>`), f += ie(
|
|
1650
1651
|
// 如果系列有提示框组件就使用自定义,没有就用默认的
|
|
1651
1652
|
A || a,
|
|
1652
1653
|
{
|
|
1653
1654
|
textData: C({
|
|
1654
|
-
marker:
|
|
1655
|
+
marker: g,
|
|
1655
1656
|
name: m,
|
|
1656
|
-
value:
|
|
1657
|
+
value: x,
|
|
1657
1658
|
seriesName: c,
|
|
1658
1659
|
a: c,
|
|
1659
1660
|
b: m,
|
|
1660
|
-
c:
|
|
1661
|
+
c: x
|
|
1661
1662
|
}, w)
|
|
1662
1663
|
},
|
|
1663
1664
|
{
|