mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-20 23:49:36 +08:00
修改了企业的 导出功能
This commit is contained in:
parent
1797392206
commit
c317aa1af1
@ -141,7 +141,7 @@ export function importData (data) {
|
||||
export function exportTemplate () {
|
||||
return axios({
|
||||
url: api.icsCustomerStaff + '/exportTemplate',
|
||||
method: 'post',
|
||||
method: 'get',
|
||||
data: { }
|
||||
})
|
||||
}
|
||||
|
@ -587,7 +587,8 @@ export default {
|
||||
roomList: [], //房间
|
||||
tenantEnable: false,
|
||||
parkEnable: false,
|
||||
mdl: {}
|
||||
mdl: {},
|
||||
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@ -618,6 +619,7 @@ export default {
|
||||
this.getUserDetail();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取用户详细信息
|
||||
getUserDetail() {
|
||||
getInfo().then(res => {
|
||||
@ -775,26 +777,24 @@ export default {
|
||||
})
|
||||
},
|
||||
exportTemplate() {
|
||||
exportTemplate().then(res => {
|
||||
console.log(res)
|
||||
this.downloadFile(res)
|
||||
})
|
||||
},
|
||||
downloadFile(data) {
|
||||
let fileName = '客户导入模板'
|
||||
|
||||
let link = document.createElement('a')
|
||||
let blob = new Blob([data], { type: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
console.log(blob)
|
||||
link.style.display = 'none'
|
||||
link.download = fileName + '.xlsx'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
// link.setAttribute('download', fileName+'.xlsx');
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href) // 释放URL 对象
|
||||
document.body.removeChild(link)
|
||||
const baseURL = process.env.VUE_APP_API_BASE_URL
|
||||
window.open(`${baseURL}/admin/staff/exportTemplate`)
|
||||
},
|
||||
// downloadFile(data) {
|
||||
// let fileName = '客户导入模板'
|
||||
//
|
||||
// let link = document.createElement('a')
|
||||
// let blob = new Blob([data], { type: 'application/vnd.ms-excel;charset=utf-8' })
|
||||
// console.log(blob)
|
||||
// link.style.display = 'none'
|
||||
// link.download = fileName + '.xlsx'
|
||||
// link.href = URL.createObjectURL(blob)
|
||||
// // link.setAttribute('download', fileName+'.xlsx');
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// URL.revokeObjectURL(link.href) // 释放URL 对象
|
||||
// document.body.removeChild(link)
|
||||
// },
|
||||
|
||||
|
||||
customRequest(file) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user