From 87b4a35ac7c4178bedf6f27ba35a0f2e5ec83bf3 Mon Sep 17 00:00:00 2001 From: 5g0Wp7Zy Date: Fri, 5 Dec 2025 16:57:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/operator.ts | 16 +- src/api/types/operator.ts | 9 + .../instructTools/instructTools.vue | 1 + .../faultReporting/faultReporting.vue | 4 +- src/pages-sub/warehouse/polling/polling.vue | 484 ++++++++++++++++++ src/pages/home/home.vue | 137 +++-- src/pages/me/me.vue | 6 +- src/store/app.ts | 4 +- src/style/iconfont.css | 6 +- src/style/index.scss | 61 +++ src/utils/map.ts | 1 + ....timestamp-1764924993165-1a68b7648e66d.mjs | 381 ++++++++++++++ 12 files changed, 1061 insertions(+), 49 deletions(-) create mode 100644 src/pages-sub/warehouse/polling/polling.vue create mode 100644 vite.config.ts.timestamp-1764924993165-1a68b7648e66d.mjs 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 @@