sample_전광판 관련.xfdl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\default_typedef.xml"/>
  4. <Form id="workform" position="absolute 0 0 1328 805" titletext="소화기병센터 검사안내" oninit="model1_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Div id="Div00" taborder="1" text="Div00" style="background:antiquewhite;" position2="absolute l:43.47% w:143 t:0 h:30" positiontype="position2">
  8. <Layouts>
  9. <Layout>
  10. <Button id="btn_autoexec" taborder="0" text="자동알림" onclick="btn_autoexec_onclick" class="btn3" position2="absolute l:0 w:82 t:6 h:20" positiontype="position2"/>
  11. <Button id="btn_sea" taborder="1" text="조회" onclick="btn_sea_onclick" class="btn3" position2="absolute l:85 w:56 t:6 h:20" positiontype="position2"/>
  12. </Layout>
  13. </Layouts>
  14. </Div>
  15. <Grid id="grd_display1" style="align:center middle;" autofittype="col" position="absolute 0 30 316 805" positiontype="position" anchor="all">
  16. <Formats>
  17. <Format id="default">
  18. <Columns>
  19. <Column size="300"/>
  20. </Columns>
  21. <Rows>
  22. <Row size="22" band="head"/>
  23. <Row size="20"/>
  24. </Rows>
  25. <Band id="head">
  26. <Cell text="검사실1"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell/>
  30. </Band>
  31. </Format>
  32. </Formats>
  33. </Grid>
  34. <Grid id="grd_display2" style="align:center middle;" autofittype="col" anchor="all" position="absolute 340 30 656 805" positiontype="position">
  35. <Formats>
  36. <Format id="default">
  37. <Columns>
  38. <Column size="300"/>
  39. </Columns>
  40. <Rows>
  41. <Row size="22" band="head"/>
  42. <Row size="20"/>
  43. </Rows>
  44. <Band id="head">
  45. <Cell text="검사실2"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell/>
  49. </Band>
  50. </Format>
  51. </Formats>
  52. </Grid>
  53. <Grid id="grd_display3" style="align:center middle;" autofittype="col" anchor="all" position="absolute 672 30 988 805" positiontype="position">
  54. <Formats>
  55. <Format id="default">
  56. <Columns>
  57. <Column size="300"/>
  58. </Columns>
  59. <Rows>
  60. <Row size="22" band="head"/>
  61. <Row size="20"/>
  62. </Rows>
  63. <Band id="head">
  64. <Cell text="검사실3"/>
  65. </Band>
  66. <Band id="body">
  67. <Cell/>
  68. </Band>
  69. </Format>
  70. </Formats>
  71. </Grid>
  72. <Grid id="grd_display4" style="align:center middle;" autofittype="col" anchor="all" position="absolute 1012 29 1320 804" positiontype="position">
  73. <Formats>
  74. <Format id="default">
  75. <Columns>
  76. <Column size="300"/>
  77. </Columns>
  78. <Rows>
  79. <Row size="22" band="head"/>
  80. <Row size="20"/>
  81. </Rows>
  82. <Band id="head">
  83. <Cell text="검사실4"/>
  84. </Band>
  85. <Band id="body">
  86. <Cell/>
  87. </Band>
  88. </Format>
  89. </Formats>
  90. </Grid>
  91. <Static id="Static31" text="h7" class="sta_guide" visible="false" position="absolute 557 0 699 7"/>
  92. <Static id="Static28" text="h3" class="sta_guide" visible="false" position="absolute 559 27 697 30"/>
  93. <Splitter id="Splitter00" position2="absolute l:23.8% w:23 t:272 h:56" positiontype="position2">
  94. <Formats>
  95. <Format id="default">
  96. <SplitterItems id="items">
  97. <SplitterItem id="item00" bindtype="resize" position="leftortop" offset="0" componentid="grd_display1"/>
  98. <SplitterItem id="item01" bindtype="resize" position="rightorbottom" offset="0" componentid="grd_display2"/>
  99. </SplitterItems>
  100. </Format>
  101. </Formats>
  102. </Splitter>
  103. <Splitter id="Splitter01" position2="absolute l:49.4% w:16 t:272 h:56" positiontype="position2">
  104. <Formats>
  105. <Format id="default">
  106. <SplitterItems id="items">
  107. <SplitterItem id="item00" bindtype="resize" position="leftortop" offset="0" componentid="grd_display2"/>
  108. <SplitterItem id="item01" bindtype="resize" position="rightorbottom" offset="0" componentid="grd_display3"/>
  109. </SplitterItems>
  110. </Format>
  111. </Formats>
  112. </Splitter>
  113. <Splitter id="Splitter02" position2="absolute l:74.4% w:23 t:272 h:56" positiontype="position2">
  114. <Formats>
  115. <Format id="default">
  116. <SplitterItems id="items">
  117. <SplitterItem id="item00" bindtype="resize" position="leftortop" offset="0" componentid="grd_display3"/>
  118. <SplitterItem id="item01" bindtype="resize" position="rightorbottom" offset="0" componentid="grd_display4"/>
  119. </SplitterItems>
  120. </Format>
  121. </Formats>
  122. </Splitter>
  123. </Layout>
  124. </Layouts>
  125. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  126. * System Name : HIT
  127. * Job Name :
  128. * File Name : SPAEA01900_기능검사전광판.xfdl
  129. * Creator :
  130. * Make Date : 2014-03-05
  131. *
  132. * Description :
  133. *---------------------------------------------------------------------------------------
  134. * Modify Date Modifier Modify Description
  135. *---------------------------------------------------------------------------------------
  136. * 2014-03-05 HIT Converting Program(TF->XP)
  137. *
  138. *---------------------------------------------------------------------------------------
  139. ****************************************************************************************/
  140. //=======================================================================================
  141. // Lib Include
  142. //---------------------------------------------------------------------------------------
  143. include "com_commonxp::common.xjs";
  144. include "com_commonxp::tfHelper.xjs";
  145. include "com_commonxp::stringHelper.xjs";
  146. include "ast_examcurexp::AEZ0001.xjs";
  147. include "com_commonxp::dateHelper.xjs";
  148. include "ast_examcurexp::combolist.xjs";
  149. //=======================================================================================
  150. // Function
  151. //---------------------------------------------------------------------------------------
  152. //=======================================================================================
  153. // Event
  154. //---------------------------------------------------------------------------------------
  155. /****************************************************************************************
  156. * Components :
  157. * Components ID : model1
  158. * Event : oninit
  159. * Argument : 01.obj : Object Event has occurred
  160. * : 02.e : Event Object
  161. * Description :
  162. ****************************************************************************************/
  163. function model1_oninit(obj:Form, e:InitEventInfo)
  164. {
  165. // 초기 화면 해상도 설정
  166. window.maximize();
  167. aezfSetSuppDeptcd();
  168. var monitor = app.monitorResolution; //모니터 해상도 가져옴
  169. var result = stringSplit(monitor, "|"); //분리
  170. var strIndex = ",";
  171. var re=result[0];
  172. remonitorW = re.substring(0,re.indexOf(strIndex)); //모니터 해상도 넓이
  173. remonitorH = re.substring(re.indexOf(strIndex)+1,re.length); //모니터 해상도 높이
  174. resizeW = remonitorW / 4; //그리드 4
  175. resizeH = remonitorH - 100; //대충빼둠
  176. //그리드 Size 설정
  177. fGridSize(grd_display1 , 1);
  178. fGridSize(grd_display2 , 2);
  179. fGridSize(grd_display3 , 3);
  180. fGridSize(grd_display4 , 4);
  181. var a = parseInt(grd_display1.rowHeight(1)); // 메인그리드 row 높이
  182. var b = parseInt(grd_display1.attribute("height")); // 메인그리드 높이
  183. var c = parseInt(grd_display1.rowHeight(0)); // 메인그리드 캡션 높이
  184. gridRowCnt = Math.floor((b - c) / a); // 그리드에 들어갈 갯수 연산
  185. btn_sea.dispatch("onclick");
  186. //btn_autoexec.dispatch("onclick");
  187. model.refresh();
  188. }
  189. /****************************************************************************************
  190. * Components :
  191. * Components ID : btn_autoexec
  192. * Event : onclick
  193. * Argument : 01.obj : Object Event has occurred
  194. * : 02.e : Event Object
  195. * Description :
  196. ****************************************************************************************/
  197. function btn_autoexec_onclick(obj:Button, e:ClickEventInfo)
  198. {
  199. var autoalertyn = model.getValue("/root/send/autoalertyn");
  200. if (autoalertyn == "Y") {
  201. btn_autoexec.value = "알림중지";
  202. model.setValue("/root/send/autoalertyn","N");
  203. //clockTimer = window.setInterval("fAutoAlert()", 30000); //30초
  204. clockTimer = window.setInterval("fAutoAlert()", 10000); //30초
  205. //clockTimer2 = window.setInterval("fGridViewControl()", 10000); //메인,서브 그리드 변환 5초
  206. } else {
  207. btn_autoexec.value = "자동알림";
  208. model.setValue("/root/send/autoalertyn","Y");
  209. if (clockTimer != null) {
  210. window.clearInterval(clockTimer);
  211. //window.clearInterval(clockTimer2);
  212. }
  213. }
  214. model.refresh();
  215. }
  216. /****************************************************************************************
  217. * Components :
  218. * Components ID : btn_sea
  219. * Event : onclick
  220. * Argument : 01.obj : Object Event has occurred
  221. * : 02.e : Event Object
  222. * Description :
  223. ****************************************************************************************/
  224. function btn_sea_onclick(obj:Button, e:ClickEventInfo)
  225. {
  226. // 전광판 환자 리스트 조회 + 페이지 넘김 이창기
  227. model.setValue("/root/send/acptdd",getCurrentDate()); //접수일자, 오늘기준 조회
  228. submit("TRAEA01900",false);
  229. grd_display1.caption = model.getValue("/root/main/maindata/dispnmlist["+ 1 +"]/dispnm");
  230. grd_display2.caption = model.getValue("/root/main/maindata/dispnmlist["+ 2 +"]/dispnm");
  231. grd_display3.caption = model.getValue("/root/main/maindata/dispnmlist["+ 3 +"]/dispnm");
  232. grd_display4.caption = model.getValue("/root/main/maindata/dispnmlist["+ 4 +"]/dispnm");
  233. /* 그리드 변환
  234. for(var i = 1 ; i <= 7 ; i++){ // 서브 그리드 초기화
  235. model.removeNodeset("/root/main/subdisplay/subdisplay1["+ i +"]");
  236. model.removeNodeset("/root/main/subdisplay/subdisplay2["+ i +"]");
  237. model.removeNodeset("/root/main/subdisplay/subdisplay3["+ i +"]");
  238. model.removeNodeset("/root/main/subdisplay/subdisplay4["+ i +"]");
  239. }
  240. var gLength = 0; // 각 인스턴스의 길이 (대기,검사,회복)
  241. var sCnt = gridRowCnt+1;
  242. for(var j = 1; j <= 4 ; j++){ //메인 그리드
  243. gLength = model.instances(0).selectNodes( "/root/main/maindata/display"+j).length; // j 1 : 대기 , 2 : 회복 , 3 : 대기 인스턴스 size
  244. if(gLength > gridRowCnt){ // 그리드를 넘길경우 (스크룰이 생길경우)
  245. for(var k = sCnt ; k <= gLength ; k++){
  246. model.makeNode("/root/main/subdisplay/subdisplay"+ j +"["+ (k - gridRowCnt) +"]"); // 서브 인스턴스 노드 생성
  247. model.copyNode("/root/main/subdisplay/subdisplay"+ j +"["+ (k - gridRowCnt) +"]","/root/main/maindata/display"+ j +"["+ sCnt +"]"); // 서브 인스턴스 복사 (3번줄에서 인스턴스를 삭제 -> sCnt 유지)
  248. model.removeNodeset("/root/main/maindata/display"+ j +"["+ sCnt +"]"); // 메인 인스턴스 삭제
  249. }
  250. sGrid_check[j-1] = "Y"; // 서브 인스턴스 유무 체크
  251. }else{
  252. sGrid_check[j-1] = "N";
  253. }
  254. }
  255. */
  256. model.refresh();
  257. }
  258. ]]></Script>
  259. </Form>
  260. </FDL>