zhongrj
2024-03-27 cc1c0a396698648256c350f6f0fe2cb2f0b02c7e
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-30 14:12:02
 * @Last Modified time: 2021-11-30 17:32:40
 * menu-name 押运人员定位
 */
<template>
@@ -195,11 +195,12 @@
        positionClick (val) {
            getNewPosition({ type: 2, workerId: val.carNumber }).then((result) => {
                var res = result.data.data;
                console.log(res, 123)
                if (JSON.stringify(res) != "{}") {
                    this.$refs.modalForm.addEntitys(
                        {
                            LGTD: 115.86,
                            LTTD: 28.71,
                            LGTD: Number(res.longitude),
                            LTTD: Number(res.latitude),
                            name: "枪支位置",
                        },
                        carPng,
@@ -265,10 +266,15 @@
                endTime: end,
            }).then((res) => {
                var result = res.data.data;
                if (result.length > 1) {
                var array = result.sort(function (a, b) {
                    return a['record_time'] > b['record_time'] ? 1 : -1
                })
                if (array.length > 1) {
                    let arr = [];
                    result.forEach((item) => {
                    array.forEach((item) => {
                        arr.push([Number(item.longitude), Number(item.latitude)]);
                    });
@@ -307,18 +313,18 @@
                if (cont != undefined) {
                    that.dialogVisible = true
                  setTimeout(() =>{
                    that.$refs.videoIframe.contentWindow.startVideo()
                  },3000);
                    setTimeout(() => {
                        that.$refs.videoIframe.contentWindow.startVideo()
                    }, 3000);
                }
            })
        },
        dialogBeforeClose() {
          this.dialogVisible = false
        dialogBeforeClose () {
            this.dialogVisible = false
          this.$refs.videoIframe.contentWindow.closeVideo()
            this.$refs.videoIframe.contentWindow.closeVideo()
        }