2024-03-08 16:54:13 +08:00
|
|
|
|
<template>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
<view class="app_container">
|
2024-03-08 16:54:13 +08:00
|
|
|
|
<CustomNavbar @back="back" :titke="'招工列表'"></CustomNavbar>
|
|
|
|
|
|
<view class="guide">
|
2024-03-09 15:45:03 +08:00
|
|
|
|
<view class="guide_content" v-for="(item, index) in arrGuide" :key="index">
|
|
|
|
|
|
<view class="guide_item"> {{item}} </view>
|
|
|
|
|
|
<view class="guide_arrow" v-if="index !== arrGuide.length - 1">》</view>
|
2024-03-08 16:54:13 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
<view class="condition">
|
|
|
|
|
|
<view class="cond_list" v-if="pageType === 'enterprise'">
|
|
|
|
|
|
<view v-for="(item, index) in arrTitle" :key="index"
|
|
|
|
|
|
:class="['cond_item', index === currentArrTitleID ? 'activeButton' : '']"
|
|
|
|
|
|
@click="changeTab(item)">
|
|
|
|
|
|
{{ item.text }}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cond_list" v-else>
|
2024-03-13 17:36:43 +08:00
|
|
|
|
<view style="font-weight: 700;">个体户招工</view>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="cond_item item_com"
|
|
|
|
|
|
@click="openPicker = true"
|
|
|
|
|
|
>{{ reviewStatus[currentReviewStatusID] }}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="container" v-if="dataSource.length">
|
|
|
|
|
|
<block v-for="(item, index) in dataSource" :key="item.id">
|
|
|
|
|
|
<userrecruitList :companyitem="item"></userrecruitList>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<empty v-else content="暂无数据" mr-top="200"></empty>
|
2024-03-08 16:54:13 +08:00
|
|
|
|
<CustomTabbar :currentpage="0"></CustomTabbar>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
<u-picker :show="openPicker" :columns="pickerColumns" @cancel="openPicker = false" @confirm="changeReviewStatus"></u-picker>
|
2024-03-08 16:54:13 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
import CustomNavbar from '@/components/CustomNavbar/navbar.vue';
|
|
|
|
|
|
import CustomTabbar from '@/components/CustomTabbar/custom_tabbar.vue';
|
|
|
|
|
|
import { getuserrecruitListApp } from '@/api/userrecruit.js'
|
|
|
|
|
|
import userrecruitList from '../components/userrecruitList.vue'
|
2024-03-10 15:37:16 +08:00
|
|
|
|
let arrGuide = ['在线填写招工需求', '后台审核沟通发布', '平台展示招工信息'];
|
2024-03-09 15:45:03 +08:00
|
|
|
|
let arrTitle = [
|
|
|
|
|
|
{
|
2024-04-08 22:34:15 +08:00
|
|
|
|
text: "发布零工任务",
|
2024-03-09 15:45:03 +08:00
|
|
|
|
id: 0
|
|
|
|
|
|
}, {
|
2024-04-15 20:56:55 +08:00
|
|
|
|
text: "发布岗位",
|
2024-03-09 15:45:03 +08:00
|
|
|
|
id: 1
|
|
|
|
|
|
}
|
2024-03-13 11:03:46 +08:00
|
|
|
|
// , {
|
2024-03-13 17:36:43 +08:00
|
|
|
|
// text: "个体户招工",
|
2024-03-13 11:03:46 +08:00
|
|
|
|
// id: 2
|
|
|
|
|
|
// }
|
2024-03-09 15:45:03 +08:00
|
|
|
|
];
|
|
|
|
|
|
let reviewStatus = {
|
|
|
|
|
|
'-1': '全部',
|
|
|
|
|
|
'0': "待审",
|
|
|
|
|
|
'1': "已审",
|
|
|
|
|
|
'9': "驳回",
|
|
|
|
|
|
};
|
|
|
|
|
|
let pickerColumns = [Object.values(reviewStatus)]
|
2024-03-09 15:59:45 +08:00
|
|
|
|
import { mapState } from 'vuex'
|
2024-03-08 16:54:13 +08:00
|
|
|
|
export default {
|
2024-03-09 15:45:03 +08:00
|
|
|
|
components: {CustomTabbar, CustomNavbar, userrecruitList},
|
2024-03-08 16:54:13 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-03-09 15:45:03 +08:00
|
|
|
|
pageType: null, // null: 个人 enterprise: 企业
|
|
|
|
|
|
arrGuide,
|
|
|
|
|
|
arrTitle,
|
|
|
|
|
|
reviewStatus,
|
|
|
|
|
|
pickerColumns,
|
|
|
|
|
|
openPicker: false,
|
|
|
|
|
|
currentArrTitleID: 2,
|
|
|
|
|
|
currentReviewStatusID: '-1',
|
|
|
|
|
|
pageNumber: 1,
|
|
|
|
|
|
dataSource: [],
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad({type}) {
|
2024-03-09 15:59:45 +08:00
|
|
|
|
if(this.enterprise){
|
2024-03-09 15:45:03 +08:00
|
|
|
|
this.pageType = 'enterprise'
|
|
|
|
|
|
this.currentArrTitleID = 0
|
2024-03-08 16:54:13 +08:00
|
|
|
|
}
|
2024-03-09 15:45:03 +08:00
|
|
|
|
this.getList('refresh')
|
|
|
|
|
|
},
|
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
this.getList('add')
|
2024-03-08 16:54:13 +08:00
|
|
|
|
},
|
2024-03-09 15:59:45 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
...mapState({enterprise: (state) => state.user.seeEnterprise}),
|
|
|
|
|
|
},
|
2024-03-08 16:54:13 +08:00
|
|
|
|
methods: {
|
2024-03-09 15:45:03 +08:00
|
|
|
|
changeReviewStatus({value, index, values}) {
|
|
|
|
|
|
const val = Object.keys(reviewStatus).filter((item) => reviewStatus[item] === value[0])[0]
|
|
|
|
|
|
this.currentReviewStatusID = val
|
|
|
|
|
|
this.openPicker = false
|
|
|
|
|
|
this.getList('refresh')
|
|
|
|
|
|
},
|
|
|
|
|
|
changeTab(item) {
|
|
|
|
|
|
this.currentArrTitleID = item.id
|
|
|
|
|
|
this.getList('refresh')
|
|
|
|
|
|
},
|
2024-03-08 16:54:13 +08:00
|
|
|
|
back() {
|
2024-03-09 15:45:03 +08:00
|
|
|
|
uni.reLaunch({ url: '/pages/my/my' })
|
|
|
|
|
|
},
|
|
|
|
|
|
async getList(type = "add") {
|
|
|
|
|
|
if (type === "refresh") {
|
|
|
|
|
|
this.dataSource = [];
|
|
|
|
|
|
this.pageNumber = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
current: this.pageNumber,
|
|
|
|
|
|
size: 10,
|
|
|
|
|
|
jobType: this.currentArrTitleID,
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.currentReviewStatusID !== '-1') {
|
|
|
|
|
|
params.reviewState = this.currentReviewStatusID
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.showLoading({title: '加载中...' })
|
|
|
|
|
|
let resData = await getuserrecruitListApp(params);
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
if (resData.data?.code === 200) {
|
|
|
|
|
|
const { records, total, page, size } = resData.data.data;
|
|
|
|
|
|
if (!records.length) {
|
|
|
|
|
|
return this.$api.msg("没有更多数据");
|
|
|
|
|
|
}
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
|
case "add":
|
|
|
|
|
|
this.dataSource = [...this.dataSource, ...records];
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "refresh":
|
|
|
|
|
|
this.dataSource = records;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.pageNumber += 1;
|
|
|
|
|
|
}
|
2024-03-08 16:54:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2024-03-09 15:45:03 +08:00
|
|
|
|
|
|
|
|
|
|
.app_container{
|
|
|
|
|
|
background-color: #f3f4f8;
|
|
|
|
|
|
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
|
|
|
|
|
.container{
|
|
|
|
|
|
padding: 0 23rpx;
|
|
|
|
|
|
padding-bottom: calc(env(safe-area-inset-bottom) + 123rpx)
|
|
|
|
|
|
}
|
|
|
|
|
|
.condition{
|
2024-03-08 16:54:13 +08:00
|
|
|
|
display: flex;
|
2024-03-09 15:45:03 +08:00
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
position: sticky;
|
|
|
|
|
|
top: 78rpx;
|
|
|
|
|
|
z-index: 999;
|
|
|
|
|
|
background-color: #f3f4f8;
|
|
|
|
|
|
.cond_list{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
flex: 1;
|
2024-03-13 11:03:46 +08:00
|
|
|
|
// justify-content: space-between;
|
2024-03-09 15:45:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
.cond_item{
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
padding: 10rpx 40rpx;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
border-radius: 50px;
|
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.activeButton {
|
|
|
|
|
|
color: #4171f9;
|
|
|
|
|
|
background-color: #cfdaf8;
|
2024-03-08 16:54:13 +08:00
|
|
|
|
}
|
2024-03-09 15:45:03 +08:00
|
|
|
|
.item_com{
|
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
|
padding: 10rpx 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.guide{
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
background-color: #4071f8;
|
|
|
|
|
|
.guide_content{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
.guide_item{
|
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
background-color: rgba(76, 120, 249, 1);
|
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.guide_arrow{
|
|
|
|
|
|
margin-left: 40rpx;
|
|
|
|
|
|
}
|
2024-03-08 16:54:13 +08:00
|
|
|
|
}
|
2024-03-09 15:45:03 +08:00
|
|
|
|
|
2024-03-08 16:54:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-03-09 15:45:03 +08:00
|
|
|
|
|
2024-03-08 16:54:13 +08:00
|
|
|
|
</style>
|