派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-07 d64a41f77efcdaf5565bdb34206b00e231bfa66b
修改图层控制配置
1个文件已添加
6个文件已修改
192 ■■■■ 已修改文件
src/components/LayerController/modules/LcServiceLayerFilter.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/LayerTopic.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerPollutionSources.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerSewers.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerWasteGas.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerWasteWater.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayerFilter.vue
@@ -50,18 +50,20 @@
    },
    // todo 还需要优化,在有多个需要子图层独立弹窗情况下无效
    toggle (serviceLayers) {
      for (var i = 0; i < serviceLayers.length; i++) {
        var serviceLayer = serviceLayers[i]
        var childLayer = serviceLayer.childLayer
        if (childLayer) {
          if (this.checkChecked(serviceLayer.layers)) {
            this.layers = childLayer
      if (serviceLayers) {
        for (var i = 0; i < serviceLayers.length; i++) {
          var serviceLayer = serviceLayers[i]
          var childLayer = serviceLayer.childLayer
          if (childLayer) {
            if (this.checkChecked(serviceLayer.layers)) {
              this.layers = childLayer
            } else {
              this.layers = []
            }
            break
          } else {
            this.layers = []
            this.toggle(serviceLayer.layers)
          }
          break
        } else {
          this.toggle(serviceLayer.layers)
        }
      }
    },
src/conf/LayerTopic.js
@@ -1,5 +1,5 @@
/**
 * 区域
 * 专题
 */
import { LayerWasteWater } from './layers/LayerWasteWater'
import { LayerWasteGas } from './layers/LayerWasteGas'
@@ -7,10 +7,11 @@
import { LayerAirQuality } from './layers/LayerAirQuality'
import { LayerEnvRisk } from './layers/LayerEnvRisk'
import { LayerSoilGroundWater } from './layers/LayerSoilGroundWater'
import { LayerPollutionSources } from './layers/LayerPollutionSources'
export const LayerTopic = {
  code: 'sewersTopic',
  name: '专题图层',
  checked: true,
  layers: [LayerWasteWater, LayerWasteGas, LayerWasteSolid, LayerAirQuality, LayerEnvRisk, LayerSoilGroundWater]
  layers: [LayerPollutionSources, LayerWasteWater, LayerWasteGas, LayerWasteSolid, LayerAirQuality, LayerEnvRisk, LayerSoilGroundWater]
}
src/conf/MapConfig.js
@@ -3,6 +3,7 @@
import { LayerSewersPoint } from './layers/LayerSewers'
import { LayerTopic } from './LayerTopic'
import { LayerPipeLine } from './LayerPipeLine'
import { LayerBasin } from './layers/LayerBasin'
const curWwwPath = window.document.location.href
const pathname = window.document.location.pathname
@@ -42,7 +43,7 @@
  IntranetBaseMaps: TDT.intranet,
  InternetBaseMaps: TDT.internet,
  Layers: {
    LayerSewersLine: [LayerPipeLine, LayerTopic],
    LayerSewersLine: [LayerBasin, LayerTopic, LayerPipeLine],
    layerSewersPoint: LayerSewersPoint
  } // 污雨水图层配置
}
src/conf/layers/LayerPollutionSources.js
New file
@@ -0,0 +1,26 @@
/**
 * 污染源
 * @type {string}
 */
export const LayerPollutionSources = {
  code: 'pollutionSources',
  name: '污染源',
  checked: true,
  layers: [
    {
      code: 'pollutionSourcesSczz',
      name: '生产装置',
      sname: '生产装置', // 表名
      checked: true, // 默认选中状态
      url: 'http://www.baidu.com', // 请求业务数据接口
      minZoom: 10 // 在指定级别显示
    },
    {
      code: 'pollutionSourcesZlss',
      name: '治理设施',
      sname: '治理设施', // 表名
      checked: true, // 默认选中状态
      url: 'http://www.baidu.com', // 请求业务数据接口
      minZoom: 10 // 在指定级别显示
    }]
}
src/conf/layers/LayerSewers.js
@@ -1,106 +1,4 @@
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
// const APP_GIS_HOST_2 = 'http://localhost:3000'
// const APP_GIS_HOST_2 = 'http://192.168.31.226:8088'
export const LayerSewersLine = {
  code: 'pipeline',
  name: '管网数据',
  type: 'geojson',
  checked: true,
  layers: [
    {
      code: 'rainline',
      name: '雨水线',
      sname: '管网', // 表名
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=管网',
      minZoom: 10, // 在指定级别显示
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'oilline',
      name: '含油污水线',
      sname: '含油污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含油污水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'saltline',
      name: '含盐污水线',
      sname: '含盐污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含盐污水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'alkaliline',
      name: '含碱污水线',
      sname: '含碱污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含碱污水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'outlet',
      name: '排口',
      sname: '排口',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=排口',
      minZoom: 10,
      childLayer: 'pk' // 关联PointLayers
    },
    {
      code: 'accidentline',
      name: '事故水线',
      sname: '事故水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=事故水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'loopline',
      name: '循环水线',
      sname: '循环水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=循环水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'purifyline',
      name: '净化水线',
      sname: '净化水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=净化水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'lifeline',
      name: '生活污水',
      sname: '生活污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=生活污水',
      minZoom: 10,
      childLayer: 'sewersFsss,sewersHbss' // 关联PointLayers
    },
    {
      code: 'areainfo',
      name: '区域信息',
      sname: '区域信息',
      checked: true, // 默认选中状态
      filter: {},
      minZoom: 10,
      childLayer: 'qyxx' // 关联PointLayers
    }
  ]
}
export const LayerSewersPoint = [
  {
    code: 'sewersFsss',
src/conf/layers/LayerWasteGas.js
@@ -9,27 +9,11 @@
  layers: [
    {
      code: 'wasteGasQy',
      name: '企业',
      sname: '企业', // 表名
      name: '排放口',
      sname: '排放口', // 表名
      checked: true, // 默认选中状态
      url: 'http://www.baidu.com', // 请求业务数据接口
      minZoom: 10 // 在指定级别显示
    },
    {
      code: 'wasteGasJcd',
      name: '监测点',
      sname: '监测点',
      checked: true, // 默认选中状态
      url: 'http://www.baidu2.com',
      minZoom: 10
    },
    {
      code: 'wasteGasVocs',
      name: 'VOCs',
      sname: 'VOCs',
      checked: true, // 默认选中状态
      url: '',
      minZoom: 10
    },
    {
      code: 'wasteGasKrq',
@@ -46,6 +30,14 @@
      checked: true, // 默认选中状态
      url: '',
      minZoom: 10
    },
    {
      code: 'wasteGasVocs',
      name: 'VOCs',
      sname: 'VOCs',
      checked: true, // 默认选中状态
      url: '',
      minZoom: 10
    }
  ]
}
src/conf/layers/LayerWasteWater.js
@@ -21,8 +21,7 @@
      sname: '监测点',
      checked: true, // 默认选中状态
      url: 'http://www.baidu2.com',
      minZoom: 10,
      childLayer: 'fsss,hbss' // 关联PointLayers
      minZoom: 10
    },
    {
      code: 'wasteWaterfk',
@@ -30,8 +29,7 @@
      sname: '排放口',
      checked: true, // 默认选中状态
      url: '',
      minZoom: 10,
      childLayer: 'fsss,hbss' // 关联PointLayers
      minZoom: 10
    }
  ]
}