diff --git a/project/sass/apps/AppHealthReport/components/Detail.vue b/project/sass/apps/AppHealthReport/components/Detail.vue index 2bd8aad2..d62d6e63 100644 --- a/project/sass/apps/AppHealthReport/components/Detail.vue +++ b/project/sass/apps/AppHealthReport/components/Detail.vue @@ -75,7 +75,18 @@ tableData: [], colConfigs: [ {prop: 'createTime', label: '上报日期', align: 'center', dateFormart: 'YYYY-MM-DD'}, - {prop: 'status', label: '健康状态', align: 'center', formart: v => v === '0' ? '异常' : '正常' } + { + prop: 'status', + label: '健康状态', + align: 'center', + render (h, {row}) { + return h('span',{ + style: { + color: row.status === '0' ? '#F46' : '#2EA222' + } + }, row.status === '0' ? '异常' : '正常') + } + } ] } }, diff --git a/project/sass/apps/AppHealthReport/components/List.vue b/project/sass/apps/AppHealthReport/components/List.vue index 750ed4f3..5ab6dc24 100644 --- a/project/sass/apps/AppHealthReport/components/List.vue +++ b/project/sass/apps/AppHealthReport/components/List.vue @@ -61,7 +61,18 @@ { prop: 'girdNames', align: 'center', label: '网格' }, { prop: 'clockCount', align: 'center', label: '打卡次数' }, { prop: 'lastReportTime', align: 'center', label: '最近打卡时间' }, - { prop: 'status', align: 'center', label: '健康状态', formart: v => v === '0' ? '异常' : '正常' } + { + prop: 'status', + label: '健康状态', + align: 'center', + render (h, {row}) { + return h('span',{ + style: { + color: row.status === '0' ? '#F46' : '#2EA222' + } + }, row.status === '0' ? '异常' : '正常') + } + } ], tableData: [], total: 0,