1
0
Fork 0

Compare commits

..

No commits in common. "31a296f98a4b2beb05ca98117c390352d341c028" and "de504d7e1f9d9725777bb3fc230c9e3340237eed" have entirely different histories.

4 changed files with 18 additions and 19 deletions

View File

@ -29,7 +29,7 @@ class RegionResource extends JsonResource
'current_plant' => RegionPlantResource::make($this->whenLoaded('currentPlant')), 'current_plant' => RegionPlantResource::make($this->whenLoaded('currentPlant')),
'position_x'=> $this->position_x, 'position_x'=> $this->position_x,
'position_y'=> $this->position_y, 'position_y'=> $this->position_y,
'canvasbox'=> '900,705', 'canvasbox'=> '1350,900',
'monitor_modes' => MonitorModeResource::collection($this->whenLoaded('monitorModes')), 'monitor_modes' => MonitorModeResource::collection($this->whenLoaded('monitorModes')),
]; ];
} }

View File

@ -147,18 +147,17 @@ class DeviceWarningService
$msg = $fieldNameMap[$column].'达到'.($log->$column ?? 0).$fieldUnitMap[$column].'值'; $msg = $fieldNameMap[$column].'达到'.($log->$column ?? 0).$fieldUnitMap[$column].'值';
} }
} }
if($msg){
$notices[] = [ $notices[] = [
'device_id' => $device->id, 'device_id' => $device->id,
'lv' => $lv, 'lv' => $lv,
'content' => '【'.$device->name.'】【'.WarningNotice::lvMap()[$lv].'】'.$msg, 'content' => '【'.$device->name.'】【'.WarningNotice::lvMap()[$lv].'】'.$msg,
'reported_at' => $reportedAt, 'reported_at' => $reportedAt,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'loggable_type' => $log::class, 'loggable_type' => $log::class,
'loggable_id' => $log->id, 'loggable_id' => $log->id,
]; ];
}
} }
count($notices) > 0 && WarningNotice::insert($notices); count($notices) > 0 && WarningNotice::insert($notices);

View File

@ -11,8 +11,8 @@
} */ } */
canvas { canvas {
cursor: crosshair; cursor: crosshair;
width:900px; width:1350px;
height: 705px; height: 900px;
} }
</style> </style>
@ -21,7 +21,7 @@
<body> <body>
<canvas id="myCanvas"></canvas> <canvas id="myCanvas"></canvas>
<div style="position: relative;top:-705px;left: 910px;width: 100px;"> <div style="position: relative;top:-900px;left: 1360px;width: 100px;">
<form id='positionForm' action="{{url('monitor-mode-position/save')}}" method="post" enctype="multipart/form-data"> <form id='positionForm' action="{{url('monitor-mode-position/save')}}" method="post" enctype="multipart/form-data">
@csrf @csrf
<input type="hidden" name="id" value="{{$id}}"> <input type="hidden" name="id" value="{{$id}}">

View File

@ -11,8 +11,8 @@
} */ } */
canvas { canvas {
cursor: crosshair; cursor: crosshair;
width:900px; width:1350px;
height: 705px; height: 900px;
} }
</style> </style>
@ -21,7 +21,7 @@
<body> <body>
<canvas id="myCanvas"></canvas> <canvas id="myCanvas"></canvas>
<div style="position: relative;top:-705px;left: 910px;width: 100px;"> <div style="position: relative;top:-900px;left: 1360px;width: 100px;">
<form id='positionForm' action="{{url('regions-position/save')}}" method="post" enctype="multipart/form-data"> <form id='positionForm' action="{{url('regions-position/save')}}" method="post" enctype="multipart/form-data">
@csrf @csrf
<input type="hidden" name="id" value="{{$id}}"> <input type="hidden" name="id" value="{{$id}}">