招聘页面更新筛选功能

This commit is contained in:
dengxin
2024-03-26 21:19:45 +08:00
parent 10cf467473
commit 14498c5003
4 changed files with 275 additions and 120 deletions

View File

@@ -37,7 +37,7 @@ export const recMission = () => {
})
}
/*抢任务-附近任务*/
/*抢任务-推荐岗位*/
export const nearMission = (current, size, lat, lon, distance) => {
return request({
url: '/api/jobslink-api/user/userWork/getPushListByUserId',
@@ -67,7 +67,6 @@ export const recommendMission = (current, size, seaStr) => {
})
}
/*抢任务-最新任务*/
export const newMissionAll = (current, size, seaStr) => {
return request({
@@ -81,6 +80,47 @@ export const newMissionAll = (current, size, seaStr) => {
headers: getHeader()
})
}
/*抢任务-个体户招工*/
export const nearMissionSearch = (current, size, education,salary,industry,province,city) => {
return request({
url: '/api/jobslink-api/user/userWork/searchList',
method: 'get',
params: {
current,
size,
education,salary,industry,province,city
},
headers: getHeader()
})
}
/*抢任务-推荐任务*/
export const recommendMissionSearch = (current, size, education,salary,industry,province,city) => {
return request({
url: '/api/jobslink-api/missions/user/mission/searchList',
method: 'get',
params: {
current,
size,
education,salary,industry,province,city
},
headers: getHeader()
})
}
/*抢任务-推荐岗位*/
export const newMissionAllSearch = (current, size, education,salary,industry,province,city) => {
return request({
url: '/api/jobslink-api/user/userrecruit/searchList',
method: 'get',
params: {
current,
size,
education,salary,industry,province,city
},
headers: getHeader()
})
}
/*提交抢任务*/
export const submit = (missionNo,type) => {

View File

@@ -293,6 +293,7 @@ export default {
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
},

View File

@@ -15,7 +15,8 @@
<view class="typeButtonLeft">
<view v-for="(item, index) in nonReactiveArray" :key="index"
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{ item
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{
item
}}</view>
</view>
<!-- 筛选 -->
@@ -109,7 +110,10 @@ import userrecruitList from './userrecruitList.vue'
import {
newMissionAll,
recommendMission,
nearMission
nearMission,
newMissionAllSearch,
recommendMissionSearch,
nearMissionSearch,
} from '@/api/mission.js';
import { getPolicyContent } from '@/api/newIndex.js'
import { getPushListByUserId } from '@/api/userrecruit.js'
@@ -163,6 +167,8 @@ export default {
key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI',
open: false,
showPopUp: false,
isSearch: false,
searchData: {},
nonReactiveArray: ["推荐任务", "推荐岗位", "个体户招工"],
}
@@ -265,6 +271,7 @@ export default {
url: '../mapSeach/mapSeach'
})
},
//个人户招工;
getPolicy() {
let params = {
current: this.policyPage.current,
@@ -294,10 +301,12 @@ export default {
// })
},
changeTab: function (e) {
this.isSearch = false;
this.activeTab = e;
},
//附近任务;
getNearList: function (point) {
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
if (this.nearPage.current === 1) {
this.companyList = [];
@@ -305,6 +314,7 @@ export default {
this.nearPage.current += 1;
this.nearPage.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records);
}
})
@@ -325,20 +335,22 @@ export default {
// })
}
},
//推荐任务
//推荐岗位
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) {
debugger
this.recommendList = this.recommendList.concat(res.data.data.records);
}
})
},
//最新任务;
//推荐任务;
getNewList: function () {
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
if (this.newPage.current === 1) {
@@ -346,6 +358,7 @@ export default {
}
this.newPage.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.newList = this.newList.concat(res.data.data.records);
this.newPage.current += 1;
}
@@ -354,9 +367,13 @@ export default {
//上拉加载
upLoad: function () {
if (this.activeTab === 0) {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
// this.getNearList(this.currentPoint);
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
if (this.isSearch) {
this.getNewListSearch()
} else {
this.getNewList();
}
} else {
uni.showToast({
icon: "none",
@@ -366,8 +383,14 @@ export default {
return
}
if (this.activeTab === 1) {
if (this.recommendPage.current <= Math.ceil(this.recommendPage.total / this.recommendPage.size)) {
this.getRecommendList();
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
if (this.isSearch) {
this.getNearListSearch();
} else {
// this.getRecommendList();
this.getNearList();
}
} else {
uni.showToast({
icon: "none",
@@ -377,11 +400,24 @@ export default {
return
}
if (this.activeTab === 2) {
this.getPolicy()
if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage.size)) {
if (this.isSearch) {
this.getPolicySearch()
} else {
this.getPolicy();
}
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
},
//下拉刷新
download: function () {
this.isSearch = false;
if (this.activeTab === 0) {
this.nearPage.current = 1;
this.newPage.current = 1;
@@ -393,8 +429,10 @@ export default {
return
}
if (this.activeTab === 1) {
this.recommendPage.current = 1;
this.getRecommendList();
// this.recommendPage.current = 1;
// this.getRecommendList();
this.nearPage.current === 1
this.getNearList();
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
@@ -431,9 +469,85 @@ export default {
this.showPopUp = false
},
subMitPopUp({ submitData, areaModal, industryModal }) {
console.log(submitData,areaModal,industryModal,"------确定");
this.showPopUp = false
this.searchData = { submitData, areaModal, industryModal }
if (submitData || areaModal || industryModal) {
this.isSearch = true;
}
switch (this.activeTab) {
case 0:
this.newPage.current = 1;
this.getNewListSearch()
break;
case 1:
this.nearPage.current = 1
this.getNearListSearch()
break;
case 2:
this.policyPage.current = 1
this.getPolicySearch()
break;
default:
break;
}
this.showPopUp = false
},
//个体户招工搜索;
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);
}
})
},
//推荐岗位搜索;
getNearListSearch: function () {
const { submitData, areaModal, industryModal } = this.searchData;
newMissionAllSearch(this.nearPage.current, this.nearPage.size, submitData["学历"],
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
).then(res => {
if (this.nearPage.current === 1) {
this.companyList = [];
}
this.nearPage.current += 1;
this.nearPage.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records);
}
})
},
//推荐任务搜索;
getNewListSearch: function () {
const { submitData, areaModal, industryModal } = this.searchData;
recommendMissionSearch(this.newPage.current, this.newPage.size, submitData["学历"],
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
).then(res => {
if (this.newPage.current === 1) {
this.newList = [];
}
this.newPage.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.newList = this.newList.concat(res.data.data.records);
this.newPage.current += 1;
}
})
},
}
}
</script>
@@ -444,10 +558,12 @@ export default {
display: flex;
align-item: center;
font-size: 26rpx;
.positionText {
margin: 0 10rpx;
}
}
.titleSearch {
display: flex;
width: 80%;

View File

@@ -2,25 +2,23 @@ module.exports = {
devServer: {
port: 1887,
proxy: {
'/api': {
// target: 'http://192.168.3.108:8000', // 本地服务接口地址
// target: 'http://192.168.3.112:8000', // 本地服务接口地址
// target: 'http://10.165.0.173:8000', // 本地服务接口地址
target: 'http://192.168.1.106:8000', // 本地服务接口地址
// target: 'http://192.168.3.120:8000', // 本地服务接口地址
"/api": {
// target: 'http://192.168.1.106:8000',
// target: 'http://192.168.1.109:8000',
target: "http://10.165.0.173:80",
ws: true,
pathRewrite: {
'^/api': '/'
}
// pathRewrite: {
// "^/api": "/",
// },
},
'/qq/map': {
"/qq/map": {
//本地服务接口地址
target: 'https://apis.map.qq.com',
target: "https://apis.map.qq.com",
ws: true,
pathRewrite: {
'^/qq/map': '/'
}
}
}
}
"^/qq/map": "/",
},
},
},
},
};