传感器汇总
@@ -50,24 +52,26 @@ import {
} from '@/api/board/nav'
export default {
+ name: 'BoardTopNav',
data() {
return {
selectSecnesList: [],
name: '智慧场景',
isIndex: true,
sceneId: this.$store.getters.sceneId,
+ nowMenu: '1'
}
},
- props: {
- nowMenu: {
- type: String,
- default: '1'
- },
- },
+ // props: {
+ // nowMenu: {
+ // type: String,
+ // default: '1'
+ // },
+ // },
async mounted() {
if (this.$route.name === 'SmartScene' || this.$route.name === 'GPS' || this.$route.name === 'index' || this.$store.getters.sceneId) {
- }else{
+ } else {
await this.$router.replace({path: "/board/index"});
}
await this.setSelectSecnes()
@@ -101,20 +105,20 @@ export default {
this.sceneId = data.find(e => e.sceneName === this.$route.query.name).sceneId
this.name = data.find(e => e.sceneName === this.$route.query.name).sceneName
}
- this.$emit('sceneIdChange', this.sceneId);
+ if (this.name === '智慧场景' && this.$store.getters.sceneId) {
+ this.name = data.find(e => e.sceneId === this.$store.getters.sceneId).sceneName
+ }
await this.$store.dispatch('app/setSceneId', this.sceneId)
},
- // sceneIdChange(){
- //
- // },
- toLink(e) {
+ toLink(e, nowMenu) {
+ this.nowMenu = nowMenu
this.$router.replace({path: "/board/" + e});
},
- async dropdownLink(e) {
+ async dropdownLink(e,) {
+ this.nowMenu = '2'
await this.$store.dispatch('app/setSceneId', e.sceneId)
- this.$emit('sceneIdChange', e.sceneId);
this.name = e.name
- this.$router.replace({path: "/board/" + (e.router || 'smartScene'), query: {name: e.name}});
+ await this.$router.replace({path: "/board/" + (e.router || 'smartScene'), query: {name: e.name}});
},
toIndex() {
this.$router.replace({path: "/index"});
diff --git a/ruoyi-ui/src/layout/boardIndex.vue b/ruoyi-ui/src/layout/boardIndex.vue
index 99bd68b..1026848 100644
--- a/ruoyi-ui/src/layout/boardIndex.vue
+++ b/ruoyi-ui/src/layout/boardIndex.vue
@@ -1,16 +1,22 @@
diff --git a/ruoyi-ui/src/views/board/GPS/index.vue b/ruoyi-ui/src/views/board/GPS/index.vue
index c6f048a..070f195 100644
--- a/ruoyi-ui/src/views/board/GPS/index.vue
+++ b/ruoyi-ui/src/views/board/GPS/index.vue
@@ -1,7 +1,6 @@
-
@@ -43,7 +42,7 @@
{{ item.value3 }}
- 处理
+ 处理
已处理
@@ -66,7 +65,6 @@