样式修改

main
hujunpeng 3 months ago
parent 86e2080a1e
commit c5862c589d
  1. 20
      packages/examination/src/views/exam-online/compoents/ExamPaperAnalysisDetailPage.tsx
  2. 121
      packages/examination/src/views/question/questionAdd.tsx

@ -111,33 +111,35 @@ const ExamPaperAnalysisDetailPage: React.FC<RouteComponentProps> = ({history}) =
}; };
return ( return (
<div style={{ padding: 20 }}> <div style={{padding: 20}}>
<ESBreadcrumbComponent url="/exam-statistics" previousText={"考试统计"} currentText={"试卷分析"} />
{paperData && ( {paperData && (
<> <div>
{/* 第一行:试卷名称 */} {/* 第一行:试卷名称 */}
<Row gutter={16}> <Row gutter={16}>
<Col span={24}> <Col span={24}>
<Title level={3}>{paperData.paperName}</Title> <Title level={3}>{paperData.paperName}</Title>
<Button onClick={()=>handleGoBack()}></Button>
</Col> </Col>
</Row> </Row>
{/* 第二行:QuestionComponent 标签 */} {/* 第二行:QuestionComponent 标签 */}
<Row gutter={16} style={{ marginTop: 20 }}> <Row gutter={16} style={{marginTop: 20}}>
<Col span={24}> <Col span={24}>
<QuestionComponent questions={tableData} /> <QuestionComponent questions={tableData}/>
</Col> </Col>
</Row> </Row>
{/* 第三行:柱状图 */} {/* 第三行:柱状图 */}
<Row gutter={16} style={{ marginTop: 20 }}> <Row gutter={16} style={{marginTop: 20}}>
<Col span={24}> <Col span={24}>
<h1></h1> <h1></h1>
<ReactECharts option={getBarChartOption(paperData.questionAccuracyData)} /> <ReactECharts option={getBarChartOption(paperData.questionAccuracyData)}/>
</Col> </Col>
</Row> </Row>
</> </div>
)} )}
<div style={{display: 'flex', justifyContent: 'flex-end'}}>
<Button onClick={() => handleGoBack()}></Button>
</div>
</div> </div>
); );
}; };

@ -2,6 +2,7 @@ import React, { Component } from "react";
import { Form, Input, Button, Radio, Checkbox, Select, message } from "antd"; import { Form, Input, Button, Radio, Checkbox, Select, message } from "antd";
import { dictionary } from "api/dict/index"; import { dictionary } from "api/dict/index";
import { addQuestion, findIndustry } from "api/question"; import { addQuestion, findIndustry } from "api/question";
import { CloseCircleOutlined } from '@ant-design/icons';
import * as XLSX from "xlsx"; import * as XLSX from "xlsx";
const { Option } = Select; const { Option } = Select;
@ -282,70 +283,72 @@ class QuestionAdd extends Component<any, States> {
{formIds.map((formId, index) => ( {formIds.map((formId, index) => (
<div key={formId} style={{ marginBottom: 30 }}> <div key={formId} style={{ marginBottom: 30 }}>
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
<Form.Item name={`questionTypes_${formId}`}> <div style={{ display: "flex", flex: 1, justifyContent: "flex-start" }}>
<Radio.Group <Form.Item name={`questionTypes_${formId}`}>
onChange={(e) => this.handleQuestionTypeChange(formId, e.target.value)} <Radio.Group
> onChange={(e) => this.handleQuestionTypeChange(formId, e.target.value)}
<Radio.Button value="1"></Radio.Button> >
<Radio.Button value="2"></Radio.Button> <Radio.Button value="1"></Radio.Button>
</Radio.Group> <Radio.Button value="2"></Radio.Button>
</Form.Item> </Radio.Group>
<Form.Item </Form.Item>
label="监管行业:" <Form.Item
name={`industryId_${formId}`} label="监管行业:"
rules={[{ required: true, message: "请选择监管行业" }]} name={`industryId_${formId}`}
> rules={[{ required: true, message: "请选择监管行业" }]}
<Select
placeholder="请选择监管行业"
style={{ width: 240 }}
allowClear
> >
{industryDict && industryDict.length > 0? ( <Select
(() => { placeholder="请选择监管行业"
let rows = []; style={{ width: 240 }}
for (let i = 0; i < industryDict.length; i++) { allowClear
const item = industryDict[i]; >
rows.push( {industryDict && industryDict.length > 0? (
<Option value={item.industryId}>{item.industryName}</Option> (() => {
); let rows = [];
} for (let i = 0; i < industryDict.length; i++) {
return rows; const item = industryDict[i];
})() rows.push(
) : ( <Option value={item.industryId}>{item.industryName}</Option>
<Option disabled></Option> );
)} }
</Select> return rows;
</Form.Item> })()
<Form.Item ) : (
label="AQ服务类型:" <Option disabled></Option>
name={`serviceTypeId_${formId}`} )}
rules={[{ required: true, message: "请选择AQ服务类型" }]} </Select>
> </Form.Item>
<Select <Form.Item
placeholder="请选择AQ服务类型" label="AQ服务类型"
style={{ width: 240 }} name={`serviceTypeId_${formId}`}
allowClear rules={[{ required: true, message: "请选择AQ服务类型" }]}
> >
{serviceTypeDict && serviceTypeDict.length > 0? ( <Select
(() => { placeholder="请选择AQ服务类型"
let rows = []; style={{ width: 240 }}
for (let i = 0; i < serviceTypeDict.length; i++) { allowClear
const item = serviceTypeDict[i]; >
rows.push( {serviceTypeDict && serviceTypeDict.length > 0? (
<Option value={String(item.dictKey)}>{item.dictValue}</Option> (() => {
); let rows = [];
} for (let i = 0; i < serviceTypeDict.length; i++) {
return rows; const item = serviceTypeDict[i];
})() rows.push(
) : ( <Option value={String(item.dictKey)}>{item.dictValue}</Option>
<Option disabled></Option> );
)} }
</Select> return rows;
</Form.Item> })()
) : (
<Option disabled></Option>
)}
</Select>
</Form.Item>
</div>
<Form.Item> <Form.Item>
{index > 0 && ( {index > 0 && (
<Button type="link" onClick={() => this.handleDeleteQuestion(formId)}> <Button type="link" onClick={() => this.handleDeleteQuestion(formId)}>
X <CloseCircleOutlined />
</Button> </Button>
)} )}
</Form.Item> </Form.Item>

Loading…
Cancel
Save