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
0e51ade3
Commit
0e51ade3
authored
Jul 13, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决周优化考试引用试卷名称的合并冲突
parents
394dc6d5
6e337d86
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
56 deletions
+39
-56
src/common/js/axios.ts
+6
-2
src/modules/teach-tool/components/CourseCategorySiderTree.jsx
+3
-3
src/modules/teach-tool/examination-manager/AddExam.tsx
+0
-0
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+21
-36
src/modules/teach-tool/paper-manage/components/PaperList.jsx
+4
-4
src/modules/teach-tool/question-manage/OperateQuestion.jsx
+5
-11
No files found.
src/common/js/axios.ts
View file @
0e51ade3
/*
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:31
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
6-24 19:34:21
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
7-12 17:40:26
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -115,6 +115,10 @@ class Axios {
window
.
RCHistory
.
replace
(
'/login'
);
return
Promise
.
reject
();
break
;
case
504
:
message
.
error
(
'网络状况不稳定,如果出现数据异常,请刷新页面'
);
Promise
.
reject
();
break
;
default
:
message
.
error
(
error
.
message
);
break
;
...
...
src/modules/teach-tool/components/CourseCategorySiderTree.jsx
View file @
0e51ade3
/*
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors:
fusanqias
ng
* @LastEditTime: 2021-0
6-15 11:20:48
* @LastEditors:
yuananti
ng
* @LastEditTime: 2021-0
7-13 11:54:21
* @Description: 助学工具-侧边课程分类树
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -20,7 +20,7 @@ class CourseCategorySiderTree extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
selectedKeys
:
[
'
QUESTION_INDEX'
,
'PAPER_INDEX'
].
includes
(
props
.
fromModule
)
?
[
getParameterByName
(
'categoryId'
)
||
'null'
]
:
[
'
null'
],
selectedKeys
:
[
'null'
],
treeData
:
props
.
treeData
||
[],
autoExpandParent
:
false
,
};
...
...
src/modules/teach-tool/examination-manager/AddExam.tsx
View file @
0e51ade3
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
0e51ade3
/*
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @LastEditors:
fusanqias
ng
* @LastEditTime: 2021-07-
01 16:30:38
* @LastEditors:
yuananti
ng
* @LastEditTime: 2021-07-
13 12:01:37
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -118,7 +118,7 @@ class OperatePaper extends Component {
portionScore
:
0
,
totalQuestion
:
0
,
},
]
]
,
};
}
...
...
@@ -352,20 +352,6 @@ class OperatePaper extends Component {
return
result
;
};
validatePaperName
=
(
paperName
)
=>
{
if
(
this
.
state
.
check
&&
!
paperName
)
{
return
'请输入试卷名称'
;
}
if
(
this
.
checkExist
(
paperName
))
{
return
'该试卷名称已存在'
;
}
if
(
paperName
&&
paperName
.
length
>
40
)
{
return
'试卷名称最多40字'
;
}
};
// 保存试卷
savePaper
=
(
saveType
)
=>
{
this
.
setState
({
check
:
true
});
...
...
@@ -373,8 +359,17 @@ class OperatePaper extends Component {
const
categoryId
=
getParameterByName
(
'categoryId'
);
const
{
match
}
=
this
.
props
;
let
questionList
=
[];
if
(
!
formData
.
passRate
||
!
formData
.
paperName
||
this
.
checkExist
(
formData
.
paperName
)
||
(
formData
.
paperName
&&
formData
.
paperName
.
length
>
40
))
{
return
;
if
(
!
formData
.
paperName
)
{
return
message
.
warning
(
'请输入试卷名称'
)
}
if
(
formData
.
paperName
.
length
>
40
)
{
return
message
.
warning
(
'试卷名称最多40字'
)
}
if
(
this
.
checkExist
(
formData
.
paperName
))
{
return
message
.
warning
(
'该试卷名称已存在'
)
}
if
(
!
formData
.
passRate
)
{
return
message
.
warning
(
'请输入及格线'
)
}
if
(
selectQuestionList
.
length
===
0
)
{
return
message
.
warning
(
'请选择题目'
);
...
...
@@ -410,18 +405,14 @@ class OperatePaper extends Component {
});
}
else
{
message
.
success
(
currentOperate
===
'new'
?
'新建成功'
:
'复制成功'
);
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
'queryPaperPageList'
,
categoryId
,
selectQuestionList
.
length
);
Bus
.
trigger
(
'queryCategoryTree'
,
'remain'
);
}
}
})
.
catch
((
e
)
=>
{
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
'queryPaperPageList'
,
categoryId
,
selectQuestionList
.
length
);
Bus
.
trigger
(
'queryCategoryTree'
,
'remain'
);
});
...
...
@@ -438,17 +429,13 @@ class OperatePaper extends Component {
});
}
else
{
message
.
success
(
'编辑成功'
);
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
'queryPaperPageList'
,
categoryId
,
selectQuestionList
.
length
);
}
}
})
.
catch
((
e
)
=>
{
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
'queryPaperPageList'
,
categoryId
,
selectQuestionList
.
length
);
});
}
...
...
@@ -482,9 +469,7 @@ class OperatePaper extends Component {
cancelText
:
'留在本页'
,
icon
:
<
span
className=
'icon iconfont default-confirm-icon'
>

</
span
>,
onOk
:
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
`/paper-manage-index?categoryId=
${
getParameterByName
(
'categoryId'
)}
`
,
});
window
.
RCHistory
.
goBack
()
Bus
.
trigger
(
'queryCategoryTree'
,
'remain'
);
Bus
.
trigger
(
'queryPaperPageList'
,
getParameterByName
(
'categoryId'
),
0
);
},
...
...
@@ -822,8 +807,8 @@ class OperatePaper extends Component {
name=
'paperName'
label=
'试卷名称:'
required
validateStatus=
{
this
.
validatePaperName
(
paperName
)
?
'error'
:
''
}
help=
{
this
.
validatePaperName
(
paperName
)
}
>
validateStatus=
{
(
check
&&
(
!
paperName
||
paperName
.
length
>
40
||
this
.
checkExist
(
paperName
))
)
?
'error'
:
''
}
help=
{
check
&&
(
!
paperName
?
'请输入试卷名称'
:
(
paperName
.
length
>
40
?
'试卷名称最多40字'
:
(
this
.
checkExist
(
paperName
)
&&
'该试卷名称已存在'
))
)
}
>
<
Input
value=
{
paperName
}
autoComplete=
'off'
...
...
src/modules/teach-tool/paper-manage/components/PaperList.jsx
View file @
0e51ade3
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-0
6-03 17:13:30
* @LastEditTime: 2021-0
7-13 15:16:52
* @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -362,9 +362,9 @@ class PaperList extends Component {
{
isPermiss
&&
(
<
div
className=
"record-operate__item"
onClick=
{
()
=>
this
.
copyPaper
(
record
)
}
onClick=
{
()
=>
this
.
organizeExam
(
record
)
}
>
复制
组织考试
</
div
>
)
}
{
isPermiss
&&
(
...
...
@@ -391,7 +391,7 @@ class PaperList extends Component {
<
span
onClick=
{
()
=>
this
.
editPaper
(
item
)
}
>
编辑
</
span
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"organizeExam"
>
<
span
onClick=
{
()
=>
this
.
organizeExam
(
item
)
}
>
组织考试
</
span
>
<
span
onClick=
{
()
=>
this
.
copyPaper
(
item
)
}
>
复制
</
span
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"del"
>
<
span
onClick=
{
()
=>
this
.
confirmDeletePaper
(
item
)
}
>
删除
</
span
>
...
...
src/modules/teach-tool/question-manage/OperateQuestion.jsx
View file @
0e51ade3
/*
* @Author: yuananting
* @Date: 2021-02-25 13:46:35
* @LastEditors:
wufan
* @LastEditTime: 2021-0
5-24 11:32:47
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
7-13 11:51:56
* @Description: 助学工具-题库-新建/编辑题目
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -161,9 +161,7 @@ class OperateQuestion extends Component {
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>
),
onOk
:
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
`/question-manage-index?categoryId=
${
getParameterByName
(
"categoryId"
)}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
);
Bus
.
trigger
(
"queryQuestionPageList"
,
getParameterByName
(
"categoryId"
));
},
...
...
@@ -248,9 +246,7 @@ class OperateQuestion extends Component {
this
.
handleRest
(
type
);
}
if
(
next
===
"close"
)
{
window
.
RCHistory
.
push
({
pathname
:
`/question-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
)
Bus
.
trigger
(
"queryQuestionPageList"
,
categoryId
)
}
...
...
@@ -271,9 +267,7 @@ class OperateQuestion extends Component {
this
.
handleRest
(
type
);
}
if
(
next
===
"close"
)
{
window
.
RCHistory
.
push
({
pathname
:
`/question-manage-index?categoryId=
${
categoryId
}
`
,
});
window
.
RCHistory
.
goBack
();
Bus
.
trigger
(
"queryCategoryTree"
,
"remain"
)
Bus
.
trigger
(
"queryQuestionPageList"
,
categoryId
)
}
...
...
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