作者 开飞机的舒克

删除sno学号字段

... ... @@ -204,7 +204,7 @@ class Study extends Backend
->paginate($limit);
foreach ($list as $row) {
$row->visible(['id','avatar','name','gender','birthday','grade','school','sno','team_id','team_rank','earn_score','phone','unique','barcode']);
$row->visible(['id','avatar','name','gender','birthday','grade','school','team_id','team_rank','earn_score','phone','unique','barcode']);
$row->visible(['team']);
$row->getRelation('team')->visible(['title']);
}
... ... @@ -250,8 +250,7 @@ class Study extends Backend
->setCellValue('D1', '班级')
->setCellValue('E1', '学校')
->setCellValue('F1', '手环ID')
->setCellValue('G1', '学号')
->setCellValue('H1', '总积分');
->setCellValue('G1', '总积分');
if ($ids == 'all' || empty($ids)) { //判断当前数据为全部或者选中的
$list = $this->model->with('school,grade')->select();
} else {
... ... @@ -266,11 +265,10 @@ class Study extends Backend
->setCellValue('A' . $k, $val['id'])
->setCellValue('B' . $k, $val['name'])
->setCellValue('C' . $k, $val['gender'] ? '男' : '女')
->setCellValue('D' . $k, $val['grade']['name'])
->setCellValue('E' . $k, $val['school']['title'])
->setCellValue('D' . $k, $val['grade'])
->setCellValue('E' . $k, $val['school'])
->setCellValue('F' . $k, $val['unique'])
->setCellValue('G' . $k, $val['sno'])
->setCellValue('H' . $k, $val['earn_score']);
->setCellValue('G' . $k, $val['earn_score']);
}
$excel->createSheet();
$title = "学生成绩" . date("YmdHis");
... ...
... ... @@ -49,11 +49,6 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sno')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sno" class="form-control" name="row[sno]" type="text" value="">
</div> </div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label>
<div class="col-xs-12 col-sm-8">
<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 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sno')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sno" class="form-control" name="row[sno]" type="text" value="{$row.sno|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Team_id')}:</label>
<div class="col-xs-12 col-sm-8">
<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
{field: 'birthday', title: __('Birthday'),operate:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime,datetimeFormat: "YYYY-MM-DD"},
{field: 'grade', title: __('Grade'), operate: 'LIKE'},
{field: 'school', title: __('School'), operate: 'LIKE'},
{field: 'sno', title: __('Sno'), operate: 'LIKE'},
// {field: 'team_id', title: __('Team_id')},
{field: 'earn_score', title: __('Earn_score'),operate:false},
{field: 'unique', title: __('Unique'), operate:false},
... ...