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
52a7b420
Commit
52a7b420
authored
Jul 30, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新建培训任务页面部分开发
parent
14cd1beb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
54 deletions
+134
-54
src/modules/task-center/train-task/AddTrainTask.jsx
+4
-3
src/modules/task-center/train-task/TrainTaskPage.jsx
+3
-5
src/modules/task-center/train-task/components/BasicInfo.jsx
+0
-0
src/modules/task-center/train-task/components/BasicInfo.less
+66
-4
src/modules/task-center/train-task/components/TrainContent.jsx
+28
-0
src/modules/task-center/train-task/components/TrainList.jsx
+30
-10
src/modules/task-center/train-task/components/TrainList.less
+3
-2
src/modules/task-center/train-task/components/TrainOpt.jsx
+0
-30
No files found.
src/modules/task-center/train-task/AddTrainTask.jsx
View file @
52a7b420
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-29 13:57:03
* @Date: 2021-07-29 13:57:03
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-30 1
0:07:51
* @LastEditTime: 2021-07-30 1
6:35:59
* @Description: 任务中心-培训任务-新建页面
* @Description: 任务中心-培训任务-新建页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -12,7 +12,7 @@ import { Button, Tabs, message, Modal } from 'antd';
...
@@ -12,7 +12,7 @@ import { Button, Tabs, message, Modal } from 'antd';
import
ShowTips
from
'@/components/ShowTips'
;
import
ShowTips
from
'@/components/ShowTips'
;
import
Breadcrumbs
from
'@/components/Breadcrumbs'
;
import
Breadcrumbs
from
'@/components/Breadcrumbs'
;
import
BasicInfo
from
'./components/BasicInfo'
;
import
BasicInfo
from
'./components/BasicInfo'
;
// import TrainingTask from './components/TrainingTask
';
import
TrainContent
from
'./components/TrainContent
'
;
// import ExpiredCourseList from './components/ExpiredCourseList';
// import ExpiredCourseList from './components/ExpiredCourseList';
import
PlanService
from
'@/domains/plan-domain/planService'
;
import
PlanService
from
'@/domains/plan-domain/planService'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
...
@@ -28,6 +28,7 @@ const DEFAULT_BASIC_INFO = {
...
@@ -28,6 +28,7 @@ const DEFAULT_BASIC_INFO = {
coverUrl
:
defaultCover
,
coverUrl
:
defaultCover
,
coverId
:
null
,
coverId
:
null
,
durationType
:
'NEVER_EXPIRES'
,
durationType
:
'NEVER_EXPIRES'
,
learnType
:
'FREEDOM'
,
enableState
:
'YES'
,
enableState
:
'YES'
,
selectOperatorList
:
[],
selectOperatorList
:
[],
instro
:
''
,
instro
:
''
,
...
@@ -92,7 +93,7 @@ function AddTrainTask() {
...
@@ -92,7 +93,7 @@ function AddTrainTask() {
<
BasicInfo
data=
{
basicInfo
}
onChange=
{
handleChangeBasicInfo
}
/>
<
BasicInfo
data=
{
basicInfo
}
onChange=
{
handleChangeBasicInfo
}
/>
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
'2 培训内容'
key=
'TRAIN_CONTENT'
>
<
TabPane
tab=
'2 培训内容'
key=
'TRAIN_CONTENT'
>
<
div
className=
'train-content__warp'
>
2
</
div
>
<
TrainContent
/
>
</
TabPane
>
</
TabPane
>
</
Tabs
>
</
Tabs
>
</
div
>
</
div
>
...
...
src/modules/task-center/train-task/TrainTaskPage.jsx
View file @
52a7b420
...
@@ -2,13 +2,12 @@
...
@@ -2,13 +2,12 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-28 11:25:58
* @Date: 2021-07-28 11:25:58
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-30 1
0:10:59
* @LastEditTime: 2021-07-30 1
1:58:13
* @Description: 任务中心-培训任务
* @Description: 任务中心-培训任务
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
TrainFilter
from
'./components/TrainFilter'
;
import
TrainFilter
from
'./components/TrainFilter'
;
import
TrainOpt
from
'./components/TrainOpt'
;
import
TrainList
from
'./components/TrainList'
;
import
TrainList
from
'./components/TrainList'
;
// import PlanList from './components/PlanList'
// import PlanList from './components/PlanList'
import
PlanService
from
'@/domains/plan-domain/planService'
;
import
PlanService
from
'@/domains/plan-domain/planService'
;
...
@@ -16,8 +15,8 @@ import User from '@/common/js/user';
...
@@ -16,8 +15,8 @@ import User from '@/common/js/user';
function
TrainTaskPage
()
{
function
TrainTaskPage
()
{
const
[
trainListData
,
setTrainListData
]
=
useState
([]);
// 培训任务列表
const
[
trainListData
,
setTrainListData
]
=
useState
([]);
// 培训任务列表
const
[
query
,
setQuery
]
=
useState
({
const
[
query
,
setQuery
]
=
useState
({
status
:
'All'
,
issueState
:
'ALL'
,
// 发布状态
onlyHelp
:
false
,
myAssist
:
false
,
// 是否协同
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
storeUserId
:
User
.
getStoreUserId
(),
storeUserId
:
User
.
getStoreUserId
(),
...
@@ -49,7 +48,6 @@ function TrainTaskPage() {
...
@@ -49,7 +48,6 @@ function TrainTaskPage() {
<
div
className=
'content-header'
>
培训任务
</
div
>
<
div
className=
'content-header'
>
培训任务
</
div
>
<
div
className=
'box'
>
<
div
className=
'box'
>
<
TrainFilter
onChange=
{
queryChange
}
/>
<
TrainFilter
onChange=
{
queryChange
}
/>
<
TrainOpt
/>
<
TrainList
trainListData=
{
trainListData
}
query=
{
query
}
totalCount=
{
totalCount
}
onChange=
{
queryChange
}
/>
<
TrainList
trainListData=
{
trainListData
}
query=
{
query
}
totalCount=
{
totalCount
}
onChange=
{
queryChange
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/modules/task-center/train-task/components/BasicInfo.jsx
View file @
52a7b420
This diff is collapsed.
Click to expand it.
src/modules/task-center/train-task/components/BasicInfo.less
View file @
52a7b420
.basic-info__form {
.basic-info__form {
margin-bottom: 138px;
.cover {
.cover {
display: flex;
display: flex;
margin-top: 24px;
margin-top: 24px;
...
@@ -7,9 +8,9 @@
...
@@ -7,9 +8,9 @@
.img-box {
.img-box {
position: relative;
position: relative;
margin-top: 8px;
margin-top: 8px;
width:
299
px;
width:
300
px;
height: 1
69
px;
height: 1
70
px;
.tag {
.
default-
tag {
border-radius: 2px;
border-radius: 2px;
background: #d6d6d6;
background: #d6d6d6;
font-size: 12px;
font-size: 12px;
...
@@ -29,7 +30,7 @@
...
@@ -29,7 +30,7 @@
}
}
.opt-box {
.opt-box {
.default-btn {
.default-btn {
margin-left: 1
4
px;
margin-left: 1
2
px;
color: #2966ff;
color: #2966ff;
cursor: pointer;
cursor: pointer;
&.disabled {
&.disabled {
...
@@ -45,4 +46,65 @@
...
@@ -45,4 +46,65 @@
}
}
}
}
}
}
.duration {
&__wrap {
.tips {
color: #999999;
display: inline-block;
margin-left: 16px;
}
.picker-box {
display: inline-block;
margin-left: 16px;
}
}
}
.ant-form-item-extra {
.learning-model-tips {
margin-top: 8px;
color: #999999;
line-height: 20px;
}
}
.ant-form-item {
margin-bottom: 24px !important;
.ant-form-item-label > label {
width: 108px;
justify-content: flex-end;
}
&:not(:first-child) .ant-form-item-label > label {
height: 22px !important;
}
.ant-form-item-control-input {
min-height: 22px !important;
}
.ant-tag {
border: 1px solid #cccccc;
color: #666666;
margin-bottom: 12px;
font-size: 14px;
}
}
.item-btn {
color: #2966ff;
}
.item-obj {
width: 600px;
max-height: 90px;
overflow-y: scroll;
padding: 12px;
border-radius: 4px;
margin-top: 10px;
border: 1px solid #e8e8e8;
color: #666666;
.obj-type-container {
display: flex;
overflow-wrap: normal;
.type-title {
width: 70px;
flex-shrink: 0;
}
}
}
}
}
src/modules/task-center/train-task/components/TrainContent.jsx
0 → 100644
View file @
52a7b420
/*
* @Author: yuananting
* @Date: 2021-07-30 16:33:58
* @LastEditors: yuananting
* @LastEditTime: 2021-07-30 16:58:03
* @Description: 任务中心-培训任务-新建-培训内容
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
;
import
{
Form
,
Button
,
Input
,
Space
,
DatePicker
,
Radio
,
Tag
,
Col
,
message
,
Tooltip
}
from
'antd'
;
import
{
sortableContainer
,
sortableElement
,
sortableHandle
}
from
'react-sortable-hoc'
;
function
TrainContent
(
props
)
{
const
SortableTaskContainer
=
sortableContainer
((
props
)
=>
<
div
{
...
props
}
></
div
>);
return
(
<
div
className=
'train-content__warp'
>
<
SortableTaskContainer
useDragHandle
disableAutoscroll
helperClass=
'row-dragging'
onSortEnd=
{
this
.
onTaskSortEnd
}
className=
'plan-task-sort-container'
>
{
dataSource
.
map
((
item
,
index
)
=>
(
<
SortableTaskItem
taskitem=
{
this
.
renderTaskItem
(
item
,
index
)
}
index=
{
index
}
key=
{
index
}
></
SortableTaskItem
>
))
}
</
SortableTaskContainer
>
</
div
>
);
}
export
default
TrainContent
;
src/modules/task-center/train-task/components/TrainList.jsx
View file @
52a7b420
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-28 14:56:52
* @Date: 2021-07-28 14:56:52
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-
29 13:52:35
* @LastEditTime: 2021-07-
30 12:01:29
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Tabs
,
Tooltip
,
Checkbox
,
Dropdown
}
from
'antd'
;
import
{
Tabs
,
Tooltip
,
Checkbox
,
Dropdown
,
Radio
,
Button
,
Space
}
from
'antd'
;
import
'./TrainList.less'
;
import
'./TrainList.less'
;
import
{
XMTable
,
PageControl
}
from
'@/components'
;
import
{
XMTable
,
PageControl
}
from
'@/components'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
...
@@ -16,7 +16,7 @@ const { TabPane } = Tabs;
...
@@ -16,7 +16,7 @@ const { TabPane } = Tabs;
function
TrainList
(
props
)
{
function
TrainList
(
props
)
{
const
{
const
{
query
:
{
size
,
current
},
query
:
{
issueState
,
myAssist
,
current
,
size
},
totalCount
,
totalCount
,
}
=
props
;
}
=
props
;
...
@@ -218,15 +218,35 @@ function TrainList(props) {
...
@@ -218,15 +218,35 @@ function TrainList(props) {
props
.
onChange
(
_query
);
props
.
onChange
(
_query
);
}
}
function
handleCreatePlan
()
{
window
.
RCHistory
.
push
({
pathname
:
'/create-train-task?type=add'
,
});
}
return
(
return
(
<
div
className=
'train-list-page'
>
<
div
className=
'train-list-page'
>
<
div
className=
'search-box'
>
<
div
className=
'header-line'
>
<
Tabs
onChange=
{
(
value
)
=>
handleChangeQuery
(
'status'
,
value
)
}
type=
'card'
>
{
(
User
.
getUserRole
()
===
'CloudManager'
||
User
.
getUserRole
()
===
'StoreManager'
)
&&
(
<
TabPane
tab=
{
`全部 (${20})`
}
key=
'all'
/>
<
Button
type=
'primary'
className=
'mr12'
onClick=
{
handleCreatePlan
}
>
<
TabPane
tab=
{
`已发布 (${10})`
}
key=
'published'
/>
新建培训任务
<
TabPane
tab=
{
`未发布 (${10})`
}
key=
'unpublished'
/>
</
Button
>
</
Tabs
>
)
}
<
Checkbox
onChange=
{
(
e
)
=>
handleChangeQuery
(
'onlyHelp'
,
e
.
target
.
checked
)
}
>
只看我协同的 (
{
10
}
)
</
Checkbox
>
<
Space
size=
{
16
}
>
<
Radio
.
Group
size=
'middle'
value=
{
issueState
}
onChange=
{
(
e
)
=>
{
handleChangeQuery
(
'issueState'
,
e
.
target
.
value
);
}
}
>
<
Radio
.
Button
value=
'ALL'
>
全部
</
Radio
.
Button
>
<
Radio
.
Button
value=
'YES'
>
已发布
</
Radio
.
Button
>
<
Radio
.
Button
value=
'NO'
>
未发布
</
Radio
.
Button
>
</
Radio
.
Group
>
<
Checkbox
style=
{
{
lineHeight
:
'32px'
}
}
value=
{
myAssist
}
onChange=
{
(
e
)
=>
handleChangeQuery
(
'myAssist'
,
e
.
target
.
checked
)
}
>
只看我协同的 (
{
10
}
)
</
Checkbox
>
</
Space
>
</
div
>
</
div
>
<
div
className=
'list-content'
>
<
div
className=
'list-content'
>
<
XMTable
<
XMTable
...
...
src/modules/task-center/train-task/components/TrainList.less
View file @
52a7b420
.train-list-page {
.train-list-page {
margin-top: 12px;
margin-top: 12px;
.
search-box
{
.
header-line
{
display: flex;
display: flex;
line-height: 46px;
justify-content: space-between;
margin-bottom: 12px;
}
}
.ant-tabs-nav {
.ant-tabs-nav {
margin: 0 !important;
margin: 0 !important;
...
...
src/modules/task-center/train-task/components/TrainOpt.jsx
deleted
100644 → 0
View file @
14cd1beb
/*
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: yuananting
* @LastEditTime: 2021-07-29 14:04:05
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
User
from
'@/common/js/user'
;
// import './PlanOpt.less';
function
PlanOpt
()
{
function
handleCreatePlan
()
{
window
.
RCHistory
.
push
({
pathname
:
'/create-train-task?type=add'
,
});
}
return
(
<
div
className=
'plan-opt-page'
>
{
(
User
.
getUserRole
()
===
'CloudManager'
||
User
.
getUserRole
()
===
'StoreManager'
)
&&
(
<
Button
type=
'primary'
className=
'mr12'
onClick=
{
handleCreatePlan
}
>
新建培训任务
</
Button
>
)
}
</
div
>
);
}
export
default
withRouter
(
PlanOpt
);
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