Browse Source

fix(dashboard): power status in DeviceCardRect

Casper Dai 2 years ago
parent
commit
a130e5b2d2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/dashboard/components/DeviceCardRect.vue

+ 2 - 2
src/views/dashboard/components/DeviceCardRect.vue

@@ -52,7 +52,7 @@
           class="el-icon-loading u-color--white"
         />
         <i
-          v-if="isOnline && hasStatus"
+          v-if="isOnline && hasPower && hasPowerRealStatus"
           class="o-device__status"
           :class="switchStatusClass"
         />
@@ -124,7 +124,7 @@ export default {
       return 'u-color--info light'
     },
     statusTip () {
-      return this.hasPowerRealStatus
+      return this.hasPower && this.hasPowerRealStatus
         ? this.powerStatus === Status.WARNING
           ? `电源状态异常,${this.switchStatus === Power.LOADING ? '检测' : '最后上报'}时间 ${this.timestamp}`
           : this.isPowerOpened