teacher-attendDetail.6e701ddd.js 7.8 KB

1
  1. import{d as X,ag as Z,aV as tt,R as m,f as at,$ as ot,c as t,ah as i,q as e,a5 as _,F as p,k as v,o as V,m as st}from"./index.ffe80dbe.js";import{c as et}from"./clock-icon.6fd57365.js";import{s as d,e as g}from"./success-icon.245b8694.js";import{d as nt}from"./default-icon.11fd2315.js";import{s as it,p as lt}from"./phone-icon.7f60c6fb.js";import{O as ut}from"./index.a0ef77e4.js";import{m as ct}from"./msg-icon.adf37f7b.js";import{t as j}from"./index.931cf0b8.js";import{A as rt}from"./index.84851ef1.js";import"./index.1d5c6f70.js";const mt="_itemWrap_1yhd9_1",pt="_itemWrapTopCard_1yhd9_5",dt="_itemWrapTop_1yhd9_5",gt="_itemWrapTopLeft_1yhd9_19",_t="_clockWrap_1yhd9_24",vt="_leftTimer_1yhd9_34",ft="_itemWrapTopRight_1yhd9_40",ht="_itemWrapBottom_1yhd9_44",It="_msgIcon_1yhd9_51",Tt="_courseInfo_1yhd9_58",Lt="_headImgs_1yhd9_63",Wt="_infoMsg_1yhd9_70",yt="_infoMsgMain_1yhd9_70",Mt="_infoMsgSub_1yhd9_76",bt="_infoMsgSubTeacher_1yhd9_87",At="_attBackInfo_1yhd9_90",Dt="_attInfo_1yhd9_93",St="_attInfoDot_1yhd9_99",Rt="_attInfoDotTitle_1yhd9_104",Bt="_signTime_1yhd9_117",Ct="_textWidth_1yhd9_126",Ot="_attRang_1yhd9_135",Nt="_locP_1yhd9_145",Ft="_passWrap_1yhd9_150",kt="_goWrap_1yhd9_153",Ht="_error_1yhd9_156",Pt="_pass_1yhd9_150",wt="_itemBottomMain_1yhd9_172",Et="_itemBottomSub_1yhd9_180",xt="_bottomTitle_1yhd9_193",Yt="_bottomTitleLeft_1yhd9_207",$t="_cross_1yhd9_220",qt="_bottomConent_1yhd9_223",Vt="_bottomImgWrap_1yhd9_229",jt="_bottomConentLeft_1yhd9_238",Gt="_bottomConentRight_1yhd9_239";var a={itemWrap:mt,itemWrapTopCard:pt,itemWrapTop:dt,itemWrapTopLeft:gt,clockWrap:_t,leftTimer:vt,itemWrapTopRight:ft,itemWrapBottom:ht,msgIcon:It,courseInfo:Tt,headImgs:Lt,infoMsg:Wt,infoMsgMain:yt,infoMsgSub:Mt,infoMsgSubTeacher:bt,attBackInfo:At,attInfo:Dt,attInfoDot:St,attInfoDotTitle:Rt,signTime:Bt,textWidth:Ct,attRang:Ot,locP:Nt,passWrap:Ft,goWrap:kt,error:Ht,pass:Pt,itemBottomMain:wt,itemBottomSub:Et,bottomTitle:xt,bottomTitleLeft:Yt,cross:$t,bottomConent:qt,bottomImgWrap:Vt,bottomConentLeft:jt,bottomConentRight:Gt},ea=X({props:["item"],name:"teacher-attendDetail",setup(Ut){Z();const G=tt(),U=()=>{};m(0);const o=m({}),u=m(at.platformApi);console.log(u.value);const c=m(!1),z=()=>{c.value=!0},l=()=>{c.value=!1},J=async()=>{try{await v({api:"joinChatGroup",content:{type:"single",id:o.value.imUserId}}),l()}catch{V("\u53D1\u8D77\u804A\u5929\u5931\u8D25"),l()}},K=async()=>{try{await v({api:"callPhone",content:{phone:o.value.teacherPhone}}),l()}catch{V("\u62E8\u53F7\u5931\u8D25"),l()}},Q=async()=>{try{const n=await st.post(`${u.value}/courseSchedule/teacherAttendance/course/${G.query.courseScheduleId}`,{});o.value=n.data}catch(n){console.log(n)}};ot(()=>{Q()});const f=async n=>{if(!!n)try{await v({api:"sourseMapApi",content:{type:"display",orginPoint:o.value.schoolLongitudeLatitude,myPoint:n,limitDistance:o.value.scopeOfAttendance}})}catch(r){console.log(r)}};return()=>{var n,r,h,I,T,L,W,y,M,b,A,D,S,R,B,C,O,N,F,k,H,P,w,E,x,Y,$,q;return t(p,null,[t(ut,null,null),t("div",{class:a.itemWrap,onClick:U},[t("div",{class:a.itemWrapTopCard},[t("div",{class:a.itemWrapTop},[t("div",{class:a.itemWrapTopLeft},[t("div",{class:a.clockWrap},[t("img",{src:et,alt:""},null)]),t("p",{class:a.leftTimer},[i((n=o.value)==null?void 0:n.startTime).format("YYYY-MM-DD HH:mm"),"~",i((r=o.value)==null?void 0:r.endTime).format("HH:mm")])]),t("div",{class:a.itemWrapTopRight},null)]),t("div",{class:a.itemWrapBottom},[t("div",{class:a.courseInfo},[t("img",{class:a.headImgs,src:o.value.teacherAvatar?o.value.teacherAvatar:nt,alt:""},null),t("div",{class:a.infoMsg},[t("p",{class:a.infoMsgMain},[(h=o.value)==null?void 0:h.classGroupName,e("-"),(I=o.value)==null?void 0:I.teacherName]),t("p",{class:[a.infoMsgSub,u.value=="/api-teacher"?a.infoMsgSubTeacher:""]},[(T=o.value)==null?void 0:T.orchestraName])])]),u.value=="/api-teacher"?null:t("div",{class:a.msgIcon,onClick:s=>{s.stopPropagation(),s.preventDefault(),z()}},[t("img",{src:ct,alt:""},null)])])]),t("div",{class:a.attInfo},[t("div",{class:((L=o.value)==null?void 0:L.signInStatus)==="NORMAL"?a.passWrap:a.goWrap},[t("div",{class:a.attInfoDot},[t("div",{class:a.attInfoDotTitle},[t("span",null,[e("\u4E0A\u8BFE\u65F6\u95F4 "),t("span",null,[i((W=o.value)==null?void 0:W.startTime).format("HH:mm")])]),t("img",{src:((y=o.value)==null?void 0:y.signInStatus)==="NORMAL"?d:g,alt:""},null)]),t("p",{class:a.signTime},[(M=o.value)!=null&&M.signInTime?t("div",{class:a.textWidth},[((b=o.value)==null?void 0:b.signInStatus)==="NORMAL"?"\u7B7E\u5230\u65F6\u95F4":j[(A=o.value)==null?void 0:A.signInStatus]]):"",(D=o.value)!=null&&D.signInTime?t("span",null,[i((S=o.value)==null?void 0:S.signInTime).format("HH:mm:ss")]):"\u672A\u7B7E\u5230"])])]),t("div",{class:((R=o.value)==null?void 0:R.signInLongitudeLatitudeStatus)==="NORMAL"?a.passWrap:a.goWrap},[t("div",{class:a.attInfoDot},[t("div",{class:a.attInfoDotTitle},[t("span",null,[e("\u7B7E\u5230\u5B9A\u4F4D")]),t("img",{src:((B=o.value)==null?void 0:B.signInLongitudeLatitudeStatus)==="NORMAL"?d:g,alt:""},null)]),t("div",{class:a.attRang,onClick:()=>{f(o.value.signInLongitudeLatitude)}},[o.value.signInLongitudeLatitude?t("p",null,[((C=o.value)==null?void 0:C.signInLongitudeLatitudeStatus)==="NORMAL"?"\u8003\u52E4\u8303\u56F4\u5185":"\u8003\u52E4\u8303\u56F4\u5916"]):t("p",null,[e("\u6682\u65E0\u5B9A\u4F4D")]),o.value.signInLongitudeLatitude?t("p",{class:[a.locP,((O=o.value)==null?void 0:O.signInLongitudeLatitudeStatus)==="NORMAL"?a.pass:a.error]},[e("\u67E5\u770B\u5B9A\u4F4D"),t(_,{name:"arrow",class:a.arrow},null)]):null])])])]),t("div",{class:[a.attInfo,a.attBackInfo]},[t("div",{class:((N=o.value)==null?void 0:N.signOutStatus)==="NORMAL"?a.passWrap:a.goWrap},[t("div",{class:a.attInfoDot},[t("div",{class:a.attInfoDotTitle},[t("p",null,[e("\u4E0B\u8BFE\u65F6\u95F4 "),t("span",null,[i((F=o.value)==null?void 0:F.endTime).format("HH:mm")])]),t("img",{src:((k=o.value)==null?void 0:k.signOutStatus)==="NORMAL"?d:g,alt:""},null)]),t("p",{class:a.signTime},[(H=o.value)!=null&&H.signOutTime?t(p,null,[t("div",{class:a.textWidth},[((P=o.value)==null?void 0:P.signOutStatus)==="NORMAL"?"\u7B7E\u9000\u65F6\u95F4":j[(w=o.value)==null?void 0:w.signOutStatus]]),t("span",null,[i((E=o.value)==null?void 0:E.signOutTime).format("HH:mm:ss")])]):"\u672A\u7B7E\u9000"])])]),t("div",{class:((x=o.value)==null?void 0:x.signOutLongitudeLatitudeStatus)==="NORMAL"?a.passWrap:a.goWrap},[t("div",{class:a.attInfoDot},[t("div",{class:a.attInfoDotTitle},[t("span",null,[e("\u7B7E\u9000\u5B9A\u4F4D")]),t("img",{src:((Y=o.value)==null?void 0:Y.signOutLongitudeLatitudeStatus)==="NORMAL"?d:g,alt:""},null)]),t("div",{class:a.attRang,onClick:()=>{f(o.value.signOutLongitudeLatitude)}},[o.value.signOutLongitudeLatitude?t(p,null,[t("p",null,[" ",(($=o.value)==null?void 0:$.signOutLongitudeLatitudeStatus)==="NORMAL"?"\u8003\u52E4\u8303\u56F4\u5185":"\u8003\u52E4\u8303\u56F4\u5916"]),t("p",{class:[a.locP,((q=o.value)==null?void 0:q.signOutLongitudeLatitudeStatus)==="NORMAL"?a.pass:a.error]},[e("\u67E5\u770B\u5B9A\u4F4D"),t(_,{name:"arrow",class:a.arrow},null)])]):t(p,null,[t("p",null,[e("\u6682\u65E0\u5B9A\u4F4D")]),t("p",null,null)])])])])]),t(rt,{class:"bottomSheet",show:c.value,"onUpdate:show":s=>c.value=s},{default:()=>[t("div",{class:a.bottomConent},[t("div",{class:a.bottomConentLeft,onClick:s=>{s.stopPropagation(),s.preventDefault(),J()}},[t("div",{class:a.bottomImgWrap},[t("img",{src:it,alt:""},null)]),t("p",null,[e("\u53D1\u9001\u6D88\u606F")])]),t("div",{class:a.bottomConentRight,onClick:s=>{s.stopPropagation(),s.preventDefault(),K()}},[t("div",{class:a.bottomImgWrap},[t("img",{src:lt,alt:""},null)]),t("p",null,[e("\u62E8\u6253\u7535\u8BDD")])])])],description:()=>t("div",{class:a.bottomTitle},[t("div",{class:a.bottomTitleLeft},[t("span",null,null),t("p",null,[e("\u8054\u7CFB\u65B9\u5F0F")])]),t("div",{class:a.bottomTitleRight,onClick:s=>{s.stopPropagation(),s.preventDefault(),l()}},[t(_,{class:a.cross,name:"cross"},null)])])})])])}}});export{ea as default};