1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw i}}}}function i(e,t,n,r,a,i,o){try{var l=e[i](o),c=l.value}catch(u){return void n(u)}l.done?t(c):Promise.resolve(c).then(r,a)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function l(e){i(o,r,a,l,c,"next",e)}function c(e){i(o,r,a,l,c,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(c){l=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=document.createElement("style");s.innerHTML=":root{--van-notice-bar-height: 1.06667rem;--van-notice-bar-padding: 0 var(--van-padding-md);--van-notice-bar-wrapable-padding: var(--van-padding-xs) var(--van-padding-md);--van-notice-bar-text-color: var(--van-orange-dark);--van-notice-bar-font-size: var(--van-font-size-md);--van-notice-bar-line-height: .64rem;--van-notice-bar-background-color: var(--van-orange-light);--van-notice-bar-icon-size: .42667rem;--van-notice-bar-icon-min-width: .64rem}.van-notice-bar{position:relative;display:flex;align-items:center;height:var(--van-notice-bar-height);padding:var(--van-notice-bar-padding);color:var(--van-notice-bar-text-color);font-size:var(--van-notice-bar-font-size);line-height:var(--van-notice-bar-line-height);background:var(--van-notice-bar-background-color)}.van-notice-bar__left-icon,.van-notice-bar__right-icon{min-width:var(--van-notice-bar-icon-min-width);font-size:var(--van-notice-bar-icon-size)}.van-notice-bar__right-icon{text-align:right;cursor:pointer}.van-notice-bar__wrap{position:relative;display:flex;flex:1;align-items:center;height:100%;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap;transition-timing-function:linear}.van-notice-bar__content.van-ellipsis{max-width:100%}.van-notice-bar--wrapable{height:auto;padding:var(--van-notice-bar-wrapable-padding)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal;word-wrap:break-word}._form_1s25e_1{--van-notice-bar-background-color: var(--tag-bg-color);--van-notice-bar-text-color: var(--van-tag-primary-color)}._container_1s25e_5{background-color:var(--col-background-color);min-height:100vh;margin:.37333rem 0}._container_1s25e_5 ._area_1s25e_10{padding:.53333rem .53333rem 0;margin-bottom:.32rem}._container_1s25e_5 ._select_1s25e_14{font-size:.37333rem;padding:.16rem .32rem}._clear-px_1s25e_18{padding-left:0;padding-right:0}._rule_1s25e_22{font-size:.37333rem;line-height:.72rem;color:var(--tips-color);margin:0 .37333rem .53333rem}._rule_1s25e_22>p>span{color:var(--strong--color);font-weight:700}._button-area_1s25e_33{padding:.26667rem .37333rem;background-color:var(--white);box-shadow:0 0 .26667rem var(--box-shadow-color)}._radio-group_1s25e_38{display:flex;margin-top:.37333rem}._radio-group_1s25e_38 ._radio_1s25e_38:first-child .van-radio__label{margin-left:0}._radio_1s25e_38 .van-radio__icon{display:none}._radio_1s25e_38 .van-tag--large{width:2.50667rem;height:.8rem;font-size:.42667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_1s25e_38 .van-tag{box-sizing:border-box}._radio_1s25e_38 .van-tag--default{color:var(--van-tag-text-default-color)}._radio_1s25e_38 .van-tag--primary{background-color:var(--tag-bg-color)}._tags_1s25e_66{margin-right:.13333rem;margin-bottom:.13333rem;margin-top:.13333rem}._file_1s25e_71{display:flex;width:100%}._file_1s25e_71>div{flex:1}._file_1s25e_71>div>span{display:inline-block;margin-left:.13333rem}._file_1s25e_71 ._delbtn_1s25e_82{padding:0;height:auto;border:none}._upbtn_1s25e_87{border:.02667rem solid #cfcfcf;width:100%;background:#fbfbfb;color:#666;height:2.05333rem;border-radius:.13333rem;border-style:dashed}._upbtn_1s25e_87 i{font-size:.64rem}._tips_1s25e_99{font-size:.32rem;color:#e0945a;line-height:.48rem;padding:.4rem .29333rem;background:#fff3eb;border-radius:.26667rem;margin:0 .37333rem .32rem}._tips_1s25e_99 ._tipsTitle_1s25e_108{font-size:.37333rem;font-weight:600;color:#e0945a;line-height:.53333rem;padding-bottom:.16rem}._tips_1s25e_99 span{color:#5aa9e0}._imgContainer_1s25e_118{width:4rem;height:4rem;border-radius:.26667rem;overflow:hidden;margin:0 0 .32rem;position:relative}\n",document.head.appendChild(s),System.register(["./index-legacy.b903c881.js","./index-legacy.b7f666cc.js","./index-legacy.e9e6da38.js","./index-legacy.8abefd50.js","./index-legacy.857a8bc7.js","./index-legacy.b1d7bbb4.js","./index-legacy.fea60f22.js","./index-legacy.3720be7c.js","./index-legacy.71eb94ae.js","./index-legacy.19c85a8a.js","./index-legacy.5b93d63d.js","./index-legacy.ae2ce69e.js","./index-legacy.712aadc5.js","./index-legacy.2aba0015.js","./select-tag-legacy.e25783c1.js","./teacherState-legacy.b3331ddc.js","./toolsValidate-legacy.b90c63da.js","./index-legacy.885c229f.js","./index-legacy.99367098.js","./index-legacy.e35b642f.js","./use-id-legacy.29724920.js","./index-legacy.6a47581c.js","./index-legacy.a3b9d61a.js","./checkbox_default-legacy.9bc4f4da.js","./index-legacy.c28809c6.js","./oss-file-upload-legacy.930c862e.js","./index-legacy.8e85fa65.js","./index-legacy.77670d98.js","./index-legacy.6e10cd37.js"],(function(e){"use strict";var n,i,c,u,s,d,m,f,p,g,b,h,v,y,_,x,j,w,k,U,T,F,S,M,N,L,C,I,V,P,O,E,D,q,R,B,A,z,X,H,J,$,G,W,Q,Y,Z;return{setters:[function(e){n=e.A,i=e.d,c=e.S,u=e.Q,s=e.ao,d=e.a9,m=e.ae,f=e.aj,p=e.a2,g=e.a5,b=e.aE,h=e.j,v=e.aa,y=e.M,_=e.X,x=e.aq,j=e.at,w=e.L,k=e.N,U=e.w,T=e.B,F=e.z,S=e.g,M=e.T,N=e.n,L=e.f,C=e.bg,I=e.F,V=e.Y,P=e.aR,O=e.Z},function(){},function(e){E=e.F},function(e){D=e.S},function(e){q=e.T},function(e){R=e.R,B=e.a},function(){},function(){},function(e){A=e.C,z=e.a},function(e){X=e.S},function(){},function(){},function(){},function(e){H=e.U,J=e.C},function(e){$=e.S},function(e){G=e.t},function(e){W=e.v},function(e){Q=e.C},function(e){Y=e.F},function(e){Z=e.P},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var K=l(n("notice-bar"),2),ee=K[0],te=K[1],ne={text:String,mode:String,color:String,delay:v(1),speed:v(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}},re=i({name:ee,props:ne,emits:["close","replay"],setup:function(e,t){var n,r=t.emit,a=t.slots,i=0,o=0,l=c(),v=c(),k=u({show:!0,offset:0,duration:0}),U=function(t){"closeable"===e.mode&&(k.show=!1,r("close",t))},T=function(){if(a["right-icon"])return a["right-icon"]();var t="closeable"===e.mode?"cross":"link"===e.mode?"arrow":void 0;return t?h(y,{name:t,class:te("right-icon"),onClick:U},null):void 0},F=function(){k.offset=i,k.duration=0,j((function(){x((function(){k.offset=-o,k.duration=(o+i)/+e.speed,r("replay")}))}))},S=function(){var t=e.delay,r=e.speed,a=e.scrollable,c=w(t)?1e3*+t:0;i=0,o=0,k.offset=0,k.duration=0,clearTimeout(n),n=setTimeout((function(){if(l.value&&v.value&&!1!==a){var e=_(l).width,t=_(v).width;(a||t>e)&&x((function(){i=e,o=t,k.offset=-o,k.duration=o/+r}))}}),c)};return s(S),d(S),m("pageshow",S),f({reset:S}),p((function(){return[e.text,e.scrollable]}),S),function(){var t,n,r=e.color,i=e.wrapable,o=e.background;return g(h("div",{role:"alert",class:te({wrapable:i}),style:{color:r,background:o}},[a["left-icon"]?a["left-icon"]():e.leftIcon?h(y,{class:te("left-icon"),name:e.leftIcon},null):void 0,(t=!1===e.scrollable&&!e.wrapable,n={transform:k.offset?"translateX(".concat(k.offset,"px)"):"",transitionDuration:"".concat(k.duration,"s")},h("div",{ref:l,role:"marquee",class:te("wrap")},[h("div",{ref:v,style:n,class:[te("content"),{"van-ellipsis":t}],onTransitionend:F},[a.default?a.default():e.text])])),T()]),[[b,k.show]])}}}),ae=k(re),ie={2:"是",0:"否"},oe={MIDI:"MIDI",MP3:"MP3"},le={HOMEMODE:"自制伴奏",COMMON:"普通伴奏"},ce={0:"否",1:"是"},ue=function(e){var t,n,r={speed:0,title:"",composer:"",partNames:[]},a=(new DOMParser).parseFromString(e,"text/xml");r.title=(null===(t=a.getElementsByTagName("work-title")[0])||void 0===t?void 0:t.textContent)||"",r.composer=(null===(n=a.getElementsByTagName("creator")[0])||void 0===n?void 0:n.textContent)||"";for(var i=a.getElementsByTagName("measure"),o=0,l=Array.from(a.getElementsByTagName("part-name"));o<l.length;o++){var c=l[o];c.textContent&&r.partNames.push(c.textContent)}for(var u=0,s=Array.from(i);u<s.length;u++){var d=s[u].getElementsByTagName("per-minute");if(d.length&&d[d.length-1]){r.speed=parseFloat(d[d.length-1].textContent||"0");break}}return r},se=i({name:"Upload",props:{accept:{type:String},formatFile:{type:Function,default:function(e){return e}},"onUpdate:modelValue":{type:Function,default:function(e){}}},data:function(){return{list:[],uploading:!1}},methods:{beforeRead:function(e){return o(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("beforeRead",e),t.abrupt("return",!0);case 2:case"end":return t.stop()}}),t)})))()},upload:function(e){var t=this;return o(regeneratorRuntime.mark((function n(){var r,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.uploading=!0,(r=new FormData).append("file",e),n.prev=3,n.next=6,U.post("/api-teacher/uploadFile",{data:r});case 6:a=n.sent,t.$emit("update:modelValue",a.data.url),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(3);case 12:t.uploading=!1;case 13:case"end":return n.stop()}}),n,null,[[3,10]])})))()}},render:function(){var e,t=this;return h(H,{accept:this.accept,maxCount:1,modelValue:this.list,beforeDelete:this.beforeRead,"onUpdate:modelValue":(e=o(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n[0]){e.next=4;break}return e.next=3,t.upload(n[0].file);case 3:t.formatFile(n[0].file);case 4:t.list=n;case 5:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)}),onDelete:function(){t.list=[],t.$emit("update:modelValue",null)}},{default:function(){return[h(T,{loading:t.uploading},{default:function(){return[F("上传文件")]}})]}})}}),de={form:"_form_1s25e_1",container:"_container_1s25e_5",area:"_area_1s25e_10",select:"_select_1s25e_14","clear-px":"_clear-px_1s25e_18",rule:"_rule_1s25e_22","button-area":"_button-area_1s25e_33","radio-group":"_radio-group_1s25e_38",radio:"_radio_1s25e_38",tags:"_tags_1s25e_66",file:"_file_1s25e_71",delbtn:"_delbtn_1s25e_82",upbtn:"_upbtn_1s25e_87",tips:"_tips_1s25e_99",tipsTitle:"_tipsTitle_1s25e_108",imgContainer:"_imgContainer_1s25e_118"},me="./assets/upload.4b2c151a.svg";function fe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!O(e)}var pe=e("validator",(function(e){return console.log(e),!(Number(e)<=0)||"收费金额必须大于0"}));e("default",i({name:"MusicUpload",data:function(){return{reason:"",audioType:"MP3",xmlFileUrl:"",xmlFileLoading:!1,midiUrl:"",midiLoading:!1,mp3Url:"",bgmp3Url:"",mp3Loading:!1,bgmp3Loading:!1,musicSheetName:"",composer:"",speed:"",hasBeat:0,titleImg:"",accompanimentType:"HOMEMODE",chargeType:0,paymentType:"",showFingering:1,canEvaluate:1,notation:1,musicPrice:"",subJectIndex:0,selectTagVisible:!1,subJectVisible:!1,tags:[],tagsNames:[],formated:{},tagVisibility:!1,subjectListres:[],subjectListNames:{},selectedSubjectList:null,vlewSubjectList:null,submitLoading:!1,showPicker:!1,music_sheet_service_fee:0,music_account_period:0,exquisiteFlag:0,backgroundMp3s:[{url:"",track:""}],checked:!1}},watch:{formated:function(){this.mergeXmlData(this.formated)},chargeType:function(){0===this.chargeType&&(this.musicPrice="",this.paymentType="")}},computed:{choiceSubjectIds:function(){var e=G.teacherCert.subjectId?G.teacherCert.subjectId.split(","):[];return e=e.map((function(e){return Number(e)}))},subjectList:function(){return this.subjectListres||[]},choiceSubject:function(){var e=this,t=[];return this.subjectList.forEach((function(n){n.subjects&&n.subjects.forEach((function(n){e.choiceSubjectIds.includes(n.id)&&t.push(n)}))})),t}},mounted:function(){var e=this;return o(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_service_fee,music_account_period"}}).then((function(t){console.log(t,"res"),(t.data||[]).forEach((function(t){"music_sheet_service_fee"===t.paramName?e.music_sheet_service_fee=t.paramValue:"music_account_period"===t.paramName&&(e.music_account_period=t.paramValue)}))})),t.next=3,U.get("/api-teacher/subject/subjectSelect").then((function(t){var n,i=[],o=a(t.data||[]);try{for(o.s();!(n=o.n()).done;){var l=n.value.subjects||[];i.push.apply(i,r(l))}}catch(c){o.e(c)}finally{o.f()}e.subjectListres=i,e.subjectListNames=e.getSubjectListNames(i)}));case 3:return e.$route.params.id&&e.setDetail(e.$route.params.id),t.next=6,U.post("/api-teacher/open/appVersion",{data:{platform:"STUDENT"===S.platformType?"ios-student":"ios-teacher",version:S.version}});case 6:n=t.sent,e.checked=!!n.data.check,e.checked&&(e.chargeType=0);case 9:case"end":return t.stop()}}),t)})))()},methods:{setDetail:function(e){var t=this;return o(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,U.get("/api-teacher/music/sheet/detail/"+e);case 3:for(r=n.sent,t.chargeType="FREE"===r.data.paymentType?0:2,t.paymentType=r.data.paymentType,t.showFingering=r.data.showFingering,t.canEvaluate=r.data.canEvaluate,t.chargeType&&(t.musicPrice=r.data.musicPrice),t.composer=r.data.composer,t.musicSheetName=r.data.musicSheetName,t.audioType=r.data.audioType,t.notation=r.data.notation,t.selectedSubjectList={label:r.data.musicSubject,value:r.data.subjectNames},t.vlewSubjectList={label:r.data.musicSubject,value:r.data.subjectNames},t.subJectIndex=Object.keys(t.subjectListNames).findIndex((function(e){return e===r.data.musicSubject})),a=r.data.musicTagNames.split(","),t.tags=r.data.musicTag.split(","),t.tags=t.tags.filter((function(e){return""!=e})),i=0;i<a.length;i++)t.tagsNames[t.tags[i]]=a[i];t.exquisiteFlag=r.data.exquisiteFlag,t.xmlFileUrl=r.data.xmlFileUrl,t.accompanimentType=r.data.accompanimentType,t.titleImg=r.data.titleImg,"MP3"===t.audioType?(t.hasBeat="MP3"===r.data.audioType&&"MP3_METRONOME"===r.data.mp3Type||"MIDI"===r.data.audioType?1:0,t.mp3Url=r.data.audioFileUrl||r.data.url):t.midiUrl=r.data.midiUrl,t.backgroundMp3s=(r.data.background||[]).map((function(e,n){return 0===n&&(t.bgmp3Url=e.audioFileUrl),{url:e.audioFileUrl,track:e.track}})),t.reason=r.data.reason,console.log(t.bgmp3Url),n.next=33;break;case 30:n.prev=30,n.t0=n.catch(0),console.log(n.t0);case 33:case"end":return n.stop()}}),n,null,[[0,30]])})))()},createSubmitData:function(){var e,t=this,n=this.hasBeat?"MP3_METRONOME":"MP3",r="MP3"===this.audioType?n:"MIDI";return{audioType:this.audioType,sourceType:"TEACHER",mp3Type:r,hasBeat:Number(this.hasBeat),accompanimentType:this.accompanimentType,titleImg:this.titleImg,url:this.hasBeat?"":this.mp3Url,metronomeUrl:this.hasBeat?this.mp3Url:"",audioFileUrl:this.mp3Url,showFingering:Number(this.showFingering),musicTag:this.tags.join(","),musicSubject:Number(null===(e=this.selectedSubjectList)||void 0===e?void 0:e.label)||void 0,musicSheetName:this.musicSheetName,midiUrl:this.midiUrl,notation:Number(this.notation),xmlFileUrl:this.xmlFileUrl,canEvaluate:Number(this.canEvaluate),chargeType:0===this.chargeType?"FREE":"CHARGE",paymentType:0===this.chargeType?"FREE":"CHARGE",exquisiteFlag:this.exquisiteFlag,composer:this.composer,musicPrice:0===this.chargeType?0:this.musicPrice,background:this.backgroundMp3s.map((function(e){return{audioFileUrl:t.bgmp3Url,track:e.track}}))}},submit:function(e){var n=this;return o(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(console.log(e),n.submitLoading=!0,r.prev=2,!n.$route.params.id){r.next=8;break}return r.next=6,U.post("/api-teacher/music/sheet/update",{data:t(t({},n.createSubmitData()),{},{id:n.$route.params.id})});case 6:r.next=10;break;case 8:return r.next=10,U.post("/api-teacher/music/sheet/create",{data:n.createSubmitData()});case 10:r.next=14;break;case 12:r.prev=12,r.t0=r.catch(2);case 14:M("上传成功"),setTimeout((function(){N({api:"back"}),n.submitLoading=!1}),800),console.log(e);case 17:case"end":return r.stop()}}),r,null,[[2,12]])})))()},onFormatter:function(e){return W(e)},getSubjectListNames:function(e){var t,n={},r=a(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(n[i.id]=i.name,i.subjects){var o,l=a(i.subjects);try{for(l.s();!(o=l.n()).done;){var c=o.value;n[c.id]=c.name}}catch(u){l.e(u)}finally{l.f()}}}}catch(u){r.e(u)}finally{r.f()}return n},failed:function(){console.log("failed",this.backgroundMp3s)},mergeXmlData:function(e){this.formated=e,this.musicSheetName||(this.musicSheetName=e.title),this.composer||(this.composer=e.composer)},readerFile:function(e){var t=this,n=new FileReader;n.onload=function(){var e=n.result;t.formated=ue(e)},n.readAsText(e)},onChoice:function(e){this.subJectVisible=!1,this.selectedSubjectList=[e]},onComfirm:function(e,t){this.tagsNames=t,this.tagVisibility=!1;var n=Object.values(e).flat().filter(Boolean);console.log(n),this.tags=n},naiveXMLFile:function(){var e=this;this.xmlFileLoading=!0,N({api:"chooseFile",content:{type:"xml",bucket:"cloud-coach"}},(function(t){e.xmlFileUrl=(null==t?void 0:t.fileUrl)||e.xmlFileUrl||"",e.xmlFileLoading=!1,e.xmlFileUrl&&C(e.xmlFileUrl).then((function(t){return e.formated=ue(t)}))}))},naiveMidFile:function(){var e=this;this.midiLoading=!0,N({api:"chooseFile",content:{type:"midi",bucket:"cloud-coach"}},(function(t){e.midiUrl=(null==t?void 0:t.fileUrl)||e.midiUrl||"",e.midiLoading=!1}))},naiveMp3File:function(){var e=this;this.mp3Loading=!0,N({api:"chooseFile",content:{type:"mp3",bucket:"cloud-coach"}},(function(t){e.mp3Url=(null==t?void 0:t.fileUrl)||e.mp3Url||"",e.mp3Loading=!1}))},naiveBGMp3File:function(){var e=this;this.bgmp3Loading=!0,N({api:"chooseFile",content:{type:"mp3",bucket:"cloud-coach"}},(function(t){e.bgmp3Url,e.bgmp3Url=(null==t?void 0:t.fileUrl)||e.bgmp3Url||"",e.bgmp3Loading=!1}))},fileName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split("/").pop()},removeBackground:function(e){this.backgroundMp3s.splice(e,1)},onDetail:function(e){var t="".concat(location.origin,"/teacher/#/registerProtocol");"question"===e?t="".concat(location.origin,"/teacher/muic-standard/question.html"):"music"===e&&(t="".concat(location.origin,"/teacher/muic-standard/index.html")),N({api:"openWebView",content:{url:t,orientation:1,isHideTitle:!1}})}},render:function(){var e,t,n,r,a=this;console.log(this.formated);var i=L();return h(Y,{class:de.form,onSubmit:this.submit,onFailed:this.failed},{default:function(){return[h(Q,null,null),a.reason&&h(ae,{wrapable:!0,scrollable:!1,text:a.reason},null),h("div",{class:de.container},[h("div",{class:de.tips},[h("div",{class:de.tipsTitle},[F("注意事项:")]),h("div",{class:de.tipsContent},[F("1、必须是上传人自己参与制作的作品。"),h("br",null,null),F("2、歌曲及歌曲信息中请勿涉及政治、宗教、广告、涉毒、犯罪、色情、低俗、暴力、血腥、消极等违规内容,违反者直接删除内容。多次违反将封号。"),h("br",null,null),F("3、点击查看"),h("span",{onClick:function(){return a.onDetail("protocol")}},[F("《用户注册协议》")]),F(",如果您上传了文件,即认为您完全同意并遵守该协议的内容;")])]),h(A,{class:de.area},{default:function(){return[h(z,{border:!1,required:!0,title:"MusicXML文件"},{default:function(){return[h(E,{name:"xmlFileUrl",modelValue:a.xmlFileUrl,rules:[{required:!0,message:"请选择MusicXML文件"}]},{input:function(){return i.isApp?h(T,{icon:me,class:de.upbtn,onClick:a.naiveXMLFile,loading:a.xmlFileLoading},{default:function(){return[a.xmlFileUrl?a.fileName(a.xmlFileUrl):"上传文件"]}}):h(I,null,[h(se,{"onUpdate:modelValue":function(e){return a.xmlFileUrl=e},accept:".xml",formatFile:a.readerFile},null),h("div",{style:{marginLeft:"8px"}},[a.fileName(a.xmlFileUrl)])])}})]}})]}}),h("div",{class:de.tips},[h("div",{class:de.tipsTitle},[F("曲谱审核标准:")]),h("div",{class:de.tipsContent},[F("1、文件大小不要超过5MB,不符合版面规范的乐谱,审核未通过的不予上架,详情参考"),h("span",{onClick:function(){return a.onDetail("music")}},[F("《曲谱排版规范》")]),F("; 1、必须是上传人自己参与制作的作品。"),h("br",null,null),F("2、XML与MIDI文件内容必须一致,推荐使用Sibelius打谱软件。导出设置:导出XML-未压缩(*.xml)/导出MIDI:音色-其他回放设备General MIDI、MIDI、MIDI文件类型-类型0、不要勾选“将弱拍小节导出为具有休止符的完整小节”。点击查看"),h("span",{onClick:function(){return a.onDetail("question")}},[F("《常见问题》")])])]),h(A,{class:de.area},{default:function(){return[h(z,{required:!0,title:"播放类型",border:!1},{default:function(){return[h(R,{class:de["radio-group"],modelValue:a.audioType,"onUpdate:modelValue":function(e){return a.audioType=e}},fe(e=Object.keys(oe).map((function(e){var t=e===a.audioType,n=t?"primary":"default";return h(B,{class:de.radio,name:e},{default:function(){return[h(q,{size:"large",plain:t,type:n},{default:function(){return[oe[e]]}})]}})})))?e:{default:function(){return[e]}})]}}),"MP3"===a.audioType?h(I,null,[h(z,{required:!0,title:"伴奏类型",border:!1},{default:function(){return[h(R,{class:de["radio-group"],modelValue:a.accompanimentType,"onUpdate:modelValue":function(e){return a.accompanimentType=e}},fe(t=Object.keys(le).map((function(e){var t=e===String(a.accompanimentType),n=t?"primary":"default";return h(B,{class:de.radio,name:e},{default:function(){return[h(q,{size:"large",plain:t,type:n},{default:function(){return[le[e]]}})]}})})))?t:{default:function(){return[t]}})]}}),h(z,{border:!1,title:"伴奏文件"},{default:function(){return[h(E,{name:"mp3Url",modelValue:a.mp3Url},{input:function(){return i.isApp?h(T,{icon:me,class:de.upbtn,onClick:a.naiveMp3File,loading:a.mp3Loading},{default:function(){return[a.mp3Url?a.fileName(a.mp3Url):"上传文件"]}}):h(I,null,[h(se,{"onUpdate:modelValue":function(e){return a.mp3Url=e},accept:".mp3"},null),h("div",{style:{marginLeft:"8px"}},[a.fileName(a.mp3Url)])])}})]}})]):h(z,{border:!1,required:!0,title:"MIDI文件"},{default:function(){return[h(E,{name:"midiUrl",modelValue:a.midiUrl,rules:[{required:!0,message:"请选择MIDI文件"}]},{input:function(){return i.isApp?h(T,{icon:me,class:de.upbtn,onClick:a.naiveMidFile,loading:a.midiLoading},{default:function(){return[a.midiUrl?a.fileName(a.midiUrl):"上传文件"]}}):h(I,null,[h(se,{"onUpdate:modelValue":function(e){return a.midiUrl=e},accept:".mid,.midi"},null),h("div",{style:{marginLeft:"8px"}},[a.fileName(a.midiUrl)])])}})]}})]}}),h("div",{class:de.tips},[h("div",{class:de.tipsContent},[F("1、推荐上传自制伴奏,伴奏和谱面必须对齐。自制伴奏可以设置更高的收费标准。"),h("br",null,null),F("2、普通伴奏如果涉及到版权纠纷,根据"),h("span",{onClick:function(){return a.onDetail("protocol")}},[F("《用户注册协议》")]),F("平台有权进行下架处理。")])]),h(A,{class:de.area},{default:function(){return["MP3"===a.audioType&&a.backgroundMp3s.map((function(e,t){return h(z,{required:!0,border:!1,title:(e.track||"")+"原音文件"},{default:function(){return[h(E,{name:"url",modelValue:a.bgmp3Url},{input:function(){return i.isApp?h(T,{icon:me,class:de.upbtn,onClick:a.naiveBGMp3File,loading:a.bgmp3Loading},{default:function(){return[a.bgmp3Url?a.fileName(a.bgmp3Url):"上传文件"]}}):h(I,null,[h(se,{"onUpdate:modelValue":function(e){return a.bgmp3Url=e},accept:".mp3"},null),h("div",{style:{marginLeft:"8px"}},[a.fileName(a.bgmp3Url)])])}})]},right:function(){return a.backgroundMp3s.length>1?h(T,{onClick:function(){return a.removeBackground(t)},style:{border:"none"},icon:"cross"},null):null}})})),h(z,{required:!0,title:"曲目名称"},{default:function(){return[h(E,{clearable:!0,name:"musicSheetName",modelValue:a.musicSheetName,rules:[{required:!0,message:"请输入曲目名称"}],class:de["clear-px"],placeholder:"请输入曲目名称","onUpdate:modelValue":function(e){return a.musicSheetName=e}},null)]}})]}}),h("div",{class:de.tips},[h("div",{class:de.tipsContent},[F("1、同一首曲目不可重复上传,如有不同版本统一用“()”补充。举例:人生的旋转木马(长笛二重奏版)。"),h("br",null,null),F("2、曲目名后可添加曲目信息备注,包含但不限于曲目类型等。曲目名《xxxx》,举例:人生的旋转木马《哈尔的移动城堡》(长笛二重奏版)"),h("br",null,null),F("3、其他信息不要写在曲目名里,如歌手、上传人员昵称等。")])]),h(A,{class:de.area},{default:function(){return[h(z,{border:!1,required:!0,title:"曲谱封面"},{default:function(){return[h(J,{cropper:!0,bucket:"cloud-coach",options:{autoCropWidth:600,autoCropHeight:600},modelValue:a.titleImg,"onUpdate:modelValue":function(e){return a.titleImg=e},class:de.imgContainer},null)]}})]}}),h(A,{class:de.area},{default:function(){return[h(z,{required:!0,title:"艺术家"},{default:function(){return[h(E,{clearable:!0,class:de["clear-px"],placeholder:"请输入艺术家姓名",name:"composer",modelValue:a.composer,rules:[{required:!0,message:"请输入艺术家姓名"}],"onUpdate:modelValue":function(e){return a.composer=e}},null)]}}),h(z,{required:!0,title:"曲目声部"},{default:function(){var e;return[h(E,{"is-link":!0,readonly:!0,class:de["clear-px"],placeholder:"请选择曲目声部",name:"vlewSubjectList",modelValue:null===(e=a.vlewSubjectList)||void 0===e?void 0:e.value,rules:[{required:!0,message:"请选择曲目声部"}],onClick:function(){return a.showPicker=!0}},null)]}})]}}),h("div",{class:de.tips},[h("div",{class:de.tipsContent},[F("XML文件中,选择的曲目声部需要在总谱的置顶位置。")])]),h(A,{class:de.area},{default:function(){return[h(z,{border:!1,required:!0,title:"曲目标签"},{default:function(){return[h(E,{name:"tags",modelValue:a.tags.length?1:void 0,rules:[{required:!0,message:"请选择曲目标签"}]},{input:function(){return a.tags.length>0?a.tags.map((function(e){return h(q,{type:"primary",size:"large",class:de.tags},{default:function(){return[a.tagsNames[e]]}})})):h(V,{style:{width:"100%"},description:"请选择曲目标签",imageSize:0},null)}})]},right:function(){return h(T,{class:de.select,round:!0,type:"primary",size:"small",onClick:function(){return a.tagVisibility=!0}},{default:function(){return[F("选择")]}})}})]}}),h(A,{class:de.area},{default:function(){return[!a.checked&&h(z,{required:!0,title:"是否收费",border:!1},{default:function(){return[h(R,{class:de["radio-group"],modelValue:a.chargeType,"onUpdate:modelValue":function(e){a.chargeType=Number(e)}},fe(n=Object.keys(ie).map((function(e){var t=e===String(a.chargeType),n=t?"primary":"default";return h(B,{class:de.radio,name:e},{default:function(){return[h(q,{size:"large",plain:t,type:n},{default:function(){return[ie[e]]}})]}})})))?n:{default:function(){return[n]}})]}}),2===a.chargeType&&h(z,{required:!0,title:"收费价格"},{default:function(){return[h(E,{clearable:!0,class:de["clear-px"],placeholder:"请输入收费价格",formatter:a.onFormatter,modelValue:a.musicPrice,rules:[{required:!0,validator:pe,message:"请输入收费价格"}],"onUpdate:modelValue":function(e){return a.musicPrice=e}},{button:function(){return"元"}})]}}),h(z,{required:!0,title:"是否精品乐谱",border:!1},{default:function(){return[h(R,{class:de["radio-group"],modelValue:a.exquisiteFlag,"onUpdate:modelValue":function(e){a.exquisiteFlag=Number(e)}},fe(r=Object.keys(ce).map((function(e){var t=e===String(a.exquisiteFlag),n=t?"primary":"default";return h(B,{class:de.radio,name:e},{default:function(){return[h(q,{size:"large",plain:t,type:n},{default:function(){return[ce[e]]}})]}})})))?r:{default:function(){return[r]}})]}})]}}),2===a.chargeType&&h("div",{class:de.rule},[h("p",null,[F("扣除手续费后该曲目预计收入为:")]),h("p",null,[F("每人:"),h("span",null,[((parseFloat(a.musicPrice||"0")||0)*(100-a.music_sheet_service_fee)/100).toFixed(2)]),F("元/人")]),h("p",null,[F("您的乐谱收入在学员购买后"),a.music_account_period,F("天结算到您的账户中")])])]),h(D,{offsetBottom:0,position:"bottom"},{default:function(){return[h("div",{class:de["button-area"]},[h(T,{type:"primary",block:!0,round:!0,"native-type":"submit",loading:a.submitLoading},{default:function(){return[F("确认")]}})])]}}),h(P,{show:a.showPicker,round:!0,position:"bottom",teleport:"body","onUpdate:show":function(e){return a.showPicker=e}},{default:function(){return[h(Z,{defaultIndex:a.subJectIndex,columnsFieldNames:{text:"value"},columns:Object.entries(a.subjectListNames).map((function(e){var t=l(e,2);return{label:t[0],value:t[1]}})),onCancel:function(){return a.showPicker=!1},onConfirm:function(e){a.selectedSubjectList=e,a.vlewSubjectList=e,a.showPicker=!1}},null)]}}),h(P,{show:a.subJectVisible,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":function(e){return a.subJectVisible=e}},{default:function(){return[h(X,{subjectList:a.subjectList,choiceSubjectIds:a.choiceSubjectIds,onChoice:a.onChoice,selectType:"Radio"},null)]}}),h(P,{show:a.tagVisibility,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":function(e){return a.tagVisibility=e}},{default:function(){return[h($,{onConfirm:a.onComfirm,onCancel:function(){},rowSingle:!0,defaultValue:a.tags.join(","),needAllButton:!1},null)]}})]}})}}))}}}))}();
|