|
@@ -46,11 +46,18 @@ class ControlAlarm extends Model
|
|
|
->paginate();
|
|
|
return $res;
|
|
|
}
|
|
|
- // //根据姓名搜索
|
|
|
- // public function searchNameAttr($query, $value, $data)
|
|
|
- // {
|
|
|
- // return $query->where('name', 'like', '%' . $value . '%');
|
|
|
- // }
|
|
|
+ public function searchPlateNoAttr($query, $value, $data)
|
|
|
+ {
|
|
|
+ return $query->where('plate_no', 'like', '%' . $value . '%');
|
|
|
+ }
|
|
|
+ public function searchRfidSnAttr($query, $value, $data)
|
|
|
+ {
|
|
|
+ return $query->where('rfid_sn', 'like', '%' . $value . '%');
|
|
|
+ }
|
|
|
+ public function searchAlarmTypeAttr($query, $value, $data)
|
|
|
+ {
|
|
|
+ return $query->where('alarm_type', $value);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
public function getStateTextAttr($value){
|