Commit 94de1400 by yuananting

fix:解决企微环境新建考试报错问题

parent 5ed3f210
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-08-03 17:05:32 * @Date: 2021-08-03 17:05:32
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-08-16 16:36:59 * @LastEditTime: 2021-08-17 10:55:01
* @Description: 新建培训任务-关联考试抽屉 * @Description: 新建培训任务-关联考试抽屉
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...@@ -305,10 +305,16 @@ function RelatedExamDrawer(props) { ...@@ -305,10 +305,16 @@ function RelatedExamDrawer(props) {
{showPaperModal && ( {showPaperModal && (
<SelectPaperModal <SelectPaperModal
onSelect={(info) => { onSelect={(info) => {
const contentList = props.stageList.map((item) => { let newContentList = [];
return item.contentList; 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; return item.paperId === info.paperId;
}); });
if (existedPaperId.length > 0) { if (existedPaperId.length > 0) {
......
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