|
|
|
@ -50,15 +50,16 @@ const Qualification = () => {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const getTime=(time)=>{
|
|
|
|
|
const current_date=new Date(time.current_date.replace(/-/g, "/"))
|
|
|
|
|
const start_date=new Date(rule.examination_start_time.replace(/-/g, "/"));
|
|
|
|
|
const end_date=new Date(rule.examination_end_time.replace(/-/g, "/"));
|
|
|
|
|
const duration=end_date.getTime()-start_date.getTime();
|
|
|
|
|
const dateDiff=end_date.getTime()-current_date.getTime();
|
|
|
|
|
const date=dateDiff/1000;
|
|
|
|
|
history.push(`/dashboard/qualification/examAnswer/${params.examination_id}/${examinationInfo.examination_name}/${date}/${duration}`)
|
|
|
|
|
}
|
|
|
|
|
// const getTime=(time)=>{
|
|
|
|
|
// const current_date=new Date(time.current_date.replace(/-/g, "/"))
|
|
|
|
|
// const start_date=new Date(rule.examination_start_time.replace(/-/g, "/"));
|
|
|
|
|
// const end_date=new Date(rule.examination_end_time.replace(/-/g, "/"));
|
|
|
|
|
// const duration=end_date.getTime()-start_date.getTime();
|
|
|
|
|
// const dateDiff=end_date.getTime()-current_date.getTime();
|
|
|
|
|
// const date=dateDiff/1000;
|
|
|
|
|
// const time=rule.examination_time*60;
|
|
|
|
|
// history.push(`/dashboard/qualification/examAnswer/${params.examination_id}/${examinationInfo.examination_name}/${time}`)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="qualification" style={{height:window.innerHeight-200,background:'#fff',width:'100%',padding:20}}>
|
|
|
|
@ -90,9 +91,10 @@ const Qualification = () => {
|
|
|
|
|
if(paperId===''){
|
|
|
|
|
message.warning('您已参加过考试,不能开始考试!');
|
|
|
|
|
}else {
|
|
|
|
|
const time = await getCurrentDate();
|
|
|
|
|
getTime(time);
|
|
|
|
|
// history.push(`/dashboard/qualification/examAnswer/${params.examination_id}/${examinationInfo.examination_name}`)
|
|
|
|
|
// const time = await getCurrentDate();
|
|
|
|
|
// getTime(time);
|
|
|
|
|
const time=rule.examination_time*60;
|
|
|
|
|
history.push(`/dashboard/qualification/examAnswer/${params.examination_id}/${examinationInfo.examination_name}/${time}`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|