mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 03:19:36 +08:00
修改了企业的 导出功能
This commit is contained in:
parent
1797392206
commit
c317aa1af1
@ -141,7 +141,7 @@ export function importData (data) {
|
|||||||
export function exportTemplate () {
|
export function exportTemplate () {
|
||||||
return axios({
|
return axios({
|
||||||
url: api.icsCustomerStaff + '/exportTemplate',
|
url: api.icsCustomerStaff + '/exportTemplate',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: { }
|
data: { }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,8 @@ export default {
|
|||||||
roomList: [], //房间
|
roomList: [], //房间
|
||||||
tenantEnable: false,
|
tenantEnable: false,
|
||||||
parkEnable: false,
|
parkEnable: false,
|
||||||
mdl: {}
|
mdl: {},
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@ -618,6 +619,7 @@ export default {
|
|||||||
this.getUserDetail();
|
this.getUserDetail();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// 获取用户详细信息
|
// 获取用户详细信息
|
||||||
getUserDetail() {
|
getUserDetail() {
|
||||||
getInfo().then(res => {
|
getInfo().then(res => {
|
||||||
@ -775,26 +777,24 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
exportTemplate() {
|
exportTemplate() {
|
||||||
exportTemplate().then(res => {
|
const baseURL = process.env.VUE_APP_API_BASE_URL
|
||||||
console.log(res)
|
window.open(`${baseURL}/admin/staff/exportTemplate`)
|
||||||
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)
|
|
||||||
},
|
},
|
||||||
|
// 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) {
|
customRequest(file) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user