
--- client/resources/css/main.css
+++ client/resources/css/main.css
... | ... | @@ -436,6 +436,7 @@ |
436 | 436 |
position: relative; |
437 | 437 |
padding-left: 5rem; |
438 | 438 |
text-align: center; |
439 |
+ cursor: pointer; |
|
439 | 440 |
} |
440 | 441 |
|
441 | 442 |
.statistics-govern li p:nth-of-type(1) { |
... | ... | @@ -492,6 +493,7 @@ |
492 | 493 |
|
493 | 494 |
.statistics-agency li { |
494 | 495 |
padding: 0 2rem; |
496 |
+ cursor: pointer; |
|
495 | 497 |
} |
496 | 498 |
|
497 | 499 |
.statistics-agency li .text { |
+++ client/views/component/Calendar_admin.jsx
... | ... | @@ -0,0 +1,39 @@ |
1 | +import React, { useState } from "react"; | |
2 | +import { useNavigate, useLocation } from "react-router"; | |
3 | +import { useSelector } from "react-redux"; | |
4 | + | |
5 | +import Calendar from "react-calendar"; | |
6 | +import "react-calendar/dist/Calendar.css"; | |
7 | +import Modal from "./Modal.jsx"; | |
8 | +import moment from "moment"; | |
9 | + | |
10 | +import CommonUtil from "../../resources/js/CommonUtil.js"; | |
11 | + | |
12 | +export default function CalendarComponent({ data }) { | |
13 | + const navigate = useNavigate(); | |
14 | + const location = useLocation(); | |
15 | + | |
16 | + //전역 변수 저장 객체 | |
17 | + const state = useSelector((state) => { return state }); | |
18 | + | |
19 | + const [value, setValue] = useState(new Date()); | |
20 | + | |
21 | + return ( | |
22 | + <> | |
23 | + <Calendar | |
24 | + onChange={setValue} | |
25 | + value={value} | |
26 | + tileContent={({ date, view }) => { | |
27 | + return ( | |
28 | + <> | |
29 | + <div className="calendar-data"> | |
30 | + <div>3/5</div> | |
31 | + <div>30℃</div> | |
32 | + </div> | |
33 | + </> | |
34 | + ); | |
35 | + }} | |
36 | + /> | |
37 | + </> | |
38 | + ); | |
39 | +} |
--- client/views/component/chart/Chart10.jsx
+++ client/views/component/chart/Chart10.jsx
... | ... | @@ -50,6 +50,7 @@ |
50 | 50 |
})); |
51 | 51 |
|
52 | 52 |
let yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, { |
53 |
+ min: 0, |
|
53 | 54 |
renderer: am5xy.AxisRendererY.new(root, {}) |
54 | 55 |
})); |
55 | 56 |
|
... | ... | @@ -70,13 +71,6 @@ |
70 | 71 |
strokeWidth: 2, |
71 | 72 |
strokeDasharray: [3, 3], |
72 | 73 |
}); |
73 |
- |
|
74 |
- |
|
75 |
- // Add scrollbar |
|
76 |
- // https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/ |
|
77 |
- chart.set("scrollbarX", am5.Scrollbar.new(root, { |
|
78 |
- orientation: "horizontal" |
|
79 |
- })); |
|
80 | 74 |
|
81 | 75 |
|
82 | 76 |
// Set data |
--- client/views/component/chart/Chart2_govern.jsx
+++ client/views/component/chart/Chart2_govern.jsx
... | ... | @@ -50,6 +50,7 @@ |
50 | 50 |
})); |
51 | 51 |
|
52 | 52 |
let yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, { |
53 |
+ min:0, |
|
53 | 54 |
renderer: am5xy.AxisRendererY.new(root, {}) |
54 | 55 |
})); |
55 | 56 |
|
... | ... | @@ -70,13 +71,6 @@ |
70 | 71 |
strokeWidth: 2, |
71 | 72 |
strokeDasharray: [3, 3], |
72 | 73 |
}); |
73 |
- |
|
74 |
- |
|
75 |
- // Add scrollbar |
|
76 |
- // https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/ |
|
77 |
- chart.set("scrollbarX", am5.Scrollbar.new(root, { |
|
78 |
- orientation: "horizontal" |
|
79 |
- })); |
|
80 | 74 |
|
81 | 75 |
|
82 | 76 |
// Set data |
--- client/views/component/chart/Chart9.jsx
+++ client/views/component/chart/Chart9.jsx
... | ... | @@ -74,13 +74,6 @@ |
74 | 74 |
}); |
75 | 75 |
|
76 | 76 |
|
77 |
- // Add scrollbar |
|
78 |
- // https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/ |
|
79 |
- chart.set("scrollbarX", am5.Scrollbar.new(root, { |
|
80 |
- orientation: "horizontal" |
|
81 |
- })); |
|
82 |
- |
|
83 |
- |
|
84 | 77 |
// Set data |
85 | 78 |
series.data.setAll(data); |
86 | 79 |
|
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 |
import EquipmentRentalInsert from "./equipment/EquipmentRentalInsert.jsx"; |
38 | 38 |
import EquipmentSelect from "./equipment/EquipmentSelect.jsx"; |
39 | 39 |
import EquipmentData from "./equipment/EquipmentData.jsx"; |
40 |
+import EquipmentDataSelect from "./equipment/EquipmentDataSelect.jsx"; |
|
40 | 41 |
import GovernmentEquipmentSelect from "./equipment/GovernmentEquipmentSelect.jsx"; |
41 | 42 |
import AgencyEquipmentSelect from "./equipment/AgencyEquipmentSelect.jsx"; |
42 | 43 |
import EquipmentManagementSelectOne from "./equipment/EquipmentManagementSelectOne.jsx"; |
... | ... | @@ -146,6 +147,7 @@ |
146 | 147 |
<Route path="/EquipmentManagementInsert" element={<EquipmentManagementInsert />}></Route> |
147 | 148 |
<Route path="/EquipmentSelect" element={<EquipmentSelect />}></Route> |
148 | 149 |
<Route path="/EquipmentData" element={<EquipmentData />}></Route> |
150 |
+ <Route path="/EquipmentDataSelect" element={<EquipmentDataSelect />}></Route> |
|
149 | 151 |
<Route path="/EquipmentManagementSelectOne" element={<EquipmentManagementSelectOne />}></Route> |
150 | 152 |
<Route path="/MedicineCareSelectOne" element={<MedicineCareSelectOne />}></Route> |
151 | 153 |
<Route path="/TemperatureManagementSelectOne" element={<TemperatureManagementSelectOne />}></Route> |
+++ client/views/pages/equipment/EquipmentDataSelect.jsx
... | ... | @@ -0,0 +1,174 @@ |
1 | +import React from "react"; | |
2 | +import { useNavigate, useLocation } from "react-router"; | |
3 | +import { useSelector } from "react-redux"; | |
4 | + | |
5 | +import 'react-datepicker/dist/react-datepicker.css'; | |
6 | + | |
7 | +import Title from "../../component/Title.jsx"; | |
8 | +import DetailTitle from "../../component/DetailTitle.jsx"; | |
9 | +import Modal from "../../component/Modal.jsx"; | |
10 | +import CalendarAdmin from "../../component/Calendar_admin.jsx"; | |
11 | +import Chart9 from "../../component/chart/Chart9.jsx"; | |
12 | +import Senior from '../../../resources/files/images/senior.png'; | |
13 | + | |
14 | +export default function EquipmentDataSelect() { | |
15 | + const navigate = useNavigate(); | |
16 | + const location = useLocation(); | |
17 | + | |
18 | + //전역 변수 저장 객체 | |
19 | + const state = useSelector((state) => { return state }); | |
20 | + console.log("state: ", state); | |
21 | + | |
22 | + //장비 초기값 | |
23 | + const equipment = useLocation()['state']['equipment']; | |
24 | + | |
25 | + //장비 데이터 조회 | |
26 | + const equipmentDataSelect = () => { | |
27 | + fetch("/user/equipmentDataSelect.json", { | |
28 | + method: "POST", | |
29 | + headers: { | |
30 | + 'Content-Type': 'application/json; charset=UTF-8' | |
31 | + }, | |
32 | + body: JSON.stringify(equipment), | |
33 | + }).then((response) => response.json()).then((data) => { | |
34 | + console.log("equipmentDataSelect data : ", data); | |
35 | + }).catch((error) => { | |
36 | + console.log('equipmentDataSelect() /user/equipmentDataSelect.json error : ', error); | |
37 | + }); | |
38 | + }; | |
39 | + | |
40 | + const [modalOpen, setModalOpen] = React.useState(false); | |
41 | + const openModal = () => { | |
42 | + setModalOpen(true); | |
43 | + }; | |
44 | + const closeModal = () => { | |
45 | + setModalOpen(false); | |
46 | + }; | |
47 | + | |
48 | + const calerndarClick = (data) => { | |
49 | + console.log("calerndarClick - date, visitRecord", data); | |
50 | + openModal(); | |
51 | + } | |
52 | + | |
53 | + const DateMedication = () => { | |
54 | + return ( | |
55 | + <> | |
56 | + <tr> | |
57 | + <th rowSpan={2}>복약량</th> | |
58 | + <th>식전</th> | |
59 | + <th>아침</th> | |
60 | + <th>점심</th> | |
61 | + <th>저녁</th> | |
62 | + <th>취침</th> | |
63 | + </tr> | |
64 | + <tr> | |
65 | + <td colSpan={5}>정보가 없습니다.</td> | |
66 | + </tr> | |
67 | + </> | |
68 | + ) | |
69 | + } | |
70 | + | |
71 | + const DateTemperature = () => { | |
72 | + return ( | |
73 | + <> | |
74 | + <tr> | |
75 | + <th rowSpan={2}>온도</th> | |
76 | + <th>02:00</th> | |
77 | + <th>10:00</th> | |
78 | + <th>14:00</th> | |
79 | + <th>23:00</th> | |
80 | + </tr> | |
81 | + <tr> | |
82 | + <td colSpan={4}>정보가 없습니다.</td> | |
83 | + </tr> | |
84 | + </> | |
85 | + ) | |
86 | + } | |
87 | + | |
88 | + const DateBattery = () => { | |
89 | + return ( | |
90 | + <tr> | |
91 | + <th>배터리</th> | |
92 | + <td colSpan={5}>정보가 없습니다.</td> | |
93 | + </tr> | |
94 | + ) | |
95 | + } | |
96 | + | |
97 | + | |
98 | + return ( | |
99 | + <> | |
100 | + <main className="pink"> | |
101 | + <div className="flex-start main-guardian"><img src={Senior} alt="" /> | |
102 | + <Title title={equipment['equipment_serial_number']} explanation={"복약, 온도, 배터리 현황을 확인하세요."} /> | |
103 | + </div> | |
104 | + | |
105 | + <CalendarAdmin data={{ onClick: calerndarClick }} /> | |
106 | + | |
107 | + <div className="content-wrap margin-top"> | |
108 | + <div className="margin-top"> | |
109 | + <table> | |
110 | + <thead> | |
111 | + <tr> | |
112 | + <th rowSpan={2}>날짜</th> | |
113 | + <th colSpan={5}>복약량</th> | |
114 | + <th colSpan={4}>온도</th> | |
115 | + <th rowSpan={2}>배터리</th> | |
116 | + </tr> | |
117 | + <tr> | |
118 | + <th>식전</th> | |
119 | + <th>아침</th> | |
120 | + <th>점심</th> | |
121 | + <th>저녁</th> | |
122 | + <th>취침</th> | |
123 | + <th>02:00</th> | |
124 | + <th>10:00</th> | |
125 | + <th>14:00</th> | |
126 | + <th>23:00</th> | |
127 | + </tr> | |
128 | + </thead> | |
129 | + | |
130 | + <tbody> | |
131 | + <tr> | |
132 | + <td>2023-11-07</td> | |
133 | + <td>0</td> | |
134 | + <td>1</td> | |
135 | + <td>1</td> | |
136 | + <td>1</td> | |
137 | + <td>0</td> | |
138 | + <td>20℃</td> | |
139 | + <td>25℃</td> | |
140 | + <td>30℃</td> | |
141 | + <td>20℃</td> | |
142 | + <td>99%</td> | |
143 | + </tr> | |
144 | + </tbody> | |
145 | + </table> | |
146 | + </div> | |
147 | + </div> | |
148 | + | |
149 | + <div className="content-wrap margin-top"> | |
150 | + <DetailTitle contentTitle={"대상자의 복약률을 확인 할 수 있습니다."} /> | |
151 | + <div className="main-guardian-chart margin-top"> | |
152 | + <Chart9 /> | |
153 | + </div> | |
154 | + </div> | |
155 | + | |
156 | + <div className="btn-wrap flex-center"> | |
157 | + <button className="btn-large gray-btn" onClick={() => { navigate(-1) }}>이전</button> | |
158 | + </div> | |
159 | + | |
160 | + <Modal open={modalOpen} close={closeModal} header="시니어 정보 관리"> | |
161 | + <div className="modal-visit board-wrap"> | |
162 | + <table className="margin-bottom"> | |
163 | + <tbody> | |
164 | + <DateMedication /> | |
165 | + <DateTemperature /> | |
166 | + <DateBattery /> | |
167 | + </tbody> | |
168 | + </table> | |
169 | + </div> | |
170 | + </Modal> | |
171 | + </main> | |
172 | + </> | |
173 | + ); | |
174 | +}(No newline at end of file) |
--- client/views/pages/equipment/EquipmentSelect.jsx
+++ client/views/pages/equipment/EquipmentSelect.jsx
... | ... | @@ -574,6 +574,7 @@ |
574 | 574 |
</thead> |
575 | 575 |
<tbody> |
576 | 576 |
{newEquipment.equipmentList.map((item, idx) => { |
577 |
+ { console.log("item: ", item) } |
|
577 | 578 |
return ( |
578 | 579 |
<tr> |
579 | 580 |
<td data-label="No">{newEquipment.equipmentListCount - idx - (newEquipmentSearch.currentPage - 1) * newEquipmentSearch.perPage}</td> |
... | ... | @@ -582,6 +583,7 @@ |
582 | 583 |
<td data-label="상태">{equipmentStates[item['equipment_state']]}</td> |
583 | 584 |
<td data-label="관리"> |
584 | 585 |
<button className={"btn-small gray-btn"} onClick={() => modalEquipmentOpen(item)}>정보 수정</button> |
586 |
+ <button className={"btn-small gray-btn"} onClick={() => { navigate("/EquipmentDataSelect", { state: { equipment: item } }) }}>기기데이터 정보 조회</button> |
|
585 | 587 |
</td> |
586 | 588 |
</tr> |
587 | 589 |
) |
--- client/views/pages/main/Main_agency.jsx
+++ client/views/pages/main/Main_agency.jsx
... | ... | @@ -1,4 +1,5 @@ |
1 | 1 |
import React from "react"; |
2 |
+import { useNavigate, useLocation } from "react-router"; |
|
2 | 3 |
import { useSelector } from "react-redux"; |
3 | 4 |
import Title from "../../component/Title.jsx"; |
4 | 5 |
import Table from "../../component/Table.jsx"; |
... | ... | @@ -25,6 +26,9 @@ |
25 | 26 |
import CommonUtil from "../../../resources/js/CommonUtil.js"; |
26 | 27 |
|
27 | 28 |
export default function Main2() { |
29 |
+ const navigate = useNavigate(); |
|
30 |
+ const location = useLocation(); |
|
31 |
+ |
|
28 | 32 |
//전역 변수 저장 객체 |
29 | 33 |
const state = useSelector((state) => { return state }); |
30 | 34 |
|
... | ... | @@ -237,7 +241,7 @@ |
237 | 241 |
<div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"대상자 현황"} explanation={new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString().replace(/\./g, '').replace(/\s/g, '-') + " 기준"} /></div> |
238 | 242 |
<div className="main-grid-agency margin-bottom2"> |
239 | 243 |
<ul className="content-box statistics-agency" background="#8ef3d1"> |
240 |
- <li className="flex-start"> |
|
244 |
+ <li className="flex-start" onClick={() => { navigate("/Healthcare") }}> |
|
241 | 245 |
<img src={medicineAgency} alt="" /> |
242 | 246 |
<div className="text"> |
243 | 247 |
<p>미복약 위험 대상자</p> |
... | ... | @@ -246,7 +250,7 @@ |
246 | 250 |
</li> |
247 | 251 |
</ul> |
248 | 252 |
<ul className="content-box statistics-agency" background="#ebe7b9" > |
249 |
- <li className="flex-start"> |
|
253 |
+ <li className="flex-start" onClick={() => { navigate("/Healthcare") }}> |
|
250 | 254 |
<img src={temperatureAgency} alt="" /> |
251 | 255 |
<div className="text"> |
252 | 256 |
<p>댁내 온도 위험 대상자</p> |
... | ... | @@ -255,7 +259,7 @@ |
255 | 259 |
</li> |
256 | 260 |
</ul> |
257 | 261 |
<ul className="content-box statistics-agency" background="#5f9af3"> |
258 |
- <li className="flex-start"> |
|
262 |
+ <li className="flex-start" onClick={() => { navigate("/Healthcare") }}> |
|
259 | 263 |
<img src={batteryAgency} alt="" /> |
260 | 264 |
<div className="text"> |
261 | 265 |
<p>배터리 부족 대상자</p> |
... | ... | @@ -264,7 +268,7 @@ |
264 | 268 |
</li> |
265 | 269 |
</ul> |
266 | 270 |
<ul className="content-box statistics-agency" background="#8080FF"> |
267 |
- <li className="flex-start"> |
|
271 |
+ <li className="flex-start" onClick={() => { navigate("/Healthcare") }}> |
|
268 | 272 |
<img src={wifioff} alt="" /> |
269 | 273 |
<div className="text"> |
270 | 274 |
<p>데이터 미확인 대상자</p> |
--- client/views/pages/main/Main_agencyAdmin.jsx
+++ client/views/pages/main/Main_agencyAdmin.jsx
... | ... | @@ -1,4 +1,5 @@ |
1 | 1 |
import React, { useState } from "react"; |
2 |
+import { useNavigate, useLocation } from "react-router"; |
|
2 | 3 |
import { useSelector } from "react-redux"; |
3 | 4 |
|
4 | 5 |
|
... | ... | @@ -27,6 +28,8 @@ |
27 | 28 |
import "leaflet/dist/leaflet.css"; |
28 | 29 |
|
29 | 30 |
export default function Main_agencyAdmin() { |
31 |
+ const navigate = useNavigate(); |
|
32 |
+ const location = useLocation(); |
|
30 | 33 |
|
31 | 34 |
//전역 변수 저장 객체 |
32 | 35 |
const state = useSelector((state) => { return state }); |
... | ... | @@ -232,28 +235,28 @@ |
232 | 235 |
<div className="main-grid-government"> |
233 | 236 |
<div className="sub-grid-government"> |
234 | 237 |
<ul className="content-box statistics-govern" background="#8ef3d1"> |
235 |
- <li> |
|
238 |
+ <li onClick={() => { navigate("/HealthcareAdmin") }}> |
|
236 | 239 |
<p><MedicationIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#076143", borderRadius: "50px" }} /></p> |
237 | 240 |
<p>{cityName} 미복약 위험 대상자</p> |
238 | 241 |
<p>0</p> |
239 | 242 |
</li> |
240 | 243 |
</ul> |
241 | 244 |
<ul className="content-box statistics-govern" background="#ebe7b9" > |
242 |
- <li> |
|
245 |
+ <li onClick={() => { navigate("/HealthcareAdmin") }}> |
|
243 | 246 |
<p><DeviceThermostatIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#f1de05", borderRadius: "50px" }} /></p> |
244 | 247 |
<p>{cityName} 댁내 온도 위험 대상자</p> |
245 | 248 |
<p>{temperatureCount}</p> |
246 | 249 |
</li> |
247 | 250 |
</ul> |
248 | 251 |
<ul className="content-box statistics-govern" background="#5f9af3"> |
249 |
- <li> |
|
252 |
+ <li onClick={() => { navigate("/HealthcareAdmin") }}> |
|
250 | 253 |
<p><BatteryCharging20Icon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#5f9af3", borderRadius: "50px" }} /></p> |
251 | 254 |
<p>{cityName} 배터리 부족 대상자 </p> |
252 | 255 |
<p>{batteryCount}</p> |
253 | 256 |
</li> |
254 | 257 |
</ul> |
255 | 258 |
<ul className="content-box statistics-govern" background="#8080FF"> |
256 |
- <li> |
|
259 |
+ <li onClick={() => { navigate("/HealthcareAdmin") }}> |
|
257 | 260 |
<p><WifiOffIcon sx={{ width: "50px", height: "50px", padding: "5px", color: "#ffffff", background: "#8080FF", borderRadius: "50px", boxSizing: "border-box" }} /></p> |
258 | 261 |
<p>{cityName} 데이터 미확인 대상자 </p> |
259 | 262 |
<p>{batteryCount}</p> |
--- client/views/pages/main/Main_government.jsx
+++ client/views/pages/main/Main_government.jsx
... | ... | @@ -1,4 +1,5 @@ |
1 | 1 |
import React, { useState } from "react"; |
2 |
+import { useNavigate, useLocation } from "react-router"; |
|
2 | 3 |
import { useSelector } from "react-redux"; |
3 | 4 |
|
4 | 5 |
|
... | ... | @@ -26,6 +27,8 @@ |
26 | 27 |
import "leaflet/dist/leaflet.css"; |
27 | 28 |
|
28 | 29 |
export default function Main_government() { |
30 |
+ const navigate = useNavigate(); |
|
31 |
+ const location = useLocation(); |
|
29 | 32 |
|
30 | 33 |
//전역 변수 저장 객체 |
31 | 34 |
const state = useSelector((state) => { return state }); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?