目录代码整合

This commit is contained in:
aixianling
2022-05-10 20:02:37 +08:00
parent 71049f7f65
commit 036ee91533
324 changed files with 4 additions and 8321 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,182 @@
<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"
v-if="(checkType === '1' || checkType === '2') && info.status !== '3' && info.status !== '2'">
{{ checkType === '1' ? '走访核实' : '处理结果' }}
</el-button>
</template>
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper>
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="联系方式" :value="info.phone"></ai-info-item>
<ai-info-item label="风险类型" :value="dict.getLabel('fpRiskType', info.riskType)"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="所在地区" :value="info.areaName"></ai-info-item>
<ai-info-item label="联系地址" isLine :value="info.address"></ai-info-item>
<ai-info-item label="备注说明" isLine :value="info.remarks"></ai-info-item>
<ai-info-item label="操作人" :value="info.createUserName"></ai-info-item>
<ai-info-item label="归口部门" :value="info.departmentName"></ai-info-item>
<ai-info-item label="操作时间" isLine :value="info.createTime"></ai-info-item>
<ai-info-item label="状态" isLine :value="dict.getLabel('fpRiskPersonStatus', info.status)"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="走访核实" v-if="info.visitTime">
<template #content>
<ai-wrapper>
<ai-info-item label="处理意见" :value="info.visitOpinion"></ai-info-item>
<ai-info-item label="处理时间" :value="info.visitTime"></ai-info-item>
<ai-info-item label="业务员" :value="info.visitUserName"></ai-info-item>
<ai-info-item label="照片" isLine>
<ai-uploader
disabled
:instance="instance"
v-model="info.visitFiles"
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="处理结果" v-if="info.auditTime">
<template #content>
<ai-wrapper>
<ai-info-item label="处理意见" :value="info.auditOpinion"></ai-info-item>
<ai-info-item label="处理时间" :value="info.auditTime"></ai-info-item>
<ai-info-item label="业务员" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="照片" isLine>
<ai-uploader
disabled
:instance="instance"
v-model="info.auditFiles"
:limit="9">
</ai-uploader>
</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="operation" style="width: 100%;" :rules="[{ required: true, message: '请选择处理意见' }]">
<el-radio-group v-model="form.operation">
<el-radio label="0" v-if="checkType === '1'">疑似风险</el-radio>
<el-radio label="1" v-if="checkType === '2'">纳入监测</el-radio>
<el-radio label="2">解除风险</el-radio>
</el-radio-group>
<!-- <span v-if="info.status != '2'">解除风险</span>
<span v-if="info.status === '0' && checkType === '1'">疑似风险</span>
<span v-if="info.status !== '2' && checkType === '2'">纳入监测</span> -->
</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: '',
checkType: '',
form: {
opinion: '',
operation: '',
ids: ''
},
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/apppreventionreturntopovertyriskperson/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
}
})
this.instance.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
this.checkType = res.data.checkType
}
})
},
onClose () {
this.form.opinion = ''
this.form.operation = ''
},
onConfirm () {
this.$refs.form.validate(v => {
if (v) {
this.instance.post(`/app/apppreventionreturntopovertyriskperson/monitor`, {
...this.form,
ids: [this.params.id]
}).then(res => {
if (res.code == 0) {
this.$message.success('操作成功!')
this.isShow = false
this.getInfo(this.params.id)
}
})
}
})
},
cancel () {
this.$emit('change', {
type: 'List',
isRefresh: true
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -0,0 +1,199 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="走访核实" isShowBottomBorder :isShowArea="true" v-model="search.areaId" :instance="instance" @change="getList"></ai-title>
</template>
<template slot="content">
<ai-search-bar>
<template #left>
<ai-select
v-model="search.riskType"
clearable
placeholder="请选择风险类型"
:selectList="dict.getDict('fpRiskType')"
@change="search.current = 1, getList()">
</ai-select>
<ai-select
v-model="search.status"
clearable
placeholder="请选择状态"
:selectList="dict.getDict('fpRiskPersonStatus')"
@change="search.current = 1, getList()">
</ai-select>
<el-button size="small" v-if="checkType === '2'" :disabled="addIds.length == 0" type="primary" @click="addMonitor">纳入监测</el-button>
<el-button size="small" v-if="checkType !== '0'" :disabled="removeIds.length == 0" @click="removeAll">解除风险</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) => chooseList = v"
@getList="getList">
<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,
name: '',
areaId: '',
riskType: '',
status: ''
},
chooseList: [],
total: 10,
checkType: '',
tableData: []
}
},
computed: {
...mapState(['user']),
colConfigs () {
return [
{ type: 'selection' },
{ prop: 'name', label: '姓名', align: 'left'},
{ prop: 'phone', label: '联系方式', align: 'center' },
{ prop: 'riskType', label: '风险类型', align: 'center', formart: v => this.dict.getLabel('fpRiskType', v) },
{ prop: 'areaName', label: '所属区域', align: 'center' },
{ prop: 'remarks', label: '备注说明', align: 'center' },
{ prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('fpRiskPersonStatus', v) },
{ prop: 'createTime', label: '处理时间', align: 'center' },
{ prop: 'createUserName', label: '处理人', align: 'center' }
]
},
addIds () {
if (!this.chooseList.length) {
return []
}
return this.chooseList.filter(v => v.status === '0' || v.status === '1').map(v => v.id)
},
removeIds () {
if (!this.chooseList.length) {
return []
}
return this.chooseList.filter(v => v.status === '0' || v.status === '1').map(v => v.id)
}
},
created () {
this.search.areaId = this.user.info.areaId
this.dict.load('fpRiskType', 'fpRiskPersonStatus').then(() => {
this.getList()
})
this.getInfo()
},
methods: {
getList() {
this.instance.post(`/app/apppreventionreturntopovertyriskperson/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
getInfo () {
this.instance.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
this.checkType = res.data.checkType
}
})
},
addMonitor () {
this.$confirm('是否纳入监测对象?').then(() => {
this.instance.post(`/app/apppreventionreturntopovertyriskperson/monitor`, {
ids: this.addIds,
operation: 1
}).then(res => {
if (res.code == 0) {
this.$message.success('操作成功!')
this.getList()
}
})
})
},
removeAll () {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/apppreventionreturntopovertyriskperson/monitor`, {
ids: this.removeIds,
operation: 2
}).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>