1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a387de2"],{"09b8":function(e,t,n){},"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),Math.easeInOutQuad=function(e,t,n,o){return e/=o/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function a(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(e,t,n){var r=a(),s=e-r,c=20,u=0;t="undefined"===typeof t?500:t;var l=function e(){u+=c;var a=Math.easeInOutQuad(u,r,s,t);i(a),u<t?o(e):n&&"function"===typeof n&&n()};l()}},"399d":function(e,t,n){"use strict";n("09b8")},f946:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[n("div",{staticClass:"m-core"},[n("div",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/upSet",expression:"'chargeType/upSet'"}],staticClass:"newBand",on:{click:function(t){return e.openTypes("create")}}},[e._v("添加")]),e._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"name",label:"收费类型"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/upSet",expression:"'chargeType/upSet'"}],attrs:{type:"text"},on:{click:function(n){return e.openTypes("update",t.row)}}},[e._v("修改")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/del",expression:"'chargeType/del'"}],attrs:{slot:"reference",type:"text"},on:{click:function(n){return e.onTypesDel(t.row)}},slot:"reference"},[e._v("删除")])]}}])})],1),e._v(" "),n("pagination",{attrs:{total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"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(" "),n("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.typeStatus,width:"500px"},on:{"update:visible":function(t){e.typeStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[n("el-form-item",{attrs:{label:"收费类型",prop:"name","label-width":e.formLabelWidth}},[n("el-input",{attrs:{placeholder:"请输入收费类型",autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1)],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.typeStatus=!1}}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTypesSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},i=[],a=(n("7f7f"),n("96cf"),n("1da1")),r=n("333d"),s=n("d349"),c={name:"typesManager",components:{pagination:r["a"]},data:function(){return{tableList:[],subjectList:[],formActionTitle:"create",formTitle:{create:"添加收费类型",update:"修改收费类型"},typeStatus:!1,formLabelWidth:"100px",form:{name:null},rules:{name:[{required:!0,message:"请输入类型名称",trigger:"blur"}]},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.getList()},methods:{onTypesSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;"create"==t.formActionTitle?(t.form.id&&delete t.form.id,Object(s["k"])(t.form).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(s["k"])(t.form).then((function(e){t.messageTips("修改",e)}))}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.typeStatus=!1,this.getList()):this.$message.error(t.msg)},onTypesDel:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t){var n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否确认删除此条数据?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:Object(s["f"])(t.id).then((function(e){n.messageTips("删除",e)})),e.next=8;break;case 6:e.prev=6,e.t0=e["catch"](0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])})));function t(t){return e.apply(this,arguments)}return t}(),getList:function(){var e=this;Object(s["g"])({rows:this.pageInfo.limit,page:this.pageInfo.page}).then((function(t){var n=t.data;200==t.code&&(e.tableList=n.rows,e.pageInfo.total=n.total)}))},openTypes:function(e,t){this.typeStatus=!0,this.formActionTitle=e,"update"==e&&(this.form={id:t.id,name:t.name})},onFormClose:function(e){this.form={name:null},this.$refs[e].resetFields()}}},u=c,l=(n("399d"),n("2877")),p=Object(l["a"])(u,o,i,!1,null,"991a82c2",null);t["default"]=p.exports}}]);
|