风险预警

This commit is contained in:
yanran200730
2022-03-24 11:03:20 +08:00
parent c33eb0e6f2
commit d9701c366d
7 changed files with 850 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<template>
<div class="doc-circulation ailist-wrapper">
<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'
import Detail from './components/Detail'
export default {
name: 'AppVisitToVerify',
label: '走访核实',
props: {
instance: Function,
dict: Object
},
data () {
return {
component: 'List',
params: {},
include: []
}
},
components: {
List,
Detail
},
mounted () {
},
methods: {
onChange (data) {
if (data.type === 'Detail') {
this.component = 'Detail'
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

@@ -0,0 +1,139 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
<template #rightBtn>
<el-button size="small" type="primary" @click="isShow = true">处理结果</el-button>
</template>
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper>
<ai-info-item label="姓名" :value="info.title"></ai-info-item>
<ai-info-item label="联系方式" :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="风险类型" :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="身份证号" :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="所属区域" isLine :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="联系地址" isLine :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="备注说明" isLine :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="处理时间" :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="处理人" :value="info.publishUnitName"></ai-info-item>
<ai-info-item label="状态" isLine :value="info.publishUnitName"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="110px" :model="form" ref="form">
<el-form-item label="处理意见" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择处理意见' }]">
<el-radio-group v-model="form.pass" @change="onStatusChange">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注说明" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入备注说明' }]">
<el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入备注说明" show-word-limit></el-input>
</el-form-item>
<el-form-item label="图片" prop="files" style="width: 100%;">
<ai-uploader
:instance="instance"
v-model="form.files"
:limit="9">
<template slot="tips">
<p>最多上传9张图片,单个文件最大10MB支持jpgjpegpng格式</p>
</template>
</ai-uploader>
</el-form-item>
</el-form>
</ai-dialog>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
id: '',
form: {
opinion: '',
pass: '',
files: []
},
isShow: false
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.getInfo(this.params.id)
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appmininotice/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.info.images = res.data.images ? JSON.parse(res.data.images) : []
}
})
},
onStatusChange () {
this.form.opinion = ''
this.$refs.form.clearValidate()
},
onClose () {
this.form.opinion = ''
this.form.pass = ''
},
onConfirm () {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appcontentinfo/examine', null, {
params: {
...this.form,
id: this.id
}
}).then(res => {
if (res?.code == 0) {
this.isShow = false
this.getList()
this.$message.success('审核成功!')
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'List',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -0,0 +1,179 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="走访核实" isShowBottomBorder></ai-title>
</template>
<template slot="content">
<ai-search-bar>
<template #left>
<ai-select
v-model="search.checkResult"
clearable
placeholder="请选择风险类型"
:selectList="dict.getDict('epidemicRecentTestResult')"
@change="search.current = 1, getList()">
</ai-select>
<ai-select
v-model="search.checkResult"
clearable
placeholder="请选择状态"
:selectList="dict.getDict('epidemicRecentTestResult')"
@change="search.current = 1, getList()">
</ai-select>
<el-button size="small" :disabled="ids.length == 0" type="primary">纳入监测</el-button>
<el-button size="small" :disabled="ids.length == 0">解除风险</el-button>
</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"
style="margin-top: 12px;"
:current.sync="search.current"
:size.sync="search.size"
@selection-change="(v) => (ids = v.map((e) => e.id))"
@getList="getList">
<el-table-column slot="tags" label="标签">
<template slot-scope="{ row }">
<div class="table-tags">
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column slot="options" width="90px" fixed="right" label="操作" align="center">
<div class="table-options" slot-scope="{ row }">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
</div>
</el-table-column>
</ai-table>
</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,
title: ''
},
ids: [],
total: 10,
tableData: []
}
},
computed: {
...mapState(['user']),
colConfigs () {
return [
{ type: 'selection' },
{ prop: 'title', label: '姓名', align: 'left' },
{ prop: 'createUserName', label: '联系方式', align: 'center' },
{ prop: 'publishUnitName', label: '风险类型', align: 'center'},
{ prop: 'createTime', label: '所属区域', align: 'center' },
{ prop: 'createUserName', label: '备注说明', align: 'center' },
{
prop: 'status',
label: '状态',
align: 'center',
render: (h, { row }) => {
return h(
"span",
{
style: {
color: this.dict.getColor('epidemicRecentTestResult', row.status)
}
},
this.dict.getLabel('epidemicRecentTestResult', row.status)
)
}
},
{prop: 'createTime', label: '处理时间', align: 'center' },
{prop: 'createTime', label: '处理人', align: 'center' },
{slot: 'options', label: '操作'}
]
}
},
created () {
this.dict.load('epidemicRecentTestResult').then(() => {
this.getList()
})
},
methods: {
getList() {
this.instance.post(`/app/appmininotice/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
removeAll () {
var id = this.ids.join(',')
this.remove(id)
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appmininotice/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toDetail (id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
},
toAdd(id) {
this.$emit('change', {
type: 'Add',
params: {
id: id || ''
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>