| | |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id !== 0) { |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id != 0) { |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | | this.getCommonData() |
| | |
| | | }, |
| | | // 选择省份 |
| | | selProvinceChange(val) { |
| | | this.getCityList(val, "sel") |
| | | this.cityOptions=[] |
| | | if(val){ |
| | | this.getCityList(val, "sel") |
| | | } |
| | | }, |
| | | async getCityList(val, value) { |
| | | await getCityList({ province_id: val }).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.cityOptions = res.data.data.list |
| | | if (res.code === 200) { |
| | | this.cityOptions = res.data.list?res.data.list:[] |
| | | if (value === "sel") { |
| | | this.editConfig.infomation.city_id = "" |
| | | } |