import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react';
import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import styles from '../../CustomPages/HI/StepForm.css';
import { connect } from 'dva';
import config from "../../../config";

class BIView extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            data: null,
        };
    };

    componentDidMount() {
        let link = document.createElement('a')
        if (this.props.app.currActivatedMenu.NAME == "班前会议统计") {
            link.href = "http://localhost:3000/#/chart/preview/1?Tenant=" + this.props.login.Tenant + "&param=" + this.props.login.userId;
        } else {
            return;
        }
        link.target = "_blank";
        document.body.appendChild(link)
        link.click()
    }
    render() {
        return null;
    }
}

export default connect(({ login, app }) => ({ login, app }))(BIView) 