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
5ef66a49
Commit
5ef66a49
authored
Aug 02, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a7e01f18
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
167 additions
and
7 deletions
+167
-7
src/modules/task-center/data-center/Index.tsx
+30
-5
src/modules/task-center/data-center/components/1.tsx
+12
-0
src/modules/task-center/data-center/components/DataInfo.tsx
+37
-0
src/modules/task-center/data-center/index.less
+60
-0
src/modules/task-center/emun.ts
+23
-0
src/modules/task-center/train-task/TrainTaskPage.jsx
+1
-1
src/modules/task-center/train-task/components/TrainList.jsx
+4
-1
No files found.
src/modules/task-center/data-center/Index.tsx
View file @
5ef66a49
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Tabs
}
from
'antd'
;
import
Service
from
'@/common/js/service'
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
DataInfo
from
'./components/DataInfo'
import
'./index.less'
export
default
function
DataCenter
(){
function
DataCenter
(
props
:
any
)
{
const
{
match
:
{
params
:
{
planId
}
}
}
=
props
;
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
return
<
div
className=
"page"
>
useEffect
(()
=>
{
eweew
getInfo
()
},
[])
function
getInfo
()
{
Service
.
Hades
(
'public/hades/getTrainingPlanDetail'
,
{
planId
}).
then
((
res
:
any
)
=>
{
setInfo
(
res
.
result
)
})
}
return
<
div
className=
"page train-data-center"
>
<
Breadcrumbs
navList=
"培训任务详情"
goBack=
{
()
=>
{
props
.
history
.
goBack
();
}
}
/>
<
DataInfo
info=
{
info
}
/>
</
div
>
</
div
>
}
}
\ No newline at end of file
export
default
withRouter
(
DataCenter
)
src/modules/task-center/data-center/components/1.tsx
0 → 100644
View file @
5ef66a49
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
function
DataInfo
(
props
:
any
)
{
return
<
div
className=
"info_banner"
>
</
div
>
}
export
default
withRouter
(
DataInfo
)
\ No newline at end of file
src/modules/task-center/data-center/components/DataInfo.tsx
0 → 100644
View file @
5ef66a49
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
import
ENUM
from
'../../emun'
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
function
DataInfo
(
props
:
any
)
{
return
<
div
className=
"infoBox"
>
<
div
className=
"left"
>
<
div
className=
"banner"
>
<
img
src=
{
props
.
info
.
coverUrl
||
defaultCover
}
alt=
""
/>
</
div
>
<
div
className=
"textBox"
>
<
div
className=
"nameBox"
>
<
div
className=
"name"
>
{
props
.
info
.
planName
}
</
div
>
<
div
className=
"status"
style=
{
{
color
:
ENUM
.
trainStatus
[
props
.
info
.
status
||
'UN_START'
].
color
,
background
:
ENUM
.
trainStatus
[
props
.
info
.
status
||
'UN_START'
].
background
}
}
>
{
ENUM
.
trainStatus
[
props
.
info
.
status
||
'UN_START'
].
text
}
</
div
>
</
div
>
<
div
className=
"info"
>
<
span
>
{
`创建人: 文小白 `
}
</
span
>
<
span
style=
{
{
marginLeft
:
24
}
}
>
{
`培训时间:2021-07-01 00:00 至 2021-08-17 00:00`
}
</
span
>
</
div
>
<
div
className=
"info"
>
<
div
className=
"item"
>
{
`任务数: 98`
}
</
div
>
<
div
className=
"item"
>
{
`课程:98`
}
</
div
>
<
div
className=
"item"
>
{
`作业:4`
}
</
div
>
<
div
className=
"item"
>
{
`考试:4`
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"right"
></
div
>
</
div
>
}
export
default
withRouter
(
DataInfo
)
\ No newline at end of file
src/modules/task-center/data-center/index.less
0 → 100644
View file @
5ef66a49
.train-data-center{
.infoBox{
background: #FFFFFF;
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.05);
border-radius: 2px;
display: flex;
height: 141px;
justify-content: space-between;
margin: 0 16px 16px;
.left{
display: flex;
.banner{
margin-right: 16px;
img{
height: 141px;
}
}
.textBox{
padding-top: 1px;
.nameBox{
margin-top: 12px;
margin-bottom: 34px;
display: flex;
.name{
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 25px;
}
.status{
width: 42px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999999;
line-height: 20px;
text-align: center;
margin-left: 24px;
}
}
.info{
span,.item{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
}
}
}
}
}
}
\ No newline at end of file
src/modules/task-center/emun.ts
0 → 100644
View file @
5ef66a49
const
ENUM
:
any
=
{
trainStatus
:
{
UN_START
:
{
text
:
"未开始"
,
color
:
"rgba(255, 178, 0, 1)"
,
background
:
"rgba(255, 178, 0, 0.1)"
,
},
STARTING
:
{
text
:
"进行中"
,
color
:
"rgba(41, 102, 255, 1)"
,
background
:
"rgba(41, 102, 255, 0.1)"
,
},
FINISH
:
{
text
:
"已结束"
,
color
:
"rgba(153, 153, 153, 1)"
,
background
:
"rgba(153, 153, 153, 0.1)"
,
},
}
}
export
default
ENUM
\ No newline at end of file
src/modules/task-center/train-task/TrainTaskPage.jsx
View file @
5ef66a49
...
@@ -53,7 +53,7 @@ function TrainTaskPage(props) {
...
@@ -53,7 +53,7 @@ function TrainTaskPage(props) {
<
TrainFilter
onChange=
{
queryChange
}
/>
<
TrainFilter
onChange=
{
queryChange
}
/>
<
TrainList
trainListData=
{
trainListData
}
query=
{
query
}
totalCount=
{
totalCount
}
onChange=
{
queryChange
}
/>
<
TrainList
trainListData=
{
trainListData
}
query=
{
query
}
totalCount=
{
totalCount
}
onChange=
{
queryChange
}
/>
</
div
>
</
div
>
<
Route
path=
{
`${match.url}/data`
}
component=
{
DataCenter
}
/>
<
Route
path=
{
`${match.url}/data
/:planId
`
}
component=
{
DataCenter
}
/>
</
div
>
</
div
>
);
);
}
}
...
...
src/modules/task-center/train-task/components/TrainList.jsx
View file @
5ef66a49
...
@@ -19,6 +19,7 @@ function TrainList(props) {
...
@@ -19,6 +19,7 @@ function TrainList(props) {
const
{
const
{
query
:
{
issueState
,
myAssist
,
current
,
size
},
query
:
{
issueState
,
myAssist
,
current
,
size
},
totalCount
,
totalCount
,
match
}
=
props
;
}
=
props
;
function
renderMoreOperate
(
item
)
{
function
renderMoreOperate
(
item
)
{
...
@@ -162,7 +163,9 @@ function TrainList(props) {
...
@@ -162,7 +163,9 @@ function TrainList(props) {
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
(
<
div
className=
'operate'
>
<
div
className=
'operate'
>
<
div
className=
'operate__item'
onClick=
{
()
=>
toLearningDataPage
(
record
)
}
>
<
div
className=
'operate__item'
onClick=
{
()
=>
{
props
.
history
.
push
(
`${match.path}/data/${record.planId}`
)
}
}
>
数据
数据
</
div
>
</
div
>
{
record
.
enableState
===
'YES'
&&
(
{
record
.
enableState
===
'YES'
&&
(
...
...
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