派生自 wuyushui/SewerAndRainNetwork

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

 Conflicts:
 src/api/mapApi.js
 src/api/mapUrl.js
 src/conf/Constants.js
 src/views/MapTemplate.vue
1个文件已删除
1个文件已添加
9个文件已修改
2 文件已重命名
438 ■■■■ 已修改文件
public/assets/images/map/solidwaste/gf_green.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/solidwaste/voc.png 补丁 | 查看 | 原始文档 | blame | 历史
public/static/SolidWaste.json 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/WasteWater.json 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapUrl.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/request.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/SolidWaste.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/SolidWaste.js 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/MapTemplate.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/solidwaste/gf_green.png

public/assets/images/map/solidwaste/voc.png

public/static/SolidWaste.json
@@ -1,81 +1,125 @@
{
  "Result": {
    "IsSuccess": 1,
    "code": 1,
    "ErrorMsg": "",
    "DataInfo": [
      {
        "StoragePlaceId": 124.0,
        "StoragePlaceName": "聚醚部危险废物暂存点",
        "HazaWasteStorageDate": "0001-01-01T00:00:00",
        "HazaWasteCatgrName": null,
        "SurplusQuantityWarning": 0,
        "LongDayWarning": 0,
        "DesignFloorArea": 95.0,
        "HazaWasteName": null,
        "EstimateFloorArea": 0.0,
        "HazaWasteDeptName": null,
        "SurplusFloorArea": 95.0,
        "HazaWasteStorageDays": 0.0,
        "StorageQty": 0.0,
        "HazaWasteStorageQty": 0.0,
        "positionX": 32.22118377685547,
        "positionY": 118.78057479858398
        "StoragePlaceId": 0,
        "Name": "巴陵石化 取水单元干泥暂存库",
        "StorageQtyMax": 0,
        "Longitude": 113.38361,
        "Latitude": 29.9008,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 123.0,
        "StoragePlaceName": "化工部危险废物暂存点",
        "HazaWasteStorageDate": "0001-01-01T00:00:00",
        "HazaWasteCatgrName": null,
        "SurplusQuantityWarning": 0,
        "LongDayWarning": 0,
        "DesignFloorArea": 260.0,
        "HazaWasteName": null,
        "EstimateFloorArea": 0.0,
        "HazaWasteDeptName": null,
        "SurplusFloorArea": 260.0,
        "HazaWasteStorageDays": 0.0,
        "StorageQty": 0.0,
        "HazaWasteStorageQty": 0.0,
        "positionX": 32.23122596740723,
        "positionY": 118.7743091583252
        "StoragePlaceId": 1,
        "Name": "巴陵石化 吉家湖灰塘",
        "StorageQtyMax": 0,
        "Longitude": 113.14089,
        "Latitude": 29.4181,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 127.0,
        "StoragePlaceName": "炼油部危险废物暂存点",
        "HazaWasteStorageDate": "0001-01-01T00:00:00",
        "HazaWasteCatgrName": null,
        "SurplusQuantityWarning": 0,
        "LongDayWarning": 0,
        "DesignFloorArea": 351.0,
        "HazaWasteName": null,
        "EstimateFloorArea": 0.0,
        "HazaWasteDeptName": null,
        "SurplusFloorArea": 351.0,
        "HazaWasteStorageDays": 0.0,
        "StorageQty": 0.0,
        "HazaWasteStorageQty": 0.0,
        "positionX": 32.222299575805664,
        "positionY": 118.74950408935547
        "StoragePlaceId": 2,
        "Name": "长岭炼化 八字门垃圾填埋场",
        "StorageQtyMax": 0,
        "Longitude": 113.3916666667,
        "Latitude": 29.6394444444,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 126.0,
        "StoragePlaceName": "烯烃部危险废物暂存点",
        "HazaWasteStorageDate": "0001-01-01T00:00:00",
        "HazaWasteCatgrName": null,
        "SurplusQuantityWarning": 0,
        "LongDayWarning": 1.0,
        "DesignFloorArea": 54.0,
        "HazaWasteName": null,
        "EstimateFloorArea": 0.0,
        "HazaWasteDeptName": null,
        "SurplusFloorArea": 54.0,
        "HazaWasteStorageDays": 0.0,
        "StorageQty": 1.0,
        "HazaWasteStorageQty": 0.0,
        "positionX": 32.23092555999756,
        "positionY": 118.75735759735107
        "StoragePlaceId": 3,
        "Name": "中韩石化 灰渣场",
        "StorageQtyMax": 0,
        "Longitude": 114.5192083333,
        "Latitude": 30.6201666667,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 4,
        "Name": "安庆石化 山口废渣填埋场",
        "StorageQtyMax": 0,
        "Longitude": 116.960599,
        "Latitude": 30.541509,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 5,
        "Name": "安庆石化 热电陈家冲灰场",
        "StorageQtyMax": 0,
        "Longitude": 116.986949,
        "Latitude": 30.534486,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 6,
        "Name": "高桥石化 海滨码头附近滩涂",
        "StorageQtyMax": 0,
        "Longitude": 121.55,
        "Latitude": 31.63,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 7,
        "Name": "川维化工 生化污泥料仓",
        "StorageQtyMax": 0,
        "Longitude": 107.02342004,
        "Latitude": 29.79235333,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      },
      {
        "StoragePlaceId": 8,
        "Name": "川维化工 排泥水泥饼料仓",
        "StorageQtyMax": 0,
        "Longitude": 107.02315181,
        "Latitude": 29.78832166,
        "SortNum": 0,
        "DesignFloorArea": 0,
        "VideoCoding": null,
        "VideoURL": null,
        "DaysAlarm": 0,
        "MarginAlarm": 0
      }
    ]
  }
}
}
public/static/WasteWater.json
File was deleted
src/api/mapApi.js
@@ -12,6 +12,9 @@
  getUser (data) {
    return axios.get(mapUrl.GetUser, data)
  },
  getSolidWaste (data) {
    return axios.get(mapUrl.getSolidWaste, data)
  },
  getWasteWater (data) {
    return axios.get(mapUrl.GetWasteWater, data)
  }
