ly 2 years ago
parent
commit
1e1ff56315

+ 0 - 9
master/pom.xml

@@ -247,15 +247,6 @@
 			<version>1.13</version>
 			<version>1.13</version>
 		</dependency>
 		</dependency>
 
 
-
-
-		<!--视频转码-->
-		<dependency>
-			<groupId>ws.schild</groupId>
-			<artifactId>jave-all-deps</artifactId>
-			<version>3.1.1</version>
-		</dependency>
-
 		<!-- excel工具 -->
 		<!-- excel工具 -->
 		<dependency>
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<groupId>org.apache.poi</groupId>

+ 57 - 15
master/src/main/java/com/ruoyi/project/officeConvert/OfficeConvertController.java

@@ -2,9 +2,14 @@ package com.ruoyi.project.officeConvert;
 
 
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.constant.HttpStatus;
 import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.domain.AjaxResult;
 
 
 import org.jodconverter.DocumentConverter;
 import org.jodconverter.DocumentConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
@@ -15,6 +20,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.io.*;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
@@ -38,8 +44,7 @@ public class OfficeConvertController {
     @Resource
     @Resource
     DocumentConverter documentConverter;
     DocumentConverter documentConverter;
 
 
-    @Value("${ruoyi.profile}")
-    private String profile;
+    protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
 
 
     private static  String successMsg="请求成功!请预览文件!";
     private static  String successMsg="请求成功!请预览文件!";
 
 
@@ -57,7 +62,7 @@ public class OfficeConvertController {
 
 
         String newFilePath=filepath.replace("/profile","");
         String newFilePath=filepath.replace("/profile","");
         // 需要转换的文件路径
         // 需要转换的文件路径
-        File file = new File(profile+newFilePath);
+        File file = new File(RuoYiConfig.getProfile()+newFilePath);
         boolean  flag= file.exists();
         boolean  flag= file.exists();
         if(flag==false){
         if(flag==false){
             return new AjaxResult(HttpStatus.SUCCESS,fileMiss,Constants.RESOURCE_PREFIX+ "/" + newFilePath);
             return new AjaxResult(HttpStatus.SUCCESS,fileMiss,Constants.RESOURCE_PREFIX+ "/" + newFilePath);
@@ -66,7 +71,7 @@ public class OfficeConvertController {
 
 
         try {
         try {
             // 转换之后文件生成的本地地址
             // 转换之后文件生成的本地地址
-            File newFile = new File(profile);
+            File newFile = new File(RuoYiConfig.getProfile());
             if (!newFile.exists()) {
             if (!newFile.exists()) {
                 newFile.mkdirs();
                 newFile.mkdirs();
             }
             }
@@ -75,7 +80,7 @@ public class OfficeConvertController {
             String newName=name.substring(0,t);
             String newName=name.substring(0,t);
             //根据文件类型判断转为pdf还是html,主要是预览效果问题
             //根据文件类型判断转为pdf还是html,主要是预览效果问题
             if(newFilePath.endsWith("docx")||newFilePath.endsWith("jpg")||newFilePath.endsWith("png")
             if(newFilePath.endsWith("docx")||newFilePath.endsWith("jpg")||newFilePath.endsWith("png")
-                    ||newFilePath.endsWith(".tif")||newFilePath.endsWith(".rar")){
+                    ||newFilePath.endsWith(".tif")||newFilePath.endsWith(".jpeg")){
                 converterPdf =  newName+".pdf";
                 converterPdf =  newName+".pdf";
             }else if(newFilePath.endsWith(".csv")){
             }else if(newFilePath.endsWith(".csv")){
                 converterPdf =  newName+".html";
                 converterPdf =  newName+".html";
@@ -88,25 +93,22 @@ public class OfficeConvertController {
                     newFilePath.endsWith("3gp")||newFilePath.endsWith("mkv")||newFilePath.endsWith(".dwg")) {
                     newFilePath.endsWith("3gp")||newFilePath.endsWith("mkv")||newFilePath.endsWith(".dwg")) {
                 //直接返回源文件路径
                 //直接返回源文件路径
                 return new AjaxResult(HttpStatus.SUCCESS,failMsg,Constants.RESOURCE_PREFIX+ "/" + newFilePath);
                 return new AjaxResult(HttpStatus.SUCCESS,failMsg,Constants.RESOURCE_PREFIX+ "/" + newFilePath);
-                //原本是将其他格式转换为.mp4
-            /* String codcFilePath=   exchangeToMp4("D:\\ffmpeg\\ffmpeg-2022-06-12-git-4d45f5acbd-essentials_build\\ffmpeg-2022-06-12-git-4d45f5acbd-essentials_build\\bin\\ffmpeg.exe",
-                     profile+newFilePath,profile + "\\"  +converterPdf);
-                documentConverter.convert(new File((codcFilePath))).to(new File(profile + "\\"  +converterPdf)).execute();*/
             }else {
             }else {
                 converterPdf =  newName+".html";
                 converterPdf =  newName+".html";
             }
             }
-
             // 文件转化
             // 文件转化
+            documentConverter.convert(file).to(new File(RuoYiConfig.getProfile() + File.separator +"temp" + File.separator +converterPdf)).execute();
 
 
-            documentConverter.convert(file).to(new File(profile + "\\"  +converterPdf)).execute();
-
+            this.doActionConvertedFile(RuoYiConfig.getProfile() + File.separator +"temp" + File.separator +converterPdf);
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
 
 
         //最后应该返回转换后的文件名称
         //最后应该返回转换后的文件名称
 
 
-        String pathFileName = Constants.RESOURCE_PREFIX+ "/" + converterPdf;
+        String pathFileName = Constants.RESOURCE_PREFIX+ File.separator +"temp" + File.separator + converterPdf;
+
+
         return  newFilePath.endsWith(".csv")? new AjaxResult(HttpStatus.SUCCESS,codeMiss,pathFileName): new AjaxResult(HttpStatus.SUCCESS,successMsg,pathFileName) ;
         return  newFilePath.endsWith(".csv")? new AjaxResult(HttpStatus.SUCCESS,codeMiss,pathFileName): new AjaxResult(HttpStatus.SUCCESS,successMsg,pathFileName) ;
     }
     }
 
 
@@ -115,7 +117,7 @@ public class OfficeConvertController {
         Map<String, Object> resultMap = new HashMap<>();
         Map<String, Object> resultMap = new HashMap<>();
         String newFilePath=filepath.replace("/profile","");
         String newFilePath=filepath.replace("/profile","");
         // 需要转换的PPT文件路径
         // 需要转换的PPT文件路径
-        File file = new File(profile+newFilePath);
+        File file = new File(RuoYiConfig.getProfile()+newFilePath);
         //判断ppt,pptx文件是否存在本地
         //判断ppt,pptx文件是否存在本地
         boolean  flag= file.exists();
         boolean  flag= file.exists();
         if(flag==false){
         if(flag==false){
@@ -123,7 +125,7 @@ public class OfficeConvertController {
         }
         }
 
 
         //  String imagePath = Constants.RESOURCE_PREFIX+ "/" +   ;
         //  String imagePath = Constants.RESOURCE_PREFIX+ "/" +   ;
-        File imageFile = new File(profile);
+        File imageFile = new File(RuoYiConfig.getProfile() + File.separator + "temp");
         if (!imageFile.exists()){
         if (!imageFile.exists()){
             imageFile.mkdirs();
             imageFile.mkdirs();
         } //判断生成文件路径是否已存在
         } //判断生成文件路径是否已存在
@@ -143,4 +145,44 @@ public class OfficeConvertController {
         return  new AjaxResult(HttpStatus.SUCCESS,successMsg,resultMap);
         return  new AjaxResult(HttpStatus.SUCCESS,successMsg,resultMap);
     }
     }
 
 
+    private static final String getPathFileName(String uploadDir, String fileName) throws IOException
+    {
+        int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
+        String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
+        String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        return pathFileName;
+    }
+
+    /**
+     * 对转换后的文件进行操作(改变编码方式)
+     *
+     * @param outFilePath 文件绝对路径
+     */
+    public void doActionConvertedFile(String outFilePath) {
+        StringBuilder sb = new StringBuilder();
+        try (InputStream inputStream = new FileInputStream(outFilePath);
+             BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, System.getProperty("sun.jnu.encoding")))) {
+            String line;
+            while (null != (line = reader.readLine())) {
+                if (line.contains("charset=gb2312")) {
+                    line = line.replace("charset=gb2312", "charset=utf-8");
+                }
+                sb.append(line);
+            }
+            // 添加sheet控制头
+            sb.append("<script src=\"js/jquery-3.0.0.min.js\" type=\"text/javascript\"></script>");
+            sb.append("<script src=\"js/excel.header.js\" type=\"text/javascript\"></script>");
+            sb.append("<link rel=\"stylesheet\" href=\"bootstrap/css/bootstrap.min.css\">");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        // 重新写入文件
+        try (FileOutputStream fos = new FileOutputStream(outFilePath);
+             BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fos, StandardCharsets.UTF_8))) {
+            writer.write(sb.toString());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
 }
 }

+ 6 - 6
master/src/main/java/com/ruoyi/project/officeConvert/PptPreview.java

@@ -51,7 +51,7 @@ public class PptPreview {
                 }
                 }
                 //根据幻灯片大小生成图片
                 //根据幻灯片大小生成图片
 
 
-                BufferedImage img = new BufferedImage(pgsize.width,pgsize.height, BufferedImage.TYPE_INT_RGB);
+                BufferedImage img = new BufferedImage(pgsize.width * 3,pgsize.height * 3, BufferedImage.TYPE_INT_RGB);
                 Graphics2D graphics = img.createGraphics();
                 Graphics2D graphics = img.createGraphics();
                 graphics.setPaint(Color.white);
                 graphics.setPaint(Color.white);
                 graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,pgsize.height));
                 graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,pgsize.height));
