shuishen
2021-11-30 8cbb44a2182a992faeeb0c1fa08e64fb104ae75c
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 = [];