瀏覽代碼

张丁 预约票预览1.0

zhangding 3 年之前
父節點
當前提交
162a54d6d0

+ 53 - 8
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceBookingworkticketController.java

@@ -9,7 +9,10 @@ import java.util.List;
 import java.util.Map;
 
 import com.deepoove.poi.XWPFTemplate;
+import com.deepoove.poi.data.PictureRenderData;
+import com.deepoove.poi.data.Pictures;
 import com.deepoove.poi.data.Texts;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
@@ -20,6 +23,8 @@ import com.ruoyi.project.invoice.domain.TInvoiceContractor;
 import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;
 import com.ruoyi.project.invoice.service.ITInvoiceContractorService;
 import com.ruoyi.project.invoice.service.ITInvoiceWorkcontentService;
+import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.service.ISysDictTypeService;
 import io.jsonwebtoken.lang.Assert;
 import org.apache.poi.ss.formula.functions.T;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -54,7 +59,8 @@ public class TInvoiceBookingworkticketController extends BaseController
     @Autowired
     private ITInvoiceBookingworkticketService tInvoiceBookingworkticketService;
 
-
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
     /**
      * 查询预约作业票台账列表
      */
@@ -118,7 +124,16 @@ public class TInvoiceBookingworkticketController extends BaseController
         tInvoiceBookingworkticket.setCreaterCode(getUserId());
      //   tInvoiceBookingworkticket.setContact(t.getContact());
      //   tInvoiceBookingworkticket.setPhonenumber(t.getPhonenumber());
+        // 测试一下,先得到这个文件名 地址   在赋值插入 然后赋值 改文件名
         tInvoiceBookingworkticketService.insertTInvoiceBookingworkticket(tInvoiceBookingworkticket);
+        try {
+            String url=  PreView(tInvoiceBookingworkticket.getId());
+            tInvoiceBookingworkticket.setFilename(url);
+            tInvoiceBookingworkticketService.updateTInvoiceBookingworkticket(tInvoiceBookingworkticket);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
         Long didi=tInvoiceBookingworkticket.getId();
         List<TInvoiceWorkcontent>  w=tInvoiceBookingworkticket.gettInvoiceWorkcontentList();
 
@@ -127,6 +142,7 @@ public class TInvoiceBookingworkticketController extends BaseController
             wt.setBookingticketId(didi);
             tInvoiceBookingworkticketService.insertTInvoiceWorkcontent(wt);
         }
+
         return AjaxResult.success(didi);
     }
 
@@ -177,12 +193,17 @@ public class TInvoiceBookingworkticketController extends BaseController
         return toAjax(tInvoiceBookingworkticketService.deleteTInvoiceBookingworkticketByIds(ids));
     }
 
-    @GetMapping("/word")
-    public AjaxResult Preview () throws IOException {
-        TInvoiceBookingworkticket invoiceBookingworkticket = new TInvoiceBookingworkticket();
-        invoiceBookingworkticket.setContact("测试");
-        String url = this.createBookingworkticketWord(invoiceBookingworkticket);
-        return AjaxResult.success(url);
+
+    /**
+     *
+     * @param id   生成文件名
+     * @return
+     * @throws IOException
+     */
+    public String PreView(Long id) throws IOException {
+        TInvoiceBookingworkticket tInvoiceBookingworkticket= tInvoiceBookingworkticketService.selectTInvoiceBookingworkticketById(id);
+        String url = this.createBookingworkticketWord(tInvoiceBookingworkticket);
+        return url;
     }
 
     /**
@@ -209,9 +230,33 @@ public class TInvoiceBookingworkticketController extends BaseController
      */
     public Map<String, Object> getWordData (TInvoiceBookingworkticket ticket){
         Map<String, Object> params = new HashMap<>();
+        List<TInvoiceWorkcontent> tInvoiceWorkcontentList= tInvoiceBookingworkticketService.selectTInvoiceWorkcontentBybookingticketId(ticket.getId());
+        //字典查询
+        List<SysDictData> book_work_type = iSysDictTypeService.selectDictDataByType("book_work_type");
+        List<SysDictData> book_work_unit = iSysDictTypeService.selectDictDataByType("book_work_unit");
+        List<SysDictData> book_user_unit = iSysDictTypeService.selectDictDataByType("book_user_unit");
+        List<SysDictData> book_risk_level = iSysDictTypeService.selectDictDataByType("book_risk_level");
+        List<SysDictData> book_work_area = iSysDictTypeService.selectDictDataByType("book_work_area");
+        List<SysDictData> book_user_mg = iSysDictTypeService.selectDictDataByType("book_user_mg");
+       for(int i =0;i<tInvoiceWorkcontentList.size();i++){
+           TInvoiceWorkcontent tInvoiceWorkcontent=tInvoiceWorkcontentList.get(i);
+           params.put("content"+i, Texts.of(tInvoiceWorkcontent.getWorkDescription()+ticket.getWorkArea()).fontSize(12).bold().create());
+       }
         // 渲染文本
-        params.put("contact", Texts.of(ticket.getContact().toString()).fontSize(12).bold().create());
 
+
+        params.put("workStartTime",Texts.of(DateUtils.dateTime(ticket.getWorkStartTime())).fontSize(12).bold().create());
+        params.put("workEndTime",Texts.of(DateUtils.dateTime(ticket.getWorkEndTime())).fontSize(12).bold().create());
+        params.put("urlImg", "C:\\Users\\shi'sen'yuan\\Downloads\\SamplePNGImage_3mbmb.png");
+        if(ticket.getWorkUnit()!=null){
+            params.put("workUnit", Texts.of(ticket.getWorkUnit().toString()).fontSize(12).bold().create());
+        }
+        if(ticket.getUserUnit()!=null){
+            params.put("userUnit", Texts.of(ticket.getUserUnit().toString()).fontSize(12).bold().create());
+        }
+        if(ticket.getUserMg()!=null){
+            params.put("userMg", Texts.of(ticket.getUserMg().toString()).fontSize(12).bold().create());
+        }
         return params;
     };
 

+ 31 - 0
master/src/main/java/com/ruoyi/project/invoice/domain/TInvoiceBookingworkticket.java

@@ -97,6 +97,15 @@ public class TInvoiceBookingworkticket extends BaseEntity
     @TableField(exist = false)
     private List<TInvoiceWorkcontent> tInvoiceWorkcontentList;
 
+    /** 预约票号 */
+    @Excel(name = "预约票号")
+    private Long reservationNumber;
+
+    /** 预约作业申请单文件名 */
+    @Excel(name = "预约作业申请单文件名")
+    private String filename;
+
+
     public void setId(Long id)
     {
         this.id = id;
@@ -261,6 +270,26 @@ public class TInvoiceBookingworkticket extends BaseEntity
         return userUnit;
     }
 
+    public void setReservationNumber(Long reservationNumber)
+    {
+        this.reservationNumber = reservationNumber;
+    }
+
+    public Long getReservationNumber()
+    {
+        return reservationNumber;
+    }
+    public void setFilename(String filename)
+    {
+        this.filename = filename;
+    }
+
+    public String getFilename()
+    {
+        return filename;
+    }
+
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -282,6 +311,8 @@ public class TInvoiceBookingworkticket extends BaseEntity
             .append("deptId", getDeptId())
             .append("userMg", getUserMg())
                 .append("userUnit", getUserUnit())
+                .append("reservationNumber", getReservationNumber())
+                .append("filename", getFilename())
             .toString();
     }
 

+ 36 - 0
master/src/main/java/com/ruoyi/project/officeConvert/OfficeConvertController.java

@@ -102,6 +102,42 @@ public class OfficeConvertController {
         return  newFilePath.endsWith(".csv")? new AjaxResult(HttpStatus.SUCCESS,codeMiss,pathFileName): new AjaxResult(HttpStatus.SUCCESS,successMsg,pathFileName) ;
     }
 
