From 1f1601b121476d262204f68d6c22897d87f4ec42 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Sun, 25 Nov 2018 12:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E6=94=B9=E6=88=90=E7=8B=AC?= =?UTF-8?q?=E7=AB=8B=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/kaoshi/common.php | 1 + .../controller/Index.php} | 6 ++-- .../{teach => kaoshi}/model/Kaoshi.php | 2 +- .../{teach => kaoshi}/model/KaoshiNianji.php | 2 +- .../{teach => kaoshi}/model/KaoshiSubject.php | 2 +- application/kaoshi/validate/Cankaomingdan.php | 28 +++++++++++++++ application/kaoshi/validate/Kaohao.php | 27 ++++++++++++++ application/kaoshi/validate/Kaoshi.php | 34 ++++++++++++++++++ .../kaoshi => kaoshi/view/index}/caiji.html | 0 .../kaoshi => kaoshi/view/index}/create.html | 0 .../kaoshi => kaoshi/view/index}/edit.html | 0 .../kaoshi => kaoshi/view/index}/index.html | 22 +++--------- .../kaoshi => kaoshi/view/index}/kaohao.html | 0 application/teach/controller/qrcode.png | Bin 2150 -> 0 bytes config/kaoshi/app.php | 5 +++ database/seeds/Rule.php | 2 +- route/kaoshi.php | 21 +++++++++++ 17 files changed, 128 insertions(+), 24 deletions(-) create mode 100644 application/kaoshi/common.php rename application/{teach/controller/Kaoshi.php => kaoshi/controller/Index.php} (99%) rename application/{teach => kaoshi}/model/Kaoshi.php (99%) rename application/{teach => kaoshi}/model/KaoshiNianji.php (73%) rename application/{teach => kaoshi}/model/KaoshiSubject.php (74%) create mode 100644 application/kaoshi/validate/Cankaomingdan.php create mode 100644 application/kaoshi/validate/Kaohao.php create mode 100644 application/kaoshi/validate/Kaoshi.php rename application/{teach/view/kaoshi => kaoshi/view/index}/caiji.html (100%) rename application/{teach/view/kaoshi => kaoshi/view/index}/create.html (100%) rename application/{teach/view/kaoshi => kaoshi/view/index}/edit.html (100%) rename application/{teach/view/kaoshi => kaoshi/view/index}/index.html (79%) rename application/{teach/view/kaoshi => kaoshi/view/index}/kaohao.html (100%) delete mode 100644 application/teach/controller/qrcode.png create mode 100644 config/kaoshi/app.php create mode 100644 route/kaoshi.php diff --git a/application/kaoshi/common.php b/application/kaoshi/common.php new file mode 100644 index 00000000..b3d9bbc7 --- /dev/null +++ b/application/kaoshi/common.php @@ -0,0 +1 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = [ + 'id|考试号' => 'require|number', + 'banjiids|参考班级' => 'require|array', + 'subject|参考学科' => 'require|array', + ]; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; +} diff --git a/application/kaoshi/validate/Kaohao.php b/application/kaoshi/validate/Kaohao.php new file mode 100644 index 00000000..608056d9 --- /dev/null +++ b/application/kaoshi/validate/Kaohao.php @@ -0,0 +1,27 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = [ + 'kaoshi|考试号' => 'require|number', + 'banjiids|参考班级' => 'require|array', + ]; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; +} diff --git a/application/kaoshi/validate/Kaoshi.php b/application/kaoshi/validate/Kaoshi.php new file mode 100644 index 00000000..66d69c44 --- /dev/null +++ b/application/kaoshi/validate/Kaoshi.php @@ -0,0 +1,34 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = [ + 'title|标题' => 'require|length:1,25', + 'zuzhi|组织单位' => 'require|number', + 'xueqi|学期' => 'require|number', + 'category|分类' => 'require|number', + 'bfdate|考试时间' => 'require|date', + 'enddate|考试时间' => 'require|date', + 'nianji|参考年级' => 'require|array', + 'subject|参考学科' => 'require|array', + 'manfen|满分' => 'require|array', + ]; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; +} diff --git a/application/teach/view/kaoshi/caiji.html b/application/kaoshi/view/index/caiji.html similarity index 100% rename from application/teach/view/kaoshi/caiji.html rename to application/kaoshi/view/index/caiji.html diff --git a/application/teach/view/kaoshi/create.html b/application/kaoshi/view/index/create.html similarity index 100% rename from application/teach/view/kaoshi/create.html rename to application/kaoshi/view/index/create.html diff --git a/application/teach/view/kaoshi/edit.html b/application/kaoshi/view/index/edit.html similarity index 100% rename from application/teach/view/kaoshi/edit.html rename to application/kaoshi/view/index/edit.html diff --git a/application/teach/view/kaoshi/index.html b/application/kaoshi/view/index/index.html similarity index 79% rename from application/teach/view/kaoshi/index.html rename to application/kaoshi/view/index/index.html index 87dcdc71..1c79a1b5 100644 --- a/application/teach/view/kaoshi/index.html +++ b/application/kaoshi/view/index/index.html @@ -96,30 +96,18 @@ startbut = ''; // 编辑按钮 editbut = ''; - // 生成考号 - kaohaobut = ''; // 删除按钮 delbut = ''; - // 生成码录表按钮 - malubut = ''; - // 生成表格录入表 - biaolubut = ''; + // 生成考号 + morebut = ''; if(row.status == '已停用') { - buts = startbut + editbut; + buts = startbut; }else{ - buts = stopbut + editbut; + buts = stopbut; } - if( row.kaishi == 0 ) - { - buts = buts + kaohaobut; - } - if( row.jieshu == 0 ) - { - buts = buts + malubut + biaolubut; - } - buts = buts + delbut; + buts = buts + editbut + delbut + morebut; return buts; } diff --git a/application/teach/view/kaoshi/kaohao.html b/application/kaoshi/view/index/kaohao.html similarity index 100% rename from application/teach/view/kaoshi/kaohao.html rename to application/kaoshi/view/index/kaohao.html diff --git a/application/teach/controller/qrcode.png b/application/teach/controller/qrcode.png deleted file mode 100644 index 6fb4cd96400e030f8a0f0151211f1ac43398028b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2150 zcma)8eN>WH9DX&$Pt-D-s4=#V*@?E)I$>&viV>)9Xo+;iV^fA{x1_xJps`!a%q z4noZx%mDy^`ukxI1AqbM{V;{-zqDuHFVRnC34TWt0l=#9{V-r5tsDWs)ZQQKdxV-l z`TAA7v}zM3M1EJNyV;#Hu*)Q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#$y%46C1x?rBPXLYj20v+>6^*|q&t4# zoK>+885eF1?n?`OhzbT(x-L~1?IGH;v|6CQ73y!l-0+h;{f;{2*L`!h`jO_FV%Lw diff --git a/config/kaoshi/app.php b/config/kaoshi/app.php new file mode 100644 index 00000000..3779064a --- /dev/null +++ b/config/kaoshi/app.php @@ -0,0 +1,5 @@ +201,'title'=>'班级成绩','name'=>'tongji/Index/banji','paixu'=>1,'ismenu' =>true,'pid' =>2,'url'=>'/tongji',], // 考试管理 - ['id'=>301,'title'=>'考试列表','name'=>'teach/Kaoshi/index','paixu'=>1,'ismenu' =>true,'pid' =>3,'url'=>'/kaoshi',], + ['id'=>301,'title'=>'考试列表','name'=>'kaoshi/Index/index','paixu'=>1,'ismenu' =>true,'pid' =>3,'url'=>'/kaoshi',], // 师生名单 ['id'=>401,'title'=>'学生列表','name'=>'renshi/Student/index','paixu'=>1,'ismenu' =>true,'pid' =>4,'url'=>'/student',], diff --git a/route/kaoshi.php b/route/kaoshi.php new file mode 100644 index 00000000..0d4cae0e --- /dev/null +++ b/route/kaoshi.php @@ -0,0 +1,21 @@ + +// +---------------------------------------------------------------------- + +//系统设置路由 +Route::resource('kaoshi','kaoshi/Index'); +Route::get('kaoshi/:id/kaohao','kaoshi/Index/kaohao'); +Route::post('kaoshi/kaohao','kaoshi/Index/kaohaosave'); +Route::get('kaoshi/:id/biaoqian','kaoshi/Index/biaoqian'); +Route::get('kaoshi/:id/caiji','kaoshi/Index/caiji'); +Route::post('kaoshi/caiji','kaoshi/Index/cankaomingdan'); + + +