Merge pull request '1' (#168) from pc-master into portal

Reviewed-on: #168
portal
xiaomeng 2024-08-28 01:02:56 +00:00
commit 723829c616
3 changed files with 30 additions and 6 deletions

View File

@ -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,

View File

@ -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

View File

@ -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("");