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