拼接数量
This commit is contained in:
parent
b6bd178568
commit
9e0b8f11f4
@ -180,9 +180,7 @@
|
||||
v-if="item.robotCodeLevel == 1"
|
||||
>
|
||||
<template #content>
|
||||
<span style="font-size: 14px; color: #fff"
|
||||
>{{ item.robotCodeMsg || '' }}
|
||||
</span>
|
||||
<span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
|
||||
<span
|
||||
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
|
||||
@click="goMoreError(item)"
|
||||
@ -199,9 +197,7 @@
|
||||
v-if="item.robotCodeLevel == 2"
|
||||
>
|
||||
<template #content>
|
||||
<span style="font-size: 14px; color: #fff"
|
||||
>{{ item.robotCodeMsg || '' }}
|
||||
</span>
|
||||
<span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
|
||||
<span
|
||||
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
|
||||
@click="goMoreError(item)"
|
||||
@ -218,9 +214,7 @@
|
||||
v-if="item.robotCodeLevel == 3"
|
||||
>
|
||||
<template #content>
|
||||
<span style="font-size: 14px; color: #fff"
|
||||
>{{ item.robotCodeMsg || '' }}
|
||||
</span>
|
||||
<span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
|
||||
<span
|
||||
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
|
||||
@click="goMoreError(item)"
|
||||
@ -237,9 +231,7 @@
|
||||
v-if="item.robotCodeLevel == 4"
|
||||
>
|
||||
<template #content>
|
||||
<span style="font-size: 14px; color: #fff"
|
||||
>{{ item.robotCodeMsg || '' }}
|
||||
</span>
|
||||
<span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
|
||||
<span
|
||||
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
|
||||
@click="goMoreError(item)"
|
||||
@ -351,7 +343,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import JSONBigInt from 'json-bigint'
|
||||
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||
import * as CarApi from '@/api/car/index'
|
||||
import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router'
|
||||
@ -478,15 +469,15 @@ const stopCar = (robotNo) => {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
CarApi.stopCar({ robotNo }).then((res) => {
|
||||
getCarList()
|
||||
fetchData()
|
||||
message.success('暂停成功')
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const changeRobotStatisticsType = (type) => {
|
||||
@ -700,9 +691,7 @@ onBeforeRouteLeave((to, from, next) => {
|
||||
}
|
||||
|
||||
.new-top-box-left-title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #0d162a;
|
||||
@ -711,9 +700,7 @@ onBeforeRouteLeave((to, from, next) => {
|
||||
.new-top-box-left-statistics {
|
||||
padding: 5px 7px;
|
||||
margin-left: 4px;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #0d162a;
|
||||
@ -732,9 +719,7 @@ onBeforeRouteLeave((to, from, next) => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
padding: 5px 10px;
|
||||
@ -809,9 +794,7 @@ input::input-placeholder {
|
||||
.item-inner-left-name {
|
||||
flex: 1;
|
||||
margin-right: 5px;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
width: 0;
|
||||
@ -837,9 +820,7 @@ input::input-placeholder {
|
||||
}
|
||||
|
||||
.item-inner-left-bottom-btn {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #1677ff;
|
||||
@ -882,9 +863,7 @@ input::input-placeholder {
|
||||
}
|
||||
|
||||
.item-inner-right-msg-item-name {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
"PingFang SC";
|
||||
font-family: PingFangSC, 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
width: 60px;
|
||||
|
@ -966,6 +966,7 @@
|
||||
@click.stop
|
||||
>
|
||||
<div class="context-menu-item" @click="deleteSingleNode">删除</div>
|
||||
<div class="context-menu-item" @click="contextMenuEditNode">编辑节点</div>
|
||||
<div
|
||||
class="context-menu-item"
|
||||
@click="generateDetectionPoint"
|
||||
@ -1233,6 +1234,7 @@ const activatedHandle = (item, index) => {
|
||||
editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list)
|
||||
}
|
||||
}
|
||||
|
||||
//非选中
|
||||
const deactivatedHandle = () => {}
|
||||
|
||||
@ -2126,7 +2128,7 @@ const hideContextMenu = () => {
|
||||
state.contextMenu.currentIndex = -1
|
||||
}
|
||||
|
||||
//删除
|
||||
//右击删除
|
||||
const deleteSingleNode = () => {
|
||||
if (state.contextMenu.currentIndex !== -1) {
|
||||
let deleteId = state.allMapPointInfo[state.contextMenu.currentIndex].id
|
||||
@ -2144,14 +2146,32 @@ const deleteSingleNode = () => {
|
||||
}
|
||||
}
|
||||
|
||||
//右击编辑
|
||||
const contextMenuEditNode = () => {
|
||||
if (state.contextMenu.currentItem.type !== 7) {
|
||||
let list = state.allMapPointInfo.filter((item) => item.type === 3)
|
||||
removeEventListener() //移除监听
|
||||
editNodePropertiesRef.value.open(
|
||||
JSON.parse(JSON.stringify(state.contextMenu.currentItem)),
|
||||
list
|
||||
)
|
||||
// 隐藏右击菜单
|
||||
hideContextMenu()
|
||||
}
|
||||
}
|
||||
|
||||
//生成检测点
|
||||
const generateDetectionPoint = async () => {
|
||||
if (state.contextMenu.currentIndex === -1) return
|
||||
if (!state.contextMenu.currentItem.id) {
|
||||
return message.warning('该库位未保存')
|
||||
}
|
||||
|
||||
const { locationX, locationY, locationYaw } = state.contextMenu.currentItem
|
||||
const { locationX, locationY, locationYaw, id, actualLocationX, actualLocationY } =
|
||||
state.contextMenu.currentItem
|
||||
|
||||
const newId = await MapApi.getNodeId()
|
||||
const distance = 1 / Number(imgBgObj.resolution) //距离米
|
||||
const distance = 2 / Number(imgBgObj.resolution) //距离米
|
||||
|
||||
// 将弧度转换为角度(用于理解,实际计算仍使用弧度)
|
||||
const angle = locationYaw * (180 / Math.PI)
|
||||
@ -2170,6 +2190,7 @@ const generateDetectionPoint = async () => {
|
||||
|
||||
if (!isDuplicate) {
|
||||
let actualPoint = disposeEventPoint(newX, newY)
|
||||
//检测点
|
||||
let pointItem = {
|
||||
id: newId,
|
||||
positionMapId: imgBgObj.positionMapId,
|
||||
@ -2194,19 +2215,19 @@ const generateDetectionPoint = async () => {
|
||||
dataObj: {}
|
||||
}
|
||||
|
||||
//生成监测点和库位之间的路线 不确定开始点是库位还是检测点
|
||||
//生成监测点和库位之间的路线 这里把监测点当开始点 库位当结束点
|
||||
let newRoute = {
|
||||
isSelected: false,
|
||||
startingPointId: undefined,
|
||||
endPointId: undefined,
|
||||
startPointX: undefined,
|
||||
startPointY: undefined,
|
||||
endPointX: undefined,
|
||||
endPointY: undefined,
|
||||
actualStartPointX: undefined,
|
||||
actualStartPointY: undefined,
|
||||
actualEndPointX: undefined,
|
||||
actualEndPointY: undefined,
|
||||
startingPointId: newId,
|
||||
endPointId: id,
|
||||
startPointX: newX,
|
||||
startPointY: newY,
|
||||
actualStartPointX: actualPoint.actualLocationX,
|
||||
actualStartPointY: actualPoint.actualLocationY,
|
||||
endPointX: locationX,
|
||||
endPointY: locationY,
|
||||
actualEndPointX: actualLocationX,
|
||||
actualEndPointY: actualLocationY,
|
||||
actualBeginControlX: '',
|
||||
actualBeginControlY: '',
|
||||
actualEndControlX: '',
|
||||
@ -2221,17 +2242,19 @@ const generateDetectionPoint = async () => {
|
||||
expansionZoneRight: 0,
|
||||
method: 0,
|
||||
direction: 2, //1单2双
|
||||
forwardSpeedLimit: 1.5,
|
||||
reverseSpeedLimit: 0.4,
|
||||
forwardSpeedLimit: 0.4,
|
||||
reverseSpeedLimit: 0.2,
|
||||
toward: 0,
|
||||
startingSortNum: undefined,
|
||||
endPointSortNum: undefined
|
||||
endPointSortNum: undefined,
|
||||
startToEndToward: 1, //开始点到结束点
|
||||
endToStartToward: 0 //结束点到开始点
|
||||
}
|
||||
|
||||
// 将新创建的点添加到地图点列表中
|
||||
state.allMapPointInfo.push(pointItem)
|
||||
//将路线加入到路线列表中
|
||||
// state.mapRouteList.push(newRoute)
|
||||
state.mapRouteList.push(newRoute)
|
||||
|
||||
addEditHistory()
|
||||
// 隐藏右击菜单
|
||||
|
@ -49,7 +49,7 @@
|
||||
class="!w-220px"
|
||||
v-model="formData.montageNumber"
|
||||
:min="1"
|
||||
:max="10"
|
||||
:max="100"
|
||||
@change="montageNumberChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
Loading…
Reference in New Issue
Block a user