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