|
@@ -201,6 +201,7 @@ export default {
|
|
{"name": "润扬大桥光谱1", "locations": [[119.367235, 32.209107]]},
|
|
{"name": "润扬大桥光谱1", "locations": [[119.367235, 32.209107]]},
|
|
{"name": "润扬大桥光谱2", "locations": [[119.369724, 32.204459]]},
|
|
{"name": "润扬大桥光谱2", "locations": [[119.369724, 32.204459]]},
|
|
],
|
|
],
|
|
|
|
+ allship:[],
|
|
ship: [
|
|
ship: [
|
|
{"name": "一号船", "mmsi": "s", "locations": [[118.639711, 31.98602]], 'type': 1, "head": 0, "lnglats": [[118.649711, 31.98602], [118.639711, 31.98602], [118.629711, 31.98602], [118.619711, 31.98602]]},
|
|
{"name": "一号船", "mmsi": "s", "locations": [[118.639711, 31.98602]], 'type': 1, "head": 0, "lnglats": [[118.649711, 31.98602], [118.639711, 31.98602], [118.629711, 31.98602], [118.619711, 31.98602]]},
|
|
// {"name": "二号船", "locations": [[118.639711, 31.96602]], 'type': 2,"head":60},
|
|
// {"name": "二号船", "locations": [[118.639711, 31.96602]], 'type': 2,"head":60},
|
|
@@ -222,6 +223,10 @@ export default {
|
|
that.getshipData();
|
|
that.getshipData();
|
|
}, 120000);
|
|
}, 120000);
|
|
|
|
|
|
|
|
+ setInterval(() => {
|
|
|
|
+ that.getallshipData();
|
|
|
|
+ }, 120000);
|
|
|
|
+
|
|
this.getThresholdList();
|
|
this.getThresholdList();
|
|
// this.addDevicePoint();
|
|
// this.addDevicePoint();
|
|
// this.addAisPoint();
|
|
// this.addAisPoint();
|
|
@@ -293,6 +298,25 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ getallshipData() {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ queryallShipData().then(data => {
|
|
|
|
+ var shipdatalist = [];
|
|
|
|
+ for (var key in data.data) {
|
|
|
|
+ var ship = data.data[key];
|
|
|
|
+ ship["name"] = ship.shipname_cn;
|
|
|
|
+ ship["locations"] = [[ship.lng, ship.lat]];
|
|
|
|
+ ship["type"] = 1;
|
|
|
|
+ shipdatalist.push(ship);
|
|
|
|
+ }
|
|
|
|
+ this.allship = shipdatalist;
|
|
|
|
+ this.addshipPointall();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
// addDevicePoint(){
|
|
// addDevicePoint(){
|
|
// for(var index in this.heyDeviceData){
|
|
// for(var index in this.heyDeviceData){
|
|
// var obj = this.heyDeviceData[index]
|
|
// var obj = this.heyDeviceData[index]
|
|
@@ -324,6 +348,19 @@ export default {
|
|
this.$refs.mapv.addpoint(obj.locations, obj, img, 'ship', ((obj.head == null ? 0 : parseFloat(obj.head)) - 90) * Math.PI / 180);
|
|
this.$refs.mapv.addpoint(obj.locations, obj, img, 'ship', ((obj.head == null ? 0 : parseFloat(obj.head)) - 90) * Math.PI / 180);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ addshipPointall() {
|
|
|
|
+ for (var index in this.allship) {
|
|
|
|
+ var obj = this.allship[index]
|
|
|
|
+ var img = 'zc.png'
|
|
|
|
+ if (obj.type == 2) {
|
|
|
|
+ img = 'xy.png'
|
|
|
|
+ } else if (obj.type == 3) {
|
|
|
|
+ img = 'wg.png'
|
|
|
|
+ }
|
|
|
|
+ this.$refs.mapv.addpoint(obj.locations, obj, img, 'ship', ((obj.head == null ? 0 : parseFloat(obj.head)) - 90) * Math.PI / 180);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getSo2Time() {
|
|
getSo2Time() {
|
|
console.log(111);
|
|
console.log(111);
|
|
getSo2Time(this.shipDate).then(data => {
|
|
getSo2Time(this.shipDate).then(data => {
|