perf: alert-rule和asset的告警信息数量样式调整
This commit is contained in:
@@ -722,11 +722,17 @@ li{
|
||||
padding: 0;
|
||||
background-color: $content-right-background-color;
|
||||
}
|
||||
.nz-table td.has-message .cell {
|
||||
background-color: #f8d7da;
|
||||
.nz-table td.has-message .cell>span {
|
||||
background-color: #ff6666;
|
||||
color: white;
|
||||
padding:2px 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.nz-table td.has-no-message .cell {
|
||||
background-color: #d4edda;
|
||||
.nz-table td.has-no-message .cell>span {
|
||||
background-color: #1bd383;
|
||||
color: white;
|
||||
padding:2px 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.nz-table th {
|
||||
padding: 0;
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
this.showSubList = true;
|
||||
},
|
||||
messageStyle(e) {
|
||||
if (e.columnIndex == 6) {
|
||||
if (e.column.label == this.$t("alert.message")) {
|
||||
if (e.row.alertNum > 0) {
|
||||
return 'has-message';
|
||||
} else {
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
v-loading="loading"
|
||||
tooltip-effect="light"
|
||||
ref="assetTable"
|
||||
:cell-class-name="messageStyle"
|
||||
>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
@@ -686,6 +687,16 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
messageStyle(e) {
|
||||
if (e.column.label == this.$t("asset.tableTitle.alerts")) {
|
||||
if (e.row.alertNum > 0) {
|
||||
return 'has-message';
|
||||
} else {
|
||||
return 'has-no-message';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
editData(data, item) {
|
||||
if (data === 'idc') {
|
||||
item.name = this.addIdcData.popName
|
||||
|
||||
Reference in New Issue
Block a user