| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 | import React from 'react';import { Button, Radio } from 'antd';import './content.less';import { getTime } from '../../../../tools';import OrgTechCenter from './orgTechCenter';const Content = React.createClass({    getInitialState() {        return {            loading: false,            component: OrgTechCenter        };    },    returnFoster() {        this.props.returnBtn();    },    onChange(e) {        switch (e.target.value) {            case 'orgTechCenter':                this.setState({                    component: OrgTechCenter,                    radioValue: 'orgTechCenter'                });                break;            case 'activity':                require.ensure([], () => {                    const Activity = require('./activity').default;                    this.setState({                        component: Activity,                        radioValue: 'activity'                    });                });                break;            case 'activityCostList':                require.ensure([], () => {                    const ActivityCostList = require('./activityCostList').default;                    this.setState({                        component: ActivityCostList,                        radioValue: 'activityCostList'                    });                });                break;            case 'techProduct':                require.ensure([], () => {                    const TechProduct = require('./techProduct').default;                    this.setState({                        component: TechProduct,                        radioValue: 'techProduct'                    });                });                break;            case 'intellectual':                require.ensure([], () => {                    const Intellectual = require('./intellectual').default;                    this.setState({                        component: Intellectual,                        radioValue: 'intellectual'                    });                });                break;            case 'achievement':                require.ensure([], () => {                    const Achievement = require('./achievement').default;                    this.setState({                        component: Achievement,                        radioValue: 'achievement'                    });                });                break;            case 'ratepay':                require.ensure([], () => {                    const Ratepay = require('./ratepay').default;                    this.setState({                        component: Ratepay,                        radioValue: 'ratepay'                    });                });                break;            case 'finance':                require.ensure([], () => {                    const Finance = require('./finance').default;                    this.setState({                        component: Finance,                        radioValue: 'finance'                    });                });                break;            case 'hrSituation':                require.ensure([], () => {                    const HrSituation = require('./hrSituation').default;                    this.setState({                        component: HrSituation,                        radioValue: 'hrSituation'                    });                });                break;            case 'honorList':                require.ensure([], () => {                    const HonorList = require('./honorList').default;                    this.setState({                        component: HonorList,                        radioValue: 'honorList'                    });                });                break;            case 'standard':                require.ensure([], () => {                    const Standard = require('./standard').default;                    this.setState({                        component: Standard,                        radioValue: 'standard'                    });                });                break;            case 'innovationAbility':                require.ensure([], () => {                    const InnovationAbility = require('./innovationAbility').default;                    this.setState({                        component: InnovationAbility,                        radioValue: 'innovationAbility'                    });                });                break;            case 'annualReport':                require.ensure([], () => {                    const AnnualReport = require('./annualReport').default;                    this.setState({                        component: AnnualReport,                        radioValue: 'annualReport'                    });                });                break;        };    },    componentWillReceiveProps(nextProps) {        if (nextProps.style === "block") {            let e = { target: { value: "orgTechCenter" } }            this.onChange(e);        };    },    render() {        if (this.props.data) {            return (                <div className="foster-desc" style={{ display: this.props.style }}>                    <div className="content-tabs">                        <div className="foster-title">                            <span className="company-name">{this.props.data.unitName}</span>                            <span className="company-number">{this.props.data.certificateNumber || ''}</span>                            {this.props.data.issuingDate ?                                <span className="company-time"> 有效期 {getTime(this.props.data.issuingDate)} 至 {getTime(this.props.data.issuingDate, 36)} </span> : ''                            }                            <Button className="foster-return" type="primary" onClick={this.returnFoster}>返回高企培育列表</Button>                        </div>                        <div className="clearfix foster-component">                            <Radio.Group onChange={this.onChange} value={this.state.radioValue}>                                <Radio.Button value="orgTechCenter">技术中心</Radio.Button>                                <Radio.Button value="activity">研发活动</Radio.Button>                                <Radio.Button value="activityCostList">研发活动费用详情</Radio.Button>                                <Radio.Button value="techProduct">高新技术产品</Radio.Button>                                <Radio.Button value="intellectual">知识产权</Radio.Button>                                <Radio.Button value="achievement">科技成果转化</Radio.Button>                                <Radio.Button value="ratepay">企业纳税申报</Radio.Button>                                <Radio.Button value="finance">财务报表</Radio.Button>                                <Radio.Button value="hrSituation">企业人员情况</Radio.Button>                                <Radio.Button value="honorList">企业荣誉及其他证明材料</Radio.Button>                                <Radio.Button value="standard">标准制定情况</Radio.Button>                                <Radio.Button value="innovationAbility">企业创新能力</Radio.Button>                                <Radio.Button value="annualReport">年报</Radio.Button>                            </Radio.Group>                        </div>                    </div>                    <div className="content-desc">                        <this.state.component data={this.props.data} />                    </div>                </div>            )        } else {            return (                <div></div>            )        }    }});export default Content;
 |