fix: 1、搜索组件有关枚举的添加国际化;2、修复tag模式下切换key,value还保留上次选择的问题;3、修复切换语言环境,搜索参数包含其他语言导致不能识别转换的问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import i18n from '@/i18n'
|
||||
import _ from 'lodash'
|
||||
import { storageKey, iso36112, topDomain, echartsFontSize, dbGeoDataTableName, networkTable, dbDrilldownTableConfig, ZH, EN } from '@/utils/constants'
|
||||
import { storageKey, iso36112, topDomain, echartsFontSize, dbGeoDataTableName, networkTable, dbDrilldownTableConfig, ZH, EN, securityLevel } from '@/utils/constants'
|
||||
import { getIso36112JsonData, getDictList } from '@/utils/api'
|
||||
import { format } from 'echarts'
|
||||
import router from '@/router'
|
||||
@@ -1447,3 +1447,19 @@ export const changeTimeByDate = (date) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换严重程度severity的国际化值
|
||||
*/
|
||||
export const changeI18nOfSeverity = (severity) => {
|
||||
if (severity) {
|
||||
const obj = securityLevel.find(d => d.value === severity)
|
||||
if (obj) {
|
||||
return i18n.global.t(obj.label)
|
||||
} else {
|
||||
return severity
|
||||
}
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user