super-page-designer 2.0.9 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/assets/design-attr.css +579 -0
- package/dist/es/components/design/utils/assemblys-config.js +85 -55
- package/dist/es/components/design/utils/chart-design-util.js +203 -160
- package/dist/es/components/design/utils/form-design-util.d.ts +5 -4
- package/dist/es/components/design/utils/form-design-util.js +55 -153
- package/dist/es/components/design/utils/interfaces/page-design-types.d.ts +0 -1
- package/dist/es/components/design/utils/page-design-util.d.ts +2 -1
- package/dist/es/components/design/utils/page-design-util.js +8 -2
- package/dist/es/components/design/utils/page-service-util.d.ts +15 -0
- package/dist/es/components/design/utils/page-service-util.js +5 -0
- package/dist/es/components/design/views/assemblys/button/button/button-attr-base.vue.js +20 -3
- package/dist/es/components/design/views/assemblys/button/button/button-attr-event.vue.js +6 -3
- package/dist/es/components/design/views/assemblys/button/button/button-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/button/button-group/buttongroup-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/button/component/journal-set-dialog.css +4 -0
- package/dist/es/components/design/views/assemblys/button/component/journal-set-dialog.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/button/dropdown/dropdown-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-attr-base.vue.js +6 -3
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-attr-style.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +7 -3
- package/dist/es/components/design/views/assemblys/chart/column-line/series/column-line-series-attr-base.vue.js +3 -1
- package/dist/es/components/design/views/assemblys/chart/column-line/series/column-line-series-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-data.vue.js +68 -3
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-groupby.vue.js +94 -16
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-serieslist.vue.js +12 -6
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-sortby.vue.js +30 -13
- package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset-columnline.vue.js +21 -3
- package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dynamic.vue.js +12 -66
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-base.vue.js +20 -12
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue.js +318 -0
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-style.vue.js +5 -2
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-design.vue2.js +34 -15
- package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-base.vue.js +4 -19
- package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-style.vue.js +5 -2
- package/dist/es/components/design/views/assemblys/chart/pie/pie-attr-base.vue.js +18 -5
- package/dist/es/components/design/views/assemblys/chart/pie/pie-attr-style.vue.js +5 -2
- package/dist/es/components/design/views/assemblys/chart/pie/pie-design.vue2.js +34 -16
- package/dist/es/components/design/views/assemblys/chart/pie/series/pie-series-attr-base.vue.js +4 -22
- package/dist/es/components/design/views/assemblys/chart/pie/series/pie-series-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-base.vue.js +23 -9
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue.js +318 -0
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-style.vue.js +25 -12
- package/dist/es/components/design/views/assemblys/chart/radar/radar-design.vue2.js +37 -13
- package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-base.vue.js +4 -17
- package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-dataset.vue.js +82 -256
- package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-style.vue.js +12 -17
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-base.vue.js +23 -13
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue.js +205 -0
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-style.vue.js +5 -7
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-design.vue2.js +35 -12
- package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-attr-base.vue.js +6 -77
- package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-attr-style.vue.js +4 -1
- package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-data.vue.js +191 -0
- package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-data.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.css +4 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/common/state-button.css +8 -0
- package/dist/es/components/design/views/assemblys/common/state-button.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr-event.vue.js +30 -0
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr-event.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr.vue2.js +2 -1
- package/dist/es/components/design/views/assemblys/data/bar-code/barcode-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/bar-code/barcode-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/attr-header.css +38 -0
- package/dist/es/components/design/views/assemblys/data/component/attr-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/attr-style.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/composite-header.css +37 -0
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.css +4 -0
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.vue2.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.css +5 -0
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/querySetting.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/data/component/row-backgroud-color.css +9 -0
- package/dist/es/components/design/views/assemblys/data/component/row-backgroud-color.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-design.css +18 -0
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/data/table/table-design2.css +32 -0
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-style.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/tree/tree-attr-base.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/data/tree/tree-attr-style.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/data/tree/tree-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/attr-event.css +7 -0
- package/dist/es/components/design/views/assemblys/form/common/attr-event.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/attr-header.css +26 -0
- package/dist/es/components/design/views/assemblys/form/common/attr-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-origin.css +5 -0
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/dimension-input.css +4 -0
- package/dist/es/components/design/views/assemblys/form/common/dimension-input.vue.js +75 -1
- package/dist/es/components/design/views/assemblys/form/common/dimension-input.vue3.js +2 -2
- package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.css +37 -0
- package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/parameter-table.vue.js +186 -0
- package/dist/es/components/design/views/assemblys/form/common/parameter-table.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/form/common/suffixmodule.vue.js +28 -4
- package/dist/es/components/design/views/assemblys/form/custom/custom-attr-base.vue.js +11 -169
- package/dist/es/components/design/views/assemblys/form/custom/custom-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/custom/custom-design.css +4 -0
- package/dist/es/components/design/views/assemblys/form/custom/custom-design.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/form/custom/custom-design.vue2.js +3 -12
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/divider/divider-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +33 -10
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr.css +565 -0
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr.vue2.js +10 -1
- package/dist/es/components/design/views/assemblys/form/label/label-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +15 -3
- package/dist/es/components/design/views/assemblys/form/placeholder/placeholder-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/select/select-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/object-design.vue.js +52 -77
- package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.d.ts +2 -2
- package/dist/es/components/design/views/assemblys/workflow/picture-flow/pictureflow-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/workflow/picture-flow/pictureflow-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/workflow/text-history/texthistory-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/workflow/text-history/texthistory-attr.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/workflow/workflow-button/workflowbutton-attr.vue.js +1 -1
- package/dist/es/components/design/views/design/page-design.vue.d.ts +13 -1
- package/dist/es/components/design/views/design/page-design.vue.js +218 -100
- package/dist/es/components/design/views/design/page-event/config.css +13 -0
- package/dist/es/components/design/views/design/page-event/config.vue.js +1 -1
- package/dist/es/components/design/views/design/page-event/page-event-content.css +4 -0
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +2 -2
- package/dist/es/components/design/views/design/page-event/page-event-content.vue2.js +19 -9
- package/dist/es/components/design/views/design/view/page-switch.css +17 -0
- package/dist/es/components/design/views/design/view/page-switch.vue.d.ts +18 -0
- package/dist/es/components/design/views/design/view/page-switch.vue.js +7 -0
- package/dist/es/components/design/views/design/view/page-switch.vue2.js +185 -0
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/components/design/views/design/view/view-design-preview.vue.js +2 -2
- package/dist/es/components/design/views/design/view/view-design.vue.js +7 -9
- package/dist/es/index.js +1 -1
- package/package.json +7 -6
- package/dist/es/assets/design-attr.css.js +0 -1
- package/dist/es/components/design/views/assemblys/button/button/button-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/button/button-group/buttongroup-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/button/component/journal-set-dialog.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/button/dropdown/dropdown-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-drill.vue.js +0 -108
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-drill.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset.vue.js +0 -166
- package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-dataset.vue.js +0 -153
- package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-dataset.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/chart/radar/series/attrs/attr-testdatas.vue.js +0 -58
- package/dist/es/components/design/views/assemblys/chart/radar/series/attrs/attr-testdatas.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/common/state-button.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/bar-code/barcode-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/attr-header.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/component/row-backgroud-color.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/table/table-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue4.js +0 -1
- package/dist/es/components/design/views/assemblys/data/tree/tree-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/common/attr-event.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/common/attr-header.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/common/dimension-input.vue2.js +0 -75
- package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/common/linkpage-params-in.vue.js +0 -154
- package/dist/es/components/design/views/assemblys/form/common/linkpage-params-in.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/form/common/title.vue.js +0 -45
- package/dist/es/components/design/views/assemblys/form/common/title.vue2.js +0 -4
- package/dist/es/components/design/views/assemblys/form/custom/custom-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/custom/custom-design.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/divider/divider-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/label/label-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/placeholder/placeholder-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/select/select-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/workflow/picture-flow/pictureflow-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/workflow/text-history/texthistory-attr.vue3.js +0 -1
- package/dist/es/components/design/views/assemblys/workflow/workflow-button/workflowbutton-attr.vue3.js +0 -1
- package/dist/es/components/design/views/design/page-event/config.vue3.js +0 -1
- package/dist/es/components/design/views/design/page-event/page-event-content.vue3.js +0 -1
- package/dist/es/style.css +0 -14198
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@element-plus/icons";
|
|
2
2
|
import { usePageContextStore } from "../../../stores/page-store.js";
|
|
3
|
+
import { getNumFormatterForChart } from "super-page-runtime";
|
|
3
4
|
function generateChartHeader(configure) {
|
|
4
5
|
const haderJson = {};
|
|
5
6
|
const props = configure.props ? configure.props : {};
|
|
@@ -17,15 +18,19 @@ function generateChartHeader(configure) {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
haderJson.options = options;
|
|
20
|
-
if (props.title || (!props.groupSource || props.groupSource == "fix") && props.groupPosition) {
|
|
21
|
+
if (props.title || (!props.groupSource || props.groupSource == "fix") && props.groupPosition || !props.enableDrill && props.groupPosition) {
|
|
21
22
|
haderJson.showHeader = true;
|
|
22
23
|
haderJson.title = props.title;
|
|
23
24
|
haderJson.textAlign = style.titleTextAlign;
|
|
24
|
-
if ((!props.groupSource || props.groupSource == "fix") && props.groupPosition) {
|
|
25
|
+
if ((!props.groupSource || props.groupSource == "fix") && props.groupPosition && !props.enableDrill) {
|
|
25
26
|
haderJson.showGroup = true;
|
|
26
27
|
haderJson.groupPosition = props.groupPosition;
|
|
27
28
|
haderJson.groupComponent = props.groupComponent;
|
|
28
29
|
}
|
|
30
|
+
if (props.enableDrill && props.groupPosition) {
|
|
31
|
+
haderJson.showDrill = true;
|
|
32
|
+
haderJson.groupPosition = props.groupPosition;
|
|
33
|
+
}
|
|
29
34
|
}
|
|
30
35
|
if (!props.groupSource || props.groupSource == "fix") {
|
|
31
36
|
if (haderJson.groupComponent == "checkbox") {
|
|
@@ -50,6 +55,20 @@ function generateChartHeader(configure) {
|
|
|
50
55
|
titleStyle["color"] = style.titleColor;
|
|
51
56
|
}
|
|
52
57
|
haderJson.style = titleStyle;
|
|
58
|
+
const monitorFields = [];
|
|
59
|
+
if (props.linkages) {
|
|
60
|
+
for (let l of props.linkages) {
|
|
61
|
+
if (l.fieldName && !monitorFields.includes(l.fieldName)) {
|
|
62
|
+
monitorFields.push(l.fieldName);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (props.groupSource == "variable" && !props.enableDrill && props.groupVariable) {
|
|
67
|
+
if (!monitorFields.includes(props.groupVariable)) {
|
|
68
|
+
monitorFields.push(props.groupVariable);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
haderJson.monitorFields = monitorFields;
|
|
53
72
|
return haderJson;
|
|
54
73
|
}
|
|
55
74
|
function generateChartOption(configure, chartOption) {
|
|
@@ -256,6 +275,9 @@ function generateChartOption(configure, chartOption) {
|
|
|
256
275
|
generateYaxisJson(styleYaxis, optionYaxis);
|
|
257
276
|
}
|
|
258
277
|
}
|
|
278
|
+
if (isRadar) {
|
|
279
|
+
generateRadarOption(configure, tempOption);
|
|
280
|
+
}
|
|
259
281
|
if (isColumnLine || isScatter) {
|
|
260
282
|
if (thisStyle.enableDatazoom) {
|
|
261
283
|
const tempZoom = {
|
|
@@ -277,40 +299,57 @@ function generateChartOption(configure, chartOption) {
|
|
|
277
299
|
generateTooltipJson(thisStyle, tempOption);
|
|
278
300
|
}
|
|
279
301
|
const thisItems = configure.items ? configure.items : [];
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
tempSerie = generateRadarSeriesJson(thisItem, tempOption);
|
|
284
|
-
} else if (thisItem.type == "scatter") {
|
|
285
|
-
tempSerie = generateScatterSeriesJson(thisItem);
|
|
286
|
-
} else {
|
|
287
|
-
tempSerie = generateSeriesJson(thisItem);
|
|
302
|
+
if (isRadar) {
|
|
303
|
+
if (!tempOption.series) {
|
|
304
|
+
tempOption.series = [];
|
|
288
305
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
306
|
+
if (tempOption.series.length == 0) {
|
|
307
|
+
tempOption.series.push({});
|
|
308
|
+
}
|
|
309
|
+
let tempSerie = tempOption.series[0];
|
|
310
|
+
tempSerie.type = "radar";
|
|
311
|
+
tempSerie.data = [];
|
|
312
|
+
for (let thisItem of thisItems) {
|
|
313
|
+
if (thisItem.type == "radar") {
|
|
314
|
+
const radarData = generateRadarDataJson(thisItem, tempOption);
|
|
315
|
+
radarData.uuid = thisItem.uuid;
|
|
316
|
+
tempSerie.data.push(radarData);
|
|
296
317
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
for (let thisItem of thisItems) {
|
|
321
|
+
let tempSerie = null;
|
|
322
|
+
if (thisItem.type == "scatter") {
|
|
323
|
+
tempSerie = generateScatterSeriesJson(thisItem);
|
|
324
|
+
} else {
|
|
325
|
+
tempSerie = generateSeriesJson(thisItem);
|
|
326
|
+
}
|
|
327
|
+
tempSerie.uuid = thisItem.uuid;
|
|
328
|
+
if (isColumnLine || isScatter) {
|
|
329
|
+
if (thisItem.props.yAxisIndex == "1") {
|
|
330
|
+
tempSerie.yAxisIndex = 1;
|
|
331
|
+
tempOption.yAxis[1].show = true;
|
|
332
|
+
} else {
|
|
333
|
+
tempOption.yAxis[0].show = true;
|
|
300
334
|
}
|
|
301
|
-
if (
|
|
302
|
-
|
|
335
|
+
if (tempSerie.type == "bar") {
|
|
336
|
+
if (thisStyle.barGap != null && thisStyle.barGap != void 0 && thisStyle.barGap != "") {
|
|
337
|
+
tempSerie.barGap = thisStyle.barGap + "%";
|
|
338
|
+
}
|
|
339
|
+
if (thisStyle.barCategoryGap != null && thisStyle.barCategoryGap != void 0 && thisStyle.barCategoryGap != "") {
|
|
340
|
+
tempSerie.barCategoryGap = thisStyle.barCategoryGap + "%";
|
|
341
|
+
}
|
|
303
342
|
}
|
|
304
343
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
344
|
+
if (isPie || isGauge) {
|
|
345
|
+
if (thisItem.props.subTitle) {
|
|
346
|
+
const subTitleJson = generateSubtitleJson(thisItem.style);
|
|
347
|
+
subTitleJson.subtext = thisItem.props.subTitle;
|
|
348
|
+
tempOption.title.push(subTitleJson);
|
|
349
|
+
}
|
|
311
350
|
}
|
|
351
|
+
tempOption.series.push(tempSerie);
|
|
312
352
|
}
|
|
313
|
-
tempOption.series.push(tempSerie);
|
|
314
353
|
}
|
|
315
354
|
if (isPie) {
|
|
316
355
|
if (thisStyle.enableLegend == false) {
|
|
@@ -329,6 +368,7 @@ function generateChartOption(configure, chartOption) {
|
|
|
329
368
|
}
|
|
330
369
|
}
|
|
331
370
|
tempOption.xAxis[0].data = void 0;
|
|
371
|
+
tempOption.isBar = thisProps.isBar;
|
|
332
372
|
}
|
|
333
373
|
const customAttrJson = convertStrToJson(thisStyle.customAttr);
|
|
334
374
|
if (customAttrJson) {
|
|
@@ -370,13 +410,15 @@ function generateTooltipJson(thisStyle, tempOption) {
|
|
|
370
410
|
tempOption.tooltip.position = thisStyle.tooltipPosition;
|
|
371
411
|
}
|
|
372
412
|
if (thisStyle.tooltipNumFormat) {
|
|
373
|
-
|
|
413
|
+
const args = [
|
|
374
414
|
thisStyle.tooltipNumFormat,
|
|
375
415
|
thisStyle.tooltipNumPrecision,
|
|
376
416
|
thisStyle.tooltipNumPrefix,
|
|
377
417
|
thisStyle.tooltipNumAppend,
|
|
378
418
|
true
|
|
379
|
-
|
|
419
|
+
];
|
|
420
|
+
tempOption.tooltip.valueFormatter = getNumFormatterForChart.apply(tempOption, args);
|
|
421
|
+
tempOption.tooltipFormatterArgs = args;
|
|
380
422
|
}
|
|
381
423
|
if (thisStyle.tooltipFormatter) {
|
|
382
424
|
tempOption.tooltip.formatter = thisStyle.tooltipFormatter;
|
|
@@ -447,7 +489,16 @@ function generateSeriesJson(serieConfigure) {
|
|
|
447
489
|
type: serieConfigure.type,
|
|
448
490
|
label: {},
|
|
449
491
|
itemStyle: {},
|
|
450
|
-
lineStyle: {}
|
|
492
|
+
lineStyle: {},
|
|
493
|
+
emphasis: {
|
|
494
|
+
disabled: true,
|
|
495
|
+
itemStyle: {
|
|
496
|
+
color: "#E3E8C0",
|
|
497
|
+
borderWidth: 1,
|
|
498
|
+
borderType: "dashed",
|
|
499
|
+
borderColor: "#878773"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
451
502
|
};
|
|
452
503
|
if (itemStyle.enableLabel != void 0) {
|
|
453
504
|
tempSerie.label.show = itemStyle.enableLabel;
|
|
@@ -488,13 +539,15 @@ function generateSeriesJson(serieConfigure) {
|
|
|
488
539
|
tempSerie.label.alignTo = itemStyle.labelAlignTo;
|
|
489
540
|
}
|
|
490
541
|
if (itemStyle.labelNumFormat && itemStyle.labelNumFormat.length > 0) {
|
|
491
|
-
|
|
542
|
+
const args = [
|
|
492
543
|
itemStyle.labelNumFormat,
|
|
493
544
|
itemStyle.labelNumPrecision,
|
|
494
545
|
itemStyle.labelNumPrefix,
|
|
495
546
|
itemStyle.labelNumAppend,
|
|
496
547
|
false
|
|
497
|
-
|
|
548
|
+
];
|
|
549
|
+
tempSerie.label.formatter = getNumFormatterForChart.apply(tempSerie, args);
|
|
550
|
+
tempSerie.labelFormatterArgs = args;
|
|
498
551
|
} else if (itemStyle.labelFormatter) {
|
|
499
552
|
tempSerie.label.formatter = itemStyle.labelFormatter;
|
|
500
553
|
}
|
|
@@ -520,6 +573,8 @@ function generateSeriesJson(serieConfigure) {
|
|
|
520
573
|
}
|
|
521
574
|
}
|
|
522
575
|
}
|
|
576
|
+
tempSerie.pieColorMap = pieColorMap;
|
|
577
|
+
tempSerie.pieColors = pieColors;
|
|
523
578
|
}
|
|
524
579
|
}
|
|
525
580
|
const isGauge = serieConfigure.type == "gauge";
|
|
@@ -592,13 +647,9 @@ function generateSeriesJson(serieConfigure) {
|
|
|
592
647
|
}
|
|
593
648
|
return tempSerie;
|
|
594
649
|
}
|
|
595
|
-
function
|
|
596
|
-
const itemProps =
|
|
597
|
-
const itemStyle =
|
|
598
|
-
const tempSerie = {
|
|
599
|
-
name: itemProps.title,
|
|
600
|
-
type: serieConfigure.type
|
|
601
|
-
};
|
|
650
|
+
function generateRadarOption(configure, tempOption) {
|
|
651
|
+
const itemProps = configure.props ? configure.props : {};
|
|
652
|
+
const itemStyle = configure.style ? configure.style : {};
|
|
602
653
|
if (tempOption.radar == void 0) {
|
|
603
654
|
tempOption.radar = [];
|
|
604
655
|
}
|
|
@@ -730,25 +781,59 @@ function generateRadarSeriesJson(serieConfigure, tempOption) {
|
|
|
730
781
|
}
|
|
731
782
|
}
|
|
732
783
|
}
|
|
784
|
+
if (!itemProps.testitems) {
|
|
785
|
+
itemProps.testitems = "项1,项2,项3,项4,项5,项6,项7,项8";
|
|
786
|
+
}
|
|
787
|
+
const testitems = itemProps.testitems.split(",");
|
|
788
|
+
let maxValue = null;
|
|
789
|
+
if (itemProps.maxSource == "fixed") {
|
|
790
|
+
maxValue = itemProps.maxFixed;
|
|
791
|
+
}
|
|
792
|
+
if (!maxValue) {
|
|
793
|
+
maxValue = 100;
|
|
794
|
+
}
|
|
795
|
+
const indicators = [];
|
|
796
|
+
for (let item of testitems) {
|
|
797
|
+
indicators.push({
|
|
798
|
+
text: item,
|
|
799
|
+
max: maxValue
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
tempRadar.indicator = indicators;
|
|
803
|
+
if (!tempOption.radar) {
|
|
804
|
+
tempOption.radar = [];
|
|
805
|
+
}
|
|
806
|
+
if (tempOption.radar.length == 0) {
|
|
807
|
+
tempOption.radar.push({});
|
|
808
|
+
}
|
|
809
|
+
Object.assign(tempOption.radar[0], tempRadar);
|
|
810
|
+
}
|
|
811
|
+
function generateRadarDataJson(dataConfigure, tempOption) {
|
|
812
|
+
const itemProps = dataConfigure.props ? dataConfigure.props : {};
|
|
813
|
+
const itemStyle = dataConfigure.style ? dataConfigure.style : {};
|
|
814
|
+
const tempData = {
|
|
815
|
+
uuid: dataConfigure.uuid,
|
|
816
|
+
name: itemProps.title
|
|
817
|
+
};
|
|
733
818
|
if (itemStyle.enableLabel != void 0) {
|
|
734
|
-
if (
|
|
735
|
-
|
|
819
|
+
if (tempData.label == void 0) {
|
|
820
|
+
tempData.label = {};
|
|
736
821
|
}
|
|
737
|
-
|
|
822
|
+
tempData.label.show = itemStyle.enableLabel;
|
|
738
823
|
if (itemStyle.labelPosition) {
|
|
739
|
-
|
|
824
|
+
tempData.label.position = itemStyle.labelPosition;
|
|
740
825
|
}
|
|
741
826
|
if (itemStyle.labelFontSize) {
|
|
742
|
-
|
|
827
|
+
tempData.label.fontSize = itemStyle.labelFontSize;
|
|
743
828
|
}
|
|
744
829
|
if (itemStyle.labelColor) {
|
|
745
|
-
|
|
830
|
+
tempData.label.color = itemStyle.labelColor;
|
|
746
831
|
}
|
|
747
832
|
if (itemStyle.labelWeight) {
|
|
748
|
-
|
|
833
|
+
tempData.label.fontWeight = itemStyle.labelWeight;
|
|
749
834
|
}
|
|
750
835
|
if (itemStyle.labelAngle) {
|
|
751
|
-
|
|
836
|
+
tempData.label.rotate = itemStyle.labelAngle;
|
|
752
837
|
}
|
|
753
838
|
if (itemStyle.labelLeft || itemStyle.labelTop) {
|
|
754
839
|
const offset = [0, 0];
|
|
@@ -758,144 +843,133 @@ function generateRadarSeriesJson(serieConfigure, tempOption) {
|
|
|
758
843
|
if (itemStyle.labelTop && !isNaN(itemStyle.labelTop)) {
|
|
759
844
|
offset[1] = parseFloat(itemStyle.labelTop);
|
|
760
845
|
}
|
|
761
|
-
|
|
846
|
+
tempData.label.offset = offset;
|
|
762
847
|
} else {
|
|
763
|
-
|
|
848
|
+
tempData.label.offset = [0, 0];
|
|
764
849
|
}
|
|
765
850
|
if (itemStyle.labelNumFormat && itemStyle.labelNumFormat.length > 0) {
|
|
766
|
-
|
|
851
|
+
const args = [
|
|
767
852
|
itemStyle.labelNumFormat,
|
|
768
853
|
itemStyle.labelNumPrecision,
|
|
769
854
|
itemStyle.labelNumPrefix,
|
|
770
855
|
itemStyle.labelNumAppend,
|
|
771
856
|
false
|
|
772
|
-
|
|
857
|
+
];
|
|
858
|
+
tempData.label.formatter = getNumFormatterForChart.apply(tempData, args);
|
|
859
|
+
tempData.labelFormatterArgs = args;
|
|
773
860
|
} else if (itemStyle.labelFormatter) {
|
|
774
|
-
|
|
861
|
+
tempData.label.formatter = itemStyle.labelFormatter;
|
|
775
862
|
}
|
|
776
863
|
}
|
|
777
|
-
if (
|
|
778
|
-
|
|
864
|
+
if (tempData.lineStyle == void 0) {
|
|
865
|
+
tempData.lineStyle = {};
|
|
779
866
|
}
|
|
780
867
|
if (itemStyle.lineColor) {
|
|
781
|
-
|
|
868
|
+
tempData.lineStyle.color = itemStyle.lineColor;
|
|
782
869
|
}
|
|
783
870
|
if (itemStyle.lineOpacity) {
|
|
784
|
-
|
|
871
|
+
tempData.lineStyle.opacity = itemStyle.lineOpacity;
|
|
785
872
|
}
|
|
786
873
|
if (itemStyle.lineType) {
|
|
787
|
-
|
|
874
|
+
tempData.lineStyle.type = itemStyle.lineType;
|
|
788
875
|
}
|
|
789
876
|
if (itemStyle.lineWidth > 0) {
|
|
790
|
-
|
|
877
|
+
tempData.lineStyle.width = itemStyle.lineWidth;
|
|
791
878
|
}
|
|
792
879
|
if (itemStyle.lineShadowColor) {
|
|
793
|
-
|
|
880
|
+
tempData.lineStyle.shadowColor = itemStyle.lineShadowColor;
|
|
794
881
|
if (itemStyle.lineShadowBlur) {
|
|
795
|
-
|
|
882
|
+
tempData.lineStyle.shadowBlur = itemStyle.lineShadowBlur;
|
|
796
883
|
}
|
|
797
884
|
if (itemStyle.lineShadowX) {
|
|
798
|
-
|
|
885
|
+
tempData.lineStyle.shadowOffsetX = itemStyle.lineShadowX;
|
|
799
886
|
}
|
|
800
887
|
if (itemStyle.lineShadowY) {
|
|
801
|
-
|
|
888
|
+
tempData.lineStyle.shadowOffsetY = itemStyle.lineShadowY;
|
|
802
889
|
}
|
|
803
890
|
}
|
|
804
891
|
if (itemStyle.lineSymbol) {
|
|
805
|
-
|
|
892
|
+
tempData.symbol = itemStyle.lineSymbol;
|
|
806
893
|
}
|
|
807
894
|
if (itemStyle.lineSymbolSize > -1) {
|
|
808
|
-
|
|
895
|
+
tempData.symbolSize = itemStyle.lineSymbolSize;
|
|
809
896
|
}
|
|
810
897
|
if (itemStyle.lineSymbolColor) {
|
|
811
|
-
if (
|
|
812
|
-
|
|
898
|
+
if (tempData.itemStyle == void 0) {
|
|
899
|
+
tempData.itemStyle = {};
|
|
813
900
|
}
|
|
814
|
-
|
|
901
|
+
tempData.itemStyle.color = itemStyle.lineSymbolColor;
|
|
815
902
|
}
|
|
816
903
|
if (itemStyle.enableSplitLineArea != void 0) {
|
|
817
|
-
if (
|
|
818
|
-
|
|
904
|
+
if (tempData.areaStyle == void 0) {
|
|
905
|
+
tempData.areaStyle = {};
|
|
819
906
|
}
|
|
820
|
-
|
|
907
|
+
tempData.areaStyle.show = itemStyle.enableSplitLineArea;
|
|
821
908
|
if (itemStyle.enableSplitLineArea) {
|
|
822
909
|
if (itemStyle.splitLineAreaColor) {
|
|
823
|
-
|
|
910
|
+
tempData.areaStyle.color = itemStyle.splitLineAreaColor;
|
|
824
911
|
}
|
|
825
912
|
if (itemStyle.splitLineAreaOpacity) {
|
|
826
|
-
|
|
913
|
+
tempData.areaStyle.opacity = itemStyle.splitLineAreaOpacity;
|
|
827
914
|
}
|
|
828
915
|
if (itemStyle.splitLineAreaShadowColor) {
|
|
829
|
-
|
|
916
|
+
tempData.areaStyle.shadowColor = itemStyle.splitLineAreaShadowColor;
|
|
830
917
|
}
|
|
831
918
|
if (itemStyle.splitLineAreaShadowBlur) {
|
|
832
|
-
|
|
919
|
+
tempData.areaStyle.shadowBlur = itemStyle.splitLineAreaShadowBlur;
|
|
833
920
|
}
|
|
834
921
|
if (itemStyle.splitLineAreaShadowX) {
|
|
835
|
-
|
|
922
|
+
tempData.areaStyle.shadowOffsetX = itemStyle.splitLineAreaShadowX;
|
|
836
923
|
}
|
|
837
924
|
if (itemStyle.splitLineAreaShadowY) {
|
|
838
|
-
|
|
925
|
+
tempData.areaStyle.shadowOffsetY = itemStyle.splitLineAreaShadowY;
|
|
839
926
|
}
|
|
840
927
|
}
|
|
841
928
|
}
|
|
842
929
|
const customAttrJson = convertStrToJson(itemStyle.customAttr);
|
|
843
930
|
if (customAttrJson) {
|
|
844
|
-
Object.assign(
|
|
845
|
-
}
|
|
846
|
-
if (!itemProps.testitems) {
|
|
847
|
-
itemProps.testitems = "项1,项2,项3,项4,项5,项6,项7,项8";
|
|
931
|
+
Object.assign(tempData, customAttrJson);
|
|
848
932
|
}
|
|
849
933
|
if (!itemProps.testdatas) {
|
|
850
|
-
const
|
|
934
|
+
const min2 = 0;
|
|
935
|
+
let max = 100;
|
|
851
936
|
let tempDatas = [];
|
|
852
937
|
for (let i = 0; i < 8; i++) {
|
|
853
|
-
const newMin = Math.ceil(
|
|
938
|
+
const newMin = Math.ceil(min2);
|
|
854
939
|
const newMax = Math.floor(max);
|
|
855
940
|
tempDatas.push(Math.floor(Math.random() * (newMax - newMin + 1)) + newMin);
|
|
856
941
|
}
|
|
857
|
-
itemProps.testdatas =
|
|
858
|
-
}
|
|
859
|
-
const testItems = itemProps.testitems.split(",");
|
|
860
|
-
const indicatorDatas = [];
|
|
861
|
-
let maxValue = null;
|
|
862
|
-
if (itemStyle.maxValueSource == "fix" && itemStyle.maxValueFixed) {
|
|
863
|
-
maxValue = parseFloat(itemStyle.maxValueFixed);
|
|
864
|
-
}
|
|
865
|
-
if (!maxValue || !isNaN(maxValue)) {
|
|
866
|
-
maxValue = 100;
|
|
867
|
-
}
|
|
868
|
-
for (let item of testItems) {
|
|
869
|
-
indicatorDatas.push({
|
|
870
|
-
name: item,
|
|
871
|
-
max: maxValue
|
|
872
|
-
});
|
|
942
|
+
itemProps.testdatas = tempDatas.join(",");
|
|
873
943
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
const
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
944
|
+
const indicator = tempOption.radar && tempOption.radar.length > 0 ? tempOption.radar[0].indicator : [];
|
|
945
|
+
const datas = itemProps.testdatas ? itemProps.testdatas.split(",") : [];
|
|
946
|
+
const newDatas = [];
|
|
947
|
+
const hisLen = datas.length;
|
|
948
|
+
const min = 0;
|
|
949
|
+
for (let i = 0; i < 8 || i < hisLen; i++) {
|
|
950
|
+
let max = i < indicator.length ? indicator[i].max : null;
|
|
951
|
+
if (!max) {
|
|
952
|
+
max = 100;
|
|
953
|
+
}
|
|
954
|
+
max = parseFloat(max);
|
|
955
|
+
let exist = false;
|
|
956
|
+
if (i < hisLen) {
|
|
957
|
+
const hisValue = parseFloat(datas[i]);
|
|
958
|
+
if (hisValue < max) {
|
|
959
|
+
exist = true;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (!exist) {
|
|
963
|
+
const newMin = Math.ceil(min);
|
|
964
|
+
const newMax = Math.floor(max);
|
|
965
|
+
const value = Math.floor(Math.random() * (newMax - newMin + 1)) + newMin;
|
|
966
|
+
newDatas.push(value);
|
|
967
|
+
} else {
|
|
968
|
+
newDatas.push(datas[i]);
|
|
886
969
|
}
|
|
887
|
-
const values = strs[1].split(",");
|
|
888
|
-
const data = {
|
|
889
|
-
name: strs[0],
|
|
890
|
-
value: values
|
|
891
|
-
};
|
|
892
|
-
seriesDatas.push(data);
|
|
893
970
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
tempSerie.radarIndex = tempOption.radar.length - 1;
|
|
897
|
-
}
|
|
898
|
-
return tempSerie;
|
|
971
|
+
tempData.value = newDatas;
|
|
972
|
+
return tempData;
|
|
899
973
|
}
|
|
900
974
|
function generateScatterSeriesJson(serieConfigure, tempOption) {
|
|
901
975
|
const itemProps = serieConfigure.props ? serieConfigure.props : {};
|
|
@@ -972,13 +1046,15 @@ function generateScatterSeriesJson(serieConfigure, tempOption) {
|
|
|
972
1046
|
tempSerie.label.offset = [0, 0];
|
|
973
1047
|
}
|
|
974
1048
|
if (itemStyle.labelNumFormat && itemStyle.labelNumFormat.length > 0) {
|
|
975
|
-
|
|
1049
|
+
const args = [
|
|
976
1050
|
itemStyle.labelNumFormat,
|
|
977
1051
|
itemStyle.labelNumPrecision,
|
|
978
1052
|
itemStyle.labelNumPrefix,
|
|
979
1053
|
itemStyle.labelNumAppend,
|
|
980
1054
|
false
|
|
981
|
-
|
|
1055
|
+
];
|
|
1056
|
+
tempSerie.label.formatter = getNumFormatterForChart.apply(tempSerie, args);
|
|
1057
|
+
tempSerie.labelFormatterArgs = args;
|
|
982
1058
|
} else if (itemStyle.labelFormatter) {
|
|
983
1059
|
tempSerie.label.formatter = itemStyle.labelFormatter;
|
|
984
1060
|
}
|
|
@@ -1449,41 +1525,6 @@ function generateGaugeTitleJson(itemStyle) {
|
|
|
1449
1525
|
}
|
|
1450
1526
|
return titleJson;
|
|
1451
1527
|
}
|
|
1452
|
-
function getNumFormatter(labelNumFormat, numPrecision, numPrefix, numAppend, isValueFormatter) {
|
|
1453
|
-
const func = function(params) {
|
|
1454
|
-
let labelValue = params.value;
|
|
1455
|
-
if (isValueFormatter) {
|
|
1456
|
-
labelValue = params;
|
|
1457
|
-
}
|
|
1458
|
-
if (labelValue == void 0 || labelValue == null) {
|
|
1459
|
-
return labelValue;
|
|
1460
|
-
}
|
|
1461
|
-
if (Array.isArray(labelValue)) {
|
|
1462
|
-
console.log("numformatter is array", labelValue);
|
|
1463
|
-
return labelValue;
|
|
1464
|
-
}
|
|
1465
|
-
if (isNaN(labelValue) || !labelNumFormat || !labelNumFormat.indexOf) {
|
|
1466
|
-
return labelValue;
|
|
1467
|
-
}
|
|
1468
|
-
if (labelNumFormat.indexOf("precision") > -1) {
|
|
1469
|
-
let precision = parseInt(numPrecision);
|
|
1470
|
-
if (precision == null || isNaN(precision)) {
|
|
1471
|
-
precision = 2;
|
|
1472
|
-
}
|
|
1473
|
-
labelValue = parseFloat(parseFloat(labelValue).toFixed(precision));
|
|
1474
|
-
}
|
|
1475
|
-
let prefix = "";
|
|
1476
|
-
if (labelNumFormat.indexOf("prefix") > -1 && numPrefix) {
|
|
1477
|
-
prefix = numPrefix;
|
|
1478
|
-
}
|
|
1479
|
-
let append = "";
|
|
1480
|
-
if (labelNumFormat.indexOf("append") > -1 && numAppend) {
|
|
1481
|
-
append = numAppend;
|
|
1482
|
-
}
|
|
1483
|
-
return prefix + labelValue.toLocaleString() + append;
|
|
1484
|
-
};
|
|
1485
|
-
return func;
|
|
1486
|
-
}
|
|
1487
1528
|
function convertStrToJson(convertStr) {
|
|
1488
1529
|
if (convertStr) {
|
|
1489
1530
|
if (convertStr.trim) {
|
|
@@ -1557,10 +1598,12 @@ function initComponentDataConfig(configure, headerInfo) {
|
|
|
1557
1598
|
} else {
|
|
1558
1599
|
pageDesign.initChartServiceConfigs.push(config);
|
|
1559
1600
|
}
|
|
1601
|
+
return config;
|
|
1560
1602
|
} else if (existIndex > -1) {
|
|
1561
1603
|
pageDesign.initChartServiceConfigs.shift(existIndex, 1);
|
|
1562
1604
|
}
|
|
1563
1605
|
}
|
|
1606
|
+
return null;
|
|
1564
1607
|
}
|
|
1565
1608
|
export {
|
|
1566
1609
|
generateChartHeader,
|
|
@@ -75,7 +75,8 @@ export declare function setDefaultValue(baseProperty: object, setting: object):
|
|
|
75
75
|
* @param configure
|
|
76
76
|
* @param isRequired
|
|
77
77
|
*/
|
|
78
|
-
export declare function watchRequiredValidate(
|
|
78
|
+
export declare function watchRequiredValidate(configure: any, fieldInfo: any): void;
|
|
79
|
+
export declare function watchValidate(configure: any, verification: any, fieldInfo: any): void;
|
|
79
80
|
/**
|
|
80
81
|
*
|
|
81
82
|
* // pageDesign中rules的格式:
|
|
@@ -121,7 +122,7 @@ export declare function watchRequiredValidate(pageDesign: any, configure: any, i
|
|
|
121
122
|
* @param configure
|
|
122
123
|
* @param type string、integer、number、boolean、float、email、ip
|
|
123
124
|
*/
|
|
124
|
-
export declare function watchValidateType(
|
|
125
|
+
export declare function watchValidateType(configure: any, type: any, fieldInfo: any): void;
|
|
125
126
|
/**
|
|
126
127
|
*
|
|
127
128
|
* // pageDesign中rules的格式:
|
|
@@ -167,8 +168,8 @@ export declare function watchValidateType(pageDesign: any, configure: any, type:
|
|
|
167
168
|
* @param configure
|
|
168
169
|
* @param pattern 正则表达式
|
|
169
170
|
*/
|
|
170
|
-
export declare function watchPatternValidate(
|
|
171
|
-
export declare function watchMaxOrMinValidate(
|
|
171
|
+
export declare function watchPatternValidate(configure: any, pattern: any, fieldInfo: any): void;
|
|
172
|
+
export declare function watchMaxOrMinValidate(configure: any, type: any, value: any, fieldInfo: any): void;
|
|
172
173
|
/**
|
|
173
174
|
* 删除指定组件的校验规则
|
|
174
175
|
* @param pageDesign
|