wenhongquan 1 год назад
Родитель
Сommit
9c75b5f16e

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

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

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

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

+ 2 - 2
vite.config.ts

@@ -26,8 +26,8 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          // target: 'http://localhost:8080',
-          target: 'http://47.104.97.60/api',
+          target: 'http://localhost:8080',
+          // target: 'http://47.104.97.60/api',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')