feat(lme): 工料机骨架库与空骨架汇总模型(决策196/197/198)

This commit is contained in:
lianjianwei2024
2026-10-25 14:02:00 +08:00
parent b904f01e1c
commit 5ba819fcd6
8 changed files with 449 additions and 54 deletions

View File

@@ -353,6 +353,7 @@ body.grptree-dragging{cursor:col-resize !important;user-select:none}
<div class="panel" id="pan0" data-page-node-id="DDAHOeXzG1G71JwXqlB8N4">
<!-- 决策 172(2026-10-22 主人定):本页搜索——项目工料机页补一行细工具行,搜索框右上 -->
<div style="display:flex;align-items:center;gap:10px;padding:4px 10px;border-bottom:1px solid var(--line);background:#fafcff;height:30px;box-sizing:border-box">
<span id="skelbar" style="font-size:12px;color:#5a7ca6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62%" title=""></span>
<input id="pgsrch_wb" class="mi pgsrch" style="margin-left:auto" placeholder="搜索本页数据" title="搜索本页数据,命中黄底" oninput="pageSearchGo('wb', this.value)">
</div>
<table id="t0" data-page-node-id="wiHjUkOHHtafQFK4AcMWUn"><colgroup id="cg0" data-page-node-id="jrukeg9ggS0DZO8eKSBXsM"></colgroup><thead id="th0" data-page-node-id="tapJmvtyFyqqAOcTTiKGJ3"></thead><tbody id="tb0" data-page-node-id="L018lJjmeSEfM31wIxkb05"></tbody></table></div>
@@ -1847,6 +1848,23 @@ async function loadLme(){
LME_SUB=new Set(d.sub||[]); // 决策 188 收严:带子级集——三价格前端先拦(服务端同款拒)
colg('cg0',C_LME_WB); $('th0').innerHTML=lmeHeadHTML();
lmeRenderRows();
skelBarGo(); // 决策 197:骨架命中信息条(异步,不挡表格渲染)
}
/* 决策 197:骨架命中信息条——本项目原件(后缀+字段)命中骨架组时显示代表大骨架与形态差异(v1 只报) */
async function skelBarGo(){
const el=$('skelbar'); if(!el||!SID) return;
try{
const d=await J(`/api/session/lme/skel?session_id=${SID}`);
if(!d || !d.ok){ el.textContent=''; return; }
if(!d.hit){ el.textContent='骨架未命中:'+(d.reason||''); el.style.color='#a68b5a'; el.title=d.reason||''; return; }
const g=d.group||{}, diff=d.diff||{};
const nFields=((d.file.sig||'').split('|')[1]||'').split(',').filter(Boolean).length;
const miss=[ (diff.missing_shapes&&diff.missing_shapes.length)?`缺形态${diff.missing_shapes.length}`:'',
(diff.missing_fields&&diff.missing_fields.length)?`缺字段${diff.missing_fields.length}`:'' ].filter(Boolean).join('、');
el.textContent=`骨架命中 ${d.file.suffix}·${nFields}字段 → 代表《${(g.rep_name||'').slice(0,26)}》(${g.rep_nshapes}形态)` + (miss?`(本件缺:${miss})`:'(形态齐)');
el.style.color = miss ? '#a65a5a' : '#5a7ca6';
el.title = miss ? ('与组代表差异明细:'+JSON.stringify(diff)) : '本件与组代表结构一致';
}catch(e){ el.textContent=''; }
}
// billTR / grpTR / grpTitle / tgGrp / tgNorm / CB_TOTAL / CB_LAST / fmtAttr 全部由 common.js 提供
// (前后台唯一来源)。本页只负责「取哪个接口的数据」,渲染一律走公共层。