瀏覽代碼

大盘数据对比提示

zhuxinbo 5 年之前
父節點
當前提交
fa001ca532
共有 1 個文件被更改,包括 35 次插入6 次删除
  1. 35 6
      src/views/modules/Statistics/Statistics.vue

+ 35 - 6
src/views/modules/Statistics/Statistics.vue

@@ -8,7 +8,6 @@
 }
 .statistics .ant-col-6 p,
 .statistics .ant-col-6 span {
-  display: block;
   text-align: center;
   line-height: 40px;
   font-size: 30px;
@@ -46,6 +45,11 @@
 .ant-table-thead div {
   font-weight: 700;
 }
+.tool-tip {
+  position: absolute;
+  top: 65px;
+  right: 10px;
+}
 </style>
 <template>
   <div class="statistics">
@@ -107,6 +111,12 @@
             class="styleElse"
             style="  margin-left:0"
           >{{kuaishou.costProportion?Math.abs(kuaishou.costProportion*100).toFixed(2)+'%':'0.00%'}}</span>
+          <a-tooltip placement="topRight" class="tool-tip">
+            <template slot="title">
+              <span>截止{{newDate-1}}点的所有数据对比</span>
+            </template>
+            <a-icon type="exclamation-circle" />
+          </a-tooltip>
         </a-card>
       </a-col>
       <a-col :span="6">
@@ -132,6 +142,12 @@
             style="margin-left:0"
             class="styleElse"
           >{{kuaishou.photoClickProportion?Math.abs(kuaishou.photoClickProportion*100).toFixed(2)+'%':'0.00%'}}</span>
+          <a-tooltip placement="topRight" class="tool-tip">
+            <template slot="title">
+              <span>截止{{newDate-1}}点的所有数据对比</span>
+            </template>
+            <a-icon type="exclamation-circle" />
+          </a-tooltip>
         </a-card>
       </a-col>
       <a-col :span="6">
@@ -157,6 +173,12 @@
             class="styleElse"
             style="  margin-left:0"
           >{{kuaishou.showProportion?Math.abs(kuaishou.showProportion*100).toFixed(2)+'%':'0.00%'}}</span>
+          <a-tooltip placement="topRight" class="tool-tip">
+            <template slot="title">
+              <span>截止{{newDate-1}}点的所有数据对比</span>
+            </template>
+            <a-icon type="exclamation-circle" />
+          </a-tooltip>
         </a-card>
       </a-col>
       <a-col :span="6">
@@ -183,6 +205,12 @@
             class="styleElse"
             style="  margin-left:0"
           >{{kuaishou.aClickProportion?Math.abs(kuaishou.aClickProportion*100).toFixed(2)+'%':'0.00%'}}</span>
+          <a-tooltip placement="topRight" class="tool-tip">
+            <template slot="title">
+              <span>截止{{newDate-1}}点的所有数据对比</span>
+            </template>
+            <a-icon type="exclamation-circle" />
+          </a-tooltip>
         </a-card>
       </a-col>
     </a-row>
@@ -1337,7 +1365,7 @@ export default {
         toolbox: {
           show: true,
           feature: {
-            dataView: { readOnly: false },
+            dataView: { readOnly: false }
           }
         },
         tooltip: {
@@ -1431,7 +1459,8 @@ export default {
       var n = myDate.getFullYear() //获取完整的年份(4位,1970-????)
       var m = myDate.getMonth() //获取当前月份(0-11,0代表1月)
       var d = myDate.getDate() //获取当前日(1-31)
-      return n + '-' + m + '-' + d
+      var day = myDate.getHours()
+      return day
     }
   },
   activated: function() {
@@ -1445,12 +1474,12 @@ export default {
       upDate = window.setInterval(() => {
         setTimeout(() => {
           that.drawLine(1)
-          that.getKsDetail(1).then(res => {
+          that.getKsDetail(that.active).then(res => {
             that.drawPie('cost', res)
           })
-          that.getReportList(1, that.allValue)
+          that.getReportList(that.active, that.allValue)
         }, 0)
-      }, 1000000)
+      }, 120000)
     })
   }
 }