拼接数量

This commit is contained in:
yyy 2025-06-27 16:35:01 +08:00
parent b6bd178568
commit 9e0b8f11f4
3 changed files with 56 additions and 54 deletions

View File

@ -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;

View File

@ -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, //12
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()
//

View File

@ -49,7 +49,7 @@
class="!w-220px"
v-model="formData.montageNumber"
:min="1"
:max="10"
:max="100"
@change="montageNumberChange"
/>
</el-form-item>