Compare commits
No commits in common. "b903c4a0531037762cd733bca43772c5d3265965" and "334e569328f10fdb4f06195b6b6f3a3e46e0fab2" have entirely different histories.
b903c4a053
...
334e569328
|
|
@ -37,7 +37,7 @@ class KeywordController extends AdminController
|
||||||
TableColumn::make()->name('key')->label('KEY'),
|
TableColumn::make()->name('key')->label('KEY'),
|
||||||
TableColumn::make()->name('value')->label('值'),
|
TableColumn::make()->name('value')->label('值'),
|
||||||
TableColumn::make()->name('created_at')->label('创建时间')->type('datetime')->sortable(true),
|
TableColumn::make()->name('created_at')->label('创建时间')->type('datetime')->sortable(true),
|
||||||
// $this->rowActionsOnlyEditAndDelete(true),
|
$this->rowActionsOnlyEditAndDelete(true),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this->baseList($crud);
|
return $this->baseList($crud);
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,6 @@ class WarningNoticeController extends AdminController
|
||||||
|
|
||||||
TableColumn::make()->name('status')->label('状态')->type('mapping')->map(WarningNotice::stateMapLabel())->className('text-primary'),
|
TableColumn::make()->name('status')->label('状态')->type('mapping')->map(WarningNotice::stateMapLabel())->className('text-primary'),
|
||||||
TableColumn::make()->name('created_at')->label('报警时间')->type('datetime')->sortable(true),
|
TableColumn::make()->name('created_at')->label('报警时间')->type('datetime')->sortable(true),
|
||||||
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
|
||||||
$this->updateState()->visibleOn('${status == 0}'),
|
|
||||||
]),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this->baseList($crud);
|
return $this->baseList($crud);
|
||||||
|
|
@ -56,21 +53,9 @@ class WarningNoticeController extends AdminController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function updateState(){
|
|
||||||
return amisMake()->AjaxAction()
|
|
||||||
->label('标记处理')
|
|
||||||
->level('link')
|
|
||||||
->confirmText('是否确认标记处理')
|
|
||||||
->api('put:'.admin_url('warning-notice-mark').'/${id}');
|
|
||||||
}
|
|
||||||
|
|
||||||
//标记已处理警报内容;
|
//标记已处理警报内容;
|
||||||
public function updateNotice($id)
|
public function updateNotice()
|
||||||
{
|
{
|
||||||
$rows = WarningNotice::where('id', $id)->update([
|
|
||||||
'status'=> 1
|
|
||||||
]);
|
|
||||||
|
|
||||||
return $this->autoResponse($rows, '保存成功');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,6 @@ Route::group([
|
||||||
$router->get('warning-setting', '\App\Admin\Controllers\WarningSettingController@settingIndex');
|
$router->get('warning-setting', '\App\Admin\Controllers\WarningSettingController@settingIndex');
|
||||||
$router->post('warning-setting-save', '\App\Admin\Controllers\WarningSettingController@saveSettingConfig');
|
$router->post('warning-setting-save', '\App\Admin\Controllers\WarningSettingController@saveSettingConfig');
|
||||||
$router->get('warning-notice', '\App\Admin\Controllers\WarningNoticeController@index');
|
$router->get('warning-notice', '\App\Admin\Controllers\WarningNoticeController@index');
|
||||||
$router->put('warning-notice-mark/{id}', '\App\Admin\Controllers\WarningNoticeController@updateNotice');
|
|
||||||
|
|
||||||
//监测点位
|
//监测点位
|
||||||
$router->resource('monitor-modes', \App\Admin\Controllers\MonitorModeController::class);
|
$router->resource('monitor-modes', \App\Admin\Controllers\MonitorModeController::class);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ 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'=> '1350,900',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue