From 05c4f4b519898508be2d1f9ade55c2309ef0a1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 3 Aug 2020 16:22:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=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/model/TongjiBj.php | 2 ++ app/renshi/model/StudentChengji.php | 2 +- app/teach/controller/BanjiChengji.php | 18 +++++++++--------- app/teach/model/BanjiChengji.php | 1 - app/teach/view/banji_chengji/index.html | 22 +++++++++++----------- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index 1c56e73f..e2254ccd 100644 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -272,6 +272,8 @@ class TongjiBj extends BaseModel $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/renshi/model/StudentChengji.php b/app/renshi/model/StudentChengji.php index ebbf6e42..bcaee1f0 100644 --- a/app/renshi/model/StudentChengji.php +++ b/app/renshi/model/StudentChengji.php @@ -188,7 +188,7 @@ class StudentChengji 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 644a8e02..62bd6f1a 100644 --- a/app/teach/controller/BanjiChengji.php +++ b/app/teach/controller/BanjiChengji.php @@ -23,7 +23,7 @@ class BanjiChengji extends BaseController $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); @@ -43,9 +43,9 @@ class BanjiChengji extends BaseController ,'limit'=>'10' ,'field'=>'ks_id' ,'order'=>'desc' - ,'banji'=>'' - ,'category'=>'' - ,'xueqi'=>'' + ,'banji_id'=>'' + ,'category_id'=>'' + ,'xueqi_id'=>'' ,'bfdate'=>'' ,'enddate'=>'' ],'POST'); @@ -69,10 +69,10 @@ class BanjiChengji extends BaseController ->only([ 'field' => 'ks_id' ,'order' => 'desc' - ,'banji' => '' - ,'subject' => '' - ,'category' => '' - ,'xueqi' => '' + ,'banji_id' => '' + ,'subject_id' => '' + ,'category_id' => '' + ,'xueqi_id' => '' ,'bfdate' => '' ,'enddate' => '' ],'POST'); @@ -82,7 +82,7 @@ class BanjiChengji extends BaseController $bjcjmod = new \app\chengji\model\TongjiBj; $data = $bjcjmod->srcBanjiChengji($src); $bjcjmod = new bjcjmod; - $data = $bjcjmod->tiaoXing($data, $src['subject']); + $data = $bjcjmod->tiaoXing($data, $src['subject_id']); return json($data); } 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 b6197c9f..83b6b0bd 100644 --- a/app/teach/view/banji_chengji/index.html +++ b/app/teach/view/banji_chengji/index.html @@ -20,21 +20,21 @@
- +
- - {php} $category = getCategory('学期');{/php} + + {php} $category = getCategory(108);{/php} {volist name="category" id="vo"} - + {/volist}
- +
- {php} $category = getCategory('考试');{/php} + {php} $category = getCategory(109);{/php} {volist name="category" id="vo"} - + {/volist}
@@ -51,14 +51,14 @@ - + {/block} {block name="table"}
{/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:'优秀率%'}; // 要显示哪些统计结果 @@ -233,7 +233,7 @@ var id = sbjlieming; var url = '/teach/banjicj/datatx'; var val = form.val('search'); - val.subject = sbjid; + val.subject_id = sbjid; var title = sbjtitle; createZhexian(id,url,val,title); } From 7c8590c4a492db575728cce4ff927c2d58501f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 3 Aug 2020 16:37:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E8=AF=95?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=90=8E=EF=BC=8C=E5=AD=A6=E7=94=9F=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E6=88=90=E7=BB=A9=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/renshi/model/StudentChengji.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/renshi/model/StudentChengji.php b/app/renshi/model/StudentChengji.php index bcaee1f0..86e0424b 100644 --- a/app/renshi/model/StudentChengji.php +++ b/app/renshi/model/StudentChengji.php @@ -38,6 +38,11 @@ class StudentChengji 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,