super-page-runtime 2.1.933 → 2.2.1
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/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
- package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
- 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.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
- package/dist/es/components/runtime/utils/common-util.js +76 -153
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +343 -727
- package/dist/es/components/runtime/utils/events/print-label.js +72 -140
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
- package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
- 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 +2 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +132 -370
- package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- 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 +45 -84
- 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 +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 +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 -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/common/common-homepage-search.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
- 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.d.ts +34 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
- 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 +37 -231
- 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 +197 -510
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
- 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.d.ts +6 -6
- 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.d.ts +6 -6
- 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 +302 -803
- 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 +249 -594
- 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.d.ts +4 -4
- 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 +66 -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 -104
- 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 +51 -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 +57 -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 +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 +61 -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 +87 -244
- 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 +77 -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 +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.d.ts +17 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
- 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.d.ts +23 -0
- package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
- package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
- package/dist/es/components/runtime/views/super-page.vue.js +222 -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/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +3 -2
|
@@ -1,532 +1,273 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const themeMap = {
|
|
12
|
-
theme1,
|
|
13
|
-
theme2,
|
|
14
|
-
theme3
|
|
15
|
-
};
|
|
16
|
-
function getCustomTheme(themeName) {
|
|
17
|
-
return themeMap[themeName];
|
|
1
|
+
import t from "../../../../assets/chart-themes/theme1.js";
|
|
2
|
+
import e from "../../../../assets/chart-themes/theme2.js";
|
|
3
|
+
import n from "../../../../assets/chart-themes/theme3.js";
|
|
4
|
+
import { getDefaultValue as i } from "../page-init-util.js";
|
|
5
|
+
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as l, getValueFromVariable as a, setVariableValue as c } from "../page-helper-util.js";
|
|
6
|
+
import { appendDefaultMethods as f } from "../events/event-util.js";
|
|
7
|
+
var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
|
|
8
|
+
const p = { theme1: t, theme2: e, theme3: n };
|
|
9
|
+
function d(t2) {
|
|
10
|
+
return p[t2];
|
|
18
11
|
}
|
|
19
|
-
function
|
|
20
|
-
return [
|
|
21
|
-
{
|
|
22
|
-
value: "theme1",
|
|
23
|
-
label: "主题1"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
value: "theme2",
|
|
27
|
-
label: "主题2"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
value: "theme3",
|
|
31
|
-
label: "主题3"
|
|
32
|
-
}
|
|
33
|
-
];
|
|
12
|
+
function h() {
|
|
13
|
+
return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
|
|
34
14
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
let
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (
|
|
42
|
-
|
|
15
|
+
function m(t2, e2, n2, i2, s2) {
|
|
16
|
+
return function(o2) {
|
|
17
|
+
let r2 = o2.value;
|
|
18
|
+
if (s2 && (r2 = o2), null == r2 || null == r2) return r2;
|
|
19
|
+
if (Array.isArray(r2)) return r2;
|
|
20
|
+
if (isNaN(r2) || !t2 || !t2.indexOf) return r2;
|
|
21
|
+
if (t2.indexOf("precision") > -1) {
|
|
22
|
+
let t3 = parseInt(e2);
|
|
23
|
+
(null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
|
|
43
24
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (isNaN(labelValue) || !labelNumFormat || !labelNumFormat.indexOf) {
|
|
49
|
-
return labelValue;
|
|
50
|
-
}
|
|
51
|
-
if (labelNumFormat.indexOf("precision") > -1) {
|
|
52
|
-
let precision = parseInt(numPrecision);
|
|
53
|
-
if (precision == null || isNaN(precision)) {
|
|
54
|
-
precision = 2;
|
|
55
|
-
}
|
|
56
|
-
labelValue = parseFloat(parseFloat(labelValue).toFixed(precision));
|
|
57
|
-
}
|
|
58
|
-
let prefix = "";
|
|
59
|
-
if (labelNumFormat.indexOf("prefix") > -1 && numPrefix) {
|
|
60
|
-
prefix = numPrefix;
|
|
61
|
-
}
|
|
62
|
-
let append = "";
|
|
63
|
-
if (labelNumFormat.indexOf("append") > -1 && numAppend) {
|
|
64
|
-
append = numAppend;
|
|
65
|
-
}
|
|
66
|
-
return prefix + labelValue.toLocaleString() + append;
|
|
25
|
+
let l2 = "";
|
|
26
|
+
t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
|
|
27
|
+
let a2 = "";
|
|
28
|
+
return t2.indexOf("append") > -1 && i2 && (a2 = i2), l2 + r2.toLocaleString() + a2;
|
|
67
29
|
};
|
|
68
|
-
return func;
|
|
69
30
|
}
|
|
70
|
-
function
|
|
71
|
-
if (!
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
if (s.labelFormatterArgs) {
|
|
90
|
-
if (!s.label) {
|
|
91
|
-
s.label = {};
|
|
92
|
-
}
|
|
93
|
-
s.label.formatter = getNumFormatter.apply(s, s.labelFormatterArgs);
|
|
94
|
-
}
|
|
95
|
-
if (!enableDrill && configure.clickSet && configure.clickSet.selected) {
|
|
96
|
-
if (s.emphasis) {
|
|
97
|
-
s.emphasis.disabled = false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (s.type === "pie" && configure.clickSet) {
|
|
101
|
-
if (configure.clickSet.selected) {
|
|
102
|
-
if (configure.clickSet.multiple) {
|
|
103
|
-
s.selectedMode = "multiple";
|
|
104
|
-
} else {
|
|
105
|
-
s.selectedMode = "single";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (chartOption.radar) {
|
|
112
|
-
for (const r of chartOption.radar) {
|
|
113
|
-
r.indicator = [];
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
const defaultSeries = chartOption.series;
|
|
117
|
-
configure.defaultSeries = defaultSeries;
|
|
118
|
-
const defaultXaxis = chartOption.xAxis;
|
|
119
|
-
if (defaultXaxis && defaultXaxis.length > 0 && defaultXaxis[0].data) {
|
|
120
|
-
defaultXaxis[0].data = [];
|
|
121
|
-
}
|
|
122
|
-
configure.defaultXaxis = defaultXaxis;
|
|
123
|
-
const defaultYaxis = chartOption.yAxis;
|
|
124
|
-
if (defaultYaxis) {
|
|
125
|
-
for (const yAxis of defaultYaxis) {
|
|
126
|
-
if (yAxis.data) {
|
|
127
|
-
yAxis.data = [];
|
|
128
|
-
}
|
|
129
|
-
if (yAxis._dataMin === "auto") {
|
|
130
|
-
yAxis.min = function(value) {
|
|
131
|
-
if (value.min) {
|
|
132
|
-
return Math.floor(value.min / 10) * 10;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
if (yAxis._dataMax === "auto") {
|
|
137
|
-
yAxis.max = function(value) {
|
|
138
|
-
if (value.max) {
|
|
139
|
-
return Math.ceil(value.max / 10) * 10;
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
configure.defaultYaxis = defaultYaxis;
|
|
31
|
+
function g(t2, e2) {
|
|
32
|
+
if (!e2) return;
|
|
33
|
+
if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = m.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
|
|
34
|
+
const n3 = t2.props ? t2.props.enableDrill : null;
|
|
35
|
+
for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = m.apply(i3, i3.labelFormatterArgs)), !n3 && t2.clickSet && t2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && t2.clickSet && t2.clickSet.selected && (t2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
|
|
36
|
+
}
|
|
37
|
+
if (e2.radar) for (const t3 of e2.radar) t3.indicator = [];
|
|
38
|
+
const n2 = e2.series;
|
|
39
|
+
t2.defaultSeries = n2;
|
|
40
|
+
const i2 = e2.xAxis;
|
|
41
|
+
i2 && i2.length > 0 && i2[0].data && (i2[0].data = []), t2.defaultXaxis = i2;
|
|
42
|
+
const s2 = e2.yAxis;
|
|
43
|
+
if (s2) for (const t3 of s2) t3.data && (t3.data = []), "auto" === t3._dataMin && (t3.min = function(t4) {
|
|
44
|
+
if (t4.min) return 10 * Math.floor(t4.min / 10);
|
|
45
|
+
}), "auto" === t3._dataMax && (t3.max = function(t4) {
|
|
46
|
+
if (t4.max) return 10 * Math.ceil(t4.max / 10);
|
|
47
|
+
});
|
|
48
|
+
t2.defaultYaxis = s2;
|
|
146
49
|
}
|
|
147
|
-
function
|
|
148
|
-
if (!
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const hisSelected = info.seriesIndex === params.seriesIndex && info.dataIndex === params.dataIndex;
|
|
161
|
-
if (hisSelected || !clickSet.multiple) {
|
|
162
|
-
if (clickSet.selected) {
|
|
163
|
-
const typeName = configure.name === "chart-pie" ? "unselect" : "downplay";
|
|
164
|
-
chart.dispatchAction({
|
|
165
|
-
type: typeName,
|
|
166
|
-
seriesIndex: info.seriesIndex,
|
|
167
|
-
dataIndex: info.dataIndex
|
|
168
|
-
});
|
|
50
|
+
function x(t2, e2, n2) {
|
|
51
|
+
if (!(n2 && e2 && e2.clickSet && t2)) return;
|
|
52
|
+
const i2 = e2.clickSet;
|
|
53
|
+
n2.on("click", function(s2) {
|
|
54
|
+
let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
|
|
55
|
+
if (o2) {
|
|
56
|
+
const t3 = [];
|
|
57
|
+
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
58
|
+
const a2 = o2[l2], c2 = a2.seriesIndex === s2.seriesIndex && a2.dataIndex === s2.dataIndex;
|
|
59
|
+
if (c2 || !i2.multiple) {
|
|
60
|
+
if (i2.selected) {
|
|
61
|
+
const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
62
|
+
n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
|
|
169
63
|
}
|
|
170
|
-
} else
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
if (hisSelected) {
|
|
174
|
-
hisSelectIndex = i;
|
|
175
|
-
}
|
|
64
|
+
} else t3.push(a2);
|
|
65
|
+
c2 && (r2 = l2);
|
|
176
66
|
}
|
|
177
|
-
|
|
67
|
+
o2 = t3;
|
|
178
68
|
}
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
type: typeName,
|
|
184
|
-
seriesIndex: params.seriesIndex,
|
|
185
|
-
dataIndex: params.dataIndex
|
|
186
|
-
});
|
|
69
|
+
if (-1 === r2) {
|
|
70
|
+
if (i2.selected) {
|
|
71
|
+
const t3 = "chart-pie" === e2.name ? "select" : "highlight";
|
|
72
|
+
n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
187
73
|
}
|
|
188
|
-
|
|
189
|
-
seriesIndex: params.seriesIndex,
|
|
190
|
-
dataIndex: params.dataIndex
|
|
191
|
-
});
|
|
74
|
+
o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
192
75
|
}
|
|
193
|
-
|
|
194
|
-
updateClickVariablesForSelected(pageContext, configure);
|
|
76
|
+
e2.highlightInfos = o2, b(t2, e2);
|
|
195
77
|
});
|
|
196
78
|
}
|
|
197
|
-
function
|
|
198
|
-
if (!
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
chart.dispatchAction({
|
|
206
|
-
type: typeName,
|
|
207
|
-
seriesIndex: info.seriesIndex,
|
|
208
|
-
dataIndex: info.dataIndex
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
configure.highlightInfos = [];
|
|
212
|
-
updateClickVariablesForSelected(pageContext, configure);
|
|
79
|
+
function I(t2, e2, n2) {
|
|
80
|
+
if (!n2 || !e2 || !t2) return;
|
|
81
|
+
const i2 = e2.highlightInfos ? e2.highlightInfos : [];
|
|
82
|
+
for (let t3 = 0; t3 < i2.length; t3++) {
|
|
83
|
+
const s2 = i2[t3], o2 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
84
|
+
n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
85
|
+
}
|
|
86
|
+
e2.highlightInfos = [], b(t2, e2);
|
|
213
87
|
}
|
|
214
|
-
function
|
|
215
|
-
if (!
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
const existIndexs = [];
|
|
227
|
-
for (const highlightInfo of highlightInfos) {
|
|
228
|
-
if (existIndexs.includes(highlightInfo.dataIndex)) {
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
existIndexs.push(highlightInfo.dataIndex);
|
|
232
|
-
if (highlightInfo.dataIndex < caheDatas.length) {
|
|
233
|
-
selDatas.push(caheDatas[highlightInfo.dataIndex]);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
for (const v of variables) {
|
|
237
|
-
if (!v.fieldName || !v.variable) {
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
const values = [];
|
|
241
|
-
for (const data of selDatas) {
|
|
242
|
-
const value = getValueFromSource(data, v.fieldName, void 0);
|
|
243
|
-
if (value == void 0) {
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
values.push(value);
|
|
247
|
-
}
|
|
248
|
-
if (clickSet.multiple) {
|
|
249
|
-
setValueForVariableName(pageContext.entity, v.variable, values);
|
|
250
|
-
} else {
|
|
251
|
-
setValueForVariableName(
|
|
252
|
-
pageContext.entity,
|
|
253
|
-
v.variable,
|
|
254
|
-
values.length > 0 ? values[0] : void 0
|
|
255
|
-
);
|
|
88
|
+
function b(t2, e2) {
|
|
89
|
+
if (!e2.clickSet) return;
|
|
90
|
+
const n2 = e2.clickSet, i2 = n2.variables;
|
|
91
|
+
if (!i2 || 0 == i2.length) return;
|
|
92
|
+
const r2 = e2.highlightInfos ? e2.highlightInfos : [], l2 = e2.cacheDatas ? e2.cacheDatas : [], a2 = [], c2 = [];
|
|
93
|
+
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < l2.length && a2.push(l2[t3.dataIndex]));
|
|
94
|
+
for (const e3 of i2) {
|
|
95
|
+
if (!e3.fieldName || !e3.variable) continue;
|
|
96
|
+
const i3 = [];
|
|
97
|
+
for (const t3 of a2) {
|
|
98
|
+
const n3 = s(t3, e3.fieldName, void 0);
|
|
99
|
+
null != n3 && i3.push(n3);
|
|
256
100
|
}
|
|
101
|
+
n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
|
|
257
102
|
}
|
|
258
103
|
}
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const sourceType = itemProps.yaxisSource;
|
|
270
|
-
const yaxisField = itemProps.yaxisField;
|
|
271
|
-
if (yaxisField && (!sourceType || sourceType == "variable")) {
|
|
272
|
-
orderField = yaxisField;
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
104
|
+
function v(t2, e2, n2) {
|
|
105
|
+
const i2 = e2.items ? e2.items : [], o2 = e2.props ? e2.props.orderByTarget : "";
|
|
106
|
+
let r2 = null;
|
|
107
|
+
if ("x" == o2 || "X" == o2) r2 = "__x";
|
|
108
|
+
else if (o2) {
|
|
109
|
+
for (const t3 of i2) if (t3.uuid == o2) {
|
|
110
|
+
const e3 = t3.props ? t3.props : {}, n3 = e3.yaxisSource, i3 = e3.yaxisField;
|
|
111
|
+
if (i3 && (!n3 || "variable" == n3)) {
|
|
112
|
+
r2 = i3;
|
|
113
|
+
break;
|
|
275
114
|
}
|
|
276
115
|
}
|
|
277
116
|
}
|
|
278
|
-
if (!
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
let isSwap = false;
|
|
294
|
-
if ("desc" == orderValue) {
|
|
295
|
-
if (vali < valj) {
|
|
296
|
-
isSwap = true;
|
|
297
|
-
}
|
|
298
|
-
} else {
|
|
299
|
-
if (vali > valj) {
|
|
300
|
-
isSwap = true;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
if (isSwap) {
|
|
304
|
-
[datas[i], datas[j]] = [datas[j], datas[i]];
|
|
305
|
-
}
|
|
117
|
+
if (!r2) return;
|
|
118
|
+
const a2 = e2.props ? e2.props.orderSource : "";
|
|
119
|
+
let c2 = e2.props ? e2.props.orderFix : "";
|
|
120
|
+
if ("variable" == a2) {
|
|
121
|
+
const n3 = e2.props ? e2.props.orderVariable : "";
|
|
122
|
+
c2 = l(t2, n3);
|
|
123
|
+
}
|
|
124
|
+
c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc";
|
|
125
|
+
const f2 = n2.length;
|
|
126
|
+
for (let t3 = 0; t3 < f2 - 1; t3++) {
|
|
127
|
+
const e3 = s(n2[t3], r2, void 0);
|
|
128
|
+
for (let i3 = t3 + 1; i3 < f2; i3++) {
|
|
129
|
+
const o3 = s(n2[i3], r2, void 0);
|
|
130
|
+
let l2 = false;
|
|
131
|
+
"desc" == c2 ? e3 < o3 && (l2 = true) : e3 > o3 && (l2 = true), l2 && ([n2[t3], n2[i3]] = [n2[i3], n2[t3]]);
|
|
306
132
|
}
|
|
307
133
|
}
|
|
308
134
|
}
|
|
309
|
-
function
|
|
310
|
-
if (!
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if (
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
const overItemAlias = confProps.overItemAlias;
|
|
331
|
-
const newDatas = [];
|
|
332
|
-
const otherData = {};
|
|
333
|
-
groupFields = groupFields ? groupFields : [];
|
|
334
|
-
numFields = numFields ? numFields : [];
|
|
335
|
-
for (let i = 0; i < datas.length; i++) {
|
|
336
|
-
const data = datas[i];
|
|
337
|
-
if (i < limitNum) {
|
|
338
|
-
newDatas.push(data);
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
if (!overItemAlias) {
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
for (const groupField of groupFields) {
|
|
345
|
-
if (!groupField) {
|
|
346
|
-
continue;
|
|
347
|
-
}
|
|
348
|
-
let value = getValueFromSource(data, groupField, void 0);
|
|
349
|
-
value = value == null || value == void 0 ? "" : value;
|
|
350
|
-
if (!otherData[groupField]) {
|
|
351
|
-
otherData[groupField] = [];
|
|
135
|
+
function N(t2, e2, n2, i2, o2) {
|
|
136
|
+
if (!n2) return n2;
|
|
137
|
+
const r2 = e2.props ? e2.props : {};
|
|
138
|
+
if (!r2.limitQuantity) return n2;
|
|
139
|
+
let a2 = null;
|
|
140
|
+
if (r2.itemNumVariable ? (a2 = l(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
|
|
141
|
+
if (n2.length < a2) return n2;
|
|
142
|
+
const c2 = r2.overItemAlias, f2 = [], u2 = {};
|
|
143
|
+
i2 = i2 || [], o2 = o2 || [];
|
|
144
|
+
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
145
|
+
const e3 = n2[t3];
|
|
146
|
+
if (t3 < a2) f2.push(e3);
|
|
147
|
+
else {
|
|
148
|
+
if (!c2) break;
|
|
149
|
+
for (const t4 of i2) {
|
|
150
|
+
if (!t4) continue;
|
|
151
|
+
let n3 = s(e3, t4, void 0);
|
|
152
|
+
n3 = null == n3 || null == n3 ? "" : n3, u2[t4] || (u2[t4] = []);
|
|
153
|
+
const i3 = u2[t4];
|
|
154
|
+
i3.includes(n3) || i3.push(n3);
|
|
352
155
|
}
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
156
|
+
for (const t4 of o2) {
|
|
157
|
+
if (!t4) continue;
|
|
158
|
+
const n3 = s(e3, t4, void 0);
|
|
159
|
+
if (isNaN(n3)) continue;
|
|
160
|
+
const i3 = u2[t4];
|
|
161
|
+
isNaN(i3) ? u2[t4] = n3 : u2[t4] = n3 + i3;
|
|
356
162
|
}
|
|
357
163
|
}
|
|
358
|
-
for (const numField of numFields) {
|
|
359
|
-
if (!numField) {
|
|
360
|
-
continue;
|
|
361
|
-
}
|
|
362
|
-
const value = getValueFromSource(data, numField, void 0);
|
|
363
|
-
if (isNaN(value)) {
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
const hisValue = otherData[numField];
|
|
367
|
-
if (isNaN(hisValue)) {
|
|
368
|
-
otherData[numField] = value;
|
|
369
|
-
} else {
|
|
370
|
-
otherData[numField] = value + hisValue;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if (overItemAlias) {
|
|
375
|
-
otherData[
|
|
376
|
-
"__x"
|
|
377
|
-
/* X_FIELD_NAME */
|
|
378
|
-
] = overItemAlias;
|
|
379
|
-
newDatas.push(otherData);
|
|
380
164
|
}
|
|
381
|
-
return
|
|
165
|
+
return c2 && (u2.__x = c2, f2.push(u2)), f2;
|
|
382
166
|
}
|
|
383
|
-
function
|
|
384
|
-
const
|
|
385
|
-
for (const
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
if (
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
if (
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
paramName.substring(6, paramName.length - 1)
|
|
398
|
-
);
|
|
399
|
-
} else if (paramName.startsWith("${max.")) {
|
|
400
|
-
totalValueMap[paramName] = getMaxValue(
|
|
401
|
-
datas,
|
|
402
|
-
paramName.substring(6, paramName.length - 1)
|
|
403
|
-
);
|
|
404
|
-
} else if (paramName.startsWith("${sum.")) {
|
|
405
|
-
totalValueMap[paramName] = getSumValue(
|
|
406
|
-
datas,
|
|
407
|
-
paramName.substring(6, paramName.length - 1)
|
|
408
|
-
);
|
|
409
|
-
} else if (paramName.startsWith("${avg.")) {
|
|
410
|
-
totalValueMap[paramName] = getAvgValue(
|
|
411
|
-
datas,
|
|
412
|
-
paramName.substring(6, paramName.length - 1)
|
|
413
|
-
);
|
|
414
|
-
} else if (paramName.startsWith("${add.")) {
|
|
415
|
-
const fieldName = paramName.substring(6, paramName.length - 1);
|
|
416
|
-
accumulateFields.push(fieldName);
|
|
167
|
+
function y(t2, e2, n2) {
|
|
168
|
+
const i2 = {};
|
|
169
|
+
for (const s2 of t2) {
|
|
170
|
+
const t3 = s2.props ? s2.props : {};
|
|
171
|
+
if ("formula" === t3.yaxisSource) {
|
|
172
|
+
const s3 = r(t3.formula);
|
|
173
|
+
for (const t4 of s3) if (!(t4 in i2)) {
|
|
174
|
+
if (t4.startsWith("${min.")) i2[t4] = S(e2, t4.substring(6, t4.length - 1));
|
|
175
|
+
else if (t4.startsWith("${max.")) i2[t4] = F(e2, t4.substring(6, t4.length - 1));
|
|
176
|
+
else if (t4.startsWith("${sum.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
|
|
177
|
+
else if (t4.startsWith("${avg.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
|
|
178
|
+
else if (t4.startsWith("${add.")) {
|
|
179
|
+
const e3 = t4.substring(6, t4.length - 1);
|
|
180
|
+
n2.push(e3);
|
|
417
181
|
}
|
|
418
182
|
}
|
|
419
183
|
}
|
|
420
184
|
}
|
|
421
|
-
return
|
|
185
|
+
return i2;
|
|
422
186
|
}
|
|
423
|
-
function
|
|
424
|
-
let
|
|
425
|
-
for (const
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
minValue = value;
|
|
429
|
-
} else if (!isNaN(value) && value < minValue) {
|
|
430
|
-
minValue = value;
|
|
431
|
-
}
|
|
187
|
+
function S(t2, e2) {
|
|
188
|
+
let n2;
|
|
189
|
+
for (const i2 of t2) {
|
|
190
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
191
|
+
(void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
|
|
432
192
|
}
|
|
433
|
-
return
|
|
193
|
+
return n2;
|
|
434
194
|
}
|
|
435
|
-
function
|
|
436
|
-
let
|
|
437
|
-
for (const
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
maxValue = value;
|
|
441
|
-
} else if (!isNaN(value) && value > maxValue) {
|
|
442
|
-
maxValue = value;
|
|
443
|
-
}
|
|
195
|
+
function F(t2, e2) {
|
|
196
|
+
let n2;
|
|
197
|
+
for (const i2 of t2) {
|
|
198
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
199
|
+
(void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
|
|
444
200
|
}
|
|
445
|
-
return
|
|
201
|
+
return n2;
|
|
446
202
|
}
|
|
447
|
-
function
|
|
448
|
-
let
|
|
449
|
-
for (const
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
sumValue = value;
|
|
453
|
-
} else if (!isNaN(value)) {
|
|
454
|
-
sumValue += value;
|
|
455
|
-
}
|
|
203
|
+
function _(t2, e2) {
|
|
204
|
+
let n2;
|
|
205
|
+
for (const i2 of t2) {
|
|
206
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
207
|
+
void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
|
|
456
208
|
}
|
|
457
|
-
return
|
|
209
|
+
return n2;
|
|
458
210
|
}
|
|
459
|
-
function
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
return sumValue;
|
|
463
|
-
}
|
|
464
|
-
return parseFloat((sumValue / datas.length).toFixed(5));
|
|
211
|
+
function A(t2, e2) {
|
|
212
|
+
const n2 = _(t2, e2);
|
|
213
|
+
return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
|
|
465
214
|
}
|
|
466
|
-
function
|
|
467
|
-
if (!
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
215
|
+
function k(t2, e2, n2, i2) {
|
|
216
|
+
if (!t2) return;
|
|
217
|
+
if (e2) for (const n3 in e2) t2 = t2.replace(new RegExp("\\${add." + n3 + "}", "g"), e2[n3]);
|
|
218
|
+
const o2 = r(t2);
|
|
219
|
+
for (const e3 of o2) {
|
|
220
|
+
let o3 = null;
|
|
221
|
+
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : a(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
|
|
222
|
+
}
|
|
223
|
+
t2.includes("return ") || (t2 = "return " + t2);
|
|
224
|
+
const l2 = new Function("params", t2);
|
|
225
|
+
return f(l2, i2), l2({ pageContext: i2, row: n2 });
|
|
226
|
+
}
|
|
227
|
+
function M(t2) {
|
|
228
|
+
if (!t2 || !t2.$el) return;
|
|
229
|
+
const e2 = t2.$el.getElementsByTagName("canvas");
|
|
230
|
+
if (!e2 || 0 === e2.length) return;
|
|
231
|
+
const n2 = e2[0], i2 = n2.width + ":" + n2.height;
|
|
232
|
+
return { isTable: false, fileContent: n2.toDataURL(), fileSize: i2 };
|
|
233
|
+
}
|
|
234
|
+
function $(t2, e2, n2) {
|
|
235
|
+
const s2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
|
|
236
|
+
let r2 = true;
|
|
237
|
+
if (s2) {
|
|
238
|
+
const t3 = JSON.parse(s2);
|
|
239
|
+
if (t3[n2]) {
|
|
240
|
+
const i2 = t3[n2];
|
|
241
|
+
if (Object.keys(i2).length > 0) {
|
|
242
|
+
r2 = false;
|
|
243
|
+
for (const t4 in i2) null !== i2[t4] && void 0 !== i2[t4] && o(e2.entity, t4, i2[t4]);
|
|
244
|
+
}
|
|
476
245
|
}
|
|
477
246
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
value = getValueFromSource(rowData, paramName.substring(6, paramName.length - 1), null);
|
|
483
|
-
} else {
|
|
484
|
-
value = getValueFromVariable(pageContext.entity, paramName);
|
|
247
|
+
if (r2 && t2) {
|
|
248
|
+
for (const n3 of t2) if (n3.prop && n3.value) {
|
|
249
|
+
const t3 = i(e2, n3.value, "input-text", false), s3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
|
|
250
|
+
null != t3 && c(e2.entity, s3, t3);
|
|
485
251
|
}
|
|
486
|
-
formulaStr = formulaStr.replace(new RegExp(paramName.replace("$", "\\$"), "g"), value);
|
|
487
|
-
}
|
|
488
|
-
if (!formulaStr.includes("return ")) {
|
|
489
|
-
formulaStr = "return " + formulaStr;
|
|
490
252
|
}
|
|
491
|
-
const newFunc = new Function("params", formulaStr);
|
|
492
|
-
appendDefaultMethods(newFunc, pageContext);
|
|
493
|
-
return newFunc({
|
|
494
|
-
pageContext,
|
|
495
|
-
row: rowData
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
function exportCommonChart(chartRef) {
|
|
499
|
-
if (!chartRef || !chartRef.$el) {
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
const canvasDoms = chartRef.$el.getElementsByTagName("canvas");
|
|
503
|
-
if (!canvasDoms || canvasDoms.length === 0) {
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
const canvasDom = canvasDoms[0];
|
|
507
|
-
const fileSize = canvasDom.width + ":" + canvasDom.height;
|
|
508
|
-
return {
|
|
509
|
-
isTable: false,
|
|
510
|
-
fileContent: canvasDom.toDataURL(),
|
|
511
|
-
fileSize
|
|
512
|
-
};
|
|
513
253
|
}
|
|
514
254
|
export {
|
|
515
|
-
CommonName,
|
|
516
|
-
caculateFormulaValue,
|
|
517
|
-
clearChartSelected,
|
|
518
|
-
executeChartFormula,
|
|
519
|
-
exportCommonChart,
|
|
520
|
-
getAvgValue,
|
|
521
|
-
getCustomTheme,
|
|
522
|
-
getCustomThemeOptions,
|
|
523
|
-
getMaxValue,
|
|
524
|
-
getMinValue,
|
|
525
|
-
getNumFormatter,
|
|
526
|
-
getSumValue,
|
|
527
|
-
initChartOption,
|
|
528
|
-
limitDatas,
|
|
529
|
-
monitorChartClickToVariable,
|
|
530
|
-
|
|
531
|
-
|
|
255
|
+
u as CommonName,
|
|
256
|
+
y as caculateFormulaValue,
|
|
257
|
+
I as clearChartSelected,
|
|
258
|
+
k as executeChartFormula,
|
|
259
|
+
M as exportCommonChart,
|
|
260
|
+
A as getAvgValue,
|
|
261
|
+
d as getCustomTheme,
|
|
262
|
+
h as getCustomThemeOptions,
|
|
263
|
+
F as getMaxValue,
|
|
264
|
+
S as getMinValue,
|
|
265
|
+
m as getNumFormatter,
|
|
266
|
+
_ as getSumValue,
|
|
267
|
+
g as initChartOption,
|
|
268
|
+
N as limitDatas,
|
|
269
|
+
x as monitorChartClickToVariable,
|
|
270
|
+
$ as setHomeChartInitConfigValue,
|
|
271
|
+
v as sortDatas,
|
|
272
|
+
b as updateClickVariablesForSelected
|
|
532
273
|
};
|