派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-03-30 46f5ac8a2a2b3cef149385a87b2170d35466ca12
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

 Conflicts:
 src/components/BaseNav/PublicBounced/GasComponents/GasECharts.vue
11个文件已添加
7个文件已修改
1 文件已重命名
284 ■■■■■ 已修改文件
src/api/SolidWaste/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasECharts.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasVideo.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/SolidWaste.js 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/directive/dir.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/directive/directive.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/directive/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/MapTemplate.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/SolidWaste/index.js
New file
@@ -0,0 +1,6 @@
import $http from '@utils/axios'
// import Qs from 'qs'
export const getSolidWaste = (data = {}) => {
  return $http.get('/wasteSolid/getSolidWaste', data)
}
src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png
src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png
src/components/BaseNav/PublicBounced/GasComponents/GasECharts.vue
@@ -164,15 +164,14 @@
<style scoped lang="less">
    .win {
        width: 100%;
        height: 100%;
        /*width: 100%;*/
        /*height: 100%;*/
        position: relative;
        //display: inline-block;
        background-color: rgba(33, 41, 69,0.9);
    }
    .ShowEcharts{
        position: relative;
        display: inline-block;
        border: 1px solid #0B89B5;
        background: #243a55;
        margin: 10px;
src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue
@@ -37,7 +37,6 @@
.win {
  position: relative;
  //display: inline-block;
  margin-bottom: 13px;
  background-color: rgba(33, 41, 69,0.9);
}
@@ -46,7 +45,6 @@
  height: 100%;
  .main-matter{
    font-size: 13px;
    padding: 9px 7px;
    font-weight: normal;
    border: 1px solid #396d83;
    .row-item-one{
@@ -56,7 +54,7 @@
      width: 100%;
      color: #00d0f9;
      display: flex;
      font-size: 12px!important;
      font-size: 12px !important;
      .el-col{
        flex: 1;
        width: 100%;
@@ -73,7 +71,7 @@
  }
}
.border_corner{
  z-index: 2500;
  z-index: 999;
  position: absolute;
  width: 10px;
  height: 10px;
@@ -104,20 +102,4 @@
  border-left: none;
  border-top: none;
}
//.el-row {
//  width: 100%;
//  color: #00d0f9;
//  .el-col{
//    width: 180px;
//    height: 28px;
//    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/GasVideo.vue
@@ -7,7 +7,7 @@
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <div class="main-video">
        <video width="100%" height="100%" controls>
        <video controls>
          <source src="movie.mp4" type="video/mp4">
          <source src="movie.ogg" type="video/ogg">
        </video>
@@ -24,23 +24,25 @@
<style scoped lang="less">
.win {
  /*width: 100%;*/
  /*height: 100%;*/
  position: relative;
  //display: inline-block;
  background-color: rgba(33, 41, 69,0.9);
/*//border: 1px solid #396d83;*/
}
.main {
  width: 100%;
  height: 100%;
  .main-video {
    padding: 7px;
    border: 1px solid #396d83;
    //border: 1px solid #396d83;
    width: 100%;
    height: 100%;
    video {
      width: 100%;
      height: 100%;
      outline: none;
    }
  }
}
.border_corner{
  z-index: 2500;
  z-index: 999;
  position: absolute;
  width: 14px;
  height: 14px;
src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue
@@ -1,53 +1,48 @@
<template>
  <div class="public-table">
    <table border="1">
      <tr>
        <th>111</th>
        <th>111</th>
        <th>111</th>
        <th>111</th>
        <th>111</th>
        <th>111</th>
      </tr>
      <tr>
        <td>4444444444</td>
        <td>4444444444</td>
        <td>4444444444</td>
        <td>4444444444</td>
        <td>4444444444</td>
        <td>4444444444</td>
      </tr>
    </table>
    <el-col class="el-col">
      <el-table
          border
          tooltip-effect="dark"
          :data="data"
      >
        <el-table-column prop="name" label="序号"></el-table-column>
        <el-table-column prop="name" label="类别"></el-table-column>
        <el-table-column prop="date" label="固废名称"></el-table-column>
        <el-table-column prop="address" label="代码"></el-table-column>
        <el-table-column prop="address" label="产生量"></el-table-column>
        <el-table-column prop="name" label="储存量"></el-table-column>
        <el-table-column prop="date" label="产生装置"></el-table-column>
      </el-table>
    </el-col>
  </div>
</template>
<script>
export default {
  name: 'PublicTable',
  props: ['requestSolidWasteData'],
  data () {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
      data: []
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.getSolidWasteData()
    })
  },
  methods: {
    getSolidWasteData () {
      // const data = requestSolidWasteData
      // console.log(data)
    }
  }
}
</script>
<style lang="less" scoped>
.public-table {
}
</style>
src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -7,7 +7,7 @@
    <div class="public-bounced-content">
      <div class="public-bounced-content-left">
        <GasTab :displayContent="displayContent"></GasTab>
        <PublicTable v-if="value === 'gufei'"></PublicTable>
        <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>
        <GasECharts v-else></GasECharts>
      </div>
      <div class="public-bounced-content-right">
@@ -19,7 +19,7 @@
<script>
import '@/components/BaseNav/SolidWaste/directive'
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'
@@ -54,10 +54,11 @@
<style lang="less" scoped>
.public-bounced {
  width: 75%;
  z-index: 999;
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: 5%;
  left: 15%;
  background-color: #002432;
  border: 1px #9fc5c8 solid;
@@ -82,14 +83,19 @@
  }
  .public-bounced-content {
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    .public-bounced-content-left {
      width: 48%;
      height: 100%;
    }
    .public-bounced-content-right {
      width: 48%;
      height: 100%;
    }
  }
}
src/components/BaseNav/SolidWaste/SolidWaste.js
@@ -67,7 +67,7 @@
            // console.log(this.map.setCenter([e.target.getLatLng().lat, e.target.getLatLng().lng]))
            // this.map.flyTo([e.target.getLatLng().lat, e.target.getLatLng().lng])
            // this.map.panTo([e.target.getLatLng().lat, e.target.getLatLng().lng], 100)
            this.setPanTo(e.target.getLatLng(), 30)
            this.setPanTo(e.target.getLatLng(), 250)
            this.EffectOfPulse(e.target.getLatLng())
            this.SolidWastePopup.setData(data[i], 'gufei')
            return this.SolidWastePopup.$el
