+
+
+ {{item.userName.slice(0,1)}}
+
+
-
ssss
+
{{ item.comment }}
-
time
-
删除
+
{{ item.createTime }}
+
删除
@@ -89,13 +93,85 @@ export default {
data () {
return {
isShow: false,
- value1:'',
+ userRating:'',
watermarkText: '', // 水印
content: '',
- row: {}
+ row: {},
+ comment:'',
+ reportId:'',
+ commonList:[],
+ q:{
+ pageNo:1,
+ pageSize:5,
+
+ },
+ userId:this.$store.getters.userInfo.USID,
+ userName:this.$store.getters.userInfo.USNAME,
}
},
methods: {
+ //点赞
+ 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("点赞成功")
+ }).catch(()=>{
+ this.$message.warning("操作失败")
+ })
+ }
+ },
+ //评分
+ saveScore(){
+ this.$api.report.addScore({userRating:+this.userRating,reportId:this.reportId}).then(res=>{
+
+ })
+ },
+ addJuggle(){
+ if(this.comment!=''){
+ this.$api.report.addJuggle({
+ comment:this.comment,
+ reportId:this.reportId,
+ userId: this.userId,
+ userName:this.userName
+ }).then(res=>{
+ this.$message.success("评论成功")
+ this.comment=''
+ this.getComment()
+ })
+ }else {
+ this.$message.warning("请填写评论")
+ }
+ },
+ // 删除评论
+ delJugg(id) {
+ this.$confirm('确认删除该条评论?', '删除', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ confirmButtonClass: 'common-button-primary',
+
+ type: 'warning'
+ }).then(() => {
+ this.$api.report.delJuggle(id).then(res=>{
+ this.$message.success("删除成功")
+ this.getComment()
+ })
+ })
+ },
+ // 获取评论
+ getComment(){
+ this.$api.report.getJuggle({...this.q,reportId:this.reportId}).then(res=>{
+ this.commonList=res.data.records
+ this.total=res.data.total
+ })
+ },
getKeyContent(list) {
if (list) {
let keyContent = []
@@ -114,17 +190,17 @@ export default {
}
},
// 预览
- previewRow () {
- if (!this.$route.query.row) {
- this.$router.push({ path: '/report/list', query: { id: this.$route.query.id } })
- return
- }
- this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`
- this.row = JSON.parse(this.$route.query.row)
- this.$api.report.reportGetReportHtmlId({ id: this.row.id }).then(({ data }) => {
- this.content = data.content
- })
- },
+ // previewRow () {
+ // if (!this.$route.query.row) {
+ // this.$router.push({ path: '/report/list', query: { id: this.$route.query.id } })
+ // return
+ // }
+ // this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`
+ // this.row = JSON.parse(this.$route.query.row)
+ // this.$api.report.reportGetReportHtmlId({ id: this.row.id }).then(({ data }) => {
+ // this.content = data.content
+ // })
+ // },
// 下载
downloadRow (row) {
// this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', {
@@ -137,12 +213,11 @@ export default {
})
// })
},
- saveScore(){
-
- }
},
created () {
- this.previewRow()
+ this.reportId=this.$route.query.reportId
+ // this.previewRow()
+ this.getComment()
}
}
@@ -255,6 +330,12 @@ export default {
text-align: center;
border-right: 1px solid #e6f6fe;
margin: 0 auto;
+ .nameCir{
+ background-color: pink;
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ }
}
.juggle_right{
position: relative;
diff --git a/src/views/Report/ReportList.vue b/src/views/Report/ReportList.vue
index acdc500..becbab3 100644
--- a/src/views/Report/ReportList.vue
+++ b/src/views/Report/ReportList.vue
@@ -490,7 +490,7 @@ export default {
},
// 跳转到详情
goReportDetail(row) {
- this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, row: JSON.stringify(row)}})
+ this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, reportId: row.id}})
}
},
created() {
diff --git a/src/views/reportProcess/components/reportForm.vue b/src/views/reportProcess/components/reportForm.vue
index 6b08142..247a5fc 100644
--- a/src/views/reportProcess/components/reportForm.vue
+++ b/src/views/reportProcess/components/reportForm.vue
@@ -111,7 +111,7 @@
{{form.fileName}}
-
+
@@ -239,6 +239,11 @@ export default {
}
},
methods: {
+ downFile(id){
+ this.$api.reportProcess.downFile(id).then(res=>{
+
+ })
+ },
handleClick(){
this.orgTableVal=this.form.department
this.orgTableValName=this.form.departmentName