@@ -60,7 +60,7 @@ public class PptPreview {
                 graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                 graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                 graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
                 graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
                 graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
                 graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
-
+                graphics.scale(3 , 3);
 
 
                 //每个文件路径对应自己文件名的文件夹,以区别防止文件名也重复
                 //每个文件路径对应自己文件名的文件夹,以区别防止文件名也重复
                 // 最核心的代码
                 // 最核心的代码
@@ -69,7 +69,7 @@ public class PptPreview {
                 String absolutePath = imgFile.getAbsolutePath()+"/"+ newName+(i + 1) + ".jpeg";
                 String absolutePath = imgFile.getAbsolutePath()+"/"+ newName+(i + 1) + ".jpeg";
                 File jpegFile = new File(absolutePath);
                 File jpegFile = new File(absolutePath);
                 // 图片路径存放
                 // 图片路径存放
-                list.add(Constants.RESOURCE_PREFIX+ "/"+newName+(i + 1) + ".jpeg");
+                list.add(Constants.RESOURCE_PREFIX+ "/temp/"+newName+(i + 1) + ".jpeg");
                 /*//如果图片存在,则不再生成
                 /*//如果图片存在,则不再生成
                 if (jpegFile.exists()) {
                 if (jpegFile.exists()) {
                     continue;
                     continue;
@@ -123,7 +123,7 @@ public class PptPreview {
                 }
                 }
                 //根据幻灯片大小生成图片
                 //根据幻灯片大小生成图片
 
 
-                BufferedImage img = new BufferedImage(pgsize.width,pgsize.height, BufferedImage.TYPE_INT_RGB);
+                BufferedImage img = new BufferedImage(pgsize.width * 3,pgsize.height * 3, BufferedImage.TYPE_INT_RGB);
                 Graphics2D graphics = img.createGraphics();
                 Graphics2D graphics = img.createGraphics();
                 graphics.setPaint(Color.white);
                 graphics.setPaint(Color.white);
                 graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,pgsize.height));
                 graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,pgsize.height));
