Commit 73c7dab47f7370f946d239c436b7a1c0ce6f8c0f
Committed by
GitHub
Merge pull request #660 from shawn-tangsc/wvp-28181-2.0
前端首页控制台设备在线数显示bug修复
Showing
1 changed file
with
4 additions
and
8 deletions
web_src/src/components/console/ConsoleResource.vue
| 1 | <template > | 1 | <template > |
| 2 | <div id="consoleResource" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center"> | 2 | <div id="consoleResource" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center"> |
| 3 | <div style="width: 50%;height: 50%; float:left; "> | 3 | <div style="width: 50%;height: 50%; float:left; "> |
| 4 | - <el-progress :width="100" :stroke-width="8" type="circle" v-if="deviceInfo.total === 0" :percentage="0" style="margin-top: 20px; font-size: 18px"></el-progress> | ||
| 5 | - <el-progress :width="100" :stroke-width="8" type="circle" v-if="deviceInfo.total > 0" :percentage="(deviceInfo.online/deviceInfo.total*100).toFixed(2)" style="margin-top: 20px; font-size: 18px"></el-progress> | 4 | + <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> |
| 6 | <div class="resourceInfo"> | 5 | <div class="resourceInfo"> |
| 7 | 设备总数:{{deviceInfo.total}}<br/> | 6 | 设备总数:{{deviceInfo.total}}<br/> |
| 8 | 在线数:{{deviceInfo.online}} | 7 | 在线数:{{deviceInfo.online}} |
| 9 | </div> | 8 | </div> |
| 10 | </div> | 9 | </div> |
| 11 | <div style="width: 50%;height: 50%; float:left; "> | 10 | <div style="width: 50%;height: 50%; float:left; "> |
| 12 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="channelInfo.total === 0" :percentage="0" style="margin-top: 20px"></el-progress> | ||
| 13 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="channelInfo.total > 0" :percentage="(channelInfo.online/channelInfo.total*100).toFixed(2)" style="margin-top: 20px"></el-progress> | 11 | + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(channelInfo.online/channelInfo.total*100)" style="margin-top: 20px"></el-progress> |
| 14 | <div class="resourceInfo"> | 12 | <div class="resourceInfo"> |
| 15 | 通道总数:{{channelInfo.total}}<br/> | 13 | 通道总数:{{channelInfo.total}}<br/> |
| 16 | 在线数:{{channelInfo.online}} | 14 | 在线数:{{channelInfo.online}} |
| 17 | </div> | 15 | </div> |
| 18 | </div> | 16 | </div> |
| 19 | <div style="width: 50%;height: 50%; float:left; "> | 17 | <div style="width: 50%;height: 50%; float:left; "> |
| 20 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="pushInfo.total === 0" :percentage="0" style="margin-top: 20px"></el-progress> | ||
| 21 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="pushInfo.total > 0" :percentage="(pushInfo.online/pushInfo.total*100).toFixed(2)" style="margin-top: 20px"></el-progress> | 18 | + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(pushInfo.online/pushInfo.total*100)" style="margin-top: 20px"></el-progress> |
| 22 | <div class="resourceInfo"> | 19 | <div class="resourceInfo"> |
| 23 | 推流总数:{{pushInfo.total}}<br/> | 20 | 推流总数:{{pushInfo.total}}<br/> |
| 24 | 在线数:{{pushInfo.online}} | 21 | 在线数:{{pushInfo.online}} |
| 25 | </div> | 22 | </div> |
| 26 | </div> | 23 | </div> |
| 27 | <div style="width: 50%;height: 50%; float:left; "> | 24 | <div style="width: 50%;height: 50%; float:left; "> |
| 28 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="proxyInfo.total === 0" :percentage="0" style="margin-top: 20px"></el-progress> | ||
| 29 | - <el-progress :width="100" :stroke-width="10" type="circle" v-if="proxyInfo.total > 0" :percentage="(proxyInfo.online/proxyInfo.total*100).toFixed(2)" style="margin-top: 20px"></el-progress> | 25 | + <el-progress :width="100" :stroke-width="10" type="circle" :percentage="Math.floor(proxyInfo.online/proxyInfo.total*100)" style="margin-top: 20px"></el-progress> |
| 30 | <div class="resourceInfo"> | 26 | <div class="resourceInfo"> |
| 31 | 拉流代理总数:{{proxyInfo.total}}<br/> | 27 | 拉流代理总数:{{proxyInfo.total}}<br/> |
| 32 | 在线数:{{proxyInfo.online}} | 28 | 在线数:{{proxyInfo.online}} |