|
@@ -1,29 +1,42 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="tab">
|
|
|
- <u-tabs :list="tab" :current="current" @click="click"></u-tabs>
|
|
|
+ <u-tabs :list="type" @click="click($event, 'type')"></u-tabs>
|
|
|
</view>
|
|
|
- <view class="main">
|
|
|
- <view class="position">
|
|
|
- <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
|
- <view class="top">
|
|
|
- <view class="title omit">{{ item.title }}</view>
|
|
|
- <view class="op">
|
|
|
- <text class="icon"></text>
|
|
|
- <text>审核中</text>
|
|
|
- </view>
|
|
|
+ <view class="position">
|
|
|
+ <view class="audits">
|
|
|
+ <view class="audit" :class="{ active: current == index }" v-for="(item, index) in audit" :key="index" @click="click({ index: index }, 'audit')">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
|
+ <view class="top">
|
|
|
+ <view class="title omit">{{ item.title }}</view>
|
|
|
+ <view class="audit" v-if="item.audit == 0">
|
|
|
+ <text class="icon"></text>
|
|
|
+ <text>审核中</text>
|
|
|
+ </view>
|
|
|
+ <view class="audit" style="color: #4caf50" v-if="item.audit == 1">
|
|
|
+ <text class="icon"></text>
|
|
|
+ <text>审核通过</text>
|
|
|
</view>
|
|
|
- <view class="desc">
|
|
|
- <text class="tag">{{ item.experience == '不限' ? '经验不限' : item.experience }}</text>
|
|
|
- <text class="tag">{{ item.salary }}</text>
|
|
|
+ <view class="audit" v-if="item.audit == 2">
|
|
|
+ <text class="icon"></text>
|
|
|
+ <text>审核不通过</text>
|
|
|
</view>
|
|
|
- <view class="date">{{ item.createTime }}</view>
|
|
|
</view>
|
|
|
- <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
|
- <u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
|
+ <view class="desc">
|
|
|
+ <text class="state" :style="{ color: item.state == 0 ? '#4CAF50' : '#F44336' }">{{ item.state == 0 ? '已启用' : '已关闭' }}</text>
|
|
|
+ <text class="tag">发布于:{{ item.createTime }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex">
|
|
|
+ <view class="f br">简历</view>
|
|
|
+ <view class="f br" @click.stop="manageState(item)">{{ item.state == 0 ? '关闭' : '启用' }}</view>
|
|
|
+ <view class="f danger" @click.stop="manageRemove(item)">删除</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
|
+ <u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
|
</view>
|
|
|
- <u-action-sheet round="20" :actions="actions" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
|
|
|
+ <u-action-sheet round="20" :actions="type" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
|
|
|
<view class="mfooter">
|
|
|
<button class="btn" @click="show = true">
|
|
|
<text class="icon"></text>
|
|
@@ -37,17 +50,21 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- user: this.getUser(),
|
|
|
- tab: [{ name: '全职' }, { name: '兼职' }],
|
|
|
+ type: [
|
|
|
+ { name: '全职', value: 0 },
|
|
|
+ { name: '兼职', value: 1 }
|
|
|
+ ],
|
|
|
+ audit: [
|
|
|
+ { name: '全部', value: '' },
|
|
|
+ { name: '待审核', value: 0 },
|
|
|
+ { name: '审核通过', value: 1 },
|
|
|
+ { name: '未通过', value: 2 }
|
|
|
+ ],
|
|
|
+ current: 0,
|
|
|
list: [],
|
|
|
- param: { pageNum: 1, pageSize: 10, types: '全职', orderByColumn: 'createTime', isAsc: 'desc' },
|
|
|
+ param: { pageNum: 1, pageSize: 10, type: 0 },
|
|
|
loadMore: true,
|
|
|
- show: false,
|
|
|
- current: 0,
|
|
|
- actions: [
|
|
|
- { name: '全职', type: 0 },
|
|
|
- { name: '兼职', type: 1 }
|
|
|
- ]
|
|
|
+ show: false
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
@@ -68,15 +85,54 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- select(item) {
|
|
|
- this.param.types = item;
|
|
|
+ click(e, tag) {
|
|
|
+ this.param[tag] = this[tag][e.index].value;
|
|
|
+ if (tag == 'audit') {
|
|
|
+ this.current = e.index;
|
|
|
+ }
|
|
|
this.refresh();
|
|
|
},
|
|
|
+ selectClick(e) {
|
|
|
+ uni.navigateTo({ url: '/pages/job/position/manage/push?type=' + e.value });
|
|
|
+ },
|
|
|
detail(item) {
|
|
|
uni.navigateTo({ url: '/pages/job/position/manage/push?id=' + item.id });
|
|
|
},
|
|
|
- selectClick(e) {
|
|
|
- uni.navigateTo({ url: '/pages/job/position/manage/push?type=' + e.type });
|
|
|
+ manageState(item) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: item.state == 0 ? '确定关闭该职位' : '确定启用该职位',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.http.request({
|
|
|
+ url: '/app/position/manage/state',
|
|
|
+ data: { id: item.id, state: item.state == 0 ? 1 : 0 },
|
|
|
+ method: 'POST',
|
|
|
+ success: (res) => {
|
|
|
+ uni.showToast({ title: '操作成功' });
|
|
|
+ item.state = item.state == 0 ? 1 : 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ manageRemove(item) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定删除该职位?删除后包括已投递简历也全部清除',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.http.request({
|
|
|
+ url: '/app/position/manage/remove/' + item.id,
|
|
|
+ success: (res) => {
|
|
|
+ uni.showToast({ title: '删除成功' });
|
|
|
+ this.list.splice(this.list.indexOf(item), 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
//刷新数据
|
|
|
refresh() {
|