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
8d78ae70
Commit
8d78ae70
authored
Apr 29, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单cell倒计时结束变超时
parent
2c729a1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
index.vue
src/components/order/index.vue
+28
-15
feedback.vue
src/pages/order/feedback.vue
+1
-1
No files found.
src/components/order/index.vue
View file @
8d78ae70
...
@@ -32,9 +32,9 @@
...
@@ -32,9 +32,9 @@
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view>
<view>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'
will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<view
:class=
"['bottom-tag-view',
{'
timeout': timeout}]">
<text>
{{
tagText
}}
</text>
</view>
<u-count-down
:timestamp=
"
orderData.currentWillOverTime || orderData.currentOverTime
"
font-size=
"44"
<u-count-down
:timestamp=
"
timestamp
"
font-size=
"44"
color=
"#FF930D
"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
:color=
"timeout ? '#FA5A49' : '#FF930D'
"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
</view>
</view>
<view
v-else-if=
"showTime"
>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeTitle
}}
</text>
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
orderStatus
:
0
,
// 工单状态
orderStatus
:
0
,
// 工单状态
appointmentDatetime
:
''
,
// 预约时间
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
0
,
// 超过时间
currentOverTime
:
new
Date
().
getTime
()
+
10000
,
// 超过时间点
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
auditResults
:
{},
// 审核结果
...
@@ -97,7 +97,8 @@
...
@@ -97,7 +97,8 @@
},
},
data
()
{
data
()
{
return
{
return
{
timeout
:
false
,
timestamp
:
0
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -204,8 +205,8 @@
...
@@ -204,8 +205,8 @@
return
this
.
orderData
.
orderServiceType
==
'安装'
return
this
.
orderData
.
orderServiceType
==
'安装'
},
},
tagText
()
{
tagText
()
{
return
this
.
orderData
.
currentWillOverTime
?
'剩'
:
'超
'
return
this
.
timeout
?
'超'
:
'剩
'
},
},
timeText
()
{
timeText
()
{
return
this
.
orderType
==
4
?
this
.
orderData
.
submissionTime
:
this
.
orderData
.
auditDatetime
return
this
.
orderType
==
4
?
this
.
orderData
.
submissionTime
:
this
.
orderData
.
auditDatetime
},
},
...
@@ -232,6 +233,10 @@
...
@@ -232,6 +233,10 @@
orderType
()
{
orderType
()
{
return
this
.
types
[
this
.
type
]
return
this
.
types
[
this
.
type
]
}
}
},
created
()
{
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
new
Date
().
getTime
()
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
new
Date
().
getTime
())
/
1000
)
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
...
@@ -241,8 +246,15 @@
...
@@ -241,8 +246,15 @@
handleClickCell
()
{
handleClickCell
()
{
this
.
$emit
(
'click'
)
this
.
$emit
(
'click'
)
},
},
handleChange
(
timestamp
)
{
handleChange
(
timestamp
)
{
if
(
this
.
orderData
.
currentOverTime
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
console
.
log
(
timestamp
)
if
(
this
.
timeout
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
if
(
timestamp
==
0
&&
!
this
.
timeout
)
{
setTimeout
(()
=>
{
this
.
timestamp
=
1
this
.
timeout
=
true
},
1000
)
}
},
},
getDistance
(
Latitud
,
Longitud
)
{
getDistance
(
Latitud
,
Longitud
)
{
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
location
[
0
],
this
.
location
[
1
])
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
location
[
0
],
this
.
location
[
1
])
...
@@ -389,18 +401,19 @@
...
@@ -389,18 +401,19 @@
align-items
:
center
;
align-items
:
center
;
.bottom-tag-view
{
.bottom-tag-view
{
text-align
:
center
;
width
:
52rpx
;
width
:
52rpx
;
height
:
52rpx
;
height
:
52rpx
;
border-radius
:
26rpx
;
border-radius
:
26rpx
;
line-height
:
56rpx
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
font-size
:
26rpx
;
background-color
:
#FA5A49
;
background-color
:
#FF930D
;
margin-right
:
20rpx
;
margin-right
:
20rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
&
.
will
{
&
.
timeout
{
background-color
:
#F
F930D
;
background-color
:
#F
A5A49
;
}
}
}
}
}
}
...
...
src/pages/order/feedback.vue
View file @
8d78ae70
...
@@ -420,7 +420,7 @@
...
@@ -420,7 +420,7 @@
margin-right
:
-24rpx
;
margin-right
:
-24rpx
;
.txt-item
{
.txt-item
{
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
24rpx
38
rpx
;
padding
:
24rpx
24
rpx
;
width
:
196rpx
;
width
:
196rpx
;
height
:
72rpx
;
height
:
72rpx
;
text-align
:
center
;
text-align
:
center
;
...
...
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