Jelajahi Sumber

打印修改

lilei 1 tahun lalu
induk
melakukan
fbd82daafe
1 mengubah file dengan 5 tambahan dan 2 penghapusan
  1. 5 2
      src/libs/JGPrint.js

+ 5 - 2
src/libs/JGPrint.js

@@ -425,7 +425,7 @@ export const printBase64Fun = function (url, params, type, taskName, callback, p
       if (type == 'orginPrint' || type == 'orginPreview') {
         winPrintPdf(res, type, callback)
       } else {
-        jGPrintBase64Pdf(res.data[0], type, taskName, printLogParams, callback, hidePrint)
+        jGPrintBase64Pdf(res.data, type, taskName, printLogParams, callback, hidePrint)
       }
     }
   })
@@ -478,7 +478,10 @@ export const jGPrintBase64Pdf = function (dataurl, type, taskName, printLogParam
       callback()
     }
   }
-  LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl)
+  for(let i=0;i<dataurl.length;i++){
+     LODOP.NewPageA()
+     LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl[i])
+  }
   LODOP.SET_PRINT_PAGESIZE(3, 2090, 30, '')
   if (type == 'preview') { //  预览
     LODOP.PREVIEW()