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

Loading…
Cancel
Save