@fecp/designer 5.5.101 → 5.5.102
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/es/designer/package.json.mjs +1 -1
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer.css +357 -68
- package/es/packages/mobile/index.mjs +4 -0
- package/es/packages/mobile/src/components/all.mjs +4 -0
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +30 -7
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +191 -0
- package/es/packages/mobile/src/components/custom/approvalBar/index.mjs +10 -0
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +391 -0
- package/es/packages/mobile/src/components/custom/approvalList/index.mjs +10 -0
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +2 -18
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +41 -9
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +38 -26
- package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +4 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +38 -27
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +58 -41
- package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +1 -1
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +8 -3
- package/es/packages/mobile/src/composables/usePageEvents.mjs +80 -0
- package/es/packages/mobile/src/index.vue.mjs +8 -5
- package/es/packages/mobile/src/page.vue.mjs +150 -19
- package/es/packages/mobile/src/utils/datasource.mjs +12 -1
- package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +852 -0
- package/es/packages/mobile/src/utils/eventFlow/eventFlowHandler.mjs +94 -0
- package/es/packages/mobile/src/utils/eventFlowParser.mjs +396 -0
- package/es/packages/mobile/src/utils/formatterUtil.mjs +1 -0
- package/es/packages/mobile/src/utils/parseFilterConfig.mjs +98 -0
- package/es/packages/vue/src/components/table/Table.vue.mjs +11 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
- package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer.css +357 -68
- package/lib/packages/mobile/index.js +6 -2
- package/lib/packages/mobile/src/components/all.js +4 -0
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +29 -6
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +191 -0
- package/lib/packages/mobile/src/components/custom/approvalBar/index.js +10 -0
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +391 -0
- package/lib/packages/mobile/src/components/custom/approvalList/index.js +10 -0
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +2 -18
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +41 -9
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +37 -25
- package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +4 -2
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +37 -26
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +57 -40
- package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +1 -1
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +8 -3
- package/lib/packages/mobile/src/composables/usePageEvents.js +80 -0
- package/lib/packages/mobile/src/index.vue.js +8 -5
- package/lib/packages/mobile/src/page.vue.js +149 -18
- package/lib/packages/mobile/src/utils/datasource.js +14 -3
- package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +852 -0
- package/lib/packages/mobile/src/utils/eventFlow/eventFlowHandler.js +94 -0
- package/lib/packages/mobile/src/utils/eventFlowParser.js +396 -0
- package/lib/packages/mobile/src/utils/formatterUtil.js +1 -0
- package/lib/packages/mobile/src/utils/parseFilterConfig.js +98 -0
- package/lib/packages/vue/src/components/table/Table.vue.js +11 -1
- package/package.json +1 -1
|
@@ -137,7 +137,7 @@ const _sfc_main = {
|
|
|
137
137
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
138
138
|
modelValue: unref(fieldTextValue),
|
|
139
139
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
140
|
-
isLink: __props.readonly ? false : true,
|
|
140
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
141
141
|
readonly: "",
|
|
142
142
|
disabled: __props.disabled,
|
|
143
143
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -158,11 +158,13 @@ const _sfc_main = {
|
|
|
158
158
|
createVNode(_component_van_cascader, mergeProps(_ctx.$attrs, {
|
|
159
159
|
modelValue: unref(pickerValue),
|
|
160
160
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
161
|
+
title: `${_ctx.$attrs.label}`,
|
|
161
162
|
options: unref(finalOptions),
|
|
163
|
+
"field-names": __props.treeOptionsFieldNames,
|
|
162
164
|
placeholder: "请选择",
|
|
163
165
|
onFinish,
|
|
164
166
|
onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
165
|
-
}), null, 16, ["modelValue", "options"])
|
|
167
|
+
}), null, 16, ["modelValue", "title", "options", "field-names"])
|
|
166
168
|
]),
|
|
167
169
|
_: 1
|
|
168
170
|
}, 8, ["show"])
|
package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs
CHANGED
|
@@ -137,7 +137,7 @@ const _sfc_main = {
|
|
|
137
137
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
138
138
|
modelValue: unref(fieldTextValue),
|
|
139
139
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
140
|
-
isLink: __props.readonly ? false : true,
|
|
140
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
141
141
|
readonly: "",
|
|
142
142
|
disabled: __props.disabled,
|
|
143
143
|
onOpenPicker: _cache[3] || (_cache[3] = () => {
|
package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs
CHANGED
|
@@ -132,7 +132,7 @@ const _sfc_main = {
|
|
|
132
132
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
133
133
|
modelValue: unref(fieldTextValue),
|
|
134
134
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
135
|
-
isLink: __props.readonly ? false : true,
|
|
135
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
136
136
|
readonly: "",
|
|
137
137
|
disabled: __props.disabled,
|
|
138
138
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -123,7 +123,7 @@ const _sfc_main = {
|
|
|
123
123
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
124
124
|
modelValue: unref(fieldTextValue),
|
|
125
125
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
126
|
-
isLink: __props.readonly ? false : true,
|
|
126
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
127
127
|
readonly: "",
|
|
128
128
|
disabled: __props.disabled,
|
|
129
129
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs
CHANGED
|
@@ -122,7 +122,7 @@ const _sfc_main = {
|
|
|
122
122
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
123
123
|
modelValue: unref(fieldTextValue),
|
|
124
124
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
125
|
-
isLink: __props.readonly ? false : true,
|
|
125
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
126
126
|
readonly: "",
|
|
127
127
|
disabled: __props.disabled,
|
|
128
128
|
onOpenPicker: _cache[6] || (_cache[6] = () => {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
|
-
import { ref, computed,
|
|
12
|
+
import { ref, computed, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
13
13
|
import { MobileField } from "../field/index.mjs";
|
|
14
14
|
import { a as appExports } from "../../../../../../_virtual/app.mjs";
|
|
15
15
|
import { Popup } from "../../../../node_modules/vant/es/popup/index.mjs";
|
|
@@ -78,21 +78,24 @@ const _sfc_main = {
|
|
|
78
78
|
}
|
|
79
79
|
return data.map((node) => processNode(node, 0));
|
|
80
80
|
}
|
|
81
|
-
const fieldTextValue = ref("");
|
|
82
81
|
const showPicker = ref(false);
|
|
83
82
|
const emit = __emit;
|
|
84
83
|
const pickerValue = computed(() => {
|
|
85
|
-
const value = props.modelValue
|
|
86
|
-
|
|
84
|
+
const value = props.modelValue;
|
|
85
|
+
let val = value[value.length - 1];
|
|
86
|
+
if (val.length > 1) {
|
|
87
|
+
return val.substring(1);
|
|
88
|
+
}
|
|
89
|
+
return val;
|
|
87
90
|
});
|
|
88
91
|
function getDisplayValue(options, fieldNames, modelValue) {
|
|
89
|
-
const {
|
|
90
|
-
const values = modelValue
|
|
92
|
+
const { text, value, children } = fieldNames;
|
|
93
|
+
const values = modelValue;
|
|
91
94
|
const displayValues = [];
|
|
92
95
|
function findValueInOptions(currentOptions, targetValue) {
|
|
93
96
|
for (const option of currentOptions) {
|
|
94
97
|
if (option[value] === targetValue) {
|
|
95
|
-
return option[
|
|
98
|
+
return option[text];
|
|
96
99
|
}
|
|
97
100
|
if (option[children] && option[children].length > 0) {
|
|
98
101
|
const result = findValueInOptions(option[children], targetValue);
|
|
@@ -103,7 +106,11 @@ const _sfc_main = {
|
|
|
103
106
|
}
|
|
104
107
|
return null;
|
|
105
108
|
}
|
|
106
|
-
for (
|
|
109
|
+
for (let i = 0; i < values.length; i++) {
|
|
110
|
+
let val = values[i];
|
|
111
|
+
if (i > 0) {
|
|
112
|
+
val = val.substring(1);
|
|
113
|
+
}
|
|
107
114
|
const displayValue = findValueInOptions(options, val);
|
|
108
115
|
if (displayValue) {
|
|
109
116
|
displayValues.push(displayValue);
|
|
@@ -111,24 +118,26 @@ const _sfc_main = {
|
|
|
111
118
|
}
|
|
112
119
|
return displayValues.join("/");
|
|
113
120
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
fieldTextValue.value = getDisplayValue(
|
|
122
|
-
options,
|
|
123
|
-
props.treeOptionsFieldNames,
|
|
124
|
-
value
|
|
125
|
-
);
|
|
126
|
-
},
|
|
127
|
-
{ immediate: true }
|
|
128
|
-
);
|
|
121
|
+
const fieldTextValue = computed(() => {
|
|
122
|
+
return getDisplayValue(
|
|
123
|
+
finalOptions.value,
|
|
124
|
+
props.treeOptionsFieldNames,
|
|
125
|
+
props.modelValue
|
|
126
|
+
);
|
|
127
|
+
});
|
|
129
128
|
const onFinish = ({ selectedOptions }) => {
|
|
130
|
-
const value = selectedOptions.map(
|
|
131
|
-
|
|
129
|
+
const value = selectedOptions.map(
|
|
130
|
+
(option) => option[props.treeOptionsFieldNames.value]
|
|
131
|
+
);
|
|
132
|
+
const realValue = [];
|
|
133
|
+
for (let i = 0; i < value.length; i++) {
|
|
134
|
+
if (i > 0) {
|
|
135
|
+
realValue.push(value[0] + value[i]);
|
|
136
|
+
} else {
|
|
137
|
+
realValue.push(value[i]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
emit("update:modelValue", realValue);
|
|
132
141
|
showPicker.value = false;
|
|
133
142
|
};
|
|
134
143
|
return (_ctx, _cache) => {
|
|
@@ -138,7 +147,7 @@ const _sfc_main = {
|
|
|
138
147
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
139
148
|
modelValue: unref(fieldTextValue),
|
|
140
149
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
141
|
-
isLink: __props.readonly ? false : true,
|
|
150
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
142
151
|
readonly: "",
|
|
143
152
|
disabled: __props.disabled,
|
|
144
153
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -159,11 +168,13 @@ const _sfc_main = {
|
|
|
159
168
|
createVNode(_component_van_cascader, mergeProps(_ctx.$attrs, {
|
|
160
169
|
modelValue: unref(pickerValue),
|
|
161
170
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
171
|
+
title: `${_ctx.$attrs.label}`,
|
|
162
172
|
options: unref(finalOptions),
|
|
173
|
+
"field-names": __props.treeOptionsFieldNames,
|
|
163
174
|
placeholder: "请选择",
|
|
164
175
|
onFinish,
|
|
165
176
|
onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
166
|
-
}), null, 16, ["modelValue", "options"])
|
|
177
|
+
}), null, 16, ["modelValue", "title", "options", "field-names"])
|
|
167
178
|
]),
|
|
168
179
|
_: 1
|
|
169
180
|
}, 8, ["show"])
|
|
@@ -11,35 +11,16 @@
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { useAttrs, ref,
|
|
14
|
+
import { getCurrentInstance, useAttrs, ref, watch, computed, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
15
15
|
import { MobileField } from "../field/index.mjs";
|
|
16
|
-
import "../../../utils/optionUtil.mjs";
|
|
16
|
+
import { getOptions } from "../../../utils/optionUtil.mjs";
|
|
17
|
+
import { cloneDeep } from "../../../utils/common.mjs";
|
|
17
18
|
import { Picker } from "../../../../node_modules/vant/es/picker/index.mjs";
|
|
18
19
|
import { Popup } from "../../../../node_modules/vant/es/popup/index.mjs";
|
|
19
20
|
import { Icon } from "../../../../node_modules/vant/es/icon/index.mjs";
|
|
20
21
|
const _sfc_main = {
|
|
21
22
|
__name: "FieldPicker",
|
|
22
23
|
props: {
|
|
23
|
-
// optionType: {
|
|
24
|
-
// type: String,
|
|
25
|
-
// default: "static",
|
|
26
|
-
// },
|
|
27
|
-
// dicKey: {
|
|
28
|
-
// type: String,
|
|
29
|
-
// default: "",
|
|
30
|
-
// },
|
|
31
|
-
// dicList: {
|
|
32
|
-
// type: Array,
|
|
33
|
-
// default: [],
|
|
34
|
-
// },
|
|
35
|
-
// dataSource: {
|
|
36
|
-
// type: String,
|
|
37
|
-
// default: "",
|
|
38
|
-
// },
|
|
39
|
-
// dataSourceParams: {
|
|
40
|
-
// type: Object,
|
|
41
|
-
// default: {},
|
|
42
|
-
// },
|
|
43
24
|
pickerOptions: {
|
|
44
25
|
type: Array,
|
|
45
26
|
default: []
|
|
@@ -63,39 +44,69 @@ const _sfc_main = {
|
|
|
63
44
|
type: Boolean,
|
|
64
45
|
default: false
|
|
65
46
|
},
|
|
66
|
-
"is-link": false
|
|
47
|
+
"is-link": false,
|
|
48
|
+
optionConfig: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
51
|
+
},
|
|
52
|
+
dataSources: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default: () => []
|
|
55
|
+
},
|
|
56
|
+
formData: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => {
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
fields: {
|
|
62
|
+
type: Array,
|
|
63
|
+
default: () => []
|
|
64
|
+
}
|
|
67
65
|
},
|
|
68
66
|
emits: ["update:modelValue"],
|
|
69
67
|
setup(__props, { emit: __emit }) {
|
|
68
|
+
const currentInstance = getCurrentInstance();
|
|
69
|
+
const ctx = currentInstance.proxy;
|
|
70
70
|
const props = __props;
|
|
71
71
|
useAttrs();
|
|
72
72
|
const finalOptions = ref([]);
|
|
73
|
-
|
|
73
|
+
watch(
|
|
74
|
+
() => cloneDeep(props.optionConfig),
|
|
75
|
+
(val) => {
|
|
76
|
+
getOptions({
|
|
77
|
+
ctx,
|
|
78
|
+
dataSources: props.dataSources,
|
|
79
|
+
formData: props.formData,
|
|
80
|
+
fields: props.fields,
|
|
81
|
+
...props.optionConfig
|
|
82
|
+
}).then((data) => {
|
|
83
|
+
finalOptions.value = data;
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
deep: true,
|
|
88
|
+
immediate: true
|
|
89
|
+
}
|
|
90
|
+
);
|
|
74
91
|
const showPicker = ref(false);
|
|
75
92
|
const emit = __emit;
|
|
76
93
|
const pickerValue = computed({
|
|
77
94
|
get: () => {
|
|
78
95
|
const value = props.modelValue;
|
|
79
|
-
return
|
|
96
|
+
return value.split(",");
|
|
80
97
|
},
|
|
81
98
|
set: (val) => {
|
|
82
|
-
emit("update:modelValue", val);
|
|
99
|
+
emit("update:modelValue", val.join(","));
|
|
83
100
|
}
|
|
84
101
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
const optionItem = options.find((item) => item.value == value);
|
|
93
|
-
fieldTextValue.value = optionItem == null ? void 0 : optionItem.text;
|
|
94
|
-
},
|
|
95
|
-
{ immediate: true }
|
|
96
|
-
);
|
|
102
|
+
const fieldTextValue = computed(() => {
|
|
103
|
+
const selectedOption = finalOptions.value.find(
|
|
104
|
+
(option) => option.value == pickerValue.value.join(",")
|
|
105
|
+
);
|
|
106
|
+
return selectedOption ? selectedOption.label : "";
|
|
107
|
+
});
|
|
97
108
|
const onConfirm = ({ selectedValues, selectedOptions }) => {
|
|
98
|
-
pickerValue.value = selectedValues
|
|
109
|
+
pickerValue.value = selectedValues;
|
|
99
110
|
showPicker.value = false;
|
|
100
111
|
};
|
|
101
112
|
return (_ctx, _cache) => {
|
|
@@ -105,7 +116,7 @@ const _sfc_main = {
|
|
|
105
116
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
106
117
|
modelValue: unref(fieldTextValue),
|
|
107
118
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
108
|
-
isLink: __props.readonly ? false : true,
|
|
119
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
109
120
|
readonly: "",
|
|
110
121
|
disabled: __props.disabled,
|
|
111
122
|
onOpenPicker: _cache[4] || (_cache[4] = () => {
|
|
@@ -124,12 +135,18 @@ const _sfc_main = {
|
|
|
124
135
|
}, {
|
|
125
136
|
default: withCtx(() => [
|
|
126
137
|
createVNode(_component_van_picker, mergeProps(_ctx.$attrs, {
|
|
138
|
+
title: `${_ctx.$attrs.label}`,
|
|
127
139
|
columns: unref(finalOptions),
|
|
140
|
+
"columns-field-names": {
|
|
141
|
+
text: "label",
|
|
142
|
+
value: "value",
|
|
143
|
+
children: "children"
|
|
144
|
+
},
|
|
128
145
|
"model-value": unref(pickerValue),
|
|
129
146
|
readonly: false,
|
|
130
147
|
onConfirm,
|
|
131
148
|
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
132
|
-
}), null, 16, ["columns", "model-value"])
|
|
149
|
+
}), null, 16, ["title", "columns", "model-value"])
|
|
133
150
|
]),
|
|
134
151
|
_: 1
|
|
135
152
|
}, 8, ["show"])
|
|
@@ -125,7 +125,7 @@ const _sfc_main = {
|
|
|
125
125
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
126
126
|
modelValue: unref(fieldTextValue),
|
|
127
127
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
128
|
-
isLink: __props.readonly ? false : true,
|
|
128
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
129
129
|
readonly: "",
|
|
130
130
|
disabled: __props.disabled,
|
|
131
131
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -16,6 +16,10 @@ const _hoisted_1 = { class: "fec-tab-content" };
|
|
|
16
16
|
const _sfc_main = {
|
|
17
17
|
__name: "Tabs",
|
|
18
18
|
props: {
|
|
19
|
+
params: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: {}
|
|
22
|
+
},
|
|
19
23
|
modelValue: {
|
|
20
24
|
type: String,
|
|
21
25
|
default: ""
|
|
@@ -93,8 +97,9 @@ const _sfc_main = {
|
|
|
93
97
|
createElementVNode("div", _hoisted_1, [
|
|
94
98
|
item.pageId && getPage(item.pageId) ? (openBlock(), createBlock(MobilePage, {
|
|
95
99
|
key: 0,
|
|
96
|
-
parentPage: getPage(item.pageId)
|
|
97
|
-
|
|
100
|
+
parentPage: getPage(item.pageId),
|
|
101
|
+
params: __props.params
|
|
102
|
+
}, null, 8, ["parentPage", "params"])) : createCommentVNode("", true)
|
|
98
103
|
])
|
|
99
104
|
]),
|
|
100
105
|
_: 2
|
|
@@ -107,7 +112,7 @@ const _sfc_main = {
|
|
|
107
112
|
};
|
|
108
113
|
}
|
|
109
114
|
};
|
|
110
|
-
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
115
|
+
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3ac885e8"]]);
|
|
111
116
|
export {
|
|
112
117
|
_Tabs as default
|
|
113
118
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { onUnmounted, onBeforeUnmount, onMounted } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { useEventFlow } from "../utils/eventFlow/eventFlowHandler.mjs";
|
|
11
|
+
function usePageEvents(getOptions) {
|
|
12
|
+
if (typeof getOptions !== "function") {
|
|
13
|
+
const staticOptions = getOptions;
|
|
14
|
+
getOptions = () => staticOptions;
|
|
15
|
+
}
|
|
16
|
+
const executeEvent = async (eventName) => {
|
|
17
|
+
const options = getOptions();
|
|
18
|
+
const { pageEventConfig, instance, formData, localConfig, components, fields, initSearchData } = options;
|
|
19
|
+
if (!pageEventConfig || !Array.isArray(pageEventConfig) || pageEventConfig.length === 0) {
|
|
20
|
+
console.log(`页面事件 ${eventName} 未配置或配置未加载完成,跳过执行`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const eventConfig = pageEventConfig.find((e) => e.name === eventName);
|
|
24
|
+
if (!eventConfig || !eventConfig.eventFlow) {
|
|
25
|
+
console.log(`页面事件 ${eventName} 未找到事件流配置,跳过执行`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const { getEventHandlers: createEventHandlers } = useEventFlow({
|
|
29
|
+
fields: fields || [],
|
|
30
|
+
instance,
|
|
31
|
+
localConfig: localConfig || {},
|
|
32
|
+
components: components || {},
|
|
33
|
+
metadata: {
|
|
34
|
+
initSearchData
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const handler = createEventHandlers(
|
|
38
|
+
{},
|
|
39
|
+
formData || {},
|
|
40
|
+
[eventConfig]
|
|
41
|
+
);
|
|
42
|
+
const eventKeys = Object.keys(handler);
|
|
43
|
+
if (eventKeys.length > 0) {
|
|
44
|
+
console.log(`执行页面事件 ${eventName}`);
|
|
45
|
+
await handler[eventKeys[0]]();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const handleCreated = (checkConfigLoaded) => {
|
|
49
|
+
console.log("🚀 页面 onCreated 事件处理器已注册(将在配置加载完成后触发)");
|
|
50
|
+
};
|
|
51
|
+
const handleMounted = (checkConfigLoaded) => {
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
console.log("🚀 页面 onMounted 事件触发");
|
|
54
|
+
executeEvent("onMounted");
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const handleBeforeUnmount = () => {
|
|
58
|
+
onBeforeUnmount(() => {
|
|
59
|
+
console.log("🧹 页面 onBeforeUnmount 事件触发");
|
|
60
|
+
executeEvent("onBeforeUnmount");
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const handleUnmounted = () => {
|
|
64
|
+
onUnmounted(() => {
|
|
65
|
+
console.log("✅ 页面 onUnmounted 事件触发");
|
|
66
|
+
executeEvent("onUnmounted");
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
handleCreated,
|
|
71
|
+
handleMounted,
|
|
72
|
+
handleBeforeUnmount,
|
|
73
|
+
handleUnmounted,
|
|
74
|
+
executeEvent
|
|
75
|
+
// 导出 executeEvent 方法,方便在配置加载完成后立即触发 onCreated
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
usePageEvents
|
|
80
|
+
};
|
|
@@ -74,6 +74,7 @@ const _sfc_main = {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
const currentPage = ref(null);
|
|
77
|
+
const routePage = ref(null);
|
|
77
78
|
function loadPage(pageId) {
|
|
78
79
|
var _a;
|
|
79
80
|
if (((_a = currentPage.value) == null ? void 0 : _a.id) == pageId) {
|
|
@@ -96,9 +97,10 @@ const _sfc_main = {
|
|
|
96
97
|
routePage.value = null;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
const
|
|
100
|
-
emitter.on("loadPage", (pageId) => {
|
|
100
|
+
const pageParams = ref({});
|
|
101
|
+
emitter.on("loadPage", (pageId, params) => {
|
|
101
102
|
loadPage(pageId);
|
|
103
|
+
pageParams.value = params || { applyId: "7a16522c29e047d1be80e884773a87ac" };
|
|
102
104
|
});
|
|
103
105
|
provide("pageList", pageList);
|
|
104
106
|
onMounted(() => {
|
|
@@ -117,8 +119,9 @@ const _sfc_main = {
|
|
|
117
119
|
!unref(noTargetPage) ? (openBlock(), createBlock(unref(MobilePage), {
|
|
118
120
|
key: 0,
|
|
119
121
|
parentPage: unref(currentPage),
|
|
120
|
-
routePage: unref(routePage)
|
|
121
|
-
|
|
122
|
+
routePage: unref(routePage),
|
|
123
|
+
params: unref(pageParams)
|
|
124
|
+
}, null, 8, ["parentPage", "routePage", "params"])) : (openBlock(), createBlock(_component_van_empty, {
|
|
122
125
|
key: 1,
|
|
123
126
|
image: "search",
|
|
124
127
|
description: "页面找不到了"
|
|
@@ -129,7 +132,7 @@ const _sfc_main = {
|
|
|
129
132
|
};
|
|
130
133
|
}
|
|
131
134
|
};
|
|
132
|
-
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
135
|
+
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4e4cf5f1"]]);
|
|
133
136
|
export {
|
|
134
137
|
MobileApp as default
|
|
135
138
|
};
|