diff --git a/application/chengji/controller/Index.php b/application/chengji/controller/Index.php index 2927c189..aca1ec92 100644 --- a/application/chengji/controller/Index.php +++ b/application/chengji/controller/Index.php @@ -281,7 +281,8 @@ class Index extends Base // 成绩列表 public function index($kaoshi) { - // 设置要给模板赋值的信息 + + // 设置要给模板赋值的信息 $list['webtitle'] = '学生成绩列表'; // 实例化考试数据模型 diff --git a/application/chengji/view/index/dw_chengji.html b/application/chengji/view/index/dw_chengji.html index b24c52e2..0baeeb79 100644 --- a/application/chengji/view/index/dw_chengji.html +++ b/application/chengji/view/index/dw_chengji.html @@ -6,7 +6,7 @@
- {php} $schoollist = schlist('校级','校级');{/php} + {php} $schoollist = schlist('校级','校级',['小学','中小学']);{/php} {/volist} diff --git a/application/chengji/view/tongji/dw_banji.html b/application/chengji/view/tongji/dw_banji.html index 1ae5e467..7fbcf141 100644 --- a/application/chengji/view/tongji/dw_banji.html +++ b/application/chengji/view/tongji/dw_banji.html @@ -6,7 +6,7 @@
- {php} $schoollist = schlist('校级','校级');{/php} + {php} $schoollist = schlist('校级','校级',['小学','中小学']);{/php} {/volist} diff --git a/application/chengji/view/tongji/yilu_cnt.html b/application/chengji/view/tongji/yilu_cnt.html index 39ea74b9..e964d419 100644 --- a/application/chengji/view/tongji/yilu_cnt.html +++ b/application/chengji/view/tongji/yilu_cnt.html @@ -16,7 +16,7 @@
- {php} $schoollist = schlist('校级','校级');{/php} + {php} $schoollist = schlist('校级','校级',['小学','中小学']);{/php} {volist name="schoollist" id="vo"} {/volist} diff --git a/application/common.php b/application/common.php index 59461d52..60f19c6b 100644 --- a/application/common.php +++ b/application/common.php @@ -149,19 +149,34 @@ function excelLieming() // 单位列表 -function schlist($low='班级',$high='其它级') +function schlist($low='班级',$high='其它级',$xueduan=array()) { // 实例化单位模型 $sch = new \app\system\model\School; // 实例化类别数据模型 $cat = new \app\system\model\Category; // 获取获取级别列表 - $catlist = $cat->where('pid',102)->column('title,id'); + $catlist = $cat->where('pid',102) + ->where('status',1) + ->column('title,id'); + + // 获取学段列表 + if(count($xueduan)>0){ + $xdlist = $cat->where('pid',103) + ->where('status',1) + ->where('title','in',$xueduan) + ->column('id'); + }else{ + $xdlist = $cat->where('pid',103) + ->where('status',1) + ->column('id'); + } + // 查询学校 $schlist = $sch->where('jibie','between',[$catlist[$low],$catlist[$high]]) ->where('status',1) - // ->cache('schoollist',180) + ->where('xueduan','in',$xdlist) ->order(['paixu']) ->column('id,title,jiancheng'); diff --git a/application/kaoshi/view/kaohao/biaoqian.html b/application/kaoshi/view/kaohao/biaoqian.html index 0471b4ed..653a7758 100644 --- a/application/kaoshi/view/kaohao/biaoqian.html +++ b/application/kaoshi/view/kaohao/biaoqian.html @@ -16,7 +16,7 @@
- {php} $schoollist = schlist('校级','校级');{/php} + {php} $schoollist = schlist('校级','校级',['小学','中小学']);{/php} {volist name="schoollist" id="vo"} diff --git a/application/kaoshi/view/kaohao/index.html b/application/kaoshi/view/kaohao/index.html index 496ec259..bdd7900f 100644 --- a/application/kaoshi/view/kaohao/index.html +++ b/application/kaoshi/view/kaohao/index.html @@ -5,7 +5,7 @@
- {php} $schoollist = schlist('校级','校级');{/php} + {php} $schoollist = schlist('校级','校级',['小学','中小学']);{/php}