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 78f8633c
authored
Apr 24, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复新增围栏(多边形围栏和行政区域报错的问题)
1 parent
01990e91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
71 deletions
src/pages/FullWidthLayout.vue
src/pages/monitor/fence.vue
src/utils/fence.js
src/pages/FullWidthLayout.vue
View file @
78f8633
<
template
>
<div>
<!--
<v-breadcrumb>
<div>
<!--
<v-breadcrumb>
<slot
name=
"breadcrumb"
></slot>
</v-breadcrumb>
-->
<div
class=
"main-wrap full-width"
>
<slot
name=
"main"
></slot>
</div>
</div>
<div
class=
"main-wrap full-width"
>
<slot
name=
"main"
></slot>
</div>
</div>
</
template
>
<
script
>
// import vBreadcrumb from 'components/Breadcrumb.vue'
export
default
{
components
:
{
// vBreadcrumb
}
}
export
default
{
components
:
{
// vBreadcrumb
},
}
;
</
script
>
<
style
lang=
"scss"
>
h1
,
h2
,
h3
,
h4
,
h5
{
margin
:
0px
;
}
.main-wrap.full-width
{
position
:
fixed
;
width
:
calc
(
100%
-
200px
);
height
:
calc
(
100%
-
60px
);
top
:
60px
;
left
:
200px
;
background
:
#fff
;
padding
:
0
;
}
.ibox
{
background-color
:
#fff
;
border-top
:
2px
solid
#e7eaec
;
padding
:
10px
;
margin-bottom
:
20px
;
.ibox-title{
padding-bottom
:
10px
;
}
.ibox-content
{
padding
:
20px
20px
0px
;
margin
:
0px
-10px
;
border-top
:
1px
solid
#e7eaec
;
}
.count
{
font-size
:
20px
;
}
}
h1
,
h2
,
h3
,
h4
,
h5
{
margin
:
0px
;
}
.main-wrap.full-width
{
position
:
fixed
;
width
:
calc
(
100%
-
200px
);
height
:
calc
(
100%
-
60px
);
top
:
60px
;
left
:
200px
;
background
:
#fff
;
padding
:
0
;
}
.ibox
{
background-color
:
#fff
;
border-top
:
2px
solid
#e7eaec
;
padding
:
10px
;
margin-bottom
:
20px
;
.ibox-title
{
padding-bottom
:
10px
;
}
.ibox-content
{
padding
:
20px
20px
0px
;
margin
:
0px
-10px
;
border-top
:
1px
solid
#e7eaec
;
}
.count
{
font-size
:
20px
;
}
}
.full_wrap_layout
{
.full-width
{
width
:
100%
;
height
:
100%
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
}
}
</
style
>
\ No newline at end of file
src/pages/monitor/fence.vue
View file @
78f8633
<
template
>
<v-full-layout>
<v-full-layout
class=
"full_wrap_layout"
>
<template
slot=
"breadcrumb"
>
<el-breadcrumb-item>
电子围栏
</el-breadcrumb-item>
</
template
>
...
...
src/utils/fence.js
View file @
78f8633
...
...
@@ -22,7 +22,7 @@ const fence = {
});
EventBus
.
$on
(
'uiMap.fence.updateFenceRadius'
,
(
data
)
=>
{
console
.
log
(
'监听围栏更新'
,
data
)
console
.
log
(
'监听围栏更新'
,
data
)
this
.
updateFenceInfo
(
data
)
});
//this.circle.setRadius(data * 1);
...
...
@@ -66,12 +66,11 @@ const fence = {
// 行政区域
drawDistrict
(
data
)
{
const
MAP
=
mapService
.
map
;
this
.
destroy
();
if
(
!
data
||
data
.
length
<=
0
)
{
return
false
;
}
const
MAP
=
mapService
.
map
;
this
.
destroy
();
var
opts
=
{
subdistrict
:
0
,
//返回下一级行政区
extensions
:
'all'
,
...
...
@@ -335,10 +334,10 @@ const fence = {
let
mapInterval
=
setInterval
(
function
()
{
if
(
MAP
)
{
clearInterval
(
mapInterval
);
MAP
.
clearMap
();
if
(
_this
.
fenceCircle
)
{
MAP
.
remove
(
_this
.
fenceCircle
)
}
_this
.
fenceType
=
data
.
fenceType
;
_this
.
polyEditor
&&
_this
.
polyEditor
.
close
();
_this
.
mouseTool
&&
_this
.
mouseTool
.
close
();
...
...
@@ -358,27 +357,6 @@ const fence = {
_this
.
createFenceCircle
(
data
);
return
false
;
}
// 更新行政区域围栏
if
(
data
.
fenceType
===
"area"
)
{
_this
.
areaCode
=
data
.
areaCode
;
_this
.
drawDistrict
(
data
);
return
false
}
// 更新多边形围栏
if
(
data
.
fenceType
===
"polygon"
)
{
if
(
data
)
{
if
(
Array
.
isArray
(
data
))
{
this
.
polygonPath
=
data
;
this
.
isEditMode
=
true
;
}
else
if
((
'isEdit'
in
data
)
&&
!
data
.
isEdit
)
{
this
.
polygonPath
=
data
.
path
;
this
.
isEditMode
=
false
;
}
}
_this
.
drawPolygon
();
}
mapService
.
setFitView
()
MAP
.
setZoom
(
14
);
}
...
...
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