Commit 226f4f3b authored by youjie's avatar youjie

修复

parent 61404219
......@@ -100,15 +100,17 @@
watch: {
msg: {
handler(val, oldval) {
if(val.CarType!=this.busInfor.CarType){
this.getPlaceList()
}
this.busInfor = val
this.getPlaceList()
},
deep: true,
immediate: true
immediate: false
},
type: {
handler(val, oldval) {
this.getPlaceList()
this.getList()
},
deep: false,
immediate: true
......@@ -126,35 +128,41 @@
});
},
mounted() {
this.getPlaceList()
},
methods: {
getPlaceList(){
this.apipost('CarSingle_post_GetCarSingleAllPlaceList',{
Type: this.busInfor.CarType,
Type: this.msg.CarType,
AirportId: 0
},res=>{
if(res.resultCode==1){
if(res.data.length>0){
this.PlaceList = res.data
if(this.type<3&&!this.busInfor.desCountryId){
this.busInfor.desCountryId = res.data[0].Country
this.busInfor.desCountryName = res.data[0].CountryName
this.busInfor.ThreeCode = res.data[0].ThreeCode
this.busInfor.desCityId = res.data[0].CityList[0].City
this.busInfor.desCityName = res.data[0].CityList[0].CityName
}
if(this.type==3&&!this.busInfor.CountryId){
this.busInfor.CountryId = res.data[0].Country
this.busInfor.CountryName = res.data[0].CountryName
this.busInfor.ThreeCode = res.data[0].ThreeCode
this.busInfor.CityId = res.data[0].CityList[0].City
this.busInfor.CityName = res.data[0].CityList[0].CityName
}
this.getList()
}
}
})
},
getList() {
if(this.PlaceList.length==0){
return
}
if(this.type<3&&!this.busInfor.desCountryId){
this.busInfor.desCountryId = this.PlaceList[0].Country
this.busInfor.desCountryName = this.PlaceList[0].CountryName
this.busInfor.ThreeCode = this.PlaceList[0].ThreeCode
this.busInfor.desCityId = this.PlaceList[0].CityList[0].City
this.busInfor.desCityName = this.PlaceList[0].CityList[0].CityName
}
if(this.type==3&&!this.busInfor.CountryId){
this.busInfor.CountryId = this.PlaceList[0].Country
this.busInfor.CountryName = this.PlaceList[0].CountryName
this.busInfor.ThreeCode = this.PlaceList[0].ThreeCode
this.busInfor.CityId = this.PlaceList[0].CityList[0].City
this.busInfor.CityName = this.PlaceList[0].CityList[0].CityName
}
},
getKeyWords() {
if (!this.parameters.KeyWords.trim()) return;
this.showLoading=true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment