Browse Source

【BUG】创建报表时选择图表筛选时间报错

zhuth 6 years ago
parent
commit
47b6f563d7

+ 1 - 1
src/components/dashboardDesigner/chooseChartBox.jsx

@@ -69,7 +69,7 @@ class ChooseChartBox extends React.Component {
                 }else if(filterLabel.indexOf('#')>-1){
                 }else if(filterLabel.indexOf('#')>-1){
                     let start = filterLabel.split('#')[0]
                     let start = filterLabel.split('#')[0]
                     let end = filterLabel.split('#')[1]
                     let end = filterLabel.split('#')[1]
-                    let nowTime = o[filterItem.name].getTime();
+                    let nowTime = new Date(o[filterItem.name]).getTime();
                     if(nowTime>=start && nowTime<=end){
                     if(nowTime>=start && nowTime<=end){
                         return o;
                         return o;
                     }
                     }

+ 1 - 2
src/components/homePage/collection.jsx

@@ -1,7 +1,6 @@
 import React from 'react'
 import React from 'react'
 import { connect } from 'dva'
 import { connect } from 'dva'
 import { Collapse, Icon } from 'antd'
 import { Collapse, Icon } from 'antd'
-import EmptyContent from '../common/emptyContent/index'
 import './collection.less'
 import './collection.less'
 
 
 class Collection extends React.Component {
 class Collection extends React.Component {
@@ -51,7 +50,7 @@ class Collection extends React.Component {
                 </li>
                 </li>
             ));
             ));
         }else {
         }else {
-            return <EmptyContent />
+            return null
         }
         }
     }
     }