线上加点
This commit is contained in:
parent
fbec4ab2c8
commit
6cd3945303
@ -1632,6 +1632,14 @@ const toolbarClick = async (item) => {
|
||||
toolbarSwitchType.value === 'bulkDelete'
|
||||
) {
|
||||
state.cursorStyle = 'crosshair'
|
||||
} else if (
|
||||
toolbarSwitchType.value === 'addPointOnline' ||
|
||||
toolbarSwitchType.value === 'editRoute' ||
|
||||
toolbarSwitchType.value === 'drawNodes' ||
|
||||
toolbarSwitchType.value === 'editNode' ||
|
||||
toolbarSwitchType.value === 'clickDrawRoute'
|
||||
) {
|
||||
state.cursorStyle = 'pointer'
|
||||
} else {
|
||||
state.cursorStyle = `auto`
|
||||
//工具切换 不适用框选的 要把框选的信息都删掉
|
||||
@ -1655,7 +1663,8 @@ const toolbarClick = async (item) => {
|
||||
toolbarSwitchType.value === 'createLineLibrary' ||
|
||||
toolbarSwitchType.value === 'createRegion' ||
|
||||
toolbarSwitchType.value === 'bulkDelete' ||
|
||||
toolbarSwitchType.value === 'editRoute'
|
||||
toolbarSwitchType.value === 'editRoute' ||
|
||||
toolbarSwitchType.value === 'generateLine'
|
||||
) {
|
||||
state.prohibitedOperation = true
|
||||
} else {
|
||||
@ -2628,6 +2637,10 @@ const getCurvePath = (curve) => {
|
||||
// 编辑路线
|
||||
const handleChooseRoute = async (item, index, type, e) => {
|
||||
if (toolbarSwitchType.value === 'addPointOnline') {
|
||||
if (!item.id) {
|
||||
message.warning('该路线未保存')
|
||||
return
|
||||
}
|
||||
//直线情况下 线上加点
|
||||
if (type === 'line') {
|
||||
const id = await MapApi.getNodeId()
|
||||
@ -2738,6 +2751,24 @@ const handleChooseRoute = async (item, index, type, e) => {
|
||||
positionMapLines: [positionMapLineOne, positionMapLineTwo]
|
||||
}
|
||||
])
|
||||
newPoint.sortNum = res?.ITEM?.sortNum || ''
|
||||
res?.LINE.forEach((lineItem) => {
|
||||
if (
|
||||
lineItem.startingPointId === positionMapLineOne.startingPointId &&
|
||||
lineItem.endPointId === positionMapLineOne.endPointId
|
||||
) {
|
||||
positionMapLineOne.startingSortNum = lineItem.startingSortNum
|
||||
positionMapLineOne.endPointSortNum = lineItem.endPointSortNum
|
||||
}
|
||||
if (
|
||||
lineItem.startingPointId === positionMapLineTwo.startingPointId &&
|
||||
lineItem.endPointId === positionMapLineTwo.endPointId
|
||||
) {
|
||||
positionMapLineTwo.startingSortNum = lineItem.startingSortNum
|
||||
positionMapLineTwo.endPointSortNum = lineItem.endPointSortNum
|
||||
}
|
||||
})
|
||||
|
||||
state.allMapPointInfo.push(newPoint)
|
||||
state.mapRouteList.push(positionMapLineOne)
|
||||
state.mapRouteList.push(positionMapLineTwo)
|
||||
|
Loading…
Reference in New Issue
Block a user