Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
e8aec20f
Commit
e8aec20f
authored
Jun 09, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:关闭答题详情B端查看限制。
parent
593e59d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
62 deletions
+4
-62
src/modules/teach-tool/examination-manager/TestDetailPage.jsx
+4
-62
No files found.
src/modules/teach-tool/examination-manager/TestDetailPage.jsx
View file @
e8aec20f
...
...
@@ -7,19 +7,17 @@
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
User
from
'@/common/js/user'
;
import
'./TestDetailPage.less'
;
import
Service
from
'@/common/js/service'
;
import
{
message
,
Empty
}
from
'antd'
;
import
moment
from
'moment'
;
import
{
message
}
from
'antd'
;
import
AnswerDescPage
from
'../components/AnswerDescPage'
;
import
Breadcrumbs
from
'@/components/Breadcrumbs'
;
function
TestDetailPage
(
props
)
{
const
examId
=
props
.
match
.
params
.
testId
.
replace
(
/
\?
.+/
,
''
);
const
paperId
=
window
.
getParameterByName
(
'paperId'
);
const
[
customerId
,
setCustomerId
]
=
useState
(
''
);
const
[
examDetail
,
setExamDetail
]
=
useState
({
answerAnalysis
:
''
,
resultShow
:
''
,
...
...
@@ -36,34 +34,15 @@ function TestDetailPage(props) {
totalScore
:
0
,
userCorrectQuestion
:
0
,
userExamDuration
:
0
,
userExamState
:
'INIT'
,
userScore
:
0
,
});
// 考试详情
const
[
testState
,
setTestState
]
=
useState
({
isDelete
:
false
,
});
// 考试状态
const
[
paperDetail
,
setPaperDetail
]
=
useState
({});
// 试卷详情
const
[
questionList
,
setQuestionList
]
=
useState
([]);
// 试卷题目列表
const
[
userAnswerList
,
setUserAnswerList
]
=
useState
([]);
// 用户答案列表
const
[
isScrollShow
,
setIsScrollShow
]
=
useState
(
false
);
// 是否展示回到顶部按钮
const
{
answerAnalysis
,
resultContent
,
resultShow
,
examName
,
examStartTime
,
examEndTime
,
totalScore
,
totalQuestionCount
,
passScore
,
examDuration
,
examDesc
,
userExamDuration
,
userExamState
,
userScore
,
userCorrectQuestion
,
}
=
examDetail
;
const
{
answerAnalysis
,
resultContent
,
examName
,
totalScore
,
totalQuestionCount
,
passScore
,
examDuration
,
userExamDuration
,
userScore
,
userCorrectQuestion
}
=
examDetail
;
useEffect
(()
=>
{
bindScroll
();
...
...
@@ -120,9 +99,6 @@ function TestDetailPage(props) {
function
handleChangeShowErrorPage
()
{
setIsShowErrorPage
(
true
);
setTestState
({
isDelete
:
true
,
});
}
// 用户时长转换
...
...
@@ -228,40 +204,6 @@ function TestDetailPage(props) {
);
}
function
customizeRenderEmpty
(
status
)
{
return
(
<
div
className=
'empty-result'
>
<
Empty
image=
{
status
===
'lack'
?
'https://image.xiaomaiketang.com/xm/7xi4YTXmHK.png'
:
'https://image.xiaomaiketang.com/xm/bhGtST27Hf.png'
}
imageStyle=
{
{
height
:
'100px'
,
}
}
description=
{
status
===
'lack'
?
(
<
div
className=
'lack-desc'
>
<
div
className=
'title'
>
缺考
</
div
>
<
div
className=
'content'
>
你没有成功交卷哦
</
div
>
</
div
>
)
:
(
<
div
className=
'after-desc'
>
<
div
className=
'title'
>
恭喜你完成考试!
</
div
>
<
div
className=
'after-show-box'
>
<
div
>
本次考试用时
{
window
.
formatHourTime
(
Number
(
userExamDuration
||
0
))
}
</
div
>
<
div
>
考试结果会在
<
span
style=
{
{
color
:
'#333333'
}
}
>
{
moment
(
Number
(
examEndTime
)).
format
(
'YYYY.MM.DD HH:mm'
)
}
公布哦
</
span
>
</
div
>
</
div
>
</
div
>
)
}
></
Empty
>
</
div
>
);
}
let
sortedAnswerList
=
[];
questionList
.
map
((
item
)
=>
{
userAnswerList
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment