fix(工单管理): 涉及地图车辆位置修改
This commit is contained in:
parent
951528dada
commit
bc8cbe5e8d
@ -12,8 +12,8 @@
|
|||||||
<view class="map_container">
|
<view class="map_container">
|
||||||
<map-exhibition
|
<map-exhibition
|
||||||
:map-location="{
|
:map-location="{
|
||||||
latitude: routeQuery.startLocation?.latitude,
|
latitude: bikeDetails.location?.latitude,
|
||||||
longitude: routeQuery.startLocation?.longitude,
|
longitude: bikeDetails.location?.longitude,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@ -63,6 +63,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { getEbikeDetailForWorkAPI } from '@/api/operator'
|
||||||
import { changePriceApi } from '@/api/order-manage'
|
import { changePriceApi } from '@/api/order-manage'
|
||||||
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
|
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
|
||||||
import { systemInfo } from '@/utils/systemInfo'
|
import { systemInfo } from '@/utils/systemInfo'
|
||||||
@ -103,11 +104,14 @@ const btnConfig = reactive({
|
|||||||
btnLoadingText: '正在提交',
|
btnLoadingText: '正在提交',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const bikeDetails = ref<any>({})
|
||||||
const routeQuery = ref<any>({})
|
const routeQuery = ref<any>({})
|
||||||
onLoad((options) => {
|
onLoad(async (options) => {
|
||||||
const data = JSON.parse(decodeURIComponent(options.data))
|
const data = JSON.parse(decodeURIComponent(options.data))
|
||||||
routeQuery.value = data
|
routeQuery.value = data
|
||||||
formData.bikeCode = data.bikeCode
|
formData.bikeCode = data.bikeCode
|
||||||
|
bikeDetails.value = await getBikeDetails(data.bikeCode)
|
||||||
|
console.log(bikeDetails.value, 'bikeDetails.value')
|
||||||
})
|
})
|
||||||
|
|
||||||
const form = ref<any>(null)
|
const form = ref<any>(null)
|
||||||
@ -133,6 +137,10 @@ async function submitForm() {
|
|||||||
btnConfig.btnLoading = false
|
btnConfig.btnLoading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getBikeDetails(bikeCode: string) {
|
||||||
|
return await getEbikeDetailForWorkAPI(bikeCode)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
<view class="map_container">
|
<view class="map_container">
|
||||||
<map-exhibition
|
<map-exhibition
|
||||||
:map-location="{
|
:map-location="{
|
||||||
latitude: routeQuery.startLocation?.latitude,
|
latitude: bikeDetails.location?.latitude,
|
||||||
longitude: routeQuery.startLocation?.longitude,
|
longitude: bikeDetails.location?.longitude,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { getEbikeDetailForWorkAPI } from '@/api/operator'
|
||||||
import { lockBikeApi } from '@/api/order-manage'
|
import { lockBikeApi } from '@/api/order-manage'
|
||||||
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
|
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
|
||||||
import { systemInfo } from '@/utils/systemInfo'
|
import { systemInfo } from '@/utils/systemInfo'
|
||||||
@ -81,12 +82,19 @@ const btnConfig = reactive({
|
|||||||
btnLoadingText: '正在锁车中...',
|
btnLoadingText: '正在锁车中...',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const bikeDetails = ref<any>({})
|
||||||
const routeQuery = ref<any>({})
|
const routeQuery = ref<any>({})
|
||||||
onLoad((options) => {
|
onLoad(async (options) => {
|
||||||
const data = JSON.parse(decodeURIComponent(options.data))
|
const data = JSON.parse(decodeURIComponent(options.data))
|
||||||
routeQuery.value = data
|
routeQuery.value = data
|
||||||
|
bikeDetails.value = await getBikeDetails(data.bikeCode)
|
||||||
|
console.log(bikeDetails.value, 'bikeDetails.value')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
async function getBikeDetails(bikeCode: string) {
|
||||||
|
return await getEbikeDetailForWorkAPI(bikeCode)
|
||||||
|
}
|
||||||
|
|
||||||
const form = ref<any>(null)
|
const form = ref<any>(null)
|
||||||
async function submitForm() {
|
async function submitForm() {
|
||||||
await form.value.validate()
|
await form.value.validate()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user