|
|
|
@ -1,12 +1,13 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import {getImageUrl} from 'educoder';
|
|
|
|
|
import {Modal,Input} from 'antd';
|
|
|
|
|
import {Modal,Input,Form,Radio} from 'antd';
|
|
|
|
|
class Addshixuns extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
shixunname:undefined,
|
|
|
|
|
shixunzero:false
|
|
|
|
|
shixunzero:false,
|
|
|
|
|
is_jupyter:"1"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,12 +53,22 @@ class Addshixuns extends Component {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.props.Setaddshixuns(shixunname);
|
|
|
|
|
|
|
|
|
|
let is_jupyter=this.state.is_jupyter==="1"?false:true
|
|
|
|
|
this.props.Setaddshixuns(shixunname,is_jupyter);
|
|
|
|
|
this.props.modalCancel();
|
|
|
|
|
}
|
|
|
|
|
GrouponChange = e => {
|
|
|
|
|
this.setState({
|
|
|
|
|
is_jupyter: e.target.value,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
const formItemLayout = {
|
|
|
|
|
labelCol: { span: 4 },
|
|
|
|
|
wrapperCol: { span: 14 },
|
|
|
|
|
};
|
|
|
|
|
return(
|
|
|
|
|
<Modal
|
|
|
|
|
className={this.props.className}
|
|
|
|
@ -81,6 +92,14 @@ class Addshixuns extends Component {
|
|
|
|
|
</style>:""}
|
|
|
|
|
|
|
|
|
|
<div className="task-popup-content">
|
|
|
|
|
<Form {...formItemLayout}>
|
|
|
|
|
<Form.Item label="实训类型">
|
|
|
|
|
<Radio.Group value={this.state.is_jupyter} onChange={this.GrouponChange}>
|
|
|
|
|
<Radio value="1">普通实训</Radio>
|
|
|
|
|
<Radio value="2">jupyter实训</Radio>
|
|
|
|
|
</Radio.Group>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
<p className="task-popup-text-center font-16">
|
|
|
|
|
<span style={{ "line-height":"30px"}}>实训名称:</span>
|
|
|
|
|
<span><Input style={{ width:"80%"}} className="yslzxueshisy " placeholder="请输入60字以内的实训名称" onChange={this.handleChange} addonAfter={String(this.state.shixunname===undefined?0:this.state.shixunname.length)+"/60"} maxLength={60} />
|
|
|
|
|