@@ -90,8 +93,9 @@
{{ $t('asset.notInStock')}}
{{ $t('asset.suspended')}}
-
-
+ {{scope.row.pingRtt?scope.row.pingRtt+'ms':''}}
+
-
+
+ {{scope.row.endpointDownNum}}/{{scope.row.endpointSuspendedNum}}/{{scope.row.endpointNum}}
+
+
-
+ = 99, $event)" @mouseleave="hideTableTooltip">
{{(scope.row.alertNum < 99 ? scope.row.alertNum : 99)}}
+
{{' ' + $t('overall.active')}}
-
+
+
{{scope.row.idc.name}}
@@ -203,6 +221,8 @@
import exportXLSX from "../../common/exportXLSX";
import endpointStatusPop from "./endpointStatusPop";
import deleteButton from "../../common/deleteButton";
+ import {showTableTooltip, hideTableTooltip} from "../../common/js/tools";
+
export default {
name: "asset",
components:{
@@ -318,58 +338,66 @@
prop: 'ID',
show: false,
allowed:true,
- // width: 110
+ width: 110
}, {
label: this.$t("asset.tableTitle.assetType"),
prop: 'assetType',
show: true,
+ width: 110
}, {
label: this.$t("asset.tableTitle.device"),
prop: 'SN',
show: true,
- width: 130
}, {
label: this.$t("asset.tableTitle.assetState"),
prop: 'state',
show: true,
+ width: 110
}, {
label:this.$t('asset.tableTitle.assetPing'),
prop:'pingStatus',
show:true,
+ width: 110
},{
label: this.$t("asset.tableTitle.modules"),
prop: 'Module',
show: true,
- width: 105
+ width: 120
}, {
label: this.$t("asset.tableTitle.alerts"),
prop: 'Alert',
show: true,
- width: 100
+ width: 120
}, {
label: this.$t("asset.tableTitle.dataCenter"),
prop: 'dataCenter',
show: true,
+ width: 110
}, {
label: this.$t("asset.tableTitle.cabinet"),
prop: 'cabinet',
show: true,
+ width: 110
}, {
label: this.$t("asset.tableTitle.model"),
prop: 'model',
show: true,
+ width: 110
}, {
label: this.$t("asset.tableTitle.vendor"),
prop: 'vendor',
show: true,
+ width: 110
}, {
label: this.$t("asset.tableTitle.procurementDate"),
prop: 'purchaseDate',
show: false,
+ width: 110
}, {
label: this.$t("asset.tableTitle.principal"),
prop: 'principal',
show: false,
+ width: 110
}, {
label: this.$t("asset.tableTitle.principalTel"),
prop: 'tel',
@@ -379,7 +407,6 @@
label: this.$t('config.account.option'),
prop: 'option',
show: true,
- width: 150,
fixed:'right'
}],
tableData: [],
@@ -435,7 +462,7 @@
if (n.length === 0 && this.pageObj.pageNo > 1) {
this.pageNo(this.pageObj.pageNo-1);
}
-
+
if(!this.delFlag){ // 不是删除时回到顶部
this.$refs.assetTable.bodyWrapper.scrollTop = 0
}else{
@@ -447,6 +474,7 @@
}
},
methods: {
+ showTableTooltip, hideTableTooltip,
fullScreen() {
let vm = this;
this.$bottomBoxWindow.fullScreen(vm);
@@ -529,8 +557,26 @@
});
});
},
- messageStyle(e) {
- if (e.column.label == 'Alerts' || e.column.label == this.$t("asset.tableTitle.alerts")) {
+ messageStyle(title, row) {
+ if (title.label == 'Alerts' || title.label == this.$t("asset.tableTitle.alerts")) {
+ if (row.alertNum > 0) {
+ return 'danger';
+ } else {
+ return 'success';
+ }
+ }
+ if(title.label == 'Module' || title.label == this.$t("asset.tableTitle.modules")){
+ if (row.state == 3) {
+ return 'suspended';
+ } else {
+ if (row.endpointDownNum > 0) {
+ return 'danger';
+ } else {
+ return 'success';
+ }
+ }
+ }
+ /*if (e.column.label == 'Alerts' || e.column.label == this.$t("asset.tableTitle.alerts")) {
if (e.row.alertNum > 0) {
return 'danger';
} else {
@@ -547,7 +593,7 @@
return 'success';
}
}
- }
+ }*/
return '';
},
edit(asset) {
@@ -861,7 +907,7 @@
bus.$off('alert-message-change');
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
- };
+ }
}
}