Commit 8d3049f2 by zhujian

'feat:添加悬浮提示'

parent 51719bb9
...@@ -232,19 +232,47 @@ class PaperList extends Component { ...@@ -232,19 +232,47 @@ class PaperList extends Component {
dataIndex: "questionCnt", dataIndex: "questionCnt",
width: this.props.type !== "modal-select" ? "12%" : "20%", width: this.props.type !== "modal-select" ? "12%" : "20%",
align: "right", align: "right",
render: (val, record) => {
return (
this.props.type !== "modal-select" ?
<span>
{record.questionCnt}
</span> :
<Tooltip
overlayClassName="tool-list"
title={
<div>
<div className="item">单选题:{record.singleChoiceCnt || 0}</div>
<div className="item">多选题:{record.multiChoiceCnt || 0}</div>
<div className="item">判断题:{record.judgeCnt || 0}</div>
<div className="item">填空题:{record.gapFillingCnt || 0}</div>
<div className="item">不定项选择题:{record.indefiniteChoiceCnt || 0}</div>
</div>
}
placement="top"
overlayStyle={{ maxWidth: 700 }}
>
<span>
{record.questionCnt}
</span>
</Tooltip>
);
}, },
{
title: "关联考试数",
key: "relatedExam",
dataIndex: "relatedExam",
width: this.props.type !== "modal-select" ? "16%" : "24%",
align: "right",
}, },
]; ];
if (this.props.type !== "modal-select") { if (this.props.type !== "modal-select") {
const isPermiss = ["CloudManager", "StoreManager"].includes(User.getUserRole()); const isPermiss = ["CloudManager", "StoreManager"].includes(User.getUserRole());
columns.push({ columns.push({
title: "关联考试数",
key: "relatedExam",
dataIndex: "relatedExam",
width: this.props.type !== "modal-select" ? "16%" : "24%",
align: "right",
})
columns.push({
title: "操作", title: "操作",
key: "operate", key: "operate",
dataIndex: "operate", dataIndex: "operate",
......
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