<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 class="item-content">{{info.location}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>描述</text>
|
<text class="item-content">{{info.remark}}</text>
|
</view>
|
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>审核状态</text>
|
<text class="item-content" v-if="info.confirmFlag == 1">待审核</text>
|
<text class="item-content" v-if="info.confirmFlag == 2">审核通过</text>
|
<text class="item-content" v-if="info.confirmFlag == 3">审核驳回</text>
|
<text class="item-content" v-if="info.confirmFlag == 4">待处理</text>
|
</view>
|
|
<view class="item-row flex j-c-s-b a-i-c" v-if="info.confirmFlag == 3">
|
<text>驳回原因</text>
|
<text>{{info.confirmNotion}}</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" v-if="info.type == 1">
|
<text>隐患类型</text>
|
<text>{{troubleValue}}</text>
|
</view>
|
|
<view class="item-row flex j-c-s-b a-i-c" v-if="info.isProblem">
|
<text>是否隐患</text>
|
<text>{{info.isProblem == 1?"是":"否"}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c" v-if="info.isHandle">
|
<text>是否处理</text>
|
<text>{{info.isHandle == 1?"是":"否"}}</text>
|
</view>
|
|
<view class="item-row flex j-c-s-b a-i-c" v-if="info.handleRemark">
|
<text>处理描述</text>
|
<text>{{info.handleRemark}}</text>
|
</view>
|
|
<view class="image-wrap bgc-ff" v-if="images.length">
|
<view class="mb-20">
|
图片
|
</view>
|
<view class="flex flex-wrap">
|
<view class="image-item" v-for="(i,k) in images" @click="previewImage(images,i)">
|
<u-image :src="i" width="100rpx" height="100rpx"></u-image>
|
</view>
|
</view>
|
</view>
|
|
<block v-if="roleTypeName == 'mj' && disable">
|
<view class="image-wrap bgc-ff">
|
<view class="mb-20">
|
<text style="color: red;">* </text> 处理意见
|
</view>
|
<view class="flex flex-wrap">
|
<u-textarea v-model="confirmNotion" placeholder="请输入处理意见" :disabled="true"></u-textarea>
|
</view>
|
</view>
|
|
<view class="image-wrap bgc-ff">
|
<view class="mb-20">
|
<text style="color: red;">* </text> 工作照片
|
</view>
|
<view class="flex-wrap">
|
<view class="mr-20" v-for="i in workImage">
|
<u-image :src="i" width="140rpx" height="140rpx" @click="previewImage(workImage,i)"></u-image>
|
</view>
|
</view>
|
</view>
|
</block>
|
|
<block v-if="roleTypeName == 'mj' && !disable">
|
<view class="image-wrap bgc-ff">
|
<view class="mb-20">
|
<text style="color: red;">* </text> 处理意见
|
</view>
|
<view class="flex flex-wrap">
|
<u-textarea v-model="confirmNotion" placeholder="请输入处理意见"
|
:disabled="info.confirmFlag == 2?true:false"></u-textarea>
|
</view>
|
</view>
|
|
<view class="image-wrap bgc-ff">
|
<view class="mb-20">
|
<text style="color: red;">* </text> 工作照片
|
</view>
|
<view class="flex-wrap" v-if="info.confirmFlag == 2">
|
<view class="mr-20" v-for="i in workImage">
|
<u-image :src="i" width="140rpx" height="140rpx" @click="previewImage(workImage,i)"></u-image>
|
</view>
|
</view>
|
<u-upload v-else :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
|
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
|
:capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
|
<view class="upload-item upload-icon flex_base">
|
<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
|
</view>
|
</u-upload>
|
</view>
|
</block>
|
|
|
|
<view class="image-wrap bgc-ff" v-if="roleTypeName == 'xyzt' && info.confirmFlag == 4">
|
<u-form labelWidth="70" :model="form" ref="form">
|
<u-form-item label="是否隐患:" labelWidth="100" prop="isProblem">
|
<u-radio-group v-model="form.isProblem">
|
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
|
:label="item.name" :name="item.id">
|
</u-radio>
|
</u-radio-group>
|
</u-form-item>
|
<u-form-item label="是否处理:" labelWidth="100" prop="isHandle" v-if="form.isProblem == 1">
|
<u-radio-group v-model="form.isHandle" @change="changeRadio">
|
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index"
|
:label="item.name" :name="item.id">
|
</u-radio>
|
</u-radio-group>
|
</u-form-item>
|
|
|
<u-form-item label="处理备注:" labelWidth="100" prop="isHandle" v-if="form.isProblem == 1">
|
<u--textarea v-model="form.handleRemark" placeholder="请输入内容"></u--textarea>
|
</u-form-item>
|
</u-form>
|
</view>
|
|
<view class="blank"></view>
|
|
<!-- <audit-action @handle="submit"
|
v-if="roleType == 2 && info.confirmFlag == 1 && roleTypeName == 'mj' "></audit-action> -->
|
<!-- <footer-btn v-if="roleType == 1 && info.confirmFlag == 3" text="编辑" @click="navToEdit" /> -->
|
<footer-btn v-if="roleTypeName == 'xyzt' && info.confirmFlag == 4 " @click="submitInfo" />
|
<!-- <footer-btn v-if="roleType == 2 && info.confirmFlag == 1 && roleTypeName == 'mj'" text="确定"
|
@click="submitInfo" /> -->
|
|
<view class="footer flex a-i-c j-c-s-b" v-if="roleType == 2 && roleTypeName == 'mj' && !disable">
|
<button v-if="info.confirmFlag == 1" class="footer-btn" @click="submitInfo">处置</button>
|
<button v-if="info.confirmFlag == 2" class="footer-btn" @click="submit(2)">共享</button>
|
</view>
|
|
|
<u-picker :defaultIndex="[defaultColums]" :closeOnClickOverlay="true" @close="isPickerShow = false"
|
:show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false"
|
@confirm="handleConfirm"></u-picker>
|
|
<u-picker :defaultIndex="peopleIndex" :closeOnClickOverlay="true" @close="isShowPeoplePicker = false"
|
:show="isShowPeoplePicker" ref="pPicker" :columns="peopleList" keyName="name"
|
@cancel="isShowPeoplePicker = false" @confirm="handlePeopleConfirm" @change="changePeople"></u-picker>
|
|
<u-popup :show="show" mode="bottom" @close="close" :round="10" :closeable="true">
|
<view class="popup-title">
|
共享
|
</view>
|
<view style="margin-top: 20rpx 0rpx;" class="popup-content">
|
<u-radio-group v-model="radiovalue1" @change="groupChange" iconPlacement="right" placement="column">
|
<view v-for="(item, index) in radiolist1" style="padding:10rpx 0;">
|
<u-radio :customStyle="{marginBottom: '8px'}" :key="index" :label="item.name" :name="item.id"
|
@change="radioChange">
|
</u-radio>
|
</view>
|
|
</u-radio-group>
|
|
<view class="popup-btn flex a-i-c j-c-s-b">
|
<button class="popup-btn-item" @click="pushCircle">确认</button>
|
</view>
|
</view>
|
</u-popup>
|
</view>
|
|
</template>
|
|
<script>
|
import uploadMixin from "@/mixin/uploadMixin";
|
import auditAction from '@/components/btn/actionBtn.vue'
|
import {
|
handlePublish
|
} from '@/api/circle/circle.js'
|
import {
|
getTroubleReportDetail,
|
auditTroubleReport
|
} from "@/api/school/school.js"
|
import {
|
bizDictionary
|
} from '@/api/system/dict.js'
|
export default {
|
components: {
|
auditAction
|
},
|
mixins: [uploadMixin],
|
data() {
|
return {
|
disable: false,
|
radiovalue1: 0,
|
show: false,
|
info: {},
|
roleType: 1,
|
id: "",
|
images: [],
|
confirmNotion: "",
|
form: {
|
images: []
|
},
|
statusList: [{
|
name: "是",
|
id: 1
|
},
|
{
|
name: "否",
|
id: 2
|
}
|
],
|
// 基本案列数据
|
radiolist1: [{
|
name: '邻里圈',
|
disabled: false,
|
id: 0
|
},
|
{
|
name: '协同圈',
|
disabled: false,
|
id: 1
|
}
|
],
|
roleTypeName: "",
|
workImage: [],
|
troubleValue: ""
|
}
|
},
|
|
onLoad(option) {
|
let {
|
roleName,
|
roleAlias
|
} = uni.getStorageSync("activeRole");
|
this.roleTypeName = roleAlias;
|
if (roleAlias == "mj" || roleAlias == "xyzt") {
|
this.roleType = 2;
|
}
|
if (roleAlias == "inhabitant" || roleAlias == "xyty") {
|
this.roleType == 1;
|
}
|
this.id = option.id;
|
if (option.disable) {
|
this.disable = option.disable
|
}
|
},
|
|
onShow() {
|
this.getDetail(this.id)
|
},
|
|
methods: {
|
|
pushCircle() {
|
handlePublish({
|
houseCode: this.info.houseCode,
|
eventId: this.info.id,
|
// 校园
|
evenType: 4,
|
circleType: this.radiovalue1,
|
circleText: this.info.remark,
|
circleImages: this.info.images
|
}).then(res => {
|
this.$showTips("操作成功", "success")
|
this.close()
|
// this.$set(this.peopleList, 1, res.data);
|
})
|
},
|
close() {
|
this.show = false
|
},
|
|
groupChange(n) {
|
console.log('groupChange', n);
|
},
|
radioChange(n) {
|
console.log('radioChange', n);
|
},
|
getDangerTypeList(callback) {
|
bizDictionary({
|
code: "hiddenDangerType"
|
}).then(res => {
|
if (res.code == 200) {
|
callback(res.data);
|
}
|
})
|
},
|
|
getDetail(id) {
|
getTroubleReportDetail({
|
id
|
}).then(res => {
|
this.info = res.data;
|
if (res.data.images) {
|
this.images = this.$setImageUrl(res.data.images);
|
}
|
if (Number(res.data.type) == 1) {
|
uni.setNavigationBarTitle({
|
title: "隐患排查详情"
|
})
|
this.getDangerTypeList(data => {
|
this.troubleValue = this.$getIndex(data, res.data.hiddenDangerType, "dictKey",
|
"dictValue").name
|
})
|
} else {
|
uni.setNavigationBarTitle({
|
title: "矛盾纠纷详情"
|
})
|
}
|
if (res.data.workImage) {
|
this.workImage = this.$setImageUrl(res.data.workImage);
|
}
|
if (res.data.type == 1) {
|
uni.setNavigationBarTitle({
|
title: "安全隐患排查详情"
|
})
|
} else {
|
uni.setNavigationBarTitle({
|
title: "矛盾纠纷排查详情"
|
})
|
}
|
})
|
},
|
|
changeRadio(e) {
|
if (e == 2) {
|
this.form.isReporting = 1;
|
}
|
},
|
|
previewImage(urls, current) {
|
uni.previewImage({
|
urls,
|
current
|
})
|
},
|
|
submit(val) {
|
this.show = true
|
},
|
|
submitInfo() {
|
let data = {
|
id: this.info.id,
|
isProblem: this.form.isProblem,
|
isHandle: this.form.isHandle,
|
}
|
if (this.roleTypeName == "xyzt") {
|
if (!this.form.isProblem) {
|
this.$showTips("请选择是否隐患")
|
return;
|
}
|
if (this.form.isProblem == 1 && !this.form.isHandle) {
|
this.$showTips("请选择是否处理")
|
return;
|
}
|
if (this.form.isProblem == 2) {
|
if (this.form.isHandle) {
|
delete this.form.isHandle;
|
}
|
data.confirmFlag = 2;
|
} else if (this.form.isHandle == 1) {
|
data.confirmFlag = 2;
|
data.handleRemark = this.form.handleRemark
|
} else {
|
data.confirmFlag = 1;
|
}
|
} else {
|
if (!this.confirmNotion) {
|
this.$showTips("请输入处理意见")
|
return;
|
}
|
if (this.form.images.length) {
|
let urls = []
|
this.form.images.forEach(e => {
|
urls.push(e.name)
|
})
|
data.workImage = urls.join(",")
|
|
} else {
|
this.$showTips("请上传工作照片")
|
// return;
|
}
|
data.confirmFlag = 2;
|
data.confirmNotion = this.confirmNotion
|
delete this.form.images;
|
}
|
auditTroubleReport(data).then(res => {
|
if (res.code == 200) {
|
this.$showTips("操作成功", "success");
|
setTimeout(() => {
|
uni.navigateBack();
|
}, 300)
|
}
|
})
|
},
|
|
navToEdit() {
|
uni.navigateTo({
|
url: `edit?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;
|
}
|
}
|
|
|
.upload-item {
|
width: 140rpx;
|
height: 140rpx;
|
border: 1px solid #EEEEEE;
|
}
|
|
.upload {
|
margin: 0 30rpx;
|
padding: 30rpx;
|
}
|
|
.blank {
|
width: 100%;
|
height: 200rpx;
|
}
|
|
.popup-title {
|
padding: 20rpx 0;
|
text-align: center;
|
}
|
|
.popup-content {
|
padding: 20rpx;
|
}
|
|
.popup-btn {
|
padding: 20rpx;
|
|
|
.popup-btn-item {
|
width: 100%;
|
height: 78rpx;
|
line-height: 78rpx;
|
border-radius: 36rpx;
|
color: #fff;
|
background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
|
font-size: 28rpx;
|
}
|
|
.popup-btn-item:after {
|
border: none;
|
}
|
}
|
|
.footer {
|
width: 100%;
|
padding: 20rpx 30rpx;
|
box-sizing: border-box;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
background-color: #fff;
|
z-index: 10;
|
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
z-index: 999;
|
background-color: #fff;
|
box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
|
.footer-btn {
|
width: 150rpx;
|
height: 78rpx;
|
border-radius: 8rpx;
|
font-size: 32rpx;
|
color: #fff;
|
border: none;
|
background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
|
}
|
|
.footer-btn:after {
|
border: none;
|
}
|
|
}
|
</style>
|