Commit 52304b50 authored by Kerwin_Cui's avatar Kerwin_Cui

2

parent 5ea52b63
...@@ -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:
......
...@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment