Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
event-analysis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔义雄
event-analysis
Commits
b9ca163b
Commit
b9ca163b
authored
Jun 02, 2020
by
Kerwin_Cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
翻页bug
parent
8cc061e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
24 deletions
+55
-24
event_analysis/views.py
event_analysis/views.py
+8
-16
templates/event_analysis/alarm_count.html
templates/event_analysis/alarm_count.html
+46
-7
templates/event_analysis/eventmanagement_display.html
templates/event_analysis/eventmanagement_display.html
+1
-1
No files found.
event_analysis/views.py
View file @
b9ca163b
...
...
@@ -2817,22 +2817,14 @@ def alarm_count_out(request):
data_list
=
[]
for
i
in
req
:
new_list
=
[]
# new_list.append(i.get(u'system'))
# new_list.append(i.get(u'total'))
# new_list.append(i.get(u'bad_work'))
# new_list.append(i.get(u'main_work'))
# new_list.append(i.get(u'normal_work'))
# new_list.append(i.get(u'bad_weekend'))
# new_list.append(i.get(u'main_weekend'))
# new_list.append(i.get(u'normal_weekend'))
new_list
.
append
(
i
[
0
])
new_list
.
append
(
i
[
1
])
new_list
.
append
(
i
[
2
])
new_list
.
append
(
i
[
3
])
new_list
.
append
(
i
[
4
])
new_list
.
append
(
i
[
5
])
new_list
.
append
(
i
[
6
])
new_list
.
append
(
i
[
7
])
new_list
.
append
(
i
.
get
(
u'system'
))
new_list
.
append
(
i
.
get
(
u'total'
))
new_list
.
append
(
i
.
get
(
u'bad_work'
))
new_list
.
append
(
i
.
get
(
u'main_work'
))
new_list
.
append
(
i
.
get
(
u'normal_work'
))
new_list
.
append
(
i
.
get
(
u'bad_weekend'
))
new_list
.
append
(
i
.
get
(
u'main_weekend'
))
new_list
.
append
(
i
.
get
(
u'normal_weekend'
))
data_list
.
append
(
new_list
)
workbook
=
xlwt
.
Workbook
(
encoding
=
'utf-8'
)
...
...
templates/event_analysis/alarm_count.html
View file @
b9ca163b
...
...
@@ -40,7 +40,7 @@
ref=
"table"
stripe
.
2
:header-cell-style=
"{background:'#409EFF',color:'white'}"
>
<el-table-column
type=
"selection"
width=
"
35
"
></el-table-column>
<el-table-column
type=
"selection"
width=
"
50
"
></el-table-column>
<el-table-column
width=
"200"
prop=
"system"
label=
"系统"
align=
"center"
></el-table-column>
<el-table-column
prop=
"total"
label=
"有效故障预警数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"bad_work"
label=
"严重故障预警数(交易日)"
align=
"center"
></el-table-column>
...
...
@@ -90,7 +90,7 @@
methods
:
{
searchList
()
{
searchList
(
fn
)
{
let
finallist
=
[]
if
(
this
.
sysGroup
&&
this
.
Group
){
for
(
let
temp
of
this
.
sysGroup
)
{
...
...
@@ -107,13 +107,21 @@
axios
.
post
(
'
${SITE_URL}alarm_count_info/
'
,
newdata
).
then
(
res
=>
{
this
.
AlarmCountData
=
res
.
data
.
results
;
this
.
total
=
res
.
data
.
count
if
(
!!
fn
)
{
fn
()
}
});
console
.
log
(
this
.
AlarmCountData
)
},
async
listOut
(){
let
eventList
=
[];
let
vm
=
this
;
for
(
let
i
in
this
.
selectData
)
{
eventList
=
eventList
.
concat
(
this
.
selectData
[
i
])
}
//console.log(!this.AlarmCountData.length)
if
(
!
this
.
selectData
.
length
){
if
(
!
eventList
.
length
){
vm
.
$message
(
{
type
:
'
error
'
,
...
...
@@ -131,8 +139,13 @@
},
out_data
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
post
(
'
${SITE_URL}alarm_count_out/
'
,
this
.
selectData
).
then
(
res
=>
{
let
eventList
=
[];
for
(
let
i
in
this
.
selectData
)
{
eventList
=
eventList
.
concat
(
this
.
selectData
[
i
])
}
axios
.
post
(
'
${SITE_URL}alarm_count_out/
'
,
eventList
).
then
(
res
=>
{
if
(
res
.
data
==
1
)
{
resolve
(
'
ok
'
)}
})
})
...
...
@@ -150,13 +163,39 @@
console
.
log
(
"
当前页
"
+
val
);
if
(
this
.
currentPage
!=
val
)
{
this
.
currentPage
=
val
this
.
searchList
()
this
.
searchList
(()
=>
{
this
.
handleCurPageChange
()
})
}
},
handleCurPageChange
()
{
let
arr
=
[];
if
(
!!
this
.
selectData
[
this
.
currentPage
])
{
this
.
selectData
[
this
.
currentPage
].
map
(
item
=>
{
arr
=
arr
.
concat
(
this
.
AlarmCountData
.
filter
(
item2
=>
{
return
item2
.
system
==
item
.
system
}))
})
}
console
.
log
(
arr
)
this
.
toggleSelection
(
arr
)
},
toggleSelection
(
rows
)
{
this
.
$nextTick
(()
=>
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
)
})
}
else
{
this
.
$refs
.
table
.
clearSelection
();
}
})
},
handleSelectionChange
(
selection
)
{
this
.
selectData
=
[];
this
.
selectData
[
this
.
currentPage
]
=
[];
selection
.
map
((
item
,
index
)
=>
{
this
.
selectData
.
push
([
item
.
system
,
item
.
total
,
item
.
bad_work
,
item
.
main_work
,
item
.
normal_work
,
item
.
bad_weekend
,
item
.
main_weekend
,
item
.
normal_weekend
]
)
this
.
selectData
[
this
.
currentPage
].
push
(
item
)
});
console
.
log
(
this
.
selectData
)
},
...
...
templates/event_analysis/eventmanagement_display.html
View file @
b9ca163b
...
...
@@ -176,7 +176,7 @@
:header-cell-style=
"{background:'#409EFF',color:'white'}"
>
<el-table-column
type=
"selection"
width=
"
35
"
></el-table-column>
<el-table-column
type=
"selection"
width=
"
50
"
></el-table-column>
<el-table-column
width=
"300"
prop=
"event_number"
label=
"事件编号"
header-align=
"center"
align=
"left"
></el-table-column>
<el-table-column
prop=
"summary"
label=
"摘要"
header-align=
"center"
align=
"left"
show-overflow-tooltip
></el-table-column>
<el-table-column
width=
"130"
prop=
"priority"
label=
"优先级"
align=
"center"
></el-table-column>
...
...
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