问题修复

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获取进度
export function getExportZipProgress(data) {
return request({
url: '/material/slt_agreement_info/exportProgress',
url: '/material/slt_agreement_info/exZipProgress',
method: 'post',
data: data,
})

View File

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