From c8cf161d6bd6c77f3e326c3be6c6854ec93a8fbd Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 26 Nov 2021 17:28:47 +0800
Subject: [PATCH] 更新
---
src/views/map/carGps.vue | 227 ++----------------
src/views/commandQuery/taskDistribution.vue | 130 +---------
src/views/map/peopleGps.vue | 108 ++++----
src/views/map/carGps1.vue | 227 ++++++++++++++++--
4 files changed, 302 insertions(+), 390 deletions(-)
diff --git a/src/views/commandQuery/taskDistribution.vue b/src/views/commandQuery/taskDistribution.vue
index 37beb26..b891a2a 100644
--- a/src/views/commandQuery/taskDistribution.vue
+++ b/src/views/commandQuery/taskDistribution.vue
@@ -14,9 +14,6 @@
:permission="permissionList"
v-model="form"
ref="crud"
- @row-update="rowUpdates"
- @row-save="rowSave"
- @row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@@ -43,7 +40,8 @@
:visible.sync="seeLocationFlag"
:modal-append-to-body="false"
width="width">
- <Map v-if="seeLocationFlag" ref="locationForm" />
+ <Map v-if="seeLocationFlag"
+ ref="locationForm" />
</el-dialog>
<el-dialog class="see-track"
@@ -67,7 +65,8 @@
</el-button>
</div>
- <Map v-if="seeTrackFlag" ref="tarckForm" />
+ <Map v-if="seeTrackFlag"
+ ref="tarckForm" />
</el-dialog>
</basic-container>
</template>
@@ -84,7 +83,7 @@
// import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getLisperetaskDistribution } from "@/api/commandQuery/commandQuery";
-import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList, getNewPeople, getNewTark } from "@/api/map/people";
+import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList} from "@/api/map/people";
import peoplePng from "@/assets/img/people.png";
@@ -228,56 +227,6 @@
},
},
methods: {
- rowSave (row, done, loading) {
- adddata(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowUpdates (row, index, done, loading) {
- // console.log(42342);
- update(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
// beforeOpen(done, type) {
// if (["edit", "view"].includes(type)) {
// getDetail(this.form.id).then((res) => {
@@ -381,17 +330,13 @@
this.seeLocationFlag = true
getDirectiveLiveLocationVoList({ type: 1, userIds: row.receiveDirectiveIds }).then((result) => {
- getNewPeople().then(res => {
-
- if (JSON.stringify(res.data) != "{}") {
- var arr = res.data.sort(function (a, b) {
- return a['date'] < b['date'] ? 1 : -1
- })
-
+ var res = result.data.data;
+ if (JSON.stringify(res) != "[]") {
+ res.forEach((data) => {
this.$refs.locationForm.addEntitys(
{
- LGTD: arr[0].gis_jd,
- LTTD: arr[0].gis_wd,
+ LGTD: data.longitude,
+ LTTD: data.latitude,
name: "人员位置",
},
peoplePng,
@@ -399,25 +344,8 @@
"peoplelayer",
"peopleAddlayer"
);
- }
- })
-
- // var res = result.data.data;
- // if (JSON.stringify(res) != "[]") {
- // res.forEach((data)=>{
- // this.$refs.locationForm.addEntitys(
- // {
- // LGTD: data.longitude,
- // LTTD: data.latitude,
- // name: "人员位置",
- // },
- // peoplePng,
- // 0.5,
- // "peoplelayer",
- // "peopleAddlayer"
- // );
- // })
- // }
+ })
+ }
});
},
@@ -470,38 +398,20 @@
startTime: start,
endTime: end,
}).then((res) => {
- getNewTark().then(res => {
-
- if (JSON.stringify(res.data.track) != "{}") {
-
- if (res.data.track.length > 1) {
+ var result = res.data.data;
+ if (JSON.stringify(res) != "[]") {
+ result.forEach((item) => {
+ if (item.length > 1) {
let arr = [];
- res.data.track.forEach((item) => {
- arr.push([Number(item.gis_jd), Number(item.gis_wd)]);
+ item.forEach((data) => {
+ arr.push([Number(data.longitude), Number(data.latitude)]);
});
this.$refs.tarckForm.addLines(arr);
}
-
- }
-
- })
-
- // var result = res.data.data;
- // if (JSON.stringify(res) != "[]") {
- // result.forEach((item) => {
- // if (item.length > 1) {
- // let arr = [];
-
- // item.forEach((data) => {
- // arr.push([Number(data.longitude), Number(data.latitude)]);
- // });
-
- // this.$refs.tarckForm.addLines(arr);
- // }
- // })
- // }
+ })
+ }
});
},
diff --git a/src/views/map/carGps.vue b/src/views/map/carGps.vue
index 73a1371..f34b320 100644
--- a/src/views/map/carGps.vue
+++ b/src/views/map/carGps.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-25 15:24:53
+ * @Last Modified time: 2021-11-17 09:20:19
* menu-name 押运人员定位
*/
<template>
@@ -122,38 +122,24 @@
</div>
</el-card>
- <el-dialog title="视频监控"
+ <el-dialog title=""
:modal='false'
:visible.sync="dialogVisible"
:before-close="dialogBeforeClose"
:close-on-click-modal='false'
- @closed="videoClose"
class="car-video-box">
- <div class="container"
- v-loading="videoLoading">
- <video id="videoElementOne"
- controls="controls"></video>
- <video id="videoElementTwo"
- controls="controls"></video>
- <video id="videoElementThree"
- controls="controls"></video>
- <video id="videoElementFour"
- controls="controls"></video>
- </div>
+ <iframe src="/carVideo/parent.html"
+ ref="videoIframe"
+ frameborder="0"></iframe>
</el-dialog>
</el-col>
</el-row>
</template>
<script>
-import { getCarList, getPosition, getNewPosition, getTrack, getVideoSrc, getNewCarTark } from "@/api/map/car";
-import axios from 'axios';
+import { getCarList, getPosition, getTrack } from "@/api/map/car";
import carPng from "@/assets/img/car.png";
-
-import flvjs from 'flv.js/dist/flv.min.js';
-
-const d3 = require('d3-dsv');
export default {
data () {
@@ -170,13 +156,16 @@
detailObj: {},
dialogVisible: false,
map: null,
- videoLoading: true
};
},
created () {
this.getList();
},
mounted () {
+
+
+
+
},
methods: {
@@ -203,17 +192,14 @@
},
positionClick (val) {
- // console.log(val)
-
- getNewPosition({ imei: "861636056082414" }).then((result) => {
+ getPosition({ type: 2, workerId: val.id }).then((result) => {
var res = result.data.data;
-
if (JSON.stringify(res) != "{}") {
this.$refs.modalForm.addEntitys(
{
- LGTD: res.x,
- LTTD: res.y,
- name: "车辆位置",
+ LGTD: 115.86,
+ LTTD: 28.71,
+ name: "枪支位置",
},
carPng,
0.8,
@@ -253,12 +239,6 @@
this.disposeTime(startTime.getMinutes()) +
":" +
this.disposeTime(startTime.getSeconds());
-
- const startTWO =
- startTime.getFullYear() + '' +
- this.disposeTime(startTime.getMonth() + 1) + '' +
- this.disposeTime(startTime.getDate());
-
if (this.trackTime.length == 1) {
this.$message({ message: "请选择结束时间", duration: 2000 });
return;
@@ -277,48 +257,22 @@
":" +
this.disposeTime(endTime.getSeconds());
- const endTWO =
- endTime.getFullYear() + '' +
- this.disposeTime(endTime.getMonth() + 1) + '' +
- this.disposeTime(endTime.getDate());
-
getTrack({
workerId: this.detailObj.id,
type: 2,
startTime: start,
endTime: end,
}).then((res) => {
+ var result = res.data.data;
+ if (result.length > 1) {
+ let arr = [];
- getNewCarTark({
- beginTime: startTWO,
- endTime: endTWO,
- rectify: 0,
- callbackId: 123
- }).then(res => {
- axios.get('http://s16s652780.51mypc.cn/car/' + res.data.data).then(result => {
- var ret = d3.csvParse(result.data)
+ result.forEach((item) => {
+ arr.push([Number(item.longitude), Number(item.latitude)]);
+ });
- let arr = [];
- ret.forEach((item, index) => {
- if (index < ret.length - 1) {
- arr.push([Number(item.x), Number(item.y)]);
- }
-
- })
-
- this.$refs.modalForm.addLines(arr);
- })
- })
- // var result = res.data.data;
- // if (result.length > 1) {
- // let arr = [];
-
- // result.forEach((item) => {
- // arr.push([Number(item.longitude), Number(item.latitude)]);
- // });
-
- // this.$refs.modalForm.addLines(arr);
- // }
+ this.$refs.modalForm.addLines(arr);
+ }
});
},
// 处理时间补零操作
@@ -351,101 +305,20 @@
if (cont != undefined) {
that.dialogVisible = true
- var oneflag = false, twoflag = false, threefalse = false, fourfalse = false;
- getVideoSrc({ camera: 0, action: 'start' }).then(res => {
- oneflag = true;
- if (twoflag == true && threefalse == true && fourfalse == true) {
- that.videoLoading = false;
- }
- if (flvjs.isSupported()) {
- var videoElement = document.getElementById('videoElementOne')
- var flvPlayer = flvjs.createPlayer({
- // isLive: true,
- // hasAudio: false,
- type: 'flv',
- url: res.data.data.live_url
- })
- flvPlayer.attachMediaElement(videoElement)
- flvPlayer.load()
- flvPlayer.play()
- }
- })
- getVideoSrc({ camera: 1, action: 'start' }).then(res => {
- twoflag = true;
- if (oneflag == true && threefalse == true && fourfalse == true) {
- that.videoLoading = false;
- }
- if (flvjs.isSupported()) {
- var videoElement = document.getElementById('videoElementTwo')
- var flvPlayer = flvjs.createPlayer({
- // isLive: true,
- // hasAudio: false,
- type: 'flv',
- url: res.data.data.live_url
- })
- flvPlayer.attachMediaElement(videoElement)
- flvPlayer.load()
- flvPlayer.play()
- }
- })
-
- getVideoSrc({ camera: 2, action: 'start' }).then(res => {
- threefalse = true;
- if (oneflag == true && twoflag == true && fourfalse == true) {
- that.videoLoading = false;
- }
- if (flvjs.isSupported()) {
- var videoElement = document.getElementById('videoElementThree')
- var flvPlayer = flvjs.createPlayer({
- // isLive: true,
- // hasAudio: false,
- type: 'flv',
- url: res.data.data.live_url
- })
- flvPlayer.attachMediaElement(videoElement)
- flvPlayer.load()
- flvPlayer.play()
- }
- })
-
- getVideoSrc({ camera: 4, action: 'start' }).then(res => {
- fourfalse = true;
- if (oneflag == true && twoflag == true && threefalse == true) {
- that.videoLoading = false;
- }
- if (flvjs.isSupported()) {
- var videoElement = document.getElementById('videoElementFour')
- var flvPlayer = flvjs.createPlayer({
- // isLive: true,
- // hasAudio: false,
- type: 'flv',
- url: res.data.data.live_url
- })
- flvPlayer.attachMediaElement(videoElement)
- flvPlayer.load()
- flvPlayer.play()
- }
- })
-
+ setTimeout(() =>{
+ that.$refs.videoIframe.contentWindow.startVideo()
+ },3000);
}
})
},
- videoClose () {
- this.dialogVisible = false;
- getVideoSrc({ camera: 0, action: 'stop' })
+ dialogBeforeClose() {
+ this.dialogVisible = false
- getVideoSrc({ camera: 1, action: 'stop' })
+ this.$refs.videoIframe.contentWindow.closeVideo()
- getVideoSrc({ camera: 2, action: 'stop' })
-
- getVideoSrc({ camera: 4, action: 'stop' })
- },
-
- dialogBeforeClose () {
- this.dialogVisible = false
}
},
@@ -544,50 +417,6 @@
}
}
}
- }
-}
-
-.car-video-box {
- .container {
- position: relative;
- width: 100%;
- height: 100%;
- display: flex;
- flex-wrap: wrap;
- video {
- flex: 1;
- width: 50%;
- height: 50%;
- object-fit: fill;
- }
- // #videoElementOne {
- // position: absolute;
- // top: 0;
- // left: 0;
- // width: 50%;
- // height: 50%;
- // }
- // #videoElementTwo {
- // position: absolute;
- // top: 0;
- // right: 0;
- // width: 50%;
- // height: 50%;
- // }
- // #videoElementThree {
- // position: absolute;
- // bottom: 0;
- // left: 0;
- // width: 50%;
- // height: 50%;
- // }
- // #videoElementFour {
- // position: absolute;
- // bottom: 0;
- // right: 0;
- // width: 50%;
- // height: 50%;
- // }
}
}
</style>
diff --git a/src/views/map/carGps copy.vue b/src/views/map/carGps1.vue
similarity index 62%
rename from src/views/map/carGps copy.vue
rename to src/views/map/carGps1.vue
index f34b320..96206cc 100644
--- a/src/views/map/carGps copy.vue
+++ b/src/views/map/carGps1.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-17 09:20:19
+ * @Last Modified time: 2021-11-26 17:27:56
* menu-name 押运人员定位
*/
<template>
@@ -122,24 +122,38 @@
</div>
</el-card>
- <el-dialog title=""
+ <el-dialog title="视频监控"
:modal='false'
:visible.sync="dialogVisible"
:before-close="dialogBeforeClose"
:close-on-click-modal='false'
+ @closed="videoClose"
class="car-video-box">
- <iframe src="/carVideo/parent.html"
- ref="videoIframe"
- frameborder="0"></iframe>
+ <div class="container"
+ v-loading="videoLoading">
+ <video id="videoElementOne"
+ controls="controls"></video>
+ <video id="videoElementTwo"
+ controls="controls"></video>
+ <video id="videoElementThree"
+ controls="controls"></video>
+ <video id="videoElementFour"
+ controls="controls"></video>
+ </div>
</el-dialog>
</el-col>
</el-row>
</template>
<script>
-import { getCarList, getPosition, getTrack } from "@/api/map/car";
+import { getCarList, getPosition, getNewPosition, getTrack, getVideoSrc, getNewCarTark } from "@/api/map/car";
+import axios from 'axios';
import carPng from "@/assets/img/car.png";
+
+import flvjs from 'flv.js/dist/flv.min.js';
+
+const d3 = require('d3-dsv');
export default {
data () {
@@ -156,16 +170,13 @@
detailObj: {},
dialogVisible: false,
map: null,
+ videoLoading: true
};
},
created () {
this.getList();
},
mounted () {
-
-
-
-
},
methods: {
@@ -192,14 +203,17 @@
},
positionClick (val) {
- getPosition({ type: 2, workerId: val.id }).then((result) => {
+ // console.log(val)
+
+ getNewPosition({ imei: "861636056082414" }).then((result) => {
var res = result.data.data;
+
if (JSON.stringify(res) != "{}") {
this.$refs.modalForm.addEntitys(
{
- LGTD: 115.86,
- LTTD: 28.71,
- name: "枪支位置",
+ LGTD: res.x,
+ LTTD: res.y,
+ name: "车辆位置",
},
carPng,
0.8,
@@ -239,6 +253,12 @@
this.disposeTime(startTime.getMinutes()) +
":" +
this.disposeTime(startTime.getSeconds());
+
+ const startTWO =
+ startTime.getFullYear() + '' +
+ this.disposeTime(startTime.getMonth() + 1) + '' +
+ this.disposeTime(startTime.getDate());
+
if (this.trackTime.length == 1) {
this.$message({ message: "请选择结束时间", duration: 2000 });
return;
@@ -257,22 +277,48 @@
":" +
this.disposeTime(endTime.getSeconds());
+ const endTWO =
+ endTime.getFullYear() + '' +
+ this.disposeTime(endTime.getMonth() + 1) + '' +
+ this.disposeTime(endTime.getDate());
+
getTrack({
workerId: this.detailObj.id,
type: 2,
startTime: start,
endTime: end,
}).then((res) => {
- var result = res.data.data;
- if (result.length > 1) {
- let arr = [];
- result.forEach((item) => {
- arr.push([Number(item.longitude), Number(item.latitude)]);
- });
+ getNewCarTark({
+ beginTime: startTWO,
+ endTime: endTWO,
+ rectify: 0,
+ callbackId: 123
+ }).then(res => {
+ axios.get('http://s16s652780.51mypc.cn/car/' + res.data.data).then(result => {
+ var ret = d3.csvParse(result.data)
- this.$refs.modalForm.addLines(arr);
- }
+ let arr = [];
+ ret.forEach((item, index) => {
+ if (index < ret.length - 1) {
+ arr.push([Number(item.x), Number(item.y)]);
+ }
+
+ })
+
+ this.$refs.modalForm.addLines(arr);
+ })
+ })
+ // var result = res.data.data;
+ // if (result.length > 1) {
+ // let arr = [];
+
+ // result.forEach((item) => {
+ // arr.push([Number(item.longitude), Number(item.latitude)]);
+ // });
+
+ // this.$refs.modalForm.addLines(arr);
+ // }
});
},
// 处理时间补零操作
@@ -305,20 +351,101 @@
if (cont != undefined) {
that.dialogVisible = true
+ var oneflag = false, twoflag = false, threefalse = false, fourfalse = false;
+ getVideoSrc({ camera: 0, action: 'start' }).then(res => {
+ oneflag = true;
+ if (twoflag == true && threefalse == true && fourfalse == true) {
+ that.videoLoading = false;
+ }
+ if (flvjs.isSupported()) {
+ var videoElement = document.getElementById('videoElementOne')
+ var flvPlayer = flvjs.createPlayer({
+ // isLive: true,
+ // hasAudio: false,
+ type: 'flv',
+ url: res.data.data.live_url
+ })
+ flvPlayer.attachMediaElement(videoElement)
+ flvPlayer.load()
+ flvPlayer.play()
+ }
+ })
- setTimeout(() =>{
- that.$refs.videoIframe.contentWindow.startVideo()
- },3000);
+ getVideoSrc({ camera: 1, action: 'start' }).then(res => {
+ twoflag = true;
+ if (oneflag == true && threefalse == true && fourfalse == true) {
+ that.videoLoading = false;
+ }
+ if (flvjs.isSupported()) {
+ var videoElement = document.getElementById('videoElementTwo')
+ var flvPlayer = flvjs.createPlayer({
+ // isLive: true,
+ // hasAudio: false,
+ type: 'flv',
+ url: res.data.data.live_url
+ })
+ flvPlayer.attachMediaElement(videoElement)
+ flvPlayer.load()
+ flvPlayer.play()
+ }
+ })
+
+ getVideoSrc({ camera: 2, action: 'start' }).then(res => {
+ threefalse = true;
+ if (oneflag == true && twoflag == true && fourfalse == true) {
+ that.videoLoading = false;
+ }
+ if (flvjs.isSupported()) {
+ var videoElement = document.getElementById('videoElementThree')
+ var flvPlayer = flvjs.createPlayer({
+ // isLive: true,
+ // hasAudio: false,
+ type: 'flv',
+ url: res.data.data.live_url
+ })
+ flvPlayer.attachMediaElement(videoElement)
+ flvPlayer.load()
+ flvPlayer.play()
+ }
+ })
+
+ getVideoSrc({ camera: 4, action: 'start' }).then(res => {
+ fourfalse = true;
+ if (oneflag == true && twoflag == true && threefalse == true) {
+ that.videoLoading = false;
+ }
+ if (flvjs.isSupported()) {
+ var videoElement = document.getElementById('videoElementFour')
+ var flvPlayer = flvjs.createPlayer({
+ // isLive: true,
+ // hasAudio: false,
+ type: 'flv',
+ url: res.data.data.live_url
+ })
+ flvPlayer.attachMediaElement(videoElement)
+ flvPlayer.load()
+ flvPlayer.play()
+ }
+ })
+
}
})
},
- dialogBeforeClose() {
- this.dialogVisible = false
+ videoClose () {
+ this.dialogVisible = false;
+ getVideoSrc({ camera: 0, action: 'stop' })
- this.$refs.videoIframe.contentWindow.closeVideo()
+ getVideoSrc({ camera: 1, action: 'stop' })
+ getVideoSrc({ camera: 2, action: 'stop' })
+
+ getVideoSrc({ camera: 4, action: 'stop' })
+ },
+
+ dialogBeforeClose () {
+ this.dialogVisible = false
}
},
@@ -419,4 +546,48 @@
}
}
}
+
+.car-video-box {
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ video {
+ flex: 1;
+ width: 50%;
+ height: 50%;
+ object-fit: fill;
+ }
+ // #videoElementOne {
+ // position: absolute;
+ // top: 0;
+ // left: 0;
+ // width: 50%;
+ // height: 50%;
+ // }
+ // #videoElementTwo {
+ // position: absolute;
+ // top: 0;
+ // right: 0;
+ // width: 50%;
+ // height: 50%;
+ // }
+ // #videoElementThree {
+ // position: absolute;
+ // bottom: 0;
+ // left: 0;
+ // width: 50%;
+ // height: 50%;
+ // }
+ // #videoElementFour {
+ // position: absolute;
+ // bottom: 0;
+ // right: 0;
+ // width: 50%;
+ // height: 50%;
+ // }
+ }
+}
</style>
diff --git a/src/views/map/peopleGps.vue b/src/views/map/peopleGps.vue
index dc43f21..6fc3960 100644
--- a/src/views/map/peopleGps.vue
+++ b/src/views/map/peopleGps.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-25 13:48:23
+ * @Last Modified time: 2021-11-26 16:30:27
* menu-name 押运人员定位
*/
<template>
@@ -161,6 +161,8 @@
getPeopleList({
current: this.page.currentPage,
size: this.page.pageSize,
+ deptId: '1460129345988239362',
+ type: 1
}).then((res) => {
var data = res.data.data;
@@ -190,42 +192,42 @@
positionClick (val) {
getPosition({ type: 1, workerId: val.id }).then((result) => {
- getNewPeople().then(res => {
+ // getNewPeople().then(res => {
- if (JSON.stringify(res.data) != "{}") {
- var arr = res.data.sort(function (a, b) {
- return a['date'] < b['date'] ? 1 : -1
- })
+ // if (JSON.stringify(res.data) != "{}") {
+ // var arr = res.data.sort(function (a, b) {
+ // return a['date'] < b['date'] ? 1 : -1
+ // })
- this.$refs.modalForm.addEntitys(
- {
- LGTD: arr[0].gis_jd,
- LTTD: arr[0].gis_wd,
- name: "人员位置",
- },
- peoplePng,
- 0.5,
- "peoplelayer",
- "peopleAddlayer"
- );
- }
- })
+ // this.$refs.modalForm.addEntitys(
+ // {
+ // LGTD: arr[0].gis_jd,
+ // LTTD: arr[0].gis_wd,
+ // name: "人员位置",
+ // },
+ // peoplePng,
+ // 0.5,
+ // "peoplelayer",
+ // "peopleAddlayer"
+ // );
+ // }
+ // })
- // var res = result.data.data;
- // if (JSON.stringify(res) != "{}") {
- // this.$refs.modalForm.addEntitys(
- // {
- // LGTD: res.longitude,
- // LTTD: res.latitude,
- // name: "人员位置",
- // },
- // peoplePng,
- // 0.5,
- // "peoplelayer",
- // "peopleAddlayer"
- // );
- // }
+ var res = result.data.data;
+ if (JSON.stringify(res) != "{}") {
+ this.$refs.modalForm.addEntitys(
+ {
+ LGTD: res.longitude,
+ LTTD: res.latitude,
+ name: "人员位置",
+ },
+ peoplePng,
+ 0.5,
+ "peoplelayer",
+ "peopleAddlayer"
+ );
+ }
});
},
@@ -282,36 +284,36 @@
type: 1,
startTime: start,
endTime: end,
- }).then((result) => {
+ }).then((res) => {
- getNewTark().then(res => {
+ // getNewTark().then(res => {
- if (JSON.stringify(res.data.track) != "{}") {
+ // if (JSON.stringify(res.data.track) != "{}") {
- if (res.data.track.length > 1) {
- let arr = [];
+ // if (res.data.track.length > 1) {
+ // let arr = [];
- res.data.track.forEach((item) => {
- arr.push([Number(item.gis_jd), Number(item.gis_wd)]);
- });
+ // res.data.track.forEach((item) => {
+ // arr.push([Number(item.gis_jd), Number(item.gis_wd)]);
+ // });
- this.$refs.modalForm.addLines(arr);
- }
+ // this.$refs.modalForm.addLines(arr);
+ // }
- }
+ // }
- })
+ // })
- // var result = res.data.data;
- // if (result.length > 1) {
- // let arr = [];
+ var result = res.data.data;
+ if (result.length > 1) {
+ let arr = [];
- // result.forEach((item) => {
- // arr.push([Number(item.longitude), Number(item.latitude)]);
- // });
+ result.forEach((item) => {
+ arr.push([Number(item.longitude), Number(item.latitude)]);
+ });
- // this.$refs.modalForm.addLines(arr);
- // }
+ this.$refs.modalForm.addLines(arr);
+ }
});
},
// 处理时间补零操作
--
Gitblit v1.9.3