作者 潘浩文
1 个管道 的构建 通过 耗费 2 秒

XIAOPAN

@@ -35,6 +35,8 @@ class AdminStatisticsController extends AdminBaseController{ @@ -35,6 +35,8 @@ class AdminStatisticsController extends AdminBaseController{
35 if (!empty($param['hospital'])){ 35 if (!empty($param['hospital'])){
36 $where="hospital='".$param['hospital']."' AND"; 36 $where="hospital='".$param['hospital']."' AND";
37 $where1['hospital']=$param['hospital']; 37 $where1['hospital']=$param['hospital'];
  38 + $note=Db::name('equipment')->where(['hospital'=>$param['hospital'],'is_delete'=>0])->group('note')->select();
  39 + $this->assign('note_category',$note);
38 } 40 }
39 if (!empty($param['note'])){ 41 if (!empty($param['note'])){
40 $where2['note']=$param['note']; 42 $where2['note']=$param['note'];
@@ -130,7 +132,7 @@ class AdminStatisticsController extends AdminBaseController{ @@ -130,7 +132,7 @@ class AdminStatisticsController extends AdminBaseController{
130 $this->assign('interval',json_encode($interval)); 132 $this->assign('interval',json_encode($interval));
131 133
132 $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : ''); 134 $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : '');
133 -// $this->assign('note', isset($param['note']) ? $param['note'] : ''); 135 + $this->assign('note', isset($param['note']) ? $param['note'] : '');
134 return $this->fetch(); 136 return $this->fetch();
135 } 137 }
136 138
@@ -43,6 +43,11 @@ @@ -43,6 +43,11 @@
43 科室 43 科室
44 <select class="form-control" id="note" name="note" style="width: 140px;"> 44 <select class="form-control" id="note" name="note" style="width: 140px;">
45 <option value=''>全部</option> 45 <option value=''>全部</option>
  46 + <notempty name="note_category">
  47 + <foreach name="note_category" item="vo">
  48 + <option value='{$vo.note}' <eq name="note" vlaue="{$vo.note}"></eq>>{$vo.note}</option>
  49 + </foreach>
  50 + </notempty>
46 </select> 51 </select>
47 <input type="submit" class="btn btn-primary" value="搜索"/> 52 <input type="submit" class="btn btn-primary" value="搜索"/>
48 </form> 53 </form>