Commit 73c7dab47f7370f946d239c436b7a1c0ce6f8c0f

Authored by 648540858
Committed by GitHub
2 parents f4ee7271 d0402544

Merge pull request #660 from shawn-tangsc/wvp-28181-2.0

前端首页控制台设备在线数显示bug修复
web_src/src/components/console/ConsoleResource.vue
1 1 <template >
2 2 <div id="consoleResource" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center">
3 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 5 <div class="resourceInfo">
7 6 设备总数:{{deviceInfo.total}}<br/>
8 7 在线数:{{deviceInfo.online}}
9 8 </div>
10 9 </div>
11 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 12 <div class="resourceInfo">
15 13 通道总数:{{channelInfo.total}}<br/>
16 14 在线数:{{channelInfo.online}}
17 15 </div>
18 16 </div>
19 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 19 <div class="resourceInfo">
23 20 推流总数:{{pushInfo.total}}<br/>
24 21 在线数:{{pushInfo.online}}
25 22 </div>
26 23 </div>
27 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 26 <div class="resourceInfo">
31 27 拉流代理总数:{{proxyInfo.total}}<br/>
32 28 在线数:{{proxyInfo.online}}
... ...