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
6f9accee
Commit
6f9accee
authored
Jul 02, 2021
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:完成全局设置iconfontfontweight和助学工具替换默认图功能
parent
7638b279
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
326 additions
and
220 deletions
+326
-220
src/modules/course-manage/components/AddLiveClass.jsx
+4
-1
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+1
-1
src/modules/plan-manage/components/UserLearningData.jsx
+1
-1
src/modules/teach-tool/examination-manager/ExamData.tsx
+127
-87
src/modules/teach-tool/examination-manager/Index.tsx
+3
-0
src/modules/teach-tool/examination-manager/UserData.tsx
+175
-113
src/modules/teach-tool/paper-manage/components/PaperList.jsx
+4
-0
src/modules/teach-tool/paper-manage/components/SelectQuestionList.jsx
+7
-16
src/modules/teach-tool/question-manage/components/QuestionList.jsx
+4
-1
No files found.
src/modules/course-manage/components/AddLiveClass.jsx
View file @
6f9accee
...
...
@@ -175,7 +175,10 @@ class AddLiveClass extends React.Component {
<
Tooltip
overlayStyle=
{
{
maxWidth
:
300
,
zIndex
:
'9999'
}
}
title=
{
<
div
style=
{
{
width
:
'266px'
}
}
>
支持按上课日期批量创建直播课,创建后按“课程名称_日期”命名,例如:
<
br
/>
张三的语文课_9月18日
<
br
/>
张三的语文课_9月19日......
</
div
>
}
>
<
span
className=
"iconfont"
>

</
span
>
<
span
style=
{
{
color
:
"rgba(191, 191, 191, 1)"
,
fontWeight
:
400
}
}
className=
"iconfont"
>

</
span
>
</
Tooltip
>
:
</
span
>
<
div
>
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
6f9accee
...
...
@@ -147,7 +147,7 @@ class VideoCourseList extends React.Component {
关闭后,学院内不再展示此课程,但学员仍可通过分享的海报/链接查看此课程。
</
div
>
}
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
,
fontWeight
:
'normal'
}
}
>

</
i
>
</
Tooltip
>
...
...
src/modules/plan-manage/components/UserLearningData.jsx
View file @
6f9accee
...
...
@@ -330,7 +330,7 @@ class UserLearningData extends React.Component {
<
span
>
<
span
>
学习进度
</
span
>
<
Tooltip
title=
'学员培训计划中达到“已完成”状态的课程数/总课程数'
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
,
fontWeight
:
'normal'
}
}
>

