wenhongquan 9 месяцев назад
Родитель
Сommit
e4a49e047f

+ 3 - 3
src/components/HomeComponents/stationPie.vue

@@ -84,7 +84,7 @@
                 "
               >
                 <div class="typeClass">在线设备</div>
-                <div class="countClass" style="color: #22fe31">{{ totaldevice }}</div>
+                <div class="countClass" style="color: #22fe31">{{ onlinedevice }}</div>
               </div>
               <div style="margin-left: 6vw">
                 <img
@@ -306,7 +306,7 @@ const drawEchart = () => {
       // 图形标题(如果想要换行则使用ES6 `` 模板字符串)
       // 例如: `示例
       //   这里的文字会变为第二行(因为会保留格式)
-      text: `${((totaldevice.value / totaldevice.value) * 100).toFixed(0)}%`,
+      text: `${((onlinedevice.value / totaldevice.value) * 100).toFixed(0)}%`,
       subtext: "在线率",
       left: "center", //对齐方式居中
       top: "40%", //距离顶部
@@ -334,7 +334,7 @@ const drawEchart = () => {
           show: false,
         },
         data: [
-          { value: totaldevice.value - totaldevice.value, name: "不在线" },
+          { value: totaldevice.value - onlinedevice.value, name: "不在线" },
           { value: totaldevice.value, name: "在线" },
         ],
       },

+ 3 - 3
src/components/HomeStatics/stationPie.vue

@@ -38,7 +38,7 @@
           "
         >
           <div class="stationkeyClass">在线设备</div>
-          <div class="stationvalueClass">{{ totaldevice }}</div>
+          <div class="stationvalueClass">{{ onlinedevice }}</div>
           <div class="stationunitClass">台</div>
         </div>
         <img class="imageDiv" src="@/assets/images/home/Bg(7).png" />
@@ -119,7 +119,7 @@ const drawEchart = () => {
       // 图形标题(如果想要换行则使用ES6 `` 模板字符串)
       // 例如: `示例
       //   这里的文字会变为第二行(因为会保留格式)
-      text: `${((totaldevice.value / totaldevice.value) * 100).toFixed(0)}%`,
+      text: `${((onlinedevice.value / totaldevice.value) * 100).toFixed(0)}%`,
       subtext: "在线率",
       left: "center", //对齐方式居中
       top: "35%", //距离顶部
@@ -147,7 +147,7 @@ const drawEchart = () => {
           show: false,
         },
         data: [
-          { value: totaldevice.value - totaldevice.value, name: "不在线" },
+          { value: totaldevice.value - onlinedevice.value, name: "不在线" },
           { value: totaldevice.value, name: "在线" },
         ],
       },