作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

order

@@ -11,6 +11,8 @@ namespace app\portal\controller; @@ -11,6 +11,8 @@ namespace app\portal\controller;
11 11
12 use app\portal\model\EquipmentModel; 12 use app\portal\model\EquipmentModel;
13 use cmf\controller\AdminBaseController; 13 use cmf\controller\AdminBaseController;
  14 +use think\Db;
  15 +
14 /** 16 /**
15 * Class AdminFaultController 17 * Class AdminFaultController
16 * @package app\portal\controller 18 * @package app\portal\controller
@@ -27,8 +29,7 @@ use cmf\controller\AdminBaseController; @@ -27,8 +29,7 @@ use cmf\controller\AdminBaseController;
27 class AdminFaultController extends AdminBaseController{ 29 class AdminFaultController extends AdminBaseController{
28 30
29 public function index(){ 31 public function index(){
30 - $Equipment=new EquipmentModel();  
31 - $data=$Equipment->paginate(10); 32 + $data=Db::name('fault')->order('create_time','desc')->paginate(10);
32 $this->assign('data',$data); 33 $this->assign('data',$data);
33 return $this->fetch(); 34 return $this->fetch();
34 } 35 }
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 </label> 40 </label>
41 </th> 41 </th>
42 <th width="50">ID</th> 42 <th width="50">ID</th>
43 - <th>设备MAC地址</th> 43 + <th>设备名称</th>
44 <th>设备锁编号</th> 44 <th>设备锁编号</th>
45 <th>所在医院</th> 45 <th>所在医院</th>
46 <th>故障类型</th> 46 <th>故障类型</th>