| 1 |
- import{C as me,E as pe,d as N,I as fe,dE as ge,L as te,J as U,dF as K,Q as he,A as Z,dG as Ae,bi as ye,c as ve,b as z,r as B,f as t,w as Se,x as L,aq as D,b1 as be,k as v,ai as F,bt as Ie,au as P,j as T,l as V,m as Y,aa as Ce,b3 as W,e as R,q as M,N as O,g as E,b2 as k,i as J,a8 as ae,aL as Te,b4 as se,a5 as Be,a9 as we,t as _e,v as q}from"./index-8ca08701-1763717014417.js";import{C as ie}from"./index-496228d2-1763717014417.js";import{v as Ee}from"./urlUtils-b5855a3c-1763717014417.js";import{F as Le,C as Ne}from"./index-6ca05a55-1763717014417.js";import{T as Re}from"./index-7e8c9fbd-1763717014417.js";import{N as Q}from"./Scrollbar-60d2ae02-1763717014417.js";import{v as ke,w as De}from"./api-6c318bb9-1763717014417.js";import{N as Fe}from"./Cascader-3ede19e6-1763717014417.js";import{T as xe}from"./index-df3869ee-1763717014417.js";import{u as le,f as Me,m as Ue}from"./catchData-c1b0e2a9-1763717014417.js";import{a as ne,u as Ge}from"./index-2ed9b35c-1763717014417.js";import{T as Pe}from"./index-a6ea1792-1763717014417.js";import{u as re}from"./index-25d202e7-1763717014417.js";const qe=me("input-group-label","\n position: relative;\n user-select: none;\n -webkit-user-select: none;\n box-sizing: border-box;\n padding: 0 12px;\n display: inline-block;\n border-radius: var(--n-border-radius);\n background-color: var(--n-group-label-color);\n color: var(--n-group-label-text-color);\n font-size: var(--n-font-size);\n line-height: var(--n-height);\n height: var(--n-height);\n flex-shrink: 0;\n white-space: nowrap;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n",[pe("border","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n border: var(--n-group-label-border);\n transition: border-color .3s var(--n-bezier);\n ")]),je=Object.assign(Object.assign({},te.props),{size:String,bordered:{type:Boolean,default:void 0}}),X=N({name:"InputGroupLabel",props:je,setup(e){const{mergedBorderedRef:l,mergedClsPrefixRef:a,inlineThemeDisabled:i}=fe(e),p=ge(e),{mergedSizeRef:s}=p,r=te("Input","-input-group-label",qe,Ae,e,a),b=U(()=>{const{value:f}=s,{common:{cubicBezierEaseInOut:n},self:{groupLabelColor:y,borderRadius:I,groupLabelTextColor:c,lineHeight:S,groupLabelBorder:d,[K("fontSize",f)]:w,[K("height",f)]:G}}=r.value;return{"--n-bezier":n,"--n-group-label-color":y,"--n-group-label-border":d,"--n-border-radius":I,"--n-group-label-text-color":c,"--n-font-size":w,"--n-line-height":S,"--n-height":G}}),o=i?he("input-group-label",U(()=>{const{value:f}=s;return f[0]}),b,e):void 0;return{mergedClsPrefix:a,mergedBordered:l,cssVars:i?void 0:b,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0:o.onRender}},render(){var e,l,a;const{mergedClsPrefix:i}=this;return(e=this.onRender)===null||e===void 0||e.call(this),Z("div",{class:["".concat(i,"-input-group-label"),this.themeClass],style:this.cssVars},(a=(l=this.$slots).default)===null||a===void 0?void 0:a.call(l),this.mergedBordered?Z("div",{class:"".concat(i,"-input-group-label__border")}):null)}}),He=ye("prepare-lessons-store",{state:()=>({subjectId:null,instrumentId:null,baseCourseware:{},selectKey:"",lessonCoursewareId:"",subjectList:[],instrumentList:[],lessonCoursewareDetailId:"",treeList:[],coursewareList:[],trainList:[],tabType:"courseware",selectMusicStatus:!1,selectResourceStatus:!1,isAddResource:!1,isEditResource:!1,iseditTrain:!1,isAddTrain:!1,classGroupId:null,beforeLoading:!1}),getters:{getSubjectId(){return this.subjectId},getInstrumentId(){return this.instrumentId},getBaseCourseware(){return this.baseCourseware},getSelectKey(){return this.selectKey},getSelectName(){var l;let e="";for(let a=0;a<this.getTreeList.length;a++){const i=this.getTreeList[a];i.id===this.selectKey&&(e=i.name),!e&&i.knowledgeList.length>0&&((l=i.knowledgeList)==null||l.forEach(p=>{p.id===this.selectKey&&(e=p.name)}))}return e},getLessonCoursewareId(){return this.lessonCoursewareId},getLessonCoursewareDetailId(){return this.lessonCoursewareDetailId},getTreeList(){return this.treeList},getCoursewareList(){return this.coursewareList},getTrainList(){return this.trainList},getTabType(){return this.tabType},getSelectMusicStatus(){return this.selectMusicStatus},getSelectResourceStatus(){return this.selectResourceStatus},getIsAddResource(){return this.isAddResource},getIsEditResource(){return this.isEditResource},getIsEditTrain(){return this.iseditTrain},getIsAddTrain(){return this.isAddTrain},getSubjectList(){return this.subjectList},getInstrumentList(){return this.instrumentList},getFormatInstrumentList(){const e=[];return this.instrumentList.forEach(l=>{l.value=l.id,l.label=l.name,l.instruments&&l.instruments.length>0&&l.instruments.forEach(i=>{i.label=i.name,i.value=i.id});const a={value:l.id,label:l.name,id:l.id,name:l.name,instruments:[]};l.instruments&&(l.instruments.length==1?(a.value=l.instruments[0].id,a.label=l.instruments[0].name,a.id=l.id,a.name=l.name):l.instruments.length>1&&l.instruments.forEach(i=>{i.label=i.name,i.value=i.id,a.instruments.push({label:i.name,value:i.id,id:i.id,name:i.name})})),e.push(a)}),e},getSingleInstrumentList(){const e=[];return this.instrumentList.forEach(l=>{Array.isArray(l.instruments)&&l.instruments.forEach(a=>{e.push(a)})}),e},getClassGroupId(){return this.classGroupId},getBeforeLoading(){return this.beforeLoading}},actions:{setBeforeLoading(e){this.beforeLoading=e},setSubjectId(e){this.subjectId=e},setInstrumentId(e){this.instrumentId=e},setBaseCourseware(e){this.baseCourseware=e},setSelectKey(e){this.selectKey=e},setLessonCoursewareId(e){this.lessonCoursewareId=e},setLessonCoursewareDetailId(e){this.lessonCoursewareDetailId=e},setTreeList(e){this.treeList=e},setCoursewareList(e){this.coursewareList=e},setTrainList(e){this.trainList=e},setTabType(e){this.tabType=e},setSelectMusicStatus(e){this.selectMusicStatus=e},setSelectResourceStatus(e){this.selectResourceStatus=e},setIsAddResource(e){this.isAddResource=e},setIsAddTrain(e){this.isAddTrain=e},setIsEditResource(e){this.isEditResource=e},setIsEditTrain(e){this.iseditTrain=e},setSubjectList(e){this.subjectList=e},setInstrumentList(e){this.instrumentList=e},setClassGroupId(e){this.classGroupId=e}}}),Ve="_trainType_h6q64_1",ze="_overflowBg_h6q64_11",Oe="_iconDelete_h6q64_26",Qe="_trainDisabled_h6q64_31",Ke="_title_h6q64_40",Ze="_btn_h6q64_55",Ye="_preview_h6q64_100",We="_previewBtn_h6q64_115",Je="_disPreview_h6q64_121",Xe="_disPreviewDivide_h6q64_134",$e="_BProgress_h6q64_144",et="_audioPlayTypeSection_h6q64_176",tt="_iconType_h6q64_183",at="_iconPlay_h6q64_188",st="_iconSing_h6q64_196",it="_type_h6q64_210",lt="_operation_h6q64_216",nt="_iconEdit_h6q64_226",rt="_trainInfo_h6q64_237",ot="_trainName_h6q64_240",ct="_PRACTICE_h6q64_262",ut="_EVALUATION_h6q64_265",dt="_tagList_h6q64_268",mt="_offShelfBg_h6q64_281",pt="_offShelfTips_h6q64_295",ft="_offShelfBtn_h6q64_302",gt="_removeVisiable_h6q64_307",ht="_studentRemove_h6q64_313",At="_btnGroupModal_h6q64_325",yt="_reportModel_h6q64_332",u={trainType:Ve,overflowBg:ze,iconDelete:Oe,trainDisabled:Qe,"train-header":"_train-header_h6q64_34",title:Ke,"title-tag":"_title-tag_h6q64_47","title-text":"_title-text_h6q64_52",btn:Ze,"train-content":"_train-content_h6q64_80",preview:Ye,previewBtn:We,disPreview:Je,disPreviewDivide:Xe,BProgress:$e,audioPlayTypeSection:et,iconType:tt,iconPlay:at,iconSing:st,"train-footer":"_train-footer_h6q64_204",type:it,operation:lt,iconEdit:nt,trainInfo:rt,trainName:ot,PRACTICE:ct,EVALUATION:ut,tagList:dt,offShelfBg:mt,offShelfTips:pt,offShelfBtn:ft,removeVisiable:gt,studentRemove:ht,btnGroupModal:At,reportModel:yt},vt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAv1JREFUaEPdmk3LElEUgJ+Xoi+VXmoXFlHbqIjQWhhoYAujRUofBG76C1K/ofA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7w8PDuHz5Mo4i27h69aoSd3VDJANRpl3XHLOtrS0FiJtRNMlAFMcs7K67zJ4iGYjiukfM4s4JKMlAlMUdBUEjYvkfAUAyQwoQzc/PIyfH0TLISdtt5Zmbm8OZM2dspTUk+i9ARH/knDsKIdJOXVZWFlZXhc+2OamwZR6K+C8uLoJ28hyILoToKMhMSm/fvq2E9E5qX1drOO3vUrQtLy/PAQslSxmdGwlpG0LTfHBwgOnpaaytkY8XfqH1zfnz55XFn0PRb0Oow0Z4o8qh8kjMpt+oUoHQoX2hrUyrlu3t7WF2dtY0FGiV1+x3Cibl5uYiMTHRSfZgeY5vZapQhDa7g2kgQ0uVp+EkU2hYEOSMDDpMLUXMN7tVIHSjQeg4RKAq9fb2orq6WkqNjYX09PSgqqpKVtmBj0PI7CW7u7tKRJ2OTMgUMqAzMzNISkqSUWzwAzMqEPJchY9UmdWO/JSNjQ2pNiQ1NdWpn2Gsor0jVSoU79CdPz7vWKZJf/cO7ppDobsx3tFuw/ChOzLe4X8DlGi+K6M1Rc71EK20KL8zYwsGtdXyvozJ8PGumBmgeJcQjROQd03VfEr2LjKbrVe8q+4B1pjeYwiBwXjPZQQYSt6DKsEiNn5P7tBzO/Tsjp0nd+i5HXp2J/qf3JERzjqJMv4Fq+ybxlEMybAAAAAASUVORK5CYII=",ba=N({name:"train-type",props:{type:{type:String,default:"homework"},item:{type:Object,default:()=>({})},isDelete:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isLarge:{type:Boolean,default:!1},offShelf:{type:Boolean,default:!1},isCLassWork:{type:Boolean,default:!1},from:{type:String,default:""}},emits:["click","delete","edit","offShelf"],setup(e,{emit:l}){const a=ve(),i=z(),p=B(!1),s=B(!1),r=B({type:"MUSIC",content:e.item.musicId,title:e.item.musicName}),b=()=>{r.value={type:"MUSIC",content:e.item.musicId,title:e.item.musicName},s.value=!0},o=B(""),f=B(!1),n=c=>{if(!c.id){i.error("暂无评测记录");return}const S=a.getToken;o.value=Ee()+"/instrument/#/evaluat-report?id=".concat(c.id,"&Authorization=").concat(S),f.value=!0},y=async()=>{var c;try{if(!((c=e.item)!=null&&c.recordId)){i.error("暂无数据");return}const{data:S}=await Le({id:e.item.recordId});if(S.videoFilePath||S.recordFilePath){let d="";S.videoFilePath?d=W(S.videoFilePath):d=W(S.recordFilePath);const w=S.videoFilePath||S.recordFilePath;r.value.content=w,r.value.title=e.item.musicName,d==="video"?r.value.type="VIDEO":d==="audio"&&(r.value.type="SONG"),s.value=!0}else i.error("暂无数据")}catch(S){}},I=U(()=>{const c=e.item;return c?c.trainingType==="EVALUATION"?(c.trainingTimes||0)>=(c.allTimes||0):(c.trainingTimes?parseInt(c.trainingTimes/60+""):0)>=(c.allTimes||0):!1});return U(()=>!!(e.isDisabled&&!e.isCLassWork&&e.item.trainingType==="EVALUATION")),()=>{var c,S;return t("div",{class:[u.trainType,e.item.trainingType==="EVALUATION"?u.evaluationType:""],onClick:()=>l("click",e.item)},[t("div",{class:[u["train-content"],e.isDisabled&&!e.isCLassWork&&u.trainDisabled,e.isLarge&&u.trainDisabled],onClick:()=>{e.isDisabled&&!e.isCLassWork||b()}},[t(Se,{src:e.item.coverImg,previewDisabled:!0,objectFit:"contain"},null),t(L,{class:u.audioPlayTypeSection},{default:()=>{var d,w;return[((d=e.item.audioPlayTypeArray)==null?void 0:d.includes("SING"))&&t(D,{trigger:"hover",showArrow:!1},{trigger:()=>t("span",{class:[u.iconType,u.iconSing]},null),default:"演唱场景"}),((w=e.item.audioPlayTypeArray)==null?void 0:w.includes("PLAY"))&&t(D,{trigger:"hover",showArrow:!1},{trigger:()=>t("span",{class:[u.iconType,u.iconPlay]},null),default:"演奏场景"})]}}),e.isDisabled&&!e.isCLassWork?t("div",{class:u.disPreview},[t(be,{percentage:e.item.trainingType==="EVALUATION"?Number(e.item.trainingTimes)/Number(e.item.allTimes)*100:Number(e.item.trainingTimes)/60/Number(e.item.allTimes)*100,"offset-degree":180,type:"circle","rail-color":"8b8b8b",color:I.value?"#6CFFC1":"#FF7794",style:"width: 120px; margin: 0 0 10px;"},{default:()=>[t("div",{class:u.BProgress},[e.item.trainingType==="EVALUATION"?t("h4",null,[e.item.trainingTimes,t("span",null,[v("分")])]):t("h4",null,[e.item.trainingTimes?parseInt(e.item.trainingTimes/60+""):0,t("span",null,[v("分钟")])]),t("p",null,[e.item.trainingType==="EVALUATION"?"学生分数":"实际练习"," "])])]}),t("p",{class:u.disPreviewDivide},[e.item.trainingType==="EVALUATION"?"达标分数":"练习时长要求",e.item.allTimes,e.item.trainingType==="EVALUATION"?"分":"分钟"])]):null,e.isDelete&&t("img",{src:vt,class:u.iconDelete,onClick:d=>{d.stopPropagation(),l("delete",e.item)}},null)]),t("div",{class:u["train-footer"]},[t("div",{class:u.trainInfo},[t("div",{class:u.trainName},[t("span",{class:[u.type,u[e.item.trainingType]]},[e.item.trainingType==="EVALUATION"?"评测":"练习"]),t("div",{class:u["title-text"]},[t(Re,{text:e.item.musicName},null)])]),t("div",{class:u.tagList},[(c=e.item.typeList)==null?void 0:c.map((d,w)=>t(F,null,[t("span",null,[d]),e.item.typeList.length-1>w&&t(Ie,{vertical:!0},null)]))])]),e.isDisabled?null:t(L,{size:12},{default:()=>[t(P("n-button"),{quaternary:!0,disabled:!e.isDelete,class:u.operation,onClick:d=>{d.stopPropagation(),l("edit",e.item)}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("i",{class:u.iconEdit},null),default:"编辑"})]})]}),e.isDisabled&&!e.isCLassWork&&e.item.trainingType==="EVALUATION"&&((S=e.item)!=null&&S.recordId)?t(F,null,[t(L,{size:12},{default:()=>[t(P("n-button"),{quaternary:!0,disabled:e.isDelete,class:u.operation,onClick:d=>{d.stopPropagation(),n({id:e.item.recordId})}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("img",{src:bt},null),default:"评测报告"})]}),t(P("n-button"),{quaternary:!0,disabled:e.isDelete,class:u.operation,onClick:d=>{d.stopPropagation(),y()}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("img",{src:St},null),default:"查看回放"})]})]})]):""]),e.offShelf&&t("div",{class:u.offShelfBg},[t("p",{class:u.offShelfTips},[v("该资源已被下架")]),t(T,{type:"primary",class:u.offShelfBtn,onClick:()=>l("offShelf")},{default:()=>[v("确认")]})]),t(V,{maskClosable:Y,show:p.value,"onUpdate:show":d=>p.value=d,preset:"card",class:["modalTitle",u.removeVisiable],title:"提示"},{default:()=>[t("div",{class:u.studentRemove},[t("p",null,[v("您确定是否删除?")]),t(L,{class:u.btnGroupModal,justify:"center"},{default:()=>[t(T,{round:!0,type:"primary",onClick:()=>{p.value=!1,l("delete",e.item)}},{default:()=>[v("确定")]}),t(T,{round:!0,onClick:()=>p.value=!1},{default:()=>[v("取消")]})]})])]}),t(ie,{from:e.from,show:s.value,"onUpdate:show":d=>s.value=d,item:r.value,isDownload:!1},null),t(V,{maskClosable:Y,show:f.value,"onUpdate:show":d=>f.value=d,preset:"card",class:["modalTitle background",u.reportModel],title:"评测报告"},{default:()=>[t("div",{class:u.reportContainer,style:{lineHeight:0}},[t("iframe",{width:"100%",height:"450px",frameborder:"0",onLoad:d=>{Ce(d.target)},src:o.value},null)])]})])}}}),It="_trainUpdate_4zbne_1",Ct="_updateBtnGroup_4zbne_5",Tt="_active_4zbne_17",Bt="_difficultySpace_4zbne_21",wt="_scoreGroup_4zbne_34",C={trainUpdate:It,updateBtnGroup:Ct,switch:"_switch_4zbne_13",active:Tt,difficultySpace:Bt,scoreGroup:wt},Ia=N({name:"train-update",props:{item:{type:Object,default:()=>({})},type:{type:String,default:"train"}},emits:["close","confirm"],setup(e,{emit:l}){z();const a=R({id:null,uploading:!1,baseMaxScore:99,type:"PRACTICE",musicId:"",musicName:"",coursewareKnowledgeDetailId:"",minScore:null,maxScore:null,subjectId:"",coverImg:"",containAccompaniment:null,audioPlayTypeArray:[],practiceSpeed:null,practiceTimes:null,difficulty:"BEGINNER",evaluationSpeed:null,evaluationScore:null,firstMeasureIsZero:!1}),i=B(),p=async()=>{var s;(s=i.value)==null||s.validate(async r=>{if(!r){a.uploading=!0;try{const b={trainingType:a.type,musicId:a.musicId,musicName:a.musicName,audioPlayTypeArray:a.audioPlayTypeArray,coursewareKnowledgeDetailId:a.coursewareKnowledgeDetailId,subjectId:a.subjectId,id:a.id,coverImg:a.coverImg,containAccompaniment:a.containAccompaniment,trainingConfigJson:""},o={};o.practiceChapterBegin=a.minScore,o.practiceChapterEnd=a.maxScore,a.type==="PRACTICE"?(o.practiceSpeed=a.practiceSpeed,o.trainingTimes=a.practiceTimes):(o.evaluateDifficult=a.difficulty,o.evaluateSpeed=a.evaluationSpeed,o.trainingTimes=a.evaluationScore),o.practiceChapterMax=a.baseMaxScore,o.firstMeasureIsZero=a.firstMeasureIsZero,b.trainingConfigJson=o,l("close"),l("confirm",b)}catch(b){}a.uploading=!1}})};return M(()=>{const s=e.item,r=Math.floor(s.playSpeed||0);s.trainId?(a.id=s.trainId,a.type=s.trainingType,a.minScore=s.practiceChapterBegin,a.maxScore=s.practiceChapterEnd,a.difficulty=s.evaluateDifficult||"BEGINNER",s.trainingType==="PRACTICE"?(a.practiceTimes=s.trainingTimes,a.practiceSpeed=s.practiceSpeed?Number(s.practiceSpeed):r||null,a.evaluationSpeed=s.practiceSpeed?Number(s.practiceSpeed):r||null):(a.evaluationScore=s.trainingTimes,a.evaluationSpeed=s.evaluateSpeed?Number(s.evaluateSpeed):r||null,a.practiceSpeed=s.evaluateSpeed?Number(s.evaluateSpeed):r||null)):(a.minScore=s.firstMeasureIsZero?0:1,a.maxScore=s.practiceChapterMax?s.practiceChapterMax:1,a.evaluationSpeed=r||null,a.practiceSpeed=r||null),a.firstMeasureIsZero=s.firstMeasureIsZero,a.audioPlayTypeArray=s.audioPlayTypeArray||[],a.containAccompaniment=s.containAccompaniment||null,a.baseMaxScore=s.practiceChapterMax||99,a.musicId=s.id,a.musicName=s.musicName,a.coursewareKnowledgeDetailId=s.coursewareKnowledgeDetailId,a.subjectId=s.subjectId,a.coverImg=s.coverImg}),()=>t("div",{class:C.trainUpdate},[t(O,{ref:i,model:a,labelAlign:"right",labelPlacement:"left"},{default:()=>[t(E,{label:"训练方式",path:"type",rule:[{required:!0,message:"请选择训练方式"}]},{default:()=>[t(L,null,{default:()=>[t(T,{secondary:!0,class:[C.switch,a.type==="PRACTICE"?C.active:""],onClick:()=>a.type="PRACTICE"},{default:()=>[v("练习")]}),e.item.containAccompaniment?t(T,{secondary:!0,class:[C.switch,a.type==="EVALUATION"?C.active:""],onClick:()=>a.type="EVALUATION"},{default:()=>[v("评测")]}):t(D,{showArrow:!1},{trigger:()=>t(T,{disabled:!0,secondary:!0,class:[C.switch]},{default:()=>[v("评测")]}),default:()=>"该曲目暂不支持评测"})]})]}),t("div",{class:C.scoreGroup},[t(E,{label:a.type==="PRACTICE"?"练习小节":"评测小节",path:"minScore",rule:[{required:!0,message:"请输入最小练习小节",trigger:["blur","change"],type:"number"}]},{default:()=>[t(k,{value:a.minScore,"onUpdate:value":[s=>a.minScore=s,()=>{a.maxScore=null}],showButton:!1,min:a.firstMeasureIsZero?0:1,max:a.baseMaxScore,precision:0,placeholder:"最小练习小节",clearable:!0},null)]}),t("div",{style:{"--n-feedback-height":"24px",display:"flex",alignItems:"center",margin:"-2px 2% 0 2%",marginBottom:"var(--n-feedback-height)"}},[v("-")]),t(E,{path:"maxScore",rule:[{required:!0,message:"请输入最大练习小节",trigger:["blur","change"],type:"number"}]},{default:()=>[t(k,{value:a.maxScore,"onUpdate:value":s=>a.maxScore=s,showButton:!1,precision:0,min:a.minScore||0,max:a.baseMaxScore,placeholder:"最大练习小节",clearable:!0},null)]})]),a.type==="PRACTICE"&&t(F,{key:"PRACTICE"},[t(E,{label:"练习速度",path:"practiceSpeed",showFeedback:!0,feedback:"速度范围45-270",rule:[{required:!0,message:"请输入练习速度",trigger:["blur","change"],type:"number"}]},{default:()=>[t(k,{min:45,max:270,precision:0,showButton:!1,style:{width:"100%"},value:a.practiceSpeed,"onUpdate:value":[s=>a.practiceSpeed=s,s=>{a.evaluationSpeed=s}],placeholder:"练习速度范围45~270",clearable:!0},null)]}),t(E,{label:"练习时长",path:"practiceTimes",rule:[{required:!0,message:"请输入练习时长",trigger:["blur","change"],type:"number"}]},{default:()=>[t(J,null,{default:()=>[t(k,{min:0,max:1e3,showButton:!1,precision:0,style:{width:"100%"},value:a.practiceTimes,"onUpdate:value":s=>a.practiceTimes=s,placeholder:"请输入练习时长",clearable:!0},null),t(X,null,{default:()=>[v("分钟")]})]})]}),t(E,{label:"empty",style:{opacity:0}},{default:()=>[t(L,{class:C.difficultySpace},{default:()=>[t(T,{secondary:!0,class:[C.switch]},{default:()=>[v("占位元素")]})]})]})]),a.type==="EVALUATION"&&t(F,{key:"EVALUATION"},[t(E,{label:"评测难度",path:"type",rule:[{required:!0,message:"请选择评测难度"}]},{default:()=>[t(L,{class:C.difficultySpace},{default:()=>[t(T,{secondary:!0,class:[C.switch,a.difficulty==="BEGINNER"?C.active:""],onClick:()=>a.difficulty="BEGINNER"},{default:()=>[v("入门级")]}),t(T,{secondary:!0,class:[C.switch,a.difficulty==="ADVANCED"?C.active:""],onClick:()=>a.difficulty="ADVANCED"},{default:()=>[v("进阶级")]}),t(T,{secondary:!0,class:[C.switch,a.difficulty==="PERFORMER"?C.active:""],onClick:()=>a.difficulty="PERFORMER"},{default:()=>[v("大师级")]})]})]}),t(E,{label:"评测速度",path:"evaluationSpeed",showFeedback:!0,feedback:"速度范围45-270",rule:[{required:!0,message:"请输入评测速度",trigger:["blur","change"],type:"number"}]},{default:()=>[t(k,{min:45,max:270,showButton:!1,style:{width:"100%"},value:a.evaluationSpeed,"onUpdate:value":[s=>a.evaluationSpeed=s,s=>{a.practiceSpeed=s}],placeholder:"评测速度范围45~270",clearable:!0},null)]}),t(E,{label:"达标分数",path:"evaluationScore",rule:[{required:!0,message:"请输入达标分数",trigger:["blur","change"],type:"number"}]},{default:()=>[t(J,null,{default:()=>[t(k,{min:0,max:100,precision:0,showButton:!1,style:{width:"100%"},value:a.evaluationScore,"onUpdate:value":s=>a.evaluationScore=s,placeholder:"请输入达标分数",clearable:!0},null),t(X,null,{default:()=>[v("分")]})]})]})])]}),t(L,{class:C.updateBtnGroup},{default:()=>[t(T,{strong:!0,type:"default",round:!0,onClick:()=>l("close")},{default:()=>[v("取消")]}),t(T,{strong:!0,type:"primary",round:!0,onClick:()=>p()},{default:()=>[v("确认")]})]})])}}),_t="_theTipDialog_yxxpw_1",Et="_tipCon_yxxpw_4",Lt="_tipBox_yxxpw_8",Nt="_tip_yxxpw_4",Rt="_tipBtnBox_yxxpw_29",x={theTipDialog:_t,tipCon:Et,tipBox:Lt,tip:Nt,tipBtnBox:Rt},Ca=N({name:"the-tip-dialog",props:{show:Boolean,title:{type:String,default:"提示"},cancelButtonText:{type:String,default:"取消"},confirmButtonText:{type:String,default:"确定"},cancelBtn:{type:Boolean,default:!0},confirmBtn:{type:Boolean,default:!0},content:{type:String,default:""}},emits:["close","confirm"],setup(e,{emit:l}){return()=>t(V,{class:["modalTitle",x.theTipDialog],"on-close":()=>{l("close")},show:e.show,preset:"card",title:e.title},{default:()=>[t("div",{class:x.tipCon},[t("div",{class:x.tipBox},[t(Q,null,{default:()=>[t("div",{class:x.tip,innerHTML:e.content},null)]})]),t("div",{class:x.tipBtnBox},[e.cancelBtn&&t(T,{round:!0,onClick:()=>l("close")},{default:()=>[e.cancelButtonText]}),e.confirmBtn&&t(T,{type:"primary",round:!0,onClick:()=>l("confirm")},{default:()=>[e.confirmButtonText]})])])]})}}),kt="_addClass_oq0dk_1",Dt="_btnGroup_oq0dk_18",$={addClass:kt,btnGroup:Dt};function Ft(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ae(e)}const Ta=N({props:{activeRow:{type:Array,default:()=>[]}},name:"resetSubjectList",emits:["close","getList"],setup(e,{emit:l}){const a=R({uploading:!1}),i=z(),p=B(),s=R({classList:e.activeRow});M(()=>{b()});const r=()=>{p.value.validate(async o=>{if(!o){a.uploading=!0;try{const f=[];s.classList.forEach(n=>{f.push({id:n.classGroupId,instrumentId:n.instrumentId})}),await De(f),i.success("修改成功"),l("close"),l("getList"),a.uploading=!1}catch(f){console.log(f)}a.uploading=!1}})},b=async()=>{try{const o=e.activeRow.map(n=>n.classGroupId),{data:f}=await ke(o);Array.isArray(f)&&s.classList.forEach(n=>{const y=f.find(I=>I.classGroupId===n.classGroupId);y&&(n.subjectList=y.subjectList||[])})}catch(o){}};return()=>{let o;return t("div",{class:[$.addClass]},[t(O,{"label-placement":"top",model:s,ref:p},{default:()=>[t(Q,{style:"max-height: 360px; padding: 0 30px"},Ft(o=s.classList.map((f,n)=>t(E,{path:"classList[".concat(n,"].instrumentId"),label:f.classGroupName,showRequireMark:!1,rule:[{required:!0,message:"请选择乐器",trigger:"change"}]},{default:()=>[t(Fe,{placeholder:"请选择乐器",value:f.instrumentId,"onUpdate:value":y=>f.instrumentId=y,options:f.subjectList,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})))?o:{default:()=>[o]})]}),t(L,{class:$.btnGroup,justify:"end"},{default:()=>[t(T,{secondary:!0,onClick:()=>l("close")},{default:()=>[v("取消")]}),t(T,{loading:a.uploading,onClick:()=>r(),type:"primary"},{default:()=>[v("确认")]})]})])}}}),xt="_selectMusic_fj7p5_1",Mt="_close_fj7p5_37",Ut="_listContainer_fj7p5_44",j={selectMusic:xt,close:Mt,listContainer:Ut},Gt="_selectMusic_1mm1o_1",Pt="_close_1mm1o_1",qt="_listContainer_1mm1o_8",jt="_emptySection_1mm1o_11",Ht="_list_1mm1o_8",Vt="_searchGroup_1mm1o_24",zt="_inputSearch_1mm1o_47",Ot="_searchBtn_1mm1o_62",Qt="_popSelect_1mm1o_68",Kt="_spaceSection2_1mm1o_78",Zt="_textBtn_1mm1o_87",Yt="_iconArrow_1mm1o_99",Wt="_textBtnActive_1mm1o_108",Jt="_spaceSection_1mm1o_78",Xt="_collapseWrap_1mm1o_124",$t="_collaoseGroup_1mm1o_130",ea="_collaoseBtn_1mm1o_137",ta="_isStart_1mm1o_142",aa="_collapsSection_1mm1o_145",sa="_collapsSectionEmpty_1mm1o_148",ia="_isHidden_1mm1o_153",la="_hideButton_1mm1o_157",A={selectMusic:Gt,close:Pt,listContainer:qt,emptySection:jt,list:Ht,searchGroup:Vt,inputSearch:zt,searchBtn:Ot,popSelect:Qt,spaceSection2:Kt,textBtn:Zt,iconArrow:Yt,textBtnActive:Wt,spaceSection:Jt,collapseWrap:Xt,collaoseGroup:$t,collaoseBtn:ea,isStart:ta,collapsSection:aa,collapsSectionEmpty:sa,isHidden:ia,hideButton:la};function ee(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ae(e)}const oe=N({name:"ChildNodeSearch",props:{activeRow:{type:Object,default:()=>({})},list:{type:Array,default:()=>[]}},emits:["selectChildTag"],setup(e,{emit:l}){const{activeRow:a}=se(e),i=B({});return Be(()=>e.activeRow,()=>{a.value=e.activeRow,i.value={}}),()=>{var p;return t(F,null,[((p=a.value)==null?void 0:p.id)&&t(F,null,[t(E,{label:a.value.columnName+":"},{default:()=>[t(L,{class:A.spaceSection2},{default:()=>{var s;return[(s=a.value)==null?void 0:s.children.map(r=>t("span",{class:[A.textBtn,(a.value.activeIndex||"")==r.id&&A.textBtnActive],onClick:()=>{a.value.activeIndex=r.id;let b,o="";r.children?(b=[{columnName:r.children[0].columnName,name:"全部",id:""},...r.children],o=r.children[0].columnName,i.value={...r,columnName:o,activeIndex:"",children:b}):i.value={},l("selectChildTag",a.value.activeIndex)}},[r.name]))]}})]}),t(oe,{activeRow:i.value,onSelectChildTag:s=>{l("selectChildTag",s||a.value.activeIndex)}},null)])])}}}),na=N({name:"search-group",props:{type:{type:String,default:""}},emits:["search","add"],setup(e,{emit:l}){const a=le(),i=R({name:"",bookVersionId:null,musicalInstrumentId:null}),p=R({tempSubjectId:null,gradeList:[],musicCategory:[]}),s=R({selectParents:{},tags:[],tagActiveId:"",tagActive:{},childSelectId:null}),r=m=>{l("search",{...i,bookVersionId:s.childSelectId||s.tagActiveId},m)},b=ne(()=>{r()},500),o=B(),f=B([]),n=B(0),y=B(0),I=B(0),c=B(!1),S=B(!1),d=()=>{try{f.value=[...new Set(f.value)];let m=-1;f.value.forEach((h,_)=>{_===0?(I.value=1,m=h.offsetLeft):h.offsetLeft===m&&_!=0&&I.value++,c.value?h.style.display="block":I.value>1?h.style.display="none":h.style.display="block"}),S.value=!0}catch(m){}},w=m=>{const h={};return m==null||m.forEach(_=>{_.id===i.musicalInstrumentId&&(h.selected=!0,h.name=_.name)}),h},G=()=>{const m=a.getMusicTagTree;s.tags=[{columnName:m[0].columnName,name:"全部",id:""},...m],s.tagActiveId=s.tags[0].id},ce=m=>{s.tagActiveId=m.id,s.childSelectId=null;let h,_="";m.children?(h=[{columnName:m.children[0].columnName,name:"全部",id:""},...m.children],_=m.children[0].columnName,s.selectParents={...m,columnName:_,activeIndex:"",children:h}):s.selectParents={},r()},ue=()=>{var h,_;const m=a.getSubjectInstrumentOnly;if(m.length>0){const g=m[0];g.instruments&&g.instruments.length>1?(p.tempSubjectId=(h=g.instruments[0])==null?void 0:h.value,i.musicalInstrumentId=(_=g.instruments[0])==null?void 0:_.value):i.musicalInstrumentId=g.value}};return M(async()=>{var m,h;await a.getMusicTagTreeApi(),G(),await a.getSubjects(),n.value=(m=o.value)==null?void 0:m.offsetHeight,y.value=((h=o.value)==null?void 0:h.offsetHeight)/I.value,d(),ue(),r("timer")}),()=>{let m,h;return t("div",{class:A.searchGroup},[t(O,{labelAlign:"left",labelPlacement:"left"},{default:()=>{var _;return[t("div",{class:[A.collapsSection,e.type==="myResources"&&A.collapsSectionEmpty]},[t(E,{label:((_=s.tags[0])==null?void 0:_.columnName)+":"},{default:()=>[t(L,{class:A.spaceSection2},ee(m=s.tags.map(g=>t("span",{class:[A.textBtn,s.tagActiveId===g.id&&A.textBtnActive],onClick:()=>{ce(g)}},[g.name])))?m:{default:()=>[m]})]}),t(oe,{activeRow:s.selectParents,onSelectChildTag:g=>{s.childSelectId=g,r()}},null)]),t(E,{label:"乐器:"},{default:()=>[t(L,{class:A.spaceSection2},ee(h=a.getSubjectInstrumentOnly.map(g=>g.instruments&&g.instruments.length>1?t(Te,{options:g.instruments,trigger:"hover",scrollable:!0,value:p.tempSubjectId,"onUpdate:value":[de=>p.tempSubjectId=de,()=>{i.musicalInstrumentId=p.tempSubjectId,r()}],key:g.value,class:[A.popSelect]},{default:()=>[t("span",{class:[A.textBtn,w(g.instruments).selected&&A.textBtnActive]},[w(g.instruments).name||g.name,t("i",{class:A.iconArrow},null)])]}):t("span",{class:[A.textBtn,i.musicalInstrumentId===g.value&&A.textBtnActive],onClick:()=>{i.musicalInstrumentId=g.value,p.tempSubjectId=null,r()}},[g.name])))?h:{default:()=>[h]})]}),t(xe,{class:[A.inputSearch],round:!0,onSearch:g=>{i.name=g,b()}},null)]}})])}}}),ra=e=>{if(e==="shareResources")return 2;if(e==="myResources")return 3;if(e==="myCollect")return 4},H=N({name:"select-music",props:{cardType:{type:String,default:""},type:{type:String,default:""},from:{type:String,default:""}},emits:["add"],setup(e,{emit:l}){const a=He(),i=R({searchHeight:"0px",loading:!1,finshed:!1,pagination:{page:1,rows:20},searchGroup:{name:"",type:"MUSIC",musicSheetCategoriesId:"",musicalInstrumentId:"",audioPlayTypes:e.cardType==="homerowk-record"||e.cardType==="prepare"?["PLAY"]:[],sourceType:ra(e.type),status:1,versionFlag:!1,subjectId:null},tableList:[],show:!1,item:{},isShowAddDisabled:!a.getIsEditTrain}),p="musicSearchGroup"+ +new Date,s=async()=>{try{i.pagination.page===1&&(i.loading=!0);const{data:n}=await Ue({...i.searchGroup,...i.pagination});if(i.loading=!1,n.current===1&&i.tableList.length>0)return;const y=n.rows||[],I=[];y.forEach(c=>{I.push({id:c.id,coverImg:c.coverImg||c.musicSvg,type:"MUSIC",title:c.name,isCollect:!!c.favoriteFlag,isSelected:c.sourceFrom==="PLATFORM",refFlag:c.refFlag,content:c.id,xmlFileUrl:c.xmlFileUrl,playSpeed:c.playSpeed?Number(c.playSpeed):null,audioPlayTypeArray:c.audioPlayTypes?c.audioPlayTypes.split(","):[],containAccompaniment:c.containAccompaniment})}),i.tableList.push(...I),i.finshed=n.pages<=n.current}catch(n){i.loading=!1}},r=n=>{i.pagination.page=1,i.tableList=[],i.searchGroup=Object.assign(i.searchGroup,n),s()},b=Ge(n=>{r(n)},300),o=ne(()=>{i.pagination.page=i.pagination.page+1,s()},300),f=async n=>{try{await Me({materialId:n.id,favoriteFlag:n.isCollect?0:1,type:n.type}),n.isCollect=!n.isCollect}catch(y){}};return M(()=>{re(document.querySelector("."+p),n=>{const y=n[0],{height:I}=y.contentRect;i.searchHeight=I+"px"}),e.type==="homework"&&(i.isShowAddDisabled=!1)}),()=>t("div",{class:A.selectMusic},[t(Q,{class:A.listContainer,style:{"max-height":"calc(85vh - var(--modal-lesson-tab-height) - 12px) "},onScroll:n=>{var S,d,w;const y=(S=n.target)==null?void 0:S.clientHeight,I=(d=n.target)==null?void 0:d.scrollTop,c=(w=n.target)==null?void 0:w.scrollHeight;y+I+20>=c&&!i.finshed&&!i.loading&&o()}},{default:()=>[t("div",{class:p},[t(na,{type:e.type,onSearch:(n,y)=>{y?r(n):b(n)}},null)]),t(we,{show:i.loading,size:"small"},{default:()=>[t("div",{style:{"min-height":"calc(85vh - var(--modal-lesson-tab-height) - ".concat(i.searchHeight," - 12px)")},class:[A.listSection,!i.loading&&i.tableList.length<=0?A.emptySection:""]},[i.tableList.length>0&&t("div",{class:A.list},[i.tableList.map(n=>t(Ne,{isShowAdd:!0,isShowCollect:!0,item:n,onAdd:()=>l("add",n),disabledMouseHover:!1,onClick:()=>{n.type!=="IMG"&&(i.show=!0,i.item={instrumentId:i.searchGroup.musicalInstrumentId||null,...n})},onCollect:y=>f(y)},null))]),!i.loading&&i.tableList.length<=0&&t(Pe,null,null)])]})]}),t(ie,{from:e.from,show:i.show,"onUpdate:show":n=>i.show=n,item:i.item,isDownload:!1},null)])}}),Ba=N({name:"select-music",props:{type:{type:String,default:"myResources"},cardType:{type:String,default:""},from:{type:String,default:""}},emits:["select","add"],setup(e,{emit:l}){const{type:a}=se(e),i=B(a.value),p=le();return M(async()=>{re(document.querySelector(".select-resource .n-tabs-nav--top"),s=>{const r=s[0],{height:b}=r.contentRect;document.documentElement.style.setProperty("--modal-lesson-tab-height",b+"px")}),await p.getMusicSheetCategory(!0)}),()=>t("div",{class:[j.selectMusic,"select-resource"]},[t(_e,{animated:!0,value:i.value,paneClass:j.paneTitle,justifyContent:"center",paneWrapperClass:j.paneWrapperContainer,"onUpdate:value":s=>{i.value=s}},{default:()=>[t(q,{name:"myResources",tab:"我的曲目"},{default:()=>[t(H,{cardType:e.cardType,from:e.from,type:"myResources",onAdd:s=>l("add",s)},null)]}),t(q,{name:"shareResources",tab:"共享曲目"},{default:()=>[t(H,{from:e.from,cardType:e.cardType,type:"shareResources",onAdd:s=>l("add",s)},null)]}),t(q,{name:"myCollect",tab:"收藏曲目"},{default:()=>[t(H,{from:e.from,cardType:e.cardType,type:"myCollect",onAdd:s=>l("add",s)},null)]})]})])}});export{Ta as R,Ba as S,ba as T,Ia as a,Ca as b,vt as i,He as u};
|