diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js index 3e788ba5..9827e639 100644 --- a/ruoyi-ui/src/common/menuData.js +++ b/ruoyi-ui/src/common/menuData.js @@ -102,6 +102,30 @@ export default [ }, ], }, + { + title: "扫码报警", + name: "controlQR", + path: "/control/qrCode", + component: "control/qrCode/index.vue" + }, + { + title: "非机预警", + name: "controlManual", + children: [ + { + title: "事件列表", + name: "controlManualEvents", + path: "/control/manual/events", + component: "control/manual/events/index.vue", + }, + { + title: "统计分析", + name: "controlManualStatistic", + path: "/control/manual/statistic", + component: "control/manual/statistic/index.vue", + } + ] + } ], }, { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue b/ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue index f05f37dc..fe9b7d92 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue @@ -126,7 +126,7 @@ export default { .compHead{ display: flex; justify-content: flex-end; padding-bottom: 20px; // img{ width: 20px; height: 20px; pointer-events: all;} - .iconfont{font-size: 18px; pointer-events: all;} + .iconfont{font-size: 18px; pointer-events: all; color: #3DE8FF;} } .compCon { display: flex; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index df76b8c5..efd1ad72 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -2,10 +2,7 @@
-
+

{{ item.label || "-" }} @@ -85,7 +82,6 @@ export default { } prev.push(data); - return prev; }, []); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue index 83fdefe0..e6bbdb4e 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue @@ -1,19 +1,15 @@ @@ -43,6 +39,10 @@ export default { gap: { default: "24px", }, + showIcon: { + type: Boolean, + default: false, + }, }, }; @@ -58,7 +58,6 @@ export default { display: flex; align-items: center; gap: 6px; - width: 100px; .el-checkbox__input { line-height: 0; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue index 403be982..aaed8681 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue @@ -33,7 +33,6 @@ export default { ); if (templateResult && templateResult != item.key) return templateResult; - return result || item.text || "-"; }, getDisplayColor() { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue index 24faf33c..9e02ecdd 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue @@ -10,6 +10,11 @@ import { HttpLivePlayer, openLiveVideo } from "./videoStream.js" export default { name: 'Video', + data() { + return { + player: null + } + }, props: { camId: { type: String, @@ -28,22 +33,33 @@ export default { default: 'flv' }, rangeIndex: { - type: Number, default: 0 } }, + watch: { + camId: { + handler(newV) { + this.playVideo(); + } + // immediate: true + } + }, async mounted() { // setTimeout(() => { // this.$nextTick(() => { - if (this.videoType == 'flv') { - // const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum }) - const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex }); - - this.$once("hook:beforeDestroy", () => player?.destroy()); - } + this.playVideo(); + this.$once("hook:beforeDestroy", () => this.player?.destroy()); // }) // }) - + }, + methods: { + playVideo() { + this.player?.destroy(); + if (this.videoType == 'flv') { + // const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum }) + this.player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex }); + } + } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js b/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js index f97c7f7b..4aecfbf3 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js +++ b/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) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue index 54ba5735..f7874ae1 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue @@ -374,25 +374,27 @@ export default { }, }, watch: { - screenSize(newV){ - - if(newV){ - let boardH = newV.split("*")[1]; - let fontSize = "20"; - if (['64', '48'].includes(boardH)) { - this.maxFontSize = +boardH - fontSize = boardH + "" - } else if (['80'].includes(boardH)) { - this.maxFontSize = +boardH / 2 - fontSize = +boardH / 2 + "" - } else if (['160'].includes(boardH)) { - this.maxFontSize = +boardH / 2 - fontSize = +boardH / 4 + "" + screenSize:{ + handler(newV){ + if(newV){ + let boardH = newV.split("*")[1]; + let fontSize = "20"; + if (['64', '48'].includes(boardH)) { + this.maxFontSize = +boardH + fontSize = boardH + "" + } else if (['80'].includes(boardH)) { + this.maxFontSize = +boardH / 2 + fontSize = +boardH / 2 + "" + } else if (['160'].includes(boardH)) { + this.maxFontSize = +boardH / 2 + fontSize = +boardH / 4 + "" + } + this.deviceCttDefault.fontSize = fontSize + this.templateDefault.screenSize = newV; + this.templateDefault.fontSize = fontSize; } - this.deviceCttDefault.fontSize = fontSize - this.templateDefault.screenSize = newV; - this.templateDefault.fontSize = fontSize; - } + }, + immediate:true }, visible: { handler(newV) { @@ -453,10 +455,6 @@ export default { // this.templateDefault.fontSize = this.fontSizeList[0].dictValue // this.dataForm.FONT_SIZE = res.data[1].dictValue }); - - - - }, methods: { initData() { diff --git a/ruoyi-ui/src/views/JiHeExpressway/index.vue b/ruoyi-ui/src/views/JiHeExpressway/index.vue index 695829a0..1573d659 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/index.vue @@ -113,16 +113,16 @@ export default { } .content { - display: flex; - flex-direction: row; + // display: flex; + // flex-direction: row; pointer-events: none; ::v-deep { >div { - top: -6px; + // top: -6px; z-index: -1; pointer-events: auto; - height: calc(100% + 6px); + // height: calc(100% + 6px); } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index a6051485..1aa3a6e0 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -4,8 +4,8 @@

路测广播列表
- + @@ -44,8 +39,10 @@ import Button from "@screen/components/Buttons/Button.vue"; import Descriptions from "@screen/components/Descriptions.vue"; import BroadcastReleases from "./components/BroadcastReleases.vue"; import Video from "@screen/components/Video"; -import { DeviceTypeEnum } from "@screen/utils/enum.js"; - +const DeviceTypeEnum = { + 0: "异常", + 1: "正常", +}; import { getRoadInfoByStakeMark, getOrganizationName, @@ -133,7 +130,7 @@ export default { if (roadInfo) this.data.roadName = roadInfo.roadName; }, methods: { - handleClickTabs() {}, + handleClickTabs() { }, }, }; @@ -173,7 +170,7 @@ export default { align-items: center; justify-content: end; - > div { + >div { font-size: 16px; padding: 6px 12px; } 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 d22bb7e3..bb160c92 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 @@ -35,6 +35,7 @@ import request from "@/utils/request"; import { Message } from "element-ui"; // import { axiosIns } from "@screen/utils/axios/auth.js"; +import { handle3CResult } from "@screen/utils/deviceControl.js" const workStatus = [ { @@ -198,24 +199,7 @@ export default { formData.controlType = data.mode; - switch (data.mode) { - case "00": - formData.onWorkStatus = data.onWorkStatus; - formData.inWorkStatus = data.inWorkStatus; - break; - case "01": - case "02": - await this.requestURL("3C") - .then((data2) => { - formData.onWorkStatus = data2.onWorkStatus; - formData.inWorkStatus = data2.inWorkStatus; - - if (data.mode === '01') - formData.displayTime = [data.startDisplay, data.endDisplay]; - }) - .catch(() => { }); - break; - } + await handle3CResult(data, formData, this.requestURL); this.oldFormData = { ...formData }; 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 1fa6158b..f177141a 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 @@ -17,10 +17,7 @@
- + @@ -35,7 +32,10 @@ import { } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; import Video from "@screen/components/Video"; import request from "@/utils/request"; - +import { delay } from "@screen/utils/common.js" +import { handle3CResult } from "@screen/utils/deviceControl.js" +import { controlModelMap, gzztMap } from "@screen/utils/enum.js"; +import { find } from "lodash"; import { dialogDelayVisible } from "./../mixin"; // 行车诱导 @@ -116,19 +116,30 @@ export default { .then((data) => { this.dialogData.brand = data.brand; }) - .catch((err) => {}); - - this.requestURL(52) - .then((result) => { - this.data.workMode = { - "00": "手动控制", - "01": "自动控制", - "02": "万年历", - }[result.mode]; - this.data.onWorkStatus = result.onWorkStatus; - this.data.inWorkStatus = result.inWorkStatus; - }) - .catch((err) => {}); + .catch((err) => { }); + + // this.requestURL(52) + // .then((result) => { + // this.data.workMode = { + // "00": "手动控制", + // "01": "自动控制", + // "02": "万年历", + // }[result.mode]; + // this.data.onWorkStatus = result.onWorkStatus; + // this.data.inWorkStatus = result.inWorkStatus; + // }) + // .catch((err) => { }); + this.requestURL() + .then(async (data) => { + await delay(0); + const formData = {}; + formData.controlType = data.mode; + await handle3CResult(data, formData, this.requestURL); + + formData.controlType && (this.$set(this.data, "workMode", controlModelMap[formData.controlType]))//(this.data.workMode = controlModelMap[formData.controlType]); + formData.inWorkStatus && (this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]))//(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]); + formData.onWorkStatus && (this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]))//(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]); + }); const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); console.log( @@ -195,7 +206,7 @@ export default { align-items: center; justify-content: end; - > div { + >div { font-size: 16px; padding: 6px 12px; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue index 6ffc3d19..a7bb4368 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue @@ -4,7 +4,8 @@ -
+ @@ -141,7 +142,7 @@ export default { handler(bool) { if (!bool) return; - this.reDisplay(); + // this.reDisplay(); } } }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue index 2ece670a..c8747f74 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue @@ -26,7 +26,6 @@