提交 6eca96cd authored 作者: CRS's avatar CRS

new

上级 d512d605
...@@ -904,24 +904,29 @@ export default { ...@@ -904,24 +904,29 @@ export default {
'ewai': this.isAgree === true ? String(this.newCost.apply.calculation) : '0', 'ewai': this.isAgree === true ? String(this.newCost.apply.calculation) : '0',
'yusuan': String(this.sumAmount1) 'yusuan': String(this.sumAmount1)
} }
console.log(val);
this.$server.getEvaDownload(val).then(res=>{ this.$server.getEvaDownload(val).then(res=>{
console.log(res) console.log(res)
if (res.status === 200) { if (res.status === 200) {
let name = this.type === 2 ? '适配' : '改造' + '报告'; if (res.data !== '') {
name = this.sysName + '系统' + name let name = this.type === 2 ? '适配' : '改造' + '报告';
let x = new XMLHttpRequest(); name = this.sysName + '系统' + name
x.open('GET', res.data, true); let x = new XMLHttpRequest();
x.responseType = 'blob'; x.open('GET', res.data, true);
x.onload = (e) =>{ x.responseType = 'blob';
console.log(e) x.onload = (e) =>{
let url = window.URL.createObjectURL(x.response) console.log(e)
let a = document.createElement('a'); let url = window.URL.createObjectURL(x.response)
a.href = url let a = document.createElement('a');
a.download = name a.href = url
a.click() a.download = name
a.click()
}
x.send();
} else {
this.$message.error('未能生成wps文件,请联系管理员!')
} }
x.send(); } else {
this.$message.error('未能生成wps文件,请联系管理员!')
} }
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论