@@ -87,8 +87,9 @@
    position = this.map.latLngToLayerPoint(position)
    position.y += value
    position = this.map.layerPointToLatLng(position)
    this.map.setView(position)
    // this.map.flyTo(position)
    // this.map.setView(position)
    this.map.flyTo(position)
    // this.map.panTo(position)
  }
  // 固废点击进行的 内容的设置
@@ -121,32 +122,32 @@
  // 脉冲效果设置实现
  EffectOfPulse (position, markers, layerGroup) {
    // 区分直接执行 和判断执行的不同区别
    var differentColor = ''
    if (markers) {
      differentColor = '#ff0000'
    } else {
      differentColor = '#98FB98'
    }
    // 坐标数据:报警传进来的是数组 / 点击传进来的是object
    var FinalPosition = position instanceof Array ? {
      lat: position[0],
      lng: position[1]
    } : position
    // 插件 效果实现
    var pulsingIcon = this.L.icon.pulse({
      iconSize: [20, 20],
      color: differentColor,
      fillColor: ''
    })
    if (markers) {
      // markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon }))
      // this.L.layerGroup(markers).addLayer(layerGroup)
    } else {
      var picGroupMarker = new this.L.FeatureGroup()
      this.L.marker(FinalPosition, { icon: pulsingIcon }).addTo(picGroupMarker)
      this.pulseHeighLightMarker = picGroupMarker.addTo(this.SolidWasteLayerGroup)
      this.PulseCountSetting()
    }
    // var differentColor = ''
    // if (markers) {
    //   differentColor = '#ff0000'
    // } else {
    //   differentColor = '#98FB98'
    // }
    // // 坐标数据:报警传进来的是数组 / 点击传进来的是object
    // var FinalPosition = position instanceof Array ? {
    //   lat: position[0],
    //   lng: position[1]
    // } : position
    // // 插件 效果实现
    // var pulsingIcon = this.L.icon.pulse({
    //   iconSize: [20, 20],
    //   color: differentColor,
    //   fillColor: ''
    // })
    // if (markers) {
    //   // markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon }))
    //   // this.L.layerGroup(markers).addLayer(layerGroup)
    // } else {
    //   var picGroupMarker = new this.L.FeatureGroup()
    //   this.L.marker(FinalPosition, { icon: pulsingIcon }).addTo(picGroupMarker)
    //   this.pulseHeighLightMarker = picGroupMarker.addTo(this.SolidWasteLayerGroup)
    //   this.PulseCountSetting()
    // }
  }
  // 对图标脉冲 进行set设置  // 高亮图层
