|
|
@@ -116,7 +116,7 @@ import { request } from '@/utils/request'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
import { getCurrentLocation, ensureLocationAuth } from '@/utils/location'
|
|
|
|
|
|
-const taskId = ref<number>(0)
|
|
|
+const taskId = ref<string>('')
|
|
|
const readonly = ref<boolean>(false)
|
|
|
const task = ref<Partial<InspectionTask>>({})
|
|
|
const items = ref<InspectionItem[]>([])
|
|
|
@@ -127,7 +127,8 @@ const pickedLocation = ref<string>('')
|
|
|
const pickedCoord = ref<{ lng: number; lat: number } | null>(null)
|
|
|
|
|
|
onLoad((q) => {
|
|
|
- taskId.value = Number(q?.taskId || 0)
|
|
|
+ // 注意:taskId 是大数(雪花 ID),Number() 会丢精度,必须全程用 string
|
|
|
+ taskId.value = String(q?.taskId || '')
|
|
|
readonly.value = q?.readonly === '1'
|
|
|
// 扫码页会带 lng/lat 过来,作为初值(用户仍可在地图上重新选点)
|
|
|
if (q?.lng && q?.lat) {
|
|
|
@@ -151,6 +152,7 @@ async function loadDetail() {
|
|
|
task.value = data
|
|
|
items.value = (data.items || []).map((it) => ({
|
|
|
...it,
|
|
|
+ needPhoto: it.needPhoto === '1' || it.needPhoto === true,
|
|
|
result: undefined,
|
|
|
reason: '',
|
|
|
photos: []
|