timing.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {include file="../../../application/admin/view/public/head" /}
  2. <script language="javascript">
  3. var b=false;
  4. var iv_cj,iv_makeinfo,iv_makeindex,iv_maketype;
  5. var urln=0,typeids='{$vod_type_ids_today}';
  6. var cjUrl = "{:url('collect/apis')}";
  7. $(function(){
  8. $("#btnGO").click(function(){
  9. var time = new Array();
  10. time['cj'] = Number($("#ds_cj").val());
  11. time['makeinfo'] = Number($("#ds_makeinfo").val());
  12. time['makeindex'] = Number($("#ds_makeindex").val());
  13. time['maketype'] = Number($("#ds_maketype").val());
  14. if(time['cj'] > 0){
  15. iv_cj = window.setInterval('cj()',1000*60* time['cj']);
  16. }
  17. if(time['makeinfo'] > 0){
  18. iv_makeinfo = window.setInterval('makeinfo()',1000*60* time['makeinfo']);
  19. }
  20. if(time['makeindex'] > 0){
  21. iv_makeindex = window.setInterval('makeindex()',1000*60* time['makeindex']);
  22. }
  23. if(time['maketype'] > 0){
  24. iv_maketype = window.setInterval('maketype()',1000*60* time['maketype']);
  25. }
  26. $("#dsinfo").css("display",'');
  27. $(this).val('执行中...');
  28. $("#btnGO").attr('disabled',true);
  29. $("#btnCancel").attr('disabled',false);
  30. $b=true;
  31. });
  32. $("#btnCancel").click(function(){
  33. window.clearInterval(iv_cj);
  34. window.clearInterval(iv_makeinfo);
  35. window.clearInterval(iv_makeindex);
  36. window.clearInterval(iv_maketype);
  37. $("#sp_cj").html('');
  38. $("#sp_makeinfo").html('');
  39. $("#sp_makeindex").html('');
  40. $("#sp_maketype").html('');
  41. $("#dsinfo").css("display",'none');
  42. $("#btnGO").val('执行任务');
  43. $("#btnGO").attr('disabled',false);
  44. $("#btnCancel").attr('disabled',true);
  45. $b=false;
  46. });
  47. });
  48. function cj()
  49. {
  50. var urlc=$("#ds_url option:selected").length;
  51. $("#ds_url option:selected").each(function(k,v) {
  52. if(urln < urlc){
  53. if(urln==k){
  54. $("#sp_cj").html("<iframe width='100%' height='200' src='"+v.value+"' scrolling='auto'></iframe>");
  55. urln++;
  56. return false;
  57. }
  58. }
  59. else{
  60. urln=0;
  61. }
  62. });
  63. }
  64. function makeinfo()
  65. {
  66. $("#sp_makeinfo").html("<iframe width='100%' height='200' src='{:url('make/make')}?ac=info&tab=vod&ac2=nomake' scrolling='auto'></iframe>");
  67. }
  68. function makeindex()
  69. {
  70. $("#sp_makeindex").html("<iframe width='100%' height='200' src='{:url('make/make')}?ac=index' scrolling='auto'></iframe>");
  71. }
  72. function maketype()
  73. {
  74. if(typeids==''){
  75. $("#sp_maketype").html("今日没有更新的数据,所以栏目无需更新!");
  76. }
  77. else{
  78. $("#sp_maketype").html("<iframe width='100%' height='200' src='{:url('make/make')}?ac=type&tab=vod&vodtype="+typeids+"' scrolling='auto'></iframe>");
  79. }
  80. }
  81. function reflogin()
  82. {
  83. $("#sp_reflogin").html("<iframe width='100%' height='100' src='{:url('index/welcome')}' scrolling='auto' style='display:none'></iframe>");
  84. }
  85. </script>
  86. <div class="page-container p10">
  87. <div style="width:650px; height:420px; margin:0 auto;">
  88. <blockquote class="layui-elem-quote">定时采集生成插件WEB挂机版<br>注:不需要定时操作的模块,请填写0</blockquote>
  89. <table style="">
  90. <tr>
  91. <td width="50%" rowspan="4"> <div style=""> </div></td>
  92. <td>采集抓取频率(分钟/次):</td>
  93. <td><input id="ds_cj" name="ds_cj" type="text" class="layui-input w50" value="5" /></td>
  94. </tr>
  95. <tr>
  96. <td>内容生成频率(分钟/次): </td>
  97. <td><input id="ds_makeinfo" name="ds_makeinfo" class="layui-input w50" type="text" value="6" /></td>
  98. </tr>
  99. <tr>
  100. <td>首页生成频率(分钟/次): </td>
  101. <td><input id="ds_makeindex" name="ds_makeindex" class="layui-input w50" type="text" value="20"/></td>
  102. </tr>
  103. <tr>
  104. <td>栏目生成频率(分钟/次): </td>
  105. <td><input id="ds_maketype" name="ds_maketype" class="layui-input w50" type="text" value="120"/></td>
  106. </tr>
  107. <tr>
  108. <td colspan="2" style="text-align:center" class="p10">
  109. <input type="button" id="btnGO" class="layui-btn" value="执行任务"/>&nbsp;
  110. <input type="button" id="btnCancel" class="layui-btn layui-btn-warm" value="停止执行" disabled=true/>
  111. </td>
  112. </tr>
  113. </table>
  114. </div>
  115. <div style="width:100%;height:50px;"></div>
  116. <div id="dsinfo" style="width:650px;margin:0 auto;display:none;">
  117. <table border='0' cellpadding='0' cellspacing='0' width='760' height='100%' align='center' style="border:1px solid #CCCCCC; font-size:12px">
  118. <tr><td valign='top' style="background:#ECF5FF">视频_定时采集</td></tr>
  119. <tr><td valign='top' id='sp_cj' height='150'>等侍中...</td></tr>
  120. <tr><td valign='top' height='1' style="background:#e8e8e8"></td></tr>
  121. <tr><td valign='top' style="background:#ECF5FF">视频_定时生成内容页</td></tr>
  122. <tr><td valign='top' id='sp_makeinfo' height='150'>等侍中...</td></tr>
  123. <tr><td valign='top' height='1' style="background:#e8e8e8"></td></tr>
  124. <tr><td valign='top' style="background:#ECF5FF">视频_定时生成首页</td></tr>
  125. <tr><td valign='top' id='sp_makeindex' height='150'>等侍中...</td></tr>
  126. <tr><td valign='top' height='1' style="background:#e8e8e8"></td></tr>
  127. <tr><td valign='top' style="background:#ECF5FF">视频_定时生成栏目页</td></tr>
  128. <tr><td valign='top' id='sp_maketype' height='150'>等侍中...</td></tr>
  129. </table>
  130. <span id="sp_reflogin"></span>
  131. </div>
  132. </div>
  133. {include file="../../../application/admin/view/public/foot" /}
  134. <script type="text/javascript">
  135. layui.use(['laypage', 'layer'], function() {
  136. var laypage = layui.laypage
  137. , layer = layui.layer;
  138. });
  139. </script>
  140. </body>
  141. </html>