|
@@ -16,16 +16,13 @@
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="绘制">
|
|
|
- <el-button class="btn-secondary" @click="handleDraw">绘制</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="评价系数">
|
|
|
- <el-checkbox v-model="form.evaluation">展示</el-checkbox>
|
|
|
- </el-form-item>
|
|
|
+ <!-- <el-form-item label="绘制">-->
|
|
|
+ <!-- <el-button class="btn-secondary" @click="handleDraw">绘制</el-button>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
</el-form>
|
|
|
|
|
|
<div class="text-center">
|
|
|
- <el-button class="btn-main" :disabled="!hasDraw" @click="handleCalc">开始计算</el-button>
|
|
|
+ <el-button class="btn-main" @click="handleCalc">开始计算</el-button>
|
|
|
<el-button class="btn-main" @click="handleClear">清空</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -34,7 +31,7 @@
|
|
|
<script setup>
|
|
|
import useLayoutStore from '@/store/layout'
|
|
|
import { useMapStore } from '@/store/map'
|
|
|
-import { clearDraw, DrawPolygon, QueryCube } from '@/utils/map/addLayer'
|
|
|
+import { clearDraw, DrawPolygon, limitHeightAnalysis, QueryCube } from '@/utils/map/addLayer'
|
|
|
import { geometryMeshEffect } from '@/utils/map/addTool.js'
|
|
|
import { wait } from '@/utils/tools'
|
|
|
import { ref, watch, onBeforeUnmount } from 'vue'
|
|
@@ -44,7 +41,7 @@ const mapStore = useMapStore()
|
|
|
const layoutStore = ref(useLayoutStore())
|
|
|
|
|
|
const form = ref({
|
|
|
- level: 14,
|
|
|
+ level: 15,
|
|
|
minZ: '0',
|
|
|
maxZ: '120',
|
|
|
evaluation: false,
|
|
@@ -82,33 +79,43 @@ function getMesh(status) {
|
|
|
}
|
|
|
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])
|
|
|
- }
|
|
|
- geometryMeshEffect({
|
|
|
- id: 'sgzy_mesh',
|
|
|
- status: 'show',
|
|
|
- data: [
|
|
|
- {
|
|
|
- type: 'polygon',
|
|
|
- shape: {
|
|
|
- height: height,
|
|
|
- rings: [rings],
|
|
|
- color: [0, 255, 0, 0.2],
|
|
|
- },
|
|
|
- },
|
|
|
+
|
|
|
+ let bigRings = [
|
|
|
+ [
|
|
|
+ [4929.0513305664, 2427.762878418, 0],
|
|
|
+ [544.4196777344, 2427.762878418, 0],
|
|
|
+ [544.4196777344, -1598.4520874023, 0],
|
|
|
+ [4929.0513305664, -1598.4520874023, 0],
|
|
|
+ [4929.0513305664, 2427.762878418, 0],
|
|
|
],
|
|
|
- })
|
|
|
+ ]
|
|
|
+
|
|
|
+ for (let i = 0; i < bigRings[0].length; i++) {
|
|
|
+ rings.push([bigRings[0][i][0], bigRings[0][i][1], form.value.minZ * 1])
|
|
|
+ }
|
|
|
+ // geometryMeshEffect({
|
|
|
+ // id: 'sgzy_mesh',
|
|
|
+ // status: 'show',
|
|
|
+ // data: [
|
|
|
+ // {
|
|
|
+ // type: 'polygon',
|
|
|
+ // shape: {
|
|
|
+ // height: height,
|
|
|
+ // rings: [rings],
|
|
|
+ // color: [0, 255, 0, 0.1],
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
function handleCalc() {
|
|
|
const { maxZ, minZ } = form.value
|
|
|
- if (!drawResult) return
|
|
|
if (!minZ || !maxZ) return
|
|
|
handleClear()
|
|
|
getMesh('show')
|
|
|
setTimeout(() => {
|
|
|
- QueryCube({
|
|
|
+ limitHeightAnalysis({
|
|
|
...form.value,
|
|
|
show: true,
|
|
|
level: Number(form.value.level),
|
|
@@ -118,9 +125,9 @@ function handleCalc() {
|
|
|
}
|
|
|
|
|
|
function handleClear() {
|
|
|
- clearDraw()
|
|
|
+ // clearDraw()
|
|
|
getMesh('hide')
|
|
|
- QueryCube({
|
|
|
+ limitHeightAnalysis({
|
|
|
show: false,
|
|
|
})
|
|
|
}
|