1 |
- import{d as R}from"./teacherIcon-b8e3946d-1726219372904.js";import{e as j}from"./api-b3e2f6f8-1726219372904.js";import{d as p,b as S,e as G,f as e,aN as V,k as l,Q as O,h as P,x as N,j as f,l as F,m as U,n as W,s as z,c as K,r as L,w as C,P as D,bb as Q,F as w,ba as J,G as Y}from"./index-1ec0a32d-1726219372904.js";import{T as q}from"./index-b48cb97f-1726219372904.js";import{C as H,F as X}from"./index-d4bfaa45-1726219372904.js";import{v as Z}from"./urlUtils-72ef455d-1726219372904.js";const Re=""+new URL("nosub-edbc4601.png",import.meta.url).href,je=""+new URL("qualified-5f6fc5ac.png",import.meta.url).href,Ge=""+new URL("unqualified-89af2593.png",import.meta.url).href,$="_commonWork_jydxg_1",ee="_downMoveBg_jydxg_8",te="_dingPng_jydxg_15",ne="_closeAble_jydxg_24",ie="_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:ne,header:ie,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==",Ve=p({name:"commit-work",props:{comment:{type:String,default:""},workInfo:{type:Object,default:()=>({})}},emits:["close","confrim"],setup(t,{emit:d}){const c=S(),i=G({removeVisiable1:!1,comment:t.comment,btnLoading:!1,commentRemind:!0}),a=async()=>{if(!i.comment){c.error("请输入评语");return}i.btnLoading=!0;try{await j({comment:i.comment,id:t.workInfo.studentLessonTrainingId}),c.success("点评成功"),d("confrim")}catch(r){}i.btnLoading=!1,i.commentRemind=!0},v=()=>{i.commentRemind&&z.set("isCommentRemind",1),i.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||R},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:i.comment,"onUpdate:value":r=>i.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:i.btnLoading,onClick:a},{default:()=>[l("确定")]})]}),e(F,{maskClosable:U,show:i.removeVisiable1,"onUpdate:show":r=>i.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:i.commentRemind,"onUpdate:checked":r=>i.commentRemind=r},{default:()=>[l("下次不再提醒")]})]),e(N,{class:s.btnGroupModal,justify:"center"},{default:()=>[e(f,{round:!0,onClick:()=>{i.removeVisiable1=!1,i.commentRemind=!0}},{default:()=>[l("取消")]}),e(f,{round:!0,type:"primary",onClick:v},{default:()=>[l("确定")]})]})])]})])}}),ge="_workItem_1l2x0_1",_e="_expireBg_1l2x0_19",Ae="_videoSection_1l2x0_33",be="_nodata_1l2x0_51",Le="_reportBtn_1l2x0_56",Ce="_type_1l2x0_79",we="_scoreGroup_1l2x0_85",ke="_noSubmit_1l2x0_96",xe="_scoreGroupEval_1l2x0_101",ye="_trainInfo_1l2x0_104",Ie="_trainName_1l2x0_107",he="_PRACTICE_1l2x0_129",Be="_EVALUATION_1l2x0_132",Ee="_tagList_1l2x0_135",Te="_reportModel_1l2x0_148",o={workItem:ge,"work-content-disabled":"_work-content-disabled_1l2x0_13",expireBg:_e,"work-content":"_work-content_1l2x0_13",videoSection:Ae,nodata:be,reportBtn:Le,"work-footer":"_work-footer_1l2x0_73",type:Ce,"title-text":"_title-text_1l2x0_82",scoreGroup:we,noSubmit:ke,scoreGroupEval:xe,trainInfo:ye,trainName:Ie,PRACTICE:he,EVALUATION:Be,tagList:Ee,reportModel:Te},Ne=""+new URL("nomore-1c66dcbc.png",import.meta.url).href,Oe=p({name:"work-item",props:{item:{type:Object,default:()=>({})}},setup(t){const d=K(),c=S(),i=L(!1),a=L({type:"MUSIC",content:t.item.musicId,title:t.item.musicName,studentName:t.item.studentName}),v=L(""),r=L(!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,k,x,y,I,h,B,E,T;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(C,{src:Ne,class:o.nodata,previewDisabled:!0,objectFit:"contain"},null),((_=t.item.fileList)==null?void 0:_.fileType)==="IMG"&&e(C,{src:(A=t.item.fileList)==null?void 0:A.filePath,objectFit:"contain",renderToolbar:({nodes:n})=>[n.prev,n.next,n.rotateCounterclockwise,n.rotateClockwise,n.resizeToOriginalSize,n.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)])])])]),n.close]},null),((m=t.item.fileList)==null?void 0:m.fileType)==="SOUND"&&e("div",{onClick:()=>{var n;a.value.content=(n=t.item.fileList)==null?void 0:n.filePath,a.value.title=t.item.musicName,a.value.type="SONG",i.value=!0}},[e(C,{src:D.SONG_DEFAULT_COVER,previewDisabled:!0,objectFit:"contain"},null)]),((k=t.item.fileList)==null?void 0:k.fileType)==="EVALUATION"&&(Q((x=t.item.fileList)==null?void 0:x.content)==="video"?e("div",{class:o.videoSection,onClick:()=>{var n;a.value.content=(n=t.item.fileList)==null?void 0:n.content,a.value.title=t.item.musicName,a.value.type="VIDEO",i.value=!0}},[e("video",{style:{height:"100%"},src:(y=t.item.fileList)==null?void 0:y.content},null)]):e("div",{onClick:()=>{var n;a.value.content=(n=t.item.fileList)==null?void 0:n.content,a.value.title=t.item.musicName,a.value.type="SONG",i.value=!0}},[e(C,{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 n;a.value.content=(n=t.item.fileList)==null?void 0:n.filePath,a.value.title=t.item.musicName,a.value.type="VIDEO",i.value=!0}},[e("video",{style:{height:"100%"},src:(h=t.item.fileList)==null?void 0:h.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:(E=t.item.fileList)==null?void 0:E.expireFlag,class:o.reportBtn,onClick:()=>{if(!t.item.recordId){c.error("暂无评测记录");return}const n=d.getToken;v.value=Z()+"/instrument/#/evaluat-report?id=".concat(t.item.recordId,"&Authorization=").concat(n),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},[(T=t.item.typeList)==null?void 0:T.map((n,b)=>e(w,null,[e("span",null,[n]),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(w,null,[t.item.trainingTimes,e("span",null,[l("分")])]):e("span",{class:o.noSubmit},[l("未提交")])]):e("div",{class:[o.scoreGroup]},[t.item.trainingStatus!=="UNSUBMITTED"?e(w,null,[t.item.trainingTimes?parseInt(t.item.trainingTimes/60+""):0,e("span",null,[l("分钟")])]):e("span",{class:o.noSubmit},[l("未提交")])])]),e(H,{show:i.value,"onUpdate:show":n=>i.value=n,item:a.value},null),e(F,{maskClosable:U,show:r.value,"onUpdate:show":n=>r.value=n,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:n=>{Y(n.target)},src:v.value},null)])]})])}}});export{Ve as C,Oe as W,Re as n,je as q,Ge as u};
|