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 => {
|
||||
this.meta = data.actions[this.method.toUpperCase()] || {}
|
||||
this.generateColumns()
|
||||
}).catch((err) => {
|
||||
this.$log.error('Error occur: ', err)
|
||||
}).catch(() => {
|
||||
this.$log.error('Error occur: ')
|
||||
// this.totalConfig = this.config
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
|
@@ -61,7 +61,7 @@ export default {
|
||||
|
||||
.list-group {
|
||||
padding-left: 0;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.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" />
|
||||
</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" />
|
||||
</IBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
|
@@ -686,7 +686,7 @@
|
||||
"Users": "用户",
|
||||
"Remove": "移除",
|
||||
"UserGroups": "用户组",
|
||||
"removeWarningMsg": "你确定移除 ",
|
||||
"removeWarningMsg": "你确定从组织移除 ",
|
||||
"removeSuccessMsg": "移除成功",
|
||||
"removeErrorMsg": "移除失败",
|
||||
"quickUpdate": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="header-tools header-profile">
|
||||
<el-dropdown @command="handleClick">
|
||||
<el-dropdown trigger="click" @command="handleClick">
|
||||
<span class="el-dropdown-link">
|
||||
<el-avatar :src="avatarUrl" class="header-avatar" />
|
||||
{{ currentUser.name }}
|
||||
@@ -8,8 +8,12 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<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="AdminPage">{{ $t('common.nav.AdminPage') }}</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="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 divided command="logout">{{ $t('common.nav.Logout') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -20,6 +24,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getPermission, setPermission } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: 'AccountDropdown',
|
||||
data() {
|
||||
@@ -50,6 +55,9 @@ export default {
|
||||
setPermission('User')
|
||||
window.location.href = `/`
|
||||
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>
|
||||
<el-dropdown>
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
{{ currentLang.title }}<i class="el-icon-arrow-down el-icon--right" />
|
||||
</span>
|
||||
|
@@ -5,15 +5,7 @@
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
<div class="header-item">
|
||||
<el-dropdown>
|
||||
<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>
|
||||
<Help />
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<Language />
|
||||
@@ -29,6 +21,7 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import AccountDropdown from './AccountDropdown'
|
||||
import Help from './Help'
|
||||
import Language from './Language'
|
||||
|
||||
export default {
|
||||
@@ -36,7 +29,8 @@ export default {
|
||||
// Breadcrumb,
|
||||
Hamburger,
|
||||
AccountDropdown,
|
||||
Language
|
||||
Language,
|
||||
Help
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -63,11 +57,8 @@ export default {
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
await this.$store.dispatch('users/logout')
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -377,7 +377,7 @@ td .el-button.el-button--mini {
|
||||
}
|
||||
|
||||
.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 {
|
||||
@@ -405,3 +405,8 @@ a {
|
||||
.el-card {
|
||||
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-for="(item, index ) of dates_login_record_top10_sessions" :key="item.user + index" class="feed-element">
|
||||
<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>
|
||||
<div class="media-body ">
|
||||
<small class="pull-right">{{ item.timesince }}</small>
|
||||
@@ -25,6 +25,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: this.$t('dashboard.LatestSessions10'),
|
||||
avatarUrl: require('@/assets/img/admin.png'),
|
||||
contentHeading: {
|
||||
title: this.$t('dashboard.LatestTop10'),
|
||||
content: this.$t('dashboard.LatestSessions')
|
||||
|
Reference in New Issue
Block a user