Compare commits

...

2 Commits

Author SHA1 Message Date
xiaomeng 4915a0c1ce Merge pull request '1' (#166) from pc-master into portal
Reviewed-on: #166
2024-08-27 00:16:33 +00:00
sunmeng 2cd3725141 1 2024-08-26 16:47:07 +08:00
5 changed files with 144 additions and 23 deletions

View File

@ -74,23 +74,6 @@ export default {
sensorType: '', sensorType: '',
typeList1: [ typeList1: [
// { label: '1#湿', value: 0 }, // { label: '1#湿', value: 0 },
{ label: '1#土壤湿度', value: 1 },
{ label: '2#土壤湿度', value: 2 },
{ label: '3#土壤湿度', value: 3 },
{ label: '4#土壤湿度', value: 4 },
{ label: '5#土壤湿度', value: 5 },
{ label: '6#土壤湿度', value: 6 },
{ label: '7#土壤湿度', value: 7 },
{ label: '8#土壤湿度', value: 8 },
{ label: '9#土壤湿度', value: 9 },
{ label: '10#土壤湿度', value: 10 },
{ label: '11#土壤湿度', value: 11 },
{ label: '12#土壤湿度', value: 12 },
{ label: '13#土壤湿度', value: 13 },
{ label: '14#土壤湿度', value: 14 },],
list1:40,
typeList2: [
// { label: '1#湿', value: 0 },
{ label: '1#土壤温度', value: 1 }, { label: '1#土壤温度', value: 1 },
{ label: '2#土壤温度', value: 2 }, { label: '2#土壤温度', value: 2 },
{ label: '3#土壤温度', value: 3 }, { label: '3#土壤温度', value: 3 },
@ -105,6 +88,23 @@ export default {
{ label: '12#土壤温度', value: 12 }, { label: '12#土壤温度', value: 12 },
{ label: '13#土壤温度', value: 13 }, { label: '13#土壤温度', value: 13 },
{ label: '14#土壤温度', value: 14 },], { label: '14#土壤温度', value: 14 },],
list1:40,
typeList2: [
// { label: '1#湿', value: 0 },
{ label: '1#土壤湿度', value: 1 },
{ label: '2#土壤湿度', value: 2 },
{ label: '3#土壤湿度', value: 3 },
{ label: '4#土壤湿度', value: 4 },
{ label: '5#土壤湿度', value: 5 },
{ label: '6#土壤湿度', value: 6 },
{ label: '7#土壤湿度', value: 7 },
{ label: '8#土壤湿度', value: 8 },
{ label: '9#土壤湿度', value: 9 },
{ label: '10#土壤湿度', value: 10 },
{ label: '11#土壤湿度', value: 11 },
{ label: '12#土壤湿度', value: 12 },
{ label: '13#土壤湿度', value: 13 },
{ label: '14#土壤湿度', value: 14 },],
list2:40, list2:40,
typeList3: [ typeList3: [
{ label: '加热模式', value: 1 }, { label: '加热模式', value: 1 },

View File

@ -825,7 +825,7 @@ export default {
this.inputData = res.data.data; this.inputData = res.data.data;
// this.getType(); // this.getType();
// this.getType00(); // this.getType00();
this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "53"]); this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "51"]);
this.inputData['1' + (10 + (indexs - 1)) + '01'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '01']) this.inputData['1' + (10 + (indexs - 1)) + '01'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '01'])
this.inputData['1' + (10 + (indexs - 1)) + '06'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '06']) this.inputData['1' + (10 + (indexs - 1)) + '06'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '06'])
this.inputData['1' + (10 + (indexs - 1)) + '17'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '17']) this.inputData['1' + (10 + (indexs - 1)) + '17'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '17'])

View File

