gr 1 jaar geleden
bovenliggende
commit
c57ecfad26
2 gewijzigde bestanden met toevoegingen van 12 en 8 verwijderingen
  1. 2 2
      src/echarts/options.js
  2. 10 6
      src/views/jtaq/Index.vue

+ 2 - 2
src/echarts/options.js

@@ -564,9 +564,9 @@ export function setFsdll(ele, dataIn) {
 		},
 		grid: {
 			containLabel: true,
-			top: '10%',
+			top: '15%',
 			left: '5%',
-			right: '5%',
+			right: '8%',
 			bottom: '5%',
 		},
 		xAxis: [

+ 10 - 6
src/views/jtaq/Index.vue

@@ -262,6 +262,13 @@ export default {
         i.GPSTIME = i.GPSTIME.slice(-2)
       })
       let chartFsdll = setFsdll(document.getElementById('chart_fsdll'), listTemp)
+      let lastIndex = res.data.boatCountList.length-1
+      chartFsdll.dispatchAction({
+        type: 'select',
+        seriesIndex: 0,
+        dataIndex: lastIndex,
+      })
+      getData_fhxll(res.data.boatCountList[lastIndex].GPSTIME)
       chartFsdll.getZr().on('click', (params)=> {
         const pointInPixel = [params.offsetX, params.offsetY]
         if (chartFsdll.containPixel('grid', pointInPixel)) {
@@ -274,9 +281,6 @@ export default {
           getData_fhxll(chartData_fsdll.value[dataIndex].GPSTIME)
         }
       })
-      data_fhxll.value.forEach(i => {
-        i.value = res.data[i.fieldName]
-      })
     })
   }
 
@@ -462,7 +466,7 @@ export default {
       }
       &>div {
         box-sizing: border-box;
-        width: 182px;
+        width: 200px;
         height: 66px;
         padding-left: 15px;
         transform: translateX(-10px);
@@ -598,8 +602,8 @@ export default {
   .pr-b2 {
     #chart_fsdll {
       width: 90%;
-      height: 15vh;
-      margin: 5px 0 20px;
+      height: 16vh;
+      margin: 5px 0 10px;
     }
 
     .title2-right {