text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3cfcc298"],{"0bb9":function(e,t,s){"use strict";var r=s("2d22"),a=s.n(r);a.a},"2d22":function(e,t,s){},e88c:function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[s("el-button",{attrs:{type:"danger"},on:{click:e.batchDeleteHandler}},[e._v("批量删除")]),e._v("\n  状态："),s("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入内容"},model:{value:e.params.status,callback:function(t){e.$set(e.params,"status",t)},expression:"params.status"}}),e._v(" "),s("el-button",{attrs:{type:"btn_primary"},on:{click:e.reset}},[e._v("重置")]),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":e.styleSet,"cell-style":e.styleSet,data:e.customers.list},on:{"selection-change":e.handleSelectionChange}},[s("el-table-column",{attrs:{type:"selection",width:"120"}}),e._v(" "),s("el-table-column",{attrs:{prop:"username",label:"用户名",width:"180"}}),e._v(" "),s("el-table-column",{attrs:{prop:"realname",label:"真实姓名",width:"180"}}),e._v(" "),s("el-table-column",{attrs:{prop:"telephone",label:"电话号码",width:"180"}}),e._v(" "),s("el-table-column",{attrs:{prop:"status",label:"订单状态",width:"160"}}),e._v(" "),s("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("a",{attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.deleteHandler(t.row.id)}}},[e._v("删除")]),e._v(" "),s("a",{attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.detailHandler(t.row.id)}}},[e._v("查看详情")]),e._v(" "),s("a",{attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.editHandler(t.row)}}},[e._v("编辑")])]}}])})],1),e._v(" "),s("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.customers.total,"current-page":e.customers.page+1,"page-size":e.customers.pageSize},on:{"current-change":e.changePage}}),e._v(" "),s("el-dialog",{attrs:{title:"修改顾客信息",visible:e.customer_visible},on:{"update:visible":function(t){e.customer_visible=t}}},[s("el-form",{attrs:{model:e.customer_form}},[s("el-form-item",{attrs:{label:"用户名","label-width":e.formLabelWidth}},[s("el-input",{attrs:{autocomplete:"off"},model:{value:e.customer_form.username,callback:function(t){e.$set(e.customer_form,"username",t)},expression:"customer_form.username"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"手机号","label-width":e.formLabelWidth}},[s("el-input",{attrs:{autocomplete:"off"},model:{value:e.customer_form.telephone,callback:function(t){e.$set(e.customer_form,"telephone",t)},expression:"customer_form.telephone"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"状态","label-width":e.formLabelWidth}},[s("el-select",{attrs:{placeholder:"请选择状态"},model:{value:e.customer_form.status,callback:function(t){e.$set(e.customer_form,"status",t)},expression:"customer_form.status"}},[s("el-option",{attrs:{label:"禁用",value:"false"}}),e._v(" "),s("el-option",{attrs:{label:"启用",value:"true"}})],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"用户头像","label-width":e.formLabelWidth}},[s("el-upload",{staticClass:"avatar-uploader",attrs:{action:"http://134.175.100.63:5588/file/upload","show-file-list":!1,"on-success":e.successHandler}},[e.imageUrl?s("img",{staticClass:"avatar",attrs:{src:e.imageUrl}}):s("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)],1),e._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.customer_visible=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.saveHandler}},[e._v("确 定")])],1)],1)],1)},a=[],o=(s("5ab2"),s("6d57"),s("e10e"),s("70ea")),l=s("52c1");function n(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function i(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?n(Object(s),!0).forEach((function(t){Object(o["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):n(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var c={data:function(){return{imageUrl:"",formLabelWidth:"120px",customer_visible:!1,customer_form:{type:"customer"},params:{page:0,pageSize:10},batchIds:[]}},watch:{params:{handler:function(){this.findAllCustomer(this.params)},deep:!0},"params.status":function(e){""==e&&this.reset()}},computed:i({},Object(l["d"])("customer",["customers"])),created:function(){this.findAllCustomer(this.params)},methods:i(i({},Object(l["b"])("customer",["saveOrUpdate","batchDeleteCustomer","findAllCustomer","deleteCustomerById"])),{},{deleteHandler:function(e){var t=this;this.deleteCustomerById(e).then((function(e){t.$message({message:"删除成功",type:"success"}),(t.customers.list.length-1)%t.customers.pageSize==0&&(t.params.page-=1,t.findAllCustomer(t.params)),t.findAllCustomer(t.params)}))},batchDeleteHandler:function(){var e=this;this.batchDeleteCustomer(this.batchIds).then((function(t){e.$message({message:"删除成功",type:"success"}),(e.customers.list.length-1)%e.customers.pageSize==0&&(e.params.page-=1,e.findAllCustomer(e.params)),e.findAllCustomer(e.params)}))},handleSelectionChange:function(e){var t=e.map((function(e){return e.id}));this.batchIds=t},editHandler:function(e){this.customer_visible=!0,this.customer_form=e,this.customer_form.id=e.id,this.customer_form.username=e.username,this.customer_form.telephone=e.telephone,this.customer_form.status=e.status,this.customer_form=Object.assign({},this.customer_form),this.imageUrl=e.imgPhoto},successHandler:function(e){this.imageUrl="http://134.175.100.63:8686/group1/"+e.data.id,this.customer_form.imgPhoto="http://134.175.100.63:8686/group1/"+e.data.id,this.customer_form=Object.assign({},this.customer_form)},saveHandler:function(){var e=this;this.saveOrUpdate(this.customer_form).then((function(t){e.$message({message:"修改成功",type:"success"}),e.findAllCustomer(e.params)})),this.customer_visible=!1},reset:function(){this.params={page:0,pageSize:10},this.findAllCustomer(this.params)},changePage:function(e){this.params.page=e-1},detailHandler:function(e){this.$router.push({path:"/customer/detail",query:{customerId:e}})},styleSet:function(){return"text-align:center"}})},u=c,m=(s("0bb9"),s("4023")),p=Object(m["a"])(u,r,a,!1,null,"66c53b6e",null);t["default"]=p.exports}}]);