Commit 799e15a4 by yuananting

fix:样式调整

parent 0b9cb284
...@@ -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-04-15 12:07:20 * @LastEditTime: 2021-04-15 14:50:02
* @Description: 助学工具-新建/复制/编辑试卷 * @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -223,7 +223,9 @@ class OperatePaper extends Component { ...@@ -223,7 +223,9 @@ class OperatePaper extends Component {
currentQuestionList = sortedTableData.reverse(); currentQuestionList = sortedTableData.reverse();
break; break;
case "default": case "default":
currentQuestionList = _selectQuestionList.sort((a, b) => b.updateTime - a.updateTime); currentQuestionList = _selectQuestionList.sort(
(a, b) => b.updateTime - a.updateTime
);
break; break;
default: default:
currentQuestionList = _selectQuestionList; currentQuestionList = _selectQuestionList;
...@@ -545,15 +547,17 @@ class OperatePaper extends Component { ...@@ -545,15 +547,17 @@ class OperatePaper extends Component {
}, },
{ {
title: ( title: (
<Tooltip title="多选题和填空题的漏选/半对得分不能高于题目本身分值"> <span>
分值{" "} 分值{" "}
<span <Tooltip title="多选题和填空题的漏选/半对得分不能高于题目本身分值">
className="icon iconfont" <span
style={{ color: "#BFBFBF", fontSize: 14 }} className="icon iconfont"
> style={{ color: "#BFBFBF", fontSize: 14 }}
&#xe7c4; >
</span> &#xe7c4;
</Tooltip> </span>
</Tooltip>
</span>
), ),
dataIndex: "score", dataIndex: "score",
key: "score", key: "score",
...@@ -699,117 +703,112 @@ class OperatePaper extends Component { ...@@ -699,117 +703,112 @@ class OperatePaper extends Component {
<div className="page operate-paper-page"> <div className="page operate-paper-page">
<Breadcrumbs navList={currentNav} goBack={() => this.handleGoBack()} /> <Breadcrumbs navList={currentNav} goBack={() => this.handleGoBack()} />
<Spin spinning={loading}> <Spin spinning={loading}>
<div className="box"> <div className="box">
<div className="show-tips"> <div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利" /> <ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利" />
</div> </div>
<Form ref={this.formRef} style={{ marginTop: 24 }}> <Form ref={this.formRef} style={{ marginTop: 24 }}>
<Form.Item <Form.Item
name="paperName" name="paperName"
label="试卷名称:" label="试卷名称:"
required required
validateStatus={ validateStatus={this.validatePaperName(paperName) ? "error" : ""}
this.validatePaperName(paperName) ? "error" : "" help={this.validatePaperName(paperName)}
} >
help={this.validatePaperName(paperName)} <Input
> value={paperName}
<Input autoComplete="off"
value={paperName} maxLength={40}
autoComplete="off" style={{ width: 300 }}
maxLength={40} placeholder="请输入试卷名称(40字以内)"
style={{ width: 300 }} onChange={(e) => {
placeholder="请输入试卷名称(40字以内)" this.setState({
onChange={(e) => { formData: {
this.setState({ ...formData,
formData: { paperName: e.target.value.trim(),
...formData, },
paperName: e.target.value.trim(), });
}, }}
}); />
}} </Form.Item>
/>
</Form.Item>
<Form.Item <Form.Item
name="passRate" name="passRate"
label="及格线:" label="及格线:"
required required
validateStatus={check && !passRate ? "error" : ""} validateStatus={check && !passRate ? "error" : ""}
help={check && !passRate && "请输入及格线"} help={check && !passRate && "请输入及格线"}
> >
<div> <div>
<InputNumber <InputNumber
min={1} min={1}
max={100} max={100}
value={passRate} value={passRate}
onChange={(value) => { onChange={(value) => {
this.setState( this.setState(
{ {
formData: { formData: {
...formData, ...formData,
passRate: parseInt(value) || undefined, passRate: parseInt(value) || undefined,
},
}, },
() => this.setFormData(selectQuestionList) },
); () => this.setFormData(selectQuestionList)
}} );
/>{" "} }}
% />{" "}
<span className="score-info"> %
总分({Number(totalScore) || 0})*及格线( <span className="score-info">
{Number(passRate) || 0} 总分({Number(totalScore) || 0})*及格线(
%)=及格分数( {Number(passRate) || 0}
{Number(passScore) || 0} %)=及格分数(
</span> {Number(passScore) || 0}
</div> </span>
</Form.Item> </div>
</Form.Item>
<Button
className="choose-btn"
type="primary"
icon={<PlusOutlined />}
onClick={this.chooseQuestion}
>
自选题目
</Button>
{questionCnt > 0 && (
<div
className="paper-info-tip"
style={{ margin: "0 auto 12px" }}
>
总计<span>{totalScore}</span>分,共<span>{questionCnt}</span>
题。{" "}
{singleChoiceCnt > 0 &&
`单选题${singleChoiceCnt}题,共${singleChoiceScore}分;`}
{multiChoiceCnt > 0 &&
`多选题${multiChoiceCnt}题,共${multiChoiceScore}分;`}
{judgeCnt > 0 && `判断题${judgeCnt}题,共${judgeScore}分,`}
{gapFillingCnt > 0 &&
`填空题${gapFillingCnt}题,共${gapFillingScore}分,`}
{indefiniteChoiceCnt > 0 &&
`不定项选择题${indefiniteChoiceCnt}题,共${indefiniteChoiceScore}分`}
</div>
)}
<ConfigProvider renderEmpty={this.customizeRenderEmpty}> <Button
<Table className="choose-btn"
scroll={{ y: 350 }} type="primary"
columns={this.parseColumns()} icon={<PlusOutlined />}
dataSource={selectQuestionList} onClick={this.chooseQuestion}
bordered >
pagination={false} 自选题目
onChange={this.sortByQuestionType}
/>
</ConfigProvider>
</Form>
</div>
<div className="footer">
<Button onClick={this.handleGoBack}>取消</Button>
<Button onClick={this.previewPaper}>预览</Button>
<Button type="primary" onClick={this.savePaper}>
保存
</Button> </Button>
</div> {questionCnt > 0 && (
<div className="paper-info-tip" style={{ margin: "0 auto 12px" }}>
总计<span>{totalScore}</span>分,共<span>{questionCnt}</span>
题。{" "}
{singleChoiceCnt > 0 &&
`单选题${singleChoiceCnt}题,共${singleChoiceScore}分;`}
{multiChoiceCnt > 0 &&
`多选题${multiChoiceCnt}题,共${multiChoiceScore}分;`}
{judgeCnt > 0 && `判断题${judgeCnt}题,共${judgeScore}分,`}
{gapFillingCnt > 0 &&
`填空题${gapFillingCnt}题,共${gapFillingScore}分,`}
{indefiniteChoiceCnt > 0 &&
`不定项选择题${indefiniteChoiceCnt}题,共${indefiniteChoiceScore}分`}
</div>
)}
<ConfigProvider renderEmpty={this.customizeRenderEmpty}>
<Table
className="table-style"
scroll={{ y: 350 }}
columns={this.parseColumns()}
dataSource={selectQuestionList}
pagination={false}
onChange={this.sortByQuestionType}
/>
</ConfigProvider>
</Form>
</div>
<div className="footer">
<Button onClick={this.handleGoBack}>取消</Button>
<Button onClick={this.previewPaper}>预览</Button>
<Button type="primary" onClick={this.savePaper}>
保存
</Button>
</div>
</Spin> </Spin>
{selectQuestionModal} {selectQuestionModal}
{paperPreviewModal} {paperPreviewModal}
......
.operate-paper-page { .operate-paper-page {
.box { .box {
margin-bottom: 66px !important; margin-bottom: 66px !important;
.table-style {
border: 1px solid #f0f0f0 !important;
}
.ant-tabs { .ant-tabs {
color: #666666; color: #666666;
} }
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
span { span {
color: #FFB714; color: #ffb714;
} }
} }
.record-operate { .record-operate {
...@@ -33,7 +36,7 @@ ...@@ -33,7 +36,7 @@
} }
} }
&__ban { &__ban {
color: #CCCCCC; color: #cccccc;
pointer-events: none; pointer-events: none;
} }
} }
...@@ -62,3 +65,7 @@ ...@@ -62,3 +65,7 @@
max-width: 700px !important; max-width: 700px !important;
} }
} }
.ant-dropdown-menu-item-selected > span {
color: #333333;
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-03-27 11:15:03 * @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-04-09 16:55:39 * @LastEditTime: 2021-04-15 13:22:10
* @Description: 助学工具-试卷-预览试卷 * @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -284,7 +284,7 @@ class PreviewPaperModal extends Component { ...@@ -284,7 +284,7 @@ class PreviewPaperModal extends Component {
footer={null} footer={null}
onCancel={this.props.close} onCancel={this.props.close}
> >
<div className="paper-title">{paperName}</div> {paperName && <div className="paper-title">{paperName}</div>}
{questionList && questionList.length > 0 ? ( {questionList && questionList.length > 0 ? (
<div className="question-list-box"> <div className="question-list-box">
{_.map(questionList, (questionItem, questionIndex) => { {_.map(questionList, (questionItem, questionIndex) => {
......
...@@ -42,13 +42,16 @@ ...@@ -42,13 +42,16 @@
} }
} }
} }
.question-info-item:last-child {
border-bottom: none;
}
.text { .text {
margin-bottom: 8px; margin-bottom: 8px;
color: #666666;
.question-tip { .question-tip {
margin-bottom: 8px; margin-bottom: 8px;
} }
.input-box { .input-box {
color: #333333;
line-height: 20px; line-height: 20px;
* { * {
display: inline; display: inline;
......
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