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
f210bfef
Commit
f210bfef
authored
Dec 13, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some change
parent
f7dc69e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
99 deletions
+108
-99
FileController.php
app/Http/Controllers/FileController.php
+8
-2
filetables.blade.php
resources/views/admin/file/filetables.blade.php
+0
-94
oss.blade.php
resources/views/admin/file/oss.blade.php
+96
-0
index.blade.php
resources/views/admin/index.blade.php
+2
-2
sidebar.blade.php
resources/views/admin/sidebar.blade.php
+1
-1
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/FileController.php
View file @
f210bfef
...
@@ -46,8 +46,8 @@ class FileController extends Controller
...
@@ -46,8 +46,8 @@ class FileController extends Controller
{
{
$result
=
$this
->
mFile
->
ossSpace
();
$result
=
$this
->
mFile
->
ossSpace
();
$gbyte
=
$result
/
1073741824
;
$gbyte
=
ceil
(
$result
/
1073741824
)
;
$space
=
40
-
$gbyte
;
$space
=
ceil
(
40
-
$gbyte
)
;
$finalspace
=
array
([
"value"
=>
$space
,
"name"
=>
"剩余空间"
],[
"value"
=>
$gbyte
,
"name"
=>
"已用空间"
]);
$finalspace
=
array
([
"value"
=>
$space
,
"name"
=>
"剩余空间"
],[
"value"
=>
$gbyte
,
"name"
=>
"已用空间"
]);
return
$finalspace
;
return
$finalspace
;
}
}
...
@@ -58,4 +58,10 @@ class FileController extends Controller
...
@@ -58,4 +58,10 @@ class FileController extends Controller
$result
=
$this
->
mFile
->
countFile
(
$group_id
);
$result
=
$this
->
mFile
->
countFile
(
$group_id
);
return
$result
;
return
$result
;
}
}
public
function
ossStatistics
()
{
return
view
(
'admin/file/oss'
);
}
}
}
resources/views/admin/file/filetables.blade.php
deleted
100644 → 0
View file @
f7dc69e9
@
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
=
"#"
>
<
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
>
size
</
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
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
{{
--
{{
$result
->
appends
([
'search'
=>
$params
])
->
links
()
}}
--
}}
</
div
>
<!--
/.
box
-
body
-->
</
div
>
<!--
/.
box
-->
</
div
>
<!--
/.
col
-->
</
div
>
<!--
/.
row
-->
</
section
>
@
endsection
\ No newline at end of file
resources/views/admin/file/oss.blade.php
0 → 100644
View file @
f210bfef
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<
div
>
<
div
style
=
"float: left"
>
<
div
id
=
"main"
style
=
"width: 500px;height:400px;"
></
div
>
</
div
>
</
div
>
<
script
src
=
"
{
{url('js/echarts.js')}
}
"
></
script
>
<
script
src
=
"
{
{url('js/jquery-3.2.1.min.js')}
}
"
>
</
script
>
<
script
>
// 基于准备好的dom,初始化echarts实例
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'main'
));
// ------------------ ajax ---------------//
groupSpance
();
function
groupSpance
(){
$
.
ajax
({
type
:
'get'
,
url
:
'{{route('
file
.
ossSpace
')}}'
,
data
:
{
group_id
:
'120'
},
success
:
function
(
data
){
option
[
'series'
][
0
][
'data'
]
=
data
;
myChart
.
setOption
(
option
);
},
error
:
function
(
data
){
console
.
log
(
'错误'
);
}
});
}
option
=
{
title
:
{
text
:
'OSS存储使用情况'
,
subtext
:
'单位:GB'
,
x
:
'center'
},
tooltip
:
{
trigger
:
'item'
,
formatter
:
"
{
a
}
<br/>
{
b
}
:
{
c
}
(
{
d
}
%)"
},
legend
:
{
orient
:
'vertical'
,
left
:
'left'
,
data
:
[
'全部空间'
,
'已经使用'
]
},
series
:
[
{
name
:
'空间使用'
,
type
:
'pie'
,
radius
:
'55%'
,
center
:
[
'50%'
,
'60%'
],
data
:
[
// {value:335, name:'全部空间'},
// {value:310, name:'已经使用'}
],
itemStyle
:
{
emphasis
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
</
script
>
@
endsection
\ No newline at end of file
resources/views/admin/index.blade.php
View file @
f210bfef
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
<
div
class
=
"inner"
style
=
"background-color: #ebccd1"
>
<
div
class
=
"inner"
style
=
"background-color: #ebccd1"
>
<
h3
>
0
</
h3
>
<
h3
>
0
</
h3
>
<
p
>
全部
日程
</
p
>
<
p
>
全部
团队
</
p
>
</
div
>
</
div
>
<
div
class
=
"icon"
>
<
div
class
=
"icon"
>
<
i
class
=
"ion ion-person-add"
></
i
>
<
i
class
=
"ion ion-person-add"
></
i
>
...
@@ -245,7 +245,7 @@
...
@@ -245,7 +245,7 @@
optiona
[
'legend'
][
'data'
]
=
data
[
0
];
optiona
[
'legend'
][
'data'
]
=
data
[
0
];
optiona
[
'series'
][
0
][
'data'
]
=
data
[
1
];
optiona
[
'series'
][
0
][
'data'
]
=
data
[
1
];
console
.
log
(
optiona
[
'series'
]);
//
console.log(optiona['series']);
myChart
.
setOption
(
optiona
);
myChart
.
setOption
(
optiona
);
},
},
...
...
resources/views/admin/sidebar.blade.php
View file @
f210bfef
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
</span>
</span>
</a>
</a>
<ul
class=
"treeview-menu"
>
<ul
class=
"treeview-menu"
>
<li><a
href=
"
"
>
文件列表
</a></li>
<li><a
href=
"
{{route('file.ossStatistics')}}"
>
OSS 使用统计
</a></li>
{{--
<li><a
href=
"#"
>
Link in level 2
</a></li>
--}}
{{--
<li><a
href=
"#"
>
Link in level 2
</a></li>
--}}
</ul>
</ul>
...
...
routes/web.php
View file @
f210bfef
...
@@ -118,6 +118,7 @@ Route::get('/',function (){return view('login');})->name('admin.login');
...
@@ -118,6 +118,7 @@ Route::get('/',function (){return view('login');})->name('admin.login');
Route
::
get
(
'group_space'
,
'FileController@groupSpace'
)
->
name
(
'file.groupSpace'
);
Route
::
get
(
'group_space'
,
'FileController@groupSpace'
)
->
name
(
'file.groupSpace'
);
Route
::
get
(
'oss_space'
,
'FileController@ossSpace'
)
->
name
(
'file.ossSpace'
);
Route
::
get
(
'oss_space'
,
'FileController@ossSpace'
)
->
name
(
'file.ossSpace'
);
Route
::
get
(
'count_file'
,
'FileController@countFile'
)
->
name
(
'file.countFile'
);
Route
::
get
(
'count_file'
,
'FileController@countFile'
)
->
name
(
'file.countFile'
);
Route
::
get
(
'oss_statistics'
,
'FileController@ossStatistics'
)
->
name
(
'file.ossStatistics'
);
});
});
...
...
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