!47 style(inspectProgress): 进展表单对齐BPM表单样式

* style(inspectProgress): 进展表单对齐BPM表单样式
* style(xispeak): 反馈表单对齐BPM表单样式
* perf(xispeak): 反馈统计查询由逐条请求改为批量接口
This commit is contained in:
new_new_new
2026-06-17 03:07:33 +00:00
parent 4aeb89ff44
commit 6f3d19b876
3 changed files with 139 additions and 102 deletions
+12 -21
View File
@@ -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<string, { total: number; closed: number }> = {};
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) {