mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 22:36:23 +00:00
[Update] 优化一些问题
This commit is contained in:
@@ -34,8 +34,8 @@ export default {
|
|||||||
optionUrlMeta(url).then(data => {
|
optionUrlMeta(url).then(data => {
|
||||||
this.meta = data.actions[this.method.toUpperCase()] || {}
|
this.meta = data.actions[this.method.toUpperCase()] || {}
|
||||||
this.generateColumns()
|
this.generateColumns()
|
||||||
}).catch((err) => {
|
}).catch(() => {
|
||||||
this.$log.error('Error occur: ', err)
|
this.$log.error('Error occur: ')
|
||||||
// this.totalConfig = this.config
|
// this.totalConfig = this.config
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@@ -61,7 +61,7 @@ export default {
|
|||||||
|
|
||||||
.list-group {
|
.list-group {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group.clear-list .list-group-item {
|
.list-group.clear-list .list-group-item {
|
||||||
|
@@ -15,9 +15,9 @@
|
|||||||
<i v-show="iShowTree" class="fa fa-angle-left fa-x" /><i v-show="!iShowTree" class="fa fa-angle-right fa-x" />
|
<i v-show="iShowTree" class="fa fa-angle-left fa-x" /><i v-show="!iShowTree" class="fa fa-angle-right fa-x" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<IBox class="transition-box" style="width: calc(100% - 17px);">
|
<div class="transition-box" style="width: calc(100% - 17px);">
|
||||||
<ListTable :table-config="iTableConfig" :header-actions="headerActions" />
|
<ListTable :table-config="iTableConfig" :header-actions="headerActions" />
|
||||||
</IBox>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
|
@@ -686,7 +686,7 @@
|
|||||||
"Users": "用户",
|
"Users": "用户",
|
||||||
"Remove": "移除",
|
"Remove": "移除",
|
||||||
"UserGroups": "用户组",
|
"UserGroups": "用户组",
|
||||||
"removeWarningMsg": "你确定移除 ",
|
"removeWarningMsg": "你确定从组织移除 ",
|
||||||
"removeSuccessMsg": "移除成功",
|
"removeSuccessMsg": "移除成功",
|
||||||
"removeErrorMsg": "移除失败",
|
"removeErrorMsg": "移除失败",
|
||||||
"quickUpdate": {
|
"quickUpdate": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="header-tools header-profile">
|
<div class="header-tools header-profile">
|
||||||
<el-dropdown @command="handleClick">
|
<el-dropdown trigger="click" @command="handleClick">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<el-avatar :src="avatarUrl" class="header-avatar" />
|
<el-avatar :src="avatarUrl" class="header-avatar" />
|
||||||
{{ currentUser.name }}
|
{{ currentUser.name }}
|
||||||
@@ -8,8 +8,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item icon="el-icon-user" command="profile">{{ $t('common.nav.Profile') }}</el-dropdown-item>
|
<el-dropdown-item icon="el-icon-user" command="profile">{{ $t('common.nav.Profile') }}</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="CheckPermission && CheckRules " icon="el-icon-guide" command="UserPage">{{ $t('common.nav.UserPage') }}</el-dropdown-item>
|
<el-dropdown-item v-if="CheckPermission && CheckRules " icon="el-icon-guide" command="UserPage">{{
|
||||||
<el-dropdown-item v-if="!CheckPermission && CheckRules " icon="el-icon-guide" command="AdminPage">{{ $t('common.nav.AdminPage') }}</el-dropdown-item>
|
$t('common.nav.UserPage') }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-if="!CheckPermission && CheckRules " icon="el-icon-guide" command="AdminPage">{{
|
||||||
|
$t('common.nav.AdminPage') }}
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item icon="el-icon-key" command="apiKey">{{ $t('common.nav.APIKey') }}</el-dropdown-item>
|
<el-dropdown-item icon="el-icon-key" command="apiKey">{{ $t('common.nav.APIKey') }}</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="logout">{{ $t('common.nav.Logout') }}</el-dropdown-item>
|
<el-dropdown-item divided command="logout">{{ $t('common.nav.Logout') }}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@@ -20,6 +24,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { getPermission, setPermission } from '@/utils/auth'
|
import { getPermission, setPermission } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountDropdown',
|
name: 'AccountDropdown',
|
||||||
data() {
|
data() {
|
||||||
@@ -50,6 +55,9 @@ export default {
|
|||||||
setPermission('User')
|
setPermission('User')
|
||||||
window.location.href = `/`
|
window.location.href = `/`
|
||||||
break
|
break
|
||||||
|
case 'logout':
|
||||||
|
window.location.href = `/auth/logout/?next=${this.$route.fullPath}`
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
21
src/layout/components/NavHeader/Help.vue
Normal file
21
src/layout/components/NavHeader/Help.vue
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
{{ $t('common.nav.Help') }}<i class="el-icon-arrow-down el-icon--right" />
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item icon="el-icon-plus">{{ $t('common.nav.Docs') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item icon="el-icon-circle-plus">{{ $t('common.nav.Support') }}</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Help'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown>
|
<el-dropdown trigger="click">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
{{ currentLang.title }}<i class="el-icon-arrow-down el-icon--right" />
|
{{ currentLang.title }}<i class="el-icon-arrow-down el-icon--right" />
|
||||||
</span>
|
</span>
|
||||||
|
@@ -5,15 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="navbar-right">
|
<div class="navbar-right">
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<el-dropdown>
|
<Help />
|
||||||
<span class="el-dropdown-link">
|
|
||||||
{{ $t('common.nav.Help') }}<i class="el-icon-arrow-down el-icon--right" />
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item icon="el-icon-plus">{{ $t('common.nav.Docs') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item icon="el-icon-circle-plus">{{ $t('common.nav.Support') }}</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<Language />
|
<Language />
|
||||||
@@ -29,6 +21,7 @@
|
|||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Hamburger from '@/components/Hamburger'
|
import Hamburger from '@/components/Hamburger'
|
||||||
import AccountDropdown from './AccountDropdown'
|
import AccountDropdown from './AccountDropdown'
|
||||||
|
import Help from './Help'
|
||||||
import Language from './Language'
|
import Language from './Language'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -36,7 +29,8 @@ export default {
|
|||||||
// Breadcrumb,
|
// Breadcrumb,
|
||||||
Hamburger,
|
Hamburger,
|
||||||
AccountDropdown,
|
AccountDropdown,
|
||||||
Language
|
Language,
|
||||||
|
Help
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -63,11 +57,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
|
||||||
async logout() {
|
|
||||||
await this.$store.dispatch('users/logout')
|
|
||||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@@ -377,7 +377,7 @@ td .el-button.el-button--mini {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-table__header thead tr th {
|
.el-table__header thead tr th {
|
||||||
border-bottom: 1.5px solid #e7e7e7 !important;
|
border-bottom: 1px solid #e7e7e7 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
|
.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
|
||||||
@@ -405,3 +405,8 @@ a {
|
|||||||
.el-card {
|
.el-card {
|
||||||
color: #676a6c;
|
color: #676a6c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.el-table__empty-block {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<div v-if="dates_login_record_top10_sessions.length > 0" class="feed-activity-list">
|
<div v-if="dates_login_record_top10_sessions.length > 0" class="feed-activity-list">
|
||||||
<div v-for="(item, index ) of dates_login_record_top10_sessions" :key="item.user + index" class="feed-element">
|
<div v-for="(item, index ) of dates_login_record_top10_sessions" :key="item.user + index" class="feed-element">
|
||||||
<a href="#" class="pull-left">
|
<a href="#" class="pull-left">
|
||||||
<img alt="image" class="img-circle" src="/static/img/avatar/user.png">
|
<img alt="image" class="img-circle" :src="avatarUrl">
|
||||||
</a>
|
</a>
|
||||||
<div class="media-body ">
|
<div class="media-body ">
|
||||||
<small class="pull-right">{{ item.timesince }}</small>
|
<small class="pull-right">{{ item.timesince }}</small>
|
||||||
@@ -25,6 +25,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: this.$t('dashboard.LatestSessions10'),
|
title: this.$t('dashboard.LatestSessions10'),
|
||||||
|
avatarUrl: require('@/assets/img/admin.png'),
|
||||||
contentHeading: {
|
contentHeading: {
|
||||||
title: this.$t('dashboard.LatestTop10'),
|
title: this.$t('dashboard.LatestTop10'),
|
||||||
content: this.$t('dashboard.LatestSessions')
|
content: this.$t('dashboard.LatestSessions')
|
||||||
|
Reference in New Issue
Block a user