+    @PostMapping("/toBookFile")
+    public AjaxResult toBookFile(HttpServletRequest request, HttpServletResponse response,String filepath) {
+        // 获取HttpServletResponse
+        response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
+        String newFilePath=filepath.replace("/profile","");
+        // 需要转换的文件路径
+        File file = new File(RuoYiConfig.getProfile()+newFilePath);
+        boolean  flag= file.exists();
+        if(flag==false){
+            return new AjaxResult(HttpStatus.SUCCESS,fileMiss,Constants.RESOURCE_PREFIX+ "/" + newFilePath);
+        }
+        String converterPdf ="";  //生成的文件名
+        try {
+            // 转换之后文件生成的本地地址
+            File newFile = new File(RuoYiConfig.getProfile());
+            if (!newFile.exists()) {
+                newFile.mkdirs();
+            }
+            String name =file.getName();
+            int t=name.lastIndexOf(".");
+            String newName=name.substring(0,t);
+            //预约开票的word文档
+                converterPdf =  newName+".pdf";
+            // 文件转化
+            documentConverter.convert(file).to(new File(RuoYiConfig.getProfile() + File.separator +"temp" + File.separator +converterPdf)).execute();
+            //office文件需要给有表格的加一个边框 以免 排版出现问题
+            this.doActionConvertedFile(RuoYiConfig.getProfile() + File.separator +"temp" + File.separator +converterPdf);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //最后应该返回转换后的文件名称
+        String pathFileName = Constants.RESOURCE_PREFIX+ File.separator +"temp" + File.separator + converterPdf;
+        return   new AjaxResult(HttpStatus.SUCCESS,successMsg,pathFileName) ;
+    }
+
+
     /**
     PPT文件需要根据不同格式类型区分一下
      */

+ 11 - 2
master/src/main/resources/mybatis/invoice/TInvoiceBookingworkticketMapper.xml

@@ -23,11 +23,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="userMg"    column="user_mg"    />
         <result property="deptName" column="dept_name" />
+        <result property="reservationNumber"    column="reservation_number"    />
+        <result property="filename"    column="filename"    />
         <result property="userUnit"    column="user_unit"    />
     </resultMap>
 
     <sql id="selectTInvoiceBookingworkticketVo">
-        select d.id, d.work_unit, d.work_area, d.unit_number, d.floor_location, d.work_start_time, d.work_end_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.contact, d.phonenumber, d.status, d.dept_id, d.user_mg ,s.dept_name from t_invoice_bookingworkticket d
+        select d.id, d.work_unit, d.work_area, d.unit_number, d.floor_location, d.work_start_time, d.work_end_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.contact, d.phonenumber, d.status, d.dept_id, d.user_mg ,s.dept_name,d.filename,d.reservation_number from t_invoice_bookingworkticket d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -50,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="userMg != null "> and user_mg = #{userMg}</if>
             <if test="userUnit != null "> and user_unit = #{userUnit}</if>
+            <if test="reservationNumber != null "> and reservation_number = #{reservationNumber}</if>
+            <if test="filename != null  and filename != ''"> and filename like concat(concat('%', #{filename}), '%')</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -85,6 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="userMg != null">user_mg,</if>
             <if test="userUnit != null">user_unit,</if>
+            <if test="reservationNumber != null">reservation_number,</if>
+            <if test="filename != null">filename,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -105,6 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="userMg != null">#{userMg},</if>
             <if test="userUnit != null">#{userUnit},</if>
+            <if test="reservationNumber != null">reservation_number = #{reservationNumber},</if>
+            <if test="filename != null">#{filename},</if>
          </trim>
     </insert>
 
@@ -128,7 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="userMg != null">user_mg = #{userMg},</if>
             <if test="userUnit != null">user_unit = #{userUnit},</if>
-
+            <if test="reservationNumber != null">reservation_number = #{reservationNumber},</if>
+            <if test="filename != null">filename = #{filename},</if>
         </trim>
         where id = #{id}
     </update>

二進制
master/src/main/resources/static/word/invoice/book.docx


+ 9 - 0
ui/src/api/invoice/bookingworkticket.js

@@ -50,4 +50,13 @@ export function exportBookingworkticket(query) {
     method: 'get',
     params: query
   })
+}
+
+// 生成word并预览作业票
+export function seeBookingworkticket(query) {
+  return request({
+    url: '/invoice/bookingworkticket/word',
+    method: 'post',
+    params: query
+  })
 }

+ 10 - 0
ui/src/api/system/dept.js

@@ -85,6 +85,15 @@ export function officeConvert(data) {
   })
 }
 
