From 8cbb44a2182a992faeeb0c1fa08e64fb104ae75c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 30 Nov 2021 14:30:18 +0800
Subject: [PATCH] 武装修改

---
 src/views/map/carGps.vue    |   11 ++-
 src/api/map/people.js       |   12 ---
 src/views/map/peopleGps.vue |   51 +---------------
 src/views/map/gunGps.vue    |   49 +++++++++-------
 src/api/map/gun.js          |    9 +++
 src/api/map/car.js          |    4 
 src/styles/map.scss         |    2 
 7 files changed, 53 insertions(+), 85 deletions(-)

diff --git a/src/api/map/car.js b/src/api/map/car.js
index 7eab094..e3a29c9 100644
--- a/src/api/map/car.js
+++ b/src/api/map/car.js
@@ -18,7 +18,7 @@
 
 export const getTrack = (param) => {
   return request({
-    url: '/api/liveLocation/getLocusInfoList',
+    url: '/api/locus/pages',
     method: 'get',
     params: param
   })
@@ -26,7 +26,7 @@
 
 export const getNewPosition = (param) => {
   return request({
-    url: '/api/car/locationcar',
+    url: '/api/liveLocation/detail',
     method: 'get',
     params: param
   })
diff --git a/src/api/map/gun.js b/src/api/map/gun.js
index 43819a5..1f7051d 100644
--- a/src/api/map/gun.js
+++ b/src/api/map/gun.js
@@ -23,3 +23,12 @@
     params: param
   })
 }
