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

XIAOPAN

... ... @@ -125,8 +125,7 @@ class AdminStatisticsController extends AdminBaseController{
public function getNote(){
$param=$this->request->param();
$data=Db::name('equipment')->where(['hospital'=>$param['hospital'],'is_delete'=>0])->group('note')->select()->toArray();
$data=Db::name('equipment')->where(['hospital'=>$param['hospital'],'is_delete'=>0,'note'=>['neq',null]])->group('note')->select()->toArray();
return $data;
}
... ...
... ... @@ -567,12 +567,13 @@
},
success: function (data) {
var html="<option value=''>全部</option>";
console.log(data);
for (var i=0;i<data.length;i++){
html+='<option value='+data[i]['note']+'>'+data[i]['note']+'</option>';
}
console.log(html);
$("#note").html(html);
if (data!="") {
for (var i = 0; i < data.length; i++) {
html += '<option value=' + data[i]['note'] + '>' + data[i]['note'] + '</option>';
}
console.log(html);
$("#note").html(html);
}
}
})
})
... ...