Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
0d19995a
Commit
0d19995a
authored
Dec 14, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计新增了获取全部团队
parent
0c45c369
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
StatisticsController.php
app/Http/Controllers/StatisticsController.php
+7
-2
GroupService.php
app/Services/GroupService.php
+1
-1
index.blade.php
resources/views/admin/index.blade.php
+15
-15
No files found.
app/Http/Controllers/StatisticsController.php
View file @
0d19995a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
App\Contracts\GroupServiceContract
;
use
App\Contracts\ScheduleServiceContract
;
use
App\Contracts\ScheduleServiceContract
;
use
App\Contracts\StatisticsServiceContract
;
use
App\Contracts\StatisticsServiceContract
;
use
App\Contracts\TaskServiceContract
;
use
App\Contracts\TaskServiceContract
;
...
@@ -16,11 +17,13 @@ use Illuminate\Http\Request;
...
@@ -16,11 +17,13 @@ use Illuminate\Http\Request;
class
StatisticsController
extends
Controller
class
StatisticsController
extends
Controller
{
{
public
function
__construct
(
StatisticsServiceContract
$statisticsHandel
,
TaskServiceContract
$taskHandle
,
ScheduleServiceContract
$scheduleHandle
)
public
function
__construct
(
StatisticsServiceContract
$statisticsHandel
,
TaskServiceContract
$taskHandle
,
ScheduleServiceContract
$scheduleHandle
,
GroupServiceContract
$groupHandel
)
{
{
$this
->
mStatistics
=
$statisticsHandel
;
$this
->
mStatistics
=
$statisticsHandel
;
$this
->
mTask
=
$taskHandle
;
$this
->
mTask
=
$taskHandle
;
$this
->
mSchedule
=
$scheduleHandle
;
$this
->
mSchedule
=
$scheduleHandle
;
$this
->
mGroup
=
$groupHandel
;
}
}
...
@@ -48,8 +51,10 @@ class StatisticsController extends Controller
...
@@ -48,8 +51,10 @@ class StatisticsController extends Controller
// 获取所有日程
// 获取所有日程
$schedules
=
$this
->
mSchedule
->
getCount
();
$schedules
=
$this
->
mSchedule
->
getCount
();
// 获取所有的团队
$groups
=
$this
->
mGroup
->
getAll
()
->
count
();
return
view
(
'admin/index'
,
compact
(
'newUserCount'
,
'newProject'
,
'users'
,
'projects'
,
'tasks'
,
'schedules'
));
return
view
(
'admin/index'
,
compact
(
'newUserCount'
,
'newProject'
,
'users'
,
'projects'
,
'tasks'
,
'schedules'
,
'groups'
));
}
}
...
...
app/Services/GroupService.php
View file @
0d19995a
...
@@ -117,7 +117,7 @@ class GroupService implements GroupServiceContract
...
@@ -117,7 +117,7 @@ class GroupService implements GroupServiceContract
}
}
public
function
getAll
(
$page
)
public
function
getAll
(
$page
=
8
)
{
{
$groups
=
Group
::
paginate
(
$page
);
$groups
=
Group
::
paginate
(
$page
);
if
(
$groups
->
isEmpty
()){
if
(
$groups
->
isEmpty
()){
...
...
resources/views/admin/index.blade.php
View file @
0d19995a
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<!--
small
box
-->
<!--
small
box
-->
<
div
class
=
"small-box bg-yellow"
>
<
div
class
=
"small-box bg-yellow"
>
<
div
class
=
"inner"
style
=
"background-color: #ebccd1"
>
<
div
class
=
"inner"
style
=
"background-color: #ebccd1"
>
<
h3
>
0
</
h3
>
<
h3
>
{{
$groups
}}
</
h3
>
<
p
>
全部团队
</
p
>
<
p
>
全部团队
</
p
>
</
div
>
</
div
>
...
@@ -116,20 +116,20 @@
...
@@ -116,20 +116,20 @@
</
div
>
</
div
>
</
div
>
</
div
>
<!--
./
col
-->
<!--
./
col
-->
<
div
class
=
"col-lg-3 col-xs-6"
>
{{
--<
div
class
=
"col-lg-3 col-xs-6"
>--
}}
<!--
small
box
-->
{{
--<!--
small
box
-->--
}}
<
div
class
=
"small-box bg-aqua"
>
{{
--<
div
class
=
"small-box bg-aqua"
>--
}}
<
div
class
=
"inner"
style
=
"background-color: #afd9ee"
>
{{
--<
div
class
=
"inner"
style
=
"background-color: #afd9ee"
>--
}}
<
h3
>
0
</
h3
>
{{
--<
h3
>
0
</
h3
>--
}}
<
p
>
全部任务
</
p
>
{{
--<
p
>
全部任务
</
p
>--
}}
</
div
>
{{
--</
div
>--
}}
<
div
class
=
"icon"
>
{{
--<
div
class
=
"icon"
>--
}}
<
i
class
=
"ion ion-bag"
></
i
>
{{
--<
i
class
=
"ion ion-bag"
></
i
>--
}}
</
div
>
{{
--</
div
>--
}}
<
a
href
=
"#"
class
=
"small-box-footer"
>
More
info
<
i
class
=
"fa fa-arrow-circle-right"
></
i
></
a
>
{{
--<
a
href
=
"#"
class
=
"small-box-footer"
>
More
info
<
i
class
=
"fa fa-arrow-circle-right"
></
i
></
a
>--
}}
</
div
>
{{
--</
div
>--
}}
</
div
>
{{
--</
div
>--
}}
</
div
>
</
div
>
...
...
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