【修改】 修改上传报告 修改流程中心(没完成)

This commit is contained in:
zhoulingpo
2023-05-09 15:31:50 +08:00
parent d76713dbac
commit 6c01b7f587
14 changed files with 191 additions and 72 deletions
+57 -22
View File
@@ -2,6 +2,7 @@
<div class="content-height report-detail">
<div class="title">
<el-tooltip :content="row.name" placement="top-start">
<span>{{ row.name || '-' }}</span>
</el-tooltip>
</div>
@@ -9,7 +10,7 @@
<el-row>
<el-col :span="24" class="desc-item">
<label>上传人</label>
<div>{{ row.createUserName }}</div>
<div>{{ row.uploaderName }}</div>
</el-col>
<el-col :span="24" class="desc-item">
<label>关键词</label>
@@ -29,7 +30,7 @@
</el-col>
<el-col :span="24" class="desc-item">
<label>标签</label>
<div>{{ row.labelList || '-' }}</div>
<div>{{ row.labelList&&row.labelList.join(',') || '-' }}</div>
</el-col>
</el-row>
</div>
@@ -67,16 +68,23 @@
<div class="nameCir">
{{item.userName.slice(0,1)}}
</div>
<div class="name">
{{item.orgName+"【"+item.userName+"】"}}
</div>
</div>
<div class="juggle_right">
<div class="content">{{ item.comment }}</div>
<div class="bottom">
<div class="time">{{ item.createTime }}</div>
<el-button class="delbtn" size="medium" plain type="primary" @click="delJugg(item.id)">删除</el-button>
<div class="time">{{ item.createTime && formatDate2(item.createTime) }}</div>
<el-button class="delbtn" size="medium" plain type="primary" v-if="item.userId==userId || isAdmin"
@click="delJugg(item.id)">删除</el-button>
</div>
</div>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="q.pageNo"
:page-sizes="[5, 10, 20]" :page-size="q.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="total" />
</div>
<div>
@@ -86,12 +94,15 @@
<script>
import { downloadFile } from '@/utils/downloadFile'
import { formatDate } from '@/utils/date'
import { formatDate2 } from '@/utils/date'
export default {
name: 'ReportDetail',
data () {
return {
isAdmin: false, //是否是管理员
report:{},
formatDate2,
isShow: false,
userRating:'',
watermarkText: '', // 水印
@@ -130,7 +141,8 @@ export default {
},
//评分
saveScore(){
this.$api.report.addScore({userRating:+this.userRating,reportId:this.reportId}).then(res=>{
let userRating = this.userRating*2
this.$api.report.addScore({userRating:+userRating,reportId:this.reportId}).then(res=>{
})
},
@@ -165,6 +177,17 @@ export default {
})
})
},
// 单页数据量
handleSizeChange(val) {
this.q.pageSize = val;
this.q.pageNo = 1;
this.getComment();
},
// 第几页
handleCurrentChange(val) {
this.q.pageNo = val;
this.getComment();
},
// 获取评论
getComment(){
this.$api.report.getJuggle({...this.q,reportId:this.reportId}).then(res=>{
@@ -190,17 +213,13 @@ 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 () {
// 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('此操作将下载所选数据文件, 是否继续?', '提示', {
@@ -213,11 +232,22 @@ export default {
})
// })
},
// 获取详情
getReportDetail(){
this.$api.report.getReportDetail(this.reportId).then(res=>{
this.row = res.data
// 需要给分数/2
this.$set(this,'report',res.data)
this.previewRow()
})
},
},
created () {
mounted () {
this.reportId=this.$route.query.reportId
this.isAdmin = this.$store.getters.userInfo.roleIdList.indexOf('35LLRCAQ8D') > -1
// this.previewRow()
this.getComment()
this.getReportDetail()
}
}
</script>
@@ -255,7 +285,7 @@ export default {
font-size: 14px;
font-weight: 400;
color: #595959;
width: 64px;
width: 85px;
border-right: 1px solid #BFBFBF;
margin-right: 9px;
}
@@ -329,12 +359,17 @@ export default {
width: 15%;
text-align: center;
border-right: 1px solid #e6f6fe;
margin: 0 auto;
.nameCir{
background-color: pink;
width: 50px;
height: 50px;
width: 60px;
height: 60px;
border-radius: 50%;
text-align: center;
line-height: 60px;
color:#fff;
font-size: 18px;
margin: 20px calc(50% - 30px);
}
}
.juggle_right{