dev_forum
杨树林 5 years ago
parent 26e0502fed
commit 8c242888b3

@ -912,23 +912,23 @@ class Listofworksstudentone extends Component {
console.log(info);
}
componentWillReceiveProps(nextProps) {
console.log("+++++++++916");
console.log(nextProps);
console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo1");
if(this.props.isAdmin() === true){
this.tearchar();
}else{
this.student();
}
}
}
}
// componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// // console.log(this.props.isAdmin());
// if (nextProps.code_review != this.props.code_review) {
// if (nextProps.code_review !== undefined) {
// console.log("diaoyonglwangluo1");
// if(this.props.isAdmin() === true){
// this.tearchar();
// }else{
// this.student();
// }
// }
// }
//
// }
componentDidMount() {
console.log("componentDidMount");
@ -1528,8 +1528,8 @@ class Listofworksstudentone extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
this.props.Getdataback(result,result.data);
}
}).catch((error) => {
console.log(error)
@ -1587,8 +1587,8 @@ class Listofworksstudentone extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
this.props.Getdataback(result,result.data);
// }
}
}).catch((error) => {
@ -1928,9 +1928,8 @@ class Listofworksstudentone extends Component {
.then((response) => {
if (response.data.status == '0') {
this.setState({visible: false});
this.props.showNotification(`调分成功`);
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
this.props.showNotification(`调分成功`);
}
})
.catch(function (error) {
@ -1991,8 +1990,6 @@ class Listofworksstudentone extends Component {
axios.get(url).then((response) => {
if (response.status === 200) {
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
@ -2010,6 +2007,8 @@ class Listofworksstudentone extends Component {
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
})
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
}
}).catch((error) => {
console.log(error)
@ -2183,11 +2182,11 @@ class Listofworksstudentone extends Component {
let url = "/homework_commons/"+homeworkid+"/update_score.json";
axios.get(url).then((response) => {
this.props.showNotification(`${response.data.message}`);
this.setState({
loadingstate: true
})
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.props.showNotification(`${response.data.message}`);
}).catch((error) => {
console.log(error)
});

@ -252,10 +252,10 @@ class ShixunHomeworkPage extends Component {
{/*/>*/}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
{parseInt(tab) === 0 ?<Listofworksstudentone key={Math.random()} triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer key={Math.random()} triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork key={Math.random()} triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting key={Math.random()} triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</div>
</div>

@ -81,19 +81,19 @@ class ShixunStudentWork extends Component {
this.props.triggerRef(this);
this.getTrainingjobsettings();
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo1");
this.getTrainingjobsettings();
}
}
}
// componentWillReceiveProps(nextProps) {
// // console.log("+++++++++916");
// // console.log(nextProps);
// // console.log(this.props)
// // console.log(this.props.isAdmin());
// if (nextProps.code_review != this.props.code_review) {
// if (nextProps.code_review !== undefined) {
// console.log("diaoyonglwangluo1");
// this.getTrainingjobsettings();
// }
// }
//
// }
getTrainingjobsettings=()=>{

@ -142,20 +142,20 @@ class Trainingjobsetting extends Component {
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo4");
this.getTrainingjobsetting()
}
}
}
// componentWillReceiveProps(nextProps) {
// // console.log("+++++++++916");
// // console.log(nextProps);
// // console.log(this.props)
// // console.log(this.props.isAdmin());
// if (nextProps.code_review != this.props.code_review) {
// if (nextProps.code_review !== undefined) {
// console.log("diaoyonglwangluo4");
// this.getTrainingjobsetting()
//
// }
// }
//
// }
// 获取数据地方
getTrainingjobsetting = () => {

@ -94,21 +94,21 @@ class Workquestionandanswer extends Component {
shixuntypes: type[3]
})
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo2");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
this.Gettitleinformation(homeworkid)
}
}
}
// componentWillReceiveProps(nextProps) {
// // console.log("+++++++++916");
// // console.log(nextProps);
// // console.log(this.props)
// // console.log(this.props.isAdmin());
// if (nextProps.code_review != this.props.code_review) {
// if (nextProps.code_review !== undefined) {
// console.log("diaoyonglwangluo2");
// var homeworkid = this.props.match.params.homeworkid;
// // console.log(homeworkid)
// this.Gettitleinformation(homeworkid)
// }
// }
//
// }
isupdatas = () => {
var homeworkid = this.props.match.params.homeworkid;

Loading…
Cancel
Save