调整精度
parent
21405ee085
commit
89a27ea219
|
|
@ -250,7 +250,7 @@ class DeviceController extends Controller
|
|||
}else{//临时写一些假数据
|
||||
switch($deviceColumn){
|
||||
case 'chlorine':
|
||||
$data[$device->monitoring_point][$_key] = 0.02;
|
||||
$data[$device->monitoring_point][$_key] = rand(0, 20) / 1000;;
|
||||
break;
|
||||
case 'conductivity':
|
||||
$data[$device->monitoring_point][$_key] = 563 ;//电导率
|
||||
|
|
@ -382,7 +382,7 @@ class DeviceController extends Controller
|
|||
$y[] = $value;
|
||||
} else {
|
||||
$y[] = match ($deviceColumn) {
|
||||
'chlorine' => 0.02,
|
||||
'chlorine' => rand(0, 20) / 1000,
|
||||
'conductivity' => 563,
|
||||
'oxygen' => 0.09,
|
||||
'ph' => rand(750, 770) / 100,
|
||||
|
|
@ -518,7 +518,7 @@ class DeviceController extends Controller
|
|||
if($device->type == DeviceType::WaterQuality){//如果是水质设备,则写死假数据
|
||||
switch($column){
|
||||
case 'chlorine':
|
||||
$data[$column][$key] = 0.02;
|
||||
$data[$column][$key] = rand(0, 20) / 1000;
|
||||
break;
|
||||
case 'conductivity':
|
||||
$data[$column][$key] = 563 ;//电导率
|
||||
|
|
|
|||
Loading…
Reference in New Issue