!47 style(inspectProgress): 进展表单对齐BPM表单样式
* style(inspectProgress): 进展表单对齐BPM表单样式 * style(xispeak): 反馈表单对齐BPM表单样式 * perf(xispeak): 反馈统计查询由逐条请求改为批量接口
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user