1 |
- import{d as U}from"./teacherIcon-b8e3946d-1720699367816.js";import{e as R}from"./api-ae9134d7-1720699367816.js";import{d as p,b as x,e as G,f as e,aM as V,k as l,Q as O,h as P,x as N,j as f,l as F,m as S,n as W,s as z,c as K,r as h,w as L,P as D,ba as Q,F as C,b9 as J,G as Y}from"./index-b48b51d2-1720699367816.js";import{T as q}from"./index-96385afb-1720699367816.js";import{C as H,F as X}from"./index-43a4a5ce-1720699367816.js";import{v as Z}from"./urlUtils-72ef455d-1720699367816.js";const Me=""+new URL("nosub-edbc4601.png",import.meta.url).href,Ue=""+new URL("qualified-5f6fc5ac.png",import.meta.url).href,Re=""+new URL("unqualified-89af2593.png",import.meta.url).href,$="_commonWork_jydxg_1",ee="_downMoveBg_jydxg_8",te="_dingPng_jydxg_15",ie="_closeAble_jydxg_24",ne="_header_jydxg_43",oe="_navatar_jydxg_48",ae="_userInfo_jydxg_61",le="_textarea_jydxg_76",se="_submitAppBtn_jydxg_92",re="_removeVisiable1_jydxg_103",ue="_studentRemove_jydxg_109",ce="_selectBtn_jydxg_120",me="_btnGroupModal_jydxg_136",s={commonWork:$,downMoveBg:ee,dingPng:te,closeAble:ie,header:ne,navatar:oe,userInfo:ae,textarea:le,submitAppBtn:se,removeVisiable1:re,studentRemove:ue,selectBtn:ce,btnGroupModal:me},de=""+new URL("common-bg-21ff5439.png",import.meta.url).href,fe=""+new URL("common-top-49f36bee.png",import.meta.url).href,ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAdFJREFUWEftlr1KA0EQx2eXq0KuFKyCjVZa5TbBIp2CreAbKD6AhZVWWmsn+FGKjYj4AErKbG7vCbSzESsRuSskGdlwCWG5j529IhbZenb+v52d+e8ymPFiM9aHOcD/rIAQQiDiIef8rt/vP1bpk06ns5AkySlj7DMMw2MzV2YFgiC4R8QdAEAA2I+i6MYFIhV/QcRVvd/zvBUp5et0rkyAVqu1PRgMHgBGTeoEYYoDgFRKrTPGdL7Jyu2BZrO5BwBXLhCmOGNM1ev1zW63+2V1BeMgFwiKuNYpnQIKBFXcCkAH2UC4iFsDlEG4ipMA8iBqtdpTkiSTUStquKxRLu0Bc1PGdbwDQGN0moJuz/MRMoBOFATBLiJeG00c+b6/kTVqRSbmBKDvPI5jNT55evoDpdQ51THJAKn4MwCsGWJOjkkCyLDXiDF2i4hnLo5JmoKiUTN6glQJqwrYzLkrRCmAjXiVt6MQgCLuCpEL4CLuApEJUEWcCpH3JbtExH1Xe82B+OWcN8Iw/Cj9EQkhTobD4ZH+Rvm+v0W112mB9O24AIAfz/OWpJTfpQA6oN1uL/d6vTfzD0e1Wh0vhFjknMemOMmIXIRt9pT6gE2SKjFzgD9jrG8wBso1CwAAAABJRU5ErkJggg==",Ge=p({name:"commit-work",props:{comment:{type:String,default:""},workInfo:{type:Object,default:()=>({})}},emits:["close","confrim"],setup(t,{emit:d}){const c=x(),n=G({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&&z.set("isCommentRemind",1),n.removeVisiable1=!1,a()};return()=>e("div",{class:s.commonWork},[e("img",{src:fe,class:s.dingPng,alt:""},null),e("img",{src:de,class:s.downMoveBg,alt:""},null),e("img",{src:ve,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||U},null),e("div",{class:s.userInfo},[e("h3",null,[t.workInfo.studentName]),e("p",null,[l("提交时间:"),t.workInfo.submitTime?O(t.workInfo.submitTime).format("YYYY-MM-DD HH:mm"):"--"])])]),e(P,{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(N,{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(F,{maskClosable: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(W,{checked:n.commentRemind,"onUpdate:checked":r=>n.commentRemind=r},{default:()=>[l("下次不再提醒")]})]),e(N,{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("确定")]})]})])]})])}}),ge="_workItem_h5nji_1",_e="_expireBg_h5nji_19",Ae="_videoSection_h5nji_33",be="_nodata_h5nji_51",he="_reportBtn_h5nji_56",Le="_type_h5nji_79",Ce="_scoreGroup_h5nji_85",we="_scoreGroupEval_h5nji_96",ke="_trainInfo_h5nji_99",ye="_trainName_h5nji_102",Ie="_PRACTICE_h5nji_124",Be="_EVALUATION_h5nji_127",Ee="_tagList_h5nji_130",Te="_reportModel_h5nji_143",o={workItem:ge,"work-content-disabled":"_work-content-disabled_h5nji_13",expireBg:_e,"work-content":"_work-content_h5nji_13",videoSection:Ae,nodata:be,reportBtn:he,"work-footer":"_work-footer_h5nji_73",type:Le,"title-text":"_title-text_h5nji_82",scoreGroup:Ce,scoreGroupEval:we,trainInfo:ke,trainName:ye,PRACTICE:Ie,EVALUATION:Be,tagList:Ee,reportModel:Te},je=""+new URL("nomore-1c66dcbc.png",import.meta.url).href,Ve=p({name:"work-item",props:{item:{type:Object,default:()=>({})}},setup(t){const d=K(),c=x(),n=h(!1),a=h({type:"MUSIC",content:t.item.musicId,title:t.item.musicName,studentName:t.item.studentName}),v=h(""),r=h(!1),M=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=>{X.saveAs(m,(_||new Date().getTime()+"")+A)}).catch(()=>{c.error("下载失败")})};return()=>{var u,g,_,A,m,w,k,y,I,B,E,T,j;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(L,{src:je,class:o.nodata,previewDisabled:!0,objectFit:"contain"},null),((_=t.item.fileList)==null?void 0:_.fileType)==="IMG"&&e(L,{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 b;return M((b=t.item.fileList)==null?void 0:b.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(L,{src:D.SONG_DEFAULT_COVER,previewDisabled:!0,objectFit:"contain"},null)]),((w=t.item.fileList)==null?void 0:w.fileType)==="EVALUATION"&&(Q((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(L,{src:D.SONG_DEFAULT_COVER,previewDisabled:!0,objectFit:"contain"},null)])),((I=t.item.fileList)==null?void 0:I.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:(B=t.item.fileList)==null?void 0:B.filePath},null)]),((E=t.item.fileList)==null?void 0:E.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=Z()+"/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(q,{text:t.item.musicName},null)])]),e("div",{class:o.tagList},[(j=t.item.typeList)==null?void 0:j.map((i,b)=>e(C,null,[e("span",null,[i]),t.item.typeList.length-1>b&&e(J,{vertical:!0},null)]))])]),t.item.trainingType==="EVALUATION"?e("div",{class:[o.scoreGroup,o.scoreGroupEval]},[t.item.trainingStatus!=="UNSUBMITTED"?e(C,null,[t.item.trainingTimes,e("span",null,[l("分")])]):e("span",{class:o.noSubmit},[l("未提交")])]):e("div",{class:[o.scoreGroup]},[t.item.trainingStatus!=="UNSUBMITTED"?e(C,null,[t.item.trainingTimes?parseInt(t.item.trainingTimes/60+""):0,e("span",null,[l("分钟")])]):e("span",{class:o.noSubmit},[l("未提交")])])]),e(H,{show:n.value,"onUpdate:show":i=>n.value=i,item:a.value},null),e(F,{maskClosable: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=>{Y(i.target)},src:v.value},null)])]})])}}});export{Ge as C,Ve as W,Me as n,Ue as q,Re as u};
|