From 77935cceb7dc695b43abcce679eda9037db6795e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Tue, 4 Jan 2022 10:30:57 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/validate/SetPassword.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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个字母、数字、半角句号、下划线', ]; } From ba89f5444e31df740c5cb4e5b2dd0242e3b163c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=82=E5=BE=92=E5=BC=A0=E4=B8=89?= Date: Tue, 4 Jan 2022 20:03:48 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E5=BD=95?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/model/TongjiBj.php | 2 ++ app/login/controller/YanZheng.php | 2 +- app/luru/view/index/yilu_cnt_table.html | 5 ++++- database/seeds/Rule.php | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) 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/view/index/yilu_cnt_table.html b/app/luru/view/index/yilu_cnt_table.html index baefd395..917d6365 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,9 @@ layui.use(['table', 'form', 'canyuKaoshi'], function() { str = d.chengji[colname].xkcnt; } } + if (d.chengji.stucnt != str && str != 0) { + str = ''+str+'' + } return str; } }); diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index dc7811a6..9f112798 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 ], From 7ebba935f0ff2c3b9defb3b1e8faad1ba0aed2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=82=E5=BE=92=E5=BC=A0=E4=B8=89?= Date: Tue, 4 Jan 2022 21:23:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E5=BD=95?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E6=98=BE=E7=A4=BA=E5=92=8C=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/model/Chengji.php | 22 +++++++++++++++++++++- app/luru/controller/Index.php | 7 +++++-- app/luru/view/index/yilu_cnt_table.html | 9 +++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) 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/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 917d6365..b9bfc26a 100644 --- a/app/luru/view/index/yilu_cnt_table.html +++ b/app/luru/view/index/yilu_cnt_table.html @@ -120,8 +120,13 @@ layui.use(['table', 'form', 'canyuKaoshi'], function() { str = d.chengji[colname].xkcnt; } } - if (d.chengji.stucnt != str && str != 0) { - str = ''+str+'' + if (d.chengji.stucnt != str) { + if (str == 0) { + str = ''; + } else { + var cha = str - d.chengji.stucnt; + str = str + ' (' + cha + ')' + } } return str; } From 5193f82428ef198595bb55584b7d514458e2f20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=82=E5=BE=92=E5=BC=A0=E4=B8=89?= Date: Tue, 4 Jan 2022 21:47:20 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=88=90=E7=BB=A9=E9=94=99=E8=AF=AF=E5=92=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8D=95=E6=9D=A1=E6=88=90=E7=BB=A9=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/controller/Index.php | 3 ++- database/seeds/Rule.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index d5ef4fb2..6d163454 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); diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index 9f112798..8cd70e2a 100755 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -443,7 +443,7 @@ class Rule extends Seeder ,'pid' => 3020401 ], ['id' => 30204011 - ,'title' => '批量删除成绩' + ,'title' => '删除单条成绩' ,'name' => 'chengji/index/delete' ,'paixu' => 3 ,'pid' => 3020401 From 53a44baec4a86be82bcda3b3642fcb8f65dd7747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Wed, 5 Jan 2022 14:46:31 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E6=88=90=E7=BB=A9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/controller/Index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index 6d163454..555770af 100755 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -344,7 +344,7 @@ class Index extends AdminBase } $right_i = $i; - // 循环写出成绩及个人信息 + // 循环写出个人信息和成绩 $i = 0; $row++; $row_temp = $row; @@ -368,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']);