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
64e0b3ef
Commit
64e0b3ef
authored
Jun 08, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:样式调整
parent
b42c48d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+21
-13
No files found.
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
64e0b3ef
...
@@ -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-06-0
7 16:53:03
* @LastEditTime: 2021-06-0
8 10:18:44
* @Description: 助学工具-新建/复制/编辑试卷
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -76,7 +76,7 @@ class OperatePaper extends Component {
...
@@ -76,7 +76,7 @@ class OperatePaper extends Component {
currentCategoryPapers
:
[],
currentCategoryPapers
:
[],
loading
:
false
,
loading
:
false
,
check
:
false
,
check
:
false
,
sorterMethod
:
"
default
"
,
sorterMethod
:
"
addOrder
"
,
sorterBy
:
[
sorterBy
:
[
"SINGLE_CHOICE"
,
"SINGLE_CHOICE"
,
"MULTI_CHOICE"
,
"MULTI_CHOICE"
,
...
@@ -680,7 +680,7 @@ class OperatePaper extends Component {
...
@@ -680,7 +680,7 @@ class OperatePaper extends Component {
quickSorter
=
(
list
,
sorterMethod
,
sorterBy
)
=>
{
quickSorter
=
(
list
,
sorterMethod
,
sorterBy
)
=>
{
this
.
setState
({
this
.
setState
({
selectQuestionList
:
selectQuestionList
:
sorterMethod
===
"
default
"
sorterMethod
===
"
addOrder
"
?
list
.
sort
((
a
,
b
)
=>
a
.
sorterIndex
-
b
.
sorterIndex
)
?
list
.
sort
((
a
,
b
)
=>
a
.
sorterIndex
-
b
.
sorterIndex
)
:
list
.
sort
(
:
list
.
sort
(
(
a
,
b
)
=>
(
a
,
b
)
=>
...
@@ -724,11 +724,11 @@ class OperatePaper extends Component {
...
@@ -724,11 +724,11 @@ class OperatePaper extends Component {
const
selectQuestionList
=
[...
this
.
state
.
selectQuestionList
];
const
selectQuestionList
=
[...
this
.
state
.
selectQuestionList
];
const
questionTypeEnum
=
{
const
questionTypeEnum
=
{
SINGLE_CHOICE
:
"
单选题
"
,
SINGLE_CHOICE
:
"
【单选题】
"
,
MULTI_CHOICE
:
"
多选题
"
,
MULTI_CHOICE
:
"
【多选题】
"
,
JUDGE
:
"
判断题
"
,
JUDGE
:
"
【判断题】
"
,
GAP_FILLING
:
"
填空题
"
,
GAP_FILLING
:
"
【填空题】
"
,
INDEFINITE_CHOICE
:
"
不定项选择题
"
,
INDEFINITE_CHOICE
:
"
【不定项选择题】
"
,
};
};
const
columns
=
[
const
columns
=
[
...
@@ -736,21 +736,25 @@ class OperatePaper extends Component {
...
@@ -736,21 +736,25 @@ class OperatePaper extends Component {
title
:
"题型"
,
title
:
"题型"
,
dataIndex
:
"typeKey"
,
dataIndex
:
"typeKey"
,
key
:
"typeKey"
,
key
:
"typeKey"
,
render
:
(
text
,
record
,
index
)
=>
questionTypeEnum
[
text
]
,
render
:
(
text
,
record
,
index
)
=>
<
span
style=
{
{
color
:
'#333333'
}
}
>
{
questionTypeEnum
[
text
]
}
</
span
>
,
},
},
{
{
title
:
"操作"
,
title
:
"操作"
,
key
:
"action"
,
key
:
"action"
,
align
:
'right'
,
render
:
(
text
,
record
,
index
)
=>
(
render
:
(
text
,
record
,
index
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
>
<
span
<
span
style=
{
{
color
:
index
>
0
?
'#2966FF'
:
'#CCCCCC'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
index
>
0
&&
this
.
handleMoveTypeSorter
(
index
,
-
1
);
index
>
0
&&
this
.
handleMoveTypeSorter
(
index
,
-
1
);
}
}
}
}
>
>
上移
上移
</
span
>
</
span
>
<
span
style=
{
{
color
:
'#BFBFBF'
}
}
>
|
</
span
>
<
span
<
span
style=
{
{
color
:
index
<
4
?
'#2966FF'
:
'#CCCCCC'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
index
<
4
&&
this
.
handleMoveTypeSorter
(
index
,
1
);
index
<
4
&&
this
.
handleMoveTypeSorter
(
index
,
1
);
}
}
}
}
...
@@ -833,7 +837,7 @@ class OperatePaper extends Component {
...
@@ -833,7 +837,7 @@ class OperatePaper extends Component {
</
span
>
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Space
size=
{
16
}
>
<
Space
size=
{
8
}
>
<
Button
<
Button
className=
"choose-btn"
className=
"choose-btn"
type=
"primary"
type=
"primary"
...
@@ -897,6 +901,7 @@ class OperatePaper extends Component {
...
@@ -897,6 +901,7 @@ class OperatePaper extends Component {
<
Modal
<
Modal
maskClosable=
{
false
}
maskClosable=
{
false
}
title=
"快捷排序"
title=
"快捷排序"
width=
{
560
}
visible=
{
quickSortModalVisible
}
visible=
{
quickSortModalVisible
}
onOk=
{
()
=>
{
onOk=
{
()
=>
{
this
.
setState
(
this
.
setState
(
...
@@ -918,11 +923,14 @@ class OperatePaper extends Component {
...
@@ -918,11 +923,14 @@ class OperatePaper extends Component {
}
}
value=
{
sorterMethod
}
value=
{
sorterMethod
}
>
>
<
Radio
value=
{
"
default"
}
>
默认
排序
</
Radio
>
<
Radio
value=
{
"
addOrder"
}
>
按添加顺序
排序
</
Radio
>
<
Radio
value=
{
"
questionType
"
}
>
按题型排序
</
Radio
>
<
Radio
value=
{
"
typeOrder
"
}
>
按题型排序
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
{
sorterMethod
===
"
questionType
"
&&
(
{
sorterMethod
===
"
typeOrder
"
&&
(
<
Table
<
Table
rowClassName=
"table-row-style"
style=
{
{
marginTop
:
'24px'
}
}
showHeader=
{
false
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
sorterTypeList
}
dataSource=
{
sorterTypeList
}
pagination=
{
false
}
pagination=
{
false
}
...
...
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