From 03c93da6cc10ef2d0e5b9908c00d32ba02a7013c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Wed, 6 Mar 2024 19:37:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=A4=EB=AC=B8=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=A4=91=EA=B0=84=EC=A0=80=EC=9E=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/admin/contents/Survey.jsx | 2 +- .../admin/contents/survey/QuestionModal.jsx | 79 ++++++++++++++++--- 2 files changed, 71 insertions(+), 10 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/contents/Survey.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/contents/Survey.jsx index 366602ba..c4cad4f 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/contents/Survey.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/contents/Survey.jsx @@ -114,7 +114,7 @@ function Survey({}) { - + {modalBody} diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/contents/survey/QuestionModal.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/contents/survey/QuestionModal.jsx index e822272..66e22ad 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/contents/survey/QuestionModal.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/contents/survey/QuestionModal.jsx @@ -1,8 +1,9 @@ import React, {useEffect, useState} from "react"; import Modal from "react-bootstrap/Modal"; -import Form from "react-bootstrap/Form"; import Row from "react-bootstrap/Row"; import Col from "react-bootstrap/Col"; +import Form from "react-bootstrap/Form"; +import Table from "react-bootstrap/Table"; import * as EgovNet from "api/egovFetch"; function QuestionModal({svySeq}){ @@ -21,9 +22,11 @@ function QuestionModal({svySeq}){ const temp = []; resp.result.qtList.forEach(function (qt, index){ temp.push( - - selectQt(qt.itemList)}>{qt.qtTitle} - + + selectQt(qt.itemList)}> + + + ) }) setQtTag(temp); @@ -39,14 +42,40 @@ function QuestionModal({svySeq}){ const temp = []; itemList.forEach(function (item, index){ temp.push( - - {item.itemNm} - + + + + + ) }) setItemTag(temp); } + function addQt(){ + const temp = [...qtTag] + temp.push( + + + + + + ) + setQtTag(temp) + } + + function addItem(){ + const temp = [...itemTag] + temp.push( + + + + + + ) + setItemTag(temp) + } + function editSurveyQt(e){ } @@ -63,10 +92,42 @@ function QuestionModal({svySeq}){ - {qtTag} + + + + + + + + {qtTag} + + + + + + +
질문
+ +
- {itemTag} + + + + + + + + {itemTag} + + + + + + +
보기
+ +