chunk-4de02174.9fe21567.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4de02174"],{"06df":function(e,t,i){},2970:function(e,t,i){},"2af9":function(e,t,i){"use strict";i.r(t);var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"m-container"},[e._m(0),e._v(" "),i("div",{staticClass:"m-core"},[i("tab-router",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeIndex,callback:function(t){e.activeIndex="string"===typeof t?t.trim():t},expression:"activeIndex"}},[e.permissionList.vipCourseType?i("el-tab-pane",{attrs:{lazy:"",label:"课程形式",name:"1"}},["1"==e.activeIndex?i("vipCourseType"):e._e()],1):e._e(),e._v(" "),e.permissionList.vipCourseType?i("el-tab-pane",{attrs:{lazy:"",label:"周期循环",name:"2"}},["2"==e.activeIndex?i("vipCourseTimeSet"):e._e()],1):e._e()],1)],1)])},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("h2",[i("div",{staticClass:"squrt"}),e._v("\n VIP课程参数\n ")])}],n=(i("7f7f"),i("49d7")),a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupDefaultClassesCycle/add",expression:"'vipGroupDefaultClassesCycle/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addVipTimer}},[e._v("新建")]),e._v(" "),i("el-table",{attrs:{data:e.rightList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[i("el-table-column",{attrs:{label:"达到课时总数(次)",prop:"maxClassTimes"}}),e._v(" "),i("el-table-column",{attrs:{label:"可排课时间段(月)",prop:"month"}}),e._v(" "),i("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupDefaultClassesCycle/update",expression:"'vipGroupDefaultClassesCycle/update'"}],attrs:{type:"text"},on:{click:function(i){return e.resetTimerList(t.row)}}},[e._v("修改")]),e._v(" "),i("el-popover",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupDefaultClassesCycle/delete",expression:"'vipGroupDefaultClassesCycle/delete'"}],ref:t.row.id,attrs:{placement:"top",width:"160"}},[i("p",[e._v("您确定删除该周期循环吗?")]),e._v(" "),i("div",{staticStyle:{"text-align":"right",margin:"0"}},[i("el-button",{attrs:{type:"text"},on:{click:function(e){t._self.$refs[t.row.id].doClose()}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(i){return e.removeDefaultClassesCycle(t)}}},[e._v("确定")])],1),e._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),i("el-dialog",{attrs:{title:(e.vipTimerFrom.isAdd?"添加":"修改")+"VIP时间段",width:"500px",visible:e.timerStatus},on:{close:function(t){return e.onVipStatusClose("timerStatus")},"update:visible":function(t){e.timerStatus=t}}},[i("el-form",{ref:"timerStatus",attrs:{model:e.vipTimerFrom}},[i("el-form-item",{attrs:{label:"达到课时总数",prop:"count",rules:[{required:!0,message:"请输入达到课时总数",trigger:"blur"}],"label-width":e.formLabelWidth}},[i("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.vipTimerFrom.count,callback:function(t){e.$set(e.vipTimerFrom,"count","string"===typeof t?t.trim():t)},expression:"vipTimerFrom.count"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"可排课时间段",prop:"timer",rules:[{required:!0,message:"请输入可排课时间段",trigger:"blur"}],"label-width":e.formLabelWidth}},[i("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.vipTimerFrom.timer,callback:function(t){e.$set(e.vipTimerFrom,"timer","string"===typeof t?t.trim():t)},expression:"vipTimerFrom.timer"}})],1)],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.timerStatus=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addTimerStatus("timerStatus")}}},[e._v("确 定")])],1)],1)],1)},o=[],u=(i("96cf"),i("1da1")),l=i("7e78"),c={data:function(){return{formLabelWidth:"120px",rightList:[],timerStatus:!1,vipTimerFrom:{count:"",timer:"",isAdd:!0,id:""},dynamicTags:[],inputValue:""}},mounted:function(){this.getDefaultClassesCycle()},methods:{getDefaultClassesCycle:function(){var e=Object(u["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["w"])().then((function(e){t.rightList=e.data}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),addVipTimer:function(){this.timerStatus=!0,this.vipTimerFrom.isAdd=!0},addTimerStatus:function(e){var t=this;this.$refs[e].validate(function(){var e=Object(u["a"])(regeneratorRuntime.mark((function e(i){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!i){e.next=9;break}if(r=t.vipTimerFrom,!r.isAdd){e.next=7;break}return e.next=5,Object(l["c"])({organId:null,maxClassTimes:r.count,month:r.timer}).then((function(e){200==e.code&&(t.$message.success("添加成功"),t.getDefaultClassesCycle(),t.timerStatus=!1)}));case 5:e.next=9;break;case 7:return e.next=9,Object(l["R"])({maxClassTimes:r.count,month:r.timer,id:r.id}).then((function(e){t.$message.success("修改成功"),t.getDefaultClassesCycle(),t.timerStatus=!1}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},resetTimerList:function(e){this.timerStatus=!0;var t=this.vipTimerFrom;this.$nextTick((function(){t.count=e.maxClassTimes,t.timer=e.month,t.id=e.id,t.isAdd=!1}))},removeDefaultClassesCycle:function(e){var t=this;Object(l["O"])({id:e.row.id}).then((function(i){200==i.code&&(e._self.$refs[e.row.id].doClose(),t.$message.success("删除成功"),t.getDefaultClassesCycle())}))},onVipStatusClose:function(e){this.inputVisible=!1,this.inputValue="",this.$refs[e].resetFields()}}},p=c,m=i("2877"),d=Object(m["a"])(p,a,o,!1,null,"4cd939a8",null),v=d.exports,f=i("ec8a"),b={name:"vipParameterManager",components:{vipCourseType:n["a"],vipCourseTimeSet:v},data:function(){return{activeIndex:"1",permissionList:{vipCourseType:Object(f["a"])("/vipCourseType"),vipCourseTimeSet:Object(f["a"])("/vipCourseTimeSet")}}},mounted:function(){},methods:{handleClick:function(e){this.activeIndex=e.name}}},h=b,g=(i("c38e"),i("f493"),Object(m["a"])(h,r,s,!1,null,"47c56bb0",null));t["default"]=g.exports},"49d7":function(e,t,i){"use strict";var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/add",expression:"'vipGroupCategory/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.addGroupCategory}},[e._v("新建")]),e._v(" "),i("el-table",{attrs:{data:e.leftList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[i("el-table-column",{attrs:{label:"课程形式",prop:"name"}}),e._v(" "),i("el-table-column",{attrs:{label:"课程类型",prop:"singleClassMinutes"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",[e._v("\n "+e._s(t.row.musicTheory?"乐理课":"VIP课")+"\n ")])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"班级人数(人)",prop:"studentNum"}}),e._v(" "),i("el-table-column",{attrs:{label:"课程课时(分钟)",prop:"singleClassMinutes"}}),e._v(" "),i("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/update",expression:"'vipGroupCategory/update'"}],attrs:{type:"text"},on:{click:function(i){return e.resetGroupCategory(t.row)}}},[e._v("修改")]),e._v(" "),i("el-popover",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/delete",expression:"'vipGroupCategory/delete'"}],ref:t.row.id,attrs:{placement:"top",width:"160"}},[i("p",[e._v("您确定删除该课程形态吗?")]),e._v(" "),i("div",{staticStyle:{"text-align":"right",margin:"0"}},[i("el-button",{attrs:{type:"text"},on:{click:function(e){t._self.$refs[t.row.id].doClose()}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(i){return e.removeGroupCategory(t)}}},[e._v("确定")])],1),e._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),i("el-dialog",{staticClass:"courseMask",attrs:{title:(e.vipStatusFrom.isAdd?"添加":"修改")+"VIP课程形式",width:"500px",visible:e.vipStatus},on:{close:function(t){return e.onVipStatusClose("vipStatus")},"update:visible":function(t){e.vipStatus=t}}},[i("el-form",{ref:"vipStatus",attrs:{model:e.vipStatusFrom}},[i("el-form-item",{attrs:{label:"课程形式",prop:"name",rules:[{required:!0,message:"请输入课程形式",trigger:"blur"}],"label-width":e.formLabelWidth}},[i("el-input",{attrs:{autocomplete:"off"},model:{value:e.vipStatusFrom.name,callback:function(t){e.$set(e.vipStatusFrom,"name","string"===typeof t?t.trim():t)},expression:"vipStatusFrom.name"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"课程类型",rules:[{required:!0,message:"请输入课程形式",trigger:"blur"}],"label-width":e.formLabelWidth,prop:"musicTheory"}},[i("el-select",{staticStyle:{width:"100%!important"},model:{value:e.vipStatusFrom.musicTheory,callback:function(t){e.$set(e.vipStatusFrom,"musicTheory",t)},expression:"vipStatusFrom.musicTheory"}},[i("el-option",{attrs:{label:"VIP",value:!1}}),e._v(" "),i("el-option",{attrs:{label:"乐理课",value:!0}})],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"班级人数",prop:"num",rules:[{required:!0,message:"请输入班级人数",trigger:"blur"},{required:!0,message:"班级人数最大6人",trigger:"blur",pattern:/^[0-6]$/}],"label-width":e.formLabelWidth}},[i("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.vipStatusFrom.num,callback:function(t){e.$set(e.vipStatusFrom,"num","string"===typeof t?t.trim():t)},expression:"vipStatusFrom.num"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"课程课时",prop:"dynamicTags",rules:[{required:!0,message:"请输入课程课时",trigger:"blur, change"}],"label-width":e.formLabelWidth}},[e._l(e.vipStatusFrom.dynamicTags,(function(t,r){return i("el-tag",{key:r,attrs:{effect:"dark",type:"info",closable:"","disable-transitions":!1},on:{close:function(i){return e.handleClose(t)}}},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),e.inputVisible?i("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",staticStyle:{width:"100px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleInputConfirm(t)}},model:{value:e.inputValue,callback:function(t){e.inputValue="string"===typeof t?t.trim():t},expression:"inputValue"}}):e._e(),e._v(" "),e.inputVisible?e._e():i("el-button",{staticClass:"button-new-tag",on:{click:e.showInput}},[e._v("+ 添加")]),e._v(" "),e.inputVisible?i("el-button",{staticClass:"button-new-tag",on:{click:e.handleInputConfirm}},[e._v("保存")]):e._e()],2)],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.vipStatus=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addVipStatus("vipStatus")}}},[e._v("确 定")])],1)],1)],1)},s=[],n=(i("96cf"),i("1da1")),a=(i("28a5"),i("7f7f"),i("7e78")),o={data:function(){return{leftList:[],vipStatus:!1,formLabelWidth:"120px",inputValue:"",vipStatusFrom:{name:"",num:"",dynamicTags:[],isAdd:!0,musicTheory:!1,id:""},inputVisible:!1}},mounted:function(){this.getVipGroupCategoryList()},methods:{resetGroupCategory:function(e){var t=this.vipStatusFrom;this.vipStatus=!0,this.$nextTick((function(){t.name=e.name,t.timer=e.singleClassMinutes.split(","),t.dynamicTags=e.singleClassMinutes.split(","),t.num=e.studentNum,t.id=e.id,t.isAdd=!1,t.musicTheory=e.musicTheory}))},removeGroupCategory:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["Q"])({id:t.row.id}).then((function(e){200==e.code&&(t._self.$refs[t.row.id].doClose(),i.$message.success("删除成功"),i.getVipGroupCategoryList())}));case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),addGroupCategory:function(){this.vipStatus=!0,this.vipStatusFrom.isAdd=!0},showInput:function(){var e=this;this.inputVisible=!0,this.$nextTick((function(t){e.$refs.saveTagInput.$refs.input.focus()}))},onVipStatusClose:function(e){this.inputVisible=!1,this.inputValue="",this.$refs[e].resetFields()},getVipGroupCategoryList:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["Z"])().then((function(e){200==e.code&&(t.leftList=e.data)}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),addVipStatus:function(e){var t=this;this.$refs[e].validate(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(i),!i){e.next=10;break}if(r=t.vipStatusFrom,!r.isAdd){e.next=8;break}return e.next=6,Object(a["e"])({name:r.name,singleClassMinutes:r.dynamicTags.join(","),studentNum:r.num,musicTheory:r.musicTheory}).then((function(e){200==e.code&&(t.$message.success("添加成功"),t.getVipGroupCategoryList(),t.vipStatus=!1)}));case 6:e.next=10;break;case 8:return e.next=10,Object(a["U"])({name:r.name,singleClassMinutes:r.dynamicTags.join(","),studentNum:r.num,id:r.id,musicTheory:r.musicTheory}).then((function(e){t.$message.success("修改成功"),t.getVipGroupCategoryList(),t.vipStatus=!1}));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleInputConfirm:function(){var e=this.inputValue;e&&this.vipStatusFrom.dynamicTags.push(e),this.inputVisible=!1,this.inputValue=""},handleClose:function(e){this.vipStatusFrom.dynamicTags.splice(this.vipStatusFrom.dynamicTags.indexOf(e),1)}}},u=o,l=(i("8313"),i("2877")),c=Object(l["a"])(u,r,s,!1,null,"146ffc6e",null);t["a"]=c.exports},8313:function(e,t,i){"use strict";i("06df")},"9cec":function(e,t,i){},c38e:function(e,t,i){"use strict";i("2970")},f493:function(e,t,i){"use strict";i("9cec")}}]);