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
8f45791a
Commit
8f45791a
authored
Jan 18, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手动消警 监控 gengdidi
parent
50884716
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
16 deletions
+57
-16
TDeviceAlarmController.java
...web/controller/dataMonitoring/TDeviceAlarmController.java
+30
-8
application-prd.yml
gassafety-admin/src/main/resources/application-prd.yml
+1
-1
application.yml
gassafety-admin/src/main/resources/application.yml
+1
-1
.env.development
gassafety-web/.env.development
+1
-1
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+1
-0
index.vue
gassafety-web/src/views/device/devicemonitor/index.vue
+23
-5
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/dataMonitoring/TDeviceAlarmController.java
View file @
8f45791a
...
@@ -2,19 +2,14 @@ package com.zehong.web.controller.dataMonitoring;
...
@@ -2,19 +2,14 @@ package com.zehong.web.controller.dataMonitoring;
import
java.util.List
;
import
java.util.List
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.system.domain.form.DeviceAlarmForm
;
import
com.zehong.system.domain.form.DeviceAlarmForm
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.service.WebSocketServer
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.AjaxResult
;
...
@@ -36,6 +31,9 @@ public class TDeviceAlarmController extends BaseController
...
@@ -36,6 +31,9 @@ public class TDeviceAlarmController extends BaseController
@Autowired
@Autowired
private
ITDeviceAlarmService
tDeviceAlarmService
;
private
ITDeviceAlarmService
tDeviceAlarmService
;
@Autowired
private
WebSocketServer
webSocketServer
;
/**
/**
* 查询报警信息列表
* 查询报警信息列表
...
@@ -113,4 +111,28 @@ public class TDeviceAlarmController extends BaseController
...
@@ -113,4 +111,28 @@ public class TDeviceAlarmController extends BaseController
public
List
<
TDeviceAlarm
>
selectAlarmDevice
(){
public
List
<
TDeviceAlarm
>
selectAlarmDevice
(){
return
tDeviceAlarmService
.
selectAlarmDevice
();
return
tDeviceAlarmService
.
selectAlarmDevice
();
}
}
/**
* 手动消警
* @param alarmId 报警信息id
* @return
*/
@GetMapping
(
"/handEliminationAlarm"
)
public
AjaxResult
handEliminationAlarm
(
@RequestParam
(
value
=
"alarmId"
)
int
alarmId
){
try
{
TDeviceAlarm
alarmVo
=
new
TDeviceAlarm
();
alarmVo
.
setAlarmId
(
alarmId
);
alarmVo
.
setDealStatus
(
"4"
);
int
status
=
tDeviceAlarmService
.
updateTDeviceAlarm
(
alarmVo
);
if
(
1
!=
status
){
throw
new
Exception
(
"手动消警更新失败!"
);
}
DeviceAlarmVo
alarm
=
tDeviceAlarmService
.
selectTDeviceAlarmById
(
alarmId
);
webSocketServer
.
batchSendMessage
(
JSONObject
.
toJSONString
(
alarm
));
return
AjaxResult
.
success
(
alarm
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"手动消警系统报错:"
+
e
);
}
return
AjaxResult
.
error
();
}
}
}
gassafety-admin/src/main/resources/application-prd.yml
View file @
8f45791a
...
@@ -58,7 +58,7 @@ spring:
...
@@ -58,7 +58,7 @@ spring:
# redis 配置
# redis 配置
redis
:
redis
:
# 地址
# 地址
host
:
localhost
host
:
36.148.23.59
# 端口,默认为6379
# 端口,默认为6379
port
:
6379
port
:
6379
# 数据库索引
# 数据库索引
...
...
gassafety-admin/src/main/resources/application.yml
View file @
8f45791a
...
@@ -26,7 +26,7 @@ spring:
...
@@ -26,7 +26,7 @@ spring:
# 国际化资源文件路径
# 国际化资源文件路径
basename
:
i18n/messages
basename
:
i18n/messages
profiles
:
profiles
:
active
:
test
active
:
prd
# 文件上传
# 文件上传
servlet
:
servlet
:
multipart
:
multipart
:
...
...
gassafety-web/.env.development
View file @
8f45791a
...
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/dev-api'
...
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_MAP_CENTER = '石家庄'
VUE_APP_MAP_CENTER = '石家庄'
#代理地址
#代理地址
VUE_APP_TARGET = 'http://
192.168.2.28:8903
/gassafety'
VUE_APP_TARGET = 'http://
36.148.23.59:8901
/gassafety'
# 路由懒加载
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
VUE_CLI_BABEL_TRANSPILE_MODULES = true
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
8f45791a
...
@@ -157,6 +157,7 @@
...
@@ -157,6 +157,7 @@
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 4"
>
手动消警
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
...
gassafety-web/src/views/device/devicemonitor/index.vue
View file @
8f45791a
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
<el-table
v-loading=
"loading"
:data=
"deviceList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"deviceList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<
el-table-column
label=
"设备监控id"
align=
"center"
prop=
"monitorId"
/
>
<
!--
<el-table-column
label=
"设备监控id"
align=
"center"
prop=
"monitorId"
/>
--
>
<el-table-column
label=
"设备"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"设备阈值"
align=
"center"
prop=
"deviceThreshold"
/>
<el-table-column
label=
"设备阈值"
align=
"center"
prop=
"deviceThreshold"
/>
<el-table-column
label=
"关联管道"
align=
"center"
prop=
"relationPipeName"
/>
<el-table-column
label=
"关联管道"
align=
"center"
prop=
"relationPipeName"
/>
...
@@ -156,9 +156,9 @@
...
@@ -156,9 +156,9 @@
/>
/>
<!-- 添加或修改设备监控对话框 -->
<!-- 添加或修改设备监控对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
50
0px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
65
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"设备
id
"
prop=
"deviceId"
>
<el-form-item
label=
"设备"
prop=
"deviceId"
>
<!--<el-input v-model="form.deviceId" placeholder="请输入设备id" />-->
<!--<el-input v-model="form.deviceId" placeholder="请输入设备id" />-->
<el-select
v-model=
"form.deviceId"
placeholder=
"请选择设备"
filterable
>
<el-select
v-model=
"form.deviceId"
placeholder=
"请选择设备"
filterable
>
<el-option
<el-option
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
<el-form-item
label=
"设备阈值"
prop=
"deviceThreshold"
>
<el-form-item
label=
"设备阈值"
prop=
"deviceThreshold"
>
<el-input
v-model=
"form.deviceThreshold"
placeholder=
"请输入设备阈值"
/>
<el-input
v-model=
"form.deviceThreshold"
placeholder=
"请输入设备阈值"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"关联管道
id
"
prop=
"relationPipeId"
>
<el-form-item
label=
"关联管道"
prop=
"relationPipeId"
>
<!--<el-input v-model="form.relationPipeId" placeholder="请输入关联管道id" />-->
<!--<el-input v-model="form.relationPipeId" placeholder="请输入关联管道id" />-->
<el-select
v-model=
"form.relationPipeId"
placeholder=
"请选择关联管道"
filterable
>
<el-select
v-model=
"form.relationPipeId"
placeholder=
"请选择关联管道"
filterable
>
<el-option
<el-option
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
<el-form-item
label=
"关联管道阈值"
prop=
"relationPipeThreshold"
>
<el-form-item
label=
"关联管道阈值"
prop=
"relationPipeThreshold"
>
<el-input
v-model=
"form.relationPipeThreshold"
placeholder=
"请输入关联管道阈值"
/>
<el-input
v-model=
"form.relationPipeThreshold"
placeholder=
"请输入关联管道阈值"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"关联设备
id
"
prop=
"relationDeviceId"
>
<el-form-item
label=
"关联设备"
prop=
"relationDeviceId"
>
<!-- <el-input v-model="form.relationDeviceId" placeholder="请输入关联设备id" />-->
<!-- <el-input v-model="form.relationDeviceId" placeholder="请输入关联设备id" />-->
<el-select
v-model=
"form.relationDeviceId"
placeholder=
"请选择关联设备"
filterable
>
<el-select
v-model=
"form.relationDeviceId"
placeholder=
"请选择关联设备"
filterable
>
<el-option
<el-option
...
@@ -316,6 +316,24 @@ export default {
...
@@ -316,6 +316,24 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
deviceId
:
[
{
required
:
true
,
message
:
"请选择设备"
,
trigger
:
"blur"
},
],
deviceThreshold
:
[
{
required
:
true
,
message
:
"请输入设备阈值"
,
trigger
:
"blur"
},
],
relationPipeId
:
[
{
required
:
true
,
message
:
"请选择关联管道"
,
trigger
:
"blur"
},
],
relationPipeThreshold
:
[
{
required
:
true
,
message
:
"请设置关联属管道阈值"
,
trigger
:
"blur"
},
],
relationDeviceId
:
[
{
required
:
true
,
message
:
"请选择关联设备"
,
trigger
:
"blur"
},
],
relationDeviceThreshold
:
[
{
required
:
true
,
message
:
"请设置关联设备阈值"
,
trigger
:
"blur"
},
],
},
},
devices
:
[],
devices
:
[],
pipes
:
[],
pipes
:
[],
...
...
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