diff --git a/app/kaohao/controller/Index.php b/app/kaohao/controller/Index.php index 98ed1bc5..330cd1e9 100755 --- a/app/kaohao/controller/Index.php +++ b/app/kaohao/controller/Index.php @@ -6,7 +6,7 @@ use app\base\controller\AdminBase; // 引用数据模型类 use app\kaoshi\model\Kaoshi as KS; -use app\kaoshi\model\KaoshiSet as ksset; + use app\kaohao\model\Kaohao as KH; use think\Validate; diff --git a/app/kaohao/view/index/create_all.html b/app/kaohao/view/index/create_all.html index a12b9a98..6fdb0c74 100755 --- a/app/kaohao/view/index/create_all.html +++ b/app/kaohao/view/index/create_all.html @@ -1,16 +1,7 @@ {extend name=".././view/create.html" /} {block name="form"} -
-
-
- -
- 一、填写考试信息 - 二、设置参加考试年级及学科信息 - 三、生成考号 -
-
+
@@ -35,23 +26,20 @@
- - - 完成
- {/block} {block name="myjs"} {/block} diff --git a/app/kaoshi/controller/Index.php b/app/kaoshi/controller/Index.php index 81198a88..89e27aea 100755 --- a/app/kaoshi/controller/Index.php +++ b/app/kaoshi/controller/Index.php @@ -21,18 +21,6 @@ class Index extends AdminBase $list['status'] = '/kaoshi/index/status'; $list['luru'] = '/kaoshi/index/luru'; - // 设置要给模板赋值的信息 - $list['webtitle'] = '考试列表'; - $list['dataurl'] = '/kaoshi/index/data'; - $list['status'] = '/kaoshi/index/status'; - $list['luru'] = '/kaoshi/index/luru'; - $list['create'] = '/kaoshi/index/create'; - $list['edit'] = '/kaoshi/index/edit'; - $list['delete'] = '/kaoshi/index/delete'; - $list['more'] = '/kaoshi/index/more'; - $list['user_group'] = 'admin'; - $list['user_id'] = session('user_id'); - // 模板赋值 $this->view->assign('list', $list); // 渲染模板 @@ -81,8 +69,8 @@ class Index extends AdminBase { // 设置页面标题 $list['set'] = array( - 'webtitle' => '新建考试向导' - ,'butname' => '下一步' + 'webtitle' => '新建考试' + ,'butname' => '创建' ,'formpost' => 'POST' ,'url' => '/kaoshi/index/save' ); @@ -94,6 +82,126 @@ class Index extends AdminBase } + // 创建考试向导 + public function createSetp1() + { + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '创建考试向导' + ,'butname' => '下一步' + ,'formpost' => 'POST' + ,'url' => '/kaoshi/index/save' + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 创建考试向导 + public function createSetp2($kaoshi_id) + { + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '设置考试' + ,'butname' => '添加' + ,'formpost' => 'POST' + ,'url' => '/kaoshi/kaoshiset/save' + ,'kaoshi_id' => $kaoshi_id + ); + + // 获取考试时间 + $ks = new \app\kaoshi\model\Kaoshi; + $enddate = $ks->kaoshiInfo($kaoshi_id); + $enddate = $enddate->getData('enddate'); + $list['set']['nianji'] = nianJiNameList('str', $enddate); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 统计成绩 + public function tongji($kaoshi_id) + { + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '统计成绩' + ,'butname' => '开始统计' + ,'formpost' => 'POST' + ,'url' => '/kaoshi/index/save' + ); + + $list['tjxm'] = [ + [ + 'title' => '学生成绩在班级位置' + ,'url' => '/chengji/bjtj/bjorder' + ] + ,[ + 'title' => '学生成绩在学校位置' + ,'url' => '/chengji/njtj/njorder' + ] + ,[ + 'title' => '学生成绩在学校位置' + ,'url' => '/chengji/njtj/njorder' + ] + ,[ + 'title' => '学生成绩在全区位置' + ,'url' => '/chengji/schtj/schorder' + ] + ,[ + 'title' => '班级成绩' + ,'url' => '/chengji/bjtj/tongji' + ] + ,[ + 'title' => '各学校各年级成绩' + ,'url' => '/chengji/njtj/tongji' + ] + ,[ + 'title' => '统计各年级成绩' + ,'url' => '/chengji/schtj/tongji' + ] + // ,[ + // 'title' => '重算得分率' + // ,'url' => '/chengji/tongji/editdfl/' . $kaoshi_id + // ] + ]; + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 生成考号 + public function createSetp3($kaoshi_id) + { + // 获取参考年级 + $ksset = new \app\kaoshi\model\KaoshiSet; + $list['data']['nianji'] = $ksset->srcGrade($kaoshi_id); + $list['data']['nianjiNum'] = array_column($list['data']['nianji'], 'ruxuenian'); + + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '生成考号' + ,'butname' => '生成' + ,'formpost' => 'POST' + ,'url' => '/kaohao/index/saveall' + ,'kaoshi_id' => $kaoshi_id + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + // 保存信息 public function save() { @@ -105,8 +213,6 @@ class Index extends AdminBase ,'bfdate' ,'enddate' ,'zuzhi_id' - ,'user_group' => session('onlineCategory') - ,'user_id' => session('user_id') ], 'post'); // 验证表单数据 @@ -116,11 +222,14 @@ class Index extends AdminBase if(!$result){ return json(['msg' => $msg, 'val' => 0]); } + $list['user_id'] = session('user_id'); + $list['user_group'] = 'admin'; + // $list['jibie_id'] = 1; // 保存数据 $ks = new KS(); $ksdata = $ks->create($list); - $ksdata ? $data = ['msg' => '添加成功', 'val' => 1, 'kaoshi_id' => $ksdata->id] + $ksdata ? $data = ['msg' => '添加成功', 'val' => 1, 'kaoshi_id'=> $ksdata->id] : $data = ['msg' => '数据处理错误', 'val' => 0]; // 返回信息 @@ -186,6 +295,9 @@ class Index extends AdminBase } + + + // 设置成绩是否允许操作 public function luru() { diff --git a/app/kaoshi/route/kaoshi.php b/app/kaoshi/route/kaoshi.php index 36198ad2..55a3a916 100755 --- a/app/kaoshi/route/kaoshi.php +++ b/app/kaoshi/route/kaoshi.php @@ -23,6 +23,10 @@ Route::group('index', function () { Route::rule('status','Index/setStatus','post'); # 删除信息 Route::rule('more/','Index/moreAction','get'); # 修改信息 Route::rule('luru','Index/luru','post'); # 考试编辑状态 + Route::rule('setp1','Index/createSetp1','get'); # 添加信息 + Route::rule('setp2/','Index/createSetp2','get'); # 添加信息 + Route::rule('setp3/','Index/createSetp3','get'); # 添加信息 + Route::rule('tongji/','Index/tongji','get'); # 添加信息 }); diff --git a/app/kaoshi/view/index/create.html b/app/kaoshi/view/index/create.html index 58682a4d..9c01fdf8 100755 --- a/app/kaoshi/view/index/create.html +++ b/app/kaoshi/view/index/create.html @@ -1,14 +1,6 @@ {extend name=".././view/create.html" /} {block name="form"} -
-
-
- -
- 一、填写考试信息 -
-
@@ -97,22 +89,18 @@
-
- {/block} {block name="myjs"} {/block} diff --git a/app/kaoshi/view/index/create_setp1.html b/app/kaoshi/view/index/create_setp1.html new file mode 100644 index 00000000..b3105ed5 --- /dev/null +++ b/app/kaoshi/view/index/create_setp1.html @@ -0,0 +1,182 @@ +{extend name=".././view/create.html" /} +{block name="jscss"} + +{/block} +{block name="form"} +
+
开始
+
考试信息
+
各年级参加考试学科和分数线
+
生成参加考试学生名单
+
完成
+
+ +
+
+ +
+ {php} $schoollist = kaoshiSchoolList();{/php} + +
+
+
+ +
+ +
+
+
+ +
+ {php} + $xueqi = new \app\teach\model\Xueqi; + $xueqilist = $xueqi + ->limit(6) + ->order(['id'=>'desc']) + ->field('id,title') + ->select(); + {/php} + +
+
+
+ +
+ {php} $category = categoryChildren(109);{/php} + +
+
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaoshi/view/index/create_setp2.html b/app/kaoshi/view/index/create_setp2.html new file mode 100644 index 00000000..09d87c6a --- /dev/null +++ b/app/kaoshi/view/index/create_setp2.html @@ -0,0 +1,222 @@ +{extend name=".././view/create.html" /} +{block name="jscss"} + +{/block} +{block name="form"} +
+
开始
+
考试信息
+
以年级为单位设置参加考试学科和分数线
+
生成参加考试学生名单
+
完成
+
+
+
+ +
+ + +
+
+
+ +
+ {php} + $subject = subjectKaoshiList(); + {/php} + + + + + + + + + + + + + + + + + {volist name="subject" id="vo"} + + + + + + + + {/volist} + +
选择学科满分优秀分数线及格分数线
+ + {$vo.title}
+
+
+ +
+ + 下一步 +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaoshi/view/index/create_setp3.html b/app/kaoshi/view/index/create_setp3.html new file mode 100644 index 00000000..d4a222c6 --- /dev/null +++ b/app/kaoshi/view/index/create_setp3.html @@ -0,0 +1,120 @@ +{extend name=".././view/create.html" /} + +{block name="jscss"} + +{/block} + +{block name="form"} +
+
开始
+
考试信息
+
各年级参加考试学科和分数线
+
生成参加考试学生名单
+
完成
+
+
+
+ +
+ {php}$schoolList = danweiJibie('校级', '校级');{/php} + +
+
+
+ {foreach $list.data.nianji as $key=>$vo } + +
+ +
+ {/foreach} +
+ +
+ + 完成 +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaoshi/view/index/index.html b/app/kaoshi/view/index/index.html index 929523ea..d099299c 100755 --- a/app/kaoshi/view/index/index.html +++ b/app/kaoshi/view/index/index.html @@ -38,8 +38,6 @@ {/volist} - - {/block} {block name="table"} @@ -52,6 +50,9 @@ + @@ -61,11 +62,12 @@ +{/block} + diff --git a/app/kaoshi/view/kaoshi_set/create.html b/app/kaoshi/view/kaoshi_set/create.html index 54f4332e..aa7ae299 100755 --- a/app/kaoshi/view/kaoshi_set/create.html +++ b/app/kaoshi/view/kaoshi_set/create.html @@ -1,14 +1,6 @@ {extend name=".././view/create.html" /} {block name="form"} -
-
-
- -
- 一、填写考试信息 - 二、设置参加考试年级及学科信息 -
@@ -64,11 +56,9 @@
- 上一步 - - 下一步
{/block} @@ -76,7 +66,7 @@ {block name="myjs"}