|
@@ -310,6 +310,8 @@
|
|
|
},
|
|
|
handleDownload(record){
|
|
|
this.spinning = true
|
|
|
+ var titleFlie = moment(record.yearWithMonth).format('YYYY年MM月')
|
|
|
+ titleFlie =titleFlie+record.orgName+record.type
|
|
|
downFile('/salary/salaryManagement/exportXls',{id:record.id,type:record.type}).then(data => {
|
|
|
this.spinning = false
|
|
|
if (!data) {
|
|
@@ -317,13 +319,13 @@
|
|
|
return
|
|
|
}
|
|
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
- window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), record.type + '.xlsx')
|
|
|
+ window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), titleFlie + '.xlsx')
|
|
|
} else {
|
|
|
let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
let link = document.createElement('a')
|
|
|
link.style.display = 'none'
|
|
|
link.href = url
|
|
|
- link.setAttribute('download', record.type+'.xlsx')
|
|
|
+ link.setAttribute('download', titleFlie+'.xlsx')
|
|
|
document.body.appendChild(link)
|
|
|
link.click()
|
|
|
document.body.removeChild(link) // 下载完成移除元素
|