123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513 |
- <?xml version="1.0" encoding="utf-8"?>
- <ADL version="1.0">
- <TypeDefinition url="default_typedef.xml"/>
- <GlobalVariables url="globalvars.xml"/>
- <Application id="extinf" codepage="" language="" themeid="XPKNU.xtheme" loginformurl="" loginformstyle="" windowopeneffect="" windowcloseeffect="" version="" tracemode="" usewaitcursor="false" engineurl="../install/TobeSoft/XPlatform/" engineversion="9.2.0.280" licenseurl="XPLATFORM_Client_License.xml" filesecurelevel="all" networksecurelevel="all" ondownloadactivex="application_ondownloadactivex" onerror="application_onerror" onload="application_onload" onexit="application_onexit">
- <Layout>
- <MainFrame id="mainframe" title="maintitle" resizable="true" showtitlebar="true" showstatusbar="true" position="absolute 0 0 500 1024" titletext="Himed" showcascadestatustext="false" showcascadetitletext="false" style="showzoomcombo:false;statusbarheight:0;">
- <VFrameSet id="VFrameSet" separatesize="0,*,0">
- <Frames>
- <ChildFrame id="ChildFrameTop" formurl="com_hismainxp::form_top.xfdl" dragmovetype="none" showstatusbar="false" showtitlebar="false" style="statusbarheight:0;"/>
- <FrameSet id="FrameSet">
- <Frames>
- <ChildFrame id="ChildFrameWork" formurl="com_hismainxp::form_work.xfdl" dragmovetype="none" resizable="false" showtitlebar="false" openstatus="maximize"/>
- </Frames>
- </FrameSet>
- <ChildFrame id="ChildFrameBottom" formurl="com_hismainxp::form_bottom.xfdl" showtitlebar="false" dragmovetype="none" position="absolute 0 0 0 0" style="statusbarheight:0;"/>
- </Frames>
- </VFrameSet>
- </MainFrame>
- </Layout>
- <Style url="CSS::default.css"/>
- </Application>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : HIT
- * Job Name :
- * File Name : himed2.xadl
- * Creator :
- * Make Date : 2014-01-01
- *
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-01-01 임준호
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Global Variable
- //---------------------------------------------------------------------------------------
- //상단 프레임
- var agv_objAppTopPath = null;
- //업무화면을 관리하는 프레임셋
- var agv_objAppWorkPath = null;
- //하단 프레임
- var agv_objAppBottomPath = null;
- //시스템 에러 구분 application_onerror에서 사용
- var agv_bSystemError = false;
- //업무용 세션 변수
- var agv_objBizVariable = null;
- //Cache Variable
- var agv_objCommonCache = new Object();
- //last transaction time(milli)
- var agv_nLastTransactionTime = 0;
- //var agv_sStartMemoryInfo = Math.round(system.getMemoryStatus("FreePhysical")/1000000)+"";
- //frmf_openForm 함수에서 인자값을 넘길때 사용(frmf_openForm) - frmf_getMainFormParam()에서 사용한다.
- var agv_objMainFormParam = null;
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.usessl : ssl 사용 여부
- * Description : ssl 설정
- ****************************************************************************************/
- function gf_useSSL(usessl)
- {
- if (usessl){
- application.services["SVR"].url = gv_sURLprefixSSL+"/.lxp?";
- }else{
- application.services["SVR"].url = gv_sURLprefix+"/.lxp?";
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 로그인 화면 기동
- ****************************************************************************************/
- function gf_loginProcess()
- {
- // var nMoniterIndex;
- // var nScreenLeft;
- // var nScreenTop;
- // var nScreenRight;
- // var nScreenBottom;
- // var nScreenWidth;
- // var nScreenHeight;
- // var arrScreenSize;
- //
- // nMoniterIndex = system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
- // //alert("login process="+nMoniterIndex);
- // objScreenSize = system.getScreenRect(nMoniterIndex);
- // nScreenLeft = objScreenSize.left;
- // nScreenTop = objScreenSize.top;
- // nScreenRight = objScreenSize.right;
- // nScreenBottom = objScreenSize.bottom;
- // nScreenWidth = nScreenRight - nScreenLeft;
- // nScreenHeight = nScreenBottom - nScreenTop;
-
- //로그인 창 나올때 작업표시줄 아이콘 표시를 위하여 mainframe 크기를 0으로 줄인다.
- // var nMainLeft = application.mainframe.position.left;
- // var nMainTop = application.mainframe.position.top;
- // var nMainWidth = application.mainframe.position.width;
- // var nMainHeight = application.mainframe.position.height;
-
- // application.mainframe.position.left = Math.ceil(nScreenLeft+(nScreenWidth/2));
- // application.mainframe.position.top = Math.ceil(nScreenTop+(nScreenHeight/2));
- // application.mainframe.position.width =0;
- // application.mainframe.position.height = 0;
- // application.mainframe.visible = true;
- gv_sMenuType = "03";
- gf_setMenuType(gv_sMenuType);
- /////////////////////////////////////////////////////////////////////////////////
- //PACS
- /////////////////////////////////////////////////////////////////////////////////
-
-
- //var jobkind = gv_ext_dutplcecd;
- //jobkind="E" userid="COMBC" password="1" instcode="his053" deptcode="GAD" dutplceinstcd="053" deptfromdd="20070101" menugrupcd="MG00010000" menuauthcd="MA00000055"
- var userid = gv_ext_userid; //userid
- var password = "1";
- var jobkind = "E"; //고정
- var instcode = "his"+gv_ext_instcd; //??
-
- var objDs = new Dataset("gds_userDeptList");
- //this.addChild("ds_userDeptList", objDs);
- objDs.name = "gds_userDeptList";
- addVariable("gds_userDeptList", objDs, "global"); //global에 등록
- transaction(
- "hismainapp.Login"
- , "SVR::target=hismainapp.Login&method=reqMenuGroupList"
- , ""
- , "gds_userDeptList=ds_userDeptList"
- , "jobkind="+wrapQuote(jobkind)+" "+
- "userid="+wrapQuote(userid)+" "+
- "password="+wrapQuote(password)+" "+
- "scrnid="+wrapQuote(gv_ext_scrncd)+" "+
- "instcode="+wrapQuote(instcode)
-
- , ""
- , false
- );
-
- var dutplceinstcd = gds_userDeptList.getColumn(0, "dutplceinstcd");//"053"; //instcd
- var deptcode = gds_userDeptList.getColumn(0, "dutplcecd");//"GAD"; //dutplcecd
- var deptfromdd = gds_userDeptList.getColumn(0, "fromdd");//"19740101";
- var menugrupcd = "";
- var menuauthcd = "";
-
- if(gv_ext_system == "PACS"){
- //menugrupcd = "MG00010000";
- //menuauthcd = "MA00000055";
- }
-
- //gv_sCurrentAuthGroup = menugrupcd + "|" + menuauthcd;
- transaction("hismainapp.Login"
- , "SVR::target=hismainapp.Login&method=reqGetSessionInfo"
- , ""
- , "gds_userInfo=userinfo "+
- //"ds_result=result "+
- "gds_menuGroup=menugroup " +
- "gds_menuInfo=menuinfo " +
- //"ds_menuGroupList=menuGroupList "+
- "gds_systemInfo=systeminfo"
- , "userid="+wrapQuote(userid)+" "+
- "jobkind="+wrapQuote(jobkind)+" "+
- "instcode="+wrapQuote(instcode)+" "+
- "dutplceinstcd="+wrapQuote(dutplceinstcd)+" "+
- //"password="+wrapQuote(password)+" "+
-
- "deptcode="+wrapQuote(deptcode)+" "+
- "deptfromdd="+wrapQuote(deptfromdd)+" "+
- "menugrupcd="+wrapQuote(menugrupcd)+" "+
- "menuauthcd="+wrapQuote(menuauthcd)
- , "cbf_login"
- //, bAsync
- //, nDataType
- //, bCompress
- );
- ////////////////////////////////////////////////////////////////////////////////////////
-
- //로그인 화면 기동
- // var objFrame = new ChildFrame("Login", nScreenLeft+(nScreenWidth/2)-520, nScreenTop+(nScreenHeight/2)-301, nScreenLeft+(nScreenWidth/2)+520, nScreenTop+(nScreenHeight/2)+302);
- //
- // objFrame.showtitlebar = false;
- // objFrame.layered = true;
- // objFrame.style.background = "transparent";
- // objFrame.formurl = "com_hismainxp::form_login.xfdl";
- //
- // var rtn = objFrame.showModal("Login",application.mainframe);
- //
- // if(rtn=="OK"){
- //로그인 창 나올때 mainframe를 원래 크기로 적용한다.
- // application.mainframe.position.left = nMainLeft;
- // application.mainframe.position.top = nMainTop;
- // application.mainframe.position.width = nMainWidth;
- // application.mainframe.position.height = nMainHeight;
- // application.mainframe.visible = true;
- //gf_setMenuType(gv_sMenuType);
- // }else{
- // exit();
- // }
- }
- function cbf_login(sSvcId, nErrorCode, sErrorMsg){
- // var arrParam = sSvcId.split("~");
- //
- // application.mainframe.position.left = arrParam[1];
- // application.mainframe.position.top = arrParam[2];
- // application.mainframe.position.width = arrParam[3];
- // application.mainframe.position.height = arrParam[4];
- //application.mainframe.visible = true;
- // gv_sMenuType = "01";`
- // gf_setMenuType(gv_sMenuType);
-
- gv_sSessionToken = gds_userInfo.getColumn(0,"sessioninfo");
-
- //gds_menuInfo.filter("scrncd == '"+gv_ext_scrncd+"'");
-
- //var spwdcnfmyn = gds_menuInfo.getColumn(0, "pwdcnfmyn"); // 사용자 확인여부
- //var sscrnpos = gds_menuInfo.getColumn(0, "scrnpos"); // M: 메인, P: 팝업
- var sscrnpos = "M";
- //var sscrncd = gds_menuInfo.getColumn(0, "scrncd"); // 화면 코드
- var sscrncd = gv_ext_scrncd;
- //var sscrnauth = gds_menuInfo.getColumn(0, "scrnauth"); // RXP 권한 (예:11100000)
- var sscrnauth = "11100000";
- var smenuparam = gds_menuInfo.getColumn(0, "menuparam"); // 메뉴파라미터
- var smenuitemcd = gds_menuInfo.getColumn(0, "menuitemcd"); // 메뉴아이템코드
- //var sMenuItemnm = gds_menuInfo.getColumn(0, "menuitemnm");
-
- var defaultitemid = sscrncd+"|"+sscrnpos+"|"+sscrnauth+"|"+smenuparam+"|"+smenuitemcd;
-
- try{
- agv_objAppTopPath.form.onLoginComplete(defaultitemid);
- agv_objAppBottomPath.form.onLoginComplete();
- }catch(e){
- trace("extinf.onLoginComplete");
- }
-
- for (var i=0; i<gds_userInfo.colcount; i++){
- var key = gds_userInfo.getColumnInfo(i).name;
- var value = gds_userInfo.getColumn(0,i);
- }
-
- //상태메시지에 유저정보 입력
- var sDutplcenm = gds_userInfo.getColumn(0, "dutplcenm");
- var sUserName = gds_userInfo.getColumn(0, "usernm");
- agv_objAppBottomPath.form.stt_userInfo.text = sDutplcenm+" "+sUserName;
-
- var arrWeekarr = new Array("일", "월", "화", "수", "목", "금", "토");
- var sDt = gds_userInfo.getColumn(0, "logindt");
- var sDtyear = sDt.substring(0,4);
- var sDtmonth = sDt.substring(4,6);
- var sDtday = sDt.substring(6,8);
- var sDthour = sDt.substring(8,10);
- var sDtmin = sDt.substring(10,12);
-
- var dtVal = new Date(sDtmonth+"/"+sDtday+"/"+sDtyear);
- var sDtWeek = arrWeekarr[dtVal.getDay()];
- var sStr = sDtyear + "년" + sDtmonth + "월" + sDtday + "일 (" + sDtWeek + ") " + sDthour +"시" + sDtmin +"분";
-
- var sLoginDate = sStr;
- agv_objAppBottomPath.form.stt_loginInfo.text = "최초접속시간: "+sLoginDate;
- }
- /****************************************************************************************
- * Argument :
- * Description : 메인 프레임 사이즈 및 위치 설정
- ****************************************************************************************/
- function gf_setFrameSize()
- {
- var nMoniterIndex;
- var nScreenLeft;
- var nScreenTop;
- var nScreenRight;
- var nScreenBottom;
- var nScreenWidth;
- var nScreenHeight;
- var arrScreenSize;
-
- var objExtCommon = new ExtCommon();
- var nTaskBar = objExtCommon.getTaskBarPosition();
-
- nMoniterIndex = system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
- objScreenSize = system.getScreenRect(nMoniterIndex);
-
- nScreenLeft = objScreenSize.left;
- nScreenTop = objScreenSize.top;
- nScreenRight = objScreenSize.right;
- nScreenBottom = objScreenSize.bottom;
- nScreenWidth = nScreenRight - nScreenLeft;
- nScreenHeight = nScreenBottom - nScreenTop;
-
- //var nLeftCenter = nScreenLeft+((nScreenWidth/2)-(application.mainframe.position.width/2));
- var nLeftCenter = nScreenRight - application.mainframe.position.width;
- trace("nLeftCenter="+nLeftCenter);
- trace("nScreenRight="+nScreenRight);
- trace("application.mainframe.position.width="+application.mainframe.position.width);
-
- if(nTaskBar[0] >= nScreenLeft && nTaskBar[0] < (nScreenLeft + nScreenWidth)){
- if(nTaskBar[0] == nScreenLeft && nTaskBar[1] > nScreenLeft){
- //application.mainframe.position.height = nScreenHeight - (nScreenHeight - nTaskBar[1]);
- application.mainframe.move(nLeftCenter, nScreenTop);
- }else if(nTaskBar[0] == nScreenLeft && nTaskBar[1] == nScreenLeft && nTaskBar[2] < nScreenWidth){
- //application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter+nTaskBar[2], nScreenTop);
- }else if(nTaskBar[0] > nScreenLeft && nTaskBar[1] == nScreenLeft){
- //application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter, nScreenTop);
- }else if(nTaskBar[0] == nScreenLeft && nTaskBar[1] == nScreenLeft && nTaskBar[3] < nScreenHeight){
- //application.mainframe.position.height = nScreenHeight - nTaskBar[3];
- application.mainframe.move(nLeftCenter, nScreenTop+nTaskBar[3]);
- }
- }else{
- //application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nLeftCenter, nScreenTop);
- }
- application.mainframe.position.height = 200;
- /*
- if(nTaskBar[0] == 0 && nTaskBar[1] > 0){
- //alert("Main Monitor Bottom TaskBar::" + (nScreenHeight-nTaskBar[1]));
- application.mainframe.position.height = nScreenHeight - (nScreenHeight - nTaskBar[1]);
- application.mainframe.move(nScreenLeft, nScreenTop);
- //trace(nScreenWidth+" "+nScreenHeight+" "+nScreenLeft+" "+nScreenTop);
- }else if(nTaskBar[0] == 0 && nTaskBar[1] == 0 && nTaskBar[2] < nScreenWidth){
- //alert("Main Monitor Left TaskBar::" + nTaskBar[2]);
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nScreenLeft+nTaskBar[2], nScreenTop);
- }else if(nTaskBar[0] > 0 && nTaskBar[1] == 0){
- //alert("Main Monitor Right TaskBar::" + (nScreenWidth-nTaskBar[0]));
- application.mainframe.position.height = nScreenHeight;
- application.mainframe.move(nScreenLeft, nScreenTop);
- }else if(nTaskBar[0] == 0 && nTaskBar[1] == 0 && nTaskBar[3] < nScreenHeight){
- //alert("Main Monitor Top TaskBar::" + nTaskBar[3]);
- application.mainframe.position.height = nScreenHeight - nTaskBar[3];
- application.mainframe.move(nScreenLeft, nScreenTop+nTaskBar[3]);
- }
- */
-
-
- //var hWnd = mainframe.getHandle();
- //var rtn = objExtCommon.getMonitorRect(hWnd);
- //trace( "Form_MaxPosition [ x: " + rtn[0] + " y: " + rtn[1] + " width: " + rtn[2] + " height: " + rtn[3] + "]" );
- //alert(nScreenHeight);
- }
- /****************************************************************************************
- * Argument :
- * Description : 로그아웃 처리
- ****************************************************************************************/
- function gf_logout(){
-
- // 세션토큰 초기화
- gv_sSessionToken = "";
- // 세션변수 초기화
- agv_objBizVariable = new Object();
-
- gds_userInfo.clear();
-
- //메인프레임의 최대화/최소화 상태를 normal 상태로 만든다.
- //최대화 상태일때 크기 조절이 안된다.
- application.mainframe.openstatus = "normal";
-
- gf_loginProcess();
- }
- /****************************************************************************************
- * Argument : 01.sMenuType : 메뉴타입
- * Description : 메뉴타입에 따라 상단프레임(TOP) height 조절
- ****************************************************************************************/
- function gf_setMenuType(sMenuType){
-
- var vfameset = application.mainframe.VFrameSet;
- //trace("menutype : "+ sMenuType);
-
- if(sMenuType == "01"){
- // 상단정보를 보이게 조정
- vfameset.separatesize = "120,*,23";
- }else if(sMenuType == "02"){
- // 상단정보를 숨김
- vfameset.separatesize = "35,*,23";
- }else if(sMenuType == "03"){
- vfameset.separatesize = "0,*,0";
- }
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components :
- * Components ID :
- * Event : onload
- * Argument : 01.obj : Object
- * : 02.e : LoadEventInfo
- * Description :
- ****************************************************************************************/
- function application_onload(obj:Object, e:LoadEventInfo)
- {
- agv_objAppTopPath = mainframe.VFrameSet.ChildFrameTop; // 상단정보
- agv_objAppWorkPath = mainframe.VFrameSet.FrameSet.ChildFrameWork; // 업무화면
- agv_objAppBottomPath = mainframe.VFrameSet.ChildFrameBottom; // 하단정보
-
- //업무용 세션 변수 초기화
- agv_objBizVariable = new Object();
- // 서버환경과 로컬환경을 따져서 Grobal Variable 동적으로 변경 (예 :http://his000dev.schmc.ac.kr:18088/himed2/.lxp? )
- var xadlURLArr = application.xadl.split("/");
- if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
- {
- var domainArr = xadlURLArr[2].split(":");
- gv_sURLprefix = "http://"+xadlURLArr[2]+"/"+xadlURLArr[3];
- gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+xadlURLArr[3];
- gv_bIsPreview = false;
- }
- else // 개발자 환경인 경우 (미리보기환경)
- {
-
- var serviceURLArr = application.services["SVR"].url.split("/");
- var localDomainArr = serviceURLArr[2].split(":");
- gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
- gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
- gv_bIsPreview = true;
- }
-
- // SSL 사용여부에 따라 서비스 URL 변경
- gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
- gf_useSSL(gv_bUseSSL);
-
- var rtn = "OK";
-
- gf_setFrameSize();
- //gf_loginProcess();
- }
- /****************************************************************************************
- * Components : application
- * Components ID :
- * Event : onerror
- * Argument : 01.obj : Object
- * : 02.e : ErrorEventInfo
- * Description :
- ****************************************************************************************/
- function application_onerror(obj:Object, e:ErrorEventInfo){
-
- agv_bSystemError = true;
-
- //트랜잭션시 ESC키로 종료막음. - tobesoft 2014.03.17
- if(e.errorcode == "-2147418039"){ //ESC키가 눌렸을때
- //return true;
- }
-
- //임시 오류 확인용
- //alert(e.errorcode+"\n"+e.errormsg);
- }
- /****************************************************************************************
- * Components : application
- * Components ID :
- * Event : ondownloadactivex
- * Argument : 01.obj : Object
- * : 02.e : LoadEventInfo
- * Description : 엑티브 엑스 다운로드 alert 방지용
- ****************************************************************************************/
- function application_ondownloadactivex(obj:Object, e:LoadEventInfo){
- //지우면 안됨.
- }
- /****************************************************************************************
- * Components : MainFrame
- * Components ID : mainframe
- * Event : onsize
- * Argument : 01.obj : MainFrame
- * : 02.e : SizeEventInfo
- * Description : 메인프레임 리사이즈
- ****************************************************************************************/
- function MainFrame_onsize(obj:MainFrame, e:SizeEventInfo){
-
- // if(gv_sSessionToken != ""){
- // if(e.cx<=1280){
- // obj.position.width = 1280;
- // return;
- // }
- // }
- }
- /****************************************************************************************
- * Components : application
- * Components ID : application
- * Event : onexit
- * Argument : 01.obj : Object
- * : 02.e : ExitEventInfo
- * Description : 메인프레임 닫기
- ****************************************************************************************/
- function application_onexit(obj:Object, e:ExitEventInfo){
-
- //팝업 좌표 저장
- agv_objAppTopPath.form.savePopupLocation();
- }
- ]]></Script>
- </ADL>
|