chunk-55a3bdfb.7c5e5107.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-55a3bdfb"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,r){var o=i(),s=e-o,c=20,u=0;t="undefined"===typeof t?500:t;var l=function e(){u+=c;var i=Math.easeInOutQuad(u,o,s,t);a(i),u<t?n(e):r&&"function"===typeof r&&r()};l()}},"525e":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,saveKey:"platformProductManager",model:e.searchForm},on:{submit:e.search,reset:e.reset,"update:model":function(t){e.searchForm=t}}},[r("el-form-item",[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择分钟数"},model:{value:e.searchForm.minuteUp,callback:function(t){e.$set(e.searchForm,"minuteUp","string"===typeof t?t.trim():t)},expression:"searchForm.minuteUp"}},e._l(e.minuteList,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1)],1),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cloudRoomFlowConfig/add",expression:"'cloudRoomFlowConfig/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){return e.openCloudPackage("create")}}},[e._v("新增流量包")]),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"流量包编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"分钟数",prop:"minuteUpLimit"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"原价(元)",prop:"price"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"描述",prop:"remark"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("tooltip",{attrs:{content:e.row.remark}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cloudRoomFlowConfig/update",expression:"'cloudRoomFlowConfig/update'"}],attrs:{type:"text"},on:{click:function(r){return e.resetCloudPackage(t.row)}}},[e._v("修改")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"cloudRoomFlowConfig/delete",expression:"'cloudRoomFlowConfig/delete'"}],attrs:{type:"text"},on:{click:function(r){return e.delCloudPackage(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("pagination",{attrs:{saveKey:"platformProductManager",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1),e._v(" "),r("el-dialog",{staticClass:"courseMask",attrs:{title:e.isAdd?"新增流量包":"修改流量包",width:"500px",visible:e.courseVisible},on:{"update:visible":function(t){e.courseVisible=t}}},[e.courseVisible?r("cloudModel",{ref:"cloudModel",attrs:{activeRow:e.activeRow,pageType:e.pageType},on:{close:e.close}}):e._e(),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.courseVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submitInfo}},[e._v("确 定")])],1)],1)],1)},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("\n 云教练流量包\n ")])}],i=(r("386d"),r("96cf"),r("1da1")),o=r("5530"),s=r("333d"),c=r("829b"),u=function(e){return Object(c["a"])({url:"/api-web/cloudRoomFlowConfig/add",method:"post",data:e})},l=function(e){return Object(c["a"])({url:"/api-web/cloudRoomFlowConfig/update",method:"post",data:e})},m=function(e){return Object(c["a"])({url:"/api-web/cloudRoomFlowConfig/delete/"+e.id,method:"get"})},p=function(e){return Object(c["a"])({url:"/api-web/cloudRoomFlowConfig/queryPage",method:"get",params:e})},d=function(e){return Object(c["a"])({url:"/api-web/cloudRoomFlowConfig/getMinuteUp",method:"get",params:e})},f=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"cloudForm",attrs:{model:e.cloudForm}},[r("el-form-item",{attrs:{label:"分钟数",prop:"minuteUpLimit","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入分钟数",trigger:"blur"},{type:"number",message:"分钟数必须为数字值"}]}},[r("el-input",{attrs:{clearable:"",type:"number",placeholder:"请输入分钟数"},model:{value:e.cloudForm.minuteUpLimit,callback:function(t){e.$set(e.cloudForm,"minuteUpLimit",e._n(t))},expression:"cloudForm.minuteUpLimit"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"原价(元)",prop:"price","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入原价",trigger:"blur"},{type:"number",message:"原价必须为数字值"}]}},[r("el-input",{attrs:{clearable:"",type:"number",placeholder:"请输入原价"},model:{value:e.cloudForm.price,callback:function(t){e.$set(e.cloudForm,"price",e._n(t))},expression:"cloudForm.price"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"描述",prop:"remark","label-width":e.formLabelWidth}},[r("el-input",{attrs:{clearable:"",type:"textarea",placeholder:"请输入描述"},model:{value:e.cloudForm.remark,callback:function(t){e.$set(e.cloudForm,"remark",t)},expression:"cloudForm.remark"}})],1)],1)],1)},b=[],h=(r("c5f6"),r("28a5"),{props:["activeRow","pageType"],data:function(){return{cloudForm:{minuteUpLimit:null,price:null,remark:"",id:null},formLabelWidth:"100px"}},mounted:function(){var e=this.activeRow;e&&(this.cloudForm={price:e.price,minuteUpLimit:e.minuteUpLimit,remark:e.remark,id:e.id},this.menuId=e.menuId?e.menuId.split(",").map((function(e){return Number(e)})):[])},methods:{submitInfo:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.cloudForm.validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(n){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n){e.next=26;break}if(a=r.cloudForm,"update"!=t){e.next=15;break}return e.prev=3,e.next=6,l({minuteUpLimit:a.minuteUpLimit,price:a.price,remark:a.remark,id:a.id});case 6:e.sent,r.$message.success("修改成功"),r.$emit("close"),e.next=13;break;case 11:e.prev=11,e.t0=e["catch"](3);case 13:e.next=26;break;case 15:if("create"!=t){e.next=26;break}return e.prev=16,e.next=19,u({price:a.price,minuteUpLimit:a.minuteUpLimit,remark:a.remark});case 19:e.sent,r.$message.success("新建成功"),r.$emit("close"),e.next=26;break;case 24:e.prev=24,e.t1=e["catch"](16);case 26:case"end":return e.stop()}}),e,null,[[3,11],[16,24]])})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}}),g=h,v=(r("7a562"),r("2877")),w=Object(v["a"])(g,f,b,!1,null,"7d4af5d5",null),k=w.exports,y={minuteUp:null},F={components:{pagination:s["a"],cloudModel:k},data:function(){return{tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},searchForm:Object(o["a"])({},y),isAdd:!0,courseVisible:!1,activeRow:null,minuteList:[]}},mounted:function(){this.__init(),this.getList()},methods:{__init:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d();case 3:t=e.sent,this.minuteList=t.data||[],e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),getList:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(Object(o["a"])(Object(o["a"])({},this.searchForm),{},{page:this.pageInfo.page,rows:this.pageInfo.limit}));case 3:t=e.sent,this.pageInfo.total=t.data.total,this.tableList=t.data.rows,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.pageInfo.page=1,this.$refs.searchForm.save(this.searchForm),this.$refs.searchForm.save(this.pageInfo,"page"),this.getList()},reset:function(){this.searchForm=Object(o["a"])({},y),this.search()},resetCloudPackage:function(e){this.isAdd=!1,this.activeRow=e,this.pageType="update",this.courseVisible=!0},submitInfo:function(){var e=this.isAdd?"create":"update";this.$refs.cloudModel.submitInfo(e)},close:function(){this.courseVisible=!1,this.getList()},openCloudPackage:function(){this.isAdd=!0,this.activeRow=null,this.pageType="create",this.courseVisible=!0},delCloudPackage:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,m({id:t.id});case 3:e.sent,r.$message.success("删除成功"),r.getList(),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])}))));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}},_=F,x=(r("803f"),Object(v["a"])(_,n,a,!1,null,"44bea1e0",null));t["default"]=x.exports},"7a562":function(e,t,r){"use strict";r("9817")},"803f":function(e,t,r){"use strict";r("e9af")},9817:function(e,t,r){},e9af:function(e,t,r){}}]);