派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-31 e0eb378045eb18117fcf0a1eac6dad57ce6f743b
Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
# src/views/MapTemplate.vue
4个文件已添加
13个文件已修改
358 ■■■■■ 已修改文件
public/assets/images/map/wastewater/fs_green.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/wastewater/fs_yellow.png 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapUrl.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/EchartsTab.vue 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasECharts.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/WasteWater.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayer.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/service/LayerFactory.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerArea.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerHbss.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerPk.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerWasteWater.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/wastewater/fs_green.png
public/assets/images/map/wastewater/fs_yellow.png
src/api/mapApi.js
@@ -15,6 +15,9 @@
  getSolidWaste (data) {
    return axios.get(mapUrl.getSolidWaste, data)
  },
  getWasteWater (data) {
    return axios.get(mapUrl.getWasteWater, data)
  },
  getSolidWasteBaseInfo (data) {
    return axios.get(mapUrl.getSolidWasteBaseInfo, data)
  },
src/api/mapUrl.js
@@ -8,6 +8,9 @@
export const GetWasteGas = $HOST + '/wasteGas/getWasteGas'
export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste'
export const getWasteWater = $HOST + '/wasteWater/getWasteWater'
export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo'
export const getCompany = $HOST + '/company/getCompany'
src/components/BaseNav/PublicBounced/GasComponents/EchartsTab.vue
New file
@@ -0,0 +1,64 @@
<template>
  <!-- 框 -->
  <div class="win">
    <div class="main">
      <div class="main-matter">
        <el-row type="flex" class="row-bg row-item-one" justify="space-around">
          <el-col :span="12">氮氧化物:{{ displayContent.Name }} 标准: 100</el-col>
          <el-col :span="12">二氧化硫:{{ displayContent.DeptSname }} 标准: 50</el-col>
          <el-col :span="12">烟尘:{{ displayContent.EmissTypeName }} 标准: 30</el-col>
          <el-col :span="12">废气流量:{{ displayContent.EmissTypeName }}</el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'EchartsTab',
  props: ['displayContent'],
  data () {
    return {}
  }
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  margin-bottom: 13px;
  background-color: rgba(33, 41, 69,0.9);
}
.main {
  width: 100%;
  height: 100%;
  .main-matter{
    font-size: 13px;
    font-weight: normal;
    border: 1px solid #396d83;
    .row-item-one{
      margin-bottom: 7px;
    }
    .el-row {
      width: 100%;
      color: #00d0f9;
      display: flex;
      font-size: 12px !important;
      .el-col{
        flex: 1;
        width: 100%;
        background-color: #243a55;;
        text-align: center;
        line-height: 28px;
        margin-left: 6px;
        border-radius: 4px;
        &:nth-child(1){
          margin-left:0;
        }
      }
    }
  }
}
</style>
src/components/BaseNav/PublicBounced/GasComponents/GasECharts.vue
@@ -1,18 +1,6 @@
<template>
  <!-- 框 -->
  <div class="win">
    <!-- 四个角的边框效果 -->
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
        <div id="echarts" ref="main"></div>
        <div class="border_corner border_corner_left_top"></div>
        <div class="border_corner border_corner_right_top"></div>
        <div class="border_corner border_corner_left_bottom"></div>
        <div class="border_corner border_corner_right_bottom"></div>
      </div>
  </div>
