派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-30 a96e7a6704cb34ece8835066ff9f069014062e3d
文件合并方法
1个文件已添加
7个文件已修改
271 ■■■■■ 已修改文件
public/static/SolidWaste.json 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/request.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/SolidWaste.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/directive/dir.js 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/SolidWaste.js 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/MapTemplate.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/SolidWaste.json
@@ -1,80 +1,124 @@
{
  "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
      }
    ]
  }
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,8 @@
    <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 v-else></GasECharts>-->
      </div>
      <div class="public-bounced-content-right">
        <GasVideo></GasVideo>
@@ -21,16 +21,16 @@
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 PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable'
// import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts'
import GasVideo from '@components/BaseNav/PublicBounced/GasComponents/GasVideo'
export default {
  name: 'PublicBounced',
  components: {
    GasTab,
    PublicTable,
    GasECharts,
    // PublicTable,
    // GasECharts,
    GasVideo
  },
  data () {
@@ -40,10 +40,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/BaseNav/SolidWaste/directive/dir.js
src/components/LayerController/logic/SolidWaste.js
New file
@@ -0,0 +1,51 @@
/**
 * 固废
 */
const AnimalService = require('../service/AnimalService').default
const AjaxUtils = require('../../../utils/AjaxUtils').default
module.exports = function () {
  /**
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = (layer, L) => {
    this.animalService = new AnimalService({
      L: L,
      layer: layer,
      LayerPopup: null
    })
    // AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', {
    // AjaxUtils.get4JsonDataByUrl('http://xearth.cn:3000/wasteSolid/getSolidWaste', {
    AjaxUtils.get4JsonDataByUrl('http://localhost:8888/static/SolidWaste.json', {
      companyId: 3900100145,
      userCode: 'wenchun.deng',
      name: '',
      marginWarr: '',
      longDayWarr: ''
    }, 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], {}))
      }
    })
  }
  this.bindTooltip = (layer) => {
    return '测试固废'
  }
  this.clickListener = (e) => {
    this.animalService.pulseEffect(e.latlng)
    console.log(e)
    console.log(this.PublicBounced)
    // return this.PublicBounced.$el
  }
  // 固废点击进行的 内容的设置
  // SetSolidWasteContent (config, containerPopup) {
  //   this.SolidWastePopup = containerPopup
  // }
}
src/conf/Constants.js
@@ -8,7 +8,8 @@
  fsqy: 'Sample.js',
  fspfk: 'Sample.js',
  fsjcd: 'Sample.js',
  wasteGasJcd: 'WasteGas.js'
  wasteGasJcd: 'WasteGas.js',
  solidWasteJcd: 'SolidWaste.js'
}
export const props = {
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>
@@ -39,7 +39,6 @@
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'
// // 公共展示数据
@@ -102,18 +101,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,
@@ -148,6 +135,7 @@
      this.$refs.toolBox.map = this.map
      window.popupComp = this.$refs.popup
      var layerFactory = new LayerFactory({
        L: window.L,
        map: this.map
@@ -165,7 +153,6 @@
      this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 初始化动态要素图层助手
      this.vectorLayerHelper.initVectorLayers(this.config)
      this.ChangeState()
      // this.AddGasHelper()
      // this.ChangeWaterState()