派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-03-31 5785717a5ff9ce8691544c9fe8d9493e1a9e746f
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

 Conflicts:
 src/conf/Constants.js
7个文件已添加
7个文件已修改
424 ■■■■■ 已修改文件
public/assets/images/map/company.png 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapUrl.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/Company.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/Sample.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/SolidWaste.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayer.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerArea.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerFsss.js 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerHbss.js 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerPipeLine.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerPk.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/company.png
src/api/mapApi.js
@@ -23,5 +23,8 @@
  },
  GetWasteGas (data) {
    return axios.get(mapUrl.GetWasteGas, data)
  },
  getCompany (data) {
    return axios.get(mapUrl.getCompany, data)
  }
}
src/api/mapUrl.js
@@ -12,3 +12,5 @@
export const getWasteWater = $HOST + '/wasteWater/getWasteWater'
export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo'
export const getCompany = $HOST + '/company/getCompany'
src/components/LayerController/logic/Company.js
New file
@@ -0,0 +1,59 @@
/**
 * 固废
 */
// 区分不同类型 使用不同img
const companyImg = '/assets/images/map/company.png'
const mapApi = require('../../../api/mapApi').default
const AnimalService = require('../service/AnimalService').default
module.exports = function () {
  /**
     * 返回marker对象数组
     * @param L leaflet对象
     */
  this.init = async (layer, L) => {
    // const SolidWasteIcon = this.SolidWasteIcon()
    this.animalService = new AnimalService({
      L: L,
      layer: layer
    })
    const res = await mapApi.getCompany()
    console.log(res)
    const data = res.Result.DataInfo || {}
    for (let i = 0; i < data.length; i++) {
      // 经纬度 位置
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
      var iconUrl = companyImg
      const marker = L.marker.magic([positionX, positionY], {
        icon: L.icon({
          iconUrl: iconUrl,
          iconSize: [50, 50],
          iconAnchor: [25, 25]
        })
      })
      layer.addLayer(marker)
    }
  }
  this.bindTooltip = (layer) => {
    console.log(layer)
    return '企业'
  }
  this.clickListener = (layer) => {
    /* this.animalService.pulseEffect(e.latlng)
    console.log(e)
    return this.PublicBounced.$el
    */
    console.log(layer)
  }
  // 固废点击进行的 内容的设置
  // SetSolidWasteContent (config, containerPopup) {
  //   this.SolidWastePopup = containerPopup
  // }
}
src/components/LayerController/logic/Sample.js
@@ -1,9 +1,45 @@
/**
 * 废气
 */
