From b6525a61821ef89849baf39def4d86419e894050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Thu, 10 Aug 2023 10:59:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E5=9C=A8tools?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9static-data=E7=9A=84=E5=BC=95=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E5=9B=BD=E9=99=85=E5=8C=96=E5=A4=B1?= =?UTF-8?q?=E6=95=88=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 | 67 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index 3968e22f..4b44db08 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -6,7 +6,72 @@ import { getIso36112JsonData, getDictList } from '@/utils/api' import { format } from 'echarts' import router from '@/router' import indexedDBUtils from '@/indexedDB' -import { columnList } from '@/utils/static-data' + +// columnList从'@/utils/static-data'引入的话,会导致国际化i18n出错 +const columnList = [ + { + name: 'ip', + type: 'string', + label: 'IP', + doc: { + constraints: { + type: 'ip', + operator_functions: '=,in' + } + } + }, + { + name: 'fqdn', + type: 'string', + label: 'Domain', + doc: { + constraints: { + type: 'domain', + operator_functions: '=,in' + } + } + }, + { + name: 'app_name', + type: 'string', + label: 'App', + doc: { + constraints: { + operator_functions: '=,in' + } + } + }, + { + name: 'region', + type: 'string', + label: 'City', + doc: { + constraints: { + operator_functions: '=,in' + } + } + }, + { + name: 'country', + type: 'string', + label: 'Country', + doc: { + constraints: { + operator_functions: '=,in' + } + } + }, + { + name: 'asn', + type: 'string', + label: 'ASN', + doc: { + constraints: { + operator_functions: '=,in' + } + } + } +] export const tableSort = { // 是否需要排序