Commit 53c88ebb by 汪伟伟

提示信息

parent 66cebc84
...@@ -14,6 +14,7 @@ use Dcat\Admin\Grid; ...@@ -14,6 +14,7 @@ use Dcat\Admin\Grid;
use Dcat\Admin\Layout\Content; use Dcat\Admin\Layout\Content;
use Dcat\Admin\Show; use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController; use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Widgets\Tooltip;
class AlreadyDoneTaskController extends AdminController class AlreadyDoneTaskController extends AdminController
{ {
...@@ -26,7 +27,7 @@ class AlreadyDoneTaskController extends AdminController ...@@ -26,7 +27,7 @@ class AlreadyDoneTaskController extends AdminController
*/ */
protected function grid() protected function grid()
{ {
return Grid::make(TasksReceive::with(['task', 'collects', 'user']), function (Grid $grid){ return Grid::make(TasksReceive::with(['task', 'collects', 'user','approve']), function (Grid $grid){
$user = Admin::user(); $user = Admin::user();
$user->is_admin == 0 && $grid->model()->where('user_id', $user->id); $user->is_admin == 0 && $grid->model()->where('user_id', $user->id);
$grid->model()->where('status', '>', 0); $grid->model()->where('status', '>', 0);
...@@ -71,7 +72,15 @@ class AlreadyDoneTaskController extends AdminController ...@@ -71,7 +72,15 @@ class AlreadyDoneTaskController extends AdminController
// $grid->column('collects.net_img', '网页截图'); // $grid->column('collects.net_img', '网页截图');
$grid->column('status', '状态')->display(function ($val) { $grid->column('status', '状态')->display(function ($val) {
return \App\Models\TasksReceive::STATUS_DESC[$val];
$html = \App\Models\TasksReceive::STATUS_DESC[$val];
if ($val == 2) {
// dd($this->id,$this->approve->msg);
Tooltip::make('.ti-shi-span')->title($this->approve->msg);
return "<span style='color: red' class='ti-shi-span'>{$html}<i class='feather icon-help-circle'></i></span>";
}else{
return $html;
}
}); });
$grid->column('created_at', '领取任务时间'); $grid->column('created_at', '领取任务时间');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment