NEZ-1740 fix:告警列 最近告警柱形图 根据 告警数量显示不同高度
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -91,6 +91,7 @@ export default {
|
||||
}, {
|
||||
label: this.$t('config.dc.alert'),
|
||||
prop: 'alertNum',
|
||||
minWidth: 170,
|
||||
show: true
|
||||
}, {
|
||||
label: this.$t('asset.tel'),
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
label: this.$t('project.endpoint.alerts'),
|
||||
prop: 'alerts',
|
||||
show: true,
|
||||
minWidth: 150,
|
||||
minWidth: 180,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
label: this.$t('project.module.alerts'),
|
||||
prop: 'alertNum',
|
||||
show: true,
|
||||
width: 200,
|
||||
minWidth: 170,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -173,6 +173,7 @@ export default {
|
||||
}, {
|
||||
label: this.$t('config.dc.alert'),
|
||||
prop: 'alertNum',
|
||||
minWidth: 170,
|
||||
show: true
|
||||
}, {
|
||||
label: this.$t('asset.tel'),
|
||||
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
label: this.$t('project.endpoint.alerts'),
|
||||
prop: 'alerts',
|
||||
show: true,
|
||||
minWidth: 150,
|
||||
minWidth: 180,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
label: this.$t('project.module.alerts'),
|
||||
prop: 'alertNum',
|
||||
show: true,
|
||||
width: 200,
|
||||
width: 170,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
label: this.$t('project.endpoint.alerts'),
|
||||
prop: 'alertNum',
|
||||
show: true,
|
||||
width: 120,
|
||||
width: 170,
|
||||
sortable: 'custom'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user