【修改】 修改报告详情
This commit is contained in:
@@ -162,17 +162,12 @@ export default {
|
|||||||
// 点赞
|
// 点赞
|
||||||
goodLuck (data) {
|
goodLuck (data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/report/praise/'+data,
|
url: '/api/reportLogBook/thumbUpOrDown',
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 取消点赞
|
|
||||||
NogoodLuck (data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/report/delPraise/'+data,
|
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params:data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除评论 {id}
|
//删除评论 {id}
|
||||||
delJuggle (data) {
|
delJuggle (data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -204,6 +199,22 @@ export default {
|
|||||||
params:data
|
params:data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取
|
// 获取评分
|
||||||
|
getScore(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/report-rating/rating',
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取点赞
|
||||||
|
getGood(data){
|
||||||
|
|
||||||
|
return request({
|
||||||
|
url: '/api/reportLogBook/getThumbUpCount',
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,23 +121,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
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.$api.report.goodLuck(this.reportId).then(res=>{
|
||||||
this.isShow=!this.isShow
|
this.isShow=!this.isShow
|
||||||
this.$message.success("点赞成功")
|
this.$message.success("操作成功")
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$message.warning("操作失败")
|
this.$message.warning("操作失败")
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//评分
|
//评分
|
||||||
saveScore(){
|
saveScore(){
|
||||||
@@ -248,6 +252,8 @@ export default {
|
|||||||
// this.previewRow()
|
// this.previewRow()
|
||||||
this.getComment()
|
this.getComment()
|
||||||
this.getReportDetail()
|
this.getReportDetail()
|
||||||
|
this.getScore()
|
||||||
|
this.getGood()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user