疫情防控

This commit is contained in:
yanran200730
2022-01-12 08:36:15 +08:00
parent 3f27a09ffa
commit bdfc9cf3c7
6 changed files with 981 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<template>
<div class="AppHealthReport">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List.vue'
import Detail from './components/Detail.vue'
export default {
name: 'AppHealthReport',
label: '健康上报',
components: {
List,
Detail
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
data () {
return {
component: 'List',
params: {}
}
},
methods: {
onChange (data) {
if (data.type === 'list') {
this.component = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
}
}
}
</script>
<style lang="scss" scoped>
.AppHealthReport {
height: 100%;
}
</style>

View File

@@ -0,0 +1,142 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
<div v-show="currIndex === 0">
<ai-card title="基本信息" v-show="currIndex === 0">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.title"></ai-info-item>
<ai-info-item label="填报时间" :value="info.areaName"></ai-info-item>
<ai-info-item label="身份证号" :value="info.beginTime"></ai-info-item>
<ai-info-item label="手机号码" :value="info.endTime"></ai-info-item>
<ai-info-item label="人员类别" isLine :value="info.address"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="行程信息">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="出发时间" :value="info.title"></ai-info-item>
<ai-info-item label="出发地区" :value="info.areaName"></ai-info-item>
<ai-info-item label="出发地址" isLine :value="info.beginTime"></ai-info-item>
<ai-info-item label="出行方式" :value="info.endTime"></ai-info-item>
<ai-info-item label="行程描述" isLine :value="info.address"></ai-info-item>
<ai-info-item label="到达时间" :value="info.contactPerson"></ai-info-item>
<ai-info-item label="到达地区" isLine :value="info.contactPhone"></ai-info-item>
<ai-info-item label="返乡地址" isLine :value="info.contactPerson"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="健康状况">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="体温" :value="info.title"></ai-info-item>
<ai-info-item label="当前健康状况" :value="info.areaName"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="核酸检测">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="检测日期" :value="info.title"></ai-info-item>
<ai-info-item label="检测结果" :value="info.areaName"></ai-info-item>
<ai-info-item label="本人健康码截图" isLine></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
</div>
<ai-card title="异常处理" v-show="currIndex === 1">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="异常状况" :value="info.title"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
total: 0,
info: {},
id: '',
search: {
current: 1,
size: 10
},
currIndex: 0,
tableData: [],
colConfigs: [
{prop: 'name', label: '报名人员名称', align: 'center' },
{prop: 'createTime', label: '报名时间', align: 'center'},
{prop: 'phone', label: '联系方式', align: 'center' }
],
tabList: ['基本信息', '异常处理']
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
// this.getInfo(this.params.id)
// this.getList(this.params.id)
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appvillageactivityinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
// this.info.url = res.data.url ? JSON.parse(res.data.url) : []
}
})
},
getList (id) {
this.instance.post(`/app/appvillageactivityuser/list`, null, {
params: {
...this.search,
activityId: id
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -0,0 +1,239 @@
<template>
<ai-list class="list">
<ai-title slot="title" title="健康上报" v-if="search.areaId" isShowBottomBorder :instance="instance" :disabledLevel="disabledLevel" isShowArea v-model="search.areaId" @change="changeArea"></ai-title>
<template slot="content">
<div class="statistics-top">
<div class="statistics-top__item">
<span>返乡人数</span>
<h2 style="color: #2266FF;">{{ info.total }}</h2>
</div>
<div class="statistics-top__item">
<span>今日新增返乡</span>
<h2 style="color: #22AA99;">{{ info.today }}</h2>
</div>
<div class="statistics-top__item">
<span>异常人数</span>
<h2 style="color: #F8B425">{{ info.unusual }}</h2>
</div>
<div class="statistics-top__item">
<span>今日异常人数</span>
<h2 style="color: red">{{ info.todayUnusual }}</h2>
</div>
<div class="statistics-top__item">
<span>异常处理</span>
<h2 style="color: red">{{ info.release }}</h2>
</div>
</div>
<div class="content">
<ai-search-bar bottomBorder>
<template #left>
<ai-download :instance="instance" url="/app/apphomesteadinfo/export" :params="param" fileName="宅基地管理模板" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
<template #right>
<el-input
v-model="search.name"
size="small"
placeholder="请输入姓名"
clearable
@keyup.enter.native="search.current = 1, getList()"
@clear="search.current = 1, search.name = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
v-loading="loading"
style="margin-top: 16px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">返乡信息</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</div>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object
},
data () {
return {
search: {
current: 1,
size: 10,
name: '',
areaId: '',
},
info: {},
colConfigs: [
{ prop: 'name', label: '姓名' },
{ prop: 'phone', align: 'center', label: '电话' },
{ prop: 'startTime', align: 'center', label: '出发时间' },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区',
render: (h, {row}) => {
return h('span', null, row.startAreaName + row.startAreaName)
}
},
{ prop: 'arriveTime', align: 'center', label: '到达时间' },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区',
render: (h, {row}) => {
return h('span', null, row.arriveAreaName + row.arriveAddress)
}
},
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v.split(' ')[0] },
{ prop: 'status', align: 'center', label: '健康状态', formart: v => v === '0' ? '异常' : '正常' },
// { prop: 'type', align: 'center', label: '今日上报' }
],
ids: [],
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
}
},
computed: {
...mapState(['user']),
param () {
return {
}
}
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.search.areaId = this.user.info.areaId
this.loading = true
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
this.getList()
})
},
methods: {
getList () {
this.instance.post(`/app/appepidemicreportmember/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
this.loading = false
} else {
this.loading = false
}
}).catch(() => {
this.loading = false
})
this.getTotalInfo()
},
toDetail (id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
},
changeArea () {
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
},
getTotalInfo () {
this.instance.post(`/app/appepidemicbackhomerecord/statistic`).then(res => {
if (res.code == 0) {
this.info = res.data
}
})
}
}
}
</script>
<style scoped lang="scss">
.list {
::v-deep .ai-list__content {
padding: 0!important;
.ai-list__content--right-wrapper {
background: transparent!important;
box-shadow: none!important;
margin: 0!important;
padding: 12px 16px 12px!important;
}
}
.statistics-top {
display: flex;
align-items: center;
margin-bottom: 20px;
& > div {
flex: 1;
height: 96px;
line-height: 1;
margin-right: 20px;
padding: 16px 24px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
border-radius: 4px;
&:last-child {
margin-right: 0;
}
h3 {
font-size: 24px;
}
span {
display: block;
margin-bottom: 16px;
color: #888888;
font-size: 16px;
}
}
}
.content {
padding: 16px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
}
}
</style>

View File

@@ -0,0 +1,57 @@
<template>
<div class="AppReturnHomeRegister">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List.vue'
import Detail from './components/Detail.vue'
export default {
name: 'AppReturnHomeRegister',
label: '返乡登记',
components: {
List,
Detail
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
data () {
return {
component: 'List',
params: {}
}
},
methods: {
onChange (data) {
if (data.type === 'list') {
this.component = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
}
}
}
</script>
<style lang="scss" scoped>
.AppReturnHomeRegister {
height: 100%;
}
</style>

View File

@@ -0,0 +1,247 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="返乡登记详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
<div v-show="currIndex === 0">
<ai-card title="基本信息" v-show="currIndex === 0">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="填报时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="手机号码" :value="info.phone"></ai-info-item>
<ai-info-item label="人员类别" isLine :value="dict.getLabel('epidemicMemberType', info.type)"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="行程信息">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="出发时间" :value="info.startTime"></ai-info-item>
<ai-info-item label="出发地区" :value="info.startAreaName"></ai-info-item>
<ai-info-item label="出发地址" isLine :value="info.startAddress"></ai-info-item>
<ai-info-item label="出行方式" :value="dict.getLabel('epidemicRecentTravel', info.travelType)"></ai-info-item>
<ai-info-item label="行程描述" isLine :value="info.description"></ai-info-item>
<ai-info-item label="到达时间" :value="info.arriveTime"></ai-info-item>
<ai-info-item label="到达地区" isLine :value="info.arriveAreaName"></ai-info-item>
<ai-info-item label="返乡地址" isLine :value="info.arriveAddress"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="健康状况">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="体温" :value="info.temperature + '℃'"></ai-info-item>
<ai-info-item label="当前健康状况" :value="info.status === '0' ? '异常' : '正常'"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="核酸检测">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="检测日期" :value="info.checkTime && info.checkTime.split(' ')[0]"></ai-info-item>
<ai-info-item label="检测结果" :value="dict.getLabel('epidemicRecentTestResult', info.checkResult)"></ai-info-item>
<ai-info-item label="本人健康码截图" isLine>
<ai-uploader
:instance="instance"
v-model="info.checkPhoto"
disabled
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
</div>
<div v-show="currIndex === 1">
<ai-card title="异常处理">
<template #right>
<el-button type="primary" @click="release">解除异常</el-button>
</template>
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="填报时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="手机号码" :value="info.phone"></ai-info-item>
<ai-info-item label="人员类别" isLine :value="dict.getLabel('epidemicMemberType', info.type)"></ai-info-item>
<ai-info-item label="异常状况">
<span :style="{color: info.unusual ? 'red' : '#333'}">{{ info.unusual || '-' }}</span>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="异常情况记录">
<template #right>
<el-button type="primary" @click="isShow = true">添加</el-button>
</template>
<template #content>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="form.content = ''"
title="添加异常记录"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="记录" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请输入记录' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.content" clearable placeholder="请输入记录" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</div>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
total: 0,
info: {},
id: '',
search: {
current: 1,
size: 10
},
form: {
content: ''
},
isShow: false,
currIndex: 0,
tableData: [],
colConfigs: [
{prop: 'content', label: '说明', align: 'center' },
{prop: 'createTime', label: '创建时间', align: 'center'}
],
tabList: ['基本信息']
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.$dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicMemberType']).then(() => {
this.getInfo(this.params.id)
})
this.getList(this.params.id)
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appepidemicbackhomerecord/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.info.checkPhoto = res.data.checkPhoto ? JSON.parse(res.data.checkPhoto) : []
if (res.data.status === '0') {
this.tabList = ['基本信息', '异常处理']
} else {
this.tabList = ['基本信息']
}
}
})
},
release () {
this.$confirm('确定解除异常?').then(() => {
this.instance.post(`/app/appepidemicbackhomerecord/release?recordId=${this.params.id}`, {
id: this.params.id
}).then(res => {
if (res.code == 0) {
this.$message.success('解除异常成功!')
this.getInfo(this.params.id)
}
})
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appepidemicunusuallog/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList(this.params.id)
}
})
})
},
onConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appepidemicunusuallog/addOrUpdate', {
...this.form,
recordId: this.params.id
}).then(res => {
if (res?.code == 0) {
this.isShow = false
this.getList(this.params.id)
this.$message.success('添加成功!')
}
})
}
})
},
getList (id) {
this.instance.post(`/app/appepidemicunusuallog/list`, null, {
params: {
...this.search,
recordId: id
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -0,0 +1,239 @@
<template>
<ai-list class="list">
<ai-title slot="title" title="返乡登记" v-if="search.areaId" isShowBottomBorder :instance="instance" :disabledLevel="disabledLevel" isShowArea v-model="search.areaId" @change="changeArea"></ai-title>
<template slot="content">
<div class="statistics-top">
<div class="statistics-top__item">
<span>返乡人数</span>
<h2 style="color: #2266FF;">{{ info.total }}</h2>
</div>
<div class="statistics-top__item">
<span>今日新增返乡</span>
<h2 style="color: #22AA99;">{{ info.today }}</h2>
</div>
<div class="statistics-top__item">
<span>异常人数</span>
<h2 style="color: #F8B425">{{ info.unusual }}</h2>
</div>
<div class="statistics-top__item">
<span>今日异常人数</span>
<h2 style="color: red">{{ info.todayUnusual }}</h2>
</div>
<div class="statistics-top__item">
<span>异常处理</span>
<h2 style="color: red">{{ info.release }}</h2>
</div>
</div>
<div class="content">
<ai-search-bar bottomBorder>
<template #left>
<ai-download :instance="instance" url="/app/apphomesteadinfo/export" :params="param" fileName="宅基地管理模板" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
<template #right>
<el-input
v-model="search.name"
size="small"
placeholder="请输入姓名"
clearable
@keyup.enter.native="search.current = 1, getList()"
@clear="search.current = 1, search.name = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
v-loading="loading"
style="margin-top: 16px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">返乡信息</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</div>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object
},
data () {
return {
search: {
current: 1,
size: 10,
name: '',
areaId: '',
},
info: {},
colConfigs: [
{ prop: 'name', label: '姓名' },
{ prop: 'phone', align: 'center', label: '电话' },
{ prop: 'startTime', align: 'center', label: '出发时间' },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区',
render: (h, {row}) => {
return h('span', null, row.startAreaName + row.startAreaName)
}
},
{ prop: 'arriveTime', align: 'center', label: '到达时间' },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区',
render: (h, {row}) => {
return h('span', null, row.arriveAreaName + row.arriveAddress)
}
},
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v.split(' ')[0] },
{ prop: 'status', align: 'center', label: '健康状态', formart: v => v === '0' ? '异常' : '正常' },
// { prop: 'type', align: 'center', label: '今日上报' }
],
ids: [],
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
}
},
computed: {
...mapState(['user']),
param () {
return {
}
}
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.search.areaId = this.user.info.areaId
this.loading = true
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
this.getList()
})
},
methods: {
getList () {
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
this.loading = false
} else {
this.loading = false
}
}).catch(() => {
this.loading = false
})
this.getTotalInfo()
},
toDetail (id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
},
changeArea () {
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
},
getTotalInfo () {
this.instance.post(`/app/appepidemicbackhomerecord/statistic`).then(res => {
if (res.code == 0) {
this.info = res.data
}
})
}
}
}
</script>
<style scoped lang="scss">
.list {
::v-deep .ai-list__content {
padding: 0!important;
.ai-list__content--right-wrapper {
background: transparent!important;
box-shadow: none!important;
margin: 0!important;
padding: 12px 16px 12px!important;
}
}
.statistics-top {
display: flex;
align-items: center;
margin-bottom: 20px;
& > div {
flex: 1;
height: 96px;
line-height: 1;
margin-right: 20px;
padding: 16px 24px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
border-radius: 4px;
&:last-child {
margin-right: 0;
}
h3 {
font-size: 24px;
}
span {
display: block;
margin-bottom: 16px;
color: #888888;
font-size: 16px;
}
}
}
.content {
padding: 16px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
}
}
</style>