v1.9 优化车辆费用导入模版没法导出的bug

This commit is contained in:
wuxw 2025-11-04 09:41:51 +08:00
parent d5f60d46cc
commit a2e5ee0148

View File

@ -39,7 +39,9 @@
</template>
<script>
import { listParkingAreas, listFeeConfigs, exportCarFeeExcel } from '@/api/fee/carCreateFeeApi'
import { listParkingAreas, listFeeConfigs } from '@/api/fee/carCreateFeeApi'
import { exportData } from '@/api/fee/exportFeeImportExcelApi'
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'ExportCarFeeImportExcel',
@ -112,16 +114,21 @@ export default {
},
async handleExport() {
try {
const paIds = this.selectedParkingAreas.join(',')
const configIds = this.selectedConfigs.join(',')
await exportCarFeeExcel({
paIds,
configIds
const params = {
paIds: this.selectedParkingAreas.join(','),
configIds: this.selectedConfigs.join(','),
communityId: getCommunityId(),
type: '2002',
pagePath: 'exportCreateFeeTemplate'
}
exportData(params).then(response => {
this.$message.success(response.msg)
if (response.code === 0) {
this.visible = false
this.$router.push('/pages/property/downloadTempFile?tab=下载中心')
}
})
this.$message.success(this.$t('common.operationSuccess'))
this.visible = false
} catch (error) {
this.$message.error(this.$t('common.exportError'))
}