派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-21 f425c4dd7d48529f7f2e50bba8188463f8d60ee2
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
@@ -39,6 +39,7 @@
<script>
import mapApi from '../../../../../api/mapApi'
import { createFlowLine } from './PublicWay'
import eventBus from '../../../../../eventBus'
export default {
  name: 'Flow',
@@ -48,27 +49,43 @@
      tableDataLiuxiang: [],
      // 流向 分析结果 的table表格数据
      lxTableDataResult: [],
      linkPipeline: []
      linkPipeline: [],
      currentSelectResultLine: null
    }
  },
  mounted () {
    this.$nextTick(() => {
      eventBus.$on('tabData-change', (obj) => {
        if (obj) {
          this.handleClick()
        }
      })
    })
  },
  methods: {
    // tab切换
    handleClick (tab, event) {
      console.log(event)
      // console.log(tab)
      this.clearLinkPipe()
    handleClick () {
      this.clearLX()
      this.linkClear()
      this.jdmClear()
      this.currentLinkIsTrue = ''
      this.bgFm = []
      this.bgPipeLine = []
      this.tableData = []
      this.tableDataLiuxiang = []
      this.tableDataLinkStart = []
      this.tableDataLinkEnd = []
      this.tableDataLinkResult = []
      this.lxTableDataResult = []
    },
    linkClear () {
      if (this.currentSelectStartLine != null) {
        this.currentSelectStartLine.remove()
        this.currentSelectStartLine = null
      }
      if (this.currentSelectEndLine != null) {
        this.currentSelectEndLine.remove()
        this.currentSelectEndLine = null
      }
      if (this.currentSelectResultLine != null) {
        this.currentSelectResultLine.remove()
        this.currentSelectResultLine = null
      }
    },
    // 定位方法事件
    linkResultSelect (e) {
@@ -145,7 +162,7 @@
    },
    // 点击显示流向 table列表中的数据 => 进行官网流向的显示
    async lxQuery (e) {
      console.log(e)
      // console.log(e)
      this.clearLinkPipe()
      const param = {
        // lineNodeID: e.startpoint
@@ -182,6 +199,10 @@
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
      if (this.currentSelectResultLine != null) {
        this.currentSelectResultLine.remove()
        this.currentSelectResultLine = null
      }
    }
  }
}