From a82b831b8b2b96dfa5791808f1207500e16697cf Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 04 一月 2023 10:39:40 +0800 Subject: [PATCH] 优化设备状态保持,自动记录心跳间隔,三次心跳失败则设备离线,不在使用设备有效期字段作为唯一判断标准,提高容错能力和稳定性。 --- web_src/src/components/console/ConsoleResource.vue | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web_src/src/components/console/ConsoleResource.vue b/web_src/src/components/console/ConsoleResource.vue index c76b270..bc307b9 100644 --- a/web_src/src/components/console/ConsoleResource.vue +++ b/web_src/src/components/console/ConsoleResource.vue @@ -1,28 +1,28 @@ <template > <div id="consoleResource" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center"> <div style="width: 50%;height: 50%; float:left; "> - <el-progress :width="100" :stroke-width="8" type="circle" :percentage="deviceInfo.online/deviceInfo.total*100" style="margin-top: 20px; font-size: 18px"></el-progress> + <el-progress :width="100" :stroke-width="8" type="circle" :percentage="Math.floor(deviceInfo.online/deviceInfo.total*100)" style="margin-top: 20px; font-size: 18px"></el-progress> <div class="resourceInfo"> 璁惧鎬绘暟:{{deviceInfo.total}}<br/> 鍦ㄧ嚎鏁�:{{deviceInfo.online}} </div> </div> <div style="width: 50%;height: 50%; float:left; "> - <el-progress :width="100" :stroke-width="10" type="circle" :percentage="channelInfo.online/channelInfo.total*100" style="margin-top: 20px"></el-progress> + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(channelInfo.online/channelInfo.total*100)" style="margin-top: 20px"></el-progress> <div class="resourceInfo"> 閫氶亾鎬绘暟:{{channelInfo.total}}<br/> 鍦ㄧ嚎鏁�:{{channelInfo.online}} </div> </div> <div style="width: 50%;height: 50%; float:left; "> - <el-progress :width="100" :stroke-width="10" type="circle" :percentage="pushInfo.online/pushInfo.total*100" style="margin-top: 20px"></el-progress> + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(pushInfo.online/pushInfo.total*100)" style="margin-top: 20px"></el-progress> <div class="resourceInfo"> 鎺ㄦ祦鎬绘暟:{{pushInfo.total}}<br/> 鍦ㄧ嚎鏁�:{{pushInfo.online}} </div> </div> <div style="width: 50%;height: 50%; float:left; "> - <el-progress :width="100" :stroke-width="10" type="circle" :percentage="proxyInfo.online/proxyInfo.total*100" style="margin-top: 20px"></el-progress> + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(proxyInfo.online/proxyInfo.total*100)" style="margin-top: 20px"></el-progress> <div class="resourceInfo"> 鎷夋祦浠g悊鎬绘暟:{{proxyInfo.total}}<br/> 鍦ㄧ嚎鏁�:{{proxyInfo.online}} -- Gitblit v1.8.0