|
@@ -86,11 +86,13 @@
|
86
|
86
|
import { useGoBack } from '@/share/useGoBack.js'
|
87
|
87
|
import { useLoginUserStore } from '@/stores/loginUser'
|
88
|
88
|
import { useIncidentBuildStore } from '@/stores/incidentBuild'
|
|
89
|
+ import { useHandlerStore } from '@/stores/handler'
|
89
|
90
|
import { useUploadFile } from '@/share/useUploadFile.js'
|
90
|
91
|
|
91
|
92
|
useSetTitle();
|
92
|
93
|
const loginUserStore = useLoginUserStore();
|
93
|
94
|
const incidentBuildStore = useIncidentBuildStore();
|
|
95
|
+ const handlerStore = useHandlerStore();
|
94
|
96
|
const { uploadFile } = useUploadFile();
|
95
|
97
|
const { goBack } = useGoBack();
|
96
|
98
|
|
|
@@ -171,7 +173,7 @@
|
171
|
173
|
|
172
|
174
|
// 选择楼栋楼层
|
173
|
175
|
function selectAreaPlace(){
|
174
|
|
- incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident');
|
|
176
|
+ incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident', 'area');
|
175
|
177
|
uni.navigateTo({
|
176
|
178
|
url: `/pages/searchArea/searchArea`
|
177
|
179
|
})
|
|
@@ -179,7 +181,7 @@
|
179
|
181
|
|
180
|
182
|
// 跳转到搜索报修科室
|
181
|
183
|
function selectDepartment(){
|
182
|
|
- incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident');
|
|
184
|
+ incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident', 'department');
|
183
|
185
|
uni.navigateTo({
|
184
|
186
|
url: `/pages/searchDept/searchDept`
|
185
|
187
|
})
|
|
@@ -414,20 +416,14 @@
|
414
|
416
|
}
|
415
|
417
|
|
416
|
418
|
onLoad((option) => {
|
|
419
|
+ handlerStore.clearHandlerData();
|
417
|
420
|
if(incidentBuildStore.incidentBuild.data){
|
418
|
421
|
Object.assign(incidentData, incidentBuildStore.incidentBuild.data);
|
419
|
|
-
|
420
|
422
|
// 修改报修科室,则回显楼栋,楼层,详细地址,联系电话
|
421
|
|
- if(!incidentData.place){
|
422
|
|
- incidentData.place = incidentData.department ? incidentData.department.place : undefined;
|
423
|
|
- }
|
424
|
|
-
|
425
|
|
- if(!incidentData.houseNumber){
|
426
|
|
- incidentData.houseNumber = incidentData.department ? incidentData.department.address : '';
|
427
|
|
- }
|
428
|
|
-
|
429
|
|
- if(!incidentData.contactsInformation){
|
430
|
|
- incidentData.contactsInformation = incidentData.department ? incidentData.department.phone : '';
|
|
423
|
+ if(incidentBuildStore.incidentBuild.sign === 'department'){
|
|
424
|
+ incidentData.place = incidentData.department.place || undefined;
|
|
425
|
+ incidentData.houseNumber = incidentData.department.address || '';
|
|
426
|
+ incidentData.contactsInformation = incidentData.department.phone || '';
|
431
|
427
|
}
|
432
|
428
|
}
|
433
|
429
|
getBranchs();
|