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

XIAOPAN

... ... @@ -52,7 +52,7 @@ class AdminStatisticsController extends AdminBaseController{
$hospital[$k]=$v['hospital'];
$num[$k]=$v['num'];
}
var_dump($hospital);
$this->assign('hospitalJson',json_encode($hospital));
$this->assign('num',json_encode($num));
... ... @@ -130,7 +130,7 @@ class AdminStatisticsController extends AdminBaseController{
$this->assign('interval',json_encode($interval));
$this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : '');
$this->assign('note', isset($param['note']) ? $param['note'] : '');
return $this->fetch();
}
... ...
... ... @@ -113,10 +113,11 @@
var hospital='';
var nowHospital="{$hospital}";
$.each(totalDateX,function (i, v) {
// if(v===nowHospital){
// hospital+="<option value='"+v+"' selected>"+v+"</option>";
// }
hospital+="<option value='"+v+"'>"+v+"</option>";
if(v===nowHospital){
hospital+="<option value='"+v+"' selected>"+v+"</option>";
}else {
hospital += "<option value='" + v + "'>" + v + "</option>";
}
});
$('#hospital').append(hospital);
console.log(hospital);
... ... @@ -627,9 +628,13 @@
var html="<option value=''>全部</option>";
if (data!="") {
for (var i = 0; i < data.length; i++) {
if ({$note}==data[i]['note']){
html+='<option value=' + data[i]['note'] + 'selected'+ '>' + data[i]['note'] + '</option>';
}else {
html += '<option value=' + data[i]['note'] + '>' + data[i]['note'] + '</option>';
}
}
}
$("#note").html(html);
}
})
... ...