diff --git a/src/api/perms.js b/src/api/perms.js new file mode 100644 index 000000000..59c28e6a9 --- /dev/null +++ b/src/api/perms.js @@ -0,0 +1,22 @@ +import request from '@/utils/request' + +export function getAssetPermissionDetail(id) { + return request({ + url: `/api/v1/perms/asset-permissions/${id}/`, + method: 'get' + }) +} + +export function getRemoteAppPermissionDetail(id) { + return request({ + url: `/api/v1/perms/remote-app-permissions/${id}/`, + method: 'get' + }) +} + +export function getDatabaseAppPermissionDetail(id) { + return request({ + url: `/api/v1/perms/database-app-permissions/${id}/`, + method: 'get' + }) +} diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index 63019d979..8df8cbb18 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -350,10 +350,30 @@ const cn = { 'UserGroups': '用户组', 'Node': '节点', 'SystemUser': '系统用户', + 'UserCount': '用户数量', + 'UserGroupCount': '用户组数量', + 'AssetCount': '资产数量', + 'NodeCount': '节点数量', + 'SystemUserCount': '系统用户数量', + 'DateStart': '开始日期', + 'DateExpired': '失效日期', + 'DateCreated': '创建日期', + 'CreatedBy': '创建者', + 'Comment': '备注', + 'QuickModify': '快速修改', + 'AssetPermissionDetail': '资产授权详情', + 'UsersAndUserGroups': '用户或用户组', + 'AssetAndNode': '资产或节点', + 'Active': '激活中', // 'RemoteApp': '远程应用', + 'RemoteAppCount': '远程应用数量', + 'RemoteAppPermissionDetail': '远程应用授权详情', + 'Add RemoteApp to this permission': '添加远程应用', // - 'DatabaseApp': '数据库应用' + 'DatabaseApp': '数据库应用', + 'DatabaseAppPermissionDetail': '数据库应用授权详情', + 'Add DatabaseApp to this permission': '添加数据库应用' }, sessions: { 'id': 'ID', diff --git a/src/router/index.js b/src/router/index.js index b4b5a533f..959bd41e5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -222,11 +222,18 @@ export const constantRoutes = [ }, { path: 'asset-permissions/create', - component: () => import('@/views/perms/AssetPermissionCreateUpdate'), // Parent router-view + component: () => import('@/views/perms/AssetPermissionCreateUpdate'), name: 'AssetPermissionCreate', hidden: true, meta: { title: 'AssetPermissionCreate', activeMenu: '/perms/asset-permissions' } }, + { + path: 'asset-permissions/:id', + component: () => import('@/views/perms/AssetPermissionDetail'), + name: 'AssetPermissionDetail', + hidden: true, + meta: { title: 'AssetPermissionDetail', activeMenu: '/perms/asset-permissions' } + }, { path: 'remote-app-permissions', name: 'RemoteAppPermissionList', @@ -240,6 +247,13 @@ export const constantRoutes = [ hidden: true, meta: { title: 'RemoteAppPermissionCreate', activeMenu: '/perms/remote-app-permissions' } }, + { + path: 'remote-app-permissions/:id', + component: () => import('@/views/perms/RemoteAppPermissionDetail'), + name: 'RemoteAppPermissionDetail', + hidden: true, + meta: { title: 'RemoteAppPermissionDetail', activeMenu: '/perms/asset-permissions' } + }, { path: 'database-app-permissions', name: 'DatabaseAppPermissionList', @@ -252,6 +266,13 @@ export const constantRoutes = [ name: 'DatabaseAppPermissionCreate', hidden: true, meta: { title: 'DatabaseAppPermissionCreate', activeMenu: '/perms/database-app-permissions' } + }, + { + path: 'database-app-permissions/:id', + component: () => import('@/views/perms/DatabaseAppPermissionDetail'), + name: 'DatabaseAppPermissionDetail', + hidden: true, + meta: { title: 'DatabaseAppPermissionDetail', activeMenu: '/perms/asset-permissions' } } ] }, diff --git a/src/views/perms/AssetPermissionDetail.vue b/src/views/perms/AssetPermissionDetail.vue new file mode 100644 index 000000000..f8c7f4ea6 --- /dev/null +++ b/src/views/perms/AssetPermissionDetail.vue @@ -0,0 +1,275 @@ + + + + + + + + + + + + {{ detailCardActions }} + + + + + + + + + + + + + + + + + + + + + + + {{ userCardActions }} + + + + + + + + {{ userGroupCardActions }} + + + + + + + + + + + + + + + {{ assetCardActions }} + + + + + + + + {{ nodeCardActions }} + + + + + + + + {{ systemUserCardActions }} + + + + + + + + + + + diff --git a/src/views/perms/AssetPermissionList.vue b/src/views/perms/AssetPermissionList.vue index e334f4680..7eb3e548f 100644 --- a/src/views/perms/AssetPermissionList.vue +++ b/src/views/perms/AssetPermissionList.vue @@ -1,14 +1,18 @@ - + + + + + diff --git a/src/views/perms/RemoteAppPermissionDetail.vue b/src/views/perms/RemoteAppPermissionDetail.vue new file mode 100644 index 000000000..2772054ec --- /dev/null +++ b/src/views/perms/RemoteAppPermissionDetail.vue @@ -0,0 +1,258 @@ + + + + + + + + + + + + {{ detailCardActions }} + + + + + + + + + + + + + + + + + + + + + + + {{ userCardActions }} + + + + + + + + {{ userGroupCardActions }} + + + + + + + + + + + + + + + {{ remoteAppCardActions }} + + + + + + + + {{ systemUserCardActions }} + + + + + + + + + + +