Commit 38902576 by 汪伟伟

网页截图

parent 9f014aa6
......@@ -132,7 +132,16 @@ class AlreadyDoneTaskController extends AdminController
$show->field('collects.reality_refer', '实际信源');
$show->field('collects.refer_level', '信源等级');
// $show->field('collects.net_img', '网页截图')->unescape();
$show->field('collects.net_img', '网页截图')->image();
$res = \App\Models\TasksReceive::query()->find($id);
$img = explode(',',$res->collects->net_img);
if (filter_var($img[0], FILTER_VALIDATE_URL) !== false){//是链接
$show->field('collects.net_img', '网页截图')->image();
}else{
$show->field('collects.net_img','网页截图')->unescape();//不 转义html内容
}
$show->field('collects.remark', '备注信息');
}
......@@ -203,7 +212,7 @@ class AlreadyDoneTaskController extends AdminController
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
preg_match_all($pattern, $form->input('collects.net_img'), $matches);
$images = implode(',',$matches[1]);
TasksCollect::query()->where('receive_id', $this->id)->update(['net_img' => $images]);//更新
if($images) TasksCollect::query()->where('receive_id', $this->id)->update(['net_img' => $images]);//更新
});
$form->disableDeleteButton();
......
......@@ -216,7 +216,7 @@ class NoDoneTaskController extends AdminController
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
preg_match_all($pattern, $form->input('collects.net_img'), $matches);
$images = implode(',',$matches[1]);
TasksCollect::query()->where('receive_id', $this->id)->update(['net_img' => $images]);//更新
if($images) TasksCollect::query()->where('receive_id', $this->id)->update(['net_img' => $images]);//更新
if ($this->status == 0) {
// dd($this->id);
......
......@@ -29,19 +29,26 @@ class TasksApproveController extends AdminController
->whereHas('receives',function ($query){
$query->where('status', 1)->orderBy('created_at', 'desc');
})
->with(['receives.collects'])->paginate($pageSize,'*','page',$page)->toArray();
dd($data);
->with(['receives.collects','receives.user'])->paginate($pageSize,'*','page',$page)->toArray();
foreach ($data['data'] as $key =>&$item){
if (!$item['receives']){
unset($data['data'][$key]);
}
if (count($item['receives']) >1){
// if ($item['receives'][0]['']){}
if ($item['receives'][0]['collects']['value'] != $item['receives'][1]['collects']['value']){
$item['receives'][0]['is_bs'] = $item['receives'][1]['is_bs'] = 1;
}else{
$item['receives'][0]['is_bs'] = $item['receives'][1]['is_bs'] = 0;
}
}else{
$item['receives'][0]['is_bs'] = 0;
}
}
dd($data);
$content = Content::make();
return $content->body(view('admin.check', ['data' => $data['data'],'page'=>$page,'total'=>$data['total']]));
return $content
->title('未审核列表')
->body(view('admin.check', ['data' => $data['data'],'page'=>$page,'total'=>$data['total']]));
}
protected function getData22($status)
......@@ -164,14 +171,20 @@ class TasksApproveController extends AdminController
// 在 display 回调中使用
$grid->column('序号')->display(function () {
return $this->_index + 1;
});
})
// ->expand(function ($model) {
// $comments = $model->comments()->take(10)->map(function ($comment) {
// return $comment->only(['id', 'content', 'created_at']);
// });
// return new Table(['ID', '内容', '发布时间'],[['id'=>1,'content'=>'dsdsds','<a href="/">通过</a>'],['id'=>2,'content'=>'d2sdsds','created_at'=>'gg2ggg']]
// ,['id'=>'asddddd']);
// });
// 返回显示的详情
// 这里返回 content 字段内容,并用 Card 包裹起来
// $card = new Card(null, $this->id);
// return $r;
// })
;
$grid->column('user.name', '用户');
......
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