456 lines
16 KiB
Vue
456 lines
16 KiB
Vue
<template>
|
|
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
|
<view class="certificate-list">
|
|
<Navbar2 title="证件管理" :backGround="false" :isBack="false"/>
|
|
<view class="tag-view">
|
|
<view class="tag-view-item" @click="changeTag(1)" :class="tagIndex==1?'active tag-view-item':'tag-view-item'">全部证件</view>
|
|
<view class="tag-view-item" @click="changeTag(2)" :class="tagIndex==2?'active tag-view-item':'tag-view-item'">证件核验</view>
|
|
</view>
|
|
<view style="width: 100%;height: auto;background: #FFF;padding: 10rpx 20rpx;">
|
|
<u-search shape="round" placeholder="搜索" v-model="keyWord" :showAction="true" actionText="搜索" :animation="false" @custom="searchList"></u-search>
|
|
</view>
|
|
<view style="width: 100%;height: auto;background: #FFF;padding: 10rpx 20rpx;margin-bottom: 20rpx;">
|
|
<view style="width: 50%;height: auto;display: flex;" v-if="tagIndex==1">
|
|
<uni-data-select style="width: 50%;margin-right: 20rpx;" v-model="state" :localdata="range1"
|
|
mode="none" placeholder="证件状态" :clear="false" @change="changeSelect1"></uni-data-select>
|
|
<uni-data-select style="width: 50%;" v-model="dateState" :localdata="range2"
|
|
mode="none" placeholder="预警状态" :clear="false" @change="changeSelect2"></uni-data-select>
|
|
</view>
|
|
<view style="width: 65%;height: auto;display: flex;" v-if="tagIndex==2">
|
|
<uni-data-select style="width: 70%;margin-right: 20rpx;" v-model="verifyType" :localdata="range3"
|
|
mode="none" placeholder="任务类型" :clear="false" @change="changeSelect3"></uni-data-select>
|
|
<uni-data-select style="width: 30%;" v-model="verifyState" :localdata="range4"
|
|
mode="none" placeholder="任务状态" :clear="false" @change="changeSelect4"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
<scroll-view v-if="tagIndex==1" style="width: 100%;height: 72vh;background: #FFF;" @scrolltolower="onScrollTolower1" scroll-y="true">
|
|
<view class="certificate-box" v-for="(item, index) in infoList1" :key="index" @click="handleCertificateDetail(item)">
|
|
<!-- 2临期 3 超期 -->
|
|
<image v-if="item.dateState==2" style="width: 120rpx;height: 120rpx;position: absolute;top:30%;right: 5%;" src="/static/images/system/dataStatus1.png"></image>
|
|
<image v-if="item.dateState==3" style="width: 120rpx;height: 120rpx;position: absolute;top:30%;right: 5%;" src="/static/images/system/dataStatus2.png"></image>
|
|
<view class="certificate-view1" v-if="item.certificateType==1">
|
|
<view style="display: flex;align-items: center;margin-bottom: 10rpx;">
|
|
<view style="font-size: 28rpx;color: #2A2B2F;font-weight: 600;">{{item.certificateTypeName}}</view>
|
|
<view style="color:#64686E;margin-left: 10px;font-size: 26rpx;">{{item.certificateNo}}</view>
|
|
<view class="status-view" style="margin-left: 10px;">{{item.stateName}}</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">有效期</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{ item.issueDay }} 至 {{ item.issueLifespan }}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">姓名 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">证件柜</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceName||'无'}}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">槽位 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.slotNo||'无'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="text-view" style="color: #979B9F;">位置</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceAddr||'无'}}</view>
|
|
</view>
|
|
<view class="certificate-view2" v-if="item.certificateType==2">
|
|
<view style="display: flex;align-items: center;margin-bottom: 10rpx;">
|
|
<view style="font-size: 28rpx;color: #2A2B2F;font-weight: 600;">{{item.certificateTypeName}}</view>
|
|
<view style="color:#64686E;margin-left: 10px;font-size: 26rpx;">{{item.certificateNo}}</view>
|
|
<view class="status-view" style="margin-left: 10px;">{{item.stateName}}</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">有效期</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{ item.issueDay }} 至 {{ item.issueLifespan }}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">姓名 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">证件柜</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceName||'无'}}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">槽位 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.slotNo||'无'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="text-view" style="color: #979B9F;">位置</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceAddr||'无'}}</view>
|
|
</view>
|
|
<view class="certificate-view3" v-if="item.certificateType==3">
|
|
<view style="display: flex;align-items: center;margin-bottom: 10rpx;">
|
|
<view style="font-size: 28rpx;color: #2A2B2F;font-weight: 600;">{{item.certificateTypeName}}</view>
|
|
<view style="color:#64686E;margin-left: 10px;font-size: 26rpx;">{{item.certificateNo}}</view>
|
|
<view class="status-view" style="margin-left: 10px;">{{item.stateName}}</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">有效期</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{ item.issueDay }} 至 {{ item.issueLifespan }}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">姓名 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
<view style="width: 100%;margin: 10rpx 0;display: flex;align-items: center;">
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">证件柜</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceName||'无'}}</view>
|
|
</view>
|
|
<view style="width: 50%;">
|
|
<view class="text-view" style="color: #979B9F;">槽位 </view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.slotNo||'无'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="text-view" style="color: #979B9F;">位置</view>
|
|
<view class="text-view" style="color: #2A2B2F;">{{item.deviceAddr||'无'}}</view>
|
|
</view>
|
|
</view>
|
|
<view style="margin: 20px 0" v-if="infoList1.length > 0">
|
|
<u-loadmore :status="status1" nomoreText="没有更多数据了" />
|
|
</view>
|
|
<view v-else class="flex justify-center align-center" style="height: 50vh">
|
|
<u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" />
|
|
</view>
|
|
</scroll-view>
|
|
<scroll-view v-if="tagIndex==2" style="width: 100%;height: 72vh;" @scrolltolower="onScrollTolower2" scroll-y="true">
|
|
<view class="scroll-item" v-for="(item, index) in infoList2" :key="index" @click="handleVerificationDetail(item)">
|
|
<!-- <image v-if="item.verifyState==0" style="width: 120rpx;height: 120rpx;position: absolute;top:10%;right: 5%;" src="/static/images/system/statusIcon2.png"></image>
|
|
<image v-if="item.verifyState==1" style="width: 120rpx;height: 120rpx;position: absolute;top:10%;right: 5%;" src="/static/images/system/statusIcon3.png"></image> -->
|
|
<view style="width: 100%;display: flex;margin-bottom: 10rpx;">
|
|
<view style="color: #2A2B2F;font-size: 32rpx;margin-right: 20rpx;font-weight: 600;">{{item.verifyTitle}}</view>
|
|
<view class="status-view">
|
|
{{item.verifyStateName}}
|
|
</view>
|
|
</view>
|
|
<view class="info-text">任务类型:
|
|
<text v-if="item.verifyType==1">有无证件核验</text>
|
|
<text v-else-if="item.verifyType==2">一人多证核验</text>
|
|
<text v-else-if="item.verifyType==3">出入境时间核验</text>
|
|
<text v-else>无</text>
|
|
</view>
|
|
<view class="info-text">开始时间:{{item.startTime}}</view>
|
|
<view class="info-text">结束时间:{{item.endTime}}</view>
|
|
|
|
<view class="scroll-bottom">
|
|
<view class="scroll-bottom-item" style="border-right: 1px solid rgba(209,211,215,0.5);">
|
|
<view class="bottom-item-label">核验人数</view>
|
|
<view class="bottom-item-text">{{item.verifyAllCount}}</view>
|
|
</view>
|
|
<view class="scroll-bottom-item" style="border-right: 1px solid rgba(209,211,215,0.5);">
|
|
<view class="bottom-item-label">已核验</view>
|
|
<view class="bottom-item-text" style="color: #00CC44;">{{item.verifyCount}}</view>
|
|
</view>
|
|
<view class="scroll-bottom-item" style="border-right: 1px solid rgba(209,211,215,0.5);">
|
|
<view class="bottom-item-label">未核验</view>
|
|
<view class="bottom-item-text" style="color: #F6AB00;">{{Number(item.verifyAllCount)-Number(item.verifyCount)}}</view>
|
|
</view>
|
|
<view class="scroll-bottom-item">
|
|
<view class="bottom-item-label">完成率</view>
|
|
<view class="bottom-item-text" style="color: #1F72EA;">{{Math.ceil((item.verifyCount/item.verifyAllCount)*100)}}%</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view style="width: 100%;display: flex;align-items: center;justify-content: center;font-size: 20rpx;">
|
|
<view style="margin-right: 20rpx;color: #34C759;">一致:{{item.passCount}}</view>
|
|
<view style="color: #FF3B30;">不一致:{{item.noPassCount}}</view>
|
|
</view>
|
|
</view>
|
|
<view style="margin: 20px 0" v-if="infoList2.length > 0">
|
|
<u-loadmore :status="status2" nomoreText="没有更多数据了" />
|
|
</view>
|
|
<view v-else class="flex justify-center align-center" style="height: 50vh">
|
|
<u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" />
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { certificateInfoListApi,certificateVerifyTaskListPageApi } from '@/api/certificateManage/index.js';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
fontValue:uni.getStorageSync('fontSize') || 8,
|
|
tagIndex:1,
|
|
keyWord:"",
|
|
state:null,//证件状态
|
|
range1: [
|
|
{ value: 0, text: "未上交" },
|
|
{ value: 1, text: "存入中" },
|
|
{ value: 2, text: "已存入" },
|
|
{ value: 3, text: "取出中" },
|
|
{ value: 4, text: "已取出" },
|
|
],
|
|
dateState:null,//预警状态
|
|
range2: [
|
|
{ value: 1, text: "正常" },
|
|
{ value: 2, text: "临期" },
|
|
{ value: 3, text: "超期" },
|
|
],
|
|
verifyType:null,//任务类型
|
|
range3: [
|
|
{ value: 1, text: "有无证件核验" },
|
|
{ value: 2, text: "一人多证核验" },
|
|
{ value: 3, text: "出入境时间核验" }
|
|
],
|
|
verifyState:null,//任务状态
|
|
range4: [
|
|
{ value: 1, text: "未开始" },
|
|
{ value: 2, text: "进行中" },
|
|
{ value: 3, text: "已超时" },
|
|
{ value: 4, text: "已完成" },
|
|
{ value: 5, text: "未完成" },
|
|
],
|
|
pageNum1: 1,
|
|
pageSize1: 10,
|
|
total1: 0,
|
|
infoList1:[],
|
|
status1: 'loadmore',
|
|
pageNum2: 1,
|
|
pageSize2: 10,
|
|
total2: 0,
|
|
infoList2:[],
|
|
status2: 'loadmore',
|
|
}
|
|
},
|
|
onLoad() {
|
|
|
|
},
|
|
onShow(){
|
|
this.getList1()
|
|
this.getList2()
|
|
},
|
|
methods: {
|
|
changeTag(index){
|
|
this.tagIndex=index;
|
|
this.keyWord=""
|
|
},
|
|
//搜索
|
|
searchList(value){
|
|
if(this.tagIndex==1){
|
|
this.pageNum1=1
|
|
this.infoList1=[]
|
|
this.getList1()
|
|
}else{
|
|
this.pageNum2=1
|
|
this.infoList2=[]
|
|
this.getList2()
|
|
}
|
|
},
|
|
changeSelect1(){
|
|
this.pageNum1=1
|
|
this.infoList1=[]
|
|
this.getList1()
|
|
},
|
|
changeSelect2(){
|
|
this.pageNum1=1
|
|
this.infoList1=[]
|
|
this.getList1()
|
|
},
|
|
// 翻页
|
|
onScrollTolower1(){
|
|
console.log(this.infoList1.length)
|
|
if(this.total1>this.infoList1.length){
|
|
this.pageNum1++
|
|
this.getList1()
|
|
}
|
|
},
|
|
//获取列表
|
|
async getList1() {
|
|
console.log('获取列表')
|
|
const params = {
|
|
pageNum: this.pageNum1,
|
|
pageSize: this.pageSize1,
|
|
state: this.state,
|
|
dateState: this.dateState,
|
|
keyWord: this.keyWord,
|
|
}
|
|
try {
|
|
const res = await certificateInfoListApi(params)
|
|
console.log('?? ~ getList ~ res:', res)
|
|
this.total1 = res.total;
|
|
if(this.pageNum1==1){
|
|
this.infoList1 = res.rows
|
|
}else{
|
|
this.infoList1.push(...res.rows)
|
|
}
|
|
this.status1 = this.total1 == this.infoList1.length ? 'nomore' : 'loadmore'
|
|
} catch (error) {
|
|
console.log(error)
|
|
}
|
|
},
|
|
|
|
changeSelect3(){
|
|
this.pageNum2=1
|
|
this.infoList2=[]
|
|
this.getList2()
|
|
},
|
|
changeSelect4(){
|
|
this.pageNum2=1
|
|
this.infoList2=[]
|
|
this.getList2()
|
|
},
|
|
// 翻页
|
|
onScrollTolower2(){
|
|
console.log(this.infoList2.length)
|
|
if(this.total2>this.infoList2.length){
|
|
this.pageNum2++
|
|
this.getList2()
|
|
}
|
|
},
|
|
//获取列表
|
|
async getList2() {
|
|
console.log('获取列表')
|
|
const params = {
|
|
pageNum: this.pageNum2,
|
|
pageSize: this.pageSize2,
|
|
verifyType: this.verifyType,
|
|
verifyState: this.verifyState,
|
|
keyWord: this.keyWord
|
|
}
|
|
try {
|
|
const res = await certificateVerifyTaskListPageApi(params)
|
|
console.log('?? ~ getList ~ res:', res)
|
|
this.total2 = res.total;
|
|
if(this.pageNum2==1){
|
|
this.infoList2 = res.rows
|
|
}else{
|
|
this.infoList2.push(...res.rows)
|
|
}
|
|
this.status2 = this.total2 == this.infoList2.length ? 'nomore' : 'loadmore'
|
|
} catch (error) {
|
|
console.log(error)
|
|
}
|
|
},
|
|
handleCertificateDetail(item) {
|
|
uni.navigateTo({
|
|
url: `/pages/certificateManage/certificateInfo/certificateDetail?pageParmas=${JSON.stringify(item)}`
|
|
})
|
|
},
|
|
handleVerificationDetail(item) {
|
|
uni.navigateTo({
|
|
url: `/pages/certificateManage/certificateInfo/verificationDetail?pageParmas=${JSON.stringify(item)}`
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.certificate-list {
|
|
height: 100vh;
|
|
background: #f5f5f5;
|
|
// background-image: url('@/static/images/system/pageBg.png');
|
|
// background-size: 100% 100%;
|
|
// padding: 30rpx;
|
|
}
|
|
.tag-view{
|
|
width: 100%;
|
|
height: 6vh;
|
|
display: flex;
|
|
align-items: self-end;
|
|
background: #FFF;
|
|
padding: 20rpx 40rpx;
|
|
}
|
|
.tag-view-item{
|
|
width: auto;
|
|
height: auto;
|
|
color: #64686E;
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
margin-right: 60rpx;
|
|
}
|
|
.active{
|
|
border-bottom: 4px solid #3888FF;
|
|
font-size: 32rpx;
|
|
color: #2A2B2F;
|
|
}
|
|
.certificate-box{
|
|
width: 90%;
|
|
// height: 420rpx;
|
|
margin: 30rpx auto;
|
|
position: relative;
|
|
}
|
|
.certificate-view1{
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 20rpx;
|
|
background-image: url('@/static/images/system/certificate1.png');
|
|
background-size: 100% 100%;
|
|
}
|
|
.certificate-view2{
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 20rpx;
|
|
background-image: url('@/static/images/system/certificate2.png');
|
|
background-size: 100% 100%;
|
|
}
|
|
.certificate-view3{
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 20rpx;
|
|
background-image: url('@/static/images/system/certificate3.png');
|
|
background-size: 100% 100%;
|
|
}
|
|
.status-view{
|
|
padding: 5rpx 10rpx;
|
|
background: #BEDAFF;
|
|
color: #1F72EA;
|
|
font-size: 24rpx;
|
|
border-radius: 8rpx;
|
|
}
|
|
.text-view{
|
|
margin-bottom: 10rpx;font-size: 28rpx;
|
|
}
|
|
.scroll-item{
|
|
width: 100%;
|
|
height: auto;
|
|
margin:20rpx 0;
|
|
background: #fff;
|
|
padding: 20rpx 40rpx;
|
|
position: relative;
|
|
}
|
|
.info-text{
|
|
font-size: 28rpx;
|
|
color: #64686E;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
.textMore{
|
|
width: 78%;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.scroll-bottom{
|
|
width: 100%;
|
|
margin: 20rpx auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
.scroll-bottom-item{
|
|
width: 25%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-content: center;
|
|
}
|
|
.bottom-item-label{
|
|
text-align: center;margin-bottom: 20rpx;color: #64686E;font-size: 20rpx;
|
|
}
|
|
.bottom-item-text{
|
|
text-align: center;color: #2A2B2F;font-size: 42rpx;font-weight: 600;
|
|
}
|
|
</style> |