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 c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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=u(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),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).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,u,"next",e)}function u(e){i(o,r,a,l,u,"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(u){l=!0,a=u}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}(e,t)||u(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 u(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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.b2528a15.js","./index-legacy.207dc8c2.js","./index-legacy.ab501af1.js","./index-legacy.4f922f18.js","./index-legacy.edff980f.js","./index-legacy.5147af42.js","./index-legacy.7d3d7cf1.js","./index-legacy.8ed1b894.js","./index-legacy.fafbdfb8.js","./index-legacy.8c96f8d2.js","./index-legacy.ca42ae97.js","./index-legacy.3f4943f0.js","./index-legacy.70f6e2fc.js","./index-legacy.2b17a64a.js","./select-tag-legacy.9deb7724.js","./teacherState-legacy.145d885b.js","./toolsValidate-legacy.b90c63da.js","./index-legacy.702b8ebf.js","./index-legacy.5af656e4.js","./use-id-legacy.4f071235.js","./index-legacy.d3645f16.js","./index-legacy.987f23f1.js","./checkbox_default-legacy.16e4afe4.js","./index-legacy.a493c461.js","./index-legacy.44baf7f8.js","./index-legacy.6e10cd37.js"],(function(e){"use strict";var n,i,u,c,s,d,m,f,p,g,b,h,v,y,_,x,w,j,k,U,T,F,S,M,N,L,I,C,V,O,P,E,D,q,R,B,A,z,X,H,$,J,G,W,Y,Z;return{setters:[function(e){n=e.E,i=e.ab,u=e.d,c=e.U,s=e.S,d=e.ap,m=e.aa,f=e.af,p=e.ak,g=e.a3,b=e.a6,h=e.aF,v=e.i,y=e.N,_=e.Y,x=e.ar,w=e.au,j=e.M,k=e.O,U=e.e,T=e.B,F=e.A,S=e.s,M=e.T,N=e.p,L=e.b,I=e.F,C=e.Z,V=e.aT,O=e.$,P=e.bh},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,$=e.C},function(e){J=e.S},function(e){G=e.t},function(e){W=e.v},function(e){Y=e.P},function(e){Z=e.F},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var K=l(n("notice-bar"),2),Q=K[0],ee=K[1],te={text:String,mode:String,color:String,delay:i(1),speed:i(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}},ne=u({name:Q,props:te,emits:["close","replay"],setup:function(e,t){var n,r=t.emit,a=t.slots,i=0,o=0,l=c(),u=c(),k=s({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?v(y,{name:t,class:ee("right-icon"),onClick:U},null):void 0},F=function(){k.offset=i,k.duration=0,w((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=j(t)?1e3*+t:0;i=0,o=0,k.offset=0,k.duration=0,clearTimeout(n),n=setTimeout((function(){if(l.value&&u.value&&!1!==a){var e=_(l).width,t=_(u).width;(a||t>e)&&x((function(){i=e,o=t,k.offset=-o,k.duration=o/+r}))}}),c)};return d(S),m(S),f("pageshow",S),p({reset:S}),g((function(){return[e.text,e.scrollable]}),S),function(){var t,n,r=e.color,i=e.wrapable,o=e.background;return b(v("div",{role:"alert",class:ee({wrapable:i}),style:{color:r,background:o}},[a["left-icon"]?a["left-icon"]():e.leftIcon?v(y,{class:ee("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")},v("div",{ref:l,role:"marquee",class:ee("wrap")},[v("div",{ref:u,style:n,class:[ee("content"),{"van-ellipsis":t}],onTransitionend:F},[a.default?a.default():e.text])])),T()]),[[h,k.show]])}}}),re=k(ne),ae={2:"是",0:"否"},ie={MIDI:"MIDI",MP3:"MP3"},oe={HOMEMODE:"自制伴奏",COMMON:"普通伴奏"},le={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 u=l[o];u.textContent&&r.partNames.push(u.textContent)}for(var c=0,s=Array.from(i);c<s.length;c++){var d=s[c].getElementsByTagName("per-minute");if(d.length&&d[d.length-1]){r.speed=parseFloat(d[d.length-1].textContent||"0");break}}return r},ce=u({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 v(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[v(T,{loading:t.uploading},{default:function(){return[F("上传文件")]}})]}})}}),se={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"},de="./assets/upload.4b2c151a.svg";function me(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!O(e)}var fe=e("validator",(function(e){return console.log(e),!(Number(e)<=0)||"收费金额必须大于0"}));e("default",u({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(u){o.e(u)}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 u=o.value;n[u.id]=u.name}}catch(c){l.e(c)}finally{l.f()}}}}catch(c){r.e(c)}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&&P(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 v(Z,{class:se.form,onSubmit:this.submit,onFailed:this.failed},{default:function(){return[a.reason&&v(re,{wrapable:!0,scrollable:!1,text:a.reason},null),v("div",{class:se.container},[v("div",{class:se.tips},[v("div",{class:se.tipsTitle},[F("注意事项:")]),v("div",{class:se.tipsContent},[F("1、必须是上传人自己参与制作的作品。"),v("br",null,null),F("2、歌曲及歌曲信息中请勿涉及政治、宗教、广告、涉毒、犯罪、色情、低俗、暴力、血腥、消极等违规内容,违反者直接删除内容。多次违反将封号。"),v("br",null,null),F("3、点击查看"),v("span",{onClick:function(){return a.onDetail("protocol")}},[F("《用户注册协议》")]),F(",如果您上传了文件,即认为您完全同意并遵守该协议的内容;")])]),v(A,{class:se.area},{default:function(){return[v(z,{border:!1,required:!0,title:"MusicXML文件"},{default:function(){return[v(E,{name:"xmlFileUrl",modelValue:a.xmlFileUrl,rules:[{required:!0,message:"请选择MusicXML文件"}]},{input:function(){return i.isApp?v(T,{icon:de,class:se.upbtn,onClick:a.naiveXMLFile,loading:a.xmlFileLoading},{default:function(){return[a.xmlFileUrl?a.fileName(a.xmlFileUrl):"上传文件"]}}):v(I,null,[v(ce,{"onUpdate:modelValue":function(e){return a.xmlFileUrl=e},accept:".xml",formatFile:a.readerFile},null),v("div",{style:{marginLeft:"8px"}},[a.fileName(a.xmlFileUrl)])])}})]}})]}}),v("div",{class:se.tips},[v("div",{class:se.tipsTitle},[F("曲谱审核标准:")]),v("div",{class:se.tipsContent},[F("1、文件大小不要超过5MB,不符合版面规范的乐谱,审核未通过的不予上架,详情参考"),v("span",{onClick:function(){return a.onDetail("music")}},[F("《曲谱排版规范》")]),F("; 1、必须是上传人自己参与制作的作品。"),v("br",null,null),F("2、XML与MIDI文件内容必须一致,推荐使用Sibelius打谱软件。导出设置:导出XML-未压缩(*.xml)/导出MIDI:音色-其他回放设备General MIDI、MIDI、MIDI文件类型-类型0、不要勾选“将弱拍小节导出为具有休止符的完整小节”。点击查看"),v("span",{onClick:function(){return a.onDetail("question")}},[F("《常见问题》")])])]),v(A,{class:se.area},{default:function(){return[v(z,{required:!0,title:"播放类型",border:!1},{default:function(){return[v(R,{class:se["radio-group"],modelValue:a.audioType,"onUpdate:modelValue":function(e){return a.audioType=e}},me(e=Object.keys(ie).map((function(e){var t=e===a.audioType,n=t?"primary":"default";return v(B,{class:se.radio,name:e},{default:function(){return[v(q,{size:"large",plain:t,type:n},{default:function(){return[ie[e]]}})]}})})))?e:{default:function(){return[e]}})]}}),"MP3"===a.audioType?v(I,null,[v(z,{required:!0,title:"伴奏类型",border:!1},{default:function(){return[v(R,{class:se["radio-group"],modelValue:a.accompanimentType,"onUpdate:modelValue":function(e){return a.accompanimentType=e}},me(t=Object.keys(oe).map((function(e){var t=e===String(a.accompanimentType),n=t?"primary":"default";return v(B,{class:se.radio,name:e},{default:function(){return[v(q,{size:"large",plain:t,type:n},{default:function(){return[oe[e]]}})]}})})))?t:{default:function(){return[t]}})]}}),v(z,{border:!1,title:"伴奏文件"},{default:function(){return[v(E,{name:"mp3Url",modelValue:a.mp3Url},{input:function(){return i.isApp?v(T,{icon:de,class:se.upbtn,onClick:a.naiveMp3File,loading:a.mp3Loading},{default:function(){return[a.mp3Url?a.fileName(a.mp3Url):"上传文件"]}}):v(I,null,[v(ce,{"onUpdate:modelValue":function(e){return a.mp3Url=e},accept:".mp3"},null),v("div",{style:{marginLeft:"8px"}},[a.fileName(a.mp3Url)])])}})]}})]):v(z,{border:!1,required:!0,title:"MIDI文件"},{default:function(){return[v(E,{name:"midiUrl",modelValue:a.midiUrl,rules:[{required:!0,message:"请选择MIDI文件"}]},{input:function(){return i.isApp?v(T,{icon:de,class:se.upbtn,onClick:a.naiveMidFile,loading:a.midiLoading},{default:function(){return[a.midiUrl?a.fileName(a.midiUrl):"上传文件"]}}):v(I,null,[v(ce,{"onUpdate:modelValue":function(e){return a.midiUrl=e},accept:".mid,.midi"},null),v("div",{style:{marginLeft:"8px"}},[a.fileName(a.midiUrl)])])}})]}})]}}),v("div",{class:se.tips},[v("div",{class:se.tipsContent},[F("1、推荐上传自制伴奏,伴奏和谱面必须对齐。自制伴奏可以设置更高的收费标准。"),v("br",null,null),F("2、普通伴奏如果涉及到版权纠纷,根据"),v("span",{onClick:function(){return a.onDetail("protocol")}},[F("《用户注册协议》")]),F("平台有权进行下架处理。")])]),v(A,{class:se.area},{default:function(){return["MP3"===a.audioType&&a.backgroundMp3s.map((function(e,t){return v(z,{required:!0,border:!1,title:(e.track||"")+"原音文件"},{default:function(){return[v(E,{name:"url",modelValue:a.bgmp3Url},{input:function(){return i.isApp?v(T,{icon:de,class:se.upbtn,onClick:a.naiveBGMp3File,loading:a.bgmp3Loading},{default:function(){return[a.bgmp3Url?a.fileName(a.bgmp3Url):"上传文件"]}}):v(I,null,[v(ce,{"onUpdate:modelValue":function(e){return a.bgmp3Url=e},accept:".mp3"},null),v("div",{style:{marginLeft:"8px"}},[a.fileName(a.bgmp3Url)])])}})]},right:function(){return a.backgroundMp3s.length>1?v(T,{onClick:function(){return a.removeBackground(t)},style:{border:"none"},icon:"cross"},null):null}})})),v(z,{required:!0,title:"曲目名称"},{default:function(){return[v(E,{clearable:!0,name:"musicSheetName",modelValue:a.musicSheetName,rules:[{required:!0,message:"请输入曲目名称"}],class:se["clear-px"],placeholder:"请输入曲目名称","onUpdate:modelValue":function(e){return a.musicSheetName=e}},null)]}})]}}),v("div",{class:se.tips},[v("div",{class:se.tipsContent},[F("1、同一首曲目不可重复上传,如有不同版本统一用“()”补充。举例:人生的旋转木马(长笛二重奏版)。"),v("br",null,null),F("2、曲目名后可添加曲目信息备注,包含但不限于曲目类型等。曲目名《xxxx》,举例:人生的旋转木马《哈尔的移动城堡》(长笛二重奏版)"),v("br",null,null),F("3、其他信息不要写在曲目名里,如歌手、上传人员昵称等。")])]),v(A,{class:se.area},{default:function(){return[v(z,{border:!1,required:!0,title:"曲谱封面"},{default:function(){return[v($,{cropper:!0,bucket:"cloud-coach",options:{autoCropWidth:600,autoCropHeight:600},modelValue:a.titleImg,"onUpdate:modelValue":function(e){return a.titleImg=e},class:se.imgContainer},null)]}})]}}),v(A,{class:se.area},{default:function(){return[v(z,{required:!0,title:"艺术家"},{default:function(){return[v(E,{clearable:!0,class:se["clear-px"],placeholder:"请输入艺术家姓名",name:"composer",modelValue:a.composer,rules:[{required:!0,message:"请输入艺术家姓名"}],"onUpdate:modelValue":function(e){return a.composer=e}},null)]}}),v(z,{required:!0,title:"曲目声部"},{default:function(){var e;return[v(E,{"is-link":!0,readonly:!0,class:se["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)]}})]}}),v("div",{class:se.tips},[v("div",{class:se.tipsContent},[F("XML文件中,选择的曲目声部需要在总谱的置顶位置。")])]),v(A,{class:se.area},{default:function(){return[v(z,{border:!1,required:!0,title:"曲目标签"},{default:function(){return[v(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 v(q,{type:"primary",size:"large",class:se.tags},{default:function(){return[a.tagsNames[e]]}})})):v(C,{style:{width:"100%"},description:"请选择曲目标签",imageSize:0},null)}})]},right:function(){return v(T,{class:se.select,round:!0,type:"primary",size:"small",onClick:function(){return a.tagVisibility=!0}},{default:function(){return[F("选择")]}})}})]}}),v(A,{class:se.area},{default:function(){return[!a.checked&&v(z,{required:!0,title:"是否收费",border:!1},{default:function(){return[v(R,{class:se["radio-group"],modelValue:a.chargeType,"onUpdate:modelValue":function(e){a.chargeType=Number(e)}},me(n=Object.keys(ae).map((function(e){var t=e===String(a.chargeType),n=t?"primary":"default";return v(B,{class:se.radio,name:e},{default:function(){return[v(q,{size:"large",plain:t,type:n},{default:function(){return[ae[e]]}})]}})})))?n:{default:function(){return[n]}})]}}),2===a.chargeType&&v(z,{required:!0,title:"收费价格"},{default:function(){return[v(E,{clearable:!0,class:se["clear-px"],placeholder:"请输入收费价格",formatter:a.onFormatter,modelValue:a.musicPrice,rules:[{required:!0,validator:fe,message:"请输入收费价格"}],"onUpdate:modelValue":function(e){return a.musicPrice=e}},{button:function(){return"元"}})]}}),v(z,{required:!0,title:"是否精品乐谱",border:!1},{default:function(){return[v(R,{class:se["radio-group"],modelValue:a.exquisiteFlag,"onUpdate:modelValue":function(e){a.exquisiteFlag=Number(e)}},me(r=Object.keys(le).map((function(e){var t=e===String(a.exquisiteFlag),n=t?"primary":"default";return v(B,{class:se.radio,name:e},{default:function(){return[v(q,{size:"large",plain:t,type:n},{default:function(){return[le[e]]}})]}})})))?r:{default:function(){return[r]}})]}})]}}),2===a.chargeType&&v("div",{class:se.rule},[v("p",null,[F("扣除手续费后该曲目预计收入为:")]),v("p",null,[F("每人:"),v("span",null,[((parseFloat(a.musicPrice||"0")||0)*(100-a.music_sheet_service_fee)/100).toFixed(2)]),F("元/人")]),v("p",null,[F("您的乐谱收入在学员购买后"),a.music_account_period,F("天结算到您的账户中")])])]),v(D,{offsetBottom:0,position:"bottom"},{default:function(){return[v("div",{class:se["button-area"]},[v(T,{type:"primary",block:!0,round:!0,"native-type":"submit",loading:a.submitLoading},{default:function(){return[F("确认")]}})])]}}),v(V,{show:a.showPicker,round:!0,position:"bottom",teleport:"body","onUpdate:show":function(e){return a.showPicker=e}},{default:function(){return[v(Y,{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)]}}),v(V,{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[v(X,{subjectList:a.subjectList,choiceSubjectIds:a.choiceSubjectIds,onChoice:a.onChoice,selectType:"Radio"},null)]}}),v(V,{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[v(J,{onConfirm:a.onComfirm,onCancel:function(){},rowSingle:!0,defaultValue:a.tags.join(","),needAllButton:!1},null)]}})]}})}}))}}}))}();
|