super-page-runtime 2.2.26 → 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 -68
- 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 -36
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -224
- 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 -72
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -808
- 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 -61
- 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 -279
- package/dist/es/components/runtime/utils/page-init-util.js +406 -141
- 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 -50
- 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 -7
- 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 -52
- 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 -32
- 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 -43
- 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 -32
- 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 -32
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +597 -246
- 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 -212
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -29
- 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 -61
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -302
- 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 -262
- 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 -42
- 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 -68
- 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 +245 -57
- 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 -32
- 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 -28
- 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 -64
- 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 -88
- 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 -40
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -20
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +754 -226
- 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,23 +1,61 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
import { getClickEventFuncByType
|
|
4
|
-
import { isVisibleWorkflowButton
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import _sfc_main$1 from "../../object-render.vue.js";
|
|
3
|
+
import { getClickEventFuncByType } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import { isVisibleWorkflowButton } from "../../../../utils/events/standard-event.js";
|
|
5
|
+
const _hoisted_1 = { class: "page-runtime-header-btn" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "workflowbutton-runtime",
|
|
8
|
+
props: {
|
|
9
|
+
pageContext: {},
|
|
10
|
+
configure: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
|
+
ref(runtimeInfo.style ? runtimeInfo.style : {});
|
|
16
|
+
runtimeInfo.class;
|
|
17
|
+
const buttonInfo = props.pageContext.workflowButtonComponent;
|
|
18
|
+
const completeTaskParam = props.pageContext.completeTaskParam;
|
|
19
|
+
const visibleBtns = ref([]);
|
|
20
|
+
props.configure.items.forEach((item) => {
|
|
21
|
+
if (isVisibleBtn(item)) {
|
|
22
|
+
visibleBtns.value.push(item);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function getStandardClickEvent(events) {
|
|
26
|
+
const clickEventFunObj = getClickEventFuncByType(props.pageContext, events, "click");
|
|
27
|
+
if (clickEventFunObj) {
|
|
28
|
+
const isStandardEvent = clickEventFunObj.isStandard;
|
|
29
|
+
if (isStandardEvent) {
|
|
30
|
+
return clickEventFunObj.event.eventName;
|
|
15
31
|
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function isVisibleBtn(btnConfigure) {
|
|
35
|
+
const events = btnConfigure.runtime && btnConfigure.runtime.events ? btnConfigure.runtime.events : [];
|
|
36
|
+
const workflowStandardEventName = getStandardClickEvent(events);
|
|
37
|
+
const isVisible = isVisibleWorkflowButton(
|
|
38
|
+
workflowStandardEventName,
|
|
39
|
+
buttonInfo,
|
|
40
|
+
completeTaskParam
|
|
41
|
+
);
|
|
42
|
+
return isVisible;
|
|
43
|
+
}
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createElementBlock("span", _hoisted_1, [
|
|
46
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleBtns.value, (element, itemIndex) => {
|
|
47
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
48
|
+
element.check ? (openBlock(), createBlock(_sfc_main$1, {
|
|
49
|
+
key: itemIndex,
|
|
50
|
+
pageContext: _ctx.pageContext,
|
|
51
|
+
configure: element
|
|
52
|
+
}, null, 8, ["pageContext", "configure"])) : createCommentVNode("", true)
|
|
53
|
+
], 64);
|
|
54
|
+
}), 256))
|
|
55
|
+
]);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
21
59
|
export {
|
|
22
|
-
|
|
60
|
+
_sfc_main as default
|
|
23
61
|
};
|
|
@@ -1,18 +1,55 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { getVariableValue
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, createElementBlock, createCommentVNode, openBlock, normalizeClass, unref, createElementVNode, normalizeStyle, toDisplayString } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "workflownode-runtime",
|
|
6
|
+
props: {
|
|
7
|
+
pageContext: {},
|
|
8
|
+
configure: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props, { expose: __expose }) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const showTaskName = ref(false);
|
|
13
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
14
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
16
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
17
|
+
const runtimeClass = runtimeInfo.class;
|
|
18
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
19
|
+
let taskName = ref("");
|
|
20
|
+
if (props.pageContext.pageType === "form") {
|
|
21
|
+
if (props.pageContext.entity && props.pageContext.entity.data) {
|
|
22
|
+
taskName.value = props.pageContext.entity.data["CURRENT_ACTIVITY_NAME"] || props.pageContext.entity.data["current_activity_name"];
|
|
23
|
+
showTaskName.value = props.pageContext.entity.data["WORKFLOW_ID"] ? true : false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
onMounted(() => {
|
|
27
|
+
});
|
|
28
|
+
function getValue() {
|
|
29
|
+
return getVariableValue(entity, dynamicFields);
|
|
30
|
+
}
|
|
31
|
+
function setValue(value) {
|
|
32
|
+
return setVariableValue(entity, dynamicFields, value);
|
|
33
|
+
}
|
|
34
|
+
__expose({
|
|
35
|
+
getValue,
|
|
36
|
+
setValue
|
|
37
|
+
});
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
return showTaskName.value ? (openBlock(), createElementBlock("span", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: normalizeClass(unref(runtimeClass))
|
|
42
|
+
}, [
|
|
43
|
+
createElementVNode("span", {
|
|
44
|
+
style: normalizeStyle(unref(headerStyle))
|
|
45
|
+
}, [
|
|
46
|
+
createElementVNode("span", null, toDisplayString(designProperty.value.title), 1),
|
|
47
|
+
createElementVNode("span", null, toDisplayString(unref(taskName)), 1)
|
|
48
|
+
], 4)
|
|
49
|
+
], 2)) : createCommentVNode("", true);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
16
53
|
export {
|
|
17
|
-
|
|
54
|
+
_sfc_main as default
|
|
18
55
|
};
|
|
@@ -1,44 +1,164 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { deepCopy
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { updateOptionDatasources
|
|
6
|
-
import { initPageEvents
|
|
7
|
-
import { setHomeChartInitConfigValue
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { defineComponent, ref, onUnmounted, resolveDirective, withDirectives, createElementBlock, openBlock, createBlock, createCommentVNode, unref } from "vue";
|
|
2
|
+
import { deepCopy } from "../utils/common-util.js";
|
|
3
|
+
import _sfc_main$1 from "./assemblys/home-chart-render.vue.js";
|
|
4
|
+
import http from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { updateOptionDatasources, updateChartDatasources } from "../utils/page-helper-util.js";
|
|
6
|
+
import { initPageEvents } from "../utils/events/event-util.js";
|
|
7
|
+
import { setHomeChartInitConfigValue } from "../utils/charts/chart-util.js";
|
|
8
|
+
const _hoisted_1 = { "element-loading-text": "加载中..." };
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...{
|
|
11
|
+
name: "HomeChart",
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
},
|
|
14
|
+
__name: "home-chart",
|
|
15
|
+
props: {
|
|
16
|
+
// 图表编码
|
|
17
|
+
chartCode: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
homeChartSettingUserId: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 0
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const loading = ref(true);
|
|
29
|
+
const chartNotExists = ref(false);
|
|
30
|
+
const homeChartConfig = ref({});
|
|
31
|
+
let pageContext = ref(null);
|
|
32
|
+
let timer;
|
|
33
|
+
if (props.chartCode) {
|
|
34
|
+
http.get(
|
|
35
|
+
window.$vueApp.config.globalProperties.baseAPI + "/mms/home-chart-layout/" + props.chartCode
|
|
36
|
+
).then((homeChartLayout) => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
if (homeChartLayout && homeChartLayout.designJson) {
|
|
39
|
+
const homeChartLayoutDesignJson = JSON.parse(homeChartLayout.designJson);
|
|
40
|
+
let homeMyChartsAlias = window.localStorage.getItem("HOME_MY_CHARTS_ALIAS");
|
|
41
|
+
if (homeMyChartsAlias) {
|
|
42
|
+
const homeMyChartsAliasJson = JSON.parse(homeMyChartsAlias);
|
|
43
|
+
if (homeMyChartsAliasJson[props.homeChartSettingUserId]) {
|
|
44
|
+
if (homeChartLayoutDesignJson.chartJson.runtime.headerInfo) {
|
|
45
|
+
homeChartLayoutDesignJson.chartJson.runtime.headerInfo.title = homeMyChartsAliasJson[props.homeChartSettingUserId];
|
|
46
|
+
} else {
|
|
47
|
+
homeChartLayoutDesignJson.chartJson.runtime.headerInfo = {
|
|
48
|
+
textAlign: "center",
|
|
49
|
+
title: homeMyChartsAliasJson[props.homeChartSettingUserId]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const iframeElement = window.frameElement;
|
|
55
|
+
homeChartConfig.value = homeChartLayoutDesignJson.chartJson;
|
|
56
|
+
homeChartConfig.value.homeChartSettingUserId = props.homeChartSettingUserId;
|
|
57
|
+
if (iframeElement) {
|
|
58
|
+
console.log(iframeElement.clientHeight + "iframeElement.clientHeight");
|
|
59
|
+
homeChartConfig.value.runtime.common.style.pc_style.height = iframeElement.clientHeight + "px";
|
|
60
|
+
}
|
|
61
|
+
const tempContext = {
|
|
62
|
+
showHomepageSearch: false,
|
|
63
|
+
name: homeChartLayout.pageName,
|
|
64
|
+
code: homeChartLayout.pageCode,
|
|
65
|
+
label: "",
|
|
66
|
+
dimensions: "",
|
|
67
|
+
version: 1,
|
|
68
|
+
isWorkflowEntity: false,
|
|
69
|
+
variables: homeChartLayoutDesignJson.variables,
|
|
70
|
+
systemCode: homeChartLayout.systemCode,
|
|
71
|
+
uuid: homeChartLayout.uuid,
|
|
72
|
+
allChartUuids: [],
|
|
73
|
+
backendUrl: homeChartLayout.backendUrl,
|
|
74
|
+
rules: {},
|
|
75
|
+
pageType: "chart",
|
|
76
|
+
// 页面类型:form、list、chart
|
|
77
|
+
beanName: homeChartLayoutDesignJson.beanName,
|
|
78
|
+
// 业务处理类,继承CommonBaseService接口的类
|
|
79
|
+
initChartServiceConfigs: [homeChartLayoutDesignJson.initChartServiceConfigs],
|
|
80
|
+
entity: {
|
|
81
|
+
data: {},
|
|
82
|
+
task: {},
|
|
83
|
+
request: {},
|
|
84
|
+
//初始化request对象
|
|
85
|
+
page: {},
|
|
86
|
+
context: homeChartLayout.contextParam,
|
|
87
|
+
system: homeChartLayout.systemParam
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
if (((_a = homeChartConfig.value.pushHomepage) == null ? void 0 : _a.searchConditions) && ((_b = homeChartConfig.value.pushHomepage) == null ? void 0 : _b.searchConditions.length) > 0) {
|
|
91
|
+
tempContext.showHomepageSearch = true;
|
|
92
|
+
}
|
|
93
|
+
if (homeChartLayoutDesignJson.variables) {
|
|
94
|
+
const pageObj = tempContext.entity.page;
|
|
95
|
+
for (const variable of homeChartLayoutDesignJson.variables) {
|
|
96
|
+
if (variable.name) {
|
|
97
|
+
if (variable.isArrayElement) {
|
|
98
|
+
pageObj[variable.name] = [];
|
|
99
|
+
} else if (variable.defaultValue) {
|
|
100
|
+
pageObj[variable.name] = variable.defaultValue;
|
|
101
|
+
} else {
|
|
102
|
+
pageObj[variable.name] = void 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (homeChartLayoutDesignJson.initOptionConfigs && homeChartLayoutDesignJson.initOptionConfigs.length > 0) {
|
|
108
|
+
updateOptionDatasources(
|
|
109
|
+
tempContext,
|
|
110
|
+
homeChartLayoutDesignJson.initOptionConfigs,
|
|
111
|
+
void 0
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
setHomeChartInitConfigValue(
|
|
115
|
+
homeChartConfig.value.pushHomepage.initConfig,
|
|
116
|
+
tempContext,
|
|
117
|
+
props.homeChartSettingUserId
|
|
118
|
+
);
|
|
119
|
+
initPageEvents(homeChartLayoutDesignJson, tempContext);
|
|
120
|
+
pageContext.value = tempContext;
|
|
121
|
+
timer = setTimeout(() => {
|
|
122
|
+
initChartDatas(pageContext.value, [homeChartLayoutDesignJson.initChartServiceConfigs]);
|
|
123
|
+
}, 200);
|
|
124
|
+
} else {
|
|
125
|
+
chartNotExists.value = true;
|
|
126
|
+
}
|
|
127
|
+
}).finally(() => {
|
|
128
|
+
loading.value = false;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function initChartDatas(pageContext2, initChartServiceConfigs) {
|
|
132
|
+
if (!initChartServiceConfigs || initChartServiceConfigs.length == 0) {
|
|
133
|
+
console.log("无需要初始化时统计的统计图数据");
|
|
134
|
+
return;
|
|
18
135
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
for (const a3 of t2.variables) a3.name && (a3.isArrayElement ? e4[a3.name] = [] : a3.defaultValue ? e4[a3.name] = a3.defaultValue : e4[a3.name] = void 0);
|
|
136
|
+
pageContext2.initChartData = {};
|
|
137
|
+
pageContext2.initChartData.data = deepCopy(pageContext2.entity.data);
|
|
138
|
+
pageContext2.initChartData.page = deepCopy(pageContext2.entity.page);
|
|
139
|
+
if (initChartServiceConfigs && initChartServiceConfigs.length > 0) {
|
|
140
|
+
updateChartDatasources(pageContext2, initChartServiceConfigs, null, true);
|
|
25
141
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
142
|
+
}
|
|
143
|
+
onUnmounted(() => {
|
|
144
|
+
if (timer) {
|
|
145
|
+
clearTimeout(timer);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return (_ctx, _cache) => {
|
|
149
|
+
const _directive_loading = resolveDirective("loading");
|
|
150
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
|
151
|
+
!loading.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
152
|
+
key: 0,
|
|
153
|
+
configure: homeChartConfig.value,
|
|
154
|
+
pageContext: unref(pageContext)
|
|
155
|
+
}, null, 8, ["configure", "pageContext"])) : createCommentVNode("", true)
|
|
156
|
+
])), [
|
|
157
|
+
[_directive_loading, loading.value]
|
|
158
|
+
]);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
42
162
|
export {
|
|
43
|
-
|
|
163
|
+
_sfc_main as default
|
|
44
164
|
};
|
|
@@ -1,25 +1,144 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { defineComponent, ref, resolveComponent, createBlock, openBlock, withCtx, createElementBlock, createCommentVNode } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./super-page.vue.js";
|
|
3
|
+
const _hoisted_1 = ["src"];
|
|
4
|
+
const _hoisted_2 = ["src"];
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "super-page-dialog",
|
|
7
|
+
props: {
|
|
8
|
+
parentPageContext: {},
|
|
9
|
+
parentPageEventParams: {},
|
|
10
|
+
jumpPageSetting: {},
|
|
11
|
+
isTest: { type: Boolean },
|
|
12
|
+
customParams: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["open", "opened", "close", "closed"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const emits = __emit;
|
|
18
|
+
const showContent = ref(true);
|
|
19
|
+
const myJumpPageSetting = props.jumpPageSetting ? props.jumpPageSetting : null;
|
|
20
|
+
const width = ref(null);
|
|
21
|
+
const title = ref(null);
|
|
22
|
+
const pageCode = ref(null);
|
|
23
|
+
const dataId = ref(null);
|
|
24
|
+
const taskId = ref(null);
|
|
25
|
+
const dialogType = ref(null);
|
|
26
|
+
const pageRequest = ref({});
|
|
27
|
+
const draggable = ref(false);
|
|
28
|
+
const overflow = ref(false);
|
|
29
|
+
const showPosition = ref("rtl");
|
|
30
|
+
const contentHeight = ref(null);
|
|
31
|
+
const isIframe = ref(false);
|
|
32
|
+
const pageUrl = ref(null);
|
|
33
|
+
if (myJumpPageSetting) {
|
|
34
|
+
console.log("弹出页面myJumpPageSetting=", myJumpPageSetting);
|
|
35
|
+
isIframe.value = myJumpPageSetting && myJumpPageSetting["_isIframe"] !== void 0 ? myJumpPageSetting["_isIframe"] : false;
|
|
36
|
+
pageUrl.value = myJumpPageSetting && myJumpPageSetting["_path"] ? myJumpPageSetting["_path"] : null;
|
|
37
|
+
dialogType.value = myJumpPageSetting && myJumpPageSetting["dialogType"] ? myJumpPageSetting["dialogType"] : "dialog";
|
|
38
|
+
draggable.value = myJumpPageSetting && myJumpPageSetting["draggable"] ? myJumpPageSetting["draggable"] : false;
|
|
39
|
+
overflow.value = myJumpPageSetting && myJumpPageSetting["overflow"] ? myJumpPageSetting["overflow"] : false;
|
|
40
|
+
showPosition.value = myJumpPageSetting && myJumpPageSetting["showPosition"] ? myJumpPageSetting["showPosition"] : "rtl";
|
|
41
|
+
title.value = myJumpPageSetting && myJumpPageSetting["jumpPageTitle"] ? myJumpPageSetting["jumpPageTitle"] : null;
|
|
42
|
+
width.value = myJumpPageSetting && myJumpPageSetting["jumpPageWidth"] ? myJumpPageSetting["jumpPageWidth"] : "100%";
|
|
43
|
+
contentHeight.value = myJumpPageSetting && myJumpPageSetting["jumpPageHeight"] ? myJumpPageSetting["jumpPageHeight"] : null;
|
|
44
|
+
pageCode.value = myJumpPageSetting && myJumpPageSetting["pageCode"];
|
|
45
|
+
dataId.value = myJumpPageSetting && myJumpPageSetting["dataId"] ? myJumpPageSetting["dataId"] : null;
|
|
46
|
+
taskId.value = myJumpPageSetting && myJumpPageSetting["taskId"] ? myJumpPageSetting["taskId"] : null;
|
|
47
|
+
const isNeedId = myJumpPageSetting["isNeedId"] ? true : false;
|
|
48
|
+
if (props.parentPageEventParams) {
|
|
49
|
+
try {
|
|
50
|
+
const pageParams = JSON.parse(JSON.stringify(props.parentPageEventParams));
|
|
51
|
+
if (pageParams["pageContext"]) {
|
|
52
|
+
delete pageParams["pageContext"];
|
|
53
|
+
}
|
|
54
|
+
if (pageParams["configureObj"]) {
|
|
55
|
+
delete pageParams["configureObj"];
|
|
56
|
+
}
|
|
57
|
+
Object.assign(pageRequest.value, pageParams);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(error);
|
|
60
|
+
}
|
|
61
|
+
if (dataId.value === null || dataId.value === void 0) {
|
|
62
|
+
dataId.value = props.parentPageEventParams["id"];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
pageRequest.value["parentPageCode"] = myJumpPageSetting && myJumpPageSetting["parentPageCode"] ? myJumpPageSetting["parentPageCode"] : null;
|
|
66
|
+
pageRequest.value["parentPageVersion"] = myJumpPageSetting && myJumpPageSetting["parentPageVersion"] ? myJumpPageSetting["parentPageVersion"] : null;
|
|
67
|
+
pageRequest.value["jumpMode"] = myJumpPageSetting ? myJumpPageSetting["jumpMode"] : null;
|
|
68
|
+
pageRequest.value["id"] = dataId.value;
|
|
69
|
+
pageRequest.value["isNeedId"] = isNeedId;
|
|
70
|
+
pageRequest.value["taskId"] = taskId.value;
|
|
71
|
+
if (props.customParams) {
|
|
72
|
+
Object.assign(pageRequest.value, props.customParams);
|
|
13
73
|
}
|
|
14
|
-
null !== j.value && void 0 !== j.value || (j.value = g.parentPageEventParams.id);
|
|
15
74
|
}
|
|
16
|
-
|
|
75
|
+
return (_ctx, _cache) => {
|
|
76
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
|
77
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
78
|
+
return dialogType.value && dialogType.value === "drawer" ? (openBlock(), createBlock(_component_el_drawer, {
|
|
79
|
+
key: 0,
|
|
80
|
+
modelValue: showContent.value,
|
|
81
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showContent.value = $event),
|
|
82
|
+
title: title.value,
|
|
83
|
+
direction: showPosition.value,
|
|
84
|
+
size: width.value,
|
|
85
|
+
class: "content-drawer",
|
|
86
|
+
onOpen: _cache[1] || (_cache[1] = ($event) => emits("open")),
|
|
87
|
+
onOpened: _cache[2] || (_cache[2] = ($event) => emits("opened")),
|
|
88
|
+
onClose: _cache[3] || (_cache[3] = ($event) => emits("close")),
|
|
89
|
+
onClosed: _cache[4] || (_cache[4] = ($event) => emits("closed"))
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [
|
|
92
|
+
!isIframe.value && pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
93
|
+
key: 0,
|
|
94
|
+
pageCode: pageCode.value,
|
|
95
|
+
pageRequest: pageRequest.value,
|
|
96
|
+
isDialog: true
|
|
97
|
+
}, null, 8, ["pageCode", "pageRequest"])) : isIframe.value ? (openBlock(), createElementBlock("iframe", {
|
|
98
|
+
key: 1,
|
|
99
|
+
height: "98%",
|
|
100
|
+
width: "100%",
|
|
101
|
+
src: pageUrl.value,
|
|
102
|
+
frameborder: "0",
|
|
103
|
+
allowtransparency: "no"
|
|
104
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true)
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["modelValue", "title", "direction", "size"])) : (openBlock(), createBlock(_component_el_dialog, {
|
|
108
|
+
key: 1,
|
|
109
|
+
"model-value": "",
|
|
110
|
+
title: title.value,
|
|
111
|
+
"close-on-click-modal": false,
|
|
112
|
+
"append-to-body": "",
|
|
113
|
+
width: width.value,
|
|
114
|
+
draggable: draggable.value,
|
|
115
|
+
overflow: overflow.value,
|
|
116
|
+
onOpen: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("open")),
|
|
117
|
+
onOpend: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("opend")),
|
|
118
|
+
onClose: _cache[7] || (_cache[7] = ($event) => emits("close")),
|
|
119
|
+
onClosed: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("closed"))
|
|
120
|
+
}, {
|
|
121
|
+
default: withCtx(() => [
|
|
122
|
+
!isIframe.value && pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
123
|
+
key: 0,
|
|
124
|
+
pageCode: pageCode.value,
|
|
125
|
+
pageRequest: pageRequest.value,
|
|
126
|
+
contentHeight: contentHeight.value,
|
|
127
|
+
isDialog: true
|
|
128
|
+
}, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : isIframe.value ? (openBlock(), createElementBlock("iframe", {
|
|
129
|
+
key: 1,
|
|
130
|
+
height: "98%",
|
|
131
|
+
width: "100%",
|
|
132
|
+
src: pageUrl.value,
|
|
133
|
+
frameborder: "0",
|
|
134
|
+
allowtransparency: "no"
|
|
135
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["title", "width", "draggable", "overflow"]));
|
|
139
|
+
};
|
|
17
140
|
}
|
|
18
|
-
|
|
19
|
-
const p3 = l("el-drawer"), g2 = l("el-dialog");
|
|
20
|
-
return C.value && "drawer" === C.value ? (u(), t(p3, { key: 0, modelValue: m.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => m.value = e4), title: f.value, direction: O.value, size: P.value, class: "content-drawer", onOpen: a2[1] || (a2[1] = (e4) => v("open")), onOpened: a2[2] || (a2[2] = (e4) => v("opened")), onClose: a2[3] || (a2[3] = (e4) => v("close")), onClosed: a2[4] || (a2[4] = (e4) => v("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, isDialog: true }, null, 8, ["pageCode", "pageRequest"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, d)) : r("", true)]), _: 1 }, 8, ["modelValue", "title", "direction", "size"])) : (u(), t(g2, { key: 1, "model-value": "", title: f.value, "close-on-click-modal": false, "append-to-body": "", width: P.value, draggable: b.value, overflow: k.value, onOpen: a2[5] || (a2[5] = (a3) => e3.$emit("open")), onOpend: a2[6] || (a2[6] = (a3) => e3.$emit("opend")), onClose: a2[7] || (a2[7] = (e4) => v("close")), onClosed: a2[8] || (a2[8] = (a3) => e3.$emit("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, contentHeight: I.value, isDialog: true }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, i)) : r("", true)]), _: 1 }, 8, ["title", "width", "draggable", "overflow"]));
|
|
21
|
-
};
|
|
22
|
-
} });
|
|
141
|
+
});
|
|
23
142
|
export {
|
|
24
|
-
|
|
143
|
+
_sfc_main as default
|
|
25
144
|
};
|