(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-07477ad6"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,s){return e/=s/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var s=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=n(),o=e-i,c=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=c;var n=Math.easeInOutQuad(l,i,o,t);a(n),l1?r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"所属轨道",prop:"sysMusicScoreAccompaniments."+s+".track",rules:[{required:!0,message:"请选择所属轨道"}]}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:"",placeholder:"请选择轨道"},model:{value:t.track,callback:function(r){e.$set(t,"track",r)},expression:"song.track"}},e._l(e.partListNames,(function(t){return r("el-option",{key:t,attrs:{value:t,label:t,disabled:e.hasPartName(t)}})})),1)],1)],1):e._e()],1),e._v(" "),r("el-button",{staticClass:"file-remove",attrs:{type:"text",disabled:1==e.form.sysMusicScoreAccompaniments.length},on:{click:function(t){return e.removeSys(s)}}},[e._v("删除")])],1)})),e._v(" "),r("el-button",{staticStyle:{width:"100%","margin-bottom":"20px"},attrs:{type:"info",plain:""},on:{click:e.createSys}},[e._v("添加原音")]),e._v(" "),r("div",{staticClass:"btns"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("提交")]),e._v(" "),r("el-button",{on:{click:e.$listeners.close}},[e._v("取消")])],1)],2)],1)},h=[],b=(r("ac6a"),r("5df3"),r("1c4c"),r("7f7f"),r("c5f6"),r("bc3a")),v=r.n(b),y=r("1672"),g={props:["detail","type"],data:function(){return{xmlFirstSpeed:"",partListNames:[],tree:[],memberRankList:[],form:{rankIdType:0,sysMusicScore:{isOpenMetronome:0,name:"",rankIds:"",url:"",metronomeUrl:"",midiUrl:"",order:"",musicScoreCategoriesId:[],clientType:"SMART_PRACTICE",renderFrom:"",playMode:"MP3",enableEvaluation:1},sysMusicScoreAccompaniments:[{subjectId:"",speed:"",mp3Url:"",xmlUrl:"",isShowFingering:!0,mome:"",track:""}],delExamSongAccompanimentIds:[]},treeProps:{value:"id",label:"name",children:"sysMusicScoreCategoriesList"}}},mounted:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$store.dispatch("setSubjects"),e.next=3,this.FetchTree();case 3:return e.next=5,this.memberRank();case 5:if(!this.detail){e.next=15;break}return this.$set(this.form,"sysMusicScore",{isOpenMetronome:Number(this.detail.isOpenMetronome),name:this.detail.name,url:this.detail.url,midiUrl:this.detail.midiUrl,rankIds:this.detail.rankIds,order:this.detail.order,clientType:this.detail.clientType,enableEvaluation:+this.detail.enableEvaluation,metronomeUrl:this.detail.metronomeUrl,renderFrom:this.detail.renderFrom,playMode:this.detail.playMode,musicScoreCategoriesId:this.detail.categoriesId?this.formatParentId(this.detail.categoriesId,this.tree):[]}),this.detail.rankIds?this.form.rankIdType=1:this.form.rankIdType=0,e.next=10,v()(this.detail.xmlUrl);case 10:t=e.sent,this.partListNames=this.getPartListNames(t.data),this.FeatchDetailList(),e.next=17;break;case 15:this.rankChange(1),this.form.rankIdType=1;case 17:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{getPartListNames:function(e){var t,r,s,a;if(!e)return[];var n=(new DOMParser).parseFromString(e,"text/xml"),i=(null===(t=n.getElementsByTagName("part-list"))||void 0===t||null===(r=t[0])||void 0===r?void 0:r.getElementsByTagName("score-part"))||[],o=Array.from(i).map((function(e){var t;return(null===(t=e.getElementsByTagName("part-name"))||void 0===t?void 0:t[0].textContent)||""}));return this.xmlFirstSpeed=(null===(s=n.getElementsByTagName("per-minute"))||void 0===s||null===(a=s[0])||void 0===a?void 0:a.textContent)||"",o},inputFile:function(e){var t=this,r=new FileReader;r.onload=function(e){t.partListNames=t.getPartListNames(e.target.result);for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:[],a=Object(c["a"])(t);try{for(a.s();!(r=a.n()).done;){var n=r.value;if(n.sysMusicScoreCategoriesList){var i=this.formatParentId(e,n.sysMusicScoreCategoriesList,[].concat(Object(o["a"])(s),[n.id]));if(i.includes(e))return i}if(n.id===e)return[].concat(Object(o["a"])(s),[e])}}catch(l){a.e(l)}finally{a.f()}return s},FetchTree:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d["g"])();case 3:t=e.sent,this.tree=t.data,this.formatTree(this.tree),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),formatTree:function(e){var t,r=Object(c["a"])(e);try{for(r.s();!(t=r.n()).done;){var s=t.value;s.sysMusicScoreCategoriesList&&s.sysMusicScoreCategoriesList.length>0?this.formatTree(s.sysMusicScoreCategoriesList,s):s.sysMusicScoreCategoriesList=null}}catch(a){r.e(a)}finally{r.f()}},FeatchDetailList:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d["f"])({sysMusicScoreId:this.detail.id});case 3:t=e.sent,r=t.data||[],r.forEach((function(e){e.subjectId||(e.subjectId=null)})),this.$set(this.form,"sysMusicScoreAccompaniments",r),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}(),createSys:function(e){this.form.sysMusicScoreAccompaniments.push(Object.assign({subjectId:"",speed:"",mp3Url:"",xmlUrl:"",track:""},e||{}))},removeSys:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否确认删除此原音?","提示",{type:"warning"});case 3:this.form.sysMusicScoreAccompaniments[t]&&this.form.delExamSongAccompanimentIds.push(this.form.sysMusicScoreAccompaniments[t].id),this.form.sysMusicScoreAccompaniments.splice(t,1),e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(t){return e.apply(this,arguments)}return t}(),hasPartName:function(e){var t,r=[],s=Object(c["a"])(this.form.sysMusicScoreAccompaniments);try{for(s.s();!(t=s.n()).done;){var a=t.value;r.push(a.track)}}catch(n){s.e(n)}finally{s.f()}return r.includes(e)},hasSubjectId:function(e){var t,r=[],s=Object(c["a"])(this.form.sysMusicScoreAccompaniments);try{for(s.s();!(t=s.n()).done;){var a=t.value;r.push(a.subjectId)}}catch(n){s.e(n)}finally{s.f()}return r.includes(e)},submit:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=12;break}if(t.detail){e.next=7;break}return e.next=4,Object(d["a"])(Object(n["a"])(Object(n["a"])({},t.form),{},{sysMusicScore:Object(n["a"])(Object(n["a"])({},t.form.sysMusicScore),{},{type:"COMMON",showFlag:0,musicScoreCategoriesId:(t.form.sysMusicScore.musicScoreCategoriesId||[]).pop()})}));case 4:t.$message.success("提交成功"),e.next=10;break;case 7:return e.next=9,Object(d["e"])(Object(n["a"])(Object(n["a"])({},t.form),{},{sysMusicScore:Object(n["a"])(Object(n["a"])({},t.form.sysMusicScore),{},{type:"COMMON",id:t.detail.id,showFlag:t.detail.showFlag,musicScoreCategoriesId:(t.form.sysMusicScore.musicScoreCategoriesId||[]).pop()})}));case 9:t.$message.success("修改成功");case 10:t.$listeners.close(),t.$listeners.submited();case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},S=g,w=(r("4b92"),r("2877")),M=Object(w["a"])(S,f,h,!1,null,"696d07e4",null),k=M.exports,_=r("61f7"),x=r("5f87"),O=r("be41"),j=r("a5b0"),F={name:"accompaniment",components:{saveform:u["a"],pagination:m["a"],"submit-form":k,Tooltip:j["a"]},data:function(){return{tabName:"first",type:"",activeUrl:"",songUseType:p["songUseType"],lookVisible:!1,accompanyUrl:null,accompanyUrl2:null,audioVisible:!1,tableList:[],searchForm:{search:"",subjectId:"",categoriesId:[],clientType:"",rankType:null,showFlag:null},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},detail:null,visible:!1,tree:[],treeProps:{value:"id",label:"name",children:"sysMusicScoreCategoriesList",checkStrictly:!0,expandTrigger:"hover"}}},computed:{title:function(){var e=this.detail?"修改":"添加",t="COMMON"===this.type?"公用":"个人";return this.detail&&(t="COMMON"===this.detail.type?"公用":"个人"),e+t+"伴奏"}},mounted:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this.$route,t.query,r=t.params,e.next=3,this.FetchTree();case 3:return r.categoriesId&&(this.searchForm.categoriesId=this.formatParentId(r.categoriesId,this.tree)),this.$store.dispatch("setSubjects"),this.$store.dispatch("setBranchs"),e.next=8,this.FetchList();case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{formatParentId:function(e,t){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=Object(c["a"])(t);try{for(a.s();!(r=a.n()).done;){var n=r.value;if(n.sysMusicScoreCategoriesList){var i=this.formatParentId(e,n.sysMusicScoreCategoriesList,[].concat(Object(o["a"])(s),[n.id]));if(i.includes(e))return i}if(n.id===e)return[].concat(Object(o["a"])(s),[e])}}catch(l){a.e(l)}finally{a.f()}return s},FetchTree:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d["g"])();case 3:t=e.sent,this.tree=t.data,this.formatTree(this.tree),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),formatTree:function(e){var t,r=Object(c["a"])(e);try{for(r.s();!(t=r.n()).done;){var s=t.value;s.sysMusicScoreCategoriesList&&s.sysMusicScoreCategoriesList.length>0?this.formatTree(s.sysMusicScoreCategoriesList,s):s.sysMusicScoreCategoriesList=null}}catch(a){r.e(a)}finally{r.f()}},FetchList:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t,r,s,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=Object(O["a"])(this.searchForm),r=t.categoriesId,t.organId,s=Object(i["a"])(t,["categoriesId","organId"]),e.next=4,Object(d["c"])(Object(n["a"])(Object(n["a"])({},s),{},{categoriesId:r&&r.length>0?r.pop():null,page:this.rules.page,rows:this.rules.limit}));case 4:a=e.sent,this.tableList=a.data.rows,this.$set(this.rules,"total",a.data.total),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}(),submit:function(){var e=this;this.$set(this.rules,"page",1),this.$refs.searchForm.validate((function(t){t&&e.FetchList()}))},reset:function(){this.$refs.searchForm.resetFields(),this.FetchList()},looker:function(e,t){this.accompanyUrl=Object(_["f"])()+"/accompany?Authorization="+Object(x["b"])()+"&platform=web&isOpenMetronome="+t+"#/detail/"+e.id,this.lookVisible=!0},player:function(e){this.activeUrl=e.url,this.audioVisible=!0},changeStatus:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,r=t.showFlag?"停用":"启用",e.next=4,this.$confirm("是否确认"+r+"此伴奏?","提示",{type:"warning"});case 4:return e.next=6,Object(d["d"])({sysMusicScoreId:t.id,showFlag:t.showFlag?0:1});case 6:this.$message.success(r+"成功"),this.FetchList(),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](0);case 12:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(t){return e.apply(this,arguments)}return t}(),edit:function(e){this.detail=e,this.visible=!0},open:function(e){this.type=e,this.detail=null,this.visible=!0},remove:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否确认删除此伴奏?","提示",{type:"warning"});case 3:return e.next=5,Object(d["b"])(t.id);case 5:this.$message.success("删除成功"),this.FetchList(),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(t){return e.apply(this,arguments)}return t}(),changeCategor:function(e){this.$refs.myCascader.dropDownVisible=!1}}},I=F,C=(r("b5400"),r("c796"),Object(w["a"])(I,s,a,!1,null,"7979aeb0",null));t["default"]=C.exports},da51:function(e,t,r){},f716:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"f",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"g",(function(){return m}));var s=r("829b"),a=r("b775"),n=function(e){return Object(s["a"])({url:"/api-web/sysMusicScore/queryPage",data:{},params:e,requestType:"form"})},i=function(e){return Object(s["a"])({url:"/api-web/sysMusicScore/add",method:"post",data:e,params:{}})},o=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/update",method:"post",data:e,params:{}})},c=function(e){return Object(s["a"])({url:"/api-web/sysMusicScore/show",method:"post",data:e,requestType:"form"})},l=function(e){return Object(s["a"])({url:"/api-web/sysMusicScoreAccompaniment/queryPage",method:"get",params:e})},u=function(e){return Object(s["a"])({url:"/api-web/sysMusicScore/del",method:"post",data:{},params:{id:e},requestType:"form"})},m=function(e){return Object(s["a"])({url:"/api-web/sysMusicScoreCategories/queryTree",method:"get",data:{},params:e,requestType:"form"})}}}]);