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,44 +1,133 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { getVariableValue
|
|
4
|
-
import { handleAfterInitEvent
|
|
5
|
-
import { $t
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "tag-runtime",
|
|
8
|
+
props: {
|
|
9
|
+
pageContext: {},
|
|
10
|
+
configure: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const modelFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
16
|
+
const runtimeStyle = runtimeInfo.style;
|
|
17
|
+
const runtimeClass = runtimeInfo.class;
|
|
18
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
19
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
20
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
21
|
+
let formatting = designProperty.value.formatting;
|
|
22
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
23
|
+
const dynamicValues = computed(() => {
|
|
24
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
25
|
+
if (resultValue === void 0 || resultValue === null) {
|
|
26
|
+
resultValue = [];
|
|
27
|
+
}
|
|
28
|
+
if (!Array.isArray(resultValue)) {
|
|
29
|
+
resultValue = (resultValue + "").split(",");
|
|
30
|
+
}
|
|
31
|
+
const options = [];
|
|
32
|
+
let no = 1;
|
|
33
|
+
for (const val of resultValue) {
|
|
34
|
+
if (val === void 0 || val === null || val === "") {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const o = {
|
|
38
|
+
value: val,
|
|
39
|
+
label: val
|
|
40
|
+
};
|
|
41
|
+
if (formatting) {
|
|
42
|
+
o.label = formatting.replace(/\${value}/g, o.value).replace(/\${no}/g, no);
|
|
43
|
+
}
|
|
44
|
+
options.push(o);
|
|
45
|
+
no++;
|
|
46
|
+
}
|
|
47
|
+
return options;
|
|
26
48
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
function closeTag($event, tag) {
|
|
50
|
+
if (designProperty.value.closable) {
|
|
51
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
52
|
+
if (resultValue === void 0 || resultValue === null) {
|
|
53
|
+
resultValue = [];
|
|
54
|
+
}
|
|
55
|
+
const isArray = Array.isArray(resultValue);
|
|
56
|
+
if (!isArray) {
|
|
57
|
+
resultValue = (resultValue + "").split(",");
|
|
58
|
+
}
|
|
59
|
+
const index = resultValue.indexOf(tag.value);
|
|
60
|
+
if (index > -1) {
|
|
61
|
+
resultValue.splice(index, 1);
|
|
62
|
+
}
|
|
63
|
+
if (!isArray) {
|
|
64
|
+
resultValue = resultValue.join(",");
|
|
65
|
+
}
|
|
66
|
+
setVariableValue(entity, modelFields, resultValue);
|
|
37
67
|
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
68
|
+
handleFormEvent($event, props.pageContext, props.configure, "remove");
|
|
69
|
+
}
|
|
70
|
+
const formItemRef = ref(null);
|
|
71
|
+
const titleRef = ref(null);
|
|
72
|
+
onMounted(() => {
|
|
73
|
+
nextTick(() => {
|
|
74
|
+
const value = dynamicValues.value;
|
|
75
|
+
handleAfterInitEvent(
|
|
76
|
+
value,
|
|
77
|
+
props.pageContext,
|
|
78
|
+
props.configure,
|
|
79
|
+
{
|
|
80
|
+
formItemRef: formItemRef.value,
|
|
81
|
+
titleRef: titleRef.value,
|
|
82
|
+
value,
|
|
83
|
+
entity: props.pageContext.entity.data,
|
|
84
|
+
pageData: props.pageContext.entity.page
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
91
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
92
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
93
|
+
ref_key: "formItemRef",
|
|
94
|
+
ref: formItemRef,
|
|
95
|
+
required: designProperty.value.required,
|
|
96
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
97
|
+
"label-width": designProperty.value.labelWidth,
|
|
98
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
99
|
+
}, {
|
|
100
|
+
label: withCtx(() => [
|
|
101
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
102
|
+
key: 0,
|
|
103
|
+
ref_key: "titleRef",
|
|
104
|
+
ref: titleRef,
|
|
105
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
106
|
+
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
107
|
+
]),
|
|
108
|
+
default: withCtx(() => [
|
|
109
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dynamicValues.value, (tag) => {
|
|
110
|
+
return openBlock(), createBlock(_component_el_tag, {
|
|
111
|
+
key: tag,
|
|
112
|
+
size: designProperty.value.size,
|
|
113
|
+
closable: designProperty.value.closable,
|
|
114
|
+
type: designProperty.value.type,
|
|
115
|
+
style: { "margin-right": "4px" },
|
|
116
|
+
onClose: ($event) => closeTag($event, tag),
|
|
117
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
118
|
+
}, {
|
|
119
|
+
default: withCtx(() => [
|
|
120
|
+
createTextVNode(toDisplayString(tag.label), 1)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1032, ["size", "closable", "type", "onClose"]);
|
|
124
|
+
}), 128))
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
42
131
|
export {
|
|
43
|
-
|
|
132
|
+
_sfc_main as default
|
|
44
133
|
};
|
|
@@ -1,25 +1,110 @@
|
|
|
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, createElementBlock, openBlock, createVNode, normalizeStyle, normalizeClass, unref, withCtx, createCommentVNode, createBlock, 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: "textarea-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 designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
27
|
+
const runtimeStyle = runtimeInfo.style;
|
|
28
|
+
const runtimeClass = runtimeInfo.class;
|
|
29
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
30
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
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 = resolveComponent("el-input");
|
|
54
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
55
|
+
return openBlock(), createElementBlock("div", null, [
|
|
56
|
+
createVNode(_component_el_form_item, {
|
|
57
|
+
ref_key: "formItemRef",
|
|
58
|
+
ref: formItemRef,
|
|
59
|
+
required: designProperty.value.required ? true : false,
|
|
60
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
61
|
+
"label-width": designProperty.value.labelWidth,
|
|
62
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
63
|
+
}, {
|
|
64
|
+
label: withCtx(() => [
|
|
65
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
ref_key: "titleRef",
|
|
68
|
+
ref: titleRef,
|
|
69
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
70
|
+
}, [
|
|
71
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
72
|
+
key: 0,
|
|
73
|
+
pageContext: _ctx.pageContext,
|
|
74
|
+
property: designProperty.value
|
|
75
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
76
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
77
|
+
], 64))
|
|
78
|
+
], 4)) : createCommentVNode("", true)
|
|
79
|
+
]),
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createVNode(_component_el_input, {
|
|
82
|
+
ref_key: "componentRef",
|
|
83
|
+
ref: componentRef,
|
|
84
|
+
disabled: designProperty.value.state === "disabled",
|
|
85
|
+
readonly: designProperty.value.state === "readonly",
|
|
86
|
+
size: designProperty.value.size,
|
|
87
|
+
clearable: designProperty.value.clearable,
|
|
88
|
+
placeholder: designProperty.value.placeholder,
|
|
89
|
+
modelValue: dynamicModelMethod.value,
|
|
90
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
91
|
+
rows: designProperty.value.rows ? designProperty.value.rows : 2,
|
|
92
|
+
maxlength: designProperty.value.maxLength,
|
|
93
|
+
"show-word-limit": designProperty.value.showInputNum,
|
|
94
|
+
type: "textarea",
|
|
95
|
+
onInput: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
|
|
96
|
+
onChange: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
97
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
98
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
99
|
+
onClick: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
100
|
+
}, null, 8, ["disabled", "readonly", "size", "clearable", "placeholder", "modelValue", "rows", "maxlength", "show-word-limit"])
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["required", "class", "label-width", "style"])
|
|
104
|
+
]);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
23
108
|
export {
|
|
24
|
-
|
|
109
|
+
_sfc_main as default
|
|
25
110
|
};
|
|
@@ -1,97 +1,196 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
import { getRuntimeComponentByName
|
|
4
|
-
import { PageDimensions
|
|
5
|
-
import { addComponentRef
|
|
6
|
-
import { getPermissionCodes
|
|
7
|
-
import { getFormPropName
|
|
8
|
-
import { getPropClassName
|
|
9
|
-
import { isShowComponent
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import { defineComponent, ref, markRaw, onMounted, 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, controlObjectRenderState } from "../../utils/page-init-util.js";
|
|
7
|
+
import { getFormPropName, getSizeConfig } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { getPropClassName, isNumber } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowComponent } from "../../utils/events/event-util.js";
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "home-chart-render",
|
|
12
|
+
props: {
|
|
13
|
+
pageContext: {},
|
|
14
|
+
configure: {}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
if (props.configure.style == void 0) {
|
|
19
|
+
props.configure.style = {};
|
|
20
|
+
}
|
|
21
|
+
const permissionCodes = getPermissionCodes(props.configure, props.pageContext);
|
|
22
|
+
if (props.configure && props.configure.props && props.configure.props.base) {
|
|
23
|
+
props.configure.props.base.functionCode = permissionCodes;
|
|
24
|
+
}
|
|
25
|
+
let handleShowFlag = ref(true);
|
|
26
|
+
let showFlag = ref(true);
|
|
27
|
+
const dynamicComponent = ref({});
|
|
28
|
+
dynamicComponent.value = markRaw(getRuntimeComponentByName(props.configure.name));
|
|
29
|
+
const showCopy = ref(true);
|
|
30
|
+
if (dynamicComponent.value == null) {
|
|
31
|
+
dynamicComponent.value = _sfc_main$1;
|
|
32
|
+
showCopy.value = false;
|
|
33
|
+
}
|
|
34
|
+
const thisRef = ref(null);
|
|
35
|
+
const runtimeStyle = ref({});
|
|
36
|
+
const runtimeClass = ref("");
|
|
37
|
+
const propClassName = getPropClassName(props.configure);
|
|
38
|
+
if (propClassName) {
|
|
39
|
+
runtimeClass.value = propClassName;
|
|
40
|
+
}
|
|
41
|
+
const commonRuntime = props.configure.runtime && props.configure.runtime.common ? props.configure.runtime.common : {};
|
|
42
|
+
if (commonRuntime.class) {
|
|
43
|
+
runtimeClass.value += " " + commonRuntime.class;
|
|
44
|
+
}
|
|
45
|
+
if (commonRuntime.style) {
|
|
46
|
+
Object.assign(runtimeStyle.value, commonRuntime.style);
|
|
47
|
+
const pageDimensions = props.pageContext && props.pageContext.dimensions ? props.pageContext.dimensions : PageDimensions.PC;
|
|
48
|
+
const sizeStyle = commonRuntime.style[pageDimensions + "_style"];
|
|
49
|
+
if (sizeStyle) {
|
|
50
|
+
Object.assign(runtimeStyle.value, sizeStyle);
|
|
51
|
+
}
|
|
52
|
+
const sizeClass = commonRuntime.style[pageDimensions + "_class"];
|
|
53
|
+
if (sizeClass) {
|
|
54
|
+
runtimeClass.value += " " + sizeClass;
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
function setComponentRef(el) {
|
|
58
|
+
thisRef.value = el;
|
|
59
|
+
if (el && !el.show) {
|
|
60
|
+
el.show = function() {
|
|
61
|
+
handleShowFlag.value = true;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (el && !el.hide) {
|
|
65
|
+
el.hide = function() {
|
|
66
|
+
handleShowFlag.value = false;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (el && !el.getConfigure) {
|
|
70
|
+
el.getConfigure = function() {
|
|
71
|
+
return props.configure;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (props.configure.uuid) {
|
|
75
|
+
addComponentRef(props.pageContext, props.configure.uuid, thisRef);
|
|
76
|
+
}
|
|
77
|
+
if (props.configure.code) {
|
|
78
|
+
addComponentRefByCode(props.pageContext, props.configure.code, thisRef);
|
|
79
|
+
} else if (props.configure.props && props.configure.props.base) {
|
|
80
|
+
const propsBase2 = props.configure.props.base;
|
|
81
|
+
if (propsBase2.prop) {
|
|
82
|
+
let propName = propsBase2.prop;
|
|
83
|
+
if (propName.startsWith("${")) {
|
|
84
|
+
propName = propName.substring(2, propName.length - 1);
|
|
85
|
+
}
|
|
86
|
+
if (propName.includes(".")) {
|
|
87
|
+
propName = propName.substring(propName.indexOf(".") + 1);
|
|
88
|
+
}
|
|
89
|
+
addComponentRefByCode(props.pageContext, propName, thisRef);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const propsBase = props.configure.props ? props.configure.props.base : null;
|
|
93
|
+
if (propsBase && propsBase.prop) {
|
|
94
|
+
let propName = propsBase.prop;
|
|
95
|
+
propName = getFormPropName(propName);
|
|
96
|
+
controlObjectRenderState(props.pageContext, propName);
|
|
97
|
+
}
|
|
98
|
+
setComponentHeight();
|
|
49
99
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const t3 = e5.parentNode;
|
|
57
|
-
if (!e5 || !t3) return;
|
|
58
|
-
const o2 = e5.getBoundingClientRect();
|
|
59
|
-
let n2 = window.innerHeight - o2.y - 80, i2 = n2 + "";
|
|
60
|
-
B(n2) && (i2 = n2 + "px"), W.value.height = i2, W.value["overflow-y"] = "auto", W.value["overflow-x"] = "hidden", O2.configure.sytle || (O2.configure.sytle = {}), O2.configure.sytle._heightStyle = i2;
|
|
61
|
-
});
|
|
62
|
-
}();
|
|
63
|
-
}
|
|
64
|
-
n(() => {
|
|
65
|
-
E();
|
|
66
|
-
});
|
|
67
|
-
const E = () => {
|
|
68
|
-
if (!S.value) return;
|
|
69
|
-
let e3 = S.value.$el;
|
|
70
|
-
e3 || (e3 = S.value);
|
|
71
|
-
const t2 = e3.parentNode;
|
|
72
|
-
if (!e3 || !t2) return;
|
|
73
|
-
const o2 = O2.configure.props ? O2.configure.props : {}, n2 = O2.configure.style ? O2.configure.style : {}, i2 = o2.position;
|
|
74
|
-
if ("top" == i2 || "bottom" == i2) {
|
|
75
|
-
const o3 = [t2];
|
|
76
|
-
if (o3 && o3.length > 0) {
|
|
77
|
-
const e4 = o3[0].getBoundingClientRect();
|
|
78
|
-
"top" == i2 && (W.value.top = e4.top + "px"), "bottom" == i2 && (W.value.bottom = "10px");
|
|
100
|
+
onMounted(() => {
|
|
101
|
+
dynamicallyCalculatePosition();
|
|
102
|
+
});
|
|
103
|
+
function setComponentHeight() {
|
|
104
|
+
if (!thisRef.value) {
|
|
105
|
+
return;
|
|
79
106
|
}
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
107
|
+
const sizeConfig = getSizeConfig(props.pageContext, props.configure);
|
|
108
|
+
if (props.configure.name !== "table" && sizeConfig && sizeConfig["isCalcHeight"]) {
|
|
109
|
+
nextTick(() => {
|
|
110
|
+
let thisRefDom = thisRef.value.$el;
|
|
111
|
+
if (!thisRefDom) {
|
|
112
|
+
thisRefDom = thisRef.value;
|
|
113
|
+
}
|
|
114
|
+
const parentNode = thisRefDom.parentNode;
|
|
115
|
+
if (!thisRefDom || !parentNode) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const rect = thisRefDom.getBoundingClientRect();
|
|
119
|
+
let contentHeight = window.innerHeight - rect.y - 80;
|
|
120
|
+
let heightStyle = contentHeight + "";
|
|
121
|
+
if (isNumber(contentHeight)) {
|
|
122
|
+
heightStyle = contentHeight + "px";
|
|
123
|
+
}
|
|
124
|
+
runtimeStyle.value["height"] = heightStyle;
|
|
125
|
+
runtimeStyle.value["overflow-y"] = "auto";
|
|
126
|
+
runtimeStyle.value["overflow-x"] = "hidden";
|
|
127
|
+
if (!props.configure.sytle) {
|
|
128
|
+
props.configure.sytle = {};
|
|
129
|
+
}
|
|
130
|
+
props.configure.sytle._heightStyle = heightStyle;
|
|
131
|
+
});
|
|
86
132
|
}
|
|
87
|
-
n2.left && (W.value.left = n2.left + "px"), n2.top && (W.value.top = n2.top + "px");
|
|
88
133
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
134
|
+
const dynamicallyCalculatePosition = () => {
|
|
135
|
+
if (!thisRef.value) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
let thisRefDom = thisRef.value.$el;
|
|
139
|
+
if (!thisRefDom) {
|
|
140
|
+
thisRefDom = thisRef.value;
|
|
141
|
+
}
|
|
142
|
+
const parentNode = thisRefDom.parentNode;
|
|
143
|
+
if (!thisRefDom || !parentNode) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const thisProps = props.configure.props ? props.configure.props : {};
|
|
147
|
+
const thisStyle = props.configure.style ? props.configure.style : {};
|
|
148
|
+
const position = thisProps.position;
|
|
149
|
+
if (position == "top" || position == "bottom") {
|
|
150
|
+
const contentObj = [parentNode];
|
|
151
|
+
if (contentObj && contentObj.length > 0) {
|
|
152
|
+
const contentRec = contentObj[0].getBoundingClientRect();
|
|
153
|
+
if (position == "top") {
|
|
154
|
+
runtimeStyle.value["top"] = contentRec.top + "px";
|
|
155
|
+
}
|
|
156
|
+
if (position == "bottom") {
|
|
157
|
+
runtimeStyle.value["bottom"] = "10px";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const thisRec = thisRefDom.getBoundingClientRect();
|
|
161
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
162
|
+
} else if (thisStyle.position) {
|
|
163
|
+
runtimeStyle.value["position"] = thisStyle.position;
|
|
164
|
+
if (runtimeStyle.value.position != "relative") {
|
|
165
|
+
if (!runtimeStyle.value["width"]) {
|
|
166
|
+
const thisRec = thisRefDom.getBoundingClientRect();
|
|
167
|
+
runtimeStyle.value["width"] = thisRec.width + "px";
|
|
168
|
+
}
|
|
169
|
+
if (thisStyle.left) {
|
|
170
|
+
runtimeStyle.value["left"] = thisStyle.left + "px";
|
|
171
|
+
}
|
|
172
|
+
if (thisStyle.top) {
|
|
173
|
+
runtimeStyle.value["top"] = thisStyle.top + "px";
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
return (_ctx, _cache) => {
|
|
179
|
+
const _directive_permission = resolveDirective("permission");
|
|
180
|
+
return unref(isShowComponent)(_ctx.configure) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(dynamicComponent.value), {
|
|
181
|
+
key: 0,
|
|
182
|
+
ref: setComponentRef,
|
|
183
|
+
style: normalizeStyle(runtimeStyle.value),
|
|
184
|
+
class: normalizeClass(runtimeClass.value),
|
|
185
|
+
configure: _ctx.configure,
|
|
186
|
+
pageContext: _ctx.pageContext
|
|
187
|
+
}, null, 8, ["style", "class", "configure", "pageContext"])), [
|
|
188
|
+
[vShow, unref(showFlag)],
|
|
189
|
+
[_directive_permission, unref(permissionCodes) ? unref(permissionCodes) : "true"]
|
|
190
|
+
]) : createCommentVNode("", true);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
});
|
|
95
194
|
export {
|
|
96
|
-
|
|
195
|
+
_sfc_main as default
|
|
97
196
|
};
|