管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-03-09 6fe940335b9ca7f4640983929b070c00e401dc61
src/views/Tools/terrainDig.vue
@@ -1,7 +1,15 @@
<template>
  <Popup ref="pop" :title="form.title" left="calc(100% - 330px)">
  <Popup
    ref="pop"
    :title="form.title"
    left="calc(100% - 330px)"
  >
    <div class="terrainDig">
      <el-form ref="form" :model="form" label-width="100px">
      <el-form
        ref="form"
        :model="form"
        label-width="100px"
      >
        <el-form-item label="深度(米):">
          <el-input-number
            v-model="form.depth"
@@ -14,7 +22,11 @@
          <el-switch v-model="form.showWall"></el-switch>
        </el-form-item> -->
        <el-form-item>
          <el-button type="primary" size="mini" @click="dig">绘制</el-button>
          <el-button
            type="primary"
            size="mini"
            @click="dig"
          >绘制</el-button>
          <!-- <el-upload
            class="button-group"
            action=""
@@ -50,11 +62,14 @@
    };
  },
  computed: {},
  mounted() {},
  mounted() { },
  methods: {
    // 关闭弹窗
    close() {
      this.$refs.pop.close();
      if (window.Excavation) {
        window.Excavation.drawHandler.destroy();
      }
    },
    // 打开弹窗
    open() {
@@ -68,6 +83,9 @@
    },
    // 地形开挖
    dig() {
      // if (window.Excavation) {
      //   window.Excavation.drawHandler.destroy();
      // }
      window.Excavation = sgworld.Analysis.TerrainExcavation(
        this.form.depth,
        {
@@ -95,11 +113,11 @@
            ) {
              degreesArr.splice(length - 3, 3);
            }
            Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, {
            window.Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, {
              positions: degreesArr,
              showWall: this.form.showWall,
            });
            this.addToTree(Excavation, degreesArr);
            // this.addToTree(Excavation, degreesArr);
          });
        this.$message('开挖区域已导入');
      };