作者 开飞机的舒克

优化后台项目管理

... ... @@ -83,7 +83,7 @@ class Item extends Backend
$res = db('study_score_log l')
->join('study s', 's.id = l.study_id')
->where('item_id', $data['id'])
->field('l.study_id,sum(l.score) as sum_score,s.name,s.sno,s.team_id,s.school,s.grade')
->field('l.study_id,sum(l.score) as sum_score,s.name,s.unique,s.team_id,s.school,s.grade')
->group('l.study_id')
->order('sum_score', 'desc')
->select();
... ... @@ -91,7 +91,7 @@ class Item extends Backend
foreach ($res as $k => $v) {
$list[] = [
'name' => $v['name'],
'sno' => $v['sno'],
'unique' => $v['unique'],
'title' => db('team')->where('id',$v['team_id'])->value('title'),
'school' => $v['school'],
'grade' => $v['grade'],
... ...
... ... @@ -4,7 +4,7 @@
<th>{:__('姓名')}</th>
<th>{:__('班级')}</th>
<th>{:__('学校')}</th>
<th>{:__('学号')}</th>
<th>{:__('手环ID')}</th>
<th>{:__('所属战队')}</th>
<th>{:__('积分')}</th>
</tr>
... ... @@ -15,7 +15,7 @@
<td>{$vo.name}</td>
<td style="word-break: break-all;">{$vo.grade}</td>
<td style="word-break: break-all;">{$vo.school}</td>
<td style="word-break: break-all;">{$vo.sno}</td>
<td style="word-break: break-all;">{$vo.unique}</td>
<td style="word-break: break-all;">{$vo.title}</td>
<td style="word-break: break-all;">{$vo.score}</td>
</tr>
... ...