Commit 292b526f authored by wangqinghua's avatar wangqinghua

update

parent 455afa69
......@@ -429,7 +429,7 @@ export class TemplateComponent implements OnInit {
this.workSer.downloadTemplate('templateExport',res.data).subscribe(
(data)=>{
this.isDownload = false;
this.commonSer.downloadXMLFile('XML模版',data)
this.commonSer.downloadFile('XML模版.xml',data)
}
)
}else{
......
......@@ -96,17 +96,6 @@ export class CommonService implements OnInit {
document.body.removeChild(link);
}
downloadXMLFile(title,data: Response) {
const blob = new Blob([data], {type:"application/octet-stream"});
const url= window.URL.createObjectURL(blob);
let link = document.createElement("a");
link.setAttribute("href", url);
link.setAttribute("download", title);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
/**
* 部分区域全屏
* @param element 全屏区域
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment