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
52304b50
Commit
52304b50
authored
May 12, 2020
by
Kerwin_Cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
5ea52b63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
event_analysis/views.py
event_analysis/views.py
+2
-2
templates/event_analysis/alarm_count.html
templates/event_analysis/alarm_count.html
+10
-5
No files found.
event_analysis/views.py
View file @
52304b50
...
@@ -2543,7 +2543,7 @@ def search_alarm(request):
...
@@ -2543,7 +2543,7 @@ def search_alarm(request):
def
alarm_count_info
(
request
):
def
alarm_count_info
(
request
):
try
:
try
:
#
req = json.loads(request.body)
req
=
json
.
loads
(
request
.
body
)
alarm_list
=
Error_alarm
.
objects
.
all
()
alarm_list
=
Error_alarm
.
objects
.
all
()
result
=
{}
result
=
{}
for
alarm
in
alarm_list
:
for
alarm
in
alarm_list
:
...
@@ -2596,7 +2596,7 @@ def alarm_count_info(request):
...
@@ -2596,7 +2596,7 @@ def alarm_count_info(request):
"result"
:
True
,
"result"
:
True
,
"code"
:
0
,
"code"
:
0
,
"message"
:
u"查询成功!"
,
"message"
:
u"查询成功!"
,
"data"
:
{}
"data"
:
{
'results'
:
data_list
,
'count'
:
event_page
.
count
,
'currentPage'
:
current_page
}
}
}
)
)
except
Exception
as
e
:
except
Exception
as
e
:
...
...
templates/event_analysis/alarm_count.html
View file @
52304b50
...
@@ -78,7 +78,8 @@
...
@@ -78,7 +78,8 @@
loading
:
false
,
loading
:
false
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
time
:
''
time
:
''
,
total
:
0
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -89,10 +90,14 @@
...
@@ -89,10 +90,14 @@
methods
:
{
methods
:
{
searchList
(){
searchList
(){
axios
.
get
(
'
${SITE_URL}alarm_count_info/
'
,{
'
currentPage
'
:
this
.
currentPage
,
let
newdata
=
{
'
pageSize
'
:
pageSize
}).
then
(
res
=>
{
currentPage
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
this
.
AlarmCountData
=
res
[
'
data
'
]
};
axios
.
post
(
'
${SITE_URL}alarm_count_info/
'
,
newdata
).
then
(
res
=>
{
console
.
log
(
res
.
data
.
results
)
this
.
AlarmCountData
=
res
.
data
.
results
;
this
.
total
=
res
.
data
.
count
})
})
},
},
getUserGroup
()
{
getUserGroup
()
{
...
...
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