Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IT-monitor
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
张伯涛
IT-monitor
Commits
8aff47fb
Commit
8aff47fb
authored
May 30, 2022
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 最终修改
parent
ac68c7a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
12 deletions
+44
-12
warningFaultLog.vue
src/views/IntegratedMonitor/warning/warningFaultLog.vue
+44
-12
No files found.
src/views/IntegratedMonitor/warning/warningFaultLog.vue
View file @
8aff47fb
...
...
@@ -18,12 +18,25 @@
:data=
"tableData1"
border
style=
"width: 100%;padding-top: 20px"
>
<el-table-column
label=
"级别"
prop=
"level"
show-overflow-tooltip
/>
<el-table-column
label=
"级别"
prop=
"level"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.level === '2级(危险)'"
class=
"st-square"
style=
"background-color: #eb5d5d;"
/>
<span
v-if=
"scope.row.level === '1级'"
class=
"st-square"
style=
"background-color: #edb845;"
/>
{{
scope
.
row
.
level
}}
</
template
>
</el-table-column>
<el-table-column
label=
"设备名称"
prop=
"devName"
show-overflow-tooltip
/>
<el-table-column
label=
"监测点"
prop=
"monPoint"
show-overflow-tooltip
/>
<el-table-column
label=
"次数"
prop=
"times"
show-overflow-tooltip
width=
"90"
/>
<el-table-column
label=
"开始时间"
prop=
"startTime"
show-overflow-tooltip
/>
<el-table-column
label=
"持续时间"
prop=
"duration"
show-overflow-tooltip
/>
<el-table-column
label=
"持续时间"
prop=
"duration"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"judgeTime(scope.row.duration) === '2'"
class=
"st-square"
style=
"background-color: #eb5d5d;"
/>
<span
v-if=
"judgeTime(scope.row.duration) === '1'"
class=
"st-square"
style=
"background-color: #edb845;"
/>
<span
v-if=
"judgeTime(scope.row.duration) === '3'"
class=
"st-square"
style=
"background-color: black;"
/>
{{
scope
.
row
.
duration
}}
</
template
>
</el-table-column>
</el-table>
</div>
<el-dialog
class=
"customClass"
width=
"50%"
title=
"查询时间"
:visible
.
sync=
"customDialog"
@
close=
"closeCustomDialog"
>
...
...
@@ -81,7 +94,7 @@ export default {
devName
:
'测试设备1'
,
monPoint
:
'1号监测点'
,
times
:
'2'
,
duration
:
'133
天
'
,
duration
:
'133
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -89,7 +102,7 @@ export default {
devName
:
'测试设备2'
,
monPoint
:
''
,
times
:
'3'
,
duration
:
'32
天
'
,
duration
:
'32
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -97,7 +110,7 @@ export default {
devName
:
'测试设备3'
,
monPoint
:
''
,
times
:
'1'
,
duration
:
'1
56天
'
,
duration
:
'1
1小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -105,7 +118,7 @@ export default {
devName
:
'测试设备4'
,
monPoint
:
''
,
times
:
'2'
,
duration
:
'7
天
'
,
duration
:
'7
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -113,7 +126,7 @@ export default {
devName
:
'测试设备5'
,
monPoint
:
'2号监测点'
,
times
:
'2'
,
duration
:
'
56天
'
,
duration
:
'
16小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -121,7 +134,7 @@ export default {
devName
:
'测试设备6'
,
monPoint
:
''
,
times
:
'2'
,
duration
:
'
56天
'
,
duration
:
'
19小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -129,7 +142,7 @@ export default {
devName
:
'测试设备7'
,
monPoint
:
'1号监测点'
,
times
:
'5'
,
duration
:
'55
天
'
,
duration
:
'55
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -137,7 +150,7 @@ export default {
devName
:
'测试设备1'
,
monPoint
:
''
,
times
:
'6'
,
duration
:
'146
天
'
,
duration
:
'146
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -145,7 +158,7 @@ export default {
devName
:
'测试设备4'
,
monPoint
:
'3号监测点'
,
times
:
'4'
,
duration
:
'67
6天
'
,
duration
:
'67
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
},
{
...
...
@@ -153,7 +166,7 @@ export default {
devName
:
'测试设备7'
,
monPoint
:
'6号监测点'
,
times
:
'9'
,
duration
:
'34
5天
'
,
duration
:
'34
小时
'
,
startTime
:
moment
(
Date
()).
format
(
'YYYY-MM-DD HH:mm'
)
}
],
...
...
@@ -220,6 +233,18 @@ export default {
this
.
customDialog
=
true
}
},
judgeTime
(
duration
)
{
const
time
=
duration
var
result
=
parseInt
(
time
.
replace
(
'小时'
,
''
))
console
.
log
(
result
,
'result'
)
if
(
result
<
12
)
{
return
'1'
}
else
if
(
result
>=
12
&&
result
<
24
)
{
return
'2'
}
else
if
(
result
>=
24
)
{
return
'3'
}
},
changeTime
(
row
,
column
)
{},
exportWarning
()
{
this
.
$confirm
(
'是否导出数据'
,
'提示'
,
{
...
...
@@ -238,6 +263,13 @@ export default {
<
style
lang=
"scss"
>
.warnModule
{
.st-square
{
cursor
:
pointer
;
margin-right
:
6px
;
width
:
9px
;
height
:
9px
;
display
:
inline-block
;
}
.strategyRow
{
padding
:
5px
0
;
}
...
...
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