我的合同,资料下载

This commit is contained in:
zhaoxiao
2021-09-30 14:32:11 +08:00
parent bc81346d20
commit 4b19f803e3
5 changed files with 62 additions and 52 deletions
+5 -2
View File
@@ -30,7 +30,6 @@
<!-- table表格区域-->
<div>
<a-table
size="middle"
ref="table"
bordered
rowKey="fileId"
@@ -130,10 +129,14 @@ export default {
* 批量下载
*/
batchDownloadFile() {
if (this.selectedRowKeys.length === 0) {
this.$message.warn('请至少选择一个文件')
return
}
// 获取文件名称
let fileName = ''
let firstFile = this.dataSource.filter(tt => tt.fileId === this.selectedRowKeys[0])
fileName = `${firstFile[0].fileName}等${this.selectedRowKeys.length}个文件`
fileName = `${firstFile[0].fileName}等${this.selectedRowKeys.length}个文件.zip`
let fileIdStr = this.selectedRowKeys.join(',')
batchDownloadFile({ ids: fileIdStr }).then(res => {
// 调用a标签下载文件的方法