SignUpLevel.da366874.js 30 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["SignUpLevel"],{2558:function(e,t,a){"use strict";var r=a("f0da"),n=a.n(r);n.a},3908:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));a("433b");var r=a("d399");function n(e){e?r["a"].loading({duration:0,forbidClick:!0,message:"加载中..."}):r["a"].clear()}},6746:function(e,t,a){},"6e6e":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mheader"},[a("header",{staticClass:"m-nav-header",class:[{fixed:e.isFixed},{headerColor:e.isColor}]},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:e.goBack}},[a("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),a("div",{staticClass:"m-nav-bar__title"},[e._t("default",[e._v(e._s(e.name?e.name:e.$route.meta.description))])],2),a("div",{staticClass:"m-nav-bar__right"},[e._t("right")],2)])])},n=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},isColor:{type:Boolean,default:!1},backUrl:{type:Object,default:function(){return{callBack:null,status:!1,path:"",params:{}}}}},data:function(){return{title:this.name,backUrlParams:this.backUrl}},methods:{goBack:function(){var e=this.backUrlParams;"function"==typeof e.callBack?e.callBack():e.status?this.$router.push({path:e.path,query:e.params}):history.go(-1)}}},o=i,s=(a("2558"),a("2877")),c=Object(s["a"])(o,r,n,!1,null,"9865a7b0",null);t["a"]=c.exports},8900:function(e,t,a){"use strict";a.d(t,"o",(function(){return o})),a.d(t,"p",(function(){return s})),a.d(t,"m",(function(){return c})),a.d(t,"d",(function(){return l})),a.d(t,"j",(function(){return u})),a.d(t,"q",(function(){return d})),a.d(t,"l",(function(){return m})),a.d(t,"r",(function(){return p})),a.d(t,"i",(function(){return f})),a.d(t,"g",(function(){return h})),a.d(t,"h",(function(){return v})),a.d(t,"b",(function(){return x})),a.d(t,"c",(function(){return g})),a.d(t,"k",(function(){return S})),a.d(t,"e",(function(){return b})),a.d(t,"f",(function(){return y})),a.d(t,"n",(function(){return N})),a.d(t,"a",(function(){return I}));var r=a("4328"),n=a.n(r),i=a("981f").default;function o(e){return i({url:"/api-auth/code/sendSms",method:"post",data:n.a.stringify(e)})}function s(e){return i({url:"/api-auth/smsLogin",method:"post",data:n.a.stringify(e)})}function c(e){return i({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:e})}function l(e){return i({url:"/api-user/examinationBasic/getInfo",method:"post",data:n.a.stringify(e)})}function u(e){return i({url:"/api-user/student/getStudent",method:"get",params:e})}function d(e){return i({url:"/api-user/student/updateInfo",method:"post",data:n.a.stringify(e)})}function m(e){return i({url:"/api-user/examRegistration/ocr",method:"post",data:e})}function p(e){return i({url:"/api-user/uploadFile",method:"post",data:e})}function f(e){return i({url:"/api-user/examSubject/getExamSubjects",method:"get",params:e})}function h(e){return i({url:"/api-user/examSubjectSong/getExamSubjectLevel",method:"get",params:e})}function v(e){return i({url:"/api-user/examSubjectSong/getExamSubjectSong",method:"get",params:e})}function x(e){return i({url:"/api-user/examRegistration/add",method:"post",data:e})}function g(e){return i({url:"/api-user/examRegistration/update",method:"post",data:e})}function S(e){return i({url:"/api-user/examMusicTheory/getTheoryLevelList",method:"get",params:e})}function b(e){return i({url:"/api-user/examOrder/getExamIngOrder",method:"get",params:e})}function y(e){return i({url:"/api-user/examRegistration/getExamRegistration",method:"get",params:e})}function N(e){return i({url:"/api-user/examRegistration/repay",method:"post",data:n.a.stringify(e)})}function I(e){return i({url:"/api-user/examOrder/closeOrder",method:"post",data:n.a.stringify(e)})}},a298:function(e,t,a){"use strict";var r=a("6746"),n=a.n(r);n.a},a34a:function(e,t,a){e.exports=a("96cf")},a9ab:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"signUpLevel"},[a("m-header"),a("m-step",{attrs:{number:3}}),a("div",{staticClass:"title"},[e._v("报考专业")]),a("van-field",{attrs:{readonly:"",required:"",name:"subjectId",label:"报考专业",placeholder:"请选择","is-link":""},on:{click:function(t){return e.onGetSheetList("examSubject")}},model:{value:e.formText.subjectName,callback:function(t){e.$set(e.formText,"subjectName",t)},expression:"formText.subjectName"}}),a("van-field",{attrs:{readonly:"",required:"",name:"levelId",label:"专业级别",placeholder:"请选择","is-link":""},on:{click:function(t){return e.onGetSheetList("level")}},model:{value:e.formText.levelName,callback:function(t){e.$set(e.formText,"levelName",t)},expression:"formText.levelName"}}),a("div",{staticClass:"title"},[e._v("报考曲目")]),e.form.levelId?a("div",{staticClass:"van-hairline--bottom"},[e.practiceSongIdList?a("div",{key:"practiceNum",staticClass:"van-hairline--bottom"},e._l(e.practiceNum,(function(t,r){return a("van-field",{key:r,attrs:{required:"",readonly:"",label:"练习曲"+e.numberToCN(r)+"名称及作者",placeholder:"请选择","is-link":""},on:{click:function(t){return e.onChangePractice("practice",r)}},model:{value:e.practiceSelect[r],callback:function(t){e.$set(e.practiceSelect,r,"string"===typeof t?t.trim():t)},expression:"practiceSelect[index]"}})})),1):a("div",{key:"practiceNum",staticClass:"van-hairline--bottom"},e._l(e.practiceNum,(function(t,r){return a("van-field",{key:r,attrs:{required:"",readonly:"",clearable:"",name:"code",label:"练习曲"+e.numberToCN(r)+"名称及作者"},scopedSlots:e._u([{key:"button",fn:function(){return[a("span",{staticClass:"codeText",on:{click:function(t){return e.onUploadSong("practiceNum",r)}}},[e._v("上传曲目")])]},proxy:!0}],null,!0),model:{value:e.practiceSelect[r],callback:function(t){e.$set(e.practiceSelect,r,"string"===typeof t?t.trim():t)},expression:"practiceSelect[index]"}})})),1),e.performSongIdList?a("div",{key:"performNum"},e._l(e.performNum,(function(t,r){return a("van-field",{key:r,attrs:{required:"",readonly:"",label:"演奏曲"+e.numberToCN(r)+"名称及作者",placeholder:"请选择","is-link":""},on:{click:function(t){return e.onChangePractice("performNum",r)}},model:{value:e.performNumSelect[r],callback:function(t){e.$set(e.performNumSelect,r,"string"===typeof t?t.trim():t)},expression:"performNumSelect[index]"}})})),1):a("div",{key:"performNum"},e._l(e.performNum,(function(t,r){return a("van-field",{key:r,attrs:{required:"",readonly:"",clearable:"",name:"code",label:"演奏曲"+e.numberToCN(r)+"名称及作者"},scopedSlots:e._u([{key:"button",fn:function(){return[a("span",{staticClass:"codeText",on:{click:function(t){return e.onUploadSong("performNum",r)}}},[e._v("上传曲目")])]},proxy:!0}],null,!0),model:{value:e.performNumSelect[r],callback:function(t){e.$set(e.performNumSelect,r,"string"===typeof t?t.trim():t)},expression:"performNumSelect[index]"}})})),1)]):e._e(),a("van-field",{attrs:{readonly:"",clearable:"",name:"code",label:"已获最高等级专业证书"},scopedSlots:e._u([{key:"input",fn:function(){return[a("van-uploader",{attrs:{name:"certificate","before-read":e.beforeRead,"before-delete":e.beforeDelete,"after-read":e.afterRead,accept:"image/*","max-count":1},model:{value:e.uploadCertificate,callback:function(t){e.uploadCertificate=t},expression:"uploadCertificate"}})]},proxy:!0}])}),a("div",{staticClass:"title"},[e._v("乐理知识")]),a("van-field",{attrs:{required:"",readonly:"",clickable:"",name:"nation",label:"乐理级别",placeholder:"请选择乐理级别","is-link":""},on:{click:function(t){return e.onGetSheetList("examMusicTheory")}},model:{value:e.formText.examMusicTheoryName,callback:function(t){e.$set(e.formText,"examMusicTheoryName",t)},expression:"formText.examMusicTheoryName"}}),a("van-field",{attrs:{readonly:"",clearable:"",name:"code",label:"已获最高等级乐理证书"},scopedSlots:e._u([{key:"input",fn:function(){return[a("van-uploader",{attrs:{name:"certificate2","before-read":e.beforeRead,"before-delete":e.beforeDelete,"after-read":e.afterRead,accept:"image/*","max-count":1},model:{value:e.uploadCertificate2,callback:function(t){e.uploadCertificate2=t},expression:"uploadCertificate2"}})]},proxy:!0}])}),a("div",{staticClass:"title"},[e._v("指导老师")]),a("van-field",{attrs:{name:"adviserName",label:"老师姓名",placeholder:"请输入老师姓名"},model:{value:e.form.adviserName,callback:function(t){e.$set(e.form,"adviserName",t)},expression:"form.adviserName"}}),a("van-field",{attrs:{name:"adviserPhone",maxlength:"11",label:"联系方式",placeholder:"请输入联系方式"},model:{value:e.form.adviserPhone,callback:function(t){e.$set(e.form,"adviserPhone",t)},expression:"form.adviserPhone"}}),a("div",{staticClass:"m-btn-group"},[a("van-button",{staticClass:"btn_prev",staticStyle:{"background-color":"transparent"},attrs:{round:"",color:"#2DC7AA",plain:""},on:{click:e.onBack}},[e._v("上一步")]),a("van-button",{attrs:{round:"",color:"#2DC7AA"},on:{click:e.onSubmit}},[e._v("确认报名")])],1),a("van-popup",{attrs:{position:"bottom"},model:{value:e.sheetForm.sheetStatus,callback:function(t){e.$set(e.sheetForm,"sheetStatus",t)},expression:"sheetForm.sheetStatus"}},[a("van-picker",{attrs:{loading:e.sheetForm.loading,"default-index":e.sheetForm.index,columns:e.sheetForm.columns,"show-toolbar":""},on:{cancel:function(t){e.sheetForm.sheetStatus=!1},confirm:e.onSheetConfirm}})],1),a("van-popup",{attrs:{position:"bottom"},model:{value:e.sheetSong.status,callback:function(t){e.$set(e.sheetSong,"status",t)},expression:"sheetSong.status"}},[a("van-picker",{attrs:{"default-index":e.sheetSong.index,columns:e.sheetSong.columns,"show-toolbar":""},on:{cancel:function(t){e.sheetSong.status=!1},confirm:e.onPracticeConfirm}})],1),a("van-popup",{staticClass:"van-popup-song",attrs:{"close-on-click-overlay":!1},model:{value:e.songUpload.songStatus,callback:function(t){e.$set(e.songUpload,"songStatus",t)},expression:"songUpload.songStatus"}},[a("div",{staticClass:"song-popup"},[a("div",{staticClass:"title"},[e._v("自定义曲目")]),a("van-field",{attrs:{name:"songName",label:"曲名",placeholder:"请输入曲名"},scopedSlots:e._u([{key:"label",fn:function(){return[a("i",{staticStyle:{color:"#ee0a24"}},[e._v("*")]),e._v("曲名")]},proxy:!0}]),model:{value:e.songUpload.name,callback:function(t){e.$set(e.songUpload,"name",t)},expression:"songUpload.name"}}),a("van-field",{attrs:{name:"songAuthor",label:"作者",placeholder:"请输入作者"},scopedSlots:e._u([{key:"label",fn:function(){return[a("i",{staticStyle:{color:"#ffffff"}},[e._v("*")]),e._v("作者")]},proxy:!0}]),model:{value:e.songUpload.author,callback:function(t){e.$set(e.songUpload,"author",t)},expression:"songUpload.author"}}),a("van-field",{attrs:{readonly:"",clearable:""},scopedSlots:e._u([{key:"input",fn:function(){return["practiceNum"==e.songUpload.indexName?a("van-uploader",{attrs:{name:e.songUpload.indexName+"-"+e.songUpload.index,"before-read":e.beforeRead,"before-delete":e.beforeDelete,"after-read":e.afterRead,multiple:"",accept:"image/*","max-count":5},model:{value:e.practiceUpload[e.songUpload.index],callback:function(t){e.$set(e.practiceUpload,e.songUpload.index,"string"===typeof t?t.trim():t)},expression:"practiceUpload[songUpload.index]"}}):e._e(),"performNum"==e.songUpload.indexName?a("van-uploader",{attrs:{name:e.songUpload.indexName+"-"+e.songUpload.index,"before-read":e.beforeRead,"before-delete":e.beforeDelete,"after-read":e.afterRead,multiple:"",accept:"image/*","max-count":5},model:{value:e.performNumUpload[e.songUpload.index],callback:function(t){e.$set(e.performNumUpload,e.songUpload.index,"string"===typeof t?t.trim():t)},expression:"performNumUpload[songUpload.index]"}}):e._e()]},proxy:!0}])}),a("p",{staticClass:"song-popup-tips"},[a("i",{staticStyle:{color:"#ee0a24"}},[e._v("*")]),e._v("支持格式:png,jpg,bmp")]),a("div",{staticClass:"popup-group"},[a("span",{on:{click:e.onSaveCancel}},[e._v("取消")]),a("span",{staticClass:"popup-sure",on:{click:e.onSaveUpload}},[e._v("确定")])])],1)])],1)},n=[],i=a("a34a"),o=a.n(i),s=a("6e6e"),c=a("ab6b"),l=a("3908"),u=a("b48b"),d=a("8900");function m(e,t,a,r,n,i,o){try{var s=e[i](o),c=s.value}catch(l){return void a(l)}s.done?t(c):Promise.resolve(c).then(r,n)}function p(e){return function(){var t=this,a=arguments;return new Promise((function(r,n){var i=e.apply(t,a);function o(e){m(i,r,n,o,s,"next",e)}function s(e){m(i,r,n,o,s,"throw",e)}o(void 0)}))}}var f={1:"一级",2:"二级",3:"三级",4:"四级",5:"五级",6:"六级",7:"七级",8:"八级",9:"九级",10:"十级"},h={name:"signUpLevel",components:{MHeader:s["a"],MStep:c["a"]},data:function(){var e=localStorage.getItem("examId"),t=localStorage.getItem("organId"),a=localStorage.getItem("examRegistrationParams")?JSON.parse(localStorage.getItem("examRegistrationParams")):null;return{examId:e,organId:t,examRegistrationParams:a,patternPhone:u["a"],sheetForm:{currentType:null,sheetStatus:!1,loading:!1,index:0,columns:[]},examSubjectList:[],examSubjectIndex:0,levelList:[],levelIndex:0,practiceNum:0,practiceSongIdList:null,performNum:0,performSongIdList:null,songList:[],songUpload:{songStatus:!1,indexName:null,index:null,name:null,author:null},form:{subjectId:null,levelId:null,examSubjectSongId:null,adviserName:null,adviserPhone:null,lastExamCertificateUrl:null,lastMusicTheoryCertificateUrl:null,examMusicTheoryId:null,examMusicTheoryLevel:null,levelFee:0,theoryLevelFee:0},formText:{subjectName:null,levelName:null,examMusicTheoryName:null},sheetSong:{status:!1,index:0,columns:[]},practiceSelect:[],practiceSelectUploadList:[],practiceSelectList:[],practiceSelectIds:[],performNumSelect:[],performNumSelectUploadList:[],performNumSelectList:[],performNumSelectIds:[],songSelectIndex:null,uploadCertificate:[],uploadCertificate2:[],practiceUpload:[],practiceUploadTemp:[],performNumUpload:[],performNumUploadTemp:[],examMusicTheoryList:[],examMusicTheoryIndex:0}},mounted:function(){this.__init(),this.examRegistrationParams?this.getRegisterInfo(this.examRegistrationParams):this.getTheoryLevelList(),this.onCheckOrder()},methods:{onCheckOrder:function(){var e=p(o.a.mark((function e(){var t,a,r=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["e"])({examinationBasicId:this.examId});case 2:t=e.sent,a=t.data,200==a.code&&a.data?this.$dialog.confirm({title:"提示",message:"您当前有待支付订单",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"去支付"}).then((function(){r.$router.push({path:"/signUpPayment",query:{orderNo:a.data.orderNo,examRegistrationId:a.data.examRegistrationId}})})).catch((function(){var e=a.data.orderNo;r.$dialog.close(),e&&(localStorage.removeItem("examRegistrationParams"),r.onCloseOrder(e))})):localStorage.removeItem("examRegistrationParams");case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onCloseOrder:function(){var e=p(o.a.mark((function e(t){return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(l["a"])(!0),e.next=3,Object(d["a"])({orderNo:t});case 3:Object(l["a"])(!1);case 4:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),getRegisterInfo:function(){var e=p(o.a.mark((function e(t){var a,r,n=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:a=this.form,r=this.formText,a.subjectId=t.subjectId,r.subjectName=t.subjectName,a.levelFee=t.levelFee,a.theoryLevelFee=t.theoryLevelFee,this.getExamSubjectLevel((function(e){e.forEach((function(e){e.level==t.level&&(a.levelId=e.value,a.examSubjectSongId=e.id,r.levelName=f[t.level],n.practiceNum=e.practiceNum,n.practiceSongIdList=e.practiceSongIdList,n.performNum=e.performNum,n.performSongIdList=e.performSongIdList)})),n.getExamSubjectSong();var i=t.songJson?JSON.parse(t.songJson):[],o=[],s=[],c=[],l=[];i.forEach((function(e){var t=e.songName+(e.songAuthor?"-"+e.songAuthor:"");"PERFORM"==e.type?(c.push(e),l.push(t),n.performNumSelectIds.push(e.id)):"PRACTICE"==e.type&&(o.push(e),s.push(t),n.practiceSelectIds.push(e.id))})),n.practiceSelect=s,n.practiceSongIdList?n.practiceSelectList=o:(o.forEach((function(e){e.name=e.songName,e.author=e.songAuthor;var t=e.uploadUrl?e.uploadUrl.split(","):[],a=[];t.forEach((function(e){a.push({url:e})})),n.practiceUpload.push(a),n.practiceUploadTemp.push(a)})),n.practiceSelectUploadList=o),n.performNumSelect=l,n.performSongIdList?n.performNumSelectList=c:(c.forEach((function(e){e.name=e.songName,e.author=e.songAuthor;var t=e.uploadUrl?e.uploadUrl.split(","):[],a=[];t.forEach((function(e){a.push({url:e})})),n.performNumUpload.push(a),n.performNumUploadTemp.push(a)})),n.performNumSelectUploadList=c)})),t.lastExamCertificateUrl&&(a.lastExamCertificateUrl=t.lastExamCertificateUrl,this.uploadCertificate=[{url:t.lastExamCertificateUrl}]),this.getTheoryLevelList((function(e){e.forEach((function(e){t.examMusicTheoryId||t.examMusicTheoryLevel?e.level==t.examMusicTheoryLevel&&(a.examMusicTheoryId=e.id,a.examMusicTheoryLevel=e.level,r.examMusicTheoryName=e.text):(a.examMusicTheoryId=999,a.examMusicTheoryLevel=999,r.examMusicTheoryName="免考")}))})),t.lastMusicTheoryCertificateUrl&&(a.lastMusicTheoryCertificateUrl=t.lastMusicTheoryCertificateUrl,this.uploadCertificate2=[{url:t.lastMusicTheoryCertificateUrl}]),a.adviserName=t.adviserName,a.adviserPhone=t.adviserPhone;case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),__init:function(){var e=p(o.a.mark((function e(){var t,a,r;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(l["a"])(!0),e.prev=1,e.next=4,Object(d["i"])({examId:this.examId});case 4:t=e.sent,a=t.data,200==a.code&&a.data.length>0&&(r=[],a.data.forEach((function(e){e.value=e.id,e.text=e.name,r.push(e)})),this.examSubjectList=r),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:Object(l["a"])(!1);case 12:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),getTheoryLevelList:function(){var e=p(o.a.mark((function e(t){var a,r,n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(l["a"])(!0),e.prev=1,e.next=4,Object(d["k"])({examId:this.examId});case 4:a=e.sent,r=a.data,200==r.code&&r.data.length>0&&(n=[{id:999,value:999,text:"免考",level:999,fee:0}],r.data.forEach((function(e){e.value=e.id,e.text=f[e.level],n.push(e)})),this.examMusicTheoryList=n,t&&t(n)),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:Object(l["a"])(!1);case 12:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(t){return e.apply(this,arguments)}return t}(),onGetSheetList:function(e){var t=this.sheetForm,a=this.form;if(t.columns=[],t.currentType=e,t.index=0,"examSubject"===e){if(!(this.examSubjectList.length>0))return void this.$toast("暂无报考专业");t.sheetStatus=!0,t.columns=this.examSubjectList,t.index=this.examSubjectIndex}else if("level"===e){if(!a.subjectId)return void this.$toast("请选择报考专业");if(!(this.levelList.length>0))return void this.$toast("暂无报专业级别");t.sheetStatus=!0,t.columns=this.levelList,t.index=this.levelIndex}else if("examMusicTheory"==e){if(!(this.examMusicTheoryList.length>0))return void this.$toast("暂无乐理级别");t.sheetStatus=!0,t.columns=this.examMusicTheoryList,t.index=this.examMusicTheoryIndex}},onSheetConfirm:function(e,t){var a=this.sheetForm,r=this.form,n=this.formText;if(e)if("examSubject"==a.currentType)r.subjectId!=e.id&&(r.subjectId=e.id,n.subjectName=e.name,this.examSubjectIndex=t,r.levelId=null,n.levelName=null,r.examSubjectSongId=null,r.levelFee=0,this.levelIndex=0,this.practiceNum=0,this.practiceSongIdList=null,this.performNum=0,this.performSongIdList=null,this.onResetSong(),this.getExamSubjectLevel()),a.sheetStatus=!1;else if("level"==a.currentType){if(a.sheetStatus=!1,r.levelId===e.value)return;r.levelId=e.value,r.examSubjectSongId=e.id,r.levelFee=e.registrationFee,n.levelName=e.text,this.levelIndex=t,this.practiceNum=e.practiceNum,this.practiceSongIdList=e.practiceSongIdList,this.performNum=e.performNum,this.performSongIdList=e.performSongIdList,this.onResetSong(),this.getExamSubjectSong()}else"examMusicTheory"==a.currentType&&(r.examMusicTheoryId=e.value,r.theoryLevelFee=e.fee,r.examMusicTheoryLevel=e.level,n.examMusicTheoryName=e.text,this.examMusicTheoryIndex=t,a.sheetStatus=!1);else a.sheetStatus=!1},onResetSong:function(){this.practiceSelect=[],this.practiceUpload=[],this.practiceUploadTemp=[],this.practiceSelectUploadList=[],this.practiceSelectIds=[],this.performNumSelectUploadList=[],this.performNumSelect=[],this.performNumUpload=[],this.performNumUploadTemp=[],this.performNumSelectIds=[]},getExamSubjectLevel:function(){var e=p(o.a.mark((function e(t){var a,r,n,i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(l["a"])(!0),e.prev=1,a=this.form,e.next=5,Object(d["g"])({examSubjectId:a.subjectId,examinationBasicId:this.examId});case 5:r=e.sent,n=r.data,200==n.code&&n.data.length>0&&(i=[],n.data.forEach((function(e){e.value=e.level,e.text=f[e.level],i.push(e)})),this.levelList=i,t&&t(i)),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:Object(l["a"])(!1);case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));function t(t){return e.apply(this,arguments)}return t}(),getExamSubjectSong:function(){var e=p(o.a.mark((function e(t){var a,r,n,i,s;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(l["a"])(!0),e.prev=1,a=this.form,r={examSubjectId:a.subjectId,examinationBasicId:this.examId,level:a.levelId},e.next=6,Object(d["h"])(r);case 6:n=e.sent,i=n.data,200==i.code&&i.data.length>0&&(s=[],i.data.forEach((function(e){e.value=e.id,e.text=e.songName+"-"+e.songAuthor,s.push(e)})),this.songList=s,t&&t(s)),e.next=13;break;case 11:e.prev=11,e.t0=e["catch"](1);case 13:Object(l["a"])(!1);case 14:case"end":return e.stop()}}),e,this,[[1,11]])})));function t(t){return e.apply(this,arguments)}return t}(),onChangePractice:function(e,t){var a=this.songList,r=this.sheetSong;r.columns=[],r.index=0;var n=[],i=[];a.forEach((function(e){"PERFORM"==e.type?i.push(e):"PRACTICE"==e.type&&n.push(e)})),"practice"==e?r.columns=n:"performNum"==e&&(r.columns=i),this.songSelectIndex=t,r.status=!0},onPracticeConfirm:function(e){if(e){var t=this.songSelectIndex;"PRACTICE"==e.type?(this.practiceSelect[t]=e.text,this.practiceSelectIds[t]=e.value,this.practiceSelectList[t]=e):"PERFORM"==e.type&&(this.performNumSelect[t]=e.text,this.performNumSelectIds[t]=e.value,this.performNumSelectList[t]=e),this.sheetSong.status=!1}},beforeRead:function(e){var t=e.size/1024/1024<5;return!!t||(this.$toast("上传图片大小不能超过 5MB"),!1)},beforeDelete:function(e,t){var a=t.name.split("-"),r=this.form;return"certificate2"==a[0]?r.lastMusicTheoryCertificateUrl="":"certificate"==a[0]&&(r.lastExamCertificateUrl=""),!0},afterRead:function(){var e=p(o.a.mark((function e(t,a){var r,n,i,s,c;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=a.name.split("-"),e.prev=1,t.status="uploading",t.message="上传中...",n=new FormData,n.append("file",t.file),e.next=8,Object(d["r"])(n);case 8:if(i=e.sent,s=i.data,200!=s.code){e.next=16;break}t.status="done",c=this.form,"certificate2"==r[0]?c.lastMusicTheoryCertificateUrl=s.data.url:"certificate"==r[0]?c.lastExamCertificateUrl=s.data.url:("practiceNum"==r[0]||"performNum"==r[0])&&(t.url=s.data.url),e.next=20;break;case 16:return t.status="failed",t.message="上传失败",this.$toast(s.msg),e.abrupt("return",!1);case 20:e.next=25;break;case 22:return e.prev=22,e.t0=e["catch"](1),e.abrupt("return",!1);case 25:case"end":return e.stop()}}),e,this,[[1,22]])})));function t(t,a){return e.apply(this,arguments)}return t}(),onUploadSong:function(e,t){var a=this.songUpload;a.songStatus=!0,a.indexName=e,a.index=t;var r=this.practiceSelectUploadList[t],n=this.performNumSelectUploadList[t];"practiceNum"==e?(a.name=r?r.name:null,a.author=r?r.author:null):"performNum"==e&&(a.name=n?n.name:null,a.author=n?n.author:null)},onSaveCancel:function(){this.songUpload.songStatus=!1,this.performNumUpload=JSON.parse(JSON.stringify(this.performNumUploadTemp)),this.practiceUpload=JSON.parse(JSON.stringify(this.practiceUploadTemp))},onSaveUpload:function(){var e=this.songUpload;if(e.name){var t=e.name+(e.author?"-"+e.author:"");if("practiceNum"==e.indexName){var a=this.practiceUpload[e.index],r=a?a.length:0;if(!(a&&r>0&&a[0].url))return void this.$toast("请上传文件");if(!a[r-1].url)return void this.$toast("上传曲谱中,请稍等");this.practiceSelect[e.index]=t,this.practiceSelectUploadList[e.index]=JSON.parse(JSON.stringify(e)),this.practiceUploadTemp=JSON.parse(JSON.stringify(this.practiceUpload))}else if("performNum"==e.indexName){var n=this.performNumUpload[e.index],i=n?n.length:0;if(!(n&&i>0))return void this.$toast("请上传文件");if(!n[i-1].url)return void this.$toast("上传曲谱中,请稍等");this.performNumSelect[e.index]=t,this.performNumSelectUploadList[e.index]=JSON.parse(JSON.stringify(e)),this.performNumUploadTemp=JSON.parse(JSON.stringify(this.performNumUpload))}e.name=null,e.author=null,e.songStatus=!1}else this.$toast("请输入曲名")},onSubmit:function(){var e=p(o.a.mark((function e(){var t,a,r,n,i,s;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(Object(l["a"])(!0),e.prev=1,this.onCheckFields()){e.next=4;break}return e.abrupt("return");case 4:t=[],this.practiceSongIdList?this.practiceSelectList.forEach((function(e){t.push({id:e.id,type:e.type,songName:e.songName,songAuthor:e.songAuthor,uploadUrl:e.fileUrlList})})):(a=this.practiceUpload,this.practiceSelectUploadList.forEach((function(e){var r=[];a[e.index].forEach((function(e){r.push(e.url)})),t.push({songName:e.name,songAuthor:e.author,index:e.index,type:"PRACTICE",uploadUrl:r.join(",")})}))),this.performSongIdList?this.performNumSelectList.forEach((function(e){t.push({id:e.id,type:e.type,songName:e.songName,songAuthor:e.songAuthor,uploadUrl:e.fileUrlList})})):(r=this.performNumUpload,this.performNumSelectUploadList.forEach((function(e){var a=[];r[e.index].forEach((function(e){a.push(e.url)})),t.push({songName:e.name,songAuthor:e.author,index:e.index,type:"PERFORM",uploadUrl:a.join(",")})}))),n=this.form,i=this.formText,s={examStartTime:localStorage.getItem("examStartTime"),adviserName:n.adviserName,adviserPhone:n.adviserPhone,examMusicTheoryId:999==n.examMusicTheoryId?null:n.examMusicTheoryId,examMusicTheoryLevel:999==n.examMusicTheoryLevel?null:n.examMusicTheoryLevel,examinationBasicId:this.examId,lastExamCertificateUrl:n.lastExamCertificateUrl,lastMusicTheoryCertificateUrl:n.lastMusicTheoryCertificateUrl,level:n.levelId,examSubjectSongId:n.examSubjectSongId,subjectId:n.subjectId,subjectName:i.subjectName,songJson:JSON.stringify(t),organId:this.organId,levelFee:n.levelFee,theoryLevelFee:n.theoryLevelFee},Object(l["a"])(!1),localStorage.setItem("examRegistrationParams",JSON.stringify(s)),this.$router.push({path:"/signUpPayment"}),e.next=16;break;case 14:e.prev=14,e.t0=e["catch"](1);case 16:case"end":return e.stop()}}),e,this,[[1,14]])})));function t(){return e.apply(this,arguments)}return t}(),onCheckFields:function(){var e=this.form;if(!e.subjectId)return this.$toast("请选择报考专业"),!1;if(!e.levelId)return this.$toast("请选择专业级别"),!1;if(this.practiceSongIdList){if(this.practiceSelectIds.length!=this.practiceNum)return this.$toast("请选择练习曲"),!1;var t=new Set(this.practiceSelectIds);if(this.practiceSelectIds.length!=t.size)return this.$toast("不能选择重复的练习曲"),!1}else if(this.practiceUpload.length!=this.practiceNum)return this.$toast("请上传练习曲"),!1;if(this.performSongIdList){if(this.performNumSelectIds.length!=this.performNum)return this.$toast("请选择演奏曲"),!1;var a=new Set(this.performNumSelectIds);if(this.performNumSelectIds.length!=a.size)return this.$toast("不能选择重复的演奏曲"),!1}else if(this.performNumUpload.length!=this.performNum)return this.$toast("请上传演奏曲"),!1;return e.examMusicTheoryId?!(e.adviserPhone&&!this.checkPhone(e.adviserPhone)):(this.$toast("请选择乐理级别"),!1)},checkPhone:function(e){var t=!0;return this.patternPhone.test(e)||(this.$toast("联系方式输入有误"),t=!1),t},onBack:function(){window.history.go(-1)},numberToCN:function(e){var t={0:"一",1:"二",2:"三",3:"四",4:"五"};return t[e]}},destroyed:function(){this.$toast.clear(),this.$dialog.close()}},v=h,x=(a("b19d"),a("2877")),g=Object(x["a"])(v,r,n,!1,null,"1474e920",null);t["default"]=g.exports},ab6b:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mStep"},[a("div",{staticClass:"step"},e._l(e.imgUrlList,(function(t,r){return a("div",{key:r,staticClass:"step-item"},[e.number>=t.index?a("svg-icon",{key:"oneImg",attrs:{iconClass:t.active}}):a("svg-icon",{key:"oneImg",attrs:{iconClass:t.default}}),a("p",{class:[e.number>=t.index?t.activeClass:""]},[e._v(e._s(t.text))])],1)})),0)])},n=[],i=a("0032"),o={name:"mStep",components:{SvgIcon:i["a"]},props:{number:{type:Number,default:1}},data:function(){return{imgUrlList:[{index:1,default:"",active:"icon_account_active",activeClass:"active",text:"账号"},{index:1.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:2,default:"icon_baseInfo",active:"icon_baseInfo_active",activeClass:"active",text:"基本信息"},{index:2.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:3,default:"icon_level",active:"icon_level_active",activeClass:"active",text:"考级信息"},{index:3.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:4,default:"icon_payment",active:"icon_payment_active",activeClass:"active",text:"支付"}]}},methods:{}},s=o,c=(a("a298"),a("2877")),l=Object(c["a"])(s,r,n,!1,null,"7eaaf7a9",null);t["a"]=l.exports},abef:function(e,t,a){},b19d:function(e,t,a){"use strict";var r=a("abef"),n=a.n(r);n.a},b48b:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));var r=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,n=/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;function i(e){var t=!0;return n.test(e)||(t=!1),t}},f0da:function(e,t,a){}}]);