Compare commits
2 Commits
ae6ace0bf6
...
723829c616
Author | SHA1 | Date |
---|---|---|
xiaomeng | 723829c616 | |
sunmeng | 8fd32a4083 |
|
@ -1262,6 +1262,30 @@ export default {
|
||||||
// this.$message.error(res.data.msg);
|
// 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 nowDevice = store.equipmentList[this.indexs - 1]
|
||||||
// var data2 = {
|
// var data2 = {
|
||||||
// cameraid: nowDevice.cameraSerialNumber,
|
// cameraid: nowDevice.cameraSerialNumber,
|
||||||
|
|
|
@ -258,7 +258,7 @@ export default {
|
||||||
},
|
},
|
||||||
//根据类型反向计算赋值给inputData
|
//根据类型反向计算赋值给inputData
|
||||||
getSaveCountData() {
|
getSaveCountData() {
|
||||||
for (var i = 0; i < 48; i++) {
|
for (var i = 0; i < 96; i++) {
|
||||||
this.typeList.forEach((el, index) => {
|
this.typeList.forEach((el, index) => {
|
||||||
if (el.value == this.inputData[this.numberList[i]]) {
|
if (el.value == this.inputData[this.numberList[i]]) {
|
||||||
if (el.countType == 0) {
|
if (el.countType == 0) {
|
||||||
|
@ -284,7 +284,7 @@ export default {
|
||||||
},
|
},
|
||||||
//根据类型修改数据
|
//根据类型修改数据
|
||||||
getCountData() {
|
getCountData() {
|
||||||
for (var i = 0; i < 6; i++) {
|
for (var i = 0; i < 96; i++) {
|
||||||
this.typeList.forEach((el, index) => {
|
this.typeList.forEach((el, index) => {
|
||||||
if (el.value == this.inputData[this.numberList[i]]) {
|
if (el.value == this.inputData[this.numberList[i]]) {
|
||||||
if (el.countType == 0) {
|
if (el.countType == 0) {
|
||||||
|
@ -550,7 +550,7 @@ export default {
|
||||||
store.nowInput = ''
|
store.nowInput = ''
|
||||||
this.getSaveCountData()
|
this.getSaveCountData()
|
||||||
// this.dataInit();
|
// this.dataInit();
|
||||||
for (var i = 0; i < 48; i++) {
|
for (var i = 0; i < 96; i++) {
|
||||||
if (this.numberList[i] == data.regAddress) {
|
if (this.numberList[i] == data.regAddress) {
|
||||||
this.inputData[this.numberList[i]] = data.num
|
this.inputData[this.numberList[i]] = data.num
|
||||||
|
|
||||||
|
|
|
@ -519,7 +519,6 @@ export default {
|
||||||
this.actList2.forEach((el, index) => {
|
this.actList2.forEach((el, index) => {
|
||||||
this.actList2New[this.actList2New.length-el-1] = '1'
|
this.actList2New[this.actList2New.length-el-1] = '1'
|
||||||
})
|
})
|
||||||
console.log(this.actList2,this.actList2New,this.actList2New.join(""));
|
|
||||||
var num = this.actList2New.join("");
|
var num = this.actList2New.join("");
|
||||||
var dataNum = {
|
var dataNum = {
|
||||||
target: {
|
target: {
|
||||||
|
@ -534,7 +533,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.actList3.splice(this.actList3.indexOf(index), 1)
|
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.actList3.forEach((el, index) => {
|
||||||
this.actList3New[this.actList3New.length-el-1] = '1'
|
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.actList8New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||||
this.actList8.forEach((el, index) => {
|
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("");
|
var num = this.actList8New.join("");
|
||||||
|
|
Loading…
Reference in New Issue