|
@@ -25,6 +25,7 @@ class Maintenance extends CatchController
|
|
|
*/
|
|
|
public function index(Request $request) : \think\Response
|
|
|
{
|
|
|
+ $data =$request->post();
|
|
|
return CatchResponse::paginate($this->maintenanceModel->getList());
|
|
|
}
|
|
|
|
|
@@ -87,4 +88,21 @@ class Maintenance extends CatchController
|
|
|
{
|
|
|
return CatchResponse::success($this->maintenanceModel->deleteBy($id,true));
|
|
|
}
|
|
|
+ /**
|
|
|
+ * function
|
|
|
+ * 获取参数类型
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function getMaintenOption(Request $request)
|
|
|
+ {
|
|
|
+ $data= $request->get();
|
|
|
+ $where = [];
|
|
|
+ if($data['type'])
|
|
|
+ {
|
|
|
+ $where[] = ['device_type','=',$data['type']];
|
|
|
+ }
|
|
|
+ $list = $this->maintenanceModel->where($where)->field('value,name')->select();
|
|
|
+ return CatchResponse::success($list);
|
|
|
+
|
|
|
+ }
|
|
|
}
|