Browse Source

fix: home

fenghao 1 year ago
parent
commit
7faf7701f1
2 changed files with 10 additions and 2 deletions
  1. 8 2
      src/utils/adapter/monitor.js
  2. 2 0
      src/views/dashboard/components/DeviceGroupTile.vue

+ 8 - 2
src/utils/adapter/monitor.js

@@ -375,10 +375,16 @@ function flush () {
   }
 }
 
-function startTask () {
+function startTask (ID) {
   fetching = true
   console.log('monitor task', queue.size)
-  const ids = [...queue]
+  let ids = ID || [...queue]
+  if (!ids.length) { return }
+  if (ids.length > 100) {
+    const temp = ids.slice(100)
+    ids = ids.slice(0, 100)
+    startTask(temp)
+  }
   getMultiCardStatusReport(ids, { background: true, custom: true }).then(
     async ({ data }) => {
       const map = {}

+ 2 - 0
src/views/dashboard/components/DeviceGroupTile.vue

@@ -62,9 +62,11 @@ export default {
   watch: {
     path () {
       this.onResetGroupOptions()
+      this.refreshGroups(true)
     },
     total () {
       this.onResetGroupOptions()
+      this.refreshGroups(true)
     },
     status () {
       this.maxLength = 100