Guoxiaohuan 5 anos atrás
pai
commit
27b9b828ca

+ 4 - 1
src/api/evaluate/evaluate.js

@@ -19,4 +19,7 @@ export function querySpace({ postParams }) {
 // 查询空间温度-室内温度页面最下面的图
 export function queryHisdataQueryPeriodData({ postParams }) {
     return httputils.postJson(`/duoduo-service/object-service/object/data/hisdataQueryPeriodData`, postParams)
-}
+}
+export function queryTdbDay(date, { getParams }) {
+    return httputils.getJson(`/duoduo-service/transfer/chiller/command/tdbDayQuery?projectId=${store.state.projectId}&date=${date}`, getParams)
+}

+ 2 - 2
src/views/evaluate/evIndoorTemperature.vue

@@ -268,7 +268,7 @@ export default {
       display: inline-block;
       height: 6px;
       width: 16px;
-      background: rgba(0, 145, 255, 1);
+      background: #00d6b9;
       border-radius: 3px;
       vertical-align: middle;
       margin-right: 3px;
@@ -278,7 +278,7 @@ export default {
       display: inline-block;
       height: 6px;
       width: 16px;
-      background: #00d6b9;
+      background: rgba(0, 145, 255, 1);
       border-radius: 3px;
       vertical-align: middle;
       margin-right: 3px;

+ 88 - 101
src/views/evaluate/evTwoLevelMenu.vue

@@ -11,9 +11,9 @@
         <ul class="MicrYaHei">
           <div style="min-width:300px;"></div>
           <div>
-            <li :class="{current: num == 1}" @click="change(1)">室内温度</li>
-            <li :class="{current: num==2}" @click="change(2)">节能率</li>
-            <li :class="{current: num==3}" @click="change(3)">执行率</li>
+            <li :class="{current: num == 1}" @click="changeNum(1)">室内温度</li>
+            <li :class="{current: num==2}" @click="changeNum(2)">节能率</li>
+            <li :class="{current: num==3}" @click="changeNum(3)">执行率</li>
           </div>
           <div class="count-top-right">
             <date-temp v-if="date" @pickerVal="pickerVal" :date="date"></date-temp>
@@ -76,7 +76,8 @@ import {
   energyDayQuery,
   querychiller,
   querySpace,
-  queryHisdataQueryPeriodData
+  queryHisdataQueryPeriodData,
+  queryTdbDay
 } from "@/api/evaluate/evaluate.js";
 import { queryChillerExecuteInfo } from "@/api/appeal/appeal.js";
 
@@ -84,23 +85,19 @@ export default {
   data() {
     return {
       headText: "运行评价",
-      num: 1,
+      num: 1, //tab @
+      date: "", // 传过来的日期@
+      type: "", //传过来的日期 @
       value2: true,
-      current: {},
-      similarDay: {},
-      samples: [],
-      maxArr: [],
-      chillerExecuteRate: "", //略执行率
-      isExecutedNum: "", //已执行数量
-      allReceivedNum: "", //共收到数量
-      dataList: [], //室内温度满足率
-      energySaving: "", //节能量
-      tindoorOverrunDegree: "", //超限程度
-      tindoorFillRate: "", //室内温度满足率
+      current: {}, //本日概况 @
+      similarDay: {}, //相似日概况 @
+      samples: [], //相似日列表 @
+      maxArr: [], // @
+      dataList: [], //室内温度满足率@
+      tindoorFillRate: "", //室内温度满足率@
       energySavingRate: "", //节能率
-      cardList: [],
-      date: "",
-      dateVal: ""
+      cardList: [], //执行率@
+      dateVal: "" //@
     };
   },
   components: {
@@ -114,127 +111,115 @@ export default {
     DateTemp
   },
   mounted() {
-    this.querychillerMethod();
-    this.querySpaceMethod();
-    this.queryHisdataQueryPeriodDataMethod();
-    this.start(this.dateVal);
-    this.queryRunDataQury(this.dateVal);
-    this.type = this.$route.query.type;
-    this.date = this.$route.query.name;
-    if (this.type == 1) {
-      this.num = 1;
-      // querychillerMethod();
-    } else if (this.type == 2) {
-      this.num = 2;
-      this.queryEnergyDayQuery(this.dateVal);
-    } else if (this.type == 3) {
-      this.num = 3;
-      this.queryimplement(this.dateVal);
-    }
+    this.init();
   },
   methods: {
-    queryHisdataQueryPeriodDataMethod() {
-      let params = {
-        postParams: {
-          projectId: this.$store.state.projectId,
-          funcids: ["Tdb"], //固定值
-          period: 60, //固定值
-          startTime: "20200225000000", //开始时间 yyyyMMddH24miss
-          endTime: "20200225235959", //结束时间 yyyyMMddH24miss
-          objectId: "Sp4413030001388657a6b77e4605880b85767e4eaddd" //空间id
-        }
-      };
-      queryHisdataQueryPeriodData(params).then(res => {
-        console.log(res);
-      });
+    init() {
+      this.type = this.$route.query.type;
+      this.date = this.$route.query.name;
+      if (this.type) {
+        this.num = this.type;
+      }
+      if (this.date) {
+        this.date = this.formatterStr3(
+          new Date().getFullYear() + this.formatterStr2(this.date)
+        );
+      }
+      if (this.num && this.date) {
+        this.changeNumMethod();
+      }
     },
-    // 查询一天的运行评价-室内温度页面左上角温度满足率
-    querySpaceMethod() {
-      let params = {
-        postParams: {
-          criteria: {
-            projectId: this.$store.sate.projectId,
-            // isChillerMonitor: 1 //是否冷站智控监测 1:是 0:不是
-          }
-        }
-      };
-      querySpace(params).then(res => {
-        console.log(res);
-      });
+    // @
+    formatterStr2(str) {
+      if (str) {
+        return str.substring(0, 2) + "" + str.substring(3, 5);
+      }
     },
-    // 室内温度位置详情-室内温度页面中间的空间列表
-    querychillerMethod() {
+    // 室内温度table @
+    queryTdbDayMethod(date) {
       this.dataList = [];
-      let params = {
-        postParams: {
-          criteria: {
-            projectId: this.$store.state.projectId,
-            date: "20200226"
-          }
+      let arr1 = [],
+        arr2 = [];
+      queryTdbDay(date, {}).then(res => {
+        this.tindoorFillRate = res.tindoorFillRate;
+        console.log("室内温度满足率", res);
+        let content = res.content;
+        if (content.length > 0) {
+          content.forEach(item => {
+            arr1.push(item.spaceDayRpt.floorLocalName);
+          });
+          arr1 = Array.from(new Set(arr1));
+          arr1.forEach(el => {
+            let obj = {
+              floor: el,
+              floorArr: []
+            };
+            arr2.push(obj);
+          });
+          content.forEach(item2 => {
+            arr2.forEach(item => {
+              if (item2.spaceDayRpt.floorLocalName == item.floor) {
+                item.floorArr.push(item2.spaceDayRpt);
+              }
+            });
+          });
         }
-      };
-      querychiller(params).then(res => {
-        this.tindoorFillRate = res.content[0].tindoorFillRate || 0; //室内温度满足率 = res.content ? res.content : [];
+        this.dataList = arr2;
         console.log(this.dataList);
       });
     },
+    // @
+    formatterStr3(str) {
+      if (str) {
+        return str.substring(0, 4) + str.substring(4, 6) + str.substring(6, 8);
+      }
+    },
+    // 执行率@
     queryimplement(date) {
       let params = {
         postParams: {
           criteria: {
             date: date
-            // "id":15582 //指令id
           }
         }
       };
       queryChillerExecuteInfo(params).then(res => {
         this.cardList = res.data ? res.data : [];
+        console.log("执行率", res);
       });
     },
-    change: function(index) {
-      this.num = index;
-      this.start(this.dateVal);
-    },
-    start(date) {
+    // 根据tab @
+    changeNumMethod() {
       if (this.num == 1) {
-        // this.querychillerMethod();
-        // this.queryRunDataQury(date);
+        this.queryTdbDayMethod(this.date);
       } else if (this.num == 2) {
-        this.queryEnergyDayQuery(date);
+        this.queryEnergyDayQuery(this.date);
       } else if (this.num == 3) {
-        this.queryimplement(date);
+        this.queryimplement(this.date);
       }
     },
+    // 点击tab @
+    changeNum(index) {
+      this.num = index;
+      this.changeNumMethod();
+    },
+    // @
     formatterStr(str) {
       if (str) {
         return str.substring(0, 4) + str.substring(5, 7) + str.substring(8, 10);
       }
     },
+    // @
     pickerVal(val) {
       if (val) {
         this.dateVal = this.formatterStr(val);
-        this.start(this.dateVal);
       }
     },
+    // @
     jumpIndex() {
       this.$router.push("/evaluate");
     },
-    queryRunDataQury(date) {
-      this.runDataQuryArr = [];
-      runDataQury(date, {}).then(res => {
-        if (res.result == "success") {
-          this.chillerExecuteRate = res.chillerExecuteRate; //略执行率
-          this.isExecutedNum = res.isExecutedNum; //已执行数量
-          this.allReceivedNum = res.allReceivedNum; //共收到数量
-          this.dataList = res.dataList ? res.dataList : []; //室内温度满足率
-          this.energySaving = res.energySaving; //节能量
-          this.tindoorOverrunDegree = res.tindoorOverrunDegree; //超限程度
-
-          this.energySavingRate = res.energySavingRate; //节能率
-        }
-      });
-    },
-    // 节能率
+    // 节能率@
     queryEnergyDayQuery(date) {
       energyDayQuery(date, {}).then(res => {
         if (res.result == "success") {
@@ -263,6 +248,7 @@ export default {
         }
       });
     },
+    // @
     sortMethod(arr) {
       if (arr instanceof Array) {
         return arr.sort(function(num1, num2) {
@@ -272,6 +258,7 @@ export default {
         return 1;
       }
     },
+    // @
     maxMethod(arr) {
       if (arr instanceof Array) {
         return eval(arr[arr.length - 1]);

+ 36 - 46
src/views/evaluate/evTwoTable.vue

@@ -8,29 +8,39 @@
   >
     <el-table-column type="expand">
       <template slot-scope="props">
-        <el-table :data="tableData" style="width: 100%;">
+        <el-table :data="props.row.floorArr" style="width: 100%;">
           <el-table-column type="selection" width="50" align="right"></el-table-column>
-          <el-table-column prop="name" label align="right" width="150">
+          <el-table-column prop label align="right" width="150">
             <template slot-scope="{row}">
-              <img class="ex-img" src="../../assets/warning.png" alt />
-              {{row.name}}
+              <img class="ex-img" v-if="row.isSatisfy==false" src="../../assets/warning.png" alt />
+              <span class="ex-span">{{row.spaceLocalName}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="a" label align="right"></el-table-column>
-          <el-table-column prop="b" label align="right"></el-table-column>
-          <el-table-column prop="c" label align="right"></el-table-column>
-          <el-table-column prop="d" label align="right"></el-table-column>
-          <el-table-column prop="e" label align="right"></el-table-column>
-          <el-table-column prop="f" label align="center"></el-table-column>
+          <el-table-column prop label align="right">
+            <template slot-scope="{row}">
+              <span>{{row.temperatureMin}}-{{row.temperatureMax}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="meanTindoor" label align="right">
+            <template slot-scope="{row}">{{(row.meanTindoor).toFixed(1)}}</template>
+          </el-table-column>
+          <el-table-column prop="tindoorOverrunDuration" label align="right"></el-table-column>
+          <el-table-column prop="tindoorOverrunDegree" label align="right">
+            <template slot-scope="{row}">{{(row.tindoorOverrunDegree).toFixed(1)}}</template>
+          </el-table-column>
+          <el-table-column prop="longestTindoorOverrunDuration" label align="right"></el-table-column>
+          <el-table-column prop="temperatureDifferenceMax" label align="center">
+            <template slot-scope="{row}">{{(row.temperatureDifferenceMax).toFixed(1)}}</template>
+          </el-table-column>
         </el-table>
       </template>
     </el-table-column>
-    <el-table-column prop="g" label align="right" width="50"></el-table-column>
+    <el-table-column prop="floor" label align="right" width="50"></el-table-column>
     <el-table-column prop label="位置详情" align="right" width="100"></el-table-column>
     <el-table-column prop label="温度要求范围(℃)" align="right"></el-table-column>
     <el-table-column prop label="平均温度(℃)" align="right"></el-table-column>
     <el-table-column prop label="累计超限时长(分钟)" align="right"></el-table-column>
-    <el-table-column prop label="平均超限程度(℃)" align="right"></el-table-column>
+    <el-table-column prop label="平均超限度(℃)" align="right"></el-table-column>
     <el-table-column prop label="连续超限最大时长(分钟)" align="right"></el-table-column>
     <el-table-column prop label="最大温差(℃)" align="center"></el-table-column>
   </el-table>
@@ -43,47 +53,22 @@ export default {
         return row.id;
       },
       expands: []
-      // tableData: [
-      //   {
-      //     id: "1",
-      //     name: "优衣库",
-      //     a: "22-26",
-      //     b: "26.5",
-      //     c: "37",
-      //     d: "-1",
-      //     e: "12",
-      //     f: "-3",
-      //     g: "F3"
-      //   },
-
-      //   {
-      //     id: "3",
-      //     name: "优衣库",
-      //     a: "22-26",
-      //     b: "26.5",
-      //     c: "37",
-      //     d: "1",
-      //     e: "12",
-      //     f: "-3",
-      //     g: "F2"
-      //   }
-      // ]
     };
   },
-  props:['dataList'],
+  props: ["dataList"],
   methods: {
     init() {
-      if (this.tableData) {
-        this.tableData.forEach(item => {
-          if (item.d > 0) {
-            this.expands.push(item.id);
-          }
-        });
-      }
+      this.dataList.forEach((item, index) => {
+        if (item.floorArr[index].isSatisfy == false) {
+          this.expands.push(item.id);
+        }
+      });
     }
   },
   mounted() {
-    this.init();
+    if (this.dataList.length > 0) {
+      this.init();
+    }
   }
 };
 </script>
@@ -94,6 +79,11 @@ export default {
     height: 22px;
     vertical-align: middle;
   }
+  .ex-span {
+    width: 50px;
+    display: inline-block;
+    text-align: left;
+  }
 }
 </style>
 <style lang="scss">

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

@@ -84,7 +84,7 @@
         </div>
       </div>
       <div class="ev-footer">
-        <ev-indoor-temperature v-if="energyDataList.length>0" :energyDataList="energyDataList"></ev-indoor-temperature>
+        <ev-indoor-temperature v-if="energyDataList.length>=0" :energyDataList="energyDataList"></ev-indoor-temperature>
       </div>
     </div>
   </div>