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