Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a4157902
authored
Jul 23, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复
1 parent
25065fe5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
91 deletions
src/components/ViewTabs.vue
src/views/afterSales/analyze.vue
src/views/salesData/flow.vue
src/views/salesData/lineOption.js
src/components/ViewTabs.vue
View file @
a415790
...
...
@@ -141,7 +141,7 @@ export default {
this
.
getOverallbase
(
'wechatGroup'
)
this
.
getOverallbase
(
'applet'
)
this
.
getOverallbase
(
'publiccus'
)
this
.
getOveralltrend
(
'total'
)
this
.
getOveralltrend
(
this
.
tabType
)
},
changeType
(
type
)
{
let
title
=
{
...
...
@@ -348,6 +348,9 @@ export default {
}
this
.
canvas
.
setOption
(
options
)
this
.
chartAction
(
lineData
)
this
.
canvas
.
on
(
'globalout'
,
()
=>
{
this
.
chartAction
(
lineData
)
})
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
canvas
.
resize
()
})
...
...
src/views/afterSales/analyze.vue
View file @
a415790
...
...
@@ -63,6 +63,7 @@ export default {
this
.
option
=
{
tooltip
:
{
trigger
:
'axis'
,
showContent
:
false
,
axisPointer
:
{
type
:
'shadow'
,
shadowStyle
:
{
...
...
@@ -142,12 +143,22 @@ export default {
this
.
barChart
.
clear
()
this
.
barChart
.
setOption
(
this
.
option
)
this
.
chartAction
()
// 鼠标划入
this
.
barChart
.
on
(
'mouseover'
,
data
=>
{
this
.
initPieData
(
data
.
name
)
console
.
log
(
data
)
this
.
currentData
=
data
this
.
barChart
.
getZr
().
on
(
'mousemove'
,
params
=>
{
const
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
const
pointInGrid
=
this
.
barChart
.
convertFromPixel
({
seriesIndex
:
0
},
pointInPixel
)
const
yIndex
=
pointInGrid
[
1
]
const
op
=
this
.
barChart
.
getOption
()
const
name
=
op
.
yAxis
[
0
].
data
[
yIndex
]
this
.
initPieData
(
name
)
this
.
currentData
=
{
name
,
dataIndex
:
yIndex
}
})
// 鼠标划入
// this.barChart.on('mouseup', data => {
// this.initPieData(data.name)
// })
this
.
barChart
.
on
(
'globalout'
,
()
=>
{
this
.
chartAction
(
this
.
currentData
.
dataIndex
)
this
.
initPieData
(
this
.
currentData
.
name
)
...
...
src/views/salesData/flow.vue
View file @
a415790
...
...
@@ -166,7 +166,7 @@ export default {
minSize
:
'30%'
,
maxSize
:
'100%'
,
sort
:
'descending'
,
gap
:
2
,
gap
:
1
,
label
:
{
show
:
true
,
position
:
'inside'
,
...
...
@@ -194,13 +194,19 @@ export default {
]
}
this
.
echartsFunnel
.
setOption
(
this
.
option
)
// this.echartsFunnel.getZr.on('mouseover', params => {
// })
this
.
echartsFunnel
.
on
(
'mouseover'
,
utils
.
debounce
(
data
=>
{
console
.
log
(
data
)
this
.
getSaleTrans
(
this
.
paramsData
,
data
.
data
.
type
,
data
.
data
.
name
,
data
.
dataIndex
)
}),
1000
/
6
0
50
0
)
// this.echartsFunnel.on('globalout', () => {
// })
},
getSaleTrans
(
val
,
queryItem
=
'enter'
,
name
=
'客流'
,
index
=
0
)
{
const
params
=
{
...
...
src/views/salesData/lineOption.js
deleted
100644 → 0
View file @
25065fe
/*
* @Description:
* @Author: huyue
* @Date: 2022-06-30 10:57:14
* @LastEditors: huyue
* @LastEditTime: 2022-06-30 10:57:17
*/
function
getLineOptions
(
obj
)
{
const
{
tooltipFormatter
}
=
obj
var
lineOptions
=
{
tooltip
:
{
trigger
:
'axis'
,
borderWidth
:
0
,
backgroundColor
:
'rgba(68,68,68,0.80)'
,
textStyle
:
{
color
:
'#FFFFFF'
,
fontSize
:
'8px'
},
extraCssText
:
'width: 60px;'
,
formatter
:
tooltipFormatter
||
''
},
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
top
:
'10%'
,
bottom
:
'10%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
axisLabel
:
{
color
:
'#606266'
,
fontSize
:
'0.8em'
},
data
:
[]
},
yAxis
:
{
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#606266'
}
}
},
series
:
[
{
type
:
'line'
,
itemStyle
:
{
color
:
'#F5AA01'
},
// 节点,平滑曲线
symbol
:
'none'
,
smooth
:
true
,
// 折线背景色
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(254, 84, 0, 0.6)'
},
{
offset
:
1
,
color
:
'rgba(254, 84, 0, 0.05)'
}
]
}
},
data
:
[]
}
]
}
return
lineOptions
}
export
default
getLineOptions
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment