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