| 123456789101112131415 |
- <!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>铭道健康家办|会员报告审阅版</title><link rel="stylesheet" href="../shared/wide-members.css"><script src="../shared/wide-members.js" defer></script><style>*{box-sizing:border-box}body{background:#f3f4ee;color:#173d36;margin:0;font:16px/1.65 system-ui,sans-serif}main{max-width:610px;margin:auto;padding:22px}header,nav,.row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}header{padding-bottom:15px;border-bottom:1px solid #c7d3c7}small{color:#51665a}h1{font-size:32px;line-height:1.25;margin:20px 0 8px}h2{font-size:20px}article{background:white;border-radius:16px;padding:20px;margin:15px 0}.hero{background:linear-gradient(125deg,#0c3b36,#13614f);color:white}.hero small{color:#d7e7d9}a{color:#125546;text-underline-offset:4px}.btn{display:inline-block;border-radius:9px;background:#125546;color:white;padding:10px 15px;text-decoration:none}.hero .btn{background:#fff;color:#124d40}p{margin:9px 0 16px}footer{font-size:13px;color:#58655c;margin-top:22px}nav a{padding:8px 0}</style><main><header><b>铭道 · 健康家办</b><small>本地审阅|虚构会员</small></header><div id="view"></div><nav><a href="../index.html">探索家办服务</a><a href="../app.html#c4">进入原有商城 →</a></nav><footer>本页展示会员登录后的使用方式,不包含真实家庭资料。</footer></main><script>const dates=['2026-09-16','2025-09-12'];function draw(){const key=location.hash.slice(1),idx=dates.indexOf(key);let v='';const who=owner?'我的报告 · 示例会员 A':'正在代看:示例会员 A 的报告',records=[...timeline].reverse(),years=[...new Set(records.map(d=>d.slice(0,4)))];if(key==='history'){v=`<h1>历次报告</h1>${years.map(y=>`<h2>${y} 年</h2>${records.filter(d=>d.startsWith(y)).map(d=>`<article><small>${who}</small><div class="row"><b>${d}</b><a href="#${d}">${dates.includes(d)?'查看报告(含示例 PDF)':'查看指标记录(无 PDF)'} →</a></div></article>`).join('')}`).join('')}<a href="#home">返回会员首页</a>`}else if(idx<0&&timeline.includes(key)){const i=timeline.indexOf(key);v=`<h1>年度指标记录</h1><p>${who} · ${key}</p><article><small>虚构会员 · 演示数据</small><h2>本次检测指标</h2>${Object.entries(demo).map(([m,values])=>`<p class="row"><span>${m}</span><b>${values[i]??'无记录'}</b></p>`).join('')}<small>本次仅有演示指标记录,未附原始报告 PDF。</small></article><a href="#history">← 返回历次报告</a>`}else if(idx>=0){v=`<h1>免疫检测报告</h1><p>${who} · ${key}</p><article><h2>原始报告</h2><p>核对成员和检测日期后,可打开本次归档文件。</p><a class="btn" href="sample-${key}.pdf">打开原始 PDF(示例)</a></article><article><h2>历次免疫指标</h2><small>虚构数值,仅演示读图,不是 PDF 检测结果。</small><p><label>选择指标 <select id="metric" onchange="plot()"></select></label></p><label>时间范围 <select id="range" onchange="plot()"><option value="all">全部记录</option><option value="5">近 5 年</option></select></label><div id="plot" aria-live="polite"></div></article><article><h2>铭道医疗 · 报告解读</h2><p>此处展示铭道医疗对本次检测的专业解读。当前为虚构报告,不提供医学结论。</p></article><article><h2>本次健康管理方案</h2>${idx===0?`<small>示例会员 A · 2026-09-16 检测|铭道定制 · 已发布(演示)</small><p>下次沟通前,请准备本次和上次的报告,记下希望了解的指标,由健康管理团队逐项说明。</p><details><summary>需要进一步沟通?查看可选服务</summary><p>如需单独预约,可了解「免疫检测报告专家解读」。无需购买即可查询报告和方案。</p><a class="btn" href="../app.html#c4:~:text=免疫检测报告专家解读">到商城查看这项服务 →</a></details>`:`<small>示例会员 A · ${key} 检测</small><p>本次方案待发布。原始报告仍可正常查阅。</p>`}</article><a href="#history">← 返回历次报告</a>`}else{v=`<article class="hero"><svg aria-hidden="true" width="64" height="52" viewBox="0 0 76 62" style="float:right" fill="#dce8d4" stroke="#28584b" stroke-width="1.7" stroke-linejoin="round" stroke-linecap="round"><path d="M14 7l34-2 13 13-2 37-46 2Z"/><path fill="#fffdf3" d="M48 5l-1 15 14-2"/><path fill="none" d="M22 27l25-1m-26 8 30-1m-30 8 20-1"/></svg><small>${who}</small><h1>最新报告</h1><p>检测日期 <b>${dates[0]}</b></p><a class="btn" href="#${dates[0]}">查看本次报告 →</a></article><article><svg aria-hidden="true" width="64" height="52" viewBox="0 0 76 62" style="float:right" fill="#dce8d4" stroke="#28584b" stroke-width="1.7" stroke-linejoin="round" stroke-linecap="round"><path d="M6 19l2-9 23-1 6 7 28-1 1 34-58 4Z"/><path fill="#fffdf3" d="M15 21l1-8 22 1 2 6 19-1-1 25-44 1Z"/><path d="M7 28l62-5-6 29-53 3Z"/><path d="M20 37l21-2"/></svg><b>历次报告</b><br><small>${years[years.length-1]}–${years[0]} 年 · ${years.length} 个年度</small><br><a href="#history">按年份查报告 →</a></article>`}document.querySelector('#view').innerHTML=v;window.scrollTo(0,0)}let owner=true,allowed=false;
- function render(){const view=document.querySelector('#view');if(!owner&&!allowed){view.innerHTML='<article><h1>暂无代看权限</h1><p>同属一个家庭不会自动获得报告查看权。请由示例会员 A 本人授权。</p></article>'}else{draw();if(!owner){view.innerHTML=view.innerHTML.replaceAll('本人 · 示例会员 A','示例会员 A(家人 B 代看)').replaceAll('示例会员 A(本人)','示例会员 A(家人 B 代看)').replaceAll('我的检测报告','A 的检测报告')}}view.insertAdjacentHTML('beforeend',`<article><small>审阅工具 · 模拟身份,不是真实登录</small><h2>${owner?'本人 A':'家人 B'}视角</h2><p>报告属于 A。当前${allowed?'已授权 B 查看历次报告和原件':'未授权 B 代看'}。</p>${owner?`<button id="consent">${allowed?'撤销 B 的代看授权':'授权 B 代看报告'}</button> `:''}<button id="role">切换为${owner?'家人 B':'本人 A'}</button></article>`);document.querySelector('#role').onclick=()=>{owner=!owner;render()};if(owner)document.querySelector('#consent').onclick=()=>{allowed=!allowed;render()}}
- // 虚构会员年度演示记录;已有报告中的缺项保留为空。
- const timeline=['2016-09-08','2017-09-13','2018-09-14','2019-09-11','2020-09-10','2021-09-09','2022-09-15','2023-09-13','2024-09-19','2025-09-12','2026-09-16'];
- const demo={'NK 细胞比例(%)':[13.8,14.2,9.6,11.3,18.7,21.1,17.4,10.5,13.6,12,15],'NK 绝对计数(个/μL)':[208,215,null,172,286,307,251,164,null,null,218],'CD3 比例(%)':[67.4,65.8,71.3,72.1,65.2,61.8,63.6,70.9,68.1,64,67],'CD4 比例(%)':[38.1,36.7,39.2,43.4,40.6,35.2,33.7,38.8,39.1,35,37],'CD8 比例(%)':[24.2,23.6,27.9,24.8,20.3,21.5,25.2,27.6,24.1,25,24],'B 细胞比例(%)':[12.1,14.2,13.7,9.8,null,10.6,13.9,15.2,null,null,null]};
- function plot(){const key=document.querySelector('#metric').value,end=location.hash.slice(1),year=+end.slice(0,4),start=document.querySelector('#range').value==='5'?year-4:2016,unit=key.includes('绝对')?'个/μL':'%',root=document.querySelector('#plot');
- const rows=timeline.map((d,i)=>({d,v:demo[key][i],y:+d.slice(0,4)})).filter(o=>o.d<=end&&o.y>=start),pts=rows.filter(o=>o.v!=null),max=Math.max(1,...pts.map(o=>o.v))*1.2,x=y=>24+252*(y-start)/(year-start),h=v=>94-76*v/max;
- const years=Array.from({length:year-start+1},(_,i)=>start+i),W=46+52*years.length,X=y=>45+52*(y-start),step=unit==='%'?(max>45?20:5):100,top=Math.max(step,Math.ceil(max/step)*step),Y=v=>144-112*v/top;
- let path='',prev=null;for(const o of rows){if(o.v==null){prev=null;continue}if(prev)path+=`M${X(prev.y)} ${Y(prev.v)} L${X(o.y)} ${Y(o.v)} `;prev=o}
- root.innerHTML=`<div style="padding:14px 0 8px;border-top:1px solid #cddbd2;margin-top:14px"><small>虚构会员 A · 演示数据</small><h3 style="margin:4px 0;color:#0c3b36">${key}</h3><small>${start}–${year} 年度趋势 · ${pts.length} 次有记录</small></div><div tabindex="0" aria-label="年度趋势图,可横向滑动" style="overflow-x:auto;border-radius:12px;background:linear-gradient(#edf5ef,#fafcf9);border:1px solid #dce7df"><svg viewBox="0 0 ${W} 180" style="width:100%;min-width:${W}px;display:block" aria-label="逐年标注的检测趋势">${Array.from({length:top/step+1},(_,i)=>i*step).map(v=>`<path d="M34 ${Y(v)}H${W-18}" stroke="#d4e2da" stroke-dasharray="3 4"/><text x="27" y="${Y(v)+4}" text-anchor="end" fill="#54675e" font-size="11">${v}</text>`).join('')}${years.map(y=>`<text data-year="${y}" x="${X(y)}" y="169" text-anchor="middle" font-size="12" fill="#243f32">${y}</text>`).join('')}<path d="${path}" fill="none" stroke="#13614f" stroke-width="2.6" stroke-linecap="round"/>${pts.map((o,i)=>`<g role="button" tabindex="0" data-point="${i}" aria-label="${o.d},${o.v} ${unit}" style="cursor:pointer"><circle cx="${X(o.y)}" cy="${Y(o.v)}" r="17" fill="transparent"/><text x="${X(o.y)}" y="${Y(o.v)-12}" text-anchor="middle" fill="#125546" font-size="13" font-weight="600">${o.v}</text><circle cx="${X(o.y)}" cy="${Y(o.v)}" r="4" fill="#19654f" stroke="white" stroke-width="1.5"/></g>`).join('')}</svg></div><small>点选数据查看当次记录 · 左右滑动查看往年,缺测年份不连线</small><p id="pointDetail" style="border-left:3px solid #88a895;background:#f3f7f3;padding:10px 14px">${pts.length?'':'该时段无此指标的检测结果。'}</p>`;
- const viewport=root.querySelector("svg").parentElement;viewport.scrollLeft=viewport.scrollWidth;
- function show(i){const o=pts[i];root.querySelectorAll('[data-point]').forEach((g,j)=>g.lastElementChild.setAttribute('r',j===i?6:4));root.querySelector('#pointDetail').innerHTML=`${o.d} · <b>${o.v} ${unit}</b><br>${dates.includes(o.d)?`<a href="sample-${o.d}.pdf">打开当次示例 PDF</a>`:'示例检测记录 · 未附 PDF'}`}
- root.querySelectorAll('[data-point]').forEach((g,i)=>{g.onclick=()=>show(i);g.onkeydown=e=>{if(['Enter',' '].includes(e.key)){e.preventDefault();show(i)}}});if(pts.length)show(pts.length-1)}
- const originalRender=render;render=function(){originalRender();const el=document.querySelector('#metric');if(el){el.innerHTML=Object.keys(demo).map(m=>`<option>${m}</option>`).join('');plot();addFollowup()}};
- function addFollowup(){if(!owner)return;const date=location.hash.slice(1),plan=[...document.querySelectorAll('#view article')].find(a=>a.querySelector('h2')?.textContent==='本次健康管理方案');if(!plan)return;const key='md-demo-A-followup:'+date;let state={};try{state=JSON.parse(sessionStorage.getItem(key))||{}}catch{}plan.insertAdjacentHTML('beforeend',`<section style="border-top:1px solid #d6ded6;margin-top:18px;padding-top:12px"><svg aria-hidden="true" focusable="false" viewBox="0 0 100 68" width="82" height="56" style="float:right;pointer-events:none" fill="none" stroke="#28584b" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round"><path fill="#dce8d4" stroke="none" d="M6 48Q2 28 30 19T80 16Q99 25 91 44T59 58Q24 68 6 48Z"/><g transform="rotate(-8 35 30)"><path fill="#f5f6e8" d="M12 5L52 6 50 49 13 48Z"/><text x="18" y="21" stroke="none" fill="#28584b" font-size="12">上次</text><path d="M18 28l26 1m-25 6h15"/></g><g transform="rotate(5 61 40)"><path fill="#fffdf3" d="M41 18L80 17 81 62 39 61Z"/><text x="46" y="36" stroke="none" fill="#28584b" font-size="12">本次</text><path d="M46 42l26 1m-25 5h18M68 21v-8q3-7 7-1v13q-2 5-5 1v-9"/></g></svg><h3>随访准备</h3>${date===dates[0]?'<label><input id="prepared" type="checkbox"> 两份报告已备好</label>':'<p>本次尚无随访约定。</p>'}<svg aria-hidden="true" focusable="false" viewBox="0 0 100 68" width="82" height="56" style="float:right;pointer-events:none" fill="none" stroke="#28584b" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round"><path fill="#dce8d4" stroke="none" d="M6 48Q2 28 30 19T80 16Q99 25 91 44T59 58Q24 68 6 48Z"/><path fill="#fffdf2" d="M17 19Q36 16 66 18L68 51 57 60 18 59Z"/><path d="M57 60l1-10 10 1M25 40l22-1m-22 8 26-1"/><path fill="#b5cbaa" d="M43 33l6-12L78 3q4-1 6 6L54 30Z"/><path d="M49 21l5 9m-11 3 5-2-3-3m8-4L79 7M26 33q5-4 8-1t7-1"/></svg><h3><label for="myQuestion">我想问铭道什么</label></h3><textarea id="myQuestion" maxlength="240" rows="3" style="width:100%;font:inherit" placeholder="例如:两次报告里的 NK 比例可以直接比较吗?"></textarea><small>仅本人演示视角可见。本标签页暂存,不发给医生。请勿填写真实健康资料。</small><div><button id="saveQuestion" style="background:#125546;color:white;border:0;border-radius:8px;padding:9px 15px">暂存问题</button> <button type="button" id="copyQuestion">复制问题</button> <button id="clearQuestion" style="border:0;background:transparent;color:#51665a;text-decoration:underline;padding:9px">清除</button></div><small role="status" id="noteStatus"></small></section>`);const q=document.querySelector('#myQuestion'),ready=document.querySelector('#prepared'),msg=document.querySelector('#noteStatus');q.value=state.note||'';const saved='已暂存 · 未发送';function status(){msg.textContent=q.value.trim()!==(state.note||'')?'有修改,尚未暂存':state.note?saved:''}q.oninput=status;status();if(ready)ready.checked=!!state.ready;function save(text){try{sessionStorage.setItem(key,JSON.stringify(state));msg.textContent=text}catch{msg.textContent='当前浏览器无法暂存,请勿关闭本页。'}}if(ready)ready.onchange=()=>{state.ready=ready.checked;save(q.value.trim()!==(state.note||'')?'准备状态已更新;问题尚未暂存':state.note?saved:'准备状态已更新。')};document.querySelector('#saveQuestion').onclick=()=>{if(!q.value.trim()){msg.textContent='请先填写问题,或使用清除。';return}state.note=q.value.trim();save(saved)};document.querySelector('#copyQuestion').onclick=async()=>{const text=q.value.trim();if(!text){msg.textContent='请先填写要复制的问题。';q.focus();return}try{await navigator.clipboard.writeText(text);msg.textContent='已复制,请到微信粘贴发送。'}catch{q.focus();q.select();msg.textContent='请手动复制已选中的问题,再到微信粘贴发送。'}};document.querySelector('#clearQuestion').onclick=()=>{state.note='';q.value='';save('便笺已清除。')}}window.onhashchange=render;render()</script></html>
|