二手车交易,所在城市只能选择两级

This commit is contained in:
2025-03-13 14:02:10 +08:00
parent 22f76aaa73
commit 03df02174d
2 changed files with 11 additions and 12 deletions

View File

@ -134,7 +134,7 @@
closeable closeable
position="bottom" position="bottom"
> >
<van-area title="标题" :area-list="areaList" closeable="true" :value="form.areaCode ? String(form.areaCode) : ''" <van-area title="标题" :area-list="areaList" :columns-num="2" closeable="true" :value="form.areaCode ? String(form.areaCode) : ''"
@cancel="areaShow = false" @confirm="confirmHandle"/> @cancel="areaShow = false" @confirm="confirmHandle"/>
</van-popup> </van-popup>
</div> </div>
@ -244,12 +244,11 @@ export default {
}, },
confirmHandle(val){ confirmHandle(val){
let data=val.length let data=val.length
// console.log("val",val)
this.form.areaCode=val[data - 1]?.code this.form.areaCode=val[data - 1]?.code
if(val[0].name.includes('市')){ if(val[0].name.includes('市')){
this.areaName=val[1].name + val[2].name this.areaName=val[0].name
}else{ }else{
this.areaName=val[0].name +val[1].name + val[2].name this.areaName=val[0].name +val[1].name
} }
this.areaShow=false this.areaShow=false
}, },

View File

@ -38,14 +38,6 @@
:value="item.label"> :value="item.label">
</el-option> </el-option>
</el-select> </el-select>
<el-select @change="getList" v-model="price" placeholder="价格区间" :class="{'customSel':true , 'has-value': price }" clearable>
<el-option
v-for="item in priceOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select @change="getList" v-model="emissionStandard" placeholder="排放标准" :class="{'customSel':true , 'has-value': emissionStandard }" clearable> <el-select @change="getList" v-model="emissionStandard" placeholder="排放标准" :class="{'customSel':true , 'has-value': emissionStandard }" clearable>
<el-option <el-option
v-for="item in emissionStandardOption" v-for="item in emissionStandardOption"
@ -62,6 +54,14 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-select @change="getList" v-model="price" placeholder="价格区间" :class="{'customSel':true , 'has-value': price }" clearable>
<el-option
v-for="item in priceOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div> </div>
<div class="contentWrap" v-show="!showEmpty"> <div class="contentWrap" v-show="!showEmpty">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh"> <van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">