<template>
|
<view class="box">
|
<u-sticky offset-top="0">
|
<view class="box_search">
|
<u-search placeholder="搜索姓名或身份证号" :showAction="false" :clearabled="true" v-model="keyword" @search="search"></u-search>
|
</view>
|
</u-sticky>
|
<view class="box_list">
|
<view class="box_list_item" v-for="(item, index) in list" :key="index" @click="jump(item.id)">
|
<view class="status green" v-if="item.solutionsStatus === 1">保障中</view>
|
<view class="status info" v-if="item.solutionsStatus === 2">不在保</view>
|
<view class="top">
|
<view class="top_mc">
|
<text>{{item.name}}</text>
|
<text>{{sex === 1 ? '女' : '男'}}|{{item.age}}岁</text>
|
</view>
|
<view class="top_card">身份证号:{{item.idcardNo}}</view>
|
</view>
|
<view class="center"></view>
|
<view class="bottom">
|
<view class="bottom_item">
|
<view class="bottom_item_label">派遣单位:</view>
|
<view class="bottom_item_val">{{item.duName}}</view>
|
</view>
|
<view class="bottom_item">
|
<view class="bottom_item_label">所属工种:</view>
|
<view class="bottom_item_val">{{item.workTypeName}}</view>
|
</view>
|
<view class="bottom_item">
|
<view class="bottom_item_label">保险生效期:</view>
|
<view class="bottom_item_val">2024.01.01-2024.05.30</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
keyword: '',
|
list: [],
|
page: 1,
|
next: false
|
};
|
},
|
onLoad() {
|
this.getList()
|
},
|
onReachBottom() {
|
this.getList()
|
},
|
methods: {
|
search() {
|
this.list = []
|
this.page = 1
|
this.next = false
|
this.getList()
|
},
|
jump(id) {
|
uni.navigateTo({
|
url: `/pages/personnel_information/personnel_information?id=${id}`
|
})
|
},
|
getList() {
|
if (this.next) return
|
this.$u.api.memberPage({
|
capacity: 10,
|
page: this.page,
|
model: {
|
keywords: this.keyword
|
}
|
}).then(res => {
|
if (res.code === 200) {
|
if (res.data.records && res.data.records.length > 0) {
|
this.page++
|
this.list.push(...res.data.records)
|
} else {
|
this.next = true
|
}
|
}
|
})
|
}
|
}
|
}
|
</script>
|
<style>
|
page {
|
background-color: #f7f7f7;
|
}
|
</style>
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_search {
|
padding: 12rpx 30rpx;
|
box-sizing: border-box;
|
background-color: #ffffff;
|
}
|
.box_list {
|
width: 100%;
|
padding: 20rpx 30rpx;
|
box-sizing: border-box;
|
.box_list_item {
|
width: 100%;
|
padding: 24rpx 30rpx;
|
box-sizing: border-box;
|
background-color: #ffffff;
|
border-radius: 16rpx;
|
position: relative;
|
margin-bottom: 20rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.green {
|
background: #26BE89;
|
}
|
.info {
|
background-color: #CCCCCC;
|
}
|
.status {
|
position: absolute;
|
top: 0;
|
right: 0;
|
width: 118rpx;
|
height: 52rpx;
|
line-height: 52rpx;
|
text-align: center;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #FFFFFF;
|
font-style: normal;
|
border-radius: 0rpx 16rpx 0rpx 32rpx;
|
}
|
.top {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.top_mc {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-weight: 500;
|
font-size: 30rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
&:nth-child(2) {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
font-style: normal;
|
margin-left: 16rpx;
|
}
|
}
|
}
|
.top_card {
|
width: 100%;
|
margin-top: 12rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
font-style: normal;
|
}
|
}
|
.center {
|
width: 100%;
|
margin: 20rpx 0;
|
border-bottom: 1rpx dashed #E5E5E5;
|
}
|
.bottom {
|
width: 100%;
|
.bottom_item {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
margin-bottom: 16rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.bottom_item_label {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
font-style: normal;
|
flex-shrink: 0;
|
}
|
.bottom_item_val {
|
flex: 1;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #222222;
|
font-style: normal;
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|