SPZUR00100.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // setting infomation
  2. var gvMainReportInfos = null;
  3. var gvSubReportInfos = null;
  4. var gvReportName = null;
  5. var gvReportDataType = null;
  6. var gvReportUserService = null;
  7. var gvReportDataXPath = null;
  8. var gvReportXPath = null;
  9. var gvReportData = null;
  10. var gvReportSubmitId = null;
  11. // use define
  12. var gvSubreportData = "once"; // once or each
  13. var gvReportParamShare = "share"; // share or each
  14. var gvReportParamMatch = "name"; // index or name
  15. var rex_gsCsvSeparatorDataset = "|@|";
  16. var rex_gsCsvSeparatorColumn = "|*|";
  17. var rex_gsCsvSeparatorRow = "";
  18. //var gvRexpertServiceRootURL = "http://160.1.17.111:9901" + "/RexServer/";
  19. var gvRexpertServerRootURL = getDomain() + "/RexServer/";
  20. var gvRexpertServiceURL = gvRexpertServerRootURL + "RexService.jsp?rid=";
  21. var gvRexpertCreatorURL = gvRexpertServerRootURL + "RexCreator.jsp?sid=";
  22. function initRexpertDictionay() {
  23. return new setRexpertDictionay();
  24. }
  25. // javascript hashmap
  26. function setRexpertDictionay() {
  27. this.nodeObject = new Object();
  28. this.add = addRexpertDictionay;
  29. this.get = getRexpertDictionay;
  30. this.keys = getRexpertDictionays;
  31. this.del = delRexpertDictionay;
  32. this.Init = null;
  33. this.CallBack = null;
  34. this.length = 0;
  35. }
  36. function addRexpertDictionay(key, value)
  37. {
  38. obj = this.nodeObject;
  39. searchFlag = 0;
  40. for(var n in obj) {
  41. if(n == key) {
  42. obj[key] = value;
  43. searchFlag = 1;
  44. }
  45. }
  46. if(searchFlag == 0) {
  47. this.length++;
  48. obj[key] = value;
  49. }
  50. }
  51. function getRexpertDictionay(key) {
  52. obj = this.nodeObject;
  53. return obj[key];
  54. }
  55. function getRexpertDictionays(){
  56. return this.nodeObject;
  57. }
  58. function delRexpertDictionay(key) {
  59. this.add(key, null);
  60. }
  61. /**
  62. * @---------------------------------------------------
  63. * @desc : 값이 없는지 체크
  64. * @param : 체크할 문자열
  65. * @return : true or false
  66. * @---------------------------------------------------
  67. */
  68. function isNull(str){
  69. return ((str == null || str == "" || str == "undefined") ? true:false);
  70. }
  71. function getReportURL(rid,syscd) {
  72. return getDomain(syscd)+getReportURI(rid);
  73. }
  74. function getReportURI(rid) {
  75. return "/himed/webapps/com/commonweb/rex/"+rid+".rex";
  76. }
  77. function addReportParameter() {
  78. var sColSep = "=";
  79. var sRowSep = "&";
  80. var paramStr = "";
  81. var i = 0;
  82. var node = opener.instance1.selectSingleNode(gvReportParamsPath);
  83. if (node != null)
  84. {
  85. var nodeList = node.childNodes;
  86. var nodeCnt = nodeList.length;
  87. if( nodeCnt > 0 ){
  88. paramStr = sRowSep;
  89. for( i = 0; i < nodeCnt - 1; i++) {
  90. paramStr += nodeList.item(i).nodeName + sColSep;
  91. paramStr += nodeList.item(i).text + sRowSep;
  92. }
  93. paramStr += nodeList.item(i).nodeName + sColSep;
  94. paramStr += nodeList.item(i).text;
  95. }
  96. }
  97. return paramStr;
  98. }
  99. function checkSaveAsFileType(fileType){
  100. return ((fileType == "xls" || fileType == "pdf" || fileType == "hml" || fileType == "rtf" || fileType == "html" || fileType == "bmp" || fileType == "txt" || fileType == "xml") ? true:false);
  101. }