Browse Source

修改途径点数量,表格与折线图样式

DongZ 1 year ago
parent
commit
fcc7935ab3
1 changed files with 26 additions and 15 deletions
  1. 26 15
      src/views/WMS/historical-route/index.vue

+ 26 - 15
src/views/WMS/historical-route/index.vue

@@ -15,12 +15,13 @@
           </el-descriptions>
         </el-timeline>
       </el-timeline>
-
+      
       <el-timeline>
         <!-- 数据表 -->
         <h2>订单温湿度列表</h2>
         <el-table
           :data="tableData2"
+          stripe
           height="300"
           border
           style="width: 97%">
@@ -124,12 +125,13 @@
         prop="startTime"
         label="开始时间"
         align="center"
-        width="350">
+        min-width="250">
         </el-table-column>
         <el-table-column
         prop="endTime"
         align="center"
-        label="结束时间">
+        label="结束时间"
+        min-width="250">
         </el-table-column>
         </el-table>
       </el-timeline>
@@ -204,7 +206,7 @@ export default {
     //切换标签页时执行
     handleClick(tab, event) {
       console.log(tab, event);
-      this.handleQuery();
+      this.handleGeocodeRepo(this.carMessage);
     },
     //地图初始化
     initMap() {
@@ -228,12 +230,26 @@ export default {
     //渲染图表
     initEcharts() {
       this.option = {
+        tooltip: {
+          trigger: 'axis'
+        },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '5%',
+          containLabel: true
+        },
+        toolbox: {
+          feature: {
+            saveAsImage: {}
+          }
+        },
         xAxis: {
-        data: this.xData
+          data: this.xData
         },
         legend: { // 图例
-        data: ["温度", "湿度/100"],
-        bottom: "0%"
+          data: ["温度", "湿度/100"],
+          // bottom: "0%"
         },
         yAxis: {},
         series: [
@@ -247,7 +263,7 @@ export default {
             textStyle: {
               fontSize: 16
             }
-          }
+          },
         },
         {
           name: "湿度/100",
@@ -273,13 +289,8 @@ export default {
         this.myChart.resize();
       });
     },
-    //查询按钮
-    handleQuery() {
-      // window.location.href = ''
-      this.handleGeocodeRepo(this.carMessage);
-    },
-    handleGeocodeRepo(data) {
 
+    handleGeocodeRepo(data) {
       // let data = {
       //     billCode: "CS01",
       //     plateNumber: "湘A79D2R",
@@ -417,7 +428,7 @@ export default {
   created() {
     console.log(this.$route.query,'this.$route')
     this.carMessage = this.$route.query;
-    this.handleQuery();
+    this.handleGeocodeRepo(this.carMessage);
   }
 };
 </script>