|
@@ -12,9 +12,6 @@
|
|
|
<div style="height: calc(100vh - 300px)">
|
|
|
|
|
|
<el-container>
|
|
|
- <el-header class="head">
|
|
|
- <el-button size="small" type="primary" @click="otherTemplate">其他模板</el-button>
|
|
|
- </el-header>
|
|
|
<el-main class="height_100" :loading="loading">
|
|
|
<el-table
|
|
|
class="copyTable"
|
|
@@ -121,15 +118,63 @@ export default {
|
|
|
this.getReportTemplate()
|
|
|
},
|
|
|
chooseReportTemplate(row){
|
|
|
- let router = this.$router.resolve({
|
|
|
- path: '/exportReport',
|
|
|
- query: {
|
|
|
- reportTemplateId: row.id,
|
|
|
- // path:row.configMessage,
|
|
|
- projectId: this.projectId,
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId,
|
|
|
+ templateId:row.id,
|
|
|
+ }
|
|
|
+ var message = this.$message({
|
|
|
+ message: '报告生成中...',
|
|
|
+ type: 'warning',
|
|
|
+ duration:0
|
|
|
+ });
|
|
|
+ this.loading = true
|
|
|
+ this.$api.editNoveltyReport(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message.success('报告生成成功')
|
|
|
+ this.loading = false
|
|
|
+ this.toEdit(response.data)
|
|
|
}
|
|
|
+ }).catch(error=>{
|
|
|
+ message.close()
|
|
|
+ this.$message.error('报告生成失败')
|
|
|
+ })
|
|
|
+ // let router = this.$router.resolve({
|
|
|
+ // path: '/exportReport',
|
|
|
+ // query: {
|
|
|
+ // reportTemplateId: row.id,
|
|
|
+ // // path:row.configMessage,
|
|
|
+ // projectId: this.projectId,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // window.open(router.href, '_blank')
|
|
|
+ },
|
|
|
+ toEdit(id){
|
|
|
+ let params = {
|
|
|
+ projectId: this.projectId,
|
|
|
+ current:1,
|
|
|
+ size:1,
|
|
|
+ id:id
|
|
|
+ }
|
|
|
+ var api = 'getReferences'
|
|
|
+ this.$api[api](params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ var data = response.data.data
|
|
|
+ if(data && data.length){
|
|
|
+ let router = this.$router.resolve({
|
|
|
+ path: '/onlyOffice',
|
|
|
+ query: {
|
|
|
+ projectId:this.projectId,
|
|
|
+ guid:data[0].fileGuid,
|
|
|
+ title:data[0].referencesName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(router.href, '_blank')
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
- window.open(router.href, '_blank')
|
|
|
},
|
|
|
},
|
|
|
};
|