From 3ea1fc192a2950dca838d391df82a4edbf879ff0 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 16:37:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=BF=9B=E5=85=A5=E8=AF=A6=E6=83=85=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/audit/sessions.js | 2 ++ src/views/sessions/SessionList/OnlineList.vue | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/router/audit/sessions.js b/src/router/audit/sessions.js index f9cffc724..c84ae812f 100644 --- a/src/router/audit/sessions.js +++ b/src/router/audit/sessions.js @@ -8,6 +8,8 @@ export default [ component: empty, meta: { title: i18n.t('route.Sessions'), + app: 'terminal', + resource: 'session', permissions: ['terminal.view_session'] }, children: [ diff --git a/src/views/sessions/SessionList/OnlineList.vue b/src/views/sessions/SessionList/OnlineList.vue index 4a3266521..3554e322f 100644 --- a/src/views/sessions/SessionList/OnlineList.vue +++ b/src/views/sessions/SessionList/OnlineList.vue @@ -19,9 +19,7 @@ export default { name: 'terminate', title: this.$t('sessions.terminate'), type: 'danger', - can: ({ row, cellValue }) => { - return row['can_terminate'] && this.$hasPerm('terminal.terminate_session') - }, + can: ({ row }) => row['can_terminate'] && vm.$hasPerm('terminal.terminate_session'), callback: function({ reload, row }) { // 终断 session reload const data = [row.id]