+
+
+export const getNewTrack = (param) => {
+  return request({
+    url: '/api/investigate/gun',
+    method: 'get',
+    params: param
+  })
+}
diff --git a/src/api/map/people.js b/src/api/map/people.js
index 5f37987..765f44d 100644
--- a/src/api/map/people.js
+++ b/src/api/map/people.js
@@ -27,7 +27,7 @@
 
 export const getTrack = (param) => {
     return request({
-        url: '/api/liveLocation/getLocusInfoList',
+        url: '/api/locus/pages',
         method: 'get',
         params: param
     })
@@ -42,15 +42,7 @@
 
 export const getNewPeople = (param) => {
   return request({
-    url: '/api/car/Peo',
-    method: 'get',
-    params: param
-  })
-}
-
-export const getNewTark = (param) => {
-  return request({
-    url: '/api/car/Peog',
+    url: '/api/liveLocation/detail',
     method: 'get',
     params: param
   })
diff --git a/src/styles/map.scss b/src/styles/map.scss
index aad2e2e..9419458 100644
--- a/src/styles/map.scss
+++ b/src/styles/map.scss
@@ -2,7 +2,7 @@
 #avue-view {
   &>.morpheus-map-box {
     position: absolute;
-    top: 40px;
+    top: 0px;
     left: 0px;
     right: 0px;
     bottom: 0px;
diff --git a/src/views/map/carGps.vue b/src/views/map/carGps.vue
index f34b320..8b9a875 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-17 09:20:19
+ * @Last Modified time: 2021-11-30 14:12:02
  * menu-name 押运人员定位
  */
 <template>
@@ -137,7 +137,7 @@
 </template>
 
 <script>
-import { getCarList, getPosition, getTrack } from "@/api/map/car";
+import { getCarList, getTrack, getNewPosition } from "@/api/map/car";
 
 import carPng from "@/assets/img/car.png";
 
@@ -173,6 +173,7 @@
             getCarList({
                 current: this.page.currentPage,
                 size: this.page.pageSize,
+                type: 1
             }).then((res) => {
                 var data = res.data.data;
                 this.tableData = data.records;
@@ -192,7 +193,7 @@
         },
 
         positionClick (val) {
-            getPosition({ type: 2, workerId: val.id }).then((result) => {
+            getNewPosition({ type: 2, workerId: val.carNumber }).then((result) => {
                 var res = result.data.data;
                 if (JSON.stringify(res) != "{}") {
                     this.$refs.modalForm.addEntitys(
@@ -258,9 +259,9 @@
                 this.disposeTime(endTime.getSeconds());
 
             getTrack({
-                workerId: this.detailObj.id,
+                workerId: this.detailObj.carNumber,
                 type: 2,
-                startTime: start,
+                beginTime: start,
                 endTime: end,
             }).then((res) => {
                 var result = res.data.data;
diff --git a/src/views/map/gunGps.vue b/src/views/map/gunGps.vue
index 0a0b251..987d2d4 100644
--- a/src/views/map/gunGps.vue
+++ b/src/views/map/gunGps.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:21:20
+ * @Last Modified time: 2021-11-30 14:22:39
  * menu-name 押运人员定位
  */
 <template>
@@ -141,7 +141,7 @@
 </template>
 
 <script>
-import { getGunList, getPosition, getTrack } from "@/api/map/gun";
+import { getGunList, getPosition, getTrack, getNewTrack } from "@/api/map/gun";
 
 import gunPng from "@/assets/img/gun.png";
 
@@ -230,13 +230,7 @@
         "-" +
         this.disposeTime(startTime.getMonth() + 1) +
         "-" +
-        this.disposeTime(startTime.getDate()) +
-        " " +
-        this.disposeTime(startTime.getHours()) +
-        ":" +
-        this.disposeTime(startTime.getMinutes()) +
-        ":" +
-        this.disposeTime(startTime.getSeconds());
+        this.disposeTime(startTime.getDate());
       if (this.trackTime.length == 1) {
         this.$message({ message: "请选择结束时间", duration: 2000 });
         return;
@@ -247,31 +241,44 @@
         "-" +
         this.disposeTime(endTime.getMonth() + 1) +
         "-" +
-        this.disposeTime(endTime.getDate()) +
-        " " +
-        this.disposeTime(endTime.getHours()) +
-        ":" +
-        this.disposeTime(endTime.getMinutes()) +
-        ":" +
-        this.disposeTime(endTime.getSeconds());
+        this.disposeTime(endTime.getDate());
 
-      getTrack({
-        workerId: this.detailObj.id,
-        type: 3,
+      // getTrack({
+      //   workerId: this.detailObj.id,
+      //   type: 3,
+      //   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)]);
+      //     });
+
+      //     this.$refs.modalForm.addLines(arr);
+      //   }
+      // });
+
+      getNewTrack({
         startTime: start,
         endTime: end,
       }).then((res) => {
+        console.log(res, "车辆轨迹");
         var result = res.data.data;
         if (result.length > 1) {
           let arr = [];
 
-          result.forEach((item) => {
-            arr.push([Number(item.longitude), Number(item.latitude)]);
+          result.res.forEach((item) => {
+            arr.push([Number(item.dwjd), Number(item.dwwd)]);
           });
 
           this.$refs.modalForm.addLines(arr);
         }
       });
+
+
     },
     // 处理时间补零操作
     disposeTime(s) {
diff --git a/src/views/map/peopleGps.vue b/src/views/map/peopleGps.vue
index 6fc3960..c9398e6 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-26 16:30:27
+ * @Last Modified time: 2021-11-30 14:12:12
  * menu-name 押运人员定位
  */
 <template>
@@ -131,7 +131,7 @@
 </template>
 
 <script>
-import { getPeopleList, getPosition, getTrack, getNewPeople, getNewTark } from "@/api/map/people";
+import { getPeopleList, getTrack, getNewPeople } from "@/api/map/people";
 
 import peoplePng from "@/assets/img/people.png";
 export default {
@@ -190,30 +190,8 @@
         },
 
         positionClick (val) {
-            getPosition({ type: 1, workerId: val.id }).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
-                //         })
-
-                //         this.$refs.modalForm.addEntitys(
-                //             {
-                //                 LGTD: arr[0].gis_jd,
-                //                 LTTD: arr[0].gis_wd,
-                //                 name: "人员位置",
-                //             },
-                //             peoplePng,
-                //             0.5,
-                //             "peoplelayer",
-                //             "peopleAddlayer"
-                //         );
-                //     }
-                // })
-
-
+          getNewPeople({ type: 1, workerId: val.id }).then((result) => {
                 var res = result.data.data;
                 if (JSON.stringify(res) != "{}") {
                     this.$refs.modalForm.addEntitys(
@@ -228,8 +206,8 @@
                         "peopleAddlayer"
                     );
                 }
-
             });
+
         },
 
         detailsClick (row) {
@@ -282,28 +260,9 @@
             getTrack({
                 workerId: this.detailObj.id,
                 type: 1,
-                startTime: start,
+                beginTime: start,
                 endTime: end,
             }).then((res) => {
-
-                // getNewTark().then(res => {
-
-                //     if (JSON.stringify(res.data.track) != "{}") {
-
-                //         if (res.data.track.length > 1) {
-                //             let arr = [];
-
-                //             res.data.track.forEach((item) => {
-                //                 arr.push([Number(item.gis_jd), Number(item.gis_wd)]);
-                //             });
-
-                //             this.$refs.modalForm.addLines(arr);
-                //         }
-
-                //     }
-
-                // })
-
                 var result = res.data.data;
                 if (result.length > 1) {
                     let arr = [];

--
Gitblit v1.9.3