Files
dvcp_v2_wxcp_app/library/apps/AppMonitoringObject/MonitorRemoveView.vue

260 lines
6.4 KiB
Vue
Raw Normal View History

2022-04-26 14:17:48 +08:00
<template>
<div class="MonitorRemoveView">
2022-04-27 16:08:53 +08:00
<div class="user-info" v-if="info">
2022-04-26 15:44:43 +08:00
<div class="title">审核信息</div>
<div class="info">
<div class="item">
<span>操作类型</span>
<span style="color: #2EA222;" v-if="info.operationType == 0">申请纳入监测</span>
<span style="color: #2EA222;" v-if="info.operationType == 1">申请解除风险</span>
</div>
<div class="item">
<span>监测类型</span>
2022-08-15 18:39:33 +08:00
<span v-if="info.operationType == 0">{{ $dict.getLabel('fpRiskType', info.bizDictValue) }}</span>
<span v-if="info.operationType == 1">{{ $dict.getLabel('fpRiskEliminationMethod', info.bizDictValue) }}</span>
2022-04-26 15:44:43 +08:00
</div>
<div class="item">
<span>申请人</span>
<span>{{ info.operationUserName }}</span>
</div>
<div class="item">
<span>申请时间</span>
<span>{{ info.createTime }}</span>
</div>
<div class="item">
<span>备注说明</span>
<span>{{ info.detail }}</span>
</div>
<div class="item">
<span style="color: #999;">图片</span>
<div class="imgs" v-if="info.files && info.files.length">
<image :src="img.url" @click="prevImg(info.files, img.url)" v-for="(img, index) in info.files"
2022-08-15 18:39:33 +08:00
:key="index"/>
2022-04-26 15:44:43 +08:00
</div>
</div>
</div>
</div>
<div class="result">
<div class="title">处理意见</div>
2022-08-15 18:39:33 +08:00
<AiGroup>
<AiItem label="审核结果" required>
<div class="check-item" :class="{active:form.pass==1}" @click="form.pass='1'">{{ type == 0 ? '纳入监测' : '解除风险' }}<img
src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="{active:form.pass=='0'}" @click="form.pass='0'">驳回申请<img src="./components/img/check-icon.png"/></div>
</AiItem>
<AiItem label="监测对象类型" required v-if="form.pass==1">
2022-08-15 18:39:33 +08:00
<AiSelect v-model="form.objectType" dict="fpType"/>
</AiItem>
<AiItem label="备注说明" topLabel>
2022-04-26 15:44:43 +08:00
<u-input v-model="form.opinion" type="textarea" placeholder="请输入备注说明" height="200" :maxlength="500"></u-input>
2022-08-15 18:39:33 +08:00
</AiItem>
<AiItem label="图片" topLabel>
<span slot="sub" class="color-999" v-text="`(最多9张)`"/>
2022-08-17 15:45:58 +08:00
<AiUploader :def.sync="form.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
2022-08-15 18:39:33 +08:00
</AiItem>
</AiGroup>
2022-04-26 15:44:43 +08:00
</div>
<div class="btn" @click="submit">提交</div>
2022-04-26 14:17:48 +08:00
</div>
</template>
<script>
export default {
name: "MonitorRemoveView",
2022-04-26 15:44:43 +08:00
// 网格长审核
2022-04-26 14:17:48 +08:00
data() {
return {
2022-04-26 15:44:43 +08:00
info: {},
2022-04-26 14:17:48 +08:00
id: '',
pass: '',
2022-04-26 15:44:43 +08:00
status: '',
form: {
pass: '',
opinion: '',
files: [],
},
2022-04-27 16:08:53 +08:00
type: '',
2022-04-26 14:17:48 +08:00
}
},
onLoad(o) {
2022-08-15 18:39:33 +08:00
this.$dict.load('fpRiskType', 'fpRiskEliminationMethod')
2022-04-26 14:17:48 +08:00
this.pass = o.pass;
this.id = o.id;
2022-04-26 15:44:43 +08:00
this.status = o.status;
this.form.pass = this.pass;
2022-04-27 16:08:53 +08:00
this.type = o.type
2022-04-26 15:44:43 +08:00
},
2022-04-26 16:04:01 +08:00
created() {
2022-04-26 15:44:43 +08:00
this.getInfo()
2022-08-15 18:39:33 +08:00
document.title = this.type == 0 ? '纳入监测审核' : '解除风险审核'
2022-04-26 14:17:48 +08:00
},
methods: {
2022-04-26 15:44:43 +08:00
getInfo() {
this.$http.post(`/app/apppreventionreturntopoverty/popup?id=${this.id}`).then(res => {
2022-04-26 14:17:48 +08:00
if (res.code === 0) {
2022-04-26 15:44:43 +08:00
this.info = res.data
2022-04-26 14:17:48 +08:00
}
})
2022-04-26 15:44:43 +08:00
},
prevImg(urls, img) {
const imgs = urls.map(v => v.url)
uni.previewImage({
urls: imgs,
current: img
})
},
2022-04-28 18:10:44 +08:00
2022-04-26 15:44:43 +08:00
submit() {
if (this.form.pass == 1 && !this.form.objectType) {
2022-08-17 09:03:12 +08:00
return this.$u.toast('请选择监测对象类型')
}
let url = '', params = {
2022-04-29 15:52:11 +08:00
...this.form,
id: this.id,
}
2022-04-27 16:08:53 +08:00
if (this.type == 0) { // 纳入审核
2022-04-29 15:52:11 +08:00
url = `/app/apppreventionreturntopoverty/examine`
2022-08-15 18:39:33 +08:00
} else if (this.type == 1) { // 解除审核
2022-04-28 18:10:44 +08:00
url = `/app/apppreventionreturntopoverty/relieve`
}
2022-08-17 09:03:12 +08:00
const formData = new FormData()
2022-04-28 18:10:44 +08:00
for (let key in params) {
2022-08-15 18:39:33 +08:00
formData.append(key, params[key])
2022-04-26 15:44:43 +08:00
}
2022-08-15 18:39:33 +08:00
this.$http.post(url, formData).then(res => {
2022-04-28 18:10:44 +08:00
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('reload')
2022-08-15 18:39:33 +08:00
setTimeout(() => {
2022-04-28 18:10:44 +08:00
uni.navigateBack({
delta: 2
})
2022-08-15 18:39:33 +08:00
}, 600)
2022-04-28 18:10:44 +08:00
}
})
2022-04-26 14:17:48 +08:00
}
},
}
</script>
2022-04-26 15:44:43 +08:00
<style lang="scss" scoped>
.MonitorRemoveView {
.user-info {
background: #FFF;
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.title {
padding: 30px 32px;
box-sizing: border-box;
border-bottom: 1px solid #DDDDDD;
font-weight: 600;
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.info {
padding: 30px 32px;
box-sizing: border-box;
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.item {
display: flex;
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
span {
padding: 12px 0;
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
span:first-child {
width: 140px;
color: #999999;
text-align: right;
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
span:last-child {
color: #343D65;
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.imgs {
image {
width: 136px;
height: 136px;
margin-right: 8px;
margin-bottom: 8px;
}
}
}
}
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.result {
margin-top: 16px;
padding-bottom: 112px;
box-sizing: border-box;
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.title {
height: 112px;
padding: 30px 32px;
font-weight: 600;
box-sizing: border-box;
border-bottom: 1px solid #DDDDDD;
background: #FFF;
}
2022-08-15 18:39:33 +08:00
.check-item {
display: inline-block;
width: 140px;
height: 64px;
line-height: 64px;
text-align: center;
background: #F5F5F5;
border-radius: 4px;
font-size: 30px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
position: relative;
&.active {
2022-04-26 15:44:43 +08:00
background: #E7F1FE;
color: #1174FE;
2022-08-15 18:39:33 +08:00
img {
2022-04-26 15:44:43 +08:00
display: block;
position: absolute;
bottom: 0;
right: 0;
width: 48px;
height: 48px;
}
}
2022-08-15 18:39:33 +08:00
img {
display: none;
}
&:nth-of-type(1) {
margin-right: 36px;
}
2022-04-26 15:44:43 +08:00
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
::v-deep .ai-uploader .fileList .default {
width: 160px;
height: 160px;
}
}
2022-08-15 18:39:33 +08:00
2022-04-26 15:44:43 +08:00
.btn {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #3192F4;
color: #FFFFFF;
position: fixed;
bottom: 0;
left: 0;
}
2022-08-15 18:39:33 +08:00
.bg-fff {
background: #fff;
}
2022-04-26 15:44:43 +08:00
}
2022-06-13 09:57:52 +08:00
</style>