Commit e1223310 by yuananting

fix:解决合并冲突

parents 5b9e121b 193f1d3a
import React, { useEffect, useState } from 'react';
import { Empty, ConfigProvider, Table } from 'antd';
function XMTable(props) {
const [empty, setEmpty] = useState(props.renderEmpty || {});
const [data, setData] = useState({});
useEffect(() => {
setEmpty(props.renderEmpty)
delete props.renderEmpty;
setData(props);
}, [props]);
// 自定义表格空状态
function customizeRenderEmpty() {
return (
<Empty
image={empty.image || Empty.PRESENTED_IMAGE_SIMPLE}
imageStyle={{
height: 150,
}}
description={empty.description}
></Empty>
);
};
return (
<ConfigProvider renderEmpty={customizeRenderEmpty}>
<Table
{...data}
/>
</ConfigProvider>
)
}
export default XMTable;
\ No newline at end of file
.examPage{
padding-bottom: 50px;
.box {
padding-bottom: 40px!important;
padding-bottom: 66px!important;
}
.ant-form-item{
margin-bottom: 24px !important;
&:last-child{
margin-bottom: 0px !important;
}
}
.form{
margin-top: 12px;
margin-top: 24px;
margin-bottom: 32px;
width: 1000px;
.title{
......@@ -19,7 +20,7 @@
font-weight: bold;
color: #333333;
line-height: 22px;
margin-bottom: 8px;
margin-bottom: 24px;
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-05-31 13:42:54
* @LastEditTime: 2021-06-03 16:09:00
* @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -500,8 +500,9 @@ class PaperList extends Component {
onSelectPaper = (selectedPaperKeys) => {
if (selectedPaperKeys.length > 50) {
const extraLength = selectedPaperKeys.length - 50;
selectedPaperKeys.splice(selectedPaperKeys.length - extraLength, extraLength);
message.warning('最多只能选择50个试卷');
return null;
}
this.setState({ selectedPaperKeys });
};
......
......@@ -154,6 +154,14 @@ class SelectQuestionList extends Component {
parseColumns = () => {
const columns = [
{
title: "题型",
key: "questionTypeEnum",
dataIndex: "questionTypeEnum",
render: (val) => {
return questionTypeEnum[val];
},
},
{
title: "题目",
key: "questionStem",
dataIndex: "questionStem",
......@@ -180,14 +188,6 @@ class SelectQuestionList extends Component {
},
},
{
title: "题型",
key: "questionTypeEnum",
dataIndex: "questionTypeEnum",
render: (val) => {
return questionTypeEnum[val];
},
},
{
title: "正确率",
key: "accuracy",
dataIndex: "accuracy",
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-06-01 11:31:17
* @LastEditTime: 2021-06-03 16:41:47
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -477,8 +477,9 @@ class QuestionList extends Component {
onSelectChange = (selectedRowKeys) => {
if (selectedRowKeys.length > 50) {
const extraLength = selectedRowKeys.length - 50;
selectedRowKeys.splice(selectedRowKeys.length - extraLength, extraLength);
message.warning('最多只能选择50个题目');
return null;
}
this.setState({ selectedRowKeys });
};
......@@ -710,12 +711,19 @@ class QuestionList extends Component {
</span>
</div>
}
<Dropdown className="ml8" overlay={this.setMoreOperationOption()}>
<Button id="more_operate">
更多操作
<DownOutlined />
</Button>
</Dropdown>
{!!categoryId ? (
<Dropdown className="ml8" overlay={this.setMoreOperationOption()}>
<Button id="more_operate">
更多操作
<DownOutlined />
</Button>
</Dropdown>
) : (
<Space size={16}>
<Button onClick={() => this.batchMove()}>批量移动</Button>
<Button onClick={() => this.batchDelete()}>批量删除</Button>
</Space>
)}
</Space>
)}
<div className="question-list-content">
......
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