明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
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
Administrator
jt_front
Commits
af84499e
Commit
af84499e
authored
Dec 09, 2025
by
yangyajing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整地图交互样式
parent
cd03062e
Pipeline
#104348
passed with stage
in 12 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
CommonMap.vue
src/components/CommonMap.vue
+14
-19
index.vue
src/views/homePage/index.vue
+2
-0
No files found.
src/components/CommonMap.vue
View file @
af84499e
...
...
@@ -26,11 +26,9 @@ watch(
// 根据页面内容,调整地图显示位置
const
center
=
[
"lixiang"
,
"tuichu"
].
includes
(
props
.
tabKey
)
?
[
100.808299
,
35.791787
]
:
[
127.808299
,
35.791787
];
map
&&
map
.
setCenter
(
center
);
let
zoom
=
map
.
getZoom
();
if
(
zoom
<
7
)
{
map
.
setZoom
(
4
);
handleAddMarket
();
}
}
);
...
...
@@ -245,16 +243,6 @@ const handleAddMarket = () => {
const
markerData
=
positionsList
[
i
];
// 创建悬浮窗口内容
// const infoContent = `
//
<
div
class
=
"marker-info-window"
>
//
<
div
class
=
"marker-info-title"
>
$
{
markerData
.
province
}
<
/div
>
//
<
div
class
=
"marker-info-content"
>
//
<
span
class
=
"marker-info-label"
>
路线数量
:
<
/span
>
//
<
span
class
=
"marker-info-value"
>
$
{
markerData
.
number
}
<
/span
>
//
<
span
class
=
"marker-info-unit"
>
条
<
/span
>
//
<
/div
>
//
<
/div
>
// `;
let
infoContent
=
`
<div class="infoWindow-title">
${
markerData
.
province
}
</div>
<div class="infoWindow-content">
...
...
@@ -270,8 +258,8 @@ const handleAddMarket = () => {
const
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
content
:
infoContent
,
// offset: new AMap.Pixel(3, -3
),
closeWhenClickMap
:
true
,
offset
:
new
AMap
.
Pixel
(
5
,
0
),
closeWhenClickMap
:
true
});
const
marker
=
new
AMap
.
Marker
({
...
...
@@ -283,16 +271,17 @@ const handleAddMarket = () => {
'<img src="//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png" style="width: 40px;height: 40px;">'
+
`<div class="anchorPoint">
${
markerData
.
number
}
</div>`
+
"</div>"
,
zIndex
:
100
});
// 鼠标悬浮事件
marker
.
on
(
"mouseover"
,
function
(
e
)
{
infoWindow
.
open
(
map
,
[
`
${
e
.
lnglat
.
getLng
()}
`
,
`
${
e
.
lnglat
.
getLat
()}
`
]
);
infoWindow
.
open
(
map
,
markerData
.
position
);
});
// 鼠标移出事件
marker
.
on
(
"mouseout"
,
function
()
{
infoWindow
.
close
();
//
infoWindow.close();
});
// 点击事件:聚焦到对应省份并显示省份地图
...
...
@@ -588,3 +577,9 @@ onActivated(() => {
opacity: 0;
}
</
style
>
<
style
lang=
"less"
>
.amap-info{
z-index: 2;
pointer-events: none;
}
</
style
>
\ No newline at end of file
src/views/homePage/index.vue
View file @
af84499e
...
...
@@ -220,6 +220,7 @@
<el-table-column
prop=
"xmzt"
label=
"项目状态"
:align=
"'center'"
width=
"100"
/>
<el-table-column
prop=
"tcsj"
label=
"通车时间"
width=
"110"
:align=
"'center'"
/>
<el-table-column
prop=
"hbfs"
label=
"回报方式"
:align=
"'center'"
width=
"150"
/>
<el-table-column
prop=
"irr"
label=
"IRR"
:align=
"'center'"
width=
"100"
/>
</el-table>
</div>
<!-- <div class="page-wrap">
...
...
@@ -1191,6 +1192,7 @@ const initProgressPie = () => {
// 1. 外层圆环边框(浅色蓝环)
{
type
:
"pie"
,
animationDuration
:
2000
,
radius
:
[
"85%"
,
"70%"
],
// 外层边框的粗细
startAngle
:
0
,
itemStyle
:
{
...
...
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