派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-12 fb3ed04d97a50b48717be11f37af41da08fd6062
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
6个文件已修改
61 ■■■■■ 已修改文件
src/assets/css/map/map-panel-style.less 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/PublicDetailedList.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/service/LayerFactory.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/service/WfsLayerService.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/map/map-panel-style.less
@@ -335,6 +335,7 @@
/*************** PublicTable 表格样式。*********************************/
.el-table{
  border-bottom: 1px solid #fff;
  .el-table__body-wrapper::-webkit-scrollbar {
    width: 0;
    height: 0;
@@ -353,7 +354,6 @@
.el-table--border th{
  border-right: none;
  border-left: 1px solid #ddd;
}
.el-table--border th.gutter{border-left: none}
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -56,7 +56,7 @@
                   center
                   v-dialogDrag
        >
            <div class="el-dialog-div" style="height: 500px">
            <div class="el-dialog-div">
                <public-detailed-list v-bind="$attrs"></public-detailed-list>
            </div>
        </el-dialog>
src/components/BaseNav/PublicBounced/GasComponents/PublicDetailedList.vue
@@ -1,6 +1,6 @@
<template>
  <div class="PublicDetailedList">
    <el-table :data="tableData" max-height="600px" border>
    <el-table :data="tableData" max-height="600px" border  >
          <el-table-column prop="MonTimeStr" label="监测时间"></el-table-column>
          <el-table-column  label="氮氧化物">
              <el-table-column prop="MonQty"  width="70">
@@ -77,5 +77,7 @@
<style scoped>
.PublicDetailedList{
  /*height: 100%*/
  .gutter{display: none !important;width: 0 !important}
}
</style>
src/components/LayerController/service/LayerFactory.js
@@ -11,13 +11,17 @@
  init (layerConfig) {
    // 1. 遍历layer config
    for (var i = 0, l = layerConfig.length; i < l; i++) {
      var config = layerConfig[i]
      var layers = config.layers
      layers && this.init(config.layers)
    if (layerConfig) {
      for (var i = 0, l = layerConfig.length; i < l; i++) {
        var config = layerConfig[i]
        var layers = config.layers
        var childLayer = config.childLayer
        layers && this.init(config.layers)
        childLayer && this.init(config.childLayer)
      var checked = config.checked
      checked && this.load(config)
        var checked = config.checked
        checked && this.load(config)
      }
    }
  }
@@ -72,17 +76,25 @@
  }
  /**
     * 设置index,线在最下面,点在上面
     * @param layerGroup 图层组
     */
  setZIndex (layerGroup) {
    var layers = layerGroup.getLayers()
    if (layers.length > 0) {
      var layer = layers[0]
      if (layer.feature && (layer.feature.geometry.type === 'LineString' || layer.feature.geometry.type === 'MultiLineString')) {
        layerGroup.bringToBack()
   * todo 这里无效,貌似是因为geojson加载到地图也是个layergroup
   *
   * 设置index,线在最下面,点在上面
   * @param layerGroup 图层组
   */
  setZIndex (layer) {
    if (Array.isArray(layer)) {
      for (var i = 0; i < layer.length; i++) {
        this.setZIndex(layer[i])
      }
    } else {
      if (layer.getLayers) {
        this.setZIndex(layer.getLayers())
      } else {
        layerGroup.bringToFront()
        if (layer.feature && (layer.feature.geometry.type === 'LineString' || layer.feature.geometry.type === 'MultiLineString')) {
          layer.bringToBack()
        } else {
          layer.bringToFront()
        }
      }
    }
  }
src/components/LayerController/service/WfsLayerService.js
@@ -1,7 +1,6 @@
/**
 * 加载业务数据图层
 */
import { STYLES } from '../../../conf/Constants'
import AjaxUtils from '../../../utils/AjaxUtils'
@@ -30,14 +29,13 @@
  loadData (wfsUrl) {
    AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => {
      console.log(res)
      this.draw(res.data.features)
    })
  }
  draw (features) {
    const icon = this.config.icon
    this.L.geoJSON(features, {
    const geojsonLayer = this.L.geoJSON(features, {
      style: function (feature) {
        return {
          fill: STYLES.FILL,
@@ -75,6 +73,7 @@
          .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
      }
    }).addTo(this.layer)
    window.layerFactory.setZIndex(geojsonLayer)
  }
  mouseOverListener (e, layer) {
src/conf/MapConfig.js
@@ -1,6 +1,5 @@
import * as L from 'leaflet'
import TDT from './TDT'
import { LayerSewersPoint } from './layers/LayerSewers'
import { LayerTopic } from './LayerTopic'
import { LayerBasin } from './layers/LayerBasin'
@@ -42,8 +41,7 @@
  IntranetBaseMaps: TDT.intranet,
  InternetBaseMaps: TDT.internet,
  Layers: {
    LayerSewersLine: [LayerBasin, LayerTopic],
    layerSewersPoint: LayerSewersPoint
    LayerSewersLine: [LayerBasin, LayerTopic]
  } // 污雨水图层配置
}