修改任务管理

This commit is contained in:
Anyon 2022-03-03 10:32:37 +08:00
parent 300dbef865
commit 3adcada735
4 changed files with 7 additions and 12 deletions

View File

@ -24,7 +24,7 @@
<!--{if isset($super) and $super}-->
<b>服务状态:</b><b class="margin-right-5" data-queue-message><span class="color-desc">检查中</span></b>
<b data-tips-text="点击可复制【任务服务启动指令】" class="layui-icon pointer margin-right-20" data-copy="{$command|default=''}">&#xe60e;</b>
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}')</script>
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}');</script>
<!--{/if}-->
<b>任务统计:</b>待处理 <b class="color-text">{$total.pre|default=0}</b> 个任务,处理中 <b class="color-blue">{$total.dos|default=0}</b> 个任务,已完成 <b class="color-green">{$total.oks|default=0}</b> 个任务,已失败 <b class="color-red">{$total.ers|default=0}</b> 个任务。
</div>
@ -37,7 +37,7 @@
{block name='script'}
<style>
#QueueData + div tbody .layui-table-cell {
height: 42px;
height: 44px;
line-height: 22px;
}
@ -46,9 +46,10 @@
}
#QueueData + div tbody .layui-table-cell.laytable-cell-checkbox {
line-height: 42px;
line-height: 44px;
}
</style>
<script>
$(function () {
$('#QueueData').layTable({

View File

@ -112,10 +112,4 @@
<button class="layui-btn" type='submit'>保存数据</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</form>
<script>
$(function () {
layui.form.render();
});
</script>
</form>

View File

@ -69,7 +69,8 @@
// 数据状态切换操作
layui.form.on('switch(StatusSwitch)', function (obj) {
$.form.load("{:url('state')}", {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}, 'post', function (ret) {
var data = {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0};
$.form.load("{:url('state')}", data, 'post', function (ret) {
if (ret.code < 1) $.msg.error(ret.info, 3, function () {
$('#UserData').trigger('reload');
});

View File

@ -65,5 +65,4 @@
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
</div>
</form>
<script>form.render()</script>
</fieldset>