目录名称修正
This commit is contained in:
479
src/saas/AppBackUserList/AppBackUserList.vue
Normal file
479
src/saas/AppBackUserList/AppBackUserList.vue
Normal file
@@ -0,0 +1,479 @@
|
||||
<template>
|
||||
<div class="BackUserList">
|
||||
<AiTopFixed v-if="isAdmin">
|
||||
<div class="pad-t32"></div>
|
||||
<div class="select-gird" @click="showSelect=true">
|
||||
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
|
||||
<div>
|
||||
{{girdName}}
|
||||
<img src="./components/img/down-icon.png" alt="" class="down-icon">
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="tab-item">
|
||||
<h2 style="color:#2C51CE;">{{totalInfo.total}}</h2>
|
||||
<p>返乡人员</p>
|
||||
</div>
|
||||
<div class="tab-item">
|
||||
<h2 style="color:#5AAD6A;">{{totalInfo.today}}</h2>
|
||||
<p>今日返乡</p>
|
||||
</div>
|
||||
<div class="tab-item">
|
||||
<h2 style="color:#F5A319;">{{totalInfo.todayUnusual}}</h2>
|
||||
<p>今日异常</p>
|
||||
</div>
|
||||
<div class="tab-item">
|
||||
<h2 style="color:#CD413A;border-right:0;">{{totalInfo.release}}</h2>
|
||||
<p>异常处理</p>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</AiTopFixed>
|
||||
<div class="user-list" v-if="isAdmin">
|
||||
<div class="item" @click="toUser(item)" v-for="(item,index) in list" :key="index">
|
||||
<h2 class="name">{{item.name}}<span class="status" v-if="item.status == 0">有异常</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.createTime}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length && isAdmin"></AiEmpty>
|
||||
<div v-if="!isAdmin" class="empty">
|
||||
<img src="./components/img/no-admin.png" alt="">
|
||||
<p>没有网格员权限<br />无法查看返乡登记哦~</p>
|
||||
</div>
|
||||
<div class="pad-b120"></div>
|
||||
<div class="footer">
|
||||
<div class="bg-fff" @click="linkTo(`./Add?arriveGirdId=${girdId}&arriveGirdName=${girdName}`)">登记</div>
|
||||
<div class="bg-blue" @click="show=true">邀请居民填写</div>
|
||||
</div>
|
||||
<u-popup v-model="show" mode="bottom" border-radius="14">
|
||||
<div class="line-bg"></div>
|
||||
<div class="flex">
|
||||
<div class="item" @click="share">
|
||||
<img src="./components/img/zf.png" alt="">
|
||||
<p>转发</p>
|
||||
</div>
|
||||
<div class="item" @click="shareWechat">
|
||||
<img src="./components/img/wx.png" alt="">
|
||||
<p>分享到微信</p>
|
||||
</div>
|
||||
<div class="item" @click="copy">
|
||||
<img src="./components/img/lj.png" alt="">
|
||||
<p>获取链接</p>
|
||||
</div>
|
||||
<div class="item" @click="linkTo(`./Qrcode?girdId=${girdId}&girdName=${girdName}`)">
|
||||
<img src="./components/img/ewm.png" alt="">
|
||||
<p>保存二维码</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="show=false">取消</div>
|
||||
</u-popup>
|
||||
<u-select v-model="showSelect" :list="girdList" label-name="girdName" value-name="id" @confirm="confirmSelect"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import qs from "query-string"
|
||||
export default {
|
||||
appName: '返乡登记',
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
current: 1,
|
||||
list: [],
|
||||
name: '',
|
||||
totalInfo: {},
|
||||
isAdmin: true,
|
||||
show: false,
|
||||
girdList: [],
|
||||
girdName: '',
|
||||
girdId: '',
|
||||
showSelect: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
params() {
|
||||
return qs.parse(decodeURIComponent(location.search))
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '返乡登记'
|
||||
this.isGirdUser()
|
||||
},
|
||||
methods: {
|
||||
confirmSelect(e) {
|
||||
console.log(e)
|
||||
this.girdId = e[0].value
|
||||
this.girdList.map((item) => {
|
||||
if(item.id == this.girdId) {
|
||||
this.girdName = item.girdName
|
||||
}
|
||||
})
|
||||
this.getListInit()
|
||||
this.getTotal()
|
||||
},
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
this.getListInit()
|
||||
},
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.list = []
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
var status = ''
|
||||
if(this.tabIndex == 1) {
|
||||
status = 0
|
||||
}
|
||||
this.$http.post(`/app/appepidemicbackhomerecord/list?current=${this.current}&size=10&status=${status}&name=${this.name}&arriveGirdId=${this.girdId}`)
|
||||
.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
|
||||
}
|
||||
})
|
||||
},
|
||||
getTotal() {
|
||||
this.$http.post(`/app/appepidemicbackhomerecord/statistic?arriveGirdId=${this.girdId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.totalInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
toUser(row) {
|
||||
uni.navigateTo({url: `./UserInfo?id=${row.id}`})
|
||||
},
|
||||
linkTo(url) {
|
||||
uni.navigateTo({ url })
|
||||
},
|
||||
isGirdUser() {
|
||||
this.isAdmin = false
|
||||
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.checkType != '0') {
|
||||
this.isAdmin = true
|
||||
this.params = res.data.appGirdInfo
|
||||
this.getGirdList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getGirdList() {
|
||||
this.$http.post('/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser').then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.girdList = res.data
|
||||
this.girdId = res.data[0].id
|
||||
this.girdName = res.data[0].girdName
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.show = false
|
||||
},
|
||||
open() {
|
||||
this.show = true
|
||||
},
|
||||
copy() {
|
||||
let oInput = document.createElement('input')
|
||||
oInput.value = this.params.linkUrl
|
||||
document.body.appendChild(oInput)
|
||||
oInput.select()
|
||||
document.execCommand('Copy')
|
||||
this.$u.toast('已复制')
|
||||
oInput.remove()
|
||||
},
|
||||
share() {
|
||||
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
|
||||
this.wxInvoke(['shareAppMessage', {
|
||||
title: this.params.title,
|
||||
desc: this.params.tableExplain,
|
||||
link: this.params.linkUrl,
|
||||
imgUrl: this.params.headPicture
|
||||
}])
|
||||
})
|
||||
},
|
||||
shareWechat() {
|
||||
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
|
||||
this.wxInvoke(['shareWechatMessage', {
|
||||
title: this.params.title,
|
||||
desc: this.params.tableExplain,
|
||||
link: this.params.linkUrl,
|
||||
imgUrl: this.params.headPicture
|
||||
}])
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.BackUserList {
|
||||
.header{
|
||||
padding: 54px 32px 48px 32px;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
margin-bottom: 4px;
|
||||
.tab-item{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
h2{
|
||||
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;
|
||||
}
|
||||
p{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
margin-top: -22px;
|
||||
}
|
||||
}
|
||||
.tab-item:nth-last-of-type(1) {
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
.search{
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
.left{
|
||||
width: calc(100% - 402px);
|
||||
}
|
||||
}
|
||||
.tab-select{
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
background: #FFF;
|
||||
display: flex;
|
||||
margin-bottom: 4px;
|
||||
.item{
|
||||
flex: 1;
|
||||
font-size: 32px;
|
||||
line-height: 96px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
.active{
|
||||
color: #135AB8;
|
||||
position: relative;
|
||||
span{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 192px;
|
||||
margin-left: -96px;
|
||||
border-bottom: 4px solid #135AB8;
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-list{
|
||||
.item{
|
||||
padding: 32px 64px 24px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 8px;
|
||||
.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;
|
||||
color: #FF4466;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
p{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
margin-bottom: 8px;
|
||||
img{
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 18px;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
.start-name{
|
||||
display: inline-block;
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
.color-999{
|
||||
margin-bottom: 24px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .AiTopFixed {
|
||||
.placeholder {
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
|
||||
}
|
||||
}
|
||||
.fixed {
|
||||
margin: 0 !important;
|
||||
background-color: #f5f5f5!important;
|
||||
.content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pad-t32{
|
||||
padding-top: 32px;
|
||||
}
|
||||
.select-gird{
|
||||
width: calc(100% - 60px);
|
||||
padding: 24px 32px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 30px 32px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
img{
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
div{
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
box-sizing: border-box;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
img{
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 112px;
|
||||
height: 48px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #3F8DF5;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
.empty{
|
||||
text-align: center;
|
||||
img{
|
||||
width: 282px;
|
||||
height: 306px;
|
||||
margin: 136px auto 0;
|
||||
}
|
||||
p{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
.pad-b120{
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
.footer{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
line-height: 110px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
z-index: 99;
|
||||
.bg-fff{
|
||||
flex: 1;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
.bg-blue{
|
||||
flex: 2;
|
||||
color: #fff;
|
||||
background-color: #3975C6;
|
||||
}
|
||||
}
|
||||
.line-bg{
|
||||
width: 110px;
|
||||
height: 8px;
|
||||
background: #DCDDDE;
|
||||
border-radius: 4px;
|
||||
margin: 32px auto 82px;
|
||||
}
|
||||
.flex{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-bottom: 70px;
|
||||
.item{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
img{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 16px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
p{
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
line-height: 96px;
|
||||
text-align: center;
|
||||
background: #FFF;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
::v-deep .uni-scroll-view{
|
||||
background-color:#f7f7f7;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user