pull/40/head^2
pangdundun 2023-11-17 09:30:15 +08:00
parent 47e0ba9c90
commit 01ba76bf30
2 changed files with 377 additions and 13 deletions

View File

@ -256,7 +256,7 @@ export default {
menu_current: false,
content_item_current: -1,
current: 0,
current: 5,
dataList: [
// "", "", "", "", "", ""
@ -701,17 +701,17 @@ export default {
// id
dataInit(userid) {
this.api.Bigdata_getAllControl(userid).then(res => {
console.log('根据用户id查询对应的设备大数据信息', res);
// console.log('id', res);
this.dataList = res.data.data
if (res.status === 200) {
res.data.data.forEach(el => {
this.get_weather_echart_data(el.deviceId)
this.get_thisWeekTemperature_echart_data(el.deviceId)
this.get_environmentData(el.deviceId)
this.get_readControl_getState(el.deviceId)
});
this.get_readControl_getState(2023042214250018)
// this.get_readControl_getState(2023042214250018)
this.getWeatherData(2023042214250027)
}
})
@ -964,7 +964,7 @@ export default {
getCurrent(index,item) {
this.current = index;
console.log(item,'00000000000000');
// console.log(item,'00000000000000');
this.get_readControl_getState(item.deviceId)
},

View File

@ -111,7 +111,7 @@
<img :src="require('../../assets/image/real-time-'+item1.formula+'.png')" alt="">
<div>
<span>{{ item1.environmentDataId }}</span>
<span>{{ item1.environmentData }}</span>
<span>{{ item1.environmentData + getTypeList(item1.formula) }}</span>
</div>
</div>
</div>
@ -185,7 +185,362 @@ export default {
left_: 2,
popContentList: [],
popContentCurrent: 5
popContentCurrent: 5,
typeList: [{
label: '无意义的传感器',
value: 0,
countType: 0
},
{
label: '空气温度',
value: 1,
countType: 3,
unit: '℃'
},
{
label: '空气湿度',
value: 2,
countType: 2,
unit: '%'
},
{
label: '光亮度',
value: 3,
countType: 2,
unit: 'Klux'
},
{
label: '二氧化碳',
value: 4,
countType: 0,
unit: 'ppm'
},
{
label: '土壤温度',
value: 5,
countType: 3,
unit: '℃'
},
{
label: '土壤湿度',
value: 6,
countType: 2,
unit: '%'
},
{
label: '水温',
value: 7,
countType: 3,
unit: '℃'
},
{
label: '水肥PH',
value: 8,
countType: 2,
unit: ''
},
{
label: '水肥EC',
value: 9,
countType: 2,
unit: 'mS/cm'
},
{
label: '压差',
value: 10,
countType: 0,
unit: 'Pa'
},
{
label: '风速',
value: 11,
countType: 2,
unit: 'm/s'
},
{
label: '风向',
value: 12,
countType: 0,
unit: '°'
},
{
label: '雨雪信号',
value: 13,
countType: 0,
unit: ''
},
{
label: '降雨量',
value: 14,
countType: 2,
unit: 'mm'
},
{
label: '光合有效辐射',
value: 15,
countType: 2,
unit: 'umol/m2.s'
},
{
label: '太阳总辐射',
value: 16,
countType: 0,
unit: 'W/m2'
},
{
label: '流量',
value: 17,
countType: 0,
unit: 'L/H'
},
{
label: '大气压强',
value: 18,
countType: 2,
unit: 'KPa'
},
{
label: '土壤PH',
value: 19,
countType: 2,
unit: ''
},
{
label: '土壤EC',
value: 20,
countType: 0,
unit: 'uS/cm'
},
{
label: '叶面温度',
value: 21,
countType: 3,
unit: '℃'
},
{
label: '叶面湿度',
value: 22,
countType: 2,
unit: '%'
},
{
label: '果实直径',
value: 23,
countType: 0,
unit: 'mm'
},
{
label: '茎秆直径',
value: 24,
countType: 0,
unit: 'mm'
},
{
label: '流速',
value: 25,
countType: 2,
unit: 'm/s'
},
{
label: '瞬时流量',
value: 26,
countType: 2,
unit: 'm3'
},
{
label: '当日流量',
value: 27,
countType: 2,
unit: 'T'
},
{
label: '累计流量',
value: 28,
countType: 0,
unit: 'T'
},
{
label: '无线气象站电池电压',
value: 29,
countType: 2,
unit: 'V'
},
{
label: '无线气象站无线信号强度',
value: 30,
countType: 1,
unit: 'dBm'
},
{
label: '无线气象站信噪比SNR',
value: 31,
countType: 1,
unit: 'dB'
},
{
label: 'PM1.0',
value: 32,
countType: 0,
unit: 'μg/m2'
},
{
label: 'PM2.5',
value: 33,
countType: 0,
unit: 'μg/m2'
},
{
label: 'PM10',
value: 34,
countType: 0,
unit: 'μg/m2'
},
{
label: '紫外辐射',
value: 35,
countType: 0,
unit: 'W/m2'
},
{
label: '蒸发量',
value: 36,
countType: 2,
unit: 'mm'
},
{
label: '负氧离子',
value: 37,
countType: 0,
unit: '个/cm3'
},
{
label: '露点温度',
value: 38,
countType: 3,
unit: '℃'
},
{
label: '设备电压',
value: 39,
countType: 2,
unit: 'V'
},
{
label: '设备电流',
value: 40,
countType: 2,
unit: 'A'
},
{
label: '土壤氮含量',
value: 41,
countType: 0,
unit: 'mg/kg'
},
{
label: '土壤磷含量',
value: 42,
countType: 0,
unit: 'mg/kg'
},
{
label: '土壤钾含量',
value: 43,
countType: 0,
unit: 'mg/kg'
},
{
label: '管道压力',
value: 44,
countType: 0,
unit: 'Kpa'
},
{
label: '一氧化碳',
value: 45,
countType: 0,
unit: 'ppm'
},
{
label: '氨气',
value: 46,
countType: 0,
unit: 'ppm'
},
{
label: '硫化氢',
value: 47,
countType: 0,
unit: 'ppm'
},
{
label: '氧气',
value: 48,
countType: 2,
unit: '%vol'
},
{
label: '甲烷',
value: 49,
countType: 2,
unit: '%vol'
},
{
label: '铜CU',
value: 50,
countType: 0,
unit: 'mg/kg'
},
{
label: '镉CD',
value: 51,
countType: 2,
unit: 'mg/kg'
},
{
label: '铅PB',
value: 52,
countType: 0,
unit: 'mg/kg'
},
{
label: '噪声',
value: 53,
countType: 0,
unit: 'dB'
},
{
label: '叶面面积',
value: 54,
countType: 0,
unit: 'mm'
},
{
label: '虫数量',
value: 55,
countType: 0,
unit: '个'
},
{
label: '无线传感器电池电压',
value: 56,
countType: 2,
unit: 'V'
},
{
label: '无线传感器无线信号强度',
value: 57,
countType: 1,
unit: 'dBm'
},
{
label: '无线传感器信噪比SNR',
value: 58,
countType: 1,
unit: 'dB'
},
],
}
},
mounted() {
@ -248,30 +603,39 @@ export default {
if (name == '二号') {
// this.top_ = 1;
// this.left_ = 6.2
return 'top:1rem;left:6.2rem'
return 'top:1rem;left:8rem'
} else if (name == '一号') {
// this.top_ = 3.5;
// this.left_ = 3.8
return 'top:3.5rem;left:3.8rem'
return 'top:3.5rem;left:4.8rem'
} else if (name == '3号') {
// this.top_ = 2;
// this.left_ = 9
return 'top:2rem;left:9rem'
return 'top:2rem;left:11.5rem'
} else if (name == '4号') {
// this.top_ = 2;
// this.left_ = 9.3
return 'top:2rem;left:9.3rem'
return 'top:2rem;left:14rem'
} else if (name == '5') {
// this.top_ = 3.5;
// this.left_ = 6.5
return 'top:3.5rem;left:6.5rem'
return 'top:6.5rem;left:10.5rem'
} else if (name == '6') {
// this.top_ = 0.8;
// this.left_ = 7.2
return 'top:0.8rem;left:7.2rem'
return 'top:0.8rem;left:11rem'
}
},
//
getTypeList(val) {
let typeList1 = []
typeList1 = this.typeList.filter(item => {
return item.value == val
})
return typeList1[0].unit
},
// useridtoken
login() {
// var data = {