diff --git a/application/admin/controller/Dashboard.php b/application/admin/controller/Dashboard.php index c8f8b99..c260fcf 100755 --- a/application/admin/controller/Dashboard.php +++ b/application/admin/controller/Dashboard.php @@ -169,7 +169,7 @@ class Dashboard extends Backend } $params = $this->request->post('row/a'); - $task = (new Task())->where('id', '=', $ids)->where('status', 1)->find(); + $task = (new Task())->where('id', '=', $ids)->whereIn('status', [1, 5])->find(); if (!$task) { $this->error('任务状态已变更,请刷新后操作'); diff --git a/application/admin/view/dashboard/task.html b/application/admin/view/dashboard/task.html index d0f4c27..ad0e281 100644 --- a/application/admin/view/dashboard/task.html +++ b/application/admin/view/dashboard/task.html @@ -30,6 +30,7 @@ /* 卡片样式 */ .card { + position: relative; /* ✅ 这行是关键,必须有 */ background: #fff; border: 1px solid #e0e4e8; border-radius: 6px; @@ -40,6 +41,7 @@ gap: 8px; transition: transform .15s ease, box-shadow .15s ease; } + .card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, .08); @@ -67,6 +69,27 @@ color: #999; } + /* 状态角标 */ + .badge { + position: absolute; + top: 8px; + right: 8px; + font-size: 12px; + padding: 2px 8px; + border-radius: 12px; + color: white; + background-color: #999; + z-index: 1; /* 避免被遮挡 */ + } + + /* 按状态区分颜色 */ + .status-1 { background-color: #f39c12; } /* 待完成 - 橙色 */ + .status-2 { background-color: #2ecc71; } /* 已完成 - 绿色 */ + .status-3 { background-color: #3498db; } /* 待审核 - 蓝色 */ + .status-4 { background-color: #1abc9c; } /* 已通过 - 青色 */ + .status-5 { background-color: #e74c3c; } /* 已驳回 - 红色 */ + .status-6 { background-color: #9b59b6; } /* 待执行 - 紫色 */ + /* 响应式:小屏变成1列 */ @media (max-width: 1024px) { .dashboard { @@ -92,11 +115,20 @@