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
0881b33a
Commit
0881b33a
authored
May 09, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页、列表页无结果换图;订单cell距离重新计算
parent
38498cb8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
36 deletions
+59
-36
index.vue
src/components/order/index.vue
+25
-21
noOrder.vue
src/components/order/noOrder.vue
+14
-2
index.vue
src/pages/index/index.vue
+3
-3
order.vue
src/pages/index/order.vue
+1
-1
detail.vue
src/pages/order/detail.vue
+12
-7
search.vue
src/pages/order/search.vue
+4
-2
No files found.
src/components/order/index.vue
View file @
0881b33a
...
@@ -280,27 +280,31 @@
...
@@ -280,27 +280,31 @@
}
}
return
address
return
address
},
},
/**
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lon2 经度
* @param float $lat2 维度
* @param float $lat2 维度
* @return float 浮点数
* @return float 浮点数
*/
*/
distance
(
la1
,
lo1
,
la2
,
lo2
)
{
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
var
La1
=
la1
*
Math
.
PI
/
180.0
;
console
.
log
(
lat1
,
lng1
,
lat2
,
lng2
)
var
La2
=
la2
*
Math
.
PI
/
180.0
;
var
radLat1
=
this
.
Rad
(
lat1
);
var
La3
=
La1
-
La2
;
var
radLat2
=
this
.
Rad
(
lat2
);
var
Lb3
=
lo1
*
Math
.
PI
/
180.0
-
lo2
*
Math
.
PI
/
180.0
;
var
a
=
radLat1
-
radLat2
;
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
La3
/
2
),
2
),
Math
.
cos
(
La1
)
*
Math
.
cos
(
La2
)
*
Math
.
pow
(
var
b
=
this
.
Rad
(
lng1
)
-
this
.
Rad
(
lng2
);
Math
.
sin
(
Lb3
/
2
),
2
)));
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
a
/
2
),
2
)
+
s
=
s
*
6378.137
;
//地球半径
Math
.
cos
(
radLat1
)
*
Math
.
cos
(
radLat2
)
*
Math
.
pow
(
Math
.
sin
(
b
/
2
),
2
)));
s
=
Math
.
round
(
s
*
10000
)
/
10000
;
s
=
s
*
6378.137
;
// EARTH_RADIUS;
// console.log("计算结果",s,'KM');
s
=
Math
.
round
(
s
*
10000
)
/
10000
//输出为米
return
s
?
s
.
toFixed
(
2
)
:
0
;
console
.
log
(
"计算结果"
,
s
,
'M'
);
},
return
Number
(
s
?
s
.
toFixed
(
2
):
0
);
},
Rad
(
d
){
return
d
*
Math
.
PI
/
180.0
;
//经纬度转换成三角函数中度分表形式。
},
}
}
}
}
</
script
>
</
script
>
...
...
src/components/order/noOrder.vue
View file @
0881b33a
...
@@ -11,11 +11,23 @@
...
@@ -11,11 +11,23 @@
customStyle
:
{
customStyle
:
{
type
:
String
,
type
:
String
,
default
:
'background-color: #FFFFFF'
default
:
'background-color: #FFFFFF'
},
type
:
{
// 图片
type
:
String
,
default
:
'white'
,
}
}
},
},
computed
:
{
computed
:
{
wudingdanImage
()
{
wudingdanImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'wudingdan.png'
var
name
=
'wudingdan.png'
switch
(
this
.
type
)
{
case
'black'
:
name
=
"zwdd.png"
break
default
:
break
}
return
process
.
uniEnv
.
qn_base_url
+
name
}
}
}
}
}
}
...
...
src/pages/index/index.vue
View file @
0881b33a
...
@@ -115,8 +115,8 @@
...
@@ -115,8 +115,8 @@
computed
:
{
computed
:
{
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
width
:
"
4
00rpx"
,
width
:
"
3
00rpx"
,
height
:
"
104
rpx"
,
height
:
"
80
rpx"
,
"font-size"
:
"32rpx"
,
"font-size"
:
"32rpx"
,
"font-weight"
:
"bold"
,
"font-weight"
:
"bold"
,
};
};
...
@@ -525,7 +525,7 @@
...
@@ -525,7 +525,7 @@
.tip-other
{
.tip-other
{
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#666666
;
color
:
#666666
;
margin-bottom
:
2
0rpx
;
margin-bottom
:
3
0rpx
;
}
}
.settle-button
{}
.settle-button
{}
...
...
src/pages/index/order.vue
View file @
0881b33a
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
scroll-y=
"true"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
scroll-y=
"true"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
refresher-background=
"#F4F5F7"
@
refresherpulling=
"triggered = true"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
@
refresherabort=
"onAbort"
>
@
refresherrestore=
"onRestore"
@
refresherabort=
"onAbort"
>
<NoOrder
v-if=
"noMore"
customStyle=
"margin-top: 100rpx;background-color: #F4F5F7"
/>
<NoOrder
v-if=
"noMore"
type=
"black"
customStyle=
"margin-top: 100rpx;background-color: #F4F5F7"
/>
<template
v-else
>
<template
v-else
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
...
...
src/pages/order/detail.vue
View file @
0881b33a
...
@@ -81,12 +81,17 @@
...
@@ -81,12 +81,17 @@
<view
class=
"order-cell between-cell"
v-for=
"(record,index) in shwoOrderRecords"
:key=
"record.operationContent"
>
<view
class=
"order-cell between-cell"
v-for=
"(record,index) in shwoOrderRecords"
:key=
"record.operationContent"
>
<view
class=
"node-view"
></view>
<view
class=
"node-view"
></view>
<view
class=
"line-view-left"
>
<view
class=
"line-view-left"
>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy.mm.dd
hh:MM:ss'
)
}}
</text>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy.mm.dd
\
n
hh:MM:ss'
)
}}
</text>
</view>
</view>
<text
v-show=
"record.operationType==='报备'"
>
{{
record
.
orderRecordRemark
}}
</text>
<view
class=
"line-view-right"
>
<view
class=
"line-view-right"
>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
'(超时)'
:
''
}}{{
record
.
exception
?
'(异常)'
:
''
}}
</text>
<view>
<text>
{{
record
.
operationType
}}
</text>
<text>
{{
record
.
operationType
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
'(超时)'
:
''
}}{{
record
.
exception
?
'(异常)'
:
''
}}
</text>
</view>
<view
v-show=
"record.operationType==='报备' || record.operationType==='改约'"
>
<text>
{{
record
.
operationType
===
'报备'
?
'下次联系时间:'
:
'改约时间:'
}}
</text>
<text
style=
"color: #2272FF;"
>
{{
record
.
orderRecordRemark
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -903,11 +908,11 @@
...
@@ -903,11 +908,11 @@
margin-left
:
6rpx
;
margin-left
:
6rpx
;
}
}
.line-view-left
{
.line-view-left
{
width
:
2
70rpx
;
width
:
1
70rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.line-view-right
{
.line-view-right
{
text-align
:
right
;
//
text-align: right;
}
}
.
record-line-view
:
:
before
{
.
record-line-view
:
:
before
{
...
@@ -1060,7 +1065,7 @@
...
@@ -1060,7 +1065,7 @@
.between-cell
{
.between-cell
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
//
justify-content: space-between;
align-items
:
flex-start
;
align-items
:
flex-start
;
}
}
.cell-title
{
.cell-title
{
...
...
src/pages/order/search.vue
View file @
0881b33a
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</view>
<view
v-else
=
"search.keywor
d"
class=
"empty-result"
>
<view
v-else
-if=
"loade
d"
class=
"empty-result"
>
<u-image
width=
"374"
height=
"256"
:src=
"searchEmpty"
>
<u-image
width=
"374"
height=
"256"
:src=
"searchEmpty"
>
<u-loading
slot=
"loading"
></u-loading>
<u-loading
slot=
"loading"
></u-loading>
</u-image>
</u-image>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
orderStatusRangeType
:
''
,
orderStatusRangeType
:
''
,
},
},
orderList
:
[],
orderList
:
[],
loaded
:
false
,
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
// 状态处理
// 状态处理
self
.
search
.
pageNumber
+=
1
self
.
search
.
pageNumber
+=
1
self
.
loaded
=
false
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
...
@@ -94,6 +95,7 @@
...
@@ -94,6 +95,7 @@
}
else
{
}
else
{
self
.
$u
.
toast
(
res
.
message
);
self
.
$u
.
toast
(
res
.
message
);
}
}
self
.
loaded
=
true
});
});
},
},
...
...
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