pull/12/head
孙萌 2023-10-12 18:31:12 +08:00
parent 9a79e8028a
commit e9c742f571
2 changed files with 51 additions and 6 deletions

View File

@ -13,17 +13,20 @@ export function realTimeLine(id,data) {
var data7=[]//1#水肥EC var data7=[]//1#水肥EC
var data8=[]//2#水肥EC var data8=[]//2#水肥EC
var data9=[]//1#空气温度 var data9=[]//1#空气温度
var data10=[]//1#管道压力
data.forEach((el,index)=>{ data.forEach((el,index)=>{
Xdata.push(el.time) Xdata.push(el.time)
data1.push(el.value['目标水肥PH']) data1.push(el.value['目标水肥PH'])
data2.push(el.value['目标水肥EC']) data2.push(el.value['目标水肥EC'])
data3.push(el.value['平均值水肥PH']) data3.push(el.value['1#平均水肥EC'])
data4.push(el.value['平均值水肥EC']) data4.push(el.value['1#平均水肥PH'])
data5.push(el.value['1#水肥PH']) data5.push(el.value['1#水肥PH'])
data6.push(el.value['2#水肥PH']) data6.push(el.value['2#水肥PH'])
data7.push(el.value['1#水肥EC']) data7.push(el.value['1#水肥EC'])
data8.push(el.value['2#水肥EC']) data8.push(el.value['2#水肥EC'])
data9.push(el.value['1#空气温度']) data9.push(el.value['1#空气温度'])
data10.push(el.value['1#管道压力'])
}) })
console.log(data1,data2); console.log(data1,data2);
var list = [ var list = [
@ -404,6 +407,48 @@ export function realTimeLine(id,data) {
borderWidth: 1, borderWidth: 1,
}, },
}, },
},
{
name: '1#管道压力',
data: data9,
type: "line",
symbol: "circle",
smooth: true,
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 2,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(255, 156, 154, 0.50)",
},
{
offset: 0.8,
color: "rgba(255, 156, 154, 0)",
},
],
false
),
},
},
itemStyle: {
normal: {
color: "rgba(255, 156, 154, 1)",
borderColor: "rgba(255, 156, 154, 1)",
borderWidth: 1,
},
},
}] }]
var option = { var option = {
tooltip: { tooltip: {

View File

@ -180,15 +180,15 @@ export default {
// } // }
if(el.equipmentNumber==0){ if(el.equipmentNumber==0){
if(el.targetValue==1){ if(el.targetValue==1){
name=el.environmentDataId+'(目标值)' name='目标'+el.environmentDataId
}else{ }else{
name=el.environmentDataId+'(1号平均值)' name='1#平均'+el.environmentDataId
} }
}else if(el.equipmentNumber==15){ }else if(el.equipmentNumber==15){
if(el.targetValue==1){ if(el.targetValue==1){
name=el.environmentDataId+'(目标值)' name='目标'+el.environmentDataId
}else{ }else{
name=el.environmentDataId+'(2号平均值)' name='2#平均'+el.environmentDataId
} }
}else{ }else{
name=el.equipmentNumber+'#'+el.environmentDataId name=el.equipmentNumber+'#'+el.environmentDataId