
File name
Commit message
Commit date
2023-02-16
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
import React from "react";
import { useNavigate } from "react-router";
import DetailSearch from "../../component/DetailSearch.jsx";
import Table from "../../component/Table.jsx";
import ContentTitle from "../../component/ContentTitle.jsx";
import SubTitle from "../../component/SubTitle.jsx";
import Button from "../../component/Button.jsx";
import Modal from "../../component/Modal.jsx";
export default function ECGSelect() {
const navigate = useNavigate();
const [modalOpen, setModalOpen] = React.useState(false);
const openModal = () => {
setModalOpen(true);
};
const closeModal = () => {
setModalOpen(false);
};
const [modalOpen2, setModalOpen2] = React.useState(false);
const openModal2 = () => {
setModalOpen2(true);
};
const closeModal2 = () => {
setModalOpen2(false);
};
//게시판
const thead = ["No", "이름","대상자등록번호", "생년월일", "연락처", "주소", "심전도"];
const key = ["No", "name","number", "birth", "phone", "address", "ECG"];
const content = [
{
No: 1,
name: "김복남",
number: "00000001",
birth: "1948.11.15",
phone: "010-1234-5678",
address: "경상북도 군위군 삼국유사면",
ECG: (
<Button
className={"btn-small gray-btn"}
btnName={"등록"}
onClick={openModal}
/>
),
},
];
const thead1 = [
"No",
"측정일자",
"측정파일",
"등록자",
];
const key1 = ["No", "date", "file","writer",];
const content1 = [
{
No: 1,
date: "2023-01-25",
file: ( <a href="" download="테스트">다운로드</a>),
writer: "정간호",
},
];
return (
<main>
<Modal open={modalOpen} close={closeModal} header="혈압측정 등록">
<div className="board-wrap">
<div>
<table className="margin-bottom2">
<tr>
<th>대상자명</th>
<td className="flex-start">
<input type="text" placeholder="자동입력"/>
</td>
</tr>
<tr>
<th>측정일자</th>
<td className="flex-start">
<input type="text" placeholder="자동입력"/>
</td>
</tr>
<tr>
<th>측정파일</th>
<td className="flex-start">
<input type="file"></input>
</td>
</tr>
<tr>
<th>등록자</th>
<td className="flex-start">
<input type="text" placeholder="자동입력"/>
</td>
</tr>
</table>
<div className="btn-wrap flex-center margin-bottom5">
<Button
className={"btn-small green-btn"}
btnName={"추가하기"}
onClick={() => {
// navigate("/SeniorInsert");
}}
/>
</div>
</div>
<Table
className={"caregiver-user "}
head={thead1}
contents={content1}
contentKey={key1}
/>
</div>
</Modal>
<Modal open={modalOpen2} close={closeModal2} header="진료 기록">
<div className="board-wrap">
<table className="margin-bottom2 senior-insert">
<tr>
<th>진료일자</th>
<td>
<input type="text" placeholder="자동입력"/>
</td>
</tr>
<tr>
<th>진료 사유</th>
<td className="flex-start gender">
<input type="text" />
</td>
</tr>
<tr>
<th>진료 내용</th>
<td colSpan={3}>
<input type="text" />
</td>
</tr>
<tr>
<th>작성자</th>
<td colSpan={3}>
<input type="text" placeholder="자동입력"/>
</td>
</tr>
</table>
<div className="btn-wrap flex-center margin-bottom5">
<Button
className={"btn-small green-btn"}
btnName={"추가하기"}
onClick={() => {
// navigate("/SeniorInsert");
}}
/>
</div>
<div>
<Table
className={"caregiver-user"}
head={thead1}
contents={content1}
contentKey={key1}
/>
</div>
</div>
</Modal>
<div className="content-wrap">
<ContentTitle contentTitle={"문진표 조회"} />
<div>
<DetailSearch />
<div className="board-wrap">
<Table
className={"medicine-table"}
head={thead}
contents={content}
contentKey={key}
/>
</div>
</div>
</div>
</main>
);
}