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,86 +1,269 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { setVariableValue
|
|
3
|
-
import { getFormModelFields
|
|
4
|
-
import { handleFormEvent
|
|
5
|
-
import
|
|
6
|
-
import { $t
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { defineComponent, ref, computed, watch, onUnmounted, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createCommentVNode, createElementVNode, toDisplayString, createTextVNode } from "vue";
|
|
2
|
+
import { setVariableValue, getVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } 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 _sfc_main$1 from "../common/title-suffix-element.vue.js";
|
|
6
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
7
|
+
const _hoisted_1 = { style: { "float": "left" } };
|
|
8
|
+
const _hoisted_2 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "select-runtime",
|
|
11
|
+
props: {
|
|
12
|
+
pageContext: {},
|
|
13
|
+
configure: {}
|
|
14
|
+
},
|
|
15
|
+
setup(__props, { expose: __expose }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
18
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
19
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
20
|
+
const runtimeStyle = runtimeInfo.style;
|
|
21
|
+
const runtimeClass = runtimeInfo.class;
|
|
22
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
23
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
24
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
25
|
+
const dynamicModelMethod = computed({
|
|
26
|
+
get() {
|
|
27
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
28
|
+
if (val !== void 0 && val !== null) {
|
|
29
|
+
val = val + "";
|
|
30
|
+
}
|
|
31
|
+
if (designProperty.value.multiple) {
|
|
32
|
+
if (val) {
|
|
33
|
+
val = val.split(",");
|
|
34
|
+
} else {
|
|
35
|
+
val = [];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return val;
|
|
39
|
+
},
|
|
40
|
+
set(value) {
|
|
41
|
+
if (designProperty.value.multiple) {
|
|
42
|
+
if (value && value.length > 0 && !designProperty.value.arrayValue) {
|
|
43
|
+
value = value.join(",");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
setVariableValue(entity, dynamicFields, value);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
50
|
+
const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
|
|
51
|
+
if (cacheOptions.length > 0) {
|
|
52
|
+
listOptions.value = cacheOptions;
|
|
30
53
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
const queryLoadingFlag = ref(false);
|
|
55
|
+
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
56
|
+
const valueType = dataOrigin.optionValueSetType;
|
|
57
|
+
let autoSets = [];
|
|
58
|
+
const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
|
|
59
|
+
if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
|
|
60
|
+
if (dataOrigin.filterType == "remote") {
|
|
61
|
+
designProperty.value.filterable = true;
|
|
62
|
+
designProperty.value.remote = true;
|
|
63
|
+
designProperty.value.remoteShowSuffix = true;
|
|
64
|
+
let hisQuery = void 0;
|
|
65
|
+
designProperty.value.remoteMethod = function(query) {
|
|
66
|
+
if (hisQuery === query) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
hisQuery = query;
|
|
70
|
+
queryLoadingFlag.value = true;
|
|
71
|
+
console.log("query", query);
|
|
72
|
+
queryOptionDatasources(props.pageContext, optionconfigInfo, query).then((results) => {
|
|
73
|
+
queryLoadingFlag.value = false;
|
|
74
|
+
}).then((error) => {
|
|
75
|
+
console.log("查询失败!", error);
|
|
76
|
+
queryLoadingFlag.value = false;
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (dataOrigin.autoSets) {
|
|
81
|
+
for (let obj of dataOrigin.autoSets) {
|
|
82
|
+
if (obj.source) {
|
|
83
|
+
autoSets.push(obj);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (props.configure && props.configure.props && props.configure.props.base && props.configure.props.base.optionProp) {
|
|
89
|
+
autoSets.push({
|
|
90
|
+
source: "label",
|
|
91
|
+
target: props.configure.props.base.optionProp
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
designProperty.value.changeMethod = optionChange;
|
|
95
|
+
const monitorFields = designProperty.value.monitorFields;
|
|
96
|
+
const monitorFieldInfos = [];
|
|
97
|
+
if (monitorFields) {
|
|
98
|
+
const preFields = [];
|
|
99
|
+
for (let propName of monitorFields) {
|
|
100
|
+
if (propName.startsWith("${")) {
|
|
101
|
+
propName = propName.substring(2, propName.length - 1);
|
|
102
|
+
const fields = propName.split(".");
|
|
103
|
+
if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
|
|
104
|
+
monitorFieldInfos.push(fields);
|
|
105
|
+
if (!preFields.includes(fields[0])) {
|
|
106
|
+
preFields.push(fields[0]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
for (let preField of preFields) {
|
|
112
|
+
watch(entity[preField], () => {
|
|
113
|
+
monitorFieldChange();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
49
116
|
}
|
|
50
|
-
|
|
51
|
-
|
|
117
|
+
function getMonitorFieldValues() {
|
|
118
|
+
let values = "";
|
|
119
|
+
for (let fieldInfo of monitorFieldInfos) {
|
|
120
|
+
values += "_" + getVariableValue(entity, fieldInfo);
|
|
121
|
+
}
|
|
122
|
+
return values;
|
|
123
|
+
}
|
|
124
|
+
let initMonitorValue = getMonitorFieldValues();
|
|
125
|
+
let monitorTimeout = false;
|
|
126
|
+
function monitorFieldChange() {
|
|
127
|
+
if (monitorTimeout) {
|
|
128
|
+
clearTimeout(monitorTimeout);
|
|
129
|
+
}
|
|
130
|
+
monitorTimeout = setTimeout(function() {
|
|
131
|
+
const newValue = getMonitorFieldValues();
|
|
132
|
+
if (newValue == initMonitorValue) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
initMonitorValue = newValue;
|
|
136
|
+
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
|
|
137
|
+
console.log("查询失败!", error);
|
|
138
|
+
queryLoadingFlag.value = false;
|
|
139
|
+
});
|
|
140
|
+
}, 200);
|
|
141
|
+
}
|
|
142
|
+
onUnmounted(() => {
|
|
143
|
+
if (monitorTimeout) {
|
|
144
|
+
clearTimeout(monitorTimeout);
|
|
145
|
+
}
|
|
52
146
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
147
|
+
function optionChange(value) {
|
|
148
|
+
let selItems = null;
|
|
149
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
150
|
+
selItems = listOptions.value.filter((item) => {
|
|
151
|
+
return Array.isArray(value) ? value.includes(item.value) : value === item.value;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
if (autoSets.length > 0) {
|
|
155
|
+
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
156
|
+
}
|
|
157
|
+
let selectItem;
|
|
158
|
+
if (selItems && selItems.length > 0) {
|
|
159
|
+
selectItem = selItems[0];
|
|
160
|
+
}
|
|
161
|
+
let otherParams = {};
|
|
162
|
+
if (selectItem) {
|
|
163
|
+
otherParams = { extendParams: selectItem };
|
|
164
|
+
}
|
|
165
|
+
handleFormEvent(value, props.pageContext, props.configure, "change", otherParams);
|
|
166
|
+
}
|
|
167
|
+
function updateOptions(newOptions) {
|
|
168
|
+
listOptions.value = newOptions ? newOptions : [];
|
|
169
|
+
}
|
|
170
|
+
const formItemRef = ref(null);
|
|
171
|
+
const componentRef = ref(null);
|
|
172
|
+
const titleRef = ref(null);
|
|
173
|
+
onMounted(() => {
|
|
174
|
+
nextTick(() => {
|
|
175
|
+
const value = dynamicModelMethod.value;
|
|
176
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
177
|
+
formItemRef: formItemRef.value,
|
|
178
|
+
componentRef: componentRef.value,
|
|
179
|
+
titleRef: titleRef.value,
|
|
180
|
+
value,
|
|
181
|
+
entity: props.pageContext.entity.data,
|
|
182
|
+
pageData: props.pageContext.entity.page
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
__expose({
|
|
187
|
+
updateOptions
|
|
76
188
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
189
|
+
return (_ctx, _cache) => {
|
|
190
|
+
const _component_el_option = resolveComponent("el-option");
|
|
191
|
+
const _component_el_select = resolveComponent("el-select");
|
|
192
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
193
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
194
|
+
ref_key: "formItemRef",
|
|
195
|
+
ref: formItemRef,
|
|
196
|
+
required: designProperty.value.required ? true : false,
|
|
197
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
198
|
+
"label-width": designProperty.value.labelWidth,
|
|
199
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
200
|
+
}, {
|
|
201
|
+
label: withCtx(() => [
|
|
202
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
ref_key: "titleRef",
|
|
205
|
+
ref: titleRef,
|
|
206
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
207
|
+
}, [
|
|
208
|
+
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
209
|
+
key: 0,
|
|
210
|
+
pageContext: _ctx.pageContext,
|
|
211
|
+
property: designProperty.value
|
|
212
|
+
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
213
|
+
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
214
|
+
], 64))
|
|
215
|
+
], 4)) : createCommentVNode("", true)
|
|
216
|
+
]),
|
|
217
|
+
default: withCtx(() => [
|
|
218
|
+
createVNode(_component_el_select, {
|
|
219
|
+
ref_key: "componentRef",
|
|
220
|
+
ref: componentRef,
|
|
221
|
+
style: { "width": "100%" },
|
|
222
|
+
disabled: designProperty.value.state === "disabled",
|
|
223
|
+
size: designProperty.value.size,
|
|
224
|
+
clearable: designProperty.value.clearable,
|
|
225
|
+
multiple: designProperty.value.multiple,
|
|
226
|
+
"collapse-tags": designProperty.value.collapseTags,
|
|
227
|
+
"collapse-tags-tooltip": designProperty.value.collapseTagsTooltip,
|
|
228
|
+
filterable: designProperty.value.filterable,
|
|
229
|
+
"allow-create": designProperty.value.allowCreate,
|
|
230
|
+
placeholder: designProperty.value.placeholder,
|
|
231
|
+
"remote-show-suffix": designProperty.value.remoteShowSuffix,
|
|
232
|
+
remote: designProperty.value.remote,
|
|
233
|
+
"remote-method": designProperty.value.remoteMethod,
|
|
234
|
+
loading: queryLoadingFlag.value,
|
|
235
|
+
onChange: designProperty.value.changeMethod,
|
|
236
|
+
modelValue: dynamicModelMethod.value,
|
|
237
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
238
|
+
}, {
|
|
239
|
+
default: withCtx(() => [
|
|
240
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(listOptions.value, (item) => {
|
|
241
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
242
|
+
key: item.value,
|
|
243
|
+
label: item.label,
|
|
244
|
+
value: item.value,
|
|
245
|
+
onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", {
|
|
246
|
+
values: dynamicModelMethod.value
|
|
247
|
+
})
|
|
248
|
+
}, {
|
|
249
|
+
default: withCtx(() => [
|
|
250
|
+
item._description_ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
251
|
+
createElementVNode("span", _hoisted_1, toDisplayString(item.label), 1),
|
|
252
|
+
createElementVNode("span", _hoisted_2, toDisplayString(item._description_), 1)
|
|
253
|
+
], 64)) : createCommentVNode("", true)
|
|
254
|
+
]),
|
|
255
|
+
_: 2
|
|
256
|
+
}, 1032, ["label", "value", "onClick"]);
|
|
257
|
+
}), 128))
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
});
|
|
84
267
|
export {
|
|
85
|
-
|
|
268
|
+
_sfc_main as default
|
|
86
269
|
};
|
package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js
CHANGED
|
@@ -1,16 +1,60 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { SuperIcon
|
|
3
|
-
import { $t
|
|
4
|
-
import { handleAfterInitEvent
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, createElementBlock, openBlock, normalizeClass, normalizeStyle, unref, createElementVNode, createBlock, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { SuperIcon } from "agilebuilder-ui";
|
|
3
|
+
import { $t } from "../../../../utils/i18n-util.js";
|
|
4
|
+
import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "separatelabel-runtime",
|
|
7
|
+
props: {
|
|
8
|
+
pageContext: {},
|
|
9
|
+
configure: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props, { expose: __expose }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const thisRef = ref(null);
|
|
14
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
15
|
+
const runtimeStyle = runtimeInfo.style;
|
|
16
|
+
const runtimeClass = runtimeInfo.class;
|
|
17
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
nextTick(() => {
|
|
20
|
+
const value = $t(props.configure.props.base.title);
|
|
21
|
+
handleAfterInitEvent(
|
|
22
|
+
value,
|
|
23
|
+
props.pageContext,
|
|
24
|
+
props.configure,
|
|
25
|
+
{
|
|
26
|
+
componentRef: thisRef.value,
|
|
27
|
+
value,
|
|
28
|
+
entity: props.pageContext.entity.data,
|
|
29
|
+
pageData: props.pageContext.entity.page
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
});
|
|
11
33
|
});
|
|
12
|
-
|
|
13
|
-
|
|
34
|
+
__expose({});
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock("div", {
|
|
37
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
38
|
+
class: normalizeClass([unref(runtimeClass), "amb-widget-separatelabel"]),
|
|
39
|
+
ref_key: "thisRef",
|
|
40
|
+
ref: thisRef
|
|
41
|
+
}, [
|
|
42
|
+
createElementVNode("div", {
|
|
43
|
+
class: "label",
|
|
44
|
+
style: normalizeStyle(unref(headerStyle))
|
|
45
|
+
}, [
|
|
46
|
+
_ctx.configure.props.iconType && _ctx.configure.props.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
47
|
+
key: 0,
|
|
48
|
+
iconType: _ctx.configure.props.iconType,
|
|
49
|
+
iconValue: _ctx.configure.props.iconValue,
|
|
50
|
+
style: { "margin-right": "2px" }
|
|
51
|
+
}, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
|
|
52
|
+
createTextVNode(" " + toDisplayString(unref($t)(_ctx.configure.props.base.title)), 1)
|
|
53
|
+
], 4)
|
|
54
|
+
], 6);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
14
58
|
export {
|
|
15
|
-
|
|
59
|
+
_sfc_main as default
|
|
16
60
|
};
|
|
@@ -1,33 +1,158 @@
|
|
|
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
|
-
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, createCommentVNode, toDisplayString } 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: "switch-runtime",
|
|
8
|
+
props: {
|
|
9
|
+
pageContext: {},
|
|
10
|
+
configure: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
15
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
16
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
17
|
+
const runtimeStyle = runtimeInfo.style;
|
|
18
|
+
const runtimeClass = runtimeInfo.class;
|
|
19
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
20
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
21
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
22
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
23
|
+
if (val !== void 0 && val !== null && typeof val === "number" && (val + "" === "1" || val + "" === "0")) {
|
|
24
|
+
if (!isHasActive("activeValue")) {
|
|
25
|
+
designProperty.value.activeValue = 1;
|
|
26
|
+
}
|
|
27
|
+
if (!isHasActive("inactiveValue")) {
|
|
28
|
+
designProperty.value.inactiveValue = 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (val !== void 0 && val !== null && typeof val === "boolean") {
|
|
32
|
+
if (!isHasActive("activeValue")) {
|
|
33
|
+
designProperty.value.activeValue = true;
|
|
34
|
+
}
|
|
35
|
+
if (!isHasActive("inactiveValue")) {
|
|
36
|
+
designProperty.value.inactiveValue = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (!isHasActive("activeValue")) {
|
|
40
|
+
designProperty.value.activeValue = true;
|
|
41
|
+
}
|
|
42
|
+
if (!isHasActive("inactiveValue")) {
|
|
43
|
+
designProperty.value.inactiveValue = false;
|
|
44
|
+
}
|
|
45
|
+
function isHasActive(type) {
|
|
46
|
+
if (designProperty.value[type] === void 0 || designProperty.value[type] === null || designProperty.value[type] === "") {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
const switchStyle = runtimeInfo.switchStyle;
|
|
52
|
+
const dynamicModelMethod = computed({
|
|
53
|
+
get() {
|
|
54
|
+
let val2 = getVariableValue(entity, dynamicFields);
|
|
55
|
+
if (val2 !== void 0 && val2 !== null) {
|
|
56
|
+
if (designProperty.value.activeValue === true) {
|
|
57
|
+
if (val2 + "" === "1") {
|
|
58
|
+
val2 = true;
|
|
59
|
+
}
|
|
60
|
+
if (val2 + "" === "0") {
|
|
61
|
+
val2 = false;
|
|
62
|
+
}
|
|
63
|
+
} else if (designProperty.value.activeValue === 1) {
|
|
64
|
+
if (val2 + "" === "true") {
|
|
65
|
+
val2 = 1;
|
|
66
|
+
}
|
|
67
|
+
if (val2 + "" === "false") {
|
|
68
|
+
val2 = 0;
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
val2 = val2 + "";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return val2;
|
|
75
|
+
},
|
|
76
|
+
set(value) {
|
|
77
|
+
if (value !== void 0 && value !== null) {
|
|
78
|
+
if (designProperty.value.activeValue === true) {
|
|
79
|
+
if (value + "" === "1") {
|
|
80
|
+
value = true;
|
|
81
|
+
}
|
|
82
|
+
if (value + "" === "0") {
|
|
83
|
+
value = false;
|
|
84
|
+
}
|
|
85
|
+
} else if (designProperty.value.activeValue === 1) {
|
|
86
|
+
if (value + "" === "true") {
|
|
87
|
+
value = 1;
|
|
88
|
+
}
|
|
89
|
+
if (value + "" === "false") {
|
|
90
|
+
value = 0;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
value = value + "";
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
setVariableValue(entity, dynamicFields, value);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const formItemRef = ref(null);
|
|
100
|
+
const componentRef = ref(null);
|
|
101
|
+
const titleRef = ref(null);
|
|
102
|
+
onMounted(() => {
|
|
103
|
+
nextTick(() => {
|
|
104
|
+
const value = dynamicModelMethod.value;
|
|
105
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
106
|
+
formItemRef: formItemRef.value,
|
|
107
|
+
componentRef: componentRef.value,
|
|
108
|
+
titleRef: titleRef.value,
|
|
109
|
+
value,
|
|
110
|
+
entity: props.pageContext.entity.data,
|
|
111
|
+
pageData: props.pageContext.entity.page
|
|
112
|
+
});
|
|
113
|
+
});
|
|
25
114
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
115
|
+
return (_ctx, _cache) => {
|
|
116
|
+
const _component_el_switch = resolveComponent("el-switch");
|
|
117
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
118
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
119
|
+
ref_key: "formItemRef",
|
|
120
|
+
ref: formItemRef,
|
|
121
|
+
required: designProperty.value.required,
|
|
122
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
123
|
+
"label-width": designProperty.value.labelWidth,
|
|
124
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
125
|
+
}, {
|
|
126
|
+
label: withCtx(() => [
|
|
127
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
128
|
+
key: 0,
|
|
129
|
+
ref_key: "titleRef",
|
|
130
|
+
ref: titleRef,
|
|
131
|
+
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
132
|
+
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
133
|
+
]),
|
|
134
|
+
default: withCtx(() => [
|
|
135
|
+
createVNode(_component_el_switch, {
|
|
136
|
+
ref_key: "componentRef",
|
|
137
|
+
ref: componentRef,
|
|
138
|
+
disabled: designProperty.value.state === "disabled",
|
|
139
|
+
"active-value": designProperty.value.activeValue,
|
|
140
|
+
"active-text": designProperty.value.activeText,
|
|
141
|
+
"inactive-value": designProperty.value.inactiveValue,
|
|
142
|
+
"inactive-text": designProperty.value.inactiveText,
|
|
143
|
+
width: designProperty.value.offOnWidth,
|
|
144
|
+
size: designProperty.value.size,
|
|
145
|
+
style: normalizeStyle(unref(switchStyle)),
|
|
146
|
+
modelValue: dynamicModelMethod.value,
|
|
147
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
148
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
|
|
149
|
+
}, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
});
|
|
31
156
|
export {
|
|
32
|
-
|
|
157
|
+
_sfc_main as default
|
|
33
158
|
};
|