/**
 * 编辑驻勤信息
 */
import React, { Component } from 'react';
import { connect } from 'dva';
import { withRouter } from 'dva/router';

import {
  Modal
} from "antd";

import CreateTaskInformation from '../CreateTask/CreateTaskInformation';

@connect(state => ({
  global: state.global
}))
@withRouter
export default class Uninsured extends Component {
  constructor(props, context) {
    super(props, context);
    this.state = {

    }
  }


  componentWillReceiveProps(props) {
    const { comTaskId, visible } = props;
    if(comTaskId && visible) {
      // taskGetThreePer
    }
  }
  componentDidMount() {

  }
  render() {
    const { comTaskId, visible, onCancel, history } = this.props;
    if(comTaskId) {
      return (
        <Modal
          title="驻勤信息"
          visible={visible}
          footer={null}
          width={'80%'}
          onCancel={onCancel}
        >
          <CreateTaskInformation 
            updateTable={this.props.updateTable}
            history={history} 
            dataSource={{comTaskId}}
            onClose={onCancel} 
          />
        </Modal>
      );
    }else {
      return ''
    }
  }
}
