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