派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-19 a1640b0c9fff81dfc7f9d2411891fcfc662fe9fd
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -16,7 +16,7 @@
            <el-button type="primary" @click="linkClear" size="mini" style="margin-bottom: 5px;"
                       title="根据起始、结束管段进行连通性分析">清除
            </el-button>
            <el-scrollbar style="height:400px">
            <el-scrollbar style="height:450px">
              <el-card shadow="hover"> <!-- style="height: 300px"-->
                <span class="clearfixs">起始管段</span>
                <el-table
@@ -293,9 +293,7 @@
                </template>
              </el-table-column>
            </el-table>
            <span>分析结果</span>
            <!--        </div>-->
            <el-table
                highlight-current-row
                max-height="200"
@@ -337,7 +335,6 @@
              </el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="横断面" name="fourth">
            <el-button type="primary" @click="drawLine" size="mini" style="margin-bottom: 5px;" title="地图上绘制要进行分析截断面的线">
@@ -414,8 +411,11 @@
      // 连通性
      linkType: 1, // 1  连通性起始管段   0 连通性结束管段 用来判断是点击了起始  还是结束管段
      // 起始管段表格数据
      tableDataLinkStart: [],
      // 结束管段表格数据
      tableDataLinkEnd: [],
      // 连通性分析结果表格
      tableDataLinkResult: [],
      currentSelectStart: null,
@@ -545,6 +545,7 @@
    },
    // 连通性查询
    async linkQuery () {
      // 设置分析结果为空
      this.tableDataLinkResult = []
      if (this.linkPipeline.length > 1) {
        this.linkPipeline.forEach((itm) => {
@@ -552,6 +553,7 @@
        })
        this.linkPipeline = []
      }
      // 判断 如果起始管段 结束管段没有数据 则返回false 提示还未选择起始/结束管段
      if (this.currentSelectStart === null || this.currentSelectEnd === null) {
        this.$message('请选择起始管段和结束管段')
        return false
@@ -563,7 +565,7 @@
      }
      // 请求接口和数据
      const res = await mapApi.findConnectedPipelines(param)
      // 判断数据结果
      // 判断数据结果 === 0 则没有请求到数据
      if (res.data.length === 0) {
        this.$message('没有找到连通的管段')
        this.currentLinkIsTrue = '不连通'
@@ -619,15 +621,16 @@
      }
    },
    lxResultSelect () {
    // 流向分析结果table列表数据点击
    lxResultSelect (e) {
      console.log('连通性分析结果列表点击')
      // console.log(e)
      console.log(e)
      // const geom = JSON.parse(e.geomText)
      if (this.currentSelectResultLine != null) {
        this.currentSelectResultLine.remove()
        this.currentSelectResultLine = null
      }
      // if (this.currentSelectResultLine != null) {
      //   this.currentSelectResultLine.remove()
      //   this.currentSelectResultLine = null
      // }
      // this.currentSelectResultLine = L.geoJSON(geom, {
      //   style: function (feature) {
      //     return { color: 'rgba(0,250,255,.6)' }
@@ -635,7 +638,9 @@
      // }).addTo(this.map)
      // this.map.panInsideBounds(this.currentSelectResultLine.getBounds())
    },
    // 点击显示流向 table列表数据
    async lxQuery (e) {
      console.log(e)
      this.clearLinkPipe()
      // const param = {
      //   lineNodeID: e.startpoint
@@ -667,6 +672,14 @@
      //   // this.linkPipeline.push(line)
      // })
    },
    // 清除流向
    clearLX () {
      if (this.flowPipeLine != null) {
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
    },
    // 爆管 ===> 选择管段
    bgClick () {
      this.selectPipeLine()
@@ -798,6 +811,7 @@
      // }
      // this.flowPipeLine = main.createFlowLine(param)
    },
    clearLinkPipe () {
      if (this.linkPipeline.length > 0) {
        this.linkPipeline.forEach((itm, idx) => {
@@ -805,12 +819,6 @@
        })
      }
      this.linkPipeline = []
    },
    clearLX () {
      if (this.flowPipeLine != null) {
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
    },
    lxHandleClick2 (e) {
      console.log('逆流向显示')