|
|
@@ -11,7 +11,7 @@ moment.suppressDeprecationWarnings = true;
|
|
|
class EchartsView extends Component {
|
|
|
render() {
|
|
|
const { chartOption, inDashBoard, item } = this.props;
|
|
|
- if(!chartOption || ((!chartOption.series || chartOption.series.length === 0) && (!chartOption.baseOption || !chartOption.baseOption.series || chartOption.baseOption.series.length === 0))) {
|
|
|
+ if(!chartOption || ((!chartOption.series || chartOption.series.length === 0 || !chartOption.series[0].data || chartOption.series[0].data.length === 0) && (!chartOption.baseOption || !chartOption.baseOption.series || chartOption.baseOption.series.length === 0 || !chartOption.baseOption.series[0].data || chartOption.baseOption.series[0].data.length === 0))) {
|
|
|
return <EmptyContent />
|
|
|
}else {
|
|
|
const { baseOption } = chartOption;
|
|
|
@@ -289,11 +289,6 @@ class EchartsView extends Component {
|
|
|
let month = value.split('/')[1];
|
|
|
let year = value.split('/')[0];
|
|
|
|
|
|
- /* 对月数进行格式化 */
|
|
|
- if(month < 10){
|
|
|
- month = '0' + month
|
|
|
- }
|
|
|
-
|
|
|
return {
|
|
|
value1: moment(`${year}-${month}-01`).format('YYYY-MM'),
|
|
|
value2: '',
|
|
|
@@ -314,7 +309,7 @@ class EchartsView extends Component {
|
|
|
}
|
|
|
case 'day':{
|
|
|
return {
|
|
|
- value1: moment(`${value}`).format('YYYY-MM-DD'),
|
|
|
+ value1: moment(value).format('YYYY-MM-DD'),
|
|
|
value2: '',
|
|
|
operator: '=',
|
|
|
operatorLabel: '等于'
|