From deb4ca10fa3a897c121319fc5533123ab6c0b582 Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Tue, 23 Jan 2024 15:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/components/Adaptation.vue | 6 +- .../components/Descriptions.vue | 4 +- .../components/Dialog/index.vue | 38 +- .../JiHeExpressway/components/Dialog/utils.js | 45 ++ .../JiHeExpressway/components/Video/Video.vue | 32 ++ .../JiHeExpressway/components/Video/index.vue | 104 ++++- .../images/camera-control-icon.svg | 3 + .../images/dialog/icon-control.png | Bin 950 -> 0 bytes .../images/dialog/icon-monitor.png | Bin 572 -> 0 bytes .../images/dialog/icon-photo.png | Bin 584 -> 0 bytes .../images/dialog/icon-video.png | Bin 595 -> 0 bytes .../images/home-filter/filter.svg | 5 + .../components/BroadcastReleases.vue | 193 ++++++++ .../components/Dialogs/Broadcast/index.vue | 157 +++++++ .../Dialogs/Camera/Descriptions.vue | 122 ----- .../Camera/components/CameraControlDialog.vue | 202 ++++++++ .../{ControlCamera => Camera}/images/add.svg | 2 +- .../images/bottom.svg | 1 - .../{ControlCamera => Camera}/images/left.svg | 1 - .../images/right.svg | 1 - .../{ControlCamera => Camera}/images/sub.svg | 2 +- .../{ControlCamera => Camera}/images/top.svg | 1 - .../Home/components/Dialogs/Camera/index.vue | 92 +++- .../Dialogs/DrivingGuidance/index.vue | 19 +- .../Home/components/RoadAndEvents/index.vue | 12 +- .../RoadAndEvents/utils/buttonEvent.js | 436 +++++++++++------- .../RoadAndEvents/utils/httpList.js | 129 ++++-- .../components/RoadAndEvents/utils/map.js | 41 +- .../views/JiHeExpressway/pages/Home/index.vue | 74 +-- 29 files changed, 1296 insertions(+), 426 deletions(-) create mode 100644 ruoyi-ui/src/views/JiHeExpressway/components/Dialog/utils.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/camera-control-icon.svg delete mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/dialog/icon-control.png delete mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/dialog/icon-monitor.png delete mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/dialog/icon-photo.png delete mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/dialog/icon-video.png create mode 100644 ruoyi-ui/src/views/JiHeExpressway/images/home-filter/filter.svg create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue delete mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/Descriptions.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/add.svg (93%) rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/bottom.svg (85%) rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/left.svg (84%) rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/right.svg (84%) rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/sub.svg (87%) rename ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/{ControlCamera => Camera}/images/top.svg (85%) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue index e35c600c..ca9e5cfd 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue @@ -1,5 +1,5 @@ @@ -81,8 +81,10 @@ export default { cssGlobalVariable[2][1] = `scaleX(${1 - (scaleY - scaleX) / 2})`; } + const AdaptationDom = this.$refs.AdaptationRef; + cssGlobalVariable.forEach((data) => { - document.documentElement.style.setProperty(...data); + AdaptationDom.style.setProperty(...data); }); } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index d6bad9c8..54957f65 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -56,7 +56,7 @@ export default { itemStyle: { type: [String, Object], default: null - }, + } }, computed: { gridStyle() { @@ -71,7 +71,7 @@ export default { if (item.enum) return EnumMap[item.enum][result]?.text; - const templateResult = item.key?.replace(/\$\{[^}]+\}/g, (key) => this.data[key.slice(2, -1)]); + const templateResult = item.key?.replace(/\$\{[^}]+\}/g, (key) => this.data[key.slice(2, -1)] || "-"); if (templateResult && templateResult != item.key) return templateResult diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue index 3bbe6885..f6d8e21f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue @@ -1,11 +1,11 @@ @@ -27,11 +31,14 @@ import Dialog from "@screen/components/Dialog/index.vue"; import Button from "@screen/components/Buttons/Button.vue" import Video from "@screen/components/Video" -import Descriptions from "./Descriptions.vue" +import Descriptions from '@screen/components/Descriptions.vue'; +import CameraControlDialog from "./components/CameraControlDialog.vue"; + +import { getRoadInfoByStakeMark, getOrganizationName } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import { dialogDelayVisible } from "./../mixin" -// 摄像机 G35 K094+079 +// 摄像机弹窗 export default { name: 'Camera', mixins: [dialogDelayVisible], @@ -39,15 +46,70 @@ export default { Dialog, Button, Descriptions, - Video + Video, + CameraControlDialog }, data() { return { - activeName: 'first' + activeName: 'first', + controlDialogVisible: false, + data: {}, + list: [ + { + label: '设备名称', + key: "deviceName", + }, + { + label: '道路名称', + key: "roadName", + }, + { + label: '设备编号', + key: "deviceCode", + }, + { + label: '所属机构', + key: "organizationName", + }, + { + label: '设备桩号', + key: "stakeMarkId", + }, + { + label: '设备方向', + key: "direction", + enum: "CameraDirectionEnum" + }, + { + label: '设备状态', + key: "deviceState", + enum: "DeviceTypeEnum", + gridColumn: 2, + }, + { + label: '状态更新时间', + key: "updateTime", + gridColumn: 2, + // enum: "CameraDirectionEnum" + }, + // { + // label: '经/纬度', + // key: "${longitude} / ${latitude}", + // }, + ], } }, - methods: { - handleClickTabs() { } + async created() { + this.data = { ...this.dialogData, organizationName: null, roadName: null }; + + getOrganizationName(this.dialogData.iotDeviceId) + .then((data) => { + this.data.organizationName = data.organizationName; + }); + + const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMarkId); + + if (roadInfo) this.data.roadName = roadInfo.roadName; } } 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 7b557162..8b80d616 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 @@