index-7bfe5f9f-1743496079034.js 37 KB

1
  1. import{C as me,E as pe,d as N,I as fe,L as ee,J as U,dn as Q,Q as ge,A as K,dp as he,bi as Ae,c as ye,b as V,r as B,f as t,w as ve,x as L,aq as D,b1 as Se,k as v,ai as F,bt as be,au as G,j as T,l as H,m as Z,aa as Ie,b3 as Y,e as R,q as M,N as z,g as _,b2 as k,i as W,a8 as te,aL as Ce,b4 as ae,a5 as Te,a9 as Be,t as we,v as P}from"./index-32ff339b-1743496079034.js";import{C as se}from"./index-1b97ce1c-1743496079034.js";import{v as _e}from"./urlUtils-b5855a3c-1743496079034.js";import{F as Ee,C as Le}from"./index-b35a1314-1743496079034.js";import{T as Ne}from"./index-f6cdd761-1743496079034.js";import{N as O}from"./Scrollbar-116ac88a-1743496079034.js";import{v as Re,w as ke}from"./api-d57212df-1743496079034.js";import{N as De}from"./Cascader-3026ed48-1743496079034.js";import{T as Fe}from"./index-f30ec7e4-1743496079034.js";import{u as ie,f as xe,m as Me}from"./catchData-e5072c59-1743496079034.js";import{a as le,u as Ue}from"./index-e2ab6121-1743496079034.js";import{T as Ge}from"./index-f645f05d-1743496079034.js";import{u as ne}from"./index-a098cb7e-1743496079034.js";const Pe=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 ")]),qe=Object.assign(Object.assign({},ee.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),J=N({name:"InputGroupLabel",props:qe,setup(e){const{mergedBorderedRef:l,mergedClsPrefixRef:a,inlineThemeDisabled:i}=fe(e),p=ee("Input","-input-group-label",Pe,he,e,a),s=U(()=>{const{size:b}=e,{common:{cubicBezierEaseInOut:u},self:{groupLabelColor:f,borderRadius:r,groupLabelTextColor:y,lineHeight:I,groupLabelBorder:o,[Q("fontSize",b)]:S,[Q("height",b)]:d}}=p.value;return{"--n-bezier":u,"--n-group-label-color":f,"--n-group-label-border":o,"--n-border-radius":r,"--n-group-label-text-color":y,"--n-font-size":S,"--n-line-height":I,"--n-height":d}}),n=i?ge("input-group-label",U(()=>e.size[0]),s,e):void 0;return{mergedClsPrefix:a,mergedBordered:l,cssVars:i?void 0:s,themeClass:n==null?void 0:n.themeClass,onRender:n==null?void 0:n.onRender}},render(){var e,l,a;const{mergedClsPrefix:i}=this;return(e=this.onRender)===null||e===void 0||e.call(this),K("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?K("div",{class:"".concat(i,"-input-group-label__border")}):null)}}),je=Ae("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}),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}},actions:{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}}}),He="_trainType_h6q64_1",Ve="_overflowBg_h6q64_11",ze="_iconDelete_h6q64_26",Oe="_trainDisabled_h6q64_31",Qe="_title_h6q64_40",Ke="_btn_h6q64_55",Ze="_preview_h6q64_100",Ye="_previewBtn_h6q64_115",We="_disPreview_h6q64_121",Je="_disPreviewDivide_h6q64_134",Xe="_BProgress_h6q64_144",$e="_audioPlayTypeSection_h6q64_176",et="_iconType_h6q64_183",tt="_iconPlay_h6q64_188",at="_iconSing_h6q64_196",st="_type_h6q64_210",it="_operation_h6q64_216",lt="_iconEdit_h6q64_226",nt="_trainInfo_h6q64_237",rt="_trainName_h6q64_240",ot="_PRACTICE_h6q64_262",ct="_EVALUATION_h6q64_265",ut="_tagList_h6q64_268",dt="_offShelfBg_h6q64_281",mt="_offShelfTips_h6q64_295",pt="_offShelfBtn_h6q64_302",ft="_removeVisiable_h6q64_307",gt="_studentRemove_h6q64_313",ht="_btnGroupModal_h6q64_325",At="_reportModel_h6q64_332",c={trainType:He,overflowBg:Ve,iconDelete:ze,trainDisabled:Oe,"train-header":"_train-header_h6q64_34",title:Qe,"title-tag":"_title-tag_h6q64_47","title-text":"_title-text_h6q64_52",btn:Ke,"train-content":"_train-content_h6q64_80",preview:Ze,previewBtn:Ye,disPreview:We,disPreviewDivide:Je,BProgress:Xe,audioPlayTypeSection:$e,iconType:et,iconPlay:tt,iconSing:at,"train-footer":"_train-footer_h6q64_204",type:st,operation:it,iconEdit:lt,trainInfo:nt,trainName:rt,PRACTICE:ot,EVALUATION:ct,tagList:ut,offShelfBg:dt,offShelfTips:mt,offShelfBtn:pt,removeVisiable:ft,studentRemove:gt,btnGroupModal:ht,reportModel:At},yt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAv1JREFUaEPdmk3LElEUgJ+Xoi+VXmoXFlHbqIjQWhhoYAujRUofBG76C1K/ofAvtBGiD7RF5OIVUshFKREVbYsoaZcUal8U1XmZsdswztwZxzdus9M599zz3HvuuefcO0sY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YjiukfM4s4JKMlAlMUdBUEjYvkfAUAyQwoQzc/PIyfH0TLISdtt5Zmbm8OZM2dspTUk+i9ARH/knDsKIdJOXVZWFlZXhc+2OamwZR6K+C8uLoJ28hyILoToKMhMSm/fvq2E9E5qX1drOO3vUrQtLy/PAQslSxmdGwlpG0LTfHBwgOnpaaytkY8XfqH1zfnz55XFn0PRb0Oow0Z4o8qh8kjMpt+oUoHQoX2hrUyrlu3t7WF2dtY0FGiV1+x3Cibl5uYiMTHRSfZgeY5vZapQhDa7g2kgQ0uVp+EkU2hYEOSMDDpMLUXMN7tVIHSjQeg4RKAq9fb2orq6WkqNjYX09PSgqqpKVtmBj0PI7CW7u7tKRJ2OTMgUMqAzMzNISkqSUWzwAzMqEPJchY9UmdWO/JSNjQ2pNiQ1NdWpn2Gsor0jVSoU79CdPz7vWKZJf/cO7ppDobsx3tFuw/ChOzLe4X8DlGi+K6M1Rc71EK20KL8zYwsGtdXyvozJ8PGumBmgeJcQjROQd03VfEr2LjKbrVe8q+4B1pjeYwiBwXjPZQQYSt6DKsEiNn5P7tBzO/Tsjp0nd+i5HXp2J/qf3JERzjqJMv4Fq+ybxlEMybAAAAAASUVORK5CYII=",Sa=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=ye(),i=V(),p=B(!1),s=B(!1),n=B({type:"MUSIC",content:e.item.musicId,title:e.item.musicName}),b=()=>{n.value={type:"MUSIC",content:e.item.musicId,title:e.item.musicName},s.value=!0},u=B(""),f=B(!1),r=o=>{if(!o.id){i.error("暂无评测记录");return}const S=a.getToken;u.value=_e()+"/instrument/#/evaluat-report?id=".concat(o.id,"&Authorization=").concat(S),f.value=!0},y=async()=>{var o;try{if(!((o=e.item)!=null&&o.recordId)){i.error("暂无数据");return}const{data:S}=await Ee({id:e.item.recordId});if(S.videoFilePath||S.recordFilePath){let d="";S.videoFilePath?d=Y(S.videoFilePath):d=Y(S.recordFilePath);const E=S.videoFilePath||S.recordFilePath;n.value.content=E,n.value.title=e.item.musicName,d==="video"?n.value.type="VIDEO":d==="audio"&&(n.value.type="SONG"),s.value=!0}else i.error("暂无数据")}catch(S){}},I=U(()=>{const o=e.item;return o?o.trainingType==="EVALUATION"?(o.trainingTimes||0)>=(o.allTimes||0):(o.trainingTimes?parseInt(o.trainingTimes/60+""):0)>=(o.allTimes||0):!1});return U(()=>!!(e.isDisabled&&!e.isCLassWork&&e.item.trainingType==="EVALUATION")),()=>{var o,S;return t("div",{class:[c.trainType,e.item.trainingType==="EVALUATION"?c.evaluationType:""],onClick:()=>l("click",e.item)},[t("div",{class:[c["train-content"],e.isDisabled&&!e.isCLassWork&&c.trainDisabled,e.isLarge&&c.trainDisabled],onClick:()=>{e.isDisabled&&!e.isCLassWork||b()}},[t(ve,{src:e.item.coverImg,previewDisabled:!0,objectFit:"contain"},null),t(L,{class:c.audioPlayTypeSection},{default:()=>{var d,E;return[((d=e.item.audioPlayTypeArray)==null?void 0:d.includes("SING"))&&t(D,{trigger:"hover",showArrow:!1},{trigger:()=>t("span",{class:[c.iconType,c.iconSing]},null),default:"演唱场景"}),((E=e.item.audioPlayTypeArray)==null?void 0:E.includes("PLAY"))&&t(D,{trigger:"hover",showArrow:!1},{trigger:()=>t("span",{class:[c.iconType,c.iconPlay]},null),default:"演奏场景"})]}}),e.isDisabled&&!e.isCLassWork?t("div",{class:c.disPreview},[t(Se,{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:c.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:c.disPreviewDivide},[e.item.trainingType==="EVALUATION"?"达标分数":"练习时长要求",e.item.allTimes,e.item.trainingType==="EVALUATION"?"分":"分钟"])]):null,e.isDelete&&t("img",{src:yt,class:c.iconDelete,onClick:d=>{d.stopPropagation(),l("delete",e.item)}},null)]),t("div",{class:c["train-footer"]},[t("div",{class:c.trainInfo},[t("div",{class:c.trainName},[t("span",{class:[c.type,c[e.item.trainingType]]},[e.item.trainingType==="EVALUATION"?"评测":"练习"]),t("div",{class:c["title-text"]},[t(Ne,{text:e.item.musicName},null)])]),t("div",{class:c.tagList},[(o=e.item.typeList)==null?void 0:o.map((d,E)=>t(F,null,[t("span",null,[d]),e.item.typeList.length-1>E&&t(be,{vertical:!0},null)]))])]),e.isDisabled?null:t(L,{size:12},{default:()=>[t(G("n-button"),{quaternary:!0,disabled:!e.isDelete,class:c.operation,onClick:d=>{d.stopPropagation(),l("edit",e.item)}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("i",{class:c.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(G("n-button"),{quaternary:!0,disabled:e.isDelete,class:c.operation,onClick:d=>{d.stopPropagation(),r({id:e.item.recordId})}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("img",{src:St},null),default:"评测报告"})]}),t(G("n-button"),{quaternary:!0,disabled:e.isDelete,class:c.operation,onClick:d=>{d.stopPropagation(),y()}},{default:()=>[t(D,{showArrow:!1},{trigger:()=>t("img",{src:vt},null),default:"查看回放"})]})]})]):""]),e.offShelf&&t("div",{class:c.offShelfBg},[t("p",{class:c.offShelfTips},[v("该资源已被下架")]),t(T,{type:"primary",class:c.offShelfBtn,onClick:()=>l("offShelf")},{default:()=>[v("确认")]})]),t(H,{maskClosable:Z,show:p.value,"onUpdate:show":d=>p.value=d,preset:"card",class:["modalTitle",c.removeVisiable],title:"提示"},{default:()=>[t("div",{class:c.studentRemove},[t("p",null,[v("您确定是否删除?")]),t(L,{class:c.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(se,{from:e.from,show:s.value,"onUpdate:show":d=>s.value=d,item:n.value,isDownload:!1},null),t(H,{maskClosable:Z,show:f.value,"onUpdate:show":d=>f.value=d,preset:"card",class:["modalTitle background",c.reportModel],title:"评测报告"},{default:()=>[t("div",{class:c.reportContainer,style:{lineHeight:0}},[t("iframe",{width:"100%",height:"450px",frameborder:"0",onLoad:d=>{Ie(d.target)},src:u.value},null)])]})])}}}),bt="_trainUpdate_4zbne_1",It="_updateBtnGroup_4zbne_5",Ct="_active_4zbne_17",Tt="_difficultySpace_4zbne_21",Bt="_scoreGroup_4zbne_34",C={trainUpdate:bt,updateBtnGroup:It,switch:"_switch_4zbne_13",active:Ct,difficultySpace:Tt,scoreGroup:Bt},ba=N({name:"train-update",props:{item:{type:Object,default:()=>({})},type:{type:String,default:"train"}},emits:["close","confirm"],setup(e,{emit:l}){V();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 n=>{if(!n){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:""},u={};u.practiceChapterBegin=a.minScore,u.practiceChapterEnd=a.maxScore,a.type==="PRACTICE"?(u.practiceSpeed=a.practiceSpeed,u.trainingTimes=a.practiceTimes):(u.evaluateDifficult=a.difficulty,u.evaluateSpeed=a.evaluationSpeed,u.trainingTimes=a.evaluationScore),u.practiceChapterMax=a.baseMaxScore,u.firstMeasureIsZero=a.firstMeasureIsZero,b.trainingConfigJson=u,l("close"),l("confirm",b)}catch(b){}a.uploading=!1}})};return M(()=>{const s=e.item,n=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):n||null,a.evaluationSpeed=s.practiceSpeed?Number(s.practiceSpeed):n||null):(a.evaluationScore=s.trainingTimes,a.evaluationSpeed=s.evaluateSpeed?Number(s.evaluateSpeed):n||null,a.practiceSpeed=s.evaluateSpeed?Number(s.evaluateSpeed):n||null)):(a.minScore=s.firstMeasureIsZero?0:1,a.maxScore=s.practiceChapterMax?s.practiceChapterMax:1,a.evaluationSpeed=n||null,a.practiceSpeed=n||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(z,{ref:i,model:a,labelAlign:"right",labelPlacement:"left"},{default:()=>[t(_,{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(_,{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(_,{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(_,{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(_,{label:"练习时长",path:"practiceTimes",rule:[{required:!0,message:"请输入练习时长",trigger:["blur","change"],type:"number"}]},{default:()=>[t(W,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(J,null,{default:()=>[v("分钟")]})]})]}),t(_,{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(_,{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(_,{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(_,{label:"达标分数",path:"evaluationScore",rule:[{required:!0,message:"请输入达标分数",trigger:["blur","change"],type:"number"}]},{default:()=>[t(W,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(J,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("确认")]})]})])}}),wt="_theTipDialog_yxxpw_1",_t="_tipCon_yxxpw_4",Et="_tipBox_yxxpw_8",Lt="_tip_yxxpw_4",Nt="_tipBtnBox_yxxpw_29",x={theTipDialog:wt,tipCon:_t,tipBox:Et,tip:Lt,tipBtnBox:Nt},Ia=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(H,{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(O,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]})])])]})}}),Rt="_addClass_oq0dk_1",kt="_btnGroup_oq0dk_18",X={addClass:Rt,btnGroup:kt};function Dt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!te(e)}const Ca=N({props:{activeRow:{type:Array,default:()=>[]}},name:"resetSubjectList",emits:["close","getList"],setup(e,{emit:l}){const a=R({uploading:!1}),i=V(),p=B(),s=R({classList:e.activeRow});M(()=>{b()});const n=()=>{p.value.validate(async u=>{if(!u){a.uploading=!0;try{const f=[];s.classList.forEach(r=>{f.push({id:r.classGroupId,instrumentId:r.instrumentId})}),await ke(f),i.success("修改成功"),l("close"),l("getList"),a.uploading=!1}catch(f){console.log(f)}a.uploading=!1}})},b=async()=>{try{const u=e.activeRow.map(r=>r.classGroupId),{data:f}=await Re(u);Array.isArray(f)&&s.classList.forEach(r=>{const y=f.find(I=>I.classGroupId===r.classGroupId);y&&(r.subjectList=y.subjectList||[])})}catch(u){}};return()=>{let u;return t("div",{class:[X.addClass]},[t(z,{"label-placement":"top",model:s,ref:p},{default:()=>[t(O,{style:"max-height: 360px; padding: 0 30px"},Dt(u=s.classList.map((f,r)=>t(_,{path:"classList[".concat(r,"].instrumentId"),label:f.classGroupName,showRequireMark:!1,rule:[{required:!0,message:"请选择乐器",trigger:"change"}]},{default:()=>[t(De,{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)]})))?u:{default:()=>[u]})]}),t(L,{class:X.btnGroup,justify:"end"},{default:()=>[t(T,{secondary:!0,onClick:()=>l("close")},{default:()=>[v("取消")]}),t(T,{loading:a.uploading,onClick:()=>n(),type:"primary"},{default:()=>[v("确认")]})]})])}}}),Ft="_selectMusic_fj7p5_1",xt="_close_fj7p5_37",Mt="_listContainer_fj7p5_44",q={selectMusic:Ft,close:xt,listContainer:Mt},Ut="_selectMusic_1mm1o_1",Gt="_close_1mm1o_1",Pt="_listContainer_1mm1o_8",qt="_emptySection_1mm1o_11",jt="_list_1mm1o_8",Ht="_searchGroup_1mm1o_24",Vt="_inputSearch_1mm1o_47",zt="_searchBtn_1mm1o_62",Ot="_popSelect_1mm1o_68",Qt="_spaceSection2_1mm1o_78",Kt="_textBtn_1mm1o_87",Zt="_iconArrow_1mm1o_99",Yt="_textBtnActive_1mm1o_108",Wt="_spaceSection_1mm1o_78",Jt="_collapseWrap_1mm1o_124",Xt="_collaoseGroup_1mm1o_130",$t="_collaoseBtn_1mm1o_137",ea="_isStart_1mm1o_142",ta="_collapsSection_1mm1o_145",aa="_collapsSectionEmpty_1mm1o_148",sa="_isHidden_1mm1o_153",ia="_hideButton_1mm1o_157",A={selectMusic:Ut,close:Gt,listContainer:Pt,emptySection:qt,list:jt,searchGroup:Ht,inputSearch:Vt,searchBtn:zt,popSelect:Ot,spaceSection2:Qt,textBtn:Kt,iconArrow:Zt,textBtnActive:Yt,spaceSection:Wt,collapseWrap:Jt,collaoseGroup:Xt,collaoseBtn:$t,isStart:ea,collapsSection:ta,collapsSectionEmpty:aa,isHidden:sa,hideButton:ia};function $(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!te(e)}const re=N({name:"ChildNodeSearch",props:{activeRow:{type:Object,default:()=>({})},list:{type:Array,default:()=>[]}},emits:["selectChildTag"],setup(e,{emit:l}){const{activeRow:a}=ae(e),i=B({});return Te(()=>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(_,{label:a.value.columnName+":"},{default:()=>[t(L,{class:A.spaceSection2},{default:()=>{var s;return[(s=a.value)==null?void 0:s.children.map(n=>t("span",{class:[A.textBtn,(a.value.activeIndex||"")==n.id&&A.textBtnActive],onClick:()=>{a.value.activeIndex=n.id;let b,u="";n.children?(b=[{columnName:n.children[0].columnName,name:"全部",id:""},...n.children],u=n.children[0].columnName,i.value={...n,columnName:u,activeIndex:"",children:b}):i.value={},l("selectChildTag",a.value.activeIndex)}},[n.name]))]}})]}),t(re,{activeRow:i.value,onSelectChildTag:s=>{l("selectChildTag",s||a.value.activeIndex)}},null)])])}}}),la=N({name:"search-group",props:{type:{type:String,default:""}},emits:["search","add"],setup(e,{emit:l}){const a=ie(),i=R({name:"",bookVersionId:null,musicalInstrumentId:null}),p=R({tempSubjectId:null,gradeList:[],musicCategory:[]}),s=R({selectParents:{},tags:[],tagActiveId:"",tagActive:{},childSelectId:null}),n=m=>{l("search",{...i,bookVersionId:s.childSelectId||s.tagActiveId},m)},b=le(()=>{n()},500),u=B(),f=B([]),r=B(0),y=B(0),I=B(0),o=B(!1),S=B(!1),d=()=>{try{f.value=[...new Set(f.value)];let m=-1;f.value.forEach((h,w)=>{w===0?(I.value=1,m=h.offsetLeft):h.offsetLeft===m&&w!=0&&I.value++,o.value?h.style.display="block":I.value>1?h.style.display="none":h.style.display="block"}),S.value=!0}catch(m){}},E=m=>{const h={};return m==null||m.forEach(w=>{w.id===i.musicalInstrumentId&&(h.selected=!0,h.name=w.name)}),h},oe=()=>{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,w="";m.children?(h=[{columnName:m.children[0].columnName,name:"全部",id:""},...m.children],w=m.children[0].columnName,s.selectParents={...m,columnName:w,activeIndex:"",children:h}):s.selectParents={},n()},ue=()=>{var h,w;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=(w=g.instruments[0])==null?void 0:w.value):i.musicalInstrumentId=g.value}};return M(async()=>{var m,h;await a.getMusicTagTreeApi(),oe(),await a.getSubjects(),r.value=(m=u.value)==null?void 0:m.offsetHeight,y.value=((h=u.value)==null?void 0:h.offsetHeight)/I.value,d(),ue(),n("timer")}),()=>{let m,h;return t("div",{class:A.searchGroup},[t(z,{labelAlign:"left",labelPlacement:"left"},{default:()=>{var w;return[t("div",{class:[A.collapsSection,e.type==="myResources"&&A.collapsSectionEmpty]},[t(_,{label:((w=s.tags[0])==null?void 0:w.columnName)+":"},{default:()=>[t(L,{class:A.spaceSection2},$(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(re,{activeRow:s.selectParents,onSelectChildTag:g=>{s.childSelectId=g,n()}},null)]),t(_,{label:"乐器:"},{default:()=>[t(L,{class:A.spaceSection2},$(h=a.getSubjectInstrumentOnly.map(g=>g.instruments&&g.instruments.length>1?t(Ce,{options:g.instruments,trigger:"hover",scrollable:!0,value:p.tempSubjectId,"onUpdate:value":[de=>p.tempSubjectId=de,()=>{i.musicalInstrumentId=p.tempSubjectId,n()}],key:g.value,class:[A.popSelect]},{default:()=>[t("span",{class:[A.textBtn,E(g.instruments).selected&&A.textBtnActive]},[E(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,n()}},[g.name])))?h:{default:()=>[h]})]}),t(Fe,{class:[A.inputSearch],round:!0,onSearch:g=>{i.name=g,b()}},null)]}})])}}}),na=e=>{if(e==="shareResources")return 2;if(e==="myResources")return 3;if(e==="myCollect")return 4},j=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=je(),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:na(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:r}=await Me({...i.searchGroup,...i.pagination});if(i.loading=!1,r.current===1&&i.tableList.length>0)return;const y=r.rows||[],I=[];y.forEach(o=>{I.push({id:o.id,coverImg:o.coverImg||o.musicSvg,type:"MUSIC",title:o.name,isCollect:!!o.favoriteFlag,isSelected:o.sourceFrom==="PLATFORM",refFlag:o.refFlag,content:o.id,xmlFileUrl:o.xmlFileUrl,playSpeed:o.playSpeed?Number(o.playSpeed):null,audioPlayTypeArray:o.audioPlayTypes?o.audioPlayTypes.split(","):[],containAccompaniment:o.containAccompaniment})}),i.tableList.push(...I),i.finshed=r.pages<=r.current}catch(r){i.loading=!1}},n=r=>{i.pagination.page=1,i.tableList=[],i.searchGroup=Object.assign(i.searchGroup,r),s()},b=Ue(r=>{n(r)},300),u=le(()=>{i.pagination.page=i.pagination.page+1,s()},300),f=async r=>{try{await xe({materialId:r.id,favoriteFlag:r.isCollect?0:1,type:r.type}),r.isCollect=!r.isCollect}catch(y){}};return M(()=>{ne(document.querySelector("."+p),r=>{const y=r[0],{height:I}=y.contentRect;i.searchHeight=I+"px"}),e.type==="homework"&&(i.isShowAddDisabled=!1)}),()=>t("div",{class:A.selectMusic},[t(O,{class:A.listContainer,style:{"max-height":"calc(85vh - var(--modal-lesson-tab-height) - 12px) "},onScroll:r=>{var S,d,E;const y=(S=r.target)==null?void 0:S.clientHeight,I=(d=r.target)==null?void 0:d.scrollTop,o=(E=r.target)==null?void 0:E.scrollHeight;y+I+20>=o&&!i.finshed&&!i.loading&&u()}},{default:()=>[t("div",{class:p},[t(la,{type:e.type,onSearch:(r,y)=>{y?n(r):b(r)}},null)]),t(Be,{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(r=>t(Le,{isShowAdd:!0,isShowCollect:!0,item:r,onAdd:()=>l("add",r),disabledMouseHover:!1,onClick:()=>{r.type!=="IMG"&&(i.show=!0,i.item={instrumentId:i.searchGroup.musicalInstrumentId||null,...r})},onCollect:y=>f(y)},null))]),!i.loading&&i.tableList.length<=0&&t(Ge,null,null)])]})]}),t(se,{from:e.from,show:i.show,"onUpdate:show":r=>i.show=r,item:i.item,isDownload:!1},null)])}}),Ta=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}=ae(e),i=B(a.value),p=ie();return M(async()=>{ne(document.querySelector(".select-resource .n-tabs-nav--top"),s=>{const n=s[0],{height:b}=n.contentRect;document.documentElement.style.setProperty("--modal-lesson-tab-height",b+"px")}),await p.getMusicSheetCategory(!0)}),()=>t("div",{class:[q.selectMusic,"select-resource"]},[t(we,{animated:!0,value:i.value,paneClass:q.paneTitle,justifyContent:"center",paneWrapperClass:q.paneWrapperContainer,"onUpdate:value":s=>{i.value=s}},{default:()=>[t(P,{name:"myResources",tab:"我的曲目"},{default:()=>[t(j,{cardType:e.cardType,from:e.from,type:"myResources",onAdd:s=>l("add",s)},null)]}),t(P,{name:"shareResources",tab:"共享曲目"},{default:()=>[t(j,{from:e.from,cardType:e.cardType,type:"shareResources",onAdd:s=>l("add",s)},null)]}),t(P,{name:"myCollect",tab:"收藏曲目"},{default:()=>[t(j,{from:e.from,cardType:e.cardType,type:"myCollect",onAdd:s=>l("add",s)},null)]})]})])}});export{Ca as R,Ta as S,Sa as T,ba as a,Ia as b,yt as i,je as u};