|
@@ -1,31 +1,18 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="position">
|
|
|
- <view class="item" v-for="(item, index) in list" :key="index" @click="go('/pages/job/position/manage/full_time_push?id=' + item.id)">
|
|
|
- <view class="top">
|
|
|
- <view class="title omit">
|
|
|
- <text class="icon" :style="{ color: item.state == 0 ? '#4CAF50' : '#545555' }"></text>
|
|
|
- <text>{{ item.title }}</text>
|
|
|
- </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="audit" v-if="item.audit == 2">
|
|
|
- <text class="icon"></text>
|
|
|
- <text>审核不通过</text>
|
|
|
- </view>
|
|
|
+ <view class="list">
|
|
|
+ <view class="item" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="left">
|
|
|
+ <text class="icon"></text>
|
|
|
</view>
|
|
|
- <view class="flex">
|
|
|
- <view class="f danger" @click.stop="manageRemove(item)">删除</view>
|
|
|
+ <view class="con">
|
|
|
+ <view class="date">{{ item.createTime }}</view>
|
|
|
+ <view class="del" @click="remove(item)">删除</view>
|
|
|
+ <images v-model="item.pic" :read="true"></images>
|
|
|
+ <view class="contents">{{ item.contents }}</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>
|
|
|
+ <u-empty v-if="list.length == 0"></u-empty>
|
|
|
</view>
|
|
|
<view class="mfooter">
|
|
|
<button class="btn" @click="show()">
|
|
@@ -33,7 +20,7 @@
|
|
|
<text>添加</text>
|
|
|
</button>
|
|
|
</view>
|
|
|
- <task ref="task" success="success()"></task>
|
|
|
+ <task ref="task" @confirm="confirm()"></task>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -42,28 +29,23 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
list: [],
|
|
|
- param: { pageNum: 1, pageSize: 10 },
|
|
|
- loadMore: true
|
|
|
+ param: {}
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
this.param.taskId = e.taskId;
|
|
|
this.getData();
|
|
|
- uni.$on('task_list', (res) => {
|
|
|
- this.refresh();
|
|
|
- });
|
|
|
},
|
|
|
methods: {
|
|
|
getData() {
|
|
|
this.http.request({
|
|
|
url: '/app/task/list',
|
|
|
data: this.param,
|
|
|
- loading: 'false',
|
|
|
success: (res) => {
|
|
|
- this.loadMore = res.data.pages > this.param.pageNum ? true : false;
|
|
|
- res.data.rows.forEach((item) => {
|
|
|
+ this.list = res.data.data;
|
|
|
+ this.list.forEach((item) => {
|
|
|
+ item.pic = item.pic.split(',');
|
|
|
item.createTime = uni.$u.timeFrom(Date.parse(item.createTime));
|
|
|
- this.list.push(item);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -71,14 +53,17 @@ export default {
|
|
|
show() {
|
|
|
this.$refs.task.init(this.param.taskId);
|
|
|
},
|
|
|
- manageRemove(item) {
|
|
|
+ confirm() {
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ remove(item) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '确定删除该职位?删除后包括已投递简历也全部清除',
|
|
|
+ content: '确定删除?',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
this.http.request({
|
|
|
- url: '/app/position/manage/remove/' + item.id,
|
|
|
+ url: '/app/task/remove/' + item.id,
|
|
|
success: (res) => {
|
|
|
uni.showToast({ title: '删除成功' });
|
|
|
this.list.splice(this.list.indexOf(item), 1);
|
|
@@ -87,30 +72,55 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
- //刷新数据
|
|
|
- refresh() {
|
|
|
- this.loadMore = true;
|
|
|
- this.param.pageNum = 1;
|
|
|
- this.list = [];
|
|
|
- this.getData();
|
|
|
- }
|
|
|
- },
|
|
|
- //下拉刷新
|
|
|
- onPullDownRefresh() {
|
|
|
- setTimeout(() => {
|
|
|
- this.refresh();
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
- //上拉加载
|
|
|
- onReachBottom() {
|
|
|
- if (this.loadMore) {
|
|
|
- this.param.pageNum++;
|
|
|
- this.getData();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss"></style>
|
|
|
+<style lang="scss">
|
|
|
+.list {
|
|
|
+ padding-top: 16px;
|
|
|
+ .item {
|
|
|
+ padding: 20px 15px 20px 20px;
|
|
|
+ display: flex;
|
|
|
+ .left {
|
|
|
+ flex: 0.1;
|
|
|
+ border-left: 1px solid darkgray;
|
|
|
+ margin-top: -44px;
|
|
|
+ .icon {
|
|
|
+ float: left;
|
|
|
+ margin-left: -12px;
|
|
|
+ position: relative;
|
|
|
+ background-color: $main-color;
|
|
|
+ color: white;
|
|
|
+ border-radius: 50%;
|
|
|
+ padding: 5px;
|
|
|
+ margin-top: 8px;
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .con {
|
|
|
+ flex: 1;
|
|
|
+ background-color: white;
|
|
|
+ padding: 0px 12px 10px 12px;
|
|
|
+ position: relative;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ .date {
|
|
|
+ top: -31px;
|
|
|
+ left: 0px;
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
+ .del {
|
|
|
+ top: -31px;
|
|
|
+ right: 0px;
|
|
|
+ position: absolute;
|
|
|
+ color: #F44336;
|
|
|
+ }
|
|
|
+ .contents {
|
|
|
+ padding-top: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|