同一线库 区域显示

This commit is contained in:
yyy 2025-04-09 17:51:45 +08:00
parent d50e547f18
commit 06017dd415
2 changed files with 23 additions and 6 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.153:48080'
# VITE_BASE_URL='http://192.168.0.45:48080'
VITE_BASE_URL='http://192.168.0.45:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -825,6 +825,12 @@ const getSortNumLocationStyle = (item, index) => {
}
//
const binLocationStyle = (item, index) => {
let laneId
let areaId
if (state.currentItemIndex !== -1) {
laneId = state.allMapPointInfo[state.currentItemIndex].laneId
areaId = state.allMapPointInfo[state.currentItemIndex].areaId
}
return {
verticalAlign: 'top',
width: item.locationWidePx + 'px',
@ -834,6 +840,8 @@ const binLocationStyle = (item, index) => {
? '1px dashed #000'
: state.noLocationNumberList.includes(index)
? '1px dashed red'
: (laneId && item.laneId === laneId) || (areaId && item.areaId === areaId)
? '1px dashed #ff6a00'
: 'none'
}
}
@ -1368,7 +1376,7 @@ const state = reactive({
allMapPointInfo: [], //
mapRouteList: [], //线
currentIndex: 0, //
currentItemIndex: -1, //
currentItemIndex: -1, //
markForm: {
macAddress: '', // mac
markProperty: '', //
@ -2082,8 +2090,6 @@ const clickDrawSelectionArea = () => {
//
let routeList = state.drawSelectionPointList
console.log(routeList)
let isHaveId = binLocation.every((item) => {
item.id
})
@ -2095,10 +2101,12 @@ const clickDrawSelectionArea = () => {
message.warning('至少选择两个库位')
return
}
// if (!isStraightLine(binLocation)) {
// message.warning('线')
// return
// }
let isHaveId = binLocation.every((item) => {
return item.id
})
@ -2106,6 +2114,15 @@ const clickDrawSelectionArea = () => {
message.warning('您选择的库位存在未保存的')
return
}
//线
const locationNumbers = binLocation.map((item) => item.locationNumber)
const uniqueLocationNumbers = new Set(locationNumbers)
if (locationNumbers.length !== uniqueLocationNumbers.size) {
message.warning('您选择的库位的序号不能重复')
return
}
removeEventListener() //
lineLibrarySettingDialogRef.value.open(binLocation)
}