Commit 0baffde9 authored by lvshibao's avatar lvshibao

seat页面修改

parent 5afabee8
......@@ -188,7 +188,7 @@ class TasksApi(viewsets.ViewSet):
"""
city_id = req.GET.get('city', None)
country_id = req.GET.get('country', None)
agent_name = req.data.get('agentName', '')
agent_name = req.data.get('seat', '')
sort = req.data.get('sort', 'des')
page = req.data.get('page', '1')
page_size = req.data.get('page_size', '10')
......@@ -200,6 +200,7 @@ class TasksApi(viewsets.ViewSet):
if agent_name != '' and agent_name is not None:
task_condition['agentName'] = agent_name
print(task_condition)
if sort == 'des':
seats = SeatStat.objects.filter(**task_condition).extra(select={'agentName': 'agentName'}) \
.values('agentName').annotate(remainTime=Sum('remainTime'), validate_session=Sum('validate_session'),
......
......@@ -127,13 +127,13 @@ new Vue({
}
this.getRule(this.cityvalue, this.countryvalue, this.start_date, this.end_date, this.seatvalue); // 获取统计数据
},
getRule(city, country, start_date, end_date, agentName) {
getRule(city, country, start_date, end_date, seat) {
let that = this;
let page = this.currentPage;
let arr = [];
this.$loading({text: '数据加载中...'});
let sort = this.sortObj.sort;
RquestsPost('api/v1/tasks/seat_rule/', {city, country, start_date, end_date, agentName, page, sort}).then(data => {
RquestsPost('api/v1/tasks/seat_rule/', {city, country, start_date, end_date, seat, page, sort}).then(data => {
console.log(data.data);
if (data.code != 0) {
that.$message(data.msg);
......
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