update
This commit is contained in:
parent
20f2a74c20
commit
e0f5d143d5
|
@ -297,11 +297,11 @@
|
|||
return $this->fail('暂无数据');
|
||||
}
|
||||
$result = [
|
||||
['soil_temp' => '土地温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'soil_temp')]],'max'=>max(array_column($data,'soil_temp'))],
|
||||
['soil_mois' => '土地湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'soil_mois')]],'max'=>max(array_column($data,'soil_mois'))],
|
||||
['p_content' => '土壤磷含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'p_content')]],'max'=>max(array_column($data,'p_content'))],
|
||||
['n_content' => '土壤氮含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'n_content')]],'max'=>max(array_column($data,'n_content'))],
|
||||
['k_content' => '土壤钾含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'k_content')]],'max'=>max(array_column($data,'k_content'))],
|
||||
['title' => '土地温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土地温度','data'=>array_column($data,'soil_temp')]],'max'=>max(array_column($data,'soil_temp'))],
|
||||
['title' => '土地湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土地湿度','data'=>array_column($data,'soil_mois')]],'max'=>max(array_column($data,'soil_mois'))],
|
||||
['title' => '土壤磷含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤磷含量','data'=>array_column($data,'p_content')]],'max'=>max(array_column($data,'p_content'))],
|
||||
['title' => '土壤氮含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤氮含量','data'=>array_column($data,'n_content')]],'max'=>max(array_column($data,'n_content'))],
|
||||
['title' => '土壤钾含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤钾含量','data'=>array_column($data,'k_content')]],'max'=>max(array_column($data,'k_content'))],
|
||||
];
|
||||
return $this->success('请求成功',$result);
|
||||
}
|
||||
|
|
|
@ -98,11 +98,11 @@
|
|||
return $this->fail('暂无数据');
|
||||
}
|
||||
$result = [
|
||||
['soil_temp' => '土地温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'soil_temp')]],'max'=>max(array_column($data,'soil_temp'))],
|
||||
['soil_mois' => '土地湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'soil_mois')]],'max'=>max(array_column($data,'soil_mois'))],
|
||||
['p_content' => '土壤磷含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'p_content')]],'max'=>max(array_column($data,'p_content'))],
|
||||
['n_content' => '土壤氮含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'n_content')]],'max'=>max(array_column($data,'n_content'))],
|
||||
['k_content' => '土壤钾含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'k_content')]],'max'=>max(array_column($data,'k_content'))],
|
||||
['title' => '土地温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土地温度','data'=>array_column($data,'soil_temp')]],'max'=>max(array_column($data,'soil_temp'))],
|
||||
['title' => '土地湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土地湿度','data'=>array_column($data,'soil_mois')]],'max'=>max(array_column($data,'soil_mois'))],
|
||||
['title' => '土壤磷含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤磷含量','data'=>array_column($data,'p_content')]],'max'=>max(array_column($data,'p_content'))],
|
||||
['title' => '土壤氮含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤氮含量','data'=>array_column($data,'n_content')]],'max'=>max(array_column($data,'n_content'))],
|
||||
['title' => '土壤钾含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'土壤钾含量','data'=>array_column($data,'k_content')]],'max'=>max(array_column($data,'k_content'))],
|
||||
];
|
||||
break;
|
||||
case 2:
|
||||
|
@ -115,12 +115,12 @@
|
|||
return $this->fail('暂无数据');
|
||||
}
|
||||
$result = [
|
||||
['hj_temp' => '环境温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'hj_temp')]],'max'=>max(array_column($data,'hj_temp'))],
|
||||
['hj_humi' => '环境湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'hj_humi')]],'max'=>max(array_column($data,'hj_humi'))],
|
||||
['o_content' => '氧气浓度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'o_content')]],'max'=>max(array_column($data,'o_content'))],
|
||||
['c_content' => '二氧化碳浓度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'c_content')]],'max'=>max(array_column($data,'c_content'))],
|
||||
['light' => '光照强调','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'light')]],'max'=>max(array_column($data,'light'))],
|
||||
['dqy' => '大气压强','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'dqy')]],'max'=>max(array_column($data,'dqy'))],
|
||||
['title' => '环境温度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'环境温度','data'=>array_column($data,'hj_temp')]],'max'=>max(array_column($data,'hj_temp'))],
|
||||
['title' => '环境湿度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'环境湿度','data'=>array_column($data,'hj_humi')]],'max'=>max(array_column($data,'hj_humi'))],
|
||||
['title' => '氧气浓度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'氧气浓度','data'=>array_column($data,'o_content')]],'max'=>max(array_column($data,'o_content'))],
|
||||
['title' => '二氧化碳浓度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'二氧化碳浓度','data'=>array_column($data,'c_content')]],'max'=>max(array_column($data,'c_content'))],
|
||||
['title' => '光照强调','categories' => array_column($data,'create_time'),'series'=>[['name'=>'光照强调','data'=>array_column($data,'light')]],'max'=>max(array_column($data,'light'))],
|
||||
['title' => '大气压强','categories' => array_column($data,'create_time'),'series'=>[['name'=>'大气压强','data'=>array_column($data,'dqy')]],'max'=>max(array_column($data,'dqy'))],
|
||||
];
|
||||
break;
|
||||
case 3:
|
||||
|
@ -133,11 +133,11 @@
|
|||
return $this->fail('暂无数据');
|
||||
}
|
||||
$result = [
|
||||
['water_temp' => '水温','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'water_temp')]],'max'=>max(array_column($data,'water_temp'))],
|
||||
['ph_content' => '酸碱度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'ph_content')]],'max'=>max(array_column($data,'ph_content'))],
|
||||
['dissolved_oxygen' => '溶解氧','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'dissolved_oxygen')]],'max'=>max(array_column($data,'dissolved_oxygen'))],
|
||||
['electric_conductivity' => '电导率','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'electric_conductivity')]],'max'=>max(array_column($data,'electric_conductivity'))],
|
||||
['tds' => 'TDS','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'tds')]],'max'=>max(array_column($data,'tds'))],
|
||||
['title' => '水温','categories' => array_column($data,'create_time'),'series'=>[['name'=>'水温','data'=>array_column($data,'water_temp')]],'max'=>max(array_column($data,'water_temp'))],
|
||||
['title' => '酸碱度','categories' => array_column($data,'create_time'),'series'=>[['name'=>'酸碱度','data'=>array_column($data,'ph_content')]],'max'=>max(array_column($data,'ph_content'))],
|
||||
['title' => '溶解氧','categories' => array_column($data,'create_time'),'series'=>[['name'=>'溶解氧','data'=>array_column($data,'dissolved_oxygen')]],'max'=>max(array_column($data,'dissolved_oxygen'))],
|
||||
['title' => '电导率','categories' => array_column($data,'create_time'),'series'=>[['name'=>'电导率','data'=>array_column($data,'electric_conductivity')]],'max'=>max(array_column($data,'electric_conductivity'))],
|
||||
['title' => 'TDS','categories' => array_column($data,'create_time'),'series'=>[['name'=>'TDS','data'=>array_column($data,'tds')]],'max'=>max(array_column($data,'tds'))],
|
||||
];
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue