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
bed3f47f
Commit
bed3f47f
authored
Aug 18, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:关联考试弹窗未选择试卷保存提示
parent
47cba295
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
30 deletions
+35
-30
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
+1
-2
src/modules/teach-tool/examination-manager/SelectPaperModal.tsx
+34
-28
No files found.
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
View file @
bed3f47f
...
@@ -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-1
7 10:55:01
* @LastEditTime: 2021-08-1
8 17:25:30
* @Description: 新建培训任务-关联考试抽屉
* @Description: 新建培训任务-关联考试抽屉
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -313,7 +313,6 @@ function RelatedExamDrawer(props) {
...
@@ -313,7 +313,6 @@ function RelatedExamDrawer(props) {
});
});
}
}
});
});
console
.
log
(
'newContentList'
,
newContentList
);
const
existedPaperId
=
newContentList
.
filter
((
item
)
=>
{
const
existedPaperId
=
newContentList
.
filter
((
item
)
=>
{
return
item
.
paperId
===
info
.
paperId
;
return
item
.
paperId
===
info
.
paperId
;
});
});
...
...
src/modules/teach-tool/examination-manager/SelectPaperModal.tsx
View file @
bed3f47f
...
@@ -2,43 +2,50 @@
...
@@ -2,43 +2,50 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-06-16 10:14:37
* @Date: 2021-06-16 10:14:37
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-0
7-27 14:04:03
* @LastEditTime: 2021-0
8-18 17:40:48
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
{
message
,
Modal
}
from
'antd'
;
import
{
message
,
Modal
}
from
'antd'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
PaperContent
from
'../paper-manage/PaperContent'
import
PaperContent
from
'../paper-manage/PaperContent'
;
import
'./AddExam.less'
;
import
'./AddExam.less'
;
import
user
from
'@/common/js/user'
;
function
SelectPaperModal
(
props
:
any
)
{
function
SelectPaperModal
(
props
:
any
)
{
const
[
item
,
setItem
]
=
useState
(
props
.
paperInfo
);
const
itemRef
=
useRef
({});
const
[
item
,
setItem
]
=
useState
(
props
.
paperInfo
);
useEffect
(()
=>
{
const
itemRef
=
useRef
({})
itemRef
.
current
=
item
;
},
[
item
]);
useEffect
(()
=>
{
return
(
itemRef
.
current
=
item
<
Modal
},
[
item
])
maskClosable=
{
false
}
width=
{
1080
}
return
<
Modal
title=
'选择试卷'
maskClosable=
{
false
}
visible=
{
true
}
width=
{
1080
}
centered=
{
true
}
title=
"选择试卷"
onOk=
{
()
=>
{
visible=
{
true
}
if
(
Object
.
keys
(
itemRef
.
current
).
length
<
2
)
{
centered=
{
true
}
// 培训任务中试卷对象默认长度为0,考试中试卷对象默认长度为1
onOk=
{
()
=>
{
return
message
.
warning
(
'请选择试卷'
);
props
.
onSelect
(
itemRef
.
current
);
props
.
close
();
}
}
}
onCancel=
{
()
=>
{
props
.
close
()
}
}
props
.
onSelect
(
itemRef
.
current
);
>
props
.
close
();
<
PaperContent
paperId=
{
item
.
paperId
}
onSelect=
{
(
item
:
any
)
=>
{
setItem
(
item
)
}
}
type=
'modal-select'
></
PaperContent
>
}
}
onCancel=
{
()
=>
{
</
Modal
>
props
.
close
();
}
}
>
<
PaperContent
paperId=
{
item
.
paperId
}
onSelect=
{
(
item
:
any
)
=>
{
setItem
(
item
);
}
}
type=
'modal-select'
></
PaperContent
>
</
Modal
>
);
}
}
export
default
withRouter
(
SelectPaperModal
);
export
default
withRouter
(
SelectPaperModal
);
\ No newline at end of file
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