1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905 |
- /*
- - =======================================================================================
-
- 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;
- var g_scrollcheck;
- var g_scrollcnt = 0;
- /**
- * @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":
- fSet_OCX_ThumbViewer();
- fShow_FalsePreviewChart(0,0,0);
- idx = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- fn_SendRecRowno(idx);
- /* p 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");
- 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()
- {
- //alert("fMoveNext()"); // p
- 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()
- {
- //alert("fMovePrev()"); // p
- 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()
- {
- alert("fMoveLast()"); // p
- //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()
- {
- alert("fMoveFirst()"); // p
- //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)
- {
- 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"))
- {
- 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
- {
- 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);
- //폴더리셋
- parent.window.javascript.fExistFolder("C:\\CertrecY", "Y");
- //parent.window.javascript.fExistFolder("C:\\CertrecN", "Y");
- }
- /**
- * @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++)
- {
- 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");
- 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.ChartAppend(g_path[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- }
- 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.ChartAppend(arrChartInfo[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- 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 cViewmode = model.getValue("/root/hidden/currentViewMode");
- var cmode = switchView.selectedIndex;
- // 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);
- // 전송
- 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();
- if(cViewmode == "ThumbView"){
- 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");
- 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");
- 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;
- }
- }
- else if(cViewmode == "ChartView"){
-
- 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");
- 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");
- 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.ChartAppend(g_path[1], 0, 0);
- }
- objChartView.OuterCaption(1) = g_outertext[0];
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
- i = nPrvPageTotal + 1;
- //objChartView.AutoRefresh = false;
- //objThumbView.ThumbGen = false;
- //objThumbView.Redraw = false;
- if(cViewmode == "ThumbView"){
- objThumbView.AppendPage(arrChartInfo[1], 0, 0);
- }
-
- //objChartView.AutoRefresh = true;
- //objThumbView.Redraw = true;
- //objThumbView.ThumbGen = true;
-
- nNexPageTotal = parseInt(objThumbView.TotalThumbnail);
- if(cViewmode == "ChartView"){
- 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.ChartAppend(arrChartInfo[1], 0, 0);
- }
- objChartView.OuterCaption(1) = g_outertext[0];
- 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;
- }
- //alert("fn_ChartPageScroll(getValue)_pageCurrent == 1"); // p
- 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;
- }
- //alert("fn_ChartPageScroll(getValue)_pageCurrent == objThumbView.TotalThumbnail:"+objThumbView.TotalThumbnail); // p
- 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;
-
- }
-
- //alert("fn_ChartPageScroll(getValue)_END"); // p
- model.refresh();
- }
- function refreshFalse()
- {
- objChartView.AutoRefresh = false;
- objThumbView.ThumbGen = false;
- objThumbView.Redraw = false;
- }
- function refreshTrue()
- {
- objChartView.AutoRefresh = true;
- objThumbView.Redraw = true;
- objThumbView.ThumbGen = true;
- }
|