【修改】 修改报告详情

This commit is contained in:
zhoulingpo
2023-05-09 15:55:20 +08:00
parent 6c01b7f587
commit ea9052882f
2 changed files with 36 additions and 19 deletions
+16 -10
View File
@@ -121,23 +121,27 @@ export default {
}
},
methods: {
// 获取评分
getScore(){
this.$api.report.getScore({reportId:this.reportId}).then(res=>{
this.userRating=res.data/2
})
},
// 获取点赞数量及其状态
getGood(){
this.$api.report.getGood({reportId:this.reportId}).then(res=>{
})
},
//点赞
pointZan(type){
if(type== 'n'){
this.$api.report.NogoodLuck(this.reportId).then(res=>{
this.isShow=!this.isShow
this.$message.success("取消成功")
}).catch(()=>{
this.$message.warning("操作失败")
})
}else{
this.$api.report.goodLuck(this.reportId).then(res=>{
this.isShow=!this.isShow
this.$message.success("点赞成功")
this.$message.success("操作成功")
}).catch(()=>{
this.$message.warning("操作失败")
})
}
},
//评分
saveScore(){
@@ -248,6 +252,8 @@ export default {
// this.previewRow()
this.getComment()
this.getReportDetail()
this.getScore()
this.getGood()
}
}
</script>