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
e95833a7
Commit
e95833a7
authored
Jun 09, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://xmgit.ixm5.cn/xiaomai-cloud-class/xiaomai-cloud-class-web
into dev
parents
7d9a19c6
671ba6b2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
65 deletions
+67
-65
src/modules/teach-tool/components/AnswerDescPage.jsx
+22
-12
src/modules/teach-tool/components/AnswerDescPage.less
+7
-2
src/modules/teach-tool/examination-manager/TestDetailPage.jsx
+4
-3
src/modules/teach-tool/examination-manager/TestDetailPage.less
+1
-1
src/modules/teach-tool/examination-manager/UserData.tsx
+5
-22
src/modules/teach-tool/examination-manager/dataAnalysic.less
+21
-25
src/modules/teach-tool/examination-manager/userData.less
+7
-0
No files found.
src/modules/teach-tool/components/AnswerDescPage.jsx
View file @
e95833a7
...
...
@@ -10,6 +10,7 @@ import React, { useState, useEffect, useRef } from 'react';
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
User
from
'@/common/js/user'
;
import
Service
from
'@/common/js/service'
;
import
Lottie
from
'lottie-web'
;
import
'./AnswerDescPage.less'
;
import
{
message
}
from
'antd'
;
import
XMAudio
from
'./XMAudio'
;
...
...
@@ -58,7 +59,6 @@ function AnswerDescPage(props) {
const
[
showScanFile
,
setShowScanFile
]
=
useState
(
false
);
const
[
scanFileAddress
,
setScanFileAddress
]
=
useState
(
false
);
const
[
scanFileType
,
setScanFileType
]
=
useState
(
false
);
const
questionTypeList
=
{
SINGLE_CHOICE
:
'单选题'
,
MULTI_CHOICE
:
'多选题'
,
...
...
@@ -71,14 +71,23 @@ function AnswerDescPage(props) {
getPaperDetail
();
getExamDetail
();
},
[]);
useEffect
(()
=>
{
Lottie
.
loadAnimation
({
path
:
'https://image.xiaomaiketang.com/xm/AcQWnGATCM.json'
,
name
:
'test'
,
renderer
:
'svg'
,
loop
:
true
,
autoplay
:
true
,
container
:
document
.
getElementById
(
'empty-img-box'
),
});
},
[]);
// 获取考试详情
function
getExamDetail
()
{
const
params
=
{
examId
,
source
:
0
,
tenantId
:
User
.
getStoreId
()
||
window
.
getParameterByName
(
'id'
),
userId
:
User
.
getCustomerId
()
,
userId
:
props
.
userId
,
};
Service
.
Hades
(
'public/customerHades/queryUserExamResult'
,
params
,
{
reject
:
true
,
...
...
@@ -104,7 +113,7 @@ function AnswerDescPage(props) {
readAnswer
:
true
,
source
:
0
,
tenantId
:
User
.
getStoreId
()
||
window
.
getParameterByName
(
'id'
),
userId
:
User
.
getCustomerId
()
,
userId
:
props
.
userId
,
}).
then
((
res
)
=>
{
const
{
paperDetailVO
,
userExamAnswerVO
}
=
res
.
result
;
const
paperDetail
=
{
...
paperDetailVO
};
...
...
@@ -667,18 +676,19 @@ function AnswerDescPage(props) {
</
div
>
</
div
>
</
div
>
{
errorCount
===
0
&&
onlyError
?
(
<
div
className=
'empty'
>
<
div
className=
'img-box'
>
<
img
src=
{
'https://image.xiaomaiketang.com/xm/sz3CMdQKQE.png'
}
alt=
''
/>
</
div
>
<
div
className=
'empty-text'
>
本次考试无错题
</
div
>
<
div
className=
{
`empty ${errorCount === 0 && onlyError ? '' : 'empty-hide'}`
}
>
<
div
className=
'img-box'
>
<
div
id=
'empty-img-box'
></
div
>
</
div
>
)
:
(
<
div
className=
'empty-text'
>
本次考试无错题
</
div
>
</
div
>
<
If
condition=
{
!
(
errorCount
===
0
&&
onlyError
)
}
>
<
div
className=
'answer-desc-content'
>
<
div
className=
'question-list-box'
>
{
handleRenderQuestionItem
()
}
</
div
>
</
div
>
)
}
</
If
>
{
/* {renderFooterText()} */
}
</
div
>
{
showScanFile
&&
(
...
...
src/modules/teach-tool/components/AnswerDescPage.less
View file @
e95833a7
...
...
@@ -23,7 +23,7 @@
transform: translateY(-50%);
width: 4px;
height: 16px;
background
: #336dff
;
background
-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%)
;
}
}
.choose-error-box {
...
...
@@ -176,7 +176,7 @@
transform: translateY(-50%);
width: 4px;
height: 16px;
background
: #336dff
;
background
-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%)
;
}
}
.text-dom {
...
...
@@ -412,4 +412,9 @@
margin: 0 auto;
text-align: center;
}
&.empty-hide {
position: absolute;
left: -9999px;
top: -9999px;
}
}
src/modules/teach-tool/examination-manager/TestDetailPage.jsx
View file @
e95833a7
...
...
@@ -18,6 +18,7 @@ import Breadcrumbs from '@/components/Breadcrumbs';
function
TestDetailPage
(
props
)
{
const
examId
=
props
.
match
.
params
.
testId
.
replace
(
/
\?
.+/
,
''
);
const
paperId
=
window
.
getParameterByName
(
'paperId'
);
const
userId
=
window
.
getParameterByName
(
'userId'
);
const
[
examDetail
,
setExamDetail
]
=
useState
({
answerAnalysis
:
''
,
resultShow
:
''
,
...
...
@@ -59,7 +60,7 @@ function TestDetailPage(props) {
examId
,
source
:
0
,
tenantId
:
User
.
getStoreId
()
||
window
.
getParameterByName
(
'id'
),
userId
:
User
.
getCustomerId
()
,
userId
,
};
Service
.
Hades
(
'public/customerHades/queryUserExamResult'
,
params
,
{
reject
:
true
,
...
...
@@ -84,7 +85,7 @@ function TestDetailPage(props) {
source
:
0
,
readAnswer
:
true
,
tenantId
:
User
.
getStoreId
()
||
window
.
getParameterByName
(
'id'
),
userId
:
User
.
getCustomerId
()
,
userId
,
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
const
{
paperDetailVO
,
userExamAnswerVO
}
=
res
.
result
;
...
...
@@ -194,7 +195,7 @@ function TestDetailPage(props) {
})
}
</
div
>
</
div
>
<
AnswerDescPage
/>
<
AnswerDescPage
userId=
{
userId
}
/>
</
div
>
);
}
...
...
src/modules/teach-tool/examination-manager/TestDetailPage.less
View file @
e95833a7
...
...
@@ -214,7 +214,7 @@
transform: translateY(-50%);
width: 4px;
height: 16px;
background
: #336dff
;
background
-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%)
;
}
}
.exam-result {
...
...
src/modules/teach-tool/examination-manager/UserData.tsx
View file @
e95833a7
...
...
@@ -80,7 +80,6 @@ function DataAnalysic(props: any) {
useEffect
(()
=>
{
queryRef
.
current
=
query
;
queryExamUserDataList
();
getCustomerId
();
},
[
query
]);
function
queryExamUserData
()
{
...
...
@@ -176,8 +175,6 @@ function DataAnalysic(props: any) {
title
:
'操作'
,
key
:
''
,
dataIndex
:
'edit'
,
width
:
'30%'
,
align
:
'right'
,
render
:
(
value
:
any
,
record
:
any
)
=>
{
return
(
<
Choose
>
...
...
@@ -221,25 +218,11 @@ function DataAnalysic(props: any) {
});
}
//查看答题详情
function
checkAnswerDetail
(
record
:
object
)
{
function
checkAnswerDetail
(
record
:
any
)
{
const
{
paperId
,
userExamState
}
=
props
.
examDetail
?.
examPaper
;
const
{
userId
}
=
record
;
window
.
RCHistory
.
push
({
pathname
:
`/test-detail/
${
props
.
examId
}
?paperId=
${
paperId
}
&userExamState=
${
userExamState
}
`
,
});
// console.log(record);
}
//C端 的学员学院列表
function
getCustomerId
()
{
let
params
=
{
userId
:
User
.
getUserId
(),
};
Service
.
Hades
(
'public/customerHades/getStoreListCustomer'
,
params
).
then
((
res
)
=>
{
res
.
result
.
map
((
item
:
any
)
=>
{
if
(
User
.
getStoreId
()
===
item
.
storeId
)
{
User
.
setCustomerId
(
item
.
storeCustomerId
);
}
});
pathname
:
`/test-detail/
${
props
.
examId
}
?paperId=
${
paperId
}
&userExamState=
${
userExamState
}
&userId=
${
userId
}
`
,
});
}
...
...
@@ -359,8 +342,8 @@ function DataAnalysic(props: any) {
</
Button
>
)
}
<
div
className=
'content'
>
<
Table
bordered
size=
'small'
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
Table
>
<
div
className=
'content
analysic-content
'
>
<
Table
bordered
size=
'small'
rowClassName=
'analysic-content-row'
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
Table
>
{
total
>
0
&&
(
<
PageControl
size=
'small'
...
...
src/modules/teach-tool/examination-manager/dataAnalysic.less
View file @
e95833a7
.dataAnalysic{
.titleBox{
position: relative;
padding-left: 28px;
font-size: 19px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 26px;
background: #FFFFFF;
&::before{
width:4px;
height:12px;
content:'';
background-image: linear-gradient(#2966FF 83.5%, #0ACCA4 16.5%);
display:inline-block;
position: absolute;
left:16px;
top:7px;
}
.dataAnalysic {
.titleBox {
position: relative;
font-size: 19px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 26px;
background: #ffffff;
&::before {
width: 4px;
height: 12px;
content: '';
background-image: linear-gradient(#2966ff 83.5%, #0acca4 16.5%);
display: inline-block;
margin-right: 8px;
}
.ant-tabs-content-holder {
margin-top: 8px;
}
}
\ No newline at end of file
}
.ant-tabs-content-holder {
margin-top: 8px;
}
}
src/modules/teach-tool/examination-manager/userData.less
View file @
e95833a7
...
...
@@ -81,3 +81,10 @@
.answer-detail {
color: rgb(35, 143, 255);
}
.analysic-content {
.ant-table-bordered .ant-table-tbody tr {
&.analysic-content-row {
height: 50px;
}
}
}
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