Commit 4ef99592 by yuananting

Merge branch 'feature/yuananting/20210801/task-center' into dev

parents ae1b270e 24beb92e
...@@ -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-08-16 19:47:41 * @LastEditTime: 2021-08-17 12:39:38
* @Description: 任务中心-培训任务-新建页面 * @Description: 任务中心-培训任务-新建页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -74,6 +74,7 @@ function AddTrainTask() { ...@@ -74,6 +74,7 @@ function AddTrainTask() {
}).then((res) => { }).then((res) => {
const { const {
result: { result: {
created,
createId, createId,
taskName, taskName,
courseMediaVOS, courseMediaVOS,
...@@ -117,7 +118,7 @@ function AddTrainTask() { ...@@ -117,7 +118,7 @@ function AddTrainTask() {
coverId, coverId,
helpStoreUserIds: _helpStoreUserIds, helpStoreUserIds: _helpStoreUserIds,
timeType, timeType,
startTime, startTime: timeType === 'FOREVER' ? created : startTime,
endTime, endTime,
learnType, learnType,
}; };
...@@ -342,13 +343,6 @@ function AddTrainTask() { ...@@ -342,13 +343,6 @@ function AddTrainTask() {
startTime: value && value[0]?.valueOf(), startTime: value && value[0]?.valueOf(),
endTime: value && value[1]?.valueOf(), endTime: value && value[1]?.valueOf(),
}); });
} else if (field === 'timeType' && value === 'FOREVER') {
setBasicInfo({
...basicInfoRef.current,
[field]: value,
startTime: null,
endTime: null,
});
} else { } else {
setBasicInfo({ setBasicInfo({
...basicInfoRef.current, ...basicInfoRef.current,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-07-29 14:32:24 * @Date: 2021-07-29 14:32:24
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-08-17 11:20:00 * @LastEditTime: 2021-08-17 11:39:13
* @Description: 任务中心-培训任务-新建-基本信息 * @Description: 任务中心-培训任务-新建-基本信息
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -184,7 +184,7 @@ function BasicInfo(props) { ...@@ -184,7 +184,7 @@ function BasicInfo(props) {
}} }}
disabledDate={disabledDate} disabledDate={disabledDate}
disabledTime={disabledRangeTime} disabledTime={disabledRangeTime}
disabled={[type === 'edit' && originTimeType === 'VALIDITY' && taskState === 'STARTING', false]} disabled={[type === 'edit' && taskState === 'STARTING', false]}
value={[startTime ? moment(Number(startTime)) : null, endTime ? moment(Number(endTime)) : null]} value={[startTime ? moment(Number(startTime)) : null, endTime ? moment(Number(endTime)) : null]}
format='YYYY-MM-DD HH:mm' format='YYYY-MM-DD HH:mm'
onChange={(date) => { onChange={(date) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment