Guoxiaohuan %!s(int64=5) %!d(string=hai) anos
pai
achega
417ba51e93

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

@@ -1,9 +1,21 @@
 import httputils from '@/api/httputils'
 // 查询运行评价
-export function runDataQury({ getParams }) {
-    return httputils.getJson(`/duoduo-service/transfer/chiller/command/runDataQuery?projectId=Pj4413030001`, getParams)
+export function runDataQury(date, { getParams }) {
+    return httputils.getJson(`/duoduo-service/transfer/chiller/command/runDataQuery?projectId=Pj4413030001&date=` + date, getParams)
 }
 // 查询相似日样本
-export function energyDayQuery({ getParams }) {
-    return httputils.getJson(`/duoduo-service/transfer/chiller/command/energyDayQuery?projectId=Pj3206120001`, getParams)
+export function energyDayQuery(date, { getParams }) {
+    return httputils.getJson(`/duoduo-service/transfer/chiller/command/energyDayQuery?projectId=Pj3206120001&date=` + date, getParams)
+}
+// 查询一天的运行评价-室内温度页面左上角温度满足率
+export function querychiller({ postParams }) {
+    return httputils.postJson(`/duoduo-service/transfer/chiller/day/rpt/query?projectId=Pj4413030001`, postParams)
+}
+// 室内温度位置详情-室内温度页面中间的空间列表
+export function querySpace({ postParams }) {
+    return httputils.postJson(`/duoduo-service/object-service/object/space/query`, postParams)
+}
+// 查询空间温度-室内温度页面最下面的图
+export function queryHisdataQueryPeriodData({ postParams }) {
+    return httputils.postJson(`/duoduo-service/object-service/object/data/hisdataQueryPeriodData`, postParams)
 }

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

@@ -318,7 +318,7 @@ export default {
           overflow: scroll;
           .execute {
             .card {
-              min-width: 445px;
+              min-width: 460px;
               background: rgba(255, 255, 255, 1);
               border-radius: 4px;
               border: 1px solid rgba(228, 230, 231, 1);

+ 15 - 2
src/views/evaluate/dateTemp.vue

@@ -55,13 +55,26 @@ export default {
           newData.slice(6, 8);
       }
       this.$emit("pickerVal", this.pickerVal);
+    },
+    formatterStr(str) {
+      if (str) {
+        return (
+          str.substring(0, 4) +
+          "." +
+          str.substring(4, 6) +
+          "." +
+          str.substring(6, 8)
+        );
+      }
     }
   },
   mounted() {
     if (this.date) {
-      // this.pickerVal = new Date().getFullYear() + this.formatterStr2(this.date);
+      this.pickerVal = this.formatterStr(
+        new Date().getFullYear() + this.formatterStr2(this.date)
+      );
+      this.$emit("pickerVal", this.pickerVal);
     }
-    console.log(this.pickerVal);
   }
 };
 </script>

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

@@ -73,7 +73,7 @@ export default {
   display: flex;
   flex-wrap: wrap;
   .count-card {
-    max-width: 436px;
+    min-width: 436px;
     margin-right: 6px;
     margin-top: 16px;
     padding: 16px 20px;

+ 51 - 31
src/views/evaluate/evIndoorTemperature.vue

@@ -26,36 +26,46 @@ export default {
   },
   props: ["energyDataList"],
   mounted() {
-    this.getDrawData();
+    this.$nextTick(function() {
+      this.getDrawData();
+    });
   },
   methods: {
     getDrawData() {
-      this.energyDataList.forEach(el => {
-        el.time = el.date.slice(4, 6) + "." + el.date.slice(6, 8);
-        this.dataX.push(el.time);
-        this.indoorY.push(
-          el.tindoorFillRate ? el.tindoorFillRate.toFixed(2) : 0
-        );
-        this.energyY.push(
-          el.energySavingRate ? el.energySavingRate.toFixed(2) : 0
-        );
-        if (el.chillerExecuteRateReal >= 75) {
-          this.strategy1.push(1);
-        } else {
-          this.strategy1.push(null);
-        }
-        if (el.chillerExecuteRate >= 75) {
-          this.strategy2.push(1);
-        } else {
-          this.strategy2.push(null);
-        }
-        if (el.chillerExecuteRateReal < 75 || el.chillerExecuteRate < 75) {
-          this.strategy3.push(1);
-        } else {
-          this.strategy3.push(null);
-        }
-      });
-      this.drawIt();
+      this.dataX = [];
+      this.energyY = [];
+      this.indoorY = [];
+      this.strategy1 = [];
+      this.strategy2 = [];
+      this.strategy3 = [];
+      if (this.energyDataList) {
+        this.energyDataList.forEach(el => {
+          el.time = el.date.slice(4, 6) + "." + el.date.slice(6, 8);
+          this.dataX.push(el.time);
+          this.indoorY.push(
+            el.tindoorFillRate ? el.tindoorFillRate.toFixed(2) : 0
+          );
+          this.energyY.push(
+            el.energySavingRate ? el.energySavingRate.toFixed(2) : 0
+          );
+          if (el.chillerExecuteRateReal >= 75) {
+            this.strategy1.push(1);
+          } else {
+            this.strategy1.push(null);
+          }
+          if (el.chillerExecuteRate >= 75) {
+            this.strategy2.push(1);
+          } else {
+            this.strategy2.push(null);
+          }
+          if (el.chillerExecuteRateReal < 75 || el.chillerExecuteRate < 75) {
+            this.strategy3.push(1);
+          } else {
+            this.strategy3.push(null);
+          }
+        });
+        this.drawIt();
+      }
     },
     drawIt() {
       let myCharts = echarts.init(document.getElementById("pCharts2"));
@@ -105,10 +115,10 @@ export default {
               show: false
             },
             min: 0,
-            max: 25,
+            max: 50,
             position: "right",
             axisLabel: {
-              formatter: "{value} ml"
+              formatter: "{value} %"
             }
           },
           {
@@ -140,11 +150,11 @@ export default {
               show: false
             },
             min: 0,
-            max: 25,
+            max: 100,
             position: "left",
 
             axisLabel: {
-              formatter: "{value} °C"
+              formatter: "{value} %"
             }
           }
         ],
@@ -202,6 +212,16 @@ export default {
         }
       });
     }
+  },
+  watch: {
+    energyDataList: {
+      immediate: true,
+      handler(val, old) {
+        if (old) {
+          this.getDrawData();
+        }
+      }
+    }
   }
 };
 </script>

