Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

channel.htm 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css?v={$version}">
  6. <script type="text/javascript">
  7. var __root_dir__ = "__ROOT_DIR__";
  8. var __lang__ = "{$admin_lang}";
  9. </script>
  10. <script type="text/javascript" src="__STATIC__/common/js/jquery.min.js?v={$version}"></script>
  11. <script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js"></script>
  12. </head>
  13. <style>
  14. .gray-bg {
  15. background-color: #f3f3f4;
  16. }
  17. .wrapper-content {
  18. padding: 20px;
  19. }
  20. .ibox {
  21. clear: both;
  22. margin-bottom: 25px;
  23. margin-top: 0;
  24. padding: 0;
  25. }
  26. .ibox-content {
  27. clear: both;
  28. background-color: #ffffff;
  29. color: inherit;
  30. padding: 15px 20px 20px 20px;
  31. border-color: #e7eaec;
  32. -webkit-border-image: none;
  33. -o-border-image: none;
  34. border-image: none;
  35. border-style: solid solid none;
  36. border-width: 1px 0px;
  37. }
  38. .progress {
  39. height: 20px;
  40. margin-bottom: 20px;
  41. overflow: hidden;
  42. background-color: #f5f5f5;
  43. border-radius: 4px;
  44. -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
  45. box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
  46. }
  47. .progress-bar{
  48. height: 100%;
  49. }
  50. .progress-bar-success {
  51. background-color: #1c84c6;
  52. }
  53. .ncap-btn-green {
  54. margin: 20px auto 0;
  55. width: 100px;
  56. height: 36px;
  57. line-height: 36px;
  58. background-color: #4fc0e8;
  59. border:1px solid #3aa8cf;
  60. text-align: center;
  61. vertical-align: middle;
  62. display: block;
  63. padding: 0px 9px;
  64. border-radius: 3px;
  65. cursor: pointer;
  66. color: #fff;
  67. font-size: 13px;
  68. }
  69. a.ncap-btn-green:hover{
  70. background-color:#3ab0da;
  71. color: #fff;
  72. text-decoration: none;
  73. }
  74. </style>
  75. <body class="gray-bg">
  76. <div class="ibox float-e-margins">
  77. <div class="ibox-content">
  78. <div class="progress progress-striped active">
  79. <div class="progress-bar progress-bar-success" role="progressbar"
  80. aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:0%">
  81. </div>
  82. </div>
  83. <div style="text-align:center" class="success">
  84. <div class="finash" style="">
  85. <span>
  86. <font id="title">正在生成</font>
  87. <span class="filetypename"></span>
  88. <span class="filetypeid"></span>,
  89. </span>
  90. <span class="filefindex"></span>
  91. 已完成<span class="percent" style="color:#ff0000 ;font-size:14px;">0</span>%
  92. </div>
  93. </div>
  94. </div>
  95. <a href="javascript:void(0);" id="a_close_pop" onclick="parent.layer.closeAll();" class="ncap-btn-green" style="display: none;">关闭本窗口</a>
  96. <div class="ibox-content" id="error_msg" style="display: none">
  97. </div>
  98. </div>
  99. <script type="text/javascript">
  100. $('#a_close_pop').hide();
  101. var typeid = {$typeid|default=0};
  102. var findex = index = 0; //本次执行的下标
  103. var achieve = 0;
  104. var allpagetotal = 0;
  105. var msg = "";
  106. var timestamp1 = Date.parse(new Date());
  107. function send(){
  108. $.ajax({
  109. url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildChannel&lang="+__lang__+"&id="+typeid+"&index="+index+"&findex="+findex+"&achieve="+achieve+"&_ajax=1",
  110. type:'GET',
  111. dataType:'json',
  112. data:{},
  113. timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
  114. beforeSend:function(){
  115. if (achieve == 0) {
  116. $("#title").html('数据优化中');
  117. $(".progress-bar").css('width','0.5%');
  118. $(".percent").text('0.5');
  119. }
  120. },
  121. success:function(res){
  122. index = res.data.index;
  123. findex = res.data.findex;
  124. achieve = res.data.achievepage;
  125. allpagetotal = res.data.allpagetotal;
  126. channeltypeid = res.data.typeid;
  127. typename = res.data.typename;
  128. msg += res.msg;
  129. progress = ((achieve/allpagetotal)*100).toFixed(1);
  130. $('#title').html('正在创建栏目:');
  131. // $(".filetypename").html(res.data.typename);
  132. // $(".filetypeid").html('('+res.data.typeid+')');
  133. $(".filetypeid").html((res.data.findex+1));
  134. if (res.data.index > 1) {
  135. $(".filefindex").html('第'+res.data.index+'页,');
  136. } else {
  137. $(".filefindex").html('');
  138. }
  139. $(".progress-bar").css('width',progress+'%');
  140. $(".percent").text(progress);
  141. if (achieve >= allpagetotal){
  142. var timestamp2 = Date.parse(new Date());
  143. var timestamp3 = (timestamp2 - timestamp1) / 1000;
  144. if (timestamp3 < 1) timestamp3 = 1;
  145. $(".finash").remove();
  146. $(".progress-bar").css('width','100%');
  147. $(".progress").removeClass('progress-striped ').removeClass('active');
  148. $(".success").html("生成栏目完成,共耗时:<font color='red'>"+timestamp3+"</font> 秒");
  149. $('#a_close_pop').show();
  150. if (msg !== ""){
  151. $("#error_msg").show();
  152. $("#error_msg").prepend(msg);
  153. }
  154. return false;
  155. }
  156. send();
  157. },
  158. error:function(e){
  159. parent.layer.alert(e.responseText, {icon: 5, title:false});
  160. }
  161. });
  162. }
  163. send();
  164. </script>
  165. </body>
  166. </html>