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

418 lines
12 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">
<div class="tab-item">
<h2 style="color:#5AAD6A;">{{totalInfo['今日登记']}}</h2>
<p>今日返乡</p>
</div>
<div class="tab-item">
<h2 style="color:#F5A319;">{{totalInfo['今日风险']}}</h2>
<p>今日新增</p>
</div>
<div class="tab-item">
<h2 style="color:#CD413A;border-right:0;">{{totalInfo['风险处理']}}</h2>
<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">
<!-- <AiAreaPicker v-model="areaId" :areaId="cropAreaId" @select="areaSelect" :name.sync="areaName" style="color: #666" selectRoot>
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
<span v-else style="color:#999;">地区选择</span>
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker> -->
<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
<u-calendar v-model="showDate" mode="range" @change="changeDate"></u-calendar>
</div>
<div class="item" @click="showTypeSelect=true">
<span v-if="infoType === ''" style="color:#999;">处置意见</span>
<span v-else>{{ $dict.getLabel('EP_handleType', infoType) }}</span>
<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">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(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-23 18:13:16 +08:00
<span class="type">{{$dict.getLabel('EP_registerInfoType', item.infoType)}}</span>
2022-09-26 10:51:06 +08:00
</div>
2022-09-26 15:56:02 +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-09-22 15:36:02 +08:00
</div>
</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>
<p> 出发地-目的地</p>
2022-11-18 09:30:08 +08:00
<p> 处置意见<span :class="'type-'+item.lastRiskDisposal.handleType">{{$dict.getLabel('EP_handleType', item.lastRiskDisposal.handleType)}}</span></p>
2022-11-23 18:13:16 +08:00
<div class="btn" v-if="item.status != 2" @click.stop="toEdit(item.id)">管理</div>
2022-09-26 10:51:06 +08:00
<img src="./components/img/status-img.png" alt="" class="status-img" v-else>
2022-09-22 15:36:02 +08:00
</div>
<div class="bottom">
2022-11-23 18:13:16 +08:00
<div class="text">
<!-- 管控人<span> {{item.controllerUserName}}</span> -->
抵平时间{{item.createTime}}
</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-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-09-26 10:51:06 +08:00
infoType: '',
showTypeSelect: false,
2022-09-22 15:36:02 +08:00
tabList: [
{
name: '待管理',
},
{
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-10-09 15:13:27 +08:00
// this.areaId = this.user.areaId
// this.areaName = this.user.areaName
2022-11-18 09:30:08 +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-23 18:13:16 +08:00
var startDate = this.dateList[0] + ' 00:00:00'
var endDate = this.dateList[1] + ' 00:00:00'
this.$http.post('/app/appepidemicpreventioncommunitymanagement/list', null, {
params: {
size: 10,
current: this.current,
status: this.currentTabs,
areaId: this.areaId, name:
this.keyword,
infoType: this.infoType
},
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-09-26 10:51:06 +08:00
toDetail(id) {
uni.navigateTo({url: `./Detail?id=${id}`})
},
toEdit(id) {
uni.navigateTo({url: `./Add?id=${id}`})
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-09-22 15:36:02 +08:00
},
2022-09-26 10:51:06 +08:00
typeConfirm(e) {
this.infoType = e[0].value
this.getListInit()
2022-11-23 18:13:16 +08:00
},
getTotal() {
this.$http.post(`/app/appepidemicpreventionregisterinfo/listStatistics?areaId=${this.areaId}&infoType=0`).then((res) => {
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;
bottom: 32px;
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 {
display: inline-block;
color: #3975C6;
margin-right: 32px;
}
}
}
}
}
</style>