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
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,61 +1,193 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getVariableValue
|
|
3
|
-
import { handleAfterInitEvent
|
|
4
|
-
import
|
|
5
|
-
import { FsUploadNew
|
|
6
|
-
import
|
|
7
|
-
import { $t
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, onUnmounted, resolveComponent, createBlock, createCommentVNode, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, toDisplayString } from "vue";
|
|
2
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { handleAfterInitEvent, fileUploadBeforeUpload } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import http from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { FsUploadNew } from "agilebuilder-ui";
|
|
6
|
+
import bus from "../../../../utils/eventBus.js";
|
|
7
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "fileupload-runtime",
|
|
10
|
+
props: {
|
|
11
|
+
pageContext: {},
|
|
12
|
+
configure: {}
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
17
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
18
|
+
const runtimeStyle = runtimeInfo.style;
|
|
19
|
+
const runtimeClass = runtimeInfo.class;
|
|
20
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
21
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
22
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
23
|
+
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
24
|
+
const pathFields = getFieldsByVariable(propsBase.prop);
|
|
25
|
+
const nameFields = getFieldsByVariable(propsBase.propName);
|
|
26
|
+
const pageCode = props.pageContext.code;
|
|
27
|
+
const componentId = ref(pathFields ? pageCode + "__" + pathFields.join("__") : null);
|
|
28
|
+
const initPaths = getVariableValue(entity, pathFields);
|
|
29
|
+
const fileUploadRef = ref(null);
|
|
30
|
+
const hasLoad = ref(false);
|
|
31
|
+
const fileList = ref([]);
|
|
32
|
+
const fileInfo = ref({});
|
|
33
|
+
if (initPaths) {
|
|
34
|
+
const uuids = initPaths.split(",");
|
|
35
|
+
if (uuids.length > 0) {
|
|
36
|
+
const backendUrl = props.pageContext.backendUrl;
|
|
37
|
+
http.post(backendUrl + "/common/fs-upload/search-file-names", uuids).then((result) => {
|
|
38
|
+
const names = [];
|
|
39
|
+
for (let index = 0; index < uuids.length; index++) {
|
|
40
|
+
const uuid = uuids[index];
|
|
41
|
+
names.push(result[uuid]);
|
|
42
|
+
fileList.value.push({ showName: result[uuid], serverPath: uuid });
|
|
43
|
+
}
|
|
44
|
+
if (designProperty.value.displayType === "input") {
|
|
45
|
+
fileInfo.value.showName = names.join(",");
|
|
46
|
+
fileInfo.value.serverPath = uuids.join(",");
|
|
47
|
+
}
|
|
48
|
+
}).finally(() => {
|
|
49
|
+
hasLoad.value = true;
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
hasLoad.value = true;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
hasLoad.value = true;
|
|
56
|
+
}
|
|
57
|
+
function getFieldsByVariable(variableName) {
|
|
58
|
+
if (!variableName) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
if (variableName.startsWith("${")) {
|
|
62
|
+
variableName = variableName.substring(2, variableName.length - 1);
|
|
63
|
+
}
|
|
64
|
+
return variableName.split(".");
|
|
65
|
+
}
|
|
66
|
+
function beforeUpload(params) {
|
|
67
|
+
return fileUploadBeforeUpload(params);
|
|
68
|
+
}
|
|
69
|
+
const onSuccess = (response, uploadFile, uploadFiles) => {
|
|
70
|
+
updateValue();
|
|
71
|
+
};
|
|
72
|
+
const onRemove = (file) => {
|
|
73
|
+
updateValue();
|
|
74
|
+
};
|
|
75
|
+
const updateValue = () => {
|
|
76
|
+
const names = [];
|
|
77
|
+
const uuids = [];
|
|
78
|
+
if (designProperty.value.limit) {
|
|
79
|
+
if (fileList.value.length > designProperty.value.limit) {
|
|
80
|
+
const diff = fileList.value.length - designProperty.value.limit;
|
|
81
|
+
for (let index = 0; index < diff; index++) {
|
|
82
|
+
fileList.value.shift();
|
|
83
|
+
}
|
|
19
84
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
85
|
+
}
|
|
86
|
+
for (let index = 0; index < fileList.value.length; index++) {
|
|
87
|
+
names.push(fileList.value[index].showName);
|
|
88
|
+
uuids.push(fileList.value[index].serverPath);
|
|
89
|
+
}
|
|
90
|
+
setVariableValue(props.pageContext.entity, pathFields, uuids.join(","));
|
|
91
|
+
setVariableValue(props.pageContext.entity, nameFields, names.join(","));
|
|
92
|
+
};
|
|
93
|
+
const formItemRef = ref(null);
|
|
94
|
+
const titleRef = ref(null);
|
|
95
|
+
onMounted(() => {
|
|
96
|
+
bus.$on(componentId.value + "-pickFileDone", (data) => {
|
|
97
|
+
console.log(
|
|
98
|
+
"superPage4444---pickFileDone--componentId.value=",
|
|
99
|
+
componentId.value,
|
|
100
|
+
"data=",
|
|
101
|
+
data
|
|
102
|
+
);
|
|
103
|
+
fileUploadRef.value.pickFileDone(data);
|
|
104
|
+
});
|
|
105
|
+
nextTick(() => {
|
|
106
|
+
const pathFieldsValue = getVariableValue(entity, pathFields);
|
|
107
|
+
const nameFieldsValue = getVariableValue(entity, nameFields);
|
|
108
|
+
const value = { showName: nameFieldsValue, serverPath: pathFieldsValue };
|
|
109
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
110
|
+
formItemRef: formItemRef.value,
|
|
111
|
+
componentRef: fileUploadRef.value,
|
|
112
|
+
titleRef: titleRef.value,
|
|
113
|
+
value,
|
|
114
|
+
entity: props.pageContext.entity.data,
|
|
115
|
+
pageData: props.pageContext.entity.page
|
|
116
|
+
});
|
|
23
117
|
});
|
|
24
|
-
} else $.value = true;
|
|
25
|
-
} else $.value = true;
|
|
26
|
-
function E(e3) {
|
|
27
|
-
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
28
|
-
}
|
|
29
|
-
function A(e3) {
|
|
30
|
-
return g(e3);
|
|
31
|
-
}
|
|
32
|
-
const G = (e3, l2, t2) => {
|
|
33
|
-
J();
|
|
34
|
-
}, H = (e3) => {
|
|
35
|
-
J();
|
|
36
|
-
}, J = () => {
|
|
37
|
-
const e3 = [], l2 = [];
|
|
38
|
-
if (P.value.limit && W.value.length > P.value.limit) {
|
|
39
|
-
const e4 = W.value.length - P.value.limit;
|
|
40
|
-
for (let l3 = 0; l3 < e4; l3++) W.value.shift();
|
|
41
|
-
}
|
|
42
|
-
for (let t2 = 0; t2 < W.value.length; t2++) e3.push(W.value[t2].showName), l2.push(W.value[t2].serverPath);
|
|
43
|
-
h(_2.pageContext.entity, S, l2.join(",")), h(_2.pageContext.entity, F, e3.join(","));
|
|
44
|
-
}, K = l(null), L = l(null);
|
|
45
|
-
return t(() => {
|
|
46
|
-
b.$on(q.value + "-pickFileDone", (e3) => {
|
|
47
|
-
U.value.pickFileDone(e3);
|
|
48
|
-
}), i(() => {
|
|
49
|
-
const e3 = d(I, S), l2 = { showName: d(I, F), serverPath: e3 };
|
|
50
|
-
y(l2, _2.pageContext, _2.configure, { formItemRef: K.value, componentRef: U.value, titleRef: L.value, value: l2, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
|
|
51
118
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
119
|
+
onUnmounted(() => {
|
|
120
|
+
bus.$off(componentId.value + "-pickFileDone");
|
|
121
|
+
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
124
|
+
return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
|
|
125
|
+
key: 0,
|
|
126
|
+
ref_key: "formItemRef",
|
|
127
|
+
ref: formItemRef,
|
|
128
|
+
required: designProperty.value.required,
|
|
129
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
130
|
+
"label-width": designProperty.value.labelWidth,
|
|
131
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
132
|
+
}, {
|
|
133
|
+
label: withCtx(() => [
|
|
134
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
135
|
+
key: 0,
|
|
136
|
+
ref_key: "titleRef",
|
|
137
|
+
ref: titleRef,
|
|
138
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
139
|
+
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
140
|
+
]),
|
|
141
|
+
default: withCtx(() => [
|
|
142
|
+
hasLoad.value ? (openBlock(), createBlock(unref(FsUploadNew), {
|
|
143
|
+
key: 0,
|
|
144
|
+
ref_key: "fileUploadRef",
|
|
145
|
+
ref: fileUploadRef,
|
|
146
|
+
style: { "width": "100%" },
|
|
147
|
+
disabled: designProperty.value.state === "disabled",
|
|
148
|
+
displayType: designProperty.value.displayType,
|
|
149
|
+
accept: designProperty.value.accept,
|
|
150
|
+
multiple: designProperty.value.multiple,
|
|
151
|
+
placeholder: designProperty.value.placeholder,
|
|
152
|
+
limit: designProperty.value.limit,
|
|
153
|
+
"limit-file-size": designProperty.value.limitFileSize,
|
|
154
|
+
openCameraOrChoosePhoto: designProperty.value.openCameraOrChoosePhoto,
|
|
155
|
+
"file-info": fileInfo.value,
|
|
156
|
+
"file-list": fileList.value,
|
|
157
|
+
"system-code": _ctx.pageContext.systemCode,
|
|
158
|
+
componentId: componentId.value,
|
|
159
|
+
"on-success": onSuccess,
|
|
160
|
+
"on-remove": onRemove,
|
|
161
|
+
"before-upload": beforeUpload,
|
|
162
|
+
pageContext: _ctx.pageContext
|
|
163
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : createCommentVNode("", true)
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}, 8, ["required", "class", "label-width", "style"])) : hasLoad.value ? (openBlock(), createBlock(unref(FsUploadNew), {
|
|
167
|
+
key: 1,
|
|
168
|
+
ref_key: "fileUploadRef",
|
|
169
|
+
ref: fileUploadRef,
|
|
170
|
+
style: { "width": "100%" },
|
|
171
|
+
disabled: designProperty.value.state === "disabled",
|
|
172
|
+
displayType: designProperty.value.displayType,
|
|
173
|
+
accept: designProperty.value.accept,
|
|
174
|
+
multiple: designProperty.value.multiple,
|
|
175
|
+
placeholder: designProperty.value.placeholder,
|
|
176
|
+
limit: designProperty.value.limit,
|
|
177
|
+
"limit-file-size": designProperty.value.limitFileSize,
|
|
178
|
+
openCameraOrChoosePhoto: designProperty.value.openCameraOrChoosePhoto,
|
|
179
|
+
"file-info": fileInfo.value,
|
|
180
|
+
"file-list": fileList.value,
|
|
181
|
+
"system-code": _ctx.pageContext.systemCode,
|
|
182
|
+
componentId: componentId.value,
|
|
183
|
+
"on-success": onSuccess,
|
|
184
|
+
"on-remove": onRemove,
|
|
185
|
+
"before-upload": beforeUpload,
|
|
186
|
+
pageContext: _ctx.pageContext
|
|
187
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : createCommentVNode("", true);
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
});
|
|
59
191
|
export {
|
|
60
|
-
|
|
192
|
+
_sfc_main as default
|
|
61
193
|
};
|
package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js
CHANGED
|
@@ -1,25 +1,106 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { setVariableValue
|
|
4
|
-
import { handleAfterInitEvent
|
|
5
|
-
import
|
|
6
|
-
import { $t
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, nextTick, 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 { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
6
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "input-number-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
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
17
|
+
const dynamicModelMethod = computed({
|
|
18
|
+
get() {
|
|
19
|
+
return getVariableValue(entity, dynamicFields);
|
|
20
|
+
},
|
|
21
|
+
set(value) {
|
|
22
|
+
setVariableValue(entity, dynamicFields, value);
|
|
23
|
+
}
|
|
17
24
|
});
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
26
|
+
const runtimeStyle = runtimeInfo.style;
|
|
27
|
+
const runtimeClass = runtimeInfo.class;
|
|
28
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
29
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
30
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
31
|
+
const formItemRef = ref(null);
|
|
32
|
+
const componentRef = ref(null);
|
|
33
|
+
const titleRef = ref(null);
|
|
34
|
+
onMounted(() => {
|
|
35
|
+
nextTick(() => {
|
|
36
|
+
const value = dynamicModelMethod.value;
|
|
37
|
+
handleAfterInitEvent(
|
|
38
|
+
value,
|
|
39
|
+
props.pageContext,
|
|
40
|
+
props.configure,
|
|
41
|
+
{
|
|
42
|
+
formItemRef: formItemRef.value,
|
|
43
|
+
componentRef: componentRef.value,
|
|
44
|
+
titleRef: titleRef.value,
|
|
45
|
+
value,
|
|
46
|
+
entity: props.pageContext.entity.data,
|
|
47
|
+
pageData: props.pageContext.entity.page
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
const _component_el_input_number = resolveComponent("el-input-number");
|
|
54
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
55
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
56
|
+
ref_key: "formItemRef",
|
|
57
|
+
ref: formItemRef,
|
|
58
|
+
required: designProperty.value.required,
|
|
59
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
60
|
+
"label-width": designProperty.value.labelWidth,
|
|
61
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
62
|
+
}, {
|
|
63
|
+
label: withCtx(() => [
|
|
64
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
65
|
+
key: 0,
|
|
66
|
+
ref_key: "titleRef",
|
|
67
|
+
ref: titleRef,
|
|
68
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
69
|
+
}, [
|
|
70
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
71
|
+
key: 0,
|
|
72
|
+
pageContext: _ctx.pageContext,
|
|
73
|
+
property: designProperty.value
|
|
74
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
75
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
76
|
+
], 64))
|
|
77
|
+
], 4)) : createCommentVNode("", true)
|
|
78
|
+
]),
|
|
79
|
+
default: withCtx(() => [
|
|
80
|
+
createVNode(_component_el_input_number, {
|
|
81
|
+
ref_key: "componentRef",
|
|
82
|
+
ref: componentRef,
|
|
83
|
+
disabled: designProperty.value.state === "disabled",
|
|
84
|
+
readonly: designProperty.value.state === "readonly",
|
|
85
|
+
controls: designProperty.value.showButton,
|
|
86
|
+
size: designProperty.value.size,
|
|
87
|
+
placeholder: designProperty.value.placeholder,
|
|
88
|
+
modelValue: dynamicModelMethod.value,
|
|
89
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
90
|
+
precision: designProperty.value.precision,
|
|
91
|
+
step: designProperty.value.step,
|
|
92
|
+
min: designProperty.value.min,
|
|
93
|
+
max: designProperty.value.max,
|
|
94
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
95
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
96
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus"))
|
|
97
|
+
}, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
23
104
|
export {
|
|
24
|
-
|
|
105
|
+
_sfc_main as default
|
|
25
106
|
};
|