Bladeren bron

统计视图-图标修改

zhongxiaoyu 2 jaren geleden
bovenliggende
commit
b3da142511

+ 3 - 0
.eslintrc.js

@@ -10,6 +10,9 @@ module.exports = {
     es6: true,
   },
   extends: ['plugin:vue/recommended', 'eslint:recommended'],
+  globals: {
+    'DATACONTENT_ID': 'readonly'
+  },
 
   // add your custom rules here
   //it is base on https://github.com/vuejs/eslint-config-vue

BIN
src/assets/nav/ic_list_nav_statistical_check.png


BIN
src/assets/nav/ic_list_nav_statistical_default .png


BIN
src/assets/nav/ic_statistical_top_check.png


BIN
src/assets/nav/ic_statistical_top_default.png


+ 12 - 0
src/layout/components/Sidebar/SidebarItem.vue

@@ -243,6 +243,11 @@ export default {
   .systemSettings {
     background: url("../../../assets/nav/ic_setting_nav_check.png") no-repeat;
   }
+
+  .statisticsCharts {
+    background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
+  }
+
 }
 // ::v-deep .el-menu-item {
 //   transition: border-color 0.3s, background-color 0s, color 0s;
@@ -427,6 +432,13 @@ export default {
   }
 }
 
+.statisticsCharts {
+  background: url("../../../assets/nav/ic_list_nav_statistical_default .png") no-repeat;
+  &:hover {
+    background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
+  }
+}
+
 // .el-tooltip__popper.is-dark{
 //   background: #255395;
 // }

+ 3 - 0
src/layout/components/Sidebar/index.vue

@@ -201,6 +201,9 @@ export default {
     .systemSettings {
       background: url("../../../assets/nav/ic_setting_nav_check.png") no-repeat;
     }
+    .statisticsCharts {
+      background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
+    }
   }
 }
 </style>

+ 0 - 6
src/views/statisticsCharts/components/statisticsHeader.vue

@@ -149,12 +149,6 @@ export default {
             that.formItems[6].disabled = true
             that.formItems[7].disabled = true
             switch (value) {
-              case '全部':
-                that.formItems[4].disabled = false
-                that.formItems[5].disabled = false
-                that.formItems[6].disabled = false
-                that.formItems[7].disabled = false
-                break
               case '航线':
                 that.formItems[4].disabled = false
                 break

+ 6 - 6
src/views/statisticsCharts/components/statisticsTabs.vue

@@ -24,20 +24,20 @@ export default {
       tabList: [
         {
           path: '/statisticsCharts/flight',
-          icon: require('@/assets/nav/ic_setting_top_default.png'),
-          activeIcon: require('@/assets/nav/ic_setting_top_check.png'),
+          icon: require('@/assets/nav/ic_statistical_top_default.png'),
+          activeIcon: require('@/assets/nav/ic_statistical_top_check.png'),
           title: '航班量统计'
         },
         {
           path: '/statisticsCharts/node',
-          icon: require('@/assets/nav/ic_setting_top_default.png'),
-          activeIcon: require('@/assets/nav/ic_setting_top_check.png'),
+          icon: require('@/assets/nav/ic_statistical_top_default.png'),
+          activeIcon: require('@/assets/nav/ic_statistical_top_check.png'),
           title: '扫描节点与位置分析'
         },
         {
           path: '/statisticsCharts/baggage',
-          icon: require('@/assets/nav/ic_setting_top_default.png'),
-          activeIcon: require('@/assets/nav/ic_setting_top_check.png'),
+          icon: require('@/assets/nav/ic_statistical_top_default.png'),
+          activeIcon: require('@/assets/nav/ic_statistical_top_check.png'),
           title: '行李统计'
         }
       ],

+ 11 - 1
src/views/statisticsCharts/views/baggageStatisticsCharts.vue

@@ -51,7 +51,11 @@ export default {
           itemWidth: 14,
           itemHeight: 14,
           itemGap: 30,
-          data: ['航班量数量', '航班量同比', '航班量环比'],
+          data: [
+            '航班量数量',
+            '航班量同比'
+            // '航班量环比'
+          ],
           textStyle: {
             fontFamily: 'Helvetica, "Microsoft YaHei"',
             color: '#101116'
@@ -131,6 +135,10 @@ export default {
             itemStyle: {
               color: '#6682B5'
             },
+            label: {
+              show: true,
+              position: 'top'
+            },
             barWidth: 40,
             data: []
           },
@@ -284,6 +292,8 @@ export default {
           this.options.xAxis.data = dateArr
           this.options.series[0].data = dataArr
           this.options.series[1].data = chainArr
+          this.options.yAxis[1].min = (Math.min(...chainArr) - 0.2).toFixed(2)
+          this.options.yAxis[1].max = (Math.max(...chainArr) + 0.2).toFixed(2)
           this.resizeHandler()
         } else {
           this.$message.error(res.message)

+ 11 - 1
src/views/statisticsCharts/views/flightStatisticsCharts.vue

@@ -50,7 +50,11 @@ export default {
           itemWidth: 14,
           itemHeight: 14,
           itemGap: 30,
-          data: ['航班量数量', '航班量同比', '航班量环比'],
+          data: [
+            '航班量数量',
+            '航班量同比'
+            // '航班量环比'
+          ],
           textStyle: {
             fontFamily: 'Helvetica, "Microsoft YaHei"',
             color: '#101116'
@@ -131,6 +135,10 @@ export default {
               color: '#6682B5'
             },
             barWidth: 40,
+            label: {
+              show: true,
+              position: 'top'
+            },
             data: []
           },
           {
@@ -283,6 +291,8 @@ export default {
           this.options.xAxis.data = dateArr
           this.options.series[0].data = dataArr
           this.options.series[1].data = chainArr
+          this.options.yAxis[1].min = (Math.min(...chainArr) - 0.2).toFixed(2)
+          this.options.yAxis[1].max = (Math.max(...chainArr) + 0.2).toFixed(2)
           this.resizeHandler()
         } else {
           this.$message.error(res.message)

+ 7 - 8
src/views/statisticsCharts/views/nodeStatisticsCharts.vue

@@ -117,12 +117,13 @@ export default {
   },
   watch: {
     // 监听数据变化 重绘图形
-    // options: {
-    //   handler(obj) {
-    //     this.myChart.setOption(obj)
-    //   },
-    //   deep: true
-    // },
+    options: {
+      handler(obj) {
+        this.myChart.setOption(obj)
+        this.resizeHandler()
+      },
+      deep: true
+    },
     'sidebar.expand'() {
       this.resizeHandler()
     }
@@ -197,8 +198,6 @@ export default {
               name: map[data.inOrOut]
             }
           ]
-          this.myChart.setOption(this.options)
-          this.resizeHandler()
         } else {
           this.$message.error(res.message)
         }