hjm 6 years ago
commit 0de2646295

@ -900,9 +900,9 @@ class Listofworksstudentone extends Component {
}, },
], ],
} }
console.log("902"); // console.log("902");
console.log("902"); // console.log("902");
console.log(this.props); // console.log(this.props);
} }
componentDidCatch(error, info){ componentDidCatch(error, info){
@ -916,15 +916,17 @@ class Listofworksstudentone extends Component {
console.log("+++++++++915"); console.log("+++++++++915");
console.log("+++++++++916"); console.log("+++++++++916");
console.log(nextProps); console.log(nextProps);
console.log(this.props)
} }
componentDidMount() { componentDidMount() {
console.log("componentDidMount"); console.log("componentDidMount");
if(this.props.isAdmin() === true){ if(this.props.isAdmin() === true){
this.tearchar(); this.tearchar();
console.log("909"); // console.log("909");
}else{ }else{
this.student(); this.student();
console.log("911"); // console.log("911");
} }
} }
@ -1165,8 +1167,8 @@ class Listofworksstudentone extends Component {
} }
} }
console.log("554"); // console.log("554");
console.log(columns2); // console.log(columns2);
this.setState({ this.setState({
@ -1621,8 +1623,8 @@ class Listofworksstudentone extends Component {
user_name: student_works[i].user_name, user_name: student_works[i].user_name,
user_login: student_works[i].user_login, user_login: student_works[i].user_login,
}) })
console.log(datalist); // console.log(datalist);
console.log("1612"); // console.log("1612");
} }
@ -1719,9 +1721,9 @@ class Listofworksstudentone extends Component {
} else { } else {
} }
//
console.log(datalist); // console.log(datalist);
console.log("1712"); // console.log("1712");
this.setState({ this.setState({
data: datalist, data: datalist,
columns: columns2, columns: columns2,
@ -2004,7 +2006,7 @@ class Listofworksstudentone extends Component {
} }
//立即截止 //立即截止
homeworkends = () => { homeworkends = () => {
console.log("1160"); // console.log("1160");
let homeworkid = this.props.match.params.homeworkid; let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json"; let url = "/homework_commons/" + homeworkid + "/end_groups.json";
@ -2201,18 +2203,58 @@ class Listofworksstudentone extends Component {
// //
// } // }
daochushixunbaogao=()=>{
}
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data); // console.log(this.state.data);
// console.log("841"); // console.log("841");
console.log(this.state.columns); // console.log(this.state.columns);
console.log(data); // console.log(data);
console.log("2202"); // console.log("2202");
console.log(this.props.isAdmin()); // console.log(this.props.isAdmin());
return ( return (
this.props.isAdmin() === true ? this.props.isAdmin() === true ?
@ -2232,7 +2274,13 @@ class Listofworksstudentone extends Component {
updatas={() => this.isupdatas()} updatas={() => this.isupdatas()}
/> : ""} /> : ""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ? {visibles === true ?
<div> <div>
<style> <style>

@ -102,40 +102,8 @@ class ShixunHomeworkPage extends Component {
child.workshowmodel(); child.workshowmodel();
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
bindRef = ref => { this.child = ref } bindRef = ref => { this.child = ref }
///////////////教师截止 ///////////////教师截止
@ -271,18 +239,18 @@ class ShixunHomeworkPage extends Component {
</div> </div>
</div> </div>
<DownloadMessageysl {/*<DownloadMessageysl*/}
{...this.props} {/*{...this.props}*/}
value={this.state.DownloadMessageval} {/*value={this.state.DownloadMessageval}*/}
modalCancel={this.Downloadcal} {/*modalCancel={this.Downloadcal}*/}
modalsType={this.state.DownloadType} {/*modalsType={this.state.DownloadType}*/}
/> {/*/>*/}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone> {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) === 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) === 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) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</div> </div>
</div> </div>

@ -216,13 +216,13 @@ class Trialapplication extends Component {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel(); this.handleDialogClose()
window.location.href = "/"; window.location.href = "/";
} else { } else {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel(); this.handleDialogClose()
} }
} }
@ -277,14 +277,12 @@ class Trialapplication extends Component {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel(); this.handleDialogClose()
} else { } else {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel(); this.handleDialogClose()
} }
} }
}).catch((error) => { }).catch((error) => {

@ -293,7 +293,8 @@ class Trialapplicationysl extends Component {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel(); // this.Cancel();
this.handleDialogClose()
// } else { // } else {
// this.setState({ // this.setState({
// isRenders: false // isRenders: false

Loading…
Cancel
Save