| | |
| | | import mapApi from '../../../../../api/mapApi' |
| | | import { pulseEffect } from '../../../../../utils/utils' |
| | | import { createFlowLine } from './PublicWay' |
| | | import eventBus from '../../../../../eventBus' |
| | | |
| | | export default { |
| | | name: 'Tube', |
| | |
| | | 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 () { |
| | |
| | | }) |
| | | } |
| | | this.linkPipeline = [] |
| | | if (this.currentSelectEndLine != null) { |
| | | this.currentSelectEndLine.remove() |
| | | this.currentSelectEndLine = null |
| | | } |
| | | }, |
| | | // 爆管 ===> 选择管段 |
| | | bgClick () { |
| | |
| | | const geom = JSON.parse(itm.geomText) |
| | | const points = [] |
| | | geom.coordinates.forEach((it, id) => { |
| | | points.push(it.reverse()) |
| | | const item = it.reverse() |
| | | if (it.length > 2) { |
| | | item.shift() |
| | | } |
| | | points.push(item) |
| | | }) |
| | | linkPipe.push(points) |
| | | }) |