public function queryWarnInfo($batteryId) { $m = new \Home\Model\BatteryWarnModel(); $this->ajaxReturn($m->getWarnInfo($batteryId)); }
public function getWarnTypes() { $m = new \Home\Model\BatteryWarnModel(); $ret = $m->getWarnTypes(); $this->myAjaxOkReturn($ret); }
public function warn() { $dbTableName = "event_warn"; $types = I('type', "%"); $m_warn = new \Home\Model\BatteryWarnModel(); $types = $m_warn->getWarnTypeByDetail($types); $condition = array(); if ($types != '%' && $types != "所有类型") { $condition['e_stype'] = $types; } $m_eventWarn = M($dbTableName); $tableHead = array("ID", "操作人", "电池ID", "告警类型", "发生时间", "详情"); $tableFields = array("t_" . $dbTableName . ".id", "t_user.username", "t_" . $dbTableName . ".fk_battery_id", "t_data_dic.detail", "t_" . $dbTableName . ".generate_time", "t_" . $dbTableName . ".data"); // $this->assign("typesurl",U('/Ajax/event/geteventtypes')); // $this->assign("typesurl",U('/Ajax/battery/getwarntypes')); $this->eventView($tableHead, $tableFields, $dbTableName, $condition); }