dev_jupyter
杨树林 5 years ago
parent a85d7bbb37
commit 6868513ec2

@ -12,7 +12,6 @@ class Bottomsubmit extends Component {
cannelfun = () => {
// window.location.href=
debugger
if(this.props.Cohetepaperbool===true){
this.props.setCohetepaperbool(false);
}else {

@ -24,7 +24,7 @@ class IntelligentModel extends Component {
constructor(props) {
super(props);
this.state={
iconLoading:false,
}
}
@ -46,8 +46,12 @@ class IntelligentModel extends Component {
};
Confirmationofvolumeformation=()=>{
this.props.form.validateFields((err, values) => {
if (!err) {
this.setState({
iconLoading:true
})
const url=`/examination_intelligent_settings/${this.props.exam_id}/save_exam.json`;
let data={
name:values.classroom,
@ -58,10 +62,21 @@ class IntelligentModel extends Component {
if (result.data.status == 0) {
console.log(result);
this.props.history.push(`/paperlibrary`);
}
setTimeout(() => {
this.setState({
iconLoading:false
})
}, 1500)
}).catch((error) => {
console.log(error);
})
setTimeout(() => {
this.setState({
iconLoading:false
})
}, 1500)
})
@ -73,6 +88,7 @@ class IntelligentModel extends Component {
render() {
let {iconLoading}=this.state;
const {getFieldDecorator} = this.props.form;
const optionss = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
var addonAfterthree=this.props.form&&this.props.form.getFieldValue('classroom');
@ -180,13 +196,21 @@ class IntelligentModel extends Component {
</Form>
<div className="sortinxdirection">提示组卷完成后在试卷库<a className="tishiyuyans xiaoshou">我的试卷库</a></div>
<div className="sortinxdirection">提示组卷完成后在试卷库<a className="tishiyuyans xiaoshou" href={"/paperlibrary"}>我的试卷库</a></div>
</div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 h34 w100 lh34" onClick={()=>this.props.Confirmationofvolumeformations()}>取消</a>
<a className="task-btn task-btn-orange h34 w100 lh34" onClick={()=>this.Confirmationofvolumeformation()}>确定</a>
<Button
className="task-btn task-btn-orange h34 w100 lh34"
type="primary"
loading={this.state.iconLoading}
onClick={()=>this.Confirmationofvolumeformation()}
>
确定
</Button>
</div>
</Modal>
)

@ -200,7 +200,7 @@ class Itembankstop extends Component {
this.handleFormtixing(this.props.item_banksedit.item_type);
}
if (this.props.item_banksedit.difficulty) {
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
this.handleFormLayoutChangeysl(this.props.item_banksedit.difficulty);
}
if (this.props.item_banksedit.tag_disciplines) {
this.handletag_disciplinesChange(this.props.item_banksedit.tag_disciplines);
@ -366,7 +366,18 @@ class Itembankstop extends Component {
});
}
handleFormLayoutChangeysl = (value) => {
//难度塞选
////console.log("难度塞选");
////console.log(value);
this.props.form.setFieldsValue({
rbnd: value+ "",
});
this.setState({
rbnd: value + "",
})
}
handleFormLayoutChange = (e) => {
//难度塞选
////console.log("难度塞选");

@ -131,7 +131,9 @@ class Comthetestpaperst extends Component {
// this.handleFormtixing(this.props.item_banksedit.item_type);
// }
if (this.props.item_banksedit.difficulty) {
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
// this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
this.handleFormLayoutChangeysl(this.props.item_banksedit.difficulty);
}
if (this.props.item_banksedit.tag_disciplines) {
this.handletag_disciplinesChange(this.props.item_banksedit.tag_disciplines);
@ -330,11 +332,24 @@ class Comthetestpaperst extends Component {
});
}
handleFormLayoutChangeysl = (value) => {
//难度塞选
////console.log("难度塞选");
////console.log(value);
this.props.form.setFieldsValue({
rbnd: value + "",
});
this.setState({
rbnd: value + "",
})
}
handleFormLayoutChange = (e) => {
//难度塞选
////console.log("难度塞选");
////console.log(value);
this.props.form.setFieldsValue({
rbnd: e.target.value + "",
});

@ -229,6 +229,12 @@ class Intelligentcomponents extends Component {
rbly: e.target.value + "",
})
try {
this.props.getdatassssy(e.target.value);
}catch (e) {
}
}
handleFormLayoutChange = (e) => {
// console.log("handleFormLayoutChange");
@ -280,6 +286,12 @@ class Intelligentcomponents extends Component {
knowledgepoints2: _result,
})
try {
this.props.getdatassss(this.state.Knowpoints);
}catch (e) {
}
}
handleFormzhishidian = (value) => {
@ -334,6 +346,12 @@ class Intelligentcomponents extends Component {
this.setState({
rbzsd: undefined,
})
try {
this.props.getdatasss(parseInt(value[1]));
}catch (e) {
}
}
handleFormtixing = (value) => {
@ -353,7 +371,7 @@ class Intelligentcomponents extends Component {
////console.log('Clicked! But prevent default.');
}
deletesobject = (item, index) => {
debugger
var tmp = this.state.Knowpoints;
for (var i = 0; i < tmp.length; i++) {
if (i ===index) {
@ -390,6 +408,12 @@ class Intelligentcomponents extends Component {
}
}
//删除知识点
try {
this.props.getdatassss(this.state.Knowpoints);
}catch (e) {
}
}
@ -476,7 +500,12 @@ class Intelligentcomponents extends Component {
}).catch((error) => {
//console.log(error);
})
//新增知识点
try {
this.getdatassss(this.state.Knowpoints);
}catch (e) {
}
this.setState({
NewknTypedel:false
})

@ -110,6 +110,7 @@ class Intecomponents extends Component {
}
//难度
getdatas=()=>{
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
@ -129,25 +130,96 @@ class Intecomponents extends Component {
difficulty:this.Judquestio.Getdatas()[0].rbnd,
}
axios.post(url,data).then((response) => {
if (response) {
console.log("智能组卷");
console.log(response);
if(response.data){
this.setState({
single_question_count:response.data.single_question_count,
multiple_question_count:response.data.multiple_question_count,
judgement_question_count:response.data.judgement_question_count,
program_question_count:response.data.program_question_count,
})
this.getwangluodata(url,data);
}
}
//课程
getdatasss=(kech)=>{
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return false;
}
console.log(this.Judquestio.Getdatas());
var myrbkc=[];
var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
const url="/examination_intelligent_settings/optinal_items.json";
var data={
sub_discipline_id:kech,
tag_discipline_id:myrbkc,
source:this.Judquestio.Getdatas()[7].rbly,
difficulty:this.Judquestio.Getdatas()[0].rbnd,
}
this.getwangluodata(url,data);
}
});
}
//知识点
getdatassss=(zhishidian)=>{
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return false;
}
console.log(this.Judquestio.Getdatas());
var myrbkc=[];
var Getdatasdatas=zhishidian;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
const url="/examination_intelligent_settings/optinal_items.json";
var data={
sub_discipline_id:this.Judquestio.Getdatas()[2].rbkc[1],
tag_discipline_id:myrbkc,
source:this.Judquestio.Getdatas()[7].rbly,
difficulty:this.Judquestio.Getdatas()[0].rbnd,
}
this.getwangluodata(url,data);
}
//来源
getdatassssy=(rbly)=>{
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return false;
}
console.log(this.Judquestio.Getdatas());
var myrbkc=[];
var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
const url="/examination_intelligent_settings/optinal_items.json";
var data={
sub_discipline_id:this.Judquestio.Getdatas()[2].rbkc[1],
tag_discipline_id:myrbkc,
source:rbly,
difficulty:this.Judquestio.Getdatas()[0].rbnd,
}
this.getwangluodata(url,data);
}
getwangluodata=(url,data)=>{
axios.post(url,data).then((response) => {
if (response) {
console.log("智能组卷");
console.log(response);
if(response.data){
this.setState({
single_question_count:response.data.single_question_count,
multiple_question_count:response.data.multiple_question_count,
judgement_question_count:response.data.judgement_question_count,
program_question_count:response.data.program_question_count,
})
}
}
});
}
//难度
getdatass=(nandu)=>{
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
@ -313,7 +385,10 @@ class Intecomponents extends Component {
program_question_count={this.state.program_question_count}
getdatas={()=>this.getdatas()}
getdatass={(nd)=>this.getdatass(nd)}
getJudquestio={(ref) => this.getJudquestio(ref)}
getJudquestio={(ref) => this.getJudquestio(ref)}
getdatasss={(e)=>this.getdatasss(e)}
getdatassss={(e)=>this.getdatassss(e)}
getdatassssy={(e)=>this.getdatassssy(e)}
></Intelligentcomponents>
@ -326,6 +401,7 @@ class Intecomponents extends Component {
{
newmyshixunmodelbool === true ? "" :
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"保存"}
Cohetepaperbool={false}
setCohetepaperbool={(bool) => this.setCohetepaperbool(bool)}
onSubmits={() => this.preservation()} url={'/paperlibrary'}></Bottomsubmit>
}

Loading…
Cancel
Save