Compare commits

...

2 Commits

Author SHA1 Message Date
yyy
945708ccc9 Merge branch 'master' of http://git.znkjfw.com/ak/zn-admin-vue3-wcs 2025-06-27 16:35:08 +08:00
yyy
9e0b8f11f4 拼接数量 2025-06-27 16:35:01 +08:00
3 changed files with 56 additions and 54 deletions

View File

@ -180,9 +180,7 @@
v-if="item.robotCodeLevel == 1" v-if="item.robotCodeLevel == 1"
> >
<template #content> <template #content>
<span style="font-size: 14px; color: #fff" <span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
>{{ item.robotCodeMsg || '' }}
</span>
<span <span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px" style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)" @click="goMoreError(item)"
@ -199,9 +197,7 @@
v-if="item.robotCodeLevel == 2" v-if="item.robotCodeLevel == 2"
> >
<template #content> <template #content>
<span style="font-size: 14px; color: #fff" <span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
>{{ item.robotCodeMsg || '' }}
</span>
<span <span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px" style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)" @click="goMoreError(item)"
@ -218,9 +214,7 @@
v-if="item.robotCodeLevel == 3" v-if="item.robotCodeLevel == 3"
> >
<template #content> <template #content>
<span style="font-size: 14px; color: #fff" <span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
>{{ item.robotCodeMsg || '' }}
</span>
<span <span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px" style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)" @click="goMoreError(item)"
@ -237,9 +231,7 @@
v-if="item.robotCodeLevel == 4" v-if="item.robotCodeLevel == 4"
> >
<template #content> <template #content>
<span style="font-size: 14px; color: #fff" <span style="font-size: 14px; color: #fff">{{ item.robotCodeMsg || '' }} </span>
>{{ item.robotCodeMsg || '' }}
</span>
<span <span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px" style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)" @click="goMoreError(item)"
@ -351,7 +343,6 @@
</template> </template>
<script setup> <script setup>
import JSONBigInt from 'json-bigint'
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue' import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
import * as CarApi from '@/api/car/index' import * as CarApi from '@/api/car/index'
import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router' import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router'
@ -700,9 +691,7 @@ onBeforeRouteLeave((to, from, next) => {
} }
.new-top-box-left-title { .new-top-box-left-title {
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;
color: #0d162a; color: #0d162a;
@ -711,9 +700,7 @@ onBeforeRouteLeave((to, from, next) => {
.new-top-box-left-statistics { .new-top-box-left-statistics {
padding: 5px 7px; padding: 5px 7px;
margin-left: 4px; margin-left: 4px;
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
color: #0d162a; color: #0d162a;
@ -732,9 +719,7 @@ onBeforeRouteLeave((to, from, next) => {
display: flex; display: flex;
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
padding: 5px 10px; padding: 5px 10px;
@ -809,9 +794,7 @@ input::input-placeholder {
.item-inner-left-name { .item-inner-left-name {
flex: 1; flex: 1;
margin-right: 5px; margin-right: 5px;
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
width: 0; width: 0;
@ -837,9 +820,7 @@ input::input-placeholder {
} }
.item-inner-left-bottom-btn { .item-inner-left-bottom-btn {
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #1677ff; color: #1677ff;
@ -882,9 +863,7 @@ input::input-placeholder {
} }
.item-inner-right-msg-item-name { .item-inner-right-msg-item-name {
font-family: font-family: PingFangSC, 'PingFang SC';
PingFangSC,
"PingFang SC";
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
width: 60px; width: 60px;

View File

@ -966,6 +966,7 @@
@click.stop @click.stop
> >
<div class="context-menu-item" @click="deleteSingleNode">删除</div> <div class="context-menu-item" @click="deleteSingleNode">删除</div>
<div class="context-menu-item" @click="contextMenuEditNode">编辑节点</div>
<div <div
class="context-menu-item" class="context-menu-item"
@click="generateDetectionPoint" @click="generateDetectionPoint"
@ -1233,6 +1234,7 @@ const activatedHandle = (item, index) => {
editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list) editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list)
} }
} }
// //
const deactivatedHandle = () => {} const deactivatedHandle = () => {}
@ -2126,7 +2128,7 @@ const hideContextMenu = () => {
state.contextMenu.currentIndex = -1 state.contextMenu.currentIndex = -1
} }
// //
const deleteSingleNode = () => { const deleteSingleNode = () => {
if (state.contextMenu.currentIndex !== -1) { if (state.contextMenu.currentIndex !== -1) {
let deleteId = state.allMapPointInfo[state.contextMenu.currentIndex].id 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 () => { const generateDetectionPoint = async () => {
if (state.contextMenu.currentIndex === -1) return 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 newId = await MapApi.getNodeId()
const distance = 1 / Number(imgBgObj.resolution) // const distance = 2 / Number(imgBgObj.resolution) //
// 使 // 使
const angle = locationYaw * (180 / Math.PI) const angle = locationYaw * (180 / Math.PI)
@ -2170,6 +2190,7 @@ const generateDetectionPoint = async () => {
if (!isDuplicate) { if (!isDuplicate) {
let actualPoint = disposeEventPoint(newX, newY) let actualPoint = disposeEventPoint(newX, newY)
//
let pointItem = { let pointItem = {
id: newId, id: newId,
positionMapId: imgBgObj.positionMapId, positionMapId: imgBgObj.positionMapId,
@ -2194,19 +2215,19 @@ const generateDetectionPoint = async () => {
dataObj: {} dataObj: {}
} }
//线 //线
let newRoute = { let newRoute = {
isSelected: false, isSelected: false,
startingPointId: undefined, startingPointId: newId,
endPointId: undefined, endPointId: id,
startPointX: undefined, startPointX: newX,
startPointY: undefined, startPointY: newY,
endPointX: undefined, actualStartPointX: actualPoint.actualLocationX,
endPointY: undefined, actualStartPointY: actualPoint.actualLocationY,
actualStartPointX: undefined, endPointX: locationX,
actualStartPointY: undefined, endPointY: locationY,
actualEndPointX: undefined, actualEndPointX: actualLocationX,
actualEndPointY: undefined, actualEndPointY: actualLocationY,
actualBeginControlX: '', actualBeginControlX: '',
actualBeginControlY: '', actualBeginControlY: '',
actualEndControlX: '', actualEndControlX: '',
@ -2221,17 +2242,19 @@ const generateDetectionPoint = async () => {
expansionZoneRight: 0, expansionZoneRight: 0,
method: 0, method: 0,
direction: 2, //12 direction: 2, //12
forwardSpeedLimit: 1.5, forwardSpeedLimit: 0.4,
reverseSpeedLimit: 0.4, reverseSpeedLimit: 0.2,
toward: 0, toward: 0,
startingSortNum: undefined, startingSortNum: undefined,
endPointSortNum: undefined endPointSortNum: undefined,
startToEndToward: 1, //
endToStartToward: 0 //
} }
// //
state.allMapPointInfo.push(pointItem) state.allMapPointInfo.push(pointItem)
//线线 //线线
// state.mapRouteList.push(newRoute) state.mapRouteList.push(newRoute)
addEditHistory() addEditHistory()
// //

View File

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