mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 23:18:17 +00:00
fix: 修改概况权限判断页面显示
This commit is contained in:
parent
740c7a7836
commit
cf143c8502
@ -813,7 +813,12 @@
|
||||
"WebTerminal": "Web终端",
|
||||
"Notifications": "通知",
|
||||
"SiteMessageList": "站内信",
|
||||
"UserLoginACL": "用户登录"
|
||||
"UserLoginACL": "用户登录",
|
||||
"NoPermission403": "403 暂无权限",
|
||||
"NoPermissionVew": "没有权限查看当前页面",
|
||||
"AjaxError404": "404 请求错误",
|
||||
"CannotAccess": "无法访问当前页面",
|
||||
"GoHomePage": "去往首页"
|
||||
},
|
||||
"rbac": {
|
||||
"Permissions": "权限"
|
||||
|
@ -787,7 +787,12 @@
|
||||
"WebTerminal": "Web Terminal",
|
||||
"Notifications": "Notifications",
|
||||
"SiteMessageList": "Site message",
|
||||
"UserLoginACL": "User Login ACL"
|
||||
"UserLoginACL": "User Login ACL",
|
||||
"NoPermission403": "403 No permission",
|
||||
"NoPermissionVew": "No permission view current page",
|
||||
"AjaxError404": "404 ajax error",
|
||||
"CannotAccess": "Unable to access the current page",
|
||||
"GoHomePage": "Go home page"
|
||||
},
|
||||
"rbac": {
|
||||
"Permissions": "Permissions"
|
||||
|
64
src/views/403.vue
Normal file
64
src/views/403.vue
Normal file
@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="error-403-container">
|
||||
<div class="error-403-text">
|
||||
<h1 class="error-403-title">{{ $t('route.NoPermission403') }}</h1>
|
||||
<p class="error-403-subtitle">{{ $t('route.NoPermissionVew') }}</p>
|
||||
</div>
|
||||
<div class="error-403-image-container">
|
||||
<img class="error-403-error-image" src="@/assets/img/robot.png" alt="page error">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Page403'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.error-403-container {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
margin-top: 180px;
|
||||
}
|
||||
|
||||
.error-403-text {
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
min-width: 384px;
|
||||
}
|
||||
|
||||
.error-403-title {
|
||||
font-size: 40px;
|
||||
font-weight: 600;
|
||||
font-synthesis: style;
|
||||
}
|
||||
|
||||
.error-403-subtitle {
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
color: #646464;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.error-button {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<div class="error-404-container">
|
||||
<div class="error-404-text">
|
||||
<h1 class="error-404-title">404 请求错误</h1>
|
||||
<p class="error-404-subtitle">无法访问当前页面</p>
|
||||
<a href="/ui/" class="el-button el-button--success error-button">去往首页</a>
|
||||
<h1 class="error-404-title">{{ $t('route.AjaxError404') }}</h1>
|
||||
<p class="error-404-subtitle">{{ $t('route.CannotAccess') }}</p>
|
||||
<a href="/ui/" class="el-button el-button--success error-button">
|
||||
{{ $t('route.GoHomePage') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="error-404-image-container">
|
||||
<img class="error-404-error-image" src="@/assets/img/robot.png" alt="page error">
|
||||
@ -14,12 +16,7 @@
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Page404',
|
||||
computed: {
|
||||
message() {
|
||||
return 'The webmaster said that you can not enter this page...'
|
||||
}
|
||||
}
|
||||
name: 'Page404'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
<template>
|
||||
<Page>
|
||||
<Announcement />
|
||||
<ResourceSummary />
|
||||
<DatesLoginSummary />
|
||||
<TopAndLatestSummary />
|
||||
<div v-if="$hasPerm('rbac.view_resourcestatistics')">
|
||||
<Announcement />
|
||||
<ResourceSummary />
|
||||
<DatesLoginSummary />
|
||||
<TopAndLatestSummary />
|
||||
</div>
|
||||
<Page403 v-else />
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
@ -13,6 +16,7 @@ import { Page } from '@/layout/components'
|
||||
import ResourceSummary from './ResourceSummary'
|
||||
import DatesLoginSummary from './DatesLoginSummary'
|
||||
import TopAndLatestSummary from './TopAndLatestSummary'
|
||||
import Page403 from '@/views/403'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
@ -21,7 +25,8 @@ export default {
|
||||
DatesLoginSummary,
|
||||
ResourceSummary,
|
||||
TopAndLatestSummary,
|
||||
Announcement
|
||||
Announcement,
|
||||
Page403
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Page>
|
||||
<div class="home">
|
||||
<div v-if="$hasPerm('rbac.view_resourcestatistics')" class="home">
|
||||
<el-container class="container">
|
||||
<el-main class="main">
|
||||
<div class="content">
|
||||
@ -21,6 +21,7 @@
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<Page403 v-else />
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
@ -31,6 +32,7 @@ import Announcement from './components/Announcement'
|
||||
import Ticket from './components/Ticket'
|
||||
import Log from './components/LoginLog'
|
||||
import Session from './components/Session'
|
||||
import Page403 from '@/views/403'
|
||||
|
||||
export default {
|
||||
name: 'Name',
|
||||
@ -40,7 +42,8 @@ export default {
|
||||
Announcement,
|
||||
Ticket,
|
||||
Log,
|
||||
Session
|
||||
Session,
|
||||
Page403
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user