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

442 lines
13 KiB
Vue
Raw Normal View History

2022-09-22 15:36:02 +08:00
<template>
<div class="AppCommunityManagement">
<AiTopFixed>
2022-11-23 18:13:16 +08:00
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
2022-09-22 15:36:02 +08:00
inactive-color="#A1C1E8" :bar-style="barStyle" :active-item-style="activeStyle" active-color="#ffffff " @change="change">
</u-tabs>
2022-11-23 18:13:16 +08:00
<div class="header">
2022-11-24 12:34:22 +08:00
<div class="tab-item" v-if="!currentTabs">
<h2 style="color:#5AAD6A;">{{totalInfo['待管理']}}</h2>
<p>待管理</p>
</div>
<div class="tab-item" v-if="currentTabs == 1">
<h2 style="color:#5AAD6A;">{{totalInfo['管理中']}}</h2>
<p>管理中</p>
</div>
<div class="tab-item" v-if="currentTabs == 2">
<h2 style="color:#5AAD6A;">{{totalInfo['已解除']}}</h2>
<p>已解除</p>
2022-11-23 18:13:16 +08:00
</div>
<div class="tab-item">
2022-11-24 12:34:22 +08:00
<h2 style="color:#F5A319;">{{totalInfo['今日新增']}}</h2>
2022-11-23 18:13:16 +08:00
<p>今日新增</p>
</div>
<div class="tab-item">
2022-11-24 12:34:22 +08:00
<h2 style="color:#CD413A;border-right:0;">{{totalInfo['新增风险']}}</h2>
2022-11-23 18:13:16 +08:00
<p>新增风险</p>
</div>
2022-09-22 15:36:02 +08:00
</div>
2022-11-23 18:13:16 +08:00
<div class="top-search">
<div class="left">
2022-10-09 15:13:27 +08:00
<AiAreaPicker v-model="areaId" :areaId="cropAreaId" @select="areaSelect" :name.sync="areaName" style="color: #666" selectRoot>
2022-09-22 15:36:02 +08:00
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
2022-09-26 10:51:06 +08:00
<span v-else style="color:#999;">地区选择</span>
2022-09-22 15:36:02 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
2022-11-23 18:13:16 +08:00
<div class="right">
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名/手机号/身份证号" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
<div class="top-select">
<div class="item" @click="showDate=true">
<span v-if="!dateList.length" style="color:#999;">选择日期</span>
<span v-else>{{ dateList[0] }}-{{dateList[1]}}</span>
2022-09-22 15:36:02 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
2022-11-23 18:13:16 +08:00
</div>
<div class="item" @click="showTypeSelect=true">
2022-11-24 12:34:22 +08:00
<span v-if="handleType === ''" style="color:#999;">处置意见</span>
<span v-else>{{ $dict.getLabel('EP_handleType', handleType) }}</span>
2022-11-23 18:13:16 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</div>
2022-09-22 15:36:02 +08:00
</div>
</AiTopFixed>
2022-09-26 10:51:06 +08:00
<div class="data-list" v-if="list && list.length">
2022-11-24 12:34:22 +08:00
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item.status, item.id)">
2022-09-22 15:36:02 +08:00
<div class="top">
<div class="title">
<div class="name">
2022-09-26 10:51:06 +08:00
{{item.name}}
2022-11-25 15:52:13 +08:00
<span class="type">{{$dict.getLabel('EP_registerInfoType', item.infoType)}}</span>
2022-09-26 10:51:06 +08:00
</div>
2022-11-25 17:22:56 +08:00
<!-- <div class="status" :class="item.nucleicAcidSamplingCount >0 ? 'status1' : 'status0'">
2022-09-26 10:51:06 +08:00
<span class="cir"></span>
2022-09-26 15:56:02 +08:00
<span v-if="item.nucleicAcidSamplingCount >0">核酸采样{{item.nucleicAcidSamplingCount}}</span>
2022-09-26 10:51:06 +08:00
<span v-else>核酸未采样</span>
2022-11-25 17:22:56 +08:00
</div> -->
2022-09-22 15:36:02 +08:00
</div>
2022-09-26 10:51:06 +08:00
<p> {{item.idNumberText}}</p>
2022-11-23 18:13:16 +08:00
<p>{{item.phone}}</p>
2022-11-30 09:04:49 +08:00
<p>
<span v-if="item.registerInfo && item.registerInfo.startAreaName">{{item.registerInfo.startAreaName}}</span>
<span v-if="item.registerInfo && item.registerInfo.arriveAreaName">-{{item.registerInfo.arriveAreaName}}</span>
</p>
2022-12-01 15:53:53 +08:00
<p v-if="item.registerInfo && item.registerInfo.gatewayName">抵平卡口<span > {{item.registerInfo.gatewayName}}</span> </p>
2022-11-25 10:04:55 +08:00
<p v-if="item.lastRiskDisposal && item.lastRiskDisposal.handleType != 7 && item.lastRiskDisposal.handleType != null">处置意见:<span :class="'type-'+item.lastRiskDisposal.handleType">{{$dict.getLabel('EP_handleType', item.lastRiskDisposal.handleType)}}</span></p>
2022-11-25 10:57:37 +08:00
<div class="btn" v-if="item.status == 0">管理</div>
2022-11-24 15:42:41 +08:00
<div class="btn" v-if="item.status == 1" @click.stop="toManage(item.id)">排查</div>
2022-11-24 12:34:22 +08:00
<img src="./components/img/status-img.png" alt="" class="status-img" v-if="item.status == 2">
2022-09-22 15:36:02 +08:00
</div>
2022-12-01 16:04:36 +08:00
<div class="bottom" v-if="item.registerInfo && item.registerInfo.arriveTime">
2022-11-23 18:13:16 +08:00
<div class="text">
2022-11-24 12:34:22 +08:00
抵平时间{{item.registerInfo.arriveTime}}
2022-11-23 18:13:16 +08:00
</div>
2022-09-22 15:36:02 +08:00
</div>
</div>
</div>
2022-09-26 10:51:06 +08:00
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
2022-11-25 13:23:36 +08:00
<AiAdd @add="add" v-if="!currentTabs"/>
2022-11-25 10:04:55 +08:00
<u-calendar v-model="showDate" mode="range" @change="changeDate"></u-calendar>
2022-09-27 14:56:05 +08:00
<u-select v-model="showTypeSelect" :list="registerTypeList" label-name="dictName" value-name="dictValue" @confirm="typeConfirm"></u-select>
2022-09-22 15:36:02 +08:00
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
2022-11-15 15:21:41 +08:00
appName: '社区管理',
2022-09-22 15:36:02 +08:00
data() {
return {
2022-09-26 10:51:06 +08:00
areaId: '',
areaName: '',
2022-09-23 17:55:35 +08:00
current: 1,
2022-09-22 15:36:02 +08:00
keyword: '',
currentTabs: 0,
2022-11-24 12:34:22 +08:00
handleType: '',
2022-09-26 10:51:06 +08:00
showTypeSelect: false,
2022-09-22 15:36:02 +08:00
tabList: [
{
2022-11-25 10:04:55 +08:00
name: '待管理',
2022-09-22 15:36:02 +08:00
},
{
2022-11-23 18:13:16 +08:00
name: '管理中',
2022-09-22 15:36:02 +08:00
},
{
name: '已解除',
},
],
barStyle: {
'width': '24px',
2022-11-23 18:13:16 +08:00
'height': '2px',
2022-09-22 15:36:02 +08:00
'border-radius': '0',
'bottom': '5px'
},
activeStyle: {
'font-weight' : '400',
2022-09-26 10:51:06 +08:00
},
2022-09-27 14:56:05 +08:00
list: [],
2022-10-09 15:13:27 +08:00
registerTypeList: [],
2022-11-23 18:13:16 +08:00
cropAreaId: '',
totalInfo: {},
showDate: false,
dateList: []
2022-09-22 15:36:02 +08:00
}
},
computed: {
...mapState(['user']),
},
onLoad() {
2022-11-24 12:34:22 +08:00
this.areaId = this.user.areaId
this.areaName = this.user.areaName
2022-11-25 15:52:13 +08:00
this.$dict.load('EP_CM_status', 'EP_registerInfoType', 'EP_handleType').then(() => {
2022-11-23 18:13:16 +08:00
this.registerTypeList = this.$dict.getDict('EP_handleType')
2022-09-27 14:56:05 +08:00
this.registerTypeList.unshift({dictValue: '', dictName: '全部'})
2022-09-26 10:51:06 +08:00
this.getListInit()
2022-11-23 18:13:16 +08:00
this.getTotal()
2022-09-26 10:51:06 +08:00
})
uni.$on('updateList', () => {
this.getListInit()
2022-11-23 18:13:16 +08:00
this.getTotal()
2022-09-26 10:51:06 +08:00
})
2022-10-09 15:13:27 +08:00
this.getCropAreaId()
2022-09-22 15:36:02 +08:00
},
onShow() {
document.title = '社区管理'
},
methods: {
2022-10-09 15:13:27 +08:00
getCropAreaId() {
2022-10-09 16:42:20 +08:00
this.$http.post(`/app/appdvcpconfig/getCorpArea`).then((res) => {
2022-10-09 15:13:27 +08:00
if (res.code == 0) {
this.areaId = res.data
this.cropAreaId = res.data
}
})
},
2022-09-23 17:55:35 +08:00
getListInit() {
this.current = 1
2022-09-26 10:51:06 +08:00
this.list = []
2022-09-23 17:55:35 +08:00
this.getList()
},
2022-09-22 15:36:02 +08:00
getList() {
2022-11-25 09:46:23 +08:00
var startDate = this.dateList?.length ? this.dateList[0] + ' 00:00:00' : ''
2022-11-28 15:14:57 +08:00
var endDate = this.dateList?.length ? this.dateList[1] + ' 23:59:59' : ''
2022-11-23 18:13:16 +08:00
this.$http.post('/app/appepidemicpreventioncommunitymanagement/list', null, {
params: {
size: 10,
current: this.current,
status: this.currentTabs,
areaId: this.areaId, name:
this.keyword,
2022-11-24 12:34:22 +08:00
queryBeginTime: startDate,
queryEndTime: endDate,
handleType: this.handleType
2022-11-23 18:13:16 +08:00
},
2022-09-22 15:36:02 +08:00
}).then((res) => {
if (res.code == 0) {
2022-09-26 10:51:06 +08:00
res.data.records.map((item) => {
item.idNumberText = item.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
})
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
2022-09-22 15:36:02 +08:00
}
})
},
2022-11-24 12:34:22 +08:00
toDetail(status, id) {
console.log(status, id)
if(status == 0) {
uni.navigateTo({url: `./HandleDetail?id=${id}`})
2022-11-25 11:28:12 +08:00
}else if(status == 1) {
uni.navigateTo({url: `./ManageDetail?id=${id}&currentTabs=1`})
} else{
2022-11-24 12:34:22 +08:00
uni.navigateTo({url: `./Detail?id=${id}`})
}
2022-09-26 10:51:06 +08:00
},
2022-11-25 10:57:37 +08:00
// toEdit(id) {
// uni.navigateTo({url: `./Edit?id=${id}&fromType=2`})
// },
2022-11-24 15:42:41 +08:00
toManage(id) {
2022-11-25 11:28:12 +08:00
uni.navigateTo({url: `./ManageDetail?id=${id}&currentTabs=0`})
2022-09-22 15:36:02 +08:00
},
2022-11-25 10:57:37 +08:00
add() {
uni.navigateTo({url: `./Edit?fromType=0`})
},
2022-09-22 15:36:02 +08:00
change(index) {
this.keyword = ''
this.currentTabs = index
2022-09-26 10:51:06 +08:00
this.getListInit()
2022-09-22 15:36:02 +08:00
},
areaSelect(e) {
this.areaId = e
2022-09-23 17:55:35 +08:00
this.getListInit()
2022-11-24 12:34:22 +08:00
this.getTotal()
2022-09-22 15:36:02 +08:00
},
2022-09-26 10:51:06 +08:00
typeConfirm(e) {
2022-11-24 12:34:22 +08:00
this.handleType = e[0].value
2022-09-26 10:51:06 +08:00
this.getListInit()
2022-11-23 18:13:16 +08:00
},
getTotal() {
2022-11-24 12:34:22 +08:00
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/listStatistics?areaId=${this.areaId}`).then((res) => {
2022-11-23 18:13:16 +08:00
if (res.code == 0) {
this.totalInfo = res.data
}
})
},
changeDate(e) {
console.log(e)
this.dateList = [e.startDate, e.endDate]
this.getListInit()
},
2022-09-22 15:36:02 +08:00
},
onReachBottom() {
this.current++
this.getList()
},
}
</script>
<style scoped lang="scss">
.AppCommunityManagement {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
2022-11-23 18:13:16 +08:00
.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;
}
}
2022-09-22 15:36:02 +08:00
.top-search {
padding: 20px 32px;
2022-11-23 18:13:16 +08:00
display: flex;
.left {
width: 240px;
}
.right {
width: calc(100% - 240px);
}
2022-09-22 15:36:02 +08:00
}
.top-select {
display: flex;
padding: 28px 0;
.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;
}
}
}
.data-list {
padding: 32px 32px 0;
.item {
width: 100%;
background: #FFF;
border-radius: 16px;
2022-09-27 17:56:22 +08:00
margin-bottom: 24px;
2022-09-22 15:36:02 +08:00
.top {
padding: 32px 32px 24px 32px;
position: relative;
.title {
display: flex;
justify-content: space-between;
margin-bottom: 24px;
.name {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 32px;
color: #000;
.type {
line-height: 34px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24px;
color: #3975C6;
padding: 2px 4px;
background-color: #F6F9F5;
margin-left: 24px;
}
}
.status {
line-height: 20px;
font-family: PingFangSC-Regular;
font-size: 28px;
2022-09-26 10:51:06 +08:00
.cir {
2022-09-22 15:36:02 +08:00
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
}
.status0 {
color: #FFA938;
2022-09-26 10:51:06 +08:00
.cir {
2022-09-22 15:36:02 +08:00
background-color: #FFA938;
}
}
.status0 {
color: #1CCEB0;
2022-09-26 10:51:06 +08:00
.cir {
2022-09-22 15:36:02 +08:00
background-color: #1CCEB0;
}
}
}
p {
line-height: 40px;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #666;
margin-bottom: 8px;
}
2022-11-18 09:30:08 +08:00
.type-1,
.type-5{
color: #42D784;
}
.type-2,
.type-3{
color: #f46;
}
.type-4{
color: #FFA938;
}
2022-09-22 15:36:02 +08:00
.btn {
width: 160px;
height: 56px;
text-align: center;
line-height: 54px;
background: #FFF;
border: 1px solid #1365DD;
border-radius: 4px;
box-sizing: border-box;
position: absolute;
2022-11-25 17:22:56 +08:00
top: 40px;
2022-09-22 15:36:02 +08:00
right: 32px;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #1365DD;
}
.status-img {
position: absolute;
bottom: 0;
right: 32px;
width: 160px;
height: 160px;
}
}
.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 {
2022-11-25 14:22:10 +08:00
// display: inline-block;
// color: #3975C6;
// margin-right: 32px;
2022-09-22 15:36:02 +08:00
}
}
}
}
}
</style>