| | |
| | | <el-table |
| | | ref="singleTable" |
| | | highlight-current-row |
| | | :data="tableData" |
| | | :data="startingSection" |
| | | max-height="200" |
| | | style="width: 100%" size="mini"> |
| | | <el-table-column |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: 'Connectivity', |
| | | data () { |
| | | return { |
| | | // 连通性 |
| | | linkType: 1, // 1 连通性起始管段 0 连通性结束管段 用来判断是点击了起始 还是结束管段 |
| | | tableData: [] |
| | | map: window.map, |
| | | tableData: [], |
| | | startingSection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | // 地图点击起始管段 |
| | | linkClickStart () { |
| | | console.log('地图点击起始管段') |
| | | this.linkType = 1 |
| | | // this.selectPipeLine() |
| | | // 流向地图上点击 |
| | | selectPipeLine () { |
| | | this.map.on('click', this.selectClick) |
| | | }, |
| | | // 地图点击结束管段 |
| | | linkClickEnd () { |
| | | console.log('地图点击结束管段') |
| | | this.linkType = 0 |
| | | // this.selectPipeLine() |
| | | // 地图上点击回调 |
| | | selectClick (e) { |
| | | this.map.off('click', this.selectClick) |
| | | const point = [e.latlng.lng, e.latlng.lat] |
| | | console.log(point) |
| | | // 根据数据进行数据请求 |
| | | // this.getPipeLine(point) |
| | | }, |
| | | // 连通性分析 |
| | | linkQuery () { |
| | | console.log('点击连通性分析') |
| | | }, |
| | | // 清除功能 |
| | | linkClear () { |
| | | console.log('点击清除') |
| | | }, |
| | | // 选择起始管段 |
| | | linkSelectStart () { |
| | | console.log('选择起始管段') |
| | | // 数据请求 |
| | | async getPipeLine (point) { |
| | | const param = { |
| | | x: point[0], |
| | | y: point[1], |
| | | radius: 3 |
| | | } |
| | | console.log(param) |
| | | // const res = await api.getPipeline(param) |
| | | // console.log(res) |
| | | // this.startingSection = res.data |
| | | } |
| | | } |
| | | } |
| | |
| | | /deep/ .fixed-tablea { |
| | | background: rgba(0, 16, 30, 1) !important; |
| | | } |
| | | |
| | | /deep/ .el-table__fixed-right::before { |
| | | background: none; |
| | | } |