Commit 42d8931e by yuananting

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

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