Browse Source

1.首页实时刷新

2.摄像头控制弹窗相关异常
develop
lau572 9 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: {
handleClose() {
this.controlDialogVisible = false;
this.player?.destroy();
// this.player?.destroy();
},
cameraChange() {
console.log('chanage.======')
this.controlDialogVisible = false
const changeItem = find(this.urls, { iotDeviceId: this.cameraId });
this.dialogData = { ...changeItem, parseOtherConfig: changeItem.otherConfig && JSON.parse(changeItem.otherConfig) };
this.player?.destroy();

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

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

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

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

Loading…
Cancel
Save