d8f1b4629b3a8eb9db98503f2af55556c5c21497.svn-base 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  9. <title></title>
  10. <!--框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <!--进度条start-->
  19. <script type="text/javascript" src="<%=path%>/libs/js/other/progressbar.js"></script>
  20. <!--进度条end-->
  21. <!--引入弹窗组件start-->
  22. <script type="text/javascript" src="<%=path%>/libs/js/popup/drag.js"></script>
  23. <script type="text/javascript" src="<%=path%>/libs/js/popup/dialog.js"></script>
  24. <!--引入弹窗组件end-->
  25. </head>
  26. <body>
  27. <div class="box1" panelWidth="800">
  28. <fieldset>
  29. <legend>说明</legend>
  30. 如果后台要进行长时间处理,例如数据的导入导出等操作,前台可以使用该进度条。后台通过ajax方法实时发送真实进度情况。
  31. </fieldset>
  32. <div class="height_15"></div>
  33. <fieldset>
  34. <legend>1、固定位置</legend>
  35. <div id="pb1"></div><span id="pb1-label"></span>
  36. </fieldset>
  37. <div class="height_15"></div>
  38. <fieldset>
  39. <legend>2、模拟进度</legend>
  40. <div id="pb2"></div><span id="pb2-label"></span>
  41. </fieldset>
  42. <div class="height_15"></div>
  43. <fieldset>
  44. <legend>3、弹出进度窗口,并遮罩操作内容页面</legend>
  45. <input type="button" value="弹出进度" onclick="popWin()"/>
  46. </fieldset>
  47. <div class="height_15"></div>
  48. <fieldset>
  49. <legend>4、弹出进度窗口,可最小化</legend>
  50. <input type="button" value="弹出进度" onclick="popWin2()"/>
  51. </fieldset>
  52. <div class="height_15"></div>
  53. </div>
  54. </div>
  55. <!--窗口任务栏区域start-->
  56. <div id="dialogTask" class="dialogTaskBg" style="display:none;"></div>
  57. <!--窗口任务栏区域end-->
  58. <script>
  59. function initComplete(){
  60. var _progress;
  61. _progress = $("#pb1").progressCtrl({ skin: '<%=path%>/libs/images/loading/progress.png', width:300} ) ;
  62. setTimeout(function(){_progress.progressCtrl(50);}, 300);
  63. var _pbbar_pos = 0;
  64. var _progress2 ;
  65. _progress2 = $("#pb2").progressCtrl({ skin: '<%=path%>/libs/images/loading/progress.png', width:300} ) ;
  66. interval1= setInterval(function(){
  67. if (++_pbbar_pos > 100){
  68. _pbbar_pos = 0;
  69. clearInterval(interval1);
  70. return;
  71. }
  72. _progress2.progressCtrl(_pbbar_pos);
  73. }, 300);
  74. }
  75. var diag;
  76. var diag2;
  77. var interval1;
  78. var interval2;
  79. var interval3;
  80. var diagContentId=100;
  81. function popWin(){
  82. diag = new Dialog();
  83. diag.Title = "处理进度";
  84. diag.ID="c1";
  85. diag.Width=330;
  86. diag.Height=100;
  87. diag.ShowCloseButton=false;
  88. diag.show();
  89. var $container=$(document.getElementById("_Container_c1"));
  90. var $progress=$('<div class="padding_top20 padding_left10"></div>');
  91. diagContentId++;
  92. var $progressCon1=$('<div class="padding_bottom5">正在处理中,请不要关闭或切换其他页面。</div>');
  93. var $progressCon2=$('<div></div>');
  94. var $progressCon3=$('<span></span>');
  95. $progress.append($progressCon1);
  96. $progress.append($progressCon2);
  97. $progress.append($progressCon3);
  98. $progressCon2.attr("id",diagContentId);
  99. $progressCon3.attr("id", diagContentId+"-label");
  100. $container.append($progress);
  101. var _pbbar_pos = 0;
  102. var _progress = $progressCon2.progressCtrl({ skin: '<%=path%>/libs/images/loading/progress.png', width:300});
  103. interval2= setInterval(function(){
  104. if (++_pbbar_pos > 100){
  105. _pbbar_pos = 0;
  106. clearInterval(interval2);
  107. top.Dialog.alert("处理完成!");
  108. if(diag){
  109. diag.close();
  110. }
  111. return;
  112. }
  113. _progress.progressCtrl(_pbbar_pos);
  114. }, 100);
  115. }
  116. function popWin2(){
  117. diag2 = new Dialog();
  118. diag2.Title = "处理进度";
  119. diag2.ID="c2";
  120. diag2.Width=330;
  121. diag2.Height=100;
  122. diag2.ShowMinButton=true;
  123. diag2.MinToTask=true;
  124. diag2.ShowCloseButton=false;
  125. diag2.show();
  126. var $container=$(document.getElementById("_Container_c2"));
  127. var $progress=$('<div class="padding_top20 padding_left10"></div>');
  128. diagContentId++;
  129. var $progressCon1=$('<div class="padding_bottom5">正在处理中,可以最小化本窗口并继续操作其他内容。</div>');
  130. var $progressCon2=$('<div></div>');
  131. var $progressCon3=$('<span></span>');
  132. $progress.append($progressCon1);
  133. $progress.append($progressCon2);
  134. $progress.append($progressCon3);
  135. $progressCon2.attr("id",diagContentId);
  136. $progressCon3.attr("id", diagContentId+"-label");
  137. $container.append($progress);
  138. var _pbbar_pos = 0;
  139. var _progress = $progressCon2.progressCtrl({ skin: '<%=path%>/libs/images/loading/progress.png', width:300});
  140. interval3= setInterval(function(){
  141. if (++_pbbar_pos > 100){
  142. _pbbar_pos = 0;
  143. clearInterval(interval3);
  144. top.Dialog.alert("处理完成!");
  145. if(diag2){
  146. diag2.close();
  147. }
  148. return;
  149. }
  150. _progress.progressCtrl(_pbbar_pos);
  151. }, 100);
  152. }
  153. </script>
  154. </body>
  155. </html>