派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-21 b187fa62b3e02d8417d73139dcf3e2271268788d
管线分析功能问题修改
1个文件已删除
6个文件已修改
179 ■■■■ 已修改文件
src/components/panel/topicSearch/SewersSearch.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSearch.vue
@@ -171,18 +171,18 @@
    // 搜索功能
    async handleSearch () {
      // console.log(this.form.dataType.sname, this.form.keyword)
      // console.log(this.form)
      this.list = []
      this.wfsHelper.clearFilter()
      // todo 现在管网还没区分开类型,后面改
      this.wfsHelper.setTypeName([this.form.dataType.typeName])
      if (this.form.keyword) {
        this.wfsHelper.addLike('name', this.form.keyword)
        this.wfsHelper.setFilter(this.form.keyword)
        this.wfsHelper.addLike('pipename', this.form.keyword)
      }
      // const filter = this.form.dataType.filter
      // if (filter) {
      //   this.wfsHelper.setFilter(filter)
      // }
      const filter = this.form.dataType.filter
      if (filter) {
        this.wfsHelper.setFilter(filter)
      }
      // const _this = this
      const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
      if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
@@ -12,7 +12,7 @@
            <el-table-column prop="mediumtype" label="介质类型" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="x" label="断面(经度)" :show-overflow-tooltip="true" width="80"></el-table-column>
            <el-table-column prop="y" label="断面(纬度)" :show-overflow-tooltip="true" width="80"></el-table-column>
            <el-table-column prop="z" label="断面(高程)" :show-overflow-tooltip="true" width="80"></el-table-column>
            <el-table-column prop="z" label="断面高程(m)" :show-overflow-tooltip="true" width="80"></el-table-column>
            <el-table-column prop="spacing" label="间距(m)" width="80"></el-table-column>
        </el-table>
        <span class="fixed-style">断面图</span>
@@ -47,6 +47,13 @@
    // 使用 DrwLine方法
    eventBus.$on('draw-hdm-line', (points) => {
      this.getHdmPoint(points)
    })
    this.$nextTick(() => {
      eventBus.$on('tabData-change', (obj) => {
        if (obj) {
          this.jdmClear()
        }
      })
    })
  },
  methods: {
@@ -86,9 +93,9 @@
      for (let i = 0; i < dataPoint.length; i++) {
        const obj = {
          mediumtype: dataPoint[i].pipelines.extraData.mediumtype,
          x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(4),
          y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(4),
          z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(4),
          x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(8),
          y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(8),
          z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(2),
          spacing: spacingList[i - 1]
        }
        this.tableData.push(obj)
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
File was deleted
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
@@ -39,6 +39,7 @@
<script>
import mapApi from '../../../../../api/mapApi'
import { createFlowLine } from './PublicWay'
import eventBus from '../../../../../eventBus'
export default {
  name: 'Flow',
@@ -48,27 +49,43 @@
      tableDataLiuxiang: [],
      // 流向 分析结果 的table表格数据
      lxTableDataResult: [],
      linkPipeline: []
      linkPipeline: [],
      currentSelectResultLine: null
    }
  },
  mounted () {
    this.$nextTick(() => {
      eventBus.$on('tabData-change', (obj) => {
        if (obj) {
          this.handleClick()
        }
      })
    })
  },
  methods: {
    // tab切换
    handleClick (tab, event) {
      console.log(event)
      // console.log(tab)
      this.clearLinkPipe()
    handleClick () {
      this.clearLX()
      this.linkClear()
      this.jdmClear()
      this.currentLinkIsTrue = ''
      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
      }
    },
    // 定位方法事件
    linkResultSelect (e) {
@@ -145,7 +162,7 @@
    },
    // 点击显示流向 table列表中的数据 => 进行官网流向的显示
    async lxQuery (e) {
      console.log(e)
      // console.log(e)
      this.clearLinkPipe()
      const param = {
        // lineNodeID: e.startpoint
@@ -182,6 +199,10 @@
        this.flowPipeLine.remove()
        this.flowPipeLine = null
      }
      if (this.currentSelectResultLine != null) {
        this.currentSelectResultLine.remove()
        this.currentSelectResultLine = null
      }
    }
  }
}
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
@@ -1,5 +1,16 @@
export function selectPipeLine () {
  window.map.on('click', this.selectClick)
}
export function createFlowLine (param) {
  const flowLine = window.L.polyline(param.points, param.option)
  flowLine.addTo(window.map)
  return flowLine
}
export function linkClear (linkClear) {
  if (this.linkClear != null) {
    this.linkClear.remove()
    this.linkClear = null
  }
}
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,26 +59,38 @@
      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
      }
    },
    // 地图上点击
@@ -113,6 +126,10 @@
        })
      }
      this.linkPipeline = []
      if (this.currentSelectEndLine != null) {
        this.currentSelectEndLine.remove()
        this.currentSelectEndLine = null
      }
    },
    // 爆管 ===> 选择管段
    bgClick () {
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -36,13 +36,12 @@
    return {
      // 地图点击类型 first连通性点击  second爆管点击  third流向点击 fourth横断面
      activeName: 'first',
      tableData: false,
      tableDataList: []
      tableData: false
    }
  },
  methods: {
    // tab切换
    handleClick (tab, event) {
    handleClick () {
      eventBus.$emit('tabData-change', true)
    }
  }