Commit 226f4f3b authored by youjie's avatar youjie

修复

parent 61404219
...@@ -100,15 +100,17 @@ ...@@ -100,15 +100,17 @@
watch: { watch: {
msg: { msg: {
handler(val, oldval) { handler(val, oldval) {
if(val.CarType!=this.busInfor.CarType){
this.getPlaceList()
}
this.busInfor = val this.busInfor = val
this.getPlaceList()
}, },
deep: true, deep: true,
immediate: true immediate: false
}, },
type: { type: {
handler(val, oldval) { handler(val, oldval) {
this.getPlaceList() this.getList()
}, },
deep: false, deep: false,
immediate: true immediate: true
...@@ -126,35 +128,41 @@ ...@@ -126,35 +128,41 @@
}); });
}, },
mounted() { mounted() {
this.getPlaceList()
}, },
methods: { methods: {
getPlaceList(){ getPlaceList(){
this.apipost('CarSingle_post_GetCarSingleAllPlaceList',{ this.apipost('CarSingle_post_GetCarSingleAllPlaceList',{
Type: this.busInfor.CarType, Type: this.msg.CarType,
AirportId: 0 AirportId: 0
},res=>{ },res=>{
if(res.resultCode==1){ if(res.resultCode==1){
if(res.data.length>0){ if(res.data.length>0){
this.PlaceList = res.data this.PlaceList = res.data
if(this.type<3&&!this.busInfor.desCountryId){ this.getList()
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
}
} }
} }
}) })
}, },
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() { getKeyWords() {
if (!this.parameters.KeyWords.trim()) return; if (!this.parameters.KeyWords.trim()) return;
this.showLoading=true 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