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
7fbca840
Commit
7fbca840
authored
Jul 28, 2024
by
qjeslks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
7.28.2
parent
f6a5e883
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
60 deletions
+19
-60
AlarmStatusPage.vue
src/views/AlarmPage/AlarmStatusPage.vue
+19
-60
No files found.
src/views/AlarmPage/AlarmStatusPage.vue
View file @
7fbca840
...
...
@@ -11,7 +11,7 @@
</el-form-item>
<el-form-item
label=
"设备:"
>
<el-cascader
:options=
"options"
v-model=
"AlarmInfo"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
placeholder=
"请选择"
style=
"min-width: 210px;"
/>
placeholder=
"请选择"
style=
"min-width: 210px;"
@
change=
"getopt"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getdata"
style=
"min-width: 70px;"
>
查询
</el-button>
...
...
@@ -20,11 +20,11 @@
</el-card>
<el-card
class=
"moduleCard"
:height=
"tableHeight"
>
<el-table
:data=
"tableData"
:row-class-name=
"rowClassName"
:height=
"tableHeight"
v-loading=
"loading"
:cell-style=
"setCellStyle"
id=
"out-table"
border
highlight-current-row
:header-cell-style=
"setHeaderCellStyle"
@
sort-change=
"sortMethod"
:header-cell-class-name=
"handleHeadAddClass"
>
border
highlight-current-row
:header-cell-style=
"setHeaderCellStyle"
:header-cell-class-name=
"handleHeadAddClass"
>
<el-table-column
prop=
"index"
label=
"编号"
:sortable=
"false"
width=
"100px"
fixed
/>
<el-table-column
prop=
"name"
label=
"设施名称"
:sortable=
"
tru
e"
width=
"250px"
fixed
/>
<el-table-column
prop=
"name"
label=
"设施名称"
:sortable=
"
fals
e"
width=
"250px"
fixed
/>
<el-table-column
prop=
"cnName"
label=
"报警类型"
:sortable=
"false"
fixed
/>
<el-table-column
prop=
"gatherTime"
label=
"报警时间"
:sortable=
"
tru
e"
width=
"200px"
fixed
/>
<el-table-column
prop=
"gatherTime"
label=
"报警时间"
:sortable=
"
fals
e"
width=
"200px"
fixed
/>
<el-table-column
prop=
"topMost"
label=
"上上限"
:sortable=
"false"
width=
"200px"
fixed
>
<template
#
default=
"scope"
>
<div
class=
"div-form-img"
>
...
...
@@ -92,41 +92,6 @@
tableHeight
.
value
=
window
.
innerHeight
-
195
;
}
//获取排序的方法
function
sortMethod
({
order
,
prop
}){
// 触发的排序和缓存的排序相同时,取消该字段的排序
if
(
!
order
||
sortField
[
prop
]
===
order
)
{
sortField
[
prop
]
=
null
}
else
{
sortField
[
prop
]
=
order
}
// console.log(sortField)
let
sortname
=
""
;
let
sortnames
=
""
;
let
direction
=
''
;
for
(
const
i
in
sortField
)
{
if
(
sortField
[
i
]
==
'ascending'
)
{
direction
=
'ASC'
}
else
if
(
sortField
[
i
]
==
'descending'
)
{
direction
=
'DESC'
}
if
(
i
===
"name"
){
sortname
=
"name"
;
}
else
if
(
i
===
"alarmDate"
){
sortname
=
"alarmDate"
;
}
// console.log(sortname)
if
(
sortnames
===
""
){
sortnames
=
sortnames
+
sortname
+
" "
+
direction
;
}
else
{
sortnames
=
sortnames
+
","
+
sortname
+
" "
+
direction
;
}
AlarmInfo
.
sort
=
sortnames
;
}
console
.
log
(
AlarmInfo
.
sort
)
getdata
()
//调用后端查询接口
}
function
handleHeadAddClass
({
column
})
{
if
(
sortField
[
column
.
property
])
{
column
.
order
=
sortField
[
column
.
property
]
...
...
@@ -164,13 +129,11 @@
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
endTime
);
}
const
AlarmInfo
=
re
active
([])
const
AlarmInfo
=
re
f
([])
getSupplys
();
getdata
();
function
getdata
()
{
sessionStorage
.
setItem
(
"DeviceQueryStart"
,
AlarmInfo
.
startTime
);
sessionStorage
.
setItem
(
"DeviceQueryEnd"
,
AlarmInfo
.
endTime
);
gettransfer
();
}
...
...
@@ -190,7 +153,7 @@
function
getBoilers
(){
loading
.
value
=
true
;
tableData
.
length
=
0
;
AlarmInfo
.
length
=
0
;
AlarmInfo
.
value
=
[]
;
options
.
length
=
0
;
var
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
...
...
@@ -214,7 +177,7 @@
}
});
options
.
forEach
(
element
=>
{
AlarmInfo
.
push
(
element
.
value
);
AlarmInfo
.
value
.
push
(
element
.
value
);
})
}
}
...
...
@@ -223,7 +186,7 @@
function
getPipes
(){
loading
.
value
=
true
;
tableData
.
length
=
0
;
AlarmInfo
.
length
=
0
;
AlarmInfo
.
value
=
[]
;
var
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
options
.
length
=
0
;
...
...
@@ -243,9 +206,8 @@
}
});
}
console
.
log
(
options
);
options
.
forEach
(
element
=>
{
AlarmInfo
.
push
(
element
.
value
);
AlarmInfo
.
value
.
push
(
element
.
value
);
})
console
.
log
(
AlarmInfo
.
value
);
}
...
...
@@ -255,7 +217,7 @@
loading
.
value
=
true
;
tableData
.
length
=
0
;
options
.
length
=
0
;
AlarmInfo
.
length
=
0
;
AlarmInfo
.
value
=
[]
;
var
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
console
.
log
(
result
)
...
...
@@ -285,25 +247,18 @@
}
});
}
AlarmInfo
.
push
(
options
[
0
].
children
[
0
].
children
[
0
].
value
);
console
.
log
(
AlarmInfo
)
AlarmInfo
.
value
.
push
(
options
[
0
].
children
[
0
].
children
[
0
].
value
);
}
//获取数据列表
function
gettransfer
()
{
loading
.
value
=
true
;
if
(
currentPage
.
value
==
1
)
{
AlarmInfo
.
start
=
0
;
AlarmInfo
.
count
=
pageSize
.
value
;
}
else
{
AlarmInfo
.
start
=
((
currentPage
.
value
-
1
)
*
pageSize
.
value
)
+
1
;
AlarmInfo
.
count
=
pageSize
.
value
-
1
;
}
http
.
post
(
"/api/alarm/"
+
type
.
value
,
AlarmInfo
).
then
((
result
)
=>
{
console
.
log
(
result
.
data
);
http
.
post
(
"/api/alarm/"
+
type
.
value
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
console
.
log
(
result
);
console
.
log
(
AlarmInfo
.
value
);
if
(
result
.
data
!==
null
){
tableData
.
value
=
result
.
data
;
}
if
(
result
.
data
===
null
||
AlarmInfo
.
length
<
1
){
if
(
result
.
data
===
null
){
tableData
.
value
=
null
;
}
loading
.
value
=
false
;
...
...
@@ -328,6 +283,10 @@
return
css_color
;
}
function
getopt
(){
console
.
log
(
AlarmInfo
.
value
);
}
function
getImgUrl
(
scope
,
item
)
{
var
url
=
null
;
...
...
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