派生自 wuyushui/SewerAndRainNetwork

seatonwan9
2021-05-21 4d265afb3419bd5cedc6f31ab78d570f6917b520
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
@@ -46,6 +46,7 @@
import mapApi from '../../../../../api/mapApi'
import { pulseEffect } from '../../../../../utils/utils'
import { createFlowLine } from './PublicWay'
import eventBus from '../../../../../eventBus'
export default {
  name: 'Tube',
@@ -58,23 +59,39 @@
      bgPipeLine: [],
      // 爆管 需要关闭的阀门 table表格数据
      bgFm: [],
      linkPipeline: []
      linkPipeline: [],
      currentSelectEndLine: null
    }
  },
  mounted () {
    this.$nextTick(() => {
      eventBus.$on('tabData-change', (obj) => {
        if (obj) {
          this.handleClick()
        }
      })
    })
  },
  methods: {
    handleClick (tab, event) {
      console.log(event)
      // console.log(tab)
    handleClick () {
      this.clearLinkPipe()
      this.currentLinkIsTrue = ''
      this.linkClear()
      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
      }
    },
    // 地图上点击
    selectPipeLine () {
@@ -109,6 +126,10 @@
        })
      }
      this.linkPipeline = []
      if (this.currentSelectEndLine != null) {
        this.currentSelectEndLine.remove()
        this.currentSelectEndLine = null
      }
    },
    // 爆管 ===> 选择管段
    bgClick () {