From 35cf75f37790e382726413078bf1507afdce900d Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Tue, 21 Apr 2026 09:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=B7=AF=E7=BA=BF=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/system/InspectionRoute/type.ts | 16 +- .../inspection/Point/addInspectionPoint.vue | 5 +- .../inspection/Route/addInspectionRoute.vue | 436 ++++++++++++------ src/views/system/inspection/Route/index2.vue | 2 +- 5 files changed, 302 insertions(+), 161 deletions(-) diff --git a/.env.development b/.env.development index 2655cb4..fc339fe 100644 --- a/.env.development +++ b/.env.development @@ -8,8 +8,10 @@ VITE_APP_ENV = 'development' # 开发环境 VITE_APP_BASE_API = '/dev-api' +# # 开发环境 接口代理地址 +# VITE_APP_PROXY_API = 'http://192.168.1.222:8080' # 开发环境 接口代理地址 -VITE_APP_PROXY_API = 'http://192.168.1.222:8080' +VITE_APP_PROXY_API = 'http://192.168.1.215:8080' # 图片基础地址 VITE_IMG_URL = 'http://192.168.1.222:8080' diff --git a/src/api/system/InspectionRoute/type.ts b/src/api/system/InspectionRoute/type.ts index 500d912..44197ce 100644 --- a/src/api/system/InspectionRoute/type.ts +++ b/src/api/system/InspectionRoute/type.ts @@ -1,3 +1,5 @@ +import { PointVO } from '../InspectionPoint/type'; + export interface RouteVO { /** * 主键ID @@ -33,7 +35,7 @@ export interface RouteVO { * 巡检路线状态 0开启 1关闭 */ - routeStatus: number; + routeStatus: string; /** * 起点经度 @@ -54,9 +56,15 @@ export interface RouteVO { * 终点纬度 */ endLat: string; + /** 路线经纬度 二维数组 */ + pathPoints: string; + /** 巡检点 数组 */ + points?: PointVO[]; } export interface RouteForm extends BaseEntity { + /** 路线经纬度 二维数组 */ + pathPoints: string; /** * 主键ID */ @@ -91,7 +99,7 @@ export interface RouteForm extends BaseEntity { * 巡检路线状态 0开启 1关闭 */ - routeStatus?: number; + routeStatus?: string; /** * 起点经度 @@ -115,6 +123,8 @@ export interface RouteForm extends BaseEntity { } export interface RouteQuery extends PageQuery { + /** 路线经纬度 二维数组 */ + pathPoints: string; /** * 巡检路线名称 */ @@ -139,7 +149,7 @@ export interface RouteQuery extends PageQuery { * 巡检路线状态 0开启 1关闭 */ - routeStatus?: number; + routeStatus?: string; /** * 起点经度 diff --git a/src/views/system/inspection/Point/addInspectionPoint.vue b/src/views/system/inspection/Point/addInspectionPoint.vue index ab1524f..6f3170f 100644 --- a/src/views/system/inspection/Point/addInspectionPoint.vue +++ b/src/views/system/inspection/Point/addInspectionPoint.vue @@ -121,9 +121,6 @@ function init() { if (res.data.itemId) { checkoutPointItemlist.value = res.data.itemId.split(','); } - nextTick(() => { - initLocation(); - }); }); } } @@ -158,7 +155,7 @@ const cancelForm = () => { // ! map const mapReady = ref(false); -let map = ref(null); +const map = ref(null); const marker = ref(null); const villageid = localStorage.getItem('villageid'); onMounted(async () => { diff --git a/src/views/system/inspection/Route/addInspectionRoute.vue b/src/views/system/inspection/Route/addInspectionRoute.vue index ab1524f..178e812 100644 --- a/src/views/system/inspection/Route/addInspectionRoute.vue +++ b/src/views/system/inspection/Route/addInspectionRoute.vue @@ -5,42 +5,45 @@