From 97d793471c1aa2c96bb1a69752a2a5e57a163648 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Mon, 23 Oct 2023 16:34:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=8A=A0=E8=BD=BDpolicies=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools.js | 3 ++- src/views/detectionsNew/Index.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index cc8d97bb..aad75a0a 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -1306,12 +1306,13 @@ export function numberWithCommas (num) { * @returns {string} */ export function switchStatus (status) { - switch (status) { + switch (status + '') { case '0': return 'detection.create.disabled' case '1': return 'detection.create.enabled' } + return null } /** diff --git a/src/views/detectionsNew/Index.vue b/src/views/detectionsNew/Index.vue index 40658277..4febd749 100644 --- a/src/views/detectionsNew/Index.vue +++ b/src/views/detectionsNew/Index.vue @@ -3,7 +3,7 @@
{{ $t('overall.policies') }} - {{ policyTotal }} {{ $t('detection.policesCreated') }} | {{ policyEnabledNum }} {{ $t('detection.policesEnabled') }} + {{ $t('detection.policesCreated', { total: policyTotal }) }} | {{ $t('detection.policesEnabled', { enabled: policyEnabledNum }) }}