src/components/BaseNav/SolidWaste/directive/dir.js
File was renamed from src/components/BaseNav/SolidWaste/directive.js
@@ -56,4 +56,4 @@
    delete el._dragEnd
    delete el._checkPosition
  }
})
})
src/components/BaseNav/SolidWaste/directive/directive.js
New file
@@ -0,0 +1,77 @@
export default {
  bind (el, binding, vnode) {
    const dialogHeaderEl = el.querySelector('.el-dialog__header')
    const dragDom = el.querySelector('.el-dialog')
    dialogHeaderEl.style.cssText += ';cursor:move;'
    dragDom.style.cssText += ';top:0px;'
    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
    const getStyle = (function () {
      if (window.document.currentStyle) {
        return (dom, attr) => dom.currentStyle[attr]
      } else {
        return (dom, attr) => getComputedStyle(dom, false)[attr]
      }
    })()
    dialogHeaderEl.onmousedown = (e) => {
      // 鼠标按下,计算当前元素距离可视区的距离
      const disX = e.clientX - dialogHeaderEl.offsetLeft
      const disY = e.clientY - dialogHeaderEl.offsetTop
      const dragDomWidth = dragDom.offsetWidth
      const dragDomHeight = dragDom.offsetHeight
      const screenWidth = document.body.clientWidth
      const screenHeight = document.body.clientHeight
      const minDragDomLeft = dragDom.offsetLeft
      const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
      const minDragDomTop = dragDom.offsetTop
      const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight
      // 获取到的值带px 正则匹配替换
      let styL = getStyle(dragDom, 'left')
      let styT = getStyle(dragDom, 'top')
      if (styL.includes('%')) {
        styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
        styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
      } else {
        styL = +styL.replace(/\px/g, '')
        styT = +styT.replace(/\px/g, '')
      }
      document.onmousemove = function (e) {
        // 通过事件委托,计算移动的距离
        let left = e.clientX - disX
        let top = e.clientY - disY
        // 边界处理
        if (-(left) > minDragDomLeft) {
          left = -minDragDomLeft
        } else if (left > maxDragDomLeft) {
          left = maxDragDomLeft
        }
        if (-(top) > minDragDomTop) {
          top = -minDragDomTop
        } else if (top > maxDragDomTop) {
          top = maxDragDomTop
        }
        // 移动当前元素
        dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
        // emit onDrag event
        vnode.child.$emit('dragDialog')
      }
      document.onmouseup = function (e) {
        document.onmousemove = null
        document.onmouseup = null
      }
    }
  }
}
src/components/BaseNav/SolidWaste/directive/index.js
New file
@@ -0,0 +1,14 @@
// import drag from './drag'
import drag from './directive'
const install = function (Vue) {
  Vue.directive('el-drag-dialog', drag)
}
if (window.Vue) {
  window['el-drag-dialog'] = drag
  Vue.use(install) // eslint-disable-line
}
drag.install = install
export default drag
src/views/MapTemplate.vue
@@ -165,7 +165,7 @@
      this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 初始化动态要素图层助手
      this.vectorLayerHelper.initVectorLayers(this.config)
      // this.ChangeState()
      this.ChangeState()
      // this.AddGasHelper()
      // this.ChangeWaterState()