super-page-runtime 2.2.26 → 2.2.29-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -68
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -36
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -224
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -72
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -808
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -61
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -279
- package/dist/es/components/runtime/utils/page-init-util.js +406 -141
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +83 -21
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +46 -14
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +132 -36
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +18 -4
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +107 -17
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +198 -50
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +60 -7
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +203 -52
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +109 -32
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +166 -43
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +117 -32
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +118 -32
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +597 -246
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +62 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +160 -29
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +62 -13
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +594 -212
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -29
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +125 -21
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +102 -16
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +81 -18
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +82 -17
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +86 -14
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +79 -21
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +61 -16
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +37 -10
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +127 -38
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +76 -28
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +178 -61
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -302
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +635 -262
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +115 -40
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +154 -42
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +200 -52
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +239 -68
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +109 -31
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +59 -21
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +188 -56
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +103 -22
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +245 -57
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +174 -32
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +107 -28
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +50 -13
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +194 -64
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +249 -88
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +263 -80
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +57 -13
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +155 -30
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +129 -40
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +46 -18
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +49 -21
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +58 -20
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -40
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -20
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +754 -226
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,31 +1,110 @@
|
|
|
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
|
-
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createTextVNode, toDisplayString, createElementBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "link-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 designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
20
|
+
console.log("designProperty", designProperty.value);
|
|
21
|
+
let formatting = designProperty.value.formatting;
|
|
22
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
23
|
+
const dynamicValue = computed(() => {
|
|
24
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
25
|
+
resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
26
|
+
if (formatting) {
|
|
27
|
+
resultValue = formatting.replace(/\${value}/g, resultValue);
|
|
28
|
+
}
|
|
29
|
+
return resultValue;
|
|
23
30
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
let tooltipVariable = designProperty.value.tooltip;
|
|
32
|
+
let tooltipValue = null;
|
|
33
|
+
if (tooltipVariable) {
|
|
34
|
+
tooltipValue = computed(() => {
|
|
35
|
+
let resultValue = getVariableValue(entity, modelFields);
|
|
36
|
+
resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
|
|
37
|
+
return tooltipVariable.replace(/\${value}/g, resultValue);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const formItemRef = ref(null);
|
|
41
|
+
const componentRef = ref(null);
|
|
42
|
+
const titleRef = ref(null);
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
nextTick(() => {
|
|
45
|
+
const value = dynamicValue.value;
|
|
46
|
+
handleAfterInitEvent(
|
|
47
|
+
value,
|
|
48
|
+
props.pageContext,
|
|
49
|
+
props.configure,
|
|
50
|
+
{
|
|
51
|
+
formItemRef: formItemRef.value,
|
|
52
|
+
componentRef: componentRef.value,
|
|
53
|
+
titleRef: titleRef.value,
|
|
54
|
+
value,
|
|
55
|
+
entity: props.pageContext.entity.data,
|
|
56
|
+
pageData: props.pageContext.entity.page
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
const _component_el_link = resolveComponent("el-link");
|
|
63
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
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
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
69
|
+
"label-width": designProperty.value.labelWidth,
|
|
70
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
71
|
+
}, {
|
|
72
|
+
label: withCtx(() => [
|
|
73
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
74
|
+
key: 0,
|
|
75
|
+
ref_key: "titleRef",
|
|
76
|
+
ref: titleRef,
|
|
77
|
+
style: normalizeStyle({ ...unref(headerStyle) })
|
|
78
|
+
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
79
|
+
]),
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createVNode(_component_el_tooltip, {
|
|
82
|
+
disabled: !unref(tooltipValue),
|
|
83
|
+
content: unref(tooltipValue)
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
createVNode(_component_el_link, {
|
|
87
|
+
ref_key: "componentRef",
|
|
88
|
+
ref: componentRef,
|
|
89
|
+
disabled: designProperty.value.state === "disabled",
|
|
90
|
+
type: designProperty.value.type,
|
|
91
|
+
underline: designProperty.value.underline,
|
|
92
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click", { skipValidate: true }))
|
|
93
|
+
}, {
|
|
94
|
+
default: withCtx(() => [
|
|
95
|
+
createTextVNode(toDisplayString(dynamicValue.value), 1)
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["disabled", "type", "underline"])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["disabled", "content"])
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["class", "label-width", "style"]);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
29
108
|
export {
|
|
30
|
-
|
|
109
|
+
_sfc_main as default
|
|
31
110
|
};
|
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _sfc_main from "./placeholder-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96fc65d8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
placeholderRuntime as default
|
|
7
7
|
};
|
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js
CHANGED
|
@@ -1,16 +1,53 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { handleAfterInitEvent
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementVNode } from "vue";
|
|
2
|
+
import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "placeholder-runtime",
|
|
5
|
+
props: {
|
|
6
|
+
pageContext: {},
|
|
7
|
+
configure: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
12
|
+
const runtimeStyle = runtimeInfo.style;
|
|
13
|
+
const runtimeClass = runtimeInfo.class;
|
|
14
|
+
const formItemRef = ref(null);
|
|
15
|
+
const componentRef = ref(null);
|
|
16
|
+
onMounted(() => {
|
|
17
|
+
nextTick(() => {
|
|
18
|
+
handleAfterInitEvent(
|
|
19
|
+
null,
|
|
20
|
+
props.pageContext,
|
|
21
|
+
props.configure,
|
|
22
|
+
{
|
|
23
|
+
formItemRef: formItemRef.value,
|
|
24
|
+
componentRef: componentRef.value,
|
|
25
|
+
entity: props.pageContext.entity.data,
|
|
26
|
+
pageData: props.pageContext.entity.page
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
});
|
|
8
30
|
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
33
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
34
|
+
ref_key: "formItemRef",
|
|
35
|
+
ref: formItemRef,
|
|
36
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
37
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
38
|
+
}, {
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
createElementVNode("div", {
|
|
41
|
+
ref_key: "componentRef",
|
|
42
|
+
ref: componentRef,
|
|
43
|
+
style: { "width": "100%", "height": "100%" }
|
|
44
|
+
}, " ", 512)
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["class", "style"]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
14
51
|
export {
|
|
15
|
-
|
|
52
|
+
_sfc_main as default
|
|
16
53
|
};
|
|
@@ -1,70 +1,200 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { setVariableValue
|
|
3
|
-
import { getFormModelFields
|
|
4
|
-
import { handleFormEvent
|
|
5
|
-
import { $t
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { defineComponent, computed, ref, watch, onUnmounted, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { setVariableValue, getVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleFormEvent, handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "radio-runtime",
|
|
8
|
+
props: {
|
|
9
|
+
pageContext: {},
|
|
10
|
+
configure: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props, { expose: __expose }) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
15
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
16
|
+
const dynamicModelMethod = computed({
|
|
17
|
+
get() {
|
|
18
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
19
|
+
if (val !== void 0 && val !== null) {
|
|
20
|
+
val = val + "";
|
|
21
|
+
}
|
|
22
|
+
return val;
|
|
23
|
+
},
|
|
24
|
+
set(value) {
|
|
25
|
+
setVariableValue(entity, dynamicFields, value);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
29
|
+
const runtimeStyle = runtimeInfo.style;
|
|
30
|
+
const runtimeClass = runtimeInfo.class;
|
|
31
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
32
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
33
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
34
|
+
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
35
|
+
const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
|
|
36
|
+
if (cacheOptions.length > 0) {
|
|
37
|
+
listOptions.value = cacheOptions;
|
|
38
|
+
}
|
|
39
|
+
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
40
|
+
const valueType = dataOrigin.optionValueSetType;
|
|
41
|
+
let autoSets = [];
|
|
42
|
+
if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
|
|
43
|
+
if (dataOrigin.autoSets) {
|
|
44
|
+
for (let obj of dataOrigin.autoSets) {
|
|
45
|
+
if (obj.source) {
|
|
46
|
+
autoSets.push(obj);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (props.configure && props.configure.props && props.configure.props.base && props.configure.props.base.optionProp) {
|
|
52
|
+
autoSets.push({
|
|
53
|
+
source: "label",
|
|
54
|
+
target: props.configure.props.base.optionProp
|
|
55
|
+
});
|
|
23
56
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
designProperty.value.changeMethod = optionChange;
|
|
58
|
+
const monitorFields = designProperty.value.monitorFields;
|
|
59
|
+
const monitorFieldInfos = [];
|
|
60
|
+
if (monitorFields) {
|
|
61
|
+
const preFields = [];
|
|
62
|
+
for (let propName of monitorFields) {
|
|
63
|
+
if (propName.startsWith("${")) {
|
|
64
|
+
propName = propName.substring(2, propName.length - 1);
|
|
65
|
+
const fields = propName.split(".");
|
|
66
|
+
if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
|
|
67
|
+
monitorFieldInfos.push(fields);
|
|
68
|
+
if (!preFields.includes(fields[0])) {
|
|
69
|
+
preFields.push(fields[0]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (let preField of preFields) {
|
|
75
|
+
watch(entity[preField], () => {
|
|
76
|
+
monitorFieldChange();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
33
79
|
}
|
|
34
|
-
|
|
35
|
-
|
|
80
|
+
function getMonitorFieldValues() {
|
|
81
|
+
let values = "";
|
|
82
|
+
for (let fieldInfo of monitorFieldInfos) {
|
|
83
|
+
values += "_" + getVariableValue(entity, fieldInfo);
|
|
84
|
+
}
|
|
85
|
+
return values;
|
|
86
|
+
}
|
|
87
|
+
let initMonitorValue = getMonitorFieldValues();
|
|
88
|
+
let monitorTimeout = false;
|
|
89
|
+
const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
|
|
90
|
+
function monitorFieldChange() {
|
|
91
|
+
if (monitorTimeout) {
|
|
92
|
+
clearTimeout(monitorTimeout);
|
|
93
|
+
}
|
|
94
|
+
monitorTimeout = setTimeout(function() {
|
|
95
|
+
const newValue = getMonitorFieldValues();
|
|
96
|
+
if (newValue == initMonitorValue) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
initMonitorValue = newValue;
|
|
100
|
+
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
|
|
101
|
+
console.log("查询失败!", error);
|
|
102
|
+
});
|
|
103
|
+
}, 200);
|
|
104
|
+
}
|
|
105
|
+
onUnmounted(() => {
|
|
106
|
+
if (monitorTimeout) {
|
|
107
|
+
clearTimeout(monitorTimeout);
|
|
108
|
+
}
|
|
36
109
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
110
|
+
function optionChange(value) {
|
|
111
|
+
if (autoSets.length > 0) {
|
|
112
|
+
let selItems = null;
|
|
113
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
114
|
+
selItems = listOptions.value.filter((item) => {
|
|
115
|
+
return value === item.value;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
119
|
+
}
|
|
120
|
+
handleFormEvent(value, props.pageContext, props.configure, "change");
|
|
121
|
+
}
|
|
122
|
+
function updateOptions(newOptions) {
|
|
123
|
+
listOptions.value = newOptions ? newOptions : [];
|
|
124
|
+
}
|
|
125
|
+
const formItemRef = ref(null);
|
|
126
|
+
const componentRef = ref(null);
|
|
127
|
+
const titleRef = ref(null);
|
|
128
|
+
onMounted(() => {
|
|
129
|
+
nextTick(() => {
|
|
130
|
+
const value = dynamicModelMethod.value;
|
|
131
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
132
|
+
formItemRef: formItemRef.value,
|
|
133
|
+
componentRef: componentRef.value,
|
|
134
|
+
titleRef: titleRef.value,
|
|
135
|
+
value,
|
|
136
|
+
entity: props.pageContext.entity.data,
|
|
137
|
+
pageData: props.pageContext.entity.page
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
__expose({
|
|
142
|
+
updateOptions
|
|
60
143
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
144
|
+
return (_ctx, _cache) => {
|
|
145
|
+
const _component_el_radio = resolveComponent("el-radio");
|
|
146
|
+
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
147
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
148
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
149
|
+
ref_key: "formItemRef",
|
|
150
|
+
ref: formItemRef,
|
|
151
|
+
required: designProperty.value.required,
|
|
152
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
153
|
+
"label-width": designProperty.value.labelWidth,
|
|
154
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
155
|
+
}, {
|
|
156
|
+
label: withCtx(() => [
|
|
157
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
158
|
+
key: 0,
|
|
159
|
+
ref_key: "titleRef",
|
|
160
|
+
ref: titleRef,
|
|
161
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
162
|
+
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
163
|
+
]),
|
|
164
|
+
default: withCtx(() => [
|
|
165
|
+
createVNode(_component_el_radio_group, {
|
|
166
|
+
ref_key: "componentRef",
|
|
167
|
+
ref: componentRef,
|
|
168
|
+
disabled: designProperty.value.state === "disabled",
|
|
169
|
+
size: designProperty.value.size,
|
|
170
|
+
onChange: designProperty.value.changeMethod,
|
|
171
|
+
modelValue: dynamicModelMethod.value,
|
|
172
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
173
|
+
}, {
|
|
174
|
+
default: withCtx(() => [
|
|
175
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(listOptions.value, (item) => {
|
|
176
|
+
return openBlock(), createBlock(_component_el_radio, {
|
|
177
|
+
key: item.value,
|
|
178
|
+
label: item.value,
|
|
179
|
+
onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", {
|
|
180
|
+
values: dynamicModelMethod.value
|
|
181
|
+
})
|
|
182
|
+
}, {
|
|
183
|
+
default: withCtx(() => [
|
|
184
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
185
|
+
]),
|
|
186
|
+
_: 2
|
|
187
|
+
}, 1032, ["label", "onClick"]);
|
|
188
|
+
}), 128))
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["disabled", "size", "onChange", "modelValue"])
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
});
|
|
68
198
|
export {
|
|
69
|
-
|
|
199
|
+
_sfc_main as default
|
|
70
200
|
};
|