diff --git a/src/views/backOfficeSystem/dataMonitor/components/DataTableCard.vue b/src/views/backOfficeSystem/dataMonitor/components/DataTableCard.vue index 6d9b293..aac81ac 100644 --- a/src/views/backOfficeSystem/dataMonitor/components/DataTableCard.vue +++ b/src/views/backOfficeSystem/dataMonitor/components/DataTableCard.vue @@ -36,7 +36,7 @@ @@ -113,14 +113,14 @@ const fetchData = async () => { } const res = await getMonitorList(params) || {} // 通道是否在线:0 不在线 、1 在线 - const onlineStatus = { - 0: '不在线', - 1: '在线' - } + // const onlineStatus = { + // '0': '离线', + // '1': '在线' + // } // 处理数据,添加在线状态 data.value = (res || []).map(item => ({ ...item, - online: onlineStatus[item.sfzx] + online: item.sfzx == '1' ? 1 : 0 })) } catch (error) { ElMessage.error(`获取${props.title}数据失败`) @@ -137,7 +137,7 @@ const total = ref(0) // 获取表格行类名 const getRowClassName = ({ row }) => { - return row.online == 1 ? 'online-row' : 'offline-row' + return row.online == '1' ? 'online-row' : 'offline-row' } // 刷新处理