|
|
@ -48,14 +48,14 @@ |
|
|
|
<div class="span-sty">详细地址</div> |
|
|
|
<el-form-item> |
|
|
|
<div class="addinputInfo" style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center"> |
|
|
|
<el-select v-model="formobj.provinceSid" filterable placeholder="请选择省" style="width:160px" @change="provinceChange"> |
|
|
|
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
<el-select v-model="formobj.province" filterable clearable placeholder="请选择省" style="width:160px" @change="provinceChange"> |
|
|
|
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="formobj.citySid" filterable placeholder="请选择市" style="width:160px" @change="cityChange"> |
|
|
|
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
<el-select v-model="formobj.city" filterable placeholder="请选择市" style="width:160px" @change="cityChange"> |
|
|
|
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="formobj.countySid" filterable placeholder="请选择县" style="width:160px" @change="countyChange"> |
|
|
|
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
<el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px" @change="countyChange"> |
|
|
|
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
|
</el-select> |
|
|
|
<el-input style="width: 30%" v-model="formobj.address" clearable placeholder=""/> |
|
|
|
</div> |
|
|
@ -267,10 +267,18 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
provinceChange(value) { |
|
|
|
const choose = this.province_list.filter((item) => item.sid === value) |
|
|
|
const choose = this.province_list.filter((item) => item.name === value) |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
this.formobj.province = choose[0].name |
|
|
|
this.getCity(value) |
|
|
|
this.formobj.provinceSid = choose[0].sid |
|
|
|
this.getCity(this.formobj.provinceSid) |
|
|
|
} else { |
|
|
|
this.formobj.provinceSid = '' |
|
|
|
this.formobj.citySid = '' |
|
|
|
this.formobj.city = '' |
|
|
|
this.city_list = [] |
|
|
|
this.formobj.county = '' |
|
|
|
this.formobj.countySid = '' |
|
|
|
this.county_list = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
getCity(val) { |
|
|
@ -281,10 +289,10 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
cityChange(value) { |
|
|
|
const choose = this.city_list.filter((item) => item.sid === value) |
|
|
|
const choose = this.city_list.filter((item) => item.name === value) |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
this.formobj.city = choose[0].name |
|
|
|
this.getCounty(value) |
|
|
|
this.formobj.citySid = choose[0].sid |
|
|
|
this.getCounty(this.formobj.citySid) |
|
|
|
} |
|
|
|
}, |
|
|
|
getCounty(val) { |
|
|
@ -295,9 +303,9 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
countyChange(value) { |
|
|
|
const choose = this.county_list.filter((item) => item.sid === value) |
|
|
|
const choose = this.county_list.filter((item) => item.name === value) |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
this.formobj.county = choose[0].name |
|
|
|
this.formobj.countySid = choose[0].sid |
|
|
|
} |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|