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
7a059a08
Commit
7a059a08
authored
Aug 17, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4ca0eff7
76fe364a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
44 deletions
+181
-44
index.vue
gassafety-web/src/components/TopNav/index.vue
+22
-5
index.js
gassafety-web/src/router/index.js
+19
-5
permission.js
gassafety-web/src/store/modules/permission.js
+2
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+30
-18
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+10
-15
index.vue
gassafety-web/src/views/statistics/ind/index.vue
+98
-0
No files found.
gassafety-web/src/components/TopNav/index.vue
View file @
7a059a08
...
...
@@ -146,13 +146,13 @@ export default {
}
else
{
// 显示左侧联动菜单
path
=
this
.
activeRoutes
(
key
);
console
.
log
(
path
)
console
.
log
(
this
.
$route
.
path
)
console
.
log
(
path
)
;
console
.
log
(
this
.
$route
.
path
)
;
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
if
(
path
[
0
].
path
)
{
this
.
$router
.
push
(
path
[
0
].
path
);
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
this
.
$router
.
push
(
"/index"
);
}
}
...
...
@@ -207,6 +207,22 @@ export default {
font-weight
:
600
;
text-shadow
:
0px
2px
3px
rgba
(
0
,
0
,
0
,
0
.2
);
padding
:
0
5px
;
border-bottom
:
none
;
position
:
relative
;
&
:after
{
content
:
""
;
position
:
absolute
;
width
:
2px
;
height
:
38px
;
background
:
radial-gradient
(
circle
,
#ffffff
0%
,
rgba
(
255
,
255
,
255
,
0
)
100%
);
right
:
-20px
;
top
:
21px
;
opacity
:
1
;
}
}
.el-menu--horizontal
>
.el-menu-item.is-active
{
...
...
@@ -219,6 +235,7 @@ export default {
.el-menu--horizontal
>
.el-submenu
.el-submenu__title
{
height
:
50px
!
important
;
line-height
:
50px
!
important
;
margin-left
:
15px
;
}
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:hover
,
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:focus
{
...
...
gassafety-web/src/router/index.js
View file @
7a059a08
...
...
@@ -53,16 +53,30 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'@/views/error/401'
],
resolve
),
hidden
:
true
},
// {
// path: '',
// component: Layout,
// redirect: 'index',
// children: [
// {
// path: 'index',
// component: (resolve) => require(['@/views/index_v1'], resolve),
// name: '首页',
// meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
// }
// ]
// },
// 首页改成地图
{
path
:
''
,
component
:
Layout
,
redirect
:
'
index
'
,
redirect
:
'
/enterprise/mapView
'
,
children
:
[
{
path
:
'
index
'
,
component
:
(
resolve
)
=>
require
([
'@/views/
index_v1
'
],
resolve
),
name
:
'首页'
,
meta
:
{
title
:
'首页'
,
icon
:
'dashboard'
,
noCache
:
true
,
affix
:
true
}
path
:
'
/enterprise/mapView
'
,
component
:
(
resolve
)
=>
require
([
'@/views/
enterprise/mapView
'
],
resolve
),
//
name: '首页',
//
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
}
]
},
...
...
gassafety-web/src/store/modules/permission.js
View file @
7a059a08
...
...
@@ -26,7 +26,8 @@ const permission = {
path
:
'index'
,
meta
:
{
title
:
'统计报表'
,
icon
:
'dashboard'
}
}]
state
.
topbarRouters
=
routes
.
concat
(
index
);
// state.topbarRouters = routes.concat(index);
state
.
topbarRouters
=
routes
;
},
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
state
.
sidebarRouters
=
routes
;
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
7a059a08
...
...
@@ -51,6 +51,8 @@ class gaodeMap {
view
=
null
;
handleInfoWindowOpenFunc
=
null
;
onceFlag
=
false
;
//构造函数中设置中央点默认值
constructor
(
center
)
{
this
.
markers
=
[];
...
...
@@ -107,6 +109,16 @@ class gaodeMap {
this
.
handleInfoWindowOpenFunc
();
this
.
handleInfoWindowOpenFunc
=
null
;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
if
(
!
this
.
onceFlag
)
{
this
.
onceFlag
=
true
;
this
.
view
.
backFlag
=
false
;
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
}
});
this
.
districtBoundaries
();
}
...
...
@@ -237,9 +249,9 @@ class gaodeMap {
// // infoWindow.close();
// that.workerManInfoWindow = infoWindow;
// });
marker
.
markerType
=
markerType
;
marker
.
markerType
=
markerType
;
marker
.
data
=
data
;
marker
.
infoWindow
=
infoWindow
;
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mousedown"
,
e
=>
{
// console.log(data);
...
...
@@ -346,17 +358,17 @@ class gaodeMap {
return
marker
;
}
wokerManOpen
=
(
e
)
=>
{
wokerManOpen
=
e
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
())
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
());
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
}
}
;
// 鼠标移入设备时候实行的函数
infoOpen
=
e
=>
{
...
...
@@ -724,7 +736,7 @@ class gaodeMap {
let
path
=
coordinates
?
eval
(
coordinates
)
:
[];
let
polyline
=
new
AMap
.
Polyline
({
path
,
strokeColor
:
"#
F7FE38
"
,
strokeColor
:
"#
2EE7E7
"
,
strokeWeight
:
4
,
strokeOpacity
:
0.9
,
zIndex
:
50
,
...
...
@@ -748,7 +760,7 @@ class gaodeMap {
polyline
.
on
(
"mouseout"
,
e
=>
{
// console.log("polyline.getExtData().lineData.alarmState",polyline.getExtData().lineData.alarmState)
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#
F7FE38
"
});
polyline
.
setOptions
({
strokeColor
:
"#
2EE7E7
"
});
// infoWindow.close();
});
// 计算info的位置
...
...
@@ -1107,7 +1119,7 @@ class gaodeMap {
opstions
.
isState
=
0
;
item
.
setExtData
(
opstions
);
let
attr
=
item
.
getOptions
();
attr
.
strokeColor
=
"#
F7FE38
"
;
attr
.
strokeColor
=
"#
2EE7E7
"
;
item
.
setOptions
(
attr
);
});
}
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
7a059a08
...
...
@@ -369,7 +369,7 @@ export default {
// 右下角数据 跟值班人员
this
.
rightBottomData
();
this
.
backFlag
=
false
;
//
this.backFlag = false;
},
// 获取地图上的资源
...
...
@@ -492,7 +492,7 @@ export default {
options
.
lineData
.
alarmId
=
alarmId
;
options
.
lineData
.
orderId
=
orderId
;
if
(
endTime
)
{
polyline
.
setOptions
({
strokeColor
:
"#
F7FE38
"
});
polyline
.
setOptions
({
strokeColor
:
"#
2EE7E7
"
});
options
.
lineData
.
alarmState
=
0
;
// 报警类型
options
.
lineData
.
alarmType
=
null
;
...
...
@@ -514,6 +514,7 @@ export default {
});
}
console
.
log
(
"deviceArr"
,
deviceArr
);
// 其他设备
if
(
deviceArr
.
length
>
0
)
{
deviceArr
.
forEach
((
item
)
=>
{
...
...
@@ -591,8 +592,7 @@ export default {
// "ws://192.168.2.23:8903/gassafety/websocketServer"
// );
this
.
ws
.
onopen
=
(
evt
)
=>
{
console
.
log
(
"WebSockets=======gogogog"
);
// this.ws.send("WebSockets!=========================");
console
.
log
(
"WebSockets开启"
);
};
this
.
ws
.
onmessage
=
(
evt
)
=>
{
console
.
log
(
"推送"
,
evt
);
...
...
@@ -604,9 +604,6 @@ export default {
this
.
ws
.
onclose
=
()
=>
{
console
.
log
(
"ws协议关闭"
);
};
// this.ws.onclose = function (evt) {
// console.log("关闭");
// };
},
// 右下角数据
...
...
@@ -914,7 +911,7 @@ export default {
no
:
index
,
userId
:
item
.
userId
,
userName
:
item
.
userName
,
userPhone
:
item
.
phone
,
userPhone
:
item
.
phone
number
,
};
});
console
.
log
(
"值班人员"
,
workManArr
);
...
...
@@ -937,11 +934,10 @@ export default {
);
});
item
.
maxPage
=
Math
.
ceil
(
this
.
allList
[
index
].
length
/
num
);
}
else
{
}
else
{
// 如果为空,就直接把item.list写成[];
item
.
list
=
[];
item
.
list
=
[];
}
});
},
pageBack
(
item
)
{
...
...
@@ -1099,8 +1095,9 @@ export default {
// 清空左边列表
// this.changeBtnDataClear();
// this.gaoMap.placeSearch.search(this.keyWord);
await
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
})
;
this
.
gaoMap
.
markers
=
[]
;
this
.
gaoMap
.
polyLines
=
[];
await
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
});
await
this
.
getPipeList
({
pipeName
:
this
.
keyWord
});
// 值班人员
await
this
.
getInspectorLocations
({
userName
:
this
.
keyWord
});
...
...
@@ -1108,8 +1105,6 @@ export default {
// 设备报警
this
.
getSelectAlarmDevice
();
this
.
pipeList
();
console
.
log
(
this
.
changeBtnData
);
console
.
log
(
this
.
allList
)
}
},
// 清空左边列表
...
...
@@ -1190,6 +1185,7 @@ export default {
window
.
removeEventListener
(
"mousedown"
,
this
.
barClose
);
// 关闭scoket
if
(
this
.
ws
)
{
console
.
log
(
"socket关闭了"
);
this
.
ws
.
close
();
this
.
ws
=
null
;
}
...
...
@@ -1205,7 +1201,6 @@ export default {
bottom
:
0
;
width
:
100%
;
}
.btn-wrapper
{
position
:
fixed
;
right
:
32px
;
...
...
gassafety-web/src/views/statistics/ind/index.vue
0 → 100644
View file @
7a059a08
<
template
>
<div
class=
"dashboard-editor-container"
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<el-row
style=
"background:#fff;padding:16px 16px 0;margin-bottom:32px;"
>
<line-chart
:chart-data=
"lineChartData"
/>
</el-row>
<el-row
:gutter=
"32"
>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<raddar-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<pie-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<bar-chart
/>
</div>
</el-col>
</el-row>
</div>
</
template
>
<
script
>
import
PanelGroup
from
'../../dashboard/PanelGroup'
import
LineChart
from
'../../dashboard/LineChart'
import
RaddarChart
from
'../../dashboard/RaddarChart'
import
PieChart
from
'../../dashboard/PieChart'
import
BarChart
from
'../../dashboard/BarChart'
//报表
const
lineChartData
=
{
newVisitis
:
{
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
145
]
},
messages
:
{
expectedData
:
[
200
,
192
,
120
,
144
,
160
,
130
,
140
],
actualData
:
[
180
,
160
,
151
,
106
,
145
,
150
,
130
]
},
purchases
:
{
expectedData
:
[
80
,
100
,
121
,
104
,
105
,
90
,
100
],
actualData
:
[
120
,
90
,
100
,
138
,
142
,
130
,
130
]
},
shoppings
:
{
expectedData
:
[
130
,
140
,
141
,
142
,
145
,
150
,
160
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
130
]
}
}
export
default
{
name
:
'Index'
,
components
:
{
PanelGroup
,
LineChart
,
RaddarChart
,
PieChart
,
BarChart
},
data
()
{
return
{
lineChartData
:
lineChartData
.
newVisitis
}
},
methods
:
{
handleSetLineChartData
(
type
)
{
this
.
lineChartData
=
lineChartData
[
type
]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dashboard-editor-container
{
padding
:
32px
;
background-color
:
rgb
(
240
,
242
,
245
);
position
:
relative
;
.chart-wrapper
{
background
:
#fff
;
padding
:
16px
16px
0
;
margin-bottom
:
32px
;
}
}
@media
(
max-width
:
1024px
)
{
.chart-wrapper
{
padding
:
8px
;
}
}
</
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