省市区 修改

This commit is contained in:
shidongli 2022-11-15 14:49:01 +08:00
parent b63b8c5756
commit 186d0556a5

View File

@ -279,7 +279,7 @@
</el-option> </el-option>
</el-select> </el-select>
<el-select <el-select
v-model="form.streetName" v-model="form.areaCode"
clearable clearable
placeholder="请选择街道" placeholder="请选择街道"
style="width: 129px; margin-left: 10px" style="width: 129px; margin-left: 10px"
@ -753,12 +753,11 @@ export default {
// //
clickstreet(item) { clickstreet(item) {
this.form.areaCode = item.areaCode; this.form.areaCode = item.areaCode;
this.value3 = item.areaCode;
console.log(this.form); console.log(this.form);
}, },
// //
clickarea(item) { clickarea(item) {
this.value3 = ""; this.form.areaCode = "";
console.log(item); console.log(item);
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
console.log(res); console.log(res);
@ -767,8 +766,8 @@ export default {
}, },
// //
clickcity(item) { clickcity(item) {
this.value2 = ""; this.form.regionName = "";
this.value3 = ""; this.form.areaCode = "";
console.log(item); console.log(item);
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
console.log(res); console.log(res);
@ -779,10 +778,7 @@ export default {
province(item) { province(item) {
this.form.cityName = ""; this.form.cityName = "";
this.form.regionName = ""; this.form.regionName = "";
this.form.streetName = ""; this.form.areaCode = "";
// this.value1 = "";
// this.value2 = "";
// this.value3 = "";
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
this.citylist = res.data; this.citylist = res.data;
}); });