Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-chart-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-chart-show-h5
Commits
047d1831
提交
047d1831
authored
4月 09, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
78b5f90b
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
5 行删除
+18
-5
monthIncomeTrend.vue
src/components/monthIncomeTrend.vue
+2
-2
weekIncome.vue
src/components/weekIncome.vue
+1
-1
yearIncome.vue
src/components/yearIncome.vue
+15
-2
没有找到文件。
src/components/monthIncomeTrend.vue
浏览文件 @
047d1831
...
@@ -91,8 +91,8 @@ export default {
...
@@ -91,8 +91,8 @@ export default {
option
()
{
option
()
{
return
{
return
{
title
:
{
text
:
'单位:万'
,
textStyle
:
{
fontSize
:
12
,
color
:
'#0A7199'
},
padding
:
0
},
title
:
{
text
:
'单位:万'
,
textStyle
:
{
fontSize
:
12
,
color
:
'#0A7199'
},
padding
:
0
},
// tooltip: { trigger: 'axis', axisPointer: {} },
// tooltip: { trigger: 'axis', axisPointer: {
type: 'none'
} },
grid
:
{
left
:
0
,
top
:
'40px'
,
right
:
0
,
bottom
:
'40px'
,
containLabel
:
true
},
grid
:
{
left
:
'left'
,
top
:
40
,
right
:
0
,
bottom
:
40
,
containLabel
:
true
},
legend
:
{
legend
:
{
bottom
:
'10px'
,
bottom
:
'10px'
,
itemWidth
:
10
,
itemWidth
:
10
,
...
...
src/components/weekIncome.vue
浏览文件 @
047d1831
...
@@ -96,7 +96,7 @@ export default {
...
@@ -96,7 +96,7 @@ export default {
return
{
return
{
title
:
{
text
:
'单位:万'
,
textStyle
:
{
fontSize
:
12
,
color
:
'#0A7199'
},
padding
:
0
},
title
:
{
text
:
'单位:万'
,
textStyle
:
{
fontSize
:
12
,
color
:
'#0A7199'
},
padding
:
0
},
// tooltip: { trigger: 'axis', axisPointer: { type: 'none' } },
// tooltip: { trigger: 'axis', axisPointer: { type: 'none' } },
grid
:
{
left
:
0
,
top
:
'40px'
,
right
:
0
,
bottom
:
'40px'
,
containLabel
:
true
},
grid
:
{
left
:
'left'
,
top
:
40
,
right
:
0
,
bottom
:
40
,
containLabel
:
true
},
legend
:
{
legend
:
{
bottom
:
'10px'
,
bottom
:
'10px'
,
itemWidth
:
10
,
itemWidth
:
10
,
...
...
src/components/yearIncome.vue
浏览文件 @
047d1831
<
template
>
<
template
>
<v-chart
class=
"chart"
:option=
"option"
:autoresize=
"true"
:loading=
"loading"
ref=
"chart"
/>
<v-chart
class=
"chart"
:option=
"option"
:autoresize=
"true"
:loading=
"loading"
@
legendselectchanged=
"legendselectchanged"
ref=
"chart"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -10,6 +17,7 @@ export default {
...
@@ -10,6 +17,7 @@ export default {
return
{
return
{
loading
:
false
,
loading
:
false
,
response
:
[],
response
:
[],
legendselect
:
{},
height
:
0
height
:
0
}
}
},
},
...
@@ -20,7 +28,9 @@ export default {
...
@@ -20,7 +28,9 @@ export default {
option
()
{
option
()
{
let
total
=
0
let
total
=
0
const
data
=
this
.
response
.
map
(
item
=>
{
const
data
=
this
.
response
.
map
(
item
=>
{
total
+=
item
.
all_pay_money
if
(
this
.
legendselect
[
item
.
project_name
]
!==
false
)
{
total
+=
item
.
all_pay_money
}
const
color
=
this
.
colors
[
item
.
project_name
]
const
color
=
this
.
colors
[
item
.
project_name
]
return
{
value
:
item
.
all_pay_money
,
name
:
item
.
project_name
,
itemStyle
:
{
color
}
}
return
{
value
:
item
.
all_pay_money
,
name
:
item
.
project_name
,
itemStyle
:
{
color
}
}
})
})
...
@@ -83,6 +93,9 @@ export default {
...
@@ -83,6 +93,9 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
legendselectchanged
({
selected
})
{
this
.
legendselect
=
selected
},
getChartHeight
()
{
getChartHeight
()
{
this
.
height
=
this
.
$refs
.
chart
.
$el
.
offsetHeight
this
.
height
=
this
.
$refs
.
chart
.
$el
.
offsetHeight
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论