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
6f43031a
Commit
6f43031a
authored
Jun 01, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:试卷考试名称40字限制
parent
9ba1d8c7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
7 deletions
+18
-7
src/modules/teach-tool/examination-manager/AddExam.less
+1
-0
src/modules/teach-tool/examination-manager/AddExam.tsx
+7
-2
src/modules/teach-tool/examination-manager/PreviewModal.tsx
+1
-1
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+7
-2
src/modules/teach-tool/paper-manage/modal/PreviewPaperModal.jsx
+2
-2
No files found.
src/modules/teach-tool/examination-manager/AddExam.less
View file @
6f43031a
...
...
@@ -13,6 +13,7 @@
.form{
margin-top: 12px;
width: 1000px;
overflow-y: scroll;
.title{
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
...
...
src/modules/teach-tool/examination-manager/AddExam.tsx
View file @
6f43031a
...
...
@@ -130,6 +130,11 @@ function AddExam(props: any) {
return
}
if
(
param
.
examName
&&
param
.
examName
.
length
>
40
)
{
message
.
warning
(
'考试名称最多40字'
);
return
}
if
(
!
paperId
)
{
message
.
warning
(
'请选择试卷'
);
return
...
...
@@ -273,8 +278,8 @@ function AddExam(props: any) {
layout=
"horizontal"
>
<
Form
.
Item
label=
"考试名称"
validateStatus=
{
(
check
&&
!
examName
)
?
'error'
:
''
}
help=
{
check
&&
!
examName
&&
'请选择课程'
}
validateStatus=
{
(
check
&&
(
!
examName
?
'请输入考试名称'
:
(
examName
.
length
>
40
)
&&
'考试名称最多40字'
)
)
?
'error'
:
''
}
help=
{
check
&&
(
!
examName
?
'请输入考试名称'
:
(
examName
.
length
>
40
)
&&
'考试名称最多40字'
)
}
required
>
<
Input
placeholder=
'请输入考试名称(40字以内)'
maxLength=
{
40
}
value=
{
examName
}
onChange=
{
(
e
)
=>
{
...
...
src/modules/teach-tool/examination-manager/PreviewModal.tsx
View file @
6f43031a
...
...
@@ -33,7 +33,7 @@ function PreviewModal(props: any) {
<
div
className=
"phone"
>
<
div
className=
"content"
>
<
div
className=
"topContent"
>
<
div
className=
"title"
style=
{
{
fontSize
:
props
.
info
.
examName
.
length
>
24
?
13
:
22
,
marginTop
:
20
}
}
>
{
props
.
info
.
examName
||
' '
}
</
div
>
<
div
className=
"title"
style=
{
{
fontSize
:
props
.
info
.
examName
.
length
>
24
?
13
:
22
,
marginTop
:
20
}
}
>
{
(
props
.
info
.
examName
.
length
>
40
?
props
.
info
.
examName
.
substring
(
0
,
40
)
:
props
.
info
.
examName
)
||
' '
}
</
div
>
{
props
.
info
.
examStartTime
&&
<
div
className=
"time"
>
{
moment
(
props
.
info
.
examStartTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
~
{
moment
(
props
.
info
.
examEndTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
div
>
}
...
...
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
6f43031a
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditTime: 2021-06-01 1
1:31:41
* @LastEditTime: 2021-06-01 1
7:07:30
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -325,6 +325,10 @@ class OperatePaper extends Component {
if
(
this
.
checkExist
(
paperName
))
{
return
"该试卷名称已存在"
;
}
if
(
paperName
&&
paperName
.
length
>
40
)
{
return
"试卷名称最多40字"
;
}
};
// 保存试卷
...
...
@@ -337,7 +341,8 @@ class OperatePaper extends Component {
if
(
!
formData
.
passRate
||
!
formData
.
paperName
||
this
.
checkExist
(
formData
.
paperName
)
this
.
checkExist
(
formData
.
paperName
)
||
(
formData
.
paperName
&&
formData
.
paperName
.
length
>
40
)
)
{
return
;
}
...
...
src/modules/teach-tool/paper-manage/modal/PreviewPaperModal.jsx
View file @
6f43031a
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting
* @LastEditTime: 2021-0
4-15 13:22:10
* @LastEditTime: 2021-0
6-01 17:28:21
* @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -284,7 +284,7 @@ class PreviewPaperModal extends Component {
footer=
{
null
}
onCancel=
{
this
.
props
.
close
}
>
{
paperName
&&
<
div
className=
"paper-title"
>
{
paperName
}
</
div
>
}
{
paperName
&&
<
div
className=
"paper-title"
>
{
paperName
.
length
>
40
?
paperName
.
substring
(
0
,
40
)
:
paperName
}
</
div
>
}
{
questionList
&&
questionList
.
length
>
0
?
(
<
div
className=
"question-list-box"
>
{
_
.
map
(
questionList
,
(
questionItem
,
questionIndex
)
=>
{
...
...
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