1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bc2e316a"],{"1a6e":function(e,t,r){},3123:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var s=r("b775");function a(e){return Object(s["a"])({url:"/qiniu/getToken",method:"get",params:e})}},"3d80":function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[r("el-tab-pane",{attrs:{label:"个人详细信息",name:"first"}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{attrs:{label:"用户头像:",prop:"wechatPayCert"}},[r("el-upload",{staticClass:"avatar-uploader",attrs:{action:e.upload_qiniu_url,data:e.qiniuData,"show-file-list":!1,"on-success":e.handleAvatarSuccess,"on-error":e.handleError,"before-upload":e.beforeAvatarUpload}},[e.imgUrl?r("img",{staticClass:"avatar",attrs:{src:e.imgUrl}}):r("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),r("el-form-item",{attrs:{label:"用户姓名:"}},[r("el-col",{attrs:{span:6}},[r("el-input",{staticStyle:{width:"200px"},attrs:{maxlength:"11",autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1)],1),r("el-form-item",{attrs:{label:"登录账号:"}},[r("el-col",{attrs:{span:5}},[r("el-input",{staticStyle:{width:"200px"},attrs:{maxlength:"11",autocomplete:"off"},model:{value:e.form.userAccount,callback:function(t){e.$set(e.form,"userAccount",t)},expression:"form.userAccount"}})],1)],1),r("el-form-item",{attrs:{label:"备注信息:"}},[r("el-col",{attrs:{span:5}},[r("el-input",{staticStyle:{width:"200px"},attrs:{maxlength:"11",autocomplete:"off"},model:{value:e.form.userDescript,callback:function(t){e.$set(e.form,"userDescript",t)},expression:"form.userDescript"}})],1)],1),r("el-form-item",{attrs:{label:"注册时间:"}},[[r("el-col",{attrs:{span:5}},[r("span",[e._v(e._s(e.form.userCreateTime))])])]],2),r("el-form-item",{attrs:{label:"最近修改时间:"}},[r("el-col",{attrs:{span:5}},[r("span",[e._v(e._s(e.form.userLastTime))])])],1),r("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.updateUserInfo}},[e._v("确认修改")])],1)],1),r("el-tab-pane",{attrs:{label:"修改密码",name:"second"}},[r("el-form",{ref:"dataForm",attrs:{model:e.code,rules:e.rules}},[r("el-form-item",{staticClass:"dialogShow",attrs:{label:"新密码:",prop:"userPassword"}},[r("el-col",{attrs:{span:6}},[r("el-input",{staticStyle:{width:"200px"},attrs:{type:"password",placeholder:"请输入管理员新密码",autocomplete:"off"},model:{value:e.code.userPassword,callback:function(t){e.$set(e.code,"userPassword",t)},expression:"code.userPassword"}})],1)],1),r("el-form-item",{staticClass:"dialogShow",attrs:{label:"确认密码:",prop:"aginUserPassword"}},[r("el-col",{attrs:{span:6}},[r("el-input",{staticStyle:{width:"200px"},attrs:{type:"password",placeholder:"请输入管理员确认新密码",autocomplete:"off"},model:{value:e.code.aginUserPassword,callback:function(t){e.$set(e.code,"aginUserPassword",t)},expression:"code.aginUserPassword"}})],1)],1)],1),r("el-button",{staticClass:"updateCode-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.updateCode}},[e._v("确 定")])],1)],1)],1)},a=[],o=(r("5ab2"),r("6d57"),r("e10e"),r("cc57"),r("88d6")),i=r("3123"),n=r("52c1"),u=r("c24f"),c=r("90e7");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){Object(o["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={data:function(){return{activeName:"first",form:{},code:{},imgUrl:"",qiniuData:{token:"",key:""},upload_qiniu_url:"",upload_qiniu_addr:"",rules:{userAccount:[{required:!0,message:"管理员账号不能为空",trigger:"blur"}],userPassword:[{required:!0,message:"管理员密码不能为空",trigger:"blur"}],aginUserPassword:[{required:!0,message:"管理员确认密码不能为空",trigger:"blur"}]}}},computed:d({},Object(n["b"])(["userInfo"])),created:function(){this.getQiniuTocken(),this.form=d({},this.userInfo),this.form.userPassword="",this.imgUrl=this.form.userHeadImg,this.code.userId=this.userInfo.userId},methods:{getQiniuTocken:function(){var e=this;Object(i["a"])({orgId:this.userInfo.orgId}).then((function(t){e.qiniuData.token=t.data})),Object(c["b"])({orgId:this.userInfo.orgId,settingType:3}).then((function(t){e.upload_qiniu_url=t.data[0].settingUploadQiniuUrl,e.upload_qiniu_addr=t.data[0].settingUploadQiniuAddr}))},handleAvatarSuccess:function(e,t){this.imgUrl=this.upload_qiniu_addr+"/"+e.key,this.form.userHeadImg=this.imgUrl},beforeAvatarUpload:function(e){this.qiniuData.key=e.name;var t=e.size/1024/1024<2;return t||this.$message.error("上传头像图片大小不能超过 2MB!"),t},handleError:function(e){this.$message({message:"上传失败",duration:2e3,type:"warning"})},updateUserInfo:function(){var e=this;this.form.userAccount!==this.userInfo.userAccount?this.form.isUpdate="1":this.form.isUpdate="0",Object(u["g"])(this.form).then((function(t){e.$notify({title:"用户信息修改",message:t.msg,type:"success",duration:2e3}),200===t.status&&e.$router.go(0)}))},updateCode:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.code.userPassword===e.code.aginUserPassword?Object(u["g"])(e.code).then((function(t){e.dialogCodeFormVisible=!1,e.$notify({title:"管理员密码更新",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),200===t.status&&(e.$store.dispatch("user/logout"),e.$router.push("/login?redirect=".concat(e.$route.fullPath)))})):e.$notify({title:"管理员密码更新",message:"两次密码不一致,请重新输入",type:"error",duration:2e3}))}))}}},p=f,m=(r("527d"),r("4023")),g=Object(m["a"])(p,s,a,!1,null,null,null);t["default"]=g.exports},"527d":function(e,t,r){"use strict";var s=r("1a6e"),a=r.n(s);a.a},"90e7":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return i}));var s=r("b775");function a(e){return Object(s["a"])({url:"/setting/addSetting",method:"post",data:e})}function o(e){return Object(s["a"])({url:"/setting/updateSetting",method:"put",data:e})}function i(e){return Object(s["a"])({url:"/setting/getSettingList",method:"post",data:e})}}}]);
|