const AnimalService = require('../service/AnimalService').default
const AjaxUtils = require('../../../utils/AjaxUtils').default
module.exports = function () {
  this.init = (L) => {
    console.log('sample init !!!')
  /**
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = (layer, L) => {
    this.animalService = new AnimalService({ L: L, layer: layer })
    AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
      companyId: 3900100145,
      id: '',
      monType: 1,
      userCode: 'wenchun.deng',
      monDuration: '',
      epName: '',
      secdDeptId: '',
      contrLevel: '',
      dataStatus: '',
      dataFlag: '',
      runStatus: '',
      emissTypeId: ''
    }, function (res) {
      const data = res.data.Result.DataInfo
      for (let i = 0; i < data.length; i++) {
        // 经纬度 位置
        const positionX = data[i].Latitude
        const positionY = data[i].Longitude
        layer.addLayer(L.marker([positionX, positionY], { test: '122224' }))
      }
    })
  }
  this.clickListener = (e, data) => {
    console.log('sample clickListener !!!')
  this.bindTooltip = (layer) => {
    return layer.options.test
  }
  this.clickListener = (e) => {
    this.animalService.pulseEffect(e.latlng)
  }
}
src/components/LayerController/logic/SolidWaste.js
@@ -60,6 +60,8 @@
    const PublicBounced = window.Vue.extend(publicBounced)
    const instance = new PublicBounced()
    instance.setData(result, 'gufei')
    instance.$mount()
    document.body.appendChild(instance.$el)
  }
  // 不同类型图片封装
src/components/LayerController/modules/LcServiceLayer.vue
@@ -6,7 +6,7 @@
        <div class="wms-panel">
            <div v-for="item in serviceLayers" :key="item.code" class="layerbox">
                <div><input type="checkbox" :name="'wmsLayer_'+item.code" :checked="item.checked" :value="item.code"
                            @change="swAllLayers(item)"/>{{ item.name }} <span @click="swFilter(item)"
                            @change="swAllLayers(item)"/>{{ item.name }} <span @click="swFilter(item)" v-if="item.childLayer"
                                                                               class="btn-filter">过滤</span>
                </div>
                <div class="layerbox-item">
@@ -14,8 +14,7 @@
                                                                                                      :name="'wmsSublayers_'+item.code+'_'+itm.code"
                                                                                                      :checked="itm.checked"
                                                                                                      :value="itm.code"
                                                                                                      @change="swWmsLayer(itm)"/>{{
                        itm.name }}
                                                                                                      @change="swWmsLayer(itm)"/>{{ itm.name }}
                    </div>
                </div>
            </div>
src/conf/Constants.js
@@ -5,12 +5,13 @@
}
export const logicMapper = {
  fsqy: 'Sample.js',
  // fsqy: 'Sample.js',
  fspfk: 'Sample.js',
  fsjcd: 'Sample.js',
  wasteGasJcd: 'WasteGas.js',
  wasteWaterJcd: 'WasteWater.js',
  solidWasteJcd: 'SolidWaste.js'
  solidWasteJcd: 'SolidWaste.js',
  fsqy: 'Company.js'
}
export const props = {
src/conf/MapConfig.js
@@ -1,9 +1,12 @@
import * as L from 'leaflet'
import TDT from './TDT'
import { LayerSewersLine, LayerSewersPoint } from './layers/LayerSewers'
import { LayerSewersPoint } from './layers/LayerSewers'
import { LayerWasteWater } from './layers/LayerWasteWater'
import { LayerSolidWaste } from './layers/LayerSolidWaste'
import { LayerWasteGas } from './layers/LayerWasteGas'
import { LayerPipeLine } from './layers/LayerPipeLine'
import { LayerArea } from './layers/LayerArea'
import { LayerPk } from './layers/LayerPk'
const curWwwPath = window.document.location.href
const pathname = window.document.location.pathname
@@ -43,7 +46,7 @@
  IntranetBaseMaps: TDT.intranet,
  InternetBaseMaps: TDT.internet,
  Layers: {
    LayerSewersLine: [LayerSewersLine, LayerWasteWater, LayerWasteGas, LayerSolidWaste],
    LayerSewersLine: [LayerPipeLine, LayerArea, LayerPk, LayerWasteWater, LayerWasteGas, LayerSolidWaste],
    layerSewersPoint: LayerSewersPoint
  } // 污雨水图层配置
}
src/conf/layers/LayerArea.js
New file
@@ -0,0 +1,36 @@
/**
 * 区域
 */
export const LayerArea = {
  code: 'sewersArea',
  name: '区域信息',
  checked: true,
  layers: [
    {
      code: 'sewersAreaGs',
      name: '公司',
      sname: '公司', // 表名
      checked: true, // 默认选中状态
      url: '?TYPENAME=管网',
      minZoom: 10, // 在指定级别显示
      childLayer: 'fsss,hbss' // 关联PointLayers
    },
    {
      code: 'sewersAreaMt',
      name: '码头',
      sname: '码头',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=含油污水',
      minZoom: 10,
      childLayer: 'fsss,hbss' // 关联PointLayers
    },
    {
      code: 'sewersAreaZz',
      name: '装置区',
      sname: '装置区',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=含盐污水',
      minZoom: 10
    }
  ]
}
src/conf/layers/LayerFsss.js
New file
@@ -0,0 +1,79 @@
/**
 * 区域
 */
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
export const LayerFsss = {
  code: 'sewersFsss',
  name: '附属设施',
  checked: false, // 默认选中状态
  layers: [
    {
      code: 'fourlink',
      name: '四通',
      sname: '四通',
      checked: true,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=四通',
      icon: 'sewers/四通.png'
    },
    {
      code: 'tee',
      name: '三通',
      sname: '三通',
      checked: false,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=三通',
      icon: 'sewers/三通.png'
    },
    {
      code: 'piperack',
      name: '管架(墩)',
      sname: 'PipeRack',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管架',
      checked: false
    },
    {
      code: 'pipegallery',
      name: '管廊(带)',
      sname: 'PipeGallery',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管廊',
      checked: false
    },
    {
      code: 'pipesegment',
      name: '流向',
      sname: 'ywslx',
      wfs: WFS_URL + '?TYPENAME=流向',
      checked: false
    },
    {
      code: 'pipeline',
      name: '管网',
      minZoom: 10,
      sname: 'pipeline',
      wfs: WFS_URL + '?TYPENAME=管网',
      checked: false
    },
    {
      code: 'valve',
      name: '阀门',
      minZoom: 10,
      sname: 'valve',
      checked: false,
      wfs: WFS_URL + '?TYPENAME=阀门',
      icon: 'sewers/阀门.png'
    },
    {
      code: 'elbow',
      name: '弯头',
      sname: 'Elbow',
      minZoom: 10,
      checked: false,
      wfs: WFS_URL + '?TYPENAME=弯头',
      icon: 'sewers/弯头.png'
    }
  ]
}
src/conf/layers/LayerHbss.js
New file
@@ -0,0 +1,79 @@
/**
 * 区域
 */
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
export const LayerFsss = {
  code: 'sewersFsss',
  name: '环保设施',
  checked: false, // 默认选中状态
  layers: [
    {
      code: 'fourlink',
      name: '四通',
      sname: '四通',
      checked: true,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=四通',
      icon: 'sewers/四通.png'
    },
    {
      code: 'tee',
      name: '三通',
      sname: '三通',
      checked: false,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=三通',
      icon: 'sewers/三通.png'
    },
    {
      code: 'piperack',
      name: '管架(墩)',
      sname: 'PipeRack',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管架',
      checked: false
    },
    {
      code: 'pipegallery',
      name: '管廊(带)',
      sname: 'PipeGallery',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管廊',
      checked: false
    },
    {
      code: 'pipesegment',
      name: '流向',
      sname: 'ywslx',
      wfs: WFS_URL + '?TYPENAME=流向',
      checked: false
    },
    {
      code: 'pipeline',
      name: '管网',
      minZoom: 10,
      sname: 'pipeline',
      wfs: WFS_URL + '?TYPENAME=管网',
      checked: false
    },
    {
      code: 'valve',
      name: '阀门',
      minZoom: 10,
      sname: 'valve',
      checked: false,
      wfs: WFS_URL + '?TYPENAME=阀门',
      icon: 'sewers/阀门.png'
    },
    {
      code: 'elbow',
      name: '弯头',
      sname: 'Elbow',
      minZoom: 10,
      checked: false,
      wfs: WFS_URL + '?TYPENAME=弯头',
      icon: 'sewers/弯头.png'
    }
  ]
}
src/conf/layers/LayerPipeLine.js
New file
@@ -0,0 +1,77 @@
/**
 * 管网
 */
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
export const LayerPipeLine = {
  code: 'sewersPipeLine',
  name: '管线',
  checked: true,
  layers: [
    {
      code: 'rainline',
      name: '雨水线',
      sname: '雨水线',
      checked: true,
      wfs: WFS_URL + '?TYPENAME=管网',
      minZoom: 10 // 在指定级别显示
    },
    {
      code: 'accidentline',
      name: '事故水线',
      sname: '事故水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=事故水',
      minZoom: 10
    },
    {
      code: 'oilline',
      name: '含油污水线',
      sname: '含油污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含油污水',
      minZoom: 10
    },
    {
      code: 'saltline',
      name: '含盐污水线',
      sname: '含盐污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含盐污水',
      minZoom: 10
    },
    {
      code: 'alkaliline',
      name: '含碱污水线',
      sname: '含碱污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=含碱污水',
      minZoom: 10
    },
    {
      code: 'lifeline',
      name: '生活污水',
      sname: '生活污水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=生活污水',
      minZoom: 10
    },
    {
      code: 'purifyline',
      name: '净化水线',
      sname: '净化水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=净化水',
      minZoom: 10
    },
    {
      code: 'loopline',
      name: '循环水线',
      sname: '循环水',
      checked: true, // 默认选中状态
      wfs: WFS_URL + '?TYPENAME=循环水',
      minZoom: 10
    }
  ]
}
src/conf/layers/LayerPk.js
New file
@@ -0,0 +1,26 @@
/**
 * 排口
 */
export const LayerPk = {
  code: 'sewersPk',
  name: '排口',
  checked: true,
  layers: [
    {
      code: 'sewersNpk',
      name: '内排口',
      sname: '内排口',
      checked: true,
      wfs: '?TYPENAME=管网',
      minZoom: 10 // 在指定级别显示
    },
    {
      code: 'sewersWpk',
      name: '外排口',
      sname: '外排口',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=事故水',
      minZoom: 10
    }
  ]
}