|
@@ -249,7 +249,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import * as echarts from 'echarts'
|
|
import * as echarts from 'echarts'
|
|
-import {getMap} from "@/api/ship/diqiu";
|
|
|
|
|
|
+import {getMap, getMapPromise} from "@/api/ship/diqiu";
|
|
import {getShipRoute} from "@/api/ship/shipMapping";
|
|
import {getShipRoute} from "@/api/ship/shipMapping";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -858,9 +858,14 @@ export default {
|
|
myChart.setOption(option);
|
|
myChart.setOption(option);
|
|
},
|
|
},
|
|
getMapByPerson() {
|
|
getMapByPerson() {
|
|
- let option = getMap();
|
|
|
|
- let myChart = this.$echarts.init(document.getElementById("mapByPerson"));
|
|
|
|
- myChart.setOption(option);
|
|
|
|
|
|
+ getMapPromise()
|
|
|
|
+ .then((result) => {
|
|
|
|
+ let myChart = this.$echarts.init(document.getElementById("mapByPerson"));
|
|
|
|
+ myChart.setOption(result);
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ console.error(error);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
tabClick(state) {
|
|
tabClick(state) {
|
|
if (state == 1) {
|
|
if (state == 1) {
|