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
d4754930
Commit
d4754930
authored
Jul 26, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理地图 gengdidi
parent
9bdbfdcb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
187 additions
and
7 deletions
+187
-7
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+3
-1
pressureGage.vue
gassafety-web/src/components/PopWindow/pressureGage.vue
+142
-0
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+4
-1
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+3
-1
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+31
-3
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+4
-1
No files found.
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
d4754930
...
...
@@ -74,7 +74,7 @@
data
()
{
return
{
form
:
{
deviceType
:
"
1
"
deviceType
:
"
3
"
},
dialogVisible
:
false
,
fileList
:
[],
...
...
@@ -106,6 +106,8 @@
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
dialogVisible
=
false
;
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
...
...
gassafety-web/src/components/PopWindow/pressureGage.vue
0 → 100644
View file @
d4754930
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"80%"
:before-close=
"handleClose"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-form-item
label=
"所属管道"
prop=
"pipeCode"
>
<el-input
v-model=
"form.pipeCode"
placeholder=
"请输入所属管道"
/>
</el-form-item>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
<el-form-item
label=
"所在地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址"
/>
</el-form-item>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
<el-form-item
label=
"经度"
prop=
"longitude"
>
<el-input
v-model=
"form.longitude"
placeholder=
"请输入经度"
/>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"latitude"
>
<el-input
v-model=
"form.latitude"
placeholder=
"请输入纬度"
/>
</el-form-item>
<el-form-item
label=
"物联网编号"
prop=
"iotNo"
>
<el-input
v-model=
"form.iotNo"
placeholder=
"请输入物联网编号"
/>
</el-form-item>
<el-form-item
label=
"设备图片上传"
prop=
"iconUrl"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo"
@
remove=
"listRemove"
:fileArr=
"fileArr"
/>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"linkman"
>
<el-input
v-model=
"form.linkman"
placeholder=
"请输入联系人"
/>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入电话"
/>
</el-form-item>
<el-form-item
label=
"安装时间"
prop=
"installationTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"form.installationTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择安装时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getAllDeviceInfo
,
addDeviceInfo
,
updateDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
MyFileUpload
from
"@/components/MyFileUpload"
;
import
{
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
form
:
{
deviceType
:
"4"
},
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
,
fileArr
:
[]
}
},
components
:
{
MyFileUpload
,
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
},
hide
()
{
this
.
remove
()
},
getFileInfo
(
res
){
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
dialogVisible
=
false
;
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
closeAddMarker
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
}
});
}
}
});
},
handleClose
(
done
)
{
done
();
},
listRemove
(
e
)
{
this
.
form
.
url
=
""
;
this
.
fileArr
=
[];
}
}
}
</
script
>
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
d4754930
...
...
@@ -80,7 +80,7 @@
rules
:
{
},
map
:
null
,
obj
:
Object
,
obj
:
null
,
gaoMap
:
null
,
fileArr
:
[]
}
...
...
@@ -104,6 +104,8 @@
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
dialogVisible
=
false
;
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
...
...
@@ -112,6 +114,7 @@
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
console
.
log
(
this
.
gaoMap
,
"addgaoMap"
)
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
closeAddMarker
();
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
d4754930
...
...
@@ -74,7 +74,7 @@
data
()
{
return
{
form
:
{
deviceType
:
"
1
"
deviceType
:
"
2
"
},
dialogVisible
:
false
,
fileList
:
[],
...
...
@@ -106,6 +106,8 @@
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
(
response
=>
{
this
.
dialogVisible
=
false
;
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
msgSuccess
(
"修改成功"
);
});
}
else
{
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
d4754930
...
...
@@ -15,7 +15,8 @@ export const DEVICE_TYPE = {
VALUEWELL
:
"3"
,
FLOWMETER
:
"4"
,
DUTYPERSON
:
"5"
,
WORKORDER
:
"6"
WORKORDER
:
"6"
,
PRESSUREGAGE
:
"7"
};
class
gaodeMap
{
// 所有线的数组
...
...
@@ -117,6 +118,9 @@ class gaodeMap {
that
.
deviceType
=
markerType
;
let
editWindow
=
that
.
createInfowindow
();
editWindow
.
fileArr
=
data
.
iconUrl
!=
""
&&
data
.
iconUrl
!=
undefined
?
[{
url
:
data
.
iconUrl
}]
:
[];
editWindow
.
obj
=
marker
;
editWindow
.
gaoMap
=
that
;
editWindow
.
map
=
map
;
marker
.
on
(
"click"
,
function
(
e
)
{
if
(
"edit"
==
that
.
mapOperateType
)
{
editWindow
.
form
=
e
.
target
.
getExtData
();
...
...
@@ -213,6 +217,16 @@ class gaodeMap {
dom
.
remove
();
return
html
;
}
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
const
dom
=
createPop
(
markerInfoWindow
,{
title
:
"压力表"
,
data
:
data
,
map
:
map
});
const
html
=
dom
.
$el
;
dom
.
remove
();
return
html
;
}
}
}
...
...
@@ -223,7 +237,7 @@ class gaodeMap {
* @param deviceId
*/
deleteMarker
(
delType
,
deviceId
){
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
delType
||
DEVICE_TYPE
.
VALUEWELL
==
delType
||
DEVICE_TYPE
.
FLOWMETER
==
delType
){
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
delType
||
DEVICE_TYPE
.
VALUEWELL
==
delType
||
DEVICE_TYPE
.
FLOWMETER
==
delType
||
DEVICE_TYPE
.
PRESSUREGAGE
==
delType
){
delDeviceInfo
(
deviceId
);
}
...
...
@@ -275,6 +289,14 @@ class gaodeMap {
marker
.
setIcon
(
icon
);
break
;
}
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
let
icon
=
new
AMap
.
Icon
({
//size: new AMap.Size(51, 23),
image
:
require
(
"../assets/images/zhibaorenyuan.png"
),
});
marker
.
setIcon
(
icon
);
break
;
}
}
}
...
...
@@ -630,6 +652,11 @@ class gaodeMap {
title
:
"流量计"
});
}
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
return
createPop
(
flowMeter
,
{
title
:
"压力表"
});
}
}
}
...
...
@@ -643,7 +670,8 @@ class gaodeMap {
if
(
DEVICE_TYPE
.
REGEULATORBOX
==
deviceType
||
DEVICE_TYPE
.
VALUEWELL
==
deviceType
||
DEVICE_TYPE
.
FLOWMETER
==
deviceType
DEVICE_TYPE
.
FLOWMETER
==
deviceType
||
DEVICE_TYPE
.
PRESSUREGAGE
==
deviceType
)
{
that
.
mouseTool
.
marker
({
draggable
:
true
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
d4754930
...
...
@@ -202,7 +202,7 @@ export default {
label
:
"流量计"
,
},
{
value
:
5
,
value
:
7
,
icon
:
"icon-ylb"
,
label
:
"压力表"
,
},
...
...
@@ -334,6 +334,9 @@ export default {
if
(
"3"
==
response
.
data
[
i
].
deviceType
){
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
FLOWMETER
,
response
.
data
[
i
])
}
if
(
"4"
==
response
.
data
[
i
].
deviceType
){
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
PRESSUREGAGE
,
response
.
data
[
i
])
}
}
}
this
.
loading
=
false
;
...
...
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