1
This commit is contained in:
parent
0cdc1f7f2f
commit
1643ea077b
@ -67,6 +67,7 @@ let api = {
|
|||||||
getcontrol_geteqetdata: '/getcontrol/geteqetdata', //小程序气象站显示
|
getcontrol_geteqetdata: '/getcontrol/geteqetdata', //小程序气象站显示
|
||||||
|
|
||||||
getcontrol_rtDatastation: '/getcontrol/rtDatastation', //主页查看控制器气象站实时数据
|
getcontrol_rtDatastation: '/getcontrol/rtDatastation', //主页查看控制器气象站实时数据
|
||||||
|
getdata_rtdata: '/getdata/rtdata', //主页查看数据采集器实时数据
|
||||||
|
|
||||||
readControl_interiorthermalinsulation: '/readControl/interiorthermalinsulation', //读取(内保温)控制器
|
readControl_interiorthermalinsulation: '/readControl/interiorthermalinsulation', //读取(内保温)控制器
|
||||||
|
|
||||||
|
@ -365,6 +365,35 @@
|
|||||||
{{ (updateTime.filter(el=> el.equipmentId == item1.deviceId)).length > 0 ? (updateTime.filter(el=> el.equipmentId == item1.deviceId))[0].updateTime : '暂无'}}</span>
|
{{ (updateTime.filter(el=> el.equipmentId == item1.deviceId)).length > 0 ? (updateTime.filter(el=> el.equipmentId == item1.deviceId))[0].updateTime : '暂无'}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 数据采集器 -->
|
||||||
|
<template v-for="item0 in equipmentName40List">
|
||||||
|
<view class="waterAndFertilizerParams" :key="item0.id">
|
||||||
|
<view class="nav">
|
||||||
|
<image src="../../static/PH.png" mode=""></image>
|
||||||
|
<text>{{item0.deviceTypeName}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="detail">
|
||||||
|
<view class="item" v-for="item,index in item0.equipmentName40ListChild" :key="index"
|
||||||
|
@click="toTarget_water_fertilizer_PH(item.equipmentId,item.environmentData,item.environmentDataId,item.equipmentNumber,item.targetValue,getTypeList(item.formula),item.equipmentName,2)">
|
||||||
|
<image :src="`../../static/icon_new/icon${ item.formula }.png`" mode=""></image>
|
||||||
|
<view class="info">
|
||||||
|
<view class="">
|
||||||
|
{{ getStatus(item.equipmentNumber,item.targetValue) + item.environmentDataId }}
|
||||||
|
</view>
|
||||||
|
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">
|
||||||
|
{{ item.equipmentStart == 0 ? '故障' : ((item.formula == '12' ? getWindDirection(item.environmentData) : item.environmentData) + (item.formula == '12' ? '' : getTypeList(item.formula))) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="line" v-if="item0.equipmentName40ListChild.length > 0"></view>
|
||||||
|
<view class="updateTime">
|
||||||
|
<span></span>
|
||||||
|
<span>*更新数据时间 :
|
||||||
|
{{ (updateTime40.filter(el=> el.equipmentId == item0.deviceId)).length > 0 ? (updateTime40.filter(el=> el.equipmentId == item0.deviceId))[0].updateTime : '暂无'}}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -500,8 +529,11 @@
|
|||||||
equipmentName30ListChild: [],
|
equipmentName30ListChild: [],
|
||||||
equipmentName20List: [],
|
equipmentName20List: [],
|
||||||
equipmentName20ListChild: [],
|
equipmentName20ListChild: [],
|
||||||
|
equipmentName40List: [],
|
||||||
|
equipmentName40ListChild: [],
|
||||||
updateTime30: [],
|
updateTime30: [],
|
||||||
updateTime20: [],
|
updateTime20: [],
|
||||||
|
updateTime40: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -590,15 +622,25 @@
|
|||||||
this.equipmentName30List = [];
|
this.equipmentName30List = [];
|
||||||
this.equipmentName20List = [];
|
this.equipmentName20List = [];
|
||||||
res.data.forEach(el => {
|
res.data.forEach(el => {
|
||||||
|
// 气象站
|
||||||
if (el.equipmentName == 30) {
|
if (el.equipmentName == 30) {
|
||||||
this.equipmentName30List.push(el)
|
this.equipmentName30List.push(el)
|
||||||
}
|
}
|
||||||
if (el.equipmentName == 20) {
|
if (el.equipmentName == 20) {
|
||||||
this.equipmentName20List.push(el)
|
this.equipmentName20List.push(el)
|
||||||
}
|
}
|
||||||
|
// 数据采集器
|
||||||
|
if (el.equipmentName == 40) {
|
||||||
|
this.equipmentName40List.push(el)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
// 数据采集器
|
||||||
|
if (this.equipmentName40List.length != 0) {
|
||||||
|
this.getcontrol_rtDatastation40()
|
||||||
|
}
|
||||||
|
// 气象站
|
||||||
if (this.equipmentName30List.length != 0) {
|
if (this.equipmentName30List.length != 0) {
|
||||||
this.getcontrol_rtDatastation1()
|
this.getcontrol_rtDatastation30()
|
||||||
}
|
}
|
||||||
if (this.equipmentName20List.length != 0) {
|
if (this.equipmentName20List.length != 0) {
|
||||||
this.getFi_rtdata()
|
this.getFi_rtdata()
|
||||||
@ -877,8 +919,37 @@
|
|||||||
console.log(this.equipmentName20List);
|
console.log(this.equipmentName20List);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 获取deviceName为40的数据采集器实时数据
|
||||||
|
getcontrol_rtDatastation40() {
|
||||||
|
this.equipmentName40List = this.equipmentName40List.map((item, index) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
equipmentName40ListChild: []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
this.updateTime40 = []
|
||||||
|
this.equipmentName40List.forEach(el => {
|
||||||
|
this.$http({
|
||||||
|
url: this.api.getdata_rtdata + '?deviceId=' + el.deviceId,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach((el1, index) => {
|
||||||
|
el.equipmentName40ListChild.push({
|
||||||
|
...el1,
|
||||||
|
environmentDataId: this.getStatusNew(el1),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.updateTime40.push(res.data[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// console.log(this.equipmentName30List,'this.equipmentName30List');
|
||||||
|
},
|
||||||
// 获取deviceName为30的气象站实时数据
|
// 获取deviceName为30的气象站实时数据
|
||||||
getcontrol_rtDatastation1() {
|
getcontrol_rtDatastation30() {
|
||||||
this.equipmentName30List = this.equipmentName30List.map((item, index) => {
|
this.equipmentName30List = this.equipmentName30List.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user