【修改】 修改报告详情
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user