Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
binhai-company
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
binhai-jiaoguan
binhai-company
Commits
eb7b4ef9
Commit
eb7b4ef9
authored
Nov 16, 2023
by
mzx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口对接
parent
94e5275f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
7 deletions
+74
-7
homePage.js
src/api/homePage.js
+19
-0
cheliang.png
src/assets/images/cheliang.png
+0
-0
index.vue
src/views/index.vue
+55
-7
No files found.
src/api/homePage.js
0 → 100644
View file @
eb7b4ef9
import
request
from
'@/utils/request'
// 获取企业首页信息
export
function
carListInforma
(
query
)
{
return
request
({
url
:
'/car-info/list-all'
,
method
:
'get'
,
params
:
query
})
}
// 首页地图车辆信息
export
function
carList
(
query
)
{
return
request
({
url
:
'/enterprise-info/index-info/car-list'
,
method
:
'get'
,
params
:
query
})
}
src/assets/images/cheliang.png
0 → 100644
View file @
eb7b4ef9
407 Bytes
src/views/index.vue
View file @
eb7b4ef9
<
template
>
<!-- 首页 -->
<div
class=
"app-container home"
>
<div
class=
"home-content"
>
<div
class=
"home-content-left"
ref=
"homeContentL
eft"
>
<div
ref=
"homeContentLeft"
class=
"home-content-l
eft"
>
<div
class=
"home-content-left-item"
>
<el-card>
<el-button
@
click=
"get"
>
获取
</el-button>
</el-card>
</div>
</div>
<baidu-map
class=
"bm-view"
center=
"天津市滨海新区"
:zoom=
"zoom"
scroll-wheel-zoom
@
ready=
"handler"
>
<bm-boundary
name=
"天津市滨海新区"
:strokeWeight=
"3"
strokeStyle=
"dashed"
strokeColor=
"blue"
fillColor=
""
></bm-boundary>
<bm-marker
v-for=
"(item,index) in markerPoint"
:position=
"item"
:icon=
"
{url: require('../assets/images/profile.jpg'), size: {width: 24, height: 24}}" >
</bm-marker>
<bm-boundary
name=
"天津市滨海新区"
:stroke-weight=
"3"
stroke-style=
"dashed"
stroke-color=
"blue"
fillColor=
""
/>
<bm-marker
v-for=
"(item,index) in markerPoint"
:position=
"item"
:icon=
"
{url: require('../assets/images/cheliang.png'), size: {width: 24, height: 24}}"
@click="handlerCar(item)"
/>
</baidu-map>
</div>
<div
style=
"padding-left: 20px; width: 30%; height: 100%; vertical-align: top; display: inline-block"
>
<div
style=
"display: contents"
>
<div
style=
" height: 33%"
>
<el-card
style=
"height: 100%; padding-bottom: 10px"
>
1
</el-card>
</div>
<div
style=
" height: 33%; padding: 10px 0px"
>
<el-card
style=
"height: 100%"
>
2
</el-card>
</div>
<div
style=
" height: 33%"
>
<el-card
style=
"height: 100%; padding-top: 10px"
>
3
</el-card>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
carList
,
carListInforma
}
from
'@/api/homePage'
export
default
{
name
:
'Index'
,
data
()
{
...
...
@@ -31,9 +55,32 @@ export default {
}
},
mounted
()
{
this
.
markerPoint
=
[{
lng
:
'117.20809'
,
lat
:
'39.09110'
}]
// this.markerPoint = [{ lng: '117.777222', lat: '39.004369' }]
this
.
getCarList
()
// 获取全部车辆信息
this
.
getInformation
()
},
methods
:
{
get
()
{
this
.
getCarList
()
this
.
getInformation
()
},
/** 车辆图标按钮点击操作 */
handlerCar
(
data
)
{
console
.
log
(
'data'
,
data
)
},
/** 获取全部车辆信息方法 */
getCarList
()
{
carList
().
then
(
response
=>
{
console
.
log
(
'response.data'
,
response
.
data
)
this
.
markerPoint
=
response
.
data
})
},
/** 获取企业首页信息 */
getInformation
()
{
carListInforma
().
then
(
response
=>
{
})
},
handler
({
BMap
,
map
})
{
this
.
BMap
=
BMap
this
.
map
=
map
...
...
@@ -74,6 +121,7 @@ export default {
}
}
.home-content
{
display
:
inline-block
;
position
:
relative
;
width
:
70%
;
//height: calc(1080px - 109px);
...
...
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