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
49803e40
Commit
49803e40
authored
Aug 26, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图模式列表修改完成
parent
6a9cef23
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
35 deletions
+161
-35
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+35
-9
pressureGage.vue
gassafety-web/src/components/PopWindow/pressureGage.vue
+29
-5
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+35
-8
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+34
-6
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+28
-7
No files found.
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
49803e40
...
...
@@ -18,7 +18,7 @@
v-for=
"item in pipeList"
:key=
"item.pipeId"
:label=
"item.pipeName"
:value=
"item.pipeId"
:value=
"item.pipeId"
>
</el-option>
</el-select>
...
...
@@ -152,6 +152,7 @@ export default {
form
:
{
deviceType
:
"3"
,
},
type
:
DEVICE_TYPE
.
FLOWMETER
,
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
...
...
@@ -210,16 +211,35 @@ export default {
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
console
.
log
(
this
.
form
);
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
// console.log("this.form流量计",this.form)
// return;
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
(
"修改成功"
);
if
(
response
.
code
==
200
)
{
this
.
dialogVisible
=
false
;
const
index
=
this
.
gaoMap
.
markers
.
indexOf
(
this
.
obj
);
if
(
index
>=
0
)
{
this
.
gaoMap
.
markers
.
splice
(
index
,
1
);
this
.
gaoMap
.
changePolineListNum
=
index
;
}
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
// this.form.deviceType,
//这个是上图用的type,跟后台的type不一致
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
console
.
log
(
arr
);
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
}
);
this
.
msgSuccess
(
"修改成功"
);
}
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
((
response
)
=>
{
...
...
@@ -227,12 +247,18 @@ export default {
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
addMarker
(
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
});
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
//
this.msgSuccess("新增失败");
}
});
}
...
...
gassafety-web/src/components/PopWindow/pressureGage.vue
View file @
49803e40
...
...
@@ -152,6 +152,7 @@ export default {
form
:
{
deviceType
:
"4"
,
},
type
:
DEVICE_TYPE
.
PRESSUREGAGE
,
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
...
...
@@ -208,16 +209,33 @@ export default {
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
console
.
log
(
this
.
form
);
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
// console.log("this.form)",this.form)
if
(
valid
)
{
if
(
this
.
form
.
deviceId
!=
null
)
{
updateDeviceInfo
(
this
.
form
).
then
((
response
)
=>
{
if
(
response
.
code
==
200
)
{
this
.
dialogVisible
=
false
;
const
index
=
this
.
gaoMap
.
markers
.
indexOf
(
this
.
obj
);
if
(
index
>=
0
)
{
this
.
gaoMap
.
markers
.
splice
(
index
,
1
);
this
.
gaoMap
.
changePolineListNum
=
index
;
}
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
addMarker
(
// this.form.deviceType,
//这个是上图用的type,跟后台的type不一致
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
console
.
log
(
arr
);
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
}
);
this
.
msgSuccess
(
"修改成功"
);
}
});
...
...
@@ -227,12 +245,18 @@ export default {
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
addMarker
(
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
});
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
//
this.msgSuccess("新增失败");
}
});
}
...
...
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
49803e40
...
...
@@ -14,7 +14,7 @@
placeholder=
"请选择所属管道"
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in pipeList"
:key=
"item.pipeId"
:label=
"item.pipeName"
...
...
@@ -152,6 +152,7 @@ export default {
form
:
{
deviceType
:
"1"
,
},
type
:
DEVICE_TYPE
.
REGEULATORBOX
,
dialogVisible
:
false
,
fileList
:
[],
map
:
null
,
...
...
@@ -208,15 +209,35 @@ export default {
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
console
.
log
(
this
.
form
);
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
// console.log("this.form",this.form)
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
(
"修改成功"
);
if
(
response
.
code
==
200
)
{
this
.
dialogVisible
=
false
;
const
index
=
this
.
gaoMap
.
markers
.
indexOf
(
this
.
obj
);
if
(
index
>=
0
)
{
this
.
gaoMap
.
markers
.
splice
(
index
,
1
);
this
.
gaoMap
.
changePolineListNum
=
index
;
}
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
// this.form.deviceType,
//这个是上图用的type,跟后台的type不一致
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
console
.
log
(
arr
);
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
}
);
this
.
msgSuccess
(
"修改成功"
);
}
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
((
response
)
=>
{
...
...
@@ -224,12 +245,18 @@ export default {
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
addMarker
(
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
});
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
//
this.msgSuccess("新增失败");
}
});
}
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
49803e40
...
...
@@ -151,6 +151,7 @@ export default {
form
:
{
deviceType
:
"2"
,
},
type
:
DEVICE_TYPE
.
VALUEWELL
,
dialogVisible
:
false
,
fileList
:
[],
map
:
null
,
...
...
@@ -206,14 +207,35 @@ export default {
this
.
form
.
iconUrl
=
res
.
url
;
},
submitForm
()
{
console
.
log
(
this
.
form
);
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
(
"修改成功"
);
if
(
response
.
code
==
200
)
{
this
.
dialogVisible
=
false
;
const
index
=
this
.
gaoMap
.
markers
.
indexOf
(
this
.
obj
);
if
(
index
>=
0
)
{
this
.
gaoMap
.
markers
.
splice
(
index
,
1
);
this
.
gaoMap
.
changePolineListNum
=
index
;
}
this
.
map
.
remove
(
this
.
obj
);
this
.
gaoMap
.
addMarker
(
// this.form.deviceType,
//这个是上图用的type,跟后台的type不一致
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
console
.
log
(
arr
);
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
}
);
this
.
msgSuccess
(
"修改成功"
);
}
});
}
else
{
addDeviceInfo
(
this
.
form
).
then
((
response
)
=>
{
...
...
@@ -221,12 +243,18 @@ export default {
this
.
remove
();
this
.
map
.
remove
(
this
.
obj
);
this
.
form
.
deviceId
=
response
.
data
;
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
deviceType
,
this
.
form
);
this
.
gaoMap
.
addMarker
(
this
.
type
,
this
.
form
,
()
=>
{
const
arr
=
this
.
gaoMap
.
markers
.
map
((
item
)
=>
{
return
item
.
getExtData
();
});
this
.
gaoMap
.
view
.
deviceClassify
(
arr
);
this
.
gaoMap
.
view
.
pipeList
();
});
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
this
.
msgSuccess
(
"新增成功"
);
}
else
{
this
.
msgSuccess
(
"新增失败"
);
//
this.msgSuccess("新增失败");
}
});
}
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
49803e40
...
...
@@ -71,7 +71,6 @@ class gaodeMap {
this
.
newLineObj
=
null
;
this
.
lineFlag
=
false
;
this
.
createNewLine
();
console
.
log
(
"map点击事件新建"
);
})
.
catch
(()
=>
{});
...
...
@@ -171,6 +170,7 @@ class gaodeMap {
addMarker
(
markerType
,
data
,
func
)
{
let
that
=
this
;
that
.
markerType
=
markerType
;
console
.
log
(
markerType
);
let
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
offset
:
new
AMap
.
Pixel
(
24
,
-
38
),
...
...
@@ -245,6 +245,11 @@ class gaodeMap {
that
.
markers
.
splice
(
ind
,
1
);
console
.
log
(
that
.
markers
);
}
const
arr
=
that
.
markers
.
map
(
item
=>
{
return
item
.
getExtData
();
});
that
.
view
.
deviceClassify
(
arr
);
that
.
view
.
pipeList
();
}
});
})
...
...
@@ -286,7 +291,13 @@ class gaodeMap {
});
}
this
.
markers
.
push
(
marker
);
if
(
this
.
changePolineListNum
===
null
)
{
// this.polyLines.push(polyline);
this
.
markers
.
push
(
marker
);
}
else
{
this
.
markers
.
splice
(
this
.
changePolineListNum
,
0
,
marker
);
this
.
changePolineListNum
=
null
;
}
map
.
setZoom
(
"11"
);
//map.setFitView();
...
...
@@ -491,12 +502,12 @@ class gaodeMap {
lineData
:
item
}
});
// 如果是修改后包装,有记录的index 就在原位置插入,如果没有,就直接在最后插入
if
(
this
.
changePolineListNum
===
null
)
{
// 如果是修改后包装,有记录的index 就在原位置插入,如果没有,就直接在最后插入
if
(
this
.
changePolineListNum
===
null
)
{
this
.
polyLines
.
push
(
polyline
);
}
else
{
this
.
polyLines
.
splice
(
this
.
changePolineListNum
,
0
,
polyline
);
this
.
changePolineListNum
=
null
;
}
else
{
this
.
polyLines
.
splice
(
this
.
changePolineListNum
,
0
,
polyline
);
this
.
changePolineListNum
=
null
;
}
// 信息窗体
const
dom
=
createPop
(
lineInfoWindow
,
{
...
...
@@ -756,6 +767,16 @@ class gaodeMap {
}
}
map
.
remove
(
obj
);
// 列表变化
const
pipeArr
=
this
.
polyLines
.
map
(
item
=>
{
return
item
.
getExtData
().
lineData
;
})
const
markerArr
=
this
.
markers
.
map
(
item
=>
{
return
item
.
getExtData
();
});
this
.
view
.
pipeClassify
(
pipeArr
)
this
.
view
.
deviceClassify
(
markerArr
);
this
.
view
.
pipeList
();
}
vue
.
$message
({
type
:
"success"
,
...
...
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