(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b7230"],{"1faf":function(t,e,a){"use strict";a.r(e);a("d3b7"),a("25f0");var r=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"}},[e("a-row",{attrs:{gutter:48}},[e("a-col",{attrs:{md:8,sm:24}},[e("a-form-item",{attrs:{label:"用户名"}},[e("a-input",{attrs:{placeholder:"请输入用户名",allowClear:""},model:{value:t.queryParam.username,callback:function(e){t.$set(t.queryParam,"username",e)},expression:"queryParam.username"}})],1)],1),e("a-col",{attrs:{md:t.advanced?24:8,sm:24}},[e("span",{staticClass:"table-page-search-submitButtons",style:t.advanced&&{float:"right",overflow:"hidden"}||{}},[e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.$refs.table.refresh(!0)}}},[t._v("查询")]),e("a-button",{staticStyle:{"margin-left":"8px"},on:{click:function(){return t.queryParam={}}}},[t._v("重置")])],1)])],1)],1)],1),e("div",{staticClass:"table-operator"},[e("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(e){return t.handleNew()}}},[t._v("新建")])],1),e("s-table",{ref:"table",attrs:{size:"default",rowKey:"key",columns:t.columns,data:t.loadData,alert:t.options.alert,rowSelection:t.options.rowSelection},scopedSlots:t._u([{key:"serial",fn:function(a,r){return e("span",{},[t._v(" "+t._s(r.id)+" ")])}},{key:"groupNameList",fn:function(a,r){return e("span",{},[t._v(" "+t._s(2===r.role?"所有组":a.toString())+" ")])}},{key:"role",fn:function(a,r){return e("span",{},[t._v(" "+t._s(2===r.role?"管理员":"普通用户")+" ")])}},{key:"action",fn:function(a,r){return e("span",{},[[e("a",{on:{click:function(e){return t.handleEdit(r)}}},[t._v("编辑")]),e("a-divider",{attrs:{type:"vertical"}}),e("a-popconfirm",{attrs:{title:"是否确认删除这个用户吗?","ok-text":"删除","cancel-text":"取消"},on:{confirm:function(e){return t.handleDel(r)}}},[e("a",{attrs:{href:"javascript:;"}},[t._v("删除")])])]],2)}}])})],1)},n=[],o=a("261e"),s=a("27e3"),i=a("c1df"),c=a.n(i),l=a("0fea"),u=a("2af9"),d={name:"TableListWrapper",components:{AInput:s["a"],ATextarea:o["a"],STable:u["j"]},data:function(){var t=this;return{currentComponet:"List",record:"",mdl:{},advanced:!1,queryParam:{},columns:[{title:"#",width:"5%",scopedSlots:{customRender:"serial"}},{title:"用户名",width:"12%",dataIndex:"username"},{title:"角色",dataIndex:"role",width:"10%",scopedSlots:{customRender:"role"}},{title:"权限",dataIndex:"groupNameList",width:"45%",scopedSlots:{customRender:"groupNameList"}},{title:"更新时间",width:"18%",dataIndex:"updateDt",customRender:function(t){return c()(t).format("YYYY-MM-DD HH:mm:ss")}},{title:"操作",width:"10%",dataIndex:"action",scopedSlots:{customRender:"action"}}],loadData:function(e){return Object(l["z"])(Object.assign(e,t.queryParam)).then((function(t){return t}))},selectedRowKeys:[],selectedRows:[],options:{alert:{show:!0,clear:function(){t.selectedRowKeys=[]}},rowSelection:{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}},optionAlertShow:!1}},filters:{},methods:{handleNew:function(){this.$router.push("/user-form")},handleEdit:function(t){this.record=t||"",this.$router.push({path:"/user-form",query:{username:t.username}})},handleDel:function(t){var e=this;Object(l["h"])(t.id).then((function(t){e.$refs.table.refresh(!0),e.$message.success("删除成功")}))},handleGoBack:function(){this.record="",this.currentComponet="List"}},watch:{"$route.path":function(){this.record="",this.currentComponet="List"}}},f=d,p=a("2877"),m=Object(p["a"])(f,r,n,!1,null,null,null);e["default"]=m.exports}}]);