任务发起:取放货点位

This commit is contained in:
yyy 2025-07-19 11:26:53 +08:00
parent 606a735aa5
commit 65c33e39ea
3 changed files with 42 additions and 22 deletions

View File

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

View File

@ -44,3 +44,7 @@ export const updateRobotTask = (data) => {
export const getTaskPageList = async (data) => { export const getTaskPageList = async (data) => {
return await request.post({ url: `/system/robot/task/page`, data }) return await request.post({ url: `/system/robot/task/page`, data })
} }
export const getLocationByNam = async (data) => {
return await request.post({ url: `/system/ware/house-location/getLocationByNam`, data })
}

View File

@ -805,32 +805,39 @@ const getTaskNo = async () => {
// //
const getLocationList = async (type, locationNo) => { const getLocationList = async (type, locationNo) => {
if (type == 4) { return await MapTaskAPi.getLocationByName({
return await DeviceApi.getWareHouseTakePointList({ pointType: 1 }) type, // 12线 3 4:线 5:
} else { locationNo
return await MapTaskAPi.getLocationByName({ })
type, // 12线 3
locationNo
})
}
}
//
const loading = ref(false)
const releaseRemoteMethod = async (query, item) => {
if (query) {
item.releaseList = await getLocationList(item.releaseType, query)
} else {
item.releaseList = []
}
} }
// //
const takeRemoteMethod = async (query, item) => { const takeRemoteMethod = async (query, item) => {
if (query) { if (query) {
item.takeList = await getLocationList(item.takeType, query) if (item.takeType == 4) {
item.takeList = await DeviceApi.getWareHouseTakePointList({ pointType: 1 })
} else {
item.takeList = await getLocationList(item.takeType, query)
}
} else { } else {
item.takeList = [] item.takeList = []
} }
} }
//
const loading = ref(false)
const releaseRemoteMethod = async (query, item) => {
if (query) {
if (item.releaseType == 4) {
item.releaseList = await getLocationList(5, query) //5:
} else {
item.releaseList = await getLocationList(item.releaseType, query)
}
} else {
item.releaseList = []
}
}
// //
const endPointMethod = async (query, item) => { const endPointMethod = async (query, item) => {
if (query) { if (query) {
@ -1208,9 +1215,10 @@ const chooseLocation = (type, item, index) => {
} }
// //
const locationSelectionDialogSuccess = (item) => { const locationSelectionDialogSuccess = (item) => {
console.log(item)
if (chooseLocationType.value == 'take') { if (chooseLocationType.value == 'take') {
// //
if (locationTypeNumber.value == 1 || locationTypeNumber.value == 4) { if (locationTypeNumber.value == 1) {
// 1 // 1
takeRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value]) takeRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].takeId = item.id formData.value.taskDetailList[currentItemIndex.value].takeId = item.id
@ -1222,10 +1230,14 @@ const locationSelectionDialogSuccess = (item) => {
// 3 // 3
takeRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value]) takeRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].takeId = item.areaId formData.value.taskDetailList[currentItemIndex.value].takeId = item.areaId
} else if (locationTypeNumber.value == 4) {
//
takeRemoteMethod(item.id, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].takeId = item.id
} }
} else if (chooseLocationType.value == 'release') { } else if (chooseLocationType.value == 'release') {
// //
if (locationTypeNumber.value == 1 || locationTypeNumber.value == 4) { if (locationTypeNumber.value == 1) {
// 1 // 1
releaseRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value]) releaseRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.id formData.value.taskDetailList[currentItemIndex.value].releaseId = item.id
@ -1237,6 +1249,10 @@ const locationSelectionDialogSuccess = (item) => {
// 3 // 3
releaseRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value]) releaseRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.areaId formData.value.taskDetailList[currentItemIndex.value].releaseId = item.areaId
} else if (locationTypeNumber.value == 4) {
//
releaseRemoteMethod(item.id, formData.value.taskDetailList[currentItemIndex.value])
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.id
} }
} }
} }