|
@@ -29,14 +29,22 @@ class IndexController extends MainController
|
|
|
public function index(){
|
|
|
//站点信息
|
|
|
$primarydev=Db::table('primarydev')->select();
|
|
|
- //报警设备 reportdata
|
|
|
- $reportdata=Db::table('reportdata')->where(array(array('ALARMENDTIME','=','')))->select();
|
|
|
|
|
|
|
|
|
- $this->api_return_json(compact('reportdata','primarydev'),1);
|
|
|
+ $this->api_return_json(compact('primarydev'),1);
|
|
|
|
|
|
}
|
|
|
+ //报警设备
|
|
|
+ public function reportdata(){
|
|
|
+ $PRIMARYADDR=$this->request->param('primaryaddr');
|
|
|
+ if($PRIMARYADDR){
|
|
|
+ //报警设备 reportdata
|
|
|
+ $reportdata=Db::table('reportdata')->where(array(array('ALARMENDTIME','=',''),array('PRIMARYADDR','=',$PRIMARYADDR)))->select();
|
|
|
+ $this->api_return_json(compact('reportdata'),1);
|
|
|
+ }
|
|
|
|
|
|
+ //$this->api_return_json(array('msg'=>'请选择一个站点'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|