Commit 1aaf7a8e authored by lvshibao's avatar lvshibao

group页面修改

parent 1fc67647
...@@ -602,6 +602,15 @@ class TasksApi(viewsets.ViewSet): ...@@ -602,6 +602,15 @@ class TasksApi(viewsets.ViewSet):
seats = paginator.page(1) seats = paginator.page(1)
except EmptyPage: except EmptyPage:
seats = paginator.page(paginator.num_pages) seats = paginator.page(paginator.num_pages)
agent_names = [x['agentName'] for x in seats]
seats_code_name_list = Seat.objects.filter(code__in=agent_names).values('code', 'name')
seats_code_name = dict()
for seat_code_name in seats_code_name_list:
seats_code_name[seat_code_name['code']] = seat_code_name['name']
for rule_dict in seats:
rule_dict['seatName'] = seats_code_name.get(rule_dict['agentName'], rule_dict['agentName'])
return Response({'code': 0, 'msg': 'success', 'count': total_count, 'data': seats.object_list}) return Response({'code': 0, 'msg': 'success', 'count': total_count, 'data': seats.object_list})
......
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
<el-table style='margin-top:-20px' :data="poptableData" height='300'> <el-table style='margin-top:-20px' :data="poptableData" height='300'>
<el-table-column prop="agentName" label="坐席id" width='190'></el-table-column> <el-table-column prop="agentName" label="坐席id" width='190'></el-table-column>
{# <el-table-column prop="customName" label="客户" width='190'></el-table-column>#} <el-table-column prop="seatName" label="坐席名称" width='190'></el-table-column>
<el-table-column prop="remainTime" label="通话时间(秒)"> <el-table-column prop="remainTime" label="通话时间(秒)">
{# <template slot-scope='scope'>#} {# <template slot-scope='scope'>#}
{# <span>{{formatSeconds(scope.row.remainTime)}}</span>#} {# <span>{{formatSeconds(scope.row.remainTime)}}</span>#}
......
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