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
0ad1f947
Commit
0ad1f947
authored
Jul 29, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
30f5d6c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
190 deletions
+278
-190
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+51
-46
pipelineView.vue
gassafety-web/src/components/PopWindow/pipelineView.vue
+23
-8
pressureGage.vue
gassafety-web/src/components/PopWindow/pressureGage.vue
+192
-131
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+5
-2
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+7
-3
No files found.
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
0ad1f947
...
...
@@ -7,31 +7,41 @@
>
<el-row>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-col
:span=
"22"
>
<el-form-item
label=
"所属管道"
prop=
"pipeCode"
>
<el-select
v-model=
"form.pipeCode"
placeholder=
"请选择所属管道"
>
<el-option
v-for=
"item in pipeList"
:key=
"item.pipeCode"
:label=
"item.pipeName"
:value=
"item.pipeCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-row>
<el-col
:span=
"22"
>
<el-form-item
label=
"所属管道"
prop=
"pipeCode"
>
<el-select
v-model=
"form.pipeCode"
placeholder=
"请选择所属管道"
>
<el-option
v-for=
"item in pipeList"
:key=
"item.pipeCode"
:label=
"item.pipeName"
:value=
"item.pipeCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
</el-col>
</el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"所在地址"
prop=
"deviceAddr"
>
<el-input
v-model=
"form.deviceAddr"
placeholder=
"请输入所在地址"
/>
...
...
@@ -46,7 +56,7 @@
<el-col
:span=
"22"
>
<el-form-item
label=
"经纬度坐标"
prop=
""
>
<el-card
class=
"box-card"
>
<el-card
shadow=
"newver"
class=
"box-card"
>
<div
v-text=
"`[[$
{form.longitude},${form.latitude}]]`">
</div>
</el-card>
</el-form-item>
...
...
@@ -143,7 +153,7 @@ export default {
gaoMap
:
null
,
fileArr
:
[],
pipeList
:
[],
rules
:
{
pipeCode
:
[
{
required
:
true
,
message
:
"请选择所属管道"
,
trigger
:
"blur"
},
...
...
@@ -161,12 +171,8 @@ export default {
iotNo
:
[
{
required
:
true
,
message
:
"请输入物联网编号"
,
trigger
:
"blur"
},
],
linkman
:
[
{
required
:
true
,
message
:
"请输入联系人"
,
trigger
:
"blur"
},
],
phone
:
[
{
required
:
true
,
message
:
"请输入联系电话"
,
trigger
:
"blur"
},
],
linkman
:
[{
required
:
true
,
message
:
"请输入联系人"
,
trigger
:
"blur"
}],
phone
:
[{
required
:
true
,
message
:
"请输入联系电话"
,
trigger
:
"blur"
}],
iconUrl
:
[{
required
:
true
,
message
:
"请上传图片"
,
trigger
:
"change"
}],
installationTime
:
[
{
...
...
@@ -203,23 +209,22 @@ export default {
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
(
"新增失败"
);
}
});
}
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
();
...
...
gassafety-web/src/components/PopWindow/pipelineView.vue
View file @
0ad1f947
...
...
@@ -25,7 +25,6 @@
<el-col>
<el-form-item
v-show=
"false"
label=
"企业id"
prop=
"enterpriseId"
>
<el-input
disabled
v-model=
"editForm.enterpriseId"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -41,7 +40,7 @@
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"管道长度"
prop=
"pipeLength"
>
<el-input
type=
"number"
min=
0
v-model=
"editForm.pipeLength"
>
<el-input
type=
"number"
min=
"0"
v-model=
"editForm.pipeLength"
>
<i
slot=
"suffix"
style=
"color: #000; font-style: normal; margin-right: 10px"
...
...
@@ -229,10 +228,20 @@ export default {
console
.
log
(
"lineData"
,
this
.
lineData
,
this
.
lnglatsArr
,
this
.
pipeLength
);
if
(
this
.
lineData
?.
pipeId
)
{
this
.
editForm
=
{
...
this
.
lineData
}
;
}
else
{
// 如果是新建的里面天蝎过东西就存档
console
.
log
(
"内部lineDate"
,
this
.
target
.
getExtData
());
const
{
lineData
}
=
this
.
target
.
getExtData
();
console
.
log
(
lineData
)
if
(
lineData
)
{
this
.
editForm
=
{
...
lineData
}
;
}
}
this
.
editForm
.
coordinates
=
getString
(
this
.
lnglatsArr
);
// 如果有图片路径就赋显,如果没有就啥也没有
this
.
fileArr
=
this
.
lineData
.
pipeId
?
[{
url
:
this
.
editForm
.
iconUrl
}
]
:
[];
this
.
fileArr
=
this
.
editForm
?.
iconUrl
?
[{
url
:
this
.
editForm
.
iconUrl
}
]
:
[];
}
,
methods
:
{
mouseup
()
{
...
...
@@ -293,11 +302,17 @@ export default {
this
.
remove
();
}
,
handleClose
(
done
)
{
this
.
$confirm
(
"确认关闭?"
)
.
then
((
_
)
=>
{
done
();
}
)
.
catch
((
_
)
=>
{
}
);
let
options
=
this
.
target
.
getExtData
();
options
.
lineData
=
{
...
this
.
editForm
}
;
this
.
target
.
setExtData
(
options
);
// 把值带出去
done
();
// this.$confirm("确认关闭?")
// .then((_) =>
{
// done();
//
}
)
// .catch((_) =>
{
}
);
}
,
// 图片上传成功
fileFinshed
(
e
)
{
...
...
gassafety-web/src/components/PopWindow/pressureGage.vue
View file @
0ad1f947
This diff is collapsed.
Click to expand it.
gassafety-web/src/utils/gaodeMap.js
View file @
0ad1f947
...
...
@@ -152,7 +152,6 @@ class gaodeMap {
options
.
scrollWheel
=
true
;
map
.
setStatus
(
options
);
});
that
.
markerInfoWindow
=
infoWindow
;
let
marker
=
new
AMap
.
Marker
({
position
:
[
data
.
longitude
,
data
.
latitude
],
map
:
map
,
...
...
@@ -226,6 +225,8 @@ class gaodeMap {
map
.
setStatus
(
options
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
that
.
markerInfoWindow
=
infoWindow
;
}
}
...
...
@@ -522,8 +523,9 @@ class gaodeMap {
}
}
// 新建line增加编辑以及右键菜单
close
Line
InfoWindow
()
{
closeInfoWindow
()
{
this
.
showInfoWindow
&&
this
.
showInfoWindow
.
close
();
this
.
markerInfoWindow
&&
this
.
markerInfoWindow
.
close
();
}
// 新line与老line添加点击事件
newLineAddEvent
(
obj
)
{
...
...
@@ -563,6 +565,7 @@ class gaodeMap {
const
pipeLength
=
obj
.
getLength
();
// 传回来的数据 如果是新管道就是空
const
lineData
=
type
==
"newLine"
?
{}
:
obj
.
getExtData
().
lineData
;
// const lineData = obj.getExtData().lineData;
console
.
log
(
"lineData===================>传入组件的数据"
,
lineData
);
this
.
infoWindowPipelineView
({
target
:
obj
,
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
0ad1f947
...
...
@@ -235,8 +235,8 @@ export default {
this
.
gaoMap
.
lineType
=
0
;
this
.
gaoMap
.
mouseTool
.
close
();
}
// 关闭当前
线条
的infowindow
this
.
gaoMap
.
close
Line
InfoWindow
();
// 关闭当前的infowindow
this
.
gaoMap
.
closeInfoWindow
();
this
.
deviceType
=
!
this
.
deviceType
;
this
.
gaoMap
.
mapOperateType
=
"add"
;
...
...
@@ -294,6 +294,8 @@ export default {
// this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
}
// 关闭当前的infowindow
this
.
gaoMap
.
closeInfoWindow
();
this
.
createReset
();
},
deleteDevice
()
{
...
...
@@ -313,6 +315,8 @@ export default {
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
}
// 关闭当前的infowindow
this
.
gaoMap
.
closeInfoWindow
();
this
.
createReset
();
},
selectDeviceType
(
val
)
{
...
...
@@ -384,7 +388,7 @@ export default {
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
// 关闭当前线条的infowindow
this
.
gaoMap
.
close
Line
InfoWindow
()
this
.
gaoMap
.
closeInfoWindow
()
// 如果没有选择的时候点window 则高亮消失
if
(
this
.
targetNum
==
1
&&
this
.
iconClass
==
"icon-create"
)
{
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