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
aecfe4c6
Commit
aecfe4c6
authored
Dec 12, 2017
by
mengyixi
Browse files
Options
Browse Files
Download
Plain Diff
文件类型统计
parents
b0bf964e
5106c602
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
FileController.php
app/Http/Controllers/FileController.php
+2
-2
GroupController.php
app/Http/Controllers/GroupController.php
+1
-1
groupinformation.blade.php
resources/views/admin/group/groupinformation.blade.php
+14
-15
No files found.
app/Http/Controllers/FileController.php
View file @
aecfe4c6
...
...
@@ -33,12 +33,12 @@ class FileController extends Controller
public
function
groupSpace
(
Request
$request
)
{
$group_id
=
$request
->
group_id
;
$result
=
$this
->
mFile
->
groupSpace
(
$group_id
);
$mbyte
=
ceil
(
$result
/
1048576
)
;
$space
=
10
-
$mbyte
;
$finalspace
=
array
(
"space"
=>
$space
,
"usespace"
=>
$mbyte
);
$finalspace
=
json_encode
(
$finalspace
);
$finalspace
=
array
([
'value'
=>
$mbyte
,
'name'
=>
'已用空间'
],[
'value'
=>
$space
,
'name'
=>
'剩余空间'
]);
return
$finalspace
;
}
...
...
app/Http/Controllers/GroupController.php
View file @
aecfe4c6
...
...
@@ -37,7 +37,7 @@ class GroupController extends Controller
$groups
=
$this
->
mGroup
->
get
(
$id
);
$files
=
$this
->
mFile
->
getAll
(
120
);
if
(
$groups
){
return
view
(
'admin/group/groupinformation'
,
compact
(
'groups'
,
'files'
));
return
view
(
'admin/group/groupinformation'
,
compact
(
'groups'
,
'files'
,
'id'
));
}
return
Message
::
makeError
(
'查找失败'
);
}
...
...
resources/views/admin/group/groupinformation.blade.php
View file @
aecfe4c6
...
...
@@ -95,6 +95,8 @@
<
th
>
文件夹
</
th
>
<
th
>
所属项目
</
th
>
<
th
>
创建者
</
th
>
<
th
>
Bucket
</
th
>
<
th
>
pointer
</
th
>
{{
--<
th
>
操作
</
th
>--
}}
</
tr
>
</
thead
>
...
...
@@ -116,6 +118,7 @@
<
td
>
{{
$file
->
folder_id
}}
</
td
>
<
td
>
{{
$file
->
fileInProject
->
name
}}
</
td
>
<
td
>
{{
$file
->
fileCreator
->
user_name
}}
</
td
>
<
td
></
td
>
<
td
>
{{
--<
a
href
=
"{{route('file.get',['id' =>
$file->id
])}}"
class
=
"btn btn-info"
>
查看详情
</
a
>--
}}
{{
--<
a
href
=
"{{route('file.delete',['id' =>
$file->id
])}}"
class
=
"btn bg-orange"
>
删除
</
a
>--
}}
...
...
@@ -131,10 +134,8 @@
<!--
/.
tab
-
pane
-->
<
div
class
=
"tab-pane"
id
=
"settings"
>
<
div
id
=
"main"
style
=
"width: 600px;height:400px;"
></
div
>
<
input
type
=
"text"
value
=
""
>
<
input
type
=
"hidden"
value
=
"
{
{$id}
}
"
id
=
"id"
>
</
div
>
<!--
/.
tab
-
pane
-->
</
div
>
...
...
@@ -162,18 +163,16 @@
// ------------------ ajax ---------------//
groupSpance
();
function
groupSpance
(){
var
id
=
document
.
getElementById
(
'id'
)
.
value
;
$
.
ajax
({
type
:
'get'
,
url
:
'{{route('
file
.
groupSpace
')}}'
,
data
:
{
group_id
:
id
},
success
:
function
(
data
){
console
.
log
(
data
);
if
(
data
==
''
){
alert
(
111
);
}
else
{
console
.
log
(
option
[
'series'
]);
}
option
[
'series'
][
0
][
'data'
]
=
data
;
myChart
.
setOption
(
option
);
},
error
:
function
(
data
){
console
.
log
(
'错误'
);
...
...
@@ -185,8 +184,8 @@
option
=
{
title
:
{
text
:
'
当前团队
空间使用情况'
,
subtext
:
'
这是真的
'
,
text
:
'
团队存储
空间使用情况'
,
subtext
:
'
单位:MB
'
,
x
:
'center'
},
tooltip
:
{
...
...
@@ -205,8 +204,8 @@
radius
:
'55%'
,
center
:
[
'50%'
,
'60%'
],
data
:
[
{
value
:
335
,
name
:
'全部空间'
},
{
value
:
310
,
name
:
'已经使用'
}
//
{value:335, name:'全部空间'},
//
{value:310, name:'已经使用'}
],
itemStyle
:
{
emphasis
:
{
...
...
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