</template>
@@ -44,8 +32,9 @@
        },
        grid: {
          left: '3%',
          right: '3%',
          right: '1%',
          bottom: '3%',
          top: '10%',
          containLabel: true
        },
        toolbox: {
@@ -161,48 +150,14 @@
</script>
<style scoped lang="less">
    .win {
        /*width: 100%;*/
        /*height: 100%;*/
        position: relative;
        //display: inline-block;
        background-color: rgba(33, 41, 69,0.9);
    .main{
        background: rgba(255, 255, 255, 0.1);
    }
    #echarts{
        width: 600px;
        height: 260px;
    }
    .border_corner{
        z-index: 2500;
        position: absolute;
        width: 14px;
        height: 14px;
        background: rgba(0,0,0,0);
        border: 2px solid #47d5ea;
    }
    .border_corner_left_top{
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: none;
    }
    .border_corner_right_top{
        top: 0;
        right: 0;
        border-left: none;
        border-bottom: none;
    }
    .border_corner_left_bottom{
        bottom: 0;
        left: 0;
        border-right: none;
        border-top: none;
        border-bottom-left-radius: 4px;
    }
    .border_corner_right_bottom{
        bottom: 0;
        right: 0;
        border-left: none;
        border-top: none;
        position: relative;
        margin: 0;
        padding: 0;
    }
</style>
src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue
@@ -1,11 +1,13 @@
<template>
<div>
  <el-tabs v-model="activeName">
    <el-tab-pane label="实时数据" name="first">用户管理</el-tab-pane>
    <el-tab-pane label="日数据" name="second">配置管理</el-tab-pane>
    <el-tab-pane label="月数据" name="third">角色管理</el-tab-pane>
    <el-tab-pane label="人工数据" name="fourth">定时任务补偿</el-tab-pane>
    <el-tab-pane label="实试数据" name="first">实试数据</el-tab-pane>
    <el-tab-pane label="日数据" name="second">日数据</el-tab-pane>
    <el-tab-pane label="月数据" name="third">月数据</el-tab-pane>
    <el-tab-pane label="人工数据" name="fourth">人工数据</el-tab-pane>
  </el-tabs>
<!--  <EchartsTab></EchartsTab>-->
<!--  <GasECharts></GasECharts>>-->
</div>
</template>
src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -7,8 +7,9 @@
    <div class="public-bounced-content">
      <div class="public-bounced-content-left">
        <GasTab :displayContent="displayContent"></GasTab>
        <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>
        <GasECharts v-else></GasECharts>
<!--        <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>-->
        <GasECharts></GasECharts>
<!--        <GasTabs></GasTabs>-->
        <!--        <PublicTable></PublicTable>-->
<!--                <GasECharts></GasECharts>-->
      </div>
@@ -23,15 +24,17 @@
import '@/components/BaseNav/SolidWaste/directive/dir'
import GasTab from '@components/BaseNav/PublicBounced/GasComponents/GasTab'
import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable'
// import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable'
import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts'
import GasVideo from '@components/BaseNav/PublicBounced/GasComponents/GasVideo'
// import GasTabs from './GasComponents/GasTabs'
export default {
  name: 'PublicBounced',
  components: {
    // GasTabs,
    GasTab,
    PublicTable,
    // PublicTable,
    GasECharts,
    GasVideo
  },
src/components/LayerController/logic/WasteWater.js
New file
@@ -0,0 +1,63 @@
/**
 * 废水
 */
const AnimalService = require('../service/AnimalService').default
const mapApi = require('../../../api/mapApi').default
const testValue1 = '/assets/images/map/wastewater/fs_green.png'
const testValue2 = '/assets/images/map/wastewater/fs_yellow.png'
module.exports = function () {
  /**
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = async (layer, L) => {
    this.animalService = new AnimalService({
      L: L,
      layer: layer
    })
    const res = await mapApi.getWasteWater()
    console.log(res)
    const data = res.Result.DataInfo
    console.log(data)
    for (let i = 0; i < data.length; i++) {
      // 经纬度 位置
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
      // 定义类型 用来区分数据的不同
      const testValue = data[i].ContrLevel
      const iconUrl = this.differentTypes(testValue)
      const marker = L.marker.magic([positionX, positionY], {
        icon: L.icon({
          iconUrl: iconUrl,
          iconSize: [50, 50],
          iconAnchor: [25, 25]
        })
      })
      layer.addLayer(marker)
    }
  }
  this.bindTooltip = (layer) => {
    return '测试废水'
  }
  this.clickListener = (e) => {
    // console.log(e)
    this.animalService.pulseEffect(e.latlng)
    return this.PublicBounced.$el
  }
  // 根据返回值的不同标记不同图片
  this.differentTypes = (testValue) => {
    let testChange
    if (testValue === 1) {
      testChange = testValue1
    } else {
      testChange = testValue2
    }
    return testChange
  }
}
src/components/LayerController/modules/LcServiceLayer.vue
@@ -6,8 +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)" v-if="item.childLayer"
                                                                               class="btn-filter">过滤</span>
                            @change="swAllLayers(item)"/>{{ item.name }}
                </div>
                <div class="layerbox-item">
                    <div class="basemap-layer-item" v-for="itm in item.layers" :key="itm.code"><input type="checkbox"
@@ -66,9 +65,9 @@
    swWmsLayer (itm) {
      itm.checked = !itm.checked
      if (itm.checked) {
        window.layerFactory.show(itm.code)
        window.layerFactory.show(itm)
      } else {
        window.layerFactory.hide(itm.code)
        window.layerFactory.hide(itm)
      }
      // this.updateWms()
    },
src/components/LayerController/service/LayerFactory.js
@@ -18,10 +18,17 @@
      var layers = config.layers
      for (var j = 0; j < layers.length; j++) {
        var childConfig = layers[j]
        var code = childConfig.code
        var wfs = childConfig.wfs
        var wms = childConfig.wms
        var url = childConfig.url
        var checked = childConfig.checked
        checked && this.load(childConfig)
      }
    }
  }
  load (config) {
    var code = config.code
    var wfs = config.wfs
    var wms = config.wms
    var url = config.url
        // 判断是否已经加载过,加载过就 直接得到对象调用 显示函数
        var layer = this.layers[code]
        if (!layer) {
@@ -29,16 +36,17 @@
          // 2. 判断类型
          if (wfs) {
            // 3. 实例化具体service
            var wfsLayerService = new WfsLayerService(childConfig)
        var wfsLayerService = new WfsLayerService(config)
            wfsLayerService.init(layer)
        this.setZIndex(layer)
          }
          if (wms) {
            var wmsLayerService = new WmsLayerService(childConfig)
        var wmsLayerService = new WmsLayerService(config)
            wmsLayerService.init(layer)
          }
          // 请求业务数据接口
          if (url) {
            var busiLayerService = new BusiLayerService(childConfig)
        var busiLayerService = new BusiLayerService(config)
            busiLayerService.init(layer)
          }
          layer ? (this.layers[code] = layer) : console.log('LayerFactory:newLayer is null,please check !!!')
@@ -46,16 +54,19 @@
          this.show(code)
        }
      }
  show (config) {
    var layer = this.layers[config.code]
    if (layer) {
      layer.addTo(this.map)
      this.setZIndex(layer)
    } else {
      this.load(config)
    }
  }
  show (code) {
    var _layer = this.layers[code].addTo(this.map)
    this.setZIndex(_layer)
  }
  hide (code) {
    var layer = this.layers[code]
  hide (config) {
    var layer = this.layers[config.code]
    layer && this.map.removeLayer(layer)
  }
src/conf/Constants.js
@@ -5,10 +5,8 @@
}
export const logicMapper = {
  // fsqy: 'Sample.js',
  fspfk: 'Sample.js',
  fsjcd: 'Sample.js',
  wasteGasJcd: 'WasteGas.js',
  wasteWaterJcd: 'WasteWater.js',
  solidWasteJcd: 'SolidWaste.js',
  fsqy: 'Company.js'
}
src/conf/MapConfig.js
@@ -7,6 +7,8 @@
import { LayerPipeLine } from './layers/LayerPipeLine'
import { LayerArea } from './layers/LayerArea'
import { LayerPk } from './layers/LayerPk'
import { LayerFsss } from './layers/LayerFsss'
import { LayerHbss } from './layers/LayerHbss'
const curWwwPath = window.document.location.href
const pathname = window.document.location.pathname
@@ -46,7 +48,7 @@
  IntranetBaseMaps: TDT.intranet,
  InternetBaseMaps: TDT.internet,
  Layers: {
    LayerSewersLine: [LayerPipeLine, LayerArea, LayerPk, LayerWasteWater, LayerWasteGas, LayerSolidWaste],
    LayerSewersLine: [LayerPipeLine, LayerFsss, LayerHbss, LayerArea, LayerPk, LayerWasteWater, LayerWasteGas, LayerSolidWaste],
    layerSewersPoint: LayerSewersPoint
  } // 污雨水图层配置
}
src/conf/layers/LayerArea.js
@@ -1,6 +1,8 @@
/**
 * 区域
 */
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
export const LayerArea = {
  code: 'sewersArea',
  name: '区域信息',
@@ -11,7 +13,7 @@
      name: '公司',
      sname: '公司', // 表名
      checked: true, // 默认选中状态
      url: '?TYPENAME=管网',
      wfs: WFS_URL + '?TYPENAME=公司',
      minZoom: 10, // 在指定级别显示
      childLayer: 'fsss,hbss' // 关联PointLayers
    },
@@ -20,7 +22,7 @@
      name: '码头',
      sname: '码头',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=含油污水',
      wfs: WFS_URL + '?TYPENAME=码头',
      minZoom: 10,
      childLayer: 'fsss,hbss' // 关联PointLayers
    },
@@ -29,7 +31,7 @@
      name: '装置区',
      sname: '装置区',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=含盐污水',
      wfs: WFS_URL + '?TYPENAME=装置区',
      minZoom: 10
    }
  ]
