Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
海康威视
web-project
Commits
bb3248b0
Commit
bb3248b0
authored
Aug 10, 2024
by
xuke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警参数-第三次提交
parent
149bd11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
178 additions
and
32 deletions
+178
-32
AlarmStatusPage.vue
src/views/AlarmPage/AlarmStatusPage.vue
+178
-32
No files found.
src/views/AlarmPage/AlarmStatusPage.vue
View file @
bb3248b0
...
...
@@ -63,7 +63,7 @@
</el-card>
<el-dialog
v-model=
"show"
class=
"dialog"
:show-scrollbar=
"true"
>
<el-dialog
@
close=
"onClose"
v-model=
"show"
class=
"dialog"
:show-scrollbar=
"true"
>
<div
class=
"div-header"
>
<el-form
:inline=
"true"
>
<el-form-item
label=
"查询类型:"
>
...
...
@@ -86,10 +86,14 @@
<el-row>
<el-col
:span=
"6"
>
<div
class=
"left"
>
<el-table
:data=
"cnNames_before"
:style=
"{ width: '100%' }"
>
<el-table-column
prop=
"cnName"
>
<el-table
:data=
"cnNames_before"
class=
"scroll-table"
:row-style=
"{height: '16px'}"
:cell-style=
"{padding:'0px'}"
>
<el-table-column
prop=
"cnName"
class-name=
"before-hover-column"
:show-overflow-tooltip=
"true"
>
<
template
#
default=
"scope"
>
<div
@
click=
"selectParams(scope.row)"
>
{{
scope
.
row
.
cnName
}}
</div>
<div
@
click=
"select
Before
Params(scope.row)"
>
{{
scope
.
row
.
cnName
}}
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -188,7 +192,7 @@
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
启用短
息
通知:
</th>
<th
style=
"width: 25%"
>
启用短
信
通知:
</th>
<td
style=
"width: 60%; margin:0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
...
...
@@ -206,11 +210,10 @@
<el-button
:disabled=
"param.cnName === '' ? true : false"
type=
"primary"
@
click=
"onAdd"
>
添加
</el-button>
<el-button
disabled
type=
"primary"
@
click=
"onDel"
>
删除
</el-button>
</div>
<div
v-else
=
"button"
>
<div
v-else
>
<el-button
type=
"primary"
@
click=
"onEdit"
>
修改
</el-button>
<el-button
type=
"primary"
@
click=
"onDel"
>
删除
</el-button>
</div>
</div>
<!-- </el-card> -->
</div>
...
...
@@ -218,14 +221,17 @@
<el-col
:span=
"6"
>
<div
class=
"left"
>
<el-table
:data=
"cnNames_after"
:style=
"{ width: '100%' }"
>
<el-table-column
prop=
"cnName"
>
<el-table
:data=
"cnNames_after"
class=
"scroll-table"
:row-style=
"{height: '16px'}"
:cell-style=
"{padding:'0px'}"
>
<el-table-column
prop=
"cnName"
class-name=
"after-hover-column"
>
<
template
#
default=
"scope"
>
<div
@
click=
"selectParams(scope.row)"
>
{{
scope
.
row
.
cnName
}}
</div>
<div
@
click=
"select
After
Params(scope.row)"
>
{{
scope
.
row
.
cnName
}}
</div>
</
template
>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
...
...
@@ -410,10 +416,6 @@ function getPipes() {
}
});
}
// options.forEach(element => {
// AlarmInfo.push(element.value);
// })
// console.log(AlarmInfo.value);
}
//获取换热机组列表
...
...
@@ -520,7 +522,7 @@ let params = ref({
"alarmPlan"
:
""
,
"isShortMessage"
:
""
,
"isAlarm"
:
""
,
"isActive"
:
""
,
"isActive"
:
true
,
"updateNullFields"
:
""
,
})
...
...
@@ -536,7 +538,7 @@ let addParams = ref({
"alarmPlan"
:
""
,
"isShortMessage"
:
""
,
"isAlarm"
:
""
,
"isActive"
:
""
"isActive"
:
true
})
const
reset
=
()
=>
{
...
...
@@ -551,7 +553,7 @@ const reset = () => {
"alarmPlan"
:
""
,
"isShortMessage"
:
""
,
"isAlarm"
:
""
,
"isActive"
:
""
"isActive"
:
true
}
}
let
param
=
ref
({
...
...
@@ -595,9 +597,9 @@ const paramsSetting = () => {
}
let
newRow
=
ref
({})
const
selectParams
=
(
row
)
=>
{
const
select
Before
Params
=
(
row
)
=>
{
reset
()
button
.
value
=
true
if
(
type
.
value
===
"GetPipeAlarmStatusData"
)
{
newType
.
value
=
1
param
.
value
.
baseId
=
"pipeParaBaseId"
...
...
@@ -608,13 +610,11 @@ const selectParams = (row) => {
newType
.
value
=
3
param
.
value
.
baseId
=
"transParaBaseId"
}
console
.
log
(
"+++++++++++++++++"
,
param
.
value
.
baseId
);
param
.
value
.
baseId
=
row
[
param
.
value
.
baseId
]
newRow
.
value
=
param
.
value
.
baseId
if
(
param
.
value
.
baseId
)
{
const
data
=
http
.
post
(
"
/
api/alarm/para/GetAlarmParaInfo"
,
{
type
:
newType
.
value
,
id
:
dept
.
value
,
baseid
:
param
.
value
.
baseId
},
false
)
const
data
=
http
.
post
(
"api/alarm/para/GetAlarmParaInfo"
,
{
type
:
newType
.
value
,
id
:
dept
.
value
,
baseid
:
param
.
value
.
baseId
},
false
)
console
.
log
(
"查看baseId --- dataaaaa:"
,
data
);
data
.
then
(
function
(
val
)
{
console
.
log
(
"valllll:"
,
val
);
...
...
@@ -627,19 +627,80 @@ const selectParams = (row) => {
}
}
// 添加参数后
// 删除参数id -> 需要添加参数后的参数的id
const
delId
=
ref
(
0
)
const
selectAfterParams
=
(
row
)
=>
{
reset
()
button
.
value
=
false
if
(
type
.
value
===
"GetPipeAlarmStatusData"
)
{
newType
.
value
=
1
param
.
value
.
baseId
=
"pipeParaBaseId"
}
else
if
(
type
.
value
===
"GetBoilerAlarmStatusData"
)
{
newType
.
value
=
2
param
.
value
.
baseId
=
"boilerParaBaseId"
}
else
{
newType
.
value
=
3
param
.
value
.
baseId
=
"transParaBaseId"
}
console
.
log
(
"+++++++++++++++++"
,
param
.
value
.
baseId
);
param
.
value
.
baseId
=
row
[
param
.
value
.
baseId
]
newRow
.
value
=
param
.
value
.
baseId
if
(
param
.
value
.
baseId
)
{
const
data
=
http
.
post
(
"/api/alarm/para/GetAlarmParaInfo"
,
{
type
:
newType
.
value
,
id
:
dept
.
value
,
baseid
:
param
.
value
.
baseId
},
false
)
console
.
log
(
"查看baseId --- dataaaaa:"
,
data
);
data
.
then
(
function
(
val
)
{
console
.
log
(
"valllll:"
,
val
);
// Object.assign({...addParams.value},val)
// params.value = val.data
addParams
.
value
=
{...
val
.
data
}
// 回显数据
// "updateNullFields": "",
// "voicePath": "",
// "isVoice": "",
// "topMost": "",
// "upper": "",
// "lower": "",
// "downMost": "",
// "alarmPlan": "",
// "isShortMessage": "",
// "isAlarm": "",
// "isActive": true
// addParams.value.updateNullFields=val.
// addParams.value.voicePath=""
// addParams.value.
// addParams.value.
// addParams.value.
// addParams.value.
// addParams.value.
console
.
log
(
"addParams.value/////////"
,
addParams
.
value
);
console
.
log
(
"!!!!!Params.value:"
,
params
.
value
);
param
.
value
.
cnName
=
row
.
cnName
if
(
type
.
value
===
1
)
{
delId
.
value
=
val
.
data
.
pipeAlarmParaId
}
else
if
(
type
.
value
===
2
)
{
delId
.
value
=
val
.
data
.
boilerAlarmParaId
}
else
{
delId
.
value
=
val
.
data
.
transAlarmParaId
}
});
}
else
{
ElMessage
.
info
(
"该参数暂不需要修改..."
)
}
}
//"pipeId": "",
// "boilerId": "",
// "unitId": "",
// 总管
const
onAdd
=
()
=>
{
console
.
log
(
"!!!!!!!"
,
addParams
.
value
);
if
(
newType
.
value
===
1
)
{
addParams
.
value
.
pipeId
=
dept
.
value
addParams
.
value
.
pipeParaBaseId
=
newRow
.
value
addParams
.
value
.
gatherType
=
1
addParams
.
value
.
voicePath
=
1
if
(
dept
.
value
===
"f8fdf686-30ec-4e4c-ab60-d74ec8b98e3f"
)
{
addParams
.
value
.
gatherType
=
4
}
else
{
addParams
.
value
.
gatherType
=
1
}
http
.
post
(
"api/alarm/para/pipesave"
,
{
...
addParams
.
value
},
false
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
"总管新增成功!!"
)
...
...
@@ -691,14 +752,59 @@ const onAdd = () => {
}
}
// 按钮
const
button
=
ref
(
true
)
// 删除逻辑
const
onDel
=
()
=>
{
if
(
type
.
value
===
1
)
{
http
.
post
(
"api/alarm/para/pipedelete"
,
{
id
:
delId
.
value
},
false
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
"总管参数删除成功!!"
)
reset
()
getCnNames
()
}
else
{
ElMessage
.
error
(
"删除失败!!"
)
}
})
}
else
if
(
type
.
value
===
2
)
{
http
.
post
(
"api/alarm/para/boilerdelete"
,
{
id
:
delId
.
value
},
false
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
"锅炉参数删除成功!!"
)
getCnNames
()
reset
()
}
else
{
ElMessage
.
error
(
"删除失败!!"
)
}
})
}
else
{
http
.
post
(
"api/alarm/para/transdelete"
,
{
id
:
delId
.
value
},
false
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
"换热站参数删除成功!!"
)
getCnNames
()
reset
()
}
else
{
ElMessage
.
error
(
"删除失败!!"
)
}
})
}
}
// 关闭dialog清空数据
const
onClose
=
()
=>
{
type
.
value
=
""
dept
.
value
=
""
cnNames_before
.
value
=
""
cnNames_after
.
value
=
""
reset
()
param
.
value
.
cnName
=
""
}
onMounted
(()
=>
{
setContentHeight
();
window
.
addEventListener
(
'resize'
,
setContentHeight
);
})
onUnmounted
(()
=>
{
window
.
removeEventListener
(
'resize'
,
setContentHeight
);
...
...
@@ -841,6 +947,46 @@ table td {
}
.dialog {
width:
6
0%;
width:
7
0%;
}
// dialog中的滚动条
.scroll-table {
max-height: 400px;
overflow-y: auto;
}
// .scroll-table,
// .scroll-table .el-table__header-wrapper,
// .scroll-table .el-table__body-wrapper,
// .scroll-table .el-table__row,
// .scroll-table th,
// .scroll-table td {
// border: none !important;
// }
.scroll-table::-webkit-scrollbar {
width: 5px;
}
.scroll-table::-webkit-scrollbar-thumb {
background-color: #BFBFBF;
// border-radius: 1px;
}
.scroll-table::-webkit-scrollbar-track {
background-color: #f0f0f0;
}
.before-hover-column .cell:hover {
background-color: #CECECE;
color: white;
}
.after-hover-column .cell:hover {
background-color: #508EFF;
color: white;
}
</
style
>
\ No newline at end of file
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