1 line
3.8 KiB
JavaScript
1 line
3.8 KiB
JavaScript
(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("新建")]),t.selectedRowKeys.length>0?e("a-dropdown",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}]},[e("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e("a-menu-item",{key:"1"},[e("a-icon",{attrs:{type:"delete"}}),t._v("删除")],1),e("a-menu-item",{key:"2"},[e("a-icon",{attrs:{type:"lock"}}),t._v("锁定")],1)],1),e("a-button",{staticStyle:{"margin-left":"8px"}},[t._v(" 批量操作 "),e("a-icon",{attrs:{type:"down"}})],1)],1):t._e()],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,n){return e("span",{},[t._v(" "+t._s(n+1)+" ")])}},{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",{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["v"])(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}})},handleGoBack:function(){this.record="",this.currentComponet="List"}},watch:{"$route.path":function(){this.record="",this.currentComponet="List"}}},p=d,m=a("2877"),f=Object(m["a"])(p,r,n,!1,null,null,null);e["default"]=f.exports}}]); |