作者 景琛

修改大屏显示学生排行问题

@@ -216,8 +216,10 @@ class Screen extends Backend @@ -216,8 +216,10 @@ class Screen extends Backend
216 $this->success("Ajax请求成功", null, ['id' => $ids]); 216 $this->success("Ajax请求成功", null, ['id' => $ids]);
217 } 217 }
218 $data = $row->toArray(); 218 $data = $row->toArray();
  219 + //dump($data);exit();
219 $res = db('study_ronda_score') 220 $res = db('study_ronda_score')
220 ->where('ronda_id',$data['ronda_id']) 221 ->where('ronda_id',$data['ronda_id'])
  222 + ->order('score','desc')
221 ->select(); 223 ->select();
222 $list = []; 224 $list = [];
223 foreach ($res as $k => $v){ 225 foreach ($res as $k => $v){
@@ -233,7 +235,7 @@ class Screen extends Backend @@ -233,7 +235,7 @@ class Screen extends Backend
233 } 235 }
234 236
235 /** 237 /**
236 - * 批量修改 238 + * 修改
237 */ 239 */
238 public function multi($ids = NULL){ 240 public function multi($ids = NULL){
239 if (!$this->request->isPost()) { 241 if (!$this->request->isPost()) {
@@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
12 <tr> 12 <tr>
13 <td>{$vo.rank}</td> 13 <td>{$vo.rank}</td>
14 <td>{$vo.name}</td> 14 <td>{$vo.name}</td>
15 - <td style="word-break: break-all;">{$vo.title}</td>  
16 <td style="word-break: break-all;">{$vo.score}</td> 15 <td style="word-break: break-all;">{$vo.score}</td>
  16 + <td style="word-break: break-all;">{$vo.title}</td>
17 </tr> 17 </tr>
18 {/volist} 18 {/volist}
19 </tbody> 19 </tbody>
@@ -45,7 +45,7 @@ class Screen extends Api @@ -45,7 +45,7 @@ class Screen extends Api
45 $item['percent'] = $item['score']; 45 $item['percent'] = $item['score'];
46 $item['study'] = db('study_ronda_score l') 46 $item['study'] = db('study_ronda_score l')
47 ->join('study s','l.sid = s.id') 47 ->join('study s','l.sid = s.id')
48 - ->where('l.team_id',$item['team_id']) 48 + ->where('ronda_id',$item['ronda_id'])
49 ->field('s.name,score as sum_score,l.*') 49 ->field('s.name,score as sum_score,l.*')
50 ->order('score','desc') 50 ->order('score','desc')
51 ->select(); 51 ->select();