添加返回转流服务地址接口
parent
568cd60e3b
commit
334e569328
|
|
@ -33,7 +33,7 @@ class WarningNoticeController extends AdminController
|
|||
TableColumn::make()->name('lv')->type('mapping')->map(WarningNotice::lvMap())->label('报警等级')->className('text-primary'),
|
||||
TableColumn::make()->name('content')->label('报警内容'),
|
||||
|
||||
// TableColumn::make()->name('status')->label('状态'),//可以忽略
|
||||
TableColumn::make()->name('status')->label('状态')->type('mapping')->map(WarningNotice::stateMapLabel())->className('text-primary'),
|
||||
TableColumn::make()->name('created_at')->label('报警时间')->type('datetime')->sortable(true),
|
||||
]);
|
||||
|
||||
|
|
@ -52,4 +52,10 @@ class WarningNoticeController extends AdminController
|
|||
|
||||
]);
|
||||
}
|
||||
|
||||
//标记已处理警报内容;
|
||||
public function updateNotice()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -27,4 +27,10 @@ class SettingController extends Controller
|
|||
}
|
||||
return $this->json($data);
|
||||
}
|
||||
|
||||
public function rtspToFlvHost(){
|
||||
$rtspUrl = settings()->get('rtsp_url') ?? '';
|
||||
|
||||
return $this->json(['host_url'=>$rtspUrl]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,24 @@ class WarningNotice extends Model
|
|||
];
|
||||
}
|
||||
|
||||
public static function stateMap(){
|
||||
return [
|
||||
'0'=>'未处理',
|
||||
'1'=>'已处理',
|
||||
'2'=>'已忽略'
|
||||
];
|
||||
}
|
||||
|
||||
public static function stateMapLabel()
|
||||
{
|
||||
return [
|
||||
'0' => "<span class='label label-danger'>未处理</span>",
|
||||
'1'=> "<span class='label label-info'>已处理</span>",
|
||||
'2' => "<span class='label label-warning'>已忽略</span>",
|
||||
'*'=>'其他:${status}'
|
||||
];
|
||||
}
|
||||
|
||||
public function loggable(){
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ Route::group(['middleware' => 'auth:sanctum'], function () {
|
|||
Route::get('monitor-modes', [MonitorModeController::class, 'getMonitorMode'])->name('monitor_modes.list');
|
||||
Route::get('monitor-modes/device-data', [MonitorModeController::class, 'getMonitorDeviceData'])->name('monitor_modes.device_data');
|
||||
Route::get('static/base-data', [SettingController::class, 'staticBaseData'])->name('static.base_data');
|
||||
Route::get('static/rtsp-to-flv-host', [SettingController::class, 'rtspToFlvHost'])->name('static.rtsp_to_flv_host');
|
||||
|
||||
|
||||
Route::get('warning-notices/nums', [WarningNoticeController::class, 'warningLogNum']);
|
||||
Route::get('warning-notices/logs', [WarningNoticeController::class, 'warningLog']);
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ Route::prefix('callback')->group(function () {
|
|||
Route::post('linkos', \App\Http\Controllers\Callback\LinkosCallbackController::class);
|
||||
});
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
Route::redirect('/', '/admin', 302);
|
||||
|
||||
$router->get('regions-position/{id}', [\App\Admin\Controllers\RegionController::class, 'setRegionPosition']);
|
||||
$router->post('regions-position/save', [\App\Admin\Controllers\RegionController::class, 'saveRegionPosition']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue