update
This commit is contained in:
parent
ea642ce971
commit
20f2a74c20
|
@ -297,11 +297,11 @@
|
||||||
return $this->fail('暂无数据');
|
return $this->fail('暂无数据');
|
||||||
}
|
}
|
||||||
$result = [
|
$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_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'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['k_content' => '土壤钾含量','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);
|
return $this->success('请求成功',$result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,11 +98,11 @@
|
||||||
return $this->fail('暂无数据');
|
return $this->fail('暂无数据');
|
||||||
}
|
}
|
||||||
$result = [
|
$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_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'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['k_content' => '土壤钾含量','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'k_content')]],'max'=>max(array_column($data,'k_content'))],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -115,12 +115,12 @@
|
||||||
return $this->fail('暂无数据');
|
return $this->fail('暂无数据');
|
||||||
}
|
}
|
||||||
$result = [
|
$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_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'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['dqy' => '大气压强','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'dqy')]],'max'=>max(array_column($data,'dqy'))],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -133,11 +133,11 @@
|
||||||
return $this->fail('暂无数据');
|
return $this->fail('暂无数据');
|
||||||
}
|
}
|
||||||
$result = [
|
$result = [
|
||||||
['water_temp' => '水温','categories' => array_column($data,'create_time'),'series'=>['name'=>'目标值','data'=>array_column($data,'water_temp')],'max'=>max(array_column($data,'water_temp'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['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'))],
|
['tds' => 'TDS','categories' => array_column($data,'create_time'),'series'=>[['name'=>'目标值','data'=>array_column($data,'tds')]],'max'=>max(array_column($data,'tds'))],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue