3 files modified
1 files renamed
| | |
| | | :permission="permissionList" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdates" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | :visible.sync="seeLocationFlag" |
| | | :modal-append-to-body="false" |
| | | width="width"> |
| | | <Map v-if="seeLocationFlag" ref="locationForm" /> |
| | | <Map v-if="seeLocationFlag" |
| | | ref="locationForm" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog class="see-track" |
| | |
| | | </el-button> |
| | | </div> |
| | | |
| | | <Map v-if="seeTrackFlag" ref="tarckForm" /> |
| | | <Map v-if="seeTrackFlag" |
| | | ref="tarckForm" /> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | |
| | | // import { datasing } from "./dataqualificationExamination"; |
| | | // import { getList } from "@/api/qualificationExamination/qualificationExamination"; |
| | | import { getLisperetaskDistribution } from "@/api/commandQuery/commandQuery"; |
| | | import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList, getNewPeople, getNewTark } from "@/api/map/people"; |
| | | import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList} from "@/api/map/people"; |
| | | |
| | | import peoplePng from "@/assets/img/people.png"; |
| | | |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | rowSave (row, done, loading) { |
| | | adddata(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdates (row, index, done, loading) { |
| | | // console.log(42342); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | // beforeOpen(done, type) { |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then((res) => { |
| | |
| | | this.seeLocationFlag = true |
| | | |
| | | getDirectiveLiveLocationVoList({ type: 1, userIds: row.receiveDirectiveIds }).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 |
| | | }) |
| | | |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "[]") { |
| | | res.forEach((data) => { |
| | | this.$refs.locationForm.addEntitys( |
| | | { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd, |
| | | LGTD: data.longitude, |
| | | LTTD: data.latitude, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | |
| | | "peoplelayer", |
| | | "peopleAddlayer" |
| | | ); |
| | | } |
| | | }) |
| | | |
| | | // var res = result.data.data; |
| | | // if (JSON.stringify(res) != "[]") { |
| | | // res.forEach((data)=>{ |
| | | // this.$refs.locationForm.addEntitys( |
| | | // { |
| | | // LGTD: data.longitude, |
| | | // LTTD: data.latitude, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // }) |
| | | // } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | |
| | |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | getNewTark().then(res => { |
| | | |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | |
| | | if (res.data.track.length > 1) { |
| | | var result = res.data.data; |
| | | if (JSON.stringify(res) != "[]") { |
| | | result.forEach((item) => { |
| | | if (item.length > 1) { |
| | | let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | item.forEach((data) => { |
| | | arr.push([Number(data.longitude), Number(data.latitude)]); |
| | | }); |
| | | |
| | | this.$refs.tarckForm.addLines(arr); |
| | | } |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | // var result = res.data.data; |
| | | // if (JSON.stringify(res) != "[]") { |
| | | // result.forEach((item) => { |
| | | // if (item.length > 1) { |
| | | // let arr = []; |
| | | |
| | | // item.forEach((data) => { |
| | | // arr.push([Number(data.longitude), Number(data.latitude)]); |
| | | // }); |
| | | |
| | | // this.$refs.tarckForm.addLines(arr); |
| | | // } |
| | | // }) |
| | | // } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | |
| | |
| | | * @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-17 09:20:19 |
| | | * menu-name 押运人员定位 |
| | | */ |
| | | <template> |
| | |
| | | </div> |
| | | </el-card> |
| | | |
| | | <el-dialog title="视频监控" |
| | | <el-dialog title="" |
| | | :modal='false' |
| | | :visible.sync="dialogVisible" |
| | | :before-close="dialogBeforeClose" |
| | | :close-on-click-modal='false' |
| | | @closed="videoClose" |
| | | class="car-video-box"> |
| | | <div class="container" |
| | | v-loading="videoLoading"> |
| | | <video id="videoElementOne" |
| | | controls="controls"></video> |
| | | <video id="videoElementTwo" |
| | | controls="controls"></video> |
| | | <video id="videoElementThree" |
| | | controls="controls"></video> |
| | | <video id="videoElementFour" |
| | | controls="controls"></video> |
| | | </div> |
| | | <iframe src="/carVideo/parent.html" |
| | | ref="videoIframe" |
| | | frameborder="0"></iframe> |
| | | </el-dialog> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCarList, getPosition, getNewPosition, getTrack, getVideoSrc, getNewCarTark } from "@/api/map/car"; |
| | | import axios from 'axios'; |
| | | import { getCarList, getPosition, getTrack } from "@/api/map/car"; |
| | | |
| | | import carPng from "@/assets/img/car.png"; |
| | | |
| | | import flvjs from 'flv.js/dist/flv.min.js'; |
| | | |
| | | const d3 = require('d3-dsv'); |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | detailObj: {}, |
| | | dialogVisible: false, |
| | | map: null, |
| | | videoLoading: true |
| | | }; |
| | | }, |
| | | created () { |
| | | this.getList(); |
| | | }, |
| | | mounted () { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | |
| | | positionClick (val) { |
| | | // console.log(val) |
| | | |
| | | getNewPosition({ imei: "861636056082414" }).then((result) => { |
| | | getPosition({ type: 2, workerId: val.id }).then((result) => { |
| | | var res = result.data.data; |
| | | |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.$refs.modalForm.addEntitys( |
| | | { |
| | | LGTD: res.x, |
| | | LTTD: res.y, |
| | | name: "车辆位置", |
| | | LGTD: 115.86, |
| | | LTTD: 28.71, |
| | | name: "枪支位置", |
| | | }, |
| | | carPng, |
| | | 0.8, |
| | |
| | | this.disposeTime(startTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getSeconds()); |
| | | |
| | | const startTWO = |
| | | startTime.getFullYear() + '' + |
| | | this.disposeTime(startTime.getMonth() + 1) + '' + |
| | | this.disposeTime(startTime.getDate()); |
| | | |
| | | if (this.trackTime.length == 1) { |
| | | this.$message({ message: "请选择结束时间", duration: 2000 }); |
| | | return; |
| | |
| | | ":" + |
| | | this.disposeTime(endTime.getSeconds()); |
| | | |
| | | const endTWO = |
| | | endTime.getFullYear() + '' + |
| | | this.disposeTime(endTime.getMonth() + 1) + '' + |
| | | this.disposeTime(endTime.getDate()); |
| | | |
| | | getTrack({ |
| | | workerId: this.detailObj.id, |
| | | type: 2, |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | var result = res.data.data; |
| | | if (result.length > 1) { |
| | | let arr = []; |
| | | |
| | | getNewCarTark({ |
| | | 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) |
| | | result.forEach((item) => { |
| | | arr.push([Number(item.longitude), Number(item.latitude)]); |
| | | }); |
| | | |
| | | let arr = []; |
| | | ret.forEach((item, index) => { |
| | | if (index < ret.length - 1) { |
| | | arr.push([Number(item.x), Number(item.y)]); |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.$refs.modalForm.addLines(arr); |
| | | }) |
| | | }) |
| | | // 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); |
| | | // } |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | }); |
| | | }, |
| | | // 处理时间补零操作 |
| | |
| | | |
| | | if (cont != undefined) { |
| | | that.dialogVisible = true |
| | | var oneflag = false, twoflag = false, threefalse = false, fourfalse = false; |
| | | getVideoSrc({ camera: 0, action: 'start' }).then(res => { |
| | | oneflag = true; |
| | | if (twoflag == true && threefalse == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementOne') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | getVideoSrc({ camera: 1, action: 'start' }).then(res => { |
| | | twoflag = true; |
| | | if (oneflag == true && threefalse == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementTwo') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | getVideoSrc({ camera: 2, action: 'start' }).then(res => { |
| | | threefalse = true; |
| | | if (oneflag == true && twoflag == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementThree') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | getVideoSrc({ camera: 4, action: 'start' }).then(res => { |
| | | fourfalse = true; |
| | | if (oneflag == true && twoflag == true && threefalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementFour') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | setTimeout(() =>{ |
| | | that.$refs.videoIframe.contentWindow.startVideo() |
| | | },3000); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | videoClose () { |
| | | this.dialogVisible = false; |
| | | getVideoSrc({ camera: 0, action: 'stop' }) |
| | | dialogBeforeClose() { |
| | | this.dialogVisible = false |
| | | |
| | | getVideoSrc({ camera: 1, action: 'stop' }) |
| | | this.$refs.videoIframe.contentWindow.closeVideo() |
| | | |
| | | getVideoSrc({ camera: 2, action: 'stop' }) |
| | | |
| | | getVideoSrc({ camera: 4, action: 'stop' }) |
| | | }, |
| | | |
| | | dialogBeforeClose () { |
| | | this.dialogVisible = false |
| | | } |
| | | |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .car-video-box { |
| | | .container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | video { |
| | | flex: 1; |
| | | width: 50%; |
| | | height: 50%; |
| | | object-fit: fill; |
| | | } |
| | | // #videoElementOne { |
| | | // position: absolute; |
| | | // top: 0; |
| | | // left: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementTwo { |
| | | // position: absolute; |
| | | // top: 0; |
| | | // right: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementThree { |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // left: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementFour { |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // right: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | } |
| | | } |
| | | </style> |
| File was renamed from src/views/map/carGps copy.vue |
| | |
| | | * @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-26 17:27:56 |
| | | * menu-name 押运人员定位 |
| | | */ |
| | | <template> |
| | |
| | | </div> |
| | | </el-card> |
| | | |
| | | <el-dialog title="" |
| | | <el-dialog title="视频监控" |
| | | :modal='false' |
| | | :visible.sync="dialogVisible" |
| | | :before-close="dialogBeforeClose" |
| | | :close-on-click-modal='false' |
| | | @closed="videoClose" |
| | | class="car-video-box"> |
| | | <iframe src="/carVideo/parent.html" |
| | | ref="videoIframe" |
| | | frameborder="0"></iframe> |
| | | <div class="container" |
| | | v-loading="videoLoading"> |
| | | <video id="videoElementOne" |
| | | controls="controls"></video> |
| | | <video id="videoElementTwo" |
| | | controls="controls"></video> |
| | | <video id="videoElementThree" |
| | | controls="controls"></video> |
| | | <video id="videoElementFour" |
| | | controls="controls"></video> |
| | | </div> |
| | | </el-dialog> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCarList, getPosition, getTrack } from "@/api/map/car"; |
| | | import { getCarList, getPosition, getNewPosition, getTrack, getVideoSrc, getNewCarTark } from "@/api/map/car"; |
| | | import axios from 'axios'; |
| | | |
| | | import carPng from "@/assets/img/car.png"; |
| | | |
| | | import flvjs from 'flv.js/dist/flv.min.js'; |
| | | |
| | | const d3 = require('d3-dsv'); |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | detailObj: {}, |
| | | dialogVisible: false, |
| | | map: null, |
| | | videoLoading: true |
| | | }; |
| | | }, |
| | | created () { |
| | | this.getList(); |
| | | }, |
| | | mounted () { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | |
| | | positionClick (val) { |
| | | getPosition({ type: 2, workerId: val.id }).then((result) => { |
| | | // console.log(val) |
| | | |
| | | getNewPosition({ imei: "861636056082414" }).then((result) => { |
| | | var res = result.data.data; |
| | | |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.$refs.modalForm.addEntitys( |
| | | { |
| | | LGTD: 115.86, |
| | | LTTD: 28.71, |
| | | name: "枪支位置", |
| | | LGTD: res.x, |
| | | LTTD: res.y, |
| | | name: "车辆位置", |
| | | }, |
| | | carPng, |
| | | 0.8, |
| | |
| | | this.disposeTime(startTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getSeconds()); |
| | | |
| | | const startTWO = |
| | | startTime.getFullYear() + '' + |
| | | this.disposeTime(startTime.getMonth() + 1) + '' + |
| | | this.disposeTime(startTime.getDate()); |
| | | |
| | | if (this.trackTime.length == 1) { |
| | | this.$message({ message: "请选择结束时间", duration: 2000 }); |
| | | return; |
| | |
| | | ":" + |
| | | this.disposeTime(endTime.getSeconds()); |
| | | |
| | | const endTWO = |
| | | endTime.getFullYear() + '' + |
| | | this.disposeTime(endTime.getMonth() + 1) + '' + |
| | | this.disposeTime(endTime.getDate()); |
| | | |
| | | getTrack({ |
| | | workerId: this.detailObj.id, |
| | | type: 2, |
| | | 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)]); |
| | | }); |
| | | getNewCarTark({ |
| | | 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) |
| | | |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | let arr = []; |
| | | ret.forEach((item, index) => { |
| | | if (index < ret.length - 1) { |
| | | arr.push([Number(item.x), Number(item.y)]); |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.$refs.modalForm.addLines(arr); |
| | | }) |
| | | }) |
| | | // 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); |
| | | // } |
| | | }); |
| | | }, |
| | | // 处理时间补零操作 |
| | |
| | | |
| | | if (cont != undefined) { |
| | | that.dialogVisible = true |
| | | var oneflag = false, twoflag = false, threefalse = false, fourfalse = false; |
| | | getVideoSrc({ camera: 0, action: 'start' }).then(res => { |
| | | oneflag = true; |
| | | if (twoflag == true && threefalse == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementOne') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | setTimeout(() =>{ |
| | | that.$refs.videoIframe.contentWindow.startVideo() |
| | | },3000); |
| | | getVideoSrc({ camera: 1, action: 'start' }).then(res => { |
| | | twoflag = true; |
| | | if (oneflag == true && threefalse == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementTwo') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | getVideoSrc({ camera: 2, action: 'start' }).then(res => { |
| | | threefalse = true; |
| | | if (oneflag == true && twoflag == true && fourfalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementThree') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | getVideoSrc({ camera: 4, action: 'start' }).then(res => { |
| | | fourfalse = true; |
| | | if (oneflag == true && twoflag == true && threefalse == true) { |
| | | that.videoLoading = false; |
| | | } |
| | | if (flvjs.isSupported()) { |
| | | var videoElement = document.getElementById('videoElementFour') |
| | | var flvPlayer = flvjs.createPlayer({ |
| | | // isLive: true, |
| | | // hasAudio: false, |
| | | type: 'flv', |
| | | url: res.data.data.live_url |
| | | }) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | dialogBeforeClose() { |
| | | this.dialogVisible = false |
| | | videoClose () { |
| | | this.dialogVisible = false; |
| | | getVideoSrc({ camera: 0, action: 'stop' }) |
| | | |
| | | this.$refs.videoIframe.contentWindow.closeVideo() |
| | | getVideoSrc({ camera: 1, action: 'stop' }) |
| | | |
| | | getVideoSrc({ camera: 2, action: 'stop' }) |
| | | |
| | | getVideoSrc({ camera: 4, action: 'stop' }) |
| | | }, |
| | | |
| | | dialogBeforeClose () { |
| | | this.dialogVisible = false |
| | | } |
| | | |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .car-video-box { |
| | | .container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | video { |
| | | flex: 1; |
| | | width: 50%; |
| | | height: 50%; |
| | | object-fit: fill; |
| | | } |
| | | // #videoElementOne { |
| | | // position: absolute; |
| | | // top: 0; |
| | | // left: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementTwo { |
| | | // position: absolute; |
| | | // top: 0; |
| | | // right: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementThree { |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // left: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | // #videoElementFour { |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // right: 0; |
| | | // width: 50%; |
| | | // height: 50%; |
| | | // } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-11-25 13:48:23 |
| | | * @Last Modified time: 2021-11-26 16:30:27 |
| | | * menu-name 押运人员定位 |
| | | */ |
| | | <template> |
| | |
| | | getPeopleList({ |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | deptId: '1460129345988239362', |
| | | type: 1 |
| | | }).then((res) => { |
| | | var data = res.data.data; |
| | | |
| | |
| | | positionClick (val) { |
| | | getPosition({ type: 1, workerId: val.id }).then((result) => { |
| | | |
| | | getNewPeople().then(res => { |
| | | // getNewPeople().then(res => { |
| | | |
| | | if (JSON.stringify(res.data) != "{}") { |
| | | var arr = res.data.sort(function (a, b) { |
| | | return a['date'] < b['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( |
| | | { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | | 0.5, |
| | | "peoplelayer", |
| | | "peopleAddlayer" |
| | | ); |
| | | } |
| | | }) |
| | | // this.$refs.modalForm.addEntitys( |
| | | // { |
| | | // LGTD: arr[0].gis_jd, |
| | | // LTTD: arr[0].gis_wd, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | // var res = result.data.data; |
| | | // if (JSON.stringify(res) != "{}") { |
| | | // this.$refs.modalForm.addEntitys( |
| | | // { |
| | | // LGTD: res.longitude, |
| | | // LTTD: res.latitude, |
| | | // name: "人员位置", |
| | | // }, |
| | | // peoplePng, |
| | | // 0.5, |
| | | // "peoplelayer", |
| | | // "peopleAddlayer" |
| | | // ); |
| | | // } |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "{}") { |
| | | this.$refs.modalForm.addEntitys( |
| | | { |
| | | LGTD: res.longitude, |
| | | LTTD: res.latitude, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | | 0.5, |
| | | "peoplelayer", |
| | | "peopleAddlayer" |
| | | ); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | |
| | | type: 1, |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((result) => { |
| | | }).then((res) => { |
| | | |
| | | getNewTark().then(res => { |
| | | // getNewTark().then(res => { |
| | | |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | // if (JSON.stringify(res.data.track) != "{}") { |
| | | |
| | | if (res.data.track.length > 1) { |
| | | let arr = []; |
| | | // if (res.data.track.length > 1) { |
| | | // let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | }); |
| | | // res.data.track.forEach((item) => { |
| | | // arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | // }); |
| | | |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | // this.$refs.modalForm.addLines(arr); |
| | | // } |
| | | |
| | | } |
| | | // } |
| | | |
| | | }) |
| | | // }) |
| | | |
| | | // var result = res.data.data; |
| | | // if (result.length > 1) { |
| | | // let arr = []; |
| | | var result = res.data.data; |
| | | if (result.length > 1) { |
| | | let arr = []; |
| | | |
| | | // result.forEach((item) => { |
| | | // arr.push([Number(item.longitude), Number(item.latitude)]); |
| | | // }); |
| | | result.forEach((item) => { |
| | | arr.push([Number(item.longitude), Number(item.latitude)]); |
| | | }); |
| | | |
| | | // this.$refs.modalForm.addLines(arr); |
| | | // } |
| | | this.$refs.modalForm.addLines(arr); |
| | | } |
| | | }); |
| | | }, |
| | | // 处理时间补零操作 |