fix: 1、搜索组件有关枚举的添加国际化;2、修复tag模式下切换key,value还保留上次选择的问题;3、修复切换语言环境,搜索参数包含其他语言导致不能识别转换的问题
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<div class="basic-info__item" v-if="detection.severity">
|
||||
<i class="cn-icon cn-icon-severity-level"></i>
|
||||
<span>{{$t('detection.list.security')}} : </span>
|
||||
<span>{{detection.severity || '-'}}</span>
|
||||
<span>{{changeI18nOfSeverity(detection.severity)}}</span>
|
||||
</div>
|
||||
<div class="basic-info__item" v-if="detection.eventSeverity">
|
||||
<i class="cn-icon cn-icon-severity-level"></i>
|
||||
@@ -116,7 +116,7 @@ import DetectionSecurityEventOverview from '@/views/detections/overview/Detectio
|
||||
import DetectionPerformanceEventIpOverview from '@/views/detections/overview/DetectionPerformanceEventIpOverview'
|
||||
import DetectionPerformanceEventAppOverview from '@/views/detections/overview/DetectionPerformanceEventAppOverview'
|
||||
import DetectionPerformanceEventDomainOverview from '@/views/detections/overview/DetectionPerformanceEventDomainOverview'
|
||||
import { overwriteUrl, urlParamsHandler } from '@/utils/tools'
|
||||
import { overwriteUrl, urlParamsHandler, changeI18nOfSeverity } from '@/utils/tools'
|
||||
export default {
|
||||
name: 'DetectionRow',
|
||||
components: {
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
unitConvert,
|
||||
getMillisecond,
|
||||
dateFormatByAppearance,
|
||||
changeI18nOfSeverity,
|
||||
/* 切换折叠状态 */
|
||||
switchCollapse () {
|
||||
this.isCollapse = !this.isCollapse
|
||||
|
||||
@@ -133,7 +133,7 @@ import {
|
||||
} from '@/views/detections/options/detectionOptions'
|
||||
import { api } from '@/utils/api'
|
||||
import axios from 'axios'
|
||||
import { urlParamsHandler, overwriteUrl, extensionEchartY, reverseSortBy } from '@/utils/tools'
|
||||
import { urlParamsHandler, overwriteUrl, extensionEchartY, reverseSortBy, changeI18nOfSeverity } from '@/utils/tools'
|
||||
import { useRoute } from 'vue-router'
|
||||
import Loading from '@/components/common/Loading'
|
||||
import ChartTabs from '@/components/common/ChartTabs'
|
||||
@@ -313,12 +313,12 @@ export default {
|
||||
if (!this.$_.isEmpty(data)) {
|
||||
const dataMap = new Map()
|
||||
data.forEach(item => {
|
||||
if (item.severity) {
|
||||
if (!dataMap.has(item.severity)) {
|
||||
if (changeI18nOfSeverity(item.severity)) {
|
||||
if (!dataMap.has(changeI18nOfSeverity(item.severity))) {
|
||||
const count = [[getMillisecond(parseFloat(item.statTime)), item.count]]
|
||||
dataMap.set(item.severity, count)
|
||||
dataMap.set(changeI18nOfSeverity(item.severity), count)
|
||||
} else {
|
||||
dataMap.get(item.severity).push([getMillisecond(parseFloat(item.statTime)), item.count])
|
||||
dataMap.get(changeI18nOfSeverity(item.severity)).push([getMillisecond(parseFloat(item.statTime)), item.count])
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -337,6 +337,7 @@ export default {
|
||||
})
|
||||
|
||||
eventSeverityTrendOption.series.forEach(serie => {
|
||||
serie.name = changeI18nOfSeverity(serie.name)
|
||||
const seriesData = []
|
||||
xData.forEach(item => {
|
||||
if (dataMap.has(serie.name)) {
|
||||
@@ -388,11 +389,11 @@ export default {
|
||||
}
|
||||
this.statisticsSeverityData = data
|
||||
if (!this.$_.isEmpty(data)) {
|
||||
this.filterData[this.pageType][1].data = data.map(r => ({ label: r.severity, value: r.severity, count: r.count }))
|
||||
this.filterData[this.pageType][1].data = data.map(r => ({ label: changeI18nOfSeverity(r.severity), value: r.severity, count: r.count }))
|
||||
this.isCheckFilterByQ(params, 1)
|
||||
const eventSeverityOption = this.$_.cloneDeep(pieForSeverity)
|
||||
eventSeverityOption.series[0].data = data.map(d => {
|
||||
return { value: d.count, name: d.severity, itemStyle: { color: getSeverityColor(d.severity) } }
|
||||
return { value: d.count, name: changeI18nOfSeverity(d.severity), itemStyle: { color: getSeverityColor(d.severity) } }
|
||||
})
|
||||
const chartDom = document.getElementById(`eventSeverityPie${this.pageType}`)
|
||||
let detectionChart = echarts.getInstanceByDom(chartDom)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<div class="row__content row__content--link" v-if="$_.get(detection, 'malware.reference')">
|
||||
{{ detection.malware.reference }}
|
||||
</div>
|
||||
<div class="row__content">-</div>
|
||||
<div class="row__content" v-else>-</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="detection.darkweb">
|
||||
@@ -315,7 +315,7 @@
|
||||
class="cn-icon cn-icon-alert-level"
|
||||
:style="`color:${eventSeverityColor[event.severity]}`"
|
||||
></i>
|
||||
<span>{{ event.severity }}</span>
|
||||
<span>{{ changeI18nOfSeverity(event.severity) }}</span>
|
||||
</div>
|
||||
<div class="timeline__security-type">{{ event.eventType }}</div>
|
||||
<div class="timeline__start-time">{{ dateFormatByAppearance(parseInt(event.startTime)) }}</div>
|
||||
@@ -360,6 +360,7 @@ import { getMillisecond, dateFormatByAppearance } from '@/utils/date-util'
|
||||
import { eventSeverityColor, unitTypes, countryNameIdMapping, riskLevelMapping, riskLevelColor, riskLevelColor1 } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import _ from 'lodash'
|
||||
import { changeI18nOfSeverity } from '@/utils/tools'
|
||||
export default {
|
||||
name: 'DetectionOverview',
|
||||
props: {
|
||||
@@ -440,6 +441,7 @@ export default {
|
||||
methods: {
|
||||
getMillisecond,
|
||||
dateFormatByAppearance,
|
||||
changeI18nOfSeverity,
|
||||
/** 初始化实体详情 */
|
||||
initEntityDetail () {
|
||||
// 调接口查询攻击者和受害者IP、Domain、APP的更多信息;
|
||||
|
||||
Reference in New Issue
Block a user