优化招聘页面筛选功能
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"
|
||||
@@ -32,8 +38,7 @@
|
||||
</view>
|
||||
<view @click="clickFunc({
|
||||
'type': 'normal', 'bigObj': item, 'smallObj': item1
|
||||
})" v-else
|
||||
:class="submitData[item.name] === item1.id ? `selected-box thumb-box` : `thumb-box`"
|
||||
})" 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>
|
||||
|
||||
@@ -175,9 +175,16 @@ export default {
|
||||
},
|
||||
onLoad: function () {
|
||||
this.getData()
|
||||
this.getPolicy()
|
||||
// this.getPolicy()
|
||||
},
|
||||
onShow: function () {
|
||||
switch (this.activeTab) {
|
||||
case 0: this.getNewList(); break;
|
||||
case 1: this.getNearList(); break;
|
||||
case 2: this.getPolicy(); break;
|
||||
default: this.getNewList(); break;
|
||||
}
|
||||
|
||||
if (this.$store.state.user.token) {
|
||||
this.$store.dispatch('refreshAuthState').then((e) => {
|
||||
var auth = this.$store.state.auth
|
||||
@@ -271,6 +278,29 @@ export default {
|
||||
url: '../mapSeach/mapSeach'
|
||||
})
|
||||
},
|
||||
|
||||
changeTab: function (e) {
|
||||
this.isSearch = false;
|
||||
this.activeTab = e;
|
||||
},
|
||||
|
||||
goPolicyInfo(data) {
|
||||
if (data) {
|
||||
// var val=encodeURIComponent(data)
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/policyContent?id=${data}`
|
||||
})
|
||||
|
||||
}
|
||||
else {
|
||||
// uni.showToast({
|
||||
// title:'暂无内容',
|
||||
// icon:'none'
|
||||
// })
|
||||
}
|
||||
},
|
||||
|
||||
//个人户招工;
|
||||
getPolicy() {
|
||||
let params = {
|
||||
@@ -300,10 +330,6 @@ export default {
|
||||
// this.policyContentList=res.data.data.records
|
||||
// })
|
||||
},
|
||||
changeTab: function (e) {
|
||||
this.isSearch = false;
|
||||
this.activeTab = e;
|
||||
},
|
||||
//推荐岗位;
|
||||
getNearList: function (point) {
|
||||
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
|
||||
@@ -317,36 +343,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
goPolicyInfo(data) {
|
||||
if (data) {
|
||||
// var val=encodeURIComponent(data)
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/policyContent?id=${data}`
|
||||
})
|
||||
|
||||
}
|
||||
else {
|
||||
// uni.showToast({
|
||||
// title:'暂无内容',
|
||||
// icon:'none'
|
||||
// })
|
||||
}
|
||||
},
|
||||
|
||||
// getRecommendList: function () {
|
||||
// recommendMission(this.recommendPage.current, this.recommendPage.size, '').then(res => {
|
||||
// if (this.recommendPage.current === 1) {
|
||||
// this.recommendList = [];
|
||||
// }
|
||||
|
||||
// this.recommendPage.current += 1;
|
||||
// this.recommendPage.total = res.data.data.total;
|
||||
// if (res.data.data && res.data.data.records.length) {
|
||||
// this.recommendList = this.recommendList.concat(res.data.data.records);
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//推荐任务;
|
||||
getNewList: function () {
|
||||
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
|
||||
@@ -385,7 +382,6 @@ export default {
|
||||
if (this.isSearch) {
|
||||
this.getNearListSearch();
|
||||
} else {
|
||||
// this.getRecommendList();
|
||||
this.getNearList();
|
||||
}
|
||||
} else {
|
||||
@@ -426,8 +422,6 @@ export default {
|
||||
return
|
||||
}
|
||||
if (this.activeTab === 1) {
|
||||
// this.recommendPage.current = 1;
|
||||
// this.getRecommendList();
|
||||
this.nearPage.current === 1
|
||||
this.getNearList();
|
||||
setTimeout(function () {
|
||||
@@ -452,13 +446,12 @@ export default {
|
||||
} else {
|
||||
uni.$emit('newsReadChange');
|
||||
this.nearPage.current = 1;
|
||||
this.recommendPage.current = 1;
|
||||
this.policyPage.current = 1;
|
||||
this.newPage.current = 1;
|
||||
this.getLocation();
|
||||
// this.getRecommendList();
|
||||
this.getNewList();
|
||||
this.getNearList();
|
||||
this.getPolicy()
|
||||
// this.getNewList();
|
||||
// this.getNearList();
|
||||
// this.getPolicy()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -468,6 +461,7 @@ export default {
|
||||
},
|
||||
subMitPopUp({ submitData, areaModal, industryModal }) {
|
||||
this.searchData = { submitData, areaModal, industryModal }
|
||||
console.log(this.searchData,'------');
|
||||
if (submitData || areaModal || industryModal) {
|
||||
this.isSearch = true;
|
||||
}
|
||||
@@ -496,17 +490,14 @@ export default {
|
||||
//个体户招工搜索;
|
||||
getPolicySearch: function () {
|
||||
const { submitData, areaModal, industryModal } = this.searchData;
|
||||
|
||||
nearMissionSearch(this.policyPage.current, this.policyPage.size, submitData["学历"],
|
||||
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
|
||||
).then(res => {
|
||||
//
|
||||
if (this.policyPage.current === 1) {
|
||||
this.policyContentList = [];
|
||||
}
|
||||
this.policyPage.current += 1;
|
||||
this.policyPage.total = res.data.data.total;
|
||||
//
|
||||
if (res.data.data && res.data.data.records.length) {
|
||||
this.policyContentList = this.policyContentList.concat(res.data.data.records);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user