正在显示
2 个修改的文件
包含
12 行增加
和
7 行删除
@@ -52,7 +52,7 @@ class AdminStatisticsController extends AdminBaseController{ | @@ -52,7 +52,7 @@ class AdminStatisticsController extends AdminBaseController{ | ||
52 | $hospital[$k]=$v['hospital']; | 52 | $hospital[$k]=$v['hospital']; |
53 | $num[$k]=$v['num']; | 53 | $num[$k]=$v['num']; |
54 | } | 54 | } |
55 | - var_dump($hospital); | 55 | + |
56 | $this->assign('hospitalJson',json_encode($hospital)); | 56 | $this->assign('hospitalJson',json_encode($hospital)); |
57 | $this->assign('num',json_encode($num)); | 57 | $this->assign('num',json_encode($num)); |
58 | 58 | ||
@@ -130,7 +130,7 @@ class AdminStatisticsController extends AdminBaseController{ | @@ -130,7 +130,7 @@ class AdminStatisticsController extends AdminBaseController{ | ||
130 | $this->assign('interval',json_encode($interval)); | 130 | $this->assign('interval',json_encode($interval)); |
131 | 131 | ||
132 | $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : ''); | 132 | $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : ''); |
133 | - | 133 | + $this->assign('note', isset($param['note']) ? $param['note'] : ''); |
134 | return $this->fetch(); | 134 | return $this->fetch(); |
135 | } | 135 | } |
136 | 136 |
@@ -113,10 +113,11 @@ | @@ -113,10 +113,11 @@ | ||
113 | var hospital=''; | 113 | var hospital=''; |
114 | var nowHospital="{$hospital}"; | 114 | var nowHospital="{$hospital}"; |
115 | $.each(totalDateX,function (i, v) { | 115 | $.each(totalDateX,function (i, v) { |
116 | -// if(v===nowHospital){ | ||
117 | -// hospital+="<option value='"+v+"' selected>"+v+"</option>"; | ||
118 | -// } | ||
119 | - hospital+="<option value='"+v+"'>"+v+"</option>"; | 116 | + if(v===nowHospital){ |
117 | + hospital+="<option value='"+v+"' selected>"+v+"</option>"; | ||
118 | + }else { | ||
119 | + hospital += "<option value='" + v + "'>" + v + "</option>"; | ||
120 | + } | ||
120 | }); | 121 | }); |
121 | $('#hospital').append(hospital); | 122 | $('#hospital').append(hospital); |
122 | console.log(hospital); | 123 | console.log(hospital); |
@@ -627,7 +628,11 @@ | @@ -627,7 +628,11 @@ | ||
627 | var html="<option value=''>全部</option>"; | 628 | var html="<option value=''>全部</option>"; |
628 | if (data!="") { | 629 | if (data!="") { |
629 | for (var i = 0; i < data.length; i++) { | 630 | for (var i = 0; i < data.length; i++) { |
630 | - html += '<option value=' + data[i]['note'] + '>' + data[i]['note'] + '</option>'; | 631 | + if ({$note}==data[i]['note']){ |
632 | + html+='<option value=' + data[i]['note'] + 'selected'+ '>' + data[i]['note'] + '</option>'; | ||
633 | + }else { | ||
634 | + html += '<option value=' + data[i]['note'] + '>' + data[i]['note'] + '</option>'; | ||
635 | + } | ||
631 | } | 636 | } |
632 | } | 637 | } |
633 | $("#note").html(html); | 638 | $("#note").html(html); |
-
请 注册 或 登录 后发表评论