派生自 wuyushui/SewerAndRainNetwork

ChenZeping02609
2021-05-13 672f791281b80a61dbda7d2c2d426dd90b31b982
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
5个文件已修改
40 ■■■■ 已修改文件
src/components/BaseNav/pipeline/AffiliatedFacilities.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayer.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/service/LayerFactory.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/RightSearchPanel.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/LayerEmergency.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/pipeline/AffiliatedFacilities.vue
@@ -15,8 +15,8 @@
                       <div class="el-select el-select--mini">8888</div>
                    </el-form-item> -->
                    <el-form-item label="设施类型:" size="mini" class="search-panel-item">
                        <el-select style="width: 100%"  v-model="dataType" @change="handleDataType"  :popper-class="'select-down'">
                            <el-option v-for="(item,index) in classification" :key="index" :label="item.name" :value="item.name"></el-option>
                        <el-select style="width: 100%"  v-model="dataType" value-key="code" @change="handleDataType" :popper-class="'select-down'">
                            <el-option v-for="(item,index) in classification" :key="index" :label="item.name" :value="item"></el-option>
                        </el-select>
                    </el-form-item>
                    <div class="rightButtonSearch">
@@ -26,7 +26,7 @@
                </el-form>
            </div>
            <el-scrollbar style="height:300px;">
                <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum==index?'hover':''">
                <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum===index?'hover':''">
                    <img class="state" :src="getImgSrc()" style="background: none"/>
                    <div>
                        <h3 @click="handleLocation(item,index)">{{ item.properties.pipename }}</h3>
@@ -80,7 +80,7 @@
  },
  methods: {
    getImgSrc () {
      const icon = this.form.dataType.icon
      const icon = this.dataType.icon
      return icon ? 'assets/images/map/' + icon : ''
    },
    handleClose (done) {
@@ -95,32 +95,29 @@
      window.layerFactory.flyByFeature(val1, val.code)
    },
    handleDataType () {
      console.log(this.dataType)
      this.list = []
    },
    async handleSearch () {
      var wfsHelper = new WfsHelper()
      // todo 现在管网还没区分开类型,后面改
      wfsHelper.addTypeName(this.dataType)
      wfsHelper.addTypeName(this.dataType.typeName)
      if (this.form.keyword) {
      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')) {
        const datas = res.features
        const arrs = []
        for (let i = 0; i < 7; i++) {
          arrs.push(datas[i])
        }
        this.list = arrs
        this.list = res.features
        // this.$forceUpdate()
      }
    },
    handleLocation (val, index) {
      this.activeNum = index
      window.layerFactory.flyByFeature(val, this.form.dataType.code)
      window.layerFactory.flyByFeature(val, this.dataType.code)
    }
  }
}
src/components/LayerController/modules/LcServiceLayer.vue
@@ -90,10 +90,14 @@
          } else {
            item1.type = 1 // 半选
          }
          if (item1.name === '企业应急') {
            console.log(item1)
            bus.$emit('changeSearchBar', item1)
          }
          // console.log(item1.layers.length, item1.istrue, item1.isfalse, item1.type)
        }
      })
      console.log(this.serviceLayers)
      // console.log(this.serviceLayers)
    },
    swLayers (layers, checked) {
      if (layers) {
src/components/LayerController/service/LayerFactory.js
@@ -193,8 +193,10 @@
        point = lineString[parseInt(lineString.length / 2)][0]
        break
    }
    console.log(point)
    window.map.flyTo(point.reverse(), 17)
    if (point.length > 2) {
      point.splice(2, 1)
    }
    window.map.setView(point.reverse(), 17)
    code && this.openPopup(code, feature.id)
  }
src/components/panel/RightSearchPanel.vue
@@ -217,11 +217,9 @@
  mounted () {
    const that = this
    bus.$on('changeSearchBar', function (obj) {
      // console.log(obj.checked, obj.name)
      that.gcComp = ''
      that.topicList.forEach((item) => {
        if (item.name === obj.name) {
          // console.log(obj)
          if (obj.type > 0) {
            item.isShow = true
          } else {
@@ -236,6 +234,7 @@
        }
      })
    })
  //  console.log(that.topicList)
  }
}
</script>
src/conf/LayerEmergency.js
@@ -6,7 +6,7 @@
export const LayerEmergency = {
  code: 'sewersEmergency',
  name: '应急图层',
  name: '企业应急',
  checked: false,
  isShow: true,
  type: 0,