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
af3d0ef9
Commit
af3d0ef9
authored
Jun 02, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Plain Diff
fix:merge
parents
2da43422
effbafa7
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
33 deletions
+56
-33
src/modules/teach-tool/components/CourseCategoryManage.jsx
+24
-15
src/modules/teach-tool/examination-manager/AddExam.less
+5
-3
src/modules/teach-tool/examination-manager/AddExam.tsx
+8
-3
src/modules/teach-tool/examination-manager/Index.tsx
+2
-2
src/modules/teach-tool/examination-manager/PreviewModal.tsx
+3
-3
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+9
-2
src/modules/teach-tool/paper-manage/modal/PreviewPaperModal.jsx
+2
-2
src/modules/teach-tool/question-manage/components/QuestionList.jsx
+3
-3
No files found.
src/modules/teach-tool/components/CourseCategoryManage.jsx
View file @
af3d0ef9
/*
/*
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @Date: 2021-02-23 18:28:50
* @LastEditors:
fusanqias
ng
* @LastEditors:
yuananti
ng
* @LastEditTime: 2021-0
5-21 17:57:59
* @LastEditTime: 2021-0
6-02 14:25:06
* @Description: 助学工具-课程分类
* @Description: 助学工具-课程分类
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -153,9 +153,7 @@ class CourseCategoryManage extends Component {
...
@@ -153,9 +153,7 @@ class CourseCategoryManage extends Component {
<
Space
className=
'title-opts'
size=
{
16
}
>
<
Space
className=
'title-opts'
size=
{
16
}
>
<
span
<
span
onClick=
{
()
=>
{
onClick=
{
()
=>
{
let
nodesCount
=
0
const
{
originTreeData
}
=
this
.
state
;
const
{
originTreeData
}
=
this
.
state
console
.
log
(
'orororo'
,
originTreeData
)
if
(
if
(
(
item
.
categoryLevel
===
0
&&
originTreeData
.
length
>=
29
)
||
(
item
.
categoryLevel
===
0
&&
originTreeData
.
length
>=
29
)
||
(
item
.
categoryLevel
>
0
&&
this
.
getRelatedNodes
(
item
.
parentId
).
length
>=
30
)
(
item
.
categoryLevel
>
0
&&
this
.
getRelatedNodes
(
item
.
parentId
).
length
>=
30
)
...
@@ -343,8 +341,10 @@ class CourseCategoryManage extends Component {
...
@@ -343,8 +341,10 @@ class CourseCategoryManage extends Component {
let
dragNodes
=
[]
let
dragNodes
=
[]
dragNodes
.
push
(
dragNode
.
id
)
dragNodes
.
push
(
dragNode
.
id
)
if
(
dragNode
.
parentId
!=
0
)
{
if
(
dragNode
.
parentId
!==
"0"
)
{
dragNodes
=
dragNodes
.
concat
(
this
.
getParentDragNodesLevel
(
this
.
state
.
treeMap
[
dragNode
.
parentId
]))
dragNodes
=
dragNodes
.
concat
(
this
.
getParentDragNodesLevel
(
this
.
state
.
treeMap
[
dragNode
.
parentId
])
);
}
}
return
dragNodes
return
dragNodes
}
}
...
@@ -365,14 +365,24 @@ class CourseCategoryManage extends Component {
...
@@ -365,14 +365,24 @@ class CourseCategoryManage extends Component {
// 拖拽
// 拖拽
onDrop
=
(
info
)
=>
{
onDrop
=
(
info
)
=>
{
if
(
this
.
state
.
categoryName
)
{
// 带搜索时的分类树不允许拖拽
return
// 不允许其他节点拖拽到未分类中
// 不允许其他节点拖拽到未分类之前
if
(
this
.
state
.
categoryName
||
(
info
.
node
.
categoryName
===
"未分类"
&&
info
.
dropPosition
===
0
)
||
(
info
.
node
.
categoryName
===
"未分类"
&&
info
.
dropToGap
&&
info
.
dropPosition
===
-
1
)
)
{
return
;
}
}
// 未分类不可以拖拽
// 未分类不可以拖拽
if
(
info
.
dragNode
.
categoryName
===
'未分类'
&&
info
.
dragNode
.
categoryLevel
===
0
)
return
message
.
info
(
'未分类”为默认分类暂不支持移动'
)
if
(
info
.
dragNode
.
categoryName
===
"未分类"
&&
// 不允许其他节点拖拽到未分类之前
info
.
dragNode
.
categoryLevel
===
0
if
(
info
.
node
.
categoryName
===
'未分类'
&&
info
.
dropToGap
&&
info
.
dropPosition
===
-
1
)
return
)
return
message
.
info
(
"“未分类”为默认分类暂不支持移动"
);
let
targetParentId
=
info
.
dropToGap
?
info
.
node
.
parentId
:
info
.
node
.
id
let
targetParentId
=
info
.
dropToGap
?
info
.
node
.
parentId
:
info
.
node
.
id
let
relatedNodes
=
this
.
getRelatedNodes
(
targetParentId
)
let
relatedNodes
=
this
.
getRelatedNodes
(
targetParentId
)
...
@@ -383,8 +393,7 @@ class CourseCategoryManage extends Component {
...
@@ -383,8 +393,7 @@ class CourseCategoryManage extends Component {
let
nodesArr
=
this
.
getDragNodesLevel
(
this
.
state
.
treeMap
[
info
.
dragNode
.
id
])
let
nodesArr
=
this
.
getDragNodesLevel
(
this
.
state
.
treeMap
[
info
.
dragNode
.
id
])
let
parentArr
=
this
.
getParentDragNodesLevel
(
this
.
state
.
treeMap
[
targetParentId
])
let
parentArr
=
this
.
getParentDragNodesLevel
(
this
.
state
.
treeMap
[
targetParentId
])
if
(
nodesArr
.
length
+
parentArr
.
length
>
4
)
{
if
(
nodesArr
.
length
+
parentArr
.
length
>
4
)
{
console
.
log
(
nodesArr
.
length
,
parentArr
.
length
)
return
message
.
info
(
"最多支持5级分类"
);
return
message
.
info
(
'最多支持5级分类'
)
}
}
}
}
if
(
relatedNodes
&&
relatedNodes
.
length
>=
30
)
{
if
(
relatedNodes
&&
relatedNodes
.
length
>=
30
)
{
...
...
src/modules/teach-tool/examination-manager/AddExam.less
View file @
af3d0ef9
.examPage{
.examPage{
padding-bottom: 50px;
padding-bottom: 50px;
.box {
.box {
padding-bottom:
40
px!important;
padding-bottom:
66
px!important;
}
}
.ant-form-item{
.ant-form-item{
margin-bottom: 24px !important;
&:last-child{
&:last-child{
margin-bottom: 0px !important;
margin-bottom: 0px !important;
}
}
}
}
.form{
.form{
margin-top: 12px;
margin-top: 24px;
margin-bottom: 32px;
width: 1000px;
width: 1000px;
.title{
.title{
font-size: 16px;
font-size: 16px;
...
@@ -18,7 +20,7 @@
...
@@ -18,7 +20,7 @@
font-weight: bold;
font-weight: bold;
color: #333333;
color: #333333;
line-height: 22px;
line-height: 22px;
margin-bottom:
8
px;
margin-bottom:
24
px;
}
}
}
}
...
...
src/modules/teach-tool/examination-manager/AddExam.tsx
View file @
af3d0ef9
...
@@ -132,6 +132,11 @@ function AddExam(props: any) {
...
@@ -132,6 +132,11 @@ function AddExam(props: any) {
return
return
}
}
if
(
param
.
examName
&&
param
.
examName
.
length
>
40
)
{
message
.
warning
(
'考试名称最多40字'
);
return
}
if
(
!
paperId
)
{
if
(
!
paperId
)
{
message
.
warning
(
'请选择试卷'
);
message
.
warning
(
'请选择试卷'
);
return
return
...
@@ -240,7 +245,7 @@ function AddExam(props: any) {
...
@@ -240,7 +245,7 @@ function AddExam(props: any) {
cancelText
:
'留在本页'
,
cancelText
:
'留在本页'
,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
onOk
:
()
=>
{
onOk
:
()
=>
{
props
.
history
.
goBack
();
window
.
RCHistory
.
push
(
"/examination-manage-index"
)
}
}
})
})
}
}
...
@@ -276,8 +281,8 @@ function AddExam(props: any) {
...
@@ -276,8 +281,8 @@ function AddExam(props: any) {
layout=
"horizontal"
layout=
"horizontal"
>
>
<
Form
.
Item
label=
"考试名称"
<
Form
.
Item
label=
"考试名称"
validateStatus=
{
(
check
&&
!
examName
)
?
'error'
:
''
}
validateStatus=
{
(
check
&&
(
!
examName
?
'请输入考试名称'
:
(
examName
.
length
>
40
)
&&
'考试名称最多40字'
)
)
?
'error'
:
''
}
help=
{
check
&&
!
examName
&&
'请选择课程'
}
help=
{
check
&&
(
!
examName
?
'请输入考试名称'
:
(
examName
.
length
>
40
)
&&
'考试名称最多40字'
)
}
required
>
required
>
<
Input
placeholder=
'请输入考试名称(40字以内)'
maxLength=
{
40
}
value=
{
examName
}
onChange=
{
(
e
)
=>
{
<
Input
placeholder=
'请输入考试名称(40字以内)'
maxLength=
{
40
}
value=
{
examName
}
onChange=
{
(
e
)
=>
{
...
...
src/modules/teach-tool/examination-manager/Index.tsx
View file @
af3d0ef9
...
@@ -68,8 +68,8 @@ function ExaminationManager(props: any) {
...
@@ -68,8 +68,8 @@ function ExaminationManager(props: any) {
descend
:
'PASS_CNT_DESC'
descend
:
'PASS_CNT_DESC'
},
},
examCreateTime
:
{
examCreateTime
:
{
ascend
:
'
EXAM_START_TIME
_ASC'
,
ascend
:
'
CREATED
_ASC'
,
descend
:
'
EXAM_START_TIME
_DESC'
descend
:
'
CREATED
_DESC'
}
}
}
}
...
...
src/modules/teach-tool/examination-manager/PreviewModal.tsx
View file @
af3d0ef9
...
@@ -33,18 +33,18 @@ function PreviewModal(props: any) {
...
@@ -33,18 +33,18 @@ function PreviewModal(props: any) {
<
div
className=
"phone"
>
<
div
className=
"phone"
>
<
div
className=
"content"
>
<
div
className=
"content"
>
<
div
className=
"topContent"
>
<
div
className=
"topContent"
>
<
div
className=
"title"
style=
{
{
fontSize
:
props
.
info
.
examName
.
length
>
24
?
13
:
22
,
marginTop
:
props
.
info
.
examName
.
length
>
24
?
44
:
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
>
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
>
}
}
<
div
className=
"rule"
>
<
div
className=
"rule"
>
<
div
className=
"item"
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
props
.
info
.
totalScore
||
0
}
</
div
>
<
div
className=
"num"
>
{
props
.
info
.
totalScore
||
props
.
info
.
examPaper
.
totalScore
||
0
}
</
div
>
<
div
className=
"text"
>
总分
<
span
className=
"dw"
style=
{
{
color
:
'#999'
}
}
>
(分)
</
span
></
div
>
<
div
className=
"text"
>
总分
<
span
className=
"dw"
style=
{
{
color
:
'#999'
}
}
>
(分)
</
span
></
div
>
</
div
>
</
div
>
<
div
className=
"item"
>
<
div
className=
"item"
>
<
div
className=
"num"
>
{
props
.
info
.
examTotal
||
0
}
</
div
>
<
div
className=
"num"
>
{
props
.
info
.
examTotal
||
props
.
info
.
examPaper
.
questionCnt
||
0
}
</
div
>
<
div
className=
"text"
>
总题数
<
span
className=
"dw"
style=
{
{
color
:
'#999'
}
}
>
(道)
</
span
></
div
>
<
div
className=
"text"
>
总题数
<
span
className=
"dw"
style=
{
{
color
:
'#999'
}
}
>
(道)
</
span
></
div
>
</
div
>
</
div
>
<
div
className=
"item"
>
<
div
className=
"item"
>
...
...
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
af3d0ef9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-0
5-30 21:22:25
* @LastEditTime: 2021-0
6-01 17:07:30
* @Description: 助学工具-新建/复制/编辑试卷
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -325,6 +325,10 @@ class OperatePaper extends Component {
...
@@ -325,6 +325,10 @@ class OperatePaper extends Component {
if
(
this
.
checkExist
(
paperName
))
{
if
(
this
.
checkExist
(
paperName
))
{
return
"该试卷名称已存在"
;
return
"该试卷名称已存在"
;
}
}
if
(
paperName
&&
paperName
.
length
>
40
)
{
return
"试卷名称最多40字"
;
}
};
};
// 保存试卷
// 保存试卷
...
@@ -337,7 +341,8 @@ class OperatePaper extends Component {
...
@@ -337,7 +341,8 @@ class OperatePaper extends Component {
if
(
if
(
!
formData
.
passRate
||
!
formData
.
passRate
||
!
formData
.
paperName
||
!
formData
.
paperName
||
this
.
checkExist
(
formData
.
paperName
)
this
.
checkExist
(
formData
.
paperName
)
||
(
formData
.
paperName
&&
formData
.
paperName
.
length
>
40
)
)
{
)
{
return
;
return
;
}
}
...
@@ -472,6 +477,8 @@ class OperatePaper extends Component {
...
@@ -472,6 +477,8 @@ class OperatePaper extends Component {
"categoryId"
"categoryId"
)}
`
,
)}
`
,
});
});
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
);
Bus
.
trigger
(
"queryPaperPageList"
,
getParameterByName
(
"categoryId"
),
0
);
},
},
});
});
};
};
...
...
src/modules/teach-tool/paper-manage/modal/PreviewPaperModal.jsx
View file @
af3d0ef9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-03-27 11:15:03
* @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-0
4-15 13:22:10
* @LastEditTime: 2021-0
6-01 17:28:21
* @Description: 助学工具-试卷-预览试卷
* @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -284,7 +284,7 @@ class PreviewPaperModal extends Component {
...
@@ -284,7 +284,7 @@ class PreviewPaperModal extends Component {
footer=
{
null
}
footer=
{
null
}
onCancel=
{
this
.
props
.
close
}
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
?
(
{
questionList
&&
questionList
.
length
>
0
?
(
<
div
className=
"question-list-box"
>
<
div
className=
"question-list-box"
>
{
_
.
map
(
questionList
,
(
questionItem
,
questionIndex
)
=>
{
{
_
.
map
(
questionList
,
(
questionItem
,
questionIndex
)
=>
{
...
...
src/modules/teach-tool/question-manage/components/QuestionList.jsx
View file @
af3d0ef9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-0
5-20 11:35:0
7
* @LastEditTime: 2021-0
6-01 11:31:1
7
* @Description: 助学工具-题库-题目列表数据
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -534,7 +534,7 @@ class QuestionList extends Component {
...
@@ -534,7 +534,7 @@ class QuestionList extends Component {
Service
.
Hades
(
'public/hades/batchMoveQuestion'
,
data
,
{
reject
:
true
}).
then
((
res
)
=>
{
Service
.
Hades
(
'public/hades/batchMoveQuestion'
,
data
,
{
reject
:
true
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
message
.
success
(
'移动成功'
);
message
.
success
(
'移动成功'
);
Bus
.
trigger
(
'queryCategoryTree'
,
'
init
'
);
Bus
.
trigger
(
'queryCategoryTree'
,
'
remain
'
);
this
.
queryQuestionPageList
();
this
.
queryQuestionPageList
();
this
.
clearSelect
();
this
.
clearSelect
();
}
else
{
}
else
{
...
@@ -569,7 +569,7 @@ class QuestionList extends Component {
...
@@ -569,7 +569,7 @@ class QuestionList extends Component {
Service
.
Hades
(
'public/hades/batchDeleteQuestion'
,
data
,
{
reject
:
true
}).
then
((
res
)
=>
{
Service
.
Hades
(
'public/hades/batchDeleteQuestion'
,
data
,
{
reject
:
true
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
message
.
success
(
'删除成功'
);
message
.
success
(
'删除成功'
);
Bus
.
trigger
(
'queryCategoryTree'
,
'
init
'
);
Bus
.
trigger
(
'queryCategoryTree'
,
'
remain
'
);
this
.
queryQuestionPageList
();
this
.
queryQuestionPageList
();
this
.
clearSelect
();
this
.
clearSelect
();
}
else
{
}
else
{
...
...
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