perf: 各列表有些没内容的字段用‘-’展示

This commit is contained in:
陈劲松
2020-03-13 16:56:54 +08:00
parent de51ed0c79
commit dd689508d4
4 changed files with 13 additions and 6 deletions

View File

@@ -53,7 +53,7 @@
<span v-else-if="item.prop == 'status'">
<el-popover placement="right" width="50" trigger="hover" :content="(scope.row[item.prop] == '1'?$t('overall.available'):$t('overall.unavailable'))+'['+(scope.row.checkTime&&scope.row.checkTime!=''?(new Date(scope.row.checkTime).getHours()+':'+new Date(scope.row.checkTime).getMinutes()):'--')+']'">
<div slot="reference" style="width: 20px">
<div :class="{'active-icon green':scope.row[item.prop] == '1','active-icon red':scope.row[item.prop] == '0'}"></div>
<div :class="{'active-icon green':scope.row[item.prop] == '1','active-icon red':scope.row[item.prop] == '0' || scope.row[item.prop] == '-1' || scope.row[item.prop] == '-2'}"></div>
</div>
</el-popover>
<!-- {{scope.row[item.prop] == '1' ? $t('overall.available') : ''}}-->
@@ -66,7 +66,8 @@
&nbsp;
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'prom-del-'+scope.row.id"><i class="el-icon-delete"></i></span>
</div>
<span v-else>{{scope.row[item.prop]}}</span>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<template v-else>-</template>
</template>
</el-table-column>
<el-table-column width="28">