...
|
...
|
@@ -3,10 +3,6 @@ |
|
|
namespace app\admin\controller;
|
|
|
|
|
|
use app\common\controller\Backend;
|
|
|
use app\common\controller\Resource;
|
|
|
use think\Db;
|
|
|
use think\exception\PDOException;
|
|
|
use think\exception\ValidateException;
|
|
|
|
|
|
/**
|
|
|
* 学生管理
|
...
|
...
|
@@ -55,15 +51,19 @@ class Study extends Backend |
|
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
|
|
|
$list = $this->model
|
|
|
->with(['school', 'team'])
|
|
|
->where($where)
|
|
|
->order($sort, $order)
|
|
|
->paginate($limit);
|
|
|
->with(['grade','school','team'])
|
|
|
->where($where)
|
|
|
->order($sort, $order)
|
|
|
->paginate($limit);
|
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
|
$row->getRelation('school')->visible(['title']);
|
|
|
$row->getRelation('team')->visible(['title']);
|
|
|
$row->visible(['id','avatar','name','gender','birthday','grade_id','school_id','sno','team_id','team_rank','earn_score','phone','unique','barcode']);
|
|
|
$row->visible(['grade']);
|
|
|
$row->getRelation('grade')->visible(['id','name']);
|
|
|
$row->visible(['school']);
|
|
|
$row->getRelation('school')->visible(['title']);
|
|
|
$row->visible(['team']);
|
|
|
$row->getRelation('team')->visible(['title']);
|
|
|
}
|
|
|
|
|
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
...
|
...
|
@@ -73,8 +73,6 @@ class Study extends Backend |
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//导出数据
|
|
|
public function export()
|
|
|
{
|
...
|
...
|
|