文件路径:src/views/accounts/statement/index.vue
import createWorkBook from '@/utils/newToExcel.js';
async exports(time) {
let excelData = JSON.parse(JSON.stringify(this.tableForm)), data = []
excelData.page = 1
let pageCount = 1
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData = await this.downData(excelData,time)
pageCount = Math.ceil(lebData.count/excelData.limit)
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
}
}
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
return
},
/**订单列表 */
downData(excelData,time) {
excelData.date = time
return new Promise((resolve, reject) => {
downloadFinancialApi(this.tableForm.type,excelData).then((res) => {
return resolve(res.data)
})
})
},
文件路径:src/api/accounts.js按照下面截图的修改
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}