1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
vine_liutk 31a296f98a 调整报警内容 2023-09-07 12:29:08 +08:00
vine_liutk 4f5ce5642d 调整后台图片 2023-09-07 12:27:07 +08:00
4 changed files with 19 additions and 18 deletions

View File

@ -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')),
];
}

View File

@ -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);

View File

@ -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}}">

View File

@ -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}}">