diff --git a/public/ai_rag.html b/public/ai_rag.html new file mode 100644 index 0000000..0bea218 --- /dev/null +++ b/public/ai_rag.html @@ -0,0 +1,94 @@ + + + + + 스프링 부트 웹 서버 + + + + + + + +
+ + +
+

Egov심플홈페이지 프런트엔드/서버엔드
무엇이든 물어보세요(RAG-검색증강생성AI)

+ +
+ + + + + +
+ +
+ + + 질문을 입력하면 검색증강생성-AI가 아래 문서들을 참고하여 답변을 생성합니다.
+ "https://raw.githubusercontent.com/eGovFramework/egovframe-template-simple-react/refs/heads/main/README.md"; // 프런트엔드소개
+ "https://raw.githubusercontent.com/eGovFramework/egovframe-template-simple-backend/refs/heads/main/README.md"; // 백엔드소개
+ AI 답변에 오류가 있을 수 있습니다. 중요한 문제는 답변이 정확한지 유선으로 확인하시기 바랍니다. +
+
+
+ + + +
+ + \ No newline at end of file diff --git a/src/components/EgovFloatingButton.jsx b/src/components/EgovFloatingButton.jsx new file mode 100644 index 0000000..a63e2ae --- /dev/null +++ b/src/components/EgovFloatingButton.jsx @@ -0,0 +1,29 @@ +import "../css/floatingButton.css"; + +function EgovFloatingButton() { + let aiWindow; + const openAiWindow = () => { + if (!aiWindow || aiWindow.closed) { + let url = "/ai_rag.html"; + // 모니터 가로 해상도 - 팝업창 가로 크기 = 오른쪽에 붙는 X 좌표 + var leftPos = window.screen.width - 600; + leftPos += window.screenLeft; // 듀얼 모니터일 때 + var topPos = 0; // 화면 상단에 붙임 + const options = "width=600,height=700,left="+leftPos+",top="+topPos+",scrollbars=yes,resizable=yes"; + // 새 창 열기 + aiWindow = window.open(url, "aiWindow", options); + }else{ + // 이미 열려있다면 기존 창을 활성화(포커스) + aiWindow.focus(); + } + }; + + return ( +
+
+ AI +
+
+ ); +} +export default EgovFloatingButton; \ No newline at end of file diff --git a/src/css/floatingButton.css b/src/css/floatingButton.css new file mode 100644 index 0000000..daf4460 --- /dev/null +++ b/src/css/floatingButton.css @@ -0,0 +1,24 @@ +@charset "UTF-8"; +/* 플로딩 메뉴 디자인 과 소스 */ +.floating-container { + position: fixed; + bottom: 30px; + right: 30px; + z-index: 9999; + display: flex; + flex-direction: column; + align-items: center; +} +.floating-button { + width: 60px; + height: 60px; + background-color: #007bff; + color: white; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + font-size: 24px; + cursor: pointer; + box-shadow: 0 4px 6px rgba(0,0,0,0.2); +} \ No newline at end of file diff --git a/src/routes/index.jsx b/src/routes/index.jsx index 3d60253..61cff09 100644 --- a/src/routes/index.jsx +++ b/src/routes/index.jsx @@ -9,6 +9,8 @@ import { useAuth } from "@/contexts/AuthContext"; import EgovHeader from "@/components/EgovHeader"; import EgovFooter from "@/components/EgovFooter"; import EgovInfoPopup from "@/components/EgovInfoPopup"; +//AI-RAG 페이지 호출 버튼 추가 2026.06.18(목) 김일국 추가 +import EgovFloatingButton from "@/components/EgovFloatingButton"; import EgovError from "@/components/EgovError"; import EgovMain from "@/pages/main/EgovMain"; @@ -378,6 +380,7 @@ const SecondRoutes = () => { + {/* AI-RAG 페이지 호출 버튼 추가 2026.06.18(목) 김일국 추가 */} ); };