问题修复

This commit is contained in:
hongchao 2025-12-05 17:20:00 +08:00
parent 102d1c3665
commit 2fa2661a30
2 changed files with 11 additions and 16 deletions

View File

@ -358,7 +358,7 @@ export function getExportZipUnsettled(data) {
// 导出zip获取进度 // 导出zip获取进度
export function getExportZipProgress(data) { export function getExportZipProgress(data) {
return request({ return request({
url: '/material/slt_agreement_info/exportProgress', url: '/material/slt_agreement_info/exZipProgress',
method: 'post', method: 'post',
data: data, data: data,
}) })

View File

@ -569,14 +569,17 @@ import {
getUnitList, getUnitList,
getAgreementInfoById, getUnitListFilterTeam, getAgreementInfoById, getUnitListFilterTeam,
} from '@/api/back/index.js' } from '@/api/back/index.js'
import {getSltList, costExamine, getSltReportedList, getSltReportList, getHistoryReportList, getHistoryLeaseCostDetails, getHistoryRepairCostDetails, getHistoryLoseCostDetails, getHistoryScrapCostDetails} from '@/api/cost/cost' import {getSltList, costExamine, getSltReportedList, getSltReportList, getHistoryReportList,
getHistoryLeaseCostDetails, getHistoryRepairCostDetails, getHistoryLoseCostDetails, getHistoryScrapCostDetails,
getExportZipUnsettled,getExportZipProgress
} from '@/api/cost/cost'
import { toChineseAmount } from '@/utils/bonus.js' import { toChineseAmount } from '@/utils/bonus.js'
import vueEasyPrint from "vue-easy-print"; import vueEasyPrint from "vue-easy-print";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import * as XLSX from 'xlsx'; import * as XLSX from 'xlsx';
import request from '@/utils/request' import request from '@/utils/request'
import { download,downloadJson,downloadZip } from '@/utils/request'
export default { export default {
name: 'UnreportHome', name: 'UnreportHome',
@ -879,12 +882,7 @@ export default {
this.statusText = '开始导出...' this.statusText = '开始导出...'
const response = await request({ const response = await getExportZipUnsettled(param)
url: '/material/slt_agreement_info/exportUnsettled',
method: 'post',
data: JSON.stringify(param),
timeout: 60000 // 10
})
const result = response const result = response
this.taskId = result.taskId this.taskId = result.taskId
this.totalZip = result.total this.totalZip = result.total
@ -903,12 +901,9 @@ export default {
startPolling() { startPolling() {
this.pollInterval = setInterval(async () => { this.pollInterval = setInterval(async () => {
try { try {
const response = await request({ const param = { taskId: this.taskId }
url: `/material/slt_agreement_info/exportProgress/${this.taskId}`, const response = await getExportZipProgress(param)
method: 'get'
})
const progress = response const progress = response
this.progress = progress.percentage this.progress = progress.percentage
this.current = progress.current this.current = progress.current
@ -930,7 +925,7 @@ export default {
this.statusText = '查询进度失败' this.statusText = '查询进度失败'
this.exportFlag = false this.exportFlag = false
} }
}, 1000) }, 5000)
}, },
downloadFile() { downloadFile() {
@ -940,7 +935,7 @@ export default {
this.downloadZip( this.downloadZip(
'material/slt_agreement_info/downloadExport', 'material/slt_agreement_info/downloadExport',
JSON.stringify(param), JSON.stringify(param),
`未结算报表批量明细导出_${new Date().getTime()}.zip`, `未结算批量明细导出_${new Date().getTime()}.zip`,
) )
} }