核酸采样,社区管理
This commit is contained in:
236
src/project/pingchang/AppCommunityManagement/Detail.vue
Normal file
236
src/project/pingchang/AppCommunityManagement/Detail.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<div class="Detail">
|
||||
<div class="info">
|
||||
<div class="title">基本信息</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">管理区域</div>
|
||||
<div class="value">{{info.areaName}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">管理对象</div>
|
||||
<div class="value">{{info.name}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">身份证号</div>
|
||||
<div class="value">{{info.idNumberText}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">手机号码</div>
|
||||
<div class="value" style="color:#4181FF;" @click="callPhone(info.phone)">
|
||||
<img :src="$cdn + 'common/phone.png'" alt="" class="phone-icon" >
|
||||
{{info.phone}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">居家状态</div>
|
||||
<div class="value">{{$dict.getLabel('EP_homeStatus2', info.homeStatus)}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">隔离时间</div>
|
||||
<div class="value">{{info.quarantineBeginTime}}至{{info.quarantineEndTime}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">隔离策略</div>
|
||||
<div class="value">{{$dict.getLabel('EP_quarantineStrategy', info.quarantineStrategy)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-bg"></div>
|
||||
<div class="info">
|
||||
<div class="item-flex">
|
||||
<div class="label">管控内容</div>
|
||||
</div>
|
||||
<p style="padding-bottom: 12px;">{{info.controllerContent}}</p>
|
||||
<div class="img-list" v-for="(item, index) in info.fileList" :key="index">
|
||||
<img :src="item.accessUrl" alt="" @click="previewImage(info.fileList, item.accessUrl)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer" v-if="info.status != 2">
|
||||
<div class="cancel" @click="toEdit()">编辑</div>
|
||||
<div class="confirm" @click="changeStatus()">解除管理</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
onShow() {
|
||||
document.title = '管理信息'
|
||||
},
|
||||
onLoad(option) {
|
||||
this.$dict.load('EP_homeStatus2', 'EP_quarantineStrategy').then(() => {
|
||||
this.id = option.id
|
||||
this.getDetail()
|
||||
})
|
||||
uni.$on('updateDetail', () => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.info = res.data
|
||||
this.info.idNumberText = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
|
||||
}
|
||||
})
|
||||
},
|
||||
changeStatus() {
|
||||
this.info.status = 2
|
||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/troubleshooting`, this.info).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('updateList')
|
||||
this.getDetail()
|
||||
}
|
||||
})
|
||||
},
|
||||
callPhone(phone) {
|
||||
uni.makePhoneCall({phoneNumber: phone})
|
||||
},
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map(v => v.url),
|
||||
current: img
|
||||
})
|
||||
},
|
||||
toEdit() {
|
||||
uni.navigateTo({url: `./Add?id=${this.id}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Detail {
|
||||
.info{
|
||||
background-color: #fff;
|
||||
padding: 0 32px;
|
||||
.title{
|
||||
line-height: 116px;
|
||||
background: #FFF;
|
||||
font-size: 38px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.item-flex{
|
||||
padding: 34px 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 44px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
.label{
|
||||
width: 206px;
|
||||
color: #999;
|
||||
}
|
||||
.value{
|
||||
width: calc(100% - 206px);
|
||||
word-break: break-all;
|
||||
color: #333;
|
||||
text-align: right;
|
||||
.phone-icon{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.color-0{
|
||||
color: #42D784;
|
||||
}
|
||||
.color-1{
|
||||
color: #f46;
|
||||
}
|
||||
.color-2{
|
||||
color: #1365DD;
|
||||
}
|
||||
}
|
||||
.img-list{
|
||||
padding-bottom: 32px;
|
||||
img{
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
}
|
||||
}
|
||||
.item-flex:nth-last-of-type(1){
|
||||
border-bottom: 0;
|
||||
}
|
||||
.error-list {
|
||||
padding-bottom: 48px;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #f4f7fe;
|
||||
border-radius: 8px;
|
||||
padding: 24px 24px 18px 24px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 16px;
|
||||
color: #343d65;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
line-height: 40px;
|
||||
div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-p{
|
||||
line-height: 44px;
|
||||
color: #333;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
}
|
||||
.line-bg{
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
background-color: #F3F6F9;
|
||||
}
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 128px;
|
||||
background: #FFF;
|
||||
box-shadow: inset 0 0 0 0 #D4D4D4;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
div {
|
||||
flex: 1;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #FFF;
|
||||
border-radius: 8px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
.cancel {
|
||||
color: #333;
|
||||
line-height: 76px;
|
||||
border: 1px solid #CCCCCC;
|
||||
box-sizing: border-box;
|
||||
margin-right: 32px;
|
||||
}
|
||||
.confirm {
|
||||
background-color: #1365DD;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.border-none{
|
||||
border-bottom: 0!important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user