400 lines
7.5 KiB
Vue
400 lines
7.5 KiB
Vue
|
<template>
|
|||
|
<view>
|
|||
|
<view class="content-middle">
|
|||
|
<view class="content-middle-title">
|
|||
|
<view class="content-middle-search">
|
|||
|
<text class='iconfont icon-sousuo2'></text>
|
|||
|
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
|
|||
|
@input="setValue"></input>
|
|||
|
</view>
|
|||
|
<view class="search" @click="search">
|
|||
|
搜索
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="content-middle-one">
|
|||
|
<view class="middle-one" v-for="(item,j) in list" :key='j'>
|
|||
|
|
|||
|
<view class="middle-onea">
|
|||
|
<view class="middle-onea-title">
|
|||
|
{{item.name}}
|
|||
|
</view>
|
|||
|
<view class="middle-onea-time">
|
|||
|
{{item.quit_time}}
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
|
|||
|
|
|||
|
<view class="middle-oneb">
|
|||
|
<view class="middle-oneb-a">
|
|||
|
<view class="threeb-a-b">
|
|||
|
<view class="achor">所在部门:<text>{{item.department}}</text></view>
|
|||
|
<view class="achor">职位:{{item.position}}</view>
|
|||
|
<view class="achor">部门负责人:{{item.lead_admin}}</view>
|
|||
|
<view class="achor">交接人:{{item.connect_names}}</view>
|
|||
|
<view class="textare-three">
|
|||
|
<textarea :value="item.remark" placeholder="" />
|
|||
|
</view>
|
|||
|
|
|||
|
<view class="middle-edit" @click="editpart(item)">
|
|||
|
编辑
|
|||
|
</view>
|
|||
|
<view class="middle-delete" @click="clickItem(item)">
|
|||
|
删除
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
|
|||
|
</view>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</view>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
|
|||
|
</view>
|
|||
|
|
|||
|
|
|||
|
<view class="content-bootom" @click="adddepart">
|
|||
|
<view class="content-bootom-one">
|
|||
|
<image src="@/static/images/ja.png" mode=""></image>
|
|||
|
</view>
|
|||
|
<view class="content-bootom-two">添加离职档案</view>
|
|||
|
</view>
|
|||
|
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
|
|||
|
icon="/static/empty/data.png"></u-empty>
|
|||
|
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
|||
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
|||
|
</view>
|
|||
|
</template>
|
|||
|
|
|||
|
<script>
|
|||
|
import {
|
|||
|
leaveuserpersonal,
|
|||
|
leavedelete
|
|||
|
} from '@/api/oa.js'
|
|||
|
import {
|
|||
|
Toast
|
|||
|
} from '@/libs/uniApi.js'
|
|||
|
export default {
|
|||
|
|
|||
|
data() {
|
|||
|
return {
|
|||
|
show: false,
|
|||
|
btnList: [{
|
|||
|
id: '2',
|
|||
|
name: '删除',
|
|||
|
width: '100rpx',
|
|||
|
bgColor: '#ed656d',
|
|||
|
color: '#FFFFFF',
|
|||
|
fontSize: '28rpx'
|
|||
|
}],
|
|||
|
loadConfig: {
|
|||
|
page: 1,
|
|||
|
limit: 5,
|
|||
|
loadingText: '努力加载中',
|
|||
|
loadmoreText: '轻轻上拉',
|
|||
|
nomoreText: '我也是有底线的~~',
|
|||
|
status: 'loadmore'
|
|||
|
},
|
|||
|
keyword: '',
|
|||
|
list: [],
|
|||
|
|
|||
|
|
|||
|
|
|||
|
};
|
|||
|
},
|
|||
|
onShow() {
|
|||
|
this.getDocumentList()
|
|||
|
},
|
|||
|
onReachBottom() {
|
|||
|
this.getDocumentList()
|
|||
|
},
|
|||
|
onPullDownRefresh() {
|
|||
|
uni.stopPullDownRefresh()
|
|||
|
},
|
|||
|
methods: {
|
|||
|
//获取离职档案
|
|||
|
|
|||
|
async getDocumentList() {
|
|||
|
|
|||
|
try {
|
|||
|
if (this.loadConfig.status == "nomore") return;
|
|||
|
this.loadConfig.status = "loading"
|
|||
|
let res = await leaveuserpersonal({
|
|||
|
page: this.loadConfig.page,
|
|||
|
limit: this.loadConfig.limit,
|
|||
|
|
|||
|
})
|
|||
|
|
|||
|
this.loadConfig.status = "loadmore"
|
|||
|
if (res.data.data.length < this.loadConfig.limit) {
|
|||
|
this.loadConfig.status = "nomore"
|
|||
|
} else {
|
|||
|
this.loadConfig.page++;
|
|||
|
}
|
|||
|
this.list = [...this.list, ...res.data?.data]
|
|||
|
} catch (e) {
|
|||
|
this.loadConfig.status = "nomore"
|
|||
|
}
|
|||
|
},
|
|||
|
//添加离职档案
|
|||
|
adddepart() {
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/addresignationprofile/index?type=' + 0
|
|||
|
})
|
|||
|
},
|
|||
|
//删除弹窗
|
|||
|
clickItem(data) {
|
|||
|
// console.log(e)
|
|||
|
uni.showModal({
|
|||
|
content: '确定要删除吗',
|
|||
|
success: (e) => {
|
|||
|
if (e.confirm) {
|
|||
|
this.deleteDepartment(data.id)
|
|||
|
}
|
|||
|
}
|
|||
|
})
|
|||
|
|
|||
|
},
|
|||
|
|
|||
|
//删除
|
|||
|
async deleteDepartment(id) {
|
|||
|
|
|||
|
const res = await leavedelete({
|
|||
|
id: id
|
|||
|
})
|
|||
|
|
|||
|
if (res.code == 0) {
|
|||
|
this.getDocumentList()
|
|||
|
}
|
|||
|
Toast(res.msg);
|
|||
|
|
|||
|
},
|
|||
|
//编辑离职档案
|
|||
|
editpart(item) {
|
|||
|
|
|||
|
uni.navigateTo({
|
|||
|
url: '/pages/addresignationprofile/index?type=' + 1 + "&data=" + encodeURIComponent(JSON
|
|||
|
.stringify(
|
|||
|
item))
|
|||
|
})
|
|||
|
},
|
|||
|
//查询
|
|||
|
search() {
|
|||
|
this.getDocumentList()
|
|||
|
},
|
|||
|
//输入监听
|
|||
|
setValue(e) {
|
|||
|
this.keyword = e.detail.value
|
|||
|
if (this.keyword.length == 0) {
|
|||
|
this.getDocumentList()
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
};
|
|||
|
</script>
|
|||
|
|
|||
|
<style lang="scss" scoped>
|
|||
|
page {
|
|||
|
position: relative;
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
.content-middle {
|
|||
|
.content-middle-title {
|
|||
|
width: 100%;
|
|||
|
background-color: #FFFFFF;
|
|||
|
padding-top: 20rpx;
|
|||
|
display: flex;
|
|||
|
|
|||
|
.search {
|
|||
|
font-size: 28rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
color: #666666;
|
|||
|
width: 149rpx;
|
|||
|
line-height: 63rpx;
|
|||
|
height: 63rpx;
|
|||
|
background: #FFFFFF;
|
|||
|
text-align: center;
|
|||
|
border-radius: 35rpx 35rpx;
|
|||
|
border: 2rpx solid #E6E5E5;
|
|||
|
margin-left: 18rpx;
|
|||
|
}
|
|||
|
|
|||
|
.content-middle-search {
|
|||
|
display: flex;
|
|||
|
width: 527rpx;
|
|||
|
height: 63rpx;
|
|||
|
line-height: 63rpx;
|
|||
|
padding-left: 30rpx;
|
|||
|
background: #F7F7F7;
|
|||
|
border-radius: 35rpx 35rpx;
|
|||
|
font-size: 25rpx;
|
|||
|
|
|||
|
input {
|
|||
|
width: 527rpx;
|
|||
|
height: 63rpx;
|
|||
|
line-height: 63rpx;
|
|||
|
padding-left: 30rpx;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
.placeholder {
|
|||
|
font-size: 25rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
color: #999999;
|
|||
|
padding-left: 30rpx;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
.content-middle-title {
|
|||
|
height: 98rpx;
|
|||
|
line-height: 98rpx;
|
|||
|
background: #FFFFFF;
|
|||
|
font-size: 35rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
padding-left: 28rpx;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
.content-middle-one {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
.middle-one {
|
|||
|
background-color: #FFFFFF;
|
|||
|
padding: 28rpx 28rpx;
|
|||
|
margin: 28rpx 28rpx;
|
|||
|
|
|||
|
.middle-onea {
|
|||
|
display: flex;
|
|||
|
justify-content: space-between;
|
|||
|
border-bottom: 1rpx solid #CCCCCC;
|
|||
|
|
|||
|
|
|||
|
padding-bottom: 20rpx;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
.middle-oneb {
|
|||
|
display: flex;
|
|||
|
justify-content: space-between;
|
|||
|
margin-top: 10rpx;
|
|||
|
|
|||
|
|
|||
|
.middle-oneb-a {
|
|||
|
|
|||
|
.threeb-a-b {
|
|||
|
|
|||
|
.achor {
|
|||
|
font-size: 28rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
color: #333333;
|
|||
|
margin-top: 20rpx;
|
|||
|
margin-bottom: 20rpx;
|
|||
|
}
|
|||
|
|
|||
|
.middle-edit {
|
|||
|
width: 645rpx;
|
|||
|
height: 63rpx;
|
|||
|
line-height: 63rpx;
|
|||
|
background: #e6e5d9;
|
|||
|
text-align: center;
|
|||
|
font-size: 28rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
color: #000;
|
|||
|
margin-bottom: 20rpx;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
.middle-delete {
|
|||
|
width: 645rpx;
|
|||
|
height: 63rpx;
|
|||
|
line-height: 63rpx;
|
|||
|
background: #F02828;
|
|||
|
text-align: center;
|
|||
|
font-size: 28rpx;
|
|||
|
font-family: PingFang SC-Regular, PingFang SC;
|
|||
|
font-weight: 400;
|
|||
|
color: #FFFFFF;
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
.middle-oneb-b {
|
|||
|
width: 80rpx;
|
|||
|
height: 80rpx;
|
|||
|
margin-top: 45rpx;
|
|||
|
|
|||
|
|
|||
|
image {
|
|||
|
width: 100%;
|
|||
|
height: 100%;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
.content-bootom {
|
|||
|
width: 485rpx;
|
|||
|
height: 88rpx;
|
|||
|
text-align: center;
|
|||
|
line-height: 88rpx;
|
|||
|
background: #3274F9;
|
|||
|
border-radius: 60px 60px 60px 60px;
|
|||
|
display: flex;
|
|||
|
left: 50%;
|
|||
|
margin-left: -252.5rpx;
|
|||
|
position: absolute;
|
|||
|
bottom: 150rpx;
|
|||
|
z-index: 9999 !important;
|
|||
|
position: fixed;
|
|||
|
|
|||
|
.content-bootom-one {
|
|||
|
margin-left: 92rpx;
|
|||
|
margin-top: 5rpx;
|
|||
|
width: 32rpx;
|
|||
|
height: 32rpx;
|
|||
|
margin-right: 10rpx;
|
|||
|
|
|||
|
image {
|
|||
|
width: 100%;
|
|||
|
height: 100%;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
.content-bootom-two {
|
|||
|
font-size: 35rpx;
|
|||
|
font-family: PingFang SC-Bold, PingFang SC;
|
|||
|
font-weight: bold;
|
|||
|
color: #FFFFFF;
|
|||
|
}
|
|||
|
}
|
|||
|
</style>
|