import{d as M}from"./teacherIcon-b8e3946d-1716977058336.js";import{e as R}from"./api-812fd62f-1716977058336.js";import{d as x,b as F,e as j,f as e,aL as V,k as l,O as G,h as O,w as D,j as f,l as S,m as P,s as W,c as z,r as h,v as b,P as p,b9 as K,F as L,b7 as J,E as Q}from"./index-70c8ab8f-1716977058336.js";import{T as Y}from"./index-ac3f97d9-1716977058336.js";import{C as q,F as H}from"./index-a5c2a8ef-1716977058336.js";import{v as X}from"./urlUtils-a03c114e-1716977058336.js";const Ue=""+new URL("nosub-edbc4601.png",import.meta.url).href,Me=""+new URL("qualified-5f6fc5ac.png",import.meta.url).href,Re=""+new URL("unqualified-89af2593.png",import.meta.url).href,Z="_commonWork_jydxg_1",$="_downMoveBg_jydxg_8",ee="_dingPng_jydxg_15",te="_closeAble_jydxg_24",ie="_header_jydxg_43",ne="_navatar_jydxg_48",oe="_userInfo_jydxg_61",ae="_textarea_jydxg_76",le="_submitAppBtn_jydxg_92",se="_removeVisiable1_jydxg_103",re="_studentRemove_jydxg_109",ue="_selectBtn_jydxg_120",ce="_btnGroupModal_jydxg_136",s={commonWork:Z,downMoveBg:$,dingPng:ee,closeAble:te,header:ie,navatar:ne,userInfo:oe,textarea:ae,submitAppBtn:le,removeVisiable1:se,studentRemove:re,selectBtn:ue,btnGroupModal:ce},me=""+new URL("common-bg-21ff5439.png",import.meta.url).href,de=""+new URL("common-top-49f36bee.png",import.meta.url).href,fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdFJREFUWEftlr1KA0EQx2eXq0KuFKyCjVZa5TbBIp2CreAbKD6AhZVWWmsn+FGKjYj4AErKbG7vCbSzESsRuSskGdlwCWG5j529IhbZenb+v52d+e8ymPFiM9aHOcD/rIAQQiDiIef8rt/vP1bpk06ns5AkySlj7DMMw2MzV2YFgiC4R8QdAEAA2I+i6MYFIhV/QcRVvd/zvBUp5et0rkyAVqu1PRgMHgBGTeoEYYoDgFRKrTPGdL7Jyu2BZrO5BwBXLhCmOGNM1ev1zW63+2V1BeMgFwiKuNYpnQIKBFXcCkAH2UC4iFsDlEG4ipMA8iBqtdpTkiSTUStquKxRLu0Bc1PGdbwDQGN0moJuz/MRMoBOFATBLiJeG00c+b6/kTVqRSbmBKDvPI5jNT55evoDpdQ51THJAKn4MwCsGWJOjkkCyLDXiDF2i4hnLo5JmoKiUTN6glQJqwrYzLkrRCmAjXiVt6MQgCLuCpEL4CLuApEJUEWcCpH3JbtExH1Xe82B+OWcN8Iw/Cj9EQkhTobD4ZH+Rvm+v0W112mB9O24AIAfz/OWpJTfpQA6oN1uL/d6vTfzD0e1Wh0vhFjknMemOMmIXIRt9pT6gE2SKjFzgD9jrG8wBso1CwAAAABJRU5ErkJggg==",je=x({name:"commit-work",props:{comment:{type:String,default:""},workInfo:{type:Object,default:()=>({})}},emits:["close","confrim"],setup(t,{emit:d}){const c=F(),n=j({removeVisiable1:!1,comment:t.comment,btnLoading:!1,commentRemind:!0}),a=async()=>{if(!n.comment){c.error("请输入评语");return}n.btnLoading=!0;try{await R({comment:n.comment,id:t.workInfo.studentLessonTrainingId}),c.success("点评成功"),d("confrim")}catch(r){}n.btnLoading=!1,n.commentRemind=!0},v=()=>{n.commentRemind&&W.set("isCommentRemind",1),n.removeVisiable1=!1,a()};return()=>e("div",{class:s.commonWork},[e("img",{src:de,class:s.dingPng,alt:""},null),e("img",{src:me,class:s.downMoveBg,alt:""},null),e("img",{src:fe,class:s.closeAble,onClick:()=>{d("close")},alt:""},null),e("h2",null,[t.workInfo.isLook?"修改点评":"点评作业"]),e("div",{class:s.header},[e(V,{class:s.navatar,round:!0,src:t.workInfo.studentAvatar||M},null),e("div",{class:s.userInfo},[e("h3",null,[t.workInfo.studentName]),e("p",null,[l("提交时间:"),t.workInfo.submitTime?G(t.workInfo.submitTime).format("YYYY-MM-DD HH:mm"):"--"])])]),e(O,{class:s.textarea,type:"textarea",rows:12,maxlength:500,showCount:!0,autosize:!1,value:n.comment,"onUpdate:value":r=>n.comment=r,placeholder:"请输入评语…"},null),e(D,{style:{padding:"25px 0 0 0"},justify:"center"},{default:()=>[e(f,{round:!0,type:"default",onClick:()=>d("close")},{default:()=>[l("取消")]}),e(f,{class:s.submitAppBtn,round:!0,type:"primary",loading:n.btnLoading,onClick:a},{default:()=>[l("确定")]})]}),e(S,{show:n.removeVisiable1,"onUpdate:show":r=>n.removeVisiable1=r,preset:"card",class:["modalTitle",s.removeVisiable1],title:"提交评语"},{default:()=>[e("div",{class:s.studentRemove},[e("p",null,[l("评语提交后"),e("span",null,[l("不可修改或删除")]),l(",请确认是否提交")]),e("div",{class:s.selectBtn},[e(P,{checked:n.commentRemind,"onUpdate:checked":r=>n.commentRemind=r},{default:()=>[l("下次不再提醒")]})]),e(D,{class:s.btnGroupModal,justify:"center"},{default:()=>[e(f,{round:!0,onClick:()=>{n.removeVisiable1=!1,n.commentRemind=!0}},{default:()=>[l("取消")]}),e(f,{round:!0,type:"primary",onClick:v},{default:()=>[l("确定")]})]})])]})])}}),ve="_workItem_1h8ow_1",ge="_expireBg_1h8ow_19",_e="_videoSection_1h8ow_33",Ae="_nodata_1h8ow_51",we="_reportBtn_1h8ow_56",he="_type_1h8ow_79",be="_scoreGroup_1h8ow_85",Le="_scoreGroupEval_1h8ow_96",Ce="_trainInfo_1h8ow_99",ke="_trainName_1h8ow_102",ye="_PRACTICE_1h8ow_124",Ee="_EVALUATION_1h8ow_127",Ie="_tagList_1h8ow_130",Be="_reportModel_1h8ow_143",o={workItem:ve,"work-content-disabled":"_work-content-disabled_1h8ow_13",expireBg:ge,"work-content":"_work-content_1h8ow_13",videoSection:_e,nodata:Ae,reportBtn:we,"work-footer":"_work-footer_1h8ow_73",type:he,"title-text":"_title-text_1h8ow_82",scoreGroup:be,scoreGroupEval:Le,trainInfo:Ce,trainName:ke,PRACTICE:ye,EVALUATION:Ee,tagList:Ie,reportModel:Be},Te=""+new URL("nomore-1c66dcbc.png",import.meta.url).href,Ve=x({name:"work-item",props:{item:{type:Object,default:()=>({})}},setup(t){const d=z(),c=F(),n=h(!1),a=h({type:"MUSIC",content:t.item.musicId,title:t.item.musicName,studentName:t.item.studentName}),v=h(""),r=h(!1),U=u=>{if(!u){c.error("下载失败");return}const g=u,_=t.item.musicName+(t.item.studentName?"-"+t.item.studentName:""),A=u.substring(u.lastIndexOf("."));fetch(g).then(m=>m.blob()).then(m=>{H.saveAs(m,(_||new Date().getTime()+"")+A)}).catch(()=>{c.error("下载失败")})};return()=>{var u,g,_,A,m,C,k,y,E,I,B,T,N;return e("div",{class:[o.workItem,(((u=t.item.fileList)==null?void 0:u.expireFlag)||t.item.trainingStatus==="UNSUBMITTED")&&o["work-content-disabled"]]},[e("div",{class:[o["work-content"]],style:{cursor:t.item.trainingStatus==="UNSUBMITTED"?"default":"pointer"}},[!((g=t.item.fileList)!=null&&g.fileType)&&e(b,{src:Te,class:o.nodata,previewDisabled:!0,objectFit:"contain"},null),((_=t.item.fileList)==null?void 0:_.fileType)==="IMG"&&e(b,{src:(A=t.item.fileList)==null?void 0:A.filePath,objectFit:"contain",renderToolbar:({nodes:i})=>[i.prev,i.next,i.rotateCounterclockwise,i.rotateClockwise,i.resizeToOriginalSize,i.zoomOut,e("div",{class:"n-base-icon",onClick:()=>{var w;return U((w=t.item.fileList)==null?void 0:w.filePath)}},[e("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{fill:"currentColor","fill-rule":"nonzero"},[e("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"},null)])])])]),i.close]},null),((m=t.item.fileList)==null?void 0:m.fileType)==="SOUND"&&e("div",{onClick:()=>{var i;a.value.content=(i=t.item.fileList)==null?void 0:i.filePath,a.value.title=t.item.musicName,a.value.type="SONG",n.value=!0}},[e(b,{src:p.SONG_DEFAULT_COVER,previewDisabled:!0,objectFit:"contain"},null)]),((C=t.item.fileList)==null?void 0:C.fileType)==="EVALUATION"&&(K((k=t.item.fileList)==null?void 0:k.content)==="video"?e("div",{class:o.videoSection,onClick:()=>{var i;a.value.content=(i=t.item.fileList)==null?void 0:i.content,a.value.title=t.item.musicName,a.value.type="VIDEO",n.value=!0}},[e("video",{style:{height:"100%"},src:(y=t.item.fileList)==null?void 0:y.content},null)]):e("div",{onClick:()=>{var i;a.value.content=(i=t.item.fileList)==null?void 0:i.content,a.value.title=t.item.musicName,a.value.type="SONG",n.value=!0}},[e(b,{src:p.SONG_DEFAULT_COVER,previewDisabled:!0,objectFit:"contain"},null)])),((E=t.item.fileList)==null?void 0:E.fileType)==="VIDEO"&&e("div",{class:o.videoSection,onClick:()=>{var i;a.value.content=(i=t.item.fileList)==null?void 0:i.filePath,a.value.title=t.item.musicName,a.value.type="VIDEO",n.value=!0}},[e("video",{style:{height:"100%"},src:(I=t.item.fileList)==null?void 0:I.filePath},null)]),((B=t.item.fileList)==null?void 0:B.expireFlag)&&e("div",{class:o.expireBg},[l("文件已过期")]),t.item.recordId&&e(f,{color:"rgba(0,0,0,0.4)",textColor:"#fff",disabled:(T=t.item.fileList)==null?void 0:T.expireFlag,class:o.reportBtn,onClick:()=>{if(!t.item.recordId){c.error("暂无评测记录");return}const i=d.getToken;v.value=X()+"/instrument/#/evaluat-report?id=".concat(t.item.recordId,"&Authorization=").concat(i),r.value=!0}},{default:()=>[l("评测报告")]})]),e("div",{class:o["work-footer"]},[e("div",{class:o.trainInfo},[e("div",{class:o.trainName},[e("span",{class:[o.type,o[t.item.trainingType]]},[t.item.trainingType==="EVALUATION"?"评测":"练习"]),e("div",{class:o["title-text"]},[e(Y,{text:t.item.musicName},null)])]),e("div",{class:o.tagList},[(N=t.item.typeList)==null?void 0:N.map((i,w)=>e(L,null,[e("span",null,[i]),t.item.typeList.length-1>w&&e(J,{vertical:!0},null)]))])]),t.item.trainingType==="EVALUATION"?e("div",{class:[o.scoreGroup,o.scoreGroupEval]},[t.item.trainingStatus!=="UNSUBMITTED"?e(L,null,[t.item.trainingTimes,e("span",null,[l("分")])]):e("span",{class:o.noSubmit},[l("未提交")])]):e("div",{class:[o.scoreGroup]},[t.item.trainingStatus!=="UNSUBMITTED"?e(L,null,[t.item.trainingTimes?parseInt(t.item.trainingTimes/60+""):0,e("span",null,[l("分钟")])]):e("span",{class:o.noSubmit},[l("未提交")])])]),e(q,{show:n.value,"onUpdate:show":i=>n.value=i,item:a.value},null),e(S,{show:r.value,"onUpdate:show":i=>r.value=i,preset:"card",class:["modalTitle background",o.reportModel],title:"评测报告"},{default:()=>[e("div",{class:o.reportContainer,style:{lineHeight:0}},[e("iframe",{width:"100%",height:"450px",frameborder:"0",onLoad:i=>{Q(i.target)},src:v.value},null)])]})])}}});export{je as C,Ve as W,Ue as n,Me as q,Re as u};