123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>통계차트조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <griddata/>
- </main>
- <send>
- <in_chartkind/>
- <in_fromdd/>
- <in_todd/>
- <in_weekcd/>
- <in_sumkind/>
- </send>
- <init>
- <chart/>
- </init>
- <hidden>
- <instviewtype/>
- <graphtype/>
- <big/>
- <rowselect/>
- <graphtitle/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
-
- ]]>
- </script>
- <submission id="TRSTP03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/chartdata"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
- <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tchartHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fInitialize() {
-
- var gScrParmR = getScreenMenuParameter().substr(6,7);
- var selectrow = parseInt(model.getValue("root/init/chart/info/chartselect"));
- cmbsumkind.value = model.getValue("root/init/chart/info/sumkind");
- // model.setValue("root/send/in_sumkind",model.getValue("root/init/chart/info/sumkind"));
-
- if(model.getValue("root/init/chart/info/sumkind") == "01")
- {
- ipt_fromdd.attribute("format") = "yyyy-mm-dd";
- ipt_todd.attribute("format") = "yyyy-mm-dd";
- }
- else if(model.getValue("root/init/chart/info/sumkind") == "02")
- {
- ipt_fromdd.attribute("format") = "yyyy-mm";
- ipt_todd.attribute("format") = "yyyy-mm";
- }
- else if(model.getValue("root/init/chart/info/sumkind") == "03")
- {
- ipt_fromdd.attribute("format") = "yyyy";
- ipt_todd.attribute("format") = "yyyy";
- }
-
- model.setValue("root/send/in_fromdd",model.getValue("root/init/chart/info/in_fromdd"));
- model.setValue("root/send/in_todd",model.getValue("root/init/chart/info/in_todd"));
- cmbchartkind.select(selectrow - 1);
- if(model.getValue("root/init/chart/info/gbweek") == "외래")
- {
- lblweek.visible = true;
- cmbweek.visible = true;
- cmbweek.value = "01";
- }
-
- TChart1.Aspect.View3D = 0;
- TChart1.Panel.Color = window.rgb(255,255,255);
-
- //model.setValue("/root/send/in_yyyy",in_fromdd.substr(0,6));
- model.setValue("/root/hidden/graphtype",0);
-
- model.refresh();
- chartview();
-
-
- }
-
- function chartview()
- {
- model.resetInstanceNode("/root/main/chartdata");
-
-
- submit("TRSTP03001");
-
- if ( instance1.selectNodes("root/main/griddata/chartlist").length > 0)
- {
- var Colcnt = grdChart.cols;
-
- for (var i= 1; i<= Colcnt-1; i++)
- {
- grdChart.col = 1;
- grdChart.removeColumn(false);
- model.removeNodeset("root/main/griddata/chartlist");
- }
- }
-
- grdChart.caption = "항목";
- grdChart.colWidth(0) = "80";
- model.makeNode("root/main/griddata/chartlist/colheader");
- model.setValue("root/main/griddata/chartlist/colheader",model.getValue("root/main/chartdata/ret[1]/col1"));
-
- var min = 0;
- var max = 0;
- var colValue = 0;
-
- for(var i = 1; i<= instance1.selectNodes("root/main/chartdata/ret").length;i++)
- {
- grdChart.addColumn("ref:col" + i ,false);
-
- grdChart.caption += "^" + model.getValue("root/main/chartdata/ret[" + i + "]/enddd")
- grdChart.colWidth(i) = 80;
- grdChart.cellFormat(1,i) = "#,###";
- model.makeNode("root/main/griddata/chartlist/col" + i );
- model.setValue("root/main/griddata/chartlist/col" + i , model.getValue("root/main/chartdata/ret[" + i + "]/col2"));
-
- colValue = eval(model.getValue("root/main/chartdata/ret[" + i + "]/col2"));
- if (i == 1){
- min = colValue;
- }
- min = colValue < min ? colValue : min;
- max = colValue > max ? colValue : max;
- }
- min = Math.round(min * 0.8);
- max = Math.round(max * 1.1);
-
-
- model.refresh();
-
- var style = cmb_graph.value;
- var graphtitle = cmbchartkind.label;
-
-
-
- //drawLineWithMark(TChart1, grdChart, 1, graphtitle+ "(전체)" , true);
- drawbyRow(TChart1, grdChart, style, 1, graphtitle , true,true,true,max,min);
-
- /*
- if (style ==91)
- {
- drawbyCol(TChart1, grdChart, 1, 11, 2, graphtitle , true,true,true);
- drawbyCol(TChart1, grdChart, 0, 12, 2, graphtitle , false,true,true);
- }
- else
- {
- drawbyCol(TChart1, grdChart, style, 12, 2, graphtitle , true,true,true);
- drawbyCol(TChart1, grdChart, style, 11, 2, graphtitle , false,true,true);
- //drawBar(TChart1, grdPatRate, "col12", stryyyymm + graphtitle);
- //drawbyCol(TChart1, grdPatRate, style, 11, 2, stryyyymm + graphtitle , false,true,true);
- }
- */
- if(cmbsumkind.value == "01")
- {
- if (eval(getDateInterval(ipt_fromdd.value , ipt_todd.value,"dd")) > 20)
- {
- TChart1.Axis.Bottom.Labels.Angle = 270; //90도 돌려서 라벨 표시
- }
- }
-
- //}
-
-
- //선형 그래프
- //var gridBottomRow = grdOutFPatRate.Rows - 1 ;
- //caption1.text = gridBottomRow;
- //drawLine(TChart1, grdOutFPatRate, gridBottomRow, "외래신환율 (단위 : %)", true);
- //TChart1.ExchangeSeries( 0, 1);
- model.refresh();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:95px; width:189px; height:13px; "/>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <shape id="roundrect8" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:25px; width:1195px; height:75px; "/>
- <line id="line11" class="line_1" style="x1:4px; y1:15px; x2:1194px; y2:15px; "/>
- <button id="btn_execute" class="btn4_letter2" navindex="3" style="left:1130px; top:40px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- chartview();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_1" style="x1:0px; y1:110px; x2:1195px; y2:111px; "/>
- <caption id="caption1" class="search_name" visibility="visible" style="left:10px; top:75px; width:115px; height:17px; ">그래프 형태</caption>
- <select1 id="cmb_graph" ref="root/hidden/graphtype" class="combo_search" visibility="visible" appearance="minimal" style="left:115px; top:75px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>선형</label>
- <value>0</value>
- </item>
- <item>
- <label>막대형</label>
- <value>1</value>
- </item>
- <item>
- <label>영역형</label>
- <value>3</value>
- </item>
- <item>
- <label>포인트형</label>
- <value>4</value>
- </item>
- </choices>
- </select1>
- <group id="group2" style="left:5px; top:120px; width:1195px; height:620px; ">
- <object id="TChart1" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" ShowHint="true" style="left:5px; top:10px; width:1185px; height:596px; cursor:auto; "/>
- </group>
- <caption id="caption21" class="search_name" style="left:365px; top:40px; width:86px; height:17px; ">조회기간 :</caption>
- <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; "/>
- <caption id="caption2" visibility="hidden" style="left:554px; top:44px; width:25px; height:15px; ">~</caption>
- <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; "/>
- <caption id="cpchartkind" class="search_name" visibility="visible" style="left:11px; top:41px; width:90px; height:17px; ">통계종류</caption>
- <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; ">
- <choices>
- <itemset nodeset="/root/init/chart">
- <label ref="chartkind"/>
- <value ref="chartkind"/>
- </itemset>
- </choices>
- </select1>
- <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; ">
- <choices>
- <item>
- <label>토요일(0.5)제외</label>
- <value>01</value>
- </item>
- <item>
- <label>토요일(0.5)포함</label>
- <value>02</value>
- </item>
- </choices>
- </select1>
- <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; ">
- <col ref="colheader"/>
- </datagrid>
- <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>
- <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>
- <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; ">
- <choices>
- <item>
- <label>일보</label>
- <value>01</value>
- </item>
- <item>
- <label>월보</label>
- <value>02</value>
- </item>
- <item>
- <label>연보</label>
- <value>03</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(cmbsumkind.value == "01")
- {
- ipt_fromdd.attribute("format") = "yyyy-mm-dd";
- ipt_todd.attribute("format") = "yyyy-mm-dd";
-
- model.setValue("root/send/in_todd",getCurrentDate());
- model.setValue("root/send/in_fromdd",model.getValue("root/send/in_todd").substr(0,6) + "01");
- }
- else if(cmbsumkind.value== "02")
- {
- ipt_fromdd.attribute("format") = "yyyy-mm";
- ipt_todd.attribute("format") = "yyyy-mm";
- model.setValue("root/send/in_fromdd",model.getValue("root/send/in_todd").substr(0,4) + "01");
- }
- else if(cmbsumkind.value == "03")
- {
- ipt_fromdd.attribute("format") = "yyyy";
- ipt_todd.attribute("format") = "yyyy";
- model.setValue("root/send/in_fromdd",'2011');
- }
- model.refresh();
- ]]>
- </script>
- </select1>
- </xhtml:body>
- </xhtml:html>
|