对接法规清单的导入导出模板下载

This commit is contained in:
qq787203167
2022-05-05 16:31:16 +08:00
parent ba709306e6
commit d85d595388
3 changed files with 21 additions and 3 deletions
@@ -44,6 +44,10 @@
paramsTemplateId: {
type: String,
default: ''
},
projectLibraryId: {
type: String,
default: ''
}
},
data() {
@@ -60,6 +64,8 @@
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
} else if (this.paramsTemplateId) {
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&paramsTemplateId=' + this.paramsTemplateId
} else if (this.projectLibraryId) {
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectLibraryId=' + this.projectLibraryId
}
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut
}
@@ -575,6 +575,7 @@
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id
}
@@ -67,7 +67,8 @@
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
<template slot="title" id="popconfirm">
<div class="operator-text-title">
<ImportFile :url="url" :isTrue="true" :accept="'.xls'" @getList="getPersonnelList"/>
<ImportFile :url="url" :projectLibraryId=$route.query.id :isTrue="true" :accept="'.zip'"
@getList="getPersonnelList"/>
</div>
<div @click="handleModule" class="operator-text-title">
<a-icon type="download"/>
@@ -531,6 +532,9 @@
updateStatusBatch: '/project/projectLawsInventoryEO/updateStatusBatch',
matchRelevantPeople: '/project/projectLawsInventoryEO/matchRelevantPeople',
queryPersonByProject: '/project/projectRelatedPersonnel/queryPersonByProjectId',
importZipUrl: '/project/projectLawsInventoryEO/importData',
exportTemplate: '/project/projectLawsInventoryEO/exportTemplate',
exportData: '/project/projectLawsInventoryEO/exportData',
setBatch: '/project/projectLawsInventoryEO/setBatch',//批量设置
copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制
transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy'//调取
@@ -599,10 +603,17 @@
methods: {
...mapGetters(['userInfo']),
handleModule() {
downloadFile(this.url.exportTemplate, '模板下载.xls', {})
},
handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
ids: selectedRowKeys.join(','),
...this.queryParamQuery,
projectLibraryId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.projectName + '法规清单.zip', query, this.Deselect)
},
//复制
copyClick() {