Files
dvcp_v2_wechat_app/src/project/pingchang/AppGetewayRegister/AppGetewayRegister.vue

198 lines
4.2 KiB
Vue
Raw Normal View History

2022-09-20 17:12:14 +08:00
<template>
2022-09-26 14:02:17 +08:00
<div class="AppGetewayRegister">
2022-09-22 17:41:38 +08:00
<div class="title">
<h2>全部记录</h2>
<div class="right">
<span></span>
<i>{{ total }}</i>
<span></span>
</div>
</div>
<div class="home-list">
2022-09-27 08:56:51 +08:00
<div class="item" hover-class="bg-hover" @click="$linkTo(`./getewayDetail?id=${item.id}`)"
2022-09-22 17:41:38 +08:00
v-for="(item, index) in list" :key="index">
<div class="item-top">
<h2>{{ item.name }}</h2>
2022-09-23 18:03:52 +08:00
<span>{{ item.phone }}</span>
2022-09-22 17:41:38 +08:00
</div>
<p>{{ item.idNumber.replace(/^(\d{6})\d{8}(.{4}$)/g, `$1${Array(9).join('*')}$2`) }}</p>
<div class="item-info">
<div class="item-info__item">
2022-09-27 09:49:19 +08:00
<image src="https://cdn.cunwuyun.cn/wxmp/pingchang/from-icon.png"/>
2022-09-22 17:41:38 +08:00
<span>{{ item.startAreaName }}</span>
</div>
<div class="item-info__item">
2022-09-27 09:49:19 +08:00
<image src="https://cdn.cunwuyun.cn/wxmp/pingchang/to-icon.png"/>
2022-09-22 17:41:38 +08:00
<span>{{ item.arriveAreaName }}</span>
</div>
<div class="item-info__item">
2022-09-27 09:49:19 +08:00
<image src="https://cdn.cunwuyun.cn/wxmp/pingchang/to-date.png"/>
2022-09-22 17:41:38 +08:00
<span>{{ item.arriveTime && item.arriveTime.substr(0, item.arriveTime.length - 3) }} 到达</span>
</div>
2022-09-23 16:09:06 +08:00
<div class="item-info__item">
2022-09-27 09:49:19 +08:00
<image src="https://cdn.cunwuyun.cn/wxmp/pingchang/kakou.png"/>
2022-09-23 16:09:06 +08:00
<span>{{ item.gatewayName }}</span>
</div>
2022-09-22 17:41:38 +08:00
</div>
</div>
<AiEmpty v-if="list.length==0"/>
</div>
<div class="btn-wrapper">
<div class="btn" @click="toReport" hover-class="text-hover">添加卡口登记</div>
</div>
2022-09-22 11:20:10 +08:00
</div>
2022-09-20 17:12:14 +08:00
</template>
<script>
2022-09-22 17:41:38 +08:00
import {mapState} from 'vuex'
2022-09-20 17:12:14 +08:00
export default {
2022-09-26 14:02:17 +08:00
name: "AppGetewayRegister",
2022-09-22 11:20:10 +08:00
appName: "卡口登记",
2022-09-20 17:12:14 +08:00
data() {
return {
2022-09-22 17:41:38 +08:00
list: [],
current: 1,
total: 0
2022-09-20 17:12:14 +08:00
}
},
2022-09-22 17:41:38 +08:00
computed: {
...mapState(['user'])
},
onLoad() {
this.$loading()
this.getList()
this.$dict.load('villageActivityStatus')
uni.$on('update', () => {
this.current = 1
this.$nextTick(() => {
this.getList()
})
})
},
methods: {
toReport() {
2022-09-27 08:56:51 +08:00
this.$linkTo('./getewayAdd')
2022-09-22 17:41:38 +08:00
},
getList() {
2022-09-23 16:09:06 +08:00
this.$instance.post(`/app/appepidemicpreventionregisterinfo/list`, null, {
2022-09-22 17:41:38 +08:00
params: {
2022-09-23 16:09:06 +08:00
createUserId: this.user.id,
2022-09-27 10:41:19 +08:00
infoType: '0',
2022-09-22 17:41:38 +08:00
current: this.current,
2022-09-23 16:09:06 +08:00
size: 10,
2022-09-22 17:41:38 +08:00
}
}).then(res => {
uni.hideLoading()
if (res?.data) {
this.total = res.data.total
2022-09-23 16:09:06 +08:00
this.list = this.current == 1? res.data.records:[...this.list, ...res.data.records]
2022-09-22 17:41:38 +08:00
}
}).catch(() => {
uni.hideLoading()
})
}
},
onReachBottom() {
this.current++
this.getList()
}
2022-09-20 17:12:14 +08:00
}
</script>
2022-09-22 17:41:38 +08:00
<style lang="scss" socped>
2022-09-26 14:02:17 +08:00
.AppGetewayRegister {
2022-09-22 17:41:38 +08:00
padding: 0 0 150px 0;
.title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32px;
padding: 48px 32px 0 32px;
& > h2 {
font-size: 38px;
color: #333;
font-weight: 600;
}
.right {
display: flex;
align-items: center;
span {
color: #666666;
font-size: 28px;
}
i {
color: #4181FF;
font-style: normal;
font-size: 28px;
}
}
}
.item {
margin: 0 32px 24px;
padding: 32px;
border-radius: 16px;
background: #fff;
.item-info {
.item-info__item {
display: flex;
margin-bottom: 8px;
line-height: 1.3;
&:last-child {
margin-bottom: 0;
}
image {
position: relative;
top: 2px;
width: 32px;
height: 32px;
margin-right: 16px;
}
span {
flex: 1;
color: #333;
font-size: 28px;
}
}
}
.item-top {
display: flex;
align-items: center;
height: 50px;
h2 {
color: #333333;
font-size: 36px;
font-weight: 600;
}
span {
font-size: 28px;
2022-09-23 18:03:52 +08:00
color: #999999;
margin-left: 16px;
2022-09-22 17:41:38 +08:00
}
}
p {
margin: 14px 0 20px;
color: #999999;
font-size: 28px;
}
}
}
</style>