</
i
>
</
Tooltip
>
...
...
src/modules/teach-tool/examination-manager/ExamData.tsx
View file @
6f9accee
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
;
import
Service
from
'@/common/js/service'
;
import
{
PageControl
}
from
'@/components'
;
import
{
Input
,
Select
,
Tooltip
,
Button
,
Table
}
from
'antd'
;
import
User
from
'@/common/js/user'
;
import
moment
from
'moment'
;
import
'./userData.less'
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
"react"
;
import
Service
from
"@/common/js/service"
;
import
{
PageControl
}
from
"@/components"
;
import
{
Input
,
Select
,
Tooltip
,
Button
}
from
"antd"
;
import
User
from
"@/common/js/user"
;
import
{
XMTable
}
from
"@/components"
;
import
college
from
"@/common/lottie/college.json"
;
import
"./userData.less"
;
interface
sortType
{
type
:
'ascend'
|
'descend'
|
null
|
undefined
;
type
:
"ascend"
|
"descend"
|
null
|
undefined
;
}
function
ExamData
(
props
:
any
)
{
...
...
@@ -18,37 +17,37 @@ function ExamData(props: any) {
};
const
examDataInit
:
any
=
{};
const
queryInit
:
any
=
{
current
:
1
,
size
:
10
,
order
:
'SORT_ASC'
};
const
queryInit
:
any
=
{
current
:
1
,
size
:
10
,
order
:
"SORT_ASC"
};
const
[
examData
,
setUserData
]
=
useState
(
examDataInit
);
const
[
list
,
setList
]
=
useState
([]);
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
field
,
setfield
]
=
useState
(
""
);
const
[
allData
,
setAllData
]
=
useState
(
0
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
questionTypeList
=
{
SINGLE_CHOICE
:
'单选题'
,
MULTI_CHOICE
:
'多选题'
,
JUDGE
:
'判断题'
,
GAP_FILLING
:
'填空题'
,
INDEFINITE_CHOICE
:
'不定项选择题'
,
SINGLE_CHOICE
:
"单选题"
,
MULTI_CHOICE
:
"多选题"
,
JUDGE
:
"判断题"
,
GAP_FILLING
:
"填空题"
,
INDEFINITE_CHOICE
:
"不定项选择题"
,
};
const
userTypeEnum
=
{
WORK_WE_CHAT
:
'企业微信'
,
WE_CHAT
:
'微信'
,
WORK_WE_CHAT
:
"企业微信"
,
WE_CHAT
:
"微信"
,
};
const
userExamStateEnum
=
{
EXAM
:
'进行中'
,
LACK_EXAM
:
'缺考'
,
FINISH_EXAM
:
'已考试'
,
EXAM
:
"进行中"
,
LACK_EXAM
:
"缺考"
,
FINISH_EXAM
:
"已考试"
,
};
const
orderEnum
=
{
currentAccuracy
:
{
ascend
:
'ACCURACY_ASC'
,
descend
:
'ACCURACY_DESC'
,
ascend
:
"ACCURACY_ASC"
,
descend
:
"ACCURACY_DESC"
,
},
};
...
...
@@ -64,7 +63,7 @@ function ExamData(props: any) {
},
[
query
]);
function
queryExamUserData
()
{
Service
.
Hades
(
'public/hades/queryExamQuestionData'
,
{
Service
.
Hades
(
"public/hades/queryExamQuestionData"
,
{
examId
:
props
.
examId
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
...
...
@@ -75,7 +74,7 @@ function ExamData(props: any) {
}
function
queryExamUserDataList
()
{
Service
.
Hades
(
'public/hades/queryExamQuestionDataList'
,
{
Service
.
Hades
(
"public/hades/queryExamQuestionDataList"
,
{
...
query
,
examId
:
props
.
examId
,
tenantId
:
User
.
getStoreId
(),
...
...
@@ -92,35 +91,38 @@ function ExamData(props: any) {
const
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'sort'
,
title
:
"序号"
,
dataIndex
:
"sort"
,
width
:
60
,
render
:
(
text
:
any
,
record
:
any
,
index
:
any
)
=>
<
span
>
{
index
+
1
}
</
span
>,
},
{
title
:
'题目'
,
dataIndex
:
'questionStem'
,
title
:
"题目"
,
dataIndex
:
"questionStem"
,
ellipsis
:
true
,
width
:
350
,
render
:
(
val
:
any
)
=>
{
var
handleVal
=
val
;
handleVal
=
handleVal
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
''
);
handleVal
=
handleVal
.
replace
(
/<
\s?
input
[^
>
]
*>/gi
,
'_、'
);
handleVal
=
handleVal
.
replace
(
/
\&
nbsp
\;
/gi
,
' '
);
handleVal
=
handleVal
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
""
);
handleVal
=
handleVal
.
replace
(
/<
\s?
input
[^
>
]
*>/gi
,
"_、"
);
handleVal
=
handleVal
.
replace
(
/
\&
nbsp
\;
/gi
,
" "
);
return
(
<
Tooltip
overlayClassName=
'aid-tool-list'
title=
{
<
div
style=
{
{
maxWidth
:
700
,
width
:
'auto'
}
}
>
{
handleVal
}
</
div
>
}
placement=
'topLeft'
overlayStyle=
{
{
maxWidth
:
700
}
}
>
overlayClassName=
"aid-tool-list"
title=
{
<
div
style=
{
{
maxWidth
:
700
,
width
:
"auto"
}
}
>
{
handleVal
}
</
div
>
}
placement=
"topLeft"
overlayStyle=
{
{
maxWidth
:
700
}
}
>
{
handleVal
}
</
Tooltip
>
);
},
},
{
title
:
'题型'
,
dataIndex
:
'questionType'
,
title
:
"题型"
,
dataIndex
:
"questionType"
,
render
:
(
text
:
any
)
=>
<
span
>
{
(
questionTypeList
as
any
)[
text
]
}
</
span
>,
filters
:
Object
.
keys
(
questionTypeList
).
map
((
key
)
=>
{
return
{
...
...
@@ -130,25 +132,33 @@ function ExamData(props: any) {
}),
},
{
title
:
'本次正确率'
,
dataIndex
:
'currentAccuracy'
,
title
:
"本次正确率"
,
dataIndex
:
"currentAccuracy"
,
sorter
:
true
,
sortOrder
:
field
===
'currentAccuracy'
?
order
:
sortStatus
.
type
,
sortOrder
:
field
===
"currentAccuracy"
?
order
:
sortStatus
.
type
,
render
:
(
text
:
any
)
=>
<
span
>
{
parseInt
((
text
*
100
)
as
any
)
}
%
</
span
>,
},
{
title
:
(
<
div
>
历史正确率
{
' '
}
<
Tooltip
overlayClassName=
'tool-list'
title=
'包含本次考试正确率'
placement=
'top'
overlayStyle=
{
{
maxWidth
:
700
}
}
>
{
' '
}
<
span
style=
{
{
color
:
'rgba(191, 191, 191, 1)'
}
}
className=
'icon iconfont'
>
历史正确率
{
" "
}
<
Tooltip
overlayClassName=
"tool-list"
title=
"包含本次考试正确率"
placement=
"top"
overlayStyle=
{
{
maxWidth
:
700
}
}
>
{
" "
}
<
span
style=
{
{
color
:
"rgba(191, 191, 191, 1)"
,
fontWeight
:
400
}
}
className=
"icon iconfont"
>

</
span
>
</
Tooltip
>
</
div
>
),
dataIndex
:
'totalAccuracy'
,
dataIndex
:
"totalAccuracy"
,
render
:
(
text
:
any
)
=>
<
span
>
{
parseInt
((
text
*
100
)
as
any
)
}
%
</
span
>,
},
];
...
...
@@ -174,78 +184,97 @@ function ExamData(props: any) {
}
function
download
()
{
Service
.
Hades
(
'public/hades/exportExamData'
,
{
Service
.
Hades
(
"public/hades/exportExamData"
,
{
// ...query,
examId
:
props
.
examId
,
exportDataType
:
'EXAM_QUESTION_DATA'
,
exportDataType
:
"EXAM_QUESTION_DATA"
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
source
:
0
,
}).
then
((
res
)
=>
{
const
dom
=
(
document
as
any
).
getElementById
(
'load-play-back-excel'
);
dom
.
setAttribute
(
'href'
,
res
.
result
);
const
dom
=
(
document
as
any
).
getElementById
(
"load-play-back-excel"
);
dom
.
setAttribute
(
"href"
,
res
.
result
);
dom
.
click
();
});
}
return
(
<
div
className=
'rr'
>
<
a
download
id=
'load-play-back-excel'
style=
{
{
position
:
'absolute'
,
left
:
'-10000px'
}
}
></
a
>
<
div
className=
'dataPanal'
>
<
div
className=
"rr"
>
<
a
download
id=
"load-play-back-excel"
style=
{
{
position
:
"absolute"
,
left
:
"-10000px"
}
}
></
a
>
<
div
className=
"dataPanal"
>
{
!!
examData
.
singleChoiceCnt
&&
(
<
div
className=
'item'
>
<
div
className=
'num'
>
{
Math
.
round
((
examData
.
singleChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
'percent'
>
正确率
</
div
>
<
div
className=
'subTitle'
>
<
div
className=
'type'
>
<
span
className=
'icon iconfont'
>

</
span
>
单选题
<
span
>
(共
{
examData
.
singleChoiceCnt
}
题)
</
span
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
singleChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
>
<
div
className=
"type"
>
<
span
className=
"icon iconfont"
>

</
span
>
单选题
{
" "
}
<
span
>
(共
{
examData
.
singleChoiceCnt
}
题)
</
span
>
</
div
>
</
div
>
</
div
>
)
}
{
!!
examData
.
multiChoiceCnt
&&
(
<
div
className=
'item'
>
<
div
className=
'num'
>
{
Math
.
round
((
examData
.
multiChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
'percent'
>
正确率
</
div
>
<
div
className=
'subTitle'
>
<
div
className=
'type'
>
<
span
className=
'icon iconfont'
>

</
span
>
多选题
<
span
>
(共
{
examData
.
multiChoiceCnt
}
题)
</
span
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
multiChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
>
<
div
className=
"type"
>
<
span
className=
"icon iconfont"
>

</
span
>
多选题
<
span
>
(共
{
examData
.
multiChoiceCnt
}
题)
</
span
>
</
div
>
</
div
>
</
div
>
)
}
{
!!
examData
.
judgeCnt
&&
(
<
div
className=
'item'
>
<
div
className=
'num'
>
{
Math
.
round
((
examData
.
judgeAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
'percent'
>
正确率
</
div
>
<
div
className=
'subTitle'
>
<
div
className=
'type'
>
<
span
className=
'icon iconfont'
>

</
span
>
判断题
<
span
>
(共
{
examData
.
judgeCnt
}
题)
</
span
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
judgeAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
>
<
div
className=
"type"
>
<
span
className=
"icon iconfont"
>

</
span
>
判断题
<
span
>
(共
{
examData
.
judgeCnt
}
题)
</
span
>
</
div
>
</
div
>
</
div
>
)
}
{
!!
examData
.
gapFillingCnt
&&
(
<
div
className=
'item'
>
<
div
className=
'num'
>
{
Math
.
round
((
examData
.
gapFillingAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
'percent'
>
正确率
</
div
>
<
div
className=
'subTitle'
>
<
div
className=
'type'
>
<
span
className=
'icon iconfont'
>

</
span
>
填空题
<
span
>
(共
{
examData
.
gapFillingCnt
}
题)
</
span
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
gapFillingAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
>
<
div
className=
"type"
>
<
span
className=
"icon iconfont"
>

</
span
>
填空题
<
span
>
(共
{
examData
.
gapFillingCnt
}
题)
</
span
>
</
div
>
</
div
>
</
div
>
)
}
{
!!
examData
.
indefiniteChoiceCnt
&&
(
<
div
className=
'item'
>
<
div
className=
'num'
>
{
Math
.
round
((
examData
.
indefiniteChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
'percent'
>
正确率
</
div
>
<
div
className=
'subTitle'
>
<
div
className=
'type'
>
<
span
className=
'icon iconfont'
>

</
span
>
不定项选择题
<
span
>
(共
{
examData
.
indefiniteChoiceCnt
}
题)
</
span
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
indefiniteChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
>
<
div
className=
"type"
>
<
span
className=
"icon iconfont"
>

</
span
>
不定项选择题
{
" "
}
<
span
>
(共
{
examData
.
indefiniteChoiceCnt
}
题)
</
span
>
</
div
>
</
div
>
</
div
>
...
...
@@ -257,11 +286,22 @@ function ExamData(props: any) {
</
Button
>
)
}
<
div
className=
'content'
>
<
Table
bordered
size=
'small'
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
Table
>
<
div
className=
"content"
>
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
bordered
size=
"small"
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
XMTable
>
{
total
>
0
&&
(
<
PageControl
size=
'small'
size=
"small"
current=
{
query
.
current
-
1
}
pageSize=
{
query
.
size
}
total=
{
total
}
...
...
src/modules/teach-tool/examination-manager/Index.tsx
View file @
6f9accee
...
...
@@ -11,6 +11,8 @@ import { XMContext } from '@/store/context';
import
ExamShareModal
from
'./ExamShareModal'
;
import
DataAnalysic
from
'./DataAnalysic'
;
import
PreviewModal
from
'./PreviewModal'
;
import
college
from
'@/common/lottie/college.json'
;
import
'./index.less'
;
const
{
RangePicker
}
=
DatePicker
;
const
{
Search
}
=
Input
;
...
...
@@ -425,6 +427,7 @@ function ExaminationManager(props: any) {
pagination=
{
false
}
style=
{
{
margin
:
'0px 0 16px'
}
}
renderEmpty=
{
{
image
:
college
,
description
:
<
span
style=
{
{
display
:
'block'
,
paddingBottom
:
24
}
}
>
暂无数据
</
span
>,
}
}
></
XMTable
>
{
total
>
0
&&
(
...
...
src/modules/teach-tool/examination-manager/UserData.tsx
View file @
6f9accee
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
Service
from
'@/common/js/service'
;
import
{
PageControl
}
from
'@/components'
;
import
{
Input
,
Select
,
Tooltip
,
Table
,
Button
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
User
from
'@/common/js/user'
;
import
moment
from
'moment'
;
import
'./userData.less'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
"react"
;
import
Service
from
"@/common/js/service"
;
import
{
PageControl
}
from
"@/components"
;
import
{
Input
,
Select
,
Tooltip
,
Table
,
Button
}
from
"antd"
;
import
{
ColumnsType
}
from
"antd/es/table"
;
import
User
from
"@/common/js/user"
;
import
moment
from
"moment"
;
import
{
XMTable
}
from
"@/components"
;
import
college
from
"@/common/lottie/college.json"
;
import
"./userData.less"
;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
declare
var
window
:
any
;
interface
sortType
{
type
:
'ascend'
|
'descend'
|
null
|
undefined
;
type
:
"ascend"
|
"descend"
|
null
|
undefined
;
}
interface
User
{
key
:
number
;
...
...
@@ -29,45 +31,45 @@ function DataAnalysic(props: any) {
const
[
list
,
setList
]
=
useState
([]);
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
field
,
setfield
]
=
useState
(
""
);
const
[
allData
,
setAllData
]
=
useState
(
0
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
userTypeEnum
=
{
WORK_WE_CHAT
:
'企业微信'
,
WE_CHAT
:
'微信'
,
WORK_WE_CHAT
:
"企业微信"
,
WE_CHAT
:
"微信"
,
};
const
userExamStateEnum
=
{
EXAM
:
'进行中'
,
LACK_EXAM
:
'缺考'
,
FINISH_EXAM
:
'已考试'
,
EXAM
:
"进行中"
,
LACK_EXAM
:
"缺考"
,
FINISH_EXAM
:
"已考试"
,
};
const
ExamPassColorEnum
=
{
EXAM_FAIL
:
'rgba(255, 79, 79, 1)'
,
EXAM_PASS
:
'rgba(59, 189, 170, 1)'
,
EXAM_FAIL
:
"rgba(255, 79, 79, 1)"
,
EXAM_PASS
:
"rgba(59, 189, 170, 1)"
,
};
const
ExamPassEnum
=
{
EXAM_FAIL
:
'不及格'
,
EXAM_PASS
:
'及格'
,
EXAM_FAIL
:
"不及格"
,
EXAM_PASS
:
"及格"
,
};
const
userExamStateColorEnum
=
{
EXAM
:
'rgba(35, 143, 255, 1)'
,
LACK_EXAM
:
'rgba(204, 204, 204, 1)'
,
FINISH_EXAM
:
'rgba(47, 200, 60, 1)'
,
EXAM
:
"rgba(35, 143, 255, 1)"
,
LACK_EXAM
:
"rgba(204, 204, 204, 1)"
,
FINISH_EXAM
:
"rgba(47, 200, 60, 1)"
,
};
const
orderEnum
=
{
score
:
{
ascend
:
'EXAM_SCORE_ASC'
,
descend
:
'EXAM_SCORE_DESC'
,
ascend
:
"EXAM_SCORE_ASC"
,
descend
:
"EXAM_SCORE_DESC"
,
},
userDuration
:
{
ascend
:
'USER_DURATION_ASC'
,
descend
:
'USER_DURATION_DESC'
,
ascend
:
"USER_DURATION_ASC"
,
descend
:
"USER_DURATION_DESC"
,
},
};
...
...
@@ -83,7 +85,7 @@ function DataAnalysic(props: any) {
},
[
query
]);
function
queryExamUserData
()
{
Service
.
Hades
(
'public/hades/queryExamUserData'
,
{
Service
.
Hades
(
"public/hades/queryExamUserData"
,
{
examId
:
props
.
examId
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
...
...
@@ -94,7 +96,7 @@ function DataAnalysic(props: any) {
}
function
queryExamUserDataList
()
{
Service
.
Hades
(
'public/hades/queryExamUserDataList'
,
{
Service
.
Hades
(
"public/hades/queryExamUserDataList"
,
{
...
query
,
examId
:
props
.
examId
,
tenantId
:
User
.
getStoreId
(),
...
...
@@ -111,79 +113,102 @@ function DataAnalysic(props: any) {
const
columns
:
ColumnsType
<
User
>
=
[
{
title
:
'学员'
,
dataIndex
:
'userName'
,
title
:
"学员"
,
dataIndex
:
"userName"
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
span
>
{
text
}
<
span
style=
{
{
color
:
record
.
userSource
===
'WORK_WE_CHAT'
?
'rgba(255, 157, 20, 1)'
:
'rgba(29, 204, 101, 1)'
}
}
>
<
span
style=
{
{
color
:
record
.
userSource
===
"WORK_WE_CHAT"
?
"rgba(255, 157, 20, 1)"
:
"rgba(29, 204, 101, 1)"
,
}
}
>
@
{
(
userTypeEnum
as
any
)[
record
.
userSource
]
}
</
span
>
</
span
>
),
},
{
title
:
'手机号'
,
dataIndex
:
'phone'
,
title
:
"手机号"
,
dataIndex
:
"phone"
,
},
{
title
:
'考试状态'
,
dataIndex
:
'userExamState'
,
title
:
"考试状态"
,
dataIndex
:
"userExamState"
,
render
:
(
text
:
any
)
=>
(
<
span
>
{
' '
}
<
span
className=
'exstatus'
style=
{
{
background
:
(
userExamStateColorEnum
as
any
)[
text
]
}
}
></
span
>
{
(
userExamStateEnum
as
any
)[
text
]
}
{
" "
}
<
span
className=
"exstatus"
style=
{
{
background
:
(
userExamStateColorEnum
as
any
)[
text
]
}
}
></
span
>
{
" "
}
{
(
userExamStateEnum
as
any
)[
text
]
}
</
span
>
),
},
{
title
:
'考试成绩'
,
dataIndex
:
'score'
,
title
:
"考试成绩"
,
dataIndex
:
"score"
,
sorter
:
true
,
sortOrder
:
field
===
'score'
?
order
:
sortStatus
.
type
,
sortOrder
:
field
===
"score"
?
order
:
sortStatus
.
type
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
span
>
{
' '
}
{
text
}{
' '
}
{
" "
}
{
text
}{
" "
}
<
span
style=
{
{
border
:
`1px solid ${(ExamPassColorEnum as any)[record.examPass]}`
,
border
:
`1px solid ${
(ExamPassColorEnum as any)[record.examPass]
}`
,
fontSize
:
12
,
color
:
(
ExamPassColorEnum
as
any
)[
record
.
examPass
],
display
:
'inline-block'
,
padding
:
'0px 2px'
,
}
}
>
display
:
"inline-block"
,
padding
:
"0px 2px"
,
}
}
>
{
(
ExamPassEnum
as
any
)[
record
.
examPass
]
}
</
span
>
</
span
>
),
},
{
title
:
'进入考试时间'
,
dataIndex
:
'examStartTime'
,
render
:
(
text
:
any
)
=>
<
span
>
{
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm'
)
}
</
span
>,
title
:
"进入考试时间"
,
dataIndex
:
"examStartTime"
,
render
:
(
text
:
any
)
=>
(
<
span
>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
),
},
{
title
:
'考试用时'
,
dataIndex
:
'userDuration'
,
title
:
"考试用时"
,
dataIndex
:
"userDuration"
,
sorter
:
true
,
sortOrder
:
field
===
'userDuration'
?
order
:
sortStatus
.
type
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
record
.
userExamState
===
'FINISH_EXAM'
?
window
.
formatHourTime
(
text
)
:
'-'
}
</
span
>,
sortOrder
:
field
===
"userDuration"
?
order
:
sortStatus
.
type
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
span
>
{
record
.
userExamState
===
"FINISH_EXAM"
?
window
.
formatHourTime
(
text
)
:
"-"
}{
" "
}
</
span
>
),
},
//TODO:
{
title
:
'操作'
,
key
:
''
,
dataIndex
:
'edit'
,
title
:
"操作"
,
key
:
""
,
dataIndex
:
"edit"
,
render
:
(
value
:
any
,
record
:
any
)
=>
{
return
(
<
Choose
>
<
When
condition=
{
record
.
userExamState
===
'FINISH_EXAM'
}
>
<
When
condition=
{
record
.
userExamState
===
"FINISH_EXAM"
}
>
<
div
className=
'answer-detail'
className=
"answer-detail"
onClick=
{
()
=>
{
checkAnswerDetail
(
record
);
}
}
>
}
}
>
答题详情
</
div
>
</
When
>
...
...
@@ -204,16 +229,16 @@ function DataAnalysic(props: any) {
}
function
download
()
{
Service
.
Hades
(
'public/hades/exportExamData'
,
{
Service
.
Hades
(
"public/hades/exportExamData"
,
{
// ...query,
examId
:
props
.
examId
,
exportDataType
:
'EXAM_USER_DATA'
,
exportDataType
:
"EXAM_USER_DATA"
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
source
:
0
,
}).
then
((
res
)
=>
{
const
dom
=
(
document
as
any
).
getElementById
(
'load-play-back-excel'
);
dom
.
setAttribute
(
'href'
,
res
.
result
);
const
dom
=
(
document
as
any
).
getElementById
(
"load-play-back-excel"
);
dom
.
setAttribute
(
"href"
,
res
.
result
);
dom
.
click
();
});
}
...
...
@@ -227,69 +252,92 @@ function DataAnalysic(props: any) {
}
return
(
<
div
className=
'rr'
>
<
a
target=
'_blank'
download
id=
'load-play-back-excel'
style=
{
{
position
:
'absolute'
,
left
:
'-10000px'
}
}
>
<
div
className=
"rr"
>
<
a
target=
"_blank"
download
id=
"load-play-back-excel"
style=
{
{
position
:
"absolute"
,
left
:
"-10000px"
}
}
>
111
</
a
>
<
div
className=
'dataPanal'
>
<
div
className=
'item'
>
<
div
className=
'num'
>
{
useData
.
joinCnt
||
0
}
</
div
>
<
div
className=
'percent'
></
div
>
<
div
className=
'subTitle'
>
参与人数
</
div
>
<
div
className=
"dataPanal"
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
useData
.
joinCnt
||
0
}
</
div
>
<
div
className=
"percent"
></
div
>
<
div
className=
"subTitle"
>
参与人数
</
div
>
</
div
>
<
div
className=
'item'
>
<
div
className=
'num'
>
{
useData
.
finishCnt
||
0
}
</
div
>
<
div
className=
'percent'
>
占比
{
parseInt
(((
useData
.
finishCnt
||
0
)
/
(
useData
.
joinCnt
||
1
))
*
100
+
''
)
}
%
</
div
>
<
div
className=
'subTitle'
>
完成考试数 (人)
</
div
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
useData
.
finishCnt
||
0
}
</
div
>
<
div
className=
"percent"
>
占比
{
parseInt
(
((
useData
.
finishCnt
||
0
)
/
(
useData
.
joinCnt
||
1
))
*
100
+
""
)
}
%
</
div
>
<
div
className=
"subTitle"
>
完成考试数 (人)
</
div
>
</
div
>
<
div
className=
'item'
>
<
div
className=
'num'
>
{
useData
.
passCnt
||
0
}
</
div
>
<
div
className=
'percent'
>
占比
{
parseInt
(((
useData
.
passCnt
||
0
)
/
(
useData
.
finishCnt
||
1
))
*
100
+
''
)
}
%
</
div
>
<
div
className=
'subTitle'
>
及格数 (人)
</
div
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
useData
.
passCnt
||
0
}
</
div
>
<
div
className=
"percent"
>
占比
{
parseInt
(
((
useData
.
passCnt
||
0
)
/
(
useData
.
finishCnt
||
1
))
*
100
+
""
)
}
%
</
div
>
<
div
className=
"subTitle"
>
及格数 (人)
</
div
>
</
div
>
<
div
className=
'item'
>
<
div
className=
'num'
>
{
useData
.
averageScore
||
0
}
</
div
>
<
div
className=
'percent'
>
总分
{
props
.
examDetail
?.
examPaper
?.
totalScore
}
</
div
>
<
div
className=
'subTitle'
>
平均分
</
div
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
useData
.
averageScore
||
0
}
</
div
>
<
div
className=
"percent"
>
总分
{
props
.
examDetail
?.
examPaper
?.
totalScore
}
</
div
>
<
div
className=
"subTitle"
>
平均分
</
div
>
</
div
>
<
div
className=
'item'
>
<
div
className=
'num'
>
{
window
.
formatHourTime
(
useData
.
averageDuration
||
0
)
}
</
div
>
<
div
className=
'percent'
></
div
>
<
div
className=
'subTitle'
>
平均用时
</
div
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
" "
}
{
window
.
formatHourTime
(
useData
.
averageDuration
||
0
)
}{
" "
}
</
div
>
<
div
className=
"percent"
></
div
>
<
div
className=
"subTitle"
>
平均用时
</
div
>
</
div
>
</
div
>
<
div
className=
'xm-search-filter'
style=
{
{
marginTop
:
'24px'
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
div
className=
'search-condition'
>
<
div
className=
'search-condition__item'
>
<
span
className=
'search-name'
>
学员:
</
span
>
<
div
className=
"xm-search-filter"
style=
{
{
marginTop
:
"24px"
}
}
>
<
div
style=
{
{
display
:
"flex"
}
}
>
<
div
className=
"search-condition"
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-name"
>
学员:
</
span
>
<
Search
value=
{
query
.
examName
}
className=
'search-input'
placeholder=
'搜索学员名或手机号'
className=
"search-input"
placeholder=
"搜索学员名或手机号"
onChange=
{
(
e
)
=>
{
const
_query
=
{
...
query
};
_query
.
searchKey
=
e
.
target
.
value
;
setQuery
(
_query
);
}
}
onSearch=
{
()
=>
{}
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
enterButton=
{
<
span
className=
"icon iconfont"
>

</
span
>
}
/>
</
div
>
<
div
className=
'search-condition__item'
>
<
span
className=
'search-name'
>
学员类型:
</
span
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-name"
>
学员类型:
</
span
>
<
Select
value=
{
query
.
userSource
}
placeholder=
'请选择学员类型'
placeholder=
"请选择学员类型"
onChange=
{
(
val
)
=>
{
const
_query
=
{
...
query
};
_query
.
userSource
=
val
;
setQuery
(
_query
);
}
}
className=
'search-input'
allowClear
>
className=
"search-input"
allowClear
>
{
Object
.
keys
(
userTypeEnum
).
map
((
key
:
any
)
=>
{
return
(
<
Option
value=
{
key
}
key=
{
key
}
>
...
...
@@ -300,18 +348,19 @@ function DataAnalysic(props: any) {
</
Select
>
</
div
>
<
div
className=
'search-condition__item'
>
<
span
className=
'search-name'
>
考试状态:
</
span
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-name"
>
考试状态:
</
span
>
<
Select
value=
{
query
.
userExamState
}
placeholder=
'请选择考试状态'
placeholder=
"请选择考试状态"
onChange=
{
(
val
)
=>
{
const
_query
=
{
...
query
};
_query
.
userExamState
=
val
;
setQuery
(
_query
);
}
}
className=
'search-input'
allowClear
>
className=
"search-input"
allowClear
>
{
Object
.
keys
(
userExamStateEnum
).
map
((
key
:
any
)
=>
{
return
(
<
Option
value=
{
key
}
key=
{
key
}
>
...
...
@@ -322,15 +371,16 @@ function DataAnalysic(props: any) {
</
Select
>
</
div
>
</
div
>
<
div
className=
'reset-fold-area'
>
<
Tooltip
title=
'清空筛选'
>
<
div
className=
"reset-fold-area"
>
<
Tooltip
title=
"清空筛选"
>
<
span
className=
'resetBtn iconfont icon'
className=
"resetBtn iconfont icon"
onClick=
{
()
=>
{
setfield
(
''
);
setfield
(
""
);
setQuery
({
current
:
1
,
size
:
10
});
}
}
>

{
' '
}
}
}
>

{
" "
}
</
span
>
</
Tooltip
>
</
div
>
...
...
@@ -342,11 +392,23 @@ function DataAnalysic(props: any) {
</
Button
>
)
}
<
div
className=
'content analysic-content'
>
<
Table
bordered
size=
'small'
rowClassName=
'analysic-content-row'
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
Table
>
<
div
className=
"content analysic-content"
>
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
}
}
bordered
size=
"small"
rowClassName=
"analysic-content-row"
columns=
{
columns
}
dataSource=
{
list
}
onChange=
{
onChange
}
pagination=
{
false
}
></
XMTable
>
{
total
>
0
&&
(
<
PageControl
size=
'small'
size=
"small"
current=
{
query
.
current
-
1
}
pageSize=
{
query
.
size
}
total=
{
total
}
...
...
src/modules/teach-tool/paper-manage/components/PaperList.jsx
View file @
6f9accee
...
...
@@ -31,6 +31,8 @@ import _ from "underscore";
import
PaperPreviewModal
from
"../modal/PreviewPaperModal"
;
import
MoveModal
from
'../../modal/MoveModal'
;
import
Bus
from
"@/core/bus"
;
import
college
from
'@/common/lottie/college'
;
const
{
Search
}
=
Input
;
...
...
@@ -625,6 +627,7 @@ class PaperList extends Component {
bordered
loading=
{
loading
}
renderEmpty=
{
{
image
:
college
,
description
:
<
span
style=
{
{
display
:
'block'
,
paddingBottom
:
24
}
}
>
还没有试卷
</
span
>
}
}
/>
...
...
@@ -641,6 +644,7 @@ class PaperList extends Component {
pagination=
{
false
}
bordered
renderEmpty=
{
{
image
:
college
,
description
:
<
span
style=
{
{
display
:
'block'
,
paddingBottom
:
24
}
}
>
还没有试卷
</
span
>
}
}
/>
...
...
src/modules/teach-tool/paper-manage/components/SelectQuestionList.jsx
View file @
6f9accee
...
...
@@ -25,6 +25,8 @@ import AidToolService from "@/domains/aid-tool-domain/AidToolService";
import
_
from
"underscore"
;
import
Bus
from
"@/core/bus"
;
import
moment
from
'moment'
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college'
;
const
{
Search
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -201,19 +203,6 @@ class SelectQuestionList extends Component {
return
columns
;
};
// 自定义表格空状态
customizeRenderEmpty
=
()
=>
{
return
(
<
Empty
image=
"https://image.xiaomaiketang.com/xm/emptyTable.png"
imageStyle=
{
{
height
:
100
,
}
}
description=
{
"还没有题目"
}
></
Empty
>
);
};
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
==
size
)
{
return
;
...
...
@@ -431,8 +420,11 @@ class SelectQuestionList extends Component {
)
}
</
div
>
<
div
className=
"select-question-content"
>
<
ConfigProvider
renderEmpty=
{
this
.
customizeRenderEmpty
}
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'还没有题目'
}
}
rowSelection=
{
rowSelection
}
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
dataSource
}
...
...
@@ -441,7 +433,6 @@ class SelectQuestionList extends Component {
onChange=
{
this
.
handleChangeTable
}
bordered
/>
</
ConfigProvider
>
<
div
className=
"box-footer"
>
<
PageControl
current=
{
current
-
1
}
...
...
src/modules/teach-tool/question-manage/components/QuestionList.jsx
View file @
6f9accee
...
...
@@ -7,7 +7,7 @@
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
'react'
;
import
{
Table
,
ConfigProvider
,
Empty
,
Row
,
Input
,
Select
,
Tooltip
,
Space
,
Button
,
Modal
,
message
,
Menu
,
Dropdown
,
DatePicker
}
from
'antd'
;
import
{
Row
,
Input
,
Select
,
Tooltip
,
Space
,
Button
,
Modal
,
message
,
Menu
,
Dropdown
,
DatePicker
}
from
'antd'
;
import
_
from
'underscore'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
{
DownOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -21,6 +21,8 @@ import Bus from '@/core/bus';
import
moment
from
'moment'
;
import
Service
from
'@/common/js/service'
;
import
MoveModal
from
'../../modal/MoveModal'
;
import
college
from
'@/common/lottie/college'
;
import
'./QuestionList.less'
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -671,6 +673,7 @@ class QuestionList extends Component {
onChange=
{
this
.
handleChangeTable
}
rowSelection=
{
rowSelection
}
renderEmpty=
{
{
image
:
college
,
description
:
(
<
span
style=
{
{
display
:
'block'
,
paddingBottom
:
24
}
}
>
<
span
>
还没有题目
</
span
>
...
...
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