+ 106 - 38
src/views/evaluate/evTwoLevelMenu.vue

@@ -48,7 +48,7 @@
                   <span class="MicrYaHei">相似度高</span>
                 </div>
                 <div class="count-foot-table">
-                  <ev-energy-table v-if="samples.length>0" :samples="samples"></ev-energy-table>
+                  <ev-energy-table v-if="samples.length>=0" :samples="samples"></ev-energy-table>
                 </div>
               </div>
             </div>
@@ -71,7 +71,13 @@ import EvCard from "./evCard"; //执行率
 import EvRateTitle from "./evRateTitle";
 import EvHistory from "./evHistory";
 import DateTemp from "./dateTemp";
-import { runDataQury, energyDayQuery } from "@/api/evaluate/evaluate.js";
+import {
+  runDataQury,
+  energyDayQuery,
+  querychiller,
+  querySpace,
+  queryHisdataQueryPeriodData
+} from "@/api/evaluate/evaluate.js";
 import { queryChillerExecuteInfo } from "@/api/appeal/appeal.js";
 
 export default {
@@ -93,7 +99,8 @@ export default {
       tindoorFillRate: "", //室内温度满足率
       energySavingRate: "", //节能率
       cardList: [],
-      date: ""
+      date: "",
+      dateVal: ""
     };
   },
   components: {
@@ -107,57 +114,114 @@ export default {
     DateTemp
   },
   mounted() {
-    this.start();
-    this.queryRunDataQury();
+    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.queryEnergyDayQuery(this.dateVal);
     } else if (this.type == 3) {
       this.num = 3;
-      this.queryimplement();
+      this.queryimplement(this.dateVal);
     }
   },
   methods: {
-    queryimplement() {
+    queryHisdataQueryPeriodDataMethod() {
+      let params = {
+        postParams: {
+          projectId: "Pj4413030001",
+          funcids: ["Tdb"], //固定值
+          period: 60, //固定值
+          startTime: "20200225000000", //开始时间 yyyyMMddH24miss
+          endTime: "20200225235959", //结束时间 yyyyMMddH24miss
+          objectId: "Sp4413030001388657a6b77e4605880b85767e4eaddd" //空间id
+        }
+      };
+      queryHisdataQueryPeriodData(params).then(res => {
+        console.log(res);
+      });
+    },
+    // 查询一天的运行评价-室内温度页面左上角温度满足率
+    querySpaceMethod() {
+      let params = {
+        postParams: {
+          criteria: {
+            projectId: "Pj4413030001"
+            // isChillerMonitor: 1 //是否冷站智控监测 1:是 0:不是
+          }
+        }
+      };
+      querySpace(params).then(res => {
+        console.log(res);
+      });
+    },
+    // 室内温度位置详情-室内温度页面中间的空间列表
+    querychillerMethod() {
+      this.dataList = [];
       let params = {
         postParams: {
           criteria: {
+            projectId: "Pj4413030001",
             date: "20200226"
+          }
+        }
+      };
+      querychiller(params).then(res => {
+        this.tindoorFillRate = res.content[0].tindoorFillRate || 0; //室内温度满足率 = res.content ? res.content : [];
+        console.log(this.dataList);
+      });
+    },
+    queryimplement(date) {
+      let params = {
+        postParams: {
+          criteria: {
+            date: date
             // "id":15582 //指令id
           }
         }
       };
       queryChillerExecuteInfo(params).then(res => {
         this.cardList = res.data ? res.data : [];
-        console.log(this.cardList);
       });
     },
     change: function(index) {
       this.num = index;
-      this.start();
+      this.start(this.dateVal);
     },
-    start() {
+    start(date) {
       if (this.num == 1) {
-        this.queryRunDataQury();
+        // this.querychillerMethod();
+        // this.queryRunDataQury(date);
       } else if (this.num == 2) {
-        this.queryEnergyDayQuery();
+        this.queryEnergyDayQuery(date);
       } else if (this.num == 3) {
-        this.queryimplement();
+        this.queryimplement(date);
+      }
+    },
+    formatterStr(str) {
+      if (str) {
+        return str.substring(0, 4) + str.substring(5, 7) + str.substring(8, 10);
       }
     },
     pickerVal(val) {
-      console.log(val);
+      if (val) {
+        this.dateVal = this.formatterStr(val);
+        this.start(this.dateVal);
+      }
     },
     jumpIndex() {
       this.$router.push("/evaluate");
     },
-    queryRunDataQury() {
+    queryRunDataQury(date) {
       this.runDataQuryArr = [];
-      runDataQury({}).then(res => {
+      runDataQury(date, {}).then(res => {
         if (res.result == "success") {
           this.chillerExecuteRate = res.chillerExecuteRate; //略执行率
           this.isExecutedNum = res.isExecutedNum; //已执行数量
@@ -165,33 +229,37 @@ export default {
           this.dataList = res.dataList ? res.dataList : []; //室内温度满足率
           this.energySaving = res.energySaving; //节能量
           this.tindoorOverrunDegree = res.tindoorOverrunDegree; //超限程度
-          this.tindoorFillRate = res.tindoorFillRate; //室内温度满足率
+
           this.energySavingRate = res.energySavingRate; //节能率
         }
       });
     },
     // 节能率
-    queryEnergyDayQuery() {
-      energyDayQuery({}).then(res => {
-        // 本日概况
-        this.current = res.current ? res.current : {};
-        // 相似日概况
-        this.similarDay = res.similarDay ? res.similarDay : {};
-        // 相似日列表
-        this.samples = res.samples ? res.samples : [];
-        if (this.samples.length > 0) {
-          var outsiteTemp = [],
-            indoorTemp = [],
-            energy = [];
-          for (var i in this.samples) {
-            outsiteTemp.push(this.samples[i].outsiteTemp);
-            indoorTemp.push(this.samples[i].indoorTemp);
-            energy.push(this.samples[i].energy);
+    queryEnergyDayQuery(date) {
+      energyDayQuery(date, {}).then(res => {
+        if (res.result == "success") {
+          // 本日概况
+          this.current = res.current ? res.current : {};
+          // 相似日概况
+          this.similarDay = res.similarDay ? res.similarDay : {};
+          // 相似日列表
+          this.samples = res.samples ? res.samples : [];
+          if (this.samples.length > 0) {
+            var outsiteTemp = [],
+              indoorTemp = [],
+              energy = [];
+            for (var i in this.samples) {
+              outsiteTemp.push(this.samples[i].outsiteTemp);
+              indoorTemp.push(this.samples[i].indoorTemp);
+              energy.push(this.samples[i].energy);
+            }
+            let maxOutsiteTemp = this.maxMethod(this.sortMethod(outsiteTemp)),
+              maxIndoorTemp = this.maxMethod(this.sortMethod(indoorTemp)),
+              maxEnergy = this.maxMethod(this.sortMethod(energy));
+            this.maxArr.push(maxOutsiteTemp, maxIndoorTemp, maxEnergy);
           }
-          let maxOutsiteTemp = this.maxMethod(this.sortMethod(outsiteTemp)),
-            maxIndoorTemp = this.maxMethod(this.sortMethod(indoorTemp)),
-            maxEnergy = this.maxMethod(this.sortMethod(energy));
-          this.maxArr.push(maxOutsiteTemp, maxIndoorTemp, maxEnergy);
+        } else {
+          this.$message.error("申诉失败: " + res.message);
         }
       });
     },

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

@@ -140,10 +140,6 @@ export default {
   },
   mounted() {
     this.query(0);
-    console.log(timestamp2String(new Date().getTime() - 24 * 60 * 60 * 1000));
-    console.log(
-      timestamp2String(new Date().getTime() - 24 * 60 * 60 * 1000 * 30)
-    );
   },
   computed: {
     ...mapGetters(["projects", "projectId"])
@@ -170,7 +166,7 @@ export default {
         begin: timestamp2String(this.pickerVal2[0]).slice(0, 8),
         end: timestamp2String(this.pickerVal2[1]).slice(0, 8)
       };
-      runDataQury({ getParams }).then(res => {
+      runDataQury(null, { getParams }).then(res => {
         if (res.result == "success") {
           this.tindoorFillRate = res.tindoorFillRate; //室内温度满足率
           this.energySavingRate = res.energySavingRate; //节能率