pc-master #57

Merged
xiaomeng merged 3 commits from pc-master into portal 2023-11-24 08:16:37 +00:00
3 changed files with 23 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -54,6 +54,8 @@
}, },
methods:{ methods:{
login(){ login(){
var store=this.$store.state
// "username": "xiaomeng", // "username": "xiaomeng",
// "password": "lihe12345" // "password": "lihe12345"
if(!this.username){ if(!this.username){
@ -86,6 +88,7 @@
message: '登陆成功', message: '登陆成功',
type: "success", type: "success",
}); });
store.equipmentIndex=1
localStorage.setItem('token',res.data.data.token) localStorage.setItem('token',res.data.data.token)
localStorage.setItem('userInfo',JSON.stringify(res.data.data)) localStorage.setItem('userInfo',JSON.stringify(res.data.data))
this.$router.push({ name: 'index' }) this.$router.push({ name: 'index' })

View File

@ -249,7 +249,7 @@ export default {
deviceName: 1, deviceName: 1,
controlList: [], controlList: [],
statusInterval: null,//statusInterval statusInterval: null,//statusInterval
statusTime: 3,//status statusTime: 2,//status
} }
}, },
watch: { watch: {
@ -551,6 +551,7 @@ export default {
}); });
this.api.getControlRtDatastation(formData).then(res => { this.api.getControlRtDatastation(formData).then(res => {
this.controlList = [] this.controlList = []
if (res.data.code == 200) {
res.data.data.forEach((el, index) => { res.data.data.forEach((el, index) => {
list.forEach((el1, index1) => { list.forEach((el1, index1) => {
if (el.formula == el1.value) { if (el.formula == el1.value) {
@ -564,6 +565,7 @@ export default {
} }
}) })
}) })
}
// console.log(this.controlList); // console.log(this.controlList);
}) })
@ -638,6 +640,11 @@ export default {
}, 10); }, 10);
} else { } else {
this.statusList = []
this.fanStatus = {
name: '风机', open: 0, status: []
}
this.$forceUpdate();
// this.$message.error(res.data.msg); // this.$message.error(res.data.msg);
} }
}) })