|
@@ -52,6 +52,7 @@ import { onBeforeMount, onBeforeUnmount, ref, watch } from 'vue';
|
|
|
import { DrawPolygon, QueryCube, clearDraw } from '@/utils/map/addLayer'
|
|
|
import { useMapStore } from '@/store/map';
|
|
|
import usePanelStore from '@/store/panel';
|
|
|
+import {geometryMeshEffect} from "@/utils/map/addTool.js";
|
|
|
|
|
|
const mapStore = useMapStore()
|
|
|
const panelStore = usePanelStore()
|
|
@@ -89,8 +90,10 @@ watch(() => mapStore.draw_geometry, (val) => {
|
|
|
}, { deep: true })
|
|
|
|
|
|
function handleClear(clearAll) {
|
|
|
+ //开始计算之后取消绘制功能,转而使用带高度三维体显示
|
|
|
+ clearDraw()
|
|
|
+ getMesh("hide")
|
|
|
if(clearAll) {
|
|
|
- clearDraw()
|
|
|
tableData.value = []
|
|
|
}
|
|
|
QueryCube({
|
|
@@ -98,11 +101,42 @@ function handleClear(clearAll) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+//获取带高度三维体
|
|
|
+function getMesh(status){
|
|
|
+ if(status == "hide"){
|
|
|
+ geometryMeshEffect({
|
|
|
+ id: 'sgzy_mesh',
|
|
|
+ status: "hide"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let height = form.value.maxZ * 1 - form.value.minZ * 1
|
|
|
+ let rings = [];
|
|
|
+ for(let i = 0; i < drawResult[0].length; i++){
|
|
|
+ rings.push([drawResult[0][i][0],drawResult[0][i][1],form.value.minZ * 1])
|
|
|
+ }
|
|
|
+ debugger
|
|
|
+ geometryMeshEffect({
|
|
|
+ id: 'sgzy_mesh',
|
|
|
+ status:"show",
|
|
|
+ data: [{
|
|
|
+ type: 'polygon',
|
|
|
+ shape: {
|
|
|
+ height: height,
|
|
|
+ rings: [rings],
|
|
|
+ color: [0,255,0,0.2]
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
function handleCalc() {
|
|
|
const { maxZ, minZ } = form.value
|
|
|
if (!drawResult) return
|
|
|
if (!minZ || !maxZ) return
|
|
|
- handleClear()
|
|
|
+ handleClear();
|
|
|
+ getMesh("show");
|
|
|
setTimeout(() => {
|
|
|
QueryCube({
|
|
|
...form.value,
|