From 25df62884da47943dcbb9021142721b2bfa9714d Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Fri, 1 Mar 2024 13:44:09 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=20=E6=83=85=E6=8A=A5=E6=9D=BF=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20=E5=A2=9E=E5=8A=A0null=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/Home/components/InfoBoard/index.vue | 163 +++++------------- 1 file changed, 47 insertions(+), 116 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue index 7078d4e2..53bd1e01 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue @@ -6,49 +6,22 @@
{{ selectedDevice.deviceName }}
- - + +
-
+
-
+
- +
-

+

-

+

@@ -88,58 +61,30 @@
-->
- 设备参数 - 在线率统计 + 设备参数 + 在线率统计
- 添加信息 - 发布信息 + 添加信息 + 发布信息
- +
信息模板
-
- +
+
附近相机
@@ -148,23 +93,12 @@
-
+

{{ item.dictLabel }}

-
+
- +
-

+

@@ -185,22 +116,13 @@
- + +
- +
@@ -310,7 +232,7 @@ export default { // this.____getAllTemplate(); }, computed: {}, - mounted() {}, + mounted() { }, methods: { // 获取信息模板分类 ____getTemplateCategory() { @@ -347,11 +269,15 @@ export default { if (IS_TESTING) { this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content); } else { - getBoardDeviceInfo(this.selectedDevice.iotDeviceId) - .then((res) => { - this.selectedBdMsg = res.data["3A"].content; - }) - .catch((err) => {}); + //改下判断条件 iotDeviceId为null时不要请求后台 加个提示 设备未接入 + const iotDeviceId = this.selectedDevice.iotDeviceId; + if (!(iotDeviceId === null || iotDeviceId === undefined)) + getBoardDeviceInfo() + .then((res) => { + this.selectedBdMsg = res.data["3A"].content; + }) + .catch((err) => { }); + else this.$message.error("设备未接入"); } }, // 设置当前设备可用的模板 @@ -412,7 +338,7 @@ export default { } }, - ____refreshPageData(para) {}, + ____refreshPageData(para) { }, ____getNearbyCams() { if (!this.selectedDevice.stakeMark) { @@ -519,6 +445,7 @@ export default { &.infoBtnBoxSm { width: 60px; } + width: 110px; height: 80px; display: flex; @@ -584,6 +511,7 @@ export default { padding: 0 0.5vw; } } + .mask { width: 100%; height: 100%; @@ -595,6 +523,7 @@ export default { display: flex; justify-content: center; align-items: center; + .content { display: flex; flex-direction: row; @@ -613,10 +542,12 @@ export default { background-color: #114c66; position: relative; margin-top: 50px; + &.camera { width: 540px; height: 556px; } + &.template { width: 430px; height: 556px;