diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json
index f2a4c1544..ce4168056 100644
--- a/src/i18n/langs/cn.json
+++ b/src/i18n/langs/cn.json
@@ -83,7 +83,7 @@
"GatewayCreate": "",
"GatewayUpdate": "",
"AdminUserUpdate": "",
- "PlatformDetail": "",
+ "PlatformDetail": "平台详情",
"CommandFilterRulesUpdate": "",
"CommandFilterDetail": "命令过滤器详情",
"AdminUserDetail": "管理用户详情",
diff --git a/src/permission.js b/src/permission.js
index 7574107cb..097eedf62 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -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)) {
diff --git a/src/views/assets/Platform/Detail.vue b/src/views/assets/Platform/Detail.vue
index 0746029d9..9eed0c9d3 100644
--- a/src/views/assets/Platform/Detail.vue
+++ b/src/views/assets/Platform/Detail.vue
@@ -1,13 +1,54 @@
-
+
+
+
+
+
+
diff --git a/src/views/assets/Platform/PlatformDetail.vue b/src/views/assets/Platform/PlatformDetail.vue
index 6400bc073..a850690b9 100644
--- a/src/views/assets/Platform/PlatformDetail.vue
+++ b/src/views/assets/Platform/PlatformDetail.vue
@@ -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: {
+
}
}