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/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,78 +1,247 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { getDateShortCuts
|
|
4
|
-
import { getValueFromVariable
|
|
5
|
-
import { handleAfterInitEvent
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { $t
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, computed, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getDateShortCuts } from "../../../../utils/form/date-shortcuts.js";
|
|
4
|
+
import { getValueFromVariable, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleAfterInitEvent, getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
7
|
+
import dayjs from "dayjs";
|
|
8
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "datepicker-runtime",
|
|
11
|
+
props: {
|
|
12
|
+
pageContext: {},
|
|
13
|
+
configure: {}
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
18
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
19
|
+
const runtimeStyle = runtimeInfo.style;
|
|
20
|
+
const runtimeClass = runtimeInfo.class;
|
|
21
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
22
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
23
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
24
|
+
let dynamicFields = getFormModelFields(
|
|
25
|
+
props.pageContext,
|
|
26
|
+
props.configure,
|
|
27
|
+
designProperty.value.prop
|
|
28
|
+
);
|
|
29
|
+
console.log("designProperty", designProperty);
|
|
30
|
+
let dynamicFields2 = null;
|
|
31
|
+
let isRange = false;
|
|
32
|
+
if (designProperty.value.dateType && designProperty.value.dateType.includes("range")) {
|
|
33
|
+
isRange = true;
|
|
34
|
+
let propName = designProperty.value.prop2;
|
|
35
|
+
if (!propName || !propName.startsWith("${")) {
|
|
36
|
+
propName = "${page." + props.configure.uuid + "-2}";
|
|
37
|
+
}
|
|
38
|
+
const date2Value = getValueFromVariable(entity, propName, null);
|
|
39
|
+
propName = propName.substring(2, propName.length - 1);
|
|
40
|
+
dynamicFields2 = propName.split(".");
|
|
41
|
+
if (!date2Value && (!entity.data || !entity.data.id && !entity.data.ID)) {
|
|
42
|
+
if (designProperty.value.defaultValue2) {
|
|
43
|
+
const defaultValue2 = getValueFromVariable(entity, designProperty.value.defaultValue2);
|
|
44
|
+
setVariableValue(entity, dynamicFields2, defaultValue2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
33
47
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
const formItemRef = ref(null);
|
|
49
|
+
const componentRef = ref(null);
|
|
50
|
+
const titleRef = ref(null);
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
nextTick(() => {
|
|
53
|
+
const value = dynamicModelMethod.value;
|
|
54
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
55
|
+
formItemRef: formItemRef.value,
|
|
56
|
+
componentRef: componentRef.value,
|
|
57
|
+
titleRef: titleRef.value,
|
|
58
|
+
value,
|
|
59
|
+
entity: props.pageContext.entity.data,
|
|
60
|
+
pageData: props.pageContext.entity.page
|
|
61
|
+
});
|
|
62
|
+
});
|
|
40
63
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
function formatDate(value, formatStr) {
|
|
65
|
+
if (!value) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
if (formatStr) {
|
|
69
|
+
try {
|
|
70
|
+
const convertValue = dayjs(value);
|
|
71
|
+
let value2 = null;
|
|
72
|
+
if (formatStr === "x") {
|
|
73
|
+
value2 = convertValue.toDate().getTime();
|
|
74
|
+
} else {
|
|
75
|
+
value2 = dayjs(value).format(formatStr);
|
|
76
|
+
}
|
|
77
|
+
return value2;
|
|
78
|
+
} catch (e) {
|
|
79
|
+
console.error("日期值格式化错误", e);
|
|
80
|
+
console.error(`value: ${value} ,valueFormat: ${designProperty.value.valueFormat}`);
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
if (dynamicFields) {
|
|
87
|
+
const hisValue = getVariableValue(entity, dynamicFields);
|
|
88
|
+
const newValue = formatDate(hisValue, designProperty.value.valueFormat);
|
|
89
|
+
if (hisValue !== newValue) {
|
|
90
|
+
setVariableValue(entity, dynamicFields, newValue);
|
|
91
|
+
}
|
|
56
92
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
93
|
+
if (dynamicFields2) {
|
|
94
|
+
const hisValue = getVariableValue(entity, dynamicFields2);
|
|
95
|
+
const newValue = formatDate(hisValue, designProperty.value.valueFormat);
|
|
96
|
+
if (hisValue !== newValue) {
|
|
97
|
+
setVariableValue(entity, dynamicFields2, newValue);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const dynamicModelMethod = computed({
|
|
101
|
+
get() {
|
|
102
|
+
if (isRange) {
|
|
103
|
+
const values = [];
|
|
104
|
+
let value1 = getVariableValue(entity, dynamicFields);
|
|
105
|
+
values.push(formatDate(value1, designProperty.value.valueFormat));
|
|
106
|
+
let value2 = getVariableValue(entity, dynamicFields2);
|
|
107
|
+
values.push(formatDate(value2, designProperty.value.valueFormat));
|
|
108
|
+
return values;
|
|
109
|
+
} else {
|
|
110
|
+
let value1 = getVariableValue(entity, dynamicFields);
|
|
111
|
+
return formatDate(value1, designProperty.value.valueFormat);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
set(value) {
|
|
115
|
+
if (isRange) {
|
|
116
|
+
if (Array.isArray(value)) {
|
|
117
|
+
setVariableValue(entity, dynamicFields, value[0]);
|
|
118
|
+
setVariableValue(entity, dynamicFields2, value[1]);
|
|
119
|
+
} else if (value === null) {
|
|
120
|
+
setVariableValue(entity, dynamicFields, null);
|
|
121
|
+
setVariableValue(entity, dynamicFields2, null);
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
setVariableValue(entity, dynamicFields, value);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const shortcuts = ref(
|
|
129
|
+
getDateShortCuts(
|
|
130
|
+
designProperty.value.dateScopeDetails,
|
|
131
|
+
designProperty.value.sourceType,
|
|
132
|
+
designProperty.value.dateType
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
if (designProperty.value.shortcutsFunc) {
|
|
136
|
+
const func = getCustomFunc(props.pageContext, designProperty.value.shortcutsFunc);
|
|
137
|
+
if (func) {
|
|
138
|
+
let returns = func.apply(func, [
|
|
139
|
+
{
|
|
140
|
+
pageContext: props.pageContext,
|
|
141
|
+
configureObj: props.configure
|
|
142
|
+
}
|
|
143
|
+
]);
|
|
144
|
+
if (returns) {
|
|
145
|
+
if (!Array.isArray(returns)) {
|
|
146
|
+
returns = [returns];
|
|
147
|
+
}
|
|
148
|
+
if (!shortcuts.value) {
|
|
149
|
+
shortcuts.value = [];
|
|
150
|
+
}
|
|
151
|
+
for (let r of returns) {
|
|
152
|
+
if (r.text && r.value) {
|
|
153
|
+
shortcuts.value.push(r);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
68
157
|
}
|
|
69
158
|
}
|
|
159
|
+
return (_ctx, _cache) => {
|
|
160
|
+
const _component_el_time_picker = resolveComponent("el-time-picker");
|
|
161
|
+
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
162
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
163
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
164
|
+
ref_key: "formItemRef",
|
|
165
|
+
ref: formItemRef,
|
|
166
|
+
required: designProperty.value.required,
|
|
167
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
168
|
+
"label-width": designProperty.value.labelWidth,
|
|
169
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
170
|
+
}, {
|
|
171
|
+
label: withCtx(() => [
|
|
172
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
173
|
+
key: 0,
|
|
174
|
+
ref_key: "titleRef",
|
|
175
|
+
ref: titleRef,
|
|
176
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
177
|
+
}, [
|
|
178
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
179
|
+
key: 0,
|
|
180
|
+
pageContext: _ctx.pageContext,
|
|
181
|
+
property: designProperty.value
|
|
182
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
183
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
184
|
+
], 64))
|
|
185
|
+
], 4)) : createCommentVNode("", true)
|
|
186
|
+
]),
|
|
187
|
+
default: withCtx(() => [
|
|
188
|
+
designProperty.value.dateType == "time" || designProperty.value.dateType == "timerange" ? (openBlock(), createBlock(_component_el_time_picker, {
|
|
189
|
+
key: 0,
|
|
190
|
+
ref_key: "componentRef",
|
|
191
|
+
ref: componentRef,
|
|
192
|
+
"is-range": designProperty.value.dateType == "timerange",
|
|
193
|
+
style: { "width": "100%" },
|
|
194
|
+
"range-separator": "-",
|
|
195
|
+
clearable: designProperty.value.clearable,
|
|
196
|
+
disabled: designProperty.value.state === "disabled",
|
|
197
|
+
readonly: designProperty.value.state === "readonly",
|
|
198
|
+
size: designProperty.value.size,
|
|
199
|
+
placeholder: designProperty.value.placeholder,
|
|
200
|
+
"start-placeholder": designProperty.value.placeholder,
|
|
201
|
+
"end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
|
|
202
|
+
format: designProperty.value.format,
|
|
203
|
+
"value-format": designProperty.value.valueFormat,
|
|
204
|
+
modelValue: dynamicModelMethod.value,
|
|
205
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
206
|
+
shortcuts: shortcuts.value,
|
|
207
|
+
type: designProperty.value.dateType,
|
|
208
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
209
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
210
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
211
|
+
onVisibleChange: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
|
|
212
|
+
onPanelChange: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
|
|
213
|
+
onClear: _cache[6] || (_cache[6] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
|
|
214
|
+
}, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
|
|
215
|
+
key: 1,
|
|
216
|
+
ref_key: "componentRef",
|
|
217
|
+
ref: componentRef,
|
|
218
|
+
clearable: designProperty.value.clearable,
|
|
219
|
+
style: { "width": "100%" },
|
|
220
|
+
disabled: designProperty.value.state === "disabled",
|
|
221
|
+
readonly: designProperty.value.state === "readonly",
|
|
222
|
+
size: designProperty.value.size,
|
|
223
|
+
placeholder: designProperty.value.placeholder,
|
|
224
|
+
"start-placeholder": designProperty.value.placeholder,
|
|
225
|
+
"end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
|
|
226
|
+
format: designProperty.value.format,
|
|
227
|
+
"value-format": designProperty.value.valueFormat,
|
|
228
|
+
modelValue: dynamicModelMethod.value,
|
|
229
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dynamicModelMethod.value = $event),
|
|
230
|
+
shortcuts: shortcuts.value,
|
|
231
|
+
type: designProperty.value.dateType,
|
|
232
|
+
onChange: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
233
|
+
onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
234
|
+
onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
235
|
+
onVisibleChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
|
|
236
|
+
onPanelChange: _cache[12] || (_cache[12] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
|
|
237
|
+
onClear: _cache[13] || (_cache[13] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
|
|
238
|
+
}, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
242
|
+
};
|
|
70
243
|
}
|
|
71
|
-
|
|
72
|
-
const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
|
|
73
|
-
return n(), u(o2, { ref_key: "formItemRef", ref: U, required: $.value.required, class: p(s(A)), "label-width": $.value.labelWidth, style: i(s(w)) }, { label: c(() => [$.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: E, style: i({ ...s(D), ...s(S) }) }, [$.value.prefixType ? (n(), u(V, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(P)($.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == $.value.dateType || "timerange" == $.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: W, "is-range": "timerange" == $.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: $.value.clearable, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, format: $.value.format, "value-format": $.value.valueFormat, modelValue: G.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => G.value = e4), shortcuts: H.value, type: $.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), u(t2, { key: 1, ref_key: "componentRef", ref: W, clearable: $.value.clearable, style: { width: "100%" }, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, format: $.value.format, "value-format": $.value.valueFormat, modelValue: G.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => G.value = e4), shortcuts: H.value, type: $.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
74
|
-
};
|
|
75
|
-
} });
|
|
244
|
+
});
|
|
76
245
|
export {
|
|
77
|
-
|
|
246
|
+
_sfc_main as default
|
|
78
247
|
};
|
|
@@ -1,35 +1,113 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { handleAfterInitEvent
|
|
4
|
-
import
|
|
5
|
-
import { $t
|
|
6
|
-
import { setVariableValue
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, computed, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
5
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
import { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "depttree-runtime",
|
|
9
|
+
props: {
|
|
10
|
+
pageContext: {},
|
|
11
|
+
configure: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
16
|
+
if (!entity.data) {
|
|
17
|
+
entity.data = {};
|
|
18
|
+
}
|
|
19
|
+
const dataModel = entity.data;
|
|
20
|
+
const pageModel = entity.page;
|
|
21
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
22
|
+
const fieldName = dynamicFields.length > 0 ? dynamicFields[dynamicFields.length - 1] : props.configure.uuid;
|
|
23
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
25
|
+
const runtimeStyle = runtimeInfo.style;
|
|
26
|
+
const runtimeClass = runtimeInfo.class;
|
|
27
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
28
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
29
|
+
const formItemRef = ref(null);
|
|
30
|
+
const componentRef = ref(null);
|
|
31
|
+
const titleRef = ref(null);
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
nextTick(() => {
|
|
34
|
+
const value = dataModel ? dataModel[fieldName] : null;
|
|
35
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
36
|
+
formItemRef: formItemRef.value,
|
|
37
|
+
componentRef: componentRef.value,
|
|
38
|
+
titleRef: titleRef.value,
|
|
39
|
+
value,
|
|
40
|
+
entity: props.pageContext.entity.data,
|
|
41
|
+
pageData: props.pageContext.entity.page
|
|
42
|
+
});
|
|
43
|
+
});
|
|
17
44
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
const dynamicModelMethod = computed({
|
|
46
|
+
get() {
|
|
47
|
+
return getVariableValue(entity, dynamicFields);
|
|
48
|
+
},
|
|
49
|
+
set(value) {
|
|
50
|
+
setVariableValue(entity, dynamicFields, value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const autoSetFields = designProperty.value.autoSetFields ? designProperty.value.autoSetFields : [];
|
|
54
|
+
function changeValue(model, value) {
|
|
55
|
+
if (model === fieldName) {
|
|
56
|
+
handleFormEvent(value, props.pageContext, props.configure, "change");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function showTree() {
|
|
60
|
+
handleFormEvent(null, props.pageContext, props.configure, "click");
|
|
61
|
+
}
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
const _component_OrganizationInput = resolveComponent("OrganizationInput");
|
|
64
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
65
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
66
|
+
ref_key: "formItemRef",
|
|
67
|
+
ref: formItemRef,
|
|
68
|
+
required: designProperty.value.required,
|
|
69
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
70
|
+
"label-width": designProperty.value.labelWidth,
|
|
71
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
72
|
+
}, {
|
|
73
|
+
label: withCtx(() => [
|
|
74
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
75
|
+
key: 0,
|
|
76
|
+
ref_key: "titleRef",
|
|
77
|
+
ref: titleRef,
|
|
78
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
79
|
+
}, [
|
|
80
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
81
|
+
key: 0,
|
|
82
|
+
pageContext: _ctx.pageContext,
|
|
83
|
+
property: designProperty.value
|
|
84
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
85
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
86
|
+
], 64))
|
|
87
|
+
], 4)) : createCommentVNode("", true)
|
|
88
|
+
]),
|
|
89
|
+
default: withCtx(() => [
|
|
90
|
+
createVNode(_component_OrganizationInput, {
|
|
91
|
+
ref_key: "componentRef",
|
|
92
|
+
ref: componentRef,
|
|
93
|
+
disabled: designProperty.value.state == "disabled",
|
|
94
|
+
multiple: designProperty.value.multiple,
|
|
95
|
+
treeType: designProperty.value.treeType,
|
|
96
|
+
value: dynamicModelMethod.value,
|
|
97
|
+
models: unref(dataModel),
|
|
98
|
+
pageModels: unref(pageModel),
|
|
99
|
+
fields: unref(autoSetFields),
|
|
100
|
+
size: designProperty.value.size,
|
|
101
|
+
separator: designProperty.value.separator,
|
|
102
|
+
onSetValue: changeValue,
|
|
103
|
+
onShowTree: showTree
|
|
104
|
+
}, null, 8, ["disabled", "multiple", "treeType", "value", "models", "pageModels", "fields", "size", "separator"])
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
108
|
+
};
|
|
27
109
|
}
|
|
28
|
-
|
|
29
|
-
const l2 = i("OrganizationInput"), a2 = i("el-form-item");
|
|
30
|
-
return n(), u(a2, { ref_key: "formItemRef", ref: V, required: F.value.required, class: p(s(D)), "label-width": F.value.labelWidth, style: r(s(M)) }, { label: f(() => [F.value.tittleShow ? (n(), m("div", { key: 0, ref_key: "titleRef", ref: A, style: r({ ...s(E), ...s(O) }) }, [F.value.prefixType ? (n(), u(b, { key: 0, pageContext: e3.pageContext, property: F.value }, null, 8, ["pageContext", "property"])) : (n(), m(c, { key: 1 }, [v(y(s(k)(F.value.title)), 1)], 64))], 4)) : d("", true)]), default: f(() => [g(l2, { ref_key: "componentRef", ref: W, disabled: "disabled" == F.value.state, multiple: F.value.multiple, treeType: F.value.treeType, value: B.value, models: s(T), pageModels: s(w), fields: s(G), size: F.value.size, separator: F.value.separator, onSetValue: H, onShowTree: J }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
31
|
-
};
|
|
32
|
-
} });
|
|
110
|
+
});
|
|
33
111
|
export {
|
|
34
|
-
|
|
112
|
+
_sfc_main as default
|
|
35
113
|
};
|
|
@@ -1,24 +1,62 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { formatVariableValue
|
|
3
|
-
import { handleAfterInitEvent
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
|
|
2
|
+
import { formatVariableValue } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "divider-runtime",
|
|
6
|
+
props: {
|
|
7
|
+
pageContext: {},
|
|
8
|
+
configure: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
13
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
14
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
15
|
+
let contentVariable = designProperty.value["value"];
|
|
16
|
+
const dynamicValue = computed(() => {
|
|
17
|
+
if (!contentVariable) {
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
const resultValue = formatVariableValue(props.pageContext, contentVariable);
|
|
21
|
+
return resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
16
22
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
const componentRef = ref(null);
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
nextTick(() => {
|
|
26
|
+
const content = dynamicValue.value;
|
|
27
|
+
handleAfterInitEvent(
|
|
28
|
+
content,
|
|
29
|
+
props.pageContext,
|
|
30
|
+
props.configure,
|
|
31
|
+
{
|
|
32
|
+
componentRef: componentRef.value,
|
|
33
|
+
value: content,
|
|
34
|
+
entity: props.pageContext.entity.data,
|
|
35
|
+
pageData: props.pageContext.entity.page
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
const _component_el_divider = resolveComponent("el-divider");
|
|
42
|
+
return openBlock(), createBlock(_component_el_divider, {
|
|
43
|
+
ref_key: "componentRef",
|
|
44
|
+
ref: componentRef,
|
|
45
|
+
direction: designProperty.value.direction,
|
|
46
|
+
"border-style": designProperty.value.borderType,
|
|
47
|
+
"content-position": designProperty.value.titlePosition,
|
|
48
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
49
|
+
}, {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
createElementVNode("div", {
|
|
52
|
+
style: normalizeStyle(unref(headerStyle))
|
|
53
|
+
}, toDisplayString(dynamicValue.value), 5)
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["direction", "border-style", "content-position"]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
22
60
|
export {
|
|
23
|
-
|
|
61
|
+
_sfc_main as default
|
|
24
62
|
};
|