Przeglądaj źródła

张丁 专项培训清单-PDF文件预览

zhangding 3 lat temu
rodzic
commit
b0bffeb4f3

+ 7 - 2
ui/src/views/training/spec/monthlyfeedback/index.vue

@@ -830,7 +830,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -884,7 +889,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },

+ 7 - 2
ui/src/views/training/spec/myplan/index.vue

@@ -977,7 +977,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+     //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -1031,7 +1036,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },

+ 7 - 2
ui/src/views/training/spec/plan/index.vue

@@ -1670,7 +1670,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -1724,7 +1729,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },

+ 7 - 2
ui/src/views/training/spec/seasonalfeedback/index.vue

@@ -1521,7 +1521,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -1575,7 +1580,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },

+ 7 - 2
ui/src/views/training/spec/successor/monthdata.vue

@@ -797,7 +797,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -851,7 +856,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },

+ 7 - 2
ui/src/views/training/spec/successor/seasondata.vue

@@ -1421,7 +1421,12 @@ export default {
 
       this.pptView=false
       this.ppt=true
-
+   //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+             this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+              this.loadingFlash=false
+      }
+      else{
       const formatDate =new FormData();
       formatDate.append("filepath",row.fileUrl)
 
@@ -1475,7 +1480,7 @@ export default {
         this.loadingFlash = false;
 
       })
-
+        }
 
 
     },