Compare commits
2 Commits
de504d7e1f
...
31a296f98a
| Author | SHA1 | Date |
|---|---|---|
|
|
31a296f98a | |
|
|
4f5ce5642d |
|
|
@ -29,7 +29,7 @@ class RegionResource extends JsonResource
|
|||
'current_plant' => RegionPlantResource::make($this->whenLoaded('currentPlant')),
|
||||
'position_x'=> $this->position_x,
|
||||
'position_y'=> $this->position_y,
|
||||
'canvasbox'=> '1350,900',
|
||||
'canvasbox'=> '900,705',
|
||||
'monitor_modes' => MonitorModeResource::collection($this->whenLoaded('monitorModes')),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,17 +147,18 @@ class DeviceWarningService
|
|||
$msg = $fieldNameMap[$column].'达到'.($log->$column ?? 0).$fieldUnitMap[$column].'值';
|
||||
}
|
||||
}
|
||||
|
||||
$notices[] = [
|
||||
'device_id' => $device->id,
|
||||
'lv' => $lv,
|
||||
'content' => '【'.$device->name.'】【'.WarningNotice::lvMap()[$lv].'】'.$msg,
|
||||
'reported_at' => $reportedAt,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
'loggable_type' => $log::class,
|
||||
'loggable_id' => $log->id,
|
||||
];
|
||||
if($msg){
|
||||
$notices[] = [
|
||||
'device_id' => $device->id,
|
||||
'lv' => $lv,
|
||||
'content' => '【'.$device->name.'】【'.WarningNotice::lvMap()[$lv].'】'.$msg,
|
||||
'reported_at' => $reportedAt,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
'loggable_type' => $log::class,
|
||||
'loggable_id' => $log->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
count($notices) > 0 && WarningNotice::insert($notices);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
} */
|
||||
canvas {
|
||||
cursor: crosshair;
|
||||
width:1350px;
|
||||
height: 900px;
|
||||
width:900px;
|
||||
height: 705px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<body>
|
||||
<canvas id="myCanvas"></canvas>
|
||||
<div style="position: relative;top:-900px;left: 1360px;width: 100px;">
|
||||
<div style="position: relative;top:-705px;left: 910px;width: 100px;">
|
||||
<form id='positionForm' action="{{url('monitor-mode-position/save')}}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$id}}">
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
} */
|
||||
canvas {
|
||||
cursor: crosshair;
|
||||
width:1350px;
|
||||
height: 900px;
|
||||
width:900px;
|
||||
height: 705px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<body>
|
||||
<canvas id="myCanvas"></canvas>
|
||||
<div style="position: relative;top:-900px;left: 1360px;width: 100px;">
|
||||
<div style="position: relative;top:-705px;left: 910px;width: 100px;">
|
||||
<form id='positionForm' action="{{url('regions-position/save')}}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$id}}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue