...
|
...
|
@@ -29,13 +29,21 @@ use think\Db; |
|
|
class AdminFaultController extends AdminBaseController{
|
|
|
|
|
|
public function index(){
|
|
|
$param=$this->request->param();
|
|
|
$where=array();
|
|
|
if (!empty($param['fault_type'])){
|
|
|
$where['fault_type']=$param['fault_type'];
|
|
|
}
|
|
|
$data=Db::name('fault')
|
|
|
->alias('a')
|
|
|
->field('a.*,b.serial_number,b.hospital')
|
|
|
->join('equipment b','a.eq_name=b.name')
|
|
|
->where($where)
|
|
|
->order('a.create_time','desc')
|
|
|
->paginate(10);
|
|
|
|
|
|
$this->assign('data',$data);
|
|
|
$this->assign('fault_type', isset($param['fault_type']) ? $param['fault_type'] : '');
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
...
|
...
|
|