super-page-runtime 2.1.92 → 2.1.95

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.
Files changed (159) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
  7. package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
  8. package/dist/es/components/runtime/utils/barcode-util.js +10 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -303
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
  15. package/dist/es/components/runtime/utils/common-util.js +82 -152
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  17. package/dist/es/components/runtime/utils/events/event-util.js +361 -727
  18. package/dist/es/components/runtime/utils/events/print-label.js +73 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +835 -2283
  20. package/dist/es/components/runtime/utils/events/validator-util.js +236 -555
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
  23. package/dist/es/components/runtime/utils/global-refs.js +45 -69
  24. package/dist/es/components/runtime/utils/i18n-util.js +12 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  26. package/dist/es/components/runtime/utils/page-helper-util.js +295 -603
  27. package/dist/es/components/runtime/utils/page-init-util.js +134 -369
  28. package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
  29. package/dist/es/components/runtime/utils/page-store.js +8 -12
  30. package/dist/es/components/runtime/utils/store-util.js +9 -13
  31. package/dist/es/components/runtime/utils/store.js +2 -2
  32. package/dist/es/components/runtime/utils/table-utils.js +49 -84
  33. package/dist/es/components/runtime/utils/tree-utils.js +18 -36
  34. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  35. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  36. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  38. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
  40. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  42. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  44. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
  46. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  47. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  53. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  54. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  56. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  58. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  60. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
  61. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  62. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  64. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
  66. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  70. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -513
  71. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  72. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
  74. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  75. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  76. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  79. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  80. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  81. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  83. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  85. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  87. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  89. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  91. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  93. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  95. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
  96. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  97. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
  98. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  99. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
  101. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -216
  103. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  104. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  105. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
  107. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
  108. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
  111. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
  113. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
  115. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
  117. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
  119. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  121. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
  123. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
  125. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  127. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  128. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  129. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  130. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
  131. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  132. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
  133. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
  135. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  137. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  139. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
  141. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  143. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
  144. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  145. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
  147. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  148. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
  149. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  150. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
  151. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  153. package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
  154. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  155. package/dist/es/components/runtime/views/super-page.vue.js +232 -708
  156. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  157. package/dist/es/i18n/langs/cn.js +2 -55
  158. package/dist/es/i18n/langs/en.js +2 -55
  159. 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 _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
- 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
- _sfc_main as default
34
+ z as default
118
35
  };
@@ -1,4 +1,4 @@
1
- import _sfc_main from "./scatter-runtime.vue2.js";
1
+ import t from "./scatter-runtime.vue2.js";
2
2
  export {
3
- _sfc_main as default
3
+ t as default
4
4
  };
@@ -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 _sfc_main$1 from "../common/common-chart-header.vue.js";
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 VChart from "vue-echarts";
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- __name: "scatter-runtime",
13
- props: {
14
- pageContext: {},
15
- configure: {}
16
- },
17
- setup(__props, { expose: __expose }) {
18
- use([
19
- CanvasRenderer,
20
- ScatterChart,
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
- _sfc_main as default
34
+ D as default
119
35
  };