Explorar el Código

处理地址回显

cxmo hace 7 meses
padre
commit
d44a8615fb
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      src/components/searchDistPicker.vue

+ 7 - 0
src/components/searchDistPicker.vue

@@ -106,9 +106,16 @@ export default {
                     }else{
                         this.city = {cityKey:'',cityName:this.cityInfo}
                     }
+                    if(this.city.cityKey){
+                        const areaResult = Object.entries(area_sorce[this.city.cityKey]).find(([key,val])=>val===this.areaInfo)||['',this.areaInfo]
+                        this.area={areaKey:areaResult[0],areaName:areaResult[1]}
+                    }else{
+                        this.area={areaKey:'',areaName:this.areaInfo}
+                    }
                 }else{
                     this.province={provinceKey:'',provinceName:''}
                     this.city={cityKey:'',cityName:''}
+                    this.area={areaKey:'',areaName:''}
                 }
             },
             immediate:true