(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e16d177"],{"4d8e":function(e,t,s){e.exports=s.p+"static/img/avatar.d25a6cc8.gif"},"535a":function(e,t,s){},"81c6":function(e,t,s){"use strict";s("535a")},ecac:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"app-container"},[s("div",[s("el-row",{attrs:{gutter:20}},[s("el-col",{attrs:{span:6,xs:24}},[s("user-card",{attrs:{userInfo:e.userInfo}})],1),s("el-col",{attrs:{span:18,xs:24}},[s("el-card",[s("el-tabs",{attrs:{"active-name":"timeline"}},[s("el-tab-pane",{attrs:{label:"时间线",name:"timeline"}},[s("timeline",{attrs:{userInfo:e.userInfo}})],1),s("el-tab-pane",{attrs:{label:"账号",name:"account"}},[s("account",{attrs:{userInfo:e.userInfo}})],1)],1)],1)],1)],1)],1)])},r=[],n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("关于我")])]),a("div",{staticClass:"user-profile"},[a("div",{staticClass:"box-center"},[a("img",{staticStyle:{"border-radius":"50px"},attrs:{src:null===e.userInfo.imagePath?s("4d8e"):e.userInfo.imagePath,height:"100px",width:"100px"}})]),a("div",{staticClass:"box-center"},[a("div",{staticClass:"user-name text-center"},[e._v(e._s(e.userInfo.userName))]),a("div",{staticClass:"user-role text-center text-muted"},[e._v(e._s(e.enumFormat(e.roleEnum,e.userInfo.role)))])])]),a("div",{staticClass:"user-bio"},[a("div",{staticClass:"user-education user-bio-section"},[a("div",{staticClass:"user-bio-section-header"},[a("svg-icon",{attrs:{"icon-class":"education"}}),a("span",[e._v("个人简介")])],1),a("div",{staticClass:"user-bio-section-body"},[a("div",{staticClass:"text-muted"},[e._v(" 无 ")])])])])])},i=[],l=s("5530"),o=s("2f62"),c={props:{userInfo:{type:Object,default:function(){return{realName:"",userName:"",role:"",imagePath:null}}}},computed:Object(l["a"])(Object(l["a"])({},Object(o["c"])("enumItem",["enumFormat"])),Object(o["e"])("enumItem",{roleEnum:function(e){return e.user.roleEnum}}))},u=c,m=(s("81c6"),s("2877")),f=Object(m["a"])(u,n,i,!1,null,"bd51907a",null),p=f.exports,d=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"block"},[s("el-timeline",[s("el-timeline-item",{attrs:{placement:"top",timestamp:e.userInfo.lastActiveTime}},[s("el-card",[s("h4",[e._v("最后活动时间")]),s("p",[e._v(e._s(e.userInfo.realName+"在校考系统中最后活动了"))])])],1),s("el-timeline-item",{attrs:{placement:"top",timestamp:e.userInfo.createTime}},[s("el-card",[s("h4",[e._v("加入时间")]),s("p",[e._v(e._s(e.userInfo.realName+"加入了校考系统"))])])],1)],1)],1)},v=[],b={props:{userInfo:{type:Object,default:function(){return{realName:"",lastActiveTime:"",createTime:""}}}}},h=b,I=Object(m["a"])(h,d,v,!1,null,null,null),_=I.exports,x=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-form",[s("el-form-item",{attrs:{label:"真实姓名"}},[s("el-input",{model:{value:e.userInfo.realName,callback:function(t){e.$set(e.userInfo,"realName","string"===typeof t?t.trim():t)},expression:"userInfo.realName"}})],1),s("el-form-item",{attrs:{label:"手机号"}},[s("el-input",{model:{value:e.userInfo.phone,callback:function(t){e.$set(e.userInfo,"phone","string"===typeof t?t.trim():t)},expression:"userInfo.phone"}})],1),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("更新")])],1)],1)},g=[],C=s("c24f"),j={props:{userInfo:{type:Object,default:function(){return{realName:"",phone:""}}}},methods:{submit:function(){var e=this;C["a"].updateUser(this.userInfo).then((function(t){1===t.code?e.$message.success(t.message):e.$message.error(t.message)}))}}},N=j,O=Object(m["a"])(N,x,g,!1,null,null,null),y=O.exports,w={name:"Profile",data:function(){return{userInfo:{realName:"",phone:"",lastActiveTime:"",createTime:"",role:"1",imagePath:null}}},components:{UserCard:p,Timeline:_,Account:y},created:function(){var e=this;C["a"].getCurrentUser().then((function(t){e.userInfo=t.response}))}},$=w,k=Object(m["a"])($,a,r,!1,null,null,null);t["default"]=k.exports}}]);