index-legacy.43f656c3.js 38 KB

12345678910111213141516171819202122232425262728293031323334
  1. ;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._form_1xw4e_1,._tags_1xw4e_2{--el-border-radius-small: 10px !important;--el-component-size-large: 48px}._form_1xw4e_1 .el-input,._tags_1xw4e_2 .el-input,._form_1xw4e_1 .el-select--large,._tags_1xw4e_2 .el-select--large,._form_1xw4e_1 .el-form-item--large .el-form-item__label,._tags_1xw4e_2 .el-form-item--large .el-form-item__label{height:48px;line-height:48px}._form_1xw4e_1 .el-input-number,._tags_1xw4e_2 .el-input-number{width:100%}._form_1xw4e_1 .el-input-number .el-input__inner,._tags_1xw4e_2 .el-input-number .el-input__inner{text-align:left}._form_1xw4e_1 .el-form-item__label,._tags_1xw4e_2 .el-form-item__label{font-weight:600;font-size:16px;color:rgba(0,0,0,.85)}._form_1xw4e_1 .el-radio-button__inner,._tags_1xw4e_2 .el-radio-button__inner{border:var(--el-border);border-radius:var(--el-border-radius-base)!important;width:100%;padding:16px 19px!important}._form_1xw4e_1 .el-radio-button__original-radio:checked+.el-radio-button__inner,._tags_1xw4e_2 .el-radio-button__original-radio:checked+.el-radio-button__inner{background-color:#e9fff8;color:var(--el-color-primary);box-shadow:none}._form_1xw4e_1 .el-dialog__body,._tags_1xw4e_2 .el-dialog__body{padding-top:0}._form_1xw4e_1 .el-select .el-select__tags .el-tag,._tags_1xw4e_2 .el-select .el-select__tags .el-tag{background:#F2FFFC;border-radius:4px;border:1px solid #9FE2DE;font-size:16px;color:#00b2a7;margin:0 6px 0 0;height:30px}._form_1xw4e_1 .el-textarea__inner,._tags_1xw4e_2 .el-textarea__inner{min-height:110px!important;padding-top:12px;padding-bottom:12px}._form_1xw4e_1 .el-tag .el-icon,._tags_1xw4e_2 .el-tag .el-icon{color:#00b2a7;background-color:transparent}._form_1xw4e_1 ._iconQesution_1xw4e_67,._tags_1xw4e_2 ._iconQesution_1xw4e_67{display:inline-block;width:13px;height:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAiCAYAAAA+stv/AAAAAXNSR0IArs4c6QAAA2pJREFUWEfFV81PE1EQnylgYTUSaJsUVj5TSmKh4VLSAwnrSePBxLN/gRy9GjlgvHoT/wLPJiYm3lh6AgwhAVpSW+BA2zSUEtLahvKxT+fZrW1teW+rpnPYw76Z+f12Pt8itFlQFj8cDt/KZrMPGGNPGGP3EXGQMTZI9oiYYoylEDGCiJ8cDseKz+e7kPEtJLCxseEuFouLiPiMMXZXyilijjH2QVGUpdnZ2fRNNk0JxGIxezKZfAkALwDgtgxwA50CALxVVfXNxMREqZGPhgTKX/0RAIItAtebrSmK8rRRNP4gEAqF/IZhfAaAe/8I3HSTQMTH8/PzO9V+awiUv/zrfwCvkFAUJVAdiQqBcs51K2FHROjq6oKLC6mCN0msqaqqmTVRIaDr+hIAvBKF3WazwejoKDidTuju7qYWhOvra8jn83B4eAi5XE7kgs5fa5q2yFuYHuXQx0XV3tPTA36/nwM3k1gsBqlUSkSioCiKh1LBCei6vgwAz0VWMzMz0Nvby9XOzs4gk8nwr3c4HOByufh7wzBgc3MTisWiyN17TdMWkCbcyclJRjRkKOQ+n487PT09hZ2dmmIGr9cLAwMD/Pzg4ACOjo5uJICIOafT6cJQKPTQMIwvIrojIyM89yQETiSqpa+vj6eH5Pj4GPb29kQuwWazPcLV1dV3jLEFkfbY2Bj09/dztXA4DOfn5zUmlIapqSn+Lp1OQzQaFbmkAl5GXddXfpaBJtQWKExPT1cIxuNxSCaTMi51ikCUMeaV0W6m4/F4QFVVfnx5eQnr6+u8OEWCiN8oAnkAuCNSbnY+OTkJbrebH19dXfH6kJwFZPL9rwhQXQwPD3PwUqkE29vbMu1X+RZEzLecAhpKgUCgMgm3tragUKDtKy9mCloqwqGhIRgfH+doiUQC9vf35ZF/a/IilGrDeu/VhReJRPhUtCq8DWUHUb3zzs5O6Ojo4K9pGzLGrOL/GkSyo7jeu6IovPUInMYu7QArUhnFZCS7jKoBgsEg2O12/oqGDg0fi/JrGZGR7Do2AehOMDc3xzuAJJvNwu7urhX82nVcjoLUhcREoQ6gTqDhQ7uB1rMFqb2QkGErVzIqRMq9xfw3vpJVpaI9l1IzfG29lpsk2vpjYpJo669ZdTW37ee0vqXa9ntuobdbUv0BrhnLpC/Q60gAAAAASUVORK5CYII=) no-repeat center;background-size:contain;margin-left:3px}._uploadCon_1xw4e_76 .el-upload--text{background-color:#fff;border-radius:10px}._uploadTips_1xw4e_80{padding:4px 12px;background:#2DC7AA;border-radius:15px;font-weight:600;font-size:16px;color:#fff;line-height:22px;cursor:pointer}._formItem_1xw4e_90{background:#F6F8F9;border-radius:10px;padding:16px;width:100%;margin-bottom:16px!important}._tips_1xw4e_97{font-size:12px;color:#e0945a;line-height:18px;padding:15px 11px;background:#fff3eb;border-radius:10px;margin:0 0 22px}._tips_1xw4e_97 ._tipsTitle_1xw4e_106{font-size:14px;font-weight:600;color:#e0945a;line-height:20px;padding-bottom:6px}._tips_1xw4e_97 span{color:#5aa9e0;cursor:pointer}._rule_1xw4e_117{font-size:14px;line-height:27px;color:#999;margin:0 14px}._rule_1xw4e_117>p>span{color:#ff4e19;font-weight:700;font-size:16px}._rule_1xw4e_117>p>span span{font-size:14px;padding-left:4px}._fAlert_1xw4e_132{display:flex;align-items:center;justify-content:center;height:42px;background:#F6F8F9;font-weight:600;font-size:18px;color:#131415;line-height:25px;margin-bottom:32px}._messageDialog_1xw4e_144,._messageDialog2_1xw4e_145{width:618px;border-radius:18px}._messageDialog_1xw4e_144 .el-dialog__headerbtn,._messageDialog2_1xw4e_145 .el-dialog__headerbtn{font-size:21px}._messageDialog_1xw4e_144 .el-dialog__header,._messageDialog2_1xw4e_145 .el-dialog__header,._messageDialog_1xw4e_144 .el-dialog__body,._messageDialog2_1xw4e_145 .el-dialog__body{padding:0}._messageDialog2_1xw4e_145{width:320px}._popupContainer_1bydr_1{background:url(./assets/message-top-bg.0cd73e07.png) no-repeat top center;background-size:contain;border-radius:20px;overflow:hidden;padding-bottom:25px}._popupContainer_1bydr_1:before{position:absolute;content:\" \";top:-36px;left:50%;margin-left:-61px;display:inline-block;background:url(./assets/bell.eb59b91f.png) no-repeat top center;background-size:contain;width:123px;height:71px}._popupContainer_1bydr_1._popupContainerError_1bydr_20:before{background:url(./assets/error-icon.aa741cfb.png) no-repeat top center;background-size:contain}._popupContainer_1bydr_1._popupContainerError_1bydr_20 ._container_1bydr_24{padding:16px 23px 0!important}._popupContainer_1bydr_1._popupContainerError_1bydr_20 ._container_1bydr_24 ._cContent_1bydr_27{padding-bottom:25px}._popupContainer_1bydr_1 ._title1_1bydr_30{padding-top:52px;text-align:center;font-weight:600;font-size:18px;color:#131415;line-height:30px}._popupContainer_1bydr_1 ._title1_1bydr_30 span{position:relative;z-index:1}._popupContainer_1bydr_1 ._title1_1bydr_30 span:after{content:\"\";position:absolute;left:0;bottom:0;z-index:-1;width:100%;height:8px;background:linear-gradient(to right,#2dc7aa,rgba(91,236,255,.2));opacity:.68}._popupContainer_1bydr_1 ._popupTips_1bydr_53{position:relative;font-size:15px;color:#777;line-height:21px}._popupContainer_1bydr_1 ._popupTips_1bydr_53 ._container_1bydr_24{max-height:400px;overflow-x:hidden;overflow-y:auto;padding:16px 42px 0}._popupContainer_1bydr_1 ._popupTips_1bydr_53 ._cTitle_1bydr_65{font-weight:600;font-size:15px;color:#333;line-height:21px}._popupContainer_1bydr_1 ._popupTips_1bydr_53 ._cContent_1bydr_27{font-size:15px;color:#777;line-height:25px;padding-bottom:14px}._popupContainer_1bydr_1 ._popupTips_1bydr_53 ._cContent_1bydr_27 span{color:#14bc9c;cursor:pointer;font-weight:500}._popupContainer_1bydr_1 ._btnGroup_1bydr_82{text-align:center}._popupContainer_1bydr_1 ._button_1bydr_85{width:260px;height:39px;background:#2DC7AF;border-radius:10px;font-weight:600;font-size:15px;color:#fff;line-height:21px}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.61b0916a.js','./index-legacy.f40047b3.js','./index-legacy.3e06faf1.js','./toolsValidate-legacy.b90c63da.js','./vendor-legacy.2ed87b03.js'],function(exports){'use strict';var ColCropper,ColUpload,getCodeBaseUrl,request,verifyNumberIntegerAndFloat,defineComponent,ref,createVNode,ElScrollbar,createTextVNode,ElButton,request$1,ElMessage,ElForm,ElFormItem,ElRadioGroup,ElRadioButton,ElTooltip,Fragment,ElInput,ElInputNumber,ElSelect,ElOption,ElDialog,isVNode;return{setters:[function(module){ColCropper=module.C;},function(module){ColUpload=module.C;},function(module){getCodeBaseUrl=module.B;request=module.r;},function(module){verifyNumberIntegerAndFloat=module.v;},function(module){defineComponent=module.d;ref=module.a3;createVNode=module.c;ElScrollbar=module.aN;createTextVNode=module.a;ElButton=module.l;request$1=module.aO;ElMessage=module.f;ElForm=module.K;ElFormItem=module.L;ElRadioGroup=module.al;ElRadioButton=module.am;ElTooltip=module.ae;Fragment=module.F;ElInput=module.I;ElInputNumber=module.aP;ElSelect=module.ab;ElOption=module.ac;ElDialog=module.W;isVNode=module.ai;}],execute:function execute(){var form="_form_1xw4e_1";var tags="_tags_1xw4e_2";var iconQesution="_iconQesution_1xw4e_67";var uploadCon="_uploadCon_1xw4e_76";var uploadTips="_uploadTips_1xw4e_80";var formItem="_formItem_1xw4e_90";var tips="_tips_1xw4e_97";var tipsTitle="_tipsTitle_1xw4e_106";var rule="_rule_1xw4e_117";var fAlert="_fAlert_1xw4e_132";var messageDialog="_messageDialog_1xw4e_144";var messageDialog2="_messageDialog2_1xw4e_145";var styles$1={form:form,tags:tags,iconQesution:iconQesution,uploadCon:uploadCon,uploadTips:uploadTips,formItem:formItem,tips:tips,tipsTitle:tipsTitle,rule:rule,fAlert:fAlert,messageDialog:messageDialog,messageDialog2:messageDialog2};var getXmlInfo=function getXmlInfo(xml){var _xmlParse$getElements,_xmlParse$getElements2;var data={speed:0,title:"",composer:"",partNames:[]};var xmlParse=new DOMParser().parseFromString(xml,"text/xml");data.title=((_xmlParse$getElements=xmlParse.getElementsByTagName("work-title")[0])===null||_xmlParse$getElements===void 0?void 0:_xmlParse$getElements.textContent)||"";data.composer=((_xmlParse$getElements2=xmlParse.getElementsByTagName("creator")[0])===null||_xmlParse$getElements2===void 0?void 0:_xmlParse$getElements2.textContent)||"";var measures=xmlParse.getElementsByTagName("measure");for(var _i=0,_Array$from=Array.from(xmlParse.getElementsByTagName("part-name"));_i<_Array$from.length;_i++){var item=_Array$from[_i];if(item.textContent){data.partNames.push(item.textContent);}}for(var _i2=0,_Array$from2=Array.from(measures);_i2<_Array$from2.length;_i2++){var measure=_Array$from2[_i2];var perMinute=measure.getElementsByTagName("per-minute");if(perMinute.length&&perMinute[perMinute.length-1]){data.speed=parseFloat(perMinute[perMinute.length-1].textContent||"0");break;}}return data;};var popupContainer="_popupContainer_1bydr_1";var popupContainerError="_popupContainerError_1bydr_20";var container="_container_1bydr_24";var cContent="_cContent_1bydr_27";var title1="_title1_1bydr_30";var popupTips="_popupTips_1bydr_53";var cTitle="_cTitle_1bydr_65";var btnGroup="_btnGroup_1bydr_82";var button="_button_1bydr_85";var styles={popupContainer:popupContainer,popupContainerError:popupContainerError,container:container,cContent:cContent,title1:title1,popupTips:popupTips,cTitle:cTitle,btnGroup:btnGroup,button:button};var MessageTip=defineComponent({name:'message-tip',props:{type:{type:String,default:'upload'},title:{type:String,default:'温馨提示'},showButton:{type:Boolean,default:true},buttonText:{type:String,default:'我已知晓'}},emits:['confirm'],setup:function setup(props,_ref){var emit=_ref.emit;ref(false);// props.title, props.type
  2. // watch(
  3. // () => [props.title, props.type],
  4. // () => {}
  5. // )
  6. // 详情
  7. var onDetail=function onDetail(type){var url="".concat(getCodeBaseUrl('/teacher'),"/#/registerProtocol");if(type==='question'){url="".concat(getCodeBaseUrl('/teacher'),"/muic-standard/question.html");}else if(type==='music'){url="".concat(getCodeBaseUrl('/teacher'),"/muic-standard/index.html");}window.open(url);};return function(){return createVNode("div",{"class":[styles.popupContainer,props.type==='error'?styles.popupContainerError:'']},[createVNode("p",{"class":styles.title1},[createVNode("span",null,[props.title])]),createVNode("div",{"class":styles.popupTips},[props.type==='upload'&&createVNode(ElScrollbar,{"class":styles.container},{default:function _default(){return[createVNode("p",{"class":styles.cTitle},[createTextVNode("\u6CE8\u610F\u4E8B\u9879\uFF1A")]),createVNode("div",{"class":styles.cContent},[createTextVNode("1\u3001\u5FC5\u987B\u662F\u4E0A\u4F20\u4EBA\u81EA\u5DF1\u53C2\u4E0E\u5236\u4F5C\u7684\u4F5C\u54C1 "),createVNode("br",null,null),createTextVNode("2\u3001\u6B4C\u66F2\u53CA\u6B4C\u66F2\u4FE1\u606F\u4E2D\u8BF7\u52FF\u6D89\u53CA\u653F\u6CBB\u3001\u5B97\u6559\u3001\u5E7F\u544A\u3001\u6D89\u6BD2\u3001\u72AF\u7F6A\u3001\u8272\u60C5\u3001\u4F4E\u4FD7\u3001\u66B4\u529B\u3001\u8840\u8165\u3001\u6D88\u6781\u7B49\u8FDD\u89C4\u5185\u5BB9\uFF0C\u8FDD\u53CD\u8005\u76F4\u63A5\u5220\u9664\u5185\u5BB9\u3002\u591A\u6B21\u8FDD\u53CD\u5219\u8FDB\u884C\u5C01\u53F7\u5904\u7406;"),createVNode("br",null,null),createTextVNode("3\u3001\u70B9\u51FB\u67E5\u770B"),createVNode("span",{"onClick":function onClick(){return onDetail('protocol');}},[createTextVNode("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),createTextVNode("\uFF0C\u5982\u679C\u60A8\u4E0A\u4F20\u4E86\u6587\u4EF6\uFF0C\u5373\u8BA4\u4E3A\u60A8\u5B8C\u5168\u540C\u610F\u5E76\u9075\u5B88\u8BE5\u534F\u8BAE\u7684\u5185\u5BB9\u3002")]),createVNode("p",{"class":styles.cTitle},[createTextVNode("\u66F2\u8C31\u5BA1\u6838\u6807\u51C6\uFF1A")]),createVNode("div",{"class":styles.cContent},[createTextVNode("1\u3001\u6587\u4EF6\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC75MB\uFF0C\u4E0D\u7B26\u5408\u7248\u9762\u89C4\u8303\u7684\u4E50\u8C31\uFF0C\u5BA1\u6838\u672A\u901A\u8FC7\u7684\u4E0D\u4E88\u4E0A\u67B6\uFF0C\u8BE6\u60C5\u53C2\u8003"),createVNode("span",{"onClick":function onClick(){return onDetail('music');}},[createTextVNode("\u300A\u66F2\u8C31\u6392\u7248\u89C4\u8303\u300B")]),createTextVNode("\uFF1B"),createVNode("br",null,null),createTextVNode("2\u3001XML\u4E0EMIDI\u6587\u4EF6\u5185\u5BB9\u5FC5\u987B\u4E00\u81F4\uFF0C\u63A8\u8350\u4F7F\u7528Sibelius\u6253\u8C31\u8F6F\u4EF6\uFF1B\u5BFC\u51FA\u8BBE\u7F6E\uFF1A\u5BFC\u51FAXML-\u672A\u538B\u7F29\uFF08*.XML\uFF09/\u5BFC\u51FAMIDI\uFF1A\u97F3\u8272-\u5176\u4ED6\u56DE\u653E\u8BBE\u5907General MIDI\u3001MIDI\u3001MIDI\u6587\u4EF6\u7C7B\u578B-\u7C7B\u578B0\u3001\u4E0D\u8981\u52FE\u9009\u201C\u5C06\u5F31\u62CD\u5C0F\u8282\u5BFC\u51FA\u4E3A\u5177\u6709\u4F11\u6B62\u7B26\u7684\u5B8C\u6574\u5C0F\u8282\u201D\u3002\u70B9\u51FB\u67E5\u770B"),createVNode("span",{"onClick":function onClick(){return onDetail('question');}},[createTextVNode("\u300A\u5E38\u89C1\u95EE\u9898\u300B")])])];}}),props.type==='error'&&createVNode("div",{"class":styles.container},[createVNode("div",{"class":styles.cContent},[createTextVNode("\u58F0\u8F68\u540D\u79F0\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u5BF9\u7167"),createVNode("span",{"onClick":function onClick(){return onDetail('protocol');}},[createTextVNode("\u300A\u66F2\u8C31\u6392\u7248\u89C4\u8303\u300B")]),createTextVNode("\u68C0\u67E5\u540E\u91CD\u8BD5")])]),props.type==='origin'&&createVNode("div",{"class":styles.container},[createVNode("div",{"class":styles.cContent},[createTextVNode("1\u3001\u540C\u4E00\u9996\u66F2\u76EE\u4E0D\u53EF\u91CD\u590D\u4E0A\u4F20\uFF0C\u5982\u6709\u4E0D\u540C\u7248\u672C\u7EDF\u4E00\u7528\u201C\uFF08\uFF09\u201D\u8865\u5145\u3002\u4E3E\u4F8B\uFF1A\u4EBA\u751F\u7684\u65CB\u8F6C\u6728\u9A6C\uFF08\u957F\u7B1B\u4E8C\u91CD\u594F\u7248\uFF09"),createVNode("br",null,null),createTextVNode("2\u3001\u66F2\u76EE\u540D\u540E\u53EF\u6DFB\u52A0\u66F2\u76EE\u4FE1\u606F\u5907\u6CE8\uFF0C\u5305\u542B\u4F46\u4E0D\u9650\u4E8E\u66F2\u76EE\u7C7B\u578B\u7B49\u3002\u66F2\u76EE\u540D\u300AXXX\u300B\uFF0C\u4E3E\u4F8B\uFF1A\u4EBA\u58F0\u7684\u65CB\u8F6C\u6728\u9A6C\u300A\u54C8\u5C14\u7684\u79FB\u52A8\u57CE\u5821\u300B\uFF08\u957F\u7B1B\u4E8C\u91CD\u594F\u7248\uFF09"),createVNode("br",null,null),createTextVNode("3\u3001\u5176\u4ED6\u4FE1\u606F\u4E0D\u8981\u5199\u5728\u66F2\u76EE\u540D\u91CC\uFF0C\u5982\u6B4C\u624B\u3001\u4E0A\u4F20\u4EBA\u5458\u6635\u79F0\u7B49\u3002")])])]),props.showButton&&createVNode("div",{"class":styles.btnGroup},[createVNode(ElButton,{"type":"primary","class":styles.button,"onClick":function onClick(){return emit('confirm');}},{default:function _default(){return[props.buttonText];}})])]);};}});function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var validator=exports('validator',function(rule,value,callback){console.log(value);if(value==''){callback(new Error('请输入收费价格'));}else if(Number(value)<=0){callback(new Error('收费金额必须大于0'));}else{callback();}});var index=exports('default',defineComponent({name:'music-operation',data:function data(){var query=this.$route.query;return{type:query.type||'create',subjectList:[],tagList:[],submitLoading:false,reason:'',formated:{},musicSheetAuthRecordId:null,auditStatus:'',form:{musicCover:'',accompanimentType:'HOMEMODE',playMode:'MP3',xmlFileUrl:'',playSpeed:'100',mp3Url:'',// bgmp3Url: '',
  8. midiFileUrl:'',name:'',composer:'',remark:'',tags:[],paymentType:'FREE',musicPrice:'',backgroundMp3s:[]},radioList:[],// 选中的人数
  9. tagStatus:false,music_sheet_service_fee:0,music_account_period:0,visibleShow:false,visibleShow2:false,messageTipTitle:'上传须知',messageTipType:'upload',cbsInstrumentList:[]};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var isCatchTip;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:isCatchTip=localStorage.getItem('isCatchTip');if(!isCatchTip){_this.visibleShow=true;}document.title=_this.type==='create'?'新建曲谱':'编辑曲谱';_context.prev=3;_context.next=6;return request.get('/api-website/sysConfig/queryByParamNameList',{params:{paramNames:'music_sheet_service_fee,music_account_period'}}).then(function(res){console.log(res,'res');var data=res.data||[];data.forEach(function(item){if(item.paramName==='music_sheet_service_fee'){_this.music_sheet_service_fee=item.paramValue;}else if(item.paramName==='music_account_period'){_this.music_account_period=item.paramValue;}});});case 6:_context.next=8;return request.get('/api-website/open/MusicTag/tree').then(function(res){_this.tagList=res.data||[];});case 8:_context.next=10;return request.post('/api-teacher/musicalInstrument/list').then(function(response){var data=response.data||[];data.forEach(function(item){_this.cbsInstrumentList.push({id:item.id,name:item.name,code:item.code,loading:false});});});case 10:if(_this.$route.query.id){_this.setDetail(_this.$route.query.id);}_context.next=15;break;case 13:_context.prev=13;_context.t0=_context["catch"](3);case 15:case"end":return _context.stop();}}},_callee,null,[[3,13]]);}))();},watch:{formated:function formated(){this.mergeXmlData(this.formated);}},computed:{auditDisabled:function auditDisabled(){return this.auditStatus==='DOING';}},methods:{mergeXmlData:function mergeXmlData(data){this.formated=data;// this.backgroundMp3s = data.partNames.map((partName: string) => ({
  10. // track: partName
  11. // }))
  12. if(!this.form.name){this.form.name=data.title;}if(!this.form.composer){this.form.composer=data.composer;}if(data.speed){this.form.playSpeed=''+data.speed;}},setDetail:function setDetail(id){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var _yield$request$get,data;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-website/open/music/sheet/detail/'+id);case 3:_yield$request$get=_context2.sent;data=_yield$request$get.data;_this2.musicSheetAuthRecordId=data.musicSheetAuthRecordId;// 审核编号
  13. _this2.auditStatus=data.auditStatus;// 状态
  14. _this2.form.playMode=data.audioType||'MP3';_this2.form.xmlFileUrl=data.xmlFileUrl;_this2.form.name=data.musicSheetName;_this2.form.composer=data.composer;_this2.form.playSpeed=data.playSpeed;// this.form.tags = data.musicTag?.split(',')
  15. // const names = data.musicTagNames.split(',')
  16. _this2.form.tags=data.musicTag.split(',');_this2.form.tags=_this2.form.tags.filter(function(el){return el!='';}).map(function(e){return Number(e);});// for (let i = 0; i < names.length; i++) {
  17. // this.form.tagsNames[this.form.tags[i]] = names[i]
  18. // }
  19. _this2.form.musicCover=data.titleImg;_this2.form.midiFileUrl=data.midiUrl;_this2.form.mp3Url=data.metronomeUrl;_this2.form.remark=data.remark;_this2.form.paymentType=data.paymentType;_this2.form.musicPrice=data.musicPrice||0;// this.form.extConfigJson = data.extConfigJson
  20. _this2.form.backgroundMp3s=data.background.map(function(item){return{url:item.audioFileUrl,trackName:item.musicalInstrumentName,id:item.musicalInstrumentId,track:item.track,loading:false};});_context2.next=26;break;case 23:_context2.prev=23;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 26:case"end":return _context2.stop();}}},_callee2,null,[[0,23]]);}))();},createSubmitData:function createSubmitData(){var _form$tags,_form$backgroundMp3s$,_form$backgroundMp3s$2;var form=this.form;return{musicSheetJson:{playMode:form.playMode,// 播放模式
  21. xmlFileUrl:form.xmlFileUrl,// XML
  22. name:form.name,// 曲目名称
  23. composer:form.composer,// 音乐人
  24. playSpeed:form.playSpeed,// 曲目速度
  25. musicTagIds:(_form$tags=form.tags)===null||_form$tags===void 0?void 0:_form$tags.join(','),remark:form.remark,musicCover:form.musicCover,// 曲目封面
  26. multiTracksSelection:(_form$backgroundMp3s$=form.backgroundMp3s.map(function(item){return item.track;}))===null||_form$backgroundMp3s$===void 0?void 0:_form$backgroundMp3s$.join(','),// 声轨名
  27. midiFileUrl:form.midiFileUrl,// MID文件
  28. musicPrice:form.musicPrice,paymentType:form.paymentType,musicSheetAccompanimentList:[{audioFileUrl:form.mp3Url,sortNumber:1,audioPlayType:'PLAY'}],// 伴奏
  29. // playMode: 'HOMEMODE', // HOMEMODE 默认自制
  30. musicSheetSoundList:form.backgroundMp3s.map(function(item){return{musicalInstrumentId:item.id,musicalInstrumentName:item.trackName,audioFileUrl:item.url,track:item.track,audioPlayType:'PLAY'// SING
  31. };}),// 原音
  32. musicalInstrumentIds:(_form$backgroundMp3s$2=form.backgroundMp3s.map(function(item){return item.id;}))===null||_form$backgroundMp3s$2===void 0?void 0:_form$backgroundMp3s$2.join(','),// 乐器编号
  33. extConfigJson:'{"repeatedBeats":0,"gradualTimes":{},"isEvxml":0}'}};},onFormatter:function onFormatter(e){e.target.value=verifyNumberIntegerAndFloat(e.target.value);},readerFile:function readerFile(file){var _this3=this;request$1(file).then(function(res){// this.formated = getXmlInfo(res)
  34. var formated=getXmlInfo(res);var resultIndexStatus=false;var partNames=formated.partNames||[];var tempMp3s=[];var _iterator=_createForOfIteratorHelper(partNames),_step;try{var _loop=function _loop(){var i=_step.value;var index=-1;_this3.cbsInstrumentList.forEach(function(item,j){var code=item.code?item.code.split(','):'';var _iterator2=_createForOfIteratorHelper(code),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var p=_step2.value;if(i.indexOf(p)>-1){index=j;}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}});if(index===-1){resultIndexStatus=true;return"break";}var currentItem=_this3.cbsInstrumentList[index];if(currentItem){tempMp3s.push({url:'',id:currentItem.id,trackName:currentItem.name,track:i,loading:currentItem.loading});}};for(_iterator.s();!(_step=_iterator.n()).done;){var _ret=_loop();if(_ret==="break")break;}}catch(err){_iterator.e(err);}finally{_iterator.f();}if(partNames.length<=0||resultIndexStatus){_this3.visibleShow2=true;_this3.form.xmlFileUrl='';return;}_this3.formated=formated;_this3.form.backgroundMp3s=tempMp3s;console.log(_this3.form.backgroundMp3s,'121212',tempMp3s);});},onSubmit:function onSubmit(){var _this4=this;this.$refs.form.validate(/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(valid){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(!valid){_context3.next=21;break;}_this4.submitLoading=true;_context3.prev=2;if(!_this4.$route.query.id){_context3.next=8;break;}_context3.next=6;return request.post('/api-teacher/musicSheetAuthRecord/update',{data:_objectSpread(_objectSpread({},_this4.createSubmitData()),{},{id:_this4.musicSheetAuthRecordId})});case 6:_context3.next=10;break;case 8:_context3.next=10;return request.post('/api-teacher/musicSheetAuthRecord/save',{data:_this4.createSubmitData()});case 10:_this4.submitLoading=false;ElMessage.success('上传成功');sessionStorage.setItem('musicActiveName','DOING');_this4.$router.back();_context3.next=19;break;case 16:_context3.prev=16;_context3.t0=_context3["catch"](2);_this4.submitLoading=false;case 19:_context3.next=23;break;case 21:_this4.$nextTick(function(){var isError=document.getElementsByClassName('is-error');isError[0].scrollIntoView({block:'center',behavior:'smooth'});});return _context3.abrupt("return",false);case 23:case"end":return _context3.stop();}}},_callee3,null,[[2,16]]);}));return function(_x){return _ref2.apply(this,arguments);};}());},onDetail:function onDetail(type){var url="".concat(getCodeBaseUrl('/teacher'),"/#/registerProtocol");if(type==='question'){url="".concat(getCodeBaseUrl('/teacher'),"/muic-standard/question.html");}else if(type==='music'){url="".concat(getCodeBaseUrl('/teacher'),"/muic-standard/index.html");}window.open(url);}},render:function render(){var _this5=this;var _slot;return createVNode("div",{"class":styles$1.form},[createVNode("div",{"class":"text-2xl font-semibold text-black leading-none px-6 py-5 flex justify-between"},[this.type==='create'?'新建曲谱':'编辑曲谱',createVNode("div",{"class":styles$1.uploadTips,"onClick":function onClick(){return _this5.visibleShow=true;}},[createTextVNode("\u4E0A\u4F20\u987B\u77E5")])]),createVNode(ElForm,{"size":"large","labelPosition":"left","labelWidth":'150px',"model":this.form,"ref":"form","class":"px-7 py-5","disabled":this.auditDisabled},{default:function _default(){return[createVNode("div",{"class":styles$1.fAlert},[createTextVNode("\u66F2\u76EE\u4E0A\u4F20")]),createVNode(ElFormItem,{"label":"播放类型","prop":"playMode","rules":[{required:true,message:'请选择播放类型'}]},{default:function _default(){return[createVNode(ElRadioGroup,{"modelValue":_this5.form.playMode,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.playMode=$event;}},{default:function _default(){return[createVNode(ElRadioButton,{"label":'MP3',"class":"mr-3 w-24"},{default:function _default(){return[createTextVNode("MP3")];}}),createVNode(ElRadioButton,{"label":'MIDI',"class":"w-24"},{default:function _default(){return[createTextVNode("MIDI")];}})];}})];}}),_this5.form.playMode==='MP3'?createVNode(ElFormItem,{"label":"上传伴奏","prop":"mp3Url","rules":[{required:true,message:'请选择伴奏'}]},{default:function _default(){return[createVNode(ColUpload,{"modelValue":_this5.form.mp3Url,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.mp3Url=$event;},"bucket":'cloud-coach',"accept":'.mp3',"uploadType":'file',"disabled":_this5.auditDisabled,"type":"music","btnText":"上传伴奏文件","size":8,"extraTips":"仅支持MP3格式文件,文件最大不能超过8MB"},null)];}}):createVNode(ElFormItem,{"label":"MIDI文件","prop":"midiFileUrl","rules":[{required:true,message:'请选择MIDI文件'}]},{default:function _default(){return[createVNode(ColUpload,{"modelValue":_this5.form.midiFileUrl,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.midiFileUrl=$event;},"bucket":'cloud-coach',"accept":'.midi,.mid',"disabled":_this5.auditDisabled,"uploadType":'file',"type":"music","btnText":"上传MIDI文件","size":8,"extraTips":"仅支持MID格式文件,文件最大不能超过8MB"},null)];}}),createVNode(ElFormItem,{"label":"上传XML","prop":"xmlFileUrl","rules":[{required:true,message:'请选择XML文件'}]},{default:function _default(){return[createVNode(ColUpload,{"modelValue":_this5.form.xmlFileUrl,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.xmlFileUrl=$event;},"bucket":'cloud-coach',"accept":'application/xml',"uploadType":'file',"disabled":_this5.auditDisabled,"type":"music","btnText":"上传XML文件","extraTips":"仅支持XML格式文件,文件最大不能超过8MB","onChange":_this5.readerFile,"onRemove":function onRemove(){_this5.form.backgroundMp3s=[];}},null)];}}),_this5.form.backgroundMp3s.length>0&&_this5.form.playMode==='MP3'&&createVNode(ElFormItem,null,{label:function label(){return createVNode("div",{"class":"flex items-center"},[createVNode("i",{"style":"color: var(--el-color-danger);margin-right: 4px;"},[createTextVNode("*")]),createTextVNode("\u4E0A\u4F20\u539F\u97F3"),createVNode(ElTooltip,{"effect":"dark","placement":"top"},{content:function content(){return createVNode("div",{"class":"w-[445px]"},[createTextVNode("1\u3001\u540C\u4E00\u9996\u66F2\u76EE\u4E0D\u53EF\u91CD\u590D\u4E0A\u4F20\uFF0C\u5982\u6709\u4E0D\u540C\u7248\u672C\u7EDF\u4E00\u7528\u201C\uFF08\uFF09\u201D\u8865\u5145\u3002\u4E3E\u4F8B\uFF1A\u4EBA\u751F\u7684\u65CB\u8F6C\u6728\u9A6C\uFF08\u957F\u7B1B\u4E8C\u91CD\u594F\u7248\uFF09"),createVNode("br",null,null),createTextVNode("2\u3001\u66F2\u76EE\u540D\u540E\u53EF\u6DFB\u52A0\u66F2\u76EE\u4FE1\u606F\u5907\u6CE8\uFF0C\u5305\u542B\u4F46\u4E0D\u9650\u4E8E\u66F2\u76EE\u7C7B\u578B\u7B49\u3002\u66F2\u76EE\u540D\u300AXXX\u300B\uFF0C\u4E3E\u4F8B\uFF1A\u4EBA\u58F0\u7684\u65CB\u8F6C\u6728\u9A6C\u300A\u54C8\u5C14\u7684\u79FB\u52A8\u57CE\u5821\u300B\uFF08\u957F\u7B1B\u4E8C\u91CD\u594F\u7248\uFF09"),createVNode("br",null,null),createTextVNode("3\u3001\u5176\u4ED6\u4FE1\u606F\u4E0D\u8981\u5199\u5728\u66F2\u76EE\u540D\u91CC\uFF0C\u5982\u6B4C\u624B\u3001\u4E0A\u4F20\u4EBA\u5458\u6635\u79F0\u7B49\u3002")]);},default:function _default(){return createVNode("i",{"class":styles$1.iconQesution},null);}})]);},default:function _default(){return createVNode(Fragment,null,[_this5.form.backgroundMp3s.map(function(mp3,index){return createVNode(ElFormItem,{"prop":"backgroundMp3s.".concat(index,".url"),"rules":[{required:true,message:'请选择原音文件',trigger:'blur,change'}],"class":styles$1.formItem},{default:function _default(){return[createVNode("div",{"style":"line-height: 1; font-weight: 500;font-size: 16px;color: #131415; padding-bottom: 12px;"},[createTextVNode("\u6240\u5C5E\u8F68\u9053\uFF1A"),mp3.trackName]),createVNode(ColUpload,{"modelValue":mp3.url,"onUpdate:modelValue":function onUpdateModelValue($event){return mp3.url=$event;},"bucket":'cloud-coach',"accept":'.mp3',"uploadType":'file',"disabled":_this5.auditDisabled,"class":styles$1.uploadCon,"size":8,"type":"music","btnText":"上传原音文件","extraTips":"仅支持MP3格式文件,文件最大不能超过8MB"},null)];}});})]);}}),createVNode("div",{"class":styles$1.fAlert},[createTextVNode("\u66F2\u76EE\u4FE1\u606F")]),createVNode(ElFormItem,{"label":"曲目名称","prop":"name","rules":[{required:true,message:'请输入曲目名称'}]},{default:function _default(){return[createVNode(ElInput,{"modelValue":_this5.form.name,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.name=$event;},"placeholder":"请选择曲目名称","maxlength":50,"showWordLimit":true},null)];}}),createVNode(ElFormItem,{"label":"音乐人","prop":"composer","rules":[{required:true,message:'请输入音乐人'}]},{default:function _default(){return[createVNode(ElInput,{"modelValue":_this5.form.composer,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.composer=$event;},"placeholder":"请输入音乐人","maxlength":14,"showWordLimit":true},null)];}}),createVNode(ElFormItem,{"label":"曲目描述","prop":"remark"},{default:function _default(){return[createVNode(ElInput,{"modelValue":_this5.form.remark,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.remark=$event;},"placeholder":"请输入曲目描述","maxlength":200,"showWordLimit":true,"type":"textarea"},null)];}}),createVNode(ElFormItem,{"label":"曲谱封面","prop":"musicCover","rules":[{required:true,message:'请上传曲谱封面'}]},{default:function _default(){return[createVNode(ColCropper,{"modelValue":_this5.form.musicCover,"bucket":'cloud-coach',"cropUploadSuccess":function cropUploadSuccess(data){_this5.form.musicCover=data;},"onRemove":function onRemove(){_this5.form.musicCover='';},"delete":!_this5.auditDisabled,"disabled":_this5.auditDisabled,"domSize":{height:'150px'},"options":{title:'曲谱封面',enlarge:2,autoCropWidth:300,autoCropHeight:300}},null)];}}),createVNode(ElFormItem,{"label":"曲目速度","prop":"playSpeed","rules":[{required:true,message:'请输入曲目速度'}]},{default:function _default(){return[createVNode(ElInputNumber,{"controls":false,"modelValue":_this5.form.playSpeed,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.playSpeed=$event;},"placeholder":"请输入曲目速度","min":45,"max":270},null)];}}),createVNode(ElFormItem,{"label":"曲目标签","prop":"tags","rules":[{required:true,message:'请选择曲目标签'}]},{default:function _default(){return[createVNode(ElSelect,{"multiple":true,"modelValue":_this5.form.tags,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.tags=$event;},"placeholder":"请选择曲目标签","multipleLimit":3,"class":"w-full"},_isSlot(_slot=_this5.tagList.map(function(item){return createVNode(ElOption,{"key":item.id,"value":item.id,"label":item.name},null);}))?_slot:{default:function _default(){return[_slot];}})];}}),createVNode(ElFormItem,{"label":"是否收费","prop":"paymentType","rules":[{required:true,message:'请选择是否收费'}]},{default:function _default(){return[createVNode(ElRadioGroup,{"modelValue":_this5.form.paymentType,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.paymentType=$event;}},{default:function _default(){return[createVNode(ElRadioButton,{"label":'CHARGE',"class":"mr-3 w-24"},{default:function _default(){return[createTextVNode("\u662F")];}}),createVNode(ElRadioButton,{"label":'FREE',"class":"w-24"},{default:function _default(){return[createTextVNode("\u5426")];}})];}})];}}),_this5.form.paymentType==='CHARGE'&&createVNode(Fragment,null,[createVNode(ElFormItem,{"label":"收费价格","prop":"musicPrice","rules":[{required:true,validator:validator}]},{default:function _default(){return[createVNode(ElInput,{"modelValue":_this5.form.musicPrice,"onUpdate:modelValue":function onUpdateModelValue($event){return _this5.form.musicPrice=$event;},"placeholder":"请输入收费价格","maxlength":5,"onKeyup":_this5.onFormatter},{suffix:function suffix(){return createVNode("span",{"class":"text-base text-[#999]"},[createTextVNode("\u5143")]);}})];}}),createVNode(ElFormItem,null,{default:function _default(){return[createVNode("div",{"class":styles$1.rule},[createVNode("p",null,[createTextVNode("\u6263\u9664\u624B\u7EED\u8D39\u540E\u8BE5\u66F2\u76EE\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A"),createVNode("span",null,[(parseFloat(_this5.form.musicPrice||'0')||0)*(100-_this5.music_sheet_service_fee)/100,createVNode("span",null,[createTextVNode("\u5143/\u4EBA")])])]),createVNode("p",null,[createTextVNode("\u60A8\u7684\u4E50\u8C31\u6536\u5165\u5728\u5B66\u5458\u8D2D\u4E70\u540E"),_this5.music_account_period,createTextVNode("\u5929\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D")])])];}})])];}}),!this.auditDisabled&&createVNode("div",{"class":"text-center pt-6 pb-7"},[createVNode(ElButton,{"class":"!w-44 !h-[48px]","round":true,"onClick":function onClick(){_this5.$router.back();}},{default:function _default(){return[createTextVNode("\u53D6\u6D88")];}}),createVNode(ElButton,{"type":"primary","class":"!w-44 !h-[48px]","round":true,"onClick":this.onSubmit,"loading":this.submitLoading},{default:function _default(){return[createTextVNode("\u63D0\u4EA4\u5BA1\u6838")];}})]),createVNode(ElDialog,{"modelValue":this.visibleShow,"onUpdate:modelValue":function onUpdateModelValue(val){return _this5.visibleShow=val;},"destroyOnClose":true,"customClass":styles$1.messageDialog},{default:function _default(){return[createVNode(MessageTip,{"type":'upload',"title":'上传须知',"onConfirm":function onConfirm(){localStorage.setItem('isCatchTip','1');_this5.visibleShow=false;}},null)];}}),createVNode(ElDialog,{"modelValue":this.visibleShow2,"onUpdate:modelValue":function onUpdateModelValue(val){return _this5.visibleShow2=val;},"destroyOnClose":true,"customClass":styles$1.messageDialog2},{default:function _default(){return[createVNode(MessageTip,{"type":'error',"title":'解析失败',"onConfirm":function onConfirm(){return _this5.visibleShow2=false;}},null)];}})]);}}));}};});})();