打印模板

feature-JimuReport-1106-yjl
sunzehua 1 month ago
parent cfe9b11781
commit 19248b8342

@ -216,10 +216,10 @@ const toPrint = (item, type) => {
if (res.succeeded) {
let fileURL = `http://118.190.144.189:3008/printtempfile/${res.data}`
if (type == 1) {
window.open(fileURL)
// window.open(fileURL)
printModalRef.value.init(fileURL,res.data)
} else {
printModalRef.value.init('http://118.190.144.189:3008/printtempfile/638645246440232175-D2b.pdf','638645246440232175-D2b.pdf')
// window.open(`//118.190.144.189:3008/printtempfile/${res.data}`, '_blank')
window.open(`//118.190.144.189:3008/printtempfile/${res.data}`, '_blank')
}
} else {
createMessage.error(res.message)
@ -239,7 +239,8 @@ const toPrint = (item, type) => {
if (res.succeeded) {
let fileURL = `http://118.190.144.189:3008/printtempfile/${res.data}`
if (type == 1) {
window.open(fileURL)
printModalRef.value.init(fileURL,res.data)
// window.open(fileURL)
} else {
window.open(`//118.190.144.189:3008/printtempfile/${res.data}`, '_blank')
}

@ -83,7 +83,7 @@ function copy() {
}
function downLoad() {
const url = fileURL.value
const filename = '638645017458595773-1bk.pdf'
const filename = fileName.value
const x = new XMLHttpRequest()
x.open('GET', url, true)
x.responseType = 'blob'

Loading…
Cancel
Save