import{u as y}from"./index-D5j8_FJt.js";import{X as l,Y as f,Z as e,j as a,a1 as r,k as n,S as i,N as _,_ as d,F as h,$ as V,a2 as S,a6 as b,a7 as k}from"./vendor-vue-wu2SJQxD.js";import{_ as v,c as I,f as c,g as w,h as C,d as T,V as E,p as N,q as z,r as B,t as D,o as L,e as j}from"./index-CsRk2AqG.js";import{V as A}from"./VAlert-BgQXBXzr.js";import"./dataProvider-CZSEeRvI.js";import"./vendor-utils-DwjQ18Dh.js";import"./serverRotation-BLypxz6S.js";import"./VChip-CViYTCJs.js";import"./vendor-vuetify-BaOIwHiz.js";import"./VTabs-en0Hjjsr.js";import"./VTable-DHe0WZnJ.js";import"./VTooltip-BqDuOSRz.js";import"./VTextField-Bo6WlR6l.js";import"./soundList-D9U-Grcp.js";import"./VSwitch-BvFHuUFC.js";import"./VContainer-C6YXnkuM.js";import"./socketClient-Blqw7kqn.js";import"./vendor-socket-BcxXcwBL.js";import"./deviceEvents-D723j_Z-.js";import"./VAppBarTitle-DFo-aqXW.js";import"./VRow-DHfYjRE7.js";const q={name:"ExamScheduleCard",props:{examId:{type:String,required:!0},contentStyle:{type:Object,default:()=>({})}},computed:{...k(y,["exams","loadingDetails"]),exam(){return this.exams[this.examId]},loading(){return this.loadingDetails[this.examId]}},mounted(){this.fetchExam(this.examId)},methods:{...b(y,["fetchExam"]),formatTime(m){if(!m)return"";try{const t=new Date(m),u=(t.getMonth()+1).toString().padStart(2,"0"),p=t.getDate().toString().padStart(2,"0"),x=t.getHours().toString().padStart(2,"0"),s=t.getMinutes().toString().padStart(2,"0");return`${u}-${p} ${x}:${s}`}catch{return m}}}},F={class:"text-truncate"},M={key:0,class:"d-flex justify-center align-center fill-height",style:{"min-height":"200px"}},$={class:"d-flex align-center mb-1"},H={class:"font-weight-medium"},O={class:"d-flex align-center"},P={class:"font-weight-medium"},X={key:2,class:"d-flex flex-column align-center justify-center fill-height text-grey mt-4"};function Y(m,t,u,p,x,s){return l(),f(j,{class:"fill-height d-flex flex-column rounded-xl",elevation:"2"},{default:e(()=>[a(I,{class:"d-flex align-center py-3 px-4 bg-primary text-white"},{default:e(()=>{var o;return[a(c,{class:"mr-2"},{default:e(()=>[...t[1]||(t[1]=[r("mdi-calendar-clock",-1)])]),_:1}),n("span",F,i(((o=s.exam)==null?void 0:o.examName)||"加载中..."),1),a(w),a(C,{icon:"mdi-close",variant:"text",density:"comfortable",onClick:t[0]||(t[0]=g=>m.$emit("close"))})]}),_:1}),a(T,{class:"flex-grow-1 pa-4 overflow-y-auto",style:_(u.contentStyle)},{default:e(()=>[s.loading?(l(),d("div",M,[a(E,{indeterminate:"",color:"primary"})])):s.exam?(l(),d(h,{key:1},[s.exam.message?(l(),f(A,{key:0,color:"info",variant:"tonal",class:"mb-4 text-body-1",border:"start",density:"compact"},{default:e(()=>[r(i(s.exam.message),1)]),_:1})):V("",!0),a(N,{density:"comfortable",class:"pa-0 bg-transparent"},{default:e(()=>[(l(!0),d(h,null,S(s.exam.examInfos,(o,g)=>(l(),f(z,{key:g,class:"px-0 mb-3"},{prepend:e(()=>[a(L,{color:"primary",variant:"tonal",size:"large",class:"mr-3 font-weight-bold elevation-1"},{default:e(()=>[r(i(o.name.charAt(0)),1)]),_:2},1024)]),default:e(()=>[a(B,{class:"font-weight-bold text-h6 mb-1"},{default:e(()=>[r(i(o.name),1)]),_:2},1024),a(D,{class:"text-body-1"},{default:e(()=>[n("div",$,[a(c,{size:"small",color:"success",class:"mr-2"},{default:e(()=>[...t[2]||(t[2]=[r("mdi-clock-start",-1)])]),_:1}),n("span",H,i(s.formatTime(o.start)),1)]),n("div",O,[a(c,{size:"small",color:"error",class:"mr-2"},{default:e(()=>[...t[3]||(t[3]=[r("mdi-clock-end",-1)])]),_:1}),n("span",P,i(s.formatTime(o.end)),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1})],64)):(l(),d("div",X,[a(c,{size:"large",class:"mb-2"},{default:e(()=>[...t[4]||(t[4]=[r("mdi-alert-circle-outline",-1)])]),_:1}),t[5]||(t[5]=r(" 无法加载考试信息 ",-1))]))]),_:1},8,["style"])]),_:1})}const ft=v(q,[["render",Y],["__scopeId","data-v-52dc8ca5"]]);export{ft as default};
