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