(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2cc9e99c","chunk-d48a7e80"],{"0e20":function(t,e,r){},"33e6":function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-settings-info-view"},[e("a-row",{attrs:{gutter:16}},[e("a-col",{attrs:{md:20,lg:12,offset:2}},[e("a-form-model",{ref:"user",attrs:{layout:"vertical",rules:t.rules,model:t.user}},[e("a-form-model-item",{ref:"nickName",attrs:{label:"昵称",required:!0,prop:"nickName"}},[e("a-input",{attrs:{placeholder:"给自己起个名字"},model:{value:t.user.nickName,callback:function(e){t.$set(t.user,"nickName",e)},expression:"user.nickName"}})],1),e("a-form-model-item",{attrs:{label:"手机",required:!0,prop:"phonenumber"}},[e("a-input",{attrs:{placeholder:"xxxxxx"},model:{value:t.user.phonenumber,callback:function(e){t.$set(t.user,"phonenumber",e)},expression:"user.phonenumber"}})],1),e("a-form-model-item",{attrs:{label:"电子邮件",required:!0,prop:"email"}},[e("a-input",{attrs:{placeholder:"exp@admin.com"},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}})],1),e("a-form-model-item",{attrs:{label:"性别",required:!1}},[e("a-radio-group",{model:{value:t.user.sex,callback:function(e){t.$set(t.user,"sex",e)},expression:"user.sex"}},[e("a-radio",{attrs:{value:t.sexValue.men}},[t._v("男")]),e("a-radio",{attrs:{value:t.sexValue.women}},[t._v("女")])],1)],1),e("a-form-model-item",[e("a-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("保存")])],1)],1)],1),e("a-col",{attrs:{md:20,lg:6,offset:2}},[e("div",{staticClass:"ant-upload-preview",on:{click:function(e){return t.$refs.modal.edit(1)}}},[e("a-icon",{staticClass:"upload-icon",attrs:{type:"camera"}}),e("div",{staticClass:"mask"}),e("img",{attrs:{src:t.avatar}})],1)])],1),e("avatar-modal",{ref:"modal",on:{ok:t.setavatar}})],1)},n=[],a=r("5530"),s=r("8d90"),i=r("c0c7"),u=r("2f62"),c={components:{AvatarModal:s["default"]},data:function(){return{sexValue:{men:"0",women:"1"},user:{},preview:{},option:{img:this.avatar,info:!0,size:1,outputType:"jpeg",canScale:!1,autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,fixed:!0,fixedNumber:[1,1]},rules:{nickName:[{required:!0,message:"请输入昵称",trigger:"blur"},{min:3,max:5,message:"长度应为3-5",trigger:"blur"}],email:[{required:!0,type:"email",message:"请正确填写邮箱地址",trigger:["blur","change"]}],phonenumber:[{required:!0,pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请正确填写手机号",trigger:"blur"}]}}},computed:Object(a["a"])({},Object(u["c"])(["nickname","avatar"])),mounted:function(){},methods:{getUser:function(){var t=this;Object(i["j"])().then((function(e){var r=e.data;t.user=r.user,t.roleGroup=r.roleGroup,t.postGroup=r.postGroup}))},setUserInfo:function(t){this.user=t.user,this.roleGroup=t.roleGroup,this.postGroup=t.postGroup},setavatar:function(t){this.option.img=t},submit:function(){var t=this,e=this.$createElement;this.$refs.user.validate((function(r){if(!r)return!1;Object(i["q"])(t.user).then((function(r){t.$notification.open({message:"提示",description:"修改成功",icon:e("a-icon",{attrs:{type:"check"},style:"color: #1890FF"}),duration:3})}))}))}}},l=c,d=(r("711e"),r("2877")),m=Object(d["a"])(l,o,n,!1,null,"fd33c6a8",null);e["default"]=m.exports},"711e":function(t,e,r){"use strict";r("97af")},"7c65":function(t,e,r){"use strict";r("0e20")},"8d90":function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t._self._c;return e("a-modal",{attrs:{title:"修改头像",visible:t.visible,maskClosable:!1,confirmLoading:t.confirmLoading,width:800,footer:null},on:{cancel:t.cancelHandel}},[e("a-row",[e("a-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[e("vue-cropper",{ref:"cropper",attrs:{img:t.options.img,info:!0,autoCrop:t.options.autoCrop,autoCropWidth:t.options.autoCropWidth,autoCropHeight:t.options.autoCropHeight,fixedBox:t.options.fixedBox},on:{realTime:t.realTime}})],1),e("a-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[e("div",{staticClass:"avatar-upload-preview"},[e("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])],1),e("br"),e("a-row",[e("a-col",{attrs:{lg:2,md:2}},[e("a-upload",{attrs:{name:"file",beforeUpload:t.beforeUpload,showUploadList:!1}},[e("a-button",{attrs:{icon:"upload"}},[t._v("选择图片")])],1)],1),e("a-col",{attrs:{lg:{span:1,offset:2},md:2}},[e("a-button",{attrs:{icon:"plus"},on:{click:function(e){return t.changeScale(1)}}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"minus"},on:{click:function(e){return t.changeScale(-1)}}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"undo"},on:{click:t.rotateLeft}})],1),e("a-col",{attrs:{lg:{span:1,offset:1},md:2}},[e("a-button",{attrs:{icon:"redo"},on:{click:t.rotateRight}})],1),e("a-col",{attrs:{lg:{span:2,offset:6},md:2}},[e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.finish("blob")}}},[t._v("保存")])],1)],1)],1)},n=[],a=r("5530"),s=(r("d3b7"),r("3ca3"),r("ddb0"),r("2b3d"),r("bf19"),r("9861"),r("4360")),i=r("c0c7"),u=r("2f62"),c={data:function(){return{visible:!1,id:null,confirmLoading:!1,fileList:[],uploading:!1,options:{img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0},previews:{}}},computed:Object(a["a"])({},Object(u["c"])(["avatar"])),methods:{edit:function(t){this.visible=!0,this.id=t,this.options.img=this.avatar},close:function(){this.id=null,this.visible=!1},cancelHandel:function(){this.close()},changeScale:function(t){t=t||1,this.$refs.cropper.changeScale(t)},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()},beforeUpload:function(t){var e=this,r=new FileReader;return r.readAsDataURL(t),r.onload=function(){e.options.img=r.result},!1},finish:function(t){var e=this,r=this,o=new FormData;"blob"===t?this.$refs.cropper.getCropBlob((function(t){var n=window.URL.createObjectURL(t);e.model=!0,e.modelSrc=n,o.append("avatarfile",t,e.fileName),Object(i["s"])(o).then((function(t){e.open=!1,r.$message.success("上传成功");var o=e.getFileDownloadPath(t.imgUrl);s["a"].commit("SET_AVATAR",o),r.$emit("ok",o),r.visible=!1}))})):this.$refs.cropper.getCropData((function(t){e.model=!0,e.modelSrc=t}))},okHandel:function(){var t=this;t.confirmLoading=!0,setTimeout((function(){t.confirmLoading=!1,t.close(),t.$message.success("上传头像成功")}),2e3)},realTime:function(t){this.previews=t}}},l=c,d=(r("7c65"),r("2877")),m=Object(d["a"])(l,o,n,!1,null,"26b9699c",null);e["default"]=m.exports},"97af":function(t,e,r){},c0c7:function(t,e,r){"use strict";r.d(e,"l",(function(){return a})),r.d(e,"h",(function(){return s})),r.d(e,"a",(function(){return i})),r.d(e,"p",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"n",(function(){return l})),r.d(e,"f",(function(){return d})),r.d(e,"m",(function(){return m})),r.d(e,"j",(function(){return f})),r.d(e,"q",(function(){return p})),r.d(e,"r",(function(){return b})),r.d(e,"s",(function(){return h})),r.d(e,"k",(function(){return g})),r.d(e,"d",(function(){return v})),r.d(e,"b",(function(){return x})),r.d(e,"c",(function(){return j})),r.d(e,"i",(function(){return y})),r.d(e,"g",(function(){return k})),r.d(e,"o",(function(){return w}));var o=r("b775"),n=r("028d");function a(t){return Object(o["b"])({url:"/system/user/list",method:"get",params:t})}function s(t){return Object(o["b"])({url:"/system/user/"+Object(n["i"])(t),method:"get"})}function i(t){return Object(o["b"])({url:"/system/user",method:"post",data:t})}function u(t){return Object(o["b"])({url:"/system/user/edit",method:"post",data:t})}function c(t){return Object(o["b"])({url:"/system/user/"+t,method:"post"})}function l(t){return Object(o["b"])({url:"/system/user/restart/"+t,method:"post"})}function d(t){return Object(o["b"])({url:"/system/user/export",method:"get",params:t})}function m(t,e){var r={id:t,password:e};return Object(o["b"])({url:"/system/user/resetPwd/edit",method:"post",data:r})}function f(){return Object(o["b"])({url:"/system/user/profile",method:"get"})}function p(t){return Object(o["b"])({url:"/system/user/profile",method:"post",data:t})}function b(t,e){var r={oldPassword:t,newPassword:e};return Object(o["b"])({url:"/system/user/profile/updatePwd/edit",method:"post",params:r})}function h(t){return Object(o["b"])({url:"/system/user/profile/avatar",method:"post",data:t})}function g(){return Object(o["b"])({url:"/system/user/importTemplate",method:"get"})}function v(t){return Object(o["b"])({url:"/system/user/checkUserNameUnique",method:"get",params:t})}function x(t){return Object(o["b"])({url:"/system/user/checkEmailUnique",method:"get",params:t})}function j(t){return Object(o["b"])({url:"/system/user/checkPhoneUnique",method:"get",params:t})}function y(t){return Object(o["b"])({url:"/system/user/getUserInfoByIds",method:"post",data:t})}function k(t){return Object(o["b"])({url:"/system/user/roleUserList",method:"get",params:t})}function w(t){return Object(o["b"])({url:"/system/user/addRoleUser",method:"post",data:t})}}}]);