|
|
|
@ -99,10 +99,10 @@ class Itembankstop extends Component {
|
|
|
|
|
options: this.props.disciplmy,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
console.log("数据");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
//console.log("数据");
|
|
|
|
|
//console.log(this.props);
|
|
|
|
|
const parsed = queryString.parse(this.props.location.search);
|
|
|
|
|
console.log(parsed);
|
|
|
|
|
//console.log(parsed);
|
|
|
|
|
try {
|
|
|
|
|
if(JSON.stringify(parsed)==={}||JSON.stringify(parsed)==="{}"){
|
|
|
|
|
|
|
|
|
@ -156,7 +156,7 @@ class Itembankstop extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(prevProps.disciplinesdata!== this.props.disciplinesdata){
|
|
|
|
|
console.log("新增开始加载了")
|
|
|
|
|
//console.log("新增开始加载了")
|
|
|
|
|
try {
|
|
|
|
|
if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){
|
|
|
|
|
const didata = this.props.disciplinesdata;
|
|
|
|
@ -351,8 +351,8 @@ class Itembankstop extends Component {
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
data = []
|
|
|
|
|
if (!err) {
|
|
|
|
|
// ////console.log("获取的form 数据");
|
|
|
|
|
// ////console.log(values);
|
|
|
|
|
// //////console.log("获取的form 数据");
|
|
|
|
|
// //////console.log(values);
|
|
|
|
|
data.push({
|
|
|
|
|
rbnd: parseInt(values.rbnd)
|
|
|
|
|
})
|
|
|
|
@ -376,8 +376,8 @@ class Itembankstop extends Component {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
if (!err) {
|
|
|
|
|
////console.log("获取的form 数据");
|
|
|
|
|
////console.log(values);
|
|
|
|
|
//////console.log("获取的form 数据");
|
|
|
|
|
//////console.log(values);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -386,8 +386,8 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
handleFormLayoutChangeysl = (value) => {
|
|
|
|
|
//难度塞选
|
|
|
|
|
////console.log("难度塞选");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
//////console.log("难度塞选");
|
|
|
|
|
//////console.log(value);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbnd: value+ "",
|
|
|
|
|
});
|
|
|
|
@ -398,8 +398,8 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
handleFormLayoutChange = (e) => {
|
|
|
|
|
//难度塞选
|
|
|
|
|
////console.log("难度塞选");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
//////console.log("难度塞选");
|
|
|
|
|
//////console.log(value);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbnd: e.target.value + "",
|
|
|
|
|
});
|
|
|
|
@ -410,8 +410,8 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
handleFormkechen = (value) => {
|
|
|
|
|
//课程
|
|
|
|
|
////console.log("课程");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
//////console.log("课程");
|
|
|
|
|
//////console.log(value);
|
|
|
|
|
if(this.state.Knowpoints.length>4){
|
|
|
|
|
this.props.showNotification(`知识点最多选择5个`);
|
|
|
|
|
return
|
|
|
|
@ -432,8 +432,8 @@ class Itembankstop extends Component {
|
|
|
|
|
const _result =[];
|
|
|
|
|
this.state.knowledgepoints.filter(item => {
|
|
|
|
|
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
|
|
|
|
|
// console.log("guonue");
|
|
|
|
|
// console.log(item);
|
|
|
|
|
// //console.log("guonue");
|
|
|
|
|
// //console.log(item);
|
|
|
|
|
_result.push(item);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -448,8 +448,8 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleFormzhishidian = (value) => {
|
|
|
|
|
console.log("handleFormzhishidian 课程");
|
|
|
|
|
console.log(value);
|
|
|
|
|
//console.log("handleFormzhishidian 课程");
|
|
|
|
|
//console.log(value);
|
|
|
|
|
|
|
|
|
|
//课程
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
@ -458,8 +458,8 @@ class Itembankstop extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
rbkc:value,
|
|
|
|
|
})
|
|
|
|
|
// console.log("handleFormzhishidian");
|
|
|
|
|
// console.log(this.props.disciplinesdata);
|
|
|
|
|
// //console.log("handleFormzhishidian");
|
|
|
|
|
// //console.log(this.props.disciplinesdata);
|
|
|
|
|
|
|
|
|
|
const didata = this.props.disciplinesdata;
|
|
|
|
|
const knowledgepointsdata = [];
|
|
|
|
@ -503,8 +503,8 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
handleFormtixing = (value) => {
|
|
|
|
|
//题型
|
|
|
|
|
//console.log("题型");
|
|
|
|
|
//console.log(value);
|
|
|
|
|
////console.log("题型");
|
|
|
|
|
////console.log(value);
|
|
|
|
|
this.setState({
|
|
|
|
|
rbtx: value + "",
|
|
|
|
|
})
|
|
|
|
@ -515,7 +515,7 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
preventDefault = (e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
////console.log('Clicked! But prevent default.');
|
|
|
|
|
//////console.log('Clicked! But prevent default.');
|
|
|
|
|
}
|
|
|
|
|
deletesobject = (item, index) => {
|
|
|
|
|
|
|
|
|
@ -644,7 +644,7 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
//console.log(error);
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
@ -657,9 +657,9 @@ class Itembankstop extends Component {
|
|
|
|
|
let {page, options,NewknTypedel,knowledgepoints,knowledgepoints2,Knowpoints} = this.state;
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
|
|
|
|
|
// console.log("this.state.rbkc");
|
|
|
|
|
// console.log(this.state.rbkc);
|
|
|
|
|
// console.log(options);
|
|
|
|
|
// //console.log("this.state.rbkc");
|
|
|
|
|
// //console.log(this.state.rbkc);
|
|
|
|
|
// //console.log(options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|