...
|
...
|
@@ -204,7 +204,7 @@ class Study extends Backend |
|
|
->paginate($limit);
|
|
|
|
|
|
foreach ($list as $row) {
|
|
|
$row->visible(['id','avatar','name','gender','birthday','grade','school','sno','team_id','team_rank','earn_score','phone','unique','barcode']);
|
|
|
$row->visible(['id','avatar','name','gender','birthday','grade','school','team_id','team_rank','earn_score','phone','unique','barcode']);
|
|
|
$row->visible(['team']);
|
|
|
$row->getRelation('team')->visible(['title']);
|
|
|
}
|
...
|
...
|
@@ -250,8 +250,7 @@ class Study extends Backend |
|
|
->setCellValue('D1', '班级')
|
|
|
->setCellValue('E1', '学校')
|
|
|
->setCellValue('F1', '手环ID')
|
|
|
->setCellValue('G1', '学号')
|
|
|
->setCellValue('H1', '总积分');
|
|
|
->setCellValue('G1', '总积分');
|
|
|
if ($ids == 'all' || empty($ids)) { //判断当前数据为全部或者选中的
|
|
|
$list = $this->model->with('school,grade')->select();
|
|
|
} else {
|
...
|
...
|
@@ -266,11 +265,10 @@ class Study extends Backend |
|
|
->setCellValue('A' . $k, $val['id'])
|
|
|
->setCellValue('B' . $k, $val['name'])
|
|
|
->setCellValue('C' . $k, $val['gender'] ? '男' : '女')
|
|
|
->setCellValue('D' . $k, $val['grade']['name'])
|
|
|
->setCellValue('E' . $k, $val['school']['title'])
|
|
|
->setCellValue('D' . $k, $val['grade'])
|
|
|
->setCellValue('E' . $k, $val['school'])
|
|
|
->setCellValue('F' . $k, $val['unique'])
|
|
|
->setCellValue('G' . $k, $val['sno'])
|
|
|
->setCellValue('H' . $k, $val['earn_score']);
|
|
|
->setCellValue('G' . $k, $val['earn_score']);
|
|
|
}
|
|
|
$excel->createSheet();
|
|
|
$title = "学生成绩" . date("YmdHis");
|
...
|
...
|
|