mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
127 lines
5.5 KiB
HTML
127 lines
5.5 KiB
HTML
{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-space15 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>{$totals.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 !empty($vo.enter_time) && !empty($vo.outer_time)}
|
||
开始时间:{$vo.enter_time|format_datetime}( 耗时 <b class="color-blue">{$vo.outer_time-$vo.enter_time}</b> 秒 )
|
||
{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"></i>
|
||
</a>
|
||
{/eq}
|
||
|
||
{if auth("admin/queue/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"></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}
|