派生自 wuyushui/SewerAndRainNetwork

ChenZeping02609
2021-05-13 38cf65bc29eacb85d23382f53141dcd716a1a770
企业应急
9个文件已修改
116 ■■■■■ 已修改文件
public/static/SourcesPoll.json 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/SourcesPollution.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/LayerTopic.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerEntEmer.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/dragBoxes.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/SourcesPoll.json
@@ -4,20 +4,20 @@
    "ErrorMsg": "",
    "DataInfo": [
      [
        116.38927817344666,
        39.90751504898071
        39.90751504898071,
        116.38927817344666
      ],
      [
        116.38689637184143,
        39.9088454246521
        39.9088454246521,
        116.38689637184143
      ],
      [
        116.39344096183777,
        39.90931749343872
        39.90931749343872,
        116.39344096183777
      ],
      [
        116.39116644859314,
        39.90489721298218
        39.90489721298218,
        116.39116644859314
      ]
    ]
  }
src/components/LayerController/logic/SourcesPollution.js
@@ -16,14 +16,7 @@
    const result = await mapApi.getSourcesPoll()
    console.log(result)
    const resultData = result.Result.DataInfo || []
    console.log(resultData)
    // 循环遍历数据 根据进行marker 的创建
    for (let i = 0; i < resultData.length; i++) {
      const polygon = L.polygon(resultData, {
        // totransferData: resultData[i],
        color: 'red'
      })
      layer.addLayer(polygon)
    }
    const polygon = L.polygon(resultData, { color: 'yellow' })
    polygon.addTo(layer)
  }
}
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue
@@ -86,7 +86,9 @@
</template>
<script>
import { LayerEntEmer } from '../../../../../conf/layers/LayerEntEmer'
// import { LayerEntEmer } from '../../../../../conf/layers/LayerEntEmer'
import ReportPopup from './ReportPopup'
export default {
  name: 'EventQuery',
@@ -97,7 +99,7 @@
        { name: '金陵石化' },
        { name: '南京化学' }
      ],
      subItems: LayerEntEmer.layers,
      subItems: ['事前阶段', '审批阶段', '事件完结'],
      form: {
        pipelineType: '',
        dataType: '',
@@ -128,6 +130,16 @@
    },
    btnAffiliatedFacilities () {
      console.log('item')
      window.$layer.open({
        content: {
          content: ReportPopup, // 组件
          parent: this, // 父组件
          data: { // 传递的参数
            // storagePlaceId: e.layer.options.totransferData.StoragePlaceId
          }
        }
        // title: 'title' // 标题
      })
    }
  }
}
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue
@@ -1,10 +1,10 @@
<template>
    <div class="report-popup map-background" v-drag v-show="flags">
        <div class="public-bounced-title panel-title">
            <span>上报事件</span>
            <i class="el-icon-circle-close" @click="closePopup"></i>
        </div>
        <div class="report-content">
    <!--    <div class="public-bounced map-background">-->
    <!--        <div class="public-bounced-title panel-title">-->
    <!--            <span>上报事件</span>-->
    <!--            <i class="el-icon-circle-close" @click="closePopup"></i>-->
    <!--        </div>-->
    <div class="public-bounced-content">
            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="search-form">
                <el-form-item label="事件名称" prop="nameEvent" class="input-event-name">
                    <el-input v-model="ruleForm.nameEvent" placeholder="将事件命名"></el-input>
@@ -101,7 +101,7 @@
                </el-form-item>
            </el-form>
        </div>
    </div>
    <!--    </div>-->
