You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
346 lines
9.1 KiB
346 lines
9.1 KiB
<template>
|
|
<div class="">
|
|
<el-card v-if="showType==''">
|
|
<h3>事件详情</h3>
|
|
<div class="m-row">
|
|
<div class="m-info">
|
|
<div class="info-prop">
|
|
<span class="info-title-2">所属网格:</span>
|
|
<span>{{ info.gridName }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">上报时间:</span>
|
|
<span>{{ info.createdTime }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">事件内容:</span>
|
|
<span>{{ info.eventContent }}</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="info.imageList&&info.imageList.length>0"
|
|
class="info-prop">
|
|
<span class="info-title-2">图片:</span>
|
|
<img :src="src"
|
|
:key="src"
|
|
style="width:150px;height:150px;padding-right:10px"
|
|
v-for="src in info.imageList"
|
|
@click="watchImg(src)" />
|
|
</div>
|
|
<div v-if="info.voiceList&&info.voiceList.length>0"
|
|
class="info-prop">
|
|
<span class="info-title-2">语音:</span>
|
|
<audio controls>
|
|
<source :src="item"
|
|
type=""
|
|
:key="item"
|
|
v-for="item in info.voiceList" />
|
|
</audio>
|
|
</div>
|
|
|
|
<div class="info-prop">
|
|
<span class="info-title-2">反映渠道:</span>
|
|
<span>{{ info.sourceTypeName }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">地址:</span>
|
|
<span>{{ info.address }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">报事人:</span>
|
|
<span>{{ info.name }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">手机号:</span>
|
|
<span>{{ info.mobile }}</span>
|
|
</div>
|
|
<div class="info-prop">
|
|
<span class="info-title-2">身份证号:</span>
|
|
<span>{{ info.idCard?info.idCard:'--' }}</span>
|
|
</div>
|
|
<div v-if="info.operationType==='1'"
|
|
class="info-prop">
|
|
<span class="info-title-2">已立项:</span>
|
|
<div class="line"
|
|
@click="handleToProject">查看项目</div>
|
|
</div>
|
|
<div v-if="info.operationType==='2'"
|
|
class="info-prop">
|
|
<span class="info-title-2">已转需求:</span>
|
|
<div class="line"
|
|
@click="handleToDemand">查看需求</div>
|
|
</div>
|
|
<div v-if="info.satisfactionName"
|
|
class="info-prop">
|
|
<span class="info-title-2">满意度:</span>
|
|
<div @click="handleToDemand">{{info.satisfactionName}}</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="info.operationId||!(info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId)"
|
|
class="div-btn ">
|
|
<el-button size="small"
|
|
@click="handleCloseEvent">关闭</el-button>
|
|
|
|
</div>
|
|
<!-- <div class="div-btn ">
|
|
<el-button size="small"
|
|
@click="handleCloseEvent">关闭</el-button>
|
|
|
|
</div> -->
|
|
</el-card>
|
|
|
|
<el-card v-if="info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId">
|
|
<h3>满意度评价</h3>
|
|
<div class="m-row">
|
|
<div class="m-info">
|
|
|
|
<div class="div-satisfy">
|
|
<div>
|
|
<img :src="selBad?badurl_light:badurl"
|
|
@click="clickSatisfy('bad')" />
|
|
<div class="tip-satisfy">不满意</div>
|
|
</div>
|
|
<div>
|
|
<img :src="selGood?goodurl_light:goodurl"
|
|
@click="clickSatisfy('good')" />
|
|
<div class="tip-satisfy">满意</div>
|
|
</div>
|
|
<div>
|
|
<img :src="selPerfect?perfecturl_light:perfecturl"
|
|
@click="clickSatisfy('perfect')" />
|
|
<div class="tip-satisfy">非常满意</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="div-btn ">
|
|
|
|
<el-button size="small"
|
|
@click="handleCloseEvent">关闭</el-button>
|
|
<el-button size="small"
|
|
type="primary"
|
|
@click="handleComfirmSatisfy">确定</el-button>
|
|
|
|
</div>
|
|
</el-card>
|
|
<el-dialog :visible.sync="showSatisfy"
|
|
:close-on-click-modal="false"
|
|
:close-on-press-escape="false"
|
|
title="满意度评价"
|
|
width="550px"
|
|
top="15vh"
|
|
class="dialog-h"
|
|
@closed="showSatisfy=false">
|
|
|
|
<div class="div-btn">
|
|
<el-button size="small"
|
|
@click="showSatisfy=false">关闭</el-button>
|
|
<el-button style="margin-left:20px"
|
|
type="primary"
|
|
size="small"
|
|
@click="handleComfirmSatisfy">确定</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { requestPost } from "@/js/dai/request";
|
|
import foldText from "@/views/components/foldText";
|
|
import projectInfo from "../../xiangmu/cpts/project-info";
|
|
import dateFormat from "dai-js/tools/dateFormat";
|
|
|
|
function iniData () {
|
|
return {
|
|
user: {},
|
|
projectPageType: 'info',
|
|
|
|
info: {},
|
|
eventDetailCopy: {},
|
|
showType: '',
|
|
|
|
projectId: '',
|
|
|
|
demandForm: {
|
|
gridId: "",
|
|
categoryCode: "",
|
|
parentCode: "",
|
|
content: "",
|
|
reportType: "",
|
|
reportUserName: "",
|
|
reportUserMobile: "",
|
|
reportTime: "",
|
|
wantServiceTime: "",
|
|
demandUserId: "",
|
|
demandUserName: "",
|
|
demandUserMobile: "",
|
|
},
|
|
|
|
//满意度评价
|
|
showSatisfy: false,
|
|
selBad: false,
|
|
selGood: false,
|
|
selPerfect: false,
|
|
badurl: require('@/assets/img/satisfy-images/face1.png'),
|
|
badurl_light: require('@/assets/img/satisfy-images/face1_light.png'),
|
|
goodurl: require('@/assets/img/satisfy-images/face2.png'),
|
|
goodurl_light: require('@/assets/img/satisfy-images/face2_light.png'),
|
|
perfecturl: require('@/assets/img/satisfy-images/face3.png'),
|
|
perfecturl_light: require('@/assets/img/satisfy-images/face3_light.png'),
|
|
};
|
|
}
|
|
|
|
export default {
|
|
name: "issueInfo",
|
|
props: {
|
|
eventId: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: "info",
|
|
},
|
|
|
|
eventDetailData: {
|
|
|
|
type: Object,
|
|
default () {
|
|
return {}
|
|
}
|
|
},
|
|
},
|
|
|
|
components: {
|
|
foldText, projectInfo
|
|
},
|
|
|
|
data: iniData,
|
|
|
|
computed: {},
|
|
|
|
watch: {
|
|
|
|
},
|
|
|
|
mounted () {
|
|
this.user = this.$store.state.user
|
|
if (this.eventId) {
|
|
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
|
|
|
|
//如果已经评价过,进行回显
|
|
// if (this.info.status === 'closed_case' && this.info.satisfactionName) {
|
|
// this.changeSatisfyType(this.info.satisfaction)
|
|
// }
|
|
}
|
|
// this.getApiData();
|
|
|
|
},
|
|
|
|
methods: {
|
|
watchImg (src) {
|
|
window.open(src);
|
|
},
|
|
|
|
handleClose () {
|
|
this.showType = ''
|
|
},
|
|
|
|
handleCloseEvent () {
|
|
this.$emit("handleClose");
|
|
},
|
|
|
|
async getApiData () {
|
|
},
|
|
|
|
handleToProject () {
|
|
this.$emit("handleToProject")
|
|
// if (this.info.status === 'processing') {
|
|
// this.projectPageType = 'edit'
|
|
// } else {
|
|
// this.projectPageType = 'info'
|
|
// }
|
|
|
|
// this.showType = 'project'
|
|
},
|
|
handleToDemand () {
|
|
this.$emit("handleToDemand")
|
|
},
|
|
|
|
//满意度评价
|
|
handleSatisfy () {
|
|
|
|
this.showSatisfy = true
|
|
},
|
|
|
|
clickSatisfy (type) {
|
|
if (this.info.satisfactionName) {
|
|
return false
|
|
}
|
|
|
|
this.changeSatisfyType(type)
|
|
|
|
},
|
|
changeSatisfyType (type) {
|
|
if (type === 'bad') {
|
|
this.selGood = false
|
|
this.selPerfect = false
|
|
this.selBad = true
|
|
} else if (type === 'good') {
|
|
this.selGood = true
|
|
this.selPerfect = false
|
|
this.selBad = false
|
|
} else if (type === 'perfect') {
|
|
this.selGood = false
|
|
this.selPerfect = true
|
|
this.selBad = false
|
|
}
|
|
},
|
|
|
|
async handleComfirmSatisfy () {
|
|
let satisfyLevel = ''
|
|
if (!this.selBad && !this.selGood && !this.selPerfect) {
|
|
this.$message.info("请选择评价级别");
|
|
} else {
|
|
if (this.selBad) {
|
|
satisfyLevel = 'bad'
|
|
} else if (this.selGood) {
|
|
satisfyLevel = 'good'
|
|
} else if (this.selPerfect) {
|
|
satisfyLevel = 'perfect'
|
|
}
|
|
}
|
|
const url = "/gov/project/icEvent/comment"
|
|
|
|
let params = {
|
|
icEventId: this.eventId,
|
|
satisfaction: satisfyLevel
|
|
}
|
|
|
|
const { data, code, msg } = await requestPost(url, params)
|
|
|
|
if (code === 0) {
|
|
this.$message.success("评价成功");
|
|
this.info.satisfactionName = '111'
|
|
this.showSatisfy = false
|
|
|
|
} else {
|
|
this.$message.error(msg)
|
|
}
|
|
},
|
|
|
|
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style
|
|
lang="scss"
|
|
src="@/assets/scss/modules/shequzhili/event-info.scss"
|
|
scoped
|
|
></style>
|
|
|