diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 36a6b318..74df7aa3 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -75,6 +75,10 @@
+ 满意度评价 关闭 @@ -87,6 +91,41 @@ @close="handleClose" @afterEdit="handleClose" />
--> + + +
+
+ +
不满意
+
+
+ +
满意
+
+
+ +
非常满意
+
+
+
+ 关闭 + 确定 +
+
@@ -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) + } + }, + + }, }; diff --git a/src/views/modules/shequzhili/event/cpts/event-info.vue b/src/views/modules/shequzhili/event/cpts/event-info.vue index 38e9ce64..d3d65609 100644 --- a/src/views/modules/shequzhili/event/cpts/event-info.vue +++ b/src/views/modules/shequzhili/event/cpts/event-info.vue @@ -31,7 +31,7 @@
-
+
-
+

事件处理进展

-
+
-
暂无处理进展
diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue index c82cd9c0..09bf4e10 100644 --- a/src/views/modules/shequzhili/event/eventList.vue +++ b/src/views/modules/shequzhili/event/eventList.vue @@ -252,11 +252,11 @@ size="small" class="div-table-button--edit">处理 - 评价 + class="div-table-button--edit">评价 -->
- - -
-
- -
不满意
-
-
- -
满意
-
-
- -
非常满意
-
-
-
- 关闭 - 确定 -
-
-
@@ -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 () {