Bug修改
This commit is contained in:
@@ -126,12 +126,13 @@
|
||||
<a-table
|
||||
size="middle"
|
||||
ref="footTable"
|
||||
rowKey="projectId"
|
||||
rowKey="id"
|
||||
:columns="columnsFooter"
|
||||
:scroll="{x: 1300}"
|
||||
:dataSource="footerDataSource"
|
||||
:showHeader="false"
|
||||
:pagination="false"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap footer-table">
|
||||
|
||||
<!-- 项目名称-->
|
||||
@@ -163,6 +164,7 @@ import SelectPrincipal from '../../components/company/SelectPrincipal'
|
||||
import JYearDate from '../../components/jero/JYearDate'
|
||||
import { getAction } from '../../api/manage'
|
||||
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||||
import { downloadFile } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'WholeInstituteStatisticsList',
|
||||
@@ -286,7 +288,8 @@ export default {
|
||||
list: '/statistics/allProjectStatistics/list',
|
||||
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
||||
},
|
||||
validateMoney: true
|
||||
validateMoney: true,
|
||||
exportSelectedKeys: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -435,7 +438,26 @@ export default {
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.exportSelectedKeys = []
|
||||
selectionRows.forEach(item => {
|
||||
this.exportSelectedKeys.push(item.projectId)
|
||||
})
|
||||
this.selectionRows = selectionRows
|
||||
},
|
||||
handleExportXls(fileName) {
|
||||
if (!fileName || typeof fileName != 'string') {
|
||||
fileName = '导出文件'
|
||||
}
|
||||
let param = this.getQueryParams()
|
||||
if (this.exportSelectedKeys && this.exportSelectedKeys.length > 0) {
|
||||
param['selections'] = this.exportSelectedKeys.join(',')
|
||||
}
|
||||
console.log('导出参数', param)
|
||||
downloadFile(this.url.exportXlsUrl, fileName + '.xlsx', param)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user