diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index 5f3ea299..66ea1700 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -3,8 +3,8 @@ @@ -29,6 +29,10 @@ export default { type: String, default: null }, + pileNum: { + type: String, + default: null + }, url: { type: String, default: null diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js b/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js index 34860792..d417f583 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js @@ -1,5 +1,8 @@ import flvJs from "flv.js"; -import { getCameraStream } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; +import { + getCameraStream, + getNearCamera, +} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; /** * @@ -56,28 +59,32 @@ export class HttpLivePlayer { constructor(container, options) { this.container = container; - console.log("--- 视频 1 ---"); this.getUrl(options).then(() => { - console.log("--- 视频 3 ---"); this.initLiveVideo(); }); } - async getUrl({ camId, url } = {}) { - console.log("--- 视频 2 ---"); + async getUrl({ camId, url, pileNum } = {}) { + this.url = url; + + if (pileNum) { + const { code, data } = await getNearCamera(pileNum).catch(() => ({})); + if (code != 200 || !data?.length) return; + + camId = data[0].camId; + } + if (camId) { const { code, data } = await getCameraStream(camId).catch(() => ({})); - console.log("--- 视频 2.4 ---"); if (code != 200) return; url = data.liveUrl; } - console.log("--- 视频 2.7 ---"); if (!url) return Promise.reject("获取 url 失败!"); - return (this.url = url); + return; } destroy() { @@ -91,12 +98,12 @@ export class HttpLivePlayer { } initLiveVideo() { - console.log("--- 视频 4 ---"); - this.destroy(); this.lastDecodedFrames = null; + if (!this.url) return; + this.player = flvJs.createPlayer( { type: "flv", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue index 18a0ae66..878dcada 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue @@ -1,17 +1,26 @@ @@ -70,6 +79,7 @@ export default { data() { return { submitting: false, + formData: {}, formList: [ { label: "类型:", @@ -236,6 +246,11 @@ export default { if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`); + if (["01", "02"].includes(result.mode)) { + if (["04", "00"].includes(formData.onWorkStatus)) return Message.error(`上行工作状态不能选择当前类型!`); + if (["04", "00"].includes(formData.inWorkStatus)) return Message.error(`下行工作状态不能选择当前类型!`); + } + result.onWorkStatus = formData.onWorkStatus; result.inWorkStatus = formData.inWorkStatus; @@ -298,11 +313,8 @@ export default { flex-direction: column; gap: 15px; - .footer { - display: flex; - align-items: center; - justify-content: flex-end; - gap: 9px; + .tips { + font-size: 12px; } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue index 8b80d616..3951e7f7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue @@ -1,7 +1,7 @@