| | |
| | | |
| | | const viewInstance = inject('viewInstance'); |
| | | const homeViewer = inject('homeViewer'); |
| | | |
| | | watch( |
| | | () => selectionIds.value, |
| | | (newValue, oldValue) => { |
| | | if (newValue && oldValue && newValue !== oldValue) { |
| | | cancel(); |
| | | } |
| | | } |
| | | ); |
| | | function preventDefault(event) { |
| | | event.preventDefault(); |
| | | |
| | |
| | | curPolygonEntity.polyline = { |
| | | width: 2, |
| | | material: Cesium.Color.WHITE, |
| | | clampToGround: false, |
| | | clampToGround: true, |
| | | }; |
| | | |
| | | curPolygonEntity.polyline.positions = new Cesium.CallbackProperty(function () { |
| | |
| | | }, []); |
| | | polygon.push(polygon[0]); |
| | | console.log('绘制', `POLYGON((${polygon.join(',')}))`); |
| | | ElMessage.success('重新绘制图斑成功!!'); |
| | | if (selectionIds.value) { |
| | | emit('upDateDrawState'); |
| | | selectionIds.value = null; |
| | | clearSelect(); |
| | | } |
| | | getTableList() |
| | | // 接口 |
| | | // sdfwUpdate({ |
| | | // ids: selectionIds.value, |
| | | // sdfw: `POLYGON((${polygon.join(',')}))`, |
| | | // }) |
| | | // .then(res => { |
| | | // if (selectionIds.value) { |
| | | // emit('upDateDrawState') |
| | | // selectionIds.value = null |
| | | // // clearSelect() |
| | | // } |
| | | sdfwUpdate({ |
| | | ids: selectionIds.value, |
| | | sdfw: `POLYGON((${polygon.join(',')}))`, |
| | | }) |
| | | .then(res => { |
| | | if (selectionIds.value) { |
| | | emit('upDateDrawState') |
| | | selectionIds.value = null |
| | | clearSelect() |
| | | } |
| | | |
| | | // if (res.data.code !== 0) return ElMessage.error(res.message) |
| | | // ElMessage.success('重新绘制图斑成功!!') |
| | | |
| | | // // getTableList() |
| | | // }) |
| | | // .catch(e => { |
| | | // cancel() |
| | | // }) |
| | | if (res.data.code !== 0) return ElMessage.error(res.message) |
| | | ElMessage.success('重新绘制图斑成功!!') |
| | | getTableList() |
| | | }) |
| | | .catch(e => { |
| | | cancel() |
| | | }) |
| | | } |
| | | |
| | | function cancel() { |
| | | remove(); |
| | | removeMenuPanel(); |
| | | clearPlanar(); |
| | | |
| | | removeSaveMenuPanel(); |
| | | init(); |
| | | } |
| | | |
| | |
| | | background: rgba(0, 0, 0, 0.6); |
| | | white-space: nowrap; |
| | | border-radius: 4px; |
| | | |
| | | pointer-events: none; |
| | | &::after { |
| | | content: ''; |
| | | position: absolute; |