Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李俊赕
self-support
Commits
c7fb3d08
Commit
c7fb3d08
authored
Aug 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve: 订单列表中,异常单、审核中、已完工不需要排序,所以要分页
parent
e63794f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
fiveOrders.vue
src/components/order/fiveOrders.vue
+1
-1
order.vue
src/pages/index/order.vue
+25
-8
list.vue
src/pages/mine/order/list.vue
+1
-1
No files found.
src/components/order/fiveOrders.vue
View file @
c7fb3d08
...
@@ -114,7 +114,7 @@ export default {
...
@@ -114,7 +114,7 @@ export default {
showCountTime
,
showCountTime
,
})
})
},
},
handleClickButton
(
item
,
type
)
{
handleClickButton
(
item
,
type
,
showCountTime
)
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
// 去完工
// 去完工
...
...
src/pages/index/order.vue
View file @
c7fb3d08
...
@@ -110,7 +110,6 @@ export default {
...
@@ -110,7 +110,6 @@ export default {
return
{
return
{
curNow
:
0
,
curNow
:
0
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
1000
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[
orderList
:
[
// 用多个数组存储可以优化用户切换体验,但是会增加内存
// 用多个数组存储可以优化用户切换体验,但是会增加内存
[[],
[],
[],
[],
[],
[]],
[[],
[],
[],
[],
[],
[]],
...
@@ -174,10 +173,26 @@ export default {
...
@@ -174,10 +173,26 @@ export default {
subList
()
{
subList
()
{
return
[
'全部订单'
,
'今日订单'
]
return
[
'全部订单'
,
'今日订单'
]
},
},
// 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工'
// 0 全部订单: 0:'待预约', 1:'待签到', 2:'待完工', 3:'审核中', 4:'异常单', 5'已完工'
// 1 今日订单: 0:'待联系', 1:'待完工', 2:'异常单'
orderType
()
{
orderType
()
{
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
},
},
pageSize
()
{
// 待预约, 待签到,待完工,因为需要排序,所以暂时去掉分页,一次要完所有
return
this
.
pageSizes
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
},
needSort
()
{
// 待预约, 待签到,待完工需要排序
return
this
.
current
+
this
.
current
[
this
.
curNow
]
<
3
},
pageSizes
()
{
// 待预约, 待签到,待完工,因为需要排序,所以暂时去掉分页,一次要完所有
return
[
[
10000
,
10000
,
10000
,
15
,
15
,
15
],
[
10000
,
10000
,
15
],
]
},
offset
()
{
offset
()
{
return
[
return
[
[
0
,
0
],
[
0
,
0
],
...
@@ -302,12 +317,14 @@ export default {
...
@@ -302,12 +317,14 @@ export default {
self
.
types
[
this
.
curNow
][
res
.
data
.
type
]
self
.
types
[
this
.
curNow
][
res
.
data
.
type
]
].
total
=
res
.
data
.
total
].
total
=
res
.
data
.
total
}
}
if
(
this
.
needSort
)
{
self
.
orderList
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]].
sort
(
// 待预约, 待签到,待完工需要排序
(
x
,
y
)
=>
{
self
.
orderList
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]].
sort
(
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
(
x
,
y
)
=>
{
}
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
)
}
)
}
self
.
loadStatus
=
self
.
loadStatus
=
res
.
data
.
total
>
res
.
data
.
total
>
...
...
src/pages/mine/order/list.vue
View file @
c7fb3d08
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
1000
,
// 因为需要排序,所以暂时去掉分页
pageSize
:
1000
0
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[],
orderList
:
[],
loadStatus
:
'loading'
,
loadStatus
:
'loading'
,
dataValue
:
[],
dataValue
:
[],
...
...
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