|
|
@ -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,6 +283,7 @@ 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" }}> |
|
|
|
|
|
|
|
<div style={{ display: "flex", flex: 1, justifyContent: "flex-start" }}> |
|
|
|
<Form.Item name={`questionTypes_${formId}`}> |
|
|
|
<Form.Item name={`questionTypes_${formId}`}> |
|
|
|
<Radio.Group |
|
|
|
<Radio.Group |
|
|
|
onChange={(e) => this.handleQuestionTypeChange(formId, e.target.value)} |
|
|
|
onChange={(e) => this.handleQuestionTypeChange(formId, e.target.value)} |
|
|
@ -342,10 +344,11 @@ class QuestionAdd extends Component<any, States> { |
|
|
|
)} |
|
|
|
)} |
|
|
|
</Select> |
|
|
|
</Select> |
|
|
|
</Form.Item> |
|
|
|
</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> |
|
|
|