优化招聘页面筛选功能

This commit is contained in:
dengxin
2024-03-27 15:42:04 +08:00
parent e0bbebd639
commit d158e02699
2 changed files with 80 additions and 59 deletions

View File

@@ -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);
}