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 @@