From 67c42a19bb39416b6bb196dc1efb390f3145a203 Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Mon, 11 Dec 2023 10:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=BB=84=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/securityGroup.vue | 11 +++++++++-- .../src/views/system/securityRule.vue | 19 +++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/neutrino-proxy-admin/src/views/system/securityGroup.vue b/neutrino-proxy-admin/src/views/system/securityGroup.vue index 0430080c..aba126b9 100644 --- a/neutrino-proxy-admin/src/views/system/securityGroup.vue +++ b/neutrino-proxy-admin/src/views/system/securityGroup.vue @@ -35,7 +35,7 @@ @@ -265,7 +265,14 @@ import LinkPopover from '../../components/Link/linkPopover' passTypeName(type) { const statusMap = { 1: '允许', - 2: '拒绝' + 0: '拒绝' + } + return statusMap[type] + }, + passTypeFilter(type) { + const statusMap = { + 1: 'success', + 0: 'danger' } return statusMap[type] }, diff --git a/neutrino-proxy-admin/src/views/system/securityRule.vue b/neutrino-proxy-admin/src/views/system/securityRule.vue index 02e14026..dbc77901 100644 --- a/neutrino-proxy-admin/src/views/system/securityRule.vue +++ b/neutrino-proxy-admin/src/views/system/securityRule.vue @@ -46,7 +46,7 @@ @@ -217,7 +217,14 @@ import LinkPopover from '../../components/Link/linkPopover' passTypeName(type) { const statusMap = { 1: '允许', - 2: '拒绝' + 0: '拒绝' + } + return statusMap[type] + }, + passTypeFilter(type) { + const statusMap = { + 1: 'success', + 0: 'danger' } return statusMap[type] }, @@ -331,8 +338,8 @@ import LinkPopover from '../../components/Link/linkPopover' name: '', description: '', rule: '', - passType: this.group.defaultPassType == 'allow' ? 0 : 1, - passTypeTooltip: `安全组已设置默认${(this.group.defaultPassType == 'allow' ? '允许' : '拒绝')}`, + passType: this.group.defaultPassType == 1 ? 0 : 1, + passTypeTooltip: `安全组已设置默认${(this.group.defaultPassType == 1 ? '允许' : '拒绝')}`, priority: 1 } }, @@ -365,8 +372,8 @@ import LinkPopover from '../../components/Link/linkPopover' }, handleUpdate(row) { this.temp = Object.assign({}, row) // copy obj - this.temp.passType = row.passType == 'allow' ? 1 : 0 - this.temp.passTypeTooltip = `安全组已设置默认${(this.group.defaultPassType == 'allow' ? '允许' : '拒绝')}`, + this.temp.passType = row.passType + this.temp.passTypeTooltip = `安全组已设置默认${(this.group.defaultPassType == 1 ? '允许' : '拒绝')}`, this.temp.timestamp = new Date(this.temp.timestamp) this.dialogStatus = 'update' this.dialogFormVisible = true