12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936 |
- /*
- - =======================================================================================
-
- Image EMR Viewer Program (SSMRC03100.js)
- - Version :
- 1) : Ver.1.00.00
- - =======================================================================================
- */
- // 다중 페이지 지원을 위한 파일 패스와 페이지 정보
- var g_path;
- var g_page;
- var g_page_lut;
- var g_form_count;
- var g_outertext;
- var g_recrowno;
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화 함수
- * @return :
- * @---------------------------------------------------
- */
- function fInitilize()
- {
- // 사용하는 개체를 초기화 한다.
- btnNextCharts.attribute("visibility") = "hidden";
- capNextChrts.attribute("visibility") = "hidden";
- // if(opener.javascript.getScreenID() == "SMMRI00400")
- // {
- // btnNextCharts.attribute("visibility") = "visible";
- // capNextChrts.attribute("visibility") = "visible";
- // }
- fSet_OCX_PageViewer();
- fSet_OCX_ThumbViewer();
- fSet_OCX_ChartViewer();
- fSet_OCX_PreViewer();
-
- // 페이지 데이터 초기화
- g_path = new Array();
- g_page = new Array();
- g_page_lut = new Array();
- g_form_count = new Array();
- g_outertext = new Array();
- g_recrowno = new Array();
- //model.setValue("/root/main/chartinfo/pagetotal", "0");
- //model.setValue("/root/main/chartinfo/pagecurrent", "0");
- model.setValue("/root/main/chartinfo/pagetotal", "0");
- model.setValue("/root/main/chartinfo/pagecurrent", "0");
- model.refresh();
- // 모든 버튼 이미지를 설정한다.
- setupAllButtons();
-
- // 토글 버튼의 기본값 설정
- //processToggleButton("btnFitBest");
- processToggleButton("btnPageMouseNormal");
- //processToggleButton("btnChartMouseNormal");
- processToggleButton("btnChartMousePanning");
-
- // 페이지뷰의 페이지 이동 버튼 설정
- setupMoveButton();
-
- // 보기 방법의 기본값 설정
- setupChart("ChartView");
-
- // 데이터 초기화
- resetData();
-
- // 뷰어를 IMPORT 된 크기로 FIT 시킨다.
- // if(document.body.isChild("importIemr") == true)
- // if(window.type == "iviewer")
- // {
- // fitToImportArea();
- // }
- // 썸네일 뷰어의 레이아웃 설정
- objThumbView.SetThumbLayout(4, 3);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 입력받은 YYYYMMDD를 YYYY-MM-DD 로 반환한다.
- * @return :
- * @---------------------------------------------------
- */
- function formatDate(value)
- {
- return value.substr(0, 4) + "-" +
- value.substr(4, 2) + "-" +
- value.substr(6, 2);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : PageViewer OCX 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fSet_OCX_PageViewer()
- {
- objPageView.BorderStyle = 1;
- objPageView.BackColor = 0xffffff;//0xe0e0e0;
- objPageView.BestFit();
- objPageView.HorzAlignMode = 1;
- objPageView.VertAlignMode = 1;
- //objPageView.MouseMode = 4;
- objPageView.MouseMode = 0;
- objPageView.MagnifyingGlassWidth = 700;
- objPageView.MagnifyingGlassHeight = 400;
- //objPageView.MagnifyingGlassHeight = 300;
- //objPageView.MagnifyingGlassWidth = objPageView.ImageWidth;
- objPageView.MagnifyingGlassRatio = 1.0;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : PreViewer OCX 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fSet_OCX_PreViewer()
- {
- objPreview.BorderStyle = 1;
- objPreview.BackColor = 0xffffff;//0xe0e0e0;
- objPreview.BestFit();
- objPreview.HorzAlignMode = 1;
- objPreview.VertAlignMode = 1;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ThumbViewer OCX 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fSet_OCX_ThumbViewer()
- {
- objThumbView.BorderStyle = 1;
- objThumbView.BackColor = 0xffffff;
- objThumbView.BorderColor = 0xf4f4f4;
- objThumbView.SelectColor = 0xc8a8c0;
- objThumbView.TextColor = 0x000000;
- objThumbView.ShowFilename = true;
- // objThumbView.ShowFilename = false;
- objThumbView.ShowIndex = false;
- objThumbView.ShowPage = false;
- objThumbView.MultiSelect = true;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ChartViewer OCX 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fSet_OCX_ChartViewer()
- {
- objChartView.BackColor = 0xffffff;
- // objChartView.CaptionForeColor = 0xffffff;
- objChartView.CaptionBackColor = 0xb99a5c;
- objChartView.CaptionForeColor = 0xffffff;
- // objChartView.CaptionBackColor = 0xffffff;
- objChartView.CaptionFont = "돋움";
- objChartView.CaptionHeight = 20;
- objChartView.CaptionBold = true;
- objChartView.CaptionItalic = false;
- objChartView.CaptionStrikeOut = false;
- objChartView.CaptionUnderline = false;
- objChartView.MouseMode = 0;
- objChartView.MagnifyingGlassWidth = 700;
- objChartView.MagnifyingGlassHeight = 400;
- objChartView.MagnifyingGlassRatio = 2.3;
- objChartView.DefaultRegionAnalyzeMethod =
- "Method=2;" +
- "MarginX=20;" +
- "MarginY=20;" +
- "HyphenWidthMin=7;" +
- "HyphenWidthMax=15;" +
- "HyphenHeightMin=2;" +
- "HyphenHeightMax=8;" +
- "HyphenMaxDifY=4;" +
- "HyphenAgreeMin=8;" +
- "HyphenSpaceMin=20;" +
- "HyphenSpaceMax=30;" +
- "LineMergeHeight=40;" +
- "LineTopEraseMargin=12;" +
- "LineBottomEraseMargin=0;" +
- "LineTop=0;" +
- "LineBottom=0"
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : XPath로 부터 Button image Load
- * @return :
- * @---------------------------------------------------
- */
- function getXPathButtonImage(button)
- {
- return button == null ? "/root/hidden/buttonImage" : "/root/hidden/buttonImage/" + button;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : XPath로 부터 ToggleButton image Load
- * @return :
- * @---------------------------------------------------
- */
- function getXPathToggleButton(button)
- {
- return button == null ? "/root/hidden/buttonToggle" : "/root/hidden/buttonToggle/" + button;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 등록되어 있는 모든 버튼 이미지를 설정한다.
- * @return :
- * @---------------------------------------------------
- */
- function setupAllButtons()
- {
- var node = instance1.selectSingleNode( getXPathButtonImage() );
- var list = node.childNodes;
- var total = list.length;
- var i;
-
- for (i = 0; i < total; i++)
- {
- setupButton( list.item(i).nodeName );
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 토글 버튼의 속성을 반환하거나 설정한다.
- * @return :
- * @---------------------------------------------------
- */
- function toggleButton(button, property, value)
- {
- if (button == null || property == null) return;
- var path = getXPathToggleButton(button) + "/" + property;
-
- if (value == null)
- {
- return model.getValue(path);
- }
- else
- {
- if (model.getValue(path) != value)
- {
- model.setValue(path, value);
- setupButton(button);
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 버튼의 현재 상황에 맞게 이미지를 설정한다.
- * @return :
- * @---------------------------------------------------
- */
- function setupButton(button)
- {
- var path = model.getValue("/root/hidden/buttonImageHome") + model.getValue(getXPathButtonImage(button));
- var ext = model.getValue("/root/hidden/buttonImageExt");
- var objButton = document.controls.item(button);
-
- // 버튼 상태에 따라 이미지 설정
- if(toggleButton(button, "value") == "1")
- {
- objButton.attribute("background-image") = path + "_c" + ext;
- objButton.attribute("down.background-image") = path + "_c" + ext;
- objButton.attribute("hover.background-image") = path + "_c" + ext;
- objButton.attribute("disable.background-image") = path + "_d" + ext;
- }
- else
- {
- objButton.attribute("background-image") = path + ext;
- objButton.attribute("down.background-image") = path + "_c" + ext;
- objButton.attribute("hover.background-image") = path + "_h" + ext;
- objButton.attribute("disable.background-image") = path + "_d" + ext;
- }
-
- // disable 처리
- var btnDis = toggleButton(button, "disable") == "1" ? true : false;
- objButton.disabled = btnDis;
-
- // 버튼을 화면에 갱신
- objButton.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 토글 버튼을 처리한다.
- * @return :
- * @---------------------------------------------------
- */
- function processToggleButton(button)
- {
- var node = instance1.selectSingleNode(getXPathToggleButton());
- var list = node.childNodes;
- var total = list.length;
- var curName;
- var name;
- var i;
- if (objChartView.TotalChart == 0)
- {
- //return;
- }
- // 이미 켜져 있다면 처리가 필요 없음
- // if(toggleButton(button, "value") == "1") return;
- // 영역확대, 확대, 축소 버튼일 경우 실제크기보기, 최적크기보기, 가로크기보기 버튼 끔
- if(button == "btnPageMouseRegionZoom" || button == "btnZoomIn" || button == "btnZoomOut")
- {
- if(toggleButton("btnFitBest", "value") == "1")
- {
- toggleButton("btnFitBest", "value", "0");
- }
- if(toggleButton("btnFitActual", "value") == "1")
- {
- toggleButton("btnFitActual", "value", "0");
- }
- if(toggleButton("btnFitWidth", "value") == "1")
- {
- toggleButton("btnFitWidth", "value", "0");
- }
- }
- // 확대, 축소 버튼의 경우 의미없음
- if(button == "btnZoomIn" || button == "btnZoomOut") return;
-
- curName = toggleButton(button, "name");
- for (i = 0; i < total; i++)
- {
- name = list.item(i).nodeName;
-
- if(toggleButton(name, "name") == curName && toggleButton(name, "value") == "1")
- {
- toggleButton(name, "value", "0");
-
- // 핸들러 호출
- eval(name + "_Changed()");
- }
- }
-
- toggleButton(button, "value", "1");
-
- // 핸들러 호출
- eval(button + "_Changed()");
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 뷰어 정보를 초기화 한다.
- * @return :
- * @---------------------------------------------------
- */
- function resetData()
- {
- // objChartView.AutoRefresh = false;
- // objThumbView.ClearPage();
- // objChartView.ChartRemove(0, 0);
- // objPageView.CurrentPage = 0;
- // objChartView.AutoRefresh = true;
- // 개체에 이미지가 등록되어 있다면 해지한다.
- objChartView.AutoRefresh = false;
- objChartView.ChartRemove(0, 0);
- objChartView.ChartScroll(1);
- objPageView.CurrentPage = 0;
- objThumbView.ClearPage();
- objChartView.AutoRefresh = true;
- // 개체의 쓰레드가 종료될때 까지 기다린다.
- while(objThumbView.IsThreadDone() == false);
- model.removeNode("/root/hidden/tempcharts");
- model.removeNode("/root/main/charts");
- model.refresh();
-
- setupMoveButton();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트뷰의 끌기 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnChartMousePanning_Changed()
- {
- if(getToggleValue("ModeChartMouse") == "btnChartMousePanning")
- {
- objChartView.MouseMode = 1;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트뷰의 돋보기 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnChartMouseMagnifyingGlass_Changed()
- {
- if(getToggleValue("ModeChartMouse") == "btnChartMouseMagnifyingGlass")
- {
- objChartView.MouseMode = 2;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트뷰의 디폴트 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnChartMouseNormal_Changed()
- {
- if(getToggleValue("ModeChartMouse") == "btnChartMouseNormal")
- {
- objChartView.MouseMode = 0;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 실제 크기 맞추기 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnFitActual_Changed()
- {
- if(getToggleValue("ModeFit") == "btnFitActual")
- {
- objPageView.ActualSize();
-
- processToggleButton("btnPageMousePanning");
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 최적 크기 맞추기 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnFitBest_Changed()
- {
- if(getToggleValue("ModeFit") == "btnFitBest")
- {
- objPageView.BestFit();
- //processToggleButton("btnPageMouseMagnifyingGlass");
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 가로 크기 맞추기 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnFitWidth_Changed()
- {
- if(getToggleValue("ModeFit") == "btnFitWidth")
- {
- objPageView.FitToWidth();
-
- processToggleButton("btnPageMousePanning");
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 일반 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnPageMouseNormal_Changed()
- {
- if(getToggleValue("ModePageMouse") == "btnPageMouseNormal")
- {
- objPageView.MouseMode = 0;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 영역 확대 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnPageMouseRegionZoom_Changed()
- {
- if(getToggleValue("ModePageMouse") == "btnPageMouseRegionZoom")
- {
- objPageView.MouseMode = 2;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 돋보기 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnPageMouseMagnifyingGlass_Changed()
- {
- if(getToggleValue("ModePageMouse") == "btnPageMouseMagnifyingGlass")
- {
- objPageView.MouseMode = 4;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 끌기 마우스 커서 버튼 핸들러
- * @return :
- * @---------------------------------------------------
- */
- function btnPageMousePanning_Changed()
- {
- if(getToggleValue("ModePageMouse") == "btnPageMousePanning")
- {
- objPageView.MouseMode = 1;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트 정보의 xpath를 반환한다.
- * @return :
- * @---------------------------------------------------
- */
- function getXPathChart(page, value)
- {
- return "/root/main/charts[" + page + "]" + ((value == null) ? "" : "/" + value);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보기 모드와 현재 페이지에 따라 적당한 차트가 보이도록 설정한다.
- * @return :
- * @---------------------------------------------------
- */
- function setupChart(ViewMode)
- {
- if(ViewMode == null)
- {
- // 보기 모드가 지정되지 않았다면 현재의 값을 사용한다.
- ViewMode = model.getValue("/root/hidden/currentViewMode");
- }
- else
- {
- // 보기 모드에 따라 스위치를 설정한다.
- switch(ViewMode)
- {
- case "PageView":
- model.toggle("swViewModeCase3");
- document.controls.item("btnPageView").selected = true;
- processToggleButton("btnPageMouseNormal");
- break;
- case "ThumbView":
- model.toggle("swtViewModeCase1");
- document.controls.item("btnThumbView").selected = true;
- break;
- case "ChartView":
- model.toggle("swViewModeCase2");
- document.controls.item("btnChartView").selected = true;
-
- break;
- }
- // 현재 보기 모드를 저장한다.
- model.setValue("/root/hidden/currentViewMode", ViewMode);
- }
-
- var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
- var nPrv;
- var nCur;
- var nPage;
- var i;
- var j;
- var count;
- var imgemrcount;
- var totalemrorddate;
- var totalemrformnm;
- var totalemrformcd;
- var totalemrdeptnm;
- var totalemrdeptcd;
- var totalemrpage;
- var totalemrhiddenmsg;
- var emrorddate;
- var emrformnm;
- var emrformcd;
- var emrdeptnm;
- var emrdeptcd;
- var emrpage;
- var emrhiddenmsg;
- var counttemp = 0;
- var countnull = 0;
- var txtemrcount = 0;
- var txtemrcounttemp = 0;
- var emrcounttemp = 0;
- var emrfilepath = "";
- var emrfilepathtemp = "";
- var emrgpath = 0;
- var emrchartindex;
- var emrpagecount = 0;
- var emrresult = 0;
- var emrtotalpagecount = 0;
-
- var idx;
- switch(ViewMode)
- {
- case "PageView":
- processToggleButton("btnPageMouseNormal");
- if (pageCurrent != 0)
- {
- objPageView.Load(g_path[pageCurrent], g_page[pageCurrent]);
- }
- else
- {
- model.setValue("/root/main/chartinfo/pagecurrent", "1");
- //model.setValue("/root/main/chartinfo/pagecurrent",pageCurrent);
- pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- model.refresh();
- objPageView.Load(g_path[pageCurrent], g_page[pageCurrent]);
-
-
- }
-
- break;
-
- //
- case "ChartView":
- objChartView.AutoRefresh = false;
- objChartView.ChartRemove(0, 0);
-
- processToggleButton("btnChartMousePanning");
-
- idx = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if (pageCurrent == 0)
- {
-
- objChartView.ChartAppend(g_path[1], g_page[1], g_page[1]);
- objChartView.OuterCaption(1) = g_outertext[0];
- //fn_SendRecRowno(idx);
- }
- else
- {
- objChartView.ChartAppend(g_path[pageCurrent], g_page[pageCurrent], g_page[pageCurrent]);
- objChartView.OuterCaption(1) = g_outertext[pageCurrent - 1];
- fn_SendRecRowno(idx);
- }
- objChartView.ChartScroll(1);
- /*
- if (pageCurrent != 0)
- {
- objChartView.ChartAppend(g_path[pageCurrent], g_page[pageCurrent], g_page[pageCurrent]);
- objChartView.OuterCaption(1) = formatDate(model.getValue("/root/main/charts[" + pageCurrent + "]/indd")) + " " +
- model.getValue("/root/main/charts[" + pageCurrent + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + pageCurrent + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + pageCurrent + "]/chrtpage");
- alert(pageCurrent);
- }
- else
- {
- model.setValue("/root/main/chartinfo/pagecurrent", "1");
- pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- model.refresh();
- // objPageView.Load(g_path[pageCurrent], g_page[pageCurrent]);
- objChartView.ChartAppend(g_path[pageCurrent], g_page[pageCurrent], g_page[pageCurrent]);
- }
- break;
- */
- // processToggleButton("btnFitWidth");
-
- objChartView.AutoRefresh = true;
- break;
- case "ThumbView":
- //[성가 병원 clear Viewer 안되는 현상]
- fSet_OCX_ThumbViewer();
- fShow_FalsePreviewChart(0,0,0);
- break;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 페이지뷰 툴바에 있는 페이지 이동 버튼의 활성화 여부를 처리한다.
- * @return :
- * @---------------------------------------------------
- */
- function setupMoveButton()
- {
- var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- var prev = "1";
- var next = "1";
-
- if (pageCurrent > 1) prev = "0";
- if (pageCurrent < pageTotal) next = "0";
-
- // toggleButton("btnMoveFirst", "disable", prev);
- // toggleButton("btnMovePrev", "disable", prev);
- // toggleButton("btnMoveLast", "disable", next);
- // toggleButton("btnMoveNext", "disable", next);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 프린터 설정
- * @return :
- * @---------------------------------------------------
- */
- function printSetup(hWND)
- {
- if (objBIP.PrinterSetup(hWND) == true)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 출력 로그 설정
- * @return :
- * @---------------------------------------------------
- */
- function printLog(page)
- {
- page = g_page_lut[page];
-
- return model.getValue(getXPathChart(page, "chrtpage")) + "|" +
- model.getValue(getXPathChart(page, "ordno")) + "|" +
- model.getValue(getXPathChart(page, "pageno")) + "|" +
- model.getValue(getXPathChart(page, "docucd")) + "|" +
- model.getValue(getXPathChart(page, "orddeptcd")) + "|" +
- model.getValue(getXPathChart(page, "ptdt")) + "|" +
- model.getValue(getXPathChart(page, "usercd")) + "|" +
- model.getValue(getXPathChart(page, "indd")) + "|" +
- model.getValue(getXPathChart(page, "outdd")) + "|" +
- model.getValue(getXPathChart(page, "remtip")) + "|" +
- model.getValue(getXPathChart(page, "remtport"));
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 현재 보이는 차트를 출력한다.
- * @return :
- * @---------------------------------------------------
- */
- function printChart(docName)
- {
- var strPage;
- var strPage;
- var strPrintLog;
- var bFirstPage;
- var start = getCurrentDateTime();
- //출력지 모이는 현상
- //0 BIPPM_SMART_FIT
- //1 BIPPM_ACTUAL_SIZE
-
- //2 BIPPM_PAGE_FIT
- objBIP.PrintMethod = 2
- switch(model.getValue("/root/hidden/currentViewMode"))
- {
- case "PageView":
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
- if(pageCurrent > 0)
- {
- strPath = g_path[pageCurrent];
- strPage = g_page[pageCurrent];
-
- // objBIP.StartDoc(docName);
- if (objBIP.StartDoc(docName) == false)
- {
- return false;
- }
- // objBIP.PrintImage(g_path[pageCurrent], g_page[pageCurrent]);
- if (objBIP.PrintImage(g_path[pageCurrent], g_page[pageCurrent]) == false)
- {
- return false;
- }
- else
- {
- //사본발급시
- if (docName=="SMMRC03000")
- {
- objBIP.FontFaceName = "HY울릉도M"
- objBIP.FontSize = 12
- objBIP.FontBold = true
- objBIP.PrintText(360, objBIP.PaperHeight - 20,"이 서식은 사본입니다(원본 대조필)");
- }
- }
- // objBIP.EndDoc();
- if (objBIP.EndDoc() == false)
- {
- return false;
- }
-
- // 출력 통보
- model.setAttribute("sCMR_Param", printLog(pageCurrent));
- }
- else
- {
- alert("출력할 페이지가 없습니다.");
- return false;
- }
- break;
-
- case "ThumbView":
- if(objThumbView.TotalSelectedThumbnail == 0)
- {
- // alert("선택된 차트가 없습니다.");
- // return;
- // objBIP.StartDoc(docName);
- if (objBIP.StartDoc(docName) == false)
- {
- return false;
- }
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= objThumbView.TotalThumbnail; i++)
- {
- if(bFirstPage == false)
- {
- // objBIP.NewPage();
- if (objBIP.NewPage() == false)
- {
- return false;
- }
- strPrintLog += ",";
- }
- else
- {
- bFirstPage = false;
- }
- // objBIP.PrintImage(objThumbView.FileName(i), objThumbView.Page(i));
- if (objBIP.PrintImage(objThumbView.FileName(i), objThumbView.Page(i)) == false)
- {
- return false;
- }
- else
- {
- //사본발급시
- if (docName=="SMMRC03000")
- {
- objBIP.FontFaceName = "HY울릉도M"
- objBIP.FontSize = 12
- objBIP.FontBold = true
- objBIP.PrintText(360, objBIP.PaperHeight - 20,"이 서식은 사본입니다(원본 대조필)");
- }
- }
- strPrintLog += printLog(i);
- }
- // objBIP.EndDoc();
- if (objBIP.EndDoc() == false)
- {
- return false;
- }
- model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
- else
- {
- // objBIP.StartDoc(docName);
- if (objBIP.StartDoc(docName) == false)
- {
- return false;
- }
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= objThumbView.TotalThumbnail; i++)
- {
- if(objThumbView.Select(i) == true)
- {
- if(bFirstPage == false)
- {
- // objBIP.NewPage();
- if (objBIP.NewPage() == false)
- {
- return false;
- }
- strPrintLog += ",";
- }
- else
- {
- bFirstPage = false;
- }
- // objBIP.PrintImage(objThumbView.FileName(i), objThumbView.Page(i));
- if (objBIP.PrintImage(objThumbView.FileName(i), objThumbView.Page(i)) == false)
- {
- return false;
- }
- else
- {
-
- //사본발급시
- if (docName=="SMMRC03000")
- {
- objBIP.FontFaceName = "HY울릉도M"
- objBIP.FontSize = 12
- objBIP.FontBold = true
- objBIP.PrintText(360, objBIP.PaperHeight - 20,"이 서식은 사본입니다(원본 대조필)");
- }
- }
- strPrintLog += printLog(i);
- }
- }
- // objBIP.EndDoc();
- if (objBIP.EndDoc() == false)
- {
- return false;
- }
-
- model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
- case "ChartView":
- alert("'연속보기' 에서는 출력할 수 없습니다.");
- return false;
- break;
- }
- return true;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검색 조건에 의해 검색을 하고 검색된 차트를 출력한다.
- * @return :
- * @---------------------------------------------------
- */
- function printChartBySearch(docName, param)
- {
- resetData();
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pgto"));
-
- // 전송
- submit("TRMRC00105");
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
-
- // 차트 파일을 다운로드 받는다.
- downloadChart();
-
- // 차트를 출력한다.
- printChart(docName);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검색 조건에 의해 검색을 하고 검색된 차트를 보여준다.
- * @return :
- * @---------------------------------------------------
- */
- function searchChart(param)
- {
- var count;
- var r, re;
- r = ",";
- re = "','";
- resetData();
- // alert(instance1.selectSingleNode("/root/hidden/temp").xml);
-
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- // if (destNode.cmc_spcid.nodeValue != null && destNode.cmc_spcid.nodeValue != "")
- // {
- // destNode.cmc_spcid.nodeValue = "'" + destNode.cmc_spcid.nodeValue.setReplaceWord(r, re) + "'";
- // }
- // if (destNode.cmc_orddate.nodeValue != null && destNode.cmc_orddate.nodeValue != "")
- // {
- // destNode.cmc_orddate.nodeValue = "'" + destNode.cmc_orddate.nodeValue.setReplaceWord(r, re) + "'";
- // }
- // 전송
- submit("TRMRC03101");
- count = 1;
- // alert(instance1.selectSingleNode("/root/hidden/temp").xml);
- /*
- if (model.getValue("/root/main/charts[" + count + "]/chrtpage") == null || model.getValue("/root/main/charts[" + count + "]/chrtpage") == "")
- {
- alert("해당 데이터가 없습니다.");
- }
- */
- // 보여줄 페이지 수를 센다.
- while(model.getValue("/root/main/charts[" + count + "]/chrtpage") != null && model.getValue("/root/main/charts[" + count + "]/chrtpage") != "")
- {
- count++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", count - 1);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- g_form_count[0] = model.getValue("/root/main/chartinfo/filetotal");
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검색 조건에 의해 검색을 하고 검색된 차트를 보여준다.
- * @return :
- * @---------------------------------------------------
- */
- function searchChart_EMR(param)
- {
- var count;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
- resetData();
-
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- temptreatno = destNode.treatno.nodeValue;
- tempdocucd = destNode.docucd.nodeValue;
- treatno = temptreatno.split(",");
- docucd = tempdocucd.split(",");
- model.makeNode("/root/hidden/tempcharts");
- counthidden = 1;
- for (count = 1; count < treatno.length + 1; count++)
- {
- destNode.treatno.nodeValue = treatno[count - 1];
- destNode.docucd.nodeValue = docucd[count - 1];
- submit("TRMRC03101");
- g_form_count[count - 1] = counthidden - 1;
- countmain = 1;
- while(model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != null && model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != "")
- {
- model.makeNode("/root/hidden/tempcharts[" + counthidden + "]");
- model.copyNode("/root/hidden/tempcharts[" + counthidden + "]", "/root/main/charts[" + countmain + "]");
- countmain++;
- counthidden++;
- }
- g_form_count[count - 1] = counthidden - 1;
- model.refresh();
- }
- model.removeNode("/root/main/charts");
- model.makeNode("/root/main/charts");
- for (count = 1; count <= counthidden; count++)
- {
- model.makeNode("root/main/charts[" + count + "]");
- model.copyNode("root/main/charts[" + count + "]", "root/hidden/tempcharts[" + count + "]");
- }
- count = 1;
- // 보여줄 페이지 수를 센다.
- while(model.getValue("/root/main/charts[" + count + "]/chrtpage") != null && model.getValue("/root/main/charts[" + count + "]/chrtpage") != "")
- {
- count++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", count - 1);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 토글 버튼 그룹에서 눌려져 있는 버튼 이름을 반환한다.
- * @return :
- * @---------------------------------------------------
- */
- function getToggleValue(group)
- {
- var node = instance1.selectSingleNode( getXPathToggleButton() );
- var list = node.childNodes;
- var total = list.length;
- var name;
- var i;
-
- for(i = 0; i < total; i++)
- {
- name = list.item(i).nodeName;
-
- if(toggleButton(name, "name") == group && toggleButton(name, "value") == "1")
- {
- return name;
- }
- }
- return "";
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트 파일을 받아올 폴더를 만들고 내용을 정리한다.
- * @return :
- * @---------------------------------------------------
- */
- function setupRecvPath(fso)
- {
- var pathRecv;
- var curFolder;
- var curFile;
-
- // 개체에 이미지가 등록되어 있다면 해지한다.
- objChartView.AutoRefresh = false;
- objChartView.ChartRemove(0, 0);
- objPageView.CurrentPage = 0;
- objThumbView.ClearPage();
- objChartView.AutoRefresh = true;
-
- // 개체의 쓰레드가 종료될때 까지 기다린다.
- while(objThumbView.IsThreadDone() == false);
- pathRecv = fso.GetSpecialFolder(2) + "\\bitnixViewer\\";
-
- // 차트를 다운받을 폴더가 없다면 만든다.
- if( fso.FolderExists(pathRecv) == false)
- {
- fso.CreateFolder(pathRecv);
- }
-
- // 폴더안에 있는 모든 파일을 삭제한다.
- curFolder = fso.GetFolder(pathRecv);
- curFile = new Enumerator(curFolder.Files);
-
- for(; !curFile.atEnd(); curFile.moveNext())
- {
- fso.DeleteFile(curFile.item().Path, true);
- }
-
- // 차트 폴더를 저장
- model.setValue("/root/hidden/chartImageHome", pathRecv);
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SFT서버에서 GetFiles()를 이용해서 파일을 받는다.
- * @return :
- * @---------------------------------------------------
- */
- function getFiles(host, port, user, pass, pathRemote, pathLocal)
- {
- var result;
-
- objSFT.Host = host;
- objSFT.Port = port;
- objSFT.Account = user;
- objSFT.Password = pass;
- objSFT.Connect();
-
- if(objSFT.IsOnline() == false) return false;
- result = objSFT.GetFiles(pathRemote, pathLocal);
- objSFT.Close();
-
- return result;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 필요한 차트 파일을 SFT서버로 부터 다운로드 받는다.
- * @return :
- * @---------------------------------------------------
- */
- function downloadChart()
- {
- var fso;
- var curAddr = "";
- var curHost = "";
- var curPort = "";
- var xpathChart;
- var pathRemote = "";
- var pathLocal = "";
- var pathSrc;
- var pathDst;
- var pageDemand;
- var filename;
- var pathname;
- var rmad;
- var rmpo;
- var i;
- var j;
- fso = new ActiveXObject("Scripting.FileSystemObject");
-
- // 차트 파일을 다운로드 받을 폴더를 준비한다.
- var pathRecv;
-
- pathRecv = fso.GetSpecialFolder(2) + "\\bitnixViewer\\";
-
- // 차트를 다운받을 폴더가 없다면 만든다.
- if( fso.FolderExists(pathRecv) == false)
- {
- fso.CreateFolder(pathRecv);
- }
-
- // 차트 폴더를 저장
- model.setValue("/root/hidden/chartImageHome", pathRecv);
- //setupRecvPath(fso);
- var fileTotal = model.getValue("/root/main/chartinfo/filetotal");
- var pathRecv = model.getValue("/root/hidden/chartImageHome");
- if (fileTotal >= 1)
- {
- body.disabled = false;
- //pageDemand = 0;
- pageDemand = parseInt(objThumbView.TotalThumbnail);
- for(i = 0; i < fileTotal; i++ )
- {
- // 작업할 차트 정보를 갖고 있는 xpath를 만든다.
- xpathChart = getXPathChart(i + 1);
- // 다운로드 받을 파일이 있는 서버 정보를 얻는다.
- rmad = model.getValue(xpathChart + "/remtip");
- rmpo = model.getValue(xpathChart + "/remtport");
-
- // rmad가 비어 있다면 로컬 디스크 상에 파일이 있는걸로 간주한다.
- if(rmad != "")
- {
- // 다운로드 받을 파일의 패스를 만든다.
- filename = model.getValue(xpathChart + "/pageno");
- pathname = "000" + filename;
- pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + pathname.substr(pathname.length - 4, 4) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- pathDst = pathRecv + filename;
-
- // 파일을 다운로드 받거나 패스 문자열을 만든다.
- if(curAddr == rmad && curPort == rmpo)
- {
- // 이미 존재하는 내용이 있다면 연결 문자를 추가한다.
- if( pathRemote.length != 0 )
- {
- pathRemote = pathRemote + "|";
- pathLocal = pathLocal + "|";
- }
-
- // 받을 파일을 추가한다.
- pathRemote = pathRemote + pathSrc;
- pathLocal = pathLocal + pathDst;
- }
- else
- {
- // 필요하다면 파일을 다운로드 받는다.
- if(pathRemote.length != 0 )
- {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) return false;
- }
-
- // 현재 상태를 초기화 한다.
- pathRemote = pathSrc;
- pathLocal = pathDst;
- curAddr = rmad;
- curPort = rmpo;
- }
-
- // 파일 패스와 페이지 번호 저장
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
- }
- else
- {
- // 로컬 디스크에 파일이 있을경우 그 패스는 rmpt에 들어가 있게 된다.
- // pageno에 보여질 이미지 파일의 파일 이름을 저장해 두게 된다.
- // 원본과 복사본 파일 패스
- filename = "local" + i + ".txt";
- pathSrc = model.getValue(xpathChart + "/remtpath");
- pathDst = pathRecv + filename;
-
- // 파일 복사
- fso.CopyFile(pathSrc, pathDst, true);
-
- // 파일 이름을 pageno에 저장
- model.setValue(xpathChart + "/pageno", filename);
-
- // 파일 패스와 페이지 번호 저장
- objPreview.Load(pathDst, 1);
-
- for(j = 0; j < objPreview.TotalPage; j++)
- {
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = j + 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
- }
- objPreview.ImageFilePath = "";
- }
- }
-
- // 필요하다면 파일을 다운로드 받는다.
- if( pathRemote.length != 0 )
- {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) return false;
- }
-
- setupMoveButton();
- return true;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 필요한 차트 파일을 SFT서버로 부터 다운로드 받는다.
- * @return :
- * @---------------------------------------------------
- */
- function appendEMRChart()
- {
- var i, j;
- var count = 0;
- var emrTotalPath;
- var emrPagePath;
- var emrPageTotal;
- var temp_path;
- var temp_page;
- var temp_page_lut;
- var countform = 0;
- var counttemp = 0;
- temp_path = new Array();
- temp_page = new Array();
- temp_page_lut = new Array();
- if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
- emrTotalPath = model.getValue("/root/main/emrpath");
- emrPagePath = emrTotalPath.split("|");
- for (i = 1; i <= emrPagePath.length; i++)
- {
- if (emrPagePath[i - 1].substring(0, 1) == "*")
- {
- for (j = counttemp + 1; j <= g_form_count[countform]; j++)
- {
- temp_path[count + 1] = g_path[j];
- temp_page[count + 1] = g_page[j];
- temp_page_lut[count + 1] = g_page_lut[j];
- count++;
- }
- countform++;
- counttemp = g_form_count[countform - 1];
- // for (j = 1; j < g_path.length; j++)
- // {
- // temp_path[count] = g_path[j];t
- // temp_page[count] = g_page[j];
- // temp_page_lut[count] = g_page_lut[j];
- // count = count + 1;
- // }
- }
- else
- {
- temp_path[count + 1] = emrPagePath[i - 1];
- temp_page[count + 1] = 1;
- temp_page_lut[count + 1] = 1;
- count++;
- }
- }
- g_path = temp_path;
- g_page = temp_page;
- g_page_lut = temp_page_lut;
- }
- return count;
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 다음 Chart를 가져온다.
- * @return :
- * @---------------------------------------------------
- */
- function fMoveNext()
- {
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- var pageTotal = model.getValue("/root/main/chartinfo/pagetotal");
- if (pageTotal > pageCurrent)
- {
- model.setValue("/root/main/chartinfo/pagecurrent", pageCurrent + 1);
- }
- else
- {
- //1
- parent.window.javascript.fGetRec("next");
- }
-
- setupMoveButton();
-
- model.refresh();
- setupChart();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 이전 Chart를 가져온다.
- * @return :
- * @---------------------------------------------------
- */
- function fMovePrev()
- {
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if (pageCurrent >= 2)
- {
- model.setValue("/root/main/chartinfo/pagecurrent", pageCurrent - 1);
- }
- else
- {
- //1
- parent.window.javascript.fGetRec("prev");
- }
-
-
- setupMoveButton();
-
- model.refresh();
- setupChart();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 마지막 Chart를 가져온다.
- * @return :
- * @---------------------------------------------------
- */
- function fMoveLast()
- {
- //1
- parent.window.javascript.fGetRec("midend");
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal"));
- setupMoveButton();
-
- model.refresh();
- setupChart();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 처음 Chart를 가져온다.
- * @return :
- * @---------------------------------------------------
- */
- function fMoveFirst()
- {
- //1
- parent.window.javascript.fGetRec("midfirst");
- model.setValue("/root/main/chartinfo/pagecurrent", "1");
-
- setupMoveButton();
-
- model.refresh();
- setupChart();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 챠트 미리보기 시작
- * @return :
- * @---------------------------------------------------
- */
- function fShow_TruePreviewChart(Button, Shift, Index, Path, Page)
- {
- if(Button == 2)
- {
- objPreview.Load(Path, Page);
-
- if(objPreview.CurrentPage != 0)
- {
- groupThumbView.attribute("visibility") = "hidden";
- groupPreview.attribute("visibility") = "visible";
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 챠트 미리보기를 종료
- * @return :
- * @---------------------------------------------------
- */
- function fShow_FalsePreviewChart(Button, Shift, x, y)
- {
- objPreview.CurrentPage = 0;
- groupThumbView.attribute("visibility") = "visible";
- groupPreview.attribute("visibility") = "hidden";
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 뷰어의 크기를 설정
- * @return :
- * @---------------------------------------------------
- */
- function setChartViewerSize(newWidth, newHeight)
- {
-
- var strSwitchButton = new Array("btnThumbView", "btnChartView", "btnPageView");
- var strCase = new Array("swtViewModeCase1", "swViewModeCase2", "swViewModeCase3");
- var strToolbar = new Array("recSwitchToolbar1", "recSwitchToolbar2", "recSwitchToolbar3");
- var strActiveX = new Array("objPageView", "objChartView");
-
- var obj;
- var i;
-
- var marginright = 2;
- var marginbottom = 2;
- var toolbarmargin = 3;
-
- // 스위치 버튼 위치 조정
- btnThumbView.attribute("left") = 0;
- btnChartView.attribute("left") = parseInt(btnThumbView.attribute("left")) + parseInt(btnThumbView.attribute("width"));
- btnPageView.attribute("left") = parseInt(btnChartView.attribute("left")) + parseInt(btnChartView.attribute("width"));
- // 페이지 정보 위치 조정
- captionPage.attribute("left") = newWidth - parseInt(captionPage.attribute("width")) - marginright;
- optPageCurrent.attribute("left") = captionPage.attribute("left");
- optPageTotal.attribute("left") = parseInt(captionPage.attribute("left")) + parseInt(captionPage.attribute("width")) - parseInt(optPageTotal.attribute("width"));
- // SwitchView 크기, 위치 조정
- switchView.attribute("left") = 0;
- switchView.attribute("top") = parseInt(btnThumbView.attribute("top")) + parseInt(btnThumbView.attribute("height"));
- switchView.attribute("width") = newWidth - marginright;
- switchView.attribute("height") = newHeight - parseInt(switchView.attribute("top")) - marginbottom;
- // Case 크기, 위치 조정
- for(i = 0; i < strCase.length; i++){
- obj = document.controls.item(strCase[i]);
- obj.attribute("left") = 0;
- obj.attribute("top") = 0;
- obj.attribute("width") = switchView.attribute("width");
- obj.attribute("height") = switchView.attribute("height");
- }
- // 툴바 크기 조정
- for(i = 0; i < strToolbar.length; i++){
- obj = document.controls.item(strToolbar[i]);
- obj.attribute("left") = 0;
- obj.attribute("top") = toolbarmargin;
- obj.attribute("width") = switchView.attribute("width") - marginright;
- obj.attribute("height") = 36;
- }
-
- // 그룹 크기 조정
- groupPreview.attribute("left") = 0;
- groupPreview.attribute("top") = toolbarmargin + parseInt(recSwitchToolbar1.attribute("height")) + toolbarmargin;
- groupPreview.attribute("width") = switchView.attribute("width") - marginright;
- groupPreview.attribute("height") = parseInt(switchView.attribute("height")) - parseInt(groupPreview.attribute("top")) - marginbottom;
- groupThumbView.attribute("left") = 0;
- groupThumbView.attribute("top") = toolbarmargin + parseInt(recSwitchToolbar1.attribute("height")) + toolbarmargin;
- groupThumbView.attribute("width") = switchView.attribute("width") - marginright;
- groupThumbView.attribute("height") = parseInt(switchView.attribute("height")) - parseInt(groupThumbView.attribute("top")) - marginbottom;
- // ActiveX 컨트롤 크기 조정
- // ActiveX 컨트롤 중 "objPreview", "objThumbView" 는 각각의 그룹에 속함
- obj = document.controls.item("objPreview");
- obj.attribute("left") = 0;
- obj.attribute("top") = 0;
- obj.attribute("width") = groupPreview.attribute("width");
- obj.attribute("height") = groupPreview.attribute("height");
- obj = document.controls.item("objThumbView");
- obj.attribute("left") = 0;
- obj.attribute("top") = 0;
- obj.attribute("width") = groupThumbView.attribute("width");
- obj.attribute("height") = groupThumbView.attribute("height");
- // "objPageView", "objChartView"
- for(i = 0; i < strActiveX.length; i++){
- obj = document.controls.item(strActiveX[i]);
- obj.attribute("left") = 0;
- obj.attribute("top") = toolbarmargin + parseInt(recSwitchToolbar1.attribute("height")) + toolbarmargin;
- obj.attribute("width") = switchView.attribute("width") - marginright;
- obj.attribute("height") = parseInt(switchView.attribute("height")) - parseInt(obj.attribute("top")) - marginbottom;
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 뷰어를 임포트 영역에 FIT
- * @return :
- * @---------------------------------------------------
- */
- function fitToImportArea()
- {
- // 임포트 영역 크기 산출
- // var strWidth = parseInt(window.parent.document.body.children("iviewerIemr").attribute("width"));
- // var strHeight = parseInt(window.parent.document.body.children("iviewerIemr").attribute("height"));
- var strWidth = parseInt(window.parent.document.controls("iviewerIemr").attribute("width"));
- var strHeight = parseInt(window.parent.document.controls("iviewerIemr").attribute("height"));
-
- setChartViewerSize(strWidth, strHeight);
- body.attribute("pagewidth") = strWidth;
- body.attribute("pageheight") = strHeight;
- body.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 페이지 비교 화면을 호출한다.
- * @return :
- * @---------------------------------------------------
- */
- function comparePage(path)
- {
- model.setValue("/root/main/chartpath", path);
- window.load("SPMRC03100.xrw", "modeless", "imgemrviewer", "", "/root/main/chartpath", "/root/main/chartpath");
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사본신청에 해당하는 값을 리턴한다.
- * @return :
- * @---------------------------------------------------
- */
- function setCopy(getValue)
- {
- var setValue = "";
- var tempValue = "";
- var count;
- var valuecount = 0;
- var tempcount = 1;
- var emrcount = 0;
-
- if (getValue == true)
- {
-
-
- switch(model.getValue("/root/hidden/currentViewMode"))
- {
- case "PageView":
- //현재 페이지 정보 가져오기
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if(pageCurrent > 0)
- {
- //if (model.getValue("/root/main/charts[" + pageCurrent + "]/ordno")!= "" || model.getValue("/root/main/charts[" + pageCurrent-1 + "]/ordno")!= null)
- //C:\C.... C:\D...
- if(g_path[pageCurrent].substring(4, 3) != "C")
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pagecnt");
- }
- else
- {
- //setValue = "E" + "▦" + objThumbView.ThumbUserText(pageCurrent) + "▦" + g_page[pageCurrent - 1];
- setValue = objThumbView.ThumbUserText(pageCurrent) ;
- }
- return setValue;
- }
- break;
- case "ThumbView":
- if(objThumbView.TotalSelectedThumbnail == 0)
- {
- for (count = 1; count <= objThumbView.TotalThumbnail; count++)
- {
-
- if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- {
- //arrValue[valuecount] = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd");
- //valuecount = valuecount + 1;
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt"))
- {
-
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "|";
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt");
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + objthumbview.thumbusertext(count);
- //valuecount = valuecount + 1;
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
- setValue = setValue + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
-
- }
-
- if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- {
- tempcount = tempcount + 1;
- }
- }
- setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
- break;
- }
- else
- {
- for (count = 1; count <= objThumbView.TotalThumbnail; count++)
- {
- if (objThumbView.Select(count) == true)
- {
- if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- {
-
-
- //arrValue[valuecount] = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd");
- //valuecount = valuecount + 1;
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt"))
- {
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "|";
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt");
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + objthumbview.thumbusertext(count);
- //valuecount = valuecount + 1;
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- setValue = setValue + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
- }
- }
- if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- {
- tempcount = tempcount + 1;
- }
- }
-
- setValue = setValue.substr(0, setValue.length - 1);
- // alert(setValue);
- return setValue;
- break;
- }
- case "ChartView":
- alert("출력은 '여러페이지보기' 에서만 가능합니다.");
- return setValue;
- break;
- }
- }
- else
- {
- return setValue;
- }
- }
- /**
- * @group :
- * @ver : 2009.10.15
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중요페이지 보기 기능
- * @return :
- * @---------------------------------------------------
- */
- function SetMarkPage(getValue)
- {
- var setValue = "";
- var tempValue = "";
- var count;
- var valuecount = 0;
- var tempcount = 1;
- var emrcount = 0;
- var emrflag = "";
- //if (getValue == true)
- //{
-
-
- //switch(model.getValue("/root/hidden/currentViewMode"))
- switch(getValue)
- {
- case "PageView":
- //현재 페이지 정보 가져오기
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if(pageCurrent > 0)
- {
- //if (model.getValue("/root/main/charts[" + pageCurrent + "]/ordno")!= "" || model.getValue("/root/main/charts[" + pageCurrent-1 + "]/ordno")!= null)
- //C:\C.... C:\D...
- if(g_path[pageCurrent].substring(4, 3) != "C")
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pagecnt") +"▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm");
- }
- else
- {
- //setValue = "E" + "▦" + objThumbView.ThumbUserText(pageCurrent) + "▦" + g_page[pageCurrent - 1];
- setValue = objThumbView.ThumbUserText(pageCurrent);
- }
- return setValue;
- }
- break;
- case "ThumbView":
-
- if(objThumbView.TotalSelectedThumbnail == 0)
- {
-
- for (count = 1; count <= objThumbView.TotalThumbnail; count++)
- {
- emrflag = objThumbView.ThumbUserText(count).split("▦")[0];
-
-
- //if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- if(emrflag == "I")
- {
-
- //arrValue[valuecount] = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd");
- //valuecount = valuecount + 1;
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +"▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm"))
- {
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +"▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm") + "|";
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +"▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm");
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + objthumbview.thumbusertext(count);
- //valuecount = valuecount + 1;
-
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
- setValue = setValue + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
-
- }
-
- // if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- // {
- tempcount = tempcount + 1;
- // }
- }
- setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
- break;
- }
- else
- {
-
- for (count = 1; count <= objThumbView.TotalThumbnail; count++)
- {
- if (objThumbView.Select(count) == true)
- {
-
-
- //var aaa = model.getValue("/root/main/charts[" + tempcount + "]/ordno");
- //alert("tempcount : " + tempcount + " if : " + aaa);
-
- var pageno = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/pageno");
-
- var orddd = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/orddd");
-
- var formnm = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/formnm");
- //alert("bbb : " + bbb);
-
- var formcd = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/formcd");
- //alert("ccc : " + ccc);
-
- //alert("tempValue : " + tempValue);
-
-
- emrflag = objThumbView.ThumbUserText(count).split("▦")[0];
-
- if(emrflag == "I") {
- //if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm")) {
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + formcd + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + pageno + "▦" + orddd + " " + formnm) {
- //setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm") + "|";
- //tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +"▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm") ;
-
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + formcd + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + pageno + "▦" + orddd + " " + formnm + "|";
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + formcd + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +"▦" + pageno + "▦" + orddd + " " + formnm ;
- }
- }
- else
- {
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- setValue = setValue + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
- }
- }
- // if(objThumbView.ThumbUserText(count) == "" || objThumbView.ThumbUserText(count) == null)
- // {
- tempcount = tempcount + 1;
- // }
- }
- setValue = setValue.substr(0, setValue.length - 1);
- alert(setValue);
-
- return setValue;
- break;
- }
- case "ChartView":
- //현재 페이지 정보 가져오기
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if(pageCurrent > 0)
- {
- //if (model.getValue("/root/main/charts[" + pageCurrent + "]/ordno")!= "" || model.getValue("/root/main/charts[" + pageCurrent-1 + "]/ordno")!= null)
- //C:\C.... C:\D...
- if(g_path[pageCurrent].substring(4, 3) != "C")
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pagecnt") +"▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm");
- }
- else
- {
- //setValue = "E" + "▦" + objThumbView.ThumbUserText(pageCurrent) + "▦" + g_page[pageCurrent - 1];
- setValue = objThumbView.ThumbUserText(pageCurrent);
- }
- return setValue;
- }
- break;
- }
- //}
- //else
- //{
- // return setValue;
- //}
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용중인 팝업 뷰어화면을 닫지 않고 새로운 차트를 리로드 한다.
- * @return :
- * @---------------------------------------------------
- */
- function reloadChart(param)
- {
- var ViewMode;
- // var destNode = instance1.selectSingleNode("/root/hidden/temp");
- // model.copyNode(destNode, param);
- // searchChart("/root/hidden/temp");
- searchChart(param);
- if (downloadChart() == true)
- {
- ViewMode = model.getValue("/root/hidden/currentViewMode");
- if (ViewMode == null || ViewMode == "")
- {
- setupChart("ChartView");
- }
- else
- {
- setupChart(ViewMode);
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : IVIEWER에서 인스턴스 값 리셋.
- * @return :
- * @---------------------------------------------------
- */
- function resetInstance_EMR()
- {
- model.resetInstanceNode("/root/main/emrpath");
- model.resetInstanceNode("/root/main/emrorddate");
- model.resetInstanceNode("/root/main/emrformnm");
- model.resetInstanceNode("/root/main/emrformcd");
- model.resetInstanceNode("/root/main/emrdeptnm");
- model.resetInstanceNode("/root/main/emrdeptcd");
- model.resetInstanceNode("/root/main/emrpage");
- model.resetInstanceNode("/root/main/emrhiddenmsg");
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : IVEWER에서 초기화 함수
- * @return :
- * @---------------------------------------------------
- */
- function cleanViewer()
- {
- var fso;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- setupRecvPath(fso);
- // 사용하는 개체를 초기화 한다.
- fSet_OCX_PageViewer();
- fSet_OCX_ThumbViewer();
- fSet_OCX_ChartViewer();
- fSet_OCX_PreViewer();
-
- model.setValue("/root/main/chartinfo/pagetotal", "0");
- model.setValue("/root/main/chartinfo/pagecurrent", "0");
- model.refresh();
- // 모든 버튼 이미지를 설정한다.
- setupAllButtons();
-
- // 토글 버튼의 기본값 설정
- //processToggleButton("btnChartMouseNormal");
- processToggleButton("btnChartMousePanning");
- //processToggleButton("btnFitBest");
- processToggleButton("btnPageMouseNormal");
-
- // 페이지뷰의 페이지 이동 버튼 설정
- setupMoveButton();
-
- // 데이터 초기화
- resetData();
-
- // 뷰어를 IMPORT 된 크기로 FIT 시킨다.
- // if(document.body.isChild("importIemr") == true)
- // if(window.type == "iviewer")
- // {
- // fitToImportArea();
- // }
- // 썸네일 뷰어의 레이아웃 설정
- objThumbView.SetThumbLayout(4, 3);
- }
- /**
- * @group :
- * @ver :
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @return :
- * @---------------------------------------------------
- */
- function append_BmarkChart(param, chartinfo, hiddenmsg , recrowno)
- {
- //영상-EMR구분|파일경로| TREATNO | FORMCODE | PAGENO
- var arrChartInfo;
- var nPrvPageTotal;
- var nCurPageTotal;
- var nCurPageCount;
- var nNexPageTotal;
- var i;
- var j;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
-
-
- // var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- // var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- //영상-EMR구분|파일경로| TREATNO | FORMCODE | PAGENO
- if (chartinfo == "")
- {
- return false;
- }
-
- nPrvPageTotal = parseInt(objThumbView.TotalThumbnail);
- nCurPageTotal = parseInt(objThumbView.TotalThumbnail);
- arrChartInfo = chartinfo.split("|");
-
- if (arrChartInfo[0] == "I")
- {
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- var pageno = "";
-
-
- var params = param.selectNodes("iemr");
- for(var i = 0 ; i < params.length ; i++){
- var selParam = params.item(i);
- pageno = pageno + selParam.selectSingleNode("pageno").text + ",";
- }
- pageno = pageno.substr(0, pageno.length - 1);
-
-
- model.removenode("/root/tmp/pagenoset");
- model.makeValue("/root/tmp/pagenoset", pageno);
- var selNode = instance1.selectSingleNode("/root/tmp/pagenoset");
- param.appendChild(selNode);
-
- model.copyNode(destNode, param);
-
-
-
-
- // 전송
- submit("TRMRC03130");
- // 보여줄 페이지 수를 센다.
- nCurPageCount = 0;
- while(model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != null && model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != "")
- {
- nCurPageCount++;
- nCurPageTotal++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", nCurPageCount);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", nCurPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 파일다운로드
- downloadChart();
- for (i = nPrvPageTotal + 1; i <= nCurPageTotal; i++)
- {
- // knuh_20110802_수정_실시일자로 수정
- var indd = "";
- if (model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime") == "")
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd");
- }
- else
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime");
- }
- /*
- g_outertext[i - 1] = formatDate(model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd")) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
- objThumbView.AppendPage(g_path[i], 0, 0);
- objThumbView.ThumbText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
- */
- g_outertext[i - 1] = formatDate(indd) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
- objThumbView.AppendPage(g_path[i], 0, 0);
- objThumbView.ThumbText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- indd + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
- objThumbView.ThumbUserText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pagecnt") + "|";
-
- g_recrowno[i]= recrowno;
-
- }
- // 차트 추가
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(g_path[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
- i = nPrvPageTotal + 1;
-
- objThumbView.AppendPage(arrChartInfo[1], 0, 0);
-
- nNexPageTotal = parseInt(objThumbView.TotalThumbnail);
- for (j = i; j <= nNexPageTotal; j++)
- {
-
- g_outertext[j - 1] = formatDate(arrChartInfo[2]) + " " +
- arrChartInfo[6] + " " +
- arrChartInfo[4] + " " +
- parseInt(j - i + 1);
- objThumbView.ThumbText(j) = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
- objThumbView.ThumbUserText(j) = hiddenmsg + "▦" + nNexPageTotal;
- g_recrowno[j]= recrowno;
- g_path[j] = objThumbView.FileName(j);
- g_page[j] = j - i + 1;
- g_page_lut[j] = j;
- }
- // 차트 추가
-
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(arrChartInfo[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- model.setValue("/root/main/chartinfo/pagetotal", nNexPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.21
- * @by : 김재홍
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @return :
- * @---------------------------------------------------
- */
- function appendChart(param, chartinfo, hiddenmsg , recrowno)
- {
- var arrChartInfo;
- var nPrvPageTotal;
- var nCurPageTotal;
- var nCurPageCount;
- var nNexPageTotal;
- var i;
- var j;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
-
-
- // var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- // var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- if (chartinfo == "")
- {
- return false;
- }
-
- nPrvPageTotal = parseInt(objThumbView.TotalThumbnail);
- nCurPageTotal = parseInt(objThumbView.TotalThumbnail);
- arrChartInfo = chartinfo.split("|");
-
- if (arrChartInfo[0] == "I")
- {
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- // 전송
- // alert(opener.javascript.getParameter("instcd_choice"));
- // alert(opener.opener.javascript.getParameter("instcd_choice"));
-
- submit("TRMRC03101");
- // 보여줄 페이지 수를 센다.
- nCurPageCount = 0;
- while(model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != null && model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != "")
- {
- nCurPageCount++;
- nCurPageTotal++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", nCurPageCount);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", nCurPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 파일다운로드
- downloadChart();
- for (i = nPrvPageTotal + 1; i <= nCurPageTotal; i++)
- {
- //objChartView.AutoRefresh = false;
- //objThumbView.ThumbGen = false;
- //objThumbView.Redraw = false;
- // objChartView.ChartAppend(g_path[i], 0, 0);
- // objChartView.OuterCaption(i) = formatDate(model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd")) + " " +
- // model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- // model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- // model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
-
- // KNUH_20110525_수정 - 이미지의 헤더의 날짜를 실시일자로 바꿔달라는 요청
- /*
- g_outertext[i - 1] = formatDate(model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd")) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
- */
-
- var indd = "";
- if (model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime") == "")
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd");
- }
- else
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime");
- }
-
-
- g_outertext[i - 1] = formatDate(indd) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
-
-
- objThumbView.AppendPage(g_path[i], 0, 0);
-
- // KNUH_20110525_수정 - 이미지의 헤더의 날짜를 실시일자로 바꿔달라는 요청
- /*
- objThumbView.ThumbText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
- */
- objThumbView.ThumbText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- indd + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
-
- objThumbView.ThumbUserText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pagecnt") + "|";
-
- g_recrowno[i]= recrowno;
- //objChartView.AutoRefresh = true;
- //objThumbView.Redraw = true;
- //objThumbView.ThumbGen = true;
- }
- // 차트 추가
-
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(g_path[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
- i = nPrvPageTotal + 1;
- //objChartView.AutoRefresh = false;
- //objThumbView.ThumbGen = false;
- //objThumbView.Redraw = false;
- objThumbView.AppendPage(arrChartInfo[1], 0, 0);
-
- //objChartView.AutoRefresh = true;
- //objThumbView.Redraw = true;
- //objThumbView.ThumbGen = true;
- nNexPageTotal = parseInt(objThumbView.TotalThumbnail);
- for (j = i; j <= nNexPageTotal; j++)
- {
- //objChartView.OuterCaption(j) = formatDate(arrChartInfo[2]) + " " +
- // arrChartInfo[6] + " " +
- // arrChartInfo[4] + " " +
- // parseInt(j - i + 1);
- g_outertext[j - 1] = formatDate(arrChartInfo[2]) + " " +
- arrChartInfo[6] + " " +
- arrChartInfo[4] + " " +
- parseInt(j - i + 1);
- objThumbView.ThumbText(j) = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
- objThumbView.ThumbUserText(j) = hiddenmsg + "▦" + nNexPageTotal;
- g_recrowno[j]= recrowno;
- g_path[j] = objThumbView.FileName(j);
- g_page[j] = j - i + 1;
- g_page_lut[j] = j;
- }
- // 차트 추가
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(arrChartInfo[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- model.setValue("/root/main/chartinfo/pagetotal", nNexPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
-
- model.refresh();
- }
- function fn_SendRecRowno(idx)
- {
- // 2.0 5월 7일 추가
- parent.window.javascript.fReturnRecRowno(g_recrowno[idx]);
- }
- function fn_ChartPageScroll(getValue)
- {
- //커서값
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
-
- //getValue 키값을 문자열로 받아준다
- if (objChartView.TotalChart == 0 )
- {
- return;
- }
- if ( pageCurrent == 1 )
- {
- switch(getValue)
- {
- case "PageUp" :
- //fMovePrev();
- parent.window.javascript.fGetRec("prev");
- break;
- case "PageDown" :
- if (pageCurrent == objThumbView.TotalThumbnail)
- {
- parent.window.javascript.fGetRec("next");
- }
- else
- {
- fMoveNext();
- }
- break;
- case "Top" :
- //fMovePrev();
- parent.window.javascript.fGetRec("prev");
- break;
- case "Bottom" :
- if (pageCurrent == objThumbView.TotalThumbnail)
- {
- parent.window.javascript.fGetRec("next");
- }
- else
- {
- fMoveNext();
- }
- break;
- case "Home" :
- parent.window.javascript.fGetRec("midfirst");
- break;
- case "End" :
- parent.window.javascript.fGetRec("midend");
- break;
- }
- return;
-
- }
- if ( pageCurrent == objThumbView.TotalThumbnail )
- {
- switch(getValue)
- {
- case "PageUp" :
- fMovePrev();
- break;
- case "PageDown" :
- //fMoveNext();
- parent.window.javascript.fGetRec("next");
- break;
- case "Top" :
- fMovePrev();
- break;
- case "Bottom" :
- //fMoveNext();
- parent.window.javascript.fGetRec("next");
- break;
- case "Home" :
- parent.window.javascript.fGetRec("midfirst");
- break;
- case "End" :
- parent.window.javascript.fGetRec("midend");
- break;
- }
- return;
-
- }
- switch(getValue)
- {
- case "PageUp" :
- //objChartView.Action = 3
- fMovePrev();
- break;
- case "PageDown" :
- //objChartView.Action = 4
- fMoveNext();
- break;
- case "Home" :
- //objChartView.Action = 1
- break;
- case "End" :
- //objChartView.Action = 2
- break;
- case "Top" :
- fMovePrev();
- break;
- case "Bottom" :
- fMoveNext();
- break;
-
- }
- model.refresh();
- }
- function refreshFalse()
- {
- objChartView.AutoRefresh = false;
- objThumbView.ThumbGen = false;
- objThumbView.Redraw = false;
- }
- function refreshTrue()
- {
- objChartView.AutoRefresh = true;
- objThumbView.Redraw = true;
- objThumbView.ThumbGen = true;
- }
|