+
传感器汇总
@@ -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} });
}
}
};