2019-12-03 10:53:45 +08:00

129 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{extend name='main'}
{block name="button"}
{if auth("remove")}
<button data-action='{:url("remove")}' data-confirm="确定批量删除任务吗?" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
{/if}
{if auth("start") && $iswin}
<button data-load='{:url("start")}' class='layui-btn layui-btn-sm layui-btn-primary'>开始监听</button>
{/if}
{if auth("stop") && $iswin}
<button data-load='{:url("stop")}' data-confirm="确定要停止主进程监听吗?" class='layui-btn layui-btn-sm layui-btn-primary'>停止监听</button>
{/if}
{/block}
{block name="content"}
<div class="think-box-shadow">
<div class="layui-row layui-col-space20 portal-block-container">
<div class="layui-col-sm6 layui-col-md3">
<div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#57bdbf,#2f9de2)">
<div>待处理</div>
<div>{$total.pre|default=0}</div>
<div>待处理的任务数量</div>
</div>
<i class="portal-block-icon layui-icon layui-icon-star"></i>
</div>
<div class="layui-col-sm6 layui-col-md3">
<div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#ff7d7d,#fb2c95)">
<div>处理中</div>
<div>{$total.dos|default=0}</div>
<div>处理中的任务数量</div>
</div>
<i class="portal-block-icon layui-icon layui-icon-log"></i>
</div>
<div class="layui-col-sm6 layui-col-md3">
<div class="portal-block-item nowrap" style="background:linear-gradient(-113deg,#c543d8,#925cc3)">
<div>处理完成</div>
<div>{$total.oks|default=0}</div>
<div>处理完成的任务数量</div>
</div>
<i class="portal-block-icon layui-icon layui-icon-release"></i>
</div>
<div class="layui-col-sm6 layui-col-md3">
<div class="portal-block-item nowrap" style="background:linear-gradient(-141deg,#ecca1b,#f39526)">
<div>处理失败</div>
<div>{$total.ers|default=0}</div>
<div>处理失败的任务数量</div>
</div>
<i class="portal-block-icon layui-icon layui-icon-engine"></i>
</div>
</div>
{include file='queue/index_search'}
<table class="layui-table margin-top-15" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='text-left nowrap'>任务信息</th>
<th class='text-left nowrap'>任务时间</th>
<th class='text-left nowrap'>任务状态</th>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class='text-left nowrap'>
任务名称:{$vo.title|default=''}<br>
<span class="color-desc">任务指令:{$vo.command|default=''}</span>
</td>
<td class='text-left nowrap'>
计划时间:{$vo.exec_time|format_datetime}<br>
{if $vo.status eq 3 or $vo.status eq 4}
执行时间:{$vo.enter_time|format_datetime} 耗时 <b class="color-blue">{:sprintf("%.4f",$vo.outer_time-$vo.enter_time)}</b>
{elseif $vo.status eq 2}
开始时间:{$vo.enter_time|format_datetime}
{else}
创建时间:{$vo.create_at|format_datetime}
{/if}
</td>
<td class='text-left nowrap'>
任务状态:{eq name='vo.rscript' value='1'}
<span class="layui-badge layui-bg-green margin-right-5"></span>
{else}
<span class="layui-badge layui-bg-blue margin-right-5"></span>
{/eq}
{eq name='vo.status' value='1'}
<span class="layui-badge layui-bg-black">待处理</span>
{elseif $vo.status eq 2}
<span class="layui-badge layui-bg-green">处理中</span>
{elseif $vo.status eq 3}
<span class="layui-badge layui-bg-blue">处理完成</span>
{elseif $vo.status eq 4}
<span class="layui-badge layui-bg-red margin-right-5">处理失败</span>
<a class="layui-badge layui-bg-green" data-tips-text="重置该任务" data-action="{:url('redo')}" data-value="id#{$vo.id}">
<i class="layui-icon font-s12">&#xe669;</i>
</a>
{/eq}
{if auth("remove") and in_array($vo.status,[1,3,4])}
<a data-action='{:url("remove")}' data-confirm="确定要删除该任务吗?" data-value="id#{$vo.id}" data-tips-text="删除该任务" class='layui-badge layui-bg-red margin-left-5'>
<i class="layui-icon">&#xe640;</i>
</a>
{/if}
<br>
状态描述:<span class="color-desc">{$vo.exec_desc|raw|default="没有获取到状态描述"}</span>
</td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}