Browse Source

1.首页实时刷新

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

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

@ -12,7 +12,7 @@
" src="@screen/images/camera-control-icon.svg" width="18px" height="18px"
style="cursor: pointer;background-color: #0d5f79;" />
</div>
<Transition name="fade" mode="out-in">
<video controls autoplay muted class="video-stream" v-bind="$attrs" ref="videoContainerRef" />
</Transition>
@ -35,7 +35,7 @@ export default {
},
props: {
//
//
facilityType:{
type: String,
default:null
@ -74,18 +74,19 @@ 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();
const self = this;
setTimeout(() => {
self.showVideo();
self.showVideo();
}, 500);
},
async playVideo() {
this.player?.destroy();
@ -208,7 +209,7 @@ export default {
// -webkit-text-fill-color: transparent;
}
}
.video-stream,
img {
height: 100%;

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

@ -11,7 +11,7 @@
<div>当前天气</div><div class="sline"></div><img :src="require('./location.svg')" /><div>济南市</div>
</div>
<div class="box-content0-m">
<img :src="require(`@screen/images/weather/${cityWeather.icon}.svg`)" class="img" />
<div class="temp">{{ cityWeather.temp }}</div>
<div class="wind">
@ -178,25 +178,25 @@ export default {
// totalPassengerFlow typeSpecialVehicleFlow// typeTruckFlow
let total = 0, p0 = 0, p1=0,p2=0,_p0 = 0, _p1=0,_p2=0;
res1.data.forEach(x=>{
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
p0 += x.totalPassengerFlow
p1 += x.typeSpecialVehicleFlow
p2 += x.typeTruckFlow
})
res3.data.forEach(x=>{
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
total+=(x.totalPassengerFlow+x.typeTruckFlow+x.typeSpecialVehicleFlow)
p0 += x.totalPassengerFlow
p1 += x.typeSpecialVehicleFlow
p2 += x.typeTruckFlow
})
if(total > 0){
_p0 = parseFloat((p0/total*100).toFixed(1))
_p1 = parseFloat((p1/total*100).toFixed(1))
_p2 = parseFloat((p2/total*100).toFixed(1))
}
this.p0 = p0;
this.p1 = p1;
this.p2 = p2;
@ -249,11 +249,17 @@ export default {
}
},
created() {
},
mounted() {
this.bind();
}
//
this.timer = setInterval(this.bind, 60 * 1000);
},
beforeDestroy() {
clearInterval(this.timer); //
},
}
</script>
@ -322,7 +328,7 @@ export default {
flex: 1;
display: flex;
flex-direction: column;
}
.box-content0{
background: linear-gradient(180deg,
@ -408,7 +414,7 @@ export default {
.box-content1 {
display: flex;
justify-content: space-between;
.box-content-l {
width: 163px;
height: 100%;

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