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
0b6f8a2e
Commit
0b6f8a2e
authored
Apr 08, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fix'
parent
532c00df
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
12 deletions
+62
-12
src/modules/course-manage/components/GraphicsEditor.jsx
+2
-0
src/modules/teach-tool/examination-manager/AddExam.tsx
+22
-12
src/modules/teach-tool/examination-manager/PreviewModal.less
+10
-0
src/modules/teach-tool/examination-manager/PreviewModal.tsx
+28
-0
No files found.
src/modules/course-manage/components/GraphicsEditor.jsx
View file @
0b6f8a2e
...
...
@@ -27,6 +27,8 @@ class GraphicsEditor extends React.Component {
this
.
bindClick
();
}
componentWillUnmount
()
{
this
.
resetIndex
();
this
.
removeBus
();
...
...
src/modules/teach-tool/examination-manager/AddExam.tsx
View file @
0b6f8a2e
...
...
@@ -8,7 +8,9 @@ import Service from "@/common/js/service";
import
_
from
'underscore'
import
GraphicsEditor
from
'../../course-manage/components/GraphicsEditor'
;
import
SelectPaperModal
from
'./SelectPaperModal'
import
PreviewModal
from
'./PreviewModal'
import
'./AddExam.less'
;
import
{
get
}
from
'_@types_jquery@3.5.5@@types/jquery'
;
const
{
RangePicker
}
=
DatePicker
;
...
...
@@ -32,6 +34,8 @@ function AddExam(props: any) {
const
[
passScore
,
setPassScore
]
=
useState
(
100
);
const
[
desclen
,
setDescLen
]
=
useState
(
0
);
const
[
check
,
setCheck
]
=
useState
(
false
);
const
[
getData
,
setGetData
]
=
useState
(
false
);
const
[
preview
,
setPreview
]
=
useState
(
false
);
const
timer
=
useRef
({});
const
request
=
useRef
(
false
);
const
{
match
}
=
props
;
...
...
@@ -82,6 +86,7 @@ function AddExam(props: any) {
setPassScore
(
result
.
passScore
)
setResultContent
(
result
.
resultContent
)
setResultShow
(
result
.
resultShow
)
setGetData
(
true
)
})
}
...
...
@@ -221,6 +226,7 @@ function AddExam(props: any) {
})
}
return
<
div
className=
"page examPage"
>
<
Breadcrumbs
navList=
{
props
.
type
===
'edit'
?
"编辑考试"
:
"新建考试"
}
goBack=
{
handleGoBack
}
/>
...
...
@@ -250,7 +256,7 @@ function AddExam(props: any) {
<
Button
onClick=
{
()
=>
{
setShowModal
(
true
)
}
}
>
{
paperInfo
.
paperId
?
'重新选择'
:
'选择试卷'
}
</
Button
>
{
paperInfo
.
paperId
&&
<
div
className=
"paperTitle"
><
img
src=
"https://image.xiaomaiketang.com/xm/pY5imEhjzw.png"
alt=
""
/>
{
paperInfo
.
paperName
}
</
div
>
paperInfo
.
paperId
&&
<
div
className=
"paperTitle"
><
img
src=
"https://image.xiaomaiketang.com/xm/pY5imEhjzw.png"
alt=
""
/>
{
paperInfo
.
paperName
}
</
div
>
}
...
...
@@ -338,14 +344,17 @@ function AddExam(props: any) {
</
Form
.
Item
>
<
Form
.
Item
label=
"考试说明"
>
<
GraphicsEditor
maxLimit=
{
1000
}
isIntro=
{
true
}
detail=
{
{
content
:
examDesc
}
}
onChange=
{
(
val
:
any
,
len
:
any
)
=>
{
setExamDesc
(
val
);
setDescLen
(
len
)
}
}
/>
{
(
getData
||
(
props
.
type
!==
'edit'
))
&&
<
GraphicsEditor
maxLimit=
{
1000
}
isIntro=
{
true
}
detail=
{
{
content
:
examDesc
}
}
onChange=
{
(
val
:
any
,
len
:
any
)
=>
{
setExamDesc
(
val
);
setDescLen
(
len
)
}
}
/>
}
</
Form
.
Item
>
<
div
className=
"title"
style=
{
{
marginTop
:
40
}
}
>
考试设置
</
div
>
<
Form
.
Item
label=
"身份验证"
required
>
...
...
@@ -409,11 +418,12 @@ function AddExam(props: any) {
}
<
div
className=
"footer"
>
<
Button
onClick=
{
handleGoBack
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
{
}
}
>
预览
</
Button
>
<
Button
onClick=
{
()
=>
{
setPreview
(
true
)
}
}
>
预览
</
Button
>
<
Button
type=
"primary"
onClick=
{
handleSave
}
>
保存
</
Button
>
</
div
>
{
preview
&&
<
PreviewModal
onClose=
{
()
=>
{
setPreview
(
false
)
}
}
></
PreviewModal
>
}
</
div
>
}
...
...
src/modules/teach-tool/examination-manager/PreviewModal.less
0 → 100644
View file @
0b6f8a2e
.ExamPreviewModal{
display: flex;
.left{
width: 460px;
background:url(https://image.xiaomaiketang.com/xm/PpKc6zYKCG.png) ;
height:746px ;
background-size: 100% 100%;
}
}
\ No newline at end of file
src/modules/teach-tool/examination-manager/PreviewModal.tsx
0 → 100644
View file @
0b6f8a2e
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
import
{
Input
,
Select
,
DatePicker
,
Tooltip
,
Button
,
Table
,
Dropdown
,
Menu
,
Modal
}
from
'antd'
;
import
'./PreviewModal.less'
function
PreviewModal
(
props
:
any
)
{
return
<
Modal
title=
"预览"
onCancel=
{
props
.
onClose
}
onOk=
{
props
.
onClose
}
maskClosable=
{
true
}
visible=
{
true
}
footer=
{
null
}
closable=
{
true
}
width=
{
800
}
>
<
div
className=
"ExamPreviewModal"
>
<
div
className=
"left"
>
<
div
className=
"phone"
></
div
>
</
div
>
<
div
className=
"right"
></
div
>
</
div
>
</
Modal
>
}
export
default
PreviewModal
\ 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