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
08ce27ec
Commit
08ce27ec
authored
Jun 04, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:题库编辑超出4个选项信息缺失
parent
1b8f3f61
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
+8
-11
No files found.
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
View file @
08ce27ec
/*
/*
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @Date: 2021-02-25 14:34:29
* @LastEditors:
wufan
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
5-14 18:17:08
* @LastEditTime: 2021-0
6-04 17:06:46
* @Description: 助学工具-题库-操作题目Tab
* @Description: 助学工具-题库-操作题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -67,22 +67,19 @@ class OperateQuestionTab extends Component {
...
@@ -67,22 +67,19 @@ class OperateQuestionTab extends Component {
componentDidMount
()
{
componentDidMount
()
{
const
{
chooseOptions
}
=
this
.
state
;
const
{
chooseOptions
}
=
this
.
state
;
if
(
const
{
questionTypeKey
}
=
this
.
props
;
[
"INDEFINITE_CHOICE"
,
"MULTI_CHOICE"
,
"SINGLE_CHOICE"
].
includes
(
const
isEditCurrent
=
getParameterByName
(
"id"
)
&&
getParameterByName
(
"type"
)
===
questionTypeKey
;
this
.
props
.
questionTypeKey
const
optionSize
=
isEditCurrent
?
20
:
4
;
)
if
([
"INDEFINITE_CHOICE"
,
"MULTI_CHOICE"
,
"SINGLE_CHOICE"
].
includes
(
questionTypeKey
))
{
)
{
if
(
chooseOptions
.
length
===
0
)
{
// 选择题(单选 多选 不定项)-插入4条默认选项
// 选择题(单选 多选 不定项)-插入4条默认选项
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
for
(
var
i
=
0
;
i
<
optionSize
;
i
++
)
{
this
.
handleAddOption
();
this
.
handleAddOption
();
this
.
setState
({
this
.
setState
({
[
`optionsValidate_
${
i
}
`
]:
"success"
,
[
`optionsValidate_
${
i
}
`
]:
"success"
,
[
`optionsText_
${
i
}
`
]:
""
,
[
`optionsText_
${
i
}
`
]:
""
,
});
});
}
}
}
}
else
if
(
questionTypeKey
===
"JUDGE"
)
{
}
else
if
(
this
.
props
.
questionTypeKey
===
"JUDGE"
)
{
this
.
initJudgeOption
(
"正确"
);
this
.
initJudgeOption
(
"正确"
);
this
.
initJudgeOption
(
"错误"
);
this
.
initJudgeOption
(
"错误"
);
}
}
...
...
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