Commit c1e89385 by zhujian

'fix'

parent 6876a4a8
.examPage{ .examPage{
padding-bottom: 50px; padding-bottom: 62px;
.ant-alert-info{ .ant-alert-info{
background: rgba(255, 244, 221, 1); background: rgba(255, 244, 221, 1);
border: none; border: none;
} }
.ant-form-item{
&:last-child{
margin-bottom: 0px !important;
}
}
.form{ .form{
margin-top: 12px; margin-top: 12px;
width: 1000px; width: 1000px;
...@@ -13,6 +19,7 @@ ...@@ -13,6 +19,7 @@
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 22px; line-height: 22px;
margin-bottom: 8px;
} }
} }
......
...@@ -301,7 +301,7 @@ function AddExam(props: any) { ...@@ -301,7 +301,7 @@ function AddExam(props: any) {
<InputNumber value={passRate} min={0} max={100} onChange={(value: any) => { setPassRate(parseInt(value)) }} style={{ width: 100 }} /> <InputNumber value={passRate} min={0} max={100} onChange={(value: any) => { setPassRate(parseInt(value)) }} style={{ width: 100 }} />
<span style={{ marginLeft: 4 }}>% <span style={{ marginLeft: 4 }}>%
</span> </span>
<span style={{ marginLeft: 20, color: "#999" }}> <span style={{ marginLeft: 16, color: "#999" }}>
{` 总分(${paperInfo.totalScore || 0})*及格线(${passRate || 0}%)=及格分数(${passScore})`}</span> {` 总分(${paperInfo.totalScore || 0})*及格线(${passRate || 0}%)=及格分数(${passScore})`}</span>
</Form.Item> </Form.Item>
...@@ -338,7 +338,7 @@ function AddExam(props: any) { ...@@ -338,7 +338,7 @@ function AddExam(props: any) {
<InputNumber value={examDuration} max={1440} min={1} onChange={(value: any) => { setExamDuration(parseInt(value) as any) }} style={{ width: 100 }} /> <InputNumber value={examDuration} max={1440} min={1} onChange={(value: any) => { setExamDuration(parseInt(value) as any) }} style={{ width: 100 }} />
<span style={{ marginLeft: 4 }}>分钟 <span style={{ marginLeft: 4 }}>分钟
</span> </span>
<span style={{ marginLeft: 20, color: "#999" }}> <span style={{ marginLeft: 16, color: "#999" }}>
{` 时长不能超过1440分钟(24小时)`}</span> {` 时长不能超过1440分钟(24小时)`}</span>
</Form.Item> </Form.Item>
......
...@@ -217,7 +217,7 @@ function ExamData(props: any) { ...@@ -217,7 +217,7 @@ function ExamData(props: any) {
!!examData.singleChoiceCnt && <div className="item"> !!examData.singleChoiceCnt && <div className="item">
<div className="num">{(examData.singleChoiceAccuracy || 0) * 100}%</div> <div className="num">{(examData.singleChoiceAccuracy || 0) * 100}%</div>
<div className="percent">正确率</div> <div className="percent">正确率</div>
<div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fa;</span> 单选题 <span>(共{examData.singleChoiceCnt}题)</span></div></div> <div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fa;</span>单选题 <span>(共{examData.singleChoiceCnt}题)</span></div></div>
</div> </div>
} }
...@@ -225,7 +225,7 @@ function ExamData(props: any) { ...@@ -225,7 +225,7 @@ function ExamData(props: any) {
!!examData.multiChoiceCnt && <div className="item"> !!examData.multiChoiceCnt && <div className="item">
<div className="num">{(examData.multiChoiceAccuracy || 0) * 100}%</div> <div className="num">{(examData.multiChoiceAccuracy || 0) * 100}%</div>
<div className="percent">正确率</div> <div className="percent">正确率</div>
<div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fb;</span>多选题 <span>(共{examData.multiChoiceCnt}题)</span></div></div> <div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fb;</span>多选题<span>(共{examData.multiChoiceCnt}题)</span></div></div>
</div> </div>
} }
...@@ -233,7 +233,7 @@ function ExamData(props: any) { ...@@ -233,7 +233,7 @@ function ExamData(props: any) {
!!examData.judgeCnt && <div className="item"> !!examData.judgeCnt && <div className="item">
<div className="num">{(examData.judgeAccuracy || 0) * 100}%</div> <div className="num">{(examData.judgeAccuracy || 0) * 100}%</div>
<div className="percent">正确率</div> <div className="percent">正确率</div>
<div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fc;</span>判断题 <span>(共{examData.judgeCnt}题)</span></div></div> <div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fc;</span>判断题<span>(共{examData.judgeCnt}题)</span></div></div>
</div> </div>
} }
...@@ -242,7 +242,7 @@ function ExamData(props: any) { ...@@ -242,7 +242,7 @@ function ExamData(props: any) {
!!examData.gapFillingCnt && <div className="item"> !!examData.gapFillingCnt && <div className="item">
<div className="num">{(examData.gapFillingAccuracy || 0) * 100}%</div> <div className="num">{(examData.gapFillingAccuracy || 0) * 100}%</div>
<div className="percent">正确率</div> <div className="percent">正确率</div>
<div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fd;</span>填空题 <span>(共{examData.gapFillingCnt}题)</span></div></div> <div className="subTitle"><div className="type"><span className="icon iconfont">&#xe7fd;</span>填空题<span>(共{examData.gapFillingCnt}题)</span></div></div>
</div> </div>
} }
{ {
......
...@@ -19,6 +19,16 @@ interface sortType { ...@@ -19,6 +19,16 @@ interface sortType {
type: "ascend" | "descend" | null | undefined type: "ascend" | "descend" | null | undefined
} }
interface fixType {
left :boolean | "right" | "left" | undefined,
right: "right" | "left" ,
}
const fixStr:fixType={
left:'left',
right:'right'
}
function ExaminationManager(props: any) { function ExaminationManager(props: any) {
const queryInit: any = { const queryInit: any = {
examName: '', examName: '',
...@@ -64,8 +74,8 @@ function ExaminationManager(props: any) { ...@@ -64,8 +74,8 @@ function ExaminationManager(props: any) {
const columns = [ const columns = [
{ {
title: "考试", title: "考试",
// fixed:'left', // fixed:fixStr.left,
// width:350, width:320,
dataIndex: "examName", dataIndex: "examName",
render: (text: any, record: any) => { render: (text: any, record: any) => {
var _text = '未开始', _color = 'rgba(255, 183, 20, 1)'; var _text = '未开始', _color = 'rgba(255, 183, 20, 1)';
...@@ -77,9 +87,9 @@ function ExaminationManager(props: any) { ...@@ -77,9 +87,9 @@ function ExaminationManager(props: any) {
_color = 'rgba(59, 189, 170, 1)'; _color = 'rgba(59, 189, 170, 1)';
} }
return <div style={{ width: 330 }}> return <div style={{ width: 320 }}>
<div className='oneLineText' style={{ width: 330 }} >{text}</div> <div className='oneLineText' style={{ width: 320,color:'#333',fontWeight:'bold' }} >{text}</div>
<div>{moment(record.examStartTime).format("YYYY-MM-DD HH:mm")}~{moment(record.examEndTime).format("YYYY-MM-DD HH:mm")} <div className="status" style={{ border: `1px solid ${_color}`, color: _color }}>{_text}</div></div> <div> <span >{moment(record.examStartTime).format("YYYY-MM-DD HH:mm")}~{moment(record.examEndTime).format("YYYY-MM-DD HH:mm")} </span> <div className="status" style={{ border: `1px solid ${_color}`, color: _color }}>{_text}</div></div>
<div>创建人:{record.examCreator}</div> <div>创建人:{record.examCreator}</div>
</div> </div>
}, },
...@@ -96,12 +106,14 @@ function ExaminationManager(props: any) { ...@@ -96,12 +106,14 @@ function ExaminationManager(props: any) {
}, },
{ {
title: "题目数量", title: "题目数量",
align:fixStr.right,
dataIndex: "questionCnt", dataIndex: "questionCnt",
}, },
{ {
title: "参与人数", title: "参与人数",
dataIndex: "userCnt", dataIndex: "userCnt",
align:fixStr.right,
sorter: true, sorter: true,
sortOrder: field === "userCnt" ? order : sortStatus.type, sortOrder: field === "userCnt" ? order : sortStatus.type,
...@@ -109,6 +121,7 @@ function ExaminationManager(props: any) { ...@@ -109,6 +121,7 @@ function ExaminationManager(props: any) {
{ {
title: "及格数", title: "及格数",
dataIndex: "passCnt", dataIndex: "passCnt",
align:fixStr.right,
sorter: true, sorter: true,
sortOrder: field === "passCnt" ? order : sortStatus.type, sortOrder: field === "passCnt" ? order : sortStatus.type,
...@@ -123,6 +136,7 @@ function ExaminationManager(props: any) { ...@@ -123,6 +136,7 @@ function ExaminationManager(props: any) {
}, },
{ {
title: "操作", title: "操作",
fixed:fixStr.right,
dataIndex: "operate", dataIndex: "operate",
render: (text: any, record: any) => <div className="table_operate"> render: (text: any, record: any) => <div className="table_operate">
{ {
...@@ -259,7 +273,7 @@ function ExaminationManager(props: any) { ...@@ -259,7 +273,7 @@ function ExaminationManager(props: any) {
}, [query]) }, [query])
function onShowSizeChange(current: any, size: any) { function onShowSizeChange(current: any, size: any) {
setQuery({ current: 1, size }) ( queryRef.current as any).size =size
} }
...@@ -360,7 +374,7 @@ function ExaminationManager(props: any) { ...@@ -360,7 +374,7 @@ function ExaminationManager(props: any) {
props.history.push({ props.history.push({
pathname: `${match.url}/add` pathname: `${match.url}/add`
}) })
}} style={{ margin: '12px 0' }}>新建考试</Button> }} style={{ margin: '4px 0 16px' }}>新建考试</Button>
} }
...@@ -371,7 +385,7 @@ function ExaminationManager(props: any) { ...@@ -371,7 +385,7 @@ function ExaminationManager(props: any) {
size="small" size="small"
columns={columns} columns={columns}
dataSource={list} dataSource={list}
scroll={{ x: 1100 }} scroll={{ x: 1150 }}
onChange={onChange} onChange={onChange}
pagination={false} pagination={false}
style={{ margin: '0px 0 16px' }} style={{ margin: '0px 0 16px' }}
......
.examination-manager{ .examination-manager{
.status{ .status{
display: inline-block; display: inline-block;
margin-left: 20px; margin-left: 4px;
border: 1px solid #999; border: 1px solid #999;
padding: 2px 4px; padding: 2px 4px;
line-height: 16px; line-height: 16px;
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
color: rgba(204, 204, 204, 1); color: rgba(204, 204, 204, 1);
font-size: 16px; font-size: 16px;
margin-right: 4px; margin-right: 4px;
position: relative;
top: 1px;
} }
} }
......
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