From 27cd241bee121befeb6972beeda67ff104688545 Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Wed, 15 Mar 2023 17:09:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E5=92=8C=E4=B8=8A=E4=BC=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/DashBoard/index.vue | 18 ++++++++++++------ src/views/device/Product/Save/index.vue | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/device/DashBoard/index.vue b/src/views/device/DashBoard/index.vue index 09e1584a..122e5f4e 100644 --- a/src/views/device/DashBoard/index.vue +++ b/src/views/device/DashBoard/index.vue @@ -22,12 +22,8 @@ > - { if (menuStore.hasMenu('device/Product')) { productCount().then((res) => { @@ -174,6 +173,9 @@ const getProductData = () => { } }; getProductData(); +/** + * 获取设备数量 + */ const getDeviceData = () => { if (menuStore.hasMenu('device/Instance')) { deviceCount().then((res) => { @@ -197,6 +199,9 @@ const getDeviceData = () => { } }; getDeviceData(); +/** + * 获取在线数量 + */ const getOnline = () => { dashboard([ { @@ -222,7 +227,8 @@ const getOnline = () => { const onlineYdata = y; onlineYdata.reverse(); setOnlineChartOpition(x, onlineYdata); - deviceFooter.value[0].value = y?.[1]; + onlineFooter.value[0].value = y?.[1]; + console.log(res.result); } }); }; diff --git a/src/views/device/Product/Save/index.vue b/src/views/device/Product/Save/index.vue index 1fbf0a1d..69b5d9af 100644 --- a/src/views/device/Product/Save/index.vue +++ b/src/views/device/Product/Save/index.vue @@ -23,7 +23,7 @@ - +