pc-master #57
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB  | 
@ -54,6 +54,8 @@
 | 
			
		||||
    },
 | 
			
		||||
    methods:{
 | 
			
		||||
        login(){
 | 
			
		||||
            var store=this.$store.state
 | 
			
		||||
 | 
			
		||||
            // "username": "xiaomeng",
 | 
			
		||||
            //     "password": "lihe12345"
 | 
			
		||||
            if(!this.username){
 | 
			
		||||
@ -86,6 +88,7 @@
 | 
			
		||||
                        message: '登陆成功',
 | 
			
		||||
                        type: "success",
 | 
			
		||||
                    });
 | 
			
		||||
                    store.equipmentIndex=1
 | 
			
		||||
                    localStorage.setItem('token',res.data.data.token)
 | 
			
		||||
                    localStorage.setItem('userInfo',JSON.stringify(res.data.data))
 | 
			
		||||
                    this.$router.push({ name: 'index' })
 | 
			
		||||
 | 
			
		||||
@ -249,7 +249,7 @@ export default {
 | 
			
		||||
            deviceName: 1,
 | 
			
		||||
            controlList: [],
 | 
			
		||||
            statusInterval: null,//status状态的Interval
 | 
			
		||||
            statusTime: 3,//status状态的秒数
 | 
			
		||||
            statusTime: 2,//status状态的秒数
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    watch: {
 | 
			
		||||
@ -551,19 +551,21 @@ export default {
 | 
			
		||||
                });
 | 
			
		||||
                this.api.getControlRtDatastation(formData).then(res => {
 | 
			
		||||
                    this.controlList = []
 | 
			
		||||
                    res.data.data.forEach((el, index) => {
 | 
			
		||||
                        list.forEach((el1, index1) => {
 | 
			
		||||
                            if (el.formula == el1.value) {
 | 
			
		||||
                                // console.log(el1);
 | 
			
		||||
                                var num = el.environmentData + el1.unit
 | 
			
		||||
                                this.controlList.push({
 | 
			
		||||
                                    ...el,
 | 
			
		||||
                                    num: num,
 | 
			
		||||
                                    img: require(`../../assets/image/real-time-${el.formula}.png`)
 | 
			
		||||
                                })
 | 
			
		||||
                            }
 | 
			
		||||
                    if (res.data.code == 200) {
 | 
			
		||||
                        res.data.data.forEach((el, index) => {
 | 
			
		||||
                            list.forEach((el1, index1) => {
 | 
			
		||||
                                if (el.formula == el1.value) {
 | 
			
		||||
                                    // console.log(el1);
 | 
			
		||||
                                    var num = el.environmentData + el1.unit
 | 
			
		||||
                                    this.controlList.push({
 | 
			
		||||
                                        ...el,
 | 
			
		||||
                                        num: num,
 | 
			
		||||
                                        img: require(`../../assets/image/real-time-${el.formula}.png`)
 | 
			
		||||
                                    })
 | 
			
		||||
                                }
 | 
			
		||||
                            })
 | 
			
		||||
                        })
 | 
			
		||||
                    })
 | 
			
		||||
                    }
 | 
			
		||||
                    // console.log(this.controlList);
 | 
			
		||||
                })
 | 
			
		||||
 | 
			
		||||
@ -638,6 +640,11 @@ export default {
 | 
			
		||||
                    }, 10);
 | 
			
		||||
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.statusList = []
 | 
			
		||||
                    this.fanStatus = {
 | 
			
		||||
                        name: '风机', open: 0, status: []
 | 
			
		||||
                    }
 | 
			
		||||
                    this.$forceUpdate();
 | 
			
		||||
                    // this.$message.error(res.data.msg);
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user