mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 20:17:54 +00:00
[fix]修复平台Bug
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
"GatewayCreate": "",
|
||||
"GatewayUpdate": "",
|
||||
"AdminUserUpdate": "",
|
||||
"PlatformDetail": "",
|
||||
"PlatformDetail": "平台详情",
|
||||
"CommandFilterRulesUpdate": "",
|
||||
"CommandFilterDetail": "命令过滤器详情",
|
||||
"AdminUserDetail": "管理用户详情",
|
||||
|
@@ -59,7 +59,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
// note: roles must be a object array! such as: ['admin'] or ,['developer','editor']
|
||||
let { current_org_roles } = await store.dispatch('users/getProfile')
|
||||
|
||||
current_org_roles = checkRoules(current_org_roles)
|
||||
current_org_roles = checkRoles(current_org_roles)
|
||||
|
||||
// generate accessible routes map based on roles
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes', current_org_roles)
|
||||
@@ -79,6 +79,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
// Message.error(error || 'Has Error')
|
||||
// next(`/login?redirect=${to.path}`)
|
||||
// NProgress.done()
|
||||
console.log(error)
|
||||
next()
|
||||
}
|
||||
})
|
||||
@@ -88,7 +89,7 @@ router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
|
||||
function checkRoules(val) {
|
||||
function checkRoles(val) {
|
||||
let currentRule = getPermission()
|
||||
if (currentRule) {
|
||||
if (!val.includes(currentRule)) {
|
||||
|
@@ -1,13 +1,54 @@
|
||||
<template>
|
||||
<div />
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14">
|
||||
<DetailCard :items="detailCardItems" />
|
||||
</el-col>
|
||||
<el-col :span="10" />
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DetailCard from '@/components/DetailCard'
|
||||
export default {
|
||||
name: '',
|
||||
components: {},
|
||||
name: 'Detail',
|
||||
components: {
|
||||
DetailCard
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('assets.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
key: this.$t('assets.BasePlatform'),
|
||||
value: this.object.base
|
||||
},
|
||||
{
|
||||
key: this.$t('assets.Charset'),
|
||||
value: this.object.charset
|
||||
},
|
||||
{
|
||||
key: this.$t('assets.Meta'),
|
||||
value: this.object.meta
|
||||
},
|
||||
{
|
||||
key: this.$t('assets.Comment'),
|
||||
value: this.object.comment
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -19,20 +19,23 @@ export default {
|
||||
return {
|
||||
TaskDetail: {},
|
||||
actions: {
|
||||
detailApiUrl: 'api/v1/assets/platform/details/1/'
|
||||
detailApiUrl: `/api/v1/assets/platforms/${this.$route.params.id}/`
|
||||
},
|
||||
config: {
|
||||
title: this.$t('assets.commandFilterDetail'),
|
||||
activeMenu: 'Detail',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('assets.detail'),
|
||||
title: this.$t('assets.PlatformDetail'),
|
||||
name: 'Detail'
|
||||
}
|
||||
],
|
||||
hasRightSide: false
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user