Files
radar/webapp/component/report/dashboard.jsx
烈日下的从容 6a995b7a67 前端源码
Signed-off-by: 烈日下的从容 <wfh45678@163.com>
2019-09-23 18:01:53 +08:00

52 lines
1.4 KiB
JavaScript

import React from 'react';
import {Form,Button,Table,Pagination,Input,Select,Modal,DatePicker,Cascader} from 'antd';
import moment from 'moment';
const FormItem=Form.Item;
const Option = Select.Option;
const RangePicker = DatePicker.RangePicker;
import {FetchUtil} from '../utils/fetchUtil';
import {trim} from '../utils/validateUtil';
import './ListEvent.less';
export default class DashBoard extends React.Component{
constructor(props){
super(props);
this.state={
modelId:'',
loading:true,
modelList:[],
dashboardUrl:''
}
}
componentDidMount(){
if(!this.props.model.dashboardUrl){
Modal.warning({
title: '信息提醒',
content: '该模型统计报表未初始化!',
});
}
}
componentWillReceiveProps(nextProps){
if(this.props.modelId!=nextProps.modelId&&!nextProps.model.dashboardUrl){
Modal.warning({
title: '信息提醒',
content: '该模型统计报表未初始化!',
});
}
}
render(){
return (
<div className="ant-layout-content">
<iframe ref="dashBoard" name="dashBoard" src={this.props.model.dashboardUrl} style={{minHeight:'800px',width:'100%',border:'0px'}}></iframe>
</div>);
}
}