pull/55/head
孙萌 2023-11-24 09:42:41 +08:00
parent 54d3b56851
commit 57737265b5
1 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,7 @@ export default {
userInfo: null, userInfo: null,
loading: true,// loading: true,//
IDTimer: null, IDTimer: null,
deviceId:'',
} }
}, },
watch: { watch: {
@ -100,6 +101,7 @@ export default {
this.getTime() this.getTime()
var router = this.$route.query var router = this.$route.query
if (router.token && router.userid) { if (router.token && router.userid) {
this.deviceId=router.deviceId?router.deviceId:''
localStorage.setItem('token', router.token) localStorage.setItem('token', router.token)
this.api.getUser({ userId: router.userid }).then(res => { this.api.getUser({ userId: router.userid }).then(res => {
@ -166,6 +168,10 @@ export default {
this.leftList[1].list = [] this.leftList[1].list = []
this.leftList[2].list = [] this.leftList[2].list = []
this.$store.state.equipmentList.forEach((el, index) => { this.$store.state.equipmentList.forEach((el, index) => {
//deviceId
if(this.deviceId&&this.deviceId==el.deviceId){
this.$store.state.equipmentIndex = index+1
}
if (el.deviceName == 1) { if (el.deviceName == 1) {
this.leftList.forEach((el1, index1) => { this.leftList.forEach((el1, index1) => {
if (el1.name == '施肥机') { if (el1.name == '施肥机') {