import React, { Component } from 'react'; import st from 'styled-components'; import { connect } from 'dva'; import { withRouter } from 'dva/router'; import { Button, Alert, Popover, Form, Tabs, Icon, Upload, message, Modal } from 'antd'; import BTable from '../../../../components/Pro/BTable'; import SearchForm from './SearchForm'; import columnFun from './columns'; import SubDrawer from './SubDrawer'; import { grade_importIdentityTemplate } from '../../../../services/bkt/apis'; // import $nModal from '../../../../utils/modal/nModal'; import $loading from '../../../../utils/loading'; // import Uploader from '../../../../components/form/upload/Uploader'; import store from 'store'; const formItemLayout = { labelCol: { span: 7 }, wrapperCol: { span: 17 } }; const { TabPane } = Tabs; @connect(state => ({ global: state.global })) @withRouter @Form.create() export default class StudentManagement extends Component { constructor(props, context) { super(props, context); this.state = { uploadVisible: false, //导入等级证数据模态框 fileList: [], forceUpdate: false, //刷新数据 // 搜索部分 searchData: { // 表格数据请求参数 pageNumber: 1, // 页 pageSize: 10 //条目 }, //抽屉 drawerVisble: false, personApplyId: '', //当前选中的id }; } componentDidMount() { //获取部门树数据 // this.__getDepart(); // this.__getTable(this.state.searchData, data => { // }); } _search = values => { this.setState({ searchData: { ...this.state.searchData, ...values }, isInit: true }); } _updateTable = () => { this.setState({ forceUpdate: true }, () => { this.setState({ forceUpdate: false }); }); } // 表格渲染 renderOrderList = () => { const columns = columnFun.call(this); if (!this.state.isInit) return; return ( { }} /> ); }; render() { return (
材料核对:您需要为每一条报名记录核对材料信息;若核对不通过,将终止该学员继续学习课程;若核对通过,则该学员可以继续学习。
} type="warning" showIcon style={{ marginBottom: '15px' }} /> {/* 导出人员数据数据 */} 搜索后可导出搜索结果

} title="温馨提示:">
{/* 表格 */} {this.renderOrderList()} {/* 修改弹窗 */} { // this.setState({ // personApplyId: '' // }); // }} /> { const { fileList } = this.state; if(fileList.length == 0) { return message.error(`请选择文件!`); } const formData = new FormData(); formData.append('xfile', fileList[0]); $loading.open('文件上传中,请稍后。。。'); grade_importIdentityTemplate(formData).then(res => { $loading.close(); this.setState({ uploadVisible: false, fileList: [] }); }).catch(ex => { $loading.close(); console.log(ex); }); }} onCancel={() => { this.setState({ uploadVisible: false }); }} >
{ let canUpload = true; const reg = /(\.doc$)|(\.docx$)|(\.xlsx$)|(\.xls$)/; if (!(file.name + '').toLocaleLowerCase().match(reg)) { message.error(`请上传拓展名为 .doc .docx .xlsx .xls的文件!`); canUpload = false; } return canUpload; }} onRemove={() => { this.setState({ fileList: [] }); }} customRequest={({ file }) => { this.setState({ fileList: [file] }); }} > 支持拓展名:.doc .docx .xlsx .xls
); } } const Btns = st.div` margin-top: 15px; button { margin-right: 15px; } `;