1 |
- import{s as a,S as W}from"./skeletion-index-modal-f26dfd49.js";import{i as E}from"./icon-teacher-default-a5bec550.js";import{i as d}from"./icon-check-active-15efb9a0.js";import{i as p}from"./icon-warn-15c4cc5c.js";import{d as C,O as T,o as L,w as F,g as s,i as G,R as k,h as o,S as w,I,T as B,W as x,a as y,N as M}from"./index-1d4a9afa.js";import{S as b,a as l,b as h}from"./index-fc00eb76.js";import{C as D}from"./index-b8090118.js";import{C as i}from"./index-a27d7671.js";import{c as m,t as R}from"./constant-a400d214.js";import{D as H}from"./drop-down-modal-3282bbb5.js";import{I as q}from"./index-c272bcfa.js";import{D as V,a as A}from"./index-ab43c325.js";import"./index-6d1e9935.js";import"./index-22c9ea74.js";import"./use-tab-status-a36febbc.js";const P=C({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2]}},setup(n,{slots:u}){const c=T({loading:!1});return L(()=>{c.loading=n.show}),F(()=>n.show,()=>{c.loading=n.show}),()=>s(b,{loading:c.loading,style:"flex-wrap: wrap"},{template:()=>s("div",{style:{height:"calc(100vh - var(--header-height))",overflow:"hidden",width:"100%"}},[n.showCount.map(()=>s(D,{inset:!0,class:a.detailCellGroup},{default:()=>[s(i,{center:!0,border:!1,class:[a.className,a.skeletionTitle]},{title:()=>s(l,{rowWidth:"50%"},null),value:()=>s(l,null,null)}),s(i,{center:!0},{default:()=>[s("div",{class:a.detailGroup},[s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s(l,{rowWidth:"40%"},null),s(h,{class:a.img},null)]),s("div",{class:a.sign},[s(l,{rowWidth:"40%"},null),s(l,{rowWidth:"40%"},null)])]),s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s(l,{rowWidth:"40%"},null),s(h,{class:a.img},null)]),s("div",{class:a.sign},[s(l,{rowWidth:"40%"},null),s(l,{rowWidth:"40%"},null)])]),s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s(l,{rowWidth:"40%"},null),s(h,{class:a.img},null)]),s("div",{class:a.sign},[s(l,{rowWidth:"40%"},null),s(l,{rowWidth:"40%"},null)])]),s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s(l,{rowWidth:"40%"},null),s(h,{class:a.img},null)]),s("div",{class:a.sign},[s(l,{rowWidth:"40%"},null),s(l,{rowWidth:"40%"},null)])])])]})]}))]),default:()=>u.default&&u.default()})}}),ls=C({name:"teacher-attendance-detail",setup(){const n=G(),u=x(),c=M(),e=T({teacherId:u.query.teacherId,classGroupId:u.query.classGroupId,listState:{loading:!0,loadingList:!0,dataShow:!0,refreshing:!1},classColumns:[{text:"全部状态",value:""},{text:"正常",value:"1"},{text:"异常",value:"0"}],typeColumns:[{text:"全部类型",value:""}],params:{courseType:"",signStatus:""},teacherInfo:{},list:[]}),f=t=>{t.value&&t.value.toggle()},N=t=>{if(t==="orchestra"){let r="";return e.typeColumns.forEach(S=>{e.params.courseType===S.value&&(r=S.text)}),r}},O=async()=>{try{const{data:t}=await y.post("/api-web/schoolTeacherAttendance/queryTeacherAttendance",{data:{teacherId:e.teacherId,classGroupId:e.classGroupId}}),r=t||[];e.teacherInfo=r[0]||{}}catch(t){}e.listState.loading=!1},g=async()=>{try{const{data:t}=await y.post("/api-web/schoolTeacherAttendance/getClassTeacherAttendance",{data:{...e.params,teacherId:e.teacherId,classGroupId:e.classGroupId}}),r=t||[];e.list=r||[]}catch(t){}finally{e.listState.dataShow=e.list.length>0,e.listState.refreshing=!1,e.listState.loadingList=!1}},v=t=>{c.push({path:"/amap-gps",query:{sLngLat:t.schoolLongitudeLatitude,inLngLat:t.signInLongitudeLatitude,outLngLat:t.signOutLongitudeLatitude}})};return L(()=>{for(const t in m)if(Object.prototype.hasOwnProperty.call(m,t)){const r=m[t];e.typeColumns.push({text:r,value:t})}O(),g()}),()=>s("div",{class:a.teacherAttendanceDetail},[s(k,null,null),s(W,{show:e.listState.loading,"onUpdate:show":t=>e.listState.loading=t,isLink:!1,showCount:[1]},{default:()=>[s("div",{class:a.cellGroup},[s(i,{center:!0,clickable:!1,class:a.cell},{icon:()=>s(q,{src:e.teacherInfo.teacherAvatar||E,fit:"cover",class:a.iconTeacher},null),title:()=>s("div",{class:a.username},[s("p",{class:a.name},[e.teacherInfo.teacherName]),s("p",{class:a.class},[e.teacherInfo.classGroupName])]),value:()=>s("div",{class:a.attendance},[s("div",{class:[a.attendanceItem,a.weekAttendance]},[s("p",{class:[a.value,e.teacherInfo.teacherAttendanceStatus==="ERR"?a.error:"",e.teacherInfo.teacherAttendanceStatus==="NORMAL"?a.success:""]},[R[e.teacherInfo.teacherAttendanceStatus]||"--"]),s("p",{class:a.title},[o("本周考勤")])]),s("div",{class:[a.attendanceItem,a.classAttendance]},[s("p",{class:[a.value,e.teacherInfo.errCourseNum>0?a.error:a.success]},[e.teacherInfo.errCourseNum,s("span",null,[o("课时")])]),s("p",{class:a.title},[o("学期异常")])])])})])]}),s(V,null,{default:()=>[s(A,{modelValue:e.params.signStatus,"onUpdate:modelValue":t=>e.params.signStatus=t,options:e.classColumns,onChange:()=>{e.listState.dataShow=!0,e.list=[],g()}},null),s(A,{ref:n,title:N("orchestra")},{default:()=>[s(H,{selectValues:e.params.courseType,columns:e.typeColumns,open:n.value.state.showPopup,onDropDownClose:()=>f(n),onDropDownConfirm:t=>{e.params.courseType=t[0],f(n),e.listState.dataShow=!0,e.list=[],g()}},null)]})]}),s(P,{show:e.listState.loadingList,"onUpdate:show":t=>e.listState.loadingList=t},{default:()=>[e.listState.dataShow?e.list.map(t=>s(D,{inset:!0,class:a.detailCellGroup},{default:()=>[s(i,{center:!0,border:!1,class:a.className},{title:()=>s("div",{class:a.class},[m[t.courseScheduleType]]),value:()=>s("div",{class:a.timer},[t.classDate])}),s(i,{center:!0},{default:()=>[s("div",{class:a.detailGroup},[s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s("span",{class:[a.statusName,t.signInStatus?"":a.error]},[t.signInStatus?"正常":"异常"]),s("img",{src:t.signInStatus?d:p,class:a.img},null)]),s("div",{class:a.sign},[s("span",{class:a.signTime},[o("签到时间")," ",t.signInTime?w(t.signInTime).format("HH:mm:ss"):"--"])])]),t.teachMode==="OFFLINE"?s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s("span",{class:[a.statusName,t.signInAddressStatus?"":a.error]},[t.signInAddressStatus?"正常":"异常"]),s("img",{src:t.signInAddressStatus?d:p,class:a.img},null)]),s("div",{class:a.sign},[s("span",{class:a.signTime},[o("签到地点")]),s("span",{class:a.locate,onClick:()=>v(t)},[o("查看定位"),s(I,{name:"arrow",class:a.iconArrow},null)])])]):"",s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s("span",{class:[a.statusName,t.signOutStatus?"":a.error]},[t.signOutStatus?"正常":"异常"]),s("img",{src:t.signOutStatus?d:p,class:a.img},null)]),s("div",{class:a.sign},[s("span",{class:a.signTime},[o("签退时间")," ",t.signOutTime?w(t.signOutTime).format("HH:mm:ss"):"--"])])]),t.teachMode==="OFFLINE"?s("div",{class:a.detailItem},[s("div",{class:a.detailStatus},[s("span",{class:[a.statusName,t.signOutAddressStatus?"":a.error]},[t.signOutAddressStatus?"正常":"异常"]),s("img",{src:t.signOutAddressStatus?d:p,class:a.img},null)]),s("div",{class:a.sign},[s("span",{class:a.signTime},[o("签退地点")]),s("span",{class:a.locate,onClick:()=>v(t)},[o("查看定位"),s(I,{name:"arrow",class:a.iconArrow},null)])])]):""])]})]})):s(B,{style:{minHeight:"calc(60vh)"},description:"暂无数据"},null)]})])}});export{ls as default};
|