|
@@ -8,6 +8,7 @@
|
|
|
customClass: 'orderDetailModal',
|
|
customClass: 'orderDetailModal',
|
|
|
appendToBody: true,
|
|
appendToBody: true,
|
|
|
}"
|
|
}"
|
|
|
|
|
+ @onClose="close"
|
|
|
>
|
|
>
|
|
|
<!-- 订单详情 -->
|
|
<!-- 订单详情 -->
|
|
|
<el-form
|
|
<el-form
|
|
@@ -221,16 +222,12 @@ export default {
|
|
|
nextStep: false,
|
|
nextStep: false,
|
|
|
id: '', // 主键id
|
|
id: '', // 主键id
|
|
|
form: {},
|
|
form: {},
|
|
|
- arrival: '',
|
|
|
|
|
- depart: '',
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
open(e) {
|
|
open(e) {
|
|
|
this.id = e.id
|
|
this.id = e.id
|
|
|
this.form = {}
|
|
this.form = {}
|
|
|
- this.arrival = ''
|
|
|
|
|
- this.depart = ''
|
|
|
|
|
this.$refs.mv.open(this.title)
|
|
this.$refs.mv.open(this.title)
|
|
|
if (e.auditStatus == '1') {
|
|
if (e.auditStatus == '1') {
|
|
|
this.title = '详情'
|
|
this.title = '详情'
|
|
@@ -242,14 +239,6 @@ export default {
|
|
|
refundOrderDetail({ id: id }).then(res => {
|
|
refundOrderDetail({ id: id }).then(res => {
|
|
|
if (res.code == 200 && res.data) {
|
|
if (res.code == 200 && res.data) {
|
|
|
this.form = res.data
|
|
this.form = res.data
|
|
|
- let Longitude = this.form.arrivalLongitude
|
|
|
|
|
- let numLatitude = +this.form.arrivalLatitude
|
|
|
|
|
- let Latitude = numLatitude.toFixed(6)
|
|
|
|
|
- let location = Longitude + `,` + Latitude
|
|
|
|
|
- let arrival = 'arrival' //到达
|
|
|
|
|
- this.fetchLocation(arrival, location)
|
|
|
|
|
- let depart = 'depart' //出发
|
|
|
|
|
- this.fetchLocation(depart, location)
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -279,26 +268,6 @@ export default {
|
|
|
this.$refs.mv.close()
|
|
this.$refs.mv.close()
|
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
|
},
|
|
},
|
|
|
- /**解析经纬度 */
|
|
|
|
|
- async fetchLocation(title, location) {
|
|
|
|
|
- const key = '5457092e6c62b83c1b2e45dbe973d858'
|
|
|
|
|
- const url = `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${location}&key=${key}&radius=500&extensions=all`
|
|
|
|
|
- try {
|
|
|
|
|
- const response = await fetch(url)
|
|
|
|
|
- const data = await response.json()
|
|
|
|
|
- if (title == 'arrival') {
|
|
|
|
|
- data.regeocode.formatted_address.length > 0
|
|
|
|
|
- ? (this.arrival = data.regeocode.formatted_address)
|
|
|
|
|
- : ''
|
|
|
|
|
- } else if (title == 'depart') {
|
|
|
|
|
- data.regeocode.formatted_address.length > 0
|
|
|
|
|
- ? (this.depart = data.regeocode.formatted_address)
|
|
|
|
|
- : (this.depart = '')
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('请求失败:', error)
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|