chunk-96ad0c8a.63690bb0.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-96ad0c8a"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),Math.easeInOutQuad=function(t,e,n,r){return t/=r/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function a(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(t,e,n){var o=i(),s=t-o,u=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=u;var i=Math.easeInOutQuad(c,o,s,e);a(i),c<e?r(t):n&&"function"===typeof n&&n()};l()}},"341b":function(t,e,n){"use strict";n("e70a")},"45fd":function(t,e,n){"use strict";n("4ef2")},4965:function(t,e,n){},"4ef2":function(t,e,n){},aa6d:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[t._m(0),t._v(" "),n("div",{staticClass:"m-core"},[n("save-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchForm},on:{submit:t.search,reset:t.onReSet}},[n("el-form-item",{attrs:{prop:"search"}},[n("el-input",{attrs:{clearable:"",placeholder:"请输入编号/名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:function(e){e.target.blur(),t.$refs.searchForm.save(),t.search()}(e)}},model:{value:t.searchForm.search,callback:function(e){t.$set(t.searchForm,"search","string"===typeof e?e.trim():e)},expression:"searchForm.search"}})],1),t._v(" "),n("el-form-item",{attrs:{prop:"parentSubjectId"}},[n("el-select",{attrs:{placeholder:"选择声部分类",prop:"parentSubjectId",clearable:"",filterable:""},model:{value:t.searchForm.parentSubjectId,callback:function(e){t.$set(t.searchForm,"parentSubjectId",e)},expression:"searchForm.parentSubjectId"}},t._l(t.fatherList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{"native-type":"submit",type:"primary"}},[t._v("搜索")]),t._v(" "),n("el-button",{attrs:{"native-type":"reset",type:"danger"}},[t._v("重置")])],1)],1),t._v(" "),n("auth",{staticStyle:{"margin-bottom":"20px"},attrs:{auths:"subject/upset/insert"}},[n("el-button",{attrs:{type:"primary"},on:{click:t.createSubject}},[t._v("添加")])],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableList,"row-key":"id"}},[n("el-table-column",{attrs:{label:"编号",prop:"id"}}),t._v(" "),n("el-table-column",{attrs:{label:"声部名称",prop:"name"}}),t._v(" "),n("el-table-column",{attrs:{label:"乐器名称",prop:"instrumentName"}}),t._v(" "),n("el-table-column",{attrs:{label:"乐器分类",prop:"parentSubjectName"}}),t._v(" "),n("el-table-column",{attrs:{label:"更新时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.updateTime))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":"",width:"200px"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("auth",{attrs:{auths:"subject/upset/reset"}},[n("el-button",{attrs:{size:"small",type:"text"},on:{click:function(n){return t.updateSubject(e.row)}}},[t._v("修改")])],1),t._v(" "),n("auth",{attrs:{auths:"subject/upset/del"}},[n("el-button",{attrs:{size:"small",type:"text"},on:{click:function(n){return t.removeSubjectCategory(e.row)}}},[t._v("删除")])],1),t._v(" "),n("auth",{attrs:{auths:"subject/upset/reset"}},[n("el-button",{attrs:{size:"small",type:"text"},on:{click:function(n){return t.updateInstrument(e.row)}}},[t._v("修改乐器")])],1)]}}])})],1),t._v(" "),n("pagination",{attrs:{total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:total":function(e){return t.$set(t.rules,"total",e)},"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}})],1)],1),t._v(" "),n("el-dialog",{attrs:{title:"修改乐器",visible:t.instrumentVisible,width:"770px"},on:{"update:visible":function(e){t.instrumentVisible=e}}},[t.instrumentVisible?n("AddSubject",{attrs:{detail:t.activeRow,subjectType:t.instrumentTitle,fatherList:t.fatherList},on:{close:function(e){t.instrumentVisible=!1},getList:t.getList}}):t._e()],1),t._v(" "),n("el-dialog",{attrs:{title:"add"===t.subjectTitle?"添加声部":"修改声部",visible:t.subjectVisible,width:"560px"},on:{"update:visible":function(e){t.subjectVisible=e}}},[t.subjectVisible?n("CreateSubject",{attrs:{detail:t.activeRow,subjectType:t.subjectTitle,fatherList:t.fatherList},on:{close:function(e){t.subjectVisible=!1},getList:t.getList}}):t._e()],1)],1)},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("\n 声部设置\n ")])}],i=n("c7eb"),o=(n("96cf"),n("1da1")),s=(n("7f7f"),n("386d"),n("5530")),u=n("333d"),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-form",{ref:"formRef",attrs:{model:t.forms,size:"default","label-width":"80px"}},[t._v("`\n "),n("div",{staticStyle:{"max-height":"400px","min-height":"300px","overflow-x":"hidden","overflow-y":"auto"}},[n("el-radio-group",{model:{value:t.forms.instrumentIds,callback:function(e){t.$set(t.forms,"instrumentIds",e)},expression:"forms.instrumentIds"}},t._l(t.cbsSubjectList,(function(e,r){return n("el-form-item",{key:r,attrs:{label:e.name}},[e.instruments&&e.instruments.length?t._l(e.instruments,(function(e,r){return n("el-radio",{key:r,attrs:{label:e.id,disabled:e.added&&e.id!==t.defaultId}},[t._v(t._s(e.name))])})):t._e()],2)})),1)],1)]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v("取 消")]),t._v(" "),n("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("确 认")])],1)],1)},l=[],d=(n("6762"),n("2fdb"),n("2909")),m=n("b85c"),f=(n("c5f6"),n("829b")),p="/api-web";function b(t){return Object(f["a"])({url:p+"/subject/cbsSubject/page",method:"post",data:t})}var h=n("d349"),g={name:"add-subject",props:["fatherList","subjectType","detail"],data:function(){return{defaultId:null,cbsSubjectOption:[],cbsSubjectList:[],forms:{cbsSubjectId:null,instrumentIds:null}}},mounted:function(){this.detail.id&&(this.forms.id=this.detail.id,this.forms.instrumentIds=this.detail.instrumentIds?Number(this.detail.instrumentIds):null,this.defaultId=this.detail.instrumentIds?Number(this.detail.instrumentIds):null,this.getCbsSubject(this.detail.id))},methods:{formatParentId:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=Object(m["a"])(e);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i.instruments){var o=this.formatParentId(t,i.instruments,[].concat(Object(d["a"])(r),[i.id]));if(o.includes(t))return o}if(i.id===t)return[].concat(Object(d["a"])(r),[t])}}catch(s){a.e(s)}finally{a.f()}return r},getCbsSubject:function(){var t=Object(o["a"])(Object(i["a"])().mark((function t(e){var n,r;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,b({page:1,rows:999,subjectId:e});case 3:n=t.sent,r=n.data,this.cbsSubjectList=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log(t.t0,"data");case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(e){return t.apply(this,arguments)}return e}(),onSubmit:function(){var t=Object(o["a"])(Object(i["a"])().mark((function t(){var e,n=this;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.forms.instrumentIds){t.next=3;break}return this.$message.error("请选择乐器"),t.abrupt("return");case 3:e=this.formatParentId(this.forms.instrumentIds,this.cbsSubjectList),this.forms.cbsSubjectId=e[0],Object(h["F"])(Object(s["a"])({tenantId:1},this.forms)).then((function(t){200==t.code&&(n.messageTips("修改",t),n.$emit("getList"),n.$emit("close"))}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),messageTips:function(t,e){200==e.code?this.$message.success(t+"成功"):this.$message.error(e.msg)}}},v=g,j=(n("45fd"),n("2877")),y=Object(j["a"])(v,c,l,!1,null,"72dce35c",null),S=y.exports,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[n("el-form-item",{attrs:{prop:"parentSubjectId",label:"所属分类",rules:[{required:!0,message:"请选择声部分类"}]}},[n("el-select",{staticStyle:{width:"365px!important"},attrs:{placeholder:"请选择所属分类",prop:"parentSubjectId",clearable:"",filterable:""},model:{value:t.form.parentSubjectId,callback:function(e){t.$set(t.form,"parentSubjectId",e)},expression:"form.parentSubjectId"}},t._l(t.fatherList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),n("el-form-item",{attrs:{prop:"name",label:"声部名称",rules:{required:!0,message:"请输入声部名称",trigger:"change,blur"}}},[n("el-input",{staticStyle:{width:"365px!important"},attrs:{placeholder:"请输入声部名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"声部图片",prop:"img",rules:[{required:!0,message:"请上传声部图片"}]}},[n("image-cropper",{attrs:{options:t.cropperOptions,imgSize:2,imageUrl:t.form.img},on:{"crop-upload-success":t.cropSuccess}}),t._v(" "),n("p",{staticStyle:{color:"red"}},[t._v("\n 仅支持图片格式:JPG、PNG、GIF, 大小2M以内;\n ")])],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v("取 消")]),t._v(" "),n("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("确 认")])],1)],1)},w=[],_=n("896b"),T={name:"add-subject",components:{ImageCropper:_["a"]},props:["fatherList","subjectType","detail"],data:function(){return{cbsSubjectList:[],form:{name:null,id:null,img:null,parentSubjectId:null},cropperOptions:{autoCrop:!0,autoCropWidth:260,autoCropHeight:260,fixedBox:!0,previewsCircle:!1,title:"声部图片"}}},mounted:function(){this.detail.id&&(this.form.name=this.detail.name,this.form.id=this.detail.id,this.form.parentSubjectId=this.detail.parentSubjectId,this.form.img=this.detail.img)},methods:{cropSuccess:function(t){this.form.img=t.data.url},onSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(h["F"])(Object(s["a"])({tenantId:1},t.form)).then((function(e){200==e.code&&(t.messageTips("修改",e),t.$emit("getList"),t.$emit("close"))}))}))},messageTips:function(t,e){200==e.code?this.$message.success(t+"成功"):this.$message.error(e.msg)}}},k=T,I=(n("341b"),Object(j["a"])(k,O,w,!1,null,"fc924a20",null)),C=I.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-form",{ref:"formRef",attrs:{model:t.forms,size:"default","label-width":"80px"}},[n("el-form-item",{attrs:{label:"展示方式",prop:"orientation",rules:[{required:!0,message:"请选择展示方式",trigger:"blur"}]}},[n("el-radio-group",{model:{value:t.forms.orientation,callback:function(e){t.$set(t.forms,"orientation",e)},expression:"forms.orientation"}},[n("el-radio",{attrs:{label:1}},[t._v("竖屏展示")]),t._v(" "),n("el-radio",{attrs:{label:0}},[t._v("横屏展示")])],1)],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v("取 消")]),t._v(" "),n("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("确 认")])],1)],1)},$=[],L={name:"update-instrument",props:["activeRow"],data:function(){return{forms:{orientation:null}}},mounted:function(){this.activeRow.id&&(this.forms.orientation=this.activeRow.orientation)},methods:{onSubmit:function(){var t=this;this.$refs.formRef.validate((function(e){e&&t.$emit("close")}))}}},z=L,F=(n("cb5d"),Object(j["a"])(z,x,$,!1,null,"0ae7d707",null)),q=F.exports,R={components:{pagination:u["a"],AddSubject:S,UpdateInstrument:q,CreateSubject:C},data:function(){return{searchForm:{search:null,parentSubjectId:null},form:{name:null,id:null,img:null,parentSubjectId:null},tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},subjectTitle:"add",subjectVisible:!1,fatherList:[],instrumentVisible:!1,instrumentTitle:"add",updateInstrumentVisiable:!1,activeRow:{}}},mounted:function(){this.init()},methods:{init:function(){this.getList(),this.getFatherList()},getFatherList:function(){var t=this;Object(h["E"])({delFlag:"NO",rows:9999,page:1}).then((function(e){200==e.code&&(t.fatherList=e.data.rows)}))},getList:function(){var t=this;Object(h["D"])(Object(s["a"])(Object(s["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit})).then((function(e){t.tableList=e.data.rows,t.rules.total=e.data.total}))},search:function(){this.rules.page=1,this.getList()},onReSet:function(){var t=this;this.$nextTick((function(){t.search()}))},onChangeInstrument:function(t){var e=t.enableFlag?"停用":"启用";this.$confirm("是否".concat(e).concat(t.name,"?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(i["a"])().mark((function t(){return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))))},createSubject:function(){this.subjectVisible=!0,this.subjectTitle="add",this.activeRow={}},updateSubject:function(t){this.subjectTitle="update",this.activeRow=t,this.subjectVisible=!0},updateInstrument:function(t){this.instrumentTitle="update",this.activeRow=t,this.instrumentVisible=!0},removeSubjectCategory:function(t){var e=this;this.$confirm("是否确认删除声部","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(h["F"])({delFlag:"YES",id:t.id}).then((function(t){e.messageTips("删除",t),e.search()}))}))},messageTips:function(t,e){200==e.code?this.$message.success(t+"成功"):this.$message.error(e.msg)}}},P=R,E=Object(j["a"])(P,r,a,!1,null,"7a76705c",null);e["default"]=E.exports},cb5d:function(t,e,n){"use strict";n("4965")},d349:function(t,e,n){"use strict";n.d(e,"e",(function(){return l})),n.d(e,"d",(function(){return d})),n.d(e,"f",(function(){return m})),n.d(e,"c",(function(){return f})),n.d(e,"o",(function(){return p})),n.d(e,"D",(function(){return b})),n.d(e,"E",(function(){return h})),n.d(e,"F",(function(){return g})),n.d(e,"i",(function(){return v})),n.d(e,"g",(function(){return j})),n.d(e,"j",(function(){return y})),n.d(e,"r",(function(){return S})),n.d(e,"p",(function(){return O})),n.d(e,"q",(function(){return w})),n.d(e,"h",(function(){return _})),n.d(e,"s",(function(){return T})),n.d(e,"G",(function(){return k})),n.d(e,"k",(function(){return I})),n.d(e,"t",(function(){return C})),n.d(e,"w",(function(){return x})),n.d(e,"u",(function(){return $})),n.d(e,"v",(function(){return L})),n.d(e,"n",(function(){return z})),n.d(e,"b",(function(){return F})),n.d(e,"C",(function(){return q})),n.d(e,"m",(function(){return R})),n.d(e,"B",(function(){return P})),n.d(e,"a",(function(){return E})),n.d(e,"l",(function(){return V})),n.d(e,"y",(function(){return N})),n.d(e,"x",(function(){return G})),n.d(e,"z",(function(){return A})),n.d(e,"A",(function(){return B}));var r=n("15fd"),a=n("b775"),i=n("829b"),o=n("4328"),s=n.n(o),u=["id"],c="/api-web";function l(t){return Object(a["a"])({url:c+"/organization/queryPage",method:"get",params:t})}function d(t){return Object(a["a"])({url:c+"/organization/add",method:"post",data:s.a.stringify(t)})}function m(t){return Object(a["a"])({url:c+"/organization/update",method:"post",data:s.a.stringify(t)})}function f(t){return Object(i["a"])({url:c+"/area/queryChild",method:"get",hideLoading:!0,params:t})}function p(t){return Object(a["a"])({url:c+"/area/getParentArea/".concat(t.id),method:"get"})}function b(t){return Object(a["a"])({url:c+"/subject/queryPageByIdOrName",method:"post",data:s.a.stringify(t)})}function h(t){return Object(a["a"])({url:c+"/subject/queryPageTree",method:"get",params:t})}function g(t){return Object(a["a"])({url:c+"/subject/upset",method:"post",data:t})}function v(t){return Object(a["a"])({url:c+"/chargeType/upSet",method:"post",data:t})}function j(t){return Object(a["a"])({url:c+"/chargeType/del/".concat(t),method:"post"})}function y(t){return Object(a["a"])({url:c+"/courseHomeworkTemplate/queryPage",method:"post",data:t})}function S(t){return Object(a["a"])({url:c+"/courseHomeworkTemplate/update",method:"post",data:s.a.stringify(t)})}function O(t){return Object(a["a"])({url:c+"/courseHomeworkTemplate/add",method:"post",data:s.a.stringify(t)})}function w(t){return Object(a["a"])({url:c+"/courseHomeworkTemplate/del/".concat(t),method:"post"})}function _(t){return Object(i["a"])({url:c+"/chargeTypeSubjectMapper/queryPage",method:"get",data:{},params:t,requestType:"form"})}function T(t){return Object(i["a"])({url:c+"/chargeTypeSubjectMapper/insert",method:"post",data:t})}function k(t){return Object(i["a"])({url:c+"/chargeTypeSubjectMapper/update",method:"post",data:t})}function I(t){var e=t.id,n=Object(r["a"])(t,u);return Object(i["a"])({url:c+"/chargeTypeSubjectMapper/del/"+e,method:"post",params:n})}function C(t){return Object(i["a"])({url:c+"/musicGroupOrganizationCourseSettings/add",method:"post",data:t})}function x(t){return Object(i["a"])({url:c+"/musicGroupOrganizationCourseSettings/update",method:"post",data:t})}function $(t){return Object(i["a"])({url:c+"/musicGroupOrganizationCourseSettings/delSetting",method:"post",data:{},params:t,requestType:"form"})}function L(t){return Object(i["a"])({url:c+"/musicGroupOrganizationCourseSettings/queryPage",method:"get",data:{},params:t,requestType:"form"})}function z(t){return Object(i["a"])({url:c+"/organizationCourseUnitPriceSettings/queryPage",method:"get",params:t,data:{},requestType:"form"})}function F(t){return Object(i["a"])({url:c+"/organizationCourseUnitPriceSettings/save",method:"post",data:t})}function q(t){return Object(i["a"])({url:c+"/organizationCourseUnitPriceSettings/update",method:"post",data:t})}function R(t){return Object(i["a"])({url:c+"/organizationCourseDurationSettings/queryPage",method:"get",data:{},params:t})}function P(t){return Object(i["a"])({url:c+"/organizationCourseDurationSettings/update",method:"post",params:t})}function E(t){return Object(i["a"])({url:c+"/organizationCourseDurationSettings/insert",method:"post",params:t})}function V(t){return Object(i["a"])({url:c+"/organizationCourseDurationSettings/del",method:"post",data:t})}function N(t){return Object(i["a"])({url:c+"/organizationCloudTeacherFee/queryPage",method:"get",params:t})}function G(t){return Object(i["a"])({url:c+"/organizationCloudTeacherFee/add",method:"post",requestType:"form",data:t})}function A(t){return Object(i["a"])({url:c+"/organizationCloudTeacherFee/update",method:"post",requestType:"form",data:t})}function B(t,e){return Object(i["a"])({url:c+"/organizationCourseUnitPriceSettings/querySingle/".concat(t,"/").concat(e),method:"get"})}},e70a:function(t,e,n){}}]);