webpackJsonp([27],{Ab98:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("Dd8w"),l=a.n(i),n=a("NYxO"),o={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:0,currentPage:1,pageSize:20,tableData:[],filter1:"",tableColumns:[{label:"权限名称",value:"dataruleName",show:!0},{label:"权限标识",value:"permission",show:!0}],multipleMode:!1}},computed:l()({},Object(n.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(e){return e.id})}}),methods:{pageSizeChange:function(e){this.pageSize=e,this.getData()},currentPageChange:function(e){this.currentPage=e,this.getData()},getData:function(){var e=this;this.$http.get({url:"/sysDatarule/page",data:{currentPage:this.currentPage,pageNumber:this.pageSize}}).then(function(t){t.success&&(e.totalNumber=t.data.page.totalNumber,e.tableData=t.data.pp)})},isColumnShow:function(e){var t=this.tableColumns.find(function(t){return t.value===e});return!!t&&t.show},toggleMultipleMode:function(e){this.multipleMode=e,e||this.$refs.table.clearSelection()},editRow:function(e){this.$router.push({path:"/permission",query:{id:e.id}})},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"filters-container"},[a("el-input",{staticClass:"filter-item",attrs:{placeholder:"关键字",size:"small",clearable:""},model:{value:e.filter1,callback:function(t){e.filter1=t},expression:"filter1"}}),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-search"},on:{click:e.getData}},[e._v("搜索\n        ")]),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(t){e.$router.push("/permission")}}},[e._v("添加\n        ")]),e._v(" "),a("el-dropdown",{staticClass:"table-column-filter",attrs:{trigger:"click",size:"medium"}},[a("span",[e._v("\n              筛选数据"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{staticClass:"table-column-filter-wrapper",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.tableColumns,function(t){return a("el-checkbox",{key:t.value,model:{value:t.show,callback:function(a){e.$set(t,"show",a)},expression:"item.show"}},[e._v(e._s(t.label)+"\n                ")])}))],1)],1),e._v(" "),a("el-table",{ref:"table",attrs:{data:e.tableData,height:e.tableHeight}},[e.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection",width:"50"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{type:"index","min-width":"50",align:"center"}}),e._v(" "),e.isColumnShow("dataruleName")?a("el-table-column",{attrs:{prop:"dataruleName",label:"权限名称","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("permission")?a("el-table-column",{attrs:{prop:"permission",label:"权限标识","min-width":"100"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(a){e.editRow(t.row)}}},[e._v("编辑")])]}}])})],1),e._v(" "),a("div",{staticClass:"pagination-wrapper"},[a("div",{staticClass:"multiple-mode-wrapper"},[e.multipleMode?a("el-button-group",[a("el-button",{attrs:{size:"small"},on:{click:e.operation1}},[e._v("批量操作1")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:e.operation2}},[e._v("批量操作2")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.toggleMultipleMode(!1)}}},[e._v("取消")])],1):a("el-button",{attrs:{size:"small"},on:{click:function(t){e.toggleMultipleMode(!0)}}},[e._v("批量编辑")])],1),e._v(" "),a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNumber},on:{"size-change":e.pageSizeChange,"current-change":e.currentPageChange}})],1)],1)},staticRenderFns:[]};var r=a("VU/8")(o,s,!1,function(e){a("V1Qc")},"data-v-f97f92fc",null);t.default=r.exports},V1Qc:function(e,t){}});