pc-master #5

Merged
clibing merged 3 commits from pc-master into portal 2023-10-07 15:03:28 +00:00
5 changed files with 30 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -61,7 +61,7 @@ export default new Vuex.Store({
{ label: '土壤氮含量', value: 41, countType: 0,unit:'mg/kg' }, { label: '土壤氮含量', value: 41, countType: 0,unit:'mg/kg' },
{ label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' }, { label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' },
{ label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' }, { label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' },
{ label: '臭氧', value: 44, countType: 0,unit:'ppm' }, { label: '管道压力', value: 44, countType: 0,unit:'Kpa' },
{ label: '一氧化碳', value: 45, countType: 0,unit:'ppm' }, { label: '一氧化碳', value: 45, countType: 0,unit:'ppm' },
{ label: '氨气', value: 46, countType: 0,unit:'ppm' }, { label: '氨气', value: 46, countType: 0,unit:'ppm' },
{ label: '硫化氢', value: 47, countType: 0,unit:'ppm' }, { label: '硫化氢', value: 47, countType: 0,unit:'ppm' },

View File

@ -75,12 +75,13 @@ export default {
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
that.timer&&clearInterval(that.timer) that.timer&&clearInterval(that.timer)
setInterval(() => { that.timer= setInterval(() => {
that.dataInit(); that.dataInit();
}, 60000); }, 60000);
}, 0); }, 0);
}, },
beforeDestroy() { beforeDestroy() {
const that = this;
// //
if (this.player) { if (this.player) {
this.player.dispose(); this.player.dispose();

View File

@ -35,8 +35,8 @@
</div> </div>
</div> </div>
<div class="left-btn"> <div class="left-btn">
<div :class="left1Act == 0 ? 'active' : ''">进水泵</div> <div :class="left1Act == 1&&left1Act==3 ? 'active' : ''">进水泵</div>
<div :class="left1Act == 1 ? 'active' : ''">配肥泵</div> <div :class="left1Act == 2&&left1Act==3 ? 'active' : ''">配肥泵</div>
</div> </div>
</div> </div>
@ -247,8 +247,8 @@ export default {
ADdata: 0, ADdata: 0,
},], },],
right2Index: [], right2Index: [],
rightList2: ['外控信号2#', rightList2: ['外控信号1#',
'外控信号1#', '外控信号2#',
'外控信号3#', '外控信号3#',
'外控信号4#', '外控信号4#',
'高液位信号', '高液位信号',
@ -280,6 +280,7 @@ export default {
}, },
// //
beforeDestroy(){ beforeDestroy(){
const that = this;
that.pageTimer&&clearInterval(that.pageTimer) that.pageTimer&&clearInterval(that.pageTimer)
}, },
mounted() { mounted() {
@ -478,6 +479,7 @@ export default {
var number = this.padString(this.inputData['29'].toString(2), 14) var number = this.padString(this.inputData['29'].toString(2), 14)
var index = 6 var index = 6
var typeNumber = -1 var typeNumber = -1
for (var i = 0; i < index; i++) { for (var i = 0; i < index; i++) {
if (Number(number[i])) { if (Number(number[i])) {
typeNumber = i typeNumber = i
@ -488,21 +490,31 @@ export default {
var statusIndex = 8 var statusIndex = 8
for (var j = 0; j < statusIndex; j++) { for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length-1 - j])) { if (Number(number[number.length-1 - j])) {
this.right2Index.push(j) if(j=0){
this.right2Index.push(1)
}else if(j=1){
this.right2Index.push(0)
}else{
this.right2Index.push(j)
}
} }
} }
}, },
// //
getData30() { getData30() {
var number = this.padString(this.inputData['30'].toString(2), 2) // var number = this.padString(this.inputData['30'].toString(2), 2)
if (Number(number[0])) { // if (Number(number[0])) {
this.left1Act = 1 // this.left1Act = 1
} // }
else if (Number(number[1])) { // if (Number(number[1])) {
this.left1Act = 0 // this.left1Act = 0
} else { // }
this.left1Act = -1 // if (Number(number[0])&&Number(number[1])) {
} // this.left1Act = 3
// }
// else {
// this.left1Act = -1
// }
}, },
dataInit() { dataInit() {
var deviceDetail = this.deviceDetail var deviceDetail = this.deviceDetail