Commit 42d8931e by yuananting

fix:新建培训任务默认展开第一项阶段

parent 6348e8e6
...@@ -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-17 14:50:08 * @LastEditTime: 2021-08-17 18:21:35
* @Description: 任务中心-培训任务-新建页面 * @Description: 任务中心-培训任务-新建页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -48,6 +48,7 @@ function AddTrainTask() { ...@@ -48,6 +48,7 @@ function AddTrainTask() {
stageName: '阶段一', stageName: '阶段一',
contentList: [], contentList: [],
check: false, check: false,
sequence: 1,
}, },
]; ];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-07-30 16:33:58 * @Date: 2021-07-30 16:33:58
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-08-16 22:10:08 * @LastEditTime: 2021-08-17 18:19:34
* @Description: 任务中心-培训任务-新建-培训内容 * @Description: 任务中心-培训任务-新建-培训内容
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -63,8 +63,6 @@ class TrainContent extends Component { ...@@ -63,8 +63,6 @@ class TrainContent extends Component {
}; };
} }
componentDidMount() { }
setTrianTypeOption = (index) => { setTrianTypeOption = (index) => {
return ( return (
<Menu> <Menu>
...@@ -293,8 +291,8 @@ class TrainContent extends Component { ...@@ -293,8 +291,8 @@ class TrainContent extends Component {
renderStageItem = (item, index) => { renderStageItem = (item, index) => {
return ( return (
<Collapse ghost> <Collapse defaultActiveKey={this.state.type === 'add' && ['1']} ghost>
<Panel header={this.renderStageInfo(item, index)} key={index}> <Panel header={this.renderStageInfo(item, index)} key={item.sequence}>
<SortableContentContainer useDragHandle disableAutoscroll helperClass='row-dragging' onSortEnd={(item) => this.onContentSortEnd(item, index)}> <SortableContentContainer useDragHandle disableAutoscroll helperClass='row-dragging' onSortEnd={(item) => this.onContentSortEnd(item, index)}>
{item.contentList.map((contentItem, contentIndex) => ( {item.contentList.map((contentItem, contentIndex) => (
<SortableContentItem <SortableContentItem
...@@ -457,6 +455,7 @@ class TrainContent extends Component { ...@@ -457,6 +455,7 @@ class TrainContent extends Component {
percentCompleteLive, percentCompleteLive,
percentCompleteVideo, percentCompleteVideo,
percentCompletePicture, percentCompletePicture,
type,
} = this.state; } = this.state;
const { startCheck } = this.props; const { startCheck } = this.props;
...@@ -487,10 +486,7 @@ class TrainContent extends Component { ...@@ -487,10 +486,7 @@ class TrainContent extends Component {
{showExamDrawer && <RelatedExamDrawer basicInfo={basicInfo} stageList={stageList} onClose={this.onCloseExamDrawer} onSave={this.confirmCreateExam} />} {showExamDrawer && <RelatedExamDrawer basicInfo={basicInfo} stageList={stageList} onClose={this.onCloseExamDrawer} onSave={this.confirmCreateExam} />}
</div> </div>
{ {type === 'edit' && <ExpiredCourseList taskId={taskId} />}
this.state.type === 'edit' && <ExpiredCourseList taskId={taskId} />
}
<div className='finish-standard__warp'> <div className='finish-standard__warp'>
<div <div
......
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