chunk-09411f28.05fac856.js 5.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-09411f28"],{b9d0:function(e,t,a){"use strict";a("d477")},d477:function(e,t,a){},ed2a:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:1200,visible:e.visible,cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{span:6}},[t("a-form-item",{attrs:{label:"账号"}},[t("a-input",{attrs:{placeholder:"请输入账号"},model:{value:e.queryParam.username,callback:function(t){e.$set(e.queryParam,"username",t)},expression:"queryParam.username"}})],1)],1),t("a-col",{attrs:{span:6}},[t("a-form-item",{attrs:{label:"性别"}},[t("a-select",{attrs:{placeholder:"请选择性别"},model:{value:e.queryParam.sex,callback:function(t){e.$set(e.queryParam,"sex",t)},expression:"queryParam.sex"}},[t("a-select-option",{attrs:{value:""}},[e._v("请选择性别查询")]),t("a-select-option",{attrs:{value:"1"}},[e._v("男性")]),t("a-select-option",{attrs:{value:"2"}},[e._v("女性")])],1)],1)],1),e.toggleSearchStatus?[t("a-col",{attrs:{span:6}},[t("a-form-item",{attrs:{label:"邮箱"}},[t("a-input",{attrs:{placeholder:"请输入邮箱"},model:{value:e.queryParam.email,callback:function(t){e.$set(e.queryParam,"email",t)},expression:"queryParam.email"}})],1)],1),t("a-col",{attrs:{span:6}},[t("a-form-item",{attrs:{label:"手机号码"}},[t("a-input",{attrs:{placeholder:"请输入手机号码"},model:{value:e.queryParam.phone,callback:function(t){e.$set(e.queryParam,"phone",t)},expression:"queryParam.phone"}})],1)],1),t("a-col",{attrs:{span:6}},[t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{attrs:{placeholder:"请选择状态"},model:{value:e.queryParam.status,callback:function(t){e.$set(e.queryParam,"status",t)},expression:"queryParam.status"}},[t("a-select-option",{attrs:{value:""}},[e._v("请选择状态")]),t("a-select-option",{attrs:{value:"1"}},[e._v("正常")]),t("a-select-option",{attrs:{value:"2"}},[e._v("解冻")])],1)],1)],1)]:e._e(),t("a-col",{attrs:{span:6}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchByquery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")]),t("a",{staticStyle:{"margin-left":"8px"},on:{click:e.handleToggleSearch}},[e._v("\n "+e._s(e.toggleSearchStatus?"收起":"展开")+"\n "),t("a-icon",{attrs:{type:e.toggleSearchStatus?"up":"down"}})],1)],1)])],2)],1)],1),t("a-table",{ref:"table",attrs:{rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange,onSelect:e.onSelect}},on:{change:e.handleTableChange}})],1)},n=[],i=a("ca00"),r=a("4ec3"),o={name:"SelectUserListModal",components:{},data:function(){return{title:"选择用户",queryParam:{},columns:[{title:"用户账号",align:"center",dataIndex:"name",fixed:"left",width:200},{title:"用户名称",align:"center",dataIndex:"realname"},{title:"手机号码",align:"center",dataIndex:"phone"},{title:"状态",align:"center",dataIndex:"status",customRender:function(e){return 1==e?"正常":2==e?"冻结":e}}],dataSource:[],ipagination:{current:1,pageSize:5,pageSizeOptions:["5","10","20"],showTotal:function(e,t){return t[0]+"-"+t[1]+" 共"+e+"条"},showQuickJumper:!0,showSizeChanger:!0,total:0},isorter:{column:"createTime",order:"desc"},selectedRowKeys:[],selectionRows:[],visible:!1,toggleSearchStatus:!1}},created:function(){this.loadData()},methods:{add:function(e,t){this.visible=!0,this.edit(e,t)},edit:function(e,t){if(t&&t.length>0?this.selectedRowKeys=t.split(","):this.selectedRowKeys=[],e){var a=this;a.selectionRows=[],e.forEach((function(e,t){a.selectionRows.push({id:a.selectedRowKeys[t],realname:e})}))}else this.selectionRows=[]},loadData:function(e){var t=this;1===e&&(this.ipagination.current=1);var a=this.getQueryParams();Object(r["A"])(a).then((function(e){e.success&&(t.dataSource=e.result.records,t.ipagination.total=e.result.total)}))},getQueryParams:function(){var e=Object.assign({},this.queryParam,this.isorter);return e.field=this.getQueryField(),e.pageNo=this.ipagination.current,e.pageSize=this.ipagination.pageSize,Object(i["d"])(e)},getQueryField:function(){for(var e="id,",t=0;t<this.columns.length;t++)e+=","+this.columns[t].dataIndex;return e},onSelectChange:function(e){this.selectedRowKeys=e},onSelect:function(e,t){1==t?this.selectionRows.push(e):this.selectionRows.forEach((function(t,a,s){t.id==e.id&&s.splice(a,1)}))},searchReset:function(){var e=this;Object.keys(e.queryParam).forEach((function(t){e.queryParam[t]=""})),e.loadData(1)},handleTableChange:function(e,t,a){Object.keys(a).length>0&&(this.isorter.column=a.field,this.isorter.order="ascend"==a.order?"asc":"desc"),this.ipagination=e,this.loadData()},handleCancel:function(){this.selectionRows=[],this.selectedRowKeys=[],this.visible=!1},handleOk:function(){this.$emit("choseUser",this.selectionRows),this.handleCancel()},searchByquery:function(){this.loadData(1)},handleToggleSearch:function(){this.toggleSearchStatus=!this.toggleSearchStatus}}},l=o,c=(a("b9d0"),a("2877")),u=Object(c["a"])(l,s,n,!1,null,"797da78b",null);t["default"]=u.exports}}]);