|
|
|
@ -60,6 +60,24 @@ export class MeetPlanComponent implements OnInit {
|
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
} |
|
|
|
|
//生产word
|
|
|
|
|
word(id,fileName){ |
|
|
|
|
/* id :文档dom节点 fileName:文件名称(.doc) */ |
|
|
|
|
var header = "<html xmlns:o='urn:schemas-microsoft-com:office:office' " + |
|
|
|
|
"xmlns:w='urn:schemas-microsoft-com:office:word' " + |
|
|
|
|
"xmlns='http://www.w3.org/TR/REC-html40'>" + |
|
|
|
|
"<head><meta charset='utf-8'><title>Export HTML to Word Document with JavaScript</title></head><body>" |
|
|
|
|
var footer = '</body></html>' |
|
|
|
|
var sourceHTML = header + document.getElementById(id).innerHTML + footer |
|
|
|
|
|
|
|
|
|
var source = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(sourceHTML) |
|
|
|
|
var fileDownload = document.createElement('a') |
|
|
|
|
document.body.appendChild(fileDownload) |
|
|
|
|
fileDownload.href = source |
|
|
|
|
fileDownload.download = fileName // 下载名称
|
|
|
|
|
fileDownload.click() |
|
|
|
|
document.body.removeChild(fileDownload) |
|
|
|
|
} |
|
|
|
|
levels
|
|
|
|
|
|
|
|
|
|