派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-14 447610041c067c090497108c49f923b4ae5ea76e
固废查询
2个文件已修改
35 ■■■■■ 已修改文件
src/components/panel/topicSearch/SewersSearch.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SolidWasteSearch.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSearch.vue
@@ -128,11 +128,13 @@
      wfsHelper.addLike('name', this.form.keyword)
      // const _this = this
      const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {})
      console.log(res)
      if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
        this.list = res.features
      }
    },
    handleLocation (val) {
      console.log(val)
      const bound = this.L.geoJSON([val], {}).getBounds()
      // var layer = window.layerFactory.flyByLayerId(val.id, bound)
      window.map.flyToBounds(bound)
src/components/panel/topicSearch/SolidWasteSearch.vue
@@ -16,7 +16,9 @@
          </el-select>
        </el-form-item>
        <el-radio-group v-model="form.type" class="levelOfRisk">
          <el-radio v-for="(item,index) in levelOfRisk" :label="item.value" :key="index"><span class="levelOfRisk-type">{{item.name }}</span>
          <el-radio v-for="(item,index) in levelOfRisk" :label="item.value" :key="index"><span class="levelOfRisk-type">{{
              item.name
            }}</span>
          </el-radio>
        </el-radio-group>
@@ -43,6 +45,7 @@
<script>
import mapApi from '@/api/mapApi'
import WfsHelper from '@components/helpers/WfsHelper'
export default {
  name: 'SolidWasteSearch',
@@ -140,12 +143,12 @@
    }
  },
  methods: {
    setBounced (item) {
      console.log(item)
      const bound = this.L.geoJSON([item], {}).getBounds()
      var layer = window.serviceLayerHelper.getByLayerId(item.StoragePlaceId)
      layer && layer.openPopup()
      this.$store.state.map.flyToBounds(bound)
    setBounced (val) {
      console.log(val)
      const bound = this.L.geoJSON([val], {}).getBounds()
      // var layer = window.layerFactory.flyByLayerId(val.id, bound)
      window.map.flyToBounds(bound)
      // layer && layer.openPopup()
    },
    handlePipelineType (val) {
      this.solidWasteTypeOptions.forEach(item => {
@@ -156,10 +159,18 @@
    },
    // 点击搜索实现数据的搜索展示
    async handleSearch (data) {
      // console.log(this.form.keyword)
      const result = await mapApi.getSolidWaste(data)
      console.log(result)
      this.searchDataDisplay = result.Result.DataInfo
      // // console.log(this.form.keyword)
      // const result = await mapApi.getSolidWaste(data)
      // console.log(result)
      // this.searchDataDisplay = result.Result.Result
      var wfsHelper = new WfsHelper()
      wfsHelper.addTypeName('固废')
      wfsHelper.addLike('name', this.form.keyword)
      const res = await mapApi.getSolidWaste(wfsHelper.getUrl(), {})
      console.log(res)
      // if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
      this.searchDataDisplay = res.Result.Result
      // }
    }
  }
}