Files
dvcp_v2_wxcp_app/src/project/pingchang/AppCheckpointRegistration/AppCheckpointRegistration.vue

364 lines
9.9 KiB
Vue
Raw Normal View History

2022-09-21 11:37:24 +08:00
<template>
<div class="AppCheckpointRegistration">
<AiTopFixed>
<div class="header">
<div class="tab-item">
2022-09-23 17:55:35 +08:00
<h2 style="color:#5AAD6A;">{{totalInfo['今日登记']}}</h2>
2022-09-21 11:37:24 +08:00
<p>今日返乡</p>
</div>
<div class="tab-item">
2022-09-23 17:55:35 +08:00
<h2 style="color:#F5A319;">{{totalInfo['今日风险']}}</h2>
2022-09-21 11:37:24 +08:00
<p>今日风险</p>
</div>
2022-09-21 16:15:58 +08:00
<div class="tab-item">
2022-09-23 17:55:35 +08:00
<h2 style="color:#CD413A;border-right:0;">{{totalInfo['风险处理']}}</h2>
2022-09-21 11:37:24 +08:00
<p>风险处理</p>
</div>
</div>
2022-09-23 17:55:35 +08:00
<div class="tab-select">
<div class="item" :class="!tabIndex ? 'active' : ''" @click="tabClick(0)">返乡人员<span></span></div>
<div class="item" :class="tabIndex ? 'active' : ''" @click="tabClick(1)">异常人员<span></span></div>
</div>
<div class="top-search">
2022-09-26 10:51:06 +08:00
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名/手机号/身份证号" :show-action="false" bg-color="#F5F5F5"
2022-09-23 17:55:35 +08:00
search-icon-color="#999" color="#333" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
<div class="top-select">
<div class="item">
2022-09-21 11:37:24 +08:00
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666" selectRoot>
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
2022-09-23 17:55:35 +08:00
<span v-else>地区选择</span>
2022-09-21 11:37:24 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
2022-09-27 14:56:05 +08:00
<div class="item" @click="showGateSelect=true">
<span v-if="gatewayId">{{gatewayName || '卡口选择'}}</span>
<span v-else>卡口选择</span>
2022-09-23 17:55:35 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</div>
2022-09-21 11:37:24 +08:00
</div>
</AiTopFixed>
2022-09-21 16:15:58 +08:00
<div class="user-list">
<div class="item" @click="toUser(item)" v-for="(item,index) in list" :key="index">
2022-09-23 17:55:35 +08:00
<div class="top">
<h2 class="name">{{item.name}}<span class="status" :class="'status'+item.riskLevel">{{ $dict.getLabel('EP_riskLevel', item.riskLevel) }}</span></h2>
<p class="color-999">{{item.idNumber}}</p>
<p><img src="./components/img/org-icon.png" alt=""><span class="start-name">{{item.startAreaName}}</span></p>
<p><img src="./components/img/blue-icon.png" alt=""><span class="start-name">{{item.arriveAreaName}}</span></p>
<p><img src="./components/img/time-icon.png" alt="">{{item.arriveTime}}</p>
<img :src="statusImgList[item.handleType]" alt="" class="status-img">
</div>
<div class="bottom" v-if="item.handleType>0">
2022-09-27 16:57:38 +08:00
<div class="text">处置人<span>{{item.handleUserName}}</span></div>
2022-09-23 17:55:35 +08:00
</div>
2022-09-21 16:15:58 +08:00
</div>
2022-09-21 11:37:24 +08:00
</div>
2022-09-21 16:15:58 +08:00
<AiEmpty v-if="!list.length"></AiEmpty>
2022-09-23 17:55:35 +08:00
<u-select v-model="showGateSelect" :list="gateList" label-name="name" value-name="id" @confirm="gatewayconfirm"></u-select>
2022-09-21 11:37:24 +08:00
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
2022-09-21 16:15:58 +08:00
name: 'AppCheckpointRegistration',
appName: '卡口登记',
2022-09-21 11:37:24 +08:00
data() {
return {
areaId: '',
areaName: '',
2022-09-21 16:15:58 +08:00
tabIndex: 0,
2022-09-21 11:37:24 +08:00
current: 1,
2022-09-21 16:15:58 +08:00
list: [],
2022-09-23 17:55:35 +08:00
totalInfo: {},
keyword: '',
gatewayId: '',
gatewayName: '',
showGateSelect: false,
gateList: [],
statusImgList: [
require('./components/img/status0.png'),
require('./components/img/status1.png'),
require('./components/img/status2.png'),
require('./components/img/status3.png'),
require('./components/img/status4.png'),
require('./components/img/status5.png'),
require('./components/img/status6.png'),
]
2022-09-21 11:37:24 +08:00
}
},
2022-09-21 16:15:58 +08:00
computed: { ...mapState(['user']) },
created() {
2022-09-23 17:55:35 +08:00
// this.areaId = this.user.areaId
// this.areaName = this.user.areaName
this.getGatewayList()
this.$dict.load(['EP_handleType', 'EP_riskLevel']).then(() => {
this.getList()
this.getTotal()
})
2022-09-21 11:37:24 +08:00
},
onShow() {
document.title = '卡口登记'
2022-09-21 16:15:58 +08:00
uni.$on('updateList', () => {
this.getListInit()
})
2022-09-21 11:37:24 +08:00
},
methods: {
2022-09-21 16:15:58 +08:00
getListInit() {
2022-09-21 11:37:24 +08:00
this.current = 1
2022-09-21 16:15:58 +08:00
this.list = []
2022-09-21 11:37:24 +08:00
this.getList()
},
2022-09-21 16:15:58 +08:00
getList() {
2022-09-27 14:56:05 +08:00
this.$http.post(`/app/appepidemicpreventionregisterinfo/list?infoType=0&current=${this.current}&size=10&listType=${this.tabIndex}&gatewayId=${this.gatewayId}&name=${this.keyword}&arriveAreaId=${this.areaId}`)
2022-09-21 16:15:58 +08:00
.then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
item.idNumber = item.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
})
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
2022-09-21 11:37:24 +08:00
},
2022-09-21 16:15:58 +08:00
getTotal() {
2022-09-23 17:55:35 +08:00
this.$http.post(`/app/appepidemicpreventionregisterinfo/listStatistics?areaId=${this.areaId}`).then((res) => {
2022-09-21 16:15:58 +08:00
if (res.code == 0) {
this.totalInfo = res.data
}
})
2022-09-21 11:37:24 +08:00
},
2022-09-23 17:55:35 +08:00
getGatewayList() {
this.$http.post(`/app/appepidemicpreventiongateway/list?size=300&status=0`).then((res) => {
if (res.code == 0) {
this.gateList = res.data.records
2022-09-27 14:56:05 +08:00
this.gateList.unshift({name: '全部', id: ''})
2022-09-23 17:55:35 +08:00
}
})
},
areaSelect(e) {
this.areaId =e
this.$nextTick(() => {
this.getListInit()
})
this.getTotal()
},
tabClick(index) {
this.tabIndex = index
this.getListInit()
},
gatewayconfirm(e) {
this.gatewayName = e[0].label
this.gatewayId = e[0].value
this.getListInit()
},
2022-09-21 16:15:58 +08:00
toUser(row) {
uni.navigateTo({url: `./UserInfo?id=${row.id}`})
2022-09-23 17:55:35 +08:00
},
2022-09-27 14:56:05 +08:00
clearGateway() {
this.gatewayName = ''
this.gatewayId = ''
this.getListInit()
}
2022-09-21 11:37:24 +08:00
},
onReachBottom() {
2022-09-21 16:15:58 +08:00
this.current ++
2022-09-21 11:37:24 +08:00
this.getList()
2022-09-21 16:15:58 +08:00
}
2022-09-21 11:37:24 +08:00
}
</script>
2022-09-21 16:15:58 +08:00
<style lang="scss" scoped>
2022-09-21 11:37:24 +08:00
.AppCheckpointRegistration {
2022-09-21 16:15:58 +08:00
.header{
2022-09-21 11:37:24 +08:00
padding: 54px 32px 48px 32px;
display: flex;
background-color: #fff;
margin-bottom: 4px;
2022-09-21 16:15:58 +08:00
.tab-item{
2022-09-21 11:37:24 +08:00
flex: 1;
text-align: center;
2022-09-21 16:15:58 +08:00
h2{
2022-09-21 11:37:24 +08:00
font-size: 52px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
height: 80px;
margin-bottom: 8px;
letter-spacing: -4px;
border-right: 1px solid #ddd;
line-height: 44px;
}
2022-09-21 16:15:58 +08:00
p{
2022-09-21 11:37:24 +08:00
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
margin-top: -22px;
}
}
.tab-item:nth-last-of-type(1) {
2022-09-21 16:15:58 +08:00
border-right: 0;
2022-09-21 11:37:24 +08:00
}
}
2022-09-21 16:15:58 +08:00
.search{
width: 100%;
height: 112px;
padding: 32px;
box-sizing: border-box;
background: #FFF;
display: flex;
margin-bottom: 8px;
.left{
width: calc(100% - 402px);
}
2022-09-21 11:37:24 +08:00
}
2022-09-21 16:15:58 +08:00
.tab-select{
width: 100%;
height: 96px;
background: #FFF;
2022-09-21 11:37:24 +08:00
display: flex;
2022-09-21 16:15:58 +08:00
margin-bottom: 4px;
.item{
flex: 1;
font-size: 32px;
line-height: 96px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
text-align: center;
2022-09-21 11:37:24 +08:00
}
2022-09-21 16:15:58 +08:00
.active{
color: #135AB8;
position: relative;
span{
position: absolute;
bottom: 0;
left: 50%;
width: 192px;
margin-left: -96px;
border-bottom: 4px solid #135AB8;
}
2022-09-21 11:37:24 +08:00
}
}
2022-09-23 17:55:35 +08:00
.top-search {
padding: 20px 32px;
background-color: #fff;
}
.top-select {
display: flex;
padding: 28px 0;
background-color: #fff;
.item {
flex: 1;
padding: 0 8px;
text-align: center;
span {
display: inline-block;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #666;
line-height: 40px;
}
}
}
2022-09-21 16:15:58 +08:00
.user-list{
2022-09-23 17:55:35 +08:00
background-color: #F3F6F9;
padding: 32px 32px 0;
2022-09-21 16:15:58 +08:00
.item{
background-color: #fff;
2022-09-23 17:55:35 +08:00
margin-bottom: 24px;
border-radius: 16px;
.top {
padding: 32px 32px 24px;
position: relative;
.status-img{
width: 200px;
height: 200px;
position: absolute;
bottom: 0;
right: 0;
}
.name{
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 8px;
.status{
float: right;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 40px;
}
.status0 {
color: #00D25D;
}
.status1 {
color: #FF6300;
}
.status2 {
color: #f46;
}
}
p{
width: calc(100% - 200px);
2022-09-21 16:15:58 +08:00
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
2022-09-23 17:55:35 +08:00
color: #333;
2022-09-21 16:15:58 +08:00
line-height: 40px;
2022-09-23 17:55:35 +08:00
margin-bottom: 8px;
img{
width: 32px;
height: 32px;
margin-right: 18px;
vertical-align: top;
}
2022-09-21 16:15:58 +08:00
}
2022-09-23 17:55:35 +08:00
.start-name{
display: inline-block;
width: calc(100% - 50px);
}
.color-999{
margin-bottom: 24px;
color: #999;
2022-09-21 11:37:24 +08:00
}
}
2022-09-23 17:55:35 +08:00
.bottom {
border-top: 2px solid #D8DDE6;
padding: 32px;
.text {
line-height: 40px;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #666;
letter-spacing: 0.58px;
}
span {
display: inline-block;
color: #3975C6;
margin-right: 32px;
}
2022-09-21 16:15:58 +08:00
}
2022-09-21 11:37:24 +08:00
}
2022-09-21 16:15:58 +08:00
}
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
2022-09-21 11:37:24 +08:00
2022-09-21 16:15:58 +08:00
}
}
.fixed {
margin: 0 !important;
background-color: #f5f5f5!important;
.content {
padding: 0 !important;
}
2022-09-21 11:37:24 +08:00
}
}
}
</style>