[Update] 修改个人信息目录结构

This commit is contained in:
Bai 2020-05-28 10:59:13 +08:00
parent 2ee476f904
commit 03e9425fc8
7 changed files with 90 additions and 29 deletions

View File

@ -54,7 +54,7 @@ export default {
handleClick(val) { handleClick(val) {
switch (val) { switch (val) {
case 'profile': case 'profile':
this.$router.push({ name: 'userProfile' }) this.$router.push({ name: 'UserProfile' })
break break
case 'AdminPage': case 'AdminPage':
setPermission('Admin') setPermission('Admin')

View File

@ -65,8 +65,8 @@ export const commonRoutes = {
children: [ children: [
{ {
path: '', path: '',
name: 'userProfile', name: 'UserProfile',
component: () => import('@/userviews/users/index'), component: () => import('@/userviews/users/UserProfile/index'),
meta: { title: i18n.t('route.UserProfile'), icon: 'user', activeMenu: '/users/profile' } meta: { title: i18n.t('route.UserProfile'), icon: 'user', activeMenu: '/users/profile' }
} }
] ]

View File

@ -0,0 +1,13 @@
<template>
<div>password update</div>
</template>
<script>
export default {
name: 'PasswordUpdate'
}
</script>
<style scoped>
</style>

View File

@ -14,7 +14,7 @@ import DetailCard from '@/components/DetailCard'
import QuickActions from '@/components/QuickActions' import QuickActions from '@/components/QuickActions'
import { toSafeLocalDateStr } from '@/utils/common' import { toSafeLocalDateStr } from '@/utils/common'
export default { export default {
name: 'UserProfile', name: 'ProfileInfo',
components: { components: {
DetailCard, DetailCard,
QuickActions QuickActions
@ -59,28 +59,28 @@ export default {
}.bind(this) }.bind(this)
} }
}, },
{ // {
title: this.$t('assets.UpdatePassword'), // title: this.$t('assets.UpdatePassword'),
attrs: { // attrs: {
type: 'primary', // type: 'primary',
label: this.$t('common.Update') // label: this.$t('common.Update')
}, // },
callbacks: { // callbacks: {
click: function() { // click: function() {
//
} // }
} // }
}, // },
{ // {
title: this.$t('assets.UpdateSSHPublicKey'), // title: this.$t('assets.UpdateSSHPublicKey'),
attrs: { // attrs: {
type: 'primary', // type: 'primary',
label: this.$t('common.Update') // label: this.$t('common.Update')
}, // },
callbacks: { // callbacks: {
click: function() {} // click: function() {}
} // }
}, // },
{ {
title: this.$t('assets.ResetPublicKeyAndDownload'), title: this.$t('assets.ResetPublicKeyAndDownload'),
attrs: { attrs: {

View File

@ -0,0 +1,14 @@
<template>
<div>profile update</div>
</template>
<script>
export default {
name: 'ProfileUpdate'
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,14 @@
<template>
<div>ssh update</div>
</template>
<script>
export default {
name: 'SSHUpdate'
}
</script>
<style scoped>
</style>

View File

@ -8,22 +8,42 @@
<script> <script>
import { GenericDetailPage } from '@/layout/components' import { GenericDetailPage } from '@/layout/components'
import UserProfile from './UserProfile.vue' import ProfileInfo from './ProfileInfo'
import ProfileUpdate from './ProfileUpdate'
import PasswordUpdate from './PasswordUpdate'
import SSHUpdate from './SSHUpdate'
export default { export default {
name: 'AssetListDetail', name: 'AssetListDetail',
components: { components: {
GenericDetailPage, GenericDetailPage,
UserProfile ProfileInfo,
ProfileUpdate,
PasswordUpdate,
SSHUpdate
}, },
data() { data() {
return { return {
user: {}, user: {},
config: { config: {
title: this.$t('common.nav.Profile'), title: this.$t('common.nav.Profile'),
activeMenu: 'ProfileInfo',
submenu: [ submenu: [
{ {
title: this.$t('common.BasicInfo'), title: this.$t('common.BasicInfo'),
name: 'UserProfile' name: 'ProfileInfo'
},
{
title: '设置个人信息',
name: 'ProfileUpdate'
},
{
title: '设置登录密码',
name: 'PasswordUpdate'
},
{
title: '设置SSH公钥',
name: 'SSHUpdate'
} }
], ],
hasRightSide: false hasRightSide: false