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
65039efb
Commit
65039efb
authored
Jul 24, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理搜索、设备拖拽问题 gengdidi
parent
66b6cd0b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
45 deletions
+68
-45
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+1
-0
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+4
-0
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+1
-0
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+40
-30
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+22
-15
No files found.
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
65039efb
...
...
@@ -108,6 +108,7 @@
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
...
...
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
65039efb
...
...
@@ -81,6 +81,9 @@
gaoMap
:
null
}
},
mounted
(){
console
.
log
(
this
.
form
.
longitude
,
"==============="
)
},
components
:
{
FileUpload
,
},
...
...
@@ -108,6 +111,7 @@
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
65039efb
...
...
@@ -108,6 +108,7 @@
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
65039efb
...
...
@@ -208,34 +208,6 @@ class gaodeMap {
return
html
;
}
}
/* let html = "<div>" +
"<table>" +
"<tr>" +
"<td>所属燃气公司</td>" +
"<td>正元</td>" +
"</tr>" +
"<tr>" +
"<td>名称</td>" +
"<td>1234</td>" +
"</tr>" +
"<tr>" +
"<td>地址</td>" +
"<td>石家庄市新华区</td>" +
"</tr>" +
"</table>" +
"</div>";
switch (this.markerType){
case DEVICE_TYPE.REGEULATORBOX :{
return html;
}
case DEVICE_TYPE.VALUEWELL :{
return html;
}
case DEVICE_TYPE.FLOWMETER :{
return html;
}
}*/
}
/**
...
...
@@ -512,9 +484,17 @@ class gaodeMap {
device
.
obj
=
e
.
obj
;
device
.
gaoMap
=
that
;
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
console
.
log
(
aa
,
"fdsfdsfdsa===click"
)
let
postion
=
aa
.
target
.
_position
;
device
.
form
.
longitude
=
postion
.
lng
;
device
.
form
.
latitude
=
postion
.
lat
;
//兼容拖拽后单击事件,拖拽后点击事件返回位置为数组
if
(
postion
instanceof
Array
){
device
.
form
.
longitude
=
postion
[
0
];
device
.
form
.
latitude
=
postion
[
1
];
}
else
{
device
.
form
.
longitude
=
postion
.
lng
;
device
.
form
.
latitude
=
postion
.
lat
;
}
device
.
show
();
});
}
...
...
@@ -616,5 +596,35 @@ class gaodeMap {
}
);
}
searchTips
(
inputId
){
let
that
=
this
;
AMap
.
plugin
([
'AMap.AutoComplete'
,
'AMap.PlaceSearch'
],
function
()
{
//输入提示
var
autoOptions
=
{
input
:
inputId
};
var
auto
=
new
AMap
.
AutoComplete
(
autoOptions
);
that
.
placeSearch
=
new
AMap
.
PlaceSearch
({
map
:
map
});
//构造地点查询类
auto
.
on
(
'select'
,
function
(
e
){
console
.
log
(
e
,
"eeeeee========"
)
that
.
placeSearch
.
clear
();
that
.
placeSearch
.
setCity
(
e
.
poi
.
adcode
);
that
.
placeSearch
.
search
(
e
.
poi
.
name
);
//关键字查询查询
})
})
}
searchKeyWord
(
keyWord
){
AMap
.
plugin
([
'AMap.AutoComplete'
],
function
()
{
var
placeSearch
=
new
AMap
.
PlaceSearch
({
map
:
map
});
placeSearch
.
search
(
keyWord
);
//关键字查询查询
})
}
}
export
default
gaodeMap
;
gassafety-web/src/views/enterprise/map/index.vue
View file @
65039efb
<
template
>
<div>
<div
style=
"width: 100vw; height: 100vh"
id=
"container"
></div>
<!--
<div
class=
"input-card"
style=
'width: 24rem;'
>
<div
class=
"input-item"
>
<input
type=
"radio"
name=
'func'
value=
'marker'
><span
class=
"input-text"
>
画点
</span>
<input
type=
"radio"
name=
'func'
value=
'polyline'
><span
class=
"input-text"
>
画折线
</span>
<input
type=
"radio"
name=
'func'
value=
'polygon'
><span
class=
"input-text"
style=
'width:5rem;'
>
画多边形
</span>
</div>
<div
class=
"input-item"
>
<input
type=
"radio"
name=
'func'
value=
'rectangle'
><span
class=
"input-text"
>
画矩形
</span>
<input
type=
"radio"
name=
'func'
value=
'circle'
><span
class=
"input-text"
>
画圆
</span>
</div>
<div
class=
"input-item"
>
<input
id=
"clear"
type=
"button"
class=
"btn"
value=
"清除"
/>
<input
id=
"close"
type=
"button"
class=
"btn"
value=
"关闭绘图"
/>
</div>
</div>
-->
<el-input
v-model=
"keyWord"
placeholder=
"点击输入"
id=
"tipinput"
class=
"search-input"
/>
<el-button
type=
"red"
icon=
"el-icon-search"
class=
"search-but"
@
click=
"search()"
>
搜索
</el-button>
<el-button
type=
"primary"
style=
"position: absolute; top: 100px; left: 75%"
...
...
@@ -76,6 +63,7 @@ export default {
inspectionTime
:
null
,
remarks
:
null
},
keyWord
:
""
};
},
mounted
()
{
...
...
@@ -96,6 +84,7 @@ export default {
];
gaoMap
.
addPolyline
(
path
);
gaoMap
.
addMouseTool
();
gaoMap
.
searchTips
(
"tipinput"
);
this
.
getDeviceInfo
();
},
methods
:
{
...
...
@@ -109,11 +98,13 @@ export default {
this
.
gaoMap
.
lineType
=
2
;
this
.
gaoMap
.
mapOperateType
=
"edit"
;
this
.
gaoMap
.
addMarkerDragg
();
this
.
gaoMap
.
placeSearch
.
clear
();
},
deleteDevice
()
{
this
.
deviceType
=
false
;
this
.
gaoMap
.
mapOperateType
=
"delete"
;
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
placeSearch
.
clear
();
},
selectDeviceType
(
val
)
{
// if("add" == this.operationType){
...
...
@@ -146,6 +137,10 @@ export default {
this
.
loading
=
false
;
});
},
search
(){
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
placeSearch
.
search
(
this
.
keyWord
)
}
},
};
...
...
@@ -226,5 +221,17 @@ input[type="radio"] {
width
:
4rem
;
margin-right
:
1rem
;
}
.search-input
{
position
:
absolute
;
top
:
100px
;
left
:
2%
;
width
:
240px
;
}
.search-but
{
position
:
absolute
;
top
:
100px
;
left
:
19%
;
width
:
85px
;
color
:
white
;
background-color
:
#053B6A
;
}
</
style
>
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