@@ -132,7 +132,7 @@ public class PptPreview {
                 graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                 graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                 graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
                 graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
                 graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
                 graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
-
+                graphics.scale(3 ,3 );
 
 
                 //每个文件路径对应自己文件名的文件夹,以区别防止文件名也重复
                 //每个文件路径对应自己文件名的文件夹,以区别防止文件名也重复
                 // 最核心的代码
                 // 最核心的代码
@@ -141,7 +141,7 @@ public class PptPreview {
                 String absolutePath = imgFile.getAbsolutePath()+"/"+ newName+(i + 1) + ".jpeg";
                 String absolutePath = imgFile.getAbsolutePath()+"/"+ newName+(i + 1) + ".jpeg";
                 File jpegFile = new File(absolutePath);
                 File jpegFile = new File(absolutePath);
                 // 图片路径存放
                 // 图片路径存放
-                list.add(Constants.RESOURCE_PREFIX+ "/"+newName+(i + 1) + ".jpeg");
+                list.add(Constants.RESOURCE_PREFIX+ "/temp/"+newName+(i + 1) + ".jpeg");
                 /*//如果图片存在,则不再生成
                 /*//如果图片存在,则不再生成
                 if (jpegFile.exists()) {
                 if (jpegFile.exists()) {
                     continue;
                     continue;

+ 3 - 0
master/src/main/resources/application.yml

@@ -174,6 +174,9 @@ xss:
 jodconverter:
 jodconverter:
   local:
   local:
     enabled: true
     enabled: true
+    # 设置LibreOffice主目录
+    #    office-home: /opt/libreoffice7.2  C:/Program Files/LibreOffice
+    office-home: C:/Program Files/LibreOffice
     max-tasks-per-process: 100
     max-tasks-per-process: 100
     port-numbers: 8100
     port-numbers: 8100
     # 开启多个LibreOffice进程,每个端口对应一个进程
     # 开启多个LibreOffice进程,每个端口对应一个进程

+ 34 - 0
ui/src/assets/styles/index.scss

@@ -448,3 +448,37 @@ aside {
   font-weight: normal;
   font-weight: normal;
   font-style: normal;
   font-style: normal;
 }
 }
+
+.table {
+  width: 100%;
+  max-width: 100%;
+  > thead,
+  > tbody,
+  > tfoot {
+    > tr {
+      > th,
+      > td {
+        vertical-align: top;
+        border-top: 1px solid;
+      }
+    }
+  }
+  > thead > tr > th {
+    vertical-align: bottom;
+    border-bottom: 2px solid;
+  }
+  > caption + thead,
+  > colgroup + thead,
+  > thead:first-child {
+    > tr:first-child {
+      > th,
+      > td {
+        border-top: 0;
+      }
+    }
+  }
+  > tbody + tbody {
+    border-top: 2px solid;
+  }
+}
+

+ 55 - 9
ui/src/views/components/PlantProgList/index.vue

@@ -85,7 +85,7 @@
     </el-row>
     </el-row>
     <form ref="downloadExportForm" :action="downloadExportAction" target="FORMSUBMIT">
     <form ref="downloadExportForm" :action="downloadExportAction" target="FORMSUBMIT">
     </form>
     </form>
-    <el-table v-loading="loading" :data="plantproglistList" @selection-change="handleSelectionChange" :cell-class-name="tableCellClassName" :height="clientHeight" border>
+    <el-table v-loading="loading" class="table" :data="plantproglistList" @selection-change="handleSelectionChange" :cell-class-name="tableCellClassName" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column :label="$t('文件编号')" align="center" prop="fileno" width="150" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('文件编号')" align="center" prop="fileno" width="150" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('文件名称')" align="center" width="220" prop="filename" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('文件名称')" align="center" width="220" prop="filename" :show-overflow-tooltip="true"/>
@@ -430,7 +430,7 @@
       <div style="margin-top: -60px;float: right;margin-right: 40px;">
       <div style="margin-top: -60px;float: right;margin-right: 40px;">
         <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
       <div style="margin-top: -30px" >
       <div style="margin-top: -30px" >
-        <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
       </div>
       </div>
       <div style="margin-left:10%" >
       <div style="margin-left:10%" >
         <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
         <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
@@ -953,11 +953,10 @@ export default {
       const didi={ imgs:this.imgs}
       const didi={ imgs:this.imgs}
       if( this.pptView==true&&this.ppt==false){
       if( this.pptView==true&&this.ppt==false){
         let routeUrl = this.$router.resolve({
         let routeUrl = this.$router.resolve({
-          path: "/pptyulan",
+          path: "/cpms/index.html#/pptyulan",
           query:didi
           query:didi
-
         });
         });
-        window.open(routeUrl.href, '_blank');
+        window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank');
         console.log(this.imgs)
         console.log(this.imgs)
       }else {
       }else {
         window.open(this.pdf.pdfUrl);
         window.open(this.pdf.pdfUrl);
@@ -968,7 +967,7 @@ export default {
       this.loadingFlash=true
       this.loadingFlash=true
       this.pdf.open =true
       this.pdf.open =true
       this.pdf.title = row.fileName
       this.pdf.title = row.fileName
-      this.pdf.pdfUrl =""
+      this.pdf.pdfUrl = row.fileUrl
       this.pptView=true
       this.pptView=true
       this.ppt=false
       this.ppt=false
       const formatDate =new FormData();
       const formatDate =new FormData();
@@ -1049,9 +1048,20 @@ export default {
 
 
           this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
           this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
 
 
-        }
-
 
 
+        }
+        // this.$nextTick(() => {
+        //   const iframe = window.frames['iFrame']
+        //   const handleLoad = () => {
+        //     setTimeout(() => {
+        //       const Do = (iframe.contentWindow || iframe.contentDocument)
+        //       console.log(Do.document.getElementsByTagName('table')[0])
+        //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+        //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+        //     }, 500)
+        //   }
+        //   iframe.addEventListener('load', handleLoad, true)
+        // })
       }).catch(result => {
       }).catch(result => {
 
 
 
 
@@ -1067,5 +1077,41 @@ export default {
 
 
   }
   }
 }
 }
-</script>
+</script >
+
+<style lang="scss">
+.table {
+    width: 100%;
+    max-width: 100%;
+    > thead,
+    > tbody,
+    > tfoot {
+      > tr {
+        > th,
+        > td {
+          vertical-align: top;
+          border-top: 1px solid;
+        }
+      }
+    }
+    > thead > tr > th {
+      vertical-align: bottom;
+      border-bottom: 2px solid;
+    }
+    > caption + thead,
+    > colgroup + thead,
+    > thead:first-child {
+      > tr:first-child {
+        > th,
+        > td {
+          border-top: 0;
+        }
+      }
+    }
+    > tbody + tbody {
+      border-top: 2px solid;
+    }
+  }
+
+</style>
 
 

+ 2 - 2
ui/src/views/login.vue

@@ -158,8 +158,8 @@ export default {
   justify-content: center;
   justify-content: center;
   align-items: center;
   align-items: center;
   height: 100%;
   height: 100%;
-  background-image: url("../assets/image/CPMS20210107.jpg");
-  //background-image: url("../assets/image/CPMS20211128.jpg");
+  //background-image: url("../assets/image/CPMS20210107.jpg");
+  background-image: url("../assets/image/CPMS20211128.jpg");
   background-size: cover;
   background-size: cover;
 }
 }
 .title {
 .title {

+ 23 - 12
ui/src/views/yulan/index.vue

@@ -30,20 +30,31 @@ export default {
 
 
   methods: {
   methods: {
     ppt(){
     ppt(){
-
       this.pptView=true;
       this.pptView=true;
 
 
-      console.log(this.$route.query.imgs)
-      //判断ppt是否可能出现只有一页而页面加载报错的情况 一页就返回string 多页就是返回集合
-      if(typeof this.$route.query.imgs =='string'){
-
-        this.imgs.push( this.$route.query.imgs);
-
-      }else {
-        this.imgs=this.$route.query.imgs
-
-      }
-      console.log(this.imgs)
+      console.log(this.$route.query.id)
+
+      const formatDate =new FormData();
+      formatDate.append("filepath",this.$route.query.id)
+
+      //调用文件预览api
+      let res= this.officeConvert.pptConvertCommon(formatDate)
+      res.then((result)=>{
+        //关闭加载中
+        this.loadingFlash=false
+
+        //成功时直接给地址
+        this.videoList = result.data.imagePathList
+        //将返回的地址集合遍历添加到绑定的数组中
+        this.imgs=[]
+        for (var key=0;key<this.videoList.length;key++) {
+          this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+        }
+      }).catch(result => {
+        //请求失败,关闭loading,pdf地址直接为为空,不显示
+        // this.pdf.pdfUrl =""
+        // this.loadingFlash = false;
+      })
 
 
 
 
     }
     }