|
|
|
@ -63,12 +63,12 @@
|
|
|
|
|
this.showSessionId = window.location.search |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => { |
|
|
|
|
console.log(data) |
|
|
|
|
const blob = new Blob([data], { type: 'application/pdf' }) |
|
|
|
|
this.pdfWord = window.URL.createObjectURL(blob) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
// downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => { |
|
|
|
|
// console.log(data) |
|
|
|
|
// const blob = new Blob([data], { type: 'application/pdf' }) |
|
|
|
|
// this.pdfWord = window.URL.createObjectURL(blob) |
|
|
|
|
// |
|
|
|
|
// }) |
|
|
|
|
// this.loadData(); |
|
|
|
|
}, |
|
|
|
|
activated() { |
|
|
|
@ -86,6 +86,10 @@
|
|
|
|
|
// 下载 |
|
|
|
|
downWord() { |
|
|
|
|
downFile(this.url.queryPlandDownWord, { id: this.queryParam.id }).then((data) => { |
|
|
|
|
if (!data) { |
|
|
|
|
this.$message.warning("文件下载失败") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
const blob = new Blob([data]) // 把得到的结果用流对象转一下 |
|
|
|
|
var a = document.createElement('a') //创建一个<a></a>标签 |
|
|
|
|
a.href = URL.createObjectURL(blob) // 将流文件写入a标签的href属性值 |
|
|
|
@ -99,7 +103,10 @@
|
|
|
|
|
}, |
|
|
|
|
previewWord() { |
|
|
|
|
downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => { |
|
|
|
|
console.log(data) |
|
|
|
|
if (!data) { |
|
|
|
|
this.$message.warning("文件预览失败") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
const blob = new Blob([data], { type: 'application/pdf' }) |
|
|
|
|
this.pdfSrc = window.URL.createObjectURL(blob) |
|
|
|
|
console.log(this.pdfSrc) |
|
|
|
|