perf: terminallog红绿提示统一
This commit is contained in:
@@ -722,13 +722,13 @@ li{
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: $content-right-background-color;
|
background-color: $content-right-background-color;
|
||||||
}
|
}
|
||||||
.nz-table td.has-message .cell>span {
|
.nz-table td.danger .cell>span {
|
||||||
background-color: #ff6666;
|
background-color: #ff6666;
|
||||||
color: white;
|
color: white;
|
||||||
padding:2px 5px;
|
padding:2px 5px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.nz-table td.has-no-message .cell>span {
|
.nz-table td.success .cell>span {
|
||||||
background-color: #1bd383;
|
background-color: #1bd383;
|
||||||
color: white;
|
color: white;
|
||||||
padding:2px 5px;
|
padding:2px 5px;
|
||||||
|
|||||||
@@ -360,9 +360,9 @@
|
|||||||
messageStyle(e) {
|
messageStyle(e) {
|
||||||
if (e.column.label == this.$t("alert.message")) {
|
if (e.column.label == this.$t("alert.message")) {
|
||||||
if (e.row.alertNum > 0) {
|
if (e.row.alertNum > 0) {
|
||||||
return 'has-message';
|
return 'danger';
|
||||||
} else {
|
} else {
|
||||||
return 'has-no-message';
|
return 'success';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -690,9 +690,9 @@
|
|||||||
messageStyle(e) {
|
messageStyle(e) {
|
||||||
if (e.column.label == this.$t("asset.tableTitle.alerts")) {
|
if (e.column.label == this.$t("asset.tableTitle.alerts")) {
|
||||||
if (e.row.alertNum > 0) {
|
if (e.row.alertNum > 0) {
|
||||||
return 'has-message';
|
return 'danger';
|
||||||
} else {
|
} else {
|
||||||
return 'has-no-message';
|
return 'success';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
:height="$tableHeight.normal"
|
:height="$tableHeight.normal"
|
||||||
v-scrollBar:el-table="'large'"
|
v-scrollBar:el-table="'large'"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
:cell-class-name="messageStyle"
|
||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:resizable="false"
|
:resizable="false"
|
||||||
@@ -67,15 +68,9 @@
|
|||||||
{{scope.row[item.prop] == 'zh' ? '中文' : ''}}
|
{{scope.row[item.prop] == 'zh' ? '中文' : ''}}
|
||||||
{{scope.row[item.prop] == 'ru' ? 'русский' : ''}}
|
{{scope.row[item.prop] == 'ru' ? 'русский' : ''}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop == 'status'">
|
<template v-else-if="item.prop == 'status'">
|
||||||
<el-tag v-if="scope.row.status==='1'"
|
<span>{{scope.row.status==='1' ? $t("config.terminallog.success") : $t("config.terminallog.fail")}}</span>
|
||||||
type="success"
|
</template>
|
||||||
disable-transitions>{{$t("config.terminallog.success")}}</el-tag>
|
|
||||||
<el-tag v-else
|
|
||||||
type="danger"
|
|
||||||
disable-transitions>
|
|
||||||
{{$t("config.terminallog.fail")}}</el-tag>
|
|
||||||
</span>
|
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -301,6 +296,17 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
messageStyle(e) {
|
||||||
|
if (e.column.label == this.$t('config.terminallog.status')) {
|
||||||
|
console.info(e.row)
|
||||||
|
if (e.row.status == '1') {
|
||||||
|
return 'success';
|
||||||
|
} else {
|
||||||
|
return 'danger';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
toEditReceiver: function (item) {
|
toEditReceiver: function (item) {
|
||||||
if (!item.isEdit) {
|
if (!item.isEdit) {
|
||||||
//如果不在编辑状态,那么其他项如果有改动,则还原改动,最后开始编辑
|
//如果不在编辑状态,那么其他项如果有改动,则还原改动,最后开始编辑
|
||||||
|
|||||||
Reference in New Issue
Block a user