webpackJsonp([23],{Xph7:function(e,t){},k1GY:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Dd8w"),l=a.n(n),i=a("NYxO"),r={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:10,currentPage:1,pageSize:20,tableData:[],filter1:"",filter2:"",tableColumns:[{label:"表名",value:"tableName",show:!0},{label:"类名",value:"className",show:!0},{label:"分类",value:"typeFlag",show:!0},{label:"备注",value:"remark",show:!0}],multipleMode:!1}},computed:l()({},Object(i.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(e){return e.id})}}),methods:{pageSizeChange:function(e){this.currentPage=1,this.pageSize=e,this.getData()},currentPageChange:function(e){this.currentPage=e,this.getData()},getData:function(){var e=this;this.$http.get({url:"/genCode/page",data:{currentPage:this.currentPage,pageNumber:this.pageSize,searchKey:this.filter1}}).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:"/genCode",query:{id:e.id}})},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")},searchData:function(){this.currentPage=1,this.getData()},deleteRow:function(e){var t=this;this.$alert("删除将无法恢复，确认要删除么？","警告",{type:"error"}).then(function(){return t.$http.post({url:"/genCode/del",data:{id:e.id}})}).then(function(){t.$message.success("删除成功"),t.getData()}).catch(function(e){"cancel"===e?t.$message.info("删除取消"):t.$message.error("删除失败")})}}},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.searchData}},[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("/genCode")}}},[e._v("添加\n        ")]),e._v(" "),a("el-dropdown",{staticClass:"table-column-filter",attrs:{trigger:"click",size:"medium"}},[a("span",[e._v("\n                筛选数据\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,"row-key":"id"}},[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("tableName")?a("el-table-column",{attrs:{prop:"tableName",label:"表名","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("className")?a("el-table-column",{attrs:{prop:"className",label:"类名","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("typeFlag")?a("el-table-column",{attrs:{prop:"typeFlag",label:"分类","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("remark")?a("el-table-column",{attrs:{prop:"remark",label:"备注","min-width":"100"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right","min-width":"150"},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("编辑")]),e._v(" "),a("el-button",{attrs:{type:"danger",size:"mini",plain:""},on:{click:function(a){e.deleteRow(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("div",{staticClass:"pagination-wrapper"},[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 o=a("VU/8")(r,s,!1,function(e){a("Xph7")},"data-v-6c24d7c4",null);t.default=o.exports}});
//# sourceMappingURL=23.f793d3903d59f5638e70.js.map