super-page-runtime 2.2.29-tmp2 → 2.2.32
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 +5 -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 +135 -443
- package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
- package/dist/es/components/runtime/utils/barcode-util.js +9 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
- package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
- package/dist/es/components/runtime/utils/common-util.js +76 -156
- package/dist/es/components/runtime/utils/eventBus.js +3 -8
- package/dist/es/components/runtime/utils/events/event-util.js +362 -775
- package/dist/es/components/runtime/utils/events/print-label.js +72 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
- package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
- package/dist/es/components/runtime/utils/global-refs.js +53 -84
- package/dist/es/components/runtime/utils/i18n-util.js +11 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
- package/dist/es/components/runtime/utils/page-init-util.js +141 -406
- package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
- package/dist/es/components/runtime/utils/page-store.js +23 -68
- 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.d.ts +4 -0
- package/dist/es/components/runtime/utils/table-utils.js +40 -81
- package/dist/es/components/runtime/utils/tree-utils.js +17 -37
- 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 +21 -83
- 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 +36 -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 +50 -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 +52 -203
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +46 -162
- 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 -109
- 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 -166
- 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 -117
- 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 -118
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
- 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 +29 -160
- 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 +212 -594
- 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 +21 -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 +317 -810
- 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 +262 -635
- 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 +40 -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 +42 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -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 +52 -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 +68 -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 +31 -109
- 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 +21 -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 +56 -188
- 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 +57 -245
- 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 +32 -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 +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- 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 +64 -194
- 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 +88 -249
- 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 +80 -263
- 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 +40 -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/home-chart-render.vue.js +89 -188
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -272
- 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 +18 -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 +21 -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 +20 -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/home-chart.vue.js +41 -160
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +226 -754
- 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 +2 -2
|
@@ -1,164 +1,80 @@
|
|
|
1
|
-
import { getValueFromSource, setValueForVariableName } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy } from "../common-util.js";
|
|
3
|
-
import { CommonName, caculateFormulaValue, executeChartFormula, sortDatas, limitDatas } from "./chart-util.js";
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
1
|
+
import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as r } from "../common-util.js";
|
|
3
|
+
import { CommonName as s, caculateFormulaValue as e, executeChartFormula as l, sortDatas as n, limitDatas as p } from "./chart-util.js";
|
|
4
|
+
function i(i2, u, c, a) {
|
|
5
|
+
if (!a || !a.result) return;
|
|
6
|
+
const f = a && a.result ? a.result : {};
|
|
7
|
+
let g = a && a.groupValue ? a.groupValue : void 0;
|
|
8
|
+
const m = u.serviceDataField;
|
|
9
|
+
let h = null;
|
|
10
|
+
m ? h = f[m] : f && (h = Array.isArray(f) ? f : [f]), h || (h = []);
|
|
11
|
+
let d = u.props ? u.props.groups : null;
|
|
12
|
+
if (d || (d = []), !g || 0 === g.length) {
|
|
13
|
+
g = [];
|
|
14
|
+
for (const o2 of d) g.push(o2.group);
|
|
7
15
|
}
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} else {
|
|
19
|
-
datas = [result];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (!datas) {
|
|
24
|
-
datas = [];
|
|
25
|
-
}
|
|
26
|
-
let confGroups = configure.props ? configure.props.groups : null;
|
|
27
|
-
if (!confGroups) {
|
|
28
|
-
confGroups = [];
|
|
29
|
-
}
|
|
30
|
-
if (!groupValue || groupValue.length === 0) {
|
|
31
|
-
groupValue = [];
|
|
32
|
-
for (const g of confGroups) {
|
|
33
|
-
groupValue.push(g.group);
|
|
16
|
+
const y = {}, x = [], v = [];
|
|
17
|
+
for (const o2 of d) y[o2.group] = o2.target, o2.target && !x.includes(o2.target) && (x.push(o2.target), g.includes(o2.group) && v.push(o2.target));
|
|
18
|
+
let E = u.props ? u.props.mulGroupShow : "";
|
|
19
|
+
E = "break" == E ? "\r\n" : " ";
|
|
20
|
+
for (const t2 of h) {
|
|
21
|
+
if (!t2) continue;
|
|
22
|
+
const r2 = [];
|
|
23
|
+
for (const s2 of g) {
|
|
24
|
+
const e3 = y[s2], l2 = o(t2, e3, void 0);
|
|
25
|
+
l2 && r2.push(l2);
|
|
34
26
|
}
|
|
27
|
+
const e2 = r2.join(E);
|
|
28
|
+
t2[s.X_FIELD_NAME] = e2;
|
|
35
29
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
const F = u.items ? u.items : [];
|
|
31
|
+
if (0 == F.length) return;
|
|
32
|
+
const S = u.props ? u.props : {};
|
|
33
|
+
let _ = S.yaxisField;
|
|
34
|
+
if (F[0].props.yaxisField = _, F[0].props.yaxisSource = S.yaxisSource, F[0].props.formula = S.formula, "formula" === S.yaxisSource) {
|
|
35
|
+
const t2 = [], r2 = e(F, h, t2);
|
|
36
|
+
let n2 = S.formula ? S.formula : "";
|
|
37
|
+
for (const o2 in r2) n2 = n2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
|
|
38
|
+
_ = s.Y_TEMP_NAME;
|
|
39
|
+
const p2 = {};
|
|
40
|
+
for (const r3 of h) {
|
|
41
|
+
if (!r3) continue;
|
|
42
|
+
for (const s3 of t2) {
|
|
43
|
+
const t3 = o(r3, s3, void 0);
|
|
44
|
+
let e2 = p2[s3];
|
|
45
|
+
void 0 === t3 || isNaN(t3) || (void 0 === e2 ? e2 = t3 : e2 += t3), p2[s3] = e2;
|
|
45
46
|
}
|
|
47
|
+
const s2 = l(n2, p2, r3, i2);
|
|
48
|
+
r3[_] = s2;
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const xValues2 = [];
|
|
56
|
-
for (const g of groupValue) {
|
|
57
|
-
const fieldName = groupMap[g];
|
|
58
|
-
const value = getValueFromSource(d, fieldName, void 0);
|
|
59
|
-
if (value) {
|
|
60
|
-
xValues2.push(value);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const xValue = xValues2.join(mulGroupShow);
|
|
64
|
-
d[CommonName.X_FIELD_NAME] = xValue;
|
|
51
|
+
F[0].props.yaxisField = _, F[0].props.yaxisSource = "", n(i2, u, h), h = p(i2, u, h, x, [_]);
|
|
52
|
+
const A = [], D = [];
|
|
53
|
+
for (const t2 of h) {
|
|
54
|
+
if (!t2) continue;
|
|
55
|
+
A.push(t2[s.X_FIELD_NAME]);
|
|
56
|
+
const r2 = o(t2, _, void 0);
|
|
57
|
+
D.push(r2);
|
|
65
58
|
}
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (confProps.yaxisSource === "formula") {
|
|
78
|
-
const accumulateFields = [];
|
|
79
|
-
const totalValueMap = caculateFormulaValue(itemConfs, datas, accumulateFields);
|
|
80
|
-
let formula = confProps.formula ? confProps.formula : "";
|
|
81
|
-
for (const paramName in totalValueMap) {
|
|
82
|
-
formula = formula.replace(
|
|
83
|
-
new RegExp(paramName.replace("$", "\\$"), "g"),
|
|
84
|
-
totalValueMap[paramName]
|
|
85
|
-
);
|
|
59
|
+
const M = u.defaultSeries;
|
|
60
|
+
let N = M[0].pieColors;
|
|
61
|
+
N = N || [];
|
|
62
|
+
let j = M[0].pieColorMap;
|
|
63
|
+
j = j || {};
|
|
64
|
+
const b = [];
|
|
65
|
+
for (let o2 = 0; o2 < A.length && o2 < D.length; o2++) {
|
|
66
|
+
const t2 = { value: D[o2], name: A[o2] };
|
|
67
|
+
if (o2 < N.length || j[t2.name]) {
|
|
68
|
+
let r2 = j[t2.name];
|
|
69
|
+
r2 || (r2 = N[o2]), r2 && (t2.itemStyle = { color: r2 });
|
|
86
70
|
}
|
|
87
|
-
|
|
88
|
-
const cumulativeMap = {};
|
|
89
|
-
for (const data of datas) {
|
|
90
|
-
if (!data) {
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
for (const cumulativeField of accumulateFields) {
|
|
94
|
-
const value2 = getValueFromSource(data, cumulativeField, void 0);
|
|
95
|
-
let hisValue = cumulativeMap[cumulativeField];
|
|
96
|
-
if (value2 !== void 0 && !isNaN(value2)) {
|
|
97
|
-
if (hisValue === void 0) {
|
|
98
|
-
hisValue = value2;
|
|
99
|
-
} else {
|
|
100
|
-
hisValue = hisValue + value2;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
cumulativeMap[cumulativeField] = hisValue;
|
|
104
|
-
}
|
|
105
|
-
console.log("formula", formula);
|
|
106
|
-
const value = executeChartFormula(formula, cumulativeMap, data, pageContext);
|
|
107
|
-
console.log("formula-result", value);
|
|
108
|
-
data[valueField] = value;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
itemConfs[0].props.yaxisField = valueField;
|
|
112
|
-
itemConfs[0].props.yaxisSource = "";
|
|
113
|
-
sortDatas(pageContext, configure, datas);
|
|
114
|
-
datas = limitDatas(pageContext, configure, datas, groupFields, [valueField]);
|
|
115
|
-
const xValues = [];
|
|
116
|
-
const yValues = [];
|
|
117
|
-
for (const data of datas) {
|
|
118
|
-
if (!data) {
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
xValues.push(data[CommonName.X_FIELD_NAME]);
|
|
122
|
-
const value = getValueFromSource(data, valueField, void 0);
|
|
123
|
-
yValues.push(value);
|
|
124
|
-
}
|
|
125
|
-
const defaultSeries = configure.defaultSeries;
|
|
126
|
-
let pieColors = defaultSeries[0].pieColors;
|
|
127
|
-
pieColors = pieColors ? pieColors : [];
|
|
128
|
-
let pieColorMap = defaultSeries[0].pieColorMap;
|
|
129
|
-
pieColorMap = pieColorMap ? pieColorMap : {};
|
|
130
|
-
const pieDatas = [];
|
|
131
|
-
for (let index = 0; index < xValues.length && index < yValues.length; index++) {
|
|
132
|
-
const data = {
|
|
133
|
-
value: yValues[index],
|
|
134
|
-
name: xValues[index]
|
|
135
|
-
};
|
|
136
|
-
if (index < pieColors.length || pieColorMap[data.name]) {
|
|
137
|
-
let color = pieColorMap[data.name];
|
|
138
|
-
if (!color) {
|
|
139
|
-
color = pieColors[index];
|
|
140
|
-
}
|
|
141
|
-
if (color) {
|
|
142
|
-
data.itemStyle = {
|
|
143
|
-
color
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
pieDatas.push(data);
|
|
148
|
-
}
|
|
149
|
-
const tempSeries = deepCopy(defaultSeries);
|
|
150
|
-
tempSeries[0].data = pieDatas;
|
|
151
|
-
chartOption.series = [tempSeries[0]];
|
|
152
|
-
const selGroupVariable = configure.props ? configure.props.selGroupVariable : null;
|
|
153
|
-
const enableDrill = configure.props ? configure.props.enableDrill : null;
|
|
154
|
-
if (!enableDrill && selGroupVariable) {
|
|
155
|
-
configure.highlightInfos = [];
|
|
156
|
-
setValueForVariableName(pageContext.entity, selGroupVariable, null);
|
|
71
|
+
b.push(t2);
|
|
157
72
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
73
|
+
const w = r(M);
|
|
74
|
+
w[0].data = b, c.series = [w[0]];
|
|
75
|
+
const I = u.props ? u.props.selGroupVariable : null;
|
|
76
|
+
!(u.props ? u.props.enableDrill : null) && I && (u.highlightInfos = [], t(i2.entity, I, null)), u.groupFields = v, u.cacheDatas = h, u.rawResult = a;
|
|
161
77
|
}
|
|
162
78
|
export {
|
|
163
|
-
updateChartOption
|
|
79
|
+
i as updateChartOption
|
|
164
80
|
};
|
|
@@ -1,132 +1,54 @@
|
|
|
1
|
-
import { getValueFromSource } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy } from "../common-util.js";
|
|
3
|
-
import { caculateFormulaValue, executeChartFormula } from "./chart-util.js";
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
1
|
+
import { getValueFromSource as e } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as o } from "../common-util.js";
|
|
3
|
+
import { caculateFormulaValue as i, executeChartFormula as t } from "./chart-util.js";
|
|
4
|
+
function a(a2, s, r, l) {
|
|
5
|
+
if (!l || !l.result) return;
|
|
6
|
+
const u = l && l.result ? l.result : {}, f = s.serviceDataField;
|
|
7
|
+
let d = null;
|
|
8
|
+
f ? d = u[f] : u && (d = Array.isArray(u) ? u : [u]), d || (d = []);
|
|
9
|
+
const n = s.items ? s.items : [], c = [], p = {}, m = [], x = i(n, d, m);
|
|
10
|
+
for (const e2 of n) {
|
|
11
|
+
const o2 = e2.props ? e2.props : {}, i2 = o2.yaxisSource, t2 = o2.yaxisField;
|
|
12
|
+
let a3 = null;
|
|
13
|
+
if (!t2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
14
|
+
let i3 = o2.formula ? o2.formula : "";
|
|
15
|
+
for (const e3 in x) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), x[e3]);
|
|
16
|
+
a3 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
|
|
17
|
+
} else a3 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
|
|
18
|
+
else a3 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
|
|
19
|
+
a3 && (c.push(a3), p[a3.uuid] = a3);
|
|
7
20
|
}
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
datas = [result];
|
|
19
|
-
}
|
|
21
|
+
const v = s.props ? s.props : {}, y = v.nameField, h = v.maxSource, F = v.maxField, b = v.maxFixed, g = [], j = {};
|
|
22
|
+
for (const o2 of d) {
|
|
23
|
+
if (!o2) continue;
|
|
24
|
+
const i2 = e(o2, y, void 0);
|
|
25
|
+
let s2 = null;
|
|
26
|
+
s2 = h && "variable" != h ? b : e(o2, F, void 0), g.push({ text: i2, max: s2 });
|
|
27
|
+
for (const i3 of m) {
|
|
28
|
+
const t2 = e(o2, i3, void 0);
|
|
29
|
+
let a3 = j[i3];
|
|
30
|
+
void 0 === t2 || isNaN(t2) || (void 0 === a3 ? a3 = t2 : a3 += t2), j[i3] = a3;
|
|
20
31
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const itemProps = item.props ? item.props : {};
|
|
32
|
-
const sourceType = itemProps.yaxisSource;
|
|
33
|
-
const yaxisField = itemProps.yaxisField;
|
|
34
|
-
let dataConf = null;
|
|
35
|
-
if (yaxisField && (!sourceType || sourceType == "variable")) {
|
|
36
|
-
dataConf = {
|
|
37
|
-
uuid: item.uuid,
|
|
38
|
-
type: "variable",
|
|
39
|
-
field: yaxisField,
|
|
40
|
-
data: []
|
|
41
|
-
};
|
|
42
|
-
} else if (sourceType == "formula") {
|
|
43
|
-
let formula = itemProps.formula ? itemProps.formula : "";
|
|
44
|
-
for (const paramName in totalValueMap) {
|
|
45
|
-
formula = formula.replace(
|
|
46
|
-
new RegExp(paramName.replace("$", "\\$"), "g"),
|
|
47
|
-
totalValueMap[paramName]
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
dataConf = {
|
|
51
|
-
uuid: item.uuid,
|
|
52
|
-
type: "formula",
|
|
53
|
-
formula,
|
|
54
|
-
data: []
|
|
55
|
-
};
|
|
56
|
-
} else {
|
|
57
|
-
dataConf = {
|
|
58
|
-
uuid: item.uuid,
|
|
59
|
-
type: "fixed",
|
|
60
|
-
field: itemProps.yaxisFix,
|
|
61
|
-
data: []
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
if (dataConf) {
|
|
65
|
-
dataConfs.push(dataConf);
|
|
66
|
-
dataValueMap[dataConf.uuid] = dataConf;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
const confProps = configure.props ? configure.props : {};
|
|
70
|
-
const nameField = confProps.nameField;
|
|
71
|
-
const maxSource = confProps.maxSource;
|
|
72
|
-
const maxField = confProps.maxField;
|
|
73
|
-
const maxFixed = confProps.maxFixed;
|
|
74
|
-
const indicators = [];
|
|
75
|
-
const cumulativeMap = {};
|
|
76
|
-
for (const d of datas) {
|
|
77
|
-
if (!d) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const name = getValueFromSource(d, nameField, void 0);
|
|
81
|
-
let maxValue = null;
|
|
82
|
-
if (!maxSource || maxSource == "variable") {
|
|
83
|
-
maxValue = getValueFromSource(d, maxField, void 0);
|
|
84
|
-
} else {
|
|
85
|
-
maxValue = maxFixed;
|
|
86
|
-
}
|
|
87
|
-
indicators.push({
|
|
88
|
-
text: name,
|
|
89
|
-
max: maxValue
|
|
90
|
-
});
|
|
91
|
-
for (const cumulativeField of accumulateFields) {
|
|
92
|
-
const value = getValueFromSource(d, cumulativeField, void 0);
|
|
93
|
-
let hisValue = cumulativeMap[cumulativeField];
|
|
94
|
-
if (value !== void 0 && !isNaN(value)) {
|
|
95
|
-
if (hisValue === void 0) {
|
|
96
|
-
hisValue = value;
|
|
97
|
-
} else {
|
|
98
|
-
hisValue = hisValue + value;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
cumulativeMap[cumulativeField] = hisValue;
|
|
102
|
-
}
|
|
103
|
-
for (const item of dataConfs) {
|
|
104
|
-
const data = item.data;
|
|
105
|
-
if (item.type == "fixed") {
|
|
106
|
-
data.push(item.field);
|
|
107
|
-
} else if (item.type == "variable") {
|
|
108
|
-
const value = getValueFromSource(d, item.field, void 0);
|
|
109
|
-
data.push(value);
|
|
110
|
-
} else if (item.type == "formula") {
|
|
111
|
-
const value = executeChartFormula(item.formula, cumulativeMap, d, pageContext);
|
|
112
|
-
data.push(value);
|
|
113
|
-
} else {
|
|
114
|
-
data.push(void 0);
|
|
115
|
-
}
|
|
32
|
+
for (const i3 of c) {
|
|
33
|
+
const s3 = i3.data;
|
|
34
|
+
if ("fixed" == i3.type) s3.push(i3.field);
|
|
35
|
+
else if ("variable" == i3.type) {
|
|
36
|
+
const t2 = e(o2, i3.field, void 0);
|
|
37
|
+
s3.push(t2);
|
|
38
|
+
} else if ("formula" == i3.type) {
|
|
39
|
+
const e2 = t(i3.formula, j, o2, a2);
|
|
40
|
+
s3.push(e2);
|
|
41
|
+
} else s3.push(void 0);
|
|
116
42
|
}
|
|
117
43
|
}
|
|
118
|
-
|
|
119
|
-
const defaultSeries =
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const dataValue = dataValueMap[serieData.uuid];
|
|
124
|
-
serieData.value = dataValue.data;
|
|
44
|
+
r.radar[0].indicator = g;
|
|
45
|
+
const S = s.defaultSeries, w = o(S), A = w[0].data;
|
|
46
|
+
for (const e2 of A) {
|
|
47
|
+
const o2 = p[e2.uuid];
|
|
48
|
+
e2.value = o2.data;
|
|
125
49
|
}
|
|
126
|
-
|
|
127
|
-
configure.cacheDatas = datas;
|
|
128
|
-
configure.rawResult = resultData;
|
|
50
|
+
r.series = w, s.cacheDatas = d, s.rawResult = l;
|
|
129
51
|
}
|
|
130
52
|
export {
|
|
131
|
-
updateChartOption
|
|
53
|
+
a as updateChartOption
|
|
132
54
|
};
|
|
@@ -1,108 +1,45 @@
|
|
|
1
|
-
import { getValueFromSource } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy } from "../common-util.js";
|
|
3
|
-
import { caculateFormulaValue, executeChartFormula } from "./chart-util.js";
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
1
|
+
import { getValueFromSource as o } from "../page-helper-util.js";
|
|
2
|
+
import { deepCopy as s } from "../common-util.js";
|
|
3
|
+
import { caculateFormulaValue as i, executeChartFormula as e } from "./chart-util.js";
|
|
4
|
+
function r(r2, t, a, l) {
|
|
5
|
+
if (!l || !l.result) return;
|
|
6
|
+
const u = l && l.result ? l.result : {}, f = t.serviceDataField;
|
|
7
|
+
let c = null;
|
|
8
|
+
f ? c = u[f] : u && (c = Array.isArray(u) ? u : [u]), c || (c = []);
|
|
9
|
+
const d = t.items ? t.items : [], n = [], p = {};
|
|
10
|
+
for (const o2 of d) {
|
|
11
|
+
const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r3 = s2.sizeField, t2 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r3, symbolSize: i2.symbolSize, data: [] };
|
|
12
|
+
n.push(t2), p[t2.uuid] = t2;
|
|
7
13
|
}
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} else {
|
|
14
|
-
if (result) {
|
|
15
|
-
if (Array.isArray(result)) {
|
|
16
|
-
datas = result;
|
|
17
|
-
} else {
|
|
18
|
-
datas = [result];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (!datas) {
|
|
23
|
-
datas = [];
|
|
24
|
-
}
|
|
25
|
-
const itemConfs = configure.items ? configure.items : [];
|
|
26
|
-
const dataConfs = [];
|
|
27
|
-
const dataValueMap = {};
|
|
28
|
-
for (const item of itemConfs) {
|
|
29
|
-
const itemProps = item.props ? item.props : {};
|
|
30
|
-
const itemStyle = item.props ? item.style : {};
|
|
31
|
-
const xaxisField = itemProps.xaxisField;
|
|
32
|
-
const sizeField = itemProps.sizeField;
|
|
33
|
-
const dataConf = {
|
|
34
|
-
uuid: item.uuid,
|
|
35
|
-
xaxisField,
|
|
36
|
-
yaxisField: itemProps.yaxisField,
|
|
37
|
-
yaxisSource: itemProps.yaxisSource,
|
|
38
|
-
formula: itemProps.formula,
|
|
39
|
-
sizeField,
|
|
40
|
-
symbolSize: itemStyle.symbolSize,
|
|
41
|
-
data: []
|
|
42
|
-
};
|
|
43
|
-
dataConfs.push(dataConf);
|
|
44
|
-
dataValueMap[dataConf.uuid] = dataConf;
|
|
14
|
+
const m = [], x = i(d, c, m);
|
|
15
|
+
for (const o2 of n) if ("formula" === o2.yaxisSource) {
|
|
16
|
+
let s2 = o2.formula ? o2.formula : "";
|
|
17
|
+
for (const o3 in x) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), x[o3]);
|
|
18
|
+
o2.formula = s2;
|
|
45
19
|
}
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
formula = formula.replace(
|
|
53
|
-
new RegExp(paramName.replace("$", "\\$"), "g"),
|
|
54
|
-
totalValueMap[paramName]
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
dataConf.formula = formula;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const cumulativeMap = {};
|
|
61
|
-
for (const d of datas) {
|
|
62
|
-
if (!d) {
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
for (const cumulativeField of accumulateFields) {
|
|
66
|
-
const value = getValueFromSource(d, cumulativeField, void 0);
|
|
67
|
-
let hisValue = cumulativeMap[cumulativeField];
|
|
68
|
-
if (value !== void 0 && !isNaN(value)) {
|
|
69
|
-
if (hisValue === void 0) {
|
|
70
|
-
hisValue = value;
|
|
71
|
-
} else {
|
|
72
|
-
hisValue = hisValue + value;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
cumulativeMap[cumulativeField] = hisValue;
|
|
20
|
+
const y = {};
|
|
21
|
+
for (const s2 of c) if (s2) {
|
|
22
|
+
for (const i2 of m) {
|
|
23
|
+
const e2 = o(s2, i2, void 0);
|
|
24
|
+
let r3 = y[i2];
|
|
25
|
+
void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
|
|
76
26
|
}
|
|
77
|
-
for (const
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
} else {
|
|
85
|
-
values.push(getValueFromSource(d, item.yaxisField, void 0));
|
|
86
|
-
}
|
|
87
|
-
if (item.sizeField) {
|
|
88
|
-
values.push(getValueFromSource(d, item.xaxisField, void 0));
|
|
89
|
-
} else {
|
|
90
|
-
values.push(item.symbolSize);
|
|
91
|
-
}
|
|
92
|
-
data.push(values);
|
|
27
|
+
for (const i2 of n) {
|
|
28
|
+
const t2 = i2.data, a2 = [];
|
|
29
|
+
if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
|
|
30
|
+
const o2 = e(i2.formula, y, s2, r2);
|
|
31
|
+
a2.push(o2);
|
|
32
|
+
} else a2.push(o(s2, i2.yaxisField, void 0));
|
|
33
|
+
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
|
|
93
34
|
}
|
|
94
35
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const dataValue = dataValueMap[serie.uuid];
|
|
100
|
-
serie.data = dataValue.data;
|
|
36
|
+
const F = t.defaultSeries, h = s(F);
|
|
37
|
+
for (const o2 of h) {
|
|
38
|
+
const s2 = p[o2.uuid];
|
|
39
|
+
o2.data = s2.data;
|
|
101
40
|
}
|
|
102
|
-
|
|
103
|
-
configure.cacheDatas = datas;
|
|
104
|
-
configure.rawResult = resultData;
|
|
41
|
+
a.series = h, t.cacheDatas = c, t.rawResult = l;
|
|
105
42
|
}
|
|
106
43
|
export {
|
|
107
|
-
updateChartOption
|
|
44
|
+
r as updateChartOption
|
|
108
45
|
};
|