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
3547059e
Commit
3547059e
authored
Jul 19, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/gassafety
parents
210f98a3
91ba7080
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
291 additions
and
39 deletions
+291
-39
dutyPerson.vue
gassafety-web/src/components/PopWindow/dutyPerson.vue
+60
-0
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+7
-23
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+79
-0
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+79
-0
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+62
-11
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+4
-5
No files found.
gassafety-web/src/components/PopWindow/dutyPerson.vue
0 → 100644
View file @
3547059e
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"80%"
:before-close=
"handleClose"
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini"
>
<el-form-item
label=
"所属燃气公司"
prop=
"a"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"d"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"e"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"备注信息"
prop=
"l"
>
<el-input
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
}
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
},
hide
()
{
this
.
remove
()
},
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
</
script
>
gassafety-web/src/components/PopWindow/
regulatorBoxOrValveWell
.vue
→
gassafety-web/src/components/PopWindow/
flowMeter
.vue
View file @
3547059e
<
template
>
<
template
>
<el-dialog
<el-dialog
title=
"新增
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"80%"
width=
"80%"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
<el-form-item
label=
"地址"
prop=
"c"
>
<el-form-item
label=
"地址"
prop=
"c"
>
<el-input></el-input>
<el-input></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属管道"
prop=
"c"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"d"
>
<el-form-item
label=
"联系人"
prop=
"d"
>
<el-input></el-input>
<el-input></el-input>
</el-form-item>
</el-form-item>
...
@@ -48,9 +51,7 @@
...
@@ -48,9 +51,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
title
:
{
type
:
String
},
title
:
{
type
:
String
}
//message: { type: String },
//duration: { type: Number, default: 2000 }
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -61,20 +62,16 @@
...
@@ -61,20 +62,16 @@
},
},
methods
:
{
methods
:
{
show
()
{
show
()
{
//this.isShow = true;
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
/*setTimeout(() => {
this.hide()
}, this.duration)*/
},
},
hide
()
{
hide
()
{
this
.
isShow
=
false
this
.
remove
()
this
.
remove
()
},
},
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
.
then
(
_
=>
{
done
();
this
.
remove
();
//done();
})
})
.
catch
(
_
=>
{});
.
catch
(
_
=>
{});
}
}
...
@@ -82,17 +79,4 @@
...
@@ -82,17 +79,4 @@
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
.notice
{
background
:
white
;
position
:
fixed
;
top
:
102px
;
right
:
0
;
left
:
0
;
margin
:
auto
;
width
:
80%
;
height
:
80%
;
border
:
solid
1px
;
}
</
style
>
gassafety-web/src/components/PopWindow/regulatorBox.vue
0 → 100644
View file @
3547059e
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"80%"
:before-close=
"handleClose"
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini"
>
<el-form-item
label=
"所属燃气公司"
prop=
"a"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"b"
>
<el-input
></el-input>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"c"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"d"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"e"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"型号"
prop=
"f"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"g"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
style=
"width: 100%;"
></el-date-picker>
</el-col>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"k"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
style=
"width: 100%;"
></el-date-picker>
</el-col>
</el-form-item>
<el-form-item
label=
"备注信息"
prop=
"l"
>
<el-input
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
}
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
},
hide
()
{
this
.
remove
()
},
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
</
script
>
gassafety-web/src/components/PopWindow/valveWell.vue
0 → 100644
View file @
3547059e
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"80%"
:before-close=
"handleClose"
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"120px"
size=
"mini"
>
<el-form-item
label=
"所属燃气公司"
prop=
"a"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"b"
>
<el-input
></el-input>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"c"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"d"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"e"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"型号"
prop=
"f"
>
<el-input></el-input>
</el-form-item>
<el-form-item
label=
"安装日期"
prop=
"g"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
style=
"width: 100%;"
></el-date-picker>
</el-col>
</el-form-item>
<el-form-item
label=
"最后巡检日期"
prop=
"k"
>
<el-col
:span=
"11"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
style=
"width: 100%;"
></el-date-picker>
</el-col>
</el-form-item>
<el-form-item
label=
"备注信息"
prop=
"l"
>
<el-input
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
}
},
data
()
{
return
{
// isShow: false,
editForm
:
{},
dialogVisible
:
false
}
},
methods
:
{
show
()
{
this
.
dialogVisible
=
true
;
},
hide
()
{
this
.
remove
()
},
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
this
.
remove
();
//done();
})
.
catch
(
_
=>
{});
}
}
}
</
script
>
gassafety-web/src/utils/gaodeMap.js
View file @
3547059e
import
createPop
from
"./createPop"
;
import
createPop
from
"./createPop"
;
import
regulatorBoxOrValveWell
from
"../components/PopWindow/regulatorBoxOrValveWell.vue"
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
import
valveWell
from
"../components/PopWindow/valveWell.vue"
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
import
dutyPerson
from
"../components/PopWindow/dutyPerson.vue"
let
defaultCenter
=
"石家庄"
;
let
defaultCenter
=
"石家庄"
;
export
let
map
;
export
let
map
;
class
gaodeMap
{
const
PIPEPLINE
=
"1"
;
const
REGEULATORBOX
=
"2"
;
const
VALUEWELL
=
"3"
;
const
FLOWMETER
=
"4"
;
const
DUTYPERSON
=
"5"
;
class
gaodeMap
{
//构造函数中设置中央点默认值
//构造函数中设置中央点默认值
constructor
(
center
)
{
constructor
(
center
)
{
this
.
center
=
center
?
center
:
defaultCenter
;
this
.
center
=
center
?
center
:
defaultCenter
;
...
@@ -173,25 +181,68 @@ class gaodeMap {
...
@@ -173,25 +181,68 @@ class gaodeMap {
this
.
overlays
=
[];
this
.
overlays
=
[];
let
that
=
this
;
let
that
=
this
;
this
.
mouseTool
.
on
(
'draw'
,
function
(
e
){
this
.
mouseTool
.
on
(
'draw'
,
function
(
e
){
const
device
=
that
.
createInfowindow
();
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
e
.
obj
.
on
(
"click"
,
function
(
aa
)
{
console
.
log
(
aa
.
target
.
_position
)
console
.
log
(
aa
.
target
.
_position
)
that
.
openInfowind
ow
();
device
.
sh
ow
();
})
})
that
.
overlays
.
push
(
e
.
obj
);
that
.
overlays
.
push
(
e
.
obj
);
that
.
mouseTool
.
close
();
that
.
mouseTool
.
close
();
});
});
}
}
openInfowindow
(){
/**
const
notice
=
createPop
(
regulatorBoxOrValveWell
,
{
* 创建弹框事件
title
:
'调压箱'
*/
})
createInfowindow
(){
notice
.
show
()
switch
(
this
.
deviceType
){
case
PIPEPLINE
:{
break
;
}
case
REGEULATORBOX
:{
return
createPop
(
regulatorBox
,
{
title
:
'调压箱'
});
}
case
VALUEWELL
:{
return
createPop
(
valveWell
,
{
title
:
'阀门井'
});
}
case
FLOWMETER
:{
return
createPop
(
flowMeter
,
{
title
:
'流量计'
});
}
case
DUTYPERSON
:{
return
createPop
(
dutyPerson
,
{
title
:
'值班人员'
});
}
}
}
}
draw
(
type
){
/**
* 鼠标画图事件
* @param deviceType 设备类型
*/
draw
(
deviceType
){
let
that
=
this
;
let
that
=
this
;
switch
(
type
){
that
.
deviceType
=
deviceType
;
if
(
REGEULATORBOX
==
deviceType
||
VALUEWELL
==
deviceType
||
FLOWMETER
==
deviceType
||
DUTYPERSON
==
deviceType
){
that
.
mouseTool
.
marker
({
draggable
:
true
});
}
if
(
PIPEPLINE
==
deviceType
){
that
.
mouseTool
.
polyline
({
strokeWeight
:
9
,
strokeColor
:
'#80d8ff'
//同Polyline的Option设置
});
}
/*switch(type){
case 'marker':{
case 'marker':{
that.mouseTool.marker({
that.mouseTool.marker({
draggable: true
draggable: true
...
@@ -206,7 +257,7 @@ class gaodeMap {
...
@@ -206,7 +257,7 @@ class gaodeMap {
});
});
break;
break;
}
}
}
}
*/
}
}
/**
/**
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
3547059e
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
<el-option
label=
"调压箱"
value=
"2"
></el-option>
<el-option
label=
"调压箱"
value=
"2"
></el-option>
<el-option
label=
"阀门井"
value=
"3"
></el-option>
<el-option
label=
"阀门井"
value=
"3"
></el-option>
<el-option
label=
"流量计"
value=
"4"
></el-option>
<el-option
label=
"流量计"
value=
"4"
></el-option>
<el-option
label=
"物联网燃气表"
value=
"5"
></el-option>
<el-option
label=
"值班人员"
value=
"5"
></el-option>
<el-option
label=
"值班人员"
value=
"6"
></el-option>
</el-select>
</el-select>
</div>
</div>
...
@@ -76,16 +75,16 @@
...
@@ -76,16 +75,16 @@
this
.
operationType
=
"add"
;
this
.
operationType
=
"add"
;
},
},
editDevice
(){
editDevice
(){
this
.
deviceType
=
tru
e
;
this
.
deviceType
=
fals
e
;
this
.
operationType
=
"edit"
;
this
.
operationType
=
"edit"
;
},
},
deleteDevice
(){
deleteDevice
(){
this
.
deviceType
=
tru
e
;
this
.
deviceType
=
fals
e
;
this
.
operationType
=
"delete"
;
this
.
operationType
=
"delete"
;
},
},
selectDeviceType
(
val
){
selectDeviceType
(
val
){
if
(
"add"
==
this
.
operationType
){
if
(
"add"
==
this
.
operationType
){
this
.
gaoMap
.
draw
(
"marker"
)
this
.
gaoMap
.
draw
(
val
)
}
}
this
.
deviceType
=
false
;
this
.
deviceType
=
false
;
this
.
value
=
""
;
this
.
value
=
""
;
...
...
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