Commit fb1cff9b authored by lvshibao's avatar lvshibao

group页面修改

parent 8f44c252
...@@ -570,6 +570,7 @@ class TasksApi(viewsets.ViewSet): ...@@ -570,6 +570,7 @@ class TasksApi(viewsets.ViewSet):
{'code': 0, 'msg': 'success', 'count': total_count, 'data': seats.object_list}) {'code': 0, 'msg': 'success', 'count': total_count, 'data': seats.object_list})
@action(['post'], detail=False) @action(['post'], detail=False)
@before_request
def score_detail(self, req: Request): def score_detail(self, req: Request):
""" """
坐席得分列表 坐席得分列表
...@@ -577,19 +578,15 @@ class TasksApi(viewsets.ViewSet): ...@@ -577,19 +578,15 @@ class TasksApi(viewsets.ViewSet):
:return: :return:
""" """
agent_name = req.data.get('agentName', '') agent_name = req.data.get('agentName', '')
area = req.data.get('task', '')
page = req.data.get('page', '1') page = req.data.get('page', '1')
page_size = req.data.get('page_size', '10') page_size = req.data.get('page_size', '10')
start_date = req.data.get('start_date', (datetime.now() + timedelta(days=-1)).strftime('%Y-%m-%d')) session_condition = req.data.get('date_condition', {})
end_date = req.data.get('end_date', datetime.now().strftime('%Y-%m-%d')) team = req.data.get('team', '')
q_start_date = datetime.strptime(start_date, '%Y-%m-%d').date()
q_end_date = (datetime.strptime(end_date, '%Y-%m-%d') + timedelta(days=1)).date()
session_condition = {'create_date__gte': q_start_date, 'create_date__lt': q_end_date}
if agent_name: if agent_name:
session_condition['agentName'] = agent_name session_condition['agentName'] = agent_name
if area: if team:
session_condition['task'] = area session_condition['task'] = team
checks = RulesStat.objects.filter(**session_condition) \ checks = RulesStat.objects.filter(**session_condition) \
.extra(select={'sessionCollectionId': 'sessionCollectionId'}) \ .extra(select={'sessionCollectionId': 'sessionCollectionId'}) \
......
...@@ -204,17 +204,17 @@ new Vue({ ...@@ -204,17 +204,17 @@ new Vue({
this.poprule = data.rule; this.poprule = data.rule;
this.popcurrentPage = 1; this.popcurrentPage = 1;
this.poppage = 1; this.poppage = 1;
this.taskvalue = tableData.area; this.teamvalue = tableData.area;
this.getDetail(this.teamvalue,this.start_date,this.end_date,this.poptables,this.poprule, this.poppage, this.poppagesize); this.getDetail(this.teamvalue,this.start_date,this.end_date,this.poptables,this.poprule, this.poppage, this.poppagesize);
this.dialogTableVisible = true; this.dialogTableVisible = true;
}, },
getDetail(task,start_date,end_date, tables, rule, page, page_size){ getDetail(team,start_date,end_date, tables, rule, page, page_size){
//this.getRule(this.taskvalue,this.start_date,this.end_date,this.takevalue); // 获取统计数据 //this.getRule(this.taskvalue,this.start_date,this.end_date,this.takevalue); // 获取统计数据
let that = this; let that = this;
//this.$loading({text:'数据加载中...'}); //this.$loading({text:'数据加载中...'});
this.poploading = true; this.poploading = true;
RquestsPost('api/v1/tasks/score_detail/',{task,end_date,start_date,tables,rule,page,page_size}).then(data => { RquestsPost('api/v1/tasks/score_detail/',{team,end_date,start_date,tables,rule,page,page_size}).then(data => {
console.log(data.data); console.log(data.data);
if(data.code != 0){ if(data.code != 0){
that.$message(data.msg); 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