重写筛选组件和筛选参数全局化
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="option-item flexflex" v-else>
|
||||
<div class="option-item flexacenter" style="height: 96px;" v-else>
|
||||
<div class="option-title">目标区域</div>
|
||||
<div class="option-box flexflex flex1">
|
||||
<div class="item flexcenter" :class="{ pitch: 0 == selectDistrictPitchShow }" @click="selectOption('location', [])">不限</div>
|
||||
@@ -252,7 +252,7 @@
|
||||
<div class="option-item flexflex">
|
||||
<div class="option-title">其他</div>
|
||||
<div class="option-box flexacenter flex1">
|
||||
<div class="item-checkbox flexacenter" v-if="routePath == '/personHousing'" :class="{ pitch: pitchValue.isverified == 1 }" style="color: #f95d5d;" @click="selectCheckboxOption('isverified')">
|
||||
<div class="item-checkbox flexacenter item-checkbox-housing" v-if="routePath == '/personHousing'" :class="{ pitch: pitchValue.isverified == 1 }" @click="selectCheckboxOption('isverified')">
|
||||
<span class="item-checkbox__inner"></span>
|
||||
认证房源
|
||||
</div>
|
||||
@@ -268,11 +268,6 @@
|
||||
<span class="item-checkbox__inner"></span>
|
||||
有阳台
|
||||
</div>
|
||||
|
||||
<!-- <el-checkbox v-if="routePath == '/personHousing'" v-model="pitchValue.isverified" style="color: #f95d5d;" @change="selectCheckboxOption('isverified')" :key="pitchValue['isverified']" true-value="1" false-label="0">认证房源</el-checkbox>
|
||||
<el-checkbox v-if="routePath == '/intermediaryHousing'" v-model="pitchValue.isintermediary" @change="selectCheckboxOption('isintermediary')" :key="pitchValue['isintermediary']">认证中介</el-checkbox>
|
||||
<el-checkbox v-model="pitchValue.iselevator" @change="selectCheckboxOption('iselevator')" :key="pitchValue['iselevator']">有电梯</el-checkbox>
|
||||
<el-checkbox v-model="pitchValue.issunshinearea" @change="selectCheckboxOption('issunshinearea')" :key="pitchValue['issunshinearea']">有阳台</el-checkbox> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -312,7 +307,9 @@
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="sort-box">
|
||||
<el-dropdown-item class="sort-item" :class="{ pitch: item.type == pitchValue.orderby }" @click="selectOption('orderby', item.type)" v-for="item in orderbyList" :key="item.type">{{ item.name }}</el-dropdown-item>
|
||||
<el-dropdown-item class="sort-item" @click="selectOption('orderby', item.type)" v-for="item in orderbyList" :key="item.type">
|
||||
<div :class="{ pitch: item.type === pitchValue.orderby }">{{ item.name }}</div>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
@@ -397,7 +394,7 @@ onMounted(() => {
|
||||
pitchValue["school"] = ""
|
||||
const arr = queryParams["location"].split(",")
|
||||
pitchValue["location"] = arr
|
||||
selectDistrictPitchShow.value = Math.floor(pitchValue["location"][0] || 0)
|
||||
// selectDistrictPitchShow.value = Math.floor(pitchValue["location"][0] || 0)
|
||||
} else pitchValue = Object.assign({}, pitchValue, queryParams)
|
||||
} else if (routePath.value === "/intermediaryHousing") pitchValue = { ...pitchValue, ...store.state.intermediaryPitchValue }
|
||||
else pitchValue = { ...pitchValue, ...store.state.needPitchValue }
|
||||
@@ -407,6 +404,8 @@ onMounted(() => {
|
||||
geographicState.value = "school"
|
||||
}
|
||||
|
||||
if (pitchValue["location"].length > 0) selectDistrictPitchShow.value = Math.floor(pitchValue["location"][0] || 0)
|
||||
|
||||
getDataList(pitchValue)
|
||||
})
|
||||
|
||||
@@ -549,6 +548,11 @@ onMounted(() => {
|
||||
//设置区域状态
|
||||
let setSelectPosition = type => {
|
||||
geographicState.value = type
|
||||
|
||||
if (type !== "school") return
|
||||
locationTemp.key = 0
|
||||
locationTemp.value = []
|
||||
locationTemp.state = false
|
||||
}
|
||||
|
||||
//学校区域状态
|
||||
@@ -635,6 +639,7 @@ const selectDistrict = type => {
|
||||
|
||||
locationTemp.key = 0
|
||||
locationTemp.state = false
|
||||
pitchValue["school"] = ""
|
||||
} else {
|
||||
// 点击选好了 数组为空代表 选择不限
|
||||
if (locationTemp.value.length == 0) locationTemp.value = [selectDistrictPitchShow.value]
|
||||
@@ -643,6 +648,7 @@ const selectDistrict = type => {
|
||||
locationTemp.value = []
|
||||
selectDistrictPitchShow.value = Math.floor(pitchValue["location"][0] || 0)
|
||||
|
||||
pitchValue["school"] = ""
|
||||
locationTemp.key = 0
|
||||
locationTemp.state = false
|
||||
getDataList(pitchValue)
|
||||
@@ -1495,6 +1501,10 @@ defineExpose({
|
||||
margin-right: 20px;
|
||||
color: #606266;
|
||||
|
||||
&.item-checkbox-housing {
|
||||
color: #f95d5d;
|
||||
}
|
||||
|
||||
&.pitch {
|
||||
color: #000;
|
||||
font-weight: 650;
|
||||
@@ -1745,7 +1755,8 @@ defineExpose({
|
||||
margin-bottom: 30px;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
&.pitch {
|
||||
.pitch {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
font-weight: 650;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user