shuishen
2021-11-19 d1f59bbdbf43c8008536409a9f5087eeca587e20
人员定位及轨迹修改
1 files modified
24 ■■■■ changed files
src/views/map/peopleGps.vue 24 ●●●● patch | view | raw | blame | history
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-19 10:43:46
 * @Last Modified time: 2021-11-19 11:21:31
 * menu-name 押运人员定位
 */
<template>
@@ -153,7 +153,7 @@
    },
    created () {
        this.newAxios = axios.create({
            baseURL: 'http://47.104.104.46/',
            baseURL: 'http://47.104.104.46',
            timeout: 600000 // request timeout
        })
@@ -194,12 +194,14 @@
        positionClick (val) {
            getPosition({ type: 1, workerId: val.id }).then((result) => {
                newPeople().then(res => {
                  console.log(res)
                this.newAxios({
                    url: '/api/client/getgis.php?acc=7731',
                    method: 'get'
                }).then(res => {
                    if (JSON.stringify(res) != "{}") {
                        var arr = arr.sort(function (a, b) {
                            return b[0]['date'] < a[0]['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(
@@ -288,16 +290,16 @@
            }).then((result) => {
                this.newAxios({
                    url: 'api/client/getgistrack.php?number=7730&acc=7731',
                    url: '/api/client/getgistrack.php?number=7730&acc=7731',
                    method: 'get'
                }).then(res => {
                    if (JSON.stringify(res) != "{}") {
                    if (JSON.stringify(res.data.track) != "{}") {
                        if (res.length > 1) {
                        if (res.data.track.length > 1) {
                            let arr = [];
                            res.track.forEach((item) => {
                            res.data.track.forEach((item) => {
                                arr.push([Number(item.gis_jd), Number(item.gis_wd)]);
                            });