From f223aad70516049577c261d5e6cd876abed07cb4 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 18 十一月 2022 18:39:44 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' --- web_src/src/components/console/ConsoleResource.vue | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/web_src/src/components/console/ConsoleResource.vue b/web_src/src/components/console/ConsoleResource.vue new file mode 100644 index 0000000..bc307b9 --- /dev/null +++ b/web_src/src/components/console/ConsoleResource.vue @@ -0,0 +1,86 @@ +<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="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="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="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="Math.floor(proxyInfo.online/proxyInfo.total*100)" style="margin-top: 20px"></el-progress> + <div class="resourceInfo"> + 鎷夋祦浠g悊鎬绘暟:{{proxyInfo.total}}<br/> + 鍦ㄧ嚎鏁�:{{proxyInfo.online}} + </div> + </div> + </div> +</template> + +<script> + +export default { + name: 'consoleResource', + data() { + return { + deviceInfo: { + total: 0, + online: 0 + }, + channelInfo: { + total: 0, + online: 0 + }, + pushInfo: { + total: 0, + online: 0 + }, + proxyInfo: { + total: 0, + online: 0 + }, + }; + }, + created() { + + + }, + mounted() { + }, + destroyed() { + }, + methods: { + setData: function(data) { + this.deviceInfo = data.device; + this.channelInfo = data.channel; + this.pushInfo = data.push; + this.proxyInfo = data.proxy; + } + } +}; +</script> + +<style> +.resourceInfo{ + width: 100%; + text-align: center; + font-size: 12px +} +.el-progress__text { + font-size: 18px !important; +} +</style> -- Gitblit v1.8.0