<template>
|
<view class="">
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>场所名称</text>
|
<text class="item-content">{{info.placeName}}</text>
|
</view>
|
<!-- <view class="item-row flex j-c-s-b a-i-c">
|
<text>标签</text>
|
<text>{{label || "未完善"}}</text>
|
</view> -->
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>场所负责人</text>
|
<text>{{info.principal || "未完善"}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>场所负责人电话</text>
|
<text>{{info.principalPhone || "未完善"}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>上报人</text>
|
<text>{{info.name}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>地址</text>
|
<text class="item-content">{{info.location}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>时间</text>
|
<text>{{info.createTime}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>状态</text>
|
<text v-if="info.status == 1">待审核</text>
|
<text v-if="info.status == 2">审核成功</text>
|
<text v-if="info.status == 3">审核驳回</text>
|
<text v-if="info.status == 4">待完成</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c" v-if="info.status == 3 && info.reasonFailure">
|
<text>驳回原因</text>
|
<text class="item-content">{{info.reasonFailure}}</text>
|
</view>
|
|
<view class="mt-20 bgc-ff">
|
<block v-for="(item,index) in itemList">
|
<block v-for="(i,k) in item.children">
|
<block v-for="(n,m) in info.taskPlaceRecordVOList">
|
<view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId">
|
<text class="item-left fw">{{item.title}}</text>
|
<!-- <text>不存在</text> -->
|
</view>
|
<u-collapse :value="ids" v-if="i.id == n.itemId" ref="collapse">
|
<u-collapse-item :name="n.itemId" :title="i.title" :disabled="true" :clickable="false"
|
:isLink="false">
|
<view class="mb-20" v-if="n.imageUrls">
|
<view class="f-26 mb-10 c-00">附件</view>
|
<view class="flex flex-wrap">
|
<view class="mr-20" v-for="r in ($setImageUrl(n.imageUrls))">
|
<u-image :src="r" width="140rpx" height="140rpx"
|
@click="previewImage($setImageUrl(n.imageUrls),i)"></u-image>
|
</view>
|
</view>
|
</view>
|
</u-collapse-item>
|
</u-collapse>
|
</block>
|
</block>
|
</block>
|
</view>
|
|
<view class="blank"></view>
|
<!-- <footer-btn @click="submitInfo" v-if="roleType == 2 && (info.status == 4 || info.status == 3)" /> -->
|
<actionBtnTwo :dataItem="info" v-if="roleType == 1" @handle="submitAudit" />
|
<footer-btn v-if="roleType == 2 && info.status == 3" text="重新提交" @click="navTo" />
|
</view>
|
</template>
|
|
<script>
|
import uploadMixin from "@/mixin/uploadMixinPlace";
|
import {
|
getPlaceCheckItem,
|
getPlaceCheckReformDetail,
|
addPlaceCheckReform,
|
auditPlaceCheckReform
|
} from '@/api/place/place.js'
|
|
import {
|
getPlaceCheckDetail,
|
auditPlaceCheck
|
} from '@/api/reporting/reporting.js'
|
import {
|
getCounterfraudReportDetail,
|
auditCounterfraudReport
|
} from "@/api/counterfraud/counterfraud.js"
|
import actionBtnTwo from '../components/actionBtnTwo.vue'
|
export default {
|
mixins: [uploadMixin],
|
components: {
|
actionBtnTwo
|
},
|
data() {
|
return {
|
info: {},
|
images: [],
|
signatureUrl: [],
|
label: "",
|
itemList: [],
|
roleType: '', //1.民警/系统管理员 2.场所负责人
|
ids: [],
|
taskId: "",
|
id: ""
|
}
|
},
|
async onLoad(option) {
|
let {
|
roleName
|
} = uni.getStorageSync("activeRole")
|
if (roleName == "居民") {
|
this.roleType = 2;
|
}
|
if (roleName == "民警" || roleName == "系统管理员") {
|
this.roleType = 1;
|
}
|
if (option.roleType) {
|
// 不显示按钮
|
this.roleType = option.roleType
|
}
|
|
await this.getItem();
|
this.taskId = option.id;
|
this.id = option.id;
|
},
|
|
|
onShow() {
|
setTimeout(() => {
|
this.getDetail();
|
}, 100)
|
},
|
|
methods: {
|
|
getDetail(id) {
|
getCounterfraudReportDetail({
|
id: this.id
|
}).then(res => {
|
let data = res.data;
|
let ids = [];
|
for (let i of data.taskPlaceRecordVOList) {
|
if ((data.status == 4 || data.status == 3) && this.roleType == 2) {
|
if (i.rectificationImageUrls) {
|
i.urls = this.$setImageUrl(i.rectificationImageUrls, 2);
|
} else {
|
i.urls = [];
|
}
|
}
|
if (i.state == 0) {
|
ids.push(i.itemId)
|
}
|
}
|
this.ids = ids;
|
this.info = data;
|
})
|
},
|
|
getItem() {
|
getPlaceCheckItem({
|
childType: uni.getStorageSync("siteInfo").noExplosionCategory,
|
type: 2
|
}).then(res => {
|
if (res.code == 200) {
|
this.itemList = res.data;
|
}
|
})
|
},
|
|
async afterReadImgs(event, item, fIndex) {
|
uni.showLoading({
|
title: "上传中..."
|
})
|
let children = this.info.taskPlaceRecordVOList;
|
let lists = [].concat(event.file)
|
let fileListLen = item.urls.length;
|
lists.map((item) => {
|
children[fIndex].urls.push({
|
...item,
|
status: 'uploading',
|
message: '上传中'
|
})
|
this.$set(this.info, "taskPlaceRecordVOList", children)
|
})
|
for (let i = 0; i < lists.length; i++) {
|
const result = await this.uploadFilePromise(lists[i].url)
|
children[fIndex].urls.splice(fileListLen, 1, Object.assign({}, {
|
url: result.data.link,
|
name: result.data.name
|
}))
|
this.$set(this.info, "taskPlaceRecordVOList", children)
|
fileListLen++
|
}
|
this.loadingClose()
|
},
|
|
deleteImages(event, index) {
|
let children = this.info.taskPlaceRecordVOList;
|
children[index].urls.splice(event.index, 1);
|
this.$set(this.info, "taskPlaceRecordVOList", children)
|
},
|
|
setImages(key) {
|
if (!key) {
|
return ""
|
} else {
|
let urls = [];
|
for (let i of key) {
|
urls.push(i.name);
|
}
|
return urls.join(",")
|
}
|
},
|
|
previewImage(urls, current) {
|
uni.previewImage({
|
urls,
|
current
|
})
|
},
|
|
//整改提交
|
submitInfo() {
|
uni.showLoading({
|
title: "加载中..."
|
})
|
let data = this.info;
|
for (let i of data.taskPlaceRecordVOList) {
|
if (i.urls) {
|
i.rectificationImageUrls = this.setImages(i.urls)
|
}
|
delete i.urls;
|
}
|
if (data.status == 3) {
|
data.status = 1;
|
}
|
if (data.status == 4) {
|
data.status = 1;
|
}
|
addPlaceCheckReform(data).then(res => {
|
uni.hideLoading()
|
if (res.code == 200) {
|
this.$showTips("操作成功", "success");
|
setTimeout(() => {
|
uni.navigateBack()
|
}, 300)
|
}
|
})
|
},
|
|
//审核
|
submitAudit(val) {
|
uni.showLoading({
|
title: "加载中..."
|
})
|
|
let data = {
|
id: this.info.taskId,
|
status: val.type,
|
reportType: 6
|
}
|
if (val.type == 3) {
|
data.reasonFailure = val.remark;
|
data.remark = val.remark;
|
}
|
|
auditCounterfraudReport(data).then(res => {
|
uni.hideLoading()
|
if (res.code == 200) {
|
this.$showTips("操作成功", "success");
|
setTimeout(() => {
|
uni.navigateBack()
|
}, 300)
|
}
|
})
|
},
|
|
navTo() {
|
uni.navigateTo({
|
url: `/subPackage/counterfraud/addReport?id=${this.info.id}`
|
})
|
},
|
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #f5f5f5;
|
}
|
|
.item-row {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
border-bottom: 1px solid #f5f5f5;
|
font-size: 28rpx;
|
background-color: #fff;
|
|
.item-content {
|
width: 70%;
|
text-align: right;
|
}
|
|
.item-left {
|
width: 70%;
|
}
|
}
|
|
.image-wrap {
|
margin-top: 20rpx;
|
padding: 20rpx;
|
|
.image-item {
|
margin-right: 20rpx;
|
}
|
}
|
|
/deep/.u-cell__title-text {
|
color: #000 !important;
|
width: 70%;
|
font-size: 28rpx !important;
|
}
|
|
/deep/ .u-cell__value {
|
color: #000 !important;
|
font-size: 28rpx !important;
|
}
|
|
.mr-20 {
|
margin-right: 20rpx;
|
}
|
|
.upload-item {
|
width: 140rpx;
|
height: 140rpx;
|
border: 1px solid #EEEEEE;
|
}
|
|
.blank {
|
width: 100%;
|
height: 140rpx;
|
}
|
|
.c-00 {
|
color: #000;
|
}
|
|
/deep/ .u-collapse-item .u-collapse-item__content {
|
height: auto !important;
|
}
|
</style>
|