설문관리 중간저장.
parent
8afc775f18
commit
03c93da6cc
|
|
@ -114,7 +114,7 @@ function Survey({}) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal size={modalSize} show={show} onHide={handleClose} keyboard={false}>
|
<Modal size={modalSize} show={show} onHide={handleClose} keyboard={false} scrollable>
|
||||||
{modalBody}
|
{modalBody}
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import React, {useEffect, useState} from "react";
|
import React, {useEffect, useState} from "react";
|
||||||
import Modal from "react-bootstrap/Modal";
|
import Modal from "react-bootstrap/Modal";
|
||||||
import Form from "react-bootstrap/Form";
|
|
||||||
import Row from "react-bootstrap/Row";
|
import Row from "react-bootstrap/Row";
|
||||||
import Col from "react-bootstrap/Col";
|
import Col from "react-bootstrap/Col";
|
||||||
|
import Form from "react-bootstrap/Form";
|
||||||
|
import Table from "react-bootstrap/Table";
|
||||||
import * as EgovNet from "api/egovFetch";
|
import * as EgovNet from "api/egovFetch";
|
||||||
|
|
||||||
function QuestionModal({svySeq}){
|
function QuestionModal({svySeq}){
|
||||||
|
|
@ -21,9 +22,11 @@ function QuestionModal({svySeq}){
|
||||||
const temp = [];
|
const temp = [];
|
||||||
resp.result.qtList.forEach(function (qt, index){
|
resp.result.qtList.forEach(function (qt, index){
|
||||||
temp.push(
|
temp.push(
|
||||||
<Row>
|
<tr>
|
||||||
<Col onClick={()=>selectQt(qt.itemList)}>{qt.qtTitle}</Col>
|
<td className={"clickable"} onClick={()=>selectQt(qt.itemList)}>
|
||||||
</Row>
|
<Form.Control type={"text"} defaultValue={qt.qtTitle}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
setQtTag(temp);
|
setQtTag(temp);
|
||||||
|
|
@ -39,14 +42,40 @@ function QuestionModal({svySeq}){
|
||||||
const temp = [];
|
const temp = [];
|
||||||
itemList.forEach(function (item, index){
|
itemList.forEach(function (item, index){
|
||||||
temp.push(
|
temp.push(
|
||||||
<Row>
|
<tr>
|
||||||
<Col>{item.itemNm}</Col>
|
<td>
|
||||||
</Row>
|
<Form.Control type={"text"} defaultValue={item.itemNm}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
setItemTag(temp);
|
setItemTag(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addQt(){
|
||||||
|
const temp = [...qtTag]
|
||||||
|
temp.push(
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<Form.Control type={"text"}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
|
setQtTag(temp)
|
||||||
|
}
|
||||||
|
|
||||||
|
function addItem(){
|
||||||
|
const temp = [...itemTag]
|
||||||
|
temp.push(
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<Form.Control type={"text"}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
|
setItemTag(temp)
|
||||||
|
}
|
||||||
|
|
||||||
function editSurveyQt(e){
|
function editSurveyQt(e){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -63,10 +92,42 @@ function QuestionModal({svySeq}){
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={6}>
|
<Col xs={6}>
|
||||||
|
<Table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>질문</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{qtTag}
|
{qtTag}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button className={"btn btn_blue_h31"} onClick={addQt}>추가</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</Table>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={6}>
|
<Col xs={6}>
|
||||||
|
<Table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>보기</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{itemTag}
|
{itemTag}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button className={"btn btn_blue_h31"} onClick={addItem}>추가</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</Table>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue