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
a24eaa07
Commit
a24eaa07
authored
Apr 02, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fix'
parent
776fb201
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
5 deletions
+94
-5
src/modules/teach-tool/examination-manager/AddExam.less
+10
-0
src/modules/teach-tool/examination-manager/AddExam.tsx
+47
-0
src/modules/teach-tool/examination-manager/Index.tsx
+14
-5
src/modules/teach-tool/examination-manager/SelectPaperModal.tsx
+23
-0
No files found.
src/modules/teach-tool/examination-manager/AddExam.less
0 → 100644
View file @
a24eaa07
.examPage{
.form{
margin-top: 12px;
width: 1000px;
.title{
font-size: 18px;
}
}
}
\ No newline at end of file
src/modules/teach-tool/examination-manager/AddExam.tsx
0 → 100644
View file @
a24eaa07
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
{
Form
,
Alert
,
Input
,
Button
}
from
'antd'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
SelectPaperModal
from
'./SelectPaperModal'
import
'./AddExam.less'
;
function
AddExam
(
props
:
any
)
{
const
[
showModal
,
setShowModal
]
=
useState
(
false
)
return
<
div
className=
"page examPage"
>
<
Breadcrumbs
navList=
{
"新建考试"
}
goBack=
{
()
=>
props
.
history
.
goBack
()
}
/>
<
div
className=
"box"
>
<
Alert
message=
"请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利"
type=
"info"
showIcon
/>
<
div
className=
"form"
>
<
div
className=
"title"
>
基本信息
</
div
>
<
Form
labelCol=
{
{
span
:
3
}
}
wrapperCol=
{
{
span
:
14
}
}
layout=
"horizontal"
>
<
Form
.
Item
label=
"考试名称"
name=
"size"
required
>
<
Input
placeholder=
'请输入试卷名称(40字以内)'
style=
{
{
width
:
300
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"选择试卷"
name=
"size"
required
>
<
Button
onClick=
{
()
=>
{
setShowModal
(
true
)}
}
>
选择试卷
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
</
div
>
{
showModal
&&
<
SelectPaperModal
></
SelectPaperModal
>
}
</
div
>
}
export
default
withRouter
(
AddExam
);
\ No newline at end of file
src/modules/teach-tool/examination-manager/Index.tsx
View file @
a24eaa07
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
import
{
Row
,
Input
,
Select
,
DatePicker
,
Tooltip
,
Button
,
Table
,
Dropdown
,
Menu
}
from
'antd'
;
import
TeacherSelect
from
'@/modules/common/TeacherSelect'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
Service
from
"@/common/js/service"
;
import
moment
from
'moment'
;
import
{
PageControl
}
from
"@/components"
;
import
AddExam
from
'./AddExam'
;
import
User
from
"@/common/js/user"
;
import
{
XMContext
}
from
"@/store/context"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
...
...
@@ -12,7 +14,7 @@ const { RangePicker } = DatePicker;
const
{
Search
}
=
Input
;
const
{
Option
}
=
Select
;
export
default
function
ExaminationManager
(
)
{
function
ExaminationManager
(
props
:
any
)
{
const
queryInit
:
any
=
{
examName
:
''
,
current
:
1
,
size
:
10
,
order
:
'PASS_CNT_DESC'
...
...
@@ -21,7 +23,7 @@ export default function ExaminationManager() {
const
examStatus
=
{
EXAM_INIT
:
'未开始'
,
EXAM_STARTED
:
'进行中'
,
EXAM_FINISHED
:
'已结束'
}
const
{
match
}
=
props
;
const
sortState
:
any
=
false
;
const
ctx
:
any
=
useContext
(
XMContext
);
console
.
log
(
ctx
)
...
...
@@ -239,7 +241,11 @@ export default function ExaminationManager() {
</
div
>
</
div
>
{
ctx
.
xmState
?.
userPermission
?.
AddExam
()
&&
<
Button
type=
'primary'
style=
{
{
margin
:
'12px 0'
}
}
>
新建考试
</
Button
>
ctx
.
xmState
?.
userPermission
?.
AddExam
()
&&
<
Button
type=
'primary'
onClick=
{
()
=>
{
props
.
history
.
push
({
pathname
:
`${match.url}/add`
})
}
}
style=
{
{
margin
:
'12px 0'
}
}
>
新建考试
</
Button
>
}
...
...
@@ -271,5 +277,8 @@ export default function ExaminationManager() {
}
</
div
>
</
div
>
<
Route
path=
{
`${match.url}/add`
}
component=
{
AddExam
}
/>
</
div
>
}
\ No newline at end of file
}
export
default
withRouter
(
ExaminationManager
);
\ No newline at end of file
src/modules/teach-tool/examination-manager/SelectPaperModal.tsx
0 → 100644
View file @
a24eaa07
import
React
,
{
useState
,
useRef
,
useEffect
,
useContext
}
from
'react'
import
{
Modal
}
from
'antd'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
ExaminationPaperIndex
from
'../examination-paper/ExaminationPaperIndex'
import
'./AddExam.less'
;
function
SelectPaperModal
(
props
:
any
)
{
return
<
Modal
width=
{
800
}
title=
"选择试卷"
visible=
{
true
}
onOk=
{
()
=>
{
}
}
onCancel=
{
()
=>
{
}
}
>
<
ExaminationPaperIndex
></
ExaminationPaperIndex
>
</
Modal
>
}
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