保安监管系统-验收版本
liuyg
2021-12-01 2c562e0c277ffe2bc90a39081a2b456e9d23c948
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-30 17:31:34
 * menu-name 押运人员定位
 */
<template>
@@ -203,16 +203,16 @@
        },
        positionClick (val) {
            // console.log(val)
            getNewPosition({ imei: "861636056082414" }).then((result) => {
                var res = result.data.data;
                if (JSON.stringify(res) != "{}") {
                    this.$refs.modalForm.addEntitys(
                        {
                            LGTD: res.x,
                            LTTD: res.y,
                            LGTD: Number(res.x),
                            LTTD: Number(res.y),
                            name: "车辆位置",
                        },
                        carPng,
@@ -254,7 +254,7 @@
                ":" +
                this.disposeTime(startTime.getSeconds());
            const startTWO =
            const startTwo =
                startTime.getFullYear() + '' +
                this.disposeTime(startTime.getMonth() + 1) + '' +
                this.disposeTime(startTime.getDate());
@@ -277,7 +277,7 @@
                ":" +
                this.disposeTime(endTime.getSeconds());
            const endTWO =
            const endTwo =
                endTime.getFullYear() + '' +
                this.disposeTime(endTime.getMonth() + 1) + '' +
                this.disposeTime(endTime.getDate());
@@ -290,19 +290,25 @@
            }).then((res) => {
                getNewCarTark({
                    beginTime: startTWO,
                    endTime: endTWO,
                    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)
                        var ret = d3.csvParse(result.data);
                        var b = ret.slice(0, ret.length - 1);
                        var array = b.sort(function (a, b) {
                            return a['ts'] > b['ts'] ? 1 : -1
                        })
                        let arr = [];
                        ret.forEach((item, index) => {
                            if (index < ret.length - 1) {
                                arr.push([Number(item.x), Number(item.y)]);
                            }
                        array.forEach((item) => {
                            arr.push([Number(item.x), Number(item.y)]);
                        })