diff --git a/application/module/Westdc/Visual/Record.php b/application/module/Westdc/Visual/Record.php index 9358f829..b18d9294 100644 --- a/application/module/Westdc/Visual/Record.php +++ b/application/module/Westdc/Visual/Record.php @@ -77,6 +77,19 @@ class Record extends Database $this->timeFiled = $var_data['visual_timefield_model']; }//custom + //时间字段为空的bug + if(empty($var_data['visual_timefield_model'])){ + $this->timeFiled = "utctime"; + }else{ + if($var_data['visual_timefield_model'] == 'single' && empty($var_data['visual_timefield'])){ + $this->timeFiled = "utctime"; + }elseif($var_data['visual_timefield_model'] == 'multiple' && empty($var_data['visual_timefield_year'])){ + $this->timeFiled = "utctime"; + }elseif($var_data['visual_timefield_model'] == 'custom' && empty($var_data['visual_timefield_custom'])) { + $this->timeFiled = "utctime"; + } + } + if(isset($var_data['data']) && !empty($var_data['data'])) $this->sql = $this->makeSql($var_data['data'],$this->subdataset); else