From 06fe4e84b430e7048507f880a393c689446fed64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Wed, 30 Aug 2023 14:54:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E4=BD=93=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=B5=81=E9=87=8Fchart=E4=BD=8D=E7=BD=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BB=A5=E5=8F=8A=E5=AF=B9=E6=90=9C=E7=B4=A2=E6=97=B6?= =?UTF-8?q?and=E6=93=8D=E4=BD=9C=E7=AC=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../css/components/views/entityExplorer/entityList/row.scss | 1 + src/utils/tools.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/assets/css/components/views/entityExplorer/entityList/row.scss b/src/assets/css/components/views/entityExplorer/entityList/row.scss index 5fe6fe1a..752868ed 100644 --- a/src/assets/css/components/views/entityExplorer/entityList/row.scss +++ b/src/assets/css/components/views/entityExplorer/entityList/row.scss @@ -139,6 +139,7 @@ height: 19px; width: 60px; margin-left: 4px; + margin-top: -6px; } } diff --git a/src/utils/tools.js b/src/utils/tools.js index 0542c303..363afd91 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -1491,7 +1491,8 @@ export const handleEntityTypeByStr = (str) => { columnList.forEach(item => { arr.push(item.label.toLowerCase()) }) - let newStr = JSON.parse(JSON.stringify(str.toLowerCase())) + // 因为手动输入时可能会输入and,所以将操作符的AND转换为and,统一处理 + let newStr = str.replace(/ AND /g, ' and ') // 将str中的IP、Domain等替换为数组arr中的元素 for (let i = 0; i < arr.length; i++) { newStr = newStr.replace(new RegExp(arr[i], 'g'), arr[i])