From 969e15f6eef3bd10ed381dd26aa28453437a7fda Mon Sep 17 00:00:00 2001 From: cxdbz Date: Thu, 2 Jan 2020 19:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E5=BD=95=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/model/Tongji.php | 2 ++ app/chengji/view/tongji/yilu_cnt.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/chengji/model/Tongji.php b/app/chengji/model/Tongji.php index 86e61e87..f6114c85 100644 --- a/app/chengji/model/Tongji.php +++ b/app/chengji/model/Tongji.php @@ -118,6 +118,7 @@ class Tongji extends Base // 循环统计各学科成绩 foreach ($ksinfo->ksSubject as $key => $value) { $cjcol = array_column($cj,$value->lieming); + $stucnt = count($cjcol); $cjcol = array_filter($cjcol,function($item){ return $item !== null; }); @@ -159,6 +160,7 @@ class Tongji extends Base $cjcol = array_filter($cjcol,function($item){ return $item !== null; }); + $data['stucnt'] = count($cj); $data['bmcnt'] = count($cjcol); # 报名人数 $data['sum'] = array_sum($cjcol); if($data['bmcnt']>0) diff --git a/app/chengji/view/tongji/yilu_cnt.html b/app/chengji/view/tongji/yilu_cnt.html index ed3eafc2..565a82aa 100644 --- a/app/chengji/view/tongji/yilu_cnt.html +++ b/app/chengji/view/tongji/yilu_cnt.html @@ -88,7 +88,7 @@ var str=''; if(d.chengji) { - str = d.chengji.bmcnt + str = d.chengji.stucnt } return str; }},