| 
					
				 | 
			
			
				@@ -15,8 +15,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <body class="sang" style="min-width:305px !important;overflow:hidden"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="leftMenu"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <ul class="tabs"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <li class="on"><div onclick="goIntMenu()" id="tab1"><img src="/images/int_icon.png" width="17px">교차로</div></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <li><div onclick="goEvpMenu()" id="tab2"><img src="/images/evp_icon.png" width="17px">긴급차량우선신호</div></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <li class="on" onclick="goIntMenu()"><div id="tab1"><img src="/images/int_icon.png" width="17px">교차로</div></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <li onclick="goEvpMenu()"><div id="tab2"><img src="/images/evp_icon.png" width="17px">긴급차량우선신호</div></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <%--        <li><a href="javascript:goIntMenu()" class="tab" id="tab1"><img src="images/tab01_on.png" alt="교차로메뉴"/></a></li>--%> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <%--        <li><a href="javascript:goEvpMenu()" class="tab" id="tab2"><img src="images/tab02_off.png" alt="긴급차량우선신호메뉴"/></a></li>--%> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <%--        <div style="position: absolute; left: 95px; top: 5px;"><img src="images/map/btn_alert_A.gif" style="width: 22px"></div>--%> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -27,14 +27,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class="search-button" onclick="searchTreeData()">검색</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="evp-cur"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="title">실시간 긴급차량우선신호 리스트</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="title">긴급차량우선신호 서비스 현황</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div id="evp-cur-list"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <thead> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <th width="25%">발생시각</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <th width="23%">발생시각</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <th width="40%">서비스 ID</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <th width="35%">서비스명</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <th width="37%">서비스명</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </thead> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <tbody class="evp-table"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,7 +46,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="historyBox"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="title">긴급차량우선신호 이력조회</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="title">긴급차량우선신호 서비스 이력</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <div>지역</div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -75,17 +75,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <thead> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <th width="25%">발생시각</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <th width="23%">발생시각</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <th width="40%">서비스 ID</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <th width="35%">서비스명</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <th width="37%">서비스명</th> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </thead> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <tbody class="history-table"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <td colspan="3" class="empty-history">조회된 내용이 없습니다.</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </tbody> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <tbody class="history-table"></tbody> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="empty-history">조회된 내용이 없습니다.</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="history-loading"><img src="/css/themes/classic/throbber.gif"/></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="play-box"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -690,13 +688,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (_historyMap && _historyMap.size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(interval) clearInterval(interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _historyMap.forEach((obj)=> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (obj.get('draw')) obj.get('draw').clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (obj.get('draw')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    obj.get('draw').clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    obj.set('draw', null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $('.history-table tr.on').removeClass('on'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const bottomFrame = $('#iframeBottomList', parent.document).contents(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bottomFrame.find('#cvibBottomBodyTable').show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bottomFrame.find('#evpBottomBodyTable').hide(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bottomFrame.find('#evpBottomInfo').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            imageOnOff('play', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            imageOnOff('stop', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            imageOnOff('pause', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const bottomFrame = $('#iframeBottomList', parent.document).contents(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        bottomFrame.find('#cvibBottomBodyTable').show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        bottomFrame.find('#evpBottomBodyTable').hide(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //.show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -725,6 +730,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function searchHistoryData() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const $emptyBox = $('.empty-history'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const $historyLoading = $('.history-loading'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const $region       = $('#region'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const regionVal    = $region.val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const startVal     = $start.val(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -758,12 +765,30 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             alert('검색시작 일시가 종료 일시 보다 큽니다.'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return $end.focus(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        window.parent.requestService('getEvpHistory.do', param, (rec)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const $historyTable = $('.history-table'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let str = '<tr><td colspan="3" class="empty-history">조회된 내용이 없습니다.</td></tr>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const $historyTable = $('.history-table'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $historyTable.empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $emptyBox.css('display', 'none'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $historyLoading.css('display', 'flex'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        imageOnOff('play', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        imageOnOff('stop', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        imageOnOff('pause', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (_historyMap.size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _historyMap.forEach((obj)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (obj.get('draw')) obj.get('draw').clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _historyMap.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (interval) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                clearInterval(interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                interval = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                cnt = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const bottomFrame = $('#iframeBottomList', parent.document).contents(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bottomFrame.find('#evpBottomInfo').empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        window.parent.requestService('getEvpHistory.do', param, (rec)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let str = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (rec && rec.length) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                str = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (let history of rec) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      _historyMap.set(history.service_id, new Map()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const {event_list, phase_list} = history; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -800,7 +825,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 else if (objMap.get('event')){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     beforeEvent = objMap.get('event'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                beforeEvent.clct_dt = date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                const eventData = {...beforeEvent}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                eventData.clct_dt = date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 if (objMap.get('sig').length === 0 && beforeSig === undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     beforeSig = dateMap.get(phase_list[0].clct_dt).get('sig'); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -808,13 +835,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 else if (objMap.get('sig').length) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     beforeSig = objMap.get('sig'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                const sigData = [...beforeSig] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                beforeSig.forEach((obj)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                sigData.forEach((obj)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     obj.clct_dt = date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                history.event_list.push(beforeEvent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                history.phase_list.push(beforeSig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                history.event_list.push(eventData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                history.phase_list.push(sigData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -823,8 +851,18 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     str += `<tr class="hs_\${history.service_id}" onclick="drawHistory('\${history.service_id}')"><td>\${history.clct_dt}</td><td>\${history.service_id}</td><td>\${history.service_nm}</td></tr>`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $historyLoading.css('display', 'none'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (str === '') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $emptyBox.css('display', 'flex'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $historyTable.html(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, true, ()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $emptyBox.css('display', 'flex'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $historyLoading.css('display', 'none'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function drawHistory(serviceId) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -853,7 +891,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $('#historyList tr.on').removeClass('on'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $('.hs_' + serviceId).addClass('on'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const drawObj = {...obj}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const {event_list, phase_list} = obj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const { event_list, phase_list } = obj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (event_list && event_list.length) drawObj.event_list = [drawObj.event_list[0]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (phase_list && phase_list.length) drawObj.phase_list = phase_list[0]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -861,38 +899,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const bottomInfo  = bottomFrame.find('#evpBottomInfo'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let str = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         event_list.forEach((event, idx)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const regionNm = $('#region option[value="'+serviceId.substr(0,3)+'"]').text(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let className = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (idx === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                className = 'on'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let curSpd = '-'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (event.cur_spd) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                curSpd = event.cur_spd.toLocaleString('ko-KR'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            str += getBottomListEl(obj, event, idx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let remDist = '-'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (event.rem_dist) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                remDist = event.rem_dist.toLocaleString('ko-KR'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let clctDt = event.clct_dt.replace(/\:|\-| /gi, '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            str += '<tr class="'+className+'" id="'+obj.service_id+'_'+clctDt+'">' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+event.clct_dt+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+regionNm+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+obj.service_id+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+obj.service_nm+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+obj.ev_no+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+event.cur_lng+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+event.cur_lat+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+curSpd+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        +'<td>'+remDist+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    +'</tr>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         bottomInfo.html(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const draw = window.parent.drawHistory(drawObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _historyMap.get(serviceId).set('draw', draw); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        bottomFrame.find('.bottomBody').scrollTop(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('play', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('stop', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('pause', false); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -908,6 +923,53 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 긴급차량우선신호 bottom list 생성 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param obj 서비스 정보 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param event 발생 이벤트 정보 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param idx 인덱스 번호 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @returns {string} html 리스트 목록 반환 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    function getBottomListEl(obj, event, idx) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const regionNm = $('#region option[value="'+obj.service_id.substr(0,3)+'"]').text(); //왼쪽 3글자는 센터 번호를 의미 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let className = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (idx === 0) { //처음 그릴때 첫줄을 기반으로 그리므로 선택 표시 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            className = 'on'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let curSpd = '-'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (event.cur_spd) { // 현재 스피드가 있을경우 천단위 콤마 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            curSpd = event.cur_spd.toLocaleString('ko-KR'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let remDist = '-'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (event.rem_dist) {// 남은 거리가 있을경우 천단위 콤마 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            remDist = event.rem_dist.toLocaleString('ko-KR'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let clctDt = event.clct_dt.replace(/\:|\-| /gi, '') //시간 기호(':', '-', ' ') 제거 후 값만 추출 하여 table 로우 ID 부여 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let str = '<tr onclick="moveLocation('+obj.service_id+', this)" class="'+className+'" id="'+obj.service_id+'_'+clctDt+'">' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+event.clct_dt+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+regionNm+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+obj.service_id+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+obj.service_nm+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+obj.ev_no+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+event.cur_lng+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+event.cur_lat+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+curSpd+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    +'<td>'+remDist+'</td>' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                +'</tr>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return str; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 시뮬레이션 재생 / 멈춤 버튼 활성화 비활성화 이미지명 가져오기 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param name 요소 ID name (ID 와 이미지 이름이 동일함) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param isOn 활성화/비활성화(true/false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @returns {string} 이미지명 반환 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function getImageName(name, isOn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let imgName = '/images/' + name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const onName = '_on'; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -918,83 +980,104 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return imgName + extName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    function playSimulation() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!$('#play').hasClass('on')) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const serviceId = $('.history-table tr.on').attr('class').replace(/hs_| on/gi, ''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        let evp = _historyMap.get(serviceId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        let obj = evp.get('obj'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        let draw = evp.get('draw'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!draw) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 시뭏레이션 재생 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    function playSimulation() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!$('#play').hasClass('on')) return; //비활성화중일 때만 실행 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (interval) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            clearInterval(interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            interval = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const serviceId = $('.history-table tr.on').attr('class').replace(/hs_| on/gi, '');// 선택 로우에서 service id 추출 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let evp = _historyMap.get(serviceId); //Map 에 저장된 해당 service_id 데이터 정보 가져오기 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let obj = evp.get('obj'); //object 정보 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let draw = evp.get('draw'); // marker handler 정보 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!draw) {// handler 가 없다면 생성 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             drawHistory(serviceId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             draw = evp.get('draw'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const { event_list, phase_list } = obj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const { event_list, phase_list } = obj; //이벤트 리스트와 신호 리스트 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //버튼 활성화/비활성화 적용 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('stop', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('pause', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('play', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        let top = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        interval = setInterval(()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const position = window.parent.getKakaoPosition(event_list[cnt].cur_lat, event_list[cnt].cur_lng); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            draw.car.moveMarker(position); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            phase_list[cnt].forEach((sigObj)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const evpSig = draw.sig.get(sigObj.service_id + '_' + sigObj.seq_no); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (evpSig === undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    draw.sig.set(sigObj.service_id + '_' + sigObj.seq_no, window.parent.createSig(sigObj)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (!evpSig.a_ring && !evpSig.b_ring) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        evpSig.createRing(sigObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const {a_head_lat, a_head_lng, a_mid_lat, a_mid_lng, a_end_lat, a_end_lng, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            b_head_lat, b_head_lng, b_mid_lat, b_mid_lng, b_end_lat, b_end_lng} = sigObj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const aPosition = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(a_head_lat, a_head_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(a_mid_lat, a_mid_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(a_end_lat, a_end_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const bPosition = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(b_head_lat, b_head_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(b_mid_lat, b_mid_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            window.parent.getKakaoPosition(b_end_lat, b_end_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        evpSig.a_ring.setPath(aPosition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        evpSig.b_ring.setPath(bPosition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    evpSig.setState(sigObj.state); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        interval = setInterval(()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cnt++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (event_list.length === cnt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return stopSimulation(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const bottomFrame = $('#iframeBottomList', parent.document).contents(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            top += bottomFrame.find('#evpBottomInfo tr.on').height(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             bottomFrame.find('#evpBottomInfo tr.on').removeClass('on'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let clctDt = event_list[cnt].clct_dt.replace(/\:|\-| /gi, '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const bottomInfo = bottomFrame.find('#evpBottomInfo #'+obj.service_id +'_'+clctDt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             bottomInfo.addClass('on'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bottomFrame.find('#evpBottomBodyTable').scrollTop(top); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bottomFrame.find('.bottomBody').scrollTop(32 * cnt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const position = window.parent.getKakaoPosition(event_list[cnt].cur_lat, event_list[cnt].cur_lng); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            draw.car.moveMarker(position); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setSigState(phase_list[cnt], draw); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            cnt++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 500); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    function setSigState(phase, draw) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        phase.forEach((sigObj)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const evpSig = draw.sig.get(sigObj.service_id + '_' + sigObj.seq_no); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (evpSig === undefined) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                draw.sig.set(sigObj.service_id + '_' + sigObj.seq_no, window.parent.createSig(sigObj)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!evpSig.a_ring && !evpSig.b_ring) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    evpSig.createRing(sigObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const {a_head_lat, a_head_lng, a_mid_lat, a_mid_lng, a_end_lat, a_end_lng, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        b_head_lat, b_head_lng, b_mid_lat, b_mid_lng, b_end_lat, b_end_lng} = sigObj; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const aPosition = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(a_head_lat, a_head_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(a_mid_lat, a_mid_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(a_end_lat, a_end_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const bPosition = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(b_head_lat, b_head_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(b_mid_lat, b_mid_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        window.parent.getKakaoPosition(b_end_lat, b_end_lng), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    evpSig.a_ring.setPath(aPosition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    evpSig.b_ring.setPath(bPosition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                evpSig.setState(sigObj.state); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function pauseSimulation() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!$('#pause').hasClass('on')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         clearInterval(interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('pause', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('play', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function stopSimulation() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!$('#stop').hasClass('on')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         clearInterval(interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('stop', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('pause', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         imageOnOff('play', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         cnt = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const serviceId = $('.history-table tr.on').attr('class').replace(/hs_| on/gi, ''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        clearSimulator() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        drawHistory(serviceId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        clearSimulator(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        drawHistory(serviceId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function clearSimulator() { 
			 |