整合工程

This commit is contained in:
aixianling
2024-08-06 17:53:52 +08:00
parent 01cd905669
commit d2e63c2588
66 changed files with 2017 additions and 8444 deletions

View File

@@ -1,105 +0,0 @@
<template>
<ai-list class="AppReturnHomeRegister" v-if="!isShowDetail">
<template slot="title">
<ai-title title="返乡登记" :isShowBottomBorder="false" :fullname.sync="areaName" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
</template>
<template slot="tabs">
<el-tabs v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<Detail v-else-if="component === 'Detail'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Detail>
</template>
<script>
import List from './components/List.vue'
import Detail from './components/Detail.vue'
import AbnormalList from './components/AbnormalList.vue'
import { mapState } from 'vuex'
export default {
name: 'AppReturnHomeRegister',
label: '返乡登记',
components: {
List,
Detail,
AbnormalList
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
...mapState(['user']),
tabs () {
const tabList = [
{label: '返乡登记', name: 'List', comp: List, permission: ''},
// {label: '历史异常人员', name: 'AbnormalList', comp: AbnormalList, permission: ''}
]
return tabList
}
},
data () {
return {
activeName: 'JoinEvent',
currIndex: '0',
component: 'List',
params: {},
areaId: '',
isShowDetail: false,
areaName: ''
}
},
created () {
this.areaId = this.user.info.areaId
},
methods: {
onChange (data) {
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'AbnormalList') {
this.component = 'AbnormalList'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'List') {
this.component = 'List'
this.isShowDetail = false
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
},
onAreaChange () {
this.$refs[this.currIndex][0].changeArea()
}
}
}
</script>
<style lang="scss" scoped>
.AppReturnHomeRegister {
height: 100%;
}
</style>

View File

