Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a80a1b2c
authored
May 17, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.20.0版本需求
1 parent
8108a00a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
12 deletions
src/assets/scss/monitor.scss
src/components/glsx-image/index.vue
src/pages/monitor/monitor.vue
src/pages/monitor/zoneCar.vue
src/utils/mapService.js
src/assets/scss/monitor.scss
View file @
a80a1b2
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
margin-left
:
20px
;
margin-left
:
20px
;
}
}
}
}
.map-controll.toleft
{
.map-controll.toleft
{
left
:
150px
;
left
:
150px
;
right
:
calc
(
100%
-
330px
)
right
:
calc
(
100%
-
330px
)
}
}
...
@@ -38,11 +39,13 @@
...
@@ -38,11 +39,13 @@
font-size
:
16px
;
font-size
:
16px
;
}
}
}
}
.map-bottom-controll.toleft
{
.map-bottom-controll.toleft
{
left
:
20px
;
left
:
20px
;
right
:
calc
(
100%
-
55px
);
right
:
calc
(
100%
-
55px
);
bottom
:
50px
;
bottom
:
50px
;
}
}
.controll-wrap
{
.controll-wrap
{
position
:
absolute
;
position
:
absolute
;
top
:
40px
;
top
:
40px
;
...
@@ -479,7 +482,9 @@
...
@@ -479,7 +482,9 @@
}
}
}
}
a
.fence_btn_grey
,
a
.history_btn_grey
,
a
.resident_btn_grey
{
a
.fence_btn_grey
,
a
.history_btn_grey
,
a
.resident_btn_grey
{
border
:
1px
solid
#d8d8d8
;
border
:
1px
solid
#d8d8d8
;
color
:
#999
;
color
:
#999
;
background
:
#f2f2f2
;
background
:
#f2f2f2
;
...
@@ -546,7 +551,9 @@
...
@@ -546,7 +551,9 @@
}
}
}
}
.fence_btn_grey
,
.history_btn_grey
,
.resident_btn_grey
{
.fence_btn_grey
,
.history_btn_grey
,
.resident_btn_grey
{
border
:
1px
solid
#d8d8d8
!
important
;
border
:
1px
solid
#d8d8d8
!
important
;
color
:
#999
!
important
;
color
:
#999
!
important
;
background
:
#f2f2f2
!
important
;
background
:
#f2f2f2
!
important
;
...
@@ -556,4 +563,40 @@
...
@@ -556,4 +563,40 @@
color
:
#999
!
important
;
color
:
#999
!
important
;
background
:
#f2f2f2
!
important
;
background
:
#f2f2f2
!
important
;
}
}
}
.copy-btn
{
cursor
:
pointer
;
}
.map-infowindow-title
{
position
:
relative
;
.question_icon
{
display
:inline-block
;
background
:
url('https://img01.glsx.com.cn/weapp/resource/e-shield/circle-question.png')
no-repeat
;
background-size
:
20px
auto
;
width
:
20px
;
height
:
20px
;
vertical-align
:
middle
;
}
.popover_box
{
position
:
absolute
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
top
:
20px
;
right
:
0px
;
padding
:
10px
;
z-index
:
2
;
border-radius
:
4px
;
color
:
#fff
;
font-size
:
12px
;
p
{
margin
:
0
;
}
}
}
.map_info_window
{
position
:
relative
;
}
}
\ No newline at end of file
\ No newline at end of file
src/components/glsx-image/index.vue
View file @
a80a1b2
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
src
:
{
src
:
{
handler
:
function
(
n
)
{
handler
:
function
(
n
)
{
if
(
n
)
{
if
(
n
)
{
console
.
log
(
n
);
this
.
imgPath
=
this
.
IMAGEURL
+
n
;
this
.
imgPath
=
this
.
IMAGEURL
+
n
;
}
}
},
},
...
@@ -40,7 +39,6 @@
...
@@ -40,7 +39,6 @@
};
};
},
},
created
()
{
created
()
{
console
.
log
(
this
.
src
);
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
...
...
src/pages/monitor/monitor.vue
View file @
a80a1b2
...
@@ -1319,9 +1319,10 @@ export default {
...
@@ -1319,9 +1319,10 @@ export default {
}
}
} */
} */
this
.
_drawTimeoutId
=
setTimeout
(()
=>
{
// 临时注释,调试完 打开
this
.
getPositionData
();
// this._drawTimeoutId = setTimeout(() => {
},
10
*
1000
);
// this.getPositionData();
// }, 10 * 1000);
},
},
terminate
()
{
terminate
()
{
this
.
_drawTimeoutId
&&
window
.
clearTimeout
(
this
.
_drawTimeoutId
);
this
.
_drawTimeoutId
&&
window
.
clearTimeout
(
this
.
_drawTimeoutId
);
...
...
src/pages/monitor/zoneCar.vue
View file @
a80a1b2
...
@@ -172,6 +172,7 @@ import {
...
@@ -172,6 +172,7 @@ import {
import
EventBus
from
"@/event-bus"
;
import
EventBus
from
"@/event-bus"
;
import
{
showToast
,
deepClone
}
from
"@/utils/utils.js"
;
import
{
showToast
,
deepClone
}
from
"@/utils/utils.js"
;
import
{
Validator
,
CHECK_NUMBER
}
from
"@/common/validator"
;
import
{
Validator
,
CHECK_NUMBER
}
from
"@/common/validator"
;
import
qs
from
"qs"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -236,6 +237,7 @@ export default {
...
@@ -236,6 +237,7 @@ export default {
"AMap.AutoComplete"
,
"AMap.AutoComplete"
,
"AMap.MassMarks"
,
"AMap.MassMarks"
,
"AMap.MarkerCluster"
,
"AMap.MarkerCluster"
,
"AMap.Bounds"
,
]);
]);
if
(
window
.
AMap
)
{
if
(
window
.
AMap
)
{
window
.
AMap
=
null
;
window
.
AMap
=
null
;
...
@@ -258,12 +260,19 @@ export default {
...
@@ -258,12 +260,19 @@ export default {
console
.
log
(
e
);
console
.
log
(
e
);
let
poi
=
e
.
poi
||
{};
let
poi
=
e
.
poi
||
{};
_this
.
poi
=
poi
;
_this
.
poi
=
poi
;
_this
.
$set
(
_this
.
form
,
"address"
,
poi
.
name
);
_this
.
$refs
.
addressInput
.
focus
();
_this
.
$refs
.
addressInput
.
focus
();
});
});
// 判断是否为全屏,是否带参数,如果带了矩形参数,则默认画一个矩形
let
_query
=
_this
.
$route
.
query
;
if
(
_query
.
type
==
"full"
&&
_query
.
leftLngLat
)
{
this
.
initPage
(
_query
);
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
window
.
location
.
reload
();
//
window.location.reload();
});
});
},
},
...
@@ -298,7 +307,7 @@ export default {
...
@@ -298,7 +307,7 @@ export default {
_this
.
map
.
setZoom
(
14
);
_this
.
map
.
setZoom
(
14
);
}
}
_this
.
map
.
setZooms
([
14
,
30
]);
_this
.
map
.
setZooms
([
14
,
30
]);
if
(
_this
.
mouseTool
)
{
if
(
_this
.
mouseTool
)
{
_this
.
mouseTool
.
rectangle
({
_this
.
mouseTool
.
rectangle
({
fillColor
:
"#2C68FF"
,
fillColor
:
"#2C68FF"
,
...
@@ -537,6 +546,8 @@ export default {
...
@@ -537,6 +546,8 @@ export default {
async
getAreaLocation
()
{
async
getAreaLocation
()
{
let
_this
=
this
;
let
_this
=
this
;
let
params
=
this
.
getParams
();
let
params
=
this
.
getParams
();
let
_options
=
this
.
$route
.
query
;
console
.
log
(
_options
);
if
(
!
_this
.
rectangle
)
{
if
(
!
_this
.
rectangle
)
{
showToast
({
showToast
({
...
@@ -550,6 +561,10 @@ export default {
...
@@ -550,6 +561,10 @@ export default {
_this
.
mapMass
.
clear
();
_this
.
mapMass
.
clear
();
_this
.
mapMass
=
null
;
_this
.
mapMass
=
null
;
}
}
if
(
_options
.
type
!=
"full"
)
{
_this
.
goFullPage
();
return
false
;
}
_this
.
loading
=
true
;
_this
.
loading
=
true
;
let
res
=
await
GER_REGIONAL_SEARCH
(
params
);
let
res
=
await
GER_REGIONAL_SEARCH
(
params
);
...
@@ -633,12 +648,90 @@ export default {
...
@@ -633,12 +648,90 @@ export default {
});
});
mass
.
setMap
(
_this
.
map
);
mass
.
setMap
(
_this
.
map
);
this
.
drawDone
=
true
;
this
.
drawDone
=
true
;
if
(
arr
&&
arr
.
length
<
10
)
{
if
(
arr
&&
arr
.
length
<
10
)
{
this
.
map
.
setFitView
();
this
.
map
.
setFitView
();
}
}
this
.
mapMass
=
mass
;
this
.
mapMass
=
mass
;
},
},
// 全屏状态下,根据参数初始化页面
initPage
(
query
)
{
this
.
menuId
=
query
.
menuId
;
if
(
query
.
address
)
{
this
.
$set
(
this
.
form
,
"address"
,
query
.
address
);
}
if
(
query
.
sn
)
{
this
.
$set
(
this
.
form
,
"sn"
,
query
.
sn
);
}
// 执行查询设备号
if
(
query
.
menuId
==
2
&&
query
.
sn
)
{
this
.
getLocation
();
}
// 如果是地址,则标记出对应的点
if
(
query
.
menuId
==
1
&&
query
.
lng
)
{
let
poi
=
new
AMap
.
LngLat
(
query
.
lng
,
query
.
lat
);
this
.
autoCenterMarker
=
mapService
.
createMarker
(
poi
);
this
.
map
.
add
(
this
.
autoCenterMarker
);
}
this
.
drawRectangle
(
query
)
},
// 绘画矩形
drawRectangle
(
query
){
let
leftLngLat
=
query
.
leftLngLat
.
split
(
","
);
let
rightLngLat
=
query
.
rightLngLat
.
split
(
","
);
let
southWest
=
new
AMap
.
LngLat
(
leftLngLat
[
0
],
leftLngLat
[
1
]);
let
northEast
=
new
AMap
.
LngLat
(
rightLngLat
[
0
],
rightLngLat
[
1
]);
let
bounds
=
new
AMap
.
Bounds
(
southWest
,
northEast
);
let
rectangle
=
new
AMap
.
Rectangle
({
bounds
:
bounds
,
fillColor
:
"#2C68FF"
,
strokeColor
:
"#2C68FF"
,
fillOpacity
:
0.3
,
strokeWeight
:
4
,
strokeOpacity
:
1
,
draggable
:
true
,
});
this
.
map
.
add
(
rectangle
);
this
.
rectangle
=
rectangle
;
this
.
calculateWidthHeight
(
rectangle
.
getOptions
().
bounds
);
let
_zoom
=
this
.
map
.
getZoom
();
if
(
_zoom
<
14
)
{
this
.
map
.
setZoom
(
14
);
}
this
.
map
.
setZooms
([
14
,
30
]);
this
.
map
.
setFitView
();
},
// 跳转全屏页面
goFullPage
()
{
let
params
=
this
.
getParams
();
let
poi
=
this
.
poi
;
let
m
=
{};
m
.
leftLngLat
=
params
.
leftLngLat
;
m
.
rightLngLat
=
params
.
rightLngLat
;
m
.
menuId
=
this
.
menuId
;
// 根据地址查询
if
(
this
.
menuId
==
1
)
{
m
.
address
=
this
.
form
.
address
;
m
.
lng
=
poi
.
location
?
poi
.
location
.
lng
:
""
;
m
.
lat
=
poi
.
location
?
poi
.
location
.
lat
:
""
;
}
if
(
this
.
menuId
==
2
)
{
m
.
sn
=
this
.
form
.
sn
;
}
console
.
log
(
qs
.
stringify
(
m
));
let
_path
=
`oEshield#/monitor/zoneCar?type=full&`
+
qs
.
stringify
(
m
);
window
.
open
(
_path
);
},
// 添加海量点 标记点方式
// 添加海量点 标记点方式
// addMarkers2(arr) {
// addMarkers2(arr) {
// console.log(arr);
// console.log(arr);
...
...
src/utils/mapService.js
View file @
a80a1b2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment