Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
ad711909
Commit
ad711909
authored
Jul 18, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform-ui
into base-modify
parents
dcfbc3b7
11d6887d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
53 deletions
+3
-53
companyMap.vue
src/views/baseInfo/companyInfo/companyMap.vue
+1
-42
index.vue
src/views/baseInfo/companyInfo/index.vue
+2
-11
No files found.
src/views/baseInfo/companyInfo/companyMap.vue
View file @
ad711909
...
...
@@ -2,11 +2,6 @@
<baidu-map
id=
"map"
class=
"map"
style=
"height: 350px;"
:center=
"center"
:zoom=
"zoom"
@
ready=
"handler"
@
click=
"mapClick(this, $event)"
>
<!-- 缩放 -->
<bm-navigation
anchor=
"BMAP_ANCHOR_TOP_RIGHT"
></bm-navigation>
<bm-info-window
:position=
"
{lng: infoWindowPoint.lng, lat: infoWindowPoint.lat}" :title="infoWindow.contents.name" :show="infoWindow.show" @close="infoWindowClose" @open="infoWindowOpen">
<p
class=
"info-p"
>
总经理:
{{
infoWindow
.
contents
.
leader
}}
</p>
<p
class=
"info-p"
>
地址:
{{
infoWindow
.
contents
.
address
+
infoWindow
.
contents
.
addrDetail
}}
</p>
<p
class=
"info-p"
>
电话:
{{
infoWindow
.
contents
.
leaderContactInfo
}}
</p>
</bm-info-window>
</baidu-map>
</
template
>
<
script
src=
"http://api.map.baidu.com/api?v=2.0&ak=iSEprDCqtYn5aC06Y3cDyGCEOP1hydwR"
></
script
>
...
...
@@ -24,7 +19,7 @@
allPage
,
}
from
'api/base_info/branch_company'
;
export
default
{
props
:
[
"toSonData"
,
"provinceName"
,
"showMapInfo"
],
props
:
[
"toSonData"
,
"provinceName"
],
data
()
{
return
{
center
:
{
...
...
@@ -34,10 +29,6 @@
zoom
:
4
,
// 地图展示级别
pointList
:
[],
map
:
null
,
infoWindowPoint
:
{
lng
:
108.9462765501
,
lat
:
34.3474989219
},
pickPoint
:
null
,
listQuery
:
{
page
:
1
,
...
...
@@ -46,10 +37,6 @@
addrCity
:
undefined
,
addrTown
:
undefined
},
infoWindow
:
{
show
:
false
,
contents
:
''
}
}
},
mounted
()
{
...
...
@@ -78,31 +65,8 @@
// that.addMarker(this,map);
// });
},
showMapInfo
(
newValue
,
oldValue
)
{
//分公司数据
let
points
=
this
.
showMapInfo
;
this
.
infoWindowPoint
=
{
lat
:
points
.
latitude
,
lng
:
points
.
longitude
};
this
.
infoWindow
=
{
show
:
true
,
contents
:
points
}
let
point
=
new
BMap
.
Point
(
points
.
longitude
,
points
.
latitude
)
this
.
map
.
panTo
(
points
.
latitude
,
points
.
longitude
);
this
.
map
.
centerAndZoom
(
point
,
6
);
}
},
methods
:
{
infoWindowClose
(
e
)
{
this
.
infoWindow
.
show
=
false
},
infoWindowOpen
(
e
)
{
this
.
infoWindow
.
show
=
true
},
clear
()
{
this
.
infoWindow
.
show
=
false
},
handler
({
map
})
{
this
.
map
=
map
;
if
(
this
.
toSonData
==
"campsite"
){
...
...
@@ -244,9 +208,4 @@
width
:
100%
;
height
:
500px
;
}
.info-p
{
padding
:
0
;
margin
:
0
;
font-size
:
13px
;
}
</
style
>
src/views/baseInfo/companyInfo/index.vue
View file @
ad711909
...
...
@@ -21,13 +21,12 @@
</div>
</div>
<!--分公司分布图-->
<company-map
v-on:headCallBack=
"headCall"
v-if=
"toList"
:toSonData=
"type"
:provinceName=
"provinceName"
:showMapInfo=
"showMapInfos"
></company-map>
<company-map
v-on:headCallBack=
"headCall"
v-if=
"toList"
:toSonData=
"type"
:provinceName=
"provinceName"
></company-map>
<!--分公司数据-->
<div
v-infinite-scroll=
"loadMore"
infinite-scroll-disabled=
"busy"
infinite-scroll-distance=
"0"
>
<div
class=
"shoppings company-list"
v-for=
"item in list"
:key=
"item.key"
@
click=
"showMapInfo(item)"
>
<div
class=
"item-right-p company-item"
>
<div
class=
"ellipsis company-name"
>
{{
item
.
name
}}
</div>
...
...
@@ -219,7 +218,6 @@
}
]
},
showMapInfos
:{},
list
:
[],
total
:
null
,
listLoading
:
true
,
...
...
@@ -285,9 +283,6 @@
}
},
methods
:
{
showMapInfo
(
item
){
this
.
showMapInfos
=
item
;
},
getCompanyList
(
e
){
let
that
=
this
;
this
.
provinceRegions
.
map
(
function
(
item
){
...
...
@@ -363,11 +358,7 @@
allRegions
.
add
(
listTemp
[
index
].
addrCity
);
allRegions
.
add
(
listTemp
[
index
].
addrTown
);
let
regions
=
getRegionByCodes
([
listTemp
[
index
].
addrProvince
,
listTemp
[
index
].
addrCity
,
listTemp
[
index
].
addrTown
]);
listTemp
[
index
].
address
=
""
;
for
(
let
i
=
0
;
i
<
regions
.
length
;
i
++
){
listTemp
[
index
].
address
+=
regions
[
i
].
name
+
" "
;
}
// listTemp[index].address = regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
listTemp
[
index
].
address
=
regions
[
0
].
name
+
' '
+
regions
[
1
].
name
+
' '
+
regions
[
2
].
name
+
' '
;
}
getRegionByCodes
([...
allRegions
]);
}
...
...
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