import React, { PureComponent } from 'react'; import { Spin } from 'antd'; import style from 'styled-components'; const store = require('store'); const welcomeImg = require('../../assets/images/welcome.jpg'); export default class System extends PureComponent { constructor(props, context) { super(props, context); this.state = { loading: false }; } componentDidMount = () => { // 隐藏左侧菜单栏 document.querySelector('.ant-layout-sider').style.display = 'none'; document.querySelector('.ant-layout-content').style.margin = '0px'; document.querySelector('.oneKeySearchHidden').style.display = 'none'; window.open(store.get('PublicSafetySystemURL')['PublicSafetySystemURL']) // 判断iframe是否加载完毕 // const iframe = this.refs.iframe; // const that = this; // if (iframe.attachEvent) { // iframe.attachEvent('onload', function() { // that.setState({ // loading: false // }); // }); // } else { // iframe.onload = function() { // that.setState({ // loading: false // }); // }; // } }; componentWillUnmount() { // 显示左侧菜单栏 document.querySelector('.ant-layout-sider').style.display = 'block'; document.querySelector('.ant-layout-content').style.margin = '16px'; document.querySelector('.oneKeySearchHidden').style.display = 'block'; } render() { return ( {store.get('PublicSafetySystemURL') !== undefined ? (
{`请前往新窗口查看`}
{/* */}
) : ( '' )}
); } } const Container = style.div` width:100%; height:100%; `;