|
@@ -97,9 +97,6 @@
|
|
|
<el-form-item label="绘制空域">
|
|
|
<el-button class="btn-secondary" @click="handleDraw">绘制</el-button>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="网格查询">
|
|
|
- <el-button :disabled="!hasDraw" class="btn-secondary" @click="handleInspect(true)">查询网格</el-button>
|
|
|
- </el-form-item> -->
|
|
|
</el-form>
|
|
|
</Transition>
|
|
|
<Transition name="emerge-right">
|
|
@@ -154,7 +151,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { onBeforeUnmount, ref, watch, reactive, computed } from 'vue';
|
|
|
-import { drawArea, clearDraw, InspectCube } from '@/utils/map/addLayer'
|
|
|
+import { drawArea, clearDraw, InspectCube, showShapes } from '@/utils/map/addLayer'
|
|
|
import { useMapStore } from '@/store/map';
|
|
|
import { uavList } from '@/utils/options';
|
|
|
import { AddPlot } from '@/service/http';
|
|
@@ -232,7 +229,10 @@ async function handleDraw() {
|
|
|
formRef.value.validateField(['height', 'topRadius', 'bottomRadius', 'topHeight', 'bottomHeight'], async (isValid) => {
|
|
|
if (!isValid) return
|
|
|
if (hasDraw.value) {
|
|
|
- clearDraw()
|
|
|
+ showShapes({
|
|
|
+ id: 'qjchs_drew_non_editable',
|
|
|
+ data: null
|
|
|
+ })
|
|
|
handleInspect(false)
|
|
|
await new Promise((res) => {
|
|
|
setTimeout(() => res(), 500);
|
|
@@ -255,25 +255,25 @@ function getShapeInfo() {
|
|
|
case '4':
|
|
|
res = {
|
|
|
point: { x, y, z },
|
|
|
- height,
|
|
|
- radius: topRadius
|
|
|
+ height: +height,
|
|
|
+ radius: +topRadius
|
|
|
}
|
|
|
break;
|
|
|
case '5':
|
|
|
res = {
|
|
|
point: { x, y, z },
|
|
|
- coneHeight: topHeight,
|
|
|
- cylinderHeight: bottomHeight,
|
|
|
- topRadius,
|
|
|
- bottomRadius
|
|
|
+ coneHeight: +topHeight,
|
|
|
+ cylinderHeight: +bottomHeight,
|
|
|
+ topRadius: +topRadius,
|
|
|
+ bottomRadius: +bottomRadius
|
|
|
}
|
|
|
break;
|
|
|
case '6':
|
|
|
res = {
|
|
|
point: { x, y, z },
|
|
|
- height,
|
|
|
- topRadius,
|
|
|
- bottomRadius
|
|
|
+ height: +height,
|
|
|
+ topRadius: +topRadius,
|
|
|
+ bottomRadius: +bottomRadius
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -351,6 +351,17 @@ function toNext() {
|
|
|
formRef.value.validate(valid => {
|
|
|
if (valid) {
|
|
|
layoutStore.toggleGlobalLoading(true)
|
|
|
+ clearDraw()
|
|
|
+ showShapes({
|
|
|
+ id: 'qjchs_drew_non_editable',
|
|
|
+ data: [{
|
|
|
+ type: drawTypes.find(i => i.value === form.value.drawType).shapeType,
|
|
|
+ shape: {
|
|
|
+ ...getShapeInfo(),
|
|
|
+ color: [0, 255, 0, 0.5]
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ })
|
|
|
handleInspect(true)
|
|
|
currentStep.value = 1
|
|
|
}
|
|
@@ -393,6 +404,10 @@ function handleSave() {
|
|
|
onBeforeUnmount(() => {
|
|
|
clearDraw()
|
|
|
handleInspect(false)
|
|
|
+ showShapes({
|
|
|
+ id: 'qjchs_drew_non_editable',
|
|
|
+ data: null
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
</script>
|