作者 开飞机的舒克

后台优化

@@ -83,7 +83,7 @@ class Item extends Backend @@ -83,7 +83,7 @@ class Item extends Backend
83 $res = db('study_score_log l') 83 $res = db('study_score_log l')
84 ->join('study s', 's.id = l.study_id') 84 ->join('study s', 's.id = l.study_id')
85 ->where('item_id', $data['id']) 85 ->where('item_id', $data['id'])
86 - ->field('l.study_id,sum(l.score) as sum_score,s.name,s.sno,s.team_id') 86 + ->field('l.study_id,sum(l.score) as sum_score,s.name,s.sno,s.team_id,s.school_id,s.grade_id')
87 ->group('l.study_id') 87 ->group('l.study_id')
88 ->order('sum_score', 'desc') 88 ->order('sum_score', 'desc')
89 ->select(); 89 ->select();
@@ -93,6 +93,8 @@ class Item extends Backend @@ -93,6 +93,8 @@ class Item extends Backend
93 'name' => $v['name'], 93 'name' => $v['name'],
94 'sno' => $v['sno'], 94 'sno' => $v['sno'],
95 'title' => db('team')->where('id',$v['team_id'])->value('title'), 95 'title' => db('team')->where('id',$v['team_id'])->value('title'),
  96 + 'school' => db('school')->where('id',$v['school_id'])->value('title'),
  97 + 'grade' => db('grade')->where('id',$v['grade_id'])->value('name'),
96 'score' => $v['sum_score'] 98 'score' => $v['sum_score']
97 ]; 99 ];
98 } 100 }
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 <thead> 2 <thead>
3 <tr> 3 <tr>
4 <th>{:__('姓名')}</th> 4 <th>{:__('姓名')}</th>
  5 + <th>{:__('班级')}</th>
  6 + <th>{:__('学校')}</th>
5 <th>{:__('学号')}</th> 7 <th>{:__('学号')}</th>
6 <th>{:__('所属战队')}</th> 8 <th>{:__('所属战队')}</th>
7 <th>{:__('积分')}</th> 9 <th>{:__('积分')}</th>
@@ -11,6 +13,8 @@ @@ -11,6 +13,8 @@
11 {volist name="row" id="vo"} 13 {volist name="row" id="vo"}
12 <tr> 14 <tr>
13 <td>{$vo.name}</td> 15 <td>{$vo.name}</td>
  16 + <td style="word-break: break-all;">{$vo.grade}</td>
  17 + <td style="word-break: break-all;">{$vo.school}</td>
14 <td style="word-break: break-all;">{$vo.sno}</td> 18 <td style="word-break: break-all;">{$vo.sno}</td>
15 <td style="word-break: break-all;">{$vo.title}</td> 19 <td style="word-break: break-all;">{$vo.title}</td>
16 <td style="word-break: break-all;">{$vo.score}</td> 20 <td style="word-break: break-all;">{$vo.score}</td>