|
|
@ -86,6 +86,7 @@ const CardList = () => {
|
|
|
|
const [timeData, setTimeData] = useState(0);
|
|
|
|
const [timeData, setTimeData] = useState(0);
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
|
|
|
|
let secondValue = params.time; // 秒 截至时间 - 服务器当前时间
|
|
|
|
let secondValue = params.time; // 秒 截至时间 - 服务器当前时间
|
|
|
|
setTimeData(secondValue)
|
|
|
|
setTimeData(secondValue)
|
|
|
|
// console.log(secondValue);
|
|
|
|
// console.log(secondValue);
|
|
|
@ -204,11 +205,13 @@ const CardList = () => {
|
|
|
|
formatResult: (result) => {
|
|
|
|
formatResult: (result) => {
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onSuccess: (result, params) => {
|
|
|
|
onSuccess: (result) => {
|
|
|
|
if (result.success) {
|
|
|
|
if (result.success) {
|
|
|
|
const time = new Date(timeData).getTime();
|
|
|
|
const time = new Date(timeData).getTime();
|
|
|
|
const timeDiff = params.duration / 1000 - time;
|
|
|
|
// const timeDiff = params.duration / 1000 - time;
|
|
|
|
// console.log('timeDiff',timeDiff)
|
|
|
|
|
|
|
|
|
|
|
|
const timeDiff=params.time-time;
|
|
|
|
|
|
|
|
console.log('timeDiff',timeDiff)
|
|
|
|
history.push(`/dashboard/qualification/result/${result.data.pass_score}/${result.data.score}/${result.data.sum_score}/${params.examination_id}/${params.examination_name}/${timeDiff}`);
|
|
|
|
history.push(`/dashboard/qualification/result/${result.data.pass_score}/${result.data.score}/${result.data.sum_score}/${params.examination_id}/${params.examination_name}/${timeDiff}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -290,6 +293,7 @@ const CardList = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<PageContainer content={content} extraContent={false}>
|
|
|
|
<PageContainer content={content} extraContent={false}>
|
|
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|
<Col span={6} style={{ paddingRight: 24 }}>
|
|
|
|
<Col span={6} style={{ paddingRight: 24 }}>
|
|
|
|
<ProCard
|
|
|
|
<ProCard
|
|
|
@ -361,6 +365,7 @@ const CardList = () => {
|
|
|
|
<Form
|
|
|
|
<Form
|
|
|
|
ref={formRef} name="control-ref"
|
|
|
|
ref={formRef} name="control-ref"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
{/*{console.log('questionNow',questionNow)}*/}
|
|
|
|
<Form.Item name="note" label="Note" rules={[{ required: true }]}>
|
|
|
|
<Form.Item name="note" label="Note" rules={[{ required: true }]}>
|
|
|
|
|
|
|
|
|
|
|
|
{questionNow.question_type === 0 ?
|
|
|
|
{questionNow.question_type === 0 ?
|
|
|
@ -369,7 +374,7 @@ const CardList = () => {
|
|
|
|
|
|
|
|
|
|
|
|
<Radio.Group>
|
|
|
|
<Radio.Group>
|
|
|
|
<Space direction="vertical">{questionNow?.answers?.map((item, index) => {
|
|
|
|
<Space direction="vertical">{questionNow?.answers?.map((item, index) => {
|
|
|
|
|
|
|
|
s
|
|
|
|
return <Radio key={item.id}
|
|
|
|
return <Radio key={item.id}
|
|
|
|
onChange={() => {
|
|
|
|
onChange={() => {
|
|
|
|
const qArr = []
|
|
|
|
const qArr = []
|
|
|
|