diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index fe4913da..955982c6 100644 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -332,6 +332,8 @@ class TongjiBj extends KaoshiBase $src['enddate'] = date("Y-m-d", strtotime("+1 day")); } + // halt($src); + $data = $this ->where('banji_id', $src['banji_id']) ->where('kaoshi_id', 'in', function ($query) use ($src) { diff --git a/app/student/model/OneStudentChengji1.php b/app/student/model/OneStudentChengji1.php index a0a9983c..ce41979d 100644 --- a/app/student/model/OneStudentChengji1.php +++ b/app/student/model/OneStudentChengji1.php @@ -38,6 +38,11 @@ class OneStudentChengji extends BaseModel // 整理数据 $data = array(); foreach ($stuCj as $key => $value) { + if(empty($value->cjKaoshi)) + { + continue; + } + $data[$key] = [ 'kaoshi_id' => $value->kaoshi_id, 'kaoshiTitle' => $value->cjKaoshi->title, @@ -187,7 +192,7 @@ class OneStudentChengji extends BaseModel ->find(); // 参加考试学科 - $subject = subjectList(1,1); + $subject = subjectList(1,1); // 获取参加考试学科满分 $ksset = new \app\kaoshi\model\KaoshiSet; $manfen = $ksset->srcSubject($khInfo->kaoshi_id, '', $khInfo->ruxuenian); diff --git a/app/teach/controller/BanjiChengji.php b/app/teach/controller/BanjiChengji.php index 99ebc10b..6b2b66dd 100644 --- a/app/teach/controller/BanjiChengji.php +++ b/app/teach/controller/BanjiChengji.php @@ -23,7 +23,7 @@ class BanjiChengji extends AdminBase $list['banji_id'] = $banji; $sbj = new \app\teach\model\Subject; - $list['subject'] = $sbj->searchKaoshi()->toArray(); + $list['subject_id'] = $sbj->searchKaoshi()->toArray(); // 模板赋值 $this->view->assign('list',$list); diff --git a/app/teach/model/BanjiChengji.php b/app/teach/model/BanjiChengji.php index 34907a4d..6a011863 100644 --- a/app/teach/model/BanjiChengji.php +++ b/app/teach/model/BanjiChengji.php @@ -79,7 +79,6 @@ class BanjiChengji extends BaseModel ]; foreach ($cjlist as $key => $value) { - if($subject == $value->subject_id){ $xAxis[] = $value->bjKaoshi->title; $series['0']['data'][] = $value->defenlv; diff --git a/app/teach/view/banji_chengji/index.html b/app/teach/view/banji_chengji/index.html index 6e2001a5..29cf15ca 100644 --- a/app/teach/view/banji_chengji/index.html +++ b/app/teach/view/banji_chengji/index.html @@ -58,7 +58,7 @@ {/block} {block name="echart"} -{volist name="$list.subject" id="vo"} +{volist name="$list.subject_id" id="vo"}
{/volist} {/block} @@ -86,7 +86,7 @@ ,[] ]; // 获取学科 - var xk = ''; + var xk = ''; xk = eval(decodeURIComponent(xk)); var xiangmu = {cj_cnt:'人数',avg:'平均分',jige:'及格率%',youxiu:'优秀率%'}; // 要显示哪些统计结果