@ -27,9 +27,9 @@
</div> </div>
</div> </div>
<!-- 控制器/施肥机 --> <!-- 控制器/施肥机 -->
<div class="page-content new-data" v-else :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''"> <div class="page-content new-data" v-else :class="deviceName !=1 ? 'control-page' : ''">
<div class="control-view" v-if="deviceName == 10 || deviceName == 30"> <div class="control-view" v-if="deviceName !=1">
<div class="title" @click='weatherModel = true'>气象站:</div> <div class="title" @click='weatherModel = true'>气象站:</div>
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1"> <vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
<div class="list-view" v-for="item, index in controlList " :key="index"> <div class="list-view" v-for="item, index in controlList " :key="index">

View File

@ -174,6 +174,8 @@ export default {
}, },
watch: { watch: {
'active'(newVal, oldVal) { 'active'(newVal, oldVal) {
console.log(newVal,'active');
this.getSensorType() this.getSensorType()
// this.getCountData() // this.getCountData()
}, },
@ -307,11 +309,17 @@ export default {
} }
}, },
getSensorType() { getSensorType() {
var text='无意义的传感器'
this.typeList.forEach((el, index) => { this.typeList.forEach((el, index) => {
if (el.value == this.inputData[this.numberList[this.active]]) { if (el.value == this.inputData[this.numberList[this.active]]) {
this.sensorType = el.label console.log(el.label,this.numberList[this.active],this.inputData[this.numberList[this.active]],111);
text = el.label
} }
}) })
setTimeout(() => {
this.sensorType = text
}, 10);
}, },
toIndex(index) { toIndex(index) {
this.active = index this.active = index

View File

@ -507,7 +507,7 @@ export default {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.changeBtn('500', dataNum); this.changeBtn('10001', dataNum);
}, },
selList2(index) { selList2(index) {
if (this.actList2.indexOf(index) == -1) { if (this.actList2.indexOf(index) == -1) {
@ -526,7 +526,120 @@ export default {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.changeBtn('501', dataNum); this.changeBtn('10002', dataNum);
},
selList3(index) {
if (this.actList3.indexOf(index) == -1) {
this.actList3.push(index)
} else {
this.actList3.splice(this.actList3.indexOf(index), 1)
}
this.actList3New=['0','0','0','0','0']
this.actList3.forEach((el, index) => {
this.actList3New[this.actList3New.length-el-1] = '1'
})
var num = this.actList3New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10003', dataNum);
},
selList4(index) {
if (this.actList4.indexOf(index) == -1) {
this.actList4.push(index)
} else {
this.actList4.splice(this.actList4.indexOf(index), 1)
}
this.actList4New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
this.actList4.forEach((el, index) => {
this.actList4New[this.actList4New.length-el-1] = '1'
})
var num = this.actList4New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10004', dataNum);
},
selList5(index) {
if (this.actList5.indexOf(index) == -1) {
this.actList5.push(index)
} else {
this.actList5.splice(this.actList5.indexOf(index), 1)
}
this.actList5New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
this.actList5.forEach((el, index) => {
this.actList5New[this.actList5New.length-el-1] = '1'
})
var num = this.actList5New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10005', dataNum);
},
selList6(index) {
if (this.actList6.indexOf(index) == -1) {
this.actList6.push(index)
} else {
this.actList6.splice(this.actList6.indexOf(index), 1)
}
this.actList6New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
this.actList6.forEach((el, index) => {
this.actList6New[this.actList6New.length-el-1] = '1'
})
var num = this.actList6New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10006', dataNum);
},
selList7(index) {
if (this.actList7.indexOf(index) == -1) {
this.actList7.push(index)
} else {
this.actList7.splice(this.actList7.indexOf(index), 1)
}
this.actList7New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
this.actList7.forEach((el, index) => {
this.actList7New[this.actList7New.length-el-1] = '1'
})
var num = this.actList7New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10007', dataNum);
},
selList8(index) {
if (this.actList8.indexOf(index) == -1) {
this.actList8.push(index)
} else {
this.actList8.splice(this.actList8.indexOf(index), 1)
}
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'
})
var num = this.actList8New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('10008', dataNum);
}, },
}, },