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 7fe54e20
authored
Jul 20, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加地图
1 parent
630e6e08
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
20 deletions
src/assets/images/map-bg.png
src/views/boutique/BarLineOptions.js
src/views/boutique/Map.vue
src/views/boutique/rightCompoments/StoreMap.vue
src/views/home/index.vue
src/views/solarDetail/index.vue
src/assets/images/map-bg.png
0 → 100644
View file @
7fe54e2
856 KB
src/views/boutique/BarLineOptions.js
View file @
7fe54e2
...
...
@@ -59,20 +59,18 @@ function getBarLineOptions(obj) {
itemStyle
:
{
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
color
:
function
(
params
)
{
const
colorList
=
[
[
'#22D8FF'
,
'#5C56FF'
],
[
'#2AD190'
,
'#00B7DF'
]
]
var
colorItem
=
[]
colorItem
=
params
.
dataIndex
%
2
===
0
?
colorList
[
0
]
:
colorList
[
1
]
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
colorItem
[
0
]
color
:
'#22D8FF'
},
// 柱图渐变色
{
offset
:
0.5
,
// 指100%处的颜色
color
:
'#223FA9'
},
{
offset
:
1
,
// 指100%处的颜色
color
:
colorItem
[
1
]
color
:
'#061422'
}]
)
}
...
...
@@ -94,20 +92,18 @@ function getBarLineOptions(obj) {
itemStyle
:
{
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
color
:
function
(
params
)
{
const
colorList
=
[
[
'#11627A'
,
'#282F7A'
],
[
'#145F4E'
,
'#035972'
]
]
var
colorItem
=
[]
colorItem
=
params
.
dataIndex
%
2
===
0
?
colorList
[
0
]
:
colorList
[
1
]
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
colorItem
[
0
]
color
:
'#2AD191'
},
// 柱图渐变色
{
offset
:
0.5
,
// 指100%处的颜色
color
:
'#0E958D'
},
{
offset
:
1
,
// 指100%处的颜色
color
:
colorItem
[
1
]
color
:
'#061422'
}]
)
}
...
...
src/views/boutique/Map.vue
0 → 100644
View file @
7fe54e2
<
template
>
<div>
<div
id=
"map"
class=
"map"
></div>
</div>
</
template
>
<
script
>
import
utils
from
'../../utils/util'
import
*
as
echarts
from
'echarts'
import
mapBg
from
'../../assets/images/map-bg.png'
export
default
{
name
:
'Map'
,
mounted
()
{
console
.
log
(
1111
)
const
imgDom
=
new
Image
()
imgDom
.
src
=
'../../assets/images/map-bg.png'
imgDom
.
alt
=
'alt'
var
option
=
{
tooltip
:
{
show
:
true
,
borderWidth
:
0
,
padding
:
0
,
backgroundColor
:
'#051526'
,
formatter
:
function
(
params
)
{
var
_html
=
`<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
<div style="color: #fff;">
${
params
.
name
}
</div>
<div style="display:flex;"><div style="color: #c9c9c9">客单价:</div><div style="color: #fff;">
${
params
.
data
?
utils
.
numAddSymbol
(
params
.
data
.
value1
)
:
0
}
</div></div>
<div style="display:flex;"><div style="color: #c9c9c9">转化率:</div><div style="color: #fff;">
${
params
.
data
?
utils
.
numAddSymbol
(
params
.
data
.
value2
)
:
0
}
%</div></div>
<div style="display:flex;"><div style="color: #c9c9c9">占比:</div><div style="color: #fff;">
${
params
.
data
?
utils
.
numAddSymbol
(
params
.
data
.
rate
)
:
0
}
%</div></div>
</div>`
return
_html
}
},
series
:
[{
type
:
'map'
,
map
:
'china'
,
data
:
[
{
name
:
'北京'
,
value
:
100
,
value1
:
2323
,
value2
:
43
,
rate
:
'29'
},
{
name
:
'上海'
,
value
:
200
,
value1
:
2323
,
value2
:
3
,
rate
:
'29'
},
{
name
:
'广东'
,
value
:
300
,
value1
:
2323
,
value2
:
34
,
rate
:
'29'
}
],
itemStyle
:
{
// areaColor: '#061422',
areaColor
:
{
image
:
mapBg
,
repeat
:
'repeat'
},
borderColor
:
'#65C6F8'
,
shadowBlur
:
10
,
shadowColor
:
'rgba(61, 87, 255, 0.41)'
},
emphasis
:
{
label
:
{
color
:
'#fff'
},
itemStyle
:
{
areaColor
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'#079FF1'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'#6578FF'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
},
select
:
{
areaColor
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'#079FF1'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'#6578FF'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
}
}
}]
}
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'map'
))
myChart
.
setOption
(
option
)
}
}
</
script
>
<
style
lang=
"scss"
>
.map
{
width
:
39.58vw
;
height
:
44.89vh
;
}
</
style
>
src/views/boutique/rightCompoments/StoreMap.vue
View file @
7fe54e2
...
...
@@ -3,15 +3,20 @@
* @Author: huyue
* @Date: 2023-07-19 17:18:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-
19 17:33:58
* @LastEditTime: 2023-07-
20 10:39:02
-->
<
template
>
<div>
<box-title
title=
"区域门店数据"
></box-title>
<Map></Map>
</div>
</
template
>
<
script
>
import
Map
from
'../Map.vue'
export
default
{
name
:
'StoreMap'
name
:
'StoreMap'
,
components
:
{
Map
}
}
</
script
>
src/views/home/index.vue
View file @
7fe54e2
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-
12 15:44:42
* @LastEditTime: 2023-07-
20 10:39:14
-->
<
template
>
<div
class=
"layout"
>
...
...
@@ -59,7 +59,7 @@ export default {
},
data
()
{
return
{
activeName
:
'
1
'
activeName
:
'
2
'
}
},
mounted
()
{
...
...
src/views/solarDetail/index.vue
View file @
7fe54e2
...
...
@@ -64,6 +64,7 @@ export default {
name
:
'总采购额'
,
valueName
:
'amounttotal'
,
value
:
'0'
,
unit
:
'¥'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amounttotalThismonth'
,
bottomValue
:
'0'
,
...
...
@@ -73,6 +74,7 @@ export default {
name
:
'商城采购额'
,
valueName
:
'amountshop'
,
value
:
'0'
,
unit
:
'¥'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amountshopThismonth'
,
bottomValue
:
'0'
,
...
...
@@ -82,6 +84,7 @@ export default {
name
:
'自采采购额'
,
valueName
:
'amountself'
,
value
:
'0'
,
unit
:
'¥'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amountselfThismonth'
,
bottomValue
:
'0'
,
...
...
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