SPAHA04410_판정이미지관리.xrw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>판정이미지</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <imagelst>
  11. <item>
  12. <filenm/>
  13. <filepath/>
  14. <healexamflag/>
  15. <rsrvdd/>
  16. <rsrvno/>
  17. </item>
  18. </imagelst>
  19. <image>
  20. <attachfile>
  21. <image/>
  22. </attachfile>
  23. </image>
  24. </main>
  25. <send>
  26. <healexamflag/>
  27. <healexamdetlflag/>
  28. <rsrvdd/>
  29. <rsrvno/>
  30. <pid/>
  31. <orddd/>
  32. <cretno/>
  33. <pkgcd/>
  34. <image>
  35. <file/>
  36. </image>
  37. <savedata/>
  38. <filepath/>
  39. </send>
  40. <delsend>
  41. <rtno/>
  42. <filepath/>
  43. <seq/>
  44. <ckno/>
  45. <cknoseq/>
  46. <trseq/>
  47. <imgseq/>
  48. <rttmd/>
  49. <appgb/>
  50. <m/>
  51. </delsend>
  52. <init>
  53. <send/>
  54. </init>
  55. <hidden>
  56. <dflag>N</dflag>
  57. </hidden>
  58. <imgsend>
  59. <filepath/>
  60. </imgsend>
  61. </root>
  62. </instance>
  63. <script type="javascript" ev:event="xforms-model-construct">
  64. <![CDATA[
  65. ]]>
  66. </script>
  67. <submission id="TRAHA04415" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/imagelst"/>
  68. <submission id="TRAHA04416" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/image"/>
  69. <submission id="TXAHA04413" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/hidden/temp"/>
  70. <submission id="TXAHA04414" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/hidden/temp"/>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. fInitialize();
  74. ]]>
  75. </script>
  76. </model>
  77. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  80. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  81. <script type="javascript">
  82. <![CDATA[
  83. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  84. function fInitialize() {
  85. btn_addfile.disabled = true;
  86. btn_upload.disabled = true;
  87. btn_del.disabled = true;
  88. btn_down.disabled = true;
  89. if(checkOpener()) {
  90. var rsrvdd = model.getValue("/root/init/send/rsrvdd");
  91. var rsrvno = model.getValue("/root/init/send/rsrvno");
  92. if(rsrvdd != "" && rsrvno != "") {
  93. model.setValue("/root/send/healexamflag" , model.getValue("/root/init/send/healexamflag"));
  94. model.setValue("/root/send/healexamdetlflag" , model.getValue("/root/init/send/healexamdetlflag"));
  95. model.setValue("/root/send/rsrvdd" , rsrvdd);
  96. model.setValue("/root/send/rsrvno" , rsrvno);
  97. model.setValue("/root/send/pid" , model.getValue("/root/init/send/pid"));
  98. model.setValue("/root/send/orddd" , model.getValue("/root/init/send/orddd"));
  99. model.setValue("/root/send/cretno" , model.getValue("/root/init/send/cretno"));
  100. model.setValue("/root/send/pkgcd" , model.getValue("/root/init/send/pkgcd"));
  101. btn_addfile.disabled = false;
  102. btn_upload.disabled = false;
  103. btn_del.disabled = false;
  104. btn_down.disabled = false;
  105. submit("TRAHA04415");
  106. }else {
  107. btn_addfile.disabled = true;
  108. btn_upload.disabled = true;
  109. btn_del.disabled = true;
  110. btn_down.disabled = true;
  111. }
  112. model.removeNodeset(grd_addiamge.nodeset);
  113. grd_addiamge.refresh();
  114. }
  115. }
  116. var cnj_img_view = null;
  117. ]]>
  118. </script>
  119. </xhtml:head>
  120. <xhtml:body pagewidth="1200" pageheight="750" guideline="1,1175;1,1175;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  121. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1180px; height:735px; ">
  122. <line id="line8" class="line_1" style="x1:0px; y1:42px; x2:1165px; y2:43px; "/>
  123. <caption id="caption20" class="tit_2" style="left:6px; top:27px; width:118px; height:14px; ">사진 목록</caption>
  124. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:217px; height:14px; vertical-align:middle; ">판정이미지 관리</caption>
  125. <button id="btn_upload" class="btn5_letter4" style="left:290px; top:390px; width:64px; height:19px; ">
  126. <caption>업로드</caption>
  127. <script type="javascript" ev:event="DOMActivate">
  128. <![CDATA[
  129. if (grd_addiamge.rows == 1)
  130. {
  131. messageBox("업로드될 파일이", "I004");
  132. return false;
  133. }
  134. if (submit("TXAHA04413")) {
  135. submit("TRAHA04415");
  136. model.removeNodeset(grd_addiamge.nodeset);
  137. grd_addiamge.refresh();
  138. }
  139. ]]>
  140. </script>
  141. </button>
  142. <button id="btn_addfile" class="btn2_letter4" style="left:215px; top:390px; width:64px; height:19px; ">
  143. <caption>파일추가</caption>
  144. <script type="javascript" ev:event="DOMActivate">
  145. <![CDATA[
  146. var maxsize = upload1.attribute("filesize");
  147. files = window.fileDialog("open", "|", true);
  148. filelist = files.split("|");
  149. for(var i = 0 ; i < filelist.length ; i++ ) {
  150. var file = filelist[i];
  151. if(file != "") {
  152. grd_addiamge.addRow(false);
  153. grd_addiamge.valueMatrix(grd_addiamge.rows - 1, 0) = file;
  154. if (!checkFileSize(upload1)){
  155. grd_addiamge.removeItem();
  156. messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  157. }
  158. }
  159. }
  160. ]]>
  161. </script>
  162. </button>
  163. <datagrid id="grd_attachfile" nodeset="/root/main/imagelst/item" visibility="visible" caption="첨부파일명^서버저장경로^건진구분^예약일자^예약번호" colwidth="307, 100, 100, 100, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" style="left:0px; top:47px; width:350px; height:333px; ">
  164. <col ref="filenm"/>
  165. <col ref="filepath" visibility="hidden"/>
  166. <col ref="healexamflag" visibility="hidden"/>
  167. <col ref="rsrvdd" visibility="hidden"/>
  168. <col ref="rsrvno" visibility="hidden"/>
  169. <script type="javascript" ev:event="onclick">
  170. <![CDATA[
  171. if (isDataCell()) {
  172. var idx = grd_attachfile.row;
  173. if(idx == 0) return false;
  174. var filepath = grd_attachfile.valueMatrix( idx , grd_attachfile.colRef("filepath"));
  175. model.setValue("/root/send/filepath", filepath);
  176. submit("TRAHA04416");
  177. setImageRefInstance("/root/main/image/attachfile/image");
  178. model.refresh();
  179. img1.initStyle("height");
  180. img1.initStyle("width");
  181. if(img1.currentStyle.width > 800)
  182. {
  183. var imgWidth = img1.currentStyle.width;
  184. var imgHeight = img1.currentStyle.height;
  185. var imgRate = 800 / imgWidth;
  186. img1.attribute("width") = 800;
  187. img1.attribute("height") = imgHeight * imgRate;
  188. }
  189. if(img1.currentStyle.height > 700)
  190. {
  191. var imgWidth = img1.currentStyle.width;
  192. var imgHeight = img1.currentStyle.height;
  193. var imgRate = 700 / imgHeight;
  194. img1.attribute("width") = imgWidth / imgRate;
  195. img1.attribute("height") = 700;
  196. }
  197. img1.refresh();
  198. }
  199. ]]>
  200. </script>
  201. </datagrid>
  202. <upload id="upload1" nodeset="/root/send/image/file" ext="zip" filecount="5" filesize="5242880" validate="true" style="left:115px; top:380px; width:100px; height:20px; "/>
  203. <datagrid id="grd_addiamge" nodeset="/root/send/image" caption="파일경로^" colwidth="644" extendlastcol="scroll" mergecellsfixedrows="bycolrec" style="left:0px; top:410px; width:355px; height:150px; ">
  204. <col ref="file"/>
  205. </datagrid>
  206. <button id="btn_del" class="btn5_letter3" style="left:295px; top:20px; width:53px; height:19px; ">
  207. <caption>삭제</caption>
  208. <script type="javascript" ev:event="DOMActivate">
  209. <![CDATA[
  210. if ( (grd_attachfile.row < grd_attachfile.fixedRows) ) {
  211. return false;
  212. }
  213. if ( messageBox("선택된 파일을 ","Q001") != 6 )
  214. {
  215. return false;
  216. }
  217. grd_attachfile.clearStatus()
  218. for(var i = 0 ; i < grd_attachfile.selectedRows; i++)
  219. {
  220. var cur_row = grd_attachfile.selectedRow(i);
  221. grd_attachfile.rowStatus(cur_row) = 4;
  222. }
  223. model.setValue("/root/send/savedata", grd_attachfile.getUpdateData());
  224. if( messageBox("이미지를 ", "Q001") !=6) return ;
  225. if(submit("TXAHA04414")) {
  226. submit("TRAHA04415");
  227. }
  228. ]]>
  229. </script>
  230. </button>
  231. <img id="img1" ref="/root/main/image/attachfile/image" style="left:360px; top:50px; background-stretch:stretch; border-color:#B0B0B0; border-style:solid; ">
  232. <script type="javascript" ev:event="onclick">
  233. <![CDATA[
  234. // 파라미터를 이용한 방법 첫번째
  235. // setParameter("opener_parameter_id", model.getValue("/root/image/attachfile/image"));
  236. // modal("SPAEA02603", "0", "900", "900", "SPAEA02603","","");
  237. // 파라미터 두번째 방법
  238. var image = model.getValue("/root/image/attachfile/image");
  239. var printyn = "N";
  240. var sendimage = (image + "▦" + printyn);
  241. setParameter("opener_parameter_id", sendimage);
  242. modal("SPAEA02603", "0", "0", "0", "SPAEA02603","","");
  243. ]]>
  244. </script>
  245. </img>
  246. <button id="btn_down" class="btn2_letter4" style="left:1100px; top:20px; width:64px; height:19px; ">
  247. <caption>파일저장</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. if(model.getValue("/root/main/image/attachfile/image") != "")
  251. {
  252. var idx = grd_attachfile.row;
  253. var filepath = grd_attachfile.valueMatrix(idx , grd_attachfile.colRef("filepath"));
  254. var filenm = grd_attachfile.valueMatrix(idx , grd_attachfile.colRef("filenm"));
  255. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  256. if (localfile != "") {
  257. model.download(getActionURL("TRAHA04417")+"&filepath="+filepath,localfile);
  258. var rtn = messageBox("파일을", "Q004");
  259. if( rtn == 6 ) {
  260. window.exec(localfile);
  261. }
  262. }
  263. }
  264. ]]>
  265. </script>
  266. </button>
  267. </group>
  268. </xhtml:body>
  269. </xhtml:html>