webpackJsonp([26],{YFfu:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("5eyz"),l={name:"adminRole",data:function(){return{listLoading:!1,tableData:[],cur_page:1,total:0,delVisible:!1,idx:-1,delParam:{}}},created:function(){this.fetchData(),eventBus.$off("roleUpdateSuccess"),eventBus.$on("roleUpdateSuccess",this.fetchData)},computed:{data:function(){}},methods:{fetchData:function(){var t=this;this.listLoading=!0,i.a.getRoles().then(function(e){for(var a in t.tableData=e.data,t.tableData)0==t.tableData[a].id&&t.tableData.splice(a,1);t.listLoading=!1})},addRole:function(){this.$router.push({name:"adminRoleAdd"})},handleEdit:function(t){this.$router.push({name:"adminRoleEdit",query:{id:t}})},handleDelete:function(t,e){this.idx=t,this.delParam.id=e.id,this.delVisible=!0},deleteRow:function(){var t=this;i.a.deleteRole(this.delParam).then(function(e){t.tableData.splice(t.idx,1),t.$message.success("删除成功"),t.delVisible=!1})}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"table"},[a("div",{staticClass:"container"},[a("div",{staticClass:"handle-box text-right"},[a("el-button",{attrs:{size:"mini"},on:{click:t.addRole}},[a("i",{staticClass:"fa fa-plus"}),t._v(" 新建角色")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{type:"selection",width:"30"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"memo",label:"描述"}}),t._v(" "),a("el-table-column",{attrs:{label:"状态",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?a("el-tag",{attrs:{size:"small",type:"success"}},[t._v("启用")]):a("el-tag",{attrs:{size:"small",type:"info"}},[t._v("禁用")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"编辑",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleEdit(e.row.id)}}},[a("i",{staticClass:"fa fa-pencil"})])],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除",placement:"top"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){t.handleDelete(e.$index,e.row)}}},[a("i",{staticClass:"fa fa-trash"})])],1)]}}])})],1),t._v(" "),a("div",{staticClass:"pagination"})],1),t._v(" "),a("el-dialog",{attrs:{title:"提示",visible:t.delVisible,width:"300px"},on:{"update:visible":function(e){t.delVisible=e}}},[a("div",{staticClass:"del-dialog-cnt"},[t._v("删除不可恢复，是否确定删除？")]),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.deleteRow}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=a("XAIM")(l,n,!1,function(t){a("r0FY")},"data-v-7be5b2f4",null);e.default=s.exports},a85U:function(t,e,a){(t.exports=a("bKW+")(!1)).push([t.i,"\n.handle-select[data-v-7be5b2f4] {\n    width: 120px;\n}\n.handle-input[data-v-7be5b2f4] {\n    width: 300px;\n    display: inline-block;\n}\n.del-dialog-cnt[data-v-7be5b2f4] {\n    font-size: 16px;\n    text-align: center;\n}\n",""])},r0FY:function(t,e,a){var i=a("a85U");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);a("6imX")("644ab9d8",i,!0)}});