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
0baffde9
Commit
0baffde9
authored
Apr 24, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seat页面修改
parent
5afabee8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
tasksapi.py
src/inspect_report/api/tasksapi.py
+2
-1
seat.js
static/inspect/js/seat.js
+2
-2
No files found.
src/inspect_report/api/tasksapi.py
View file @
0baffde9
...
...
@@ -188,7 +188,7 @@ class TasksApi(viewsets.ViewSet):
"""
city_id
=
req
.
GET
.
get
(
'city'
,
None
)
country_id
=
req
.
GET
.
get
(
'country'
,
None
)
agent_name
=
req
.
data
.
get
(
'
agentName
'
,
''
)
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'
)
...
...
@@ -200,6 +200,7 @@ class TasksApi(viewsets.ViewSet):
if
agent_name
!=
''
and
agent_name
is
not
None
:
task_condition
[
'agentName'
]
=
agent_name
print
(
task_condition
)
if
sort
==
'des'
:
seats
=
SeatStat
.
objects
.
filter
(
**
task_condition
)
.
extra
(
select
=
{
'agentName'
:
'agentName'
})
\
.
values
(
'agentName'
)
.
annotate
(
remainTime
=
Sum
(
'remainTime'
),
validate_session
=
Sum
(
'validate_session'
),
...
...
static/inspect/js/seat.js
View file @
0baffde9
...
...
@@ -127,13 +127,13 @@ new Vue({
}
this
.
getRule
(
this
.
cityvalue
,
this
.
countryvalue
,
this
.
start_date
,
this
.
end_date
,
this
.
seatvalue
);
// 获取统计数据
},
getRule
(
city
,
country
,
start_date
,
end_date
,
agentName
)
{
getRule
(
city
,
country
,
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
,
agentName
,
page
,
sort
}).
then
(
data
=>
{
RquestsPost
(
'
api/v1/tasks/seat_rule/
'
,
{
city
,
country
,
start_date
,
end_date
,
seat
,
page
,
sort
}).
then
(
data
=>
{
console
.
log
(
data
.
data
);
if
(
data
.
code
!=
0
)
{
that
.
$message
(
data
.
msg
);
...
...
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