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
5646ebc7
Commit
5646ebc7
authored
Jun 09, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决合并快捷排序冲突
parents
b2cf2de1
f2de2d7f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
194 additions
and
67 deletions
+194
-67
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+173
-49
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
+20
-17
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
+1
-1
No files found.
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
5646ebc7
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
View file @
5646ebc7
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting
* @LastEditTime: 2021-06-0
4 17:06:46
* @LastEditTime: 2021-06-0
9 12:00:12
* @Description: 助学工具-题库-操作题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -66,12 +66,17 @@ class OperateQuestionTab extends Component {
}
componentDidMount
()
{
const
{
chooseOptions
}
=
this
.
state
;
const
{
questionTypeKey
}
=
this
.
props
;
const
isEditCurrent
=
getParameterByName
(
"id"
)
&&
getParameterByName
(
"type"
)
===
questionTypeKey
;
const
isEditCurrent
=
getParameterByName
(
"id"
)
&&
getParameterByName
(
"type"
)
===
questionTypeKey
;
const
optionSize
=
isEditCurrent
?
20
:
4
;
if
([
"INDEFINITE_CHOICE"
,
"MULTI_CHOICE"
,
"SINGLE_CHOICE"
].
includes
(
questionTypeKey
))
{
// 选择题(单选 多选 不定项)-插入4条默认选项
if
(
[
"INDEFINITE_CHOICE"
,
"MULTI_CHOICE"
,
"SINGLE_CHOICE"
].
includes
(
questionTypeKey
)
)
{
// 选择题(单选 多选 不定项)-插入4条默认选项
for
(
var
i
=
0
;
i
<
optionSize
;
i
++
)
{
this
.
handleAddOption
();
this
.
setState
({
...
...
@@ -631,9 +636,9 @@ class OperateQuestionTab extends Component {
this
.
state
.
stemContent
,
(
contentItem
)
=>
contentItem
.
type
===
"RICH_TEXT"
);
if
(
stemContent
.
textLength
>
1000
)
{
if
(
stemContent
.
textLength
>
1000
)
{
validateError
++
;
}
}
let
stem
=
stemContent
.
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
stem
=
stem
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
stem
=
stem
.
replace
(
/
\s
+/g
,
""
);
...
...
@@ -691,7 +696,7 @@ class OperateQuestionTab extends Component {
optionUnChecked
=
item
.
isCorrectAnswer
?
optionUnChecked
:
optionUnChecked
+
1
;
if
(
optionContent
[
0
].
textLength
>
1000
)
{
if
(
optionContent
[
0
].
textLength
>
1000
)
{
validateError
++
;
}
let
optionInput
=
optionContent
[
0
].
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
...
...
@@ -1037,11 +1042,11 @@ class OperateQuestionTab extends Component {
return
dom
?
(
<
div
className=
"question-item_question-content"
style=
{
{
display
:
[
"PICTURE"
,
"VIDEO"
].
includes
(
type
)
?
"inline-grid"
:
"flex"
,
}
}
style=
{
!
[
"PICTURE"
,
"VIDEO"
].
includes
(
type
)
?
{
display
:
"flex"
}
:
{
float
:
"left"
}
}
key=
{
index
}
>
{
dom
}
...
...
@@ -1191,10 +1196,8 @@ class OperateQuestionTab extends Component {
data
-
label=
"正确答案"
>
{
_
.
map
(
chooseOptions
,
(
optionItem
,
optionIndex
)
=>
{
const
{
questionOptionContentList
,
isCorrectAnswer
,
}
=
optionItem
;
const
{
questionOptionContentList
,
isCorrectAnswer
}
=
optionItem
;
optionItem
.
optionSort
=
optionIndex
;
const
mediaBtn
=
[
"VOICE"
,
"AUDIO"
,
"PICTURE"
];
const
placeHold
=
...
...
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
View file @
5646ebc7
...
...
@@ -32,7 +32,7 @@
color: #666666;
.input-box {
margin-bottom: 8px;
display: inline-block;
//
display: inline-block;
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
...
...
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