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
b5fdea59
Commit
b5fdea59
authored
Aug 05, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_jzl'
parents
b50f73fe
0bb327f5
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
508 additions
and
155 deletions
+508
-155
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+40
-40
markerInfoWindow.vue
...fety-web/src/components/PopWindowGis/markerInfoWindow.vue
+63
-46
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+220
-0
index.vue
gassafety-web/src/components/TopNav/index.vue
+22
-2
ResizeHandler.js
gassafety-web/src/layout/mixin/ResizeHandler.js
+22
-16
permission.js
gassafety-web/src/permission.js
+40
-31
app.js
gassafety-web/src/store/modules/app.js
+1
-0
permission.js
gassafety-web/src/store/modules/permission.js
+5
-2
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+7
-2
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+75
-11
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+13
-5
No files found.
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
View file @
b5fdea59
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</div>
</div>
</div>
</div>
<!-- 设备信息 -->
<!--
报警
设备信息 -->
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<div
class=
"text-wrapper"
>
...
@@ -59,11 +59,7 @@
...
@@ -59,11 +59,7 @@
<
el
-
col
:
span
=
"13"
>
<
el
-
col
:
span
=
"13"
>
<
div
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
<
span
>
{{
obj
.
inspectionTime
?
obj
.
inspectionTime
:
"-"
}}
<
/span
>
obj
.
inspectionTime
?
obj
.
inspectionTime
:
"-"
}}
<
/span
>
<
/div
>
<
/div
>
<
/el-col
>
<
/el-col
>
...
@@ -71,23 +67,24 @@
...
@@ -71,23 +67,24 @@
<
span
>
管道所在地址:
<
/span
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
div
style
=
"padding: 0"
>
<
span
>
备注信息:
<
/span
>
<
span
>
备注信息:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"!obj.editorPage"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态
<
span
>
报警
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
/div
>
<
/div
>
<!--
报警状态
-->
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<!--
<
div
class
=
"warn-content"
>
<
div
>
报警状态:
<
span
>
报警
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
/div> --
>
<
div
class
=
"btn"
>
<
div
class
=
"btn"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<!--
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button> --
>
<
/div
>
<
/div
>
<
/template
>
<
/div
>
<
/div
>
<!--
报警状态
-->
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -135,15 +132,15 @@ export default {
...
@@ -135,15 +132,15 @@ export default {
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
.
wrapper
{
.
wrapper
{
width
:
406
px
;
width
:
406
px
;
// height: 488
px;
max
-
height
:
430
px
;
background
:
#
fff
;
background
:
#
fff
;
border
-
radius
:
4
px
;
border
-
radius
:
4
px
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
//
overflow: hidden;
overflow
:
hidden
;
.
top
{
.
top
{
width
:
100
%
;
width
:
100
%
;
height
:
51
px
;
height
:
51
px
;
background
-
color
:
#
053
b6a
;
background
-
color
:
#
053
B6A
;
.
text
{
.
text
{
font
-
weight
:
600
;
font
-
weight
:
600
;
font
-
size
:
16
px
;
font
-
size
:
16
px
;
...
@@ -162,9 +159,11 @@ export default {
...
@@ -162,9 +159,11 @@ export default {
}
}
.
content
{
.
content
{
position
:
relative
;
position
:
relative
;
max
-
height
:
4
00
px
;
max
-
height
:
3
00
px
;
overflow
:
hidden
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
overflow
-
y
:
auto
;
padding
-
bottom
:
2
px
;
border
-
bottom
:
1
px
solid
#
eeeeee
;
.
eq
-
content
{
.
eq
-
content
{
// min-height: 156px;
// min-height: 156px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
...
@@ -209,7 +208,7 @@ export default {
...
@@ -209,7 +208,7 @@ export default {
max
-
height
:
119
px
;
max
-
height
:
119
px
;
padding
-
left
:
22
px
;
padding
-
left
:
22
px
;
// padding-right: 22px;
// padding-right: 22px;
padding
-
bottom
:
10
px
;
//
padding-bottom: 10px;
// padding-top: 16px;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
// border-bottom: 1px solid #e2e2e2;
// border-bottom: 1px solid #e2e2e2;
...
@@ -225,12 +224,12 @@ export default {
...
@@ -225,12 +224,12 @@ export default {
}
}
}
}
}
}
.
warn
-
wrapper
{
.
warn
-
content
{
.
warn
-
content
{
height
:
82
px
;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
8
px
0
0
22
px
;
padding
:
10
px
0
2
px
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
color
:
#
FE5966
;
&
>
div
{
&
>
div
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
font
-
weight
:
400
;
...
@@ -238,7 +237,7 @@ export default {
...
@@ -238,7 +237,7 @@ export default {
}
}
}
}
.
btn
{
.
btn
{
padding
-
top
:
32
px
;
padding
:
16
px
0
;
text
-
align
:
center
;
text
-
align
:
center
;
.
elbtn
{
.
elbtn
{
background
-
color
:
#
053
b6a
;
background
-
color
:
#
053
b6a
;
...
@@ -247,6 +246,7 @@ export default {
...
@@ -247,6 +246,7 @@ export default {
height
:
33
px
;
height
:
33
px
;
}
}
}
}
}
}
}
.
wrapperEditorPage
{
.
wrapperEditorPage
{
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindow.vue
View file @
b5fdea59
...
@@ -2,19 +2,31 @@
...
@@ -2,19 +2,31 @@
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<span
class=
"dot-left"
></span>
<span
class=
"dot-left"
></span>
<div
class=
"top display-default"
>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"left text"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"right text"
>
<div
class=
"right text"
>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"map.clearInfoWindow()"
/>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"map.clearInfoWindow()"
/>
</div>
</div>
</div>
</div>
<!-- 设备信息 -->
<!-- 设备信息 -->
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<div
class=
"text-wrapper"
>
<div
class=
"eq-text"
>
设备类型:
<span>
{{
title
}}
</span></div>
<div
class=
"eq-text"
>
<div
class=
"eq-text"
>
设备型号:
<span>
{{
data
.
deviceModel
}}
</span></div>
设备类型:
<span>
{{
title
}}
</span>
<div
class=
"eq-text"
>
所属管道:
<span>
{{
data
.
pipeCode
}}
</span></div>
</div>
<div
class=
"eq-text"
>
物联网编号:
<span>
{{
data
.
iotNo
}}
</span></div>
<div
class=
"eq-text"
>
设备型号:
<span>
{{
data
.
deviceModel
}}
</span>
</div>
<div
class=
"eq-text"
>
所属管道:
<span>
{{
data
.
pipeCode
}}
</span>
</div>
<div
class=
"eq-text"
>
物联网编号:
<span>
{{
data
.
iotNo
}}
</span>
</div>
</div>
</div>
<div
class=
"pic"
>
<div
class=
"pic"
>
<img
v-bind:src=
"data.iconUrl"
alt=
""
/>
<img
v-bind:src=
"data.iconUrl"
alt=
""
/>
...
@@ -25,18 +37,16 @@
...
@@ -25,18 +37,16 @@
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<div>
<div>
<span>
安装日期:
</span>
<span>
安装日期:
</span>
<span>
{{
moment
(
data
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
</span>
<span>
{{
moment
(
data
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
</span>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<div>
<div>
<span>
最后巡检日期:
</span>
<span>
最后巡检日期:
</span>
<span>
{{
<span>
{{
data
.
inspectionTime
?
data
.
inspectionTime
:
"-"
}}
</span>
data
.
inspectionTime
?
data
.
inspectionTime
:
"-"
}}
</span>
</div>
</div>
</el-col>
</el-col>
...
@@ -49,37 +59,42 @@
...
@@ -49,37 +59,42 @@
<span>
{{
data
.
remarks
}}
</span>
<span>
{{
data
.
remarks
}}
</span>
</div>
</div>
</div>
</div>
</div>
<!-- 报警状态 -->
<!-- 报警状态 -->
<!--
<div
class=
"warn-content"
>
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div>
报警状态
<span>
报警
</span></div>
<!--
<div
class=
"warn-content"
>
<div>
报警状态:
<span>
报警
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
</div>
-->
</div>
-->
<div
class=
"btn"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<!--
<el-button
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
-->
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
"moment"
import
moment
from
"moment"
;
//line移入时的的infowindow
//line移入时的的infowindow
export
default
{
export
default
{
props
:
{
props
:
{
obj
:
{
typs
:
Object
},
obj
:
{
typs
:
Object
},
title
:
""
,
title
:
""
,
data
:
{},
data
:
{},
map
:
null
map
:
null
,
},
},
methods
:{
methods
:
{
moment
,
moment
,
}
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
.wrapper
{
width
:
406px
;
width
:
406px
;
// height: 488
px;
max-height
:
430
px
;
background
:
#fff
;
background
:
#fff
;
border-radius
:
4px
;
border-radius
:
4px
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
...
@@ -106,9 +121,11 @@ export default {
...
@@ -106,9 +121,11 @@ export default {
}
}
.content
{
.content
{
position
:
relative
;
position
:
relative
;
max-height
:
4
00px
;
max-height
:
3
00px
;
overflow
:
hidden
;
overflow
:
hidden
;
overflow-y
:
auto
;
overflow-y
:
auto
;
padding-bottom
:
2px
;
border-bottom
:
1px
solid
#eeeeee
;
.eq-content
{
.eq-content
{
// min-height: 156px;
// min-height: 156px;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -153,7 +170,7 @@ export default {
...
@@ -153,7 +170,7 @@ export default {
max-height
:
119px
;
max-height
:
119px
;
padding-left
:
22px
;
padding-left
:
22px
;
// padding-right: 22px;
// padding-right: 22px;
padding-bottom
:
10px
;
//
padding-bottom: 10px;
// padding-top: 16px;
// padding-top: 16px;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
// border-bottom: 1px solid #e2e2e2;
// border-bottom: 1px solid #e2e2e2;
...
@@ -169,12 +186,12 @@ export default {
...
@@ -169,12 +186,12 @@ export default {
}
}
}
}
}
}
.warn-wrapper
{
.warn-content
{
.warn-content
{
height
:
82px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
8px
0
0
22px
;
padding
:
10px
0
2px
22px
;
border-bottom
:
1px
solid
#e2e2e2
;
border-bottom
:
1px
solid
#e2e2e2
;
color
:
#fe5966
;
&
>
div
{
&
>
div
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -182,7 +199,7 @@ export default {
...
@@ -182,7 +199,7 @@ export default {
}
}
}
}
.btn
{
.btn
{
padding-top
:
32px
;
padding
:
16px
0
;
text-align
:
center
;
text-align
:
center
;
.elbtn
{
.elbtn
{
background-color
:
#053b6a
;
background-color
:
#053b6a
;
...
@@ -191,6 +208,7 @@ export default {
...
@@ -191,6 +208,7 @@ export default {
height
:
33px
;
height
:
33px
;
}
}
}
}
}
}
}
.wrapperEditorPage
{
.wrapperEditorPage
{
...
@@ -199,5 +217,4 @@ export default {
...
@@ -199,5 +217,4 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
</
style
>
</
style
>
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
0 → 100644
View file @
b5fdea59
<
template
>
<div
class=
"wrapper"
>
<span
class=
"dot-left"
></span>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"right text"
>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"map.clearInfoWindow()"
/>
</div>
</div>
<!-- 设备信息 -->
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<div
class=
"eq-text"
>
设备类型:
<span>
{{
title
}}
</span>
</div>
<div
class=
"eq-text"
>
设备型号:
<span>
{{
data
.
deviceModel
}}
</span>
</div>
<div
class=
"eq-text"
>
所属管道:
<span>
{{
data
.
pipeCode
}}
</span>
</div>
<div
class=
"eq-text"
>
物联网编号:
<span>
{{
data
.
iotNo
}}
</span>
</div>
</div>
<div
class=
"pic"
>
<img
v-bind:src=
"data.iconUrl"
alt=
""
/>
</div>
</div>
<!-- 维修人员 -->
<div
class=
"maintain-content"
>
<el-col
:span=
"11"
>
<div>
<span>
安装日期:
</span>
<span>
{{
moment
(
data
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
</span>
</div>
</el-col>
<el-col
:span=
"13"
>
<div>
<span>
最后巡检日期:
</span>
<span>
{{
data
.
inspectionTime
?
data
.
inspectionTime
:
"-"
}}
</span>
</div>
</el-col>
<div>
<span>
管道所在地址:
</span>
<span>
{{
data
.
pipeAddr
}}
</span>
</div>
<div>
<span>
备注信息:
</span>
<span>
{{
data
.
remarks
}}
</span>
</div>
</div>
</div>
<!-- 报警状态 -->
<div
class=
"warn-wrapper"
v-if=
"true"
>
<!--
<div
class=
"warn-content"
>
<div>
报警状态:
<span>
报警
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
</div>
-->
<div
class=
"btn"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
</div>
</div>
</div>
</
template
>
<
script
>
import
moment
from
"moment"
;
//line移入时的的infowindow
export
default
{
props
:
{
obj
:
{
typs
:
Object
},
title
:
""
,
data
:
{},
map
:
null
,
},
methods
:
{
moment
,
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
width
:
406px
;
max-height
:
430px
;
background
:
#fff
;
border-radius
:
4px
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
overflow
:
hidden
;
.top
{
width
:
100%
;
height
:
51px
;
background-color
:
#FF5A67
;
.text
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#ffffff
;
line-height
:
51px
;
}
.left
{
padding-left
:
22px
;
}
.right
{
padding-right
:
22px
;
img
{
cursor
:
pointer
;
}
}
}
.content
{
position
:
relative
;
max-height
:
300px
;
overflow
:
hidden
;
overflow-y
:
auto
;
padding-bottom
:
2px
;
border-bottom
:
1px
solid
#eeeeee
;
.eq-content
{
// min-height: 156px;
box-sizing
:
border-box
;
padding
:
13px
22px
0px
22px
;
// border-bottom: 1px solid #e2e2e2;
.text-wrapper
{
padding-top
:
1px
;
&
>
div
{
margin-bottom
:
6px
;
}
.eq-text
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#1d1d1d
;
opacity
:
1
;
&
>
span
{
vertical-align
:
top
;
display
:
inline-block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break
:
break-all
;
max-width
:
100px
;
}
}
}
.pic
{
width
:
180px
;
height
:
103px
;
// background-color: black;
img
{
width
:
100%
;
height
:
100%
;
// cursor: pointer;
}
}
}
}
.maintain-content
{
width
:
100%
;
max-height
:
119px
;
padding-left
:
22px
;
// padding-right: 22px;
// padding-bottom: 10px;
// padding-top: 16px;
box-sizing
:
border-box
;
// border-bottom: 1px solid #e2e2e2;
&
>
div
{
margin-bottom
:
8px
;
font-size
:
14px
;
font-weight
:
400
;
span
{
vertical-align
:
top
;
display
:
inline-block
;
word-break
:
break-all
;
max-width
:
280px
;
}
}
}
.warn-wrapper
{
.warn-content
{
box-sizing
:
border-box
;
padding
:
10px
0
2px
22px
;
border-bottom
:
1px
solid
#e2e2e2
;
color
:
#fe5966
;
&
>
div
{
font-size
:
14px
;
font-weight
:
400
;
margin-bottom
:
8px
;
}
}
.btn
{
padding
:
16px
0
;
text-align
:
center
;
.elbtn
{
background-color
:
#053b6a
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
width
:
95px
;
height
:
33px
;
}
}
}
}
.wrapperEditorPage
{
}
.display-default
{
display
:
flex
;
justify-content
:
space-between
;
}
</
style
>
gassafety-web/src/components/TopNav/index.vue
View file @
b5fdea59
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
<
script
>
<
script
>
import
{
constantRoutes
}
from
"@/router"
;
import
{
constantRoutes
}
from
"@/router"
;
import
"../../common/font/font.css"
;
import
"../../common/font/font.css"
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -47,6 +48,7 @@ export default {
...
@@ -47,6 +48,7 @@ export default {
isFrist
:
false
,
isFrist
:
false
,
// 当前激活菜单的 index
// 当前激活菜单的 index
currentIndex
:
undefined
,
currentIndex
:
undefined
,
myRouter
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -133,7 +135,9 @@ export default {
...
@@ -133,7 +135,9 @@ export default {
},
},
// 菜单选择事件
// 菜单选择事件
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
console
.
log
(
key
)
console
.
log
(
"key"
,
key
);
console
.
log
(
"keypath"
,
keyPath
);
let
path
;
this
.
currentIndex
=
key
;
this
.
currentIndex
=
key
;
if
(
this
.
ishttp
(
key
))
{
if
(
this
.
ishttp
(
key
))
{
// http(s):// 路径新窗口打开
// http(s):// 路径新窗口打开
...
@@ -143,7 +147,18 @@ export default {
...
@@ -143,7 +147,18 @@ export default {
this
.
$router
.
push
({
path
:
key
.
replace
(
"/redirect"
,
""
)
});
this
.
$router
.
push
({
path
:
key
.
replace
(
"/redirect"
,
""
)
});
}
else
{
}
else
{
// 显示左侧联动菜单
// 显示左侧联动菜单
this
.
activeRoutes
(
key
);
path
=
this
.
activeRoutes
(
key
);
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
this
.
$router
.
push
(
path
[
0
].
path
);
}
// if (key == "/enterprise") {
// // this.$store.commit("TOGGLE_DEVICE","mobile");
// this.$store.dispatch("app/toggleDevice", "mobile");
// } else {
// this.$store.dispatch("app/toggleDevice", "desktop");
// }
// TOGGLE_DEVICE
}
}
},
},
// 当前激活的路由
// 当前激活的路由
...
@@ -156,9 +171,14 @@ export default {
...
@@ -156,9 +171,14 @@ export default {
}
}
});
});
}
}
// console.log(this.myRouter)
// console.log(this.myRouter)
if
(
routes
.
length
>
0
)
{
if
(
routes
.
length
>
0
)
{
this
.
$store
.
commit
(
"SET_SIDEBAR_ROUTERS"
,
routes
);
this
.
$store
.
commit
(
"SET_SIDEBAR_ROUTERS"
,
routes
);
}
}
return
routes
;
return
routes
;
},
},
ishttp
(
url
)
{
ishttp
(
url
)
{
...
...
gassafety-web/src/layout/mixin/ResizeHandler.js
View file @
b5fdea59
import
store
from
'@/store'
import
store
from
"@/store"
;
const
{
body
}
=
document
const
{
body
}
=
document
;
const
WIDTH
=
992
// refer to Bootstrap's responsive design
const
WIDTH
=
992
;
// refer to Bootstrap's responsive design
export
default
{
export
default
{
watch
:
{
watch
:
{
$route
(
route
)
{
$route
(
route
)
{
if
(
this
.
device
===
'mobile'
&&
this
.
sidebar
.
opened
)
{
if
(
this
.
device
===
"mobile"
&&
this
.
sidebar
.
opened
)
{
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
false
})
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
false
});
}
}
}
}
},
},
beforeMount
()
{
beforeMount
()
{
window
.
addEventListener
(
'resize'
,
this
.
$_resizeHandler
)
window
.
addEventListener
(
"resize"
,
this
.
$_resizeHandler
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
window
.
removeEventListener
(
'resize'
,
this
.
$_resizeHandler
)
window
.
removeEventListener
(
"resize"
,
this
.
$_resizeHandler
);
},
},
mounted
()
{
mounted
()
{
const
isMobile
=
this
.
$_isMobile
()
const
isMobile
=
this
.
$_isMobile
()
;
if
(
isMobile
)
{
if
(
isMobile
)
{
store
.
dispatch
(
'app/toggleDevice'
,
'mobile'
)
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
true
})
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
}
}
},
},
methods
:
{
methods
:
{
// use $_ for mixins properties
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_isMobile
()
{
$_isMobile
()
{
const
rect
=
body
.
getBoundingClientRect
()
const
rect
=
body
.
getBoundingClientRect
()
;
return
rect
.
width
-
1
<
WIDTH
return
rect
.
width
-
1
<
WIDTH
;
},
},
$_resizeHandler
()
{
$_resizeHandler
()
{
if
(
!
document
.
hidden
)
{
if
(
!
document
.
hidden
)
{
const
isMobile
=
this
.
$_isMobile
()
const
isMobile
=
this
.
$_isMobile
();
store
.
dispatch
(
'app/toggleDevice'
,
isMobile
?
'mobile'
:
'desktop'
)
// console.log(this.$route.path)
// 当是gis地图的时候左边隐藏
if
(
this
.
$route
.
path
==
"/enterprise/mapView"
)
{
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
}
else
{
store
.
dispatch
(
"app/toggleDevice"
,
isMobile
?
"mobile"
:
"desktop"
);
}
if
(
isMobile
)
{
if
(
isMobile
)
{
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
true
})
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
}
}
}
}
}
}
}
}
}
}
;
gassafety-web/src/permission.js
View file @
b5fdea59
import
router
from
'./router'
import
router
from
"./router"
;
import
store
from
'./store'
import
store
from
"./store"
;
import
{
Message
}
from
'element-ui'
import
{
Message
}
from
"element-ui"
;
import
NProgress
from
'nprogress'
import
NProgress
from
"nprogress"
;
import
'nprogress/nprogress.css'
import
"nprogress/nprogress.css"
;
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
"@/utils/auth"
;
NProgress
.
configure
({
showSpinner
:
false
})
NProgress
.
configure
({
showSpinner
:
false
})
;
const
whiteList
=
[
'/login'
,
'/auth-redirect'
,
'/bind'
,
'/register'
]
const
whiteList
=
[
"/login"
,
"/auth-redirect"
,
"/bind"
,
"/register"
];
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
NProgress
.
start
()
NProgress
.
start
()
;
if
(
getToken
())
{
if
(
getToken
())
{
/* has token*/
/* has token*/
if
(
to
.
path
===
'/login'
)
{
if
(
to
.
path
===
"/login"
)
{
next
({
path
:
'/'
})
next
({
path
:
"/"
});
NProgress
.
done
()
NProgress
.
done
()
;
}
else
{
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
// 判断当前用户是否已拉取完user_info信息
// 判断当前用户是否已拉取完user_info信息
store
.
dispatch
(
'GetInfo'
).
then
(()
=>
{
store
store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
.
dispatch
(
"GetInfo"
)
.
then
(()
=>
{
store
.
dispatch
(
"GenerateRoutes"
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
router
.
addRoutes
(
accessRoutes
);
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
})
// hack方法 确保addRoutes已完成
next
({
...
to
,
replace
:
true
});
// hack方法 确保addRoutes已完成
})
});
}).
catch
(
err
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
next
({
path
:
'/'
})
})
})
})
.
catch
(
err
=>
{
store
.
dispatch
(
"LogOut"
).
then
(()
=>
{
Message
.
error
(
err
);
next
({
path
:
"/"
});
});
});
}
else
{
}
else
{
next
()
next
()
;
}
}
}
}
}
else
{
}
else
{
// 没有token
// 没有token
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
// 在免登录白名单,直接进入
// 在免登录白名单,直接进入
next
()
next
()
;
}
else
{
}
else
{
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
// 否则全部重定向到登录页
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
;
// 否则全部重定向到登录页
NProgress
.
done
()
NProgress
.
done
()
;
}
}
}
}
})
})
;
router
.
afterEach
(()
=>
{
router
.
afterEach
((
to
,
from
)
=>
{
NProgress
.
done
()
// console.log('全局后置钩子',to, from)
})
if
(
to
.
path
==
"/enterprise/mapView"
)
{
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
}
else
{
store
.
dispatch
(
"app/toggleDevice"
,
"desktop"
);
}
NProgress
.
done
();
});
gassafety-web/src/store/modules/app.js
View file @
b5fdea59
...
@@ -26,6 +26,7 @@ const mutations = {
...
@@ -26,6 +26,7 @@ const mutations = {
},
},
TOGGLE_DEVICE
:
(
state
,
device
)
=>
{
TOGGLE_DEVICE
:
(
state
,
device
)
=>
{
state
.
device
=
device
state
.
device
=
device
console
.
log
(
123
)
},
},
SET_SIZE
:
(
state
,
size
)
=>
{
SET_SIZE
:
(
state
,
size
)
=>
{
state
.
size
=
size
state
.
size
=
size
...
...
gassafety-web/src/store/modules/permission.js
View file @
b5fdea59
...
@@ -9,7 +9,8 @@ const permission = {
...
@@ -9,7 +9,8 @@ const permission = {
addRoutes
:
[],
addRoutes
:
[],
defaultRoutes
:
[],
defaultRoutes
:
[],
topbarRouters
:
[],
topbarRouters
:
[],
sidebarRouters
:
[]
sidebarRouters
:
[],
mySidebarRouters
:[],
},
},
mutations
:
{
mutations
:
{
SET_ROUTES
:
(
state
,
routes
)
=>
{
SET_ROUTES
:
(
state
,
routes
)
=>
{
...
@@ -28,8 +29,10 @@ const permission = {
...
@@ -28,8 +29,10 @@ const permission = {
state
.
topbarRouters
=
routes
.
concat
(
index
);
state
.
topbarRouters
=
routes
.
concat
(
index
);
},
},
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
state
.
sidebarRouters
=
routes
state
.
sidebarRouters
=
routes
;
state
.
mySidebarRouters
=
routes
;
},
},
},
},
actions
:
{
actions
:
{
// 生成路由
// 生成路由
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
b5fdea59
...
@@ -3,9 +3,12 @@ import regulatorBox from "../components/PopWindow/regulatorBox.vue";
...
@@ -3,9 +3,12 @@ import regulatorBox from "../components/PopWindow/regulatorBox.vue";
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
lineInfoWindow
from
"../components/PopWindowGis/lineInfoWindowWarn.vue"
;
import
lineInfoWindow
from
"../components/PopWindowGis/lineInfoWindow.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
markerInfoWindow
from
"../components/PopWindowGis/markerInfoWindow.vue"
;
import
markerInfoWindow
from
"../components/PopWindowGis/markerInfoWindow.vue"
;
import
markerInfoWindowWarn
from
"../components/PopWindowGis/markerInfoWindowWarn.vue"
;
import
lineInfoWindowWarn
from
"../components/PopWindowGis/lineInfoWindowWarn.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
import
workerManView
from
"../components/PopWindowGis/workerManView.vue"
;
import
workerManView
from
"../components/PopWindowGis/workerManView.vue"
;
...
@@ -341,7 +344,9 @@ class gaodeMap {
...
@@ -341,7 +344,9 @@ class gaodeMap {
* @returns {string}
* @returns {string}
*/
*/
getMarketContent
(
data
)
{
getMarketContent
(
data
)
{
// let markerInfoWindow = markerInfoWindowWarn;
switch
(
this
.
markerType
)
{
switch
(
this
.
markerType
)
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
const
dom
=
createPop
(
markerInfoWindow
,
{
const
dom
=
createPop
(
markerInfoWindow
,
{
title
:
"调压箱"
,
title
:
"调压箱"
,
...
...
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
b5fdea59
<
template
>
<
template
>
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<div
class=
"left"
>
<div
class=
"left"
>
<div
class=
"top"
>
设备报警最新记录
</div>
<div
class=
"top"
>
<span>
设备报警最新记录
</span>
<span
@
click=
"repeatClick"
class=
"repeat"
>
刷新
</span>
<span
@
click=
"moreClick"
class=
"more"
>
更多
</span>
</div>
<div
class=
"bottom right-bottom-data-left"
>
<div
class=
"bottom right-bottom-data-left"
>
<!--
<div
class=
"table-top"
>
<!--
<div
class=
"table-top"
>
...
@@ -13,16 +17,21 @@
...
@@ -13,16 +17,21 @@
</div>
-->
</div>
-->
<!--
<div
class=
"one"
>
设备编号:
<span>
1123123123
</span></div>
<!--
<div
class=
"one"
>
设备编号:
<span>
1123123123
</span></div>
<div
class=
"two"
>
报警时间:
<span>
34523452345
</span></div>
-->
<div
class=
"two"
>
报警时间:
<span>
34523452345
</span></div>
-->
<el-table
size=
"mini"
:data=
"tableData"
style=
"width: 100%"
height=
"170"
>
<el-table
<el-table-column
prop=
"date"
label=
"编号"
width=
"150"
>
size=
"mini"
:data=
"tableData"
style=
"width: 100%"
height=
"170"
>
<el-table-column
prop=
"deviceCode"
label=
"编号"
width=
"100"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
name"
label=
"名称"
width=
"120
"
>
<el-table-column
prop=
"
deviceName"
label=
"名称"
width=
"
"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
province"
label=
"
类型"
width=
"80"
>
<el-table-column
prop=
"
alarmType"
label=
"报警
类型"
width=
"80"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"c
ity"
label=
"时间"
width=
"12
0"
>
<el-table-column
prop=
"c
reateTime"
label=
"报警开始时间"
width=
"17
0"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"a
ddress"
label=
"内容"
width=
"
"
>
<el-table-column
prop=
"a
larmValue"
label=
"报警内容"
width=
"100
"
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
...
@@ -54,6 +63,8 @@
...
@@ -54,6 +63,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
listDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
export
default
{
export
default
{
props
:
{
props
:
{
list
:
{
list
:
{
...
@@ -78,7 +89,7 @@ export default {
...
@@ -78,7 +89,7 @@ export default {
},
},
tableData
:
[
tableData
:
[
{
{
d
at
e
:
"2016-05-03"
,
d
eviceCod
e
:
"2016-05-03"
,
name
:
"王小虎"
,
name
:
"王小虎"
,
province
:
"上海"
,
province
:
"上海"
,
city
:
"普陀区"
,
city
:
"普陀区"
,
...
@@ -131,11 +142,45 @@ export default {
...
@@ -131,11 +142,45 @@ export default {
},
},
created
()
{
created
()
{
console
.
log
(
"list"
,
this
.
list
);
console
.
log
(
"list"
,
this
.
list
);
this
.
getList
();
},
},
methods
:
{
methods
:
{
iconClass
(
item
)
{
iconClass
(
item
)
{
return
this
.
iconList
[
item
.
type
];
return
this
.
iconList
[
item
.
type
];
},
},
moreClick
()
{
this
.
$router
.
push
(
"/dataMonitoring/deviceAlarm"
);
// route.push(`dataMonitoring/deviceAlarm`)
},
repeatClick
(){
this
.
getList
();
},
getList
()
{
this
.
loading
=
true
;
listDeviceAlarm
({
pageNum
:
1
,
pageSize
:
10
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
const
arr
=
res
.
rows
.
map
((
item
)
=>
{
const
{
deviceCode
,
deviceName
,
alarmType
,
createTime
,
alarmValue
,
}
=
item
;
return
{
deviceCode
,
deviceName
,
alarmType
,
createTime
,
alarmValue
,
};
});
console
.
log
(
arr
);
this
.
tableData
=
arr
}
});
},
},
},
};
};
</
script
>
</
script
>
...
@@ -147,14 +192,14 @@ export default {
...
@@ -147,14 +192,14 @@ export default {
position
:
fixed
;
position
:
fixed
;
right
:
10px
;
right
:
10px
;
bottom
:
10px
;
bottom
:
10px
;
overflow
:hidden
;
overflow
:
hidden
;
// background-color: #fff;
// background-color: #fff;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
&
>
div
{
&
>
div
{
}
}
.left
{
.left
{
width
:
778
px
;
width
:
680
px
;
margin-right
:
12px
;
margin-right
:
12px
;
box-shadow
:
2px
2px
5px
rgba
(
0
,
0
,
0
,
0
.16
);
box-shadow
:
2px
2px
5px
rgba
(
0
,
0
,
0
,
0
.16
);
// background-color: #fff;
// background-color: #fff;
...
@@ -167,6 +212,25 @@ export default {
...
@@ -167,6 +212,25 @@ export default {
color
:
#fff
;
color
:
#fff
;
line-height
:
32px
;
line-height
:
32px
;
padding-left
:
12px
;
padding-left
:
12px
;
// position: relative;
span
{
display
:
inline-block
;
}
.repeat
{
margin-left
:
20px
;
cursor
:
pointer
;
&
:hover
{
color
:
#2788ea
;
}
}
.more
{
float
:
right
;
margin-right
:
20px
;
cursor
:
pointer
;
&
:hover
{
color
:
#2788ea
;
}
}
}
}
.bottom
{
.bottom
{
.table-top
{
.table-top
{
...
@@ -186,7 +250,7 @@ export default {
...
@@ -186,7 +250,7 @@ export default {
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
// justify-content: space-between;
// justify-content: space-between;
align-content
:
flex-start
;
align-content
:
flex-start
;
margin-top
:
7px
;
margin-top
:
7px
;
&
>
.right-content
{
&
>
.right-content
{
background-color
:
#fff
;
background-color
:
#fff
;
width
:
238px
;
width
:
238px
;
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
b5fdea59
...
@@ -94,7 +94,12 @@
...
@@ -94,7 +94,12 @@
</div>
</div>
</div>
</div>
<RightBototmData
v-show=
"bottomDataShow"
:class=
"{classShow:!bottomDataShow}"
ref=
"RightBototmData"
:list=
"rightBototmData"
/>
<RightBototmData
v-show=
"bottomDataShow"
:class=
"{ classShow: !bottomDataShow }"
ref=
"RightBototmData"
:list=
"rightBototmData"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -168,9 +173,13 @@ export default {
...
@@ -168,9 +173,13 @@ export default {
keyWord
:
""
,
keyWord
:
""
,
// 右下角的数据data
// 右下角的数据data
rightBototmData
:
[],
rightBototmData
:
[],
bottomDataShow
:
true
,
bottomDataShow
:
true
,
};
};
},
},
created
()
{
// 让左边的框隐藏
this
.
$store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
},
mounted
()
{
mounted
()
{
this
.
initMap
();
this
.
initMap
();
},
},
...
@@ -185,7 +194,6 @@ export default {
...
@@ -185,7 +194,6 @@ export default {
this
.
getPipeList
();
this
.
getPipeList
();
// 右下角数据
// 右下角数据
this
.
rightBottomData
();
this
.
rightBottomData
();
},
},
// 右下角数据
// 右下角数据
async
rightBottomData
()
{
async
rightBottomData
()
{
...
@@ -447,7 +455,7 @@ export default {
...
@@ -447,7 +455,7 @@ export default {
// 新建下拉列表关闭 window点击事件
// 新建下拉列表关闭 window点击事件
barClose
()
{
barClose
()
{
// 一点windowbottomData显示
// 一点windowbottomData显示
this
.
bottomDataShow
=
true
;
this
.
bottomDataShow
=
true
;
// return;
// return;
console
.
log
(
"window"
);
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
this
.
deviceType
=
false
;
...
@@ -730,7 +738,7 @@ input[type="radio"] {
...
@@ -730,7 +738,7 @@ input[type="radio"] {
color
:
white
;
color
:
white
;
background-color
:
#053b6a
;
background-color
:
#053b6a
;
}
}
.classShow
{
.classShow
{
opacity
:
0
;
opacity
:
0
;
}
}
</
style
>
</
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