仪表盘与后台界面

课程值班簿趋势分析面板

在课程值班簿场景中完成趋势分析面板:包含真实内容、可操作控件、清晰状态反馈和跨尺寸布局。

仪表盘与后台界面趋势分析面板HTMLCanvasJavaScript
启用 JavaScript 后可编辑、运行和保存此案例。固定源码如下:
<!doctype html>
<html lang="zh-Hans" dir="ltr">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>课程值班簿趋势分析面板</title>
  <style>
    :root { --ink:#102c44; --paper:#eef6f8; --accent:#e05263; --secondary:#79b7c7; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
    * { box-sizing:border-box; }
    html { min-width:320px; background:var(--paper); }
    body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:Baskerville,"Songti SC",serif; background:linear-gradient(90deg,var(--paper) 0 72%,color-mix(in srgb,var(--secondary) 18%,var(--paper)) 72%); }
    button,input,select,textarea { color:inherit; font:inherit; }
    button,[role="button"],input,select,textarea { accent-color:var(--accent); }
    button { cursor:pointer; }
    button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
    [hidden] { display:none !important; }
    @media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
    @media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
    .page{width:min(1200px,calc(100% - 38px));margin:auto;padding:76px 0}.mast{display:grid;grid-template-columns:2fr 1fr;gap:7vw;align-items:center;margin-bottom:44px}.mast h1{font-family:Baskerville,"Songti SC",serif;font-weight:800;font-size:clamp(48px,11vw,112px);line-height:.86;letter-spacing:-.06em;margin:0}.eyebrow{display:block;margin-bottom:22px;color:var(--accent);font:800 11px/1 ui-monospace,monospace;letter-spacing:.26em}.intro{max-width:46ch;margin-top:26px;font-size:17px;line-height:1.85}.scenario{align-self:end;padding-bottom:14px;border-bottom:5px solid var(--accent);font-weight:800}.demo{border-radius:0 60px 0 0;box-shadow:-16px 18px 0 color-mix(in srgb,var(--accent) 22%,transparent);position:relative;min-height:460px;overflow:hidden;padding:clamp(30px,6vw,72px);background:color-mix(in srgb,var(--paper) 92%,#fff)}@media(max-width:700px){.page{width:calc(100% - 22px);padding:30px 0}.mast{grid-template-columns:1fr}.demo{padding:20px}}
    .stack{display:flex;flex-direction:column;gap:18px}.panel{padding:28px;border-left:7px solid var(--accent);background:color-mix(in srgb,var(--secondary) 12%,var(--paper))}.action{min-height:46px;padding:11px 18px;border:0;border-bottom:3px solid var(--ink);background:transparent;font-weight:900}.action.primary,.action.is-active{color:var(--paper);background:var(--ink)}.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}.metric{font:900 clamp(32px,7vw,64px)/1 ui-monospace,monospace}.status{min-height:22px;padding-top:12px;border-top:1px dashed var(--line)}.muted{color:color-mix(in srgb,var(--ink) 62%,transparent)}.chip{display:inline-block;padding:5px 8px;background:var(--secondary)}.meter{height:12px;border:1px solid var(--ink)}.meter>i{display:block;height:100%;background:var(--ink)}
    .composition-studio{display:grid;gap:14px}.studio-ruler{display:flex;justify-content:space-between;padding:0 4px;color:color-mix(in srgb,var(--ink) 55%,transparent);font:700 11px/1 ui-monospace,monospace;letter-spacing:.14em}.studio-ruler::before{content:"01 / WORKING PROTOTYPE"}.studio-ruler::after{content:"360 · 768 · 1440"}.composition-studio .demo::after{content:"";position:absolute;right:18px;bottom:18px;width:24px;height:24px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);pointer-events:none}
    .ops-trend{display:grid;gap:16px}.ops-trend>header{display:grid;grid-template-columns:1fr minmax(150px,.25fr) minmax(180px,.35fr);gap:18px;align-items:end;padding-bottom:16px;border-bottom:1px solid var(--line)}.ops-trend h2{margin:.2em 0}.ops-trend header label{display:grid;grid-template-columns:1fr auto;gap:7px}.ops-trend header select,.ops-trend header input{grid-column:1/-1;width:100%}.ops-trend-board{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(210px,.5fr);gap:14px}.ops-chart-card{display:grid;gap:8px;padding:14px;border:1px solid var(--line);background:#081b25;color:#dff7f5}.ops-chart-card svg{width:100%;min-height:320px}.ops-chart-card #opsTrendPath{fill:none;stroke:#5eead4;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.ops-chart-card #opsTrendArea{fill:url(#none);fill:#2dd4bf22;stroke:none}.ops-chart-card circle{fill:#fb923c;stroke:#081b25;stroke-width:4;cursor:crosshair}.ops-chart-card output{min-height:22px;color:#99f6e4}.ops-trend-board>aside{display:grid;align-content:start;gap:9px}.ops-trend-board article{display:grid;gap:5px;padding:16px;border:1px solid var(--line);background:var(--paper)}.ops-trend-board strong{font-size:clamp(28px,5vw,48px)}#opsTrendAlerts{display:grid;gap:6px;padding:0;margin:0;list-style:none}#opsTrendAlerts li{padding:9px;border-left:4px solid var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--paper));font-size:12px}@media(max-width:760px){.ops-trend>header,.ops-trend-board{grid-template-columns:1fr}.ops-chart-card svg{min-height:240px}}.workflow-spatial{display:grid;gap:16px}.workflow-spatial>header{display:grid;grid-template-columns:1fr minmax(170px,.35fr) minmax(170px,.35fr);gap:18px;align-items:end;padding-bottom:16px;border-bottom:5px solid var(--ink)}.workflow-spatial h2{margin:.2em 0}.workflow-spatial header label{display:grid;grid-template-columns:1fr auto;gap:7px}.workflow-spatial header input{grid-column:1/-1;width:100%}.spatial-grid{display:grid;grid-template-columns:minmax(0,var(--spatial-width)) 20px minmax(180px,1fr);gap:0;align-items:stretch}.spatial-core{min-width:0;transform:scale(var(--spatial-zoom));transform-origin:top left;transition:transform .2s}.spatial-handle{display:grid;min-height:300px;place-items:center;border:0;border-inline:1px dashed var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);cursor:col-resize}.spatial-grid>aside{display:grid;align-content:center;gap:14px;padding:22px;background:color-mix(in srgb,var(--secondary) 14%,var(--paper))}.spatial-grid>aside strong{font-size:clamp(24px,4vw,42px)}@media(max-width:900px){.workflow-spatial>header{grid-template-columns:1fr}.spatial-grid{order:-1;grid-template-columns:1fr}.spatial-handle{min-height:44px;cursor:row-resize}.spatial-core{transform:none}}.evidence-shell{--evidence-zoom:100;display:grid;gap:18px;padding:clamp(16px,4vw,26px);border:1px solid var(--line);border-radius:30px;background:linear-gradient(180deg,color-mix(in srgb,var(--secondary) 8%,transparent),color-mix(in srgb,var(--paper) 94%,transparent));box-shadow:var(--shadow)}.evidence-head{display:flex;justify-content:space-between;gap:18px;align-items:end}.evidence-head h2{margin:.2em 0}.evidence-tools{display:grid;gap:10px;justify-items:end}.evidence-tools output{padding:10px 14px;border-radius:999px;border:1px solid var(--line);background:var(--paper);font-weight:900}.evidence-body{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(230px,.55fr);gap:16px}.evidence-stage{display:grid;gap:12px;min-width:0}.evidence-ribbon{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.evidence-ribbon button{display:grid;gap:6px;min-height:110px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--paper);text-align:left}.evidence-ribbon button[aria-pressed="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 35%,transparent)}.evidence-ribbon span{font:800 11px/1 ui-monospace,monospace;letter-spacing:.14em}.evidence-ribbon small{opacity:.72;line-height:1.5}.evidence-core-shell{min-width:0;padding:clamp(12px,3vw,20px);overflow:auto;border:1px solid var(--line);border-radius:24px;background:color-mix(in srgb,var(--paper) 92%,transparent)}.evidence-core-shell>*{display:block;width:calc(10000%/var(--evidence-zoom));max-width:none;transform:scale(calc(var(--evidence-zoom)/100));transform-origin:top left}.evidence-rail{display:grid;align-content:start;gap:14px;padding:18px;border-radius:22px;color:var(--paper);background:var(--ink)}.evidence-rail label{display:grid;gap:8px}.evidence-rail input,.evidence-rail select{width:100%;padding:10px;border:1px solid #ffffff2e;border-radius:10px;color:inherit;background:#ffffff12}.evidence-checklist,.evidence-log{display:grid;gap:8px;padding-left:18px;margin:0}.evidence-checklist li.is-active{color:var(--secondary);font-weight:900}.evidence-checklist li.is-done{color:var(--accent);font-weight:900}.evidence-log li{line-height:1.55}.evidence-shell[data-board-mode="proof"] .evidence-core-shell{outline:4px solid color-mix(in srgb,var(--accent) 32%,transparent);outline-offset:2px}.evidence-shell[data-board-mode="handoff"] .evidence-rail{background:color-mix(in srgb,var(--ink) 82%,#0a1512)}@media(max-width:920px){.evidence-body{grid-template-columns:1fr}.evidence-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.evidence-head{align-items:stretch;flex-direction:column}.evidence-tools{justify-items:start}.evidence-ribbon{grid-template-columns:1fr}.evidence-core-shell>*{width:100%;transform:none}}
  </style>
</head>
<body data-aesthetic="magazine" data-composition="studio">
  <main class="page">
    <header class="mast"><div><span class="eyebrow">magazine / 趋势分析面板 / INTERMEDIATE</span><h1>课程值班簿趋势分析面板</h1><p class="intro">在课程值班簿场景中完成趋势分析面板:包含真实内容、可操作控件、清晰状态反馈和跨尺寸布局。</p></div><span class="scenario">课程值班簿</span></header>
    <div class="composition-studio"><div class="studio-ruler" aria-hidden="true"></div><section class="demo" aria-label="课程值班簿趋势分析面板交互区域"><section id="evidenceShell" class="evidence-shell" data-board-mode="scan"><header class="evidence-head"><div><span class="eyebrow">课程值班簿 / EVIDENCE BOARD</span><h2>趋势分析面板观测面板</h2><p>把主案例放入证据看板,用单独的观察卡片、日志和模式切换记录当前结果。</p></div><div class="evidence-tools"><div class="row"><button class="action primary" type="button" data-board-mode="scan">扫描</button><button class="action" type="button" data-board-mode="proof">核验</button><button class="action" type="button" data-board-mode="handoff">交接</button></div><output id="evidenceStatus">等待采样</output></div></header><div class="evidence-body"><section class="evidence-stage"><div class="evidence-ribbon"><button type="button" data-evidence-card="0" aria-pressed="true"><span>01</span><strong>课程值班簿灵感</strong><small>检查状态变化是否可见</small></button><button type="button" data-evidence-card="1" aria-pressed="false"><span>02</span><strong>课程值班簿记录</strong><small>确认键盘与点击入口一致</small></button><button type="button" data-evidence-card="2" aria-pressed="false"><span>03</span><strong>课程值班簿协作</strong><small>观察布局在窄屏下是否回退</small></button><button type="button" data-evidence-card="3" aria-pressed="false"><span>04</span><strong>课程值班簿进度</strong><small>记录当前复核结论</small></button></div><div id="evidenceCoreShell" class="evidence-core-shell"><div id="workflowSpatial" class="workflow-spatial" style="--spatial-width:64%;--spatial-zoom:1"><header><div><span class="eyebrow">课程值班簿 SPATIAL CANVAS</span><h2>课程值班簿调整台</h2></div><label>预警阈值占比<input id="workflowSpatialWidth" type="range" min="38" max="82" value="64"><output id="workflowSpatialWidthValue">64%</output></label><label>内容缩放<input id="workflowSpatialZoom" type="range" min="80" max="120" value="100"><output id="workflowSpatialZoomValue">100%</output></label></header><div class="spatial-grid"><section id="workflowCore" class="workflow-core spatial-core"><!-- 11DZ_CORE_START:dashboards-admin-trend-chart --><div class="ops-trend"><header><div><span class="eyebrow">OPERATIONS TREND</span><h2>课程值班簿准时配送</h2><p>按运营班次查看真实业务单位,并用阈值直接生成待处理区间。</p></div><label>观察窗口<select id="opsTrendWindow" data-core-bridge="dashboards-admin-trend-chart"><option value="6">最近 6 班</option><option value="9">最近 9 班</option><option value="12" selected>全部 12 班</option></select></label><label>预警阈值<input id="opsTrendThreshold" type="range" min="10" max="120" value="60"><output id="opsTrendThresholdValue">60 单</output></label></header><section class="ops-trend-board"><div class="ops-chart-card"><svg id="opsTrendSvg" viewBox="0 0 760 360" role="img" aria-labelledby="opsTrendTitle opsTrendDesc"><title id="opsTrendTitle">课程值班簿运营趋势</title><desc id="opsTrendDesc">折线展示十二个运营班次的准时配送,虚线表示预警阈值。</desc><g id="opsTrendGrid" aria-hidden="true"></g><line id="opsTrendLimit" x1="48" x2="732" stroke="currentColor" stroke-dasharray="8 7"></line><path id="opsTrendArea"></path><path id="opsTrendPath"></path><g id="opsTrendPoints"></g></svg><output id="opsTrendHover">移动到数据点查看班次</output></div><aside><article><span>当前值</span><strong id="opsTrendCurrent">—</strong></article><article><span>窗口均值</span><strong id="opsTrendAverage">—</strong></article><article><span>超过阈值</span><strong id="opsTrendBreaches">—</strong></article><ol id="opsTrendAlerts" aria-label="阈值事件"></ol></aside></section></div><!-- 11DZ_CORE_END --></section><input id="workflowSpatialHandle" class="spatial-handle" type="button" value="↔" aria-label="拖动调整主案例预览宽度"><aside><strong>课程值班簿监测视图</strong><p>课程值班簿处置视图与课程值班簿复盘视图会随画布尺寸重新编排。</p><output id="workflowSpatialStatus">宽度 64%,缩放 100%</output><input id="workflowSpatialApply" class="action primary" type="button" value="应用面板"></aside></div></div></div></section><aside class="evidence-rail"><label>画布缩放<input id="evidenceZoom" type="range" min="88" max="128" value="100"><output id="evidenceZoomValue">100%</output></label><label>当前取样<select id="evidenceStep"><option value="0">课程值班簿灵感</option><option value="1">课程值班簿记录</option><option value="2">课程值班簿协作</option><option value="3">课程值班簿进度</option></select></label><ul id="evidenceChecklist" class="evidence-checklist"><li>课程值班簿灵感</li><li>课程值班簿记录</li><li>课程值班簿协作</li><li>课程值班簿进度</li></ul><button id="evidenceCapture" class="action primary" type="button">写入证据</button><ol id="evidenceLog" class="evidence-log"><li>尚未写入证据</li></ol></aside></div></section><p id="status" class="status" role="status" aria-live="polite"></p></section></div>
  </main>
  <script>
    'use strict';
    const statusOutput = document.querySelector('#status');
    const announce = message => { statusOutput.textContent = message; };
    /* 11DZ_CORE_SCRIPT_START:dashboards-admin-trend-chart */
const opsTrendAll=[34,38,41,36,45,49,46,53,57,55,62,66];const opsTrendUnit='单';const opsTrendWindow=document.querySelector('#opsTrendWindow');const opsTrendThreshold=document.querySelector('#opsTrendThreshold');const opsTrendSvg=document.querySelector('#opsTrendSvg');const opsTrendState={windowSize:12,threshold:60,visible:opsTrendAll};function opsTrendScale(value,max){return 320-value/max*260;}function renderOpsTrend(){opsTrendState.windowSize=Number(opsTrendWindow.value);opsTrendState.threshold=Number(opsTrendThreshold.value);opsTrendState.visible=opsTrendAll.slice(-opsTrendState.windowSize);const max=Math.max(opsTrendState.threshold,...opsTrendState.visible)*1.12;const step=684/Math.max(1,opsTrendState.visible.length-1);const points=opsTrendState.visible.map((value,index)=>({value,x:48+index*step,y:opsTrendScale(value,max),shift:opsTrendAll.length-opsTrendState.visible.length+index+1}));const commands=points.map((point,index)=>(index?'L':'M')+point.x.toFixed(1)+' '+point.y.toFixed(1)).join(' ');document.querySelector('#opsTrendPath').setAttribute('d',commands);document.querySelector('#opsTrendArea').setAttribute('d',commands+' L '+points.at(-1).x+' 320 L 48 320 Z');const limitY=opsTrendScale(opsTrendState.threshold,max);const limit=document.querySelector('#opsTrendLimit');limit.setAttribute('y1',String(limitY));limit.setAttribute('y2',String(limitY));const pointGroup=document.querySelector('#opsTrendPoints');pointGroup.replaceChildren(...points.map(point=>{const circle=document.createElementNS('http://www.w3.org/2000/svg','circle');circle.setAttribute('cx',String(point.x));circle.setAttribute('cy',String(point.y));circle.setAttribute('r','7');circle.dataset.value=String(point.value);circle.dataset.shift=String(point.shift);circle.setAttribute('tabindex','0');circle.setAttribute('aria-label','第 '+point.shift+' 班,'+point.value+' '+opsTrendUnit);return circle;}));const average=Math.round(opsTrendState.visible.reduce((sum,value)=>sum+value,0)/opsTrendState.visible.length);const breaches=points.filter(point=>point.value>opsTrendState.threshold);document.querySelector('#opsTrendCurrent').textContent=opsTrendState.visible.at(-1)+' '+opsTrendUnit;document.querySelector('#opsTrendAverage').textContent=average+' '+opsTrendUnit;document.querySelector('#opsTrendBreaches').textContent=breaches.length+' 班';document.querySelector('#opsTrendThresholdValue').textContent=opsTrendState.threshold+' '+opsTrendUnit;document.querySelector('#opsTrendAlerts').replaceChildren(...breaches.map(point=>{const item=document.createElement('li');item.textContent='第 '+point.shift+' 班超过阈值 '+(point.value-opsTrendState.threshold)+' '+opsTrendUnit;return item;}));announce('课程值班簿趋势已更新,'+breaches.length+' 个班次需要关注');}opsTrendWindow.addEventListener('change',renderOpsTrend);opsTrendThreshold.addEventListener('input',renderOpsTrend);opsTrendSvg.addEventListener('pointermove',event=>{const target=event.target.closest('circle');if(!target)return;document.querySelector('#opsTrendHover').textContent='第 '+target.dataset.shift+' 班 · '+target.dataset.value+' '+opsTrendUnit;});opsTrendSvg.addEventListener('focusin',event=>{if(event.target.matches('circle'))document.querySelector('#opsTrendHover').textContent=event.target.getAttribute('aria-label');});renderOpsTrend();
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"dashboards-admin-trend-chart","selector":"[data-core-bridge=\"dashboards-admin-trend-chart\"]","mode":"select","key":"ArrowRight"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · 核心版本 '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.setAttribute('aria-keyshortcuts',workflowBridgeSpec.key);workflowBridgeControl.addEventListener('keydown',event=>{if(event.key!==workflowBridgeSpec.key)return;event.preventDefault();workflowBridgeControl.selectedIndex=(workflowBridgeControl.selectedIndex+1)%workflowBridgeControl.options.length;workflowBridgeControl.dispatchEvent(new Event('input',{bubbles:true}));workflowBridgeControl.dispatchEvent(new Event('change',{bubbles:true}));});workflowBridgeControl.addEventListener("keydown",workflowBridgeScheduleCommit);workflowBridgeControl.addEventListener('input',workflowBridgeScheduleCommit);workflowBridgeControl.addEventListener('change',workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();workflowBridgeControl.selectedIndex=(workflowBridgeControl.selectedIndex+1)%workflowBridgeControl.options.length;workflowBridgeControl.dispatchEvent(new Event('change',{bubbles:true}));const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowSpatial=document.querySelector('#workflowSpatial');const workflowSpatialCore=document.querySelector('#workflowCore');const workflowSpatialWidth=document.querySelector('#workflowSpatialWidth');const workflowSpatialZoom=document.querySelector('#workflowSpatialZoom');const workflowSpatialHandle=document.querySelector('#workflowSpatialHandle');const workflowSpatialState={width:64,zoom:1,dragging:false};function workflowSpatialDrive(){workflowSpatial.style.setProperty('--spatial-width',workflowSpatialState.width+'%');workflowSpatial.style.setProperty('--spatial-zoom',String(workflowSpatialState.zoom));workflowSpatialWidth.value=String(workflowSpatialState.width);workflowSpatialZoom.value=String(Math.round(workflowSpatialState.zoom*100));document.querySelector('#workflowSpatialWidthValue').textContent=workflowSpatialState.width+'%';document.querySelector('#workflowSpatialZoomValue').textContent=Math.round(workflowSpatialState.zoom*100)+'%';document.querySelector('#workflowSpatialStatus').textContent='宽度 '+workflowSpatialState.width+'%,缩放 '+Math.round(workflowSpatialState.zoom*100)+'%';announce('课程值班簿画布已重排');}workflowSpatialWidth.addEventListener('input',()=>{workflowSpatialState.width=Number(workflowSpatialWidth.value);workflowSpatialDrive();});workflowSpatialZoom.addEventListener('input',()=>{workflowSpatialState.zoom=Number(workflowSpatialZoom.value)/100;workflowSpatialDrive();});workflowSpatialHandle.addEventListener('pointerdown',event=>{workflowSpatialState.dragging=true;workflowSpatialHandle.setPointerCapture(event.pointerId);});workflowSpatialHandle.addEventListener('pointermove',event=>{if(!workflowSpatialState.dragging)return;const rect=workflowSpatial.getBoundingClientRect();workflowSpatialState.width=Math.max(38,Math.min(82,Math.round((event.clientX-rect.left)/rect.width*100)));workflowSpatialDrive();});workflowSpatialHandle.addEventListener('pointerup',event=>{workflowSpatialState.dragging=false;workflowSpatialHandle.releasePointerCapture(event.pointerId);});workflowSpatialHandle.addEventListener('wheel',event=>{event.preventDefault();workflowSpatialState.zoom=Math.max(.8,Math.min(1.2,workflowSpatialState.zoom+(event.deltaY<0?.05:-.05)));workflowSpatialDrive();},{passive:false});workflowSpatialHandle.addEventListener('keydown',event=>{if(!['ArrowLeft','ArrowRight'].includes(event.key))return;event.preventDefault();workflowSpatialState.width=Math.max(38,Math.min(82,workflowSpatialState.width+(event.key==='ArrowRight'?2:-2)));workflowSpatialDrive();});document.querySelector('#workflowSpatialApply').addEventListener('click',()=>{const bridge=workflowBridgeActivate();document.querySelector('#workflowSpatialStatus').textContent='已应用面板 · 宽度 '+workflowSpatialState.width+'%,缩放 '+Math.round(workflowSpatialState.zoom*100)+'% · '+bridge.summary;announce(document.querySelector('#workflowSpatialStatus').textContent);});workflowSpatialDrive();
workflowBridgeReset();
const evidenceShell=document.querySelector('#evidenceShell');const evidenceStatus=document.querySelector('#evidenceStatus');const evidenceZoom=document.querySelector('#evidenceZoom');const evidenceZoomValue=document.querySelector('#evidenceZoomValue');const evidenceStep=document.querySelector('#evidenceStep');const evidenceChecklistItems=[...document.querySelectorAll('#evidenceChecklist li')];const evidenceCards=[...document.querySelectorAll('[data-evidence-card]')];const evidenceLog=document.querySelector('#evidenceLog');const evidenceModeButtons=[...evidenceShell.querySelectorAll('button[data-board-mode]')];const evidenceNotes=["课程值班簿灵感","课程值班簿记录","课程值班簿协作","课程值班簿进度"];const evidenceCore=document.querySelector('#workflowCore');let evidenceCaptures=0;function evidenceSetCard(index){evidenceCards.forEach((card,cardIndex)=>{const active=cardIndex===index;card.setAttribute('aria-pressed',String(active));});evidenceChecklistItems.forEach((item,itemIndex)=>{item.classList.toggle('is-active',itemIndex===index);item.classList.toggle('is-done',itemIndex<evidenceCaptures);});}function evidenceRender(reason){const version=evidenceCore?.dataset.workflowVersion||'0';const zoom=Number(evidenceZoom.value);const active=Math.min(evidenceNotes.length-1,Number(evidenceStep.value)||0);evidenceShell.style.setProperty('--evidence-zoom',String(zoom));evidenceZoomValue.textContent=zoom+'%';evidenceSetCard(active);evidenceStatus.textContent=reason+' · 核心版本 '+version;}evidenceModeButtons.forEach(button=>button.addEventListener('click',()=>{evidenceModeButtons.forEach(item=>item.classList.toggle('primary',item===button));evidenceShell.dataset.boardMode=button.dataset.boardMode;evidenceRender('已切换到'+button.textContent);announce('证据模式:'+button.textContent);}));evidenceCards.forEach((card,index)=>card.addEventListener('click',()=>{evidenceStep.value=String(index);evidenceRender('已切换观察卡片');announce('观察卡片:'+evidenceNotes[index]);}));evidenceZoom.addEventListener('input',()=>{evidenceRender('画布缩放已更新');announce('观测缩放 '+evidenceZoom.value+'%');});evidenceStep.addEventListener('change',()=>{const index=Number(evidenceStep.value)||0;evidenceRender('已切换取样');announce('当前取样:'+evidenceNotes[index]);});document.querySelector('#evidenceCapture').addEventListener('click',()=>{const index=Math.min(evidenceNotes.length-1,Number(evidenceStep.value)||0);const note=evidenceNotes[index];const version=evidenceCore?.dataset.workflowVersion||'0';evidenceCaptures+=1;const item=document.createElement('li');item.textContent='证据 '+evidenceCaptures+' · '+note+' · 核心版本 '+version;const empty=evidenceLog.querySelector('li')?.textContent==='尚未写入证据';if(empty)evidenceLog.replaceChildren(item);else evidenceLog.prepend(item);while(evidenceLog.children.length>6)evidenceLog.lastElementChild.remove();evidenceRender('已写入证据 '+evidenceCaptures);announce('已写入证据 '+evidenceCaptures+' · '+note);});evidenceCore?.addEventListener('focusin',()=>evidenceRender('主案例获得焦点'));evidenceCore?.addEventListener('click',()=>evidenceRender('主案例发生交互'));evidenceRender('等待采样');
  </script>
</body>
</html>
页面反馈发现问题或有改进建议?
反馈功能需要在在线版使用

请在在线版启用 JavaScript 后提交;当前工具或案例的本地功能不受影响。

前往在线版反馈