NEZ-1740 fix:告警列 最近告警柱形图 根据 告警数量显示不同高度

This commit is contained in:
zhangyu
2022-03-28 10:42:31 +08:00
parent 252f03f59f
commit 5c4b263809
15 changed files with 19 additions and 18 deletions

View File

@@ -47,18 +47,17 @@ export default {
methods: {
showPriority (daysData) {
let style = {}
// let sum = 0
let sum = 0
this.severityDataWeight.forEach(item => {
// sum += Number(daysData[item.name])
sum += Number(daysData[item.name])
if (daysData[item.name] && !style.background) {
style = {
background: item.color
}
}
})
// const height = sum > 0 ? (sum < 10 ? 20 : 24) : 16
// console.log(sum, height)
// style.height = (height + 'px')
const width = sum > 0 ? (sum <= 10 ? 12 : 14) : 10
style.width = (width + 'px')
return style
},
tooltipHover (item, flag, e) {

View File

@@ -249,7 +249,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
width: 150
width: 180
},
/* {
label: this.$t("project.endpoint.lastUpdate"),

View File

@@ -134,7 +134,7 @@ export default {
label: this.$t('alert.alert'),
prop: 'alertNum',
show: true,
width: 150,
minWidth: 170,
sortable: 'custom'
}, {
label: this.$t('alert.config.receiver'),

View File

@@ -119,7 +119,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
minWidth: 140,
minWidth: 170,
sortable: 'custom'
}, {
label: this.$t('asset.endpointNum2'),

View File

@@ -91,6 +91,7 @@ export default {
}, {
label: this.$t('config.dc.alert'),
prop: 'alertNum',
minWidth: 170,
show: true
}, {
label: this.$t('asset.tel'),

View File

@@ -101,7 +101,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
minWidth: 150,
minWidth: 180,
sortable: 'custom'
},
{

View File

@@ -89,7 +89,7 @@ export default {
label: this.$t('project.module.alerts'),
prop: 'alertNum',
show: true,
width: 200,
minWidth: 170,
sortable: 'custom'
},
{

View File

@@ -114,7 +114,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
width: 140
width: 180
}, {
label: this.$t('asset.endpointNum2'),
prop: 'endpointNum',

View File

@@ -228,7 +228,7 @@ export default {
label: this.$t('alert.alert'),
prop: 'alertNum',
show: true,
width: 150,
minWidth: 170,
sortable: 'custom'
}, {
label: this.$t('alert.config.receiver'),

View File

@@ -48,7 +48,7 @@
<span style="cursor: pointer" @click="$emit('showBottomBox', 'alertMessageTab', scope.row)">
<i :class="scope.row.alertNum ? 'red' : 'green'" class="nz-icon nz-icon-overview-alert vertical-align-top;" @mouseenter="tooltipHover(scope.row,true, $event)" @mouseleave="tooltipHover(scope.row,false, $event)"></i>
<div v-if="scope.row.alertNumtooltipShow" class="alert-days-info-tooltip" :style="{left: scope.row.left + 'px',top:scope.row.top + 'px'}">
<div class="tooltip-title">Alert message (active)</div>
<div class="tooltip-title">{{$t('project.topology.alert')}}({{$t('asset.pingActive')}})</div>
<div class="severity-info" style='justify-content: space-between'>
<div class="severity-name">{{$t('overall.result.total')}}</div>
<div class="severity-value">{{scope.row.alertNum}}</div>
@@ -253,7 +253,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
minWidth: 140,
minWidth: 170,
sortable: 'custom'
}, {
label: this.$t('asset.endpointNum2'),

View File

@@ -173,6 +173,7 @@ export default {
}, {
label: this.$t('config.dc.alert'),
prop: 'alertNum',
minWidth: 170,
show: true
}, {
label: this.$t('asset.tel'),

View File

@@ -261,7 +261,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
minWidth: 150,
minWidth: 180,
sortable: 'custom'
},
{

View File

@@ -147,7 +147,7 @@ export default {
label: this.$t('project.module.alerts'),
prop: 'alertNum',
show: true,
width: 200,
width: 170,
sortable: 'custom'
},
{

View File

@@ -148,7 +148,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alertNum',
show: true,
width: 120,
width: 170,
sortable: 'custom'
}
]

View File

@@ -137,7 +137,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
width: 150
width: 180
},
// {
// label: this.$t("project.endpoint.lastUpdate"),