+// 文件预览 参数为文件的虚拟路径
+export function bookConvert(data) {
+  return request({
+    url: '/office/toBookFile',
+    method: 'post',
+    data: data
+  })
+}
+
 // 文件预览 参数为文件的虚拟路径
 export function pptConvert(data) {
   return request({
@@ -93,3 +102,4 @@ export function pptConvert(data) {
     data: data
   })
 }
+

+ 14 - 1
ui/src/utils/officeConvert.js

@@ -1,4 +1,4 @@
-import {officeConvert,pptConvert} from "@/api/system/dept";
+import {officeConvert,pptConvert,bookConvert} from "@/api/system/dept";
 export default {
  
        //通用的文件预览查看全局方法
@@ -13,6 +13,19 @@ export default {
           })
 
    },
+    
+   //预约作业票的转换
+     bookConvertCommon : function (data) {
+
+      return    bookConvert (data).then(response => {
+  
+     //     console.log(response) 接口返回的数据
+              return response
+  
+  
+            })
+  
+     },
 
      pptConvertCommon: function (data) {
 

+ 135 - 21
ui/src/views/invoice/bookingworkticket/index.vue

@@ -113,7 +113,7 @@
     </el-row>
 
     <el-table v-loading="loading" :data="bookingworkticketList" :span-method="mergeMethod"  @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
+
       <el-table-column label="作业单位" align="center" prop="bookingworkticket.workUnit" :formatter="workUnitFormat"/>
       <el-table-column label="作业区域单元" align="center" prop="bookingworkticket.workArea" :formatter="workAreaFormat"/>
       <el-table-column label="楼层位置" align="center" prop="bookingworkticket.floorLocation" :formatter="floorLocationFormat"/>
@@ -152,13 +152,6 @@
             icon="el-icon-edit"
             @click="handleDelete(scope.row)"
           >删除</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-s-claim"
-            @click="signature(scope.row)"
-            v-hasPermi="['invoice:bookingworkticket:signature']"
-          >签字</el-button>
            <el-button
             size="mini"
             type="text"
@@ -166,12 +159,12 @@
             @click="association(scope.row)"
              v-hasRole="['dbbz','admin']"
           >关联票号</el-button>
-           <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-share"
-            @click="billSee(scope.row)"
-          >票据预览</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="billSee(scope.row)"
+            > {{ $t('票据预览') }}</el-button>
           <el-button
             type="text"
             size="mini"
@@ -331,14 +324,27 @@
         </el-form>
 
         <el-button @click="resetForm1()">重置</el-button>
-        <el-button @click="add">+</el-button>
-        <el-button @click="reduce" :disabled="flag">-</el-button>
+        <el-button @click="add">新增一条</el-button>
+        <el-button @click="reduce" :disabled="flag">移除一条</el-button>
 
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
+
+ </el-dialog>
+ <!-- 报告附件对话框 -->
+
+    <el-dialog   v-loading="loadingFlash" element-loading-background="rgba(0,0,0,0.2)"     v-dialogDrag :title="pdf.title"  :visible.sync="pdf.open"  width="1300px" height="800px" :center="true" append-to-body >
+      <div style="margin-top: -60px;float: right;margin-right: 40px;">
+        <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+      <div style="margin-top: -30px" >
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+      </div>
+
     </el-dialog>
+
+
       <!-- 用户导入对话框 -->
       <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
           <el-upload
@@ -374,7 +380,7 @@
 </template>
 
 <script>
-import { listBookingworkticket, getBookingworkticket, delBookingworkticket, addBookingworkticket, updateBookingworkticket, exportBookingworkticket, importTemplate} from "@/api/invoice/bookingworkticket";
+import { listBookingworkticket, getBookingworkticket, delBookingworkticket, addBookingworkticket, updateBookingworkticket, exportBookingworkticket, importTemplate, seeBookingworkticket} from "@/api/invoice/bookingworkticket";
 import { listWorkcontent, getWorkcontent, delWorkcontent, addWorkcontent, updateWorkcontent, exportWorkcontent,getWorkcontentBybookingticketId} from "@/api/invoice/workcontent";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
@@ -387,6 +393,8 @@ export default {
   components: { Treeselect,AddApprove},
   data() {
     return {
+      ppt:false,
+      pptView:false,
       tInvoiceWorkcontentList:[],
         //作业内容表头
       tabletou:['作业类型','风险等级','作业内容描述','作业人员数','作业预计时间','监护人单位'],
@@ -398,6 +406,7 @@ export default {
       btid:"",
       // 遮罩层
       loading: true,
+      loadingFlash: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -453,6 +462,15 @@ export default {
             // 上传的地址
             url: process.env.VUE_APP_BASE_API + "/invoice/bookingworkticket/importData"
         },
+         pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -560,16 +578,18 @@ export default {
     },
     // 表单减少一行
     reduce() {
+        this.flags()
       this.ruleForm.length = this.ruleForm.length - 1
-      this.flags()
+
     },
     // 判断数组长度
     flags() {
-      if (this.ruleForm.length < 2) {
+      console.log(this.ruleForm.length)
+      if (this.ruleForm.length <2) {
         this.flag = true
       } else {
       	//先赋值为true再赋为false, 不然会没反应
-        this.flag = true
+      this.flag=true
         this.flag = false
       }
     },
@@ -708,6 +728,7 @@ export default {
         this.open = true;
         this.title = "修改预约作业票台账";
         this.ruleForm=response.data.tInvoiceWorkcontentList
+        this.ruleForm.length=response.data.tInvoiceWorkcontentList.length
       });
     },
     /** 提交按钮 */
@@ -837,6 +858,7 @@ export default {
 
 
       },
+      //单元格整理
         setTable(tableData) {
         let spanArr = [],
           concat = 0;
@@ -844,7 +866,6 @@ export default {
           if (index === 0) {
             spanArr.push(1);
           } else {
-            console.log(item)
             if (item.bookingticketId === tableData[index - 1].bookingticketId) {
               //第一列需合并相同内容的判断条件
               spanArr[concat] += 1;
@@ -859,6 +880,99 @@ export default {
           merge: spanArr
         };
       },
+      //票据预览的
+    billSee(row){
+      //office预览
+      console.log(row.bookingworkticket.filename)
+      this.loadingFlash=true
+      this.pdf.open =true
+      this.pdf.title = row.bookingworkticket.filename
+      this.pdf.pdfUrl =""
+
+      this.ppt=true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.bookingworkticket.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.bookingworkticket.filename)
+
+      //调用文件预览api
+      let res= this.officeConvert.officeConvertCommon(formatDate)
+
+
+      //查看接受的全局方法的返回结果 console.log(res)
+      //利用.then方法接受Promise对象
+      res.then((result)=>{
+        //关闭加载中
+        this.loadingFlash=false
+
+        if(result.msg.includes("csv")){
+          this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+          this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+          //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+
+        }else if(result.msg.includes("不存在")){
+          //文件不存在时提示
+          this.pdf.pdfUrl =""
+          this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+          //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+          this.pdf.open =false
+        }else if(result.msg.includes("不支持此格式")){
+
+          this.pdf.pdfUrl =""
+          this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+          //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+          this.pdf.open =false
+        } else{
+          //成功时直接给地址
+          this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+          console.log( this.pdf.pdfUrl)
+        }
+        // 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 => {
+
+        //请求失败,关闭loading,pdf地址直接为为空,不显示
+        this.pdf.pdfUrl =""
+        this.loadingFlash = false;
+
+      })
+      }
+
+
+
+
+
+    },
+      //文件预览
+    openPdf(){
+      //ppt就跳路由预览,office就直接打开文件新页面
+      const didi={ imgs:this.imgs}
+      if( this.pptView==true&&this.ppt==false){
+        let routeUrl = this.$router.resolve({
+          path: "/cpms/index.html#/pptyulan",
+          query:didi
+        });
+        window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+        console.log(this.imgs)
+      }else {
+        window.open(this.pdf.pdfUrl)
+      }
+    },
+
   }
 };
 </script>