@fecp/designer 5.5.119 → 5.5.121
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/dataSource/index.vue.mjs +3 -3
- package/es/designer/src/packages/dialog/index.vue2.mjs +15 -15
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +15 -16
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/event/pageEvent.vue.mjs +1 -1
- package/es/designer/src/packages/form/index.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer.css +505 -415
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/api/index.mjs +1 -1
- package/es/packages/mobile/src/assets/images/baseRate.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/home-bg.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/rentCalc.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/user.png.mjs +4 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +62 -44
- package/es/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.mjs +2 -2
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +128 -67
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +5 -5
- package/es/packages/mobile/src/components/custom/customCode/CustomCode.vue.mjs +60 -0
- package/es/packages/mobile/src/components/custom/customCode/index.mjs +10 -0
- package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +2 -2
- package/es/packages/mobile/src/components/custom/userSelect/UserSelect.vue.mjs +2 -2
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +187 -7
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +2 -2
- package/es/packages/mobile/src/components/dataDisplay/mine/Mine.vue.mjs +33 -9
- package/es/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.mjs +39 -79
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +10 -2
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +167 -32
- package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +3 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +13 -15
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +10 -10
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +7 -23
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +14 -26
- package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +14 -15
- package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +6 -19
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +9 -25
- package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +8 -24
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +15 -6
- package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +9 -5
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +58 -25
- package/es/packages/mobile/src/index.vue.mjs +21 -4
- package/es/packages/mobile/src/page.vue.mjs +342 -138
- package/es/packages/mobile/src/utils/common.mjs +21 -0
- package/es/packages/mobile/src/utils/datasource.mjs +3 -3
- package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +35 -22
- package/es/packages/mobile/src/utils/formatterUtil.mjs +4 -24
- package/es/packages/mobile/src/utils/formulajs/calculate.mjs +11 -5
- package/es/packages/mobile/src/utils/optionUtil.mjs +3 -28
- package/es/packages/mobile/src/utils/pageHistory.mjs +16 -0
- package/es/packages/mobile/src/utils/validation.mjs +129 -0
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +3 -2
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +12 -8
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dataSource/index.vue.js +3 -3
- package/lib/designer/src/packages/dialog/index.vue2.js +15 -15
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +15 -16
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/event/pageEvent.vue.js +1 -1
- package/lib/designer/src/packages/form/index.vue.js +2 -2
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer.css +505 -415
- package/lib/packages/mobile/index.js +4 -2
- package/lib/packages/mobile/src/api/index.js +1 -1
- package/lib/packages/mobile/src/assets/images/baseRate.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/home-bg.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/rentCalc.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/user.png.js +4 -0
- package/lib/packages/mobile/src/components/all.js +2 -0
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +61 -43
- package/lib/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.js +2 -2
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +131 -70
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +5 -5
- package/lib/packages/mobile/src/components/custom/customCode/CustomCode.vue.js +60 -0
- package/lib/packages/mobile/src/components/custom/customCode/index.js +10 -0
- package/lib/packages/mobile/src/components/custom/document/Document.vue.js +2 -2
- package/lib/packages/mobile/src/components/custom/userSelect/UserSelect.vue.js +2 -2
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +187 -7
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +2 -2
- package/lib/packages/mobile/src/components/dataDisplay/mine/Mine.vue.js +38 -14
- package/lib/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.js +39 -79
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +10 -2
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +165 -30
- package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +3 -2
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +13 -15
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +9 -9
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +6 -22
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +13 -25
- package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +13 -14
- package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +6 -19
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +8 -24
- package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +7 -23
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +15 -6
- package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +2 -2
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +9 -5
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +61 -28
- package/lib/packages/mobile/src/index.vue.js +20 -3
- package/lib/packages/mobile/src/page.vue.js +341 -137
- package/lib/packages/mobile/src/utils/common.js +21 -0
- package/lib/packages/mobile/src/utils/datasource.js +3 -3
- package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +35 -22
- package/lib/packages/mobile/src/utils/formatterUtil.js +3 -23
- package/lib/packages/mobile/src/utils/formulajs/calculate.js +11 -5
- package/lib/packages/mobile/src/utils/optionUtil.js +2 -27
- package/lib/packages/mobile/src/utils/pageHistory.js +16 -0
- package/lib/packages/mobile/src/utils/validation.js +129 -0
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +3 -2
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +12 -8
- package/package.json +1 -1
|
@@ -81,16 +81,13 @@ const _sfc_main = {
|
|
|
81
81
|
const showPicker = ref(false);
|
|
82
82
|
const emit = __emit;
|
|
83
83
|
const pickerValue = computed(() => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return val.substring(1);
|
|
88
|
-
}
|
|
89
|
-
return val;
|
|
84
|
+
var _a;
|
|
85
|
+
const value = ((_a = props.modelValue) == null ? void 0 : _a.split(",")) || [];
|
|
86
|
+
return value[value.length - 1];
|
|
90
87
|
});
|
|
91
88
|
function getDisplayValue(options, fieldNames, modelValue) {
|
|
92
89
|
const { text, value, children } = fieldNames;
|
|
93
|
-
const values = modelValue;
|
|
90
|
+
const values = modelValue || [];
|
|
94
91
|
const displayValues = [];
|
|
95
92
|
function findValueInOptions(currentOptions, targetValue) {
|
|
96
93
|
for (const option of currentOptions) {
|
|
@@ -126,18 +123,8 @@ const _sfc_main = {
|
|
|
126
123
|
);
|
|
127
124
|
});
|
|
128
125
|
const onFinish = ({ selectedOptions }) => {
|
|
129
|
-
const value = selectedOptions.map(
|
|
130
|
-
|
|
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);
|
|
126
|
+
const value = selectedOptions.map((option) => option[props.treeOptionsFieldNames.value]).join(",");
|
|
127
|
+
emit("update:modelValue", value);
|
|
141
128
|
showPicker.value = false;
|
|
142
129
|
};
|
|
143
130
|
return (_ctx, _cache) => {
|
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { getCurrentInstance, useAttrs,
|
|
14
|
+
import { getCurrentInstance, useAttrs, computed, ref, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
15
15
|
import { MobileField } from "../field/index.mjs";
|
|
16
|
-
import
|
|
17
|
-
import { cloneDeep } from "../../../utils/common.mjs";
|
|
16
|
+
import "../../../utils/optionUtil.mjs";
|
|
18
17
|
import { Picker } from "../../../../../../node_modules/vant/es/picker/index.mjs";
|
|
19
18
|
import { Popup } from "../../../../../../node_modules/vant/es/popup/index.mjs";
|
|
20
19
|
import { Icon } from "../../../../../../node_modules/vant/es/icon/index.mjs";
|
|
@@ -66,34 +65,19 @@ const _sfc_main = {
|
|
|
66
65
|
emits: ["update:modelValue"],
|
|
67
66
|
setup(__props, { emit: __emit }) {
|
|
68
67
|
const currentInstance = getCurrentInstance();
|
|
69
|
-
|
|
68
|
+
currentInstance.proxy;
|
|
70
69
|
const props = __props;
|
|
71
70
|
useAttrs();
|
|
72
|
-
const finalOptions =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
);
|
|
71
|
+
const finalOptions = computed(() => {
|
|
72
|
+
if (!props.optionConfig) return [];
|
|
73
|
+
return props.optionConfig.options || [];
|
|
74
|
+
});
|
|
91
75
|
const showPicker = ref(false);
|
|
92
76
|
const emit = __emit;
|
|
93
77
|
const pickerValue = computed({
|
|
94
78
|
get: () => {
|
|
95
79
|
const value = props.modelValue;
|
|
96
|
-
return value.split(",");
|
|
80
|
+
return (value == null ? void 0 : value.split(",")) || [];
|
|
97
81
|
},
|
|
98
82
|
set: (val) => {
|
|
99
83
|
emit("update:modelValue", val.join(","));
|
|
@@ -103,7 +87,7 @@ const _sfc_main = {
|
|
|
103
87
|
const selectedOption = finalOptions.value.find(
|
|
104
88
|
(option) => option.value == pickerValue.value.join(",")
|
|
105
89
|
);
|
|
106
|
-
return selectedOption ? selectedOption.label : "";
|
|
90
|
+
return selectedOption ? selectedOption.label : pickerValue.value.join(",");
|
|
107
91
|
});
|
|
108
92
|
const onConfirm = ({ selectedValues, selectedOptions }) => {
|
|
109
93
|
pickerValue.value = selectedValues;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { getCurrentInstance, useAttrs,
|
|
1
|
+
import { getCurrentInstance, useAttrs, computed, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createElementBlock, toDisplayString } from "vue";
|
|
2
2
|
import { MobileField } from "../field/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import "../../../utils/optionUtil.mjs";
|
|
4
4
|
import { MobileRadioGroup } from "../radioGroup/index.mjs";
|
|
5
|
-
import { cloneDeep } from "../../../utils/common.mjs";
|
|
6
5
|
const _hoisted_1 = { key: 1 };
|
|
7
6
|
const _sfc_main = {
|
|
8
7
|
__name: "FieldRadio",
|
|
@@ -36,28 +35,13 @@ const _sfc_main = {
|
|
|
36
35
|
emits: ["update:modelValue"],
|
|
37
36
|
setup(__props, { emit: __emit }) {
|
|
38
37
|
const currentInstance = getCurrentInstance();
|
|
39
|
-
|
|
38
|
+
currentInstance.proxy;
|
|
40
39
|
const props = __props;
|
|
41
40
|
useAttrs();
|
|
42
|
-
const finalOptions =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
getOptions({
|
|
47
|
-
ctx,
|
|
48
|
-
dataSources: props.dataSources,
|
|
49
|
-
formData: props.formData,
|
|
50
|
-
fields: props.fields,
|
|
51
|
-
...props.optionConfig
|
|
52
|
-
}).then((data) => {
|
|
53
|
-
finalOptions.value = data;
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
deep: true,
|
|
58
|
-
immediate: true
|
|
59
|
-
}
|
|
60
|
-
);
|
|
41
|
+
const finalOptions = computed(() => {
|
|
42
|
+
if (!props.optionConfig) return [];
|
|
43
|
+
return props.optionConfig.options || [];
|
|
44
|
+
});
|
|
61
45
|
const emit = __emit;
|
|
62
46
|
const compValue = computed({
|
|
63
47
|
get: () => {
|
|
@@ -71,7 +55,7 @@ const _sfc_main = {
|
|
|
71
55
|
const selectedOption = finalOptions.value.find(
|
|
72
56
|
(option) => option.value === compValue.value
|
|
73
57
|
);
|
|
74
|
-
return selectedOption ? selectedOption.label :
|
|
58
|
+
return selectedOption ? selectedOption.label : compValue.value;
|
|
75
59
|
});
|
|
76
60
|
return (_ctx, _cache) => {
|
|
77
61
|
return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
|
|
@@ -37,12 +37,19 @@ const _sfc_main = {
|
|
|
37
37
|
const searchData = ref("");
|
|
38
38
|
function onClickFilter() {
|
|
39
39
|
}
|
|
40
|
+
const filters = ref({});
|
|
40
41
|
function onSearch() {
|
|
41
|
-
|
|
42
|
+
filters.value.dynamicFilter = searchData.value;
|
|
43
|
+
emit("filterChange", filters.value);
|
|
42
44
|
}
|
|
43
45
|
function onQuickFilterChange(result) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
filters.value = {
|
|
47
|
+
dynamicFilter: searchData.value
|
|
48
|
+
};
|
|
49
|
+
result.forEach((item) => {
|
|
50
|
+
filters.value[item.fieldName] = item.values.join("|");
|
|
51
|
+
});
|
|
52
|
+
emit("filterChange", filters.value);
|
|
46
53
|
}
|
|
47
54
|
const filterData = ref([]);
|
|
48
55
|
const fieldDataSources = /* @__PURE__ */ new Set();
|
|
@@ -67,7 +74,8 @@ const _sfc_main = {
|
|
|
67
74
|
const dsManager = createDataSource({
|
|
68
75
|
http: ctx.$http,
|
|
69
76
|
dataSources: props.dataSources,
|
|
70
|
-
currentDataSourceId: dataSourceId
|
|
77
|
+
currentDataSourceId: dataSourceId,
|
|
78
|
+
loading: false
|
|
71
79
|
});
|
|
72
80
|
const data = await dsManager.fetch();
|
|
73
81
|
let options = [];
|
|
@@ -85,11 +93,12 @@ const _sfc_main = {
|
|
|
85
93
|
if (dictionaryKeys.size > 0) {
|
|
86
94
|
try {
|
|
87
95
|
const keyName = Array.from(dictionaryKeys).join(",");
|
|
88
|
-
const response = await ctx.$http.
|
|
96
|
+
const response = await ctx.$http.postFormMobile(
|
|
89
97
|
"/base-server/parm/sysParmDic/getDicListByKey",
|
|
90
98
|
{
|
|
91
99
|
keyName
|
|
92
|
-
}
|
|
100
|
+
},
|
|
101
|
+
false
|
|
93
102
|
);
|
|
94
103
|
const dictionaryData = response;
|
|
95
104
|
if (typeof dictionaryData === "object") {
|
|
@@ -75,7 +75,7 @@ const _sfc_main = {
|
|
|
75
75
|
const emit = __emit;
|
|
76
76
|
const fileList = computed({
|
|
77
77
|
get: () => {
|
|
78
|
-
return props.modelValue;
|
|
78
|
+
return props.modelValue || [];
|
|
79
79
|
},
|
|
80
80
|
set: (val) => {
|
|
81
81
|
emit("update:modelValue", val);
|
|
@@ -219,7 +219,7 @@ const _sfc_main = {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
|
-
const _Uploader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
222
|
+
const _Uploader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c9dede2d"]]);
|
|
223
223
|
export {
|
|
224
224
|
_Uploader as default
|
|
225
225
|
};
|
|
@@ -52,7 +52,7 @@ const _sfc_main = {
|
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
function getFlowCutNum() {
|
|
55
|
-
ctx.$http.
|
|
55
|
+
ctx.$http.postMobile("/base-server/flow/workbench/getTaskCutByUser", null, false).then((data) => {
|
|
56
56
|
flowMsgNum.value = data;
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -61,9 +61,13 @@ const _sfc_main = {
|
|
|
61
61
|
getFlowCutNum();
|
|
62
62
|
});
|
|
63
63
|
function getMessageCutNum() {
|
|
64
|
-
ctx.$http.
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
ctx.$http.postFormMobile(
|
|
65
|
+
"/base-server/msgMessages/initMsgUnReadNum",
|
|
66
|
+
{
|
|
67
|
+
opNo: store.getters.user.opNo
|
|
68
|
+
},
|
|
69
|
+
false
|
|
70
|
+
).then((data) => {
|
|
67
71
|
msgNum.value = data;
|
|
68
72
|
});
|
|
69
73
|
}
|
|
@@ -110,7 +114,7 @@ const _sfc_main = {
|
|
|
110
114
|
};
|
|
111
115
|
}
|
|
112
116
|
};
|
|
113
|
-
const _Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
117
|
+
const _Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5e9f5a59"]]);
|
|
114
118
|
export {
|
|
115
119
|
_Tabbar as default
|
|
116
120
|
};
|
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
-
|
|
9
|
-
/* empty css */
|
|
10
|
-
/* empty css */
|
|
11
|
-
/* empty css */
|
|
12
|
-
import { inject, ref, computed, onMounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createBlock, createCommentVNode, createVNode, isRef, withCtx, Fragment, renderList, mergeProps, createElementVNode, resolveDynamicComponent } from "vue";
|
|
8
|
+
import { inject, ref, computed, onMounted, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createBlock, createCommentVNode, createVNode, isRef, withCtx, Fragment, renderList, mergeProps, createElementVNode, resolveDynamicComponent } from "vue";
|
|
13
9
|
import { findPageById } from "../../../utils/common.mjs";
|
|
14
10
|
import MobilePage from "../../../page.vue.mjs";
|
|
15
11
|
import { MobileTimeLineFilter } from "../../custom/appTimeLine/index.mjs";
|
|
16
12
|
import { MobileDocument } from "../../custom/document/index.mjs";
|
|
13
|
+
import { checkFilterMatch } from "../../../utils/parseFilterConfig.mjs";
|
|
17
14
|
/* empty css */
|
|
18
15
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
19
|
-
import { Search } from "../../../../../../node_modules/vant/es/search/index.mjs";
|
|
20
16
|
import { Tabs } from "../../../../../../node_modules/vant/es/tabs/index.mjs";
|
|
21
17
|
import { Tab } from "../../../../../../node_modules/vant/es/tab/index.mjs";
|
|
22
18
|
const _hoisted_1 = { class: "fec-tab-content" };
|
|
@@ -68,6 +64,22 @@ const _sfc_main = {
|
|
|
68
64
|
busPkField: {
|
|
69
65
|
type: String,
|
|
70
66
|
default: ""
|
|
67
|
+
},
|
|
68
|
+
formData: {
|
|
69
|
+
type: Object,
|
|
70
|
+
default: {}
|
|
71
|
+
},
|
|
72
|
+
fields: {
|
|
73
|
+
type: Array,
|
|
74
|
+
default: []
|
|
75
|
+
},
|
|
76
|
+
isDev: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
dynamicInputFilter: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default: []
|
|
71
83
|
}
|
|
72
84
|
},
|
|
73
85
|
emits: ["update:modelValue"],
|
|
@@ -77,11 +89,27 @@ const _sfc_main = {
|
|
|
77
89
|
const pageList = inject("pageList");
|
|
78
90
|
const activeName = ref(((_a = props.options[0]) == null ? void 0 : _a.id) || "");
|
|
79
91
|
const tabsOptions = computed(() => {
|
|
80
|
-
const tabs = [...props.options || []]
|
|
92
|
+
const tabs = [...props.options || []].filter((item) => {
|
|
93
|
+
if (!item.showCondition || props.isDev) return true;
|
|
94
|
+
return checkFilterMatch(item.showCondition, props.formData, props.fields);
|
|
95
|
+
});
|
|
96
|
+
tabs.forEach((tab) => {
|
|
97
|
+
const params = {};
|
|
98
|
+
const fieldMapping = tab.fieldMapping;
|
|
99
|
+
if (fieldMapping && Array.isArray(fieldMapping)) {
|
|
100
|
+
fieldMapping.forEach((item) => {
|
|
101
|
+
const field = props.fields.find((field2) => field2.id == item.field);
|
|
102
|
+
if (field) {
|
|
103
|
+
params[item.value] = props.formData[field.fieldName];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
tab.params = { ...props.formData, ...params };
|
|
108
|
+
});
|
|
81
109
|
if (props.document) {
|
|
82
110
|
tabs.push({ id: "tab_doc_info", title: "要件信息", component: MobileDocument });
|
|
83
111
|
}
|
|
84
|
-
if (props.approvalHistory) {
|
|
112
|
+
if (props.approvalHistory && props.formData.approveSts != "00") {
|
|
85
113
|
tabs.push({
|
|
86
114
|
id: "tab_timeline_info",
|
|
87
115
|
title: "审批历史",
|
|
@@ -93,10 +121,10 @@ const _sfc_main = {
|
|
|
93
121
|
const componentParams = computed(() => {
|
|
94
122
|
let traceNo = props.params.traceNo;
|
|
95
123
|
if (props.busPkField) {
|
|
96
|
-
traceNo = props.
|
|
124
|
+
traceNo = props.formData[props.busPkField];
|
|
97
125
|
}
|
|
98
126
|
return {
|
|
99
|
-
...props.
|
|
127
|
+
...props.formData,
|
|
100
128
|
traceNo
|
|
101
129
|
};
|
|
102
130
|
});
|
|
@@ -122,32 +150,34 @@ const _sfc_main = {
|
|
|
122
150
|
const getPage = (pageId) => {
|
|
123
151
|
return pageCache.value[pageId] || null;
|
|
124
152
|
};
|
|
153
|
+
const setPageRef = (id, el) => {
|
|
154
|
+
};
|
|
125
155
|
const searchData = ref("");
|
|
126
|
-
function
|
|
127
|
-
|
|
156
|
+
function onFilterChange(filter) {
|
|
157
|
+
const dynamicFilterFieldName = props.dynamicInputFilter.map((item) => item.fieldName).join(",");
|
|
158
|
+
searchData.value = {
|
|
159
|
+
filters: JSON.stringify({ ...filter, dynamicFilterFieldName })
|
|
160
|
+
};
|
|
128
161
|
}
|
|
129
162
|
return (_ctx, _cache) => {
|
|
130
|
-
const
|
|
163
|
+
const _component_fec_mobile_search = resolveComponent("fec-mobile-search");
|
|
131
164
|
const _component_van_tab = Tab;
|
|
132
165
|
const _component_van_tabs = Tabs;
|
|
133
166
|
return openBlock(), createElementBlock("div", {
|
|
134
167
|
class: normalizeClass(["fec-tabs-container", { isAutoHeight: props.autoHeight }]),
|
|
135
168
|
style: normalizeStyle("height:" + unref(compHeight))
|
|
136
169
|
}, [
|
|
137
|
-
__props.enableFilter ? (openBlock(), createBlock(
|
|
170
|
+
__props.enableFilter ? (openBlock(), createBlock(_component_fec_mobile_search, {
|
|
138
171
|
key: 0,
|
|
139
|
-
modelValue: unref(searchData),
|
|
140
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchData) ? searchData.value = $event : null),
|
|
141
|
-
shape: "round",
|
|
142
172
|
placeholder: __props.filterPlaceholder,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", true),
|
|
173
|
+
onFilterChange
|
|
174
|
+
}, null, 8, ["placeholder"])) : createCommentVNode("", true),
|
|
146
175
|
createVNode(_component_van_tabs, {
|
|
147
176
|
class: "fec-tabs",
|
|
148
177
|
active: unref(activeName),
|
|
149
|
-
"onUpdate:active": _cache[
|
|
150
|
-
swipeable: unref(tabSwipeable)
|
|
178
|
+
"onUpdate:active": _cache[0] || (_cache[0] = ($event) => isRef(activeName) ? activeName.value = $event : null),
|
|
179
|
+
swipeable: unref(tabSwipeable),
|
|
180
|
+
"swipe-threshold": 4
|
|
151
181
|
}, {
|
|
152
182
|
default: withCtx(() => [
|
|
153
183
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabsOptions), (item) => {
|
|
@@ -160,9 +190,12 @@ const _sfc_main = {
|
|
|
160
190
|
createElementVNode("div", _hoisted_1, [
|
|
161
191
|
item.pageId && getPage(item.pageId) ? (openBlock(), createBlock(MobilePage, {
|
|
162
192
|
key: 0,
|
|
193
|
+
ref_for: true,
|
|
194
|
+
ref: (el) => setPageRef(item.id),
|
|
163
195
|
parentPage: getPage(item.pageId),
|
|
164
|
-
params:
|
|
165
|
-
|
|
196
|
+
params: item.params,
|
|
197
|
+
initSearchData: unref(searchData)
|
|
198
|
+
}, null, 8, ["parentPage", "params", "initSearchData"])) : item.component ? (openBlock(), createBlock(resolveDynamicComponent(item.component), mergeProps({
|
|
166
199
|
key: 1,
|
|
167
200
|
ref_for: true
|
|
168
201
|
}, unref(componentParams)), null, 16)) : createCommentVNode("", true)
|
|
@@ -178,7 +211,7 @@ const _sfc_main = {
|
|
|
178
211
|
};
|
|
179
212
|
}
|
|
180
213
|
};
|
|
181
|
-
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
214
|
+
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-217113cd"]]);
|
|
182
215
|
export {
|
|
183
216
|
_Tabs as default
|
|
184
217
|
};
|
|
@@ -12,7 +12,7 @@ import MobilePage from "./page.vue.mjs";
|
|
|
12
12
|
import api from "./api/index.mjs";
|
|
13
13
|
import emitter from "./utils/eventBus.mjs";
|
|
14
14
|
import { pageHistory } from "./utils/pageHistory.mjs";
|
|
15
|
-
import { findPageById } from "./utils/common.mjs";
|
|
15
|
+
import { findPageById, findPageByKey } from "./utils/common.mjs";
|
|
16
16
|
import { useStore } from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
@@ -31,6 +31,10 @@ const _sfc_main = {
|
|
|
31
31
|
pageKey: {
|
|
32
32
|
type: String,
|
|
33
33
|
default: ""
|
|
34
|
+
},
|
|
35
|
+
queryParams: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: {}
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
setup(__props) {
|
|
@@ -54,7 +58,7 @@ const _sfc_main = {
|
|
|
54
58
|
pageHistory.clear();
|
|
55
59
|
let homePage;
|
|
56
60
|
if (props.pageKey) {
|
|
57
|
-
homePage = pageList.value
|
|
61
|
+
homePage = findPageByKey(pageList.value, props.pageKey);
|
|
58
62
|
if (!homePage) {
|
|
59
63
|
noTargetPage.value = true;
|
|
60
64
|
}
|
|
@@ -112,7 +116,7 @@ const _sfc_main = {
|
|
|
112
116
|
routePage.value = null;
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
|
-
const pageParams = ref(
|
|
119
|
+
const pageParams = ref(props.queryParams);
|
|
116
120
|
emitter.on("loadPage", ({ pageId, params }) => {
|
|
117
121
|
loadPage(pageId);
|
|
118
122
|
pageParams.value = params;
|
|
@@ -126,6 +130,19 @@ const _sfc_main = {
|
|
|
126
130
|
});
|
|
127
131
|
provide("pageList", pageList);
|
|
128
132
|
onMounted(() => {
|
|
133
|
+
const search = new URLSearchParams(location.search);
|
|
134
|
+
if (search.get("safeTop") || search.get("safeBottom")) {
|
|
135
|
+
const top = search.get("safeTop") || 0;
|
|
136
|
+
const bottom = search.get("safeBottom") || 0;
|
|
137
|
+
document.documentElement.style.setProperty(
|
|
138
|
+
"--safe-area-inset-top",
|
|
139
|
+
`${top}px`
|
|
140
|
+
);
|
|
141
|
+
document.documentElement.style.setProperty(
|
|
142
|
+
"--safe-area-inset-bottom",
|
|
143
|
+
`${bottom}px`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
129
146
|
loadConfig();
|
|
130
147
|
});
|
|
131
148
|
return (_ctx, _cache) => {
|
|
@@ -154,7 +171,7 @@ const _sfc_main = {
|
|
|
154
171
|
};
|
|
155
172
|
}
|
|
156
173
|
};
|
|
157
|
-
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
174
|
+
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b26c4347"]]);
|
|
158
175
|
export {
|
|
159
176
|
MobileApp as default
|
|
160
177
|
};
|