Browse Source

评分

jly/task002
mk 3 years ago
parent
commit
227b7095e9
  1. 3
      src/assets/scss/modules/shequzhili/event-info.scss
  2. 385
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  3. 33
      src/views/modules/shequzhili/event/eventList.vue

3
src/assets/scss/modules/shequzhili/event-info.scss

@ -522,3 +522,6 @@
} }
::v-deep.el-rate__icon{
font-size: 80px;
}

385
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -1,92 +1,124 @@
<template> <template>
<div class=""> <div class="">
<el-card :class="{'box-card':source==='visiual'}" <el-card
v-if="showType==''"> :class="{ 'box-card': source === 'visiual' }"
<h3 v-if="source==='manage'">事件详情</h3> v-if="showType == ''"
>
<h3 v-if="source === 'manage'">事件详情</h3>
<div class="m-row"> <div class="m-row">
<div class="m-info"> <div class="m-info">
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">所属网格</span> <span class="info-title-2">所属网格</span>
<span>{{ info.gridName }}</span> <span>{{ info.gridName }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">发生时间</span> <span class="info-title-2">发生时间</span>
<span>{{ info.happenTime }}</span> <span>{{ info.happenTime }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">事件内容</span> <span class="info-title-2">事件内容</span>
<span>{{ info.eventContent }}</span> <span>{{ info.eventContent }}</span>
</div> </div>
<div v-if="info.imageList&&info.imageList.length>0" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.imageList && info.imageList.length > 0"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">图片</span> <span class="info-title-2">图片</span>
<img :src="src" <img
:key="src" :src="src"
style="width:150px;height:150px;padding-right:10px" :key="src"
v-for="src in info.imageList" style="width: 150px; height: 150px; padding-right: 10px"
@click="watchImg(src)" /> v-for="src in info.imageList"
@click="watchImg(src)"
/>
</div> </div>
<div v-if="info.voiceList&&info.voiceList.length>0" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.voiceList && info.voiceList.length > 0"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">语音</span> <span class="info-title-2">语音</span>
<audio controls> <audio controls>
<source :src="item.url" <source
type="" :src="item.url"
:key="item.url" type=""
v-for="item in info.voiceList" /> :key="item.url"
v-for="item in info.voiceList"
/>
</audio> </audio>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">反映渠道</span> <span class="info-title-2">反映渠道</span>
<span>{{ info.sourceTypeName }}</span> <span>{{ info.sourceTypeName }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">地址</span> <span class="info-title-2">地址</span>
<span>{{ info.address }}</span> <span>{{ info.address }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">报事人</span> <span class="info-title-2">报事人</span>
<span>{{ info.name }}</span> <span>{{ info.name }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">手机号</span> <span class="info-title-2">手机号</span>
<span>{{ info.mobile }}</span> <span>{{ info.mobile }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">身份证号</span> <span class="info-title-2">身份证号</span>
<span>{{ info.idCard?info.idCard:'--' }}</span> <span>{{ info.idCard ? info.idCard : "--" }}</span>
</div> </div>
<div :class="['info-prop',{'info-prop-vis':source==='visiual'}]"> <div
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">痛点难点</span> <span class="info-title-2">痛点难点</span>
<span>{{ info.difficultPointName }}</span> <span>{{ info.difficultPointName }}</span>
</div> </div>
<div v-if="info.operationType==='1'" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.operationType === '1'"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">已立项</span> <span class="info-title-2">已立项</span>
<div class="line" <div class="line" @click="handleToProject">查看项目</div>
@click="handleToProject">查看项目</div>
</div> </div>
<div v-if="info.operationType==='2'" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.operationType === '2'"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">已转需求</span> <span class="info-title-2">已转需求</span>
<div class="line" <div class="line" @click="handleToDemand">查看需求</div>
@click="handleToDemand">查看需求</div>
</div> </div>
<div v-if="info.operationType==='3'" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.operationType === '3'"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">已转议题</span> <span class="info-title-2">已转议题</span>
<div class="line" <div class="line" @click="handleToIssue">查看议题</div>
@click="handleToIssue">查看议题</div>
</div> </div>
<div v-if="info.satisfactionName" <div
:class="['info-prop',{'info-prop-vis':source==='visiual'}]"> v-if="info.satisfactionName || info.satisfaction"
:class="['info-prop', { 'info-prop-vis': source === 'visiual' }]"
>
<span class="info-title-2">满意度</span> <span class="info-title-2">满意度</span>
<div @click="handleToDemand">{{info.satisfactionName}}</div> <!-- @click="handleToDemand" -->
<div>{{ satisfactionNameM(info) }}</div>
</div> </div>
</div> </div>
</div> </div>
<!-- <!--
@ -94,23 +126,25 @@
1状态=完成 (已评价)||(没评价&&不是本人) 1状态=完成 (已评价)||(没评价&&不是本人)
2状态=未完成 有操作id --> 2状态=未完成 有操作id -->
<div v-if="(info.status==='processing'&&info.operationId)||(info.status==='closed_case'&&(info.satisfactionName||(!info.satisfactionName && user.id!=info.createdUserId)))" <div
class="div-btn "> v-if="
<el-button size="small" (info.status === 'processing' && info.operationId) ||
@click="handleCloseEvent">关闭</el-button> (info.status === 'closed_case' &&
(info.satisfactionName ||
(!info.satisfactionName && user.id != info.createdUserId)))
"
class="div-btn"
>
<el-button size="small" @click="handleCloseEvent">关闭</el-button>
</div> </div>
</el-card> </el-card>
<!-- -->
<el-card :class="{'box-card':source==='visiual'}" <el-card :class="{ 'box-card': source === 'visiual' }" v-if="info.status==='closed_case'&&!info.satisfactionName && !info.satisfaction&& user.id===info.createdUserId">
v-if="info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId">
<h3>满意度评价</h3> <h3>满意度评价</h3>
<div class="m-row"> <div class="m-row">
<div class="m-info"> <div class="m-info">
<div class="div-satisfy"> <div class="div-satisfy">
<div> <!-- <div>
<img :src="selBad?badurl_light:badurl" <img :src="selBad?badurl_light:badurl"
@click="clickSatisfy('bad')" /> @click="clickSatisfy('bad')" />
<div class="tip-satisfy">不满意</div> <div class="tip-satisfy">不满意</div>
@ -118,48 +152,52 @@
<div> <div>
<img :src="selGood?goodurl_light:goodurl" <img :src="selGood?goodurl_light:goodurl"
@click="clickSatisfy('good')" /> @click="clickSatisfy('good')" />
<div class="tip-satisfy">满意</div> <div class="tip-satisfy">基本满意</div>
</div> </div>
<div> <div>
<img :src="selPerfect?perfecturl_light:perfecturl" <img :src="selPerfect?perfecturl_light:perfecturl"
@click="clickSatisfy('perfect')" /> @click="clickSatisfy('perfect')" />
<div class="tip-satisfy">非常满意</div> <div class="tip-satisfy">非常满意</div>
</div> -->
<div style="display: flex; justify-content: center !important">
<el-rate v-model="starClocr" @change="handelChangeStar"></el-rate>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="div-btn "> <div class="div-btn">
<el-button size="small" <el-button size="small" @click="handleCloseEvent">关闭</el-button>
@click="handleCloseEvent">关闭</el-button> <el-button
<el-button style="margin-left:20px" style="margin-left: 20px"
type="primary" type="primary"
size="small" size="small"
@click="handleComfirmSatisfy">确定</el-button> @click="handleComfirmSatisfy"
>确定</el-button
>
</div> </div>
</el-card> </el-card>
<el-dialog :visible.sync="showSatisfy" <el-dialog
:close-on-click-modal="false" :visible.sync="showSatisfy"
:close-on-press-escape="false" :close-on-click-modal="false"
title="满意度评价" :close-on-press-escape="false"
width="550px" title="满意度评价"
top="15vh" width="550px"
class="dialog-h" top="15vh"
@closed="showSatisfy=false"> class="dialog-h"
@closed="showSatisfy = false"
<div class="div-btn "> >
<el-button size="small" <div class="div-btn">
@click="showSatisfy=false">关闭</el-button> <el-button size="small" @click="showSatisfy = false">关闭</el-button>
<el-button style="margin-left:20px" <el-button
type="primary" style="margin-left: 20px"
size="small" type="primary"
@click="handleComfirmSatisfy">确定</el-button> size="small"
@click="handleComfirmSatisfy"
>确定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -169,16 +207,17 @@ import foldText from "@/views/components/foldText";
import projectInfo from "../../xiangmu/cpts/project-info"; import projectInfo from "../../xiangmu/cpts/project-info";
import dateFormat from "dai-js/tools/dateFormat"; import dateFormat from "dai-js/tools/dateFormat";
function iniData () { function iniData() {
return { return {
user: {}, user: {},
projectPageType: 'info', starClocr: 5,
projectPageType: "info",
info: {}, info: {},
eventDetailCopy: {}, eventDetailCopy: {},
showType: '', showType: "",
projectId: '', projectId: "",
demandForm: { demandForm: {
gridId: "", gridId: "",
@ -200,12 +239,12 @@ function iniData () {
selBad: false, selBad: false,
selGood: false, selGood: false,
selPerfect: false, selPerfect: false,
badurl: require('@/assets/img/satisfy-images/face1.png'), badurl: require("@/assets/img/satisfy-images/face1.png"),
badurl_light: require('@/assets/img/satisfy-images/face1_light.png'), badurl_light: require("@/assets/img/satisfy-images/face1_light.png"),
goodurl: require('@/assets/img/satisfy-images/face2.png'), goodurl: require("@/assets/img/satisfy-images/face2.png"),
goodurl_light: require('@/assets/img/satisfy-images/face2_light.png'), goodurl_light: require("@/assets/img/satisfy-images/face2_light.png"),
perfecturl: require('@/assets/img/satisfy-images/face3.png'), perfecturl: require("@/assets/img/satisfy-images/face3.png"),
perfecturl_light: require('@/assets/img/satisfy-images/face3_light.png'), perfecturl_light: require("@/assets/img/satisfy-images/face3_light.png"),
}; };
} }
@ -222,36 +261,50 @@ export default {
}, },
eventDetailData: { eventDetailData: {
type: Object, type: Object,
default () { default() {
return {} return {};
} },
}, },
source: {//manage visiual source: {
//manage visiual
type: String, type: String,
default: 'manage' default: "manage",
} },
}, },
components: { components: {
foldText, projectInfo foldText,
projectInfo,
}, },
data: iniData, data: iniData,
computed: {}, computed: {
satisfactionNameM() {
watch: { return function (row) {
let text = "--";
if (row.satisfactionName) {
text = row.satisfactionName;
} else if (row.satisfaction == 1) {
text = "不满意";
} else if (row.satisfaction == 5) {
text = "非常满意";
} else if (row.satisfaction < 5 && row.satisfaction > 1) {
text = "基本满意";
} else {
text = "--";
}
return text;
};
},
}, },
created () {
}, watch: {},
created() {},
mounted () { mounted() {
this.user = this.$store.state.user this.user = this.$store.state.user;
if (this.eventId) { if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData)); this.info = JSON.parse(JSON.stringify(this.eventDetailData));
@ -261,27 +314,25 @@ export default {
// } // }
} }
// this.getApiData(); // this.getApiData();
}, },
methods: { methods: {
watchImg (src) { watchImg(src) {
window.open(src); window.open(src);
}, },
handleClose () { handleClose() {
this.showType = '' this.showType = "";
}, },
handleCloseEvent () { handleCloseEvent() {
this.$emit("handleClose"); this.$emit("handleClose");
}, },
async getApiData () { async getApiData() {},
},
handleToProject () { handleToProject() {
this.$emit("handleToProject") this.$emit("handleToProject");
// if (this.info.status === 'processing') { // if (this.info.status === 'processing') {
// this.projectPageType = 'edit' // this.projectPageType = 'edit'
// } else { // } else {
@ -290,76 +341,76 @@ export default {
// this.showType = 'project' // this.showType = 'project'
}, },
handleToDemand () { handleToDemand() {
this.$emit("handleToDemand") this.$emit("handleToDemand");
}, },
handleToIssue () { handleToIssue() {
this.$emit("handleToIssue") this.$emit("handleToIssue");
}, },
// //
handleSatisfy () { handleSatisfy() {
this.showSatisfy = true;
this.showSatisfy = true
}, },
handelChangeStar(val) {
clickSatisfy (type) { this.starClocr = val;
this.changeSatisfyType(val);
},
clickSatisfy(type) {
if (this.info.satisfactionName) { if (this.info.satisfactionName) {
return false return false;
} }
this.changeSatisfyType(type) this.changeSatisfyType(type);
}, },
changeSatisfyType (type) { // changeSatisfyType(num) {
if (type === 'bad') { // // if (type === 'bad') {
this.selGood = false // // this.selGood = false
this.selPerfect = false // // this.selPerfect = false
this.selBad = true // // this.selBad = true
} else if (type === 'good') { // // } else if (type === 'good') {
this.selGood = true // // this.selGood = true
this.selPerfect = false // // this.selPerfect = false
this.selBad = false // // this.selBad = false
} else if (type === 'perfect') { // // } else if (type === 'perfect') {
this.selGood = false // // this.selGood = false
this.selPerfect = true // // this.selPerfect = true
this.selBad = false // // this.selBad = false
} // // }
}, // this.starClocr = num;
// },
async handleComfirmSatisfy () {
let satisfyLevel = '' async handleComfirmSatisfy() {
if (!this.selBad && !this.selGood && !this.selPerfect) { let satisfyLevel = "";
if (this.starClocr == 0) {
this.$message.info("请选择评价级别"); 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" // 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 = { let params = {
icEventId: this.eventId, icEventId: this.eventId,
satisfaction: satisfyLevel satisfaction: this.starClocr,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.$message.success("评价成功"); this.$message.success("评价成功");
this.info.satisfactionName = '111' this.info.satisfactionName = "111";
this.showSatisfy = false this.showSatisfy = false;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
}, },
}; };
</script> </script>

33
src/views/modules/shequzhili/event/eventList.vue

@ -265,10 +265,10 @@
width="100" width="100"
label="满意度" label="满意度"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.satisfactionName">--</span> <span>{{satisfactionNameM(scope.row)}}</span>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column prop="happenTime" <el-table-column prop="happenTime"
@ -319,13 +319,16 @@
type="text" type="text"
size="small" size="small"
class="div-table-button--edit">处理</el-button> class="div-table-button--edit">处理</el-button>
<el-button
<el-button v-else-if="scope.row.status==='closed_case' && !scope.row.satisfactionName && user.id===scope.row.createdUserId" v-else-if="scope.row.status==='closed_case' && !scope.row.satisfactionName && !scope.row.satisfaction&& user.id===scope.row.createdUserId"
@click="handleWatch(scope.row)" @click="handleWatch(scope.row)"
type="text" type="text"
size="small" size="small"
class="div-table-button--edit">去评价</el-button> class="div-table-button--edit">去评价</el-button>
<el-button v-else
<!-- -->
<el-button
v-else
@click="handleWatch(scope.row)" @click="handleWatch(scope.row)"
type="text" type="text"
size="small">查看</el-button> size="small">查看</el-button>
@ -507,7 +510,25 @@ export default {
? this.clientHeight - 410 + this.iframeHeigh ? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410; : this.clientHeight - 410;
}, },
satisfactionNameM(){
return function(row){
let text = '--'
if(row.satisfactionName){
text = row.satisfactionName
}else if(row.satisfaction == 1){
text = '不满意'
}else if(row.satisfaction == 5){
text = '非常满意'
}else if(row.satisfaction < 5 && row.satisfaction > 1){
text = '基本满意'
}else{
text = '--'
}
return text
}
},
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
}, },
watch: { watch: {
"formData.endTime": function (val) { "formData.endTime": function (val) {

Loading…
Cancel
Save