lizhuang 5 years ago
parent
commit
961c57d101
3 changed files with 29 additions and 12 deletions
  1. 2 2
      src/views/strategy/animationBox.vue
  2. 0 4
      src/views/strategy/bomBox.vue
  3. 27 6
      src/views/strategy/index.vue

+ 2 - 2
src/views/strategy/animationBox.vue

@@ -51,7 +51,7 @@
       </div>
     </div>
 
-    <bom-box :class="['draw', {'open': showDraw}]" :data="data" @close="showDraw = false"></bom-box>
+    <bom-box v-if="Object.keys(chillerCommandQ).length>0" :class="['draw', {'open': showDraw}]" :data="chillerCommandQ" @close="showDraw = false"></bom-box>
   </div>
 </template>
 
@@ -73,7 +73,7 @@ export default {
     };
   },
   components: { bomBox },
-  props: ["data", "chillerHourList"],
+  props: ["data", "chillerHourList",'chillerCommandQ'],
   methods: {
     getData() {
       this.chillerHourList.forEach(el => {

+ 0 - 4
src/views/strategy/bomBox.vue

@@ -84,10 +84,6 @@ export default {
         document.getElementById("circleEcharts")
       );
       let option = {
-        // tooltip: {
-        //   trigger: "item",
-        //   formatter: "{a} <br/>{b}: {c} ({d}%)"
-        // },
         color:['#E1F2FF','#0091FF'],
         series: [
           {

+ 27 - 6
src/views/strategy/index.vue

@@ -3,11 +3,11 @@
   <div>
     <Head :headText="headText"></Head>
     <div class="nav-right">
-      <img class="nav-icon" v-if="navText" src="@/assets/shape.png" alt />
+      <img class="nav-icon" v-if="chillerIsNotExecutedCount " src="@/assets/shape.png" alt />
       <span
         class="nav-text1"
-        v-if="navText"
-      >今日已收到 {{chillerCommand.chillerCount || 0}} 条策略,其中有 {{chillerCommand.hillerIsNotExecutedCount || 0}} 条未执行</span>
+        v-if="chillerIsNotExecutedCount"
+      >今日已收到 {{chillerCount}} 条策略,其中有 {{chillerIsNotExecutedCount}} 条未执行</span>
       <span class="nav-text" v-else>今天已收到 {{chillerCommand.chillerCount || 0}} 条策略</span>
       <span class="nav-look MicrYaHei" @click="showTodayStrategy = true">查看</span>
     </div>
@@ -24,8 +24,8 @@
           <div
             class="strate-left-info"
           >开启时间:{{chillerCommand.freshAirEqOpenTime?(chillerCommand.freshAirEqOpenTime.slice(0,2)+":"+chillerCommand.freshAirEqOpenTime.slice(2,4)):"--"}} - {{chillerCommand.freshAirEqCloseTime?(chillerCommand.freshAirEqCloseTime.slice(0,2)+":"+chillerCommand.freshAirEqCloseTime.slice(2,4)):"--"}}</div>
-          <div class="strate-left-info">新风机组:开启</div>
-          <div class="strate-left-info">组合式空调机组:全新风</div>
+          <div class="strate-left-info">新风机组:{{chillerCommand.freshAirHandlingUnit}}</div>
+          <div class="strate-left-info">组合式空调机组:{{chillerCommand.airHandlingUnit}}</div>
         </div>
       </div>
       <div class="starte-right">
@@ -35,6 +35,7 @@
           v-if="chillerHourList.length>0"
           :data="chillerCommand"
           :chillerHourList="chillerHourList"
+          :chillerCommandQ='chillerCommandQ'
         ></animation-box>
       </div>
     </div>
@@ -58,10 +59,15 @@ export default {
       showTodayStrategy: false,
       tableData: [],
       chillerCommand: {},
+      chillerCommandQ:{},
+      chillerCount:0,
+      chillerIsNotExecutedCount :0,
       today: "",
       now: "",
       chillerOrg: {},
-      chillerHourList: []
+      chillerOrgQ:{},
+      chillerHourList: [],
+      chillerHourListQ:[],
     };
   },
   components: {
@@ -103,6 +109,20 @@ export default {
         }
       };
       queryCommand(params).then(res => {
+        this.chillerOrgQ = res.chillerOrg;
+        this.chillerCommandQ = res.chillerCommand;
+        this.chillerHourListQ = res.chillerHourList;
+      });
+    },
+    getChiller() {
+      let params = {
+        getParams: {
+        }
+      };
+      queryCommand(params).then(res => {
+        console.log(res)
+        this.chillerCount = res.chillerCount
+        this.chillerIsNotExecutedCount  = res.chillerIsNotExecutedCount?res.chillerIsNotExecutedCount:0
         this.chillerOrg = res.chillerOrg;
         this.chillerCommand = res.chillerCommand;
         this.chillerHourList = res.chillerHourList;
@@ -130,6 +150,7 @@ export default {
     //    vm.getData()
     // },1500)
     this.getQuickData();
+    this.getChiller()
     this.getData();
   }
 };