| | |
| | | if (!stored) return false; |
| | | |
| | | const jobs = JSON.parse(stored); |
| | | const activeStatuses = ['Scheduling', 'Executing', 'Paused', 'Drafted']; |
| | | const activeStatuses = [ |
| | | 'Scheduling', |
| | | 'Executing', |
| | | 'Paused', |
| | | 'Drafted', |
| | | 'InProgress', |
| | | 'Calling', |
| | | 'Ringing', |
| | | 'Answered' |
| | | ]; |
| | | |
| | | // 过滤出活跃状态的任务 |
| | | const activeJobs = jobs.filter(job => activeStatuses.includes(job.callStatus)); |
| | |
| | | |
| | | console.log('Loading case data with params:', params); |
| | | |
| | | if (!params.caseId) { |
| | | setError('caseId缺失'); |
| | | setLoading(false); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | await OutboundBotAPIService.syncStatusByCase({ caseId: params.caseId }); |
| | | } catch (syncError) { |
| | | console.error('同步外呼状态失败:', syncError); |
| | | } |
| | | try { |
| | | await OutboundBotAPIService.backfillConversationByCase({ caseId: params.caseId }); |
| | | } catch (backfillError) { |
| | | console.error('回补通话记录失败:', backfillError); |
| | | } |
| | | |
| | | // 调用API获取数据 |
| | | const response = await ProcessAPIService.getCaseProcessInfo( |
| | | params.caseId, |