feat:修改asset endpoint的显示

This commit is contained in:
zhangyu
2020-10-15 17:12:55 +08:00
parent e80994e9d4
commit d90c62380d
3 changed files with 19 additions and 2 deletions

View File

@@ -524,7 +524,9 @@ const cn = {
notInStock: "出库",
principal: "负责人",
tel: "电话",
featureTitle: "属性"
featureTitle: "属性",
endpointUpNum:'代表正常的数量',
endpointNum:'代表总的数量',
},
config: {
config: "设置",

View File

@@ -437,6 +437,8 @@ const en = {
ping:'Ping',
},
featureTitle:'Attribute',
endpointUpNum:'It\'s a normal number',
endpointNum:'Represents the total quantity',
editAssetTab:{
title:'New asset',//'新增资产'
sn:'SN',//SN

View File

@@ -90,7 +90,13 @@
</el-popover>
</div>
<template v-if="item.prop=='Module'">
<span class="link" @click="showEndpoint(scope.row)">{{scope.row.endpointNum}}</span>
<el-tooltip placement="right" effect="light">
<div slot="content">
{{scope.row.endpointNum-scope.row.endpointDownNum}}&nbsp;{{$t('asset.endpointUpNum')}}<br/>
{{scope.row.endpointNum}}&nbsp;{{$t('asset.endpointNum')}}
</div>
<span class="link" @click="showEndpoint(scope.row)" style="padding: 2px 8px">{{scope.row.endpointNum-scope.row.endpointDownNum}}/{{scope.row.endpointNum}}</span>
</el-tooltip>
</template>
<template v-if="item.prop=='Alert'">
<el-tooltip :content="scope.row.alertNum+' '+$t('overall.active')" placement="top" effect="light" :disabled=" scope.row.alertNum < 99">
@@ -474,6 +480,13 @@
return 'success';
}
}
if(e.column.label == 'Module' || e.column.label == this.$t("asset.tableTitle.modules")){
if (e.row.endpointDownNum > 0) {
return 'danger';
} else {
return 'success';
}
}
return '';
},
edit(asset) {