diff --git a/src/api/operator.ts b/src/api/operator.ts index de96e3d..a6f7ff4 100644 --- a/src/api/operator.ts +++ b/src/api/operator.ts @@ -1,4 +1,4 @@ -import type { AddInventoryRecordParams, BatchAddInventoryParams, BindEbikeParams } from './types/operator' +import type { AddInventoryRecordParams, BatchAddInventoryParams, BindEbikeParams, CompleteInspectionWorkParams } from './types/operator' import { http } from '@/http/http' /** @@ -75,3 +75,17 @@ export function getEbikeDetailForWorkAPI(bikeCode: string) { export function getAllOperatorRegionAPI() { return http.get(`/operations/ebikeRegion/list`) } + +/** + *车辆列表(工单用) + */ +export function getEbikeListForWorkAPI(regionId: string) { + return http.get(`/operations/ebikeBikeOrder/bikeList`, { regionId }) +} + +/** + *完成巡检工单 + */ +export function completeInspectionWorkAPI(params: CompleteInspectionWorkParams) { + return http.post(`/operations/ebikeBikeOrder/doInspection`, params) +} diff --git a/src/api/types/operator.ts b/src/api/types/operator.ts index 667e96c..49905c4 100644 --- a/src/api/types/operator.ts +++ b/src/api/types/operator.ts @@ -33,3 +33,12 @@ export interface BindEbikeParams { hasHelme: boolean // 是否有头盔 remarks?: string // 备注 } + +// 完成巡检工单 +export interface CompleteInspectionWorkParams { + bikeCode: string // 车辆编号 + beforeInspectionFileUrls: string[] // 巡检前图片 + afterInspectionFileUrls: string[] // 巡检后图片 + isFault: boolean + remarks: string +} diff --git a/src/components/instructTools/instructTools.vue b/src/components/instructTools/instructTools.vue index 0c9ca41..25300ed 100644 --- a/src/components/instructTools/instructTools.vue +++ b/src/components/instructTools/instructTools.vue @@ -99,6 +99,7 @@ async function handleBtnClick(value: any, key: string, index: number) { } watch(() => props.bikeCode, (val) => { + console.log(val, '2222') bikecode.value = val }) diff --git a/src/pages-sub/warehouse/faultReporting/faultReporting.vue b/src/pages-sub/warehouse/faultReporting/faultReporting.vue index edddf2e..6841bb4 100644 --- a/src/pages-sub/warehouse/faultReporting/faultReporting.vue +++ b/src/pages-sub/warehouse/faultReporting/faultReporting.vue @@ -86,10 +86,12 @@ async function afterRead(event: any) { }, }) formData.value.fileUrls.push(result[0]) + console.log(result) + fileList.value.splice(fileListLen, 1, Object.assign(item, { status: 'success', message: '', - url: result[0].fileUrl, + url: result[0], })) fileListLen++ } diff --git a/src/pages-sub/warehouse/polling/polling.vue b/src/pages-sub/warehouse/polling/polling.vue new file mode 100644 index 0000000..7867551 --- /dev/null +++ b/src/pages-sub/warehouse/polling/polling.vue @@ -0,0 +1,484 @@ + + + + + diff --git a/src/pages/home/home.vue b/src/pages/home/home.vue index 2f1b911..df4eabe 100644 --- a/src/pages/home/home.vue +++ b/src/pages/home/home.vue @@ -1,5 +1,5 @@