添加学校添加不限 样式修改
This commit is contained in:
parent
d64eec5ea4
commit
137e63c12d
@ -50,7 +50,8 @@
|
||||
<img src="../assets/homeImage/mapImg.png" class="img" alt="">
|
||||
地图找房
|
||||
</div> -->
|
||||
<div class="tool-btn dis-f jus-x al-item add-btn" :class="{'mg-l-10':routePath==='/'}" style="position: relative;">
|
||||
<div class="tool-btn dis-f jus-x al-item add-btn" :class="{ 'mg-l-10': routePath === '/' }"
|
||||
style="position: relative;">
|
||||
<img src="../../assets/homeImage/addBtn.png" class="img" alt="">
|
||||
发布房源
|
||||
<choosing-identity></choosing-identity>
|
||||
@ -175,7 +176,7 @@ let seachList = (item) => {
|
||||
historyArr.data.unshift(seachAllType.keyword)
|
||||
}
|
||||
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
|
||||
sessionStorage.setItem('houseingPageType',routePath.value === '/needHousing' ? '6' : routePath.value === '/intermediaryHousing' ? '1' : routePath.value === '/personHousing' ? '0' : '0')
|
||||
sessionStorage.setItem('houseingPageType', routePath.value === '/needHousing' ? '6' : routePath.value === '/intermediaryHousing' ? '1' : routePath.value === '/personHousing' ? '0' : '0')
|
||||
route.push({
|
||||
path: '/seachPage',
|
||||
query: {
|
||||
@ -186,7 +187,7 @@ let seachList = (item) => {
|
||||
}
|
||||
|
||||
//设置搜索数据
|
||||
let setSeachConditions = (type, data,second=null) => {
|
||||
let setSeachConditions = (type, data, second = null) => {
|
||||
if (type === 'rent') {
|
||||
seachAllType['rent_min'] = data.min
|
||||
seachAllType['rent_max'] = data.max
|
||||
@ -204,8 +205,8 @@ let setSeachConditions = (type, data,second=null) => {
|
||||
if (type === 'location') {
|
||||
seachAllType.school = ''
|
||||
}
|
||||
if(second){
|
||||
seachAllType[second.type]=second.id
|
||||
if (second) {
|
||||
seachAllType[second.type] = second.id
|
||||
}
|
||||
// console.log('seachAllType', seachAllType)
|
||||
// return
|
||||
@ -286,7 +287,7 @@ defineExpose({
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.btn-qrcode .QR-code{
|
||||
.btn-qrcode .QR-code {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 110px;
|
||||
@ -444,6 +445,11 @@ defineExpose({
|
||||
line-height: 48px;
|
||||
cursor: pointer;
|
||||
transform: translateX(-3px);
|
||||
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.img {
|
||||
@ -463,8 +469,9 @@ defineExpose({
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.mg-l-10{
|
||||
margin-left:10px;
|
||||
|
||||
.mg-l-10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.tool-btn {
|
||||
|
@ -90,7 +90,8 @@
|
||||
</div>
|
||||
<div class="hid-box">
|
||||
<checkBoxGroup :show="showSelect && selectTabCheck.id !== ''" :selectSeach="selectSeach"
|
||||
:closeSeach="closeSeach" :clearList="clearSelectTabCheck" :list="selectTabCheck.data" ref="checkBoxGroupInfo">
|
||||
:closeSeach="closeSeach" :clearList="clearSelectTabCheck" :list="selectTabCheck.data"
|
||||
ref="checkBoxGroupInfo">
|
||||
</checkBoxGroup>
|
||||
</div>
|
||||
</div>
|
||||
@ -183,9 +184,9 @@
|
||||
</div>
|
||||
<div class="dis-f pd-t-20">
|
||||
<div class="tab-title">其他</div>
|
||||
<div class="select-btn-box">
|
||||
<div class="select-btn-box" style="margin-left:-11px;">
|
||||
<div class="dis-f">
|
||||
<div class="dropdown-btn min-btn jus-x al-item dis-f" v-for="(item, i) in otherData" :key="i">
|
||||
<div class="dropdown-btn min-btn jus-x al-item dis-f" style="border:1px solid #fff;" v-for="(item, i) in otherData" :key="i">
|
||||
<el-checkbox-group v-model="otherCheck.list" @change="setOtherCheck">
|
||||
<el-checkbox :label="item.id">{{ item.title }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
@ -210,7 +211,7 @@
|
||||
<div class="dis-f" style="flex-wrap: wrap;width:800px;">
|
||||
<div v-for="(item, i) in selectData.data" :key="i" class="btm-btn">
|
||||
{{ item.title }}
|
||||
<img src="../../assets/homeImage/closeIcon.svg" @click="deleteSelect(i)" class="img" alt="">
|
||||
<img src="../../assets/homeImage/closeIcon.svg" @click="deleteSelect(i,item.id)" class="img" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -343,6 +344,7 @@ let schoolPages = ref(0) //页数
|
||||
let shcoolData = shallowReactive([])
|
||||
let setSchoolData = () => {
|
||||
let arr = store.state.seachTypeData[0] ? store.state.seachTypeData[0].where : []
|
||||
arr.unshift({name:'不限',id:''})
|
||||
let num = 0
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (!shcoolData[num]) {
|
||||
@ -435,11 +437,12 @@ let setCheckBoxData = (data) => {
|
||||
let selectSeach = (data = []) => {
|
||||
selectData.data = seachAreaId(data)
|
||||
showSelect.value = false
|
||||
schoolSelectObj.id = ''
|
||||
schoolSelectObj.title = ''
|
||||
if (data.length === 0 && selectTabCheck.id) {
|
||||
data.push(selectTabCheck.id)
|
||||
selectData.data=[{title:'不限',id:''}]
|
||||
}
|
||||
schoolSelectObj.id = ''
|
||||
schoolSelectObj.title = ''
|
||||
// console.log(selectData,selectTabCheck)
|
||||
// store.state.routeList['hireTypeObj']=JSON.parse(JSON.stringify(hireTypeObj))
|
||||
// return
|
||||
@ -447,17 +450,22 @@ let selectSeach = (data = []) => {
|
||||
}
|
||||
|
||||
//底部删除按钮
|
||||
let deleteSelect = (i) => {
|
||||
let deleteSelect = (i,id) => {
|
||||
|
||||
let data = []
|
||||
selectData.data.splice(i, 1)
|
||||
if(!id){
|
||||
setSelectData('',[],'不限')
|
||||
}
|
||||
selectData.data.map(res => {
|
||||
data.push(res.id)
|
||||
})
|
||||
checkBoxGroupInfo.value.setCheckData(data)
|
||||
if(data.length===0){
|
||||
setSeachCondition('location', [selectTabCheck.id+''])
|
||||
}else{
|
||||
setSeachCondition('location', data)
|
||||
if (data.length === 0&&id) {
|
||||
setSeachCondition('location', [selectTabCheck.id + ''])
|
||||
selectData.data=[{title:'不限',id:''}]
|
||||
} else if(id){
|
||||
setSeachCondition('location', data)
|
||||
}
|
||||
}
|
||||
|
||||
@ -639,11 +647,11 @@ let deconstructionSeachData = null
|
||||
//根据路由设置参数
|
||||
let setRouterQuerySet = ref(true)
|
||||
let routerQuerySet = () => {
|
||||
if(routePath.value==='/seachPage'){
|
||||
if (routePath.value === '/seachPage') {
|
||||
deconstructionSeachData = routeQuery.data
|
||||
deconstructionSeachData.houseingPageType=sessionStorage.getItem('houseingPageType')
|
||||
}else{
|
||||
deconstructionSeachData = deconstructionData(routeQuery.data)
|
||||
deconstructionSeachData.houseingPageType = sessionStorage.getItem('houseingPageType')
|
||||
} else {
|
||||
deconstructionSeachData = deconstructionData(routeQuery.data)
|
||||
}
|
||||
//路由参数设置
|
||||
if ((deconstructionSeachData.houseingPageType == '1') || (routePath.value === '/intermediaryHousing')) {
|
||||
@ -661,7 +669,7 @@ let routerQuerySet = () => {
|
||||
selectPosition.value = 'school'
|
||||
schoolSelectObj.id = deconstructionSeachData.selectData.id
|
||||
schoolSelectObj.title = deconstructionSeachData.selectData.name
|
||||
setSeachCondition('school', schoolSelectObj.id )
|
||||
setSeachCondition('school', schoolSelectObj.id)
|
||||
|
||||
} else if (deconstructionSeachData.type === 'types') {
|
||||
|
||||
@ -669,7 +677,7 @@ let routerQuerySet = () => {
|
||||
hireTypeObj.id = deconstructionSeachData.selectData.id
|
||||
hireTypeObj.title = deconstructionSeachData.selectData.title
|
||||
hireTypeObj.hireId = type == 1 ? '合租' : type == 2 ? '整租' : '不限'
|
||||
setSeachCondition('types', hireTypeObj.id )
|
||||
setSeachCondition('types', hireTypeObj.id)
|
||||
|
||||
} else if (deconstructionSeachData.type === 'location') {
|
||||
selectTabCheck.id = deconstructionSeachData.areaItem.id;
|
||||
@ -684,12 +692,12 @@ let routerQuerySet = () => {
|
||||
hireTypeObj.hireId = type == 1 ? '合租' : type == 2 ? '整租' : '不限'
|
||||
}
|
||||
|
||||
setSeachCondition('location', deconstructionSeachData.selectData[0]?deconstructionSeachData.selectData:[deconstructionSeachData.areaItem.id],{type:'types',id:hireTypeObj.id} )
|
||||
if(deconstructionSeachData.selectData[0])
|
||||
nextTick(() => {
|
||||
setCheckBoxData(deconstructionSeachData.selectData)//设置地区选项
|
||||
|
||||
})
|
||||
setSeachCondition('location', deconstructionSeachData.selectData[0] ? deconstructionSeachData.selectData : [deconstructionSeachData.areaItem.id], { type: 'types', id: hireTypeObj.id })
|
||||
if (deconstructionSeachData.selectData[0])
|
||||
nextTick(() => {
|
||||
setCheckBoxData(deconstructionSeachData.selectData)//设置地区选项
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
setRouterQuerySet.value = false
|
||||
@ -1008,7 +1016,7 @@ img {
|
||||
text-align: left;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-right: 35px;
|
||||
margin-right: 20px;
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
@ -1176,6 +1184,11 @@ img {
|
||||
border-color: rgba(179, 179, 179, 1);
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1194,7 +1207,7 @@ img {
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-left: 10px;
|
||||
margin-left: 15px;
|
||||
|
||||
.img {
|
||||
width: 8px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user