@@ -1,200 +0,0 @@
<template>
<ai-list isTabs>
<template slot="content">
<ai-search-bar bottomBorder>
<template #left>
<ai-select
v-model="search.status"
clearable
placeholder="请选择健康状态"
:selectList="dictList"
@change="search.current = 1, getList()">
</ai-select>
<ai-download :instance="instance" url="/app/appepidemicbackhomerecord/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
v-throttle="() => {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>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'AbnormalList',
props: {
instance: Function,
dict: Object
},
data () {
return {
search: {
current: 1,
size: 10,
name: '',
arriveAreaId: '',
status: ''
},
dictList: [{
dictName: '异常',
dictValue: '0'
}, {
dictName: '正常',
dictValue: '1'
}],
info: {},
colConfigs: [
{ prop: 'name', label: '姓名' },
{ prop: 'phone', align: 'center', label: '手机号码' },
{ prop: 'startTime', align: 'center', label: '出发时间', format: v => v.substr(0, v.length - 3) },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区'
},
{ prop: 'arriveTime', align: 'center', label: '到达时间', format: v => v.substr(0, v.length - 3) },
{
prop: 'arriveAreaName',
align: 'center',
label: '到达地区'
},
{ prop: 'checkTime', align: 'center', label: '核酸日期', format: v => v.split(' ')[0] },
{
prop: 'status',
align: 'center',
label: '健康状态',
render: (h, {row}) => {
return h('span', {
style: {
color: row.status === '0' ? 'red' : '#333'
}
}, row.status === '0' ? '异常' : '正常')
}
}
],
ids: [],
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
}
},
computed: {
...mapState(['user']),
param () {
return this.search
}
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.search.arriveAreaId = 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()
this.getTotalInfo()
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appepidemicbackhomerecord/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getTotalInfo()
this.getList()
}
})
})
},
getTotalInfo () {
this.instance.post(`/app/appepidemicbackhomerecord/statistic`, null, {
params: {
areaId: this.search.arriveAreaId
}
}).then(res => {
if (res.code == 0) {
this.info = res.data
}
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,279 +0,0 @@
<template>
<ai-detail isHasSidebar>
<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>
<span :style="(info.type == 0 || info.type == 3 || info.type ==6 || info.type == 9)? 'color:#42D784;' : 'color:#f46;'">{{dict.getLabel('epidemicRecentPersonType', info.type)}}</span>
</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="出发地区" >
<span :style="{color: info.denger == 1 ? '#FF4466' : '#333'}">{{info.startAreaName}} </span>
</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="到达地区" :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="当前体温">
<span :style="info.temperature >= 37.3 ? 'color:#f46;' : ''">{{ info.temperature + '℃' }}</span>
</ai-info-item>
<ai-info-item label="14天内是否接触新冠确诊或疑似患者">
<span :class="'color-'+info.touchInFourteen">{{$dict.getLabel('epidemicTouchInFourteen', info.touchInFourteen)}}</span>
</ai-info-item>
<ai-info-item label="当前健康状况">
<span></span>
<span v-for="(item, index) in info.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''"><span v-if="index>0">;</span>{{$dict.getLabel('epidemicRecentHealth', item)}}</span>
</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="检测结果">
<span :style="info.checkResult == 1 ? 'color:#f46;' : 'color:#42D784;'">{{$dict.getLabel('epidemicRecentTestResult', info.checkResult)}}</span>
</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" v-if="info.status === '0'" @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('epidemicRecentPersonType', info.type)"></ai-info-item>
<ai-info-item label="异常状况" isLine>
<span :style="{color: info.unusual ? 'red' : '#333'}">{{ info.unusual || '-' }}</span>
</ai-info-item>
<ai-info-item label="异常解除人" v-if="info.releaseName && info.status === '1'" :value="info.releaseName"></ai-info-item>
<ai-info-item label="异常解除时间" v-if="info.releaseTime && info.status === '1'" :value="info.releaseTime"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="异常情况记录">
<template #right>
<el-button type="primary" v-if="info.status === '0'" @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'},
{prop: 'createUserName', label: '记录人', align: 'center' }
],
tabList: ['基本信息', '异常处理']
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.$dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentPersonType', 'epidemicRecentTestResult']).then(() => {
this.getInfo(this.params.id)
})
this.getList()
}
},
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) : []
let healthName = ''
this.info.isHealth = false
res.data.health.split(',').forEach(v => {
if (v > 0) {
this.info.isHealth = true
}
healthName = healthName + this.$dict.getLabel('epidemicRecentHealth', v)
})
this.info.healthName = healthName
this.info.health = this.info.health.split(',')
}
})
},
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.currIndex = 0
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()
}
})
})
},
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.$message.success('添加成功!')
}
})
}
})
},
getList () {
this.instance.post(`/app/appepidemicunusuallog/list`, null, {
params: {
...this.search,
recordId: this.params.id
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
cancel () {
this.$emit('change', {
type: 'List',
isRefresh: true
})
}
}
}
</script>
<style scoped lang="scss">
.color-0{
color: #42D784;
}
.color-1{
color: #f46;
}
.color-2{
color: #1365DD;
}
</style>

View File

@@ -1,273 +0,0 @@
<template>
<ai-list class="list" isTabs>
<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-select
v-model="search.status"
clearable
placeholder="请选择健康状态"
:selectList="dictList"
@change="search.current = 1, getList()">
</ai-select>
<ai-download :instance="instance" url="/app/appepidemicbackhomerecord/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
v-throttle="() => {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,
areaId: String
},
data () {
return {
search: {
current: 1,
size: 10,
name: '',
status: ''
},
dictList: [{
dictName: '异常',
dictValue: '0'
}, {
dictName: '正常',
dictValue: '1'
}],
info: {},
colConfigs: [
{ prop: 'name', label: '姓名' },
{ prop: 'phone', align: 'center', label: '手机号码' },
{ prop: 'startTime', align: 'center', label: '出发时间', format: v => v.substr(0, v.length - 3) },
{
prop: 'startAreaName',
align: 'center',
label: '出发地区'
},
{ prop: 'arriveTime', align: 'center', label: '到达时间', format: v => v.substr(0, v.length - 3) },
{
prop: 'arriveAreaName',
align: 'center',
label: '到达地区'
},
{ prop: 'checkTime', align: 'center', label: '核酸日期', format: v => v.split(' ')[0] },
{
prop: 'status',
align: 'center',
label: '健康状态',
render: (h, {row}) => {
return h('span', {
style: {
color: row.status === '0' ? 'red' : '#333'
}
}, row.status === '0' ? '异常' : '正常')
}
}
],
ids: [],
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
}
},
computed: {
...mapState(['user']),
param () {
return this.search
}
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.loading = true
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
this.getList()
})
},
methods: {
getList () {
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
params: {
...this.search,
arriveAreaId: this.areaId
}
}).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()
this.getTotalInfo()
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appepidemicbackhomerecord/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getTotalInfo()
this.getList()
}
})
})
},
getTotalInfo () {
this.instance.post(`/app/appepidemicbackhomerecord/statistic`, null, {
params: {
areaId: this.search.arriveAreaId
}
}).then(res => {
if (res.code == 0) {
this.info = res.data
}
})
}
}
}
</script>
<style scoped lang="scss">
.list {
:deep( .ai-list__content ){
padding: 0!important;
.ai-list__content--right-wrapper {
background: transparent!important;
box-shadow: none!important;
margin: 0!important;
padding: 0 0 0!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

@@ -1,65 +0,0 @@
<template>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :moduleName="moduleName" :moduleId="moduleId" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
import Add from './components/Add'
export default {
name: 'AppRiskArea',
label: '风险配置',
props: {
instance: Function,
dict: Object
},
data () {
return {
component: 'List',
params: {},
moduleId: '',
include: [],
moduleName: ''
}
},
components: {
Add,
List
},
methods: {
onChange (data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>

View File

@@ -1,154 +0,0 @@
<template>
<ai-detail class="content-add">
<template slot="title">
<ai-title :title="params.id ? '编辑风险区域' : '添加风险区域'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
<el-form-item prop="areaId" style="width: 100%;" label="选择地区" :rules="[{required: true, message: '请选择地区', trigger: 'change'}]">
<ai-area-select clearable @fullname="v => form.areaName = v" always-show :instance="instance" v-model="form.areaId"></ai-area-select>
</el-form-item>
<el-form-item label="风险等级" style="width: 100%;" prop="level" :rules="[{required: true, message: '请选择风险等级', trigger: 'change'}]">
<ai-select
v-model="form.level"
clearable
placeholder="请选择风险等级"
:selectList="dict.getDict('epidemicDangerousAreaLevel')">
</ai-select>
</el-form-item>
</el-form>
</template>
</ai-card>
</template>
<template #footer>
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="confirm">提交</el-button>
</template>
</ai-detail>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'Add',
props: {
instance: Function,
dict: Object,
params: Object,
moduleName: String
},
data () {
return {
info: {},
form: {
level: '',
areaId: '',
areaName: ''
},
id: ''
}
},
computed: {
...mapState(['user'])
},
created () {
this.dict.load('epidemicDangerousAreaLevel').then(() => {
if (this.params && this.params.id) {
this.id = this.params.id
this.getInfo(this.params.id)
}
})
},
methods: {
getInfo (id) {
this.instance.post(`/app/appepidemicdangerousarea/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.form = res.data
}
})
},
confirm () {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appepidemicdangerousarea/addOrUpdate`, {
...this.form
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')
setTimeout(() => {
this.cancel(true)
}, 600)
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
.content-add {
.video {
width: 640px;
height: 360px;
border-radius: 4px;
border: 1px dashed #D0D4DC;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
span:nth-child(2) {
display: inline-block;
font-size: 16px;
color: #333333;
line-height: 30px;
}
.iconfont {
display: inline-block;
font-size: 40px;
color: #2266FF;
}
}
.tips {
display: inline-block;
font-size: 12px;
color: #999999;
line-height: 26px;
}
}
.video-com {
width: 640px;
height: 360px;
background: rgba(0, 0, 0, 0.5);
border-radius: 2px;
border: 1px solid #D0D4DC;
margin-top: -40px;
}
}
</style>

View File

@@ -1,141 +0,0 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="风险区域配置" isShowBottomBorder></ai-title>
</template>
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<ai-select
v-model="search.level"
clearable
placeholder="请选择风险等级"
:selectList="dict.getDict('epidemicDangerousAreaLevel')"
@change="search.current = 1, getList()">
</ai-select>
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">添加</el-button>
</template>
<template #right>
<el-input
v-model="search.province"
class="search-input"
size="small"
v-throttle="() => {search.current = 1, getList()}"
placeholder="省级名称/市级名称/区级名称"
clearable
@clear="search.current = 1, search.province = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
style="margin-top: 6px;"
: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="toAdd(row.id)">编辑</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object,
moduleName: String
},
data() {
return {
search: {
current: 1,
size: 10,
level: '',
province: ''
},
currIndex: -1,
areaList: [],
total: 10,
colConfigs: [
{ prop: 'province', label: '省级', align: 'left', width: '200px' },
{ prop: 'city', label: '市级', align: 'center' },
{ prop: 'district', label: '区级', align: 'center' },
{ prop: 'town', label: '镇级', align: 'center' },
{ prop: 'village', label: '村级', align: 'center' },
{ prop: 'level', label: '等级', align: 'center', format: v => this.dict.getLabel('epidemicDangerousAreaLevel', v) },
{ prop: 'createTime', label: '设置时间', align: 'center' },
{ prop: 'createUserName', label: '添加人', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
],
areaName: '',
unitName: '',
tableData: []
}
},
computed: {
...mapState(['user'])
},
created() {
this.dict.load('epidemicDangerousAreaLevel').then(() => {
this.getList()
})
},
methods: {
getList() {
this.instance.post(`/app/appepidemicdangerousarea/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appepidemicdangerousarea/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toAdd(id) {
this.$emit('change', {
type: 'Add',
params: {
id: id || ''
}
})
}
}
}
</script>
<style lang="scss" scoped>
.notice {
}
</style>

View File

@@ -1,206 +0,0 @@
<template>
<section class="AppVaccination">
<ai-list v-if="!showDetail">
<ai-title slot="title" title="疫苗接种" isShowBottomBorder isShowArea v-model="areaId" :instance="instance"
@change="page.current=1,getTableData()"/>
<template #blank>
<el-row type="flex">
<div class="dataPane" v-for="(op,i) in dataPanes" :key="i">
{{ [op.label, op.v].join(" ") }}
</div>
</el-row>
<div class="mainPane">
<ai-search-bar>
<template #left>
<ai-select placeholder="接种状况" v-model="search.inoculationType" @change="page.current=1,getTableData()"
:selectList="dict.getDict('vaccineInoculationType')"/>
</template>
<template #right>
<el-input placeholder="姓名/身份证/联系方式"
v-model="search.name"
size="small"
clearable
@clear="page.current = 1,search.name = '', getTableData()"
v-throttle="() => {page.current = 1, getTableData()}"
suffix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-search-bar>
<template #left>
<el-button type="primary" icon="iconfont iconAdd" @click="$router.push({hash:'#add'})">添加</el-button>
<el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelete(ids)">删除</el-button>
</template>
<template #right>
<ai-import :instance="instance" :dict="dict" name="疫苗接种" suffixName="xlsx"
type="appvaccineinoculationuser" @onSuccess="resetSearch"/>
<ai-download url="/app/appvaccineinoculationuser/export" :params="{...search,areaId,ids:ids.toString()}"
:instance="instance" fileName="疫苗接种导出文件"/>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
:size.sync="page.size" @getList="getTableData" :dict="dict"
@selection-change="v=>ids=v.map(e=>e.id)">
<el-table-column slot="vaccinationDate" label="接种日期" align="center" class-name="vaccinationDate">
<el-table-column label="第一次" align="center" prop="firstDate"/>
<el-table-column label="第二次" align="center" prop="secondDate"/>
<el-table-column label="第三次" align="center" prop="thirdDate"/>
</el-table-column>
<el-table-column slot="options" label="操作" align="center" fixed="right">
<template slot-scope="{row:{id}}">
<el-button type="text" @click="$router.push({hash:'#add',query:{id}})">编辑</el-button>
<el-button type="text" @click="handleDelete(id)">删除</el-button>
</template>
</el-table-column>
</ai-table>
</div>
</template>
</ai-list>
<add-vaccination v-else :dict="dict" :instance="instance"/>
</section>
</template>
<script>
import {mapState} from "vuex";
import AddVaccination from "./addVaccination";
import {ID} from "dui/lib/js/utils";
export default {
name: "AppVaccination",
components: {AddVaccination},
label: "疫苗接种",
provide() {
return {
top: this
}
},
props: {
instance: Function,
dict: Object,
permissions: Function,
},
data() {
return {
areaId: "",
page: {current: 1, size: 10, total: 0},
search: {inoculationType: "", name: ""},
ids: [],
tableData: [],
staData: {}
}
},
computed: {
...mapState(['user']),
showDetail() {
return this.$route.hash == "#add"
},
dataPanes() {
return [
{label: "总接种人数", v: this.staData.zjzrs || 0},
{label: "已接种第一针人数", v: this.staData.yjzdyzrs || 0},
{label: "已接种第二针人数", v: this.staData.yjzdezrs || 0},
{label: "已接种第三针人数", v: this.staData.yjzdszrs || 0},
]
},
colConfigs() {
return [
{type: "selection", align: 'center'},
{label: "姓名", prop: "name", align: 'center'},
{label: "性别", prop: "sex", dict: 'sex', align: 'center'},
{label: "出生日期", prop: "birthday", align: 'center'},
{
label: "身份证号", width: "160px", align: 'center',
render: (h, {row}) => h('span', null, ID.hideId(row.idNumber))
},
{label: "所属地区", prop: "areaName", align: 'center'},
{label: "住址", prop: "address", width: "200px", align: 'center'},
{label: "联系方式", prop: "phone", align: 'center'},
{slot: 'vaccinationDate'},
{slot: "options"},
]
}
},
created() {
this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.dict.load('sex', 'vaccineInoculationType')
this.getTableData()
},
methods: {
getStaData() {
this.instance.post(`/app/appvaccineinoculationuser/countByAreaId`, null, {
params: {areaId: this.areaId}
}).then(res => {
if (res?.data) {
this.staData = res.data
}
})
},
getTableData() {
this.page.current == 1 && this.getStaData()
this.instance.post(`/app/appvaccineinoculationuser/list`, null, {
params: {...this.search, ...this.page, areaId: this.areaId}
}).then(res => {
if (res?.data) {
this.tableData = res.data.records
this.page.total = res.data.total
}
})
},
handleDelete(ids) {
ids = ids?.toString()
this.$confirm("确定要删除该条数据吗?").then(() => {
this.instance.post(`/app/appvaccineinoculationuser/delete`, null, {
params: {ids}
}).then(res => {
if (res?.code == 0) {
this.$message.success("删除成功!");
this.getTableData();
}
})
}).catch(() => 0)
},
resetSearch() {
this.page.current = 1
this.search = {}
this.getTableData()
}
}
}
</script>
<style lang="scss" scoped>
.AppVaccination {
height: 100%;
:deep( .dataPane ){
flex: 1;
min-width: 0;
background: #FFFFFF;
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
border-radius: 2px;
margin-bottom: 16px;
margin-right: 16px;
display: flex;
align-items: center;
justify-content: center;
height: 60px;
&:last-of-type {
margin-right: 0;
}
}
:deep( .mainPane ){
background: #fff;
padding: 12px 16px;
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
.vaccinationDate {
border-bottom: 1px solid #D0D4DC;
}
.ai-table__header {
padding: 2px 0;
}
}
}
</style>

View File

@@ -1,236 +0,0 @@
<template>
<section class="addVaccination">
<ai-detail>
<ai-title slot="title" :title="addTitle" isShowBottomBorder
isShowBack @onBackClick="back"/>
<template #content>
<el-form size="small" :model="form" ref="vaccinationForm" :rules="rules" label-width="100px">
<ai-card title="基本信息">
<template #content>
<el-form-item label="受种人姓名" prop="name">
<el-row type="flex" align="middle">
<el-input placeholder="请输入" v-model="form.name" :disabled="isEdit" clearable
style="margin-right: 8px"/>
<ai-person-select v-if="!isEdit" :instance="instance" @selectPerson="handleSelectPerson"/>
</el-row>
</el-form-item>
<el-form-item label="身份证号码" prop="idNumber">
<ai-id v-model="form.idNumber" @change="getInfoByIdNumber" :disabled="isEdit"/>
</el-form-item>
<el-form-item label="性别" prop="sex">
<ai-select disabled v-model="form.sex" :selectList="dict.getDict('sex')"/>
</el-form-item>
<el-form-item label="出生日期" prop="birthday">
<el-date-picker v-model="form.birthday" type="date" disabled/>
</el-form-item>
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入"/>
</el-form-item>
<el-form-item label="所属地区" isLine prop="areaId">
<ai-area-select :instance="instance" v-model="form.areaId" always-show @name="v=>form.areaName=v"/>
</el-form-item>
<el-form-item label="住址" isLine prop="address">
<el-input v-model="form.address" placeholder="请输入"/>
</el-form-item>
</template>
</ai-card>
<ai-card title="接种情况">
<template #right>
<el-button icon="iconfont iconAdd" type="text" @click="dialog=true">添加</el-button>
</template>
<template #content>
<el-form-item isLine label-width="0">
<ai-table :tableData="form.detailList" :colConfigs="colConfigs" :isShowPagination="false" :dict="dict">
<el-table-column slot="options" label="操作" align="center" fixed="right">
<template v-slot="{row,$index}">
<el-button type="text" @click="handleEdit(row,$index)">编辑</el-button>
<el-button type="text" @click="handleDelete($index)">删除</el-button>
</template>
</el-table-column>
</ai-table>
</el-form-item>
</template>
</ai-card>
</el-form>
</template>
<template #footer>
<el-button @click="back">取消</el-button>
<el-button type="primary" @click="handleSubmit">提交</el-button>
</template>
</ai-detail>
<ai-dialog :visible.sync="dialog" title="接种情况" @closed="dialogForm={}" @onConfirm="handleConfirm">
<el-form ref="appvaccineinoculationuser" size="small" :model="dialogForm" label-width="100px" :rules="rules">
<el-form-item label="接种次数" prop="type">
<ai-select v-model="dialogForm.type" :selectList="dict.getDict('vaccineType')"/>
</el-form-item>
<el-form-item label="接种日期" prop="vaccinateDate">
<el-date-picker v-model="dialogForm.vaccinateDate" value-format="yyyy-MM-dd"/>
</el-form-item>
<el-form-item label="接种人员" prop="vaccinatePerson">
<el-input v-model="dialogForm.vaccinatePerson"/>
</el-form-item>
<el-form-item label="生产企业" prop="createCompany">
<el-input v-model="dialogForm.createCompany"/>
</el-form-item>
<el-form-item label="接种单位" prop="vaccinateUnit">
<el-input v-model="dialogForm.vaccinateUnit"/>
</el-form-item>
</el-form>
</ai-dialog>
</section>
</template>
<script>
import {mapState} from "vuex";
import {ID} from "dui/lib/js/utils";
export default {
name: "addVaccination",
inject: ['top'],
props: {
instance: Function,
dict: Object,
},
data() {
return {
form: {detailList: []},
dialog: false,
dialogForm: {}
}
},
computed: {
...mapState(['user']),
isEdit() {
return !!this.$route.query.id
},
addTitle() {
return this.isEdit ? '编辑疫苗接种人员' : '新增疫苗接种人员'
},
rules() {
return {
vaccinateDate: {required: true, message: "请选择 接种日期"},
type: {required: true, message: "请选择 接种次数",},
areaId: [
{required: true, message: "请选择 所属地区"},
{trigger:'blur',validator: (r, v, cb) => /0{3}$/g.test(v) ? cb('请选择到村/社区') : cb()}
],
name: {required: true, message: "请填写 受种人姓名"},
idNumber: {required: true, message: "请填写 身份号码"},
sex: {required: true, message: "请填写 性别"},
birthday: {required: true, message: "请填写 出生日期"},
phone: {required: true, message: "请填写 联系方式"},
}
},
colConfigs() {
return [
{label: "类型", align: 'center', prop: "type", dict: 'vaccineType'},
{label: "接种日期", align: 'center', prop: "vaccinateDate"},
{label: "接种人员", align: 'center', prop: "vaccinatePerson"},
{label: "生产企业", align: 'center', prop: "createCompany"},
{label: "接种单位", align: 'center', prop: "vaccinateUnit"},
{slot: "options"}
]
}
},
methods: {
back() {
this.$router.push({})
},
getDetail() {
let {id} = this.$route.query
if (id) {
this.instance.post("/app/appvaccineinoculationuser/queryDetailById", null, {
params: {id}
}).then(res => {
if (res?.data) {
this.form = res.data
}
})
} else {
this.$set(this.form,'areaId',JSON.parse(JSON.stringify(this.top.areaId)))
}
},
handleSubmit() {
this.$refs.vaccinationForm?.validate(v => {
if (v) {
this.instance.post("/app/appvaccineinoculationuser/addOrUpdate", this.form).then(res => {
if (res?.code == 0) {
this.$message.success("提交成功!")
this.top.resetSearch()
this.back()
}
})
}
})
},
handleEdit(row, index) {
this.dialogForm = JSON.parse(JSON.stringify({...row, index}))
this.dialog = true
},
handleConfirm() {
this.$refs.appvaccineinoculationuser.validate(v => {
if (v) {
if (this.dialogForm.index > -1) {
this.form.detailList.splice(this.dialogForm.index, 1, this.dialogForm)
} else {
this.form.detailList.push(this.dialogForm)
}
this.dialog = false
}
})
},
handleSelectPerson(v) {
let {name, idNumber, phone, currentAreaId:areaId, currentAddress:address} = v
this.form = {...this.form, name, idNumber, phone, areaId, address}
},
getInfoByIdNumber(code) {
if (ID.check(code)) {
let info = new ID(code)
this.form.sex = info.sex
this.form.birthday = info.birthday
this.$forceUpdate()
}
},
handleDelete(index) {
this.$confirm("是否要删除该条数据?").then(() => this.form.detailList.splice(index, 1)).catch(() => 0)
}
},
created() {
this.dict.load('vaccineType')
this.getDetail()
}
}
</script>
<style lang="scss" scoped>
.addVaccination {
height: 100%;
:deep( .ai-card__body), .el-form {
display: flex;
flex-wrap: wrap;
}
.ai-card {
width: 100%;
}
.el-form-item {
width: 50%;
&[isLine] {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
:deep( .el-button ){
.iconfont {
color: inherit
}
}
}
</style>