Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
inspect_report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengjinlei
inspect_report
Commits
addb0f2d
Commit
addb0f2d
authored
Mar 25, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据分析-违规坐席分析
parent
23d0d818
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
172 additions
and
161 deletions
+172
-161
tasksapi.py
src/inspect_report/api/tasksapi.py
+5
-1
seat.html
src/inspect_report/templates/inspect/seat.html
+1
-1
seat.js
static/inspect/js/seat.js
+166
-159
No files found.
src/inspect_report/api/tasksapi.py
View file @
addb0f2d
...
...
@@ -179,12 +179,14 @@ class TasksApi(viewsets.ViewSet):
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'data'
:
data_max_return
})
@
action
([
'post'
],
detail
=
False
)
@
get_account_info
def
seat_rule
(
self
,
req
:
Request
):
"""
坐席违规分析-按照得分
:param req:
:return:
"""
username
=
req
.
data
.
get
(
'username'
,
''
)
task_id
=
req
.
data
.
get
(
'task'
,
''
)
agent_name
=
req
.
data
.
get
(
'agentName'
,
''
)
sort
=
req
.
data
.
get
(
'sort'
,
'des'
)
...
...
@@ -197,6 +199,8 @@ class TasksApi(viewsets.ViewSet):
task_condition
=
{
'create_date__gte'
:
q_start_date
,
'create_date__lt'
:
q_end_date
}
if
task_id
:
task_condition
[
'task'
]
=
task_id
if
username
in
name_list
:
task_condition
[
'task'
]
=
username
if
agent_name
:
task_condition
[
'agentName'
]
=
agent_name
if
sort
==
'des'
:
...
...
@@ -232,7 +236,7 @@ class TasksApi(viewsets.ViewSet):
for
i
in
range
(
len
(
data_sort
)):
data_sort
[
i
][
'ranking'
]
=
(
int
(
page
)
-
1
)
*
int
(
page_size
)
+
i
+
1
data_sort
[
i
][
'ratio'
]
=
'{0}
%
'
.
format
(
int
(
data_sort
[
i
][
'ratio'
]
*
100
))
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'count'
:
total_count
,
'data'
:
data_sort
})
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'count'
:
total_count
,
'data'
:
data_sort
,
'username'
:
username
})
@
action
([
'post'
],
detail
=
False
)
@
get_account_info
...
...
src/inspect_report/templates/inspect/seat.html
View file @
addb0f2d
...
...
@@ -24,7 +24,7 @@
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
>
</el-date-picker>
<el-select
v-model=
"taskvalue"
filterable
placeholder=
"请选择"
@
change=
"changeTask"
>
<el-select
v-
if=
"sel_is_show == true"
v-
model=
"taskvalue"
filterable
placeholder=
"请选择"
@
change=
"changeTask"
>
<el-option
v-for=
"item in taskList"
:key=
"item.id"
...
...
static/inspect/js/seat.js
View file @
addb0f2d
This diff is collapsed.
Click to expand it.
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