src/conf/layers/LayerHbss.js
@@ -3,77 +3,68 @@
 */
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',
export const LayerHbss = {
  code: 'sewersHbss',
  name: '环保设施',
  checked: false, // 默认选中状态
  layers: [
    {
      code: 'fourlink',
      name: '四通',
      sname: '四通',
      code: 'yj',
      name: '窨井',
      sname: '窨井',
      checked: true,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=四通',
      wfs: WFS_URL + '?TYPENAME=窨井',
      icon: 'sewers/四通.png'
    },
    {
      code: 'tee',
      name: '三通',
      sname: '三通',
      code: 'ybz',
      name: '雨篦子',
      sname: '雨篦子',
      checked: false,
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=三通',
      wfs: WFS_URL + '?TYPENAME=雨篦子',
      icon: 'sewers/三通.png'
    },
    {
      code: 'piperack',
      name: '管架(墩)',
      sname: 'PipeRack',
      code: 'fht',
      name: '防火堤',
      sname: '防火堤',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管架',
      wfs: WFS_URL + '?TYPENAME=防火堤',
      checked: false
    },
    {
      code: 'pipegallery',
      name: '管廊(带)',
      sname: 'PipeGallery',
      code: 'jsc',
      name: '集水池',
      sname: '集水池',
      minZoom: 10,
      wfs: WFS_URL + '?TYPENAME=管廊',
      wfs: WFS_URL + '?TYPENAME=集水池',
      checked: false
    },
    {
      code: 'pipesegment',
      name: '流向',
      sname: 'ywslx',
      wfs: WFS_URL + '?TYPENAME=流向',
      code: 'jlz',
      name: '截流闸',
      sname: '截流闸',
      wfs: WFS_URL + '?TYPENAME=截流闸',
      checked: false
    },
    {
      code: 'pipeline',
      name: '管网',
      code: 'yly',
      name: '溢流堰',
      sname: '溢流堰',
      minZoom: 10,
      sname: 'pipeline',
      wfs: WFS_URL + '?TYPENAME=管网',
      wfs: WFS_URL + '?TYPENAME=溢流堰',
      checked: false
    },
    {
      code: 'valve',
      name: '阀门',
      code: 'gyd',
      name: '隔油池',
      sname: '隔油池',
      minZoom: 10,
      sname: 'valve',
      checked: false,
      wfs: WFS_URL + '?TYPENAME=阀门',
      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/LayerPk.js
@@ -1,6 +1,8 @@
/**
 * 排口
 */
const APP_GIS_HOST_2 = 'http://xearth.cn:8088'
const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs'
export const LayerPk = {
  code: 'sewersPk',
  name: '排口',
@@ -11,7 +13,7 @@
      name: '内排口',
      sname: '内排口',
      checked: true,
      wfs: '?TYPENAME=管网',
      wfs: WFS_URL + '?TYPENAME=内排口',
      minZoom: 10 // 在指定级别显示
    },
    {
@@ -19,7 +21,7 @@
      name: '外排口',
      sname: '外排口',
      checked: true, // 默认选中状态
      wfs: '?TYPENAME=事故水',
      wfs: WFS_URL + '?TYPENAME=外排口',
      minZoom: 10
    }
  ]
src/conf/layers/LayerWasteWater.js
@@ -3,12 +3,12 @@
 * @type {string}
 */
export const LayerWasteWater = {
  code: 'pipeline',
  code: 'wasteWater',
  name: '废水',
  checked: true,
  layers: [
    {
      code: 'fsqy',
      code: 'wasteWaterqy',
      name: '企业',
      sname: '企业', // 表名
      checked: true, // 默认选中状态
@@ -16,7 +16,7 @@
      minZoom: 10 // 在指定级别显示
    },
    {
      code: 'fsjcd',
      code: 'wasteWaterJcd',
      name: '监测点',
      sname: '监测点',
      checked: true, // 默认选中状态
@@ -25,7 +25,7 @@
      childLayer: 'fsss,hbss' // 关联PointLayers
    },
    {
      code: 'fspfk',
      code: 'wasteWaterfk',
      name: '排放口',
      sname: '排放口',
      checked: true, // 默认选中状态