fix:修改project asset列表的状态的显示 以及endpoint Detail的state的显示

This commit is contained in:
zhangyu
2021-01-10 13:31:02 +08:00
parent 5625a38443
commit fa74e35889
2 changed files with 8 additions and 2 deletions

View File

@@ -42,7 +42,11 @@
</div>
<div class="content-item-value item-tip" :id="`value-${index}-${i}`">
<span v-if="key == 'state'">{{value == 1 ? $t('asset.inStock') : $t('asset.outStock')}}</span>
<span v-if="key == 'state'">
<span v-if="value==1">{{ $t('asset.inStock')}}</span>
<span v-if="value==2">{{ $t('asset.notInStock')}}</span>
<span v-if="value==3">{{ $t('asset.suspended')}}</span>
</span>
<span v-else-if="key == 'alert'" class="as-button" :class="{'success': value <= 0, 'danger': value > 0}">{{value + ' ' + $t('overall.active')}}</span>
<div v-else-if="key == 'tags'" class="no-overflow" style="padding-bottom: 5px;">
<template v-if="value && value.length > 0">

View File

@@ -67,7 +67,9 @@
</div>
<template v-if="item.prop=='SN'">{{scope.row.sn}}</template>
<div v-if="item.prop=='state'">
<span>{{scope.row.state==1 ? $t('asset.inStock') : $t('asset.notInStock')}}</span>
<span v-if="scope.row.state==1">{{ $t('asset.inStock')}}</span>
<span v-if="scope.row.state==2">{{ $t('asset.notInStock')}}</span>
<span v-if="scope.row.state==3">{{ $t('asset.suspended')}}</span>
</div>
<div v-if="item.prop == 'pingStatus'">
<el-popover