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
package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js
CHANGED
|
@@ -1,21 +1,111 @@
|
|
|
1
|
-
import { defineComponent
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, renderList } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
|
-
import { handleAfterInitEvent
|
|
4
|
-
import
|
|
5
|
-
import { $t
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import _sfc_main$1 from "../button/button-runtime.vue2.js";
|
|
5
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
const _hoisted_1 = { key: 1 };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "printlabel-runtime",
|
|
9
|
+
props: {
|
|
10
|
+
pageContext: {},
|
|
11
|
+
configure: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
16
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
17
|
+
const showDropdown = ref(false);
|
|
18
|
+
if (designProperty.value.template && designProperty.value.template.length > 1) {
|
|
19
|
+
showDropdown.value = true;
|
|
20
|
+
}
|
|
21
|
+
const runtimeStyle = runtimeInfo.style;
|
|
22
|
+
const runtimeClass = runtimeInfo.class;
|
|
23
|
+
const componentRef = ref(null);
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
nextTick(() => {
|
|
26
|
+
if (showDropdown.value) {
|
|
27
|
+
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
28
|
+
componentRef: componentRef.value,
|
|
29
|
+
entity: props.pageContext.entity.data,
|
|
30
|
+
pageData: props.pageContext.entity.page
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
13
34
|
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
const _component_el_button = resolveComponent("el-button");
|
|
37
|
+
const _component_ArrowDown = resolveComponent("ArrowDown");
|
|
38
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
39
|
+
const _component_el_text = resolveComponent("el-text");
|
|
40
|
+
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
41
|
+
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
42
|
+
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
43
|
+
return !showDropdown.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
44
|
+
key: 0,
|
|
45
|
+
configure: _ctx.configure,
|
|
46
|
+
pageContext: _ctx.pageContext
|
|
47
|
+
}, null, 8, ["configure", "pageContext"])) : (openBlock(), createBlock(_component_el_dropdown, {
|
|
48
|
+
key: 1,
|
|
49
|
+
ref_key: "componentRef",
|
|
50
|
+
ref: componentRef,
|
|
51
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
52
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
53
|
+
placement: designProperty.value.placement,
|
|
54
|
+
"split-button": designProperty.value.splitButton,
|
|
55
|
+
disabled: designProperty.value.state === "disabled",
|
|
56
|
+
type: designProperty.value.buttonType,
|
|
57
|
+
size: designProperty.value.size,
|
|
58
|
+
trigger: designProperty.value.trigger
|
|
59
|
+
}, {
|
|
60
|
+
dropdown: withCtx(() => [
|
|
61
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(designProperty.value.template, (item, index) => {
|
|
64
|
+
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
65
|
+
key: item,
|
|
66
|
+
onClick: ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click", { menuItem: item })
|
|
67
|
+
}, {
|
|
68
|
+
default: withCtx(() => [
|
|
69
|
+
createTextVNode(toDisplayString(unref($t)(item.label)), 1)
|
|
70
|
+
]),
|
|
71
|
+
_: 2
|
|
72
|
+
}, 1032, ["onClick"]);
|
|
73
|
+
}), 128))
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
default: withCtx(() => [
|
|
79
|
+
designProperty.value.triggerElement === "button" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
80
|
+
!designProperty.value.splitButton ? (openBlock(), createBlock(_component_el_button, {
|
|
81
|
+
key: 0,
|
|
82
|
+
size: designProperty.value.size,
|
|
83
|
+
type: designProperty.value.buttonType,
|
|
84
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "menuClick"))
|
|
85
|
+
}, {
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}, 8, ["size", "type"])) : (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(unref($t)(designProperty.value.title)), 1))
|
|
91
|
+
], 64)) : (openBlock(), createBlock(_component_el_text, { key: 1 }, {
|
|
92
|
+
default: withCtx(() => [
|
|
93
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)) + " ", 1),
|
|
94
|
+
createVNode(_component_el_icon, null, {
|
|
95
|
+
default: withCtx(() => [
|
|
96
|
+
createVNode(_component_ArrowDown)
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
})
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}))
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["class", "style", "placement", "split-button", "disabled", "type", "size", "trigger"]));
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
19
109
|
export {
|
|
20
|
-
|
|
110
|
+
_sfc_main as default
|
|
21
111
|
};
|
package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js
CHANGED
|
@@ -1,57 +1,201 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getCustomTheme
|
|
3
|
-
import { getChartDatasFromPage
|
|
4
|
-
import { updateChartOption
|
|
5
|
-
import { doClickJumpPageEvent
|
|
6
|
-
import
|
|
7
|
-
import { use
|
|
8
|
-
import { CanvasRenderer
|
|
9
|
-
import { LineChart
|
|
10
|
-
import { GridComponent
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { updateChartOption } from "../../../../utils/charts/chart-columnline-util.js";
|
|
5
|
+
import { doClickJumpPageEvent } from "../../../../utils/events/event-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 { LineChart, BarChart } from "echarts/charts";
|
|
10
|
+
import { GridComponent, LegendComponent, TitleComponent, TooltipComponent, ToolboxComponent, DataZoomComponent } from "echarts/components";
|
|
11
|
+
import VChart from "vue-echarts";
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "column-line-runtime",
|
|
14
|
+
props: {
|
|
15
|
+
pageContext: {},
|
|
16
|
+
configure: {}
|
|
17
|
+
},
|
|
18
|
+
setup(__props, { expose: __expose }) {
|
|
19
|
+
use([
|
|
20
|
+
CanvasRenderer,
|
|
21
|
+
LineChart,
|
|
22
|
+
GridComponent,
|
|
23
|
+
LegendComponent,
|
|
24
|
+
TitleComponent,
|
|
25
|
+
TooltipComponent,
|
|
26
|
+
BarChart,
|
|
27
|
+
ToolboxComponent,
|
|
28
|
+
DataZoomComponent
|
|
29
|
+
]);
|
|
30
|
+
const props = __props;
|
|
31
|
+
const thisRef = ref(null);
|
|
32
|
+
const chartRef = ref();
|
|
33
|
+
const headerRef = ref(null);
|
|
34
|
+
const enableDrill = props.configure.props ? props.configure.props.enableDrill : null;
|
|
35
|
+
const drillEndTrigger = props.configure.props ? props.configure.props.drillEndTrigger : null;
|
|
36
|
+
const linkPage = props.configure.props ? props.configure.props.linkPage : null;
|
|
37
|
+
const linkConfigureMap = {};
|
|
38
|
+
if (props.configure.items) {
|
|
39
|
+
for (const item of props.configure.items) {
|
|
40
|
+
if (item.props && item.props.linkPage && item.props.linkPage.jumpPageUrl) {
|
|
41
|
+
linkConfigureMap[item.uuid] = item;
|
|
42
|
+
} else if (linkPage && linkPage.jumpPageUrl) {
|
|
43
|
+
linkConfigureMap[item.uuid] = props.configure;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
48
|
+
const runtimeStyle = runtimeInfo.style;
|
|
49
|
+
const runtimeClass = runtimeInfo.class;
|
|
50
|
+
const dataConfig = runtimeInfo.dataConfig;
|
|
51
|
+
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
52
|
+
const chartOption = runtimeInfo.chartOption;
|
|
53
|
+
const configureProps = props.configure.props ? props.configure.props : {};
|
|
54
|
+
const customTheme = getCustomTheme(configureProps.customTheme);
|
|
55
|
+
initChartOption(props.configure, chartOption);
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
58
|
+
if (resultData) {
|
|
59
|
+
updateChartDatas(resultData);
|
|
60
|
+
}
|
|
61
|
+
if (chartRef.value && (enableDrill || Object.keys(linkConfigureMap).length > 0)) {
|
|
62
|
+
chartRef.value.chart.on("click", function(params) {
|
|
63
|
+
if (enableDrill) {
|
|
64
|
+
if (headerRef.value && headerRef.value.drill) {
|
|
65
|
+
headerRef.value.drill(params, props.configure.cacheDatas);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
clickToLink(params);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (!enableDrill && props.configure.clickSet && chartRef.value) {
|
|
73
|
+
monitorChartClickToVariable(props.pageContext, props.configure, chartRef.value.chart);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
function onDrillEnd(params) {
|
|
77
|
+
if (drillEndTrigger == "clearDrill") {
|
|
78
|
+
if (headerRef.value && headerRef.value.closeDrill) {
|
|
79
|
+
headerRef.value.closeDrill(0);
|
|
80
|
+
}
|
|
81
|
+
} else if (drillEndTrigger === "clickEvent") {
|
|
82
|
+
clickToLink(params);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function clickToLink(clickParams) {
|
|
86
|
+
console.log("clik0", clickParams);
|
|
87
|
+
if (clickParams.seriesIndex >= chartOption.series.length) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
console.log("clik1", clickParams);
|
|
91
|
+
const selSerieUuid = chartOption.series[clickParams.seriesIndex].uuid;
|
|
92
|
+
console.log("clik2", selSerieUuid);
|
|
93
|
+
const linkConfigure = linkConfigureMap[selSerieUuid];
|
|
94
|
+
console.log("clik3", linkConfigure);
|
|
95
|
+
if (!linkConfigure) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const params = {
|
|
99
|
+
data: clickParams.data,
|
|
100
|
+
dataIndex: clickParams.dataIndex,
|
|
101
|
+
name: clickParams.name,
|
|
102
|
+
seriesId: clickParams.seriesId,
|
|
103
|
+
seriesIndex: clickParams.seriesIndex,
|
|
104
|
+
seriesName: clickParams.seriesName,
|
|
105
|
+
seriesType: clickParams.seriesType,
|
|
106
|
+
value: clickParams.value
|
|
107
|
+
};
|
|
108
|
+
doClickJumpPageEvent(props.pageContext, linkConfigure, params);
|
|
109
|
+
}
|
|
110
|
+
let hisGroupValue = headerInfo.groupValue;
|
|
111
|
+
watch(headerInfo, () => {
|
|
112
|
+
if (hisGroupValue == headerInfo.groupValue) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
hisGroupValue = headerInfo.groupValue;
|
|
116
|
+
if (dataConfig) {
|
|
117
|
+
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
118
|
+
}
|
|
119
|
+
refresh(false);
|
|
120
|
+
});
|
|
121
|
+
function refresh(isHandle) {
|
|
122
|
+
if (!dataConfig) {
|
|
123
|
+
console.log("无数据源配置,不需要查询!");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (isHandle !== true) {
|
|
127
|
+
dataConfig.autoRefresh = true;
|
|
128
|
+
}
|
|
129
|
+
updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
130
|
+
}
|
|
131
|
+
const monitorFields = headerInfo.monitorFields;
|
|
132
|
+
monitorFieldChange(props.pageContext, monitorFields, () => {
|
|
133
|
+
refresh(true);
|
|
134
|
+
});
|
|
135
|
+
function updateChartDatas(resultData) {
|
|
136
|
+
var _a;
|
|
137
|
+
if (!resultData) {
|
|
138
|
+
resultData = [];
|
|
139
|
+
}
|
|
140
|
+
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
141
|
+
if (!resultData) {
|
|
142
|
+
resultData = {};
|
|
143
|
+
}
|
|
144
|
+
if (resultData.hasRender) {
|
|
145
|
+
resultData.hasRender = true;
|
|
146
|
+
console.log("重复更新!", resultData);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
resultData.hasRender = true;
|
|
150
|
+
if (!dataConfig.autoRefresh) {
|
|
151
|
+
hisGroupValue = resultData.groupValue;
|
|
152
|
+
if (hisGroupValue && headerInfo.groupComponent !== "checkbox") {
|
|
153
|
+
hisGroupValue = hisGroupValue.join(",");
|
|
154
|
+
}
|
|
155
|
+
headerInfo.groupValue = hisGroupValue;
|
|
156
|
+
}
|
|
157
|
+
if (!dataConfig.autoRefresh || !enableDrill) {
|
|
158
|
+
clearChartSelected(props.pageContext, props.configure, (_a = chartRef.value) == null ? void 0 : _a.chart);
|
|
159
|
+
}
|
|
160
|
+
dataConfig.autoRefresh = false;
|
|
161
|
+
updateChartOption(props.pageContext, props.configure, chartOption, resultData);
|
|
162
|
+
}
|
|
163
|
+
function exportChart() {
|
|
164
|
+
return exportCommonChart(chartRef.value);
|
|
165
|
+
}
|
|
166
|
+
__expose({
|
|
167
|
+
updateChartDatas,
|
|
168
|
+
exportChart,
|
|
169
|
+
chartOption
|
|
170
|
+
});
|
|
171
|
+
return (_ctx, _cache) => {
|
|
172
|
+
return openBlock(), createElementBlock("div", {
|
|
173
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
174
|
+
class: normalizeClass([unref(runtimeClass), "amb-widget-chart amb-widget-flex"]),
|
|
175
|
+
ref_key: "thisRef",
|
|
176
|
+
ref: thisRef
|
|
177
|
+
}, [
|
|
178
|
+
withDirectives(createVNode(_sfc_main$1, {
|
|
179
|
+
ref_key: "headerRef",
|
|
180
|
+
ref: headerRef,
|
|
181
|
+
headerInfo: unref(headerInfo),
|
|
182
|
+
configure: _ctx.configure,
|
|
183
|
+
pageContext: _ctx.pageContext,
|
|
184
|
+
onDrillEnd
|
|
185
|
+
}, null, 8, ["headerInfo", "configure", "pageContext"]), [
|
|
186
|
+
[vShow, unref(headerInfo).showHeader || _ctx.pageContext.showHomepageSearch]
|
|
187
|
+
]),
|
|
188
|
+
createVNode(unref(VChart), {
|
|
189
|
+
ref_key: "chartRef",
|
|
190
|
+
ref: chartRef,
|
|
191
|
+
theme: unref(customTheme),
|
|
192
|
+
option: unref(chartOption),
|
|
193
|
+
autoresize: ""
|
|
194
|
+
}, null, 8, ["theme", "option"])
|
|
195
|
+
], 6);
|
|
196
|
+
};
|
|
19
197
|
}
|
|
20
|
-
|
|
21
|
-
if (console.log("clik0", e3), e3.seriesIndex >= Q.series.length) return;
|
|
22
|
-
console.log("clik1", e3);
|
|
23
|
-
const r2 = Q.series[e3.seriesIndex].uuid;
|
|
24
|
-
console.log("clik2", r2);
|
|
25
|
-
const o2 = B[r2];
|
|
26
|
-
if (console.log("clik3", o2), !o2) return;
|
|
27
|
-
const t2 = { data: e3.data, dataIndex: e3.dataIndex, name: e3.name, seriesId: e3.seriesId, seriesIndex: e3.seriesIndex, seriesName: e3.seriesName, seriesType: e3.seriesType, value: e3.value };
|
|
28
|
-
I(N.pageContext, o2, t2);
|
|
29
|
-
}
|
|
30
|
-
g(N.configure, Q), o(() => {
|
|
31
|
-
const e3 = v(N.pageContext, N.configure);
|
|
32
|
-
e3 && oe(e3), U.value && (F || Object.keys(B).length > 0) && U.value.chart.on("click", function(e4) {
|
|
33
|
-
F ? z.value && z.value.drill && z.value.drill(e4, N.configure.cacheDatas) : Z(e4);
|
|
34
|
-
}), !F && N.configure.clickSet && U.value && m(N.pageContext, N.configure, U.value.chart);
|
|
35
|
-
});
|
|
36
|
-
let $ = M.groupValue;
|
|
37
|
-
function ee(e3) {
|
|
38
|
-
L ? (true !== e3 && (L.autoRefresh = true), x(N.pageContext, [L], M.drillParams)) : console.log("无数据源配置,不需要查询!");
|
|
39
|
-
}
|
|
40
|
-
t(M, () => {
|
|
41
|
-
$ != M.groupValue && ($ = M.groupValue, L && (L.services[0].groupValue = M.groupValue), ee(false));
|
|
42
|
-
});
|
|
43
|
-
const re = M.monitorFields;
|
|
44
|
-
function oe(e3) {
|
|
45
|
-
var _a;
|
|
46
|
-
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
47
|
-
e3.hasRender = true, L.autoRefresh || ($ = e3.groupValue, $ && "checkbox" !== M.groupComponent && ($ = $.join(",")), M.groupValue = $), L.autoRefresh && F || h(N.pageContext, N.configure, (_a = U.value) == null ? void 0 : _a.chart), L.autoRefresh = false, k(N.pageContext, N.configure, Q, e3);
|
|
48
|
-
}
|
|
49
|
-
return C(N.pageContext, re, () => {
|
|
50
|
-
ee(true);
|
|
51
|
-
}), H2({ updateChartDatas: oe, exportChart: function() {
|
|
52
|
-
return d(U.value);
|
|
53
|
-
}, chartOption: Q }), (e3, r2) => (i(), n("div", { style: l(u(J)), class: a([u(K), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: S }, [s(c(R, { ref_key: "headerRef", ref: z, headerInfo: u(M), configure: e3.configure, pageContext: e3.pageContext, onDrillEnd: Y }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, u(M).showHeader || e3.pageContext.showHomepageSearch]]), c(u(O), { ref_key: "chartRef", ref: U, theme: u(X), option: u(Q), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
54
|
-
} });
|
|
198
|
+
});
|
|
55
199
|
export {
|
|
56
|
-
|
|
200
|
+
_sfc_main as default
|
|
57
201
|
};
|
|
@@ -1,14 +1,44 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { ArrowRight
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
1
|
+
import { defineComponent, resolveComponent, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { ArrowRight } from "@element-plus/icons-vue";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "common-chart-header-breadcrumb",
|
|
5
|
+
props: {
|
|
6
|
+
headerInfo: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
emits: ["close-drill"],
|
|
12
|
+
setup(__props, { emit: __emit }) {
|
|
13
|
+
const $emits = __emit;
|
|
14
|
+
function closeDrill(drillIndex) {
|
|
15
|
+
$emits("close-drill", drillIndex);
|
|
16
|
+
}
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
19
|
+
const _component_el_breadcrumb = resolveComponent("el-breadcrumb");
|
|
20
|
+
return openBlock(), createBlock(_component_el_breadcrumb, { "separator-icon": unref(ArrowRight) }, {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.headerInfo.drillOptions, (tag, index) => {
|
|
23
|
+
return openBlock(), createBlock(_component_el_tag, {
|
|
24
|
+
key: tag.name,
|
|
25
|
+
closable: "",
|
|
26
|
+
type: "success",
|
|
27
|
+
style: { "margin-left": "4px" },
|
|
28
|
+
onClose: ($event) => closeDrill(index)
|
|
29
|
+
}, {
|
|
30
|
+
default: withCtx(() => [
|
|
31
|
+
createTextVNode(toDisplayString(tag.label), 1)
|
|
32
|
+
]),
|
|
33
|
+
_: 2
|
|
34
|
+
}, 1032, ["onClose"]);
|
|
35
|
+
}), 128))
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
}, 8, ["separator-icon"]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
12
42
|
export {
|
|
13
|
-
|
|
43
|
+
_sfc_main as default
|
|
14
44
|
};
|
package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js
CHANGED
|
@@ -1,13 +1,62 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
1
|
+
import { defineComponent, watch, resolveComponent, createBlock, createElementBlock, openBlock, withCtx, Fragment, renderList } from "vue";
|
|
2
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
+
__name: "common-chart-header-group",
|
|
4
|
+
props: {
|
|
5
|
+
headerInfo: {
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
watch(props.headerInfo, () => {
|
|
13
|
+
console.log("props.headerInfo", props.headerInfo);
|
|
14
|
+
});
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
17
|
+
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
18
|
+
const _component_el_radio = resolveComponent("el-radio");
|
|
19
|
+
const _component_el_radio_button = resolveComponent("el-radio-button");
|
|
20
|
+
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
21
|
+
return __props.headerInfo.groupComponent == "checkbox" ? (openBlock(), createBlock(_component_el_checkbox_group, {
|
|
22
|
+
key: 0,
|
|
23
|
+
modelValue: __props.headerInfo.groupValue,
|
|
24
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.headerInfo.groupValue = $event)
|
|
25
|
+
}, {
|
|
26
|
+
default: withCtx(() => [
|
|
27
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.headerInfo.options, (o) => {
|
|
28
|
+
return openBlock(), createBlock(_component_el_checkbox, {
|
|
29
|
+
label: o.label,
|
|
30
|
+
value: o.value
|
|
31
|
+
}, null, 8, ["label", "value"]);
|
|
32
|
+
}), 256))
|
|
33
|
+
]),
|
|
34
|
+
_: 1
|
|
35
|
+
}, 8, ["modelValue"])) : __props.headerInfo.groupComponent == "radio" ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.headerInfo.options, (o) => {
|
|
36
|
+
return openBlock(), createBlock(_component_el_radio, {
|
|
37
|
+
modelValue: __props.headerInfo.groupValue,
|
|
38
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => __props.headerInfo.groupValue = $event),
|
|
39
|
+
value: o.value,
|
|
40
|
+
label: o.label
|
|
41
|
+
}, null, 8, ["modelValue", "value", "label"]);
|
|
42
|
+
}), 256)) : (openBlock(), createBlock(_component_el_radio_group, {
|
|
43
|
+
key: 2,
|
|
44
|
+
modelValue: __props.headerInfo.groupValue,
|
|
45
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __props.headerInfo.groupValue = $event)
|
|
46
|
+
}, {
|
|
47
|
+
default: withCtx(() => [
|
|
48
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.headerInfo.options, (o) => {
|
|
49
|
+
return openBlock(), createBlock(_component_el_radio_button, {
|
|
50
|
+
label: o.label,
|
|
51
|
+
value: o.value
|
|
52
|
+
}, null, 8, ["label", "value"]);
|
|
53
|
+
}), 256))
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["modelValue"]));
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
11
60
|
export {
|
|
12
|
-
|
|
61
|
+
_sfc_main as default
|
|
13
62
|
};
|