作者 开飞机的舒克

后台优化

... ... @@ -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')
->field('l.study_id,sum(l.score) as sum_score,s.name,s.sno,s.team_id,s.school_id,s.grade_id')
->group('l.study_id')
->order('sum_score', 'desc')
->select();
... ... @@ -93,6 +93,8 @@ class Item extends Backend
'name' => $v['name'],
'sno' => $v['sno'],
'title' => db('team')->where('id',$v['team_id'])->value('title'),
'school' => db('school')->where('id',$v['school_id'])->value('title'),
'grade' => db('grade')->where('id',$v['grade_id'])->value('name'),
'score' => $v['sum_score']
];
}
... ...
... ... @@ -2,6 +2,8 @@
<thead>
<tr>
<th>{:__('姓名')}</th>
<th>{:__('班级')}</th>
<th>{:__('学校')}</th>
<th>{:__('学号')}</th>
<th>{:__('所属战队')}</th>
<th>{:__('积分')}</th>
... ... @@ -11,6 +13,8 @@
{volist name="row" id="vo"}
<tr>
<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.title}</td>
<td style="word-break: break-all;">{$vo.score}</td>
... ...