zhangzhiqiang 2 years ago
parent
commit
450ea9a438
  1. 21
      nladmin-ui/src/views/system/user/center.vue

21
nladmin-ui/src/views/system/user/center.vue

@ -20,8 +20,15 @@
</div>
<ul class="user-info">
<li><div style="height: 100%"><svg-icon icon-class="login" /> 登录账号<div class="user-right">{{ user.username }}</div></div></li>
<li><svg-icon icon-class="user1" /> 用户姓名 <div class="user-right">{{ user.nickName }}</div></li>
<li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept.name }}</div></li>
<li><svg-icon icon-class="user1" /> 用户姓名 <div class="user-right">{{ user.personName }}</div></li>
<li><svg-icon icon-class="dept" /> 所属部门
<el-tooltip effect="dark" placement="top">
<div slot="content">
<span v-for="item in depts">{{ item.name }} </span>
</div>
<span class="user-right" v-for="item in depts">{{ item.name }}<span v-if="depts.length>1">...</span></span>
</el-tooltip>
</li>
<li><svg-icon icon-class="phone" /> 手机号码 <div class="user-right">{{ user.phone }}</div></li>
<li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li>
<li>
@ -41,8 +48,8 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="用户资料" name="first">
<el-form ref="form" :model="form" :rules="rules" style="margin-top: 10px;" size="mini" label-width="65px">
<el-form-item label="姓名" prop="nickName">
<el-input v-model="form.nickName" style="width: 35%" />
<el-form-item label="姓名" prop="personName">
<el-input v-model="form.personName" style="width: 35%" />
<span style="color: #C0C0C0;margin-left: 10px;">用户姓名不作为登录使用</span>
</el-form-item>
<el-form-item label="手机号" prop="phone">
@ -142,8 +149,9 @@ export default {
'Authorization': getToken()
},
form: {},
deptsName: '',
rules: {
nickName: [
personName: [
{ required: true, message: '请输入用户姓名', trigger: 'blur' },
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
],
@ -156,12 +164,13 @@ export default {
computed: {
...mapGetters([
'user',
'depts',
'updateAvatarApi',
'baseApi'
])
},
created() {
this.form = { id: this.user.id, nickName: this.user.nickName, gender: this.user.gender, phone: this.user.phone }
this.form = { id: this.user.id, personName: this.user.personName, gender: this.user.gender, phone: this.user.phone }
store.dispatch('GetInfo').then(() => {})
},
methods: {

Loading…
Cancel
Save