Browse Source

首页修改

zhongxiaoyu 1 year ago
parent
commit
3a2eea7623
1 changed files with 9 additions and 5 deletions
  1. 9 5
      src/views/dashboard/index.vue

+ 9 - 5
src/views/dashboard/index.vue

@@ -32,14 +32,17 @@
           <div class="dashboard-card-wrapper">
             <div class="dashboard-card-title">航司行李量排行</div>
           </div>
-          <div class="dashboard-card-content">
+          <div
+            v-if="companyData.length"
+            class="dashboard-card-content"
+          >
             <vue-seamless-scroll
               class="scroll-table"
               :class-option="defaultOption"
             >
               <div
                 v-for="item in companyData"
-                :key="item.key"
+                :key="item.name"
                 class="company-baggage-item"
               >
                 <div class="company-name">{{ item.name }}</div>
@@ -145,8 +148,9 @@ import BarCharts from '@/layout/components/Echarts/commonChartsBar.vue'
 import MapCharts from '@/layout/components/Echarts/commonChartsChinaMap.vue'
 import VueSeamlessScroll from 'vue-seamless-scroll'
 import { Query } from '@/api/webApi'
+import { parseTime } from '@/utils'
 
-const defaultDate = '2023-05-01'
+const defaultDate = parseTime(new Date(), '{y}-{m}-{d}')
 const barOption = {
   tooltip: {
     trigger: 'axis',
@@ -327,7 +331,7 @@ export default {
     defaultOption() {
       return {
         step: 0.5, // 数值越大速度滚动越快
-        limitMoveNum: 0, // 开始无缝滚动的数据量  //this.fourDatata.length
+        limitMoveNum: 2, // 开始无缝滚动的数据量  //this.fourDatata.length
         hoverStop: true, // 是否开启鼠标悬停stop
         direction: 1, // 0向下 1向上 2向左 3向右
         openWatch: true, // 开启数据实时监控刷新dom
@@ -688,7 +692,7 @@ export default {
     }
   }
   .scroll-table {
-    max-height: 100%;
+    height: 100%;
     overflow: hidden;
     .company-baggage-item {
       margin-top: 36px;