This commit is contained in:
yanran200730
2022-02-10 17:04:39 +08:00
parent cb6cf2e19f
commit 2af7808ccc
2 changed files with 24 additions and 2 deletions

View File

@@ -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' ? '异常' : '正常')
}
}
]
}
},

View File

@@ -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,