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