|
|
|
@ -2440,13 +2440,20 @@ export default { |
|
|
|
|
|
|
|
//导出excel |
|
|
|
async createExportData() { |
|
|
|
const originalLimit = this.searchData.limit |
|
|
|
const originalPage = this.searchData.page |
|
|
|
try { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
await searchProjectToolApplyHeader(this.searchData).then(({data}) => { |
|
|
|
this.exportList = data.page.list; |
|
|
|
}) |
|
|
|
|
|
|
|
return this.exportList; |
|
|
|
const {data} = await searchProjectToolApplyHeader(this.searchData) |
|
|
|
const rows = (data && data.page && data.page.list) ? data.page.list : [] |
|
|
|
await this.loadToolDetailInfo(rows) |
|
|
|
this.exportList = rows |
|
|
|
} finally { |
|
|
|
this.searchData.limit = originalLimit |
|
|
|
this.searchData.page = originalPage |
|
|
|
} |
|
|
|
return this.exportList |
|
|
|
}, |
|
|
|
startDownload() { |
|
|
|
this.exportLoading = true |
|
|
|
@ -2524,9 +2531,12 @@ export default { |
|
|
|
this.isFilterSearch = false |
|
|
|
}, |
|
|
|
// 加载每条申请记录的首条工具明细信息 |
|
|
|
loadToolDetailInfo() { |
|
|
|
this.dataList1.forEach(item => { |
|
|
|
searchProjectToolApplyDetail({ |
|
|
|
loadToolDetailInfo(targetList = this.dataList1) { |
|
|
|
if (!Array.isArray(targetList) || targetList.length === 0) { |
|
|
|
return Promise.resolve([]) |
|
|
|
} |
|
|
|
return Promise.all(targetList.map(item => { |
|
|
|
return searchProjectToolApplyDetail({ |
|
|
|
site: item.site, |
|
|
|
applyNo: item.applyNo |
|
|
|
}).then(({data}) => { |
|
|
|
@ -2545,7 +2555,7 @@ export default { |
|
|
|
this.$set(item, 'firstToolId', '') |
|
|
|
this.$set(item, 'firstToolDesc', '') |
|
|
|
}) |
|
|
|
}) |
|
|
|
})) |
|
|
|
}, |
|
|
|
//单击切换订单 |
|
|
|
changeData(row) { |
|
|
|
|