zhulizhen 5 years ago
parent
commit
7ca3bb02f8
2 changed files with 10 additions and 1 deletions
  1. 9 0
      src/views/strategy/animationBox.vue
  2. 1 1
      src/views/strategy/index.vue

+ 9 - 0
src/views/strategy/animationBox.vue

@@ -75,6 +75,15 @@ export default {
     },
     components: { bomBox },
     props: ['data', 'chillerHourList', 'chillerCommandQ'],
+    watch: {
+        chillerHourList(newVal, oldVal) {
+            if(newVal) {
+                this.getData()
+                this.drawLeft()
+                this.drawRight()
+            }
+        }
+    },
     methods: {
         getData() {
             this.chillerHourList.forEach(el => {

+ 1 - 1
src/views/strategy/index.vue

@@ -32,11 +32,11 @@
         <p class="strate-right-title">当前状态</p>
         <water-unit :data="chillerOrg " :type="1"></water-unit>
         <animation-box
-          v-if="chillerHourList.length>0"
           :data="chillerCommand"
           :chillerHourList="chillerHourList"
           :chillerCommandQ="chillerCommand"
         ></animation-box>
+       
       </div>
     </div>
     <el-dialog title="提示" :visible.sync="showTodayStrategy" width="1260px">