派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-19 a1640b0c9fff81dfc7f9d2411891fcfc662fe9fd
管线分析及弹框问题
2个文件已修改
68 ■■■■■ 已修改文件
src/components/LayerController/logic/WasteSolid.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/WasteSolid.js
@@ -11,8 +11,6 @@
// 使用封装方法
const AnimalService = require('../service/AnimalService').default
// const publicBounced = require('../../BaseNav/PublicBounced/PublicBounced').default
module.exports = function () {
  /**
   * 返回marker对象数组
@@ -34,8 +32,7 @@
      // 定义类型 用来区分数据的不同 1.接口接口数据来进行数据的判断 2.根据数据类型的不同,进行不同类型的图片显示
      const judgeValue = getSolidWasteData[i].StorageQty
      var iconUrl = this.differentTypes(judgeValue)
      // console.log(getSolidWasteData[i].Latitude, getSolidWasteData[i].Longitude)
      // console.log(getSolidWasteData[i])
      const marker = L.marker([positionX, positionY], {
        totransferData: getSolidWasteData[i],
        icon: L.icon({
@@ -44,9 +41,6 @@
          iconAnchor: [15, 15]
        })
      })
      // console.log(L.icon)
      // console.log(iconUrl)
      // console.log(marker)
      layer.addLayer(marker)
    }
  }
@@ -75,25 +69,8 @@
  // 根据点击不同数据 进行接口的数据请求
  this.requestSolidWasteData = async (e) => {
    // 基本信息 和 详细信息 展示数据所需参数
    // const dataValue = {
    //   StoragePlaceId: e.layer.options.totransferData.StoragePlaceId
    // }
    // console.log(e.layer.options.totransferData.Name)
    // 弹框标题
    const title = e.layer.options.totransferData.Name
    // 基本信息 tabs
    // const resultBasic = await mapApi.getSolidWasteBaseInfo(dataValue)
    // 详细信息展示 table
    // const resultDetailed = await mapApi.getSolidWasteDetail(dataValue)
    // // 绑定弹框实例
    // const PublicBounced = window.Vue.extend(publicBounced)
    // const instance = new PublicBounced().$mount()
    // document.body.appendChild(instance.$el)
    // // document.body.removeChild(instance.$el)
    // // 通过方法 向绑定弹框传递数据
    // instance.setData(title, resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei')
    /* flyTo()弹出框平移事件 */
    this.setPanTo(e.latlng, 300)
    window.$layer.open({
@@ -101,7 +78,6 @@
        content: WasteSolidIndex, // 组件
        parent: this, // 父组件
        data: { // 传递的参数
          info: this.info,
          storagePlaceId: e.layer.options.totransferData.StoragePlaceId
        }
      },
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -16,7 +16,7 @@
            <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
@@ -293,9 +293,7 @@
                </template>
              </el-table-column>
            </el-table>
            <span>分析结果</span>
            <!--        </div>-->
            <el-table
                highlight-current-row
                max-height="200"
@@ -337,7 +335,6 @@
              </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="地图上绘制要进行分析截断面的线">
@@ -414,8 +411,11 @@
      // 连通性
      linkType: 1, // 1  连通性起始管段   0 连通性结束管段 用来判断是点击了起始  还是结束管段
      // 起始管段表格数据
      tableDataLinkStart: [],
      // 结束管段表格数据
      tableDataLinkEnd: [],
      // 连通性分析结果表格
      tableDataLinkResult: [],
      currentSelectStart: null,
@@ -545,6 +545,7 @@
    },
    // 连通性查询
    async linkQuery () {
      // 设置分析结果为空
      this.tableDataLinkResult = []
      if (this.linkPipeline.length > 1) {
        this.linkPipeline.forEach((itm) => {
@@ -552,6 +553,7 @@
        })
        this.linkPipeline = []
      }
      // 判断 如果起始管段 结束管段没有数据 则返回false 提示还未选择起始/结束管段
      if (this.currentSelectStart === null || this.currentSelectEnd === null) {
        this.$message('请选择起始管段和结束管段')
        return false
@@ -563,7 +565,7 @@
      }
      // 请求接口和数据
      const res = await mapApi.findConnectedPipelines(param)
      // 判断数据结果
      // 判断数据结果 === 0 则没有请求到数据
      if (res.data.length === 0) {
        this.$message('没有找到连通的管段')
        this.currentLinkIsTrue = '不连通'
@@ -619,15 +621,16 @@
      }
    },
    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)' }
@@ -635,7 +638,9 @@
      // }).addTo(this.map)
      // this.map.panInsideBounds(this.currentSelectResultLine.getBounds())
    },
    // 点击显示流向 table列表数据
    async lxQuery (e) {
      console.log(e)
      this.clearLinkPipe()
      // const param = {
      //   lineNodeID: e.startpoint
@@ -667,6 +672,14 @@
      //   // this.linkPipeline.push(line)
      // })
    },
    // 清除流向
    clearLX () {
      if (this.flowPipeLine != null) {
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
    },
    // 爆管 ===> 选择管段
    bgClick () {
      this.selectPipeLine()
@@ -798,6 +811,7 @@
      // }
      // this.flowPipeLine = main.createFlowLine(param)
    },
    clearLinkPipe () {
      if (this.linkPipeline.length > 0) {
        this.linkPipeline.forEach((itm, idx) => {
@@ -805,12 +819,6 @@
        })
      }
      this.linkPipeline = []
    },
    clearLX () {
      if (this.flowPipeLine != null) {
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
    },
    lxHandleClick2 (e) {
      console.log('逆流向显示')