Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
b43719f0
Commit
b43719f0
authored
Jul 28, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整管道各种细节
parent
c0c97a07
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
179 deletions
+172
-179
lineInfoWindow.vue
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
+113
-88
pipelineView.vue
gassafety-web/src/components/PopWindow/pipelineView.vue
+12
-3
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+34
-55
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+13
-33
No files found.
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
View file @
b43719f0
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<div
class=
"top display-default"
>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
obj
.
pipeName
}}
</div>
<div
class=
"left text"
>
{{
obj
.
pipeName
}}
</div>
<div
v-if=
"!obj.editorPage"
class=
"right text"
>
<div
class=
"right text"
>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
/>
<img
@
click=
"close"
src=
"../../assets/images/closeBtn.png"
alt=
""
/>
</div>
</div>
</div>
</div>
<!-- 设备信息 -->
<!-- 设备信息 -->
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<div
class=
"text-wrapper"
>
<!--
<div
:title=
"obj.pipeName"
class=
"eq-text"
>
<!--
<div
:title=
"obj.pipeName"
class=
"eq-text"
>
...
@@ -15,20 +17,20 @@
...
@@ -15,20 +17,20 @@
</div>
-->
</div>
-->
<div
class=
"eq-text"
>
<div
class=
"eq-text"
>
<span>
管道编号:
</span>
<span>
管道编号:
</span>
<span>
{{
obj
.
pipeCode
}}
</span>
<span>
{{
obj
.
pipeCode
}}
</span>
</div>
</div>
<div
class=
"eq-text"
>
<div
class=
"eq-text"
>
<span>
管道长度:
</span>
<span>
管道长度:
</span>
<span>
{{
`${obj.pipeLength ?obj.pipeLength+'米':
""
}
`
}}
<
/span
>
<span>
{{
`${obj.pipeLength ? obj.pipeLength + "米" :
""
}
`
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"eq-text"
>
<
div
class
=
"eq-text"
>
<
span
>
管道类型:
<
/span
>
<
span
>
管道类型:
<
/span
>
<
span
>
{{
[
"地埋管线"
,
"地表管线"
][
obj
.
pipeType
-
1
]
}}
<
/span
>
<
span
>
{{
[
"地埋管线"
,
"地表管线"
][
obj
.
pipeType
-
1
]
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"eq-text"
>
<
div
class
=
"eq-text"
>
<
span
>
管道压力:
<
/span
>
<
span
>
管道压力:
<
/span
>
<
span
>
{{
<
span
>
{{
[
"低押"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
[
"低押"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -40,16 +42,20 @@
...
@@ -40,16 +42,20 @@
<
div
class
=
"maintain-content"
>
<
div
class
=
"maintain-content"
>
<
div
>
<
div
>
管道所在地址:
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
div
>
安装日期:
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
div
>
最后巡检日期:
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
div
>
备注信息;
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
span
>
备注信息;
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"!obj.editorPage"
>
<
template
v
-
if
=
"!obj.editorPage"
>
...
@@ -61,23 +67,28 @@
...
@@ -61,23 +67,28 @@
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
/div
>
<!--
报警状态
-->
<!--
报警状态
-->
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
//line移入时的的infowindow
//line移入时的的infowindow
import
moment
from
"moment"
import
moment
from
"moment"
;
export
default
{
export
default
{
props
:
{
props
:
{
obj
:
{
typs
:
Object
}
,
obj
:
{
typs
:
Object
}
,
}
,
}
,
created
(){
created
()
{
console
.
log
(
"created"
,
this
.
obj
)
console
.
log
(
"created"
,
this
.
obj
);
}
,
}
,
methods
:{
methods
:
{
moment
,
moment
,
}
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
}
;
}
;
<
/script
>
<
/script
>
...
@@ -100,17 +111,23 @@ export default {
...
@@ -100,17 +111,23 @@ export default {
line
-
height
:
51
px
;
line
-
height
:
51
px
;
}
}
.
left
{
.
left
{
padding
-
left
:
10
px
;
padding
-
left
:
22
px
;
}
}
.
right
{
.
right
{
padding
-
right
:
10
px
;
padding
-
right
:
22
px
;
img
{
cursor
:
pointer
;
}
}
}
}
}
.
content
{
max
-
height
:
400
px
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
.
eq
-
content
{
.
eq
-
content
{
min
-
height
:
156
px
;
min
-
height
:
156
px
;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
13
px
10
px
0
px
10
px
;
padding
:
13
px
22
px
0
px
22
px
;
// border-bottom: 1px solid #e2e2e2;
// border-bottom: 1px solid #e2e2e2;
.
text
-
wrapper
{
.
text
-
wrapper
{
padding
-
top
:
1
px
;
padding
-
top
:
1
px
;
...
@@ -123,10 +140,11 @@ export default {
...
@@ -123,10 +140,11 @@ export default {
color
:
#
1
d1d1d
;
color
:
#
1
d1d1d
;
opacity
:
1
;
opacity
:
1
;
&
>
span
{
&
>
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
display
:
inline
-
block
;
white
-
space
:
nowrap
;
//
white-space: nowrap;
text
-
overflow
:
ellipsis
;
//
text-overflow: ellipsis;
overflow
:
hidden
;
//
overflow: hidden;
word
-
break
:
break
-
all
;
word
-
break
:
break
-
all
;
max
-
width
:
100
px
;
max
-
width
:
100
px
;
}
}
...
@@ -142,20 +160,27 @@ export default {
...
@@ -142,20 +160,27 @@ export default {
}
}
}
}
}
}
}
.
maintain
-
content
{
.
maintain
-
content
{
width
:
100
%
;
width
:
100
%
;
height
:
119
px
;
height
:
119
px
;
padding
-
left
:
10
px
;
padding
-
left
:
22
px
;
padding
-
right
:
10
px
;
padding
-
right
:
22
px
;
// padding-bottom:
10px;
padding
-
bottom
:
10
px
;
// padding-top: 16px;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
//
border-bottom: 1px solid #e2e2e2;
&
>
div
{
&
>
div
{
margin
-
bottom
:
8
px
;
margin
-
bottom
:
8
px
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
font
-
weight
:
400
;
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
word
-
break
:
break
-
all
;
max
-
width
:
280
px
;
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindow/pipelineView.vue
View file @
b43719f0
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<el-col>
<el-col>
<el-form-item
v-show=
"false"
label=
"企业id"
prop=
"enterpriseId"
>
<el-form-item
v-show=
"false"
label=
"企业id"
prop=
"enterpriseId"
>
<el-input
disabled
v-model=
"editForm.enterpriseId"
></el-input>
<el-input
disabled
v-model=
"editForm.enterpriseId"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -40,7 +41,7 @@
...
@@ -40,7 +41,7 @@
</el-col>
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"管道长度"
prop=
"pipeLength"
>
<el-form-item
label=
"管道长度"
prop=
"pipeLength"
>
<el-input
v-model=
"editForm.pipeLength"
>
<el-input
type=
"number"
min=
0
v-model=
"editForm.pipeLength"
>
<i
<i
slot=
"suffix"
slot=
"suffix"
style=
"color: #000; font-style: normal; margin-right: 10px"
style=
"color: #000; font-style: normal; margin-right: 10px"
...
@@ -212,7 +213,7 @@ export default {
...
@@ -212,7 +213,7 @@ export default {
pipePressure
:
[
pipePressure
:
[
{
required
:
true
,
message
:
"请选择管道压力"
,
trigger
:
"blur"
}
,
{
required
:
true
,
message
:
"请选择管道压力"
,
trigger
:
"blur"
}
,
],
],
iconUrl
:
[{
required
:
true
,
message
:
"请上传
骨
片"
,
trigger
:
"change"
}
],
iconUrl
:
[{
required
:
true
,
message
:
"请上传
图
片"
,
trigger
:
"change"
}
],
installationTime
:
[
installationTime
:
[
{
{
// type: "date",
// type: "date",
...
@@ -254,11 +255,18 @@ export default {
...
@@ -254,11 +255,18 @@ export default {
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
data
.
pipeId
=
data
.
pipeId
?
data
.
pipeId
:
res
.
data
;
data
.
pipeId
=
data
.
pipeId
?
data
.
pipeId
:
res
.
data
;
this
.
lineOkCallBack
.
call
(
this
.
gaodeMap
,
this
.
target
,
data
);
this
.
lineOkCallBack
.
call
(
this
.
gaodeMap
,
this
.
target
,
data
);
if
(
!
this
.
editForm
.
pipeId
)
{
this
.
gaodeMap
.
newLineObj
=
null
;
this
.
gaodeMap
.
createNewLine
();
}
this
.
$message
({
this
.
$message
({
type
:
"success"
,
type
:
"success"
,
offset
:
100
,
offset
:
100
,
// center:true,
// center:true,
message
:
`${this.editForm.pipeId ?"修改管道成功":"添加管道成功"
}
`
,
message
:
`${
this.editForm.pipeId ? "修改管道成功" : "添加管道成功"
}
`
,
}
);
}
);
}
}
}
)
}
)
...
@@ -294,6 +302,7 @@ export default {
...
@@ -294,6 +302,7 @@ export default {
// 图片上传成功
// 图片上传成功
fileFinshed
(
e
)
{
fileFinshed
(
e
)
{
this
.
editForm
.
iconUrl
=
e
.
url
;
this
.
editForm
.
iconUrl
=
e
.
url
;
console
.
log
(
this
.
editForm
.
iconUrl
);
}
,
}
,
// 图片列表移除
// 图片列表移除
listRemove
(
e
)
{
listRemove
(
e
)
{
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
b43719f0
...
@@ -31,6 +31,7 @@ class gaodeMap {
...
@@ -31,6 +31,7 @@ class gaodeMap {
lineFlag
=
false
;
lineFlag
=
false
;
mouseTool
=
null
;
mouseTool
=
null
;
myMap
=
null
;
myMap
=
null
;
showInfoWindow
=
null
;
//构造函数中设置中央点默认值
//构造函数中设置中央点默认值
constructor
(
center
)
{
constructor
(
center
)
{
...
@@ -65,6 +66,7 @@ class gaodeMap {
...
@@ -65,6 +66,7 @@ class gaodeMap {
this
.
newLineObj
=
null
;
this
.
newLineObj
=
null
;
this
.
lineFlag
=
false
;
this
.
lineFlag
=
false
;
this
.
createNewLine
();
this
.
createNewLine
();
console
.
log
(
"map点击事件新建"
);
console
.
log
(
"map点击事件新建"
);
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
...
@@ -91,9 +93,7 @@ class gaodeMap {
...
@@ -91,9 +93,7 @@ class gaodeMap {
this
.
districtBoundaries
();
this
.
districtBoundaries
();
}
}
resetMapCenter
(
value
)
{
resetMapCenter
(
value
){
map
.
setCenter
(
value
);
map
.
setCenter
(
value
);
}
}
...
@@ -335,7 +335,7 @@ class gaodeMap {
...
@@ -335,7 +335,7 @@ class gaodeMap {
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
let
icon
=
new
AMap
.
Icon
({
let
icon
=
new
AMap
.
Icon
({
//size: new AMap.Size(51, 23),
//size: new AMap.Size(51, 23),
image
:
require
(
"../assets/images/yalibiao.png"
)
,
image
:
require
(
"../assets/images/yalibiao.png"
)
});
});
marker
.
setIcon
(
icon
);
marker
.
setIcon
(
icon
);
break
;
break
;
...
@@ -373,16 +373,27 @@ class gaodeMap {
...
@@ -373,16 +373,27 @@ class gaodeMap {
lineData
:
item
lineData
:
item
}
}
});
});
this
.
polyLines
.
push
(
polyline
);
this
.
polyLines
.
push
(
polyline
);
// 信息窗体
// 信息窗体
const
dom
=
createPop
(
lineInfoWindow
,
{
const
dom
=
createPop
(
lineInfoWindow
,
{
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
}
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
,
polyline
}
});
});
console
.
log
(
"dom"
,
dom
.
$el
);
console
.
log
(
"dom"
,
dom
.
$el
);
dom
.
$el
.
addEventListener
(
"mouseover"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
false
;
this
.
myMap
.
setStatus
(
options
);
});
dom
.
$el
.
addEventListener
(
"mouseout"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
});
let
infoWindow
=
new
AMap
.
InfoWindow
({
let
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
isCustom
:
true
,
autoMove
:
false
,
content
:
dom
.
$el
,
content
:
dom
.
$el
,
//信息船体偏移量
//信息船体偏移量
offset
:
new
AMap
.
Pixel
(
0
,
0
),
offset
:
new
AMap
.
Pixel
(
0
,
0
),
...
@@ -390,9 +401,10 @@ class gaodeMap {
...
@@ -390,9 +401,10 @@ class gaodeMap {
});
});
this
.
newLineAddEvent
(
polyline
);
this
.
newLineAddEvent
(
polyline
);
polyline
.
infoWindow
=
infoWindow
;
//添加事件
//添加事件
polyline
.
on
(
"mouseover"
,
e
=>
{
polyline
.
on
(
"mouseover"
,
e
=>
{
if
(
this
.
lineType
==
1
)
return
;
// 上方导航的高
// 上方导航的高
const
topBar
=
81
;
const
topBar
=
81
;
// 坐标导航的宽
// 坐标导航的宽
...
@@ -437,12 +449,14 @@ class gaodeMap {
...
@@ -437,12 +449,14 @@ class gaodeMap {
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
open
(
map
,
e
.
lnglat
);
infoWindow
.
open
(
map
,
e
.
lnglat
);
// polyline.infoWindow=infoWindow;
this
.
showInfoWindow
=
infoWindow
;
// const
// const
});
});
polyline
.
on
(
"mouseout"
,
e
=>
{
polyline
.
on
(
"mouseout"
,
e
=>
{
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
infoWindow
.
close
();
//
infoWindow.close();
});
});
// 计算info的位置
// 计算info的位置
// function infoPosition() {}
// function infoPosition() {}
...
@@ -480,51 +494,8 @@ class gaodeMap {
...
@@ -480,51 +494,8 @@ class gaodeMap {
}
}
}
}
// 新建line增加编辑以及右键菜单
// 新建line增加编辑以及右键菜单
addEditorAndMenu
(
obj
)
{
closeLineInfoWindow
()
{
let
polyEditor
=
new
AMap
.
PolyEditor
(
map
,
obj
);
this
.
showInfoWindow
&&
this
.
showInfoWindow
.
close
();
let
contextMenu
=
new
AMap
.
ContextMenu
();
contextMenu
.
addItem
(
"编辑"
,
function
()
{
polyEditor
.
setTarget
(
obj
);
polyEditor
.
open
();
contextMenu
.
close
();
},
0
);
contextMenu
.
addItem
(
"结束编辑"
,
function
()
{
polyEditor
.
close
();
contextMenu
.
close
();
console
.
log
(
obj
.
getPath
());
},
0
);
contextMenu
.
addItem
(
"保存"
,
()
=>
{
polyEditor
.
close
();
contextMenu
.
close
();
this
.
addPolyline
([
obj
.
getPath
()]);
map
.
remove
(
obj
);
},
0
);
contextMenu
.
addItem
(
"删除"
,
function
()
{
polyEditor
.
setTarget
(
obj
);
polyEditor
.
open
();
contextMenu
.
close
();
},
0
);
obj
.
on
(
"rightclick"
,
e
=>
{
if
(
this
.
lineType
==
1
)
{
contextMenu
.
open
(
map
,
e
.
lnglat
);
}
});
}
}
// 新line与老line添加点击事件
// 新line与老line添加点击事件
newLineAddEvent
(
obj
)
{
newLineAddEvent
(
obj
)
{
...
@@ -537,7 +508,10 @@ class gaodeMap {
...
@@ -537,7 +508,10 @@ class gaodeMap {
console
.
log
(
"lineType"
,
this
.
lineType
);
console
.
log
(
"lineType"
,
this
.
lineType
);
this
.
lineFlag
=
true
;
this
.
lineFlag
=
true
;
// 每次点击关闭然后再次激活
// 每次点击关闭然后再次激活
// 如果是新线就关闭
if
(
obj
.
getExtData
().
type
==
"newLine"
)
{
this
.
mouseTool
.
close
();
this
.
mouseTool
.
close
();
}
// 删除
// 删除
if
(
this
.
lineType
==
3
)
{
if
(
this
.
lineType
==
3
)
{
this
.
lineDelete
(
obj
);
this
.
lineDelete
(
obj
);
...
@@ -591,8 +565,11 @@ class gaodeMap {
...
@@ -591,8 +565,11 @@ class gaodeMap {
});
});
}
}
lineDelete
(
obj
)
{
lineDelete
(
obj
)
{
const
{
lineData
:
{
pipeName
}
}
=
obj
.
getExtData
();
vue
vue
.
$confirm
(
"是否删除该管道"
,
"提示"
,
{
.
$confirm
(
`是否删除
${
pipeName
}
`
,
"提示"
,
{
// confirmButtonText: "确定",
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// cancelButtonText: "取消",
type
:
"warning"
type
:
"warning"
...
@@ -616,6 +593,8 @@ class gaodeMap {
...
@@ -616,6 +593,8 @@ class gaodeMap {
// center:true,
// center:true,
message
:
"删除成功!"
message
:
"删除成功!"
});
});
// 关闭当前线条的infowindow
// this.closeLineInfoWindow();
});
});
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
b43719f0
...
@@ -102,37 +102,7 @@
...
@@ -102,37 +102,7 @@
@
click=
"search()"
@
click=
"search()"
>
搜索
</el-button
>
搜索
</el-button
>
>
<!-- <el-button
type="primary"
style="position: absolute; top: 100px; left: 75%"
@click="addDevice"
>新增</el-button
>
<el-button
type="primary"
style="position: absolute; top: 100px; left: 82%"
@click="editDevice"
>编辑</el-button
>
<el-button
type="primary"
style="position: absolute; top: 100px; left: 90%"
@click="deleteDevice"
>删除</el-button
>
<el-select
v-model="value"
placeholder="请选择..."
@change="selectDeviceType"
style="position: absolute; top: 150px; left: 75%"
v-if="deviceType"
>
<el-option label="管道" value="1"></el-option>
<el-option label="调压箱" value="2"></el-option>
<el-option label="阀门井" value="3"></el-option>
<el-option label="流量计" value="4"></el-option>
<el-option label="值班人员" value="5"></el-option>
</el-select> -->
<div
class=
"leftBar-wrapper"
>
<div
class=
"leftBar-wrapper"
>
<div
<div
...
@@ -236,6 +206,7 @@ export default {
...
@@ -236,6 +206,7 @@ export default {
// 左边的Bar修改值
// 左边的Bar修改值
leftBarChange
(
item
)
{
leftBarChange
(
item
)
{
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
this
.
leftBarNum
.
splice
(
index
,
1
);
this
.
leftBarNum
.
splice
(
index
,
1
);
...
@@ -284,12 +255,15 @@ export default {
...
@@ -284,12 +255,15 @@ export default {
},
},
addDevice
()
{
addDevice
()
{
if
(
this
.
iconClass
==
"icon-create"
)
{
if
(
this
.
iconClass
==
"icon-create"
)
{
this
.
targetNum
=
this
.
targetNum
!=
1
?
1
:
0
;
this
.
targetNum
=
this
.
targetNum
!=
1
?
1
:
0
;
}
else
{
}
else
{
if
(
this
.
deviceType
)
{
if
(
this
.
deviceType
)
{
this
.
targetNum
=
0
;
this
.
targetNum
=
0
;
this
.
createReset
();
this
.
createReset
();
this
.
gaoMap
.
newLineReset
();
}
}
}
}
if
(
this
.
targetNum
==
1
&&
this
.
createValue
==
1
)
{
if
(
this
.
targetNum
==
1
&&
this
.
createValue
==
1
)
{
...
@@ -297,6 +271,9 @@ export default {
...
@@ -297,6 +271,9 @@ export default {
}
else
{
}
else
{
this
.
gaoMap
.
lineType
=
0
;
this
.
gaoMap
.
lineType
=
0
;
}
}
// 关闭当前线条的infowindow
this
.
gaoMap
.
closeLineInfoWindow
();
this
.
deviceType
=
!
this
.
deviceType
;
this
.
deviceType
=
!
this
.
deviceType
;
this
.
gaoMap
.
mapOperateType
=
"add"
;
this
.
gaoMap
.
mapOperateType
=
"add"
;
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
removeMarkerDragg
();
...
@@ -322,6 +299,7 @@ export default {
...
@@ -322,6 +299,7 @@ export default {
// 如果不是管道了,把之前的管道清空
// 如果不是管道了,把之前的管道清空
this
.
gaoMap
.
newLineReset
();
this
.
gaoMap
.
newLineReset
();
// this.createReset();
// this.createReset();
// 其他
// 其他
this
.
gaoMap
.
draw
(
this
.
createValue
.
toString
());
this
.
gaoMap
.
draw
(
this
.
createValue
.
toString
());
...
@@ -415,10 +393,12 @@ export default {
...
@@ -415,10 +393,12 @@ export default {
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
placeSearch
.
search
(
this
.
keyWord
);
this
.
gaoMap
.
placeSearch
.
search
(
this
.
keyWord
);
},
},
// 新建下拉列表关闭
// 新建下拉列表关闭
window点击事件
barClose
()
{
barClose
()
{
console
.
log
(
"window"
);
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
this
.
deviceType
=
false
;
// 关闭当前线条的infowindow
this
.
gaoMap
.
closeLineInfoWindow
()
// 如果没有选择的时候点window 则高亮消失
// 如果没有选择的时候点window 则高亮消失
if
(
this
.
targetNum
==
1
&&
this
.
iconClass
==
"icon-create"
)
{
if
(
this
.
targetNum
==
1
&&
this
.
iconClass
==
"icon-create"
)
{
this
.
targetNum
=
0
;
this
.
targetNum
=
0
;
...
...
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