优化招聘页面筛选功能
This commit is contained in:
@@ -16,14 +16,20 @@
|
|||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view @click="clickFunc({ 'type': 'address' })" v-if="item.name === `区域`"
|
<view class="thumb-box thumb-box1" @click="clickFunc({ 'type': 'address' })"
|
||||||
class="thumb-box thumb-box1">
|
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-group>
|
||||||
<u-cell icon="map" :title="areaModal.address" :isLink="true"
|
<u-cell icon="map" :title="areaModal.address" :isLink="true"
|
||||||
arrow-direction="down"></u-cell>
|
arrow-direction="down"></u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</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">
|
class="thumb-box thumb-box1">
|
||||||
<u-cell-group>
|
<u-cell-group>
|
||||||
<u-cell icon="calendar" :title="industryModal.industry" :isLink="true"
|
<u-cell icon="calendar" :title="industryModal.industry" :isLink="true"
|
||||||
@@ -32,8 +38,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view @click="clickFunc({
|
<view @click="clickFunc({
|
||||||
'type': 'normal', 'bigObj': item, 'smallObj': item1
|
'type': 'normal', 'bigObj': item, 'smallObj': item1
|
||||||
})" v-else
|
})" v-else :class="submitData[item.name] === item1.id ? `selected-box thumb-box` : `thumb-box`"
|
||||||
:class="submitData[item.name] === item1.id ? `selected-box thumb-box` : `thumb-box`"
|
|
||||||
v-for="(item1, index1) in item.data" :key="index1">
|
v-for="(item1, index1) in item.data" :key="index1">
|
||||||
<view class="item-menu-name">{{ item1.name }}</view>
|
<view class="item-menu-name">{{ item1.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -46,7 +51,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="buttonWrapper">
|
<view class="buttonWrapper">
|
||||||
<view class="cancelButton" @click="closePopUp">取消</view>
|
<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>
|
</view>
|
||||||
<!-- 省市 -->
|
<!-- 省市 -->
|
||||||
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
||||||
@@ -98,17 +103,19 @@ export default {
|
|||||||
title: 'Hello',
|
title: 'Hello',
|
||||||
// indexs: [0, 0, 8],
|
// indexs: [0, 0, 8],
|
||||||
// defaultIds: [1, 110000, 110106],
|
// defaultIds: [1, 110000, 110106],
|
||||||
defaultNames: ['北京市', '北京市', '东城区'],
|
defaultNames: ['四川省', '德阳市', '旌阳区'],
|
||||||
labelName: "areaName"
|
labelName: "areaName",
|
||||||
|
isClickAddress: false,
|
||||||
},
|
},
|
||||||
industryModal: {
|
industryModal: {
|
||||||
industry: "",
|
industry: "",
|
||||||
industryList: [[]],
|
industryList: [[]],
|
||||||
industryShow: false,
|
industryShow: false,
|
||||||
|
isClickIndustry: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
submitData: {},
|
submitData: {},
|
||||||
|
canSubmit: false,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -258,12 +265,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
clickFunc({ type, bigObj, smallObj }) {
|
clickFunc({ type, bigObj, smallObj }) {
|
||||||
|
this.canSubmit = true;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "industry":
|
case "industry":
|
||||||
this.industryModal.industryShow = true;
|
this.industryModal.industryShow = true;
|
||||||
|
this.industryModal.isClickIndustry = true;
|
||||||
|
this.$set(this.industryModal, 'isClickIndustry', true);
|
||||||
break;
|
break;
|
||||||
case "address":
|
case "address":
|
||||||
this.areaModal.addressShow = true
|
this.areaModal.addressShow = true;
|
||||||
|
// this.areaModal.isClickAddress=true;
|
||||||
|
this.$set(this.areaModal, 'isClickAddress', true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -290,17 +302,30 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
confirmAddress(val) {
|
confirmAddress(val) {
|
||||||
console.log(val);
|
console.log(val, "点击地址");
|
||||||
var valArr = val.value;
|
var valArr = val.value;
|
||||||
this.areaModal.address = [...new Set(val.value)].join(' / ')
|
this.areaModal.address = [...new Set(val.value)].join(' / ')
|
||||||
this.areaModal.address1 = valArr
|
this.areaModal.address1 = valArr
|
||||||
console.log(this.areaModal.address);
|
|
||||||
this.areaModal.addressShow = false
|
this.areaModal.addressShow = false
|
||||||
},
|
},
|
||||||
pickerIndustryFunc(val) {
|
pickerIndustryFunc(val) {
|
||||||
console.log(val);
|
console.log(val, "点击行业");
|
||||||
this.industryModal.industry = val.value[0].name;
|
this.industryModal.industry = val.value[0].name;
|
||||||
this.industryModal.industryShow = false
|
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;
|
color: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noSubMitButton {
|
||||||
|
background-color: #f3f4f8;
|
||||||
|
color: #9b9b9b;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -175,9 +175,16 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad: function () {
|
onLoad: function () {
|
||||||
this.getData()
|
this.getData()
|
||||||
this.getPolicy()
|
// this.getPolicy()
|
||||||
},
|
},
|
||||||
onShow: function () {
|
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) {
|
if (this.$store.state.user.token) {
|
||||||
this.$store.dispatch('refreshAuthState').then((e) => {
|
this.$store.dispatch('refreshAuthState').then((e) => {
|
||||||
var auth = this.$store.state.auth
|
var auth = this.$store.state.auth
|
||||||
@@ -271,6 +278,29 @@ export default {
|
|||||||
url: '../mapSeach/mapSeach'
|
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() {
|
getPolicy() {
|
||||||
let params = {
|
let params = {
|
||||||
@@ -300,10 +330,6 @@ export default {
|
|||||||
// this.policyContentList=res.data.data.records
|
// this.policyContentList=res.data.data.records
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
changeTab: function (e) {
|
|
||||||
this.isSearch = false;
|
|
||||||
this.activeTab = e;
|
|
||||||
},
|
|
||||||
//推荐岗位;
|
//推荐岗位;
|
||||||
getNearList: function (point) {
|
getNearList: function (point) {
|
||||||
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
|
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 () {
|
getNewList: function () {
|
||||||
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
|
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
|
||||||
@@ -385,7 +382,6 @@ export default {
|
|||||||
if (this.isSearch) {
|
if (this.isSearch) {
|
||||||
this.getNearListSearch();
|
this.getNearListSearch();
|
||||||
} else {
|
} else {
|
||||||
// this.getRecommendList();
|
|
||||||
this.getNearList();
|
this.getNearList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -426,8 +422,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.activeTab === 1) {
|
if (this.activeTab === 1) {
|
||||||
// this.recommendPage.current = 1;
|
|
||||||
// this.getRecommendList();
|
|
||||||
this.nearPage.current === 1
|
this.nearPage.current === 1
|
||||||
this.getNearList();
|
this.getNearList();
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -452,13 +446,12 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
uni.$emit('newsReadChange');
|
uni.$emit('newsReadChange');
|
||||||
this.nearPage.current = 1;
|
this.nearPage.current = 1;
|
||||||
this.recommendPage.current = 1;
|
this.policyPage.current = 1;
|
||||||
this.newPage.current = 1;
|
this.newPage.current = 1;
|
||||||
this.getLocation();
|
this.getLocation();
|
||||||
// this.getRecommendList();
|
// this.getNewList();
|
||||||
this.getNewList();
|
// this.getNearList();
|
||||||
this.getNearList();
|
// this.getPolicy()
|
||||||
this.getPolicy()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -468,6 +461,7 @@ export default {
|
|||||||
},
|
},
|
||||||
subMitPopUp({ submitData, areaModal, industryModal }) {
|
subMitPopUp({ submitData, areaModal, industryModal }) {
|
||||||
this.searchData = { submitData, areaModal, industryModal }
|
this.searchData = { submitData, areaModal, industryModal }
|
||||||
|
console.log(this.searchData,'------');
|
||||||
if (submitData || areaModal || industryModal) {
|
if (submitData || areaModal || industryModal) {
|
||||||
this.isSearch = true;
|
this.isSearch = true;
|
||||||
}
|
}
|
||||||
@@ -496,17 +490,14 @@ export default {
|
|||||||
//个体户招工搜索;
|
//个体户招工搜索;
|
||||||
getPolicySearch: function () {
|
getPolicySearch: function () {
|
||||||
const { submitData, areaModal, industryModal } = this.searchData;
|
const { submitData, areaModal, industryModal } = this.searchData;
|
||||||
|
|
||||||
nearMissionSearch(this.policyPage.current, this.policyPage.size, submitData["学历"],
|
nearMissionSearch(this.policyPage.current, this.policyPage.size, submitData["学历"],
|
||||||
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
|
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
|
||||||
).then(res => {
|
).then(res => {
|
||||||
//
|
|
||||||
if (this.policyPage.current === 1) {
|
if (this.policyPage.current === 1) {
|
||||||
this.policyContentList = [];
|
this.policyContentList = [];
|
||||||
}
|
}
|
||||||
this.policyPage.current += 1;
|
this.policyPage.current += 1;
|
||||||
this.policyPage.total = res.data.data.total;
|
this.policyPage.total = res.data.data.total;
|
||||||
//
|
|
||||||
if (res.data.data && res.data.data.records.length) {
|
if (res.data.data && res.data.data.records.length) {
|
||||||
this.policyContentList = this.policyContentList.concat(res.data.data.records);
|
this.policyContentList = this.policyContentList.concat(res.data.data.records);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user