super-page-runtime 2.1.932 → 2.2.0
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/_virtual/_plugin-vue_export-helper.js +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +838 -2285
- package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +298 -628
- package/dist/es/components/runtime/utils/page-init-util.js +134 -368
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -512
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +233 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -1,324 +1,162 @@
|
|
|
1
|
-
import { getValueFromSource, formatVariableValue, setValueForVariableName } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy } from "../common-util.js";
|
|
3
|
-
import { CommonName, caculateFormulaValue, sortDatas, limitDatas, executeChartFormula } from "./chart-util.js";
|
|
4
|
-
import { handleChartEvent } from "../events/event-util.js";
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
1
|
+
import { getValueFromSource as e, formatVariableValue as i, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as s } from "../common-util.js";
|
|
3
|
+
import { CommonName as o, caculateFormulaValue as a, sortDatas as l, limitDatas as n, executeChartFormula as u } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as r } from "../events/event-util.js";
|
|
5
|
+
function c(c2, d, f, p) {
|
|
6
|
+
if (!p || !p.result)
|
|
7
7
|
return;
|
|
8
|
+
r(c2, d, "beforeUpdateChart", f, { resultData: p });
|
|
9
|
+
const m = p && p.result ? p.result : {};
|
|
10
|
+
let h = p && p.groupValue ? p.groupValue : void 0;
|
|
11
|
+
const y = d.serviceDataField;
|
|
12
|
+
let g = null;
|
|
13
|
+
y ? g = m[y] : m && (g = Array.isArray(m) ? m : [m]), g || (g = []), d.runtime.dataConfig.runtimeData = g;
|
|
14
|
+
let v = d.props ? d.props.groups : null;
|
|
15
|
+
if (v || (v = []), !h || 0 === h.length) {
|
|
16
|
+
h = [];
|
|
17
|
+
for (const e2 of v)
|
|
18
|
+
h.push(e2.group);
|
|
8
19
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
if (dataSetField) {
|
|
17
|
-
datas = result[dataSetField];
|
|
18
|
-
} else {
|
|
19
|
-
if (result) {
|
|
20
|
-
if (Array.isArray(result)) {
|
|
21
|
-
datas = result;
|
|
22
|
-
} else {
|
|
23
|
-
datas = [result];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
if (!datas) {
|
|
28
|
-
datas = [];
|
|
29
|
-
}
|
|
30
|
-
configure.runtime.dataConfig.runtimeData = datas;
|
|
31
|
-
let confGroups = configure.props ? configure.props.groups : null;
|
|
32
|
-
if (!confGroups) {
|
|
33
|
-
confGroups = [];
|
|
34
|
-
}
|
|
35
|
-
if (!groupValue || groupValue.length === 0) {
|
|
36
|
-
groupValue = [];
|
|
37
|
-
for (const g of confGroups) {
|
|
38
|
-
groupValue.push(g.group);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const groupMap = {};
|
|
42
|
-
const groupFields = [];
|
|
43
|
-
const realGroupFilds = [];
|
|
44
|
-
for (const g of confGroups) {
|
|
45
|
-
groupMap[g.group] = g.target;
|
|
46
|
-
if (g.target && !groupFields.includes(g.target)) {
|
|
47
|
-
groupFields.push(g.target);
|
|
48
|
-
if (groupValue.includes(g.group)) {
|
|
49
|
-
realGroupFilds.push(g.target);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
let mulGroupShow = configure.props ? configure.props.mulGroupShow : "";
|
|
54
|
-
mulGroupShow = mulGroupShow == "break" ? "\r\n" : " ";
|
|
55
|
-
for (const d of datas) {
|
|
56
|
-
if (!d) {
|
|
20
|
+
const F = {}, D = [], S = [];
|
|
21
|
+
for (const e2 of v)
|
|
22
|
+
F[e2.group] = e2.target, e2.target && !D.includes(e2.target) && (D.push(e2.target), h.includes(e2.group) && S.push(e2.target));
|
|
23
|
+
let x = d.props ? d.props.mulGroupShow : "";
|
|
24
|
+
x = "break" == x ? "\r\n" : " ";
|
|
25
|
+
for (const i2 of g) {
|
|
26
|
+
if (!i2)
|
|
57
27
|
continue;
|
|
28
|
+
const t2 = [];
|
|
29
|
+
for (const s3 of h) {
|
|
30
|
+
const o2 = F[s3], a2 = e(i2, o2, void 0);
|
|
31
|
+
a2 && t2.push(a2);
|
|
58
32
|
}
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const fieldName = groupMap[g];
|
|
62
|
-
const value = getValueFromSource(d, fieldName, void 0);
|
|
63
|
-
if (value) {
|
|
64
|
-
xValues2.push(value);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
const xValue = xValues2.join(mulGroupShow);
|
|
68
|
-
d[CommonName.X_FIELD_NAME] = xValue;
|
|
33
|
+
const s2 = t2.join(x);
|
|
34
|
+
i2[o.X_FIELD_NAME] = s2;
|
|
69
35
|
}
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
36
|
+
const N = d.items ? d.items : [], E = [], A = {}, _ = [], b = {}, C = [], I = [], X = [], w = a(N, g, X);
|
|
37
|
+
for (const e2 of X)
|
|
38
|
+
C.push(e2);
|
|
39
|
+
for (const e2 of N) {
|
|
40
|
+
const i2 = e2.props ? e2.props : {}, t2 = i2.yaxisSource, s2 = i2.yaxisField, o2 = i2.isCumulative;
|
|
41
|
+
let a2 = null;
|
|
42
|
+
if (!s2 || t2 && "variable" != t2)
|
|
43
|
+
if ("formula" == t2) {
|
|
44
|
+
let t3 = i2.formula ? i2.formula : "";
|
|
45
|
+
for (const e3 in w)
|
|
46
|
+
t3 = t3.replace(new RegExp(e3.replace("$", "\\$"), "g"), w[e3]);
|
|
47
|
+
a2 = { uuid: e2.uuid, type: "formula", formula: t3, data: [], dynamicDatas: [] };
|
|
48
|
+
} else
|
|
49
|
+
a2 = { uuid: e2.uuid, type: "fixed", field: i2.yaxisFix, data: [], dynamicDatas: [] };
|
|
50
|
+
else
|
|
51
|
+
a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !C.includes(s2) && (C.push(s2), I.push(s2)), o2 && !X.includes(s2) && X.push(s2);
|
|
52
|
+
null != a2 && (E.push(a2), A[e2.uuid] = a2), i2.dynamicSeriesField && !_.includes(i2.dynamicSeriesField) && a2 && (a2.dynamicField = i2.dynamicSeriesField, a2.dynamicSeriesTitle = i2.dynamicSeriesTitle, a2.dynamicShowStack = i2.dynamicShowStack, _.push(i2.dynamicSeriesField), b[i2.dynamicSeriesField] = s2);
|
|
81
53
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
dynamicDatas: []
|
|
96
|
-
//动态系列数据
|
|
97
|
-
};
|
|
98
|
-
if (yaxisField && !allValueFields.includes(yaxisField)) {
|
|
99
|
-
allValueFields.push(yaxisField);
|
|
100
|
-
limitValueFields.push(yaxisField);
|
|
101
|
-
}
|
|
102
|
-
if (isCumulative && !accumulateFields.includes(yaxisField)) {
|
|
103
|
-
accumulateFields.push(yaxisField);
|
|
104
|
-
}
|
|
105
|
-
} else if (sourceType == "formula") {
|
|
106
|
-
let formula = itemProps.formula ? itemProps.formula : "";
|
|
107
|
-
for (const paramName in totalValueMap) {
|
|
108
|
-
formula = formula.replace(
|
|
109
|
-
new RegExp(paramName.replace("$", "\\$"), "g"),
|
|
110
|
-
totalValueMap[paramName]
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
serieValue = {
|
|
114
|
-
uuid: item.uuid,
|
|
115
|
-
type: "formula",
|
|
116
|
-
formula,
|
|
117
|
-
data: [],
|
|
118
|
-
dynamicDatas: []
|
|
119
|
-
//动态系列数据
|
|
120
|
-
};
|
|
121
|
-
} else {
|
|
122
|
-
serieValue = {
|
|
123
|
-
uuid: item.uuid,
|
|
124
|
-
type: "fixed",
|
|
125
|
-
field: itemProps.yaxisFix,
|
|
126
|
-
data: [],
|
|
127
|
-
dynamicDatas: []
|
|
128
|
-
//动态系列数据
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
if (serieValue != null) {
|
|
132
|
-
serieValues.push(serieValue);
|
|
133
|
-
serieValueMap[item.uuid] = serieValue;
|
|
134
|
-
}
|
|
135
|
-
if (itemProps.dynamicSeriesField && !dynamicFileds.includes(itemProps.dynamicSeriesField) && serieValue) {
|
|
136
|
-
serieValue.dynamicField = itemProps.dynamicSeriesField;
|
|
137
|
-
serieValue.dynamicSeriesTitle = itemProps.dynamicSeriesTitle;
|
|
138
|
-
serieValue.dynamicShowStack = itemProps.dynamicShowStack;
|
|
139
|
-
dynamicFileds.push(itemProps.dynamicSeriesField);
|
|
140
|
-
dynamicValueField[itemProps.dynamicSeriesField] = yaxisField;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
const dynamicLabelMap = {};
|
|
144
|
-
if (dynamicFileds.length > 0) {
|
|
145
|
-
const newDatas = [];
|
|
146
|
-
const dataMap = {};
|
|
147
|
-
for (const d of datas) {
|
|
148
|
-
if (!d) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
for (const valueField of allValueFields) {
|
|
152
|
-
const groupValue2 = d[CommonName.X_FIELD_NAME];
|
|
153
|
-
let newData = dataMap[groupValue2];
|
|
154
|
-
if (!newData) {
|
|
155
|
-
newData = {};
|
|
156
|
-
for (const gField of groupFields) {
|
|
157
|
-
newData[gField] = d[gField];
|
|
54
|
+
const L = {};
|
|
55
|
+
if (_.length > 0) {
|
|
56
|
+
const i2 = [], t2 = {};
|
|
57
|
+
for (const s2 of g)
|
|
58
|
+
if (s2)
|
|
59
|
+
for (const a2 of C) {
|
|
60
|
+
const l2 = s2[o.X_FIELD_NAME];
|
|
61
|
+
let n2 = t2[l2];
|
|
62
|
+
if (!n2) {
|
|
63
|
+
n2 = {};
|
|
64
|
+
for (const e2 of D)
|
|
65
|
+
n2[e2] = s2[e2];
|
|
66
|
+
n2[o.X_FIELD_NAME] = s2[o.X_FIELD_NAME], t2[l2] = n2, i2.push(n2);
|
|
158
67
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
let newValue = getValueFromSource(d, valueField, void 0);
|
|
164
|
-
if (!isNaN(newValue)) {
|
|
165
|
-
const hisValue = newData[valueField];
|
|
166
|
-
if (!isNaN) {
|
|
167
|
-
newValue += hisValue;
|
|
68
|
+
let u2 = e(s2, a2, void 0);
|
|
69
|
+
if (!isNaN(u2)) {
|
|
70
|
+
const e2 = n2[a2];
|
|
71
|
+
isNaN || (u2 += e2), n2[a2] = u2;
|
|
168
72
|
}
|
|
169
|
-
newData[valueField] = newValue;
|
|
170
73
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
for (const d of datas) {
|
|
176
|
-
if (!d) {
|
|
74
|
+
for (const i3 of _) {
|
|
75
|
+
const s2 = [];
|
|
76
|
+
for (const a2 of g) {
|
|
77
|
+
if (!a2)
|
|
177
78
|
continue;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const newData = dataMap[groupValue2];
|
|
181
|
-
if (!newData) {
|
|
79
|
+
const l2 = t2[a2[o.X_FIELD_NAME]];
|
|
80
|
+
if (!l2)
|
|
182
81
|
continue;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
const valueField = dynamicValueField[dynamicField];
|
|
192
|
-
if (valueField !== void 0) {
|
|
193
|
-
const newValue = getValueFromSource(d, valueField, void 0);
|
|
194
|
-
let hisValue = newData[dynamicLabel];
|
|
195
|
-
if (hisValue === void 0) {
|
|
196
|
-
hisValue = newValue;
|
|
197
|
-
} else if (!isNaN(newValue)) {
|
|
198
|
-
hisValue += newValue;
|
|
199
|
-
}
|
|
200
|
-
newData[dynamicLabel] = hisValue;
|
|
82
|
+
let n2 = e(a2, i3, void 0);
|
|
83
|
+
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2), I.push(n2), X.push(n2));
|
|
84
|
+
const u2 = b[i3];
|
|
85
|
+
if (void 0 !== u2) {
|
|
86
|
+
const i4 = e(a2, u2, void 0);
|
|
87
|
+
let t3 = l2[n2];
|
|
88
|
+
void 0 === t3 ? t3 = i4 : isNaN(i4) || (t3 += i4), l2[n2] = t3;
|
|
201
89
|
}
|
|
202
90
|
}
|
|
203
|
-
|
|
91
|
+
L[i3] = s2;
|
|
204
92
|
}
|
|
205
|
-
|
|
93
|
+
g = i2;
|
|
206
94
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
for (const cumulativeField of accumulateFields) {
|
|
216
|
-
const value = getValueFromSource(data, cumulativeField, void 0);
|
|
217
|
-
let hisValue = cumulativeMap[cumulativeField];
|
|
218
|
-
if (value !== void 0 && !isNaN(value)) {
|
|
219
|
-
if (hisValue === void 0) {
|
|
220
|
-
hisValue = value;
|
|
221
|
-
} else {
|
|
222
|
-
hisValue = hisValue + value;
|
|
223
|
-
}
|
|
95
|
+
l(c2, d, g), g = n(c2, d, g, D, I);
|
|
96
|
+
const M = [], j = {};
|
|
97
|
+
for (const i2 of g)
|
|
98
|
+
if (i2) {
|
|
99
|
+
for (const t2 of X) {
|
|
100
|
+
const s2 = e(i2, t2, void 0);
|
|
101
|
+
let o2 = j[t2];
|
|
102
|
+
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), j[t2] = o2;
|
|
224
103
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
104
|
+
M.push(i2[o.X_FIELD_NAME]);
|
|
105
|
+
for (const t2 of E) {
|
|
106
|
+
let s2 = t2.data;
|
|
107
|
+
const o2 = t2.dynamicDatas;
|
|
108
|
+
if (t2.dynamicField) {
|
|
109
|
+
let a2 = L[t2.dynamicField];
|
|
110
|
+
a2 = a2 || [];
|
|
111
|
+
for (let l2 = 0; l2 < a2.length; l2++) {
|
|
112
|
+
l2 >= o2.length && o2.push([]), s2 = o2[l2];
|
|
113
|
+
const n2 = a2[l2];
|
|
114
|
+
let u2 = e(i2, n2, void 0);
|
|
115
|
+
t2.isCumulative && (u2 = j[n2]), s2.push(u2);
|
|
237
116
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
} else if (item.type === "variable") {
|
|
249
|
-
let value = getValueFromSource(data, item.field, void 0);
|
|
250
|
-
if (item.isCumulative) {
|
|
251
|
-
value = cumulativeMap[item.field];
|
|
252
|
-
}
|
|
253
|
-
serieData.push(value);
|
|
254
|
-
} else if (item.type === "formula") {
|
|
255
|
-
const value = executeChartFormula(item.formula, cumulativeMap, data, pageContext);
|
|
256
|
-
serieData.push(value);
|
|
257
|
-
} else {
|
|
258
|
-
serieData.push(void 0);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
const defaultSeries = configure.defaultSeries;
|
|
263
|
-
const tempSeries = deepCopy(defaultSeries == null ? [] : defaultSeries);
|
|
264
|
-
const newSeries = [];
|
|
265
|
-
for (const serie of tempSeries) {
|
|
266
|
-
const serieValue = serieValueMap[serie.uuid];
|
|
267
|
-
if (serieValue.dynamicField) {
|
|
268
|
-
let dynamicLabels = dynamicLabelMap[serieValue.dynamicField];
|
|
269
|
-
dynamicLabels = dynamicLabels ? dynamicLabels : [];
|
|
270
|
-
const dynamicDatas = serieValue.dynamicDatas ? serieValue.dynamicDatas : [];
|
|
271
|
-
for (let i = 0; i < dynamicLabels.length; i++) {
|
|
272
|
-
const label = dynamicLabels[i];
|
|
273
|
-
const newSerie = deepCopy(serie);
|
|
274
|
-
if (serieValue.dynamicSeriesTitle) {
|
|
275
|
-
const dynamicSeriesTitle = serieValue.dynamicSeriesTitle.replace("${name}", label);
|
|
276
|
-
newSerie.name = formatVariableValue(pageContext, dynamicSeriesTitle);
|
|
277
|
-
} else {
|
|
278
|
-
newSerie.name = label;
|
|
279
|
-
}
|
|
280
|
-
newSerie.data = i < dynamicDatas.length ? dynamicDatas[i] : [];
|
|
281
|
-
if (serie.type == "bar" && serieValue.dynamicShowStack) {
|
|
282
|
-
newSerie.stack = serie.uuid;
|
|
283
|
-
}
|
|
284
|
-
newSeries.push(newSerie);
|
|
117
|
+
} else if ("fixed" === t2.type)
|
|
118
|
+
s2.push(t2.field);
|
|
119
|
+
else if ("variable" === t2.type) {
|
|
120
|
+
let o3 = e(i2, t2.field, void 0);
|
|
121
|
+
t2.isCumulative && (o3 = j[t2.field]), s2.push(o3);
|
|
122
|
+
} else if ("formula" === t2.type) {
|
|
123
|
+
const e2 = u(t2.formula, j, i2, c2);
|
|
124
|
+
s2.push(e2);
|
|
125
|
+
} else
|
|
126
|
+
s2.push(void 0);
|
|
285
127
|
}
|
|
286
|
-
} else {
|
|
287
|
-
serie.data = serieValue ? serieValue.data : [];
|
|
288
|
-
newSeries.push(serie);
|
|
289
128
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
129
|
+
const k = d.defaultSeries, T = s(null == k ? [] : k), V = [];
|
|
130
|
+
for (const e2 of T) {
|
|
131
|
+
const t2 = A[e2.uuid];
|
|
132
|
+
if (t2.dynamicField) {
|
|
133
|
+
let o2 = L[t2.dynamicField];
|
|
134
|
+
o2 = o2 || [];
|
|
135
|
+
const a2 = t2.dynamicDatas ? t2.dynamicDatas : [];
|
|
136
|
+
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
137
|
+
const n2 = o2[l2], u2 = s(e2);
|
|
138
|
+
if (t2.dynamicSeriesTitle) {
|
|
139
|
+
const e3 = t2.dynamicSeriesTitle.replace("${name}", n2);
|
|
140
|
+
u2.name = i(c2, e3);
|
|
141
|
+
} else
|
|
142
|
+
u2.name = n2;
|
|
143
|
+
u2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && t2.dynamicShowStack && (u2.stack = e2.uuid), V.push(u2);
|
|
298
144
|
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
chartOption.yAxis = defaultYaxis;
|
|
302
|
-
} else {
|
|
303
|
-
if (defaultXaxis && defaultXaxis.length > 0) {
|
|
304
|
-
defaultXaxis[0].data = xValues;
|
|
305
|
-
}
|
|
306
|
-
chartOption.xAxis = defaultXaxis;
|
|
307
|
-
chartOption.yAxis = defaultYaxis;
|
|
308
|
-
}
|
|
309
|
-
const selGroupVariable = configure.props ? configure.props.selGroupVariable : null;
|
|
310
|
-
const enableDrill = configure.props ? configure.props.enableDrill : null;
|
|
311
|
-
if (!enableDrill && selGroupVariable) {
|
|
312
|
-
configure.highlightInfos = [];
|
|
313
|
-
setValueForVariableName(pageContext.entity, selGroupVariable, null);
|
|
145
|
+
} else
|
|
146
|
+
e2.data = t2 ? t2.data : [], V.push(e2);
|
|
314
147
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
148
|
+
f.series = V;
|
|
149
|
+
const $ = d.defaultXaxis, G = d.defaultYaxis;
|
|
150
|
+
if (f.isBar) {
|
|
151
|
+
if (G)
|
|
152
|
+
for (const e2 of G)
|
|
153
|
+
e2.data = M;
|
|
154
|
+
f.xAxis = $, f.yAxis = G;
|
|
155
|
+
} else
|
|
156
|
+
$ && $.length > 0 && ($[0].data = M), f.xAxis = $, f.yAxis = G;
|
|
157
|
+
const R = d.props ? d.props.selGroupVariable : null;
|
|
158
|
+
!(d.props ? d.props.enableDrill : null) && R && (d.highlightInfos = [], t(c2.entity, R, null)), r(c2, d, "afterUpdateChart", f, { resultData: p }), d.groupFields = S, d.cacheDatas = g, d.rawResult = p;
|
|
321
159
|
}
|
|
322
160
|
export {
|
|
323
|
-
updateChartOption
|
|
161
|
+
c as updateChartOption
|
|
324
162
|
};
|
|
@@ -1,74 +1,37 @@
|
|
|
1
|
-
import { formatVariableValue, getValueFromSource } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy } from "../common-util.js";
|
|
3
|
-
function
|
|
4
|
-
if (!
|
|
1
|
+
import { formatVariableValue as e, getValueFromSource as o } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as t } from "../common-util.js";
|
|
3
|
+
function s(s2, l, r, i) {
|
|
4
|
+
if (!i || !i.result)
|
|
5
5
|
return;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} else {
|
|
13
|
-
if (result) {
|
|
14
|
-
datas = [result];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
if (!datas) {
|
|
18
|
-
datas = [];
|
|
19
|
-
}
|
|
20
|
-
const nameSource = configure.props ? configure.props.nameSource : void 0;
|
|
21
|
-
const nameField = configure.props ? configure.props.nameField : void 0;
|
|
22
|
-
const nameFixed = configure.props ? configure.props.nameFixed : void 0;
|
|
23
|
-
const valueField = configure.props ? configure.props.yaxisField : void 0;
|
|
24
|
-
const groupFields = [nameField];
|
|
25
|
-
const xValues = [];
|
|
26
|
-
const yValues = [];
|
|
27
|
-
for (let d of datas) {
|
|
28
|
-
if (!d) {
|
|
6
|
+
const p = i && i.result ? i.result : {}, n = l.serviceDataField;
|
|
7
|
+
let a = null;
|
|
8
|
+
n ? a = p[n] : p && (a = [p]), a || (a = []);
|
|
9
|
+
const u = l.props ? l.props.nameSource : void 0, c = l.props ? l.props.nameField : void 0, d = l.props ? l.props.nameFixed : void 0, m = l.props ? l.props.yaxisField : void 0, f = [c], h = [], v = [];
|
|
10
|
+
for (let t2 of a) {
|
|
11
|
+
if (!t2)
|
|
29
12
|
continue;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else {
|
|
35
|
-
xValue = getValueFromSource(d, nameField, void 0);
|
|
36
|
-
}
|
|
37
|
-
xValues.push(xValue);
|
|
38
|
-
const yValue = getValueFromSource(d, valueField, void 0);
|
|
39
|
-
yValues.push(yValue);
|
|
13
|
+
let l2 = null;
|
|
14
|
+
l2 = "fixed" == u ? e(s2, d) : o(t2, c, void 0), h.push(l2);
|
|
15
|
+
const r2 = o(t2, m, void 0);
|
|
16
|
+
v.push(r2);
|
|
40
17
|
}
|
|
41
|
-
const
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
for (let
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (index < allColors.length || colorMap[data.name]) {
|
|
53
|
-
let color = colorMap[data.name];
|
|
54
|
-
if (!color) {
|
|
55
|
-
color = allColors[index];
|
|
56
|
-
}
|
|
57
|
-
if (color) {
|
|
58
|
-
data.itemStyle = {
|
|
59
|
-
color
|
|
60
|
-
};
|
|
61
|
-
}
|
|
18
|
+
const g = l.defaultSeries;
|
|
19
|
+
let F = g[0].pieColors;
|
|
20
|
+
F = F || [];
|
|
21
|
+
let x = g[0].pieColorMap;
|
|
22
|
+
x = x || {};
|
|
23
|
+
const S = [];
|
|
24
|
+
for (let e2 = 0; e2 < h.length && e2 < v.length; e2++) {
|
|
25
|
+
const o2 = { value: v[e2], name: h[e2] };
|
|
26
|
+
if (e2 < F.length || x[o2.name]) {
|
|
27
|
+
let t2 = x[o2.name];
|
|
28
|
+
t2 || (t2 = F[e2]), t2 && (o2.itemStyle = { color: t2 });
|
|
62
29
|
}
|
|
63
|
-
|
|
30
|
+
S.push(o2);
|
|
64
31
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
chartOption.series = [tempSeries[0]];
|
|
68
|
-
configure.groupFields = groupFields;
|
|
69
|
-
configure.cacheDatas = datas;
|
|
70
|
-
configure.rawResult = resultData;
|
|
32
|
+
const j = t(g);
|
|
33
|
+
j[0].data = S, r.series = [j[0]], l.groupFields = f, l.cacheDatas = a, l.rawResult = i;
|
|
71
34
|
}
|
|
72
35
|
export {
|
|
73
|
-
updateChartOption
|
|
36
|
+
s as updateChartOption
|
|
74
37
|
};
|