webpackJsonp([48],{"v+uL":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("Dd8w"),i=a.n(l),n=a("NYxO"),r={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:0,currentPage:1,pageSize:20,tableData:[],filter1:"",filter2:"7",tableColumns:[{label:"用户名",value:"username",show:!0},{label:"昵称",value:"nickname",show:!0},{label:"头像",value:"icon",show:!0},{label:"性别",value:"sex",show:!0},{label:"openId",value:"openId",show:!0}],multipleMode:!1}},computed:i()({},Object(n.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:"/userInfo/page",data:{currentPage:this.currentPage,pageNumber:this.pageSize,roleId:this.filter2,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:"/user",query:{id:e.id}})},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")},searchData:function(){this.currentPage=1,this.getData()}}},o={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-select",{staticClass:"filter-item",attrs:{placeholder:"角色",size:"small"},on:{change:e.getData},model:{value:e.filter2,callback:function(t){e.filter2=t},expression:"filter2"}},[a("el-option",{attrs:{label:"管理员",value:"5"}}),e._v(" "),a("el-option",{attrs:{label:"用户",value:"7"}}),e._v(" "),a("el-option",{attrs:{label:"总经理",value:"8"}}),e._v(" "),a("el-option",{attrs:{label:"片区经理",value:"9"}}),e._v(" "),a("el-option",{attrs:{label:"业务员",value:"10"}})],1),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("/user")}}},[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("username")?a("el-table-column",{attrs:{prop:"username",label:"用户名","min-width":"300"}}):e._e(),e._v(" "),e.isColumnShow("nickname")?a("el-table-column",{attrs:{prop:"nickname",label:"昵称","min-width":"300"}}):e._e(),e._v(" "),e.isColumnShow("icon")?a("el-table-column",{attrs:{label:"头像","min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticStyle:{width:"32px",height:"32px","border-radius":"50%","vertical-align":"middle"},attrs:{src:e.row.icon}})]}}])}):e._e(),e._v(" "),e.isColumnShow("sex")?a("el-table-column",{attrs:{prop:"sex",label:"性别","min-width":"300"}}):e._e(),e._v(" "),e.isColumnShow("openId")?a("el-table-column",{attrs:{prop:"openId",label:"openId","min-width":"300"}}):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("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 s=a("VU/8")(r,o,!1,function(e){a("yGTp")},"data-v-3c437602",null);t.default=s.exports},yGTp:function(e,t){}});
//# sourceMappingURL=48.67222597bb899fcffa63.js.map