super-page-runtime 2.1.933 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +838 -2285
- package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +298 -628
- package/dist/es/components/runtime/utils/page-init-util.js +134 -368
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -512
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +233 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -1,118 +1,35 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
|
|
2
|
-
import { getCustomTheme, initChartOption, exportCommonChart } from "../../../../utils/charts/chart-util.js";
|
|
3
|
-
import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { updateChartOption } from "../../../../utils/charts/chart-radar-util.js";
|
|
5
|
-
import
|
|
6
|
-
import { use } from "echarts/core";
|
|
7
|
-
import { CanvasRenderer } from "echarts/renderers";
|
|
8
|
-
import { RadarChart } from "echarts/charts";
|
|
9
|
-
import { GridComponent, TitleComponent, TooltipComponent, ToolboxComponent, LegendComponent } from "echarts/components";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
props: {
|
|
14
|
-
|
|
15
|
-
configure
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
GridComponent,
|
|
22
|
-
TitleComponent,
|
|
23
|
-
TooltipComponent,
|
|
24
|
-
ToolboxComponent,
|
|
25
|
-
LegendComponent
|
|
26
|
-
]);
|
|
27
|
-
const props = __props;
|
|
28
|
-
const thisRef = ref(null);
|
|
29
|
-
const chartRef = ref(null);
|
|
30
|
-
const headerRef = ref(null);
|
|
31
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
32
|
-
const runtimeStyle = runtimeInfo.style;
|
|
33
|
-
const runtimeClass = runtimeInfo.class;
|
|
34
|
-
const dataConfig = runtimeInfo.dataConfig;
|
|
35
|
-
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
36
|
-
const chartOption = runtimeInfo.chartOption;
|
|
37
|
-
const configureProps = props.configure.props ? props.configure.props : {};
|
|
38
|
-
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
39
|
-
initChartOption(props.configure, chartOption);
|
|
40
|
-
console.log("chartOption", chartOption);
|
|
41
|
-
onMounted(() => {
|
|
42
|
-
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
43
|
-
if (resultData) {
|
|
44
|
-
updateChartDatas(resultData);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
let hisGroupValue = headerInfo.groupValue;
|
|
48
|
-
watch(headerInfo, () => {
|
|
49
|
-
if (hisGroupValue == headerInfo.groupValue) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
hisGroupValue = headerInfo.groupValue;
|
|
53
|
-
if (dataConfig) {
|
|
54
|
-
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
55
|
-
}
|
|
56
|
-
refresh();
|
|
57
|
-
});
|
|
58
|
-
function refresh() {
|
|
59
|
-
if (!dataConfig) {
|
|
60
|
-
console.log("无数据源配置,不需要查询!");
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
64
|
-
}
|
|
65
|
-
const monitorFields = headerInfo.monitorFields;
|
|
66
|
-
monitorFieldChange(props.pageContext, monitorFields, refresh);
|
|
67
|
-
function updateChartDatas(resultData) {
|
|
68
|
-
if (!resultData) {
|
|
69
|
-
resultData = [];
|
|
70
|
-
}
|
|
71
|
-
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
72
|
-
if (!resultData) {
|
|
73
|
-
resultData = {};
|
|
74
|
-
}
|
|
75
|
-
if (resultData.hasRender) {
|
|
76
|
-
resultData.hasRender = true;
|
|
77
|
-
console.log("重复更新!", resultData);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
resultData.hasRender = true;
|
|
81
|
-
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
82
|
-
console.log("chartOption", chartOption);
|
|
83
|
-
}
|
|
84
|
-
function exportChart() {
|
|
85
|
-
exportCommonChart(chartRef.value);
|
|
86
|
-
}
|
|
87
|
-
__expose({
|
|
88
|
-
updateChartDatas,
|
|
89
|
-
exportChart
|
|
90
|
-
});
|
|
91
|
-
return (_ctx, _cache) => {
|
|
92
|
-
return openBlock(), createElementBlock("div", {
|
|
93
|
-
style: normalizeStyle(unref(runtimeStyle)),
|
|
94
|
-
class: normalizeClass([unref(runtimeClass), "amb-widget-chart"]),
|
|
95
|
-
ref_key: "thisRef",
|
|
96
|
-
ref: thisRef
|
|
97
|
-
}, [
|
|
98
|
-
withDirectives(createVNode(_sfc_main$1, {
|
|
99
|
-
ref_key: "headerRef",
|
|
100
|
-
ref: headerRef,
|
|
101
|
-
headerInfo: unref(headerInfo)
|
|
102
|
-
}, null, 8, ["headerInfo"]), [
|
|
103
|
-
[vShow, unref(headerInfo).showHeader]
|
|
104
|
-
]),
|
|
105
|
-
createVNode(unref(VChart), {
|
|
106
|
-
ref_key: "chartRef",
|
|
107
|
-
ref: chartRef,
|
|
108
|
-
theme: unref(customTheme),
|
|
109
|
-
option: unref(chartOption),
|
|
110
|
-
autoresize: ""
|
|
111
|
-
}, null, 8, ["theme", "option"])
|
|
112
|
-
], 6);
|
|
113
|
-
};
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as t, watch as o, openBlock as a, createElementBlock as n, normalizeStyle as s, unref as u, normalizeClass as i, withDirectives as c, createVNode as p, vShow as f } from "vue";
|
|
2
|
+
import { getCustomTheme as m, initChartOption as l, exportCommonChart as h } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { updateChartOption as C } from "../../../../utils/charts/chart-radar-util.js";
|
|
5
|
+
import v from "../common/common-chart-header.vue.js";
|
|
6
|
+
import { use as R } from "echarts/core";
|
|
7
|
+
import { CanvasRenderer as y } from "echarts/renderers";
|
|
8
|
+
import { RadarChart as V } from "echarts/charts";
|
|
9
|
+
import { GridComponent as _, TitleComponent as j, TooltipComponent as I, ToolboxComponent as k, LegendComponent as w } from "echarts/components";
|
|
10
|
+
import b from "vue-echarts";
|
|
11
|
+
const z = e({ __name: "radar-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
|
|
12
|
+
R([y, V, _, j, I, k, w]);
|
|
13
|
+
const D = e2, F = r(null), H = r(null), O = r(null), P = D.configure.runtime ? D.configure.runtime : {}, T = P.style, q = P.class, A = P.dataConfig, B = P.headerInfo ? P.headerInfo : {}, E = P.chartOption, G = D.configure.props ? D.configure.props : {}, J = m(G.customTheme);
|
|
14
|
+
l(D.configure, E), t(() => {
|
|
15
|
+
const e3 = g(D.pageContext, D.configure);
|
|
16
|
+
e3 && N(e3);
|
|
17
|
+
});
|
|
18
|
+
let K = B.groupValue;
|
|
19
|
+
function L() {
|
|
20
|
+
A && d(D.pageContext, [A], B.drillParams);
|
|
114
21
|
}
|
|
115
|
-
|
|
22
|
+
o(B, () => {
|
|
23
|
+
K != B.groupValue && (K = B.groupValue, A && (A.services[0].groupValue = B.groupValue), L());
|
|
24
|
+
});
|
|
25
|
+
const M = B.monitorFields;
|
|
26
|
+
function N(e3) {
|
|
27
|
+
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(D.pageContext, D.configure, E, e3));
|
|
28
|
+
}
|
|
29
|
+
return x(D.pageContext, M, L), z2({ updateChartDatas: N, exportChart: function() {
|
|
30
|
+
h(H.value);
|
|
31
|
+
} }), (e3, r2) => (a(), n("div", { style: s(u(T)), class: i([u(q), "amb-widget-chart"]), ref_key: "thisRef", ref: F }, [c(p(v, { ref_key: "headerRef", ref: O, headerInfo: u(B) }, null, 8, ["headerInfo"]), [[f, u(B).showHeader]]), p(u(b), { ref_key: "chartRef", ref: H, theme: u(J), option: u(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
32
|
+
} });
|
|
116
33
|
export {
|
|
117
|
-
|
|
34
|
+
z as default
|
|
118
35
|
};
|
|
@@ -1,119 +1,35 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
|
|
2
|
-
import { getCustomTheme, initChartOption, exportCommonChart } from "../../../../utils/charts/chart-util.js";
|
|
3
|
-
import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { updateChartOption } from "../../../../utils/charts/chart-scatter-util.js";
|
|
5
|
-
import
|
|
6
|
-
import { use } from "echarts/core";
|
|
7
|
-
import { CanvasRenderer } from "echarts/renderers";
|
|
8
|
-
import { ScatterChart } from "echarts/charts";
|
|
9
|
-
import { GridComponent, LegendComponent, TitleComponent, TooltipComponent, ToolboxComponent, DataZoomComponent } from "echarts/components";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
props: {
|
|
14
|
-
|
|
15
|
-
configure
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
GridComponent,
|
|
22
|
-
LegendComponent,
|
|
23
|
-
TitleComponent,
|
|
24
|
-
TooltipComponent,
|
|
25
|
-
ToolboxComponent,
|
|
26
|
-
DataZoomComponent
|
|
27
|
-
]);
|
|
28
|
-
const props = __props;
|
|
29
|
-
const thisRef = ref(null);
|
|
30
|
-
const chartRef = ref(null);
|
|
31
|
-
const headerRef = ref(null);
|
|
32
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
33
|
-
const runtimeStyle = runtimeInfo.style;
|
|
34
|
-
const runtimeClass = runtimeInfo.class;
|
|
35
|
-
const dataConfig = runtimeInfo.dataConfig;
|
|
36
|
-
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
37
|
-
const chartOption = runtimeInfo.chartOption;
|
|
38
|
-
const configureProps = props.configure.props ? props.configure.props : {};
|
|
39
|
-
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
40
|
-
initChartOption(props.configure, chartOption);
|
|
41
|
-
console.log("chartOption", chartOption);
|
|
42
|
-
onMounted(() => {
|
|
43
|
-
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
44
|
-
if (resultData) {
|
|
45
|
-
updateChartDatas(resultData);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
let hisGroupValue = headerInfo.groupValue;
|
|
49
|
-
watch(headerInfo, () => {
|
|
50
|
-
if (hisGroupValue == headerInfo.groupValue) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
hisGroupValue = headerInfo.groupValue;
|
|
54
|
-
if (dataConfig) {
|
|
55
|
-
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
56
|
-
}
|
|
57
|
-
refresh();
|
|
58
|
-
});
|
|
59
|
-
function refresh() {
|
|
60
|
-
if (!dataConfig) {
|
|
61
|
-
console.log("无数据源配置,不需要查询!");
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
65
|
-
}
|
|
66
|
-
const monitorFields = headerInfo.monitorFields;
|
|
67
|
-
monitorFieldChange(props.pageContext, monitorFields, refresh);
|
|
68
|
-
function updateChartDatas(resultData) {
|
|
69
|
-
if (!resultData) {
|
|
70
|
-
resultData = [];
|
|
71
|
-
}
|
|
72
|
-
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
73
|
-
if (!resultData) {
|
|
74
|
-
resultData = {};
|
|
75
|
-
}
|
|
76
|
-
if (resultData.hasRender) {
|
|
77
|
-
resultData.hasRender = true;
|
|
78
|
-
console.log("重复更新!", resultData);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
resultData.hasRender = true;
|
|
82
|
-
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
83
|
-
console.log("chartOption scatter", chartOption);
|
|
84
|
-
}
|
|
85
|
-
function exportChart() {
|
|
86
|
-
exportCommonChart(chartRef.value);
|
|
87
|
-
}
|
|
88
|
-
__expose({
|
|
89
|
-
updateChartDatas,
|
|
90
|
-
exportChart
|
|
91
|
-
});
|
|
92
|
-
return (_ctx, _cache) => {
|
|
93
|
-
return openBlock(), createElementBlock("div", {
|
|
94
|
-
style: normalizeStyle(unref(runtimeStyle)),
|
|
95
|
-
class: normalizeClass([unref(runtimeClass), "amb-widget-chart"]),
|
|
96
|
-
ref_key: "thisRef",
|
|
97
|
-
ref: thisRef
|
|
98
|
-
}, [
|
|
99
|
-
withDirectives(createVNode(_sfc_main$1, {
|
|
100
|
-
ref_key: "headerRef",
|
|
101
|
-
ref: headerRef,
|
|
102
|
-
headerInfo: unref(headerInfo)
|
|
103
|
-
}, null, 8, ["headerInfo"]), [
|
|
104
|
-
[vShow, unref(headerInfo).showHeader]
|
|
105
|
-
]),
|
|
106
|
-
createVNode(unref(VChart), {
|
|
107
|
-
ref_key: "chartRef",
|
|
108
|
-
ref: chartRef,
|
|
109
|
-
theme: unref(customTheme),
|
|
110
|
-
option: unref(chartOption),
|
|
111
|
-
autoresize: ""
|
|
112
|
-
}, null, 8, ["theme", "option"])
|
|
113
|
-
], 6);
|
|
114
|
-
};
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as t, watch as o, openBlock as a, createElementBlock as n, normalizeStyle as s, unref as u, normalizeClass as i, withDirectives as c, createVNode as p, vShow as f } from "vue";
|
|
2
|
+
import { getCustomTheme as m, initChartOption as l, exportCommonChart as h } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { updateChartOption as C } from "../../../../utils/charts/chart-scatter-util.js";
|
|
5
|
+
import v from "../common/common-chart-header.vue.js";
|
|
6
|
+
import { use as R } from "echarts/core";
|
|
7
|
+
import { CanvasRenderer as y } from "echarts/renderers";
|
|
8
|
+
import { ScatterChart as V } from "echarts/charts";
|
|
9
|
+
import { GridComponent as _, LegendComponent as j, TitleComponent as I, TooltipComponent as k, ToolboxComponent as w, DataZoomComponent as b } from "echarts/components";
|
|
10
|
+
import z from "vue-echarts";
|
|
11
|
+
const D = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: D2 }) {
|
|
12
|
+
R([y, V, _, j, I, k, w, b]);
|
|
13
|
+
const F = e2, H = r(null), O = r(null), P = r(null), T = F.configure.runtime ? F.configure.runtime : {}, q = T.style, A = T.class, B = T.dataConfig, E = T.headerInfo ? T.headerInfo : {}, G = T.chartOption, J = F.configure.props ? F.configure.props : {}, K = m(J.customTheme);
|
|
14
|
+
l(F.configure, G), t(() => {
|
|
15
|
+
const e3 = g(F.pageContext, F.configure);
|
|
16
|
+
e3 && Q(e3);
|
|
17
|
+
});
|
|
18
|
+
let L = E.groupValue;
|
|
19
|
+
function M() {
|
|
20
|
+
B && d(F.pageContext, [B], E.drillParams);
|
|
115
21
|
}
|
|
116
|
-
|
|
22
|
+
o(E, () => {
|
|
23
|
+
L != E.groupValue && (L = E.groupValue, B && (B.services[0].groupValue = E.groupValue), M());
|
|
24
|
+
});
|
|
25
|
+
const N = E.monitorFields;
|
|
26
|
+
function Q(e3) {
|
|
27
|
+
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(F.pageContext, F.configure, G, e3));
|
|
28
|
+
}
|
|
29
|
+
return x(F.pageContext, N, M), D2({ updateChartDatas: Q, exportChart: function() {
|
|
30
|
+
h(O.value);
|
|
31
|
+
} }), (e3, r2) => (a(), n("div", { style: s(u(q)), class: i([u(A), "amb-widget-chart"]), ref_key: "thisRef", ref: H }, [c(p(v, { ref_key: "headerRef", ref: P, headerInfo: u(E) }, null, 8, ["headerInfo"]), [[f, u(E).showHeader]]), p(u(z), { ref_key: "chartRef", ref: O, theme: u(K), option: u(G), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
32
|
+
} });
|
|
117
33
|
export {
|
|
118
|
-
|
|
34
|
+
D as default
|
|
119
35
|
};
|