| 12345678910111213141516171819202122232425262728293031323334 |
- <!doctype html><html lang="zh" data-theme="light"><head><meta charset="utf-8"><script>(function(){try{var q=new URLSearchParams(location.search).get("theme");if(q){localStorage.setItem("windscada_theme",q)}var t=q||"light";document.documentElement.setAttribute("data-theme",t)}catch(e){}})();</script><meta name="viewport" content="width=device-width,initial-scale=1">
- <title>%T% · windscada</title><style>%CSS%</style></head><body>
- <header><h1>%T% <a href="/">← 工作台</a></h1><span id="winbox"></span><span class="badge">只显示有问题的系统; 无问题不出图</span></header>
- <div id="probs">加载中…</div>
- <div class="card" style="margin-top:14px"><h3>台内即时查询 (任一契约通道 × 时间窗 × 聚合)</h3>
- <div style="display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px">
- <select id="qch" style="max-width:340px"></select>
- <select id="qagg"><option value="med">月中位</option><option value="dutyd">月duty(秒/日)</option><option value="daily">逐日中位</option></select>
- <button onclick="runQ()">出图</button><span class="small" id="qmsg"></span></div>
- <div id="qfig"></div></div>
- <footer>边界: 叶片/塔架无SCADA轴 | 对风误差=wrap(风向−机舱位置) vane口径; 死区/速率需≤30s数据=INSUFFICIENT | 判级时间窗: 变桨/偏航/蓄能/温度判级=近90日固定, 曲线=2025H2; 图内月序=所选时间窗 | P级归综合报告线</footer>
- <script>%JS%
- const T='%T%';let WIN='2026年';
- async function reload(win){WIN=win;
- const r=await fetch('/api/turbine?t='+T+'&win='+encodeURIComponent(win)); const d=await r.json();
- document.getElementById('winbox').innerHTML=winSel(win);
- let h='';
- if(!d.problems.length) h='<div class="card"><p class="empty">各系统在判级时间窗内均无非常态 —— 可用下方即时查询查看任意契约通道。</p></div>';
- d.problems.forEach(p=>{
- h+=`<div class="card mb"><h3>${p.sys} ${chip(p.状态)}</h3><p class="small" style="margin-bottom:8px">${p.依据}</p>`;
- if(p.figs.length){h+=`<div class="grid">`; p.figs.forEach(f=>{h+=drawFig(f)}); h+=`</div>`}
- h+=`</div>`+ordersHtml(p.orders)});
- document.getElementById('probs').innerHTML=h;
- }
- async function loadCh(){const r=await fetch('/api/channels');const d=await r.json();
- let o='';for(const [g,cols] of Object.entries(d)){o+=`<optgroup label="${g}">`+cols.map(c=>`<option value="${c.code}">${c.cn}</option>`).join('')+`</optgroup>`}
- document.getElementById('qch').innerHTML=o}
- async function runQ(){document.getElementById('qmsg').textContent='计算中…';
- const ch=document.getElementById('qch').value, agg=document.getElementById('qagg').value;
- const r=await fetch(`/api/query?t=${T}&ch=${encodeURIComponent(ch)}&win=${encodeURIComponent(WIN)}&agg=${agg}`);
- const f=await r.json(); document.getElementById('qmsg').textContent=f.err||'';
- document.getElementById('qfig').innerHTML=f.err?'':drawFig(f)}
- reload(WIN);loadCh();
- </script></body></html>
|