fix: 修复收集用户-任务列表权限问题

This commit is contained in:
“huailei000”
2022-03-15 11:37:38 +08:00
committed by Jiangjie.Bai
parent c755f9460f
commit 9703c335ff
3 changed files with 12 additions and 12 deletions

View File

@@ -74,22 +74,14 @@ export default [
activeMenu: '/accounts/gathered-user'
}
},
{
path: 'tasks',
component: () => import('@/views/accounts/GatheredUser/TaskList'),
name: 'GatherUserTaskList',
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskList')
}
},
{
path: 'tasks/:id',
component: () => import('@/views/accounts/GatheredUser/TaskDetail/index'),
name: 'GatherUserTaskDetail',
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskDetail')
title: i18n.t('xpack.GatherUser.GatherUserTaskDetail'),
permissions: ['xpack.view_gatherusertask']
}
},
{
@@ -98,7 +90,8 @@ export default [
name: 'GatherUserTaskCreate',
hidden: true,
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskCreate')
title: i18n.t('xpack.GatherUser.GatherUserTaskCreate'),
permissions: ['xpack.add_gatherusertask']
}
},
{
@@ -109,6 +102,7 @@ export default [
meta: {
title: i18n.t('xpack.GatherUser.GatherUserTaskUpdate'),
action: 'update',
permissions: ['xpack.change_gatherusertask'],
activeMenu: '/accounts/gathered-user'
}
}

View File

@@ -23,6 +23,10 @@ export default {
TaskDetail: {},
config: {
activeMenu: 'Detail',
actions: {
canUpdate: this.$hasPerm('xpack.change_gatherusertask'),
canDelete: this.$hasPerm('xpack.delete_gatherusertask')
},
submenu: [
{
title: this.$t('xpack.GatherUser.GatherUserTaskDetail'),
@@ -30,7 +34,8 @@ export default {
},
{
title: this.$t('xpack.GatherUser.GatherUserTaskExecutionList'),
name: 'TaskExecutionList'
name: 'TaskExecutionList',
hidden: !this.$hasPerm('xpack.view_gatherusertaskexecution')
}
],
hasRightSide: true

View File

@@ -59,6 +59,7 @@ export default {
formatter: DetailFormatter,
formatterArgs: {
route: 'GatherUserTaskDetail',
can: vm.$hasPerm('xpack.view_gatherusertaskexecution'),
routeQuery: {
activeTab: 'TaskExecutionList'
}