diff --git a/src/views/dataDownload/DataDownload.vue b/src/views/dataDownload/DataDownload.vue
index b69787c..8b77514 100644
--- a/src/views/dataDownload/DataDownload.vue
+++ b/src/views/dataDownload/DataDownload.vue
@@ -112,7 +112,8 @@ export default {
}
],
url: {
- list: '/project/payWorkingGroupDistributionRecord/listForFile'
+ list: '/project/payWorkingGroupDistributionRecord/listForFile',
+ exportXlsUrl: '/project/payWorkingGroupDistributionRecord/zipFile'
}
}
},
@@ -133,15 +134,19 @@ export default {
this.$message.warn('请至少选择一个文件')
return
}
- // 获取文件名称
let fileName = ''
+ if (!fileName || typeof fileName != 'string') {
+ fileName = '导出文件'
+ }
+ // 获取文件名称
let firstFile = this.dataSource.filter(tt => tt.fileId === this.selectedRowKeys[0])
- fileName = `${firstFile[0].fileName}等${this.selectedRowKeys.length}个文件.zip`
- let fileIdStr = this.selectedRowKeys.join(',')
- batchDownloadFile({ ids: fileIdStr }).then(res => {
- // 调用a标签下载文件的方法
- downloadFileByA(res, fileName)
- })
+ fileName = `${firstFile[0].fileName}等${this.selectedRowKeys.length}个文件`
+ let param = this.getQueryParams()
+ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
+ param['ids'] = this.selectedRowKeys.join(',')
+ }
+ console.log('导出参数', param)
+ downloadFile(this.url.exportXlsUrl, fileName + '.zip', param)
}
}
}
diff --git a/src/views/subBidCommittee/modules/SubBidCommitteeDetail.vue b/src/views/subBidCommittee/modules/SubBidCommitteeDetail.vue
index 78177b5..f92b3cb 100644
--- a/src/views/subBidCommittee/modules/SubBidCommitteeDetail.vue
+++ b/src/views/subBidCommittee/modules/SubBidCommitteeDetail.vue
@@ -17,18 +17,23 @@
-
-
- 项目资料:
-
+
+
+
+ 项目资料:
+
{{ item.name }}
-
-
-
+
+
+
+
+
+ 关闭
+
@@ -48,6 +53,7 @@ export default {
width: 800,
visible: false,
loading: false,
+ fileLoading: false, // 文件区域的加载效果
fileList: [],
committeeId: '',
committeeDetail: {}
@@ -90,6 +96,7 @@ export default {
* 获取文件信息
* */
async initFileList(fileIdsArr) {
+ this.fileLoading = true
if (fileIdsArr.length > 0) {
let fileList = []
for (let i = 0; i < fileIdsArr.length; i++) {
@@ -101,20 +108,21 @@ export default {
} else {
this.fileList = []
}
+ this.fileLoading = false
},
handleCancel() {
this.committeeDetail = {}
+ this.fileList = []
this.visible = false
},
handlePreview(file) {
- console.log(file)
if (file && file.id) {
- const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
- let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
+ const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.name }`
+ let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
window.open(url)
}
- },
+ }
}
}