Files
mini-openclaw-v2/src/components/xingbang/MeetingFeedbackPanel.tsx
T

10 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import {useEffect,useState} from 'react';
const LABEL:Record<string,string>={advance:'建议推进',supplement:'建议补件',stop:'暂不推进',insufficient_information:'信息不足'};
export default function MeetingFeedbackPanel({project,send}:any){
const [report,setReport]=useState<any>(null),[error,setError]=useState(''),[busy,setBusy]=useState(false);
async function load(){setBusy(true);setError('');try{setReport(await send('GET',`/library/projects/${encodeURIComponent(project.id)}/feedback`));}catch(e:any){setError(e.message);}finally{setBusy(false);}}
useEffect(()=>{setReport(null);load();},[project.id]);
return <section className="v2-surface"><div className="v2-section-heading"><div><span className="v2-kicker">MEETING FEEDBACK</span><h2>预审建议,后来是否真的通过?</h2></div><button className="ra-button" disabled={busy} onClick={load}>刷新反馈</button></div><p>只比较会议之前已完成的冻结预审。正式结果需关联材料版本并确认通过/否决口径;更正、暂缓和未送审单列。</p>{busy&&<p role="status">读取冻结预审与会议结果…</p>}{error&&<p role="alert" className="ra-alert error">{error}</p>}{report&&<><div className="v2-metrics"><article><span>有效对照样本</span><b>{report.observed}</b></article><article><span>建议推进组</span><b>{report.advance_group.count}</b></article><article><span>推进组实际通过占比</span><b>{report.advance_group.rate===null?'待积累':`${(report.advance_group.rate*100).toFixed(1)}%`}</b></article><article><span>排除记录</span><b>{report.excluded.length}</b></article></div><p className="v2-notice">{report.note}</p>{!report.rows.length&&<p>尚无符合口径的反馈样本。完成预审后,在下方登记会议结果、会议时间与实际审议的材料版本,再刷新这里。</p>}<ul>{report.rows.map((r:any)=><li key={r.outcome_id}><b>{LABEL[r.recommendation]||r.recommendation} → {r.approved?'会议通过':'会议否决'}</b>{r.divergence&&' · 优先复盘分歧'}<p>运行 {r.run_id} · 会议 {r.meeting_id} · 方案 {r.plan_ref?.id}@{r.plan_ref?.version} · {r.data_domain==='demo'?'模拟域':'真实域'}</p></li>)}</ul><details><summary>查看排除原因({report.excluded.length})</summary><ul>{report.excluded.map((r:any)=><li key={r.outcome_id}>{r.reason} · {r.outcome_id}</li>)}</ul></details></>}</section>;
}