index.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {extend name='main'}
  2. {block name="button"}
  3. {if auth("remove")}
  4. <button data-action='{:url("remove")}' data-confirm="确定要批量删除任务吗?" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除任务</button>
  5. {/if}
  6. {if auth("start") && $iswin}
  7. <button data-load='{:url("start")}' class='layui-btn layui-btn-sm layui-btn-primary'>创建监听进程</button>
  8. {/if}
  9. {if auth("stop") && $iswin}
  10. <button data-load='{:url("stop")}' class='layui-btn layui-btn-sm layui-btn-primary'>停止监听进程</button>
  11. {/if}
  12. {/block}
  13. {block name="content"}
  14. <div class="think-box-shadow">
  15. {include file='queue/index_search'}
  16. <table class="layui-table margin-top-15" lay-skin="line">
  17. {notempty name='list'}
  18. <thead>
  19. <tr>
  20. <th class='list-table-check-td think-checkbox'>
  21. <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
  22. </th>
  23. <th class='text-left nowrap'>任务信息</th>
  24. <th class='text-left nowrap'>任务时间</th>
  25. <th class='text-left nowrap'>任务状态</th>
  26. </tr>
  27. </thead>
  28. {/notempty}
  29. <tbody>
  30. {foreach $list as $key=>$vo}
  31. <tr>
  32. <td class='list-table-check-td think-checkbox'>
  33. <input class="list-check-box" value='{$vo.id}' type='checkbox'>
  34. </td>
  35. <td class='text-left nowrap'>
  36. 任务名称:{$vo.title|default=''}<br>
  37. <span class="color-desc">任务指令:{$vo.command|default=''}</span>
  38. </td>
  39. <td class='text-left nowrap'>
  40. 创建时间:{$vo.create_at|format_datetime} / {$vo.time|format_datetime}<br>
  41. 执行时间:{$vo.start_at|format_datetime} / {$vo.end_at|format_datetime}
  42. </td>
  43. <td class='text-left nowrap'>
  44. 任务状态:{eq name='vo.double' value='1'}
  45. <span class="layui-badge layui-bg-green margin-right-5">复</span>
  46. {else}
  47. <span class="layui-badge layui-bg-blue margin-right-5">单</span>
  48. {/eq}
  49. {eq name='vo.status' value='1'}
  50. <span class="layui-badge layui-bg-black">待处理</span>
  51. {elseif $vo.status eq 2}
  52. <span class="layui-badge layui-bg-green">处理中</span>
  53. {elseif $vo.status eq 3}
  54. <span class="layui-badge layui-bg-blue">处理完成</span>
  55. {elseif $vo.status eq 4}
  56. <span class="layui-badge layui-bg-red margin-right-5">处理失败</span>
  57. <a class="layui-badge layui-bg-green" data-tips-text="重置该任务" data-action="{:url('redo')}" data-value="id#{$vo.id}">
  58. <i class="layui-icon font-s12">&#xe669;</i>
  59. </a>
  60. {/eq}
  61. {if auth("admin/queue/remove") and in_array($vo.status,[1,3,4])}
  62. <a data-action='{:url("remove")}' data-confirm="确定要删除该任务吗?" data-value="id#{$vo.id}" data-tips-text="删除该任务" class='layui-badge layui-bg-red margin-left-5'>
  63. <i class="layui-icon">&#xe640;</i>
  64. </a>
  65. {/if}
  66. <br>
  67. 状态描述:<span class="color-desc">{$vo.desc|raw|default="没有获取到状态描述"}</span>
  68. </td>
  69. </tr>
  70. {/foreach}
  71. </tbody>
  72. </table>
  73. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  74. </div>
  75. {/block}