Преглед на файлове

Merge branch 'databank' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter.git into databank

junekeunsong преди 4 години
родител
ревизия
32350327da

+ 6 - 1
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -70,6 +70,7 @@ public class ClinicController extends LifeCenterController {
 
 		ModelAndView mv = setMV("clinic/state");
 
+		mv.addObject("page", page);
 		mv.addObject("searchText", searchText);
 		mv.addObject("total", total);
 		mv.addObject("items", result);
@@ -80,7 +81,9 @@ public class ClinicController extends LifeCenterController {
 	@RequestMapping("/info")
 	public ModelAndView patientInfo(
 			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
-			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType) {
+			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType,
+			@RequestParam(value = "refererSearch", required = false, defaultValue = "") String refererSearch,
+			@RequestParam(value = "refererPage", required = false, defaultValue = "") String refererPage) {
 
 		// 환자정보
 		PatientDTO patientDto = new PatientDTO();
@@ -129,6 +132,8 @@ public class ClinicController extends LifeCenterController {
 		mv.addObject("phrType", phrType);
 		mv.addObject("phrTotal", total);
 		mv.addObject("phrItems", result);
+		mv.addObject("refererSearch", refererSearch);
+		mv.addObject("refererPage", refererPage);
 
 		return mv;
 	}

+ 2 - 2
src/main/resources/application.properties

@@ -6,8 +6,8 @@ spring.mvc.view.suffix=.jsp
 #spring.datasource.driver-class-name=cubrid.jdbc.driver.CUBRIDDriver
 #spring.datasource.url=jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
 spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
-spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
-#spring.datasource.url=jdbc:log4jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
+#spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
+spring.datasource.url=jdbc:log4jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
 
 spring.datasource.username=dba
 spring.datasource.password=#zo240s!

+ 19 - 1
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -562,6 +562,24 @@ function retrieveMemoData() {
     });
 }
 
+function gotoList() {
+	var url = "./state";
+	var refererSearch = '<c:out value="${refererSearch}" />';
+	var refererPage = '<c:out value="${refererPage}" />';
+	
+	if (refererSearch !== "" && refererPage !== "") {
+		url += "?searchText=" + encodeURIComponent(refererSearch) + "&page=" + refererPage;
+	}
+	else if (refererSearch !== "") {
+		url += "?searchText=" + encodeURIComponent(refererSearch);
+	}
+	else if (refererPage !== "") {
+		url += "?page=" + refererPage;
+	}
+
+	location.href = url;
+}
+
 $(document).ready(function() {
 
 	// 최초 로드시 phrData 체온이 로드됨. 해당 데이터 차트 그려줌.
@@ -1176,7 +1194,7 @@ $(document).ready(function() {
 										<div class="col-12">
 											<div class="text-right">
 												<button class="btn btn-outline-success" onclick="nonFaceStart();">비대면 진료</button>
-												<button class="btn btn-primary" onclick="history.back();">목록</button>
+												<button class="btn btn-primary" onclick="gotoList()">목록</button>
 											</div>
 										</div>
 									</div>

+ 61 - 18
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -9,9 +9,29 @@
 var totalList = ${total}; // 저장된 데이터 항목 수
 var viewEntry = 30;		// 한 화면에 표시되는 갯수 
 var totalPage = Math.ceil(totalList / viewEntry);
-var reloadIntervalTime = 30;	// 
 var reloadTimer = null;
 
+function getReloadIntervalTime() {
+	// console.log("getReloadIntervalTime");
+	return localStorage.getItem('reloadIntervalTime') || "30";
+}
+
+function setReloadIntervalTime(value) {
+	// console.log("setReloadIntervalTime" + value);
+	localStorage.setItem('reloadIntervalTime', value);
+}
+
+// function getPlayOnOff() {
+// 	console.log("getPlayOnOff");
+// 	console.log(localStorage.getItem('isPlaying'));
+// 	return localStorage.getItem('isPlaying') || "off";
+// }
+
+// function setPlayOnOff(value) {
+// 	console.log("setPlayOnOff" + value);
+// 	localStorage.setItem('isPlaying', value);
+// }
+
 function ajaxErrorHandler(request, status, error){
 	if (request.status === 0) {
         alert('Not connect.\n Verify Network.');
@@ -49,25 +69,21 @@ function ajaxErrorHandler(request, status, error){
 }
 
 function changeReloadInterval() {
-	reloadIntervalTime = $("#reloadIntervalSelect option:selected").val();
+	var value = $("#reloadIntervalSelect option:selected").val();
+
+	setReloadIntervalTime(value);
 }
 
 function activeReloadTimer() {	
-	if (reloadIntervalTime) {
-		if (reloadTimer) {
-			deactiveReloadTimer();
-		}
-		
-		reloadTimer = setInterval(function() {
+	if (reloadTimer) {
+		deactiveReloadTimer();
+	}
+	
+	reloadTimer = setInterval(function() {
 			nextPage();
-		}, reloadIntervalTime * 1000);
+	}, getReloadIntervalTime() * 1000);
 
-		return true;
-	}
-	else {
-		
-		return false;
-	}
+	return true;
 }
 
 function deactiveReloadTimer() {	
@@ -192,8 +208,31 @@ function responsiblePagination() {
 
 $(document).ready(function() {
 
+	$("#reloadIntervalSelect").val(getReloadIntervalTime());
+
+	// if (getPlayOnOff() === "on") {
+	// 	if (activeReloadTimer()) {	
+	// 		$(".playPause").attr('id','pauseButton');
+	// 		$(".playPause").find('i').removeClass('fa-play').addClass('fa-pause');
+	// 		$('#reloadIntervalSelect').prop('disabled',true);
+	// 	}
+	// }
+	// else {
+	// 	deactiveReloadTimer();
+	// 	$(".playPause").attr('id','playButton');
+	// 	$(".playPause").find('i').removeClass('fa-pause').addClass('fa-play');
+	// 	$('#reloadIntervalSelect').prop('disabled',false);
+	// }
+
 	$(document).on("click", ".patients-stats", function() {
-		location.href = $(this).attr("data-url");
+		var searchText = '<c:out value="${searchText}" />';
+		var currentPage = $("#pagination .active").children("a").text();
+		var url = $(this).attr("data-url");
+		if (searchText !== "") {
+			url += "&refererSearch="+encodeURIComponent(searchText);
+		}
+		url += "&refererPage="+currentPage;
+		location.href = url;
 	});
 
 	// 반복 start/stop 클릭
@@ -204,6 +243,8 @@ $(document).ready(function() {
           	$(this).attr('id','pauseButton');
           	$(this).find('i').removeClass('fa-play').addClass('fa-pause');
           	$('#reloadIntervalSelect').prop('disabled',true);
+
+						// setPlayOnOff("on");
     	  }
        }
        else if(thisID == 'pauseButton'){
@@ -211,6 +252,8 @@ $(document).ready(function() {
           $(this).attr('id','playButton');
           $(this).find('i').removeClass('fa-pause').addClass('fa-play');
           $('#reloadIntervalSelect').prop('disabled',false);
+
+					// setPlayOnOff("off");
        }
     });
 
@@ -226,7 +269,7 @@ $(document).ready(function() {
 		// href: 'URL',// template for pagination links (default javascript:void(0);)
 		// hrefVariable: false,// variable name in href template for page number (default {{number}})
 		total: totalPage, // 페이지 수
-		page: 1, // 초기 페이지
+		page: ${page}, // 초기 페이지
 		leaps: true,
 		first: '<i class="mdi mdi-chevron-double-left"></i>',
 		prev: '<i class="mdi mdi-chevron-left"></i>',
@@ -340,7 +383,7 @@ $(document).ready(function() {
                                           			<i class="fas fa-play"></i>
                                     			</button>
 											</label> <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" value="${searchText}" onkeyup="if(event.keyCode===13){searchPatients()}">
-											<button class="btn btn-primary" onclick="searchPatients()">검색</button>
+											<button id="searchKeywordBtn" class="btn btn-primary" onclick="searchPatients()">검색</button>
 										</div>
 									</div>
 								</div>

+ 2 - 2
src/main/webapp/WEB-INF/jsp/mobile/servey/servey.jsp

@@ -202,8 +202,8 @@ function setEventHandler() {
                             1. 입원일을 입력 하세요.
                         </div>
                         <div class="date">
-                            <fmt:parseDate var="hDate" value="${info.hospitalizationDate}" pattern="yyyy-MM-dd HH:mm" />
-                            <c:set var="hospitalizationDate"><fmt:formatDate value="${hDate}" pattern="yyyy년 MM월 dd일 HH시 mm분" /></c:set>
+                            <fmt:parseDate var="hDate" value="${info.hospitalizationDate}" pattern="yyyy-MM-dd" />
+                            <c:set var="hospitalizationDate"><fmt:formatDate value="${hDate}" pattern="yyyy년 MM월 dd일" /></c:set>
                             <c:out value="${hospitalizationDate}" />
                         </div>
                     </div>

+ 5 - 0
src/main/webapp/resources/css/common/classic.css

@@ -87,6 +87,7 @@
 .tab .card-header .h4 { padding-top: 10px; }
 .tab i.mdi { color: #0063dc; }
 .tab table pre { margin: 0; font-family: inherit; font-size: inherit; color: inherit; }
+#searchKeyword { width: 100px!important; }
 @media screen and (min-width:992px) { 
   .mobile-table th, .mobile-table td { float: inherit; width: inherit; } 
   .sidebar + .main .footer { position: fixed; width: calc(100% - 256px); bottom: 0; transition: width 0.35s ease-in-out; -webkit-transition: width 0.35s ease-in-out; -moz-transition: width 0.35s ease-in-out; -ms-transition: width 0.35s ease-in-out; -o-transition: width 0.35s ease-in-out; }
@@ -95,6 +96,10 @@
   .tab-nav .tab-item { float: left; padding: 24px; }
   .tab-nav .tab-item.active { background-color: #fff; border-radius: .25rem .25rem 0 0 ; -webkit-border-radius: .25rem .25rem 0 0 ; -moz-border-radius: .25rem .25rem 0 0 ; -ms-border-radius: .25rem .25rem 0 0 ; -o-border-radius: .25rem .25rem 0 0 ; }
   .tab-nav .tab-item.active:before { width: 100%; height: 5px; }
+  #searchKeyword { width: 150px!important; }
+}
+@media screen and (max-width:370px) { 
+  #searchKeywordBtn { display:none; }
 }
 .patients-stats { position: relative; border: 1px solid #DDDDDD; border-radius: 5px; overflow: hidden; cursor: pointer !important;}
 .patients-stats:hover:before { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(0,0,0,0.03); cursor: pointer;}