super-page-runtime 2.2.29-tmp1 → 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 -69
- 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 -38
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
- 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 -73
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
- 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 -62
- 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 -280
- package/dist/es/components/runtime/utils/page-init-util.js +405 -144
- 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 -54
- 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 -11
- 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 -54
- 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 -33
- 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 -44
- 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 -33
- 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 -33
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
- 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 -213
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
- 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 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
- 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 -265
- 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 -43
- 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 -70
- 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 +246 -59
- 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 -34
- 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 -29
- 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 -65
- 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 -89
- 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 -41
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +756 -230
- 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,36 +1,112 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getCustomTheme
|
|
3
|
-
import { getChartDatasFromPage
|
|
4
|
-
import { updateChartOption
|
|
5
|
-
import
|
|
6
|
-
import { use
|
|
7
|
-
import { CanvasRenderer
|
|
8
|
-
import { GaugeChart
|
|
9
|
-
import { GridComponent
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, createElementBlock, openBlock, normalizeClass, normalizeStyle, unref, 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-gauge-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/common-chart-header.vue.js";
|
|
6
|
+
import { use } from "echarts/core";
|
|
7
|
+
import { CanvasRenderer } from "echarts/renderers";
|
|
8
|
+
import { GaugeChart } from "echarts/charts";
|
|
9
|
+
import { GridComponent, TitleComponent, TooltipComponent, ToolboxComponent } from "echarts/components";
|
|
10
|
+
import VChart from "vue-echarts";
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "gauge-runtime",
|
|
13
|
+
props: {
|
|
14
|
+
pageContext: {},
|
|
15
|
+
configure: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
18
|
+
use([CanvasRenderer, GaugeChart, GridComponent, TitleComponent, TooltipComponent, ToolboxComponent]);
|
|
19
|
+
const props = __props;
|
|
20
|
+
const thisRef = ref(null);
|
|
21
|
+
const chartRef = ref(null);
|
|
22
|
+
const headerRef = ref(null);
|
|
23
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
+
const runtimeStyle = runtimeInfo.style;
|
|
25
|
+
const runtimeClass = runtimeInfo.class;
|
|
26
|
+
const dataConfig = runtimeInfo.dataConfig;
|
|
27
|
+
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
28
|
+
const chartOption = runtimeInfo.chartOption;
|
|
29
|
+
const configureProps = props.configure.props ? props.configure.props : {};
|
|
30
|
+
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
31
|
+
initChartOption(props.configure, chartOption);
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
34
|
+
if (resultData) {
|
|
35
|
+
updateChartDatas(resultData);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
let hisGroupValue = headerInfo.groupValue;
|
|
39
|
+
watch(headerInfo, () => {
|
|
40
|
+
if (hisGroupValue == headerInfo.groupValue) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
hisGroupValue = headerInfo.groupValue;
|
|
44
|
+
if (dataConfig) {
|
|
45
|
+
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
46
|
+
}
|
|
47
|
+
refresh();
|
|
48
|
+
});
|
|
49
|
+
function refresh() {
|
|
50
|
+
if (!dataConfig) {
|
|
51
|
+
console.log("无数据源配置,不需要查询!");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
55
|
+
}
|
|
56
|
+
const monitorFields = headerInfo.monitorFields;
|
|
57
|
+
monitorFieldChange(props.pageContext, monitorFields, refresh);
|
|
58
|
+
function updateChartDatas(resultData) {
|
|
59
|
+
if (!resultData) {
|
|
60
|
+
resultData = [];
|
|
61
|
+
}
|
|
62
|
+
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
63
|
+
if (!resultData) {
|
|
64
|
+
resultData = {};
|
|
65
|
+
}
|
|
66
|
+
if (resultData.hasRender) {
|
|
67
|
+
resultData.hasRender = true;
|
|
68
|
+
console.log("重复更新!", resultData);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
resultData.hasRender = true;
|
|
72
|
+
console.log("gauge resultData", resultData);
|
|
73
|
+
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
74
|
+
console.log("chartOption", chartOption);
|
|
75
|
+
}
|
|
76
|
+
function exportChart() {
|
|
77
|
+
return exportCommonChart(chartRef.value);
|
|
78
|
+
}
|
|
79
|
+
__expose({
|
|
80
|
+
updateChartDatas,
|
|
81
|
+
exportChart
|
|
82
|
+
});
|
|
83
|
+
return (_ctx, _cache) => {
|
|
84
|
+
return openBlock(), createElementBlock("div", {
|
|
85
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
86
|
+
class: normalizeClass([unref(runtimeClass), "amb-widget-chart amb-widget-flex"]),
|
|
87
|
+
ref_key: "thisRef",
|
|
88
|
+
ref: thisRef
|
|
89
|
+
}, [
|
|
90
|
+
withDirectives(createVNode(_sfc_main$1, {
|
|
91
|
+
ref_key: "headerRef",
|
|
92
|
+
ref: headerRef,
|
|
93
|
+
headerInfo: unref(headerInfo),
|
|
94
|
+
configure: _ctx.configure,
|
|
95
|
+
pageContext: _ctx.pageContext
|
|
96
|
+
}, null, 8, ["headerInfo", "configure", "pageContext"]), [
|
|
97
|
+
[vShow, unref(headerInfo).showHeader || _ctx.pageContext.showHomepageSearch]
|
|
98
|
+
]),
|
|
99
|
+
createVNode(unref(VChart), {
|
|
100
|
+
ref_key: "chartRef",
|
|
101
|
+
ref: chartRef,
|
|
102
|
+
theme: unref(customTheme),
|
|
103
|
+
option: unref(chartOption),
|
|
104
|
+
autoresize: ""
|
|
105
|
+
}, null, 8, ["theme", "option"])
|
|
106
|
+
], 6);
|
|
107
|
+
};
|
|
21
108
|
}
|
|
22
|
-
|
|
23
|
-
G != q.groupValue && (G = q.groupValue, T && (T.services[0].groupValue = q.groupValue), J());
|
|
24
|
-
});
|
|
25
|
-
const K = q.monitorFields;
|
|
26
|
-
function L(e3) {
|
|
27
|
-
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
28
|
-
e3.hasRender = true, console.log("gauge resultData", e3), C(D.pageContext, D.configure, A, e3), console.log("chartOption", A);
|
|
29
|
-
}
|
|
30
|
-
return x(D.pageContext, K, J), b2({ updateChartDatas: L, exportChart: function() {
|
|
31
|
-
return m(O.value);
|
|
32
|
-
} }), (e3, o2) => (n(), a("div", { style: s(i(P)), class: u([i(S), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: H }, [c(l(v, { ref_key: "headerRef", ref: z, headerInfo: i(q), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, i(q).showHeader || e3.pageContext.showHomepageSearch]]), l(i(k), { ref_key: "chartRef", ref: O, theme: i(E), option: i(A), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
33
|
-
} });
|
|
109
|
+
});
|
|
34
110
|
export {
|
|
35
|
-
|
|
111
|
+
_sfc_main as default
|
|
36
112
|
};
|
|
@@ -1,47 +1,169 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getCustomTheme
|
|
3
|
-
import { updateChartOption
|
|
4
|
-
import { doClickJumpPageEvent
|
|
5
|
-
import { getChartDatasFromPage
|
|
6
|
-
import
|
|
7
|
-
import { use
|
|
8
|
-
import { CanvasRenderer
|
|
9
|
-
import { PieChart
|
|
10
|
-
import { GridComponent
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, createElementBlock, openBlock, normalizeClass, normalizeStyle, unref, withDirectives, createVNode, vShow } from "vue";
|
|
2
|
+
import { getCustomTheme, initChartOption, monitorChartClickToVariable, clearChartSelected, exportCommonChart } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { updateChartOption } from "../../../../utils/charts/chart-pie-util.js";
|
|
4
|
+
import { doClickJumpPageEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
6
|
+
import _sfc_main$1 from "../common/common-chart-header.vue.js";
|
|
7
|
+
import { use } from "echarts/core";
|
|
8
|
+
import { CanvasRenderer } from "echarts/renderers";
|
|
9
|
+
import { PieChart } from "echarts/charts";
|
|
10
|
+
import { GridComponent, LegendComponent, TitleComponent, TooltipComponent, ToolboxComponent } from "echarts/components";
|
|
11
|
+
import VChart from "vue-echarts";
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "pie-runtime",
|
|
14
|
+
props: {
|
|
15
|
+
pageContext: {},
|
|
16
|
+
configure: {}
|
|
17
|
+
},
|
|
18
|
+
setup(__props, { expose: __expose }) {
|
|
19
|
+
use([
|
|
20
|
+
CanvasRenderer,
|
|
21
|
+
PieChart,
|
|
22
|
+
GridComponent,
|
|
23
|
+
LegendComponent,
|
|
24
|
+
TitleComponent,
|
|
25
|
+
TooltipComponent,
|
|
26
|
+
ToolboxComponent
|
|
27
|
+
]);
|
|
28
|
+
const props = __props;
|
|
29
|
+
const thisRef = ref(null);
|
|
30
|
+
const chartRef = ref(null);
|
|
31
|
+
const headerRef = ref(null);
|
|
32
|
+
const enableDrill = props.configure.props ? props.configure.props.enableDrill : null;
|
|
33
|
+
const drillEndTrigger = props.configure.props ? props.configure.props.drillEndTrigger : null;
|
|
34
|
+
const linkPage = props.configure.props ? props.configure.props.linkPage : null;
|
|
35
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
36
|
+
const runtimeStyle = runtimeInfo.style;
|
|
37
|
+
const runtimeClass = runtimeInfo.class;
|
|
38
|
+
const dataConfig = runtimeInfo.dataConfig;
|
|
39
|
+
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
40
|
+
const chartOption = runtimeInfo.chartOption;
|
|
41
|
+
const configureProps = props.configure.props ? props.configure.props : {};
|
|
42
|
+
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
43
|
+
initChartOption(props.configure, chartOption);
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
46
|
+
if (resultData) {
|
|
47
|
+
updateChartDatas(resultData);
|
|
48
|
+
}
|
|
49
|
+
if (chartRef.value && (enableDrill || linkPage && linkPage.jumpPageUrl)) {
|
|
50
|
+
chartRef.value.chart.on("click", function(params) {
|
|
51
|
+
if (enableDrill) {
|
|
52
|
+
if (headerRef.value && headerRef.value.drill) {
|
|
53
|
+
headerRef.value.drill(params, props.configure.cacheDatas);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
clickToLink();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (!enableDrill && props.configure.clickSet && chartRef.value) {
|
|
61
|
+
monitorChartClickToVariable(props.pageContext, props.configure, chartRef.value.chart);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
function onDrillEnd(params) {
|
|
65
|
+
if (drillEndTrigger == "clearDrill") {
|
|
66
|
+
if (headerRef.value && headerRef.value.closeDrill) {
|
|
67
|
+
headerRef.value.closeDrill(0);
|
|
68
|
+
}
|
|
69
|
+
} else if (drillEndTrigger == "clickEvent") {
|
|
70
|
+
clickToLink();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function clickToLink() {
|
|
74
|
+
if (!linkPage || !linkPage.jumpPageUrl) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
doClickJumpPageEvent(props.pageContext, props.configure, void 0);
|
|
78
|
+
}
|
|
79
|
+
let hisGroupValue = headerInfo.groupValue;
|
|
80
|
+
watch(headerInfo, () => {
|
|
81
|
+
if (hisGroupValue == headerInfo.groupValue) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
hisGroupValue = headerInfo.groupValue;
|
|
85
|
+
if (dataConfig) {
|
|
86
|
+
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
87
|
+
}
|
|
88
|
+
refresh(false);
|
|
89
|
+
});
|
|
90
|
+
function refresh(isHandle) {
|
|
91
|
+
if (!dataConfig) {
|
|
92
|
+
console.log("无数据源配置,不需要查询!");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (isHandle !== true) {
|
|
96
|
+
dataConfig.autoRefresh = true;
|
|
97
|
+
}
|
|
98
|
+
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
99
|
+
}
|
|
100
|
+
const monitorFields = headerInfo.monitorFields;
|
|
101
|
+
monitorFieldChange(props.pageContext, monitorFields, () => {
|
|
102
|
+
refresh(true);
|
|
103
|
+
});
|
|
104
|
+
function updateChartDatas(resultData) {
|
|
105
|
+
if (!resultData) {
|
|
106
|
+
resultData = [];
|
|
107
|
+
}
|
|
108
|
+
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
109
|
+
if (!resultData) {
|
|
110
|
+
resultData = {};
|
|
111
|
+
}
|
|
112
|
+
if (resultData.hasRender) {
|
|
113
|
+
resultData.hasRender = true;
|
|
114
|
+
console.log("重复更新!", resultData);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
resultData.hasRender = true;
|
|
118
|
+
if (!dataConfig.autoRefresh) {
|
|
119
|
+
hisGroupValue = resultData.groupValue;
|
|
120
|
+
if (hisGroupValue && headerInfo.groupComponent !== "checkbox") {
|
|
121
|
+
hisGroupValue = hisGroupValue.join(",");
|
|
122
|
+
}
|
|
123
|
+
headerInfo.groupValue = hisGroupValue;
|
|
124
|
+
}
|
|
125
|
+
if (!dataConfig.autoRefresh || !enableDrill) {
|
|
126
|
+
clearChartSelected(props.pageContext, props.configure, chartRef.value.chart);
|
|
127
|
+
}
|
|
128
|
+
dataConfig.autoRefresh = false;
|
|
129
|
+
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
130
|
+
console.log("chartOption--pie", chartOption);
|
|
131
|
+
}
|
|
132
|
+
function exportChart() {
|
|
133
|
+
return exportCommonChart(chartRef.value);
|
|
134
|
+
}
|
|
135
|
+
__expose({
|
|
136
|
+
updateChartDatas,
|
|
137
|
+
exportChart
|
|
138
|
+
});
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
return openBlock(), createElementBlock("div", {
|
|
141
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
142
|
+
class: normalizeClass([unref(runtimeClass), "amb-widget-chart amb-widget-flex"]),
|
|
143
|
+
ref_key: "thisRef",
|
|
144
|
+
ref: thisRef
|
|
145
|
+
}, [
|
|
146
|
+
withDirectives(createVNode(_sfc_main$1, {
|
|
147
|
+
ref_key: "headerRef",
|
|
148
|
+
ref: headerRef,
|
|
149
|
+
headerInfo: unref(headerInfo),
|
|
150
|
+
configure: _ctx.configure,
|
|
151
|
+
pageContext: _ctx.pageContext,
|
|
152
|
+
onDrillEnd
|
|
153
|
+
}, null, 8, ["headerInfo", "configure", "pageContext"]), [
|
|
154
|
+
[vShow, unref(headerInfo).showHeader || _ctx.pageContext.showHomepageSearch]
|
|
155
|
+
]),
|
|
156
|
+
createVNode(unref(VChart), {
|
|
157
|
+
ref_key: "chartRef",
|
|
158
|
+
ref: chartRef,
|
|
159
|
+
theme: unref(customTheme),
|
|
160
|
+
option: unref(chartOption),
|
|
161
|
+
autoresize: ""
|
|
162
|
+
}, null, 8, ["theme", "option"])
|
|
163
|
+
], 6);
|
|
164
|
+
};
|
|
17
165
|
}
|
|
18
|
-
|
|
19
|
-
q && q.jumpPageUrl && x(O.pageContext, O.configure, void 0);
|
|
20
|
-
}
|
|
21
|
-
g(O.configure, L), o(() => {
|
|
22
|
-
const e3 = C(O.pageContext, O.configure);
|
|
23
|
-
e3 && $(e3), T.value && (z || q && q.jumpPageUrl) && T.value.chart.on("click", function(e4) {
|
|
24
|
-
z ? U.value && U.value.drill && U.value.drill(e4, O.configure.cacheDatas) : W();
|
|
25
|
-
}), !z && O.configure.clickSet && T.value && h(O.pageContext, O.configure, T.value.chart);
|
|
26
|
-
});
|
|
27
|
-
let X = K.groupValue;
|
|
28
|
-
function Y(e3) {
|
|
29
|
-
J ? (true !== e3 && (J.autoRefresh = true), R(O.pageContext, [J], K.drillParams)) : console.log("无数据源配置,不需要查询!");
|
|
30
|
-
}
|
|
31
|
-
t(K, () => {
|
|
32
|
-
X != K.groupValue && (X = K.groupValue, J && (J.services[0].groupValue = K.groupValue), Y(false));
|
|
33
|
-
});
|
|
34
|
-
const Z = K.monitorFields;
|
|
35
|
-
function $(e3) {
|
|
36
|
-
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
37
|
-
e3.hasRender = true, J.autoRefresh || (X = e3.groupValue, X && "checkbox" !== K.groupComponent && (X = X.join(",")), K.groupValue = X), J.autoRefresh && z || m(O.pageContext, O.configure, T.value.chart), J.autoRefresh = false, v(O.pageContext, O.configure, L, e3), console.log("chartOption--pie", L);
|
|
38
|
-
}
|
|
39
|
-
return j(O.pageContext, Z, () => {
|
|
40
|
-
Y(true);
|
|
41
|
-
}), H2({ updateChartDatas: $, exportChart: function() {
|
|
42
|
-
return d(T.value);
|
|
43
|
-
} }), (e3, r2) => (a(), n("div", { style: l(i(B)), class: u([i(G), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: S }, [c(p(k, { ref_key: "headerRef", ref: U, headerInfo: i(K), configure: e3.configure, pageContext: e3.pageContext, onDrillEnd: Q }, null, 8, ["headerInfo", "configure", "pageContext"]), [[s, i(K).showHeader || e3.pageContext.showHomepageSearch]]), p(i(E), { ref_key: "chartRef", ref: T, theme: i(N), option: i(L), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
44
|
-
} });
|
|
166
|
+
});
|
|
45
167
|
export {
|
|
46
|
-
|
|
168
|
+
_sfc_main as default
|
|
47
169
|
};
|
|
@@ -1,36 +1,120 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getCustomTheme
|
|
3
|
-
import { getChartDatasFromPage
|
|
4
|
-
import { updateChartOption
|
|
5
|
-
import
|
|
6
|
-
import { use
|
|
7
|
-
import { CanvasRenderer
|
|
8
|
-
import { RadarChart
|
|
9
|
-
import { GridComponent
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, createElementBlock, openBlock, normalizeClass, normalizeStyle, unref, 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 _sfc_main$1 from "../common/common-chart-header.vue.js";
|
|
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 VChart from "vue-echarts";
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "radar-runtime",
|
|
13
|
+
props: {
|
|
14
|
+
pageContext: {},
|
|
15
|
+
configure: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
18
|
+
use([
|
|
19
|
+
CanvasRenderer,
|
|
20
|
+
RadarChart,
|
|
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
|
+
return 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 amb-widget-flex"]),
|
|
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
|
+
configure: _ctx.configure,
|
|
103
|
+
pageContext: _ctx.pageContext
|
|
104
|
+
}, null, 8, ["headerInfo", "configure", "pageContext"]), [
|
|
105
|
+
[vShow, unref(headerInfo).showHeader || _ctx.pageContext.showHomepageSearch]
|
|
106
|
+
]),
|
|
107
|
+
createVNode(unref(VChart), {
|
|
108
|
+
ref_key: "chartRef",
|
|
109
|
+
ref: chartRef,
|
|
110
|
+
theme: unref(customTheme),
|
|
111
|
+
option: unref(chartOption),
|
|
112
|
+
autoresize: ""
|
|
113
|
+
}, null, 8, ["theme", "option"])
|
|
114
|
+
], 6);
|
|
115
|
+
};
|
|
21
116
|
}
|
|
22
|
-
|
|
23
|
-
J != A.groupValue && (J = A.groupValue, q && (q.services[0].groupValue = A.groupValue), K());
|
|
24
|
-
});
|
|
25
|
-
const L = A.monitorFields;
|
|
26
|
-
function M(e3) {
|
|
27
|
-
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
28
|
-
e3.hasRender = true, C(H.pageContext, H.configure, B, e3), console.log("chartOption", B);
|
|
29
|
-
}
|
|
30
|
-
return x(H.pageContext, L, K), b2({ updateChartDatas: M, exportChart: function() {
|
|
31
|
-
return h(D.value);
|
|
32
|
-
} }), (e3, r2) => (a(), n("div", { style: s(u(S)), class: i([u(T), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: z }, [c(p(v, { ref_key: "headerRef", ref: F, headerInfo: u(A), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[l, u(A).showHeader || e3.pageContext.showHomepageSearch]]), p(u(O), { ref_key: "chartRef", ref: D, theme: u(G), option: u(B), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
33
|
-
} });
|
|
117
|
+
});
|
|
34
118
|
export {
|
|
35
|
-
|
|
119
|
+
_sfc_main as default
|
|
36
120
|
};
|