diff --git a/src/views/bg/xispeak/BgXiSpeakList.vue b/src/views/bg/xispeak/BgXiSpeakList.vue index be25e79..fb93d1b 100644 --- a/src/views/bg/xispeak/BgXiSpeakList.vue +++ b/src/views/bg/xispeak/BgXiSpeakList.vue @@ -112,7 +112,7 @@ updateLaunchType, saveOrUpdateDict, withDrawXiSpeak, - bgXiSpeakFeedbackList, + queryFeedbackCounts, } from './BgXiSpeak.api'; const FLOW_CODE = 'dev_bg_xi_speak_001'; @@ -348,27 +348,18 @@ const ids = collectAllIds(records); if (ids.length === 0) return; try { - // 并行加载所有记录的反馈数据 - const results = await Promise.all( - ids.map((id) => - bgXiSpeakFeedbackList({ - mainId: id, - pageNo: 1, - pageSize: 9999, - column: 'createTime', - order: 'desc', - }).catch(() => null) - ) - ); - // 构建 id -> { total, closed } 映射 + const res = await queryFeedbackCounts({ ids: ids.join(',') }); + const data = Array.isArray(res) ? res : res?.records || res?.result || []; const countsMap: Record = {}; - ids.forEach((id, index) => { - const res = results[index]; - const list = Array.isArray(res) ? res : res?.records || []; - const total = list.length; - const closed = list.filter((item: any) => item.completionStatus == 1).length; - countsMap[id] = { total, closed }; - }); + for (const item of data) { + const id = item.mainId || item.id || item.main_id; + if (id) { + countsMap[id] = { + total: item.total ?? item.implCount ?? 0, + closed: item.closed ?? item.closedCount ?? 0, + }; + } + } const updateFn = (list) => { if (!list) return; for (const item of list) { diff --git a/src/views/bg/xispeak/components/BgXiSpeakFeedbackForm.vue b/src/views/bg/xispeak/components/BgXiSpeakFeedbackForm.vue index 9991af0..6345692 100644 --- a/src/views/bg/xispeak/components/BgXiSpeakFeedbackForm.vue +++ b/src/views/bg/xispeak/components/BgXiSpeakFeedbackForm.vue @@ -2,21 +2,21 @@