Commit 64e0b3ef by yuananting

style:样式调整

parent b42c48d7
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditTime: 2021-06-07 16:53:03
* @LastEditTime: 2021-06-08 10:18:44
* @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -76,7 +76,7 @@ class OperatePaper extends Component {
currentCategoryPapers: [],
loading: false,
check: false,
sorterMethod: "default",
sorterMethod: "addOrder",
sorterBy: [
"SINGLE_CHOICE",
"MULTI_CHOICE",
......@@ -680,7 +680,7 @@ class OperatePaper extends Component {
quickSorter = (list, sorterMethod, sorterBy) => {
this.setState({
selectQuestionList:
sorterMethod === "default"
sorterMethod === "addOrder"
? list.sort((a, b) => a.sorterIndex - b.sorterIndex)
: list.sort(
(a, b) =>
......@@ -724,11 +724,11 @@ class OperatePaper extends Component {
const selectQuestionList = [...this.state.selectQuestionList];
const questionTypeEnum = {
SINGLE_CHOICE: "单选题",
MULTI_CHOICE: "多选题",
JUDGE: "判断题",
GAP_FILLING: "填空题",
INDEFINITE_CHOICE: "不定项选择题",
SINGLE_CHOICE: "【单选题】",
MULTI_CHOICE: "【多选题】",
JUDGE: "【判断题】",
GAP_FILLING: "【填空题】",
INDEFINITE_CHOICE: "【不定项选择题】",
};
const columns = [
......@@ -736,21 +736,25 @@ class OperatePaper extends Component {
title: "题型",
dataIndex: "typeKey",
key: "typeKey",
render: (text, record, index) => questionTypeEnum[text],
render: (text, record, index) => <span style={{color: '#333333'}}>{questionTypeEnum[text]}</span>,
},
{
title: "操作",
key: "action",
align: 'right',
render: (text, record, index) => (
<Space size="middle">
<span
style={{color: index > 0 ? '#2966FF' : '#CCCCCC', cursor: 'pointer'}}
onClick={() => {
index > 0 && this.handleMoveTypeSorter(index, -1);
}}
>
上移
</span>
<span style={{color: '#BFBFBF'}}> | </span>
<span
style={{color: index < 4 ? '#2966FF' : '#CCCCCC', cursor: 'pointer'}}
onClick={() => {
index < 4 && this.handleMoveTypeSorter(index, 1);
}}
......@@ -833,7 +837,7 @@ class OperatePaper extends Component {
</span>
</div>
</Form.Item>
<Space size={16}>
<Space size={8}>
<Button
className="choose-btn"
type="primary"
......@@ -897,6 +901,7 @@ class OperatePaper extends Component {
<Modal
maskClosable={false}
title="快捷排序"
width={560}
visible={quickSortModalVisible}
onOk={() => {
this.setState(
......@@ -918,11 +923,14 @@ class OperatePaper extends Component {
}
value={sorterMethod}
>
<Radio value={"default"}>默认排序</Radio>
<Radio value={"questionType"}>按题型排序</Radio>
<Radio value={"addOrder"}>按添加顺序排序</Radio>
<Radio value={"typeOrder"}>按题型排序</Radio>
</Radio.Group>
{sorterMethod === "questionType" && (
{sorterMethod === "typeOrder" && (
<Table
rowClassName="table-row-style"
style={{marginTop: '24px'}}
showHeader={false}
columns={columns}
dataSource={sorterTypeList}
pagination={false}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment