Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
0eb7b9ea
Commit
0eb7b9ea
authored
Mar 31, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
b8ac4422
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
64 additions
and
67 deletions
+64
-67
App.vue
src/App.vue
+16
-22
AppMain.vue
src/layout/components/AppMain.vue
+4
-1
Navbar.vue
src/layout/components/Navbar.vue
+5
-1
index.js
src/router/index.js
+2
-2
index.vue
src/views/alarm/cableTime/index.vue
+2
-2
index.vue
src/views/alarm/device/index.vue
+1
-0
mixins.js
src/views/dashboard/components/mixins.js
+8
-6
type1.vue
src/views/dashboard/components/type1.vue
+5
-5
type2.vue
src/views/dashboard/components/type2.vue
+7
-5
type5.vue
src/views/dashboard/components/type5.vue
+7
-21
index.vue
src/views/monitor/leakageCable/index.vue
+5
-0
index.vue
src/views/setting/add/index.vue
+2
-2
No files found.
src/App.vue
View file @
0eb7b9ea
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<router-view
/>
<!--
<audio
ref=
"audio"
id=
"my_audio"
src=
"./assets/audio/19000.wav"
controls
autoplay
hidden=
"hidden"
/>
-->
<router-view
/>
<audio
ref=
"audio"
id=
"my_audio"
src=
"./assets/audio/19000.wav"
controls
autoplay
hidden=
"hidden"
/>
<transition
name=
"tipalerm"
>
<transition
name=
"tipalerm"
>
<div
class=
"tips"
v-if=
"tflag"
>
<div
class=
"tips"
v-if=
"tflag"
>
<p>
提示
</p>
<p>
提示
</p>
...
@@ -64,16 +65,15 @@ export default {
...
@@ -64,16 +65,15 @@ export default {
},
},
mounted
()
{
mounted
()
{
let
audioPlay
=
document
.
getElementById
(
"my_audio"
);
let
audioPlay
=
document
.
getElementById
(
"my_audio"
);
this
.
websocket
=
socket
({
//
this.websocket = socket({
onmessage
:
this
.
receiveMessage
,
//
onmessage: this.receiveMessage,
});
//
});
EventBus
.
$on
(
"dialogAlarm"
,
(
data
)
=>
{
EventBus
.
$on
(
"dialogAlarm"
,
(
data
)
=>
{
// 接收消息之后 声音弹窗显示
// 接收消息之后 声音弹窗显示
//
audioPlay.play();
audioPlay
.
play
();
this
.
msg
=
data
;
this
.
msg
=
data
;
this
.
levelcolor
();
this
.
levelcolor
();
// console.log(data);
this
.
tflag
=
true
;
this
.
tflag
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
tflag
=
false
;
this
.
tflag
=
false
;
...
@@ -91,33 +91,27 @@ export default {
...
@@ -91,33 +91,27 @@ export default {
watch
:
{
watch
:
{
$route
(
to
,
from
)
{
$route
(
to
,
from
)
{
if
(
to
.
path
==
"/login"
)
{
if
(
to
.
path
==
"/login"
)
{
setTimeout
(
this
.
websocket
.
close
(),
5
00
)
setTimeout
(
this
.
closeWebsocket
(),
3
00
)
// this.websocket.close()
console
.
log
(
"在登录页"
);
console
.
log
(
"在登录页"
);
}
}
},
},
usertoken
:
{
usertoken
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newV
)
{
handler
(
newV
)
{
if
(
newV
)
{
if
(
newV
)
{
this
.
closeWebsocket
();
this
.
websocket
=
socket
({
if
(
newV
!=
''
)
{
this
.
websocket
=
socket
({
onmessage
:
this
.
receiveMessage
,
onmessage
:
this
.
receiveMessage
,
});
});
}
else
{
this
.
closeWebsocket
();
}
}
}
},
},
},
},
// userId: {
// immediate: true,
// handler(newV) {
// if (newV) {
// this.closeWebsocket();
// this.websocket = socket({
// onmessage: this.receiveMessage,
// });
// }
// },
// },
},
},
};
};
</
script
>
</
script
>
...
...
src/layout/components/AppMain.vue
View file @
0eb7b9ea
<
template
>
<
template
>
<section
class=
"app-main"
>
<section
class=
"app-main"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<router-view
:key=
"key"
/>
<!--
<keep-alive
include=
"Dashboard"
>
-->
<router-view
:key=
"key"
/>
<!--
</keep-alive>
-->
</transition>
</transition>
</section>
</section>
</
template
>
</
template
>
...
...
src/layout/components/Navbar.vue
View file @
0eb7b9ea
...
@@ -96,7 +96,11 @@ export default {
...
@@ -96,7 +96,11 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.navbar
{
.navbar
{
overflow
:
hidden
;
overflow
:
hidden
;
position
:
relative
;
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
5
;
width
:
100%
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
1px
4px
rgba
(
0
,
21
,
41
,.
08
);
box-shadow
:
0
1px
4px
rgba
(
0
,
21
,
41
,.
08
);
.log
{
.log
{
...
...
src/router/index.js
View file @
0eb7b9ea
...
@@ -53,7 +53,7 @@ export const constantRoutes = [
...
@@ -53,7 +53,7 @@ export const constantRoutes = [
path
:
'dashboard'
,
path
:
'dashboard'
,
name
:
'Dashboard'
,
name
:
'Dashboard'
,
component
:
()
=>
import
(
'@/views/dashboard/index'
),
component
:
()
=>
import
(
'@/views/dashboard/index'
),
meta
:
{
title
:
'首页'
,
icon
:
'homePage'
}
meta
:
{
title
:
'首页'
,
icon
:
'homePage'
}
}]
}]
},
},
{
{
...
@@ -73,7 +73,7 @@ export const constantRoutes = [
...
@@ -73,7 +73,7 @@ export const constantRoutes = [
path
:
'device'
,
path
:
'device'
,
name
:
'device'
,
name
:
'device'
,
component
:
()
=>
import
(
'@/views/alarm/device/index'
),
component
:
()
=>
import
(
'@/views/alarm/device/index'
),
meta
:
{
title
:
'设备连接告警'
}
meta
:
{
title
:
'设备连接告警'
}
}
}
]
]
},
},
...
...
src/views/alarm/cableTime/index.vue
View file @
0eb7b9ea
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
prop=
"alarmInfo"
prop=
"alarmInfo"
label=
"告警信息"
label=
"告警信息"
align=
"center"
align=
"center"
width=
"
20
0"
width=
"
16
0"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
align=
"center"
align=
"center"
width=
"105"
width=
"105"
/>
/>
<el-table-column
prop=
"confirmPerson"
label=
"确认人"
align=
"center"
/>
<el-table-column
prop=
"confirmPerson"
label=
"确认人"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"confirmTime"
label=
"确认时间"
align=
"center"
/>
<el-table-column
prop=
"confirmTime"
label=
"确认时间"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
...
src/views/alarm/device/index.vue
View file @
0eb7b9ea
...
@@ -140,6 +140,7 @@ import search from "./components/search.vue";
...
@@ -140,6 +140,7 @@ import search from "./components/search.vue";
import
download
from
"@/utils/download"
;
import
download
from
"@/utils/download"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
export
default
{
name
:
'device'
,
data
()
{
data
()
{
return
{
return
{
alarmInfo
:
""
,
alarmInfo
:
""
,
...
...
src/views/dashboard/components/mixins.js
View file @
0eb7b9ea
...
@@ -67,20 +67,22 @@ export const DetailMixins = {
...
@@ -67,20 +67,22 @@ export const DetailMixins = {
levelcolor
()
{
levelcolor
()
{
let
la
=
document
.
getElementsByClassName
(
"levelData"
);
let
la
=
document
.
getElementsByClassName
(
"levelData"
);
for
(
var
i
=
0
;
i
<
this
.
statusList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
statusList
.
length
;
i
++
)
{
if
(
la
[
i
].
innerHTML
==
"连接正常"
)
{
if
(
this
.
statusList
[
i
].
value
==
"连接正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
innerHTML
=
"连接正常"
}
if
(
this
.
statusList
[
i
].
value
==
"连接异常"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"告警"
la
[
i
].
innerHTML
=
"告警"
}
else
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
}
if
(
this
.
statusList
[
i
].
value
==
"正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
la
[
i
].
innerHTML
=
"正常"
}
if
(
this
.
statusList
[
i
].
value
==
"紧急"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"紧急告警"
la
[
i
].
innerHTML
=
"紧急告警"
}
else
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
}
if
(
this
.
statusList
[
i
].
value
==
"重要"
)
{
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
innerHTML
=
"重要告警"
la
[
i
].
innerHTML
=
"重要告警"
}
else
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
}
if
(
this
.
statusList
[
i
].
value
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
innerHTML
=
"一般告警"
la
[
i
].
innerHTML
=
"一般告警"
}
}
...
...
src/views/dashboard/components/type1.vue
View file @
0eb7b9ea
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
class=
"value_handle"
:style=
"acolor3"
>
{{
form
.
status
.
connectAlarm
}}
</el-col>
<el-col
:span=
"10"
class=
"value_handle"
:style=
"acolor3"
>
{{
form
.
status
.
connectAlarm
}}
</el-col>
<el-col
:span=
"10"
<el-col
:span=
"10"
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.connectAlarm == '告警'"
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.connectAlarm == '告警'
|| form.status.connectAlarm == '连接异常'
"
@
click=
"toalarm(form.status.connectAlarm)"
>
处理告警
</el-button></el-col>
@
click=
"toalarm(form.status.connectAlarm)"
>
处理告警
</el-button></el-col>
</el-row>
</el-row>
</el-col>
</el-col>
...
@@ -273,7 +273,7 @@ export default {
...
@@ -273,7 +273,7 @@ export default {
this
.
$message
.
success
(
"修改成功"
);
this
.
$message
.
success
(
"修改成功"
);
});
});
},
},
levelcolor2
()
{
waylevelcolor
()
{
if
(
this
.
form
.
status
.
monitorAlarm
==
'正常'
)
{
if
(
this
.
form
.
status
.
monitorAlarm
==
'正常'
)
{
this
.
acolor
.
color
=
'green'
this
.
acolor
.
color
=
'green'
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'紧急'
)
{
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'紧急'
)
{
...
@@ -287,7 +287,7 @@ export default {
...
@@ -287,7 +287,7 @@ export default {
this
.
form
.
status
.
monitorAlarm
=
'一般告警'
this
.
form
.
status
.
monitorAlarm
=
'一般告警'
}
}
},
},
levelcolor3
()
{
waylevelcolor2
()
{
if
(
this
.
form
.
status
.
connectAlarm
==
'连接正常'
)
{
if
(
this
.
form
.
status
.
connectAlarm
==
'连接正常'
)
{
this
.
acolor3
.
color
=
'green'
this
.
acolor3
.
color
=
'green'
}
else
if
(
this
.
form
.
status
.
connectAlarm
==
'连接异常'
)
{
}
else
if
(
this
.
form
.
status
.
connectAlarm
==
'连接异常'
)
{
...
@@ -322,8 +322,8 @@ export default {
...
@@ -322,8 +322,8 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newV
)
{
handler
(
newV
)
{
if
(
newV
)
{
if
(
newV
)
{
this
.
levelcolor2
()
this
.
waylevelcolor
()
this
.
levelcolor3
()
this
.
waylevelcolor2
()
}
}
},
},
},
},
...
...
src/views/dashboard/components/type2.vue
View file @
0eb7b9ea
...
@@ -213,6 +213,7 @@
...
@@ -213,6 +213,7 @@
></el-col
></el-col
>
>
</el-row>
</el-row>
</div>
</div>
</el-card>
</el-card>
</el-col>
</el-col>
...
@@ -245,17 +246,18 @@ export default {
...
@@ -245,17 +246,18 @@ export default {
for
(
var
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
)
{
if
(
la
[
i
].
innerHTML
==
"连接正常"
)
{
if
(
la
[
i
].
innerHTML
==
"连接正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
innerHTML
=
"连接正常"
}
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"告警"
la
[
i
].
innerHTML
=
"告警"
}
else
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
}
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
}
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
style
.
color
=
"#f00"
;
}
else
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
}
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
innerHTML
=
"重要告警"
la
[
i
].
innerHTML
=
"重要告警"
}
else
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
}
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
innerHTML
=
"一般告警"
la
[
i
].
innerHTML
=
"一般告警"
}
}
...
...
src/views/dashboard/components/type5.vue
View file @
0eb7b9ea
...
@@ -223,12 +223,12 @@
...
@@ -223,12 +223,12 @@
</div>
</div>
<div>
<div>
<!-- === -->
<!-- === -->
<el-row
class=
"text"
:gutter=
"24"
>
<el-row
v-if=
"statusl.length!=0"
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
漏缆状态
</div>
<div
class=
"item_name"
>
漏缆状态
</div>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<div
class=
"item_data levelData"
:style=
"acolor"
v-if=
"statusl.length!=0"
>
{{
this
.
statusl
[
0
].
value
}}
</div>
<div
class=
"item_data levelData"
:style=
"acolor"
>
{{
this
.
statusl
[
0
].
value
}}
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
<el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
...
@@ -269,8 +269,8 @@
...
@@ -269,8 +269,8 @@
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"isQuery = !isQuery"
>
生成图形
</el-button>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
>
生成图形
</el-button>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"trans()"
>
生成图形
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
...
@@ -284,29 +284,15 @@
...
@@ -284,29 +284,15 @@
import
{
DetailMixins
}
from
"./mixins"
;
import
{
DetailMixins
}
from
"./mixins"
;
import
{
leakyCableOpen
}
from
"../api"
;
import
{
leakyCableOpen
}
from
"../api"
;
export
default
{
export
default
{
name
:
"Dashboard"
,
data
()
{
data
()
{
return
{
return
{
isQuery
:
false
,
colspan
:
14
,
colspan
:
14
,
acolor
:{
acolor
:{
color
:
""
color
:
""
},
},
leakyList
:
[],
leakyList
:
[],
timeStatus
:
{},
timeStatus
:
{},
testasd
:[
{
name
:
"设备状态"
,
value
:
"紧急"
},
{
name
:
"时间"
,
value
:
"2022-12-14"
},
{
name
:
"距离"
,
value
:
"01"
},
{
name
:
"驻波比"
,
value
:
"1"
},
{
name
:
"距离"
,
value
:
"02"
},
{
name
:
"驻波比"
,
value
:
"2"
},
{
name
:
"距离"
,
value
:
"03"
},
{
name
:
"驻波比"
,
value
:
"3"
},
{
name
:
"距离"
,
value
:
"04"
},
{
name
:
"驻波比"
,
value
:
"4"
},
],
zhubobi
:[],
zhubobi
:[],
long
:[],
long
:[],
statusl
:[]
statusl
:[]
...
@@ -325,7 +311,7 @@ export default {
...
@@ -325,7 +311,7 @@ export default {
this
.
$message
.
success
(
"修改成功"
);
this
.
$message
.
success
(
"修改成功"
);
});
});
},
},
le
velcolor2
()
{
le
akylevelcolor
()
{
if
(
this
.
timeStatus
.
level
==
'正常'
)
{
if
(
this
.
timeStatus
.
level
==
'正常'
)
{
this
.
acolor
.
color
=
'green'
this
.
acolor
.
color
=
'green'
}
else
if
(
this
.
timeStatus
.
level
==
'紧急'
)
{
}
else
if
(
this
.
timeStatus
.
level
==
'紧急'
)
{
...
@@ -389,7 +375,7 @@ export default {
...
@@ -389,7 +375,7 @@ export default {
if
(
newV
)
{
if
(
newV
)
{
this
.
trans
();
this
.
trans
();
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
// this.levelcolor2
();
this
.
leakylevelcolor
();
});
});
}
}
},
},
...
...
src/views/monitor/leakageCable/index.vue
View file @
0eb7b9ea
...
@@ -89,6 +89,8 @@ export default {
...
@@ -89,6 +89,8 @@ export default {
return
"important"
;
return
"important"
;
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
return
"common"
;
}
else
if
(
row
.
alarmLevelName
==
"正常"
&&
column
.
label
==
"告警级别"
)
{
return
"normal"
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
return
"stripe"
;
return
"stripe"
;
...
@@ -186,6 +188,9 @@ export default {
...
@@ -186,6 +188,9 @@ export default {
&
:
:
v-deep
.
common
{
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
background-color
:
#ead906
;
}
}
&
:
:
v-deep
.
normal
{
background-color
:
green
;
}
.page
{
.page
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/setting/add/index.vue
View file @
0eb7b9ea
...
@@ -122,8 +122,8 @@ export default {
...
@@ -122,8 +122,8 @@ export default {
.content
{
.content
{
border
:
1px
solid
#e3e3e3
;
border
:
1px
solid
#e3e3e3
;
border-radius
:
10px
;
border-radius
:
10px
;
height
:
700px
;
//
height: 700px;
overflow-y
:
scroll
;
//
overflow-y: scroll;
.content-title
{
.content-title
{
width
:
100%
;
width
:
100%
;
height
:
60px
;
height
:
60px
;
...
...
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