[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) {
switch (val) {
case 'profile':
this.$router.push({ name: 'userProfile' })
this.$router.push({ name: 'UserProfile' })
break
case 'AdminPage':
setPermission('Admin')

View File

@ -65,8 +65,8 @@ export const commonRoutes = {
children: [
{
path: '',
name: 'userProfile',
component: () => import('@/userviews/users/index'),
name: 'UserProfile',
component: () => import('@/userviews/users/UserProfile/index'),
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 { toSafeLocalDateStr } from '@/utils/common'
export default {
name: 'UserProfile',
name: 'ProfileInfo',
components: {
DetailCard,
QuickActions
@ -59,28 +59,28 @@ export default {
}.bind(this)
}
},
{
title: this.$t('assets.UpdatePassword'),
attrs: {
type: 'primary',
label: this.$t('common.Update')
},
callbacks: {
click: function() {
}
}
},
{
title: this.$t('assets.UpdateSSHPublicKey'),
attrs: {
type: 'primary',
label: this.$t('common.Update')
},
callbacks: {
click: function() {}
}
},
// {
// title: this.$t('assets.UpdatePassword'),
// attrs: {
// type: 'primary',
// label: this.$t('common.Update')
// },
// callbacks: {
// click: function() {
//
// }
// }
// },
// {
// title: this.$t('assets.UpdateSSHPublicKey'),
// attrs: {
// type: 'primary',
// label: this.$t('common.Update')
// },
// callbacks: {
// click: function() {}
// }
// },
{
title: this.$t('assets.ResetPublicKeyAndDownload'),
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>
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 {
name: 'AssetListDetail',
components: {
GenericDetailPage,
UserProfile
ProfileInfo,
ProfileUpdate,
PasswordUpdate,
SSHUpdate
},
data() {
return {
user: {},
config: {
title: this.$t('common.nav.Profile'),
activeMenu: 'ProfileInfo',
submenu: [
{
title: this.$t('common.BasicInfo'),
name: 'UserProfile'
name: 'ProfileInfo'
},
{
title: '设置个人信息',
name: 'ProfileUpdate'
},
{
title: '设置登录密码',
name: 'PasswordUpdate'
},
{
title: '设置SSH公钥',
name: 'SSHUpdate'
}
],
hasRightSide: false