Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
hui 8 months ago
parent
commit
da93ee2c59
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue
  2. 21
      ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue
  3. 20
      ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  6. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

12
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue

@ -5,9 +5,11 @@
<slot :name="item[id] || item[label]" :data="item">{{
item[label]
}} </slot>
<img v-if="item.deviceState == '0' || item.deviceState == null" src="@/assets/jihe/images/offline.svg"
class="state">
<img v-else src="@/assets/jihe/images/online.svg" class="state">
<div v-if="showIcon">
<img v-if="item.deviceState == '0' || item.deviceState == null" src="@/assets/jihe/images/offline.svg"
class="state">
<img v-else src="@/assets/jihe/images/online.svg" class="state">
</div>
</ElCheckbox>
</ElCheckboxGroup>
</template>
@ -37,6 +39,10 @@ export default {
gap: {
default: "24px",
},
showIcon: {
type: Boolean,
default: false,
},
},
};
</script>

21
ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue

@ -10,9 +10,9 @@ import { HttpLivePlayer, openLiveVideo } from "./videoStream.js"
export default {
name: 'Video',
data(){
data() {
return {
player:null
player: null
}
},
props: {
@ -33,27 +33,26 @@ export default {
default: 'flv'
},
rangeIndex: {
type: Number,
default: 0
}
},
watch:{
camId:{
handler(newV){
watch: {
camId: {
handler(newV) {
this.playVideo();
},
immediate: true
}
// immediate: true
}
},
async mounted() {
// setTimeout(() => {
// this.$nextTick(() => {
this.playVideo();
this.$once("hook:beforeDestroy", () => this.player?.destroy());
this.playVideo();
this.$once("hook:beforeDestroy", () => this.player?.destroy());
// })
// })
},
methods:{
methods: {
playVideo() {
this.player?.destroy();
if (this.videoType == 'flv') {

20
ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js

@ -5,6 +5,7 @@ import { Message } from "element-ui";
import {
getCameraStream,
getNearCamera,
getNearCameraNew,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
/**
@ -63,13 +64,26 @@ async function getUrl({ camId, url, pileNum, rangeIndex } = {}) {
if (url) return url;
if (pileNum) {
const { code, data } = await getNearCamera(pileNum).catch(() => ({}));
if (code != 200 || !data?.length) {
let code, data, cameraData;
if (rangeIndex) {
if (typeof rangeIndex === "string")
cameraData = await getNearCameraNew(pileNum).catch(() => ({}));
else cameraData = await getNearCamera(pileNum).catch(() => ({}));
} else {
cameraData = await getNearCamera(pileNum).catch(() => ({}));
}
code = cameraData.code;
data = cameraData.data;
// console.log(rangeIndex, "rangeIndex", cameraData);
if (
code != 200 ||
(Array.isArray(data) ? !data?.length : !Object.keys(data || {}).length)
) {
Message.warning("未获取到附近的相机信息");
return;
}
camId = data[rangeIndex || 0]?.camId;
console.log(rangeIndex, "rangeIndex", data, data[rangeIndex], cameraData);
}
if (camId) {

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue

@ -4,8 +4,8 @@
<div class="body">
<div class="left">
<div class="title">路测广播列表</div>
<CheckboxGroup class="checkbox-group" gap="9px" v-model="checkList" :options="musicList" id="otherConfig"
label="deviceName">
<CheckboxGroup class="checkbox-group" gap="9px" :showIcon="true" v-model="checkList" :options="musicList"
id="otherConfig" label="deviceName">
<template #[otherConfig]="{ data }">
<span style="color: #6EE5FE;">
{{ data.deviceName }}(当前设备)

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -2,8 +2,8 @@
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title">
<div class="TrafficIncidents">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" :rangeIndex="1" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
</div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />

10
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -41,6 +41,16 @@ export function getNearCamera(pileNum) {
});
}
export function getNearCameraNew(pileNum) {
return request({
url: "/video/nearCamPileNum",
method: "get",
params: {
pileNum,
},
});
}
function padZero(num) {
num = num.toString();
while (num.length < 3) {

Loading…
Cancel
Save