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
bf272604
Commit
bf272604
authored
Apr 09, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fix'
parent
a0da10ee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
21 deletions
+39
-21
src/modules/common/TeacherSelect.tsx
+3
-1
src/modules/teach-tool/examination-manager/ExamData.tsx
+8
-1
src/modules/teach-tool/examination-manager/Index.tsx
+10
-7
src/modules/teach-tool/examination-manager/UserData.tsx
+18
-12
No files found.
src/modules/common/TeacherSelect.tsx
View file @
bf272604
...
...
@@ -10,7 +10,8 @@ export default function ExaminationManager(props: any) {
const
teacherQueryInit
:
any
=
{};
const
[
teacherQuery
,
setTeacherQuery
]
=
useState
({
current
:
1
,
size
:
10
size
:
10
,
roleCodes
:
props
.
roleCodes
});
const
[
teacherList
,
setTeacherList
]
=
useState
([]);
const
[
hasNext
,
setHasNext
]
=
useState
(
true
);
...
...
@@ -68,6 +69,7 @@ export default function ExaminationManager(props: any) {
onClear=
{
()
=>
{
props
.
onChange
(
null
)
setTeacherQuery
({
roleCodes
:
props
.
roleCodes
,
current
:
1
,
size
:
10
})
...
...
src/modules/teach-tool/examination-manager/ExamData.tsx
View file @
bf272604
...
...
@@ -25,6 +25,7 @@ function ExamData(props: any) {
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
allData
,
setAllData
]
=
useState
(
0
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
questionTypeList
=
{
SINGLE_CHOICE
:
"单选题"
,
...
...
@@ -88,6 +89,9 @@ function ExamData(props: any) {
}).
then
((
res
)
=>
{
setList
(
res
.
result
.
records
);
setTotal
(
parseInt
(
res
.
result
.
total
))
if
(
!
allData
)
{
setAllData
(
parseInt
(
res
.
result
.
total
))
}
})
}
...
...
@@ -214,7 +218,10 @@ function ExamData(props: any) {
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
不定项选择题
<
span
>
(共
{
examData
.
indefiniteChoiceCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
<
Button
style=
{
{
marginBottom
:
12
,
marginTop
:
12
}
}
onClick=
{
download
}
>
导出
</
Button
>
{
!!
allData
&&
<
Button
style=
{
{
marginBottom
:
12
,
marginTop
:
12
}
}
onClick=
{
download
}
>
导出
</
Button
>
}
<
div
className=
"content"
>
<
Table
...
...
src/modules/teach-tool/examination-manager/Index.tsx
View file @
bf272604
...
...
@@ -238,11 +238,11 @@ function ExaminationManager(props: any) {
}
function
getList
()
{
const
_query
=
{...
query
};
const
_query
=
{
...
query
};
// if(_query.examCreator){
// _query.examCreator =parseInt(_query.examCreator)
// }
Service
.
Hades
(
"public/hades/queryExamPageList"
,
{
...
_query
,
userId
:
User
.
getStoreUserId
(),
tenantId
:
User
.
getStoreId
(),
...
...
@@ -294,12 +294,15 @@ function ExaminationManager(props: any) {
/>
</
div
>
<
TeacherSelect
val=
{
query
.
examCreator
}
onChange=
{
(
examCreator
:
any
)
=>
{
<
TeacherSelect
val=
{
query
.
examCreator
}
onChange=
{
(
examCreator
:
any
)
=>
{
const
_query
=
{
...
query
}
_query
.
examCreator
=
examCreator
;
setQuery
(
_query
);
}
}
></
TeacherSelect
>
const
_query
=
{
...
query
}
_query
.
examCreator
=
examCreator
;
setQuery
(
_query
);
}
}
roleCodes=
{
[
"CloudManager"
]
}
></
TeacherSelect
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-name"
>
考试时间:
</
span
>
...
...
src/modules/teach-tool/examination-manager/UserData.tsx
View file @
bf272604
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
{
Input
,
Select
,
Tooltip
,
Table
,
Button
}
from
'antd'
;
import
User
from
"@/common/js/user"
;
import
moment
from
'moment'
;
import
'./userData.less'
...
...
@@ -25,6 +25,7 @@ function DataAnalysic(props: any) {
const
[
query
,
setQuery
]
=
useState
(
queryInit
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
field
,
setfield
]
=
useState
(
''
);
const
[
allData
,
setAllData
]
=
useState
(
0
);
const
[
order
,
setOrder
]
=
useState
(
sortStatus
.
type
);
const
userTypeEnum
=
{
...
...
@@ -103,6 +104,9 @@ function DataAnalysic(props: any) {
}).
then
((
res
)
=>
{
setList
(
res
.
result
.
records
);
setTotal
(
parseInt
(
res
.
result
.
total
))
if
(
!
allData
)
{
setAllData
(
parseInt
(
res
.
result
.
total
))
}
})
}
...
...
@@ -154,21 +158,21 @@ function DataAnalysic(props: any) {
setOrder
(
sorter
.
order
)
console
.
log
(
sorter
.
field
,
sorter
.
order
,
(
orderEnum
as
any
)[
sorter
.
field
])
let
_query
:
any
=
{
...
queryRef
.
current
};
_query
.
order
=
(
orderEnum
as
any
)[
sorter
.
field
][
sorter
.
order
]
_query
.
order
=
(
orderEnum
as
any
)[
sorter
.
field
][
sorter
.
order
]
setQuery
(
_query
)
}
function
download
(){
function
download
()
{
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
();
})
...
...
@@ -177,12 +181,12 @@ function DataAnalysic(props: any) {
return
<
div
className=
"rr"
>
<
a
target=
"_blank"
download
id=
"load-play-back-excel"
style=
{
{
position
:
"absolute"
,
left
:
"-10000px"
}
}
target=
"_blank"
download
id=
"load-play-back-excel"
style=
{
{
position
:
"absolute"
,
left
:
"-10000px"
}
}
>
111
111
</
a
>
<
div
className=
"dataPanal"
>
<
div
className=
"item"
>
...
...
@@ -275,8 +279,10 @@ function DataAnalysic(props: any) {
</
div
>
</
div
>
</
div
>
{
!!
allData
&&
<
Button
style=
{
{
marginBottom
:
12
}
}
onClick=
{
download
}
>
导出
</
Button
>
}
<
Button
style=
{
{
marginBottom
:
12
}
}
onClick=
{
download
}
>
导出
</
Button
>
<
div
className=
"content"
>
<
Table
...
...
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