src/api/mapUrl.js
@@ -5,4 +5,6 @@
export const GetUser = $HOST + '/user/getUser'
export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste'
export const GetWasteWater = $HOST + '/wasteWater/getWasteWater'
src/api/request.js
@@ -8,6 +8,13 @@
    }
  })
}
// export const QueryStoragePlaceListByCompanyAndName = (data = {}) => {
//   return $http.get('http://xearth.cn:3000/wasteSolid/getSolidWaste', Qs.stringify(data), {
//     headers: {
//       'Content-Type': 'application/json'
//     }
//   })
// }
export const FlueGas = (data = {}) => {
  return $http.post('/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
    headers: {
@@ -15,6 +22,7 @@
    }
  })
}
export function requestWasteWater (data = {}) {
  return $http.post('EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
    headers: {
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>-->
        <PublicTable></PublicTable>
        <!--        <GasECharts v-else></GasECharts>-->
      </div>
      <div class="public-bounced-content-right">
        <GasVideo></GasVideo>
@@ -22,7 +23,7 @@
import '@/components/BaseNav/SolidWaste/directive/dir'
import GasTab from '@components/BaseNav/PublicBounced/GasComponents/GasTab'
import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable'
import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts'
// import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts'
import GasVideo from '@components/BaseNav/PublicBounced/GasComponents/GasVideo'
export default {
@@ -30,7 +31,7 @@
  components: {
    GasTab,
    PublicTable,
    GasECharts,
    // GasECharts,
    GasVideo
  },
  data () {
@@ -40,10 +41,10 @@
    }
  },
  methods: {
    setData (data, value) {
    setData (data) {
      this.displayContent = data
      this.flag = true
      this.value = value
      // this.value = value
    },
    closePopup () {
      this.flag = false
src/components/BaseNav/SolidWaste/SolidWaste.js
@@ -69,7 +69,7 @@
            // this.map.panTo([e.target.getLatLng().lat, e.target.getLatLng().lng], 100)
            this.setPanTo(e.target.getLatLng(), 250)
            this.EffectOfPulse(e.target.getLatLng())
            this.SolidWastePopup.setData(data[i], 'gufei')
            // this.SolidWastePopup.setData(data[i], 'gufei')
            return this.SolidWastePopup.$el
          } catch (error) {
            console.log(error)
src/components/LayerController/logic/SolidWaste.js
New file
@@ -0,0 +1,70 @@
/**
 * 固废
 */
// 区分不同类型 使用不同img
const defaultImg = '/assets/images/map/solidwaste/voc.png'
const setting = '/assets/images/map/solidwaste/gf_green.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.getSolidWaste()
    // 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
      // 定义类型 用来区分数据的不同
      const judgeValue = data[i].StorageQty
      var iconUrl = this.differentTypes(judgeValue)
      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) => {
    this.animalService.pulseEffect(e.latlng)
    console.log(e)
    return this.PublicBounced.$el
  }
  // 不同类型图片封装
  this.differentTypes = (judgeValue) => {
    var effectOfChange
    if (judgeValue === 1) {
      effectOfChange = defaultImg
    } else {
      effectOfChange = setting
    }
    return effectOfChange
  }
  // 固废点击进行的 内容的设置
  // SetSolidWasteContent (config, containerPopup) {
  //   this.SolidWastePopup = containerPopup
  // }
}
src/conf/Constants.js
@@ -9,7 +9,8 @@
  fspfk: 'Sample.js',
  fsjcd: 'Sample.js',
  wasteGasJcd: 'WasteGas.js',
  wasteWaterJcd: 'WasteWater.js'
  wasteWaterJcd: 'WasteWater.js',
  solidWasteJcd: 'SolidWaste.js'
}
export const props = {
src/conf/MapConfig.js
@@ -25,7 +25,8 @@
  minZoom: 3,
  maxZoom: 18,
  // center: [26, 104],
  center: [38.828558921813965, 117.41676807403564],
  // center: [38.828558921813965, 117.41676807403564],
  center: [29.769515991210938, 107.03567504882812],
  zoom: 14,
  worldCopyJump: true,
  inertia: true,
src/views/MapTemplate.vue
@@ -16,7 +16,7 @@
    <summary-sheets></summary-sheets>
    <enterprise></enterprise>
    <!--    <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>-->
    <el-button type="primary" @click="ChangeState" class="solid-waste">固废</el-button>
<!--    <el-button type="primary" @click="ChangeState" class="solid-waste">固废</el-button>-->
<!--    <el-button type="primary" @click="ChangeWaterState" class="Waste-water">废水</el-button>-->
    <el-button type="primary" @click="AddGasHelper" class="flue-gas">废气</el-button>
    <PublicBounced ref="PublicBounced"></PublicBounced>
@@ -38,10 +38,6 @@
// import MenuSpecial from '@components/panel/MenuTopic'
import LegendPanel from '@components/panel/LegendPanel'
import Enterprise from '../components/table/enterprise'
// 底图业务js逻辑
import AddSolidWasteHelper from '@components/BaseNav/SolidWaste/SolidWaste'
// import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater'
import AddGasHelper from '@components/BaseNav/flueGas/flueGas'
// // 公共展示数据
import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
import LayerFactory from '@components/LayerController/service/LayerFactory'
@@ -102,37 +98,6 @@
      AddGas.requestData(data)
      AddGas.SetPlueGasContent(this.config, this.$refs.PublicBounced)
    },
    ChangeState () {
      const data = {
        companyId: 3900100145,
        userCode: 'wenchun.deng',
        name: '',
        marginWarr: '',
        longDayWarr: ''
      }
      const AddSolidWaste = new AddSolidWasteHelper({ map: this.map })
      AddSolidWaste.requestData(data)
      AddSolidWaste.SetSolidWasteContent(this.config, this.$refs.PublicBounced)
    },
    // ChangeWaterState () {
    //   const data = {
    //     companyId: 3900100145,
    //     id: '',
    //     monType: 1,
    //     userCode: 'wenchun.deng',
    //     monDuration: '',
    //     epName: '',
    //     secdDeptId: '',
    //     contrLevel: '',
    //     dataStatus: '',
    //     dataFlag: '',
    //     runStatus: '',
    //     emissTypeId: ''
    //   }
    //   const AddWasteWater = new AddWasteWaterHelper({ map: this.map })
    //   AddWasteWater.requestData(data)
    //   AddWasteWater.SetWasteWaterContent(this.config, this.$refs.PublicBounced)
    // },
    saveMapStatus () {
      window.serviceLayerHelper = this.serviceLayerHelper
      this.$store.commit('setMapObj', this.map)
@@ -164,10 +129,6 @@
      this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 初始化动态要素图层助手
      this.vectorLayerHelper.initVectorLayers(this.config)
      this.ChangeState()
      // this.AddGasHelper()
      // this.ChangeWaterState()
      this.saveMapStatus()
      // this.setMapObj(this.mapObj)