Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
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 82a76600
authored
Aug 23, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复1.1 精品升级地图和趋势分析
1 parent
65c7e3fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
32 deletions
src/views/boutique/BarLineChart.vue
src/views/boutique/Map.vue
src/views/boutique/BarLineChart.vue
View file @
82a7660
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
7-18 17:27:55
* @LastEditTime: 2023-0
8-23 16:22:16
* @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -30,27 +30,27 @@ export default {
...
@@ -30,27 +30,27 @@ export default {
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
},
//
tooltipFormatterObj: {
tooltipFormatterObj
:
{
//
type: Array,
type
:
Array
,
//
default: () => {
default
:
()
=>
{
//
return [
return
[
//
{
{
//
label: '数量',
label
:
'数量'
,
//
attrName: 'num'
attrName
:
'num'
//
},
},
//
{
{
//
label: '环比',
label
:
'环比'
,
//
attrName: 'hrate',
attrName
:
'hrate'
,
//
addSymbol: '%'
addSymbol
:
'%'
//
},
},
//
{
{
//
label: '同比',
label
:
'同比'
,
//
attrName: 'trate',
attrName
:
'trate'
,
//
addSymbol: '%'
addSymbol
:
'%'
//
}
}
//
]
]
//
}
}
//
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/views/boutique/Map.vue
View file @
82a7660
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-20 10:19:06
* @Date: 2023-07-20 10:19:06
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
7-26 16:26:03
* @LastEditTime: 2023-0
8-23 16:15:25
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -50,7 +50,16 @@ export default {
...
@@ -50,7 +50,16 @@ export default {
type
:
'map'
,
type
:
'map'
,
map
:
'china'
,
map
:
'china'
,
data
:
data
,
data
:
data
,
label
:
{
normal
:
{
color
:
'#ffffff'
},
emphasis
:
{
color
:
'#ffffff'
}
},
itemStyle
:
{
itemStyle
:
{
color
:
'#ffffff'
,
// areaColor: '#061422',
// areaColor: '#061422',
areaColor
:
{
areaColor
:
{
image
:
mapBg
,
image
:
mapBg
,
...
@@ -58,13 +67,8 @@ export default {
...
@@ -58,13 +67,8 @@ export default {
},
},
borderColor
:
'#65C6F8'
,
borderColor
:
'#65C6F8'
,
shadowBlur
:
10
,
shadowBlur
:
10
,
shadowColor
:
'rgba(61, 87, 255, 0.41)'
shadowColor
:
'rgba(61, 87, 255, 0.41)'
,
},
emphasis
:
{
emphasis
:
{
label
:
{
color
:
'#fff'
},
itemStyle
:
{
areaColor
:
{
areaColor
:
{
type
:
'linear'
,
type
:
'linear'
,
x
:
0
,
x
:
0
,
...
@@ -78,14 +82,18 @@ export default {
...
@@ -78,14 +82,18 @@ export default {
}],
}],
global
:
false
// 缺省为 false
global
:
false
// 缺省为 false
}
}
}
},
},
select
:
{
select
:
{
itemStyle
:
{
// color: this.clickcolor, // 设置地图点击后的颜色
color
:
'#ffffff'
,
// 设置地图点击后的颜色
areaColor
:
{
areaColor
:
{
type
:
'linear'
,
type
:
'linear'
,
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
x2
:
0
,
x2
:
1
,
y2
:
1
,
y2
:
0
,
colorStops
:
[{
colorStops
:
[{
offset
:
0
,
color
:
'#079FF1'
// 0% 处的颜色
offset
:
0
,
color
:
'#079FF1'
// 0% 处的颜色
},
{
},
{
...
@@ -94,7 +102,7 @@ export default {
...
@@ -94,7 +102,7 @@ export default {
global
:
false
// 缺省为 false
global
:
false
// 缺省为 false
}
}
}
}
}
}
,
}]
}]
}
}
return
option
return
option
...
@@ -102,6 +110,75 @@ export default {
...
@@ -102,6 +110,75 @@ export default {
drawMap
(
data
)
{
drawMap
(
data
)
{
this
.
mapOption
=
this
.
getOptions
(
data
)
this
.
mapOption
=
this
.
getOptions
(
data
)
this
.
myChart
.
setOption
(
this
.
mapOption
)
this
.
myChart
.
setOption
(
this
.
mapOption
)
this
.
selectEvent
()
this
.
myChart
.
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
0
,
dataIndex
:
0
})
// 取消高亮指定的数据图形
this
.
myChart
.
dispatchAction
({
type
:
'downplay'
,
seriesIndex
:
0
,
dataIndex
:
0
})
this
.
myChart
.
dispatchAction
({
type
:
'highlight'
,
seriesIndex
:
0
,
dataIndex
:
0
})
},
selectEvent
()
{
const
myChart
=
this
.
myChart
this
.
myChart
.
on
(
'click'
,
function
(
e
)
{
myChart
.
dispatchAction
({
type
:
'downplay'
,
seriesIndex
:
0
})
myChart
.
dispatchAction
({
type
:
'highlight'
,
seriesIndex
:
0
,
dataIndex
:
e
.
dataIndex
})
myChart
.
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
1
,
dataIndex
:
e
.
dataIndex
})
})
this
.
myChart
.
on
(
'mousemove'
,
function
(
e
)
{
myChart
.
dispatchAction
({
type
:
'downplay'
,
seriesIndex
:
0
})
myChart
.
dispatchAction
({
type
:
'highlight'
,
seriesIndex
:
0
,
dataIndex
:
e
.
dataIndex
})
myChart
.
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
1
,
dataIndex
:
e
.
dataIndex
})
})
this
.
myChart
.
on
(
'mouseout'
,
function
(
e
)
{
console
.
log
(
e
)
myChart
.
dispatchAction
({
type
:
'downplay'
,
seriesIndex
:
0
})
myChart
.
dispatchAction
({
type
:
'highlight'
,
seriesIndex
:
0
,
dataIndex
:
e
.
dataIndex
})
myChart
.
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
1
,
dataIndex
:
e
.
dataIndex
})
})
},
},
chartBindEvent
()
{
chartBindEvent
()
{
// resize
// resize
...
...
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