guoxiaohuan 5 years ago
parent
commit
6b71aac8eb
3 changed files with 57 additions and 20 deletions
  1. 7 4
      src/views/appeal/index.vue
  2. 33 15
      src/views/evaluate/evHistory.vue
  3. 17 1
      src/views/evaluate/evTwoLevelMenu.vue

+ 7 - 4
src/views/appeal/index.vue

@@ -254,15 +254,15 @@ export default {
                 }
             }
             queryWorkflow(params).then(res => {
-                let arr = []
+                let arr = [],
+                    arr1 = []
                 arr = res.content ? res.content : []
                 if (arr.length > 0) {
                     arr.forEach(item => {
-                        arr.push(item.commandId)
+                        arr1.push(item.commandId)
                         this.newArr.push(item)
                     })
-                    console.log(this.newArr)
-                    this.queryExecute(arr)
+                    this.queryExecute(arr1)
                 }
             })
         },
@@ -281,6 +281,7 @@ export default {
                 }
             }
             queryChillerExecuteInfo(params).then(res => {
+                console.log(res)
                 let obj = Object.assign(item, res.data[0])
                 this.menu(obj, type)
             })
@@ -301,6 +302,8 @@ export default {
                 }
             }
             queryChillerExecuteInfo(params).then(res => {
+                console.log(res)
+
                 let arr1 = [],
                     arr2 = [],
                     arr3 = []

+ 33 - 15
src/views/evaluate/evHistory.vue

@@ -9,27 +9,42 @@
         </p>
         <div class='count-data'>
             <div class='outdoor'>
-                <div class='outdoor-left' :style='{"height":maxArr[0]==undefined?0+ "px":((current.tempOutdoor)/maxArr[0])*160 + "px"}'>
-                    <span>{{maxArr[0]==undefined?0:current.tempOutdoor.toFixed(1)}}℃</span>
+                <div
+                    class='outdoor-left'
+                    :style='{"height":maxArr[0]=="--"?0+ "px":((current.tempOutdoor!="--"?current.tempOutdoor:0)/maxArr[0])*160 + "px"}'
+                >
+                    <span>{{current.tempOutdoor=="--"?"--":current.tempOutdoor.toFixed(1)}}℃</span>
                 </div>
-                <div class='outdoor-right' :style='{"height":maxArr[0]==undefined?0+ "px":((similarDay.tempOutdoor)/maxArr[0])*160 + "px"}'>
-                    <span>{{maxArr[0]==undefined?0:similarDay.tempOutdoor.toFixed(1)}}℃</span>
+                <div
+                    class='outdoor-right'
+                    :style='{"height":maxArr[0]=="--"?0+ "px":((similarDay.tempOutdoor!="--"?similarDay.tempOutdoor:0)/maxArr[0])*160 + "px"}'
+                >
+                    <span>{{similarDay.tempOutdoor=="--"?"--":similarDay.tempOutdoor.toFixed(1)}}℃</span>
                 </div>
             </div>
             <div class='indoor'>
-                <div class='indoor-left' :style='{"height":maxArr[1]==undefined?0+ "px": ((current.tempIndoor)/maxArr[1])*160 + "px"}'>
-                    <span>{{maxArr[1]==undefined?0:current.tempIndoor.toFixed(1)}}℃</span>
+                <div
+                    class='indoor-left'
+                    :style='{"height":maxArr[1]=="--"?0+ "px": ((current.tempIndoor!="--"?current.tempIndoor:0)/maxArr[1])*160 + "px"}'
+                >
+                    <span>{{current.tempIndoor=="--"?"--":current.tempIndoor.toFixed(1)}}℃</span>
                 </div>
-                <div class='indoor-right' :style='{"height":maxArr[1]==undefined?0+ "px": ((similarDay.tempIndoor)/maxArr[1])*160 + "px"}'>
-                    <span>{{maxArr[1]==undefined?0:similarDay.tempIndoor.toFixed(1)}}℃</span>
+                <div
+                    class='indoor-right'
+                    :style='{"height":maxArr[1]=="--"?0+ "px": ((similarDay.tempIndoor!="--"?similarDay.tempIndoor:0)/maxArr[1])*160 + "px"}'
+                >
+                    <span>{{similarDay.tempIndoor=="--"?"--":similarDay.tempIndoor.toFixed(1)}}℃</span>
                 </div>
             </div>
             <div class='coldWar'>
-                <div class='coldWar-left' :style='{"height":maxArr[2]==undefined?0+ "px": ((current.energy)/maxArr[2])*160 + "px"}'>
-                    <span>{{maxArr[2]==undefined?0:current.energy.toFixed(0)}}kWh</span>
+                <div class='coldWar-left' :style='{"height":maxArr[2]=="--"?0+ "px": ((current.energy!="--"?current.energy:0)/maxArr[2])*160 + "px"}'>
+                    <span>{{current.energy=="--"?"--":current.energy.toFixed(0)}}kWh</span>
                 </div>
-                <div class='coldWar-right' :style='{"height": maxArr[2]==undefined?0+ "px":((similarDay.energy)/maxArr[2])*160 + "px"}'>
-                    <span>{{maxArr[2]==undefined?0:similarDay.energy.toFixed(0)}}kWh</span>
+                <div
+                    class='coldWar-right'
+                    :style='{"height": maxArr[2]=="--"?0+ "px":((similarDay.energy!="--"?similarDay.energy:0)/maxArr[2])*160 + "px"}'
+                >
+                    <span>{{similarDay.energy=="--"?"--":similarDay.energy.toFixed(0)}}kWh</span>
                 </div>
             </div>
         </div>
@@ -53,15 +68,18 @@ export default {
         init() {
             if (this.current) {
                 if (this.current.tempOutdoor == '-9999' || this.current.tempOutdoor == '-9998') {
-                    this.current.tempOutdoor = 0
+                    this.current.tempOutdoor = '--'
                 }
                 if (this.current.tempIndoor == '-9999' || this.current.tempIndoor == '-9998') {
-                    this.current.tempIndoor = 0
+                    this.current.tempIndoor = '--'
                 }
                 if (this.current.energy == '-9999' || this.current.energy == '-9998') {
-                    this.current.energy = 0
+                    this.current.energy = '--'
                 }
             }
+            console.log('11111', this.current.tempOutdoor, this.current.tempIndoor, this.current.energy)
+            console.log('22222', this.similarDay.tempOutdoor, this.similarDay.tempIndoor, this.similarDay.energy)
+            console.log('33333', this.maxArr)
         }
     },
     watch: {

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

@@ -222,7 +222,6 @@ export default {
                 this.energySavingRate = res.content[0].energySavingRate ? res.content[0].energySavingRate : '--'
                 // 准确率
                 this.accuracy = res.content[0].accuracy ? res.content[0].accuracy : '--'
-                console.log(res)
             })
         },
         // 点击tab @
@@ -252,6 +251,7 @@ export default {
         queryEnergyDayQuery(date) {
             this.maxArr = []
             energyDayQuery(date, {}).then(res => {
+                console.log(res)
                 if (res.result == 'success') {
                     // 本日概况
                     this.current = res.current ? res.current : {}
@@ -272,6 +272,22 @@ export default {
                             maxIndoorTemp = this.maxMethod(this.sortMethod(indoorTemp)),
                             maxEnergy = this.maxMethod(this.sortMethod(energy))
                         this.maxArr.push(maxOutsiteTemp, maxIndoorTemp, maxEnergy)
+                    } else {
+                        if (this.current.tempOutdoor == '-9999' || this.current.tempOutdoor == '-9998') {
+                            this.maxArr[0] = '--'
+                        } else {
+                            this.maxArr[0] = this.current.tempOutdoor * 1.2
+                        }
+                        if (this.current.tempIndoor == '-9999' || this.current.tempIndoor == '-9998') {
+                            this.maxArr[1] = '--'
+                        } else {
+                            this.maxArr[1] = this.current.tempIndoor * 1.2
+                        }
+                        if (this.current.energy == '-9999' || this.current.energy == '-9998') {
+                            this.maxArr[2] = '--'
+                        } else {
+                            this.maxArr[2] = this.current.energy * 1.2
+                        }
                     }
                 } else {
                     this.$message.error('申诉失败: ' + res.message)