作者 开飞机的舒克

删除sno学号字段

@@ -204,7 +204,7 @@ class Study extends Backend @@ -204,7 +204,7 @@ class Study extends Backend
204 ->paginate($limit); 204 ->paginate($limit);
205 205
206 foreach ($list as $row) { 206 foreach ($list as $row) {
207 - $row->visible(['id','avatar','name','gender','birthday','grade','school','sno','team_id','team_rank','earn_score','phone','unique','barcode']); 207 + $row->visible(['id','avatar','name','gender','birthday','grade','school','team_id','team_rank','earn_score','phone','unique','barcode']);
208 $row->visible(['team']); 208 $row->visible(['team']);
209 $row->getRelation('team')->visible(['title']); 209 $row->getRelation('team')->visible(['title']);
210 } 210 }
@@ -250,8 +250,7 @@ class Study extends Backend @@ -250,8 +250,7 @@ class Study extends Backend
250 ->setCellValue('D1', '班级') 250 ->setCellValue('D1', '班级')
251 ->setCellValue('E1', '学校') 251 ->setCellValue('E1', '学校')
252 ->setCellValue('F1', '手环ID') 252 ->setCellValue('F1', '手环ID')
253 - ->setCellValue('G1', '学号')  
254 - ->setCellValue('H1', '总积分'); 253 + ->setCellValue('G1', '总积分');
255 if ($ids == 'all' || empty($ids)) { //判断当前数据为全部或者选中的 254 if ($ids == 'all' || empty($ids)) { //判断当前数据为全部或者选中的
256 $list = $this->model->with('school,grade')->select(); 255 $list = $this->model->with('school,grade')->select();
257 } else { 256 } else {
@@ -266,11 +265,10 @@ class Study extends Backend @@ -266,11 +265,10 @@ class Study extends Backend
266 ->setCellValue('A' . $k, $val['id']) 265 ->setCellValue('A' . $k, $val['id'])
267 ->setCellValue('B' . $k, $val['name']) 266 ->setCellValue('B' . $k, $val['name'])
268 ->setCellValue('C' . $k, $val['gender'] ? '男' : '女') 267 ->setCellValue('C' . $k, $val['gender'] ? '男' : '女')
269 - ->setCellValue('D' . $k, $val['grade']['name'])  
270 - ->setCellValue('E' . $k, $val['school']['title']) 268 + ->setCellValue('D' . $k, $val['grade'])
  269 + ->setCellValue('E' . $k, $val['school'])
271 ->setCellValue('F' . $k, $val['unique']) 270 ->setCellValue('F' . $k, $val['unique'])
272 - ->setCellValue('G' . $k, $val['sno'])  
273 - ->setCellValue('H' . $k, $val['earn_score']); 271 + ->setCellValue('G' . $k, $val['earn_score']);
274 } 272 }
275 $excel->createSheet(); 273 $excel->createSheet();
276 $title = "学生成绩" . date("YmdHis"); 274 $title = "学生成绩" . date("YmdHis");
@@ -49,11 +49,6 @@ @@ -49,11 +49,6 @@
49 </div> 49 </div>
50 </div> 50 </div>
51 <div class="form-group"> 51 <div class="form-group">
52 - <label class="control-label col-xs-12 col-sm-2">{:__('Sno')}:</label>  
53 - <div class="col-xs-12 col-sm-8">  
54 - <input id="c-sno" class="form-control" name="row[sno]" type="text" value="">  
55 - </div> </div>  
56 - <div class="form-group">  
57 <label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label> 52 <label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label>
58 <div class="col-xs-12 col-sm-8"> 53 <div class="col-xs-12 col-sm-8">
59 <input id="c-team_id" data-rule="required" data-source="team/index" class="form-control selectpage" data-field="title" name="row[team_id]" type="text" value=""> 54 <input id="c-team_id" data-rule="required" data-source="team/index" class="form-control selectpage" data-field="title" name="row[team_id]" type="text" value="">
@@ -50,12 +50,6 @@ @@ -50,12 +50,6 @@
50 </div> 50 </div>
51 </div> 51 </div>
52 <div class="form-group"> 52 <div class="form-group">
53 - <label class="control-label col-xs-12 col-sm-2">{:__('Sno')}:</label>  
54 - <div class="col-xs-12 col-sm-8">  
55 - <input id="c-sno" class="form-control" name="row[sno]" type="text" value="{$row.sno|htmlentities}">  
56 - </div>  
57 - </div>  
58 - <div class="form-group">  
59 <label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label> 53 <label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label>
60 <div class="col-xs-12 col-sm-8"> 54 <div class="col-xs-12 col-sm-8">
61 <input id="c-team_id" data-rule="required" data-source="team/index" class="form-control selectpage" data-field="title" name="row[team_id]" type="text" value="{$row.team_id|htmlentities}"> 55 <input id="c-team_id" data-rule="required" data-source="team/index" class="form-control selectpage" data-field="title" name="row[team_id]" type="text" value="{$row.team_id|htmlentities}">
@@ -98,7 +98,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -98,7 +98,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
98 {field: 'birthday', title: __('Birthday'),operate:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime,datetimeFormat: "YYYY-MM-DD"}, 98 {field: 'birthday', title: __('Birthday'),operate:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime,datetimeFormat: "YYYY-MM-DD"},
99 {field: 'grade', title: __('Grade'), operate: 'LIKE'}, 99 {field: 'grade', title: __('Grade'), operate: 'LIKE'},
100 {field: 'school', title: __('School'), operate: 'LIKE'}, 100 {field: 'school', title: __('School'), operate: 'LIKE'},
101 - {field: 'sno', title: __('Sno'), operate: 'LIKE'},  
102 // {field: 'team_id', title: __('Team_id')}, 101 // {field: 'team_id', title: __('Team_id')},
103 {field: 'earn_score', title: __('Earn_score'),operate:false}, 102 {field: 'earn_score', title: __('Earn_score'),operate:false},
104 {field: 'unique', title: __('Unique'), operate:false}, 103 {field: 'unique', title: __('Unique'), operate:false},