Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-nanjing-new
Project
Project
Details
Activity
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
郭铭瑶
east-nanjing-new
Commits
743a138d
Commit
743a138d
authored
Apr 19, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂存
parent
4cb02bc5
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
169 additions
and
67 deletions
+169
-67
App.vue
src/App.vue
+1
-1
map-btn8.png
src/assets/images/map-btn8.png
+0
-0
weihailu.png
src/assets/images/weihailu.png
+0
-0
zoom-in.png
src/assets/images/zoom-in.png
+0
-0
zoom-out.png
src/assets/images/zoom-out.png
+0
-0
my-map.vue
src/components/MyComponent/MyMap/my-map.vue
+18
-7
index.ts
src/store/index.ts
+1
-0
mutations.ts
src/store/mutations.ts
+3
-0
state.ts
src/store/state.ts
+4
-3
community.vue
src/view/community.vue
+75
-18
community-photo.vue
src/view/community/community-photo.vue
+17
-14
left-section.vue
src/view/community/left-section.vue
+2
-2
map-btns.vue
src/view/components/map-btns.vue
+22
-13
video-component.vue
src/view/components/video-component.vue
+4
-1
useSwitchMap.ts
src/view/hooks/useSwitchMap.ts
+14
-5
main.vue
src/view/main.vue
+8
-3
weihailu.png
weihailu.png
+0
-0
No files found.
src/App.vue
View file @
743a138d
...
@@ -33,7 +33,7 @@ export default defineComponent({
...
@@ -33,7 +33,7 @@ export default defineComponent({
src url(./assets/font/zcool.ttf)
src url(./assets/font/zcool.ttf)
html, body
html, body
background
rgba(0,0,0,0.5)
background
#001220
font-family DIN, Avenir, Helvetica, Arial, sans-serif
font-family DIN, Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing antialiased
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
-moz-osx-font-smoothing grayscale
...
...
src/assets/images/map-btn8.png
0 → 100755
View file @
743a138d
705 Bytes
src/assets/images/weihailu.png
View replaced file @
4cb02bc5
View file @
743a138d
664 KB
|
W:
|
H:
258 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/images/zoom-in.png
0 → 100755
View file @
743a138d
204 Bytes
src/assets/images/zoom-out.png
0 → 100755
View file @
743a138d
175 Bytes
src/components/MyComponent/MyMap/my-map.vue
View file @
743a138d
<
template
>
<
template
>
<div
id=
"MapContainer"
/>
<div
id=
"MapContainer"
:style=
"`width:$
{width}`"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
@@ -25,6 +25,10 @@ export default defineComponent({
...
@@ -25,6 +25,10 @@ export default defineComponent({
type
:
Object
as
PropType
<
{
[
key
:
string
]:
unknown
}
>
,
type
:
Object
as
PropType
<
{
[
key
:
string
]:
unknown
}
>
,
default
:
null
,
default
:
null
,
},
},
width
:
{
type
:
String
as
PropType
<
string
>
,
default
:
'67vw'
,
},
},
},
emits
:
[
'complete'
,
'event'
],
emits
:
[
'complete'
,
'event'
],
setup
(
props
,
ctx
)
{
setup
(
props
,
ctx
)
{
...
@@ -39,21 +43,24 @@ export default defineComponent({
...
@@ -39,21 +43,24 @@ export default defineComponent({
viewMode
:
'3D'
,
viewMode
:
'3D'
,
center
:
[
1019.614669
,
54.167243
],
center
:
[
1019.614669
,
54.167243
],
// center: [-135.98002789627407, -722.1597065437004],
// center: [-135.98002789627407, -722.1597065437004],
zooms
:
[
5
,
10
],
zooms
:
[
8
,
12
],
zoom
:
7
,
zoom
:
8
,
pitch
:
45
,
pitch
:
45
,
mapStyle
:
'smap://styles/dark'
,
mapStyle
:
'smap://styles/dark'
,
showBuildingBlock
:
true
,
showBuildingBlock
:
true
,
...
config
,
...
config
,
...
props
.
config
,
...
props
.
config
,
}).
on
(
SMap
.
MapEvent
.
maploaded
,
()
=>
{
}).
on
(
SMap
.
MapEvent
.
maploaded
,
()
=>
{
map
.
enable
MouseEvent
(
false
)
set
MouseEvent
(
false
)
// setBuildingBlock()
// setBuildingBlock()
ctx
.
emit
(
'complete'
,
map
)
ctx
.
emit
(
'complete'
,
map
)
addListener
()
addListener
()
hideCommunity
()
hideCommunity
()
})
})
}
}
function
setMouseEvent
(
val
:
boolean
)
{
map
.
enableMouseEvent
(
val
)
}
function
layer
(
name
:
string
)
{
function
layer
(
name
:
string
)
{
return
map
.
getLayer
(
name
)
return
map
.
getLayer
(
name
)
}
}
...
@@ -109,13 +116,16 @@ export default defineComponent({
...
@@ -109,13 +116,16 @@ export default defineComponent({
console
.
error
(
'传入的坐标点不能为空'
)
console
.
error
(
'传入的坐标点不能为空'
)
return
return
}
}
console
.
log
(
'focus'
,
x
,
y
)
curMapType
.
value
===
'3D'
curMapType
.
value
===
'3D'
?
map
.
setZoomAndCenter
(
zoom
,
[
+
x
,
+
y
,
0
])
?
map
.
setZoomAndCenter
(
zoom
,
[
+
x
,
+
y
,
0
])
:
map
.
setZoomAndCenter
(
zoom
,
[
+
x
,
+
y
])
:
map
.
setZoomAndCenter
(
zoom
,
[
+
x
,
+
y
])
}
}
function
zoom
(
type
:
string
)
{
if
(
type
===
'in'
)
map
.
zoomIn
()
else
map
.
zoomOut
()
}
// 添加边界
// 添加边界
function
addBoundary
({
function
addBoundary
({
name
=
''
,
name
=
''
,
...
@@ -247,6 +257,8 @@ export default defineComponent({
...
@@ -247,6 +257,8 @@ export default defineComponent({
return
{
return
{
initMap
,
initMap
,
focus
,
focus
,
zoom
,
setMouseEvent
,
layer
,
layer
,
setBuildingBlock
,
setBuildingBlock
,
hideCommunity
,
hideCommunity
,
...
@@ -266,7 +278,6 @@ export default defineComponent({
...
@@ -266,7 +278,6 @@ export default defineComponent({
<
style
lang=
"stylus"
scoped
>
<
style
lang=
"stylus"
scoped
>
#MapContainer
#MapContainer
position fixed
position fixed
width 100%
height 100vh
height 100vh
top 0
top 0
left 0
left 0
...
...
src/store/index.ts
View file @
743a138d
...
@@ -65,6 +65,7 @@ export interface GlobalStateProps {
...
@@ -65,6 +65,7 @@ export interface GlobalStateProps {
curView
:
ViewType
curView
:
ViewType
curMapType
:
string
curMapType
:
string
showCommunityPoints
:
boolean
showCommunityPoints
:
boolean
mapDragable
:
boolean
readonly
zhenxing
:
any
readonly
zhenxing
:
any
readonly
weihai
:
any
readonly
weihai
:
any
readonly
workArea1
:
any
readonly
workArea1
:
any
...
...
src/store/mutations.ts
View file @
743a138d
...
@@ -26,6 +26,9 @@ export default {
...
@@ -26,6 +26,9 @@ export default {
SET_SHOW_COMMUNITY_POINTS
(
state
:
GlobalStateProps
,
val
:
boolean
):
void
{
SET_SHOW_COMMUNITY_POINTS
(
state
:
GlobalStateProps
,
val
:
boolean
):
void
{
state
.
showCommunityPoints
=
val
state
.
showCommunityPoints
=
val
},
},
SET_MAP_DRAGABLE
(
state
:
GlobalStateProps
,
val
:
boolean
):
void
{
state
.
mapDragable
=
val
},
SET_PROPERTY_SUMMARY
(
SET_PROPERTY_SUMMARY
(
state
:
GlobalStateProps
,
state
:
GlobalStateProps
,
val
:
{
[
key
:
string
]:
number
}
val
:
{
[
key
:
string
]:
number
}
...
...
src/store/state.ts
View file @
743a138d
...
@@ -5,6 +5,7 @@ export default {
...
@@ -5,6 +5,7 @@ export default {
curMapType
:
'2D'
,
curMapType
:
'2D'
,
curView
:
{
name
:
'南京东路街道'
,
type
:
'street'
},
curView
:
{
name
:
'南京东路街道'
,
type
:
'street'
},
showCommunityPoints
:
false
,
showCommunityPoints
:
false
,
mapDragable
:
false
,
viewOptions
:
[
viewOptions
:
[
{
name
:
'南京东路街道'
,
type
:
'street'
},
{
name
:
'南京东路街道'
,
type
:
'street'
},
{
name
:
'第一工作站'
,
type
:
'work1'
,
id
:
'01001'
},
{
name
:
'第一工作站'
,
type
:
'work1'
,
id
:
'01001'
},
...
@@ -60,7 +61,7 @@ export default {
...
@@ -60,7 +61,7 @@ export default {
y
:
-
660.07
,
y
:
-
660.07
,
},
},
id
:
'01001'
,
id
:
'01001'
,
center
:
[
361.095476
,
-
559.449126
],
center
:
[
57.65912693980181
,
-
545.9925561181099
],
paths
:
[
paths
:
[
[
-
448.329953822261
,
-
293.460812442785
],
[
-
448.329953822261
,
-
293.460812442785
],
[
-
431.7521211874291
,
-
671.2658974800385
],
[
-
431.7521211874291
,
-
671.2658974800385
],
...
@@ -105,7 +106,7 @@ export default {
...
@@ -105,7 +106,7 @@ export default {
y
:
678.9654976442117
,
y
:
678.9654976442117
,
},
},
id
:
'01002'
,
id
:
'01002'
,
center
:
[
1291.532466
,
175.263969
],
center
:
[
494.2089963530598
,
170.15832727829968
],
paths
:
[
paths
:
[
[
62.564369398678764
,
740.5887328698475
],
[
62.564369398678764
,
740.5887328698475
],
[
137.63177213765096
,
581.9293660719472
],
[
137.63177213765096
,
581.9293660719472
],
...
@@ -140,7 +141,7 @@ export default {
...
@@ -140,7 +141,7 @@ export default {
x
:
-
57.84609277641425
,
x
:
-
57.84609277641425
,
y
:
261.561716873108
,
y
:
261.561716873108
,
},
},
center
:
[
609.931363
,
342.166777
],
center
:
[
59.44810057514178
,
386.009149840996
],
id
:
'01003'
,
id
:
'01003'
,
paths
:
[
paths
:
[
[
-
827.6197677404292
,
863.6615701613555
],
[
-
827.6197677404292
,
863.6615701613555
],
...
...
src/view/community.vue
View file @
743a138d
...
@@ -12,8 +12,7 @@
...
@@ -12,8 +12,7 @@
<m-map
<m-map
ref=
"map"
ref=
"map"
:config=
"
{
:config=
"
{
center: [-75.5563452697323, -718.3061904627932],
zoom: 10,
zoom: 8,
}"
}"
@complete="handleComplete"
@complete="handleComplete"
@event="handleMapClick"
@event="handleMapClick"
...
@@ -37,19 +36,55 @@
...
@@ -37,19 +36,55 @@
<SiteSelector
/>
<SiteSelector
/>
<div
class=
"operates"
>
<div
class=
"operates"
>
<a-tooltip
placement=
"left"
>
<a-tooltip
placement=
"left"
>
<img
src=
"@/assets/images/map-btn5.png"
@
click=
"rotateAngle"
/>
<img
draggable=
"false"
src=
"@/assets/images/map-btn5.png"
@
click=
"rotateAngle"
/>
<template
#
title
>
旋转90度
</
template
>
<template
#
title
>
旋转90度
</
template
>
</a-tooltip>
</a-tooltip>
<a-tooltip
placement=
"left"
>
<a-tooltip
placement=
"left"
>
<img
src=
"@/assets/images/map-btn4.png"
@
click=
"showMonitor = true"
/>
<img
draggable=
"false"
src=
"@/assets/images/map-btn4.png"
@
click=
"showMonitor = true"
/>
<
template
#
title
>
电瓶车入梯报警
</
template
>
<
template
#
title
>
电瓶车入梯报警
</
template
>
</a-tooltip>
</a-tooltip>
<a-tooltip
placement=
"left"
>
<a-tooltip
placement=
"left"
>
<img
src=
"@/assets/images/map-btn6.png"
@
click=
"showCommunityPoints"
/>
<img
draggable=
"false"
src=
"@/assets/images/map-btn6.png"
@
click=
"showCommunityPoints"
/>
<
template
#
title
>
<
template
#
title
>
{{
isCommunityPointsShowNow
?
'隐藏'
:
'显示'
}}
小区点
{{
isCommunityPointsShowNow
?
'隐藏'
:
'显示'
}}
小区点
</
template
>
</
template
>
</a-tooltip>
</a-tooltip>
<a-tooltip
placement=
"left"
>
<img
draggable=
"false"
src=
"@/assets/images/zoom-in.png"
@
click=
"zoomMap('in')"
/>
<
template
#
title
>
放大地图
</
template
>
</a-tooltip>
<a-tooltip
placement=
"left"
>
<img
draggable=
"false"
src=
"@/assets/images/zoom-out.png"
@
click=
"zoomMap('out')"
/>
<
template
#
title
>
缩小地图
</
template
>
</a-tooltip>
<a-tooltip
placement=
"left"
>
<img
draggable=
"false"
src=
"@/assets/images/map-btn8.png"
@
click=
"setMapDrag"
/>
<
template
#
title
>
开启/关闭地图拖拽
</
template
>
</a-tooltip>
</div>
</div>
<m-modal
<m-modal
v-model=
"showMonitor"
v-model=
"showMonitor"
...
@@ -68,11 +103,27 @@
...
@@ -68,11 +103,27 @@
<p
class=
"title"
>
[ {{ drawerInfo.relationName }} ]
</p>
<p
class=
"title"
>
[ {{ drawerInfo.relationName }} ]
</p>
<div
v-if=
"drawerInfo.afterPhoto"
>
<div
v-if=
"drawerInfo.afterPhoto"
>
<p>
整改后
</p>
<p>
整改后
</p>
<img
:src=
"drawerInfo.afterPhoto"
/>
<img
:src=
"
drawerInfo.afterPhoto.replace(
'http://zhongbang.omniview.pro/' ||
'https://zhongbang.omniview.pro/',
prefix
)
"
/>
</div>
</div>
<div
v-if=
"drawerInfo.beforPhoto"
>
<div
v-if=
"drawerInfo.beforPhoto"
>
<p>
整改前
</p>
<p>
整改前
</p>
<img
:src=
"drawerInfo.beforPhoto"
/>
<img
:src=
"
drawerInfo.beforPhoto.replace(
'http://zhongbang.omniview.pro/' ||
'https://zhongbang.omniview.pro/',
prefix
)
"
/>
</div>
</div>
</div>
</div>
</m-card>
</m-card>
...
@@ -104,6 +155,7 @@ export default defineComponent({
...
@@ -104,6 +155,7 @@ export default defineComponent({
name
:
'Main'
,
name
:
'Main'
,
components
:
{
LeftSection
,
RightSection
,
SiteSelector
,
VideoComponent
},
components
:
{
LeftSection
,
RightSection
,
SiteSelector
,
VideoComponent
},
setup
()
{
setup
()
{
const
prefix
=
computed
(()
=>
api
.
SOURCE_URL
)
const
rotation
=
ref
(
0
)
const
rotation
=
ref
(
0
)
const
rotateAngle
=
()
=>
{
const
rotateAngle
=
()
=>
{
rotation
.
value
+=
90
rotation
.
value
+=
90
...
@@ -168,25 +220,19 @@ export default defineComponent({
...
@@ -168,25 +220,19 @@ export default defineComponent({
if
(
!
curId
.
value
)
return
if
(
!
curId
.
value
)
return
const
result
:
any
=
{
const
result
:
any
=
{
'527635870583459840'
:
{
'527635870583459840'
:
{
zoom
:
9.7608
,
zoom
:
11
,
layer
:
()
=>
layer
:
()
=>
(
map
.
value
.
layer
(
'model_white_zhenxing2'
).
visible
=
true
),
(
map
.
value
.
layer
(
'model_white_zhenxing2'
).
visible
=
true
),
'0'
:
[
-
135.98002789627407
,
-
722.1597065437004
],
center
:
[
-
275.8968464073082
,
-
748.2824253933684
],
'90'
:
[
-
261.131359
,
-
858.028878
],
'180'
:
[
-
404.248674
,
-
746.05425
],
'270'
:
[
-
276.2336
,
-
653.842881
],
},
},
'527635870583459841'
:
{
'527635870583459841'
:
{
zoom
:
1
0
,
zoom
:
1
1
,
layer
:
()
=>
(
map
.
value
.
layer
(
'model_white_WEIHAI33'
).
visible
=
true
),
layer
:
()
=>
(
map
.
value
.
layer
(
'model_white_WEIHAI33'
).
visible
=
true
),
'0'
:
[
-
38.73075358777865
,
-
569.7527629458657
],
center
:
[
-
177.8293302195628
,
-
588.2622422909122
],
'90'
:
[
-
136.813679
,
-
682.12363
],
'180'
:
[
-
275.05377
,
-
587.065673
],
'270'
:
[
-
187.394221
,
-
483.549497
],
},
},
}
}
const
cur
=
result
[
curId
.
value
as
string
]
const
cur
=
result
[
curId
.
value
as
string
]
map
.
value
.
focus
(...
cur
[
rotation
.
value
]
,
cur
.
zoom
)
map
.
value
.
focus
(...
cur
.
center
,
cur
.
zoom
)
return
cur
return
cur
}
}
const
showDrawer
=
ref
(
false
)
const
showDrawer
=
ref
(
false
)
...
@@ -315,7 +361,16 @@ export default defineComponent({
...
@@ -315,7 +361,16 @@ export default defineComponent({
message
.
success
(
'短信发送成功!'
)
message
.
success
(
'短信发送成功!'
)
}
}
}
}
const
zoomMap
=
(
type
:
string
)
=>
{
map
.
value
.
zoom
(
type
)
}
const
dragAble
=
ref
(
false
)
const
setMapDrag
=
()
=>
{
dragAble
.
value
=
!
dragAble
.
value
map
.
value
.
setMouseEvent
(
dragAble
.
value
)
}
return
{
return
{
prefix
,
rotation
,
rotation
,
rotateAngle
,
rotateAngle
,
loading
,
loading
,
...
@@ -333,6 +388,8 @@ export default defineComponent({
...
@@ -333,6 +388,8 @@ export default defineComponent({
handleAlarm
,
handleAlarm
,
isCommunityPointsShowNow
,
isCommunityPointsShowNow
,
showCommunityPoints
,
showCommunityPoints
,
zoomMap
,
setMapDrag
,
}
}
},
},
})
})
...
...
src/view/community/community-photo.vue
View file @
743a138d
...
@@ -5,7 +5,10 @@
...
@@ -5,7 +5,10 @@
:key=
"item.name"
:key=
"item.name"
:style=
"`background:url($
{
:style=
"`background:url($
{
item.photo
&&
item.photo
&&
item.photo.replace('http://zhongbang.omniview.pro/', prefix)
item.photo.replace(
'http://zhongbang.omniview.pro/' || 'https://zhongbang.omniview.pro/',
prefix
)
}) 100% / 100% 100% no-repeat`"
}) 100% / 100% 100% no-repeat`"
@click="handleClick(item.video)"
@click="handleClick(item.video)"
>
>
...
@@ -58,26 +61,26 @@ export default defineComponent({
...
@@ -58,26 +61,26 @@ export default defineComponent({
if
(
curId
.
value
===
'527635870583459840'
)
{
if
(
curId
.
value
===
'527635870583459840'
)
{
// 振兴小区
// 振兴小区
return
[
return
[
{
name
:
'重庆北路177弄64号'
,
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AQCAEc3pAASC2UqtXWs052.jpg'
,
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AVyAanZkApsdVDHEGc0527.mp4'
,
},
{
{
name
:
'重庆北路后门'
,
name
:
'重庆北路后门'
,
photo
:
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AXyAIUKZAAIFC2qNmKI384.jpg'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AXyAIUKZAAIFC2qNmKI384.jpg'
,
video
:
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9
AaCAPxQuAJBKkDzXu6A359.mp4
'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9
PlmAH8-oAEmHxWhriqw954.mov
'
,
},
},
{
{
name
:
'大沽路大门'
,
name
:
'大沽路大门'
,
photo
:
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AYmAT-A1AAMElShNriM149.jpg'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AYmAT-A1AAMElShNriM149.jpg'
,
video
:
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AbiAQSm8AFcZgGM-DsE721.mp4'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9QE6AckoPAEM3swvgmFQ182.mov'
,
},
{
name
:
'重庆北路177弄64号'
,
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AQCAEc3pAASC2UqtXWs052.jpg'
,
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AVyAanZkApsdVDHEGc0527.mp4'
,
},
},
]
]
}
}
...
@@ -87,21 +90,21 @@ export default defineComponent({
...
@@ -87,21 +90,21 @@ export default defineComponent({
photo
:
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5GdOAW6qQAAvNhxSqO-g179.jpg'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5GdOAW6qQAAvNhxSqO-g179.jpg'
,
video
:
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB
8_neAFTSLAfLx1EXkWbg945
.mp4'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB
9OkmAFxVMAS7MAmRH2Xc004
.mp4'
,
},
},
{
{
name
:
'62弄朝东'
,
name
:
'62弄朝东'
,
photo
:
photo
:
'http
s
://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB5Kj-AX3OMAAwPqHZi_Kg064.jpg'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB5Kj-AX3OMAAwPqHZi_Kg064.jpg'
,
video
:
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/
1A/CgAG5GB9AKeAStEUAYtR_B1xies646
.mp4'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/
30/CgAG5WB9QIiAaz9fAS3gvWsrxYQ927
.mp4'
,
},
},
{
{
name
:
'62弄朝南'
,
name
:
'62弄朝南'
,
photo
:
photo
:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5KrOAVcluAAnbZjB7fNA165.jpg'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5KrOAVcluAAnbZjB7fNA165.jpg'
,
video
:
video
:
'http://zhongbang.omniview.pro/file/group1/M00/00/
30/CgAG5WB5KrSAB6piAV39_CAFs0Y956
.mp4'
,
'http://zhongbang.omniview.pro/file/group1/M00/00/
1A/CgAG5GB9P1mALYigATKoQQw6Y8k841
.mp4'
,
},
},
]
]
})
})
...
...
src/view/community/left-section.vue
View file @
743a138d
...
@@ -232,14 +232,14 @@ export default defineComponent({
...
@@ -232,14 +232,14 @@ export default defineComponent({
.info
.info
display flex
display flex
height .
8
rem
height .
9
rem
margin .05rem 0
margin .05rem 0
>div
>div
flex 1
flex 1
color #ccc
color #ccc
text-align justify
text-align justify
&:first-child
&:first-child
flex
.56
flex
0.8
$center()
$center()
background url('@/assets/images/border3.png') 50% 50% / 100% 100% no-repeat
background url('@/assets/images/border3.png') 50% 50% / 100% 100% no-repeat
margin-right .1rem
margin-right .1rem
...
...
src/view/components/map-btns.vue
View file @
743a138d
...
@@ -14,13 +14,10 @@
...
@@ -14,13 +14,10 @@
</div>
</div>
</
template
>
</
template
>
</a-tooltip>
</a-tooltip>
<img
<a-tooltip
v-else
:key=
"btn.key"
placement=
"right"
>
v-else
<img
:src=
"btn.icon"
draggable=
"false"
@
click=
"handleClick(btn.key)"
/>
:key=
"btn.key"
<
template
#
title
>
{{
btn
.
title
}}
</
template
>
:src=
"btn.icon"
</a-tooltip>
draggable=
"false"
@
click=
"handleClick(btn.key)"
/>
</template>
</template>
</div>
</div>
<m-modal
v-model=
"searchModal"
title=
"搜索"
width=
"30%"
offset=
"-70%"
>
<m-modal
v-model=
"searchModal"
title=
"搜索"
width=
"30%"
offset=
"-70%"
>
...
@@ -68,24 +65,30 @@ import btn4 from '@/assets/images/map-btn4.png'
...
@@ -68,24 +65,30 @@ import btn4 from '@/assets/images/map-btn4.png'
import
btn5
from
'@/assets/images/map-btn5.png'
import
btn5
from
'@/assets/images/map-btn5.png'
import
btn6
from
'@/assets/images/map-btn6.png'
import
btn6
from
'@/assets/images/map-btn6.png'
import
btn7
from
'@/assets/images/map-btn7.png'
import
btn7
from
'@/assets/images/map-btn7.png'
import
btn8
from
'@/assets/images/map-btn8.png'
import
d2
from
'@/assets/images/2d.png'
import
d2
from
'@/assets/images/2d.png'
import
d3
from
'@/assets/images/3d.png'
import
d3
from
'@/assets/images/3d.png'
import
zoomIn
from
'@/assets/images/zoom-in.png'
import
zoomOut
from
'@/assets/images/zoom-out.png'
import
store
from
'@/store'
import
store
from
'@/store'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'MapBtns'
,
name
:
'MapBtns'
,
emits
:
[
'full'
,
'change'
],
emits
:
[
'full'
,
'change'
,
'zoom'
],
setup
(
_
,
ctx
)
{
setup
(
_
,
ctx
)
{
const
btns
=
computed
(()
=>
{
const
btns
=
computed
(()
=>
{
const
mapType
=
const
mapType
=
store
.
state
.
curMapType
===
'2D'
store
.
state
.
curMapType
===
'2D'
?
{
key
:
'3D'
,
icon
:
d3
}
?
{
key
:
'3D'
,
icon
:
d3
,
title
:
'开启3D地图'
}
:
{
key
:
'2D'
,
icon
:
d2
}
:
{
key
:
'2D'
,
icon
:
d2
,
title
:
'开启2D地图'
}
const
list
=
[
const
list
=
[
// { key: 'search', icon: btn1 },
// { key: 'search', icon: btn1 },
{
key
:
'full'
,
icon
:
btn2
},
{
key
:
'in'
,
icon
:
zoomIn
,
title
:
'放大地图'
},
{
key
:
'points'
,
icon
:
btn6
},
{
key
:
'out'
,
icon
:
zoomOut
,
title
:
'缩小地图'
},
{
key
:
'full'
,
icon
:
btn2
,
title
:
'全屏'
},
{
key
:
'points'
,
icon
:
btn6
,
title
:
'显示/隐藏小区点'
},
{
key
:
'polyline'
,
icon
:
btn7
},
{
key
:
'polyline'
,
icon
:
btn7
},
{
key
:
'dragable'
,
icon
:
btn8
,
title
:
'开启/关闭拖拽功能'
},
// { key: '', icon: btn4 },
// { key: '', icon: btn4 },
// { key: '', icon: btn5 },
// { key: '', icon: btn5 },
// { key: '', icon: btn6 },
// { key: '', icon: btn6 },
...
@@ -109,12 +112,18 @@ export default defineComponent({
...
@@ -109,12 +112,18 @@ export default defineComponent({
case
'search'
:
case
'search'
:
searchModal
.
value
=
true
searchModal
.
value
=
true
break
break
case
'in'
:
case
'out'
:
ctx
.
emit
(
'zoom'
,
key
)
break
case
'points'
:
case
'points'
:
store
.
commit
(
store
.
commit
(
'SET_SHOW_COMMUNITY_POINTS'
,
'SET_SHOW_COMMUNITY_POINTS'
,
!
store
.
state
.
showCommunityPoints
!
store
.
state
.
showCommunityPoints
)
)
break
break
case
'dragable'
:
store
.
commit
(
'SET_MAP_DRAGABLE'
,
!
store
.
state
.
mapDragable
)
default
:
default
:
break
break
}
}
...
@@ -294,7 +303,7 @@ $bg = rgba(6,34,67,.4)
...
@@ -294,7 +303,7 @@ $bg = rgba(6,34,67,.4)
transition left .3s ease
transition left .3s ease
&.full
&.full
left .05rem
left .05rem
>
img
img
display block
display block
width .2rem
width .2rem
height @width
height @width
...
...
src/view/components/video-component.vue
View file @
743a138d
...
@@ -41,7 +41,10 @@ export default defineComponent({
...
@@ -41,7 +41,10 @@ export default defineComponent({
()
=>
props
.
videoSrc
&&
props
.
videoSrc
.
indexOf
(
'm3u8'
)
>=
0
()
=>
props
.
videoSrc
&&
props
.
videoSrc
.
indexOf
(
'm3u8'
)
>=
0
)
)
const
isMP4
=
computed
(
const
isMP4
=
computed
(
()
=>
props
.
videoSrc
&&
props
.
videoSrc
.
indexOf
(
'mp4'
)
>=
0
()
=>
props
.
videoSrc
&&
(
props
.
videoSrc
.
indexOf
(
'mp4'
)
>=
0
||
props
.
videoSrc
.
indexOf
(
'mov'
)
>=
0
)
)
)
const
init
=
()
=>
{
const
init
=
()
=>
{
if
(
!
videoRef
.
value
)
return
if
(
!
videoRef
.
value
)
return
...
...
src/view/hooks/useSwitchMap.ts
View file @
743a138d
...
@@ -13,6 +13,12 @@ export default function useSwitchMap(map: any) {
...
@@ -13,6 +13,12 @@ export default function useSwitchMap(map: any) {
},
},
{
immediate
:
true
}
{
immediate
:
true
}
)
)
watch
(
()
=>
store
.
state
.
mapDragable
,
(
val
)
=>
{
map
.
value
.
setMouseEvent
(
val
)
}
)
watch
(
watch
(
()
=>
store
.
state
.
showCommunityPoints
,
()
=>
store
.
state
.
showCommunityPoints
,
(
val
)
=>
{
(
val
)
=>
{
...
@@ -38,20 +44,19 @@ export default function useSwitchMap(map: any) {
...
@@ -38,20 +44,19 @@ export default function useSwitchMap(map: any) {
switch
(
type
)
{
switch
(
type
)
{
case
'work1'
:
case
'work1'
:
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea1
.
id
})
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea1
.
id
})
map
.
value
.
focus
(...
store
.
state
.
workArea1
.
center
,
7.660867453405492
)
map
.
value
.
focus
(...
store
.
state
.
workArea1
.
center
,
8
)
break
break
case
'work2'
:
case
'work2'
:
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea2
.
id
})
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea2
.
id
})
map
.
value
.
focus
(...
store
.
state
.
workArea2
.
center
,
7
)
map
.
value
.
focus
(...
store
.
state
.
workArea2
.
center
,
8
)
break
break
case
'work3'
:
case
'work3'
:
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea3
.
id
})
show
&&
showPoints
({
gridId
:
store
.
state
.
workArea3
.
id
})
map
.
value
.
focus
(...
store
.
state
.
workArea3
.
center
,
7
)
map
.
value
.
focus
(...
store
.
state
.
workArea3
.
center
,
8
)
break
break
case
'street'
:
case
'street'
:
show
&&
showPoints
()
show
&&
showPoints
()
map
.
value
.
focus
(
990.973466
,
10.295931
,
7
)
map
.
value
.
focus
(
207.9006154792994
,
71.67111885454233
,
8
)
// map.value.focus(1019.614669, 54.167243, 6.5)
break
break
default
:
default
:
break
break
...
@@ -105,8 +110,12 @@ export default function useSwitchMap(map: any) {
...
@@ -105,8 +110,12 @@ export default function useSwitchMap(map: any) {
}
}
)
)
}
}
const
handleZoom
=
(
type
:
string
)
=>
{
map
.
value
.
zoom
(
type
)
}
return
{
return
{
handleMapComplete
,
handleMapComplete
,
selectArea
,
selectArea
,
handleZoom
,
}
}
}
}
src/view/main.vue
View file @
743a138d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
gap=
"0.05rem"
gap=
"0.05rem"
>
>
<m-title
area=
"title"
>
南东城运
</m-title>
<m-title
area=
"title"
>
南东城运
</m-title>
<m-map
ref=
"map"
@
complete=
"handleMapComplete"
/>
<m-map
ref=
"map"
width=
"71vw"
@
complete=
"handleMapComplete"
/>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<Command
v-show=
"'street' === curViewType && !fullScreen"
area=
"left"
/>
<Command
v-show=
"'street' === curViewType && !fullScreen"
area=
"left"
/>
</m-animate>
</m-animate>
...
@@ -38,7 +38,11 @@
...
@@ -38,7 +38,11 @@
/>
/>
</m-animate>
</m-animate>
<ViewSelector
/>
<ViewSelector
/>
<MapBtns
@
change=
"selectArea"
@
full=
"fullScreen = $event"
/>
<MapBtns
@
change=
"selectArea"
@
full=
"fullScreen = $event"
@
zoom=
"handleZoom"
/>
<m-drawer
v-model=
"showDrawer"
>
<m-drawer
v-model=
"showDrawer"
>
<CaseDrawer
/>
<CaseDrawer
/>
<!--
<PopulationDrawer
/>
-->
<!--
<PopulationDrawer
/>
-->
...
@@ -100,7 +104,7 @@ export default defineComponent({
...
@@ -100,7 +104,7 @@ export default defineComponent({
await
nextTick
()
await
nextTick
()
map
.
value
.
initMap
({
viewMode
:
'2D'
})
map
.
value
.
initMap
({
viewMode
:
'2D'
})
})
})
const
{
handleMapComplete
,
selectArea
}
=
useSwitchMap
(
map
)
const
{
handleMapComplete
,
selectArea
,
handleZoom
}
=
useSwitchMap
(
map
)
return
{
return
{
map
,
map
,
curViewType
,
curViewType
,
...
@@ -110,6 +114,7 @@ export default defineComponent({
...
@@ -110,6 +114,7 @@ export default defineComponent({
showDrawer
,
showDrawer
,
handleMapComplete
,
handleMapComplete
,
selectArea
,
selectArea
,
handleZoom
,
}
}
},
},
})
})
...
...
weihailu.png
deleted
100644 → 0
View file @
4cb02bc5
258 KB
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