|
@@ -136,7 +136,7 @@ export const jGPrint = function (data, type, callback, printLogParams,printPageS
|
|
|
}
|
|
|
}
|
|
|
// 浏览器打印pdf功能
|
|
|
-export const winPrintPdf = function(data,taskName,callback){
|
|
|
+export const winPrintPdf = function(data,type,callback){
|
|
|
if (!data) {
|
|
|
return
|
|
|
}
|
|
@@ -145,8 +145,12 @@ export const winPrintPdf = function(data,taskName,callback){
|
|
|
window.frames['printfbod'].onload = function(){
|
|
|
callback()
|
|
|
}
|
|
|
- window.frames['printfbod'].focus()
|
|
|
- window.frames['printfbod'].print()
|
|
|
+ if(type == 'orginPrint'){
|
|
|
+ window.frames['printfbod'].focus()
|
|
|
+ window.frames['printfbod'].print()
|
|
|
+ }else{
|
|
|
+ window.open(url)
|
|
|
+ }
|
|
|
}
|
|
|
// 打印
|
|
|
export const printFun = function(url,params,type,taskName,callback,printLogParams,hidePrint){
|
|
@@ -164,8 +168,8 @@ export const printFun = function(url,params,type,taskName,callback,printLogParam
|
|
|
} else {
|
|
|
console.log(res,'printFun')
|
|
|
// 使用浏览器自带打印功能
|
|
|
- if(type == 'orginPrint'){
|
|
|
- winPrintPdf(res,taskName,callback)
|
|
|
+ if(type == 'orginPrint'||type=='orginPreview'){
|
|
|
+ winPrintPdf(res,type,callback)
|
|
|
}else{
|
|
|
jGPrintPdf(res,type,taskName,printLogParams,callback,hidePrint)
|
|
|
}
|