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
25189f3f
Commit
25189f3f
authored
Aug 11, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
50ceb59d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
16 deletions
+141
-16
src/modules/task-center/data-center/Index.tsx
+1
-1
src/modules/task-center/data-center/components/ExamTable.tsx
+111
-4
src/modules/task-center/data-center/components/StudyTable.tsx
+29
-11
No files found.
src/modules/task-center/data-center/Index.tsx
View file @
25189f3f
...
...
@@ -63,7 +63,7 @@ function DataCenter(props: any) {
tabList
.
map
((
item
:
any
)
=>
{
return
<
TabPane
tab=
{
item
.
name
}
key=
{
item
.
key
}
>
{
<
item
.
compoment
info=
{
info
}
/>
<
item
.
compoment
info=
{
info
}
taskId=
{
taskId
}
/>
}
</
TabPane
>
})
...
...
src/modules/task-center/data-center/components/ExamTable.tsx
View file @
25189f3f
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
;
function
CourseTable
(
props
:
any
)
{
return
<
div
className=
"info_banner"
>
function
ExamTable
(
props
:
any
)
{
const
[
query
,
setQuery
]
=
useState
<
any
>
({
current
:
1
,
size
:
10
,
taskId
:
props
.
taskId
,
source
:
0
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
});
const
[
list
,
setList
]
=
useState
<
any
[]
>
([]);
const
[
total
,
setTotal
]
=
useState
<
any
>
(
0
);
useEffect
(()
=>
{
getList
()
},
[
query
])
function
getList
()
{
Service
.
Hades
(
'public/hades/queryTrainingExamUserData'
,
query
).
then
((
res
:
any
)
=>
{
setList
(
res
.
result
.
records
)
setTotal
(
res
.
result
.
tatal
)
})
}
const
columns
=
[
{
title
:
'考试名称'
,
key
:
'examName'
,
},
{
title
:
'完成人数'
,
key
:
'finishCnt'
,
dataIndex
:
'finishCnt'
,
},
{
title
:
'平均分'
,
key
:
'averageScore'
,
dataIndex
:
'averageScore'
,
},
{
title
:
'及格人数'
,
key
:
'passCnt'
,
dataIndex
:
'passCnt'
,
},
{
title
:
'及格率'
,
key
:
'passPercentage'
,
dataIndex
:
'passPercentage'
,
render
:
(
val
:
any
,
record
:
any
)
=>
{
return
<
div
></
div
>;
},
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
val
:
any
,
record
:
any
)
=>
{
return
(
<
div
className=
'operate-area'
>
<
span
className=
'operate-item'
onClick=
{
()
=>
{
}
}
>
查看数据
</
span
>
</
div
>
);
},
},
];
return
<
div
className=
"study_Table"
>
<
div
style=
{
{
marginTop
:
12
}
}
>
<
XMTable
renderEmpty=
{
{
type
:
'college'
,
description
:
'暂无数据'
,
}
}
rowKey=
{
(
record
:
any
)
=>
record
.
storeCustomerId
}
dataSource=
{
list
}
columns=
{
columns
}
pagination=
{
false
}
className=
'user-learning-table'
onChange=
{
()
=>
{
}
}
showSorterTooltip=
{
false
}
bordered
/>
{
list
.
length
>
0
&&
(
<
div
className=
'box-footer'
>
<
PageControl
current=
{
query
.
current
-
1
}
pageSize=
{
query
.
size
}
total=
{
total
}
toPage=
{
(
page
:
any
)
=>
{
setQuery
({
...
query
,
current
:
query
.
current
+
1
})
}
}
/>
</
div
>
)
}
</
div
>
</
div
>
}
export
default
withRouter
(
CourseTable
)
\ No newline at end of file
export
default
withRouter
(
ExamTable
)
\ No newline at end of file
src/modules/task-center/data-center/components/StudyTable.tsx
View file @
25189f3f
...
...
@@ -3,7 +3,9 @@ import { Route, withRouter } from "react-router-dom";
import
{
Row
,
Input
,
Select
,
Tooltip
,
Col
}
from
'antd'
;
import
RangePicker
from
'@/modules/common/DateRangePicker'
;
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
Service
from
'@/common/js/service'
;
import
ENUM
from
'../../enum'
;
import
User
from
'@/common/js/user'
;
import
moment
from
'moment'
;
import
UserLearningData
from
'../UserLearningData'
;
const
{
Search
}
=
Input
;
...
...
@@ -11,16 +13,32 @@ const { Option } = Select;
declare
var
formatDate
:
any
;
function
StudyTable
(
props
:
any
)
{
const
[
query
,
setQuery
]
=
useState
<
any
>
({
current
:
1
,
size
:
10
});
const
[
list
,
setList
]
=
useState
<
any
[]
>
([
{
storeCustomerName
:
'yat'
,
learnState2
:
'技术部'
,
learnState1
:
'前端'
,
learnState
:
'UN_PLAY'
,
}
]);
const
[
total
,
setTotal
]
=
useState
<
any
>
(
0
);
const
[
query
,
setQuery
]
=
useState
<
any
>
({
current
:
1
,
size
:
10
,
taskId
:
props
.
taskId
,
source
:
0
,
storeId
:
User
.
getStoreId
(),
storeUserId
:
User
.
getStoreUserId
(),
userId
:
User
.
getStoreUserId
(),
});
const
[
list
,
setList
]
=
useState
<
any
[]
>
([]);
const
[
total
,
setTotal
]
=
useState
<
any
>
(
0
);
useEffect
(()
=>
{
getList
()
},
[
query
])
function
getList
()
{
Service
.
Hades
(
'public/hades/getTaskCustomerRecordPage'
,
query
).
then
((
res
:
any
)
=>
{
setList
(
res
.
result
.
records
)
setTotal
(
res
.
result
.
tatal
)
})
}
const
columns
=
[
{
...
...
@@ -200,7 +218,7 @@ function StudyTable(props: any) {
pageSize=
{
query
.
size
}
total=
{
total
}
toPage=
{
(
page
:
any
)
=>
{
setQuery
({
...
query
,
current
:
query
.
current
+
1
})
}
}
/>
...
...
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