super-page-runtime 2.1.92 → 2.1.95
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 +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -303
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +835 -2283
- package/dist/es/components/runtime/utils/events/validator-util.js +236 -555
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +295 -603
- package/dist/es/components/runtime/utils/page-init-util.js +134 -369
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- 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 +19 -75
- 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 +14 -46
- 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 +37 -132
- 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 +4 -18
- 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 +17 -107
- 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 +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- 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 +7 -60
- 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 +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- 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 +32 -107
- 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 +43 -164
- 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 +32 -115
- 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 +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- 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 +8 -62
- 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 +63 -226
- 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 +13 -62
- 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 +168 -513
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- 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 +23 -125
- 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 +16 -102
- 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 +18 -81
- 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 +17 -82
- 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 +14 -86
- 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 +21 -79
- 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 +16 -61
- 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 +10 -37
- 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 +38 -127
- 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 +28 -76
- 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 +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
- 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 +251 -592
- 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 +43 -115
- 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 +56 -216
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- 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 +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- 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 +54 -200
- 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 +69 -239
- 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 +28 -98
- 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 +22 -59
- 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 +52 -173
- 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 +22 -103
- 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 +58 -249
- 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 +34 -174
- 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 +28 -107
- 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 +13 -50
- 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 +66 -189
- 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 +91 -243
- 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 +82 -261
- 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 +13 -57
- 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 +30 -155
- 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 +41 -129
- 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 +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- 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 +19 -46
- 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 +22 -49
- 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 +21 -58
- 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 +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +232 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -1,267 +1,88 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
|
|
2
|
-
import { getVariableValue, setVariableValue, 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
|
|
6
|
-
import { $t } from "../../../../utils/i18n-util.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
if (designProperty.value.multiple) {
|
|
32
|
-
if (val) {
|
|
33
|
-
val = val.split(",");
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return val;
|
|
37
|
-
},
|
|
38
|
-
set(value) {
|
|
39
|
-
if (designProperty.value.multiple) {
|
|
40
|
-
if (value && value.length > 0) {
|
|
41
|
-
value = value.join(",");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
setVariableValue(entity, dynamicFields, value);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
48
|
-
const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
|
|
49
|
-
if (cacheOptions.length > 0) {
|
|
50
|
-
listOptions.value = cacheOptions;
|
|
51
|
-
}
|
|
52
|
-
const queryLoadingFlag = ref(false);
|
|
53
|
-
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
54
|
-
const valueType = dataOrigin.optionValueSetType;
|
|
55
|
-
let autoSets = [];
|
|
56
|
-
const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
|
|
57
|
-
if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
|
|
58
|
-
if (dataOrigin.filterType == "remote") {
|
|
59
|
-
designProperty.value.filterable = true;
|
|
60
|
-
designProperty.value.remote = true;
|
|
61
|
-
designProperty.value.remoteShowSuffix = true;
|
|
62
|
-
let hisQuery = void 0;
|
|
63
|
-
designProperty.value.remoteMethod = function(query) {
|
|
64
|
-
if (hisQuery === query) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
hisQuery = query;
|
|
68
|
-
queryLoadingFlag.value = true;
|
|
69
|
-
console.log("query", query);
|
|
70
|
-
queryOptionDatasources(props.pageContext, optionconfigInfo, query).then((results) => {
|
|
71
|
-
queryLoadingFlag.value = false;
|
|
72
|
-
}).then((error) => {
|
|
73
|
-
console.log("查询失败!", error);
|
|
74
|
-
queryLoadingFlag.value = false;
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
if (dataOrigin.autoSets) {
|
|
79
|
-
for (let obj of dataOrigin.autoSets) {
|
|
80
|
-
if (obj.source) {
|
|
81
|
-
autoSets.push(obj);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (props.configure && props.configure.props && props.configure.props.base && props.configure.props.base.optionProp) {
|
|
87
|
-
autoSets.push({
|
|
88
|
-
source: "label",
|
|
89
|
-
target: props.configure.props.base.optionProp
|
|
90
|
-
});
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, watch as o, onMounted as a, nextTick as u, resolveComponent as n, openBlock as i, createBlock as r, normalizeClass as s, unref as p, normalizeStyle as f, withCtx as c, createElementBlock as v, Fragment as g, createTextVNode as m, toDisplayString as d, createCommentVNode as h, createVNode as y, renderList as x, createElementVNode as b } from "vue";
|
|
2
|
+
import { getVariableValue as C, setVariableValue as _, getOptionDatasFromPage as k, queryOptionDatasources as w, autoSetAfterSelect as S } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleFormEvent as j, handleAfterInitEvent as R } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import z from "../common/title-suffix-element.vue.js";
|
|
6
|
+
import { $t as I } from "../../../../utils/i18n-util.js";
|
|
7
|
+
const M = { style: { float: "left" } }, V = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, q = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
|
|
8
|
+
const O = e2, P = O.pageContext.entity ? O.pageContext.entity : {};
|
|
9
|
+
let A = T(O.pageContext, O.configure);
|
|
10
|
+
const D = O.configure.runtime ? O.configure.runtime : {}, W = D.style, E = D.class, F = D.headerStyle, U = D.titleExceedStyle, $ = t(D.props ? D.props : {}), B = l({ get() {
|
|
11
|
+
let e3 = C(P, A);
|
|
12
|
+
return null != e3 && (e3 += ""), $.value.multiple && e3 && (e3 = e3.split(",")), e3;
|
|
13
|
+
}, set(e3) {
|
|
14
|
+
$.value.multiple && e3 && e3.length > 0 && (e3 = e3.join(",")), _(P, A, e3);
|
|
15
|
+
} }), G = t($.value.options ? $.value.options : []), H = k(O.pageContext, O.configure);
|
|
16
|
+
H.length > 0 && (G.value = H);
|
|
17
|
+
const J = t(false), K = O.configure.props && O.configure.props.dataOrigin ? O.configure.props.dataOrigin : {}, L = K.optionValueSetType;
|
|
18
|
+
let N = [];
|
|
19
|
+
const Q = $.value.optionconfigInfo ? $.value.optionconfigInfo : {};
|
|
20
|
+
if ("dynamicData" == L || "dataTable" == L || "service" == L) {
|
|
21
|
+
if ("remote" == K.filterType) {
|
|
22
|
+
let e3;
|
|
23
|
+
$.value.filterable = true, $.value.remote = true, $.value.remoteShowSuffix = true, $.value.remoteMethod = function(t2) {
|
|
24
|
+
e3 !== t2 && (e3 = t2, J.value = true, w(O.pageContext, Q, t2).then((e4) => {
|
|
25
|
+
J.value = false;
|
|
26
|
+
}).then((e4) => {
|
|
27
|
+
J.value = false;
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
91
30
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function getMonitorFieldValues() {
|
|
116
|
-
let values = "";
|
|
117
|
-
for (let fieldInfo of monitorFieldInfos) {
|
|
118
|
-
values += "_" + getVariableValue(entity, fieldInfo);
|
|
119
|
-
}
|
|
120
|
-
return values;
|
|
121
|
-
}
|
|
122
|
-
let initMonitorValue = getMonitorFieldValues();
|
|
123
|
-
let monitorTimeout = false;
|
|
124
|
-
function monitorFieldChange() {
|
|
125
|
-
if (monitorTimeout) {
|
|
126
|
-
clearTimeout(monitorTimeout);
|
|
127
|
-
}
|
|
128
|
-
monitorTimeout = setTimeout(function() {
|
|
129
|
-
const newValue = getMonitorFieldValues();
|
|
130
|
-
if (newValue == initMonitorValue) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
initMonitorValue = newValue;
|
|
134
|
-
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((error) => {
|
|
135
|
-
console.log("查询失败!", error);
|
|
136
|
-
queryLoadingFlag.value = false;
|
|
137
|
-
});
|
|
138
|
-
}, 200);
|
|
139
|
-
}
|
|
140
|
-
function optionChange(value) {
|
|
141
|
-
let selItems = null;
|
|
142
|
-
if (listOptions.value && value != void 0 && value != null) {
|
|
143
|
-
selItems = listOptions.value.filter((item) => {
|
|
144
|
-
return Array.isArray(value) ? value.includes(item.value) : value === item.value;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
if (autoSets.length > 0) {
|
|
148
|
-
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
149
|
-
}
|
|
150
|
-
let selectItem;
|
|
151
|
-
if (selItems && selItems.length > 0) {
|
|
152
|
-
selectItem = selItems[0];
|
|
153
|
-
}
|
|
154
|
-
let otherParams = {};
|
|
155
|
-
if (selectItem) {
|
|
156
|
-
otherParams = { extendParams: selectItem };
|
|
31
|
+
if (K.autoSets)
|
|
32
|
+
for (let e3 of K.autoSets)
|
|
33
|
+
e3.source && N.push(e3);
|
|
34
|
+
}
|
|
35
|
+
O.configure && O.configure.props && O.configure.props.base && O.configure.props.base.optionProp && N.push({ source: "label", target: O.configure.props.base.optionProp }), $.value.changeMethod = function(e3) {
|
|
36
|
+
let t2, l2 = null;
|
|
37
|
+
G.value && null != e3 && null != e3 && (l2 = G.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value));
|
|
38
|
+
N.length > 0 && S(O.configure, O.pageContext, N, l2);
|
|
39
|
+
l2 && l2.length > 0 && (t2 = l2[0]);
|
|
40
|
+
let o2 = {};
|
|
41
|
+
t2 && (o2 = { extendParams: t2 });
|
|
42
|
+
j(e3, O.pageContext, O.configure, "change", o2);
|
|
43
|
+
};
|
|
44
|
+
const X = $.value.monitorFields, Y = [];
|
|
45
|
+
if (X) {
|
|
46
|
+
const e3 = [];
|
|
47
|
+
for (let t2 of X)
|
|
48
|
+
if (t2.startsWith("${")) {
|
|
49
|
+
t2 = t2.substring(2, t2.length - 1);
|
|
50
|
+
const l2 = t2.split(".");
|
|
51
|
+
"page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (Y.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
|
|
157
52
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
listOptions.value = newOptions ? newOptions : [];
|
|
162
|
-
}
|
|
163
|
-
const formItemRef = ref(null);
|
|
164
|
-
const componentRef = ref(null);
|
|
165
|
-
const titleRef = ref(null);
|
|
166
|
-
onMounted(() => {
|
|
167
|
-
nextTick(() => {
|
|
168
|
-
const value = dynamicModelMethod.value;
|
|
169
|
-
handleAfterInitEvent(
|
|
170
|
-
value,
|
|
171
|
-
props.pageContext,
|
|
172
|
-
props.configure,
|
|
173
|
-
{
|
|
174
|
-
formItemRef: formItemRef.value,
|
|
175
|
-
componentRef: componentRef.value,
|
|
176
|
-
titleRef: titleRef.value,
|
|
177
|
-
value,
|
|
178
|
-
entity: props.pageContext.entity.data,
|
|
179
|
-
pageData: props.pageContext.entity.page
|
|
180
|
-
}
|
|
181
|
-
);
|
|
53
|
+
for (let t2 of e3)
|
|
54
|
+
o(P[t2], () => {
|
|
55
|
+
le();
|
|
182
56
|
});
|
|
183
|
-
});
|
|
184
|
-
__expose({
|
|
185
|
-
updateOptions
|
|
186
|
-
});
|
|
187
|
-
return (_ctx, _cache) => {
|
|
188
|
-
const _component_el_option = resolveComponent("el-option");
|
|
189
|
-
const _component_el_select = resolveComponent("el-select");
|
|
190
|
-
const _component_el_form_item = resolveComponent("el-form-item");
|
|
191
|
-
return openBlock(), createBlock(_component_el_form_item, {
|
|
192
|
-
ref_key: "formItemRef",
|
|
193
|
-
ref: formItemRef,
|
|
194
|
-
required: designProperty.value.required ? true : false,
|
|
195
|
-
class: normalizeClass(unref(runtimeClass)),
|
|
196
|
-
"label-width": designProperty.value.labelWidth,
|
|
197
|
-
style: normalizeStyle(unref(runtimeStyle))
|
|
198
|
-
}, {
|
|
199
|
-
label: withCtx(() => [
|
|
200
|
-
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
201
|
-
key: 0,
|
|
202
|
-
ref_key: "titleRef",
|
|
203
|
-
ref: titleRef,
|
|
204
|
-
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
205
|
-
}, [
|
|
206
|
-
designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
|
|
207
|
-
key: 0,
|
|
208
|
-
pageContext: _ctx.pageContext,
|
|
209
|
-
property: designProperty.value
|
|
210
|
-
}, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
211
|
-
createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
|
|
212
|
-
], 64))
|
|
213
|
-
], 4)) : createCommentVNode("", true)
|
|
214
|
-
]),
|
|
215
|
-
default: withCtx(() => [
|
|
216
|
-
createVNode(_component_el_select, {
|
|
217
|
-
ref_key: "componentRef",
|
|
218
|
-
ref: componentRef,
|
|
219
|
-
style: { "width": "100%" },
|
|
220
|
-
disabled: designProperty.value.state === "disabled",
|
|
221
|
-
size: designProperty.value.size,
|
|
222
|
-
clearable: designProperty.value.clearable,
|
|
223
|
-
multiple: designProperty.value.multiple,
|
|
224
|
-
"collapse-tags": designProperty.value.collapseTags,
|
|
225
|
-
"collapse-tags-tooltip": designProperty.value.collapseTagsTooltip,
|
|
226
|
-
filterable: designProperty.value.filterable,
|
|
227
|
-
"allow-create": designProperty.value.allowCreate,
|
|
228
|
-
placeholder: designProperty.value.placeholder,
|
|
229
|
-
"remote-show-suffix": designProperty.value.remoteShowSuffix,
|
|
230
|
-
remote: designProperty.value.remote,
|
|
231
|
-
"remote-method": designProperty.value.remoteMethod,
|
|
232
|
-
loading: queryLoadingFlag.value,
|
|
233
|
-
onChange: designProperty.value.changeMethod,
|
|
234
|
-
modelValue: dynamicModelMethod.value,
|
|
235
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
236
|
-
}, {
|
|
237
|
-
default: withCtx(() => [
|
|
238
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(listOptions.value, (item) => {
|
|
239
|
-
return openBlock(), createBlock(_component_el_option, {
|
|
240
|
-
key: item.value,
|
|
241
|
-
label: item.label,
|
|
242
|
-
value: item.value,
|
|
243
|
-
onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", {
|
|
244
|
-
values: dynamicModelMethod.value
|
|
245
|
-
})
|
|
246
|
-
}, {
|
|
247
|
-
default: withCtx(() => [
|
|
248
|
-
item._description_ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
249
|
-
createElementVNode("span", _hoisted_1, toDisplayString(item.label), 1),
|
|
250
|
-
createElementVNode("span", _hoisted_2, toDisplayString(item._description_), 1)
|
|
251
|
-
], 64)) : createCommentVNode("", true)
|
|
252
|
-
]),
|
|
253
|
-
_: 2
|
|
254
|
-
}, 1032, ["label", "value", "onClick"]);
|
|
255
|
-
}), 128))
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
}, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])
|
|
259
|
-
]),
|
|
260
|
-
_: 1
|
|
261
|
-
}, 8, ["required", "class", "label-width", "style"]);
|
|
262
|
-
};
|
|
263
57
|
}
|
|
264
|
-
|
|
58
|
+
function Z() {
|
|
59
|
+
let e3 = "";
|
|
60
|
+
for (let t2 of Y)
|
|
61
|
+
e3 += "_" + C(P, t2);
|
|
62
|
+
return e3;
|
|
63
|
+
}
|
|
64
|
+
let ee = Z(), te = false;
|
|
65
|
+
function le() {
|
|
66
|
+
te && clearTimeout(te), te = setTimeout(function() {
|
|
67
|
+
const e3 = Z();
|
|
68
|
+
e3 != ee && (ee = e3, w(O.pageContext, Q, void 0).then((e4) => {
|
|
69
|
+
J.value = false;
|
|
70
|
+
}));
|
|
71
|
+
}, 200);
|
|
72
|
+
}
|
|
73
|
+
const oe = t(null), ae = t(null), ue = t(null);
|
|
74
|
+
return a(() => {
|
|
75
|
+
u(() => {
|
|
76
|
+
const e3 = B.value;
|
|
77
|
+
R(e3, O.pageContext, O.configure, { formItemRef: oe.value, componentRef: ae.value, titleRef: ue.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
|
|
78
|
+
});
|
|
79
|
+
}), q2({ updateOptions: function(e3) {
|
|
80
|
+
G.value = e3 || [];
|
|
81
|
+
} }), (e3, t2) => {
|
|
82
|
+
const l2 = n("el-option"), o2 = n("el-select"), a2 = n("el-form-item");
|
|
83
|
+
return i(), r(a2, { ref_key: "formItemRef", ref: oe, required: !!$.value.required, class: s(p(E)), "label-width": $.value.labelWidth, style: f(p(W)) }, { label: c(() => [$.value.tittleShow ? (i(), v("div", { key: 0, ref_key: "titleRef", ref: ue, style: f({ ...p(F), ...p(U) }) }, [$.value.prefixType ? (i(), r(z, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (i(), v(g, { key: 1 }, [m(d(p(I)($.value.title)), 1)], 64))], 4)) : h("", true)]), default: c(() => [y(o2, { ref_key: "componentRef", ref: ae, style: { width: "100%" }, disabled: "disabled" === $.value.state, size: $.value.size, clearable: $.value.clearable, multiple: $.value.multiple, "collapse-tags": $.value.collapseTags, "collapse-tags-tooltip": $.value.collapseTagsTooltip, filterable: $.value.filterable, "allow-create": $.value.allowCreate, placeholder: $.value.placeholder, "remote-show-suffix": $.value.remoteShowSuffix, remote: $.value.remote, "remote-method": $.value.remoteMethod, loading: J.value, onChange: $.value.changeMethod, modelValue: B.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => B.value = e4) }, { default: c(() => [(i(true), v(g, null, x(G.value, (t3) => (i(), r(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => p(j)(t3.value, e3.pageContext, e3.configure, "click", { values: B.value }) }, { default: c(() => [t3._description_ ? (i(), v(g, { key: 0 }, [b("span", M, d(t3.label), 1), b("span", V, d(t3._description_), 1)], 64)) : h("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
84
|
+
};
|
|
85
|
+
} });
|
|
265
86
|
export {
|
|
266
|
-
|
|
87
|
+
q as default
|
|
267
88
|
};
|
package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js
CHANGED
|
@@ -1,60 +1,16 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, nextTick, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, 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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
});
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as i, nextTick as o, openBlock as n, createElementBlock as r, normalizeStyle as a, unref as p, normalizeClass as l, createElementVNode as s, createBlock as u, createCommentVNode as c, createTextVNode as g, toDisplayString as f } from "vue";
|
|
2
|
+
import { SuperIcon as m } from "agilebuilder-ui";
|
|
3
|
+
import { $t as y } from "../../../../utils/i18n-util.js";
|
|
4
|
+
import { handleAfterInitEvent as b } from "../../../../utils/events/event-util.js";
|
|
5
|
+
const d = e({ __name: "separatelabel-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: d2 }) {
|
|
6
|
+
const v = e2, x = t(null), C = v.configure.runtime ? v.configure.runtime : {}, T = C.style, V = C.class, h = C.headerStyle;
|
|
7
|
+
return i(() => {
|
|
8
|
+
o(() => {
|
|
9
|
+
const e3 = y(v.configure.props.base.title);
|
|
10
|
+
b(e3, v.pageContext, v.configure, { componentRef: x.value, value: e3, entity: v.pageContext.entity.data, pageData: v.pageContext.entity.page });
|
|
33
11
|
});
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
});
|
|
12
|
+
}), d2({}), (e3, t2) => (n(), r("div", { style: a(p(T)), class: l([p(V), "amb-widget-separatelabel"]), ref_key: "thisRef", ref: x }, [s("div", { class: "label", style: a(p(h)) }, [e3.configure.props.iconType && e3.configure.props.iconValue ? (n(), u(p(m), { key: 0, iconType: e3.configure.props.iconType, iconValue: e3.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : c("", true), g(" " + f(p(y)(e3.configure.props.base.title)), 1)], 4)], 6));
|
|
13
|
+
} });
|
|
58
14
|
export {
|
|
59
|
-
|
|
15
|
+
d as default
|
|
60
16
|
};
|
|
@@ -1,158 +1,33 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } 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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
});
|
|
114
|
-
});
|
|
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
|
-
};
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as a, nextTick as i, resolveComponent as u, openBlock as n, createBlock as v, normalizeClass as o, unref as c, normalizeStyle as r, withCtx as s, createElementBlock as f, toDisplayString as p, createCommentVNode as d, createVNode as m } from "vue";
|
|
2
|
+
import { getFormModelFields as g } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue as V, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleAfterInitEvent as x, handleFormEvent as h } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { $t as b } from "../../../../utils/i18n-util.js";
|
|
6
|
+
const C = e({ __name: "switch-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
7
|
+
const C2 = e2, w = C2.pageContext.entity ? C2.pageContext.entity : {};
|
|
8
|
+
let R = g(C2.pageContext, C2.configure);
|
|
9
|
+
const _ = C2.configure.runtime ? C2.configure.runtime : {}, j = _.style, k = _.class, S = _.headerStyle, q = _.titleExceedStyle, z = t(_.props ? _.props : {});
|
|
10
|
+
let I = V(w, R);
|
|
11
|
+
function T(e3) {
|
|
12
|
+
return void 0 !== z.value[e3] && null !== z.value[e3] && "" !== z.value[e3];
|
|
154
13
|
}
|
|
155
|
-
|
|
14
|
+
null == I || "number" != typeof I || I + "" != "1" && I + "" != "0" || (T("activeValue") || (z.value.activeValue = 1), T("inactiveValue") || (z.value.inactiveValue = 0)), null != I && "boolean" == typeof I && (T("activeValue") || (z.value.activeValue = true), T("inactiveValue") || (z.value.inactiveValue = false)), T("activeValue") || (z.value.activeValue = true), T("inactiveValue") || (z.value.inactiveValue = false);
|
|
15
|
+
const W = _.switchStyle, D = l({ get() {
|
|
16
|
+
let e3 = V(w, R);
|
|
17
|
+
return null != e3 && (true === z.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === z.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), e3;
|
|
18
|
+
}, set(e3) {
|
|
19
|
+
null != e3 && (true === z.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === z.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), y(w, R, e3);
|
|
20
|
+
} }), E = t(null), O = t(null), U = t(null);
|
|
21
|
+
return a(() => {
|
|
22
|
+
i(() => {
|
|
23
|
+
const e3 = D.value;
|
|
24
|
+
x(e3, C2.pageContext, C2.configure, { formItemRef: E.value, componentRef: O.value, titleRef: U.value, value: e3, entity: C2.pageContext.entity.data, pageData: C2.pageContext.entity.page });
|
|
25
|
+
});
|
|
26
|
+
}), (e3, t2) => {
|
|
27
|
+
const l2 = u("el-switch"), a2 = u("el-form-item");
|
|
28
|
+
return n(), v(a2, { ref_key: "formItemRef", ref: E, required: z.value.required, class: o(c(k)), "label-width": z.value.labelWidth, style: r(c(j)) }, { label: s(() => [z.value.tittleShow ? (n(), f("div", { key: 0, ref_key: "titleRef", ref: U, style: r({ ...c(S), ...c(q) }) }, p(c(b)(z.value.title)), 5)) : d("", true)]), default: s(() => [m(l2, { ref_key: "componentRef", ref: O, disabled: "disabled" === z.value.state, "active-value": z.value.activeValue, "active-text": z.value.activeText, "inactive-value": z.value.inactiveValue, "inactive-text": z.value.inactiveText, width: z.value.offOnWidth, size: z.value.size, style: r(c(W)), modelValue: D.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => D.value = e4), onChange: t2[1] || (t2[1] = (t3) => c(h)(t3, e3.pageContext, e3.configure, "change")) }, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
29
|
+
};
|
|
30
|
+
} });
|
|
156
31
|
export {
|
|
157
|
-
|
|
32
|
+
C as default
|
|
158
33
|
};
|