Bug修改
This commit is contained in:
@@ -126,12 +126,13 @@
|
|||||||
<a-table
|
<a-table
|
||||||
size="middle"
|
size="middle"
|
||||||
ref="footTable"
|
ref="footTable"
|
||||||
rowKey="projectId"
|
rowKey="id"
|
||||||
:columns="columnsFooter"
|
:columns="columnsFooter"
|
||||||
:scroll="{x: 1300}"
|
:scroll="{x: 1300}"
|
||||||
:dataSource="footerDataSource"
|
:dataSource="footerDataSource"
|
||||||
:showHeader="false"
|
:showHeader="false"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
class="j-table-force-nowrap footer-table">
|
class="j-table-force-nowrap footer-table">
|
||||||
|
|
||||||
<!-- 项目名称-->
|
<!-- 项目名称-->
|
||||||
@@ -163,6 +164,7 @@ import SelectPrincipal from '../../components/company/SelectPrincipal'
|
|||||||
import JYearDate from '../../components/jero/JYearDate'
|
import JYearDate from '../../components/jero/JYearDate'
|
||||||
import { getAction } from '../../api/manage'
|
import { getAction } from '../../api/manage'
|
||||||
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||||||
|
import { downloadFile } from '../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WholeInstituteStatisticsList',
|
name: 'WholeInstituteStatisticsList',
|
||||||
@@ -286,7 +288,8 @@ export default {
|
|||||||
list: '/statistics/allProjectStatistics/list',
|
list: '/statistics/allProjectStatistics/list',
|
||||||
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
||||||
},
|
},
|
||||||
validateMoney: true
|
validateMoney: true,
|
||||||
|
exportSelectedKeys: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -435,7 +438,26 @@ export default {
|
|||||||
}
|
}
|
||||||
return
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user