Commit 0c7fe56c authored by ninglx's avatar ninglx

展示版本基本完成

parent 22eab69a
...@@ -2,33 +2,12 @@ const map_config = { ...@@ -2,33 +2,12 @@ const map_config = {
SYS_ID: 'CAFC20296895433784C193457A870DFD', SYS_ID: 'CAFC20296895433784C193457A870DFD',
MAP_CENTER: [112.96284186666799, 28.187102143508625], MAP_CENTER: [112.96284186666799, 28.187102143508625],
MAP_ZOOM: 17.048587811931856, MAP_ZOOM: 17.048587811931856,
MAX_ZOOM: 20, MAX_ZOOM: 20,
MAP_PITCH: 0, MAP_PITCH: 0,
MAP_ROTATE: 90, MAP_ROTATE: 90,
MAP_STYLE: 'http://192.168.2.78:9000/style-changsha.json', // 高精 MAP_STYLE: 'http://192.168.2.78:9000/style-changsha.json', // 高精
} }
const ws_config = { const ws_config = {
// BASE_URL: 'ws://192.168.2.156:17021/holows/subscribe',
BASE_URL: 'ws://192.168.2.78:17021/holows/subscribe', BASE_URL: 'ws://192.168.2.78:17021/holows/subscribe',
CROSS_CONTROL: 'ws://192.168.2.78:9000/utc/signalStatus/', CROSS_CONTROL: 'ws://192.168.2.78:9000/utc/signalStatus/',
}
const api_config = {
CROSS_STOP_LINE: '/develop/sgw/dbInterface/zh_changsha_18q3_0303/hd_506_rxhdzxx/multiTable/A443EF992884', // 获取停止线接口
}
const video_config = {
intersectionGroupsVideoUrl: 'http://192.168.2.80/live?app=demo&stream=cloudpoint-1',
//2023-04-11 10:29:36_2023-04-11 10:34:36
groupViewStartTime: '2023-04-11 10:29:36',
//2023-04-10 00:47:20_2023-04-10 00:49:46
accidentViewStartTime: '2023-04-10 00:47:20',
//2023-04-09 01:28:10_2023-04-09 01:28:40
dangerViewStartTime: '2023-04-09 01:28:10',
dronesViewStartTime: '2023-04-09 01:28:10',
mobileViewStartTime: '2023-04-11 20:58:45',
phaseViewStartTime: '2023-04-10 17:21:04',
slowViewStartTime: '2023-04-10 01:22:12',
SLConflictViewStartTime: '2023-04-08 17:28:31',
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
camera: require('../../assets/images/holo/spxj.png'), camera: require('../../assets/images/holo/spxj.png'),
sign: require('../../assets/images/holo/xhj.png'), sign: require('../../assets/images/holo/xhj.png'),
homeCamera: require('../../assets/images/sc/crossCamera.png'), homeCamera: require('../../assets/images/sc/crossCamera.png'),
mobileEquip: require('../../assets/images/sc/mobileEquip.png'),
// light11: require('../../assets/images/sc/leftRed.png'), // light11: require('../../assets/images/sc/leftRed.png'),
// light12: require('../../assets/images/sc/leftYellow.png'), // light12: require('../../assets/images/sc/leftYellow.png'),
......
import fetch from '@/utils/fetch' import fetch from '@/utils/fetch'
// 路口停止线获取 // 路口停止线获取
export const getLinesByCross = (params) => fetch(api_config.CROSS_STOP_LINE, params, 'POST', {}) // export const getLinesByCross = (params) => fetch(api_config.CROSS_STOP_LINE, params, 'POST', {})
// 根据不同场景请求左侧cameraList // 根据不同场景请求左侧cameraList
export const getCameraListByType = (data) => fetch('/holo/event-camera/list', data, 'GET') export const getCameraListByType = (data) => fetch('/holo/event-camera/list', data, 'GET')
......
...@@ -321,7 +321,7 @@ export function addVehicleLayer(scene, msg) { ...@@ -321,7 +321,7 @@ export function addVehicleLayer(scene, msg) {
return pointLayer return pointLayer
} }
// 车辆圆点图层 // 设备
export function addMobilePoint(scene, msg) { export function addMobilePoint(scene, msg) {
const pointLayer = new PointLayer({zIndex: 2}) const pointLayer = new PointLayer({zIndex: 2})
.source(msg, { .source(msg, {
...@@ -329,12 +329,12 @@ export function addMobilePoint(scene, msg) { ...@@ -329,12 +329,12 @@ export function addMobilePoint(scene, msg) {
type: 'json', x: 'longitude', y: 'latitude', type: 'json', x: 'longitude', y: 'latitude',
}, },
}) })
.shape('circle') .shape('mobileEquip')
.style({ // .style({
blur: 1, // blur: 1,
}) // })
.size(24) .size(28)
.color('#e21918') // .color('#e21918')
scene.addLayer(pointLayer) scene.addLayer(pointLayer)
return pointLayer return pointLayer
} }
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1 this.vehicleModelsNum += 1
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
// console.log('count...', window.tb.world.children.length) // console.log('count...', window.tb.world.children.length)
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
this.$refs.right.startVideo() this.$refs.right.startVideo()
...@@ -364,11 +364,8 @@ export default { ...@@ -364,11 +364,8 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.accidentViewStartTime).getTime() this.$refs.refVideo.startVideo()
let getTimeStart = new Date(msg[0].dateTime).getTime() this.$refs.right.startVideo()
let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime)
this.$refs.right.startVideo(videoTime)
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -301,7 +301,7 @@ export default { ...@@ -301,7 +301,7 @@ export default {
// } // }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
this.$refs.rightDangerVideo.startVideo() this.$refs.rightDangerVideo.startVideo()
...@@ -310,11 +310,8 @@ export default { ...@@ -310,11 +310,8 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.dangerViewStartTime).getTime() this.$refs.refVideo.startVideo()
let getTimeStart = new Date(msg[0].dateTime).getTime() this.$refs.rightDangerVideo.startVideo()
let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime)
this.$refs.rightDangerVideo.startVideo(videoTime)
this.msgStart = false this.msgStart = false
} }
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -271,7 +271,7 @@ export default { ...@@ -271,7 +271,7 @@ export default {
} }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
} }
...@@ -279,10 +279,7 @@ export default { ...@@ -279,10 +279,7 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.dronesViewStartTime).getTime() this.$refs.refVideo.startVideo()
let getTimeStart = new Date(msg[0].dateTime).getTime()
let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime)
// this.$refs.refVideo1.startVideo(videoTime) // this.$refs.refVideo1.startVideo(videoTime)
this.msgStart = false this.msgStart = false
} }
......
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
lastMsg: [], lastMsg: [],
timeout: null, timeout: null,
msgStart: true, msgStart: true,
dianyunUrl: video_config.intersectionGroupsVideoUrl,
types: [], types: [],
haveVideo: false, haveVideo: false,
timers: [], timers: [],
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
units: "meters", units: "meters",
scale: 0.8, scale: 0.8,
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}; };
window.tb.loadObj(options, (model) => { window.tb.loadObj(options, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
...@@ -454,7 +454,7 @@ export default { ...@@ -454,7 +454,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
this.changeVehicleDetail(this.selectVehicle) this.changeVehicleDetail(this.selectVehicle)
}, },
// 根据处理后的数组新增-删除-更新模型 // 根据处理后的数组新增-删除-更新模型
...@@ -510,7 +510,7 @@ export default { ...@@ -510,7 +510,7 @@ export default {
// } // }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
console.log('index 重置 ',) console.log('index 重置 ',)
console.log('last 重置', this.lastMsg[0].dateTime) console.log('last 重置', this.lastMsg[0].dateTime)
console.log('current 重置', msg[0].dateTime) console.log('current 重置', msg[0].dateTime)
...@@ -524,13 +524,10 @@ export default { ...@@ -524,13 +524,10 @@ export default {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
// console.log('msg.length',msg.length) // console.log('msg.length',msg.length)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.groupViewStartTime).getTime()
let getTimeStart = new Date(msg[0].dateTime).getTime()
let videoTime = (getTimeStart - realTimeStart) / 1000
for (let item of popups) { for (let item of popups) {
item.$children[0].setTime(videoTime) item.$children[0].setTime()
} }
this.$refs.groupViewPointCamera.setTime(videoTime) this.$refs.groupViewPointCamera.setTime()
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -171,6 +171,7 @@ export default { ...@@ -171,6 +171,7 @@ export default {
components: {msgCard}, components: {msgCard},
data() { data() {
return { return {
flag: 0,
eventTypeUnitMap: { eventTypeUnitMap: {
11: '', 11: '',
16: '', 16: '',
...@@ -291,7 +292,7 @@ export default { ...@@ -291,7 +292,7 @@ export default {
this.getFiveIndexes() this.getFiveIndexes()
let timer = setInterval(() => { let timer = setInterval(() => {
this.getFiveIndexes() this.getFiveIndexes()
}, 1000 * 60) }, 1000)
this.timers.push(timer) this.timers.push(timer)
// 冲突点监测 // 冲突点监测
// pedNonAnalysis().then((res) => { // pedNonAnalysis().then((res) => {
...@@ -339,6 +340,20 @@ export default { ...@@ -339,6 +340,20 @@ export default {
getOverDatas().then(res => { getOverDatas().then(res => {
console.log('5指标', res.content) console.log('5指标', res.content)
this.overDatas = res.content this.overDatas = res.content
// if (this.flag === 360) {
// this.flag = 0
// }
// if (this.flag % 60 !== 1) {
// delete res.content.maxQueueLength
// delete res.content.maxStopNumber
// delete res.content.maxTravelTime
// }
// console.log('ressss', this.flag, res.content)
// for (let key in res.content) {
// this.overDatas[key] = res.content[key]
// }
// this.flag += 1
}) })
}, },
tabsHandleClick(tab) { tabsHandleClick(tab) {
......
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
} }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideoL.startVideo() this.$refs.refVideoL.startVideo()
this.$refs.refVideoR.startVideo() this.$refs.refVideoR.startVideo()
...@@ -307,11 +307,8 @@ export default { ...@@ -307,11 +307,8 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.mobileViewStartTime).getTime() this.$refs.refVideoL.startVideo()
let getTimeStart = new Date(msg[0].dateTime).getTime() this.$refs.refVideoR.startVideo()
let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideoL.startVideo(videoTime)
this.$refs.refVideoR.startVideo(videoTime)
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -35,7 +35,7 @@ import dict from "../../config/holo/dictionary"; ...@@ -35,7 +35,7 @@ import dict from "../../config/holo/dictionary";
import wsSource from "../../config/holo/wsSource"; import wsSource from "../../config/holo/wsSource";
import {initWs} from "../../config/holo/websocket"; import {initWs} from "../../config/holo/websocket";
import * as l7Tools from "../../utils/l7Tools"; import * as l7Tools from "../../utils/l7Tools";
import {getLinesByCross} from "../../dao/api"; // import {getLinesByCross} from "../../dao/api";
let map, let map,
scene, scene,
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
bounds: '', bounds: '',
crossLineInfo: false, crossLineInfo: false,
licenseState: false, licenseState: false,
lastMsg:[], lastMsg: [],
}; };
}, },
watch: {}, watch: {},
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -453,18 +453,18 @@ export default { ...@@ -453,18 +453,18 @@ export default {
// } // }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
} }
this.lastMsg = msg this.lastMsg = msg
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.phaseViewStartTime).getTime() // let realTimeStart = new Date(video_config.phaseViewStartTime).getTime()
let getTimeStart = new Date(msg[0].dateTime).getTime() // let getTimeStart = new Date(msg[0].dateTime).getTime()
let videoTime = (getTimeStart - realTimeStart) / 1000 // let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime) this.$refs.refVideo.startVideo()
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
.value-image { .value-image {
width: 491px; width: 491px;
height: 373px; height: 373px;
background-image: url("../../../assets/images/sc/kfpic.png"); background-image: url("../../../assets/images/sc/kf.png");
background-size: 100% 100%; background-size: 100% 100%;
border: 1px solid #0d7fd7; border: 1px solid #0d7fd7;
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="cardInner"> <div class="cardInner">
<div class="comp"> <div class="comp">
<cross-control crossId="12F6L08J630"/> <cross-control crossId="12F6L08J630"/>
<!-- <cross-control crossId="12F6S08J7P0"/>-->
</div> </div>
<!-- :span-method="objectSpanMethod"--> <!-- :span-method="objectSpanMethod"-->
<el-table <el-table
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
getCrossCamerasAndPolygons() { getCrossCamerasAndPolygons() {
getPasserbyPolygon().then(res => { getPasserbyPolygon().then(res => {
...@@ -150,10 +150,10 @@ export default { ...@@ -150,10 +150,10 @@ export default {
this.timeout = setTimeout(() => { this.timeout = setTimeout(() => {
this.initWebS() this.initWebS()
}, 5000) }, 5000)
this.getCrossCamerasAndPolygons() // this.getCrossCamerasAndPolygons()
setInterval(() => { // setInterval(() => {
this.getCrossCamerasAndPolygons() // this.getCrossCamerasAndPolygons()
}, 1000) // }, 1000)
map.addControl(new mapboxgl.NavigationControl({showZoom: false}), 'top-right'); map.addControl(new mapboxgl.NavigationControl({showZoom: false}), 'top-right');
}); });
scene.on("zoomend", (e) => { scene.on("zoomend", (e) => {
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
// } // }
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
} }
...@@ -337,10 +337,10 @@ export default { ...@@ -337,10 +337,10 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.slowViewStartTime).getTime() // let realTimeStart = new Date(video_config.slowViewStartTime).getTime()
let getTimeStart = new Date(msg[0].dateTime).getTime() // let getTimeStart = new Date(msg[0].dateTime).getTime()
let videoTime = (getTimeStart - realTimeStart) / 1000 // let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime) this.$refs.refVideo.startVideo()
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -36,7 +36,7 @@ import wsSource from "../../config/holo/wsSource"; ...@@ -36,7 +36,7 @@ import wsSource from "../../config/holo/wsSource";
import {initWs} from "../../config/holo/websocket"; import {initWs} from "../../config/holo/websocket";
import * as l7Tools from "../../utils/l7Tools"; import * as l7Tools from "../../utils/l7Tools";
import conflictDetail from "./mapPopup/conflictDetail.vue"; import conflictDetail from "./mapPopup/conflictDetail.vue";
import {getLinesByCross} from "../../dao/api"; // import {getLinesByCross} from "../../dao/api";
const ConflictDetail = Vue.extend(conflictDetail) const ConflictDetail = Vue.extend(conflictDetail)
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(input) document.body.removeChild(input)
ELEMENT.Message(e.detail.userData.data.id) // ELEMENT.Message(e.detail.userData.data.id)
}, },
init() { init() {
[map, scene] = this.$refs.wMap.initMap(); [map, scene] = this.$refs.wMap.initMap();
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
type: "gltf", type: "gltf",
units: "meters", units: "meters",
adjustment: {x: 0.5, y: 1, z: -0.6}, adjustment: {x: 0.5, y: 1, z: -0.6},
bbox: true, bbox: false,
}, (model) => { }, (model) => {
vehicleModelTypes[`car${key}`] = model; vehicleModelTypes[`car${key}`] = model;
this.vehicleModelsNum += 1; this.vehicleModelsNum += 1;
...@@ -437,7 +437,7 @@ export default { ...@@ -437,7 +437,7 @@ export default {
this.licenseState = !this.licenseState this.licenseState = !this.licenseState
}, },
callCar(msg) { callCar(msg) {
if (this.lastMsg.length && Math.abs(new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000 > 5) { if (this.lastMsg.length && ((new Date(this.lastMsg[0].dateTime).getTime() - new Date(msg[0].dateTime).getTime()) / 1000) > 5) {
// if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) { // if (this.lastMsg.length && new Date(this.lastMsg[0].dateTime).getTime() > new Date(msg[0].dateTime).getTime()) {
this.$refs.refVideo.startVideo() this.$refs.refVideo.startVideo()
} }
...@@ -445,10 +445,10 @@ export default { ...@@ -445,10 +445,10 @@ export default {
if (scene && this.vehicleModelsNum === 8) { if (scene && this.vehicleModelsNum === 8) {
this.$store.commit('setCurrentTime', msg[0].dateTime) this.$store.commit('setCurrentTime', msg[0].dateTime)
if (this.msgStart) { if (this.msgStart) {
let realTimeStart = new Date(video_config.SLConflictViewStartTime).getTime() // let realTimeStart = new Date(video_config.SLConflictViewStartTime).getTime()
let getTimeStart = new Date(msg[0].dateTime).getTime() // let getTimeStart = new Date(msg[0].dateTime).getTime()
let videoTime = (getTimeStart - realTimeStart) / 1000 // let videoTime = (getTimeStart - realTimeStart) / 1000
this.$refs.refVideo.startVideo(videoTime) this.$refs.refVideo.startVideo()
this.msgStart = false this.msgStart = false
} }
let start = performance.now(); let start = performance.now();
......
...@@ -314,7 +314,7 @@ export default { ...@@ -314,7 +314,7 @@ export default {
.value-image { .value-image {
width: 491px; width: 491px;
height: 373px; height: 373px;
background-image: url("../../../assets/images/sc/ctpic.png"); background-image: url("../../../assets/images/sc/zz.png");
background-size: 100% 100%; background-size: 100% 100%;
border: 1px solid #0d7fd7; border: 1px solid #0d7fd7;
} }
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<div class="cardInner"> <div class="cardInner">
<div class="comp"> <div class="comp">
<cross-control crossId="12F6S08J8T0"/> <cross-control crossId="12F6S08J8T0"/>
<!-- <cross-control crossId="12F6S08J7P0"/>-->
</div> </div>
<el-table <el-table
:header-cell-style="{backgroundColor:'rgba(1, 43, 83, 1)',color:'rgba(217, 237, 255, 1)'}" :header-cell-style="{backgroundColor:'rgba(1, 43, 83, 1)',color:'rgba(217, 237, 255, 1)'}"
......
...@@ -9,9 +9,7 @@ const map_config = { ...@@ -9,9 +9,7 @@ const map_config = {
MAP_STYLE_XL: 'http://192.168.2.78:9000/style-changsha.json', // 高精带路口箭头 MAP_STYLE_XL: 'http://192.168.2.78:9000/style-changsha.json', // 高精带路口箭头
RASTER_ROAD: 'http://192.168.2.78:9000/tile?lid=traffic&get=map&cache=off&x={x}&y={y}&z={z}' // 路况 RASTER_ROAD: 'http://192.168.2.78:9000/tile?lid=traffic&get=map&cache=off&x={x}&y={y}&z={z}' // 路况
} }
const api_config = {
CROSS_STOP_LINE: '/develop/sgw/dbInterface/zh_suzhou_18q3/hd_506_rxhdzxx/multiTable/50FA40F152FF', // 获取停止线接口
}
const ws_config = { const ws_config = {
BASE_URL: 'ws://192.168.2.78:17021/holows/subscribe', // 实时轨迹 BASE_URL: 'ws://192.168.2.78:17021/holows/subscribe', // 实时轨迹
CROSS_CONTROL: 'ws://192.168.2.78:9000/utc/signalStatus/' // 路口详情 - 灯态相位推送 CROSS_CONTROL: 'ws://192.168.2.78:9000/utc/signalStatus/' // 路口详情 - 灯态相位推送
...@@ -19,9 +17,11 @@ const ws_config = { ...@@ -19,9 +17,11 @@ const ws_config = {
const cesium_config = { const cesium_config = {
center: [112.96364, 28.18825], // cesium中心点 center: [112.96364, 28.18825], // cesium中心点
zoomHeight: 1800, // cesium相机默认高度 zoomHeight: 1800, // cesium相机默认高度
baseMap: 'http://192.168.2.78:9000/styles/OSM%20OpenMapTiles/{z}/{x}/{y}@2x.png', // cesium标清底图
tile3dURL: 'http://192.168.2.78:9090/cs_3dtiles/tileset.json', // 3D tile 三维路口模型 tile3dURL: 'http://192.168.2.78:9090/cs_3dtiles/tileset.json', // 3D tile 三维路口模型
} }
const video_config = {
homeTimeStart:'2023-04-16 23:10:27:267',
}
......
...@@ -44,6 +44,9 @@ export default { ...@@ -44,6 +44,9 @@ export default {
// }), // }),
terrainProvider: new Cesium.EllipsoidTerrainProvider({}), // 地形 terrainProvider: new Cesium.EllipsoidTerrainProvider({}), // 地形
}); });
viewer.scene.light = new Cesium.DirectionalLight({
direction: new Cesium.Cartesian3(0.354925, -0.890918, -0.283358)
})
// tileset三维场景 // tileset三维场景
const tileset = new Cesium.Cesium3DTileset({ const tileset = new Cesium.Cesium3DTileset({
url: cesium_config.tile3dURL, url: cesium_config.tile3dURL,
......
//
// let socket
// // readyState: 0-正在连接 1-已经连接 2-连接正在关闭 3-已关闭或没连接成功
// function onOpen(e, data) {
// console.log(e,data)
// console.log('open && send ...', data.name)
// socket.send(data.sendData)
// }
//
// function onError(e, data) {
// console.log('ws error...', e, data)
// }
//
// function onClose(e, data) {
// console.log('ws close...', e, data)
// // setTimeout(() => {
// // initWs(data)
// // }, 5000)
// }
//
// export function initWs(data) {
// if (typeof WebSocket === undefined) {
// console.error('您的浏览器不支持socket')
// } else {
// // socket = new WebSocket(data.url)
// socket = new ReconnectingWebSocket(data.url)
// // 监听socket连接open
// socket.onopen = (e) => onOpen(e, data)
// // 监听socket错误信息
// socket.onerror = (e) => onError(e, data)
// // 断开连接
// socket.onclose = (e) => onClose(e, data)
// return {
// name: data.name,
// url: data.url,
// status: data.status,
// ws: socket,
// }
// }
// }
let sockets = []
let socket
// readyState: 0-正在连接 1-已经连接 2-连接正在关闭 3-已关闭或没连接成功 // readyState: 0-正在连接 1-已经连接 2-连接正在关闭 3-已关闭或没连接成功
function onOpen(e, data) { function onOpen(e, data) {
console.log(e,data)
console.log('open && send ...', data.name) console.log('open && send ...', data.name)
socket.send(data.sendData) for (let it of sockets) {
if (it.name === data.name && it.ws.readyState === 1) {
it.ws.send(data.sendData)
}
}
} }
function onError(e, data) { function onError(e, data) {
...@@ -13,28 +58,25 @@ function onError(e, data) { ...@@ -13,28 +58,25 @@ function onError(e, data) {
function onClose(e, data) { function onClose(e, data) {
console.log('ws close...', e, data) console.log('ws close...', e, data)
// setTimeout(() => {
// initWs(data)
// }, 5000)
} }
export function initWs(data) { export function initWs(data) {
if (typeof WebSocket === undefined) { if (typeof WebSocket === undefined) {
console.error('您的浏览器不支持socket') console.error('您的浏览器不支持socket')
} else { } else {
// socket = new WebSocket(data.url) let currentSocket = new ReconnectingWebSocket(data.url)
socket = new ReconnectingWebSocket(data.url)
// 监听socket连接open // 监听socket连接open
socket.onopen = (e) => onOpen(e, data) currentSocket.onopen = (e) => onOpen(e, data)
// 监听socket错误信息 // 监听socket错误信息
socket.onerror = (e) => onError(e, data) currentSocket.onerror = (e) => onError(e, data)
// 断开连接 // 断开连接
socket.onclose = (e) => onClose(e, data) currentSocket.onclose = (e) => onClose(e, data)
sockets.push({
name: data.name, ws: currentSocket,
})
return { return {
name: data.name, name: data.name, url: data.url, status: data.status, ws: currentSocket,
url: data.url,
status: data.status,
ws: socket,
} }
} }
} }
...@@ -2,6 +2,8 @@ import fetch from '@/utils/fetch' ...@@ -2,6 +2,8 @@ import fetch from '@/utils/fetch'
export const crossInfo = () => fetch('/holo/base-cross-info/list', {}, 'GET') export const crossInfo = () => fetch('/holo/base-cross-info/list', {}, 'GET')
// 顶部轮询5指标
export const getOverDatas = () => fetch('/holo/area-index-analysis/realtime', {}, 'GET')
export const eventInfo = (data) => fetch('/holo/event-info/list', data, 'GET') export const eventInfo = (data) => fetch('/holo/event-info/list', data, 'GET')
...@@ -59,4 +61,4 @@ export const equip_signal = () => fetch('/holo/device-signal/list', {}, 'GET') ...@@ -59,4 +61,4 @@ export const equip_signal = () => fetch('/holo/device-signal/list', {}, 'GET')
export const equip_weather = () => fetch('/holo/device-weather/list', {}, 'GET') export const equip_weather = () => fetch('/holo/device-weather/list', {}, 'GET')
// 路口停止线获取 // 路口停止线获取
export const getLinesByCross = (params) => fetch(api_config.CROSS_STOP_LINE, params, 'POST', {}) // export const getLinesByCross = (params) => fetch(api_config.CROSS_STOP_LINE, params, 'POST', {})
\ No newline at end of file \ No newline at end of file
...@@ -799,7 +799,7 @@ export default { ...@@ -799,7 +799,7 @@ export default {
border: 1px solid #04396f; border: 1px solid #04396f;
z-index: 2; z-index: 2;
height: calc(100% - 45px); height: calc(100% - 45px);
position: absolute; position: absolute !important;
left: 0; left: 0;
top: 42px; top: 42px;
width: 40%; width: 40%;
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<div v-if="model.equip_type === 'camera'" class="equip_camera"> <div v-if="model.equip_type === 'camera'" class="equip_camera">
<div class="header">{{ model.installLocation || '暂无安装地址信息' }}</div> <div class="header">{{ model.installLocation || '暂无安装地址信息' }}</div>
<div class="main"> <div class="main">
<camera-video :auto-play="true" style="height: 100%" :video-data="model.videoUrl"/> <!-- <camera-video :auto-play="true" style="height: 100%" :video-data="model.videoUrl"/>-->
<local-camera1 style="height: 100%; width: 100%" :border="false" :showClose="false" v-if="videoURL" ref="videoItem"
class="videoItem" :video-data="videoURL"/>
</div> </div>
</div> </div>
<div v-else-if="model.equip_type === 'weather'" class="equip_weather"> <div v-else-if="model.equip_type === 'weather'" class="equip_weather">
...@@ -40,18 +42,37 @@ ...@@ -40,18 +42,37 @@
<script> <script>
import dict from '../../../config/holo/dictionary' import dict from '../../../config/holo/dictionary'
import CameraVideo from "../../../components/Standard/cameraVideo.vue"; import CameraVideo from "../../../components/Standard/cameraVideo.vue";
import LocalCamera1 from "../localCamera1.vue";
export default { export default {
name: "passerbyPopup", name: "passerbyPopup",
props: ["model"], props: ["model"],
components: {CameraVideo}, components: {LocalCamera1, CameraVideo},
data() { data() {
return { return {
dict dict,
videoURL: null,
}; };
}, },
mounted() { mounted() {
console.log('equp', this.model) console.log('equp', this.model)
if (this.model.equip_type === 'camera') {
if (this.model.crossId === '12F6S08J7P0') {
this.videoURL = 'lkqz_2'
}
if (this.model.crossId === '12F6S08J8T0') {
this.videoURL = 'lkqz_1'
}
if (this.model.crossId === '12F6L08J630') {
this.videoURL = 'lkqz_3'
}
this.$nextTick(() => {
this.$refs.videoItem.setTime()
})
} else {
this.videoURL = null
}
}, },
methods: {}, methods: {},
computed: {}, computed: {},
...@@ -128,7 +149,7 @@ export default { ...@@ -128,7 +149,7 @@ export default {
.equip_camera { .equip_camera {
width: 448px; width: 448px;
height: 328px; height: 300px;
background-image: url("../../../assets/images/holo/videobackgorund.png"); background-image: url("../../../assets/images/holo/videobackgorund.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
......
This diff is collapsed.
...@@ -12,6 +12,7 @@ export function addVehiclePic(scene, msg) { ...@@ -12,6 +12,7 @@ export function addVehiclePic(scene, msg) {
return `carColor${val}` return `carColor${val}`
}) })
// .shape('carPic') // .shape('carPic')
.size(3.5) .size(3.5)
.style({ .style({
unit: 'meter', rotation: 0, unit: 'meter', rotation: 0,
......
<template>
<div :class="['cameraVideo',border?'cameraVideoBorder':'']">
<div class="vCloseButton" v-show="showClose" @click="closeM">
<div class="el-icon-close"></div>
</div>
<span v-show="border" class="top-left"></span>
<span v-show="border" class="top-right"></span>
<span v-show="border" class="bottom-left"></span>
<span v-show="border" class="bottom-right"></span>
<video v-if="videoData" muted width="100%" loop :class="[reverse?'reverse':'']"
class="videoControl" :id="videoData">
<source :src="url" type="video/mp4">
您的浏览器不支持 video 属性。
</video>
</div>
</template>
<script>
export default {
name: "localCamera1",
props: ["videoData", 'border', 'reverse','showClose'],
watch: {},
data() {
return {};
},
methods: {
setTime(time) {
this.$nextTick(() => {
let el = document.getElementById(this.videoData)
console.log('bofang...', time || 0)
if (time) {
el.currentTime = time
el.play()
} else {
console.log('视频重置。。。', new Date().getTime() / 1000)
el.currentTime = 0
el.play()
}
})
},
closeM() {
this.$emit('closeM')
}
},
computed: {
url() {
return `/cdn/video/${this.videoData}.mp4`
}
},
mounted() {
this.$nextTick(() => {
})
},
beforeDestroy() {
console.log("video beforeDestroy");
},
};
</script>
<style lang="less" scoped>
.reverse {
rotate: 180deg;
}
.cameraVideo {
position: relative;
.videoControl {
position: absolute;
width: 100%;
height: 100%;
//width: calc(100% - 5px);
//height: calc(100% - 5px);
padding: 1px;
}
}
.cameraVideoBorder {
border: 1px solid #022950;
}
.top-left {
position: absolute;
left: -2px;
top: -2px;
padding: 6px;
border-style: solid;
border-color: #1889f1;
border-width: 2px 0 0 2px;
}
.top-right {
position: absolute;
right: -2px;
top: -2px;
padding: 6px;
border-style: solid;
border-color: #1889f1;
border-width: 2px 2px 0 0;
}
.bottom-left {
position: absolute;
right: -2px;
bottom: -2px;
padding: 6px;
border-style: solid;
border-color: #1889f1;
border-width: 0 2px 2px 0;
}
.bottom-right {
position: absolute;
left: -2px;
bottom: -2px;
padding: 6px;
border-style: solid;
border-color: #1889f1;
border-width: 0 0 2px 2px;
}
.vCloseButton {
z-index: 9999;
background-color: rgba(13, 127, 215, 0.7);
position: absolute;
right: 4px;
top: 4px;
width: 20px;
height: 20px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
cursor: pointer;
}
.vCloseButton:hover {
background-color: rgba(13, 127, 215, 0.9);
}
</style>
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
<div class="title comm">实时车辆</div> <div class="title comm">实时车辆</div>
</div> </div>
<div class="over_item"> <div class="over_item">
<div class="number comm">{{ speed }} km/h</div> <div class="number comm">{{ speed }}km/h</div>
<div class="title comm">平均速度</div> <div class="title comm">平均速度</div>
</div> </div>
<div class="over_item"> <div class="over_item">
<div class="number comm">{{ crowd / 1000 }} km</div> <div class="number comm">{{ maxTravelTime }}min</div>
<div class="title comm">拥堵里程</div> <div class="title comm">最大行程时间</div>
</div> </div>
</div> </div>
<div class="left_box aside" :class="[{ hide_left: !show }]"> <div class="left_box aside" :class="[{ hide_left: !show }]">
...@@ -166,7 +166,7 @@ import { ...@@ -166,7 +166,7 @@ import {
eventAnalysis, eventAnalysis,
areaRecent, areaRecent,
pedNonAnalysis, pedNonAnalysis,
eventAlarm, eventAlarm, getOverDatas,
} from "../../dao/situation"; } from "../../dao/situation";
import {getFontSize} from "../../config/holo/fontSize.js"; import {getFontSize} from "../../config/holo/fontSize.js";
import {Chart} from "highcharts-vue"; import {Chart} from "highcharts-vue";
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
fontSize: 12, fontSize: 12,
charts: {}, charts: {},
speed: "", speed: "",
crowd: "", maxTravelTime: "",
trafIndex: "", trafIndex: "",
realTimeNum: "", realTimeNum: "",
timers: [] timers: []
...@@ -289,6 +289,11 @@ export default { ...@@ -289,6 +289,11 @@ export default {
}, },
mounted() { mounted() {
// 区域指数 && 上侧指标 // 区域指数 && 上侧指标
this.getOverDataTop()
let timer1 = setInterval(() => {
this.getOverDataTop()
}, 1000 * 60)
this.getIndexes() this.getIndexes()
let timer = setInterval(() => { let timer = setInterval(() => {
this.getIndexes() this.getIndexes()
...@@ -355,17 +360,26 @@ export default { ...@@ -355,17 +360,26 @@ export default {
}); });
}, },
methods: { methods: {
getOverDataTop(){
getOverDatas().then((res) => {
console.log('111111111',res)
this.speed = res.content.avgTravelSpeed
this.trafIndex = res.content.trafficIndex
this.realTimeNum = res.content.inWayVehicleNum
this.maxTravelTime = res.content.maxTravelTime
})
},
getIndexes() { getIndexes() {
areaList().then((res) => { areaList().then((res) => {
// console.log("区域指数", res); // console.log("区域指数", res);
this.speed = // this.speed =
res.content.timeList[res.content.timeList.length - 1].valList[2]; // res.content.timeList[res.content.timeList.length - 1].valList[2];
this.crowd = // this.crowd =
res.content.timeList[res.content.timeList.length - 1].valList[4]; // res.content.timeList[res.content.timeList.length - 1].valList[4];
this.trafIndex = // this.trafIndex =
res.content.timeList[res.content.timeList.length - 1].valList[0]; // res.content.timeList[res.content.timeList.length - 1].valList[0];
this.realTimeNum = // this.realTimeNum =
res.content.timeList[res.content.timeList.length - 1].valList[3]; // res.content.timeList[res.content.timeList.length - 1].valList[3];
this.$nextTick(() => { this.$nextTick(() => {
this.regionalIndex(res.content); this.regionalIndex(res.content);
for (let key in this.regionalIndexData) { for (let key in this.regionalIndexData) {
......
...@@ -319,6 +319,18 @@ export default { ...@@ -319,6 +319,18 @@ export default {
// this.videoURL = 'http://10.102.1.180:80/live?app=demo&stream=mp4-133'; // this.videoURL = 'http://10.102.1.180:80/live?app=demo&stream=mp4-133';
// this.$refs.cameraVideo.loadVideo() // this.$refs.cameraVideo.loadVideo()
this.playMultiVehicle(cars) this.playMultiVehicle(cars)
// 劳动西路
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(
112.962981,
28.182855
, 350),
orientation: {
heading: Cesium.Math.toRadians(0), // 旋转角度
pitch: Cesium.Math.toRadians(-90.0), // 相机方向
},
duration: 0.5
});
}, },
// 交通拥堵轨迹回溯 // 交通拥堵轨迹回溯
playFullTrack(data) { playFullTrack(data) {
...@@ -360,7 +372,7 @@ export default { ...@@ -360,7 +372,7 @@ export default {
tArray.push({start: thisCarStart, stop: thisCarStop}) // 最后一段 tArray.push({start: thisCarStart, stop: thisCarStop}) // 最后一段
} }
} }
console.log('tarray', tArray) // console.log('tarray', tArray)
this.addEntityProperty({ this.addEntityProperty({
viewer: viewer, viewer: viewer,
data: path, data: path,
...@@ -405,7 +417,7 @@ export default { ...@@ -405,7 +417,7 @@ export default {
// 循环执行,即为2,到达终止时间,重新从起点时间开始 // 循环执行,即为2,到达终止时间,重新从起点时间开始
viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP; viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;
viewer.flyTo(viewer.entities, {duration: 0.5}) // viewer.flyTo(viewer.entities, {duration: 0.5})
this.switchTimeLine(true) this.switchTimeLine(true)
this.showProgress = true this.showProgress = true
}, },
...@@ -507,18 +519,20 @@ export default { ...@@ -507,18 +519,20 @@ export default {
if (viewer.trackedEntity) { if (viewer.trackedEntity) {
let position = this.currentEntity.position.getValue(viewer.clock.currentTime) let position = this.currentEntity.position.getValue(viewer.clock.currentTime)
let angle = this.currentEntity.angleProperty.getValue(viewer.clock.currentTime) let angle = this.currentEntity.angleProperty.getValue(viewer.clock.currentTime)
let ellipsoid = viewer.scene.globe.ellipsoid if (position && angle) {
let cartographic = ellipsoid.cartesianToCartographic(position); // 笛卡尔坐标 => 经纬度 (弧度表示) let ellipsoid = viewer.scene.globe.ellipsoid
let lat = Cesium.Math.toDegrees(cartographic.latitude); let cartographic = ellipsoid.cartesianToCartographic(position); // 笛卡尔坐标 => 经纬度 (弧度表示)
let lng = Cesium.Math.toDegrees(cartographic.longitude); let lat = Cesium.Math.toDegrees(cartographic.latitude);
viewer.camera.setView({ let lng = Cesium.Math.toDegrees(cartographic.longitude);
destination: Cesium.Cartesian3.fromDegrees(lng, lat, 2), viewer.camera.setView({
orientation: { destination: Cesium.Cartesian3.fromDegrees(lng, lat, 2),
heading: Cesium.Math.toRadians(angle), // east, default value is 0.0 (north) orientation: {
pitch: Cesium.Math.toRadians(-5), // default value (looking down) heading: Cesium.Math.toRadians(angle), // east, default value is 0.0 (north)
roll: 0 pitch: Cesium.Math.toRadians(-5), // default value (looking down)
} roll: 0
}); }
});
}
} }
// let position = this.currentEntity.position.getValue(viewer.clock.currentTime) // let position = this.currentEntity.position.getValue(viewer.clock.currentTime)
// let orientation = this.currentEntity.orientation.getValue(viewer.clock.currentTime) // let orientation = this.currentEntity.orientation.getValue(viewer.clock.currentTime)
...@@ -753,29 +767,30 @@ export default { ...@@ -753,29 +767,30 @@ export default {
// 车辆详情弹窗及更新 // 车辆详情弹窗及更新
viewer.clock.onTick.addEventListener(() => { viewer.clock.onTick.addEventListener(() => {
if (viewer.clock.shouldAnimate) { if (viewer.clock.shouldAnimate) {
let position = this.currentEntity.position.getValue(viewer.clock.currentTime) let position = this.currentEntity.position.getValue(viewer.clock.currentTime)
let ellipsoid = viewer.scene.globe.ellipsoid if (position) {
let cartographic = ellipsoid.cartesianToCartographic(position); // 笛卡尔坐标 => 经纬度 (弧度表示) let ellipsoid = viewer.scene.globe.ellipsoid
let lat = Cesium.Math.toDegrees(cartographic.latitude); let cartographic = ellipsoid.cartesianToCartographic(position); // 笛卡尔坐标 => 经纬度 (弧度表示)
let lng = Cesium.Math.toDegrees(cartographic.longitude); let lat = Cesium.Math.toDegrees(cartographic.latitude);
if (!popup) { let lng = Cesium.Math.toDegrees(cartographic.longitude);
popup = new CesiumPopup({ if (!popup) {
title: '信息' popup = new CesiumPopup({
}) title: '信息'
.setPosition(Cesium.Cartesian3.fromDegrees(lng, lat, 1.5)) })
.setHTML(`<div id="cesium_vehicle_popup" ></div>`) .setPosition(Cesium.Cartesian3.fromDegrees(lng, lat, 1.5))
.addTo(viewer).setTitle('') .setHTML(`<div id="cesium_vehicle_popup" ></div>`)
.setOffset([-100, -180]) .addTo(viewer).setTitle('')
new VehiclePopup({ .setOffset([-100, -180])
propsData: { new VehiclePopup({
model: this.currentTimeRowData propsData: {
}, model: this.currentTimeRowData
}).$mount('#cesium_vehicle_popup') },
} else { }).$mount('#cesium_vehicle_popup')
this.refreshSpeed() } else {
popup?.setOffset([-100, -180]) this.refreshSpeed()
popup.setPosition(Cesium.Cartesian3.fromDegrees(lng, lat, 1.5)) popup?.setOffset([-100, -180])
popup.setPosition(Cesium.Cartesian3.fromDegrees(lng, lat, 1.5))
}
} }
} else { } else {
this.playStatus = false this.playStatus = false
......
...@@ -201,8 +201,9 @@ export default { ...@@ -201,8 +201,9 @@ export default {
searchForm: { searchForm: {
//startTime: '2023-04-07 14:00:00', //startTime: '2023-04-07 14:00:00',
//endTime: '2023-04-07 15:00:00', //endTime: '2023-04-07 15:00:00',
startTime:'2023-04-10 00:46:20', //
endTime:'2023-04-10 00:49:46', startTime:'2023-04-09 01:28:01',
endTime:'2023-04-09 01:28:40',
eventCategory: '', eventCategory: '',
crossId: '', crossId: '',
objectType: '', objectType: '',
......
...@@ -255,6 +255,8 @@ export default { ...@@ -255,6 +255,8 @@ export default {
function: '', function: '',
// startTime: '2023-03-14 08:00:00', // startTime: '2023-03-14 08:00:00',
// endTime: '2023-03-14 08:10:00', // endTime: '2023-03-14 08:10:00',
// 2023-04-08 23:00:00
//2023-04-08 23:30:00
startTime: '2023-04-08 23:11:51', startTime: '2023-04-08 23:11:51',
endTime: '2023-04-08 23:12:14', endTime: '2023-04-08 23:12:14',
}, },
...@@ -270,13 +272,13 @@ export default { ...@@ -270,13 +272,13 @@ export default {
// this.getDict() // this.getDict()
}, },
mounted() { mounted() {
this.$nextTick(() => { // this.$nextTick(() => {
let date = new Date() // 时间戳为10位需*1000,时间戳为13位的话不需乘1000 // let date = new Date() // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
this.searchForm.endTime = this.convertToString(date) // this.searchForm.endTime = this.convertToString(date)
let start = date.getTime() - 1000 * 60 * 10 // let start = date.getTime() - 1000 * 60 * 10
let st = new Date(start) // let st = new Date(start)
this.searchForm.startTime = this.convertToString(st) // this.searchForm.startTime = this.convertToString(st)
}) // })
}, },
methods: { methods: {
convertToString(date) { convertToString(date) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment