From 0494d9477eecc3766f51ad24b58439a107466b40 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Fri, 7 Mar 2025 16:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BB=BB=E5=8A=A1=E6=97=B6?= =?UTF-8?q?=20=E9=80=89=E6=8B=A9=E8=BD=A6=E8=BE=86=20=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components-tool/editNodeProperties.vue | 39 ++++++++++++--- src/views/mapPage/realTimeMap/editMap.vue | 7 +++ .../mapPage/taskManagement/createTask.vue | 47 ++++++++++++++++--- 3 files changed, 79 insertions(+), 14 deletions(-) diff --git a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue index 5b7ac522..b56efab9 100644 --- a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue +++ b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue @@ -43,7 +43,13 @@ > - + { form.value.inDirection = null form.value.outDirection = null form.value.locationNumber = null - form.value.locationDeep = 50 - form.value.locationWide = 50 - form.value.locationDeepPx = 10 - form.value.locationWidePx = 10 + form.value.locationDeep = 40 + form.value.locationWide = 40 + form.value.locationDeepPx = 8 + form.value.locationWidePx = 8 } else if (type === 2) { - form.value.locationNumber = 1 + form.value.locationNumber = null + if (!form.value.id) { + form.value.locationDeep = 150 + form.value.locationWide = 150 + form.value.locationDeepPx = 30 + form.value.locationWidePx = 30 + } } else if (type === 3) { form.value.direction = null form.value.inDirection = null form.value.outDirection = null form.value.locationNumber = null + if (!form.value.id) { + form.value.locationDeep = 150 + form.value.locationWide = 150 + form.value.locationDeepPx = 30 + form.value.locationWidePx = 30 + } } else if (type === 4) { form.value.direction = null form.value.inDirection = null form.value.outDirection = null form.value.locationNumber = null + if (!form.value.id) { + form.value.locationDeep = 150 + form.value.locationWide = 150 + form.value.locationDeepPx = 30 + form.value.locationWidePx = 30 + } } else if (type === 5) { form.value.layersNumber = null form.value.direction = null diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index cf4dd6c7..9c5598a5 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -1974,6 +1974,13 @@ const clickDrawSelectionArea = () => { message.warning('至少框选三个点') return } + let isHaveId = routeList.every((item) => { + return item.id + }) + if (!isHaveId) { + message.warning('您选择的路径点存在未保存的') + return + } const list = mapPointsToLine(routeList) const idNameMap = {} list.forEach((item) => { diff --git a/src/views/mapPage/taskManagement/createTask.vue b/src/views/mapPage/taskManagement/createTask.vue index a9b4fe4a..0db411a0 100644 --- a/src/views/mapPage/taskManagement/createTask.vue +++ b/src/views/mapPage/taskManagement/createTask.vue @@ -298,7 +298,11 @@ - + - + - + - + - + { //车辆切换 const robotNoChange = (e, detailItem) => { - let car = robotList.value.filter((item) => { + let car = robotList.value.find((item) => { return item.robotNo == e }) - detailItem.electricity = car[0].electricity + detailItem.electricity = car.electricity + + if (car?.errorMsg) { + message.warning(car.errorMsg) + } } //任务类型切换 @@ -1073,6 +1097,15 @@ const releaseTypeChange = (item) => { item.releaseId = undefined } +//选择车辆 +const chooseCarErrorMsg = (e) => { + let carItem = robotList.value.find((item) => item.robotNo === e) + + if (carItem?.errorMsg) { + message.warning(carItem.errorMsg) + } +} + //提交表单 const formRef = ref() const formLoading = ref(false)