Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GaiaXalter
Ygopro Arena Web
Commits
b841a375
Commit
b841a375
authored
Nov 01, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
比例图
parent
653fcc8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
4 deletions
+98
-4
src/components/Report.vue
src/components/Report.vue
+98
-4
No files found.
src/components/Report.vue
View file @
b841a375
...
@@ -63,6 +63,16 @@
...
@@ -63,6 +63,16 @@
<div
id=
"myChart"
:style=
"
{width: '100%', height: '400px'}">
</div>
<div
id=
"myChart"
:style=
"
{width: '100%', height: '400px'}">
</div>
<hr>
<div
id=
"myChart2"
:style=
"
{width: '100%', height: '600px'}">
</div>
<hr>
<div
id=
"myChart3"
:style=
"
{width: '100%', height: '600px'}">
</div>
<br>
<br>
<br>
<!--
<el-table
:data=
"history.data"
stripe
style=
"width: 100%"
>
<!--
<el-table
:data=
"history.data"
stripe
style=
"width: 100%"
>
<el-table-column
prop=
"usernamea"
label=
"玩家A"
width=
"180"
>
<el-table-column
prop=
"usernamea"
label=
"玩家A"
width=
"180"
>
...
@@ -202,6 +212,8 @@
...
@@ -202,6 +212,8 @@
drawLine
()
{
drawLine
()
{
// 基于准备好的dom,初始化echarts实例
// 基于准备好的dom,初始化echarts实例
this
.
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'
myChart
'
))
this
.
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'
myChart
'
))
this
.
myChart2
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'
myChart2
'
))
this
.
myChart3
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'
myChart3
'
))
},
},
searchTextChange
:
function
()
{
searchTextChange
:
function
()
{
var
username
=
this
.
username
var
username
=
this
.
username
...
@@ -233,17 +245,15 @@
...
@@ -233,17 +245,15 @@
},
},
renderTable
:
function
()
{
renderTable
:
function
()
{
var
params
=
{
var
params
=
{
from_date
:
this
.
from_date
,
from_date
:
this
.
from_date
?
moment
(
this
.
from_date
).
format
(
"
YYYY-MM-DD
"
)
:
moment
().
format
(
"
YYYY-MM-DD
"
)
,
to_date
:
this
.
to_date
to_date
:
this
.
to_date
?
moment
(
this
.
to_date
).
add
(
1
,
'
day
'
).
format
(
"
YYYY-MM-DD
"
)
:
moment
().
add
(
1
,
'
day
'
).
format
(
"
YYYY-MM-DD
"
),
}
}
var
_this
=
this
;
var
_this
=
this
;
API
.
getReport
(
params
).
then
((
res
)
=>
{
API
.
getReport
(
params
).
then
((
res
)
=>
{
_this
.
report
=
res
.
data
_this
.
report
=
res
.
data
console
.
log
(
_this
.
report
)
var
colors
=
[
'
#5793f3
'
,
'
#d14a61
'
,
'
#675bba
'
];
var
colors
=
[
'
#5793f3
'
,
'
#d14a61
'
,
'
#675bba
'
];
var
option
=
{
var
option
=
{
title
:
{
text
:
'
战斗场次走势图
'
},
title
:
{
text
:
'
战斗场次走势图
'
},
color
:
colors
,
color
:
colors
,
...
@@ -329,6 +339,90 @@
...
@@ -329,6 +339,90 @@
_this
.
myChart
.
setOption
(
option
);
_this
.
myChart
.
setOption
(
option
);
option
=
{
title
:
{
text
:
'
时段场数比例图
'
,
subtext
:
'
竞技场, 统计天数:
'
+
_this
.
report
.
totalDays
+
"
天, 总场数:
"
+
_this
.
report
.
totalAthletic
,
x
:
'
left
'
},
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
function
(
p
)
{
return
p
.
data
.
name
+
"
: 总
"
+
p
.
data
.
value
+
"
场, 均
"
+
p
.
data
.
avg
+
"
场 (
"
+
p
.
percent
+
"
%)
"
}
},
legend
:
{
orient
:
'
vertical
'
,
right
:
10
,
top
:
20
,
bottom
:
20
,
data
:
_this
.
report
.
legendDataAthletic
},
series
:
[
{
name
:
'
时段
'
,
type
:
'
pie
'
,
radius
:
'
80%
'
,
center
:
[
'
50%
'
,
'
50%
'
],
data
:
_this
.
report
.
seriesDataAthletic
,
itemStyle
:
{
emphasis
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'
rgba(0, 0, 0, 0.5)
'
}
}
}
]
};
_this
.
myChart2
.
setOption
(
option
);
option
=
{
title
:
{
text
:
'
时段场数比例图
'
,
subtext
:
'
娱乐场, 统计天数:
'
+
_this
.
report
.
totalDays
+
"
天, 总场数:
"
+
_this
.
report
.
totalEntertain
,
x
:
'
left
'
},
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
function
(
p
)
{
return
p
.
data
.
name
+
"
: 总
"
+
p
.
data
.
value
+
"
场, 均
"
+
p
.
data
.
avg
+
"
场 (
"
+
p
.
percent
+
"
%)
"
}
},
legend
:
{
orient
:
'
vertical
'
,
right
:
10
,
top
:
20
,
bottom
:
20
,
data
:
_this
.
report
.
legendDataEntertain
},
series
:
[
{
name
:
'
时段
'
,
type
:
'
pie
'
,
radius
:
'
80%
'
,
center
:
[
'
50%
'
,
'
50%
'
],
data
:
_this
.
report
.
seriesDataEntertain
,
itemStyle
:
{
emphasis
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'
rgba(0, 0, 0, 0.5)
'
}
}
}
]
};
_this
.
myChart3
.
setOption
(
option
);
},
(
res
)
=>
{
},
(
res
)
=>
{
//
//
})
})
...
...
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