super-page-runtime 2.2.29-tmp1 → 2.2.29-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -69
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -38
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -73
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -62
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -280
- package/dist/es/components/runtime/utils/page-init-util.js +405 -144
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +83 -21
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +46 -14
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +132 -36
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +18 -4
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +107 -17
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +198 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +60 -11
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +203 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +109 -33
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +166 -44
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +117 -33
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +118 -33
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +62 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +160 -29
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +62 -13
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +594 -213
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +125 -21
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +102 -16
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +81 -18
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +82 -17
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +86 -14
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +79 -21
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +61 -16
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +37 -10
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +127 -38
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +76 -28
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +178 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +635 -265
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +115 -40
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +154 -43
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +200 -52
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +239 -70
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +109 -31
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +59 -21
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +188 -56
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +103 -22
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +246 -59
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +174 -34
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +107 -29
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +50 -13
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +194 -65
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +249 -89
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +263 -80
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +57 -13
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +155 -30
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +129 -40
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +46 -18
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +49 -21
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +58 -20
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -41
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +756 -230
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,144 +1,283 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
import { getRuntimeComponentByName
|
|
4
|
-
import { PageDimensions
|
|
5
|
-
import { addComponentRef
|
|
6
|
-
import { getPermissionCodes
|
|
7
|
-
import { caculateShowCondition
|
|
8
|
-
import { isWorkflowPage
|
|
9
|
-
import { isShowMobileEvent
|
|
10
|
-
import { usePageContextStore
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { defineComponent, ref, computed, markRaw, onMounted, onUnmounted, resolveDirective, withDirectives, createCommentVNode, unref, createBlock, openBlock, resolveDynamicComponent, normalizeClass, normalizeStyle, vShow, nextTick } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./error-render.vue.js";
|
|
3
|
+
import { getRuntimeComponentByName } from "../../utils/assemblys-config.js";
|
|
4
|
+
import { PageDimensions } from "../../utils/interfaces/page-design-types.js";
|
|
5
|
+
import { addComponentRef, addComponentRefByCode } from "../../utils/global-refs.js";
|
|
6
|
+
import { getPermissionCodes, packageFormRules, controlObjectRenderState } from "../../utils/page-init-util.js";
|
|
7
|
+
import { caculateShowCondition, getFormPropName, getSizeConfig } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { isWorkflowPage, getPropClassName, isNumber } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowMobileEvent, isShowComponent } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore } from "../../utils/page-store.js";
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "object-render",
|
|
13
|
+
props: {
|
|
14
|
+
pageContext: {},
|
|
15
|
+
configure: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
const props = __props;
|
|
20
|
+
if (props.configure.style == void 0) {
|
|
21
|
+
props.configure.style = {};
|
|
22
|
+
}
|
|
23
|
+
const permissionCodes = getPermissionCodes(props.configure, props.pageContext);
|
|
24
|
+
if (props.configure && props.configure.props && props.configure.props.base) {
|
|
25
|
+
props.configure.props.base.functionCode = permissionCodes;
|
|
26
|
+
}
|
|
27
|
+
packageFormRules(props.pageContext, props.configure);
|
|
28
|
+
let handleShowFlag = ref(true);
|
|
29
|
+
let showFlag = ref(true);
|
|
30
|
+
let editFlag = ref("");
|
|
31
|
+
if (props.configure && props.configure.props) {
|
|
32
|
+
let showConditions = [];
|
|
33
|
+
if ((_a = props.configure.props.base) == null ? void 0 : _a.showConditions) {
|
|
34
|
+
if (typeof props.configure.props.base.showConditions === "string") {
|
|
35
|
+
showConditions = JSON.parse(props.configure.props.base.showConditions);
|
|
36
|
+
} else {
|
|
37
|
+
showConditions = props.configure.props.base.showConditions;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
showFlag = computed(() => {
|
|
41
|
+
var _a2;
|
|
42
|
+
let dynamicShowFlag = true;
|
|
43
|
+
if (!handleShowFlag.value) {
|
|
44
|
+
dynamicShowFlag = false;
|
|
45
|
+
} else {
|
|
46
|
+
if (!isShowMobileEvent(props.pageContext, props.configure)) {
|
|
47
|
+
dynamicShowFlag = false;
|
|
48
|
+
} else {
|
|
49
|
+
if (showConditions && showConditions.length > 0) {
|
|
50
|
+
dynamicShowFlag = caculateShowCondition(props.pageContext, showConditions);
|
|
51
|
+
} else {
|
|
52
|
+
const state = (_a2 = props.configure.props.base) == null ? void 0 : _a2.state;
|
|
53
|
+
if (state && state === "hidden") {
|
|
54
|
+
dynamicShowFlag = false;
|
|
55
|
+
}
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
return dynamicShowFlag;
|
|
60
|
+
});
|
|
61
|
+
const propConfigure = props.configure;
|
|
62
|
+
propConfigure._dynamicShowFlag = showFlag;
|
|
63
|
+
if ((_b = props.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
64
|
+
const editConditions = props.configure.props.base.editConditions;
|
|
65
|
+
if (editConditions.length > 0) {
|
|
66
|
+
const runtime = props.configure.runtime ? props.configure.runtime : {};
|
|
67
|
+
const property = runtime.props ? runtime.props : {};
|
|
68
|
+
property.rawSate = property.state;
|
|
69
|
+
if (isWorkflowPage(props.pageContext) && props.pageContext.fieldPermissionMap) {
|
|
70
|
+
const allFields = props.pageContext.fieldPermissionMap.get("all_fields");
|
|
71
|
+
if ((allFields == null ? void 0 : allFields["canEdit"]) === false) {
|
|
72
|
+
editFlag.value = "disabled";
|
|
73
|
+
} else {
|
|
74
|
+
const propsBase = props.configure.props.base;
|
|
75
|
+
if (propsBase && propsBase.prop) {
|
|
76
|
+
let propName = propsBase.prop;
|
|
77
|
+
propName = getFormPropName(propName);
|
|
78
|
+
const propEditPermission = props.pageContext.fieldPermissionMap.get(propName);
|
|
79
|
+
if (propEditPermission) {
|
|
80
|
+
if (propEditPermission["canEdit"] === false) {
|
|
81
|
+
editFlag.value = "disabled";
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
property.state = computed({
|
|
88
|
+
get() {
|
|
89
|
+
if (editFlag.value === "disabled") {
|
|
90
|
+
return editFlag.value;
|
|
91
|
+
}
|
|
92
|
+
const canEdit = caculateShowCondition(props.pageContext, editConditions);
|
|
93
|
+
return canEdit ? "" : "disabled";
|
|
94
|
+
},
|
|
95
|
+
set() {
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
54
99
|
}
|
|
55
100
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y($2.pageContext, o3, q);
|
|
101
|
+
const dynamicComponent = ref({});
|
|
102
|
+
dynamicComponent.value = markRaw(getRuntimeComponentByName(props.configure.name));
|
|
103
|
+
const showCopy = ref(true);
|
|
104
|
+
if (dynamicComponent.value == null) {
|
|
105
|
+
dynamicComponent.value = _sfc_main$1;
|
|
106
|
+
showCopy.value = false;
|
|
107
|
+
}
|
|
108
|
+
const thisRef = ref(null);
|
|
109
|
+
const runtimeStyle = ref({});
|
|
110
|
+
const runtimeClass = ref("");
|
|
111
|
+
const propClassName = getPropClassName(props.configure);
|
|
112
|
+
if (propClassName) {
|
|
113
|
+
runtimeClass.value = propClassName;
|
|
114
|
+
}
|
|
115
|
+
const commonRuntime = props.configure.runtime && props.configure.runtime.common ? props.configure.runtime.common : {};
|
|
116
|
+
if (commonRuntime.class) {
|
|
117
|
+
runtimeClass.value += " " + commonRuntime.class;
|
|
118
|
+
}
|
|
119
|
+
if (commonRuntime.style) {
|
|
120
|
+
Object.assign(runtimeStyle.value, commonRuntime.style);
|
|
121
|
+
const pageDimensions = props.pageContext && props.pageContext.dimensions ? props.pageContext.dimensions : PageDimensions.PC;
|
|
122
|
+
const sizeStyle = commonRuntime.style[pageDimensions + "_style"];
|
|
123
|
+
if (sizeStyle) {
|
|
124
|
+
Object.assign(runtimeStyle.value, sizeStyle);
|
|
125
|
+
}
|
|
126
|
+
const sizeClass = commonRuntime.style[pageDimensions + "_class"];
|
|
127
|
+
if (sizeClass) {
|
|
128
|
+
runtimeClass.value += " " + sizeClass;
|
|
85
129
|
}
|
|
86
130
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
131
|
+
const pageContextUtil = usePageContextStore();
|
|
132
|
+
function setComponentRef(el) {
|
|
133
|
+
thisRef.value = el;
|
|
134
|
+
if (el && !el.show) {
|
|
135
|
+
el.show = function() {
|
|
136
|
+
handleShowFlag.value = true;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
if (el && !el.hide) {
|
|
140
|
+
el.hide = function() {
|
|
141
|
+
handleShowFlag.value = false;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
if (el && !el.getConfigure) {
|
|
145
|
+
el.getConfigure = function() {
|
|
146
|
+
return props.configure;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
if (props.configure.uuid) {
|
|
150
|
+
addComponentRef(props.pageContext, props.configure.uuid, thisRef);
|
|
151
|
+
}
|
|
152
|
+
if (props.configure.code) {
|
|
153
|
+
addComponentRefByCode(props.pageContext, props.configure.code, thisRef);
|
|
154
|
+
} else if (props.configure.props && props.configure.props.base) {
|
|
155
|
+
const propsBase2 = props.configure.props.base;
|
|
156
|
+
if (propsBase2.prop) {
|
|
157
|
+
let propName = propsBase2.prop;
|
|
158
|
+
if (propName.startsWith("${")) {
|
|
159
|
+
propName = propName.substring(2, propName.length - 1);
|
|
160
|
+
}
|
|
161
|
+
if (propName.includes(".")) {
|
|
162
|
+
propName = propName.substring(propName.indexOf(".") + 1);
|
|
163
|
+
}
|
|
164
|
+
addComponentRefByCode(props.pageContext, propName, thisRef);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const propsBase = props.configure.props ? props.configure.props.base : null;
|
|
168
|
+
if (propsBase && propsBase.prop) {
|
|
169
|
+
let propName = propsBase.prop;
|
|
170
|
+
propName = getFormPropName(propName);
|
|
171
|
+
controlObjectRenderState(props.pageContext, propName);
|
|
172
|
+
}
|
|
173
|
+
setComponentHeight();
|
|
91
174
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
175
|
+
let timer;
|
|
176
|
+
onMounted(() => {
|
|
177
|
+
dynamicallyCalculatePosition();
|
|
178
|
+
pageContextUtil.countComponentsLoadedNumber();
|
|
179
|
+
timer = setTimeout(() => {
|
|
180
|
+
if (pageContextUtil.componentsTotalNmber === pageContextUtil.componentsLoadedNumber && !pageContextUtil.pageComponentsLoaded) {
|
|
181
|
+
pageContextUtil.setPageComponentsLoaded(true);
|
|
182
|
+
}
|
|
183
|
+
}, 100);
|
|
184
|
+
});
|
|
185
|
+
onUnmounted(() => {
|
|
186
|
+
if (timer) {
|
|
187
|
+
clearTimeout(timer);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
function setComponentHeight() {
|
|
191
|
+
if (!thisRef.value) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const sizeConfig = getSizeConfig(props.pageContext, props.configure);
|
|
195
|
+
if (props.configure.name !== "table" && sizeConfig && sizeConfig["isCalcHeight"]) {
|
|
196
|
+
nextTick(() => {
|
|
197
|
+
let thisRefDom = thisRef.value.$el;
|
|
198
|
+
if (!thisRefDom) {
|
|
199
|
+
thisRefDom = thisRef.value;
|
|
200
|
+
}
|
|
201
|
+
const parentNode = thisRefDom.parentNode;
|
|
202
|
+
if (!thisRefDom || !parentNode) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const rect = thisRefDom.getBoundingClientRect();
|
|
206
|
+
let contentHeight = window.innerHeight - rect.y - 80;
|
|
207
|
+
let heightStyle = contentHeight + "";
|
|
208
|
+
if (isNumber(contentHeight)) {
|
|
209
|
+
heightStyle = contentHeight + "px";
|
|
210
|
+
}
|
|
211
|
+
runtimeStyle.value["height"] = heightStyle;
|
|
212
|
+
runtimeStyle.value["overflow-y"] = "auto";
|
|
213
|
+
runtimeStyle.value["overflow-x"] = "hidden";
|
|
214
|
+
if (!props.configure.sytle) {
|
|
215
|
+
props.configure.sytle = {};
|
|
216
|
+
}
|
|
217
|
+
props.configure.sytle._heightStyle = heightStyle;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
135
220
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
221
|
+
const dynamicallyCalculatePosition = () => {
|
|
222
|
+
if (!thisRef.value) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
let thisRefDom = thisRef.value.$el;
|
|
226
|
+
if (!thisRefDom) {
|
|
227
|
+
thisRefDom = thisRef.value;
|
|
228
|
+
}
|
|
229
|
+
const parentNode = thisRefDom.parentNode;
|
|
230
|
+
if (!thisRefDom || !parentNode) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const thisProps = props.configure.props ? props.configure.props : {};
|
|
234
|
+
const thisStyle = props.configure.style ? props.configure.style : {};
|
|
235
|
+
const position = thisProps.position;
|
|
236
|
+
if (position == "top" || position == "bottom") {
|
|
237
|
+
const contentObj = [parentNode];
|
|
238
|
+
if (contentObj && contentObj.length > 0) {
|
|
239
|
+
const contentRec = contentObj[0].getBoundingClientRect();
|
|
240
|
+
if (position == "top") {
|
|
241
|
+
runtimeStyle.value["top"] = contentRec.top + "px";
|
|
242
|
+
}
|
|
243
|
+
if (position == "bottom") {
|
|
244
|
+
runtimeStyle.value["bottom"] = "10px";
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const thisRec = thisRefDom.getBoundingClientRect();
|
|
248
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
249
|
+
} else if (thisStyle.position) {
|
|
250
|
+
runtimeStyle.value["position"] = thisStyle.position;
|
|
251
|
+
if (runtimeStyle.value.position != "relative") {
|
|
252
|
+
if (!runtimeStyle.value["width"]) {
|
|
253
|
+
const thisRec = thisRefDom.getBoundingClientRect();
|
|
254
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
255
|
+
}
|
|
256
|
+
if (thisStyle.left) {
|
|
257
|
+
runtimeStyle.value["left"] = thisStyle.left + "px";
|
|
258
|
+
}
|
|
259
|
+
if (thisStyle.top) {
|
|
260
|
+
runtimeStyle.value["top"] = thisStyle.top + "px";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
return (_ctx, _cache) => {
|
|
266
|
+
const _directive_permission = resolveDirective("permission");
|
|
267
|
+
return unref(isShowComponent)(_ctx.configure) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(dynamicComponent.value), {
|
|
268
|
+
key: 0,
|
|
269
|
+
ref: setComponentRef,
|
|
270
|
+
style: normalizeStyle(runtimeStyle.value),
|
|
271
|
+
class: normalizeClass(runtimeClass.value),
|
|
272
|
+
configure: _ctx.configure,
|
|
273
|
+
pageContext: _ctx.pageContext
|
|
274
|
+
}, null, 8, ["style", "class", "configure", "pageContext"])), [
|
|
275
|
+
[vShow, unref(showFlag)],
|
|
276
|
+
[_directive_permission, unref(permissionCodes) ? unref(permissionCodes) : "true"]
|
|
277
|
+
]) : createCommentVNode("", true);
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
});
|
|
142
281
|
export {
|
|
143
|
-
|
|
282
|
+
_sfc_main as default
|
|
144
283
|
};
|
package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js
CHANGED
|
@@ -1,20 +1,48 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getWorkflowId
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, createElementBlock, createBlock, unref, openBlock, toDisplayString, normalizeStyle } from "vue";
|
|
2
|
+
import { getWorkflowId } from "../../../../utils/common-util.js";
|
|
3
|
+
const _hoisted_1 = { key: 0 };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "pictureflow-runtime",
|
|
6
|
+
props: {
|
|
7
|
+
pageContext: {},
|
|
8
|
+
configure: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
var _a;
|
|
12
|
+
const props = __props;
|
|
13
|
+
const maxHeight = ref(null);
|
|
14
|
+
const heightStyle = (_a = props.configure.sytle) == null ? void 0 : _a._heightStyle;
|
|
15
|
+
if (heightStyle && (heightStyle + "").indexOf("px") > 0) {
|
|
16
|
+
const contentHeight = heightStyle.substring(0, heightStyle.lastIndexOf("px"));
|
|
17
|
+
maxHeight.value = Number(contentHeight) - 20;
|
|
18
|
+
} else {
|
|
19
|
+
maxHeight.value = window.innerHeight - 120;
|
|
20
|
+
}
|
|
21
|
+
const historyGraphRef = ref(null);
|
|
22
|
+
const workflowId = getWorkflowId(props.pageContext);
|
|
23
|
+
if (props.pageContext.entity && props.pageContext.entity.task) {
|
|
24
|
+
watch(
|
|
25
|
+
props.pageContext.entity.task.id,
|
|
26
|
+
() => {
|
|
27
|
+
if (workflowId && historyGraphRef.value) {
|
|
28
|
+
historyGraphRef.value.refresh();
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{ immediate: true }
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
const _component_workflow_history = resolveComponent("workflow-history");
|
|
36
|
+
return !unref(workflowId) ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.$t("superPageRuntimeMessage.flowNotStart")), 1)) : (openBlock(), createBlock(_component_workflow_history, {
|
|
37
|
+
key: 1,
|
|
38
|
+
id: unref(workflowId),
|
|
39
|
+
ref_key: "historyGraphRef",
|
|
40
|
+
ref: historyGraphRef,
|
|
41
|
+
style: normalizeStyle({ maxHeight: maxHeight.value + "px" })
|
|
42
|
+
}, null, 8, ["id", "style"]));
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
18
46
|
export {
|
|
19
|
-
|
|
47
|
+
_sfc_main as default
|
|
20
48
|
};
|
package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js
CHANGED
|
@@ -1,23 +1,51 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getWorkflowId
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, createElementBlock, createBlock, unref, openBlock, toDisplayString, normalizeStyle } from "vue";
|
|
2
|
+
import { getWorkflowId } from "../../../../utils/common-util.js";
|
|
3
|
+
const _hoisted_1 = { key: 0 };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "textflow-runtime",
|
|
6
|
+
props: {
|
|
7
|
+
pageContext: {},
|
|
8
|
+
configure: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
var _a;
|
|
12
|
+
const props = __props;
|
|
13
|
+
const maxHeight = ref(null);
|
|
14
|
+
const heightStyle = (_a = props.configure.sytle) == null ? void 0 : _a._heightStyle;
|
|
15
|
+
if (heightStyle && (heightStyle + "").indexOf("px") > 0) {
|
|
16
|
+
const contentHeight = heightStyle.substring(0, heightStyle.lastIndexOf("px"));
|
|
17
|
+
maxHeight.value = Number(contentHeight) - 20;
|
|
18
|
+
} else {
|
|
19
|
+
maxHeight.value = window.innerHeight - 120;
|
|
20
|
+
}
|
|
21
|
+
const historyList = ref(null);
|
|
22
|
+
const workflowId = getWorkflowId(props.pageContext);
|
|
23
|
+
if (props.pageContext.entity && props.pageContext.entity.task) {
|
|
24
|
+
watch(
|
|
25
|
+
() => {
|
|
26
|
+
var _a2;
|
|
27
|
+
return (_a2 = props.pageContext.entity.task) == null ? void 0 : _a2.id;
|
|
28
|
+
},
|
|
29
|
+
() => {
|
|
30
|
+
if (workflowId && historyList.value && props.pageContext.entity.task) {
|
|
31
|
+
historyList.value.refresh();
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{ immediate: true }
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
const _component_workflow_history_list = resolveComponent("workflow-history-list");
|
|
39
|
+
return !unref(workflowId) ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.$t("superPageRuntimeMessage.flowNotStart")), 1)) : (openBlock(), createBlock(_component_workflow_history_list, {
|
|
40
|
+
key: 1,
|
|
41
|
+
ref_key: "historyList",
|
|
42
|
+
ref: historyList,
|
|
43
|
+
"workflow-id": unref(workflowId),
|
|
44
|
+
style: normalizeStyle({ maxHeight: maxHeight.value + "px" })
|
|
45
|
+
}, null, 8, ["workflow-id", "style"]));
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
21
49
|
export {
|
|
22
|
-
|
|
50
|
+
_sfc_main as default
|
|
23
51
|
};
|