diff --git a/src/layout/components/NavHeader/ViewSwitcher.vue b/src/layout/components/NavHeader/ViewSwitcher.vue index 1d6cbbfeb..b94e4a7c7 100644 --- a/src/layout/components/NavHeader/ViewSwitcher.vue +++ b/src/layout/components/NavHeader/ViewSwitcher.vue @@ -93,13 +93,19 @@ export default { } .el-menu--horizontal .el-menu .el-menu-item { display: inline-block!important; + padding: 10px 10px; text-align: center; - padding: 6px 0px 6px 18px; + height: 70px; + width: 70px; &:hover { color: #303133; + //background-color: #e6e6e6; + } + &:first-child { + margin-left: 20px; } &:last-child { - padding: 6px 18px 6px 18px; + margin-right: 20px; } } .el-submenu.is-opened { @@ -118,10 +124,12 @@ export default { } .icons-title { display: inline-block; - padding-bottom: 10px; font-size: 14px; } .el-menu--popup-bottom-start { - margin-top: 0px!important; + margin-top: 0!important; +} +.el-menu-item.is-active { + font-weight: bold; } diff --git a/src/router/common.js b/src/router/common.js index cd5fccf45..2bd90d348 100644 --- a/src/router/common.js +++ b/src/router/common.js @@ -1,4 +1,3 @@ -import Layout from '@/layout/index' import i18n from '@/i18n/i18n' /** @@ -6,26 +5,6 @@ import i18n from '@/i18n/i18n' * the routes that need to be dynamically loaded based on admin or user roles */ export default [ - { - path: '/users/first-login', - component: Layout, - meta: { title: i18n.t('route.UserFirstLogin'), icon: 'user' }, - children: [ - { - path: 'personal-information-improvement/', - component: () => import('@/views/profile/UserFirstLogin/PersonalInformationImprovement/index'), - name: 'PersonalInformationImprovement', - meta: { title: i18n.t('route.PersonalInformationImprovement') } - }, - { - path: 'guide/', - component: () => import('@/views/profile/UserFirstLogin/UserGuide/index'), - name: 'UserGuide', - meta: { title: i18n.t('route.UserGuide') } - } - ], - hidden: true - }, { path: '/ops/celery/task/:id/log/', component: () => import('@/views/ops/CeleryTaskLog'), diff --git a/src/router/profile/index.js b/src/router/profile/index.js index 23fa44675..653a7af8c 100644 --- a/src/router/profile/index.js +++ b/src/router/profile/index.js @@ -17,7 +17,7 @@ export default { { path: '/profile/info', name: 'ProfileInfo', - component: () => import('@/views/profile/UserProfile/ProfileInfo'), + component: () => import('@/views/profile/ProfileInfo'), meta: { title: i18n.t('users.AccountInformation'), icon: 'adjust', @@ -26,13 +26,20 @@ export default { }, { path: '/profile/setting', - name: 'profileSetting', - component: () => import('@/views/profile/UserProfile/index'), + name: 'ProfileSetting', + component: () => import('@/views/profile/ProfileUpdate/index'), meta: { title: i18n.t('users.PersonalSetting'), icon: 'user-circle', permissions: [] } + }, + { + path: '/profile/improvement', + component: () => import('@/views/profile/ProfileImprovement'), + name: 'ProfileImprovement', + hidden: true, + meta: { title: i18n.t('route.PersonalInformationImprovement'), permissions: [] } } ] } diff --git a/src/utils/startup.js b/src/utils/startup.js index 704148e2d..58a0579ca 100644 --- a/src/utils/startup.js +++ b/src/utils/startup.js @@ -15,10 +15,6 @@ function reject(msg) { return new Promise((resolve, reject) => reject(msg)) } -// function setHeadTitle({ to, from, next }) { -// document.title = getPageTitle(to.meta.title) -// } - async function checkLogin({ to, from, next }) { if (whiteList.indexOf(to.path) !== -1) { next() @@ -69,12 +65,11 @@ async function changeCurrentOrgIfNeed({ to, from, next }) { await refreshCurrentOrg() const currentOrg = store.getters.currentOrg if (!currentOrg || typeof currentOrg !== 'object') { - // console.log('Not has current org') orgUtil.change2PropOrg() return reject('Change prop org') } if (!orgUtil.hasCurrentOrgPermission()) { - console.debug('Not has current org permission') + console.error('Not has current org permission') orgUtil.change2PropOrg() return reject('Change prop org') } @@ -109,11 +104,6 @@ export async function generatePageRoutes({ to, from, next }) { try { // try get user profile - // note: roles must be a object array! such as: ['admin'] or ,['developer','editor'] - // 不能改名 current_org_roles, 里面返回的就是这个 - // const currentRole = store.getters.currentRole - // console.log('Current org role: ', currentRole, rolec.getRolesDisplay(currentRole)) - // generate accessible routes map based on roles const accessRoutes = await store.dispatch('permission/generateRoutes', { to, from }) @@ -134,7 +124,7 @@ export async function generatePageRoutes({ to, from, next }) { export async function checkUserFirstLogin({ to, from, next }) { if (store.state.users.profile.is_first_login) { - next('/users/first-login/personal-information-improvement/') + next('/profile/information-improvement') } } diff --git a/src/views/profile/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue b/src/views/profile/ProfileImprovement.vue similarity index 88% rename from src/views/profile/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue rename to src/views/profile/ProfileImprovement.vue index 5eaf711f6..b9b1e5551 100644 --- a/src/views/profile/UserFirstLogin/PersonalInformationImprovement/PersonalInformationImprovement.vue +++ b/src/views/profile/ProfileImprovement.vue @@ -1,19 +1,15 @@ - - - + - - diff --git a/src/views/profile/UserFirstLogin/UserGuide/Guide.vue b/src/views/profile/UserFirstLogin/UserGuide/Guide.vue deleted file mode 100644 index 74ab23da8..000000000 --- a/src/views/profile/UserFirstLogin/UserGuide/Guide.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - {{ describe }} - {{ guide.label }} - - - - - - - diff --git a/src/views/profile/UserFirstLogin/UserGuide/index.vue b/src/views/profile/UserFirstLogin/UserGuide/index.vue deleted file mode 100644 index 776f7d714..000000000 --- a/src/views/profile/UserFirstLogin/UserGuide/index.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - -