diff --git a/ruoyi-ui/src/components/BoardTopNav/index.vue b/ruoyi-ui/src/components/BoardTopNav/index.vue index 338779b..bb66e5a 100644 --- a/ruoyi-ui/src/components/BoardTopNav/index.vue +++ b/ruoyi-ui/src/components/BoardTopNav/index.vue @@ -14,19 +14,19 @@ {{ + :command="{router:i.router,name:i.sceneName,sceneId:i.sceneId}">{{ i.sceneName }} -
+
设备监测
-
+
传感器汇总 @@ -66,9 +66,8 @@ export default { }, async mounted() { - await this.setSelectSecnes() - if (this.$route.name === 'SmartScene'||this.$route.name === 'GPS' ) { + if (this.$route.name === 'SmartScene' || this.$route.name === 'GPS') { if (this.$route.query?.name) { this.name = this.$route.query?.name } else { @@ -89,9 +88,12 @@ export default { async setSelectSecnes() { const {data} = await selectSecnes() this.selectSecnesList = data - let defaultSceneId = data.find(e => e.defaultFlag === '1').sceneId - this.sceneId = defaultSceneId - this.$emit('sceneIdChange',defaultSceneId); + if (!this.$route.query.name) { + this.sceneId = data.find(e => e.defaultFlag === '1').sceneId + }else{ + this.sceneId = data.find(e => e.sceneName === this.$route.query.name).sceneId + } + this.$emit('sceneIdChange', this.sceneId); }, // sceneIdChange(){ // @@ -101,6 +103,7 @@ export default { }, dropdownLink(e) { this.name = e.name + this.$emit('sceneIdChange', e.sceneId); this.$router.push({path: "/board/" + (e.router || 'smartScene'), query: {name: e.name}}); }, toIndex() { diff --git a/ruoyi-ui/src/views/board/equipment/index.vue b/ruoyi-ui/src/views/board/equipment/index.vue index bbeeaac..5e0ff9c 100644 --- a/ruoyi-ui/src/views/board/equipment/index.vue +++ b/ruoyi-ui/src/views/board/equipment/index.vue @@ -70,7 +70,7 @@
- 详细信息 + 历史记录
@@ -109,6 +109,7 @@ export default { } }, async mounted() { + setInterval(this.getDevice,30*1000) }, methods: { sceneIdChange(e){ @@ -166,6 +167,9 @@ export default { async setMonitorById() { const {data} = await getMonitorById(this.sceneId) this.MonitorInfo = data + }, + toHistory(){ + this.$router.push({path: "/board/senso"}); } } }; diff --git a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue index e50181a..9b027f7 100644 --- a/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue +++ b/ruoyi-ui/src/views/board/equipmentMonitoring/index.vue @@ -1,7 +1,7 @@