zhulizhen пре 5 година
родитељ
комит
518a50de09

+ 19 - 5
src/views/evaluate/dateTemp.vue

@@ -2,7 +2,14 @@
   <div class="date-temp">
     <span class="arrow-left" @click="pickerChangeLeft"></span>
     <span class="arrow-line arrow-line1" @click="pickerChangeLeft"></span>
-    <el-date-picker v-model="pickerVal" type="date" format="yyyy.MM.dd" value-format="yyyy.MM.dd"></el-date-picker>
+    <el-date-picker
+      v-model="pickerVal"
+      type="date"
+      format="yyyy.MM.dd"
+      value-format="yyyy.MM.dd"
+      @change="changeDate"
+      :picker-options="pickerOptions0"
+    ></el-date-picker>
     <span class="arrow-line" @click="pickerChangeRight"></span>
     <span class="arrow-right" @click="pickerChangeRight"></span>
   </div>
@@ -13,7 +20,12 @@ import "moment/locale/zh-cn";
 export default {
   data() {
     return {
-      pickerVal: new Date()
+      pickerVal: new Date(),
+      pickerOptions0: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        }
+      }
     };
   },
   props: ["date"],
@@ -56,6 +68,9 @@ export default {
       }
       this.$emit("pickerVal", this.pickerVal);
     },
+    changeDate(val) {
+      this.$emit("pickerVal", val);
+    },
     formatterStr(str) {
       if (str) {
         return (
@@ -70,9 +85,8 @@ export default {
   },
   mounted() {
     if (this.date) {
-      this.pickerVal = this.formatterStr(
-        new Date().getFullYear() + this.formatterStr2(this.date)
-      );
+      this.pickerVal = this.formatterStr(this.date);
+      // new Date().getFullYear() + this.formatterStr2(this.date)
       this.$emit("pickerVal", this.pickerVal);
     }
   }

+ 3 - 3
src/views/evaluate/evRateTitle.vue

@@ -3,14 +3,14 @@
     <span v-if="tab==1" class="count-bottom-text">
       <span class="span1"></span>
       <span class="span2 Micbold">室内温度满足率</span>
-      <span class="span3">{{rate}}%</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">90%</span>
+      <span class="span6">{{accuracy||'--'}}%</span>
     </span>
     <span v-if="tab==3" class="count-bottom-text">
       <span class="span1"></span>
@@ -25,7 +25,7 @@ export default {
     return {};
   },
   mounted() {},
-  props: ["tab", "rate"]
+  props: ["tab", "rate",'accuracy']
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 0
src/views/evaluate/evStackedLine.vue

@@ -11,6 +11,7 @@ export default {
   mounted() {
     this.drawItLine();
   },
+  props: ["stackArr"],
   methods: {
     drawItLine() {
       let myCharts = echarts.init(document.getElementById("lineCharts"));

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

@@ -161,7 +161,11 @@ export default {
           }
         })
         
-        this.dataList = Object.values(obj);
+        this.dataList = Object.values(obj).map(i => {
+          // 增加 isExpand 属性
+          i.isExpand = i.children.some(c => c.isSatisfy == false)
+          return i
+        });
         console.log(this.dataList);
       });
     },

+ 2 - 5
src/views/evaluate/evTwoTable.vue

@@ -65,13 +65,10 @@ export default {
     }
   },
   methods: {
-    init() {
-    }
+   
   },
   mounted() {
-    if (this.dataList.length > 0) {
-      this.init();
-    }
+    
   }
 };
 </script>