Commit 64e0b3ef by yuananting

style:样式调整

parent b42c48d7
...@@ -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-07 16:53:03 * @LastEditTime: 2021-06-08 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}
......
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