XIUGAI
This commit is contained in:
commit
d6f2a7cf30
@ -5,7 +5,7 @@ VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://192.168.0.74:48080'
|
||||
# VITE_BASE_URL='http://192.168.0.226:48080'
|
||||
# VITE_BASE_URL='http://192.168.0.153:48080'
|
||||
# VITE_BASE_URL='http://192.168.0.45:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
|
@ -27,6 +27,11 @@ export const deleteTask = (id: number) => {
|
||||
|
||||
// 更新机器人任务主表
|
||||
export const updateTask = (data) => {
|
||||
return request.post({ url: '/system/robot/task-detail/manuallyCompleted?id=' + data.id })
|
||||
}
|
||||
|
||||
// 更新机器人任务主表
|
||||
export const closeTask = (data) => {
|
||||
return request.put({ url: '/system/robot/task/close', data })
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 580 B |
Binary file not shown.
Before Width: | Height: | Size: 522 B |
@ -15,7 +15,7 @@ const list = ref<any[]>([]) // 消息列表
|
||||
const getList = async () => {
|
||||
// list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
|
||||
list.value = await NotifyMessageApi.warnMsgReadPage()
|
||||
console.log(list.value )
|
||||
console.log(list.value)
|
||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||
unreadCount.value = 0
|
||||
}
|
||||
@ -26,14 +26,15 @@ const getUnreadCount = async () => {
|
||||
// unreadCount.value = data
|
||||
// })
|
||||
NotifyMessageApi.warnMsgReadPage().then((data) => {
|
||||
// console.log(data)
|
||||
unreadCount.value = data&&data.length?data.length:0
|
||||
// console.log(data)
|
||||
unreadCount.value = data && data.length ? data.length : 0
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 跳转我的站内信
|
||||
const popoverRef = ref()
|
||||
const goMyList = () => {
|
||||
popoverRef.value.hide()
|
||||
push({
|
||||
name: 'SystemCarError'
|
||||
})
|
||||
@ -58,7 +59,7 @@ onMounted(() => {
|
||||
</script>
|
||||
<template>
|
||||
<div class="message">
|
||||
<ElPopover :width="400" placement="bottom" trigger="click">
|
||||
<ElPopover ref="popoverRef" :width="400" placement="bottom" trigger="click">
|
||||
<template #reference>
|
||||
<ElBadge :is-dot="unreadCount > 0" class="item">
|
||||
<Icon
|
||||
@ -74,10 +75,9 @@ onMounted(() => {
|
||||
<ElTabPane label="我的站内信" name="notice">
|
||||
<el-scrollbar class="message-list">
|
||||
<template v-for="item in list" :key="item.id">
|
||||
|
||||
<div class="message-item">
|
||||
<!-- <img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" /> -->
|
||||
|
||||
|
||||
<div class="message-content">
|
||||
<!-- <div style="margin-bottom: 5px;">异常等级:{{ item.warnLevel }}</div> -->
|
||||
<span class="message-title">
|
||||
|
@ -22,6 +22,7 @@
|
||||
:disabled="false"
|
||||
placeholder="请输入设备编号(25字以内)"
|
||||
maxlength="25"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Mac地址" prop="macAddress">
|
||||
|
@ -6,7 +6,7 @@
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="ID号" prop="warnCode">
|
||||
<el-input
|
||||
@ -176,6 +176,12 @@ const getList = async () => {
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
if (queryParams.warnCode) {
|
||||
queryParams.warnCode = queryParams.warnCode.replace(/\s/g, '')
|
||||
}
|
||||
if (queryParams.robotNo) {
|
||||
queryParams.robotNo = queryParams.robotNo.replace(/\s/g, '')
|
||||
}
|
||||
getList()
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@
|
||||
style="width: 100%"
|
||||
row-class-name="table-row-class"
|
||||
:header-cell-style="{ backgroundColor: '#EBF1FF', padding: '13px 0' }"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column label="序号" type="index" align="center" width="60" />
|
||||
<el-table-column label="库位号" align="center" prop="locationNo" />
|
||||
@ -148,7 +149,8 @@ const queryParams = reactive({
|
||||
taskStage: null,
|
||||
laneName: null,
|
||||
areaName: null,
|
||||
skuInfo: null
|
||||
skuInfo: null,
|
||||
locationNo: null
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
@ -176,6 +178,20 @@ const submitSuccess = () => {
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
|
||||
if (queryParams.locationNo) {
|
||||
queryParams.locationNo = queryParams.locationNo.replace(/\s/g, '')
|
||||
}
|
||||
if (queryParams.laneName) {
|
||||
queryParams.laneName = queryParams.laneName.replace(/\s/g, '')
|
||||
}
|
||||
if (queryParams.areaName) {
|
||||
queryParams.areaName = queryParams.areaName.replace(/\s/g, '')
|
||||
}
|
||||
if (queryParams.skuInfo) {
|
||||
queryParams.skuInfo = queryParams.skuInfo.replace(/\s/g, '')
|
||||
}
|
||||
|
||||
getList()
|
||||
}
|
||||
|
||||
|
@ -189,6 +189,27 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务阶段" prop="taskStage">
|
||||
<el-select
|
||||
v-model="taskLogParams.taskStage"
|
||||
class="!w-240px"
|
||||
clearable
|
||||
placeholder="请选择任务阶段"
|
||||
@change="handleQuery()"
|
||||
>
|
||||
<el-option label="待执行" :value="0" />
|
||||
<el-option label="前往取货" :value="1" />
|
||||
<el-option label="取货中" :value="2" />
|
||||
<el-option label="前往放货" :value="3" />
|
||||
<el-option label="放货中" :value="4" />
|
||||
<el-option label="结束" :value="5" />
|
||||
<el-option label="移动中" :value="6" />
|
||||
<el-option label="正在充电" :value="7" />
|
||||
<el-option label="取消" :value="8" />
|
||||
<el-option label="人工完成" :value="9" />
|
||||
<el-option label="异常" :value="10" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="开始时间" prop="startTime" :formatter="dateFormatter">
|
||||
<el-date-picker
|
||||
class="!w-240px"
|
||||
@ -210,7 +231,7 @@
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="时间" prop="endTime" :formatter="dateFormatter">
|
||||
<el-date-picker
|
||||
<el-date-picker
|
||||
v-model="taskLogParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
@ -260,6 +281,21 @@
|
||||
<dict-tag :type="DICT_TYPE.ROBOT_TASK_STATUS" :value="scope.row.taskStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskStage" label="任务阶段" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.taskStage == 0">待执行</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 1">前往取货</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 2">取货中</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 3">前往放货</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 4">放货中</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 5">结束</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 6">移动中</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 7">正在充电</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 8">取消</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 9">人工完成</el-text>
|
||||
<el-text v-if="scope.row.taskStage == 10">异常</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
label="开始时间"
|
||||
@ -295,7 +331,6 @@ import * as MapTaskAPi from '@/api/map/mapTask'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
|
||||
defineOptions({ name: 'mapLogQueriesList' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
@ -348,6 +383,7 @@ const taskLogParams = reactive({
|
||||
taskNo: null, //任务号
|
||||
taskType: null, //任务类型
|
||||
taskStatus: null, //任务状态
|
||||
taskStage: null, //任务状态
|
||||
startTime: null, //开始时间
|
||||
endTime: null, //结束时间
|
||||
createTime: []
|
||||
@ -386,6 +422,9 @@ const handleQuery = () => {
|
||||
getCarLogList()
|
||||
} else if (activeName.value == 3) {
|
||||
taskLogParams.pageNo = 1
|
||||
if (taskLogParams.taskNo) {
|
||||
taskLogParams.taskNo = taskLogParams.taskNo.replace(/\s/g, '')
|
||||
}
|
||||
getTaskLogList()
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<!-- 新增设备 -->
|
||||
<Dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="生成直线"
|
||||
width="500"
|
||||
class="generate-straight-lines-dialog"
|
||||
@close="dialogClose"
|
||||
>
|
||||
<el-form :model="form" label-width="70" ref="ruleFormRef" :rules="rules">
|
||||
<el-form-item label="开始点" prop="startPointId" required>
|
||||
<el-select v-model="form.startPointId" placeholder="请选择" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.id"
|
||||
:label="item.sortNum"
|
||||
:value="item.id"
|
||||
:disabled="item.id == form.endPointId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束点" prop="endPointId" required>
|
||||
<el-select v-model="form.endPointId" placeholder="请选择" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.id"
|
||||
:label="item.sortNum"
|
||||
:value="item.id"
|
||||
:disabled="item.id == form.startPointId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)"> 确定 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import * as MapApi from '@/api/map/map'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const dialogFormVisible = ref(false) //列表的
|
||||
|
||||
const rules = reactive({
|
||||
startPointId: [{ required: true, message: '请选择开始点', trigger: 'blur' }],
|
||||
endPointId: [{ required: true, message: '请选择结束点', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
//新增
|
||||
const form = ref({
|
||||
startPointId: '',
|
||||
endPointId: ''
|
||||
})
|
||||
|
||||
const pointList = ref([])
|
||||
const open = (list) => {
|
||||
dialogFormVisible.value = true
|
||||
pointList.value = list
|
||||
form.value.startPointId = ''
|
||||
form.value.endPointId = ''
|
||||
}
|
||||
|
||||
const emit = defineEmits(['addEventListener', 'GenerateStraightLinesSubmit'])
|
||||
const dialogClose = () => {
|
||||
emit('addEventListener')
|
||||
}
|
||||
|
||||
const submitForm = async (formEl) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
dialogFormVisible.value = false
|
||||
message.success('设置成功')
|
||||
emit('GenerateStraightLinesSubmit', pointList.value, form.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.generate-straight-lines-dialog {
|
||||
padding: 0px;
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 0px 20px 20px 0;
|
||||
border-top: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -303,7 +303,10 @@ const submit = async (formEl) => {
|
||||
item.id = String(form.value.dataList[index].id)
|
||||
item.locationNo = form.value.dataList[index].locationNo
|
||||
item.mapItemId = form.value.dataList[index].mapItemId
|
||||
item.laneId = form.value.dataList[index].laneId
|
||||
item.areaId = form.value.dataList[index].areaId || ''
|
||||
item.areaName = form.value.dataList[index].areaName || ''
|
||||
item.laneId = form.value.dataList[index].laneId || ''
|
||||
item.laneName = form.value.dataList[index].laneName || ''
|
||||
}
|
||||
list.push(item)
|
||||
}
|
||||
@ -381,34 +384,28 @@ const typeChange = (type) => {
|
||||
form.value.locationWidePx = 8
|
||||
} else if (type === 2) {
|
||||
form.value.locationNumber = null
|
||||
if (!form.value.id) {
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
}
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 3) {
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
if (!form.value.id) {
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
}
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 4) {
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
if (!form.value.id) {
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
}
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 5) {
|
||||
form.value.layersNumber = null
|
||||
form.value.direction = null
|
||||
|
@ -9,7 +9,9 @@
|
||||
<div class="device-list">
|
||||
<div class="device-item" v-for="(item, index) in deviceList" :key="index">
|
||||
<img class="img" :src="item.url" />
|
||||
<div class="name">{{ item.deviceNo }}</div>
|
||||
<span class="name" :title="item.deviceNo">
|
||||
{{ item.deviceNo }}
|
||||
</span>
|
||||
<el-icon color="#f56c6c" class="delete-icon" @click="deleteDeviceItem(item, index)"
|
||||
><DeleteFilled
|
||||
/></el-icon>
|
||||
@ -213,8 +215,15 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
font-size: 14px;
|
||||
color: #91929e;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 164px;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.delete-icon {
|
||||
|
@ -13,14 +13,12 @@
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||
<el-table-column prop="areaName" label="物料区域名称" align="center" />
|
||||
<el-table-column prop="skuInfo" label="物料信息" align="center" />
|
||||
<el-table-column prop="areaName" label="物料区域名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="skuInfo" label="物料信息" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button size="small" type="primary" @click="handleEdit(scope.row)"> 编辑 </el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -74,7 +72,7 @@ const open = () => {
|
||||
getWareHouseList()
|
||||
}
|
||||
|
||||
const emit = defineEmits(['addEventListener'])
|
||||
const emit = defineEmits(['addEventListener', 'itemAreaManagementDelete', 'itemAreaManagementEdit'])
|
||||
const dialogClose = () => {
|
||||
emit('addEventListener')
|
||||
}
|
||||
@ -99,15 +97,16 @@ const getWareHouseList = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = async (id) => {
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm('请确认是否删除该物料区域?')
|
||||
// 发起删除
|
||||
await MapApi.deleteWareHouseArea(id)
|
||||
await MapApi.deleteWareHouseArea(item.id)
|
||||
message.success('删除成功')
|
||||
// 刷新列表
|
||||
await getWareHouseList()
|
||||
emit('itemAreaManagementDelete', item.mapItemIds)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
@ -133,6 +132,7 @@ const editSubmit = async () => {
|
||||
await getWareHouseList()
|
||||
editDialogFormVisible.value = false
|
||||
message.success('编辑成功')
|
||||
emit('itemAreaManagementEdit', editForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ const open = (list) => {
|
||||
form.value.skuInfo = ''
|
||||
}
|
||||
|
||||
const emit = defineEmits(['addEventListener'])
|
||||
const emit = defineEmits(['addEventListener', 'itemAreaSettingSubmitSuccess'])
|
||||
const dialogClose = () => {
|
||||
emit('addEventListener')
|
||||
}
|
||||
@ -87,9 +87,13 @@ const submitForm = async (formEl) => {
|
||||
await formEl.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
form.value.positionMapId = props.positionMapId
|
||||
await MapApi.createOrEditOrDelHouseArea(form.value)
|
||||
let res = await MapApi.createOrEditOrDelHouseArea(form.value)
|
||||
dialogFormVisible.value = false
|
||||
message.success('设置成功')
|
||||
emit('itemAreaSettingSubmitSuccess', {
|
||||
...res,
|
||||
mapItemIds: form.value.mapItemIds
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -13,13 +13,11 @@
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||
<el-table-column prop="laneName" label="线库名称" align="center" />
|
||||
<el-table-column prop="laneName" label="线库名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button size="small" type="primary" @click="handleEdit(scope.row)"> 编辑 </el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -70,7 +68,11 @@ const open = () => {
|
||||
getLineLibraryList()
|
||||
}
|
||||
|
||||
const emit = defineEmits(['addEventListener'])
|
||||
const emit = defineEmits([
|
||||
'addEventListener',
|
||||
'lineLibraryManagementDelete',
|
||||
'lineLibraryManagementEdit'
|
||||
])
|
||||
const dialogClose = () => {
|
||||
emit('addEventListener')
|
||||
}
|
||||
@ -95,15 +97,16 @@ const getLineLibraryList = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = async (id) => {
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm('请确认是否删除该线库?')
|
||||
// 发起删除
|
||||
await MapApi.deleteWareLaneArea(id)
|
||||
await MapApi.deleteWareLaneArea(item.id)
|
||||
message.success('删除成功')
|
||||
// 刷新列表
|
||||
await getLineLibraryList()
|
||||
emit('lineLibraryManagementDelete', item.mapItemIds)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
@ -127,6 +130,7 @@ const editSubmit = async () => {
|
||||
await getLineLibraryList()
|
||||
editDialogFormVisible.value = false
|
||||
message.success('编辑成功')
|
||||
emit('lineLibraryManagementEdit', editForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ const form = ref({
|
||||
})
|
||||
|
||||
const open = (list) => {
|
||||
console.log(list)
|
||||
dialogFormVisible.value = true
|
||||
form.value.mapItemIds = list.map((item) => item.id)
|
||||
form.value.areaNumber = list.reduce((sum, item) => {
|
||||
@ -67,7 +66,7 @@ const open = (list) => {
|
||||
form.value.laneName = ''
|
||||
}
|
||||
|
||||
const emit = defineEmits(['addEventListener'])
|
||||
const emit = defineEmits(['addEventListener', 'submitLineLibraryFormSuccess'])
|
||||
const dialogClose = () => {
|
||||
emit('addEventListener')
|
||||
}
|
||||
@ -76,9 +75,13 @@ const submitLineLibraryForm = async () => {
|
||||
await lineFormRef.value.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
form.value.positionMapId = props.positionMapId
|
||||
await MapApi.createOrEditOrDelHouseLane(form.value)
|
||||
let res = await MapApi.createOrEditOrDelHouseLane(form.value)
|
||||
dialogFormVisible.value = false
|
||||
message.success('设置成功')
|
||||
emit('submitLineLibraryFormSuccess', {
|
||||
...res,
|
||||
mapItemIds: form.value.mapItemIds
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" title="库位信息" width="545" class="task-dialog">
|
||||
<Dialog v-model="dialogVisible" title="库位信息" width="660" class="task-dialog">
|
||||
<div class="store-dialog">
|
||||
<div class="store-dialog-left">
|
||||
<div
|
||||
@ -13,16 +13,9 @@
|
||||
}"
|
||||
>
|
||||
{{ item.locationNo || '--' }}
|
||||
<img
|
||||
src="@/assets/imgs/jinyong-2.png"
|
||||
alt=""
|
||||
class="store-dialog-left-item-img-jinyong"
|
||||
v-if="item.locationEnable === 0"
|
||||
/>
|
||||
<img src="@/assets/imgs/suoding.png" alt="" class="store-dialog-left-item-img-suoding" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<div>
|
||||
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
||||
<el-form-item label="库位编号">
|
||||
<el-input v-model="formData.locationNo" :disabled="true" />
|
||||
@ -75,12 +68,11 @@ const formRef = ref() // 表单 Ref
|
||||
const storeData = ref([])
|
||||
/** 打开弹窗 */
|
||||
const open = async (data) => {
|
||||
console.log(data)
|
||||
resetForm()
|
||||
if (data && data.length) {
|
||||
storeData.value = data.reverse()
|
||||
console.log(storeData.value)
|
||||
selectIndex.value = 0
|
||||
console.log(data)
|
||||
formData.value = JSON.parse(JSON.stringify(data[0]))
|
||||
}
|
||||
dialogVisible.value = true
|
||||
@ -127,17 +119,7 @@ const resetForm = () => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.task-dialog {
|
||||
.el-dialog__header {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
border-top: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.task-tips {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -198,43 +180,30 @@ const resetForm = () => {
|
||||
.store-dialog-left {
|
||||
margin-right: 24px;
|
||||
flex-shrink: 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.store-dialog-left-item {
|
||||
width: 132px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
margin-top: 1px;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #0d162a;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
position: relative;
|
||||
}
|
||||
.ellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.store-dialog-left-item-img-jinyong {
|
||||
position: absolute;
|
||||
left: -3px;
|
||||
top: -4px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
.store-dialog-left-item-img-suoding {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
.store-dialog-left-item {
|
||||
width: 132px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
margin-top: 1px;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #0d162a;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -340,12 +340,44 @@
|
||||
:style="{ width: item.locationWidePx + 'px', height: item.locationDeepPx + 'px' }"
|
||||
>
|
||||
<!-- 1 路径点 -->
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="item.sortNum || '节点未保存'"
|
||||
placement="top"
|
||||
trigger="click"
|
||||
>
|
||||
<el-tooltip effect="dark" placement="top" trigger="click">
|
||||
<template #content>
|
||||
<div v-if="item.type === 1">
|
||||
<div>序号:{{ item.sortNum || '节点未保存' }}</div>
|
||||
</div>
|
||||
<div v-else-if="item.type === 2">
|
||||
<div>序号:{{ item.sortNum || '节点未保存' }}</div>
|
||||
<div class="item-tooltip-name" v-if="item.laneId && item.laneName">
|
||||
所属线库:{{ item.laneName }}
|
||||
</div>
|
||||
<div class="item-tooltip-name" v-if="item.areaId && item.areaName">
|
||||
所属线库:{{ item.areaName }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="item.type === 3">
|
||||
<div>序号:{{ item.sortNum || '节点未保存' }}</div>
|
||||
<div class="item-tooltip-name" v-if="item.deviceType">
|
||||
设备类型:{{ getDeviceTypeName(item.deviceType) }}
|
||||
</div>
|
||||
<div class="item-tooltip-name" v-if="item.deviceNo">
|
||||
设备编号:{{ item.deviceNo }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>序号:{{ item.sortNum || '节点未保存' }}</div>
|
||||
<div class="item-tooltip-name">
|
||||
节点类型:{{
|
||||
item.type == 4
|
||||
? '停车点'
|
||||
: item.type == 5
|
||||
? '区域变更点'
|
||||
: item.type == 6
|
||||
? '等待点'
|
||||
: ''
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="item.type === 1 && item.layerSelectionShow"
|
||||
:style="{
|
||||
@ -673,12 +705,14 @@
|
||||
ref="itemAreaSettingDialogRef"
|
||||
:positionMapId="imgBgObj.positionMapId"
|
||||
@addEventListener="addEventListener"
|
||||
@itemAreaSettingSubmitSuccess="itemAreaSettingSubmitSuccess"
|
||||
/>
|
||||
<!-- 线库设置 -->
|
||||
<lineLibrarySettingDialog
|
||||
ref="lineLibrarySettingDialogRef"
|
||||
:positionMapId="imgBgObj.positionMapId"
|
||||
@addEventListener="addEventListener"
|
||||
@submitLineLibraryFormSuccess="submitLineLibraryFormSuccess"
|
||||
/>
|
||||
<!-- 编辑地图路线 -->
|
||||
<editMapRouteDialog
|
||||
@ -693,12 +727,21 @@
|
||||
ref="lineLibraryManagementDialogRef"
|
||||
:positionMapId="imgBgObj.positionMapId"
|
||||
@addEventListener="addEventListener"
|
||||
@lineLibraryManagementDelete="lineLibraryManagementDelete"
|
||||
@lineLibraryManagementEdit="lineLibraryManagementEdit"
|
||||
/>
|
||||
<!-- 区域管理 -->
|
||||
<itemAreaManagementDialog
|
||||
ref="itemAreaManagementDialogRef"
|
||||
:positionMapId="imgBgObj.positionMapId"
|
||||
@addEventListener="addEventListener"
|
||||
@itemAreaManagementDelete="itemAreaManagementDelete"
|
||||
@itemAreaManagementEdit="itemAreaManagementEdit"
|
||||
/>
|
||||
<!-- 生成直线 选择开始点和结束点 -->
|
||||
<GenerateStraightLinesDialog
|
||||
ref="GenerateStraightLinesDialogRef"
|
||||
@GenerateStraightLinesSubmit="GenerateStraightLinesSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -716,13 +759,16 @@ import lineLibrarySettingDialog from './components-tool/lineLibrarySettingDialog
|
||||
import layerSelectionToolDialog from './components-tool/layerSelectionToolDialog.vue'
|
||||
import itemAreaManagementDialog from './components-tool/itemAreaManagementDialog.vue'
|
||||
import lineLibraryManagementDialog from './components-tool/lineLibraryManagementDialog.vue'
|
||||
import GenerateStraightLinesDialog from './components-tool/GenerateStraightLinesDialog.vue'
|
||||
import mapScaleTool from './components-tool/map-scale-tool.vue'
|
||||
|
||||
import * as MapApi from '@/api/map/map'
|
||||
import cursorCollection from './cursorCollection'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
|
||||
defineOptions({ name: 'editMapPageRealTimeMap' })
|
||||
|
||||
const GenerateStraightLinesDialogRef = ref() //生成直线的
|
||||
const lineLibraryManagementDialogRef = ref() //线库管理
|
||||
const itemAreaManagementDialogRef = ref() //区域管理
|
||||
const lineLibrarySettingDialogRef = ref() //线库设置
|
||||
@ -921,7 +967,7 @@ const mapClick = (e) => {
|
||||
const actualLocationX = disposeEventPoints(e).actualLocationX
|
||||
const actualLocationY = disposeEventPoints(e).actualLocationY
|
||||
|
||||
//绘制节点
|
||||
//新增节点
|
||||
if (toolbarSwitchType.value === 'drawNodes') {
|
||||
state.allMapPointInfo.push({
|
||||
positionMapId: imgBgObj.positionMapId, //地图的id
|
||||
@ -1181,7 +1227,7 @@ const state = reactive({
|
||||
rightToolList: [
|
||||
{
|
||||
switchType: 'drawNodes',
|
||||
name: '绘制节点',
|
||||
name: '新增节点',
|
||||
icon: 'ep:circle-plus-filled',
|
||||
isActive: false
|
||||
},
|
||||
@ -1193,7 +1239,7 @@ const state = reactive({
|
||||
},
|
||||
{
|
||||
switchType: 'clickDrawRoute',
|
||||
name: '绘制路线',
|
||||
name: '新增路线',
|
||||
icon: 'ep:semi-select',
|
||||
isActive: false
|
||||
},
|
||||
@ -1255,7 +1301,7 @@ const state = reactive({
|
||||
}, //当前拖拽的目标(起点、终点、控制点)
|
||||
selectedCurve: '', // 当前选中的曲线
|
||||
startDrawPointIndex: -1, // 起始点的索引
|
||||
startDrawPoint: null, //绘制路线开始的点
|
||||
startDrawPoint: null, //新增路线开始的点
|
||||
isDrawing: false, //正在绘制
|
||||
currentDrawX: 0, //正在绘制的x轴坐标
|
||||
currentDrawY: 0, //正在绘制的y轴坐标
|
||||
@ -1514,13 +1560,13 @@ const toolbarClick = async (item) => {
|
||||
backNextStep()
|
||||
break
|
||||
case 'drawNodes':
|
||||
//绘制节点
|
||||
//新增节点
|
||||
break
|
||||
case 'editNode':
|
||||
// 编辑节点
|
||||
break
|
||||
case 'drawRoute':
|
||||
//绘制路线
|
||||
//新增路线
|
||||
break
|
||||
case 'editRoute':
|
||||
// 编辑路线
|
||||
@ -1958,10 +2004,10 @@ const clickDrawSelectionArea = () => {
|
||||
message.warning('至少选择两个库位')
|
||||
return
|
||||
}
|
||||
if (!isStraightLine(binLocation)) {
|
||||
message.warning('您选择的库位不在一条直线上')
|
||||
return
|
||||
}
|
||||
// if (!isStraightLine(binLocation)) {
|
||||
// message.warning('您选择的库位不在一条直线上')
|
||||
// return
|
||||
// }
|
||||
let isHaveId = binLocation.every((item) => {
|
||||
return item.id
|
||||
})
|
||||
@ -2052,96 +2098,85 @@ const clickDrawSelectionArea = () => {
|
||||
message.warning('您选择的路径点存在未保存的')
|
||||
return
|
||||
}
|
||||
const list = mapPointsToLine(routeList)
|
||||
const idNameMap = {}
|
||||
list.forEach((item) => {
|
||||
idNameMap[item.id] = item
|
||||
})
|
||||
// 遍历第二个数组,更新 name
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (idNameMap[item.id]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.id].locationX,
|
||||
idNameMap[item.id].locationY
|
||||
)
|
||||
item.locationX = idNameMap[item.id].locationX
|
||||
item.locationY = idNameMap[item.id].locationY
|
||||
item.actualLocationX = actualPoint.actualLocationX
|
||||
item.actualLocationY = actualPoint.actualLocationY
|
||||
}
|
||||
})
|
||||
state.mapRouteList.forEach((item) => {
|
||||
if (idNameMap[item.startingPointId]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.startingPointId].locationX,
|
||||
idNameMap[item.startingPointId].locationY
|
||||
)
|
||||
item.startPointX = idNameMap[item.startingPointId].locationX
|
||||
item.startPointY = idNameMap[item.startingPointId].locationY
|
||||
item.actualStartPointX = actualPoint.actualLocationX
|
||||
item.actualStartPointY = actualPoint.actualLocationY
|
||||
}
|
||||
if (idNameMap[item.endPointId]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.endPointId].locationX,
|
||||
idNameMap[item.endPointId].locationY
|
||||
)
|
||||
item.endPointX = idNameMap[item.endPointId].locationX
|
||||
item.endPointY = idNameMap[item.endPointId].locationY
|
||||
item.actualEndPointX = actualPoint.actualLocationX
|
||||
item.actualEndPointY = actualPoint.actualLocationY
|
||||
}
|
||||
})
|
||||
addEditHistory()
|
||||
GenerateStraightLinesDialogRef.value.open(routeList)
|
||||
}
|
||||
}
|
||||
//将一个数组中的点位 按照第一个和最后一个排成一条直线
|
||||
const mapPointsToLine = (points) => {
|
||||
// 找出 locationX 最大和最小的项
|
||||
// let minXPoint = points[0]
|
||||
// let maxXPoint = points[0]
|
||||
// points.forEach((point) => {
|
||||
// if (point.locationX < minXPoint.locationX) {
|
||||
// minXPoint = point
|
||||
// }
|
||||
// if (point.locationX > maxXPoint.locationX) {
|
||||
// maxXPoint = point
|
||||
// }
|
||||
// })
|
||||
//生成直线 选择完成开始点和结束点
|
||||
const GenerateStraightLinesSubmit = (pointList, form) => {
|
||||
const list = mapPointsToLine(pointList, form.startPointId, form.endPointId)
|
||||
const idNameMap = {}
|
||||
list.forEach((item) => {
|
||||
idNameMap[item.id] = item
|
||||
})
|
||||
// 遍历第二个数组,更新 name
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (idNameMap[item.id]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.id].locationX,
|
||||
idNameMap[item.id].locationY
|
||||
)
|
||||
item.locationX = idNameMap[item.id].locationX
|
||||
item.locationY = idNameMap[item.id].locationY
|
||||
item.actualLocationX = actualPoint.actualLocationX
|
||||
item.actualLocationY = actualPoint.actualLocationY
|
||||
}
|
||||
})
|
||||
state.mapRouteList.forEach((item) => {
|
||||
if (idNameMap[item.startingPointId]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.startingPointId].locationX,
|
||||
idNameMap[item.startingPointId].locationY
|
||||
)
|
||||
item.startPointX = idNameMap[item.startingPointId].locationX
|
||||
item.startPointY = idNameMap[item.startingPointId].locationY
|
||||
item.actualStartPointX = actualPoint.actualLocationX
|
||||
item.actualStartPointY = actualPoint.actualLocationY
|
||||
}
|
||||
if (idNameMap[item.endPointId]) {
|
||||
let actualPoint = disposeEventPoint(
|
||||
idNameMap[item.endPointId].locationX,
|
||||
idNameMap[item.endPointId].locationY
|
||||
)
|
||||
item.endPointX = idNameMap[item.endPointId].locationX
|
||||
item.endPointY = idNameMap[item.endPointId].locationY
|
||||
item.actualEndPointX = actualPoint.actualLocationX
|
||||
item.actualEndPointY = actualPoint.actualLocationY
|
||||
}
|
||||
})
|
||||
addEditHistory()
|
||||
}
|
||||
|
||||
// 找出sortNum最小和最大的点
|
||||
let minXPoint = points[0]
|
||||
let maxXPoint = points[0]
|
||||
for (let i = 1; i < points.length; i++) {
|
||||
if (points[i].sortNum < minXPoint.sortNum) {
|
||||
minXPoint = points[i]
|
||||
}
|
||||
if (points[i].sortNum > maxXPoint.sortNum) {
|
||||
maxXPoint = points[i]
|
||||
}
|
||||
//将一个数组中的点位 按照第一个和最后一个排成一条直线
|
||||
const mapPointsToLine = (points, startPointId, endPointId) => {
|
||||
const startPoint = points.find((point) => point.id === startPointId)
|
||||
const endPoint = points.find((point) => point.id === endPointId)
|
||||
|
||||
if (!startPoint || !endPoint) {
|
||||
message.warning('选择的点位有误')
|
||||
return
|
||||
}
|
||||
|
||||
const dx = maxXPoint.locationX - minXPoint.locationX
|
||||
const dy = maxXPoint.locationY - minXPoint.locationY
|
||||
const dx = startPoint.locationX - endPoint.locationX
|
||||
const dy = startPoint.locationY - endPoint.locationY
|
||||
|
||||
// 处理垂直直线的情况
|
||||
if (dx === 0) {
|
||||
return points.map((point) => {
|
||||
if (point === minXPoint || point === maxXPoint) {
|
||||
if (point === endPoint || point === startPoint) {
|
||||
return point
|
||||
}
|
||||
return {
|
||||
...point,
|
||||
locationX: minXPoint.locationX
|
||||
locationX: endPoint.locationX
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const slope = dy / dx
|
||||
const intercept = minXPoint.locationY - slope * minXPoint.locationX
|
||||
const intercept = endPoint.locationY - slope * endPoint.locationX
|
||||
|
||||
return points.map((point) => {
|
||||
if (point === minXPoint || point === maxXPoint) {
|
||||
if (point === endPoint || point === startPoint) {
|
||||
return point
|
||||
}
|
||||
const newY = slope * point.locationX + intercept
|
||||
@ -2151,6 +2186,7 @@ const mapPointsToLine = (points) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//计算是不是在同一条直线的
|
||||
const isStraightLine = (binLocation) => {
|
||||
if (binLocation.length <= 2) {
|
||||
@ -2523,6 +2559,8 @@ const getAllNodeList = async () => {
|
||||
item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
item.locationDeep = item.dataList[0].locationDeep
|
||||
item.locationWide = item.dataList[0].locationWide
|
||||
item.areaName = item.dataList[0].areaName || undefined
|
||||
item.laneName = item.dataList[0].laneName || undefined
|
||||
item.draggable = true
|
||||
item.resizable = true
|
||||
item.rotatable = false
|
||||
@ -2534,6 +2572,7 @@ const getAllNodeList = async () => {
|
||||
item.locationWide = item.dataObj.locationWide
|
||||
item.deviceId = item.dataObj.id
|
||||
item.deviceNo = item.dataObj.deviceNo
|
||||
item.deviceType = item.dataObj.deviceType
|
||||
item.mapImageUrl = item.dataObj.mapImageUrl
|
||||
item.draggable = true
|
||||
item.resizable = true
|
||||
@ -2582,6 +2621,14 @@ const getAllMapRoute = async () => {
|
||||
mapRouteList: JSON.parse(JSON.stringify(state.mapRouteList))
|
||||
}
|
||||
}
|
||||
//获取设备类型
|
||||
const getDeviceTypeName = (deviceType) => {
|
||||
let list = getIntDictOptions(DICT_TYPE.DEVICE_TYPE)
|
||||
let deviceItem = list.find((item) => {
|
||||
return item.value == deviceType
|
||||
})
|
||||
return deviceItem.label
|
||||
}
|
||||
//保存地图按钮
|
||||
const saveMap = async () => {
|
||||
//判断是否存在库位未填写排序号
|
||||
@ -2655,6 +2702,82 @@ const saveNodeList = async () => {
|
||||
const saveMapRoute = async () => {
|
||||
await MapApi.createOrEditOrDelPositionMapLine(imgBgObj.positionMapId, state.mapRouteList)
|
||||
}
|
||||
//线库新增 要在库位新增线库信息
|
||||
const submitLineLibraryFormSuccess = (obj) => {
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (obj.mapItemIds.includes(item.id)) {
|
||||
item.laneId = obj.id
|
||||
item.dataList.forEach((node) => {
|
||||
node.laneName = obj.laneName
|
||||
node.laneId = obj.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//区域新增 要在库位新增区域信息
|
||||
const itemAreaSettingSubmitSuccess = (obj) => {
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (obj.mapItemIds.includes(item.id)) {
|
||||
item.areaId = obj.id
|
||||
item.dataList.forEach((node) => {
|
||||
node.areaName = obj.areaName
|
||||
node.areaId = obj.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//线库删除 要在库位中删除线库信息
|
||||
const lineLibraryManagementDelete = (mapItemIds) => {
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (mapItemIds.includes(item.id)) {
|
||||
item.laneId = undefined
|
||||
item.dataList.forEach((node) => {
|
||||
;``
|
||||
node.laneName = undefined
|
||||
node.laneId = undefined
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//区域删除 要在库位删除区域信息
|
||||
const itemAreaManagementDelete = (mapItemIds) => {
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (mapItemIds.includes(item.id)) {
|
||||
item.areaId = undefined
|
||||
item.dataList.forEach((node) => {
|
||||
node.areaName = undefined
|
||||
node.areaId = undefined
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//线库编辑 要在库位中编辑线库信息
|
||||
const lineLibraryManagementEdit = (obj) => {
|
||||
console.log(obj)
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (obj.mapItemIds.includes(item.id)) {
|
||||
item.laneId = obj.id
|
||||
item.dataList.forEach((node) => {
|
||||
node.laneName = obj.laneName
|
||||
node.laneId = obj.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//区域编辑 要在库位编辑区域信息
|
||||
const itemAreaManagementEdit = (obj) => {
|
||||
console.log(obj)
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
if (obj.mapItemIds.includes(item.id)) {
|
||||
item.areaId = obj.id
|
||||
item.dataList.forEach((node) => {
|
||||
node.areaName = obj.areaName
|
||||
node.areaId = obj.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//筛选图层
|
||||
const layerSelectionSuccess = (typeList) => {
|
||||
state.allMapPointInfo.forEach((item) => {
|
||||
@ -2872,6 +2995,13 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item-tooltip-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.edit-map-page {
|
||||
.map-container {
|
||||
position: relative;
|
||||
|
@ -130,11 +130,11 @@ const handleChangeMap = async (e) => {
|
||||
indexPageRef.value.getMapData(item)
|
||||
console.log(item)
|
||||
router.replace({
|
||||
name: 'MapPageRealTimeMap',
|
||||
query: {
|
||||
mapId: item.id
|
||||
}
|
||||
})
|
||||
name: 'MapPageRealTimeMap',
|
||||
query: {
|
||||
mapId: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
//新建任务
|
||||
const createTaskDialogRef = ref()
|
||||
@ -142,13 +142,16 @@ const createTask = async () => {
|
||||
ElMessageBox.confirm('是否发起拼接任务?', '提示', {
|
||||
confirmButtonText: '是',
|
||||
cancelButtonText: '否',
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
push({ name: 'taskManagementCreateTask' })
|
||||
})
|
||||
.catch(() => {
|
||||
createTaskDialogRef.value.open()
|
||||
.catch((action) => {
|
||||
if (action === 'cancel') {
|
||||
createTaskDialogRef.value.open()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,6 @@
|
||||
/>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="finishTask(props.row, scope.row)"
|
||||
@ -275,7 +274,7 @@ const getRowspan = (key, rowIndex, list) => {
|
||||
const cancelTask = async (mainItem, item) => {
|
||||
try {
|
||||
await message.delConfirm('请确认是否取消所有任务?')
|
||||
await MapTaskAPi.updateTask({
|
||||
await MapTaskAPi.closeTask({
|
||||
id: mainItem.id,
|
||||
priority: mainItem.priority,
|
||||
montageTask: mainItem.montageTask,
|
||||
@ -292,13 +291,9 @@ const finishTask = async (mainItem, item) => {
|
||||
try {
|
||||
await message.delConfirm('请确认是否人工完成任务?')
|
||||
await MapTaskAPi.updateTask({
|
||||
id: mainItem.id,
|
||||
priority: mainItem.priority,
|
||||
montageTask: mainItem.montageTask,
|
||||
montageNumber: mainItem.montageNumber,
|
||||
taskStatus: 5
|
||||
id: item.id
|
||||
})
|
||||
message.success('已取消')
|
||||
message.success('已完成')
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
@ -324,6 +319,9 @@ const priorityNumChange = async (mainItem, item) => {
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
if (queryParams.taskNo) {
|
||||
queryParams.taskNo = queryParams.taskNo.replace(/\s/g, '')
|
||||
}
|
||||
getList()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user