明树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
fd84dd6b
Commit
fd84dd6b
authored
Dec 04, 2025
by
chenron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图修改
parent
d773c3f5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
16 deletions
+80
-16
CommonMap.vue
src/components/CommonMap.vue
+11
-3
Construct.vue
src/views/homePage/components/Construct.vue
+17
-1
Operation.vue
src/views/homePage/components/Operation.vue
+17
-1
ProjectApproval.vue
src/views/homePage/components/ProjectApproval.vue
+8
-0
trialOperations.vue
src/views/homePage/components/trialOperations.vue
+18
-2
index.vue
src/views/homePage/index.vue
+9
-9
No files found.
src/components/CommonMap.vue
View file @
fd84dd6b
...
@@ -263,9 +263,20 @@ const updateMarkers = (selectName) => {
...
@@ -263,9 +263,20 @@ const updateMarkers = (selectName) => {
handleAddMarket
(
selectName
);
handleAddMarket
(
selectName
);
};
};
// 重置地图到初始状态
const
resetMap
=
()
=>
{
if
(
map
)
{
map
.
setZoom
(
4
);
map
.
setCenter
([
100.808299
,
35.791787
]);
const
mapSize
=
map
.
getSize
();
mapSize
.
width
<
780
?
map
.
setZoom
(
3.5
)
:
map
.
setZoom
(
4
);
}
};
// 暴露方法给父组件
// 暴露方法给父组件
defineExpose
({
defineExpose
({
updateMarkers
,
updateMarkers
,
resetMap
,
});
});
onMounted
(()
=>
{
onMounted
(()
=>
{
handleInitMap
();
handleInitMap
();
...
@@ -276,9 +287,6 @@ onMounted(() => {
...
@@ -276,9 +287,6 @@ onMounted(() => {
.tourism {
.tourism {
width: 100%;
width: 100%;
.vh(height, 600);
.vh(height, 600);
// display: flex;
// justify-content: center;
// align-items: center;
}
}
.custom-content-marker {
.custom-content-marker {
position: relative;
position: relative;
...
...
src/views/homePage/components/Construct.vue
View file @
fd84dd6b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
src=
"@/assets/images/建设.png"
/>
<img
src=
"@/assets/images/建设.png"
/>
</div>
-->
</div>
-->
<div
class=
"construct-left-map"
>
<div
class=
"construct-left-map"
>
<Map
/>
<Map
ref=
"mapRef"
/>
</div>
</div>
</div>
</div>
<div
class=
"construct-right"
>
<div
class=
"construct-right"
>
...
@@ -51,6 +51,7 @@ import {
...
@@ -51,6 +51,7 @@ import {
onUnmounted
,
onUnmounted
,
shallowReactive
,
shallowReactive
,
defineOptions
,
defineOptions
,
onActivated
}
from
"vue"
;
}
from
"vue"
;
import
CircleProgress
from
"./CircleProgress.vue"
;
import
CircleProgress
from
"./CircleProgress.vue"
;
...
@@ -58,6 +59,9 @@ import CircleProgress from "./CircleProgress.vue";
...
@@ -58,6 +59,9 @@ import CircleProgress from "./CircleProgress.vue";
defineOptions
({
defineOptions
({
name
:
"Construct"
,
name
:
"Construct"
,
});
});
// 地图组件引用
const
mapRef
=
ref
(
null
);
// 使用shallowReactive减少深层响应式开销
// 使用shallowReactive减少深层响应式开销
const
projectList
=
shallowReactive
([
const
projectList
=
shallowReactive
([
{
title
:
"总个数"
,
value
:
"10"
,
unit
:
"个"
},
{
title
:
"总个数"
,
value
:
"10"
,
unit
:
"个"
},
...
@@ -75,6 +79,18 @@ const recycleList = shallowReactive([
...
@@ -75,6 +79,18 @@ const recycleList = shallowReactive([
{
title
:
"2025年完成投资"
,
value
:
"*"
,
unit
:
"亿元"
},
{
title
:
"2025年完成投资"
,
value
:
"*"
,
unit
:
"亿元"
},
{
title
:
"完成率"
,
value
:
"*"
,
unit
:
""
},
{
title
:
"完成率"
,
value
:
"*"
,
unit
:
""
},
]);
]);
// 组件被激活时重置地图
onActivated
(()
=>
{
if
(
mapRef
.
value
&&
mapRef
.
value
.
resetMap
)
{
mapRef
.
value
.
resetMap
();
}
// 确保显示建设阶段的标记
if
(
mapRef
.
value
&&
mapRef
.
value
.
updateMarkers
)
{
mapRef
.
value
.
updateMarkers
(
"建设"
);
}
});
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
src/views/homePage/components/Operation.vue
View file @
fd84dd6b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
src=
"@/assets/images/建设.png"
/>
<img
src=
"@/assets/images/建设.png"
/>
</div>
-->
</div>
-->
<div
class=
"construct-left-map"
>
<div
class=
"construct-left-map"
>
<Map
/>
<Map
ref=
"mapRef"
/>
</div>
</div>
</div>
</div>
<div
class=
"construct-right"
>
<div
class=
"construct-right"
>
...
@@ -44,12 +44,16 @@ import {
...
@@ -44,12 +44,16 @@ import {
onMounted
,
onMounted
,
onUnmounted
,
onUnmounted
,
defineOptions
,
defineOptions
,
onActivated
}
from
"vue"
;
}
from
"vue"
;
// 定义组件名称,用于keep-alive缓存
// 定义组件名称,用于keep-alive缓存
defineOptions
({
defineOptions
({
name
:
"Operation"
,
name
:
"Operation"
,
});
});
// 地图组件引用
const
mapRef
=
ref
(
null
);
// 使用shallowReactive减少深层响应式开销
// 使用shallowReactive减少深层响应式开销
const
projectList
=
shallowReactive
([
const
projectList
=
shallowReactive
([
{
title
:
"总个数"
,
value
:
"2"
,
unit
:
"个"
},
{
title
:
"总个数"
,
value
:
"2"
,
unit
:
"个"
},
...
@@ -100,6 +104,18 @@ const completeList = shallowReactive([
...
@@ -100,6 +104,18 @@ const completeList = shallowReactive([
cumulativeValue
:
"*"
,
cumulativeValue
:
"*"
,
},
},
]);
]);
// 组件被激活时重置地图
onActivated
(()
=>
{
if
(
mapRef
.
value
&&
mapRef
.
value
.
resetMap
)
{
mapRef
.
value
.
resetMap
();
}
// 确保显示运营阶段的标记
if
(
mapRef
.
value
&&
mapRef
.
value
.
updateMarkers
)
{
mapRef
.
value
.
updateMarkers
(
"运营"
);
}
});
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
src/views/homePage/components/ProjectApproval.vue
View file @
fd84dd6b
...
@@ -16,6 +16,7 @@ import {
...
@@ -16,6 +16,7 @@ import {
computed
,
computed
,
shallowRef
,
shallowRef
,
defineOptions
,
defineOptions
,
onActivated
}
from
"vue"
;
}
from
"vue"
;
// 定义组件名称,用于keep-alive缓存
// 定义组件名称,用于keep-alive缓存
...
@@ -68,6 +69,13 @@ watch(
...
@@ -68,6 +69,13 @@ watch(
},
},
{
immediate
:
true
}
{
immediate
:
true
}
);
);
// 组件被激活时重置地图
onActivated
(()
=>
{
if
(
mapRef
.
value
&&
mapRef
.
value
.
resetMap
)
{
mapRef
.
value
.
resetMap
();
}
});
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
src/views/homePage/components/trialOperations.vue
View file @
fd84dd6b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
src=
"@/assets/images/建设.png"
/>
<img
src=
"@/assets/images/建设.png"
/>
</div>
-->
</div>
-->
<div
class=
"construct-left-map"
>
<div
class=
"construct-left-map"
>
<Map
/>
<Map
ref=
"mapRef"
/>
</div>
</div>
</div>
</div>
<div
class=
"construct-right"
>
<div
class=
"construct-right"
>
...
@@ -44,12 +44,16 @@ import {
...
@@ -44,12 +44,16 @@ import {
onMounted
,
onMounted
,
onUnmounted
,
onUnmounted
,
defineOptions
,
defineOptions
,
onActivated
}
from
"vue"
;
}
from
"vue"
;
// 定义组件名称,用于keep-alive缓存
// 定义组件名称,用于keep-alive缓存
defineOptions
({
defineOptions
({
name
:
"
Operation
"
,
name
:
"
TrialOperations
"
,
});
});
// 地图组件引用
const
mapRef
=
ref
(
null
);
// 使用shallowReactive减少深层响应式开销
// 使用shallowReactive减少深层响应式开销
const
projectList
=
shallowReactive
([
const
projectList
=
shallowReactive
([
{
title
:
"总个数"
,
value
:
"9"
,
unit
:
"个"
},
{
title
:
"总个数"
,
value
:
"9"
,
unit
:
"个"
},
...
@@ -115,6 +119,18 @@ const completeList = shallowReactive([
...
@@ -115,6 +119,18 @@ const completeList = shallowReactive([
cumulativeValue
:
"-7.94"
,
cumulativeValue
:
"-7.94"
,
},
},
]);
]);
// 组件被激活时重置地图
onActivated
(()
=>
{
if
(
mapRef
.
value
&&
mapRef
.
value
.
resetMap
)
{
mapRef
.
value
.
resetMap
();
}
// 确保显示试运营阶段的标记
if
(
mapRef
.
value
&&
mapRef
.
value
.
updateMarkers
)
{
mapRef
.
value
.
updateMarkers
(
"试运营"
);
}
});
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
src/views/homePage/index.vue
View file @
fd84dd6b
...
@@ -53,15 +53,15 @@
...
@@ -53,15 +53,15 @@
>
{{
item
.
name
}}
>
{{
item
.
name
}}
</span>
</span>
</div>
</div>
<
!--
<keep-alive
include=
"ProjectApproval,Construct,Operation,TrialOperations"
>
--
>
<
keep-alive
include=
"ProjectApproval,Construct,Operation,TrialOperations"
>
<ProjectApproval
<ProjectApproval
:currentName=
"selectedContentName"
:currentName=
"selectedContentName"
v-if=
"selectedContentBtn === 1 || selectedContentBtn === 6"
v-if=
"selectedContentBtn === 1 || selectedContentBtn === 6"
/>
/>
<Construct
v-else-if=
"selectedContentBtn === 2"
/>
<Construct
v-else-if=
"selectedContentBtn === 2"
/>
<Operation
v-else-if=
"selectedContentBtn === 4"
/>
<Operation
v-else-if=
"selectedContentBtn === 4"
/>
<TrialOperations
v-else-if=
"selectedContentBtn === 3"
/>
<TrialOperations
v-else-if=
"selectedContentBtn === 3"
/>
<
!--
</keep-alive>
--
>
<
/keep-alive
>
</div>
</div>
<div
class=
"bottom"
></div>
<div
class=
"bottom"
></div>
</div>
</div>
...
...
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