1 |
- import{A as K,d as k,S as w,Q as ee,ao as te,a9 as ue,ae as ie,aj as ae,a2 as se,a5 as le,aE as re,j as e,aa as L,M as v,X as I,aq as V,at as oe,L as ne,N as ce,w as g,B as F,z as r,g as q,T as de,n as b,f as me,bg as pe,F as y,Y as he,aR as M,Z as Fe}from"./index.e6d6174e.js";import"./index.af99cf22.js";import{F as h}from"./index.17d70acf.js";import{S as fe}from"./index.9093bc60.js";import{T as B}from"./index.05f2b7dd.js";import{R as D,a as T}from"./index.cbc70232.js";import"./index.d92a5aca.js";import"./index.bcc8eff6.js";import{C as f,a as d}from"./index.3dbd60dd.js";import{S as ge}from"./index.68e8d63d.js";import"./index.67c54471.js";import"./index.b4a53c6a.js";import"./index.4324e3af.js";import{U as be,C as Ee}from"./index.80eb2440.js";import{S as Ce}from"./select-tag.3f6ab952.js";import{t as P}from"./teacherState.c60b6196.js";import{v as ye}from"./toolsValidate.add49407.js";import{F as Be}from"./index.41be4a84.js";import{P as Ae}from"./index.00bf6672.js";import"./use-id.f239f36f.js";import"./index.83d3716a.js";import"./index.3d7e5752.js";import"./checkbox_default.8d9b037b.js";import"./index.c67b3500.js";import"./index.684ca989.js";import"./index.926ca9c5.js";const[Ue,A]=K("notice-bar"),De={text:String,mode:String,color:String,delay:L(1),speed:L(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var Te=k({name:Ue,props:De,emits:["close","replay"],setup(t,{emit:u,slots:a}){let l=0,c=0,i;const o=w(),n=w(),m=ee({show:!0,offset:0,duration:0}),G=()=>{if(a["left-icon"])return a["left-icon"]();if(t.leftIcon)return e(v,{class:A("left-icon"),name:t.leftIcon},null)},H=()=>{if(t.mode==="closeable")return"cross";if(t.mode==="link")return"arrow"},J=p=>{t.mode==="closeable"&&(m.show=!1,u("close",p))},W=()=>{if(a["right-icon"])return a["right-icon"]();const p=H();if(p)return e(v,{name:p,class:A("right-icon"),onClick:J},null)},Q=()=>{m.offset=l,m.duration=0,oe(()=>{V(()=>{m.offset=-c,m.duration=(c+l)/+t.speed,u("replay")})})},Y=()=>{const p=t.scrollable===!1&&!t.wrapable,C={transform:m.offset?`translateX(${m.offset}px)`:"",transitionDuration:`${m.duration}s`};return e("div",{ref:o,role:"marquee",class:A("wrap")},[e("div",{ref:n,style:C,class:[A("content"),{"van-ellipsis":p}],onTransitionend:Q},[a.default?a.default():t.text])])},E=()=>{const{delay:p,speed:C,scrollable:U}=t,Z=ne(p)?+p*1e3:0;l=0,c=0,m.offset=0,m.duration=0,clearTimeout(i),i=setTimeout(()=>{if(!o.value||!n.value||U===!1)return;const S=I(o).width,j=I(n).width;(U||j>S)&&V(()=>{l=S,c=j,m.offset=-c,m.duration=c/+C})},Z)};return te(E),ue(E),ie("pageshow",E),ae({reset:E}),se(()=>[t.text,t.scrollable],E),()=>{const{color:p,wrapable:C,background:U}=t;return le(e("div",{role:"alert",class:A({wrapable:C}),style:{color:p,background:U}},[G(),Y(),W()]),[[re,m.show]])}}});const _e=ce(Te);const R={2:"\u662F",0:"\u5426"},O={MIDI:"MIDI",MP3:"MP3"},$={HOMEMODE:"\u81EA\u5236\u4F34\u594F",COMMON:"\u666E\u901A\u4F34\u594F"},X={0:"\u5426",1:"\u662F"},z=t=>{var c,i;const u={speed:0,title:"",composer:"",partNames:[]},a=new DOMParser().parseFromString(t,"text/xml");u.title=((c=a.getElementsByTagName("work-title")[0])==null?void 0:c.textContent)||"",u.composer=((i=a.getElementsByTagName("creator")[0])==null?void 0:i.textContent)||"";const l=a.getElementsByTagName("measure");for(const o of Array.from(a.getElementsByTagName("part-name")))o.textContent&&u.partNames.push(o.textContent);for(const o of Array.from(l)){const n=o.getElementsByTagName("per-minute");if(n.length&&n[n.length-1]){u.speed=parseFloat(n[n.length-1].textContent||"0");break}}return u};var _=k({name:"Upload",props:{accept:{type:String},formatFile:{type:Function,default:t=>t},"onUpdate:modelValue":{type:Function,default:t=>{}}},data(){return{list:[],uploading:!1}},methods:{async beforeRead(t){return console.log("beforeRead",t),!0},async upload(t){this.uploading=!0;const u=new FormData;u.append("file",t);try{const a=await g.post("/api-teacher/uploadFile",{data:u});this.$emit("update:modelValue",a.data.url)}catch{}this.uploading=!1}},render(){return e(be,{accept:this.accept,maxCount:1,modelValue:this.list,beforeDelete:this.beforeRead,"onUpdate:modelValue":async t=>{t[0]&&(await this.upload(t[0].file),this.formatFile(t[0].file)),this.list=t},onDelete:()=>{this.list=[],this.$emit("update:modelValue",null)}},{default:()=>[e(F,{loading:this.uploading},{default:()=>[r("\u4E0A\u4F20\u6587\u4EF6")]})]})}});const xe="_form_1s25e_1",Ne="_container_1s25e_5",Me="_area_1s25e_10",ke="_select_1s25e_14",Se="_rule_1s25e_22",je="_radio_1s25e_38",we="_tags_1s25e_66",Le="_file_1s25e_71",ve="_delbtn_1s25e_82",Ie="_upbtn_1s25e_87",Ve="_tips_1s25e_99",qe="_tipsTitle_1s25e_108",Pe="_imgContainer_1s25e_118";var s={form:xe,container:Ne,area:Me,select:ke,"clear-px":"_clear-px_1s25e_18",rule:Se,"button-area":"_button-area_1s25e_33","radio-group":"_radio-group_1s25e_38",radio:je,tags:we,file:Le,delbtn:ve,upbtn:Ie,tips:Ve,tipsTitle:qe,imgContainer:Pe},x="./assets/upload.4b2c151a.svg";function N(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Fe(t)}const Re=t=>(console.log(t),Number(t)<=0?"\u6536\u8D39\u91D1\u989D\u5FC5\u987B\u5927\u4E8E0":!0);var ht=k({name:"MusicUpload",data(){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(){this.mergeXmlData(this.formated)},chargeType(){this.chargeType===0&&(this.musicPrice="",this.paymentType="")}},computed:{choiceSubjectIds(){let t=P.teacherCert.subjectId?P.teacherCert.subjectId.split(","):[];return t=t.map(u=>Number(u)),t},subjectList(){return this.subjectListres||[]},choiceSubject(){const t=[];return this.subjectList.forEach(u=>{u.subjects&&u.subjects.forEach(a=>{this.choiceSubjectIds.includes(a.id)&&t.push(a)})}),t}},async mounted(){g.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_service_fee,music_account_period"}}).then(u=>{console.log(u,"res"),(u.data||[]).forEach(l=>{l.paramName==="music_sheet_service_fee"?this.music_sheet_service_fee=l.paramValue:l.paramName==="music_account_period"&&(this.music_account_period=l.paramValue)})}),await g.get("/api-teacher/subject/subjectSelect").then(u=>{const a=[];for(const l of u.data||[]){const c=l.subjects||[];a.push(...c)}this.subjectListres=a,this.subjectListNames=this.getSubjectListNames(a)}),this.$route.params.id&&this.setDetail(this.$route.params.id);const t=await g.post("/api-teacher/open/appVersion",{data:{platform:q.platformType==="STUDENT"?"ios-student":"ios-teacher",version:q.version}});this.checked=!!t.data.check,this.checked&&(this.chargeType=0)},methods:{async setDetail(t){try{const u=await g.get("/api-teacher/music/sheet/detail/"+t);this.chargeType=u.data.paymentType==="FREE"?0:2,this.paymentType=u.data.paymentType,this.showFingering=u.data.showFingering,this.canEvaluate=u.data.canEvaluate,this.chargeType&&(this.musicPrice=u.data.musicPrice),this.composer=u.data.composer,this.musicSheetName=u.data.musicSheetName,this.audioType=u.data.audioType,this.notation=u.data.notation,this.selectedSubjectList={label:u.data.musicSubject,value:u.data.subjectNames},this.vlewSubjectList={label:u.data.musicSubject,value:u.data.subjectNames},this.subJectIndex=Object.keys(this.subjectListNames).findIndex(l=>l===u.data.musicSubject);const a=u.data.musicTagNames.split(",");this.tags=u.data.musicTag.split(","),this.tags=this.tags.filter(l=>l!="");for(let l=0;l<a.length;l++)this.tagsNames[this.tags[l]]=a[l];this.exquisiteFlag=u.data.exquisiteFlag,this.xmlFileUrl=u.data.xmlFileUrl,this.accompanimentType=u.data.accompanimentType,this.titleImg=u.data.titleImg,this.audioType==="MP3"?(this.hasBeat=u.data.audioType==="MP3"&&u.data.mp3Type==="MP3_METRONOME"||u.data.audioType==="MIDI"?1:0,this.mp3Url=u.data.audioFileUrl||u.data.url):this.midiUrl=u.data.midiUrl,this.backgroundMp3s=(u.data.background||[]).map((l,c)=>(c===0&&(this.bgmp3Url=l.audioFileUrl),{url:l.audioFileUrl,track:l.track})),this.reason=u.data.reason,console.log(this.bgmp3Url)}catch(u){console.log(u)}},createSubmitData(){var a;const t=this.hasBeat?"MP3_METRONOME":"MP3",u=this.audioType==="MP3"?t:"MIDI";return{audioType:this.audioType,sourceType:"TEACHER",mp3Type:u,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((a=this.selectedSubjectList)==null?void 0:a.label)||void 0,musicSheetName:this.musicSheetName,midiUrl:this.midiUrl,notation:Number(this.notation),xmlFileUrl:this.xmlFileUrl,canEvaluate:Number(this.canEvaluate),chargeType:this.chargeType===0?"FREE":"CHARGE",paymentType:this.chargeType===0?"FREE":"CHARGE",exquisiteFlag:this.exquisiteFlag,composer:this.composer,musicPrice:this.chargeType===0?0:this.musicPrice,background:this.backgroundMp3s.map(l=>({audioFileUrl:this.bgmp3Url,track:l.track}))}},async submit(t){console.log(t),this.submitLoading=!0;try{this.$route.params.id?await g.post("/api-teacher/music/sheet/update",{data:{...this.createSubmitData(),id:this.$route.params.id}}):await g.post("/api-teacher/music/sheet/create",{data:this.createSubmitData()})}catch{}de("\u4E0A\u4F20\u6210\u529F"),setTimeout(()=>{b({api:"back"}),this.submitLoading=!1},800),console.log(t)},onFormatter(t){return ye(t)},getSubjectListNames(t){const u={};for(const a of t)if(u[a.id]=a.name,a.subjects)for(const l of a.subjects)u[l.id]=l.name;return u},failed(){console.log("failed",this.backgroundMp3s)},mergeXmlData(t){this.formated=t,this.musicSheetName||(this.musicSheetName=t.title),this.composer||(this.composer=t.composer)},readerFile(t){const u=new FileReader;u.onload=()=>{const a=u.result;this.formated=z(a)},u.readAsText(t)},onChoice(t){this.subJectVisible=!1,this.selectedSubjectList=[t]},onComfirm(t,u){this.tagsNames=u,this.tagVisibility=!1;const a=Object.values(t).flat().filter(Boolean);console.log(a),this.tags=a},naiveXMLFile(){this.xmlFileLoading=!0,b({api:"chooseFile",content:{type:"xml",bucket:"cloud-coach"}},t=>{this.xmlFileUrl=(t==null?void 0:t.fileUrl)||this.xmlFileUrl||"",this.xmlFileLoading=!1,this.xmlFileUrl&&pe(this.xmlFileUrl).then(u=>this.formated=z(u))})},naiveMidFile(){this.midiLoading=!0,b({api:"chooseFile",content:{type:"midi",bucket:"cloud-coach"}},t=>{this.midiUrl=(t==null?void 0:t.fileUrl)||this.midiUrl||"",this.midiLoading=!1})},naiveMp3File(){this.mp3Loading=!0,b({api:"chooseFile",content:{type:"mp3",bucket:"cloud-coach"}},t=>{this.mp3Url=(t==null?void 0:t.fileUrl)||this.mp3Url||"",this.mp3Loading=!1})},naiveBGMp3File(){this.bgmp3Loading=!0,b({api:"chooseFile",content:{type:"mp3",bucket:"cloud-coach"}},t=>{this.bgmp3Url,this.bgmp3Url=(t==null?void 0:t.fileUrl)||this.bgmp3Url||"",this.bgmp3Loading=!1})},fileName(t=""){return t.split("/").pop()},removeBackground(t){this.backgroundMp3s.splice(t,1)},onDetail(t){let u=`${location.origin}/teacher/#/registerProtocol`;t==="question"?u=`${location.origin}/teacher/muic-standard/question.html`:t==="music"&&(u=`${location.origin}/teacher/muic-standard/index.html`),b({api:"openWebView",content:{url:u,orientation:1,isHideTitle:!1}})}},render(){let t,u,a,l;console.log(this.formated);const c=me();return e(Be,{class:s.form,onSubmit:this.submit,onFailed:this.failed},{default:()=>[this.reason&&e(_e,{wrapable:!0,scrollable:!1,text:this.reason},null),e("div",{class:s.container},[e("div",{class:s.tips},[e("div",{class:s.tipsTitle},[r("\u6CE8\u610F\u4E8B\u9879\uFF1A")]),e("div",{class:s.tipsContent},[r("1\u3001\u5FC5\u987B\u662F\u4E0A\u4F20\u4EBA\u81EA\u5DF1\u53C2\u4E0E\u5236\u4F5C\u7684\u4F5C\u54C1\u3002"),e("br",null,null),r("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\u5C06\u5C01\u53F7\u3002"),e("br",null,null),r("3\u3001\u70B9\u51FB\u67E5\u770B"),e("span",{onClick:()=>this.onDetail("protocol")},[r("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),r("\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\uFF1B")])]),e(f,{class:s.area},{default:()=>[e(d,{border:!1,required:!0,title:"MusicXML\u6587\u4EF6"},{default:()=>[e(h,{name:"xmlFileUrl",modelValue:this.xmlFileUrl,rules:[{required:!0,message:"\u8BF7\u9009\u62E9MusicXML\u6587\u4EF6"}]},{input:()=>c.isApp?e(F,{icon:x,class:s.upbtn,onClick:this.naiveXMLFile,loading:this.xmlFileLoading},{default:()=>[this.xmlFileUrl?this.fileName(this.xmlFileUrl):"\u4E0A\u4F20\u6587\u4EF6"]}):e(y,null,[e(_,{"onUpdate:modelValue":i=>this.xmlFileUrl=i,accept:".xml",formatFile:this.readerFile},null),e("div",{style:{marginLeft:"8px"}},[this.fileName(this.xmlFileUrl)])])})]})]}),e("div",{class:s.tips},[e("div",{class:s.tipsTitle},[r("\u66F2\u8C31\u5BA1\u6838\u6807\u51C6\uFF1A")]),e("div",{class:s.tipsContent},[r("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"),e("span",{onClick:()=>this.onDetail("music")},[r("\u300A\u66F2\u8C31\u6392\u7248\u89C4\u8303\u300B")]),r("\uFF1B 1\u3001\u5FC5\u987B\u662F\u4E0A\u4F20\u4EBA\u81EA\u5DF1\u53C2\u4E0E\u5236\u4F5C\u7684\u4F5C\u54C1\u3002"),e("br",null,null),r("2\u3001XML\u4E0EMIDI\u6587\u4EF6\u5185\u5BB9\u5FC5\u987B\u4E00\u81F4\uFF0C\u63A8\u8350\u4F7F\u7528Sibelius\u6253\u8C31\u8F6F\u4EF6\u3002\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"),e("span",{onClick:()=>this.onDetail("question")},[r("\u300A\u5E38\u89C1\u95EE\u9898\u300B")])])]),e(f,{class:s.area},{default:()=>[e(d,{required:!0,title:"\u64AD\u653E\u7C7B\u578B",border:!1},{default:()=>[e(D,{class:s["radio-group"],modelValue:this.audioType,"onUpdate:modelValue":i=>this.audioType=i},N(t=Object.keys(O).map(i=>{const o=i===this.audioType,n=o?"primary":"default";return e(T,{class:s.radio,name:i},{default:()=>[e(B,{size:"large",plain:o,type:n},{default:()=>[O[i]]})]})}))?t:{default:()=>[t]})]}),this.audioType==="MP3"?e(y,null,[e(d,{required:!0,title:"\u4F34\u594F\u7C7B\u578B",border:!1},{default:()=>[e(D,{class:s["radio-group"],modelValue:this.accompanimentType,"onUpdate:modelValue":i=>this.accompanimentType=i},N(u=Object.keys($).map(i=>{const o=i===String(this.accompanimentType),n=o?"primary":"default";return e(T,{class:s.radio,name:i},{default:()=>[e(B,{size:"large",plain:o,type:n},{default:()=>[$[i]]})]})}))?u:{default:()=>[u]})]}),e(d,{border:!1,title:"\u4F34\u594F\u6587\u4EF6"},{default:()=>[e(h,{name:"mp3Url",modelValue:this.mp3Url},{input:()=>c.isApp?e(F,{icon:x,class:s.upbtn,onClick:this.naiveMp3File,loading:this.mp3Loading},{default:()=>[this.mp3Url?this.fileName(this.mp3Url):"\u4E0A\u4F20\u6587\u4EF6"]}):e(y,null,[e(_,{"onUpdate:modelValue":i=>this.mp3Url=i,accept:".mp3"},null),e("div",{style:{marginLeft:"8px"}},[this.fileName(this.mp3Url)])])})]})]):e(d,{border:!1,required:!0,title:"MIDI\u6587\u4EF6"},{default:()=>[e(h,{name:"midiUrl",modelValue:this.midiUrl,rules:[{required:!0,message:"\u8BF7\u9009\u62E9MIDI\u6587\u4EF6"}]},{input:()=>c.isApp?e(F,{icon:x,class:s.upbtn,onClick:this.naiveMidFile,loading:this.midiLoading},{default:()=>[this.midiUrl?this.fileName(this.midiUrl):"\u4E0A\u4F20\u6587\u4EF6"]}):e(y,null,[e(_,{"onUpdate:modelValue":i=>this.midiUrl=i,accept:".mid,.midi"},null),e("div",{style:{marginLeft:"8px"}},[this.fileName(this.midiUrl)])])})]})]}),e("div",{class:s.tips},[e("div",{class:s.tipsContent},[r("1\u3001\u63A8\u8350\u4E0A\u4F20\u81EA\u5236\u4F34\u594F\uFF0C\u4F34\u594F\u548C\u8C31\u9762\u5FC5\u987B\u5BF9\u9F50\u3002\u81EA\u5236\u4F34\u594F\u53EF\u4EE5\u8BBE\u7F6E\u66F4\u9AD8\u7684\u6536\u8D39\u6807\u51C6\u3002"),e("br",null,null),r("2\u3001\u666E\u901A\u4F34\u594F\u5982\u679C\u6D89\u53CA\u5230\u7248\u6743\u7EA0\u7EB7\uFF0C\u6839\u636E"),e("span",{onClick:()=>this.onDetail("protocol")},[r("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),r("\u5E73\u53F0\u6709\u6743\u8FDB\u884C\u4E0B\u67B6\u5904\u7406\u3002")])]),e(f,{class:s.area},{default:()=>[this.audioType==="MP3"&&this.backgroundMp3s.map((i,o)=>e(d,{required:!0,border:!1,title:(i.track||"")+"\u539F\u97F3\u6587\u4EF6"},{default:()=>[e(h,{name:"url",modelValue:this.bgmp3Url},{input:()=>c.isApp?e(F,{icon:x,class:s.upbtn,onClick:this.naiveBGMp3File,loading:this.bgmp3Loading},{default:()=>[this.bgmp3Url?this.fileName(this.bgmp3Url):"\u4E0A\u4F20\u6587\u4EF6"]}):e(y,null,[e(_,{"onUpdate:modelValue":n=>this.bgmp3Url=n,accept:".mp3"},null),e("div",{style:{marginLeft:"8px"}},[this.fileName(this.bgmp3Url)])])})],right:()=>this.backgroundMp3s.length>1?e(F,{onClick:()=>this.removeBackground(o),style:{border:"none"},icon:"cross"},null):null})),e(d,{required:!0,title:"\u66F2\u76EE\u540D\u79F0"},{default:()=>[e(h,{clearable:!0,name:"musicSheetName",modelValue:this.musicSheetName,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0"}],class:s["clear-px"],placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0","onUpdate:modelValue":i=>this.musicSheetName=i},null)]})]}),e("div",{class:s.tips},[e("div",{class:s.tipsContent},[r("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\u3002"),e("br",null,null),r("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\u300Axxxx\u300B\uFF0C\u4E3E\u4F8B\uFF1A\u4EBA\u751F\u7684\u65CB\u8F6C\u6728\u9A6C\u300A\u54C8\u5C14\u7684\u79FB\u52A8\u57CE\u5821\u300B\uFF08\u957F\u7B1B\u4E8C\u91CD\u594F\u7248\uFF09"),e("br",null,null),r("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")])]),e(f,{class:s.area},{default:()=>[e(d,{border:!1,required:!0,title:"\u66F2\u8C31\u5C01\u9762"},{default:()=>[e(Ee,{cropper:!0,bucket:"cloud-coach",options:{autoCropWidth:600,autoCropHeight:600},modelValue:this.titleImg,"onUpdate:modelValue":i=>this.titleImg=i,class:s.imgContainer},null)]})]}),e(f,{class:s.area},{default:()=>[e(d,{required:!0,title:"\u827A\u672F\u5BB6"},{default:()=>[e(h,{clearable:!0,class:s["clear-px"],placeholder:"\u8BF7\u8F93\u5165\u827A\u672F\u5BB6\u59D3\u540D",name:"composer",modelValue:this.composer,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u827A\u672F\u5BB6\u59D3\u540D"}],"onUpdate:modelValue":i=>this.composer=i},null)]}),e(d,{required:!0,title:"\u66F2\u76EE\u58F0\u90E8"},{default:()=>{var i;return[e(h,{"is-link":!0,readonly:!0,class:s["clear-px"],placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u58F0\u90E8",name:"vlewSubjectList",modelValue:(i=this.vlewSubjectList)==null?void 0:i.value,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u58F0\u90E8"}],onClick:()=>this.showPicker=!0},null)]}})]}),e("div",{class:s.tips},[e("div",{class:s.tipsContent},[r("XML\u6587\u4EF6\u4E2D\uFF0C\u9009\u62E9\u7684\u66F2\u76EE\u58F0\u90E8\u9700\u8981\u5728\u603B\u8C31\u7684\u7F6E\u9876\u4F4D\u7F6E\u3002")])]),e(f,{class:s.area},{default:()=>[e(d,{border:!1,required:!0,title:"\u66F2\u76EE\u6807\u7B7E"},{default:()=>[e(h,{name:"tags",modelValue:this.tags.length?1:void 0,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"}]},{input:()=>this.tags.length>0?this.tags.map(i=>e(B,{type:"primary",size:"large",class:s.tags},{default:()=>[this.tagsNames[i]]})):e(he,{style:{width:"100%"},description:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",imageSize:0},null)})],right:()=>e(F,{class:s.select,round:!0,type:"primary",size:"small",onClick:()=>this.tagVisibility=!0},{default:()=>[r("\u9009\u62E9")]})})]}),e(f,{class:s.area},{default:()=>[!this.checked&&e(d,{required:!0,title:"\u662F\u5426\u6536\u8D39",border:!1},{default:()=>[e(D,{class:s["radio-group"],modelValue:this.chargeType,"onUpdate:modelValue":i=>{this.chargeType=Number(i)}},N(a=Object.keys(R).map(i=>{const o=i===String(this.chargeType),n=o?"primary":"default";return e(T,{class:s.radio,name:i},{default:()=>[e(B,{size:"large",plain:o,type:n},{default:()=>[R[i]]})]})}))?a:{default:()=>[a]})]}),this.chargeType===2&&e(d,{required:!0,title:"\u6536\u8D39\u4EF7\u683C"},{default:()=>[e(h,{clearable:!0,class:s["clear-px"],placeholder:"\u8BF7\u8F93\u5165\u6536\u8D39\u4EF7\u683C",formatter:this.onFormatter,modelValue:this.musicPrice,rules:[{required:!0,validator:Re,message:"\u8BF7\u8F93\u5165\u6536\u8D39\u4EF7\u683C"}],"onUpdate:modelValue":i=>this.musicPrice=i},{button:()=>"\u5143"})]}),e(d,{required:!0,title:"\u662F\u5426\u7CBE\u54C1\u4E50\u8C31",border:!1},{default:()=>[e(D,{class:s["radio-group"],modelValue:this.exquisiteFlag,"onUpdate:modelValue":i=>{this.exquisiteFlag=Number(i)}},N(l=Object.keys(X).map(i=>{const o=i===String(this.exquisiteFlag),n=o?"primary":"default";return e(T,{class:s.radio,name:i},{default:()=>[e(B,{size:"large",plain:o,type:n},{default:()=>[X[i]]})]})}))?l:{default:()=>[l]})]})]}),this.chargeType===2&&e("div",{class:s.rule},[e("p",null,[r("\u6263\u9664\u624B\u7EED\u8D39\u540E\u8BE5\u66F2\u76EE\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A")]),e("p",null,[r("\u6BCF\u4EBA\uFF1A"),e("span",null,[((parseFloat(this.musicPrice||"0")||0)*(100-this.music_sheet_service_fee)/100).toFixed(2)]),r("\u5143/\u4EBA")]),e("p",null,[r("\u60A8\u7684\u4E50\u8C31\u6536\u5165\u5728\u5B66\u5458\u8D2D\u4E70\u540E"),this.music_account_period,r("\u5929\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D")])])]),e(fe,{offsetBottom:0,position:"bottom"},{default:()=>[e("div",{class:s["button-area"]},[e(F,{type:"primary",block:!0,round:!0,"native-type":"submit",loading:this.submitLoading},{default:()=>[r("\u786E\u8BA4")]})])]}),e(M,{show:this.showPicker,round:!0,position:"bottom",teleport:"body","onUpdate:show":i=>this.showPicker=i},{default:()=>[e(Ae,{defaultIndex:this.subJectIndex,columnsFieldNames:{text:"value"},columns:Object.entries(this.subjectListNames).map(([i,o])=>({label:i,value:o})),onCancel:()=>this.showPicker=!1,onConfirm:i=>{this.selectedSubjectList=i,this.vlewSubjectList=i,this.showPicker=!1}},null)]}),e(M,{show:this.subJectVisible,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":i=>this.subJectVisible=i},{default:()=>[e(ge,{subjectList:this.subjectList,choiceSubjectIds:this.choiceSubjectIds,onChoice:this.onChoice,selectType:"Radio"},null)]}),e(M,{show:this.tagVisibility,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":i=>this.tagVisibility=i},{default:()=>[e(Ce,{onConfirm:this.onComfirm,onCancel:()=>{},rowSingle:!0,defaultValue:this.tags.join(","),needAllButton:!1},null)]})]})}});export{ht as default,Re as validator};
|