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
2bcb8f46
Commit
2bcb8f46
authored
Apr 02, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:联调
parent
6a844944
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
12 deletions
+49
-12
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
+3
-3
src/modules/teach-tool/examination-paper/modal/PaperPreviewModal.jsx
+46
-9
No files found.
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
View file @
2bcb8f46
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditTime: 2021-04-0
1 14:41:56
* @LastEditTime: 2021-04-0
2 10:51:10
* @Description: 助学工具-新建试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -80,7 +80,7 @@ class NewExaminationPaper extends Component {
AidToolService
.
queryPaperDetail
(
query
).
then
((
res
)
=>
{
const
{
result
}
=
res
;
this
.
setState
({
selectQuestionList
:
result
.
questionList
,
formData
:
result
,
},()
=>
{
console
.
log
(
this
.
state
.
formData
)
this
.
setFormData
([]
)
})
});
};
...
...
@@ -574,7 +574,7 @@ class NewExaminationPaper extends Component {
<
Button
>
预览
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
this
.
saveExaminationPaper
(
totalScore
)
}
onClick=
{
()
=>
this
.
saveExaminationPaper
()
}
>
保存
</
Button
>
...
...
src/modules/teach-tool/examination-paper/modal/PaperPreviewModal.jsx
View file @
2bcb8f46
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting
* @LastEditTime: 2021-04-0
1 20:12:01
* @LastEditTime: 2021-04-0
2 12:42:42
* @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -110,7 +110,7 @@ class PaperPreviewModal extends Component {
};
renderOption
=
(
optionItem
,
questionType
)
=>
{
const
{
questionOptionContentList
,
optionSort
}
=
optionItem
const
{
questionOptionContentList
,
optionSort
}
=
optionItem
;
const
textContent
=
_
.
filter
(
questionOptionContentList
,
(
item
)
=>
{
return
item
.
type
==
"RICH_TEXT"
;
});
...
...
@@ -133,7 +133,7 @@ class PaperPreviewModal extends Component {
return
(
<
div
className=
"option-line__item"
>
<
div
className=
"text"
>
{
NUM_TO_WORD_MAP
[
optionSort
]
}
.
{
textDom
}
{
NUM_TO_WORD_MAP
[
optionSort
]
}
.
{
textDom
}
</
div
>
{
mediaContent
.
length
>
0
&&
this
.
renderMediaContent
(
mediaContent
)
}
</
div
>
...
...
@@ -141,6 +141,42 @@ class PaperPreviewModal extends Component {
}
};
renderAnswer
=
(
optionList
,
gapFillingAnswerList
,
questionType
)
=>
{
if
(
questionType
===
"GAP_FILLING"
)
{
{
_
.
map
(
gapFillingAnswerList
,
(
gapItem
,
gapIndex
)
=>
{
console
.
log
(
"gapFillingAnswerList"
,
gapFillingAnswerList
)
const
{
correctAnswerList
}
=
gapItem
;
return
(
<
div
>
<
span
>
【填空
{
gapIndex
+
1
}
】
</
span
>
{
_
.
map
(
correctAnswerList
,
(
answerItem
)
=>
{
return
<
span
>
{
answerItem
}
</
span
>;
})
}
</
div
>
);
});
}
// this.renderGapFillingAnswer(gapFillingAnswerList)
}
else
{
const
correctAnswerOption
=
_
.
filter
(
optionList
,
(
item
)
=>
item
.
isCorrectAnswer
===
1
);
const
correctOptionSort
=
correctAnswerOption
.
length
>
0
&&
correctAnswerOption
.
map
((
item
)
=>
{
return
NUM_TO_WORD_MAP
[
item
.
optionSort
];
});
return
(
<
div
className=
"answer-line__item"
>
<
span
>
正确答案
</
span
>
<
span
>
【
{
correctOptionSort
.
join
(
"、"
)
}
】
</
span
>
</
div
>
);
}
};
renderMediaContent
=
(
mediaContent
)
=>
{
return
(
<
div
className=
"media"
>
...
...
@@ -221,6 +257,7 @@ class PaperPreviewModal extends Component {
questionType
,
score
,
}
=
questionItem
;
console
.
log
(
optionList
);
return
(
<
div
className=
"question-info-item"
>
{
this
.
renderStem
(
...
...
@@ -230,13 +267,13 @@ class PaperPreviewModal extends Component {
questionIndex
)
}
{
_
.
map
(
optionList
,
(
optionItem
,
optionIndex
)
=>
{
return
this
.
renderOption
(
optionItem
,
questionType
,
optionIndex
);
return
this
.
renderOption
(
optionItem
,
questionType
);
})
}
{
/* {this.renderAnswer(gapFillingAnswerList, questionType)} */
}
{
this
.
renderAnswer
(
optionList
,
gapFillingAnswerList
,
questionType
)
}
</
div
>
);
})
}
...
...
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