Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪伟伟
data-collect
Commits
38902576
Commit
38902576
authored
Jan 22, 2024
by
汪伟伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网页截图
parent
9f014aa6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
12 deletions
+34
-12
app/Admin/Controllers/AlreadyDoneTaskController.php
+11
-2
app/Admin/Controllers/NoDoneTaskController.php
+1
-1
app/Admin/Controllers/TasksApproveController.php
+22
-9
resources/views/admin/check.blade.php
+0
-0
No files found.
app/Admin/Controllers/AlreadyDoneTaskController.php
View file @
38902576
...
...
@@ -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
();
...
...
app/Admin/Controllers/NoDoneTaskController.php
View file @
38902576
...
...
@@ -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);
...
...
app/Admin/Controllers/TasksApproveController.php
View file @
38902576
...
...
@@ -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'
,
'用户'
);
...
...
resources/views/admin/check.blade.php
View file @
38902576
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment