zhulizhen 5 年之前
父节点
当前提交
d65703ebfb
共有 2 个文件被更改,包括 64 次插入66 次删除
  1. 53 64
      src/views/strategy/animationBox.vue
  2. 11 2
      src/views/strategy/index.vue

+ 53 - 64
src/views/strategy/animationBox.vue

@@ -27,9 +27,9 @@
         </div>
         </div>
       <div class="an-bottom">
-          <div id="leftLine" style="width:574px;height:350px;margin-right:;24px;">
+          <div id="leftLine" style="width:45%;height:350px;margin-right:;24px;">
           </div>
-          <div id="rightLine" style="width:573px;height:350px;"></div>
+          <div id="rightLine" style="width:45%;height:350px;"></div>
       </div>
 
       <div class="side-r" v-if="data.isExecuted!=0">
@@ -216,7 +216,7 @@ export default {
         margin-bottom: 44px;
         display: flex;
         align-items: center;
-        justify-content: space-between;
+        overflow: hidden;
         .snapshotss-cont2-box1,
         .snapshotss-cont2-box2 {
             flex:1;
@@ -228,60 +228,59 @@ export default {
             padding-left: 24px;
         }
         .snapshotss-cont2-box1 {
-            
             margin-right: 12px;
-        span:nth-of-type(1) {
-            height: 22px;
-            font-size: 14px;
-            color: rgba(100, 108, 115, 1);
-            line-height: 19px;
-            margin-right: 20px;
-        }
-        span:not(:first-child) {
-            height: 28px;
-            background: rgba(255, 255, 255, 1);
-            border-radius: 16px;
-            font-size: 14px;
-            color: rgba(31, 36, 41, 1);
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            padding: 0 6px 0 12px;
-            margin-right: 20px;
-            img {
-            width: 20px;
-            height: 20px;
-            margin-left: 8px;
+            span:nth-of-type(1) {
+                height: 22px;
+                font-size: 14px;
+                color: rgba(100, 108, 115, 1);
+                line-height: 19px;
+                margin-right: 20px;
+            }
+            span:not(:first-child) {
+                height: 28px;
+                background: rgba(255, 255, 255, 1);
+                border-radius: 16px;
+                font-size: 14px;
+                color: rgba(31, 36, 41, 1);
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                padding: 0 6px 0 12px;
+                margin-right: 20px;
+                img {
+                width: 20px;
+                height: 20px;
+                margin-left: 8px;
+                }
+            }
+            .span1 {
+                border: 1px solid rgba(52, 199, 36, 1);
+            }
+            .span2 {
+                border: 1px solid rgba(245, 78, 69, 1);
             }
-        }
-        .span1 {
-            border: 1px solid rgba(52, 199, 36, 1);
-        }
-        .span2 {
-            border: 1px solid rgba(245, 78, 69, 1);
-        }
         }
         .snapshotss-cont2-box2 {
-        span:nth-of-type(1),
-        span:nth-of-type(3) {
-            height: 22px;
-            font-size: 14px;
-            color: rgba(100, 108, 115, 1);
-            line-height: 19px;
-            margin-right: 16px;
-        }
-        span:nth-of-type(2),
-        span:nth-of-type(4) {
-            height: 32px;
-            font-size: 24px;
-            font-family: Persagy;
-            color: rgba(31, 36, 41, 1);
-            line-height: 29px;
-            margin-right: 64px;
-        }
-        span:nth-of-type(3) {
-            margin-right: 16px;
-        }
+            span:nth-of-type(1),
+            span:nth-of-type(3) {
+                height: 22px;
+                font-size: 14px;
+                color: rgba(100, 108, 115, 1);
+                line-height: 19px;
+                margin-right: 16px;
+            }
+            span:nth-of-type(2),
+            span:nth-of-type(4) {
+                height: 32px;
+                font-size: 24px;
+                font-family: Persagy;
+                color: rgba(31, 36, 41, 1);
+                line-height: 29px;
+                margin-right: 64px;
+            }
+            span:nth-of-type(3) {
+                margin-right: 16px;
+            }
         }
     }
     .side-r {
@@ -324,17 +323,7 @@ export default {
     .an-bottom{
         margin-top: 45px;
         display: flex;
-        #leftLine,#rightLine{
-            flex:1;
-        }
-
+        
     }
 }
 </style>
-<style lang="scss" scoped>
-.an-content{
-    .el-tag{
-        margin-right: 10px;
-    }
-}
-</style>

+ 11 - 2
src/views/strategy/index.vue

@@ -47,7 +47,8 @@ export default {
       showTodayStrategy: false,
       data:{},
       quickData:{},
-      today:''
+      today:'',
+      now:''
     };
   },
   components: {
@@ -64,13 +65,20 @@ export default {
       console.log(year,month,date)
       return this.today = year + ''+ month+''+date
     },
+    getPer5Time(){
+      let now = new Date().getTime()
+      let datetime = now-5*60*1000
+      let hours = new Date(datetime).getHours() < 10 ? "0" +  new Date(datetime).getHours(): new Date(datetime).getHours()
+      let minute = new Date(datetime).getMinutes() < 10 ? "0" + new Date(datetime).getMinutes() : new Date(datetime).getMinutes();
+      return this.now = hours + '' + minute
+    },
     getQuickData(){
       let params = {
         postParams:{
            criteria:{
               projectId:"Pj4419000005",
               date: this.today, //日期 yyyyMMdd
-              time:"0015", //时间 H24mi (最近的一个15分钟时间点,例如现在是23点35分,应传2330)
+              time: this.now, //时间 H24mi (最近的一个15分钟时间点,例如现在是23点35分,应传2330)
           },
           withColumns: [
               "chillerOrg","chillerHourList"
@@ -103,6 +111,7 @@ export default {
   },
   mounted(){
     this.formatTime()
+    this.getPer5Time()
     // let vm = this
     // setInterval(function(){
     //    vm.getData()