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