diff --git a/app/admin/validate/SetPassword.php b/app/admin/validate/SetPassword.php index 2afa056d..8b736787 100755 --- a/app/admin/validate/SetPassword.php +++ b/app/admin/validate/SetPassword.php @@ -25,6 +25,6 @@ class SetPassword extends Validate * @var array */ protected $message = [ - 'newpassword.regex' => '只能输入6-16个字母、数字、半角句号、下划线', + 'newpassword.regex' => '只能输入7-20个字母、数字、半角句号、下划线', ]; } diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index d5ef4fb2..555770af 100755 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -91,9 +91,10 @@ class Index extends AdminBase // 获取参加考试的学校和年级 $cy = new \app\kaohao\model\SearchCanYu; $src['kaoshi_id'] = $kaoshi_id; + $src['all'] = true; $list['school'] = $cy->school($src); $ksset = new \app\kaoshi\model\KaoshiSet; - $list['nianji'] = $ksset->srcGrade($kaoshi_id); + $list['nianji'] = $ksset->srcGrade($src); // 模板赋值 $this->view->assign('list', $list); @@ -343,7 +344,7 @@ class Index extends AdminBase } $right_i = $i; - // 循环写出成绩及个人信息 + // 循环写出个人信息和成绩 $i = 0; $row++; $row_temp = $row; @@ -367,6 +368,8 @@ class Index extends AdminBase $sheet->setCellValue($colname[$i] . $row_temp, $value[$val['lieming'] . $tjxml_v['biaoshi']]); $i++; } + }else{ + $i++; } } $sheet->setCellValue($colname[$i] . $row_temp, $value['avg']); diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index 86b24b46..ccd6148f 100755 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -139,6 +139,11 @@ class Chengji extends BaseModel ,'subject_id' => '' ,'searchval' => '' ,'user_id' => '' + ,'page' => 1 + ,'limit' => 10 + ,'field' => 'id' + ,'order' => 'desc' + ,'all' => false ); $src = array_cover($srcfrom, $src); $cjList = $this @@ -178,7 +183,6 @@ class Chengji extends BaseModel ]) ->select(); - // 重新整理成绩 $data = array(); foreach ($cjList as $key => $value) { @@ -208,7 +212,23 @@ class Chengji extends BaseModel $data[$key]['update_time'] = $value->update_time; } + + if ($src['order'] == 'asc') { + $src['order'] = SORT_ASC; + } else { + $src['order'] = SORT_DESC; + } + // halt($src['order']); + + $data = \app\facade\Tools::sortArrByManyField($data, $src['field'], $src['order']); + if($src['all'] != true) + { + $start = ($src['page'] - 1) * $src['limit']; + $data = array_slice($data, $start, $src['limit']); + } + return $data; + } diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index fa88c401..89640d2d 100755 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -165,6 +165,7 @@ class TongjiBj extends BaseModel $ksset = new ksset(); // 获取参加考试学科 + $src['all'] = true; $subject = $ksset->srcSubject($src); $banji =$cy->class($src); @@ -186,6 +187,7 @@ class TongjiBj extends BaseModel $srcfrom['banji_id'] = array_column($banji, 'id'); $temp = $more->srcChengjiList($srcfrom); + $temp = $tj->tongjiCnt($temp, $subject); $data[] = [ 'banji_id' => '合计', diff --git a/app/login/controller/YanZheng.php b/app/login/controller/YanZheng.php index cfcd3750..83e494cd 100644 --- a/app/login/controller/YanZheng.php +++ b/app/login/controller/YanZheng.php @@ -16,7 +16,7 @@ class YanZheng if ($userinfo == null) { // 验证结果; - $data = ['msg' => '管理员帐号不存在或被禁用', 'val' => 0]; + $data = ['msg' => '教师帐号不存在或被禁用', 'val' => 0]; return $data; } diff --git a/app/luru/controller/Index.php b/app/luru/controller/Index.php index 44b7e467..96eb8ea8 100755 --- a/app/luru/controller/Index.php +++ b/app/luru/controller/Index.php @@ -52,12 +52,15 @@ class Index extends AdminBase ,'subject_id' => '' ,'searchval' ,'user_id' => session('user_id') + ,'all' => false ], 'POST'); // 根据条件查询数据 $cj = new Chengji; - $data = $cj->searchLuru($src); - $data = reset_data($data, $src); + $data = $cj->searchLuru($src); + $src['all'] = true; + $cnt = count($cj->searchLuru($src)); + $data = reset_data($data, $cnt); return json($data); } diff --git a/app/luru/view/index/yilu_cnt_table.html b/app/luru/view/index/yilu_cnt_table.html index baefd395..b9bfc26a 100644 --- a/app/luru/view/index/yilu_cnt_table.html +++ b/app/luru/view/index/yilu_cnt_table.html @@ -107,7 +107,7 @@ layui.use(['table', 'form', 'canyuKaoshi'], function() { $.each(xk, function(index, value) { var colname = xk[index].lieming - coltitle = xk[index].title; + coltitle = xk[index].title + '成绩数'; options.cols[0].push({ field: 'id', title: coltitle, @@ -120,6 +120,14 @@ layui.use(['table', 'form', 'canyuKaoshi'], function() { str = d.chengji[colname].xkcnt; } } + if (d.chengji.stucnt != str) { + if (str == 0) { + str = ''; + } else { + var cha = str - d.chengji.stucnt; + str = str + ' (' + cha + ')' + } + } return str; } }); diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index dc7811a6..8cd70e2a 100755 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -119,8 +119,8 @@ class Rule extends Seeder ], // 占位 ['id' => 10601 - ,'title' => '占位' - ,'name' => 'biaoqian1' + ,'title' => '获取标签数据' + ,'name' => 'luru/index/biaoqianxls' ,'paixu' => 1 ,'pid' => 106 ], @@ -443,7 +443,7 @@ class Rule extends Seeder ,'pid' => 3020401 ], ['id' => 30204011 - ,'title' => '批量删除成绩' + ,'title' => '删除单条成绩' ,'name' => 'chengji/index/delete' ,'paixu' => 3 ,'pid' => 3020401