|
|
@ -2,13 +2,27 @@ |
|
|
|
<el-card class="pb-4" shadow="hover"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="text-sm text-gray-400">设备总数</div> |
|
|
|
<div class="text-gray-500 text-4xl mt-1 mb-3">{{ count.total }}</div> |
|
|
|
<div class="line-wrap bg-blue-50"> |
|
|
|
<div :style="{ width: `${countPercent.total}` }" class="line bg-blue-300"></div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="text-sm text-gray-400">正常数量</div> |
|
|
|
<div class="text-gray-500 text-4xl mt-1 mb-3">{{ count.normal }}</div> |
|
|
|
<div class="line-wrap bg-lime-50"> |
|
|
|
<div :style="{ width: `${countPercent.normal}` }" class="line bg-lime-300"></div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" class="mt-10"> |
|
|
|
<div class="text-sm text-gray-400">在线数量</div> |
|
|
|
<div class="text-gray-500 text-4xl mt-1 mb-3">{{ count.online }}</div> |
|
|
|
<div class="line-wrap bg-green-50"> |
|
|
|
<div :style="{ width: `${countPercent.online}` }" class="line bg-green-300"></div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" class="mt-10"> |
|
|
|
<div class="text-sm text-gray-400">离线数量</div> |
|
|
|
<div class="text-gray-500 text-4xl mt-1 mb-3">{{ count.offline }}</div> |
|
|
|
<div class="line-wrap bg-gray-50"> |
|
|
@ -45,6 +59,8 @@ const countPercent = computed(() => { |
|
|
|
offline: computeWidth(count.value.offline), |
|
|
|
warning: computeWidth(count.value.warning), |
|
|
|
fault: computeWidth(count.value.fault), |
|
|
|
total: computeWidth(count.value.total), |
|
|
|
normal: computeWidth(count.value.normal), |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|