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
4f7e0407
Commit
4f7e0407
authored
Aug 03, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:关联考试抽屉样式调整
parent
b85643d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
10 deletions
+115
-10
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
+57
-10
src/modules/task-center/train-task/components/RelatedExamDrawer.less
+58
-0
No files found.
src/modules/task-center/train-task/components/RelatedExamDrawer.jsx
View file @
4f7e0407
...
...
@@ -2,22 +2,21 @@
* @Author: yuananting
* @Date: 2021-08-03 17:05:32
* @LastEditors: yuananting
* @LastEditTime: 2021-08-03
18:05:53
* @LastEditTime: 2021-08-03
20:02:27
* @Description: 新建培训任务-关联考试抽屉
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Drawer
,
Form
,
Input
,
Button
,
Tooltip
,
Switch
,
Radio
,
DatePicker
,
InputNumber
}
from
'antd'
;
import
{
Drawer
,
Form
,
Input
,
Button
,
Tooltip
,
Switch
,
Radio
,
InputNumber
}
from
'antd'
;
import
GraphicsEditor
from
'@/modules/course-manage/components/GraphicsEditor'
;
import
moment
from
'moment'
;
import
'./RelatedExamDrawer.less'
;
const
{
RangePicker
}
=
DatePicker
;
import
SelectPaperModal
from
'@/modules/teach-tool/examination-manager/SelectPaperModal'
;
function
RelatedExamDrawer
(
props
)
{
const
paperInfoInit
=
{
passScore
:
60
};
const
[
show
Modal
,
setShow
Modal
]
=
useState
(
false
);
const
[
show
PaperModal
,
setShowPaper
Modal
]
=
useState
(
false
);
const
[
paperInfo
,
setPaperInfo
]
=
useState
(
paperInfoInit
);
const
[
paperId
,
setPaperId
]
=
useState
(
''
);
const
[
passRate
,
setPassRate
]
=
useState
(
60
);
//及格线
...
...
@@ -256,19 +255,50 @@ function RelatedExamDrawer(props) {
});
return
result
;
}
return
(
<
Drawer
title=
'添加考试'
width=
{
720
}
maskClosable=
{
false
}
closable=
{
true
}
onClose=
{
props
.
onClose
}
visible=
{
true
}
mask
className=
'related-exam-drawer'
>
<
div
>
<
div
className=
'module-title'
>
基本信息
</
div
>
<
Form
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
20
}
}
layout=
'horizontal'
>
<
div
className=
'module-title'
>
基本信息
</
div
>
<
Form
.
Item
label=
'选择试卷'
validateStatus=
{
check
&&
!
paperId
?
'error'
:
''
}
help=
{
check
&&
!
paperId
&&
'请选择试卷'
}
required
>
<
Button
onClick=
{
()
=>
{
setShow
Modal
(
true
);
setShowPaper
Modal
(
true
);
}
}
>
{
paperInfo
.
paperId
?
'重新选择'
:
'选择试卷'
}
</
Button
>
{
paperInfo
.
paperId
&&
(
<
div
className=
'paper-title'
>
<
img
src=
'https://image.xiaomaiketang.com/xm/pY5imEhjzw.png'
alt=
''
/>
{
paperInfo
.
paperName
}
</
div
>
)
}
{
paperInfo
.
paperId
&&
(
<
div
className=
'paper-table'
>
<
div
className=
'header'
>
<
div
className=
'item'
>
单选题
</
div
>
<
div
className=
'item'
>
多选题
</
div
>
<
div
className=
'item'
>
判断题
</
div
>
<
div
className=
'item'
>
填空题
</
div
>
<
div
className=
'item long'
>
不定项选择题
</
div
>
<
div
className=
'item'
>
合计
</
div
>
</
div
>
<
div
className=
'body-list'
style=
{
{
borderBottom
:
'1px solid #e8e8e8'
}
}
>
<
div
className=
'item'
>
{
paperInfo
.
singleChoiceCnt
||
0
}
题
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
multiChoiceCnt
||
0
}
题
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
judgeCnt
||
0
}
题
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
gapFillingCnt
||
0
}
题
</
div
>
<
div
className=
'item long'
>
{
paperInfo
.
indefiniteChoiceCnt
||
0
}
题
</
div
>
<
div
className=
'item'
>
{
examTotal
}
题
</
div
>
</
div
>
<
div
className=
'body-list'
>
<
div
className=
'item'
>
{
paperInfo
.
singleChoiceScore
||
0
}
分
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
multiChoiceScore
||
0
}
分
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
judgeScore
||
0
}
分
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
gapFillingScore
||
0
}
分
</
div
>
<
div
className=
'item long'
>
{
paperInfo
.
indefiniteChoiceScore
||
0
}
分
</
div
>
<
div
className=
'item'
>
{
paperInfo
.
totalScore
||
0
}
分
</
div
>
</
div
>
</
div
>
)
}
</
Form
.
Item
>
<
Form
.
Item
...
...
@@ -339,7 +369,9 @@ function RelatedExamDrawer(props) {
}
}
/>
</
Form
.
Item
>
<
div
className=
'module-title'
>
考试设置
</
div
>
<
div
className=
'module-title'
style=
{
{
marginTop
:
16
}
}
>
考试设置
</
div
>
<
Form
.
Item
label=
'选项乱序'
required
>
<
div
style=
{
{
display
:
'flex'
,
marginLeft
:
4
}
}
>
...
...
@@ -378,7 +410,22 @@ function RelatedExamDrawer(props) {
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
>
<
div
className=
'footer shrink-footer'
>
<
Button
onClick=
{
props
.
onClose
}
>
取消
</
Button
>
<
Button
type=
'primary'
onClick=
{
()
=>
console
.
log
(
'提交'
)
}
>
确定
</
Button
>
</
div
>
{
showPaperModal
&&
(
<
SelectPaperModal
onSelect=
{
(
info
)
=>
{
setPaperInfo
(
info
);
}
}
paperInfo=
{
paperInfo
}
close=
{
()
=>
{
setShowPaperModal
(
false
);
}
}
></
SelectPaperModal
>
)
}
</
Drawer
>
);
}
...
...
src/modules/task-center/train-task/components/RelatedExamDrawer.less
View file @
4f7e0407
...
...
@@ -5,6 +5,64 @@
line-height: 22px;
margin-bottom: 24px;
}
.paper-title {
color: #333333;
line-height: 20px;
padding: 10px 12px;
margin-top: 12px;
margin-bottom: 8px;
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
}
.paper-table {
border: 1px solid #e8e8e8;
width: 550px;
.header {
font-weight: 500;
.item {
padding: 10px 16px;
}
}
.body-list {
.item {
padding: 14px 16px;
}
}
.header,
.body-list {
display: flex;
color: #333333;
.item {
box-sizing: border-box;
width: 86px;
&.long {
width: 120px;
}
}
}
}
.footer {
position: fixed;
right: 0;
bottom: 0;
height: 50px;
width: 720px;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 24px;
background: #fff;
border-top: 1px solid #e8e8e8;
z-index: 9999;
.ant-btn {
margin-left: 8px;
}
}
.ant-form-item {
margin-bottom: 24px !important;
.graphics-editor-container {
...
...
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