1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41111f02"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function s(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 o(e,t,r){var o=n(),i=e-o,c=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=c;var n=Math.easeInOutQuad(l,o,i,t);s(n),l<t?a(e):r&&"function"===typeof r&&r()};u()}},1672:function(e,t,r){"use strict";r.d(t,"j",(function(){return s})),r.d(t,"o",(function(){return n})),r.d(t,"p",(function(){return o})),r.d(t,"n",(function(){return i})),r.d(t,"i",(function(){return c})),r.d(t,"g",(function(){return l})),r.d(t,"l",(function(){return u})),r.d(t,"m",(function(){return m})),r.d(t,"k",(function(){return d})),r.d(t,"t",(function(){return p})),r.d(t,"q",(function(){return f})),r.d(t,"h",(function(){return h})),r.d(t,"r",(function(){return b})),r.d(t,"f",(function(){return v})),r.d(t,"d",(function(){return y})),r.d(t,"e",(function(){return g})),r.d(t,"s",(function(){return S})),r.d(t,"a",(function(){return M})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return w}));var a=r("829b"),s=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/add",data:e,method:"post"})},n=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/createCalender",data:e,method:"post"})},o=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/updateCalender",data:e,method:"post"})},i=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/getDetail",data:{},params:e,method:"get"})},c=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/auditListDetail",data:{},params:e,method:"get"})},l=function(e){return Object(a["a"])({url:"/api-web/studentRegistration/getMusicGroupStu",data:{},params:e,method:"get"})},u=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalenderDetail/batchAdd",data:e,method:"post"})},m=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/update",data:e,method:"post"})},d=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/delByBatchNo",params:e,method:"post"})},p=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/revoke",data:{},params:e,method:"post"})},f=function(e){return Object(a["a"])({url:"/api-web/musicGroupOrganizationCourseSettingsDetail/queryByMusicGroupOrganizationCourseSettingsId",data:{},params:e,method:"get"})},h=function(e){return Object(a["a"])({url:"/api-web/musicGroupPaymentCalender/makesureSchoolePaid",data:e,method:"post",requestType:"form"})},b=function(e){return Object(a["a"])({url:"/api-web/organizationCourseDurationSettings/queryByOrganId",data:{},params:e,method:"get",requestType:"form"})},v=function(e){return Object(a["a"])({url:"/api-web/memberFeeSetting/findByRankId",data:{},params:e,method:"get",requestType:"form"})},y=function(e){return Object(a["a"])({url:"/api-web/memberRankSetting/findAll",method:"get",params:e})},g=function(e){return Object(a["a"])({url:"/api-web/tenantConfig/autoActivationFlag",method:"get",params:e})},S=function(e){return Object(a["a"])({url:"/api-web/cloudTeacherOrder/queryInactive",method:"post",data:e})},M=function(e){return Object(a["a"])({url:"/api-web/cloudTeacherOrder/cancelInactive",method:"post",data:e})},x=function(e){return Object(a["a"])({url:"/api-web/cloudTeacherOrder/pay",method:"post",data:e})},w=function(e){return Object(a["a"])({url:"/api-web/cloudTeacherOrder/payCheck",method:"get",hideLoading:!0,params:e})}},1932:function(e,t,r){},"377c":function(e,t,r){"use strict";r("1932")},"66a1":function(e,t,r){},"67f5":function(e,t,r){"use strict";r("66a1")},adb21:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var a=r("bc3a"),s=r.n(a),n=(r("4328"),r("5f87")),o=r("3908"),i=r("e3eb"),c=r.n(i),l=function(e,t,r,a){var i=t.url,l={method:t.method?t.method:"get",headers:{Authorization:Object(n["b"])(),tenantId:Object(n["a"])()},url:i,responseType:"blob"};"post"==l.method?l.data=t.params:l.params=t.params,e.$confirm(r||"您确定下载模板","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){o["a"].startLoading(),s()(c()(l)).then((function(r){var s=new Blob([r.data],{type:"application/vnd.ms-excel;charset=utf-8"}),n=new Response(s).text();n.then((function(r){if(-1!=r.indexOf("code")){var n=JSON.parse(r);if(403==n.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);200==n.code?e.$message.success(n.msg):e.$message.error(n.msg),a&&a()}else{var o=URL.createObjectURL(s),i=document.createElement("a"),c=t.fileName||"导出文件.xls";i.href=o,i.setAttribute("download",c),document.body.appendChild(i),i.click(),a&&a()}})),o["a"].endLoading()})).catch((function(t){console.log(t),e.$message.error("下载失败,请联系管理员"),o["a"].endLoading()}))})).catch((function(){}))}},b5400:function(e,t,r){"use strict";r("cab1")},be41:function(e,t,r){"use strict";r("5df3"),r("1c4c");var a=r("7618"),s=(r("456d"),r("ac6a"),function e(t){if(null===t)return null;var r=Object.assign({},t);return Object.keys(r).forEach((function(s){return r[s]="object"===Object(a["a"])(t[s])?e(t[s]):t[s]})),Array.isArray(t)?(r.length=t.length,Array.from(r)):r});t["a"]=s},cab1:function(e,t,r){},d342:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysMusicScore/add",expression:"'sysMusicScore/add'"}],attrs:{type:"primary"},on:{click:function(t){return e.open("COMMON")}}},[e._v("添加公用伴奏")]),e._v(" "),r("saveform",{ref:"searchForm",staticStyle:{"margin-top":"20px"},attrs:{model:e.searchForm,inline:""},on:{"update:model":function(t){e.searchForm=t}}},[r("el-form-item",{attrs:{prop:"search"}},[r("el-input",{attrs:{clearable:"",placeholder:"伴奏编号/伴奏名称"},on:{submit:e.submit,reset:e.reset},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.submit()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"categoriesId"}},[r("el-cascader",{ref:"myCascader",staticStyle:{width:"100%"},attrs:{"popper-class":"myCascader","show-all-levels":!0,clearable:"",options:e.tree,placeholder:"请选择分类",props:e.treeProps},on:{change:e.changeCategor},model:{value:e.searchForm.categoriesId,callback:function(t){e.$set(e.searchForm,"categoriesId",t)},expression:"searchForm.categoriesId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"subjectId"}},[r("el-select",{attrs:{clearable:"",placeholder:"请选择声部"},model:{value:e.searchForm.subjectId,callback:function(t){e.$set(e.searchForm,"subjectId",t)},expression:"searchForm.subjectId"}},e._l(e.selects.subjects,(function(e){return r("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"rankType"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择是否收费"},model:{value:e.searchForm.rankType,callback:function(t){e.$set(e.searchForm,"rankType",t)},expression:"searchForm.rankType"}},[r("el-option",{attrs:{value:0,label:"免费"}}),e._v(" "),r("el-option",{attrs:{value:1,label:"收费"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"showFlag"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择伴奏状态"},model:{value:e.searchForm.showFlag,callback:function(t){e.$set(e.searchForm,"showFlag",t)},expression:"searchForm.showFlag"}},[r("el-option",{attrs:{value:1,label:"启用"}}),e._v(" "),r("el-option",{attrs:{value:0,label:"停用"}})],1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"danger"},on:{click:e.reset}},[e._v("重置")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/exportMusicScoreList",expression:"'export/exportMusicScoreList'"}],attrs:{type:"primary"},on:{click:e.onExport}},[e._v("导出")])],1)],1),e._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"编号",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("copy-text",[e._v(e._s(t.row.id))])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"名称",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("copy-text",[e._v(e._s(t.row.name))])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"subjectName",label:"所属声部",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("div",[r("Tooltip",{attrs:{content:e.row.subjectName}})],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"type",label:"类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("songUseTypeFormat")(t.row.type))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"categoriesName",label:"分类",width:"180px"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"是否收费",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.rankIds?"收费":"免费")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"节拍器",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.isOpenMetronome?"播放":"不播放")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"subjectNames",label:"是否上传伴奏",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("p",[e._v("\n 含节拍器:"+e._s(t.row.accompanimentMetronomeUrl?"是":"否")+"\n ")]),e._v(" "),r("p",[e._v("不含节拍器:"+e._s(t.row.accompanimentUrl?"是":"否"))])])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"伴奏状态",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.showFlag?"启用":"停用")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createUserName",label:"上传人",width:"180px"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"上传时间",width:"180px"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"180px",label:"操作",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-dropdown",{attrs:{disabled:"SMART_PRACTICE"!=t.row.clientType}},[r("span",{staticClass:"el-dropdown-link"},[e._v("\n 预览"),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.looker(t.row,1)}}},[e._v("系统自带节拍器")])],1),e._v(" "),r("el-dropdown-item",[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.looker(t.row,0)}}},[e._v("原音自带节拍器")])],1)],1)],1),e._v(" "),r("el-button",{attrs:{type:"text",disabled:!t.row.url},on:{click:function(r){return e.player(t.row)}}},[e._v("播放")]),e._v(" "),r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.changeStatus(t.row)}}},[e._v(e._s(t.row.showFlag?"停用":"启用"))]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysMusicScore/transcod",expression:"'sysMusicScore/transcod'"}],attrs:{type:"text",disabled:!!t.row.showFlag},on:{click:function(r){return e.transcod(t.row)}}},[e._v("转码")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysMusicScore/update",expression:"'sysMusicScore/update'"}],attrs:{type:"text",disabled:!!t.row.showFlag},on:{click:function(r){return e.edit(t.row)}}},[e._v("修改")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysMusicScore/del",expression:"'sysMusicScore/del'"}],attrs:{type:"text"},on:{click:function(r){return e.remove(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.FetchList}})],1),e._v(" "),e.audioVisible?r("el-dialog",{attrs:{width:"400px",visible:e.audioVisible,title:"播放伴奏"},on:{"update:visible":function(t){e.audioVisible=t}}},[r("audio",{staticStyle:{display:"block",margin:"auto"},attrs:{controls:"",src:e.activeUrl}})]):e._e(),e._v(" "),e.visible?r("el-dialog",{attrs:{title:e.title,visible:e.visible,width:"740px"},on:{"update:visible":function(t){e.visible=t}}},[r("submit-form",{attrs:{detail:e.detail,type:e.type},on:{submited:e.FetchList,close:function(t){e.visible=!1}}})],1):e._e(),e._v(" "),e.lookVisible?r("el-dialog",{staticClass:"lookForm",attrs:{width:"667px",visible:e.lookVisible,title:"预览"},on:{"update:visible":function(t){e.lookVisible=t}}},[r("template",{slot:"title"},[r("span",{staticStyle:{color:"#fff"}},[e._v("预览")]),e._v(" "),r("el-select",{attrs:{placeholder:"请选择分谱"},model:{value:e.selectPart,callback:function(t){e.selectPart=t},expression:"selectPart"}},e._l(e.parts,(function(e,t){return r("el-option",{key:e,attrs:{label:e,value:t}})})),1)],1),e._v(" "),e.lookVisible?r("iframe",{ref:"iframe",staticStyle:{width:"667px",height:"386px"},attrs:{id:"iframe",src:e.accompanyUrl+"?part-index="+e.selectPart+"&isMove=1"}}):e._e(),e._v(" "),r("div",{staticClass:"iframe_back"}),e._v(" "),r("div",{staticClass:"iframe_help"}),e._v(" "),r("div",{staticClass:"iframe_header_back"})],2):e._e()],1)},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("\n 教学伴奏\n ")])}],n=(r("5df3"),r("1c4c"),r("db72")),o=r("a8db"),i=(r("6762"),r("2fdb"),r("75fc")),c=r("2d63"),l=r("c80c"),u=(r("96cf"),r("3b8d")),m=r("adb2"),d=r("333d"),p=r("267e"),f=r("f716"),h=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"150px"}},[r("el-form-item",{attrs:{prop:"sysMusicScore.name",label:"曲名",rules:[{required:!0,message:"请输入曲名"}]}},[r("el-input",{attrs:{placeholder:"请输入曲名"},model:{value:e.form.sysMusicScore.name,callback:function(t){e.$set(e.form.sysMusicScore,"name",t)},expression:"form.sysMusicScore.name"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.musicScoreCategoriesId",label:"分类",rules:[{required:!0,message:"请选择分类"}]}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.tree,placeholder:"请选择分类",props:e.treeProps},model:{value:e.form.sysMusicScore.musicScoreCategoriesId,callback:function(t){e.$set(e.form.sysMusicScore,"musicScoreCategoriesId",t)},expression:"form.sysMusicScore.musicScoreCategoriesId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"rankIdType",label:"是否收费",rules:[{required:!0,message:"请选择是否收费"}]}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择是否收费"},on:{change:e.rankChange},model:{value:e.form.rankIdType,callback:function(t){e.$set(e.form,"rankIdType",t)},expression:"form.rankIdType"}},[r("el-option",{attrs:{value:0,label:"免费"}}),e._v(" "),r("el-option",{attrs:{value:1,label:"收费"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.isOpenMetronome",label:"节拍器",rules:[{required:!0,message:"请选择节拍器"}]}},[r("template",{slot:"label"},[r("span",[e._v("\n 节拍器\n "),r("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v("是否播放系统自带节拍器")]),e._v(" "),r("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]),e._v(" "),r("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择节拍器"},model:{value:e.form.sysMusicScore.isOpenMetronome,callback:function(t){e.$set(e.form.sysMusicScore,"isOpenMetronome",t)},expression:"form.sysMusicScore.isOpenMetronome"}},[r("el-option",{attrs:{value:0,label:"不播放"}}),e._v(" "),r("el-option",{attrs:{value:1,label:"播放"}})],1)],2),e._v(" "),r("el-form-item",{attrs:{label:"重复节拍时长"}},[r("template",{slot:"label"},[r("span",[e._v("\n 重复节拍时长\n "),r("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v("2/4拍类似的节拍器是否重复时长")]),e._v(" "),r("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]),e._v(" "),r("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择是否重复节拍器时长"},model:{value:e.form.repeatedBeats,callback:function(t){e.$set(e.form,"repeatedBeats",t)},expression:"form.repeatedBeats"}},[r("el-option",{attrs:{value:0,label:"不重复"}}),e._v(" "),r("el-option",{attrs:{value:1,label:"重复"}})],1)],2),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.playMode",label:"播放模式",rules:[{required:!0,message:"请选择播放模式"}]}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择播放模式"},model:{value:e.form.sysMusicScore.playMode,callback:function(t){e.$set(e.form.sysMusicScore,"playMode",t)},expression:"form.sysMusicScore.playMode"}},[r("el-option",{attrs:{value:"MP3",label:"MP3播放"}}),e._v(" "),r("el-option",{attrs:{value:"XML",label:"XML播放"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.enableEvaluation",label:"支持评测",rules:[{required:!0,message:"请选择支持评测"}]}},[r("el-radio-group",{model:{value:e.form.sysMusicScore.enableEvaluation,callback:function(t){e.$set(e.form.sysMusicScore,"enableEvaluation",t)},expression:"form.sysMusicScore.enableEvaluation"}},[r("el-radio",{attrs:{label:1}},[e._v("是")]),e._v(" "),r("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.subjectId",label:"声部"}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{clearable:"",placeholder:"请选择声部"},on:{change:e.handleChangeSubject},model:{value:e.form.sysMusicScore.subjectId,callback:function(t){e.$set(e.form.sysMusicScore,"subjectId",t)},expression:"form.sysMusicScore.subjectId"}},e._l(e.selects.subjects,(function(t){return r("el-option",{key:t.id,attrs:{value:t.id,label:t.name,disabled:e.hasSubjectId(t.id)}})})),1)],1),e._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.form.sysMusicScore.subjectId&&e.form.sysMusicScoreAccompaniments.length>1,expression:"form.sysMusicScore.subjectId && form.sysMusicScoreAccompaniments.length > 1"}],attrs:{label:"单声部多声轨渲染",prop:"isMultil"}},[r("el-radio-group",{model:{value:e.multitrackData.isMultil,callback:function(t){e.$set(e.multitrackData,"isMultil",t)},expression:"multitrackData.isMultil"}},[r("el-radio",{attrs:{label:0}},[e._v("单声轨")]),e._v(" "),r("el-radio",{attrs:{label:1}},[e._v("多声轨")])],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.isShowFingering",label:"指法展示",rules:[{required:!0,message:"请选择是否展示指法"}]}},[r("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择是否展示指法"},model:{value:e.form.sysMusicScore.isShowFingering,callback:function(t){e.$set(e.form.sysMusicScore,"isShowFingering",t)},expression:"form.sysMusicScore.isShowFingering"}},[r("el-option",{attrs:{value:!0,label:"是"}}),e._v(" "),r("el-option",{attrs:{value:!1,label:"否"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.order",label:"排序",rules:[{required:!0,message:"请输入排序"},{pattern:/^([1-9]\d*|[0]{1,1})$/,message:"请输入正确的排序",trigger:"blur"}]}},[r("el-input",{attrs:{placeholder:"请输入排序"},model:{value:e.form.sysMusicScore.order,callback:function(t){e.$set(e.form.sysMusicScore,"order",t)},expression:"form.sysMusicScore.order"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"MusicXML",prop:"sysMusicScore.xmlUrl",rules:[{required:!0,message:"请选择MusicXML文件"}]}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 xml 格式文件",accept:".xml",bucket_name:"cloud-coach"},on:{inputFile:e.inputFile},model:{value:e.form.sysMusicScore.xmlUrl,callback:function(t){e.$set(e.form.sysMusicScore,"xmlUrl",t)},expression:"form.sysMusicScore.xmlUrl"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"sysMusicScore.speed",label:"速度",rules:[{required:!0,message:"请输入速度"}]}},[r("el-input",{attrs:{placeholder:"请输入速度"},model:{value:e.form.sysMusicScore.speed,callback:function(t){e.$set(e.form.sysMusicScore,"speed",t)},expression:"form.sysMusicScore.speed"}})],1),e._v(" "),1===e.form.sysMusicScore.isOpenMetronome?r("el-form-item",{attrs:{label:"伴奏(不含节拍器)",prop:"sysMusicScore.url"}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 mp3/aac 格式音频文件",accept:".mp3, .aac",bucket_name:"cloud-coach"},model:{value:e.form.sysMusicScore.url,callback:function(t){e.$set(e.form.sysMusicScore,"url",t)},expression:"form.sysMusicScore.url"}})],1):r("el-form-item",{attrs:{label:"伴奏(含节拍器)",prop:"sysMusicScore.metronomeUrl"}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 mp3/aac 格式音频文件",accept:".mp3, .aac",bucket_name:"cloud-coach"},model:{value:e.form.sysMusicScore.metronomeUrl,callback:function(t){e.$set(e.form.sysMusicScore,"metronomeUrl",t)},expression:"form.sysMusicScore.metronomeUrl"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"MIDI",prop:"sysMusicScore.midiUrl"}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 mid 格式音频文件",accept:".mid",bucket_name:"cloud-coach"},model:{value:e.form.sysMusicScore.midiUrl,callback:function(t){e.$set(e.form.sysMusicScore,"midiUrl",t)},expression:"form.sysMusicScore.midiUrl"}})],1),e._v(" "),e.gradual&&e.gradual.length?r("div",[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{closable:!1}},[e._v("识别到共"+e._s(e.gradual.length)+"处渐变速度,请输入Dorico对应小节时间信息")]),e._v(" "),e._l(e.gradual,(function(t,a){return r("div",{key:a,staticClass:"gradual-item"},[e._v("\n "+e._s(t[0].type)+"\n "),r("el-form-item",{attrs:{label:t[0].measureIndex+2+" 小节",rules:[{required:!0,message:"请输入合奏曲目时间"},{pattern:/^((\d{2}):?){2,3}$/,message:"请输入正确的曲目时间",trigger:"blur"}],prop:"graduals."+t[0].measureIndex}},[r("el-input",{attrs:{placeholder:"00:00:00"},model:{value:e.form.graduals[t[0].measureIndex],callback:function(r){e.$set(e.form.graduals,t[0].measureIndex,r)},expression:"form.graduals[item[0].measureIndex]"}})],1),e._v(" "),r("el-form-item",{attrs:{label:t[1].measureIndex+2+" 小节",rules:[{required:!0,message:"请输入合奏曲目时间"},{pattern:/^((\d{2}):?){2,3}$/,message:"请输入正确的曲目时间",trigger:"blur"}],prop:"graduals."+t[1].measureIndex}},[r("el-input",{attrs:{placeholder:"00:00:00"},model:{value:e.form.graduals[t[1].measureIndex],callback:function(r){e.$set(e.form.graduals,t[1].measureIndex,r)},expression:"form.graduals[item[1].measureIndex]"}})],1)],1)}))],2):e._e(),e._v(" "),e._l(e.form.sysMusicScoreAccompaniments,(function(t,a){return r("div",{key:a,staticClass:"files"},[r("el-row",[e.partListNames.length>1?r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"所属轨道",prop:"sysMusicScoreAccompaniments."+a+".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(),e._v(" "),1===e.form.sysMusicScore.isOpenMetronome?r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"原音(不含节拍器)",prop:"sysMusicScoreAccompaniments."+a+".mp3Url",rules:[{required:!!e.form.sysMusicScore.isOpenMetronome&&"MP3"===e.form.sysMusicScore.playMode,message:"请上传原音(不含节拍器)"}]}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 mp3/aac 格式音频文件",accept:".mp3, .aac",bucket_name:"cloud-coach"},model:{value:t.mp3Url,callback:function(r){e.$set(t,"mp3Url",r)},expression:"song.mp3Url"}})],1)],1):r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"原音(含节拍器)",prop:"sysMusicScoreAccompaniments."+a+".metronomeMp3Url",rules:[{required:!e.form.sysMusicScore.isOpenMetronome&&"MP3"===e.form.sysMusicScore.playMode,message:"原音(含节拍器)"}]}},[r("singe-file-upload",{attrs:{tips:"仅支持上传 mp3/aac 格式音频文件",accept:".mp3, .aac",bucket_name:"cloud-coach"},on:{input:e.handleInputFileUpload},model:{value:t.metronomeMp3Url,callback:function(r){e.$set(t,"metronomeMp3Url",r)},expression:"song.metronomeMp3Url"}})],1)],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{prop:"sysMusicScoreAccompaniments."+a+".memo",label:"描述"}},[r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入描述"},model:{value:t.memo,callback:function(r){e.$set(t,"memo",r)},expression:"song.memo"}})],1)],1)],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(a)}}},[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)},b=[],v=(r("f559"),r("28a5"),r("7514"),r("456d"),r("55dd"),r("20d6"),r("ac6a"),r("7f7f"),r("c5f6"),r("bc3a")),y=r.n(v),g=r("1672"),S={repeatedBeats:0},M={props:["detail","type"],data:function(){return{gradual:null,xmlFirstSpeed:"",partListNames:[],tree:[],extConfigJson:{},memberRankList:[],form:{graduals:{},rankIdType:0,repeatedBeats:0,sysMusicScore:{isOpenMetronome:0,name:"",rankIds:"",url:"",metronomeUrl:"",midiUrl:"",order:0,musicScoreCategoriesId:[],clientType:"SMART_PRACTICE",renderFrom:"",playMode:"MP3",enableEvaluation:1,extConfigJson:"{}",subjectId:null,speed:"",xmlUrl:null,isShowFingering:!0},sysMusicScoreAccompaniments:[{subjectId:"",speed:"",mp3Url:"",xmlUrl:"",isShowFingering:!0,memo:"",track:""}],delExamSongAccompanimentIds:[]},treeProps:{value:"id",label:"name",children:"sysMusicScoreCategoriesList"},multitrackData:{isMultil:0}}},mounted:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t;return Object(l["a"])().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=21;break}try{this.extConfigJson=JSON.parse(this.detail.extConfigJson)}catch(r){this.extConfigJson=Object(n["a"])({},S)}return this.form.repeatedBeats=this.extConfigJson.repeatedBeats,this.form.graduals=this.extConfigJson.gradualTimes||{},this.extConfigJson.multitrack&&(this.multitrackData.isMultil=1),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=14,y()(this.detail.xmlUrl);case 14:t=e.sent,this.gradual=O(t.data).filter((function(e){return 2===e.length})),console.log(this.gradual),this.partListNames=this.getPartListNames(t.data),this.FeatchDetailList(),e.next=23;break;case 21:this.rankChange(1),this.form.rankIdType=1;case 23:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{handleChangeSubject:function(e){e||(this.multitrackData.isMultil=0)},handleInputFileUpload:function(e){if(this.multitrackData.isMultil)for(var t=0,r=this.form.sysMusicScoreAccompaniments.length;t<r;t++)this.form.sysMusicScoreAccompaniments[t].metronomeMp3Url||(this.form.sysMusicScoreAccompaniments[t].metronomeMp3Url=e)},getPartListNames:function(e){var t,r,a,s;if(!e)return[];var n=(new DOMParser).parseFromString(e,"text/xml"),o=(null===(t=n.getElementsByTagName("part-list"))||void 0===t||null===(r=t[0])||void 0===r?void 0:r.getElementsByTagName("score-part"))||[],i=Array.from(o).map((function(e){var t;return(null===(t=e.getElementsByTagName("part-name"))||void 0===t?void 0:t[0].textContent)||""}));return this.xmlFirstSpeed=(null===(a=n.getElementsByTagName("per-minute"))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.textContent)||"",this.$set(this.form.sysMusicScore,"speed",this.xmlFirstSpeed),i.filter((function(e){return"COMMON"!==e.toLocaleUpperCase()}))},inputFile:function(e){var t=this,r=new FileReader;r.onload=function(e){t.partListNames=t.getPartListNames(e.target.result),t.gradual=O(e.target.result).filter((function(e){return 2===e.length}));for(var r=0;r<t.form.sysMusicScoreAccompaniments.length;r++)t.form.sysMusicScoreAccompaniments[r].track=t.partListNames[r],t.form.sysMusicScoreAccompaniments[r].speed||(t.form.sysMusicScoreAccompaniments[r].speed=t.xmlFirstSpeed),t.$set(t.form,"sysMusicScoreAccompaniments",t.form.sysMusicScoreAccompaniments);for(var a=t.form.sysMusicScoreAccompaniments.length;a<t.partListNames.length;a++){var s=t.partListNames[a],o=Object(n["a"])(Object(n["a"])({},t.form.sysMusicScoreAccompaniments[0]),{},{metronomeMp3Url:"",mp3Url:"",memo:"",track:s});o.speed||(o.speed=t.xmlFirstSpeed),t.createSys(o)}},r.readAsText(e.raw)},rankChange:function(e){if(e){var t=[];this.memberRankList.forEach((function(e){t.push(e.id)})),this.form.sysMusicScore.rankIds=t.join(",")}else this.form.sysMusicScore.rankIds=""},memberRank:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(g["d"])({isDefault:0});case 3:t=e.sent,this.memberRankList=t.data||[],e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),formatParentId:function(e,t){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=Object(c["a"])(t);try{for(s.s();!(r=s.n()).done;){var n=r.value;if(n.sysMusicScoreCategoriesList){var o=this.formatParentId(e,n.sysMusicScoreCategoriesList,[].concat(Object(i["a"])(a),[n.id]));if(o.includes(e))return o}if(n.id===e)return[].concat(Object(i["a"])(a),[e])}}catch(l){s.e(l)}finally{s.f()}return a},FetchTree:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(f["h"])();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 a=t.value;a.sysMusicScoreCategoriesList&&a.sysMusicScoreCategoriesList.length>0?this.formatTree(a.sysMusicScoreCategoriesList,a):a.sysMusicScoreCategoriesList=null}}catch(s){r.e(s)}finally{r.f()}},FeatchDetailList:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t,r;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(f["g"])({sysMusicScoreId:this.detail.id});case 3:t=e.sent,r=t.data||[],r.forEach((function(e){e.subjectId||(e.subjectId=null)})),r.length>0&&(console.log(r[0].speed),this.$set(this.form.sysMusicScore,"subjectId",r[0].subjectId),this.$set(this.form.sysMusicScore,"speed",r[0].speed),this.$set(this.form.sysMusicScore,"xmlUrl",r[0].xmlUrl),this.$set(this.form.sysMusicScore,"isShowFingering",r[0].isShowFingering)),this.$set(this.form,"sysMusicScoreAccompaniments",r),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(){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(u["a"])(Object(l["a"])().mark((function e(t){return Object(l["a"])().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=[],a=Object(c["a"])(this.form.sysMusicScoreAccompaniments);try{for(a.s();!(t=a.n()).done;){var s=t.value;r.push(s.track)}}catch(n){a.e(n)}finally{a.f()}return r.includes(e)},hasSubjectId:function(e){var t,r=[],a=Object(c["a"])(this.form.sysMusicScoreAccompaniments);try{for(a.s();!(t=a.n()).done;){var s=t.value;r.push(s.subjectId)}}catch(n){a.e(n)}finally{a.f()}return r.includes(e)},submit:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t=this;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(r){var a,s;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=17;break}if(t.form.sysMusicScoreAccompaniments.forEach((function(e){e.speed=t.form.sysMusicScore.speed,e.subjectId=t.form.sysMusicScore.subjectId,e.xmlUrl=t.form.sysMusicScore.xmlUrl,e.isShowFingering=t.form.sysMusicScore.isShowFingering})),console.log(t.form),a=JSON.stringify({repeatedBeats:t.form.repeatedBeats,gradualTimes:t.form.graduals}),s={},t.multitrackData.isMultil&&t.form.sysMusicScoreAccompaniments.length>1&&(a=JSON.stringify({repeatedBeats:t.form.repeatedBeats,gradualTimes:t.form.graduals,multitrack:t.partListNames.length}),s.multitrack=!0),t.detail){e.next=12;break}return e.next=9,Object(f["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({},s),t.form),{},{sysMusicScore:Object(n["a"])(Object(n["a"])({},t.form.sysMusicScore),{},{extConfigJson:a,type:"COMMON",showFlag:0,musicScoreCategoriesId:(t.form.sysMusicScore.musicScoreCategoriesId||[]).pop()})}));case 9:t.$message.success("提交成功"),e.next=15;break;case 12:return e.next=14,Object(f["f"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({},s),t.form),{},{sysMusicScore:Object(n["a"])(Object(n["a"])({},t.form.sysMusicScore),{},{extConfigJson:a,type:"COMMON",id:t.detail.id,showFlag:t.detail.showFlag,musicScoreCategoriesId:(t.form.sysMusicScore.musicScoreCategoriesId||[]).pop()})}));case 14:t.$message.success("修改成功");case 15:t.$listeners.close(),t.$listeners.submited();case 17: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}()}},x=function(e,t){var r=0,a=e.closest(t),s=a,n=null===a||void 0===a?void 0:a.closest("measure"),o=null;while(!o&&r<((null===n||void 0===n?void 0:n.childNodes.length)||50)){var i,c,l,u;if(r++,"note"===(null===(i=s)||void 0===i||null===(c=i.nextElementSibling)||void 0===c?void 0:c.tagName))o=null===(u=s)||void 0===u?void 0:u.nextElementSibling;s=null===(l=s)||void 0===l?void 0:l.nextElementSibling}return o},w=function(e,t){var r,a;if(!e)return"";var s=(new DOMParser).parseFromString(e,"text/xml"),n=(null===(r=s.getElementsByTagName("part-list"))||void 0===r||null===(a=r[0])||void 0===a?void 0:a.getElementsByTagName("score-part"))||[],o=s.getElementsByTagName("part"),i=n[t];if(i){var l=i.getAttribute("id");Array.from(o).forEach((function(e){var t;e&&e.getAttribute("id")!==l&&(null===(t=e.parentNode)||void 0===t||t.removeChild(e));if(e&&e.getAttribute("id")===l){var r,a,s=e.getElementsByTagName("barline"),n=null===(r=s[s.length-1])||void 0===r?void 0:r.parentElement;if("barline"!==(null===n||void 0===n||null===(a=n.lastElementChild)||void 0===a?void 0:a.tagName)){var o,i=(null===n||void 0===n?void 0:n.children)||[],u=Object(c["a"])(i);try{for(u.s();!(o=u.n()).done;){var m=o.value;if("barline"===m.tagName){null===n||void 0===n||n.appendChild(m);break}}}catch(d){u.e(d)}finally{u.f()}}}})),Array.from(n).forEach((function(e){var t;e&&e.getAttribute("id")!==l&&(null===(t=e.parentNode)||void 0===t||t.removeChild(e))}));var u=s.getElementsByTagName("note"),m=function(e){for(var t,r=u[e+1],a=e;a<u.length;a++){var s,n=u[a];if(null===(s=n.getElementsByTagName("grace"))||void 0===s||!s.length){r=n;break}}var o=null===(t=r)||void 0===t?void 0:t.getElementsByTagName("duration")[0];return o};Array.from(u).forEach((function(e,t){var r,a=e.getElementsByTagName("grace");a&&a.length&&e.appendChild(null===(r=m(t))||void 0===r?void 0:r.cloneNode(!0))}))}return(new XMLSerializer).serializeToString(s)},k={"rall.":1.333333333,"poco rit.":1.333333333,"rit.":1.333333333,"molto rit.":1.333333333,"molto rall":1.333333333,molto:1.333333333,lentando:1.333333333,allargando:1.333333333,morendo:1.333333333,"accel.":.8,calando:2,"poco accel.":.8,"gradually slowing":1.333333333,slowing:1.333333333,slow:1.333333333,slowly:1.333333333,faster:1.333333333,"Molto allargando":1.333333333,stringendo:1.333333333,"sempre accel.":1.333333333};function O(e){for(var t=w(e,0),r=(new DOMParser).parseFromString(t,"text/xml"),a=Array.from(r.querySelectorAll("measure")),s=Array.from(r.querySelectorAll("note")),n=Array.from(r.querySelectorAll("words")),o=Array.from(r.querySelectorAll("metronome")),c=[],l=function(){var e=m[u],t=x(e,"direction");if(t){for(var r=null===t||void 0===t?void 0:t.closest("measure"),n=Array.from(r.querySelectorAll("note")),o=Array.from(r.childNodes).filter((function(e){return"note"===e.nodeName})).findIndex((function(e){return e===t})),i=0,l=0,d=0;d<n.length;d++){var p,f=n[d],h=+((null===(p=f.querySelector("duration"))||void 0===p?void 0:p.textContent)||"0");i+=h,d<o&&(l=i)}c.push({ele:e,index:s.indexOf(t),noteInMeasureIndex:o,textContent:e.textContent,measureIndex:a.indexOf(r),type:e.tagName,allDuration:i,leftDuration:l})}},u=0,m=[].concat(Object(i["a"])(n),Object(i["a"])(o));u<m.length;u++)l();c.push({ele:s[s.length-1],index:s.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:a.length});var d=[];c.sort((function(e,t){return e.index-t.index}));for(var p=Object.keys(k).map((function(e){return e.toLocaleLowerCase()})),f=!1,h=function(){var e,t,r=v[b],a=null===(e=r.textContent)||void 0===e?void 0:e.toLocaleLowerCase().trim();r===c[c.length-1]&&(1===(null===(t=d[d.length-1])||void 0===t?void 0:t.length)&&(f=!0));var s=p.find((function(e){if(e===a)return!0;var t=e.split(" ");return a&&t.includes(a)}));if("metronome"===r.type||"words"===r.type&&(a.startsWith("a tempo")||s)||f){var n,o=d.findIndex((function(e){return 1===e.length}));o>-1&&r.index>(null===(n=d[o])||void 0===n?void 0:n[0].start)&&(d[o][1]={start:r.index,measureIndex:r.measureIndex,noteInMeasureIndex:r.noteInMeasureIndex,allDuration:r.allDuration,leftDuration:r.leftDuration,type:a})}"words"===r.type&&s&&d.push([{start:r.index,measureIndex:r.measureIndex,noteInMeasureIndex:r.noteInMeasureIndex,allDuration:r.allDuration,leftDuration:r.leftDuration,type:a}])},b=0,v=c;b<v.length;b++)h();return d}var _=M,j=(r("377c"),r("2877")),I=Object(j["a"])(_,h,b,!1,null,"240fdc1e",null),C=I.exports,F=r("61f7"),T=r("5f87"),N=r("be41"),$=r("a5b0"),A=r("adb21"),L=(r("4328"),r("e3eb"),["categoriesId","organId"]),U=["categoriesId","organId"],E={name:"accompaniment",components:{saveform:m["a"],pagination:d["a"],"submit-form":C,Tooltip:$["a"]},data:function(){return{parts:[],selectPart:0,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(u["a"])(Object(l["a"])().mark((function e(){var t,r;return Object(l["a"])().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,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=Object(c["a"])(t);try{for(s.s();!(r=s.n()).done;){var n=r.value;if(n.sysMusicScoreCategoriesList){var o=this.formatParentId(e,n.sysMusicScoreCategoriesList,[].concat(Object(i["a"])(a),[n.id]));if(o.includes(e))return o}if(n.id===e)return[].concat(Object(i["a"])(a),[e])}}catch(l){s.e(l)}finally{s.f()}return a},FetchTree:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(f["h"])();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 a=t.value;a.sysMusicScoreCategoriesList&&a.sysMusicScoreCategoriesList.length>0?this.formatTree(a.sysMusicScoreCategoriesList,a):a.sysMusicScoreCategoriesList=null}}catch(s){r.e(s)}finally{r.f()}},FetchList:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(){var t,r,a,s;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=Object(N["a"])(this.searchForm),r=t.categoriesId,t.organId,a=Object(o["a"])(t,L),e.next=4,Object(f["c"])(Object(n["a"])(Object(n["a"])({},a),{},{categoriesId:r&&r.length>0?r.pop():null,page:this.rules.page,rows:this.rules.limit}));case 4:s=e.sent,this.tableList=s.data.rows,this.$set(this.rules,"total",s.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()},getPartListNames:function(e){var t,r,a,s;if(!e)return[];var n=(new DOMParser).parseFromString(e,"text/xml"),o=(null===(t=n.getElementsByTagName("part-list"))||void 0===t||null===(r=t[0])||void 0===r?void 0:r.getElementsByTagName("score-part"))||[],i=Array.from(o).map((function(e){var t;return(null===(t=e.getElementsByTagName("part-name"))||void 0===t?void 0:t[0].textContent)||""}));return this.xmlFirstSpeed=(null===(a=n.getElementsByTagName("per-minute"))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.textContent)||"",i.filter((function(e){return"COMMON"!==e.toLocaleUpperCase()}))},looker:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(t,r){var a,s;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.selectPart=0,e.next=4,fetch(t.xmlUrl);case 4:return a=e.sent,e.next=7,a.text();case 7:s=e.sent,this.parts=this.getPartListNames(s),e.next=15;break;case 11:e.prev=11,e.t0=e["catch"](0),this.parts=[],this.selectPart=0;case 15:this.accompanyUrl=Object(F["f"])()+"/accompany?Authorization="+Object(T["b"])()+"&platform=web&isOpenMetronome="+r+"#/detail/"+t.id,this.lookVisible=!0;case 17:case"end":return e.stop()}}),e,this,[[0,11]])})));function t(t,r){return e.apply(this,arguments)}return t}(),player:function(e){this.activeUrl=e.url,this.audioVisible=!0},changeStatus:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(t){var r;return Object(l["a"])().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(f["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},transcod:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(t){var r;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(f["e"])(t);case 3:r=e.sent,console.log(r),e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));function t(t){return e.apply(this,arguments)}return t}(),open:function(e){this.type=e,this.detail=null,this.visible=!0},remove:function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(t){return Object(l["a"])().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(f["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},onExport:function(){var e=Object(N["a"])(this.searchForm),t=e.categoriesId,r=(e.organId,Object(o["a"])(e,U));Object(A["a"])(this,{url:"/api-web/export/exportMusicScoreList",params:Object(n["a"])(Object(n["a"])({},r),{},{categoriesId:t&&t.length>0?t.pop():null}),fileName:"教学伴奏导出.xls",method:"get"},"确定导出教学伴奏")}}},P=E,q=(r("b5400"),r("67f5"),Object(j["a"])(P,a,s,!1,null,"255241d2",null));t["default"]=q.exports},f716:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"e",(function(){return o})),r.d(t,"a",(function(){return i})),r.d(t,"f",(function(){return c})),r.d(t,"d",(function(){return l})),r.d(t,"g",(function(){return u})),r.d(t,"b",(function(){return m})),r.d(t,"h",(function(){return d}));var a=r("829b"),s=r("b775"),n=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/queryPage",data:{},params:e,requestType:"form"})},o=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/transcod",data:{},params:{sysMusicScoreId:e.id},requestType:"json",method:"post"})},i=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/add",method:"post",data:e,params:{}})},c=function(e){return Object(s["a"])({url:"/api-web/sysMusicScore/update",method:"post",data:e,params:{}})},l=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/show",method:"post",data:e,requestType:"form"})},u=function(e){return Object(a["a"])({url:"/api-web/sysMusicScoreAccompaniment/queryPage",method:"get",params:e})},m=function(e){return Object(a["a"])({url:"/api-web/sysMusicScore/del",method:"post",data:{},params:{id:e},requestType:"form"})},d=function(e){return Object(a["a"])({url:"/api-web/sysMusicScoreCategories/queryTree",method:"get",data:{},params:e,requestType:"form"})}}}]);
|