1 #168
@ -1262,6 +1262,30 @@ export default {
 | 
			
		||||
                        // this.$message.error(res.data.msg);
 | 
			
		||||
                    }
 | 
			
		||||
                })
 | 
			
		||||
                this.api.getControlRtDatastation(formData).then(res => {
 | 
			
		||||
                    this.controlList = []
 | 
			
		||||
                    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 = 0
 | 
			
		||||
                                    if (el.equipmentStart == 0) {
 | 
			
		||||
                                        num = '故障'
 | 
			
		||||
                                    } else {
 | 
			
		||||
                                        num = el.environmentData + el1.unit
 | 
			
		||||
                                    }
 | 
			
		||||
                                    this.controlList.push({
 | 
			
		||||
                                        ...el,
 | 
			
		||||
                                        num: num,
 | 
			
		||||
                                        img: require(`../../assets/image/real-time-${el.formula}.png`)
 | 
			
		||||
                                    })
 | 
			
		||||
                                }
 | 
			
		||||
                            })
 | 
			
		||||
                        })
 | 
			
		||||
                    }
 | 
			
		||||
                    // console.log(this.controlList);
 | 
			
		||||
                })
 | 
			
		||||
                var nowDevice = store.equipmentList[this.indexs - 1]
 | 
			
		||||
                // var data2 = {
 | 
			
		||||
                //     cameraid: nowDevice.cameraSerialNumber,
 | 
			
		||||
 | 
			
		||||
@ -258,7 +258,7 @@ export default {
 | 
			
		||||
        },
 | 
			
		||||
        //根据类型反向计算赋值给inputData
 | 
			
		||||
        getSaveCountData() {
 | 
			
		||||
            for (var i = 0; i < 48; i++) {
 | 
			
		||||
            for (var i = 0; i < 96; i++) {
 | 
			
		||||
                this.typeList.forEach((el, index) => {
 | 
			
		||||
                    if (el.value == this.inputData[this.numberList[i]]) {
 | 
			
		||||
                        if (el.countType == 0) {
 | 
			
		||||
@ -284,7 +284,7 @@ export default {
 | 
			
		||||
        },
 | 
			
		||||
        //根据类型修改数据
 | 
			
		||||
        getCountData() {
 | 
			
		||||
            for (var i = 0; i < 6; i++) {
 | 
			
		||||
            for (var i = 0; i < 96; i++) {
 | 
			
		||||
                this.typeList.forEach((el, index) => {
 | 
			
		||||
                    if (el.value == this.inputData[this.numberList[i]]) {
 | 
			
		||||
                        if (el.countType == 0) {
 | 
			
		||||
@ -550,7 +550,7 @@ export default {
 | 
			
		||||
                    store.nowInput = ''
 | 
			
		||||
                    this.getSaveCountData()
 | 
			
		||||
                    // this.dataInit();
 | 
			
		||||
                    for (var i = 0; i < 48; i++) {
 | 
			
		||||
                    for (var i = 0; i < 96; i++) {
 | 
			
		||||
                        if (this.numberList[i] == data.regAddress) {
 | 
			
		||||
                            this.inputData[this.numberList[i]] = data.num
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -519,7 +519,6 @@ export default {
 | 
			
		||||
            this.actList2.forEach((el, index) => {
 | 
			
		||||
                this.actList2New[this.actList2New.length-el-1] = '1'
 | 
			
		||||
            })
 | 
			
		||||
            console.log(this.actList2,this.actList2New,this.actList2New.join(""));
 | 
			
		||||
            var num = this.actList2New.join("");
 | 
			
		||||
            var dataNum = {
 | 
			
		||||
                target: {
 | 
			
		||||
@ -534,7 +533,8 @@ export default {
 | 
			
		||||
            } else {
 | 
			
		||||
                this.actList3.splice(this.actList3.indexOf(index), 1)
 | 
			
		||||
            }
 | 
			
		||||
            this.actList3New=['0','0','0','0','0']
 | 
			
		||||
            this.actList3New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
 | 
			
		||||
 | 
			
		||||
            this.actList3.forEach((el, index) => {
 | 
			
		||||
                this.actList3New[this.actList3New.length-el-1] = '1'
 | 
			
		||||
            })
 | 
			
		||||
@ -630,7 +630,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
            this.actList8New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
 | 
			
		||||
            this.actList8.forEach((el, index) => {
 | 
			
		||||
                this.actList6New[this.actList8New.length-el-1] = '1'
 | 
			
		||||
                this.actList8New[this.actList8New.length-el-1] = '1'
 | 
			
		||||
            })
 | 
			
		||||
          
 | 
			
		||||
            var num = this.actList8New.join("");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user