diff --git a/ruoyi-ui/src/components/BoardTopNav/index.vue b/ruoyi-ui/src/components/BoardTopNav/index.vue index f66ff2c..fe5d892 100644 --- a/ruoyi-ui/src/components/BoardTopNav/index.vue +++ b/ruoyi-ui/src/components/BoardTopNav/index.vue @@ -2,27 +2,27 @@
智慧物联监控平台
-
+
监控主页
- + - 智慧场景 + {{ name }} - - {{ i.sceneName }} + + {{ i.sceneName }}
-
+
设备监测
-
+
传感器汇总 @@ -48,7 +48,8 @@ import { export default { data() { return { - selectSecnesList: [] + selectSecnesList: [], + name:'智慧场景' } }, props: { @@ -60,11 +61,23 @@ export default { mounted() { this.setSelectSecnes() + if(this.$route.name === 'SmartScene'){ + if(this.$route.query?.name){ + this.name = this.$route.query?.name + } + } }, methods: { async setSelectSecnes() { const {data} = await selectSecnes() this.selectSecnesList = data + }, + toLink(e){ + this.$router.push({ path: "/board/"+e }); + }, + dropdownLink(e){ + this.name = e.name + this.$router.push({ path: "/board/"+(e.router||'smartScene'),query: {name: e.name} }); } } };