|
@ -39,12 +39,12 @@ const ImportPerformanceSummaryModal = props => { |
|
|
head = head.join(',') + "\n"; |
|
|
head = head.join(',') + "\n"; |
|
|
//数据 |
|
|
//数据 |
|
|
//let data = 1 + ',' + 2 + ',' + 3 + ',' + 4 + ',' + 5 |
|
|
//let data = 1 + ',' + 2 + ',' + 3 + ',' + 4 + ',' + 5 |
|
|
let templateCsv = "data:text/csv;charset=utf-8,\ufeff" + head; |
|
|
let templateCsv = "data:text/xlsx;charset=utf-8,\ufeff" + head; |
|
|
//创建一个a标签 |
|
|
//创建一个a标签 |
|
|
let link = document.createElement("a"); |
|
|
let link = document.createElement("a"); |
|
|
//为a标签设置属性 |
|
|
//为a标签设置属性 |
|
|
link.setAttribute("href", templateCsv); |
|
|
link.setAttribute("href", templateCsv); |
|
|
link.setAttribute("download", "个人培训记录表模板.csv"); |
|
|
link.setAttribute("download", "个人培训记录表模板.xlsx"); |
|
|
//点击a标签 |
|
|
//点击a标签 |
|
|
link.click(); |
|
|
link.click(); |
|
|
} |
|
|
} |
|
|