Browse Source

执行率的判断

zhulizhen 5 years ago
parent
commit
d7fe201764
2 changed files with 86 additions and 76 deletions
  1. 77 74
      src/views/evaluate/evRateTitle.vue
  2. 9 2
      src/views/evaluate/evTwoLevelMenu.vue

+ 77 - 74
src/views/evaluate/evRateTitle.vue

@@ -1,85 +1,88 @@
 <template>
-  <div class="count-bottom-title">
-    <span v-if="tab==1" class="count-bottom-text">
-      <span class="span1"></span>
-      <span class="span2 Micbold">室内温度满足率</span>
-      <span class="span3">{{rate||'--'}}%</span>
-    </span>
-    <span v-if="tab==2" class="count-bottom-text">
-      <span class="span1"></span>
-      <span class="span2 Micbold">节能率</span>
-      <span class="span4">{{rate}}%</span>
-      <span class="span5">准确率</span>
-      <span class="span6">{{accuracy}}%</span>
-    </span>
-    <span v-if="tab==3" class="count-bottom-text">
-      <span class="span1"></span>
-      <span class="span2 Micbold">是否按策略执行</span>
-      <img class="span7" src="../../assets/finish.png" alt />
-    </span>
-  </div>
+    <div class='count-bottom-title'>
+        <span v-if='tab==1' class='count-bottom-text'>
+            <span class='span1'></span>
+            <span class='span2 Micbold'>室内温度满足率</span>
+            <span class='span3'>{{rate||'--'}}%</span>
+        </span>
+        <span v-if='tab==2' class='count-bottom-text'>
+            <span class='span1'></span>
+            <span class='span2 Micbold'>节能率</span>
+            <span class='span4'>{{rate}}%</span>
+            <span class='span5'>准确率</span>
+            <span class='span6'>{{accuracy}}%</span>
+        </span>
+        <span v-if='tab==3' class='count-bottom-text'>
+            <span class='span1'></span>
+            <span class='span2 Micbold'>是否按策略执行</span>
+            <img v-if='chillerExecuteRateReal>=75' class='span7' src='../../assets/finish.png' alt />
+            <img v-else-if='chillerExecuteRate>=75' class='span7' src='../../assets/processing.png' alt />
+            <img v-else class='span7' src='../../assets/wrong.png' alt />
+        </span>
+    </div>
 </template>
 <script>
 export default {
-  data() {
-    return {};
-  },
-  mounted() {},
-  props: ["tab", "rate", "accuracy"]
-};
+    data() {
+        return {}
+    },
+    props: ['chillerExecuteRate', 'chillerExecuteRateReal'],
+    mounted() {},
+    props: ['tab', 'rate', 'accuracy']
+}
 </script>
 <style lang="scss" scoped>
 .count-bottom-title {
-  display: flex;
-  .count-bottom-text {
-    height: 64px;
-    background: rgba(248, 249, 250, 1);
-    border-radius: 4px;
-    border: 1px solid rgba(238, 238, 238, 1);
     display: flex;
-    align-items: center;
-    padding-right: 24px;
-    .span1 {
-      width: 4px;
-      height: 64px;
-      background: rgba(0, 145, 255, 1);
-      border-radius: 4px 0 0 4px;
-      margin-right: 20px;
-    }
-    .span2 {
-      font-size: 20px;
-      color: rgba(31, 36, 41, 1);
-      margin-right: 12px;
-    }
-    .span3 {
-      font-size: 24px;
-      font-family: Persagy-Bold, Persagy;
-      font-weight: bold;
-      color: rgba(31, 36, 41, 1);
-    }
-    .span4 {
-      font-size: 24px;
-      font-family: Persagy-Bold, Persagy;
-      font-weight: bold;
-      color: rgba(31, 36, 41, 1);
-      margin-right: 32px;
-    }
-    .span5 {
-      font-size: 16px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: rgba(100, 108, 115, 1);
-      margin-right: 8px;
-    }
-    .span6 {
-      font-size: 16px;
-      font-family: Persagy;
-      color: rgba(100, 108, 115, 1);
-    }
-    .span7 {
-      width: 20px;
-      height: 20px;
+    .count-bottom-text {
+        height: 64px;
+        background: rgba(248, 249, 250, 1);
+        border-radius: 4px;
+        border: 1px solid rgba(238, 238, 238, 1);
+        display: flex;
+        align-items: center;
+        padding-right: 24px;
+        .span1 {
+            width: 4px;
+            height: 64px;
+            background: rgba(0, 145, 255, 1);
+            border-radius: 4px 0 0 4px;
+            margin-right: 20px;
+        }
+        .span2 {
+            font-size: 20px;
+            color: rgba(31, 36, 41, 1);
+            margin-right: 12px;
+        }
+        .span3 {
+            font-size: 24px;
+            font-family: Persagy-Bold, Persagy;
+            font-weight: bold;
+            color: rgba(31, 36, 41, 1);
+        }
+        .span4 {
+            font-size: 24px;
+            font-family: Persagy-Bold, Persagy;
+            font-weight: bold;
+            color: rgba(31, 36, 41, 1);
+            margin-right: 32px;
+        }
+        .span5 {
+            font-size: 16px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: rgba(100, 108, 115, 1);
+            margin-right: 8px;
+        }
+        .span6 {
+            font-size: 16px;
+            font-family: Persagy;
+            color: rgba(100, 108, 115, 1);
+        }
+        .span7 {
+            width: 20px;
+            height: 20px;
+        }
     }
-  }
 }
 </style>

+ 9 - 2
src/views/evaluate/evTwoLevelMenu.vue

@@ -54,7 +54,7 @@
                         </div>
                     </div>
                     <div v-show='num == 3'>
-                        <ev-rate-title :tab='3'></ev-rate-title>
+                        <ev-rate-title :chillerExecuteRateReal='chillerExecuteRateReal' :chillerExecuteRate='chillerExecuteRate' :tab='3'></ev-rate-title>
                         <ev-card v-if='cardList.length>0' :cardList='cardList' :date='date'></ev-card>
                     </div>
                 </div>
@@ -93,7 +93,9 @@ export default {
             cardList: [], //执行率@
             dateVal: '', //@
             stackArr: [],
-            accuracy: ''
+            accuracy: '',
+            chillerExecuteRate: '',
+            chillerExecuteRateReal: ''
         }
     },
     components: {
@@ -206,6 +208,7 @@ export default {
                 this.querychillerMethod(date)
             } else if (this.num == 3) {
                 this.queryimplement(date)
+                this.querychillerMethod(date)
             }
         },
         querychillerMethod(date) {
@@ -218,10 +221,14 @@ export default {
                 }
             }
             querychiller(params).then(res => {
+                console.log(res)
                 // 节能率
                 this.energySavingRate = res.content[0].energySavingRate ? res.content[0].energySavingRate : '--'
                 // 准确率
                 this.accuracy = res.content[0].accuracy ? res.content[0].accuracy : '--'
+                //执行率
+                this.chillerExecuteRateReal = res.content[0].chillerExecuteRateReal || ''
+                this.chillerExecuteRate = res.content[0].chillerExecuteRate || '--'
             })
         },
         // 点击tab @