| | |
| | | <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 |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <span>分析结果</span> |
| | | <!-- </div>--> |
| | | <el-table |
| | | highlight-current-row |
| | | max-height="200" |
| | |
| | | </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="地图上绘制要进行分析截断面的线"> |
| | |
| | | |
| | | // 连通性 |
| | | linkType: 1, // 1 连通性起始管段 0 连通性结束管段 用来判断是点击了起始 还是结束管段 |
| | | // 起始管段表格数据 |
| | | tableDataLinkStart: [], |
| | | // 结束管段表格数据 |
| | | tableDataLinkEnd: [], |
| | | // 连通性分析结果表格 |
| | | tableDataLinkResult: [], |
| | | |
| | | currentSelectStart: null, |
| | |
| | | }, |
| | | // 连通性查询 |
| | | async linkQuery () { |
| | | // 设置分析结果为空 |
| | | this.tableDataLinkResult = [] |
| | | if (this.linkPipeline.length > 1) { |
| | | this.linkPipeline.forEach((itm) => { |
| | |
| | | }) |
| | | this.linkPipeline = [] |
| | | } |
| | | // 判断 如果起始管段 结束管段没有数据 则返回false 提示还未选择起始/结束管段 |
| | | if (this.currentSelectStart === null || this.currentSelectEnd === null) { |
| | | this.$message('请选择起始管段和结束管段') |
| | | return false |
| | |
| | | } |
| | | // 请求接口和数据 |
| | | const res = await mapApi.findConnectedPipelines(param) |
| | | // 判断数据结果 |
| | | // 判断数据结果 === 0 则没有请求到数据 |
| | | if (res.data.length === 0) { |
| | | this.$message('没有找到连通的管段') |
| | | this.currentLinkIsTrue = '不连通' |
| | |
| | | } |
| | | }, |
| | | |
| | | 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)' } |
| | |
| | | // }).addTo(this.map) |
| | | // this.map.panInsideBounds(this.currentSelectResultLine.getBounds()) |
| | | }, |
| | | // 点击显示流向 table列表数据 |
| | | async lxQuery (e) { |
| | | console.log(e) |
| | | this.clearLinkPipe() |
| | | // const param = { |
| | | // lineNodeID: e.startpoint |
| | |
| | | // // this.linkPipeline.push(line) |
| | | // }) |
| | | }, |
| | | // 清除流向 |
| | | clearLX () { |
| | | if (this.flowPipeLine != null) { |
| | | this.flowPipeLine.remove() |
| | | this.flowPipeLine = null |
| | | } |
| | | }, |
| | | |
| | | // 爆管 ===> 选择管段 |
| | | bgClick () { |
| | | this.selectPipeLine() |
| | |
| | | // } |
| | | // this.flowPipeLine = main.createFlowLine(param) |
| | | }, |
| | | |
| | | clearLinkPipe () { |
| | | if (this.linkPipeline.length > 0) { |
| | | this.linkPipeline.forEach((itm, idx) => { |
| | |
| | | }) |
| | | } |
| | | this.linkPipeline = [] |
| | | }, |
| | | clearLX () { |
| | | if (this.flowPipeLine != null) { |
| | | this.flowPipeLine.remove() |
| | | this.flowPipeLine = null |
| | | } |
| | | }, |
| | | lxHandleClick2 (e) { |
| | | console.log('逆流向显示') |