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
dbce6d71
Commit
dbce6d71
authored
Jan 08, 2020
by
zhengjinlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加导出按钮
parent
7dd3c6c4
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1038 additions
and
20 deletions
+1038
-20
dataapi.py
src/inspect_report/api/dataapi.py
+5
-5
group.html
src/inspect_report/templates/inspect/group.html
+23
-2
rule.html
src/inspect_report/templates/inspect/rule.html
+12
-3
score.html
src/inspect_report/templates/inspect/score.html
+26
-1
seat.html
src/inspect_report/templates/inspect/seat.html
+23
-6
seat_check.html
src/inspect_report/templates/inspect/seat_check.html
+10
-1
group.js
static/inspect/js/group.js
+273
-0
rule.js
static/inspect/js/rule.js
+251
-0
score.js
static/inspect/js/score.js
+29
-2
seat.js
static/inspect/js/seat.js
+168
-0
seat_check.js
static/inspect/js/seat_check.js
+218
-0
No files found.
src/inspect_report/api/dataapi.py
View file @
dbce6d71
...
@@ -137,11 +137,11 @@ class DataApi(viewsets.ViewSet):
...
@@ -137,11 +137,11 @@ class DataApi(viewsets.ViewSet):
:param req:
:param req:
:return:
:return:
"""
"""
task_id
=
req
.
data
.
get
(
'task'
,
''
)
task_id
=
req
.
GET
.
get
(
'task'
,
''
)
agent_name
=
req
.
data
.
get
(
'agentName'
,
''
)
agent_name
=
req
.
GET
.
get
(
'agentName'
,
''
)
sort
=
req
.
data
.
get
(
'sort'
,
'des'
)
sort
=
req
.
GET
.
get
(
'sort'
,
'des'
)
start_date
=
req
.
data
.
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
.
data
.
get
(
'end_date'
,
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
))
end_date
=
req
.
GET
.
get
(
'end_date'
,
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
))
q_start_date
=
datetime
.
strptime
(
start_date
,
'
%
Y-
%
m-
%
d'
)
.
date
()
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
()
q_end_date
=
(
datetime
.
strptime
(
end_date
,
'
%
Y-
%
m-
%
d'
)
+
+
timedelta
(
days
=
1
))
.
date
()
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
}
...
...
src/inspect_report/templates/inspect/group.html
View file @
dbce6d71
...
@@ -95,6 +95,15 @@
...
@@ -95,6 +95,15 @@
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-button
type=
'primary'
size=
'mini'
style=
'height:30px;'
@
click=
'loadData()'
>
导出数据
</el-button>
<form
ref=
"loadModal"
:action=
"`${BASEURL}api/v1/data/static_score_export/`"
method=
"get"
>
<input
type=
"hidden"
name=
"start_date"
:value=
"start_date"
>
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"task"
:value=
"taskvalue"
>
<input
type=
"hidden"
name=
"sort"
:value=
"sortObj.sort"
>
</form>
<!--
<!--
<el-date-picker
<el-date-picker
v-model="dateTime"
v-model="dateTime"
...
@@ -175,6 +184,7 @@
...
@@ -175,6 +184,7 @@
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
border
border
@
sort-change=
'sortChange'
style=
"width: 100%;margin-bottom:20px;"
>
style=
"width: 100%;margin-bottom:20px;"
>
<el-table-column
<el-table-column
prop=
"area"
prop=
"area"
...
@@ -183,27 +193,39 @@
...
@@ -183,27 +193,39 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"total_session"
prop=
"total_session"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"全部会话数"
label=
"全部会话数"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"validate_num"
prop=
"validate_num"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"触发违规项次数"
>
label=
"触发违规项次数"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score_svc"
prop=
"avg_score_svc"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"服务类平均分"
>
label=
"服务类平均分"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score_bus"
prop=
"avg_score_bus"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"业务类平均分"
>
label=
"业务类平均分"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score"
prop=
"avg_score"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"总平均分(包含0分项)"
>
label=
"总平均分(包含0分项)"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"validate_zero"
prop=
"validate_zero"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"触发0分项次数"
>
label=
"触发0分项次数"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -264,8 +286,7 @@
...
@@ -264,8 +286,7 @@
</script>
</script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
echarts
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
group
Overview
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
group
.
js
"
%}"
></script>
</body>
</body>
</html>
</html>
src/inspect_report/templates/inspect/rule.html
View file @
dbce6d71
...
@@ -95,6 +95,14 @@
...
@@ -95,6 +95,14 @@
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-button
type=
'primary'
size=
'mini'
style=
'height:30px;'
@
click=
'loadData()'
>
导出数据
</el-button>
<form
ref=
"loadModal"
:action=
"`${BASEURL}api/v1/data/static_rule_export/`"
method=
"get"
>
<input
type=
"hidden"
name=
"start_date"
:value=
"start_date"
>
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"task"
:value=
"taskvalue"
>
</form>
</div>
</div>
<div
id=
'main'
style=
'width:100%;padding-bottom:20px'
>
<div
id=
'main'
style=
'width:100%;padding-bottom:20px'
>
...
@@ -148,7 +156,9 @@
...
@@ -148,7 +156,9 @@
<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="customName" 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>
#}
...
@@ -182,8 +192,7 @@
...
@@ -182,8 +192,7 @@
</script>
</script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
echarts
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
all
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
rule
.
js
"
%}"
></script>
</body>
</body>
</html>
</html>
src/inspect_report/templates/inspect/score.html
View file @
dbce6d71
...
@@ -127,6 +127,16 @@
...
@@ -127,6 +127,16 @@
:value=
"item.agentName"
>
:value=
"item.agentName"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-button
type=
'primary'
size=
'mini'
style=
'height:30px;'
@
click=
'loadData()'
>
导出数据
</el-button>
<form
ref=
"loadModal"
:action=
"`${BASEURL}api/v1/data/seat_area_export/`"
method=
"get"
>
<input
type=
"hidden"
name=
"start_date"
:value=
"start_date"
>
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"task"
:value=
"taskvalue"
>
<input
type=
"hidden"
name=
"agentName"
:value=
"takevalue"
>
<input
type=
"hidden"
name=
"sort"
:value=
"sortObj.sort"
>
</form>
</div>
</div>
...
@@ -139,6 +149,7 @@
...
@@ -139,6 +149,7 @@
:data=
"tableData"
:data=
"tableData"
id=
'mutiTable'
id=
'mutiTable'
border
border
@
sort-change=
'sortChange'
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
prop=
"area"
prop=
"area"
...
@@ -152,31 +163,43 @@
...
@@ -152,31 +163,43 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"total_session"
prop=
"total_session"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"全部会话数"
label=
"全部会话数"
width=
""
>
width=
""
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"validate_num"
prop=
"validate_num"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"触发违规项次数"
label=
"触发违规项次数"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score_svc"
prop=
"avg_score_svc"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"服务类平均分"
label=
"服务类平均分"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score_bus"
prop=
"avg_score_bus"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"业务类平均分"
label=
"业务类平均分"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"avg_score"
prop=
"avg_score"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"平均分"
label=
"平均分"
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"validate_zero"
prop=
"validate_zero"
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"触发0分项次数"
label=
"触发0分项次数"
>
>
</el-table-column>
</el-table-column>
...
@@ -207,7 +230,9 @@
...
@@ -207,7 +230,9 @@
<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="customName" 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>
#}
...
...
src/inspect_report/templates/inspect/seat.html
View file @
dbce6d71
...
@@ -44,12 +44,24 @@
...
@@ -44,12 +44,24 @@
:value=
"item.agentName"
>
:value=
"item.agentName"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-button
type=
'primary'
size=
'mini'
style=
'height:30px;'
@
click=
'loadData()'
>
导出数据
</el-button>
<form
ref=
"loadModal"
:action=
"`${BASEURL}api/v1/data/seat_rule_export/`"
method=
"get"
>
<input
type=
"hidden"
name=
"start_date"
:value=
"start_date"
>
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"task"
:value=
"taskvalue"
>
<input
type=
"hidden"
name=
"agentName"
:value=
"takevalue"
>
<input
type=
"hidden"
name=
"sort"
:value=
"sortObj.sort"
>
</form>
</div>
</div>
<div
id=
'main'
style=
'margin-top:20px'
>
<div
id=
'main'
style=
'margin-top:20px'
>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
border
border
height=
"600"
height=
"600"
:default-sort=
"{prop: 'ranking', order: 'descending'}"
@
sort-change=
'sortChange'
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
prop=
"agentName"
prop=
"agentName"
...
@@ -74,9 +86,14 @@
...
@@ -74,9 +86,14 @@
{# {{scope.row.ratio * 100}}%#}
{# {{scope.row.ratio * 100}}%#}
{#
</template>
#}
{#
</template>
#}
</el-table-column>
</el-table-column>
<el-table-column
prop=
"remainTime"
label=
"通话时长(s)"
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"ranking"
prop=
"ranking"
sortable
sortable=
'custom'
:sort-orders=
"['ascending', 'descending']"
label=
"排名"
>
label=
"排名"
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -93,15 +110,15 @@
...
@@ -93,15 +110,15 @@
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
window
.
onload
=
function
(){
window
.
onload
=
function
(){
};
};
</script>
</script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
echarts
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
echarts
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
violator
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
seat
.
js
"
%}"
></script>
</body>
</body>
</html>
</html>
src/inspect_report/templates/inspect/seat_check.html
View file @
dbce6d71
...
@@ -140,6 +140,15 @@
...
@@ -140,6 +140,15 @@
:value=
"item.agentName"
>
:value=
"item.agentName"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-button
type=
'primary'
size=
'mini'
style=
'height:30px;'
@
click=
'loadData()'
>
导出数据
</el-button>
<form
ref=
"loadModal"
:action=
"`${BASEURL}api/v1/data/seat_check_export/`"
method=
"get"
>
<input
type=
"hidden"
name=
"start_date"
:value=
"start_date"
>
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"task"
:value=
"taskvalue"
>
<input
type=
"hidden"
name=
"agentName"
:value=
"takevalue"
>
</form>
</div>
</div>
...
@@ -291,6 +300,6 @@
...
@@ -291,6 +300,6 @@
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
vue
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
element
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
src=
"{% static "
inspect
/
js
/
http
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
mutiHeadTable
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
inspect
/
js
/
seat_check
.
js
"
%}"
></script>
</body>
</body>
</html>
</html>
static/inspect/js/group.js
0 → 100644
View file @
dbce6d71
new
Vue
({
el
:
'
#childApp
'
,
data
:
function
(){
return
{
ss
:
'
sas
'
,
dateTime
:
''
,
taskList
:[],
taskvalue
:
''
,
start_date
:
''
,
isscrollTop
:
false
,
currentPage
:
1
,
pagesize
:
10
,
total
:
10
,
poppage
:
1
,
poppagesize
:
10
,
poptotal
:
10
,
poprule
:
''
,
poptables
:
''
,
popcurrentPage
:
1
,
isHidePage
:
true
,
scrollTop
:
0
,
BASEURL
:
window_url
,
end_date
:
''
,
sortObj
:{
name
:
''
,
sort
:
'
avg_score_bus
'
,
},
poploading
:
false
,
dialogTableVisible
:
false
,
takeList
:[],
dateRange
:[
new
Date
(),
new
Date
()],
takevalue
:
''
,
titleInfo
:
{
"
total_session
"
:
0
,
"
validate_session
"
:
0
,
"
ratio
"
:
0
,
},
loading
:
true
,
poptableData
:
[],
tableData
:
[]
}
},
mounted
()
{
window
.
addEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
destroyed
()
{
window
.
removeEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
methods
:
{
loadData
(){
this
.
$refs
.
loadModal
.
submit
();
this
.
$message
(
'
文件下载中请稍后...
'
);
},
sortChange
(
item
){
console
.
log
(
item
);
let
order
;
if
(
item
.
order
==
'
descending
'
){
order
=
item
.
prop
;
}
else
if
(
item
.
order
==
'
ascending
'
){
order
=
'
-
'
+
item
.
prop
;
}
else
{
order
=
null
;
}
this
.
sortObj
=
{
name
:
item
.
prop
,
sort
:
order
}
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
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
.
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
.
currentPage
,
10
);
// 获取统计数据
},
changeTake
(
msg
){
this
.
takevalue
=
msg
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
console
.
log
(
msg
);
},
getTask
(){
let
that
=
this
;
that
.
taskList
=
[
{
id
:
''
,
name
:
'
全省
'
},
{
id
:
'
合肥
'
,
name
:
'
合肥
'
},
{
id
:
'
芜湖
'
,
name
:
'
芜湖
'
},
{
id
:
'
蚌埠
'
,
name
:
'
蚌埠
'
},
{
id
:
'
淮南
'
,
name
:
'
淮南
'
},
{
id
:
'
马鞍山
'
,
name
:
'
马鞍山
'
},
{
id
:
'
淮北
'
,
name
:
'
淮北
'
},
{
id
:
'
铜陵
'
,
name
:
'
铜陵
'
},
{
id
:
'
安庆
'
,
name
:
'
安庆
'
},
{
id
:
'
黄山
'
,
name
:
'
黄山
'
},
{
id
:
'
滁州
'
,
name
:
'
滁州
'
},
{
id
:
'
阜阳
'
,
name
:
'
阜阳
'
},
{
id
:
'
亳州
'
,
name
:
'
亳州
'
},
{
id
:
'
宿州
'
,
name
:
'
宿州
'
},
{
id
:
'
六安
'
,
name
:
'
六安
'
},
{
id
:
'
宣城
'
,
name
:
'
宣城
'
},
{
id
:
'
巢湖
'
,
name
:
'
巢湖
'
},
{
id
:
'
池州
'
,
name
:
'
池州
'
},
{
id
:
'
安徽省营业部
'
,
name
:
'
安徽省营业部
'
},
];
//RquestsGet('api/v1/tasks/obtain/').then(data => {
// //console.log(data);
// if(data.code != 0){
// that.taskList = [{id:'',name:'全部任务'}];
// }else{
// that.taskList = [{id:'',name:'全部任务'}].concat(data.data);
// that.getTake()
// }
//})
},
getTake
(){
let
that
=
this
;
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
).
then
(
data
=>
{
//console.log(data);
if
(
data
.
code
!=
0
){
//that.takeList = [{agentName:'全部坐席'}]
}
else
{
that
.
takeList
=
data
.
data
;
}
})
},
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
,
page
,
page_size
){
let
that
=
this
;
console
.
log
(
start_date
,
end_date
);
let
arr
=
[];
this
.
$loading
({
text
:
'
数据加载中...
'
});
let
sort
=
this
.
sortObj
.
sort
;
RquestsPost
(
'
api/v1/tasks/static_score/
'
,{
task
,
end_date
,
start_date
,
agentName
,
page
,
page_size
,
sort
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
if
(
!
data
.
data
){
this
.
$loading
().
close
();
return
false
;
}
//for(let key in data.data){
// arr.unshift([data.data[key],key])
//}
this
.
tableData
=
data
.
data
;
this
.
total
=
data
.
count
;
this
.
isHidePage
=
!
(
data
.
data
.
length
>
0
);
this
.
$loading
().
close
();
})
RquestsPost
(
'
api/v1/tasks/static/
'
,{
task
,
end_date
,
start_date
,
agentName
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
if
(
!
data
.
data
){
this
.
$loading
().
close
();
return
false
;
}
that
.
titleInfo
=
data
.
data
;
//this.$loading().close();
})
},
dateFormat
(
date
){
return
date
.
getFullYear
()
+
"
-
"
+
(
date
.
getMonth
()
+
1
)
+
"
-
"
+
date
.
getDate
();
},
rowDetail
(
index
,
tableData
){
let
data
=
tableData
;
console
.
log
(
data
);
//this.poptableData = tableData[index].details;
this
.
poptables
=
data
.
tables
;
this
.
poprule
=
data
.
rule
;
this
.
popcurrentPage
=
1
;
this
.
poppage
=
1
;
this
.
taskvalue
=
tableData
.
area
;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
);
this
.
dialogTableVisible
=
true
;
},
getDetail
(
task
,
start_date
,
end_date
,
tables
,
rule
,
page
,
page_size
){
//this.getRule(this.taskvalue,this.start_date,this.end_date,this.takevalue); // 获取统计数据
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
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
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
,
'
*
'
);
},
backTop
()
{
const
that
=
this
let
timer
=
setInterval
(()
=>
{
let
ispeed
=
Math
.
floor
(
-
that
.
scrollTop
/
5
)
document
.
documentElement
.
scrollTop
=
document
.
body
.
scrollTop
=
that
.
scrollTop
+
ispeed
if
(
that
.
scrollTop
===
0
)
{
clearInterval
(
timer
)
}
},
16
)
},
// 为了计算距离顶部的高度,当高度大于60显示回顶部图标,小于60则隐藏
scrollToTop
()
{
const
that
=
this
let
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
that
.
scrollTop
=
scrollTop
if
(
that
.
scrollTop
>
60
)
{
that
.
isscrollTop
=
true
}
else
{
that
.
isscrollTop
=
false
}
},
init
(){
this
.
dateRange
=
[
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
),
new
Date
()];
this
.
start_date
=
this
.
dateFormat
(
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
));
this
.
end_date
=
this
.
dateFormat
(
new
Date
());
this
.
getTask
();
// 获取任务
//this.getTake(); // 获取坐席
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
currentPage
,
10
);
// 获取统计数据
}
},
created
(){
this
.
init
()
},
})
static/inspect/js/rule.js
0 → 100644
View file @
dbce6d71
new
Vue
({
el
:
'
#childApp
'
,
data
:
function
(){
return
{
ss
:
'
sas
'
,
dateTime
:
''
,
taskList
:[],
taskvalue
:
''
,
start_date
:
''
,
isscrollTop
:
false
,
currentPage
:
1
,
pagesize
:
10
,
total
:
10
,
poppage
:
1
,
poppagesize
:
10
,
poptotal
:
10
,
poprule
:
''
,
poptables
:
''
,
popcurrentPage
:
1
,
isHidePage
:
true
,
scrollTop
:
0
,
end_date
:
''
,
poploading
:
false
,
BASEURL
:
window_url
,
dialogTableVisible
:
false
,
takeList
:[],
dateRange
:[
new
Date
(),
new
Date
()],
takevalue
:
''
,
titleInfo
:
{
"
total_session
"
:
0
,
"
validate_session
"
:
0
,
"
ratio
"
:
0
,
},
loading
:
true
,
poptableData
:
[],
tableData
:
[]
}
},
mounted
()
{
window
.
addEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
destroyed
()
{
window
.
removeEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
methods
:
{
loadData
(){
this
.
$refs
.
loadModal
.
submit
();
this
.
$message
(
'
文件下载中请稍后...
'
);
},
changeRange
(
dateRange
){
this
.
start_date
=
dateRange
[
0
];
this
.
end_date
=
dateRange
[
1
];
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTask
(
msg
){
console
.
log
(
msg
);
this
.
taskvalue
=
msg
;
this
.
getTake
()
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTake
(
msg
){
this
.
takevalue
=
msg
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
console
.
log
(
msg
);
},
getTask
(){
let
that
=
this
;
that
.
taskList
=
[
{
id
:
''
,
name
:
'
全省
'
},
{
id
:
'
合肥
'
,
name
:
'
合肥
'
},
{
id
:
'
芜湖
'
,
name
:
'
芜湖
'
},
{
id
:
'
蚌埠
'
,
name
:
'
蚌埠
'
},
{
id
:
'
淮南
'
,
name
:
'
淮南
'
},
{
id
:
'
马鞍山
'
,
name
:
'
马鞍山
'
},
{
id
:
'
淮北
'
,
name
:
'
淮北
'
},
{
id
:
'
铜陵
'
,
name
:
'
铜陵
'
},
{
id
:
'
安庆
'
,
name
:
'
安庆
'
},
{
id
:
'
黄山
'
,
name
:
'
黄山
'
},
{
id
:
'
滁州
'
,
name
:
'
滁州
'
},
{
id
:
'
阜阳
'
,
name
:
'
阜阳
'
},
{
id
:
'
毫州
'
,
name
:
'
毫州
'
},
{
id
:
'
宿州
'
,
name
:
'
宿州
'
},
{
id
:
'
六安
'
,
name
:
'
六安
'
},
{
id
:
'
宣城
'
,
name
:
'
宣城
'
},
{
id
:
'
巢湖
'
,
name
:
'
巢湖
'
},
{
id
:
'
池州
'
,
name
:
'
池州
'
},
{
id
:
'
安徽省营业部
'
,
name
:
'
安徽省营业部
'
},
];
//RquestsGet('api/v1/tasks/obtain/').then(data => {
// //console.log(data);
// if(data.code != 0){
// that.taskList = [{id:'',name:'全部任务'}];
// }else{
// that.taskList = [{id:'',name:'全部任务'}].concat(data.data);
// that.getTake()
// }
//})
},
getTake
(){
let
that
=
this
;
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
).
then
(
data
=>
{
//console.log(data);
if
(
data
.
code
!=
0
){
//that.takeList = [{agentName:'全部坐席'}]
}
else
{
that
.
takeList
=
data
.
data
;
}
})
},
CurrentChange
(
page
){
this
.
currentPage
=
page
;
},
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
){
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
,
agentName
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
if
(
!
data
.
data
){
this
.
$loading
().
close
();
return
false
;
}
//for(let key in data.data){
// arr.unshift([data.data[key],key])
//}
this
.
tableData
=
data
.
data
;
this
.
total
=
data
.
data
.
length
;
this
.
isHidePage
=
!
(
data
.
data
.
length
>
0
);
this
.
$loading
().
close
();
})
RquestsPost
(
'
api/v1/tasks/static/
'
,{
task
,
end_date
,
start_date
,
agentName
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
if
(
!
data
.
data
){
this
.
$loading
().
close
();
return
false
;
}
that
.
titleInfo
=
data
.
data
;
//this.$loading().close();
})
},
dateFormat
(
date
){
return
date
.
getFullYear
()
+
"
-
"
+
(
date
.
getMonth
()
+
1
)
+
"
-
"
+
date
.
getDate
();
},
rowDetail
(
index
,
tableData
){
let
data
=
tableData
[
index
+
(
this
.
currentPage
-
1
)
*
this
.
pagesize
];
console
.
log
(
data
);
//this.poptableData = tableData[index].details;
this
.
poptables
=
data
.
tables
;
this
.
poprule
=
data
.
rule
;
this
.
popcurrentPage
=
1
;
this
.
poppage
=
1
;
//this.taskvalue = tableData.area;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
);
},
getDetail
(
task
,
start_date
,
end_date
,
tables
,
rule
,
page
,
page_size
){
//this.getRule(this.taskvalue,this.start_date,this.end_date,this.takevalue); // 获取统计数据
let
that
=
this
;
this
.
$loading
({
text
:
'
数据加载中...
'
});
this
.
poploading
=
true
;
RquestsPost
(
'
api/v1/tasks/rule_detail/
'
,{
task
,
end_date
,
start_date
,
tables
,
rule
,
page
,
page_size
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
this
.
$loading
().
close
();
this
.
dialogTableVisible
=
true
;
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
,
'
*
'
);
},
backTop
()
{
const
that
=
this
let
timer
=
setInterval
(()
=>
{
let
ispeed
=
Math
.
floor
(
-
that
.
scrollTop
/
5
)
document
.
documentElement
.
scrollTop
=
document
.
body
.
scrollTop
=
that
.
scrollTop
+
ispeed
if
(
that
.
scrollTop
===
0
)
{
clearInterval
(
timer
)
}
},
16
)
},
// 为了计算距离顶部的高度,当高度大于60显示回顶部图标,小于60则隐藏
scrollToTop
()
{
const
that
=
this
let
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
that
.
scrollTop
=
scrollTop
if
(
that
.
scrollTop
>
60
)
{
that
.
isscrollTop
=
true
}
else
{
that
.
isscrollTop
=
false
}
},
init
(){
this
.
dateRange
=
[
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
),
new
Date
()];
this
.
start_date
=
this
.
dateFormat
(
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
));
this
.
end_date
=
this
.
dateFormat
(
new
Date
());
this
.
getTask
();
// 获取任务
//this.getTake(); // 获取坐席
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
}
},
created
(){
this
.
init
()
},
})
static/inspect/js/score.js
View file @
dbce6d71
...
@@ -16,6 +16,12 @@ new Vue({
...
@@ -16,6 +16,12 @@ new Vue({
loading
:
true
,
loading
:
true
,
tableData
:
[],
tableData
:
[],
poploading
:
false
,
poploading
:
false
,
BASEURL
:
window_url
,
start_date
:
''
,
sortObj
:{
name
:
''
,
sort
:
'
avg_score_bus
'
,
},
currentPage
:
1
,
currentPage
:
1
,
page
:
1
,
page
:
1
,
page_size
:
10
,
page_size
:
10
,
...
@@ -40,6 +46,26 @@ new Vue({
...
@@ -40,6 +46,26 @@ new Vue({
window
.
removeEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
window
.
removeEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
},
methods
:
{
methods
:
{
loadData
(){
this
.
$refs
.
loadModal
.
submit
();
this
.
$message
(
'
文件下载中请稍后...
'
);
},
sortChange
(
item
){
console
.
log
(
item
);
let
order
;
if
(
item
.
order
==
'
descending
'
){
order
=
item
.
prop
;
}
else
if
(
item
.
order
==
'
ascending
'
){
order
=
'
-
'
+
item
.
prop
;
}
else
{
order
=
null
;
}
this
.
sortObj
=
{
name
:
item
.
prop
,
sort
:
order
}
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
,
this
.
page
,
this
.
page_size
);
// 获取统计数据
},
changeRange
(
dateRange
){
changeRange
(
dateRange
){
this
.
start_date
=
dateRange
[
0
];
this
.
start_date
=
dateRange
[
0
];
this
.
end_date
=
dateRange
[
1
];
this
.
end_date
=
dateRange
[
1
];
...
@@ -84,8 +110,9 @@ new Vue({
...
@@ -84,8 +110,9 @@ new Vue({
getRule
(
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
){
getRule
(
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
){
let
that
=
this
;
let
that
=
this
;
// 获取表格数据
// 获取表格数据
let
sort
=
this
.
sortObj
.
sort
;
this
.
$loading
({
text
:
'
数据加载中...
'
});
this
.
$loading
({
text
:
'
数据加载中...
'
});
RquestsPost
(
'
api/v1/tasks/seat_area/
'
,{
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
}).
then
(
data
=>
{
RquestsPost
(
'
api/v1/tasks/seat_area/
'
,{
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
,
sort
}).
then
(
data
=>
{
if
(
data
.
code
!=
0
){
if
(
data
.
code
!=
0
){
}
else
{
}
else
{
...
@@ -151,7 +178,7 @@ new Vue({
...
@@ -151,7 +178,7 @@ new Vue({
},
},
rowDetail
(
index
,
tableData
){
rowDetail
(
index
,
tableData
){
this
.
agentName
=
tableData
.
agentName
;
this
.
agentName
=
tableData
.
agentName
;
this
.
taskvalue
=
tableData
.
area
this
.
taskvalue
=
tableData
.
area
;
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
,
this
.
agentName
);
this
.
getDetail
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
poptables
,
this
.
poprule
,
this
.
poppage
,
this
.
poppagesize
,
this
.
agentName
);
},
},
...
...
static/inspect/js/seat.js
0 → 100644
View file @
dbce6d71
new
Vue
({
el
:
'
#childApp
'
,
data
:
function
(){
return
{
ss
:
'
sas
'
,
dateRange
:[
new
Date
(),
new
Date
()],
taskList
:[],
taskvalue
:
''
,
start_date
:
''
,
end_date
:
''
,
takeList
:[],
takevalue
:
''
,
loading
:
true
,
tableData
:
[],
sortObj
:{
name
:
''
,
sort
:
'
des
'
,
},
BASEURL
:
window_url
,
currentPage
:
1
,
pagesize
:
15
,
total
:
10
,
isHidePage
:
true
,
}
},
methods
:
{
loadData
(){
this
.
$refs
.
loadModal
.
submit
();
this
.
$message
(
'
文件下载中请稍后...
'
);
},
changeRange
(
dateRange
){
console
.
log
(
dateRange
);
this
.
start_date
=
dateRange
[
0
];
this
.
end_date
=
dateRange
[
1
];
this
.
currentPage
=
1
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTask
(
msg
){
console
.
log
(
msg
);
this
.
currentPage
=
1
;
this
.
taskvalue
=
msg
;
this
.
getTake
()
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTake
(
msg
){
this
.
currentPage
=
1
;
this
.
takevalue
=
msg
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
console
.
log
(
msg
);
},
getTask
(){
let
that
=
this
;
that
.
taskList
=
[
{
id
:
''
,
name
:
'
全省
'
},
{
id
:
'
合肥
'
,
name
:
'
合肥
'
},
{
id
:
'
芜湖
'
,
name
:
'
芜湖
'
},
{
id
:
'
蚌埠
'
,
name
:
'
蚌埠
'
},
{
id
:
'
淮南
'
,
name
:
'
淮南
'
},
{
id
:
'
马鞍山
'
,
name
:
'
马鞍山
'
},
{
id
:
'
淮北
'
,
name
:
'
淮北
'
},
{
id
:
'
铜陵
'
,
name
:
'
铜陵
'
},
{
id
:
'
安庆
'
,
name
:
'
安庆
'
},
{
id
:
'
黄山
'
,
name
:
'
黄山
'
},
{
id
:
'
滁州
'
,
name
:
'
滁州
'
},
{
id
:
'
阜阳
'
,
name
:
'
阜阳
'
},
{
id
:
'
亳州
'
,
name
:
'
亳州
'
},
{
id
:
'
宿州
'
,
name
:
'
宿州
'
},
{
id
:
'
六安
'
,
name
:
'
六安
'
},
{
id
:
'
宣城
'
,
name
:
'
宣城
'
},
{
id
:
'
巢湖
'
,
name
:
'
巢湖
'
},
{
id
:
'
池州
'
,
name
:
'
池州
'
},
{
id
:
'
安徽省营业部
'
,
name
:
'
安徽省营业部
'
},
];
//RquestsGet('api/v1/tasks/obtain/').then(data => {
// //console.log(data);
// if(data.code != 0){
// that.taskList = [{id:'',name:'全部任务'}];
// }else{
// that.taskList = [{id:'',name:'全部任务'}].concat(data.data);
// that.getTake()
// }
//})
},
getTake
(){
let
that
=
this
;
RquestsGet
(
'
api/v1/tasks/seat/?task=
'
+
that
.
taskvalue
).
then
(
data
=>
{
//console.log(data);
if
(
data
.
code
!=
0
){
//that.takeList = [{agentName:'全部坐席'}]
}
else
{
that
.
takeList
=
data
.
data
;
}
})
},
sortChange
(
item
){
console
.
log
(
item
);
let
order
;
if
(
item
.
order
==
'
descending
'
){
order
=
'
des
'
;
}
else
if
(
item
.
order
==
'
ascending
'
){
order
=
'
asc
'
;
}
else
{
order
=
null
;
}
this
.
sortObj
=
{
name
:
item
.
prop
,
sort
:
order
}
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
getRule
(
task
,
start_date
,
end_date
,
agentName
){
let
that
=
this
;
let
page
=
this
.
currentPage
;
let
arr
=
[];
this
.
$loading
({
text
:
'
数据加载中...
'
});
let
sort
=
this
.
sortObj
.
sort
;
RquestsPost
(
'
api/v1/tasks/seat_rule/
'
,{
task
,
start_date
,
end_date
,
agentName
,
page
,
sort
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
){
that
.
$message
(
data
.
msg
);
if
(
data
.
msg
){
that
.
$message
(
data
.
msg
);
}
else
{
that
.
$message
(
'
服务器错误
'
)
}
}
this
.
tableData
=
data
.
data
;
this
.
total
=
data
.
count
;
this
.
isHidePage
=
!
(
data
.
data
.
length
>
0
);
if
(
!
data
.
data
){
this
.
$loading
().
close
();
return
false
;
}
//for(let key in data.data){
// arr.unshift([data.data[key],key])
//}
this
.
$loading
().
close
();
})
},
CurrentChange
(
page
){
this
.
currentPage
=
page
;
//this.tableData = this.basearr.concat(this.allData.slice((page-1)*this.pagesize,page*this.pagesize));
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
//that.allData = data.data;
},
dateFormat
(
date
){
return
date
.
getFullYear
()
+
"
-
"
+
(
date
.
getMonth
()
+
1
)
+
"
-
"
+
date
.
getDate
();
},
init
(){
this
.
dateRange
=
[
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
),
new
Date
()];
this
.
start_date
=
this
.
dateFormat
(
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
));
this
.
end_date
=
this
.
dateFormat
(
new
Date
());
this
.
getTask
();
// 获取任务
//this.getTake(); // 获取坐席
console
.
log
(
this
.
dateRange
);
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
}
},
created
(){
this
.
init
()
},
})
static/inspect/js/seat_check.js
0 → 100644
View file @
dbce6d71
new
Vue
({
el
:
'
#childApp
'
,
data
:
function
(){
return
{
ss
:
'
sas
'
,
dateTime
:
''
,
taskList
:[],
isscrollTop
:
false
,
scrollTop
:
0
,
taskvalue
:
''
,
dateRange
:[
new
Date
(),
new
Date
()],
start_date
:
''
,
sortObj
:{
name
:
''
,
sort
:
'
avg_score_bus
'
,
},
end_date
:
''
,
takeList
:[],
BASEURL
:
window_url
,
takevalue
:
''
,
loading
:
true
,
allData
:
[],
basearr
:
[
{
createdAt
:
'
质检考核项目编号
'
,
fwyy
:
'
1
'
,
kcb
:
'
2
'
,
jsy
:
'
3
'
,
fwtd
:
'
4
'
,
yssb
:
'
5
'
,
jysb
:
'
6
'
,
yycl
:
'
7
'
,
ywcc
:
'
8
'
,
yyjlz
:
'
9
'
,
fwjs
:
'
10
'
,
wtgbj
:
'
11
'
,
wzyhfljs
:
'
12
'
,
wgzlf
:
'
13
'
,
mgc
:
'
14
'
,
},
{
createdAt
:
'
质检考核权重
'
,
fwyy
:
'
10%
'
,
kcb
:
'
10%
'
,
jsy
:
'
5%
'
,
fwtd
:
'
10%
'
,
yssb
:
'
5%
'
,
jysb
:
'
5%
'
,
yycl
:
'
10%
'
,
ywcc
:
'
15%
'
,
yyjlz
:
'
15%
'
,
fwjs
:
'
5%
'
,
wtgbj
:
'
5%
'
,
wzyhfljs
:
'
5%
'
,
wgzlf
:
'
100%
'
,
mgc
:
'
100%
'
,
}],
tableData
:
[],
currentPage
:
1
,
pagesize
:
15
,
total
:
10
,
isHidePage
:
true
,
}
},
mounted
()
{
window
.
addEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
destroyed
()
{
window
.
removeEventListener
(
'
scroll
'
,
this
.
scrollToTop
)
},
methods
:
{
loadData
(){
this
.
$refs
.
loadModal
.
submit
();
this
.
$message
(
'
文件下载中请稍后...
'
);
},
changeRange
(
dateRange
){
this
.
start_date
=
dateRange
[
0
];
this
.
end_date
=
dateRange
[
1
];
this
.
currentPage
=
1
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTask
(
msg
){
this
.
taskvalue
=
msg
;
this
.
currentPage
=
1
;
this
.
getTake
()
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
changeTake
(
msg
){
this
.
takevalue
=
msg
;
this
.
currentPage
=
1
;
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
},
getTask
(){
let
that
=
this
;
that
.
taskList
=
[
{
id
:
''
,
name
:
'
全省
'
},
{
id
:
'
合肥
'
,
name
:
'
合肥
'
},
{
id
:
'
芜湖
'
,
name
:
'
芜湖
'
},
{
id
:
'
蚌埠
'
,
name
:
'
蚌埠
'
},
{
id
:
'
淮南
'
,
name
:
'
淮南
'
},
{
id
:
'
马鞍山
'
,
name
:
'
马鞍山
'
},
{
id
:
'
淮北
'
,
name
:
'
淮北
'
},
{
id
:
'
铜陵
'
,
name
:
'
铜陵
'
},
{
id
:
'
安庆
'
,
name
:
'
安庆
'
},
{
id
:
'
黄山
'
,
name
:
'
黄山
'
},
{
id
:
'
滁州
'
,
name
:
'
滁州
'
},
{
id
:
'
阜阳
'
,
name
:
'
阜阳
'
},
{
id
:
'
亳州
'
,
name
:
'
亳州
'
},
{
id
:
'
宿州
'
,
name
:
'
宿州
'
},
{
id
:
'
六安
'
,
name
:
'
六安
'
},
{
id
:
'
宣城
'
,
name
:
'
宣城
'
},
{
id
:
'
巢湖
'
,
name
:
'
巢湖
'
},
{
id
:
'
池州
'
,
name
:
'
池州
'
},
{
id
:
'
安徽省营业部
'
,
name
:
'
安徽省营业部
'
},
];
},
getRule
(
task
,
start_date
,
end_date
,
agentName
){
let
that
=
this
;
let
page
=
this
.
currentPage
;
let
page_size
=
this
.
pagesize
;
this
.
$loading
({
text
:
'
数据加载中...
'
});
RquestsPost
(
'
api/v1/tasks/seat_check/
'
,{
task
,
start_date
,
end_date
,
agentName
,
page
,
page_size
}).
then
(
data
=>
{
that
.
$loading
().
close
();
if
(
data
.
code
!=
0
){
}
else
{
//that.tableData = this.basearr.concat(data.data.slice((this.currentPage-1)*this.pagesize,this.currentPage*this.pagesize));
that
.
tableData
=
this
.
basearr
.
concat
(
data
.
data
);
that
.
allData
=
data
.
data
;
this
.
total
=
data
.
count
;
this
.
isHidePage
=
!
(
data
.
data
.
length
>
0
);
//that.takeList = data.data;
}
})
},
getTake
(){
let
that
=
this
;
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
){
//that.takeList = [{agentName:'全部坐席'}]
}
else
{
that
.
takeList
=
data
.
data
;
}
})
},
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
===
0
||
rowIndex
===
1
)
{
// 在这里多加一个行的判断就行
// 合并第二行
if
(
columnIndex
===
0
)
{
// 从第二列开始
return
[
1
,
3
]
}
else
if
(
columnIndex
===
2
||
columnIndex
===
3
)
{
return
[
0
,
0
]
}
}
},
dateFormat
(
date
){
return
date
.
getFullYear
()
+
"
-
"
+
(
date
.
getMonth
()
+
1
)
+
"
-
"
+
date
.
getDate
();
},
backTop
()
{
const
that
=
this
let
timer
=
setInterval
(()
=>
{
let
ispeed
=
Math
.
floor
(
-
that
.
scrollTop
/
5
)
document
.
documentElement
.
scrollTop
=
document
.
body
.
scrollTop
=
that
.
scrollTop
+
ispeed
if
(
that
.
scrollTop
===
0
)
{
clearInterval
(
timer
)
}
},
16
)
},
// 为了计算距离顶部的高度,当高度大于60显示回顶部图标,小于60则隐藏
scrollToTop
()
{
const
that
=
this
let
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
that
.
scrollTop
=
scrollTop
if
(
that
.
scrollTop
>
60
)
{
that
.
isscrollTop
=
true
}
else
{
that
.
isscrollTop
=
false
}
},
CurrentChange
(
page
){
this
.
currentPage
=
page
;
//this.tableData = this.basearr.concat(this.allData.slice((page-1)*this.pagesize,page*this.pagesize));
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
//that.allData = data.data;
},
rowClick
(
row
,
column
,
event
){
console
.
log
(
row
)
;
let
url
=
"
/quality/audio/check-detail/
"
+
row
.
sessionCollectionId
+
"
/
"
+
row
.
taskId
+
"
?from=checkTask&sessionId=
"
+
row
.
sessionId
;
let
autoMessage
=
{
jumplink
:
url
};
console
.
log
(
autoMessage
);
window
.
parent
.
postMessage
(
autoMessage
,
'
*
'
);
},
init
(){
this
.
dateRange
=
[
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
),
new
Date
()];
this
.
start_date
=
this
.
dateFormat
(
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
));
this
.
end_date
=
this
.
dateFormat
(
new
Date
());
this
.
getTask
();
// 获取任务
this
.
getTake
();
// 获取坐席
this
.
getRule
(
this
.
taskvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
takevalue
);
// 获取统计数据
}
},
created
(){
this
.
init
()
},
})
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