lilei 3 роки тому
батько
коміт
6e4a9d741e
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      src/libs/JGPrint.js

+ 6 - 6
src/libs/JGPrint.js

@@ -42,12 +42,12 @@ export const JGPrint = function(data, type, printerType){
     const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
     document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
     if (type == 'preview') { //  预览
-      window.open(url)
-      // const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-      // LODOP.ADD_PRINT_PDF(0,0,"100%","100%",url);
-      // LODOP.SET_PRINT_STYLEA(0,"PDFScalMode",1);
-      // LODOP.SET_PRINT_PAGESIZE(3,0,0,"");
-      // LODOP.PREVIEW()
+      // window.open(url)
+      const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+      LODOP.ADD_PRINT_PDF(0,0,"100%","100%",'https://jianguan-images.oss-cn-beijing.aliyuncs.com/helpvideo/1.pdf');
+      LODOP.SET_PRINT_STYLEA(0,"PDFScalMode",1);
+      LODOP.SET_PRINT_PAGESIZE(3,0,0,"");
+      LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
       window.frames['printfsqd'].focus()
       window.frames['printfsqd'].print()