diff --git a/src/assets/scss/modules/shequzhili/event-info.scss b/src/assets/scss/modules/shequzhili/event-info.scss index 6c2bf3cca..47ef5017b 100644 --- a/src/assets/scss/modules/shequzhili/event-info.scss +++ b/src/assets/scss/modules/shequzhili/event-info.scss @@ -522,3 +522,6 @@ } +::v-deep.el-rate__icon{ + font-size: 80px; +} diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 55df457d5..a3fc44556 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -1,92 +1,124 @@ @@ -169,16 +207,17 @@ import foldText from "@/views/components/foldText"; import projectInfo from "../../xiangmu/cpts/project-info"; import dateFormat from "dai-js/tools/dateFormat"; -function iniData () { +function iniData() { return { user: {}, - projectPageType: 'info', + starClocr: 5, + projectPageType: "info", info: {}, eventDetailCopy: {}, - showType: '', + showType: "", - projectId: '', + projectId: "", demandForm: { gridId: "", @@ -200,12 +239,12 @@ function iniData () { 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'), + 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"), }; } @@ -222,36 +261,50 @@ export default { }, eventDetailData: { - type: Object, - default () { - return {} - } + default() { + return {}; + }, }, - source: {//展示来源:manage 管理平台 visiual 可视化平台 + source: { + //展示来源:manage 管理平台 visiual 可视化平台 type: String, - default: 'manage' - } + default: "manage", + }, }, components: { - foldText, projectInfo + foldText, + projectInfo, }, data: iniData, - computed: {}, - - watch: { - + computed: { + 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; + }; + }, }, - created () { - - }, + watch: {}, + created() {}, - mounted () { - this.user = this.$store.state.user + mounted() { + this.user = this.$store.state.user; if (this.eventId) { this.info = JSON.parse(JSON.stringify(this.eventDetailData)); @@ -261,27 +314,25 @@ export default { // } } // this.getApiData(); - }, methods: { - watchImg (src) { + watchImg(src) { window.open(src); }, - handleClose () { - this.showType = '' + handleClose() { + this.showType = ""; }, - handleCloseEvent () { + handleCloseEvent() { this.$emit("handleClose"); }, - async getApiData () { - }, + async getApiData() {}, - handleToProject () { - this.$emit("handleToProject") + handleToProject() { + this.$emit("handleToProject"); // if (this.info.status === 'processing') { // this.projectPageType = 'edit' // } else { @@ -290,76 +341,76 @@ export default { // this.showType = 'project' }, - handleToDemand () { - this.$emit("handleToDemand") + handleToDemand() { + this.$emit("handleToDemand"); }, - handleToIssue () { - this.$emit("handleToIssue") + handleToIssue() { + this.$emit("handleToIssue"); }, //满意度评价 - handleSatisfy () { - - this.showSatisfy = true + handleSatisfy() { + this.showSatisfy = true; }, - - clickSatisfy (type) { + handelChangeStar(val) { + this.starClocr = val; + this.changeSatisfyType(val); + }, + clickSatisfy(type) { if (this.info.satisfactionName) { - return false + return false; } - this.changeSatisfyType(type) - + 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) { + // changeSatisfyType(num) { + // // 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 + // // } + // this.starClocr = num; + // }, + + async handleComfirmSatisfy() { + let satisfyLevel = ""; + if (this.starClocr == 0) { 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 = { 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) { this.$message.success("评价成功"); - this.info.satisfactionName = '111' - this.showSatisfy = false - + this.info.satisfactionName = "111"; + this.showSatisfy = false; } else { - this.$message.error(msg) + this.$message.error(msg); } }, - - }, }; diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue index cae3580d2..13e5afae2 100644 --- a/src/views/modules/shequzhili/event/eventList.vue +++ b/src/views/modules/shequzhili/event/eventList.vue @@ -265,10 +265,10 @@ width="100" label="满意度" :show-overflow-tooltip="true"> - + {{satisfactionNameM(scope.row)}} + 处理 - - 去评价 - + 查看 @@ -507,7 +510,25 @@ export default { ? this.clientHeight - 410 + this.iframeHeigh : 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"]), + }, watch: { "formData.endTime": function (val) {