From 9703c335ff235c15c5c9f9b94af41c5129fa2c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 15 Mar 2022 11:37:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B6=E9=9B=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7-=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/console/accounts.js | 16 +++++----------- .../accounts/GatheredUser/TaskDetail/index.vue | 7 ++++++- src/views/accounts/GatheredUser/TaskList.vue | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/router/console/accounts.js b/src/router/console/accounts.js index beda26024..103692308 100644 --- a/src/router/console/accounts.js +++ b/src/router/console/accounts.js @@ -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' } } diff --git a/src/views/accounts/GatheredUser/TaskDetail/index.vue b/src/views/accounts/GatheredUser/TaskDetail/index.vue index f8b2fe1fe..7bcbeb2ea 100644 --- a/src/views/accounts/GatheredUser/TaskDetail/index.vue +++ b/src/views/accounts/GatheredUser/TaskDetail/index.vue @@ -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 diff --git a/src/views/accounts/GatheredUser/TaskList.vue b/src/views/accounts/GatheredUser/TaskList.vue index deae5c27b..9f7f1da30 100644 --- a/src/views/accounts/GatheredUser/TaskList.vue +++ b/src/views/accounts/GatheredUser/TaskList.vue @@ -59,6 +59,7 @@ export default { formatter: DetailFormatter, formatterArgs: { route: 'GatherUserTaskDetail', + can: vm.$hasPerm('xpack.view_gatherusertaskexecution'), routeQuery: { activeTab: 'TaskExecutionList' }