Procházet zdrojové kódy

fix(dashboard): total number of active devices

Casper Dai před 2 roky
rodič
revize
e668359e01

+ 3 - 2
src/views/dashboard/Dashboard.vue

@@ -273,6 +273,7 @@ export default {
           monitor.online = onLineTotal
           monitor.offline = offLineTotal
           monitor.inactive = deactivatedTotal + notConnectedTotal
+          monitor.deactivated = deactivatedTotal
           monitor.loaded = true
           this.getDeviesByMonitor()
         },
@@ -301,7 +302,7 @@ export default {
         activate: 1,
         org: this.group.path
       }
-      const { total, online, offline, inactive } = this.monitor
+      const { total, online, offline, deactivated } = this.monitor
       if (this.active === 'online') {
         query.pageSize = online
         query.onlineStatus = 1
@@ -309,7 +310,7 @@ export default {
         query.pageSize = offline
         query.onlineStatus = 2
       } else {
-        query.pageSize = total - inactive
+        query.pageSize = total - deactivated
       }
       if (query.pageSize === 0) {
         this.deviceOptions = { list: [], loaded: true }

+ 3 - 2
src/views/dashboard/TenantDashboard.vue

@@ -340,6 +340,7 @@ export default {
           monitor.online = onLineTotal
           monitor.offline = offLineTotal
           monitor.inactive = deactivatedTotal + notConnectedTotal
+          monitor.deactivated = deactivatedTotal
           monitor.loaded = true
           if (this.isAllDevice) {
             this.getDeviesByMonitor()
@@ -370,7 +371,7 @@ export default {
         activate: 1,
         org: this.group.path
       }
-      const { total, online, offline, inactive } = this.monitor
+      const { total, online, offline, deactivated } = this.monitor
       if (this.active === 'online') {
         query.pageSize = online
         query.onlineStatus = 1
@@ -378,7 +379,7 @@ export default {
         query.pageSize = offline
         query.onlineStatus = 2
       } else {
-        query.pageSize = total - inactive
+        query.pageSize = total - deactivated
       }
       if (query.pageSize === 0) {
         this.deviceOptions = { list: [], loaded: true }