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
d3ad6ead
Commit
d3ad6ead
authored
Apr 26, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seat页面修改
parent
f6fb253d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
11 deletions
+59
-11
dataapi.py
src/inspect_report/api/dataapi.py
+2
-1
tasksapi.py
src/inspect_report/api/tasksapi.py
+2
-1
seat.html
src/inspect_report/templates/inspect/seat.html
+13
-0
seat.js
static/inspect/js/seat.js
+42
-9
No files found.
src/inspect_report/api/dataapi.py
View file @
d3ad6ead
...
...
@@ -135,10 +135,11 @@ class DataApi(viewsets.ViewSet):
"""
city_id
=
req
.
GET
.
get
(
'city'
,
None
)
country_id
=
req
.
GET
.
get
(
'country'
,
None
)
team_id
=
req
.
GET
.
get
(
'team'
,
None
)
agent_name
=
req
.
GET
.
get
(
'seat'
,
''
)
sort
=
req
.
GET
.
get
(
'sort'
,
'des'
)
task_condition
=
req
.
data
.
get
(
'date_condition'
,
''
)
team_names
=
get_team_names
(
city_id
,
country_id
)
team_names
=
get_team_names
(
city_id
,
country_id
,
team_id
)
task_condition
[
'task__in'
]
=
team_names
...
...
src/inspect_report/api/tasksapi.py
View file @
d3ad6ead
...
...
@@ -189,13 +189,14 @@ class TasksApi(viewsets.ViewSet):
"""
city_id
=
req
.
data
.
get
(
'city'
,
None
)
country_id
=
req
.
data
.
get
(
'country'
,
None
)
team_id
=
req
.
data
.
get
(
'team'
,
None
)
agent_name
=
req
.
data
.
get
(
'seat'
,
''
)
sort
=
req
.
data
.
get
(
'sort'
,
'des'
)
page
=
req
.
data
.
get
(
'page'
,
'1'
)
page_size
=
req
.
data
.
get
(
'page_size'
,
'10'
)
task_condition
=
req
.
data
.
get
(
'date_condition'
,
{})
team_names
=
get_team_names
(
city_id
,
country_id
)
team_names
=
get_team_names
(
city_id
,
country_id
,
team_id
)
task_condition
[
'task__in'
]
=
team_names
...
...
src/inspect_report/templates/inspect/seat.html
View file @
d3ad6ead
...
...
@@ -44,6 +44,18 @@
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"teamvalue"
v-if=
"team_show == true"
filterable
placeholder=
"请选择团队"
@
change=
"changeTeam"
>
<el-option
label=
"全部团队"
value=
""
>
</el-option>
<el-option
v-for=
"item in teamList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-if=
"seat_show == true"
v-model=
"seatvalue"
filterable
placeholder=
"请选择坐席"
@
change=
'changeSeat'
>
<el-option
label=
"全部坐席"
...
...
@@ -64,6 +76,7 @@
<input
type=
"hidden"
name=
"end_date"
:value=
"end_date"
>
<input
type=
"hidden"
name=
"city"
:value=
"cityvalue"
>
<input
type=
"hidden"
name=
"country"
:value=
"countryvalue"
>
<input
type=
"hidden"
name=
"team"
:value=
"teamvalue"
>
<input
type=
"hidden"
name=
"seat"
:value=
"seatvalue"
>
<input
type=
"hidden"
name=
"sort"
:value=
"sortObj.sort"
>
</form>
...
...
static/inspect/js/seat.js
View file @
d3ad6ead
...
...
@@ -6,9 +6,12 @@ new Vue({
dateRange
:
[
new
Date
(),
new
Date
()],
cityList
:
[],
countryList
:
[],
teamList
:
[],
cityvalue
:
''
,
countryvalue
:
''
,
teamvalue
:
''
,
country_show
:
false
,
team_show
:
false
,
start_date
:
''
,
end_date
:
''
,
seatList
:
[],
...
...
@@ -39,29 +42,41 @@ new Vue({
this
.
seatvalue
=
null
;
this
.
currentPage
=
1
;
this
.
getTake
();
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
},
changeCity
(
msg
)
{
console
.
log
(
msg
);
this
.
currentPage
=
1
;
this
.
cityvalue
=
msg
;
this
.
countryvalue
=
''
;
this
.
teamvalue
=
''
;
this
.
seatvalue
=
null
;
this
.
getCountry
();
this
.
getTeam
();
this
.
getTake
();
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
},
changeCountry
(
msg
)
{
this
.
countryvalue
=
msg
;
this
.
teamvalue
=
''
;
this
.
seatvalue
=
null
;
this
.
getTeam
();
this
.
getTake
();
this
.
currentPage
=
1
;
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
},
changeTeam
(
msg
)
{
this
.
currentPage
=
1
;
this
.
teamvalue
=
msg
;
this
.
seatvalue
=
null
;
this
.
getTake
();
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
console
.
log
(
msg
);
},
changeSeat
(
msg
)
{
this
.
currentPage
=
1
;
this
.
seatvalue
=
msg
;
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
console
.
log
(
msg
);
},
getCountry
()
{
...
...
@@ -81,6 +96,23 @@ new Vue({
}
})
},
getTeam
()
{
let
that
=
this
;
RquestsGet
(
'
api/v1/agency/team/?country_id=
'
+
this
.
countryvalue
+
'
&city_id=
'
+
this
.
cityvalue
).
then
(
data
=>
{
//console.log(data);
if
(
data
.
code
!=
0
)
{
that
.
$message
(
'
服务器错误
'
)
}
else
{
that
.
teamList
=
data
.
data
.
team_list
;
if
(
that
.
teamList
.
length
>
0
)
{
that
.
team_show
=
true
;
}
else
{
that
.
team_show
=
false
;
};
}
})
},
getCity
(){
let
that
=
this
;
var
request
=
new
XMLHttpRequest
();
...
...
@@ -142,15 +174,15 @@ new Vue({
name
:
item
.
prop
,
sort
:
order
}
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
},
getRule
(
city
,
country
,
start_date
,
end_date
,
seat
)
{
getRule
(
city
,
country
,
team
,
start_date
,
end_date
,
seat
)
{
let
that
=
this
;
let
page
=
this
.
currentPage
;
let
arr
=
[];
this
.
$loading
({
text
:
'
数据加载中...
'
});
let
sort
=
this
.
sortObj
.
sort
;
RquestsPost
(
'
api/v1/tasks/seat_rule/
'
,
{
city
,
country
,
start_date
,
end_date
,
seat
,
page
,
sort
}).
then
(
data
=>
{
RquestsPost
(
'
api/v1/tasks/seat_rule/
'
,
{
city
,
country
,
team
,
start_date
,
end_date
,
seat
,
page
,
sort
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
)
{
that
.
$message
(
data
.
msg
);
...
...
@@ -178,7 +210,7 @@ new Vue({
CurrentChange
(
page
)
{
this
.
currentPage
=
page
;
//this.tableData = this.basearr.concat(this.allData.slice((page-1)*this.pagesize,page*this.pagesize));
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
//that.allData = data.data;
},
dateFormat
(
date
)
{
...
...
@@ -189,10 +221,11 @@ new Vue({
this
.
start_date
=
this
.
dateFormat
(
new
Date
(
new
Date
()
-
24
*
60
*
60
*
1000
));
this
.
end_date
=
this
.
dateFormat
(
new
Date
());
this
.
getCity
();
// 获取任务
this
.
getTeam
();
this
.
getTake
();
// 获取坐席
console
.
log
(
this
.
dateRange
);
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
teamvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
}
},
...
...
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