7.14 提交

This commit is contained in:
zoujiandong
2025-07-14 17:16:32 +08:00
parent 5a56083d0c
commit c542b5e0ed
37 changed files with 1267 additions and 733 deletions
+46 -23
View File
@@ -24,6 +24,11 @@ Page({
className: 'column2',
defaultIndex: 0
},
{
values: [3,4],
className: 'column3',
defaultIndex: 0
}
],
hospitalColumns:[],
officeColumns:[],
@@ -133,12 +138,23 @@ Page({
},
onChangeArea(event){
const { picker, value, index } = event.detail;
const provinceId=value[0].id;
this.handleGetArea(provinceId)
if(index==0){
const provinceId=value[0].id;
this.handleGetArea(provinceId,2)
}else if(index==1){
let cityId=value[1].id
this.handleGetArea(cityId,3)
}
},
confirmArea(event){
const {value} = event.detail;
const countyId=value[1].id;
let countyId='';
if(value[2]){
countyId=value[2].id
}else{
countyId=value[1].id
}
this.setData({
county_id:countyId,
showArea:false
@@ -267,26 +283,33 @@ Page({
})
})
}),
handleGetArea(id){
getArea({
parent:id
}).then(res=>{
if(id){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
}else{
let obj='areaColumns[0].values';
this.setData({
[obj]:res
})
this.handleGetArea(res[0].id)
}
}).catch(error=>{
console.log(error)
})
handleGetArea(id,type){
getArea({
parent:id
}).then(res=>{
if(type==1){
let obj='areaColumns[0].values';
this.setData({
[obj]:res
})
this.handleGetArea(res[0].id,2)
}else if(type==2){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
this.handleGetArea(res[0].id,3)
}else if(type==3){
let obj='areaColumns[2].values';
this.setData({
[obj]:res
})
}
}).catch(error=>{
console.log(error)
})
},
handleGetHospital(countyId){
getHospital(countyId).then(res=>{