mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改后台任务管理
This commit is contained in:
parent
d982013b3d
commit
1d5205459e
@ -52,6 +52,15 @@ class Queue extends Controller
|
||||
$this->message = $exception->getMessage();
|
||||
}
|
||||
}
|
||||
// 任务状态统计
|
||||
$this->total = ['dos' => 0, 'pre' => 0, 'oks' => 0, 'ers' => 0];
|
||||
$this->app->db->name($this->table)->field('status,count(1) count')->group('status')->select()->each(function ($item) {
|
||||
if ($item['status'] === 1) $this->total['pre'] = $item['count'];
|
||||
if ($item['status'] === 2) $this->total['dos'] = $item['count'];
|
||||
if ($item['status'] === 3) $this->total['oks'] = $item['count'];
|
||||
if ($item['status'] === 4) $this->total['ers'] = $item['count'];
|
||||
});
|
||||
|
||||
$this->title = '系统任务管理';
|
||||
$this->iswin = ProcessService::instance()->iswin();
|
||||
// 任务列表查询分页处理
|
||||
|
@ -19,6 +19,41 @@
|
||||
{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'}
|
||||
|
Loading…
x
Reference in New Issue
Block a user