Accept Merge Request #71: (feature/zy -> develop)

Merge Request: feature: 面板

Created By: @zhuyu
Accepted By: @zhuyu
URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/71
This commit is contained in:
zhuyu 2025-05-27 15:09:05 +08:00 committed by Coding
commit 65650c76e8
2 changed files with 19 additions and 2 deletions

View File

@ -110,19 +110,24 @@ class Dashboard extends Backend
public function task() public function task()
{ {
$dateTime = \date('Y-m-d H:i:s');
$dayTasks = (new Task()) $dayTasks = (new Task())
->where('exec_admin_id','=',$this->auth->id) ->where('exec_admin_id','=',$this->auth->id)
->where('type','=',1) ->where('type','=',1)
->where('expire_end_time','>=', $dateTime)
->select(); ->select();
$weekTasks = (new Task()) $weekTasks = (new Task())
->where('exec_admin_id','=',$this->auth->id) ->where('exec_admin_id','=',$this->auth->id)
->where('type','=',2) ->where('type','=',2)
->where('expire_end_time','>=', $dateTime)
->select(); ->select();
$monthTasks = (new Task()) $monthTasks = (new Task())
->where('exec_admin_id','=',$this->auth->id) ->where('exec_admin_id','=',$this->auth->id)
->where('type','=',3) ->where('type','=',3)
->where('expire_end_time','>=', $dateTime)
->select(); ->select();
$this->view->assign('day', $dayTasks); $this->view->assign('day', $dayTasks);
@ -174,7 +179,15 @@ class Dashboard extends Backend
if (!$task) { if (!$task) {
$this->error('任务状态已变更,请刷新后操作'); $this->error('任务状态已变更,请刷新后操作');
} }
$task->save(['status' => 3, 'prove_desc' => $params['prove_desc'], 'prove_file_path' => $params['prove_file_path']]);
$dateTime = \date('Y-m-d H:i:s');
$task->save([
'status' => 3,
'prove_desc' => $params['prove_desc'],
'prove_file_path' => $params['prove_file_path'],
'complete_time' => $dateTime,
]);
$this->success(); $this->success();
} }

View File

@ -11,6 +11,10 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
background-color: #f9f9f9; /* ✅ 淡灰色背景 */
padding: 16px;
border-radius: 8px; /* ✅ 加点圆角更柔和 */
border: 1px solid #eee; /* ✅ 加细边框让结构更明显 */
} }
/* 标题部分 */ /* 标题部分 */
@ -104,7 +108,7 @@
</style> </style>
<div> <div>
<h2>任务看板</h2> <h1>任务面板</h1>
</div> </div>