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
8b6c2062
Commit
8b6c2062
authored
Aug 17, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/yuananting/20210801/task-center' into dev
parents
ed4f7e54
14cde938
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
src/modules/task-center/train-task/components/BasicInfo.jsx
+5
-4
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
+10
-4
src/modules/task-center/train-task/components/TrainFilter.jsx
+2
-2
src/modules/task-center/train-task/components/TrainList.jsx
+2
-2
No files found.
src/modules/task-center/train-task/components/BasicInfo.jsx
View file @
8b6c2062
...
...
@@ -2,12 +2,12 @@
* @Author: yuananting
* @Date: 2021-07-29 14:32:24
* @LastEditors: yuananting
* @LastEditTime: 2021-08-1
4 10:04:27
* @LastEditTime: 2021-08-1
7 11:20:00
* @Description: 任务中心-培训任务-新建-基本信息
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
Form
,
Button
,
Input
,
Space
,
DatePicker
,
Radio
,
Tag
,
message
,
Tooltip
}
from
'antd'
;
import
SelectPrepareFileModal
from
'@/modules/prepare-lesson/modal/SelectPrepareFileModal'
;
import
Upload
from
'@/core/upload'
;
...
...
@@ -27,6 +27,7 @@ const FormItem = Form.Item;
function
BasicInfo
(
props
)
{
const
taskState
=
getParameterByName
(
'taskState'
);
const
type
=
getParameterByName
(
'type'
);
const
originTimeType
=
getParameterByName
(
'timeType'
);
const
{
basicInfo
,
startCheck
}
=
props
;
const
{
createId
,
taskName
,
coverUrl
,
helpStoreUserIds
,
timeType
,
startTime
,
endTime
,
learnType
,
assignList
,
introduce
,
loadintroduce
}
=
basicInfo
;
...
...
@@ -158,7 +159,7 @@ function BasicInfo(props) {
<
div
className=
'duration__wrap'
>
<
Radio
.
Group
value=
{
timeType
}
disabled=
{
taskState
===
'STARTING'
}
disabled=
{
originTimeType
===
'VALIDITY'
&&
taskState
===
'STARTING'
}
onChange=
{
(
e
)
=>
{
props
.
onChange
(
'timeType'
,
e
.
target
.
value
);
}
}
>
...
...
@@ -183,7 +184,7 @@ function BasicInfo(props) {
}
}
disabledDate=
{
disabledDate
}
disabledTime=
{
disabledRangeTime
}
disabled=
{
[
type
===
'edit'
&&
taskState
===
'STARTING'
,
false
]
}
disabled=
{
[
type
===
'edit'
&&
originTimeType
===
'VALIDITY'
&&
taskState
===
'STARTING'
,
false
]
}
value=
{
[
startTime
?
moment
(
Number
(
startTime
))
:
null
,
endTime
?
moment
(
Number
(
endTime
))
:
null
]
}
format=
'YYYY-MM-DD HH:mm'
onChange=
{
(
date
)
=>
{
...
...
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
View file @
8b6c2062
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-08-03 17:05:32
* @LastEditors: yuananting
* @LastEditTime: 2021-08-1
6 16:36:59
* @LastEditTime: 2021-08-1
7 10:55:01
* @Description: 新建培训任务-关联考试抽屉
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
...
@@ -305,10 +305,16 @@ function RelatedExamDrawer(props) {
{
showPaperModal
&&
(
<
SelectPaperModal
onSelect=
{
(
info
)
=>
{
const
contentList
=
props
.
stageList
.
map
((
item
)
=>
{
return
item
.
contentList
;
let
newContentList
=
[];
props
.
stageList
.
map
((
item
)
=>
{
if
(
item
.
contentList
&&
item
.
contentList
.
length
>
0
)
{
item
.
contentList
.
map
((
childItem
)
=>
{
newContentList
.
push
(
childItem
);
});
}
});
const
existedPaperId
=
contentList
.
flat
().
filter
((
item
)
=>
{
console
.
log
(
'newContentList'
,
newContentList
);
const
existedPaperId
=
newContentList
.
filter
((
item
)
=>
{
return
item
.
paperId
===
info
.
paperId
;
});
if
(
existedPaperId
.
length
>
0
)
{
...
...
src/modules/task-center/train-task/components/TrainFilter.jsx
View file @
8b6c2062
...
...
@@ -70,8 +70,8 @@ function TrainFilter(props) {
const
_query
=
_
.
clone
(
query
);
_query
.
current
=
1
;
if
(
field
===
'createdDate'
)
{
_query
.
startTime
=
value
&&
value
[
0
]
.
valueOf
();
_query
.
endTime
=
value
&&
value
[
1
]
.
valueOf
();
_query
.
startTime
=
value
[
0
]?.
startOf
(
'day'
)
.
valueOf
();
_query
.
endTime
=
value
[
1
]?.
endOf
(
'day'
)
.
valueOf
();
}
else
{
_query
[
field
]
=
value
;
}
...
...
src/modules/task-center/train-task/components/TrainList.jsx
View file @
8b6c2062
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-07-28 14:56:52
* @LastEditors: yuananting
* @LastEditTime: 2021-08-1
6 22:08:57
* @LastEditTime: 2021-08-1
7 11:14:28
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -74,7 +74,7 @@ function TrainList(props) {
// 编辑培训任务-跳转新建/编辑页
function
editTrainingTask
(
item
)
{
window
.
RCHistory
.
push
({
pathname
:
`/create-train-task?type=edit&taskId=
${
item
.
taskId
}
&taskState=
${
item
.
taskState
}
`
,
pathname
:
`/create-train-task?type=edit&taskId=
${
item
.
taskId
}
&taskState=
${
item
.
taskState
}
&timeType=
${
item
.
timeType
}
`
,
});
}
...
...
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