</template>
<script>
@@ -109,7 +109,6 @@
export default {
  name: 'ReportPopup',
  props: ['flags'],
  data () {
    return {
      flag: false,
@@ -232,12 +231,11 @@
</script>
<style lang="less" scoped>
    .report-popup {
        width: 35%;
        z-index: 999;
    .public-bounced {
        z-index: 2000;
        position: absolute;
        top: 15%;
        left: 35%;
        left: 20%;
    }
    /deep/ input {
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
@@ -69,19 +69,18 @@
                </div>
            </div>
        </el-scrollbar>
        <ReportPopup :flags="flag"></ReportPopup>
    </div>
</template>
<script>
import { LayerEntEmer } from '../../../../../conf/layers/LayerEntEmer'
import ReportPopup from './ReportPopup'
// import ReportPopup from './ReportPopup'
export default {
  name: 'ResourcesQuery',
  components: {
    ReportPopup
  },
  // components: {
  //   ReportPopup
  // },
  data () {
    return {
      form: {
@@ -96,14 +95,12 @@
      },
      items: [LayerEntEmer],
      subItems: LayerEntEmer.layers,
      searchDataDisplay: [],
      flag: false
      searchDataDisplay: []
    }
  },
  methods: {
    showthePopup () {
      console.log('item')
      this.flag = !this.flag
    },
    handlePipelineType () {
      console.log('item')
src/conf/LayerTopic.js
@@ -12,6 +12,7 @@
import { LayerArea } from './layers/LayerArea'
import { LayerVideo } from './layers/LayerVideo'
import { LayerPk } from './layers/LayerPk'
import { LayerEntEmer } from './layers/LayerEntEmer'
export const LayerTopic = {
  code: 'sewersTopic',
@@ -19,5 +20,5 @@
  checked: false,
  isShow: true,
  type: 0,
  layers: [LayerPollutionSources, LayerWasteWater, LayerWasteGas, LayerWasteSolid, LayerAirQuality, LayerEnvRisk, LayerSoilGroundWater, LayerPipeLines, LayerPk, LayerVideo, LayerArea]
  layers: [LayerPollutionSources, LayerWasteWater, LayerWasteGas, LayerWasteSolid, LayerAirQuality, LayerEnvRisk, LayerSoilGroundWater, LayerPipeLines, LayerPk, LayerVideo, LayerArea, LayerEntEmer]
}
src/conf/MapConfig.js
@@ -22,10 +22,10 @@
  minZoom: 3,
  maxZoom: 17,
  // center: [26, 104],
  // center: [34.828558921813965, 117.41676807403564],
  // zoom: 5,
  center: [32.25853085517883, 118.78592848777771],
  zoom: 16,
  center: [34.828558921813965, 117.41676807403564],
  zoom: 5,
  // center: [39.907214641571045, 116.39019012451172],
  // zoom: 16,
  worldCopyJump: true,
  inertia: true,
  zoomControl: false,
src/conf/layers/LayerEntEmer.js
@@ -1,22 +1,23 @@
/**
 * 企业预警
 * 企业应急
 */
import { LayerHbss } from './LayerHbss'
import { LayerFsss } from './LayerFsss'
import { PIPELINE_WFS } from '../Constants'
const WFS_URL = PIPELINE_WFS
export const LayerEntEmer = {
  code: 'reportEntemeage',
  name: '企业预警',
  name: '企业应急',
  checked: false,
  type: 0,
  childLayer: [LayerFsss, LayerHbss],
  layers: [
    {
      code: 'rainline',
      name: '事前阶段',
      name: '基础图层',
      sname: '管网',
      checked: false,
      type: 0,
@@ -32,7 +33,7 @@
    },
    {
      code: 'accidentline',
      name: '审批阶段',
      name: '在线监测',
      sname: '事故水',
      checked: false,
      // wmsLayers: 'sewer:pipeline_accident',
@@ -42,7 +43,22 @@
    },
    {
      code: 'oilline',
      name: '事件完结',
      name: '应急资源',
      sname: '含油污水',
      checked: false,
      type: 0,
      minZoom: 13,
      color: '#ffaa00',
      wmsLayers: 'sewer:pipeline_sewer',
      // wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'含油污水\'',
      styles: {
        COLOR: '#ffaa00',
        FILL_COLOR: '#ffaa00'
      }
    },
    {
      code: 'oil',
      name: '周边环境',
      sname: '含油污水',
      checked: false,
      type: 0,
src/utils/dragBoxes.js
@@ -4,6 +4,7 @@
const drag = Vue.directive('drag', {
  bind (el, binding, vnode, oldVnode) {
    const dialogHeaderEl = el.querySelector('.public-bounced-title')
    dialogHeaderEl.style.cursor = 'move'
    dialogHeaderEl.onmousedown = function (e) {
      var distX = e.pageX - el.offsetLeft
      var distY = e.pageY - el.offsetTop