1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a08d90c"],{"1e8b":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"用户昵称",prop:"nickName"}},[r("el-input",{attrs:{maxlength:"30"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1),r("el-form-item",{attrs:{label:"手机号码",prop:"phonenumber"}},[r("el-input",{attrs:{maxlength:"11"},model:{value:e.form.phonenumber,callback:function(t){e.$set(e.form,"phonenumber",t)},expression:"form.phonenumber"}})],1),r("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[r("el-input",{attrs:{maxlength:"50"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1),r("el-form-item",{attrs:{label:"性别"}},[r("el-radio-group",{model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[r("el-radio",{attrs:{label:"0"}},[e._v("男")]),r("el-radio",{attrs:{label:"1"}},[e._v("女")])],1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.submit}},[e._v("保存")]),r("el-button",{attrs:{type:"danger",size:"mini"},on:{click:e.close}},[e._v("关闭")])],1)],1)},u=[],o=r("c0c7"),s={props:{user:{type:Object}},data:function(){return{form:{},rules:{nickName:[{required:!0,message:"用户昵称不能为空",trigger:"blur"}],email:[{required:!0,message:"邮箱地址不能为空",trigger:"blur"},{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}],phonenumber:[{required:!0,message:"手机号码不能为空",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请输入正确的手机号码",trigger:"blur"}]}}},watch:{user:{handler:function(e){e&&(this.form={nickName:e.nickName,phonenumber:e.phonenumber,email:e.email,sex:e.sex})},immediate:!0}},methods:{submit:function(){var e=this;this.$refs["form"].validate((function(t){t&&Object(o["l"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.user.phonenumber=e.form.phonenumber,e.user.email=e.form.email}))}))},close:function(){this.$tab.closePage()}}},a=s,i=r("2877"),m=Object(i["a"])(a,n,u,!1,null,null,null);t["default"]=m.exports},c0c7:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"f",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"k",(function(){return m})),r.d(t,"c",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"b",(function(){return f})),r.d(t,"g",(function(){return d})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"o",(function(){return h})),r.d(t,"n",(function(){return g})),r.d(t,"e",(function(){return y})),r.d(t,"j",(function(){return O})),r.d(t,"d",(function(){return j}));r("e9c4");var n=r("b775"),u=r("c38a"),o=r("cbd8");function s(e){return Object(n["a"])({url:"/system/user/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/system/user/"+Object(u["e"])(e),method:"get"})}function i(e){return Object(n["a"])({url:"/system/user",method:"post",data:o["a"].methods.encrypt(JSON.stringify(e))})}function m(e){return Object(n["a"])({url:"/system/user",method:"put",data:o["a"].methods.encrypt(JSON.stringify(e))})}function c(e){return Object(n["a"])({url:"/system/user/"+e,method:"delete"})}function l(e,t){var r={userId:e,password:t};return Object(n["a"])({url:"/system/user/resetPwd",method:"put",data:o["a"].methods.encrypt(JSON.stringify(r))})}function f(e,t){var r={userId:e,status:t};return Object(n["a"])({url:"/system/user/changeStatus",method:"put",data:o["a"].methods.encrypt(JSON.stringify(r))})}function d(){return Object(n["a"])({url:"/system/user/profile",method:"get"})}function p(e){return Object(n["a"])({url:"/system/user/profile",method:"put",data:o["a"].methods.encrypt(JSON.stringify(e))})}function b(e,t){var r={oldPassword:e,newPassword:t};return Object(n["a"])({url:"/system/user/profile/updatePwd",method:"put",params:r})}function h(e){return Object(n["a"])({url:"/system/user/profile/avatar",method:"post",data:o["a"].methods.encrypt(JSON.stringify(e))})}function g(e){return Object(n["a"])({url:"/common/upload",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/system/user/authRole/"+e,method:"get"})}function O(e){return Object(n["a"])({url:"/system/user/authRole",method:"put",params:e})}function j(){return Object(n["a"])({url:"/system/user/deptTree",method:"get"})}}}]);
|