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
ab166ebc
Commit
ab166ebc
authored
Mar 25, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据分析-地市质检成绩分析
parent
addb0f2d
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
261 additions
and
227 deletions
+261
-227
tasksapi.py
src/inspect_report/api/tasksapi.py
+9
-1
score.html
src/inspect_report/templates/inspect/score.html
+2
-2
score.js
static/inspect/js/score.js
+250
-224
No files found.
src/inspect_report/api/tasksapi.py
View file @
ab166ebc
...
@@ -36,12 +36,14 @@ class TasksApi(viewsets.ViewSet):
...
@@ -36,12 +36,14 @@ class TasksApi(viewsets.ViewSet):
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'data'
:
tasks
})
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'data'
:
tasks
})
@
action
([
'get'
],
detail
=
False
)
@
action
([
'get'
],
detail
=
False
)
@
get_account_info
def
seat
(
self
,
req
:
Request
):
def
seat
(
self
,
req
:
Request
):
"""
"""
获取坐席列表
获取坐席列表
:param req:
:param req:
:return:
:return:
"""
"""
username
=
req
.
data
.
get
(
'username'
,
''
)
task_id
=
req
.
GET
.
get
(
'task'
,
''
)
task_id
=
req
.
GET
.
get
(
'task'
,
''
)
start_date
=
req
.
GET
.
get
(
'start_date'
,
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
))
start_date
=
req
.
GET
.
get
(
'start_date'
,
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
))
end_date
=
req
.
GET
.
get
(
'end_date'
,
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
))
end_date
=
req
.
GET
.
get
(
'end_date'
,
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
))
...
@@ -50,12 +52,14 @@ class TasksApi(viewsets.ViewSet):
...
@@ -50,12 +52,14 @@ class TasksApi(viewsets.ViewSet):
session_condition
=
{
'create_date__gte'
:
q_start_date
,
'create_date__lt'
:
q_end_date
}
session_condition
=
{
'create_date__gte'
:
q_start_date
,
'create_date__lt'
:
q_end_date
}
if
task_id
:
if
task_id
:
session_condition
[
'task'
]
=
task_id
session_condition
[
'task'
]
=
task_id
if
username
in
name_list
:
session_condition
[
'task'
]
=
username
seats
=
SeatStat
.
objects
.
filter
(
**
session_condition
)
.
values
(
'agentName'
)
seats
=
SeatStat
.
objects
.
filter
(
**
session_condition
)
.
values
(
'agentName'
)
return_data
=
[]
return_data
=
[]
for
agent
in
seats
:
for
agent
in
seats
:
if
agent
not
in
return_data
:
if
agent
not
in
return_data
:
return_data
.
append
(
agent
)
return_data
.
append
(
agent
)
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'data'
:
return_data
})
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'data'
:
return_data
,
'username'
:
username
})
@
action
([
'post'
],
detail
=
False
)
@
action
([
'post'
],
detail
=
False
)
def
rule
(
self
,
req
:
Request
):
def
rule
(
self
,
req
:
Request
):
...
@@ -405,12 +409,14 @@ class TasksApi(viewsets.ViewSet):
...
@@ -405,12 +409,14 @@ class TasksApi(viewsets.ViewSet):
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'count'
:
total_count
,
'data'
:
return_data
})
return
Response
({
'code'
:
0
,
'msg'
:
'success'
,
'count'
:
total_count
,
'data'
:
return_data
})
@
action
([
'post'
],
detail
=
False
)
@
action
([
'post'
],
detail
=
False
)
@
get_account_info
def
seat_area
(
self
,
req
:
Request
):
def
seat_area
(
self
,
req
:
Request
):
"""
"""
地市坐席成绩分析
地市坐席成绩分析
:param req:
:param req:
:return:
:return:
"""
"""
username
=
req
.
data
.
get
(
'username'
,
''
)
task_id
=
req
.
data
.
get
(
'task'
,
''
)
task_id
=
req
.
data
.
get
(
'task'
,
''
)
agent_name
=
req
.
data
.
get
(
'agentName'
,
''
)
agent_name
=
req
.
data
.
get
(
'agentName'
,
''
)
page
=
req
.
data
.
get
(
'page'
,
'1'
)
page
=
req
.
data
.
get
(
'page'
,
'1'
)
...
@@ -423,6 +429,8 @@ class TasksApi(viewsets.ViewSet):
...
@@ -423,6 +429,8 @@ class TasksApi(viewsets.ViewSet):
task_condition
=
{
'create_date__gte'
:
q_start_date
,
'create_date__lt'
:
q_end_date
}
task_condition
=
{
'create_date__gte'
:
q_start_date
,
'create_date__lt'
:
q_end_date
}
if
task_id
:
if
task_id
:
task_condition
[
'task'
]
=
task_id
task_condition
[
'task'
]
=
task_id
if
username
in
name_list
:
task_condition
[
'task'
]
=
username
if
agent_name
:
if
agent_name
:
task_condition
[
'agentName'
]
=
agent_name
task_condition
[
'agentName'
]
=
agent_name
# , 'total_session', 'validate_num', 'validate_session', 'validate_zero'
# , 'total_session', 'validate_num', 'validate_session', 'validate_zero'
...
...
src/inspect_report/templates/inspect/score.html
View file @
ab166ebc
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
>
:default-time=
"['00:00:00', '23:59:59']"
>
</el-date-picker>
</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
<el-option
v-for=
"item in taskList"
v-for=
"item in taskList"
:key=
"item.id"
:key=
"item.id"
...
...
static/inspect/js/score.js
View file @
ab166ebc
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