Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
binhai-video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
binhai-jiaoguan
binhai-video
Commits
107d70ce
Commit
107d70ce
authored
Nov 17, 2023
by
ZhangKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 修改 统计功能 折线图和环形图显示样式
parent
0a321e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
index.vue
src/views/dataStatistics/index.vue
+30
-3
No files found.
src/views/dataStatistics/index.vue
View file @
107d70ce
...
...
@@ -109,9 +109,9 @@
<!-- echarts图容器 -->
<div
v-loading=
"loading"
class=
"echarts-box"
>
<!-- 时间段车流量波动展示 -->
<div
ref=
"flowNumberChart"
class=
"flow-number"
/>
<div
ref=
"flowNumberChart"
class=
"flow-number"
/>
<!-- 车型流量占比统计 -->
<div
ref=
"flowRatioChart"
class=
"flow-ratio"
/>
<div
ref=
"flowRatioChart"
class=
"flow-ratio"
/>
</div>
</div>
</
template
>
...
...
@@ -198,6 +198,8 @@ export default {
flowNumberData
:
[],
// 车型流量占比数据
flowRatioData
:
[],
// 时间段车流量图例
legendContent
:
'日报'
,
// 测试数据
testData
:
{
flow
:
[
...
...
@@ -316,9 +318,23 @@ export default {
}
},
tooltip
:
{
trigger
:
'axis'
// 添加 tooltip 属性
trigger
:
'axis'
,
// 添加 tooltip 属性
formatter
:
function
(
params
)
{
return
params
[
0
].
name
+
' 客运量 '
+
params
[
0
].
value
}
},
legend
:
{
orient
:
'horizontal'
,
x
:
'center'
,
y
:
'top'
,
top
:
'10%'
,
textStyle
:
{
fontSize
:
15
},
data
:
[
this
.
legendContent
]
},
series
:
[{
name
:
this
.
legendContent
,
type
:
'line'
,
smooth
:
true
,
data
:
this
.
flowNumberData
[
0
]
// 使用 flowNumberData
...
...
@@ -417,6 +433,17 @@ export default {
// this.resetQueryParams()
// this.getNowDate()
this
.
queryParams
.
timePoint
=
null
if
(
this
.
queryParams
.
dataType
===
'day'
)
{
this
.
legendContent
=
'日报'
}
else
if
(
this
.
queryParams
.
dataType
===
'week'
)
{
this
.
legendContent
=
'周报'
}
else
if
(
this
.
queryParams
.
dataType
===
'month'
)
{
this
.
legendContent
=
'月报'
}
else
if
(
this
.
queryParams
.
dataType
===
'year'
)
{
this
.
legendContent
=
'年报'
}
else
{
this
.
legendContent
=
'日报'
}
},
/** 获取当前日期 */
// 在组件的方法中更新查询参数
...
...
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