SPSTP03001_통계차트.xrw 12 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. <griddata/>
  11. </main>
  12. <send>
  13. <in_chartkind/>
  14. <in_fromdd/>
  15. <in_todd/>
  16. <in_weekcd/>
  17. <in_sumkind/>
  18. </send>
  19. <init>
  20. <chart/>
  21. </init>
  22. <hidden>
  23. <instviewtype/>
  24. <graphtype/>
  25. <big/>
  26. <rowselect/>
  27. <graphtitle/>
  28. </hidden>
  29. </root>
  30. </instance>
  31. <script type="javascript" ev:event="xforms-ready">
  32. <![CDATA[
  33. fInitialize();
  34. ]]>
  35. </script>
  36. <submission id="TRSTP03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/chartdata"/>
  37. </model>
  38. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  39. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  42. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  43. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  44. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/tchartHelper.js"/>
  46. <script type="javascript">
  47. <![CDATA[
  48. function fInitialize() {
  49. var gScrParmR = getScreenMenuParameter().substr(6,7);
  50. var selectrow = parseInt(model.getValue("root/init/chart/info/chartselect"));
  51. cmbsumkind.value = model.getValue("root/init/chart/info/sumkind");
  52. // model.setValue("root/send/in_sumkind",model.getValue("root/init/chart/info/sumkind"));
  53. if(model.getValue("root/init/chart/info/sumkind") == "01")
  54. {
  55. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  56. ipt_todd.attribute("format") = "yyyy-mm-dd";
  57. }
  58. else if(model.getValue("root/init/chart/info/sumkind") == "02")
  59. {
  60. ipt_fromdd.attribute("format") = "yyyy-mm";
  61. ipt_todd.attribute("format") = "yyyy-mm";
  62. }
  63. else if(model.getValue("root/init/chart/info/sumkind") == "03")
  64. {
  65. ipt_fromdd.attribute("format") = "yyyy";
  66. ipt_todd.attribute("format") = "yyyy";
  67. }
  68. model.setValue("root/send/in_fromdd",model.getValue("root/init/chart/info/in_fromdd"));
  69. model.setValue("root/send/in_todd",model.getValue("root/init/chart/info/in_todd"));
  70. cmbchartkind.select(selectrow - 1);
  71. if(model.getValue("root/init/chart/info/gbweek") == "외래")
  72. {
  73. lblweek.visible = true;
  74. cmbweek.visible = true;
  75. cmbweek.value = "01";
  76. }
  77. TChart1.Aspect.View3D = 0;
  78. TChart1.Panel.Color = window.rgb(255,255,255);
  79. //model.setValue("/root/send/in_yyyy",in_fromdd.substr(0,6));
  80. model.setValue("/root/hidden/graphtype",0);
  81. model.refresh();
  82. chartview();
  83. }
  84. function chartview()
  85. {
  86. model.resetInstanceNode("/root/main/chartdata");
  87. submit("TRSTP03001");
  88. if ( instance1.selectNodes("root/main/griddata/chartlist").length > 0)
  89. {
  90. var Colcnt = grdChart.cols;
  91. for (var i= 1; i<= Colcnt-1; i++)
  92. {
  93. grdChart.col = 1;
  94. grdChart.removeColumn(false);
  95. model.removeNodeset("root/main/griddata/chartlist");
  96. }
  97. }
  98. grdChart.caption = "항목";
  99. grdChart.colWidth(0) = "80";
  100. model.makeNode("root/main/griddata/chartlist/colheader");
  101. model.setValue("root/main/griddata/chartlist/colheader",model.getValue("root/main/chartdata/ret[1]/col1"));
  102. var min = 0;
  103. var max = 0;
  104. var colValue = 0;
  105. for(var i = 1; i<= instance1.selectNodes("root/main/chartdata/ret").length;i++)
  106. {
  107. grdChart.addColumn("ref:col" + i ,false);
  108. grdChart.caption += "^" + model.getValue("root/main/chartdata/ret[" + i + "]/enddd")
  109. grdChart.colWidth(i) = 80;
  110. grdChart.cellFormat(1,i) = "#,###";
  111. model.makeNode("root/main/griddata/chartlist/col" + i );
  112. model.setValue("root/main/griddata/chartlist/col" + i , model.getValue("root/main/chartdata/ret[" + i + "]/col2"));
  113. colValue = eval(model.getValue("root/main/chartdata/ret[" + i + "]/col2"));
  114. if (i == 1){
  115. min = colValue;
  116. }
  117. min = colValue < min ? colValue : min;
  118. max = colValue > max ? colValue : max;
  119. }
  120. min = Math.round(min * 0.8);
  121. max = Math.round(max * 1.1);
  122. model.refresh();
  123. var style = cmb_graph.value;
  124. var graphtitle = cmbchartkind.label;
  125. //drawLineWithMark(TChart1, grdChart, 1, graphtitle+ "(전체)" , true);
  126. drawbyRow(TChart1, grdChart, style, 1, graphtitle , true,true,true,max,min);
  127. /*
  128. if (style ==91)
  129. {
  130. drawbyCol(TChart1, grdChart, 1, 11, 2, graphtitle , true,true,true);
  131. drawbyCol(TChart1, grdChart, 0, 12, 2, graphtitle , false,true,true);
  132. }
  133. else
  134. {
  135. drawbyCol(TChart1, grdChart, style, 12, 2, graphtitle , true,true,true);
  136. drawbyCol(TChart1, grdChart, style, 11, 2, graphtitle , false,true,true);
  137. //drawBar(TChart1, grdPatRate, "col12", stryyyymm + graphtitle);
  138. //drawbyCol(TChart1, grdPatRate, style, 11, 2, stryyyymm + graphtitle , false,true,true);
  139. }
  140. */
  141. if(cmbsumkind.value == "01")
  142. {
  143. if (eval(getDateInterval(ipt_fromdd.value , ipt_todd.value,"dd")) > 20)
  144. {
  145. TChart1.Axis.Bottom.Labels.Angle = 270; //90도 돌려서 라벨 표시
  146. }
  147. }
  148. //}
  149. //선형 그래프
  150. //var gridBottomRow = grdOutFPatRate.Rows - 1 ;
  151. //caption1.text = gridBottomRow;
  152. //drawLine(TChart1, grdOutFPatRate, gridBottomRow, "외래신환율 (단위 : %)", true);
  153. //TChart1.ExchangeSeries( 0, 1);
  154. model.refresh();
  155. }
  156. ]]>
  157. </script>
  158. </xhtml:head>
  159. <xhtml:body>
  160. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  161. <caption id="caption6" class="tit_1" style="left:0px; top:95px; width:189px; height:13px; "/>
  162. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  163. </group>
  164. <shape id="roundrect8" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:25px; width:1195px; height:75px; "/>
  165. <line id="line11" class="line_1" style="x1:4px; y1:15px; x2:1194px; y2:15px; "/>
  166. <button id="btn_execute" class="btn4_letter2" navindex="3" style="left:1130px; top:40px; width:56px; height:22px; ">
  167. <caption>조회</caption>
  168. <script type="javascript" ev:event="DOMActivate">
  169. <![CDATA[
  170. chartview();
  171. ]]>
  172. </script>
  173. </button>
  174. <line id="line1" class="line_1" style="x1:0px; y1:110px; x2:1195px; y2:111px; "/>
  175. <caption id="caption1" class="search_name" visibility="visible" style="left:10px; top:75px; width:115px; height:17px; ">그래프 형태</caption>
  176. <select1 id="cmb_graph" ref="root/hidden/graphtype" class="combo_search" visibility="visible" appearance="minimal" style="left:115px; top:75px; width:120px; height:19px; ">
  177. <choices>
  178. <item>
  179. <label>선형</label>
  180. <value>0</value>
  181. </item>
  182. <item>
  183. <label>막대형</label>
  184. <value>1</value>
  185. </item>
  186. <item>
  187. <label>영역형</label>
  188. <value>3</value>
  189. </item>
  190. <item>
  191. <label>포인트형</label>
  192. <value>4</value>
  193. </item>
  194. </choices>
  195. </select1>
  196. <group id="group2" style="left:5px; top:120px; width:1195px; height:620px; ">
  197. <object id="TChart1" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" ShowHint="true" style="left:5px; top:10px; width:1185px; height:596px; cursor:auto; "/>
  198. </group>
  199. <caption id="caption21" class="search_name" style="left:365px; top:40px; width:86px; height:17px; ">조회기간 :</caption>
  200. <input id="ipt_todd" ref="/root/send/in_todd" class="input_search" navindex="1" visibility="visible" inputtype="date" format="yyyy-mm-dd" style="left:572px; top:41px; width:83px; height:19px; text-align:center; vertical-align:middle; "/>
  201. <caption id="caption2" visibility="hidden" style="left:554px; top:44px; width:25px; height:15px; ">~</caption>
  202. <input id="ipt_fromdd" ref="/root/send/in_fromdd" class="input_search" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:460px; top:41px; width:85px; height:19px; text-align:center; vertical-align:middle; "/>
  203. <caption id="cpchartkind" class="search_name" visibility="visible" style="left:11px; top:41px; width:90px; height:17px; ">통계종류</caption>
  204. <select1 id="cmbchartkind" ref="/root/send/in_chartkind" class="combo_search" navindex="1" visibility="visible" appearance="minimal" editmode="search" itemcount="20" style="left:116px; top:40px; width:239px; height:19px; ">
  205. <choices>
  206. <itemset nodeset="/root/init/chart">
  207. <label ref="chartkind"/>
  208. <value ref="chartkind"/>
  209. </itemset>
  210. </choices>
  211. </select1>
  212. <select1 id="cmbweek" ref="/root/send/in_weekcd" class="combo_search" navindex="1" visibility="hidden" appearance="minimal" editmode="search" itemcount="20" style="left:1005px; top:41px; width:110px; height:19px; ">
  213. <choices>
  214. <item>
  215. <label>토요일(0.5)제외</label>
  216. <value>01</value>
  217. </item>
  218. <item>
  219. <label>토요일(0.5)포함</label>
  220. <value>02</value>
  221. </item>
  222. </choices>
  223. </select1>
  224. <datagrid id="grdChart" nodeset="/root/main/griddata/chartlist" class="grd_first" visibility="hidden" colsep="^" colwidth="80" explorerbar="sort" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:170px; top:705px; width:1020px; height:20px; ">
  225. <col ref="colheader"/>
  226. </datagrid>
  227. <caption id="lblweek" ref="/root/init/rptm_cond/cond4/condcd/mdlnm" class="search_name" visibility="hidden" style="left:910px; top:40px; width:90px; height:17px; ">진료일수</caption>
  228. <caption id="cp_text1_1" ref="/root/init/rptm_cond/cond1/condcd/mdlnm" class="search_name" visibility="visible" style="left:670px; top:40px; width:90px; height:17px; ">일보월보</caption>
  229. <select1 id="cmbsumkind" ref="/root/send/in_sumkind" class="combo_search" navindex="1" visibility="visible" appearance="minimal" editmode="search" itemcount="20" style="left:765px; top:40px; width:110px; height:19px; ">
  230. <choices>
  231. <item>
  232. <label>일보</label>
  233. <value>01</value>
  234. </item>
  235. <item>
  236. <label>월보</label>
  237. <value>02</value>
  238. </item>
  239. <item>
  240. <label>연보</label>
  241. <value>03</value>
  242. </item>
  243. </choices>
  244. <script type="javascript" ev:event="xforms-value-changed">
  245. <![CDATA[
  246. if(cmbsumkind.value == "01")
  247. {
  248. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  249. ipt_todd.attribute("format") = "yyyy-mm-dd";
  250. model.setValue("root/send/in_todd",getCurrentDate());
  251. model.setValue("root/send/in_fromdd",model.getValue("root/send/in_todd").substr(0,6) + "01");
  252. }
  253. else if(cmbsumkind.value== "02")
  254. {
  255. ipt_fromdd.attribute("format") = "yyyy-mm";
  256. ipt_todd.attribute("format") = "yyyy-mm";
  257. model.setValue("root/send/in_fromdd",model.getValue("root/send/in_todd").substr(0,4) + "01");
  258. }
  259. else if(cmbsumkind.value == "03")
  260. {
  261. ipt_fromdd.attribute("format") = "yyyy";
  262. ipt_todd.attribute("format") = "yyyy";
  263. model.setValue("root/send/in_fromdd",'2011');
  264. }
  265. model.refresh();
  266. ]]>
  267. </script>
  268. </select1>
  269. </xhtml:body>
  270. </xhtml:html>