Files
zyt/server/public/admin/assets/AppointmentRecordPanel-DqFL5Tnk.js
T
2026-05-18 15:59:22 +08:00

2 lines
5.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{M as T,N as z,T as C,L as D}from"./element-plus-DFTWCWyi.js";import{a as B}from"./doctor-DvybObQD.js";import{m as E,_ as L}from"./index-Dn8YPxC3.js";import{f as P,w as R,ak as m,I as V,aP as A,G as d,aN as n,a as s,O as r,J as c}from"./@vue/runtime-core-C6bnekPw.js";import{Q as l}from"./@vue/shared-mAAVTE9n.js";import{n as w}from"./@vue/reactivity-DiY1c2vO.js";import"./@vue/runtime-dom-DDAG46FW.js";import"./lodash-D3kF6u-c.js";import"./@element-plus/icons-vue-HOEUG8sr.js";import"./lodash-es-C2A-Pj28.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-QlpZ4wdW.js";import"./pinia-B8cvXbiZ.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-1S4fJlii.js";import"./@vueuse/shared-Cl3lVqjz.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-CNLwa9wG.js";import"./tslib-BDyQ-Jie.js";import"./zrender-DRNXw7y3.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-C4onkBvW.js";const M={class:"appointment-record-panel"},$={class:"cell-stack"},G={class:"font-medium"},J={class:"text-gray-500 text-sm"},O={class:"cell-stack"},Q={class:"text-gray-500 text-sm"},j=P({__name:"AppointmentRecordPanel",props:{diagnosisId:{}},setup(y,{expose:b}){const u=y,_=w(!1),g=w([]),h=w({});function x(t){return t?String(t).length>=8?String(t).slice(0,5):t:""}function k(t){return t==="morning"?"上午":t==="afternoon"?"下午":t==="all"?"全天":t||"—"}function S(t){const o=t.channel_source??t.channels??"";if(o===""||o===null||o===void 0)return"—";const a=String(o),i=h.value[a]||a,p=String(t.channel_source_detail??"").trim();return p!==""?`${i}${p}`:i}function I(t){return[...t].sort((o,a)=>{const i=String(o.appointment_date||""),p=String(a.appointment_date||"");if(i!==p)return p.localeCompare(i);const f=String(o.appointment_time||""),e=String(a.appointment_time||"");return f!==e?e.localeCompare(f):Number(a.id||0)-Number(o.id||0)})}const N=async()=>{try{const t=await E({type:"channels"}),o=((t==null?void 0:t.channels)||[]).filter(i=>i.status!==0),a={};for(const i of o)i.value!=null&&(a[String(i.value)]=i.name||String(i.value));h.value=a}catch{h.value={}}},v=async()=>{if(u.diagnosisId){_.value=!0;try{await N();const t=await B({patient_id:u.diagnosisId,diag_scope_relax:1,page_no:1,page_size:500}),o=(t==null?void 0:t.lists)||[];g.value=I(o)}catch(t){console.error(t),g.value=[]}finally{_.value=!1}}};return R(()=>u.diagnosisId,()=>{v()},{immediate:!0}),b({refresh:v}),(t,o)=>{const a=z,i=C,p=T,f=D;return m(),V("div",M,[A((m(),d(p,{data:g.value,border:"",stripe:"","empty-text":"暂无挂号记录"},{default:n(()=>[s(a,{label:"ID",prop:"id",width:"72",align:"center"}),s(a,{label:"状态",width:"100",align:"center"},{default:n(({row:e})=>[s(i,{type:e.status===1?"success":e.status===2?"info":e.status===3?"primary":"danger",size:"small",effect:"light"},{default:n(()=>[r(l(e.status_desc||"—"),1)]),_:2},1032,["type"])]),_:1}),s(a,{label:"患者(挂号人)","min-width":"150"},{default:n(({row:e})=>[c("div",$,[c("span",G,l(e.patient_name||"—"),1),c("span",J,l(e.patient_phone||""),1)])]),_:1}),s(a,{label:"挂号医生",prop:"doctor_name",width:"110","show-overflow-tooltip":""}),s(a,{label:"挂号助理",width:"110","show-overflow-tooltip":""},{default:n(({row:e})=>[r(l(e.assistant_name||"—"),1)]),_:1}),s(a,{label:"预约时间","min-width":"130"},{default:n(({row:e})=>[c("div",O,[c("span",null,l(e.appointment_date||"—"),1),c("span",Q,l(x(e.appointment_time)),1)])]),_:1}),s(a,{label:"时段",width:"80",align:"center"},{default:n(({row:e})=>[r(l(k(e.period)),1)]),_:1}),s(a,{label:"类型",width:"100","show-overflow-tooltip":""},{default:n(({row:e})=>[r(l(e.appointment_type_desc||"—"),1)]),_:1}),s(a,{label:"渠道",width:"110","show-overflow-tooltip":""},{default:n(({row:e})=>[r(l(S(e)),1)]),_:1}),s(a,{label:"确认诊单",width:"92",align:"center"},{default:n(({row:e})=>[e.diagnosis_confirmed?(m(),d(i,{key:0,type:"success",size:"small",effect:"plain"},{default:n(()=>[...o[0]||(o[0]=[r("已确认",-1)])]),_:1})):(m(),d(i,{key:1,type:"warning",size:"small",effect:"plain"},{default:n(()=>[...o[1]||(o[1]=[r("未确认",-1)])]),_:1}))]),_:1}),s(a,{label:"开方",width:"80",align:"center"},{default:n(({row:e})=>[e.has_prescription?(m(),d(i,{key:0,type:"success",size:"small",effect:"plain"},{default:n(()=>[...o[2]||(o[2]=[r("已开方",-1)])]),_:1})):(m(),d(i,{key:1,type:"info",size:"small",effect:"plain"},{default:n(()=>[...o[3]||(o[3]=[r("未开方",-1)])]),_:1}))]),_:1}),s(a,{label:"备注",prop:"remark","min-width":"100","show-overflow-tooltip":""}),s(a,{label:"创建时间",width:"165",prop:"create_time"})]),_:1},8,["data"])),[[f,_.value]])])}}}),Ct=L(j,[["__scopeId","data-v-4de87dfa"]]);export{Ct as default};