zhulizhen 5 yıl önce
ebeveyn
işleme
635099dc1e

+ 3 - 3
src/api/strategy/strategy.js

@@ -1,9 +1,9 @@
 import httputils from '@/api/httputils'
 //查询当前运行策略
-export function queryCommand({postParams}) {
-    return httputils.postJson(`/duoduo-service/transfer/chiller/command/query?projectId=Pj4419000005`, postParams)
+export function queryCommand({getParams}) {
+    return httputils.getJson(`duoduo-service/transfer/chiller/command/queryData?projectId=Pj4413030001`, getParams)
 }
 //查询当日运行策略列表
 export function getCommand({postParams}) {
-    return httputils.postJson(`/duoduo-service/transfer/chiller/command/query?projectId=Pj4419000005`, postParams)
+    return httputils.postJson(`/duoduo-service/transfer/chiller/command/query?projectId=Pj4413030001`, postParams)
 }

+ 0 - 1
src/views/doBusiness/index.vue

@@ -69,7 +69,6 @@ export default {
       })
     },
     setHours(){
-      console.log(this.value1)
       let params = {
         postParams:{
           projectId:'Pj4419000005',

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

@@ -16,7 +16,6 @@ export default {
       pickerVal: new Date()
     };
   },
-  props:['types'],
   methods: {
     formatter(date) {
       return moment.unix(date / 1000).format("YYYYMMDD");

+ 0 - 4
src/views/evaluate/evTwoLevelMenu.vue

@@ -15,11 +15,7 @@
             <li :class="{current: num==3}" @click="change(3)">执行率</li>
           </div>
           <div class="count-top-right">
-<<<<<<< HEAD
             <date-temp  @pickerVal="pickerVal"></date-temp>
-=======
-            <date-temp :types="0" @pickerVal="pickerVal"></date-temp>
->>>>>>> 2e1d1bd20ac434e4f6845ad308eac48d63df87cc
           </div>
         </ul>
         <div class="count-bottom">

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

@@ -70,6 +70,7 @@ export default {
       // ]
     };
   },
+  props:['dataList'],
   methods: {
     init() {
       if (this.tableData) {

+ 14 - 14
src/views/strategy/animationBox.vue

@@ -62,12 +62,11 @@ export default {
         }
     },
     components:{bomBox},
-    props:['data'],
+    props:['data','chillerHourList'],
     methods:{
         getData(){
-            let chillerList = this.data.chillerHourList ? this.data.chillerHourList:[]
-            chillerList.forEach(el=>{
-                el.value = el.time.slice('0,2')+':'+el.time.slice('2,4')
+            this.chillerHourList.forEach(el=>{
+                el.value = el.time.slice(0,2)+':'+el.time.slice(2,4)
                 this.dataX .push(el.value)
                 this.loadX.push(el.value)
                 this.dataY1.push(el.tout)
@@ -77,8 +76,6 @@ export default {
                 this.loadY2.push(el.predictedLoadUpLimit)
                 this.loadY3.push(el.redictedLoadDownLimit)
             })
-            this.drawLeft()
-            this.drawRight()
         },
         drawLeft(){
              var leftLine = echarts.init(document.getElementById('leftLine'))
@@ -109,7 +106,7 @@ export default {
                         name: '室外温度',
                         type: 'line',
                         stack: '总量',
-                        data: thus.dataY1
+                        data: this.dataY1
                     },
                     {
                         name: '室内平均温度',
@@ -146,9 +143,10 @@ export default {
                             color: '#222'
                         }
                     },
-                    formatter: function (params) {
-                        return params[2].name + '<br />' + params[2].value;
-                    }
+                    //  formatter: function (params) {
+                    //     console.log(params)
+                    // //     return params[2].name + '<br />' + params[2].value;
+                    // }
                 },
                 grid: {
                     left: '3%',
@@ -190,7 +188,7 @@ export default {
                     symbol: 'none'
                 }, {
                     type: 'line',
-                    data: thus.loadY3,
+                    data: this.loadY3,
                     hoverAnimation: false,
                     symbolSize: 6,
                     itemStyle: {
@@ -201,10 +199,12 @@ export default {
             });
             },
     },
+    created(){    
+        this.getData()
+    },
     mounted(){
-        if(this.data.chillerHourList ){
-            this.getData()
-        }
+        this.drawLeft()
+        this.drawRight()
     }
 }
 </script>

+ 1 - 1
src/views/strategy/bomBox.vue

@@ -5,7 +5,7 @@
     </div>
     <div class="bomb-left">
         <div class="bomb-left1">当前策略</div>
-        <div class="bomb-left2">应执行时间 {{data.executeTime || '--'}}-{{data.pushTime || '--'}}</div>
+        <div class="bomb-left2">应执行时间 {{data.executeTime?(data.executeTime.slice(8,10)+":"+ data.executeTime.slice(10,12)):'--'}} - {{data.pushTime?(data.pushTime.slice(8,10)+":"+data.pushTime.slice(10,12)): '--'}}</div>
         <div class="bomb-left3">策略可靠度</div>
         <div id='circleEcharts' style="width:104px;height:104px"></div>
     </div>

+ 19 - 25
src/views/strategy/index.vue

@@ -4,27 +4,27 @@
     <Head :headText="headText"></Head>
     <div class="nav-right">
       <img class="nav-icon" v-if="navText" src="@/assets/shape.png" alt />
-      <span class="nav-text1" v-if="navText">今日已收到 {{quickData.chillerCount || 0}} 条策略,其中有 {{quickData.hillerIsNotExecutedCount || 0}} 条未执行</span>
-      <span class="nav-text" v-else>今天已收到 {{quickData.chillerCount || 0}} 条策略</span>
+      <span class="nav-text1" v-if="navText">今日已收到 {{chillerCommand.chillerCount || 0}} 条策略,其中有 {{chillerCommand.hillerIsNotExecutedCount || 0}} 条未执行</span>
+      <span class="nav-text" v-else>今天已收到 {{chillerCommand.chillerCount || 0}} 条策略</span>
       <span class="nav-look MicrYaHei" @click="showTodayStrategy = true">查看</span>
     </div>
     <div class="strategyContainer">
       <div class="strate-left">
         <div class="strate-left-1">今天营业时间</div>
-        <div class="strate-left-2">{{quickData.openTime || '--'}} - {{quickData.endTime || '--'}}</div>
+        <div class="strate-left-2">{{chillerCommand.openTime?( chillerCommand.openTime.slice(0,2)+':'+chillerCommand.openTime.slice(2,4)):"--"}} - {{chillerCommand.endTime?(chillerCommand.endTime.slice(0,2)+':'+chillerCommand.endTime.slice(2,4)):"--"}}</div>
         <div class="strate-left-1">当前运行模式</div>
-        <div class="strate-left-2">{{quickData.model || '--'}}</div>
+        <div class="strate-left-2">{{chillerCommand.model || '--'}}</div>
         <div class="strate-left-box">
           <div class="strate-left-info-1">通风策略</div>
-          <div class="strate-left-info">开启时间:{{quickData.freshAirEqOpenTime || '--'}} - {{quickData.freshAirEqCloseTime || '--'}}</div>
+          <div class="strate-left-info">开启时间:{{chillerCommand.freshAirEqOpenTime?(chillerCommand.freshAirEqOpenTime.slice(0,2)+":"+chillerCommand.freshAirEqOpenTime.slice(2,4)):"--"}} - {{chillerCommand.freshAirEqCloseTime?(chillerCommand.freshAirEqCloseTime.slice(0,2)+":"+chillerCommand.freshAirEqCloseTime.slice(2,4)):"--"}}</div>
           <div class="strate-left-info">新风机组:开启</div>
           <div class="strate-left-info">组合式空调机组:全新风</div>
         </div>
       </div>
       <div class="starte-right">
         <p class="strate-right-title">当前状态</p>
-        <water-unit :data='quickData'></water-unit>
-        <animation-box :data='quickData'></animation-box>
+        <water-unit :data='chillerOrg '></water-unit>
+        <animation-box v-if="chillerHourList.length>0" :data='chillerCommand' :chillerHourList='chillerHourList'></animation-box>
       </div>
     </div>
     <el-dialog title="提示" :visible.sync="showTodayStrategy" width="1260px">
@@ -46,9 +46,11 @@ export default {
       navText: true,
       showTodayStrategy: false,
       tableData:[],
-      quickData:{},
+      chillerCommand:{},
       today:'',
-      now:''
+      now:'',
+      chillerOrg:{},
+      chillerHourList:[]
     };
   },
   components: {
@@ -74,22 +76,15 @@ export default {
     },
     getQuickData(){
       let params = {
-        postParams:{
-           criteria:{
-              projectId:"Pj4419000005",
-              date: this.today, //日期 yyyyMMdd
-              time: this.now, //时间 H24mi (最近的一个15分钟时间点,例如现在是23点35分,应传2330)
-          },
-          withColumns: [
-              "chillerOrg","chillerHourList"
-          ]
+        getParams:{
+          date: this.today, //日期 yyyyMMdd
         }
       }
       queryCommand(params).then(res=>{
         console.log(res)
-        if(res.data){
-           this.quickData = res.data.content?res.data.content[0]:{}
-        }
+           this.chillerOrg = res.chillerOrg
+           this.chillerCommand = res.chillerCommand
+           this.chillerHourList = res.chillerHourList
       })
     },
     getData(){
@@ -102,10 +97,9 @@ export default {
         }
       }
       getCommand(params).then(res=>{
-        console.log(res)
-        if(res.data){
-          this.tableData = res.data.content?res.data.content:[]
-        }
+        
+          this.tableData = res.content?res.data.content:[]
+        
       })
     }
   },