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
0d4113c5
Commit
0d4113c5
authored
Oct 10, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团队中的项目添加
parent
2fe195f2
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1113 additions
and
36 deletions
+1113
-36
ProjectServiceContract.php
app/Contracts/ProjectServiceContract.php
+6
-1
UserServiceContract.php
app/Contracts/UserServiceContract.php
+3
-0
GroupController.php
app/Http/Controllers/GroupController.php
+5
-3
ProjectController.php
app/Http/Controllers/ProjectController.php
+95
-0
UserController.php
app/Http/Controllers/UserController.php
+2
-2
Group.php
app/Models/Group.php
+5
-0
Project.php
app/Models/Project.php
+5
-0
ProjectService.php
app/Services/ProjectService.php
+32
-10
UserService.php
app/Services/UserService.php
+3
-1
groupinformation.blade.php
resources/views/admin/group/groupinformation.blade.php
+3
-6
grouplike.blade.php
resources/views/admin/group/grouplike.blade.php
+98
-0
grouptables.blade.php
resources/views/admin/group/grouptables.blade.php
+6
-5
grouptables.blade.php
resources/views/admin/project/grouptables.blade.php
+96
-0
projecliketables.blade.php
resources/views/admin/project/projecliketables.blade.php
+97
-0
projectinformation.blade.php
resources/views/admin/project/projectinformation.blade.php
+383
-0
projecttables.blade.php
resources/views/admin/project/projecttables.blade.php
+97
-0
update.blade.php
resources/views/admin/project/update.blade.php
+133
-0
sidebar.blade.php
resources/views/admin/sidebar.blade.php
+35
-8
web.php
routes/web.php
+9
-0
No files found.
app/Contracts/ProjectServiceContract.php
View file @
0d4113c5
...
@@ -13,7 +13,7 @@ interface ProjectServiceContract
...
@@ -13,7 +13,7 @@ interface ProjectServiceContract
{
{
public
function
add
(
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
);
public
function
add
(
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
);
public
function
delete
(
$project_id
);
public
function
delete
(
$project_id
);
public
function
update
(
$
project_
id
,
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
);
public
function
update
(
$id
,
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
);
public
function
get
(
$project_id
);
public
function
get
(
$project_id
);
public
function
getAll
();
public
function
getAll
();
...
@@ -23,4 +23,9 @@ interface ProjectServiceContract
...
@@ -23,4 +23,9 @@ interface ProjectServiceContract
public
function
updateTask
(
$id
,
$name
,
$project_id
,
$creator_id
,
$owner_id
,
$status
,
$brief
,
$starts_at
,
$ends_at
);
public
function
updateTask
(
$id
,
$name
,
$project_id
,
$creator_id
,
$owner_id
,
$status
,
$brief
,
$starts_at
,
$ends_at
);
public
function
getTask
(
$id
);
public
function
getTask
(
$id
);
public
function
getAllTask
();
public
function
getAllTask
();
public
function
simpleSearch
(
$id
,
$content
,
$item
);
}
}
\ No newline at end of file
app/Contracts/UserServiceContract.php
View file @
0d4113c5
...
@@ -18,4 +18,7 @@ interface UserServiceContract
...
@@ -18,4 +18,7 @@ interface UserServiceContract
public
function
update
(
$id
,
$phone
,
$user_name
,
$real_name
,
$gender
,
$email
,
$head_icon
);
public
function
update
(
$id
,
$phone
,
$user_name
,
$real_name
,
$gender
,
$email
,
$head_icon
);
public
function
simpleSearch
(
$search_content
,
$page
);
public
function
simpleSearch
(
$search_content
,
$page
);
public
function
search
(
$content
);
}
}
\ No newline at end of file
app/Http/Controllers/GroupController.php
View file @
0d4113c5
...
@@ -21,7 +21,7 @@ class GroupController extends Controller
...
@@ -21,7 +21,7 @@ class GroupController extends Controller
public
function
getAll
()
public
function
getAll
()
{
{
$groups
=
$this
->
mGroup
->
getAll
(
2
);
$groups
=
$this
->
mGroup
->
getAll
(
8
);
if
(
count
(
$groups
)
>
0
){
if
(
count
(
$groups
)
>
0
){
return
view
(
'admin/group/grouptables'
,
compact
(
'groups'
));
return
view
(
'admin/group/grouptables'
,
compact
(
'groups'
));
}
}
...
@@ -35,8 +35,10 @@ class GroupController extends Controller
...
@@ -35,8 +35,10 @@ class GroupController extends Controller
$id
=
$request
->
id
;
$id
=
$request
->
id
;
$groups
=
$this
->
mGroup
->
get
(
$id
);
$groups
=
$this
->
mGroup
->
get
(
$id
);
if
(
count
(
$groups
)
>
0
){
if
(
count
(
$groups
)
>
0
){
return
view
(
'admin/group/groupinformation'
,
compact
(
'groups'
));
return
view
(
'admin/group/groupinformation'
,
compact
(
'groups'
));
}
}
return
Message
::
makeError
(
'查找失败'
);
return
Message
::
makeError
(
'查找失败'
);
}
}
...
@@ -160,9 +162,9 @@ class GroupController extends Controller
...
@@ -160,9 +162,9 @@ class GroupController extends Controller
public
function
simpleSearch
(
Request
$request
)
public
function
simpleSearch
(
Request
$request
)
{
{
$search_content
=
$request
->
search
;
$search_content
=
$request
->
search
;
$page
=
1
;
$page
=
8
;
$groups
=
$this
->
mGroup
->
simpleSearch
(
$search_content
,
$page
);
$groups
=
$this
->
mGroup
->
simpleSearch
(
$search_content
,
$page
);
return
view
(
'admin/group/group
tables'
,
compact
(
'groups'
)
);
return
view
(
'admin/group/group
like'
,[
'groups'
=>
$groups
,
'params'
=>
$search_content
]
);
}
}
}
}
app/Http/Controllers/ProjectController.php
0 → 100644
View file @
0d4113c5
<?php
namespace
App\Http\Controllers
;
use
App\Contracts\ProjectServiceContract
;
use
App\Models\Group
;
use
App\Util\Message
;
use
Illuminate\Http\Request
;
class
ProjectController
extends
Controller
{
public
$mProject
;
public
function
__construct
(
ProjectServiceContract
$project
)
{
$this
->
mProject
=
$project
;
}
public
function
get
(
Request
$request
)
{
$projectid
=
$request
->
id
;
$project
=
$this
->
mProject
->
get
(
$projectid
);
if
(
count
(
$project
)
>
0
){
return
view
(
'admin/project/projectinformation'
,
compact
(
'project'
));
}
}
public
function
getAll
(
Request
$request
)
{
$groupid
=
$request
->
id
;
$projects
=
Group
::
find
(
$groupid
)
->
project
;
if
(
count
(
$projects
)
>
0
){
return
view
(
'admin/project/projecttables'
,
compact
(
'projects'
));
}
return
Message
::
makeError
(
'无数据!'
);
}
public
function
updatePage
(
Request
$request
)
{
$projectid
=
$request
->
id
;
$project
=
$this
->
mProject
->
get
(
$projectid
);
$result
=
$project
;
if
(
count
(
$project
)
>
0
){
return
view
(
'admin/project/update'
,
compact
(
'result'
));
}
return
Message
::
makeError
(
'错误'
);
}
public
function
update
(
Request
$request
)
{
$id
=
$request
->
id
;
$name
=
$request
->
name
;
$cover_img
=
$request
->
cover_img
;
$owner_id
=
$request
->
owner_id
;
$creator_id
=
$request
->
creator_id
;
$group_id
=
$request
->
group_id
;
$brief
=
$request
->
brief
;
$project
=
$this
->
mProject
->
update
(
$id
,
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
);
if
(
$project
){
return
back
();
}
}
public
function
search
(
Request
$request
)
{
$content
=
$request
->
search
;
$item
=
2
;
// 每页显示条数
$projects
=
$this
->
mProject
->
simpleSearch
(
$content
,
$item
);
if
(
count
(
$projects
)
>
0
){
return
view
(
'admin/project/projecliketables'
,
compact
(
'projects'
));
}
return
Message
::
makeError
(
'错误'
);
}
}
app/Http/Controllers/UserController.php
View file @
0d4113c5
...
@@ -73,7 +73,7 @@ class UserController extends Controller
...
@@ -73,7 +73,7 @@ class UserController extends Controller
public
function
getAll
()
public
function
getAll
()
{
{
$result
=
$this
->
mUser
->
getAll
(
2
);
$result
=
$this
->
mUser
->
getAll
(
8
);
if
(
$result
){
if
(
$result
){
return
view
(
'admin/usertables'
,
compact
(
'result'
));
return
view
(
'admin/usertables'
,
compact
(
'result'
));
}
else
{
}
else
{
...
@@ -102,7 +102,7 @@ class UserController extends Controller
...
@@ -102,7 +102,7 @@ class UserController extends Controller
return
Message
::
makeError
(
'没有参数'
);
return
Message
::
makeError
(
'没有参数'
);
}
}
$search_content
=
$request
->
search
;
$search_content
=
$request
->
search
;
$page
=
1
;
$page
=
8
;
$result
=
$this
->
mUser
->
simpleSearch
(
$search_content
,
$page
);
$result
=
$this
->
mUser
->
simpleSearch
(
$search_content
,
$page
);
return
view
(
'admin/user/userlike'
,[
'result'
=>
$result
,
'params'
=>
$search_content
]);
return
view
(
'admin/user/userlike'
,[
'result'
=>
$result
,
'params'
=>
$search_content
]);
...
...
app/Models/Group.php
View file @
0d4113c5
...
@@ -25,4 +25,9 @@ class Group extends Model
...
@@ -25,4 +25,9 @@ class Group extends Model
{
{
return
$this
->
hasMany
(
'App\Models\UserGroup'
,
'group_id'
);
return
$this
->
hasMany
(
'App\Models\UserGroup'
,
'group_id'
);
}
}
public
function
project
()
{
return
$this
->
hasMany
(
'App\Models\Project'
,
'creator_id'
);
}
}
}
app/Models/Project.php
View file @
0d4113c5
...
@@ -10,4 +10,9 @@ class Project extends Model
...
@@ -10,4 +10,9 @@ class Project extends Model
use
SoftDeletes
;
use
SoftDeletes
;
protected
$dates
=
[
'delete_at'
];
protected
$dates
=
[
'delete_at'
];
public
function
group
()
{
return
$this
->
hasOne
(
'App\Models\Group'
,
'id'
,
'creator_id'
);
}
}
}
app/Services/ProjectService.php
View file @
0d4113c5
...
@@ -11,8 +11,10 @@ namespace App\Services;
...
@@ -11,8 +11,10 @@ namespace App\Services;
use
App\Contracts\ProjectServiceContract
;
use
App\Contracts\ProjectServiceContract
;
use
App\Models\Group
;
use
App\Models\Project
;
use
App\Models\Project
;
use
App\Models\Task
;
use
App\Models\Task
;
use
App\Util\UploadPhoto
;
class
ProjectService
implements
ProjectServiceContract
class
ProjectService
implements
ProjectServiceContract
{
{
...
@@ -47,21 +49,32 @@ class ProjectService implements ProjectServiceContract
...
@@ -47,21 +49,32 @@ class ProjectService implements ProjectServiceContract
}
}
}
}
public
function
update
(
$
project_
id
,
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
)
public
function
update
(
$id
,
$name
,
$creator_id
,
$owner_id
,
$group_id
,
$brief
,
$cover_img
)
{
{
$project
=
Project
::
find
(
$
project_
id
);
$project
=
Project
::
find
(
$id
);
if
(
$project
==
null
){
if
(
$project
==
null
){
return
false
;
return
false
;
}
}
if
(
$cover_img
==
null
){
$project
->
owner_id
=
$owner_id
;
$project
->
creator_id
=
$creator_id
;
$project
->
name
=
$name
;
$project
->
brief
=
$brief
;
$project
->
group_id
=
$group_id
;
$result
=
$project
->
update
();
}
else
{
$upload
=
new
UploadPhoto
();
$imgPath
=
$upload
->
upload
(
$cover_img
);
$project
->
owner_id
=
$owner_id
;
$project
->
owner_id
=
$owner_id
;
$project
->
creator_id
=
$creator_id
;
$project
->
creator_id
=
$creator_id
;
$project
->
name
=
$name
;
$project
->
name
=
$name
;
$project
->
cover_img
=
$cover_img
;
$project
->
cover_img
=
$imgPath
;
$project
->
brief
=
$brief
;
$project
->
brief
=
$brief
;
$project
->
group_id
=
$group_id
;
$project
->
group_id
=
$group_id
;
$result
=
$project
->
update
();
$result
=
$project
->
update
();
}
if
(
$result
){
if
(
$result
){
return
true
;
return
true
;
...
@@ -73,6 +86,7 @@ class ProjectService implements ProjectServiceContract
...
@@ -73,6 +86,7 @@ class ProjectService implements ProjectServiceContract
public
function
get
(
$project_id
)
public
function
get
(
$project_id
)
{
{
$project
=
Project
::
find
(
$project_id
);
$project
=
Project
::
find
(
$project_id
);
if
(
$project
==
null
){
if
(
$project
==
null
){
return
null
;
return
null
;
}
else
{
}
else
{
...
@@ -175,4 +189,12 @@ class ProjectService implements ProjectServiceContract
...
@@ -175,4 +189,12 @@ class ProjectService implements ProjectServiceContract
}
}
public
function
simpleSearch
(
$id
,
$content
,
$item
)
{
$project
=
Project
::
where
(
'name'
,
'like'
,
'%'
.
$content
.
'%'
)
->
paginate
(
$item
);
return
$project
;
}
}
}
\ No newline at end of file
app/Services/UserService.php
View file @
0d4113c5
...
@@ -10,6 +10,7 @@ namespace App\Services;
...
@@ -10,6 +10,7 @@ namespace App\Services;
use
App\Contracts\UserServiceContract
;
use
App\Contracts\UserServiceContract
;
use
App\Models\Project
;
use
App\Models\User
;
use
App\Models\User
;
use
App\Util\FileUploader
;
use
App\Util\FileUploader
;
use
App\Util\UploadPhoto
;
use
App\Util\UploadPhoto
;
...
@@ -18,7 +19,7 @@ class UserService implements UserServiceContract
...
@@ -18,7 +19,7 @@ class UserService implements UserServiceContract
{
{
public
function
simpleSearch
(
$search_content
,
$page
)
public
function
simpleSearch
(
$search_content
,
$page
)
{
{
$users
=
User
::
where
(
'user_name'
,
'like'
,
'%'
.
$search_content
.
'%'
)
$users
=
User
::
where
(
'user_name'
,
'like'
,
'%'
.
$search_content
.
'%'
)
->
orWhere
(
'phone'
,
'like'
,
'%'
.
$search_content
.
'%'
)
->
orWhere
(
'phone'
,
'like'
,
'%'
.
$search_content
.
'%'
)
...
@@ -83,4 +84,5 @@ class UserService implements UserServiceContract
...
@@ -83,4 +84,5 @@ class UserService implements UserServiceContract
return
false
;
return
false
;
}
}
}
}
}
}
\ No newline at end of file
resources/views/admin/group/groupinformation.blade.php
View file @
0d4113c5
...
@@ -103,15 +103,12 @@
...
@@ -103,15 +103,12 @@
<
div
class
=
"active tab-pane"
id
=
"activity"
style
=
"overflow: hidden"
>
<
div
class
=
"active tab-pane"
id
=
"activity"
style
=
"overflow: hidden"
>
@
foreach
(
$groups
->
usergroup
as
$user
)
@
foreach
(
$groups
->
usergroup
as
$user
)
<
div
style
=
"float: left;margin-left: 50px;"
>
<
div
style
=
"float: left;margin-left: 50px;"
>
<
img
class
=
"profile-user-img img-responsive img-circle"
src
=
"
{
{url('storage/1.jpg')}
}
"
alt
=
"User profile picture"
style
=
"height: 110px;"
>
<
img
class
=
"profile-user-img img-responsive img-circle"
src
=
"
{
{url('storage/1.jpg')}
}
"
alt
=
"User profile picture"
style
=
"height: 110px;"
>
<
h3
class
=
"profile-username text-center"
>
{{
$user
->
users
[
0
][
'user_name'
]}}
</
h3
>
<
h3
class
=
"profile-username text-center"
>
{{
$user
->
users
[
0
][
'user_name'
]}}
</
h3
>
</
div
>
</
div
>
@
endforeach
@
endforeach
...
...
resources/views/admin/group/grouplike.blade.php
0 → 100644
View file @
0d4113c5
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
Content
Header
(
Page
header
)
-->
<
section
class
=
"content-header"
>
<
h1
>
团队列表
</
h1
>
<
ol
class
=
"breadcrumb"
>
<
li
><
a
href
=
"#"
><
i
class
=
"fa fa-dashboard"
></
i
>
Home
</
a
></
li
>
<
li
><
a
href
=
"#"
>
Tables
</
a
></
li
>
<
li
class
=
"active"
>
Data
tables
</
li
>
</
ol
>
</
section
>
<!--
Main
content
-->
<
section
class
=
"content"
>
<
div
class
=
"row"
>
<
div
class
=
"col-xs-12"
>
<
div
class
=
"box"
>
<
div
class
=
"box-header"
>
{{
--<
h3
class
=
"box-title"
></
h3
>--
}}
</
div
>
<!--
/.
box
-
header
-->
<
div
class
=
"box-body"
>
<
form
action
=
"
{
{url('group/search')}
}
"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-6"
>
<
div
class
=
"input-group"
>
<
input
type
=
"text"
class
=
"form-control"
placeholder
=
"团队名称"
name
=
"search"
>
<
span
class
=
"input-group-btn"
>
<
button
class
=
"btn btn-default"
>
搜索
</
button
>
</
span
>
</
div
><!--
/
input
-
group
-->
</
div
><!--
/.
col
-
lg
-
6
-->
</
div
><!--
/.
row
-->
</
form
>
<
br
>
<
table
id
=
"example2"
class
=
"table table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th
>
ID
</
th
>
<
th
>
团队名
</
th
>
<
th
>
简介
</
th
>
<
th
>
logo
</
th
>
<
th
>
状态
</
th
>
<
th
>
操作
</
th
>
</
tr
>
</
thead
>
</
thead
>
@
if
(
$groups
==
null
)
<
tbody
>
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align: center;color: red"
>
数据暂无
</
td
>
</
tr
>
</
tbody
>
</
table
>
@
else
@
foreach
(
$groups
as
$group
)
<
tbody
>
<
tr
>
<
td
>
{{
$group
->
id
}}
</
td
>
<
td
>
{{
$group
->
name
}}
</
td
>
<
td
>
{{
$group
->
brief
}}
</
td
>
<
td
><
img
src
=
"{{asset(
$group->logo
==''?'暂无':
$group->logo
)}}"
alt
=
""
width
=
"50px"
height
=
"40px"
>
</
td
>
<
td
>
{{
$group
->
status
}}
</
td
>
<
td
>
<
a
href
=
"{{route('group.get',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"{{route('group.updatePage',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
编辑
</
a
>
<
a
href
=
"
{
{route('group.transferPage',['id'=>$group->id])}
}
"
class
=
"btn bg-orange"
>
转让
</
a
>
<
a
href
=
"
{
{route('project.getAll',['id'=>$group->id])}
}
"
class
=
"btn btn-info"
>
查看团队项目
</
a
>
</
td
>
</
tr
>
</
tbody
>
@
endforeach
</
table
>
{{
$groups
->
appends
([
'search'
=>
$params
])
->
links
()
}}
</
div
>
<!--
/.
box
-
body
-->
</
div
>
<!--
/.
box
-->
</
div
>
<!--
/.
col
-->
</
div
>
<!--
/.
row
-->
</
section
>
@
endif
@
endsection
\ No newline at end of file
resources/views/admin/group/grouptables.blade.php
View file @
0d4113c5
...
@@ -46,8 +46,7 @@
...
@@ -46,8 +46,7 @@
<
thead
>
<
thead
>
<
tr
>
<
tr
>
<
th
>
ID
</
th
>
<
th
>
ID
</
th
>
<
th
>
创建人
</
th
>
<
th
>
拥有人
</
th
>
<
th
>
团队名
</
th
>
<
th
>
团队名
</
th
>
<
th
>
简介
</
th
>
<
th
>
简介
</
th
>
<
th
>
logo
</
th
>
<
th
>
logo
</
th
>
...
@@ -67,22 +66,24 @@
...
@@ -67,22 +66,24 @@
<
tbody
>
<
tbody
>
<
tr
>
<
tr
>
<
td
>
{{
$group
->
id
}}
</
td
>
<
td
>
{{
$group
->
id
}}
</
td
>
<
td
><
a
href
=
"
{
{route('user.get',$group->owner_id)}}">{{$group->creator->user_name}
}
</a></td>
<td>
{
{$group->owner->user_name}
}
</td>
<
td
>
{{
$group
->
name
}}
</
td
>
<
td
>
{{
$group
->
name
}}
</
td
>
<
td
>
{{
$group
->
brief
}}
</
td
>
<
td
>
{{
$group
->
brief
}}
</
td
>
<td>
{{$group->logo ==''?'暂无':
$group->logo
}}
</td>
<
td
>
<
img
src
=
"{{asset(
$group->logo
==''?'暂无':
$group->logo
)}}"
alt
=
""
width
=
"50px"
height
=
"40px"
>
</
td
>
<
td
>
{{
$group
->
status
}}
</
td
>
<
td
>
{{
$group
->
status
}}
</
td
>
<
td
>
<
td
>
<
a
href
=
"{{route('group.get',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"{{route('group.get',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"{{route('group.updatePage',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
编辑
</
a
>
<
a
href
=
"{{route('group.updatePage',['id' =>
$group->id
])}}"
class
=
"btn btn-info"
>
编辑
</
a
>
<
a
href
=
"
{
{route('group.transferPage',['id'=>$group->id])}
}
"
class
=
"btn bg-orange"
>
转让
</
a
>
<
a
href
=
"
{
{route('group.transferPage',['id'=>$group->id])}
}
"
class
=
"btn bg-orange"
>
转让
</
a
>
<
a
href
=
"
{
{route('project.getAll',['id'=>$group->id])}
}
"
class
=
"btn btn-info"
>
查看团队项目
</
a
>
</
td
>
</
td
>
</
tr
>
</
tr
>
</
tbody
>
</
tbody
>
@
endforeach
@
endforeach
</
table
>
</
table
>
{{
$groups
->
links
()
}}
{{
$groups
->
links
()
}}
{{
--
{{
$result
->
appends
([
'search'
=>
$params
])
->
links
()
}}
--
}}
</
div
>
</
div
>
<!--
/.
box
-
body
-->
<!--
/.
box
-
body
-->
</
div
>
</
div
>
...
...
resources/views/admin/project/grouptables.blade.php
0 → 100644
View file @
0d4113c5
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
Content
Header
(
Page
header
)
-->
<
section
class
=
"content-header"
>
<
h1
>
项目列表
{{
--<
small
>
advanced
tables
</
small
>--
}}
</
h1
>
<
ol
class
=
"breadcrumb"
>
<
li
><
a
href
=
"#"
><
i
class
=
"fa fa-dashboard"
></
i
>
Home
</
a
></
li
>
<
li
><
a
href
=
"#"
>
Tables
</
a
></
li
>
<
li
class
=
"active"
>
Data
tables
</
li
>
</
ol
>
</
section
>
<!--
Main
content
-->
<
section
class
=
"content"
>
<
div
class
=
"row"
>
<
div
class
=
"col-xs-12"
>
<
div
class
=
"box"
>
<
div
class
=
"box-header"
>
{{
--<
h3
class
=
"box-title"
>
Hover
Data
Table
</
h3
>--
}}
</
div
>
<!--
/.
box
-
header
-->
<
div
class
=
"box-body"
>
<
form
action
=
"
{
{url('group/search')}
}
"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-6"
>
<
div
class
=
"input-group"
>
<
input
type
=
"text"
class
=
"form-control"
placeholder
=
"团队名称"
name
=
"search"
>
<
span
class
=
"input-group-btn"
>
<
button
class
=
"btn btn-default"
>
搜索
</
button
>
</
span
>
</
div
><!--
/
input
-
group
-->
</
div
><!--
/.
col
-
lg
-
6
-->
</
div
><!--
/.
row
-->
</
form
>
<
br
>
<
table
id
=
"example2"
class
=
"table table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th
>
ID
</
th
>
<
th
>
创建人
</
th
>
<
th
>
拥有人
</
th
>
<
th
>
团队名
</
th
>
<
th
>
简介
</
th
>
<
th
>
logo
</
th
>
<
th
>
状态
</
th
>
<
th
>
操作
</
th
>
</
tr
>
</
thead
>
@
if
(
$groups
==
null
)
<
tbody
>
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align: center;color: red"
>
数据暂无
</
td
>
</
tr
>
</
tbody
>
</
table
>
@
else
@
foreach
(
$groups
as
$group
)
<
tbody
>
<
tr
>
<
td
>
{{
$group
->
id
}}
</
td
>
<
td
><
a
href
=
"
{
{route('user.get',$group->owner_id)}}">{{$group->creator->user_name}
}
</a></td>
<td>
{
{$group->owner->user_name}
}
</td>
<td>
{
{$group->name}
}
</td>
<td>
{
{$group->brief}
}
</td>
<td>{{$group->logo ==''?'暂无':
$group->logo
}}</td>
<td>
{
{$group->status}
}
</td>
<td>
<a href="
{{
route
(
'group.get'
,[
'id'
=>
$group
->
id
])}}
" class="
btn
btn
-
info
" > 查看详情 </a>
<a href="
{{
route
(
'group.updatePage'
,[
'id'
=>
$group
->
id
])}}
" class="
btn
btn
-
info
"> 编辑 </a>
<a href="
{{
route
(
'group.transferPage'
,[
'id'
=>
$group
->
id
])}}
" class="
btn
bg
-
orange
"> 转让 </a>
</td>
</tr>
</tbody>
@endforeach
</table>
{{
$groups->links
() }}
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
@endif
@endsection
\ No newline at end of file
resources/views/admin/project/projecliketables.blade.php
0 → 100644
View file @
0d4113c5
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
Content
Header
(
Page
header
)
-->
<
section
class
=
"content-header"
>
<
h1
>
项目列表
{{
--<
small
>
advanced
tables
</
small
>--
}}
</
h1
>
<
ol
class
=
"breadcrumb"
>
<
li
><
a
href
=
"#"
><
i
class
=
"fa fa-dashboard"
></
i
>
Home
</
a
></
li
>
<
li
><
a
href
=
"#"
>
Tables
</
a
></
li
>
<
li
class
=
"active"
>
Data
tables
</
li
>
</
ol
>
</
section
>
<!--
Main
content
-->
<
section
class
=
"content"
>
<
div
class
=
"row"
>
<
div
class
=
"col-xs-12"
>
<
div
class
=
"box"
>
<
div
class
=
"box-header"
>
{{
--<
h3
class
=
"box-title"
>
Hover
Data
Table
</
h3
>--
}}
</
div
>
<!--
/.
box
-
header
-->
<
div
class
=
"box-body"
>
<
form
action
=
"
{
{url('project/search')}
}
"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-6"
>
<
div
class
=
"input-group"
>
<
input
type
=
"text"
class
=
"form-control"
placeholder
=
"项目名称"
name
=
"search"
>
<
span
class
=
"input-group-btn"
>
<
button
class
=
"btn btn-default"
>
搜索
</
button
>
</
span
>
</
div
><!--
/
input
-
group
-->
</
div
><!--
/.
col
-
lg
-
6
-->
</
div
><!--
/.
row
-->
</
form
>
<
br
>
<
table
id
=
"example2"
class
=
"table table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th
>
ID
</
th
>
<
th
>
项目名
</
th
>
<
th
>
创建者
</
th
>
<
th
>
简介
</
th
>
<
th
>
cover_img
</
th
>
<
th
>
操作
</
th
>
</
tr
>
</
thead
>
@
if
(
$projects
==
null
)
<
tbody
>
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align: center;color: red"
>
数据暂无
</
td
>
</
tr
>
</
tbody
>
</
table
>
@
else
@
foreach
(
$projects
as
$project
)
<
tbody
>
<
tr
>
<
td
>
{{
$project
[
'id'
]}}
</
td
>
<
td
>
{{
$project
[
'name'
]}}
</
td
>
<
td
>
{{
$project
->
group
[
'name'
]}}
</
td
>
<
td
>
{{
$project
[
'brief'
]}}
</
td
>
<
td
><
img
src
=
"
{
{$project['cover_img']==''?url('storage/1.jpg'):asset($project['cover_img'])}
}
"
alt
=
""
width
=
"50px"
height
=
"40px"
>
</
td
>
<
td
>
<
a
href
=
"
{
{route('project.get',['id'=>$project['id']])}
}
"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"
{
{route('project.updatePage',['id'=>$project['id']])}
}
"
class
=
"btn btn-info"
>
编辑
</
a
>
</
td
>
</
tr
>
</
tbody
>
@
endforeach
</
table
>
{{
--
{{
$groups
->
links
()
}}
--
}}
</
div
>
<!--
/.
box
-
body
-->
</
div
>
<!--
/.
box
-->
</
div
>
<!--
/.
col
-->
</
div
>
<!--
/.
row
-->
</
section
>
@
endif
@
endsection
\ No newline at end of file
resources/views/admin/project/projectinformation.blade.php
0 → 100644
View file @
0d4113c5
This diff is collapsed.
Click to expand it.
resources/views/admin/project/projecttables.blade.php
0 → 100644
View file @
0d4113c5
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
Content
Header
(
Page
header
)
-->
<
section
class
=
"content-header"
>
<
h1
>
项目列表
{{
--<
small
>
advanced
tables
</
small
>--
}}
</
h1
>
<
ol
class
=
"breadcrumb"
>
<
li
><
a
href
=
"#"
><
i
class
=
"fa fa-dashboard"
></
i
>
Home
</
a
></
li
>
<
li
><
a
href
=
"#"
>
Tables
</
a
></
li
>
<
li
class
=
"active"
>
Data
tables
</
li
>
</
ol
>
</
section
>
<!--
Main
content
-->
<
section
class
=
"content"
>
<
div
class
=
"row"
>
<
div
class
=
"col-xs-12"
>
<
div
class
=
"box"
>
<
div
class
=
"box-header"
>
{{
--<
h3
class
=
"box-title"
>
Hover
Data
Table
</
h3
>--
}}
</
div
>
<!--
/.
box
-
header
-->
<
div
class
=
"box-body"
>
{{
--<
form
action
=
"
{
{url('project/search')}}">--}
}
{{--<div class="
row
">--}}
{{--<div class="
col
-
lg
-
6
">--}}
{{--<div class="
input
-
group
">--}}
{{--<input type="
text
" class="
form
-
control
" placeholder="
项目名称
" name="
search
">--}}
{{--<span class="
input
-
group
-
btn
">--}}
{{--<button class="
btn
btn
-
default
" > 搜索 </button>--}}
{
{--</span>--}
}
{{--</div><!-- /input-group -->--}}
{{--</div><!-- /.col-lg-6 -->--}}
{{--</div><!-- /.row -->--}}
{
{--</form>--}
}
<br>
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<th>ID</th>
<th>项目名</th>
<th>创建者</th>
<th>简介</th>
<th>cover_img</th>
<th>操作</th>
</tr>
</thead>
@if(
$projects
== null)
<tbody>
<tr>
<td colspan="
8
" style="
text
-
align
:
center
;
color
:
red
"> 数据暂无 </td>
</tr>
</tbody>
</table>
@else
@foreach(
$projects
as
$project
)
<tbody>
<tr>
<td>
{
{$project['id']}
}
</td>
<td>
{
{$project['name']}
}
</td>
<td>
{
{$project->group['name']}
}
</td>
<td>
{
{$project['brief']}
}
</td>
<td><img src="
{{
$project
[
'cover_img'
]
==
''
?
url
(
'storage/1.jpg'
)
:
asset
(
$project
[
'cover_img'
])}}
" alt="" width="
50
px
" height="
40
px
"> </td>
<td>
<a href="
{{
route
(
'project.get'
,[
'id'
=>
$project
[
'id'
]])}}
" class="
btn
btn
-
info
" > 查看详情 </a>
<a href="
{{
route
(
'project.updatePage'
,[
'id'
=>
$project
[
'id'
]])}}
" class="
btn
btn
-
info
"> 编辑 </a>
</td>
</tr>
</tbody>
@endforeach
</table>
{{--{{
$groups->links
() }}--}}
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
@endif
@endsection
\ No newline at end of file
resources/views/admin/project/update.blade.php
0 → 100644
View file @
0d4113c5
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
general
form
elements
-->
<
div
class
=
"box box-primary"
>
<
div
class
=
"box-header with-border"
>
<
h3
class
=
"box-title"
>
项目信息编辑
</
h3
>
</
div
>
<!--
/.
box
-
header
-->
<!--
form
start
-->
<
form
role
=
"form"
action
=
"
{
{route('project.update')}
}
"
method
=
"post"
enctype
=
"multipart/form-data"
>
{{
csrf_field
()}}
<
div
class
=
"box-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputFile"
>
项目Logo
</
label
>
<
p
>
<
img
src
=
"
{
{asset($result['cover_img']==''?url('storage/1.jpg'):$result['cover_img'])}
}
"
alt
=
""
width
=
"100px"
height
=
"80px"
style
=
"border-radius: 80%"
>
</
p
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
项目名称
</
label
>
<
input
type
=
"text"
class
=
"form-control"
id
=
"exampleInputEmail1"
placeholder
=
"User_email"
name
=
"name"
value
=
"
{
{$result['name']}
}
"
>
<
input
type
=
"hidden"
name
=
"id"
value
=
"
{
{$result['id']}
}
"
>
<
input
type
=
"hidden"
name
=
"group_id"
value
=
"
{
{$result->group['id']}
}
"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
项目创建者
</
label
>
<
input
type
=
"text"
class
=
"form-control"
id
=
"exampleInputEmail1"
placeholder
=
"User_email"
value
=
"
{
{$result->group['name']}
}
"
readonly
>
<
input
type
=
"hidden"
name
=
"creator_id"
value
=
"
{
{$result['creator_id']}
}
"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputEmail1"
>
项目拥有者
</
label
>
<
input
type
=
"text"
class
=
"form-control"
id
=
"exampleInputEmail1"
placeholder
=
"User_email"
value
=
"
{
{$result->group['name']}
}
"
readonly
>
<
input
type
=
"hidden"
name
=
"owner_id"
value
=
"
{
{$result['owner_id']}
}
"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputPassword1"
>
简介
</
label
>
<
input
type
=
"text"
class
=
"form-control"
id
=
"exampleInputPassword1"
placeholder
=
"Real_name"
name
=
"brief"
value
=
"
{
{$result['brief']}
}
"
>
</
div
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleInputFile"
>
更换头像
</
label
>
<
input
type
=
"file"
id
=
"exampleInputFile"
name
=
"cover_img"
>
</
div
>
</
div
>
<!--
/.
box
-
body
-->
<
div
class
=
"box-footer"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
保存
</
button
>
</
div
>
</
form
>
</
div
>
<
script
src
=
"
{
{url('js/jquery-3.2.1.min.js')}
}
"
>
</
script
>
{{
--<
script
>--
}}
{{
--
$
(
"#exampleInputFile"
)
.
change
(
function
(){
--
}}
{{
--
var
file
=
this
.
files
[
0
];
--
}}
{{
--//
判断文件大小
--
}}
{{
--
if
(
file
.
size
>
5
*
1024
*
1024
){
--
}}
{{
--
alert
(
'文件过大!'
);
--
}}
{{
--
}
--
}}
{{
--//
使用FileReader
接口
--
}}
{{
--
var
reader
=
new
FileReader
();
--
}}
{{
--//
成功读取
--
}}
{{
--
reader
.
onload
=
function
(){
--
}}
{{
--//
通过reader
.
result
属性
来访问生成的
base
64
DataURL
--
}}
{{
--
var
fileInfo
=
reader
.
result
;
--
}}
{{
--
$
(
'#Preview'
)
.
attr
(
'src'
,
fileInfo
)
.
css
({
width
:
100
,
height
:
90
});
--
}}
{{
--//
console
.
log
(
fileInfo
);
--
}}
{{
--
var
name
=
$
(
'#exampleInputFile'
)
.
val
();
--
}}
{{
--//
分割字符串
--
}}
{{
--
var
arr
=
name
.
split
(
'\\'
);
--
}}
{{
--
var
fileName
=
arr
[
arr
.
length
-
1
];
--
}}
{{
--
base64_uploading
(
fileInfo
,
fileName
);
--
}}
{{
--
}
--
}}
{{
--
reader
.
readAsDataURL
(
file
);
--
}}
{{
--
})
--
}}
{{
--//
AJAX
上传base
64
--
}}
{{
--
function
base64_uploading
(
base64Data
,
fileName
){
--
}}
{{
--
$
.
ajax
({
--
}}
{{
--
type
:
'post'
,
--
}}
{{
--
url
:
"
{
{url('user/update')}}",--}
}
{{--data:
{
--}
}
{
{--'base64':base64Data,--}
}
{
{--'name':fileName--}
}
{
{--},--}
}
{
{--dataType:"json",--}
}
{{--headers:
{
--}
}
{{--'X-CSRF-TOKEN': $('meta[name="
_token
"]').attr('content')--}}
{
{--},--}
}
{
{--success:function(data){--}
}
{
{--console.log(data);--}
}
{{--if (data ==1 )
{
--}
}
{
{--alert('上传成功')--}
}
{
{--
}
else
{
--}
}
{
{--alert('上传失败')--}
}
{
{--}--}
}
{
{--},--}
}
{{--error:function (data)
{
--}
}
{
{--alert(1);--}
}
{
{--console.log(data);--}
}
{
{--}--}
}
{
{--})--}
}
{
{--}--}
}
{
{--</script>--}
}
@endsection
\ No newline at end of file
resources/views/admin/sidebar.blade.php
View file @
0d4113c5
...
@@ -64,6 +64,33 @@
...
@@ -64,6 +64,33 @@
</li>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
项目管理
</span>
<span
class=
"pull-right-container"
>
<i
class=
"fa fa-angle-left pull-right"
></i>
</span>
</a>
<ul
class=
"treeview-menu"
>
<li><a
href=
""
>
项目列表
</a></li>
{{--
<li><a
href=
"#"
>
Link in level 2
</a></li>
--}}
</ul>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
日程管理
</span>
<span
class=
"pull-right-container"
>
<i
class=
"fa fa-angle-left pull-right"
></i>
</span>
</a>
<ul
class=
"treeview-menu"
>
<li><a
href=
""
>
日程列表
</a></li>
{{--
<li><a
href=
"#"
>
Link in level 2
</a></li>
--}}
</ul>
</li>
<li
class=
"treeview"
>
<li
class=
"treeview"
>
<a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
系统设置
</span>
<a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
系统设置
</span>
...
...
routes/web.php
View file @
0d4113c5
...
@@ -70,6 +70,15 @@ Route::group(['prefix'=> 'group'],function (){
...
@@ -70,6 +70,15 @@ Route::group(['prefix'=> 'group'],function (){
Route
::
get
(
'search'
,
'GroupController@simpleSearch'
)
->
name
(
'group.search'
);
Route
::
get
(
'search'
,
'GroupController@simpleSearch'
)
->
name
(
'group.search'
);
});
});
// 项目
Route
::
group
([
'prefix'
=>
'project'
],
function
(){
Route
::
get
(
'getAll'
,
'ProjectController@getAll'
)
->
name
(
'project.getAll'
);
Route
::
get
(
'get'
,
'ProjectController@get'
)
->
name
(
'project.get'
);
Route
::
get
(
'updatePage'
,
'ProjectController@updatePage'
)
->
name
(
'project.updatePage'
);
Route
::
post
(
'update'
,
'ProjectController@update'
)
->
name
(
'project.update'
);
Route
::
get
(
'search'
,
'ProjectController@search'
)
->
name
(
'project.search'
);
});
...
...
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