Compare commits
3 Commits
031e3cccb5
...
dbc960d4a1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dbc960d4a1 | ||
![]() |
d3499c3794 | ||
![]() |
3399d9d3bb |
@ -7,7 +7,7 @@
|
||||
class="equipment-form-dialog"
|
||||
@close="dialogClose"
|
||||
>
|
||||
<el-form :model="form" label-width="110" ref="ruleFormRef">
|
||||
<el-form :model="form" label-width="110" ref="ruleFormRef" :rules="rules">
|
||||
<el-form-item label="物料区域名称" prop="skuInfo" required>
|
||||
<el-input v-model="form.skuInfo" placeholder="请输入物料区域名称" />
|
||||
</el-form-item>
|
||||
|
@ -161,6 +161,7 @@
|
||||
trigger="click"
|
||||
v-else-if="item.switchType === 'marker'"
|
||||
width="220"
|
||||
:visible="state.popoverVisible"
|
||||
>
|
||||
<template #reference>
|
||||
<div
|
||||
@ -201,6 +202,12 @@
|
||||
<el-input v-model="state.markForm.originalNode" style="width: 240px" disabled />
|
||||
</el-form-item>
|
||||
<div style="text-align: right">
|
||||
<el-button
|
||||
size="small"
|
||||
style="width: 64px; height: 30px; background: #efefef"
|
||||
@click="markFormCancel()"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
style="width: 64px; height: 30px; background: #00329f"
|
||||
@ -355,7 +362,7 @@
|
||||
v-if="item.type === 2 && item.layerSelectionShow"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/库位库存_png_179_1739326653035.png"
|
||||
alt=""
|
||||
:style="nodeStyle(item, index)"
|
||||
:style="binLocationStyle(item, index)"
|
||||
/>
|
||||
<!-- 3 设备点 -->
|
||||
<img
|
||||
@ -742,6 +749,7 @@ const inputBoxRef = ref() //文字输入框
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
//其他节点的样式
|
||||
const nodeStyle = (item, index) => {
|
||||
return {
|
||||
verticalAlign: 'top',
|
||||
@ -750,6 +758,20 @@ const nodeStyle = (item, index) => {
|
||||
border: state.currentItemIndex === index ? '1px dashed #000' : 'none'
|
||||
}
|
||||
}
|
||||
//库位的样式
|
||||
const binLocationStyle = (item, index) => {
|
||||
return {
|
||||
verticalAlign: 'top',
|
||||
width: item.locationWidePx + 'px',
|
||||
height: item.locationDeepPx + 'px',
|
||||
border:
|
||||
state.currentItemIndex === index
|
||||
? '1px dashed #000'
|
||||
: state.noLocationNumberList.includes(index)
|
||||
? '1px dashed red'
|
||||
: 'none'
|
||||
}
|
||||
}
|
||||
|
||||
// 缩放停止
|
||||
const interfaceRefreshed = ref(true)
|
||||
@ -1023,6 +1045,14 @@ const submitNodeSuccess = (form) => {
|
||||
}
|
||||
})
|
||||
addEditHistory()
|
||||
|
||||
//存在库位未填写排序号的问题
|
||||
state.noLocationNumberList = state.allMapPointInfo.reduce((invalidIndexes, item, index) => {
|
||||
if (item.type === 2 && !item.locationNumber) {
|
||||
invalidIndexes.push(index) // 如果不满足条件,记录索引
|
||||
}
|
||||
return invalidIndexes
|
||||
}, [])
|
||||
}
|
||||
|
||||
//工具栏点击
|
||||
@ -1254,7 +1284,9 @@ const state = reactive({
|
||||
originalNode: '', //原节点
|
||||
robotNo: '' //AGV编号
|
||||
}, //标记的表单
|
||||
mapMarkCarList: [] //标记的车辆列表
|
||||
mapMarkCarList: [], //标记的车辆列表
|
||||
popoverVisible: false, //标记弹窗
|
||||
noLocationNumberList: [] //没有排序的库位index
|
||||
})
|
||||
|
||||
const toolbarClick = async (item) => {
|
||||
@ -1553,7 +1585,7 @@ const replicationNode = () => {
|
||||
mapImageUrl: copyMapItem.mapImageUrl,
|
||||
locationYaw: copyMapItem.locationYaw,
|
||||
areaId: null,
|
||||
locationNumber: copyMapItem.locationNumber || null
|
||||
locationNumber: null
|
||||
}
|
||||
message.success('复制成功')
|
||||
}
|
||||
@ -1600,6 +1632,7 @@ const mapMark = async () => {
|
||||
state.markForm.markProperty = ''
|
||||
state.markForm.originalNode = ''
|
||||
}
|
||||
state.popoverVisible = true
|
||||
}
|
||||
//标记提交
|
||||
const macAddressChange = (e) => {
|
||||
@ -1608,6 +1641,15 @@ const macAddressChange = (e) => {
|
||||
state.markForm.robotNo = targetItem.robotNo
|
||||
}
|
||||
}
|
||||
//取消标记
|
||||
const markFormCancel = () => {
|
||||
state.popoverVisible = false
|
||||
state.markForm.markProperty = ''
|
||||
state.markForm.originalNode = ''
|
||||
state.markForm.macAddress = ''
|
||||
state.markForm.robotNo = ''
|
||||
}
|
||||
//确认标记
|
||||
const markFormSubmit = async () => {
|
||||
if (!state.markForm.macAddress) {
|
||||
message.warning('请选择车辆')
|
||||
@ -1649,34 +1691,35 @@ const markFormSubmit = async () => {
|
||||
|
||||
addEditHistory()
|
||||
} else {
|
||||
message.warning('未采集到该AGV点位信息')
|
||||
//新增一个节点
|
||||
state.allMapPointInfo.push({
|
||||
positionMapId: imgBgObj.positionMapId, //地图的id
|
||||
layerSelectionShow: true,
|
||||
locationX: pointPx.x,
|
||||
locationY: pointPx.y,
|
||||
actualLocationX: actualPoint.actualLocationX,
|
||||
actualLocationY: actualPoint.actualLocationY,
|
||||
locationDeep: 40,
|
||||
locationWide: 40,
|
||||
locationDeepPx: 8,
|
||||
locationWidePx: 8,
|
||||
angle: 0,
|
||||
draggable: true,
|
||||
resizable: true,
|
||||
rotatable: false,
|
||||
lockAspectRatio: false, //横纵比
|
||||
mapImageUrl: '',
|
||||
type: 1, //默认类型1 路径节点
|
||||
dataList: [], //存库位的
|
||||
dataObj: {}, //存 设备点 停车点 文字
|
||||
locationYaw: 0 //弧度
|
||||
})
|
||||
addEditHistory()
|
||||
}
|
||||
} else {
|
||||
//新增一个节点
|
||||
state.allMapPointInfo.push({
|
||||
positionMapId: imgBgObj.positionMapId, //地图的id
|
||||
layerSelectionShow: true,
|
||||
locationX: pointPx.x,
|
||||
locationY: pointPx.y,
|
||||
actualLocationX: actualPoint.actualLocationX,
|
||||
actualLocationY: actualPoint.actualLocationY,
|
||||
locationDeep: 40,
|
||||
locationWide: 40,
|
||||
locationDeepPx: 8,
|
||||
locationWidePx: 8,
|
||||
angle: 0,
|
||||
draggable: true,
|
||||
resizable: true,
|
||||
rotatable: false,
|
||||
lockAspectRatio: false, //横纵比
|
||||
mapImageUrl: '',
|
||||
type: 1, //默认类型1 路径节点
|
||||
dataList: [], //存库位的
|
||||
dataObj: {}, //存 设备点 停车点 文字
|
||||
locationYaw: 0 //弧度
|
||||
})
|
||||
addEditHistory()
|
||||
message.warning('未采集到该AGV点位信息')
|
||||
}
|
||||
state.popoverVisible = false
|
||||
}
|
||||
|
||||
//鼠标拖动绘制节点
|
||||
@ -2498,6 +2541,20 @@ const getAllMapRoute = async () => {
|
||||
}
|
||||
//保存地图按钮
|
||||
const saveMap = async () => {
|
||||
//判断是否存在库位未填写排序号
|
||||
state.noLocationNumberList = state.allMapPointInfo.reduce((invalidIndexes, item, index) => {
|
||||
if (item.type === 2 && !item.locationNumber) {
|
||||
invalidIndexes.push(index) // 如果不满足条件,记录索引
|
||||
}
|
||||
return invalidIndexes
|
||||
}, [])
|
||||
|
||||
if (state.noLocationNumberList.length !== 0) {
|
||||
state.currentItemIndex = -1
|
||||
message.error('存在库位未填写排序号')
|
||||
return
|
||||
}
|
||||
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '保存中',
|
||||
@ -2521,6 +2578,7 @@ const saveMap = async () => {
|
||||
//节点的保存
|
||||
const saveNodeList = async () => {
|
||||
let list = state.allMapPointInfo
|
||||
|
||||
list.forEach((item) => {
|
||||
if (item.type === 2) {
|
||||
// 库位点 类型为数组
|
||||
|
Loading…
Reference in New Issue
Block a user