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
410c43a0
Commit
410c43a0
authored
Dec 19, 2019
by
zhengjinlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加报表
parent
f917478d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
402 additions
and
220 deletions
+402
-220
tasksapi.py
src/inspect_report/api/tasksapi.py
+1
-1
group.html
src/inspect_report/templates/inspect/group.html
+23
-11
rule.html
src/inspect_report/templates/inspect/rule.html
+116
-18
score.html
src/inspect_report/templates/inspect/score.html
+78
-9
all.js
static/inspect/js/all.js
+115
-166
groupOverview.js
static/inspect/js/groupOverview.js
+13
-10
mutiHeadTable.js
static/inspect/js/mutiHeadTable.js
+3
-2
score.js
static/inspect/js/score.js
+53
-3
No files found.
src/inspect_report/api/tasksapi.py
View file @
410c43a0
...
...
@@ -573,7 +573,7 @@ class TasksApi(viewsets.ViewSet):
:return:
"""
agent_name
=
req
.
data
.
get
(
'agentName'
,
''
)
area
=
req
.
data
.
get
(
'
area
'
,
''
)
area
=
req
.
data
.
get
(
'
task
'
,
''
)
page
=
req
.
data
.
get
(
'page'
,
'1'
)
page_size
=
req
.
data
.
get
(
'page_size'
,
'10'
)
start_date
=
req
.
data
.
get
(
'start_date'
,
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
))
...
...
src/inspect_report/templates/inspect/group.html
View file @
410c43a0
...
...
@@ -173,33 +173,45 @@
<div
id=
'main'
style=
'width:100%;padding-bottom:20px'
>
<el-table
:data=
"tableData
.slice((currentPage-1)*pagesize,currentPage*pagesize)
"
:data=
"tableData"
border
style=
"width: 100%;margin-bottom:20px;"
>
<el-table-column
prop=
"
rule
"
label=
"
违规项
"
prop=
"
area
"
label=
"
地市
"
>
</el-table-column>
<el-table-column
prop=
"count"
label=
"违规次数"
width=
"180"
>
prop=
"total_session"
label=
"全部会话数"
>
</el-table-column>
<el-table-column
prop=
"validate_num"
label=
"触发违规项次数"
>
</el-table-column>
<el-table-column
prop=
"avg_score_svc"
label=
"服务类平均分"
>
</el-table-column>
<el-table-column
prop=
"avg_score_bus"
label=
"业务类平均分"
>
</el-table-column>
<el-table-column
prop=
"
call_count
"
label=
"
通话次数
"
>
prop=
"
avg_score
"
label=
"
总平均分(包含0分项)
"
>
</el-table-column>
<el-table-column
prop=
"
rati
o"
label=
"
违规占比
"
>
prop=
"
validate_zer
o"
label=
"
触发0分项次数
"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<template
slot-scope=
"scope"
>
<el-button
@
click.native.prevent=
"rowDetail(scope.$index,
tableData
)"
@
click.native.prevent=
"rowDetail(scope.$index,
scope.row
)"
type=
"text"
size=
"small"
>
详情
...
...
src/inspect_report/templates/inspect/rule.html
View file @
410c43a0
...
...
@@ -8,15 +8,74 @@
<link
rel=
"stylesheet"
href=
"{% static "
inspect
/
css
/
element
.
css
"
%}"
>
<!-- 引入组件库 -->
<link
rel=
'stylesheet'
type=
'text/css'
href=
"{% static "
inspect
/
css
/
all
.
css
"
%}"
>
<style>
#OneTime
{
display
:
inline-block
;
}
#OneTime
.el-input__icon
{
line-height
:
32px
;
}
#OneTime
.el-input
.el-input__inner
{
padding-left
:
30px
;
}
.groutTitle
span
{
display
:
inline-block
;
margin-right
:
20px
;
color
:
#565656
;
font-size
:
15px
;
}
.groutTitle
{
display
:
flex
;
flex-direction
:
row
;
margin-bottom
:
20px
;
margin-top
:
10px
;
}
.groutTitle
>
div
{
order
:
1
;
flex-grow
:
1
;
background-color
:
#fff
;
}
.groutTitle
>
div
:nth-child
(
2
)
{
margin
:
0
10px
;
}
.groutTitle
>
div
:last-child
{
margin-left
:
10px
;
}
.groutTitle
.grid-content
{
padding
:
20px
;
}
.groutTitle
.grid-content
.icon
{
font-size
:
30px
;
margin-right
:
10px
;
}
.groutTitle
.grid-content
div
{
display
:
inline-block
;
vertical-align
:
middle
;
}
.groutTitle
.grid-content
.content-value
{
font-size
:
30px
;
}
#main
{
background-color
:
#fff
;
}
.el-dialog
{
width
:
700px
}
.is-fullscreen
{
//
z-index
:
2222
!important
;
}
#dialogDetail
.el-table
{
//
min-height
:
500px
;
}
</style>
</head>
<body
style=
'height:100%'
>
<div
class=
'child-title'
>
语音坐席
</div>
<div
class=
'child-main'
id=
'childApp'
>
<div
style=
'text-align:right;'
class=
'childTitle'
>
<div
style=
'text-align:right;
margin-bottom:15px;
'
class=
'childTitle'
>
<div
class=
'childTitleName'
>
违规项分析
</div>
<el-date-picker
v-model=
"dateRange"
...
...
@@ -36,23 +95,58 @@
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"takevalue"
filterable
placeholder=
"请选择"
@
change=
'changeTake'
>
<el-option
label=
"全部坐席"
value=
""
>
</el-option>
<el-option
v-for=
"item in takeList"
:key=
"item.agentName"
:label=
"item.agentName"
:value=
"item.agentName"
>
</el-option>
</el-select>
</div>
<div
id=
'main'
style=
'width:80%;height:600px'
v-loading=
'true'
></div>
<el-dialog
title=
"详情"
v-loading=
'poploading'
width=
'700px'
:visible.sync=
"dialogTableVisible"
>
<div
id=
'main'
style=
'width:100%;padding-bottom:20px'
>
<el-table
style=
'margin-top:-20px'
:data=
"tableData"
height=
'400'
>
<el-table
:data=
"tableData"
border
style=
"width: 100%;margin-bottom:20px;"
>
<el-table-column
prop=
"rule"
label=
"违规项"
>
</el-table-column>
<el-table-column
prop=
"count"
label=
"违规次数"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"call_count"
label=
"通话次数"
>
</el-table-column>
<el-table-column
prop=
"ratio"
label=
"违规占比"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<template
slot-scope=
"scope"
>
<el-button
@
click.native.prevent=
"rowDetail(scope.$index, tableData)"
type=
"text"
size=
"small"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
<!--
<el-pagination
@current-change='CurrentChange'
style='margin: 0 auto;text-align:center;margin-bottom:20px;'
layout="prev, pager, next"
:hide-on-single-page="isHidePage"
background
:total="total">
</el-pagination>
-->
</div>
<el-dialog
id=
'dialogDetail'
v-loading=
'poploading'
title=
"详情"
:visible.sync=
"dialogTableVisible"
>
<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=
"customName"
label=
"客户"
width=
'190'
></el-table-column>
<el-table-column
prop=
"remainTime"
label=
"通话时间(秒)"
>
...
...
@@ -76,7 +170,11 @@
:page-size=
"poppagesize"
:total=
"poptotal"
>
</el-pagination>
</el-dialog>
</div>
</div>
<script
type=
"text/javascript"
>
window
.
onload
=
function
(){
...
...
src/inspect_report/templates/inspect/score.html
View file @
410c43a0
...
...
@@ -24,11 +24,12 @@
.groutTitle
span
{
display
:
inline-block
;
margin-right
:
20px
;
color
:
#565656
;
font-size
:
15px
;
}
.groutTitle
button
{
color
:
#409EFF
!important
;
}
.groutTitle
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
margin-bottom
:
20px
;
margin-top
:
10px
;
...
...
@@ -39,13 +40,13 @@
background-color
:
#fff
;
}
.groutTitle
>
div
:nth-child
(
2
)
{
margin
:
0
10px
;
margin
:
0
10px
;
}
.groutTitle
.grid-content
{
padding
:
20px
;
}
.groutTitle
.grid-content
.icon
{
font-size
:
30px
;
font-size
:
30px
;
margin-right
:
10px
;
}
.groutTitle
.grid-content
div
{
...
...
@@ -53,7 +54,7 @@
vertical-align
:
middle
;
}
.groutTitle
.grid-content
.content-value
{
font-size
:
30px
;
font-size
:
30px
;
}
#main
{
background-color
:
#fff
;
...
...
@@ -71,6 +72,9 @@
//
padding
:
0
;
//
height
:
30px
;
}
.el-dialog
{
width
:
700px
}
</style>
</head>
<body
style=
'height:100%'
>
...
...
@@ -139,18 +143,55 @@
<el-table-column
prop=
"area"
label=
"地市"
width=
"
2
50"
>
width=
"
1
50"
>
</el-table-column>
<el-table-column
prop=
"agentName"
label=
"工号"
width=
"250"
>
label=
"坐席工号"
width=
""
>
</el-table-column>
<el-table-column
prop=
"total_session"
label=
"全部会话数"
width=
""
>
</el-table-column>
<el-table-column
prop=
"validate_num"
label=
"触发违规项次数"
>
</el-table-column>
<el-table-column
prop=
"avg_score_svc"
label=
"服务类平均分"
>
</el-table-column>
<el-table-column
prop=
"avg_score_bus"
label=
"业务类平均分"
>
</el-table-column>
<el-table-column
prop=
"avg_score"
label=
"平均分"
>
</el-table-column>
<el-table-column
prop=
"validate_zero"
label=
"触发0分项次数"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<template
slot-scope=
"scope"
>
<el-button
@
click.native.prevent=
"rowDetail(scope.$index, scope.row)"
type=
"text"
size=
"small"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
...
...
@@ -162,6 +203,34 @@
:total=
"total"
>
</el-pagination>
<el-button
v-if=
'isscrollTop'
@
click=
'backTop'
id=
'backTop'
type=
"warning"
icon=
"el-icon-upload2"
circle
></el-button>
<el-dialog
id=
'dialogDetail'
v-loading=
'poploading'
title=
"详情"
:visible.sync=
"dialogTableVisible"
>
<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=
"customName"
label=
"客户"
width=
'190'
></el-table-column>
<el-table-column
prop=
"remainTime"
label=
"通话时间(秒)"
>
{#
<template
slot-scope=
'scope'
>
#}
{#
<span>
{{formatSeconds(scope.row.remainTime)}}
</span>
#}
{#
</template>
#}
</el-table-column>
<el-table-column
prop=
"score"
label=
"分数"
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
'scope'
>
<el-button
type=
'text'
size=
"mini"
@
click=
"handleTableDetail(scope.$index, scope.row)"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@
current-change=
'popCurrentChange'
style=
'margin: 0 auto;text-align:center;margin-bottom:20px;'
layout=
"prev, pager, next"
:current-page.sync=
'popcurrentPage'
background
:page-size=
"poppagesize"
:total=
"poptotal"
>
</el-pagination>
</el-dialog>
</div>
<script
type=
"text/javascript"
>
window
.
onload
=
function
(){
...
...
static/inspect/js/all.js
View file @
410c43a0
This diff is collapsed.
Click to expand it.
static/inspect/js/groupOverview.js
View file @
410c43a0
...
...
@@ -45,17 +45,17 @@ new Vue({
changeRange
(
dateRange
){
this
.
start_date
=
dateRange
[
0
];
this
.
end_date
=
dateRange
[
1
];
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
},
changeTask
(
msg
){
console
.
log
(
msg
);
this
.
taskvalue
=
msg
;
this
.
getTake
()
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
},
changeTake
(
msg
){
this
.
takevalue
=
msg
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
console
.
log
(
msg
);
},
getTask
(){
...
...
@@ -105,18 +105,20 @@ new Vue({
},
CurrentChange
(
page
){
this
.
currentPage
=
page
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
},
popCurrentChange
(
page
){
this
.
poppage
=
page
;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
);
},
getRule
(
task
,
start_date
,
end_date
,
agentName
){
getRule
(
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
){
let
that
=
this
;
console
.
log
(
start_date
,
end_date
);
let
arr
=
[];
this
.
$loading
({
text
:
'
数据加载中...
'
});
RquestsPost
(
'
api/v1/tasks/static_
rule/
'
,{
task
,
end_date
,
start_date
,
agentNam
e
}).
then
(
data
=>
{
RquestsPost
(
'
api/v1/tasks/static_
score/
'
,{
task
,
end_date
,
start_date
,
agentName
,
page
,
page_siz
e
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
...
...
@@ -135,7 +137,7 @@ new Vue({
// arr.unshift([data.data[key],key])
//}
this
.
tableData
=
data
.
data
;
this
.
total
=
data
.
data
.
length
;
this
.
total
=
data
.
count
;
this
.
isHidePage
=
!
(
data
.
data
.
length
>
0
);
this
.
$loading
().
close
();
})
...
...
@@ -162,15 +164,16 @@ new Vue({
return
date
.
getFullYear
()
+
"
-
"
+
(
date
.
getMonth
()
+
1
)
+
"
-
"
+
date
.
getDate
();
},
rowDetail
(
index
,
tableData
){
let
data
=
tableData
[
index
+
(
this
.
currentPage
-
1
)
*
this
.
pagesize
]
;
let
data
=
tableData
;
console
.
log
(
data
);
//this.poptableData = tableData[index].details;
this
.
poptables
=
data
.
tables
;
this
.
poprule
=
data
.
rule
;
this
.
taskvalue
=
data
.
area
;
this
.
popcurrentPage
=
1
;
this
.
poppage
=
1
;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
);
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
);
this
.
dialogTableVisible
=
true
;
},
...
...
@@ -179,7 +182,7 @@ new Vue({
let
that
=
this
;
//this.$loading({text:'数据加载中...'});
this
.
poploading
=
true
;
RquestsPost
(
'
api/v1/tasks/
rul
e_detail/
'
,{
task
,
end_date
,
start_date
,
tables
,
rule
,
page
,
page_size
}).
then
(
data
=>
{
RquestsPost
(
'
api/v1/tasks/
scor
e_detail/
'
,{
task
,
end_date
,
start_date
,
tables
,
rule
,
page
,
page_size
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
...
...
@@ -233,7 +236,7 @@ new Vue({
this
.
getTask
();
// 获取任务
//this.getTake(); // 获取坐席
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
}
},
...
...
static/inspect/js/mutiHeadTable.js
View file @
410c43a0
...
...
@@ -33,7 +33,7 @@ new Vue({
wgzlf
:
'
13
'
,
mgc
:
'
14
'
,
},
{
createdAt
:
'
质检考核
项目编号
'
,
createdAt
:
'
质检考核
权重
'
,
fwyy
:
'
10%
'
,
kcb
:
'
10%
'
,
jsy
:
'
5%
'
,
...
...
@@ -127,7 +127,8 @@ new Vue({
},
getTake
(){
let
that
=
this
;
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
).
then
(
data
=>
{
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
+
'
&start_date=
'
+
this
.
start_date
+
'
&end_date=
'
+
this
.
end_date
).
then
(
data
=>
{
//RquestsGet('api/v1/tasks/seat/?task=' + that.taskvalue).then(data => {
//console.log(data);
if
(
data
.
code
!=
0
){
...
...
static/inspect/js/score.js
View file @
410c43a0
...
...
@@ -15,12 +15,22 @@ new Vue({
takevalue
:
''
,
loading
:
true
,
tableData
:
[],
poploading
:
false
,
currentPage
:
1
,
page
:
1
,
page_size
:
10
,
pagesize
:
10
,
total
:
10
,
isHidePage
:
true
,
dialogTableVisible
:
false
,
poptableData
:
[],
popcurrentPage
:
1
,
poptables
:
''
,
poppage
:
1
,
poppagesize
:
10
,
poptotal
:
10
,
poprule
:
''
,
agentName
:
''
,
}
},
mounted
()
{
...
...
@@ -73,12 +83,11 @@ new Vue({
},
getRule
(
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
){
let
that
=
this
;
// 获取表格数据
this
.
$loading
({
text
:
'
数据加载中...
'
});
RquestsPost
(
'
api/v1/tasks/seat_area/
'
,{
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
}).
then
(
data
=>
{
if
(
data
.
code
!=
0
){
//that.takeList = [{agentName:'全部坐席'}]
}
else
{
that
.
tableData
=
data
.
data
;
this
.
total
=
data
.
count
;
...
...
@@ -89,7 +98,7 @@ new Vue({
},
getTake
(){
let
that
=
this
;
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
).
then
(
data
=>
{
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
+
'
&start_date=
'
+
this
.
start_date
+
'
&end_date=
'
+
this
.
end_date
).
then
(
data
=>
{
//console.log(data);
if
(
data
.
code
!=
0
){
...
...
@@ -139,6 +148,47 @@ new Vue({
this
.
currentPage
=
page
;
this
.
page
=
page
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
page
,
this
.
page_size
);
// 获取统计数据
},
rowDetail
(
index
,
tableData
){
this
.
agentName
=
tableData
.
agentName
;
this
.
taskvalue
=
tableData
.
area
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
,
this
.
agentName
);
},
popCurrentChange
(
page
){
this
.
poppage
=
page
;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
,
this
.
agentName
);
},
getDetail
(
task
,
start_date
,
end_date
,
tables
,
rule
,
page
,
page_size
,
agentName
){
let
that
=
this
;
this
.
$loading
({
text
:
'
数据加载中...
'
});
this
.
poploading
=
true
;
RquestsPost
(
'
api/v1/tasks/score_detail/
'
,{
task
,
end_date
,
start_date
,
tables
,
rule
,
page
,
page_size
,
agentName
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
this
.
dialogTableVisible
=
true
;
this
.
$loading
().
close
();
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
//that.titleInfo = data.data;
that
.
poptotal
=
data
.
count
;
that
.
poptableData
=
data
.
data
;
//this.$loading().close();
this
.
poploading
=
false
;
})
},
handleTableDetail
(
index
,
msg
){
let
url
=
"
/quality/audio/check-detail/
"
+
msg
.
sessionCollectionId
+
"
/
"
+
msg
.
taskId
+
"
?from=checkTask&sessionId=
"
+
msg
.
sessionId
;
console
.
log
(
url
);
let
autoMessage
=
{
jumplink
:
url
};
window
.
parent
.
postMessage
(
autoMessage
,
'
*
'
);
},
init
(){
this
.
dateRange
=
[
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
),
new
Date
()];
...
...
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