|
@@ -675,14 +675,24 @@ export default {
|
|
selectCityChange(val){
|
|
selectCityChange(val){
|
|
console.log('val: ', val);
|
|
console.log('val: ', val);
|
|
console.log('this.$refs: ', this.$refs);
|
|
console.log('this.$refs: ', this.$refs);
|
|
- setTimeout(()=>{
|
|
|
|
- this.form.cityName = this.$refs.selectCity.selectedLabel
|
|
|
|
- console.log('this.form.cityName: ', this.form.cityName);
|
|
|
|
- getAreasByCityId({cityId: val}).then(res=>{
|
|
|
|
- console.log('res: ', res);
|
|
|
|
- this.areasList = res.data;
|
|
|
|
- })
|
|
|
|
- }, 500)
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ // setTimeout(()=>{
|
|
|
|
+ // this.form.cityName = this.$refs.selectCity.selectedLabel
|
|
|
|
+ // console.log('this.$refs.selectCity: ', this.$refs.selectCity);
|
|
|
|
+ // console.log('this.$refs.selectCity.selectedLabel: ', this.$refs.selectCity.selectedLabel);
|
|
|
|
+ // console.log('this.form.cityName: ', this.form.cityName);
|
|
|
|
+ this.formCityList.children.map(item=>{
|
|
|
|
+ if(val == item.value){
|
|
|
|
+ this.form.cityName = item.label
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ console.log('this.form.cityName: ', this.form.cityName);
|
|
|
|
+ getAreasByCityId({cityId: val}).then(res=>{
|
|
|
|
+ console.log('res: ', res);
|
|
|
|
+ this.areasList = res.data;
|
|
|
|
+ } );
|
|
|
|
+ // }, 1000)
|
|
|
|
+ })
|
|
|
|
|
|
},
|
|
},
|
|
// 表单查询条件地区选择
|
|
// 表单查询条件地区选择
|