Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Muse
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
罗超
Muse
Commits
86f8d848
Commit
86f8d848
authored
Aug 27, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asd
parent
49f72465
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
449 additions
and
276 deletions
+449
-276
viittoMap.vue
src/components/sellDashboard/map/viittoMap.vue
+63
-57
viittoData.vue
src/components/viitto/viittoData.vue
+184
-169
viittoData2.vue
src/components/viitto/viittoData2.vue
+199
-48
index.vue
src/views/index.vue
+3
-2
No files found.
src/components/sellDashboard/map/viittoMap.vue
View file @
86f8d848
<
template
>
<div
class=
"echarts"
:style=
"
{height:'100%',width:'100%'}">
<div
:style=
"
{height:'100%',width:'100%'}" ref="myEchart">
</div>
<div
v-for=
"(item, index) in points"
:key=
"index"
class=
"jiaoyidian"
:style=
"
{left:(item[0]-5)+'px',top:(item[1]-5)+'px'}">
</div>
<div
class=
"echarts"
:style=
"
{height:'110%',width:'110%'}">
<div
:style=
"
{height:'110%',width:'110%'}" ref="myEchart">
</div>
<div
v-if=
"isShow"
v-for=
"(item, index) in points"
:key=
"index"
class=
"viittoHot"
:style=
"
{left:(item[0]-5)+'px',top:(item[1]-5)+'px'}">
</div>
<div
v-for=
"(item, subIndex) in ActivateList"
:key=
"subIndex+50000"
class=
"viittoActive"
:style=
"
{left:(item[0]-5)+'px',top:(item[1]-5)+'px'}">
</div>
</div>
</
template
>
<
script
>
...
...
@@ -11,19 +12,26 @@ import "../../../../node_modules/echarts/map/js/china.js"; // 引入中国地图
import
BMap
from
'BMap'
;
export
default
{
name
:
"echarts"
,
props
:
[
"userJson"
],
props
:
[
"userJson"
,
"dataArea"
,
"InActiveLen"
],
data
()
{
return
{
chart
:
null
,
position
:
[
-
999999
,
-
999999
],
points
:[],
myChart
:{}
//活动人数
ActivateList
:[],
myChart
:{},
isShow
:
false
,
};
},
mounted
()
{
console
.
log
(
this
.
InActiveLen
,
'InActiveLen'
);
this
.
bus
.
$on
(
'addpoint'
,
addTradeInfo
=>
{
this
.
addPoint
(
addTradeInfo
)
})
this
.
bus
.
$on
(
'addActivePoint'
,
addTradeInfo
=>
{
this
.
ActivePoint
(
addTradeInfo
)
})
this
.
chinaConfigure
();
},
beforeDestroy
()
{
...
...
@@ -37,9 +45,9 @@ export default {
methods
:
{
chinaConfigure
()
{
var
myData
=
[
//
{ name: "1", value: [121.15, 31.89, 90
] },
//
{ name: "2", value: [109.781327, 39.608266, 70
] },
// { name: "
3
", value: [120.38, 37.35, 42] },
//
{ name: "北京", value: [116.413384, 39.910925
] },
//
{ name: "重庆", value: [106.54041, 29.40268
] },
// { name: "
北京
", value: [120.38, 37.35, 42] },
// { name: "4", value: [122.207216, 29.985295, 23] },
// { name: "5", value: [110.245672, 30.7787677, 20] }
];
...
...
@@ -48,7 +56,9 @@ export default {
this
.
myChart
.
setOption
({
// 进行相关配置
backgroundColor
:
"transparent"
,
tooltip
:
{},
// 鼠标移到图里面的浮动提示框
tooltip
:
{
// 鼠标移到图里面的浮动提示框
showContent
:
false
,
},
dataRange
:
{
min
:
0
,
max
:
100
,
...
...
@@ -103,28 +113,24 @@ export default {
series
:
[
{
type
:
"scatter"
,
coordinateSystem
:
"geo"
,
// 对应上方配置
markPoint
:
this
.
markPoint
},
{
name
:
"交易数据"
,
//series名称
type
:
"scatter"
,
//为散点类型
markPoint
:
this
.
markPoint
,
name
:
""
,
//series名称
coordinateSystem
:
"geo"
,
// series坐标系类型
data
:
myDat
a
,
data
:
this
.
dataAre
a
,
symbol
:
"circle"
,
symbolSize
:
[
10
,
10
],
animation
:
true
symbolSize
:
[
5
,
5
],
animation
:
false
,
tooltip
:
this
.
tooltip
,
silent
:
false
}
]
});
},
addPoint
(
param
){
console
.
log
(
param
)
console
.
log
(
param
)
;
let
ad
=
param
.
address
?
param
.
address
:
param
.
city
var
myGeo
=
new
BMap
.
Geocoder
();
var
that
=
this
console
.
log
(
ad
)
myGeo
.
getPoint
(
ad
,
function
(
point
){
if
(
point
)
{
var
geo
=
that
.
myChart
.
getModel
().
getComponent
(
'geo'
).
coordinateSystem
;
...
...
@@ -134,52 +140,52 @@ export default {
that
.
points
.
splice
(
0
,
1
)
}
}
})
})
console
.
log
(
that
.
points
.
length
,
'that.points.length'
);
console
.
log
(
that
.
InActiveLen
,
'that.points.length'
);
if
(
that
.
points
.
length
==
that
.
InActiveLen
){
that
.
isShow
=
true
;
console
.
log
(
that
.
points
,
'points'
);
}
},
//获取活跃人数
ActivePoint
(
param
){
let
ad
=
param
.
address
?
param
.
address
:
param
.
city
var
myGeo
=
new
BMap
.
Geocoder
();
var
that
=
this
myGeo
.
getPoint
(
ad
,
function
(
point
){
if
(
point
)
{
var
geo
=
that
.
myChart
.
getModel
().
getComponent
(
'geo'
).
coordinateSystem
;
let
coord
=
that
.
myChart
.
convertToPixel
(
"geo"
,
[
point
.
lng
,
point
.
lat
]);
that
.
ActivateList
.
push
(
coord
);
if
(
that
.
ActivateList
.
length
>
100
){
that
.
ActivateList
.
splice
(
0
,
1
)
}
}
})
}
}
};
</
script
>
<
style
>
.
jiaoyidian
{
.
viittoHot
{
position
:
absolute
;
z-index
:
5
;
color
:
#fff
;
width
:
10
px
;
height
:
10
px
;
width
:
5
px
;
height
:
5
px
;
background
:
#2a73fe
;
border-radius
:
100%
;
box-shadow
:
0
0
30px
#2a73fe
;
animation-timing-function
:
ease-in-out
;
animation-name
:
breathe
;
animation-duration
:
5000ms
;
animation-iteration-count
:
infinite
;
animation-direction
:
alternate
;
}
.canpingsee
{
position
:
absolute
;
z-index
:
5
;
color
:
#fff
;
width
:
10px
;
height
:
10px
;
background
:
#2a9e9e
;
border-radius
:
100%
;
box-shadow
:
0
0
30px
#2a9e9e
;
animation-timing-function
:
ease-in-out
;
animation-name
:
breathe
;
animation-duration
:
5000ms
;
animation-iteration-count
:
infinite
;
animation-direction
:
alternate
;
}
@-webkit-keyframes
breathe
{
0
%
{
box-shadow
:
0
0
20px
inherit
;
opacity
:
0
;
}
100
%
{
box-shadow
:
0
1px
30px
inherit
;
opacity
:
1
;
width
:
10px
;
height
:
10px
;
}
.viittoActive
{
position
:
absolute
;
z-index
:
5
;
color
:
#fff
;
width
:
5px
;
height
:
5px
;
background
:
#FF75A1
;
border-radius
:
100%
;
}
</
style
>
src/components/viitto/viittoData.vue
View file @
86f8d848
This diff is collapsed.
Click to expand it.
src/components/viitto/viittoData2.vue
View file @
86f8d848
This diff is collapsed.
Click to expand it.
src/views/index.vue
View file @
86f8d848
...
...
@@ -260,7 +260,7 @@ export default {
},
connec
(){
let
_this
=
this
let
url
=
'http://
dataapi.oytour.com
/data_server'
let
url
=
'http://
47.96.23.199:5000
/data_server'
// let url = 'http://192.168.2.215:5000/data_server'
let
userInfo
=
this
.
getLocalStorage
()
// if (userInfo) {
...
...
@@ -331,7 +331,8 @@ export default {
},
init
(){
// this.apipost('')
let
url
=
'http://dataapi.oytour.com/api/user/get_init_data'
//let url='http://dataapi.oytour.com/api/user/get_init_data'
let
url
=
'http://47.96.23.199:5000/api/user/get_init_data'
let
msg
=
{
tdsourcetag
:
's_pcqq_aiomsg'
}
...
...
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