From 32a0d7d4b1b235e4a49f07268ee3e303595d0cfd Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Thu, 1 Sep 2022 16:53:36 +0800 Subject: [PATCH] =?UTF-8?q?:rocket:=20=E5=9C=B0=E5=9B=BE=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=B0=83=E6=95=B4=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/common/controller/mapLogistic.ts | 7 +-- src/api/platform/common/entity/mapLogistic.ts | 20 ++++---- .../platform/common/entity/mapTaskPreset.ts | 1 + .../AMap/src/AMapDesigner/index.vue | 51 +++++++++++++++---- src/components/AMap/src/amap.data.tsx | 20 -------- .../AMap/src/components/MapPointModal.vue | 7 +-- .../AMap/src/components/MapTaskModal.vue | 5 +- src/enums/amapEnum.ts | 19 +++---- .../common/mapLogistic/MapLogisticModal.vue | 30 ++++------- src/views/common/mapLogistic/index.vue | 2 +- 10 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/api/platform/common/controller/mapLogistic.ts b/src/api/platform/common/controller/mapLogistic.ts index 1107161..db3fc5f 100644 --- a/src/api/platform/common/controller/mapLogistic.ts +++ b/src/api/platform/common/controller/mapLogistic.ts @@ -9,16 +9,13 @@ import { defHttp } from '/@/utils/http/axios'; enum Api { list = '/common_proxy/common/mapLogistic/list', get = '/common_proxy/common/mapLogistic', - add = '/common_proxy/common/mapLogistic/save', - edit = '/common_proxy/common/mapLogistic/update', + saveOrUpdate = '/common_proxy/common/mapLogistic/saveOrUpdate', del = '/common_proxy/common/mapLogistic/remove' } export const listMapLogistic = (params?: Partial) => defHttp.get({ url: Api.list, params }, { isReturnResultResponse: true }); -export const addMapLogistic = (params: Partial) => defHttp.post({ url: Api.add, data: params }); - -export const editMapLogistic = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); +export const saveOrUpdateMapLogistic = (params: Partial) => defHttp.post({ url: Api.saveOrUpdate, data: params }); export const getMapLogistic = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); diff --git a/src/api/platform/common/entity/mapLogistic.ts b/src/api/platform/common/entity/mapLogistic.ts index 4790e3b..a23da50 100644 --- a/src/api/platform/common/entity/mapLogistic.ts +++ b/src/api/platform/common/entity/mapLogistic.ts @@ -11,22 +11,24 @@ import type { CommonEntity, Page } from '/@/api/common/data/entity'; export type MapLogisticParams = Page & MapLogistic; -export interface MapLogistic extends CommonEntity { - id: string; +export interface MapLogistic extends Partial { + id?: string; name: string; courierUserId: string; courierUserName: string; - courierLng: number; - courierLat: number; + courierLng: Nullable; + courierLat: Nullable; sendOrderId: string; sendOrderName: string; - sendOrderLng: number; - sendOrderLat: number; - fileId: string; + sendOrderLng: Nullable; + sendOrderLat: Nullable; + fileId: string | string[]; estimateTime: string; requireTime: string; - batchCode: string; - version: string; + batchCode?: string; + version?: string; + mapTask: Recordable[]; + mapLogisticPoint: Recordable[]; } export type MapLogisticResult = R; diff --git a/src/api/platform/common/entity/mapTaskPreset.ts b/src/api/platform/common/entity/mapTaskPreset.ts index a53a1ab..117c9e3 100644 --- a/src/api/platform/common/entity/mapTaskPreset.ts +++ b/src/api/platform/common/entity/mapTaskPreset.ts @@ -23,6 +23,7 @@ export interface MapTaskPreset extends CommonEntity { destinationPresetLng: number; destinationPresetLat: number; courierUserId: string; + key: string; fileId: string; estimateTime: string; requireTime: string; diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index 65ff78c..e74e44d 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -69,8 +69,20 @@ diff --git a/src/views/common/mapLogistic/index.vue b/src/views/common/mapLogistic/index.vue index c353550..25b44e6 100644 --- a/src/views/common/mapLogistic/index.vue +++ b/src/views/common/mapLogistic/index.vue @@ -3,7 +3,7 @@