super-page-runtime 2.3.18 → 2.3.19-sit2
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/es/assets/chart-themes/bar-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/bar-theme.js +4 -0
- package/dist/es/assets/chart-themes/gauge-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/gauge-theme.js +4 -0
- package/dist/es/assets/chart-themes/pie-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/pie-theme.js +4 -0
- package/dist/es/assets/chart-themes/radar-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/radar-theme.js +4 -0
- package/dist/es/assets/chart-themes/scatter-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/scatter-theme.js +4 -0
- package/dist/es/components/runtime/utils/api/page-expose-util.js +70 -70
- package/dist/es/components/runtime/utils/assemblys-config.js +1 -1
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +67 -66
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +31 -30
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +66 -65
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +33 -32
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +129 -119
- package/dist/es/components/runtime/utils/events/data-backfill-util.d.ts +27 -0
- package/dist/es/components/runtime/utils/events/data-backfill-util.js +39 -0
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +3 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +577 -512
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/page-init-util.js +87 -68
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +93 -98
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +148 -145
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.d.ts +5 -0
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +20 -0
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +37 -25
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +194 -194
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +55 -54
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +37 -38
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -7
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +43 -27
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -13
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.d.ts +14 -0
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -0
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.d.ts +14 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +7 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +26 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue.js +7 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +28 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +9 -9
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +22 -13
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +180 -168
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +134 -86
- package/package.json +2 -2
- package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme1.js +0 -4
- package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme2.js +0 -4
- package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme3.js +0 -4
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { formatVariableValue as e, getValueFromSource as
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import { setDefaultGrid as s } from "./chart-util.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { formatVariableValue as e, getValueFromSource as t } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as o } from "../common-util.js";
|
|
3
|
+
import { setDefaultGrid as r, formatToolboxI18n as s } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as l } from "../events/event-util.js";
|
|
5
|
+
function i(i2, p, a, n) {
|
|
6
|
+
if (!n || !n.result) return;
|
|
7
|
+
l(i2, p, "beforeUpdateChart", a, { resultData: n }), r(a);
|
|
8
|
+
const u = n && n.result ? n.result : {}, c = p.serviceDataField;
|
|
9
|
+
let m = null;
|
|
10
|
+
c ? m = u[c] : u && (m = [u]), m || (m = []);
|
|
11
|
+
const d = p.props ? p.props.nameSource : void 0, f = p.props ? p.props.nameField : void 0, h = p.props ? p.props.nameFixed : void 0, v = p.props ? p.props.yaxisField : void 0, g = [f], F = [], j = [];
|
|
12
|
+
for (const o2 of m) {
|
|
13
|
+
if (!o2) continue;
|
|
14
|
+
let r2 = null;
|
|
15
|
+
r2 = "fixed" == d ? e(i2, h) : t(o2, f, void 0), F.push(r2);
|
|
16
|
+
const s2 = t(o2, v, void 0);
|
|
17
|
+
j.push(s2);
|
|
17
18
|
}
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
|
|
19
|
+
const x = p.defaultSeries;
|
|
20
|
+
let C = x[0].pieColors;
|
|
21
|
+
C = C || [];
|
|
22
|
+
let D = x[0].pieColorMap;
|
|
23
|
+
D = D || {};
|
|
23
24
|
const S = [];
|
|
24
|
-
for (let e2 = 0; e2 <
|
|
25
|
-
const
|
|
26
|
-
if (e2 <
|
|
27
|
-
let
|
|
28
|
-
|
|
25
|
+
for (let e2 = 0; e2 < F.length && e2 < j.length; e2++) {
|
|
26
|
+
const t2 = { value: j[e2], name: F[e2] };
|
|
27
|
+
if (e2 < C.length || D[t2.name]) {
|
|
28
|
+
let o2 = D[t2.name];
|
|
29
|
+
o2 || (o2 = C[e2]), o2 && (t2.itemStyle = { color: o2 });
|
|
29
30
|
}
|
|
30
|
-
S.push(
|
|
31
|
+
S.push(t2);
|
|
31
32
|
}
|
|
32
|
-
const y =
|
|
33
|
-
y[0].data = S,
|
|
33
|
+
const y = o(x);
|
|
34
|
+
y[0].data = S, a.series = [y[0]], s(a), l(i2, p, "afterUpdateChart", a, { resultData: n }), p.groupFields = g, p.cacheDatas = m, p.rawResult = n;
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
i as updateChartOption
|
|
37
38
|
};
|
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { deepCopy as e } from "../common-util.js";
|
|
3
|
+
import { setDefaultGrid as r, CommonName as s, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i, formatToolboxI18n as a } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as u } from "../events/event-util.js";
|
|
5
|
+
function c(c2, f, g, m) {
|
|
6
|
+
if (!m || !m.result) return;
|
|
7
|
+
u(c2, f, "beforeUpdateChart", g, { resultData: m }), r(g);
|
|
8
|
+
const h = m && m.result ? m.result : {};
|
|
9
|
+
let d = m && m.groupValue ? m.groupValue : void 0;
|
|
10
|
+
const y = f.serviceDataField;
|
|
11
|
+
let v = null;
|
|
12
|
+
y ? v = h[y] : h && (v = Array.isArray(h) ? h : [h]), v || (v = []);
|
|
13
|
+
let x = f.props ? f.props.groups : null;
|
|
14
|
+
if (x || (x = []), !d || 0 === d.length) {
|
|
15
|
+
d = [];
|
|
16
|
+
for (const o2 of x) d.push(o2.group);
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
for (const o2 of
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
for (const t2 of
|
|
18
|
+
const D = {}, E = [], F = [];
|
|
19
|
+
for (const o2 of x) D[o2.group] = o2.target, o2.target && !E.includes(o2.target) && (E.push(o2.target), d.includes(o2.group) && F.push(o2.target));
|
|
20
|
+
let S = f.props ? f.props.mulGroupShow : "";
|
|
21
|
+
S = "break" == S ? "\r\n" : " ";
|
|
22
|
+
for (const t2 of v) {
|
|
22
23
|
if (!t2) continue;
|
|
23
|
-
const
|
|
24
|
-
for (const
|
|
25
|
-
const
|
|
26
|
-
l2 &&
|
|
24
|
+
const e2 = [];
|
|
25
|
+
for (const r3 of d) {
|
|
26
|
+
const s2 = D[r3], l2 = o(t2, s2, void 0);
|
|
27
|
+
l2 && e2.push(l2);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
t2[
|
|
29
|
+
const r2 = e2.join(S);
|
|
30
|
+
t2[s.X_FIELD_NAME] = r2;
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
if (0 ==
|
|
33
|
-
const
|
|
34
|
-
let A =
|
|
35
|
-
if (
|
|
36
|
-
const t2 = [],
|
|
37
|
-
let
|
|
38
|
-
for (const o2 in
|
|
39
|
-
A =
|
|
32
|
+
const _ = f.items ? f.items : [];
|
|
33
|
+
if (0 == _.length) return;
|
|
34
|
+
const j = f.props ? f.props : {};
|
|
35
|
+
let A = j.yaxisField;
|
|
36
|
+
if (_[0].props.yaxisField = A, _[0].props.yaxisSource = j.yaxisSource, _[0].props.formula = j.formula, "formula" === j.yaxisSource) {
|
|
37
|
+
const t2 = [], e2 = l(_, v, t2);
|
|
38
|
+
let r2 = j.formula ? j.formula : "";
|
|
39
|
+
for (const o2 in e2) r2 = r2.replace(new RegExp(o2.replace("$", "\\$"), "g"), e2[o2]);
|
|
40
|
+
A = s.Y_TEMP_NAME;
|
|
40
41
|
const p2 = {};
|
|
41
|
-
for (const
|
|
42
|
-
if (!
|
|
43
|
-
for (const
|
|
44
|
-
const t3 = o(
|
|
45
|
-
let
|
|
46
|
-
void 0 === t3 || isNaN(t3) || (void 0 ===
|
|
42
|
+
for (const e3 of v) {
|
|
43
|
+
if (!e3) continue;
|
|
44
|
+
for (const r3 of t2) {
|
|
45
|
+
const t3 = o(e3, r3, void 0);
|
|
46
|
+
let s3 = p2[r3];
|
|
47
|
+
void 0 === t3 || isNaN(t3) || (void 0 === s3 ? s3 = t3 : s3 += t3), p2[r3] = s3;
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
49
|
+
const s2 = n(r2, p2, e3, c2);
|
|
50
|
+
e3[A] = s2;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
for (const t2 of
|
|
53
|
+
_[0].props.yaxisField = A, _[0].props.yaxisSource = "", p(c2, f, v), v = i(c2, f, v, E, [A]);
|
|
54
|
+
const M = [], N = [];
|
|
55
|
+
for (const t2 of v) {
|
|
55
56
|
if (!t2) continue;
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
57
|
+
M.push(t2[s.X_FIELD_NAME]);
|
|
58
|
+
const e2 = o(t2, A, void 0);
|
|
59
|
+
N.push(e2);
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
for (let o2 = 0; o2 <
|
|
67
|
-
const t2 = { value:
|
|
68
|
-
if (o2 <
|
|
69
|
-
let
|
|
70
|
-
|
|
61
|
+
const b = f.defaultSeries;
|
|
62
|
+
let C = b[0].pieColors;
|
|
63
|
+
C = C || [];
|
|
64
|
+
let w = b[0].pieColorMap;
|
|
65
|
+
w = w || {};
|
|
66
|
+
const I = [];
|
|
67
|
+
for (let o2 = 0; o2 < M.length && o2 < N.length; o2++) {
|
|
68
|
+
const t2 = { value: N[o2], name: M[o2] };
|
|
69
|
+
if (o2 < C.length || w[t2.name]) {
|
|
70
|
+
let e2 = w[t2.name];
|
|
71
|
+
e2 || (e2 = C[o2]), e2 && (t2.itemStyle = { color: e2 });
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
+
I.push(t2);
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
!(
|
|
75
|
+
const V = e(b);
|
|
76
|
+
V[0].data = I, g.series = [V[0]], a(g);
|
|
77
|
+
const G = f.props ? f.props.selGroupVariable : null;
|
|
78
|
+
!(f.props ? f.props.enableDrill : null) && G && (f.highlightInfos = [], t(c2.entity, G, null)), u(c2, f, "afterUpdateChart", g, { resultData: m }), f.groupFields = F, f.cacheDatas = v, f.rawResult = m;
|
|
78
79
|
}
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
c as updateChartOption
|
|
81
82
|
};
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { getValueFromSource as e } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
else
|
|
20
|
-
|
|
2
|
+
import { deepCopy as t } from "../common-util.js";
|
|
3
|
+
import { setDefaultGrid as o, caculateFormulaValue as a, executeChartFormula as i, formatToolboxI18n as r } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as s } from "../events/event-util.js";
|
|
5
|
+
function l(l2, u, f, d) {
|
|
6
|
+
if (!d || !d.result) return;
|
|
7
|
+
s(l2, u, "beforeUpdateChart", f, { resultData: d }), o(f);
|
|
8
|
+
const n = d && d.result ? d.result : {}, p = u.serviceDataField;
|
|
9
|
+
let c = null;
|
|
10
|
+
p ? c = n[p] : n && (c = Array.isArray(n) ? n : [n]), c || (c = []);
|
|
11
|
+
const m = u.items ? u.items : [], v = [], x = {}, h = [], y = a(m, c, h);
|
|
12
|
+
for (const e2 of m) {
|
|
13
|
+
const t2 = e2.props ? e2.props : {}, o2 = t2.yaxisSource, a2 = t2.yaxisField;
|
|
14
|
+
let i2 = null;
|
|
15
|
+
if (!a2 || o2 && "variable" != o2) if ("formula" == o2) {
|
|
16
|
+
let o3 = t2.formula ? t2.formula : "";
|
|
17
|
+
for (const e3 in y) o3 = o3.replace(new RegExp(e3.replace("$", "\\$"), "g"), y[e3]);
|
|
18
|
+
i2 = { uuid: e2.uuid, type: "formula", formula: o3, data: [] };
|
|
19
|
+
} else i2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [] };
|
|
20
|
+
else i2 = { uuid: e2.uuid, type: "variable", field: a2, data: [] };
|
|
21
|
+
i2 && (v.push(i2), x[i2.uuid] = i2);
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
for (const
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
let
|
|
31
|
-
void 0 ===
|
|
23
|
+
const F = u.props ? u.props : {}, b = F.nameField, j = F.maxSource, D = F.maxField, g = F.maxFixed, S = [], w = {};
|
|
24
|
+
for (const t2 of c) {
|
|
25
|
+
if (!t2) continue;
|
|
26
|
+
const o2 = e(t2, b, void 0);
|
|
27
|
+
let a2 = null;
|
|
28
|
+
a2 = j && "variable" != j ? g : e(t2, D, void 0), S.push({ text: o2, max: a2 });
|
|
29
|
+
for (const o3 of h) {
|
|
30
|
+
const a3 = e(t2, o3, void 0);
|
|
31
|
+
let i2 = w[o3];
|
|
32
|
+
void 0 === a3 || isNaN(a3) || (void 0 === i2 ? i2 = a3 : i2 += a3), w[o3] = i2;
|
|
32
33
|
}
|
|
33
|
-
for (const
|
|
34
|
-
const
|
|
35
|
-
if ("fixed" ==
|
|
36
|
-
else if ("variable" ==
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
} else if ("formula" ==
|
|
40
|
-
const e2 =
|
|
41
|
-
|
|
42
|
-
} else
|
|
34
|
+
for (const o3 of v) {
|
|
35
|
+
const a3 = o3.data;
|
|
36
|
+
if ("fixed" == o3.type) a3.push(o3.field);
|
|
37
|
+
else if ("variable" == o3.type) {
|
|
38
|
+
const i2 = e(t2, o3.field, void 0);
|
|
39
|
+
a3.push(i2);
|
|
40
|
+
} else if ("formula" == o3.type) {
|
|
41
|
+
const e2 = i(o3.formula, w, t2, l2);
|
|
42
|
+
a3.push(e2);
|
|
43
|
+
} else a3.push(void 0);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
for (const e2 of
|
|
48
|
-
const
|
|
49
|
-
e2.value =
|
|
46
|
+
f.radar[0].indicator = S, r(f);
|
|
47
|
+
const A = u.defaultSeries, C = t(A), N = C[0].data;
|
|
48
|
+
for (const e2 of N) {
|
|
49
|
+
const t2 = x[e2.uuid];
|
|
50
|
+
e2.value = t2.data;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
f.series = C, s(l2, u, "afterUpdateChart", f, { resultData: d }), u.cacheDatas = c, u.rawResult = d;
|
|
52
53
|
}
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
l as updateChartOption
|
|
55
56
|
};
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { setDefaultGrid as e, caculateFormulaValue as i, executeChartFormula as t, formatToolboxI18n as r } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as a } from "../events/event-util.js";
|
|
5
|
+
function l(l2, u, f, c) {
|
|
6
|
+
if (!c || !c.result) return;
|
|
7
|
+
a(l2, u, "beforeUpdateChart", f, { resultData: c }), e(f);
|
|
8
|
+
const d = c && c.result ? c.result : {}, n = u.serviceDataField;
|
|
9
|
+
let p = null;
|
|
10
|
+
n ? p = d[n] : d && (p = Array.isArray(d) ? d : [d]), p || (p = []);
|
|
11
|
+
const m = u.items ? u.items : [], x = [], y = {};
|
|
12
|
+
for (const o2 of m) {
|
|
13
|
+
const s2 = o2.props ? o2.props : {}, e2 = o2.props ? o2.style : {}, i2 = s2.xaxisField, t2 = s2.sizeField, r2 = { uuid: o2.uuid, xaxisField: i2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: t2, symbolSize: e2.symbolSize, data: [] };
|
|
14
|
+
x.push(r2), y[r2.uuid] = r2;
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
-
for (const o2 of
|
|
16
|
+
const h = [], F = i(m, p, h);
|
|
17
|
+
for (const o2 of x) if ("formula" === o2.yaxisSource) {
|
|
17
18
|
let s2 = o2.formula ? o2.formula : "";
|
|
18
|
-
for (const o3 in
|
|
19
|
+
for (const o3 in F) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), F[o3]);
|
|
19
20
|
o2.formula = s2;
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
for (const s2 of
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
void 0 ===
|
|
22
|
+
const v = {};
|
|
23
|
+
for (const s2 of p) if (s2) {
|
|
24
|
+
for (const e2 of h) {
|
|
25
|
+
const i2 = o(s2, e2, void 0);
|
|
26
|
+
let t2 = v[e2];
|
|
27
|
+
void 0 === i2 || isNaN(i2) || (void 0 === t2 ? t2 = i2 : t2 += i2), v[e2] = t2;
|
|
27
28
|
}
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
const o2 =
|
|
32
|
-
|
|
33
|
-
} else
|
|
34
|
-
|
|
29
|
+
for (const e2 of x) {
|
|
30
|
+
const i2 = e2.data, r2 = [];
|
|
31
|
+
if (r2.push(o(s2, e2.xaxisField, void 0)), "formula" === e2.yaxisSource) {
|
|
32
|
+
const o2 = t(e2.formula, v, s2, l2);
|
|
33
|
+
r2.push(o2);
|
|
34
|
+
} else r2.push(o(s2, e2.yaxisField, void 0));
|
|
35
|
+
e2.sizeField ? r2.push(o(s2, e2.xaxisField, void 0)) : r2.push(e2.symbolSize), i2.push(r2);
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
-
for (const o2 of
|
|
39
|
-
const s2 =
|
|
38
|
+
const S = u.defaultSeries, z = s(S);
|
|
39
|
+
for (const o2 of z) {
|
|
40
|
+
const s2 = y[o2.uuid];
|
|
40
41
|
o2.data = s2.data;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
f.series = z, r(f), a(l2, u, "afterUpdateChart", f, { resultData: c }), u.cacheDatas = p, u.rawResult = c;
|
|
43
44
|
}
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
l as updateChartOption
|
|
46
47
|
};
|
|
@@ -12,7 +12,7 @@ export declare enum CommonName {
|
|
|
12
12
|
* @param themeName 获取自定义的主题名称
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare function getCustomTheme(themeName: string): any;
|
|
15
|
+
export declare function getCustomTheme(themeName: string, chartType?: string): any;
|
|
16
16
|
/**
|
|
17
17
|
* 获取所有主题对象
|
|
18
18
|
* @returns
|
|
@@ -112,3 +112,4 @@ export declare function exportCommonChart(chartRef: any, headerInfo: any): {
|
|
|
112
112
|
};
|
|
113
113
|
export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
|
|
114
114
|
export declare function setDefaultGrid(chartOption: any): void;
|
|
115
|
+
export declare function formatToolboxI18n(chartOption: any): void;
|