Commit 53b06219 authored by zhanglw's avatar zhanglw

查询

parent 792dfed9
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
<el-row style="padding-top: 16px"> <el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">分类</div></el-col> <el-col :span="2"><div class="area-title">分类</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);"> <el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in subTypeOpts" :key="'st_'+index" class="area_item touch" :class="query.subProductType===item.value?'active':''" @click="query.subProductType=item.value">{{ item.label }}</div> <div v-for="(item,index) in subTypeOpts" :key="'st_'+index" class="area_item touch" :class="query.subProductType===item.value?'active':''" @click="keywordClick(item, 'subProductType')">{{ item.label }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="2"><div class="area-title" style="height: 62px;line-height: 60px;">地区选择</div></el-col> <el-col :span="2"><div class="area-title" style="height: 62px;line-height: 60px;">地区选择</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);"> <el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="query.area=item.value">{{ item.label }}</div> <div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="keywordClick(item, 'area')">{{ item.label }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="padding-top: 10px"> <el-row style="padding-top: 10px">
...@@ -201,7 +201,12 @@ export default { ...@@ -201,7 +201,12 @@ export default {
}) })
}, },
keywordClick(item, type) { keywordClick(item, type) {
this.query.keyword = item if (type === 'subProductType') {
this.query.subProductType = item.value
} else if (type === 'area') {
this.query.area = item.value
}
this.search()
}, },
setQuertType(type) { setQuertType(type) {
if (type === this.query.type) { if (type === this.query.type) {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-row style="padding-top: 16px"> <el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">地区选择</div></el-col> <el-col :span="2"><div class="area-title">地区选择</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);"> <el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="query.area=item.value">{{ item.label }}</div> <div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="keywordClick(item, 'area')">{{ item.label }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="padding-top: 10px"> <el-row style="padding-top: 10px">
...@@ -262,7 +262,11 @@ export default { ...@@ -262,7 +262,11 @@ export default {
}) })
}, },
keywordClick(item, type) { keywordClick(item, type) {
this.query.keyword = item.name if (type === 'keyword') {
this.query.keyword = item.name
} else if (type === 'area') {
this.query.area = item.value
}
this.search() this.search()
}, },
setQuertType(type) { setQuertType(type) {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-row style="padding-top: 16px"> <el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">地区选择</div></el-col> <el-col :span="2"><div class="area-title">地区选择</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);"> <el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="query.area=item.value">{{ item.label }}</div> <div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="keywordClick(item, 'area')">{{ item.label }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="padding-top: 10px"> <el-row style="padding-top: 10px">
...@@ -208,7 +208,11 @@ export default { ...@@ -208,7 +208,11 @@ export default {
}) })
}, },
keywordClick(item, type) { keywordClick(item, type) {
this.query.keyword = item.name if (type === 'keyword') {
this.query.keyword = item.name
} else if (type === 'area') {
this.query.area = item.value
}
this.search() this.search()
}, },
setQuertType(type) { setQuertType(type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment