diff --git a/public/react/src/modules/courses/signin/model/Createsignmodel.js b/public/react/src/modules/courses/signin/model/Createsignmodel.js new file mode 100644 index 000000000..e57346519 --- /dev/null +++ b/public/react/src/modules/courses/signin/model/Createsignmodel.js @@ -0,0 +1,114 @@ +import React from 'react' +import { Modal ,Form} from 'antd'; + +const CollectionCreateForm = Form.create({ name: 'form_in_modal' })( + // eslint-disable-next-line + class extends React.Component { + render() { + const { visible, onCancel, onCreate, form } = this.props; + const { getFieldDecorator } = form; + return ( + +
+ + {getFieldDecorator('title', { + rules: [{ required: true, message: 'Please input the title of collection!' }], + })()} + + + {getFieldDecorator('description')()} + + + {getFieldDecorator('modifier', { + initialValue: 'public', + })( + + Public + Private + , + )} + +
+
+ ); + } + }, +); + +class CollectionsPage extends React.Component { + state = { + visible: false, + }; + + showModal = () => { + this.setState({ visible: true }); + }; + + handleCancel = () => { + this.setState({ visible: false }); + }; + + handleCreate = () => { + const { form } = this.formRef.props; + form.validateFields((err, values) => { + if (err) { + return; + } + + console.log('Received values of form: ', values); + form.resetFields(); + this.setState({ visible: false }); + }); + }; + + saveFormRef = formRef => { + this.formRef = formRef; + }; + + render() { + return ( +
+ + + +
+ ); + } +} + +export default class Createsignmodel extends React.Component { + constructor(props) { + super(props) + } + + render() { + console.log(this.props) + return( + + {this.props.visible? +

Some contents...

+

Some contents...

+

Some contents...

+
:""} +
+ + ) + } + +} diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index 5a922f9b9..3fd81ac37 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -3,6 +3,7 @@ import '../css/signincdi.css'; import { Tabs } from 'antd'; import Teaccomponent from '../component/teachercomponent/Teaccomponent'; import Histeacomponent from '../component/teachercomponent/Histeacomponent'; +// import Createsignmodel from '../model/Createsignmodel' const { TabPane } = Tabs; //在线学习 class Students_signin extends Component{ @@ -10,7 +11,7 @@ class Students_signin extends Component{ super(props); this.state={ - + visible:false } } @@ -27,11 +28,20 @@ class Students_signin extends Component{ console.log(key); } + Createsign=()=>{ + this.setState({ + visible:true + }) + } render(){ return( + {/**/}
@@ -53,7 +63,7 @@ class Students_signin extends Component{
-

创建签到

+

this.Createsign()}>创建签到