|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import React, {Component} from "react";
|
|
|
|
|
import {Link, NavLink} from 'react-router-dom';
|
|
|
|
|
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
|
|
|
|
|
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import {
|
|
|
|
|
notification,
|
|
|
|
@ -13,11 +13,12 @@ import {
|
|
|
|
|
Input,
|
|
|
|
|
Select,
|
|
|
|
|
Cascader,
|
|
|
|
|
Col, Row, InputNumber, DatePicker, AutoComplete,Button,Tag
|
|
|
|
|
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag
|
|
|
|
|
} from "antd";
|
|
|
|
|
import './../questioncss/questioncom.css';
|
|
|
|
|
|
|
|
|
|
const InputGroup = Input.Group;
|
|
|
|
|
const { Option } = Select;
|
|
|
|
|
const {Option} = Select;
|
|
|
|
|
const options = [
|
|
|
|
|
{
|
|
|
|
|
value: '方向',
|
|
|
|
@ -40,28 +41,30 @@ const options = [
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
class Itembankstop extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.contentMdRef = React.createRef()
|
|
|
|
|
this.state = {
|
|
|
|
|
page:1,
|
|
|
|
|
Knowpoints:[],
|
|
|
|
|
rbtx:undefined,
|
|
|
|
|
rbkc:undefined,
|
|
|
|
|
knowledgepoints:[],
|
|
|
|
|
options:[],
|
|
|
|
|
page: 1,
|
|
|
|
|
Knowpoints: [],
|
|
|
|
|
rbtx: undefined,
|
|
|
|
|
rbkc: undefined,
|
|
|
|
|
knowledgepoints: [],
|
|
|
|
|
options: [],
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
try {
|
|
|
|
|
this.props.getcontentMdRef(this);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
options:this.props.disciplmy
|
|
|
|
|
options: this.props.disciplmy
|
|
|
|
|
})
|
|
|
|
|
// knowledgepoints:this.props.knowledgepoints,
|
|
|
|
|
|
|
|
|
@ -80,63 +83,122 @@ class Itembankstop extends Component {
|
|
|
|
|
// 题型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
|
// //console.log("componentDidUpdate");
|
|
|
|
|
// //console.log(prevProps);
|
|
|
|
|
// //console.log(this.props.item_banksedit);
|
|
|
|
|
|
|
|
|
|
if(prevProps.item_banksedit !== this.props.item_banksedit){
|
|
|
|
|
if(this.props.item_banksedit.item_type){
|
|
|
|
|
if (prevProps.item_banksedit !== this.props.item_banksedit) {
|
|
|
|
|
if (this.props.item_banksedit.item_type) {
|
|
|
|
|
this.handleFormtixing(this.props.item_banksedit.item_type);
|
|
|
|
|
}
|
|
|
|
|
if(this.props.item_banksedit.difficulty){
|
|
|
|
|
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
|
|
|
|
|
}
|
|
|
|
|
if (this.props.item_banksedit.difficulty) {
|
|
|
|
|
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
|
|
|
|
|
}
|
|
|
|
|
if (this.props.item_banksedit.tag_disciplines) {
|
|
|
|
|
this.handletag_disciplinesChange(this.props.item_banksedit.tag_disciplines);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline) {
|
|
|
|
|
this.handdisciplinesChange(this.props.item_banksedit.discipline,this.props.item_banksedit.sub_discipline);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (prevProps.disciplmy !== this.props.disciplmy) {
|
|
|
|
|
this.setState({
|
|
|
|
|
options: this.props.disciplmy
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if(prevProps.knowledgepoints !== this.props.knowledgepoints){
|
|
|
|
|
// this.setState({
|
|
|
|
|
// knowledgepoints:this.props.knowledgepoints
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
handdisciplinesChange =(name,title)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
rbkc:[name.id,title.id]
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbkc: [name.id,title.id],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if(this.props.item_banksedit.tag_disciplines.length===0){
|
|
|
|
|
const didata = this.props.disciplinesdata;
|
|
|
|
|
const knowledgepointsdata = [];
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < didata.length; i++) {
|
|
|
|
|
//方向
|
|
|
|
|
if (name.id === didata[i].id) {
|
|
|
|
|
const fxdidata = didata[i].sub_disciplines;
|
|
|
|
|
for (var j = 0; j < fxdidata.length; j++) {
|
|
|
|
|
//课程
|
|
|
|
|
if (title.id === fxdidata[j].id) {
|
|
|
|
|
const zsddata = fxdidata[j].tag_disciplines;
|
|
|
|
|
for (var k = 0; k < zsddata.length; k++) {
|
|
|
|
|
//知识点
|
|
|
|
|
knowledgepointsdata.push(zsddata[k]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(prevProps.disciplmy !== this.props.disciplmy){
|
|
|
|
|
this.setState({
|
|
|
|
|
options:this.props.disciplmy
|
|
|
|
|
Knowpoints: [],
|
|
|
|
|
knowledgepoints: knowledgepointsdata,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
onChange=(e)=> {
|
|
|
|
|
////console.log(`checked = ${e.target.checked}`);
|
|
|
|
|
handletag_disciplinesChange = (data) => {
|
|
|
|
|
try {
|
|
|
|
|
var sju=data[data.length-1].name;
|
|
|
|
|
this.setState({
|
|
|
|
|
rbzsd:sju,
|
|
|
|
|
Knowpoints:data,
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbzsd: sju,
|
|
|
|
|
});
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Getdatas=()=>{
|
|
|
|
|
return this.handleSubmits();
|
|
|
|
|
onChange = (e) => {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Getdatas = () => {
|
|
|
|
|
return this.handleSubmits();
|
|
|
|
|
}
|
|
|
|
|
handleSubmits=()=>{
|
|
|
|
|
var data=[];
|
|
|
|
|
handleSubmits = () => {
|
|
|
|
|
var data = [];
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
data=[]
|
|
|
|
|
data = []
|
|
|
|
|
if (!err) {
|
|
|
|
|
// ////console.log("获取的form 数据");
|
|
|
|
|
// ////console.log(values);
|
|
|
|
|
data.push({
|
|
|
|
|
rbnd:parseInt(values.rbnd)
|
|
|
|
|
rbnd: parseInt(values.rbnd)
|
|
|
|
|
})
|
|
|
|
|
data.push({
|
|
|
|
|
rbtx:values.rbtx
|
|
|
|
|
rbtx: values.rbtx
|
|
|
|
|
})
|
|
|
|
|
data.push({
|
|
|
|
|
rbzsd:this.state.Knowpoints
|
|
|
|
|
rbzsd: this.state.Knowpoints
|
|
|
|
|
})
|
|
|
|
|
data.push({
|
|
|
|
|
rbkc:values.rbkc
|
|
|
|
|
rbkc: values.rbkc
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -145,7 +207,7 @@ class Itembankstop extends Component {
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
handleSubmit=(e)=>{
|
|
|
|
|
handleSubmit = (e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
if (!err) {
|
|
|
|
@ -158,76 +220,81 @@ class Itembankstop extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleFormLayoutChange=(value)=>{
|
|
|
|
|
handleFormLayoutChange = (value) => {
|
|
|
|
|
//难度塞选
|
|
|
|
|
////console.log("难度塞选");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbnd:value+"",
|
|
|
|
|
rbnd: value + "",
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
rbnd:value+"",
|
|
|
|
|
rbnd: value + "",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
handleFormkechen=(value)=>{
|
|
|
|
|
handleFormkechen = (value) => {
|
|
|
|
|
//课程
|
|
|
|
|
////console.log("课程");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
var valuename=undefined;
|
|
|
|
|
var valuename = undefined;
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbzsd:value,
|
|
|
|
|
rbzsd: value,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var arr= this.state.knowledgepoints;
|
|
|
|
|
for(let data of arr) {
|
|
|
|
|
if(data.id===value){
|
|
|
|
|
var arr = this.state.knowledgepoints;
|
|
|
|
|
for (let data of arr) {
|
|
|
|
|
if (data.id === value) {
|
|
|
|
|
this.state.Knowpoints.push(data);
|
|
|
|
|
valuename=data.name;
|
|
|
|
|
valuename = data.name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tmp = JSON.parse(JSON.stringify(this.state.knowledgepoints));
|
|
|
|
|
for(var i=0;i<tmp.length;i++){
|
|
|
|
|
if(tmp[i].id===value) {
|
|
|
|
|
for (var i = 0; i < tmp.length; i++) {
|
|
|
|
|
if (tmp[i].id === value) {
|
|
|
|
|
this.state.knowledgepoints.splice(i, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
rbzsd:valuename,
|
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
|
knowledgepoints:this.state.knowledgepoints,
|
|
|
|
|
rbzsd: valuename,
|
|
|
|
|
Knowpoints: this.state.Knowpoints,
|
|
|
|
|
knowledgepoints: this.state.knowledgepoints,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleFormzhishidian=(value)=>{
|
|
|
|
|
handleFormzhishidian = (value) => {
|
|
|
|
|
console.log("handleFormzhishidian 课程");
|
|
|
|
|
console.log(value);
|
|
|
|
|
|
|
|
|
|
//课程
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbkc:value,
|
|
|
|
|
rbkc: value,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
rbkc:value,
|
|
|
|
|
})
|
|
|
|
|
// console.log("handleFormzhishidian");
|
|
|
|
|
// console.log(this.props.disciplinesdata);
|
|
|
|
|
|
|
|
|
|
const didata = this.props.disciplinesdata;
|
|
|
|
|
const knowledgepointsdata=[];
|
|
|
|
|
const knowledgepointsdata = [];
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < didata.length; i++) {
|
|
|
|
|
//方向
|
|
|
|
|
if(value[0]===didata[i].id){
|
|
|
|
|
if (value[0] === didata[i].id) {
|
|
|
|
|
const fxdidata = didata[i].sub_disciplines;
|
|
|
|
|
for (var j = 0; j < fxdidata.length; j++) {
|
|
|
|
|
//课程
|
|
|
|
|
if(value[1]===fxdidata[j].id){
|
|
|
|
|
const zsddata = fxdidata[j].tag_disciplines;
|
|
|
|
|
for (var k = 0; k < zsddata.length; k++) {
|
|
|
|
|
//知识点
|
|
|
|
|
knowledgepointsdata.push(zsddata[k]);
|
|
|
|
|
if (value[1] === fxdidata[j].id) {
|
|
|
|
|
const zsddata = fxdidata[j].tag_disciplines;
|
|
|
|
|
for (var k = 0; k < zsddata.length; k++) {
|
|
|
|
|
//知识点
|
|
|
|
|
knowledgepointsdata.push(zsddata[k]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -238,71 +305,71 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Knowpoints:[],
|
|
|
|
|
knowledgepoints:knowledgepointsdata,
|
|
|
|
|
Knowpoints: [],
|
|
|
|
|
knowledgepoints: knowledgepointsdata,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbzsd:undefined,
|
|
|
|
|
rbzsd: undefined,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
rbzsd:undefined,
|
|
|
|
|
rbzsd: undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleFormtixing=(value)=>{
|
|
|
|
|
//题型
|
|
|
|
|
handleFormtixing = (value) => {
|
|
|
|
|
//题型
|
|
|
|
|
//console.log("题型");
|
|
|
|
|
//console.log(value);
|
|
|
|
|
this.setState({
|
|
|
|
|
rbtx:value+"",
|
|
|
|
|
rbtx: value + "",
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbtx:value+"",
|
|
|
|
|
rbtx: value + "",
|
|
|
|
|
});
|
|
|
|
|
this.props.setitem_type(value);
|
|
|
|
|
this.props.setitem_type(value);
|
|
|
|
|
}
|
|
|
|
|
preventDefault=(e)=> {
|
|
|
|
|
preventDefault = (e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
////console.log('Clicked! But prevent default.');
|
|
|
|
|
}
|
|
|
|
|
deletesobject=(item,index)=>{
|
|
|
|
|
var arr= this.state.Knowpoints ;
|
|
|
|
|
for(let data of arr) {
|
|
|
|
|
if(data.id===item.id){
|
|
|
|
|
deletesobject = (item, index) => {
|
|
|
|
|
var arr = this.state.Knowpoints;
|
|
|
|
|
for (let data of arr) {
|
|
|
|
|
if (data.id === item.id) {
|
|
|
|
|
this.state.knowledgepoints.push(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var tmp = JSON.parse(JSON.stringify(this.state.Knowpoints));
|
|
|
|
|
for(var i=0;i<tmp.length;i++){
|
|
|
|
|
if(i>=index){
|
|
|
|
|
for (var i = 0; i < tmp.length; i++) {
|
|
|
|
|
if (i >= index) {
|
|
|
|
|
var pos = this.state.Knowpoints.indexOf(tmp[i]);
|
|
|
|
|
this.state.Knowpoints.splice(pos, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbzsd:this.state.Knowpoints,
|
|
|
|
|
rbzsd: this.state.Knowpoints,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
|
Knowpoints: this.state.Knowpoints,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if(this.state.Knowpoints.length===0){
|
|
|
|
|
if (this.state.Knowpoints.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
rbzsd:undefined,
|
|
|
|
|
rbzsd: undefined,
|
|
|
|
|
})
|
|
|
|
|
} else if(this.state.Knowpoints.length>0){
|
|
|
|
|
} else if (this.state.Knowpoints.length > 0) {
|
|
|
|
|
try {
|
|
|
|
|
const myknowda=this.state.Knowpoints;
|
|
|
|
|
const myknowda = this.state.Knowpoints;
|
|
|
|
|
this.setState({
|
|
|
|
|
rbzsd:myknowda[this.state.Knowpoints.length-1].name,
|
|
|
|
|
rbzsd: myknowda[this.state.Knowpoints.length - 1].name,
|
|
|
|
|
})
|
|
|
|
|
}catch (e) {
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -311,17 +378,16 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {page,options}=this.state;
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
|
let {page, options} = this.state;
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
//console.log("renderrenderrender");
|
|
|
|
|
//console.log(this.props.item_banksedit);
|
|
|
|
|
//console.log("renderrenderrendersssss");
|
|
|
|
|
//console.log(this.state.rbtx);
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19" >
|
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19">
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
@ -353,61 +419,59 @@ class Itembankstop extends Component {
|
|
|
|
|
</style>
|
|
|
|
|
<div className="h12"></div>
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="课程"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator("rbkc",
|
|
|
|
|
{
|
|
|
|
|
rules: [{ required: true, message: '请选择课程' }],
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<InputGroup compact >
|
|
|
|
|
<Cascader style={{ width: '258px' }} options={options} onChange={this.handleFormzhishidian} placeholder="请选择..." />
|
|
|
|
|
</InputGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*<div className="sortinxdirection" style={{*/}
|
|
|
|
|
{/* height: "33px",*/}
|
|
|
|
|
{/* lineHeight: "28px",*/}
|
|
|
|
|
|
|
|
|
|
{/*}}>*/}
|
|
|
|
|
|
|
|
|
|
{/* {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {*/}
|
|
|
|
|
{/* return (*/}
|
|
|
|
|
{/* <div className="mytags" style={{*/}
|
|
|
|
|
{/* position: "relative",*/}
|
|
|
|
|
{/* }}>*/}
|
|
|
|
|
{/* <p className="w100s stestcen lh32">{object}</p>*/}
|
|
|
|
|
{/* <i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss" onClick={()=>this.deletesobject(object,index)}></i>*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/* )*/}
|
|
|
|
|
{/* })}*/}
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="课程"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator("rbkc",
|
|
|
|
|
{
|
|
|
|
|
rules: [{required: true, message: '请选择课程'}],
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<InputGroup compact>
|
|
|
|
|
<Cascader style={{width: '258px'}} value={this.state.rbkc} options={options} onChange={this.handleFormzhishidian}
|
|
|
|
|
placeholder="请选择..."/>
|
|
|
|
|
</InputGroup>
|
|
|
|
|
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form onSubmit={this.handleSubmit}>
|
|
|
|
|
{/*<div className="sortinxdirection" style={{*/}
|
|
|
|
|
{/* height: "33px",*/}
|
|
|
|
|
{/* lineHeight: "28px",*/}
|
|
|
|
|
|
|
|
|
|
{/*}}>*/}
|
|
|
|
|
|
|
|
|
|
{/* {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {*/}
|
|
|
|
|
{/* return (*/}
|
|
|
|
|
{/* <div className="mytags" style={{*/}
|
|
|
|
|
{/* position: "relative",*/}
|
|
|
|
|
{/* }}>*/}
|
|
|
|
|
{/* <p className="w100s stestcen lh32">{object}</p>*/}
|
|
|
|
|
{/* <i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss" onClick={()=>this.deletesobject(object,index)}></i>*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/* )*/}
|
|
|
|
|
{/* })}*/}
|
|
|
|
|
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form onSubmit={this.handleSubmit}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="知识点"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator("rbzsd",
|
|
|
|
|
{
|
|
|
|
|
rules: [{ required: true, message: '请选择知识点' }],
|
|
|
|
|
}
|
|
|
|
|
{getFieldDecorator("rbzsd"
|
|
|
|
|
)(
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<InputGroup compact >
|
|
|
|
|
<Select style={{ width: '258px' }} value={this.state.rbzsd} onChange={this.handleFormkechen} placeholder="请选择...">
|
|
|
|
|
{this.state.knowledgepoints&&this.state.knowledgepoints.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option value={object.id}>{object.name}</Option>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</Select>
|
|
|
|
|
</InputGroup>
|
|
|
|
|
<InputGroup compact>
|
|
|
|
|
<Select style={{width: '258px'}} value={this.state.rbzsd} onChange={this.handleFormkechen}
|
|
|
|
|
placeholder="请选择...">
|
|
|
|
|
{this.state.knowledgepoints && this.state.knowledgepoints.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option value={object.id}>{object.name}</Option>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</Select>
|
|
|
|
|
</InputGroup>
|
|
|
|
|
<div className="sortinxdirection" style={{
|
|
|
|
|
height: "33px",
|
|
|
|
|
lineHeight: "28px",
|
|
|
|
@ -420,7 +484,8 @@ class Itembankstop extends Component {
|
|
|
|
|
position: "relative",
|
|
|
|
|
}}>
|
|
|
|
|
<p className="w100s stestcen lh32">{object.name}</p>
|
|
|
|
|
<i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss" onClick={()=>this.deletesobject(object,index)}></i>
|
|
|
|
|
<i className="iconfont icon-roundclose font-25 lg ml7 icondowncolorss"
|
|
|
|
|
onClick={() => this.deletesobject(object, index)}></i>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
@ -435,11 +500,12 @@ class Itembankstop extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator("rbtx",
|
|
|
|
|
{
|
|
|
|
|
rules: [{ required: true, message: '请选择题型'}],
|
|
|
|
|
rules: [{required: true, message: '请选择题型'}],
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
<InputGroup compact>
|
|
|
|
|
<Select style={{ width: '258px' }} value={this.state.rbtx} onChange={this.handleFormtixing} placeholder="请选择...">
|
|
|
|
|
<Select style={{width: '258px'}} value={this.state.rbtx} onChange={this.handleFormtixing}
|
|
|
|
|
placeholder="请选择...">
|
|
|
|
|
<Option value="SINGLE">单选题</Option>
|
|
|
|
|
<Option value="MULTIPLE">多选题</Option>
|
|
|
|
|
<Option value="JUDGMENT">判断题</Option>
|
|
|
|
@ -504,20 +570,19 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="rbndclass">
|
|
|
|
|
<Form.Item label="难度">
|
|
|
|
|
{getFieldDecorator('rbnd',
|
|
|
|
|
{
|
|
|
|
|
rules: [{ required: true, message: '请选择难度'}],
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
|
|
|
|
|
<Radio.Group value={this.state.rbnd} onChange={this.handleFormLayoutChange} >
|
|
|
|
|
<Radio.Button value="1">简单</Radio.Button>
|
|
|
|
|
<Radio.Button value="2">适中</Radio.Button>
|
|
|
|
|
<Radio.Button value="3">困难</Radio.Button>
|
|
|
|
|
</Radio.Group>,
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label="难度">
|
|
|
|
|
{getFieldDecorator('rbnd',
|
|
|
|
|
{
|
|
|
|
|
rules: [{required: true, message: '请选择难度'}],
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
<Radio.Group value={this.state.rbnd} onChange={this.handleFormLayoutChange}>
|
|
|
|
|
<Radio.Button value="1">简单</Radio.Button>
|
|
|
|
|
<Radio.Button value="2">适中</Radio.Button>
|
|
|
|
|
<Radio.Button value="3">困难</Radio.Button>
|
|
|
|
|
</Radio.Group>,
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</div>
|
|
|
|
|
{/*<Form.Item>*/}
|
|
|
|
|
{/* <Button type="primary" htmlType="submit" className="login-form-button">*/}
|
|
|
|
@ -533,7 +598,7 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const Itembankstops = Form.create({ name: 'Itembankstops' })(Itembankstop);
|
|
|
|
|
|
|
|
|
|
const Itembankstops = Form.create({name: 'Itembankstops'})(Itembankstop);
|
|
|
|
|
export default Itembankstops;
|
|
|
|
|