Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
c5db42dd
Commit
c5db42dd
authored
Jan 26, 2026
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加报警声音,接收推送去掉报警状态判断
parent
423b7adb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
TDetectorReportController.java
...g/web/controller/supervise/TDetectorReportController.java
+2
-4
baojing.mp3
zh-baseversion-web/src/assets/video/baojing.mp3
+0
-0
rightBar.vue
zh-baseversion-web/src/components/bigWindow/rightBar.vue
+30
-8
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TDetectorReportController.java
View file @
c5db42dd
...
@@ -369,7 +369,6 @@ public class TDetectorReportController extends BaseController
...
@@ -369,7 +369,6 @@ public class TDetectorReportController extends BaseController
if
(!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceType
())
&&
tDetectorReportDataForm
.
getDeviceType
().
equals
(
"1"
)
&&
!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceStatusId
())
&&
new
ArrayList
<
String
>(
Arrays
.
asList
(
"7"
,
"9"
)).
contains
((
tDetectorReportDataForm
.
getDeviceStatusId
()))){
if
(!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceType
())
&&
tDetectorReportDataForm
.
getDeviceType
().
equals
(
"1"
)
&&
!
StringUtils
.
isEmpty
(
tDetectorReportDataForm
.
getDeviceStatusId
())
&&
new
ArrayList
<
String
>(
Arrays
.
asList
(
"7"
,
"9"
)).
contains
((
tDetectorReportDataForm
.
getDeviceStatusId
()))){
flag
=
false
;
flag
=
false
;
}
}
//7,9通信故障不处理
//7,9通信故障不处理
if
(
flag
){
if
(
flag
){
...
@@ -377,7 +376,6 @@ public class TDetectorReportController extends BaseController
...
@@ -377,7 +376,6 @@ public class TDetectorReportController extends BaseController
tDetectorInfo
.
setDetectorCode
(
tDetectorReportDataForm
.
getDeviceNo
());
tDetectorInfo
.
setDetectorCode
(
tDetectorReportDataForm
.
getDeviceNo
());
List
<
TDetectorInfo
>
tDetectorInfoList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
tDetectorInfo
);
List
<
TDetectorInfo
>
tDetectorInfoList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
tDetectorInfo
);
if
(
tDetectorInfoList
.
size
()
>
0
){
if
(
tDetectorInfoList
.
size
()
>
0
){
//报警设备类型,1探测器,2智慧用电 E+原始类型
//报警设备类型,1探测器,2智慧用电 E+原始类型
...
@@ -387,7 +385,7 @@ public class TDetectorReportController extends BaseController
...
@@ -387,7 +385,7 @@ public class TDetectorReportController extends BaseController
// 有未消警的数据
// 有未消警的数据
if
(
reportDataList
.
size
()>
0
){
if
(
reportDataList
.
size
()>
0
){
// 对比未消警数据与新推送数据的状态
// 对比未消警数据与新推送数据的状态
if
(!
reportDataList
.
get
(
0
).
getDetectorStatusId
().
equals
(
tDetectorReportDataForm
.
getDeviceStatusId
()))
{
///
if(!reportDataList.get(0).getDetectorStatusId().equals(tDetectorReportDataForm.getDeviceStatusId())) {
TDetectorReportData
temp
=
reportDataList
.
get
(
0
);
TDetectorReportData
temp
=
reportDataList
.
get
(
0
);
temp
.
setIsCancelAlarm
(
"1"
);
temp
.
setIsCancelAlarm
(
"1"
);
temp
.
setCancelTime
(
new
Date
());
temp
.
setCancelTime
(
new
Date
());
...
@@ -412,7 +410,7 @@ public class TDetectorReportController extends BaseController
...
@@ -412,7 +410,7 @@ public class TDetectorReportController extends BaseController
TDetectorInfo
info
=
tDetectorInfoService
.
selectTDetectorInfoByCode
(
datas
.
getDetectorCode
());
TDetectorInfo
info
=
tDetectorInfoService
.
selectTDetectorInfoByCode
(
datas
.
getDetectorCode
());
datas
.
setDetectorType
(
info
.
getDetectorType
());
datas
.
setDetectorType
(
info
.
getDetectorType
());
webSocketServer
.
batchSendMessage
(
JSONObject
.
toJSONString
(
datas
));
webSocketServer
.
batchSendMessage
(
JSONObject
.
toJSONString
(
datas
));
}
//
}
}
else
{
}
else
{
TDetectorReportData
datas
=
new
TDetectorReportData
();
TDetectorReportData
datas
=
new
TDetectorReportData
();
...
...
zh-baseversion-web/src/assets/video/baojing.mp3
0 → 100644
View file @
c5db42dd
File added
zh-baseversion-web/src/components/bigWindow/rightBar.vue
View file @
c5db42dd
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
<!--
<div
class=
"fong-div"
></div>
<!--
<div
class=
"fong-div"
></div>
<div
class=
"fong-div"
style=
"margin-left: 3px;"
></div>
<div
class=
"fong-div"
style=
"margin-left: 3px;"
></div>
<div
class=
"fong-div"
style=
"margin-left: 3px;"
></div>
-->
<div
class=
"fong-div"
style=
"margin-left: 3px;"
></div>
-->
<span
style=
"letter-spacing: 1px; color: #fff; float: left"
>
<span
style=
"letter-spacing: 1px; color: #fff; float: left"
>
预警信息
预警信息
</span>
</span>
<!--
<img
src=
"../../assets/second1/ti-bg.png"
alt=
""
>
-->
<!--
<img
src=
"../../assets/second1/ti-bg.png"
alt=
""
>
-->
...
@@ -360,14 +360,17 @@
...
@@ -360,14 +360,17 @@
width=
"500px"
width=
"500px"
append-to-body
append-to-body
@
cancel=
"cancel1"
@
cancel=
"cancel1"
@
close=
"stopbaojing"
>
>
<div
class=
"yujingtan"
style=
"width: 100%; height: 160px"
>
<div
class=
"yujingtan"
style=
"width: 100%; height: 160px"
>
<audio
id=
"myAudio"
src=
"@/assets/video/baojing.mp3"
></audio>
<div
class=
"yujingone"
>
所在单位:{{ yujingdata.unitName }}
</div>
<div
class=
"yujingone"
>
所在单位:{{ yujingdata.unitName }}
</div>
<div
class=
"yujingone"
>
设备类型:{{ yujingdata.detectorType }}
</div>
<!--<div class="yujingone">设备类型:{{ yujingdata.detectorType }}</div>-->
<!--<div class="yujingone" v-if="yujingdata2.detectorCode=='866384067209974'">设备类型:可燃气体探测器(AEP)</div>-->
<div
class=
"yujingone"
v-if=
"yujingdata.detectorType=='1'"
>
设备类型:家用报警器
</div>
<!--<div class="yujingone" v-if="yujingdata2.detectorCode=='860362056312914'">设备类型:家用报警器</div>-->
<div
class=
"yujingone"
v-else-if=
"yujingdata.detectorType=='2'"
>
设备类型:工业探测器
</div>
<!--<div class="yujingone" v-if="yujingdata2.detectorCode=='868977060000767'">设备类型:家用报警器(AEP)</div>-->
<div
class=
"yujingone"
v-else-if=
"yujingdata.detectorType==4"
>
设备类型:激光家报
</div>
<!--<div class="yujingone" v-if="yujingdata2.detectorCode=='B294F344'">设备类型:工业探测器</div>-->
<div
class=
"yujingone"
v-else-if=
"yujingdata.detectorType==5"
>
设备类型:地下井探测器
</div>
<div
class=
"yujingone"
v-else
>
设备类型:{{ yujingdata.detectorType }}
</div>
<div
class=
"yujingone"
>
预警信息:{{ yujingdata.statusName }}
</div>
<div
class=
"yujingone"
>
预警信息:{{ yujingdata.statusName }}
</div>
<div
class=
"yujingone"
style=
"height: 30px"
>
<div
class=
"yujingone"
style=
"height: 30px"
>
预警时间:{{ yujingdata.alarmTime }}
预警时间:{{ yujingdata.alarmTime }}
...
@@ -393,7 +396,7 @@ export default {
...
@@ -393,7 +396,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
open
:
tru
e
,
open
:
fals
e
,
isopen
:
true
,
isopen
:
true
,
allNum
:
{},
allNum
:
{},
diviceNum
:
{
diviceNum
:
{
...
@@ -499,6 +502,7 @@ export default {
...
@@ -499,6 +502,7 @@ export default {
if
(
this
.
isopen
)
{
if
(
this
.
isopen
)
{
this
.
open
=
true
;
this
.
open
=
true
;
setTimeout
(
this
.
baojing
,
1500
);
}
}
// const obj = JSON.parse(evt.data);
// const obj = JSON.parse(evt.data);
// console.log("接受socketobj", obj);
// console.log("接受socketobj", obj);
...
@@ -511,8 +515,10 @@ export default {
...
@@ -511,8 +515,10 @@ export default {
closealways
()
{
closealways
()
{
this
.
open
=
false
;
this
.
open
=
false
;
this
.
isopen
=
false
;
this
.
isopen
=
false
;
this
.
stopbaojing
();
},
cancel1
()
{
},
},
cancel1
()
{},
getAlarm
()
{
getAlarm
()
{
return
alarmData
().
then
((
response
)
=>
{
return
alarmData
().
then
((
response
)
=>
{
// return;
// return;
...
@@ -733,6 +739,22 @@ export default {
...
@@ -733,6 +739,22 @@ export default {
// ],
// ],
// });
// });
// },
// },
baojing
(){
console
.
log
(
"--开始报警"
)
var
audio
=
document
.
getElementById
(
"myAudio"
);
console
.
log
(
audio
)
audio
.
loop
=
true
;
// 设置音频循环播放
audio
.
play
().
catch
(
error
=>
{
console
.
error
(
"播放音频时发生错误:"
,
error
);
});
},
stopbaojing
(){
console
.
log
(
"关闭报警"
)
var
audio
=
document
.
getElementById
(
"myAudio"
);
audio
.
pause
();
// 暂停音频
},
drawLine
()
{
drawLine
()
{
// 基于准备好的dom,初始化echarts实例
// 基于准备好的dom,初始化echarts实例
let
myChart1
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"myChartone"
));
let
myChart1
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"myChartone"
));
...
...
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