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
6f7d6c8e
Commit
6f7d6c8e
authored
May 16, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司+营地地图
parent
0cb38a5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
55 deletions
+68
-55
index.js
src/api/base_info/campsite/index.js
+8
-0
campsite.vue
src/views/baseInfo/campsite/campsite.vue
+2
-1
companyMap.vue
src/views/baseInfo/companyInfo/companyMap.vue
+55
-52
index.vue
src/views/baseInfo/companyInfo/index.vue
+3
-2
No files found.
src/api/base_info/campsite/index.js
View file @
6f7d6c8e
...
@@ -18,6 +18,14 @@ export function allPage(query) {
...
@@ -18,6 +18,14 @@ export function allPage(query) {
});
});
}
}
export
function
campsiteAllPage
(
query
)
{
return
fetch
({
url
:
'/vehicle/campsite/allPage'
,
method
:
'get'
,
params
:
query
});
}
export
function
getObj
(
id
)
{
export
function
getObj
(
id
)
{
return
fetch
({
return
fetch
({
url
:
'/vehicle/campsite/'
+
id
,
url
:
'/vehicle/campsite/'
+
id
,
...
...
src/views/baseInfo/campsite/campsite.vue
View file @
6f7d6c8e
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</div>
</div>
</div>
</div>
<!--营地分布图-->
<!--营地分布图-->
<company-map
v-on:headCallBack=
"headCall"
v-if=
"toList"
:toSonData=
"
list
"
:provinceName=
"provinceName"
></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
v-infinite-scroll=
"loadMore"
infinite-scroll-disabled=
"busy"
infinite-scroll-distance=
"0"
>
<div
class=
"shoppings company-list"
<div
class=
"shoppings company-list"
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
companyMap
},
companyMap
},
data
()
{
data
()
{
return
{
return
{
type
:
"campsite"
,
toList
:
false
,
toList
:
false
,
nodata
:
false
,
nodata
:
false
,
nomore
:
false
,
nomore
:
false
,
...
...
src/views/baseInfo/companyInfo/companyMap.vue
View file @
6f7d6c8e
...
@@ -13,11 +13,10 @@
...
@@ -13,11 +13,10 @@
getRegionByCodes
,
getRegionByCodes
,
}
from
'api/base_info/region/'
;
}
from
'api/base_info/region/'
;
import
{
import
{
page
,
campsiteAllPage
,
addObj
,
}
from
'api/base_info/campsite'
;
getObj
,
import
{
delObj
,
allPage
,
putObj
}
from
'api/base_info/branch_company'
;
}
from
'api/base_info/branch_company'
;
export
default
{
export
default
{
props
:
[
"toSonData"
,
"provinceName"
],
props
:
[
"toSonData"
,
"provinceName"
],
...
@@ -68,55 +67,59 @@
...
@@ -68,55 +67,59 @@
},
},
},
},
methods
:
{
methods
:
{
getList
()
{
page
(
this
.
listQuery
)
.
then
(
response
=>
{
let
listTemp
=
response
.
data
.
data
;
//一次读入所有涉及地区,防止多次读取
if
(
!
this
.
$utils
.
isEmpty
(
listTemp
))
{
let
allRegions
=
new
Set
();
for
(
let
index
in
listTemp
)
{
allRegions
.
add
(
listTemp
[
index
].
addrProvince
);
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
=
regions
[
0
].
name
+
' '
+
regions
[
1
].
name
+
' '
+
regions
[
2
].
name
+
' '
;
}
getRegionByCodes
([...
allRegions
]);
}
let
arr
=
this
.
list
;
listTemp
.
map
(
function
(
item
){
arr
.
push
(
item
);
});
this
.
list
=
arr
;
})
},
handler
({
map
})
{
handler
({
map
})
{
this
.
map
=
map
;
this
.
map
=
map
;
page
(
this
.
listQuery
)
if
(
this
.
toSonData
==
"campsite"
){
.
then
(
response
=>
{
campsiteAllPage
(
this
.
listQuery
)
let
listTemp
=
response
.
data
.
data
;
.
then
(
response
=>
{
let
arr
=
[];
let
listTemp
=
response
.
data
.
data
;
listTemp
.
map
(
function
(
item
){
let
arr
=
[];
arr
.
push
(
item
);
listTemp
.
map
(
function
(
item
){
});
arr
.
push
(
item
);
this
.
list
=
arr
;
});
// 定位
this
.
list
=
arr
;
this
.
geolocation
(
map
);
// 定位
// 产生随机点
this
.
geolocation
(
map
);
const
bounds
=
map
.
getBounds
();
// 产生随机点
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
bounds
=
map
.
getBounds
();
const
point
=
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
title
:
""
,
//list[i].name
const
point
=
{
point
:
{
title
:
""
,
//list[i].name
lng
:
arr
[
i
].
longitude
,
point
:
{
lat
:
arr
[
i
].
latitude
lng
:
arr
[
i
].
longitude
,
}
lat
:
arr
[
i
].
latitude
};
}
this
.
pointList
.
push
(
point
);
};
}
this
.
pointList
.
push
(
point
);
this
.
addMarker
(
map
);
}
})
this
.
addMarker
(
map
);
})
}
else
{
allPage
(
this
.
listQuery
)
.
then
(
response
=>
{
let
listTemp
=
response
.
data
.
data
;
let
arr
=
[];
listTemp
.
map
(
function
(
item
){
arr
.
push
(
item
);
});
this
.
list
=
arr
;
// 定位
this
.
geolocation
(
map
);
// 产生随机点
const
bounds
=
map
.
getBounds
();
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
point
=
{
title
:
""
,
//list[i].name
point
:
{
lng
:
arr
[
i
].
longitude
,
lat
:
arr
[
i
].
latitude
}
};
this
.
pointList
.
push
(
point
);
}
this
.
addMarker
(
map
);
})
}
},
},
mapClick
(
map
,
e
)
{
mapClick
(
map
,
e
)
{
...
...
src/views/baseInfo/companyInfo/index.vue
View file @
6f7d6c8e
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</div>
</div>
</div>
</div>
<!--分公司分布图-->
<!--分公司分布图-->
<company-map
v-on:headCallBack=
"headCall"
v-if=
"toList"
:toSonData=
"
list
"
:provinceName=
"provinceName"
></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
v-infinite-scroll=
"loadMore"
infinite-scroll-disabled=
"busy"
infinite-scroll-distance=
"0"
>
<div
class=
"shoppings company-list"
<div
class=
"shoppings company-list"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
>
>
<div
class=
"item-right-p company-item"
>
<div
class=
"item-right-p company-item"
>
<div
class=
"ellipsis company-name"
>
{{
item
.
name
}}
</div>
<div
class=
"ellipsis company-name"
>
{{
item
.
name
}}
</div>
<p
class=
"ellipsis"
>
负责人
:
{{
item
.
leader
}}
</p>
<p
class=
"ellipsis"
>
总经理
:
{{
item
.
leader
}}
</p>
<p>
地址:
{{
item
.
address
+
item
.
addrDetail
}}
</p>
<p>
地址:
{{
item
.
address
+
item
.
addrDetail
}}
</p>
<p
class=
"ellipsis"
>
电话:
{{
item
.
leaderContactInfo
}}
</p>
<p
class=
"ellipsis"
>
电话:
{{
item
.
leaderContactInfo
}}
</p>
</div>
</div>
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
companyMap
},
companyMap
},
data
()
{
data
()
{
return
{
return
{
type
:
"companyInfo"
,
toList
:
false
,
toList
:
false
,
nodata
:
false
,
nodata
:
false
,
nomore
:
false
,
nomore
:
false
,
...
...
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