2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
|
|
import{d as a,a as e,r as s,c as l,o as t,b as r,e as c,f as o,w as n,i,j as d,t as u,l as f,N as m,m as _,F as p,n as y,P as v,Q as g,D as b,G as x,s as h,y as w,z as k,x as $,u as S,S as C,H as N,q as j}from"./index-CpNRQgjE.js";import{_ as D}from"./config-doctor.TgARj_nM.js";import{F,a as A,r as T,f as M}from"./session.Cc2HEzjU.js";import{_ as E}from"./_plugin-vue_export-helper.BCo6x5W8.js";const I=E(a({__name:"assessment",setup(a){const E=[{label:"病史采集",percent:92,displayScore:"92%",analysis:"问诊逻辑清晰,主诉把握精准。成功识别了诱发因素及既往史。"},{label:"体格检查",percent:85,displayScore:"85%",analysis:"操作规范,但触诊顺序有微小疏漏。建议更注重痛点的动态观察。"},{label:"临床思维",percent:78,displayScore:"78%",analysis:"能够建立初步假设,但在多系统受累时,思维发散性略显不足。"},{label:"诊断准确性",percent:82,displayScore:"82%",analysis:"核心诊断正确。但在鉴别诊断中漏掉了罕见但致死性的并发症。"}],I=e({date:(P=new Date,`${P.getFullYear()}年${P.getMonth()+1}月${P.getDate()}日`),no:"STJ-99283-X",score:88,level:"优良",overallComment:"表现已达到临床住院医师中高级水平。需在复杂病例鉴别诊断上精进。"});var P;const B=s(!1),O=s(""),J=s(!1),q=s(null),z=l((()=>264-264*I.score/100)),G=l((()=>I.overallComment||"本次评价已生成,请结合分项得分继续强化训练。")),H=l((()=>{const a=q.value;return a?Array.isArray(a.dimension_scores)&&a.dimension_scores.length>0?a.dimension_scores.map((a=>{const e=a.max_score>0?L(Number(a.score)/Number(a.max_score)*100):L(Number(a.score)),s=[a.comment,a.improvement?`改进建议:${a.improvement}`:""].filter(Boolean).join(" ");return{label:a.dimension,percent:e,displayScore:a.max_score>0?`${a.score}/${a.max_score}`:`${a.score}%`,analysis:s||"暂无分项解析。"}})):Array.isArray(a.score_details)&&a.score_details.length>0?a.score_details.map((a=>({label:a.dimension,percent:L(Number(a.score)),displayScore:`${a.score}%`,analysis:a.comment||a.deducted_reason||"暂无分项解析。"}))):E:E}));let K=null;function Q(){"function"==typeof v&&v().length>1?g():V()}function V(){b({url:"/pages/home/home"})}function X(){x({url:"/pages/learning-assistant/learning-assistant"})}function Y(a){K&&clearTimeout(K),O.value=a,J.value=!0,K=setTimeout((()=>{J.value=!1}),2200)}function L(a){return Number.isFinite(a)?Math.max(0,Math.min(100,Math.round(a))):0}async function R(){try{const a=M();I.no=`SID-${a}`;const e=await async function(a,e="percentage"){const s=await fetch(`${F}/sessions/${a}/evaluation`,{method:"POST",headers:A(),body:JSON.stringify({score_type:e})});if(!s.ok)throw new Error(await T(s));const l=await s.json();if("OK"!==l.code||!l.data)throw new Error(l.message||"评价生成失败");return l.data}(a,"percentage");h("clinical-thinking-evaluation",e),function(a){var e;q.value=a,I.no=`EV-${a.evaluation_id}`,I.score=L(Number(a.total_score)),I.level=(e=I.score)>=90?"优秀":e>=80?"优良":e>=70?"良好":e>=60?"合格":"待加强",I.overallComment=a.overall_comment||I.overallComment}(e)}catch(a){Y(a instanceof Error?a.message:"评价生成失败")}finally{B.value=!1,j((()=>{setTimeout((()=>{B.value=!0}),120)}))}}return t((()=>{R()})),r((()=>{K&&clearTimeout(K)})),(a,e)=>{const s=w,l=k,t=$,r=S,v=C;return c(),o(s,{class:"assessment-page"},{default:n((()=>[i(s,{class:"top-app-bar"},{default:n((()=>[i(l,{class:"icon-button","aria-label":"返回",onClick:Q},{default:n((()=>[i(s,{class:"back-icon"})])),_:1}),i(t,{class:"app-title"},{default:n((()=>[d("AI 学习助手")])),_:1})])),_:1}),i(v,{class:"report-content","scroll-y":""},{default:n((()=>[i(s,{class:"report-head"},{default:n((()=>[i(t,{class:"report-title"},{default:n((()=>[d("训练总结与 AI 评估报告")])),_:1}),i(s,{class:"report-meta"},{default:n((()=>[i(t,null,{default:n((()=>[d("评估日期:"+u(I.date),1)])),_:1}),i(t,null,{default:n((()=>[d("模拟编号:"+u(I.no),1)])),_:1})])),_:1})])),_:1}),i(s,{class:"content-stack"},{default:n((()=>[i(s,{class:"ove
|