样式修改

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

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

Loading…
Cancel
Save