diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index c0823f1d..7ed0cc9f 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -286,8 +286,6 @@ class Index extends Base // 返回信息 return json($data); - - } } diff --git a/application/chengji/controller/Index.php b/application/chengji/controller/Index.php index 377f1b3a..36eac5fb 100644 --- a/application/chengji/controller/Index.php +++ b/application/chengji/controller/Index.php @@ -13,6 +13,8 @@ use app\teach\model\Subject; use app\system\model\Fields; // 引用phpspreadsheet类 use app\renshi\controller\Myexcel; +// 引用考试类 +use app\kaoshi\model\Kaoshi; class Index extends Base { @@ -27,6 +29,7 @@ class Index extends Base { // 获取表单数据 $list = request()->only(['id','ziduan','defen'],'post'); + // 声明学科数组 $subject = array('1'=>'yuwen','2'=>'shuxue','3'=>'waiyu'); $zd = $subject[$list['ziduan']]; diff --git a/application/chengji/model/Chengji.php b/application/chengji/model/Chengji.php index 80f0716a..330efb91 100644 --- a/application/chengji/model/Chengji.php +++ b/application/chengji/model/Chengji.php @@ -188,6 +188,7 @@ class Chengji extends Base ->when(!empty($schoolid),function($query) use($schoolid){ $query->where('school',$schoolid); }) + ->where('status',1) ->field('id,kaoshi,banji,yuwen,shuxue,waiyu') // ->cache('key',180) ->select(); diff --git a/application/kaoshi/view/index/create.html b/application/kaoshi/view/index/create.html index 7f8a41ca..a5c6df73 100644 --- a/application/kaoshi/view/index/create.html +++ b/application/kaoshi/view/index/create.html @@ -27,7 +27,7 @@
- + {php} $xq = new app\teach\model\Xueqi; $xueqi = $xq->where('status',1)->order(['id'=>'desc'])->limit(5)->field('id,title')->select(); diff --git a/application/kaoshi/view/index/edit.html b/application/kaoshi/view/index/edit.html index 66ba53c1..0f29a959 100644 --- a/application/kaoshi/view/index/edit.html +++ b/application/kaoshi/view/index/edit.html @@ -27,7 +27,7 @@
- + {php} $xq = new app\teach\model\Xueqi; $xueqi = $xq->where('status',1)->order(['id'=>'desc'])->limit(5)->field('id,title')->select(); diff --git a/application/kaoshi/view/more_action/caiji.html b/application/kaoshi/view/more_action/caiji.html index dad57f8f..fa42d802 100644 --- a/application/kaoshi/view/more_action/caiji.html +++ b/application/kaoshi/view/more_action/caiji.html @@ -47,7 +47,7 @@ {/php}
- +
{foreach $njlist as $key=>$vo}
@@ -57,7 +57,7 @@ {$vo} -
+
{/foreach} @@ -133,13 +133,15 @@ }, dataType: 'json', success: function(data){ + $('dd').each(function(){ + $(this).text(''); + }); for (var val in data) { for(var bj in data[val]['banji']) { - $('#' + val).append(''; + $('#n' + val).append(''; } } - }, error:function(data) { layer.alert('获取班级失败'); diff --git a/application/renshi/controller/Student.php b/application/renshi/controller/Student.php index a952c7e0..9f99abd9 100644 --- a/application/renshi/controller/Student.php +++ b/application/renshi/controller/Student.php @@ -282,6 +282,11 @@ class Student extends Base $students = array(); // 重新计算组合数据,如果存在数据则更新数据 foreach ($stuinfo as $key => $value) { + // 如果姓名、身份证号为空则跳过 + if(empty($value[1]) || empty($value[2])) + { + continue; + } // 判断本行班级与上行班级数据是否相等,如果不相等则从数据库查询班级ID if($bfbanji != $value[3]) { @@ -296,7 +301,7 @@ class Student extends Base } $bfbanji = $value[3]; // 如果班级ID为空,删除数据并跳出当前循环 - if($bj == null || $bj =='' ) + if( empty($bj) ) { continue; }