Browse Source

1.首页实时刷新

2.摄像头控制弹窗相关异常
develop
lau572 12 hours ago
parent
commit
bca50c9ab5
  1. 3
      ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
  3. 126
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue

3
ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue

@ -74,10 +74,11 @@ export default {
methods: { methods: {
handleClose() { handleClose() {
this.controlDialogVisible = false; this.controlDialogVisible = false;
this.player?.destroy(); // this.player?.destroy();
}, },
cameraChange() { cameraChange() {
console.log('chanage.======') console.log('chanage.======')
this.controlDialogVisible = false
const changeItem = find(this.urls, { iotDeviceId: this.cameraId }); const changeItem = find(this.urls, { iotDeviceId: this.cameraId });
this.dialogData = { ...changeItem, parseOtherConfig: changeItem.otherConfig && JSON.parse(changeItem.otherConfig) }; this.dialogData = { ...changeItem, parseOtherConfig: changeItem.otherConfig && JSON.parse(changeItem.otherConfig) };
this.player?.destroy(); this.player?.destroy();

8
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue

@ -253,7 +253,13 @@ export default {
}, },
mounted() { mounted() {
this.bind(); this.bind();
} //
this.timer = setInterval(this.bind, 60 * 1000);
},
beforeDestroy() {
clearInterval(this.timer); //
},
} }
</script> </script>

126
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue

@ -68,61 +68,70 @@ export default {
} }
}, },
created() { created() {
// ================== this.initData()
Promise.allSettled([ //
// , this.timer = setInterval(this.initData, 60 * 1000);
request({ },
url: `/business/trafficIncidents/getKeyData`, beforeDestroy() {
method: "get", clearInterval(this.timer); //
}), },
//
request({
url: `/perceivedEvents/warning/warningTotal`,
method: "post",
data: {}
}),
request({
url: `/business/device/abnormalDevice`,
method: "get",
data: {}
}),
//
request({url: '/weatherForecast/currentWeatherWarningInformationQuery',
method: 'post',
data: {
"roadId":"G003537",
"earlyWorningLevel":"1|2|3"
}
}),
])
.then(([trafficIncidents, perceiveEvent, abnormalDeviceNum, weatherForecast]) => {
if (trafficIncidents.status === 'fulfilled' && trafficIncidents.value.code == 200) {
const data = trafficIncidents.value.data;
this.trafficIncidents = [ methods: {
data.processing || 0, initData(){
data.total || 0 Promise.allSettled([
]; // ,
request({
url: `/business/trafficIncidents/getKeyData`,
method: "get",
}),
//
request({
url: `/perceivedEvents/warning/warningTotal`,
method: "post",
data: {}
}),
request({
url: `/business/device/abnormalDevice`,
method: "get",
data: {}
}),
//
request({url: '/weatherForecast/currentWeatherWarningInformationQuery',
method: 'post',
data: {
"roadId":"G003537",
"earlyWorningLevel":"1|2|3"
}
}),
])
.then(([trafficIncidents, perceiveEvent, abnormalDeviceNum, weatherForecast]) => {
if (trafficIncidents.status === 'fulfilled' && trafficIncidents.value.code == 200) {
const data = trafficIncidents.value.data;
this.constructionSection = data.construction || 0 this.trafficIncidents = [
} data.processing || 0,
data.total || 0
];
if (perceiveEvent.status === 'fulfilled' && perceiveEvent.value.code == 200) { this.constructionSection = data.construction || 0
const data = perceiveEvent.value.data; }
this.perceiveEvent = data.number || 0; if (perceiveEvent.status === 'fulfilled' && perceiveEvent.value.code == 200) {
} const data = perceiveEvent.value.data;
if (abnormalDeviceNum.status === 'fulfilled' && abnormalDeviceNum.value.code == 200) {
const data = abnormalDeviceNum.value.data; this.perceiveEvent = data.number || 0;
this.abnormalDeviceNum = data || 0; }
} if (abnormalDeviceNum.status === 'fulfilled' && abnormalDeviceNum.value.code == 200) {
if (weatherForecast && weatherForecast.status === 'fulfilled' && weatherForecast.value.code == 200) { const data = abnormalDeviceNum.value.data;
const data = weatherForecast.value.data; this.abnormalDeviceNum = data || 0;
this.weatherForecast = data.length; }
} if (weatherForecast && weatherForecast.status === 'fulfilled' && weatherForecast.value.code == 200) {
}) const data = weatherForecast.value.data;
//----- this.weatherForecast = data.length;
request({ }
})
//-----
request({
url: `/business/traffic-statistics/current/in-transit-vehicles`, url: `/business/traffic-statistics/current/in-transit-vehicles`,
method: "get", method: "get",
}).then((result) => { }).then((result) => {
@ -134,19 +143,19 @@ export default {
this.transitVehicles = _count; this.transitVehicles = _count;
}) })
//----- //-----
request({ request({
url: `/business/traffic-statistics/history/trafficFlowAtToll`, url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get", method: "get",
params: { params: {
startDate:moment().format('YYYY-MM-DD') startDate:moment().format('YYYY-MM-DD')
} }
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
this.trafficVolume = result.data; this.trafficVolume = result.data;
}) })
//----- //-----
request({ request({
url: `/business/traffic-statistics/current/average-speed`, url: `/business/traffic-statistics/current/average-speed`,
method: "get", method: "get",
}).then((result) => { }).then((result) => {
@ -157,6 +166,7 @@ export default {
this.averageSpeed = toDecimal(_count/result.data.length) this.averageSpeed = toDecimal(_count/result.data.length)
} }
}) })
}
} }
} }
</script> </script>

Loading…
Cancel
Save