diff --git a/src/views/Report/ReportDetail.vue b/src/views/Report/ReportDetail.vue
index 6e9eefd..e76c410 100644
--- a/src/views/Report/ReportDetail.vue
+++ b/src/views/Report/ReportDetail.vue
@@ -56,7 +56,7 @@
@@ -153,6 +153,7 @@ export default {
},
userId: this.$store.getters.userInfo.usid,
userName: this.$store.getters.userInfo.usname,
+ isExcel:false
}
},
methods: {
@@ -266,6 +267,7 @@ export default {
},
handleFile(row){
this.file=row
+
let lastName=row.fileName.split('.')
let list=['xls','xlsx','XLS','XLSX']
if(list.indexOf(lastName[lastName.length-1])>-1){
@@ -283,9 +285,16 @@ export default {
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
- this.$api.report.reportDownload({ reportId: this.row.id}).then(res => {
- downloadFile(res)
- })
+ if(this.isExcel){
+ this.$api.report.reportDownloadALL({ reportId: this.row.id}).then(res => {
+ downloadFile(res)
+ })
+ }else{
+ this.$api.report.reportDownload({ reportId: this.row.id}).then(res => {
+ downloadFile(res)
+ })
+ }
+
// })
},
// 获取详情
@@ -300,7 +309,11 @@ export default {
},
mounted() {
this.reportId = this.$route.query.reportId
-
+ if(this.$route.query.isExecel){
+ this.isExcel=true
+ }else{
+ this.isExcel=false
+ }
// this.previewRow()
this.getComment()
this.getReportDetail()
diff --git a/src/views/Report/ReportManager.vue b/src/views/Report/ReportManager.vue
index 0bcd3f5..c0603b0 100644
--- a/src/views/Report/ReportManager.vue
+++ b/src/views/Report/ReportManager.vue
@@ -731,7 +731,7 @@ export default {
// this.content = data.content;
// this.dialogPreview = true;
// })
- window.open('/report/detail?id='+this.$route.query.id+'&reportId='+row.id)
+ window.open('/report/detail?id='+this.$route.query.id+'&reportId='+row.id +'&isExecel=1')
// this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, reportId: row.id}})
this.reportDateList();
},