@fecp/designer 5.5.100 → 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/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer.css +436 -125
- 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 +69 -9
- 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 +43 -11
- 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 +34 -5
- package/es/packages/mobile/src/composables/usePageEvents.mjs +80 -0
- package/es/packages/mobile/src/index.vue.mjs +11 -21
- package/es/packages/mobile/src/page.vue.mjs +152 -12
- package/es/packages/mobile/src/utils/common.mjs +15 -0
- 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/forms/form/Form.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +8 -7
- package/es/packages/vue/src/components/table/Table.vue.mjs +11 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer.css +436 -125
- 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 +68 -8
- 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 +43 -11
- 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 +33 -4
- package/lib/packages/mobile/src/composables/usePageEvents.js +80 -0
- package/lib/packages/mobile/src/index.vue.js +11 -21
- package/lib/packages/mobile/src/page.vue.js +151 -11
- package/lib/packages/mobile/src/utils/common.js +15 -0
- 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/forms/form/Form.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +7 -6
- package/lib/packages/vue/src/components/table/Table.vue.js +11 -1
- package/package.json +1 -1
|
@@ -139,7 +139,7 @@ const _sfc_main = {
|
|
|
139
139
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
140
140
|
modelValue: Vue.unref(fieldTextValue),
|
|
141
141
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
142
|
-
isLink: __props.readonly ? false : true,
|
|
142
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
143
143
|
readonly: "",
|
|
144
144
|
disabled: __props.disabled,
|
|
145
145
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -160,11 +160,13 @@ const _sfc_main = {
|
|
|
160
160
|
Vue.createVNode(_component_van_cascader, Vue.mergeProps(_ctx.$attrs, {
|
|
161
161
|
modelValue: Vue.unref(pickerValue),
|
|
162
162
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => Vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
163
|
+
title: `${_ctx.$attrs.label}`,
|
|
163
164
|
options: Vue.unref(finalOptions),
|
|
165
|
+
"field-names": __props.treeOptionsFieldNames,
|
|
164
166
|
placeholder: "请选择",
|
|
165
167
|
onFinish,
|
|
166
168
|
onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
167
|
-
}), null, 16, ["modelValue", "options"])
|
|
169
|
+
}), null, 16, ["modelValue", "title", "options", "field-names"])
|
|
168
170
|
]),
|
|
169
171
|
_: 1
|
|
170
172
|
}, 8, ["show"])
|
package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js
CHANGED
|
@@ -139,7 +139,7 @@ const _sfc_main = {
|
|
|
139
139
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
140
140
|
modelValue: Vue.unref(fieldTextValue),
|
|
141
141
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
142
|
-
isLink: __props.readonly ? false : true,
|
|
142
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
143
143
|
readonly: "",
|
|
144
144
|
disabled: __props.disabled,
|
|
145
145
|
onOpenPicker: _cache[3] || (_cache[3] = () => {
|
package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js
CHANGED
|
@@ -134,7 +134,7 @@ const _sfc_main = {
|
|
|
134
134
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
135
135
|
modelValue: Vue.unref(fieldTextValue),
|
|
136
136
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
137
|
-
isLink: __props.readonly ? false : true,
|
|
137
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
138
138
|
readonly: "",
|
|
139
139
|
disabled: __props.disabled,
|
|
140
140
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -125,7 +125,7 @@ const _sfc_main = {
|
|
|
125
125
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
126
126
|
modelValue: Vue.unref(fieldTextValue),
|
|
127
127
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.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] = () => {
|
package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js
CHANGED
|
@@ -124,7 +124,7 @@ const _sfc_main = {
|
|
|
124
124
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
125
125
|
modelValue: Vue.unref(fieldTextValue),
|
|
126
126
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
127
|
-
isLink: __props.readonly ? false : true,
|
|
127
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
128
128
|
readonly: "",
|
|
129
129
|
disabled: __props.disabled,
|
|
130
130
|
onOpenPicker: _cache[6] || (_cache[6] = () => {
|
|
@@ -80,21 +80,24 @@ const _sfc_main = {
|
|
|
80
80
|
}
|
|
81
81
|
return data.map((node) => processNode(node, 0));
|
|
82
82
|
}
|
|
83
|
-
const fieldTextValue = Vue.ref("");
|
|
84
83
|
const showPicker = Vue.ref(false);
|
|
85
84
|
const emit = __emit;
|
|
86
85
|
const pickerValue = Vue.computed(() => {
|
|
87
|
-
const value = props.modelValue
|
|
88
|
-
|
|
86
|
+
const value = props.modelValue;
|
|
87
|
+
let val = value[value.length - 1];
|
|
88
|
+
if (val.length > 1) {
|
|
89
|
+
return val.substring(1);
|
|
90
|
+
}
|
|
91
|
+
return val;
|
|
89
92
|
});
|
|
90
93
|
function getDisplayValue(options, fieldNames, modelValue) {
|
|
91
|
-
const {
|
|
92
|
-
const values = modelValue
|
|
94
|
+
const { text, value, children } = fieldNames;
|
|
95
|
+
const values = modelValue;
|
|
93
96
|
const displayValues = [];
|
|
94
97
|
function findValueInOptions(currentOptions, targetValue) {
|
|
95
98
|
for (const option of currentOptions) {
|
|
96
99
|
if (option[value] === targetValue) {
|
|
97
|
-
return option[
|
|
100
|
+
return option[text];
|
|
98
101
|
}
|
|
99
102
|
if (option[children] && option[children].length > 0) {
|
|
100
103
|
const result = findValueInOptions(option[children], targetValue);
|
|
@@ -105,7 +108,11 @@ const _sfc_main = {
|
|
|
105
108
|
}
|
|
106
109
|
return null;
|
|
107
110
|
}
|
|
108
|
-
for (
|
|
111
|
+
for (let i = 0; i < values.length; i++) {
|
|
112
|
+
let val = values[i];
|
|
113
|
+
if (i > 0) {
|
|
114
|
+
val = val.substring(1);
|
|
115
|
+
}
|
|
109
116
|
const displayValue = findValueInOptions(options, val);
|
|
110
117
|
if (displayValue) {
|
|
111
118
|
displayValues.push(displayValue);
|
|
@@ -113,24 +120,26 @@ const _sfc_main = {
|
|
|
113
120
|
}
|
|
114
121
|
return displayValues.join("/");
|
|
115
122
|
}
|
|
116
|
-
Vue.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
fieldTextValue.value = getDisplayValue(
|
|
124
|
-
options,
|
|
125
|
-
props.treeOptionsFieldNames,
|
|
126
|
-
value
|
|
127
|
-
);
|
|
128
|
-
},
|
|
129
|
-
{ immediate: true }
|
|
130
|
-
);
|
|
123
|
+
const fieldTextValue = Vue.computed(() => {
|
|
124
|
+
return getDisplayValue(
|
|
125
|
+
finalOptions.value,
|
|
126
|
+
props.treeOptionsFieldNames,
|
|
127
|
+
props.modelValue
|
|
128
|
+
);
|
|
129
|
+
});
|
|
131
130
|
const onFinish = ({ selectedOptions }) => {
|
|
132
|
-
const value = selectedOptions.map(
|
|
133
|
-
|
|
131
|
+
const value = selectedOptions.map(
|
|
132
|
+
(option) => option[props.treeOptionsFieldNames.value]
|
|
133
|
+
);
|
|
134
|
+
const realValue = [];
|
|
135
|
+
for (let i = 0; i < value.length; i++) {
|
|
136
|
+
if (i > 0) {
|
|
137
|
+
realValue.push(value[0] + value[i]);
|
|
138
|
+
} else {
|
|
139
|
+
realValue.push(value[i]);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
emit("update:modelValue", realValue);
|
|
134
143
|
showPicker.value = false;
|
|
135
144
|
};
|
|
136
145
|
return (_ctx, _cache) => {
|
|
@@ -140,7 +149,7 @@ const _sfc_main = {
|
|
|
140
149
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
141
150
|
modelValue: Vue.unref(fieldTextValue),
|
|
142
151
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
143
|
-
isLink: __props.readonly ? false : true,
|
|
152
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
144
153
|
readonly: "",
|
|
145
154
|
disabled: __props.disabled,
|
|
146
155
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -161,11 +170,13 @@ const _sfc_main = {
|
|
|
161
170
|
Vue.createVNode(_component_van_cascader, Vue.mergeProps(_ctx.$attrs, {
|
|
162
171
|
modelValue: Vue.unref(pickerValue),
|
|
163
172
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => Vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
173
|
+
title: `${_ctx.$attrs.label}`,
|
|
164
174
|
options: Vue.unref(finalOptions),
|
|
175
|
+
"field-names": __props.treeOptionsFieldNames,
|
|
165
176
|
placeholder: "请选择",
|
|
166
177
|
onFinish,
|
|
167
178
|
onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
168
|
-
}), null, 16, ["modelValue", "options"])
|
|
179
|
+
}), null, 16, ["modelValue", "title", "options", "field-names"])
|
|
169
180
|
]),
|
|
170
181
|
_: 1
|
|
171
182
|
}, 8, ["show"])
|
|
@@ -15,33 +15,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
15
15
|
;/* empty css */
|
|
16
16
|
const Vue = require("vue");
|
|
17
17
|
const index = require("../field/index.js");
|
|
18
|
-
require("../../../utils/optionUtil.js");
|
|
18
|
+
const optionUtil = require("../../../utils/optionUtil.js");
|
|
19
|
+
const common = require("../../../utils/common.js");
|
|
19
20
|
const index$2 = require("../../../../node_modules/vant/es/picker/index.js");
|
|
20
21
|
const index$1 = require("../../../../node_modules/vant/es/popup/index.js");
|
|
21
22
|
const index$3 = require("../../../../node_modules/vant/es/icon/index.js");
|
|
22
23
|
const _sfc_main = {
|
|
23
24
|
__name: "FieldPicker",
|
|
24
25
|
props: {
|
|
25
|
-
// optionType: {
|
|
26
|
-
// type: String,
|
|
27
|
-
// default: "static",
|
|
28
|
-
// },
|
|
29
|
-
// dicKey: {
|
|
30
|
-
// type: String,
|
|
31
|
-
// default: "",
|
|
32
|
-
// },
|
|
33
|
-
// dicList: {
|
|
34
|
-
// type: Array,
|
|
35
|
-
// default: [],
|
|
36
|
-
// },
|
|
37
|
-
// dataSource: {
|
|
38
|
-
// type: String,
|
|
39
|
-
// default: "",
|
|
40
|
-
// },
|
|
41
|
-
// dataSourceParams: {
|
|
42
|
-
// type: Object,
|
|
43
|
-
// default: {},
|
|
44
|
-
// },
|
|
45
26
|
pickerOptions: {
|
|
46
27
|
type: Array,
|
|
47
28
|
default: []
|
|
@@ -65,39 +46,69 @@ const _sfc_main = {
|
|
|
65
46
|
type: Boolean,
|
|
66
47
|
default: false
|
|
67
48
|
},
|
|
68
|
-
"is-link": false
|
|
49
|
+
"is-link": false,
|
|
50
|
+
optionConfig: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: () => ({})
|
|
53
|
+
},
|
|
54
|
+
dataSources: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => []
|
|
57
|
+
},
|
|
58
|
+
formData: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => {
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
fields: {
|
|
64
|
+
type: Array,
|
|
65
|
+
default: () => []
|
|
66
|
+
}
|
|
69
67
|
},
|
|
70
68
|
emits: ["update:modelValue"],
|
|
71
69
|
setup(__props, { emit: __emit }) {
|
|
70
|
+
const currentInstance = Vue.getCurrentInstance();
|
|
71
|
+
const ctx = currentInstance.proxy;
|
|
72
72
|
const props = __props;
|
|
73
73
|
Vue.useAttrs();
|
|
74
74
|
const finalOptions = Vue.ref([]);
|
|
75
|
-
|
|
75
|
+
Vue.watch(
|
|
76
|
+
() => common.cloneDeep(props.optionConfig),
|
|
77
|
+
(val) => {
|
|
78
|
+
optionUtil.getOptions({
|
|
79
|
+
ctx,
|
|
80
|
+
dataSources: props.dataSources,
|
|
81
|
+
formData: props.formData,
|
|
82
|
+
fields: props.fields,
|
|
83
|
+
...props.optionConfig
|
|
84
|
+
}).then((data) => {
|
|
85
|
+
finalOptions.value = data;
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
deep: true,
|
|
90
|
+
immediate: true
|
|
91
|
+
}
|
|
92
|
+
);
|
|
76
93
|
const showPicker = Vue.ref(false);
|
|
77
94
|
const emit = __emit;
|
|
78
95
|
const pickerValue = Vue.computed({
|
|
79
96
|
get: () => {
|
|
80
97
|
const value = props.modelValue;
|
|
81
|
-
return
|
|
98
|
+
return value.split(",");
|
|
82
99
|
},
|
|
83
100
|
set: (val) => {
|
|
84
|
-
emit("update:modelValue", val);
|
|
101
|
+
emit("update:modelValue", val.join(","));
|
|
85
102
|
}
|
|
86
103
|
});
|
|
87
|
-
Vue.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
const optionItem = options.find((item) => item.value == value);
|
|
95
|
-
fieldTextValue.value = optionItem == null ? void 0 : optionItem.text;
|
|
96
|
-
},
|
|
97
|
-
{ immediate: true }
|
|
98
|
-
);
|
|
104
|
+
const fieldTextValue = Vue.computed(() => {
|
|
105
|
+
const selectedOption = finalOptions.value.find(
|
|
106
|
+
(option) => option.value == pickerValue.value.join(",")
|
|
107
|
+
);
|
|
108
|
+
return selectedOption ? selectedOption.label : "";
|
|
109
|
+
});
|
|
99
110
|
const onConfirm = ({ selectedValues, selectedOptions }) => {
|
|
100
|
-
pickerValue.value = selectedValues
|
|
111
|
+
pickerValue.value = selectedValues;
|
|
101
112
|
showPicker.value = false;
|
|
102
113
|
};
|
|
103
114
|
return (_ctx, _cache) => {
|
|
@@ -107,7 +118,7 @@ const _sfc_main = {
|
|
|
107
118
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
108
119
|
modelValue: Vue.unref(fieldTextValue),
|
|
109
120
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
110
|
-
isLink: __props.readonly ? false : true,
|
|
121
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
111
122
|
readonly: "",
|
|
112
123
|
disabled: __props.disabled,
|
|
113
124
|
onOpenPicker: _cache[4] || (_cache[4] = () => {
|
|
@@ -126,12 +137,18 @@ const _sfc_main = {
|
|
|
126
137
|
}, {
|
|
127
138
|
default: Vue.withCtx(() => [
|
|
128
139
|
Vue.createVNode(_component_van_picker, Vue.mergeProps(_ctx.$attrs, {
|
|
140
|
+
title: `${_ctx.$attrs.label}`,
|
|
129
141
|
columns: Vue.unref(finalOptions),
|
|
142
|
+
"columns-field-names": {
|
|
143
|
+
text: "label",
|
|
144
|
+
value: "value",
|
|
145
|
+
children: "children"
|
|
146
|
+
},
|
|
130
147
|
"model-value": Vue.unref(pickerValue),
|
|
131
148
|
readonly: false,
|
|
132
149
|
onConfirm,
|
|
133
150
|
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
134
|
-
}), null, 16, ["columns", "model-value"])
|
|
151
|
+
}), null, 16, ["title", "columns", "model-value"])
|
|
135
152
|
]),
|
|
136
153
|
_: 1
|
|
137
154
|
}, 8, ["show"])
|
|
@@ -127,7 +127,7 @@ const _sfc_main = {
|
|
|
127
127
|
return Vue.openBlock(), Vue.createBlock(Vue.unref(index.MobileField), Vue.mergeProps(_ctx.$attrs, {
|
|
128
128
|
modelValue: Vue.unref(fieldTextValue),
|
|
129
129
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
130
|
-
isLink: __props.readonly ? false : true,
|
|
130
|
+
isLink: __props.readonly || __props.disabled ? false : true,
|
|
131
131
|
readonly: "",
|
|
132
132
|
disabled: __props.disabled,
|
|
133
133
|
onOpenPicker: _cache[5] || (_cache[5] = () => {
|
|
@@ -8,13 +8,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const Vue = require("vue");
|
|
11
|
+
const common = require("../../../utils/common.js");
|
|
12
|
+
const page = require("../../../page.vue.js");
|
|
11
13
|
;/* empty css */
|
|
12
14
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
13
15
|
const index = require("../../../../node_modules/vant/es/tabs/index.js");
|
|
14
16
|
const index$1 = require("../../../../node_modules/vant/es/tab/index.js");
|
|
17
|
+
const _hoisted_1 = { class: "fec-tab-content" };
|
|
15
18
|
const _sfc_main = {
|
|
16
19
|
__name: "Tabs",
|
|
17
20
|
props: {
|
|
21
|
+
params: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: {}
|
|
24
|
+
},
|
|
18
25
|
modelValue: {
|
|
19
26
|
type: String,
|
|
20
27
|
default: ""
|
|
@@ -38,6 +45,7 @@ const _sfc_main = {
|
|
|
38
45
|
setup(__props, { emit: __emit }) {
|
|
39
46
|
const props = __props;
|
|
40
47
|
const emit = __emit;
|
|
48
|
+
const pageList = Vue.inject("pageList");
|
|
41
49
|
const activeName = Vue.computed({
|
|
42
50
|
get: () => {
|
|
43
51
|
return props.modelValue;
|
|
@@ -53,6 +61,19 @@ const _sfc_main = {
|
|
|
53
61
|
return props.height + "px";
|
|
54
62
|
}
|
|
55
63
|
});
|
|
64
|
+
const pageCache = Vue.computed(() => {
|
|
65
|
+
const cache = {};
|
|
66
|
+
props.options.forEach((item) => {
|
|
67
|
+
if (item.pageId) {
|
|
68
|
+
cache[item.pageId] = common.findPageById(pageList.value, item.pageId);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
console.log("🚀 ~ cache:", cache);
|
|
72
|
+
return cache;
|
|
73
|
+
});
|
|
74
|
+
const getPage = (pageId) => {
|
|
75
|
+
return pageCache.value[pageId] || null;
|
|
76
|
+
};
|
|
56
77
|
return (_ctx, _cache) => {
|
|
57
78
|
const _component_van_tab = index$1.Tab;
|
|
58
79
|
const _component_van_tabs = index.Tabs;
|
|
@@ -64,19 +85,27 @@ const _sfc_main = {
|
|
|
64
85
|
sticky: "",
|
|
65
86
|
class: "fec-tabs",
|
|
66
87
|
active: Vue.unref(activeName),
|
|
67
|
-
"onUpdate:active": _cache[0] || (_cache[0] = ($event) => Vue.isRef(activeName) ? activeName.value = $event : null)
|
|
88
|
+
"onUpdate:active": _cache[0] || (_cache[0] = ($event) => Vue.isRef(activeName) ? activeName.value = $event : null),
|
|
89
|
+
"lazy-render": ""
|
|
68
90
|
}, {
|
|
69
91
|
default: Vue.withCtx(() => [
|
|
70
92
|
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.options, (item) => {
|
|
71
93
|
return Vue.openBlock(), Vue.createBlock(_component_van_tab, Vue.mergeProps({ ref_for: true }, item, {
|
|
94
|
+
name: item.id,
|
|
72
95
|
replace: "",
|
|
73
96
|
"show-zero-badge": false
|
|
74
97
|
}), {
|
|
75
98
|
default: Vue.withCtx(() => [
|
|
76
|
-
Vue.
|
|
99
|
+
Vue.createElementVNode("div", _hoisted_1, [
|
|
100
|
+
item.pageId && getPage(item.pageId) ? (Vue.openBlock(), Vue.createBlock(page.default, {
|
|
101
|
+
key: 0,
|
|
102
|
+
parentPage: getPage(item.pageId),
|
|
103
|
+
params: __props.params
|
|
104
|
+
}, null, 8, ["parentPage", "params"])) : Vue.createCommentVNode("", true)
|
|
105
|
+
])
|
|
77
106
|
]),
|
|
78
107
|
_: 2
|
|
79
|
-
}, 1040);
|
|
108
|
+
}, 1040, ["name"]);
|
|
80
109
|
}), 256))
|
|
81
110
|
]),
|
|
82
111
|
_: 1
|
|
@@ -85,5 +114,5 @@ const _sfc_main = {
|
|
|
85
114
|
};
|
|
86
115
|
}
|
|
87
116
|
};
|
|
88
|
-
const _Tabs = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
117
|
+
const _Tabs = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3ac885e8"]]);
|
|
89
118
|
exports.default = _Tabs;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Vue = require("vue");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
const eventFlowHandler = require("../utils/eventFlow/eventFlowHandler.js");
|
|
13
|
+
function usePageEvents(getOptions) {
|
|
14
|
+
if (typeof getOptions !== "function") {
|
|
15
|
+
const staticOptions = getOptions;
|
|
16
|
+
getOptions = () => staticOptions;
|
|
17
|
+
}
|
|
18
|
+
const executeEvent = async (eventName) => {
|
|
19
|
+
const options = getOptions();
|
|
20
|
+
const { pageEventConfig, instance, formData, localConfig, components, fields, initSearchData } = options;
|
|
21
|
+
if (!pageEventConfig || !Array.isArray(pageEventConfig) || pageEventConfig.length === 0) {
|
|
22
|
+
console.log(`页面事件 ${eventName} 未配置或配置未加载完成,跳过执行`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const eventConfig = pageEventConfig.find((e) => e.name === eventName);
|
|
26
|
+
if (!eventConfig || !eventConfig.eventFlow) {
|
|
27
|
+
console.log(`页面事件 ${eventName} 未找到事件流配置,跳过执行`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const { getEventHandlers: createEventHandlers } = eventFlowHandler.useEventFlow({
|
|
31
|
+
fields: fields || [],
|
|
32
|
+
instance,
|
|
33
|
+
localConfig: localConfig || {},
|
|
34
|
+
components: components || {},
|
|
35
|
+
metadata: {
|
|
36
|
+
initSearchData
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const handler = createEventHandlers(
|
|
40
|
+
{},
|
|
41
|
+
formData || {},
|
|
42
|
+
[eventConfig]
|
|
43
|
+
);
|
|
44
|
+
const eventKeys = Object.keys(handler);
|
|
45
|
+
if (eventKeys.length > 0) {
|
|
46
|
+
console.log(`执行页面事件 ${eventName}`);
|
|
47
|
+
await handler[eventKeys[0]]();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleCreated = (checkConfigLoaded) => {
|
|
51
|
+
console.log("🚀 页面 onCreated 事件处理器已注册(将在配置加载完成后触发)");
|
|
52
|
+
};
|
|
53
|
+
const handleMounted = (checkConfigLoaded) => {
|
|
54
|
+
Vue.onMounted(() => {
|
|
55
|
+
console.log("🚀 页面 onMounted 事件触发");
|
|
56
|
+
executeEvent("onMounted");
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const handleBeforeUnmount = () => {
|
|
60
|
+
Vue.onBeforeUnmount(() => {
|
|
61
|
+
console.log("🧹 页面 onBeforeUnmount 事件触发");
|
|
62
|
+
executeEvent("onBeforeUnmount");
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const handleUnmounted = () => {
|
|
66
|
+
Vue.onUnmounted(() => {
|
|
67
|
+
console.log("✅ 页面 onUnmounted 事件触发");
|
|
68
|
+
executeEvent("onUnmounted");
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
handleCreated,
|
|
73
|
+
handleMounted,
|
|
74
|
+
handleBeforeUnmount,
|
|
75
|
+
handleUnmounted,
|
|
76
|
+
executeEvent
|
|
77
|
+
// 导出 executeEvent 方法,方便在配置加载完成后立即触发 onCreated
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
exports.usePageEvents = usePageEvents;
|
|
@@ -14,6 +14,7 @@ const page = require("./page.vue.js");
|
|
|
14
14
|
const index$2 = require("./api/index.js");
|
|
15
15
|
const eventBus = require("./utils/eventBus.js");
|
|
16
16
|
const pageHistory = require("./utils/pageHistory.js");
|
|
17
|
+
const common = require("./utils/common.js");
|
|
17
18
|
;/* empty css */
|
|
18
19
|
;/* empty css */
|
|
19
20
|
;/* empty css */
|
|
@@ -50,7 +51,6 @@ const _sfc_main = {
|
|
|
50
51
|
let option = await index$2.default.getAppById(ctx.$http, props.appId);
|
|
51
52
|
pageList.value = ((_a = JSON.parse(option.pageConfig)) == null ? void 0 : _a.pageConfig) || [];
|
|
52
53
|
pageHistory.pageHistory.clear();
|
|
53
|
-
console.log("🚀 ~ pageList ~ pageList.value:", pageList.value);
|
|
54
54
|
let homePage;
|
|
55
55
|
if (props.pageKey) {
|
|
56
56
|
homePage = pageList.value.find((page2) => page2.isHome);
|
|
@@ -76,12 +76,13 @@ const _sfc_main = {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
const currentPage = Vue.ref(null);
|
|
79
|
+
const routePage = Vue.ref(null);
|
|
79
80
|
function loadPage(pageId) {
|
|
80
81
|
var _a;
|
|
81
82
|
if (((_a = currentPage.value) == null ? void 0 : _a.id) == pageId) {
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
84
|
-
const targetPage = findPageById(pageList.value, pageId);
|
|
85
|
+
const targetPage = common.findPageById(pageList.value, pageId);
|
|
85
86
|
if (targetPage) {
|
|
86
87
|
if (targetPage.parentPage) {
|
|
87
88
|
currentPage.value = targetPage.parentPage;
|
|
@@ -98,24 +99,12 @@ const _sfc_main = {
|
|
|
98
99
|
routePage.value = null;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if (item.id == pageId) {
|
|
104
|
-
return item;
|
|
105
|
-
}
|
|
106
|
-
if (item.children && item.children.length > 0) {
|
|
107
|
-
const found = findPageById(item.children, pageId);
|
|
108
|
-
if (found) {
|
|
109
|
-
return { ...found, parentPage: item };
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
const routePage = Vue.ref(null);
|
|
116
|
-
eventBus.default.on("loadPage", (pageId) => {
|
|
102
|
+
const pageParams = Vue.ref({});
|
|
103
|
+
eventBus.default.on("loadPage", (pageId, params) => {
|
|
117
104
|
loadPage(pageId);
|
|
105
|
+
pageParams.value = params || { applyId: "7a16522c29e047d1be80e884773a87ac" };
|
|
118
106
|
});
|
|
107
|
+
Vue.provide("pageList", pageList);
|
|
119
108
|
Vue.onMounted(() => {
|
|
120
109
|
loadConfig();
|
|
121
110
|
});
|
|
@@ -132,8 +121,9 @@ const _sfc_main = {
|
|
|
132
121
|
!Vue.unref(noTargetPage) ? (Vue.openBlock(), Vue.createBlock(Vue.unref(page.default), {
|
|
133
122
|
key: 0,
|
|
134
123
|
parentPage: Vue.unref(currentPage),
|
|
135
|
-
routePage: Vue.unref(routePage)
|
|
136
|
-
|
|
124
|
+
routePage: Vue.unref(routePage),
|
|
125
|
+
params: Vue.unref(pageParams)
|
|
126
|
+
}, null, 8, ["parentPage", "routePage", "params"])) : (Vue.openBlock(), Vue.createBlock(_component_van_empty, {
|
|
137
127
|
key: 1,
|
|
138
128
|
image: "search",
|
|
139
129
|
description: "页面找不到了"
|
|
@@ -144,5 +134,5 @@ const _sfc_main = {
|
|
|
144
134
|
};
|
|
145
135
|
}
|
|
146
136
|
};
|
|
147
|
-
const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
137
|
+
const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-4e4cf5f1"]]);
|
|
148
138
|
exports.default = MobileApp;
|