优化招聘页面筛选功能
This commit is contained in:
@@ -16,14 +16,20 @@
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="item-container">
|
||||
<view @click="clickFunc({ 'type': 'address' })" v-if="item.name === `区域`"
|
||||
class="thumb-box thumb-box1">
|
||||
<view class="thumb-box thumb-box1" @click="clickFunc({ 'type': 'address' })"
|
||||
v-if="item.name === `区域` && !areaModal.isClickAddress">
|
||||
请选择区域</view>
|
||||
<view class="thumb-box thumb-box1" @click="clickFunc({ 'type': 'industry' })"
|
||||
v-else-if="item.name === `行业` && !industryModal.isClickIndustry">请选择行业</view>
|
||||
<view @click="clickFunc({ 'type': 'address' })"
|
||||
v-else-if="item.name === `区域` && areaModal.isClickAddress" class="thumb-box thumb-box1">
|
||||
<u-cell-group>
|
||||
<u-cell icon="map" :title="areaModal.address" :isLink="true"
|
||||
arrow-direction="down"></u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<view @click="clickFunc({ 'type': 'industry' })" v-else-if="item.name === `行业`"
|
||||
<view @click="clickFunc({ 'type': 'industry' })"
|
||||
v-else-if="item.name === `行业` && industryModal.isClickIndustry"
|
||||
class="thumb-box thumb-box1">
|
||||
<u-cell-group>
|
||||
<u-cell icon="calendar" :title="industryModal.industry" :isLink="true"
|
||||
@@ -31,9 +37,8 @@
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<view @click="clickFunc({
|
||||
'type': 'normal', 'bigObj': item, 'smallObj': item1
|
||||
})" v-else
|
||||
:class="submitData[item.name] === item1.id ? `selected-box thumb-box` : `thumb-box`"
|
||||
'type': 'normal', 'bigObj': item, 'smallObj': item1
|
||||
})" v-else :class="submitData[item.name] === item1.id ? `selected-box thumb-box` : `thumb-box`"
|
||||
v-for="(item1, index1) in item.data" :key="index1">
|
||||
<view class="item-menu-name">{{ item1.name }}</view>
|
||||
</view>
|
||||
@@ -46,7 +51,7 @@
|
||||
</view>
|
||||
<view class="buttonWrapper">
|
||||
<view class="cancelButton" @click="closePopUp">取消</view>
|
||||
<view class="sureButton" @click="subMitPopUp({submitData,areaModal,industryModal})">确定</view>
|
||||
<view :class="canSubmit ? `sureButton` : `noSubMitButton sureButton`" @click="subMitFunc">确定</view>
|
||||
</view>
|
||||
<!-- 省市 -->
|
||||
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
||||
@@ -98,17 +103,19 @@ export default {
|
||||
title: 'Hello',
|
||||
// indexs: [0, 0, 8],
|
||||
// defaultIds: [1, 110000, 110106],
|
||||
defaultNames: ['北京市', '北京市', '东城区'],
|
||||
labelName: "areaName"
|
||||
|
||||
defaultNames: ['四川省', '德阳市', '旌阳区'],
|
||||
labelName: "areaName",
|
||||
isClickAddress: false,
|
||||
},
|
||||
industryModal: {
|
||||
industry: "",
|
||||
industryList: [[]],
|
||||
industryShow: false,
|
||||
isClickIndustry: false,
|
||||
},
|
||||
|
||||
submitData: {},
|
||||
canSubmit: false,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -258,12 +265,17 @@ export default {
|
||||
})
|
||||
},
|
||||
clickFunc({ type, bigObj, smallObj }) {
|
||||
this.canSubmit = true;
|
||||
switch (type) {
|
||||
case "industry":
|
||||
this.industryModal.industryShow = true;
|
||||
this.industryModal.isClickIndustry = true;
|
||||
this.$set(this.industryModal, 'isClickIndustry', true);
|
||||
break;
|
||||
case "address":
|
||||
this.areaModal.addressShow = true
|
||||
this.areaModal.addressShow = true;
|
||||
// this.areaModal.isClickAddress=true;
|
||||
this.$set(this.areaModal, 'isClickAddress', true);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -290,17 +302,30 @@ export default {
|
||||
},
|
||||
|
||||
confirmAddress(val) {
|
||||
console.log(val);
|
||||
console.log(val, "点击地址");
|
||||
var valArr = val.value;
|
||||
this.areaModal.address = [...new Set(val.value)].join(' / ')
|
||||
this.areaModal.address1 = valArr
|
||||
console.log(this.areaModal.address);
|
||||
this.areaModal.addressShow = false
|
||||
},
|
||||
pickerIndustryFunc(val) {
|
||||
console.log(val);
|
||||
console.log(val, "点击行业");
|
||||
this.industryModal.industry = val.value[0].name;
|
||||
this.industryModal.industryShow = false
|
||||
},
|
||||
|
||||
subMitFunc(val) {
|
||||
if (!this.canSubmit) return;
|
||||
|
||||
if (!this.areaModal.isClickAddress) {
|
||||
// this.areaModal.address1 = [null, null, null];
|
||||
this.areaModal.address1 = ["", "", ""];
|
||||
}
|
||||
if (!this.industryModal.isClickIndustry) {
|
||||
this.industryModal.industry = "";
|
||||
}
|
||||
console.log(this.submitData, this.areaModal, this.industryModal);
|
||||
this.subMitPopUp({ submitData: this.submitData, areaModal: this.areaModal, industryModal: this.industryModal })
|
||||
}
|
||||
|
||||
|
||||
@@ -472,4 +497,9 @@ export default {
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.noSubMitButton {
|
||||
background-color: #f3f4f8;
|
||||
color: #9b9b9b;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user