Browse Source

去评级

shibei_master
jiangyy 3 years ago
parent
commit
a98de55455
  1. 117
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  2. 9
      src/views/modules/shequzhili/event/cpts/event-info.vue
  3. 110
      src/views/modules/shequzhili/event/eventList.vue

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

@ -75,6 +75,10 @@
</div>
<div v-if="info.operationId||info.status==='closed_case'"
class="div-btn ">
<el-button v-if=" !info.satisfactionName && user.id===info.createdUserId"
size="small"
class="diy-button--reset"
@click="handleSatisfy">满意度评价</el-button>
<el-button size="small"
@click="handleCloseEvent">关闭</el-button>
@ -87,6 +91,41 @@
@close="handleClose"
@afterEdit="handleClose" />
</div> -->
<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-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 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>
@ -99,7 +138,7 @@ import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
user: {},
projectPageType: 'info',
info: {},
@ -122,6 +161,18 @@ function iniData () {
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'),
};
}
@ -138,6 +189,7 @@ export default {
},
eventDetailData: {
type: Object,
default () {
return {}
@ -158,7 +210,7 @@ export default {
},
mounted () {
this.user = this.$store.state.user
if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
}
@ -172,17 +224,14 @@ export default {
},
handleClose () {
this.showType = ''
},
handleCloseEvent () {
handleCloseEvent () {
this.$emit("handleClose");
},
async getApiData () {
},
handleToProject () {
@ -199,6 +248,62 @@ export default {
this.$emit("handleToDemand")
},
//
handleSatisfy () {
this.showSatisfy = true
},
clickSatisfy (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>

9
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -31,7 +31,7 @@
<div v-if="pageTypeCopy == 'dispose'||pageTypeCopy == 'info'"
class="g-page">
<div class="g-left">
<div :class="{'g-left':projectProcess.length>0}">
<event-detail ref="ref_detail"
:type="pageType"
@ -61,12 +61,12 @@
</div>
</div>
<div class="g-right">
<div v-if="projectProcess.length>0"
class="g-right">
<el-card class="m-card"
style="max-height: 90vh; overflow: auto">
<h3>事件处理进展</h3>
<div class="m-process"
v-if="projectProcess.length>0">
<div class="m-process">
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
@ -177,7 +177,6 @@
</div>
</div>
<div v-else>暂无处理进展</div>
</el-card>
</div>

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

@ -252,11 +252,11 @@
size="small"
class="div-table-button--edit">处理</el-button>
<el-button v-else-if="scope.row.status==='closed_case' && !scope.row.satisfactionName && user.id===scope.row.createdUserId"
<!-- <el-button v-else-if="scope.row.status==='closed_case' && !scope.row.satisfactionName && user.id===scope.row.createdUserId"
@click="handleSatisfy(scope.row)"
type="text"
size="small"
class="div-table-button--edit">评价</el-button>
class="div-table-button--edit">评价</el-button> -->
<el-button v-else
@click="handleWatch(scope.row)"
type="text"
@ -290,42 +290,6 @@
@dialogOk="handleEditSuccess" />
</div>
<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-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 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>
@ -419,17 +383,7 @@ export default {
eventDetailData: {},
//
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'),
};
},
@ -564,72 +518,20 @@ export default {
}
},
//
handleSatisfy (row) {
this.eventId = row.icEventId
this.showSatisfy = true
},
clickSatisfy (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.showSatisfy = false
this.getTableData()
} else {
this.$message.error(msg)
}
},
handleClose () {
this.pageType = "list";
this.eventId = ""
this.getTableData()
},
handleOk () {
this.pageType = "list";
this.eventId = ""
this.pageNo = 1
this.getTableData()
},
handleEditSuccess () {

Loading…
Cancel
Save