派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-09 54a7a67f871e0ee81ed9060aab2203e97226a677
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

 Conflicts:
 src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
 src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue
1个文件已添加
9个文件已修改
427 ■■■■ 已修改文件
package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapUrl.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/PublicVideo.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayer.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/modules/LcServiceLayerFilter.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -16,7 +16,7 @@
    "axios": "^0.18.0",
    "babel-polyfill": "^6.26.0",
    "core-js": "^3.6.5",
    "dayjs": "^1.9.6",
    "dayjs": "^1.10.4",
    "echarts": "^4.2.1",
    "element-ui": "^2.14.1",
    "esri-leaflet": "^3.0.1",
src/api/mapApi.js
@@ -66,5 +66,8 @@
  },
  getCompany (data) {
    return axios.get(mapUrl.getCompany, data)
  },
  DataItems (data) {
    return axios.get(mapUrl.DataItems, data)
  }
}
src/api/mapUrl.js
@@ -12,6 +12,7 @@
export const getWasteGas = $HOST + '/wasteGas/getWasteGas'
export const getWasteGasDetails = $HOST + '/wasteGas/getWasteGasMonitoringDetails'
export const DataItems = $HOST + '/wasteWater/RTDB/DataItems'
export const getWasteGasMonData = $HOST + '/wasteGas/QueryOnlineMonData'
export const getWasteWater = $HOST + '/wasteWater/getWasteWater' // 废水点信息
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -53,31 +53,27 @@
<!--                <option value="Jim">-->
<!--                <option value="Lily">-->
<!--              </datalist>-->
              <el-row type="flex" :gutter="20">
              <el-row type="flex">
                <el-col :span="14">
<!--                  <el-row>-->
<!--                    <el-col :span="12">-->
<!--                      <el-row type="flex" justify="space-between">-->
<!--                        <el-col class="pickerData">-->
<!--                          开始时间:-->
<!--                          <el-date-picker-->
<!--                              type="date">-->
<!--                          </el-date-picker>-->
<!--                        </el-col>-->
<!--                      </el-row>-->
<!--                    </el-col>-->
<!--                    <el-col :span="12" type="flex">-->
<!--                      <el-row type="flex" justify="center">-->
<!--                        <el-col>-->
<!--                          结束时间:-->
<!--                          <el-date-picker-->
<!--                              type="date"-->
<!--                          >-->
<!--                          </el-date-picker>-->
<!--                        </el-col>-->
<!--                      </el-row>-->
<!--                    </el-col>-->
<!--                  </el-row>-->
                  <div class="pickerMon">
                    <div class="pickerData">
                      <span> 开始时间:</span>
                      <span class="pickerTable"><el-date-picker
                          type="datetime"
                          v-model="value1">
                      </el-date-picker></span>
                    </div>
                    <div class="pickerData">
                      <span >结束时间:</span>
                      <span class="pickerTable">
                        <el-date-picker
                            type="datetime"
                            v-model="value2"
                        >
                      </el-date-picker>
                      </span>
                    </div>
                  </div>
                </el-col>
                <el-col :span="5">
                  采样点数:
@@ -89,16 +85,6 @@
                    <option value="75" />
                    <option value="100" />
                  </datalist>
<!--                  <div data-tap-disabled="true">-->
<!--                    采样点数:-->
<!--                    <select id="source">-->
<!--                      <option value="1">0</option>-->
<!--                      <option value="2">25</option>-->
<!--                      <option value="3">50</option>-->
<!--                      <option value="4">75</option>-->
<!--                      <option value="5">100</option>-->
<!--                    </select>-->
<!--                  </div>-->
                </el-col>
                <el-col class="detailbtn" :span="2" @click="onSubmit">查询</el-col>
                <el-col :span="3">
@@ -117,7 +103,7 @@
                </el-col>
              </el-row>
            </div>
            <div style="width:600px;height:200px;" id="echarts" ref="main">
            <div style="width:100%;height:300px;" id="echarts" ref="main">
            </div>
        </div>
    </div>
@@ -133,6 +119,8 @@
  },
  data () {
    return {
      value1: '',
      value2: '',
      watchData: [],
      dialogVisible: false,
      myChar: null,
@@ -382,20 +370,40 @@
.form-echrts {
  width: 100%;
  height: 1rem;
  height: 2rem;
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .from-search{
    //display: flex;
    //justify-content: space-between;
    .pickerData{
    margin-top: 6px;
    .pickerMon{
      display: flex;
      justify-content: space-between;
      .pickerData{
        flex: 1;
        display: flex;
        .pickerTable{
          margin-left: 6px;
          width: 40px;
          /deep/.el-input__icon {
            width: 0.9rem;
            font-size: 0;
          }
        }
      }
    }
    /deep/.el-date-editor--datetime{
      width: 100%;
    }
    /deep/.el-input__inner{
      width: 40px!important;
      height: 16px!important;
      position: relative;
      width: 0.9rem!important;
      height: 0.125rem!important;
      background-color: #2e4967;
      color: #ffffff;
      font-size: 8px;
      padding: 0;
      //padding-left:20px ;
      //padding: 0!important;
    }
    .echatsInput{
      color: #00ffff;
@@ -419,25 +427,12 @@
    //overflow: hidden;
  }
        .from-search {
            background-color: red;
            .date{
                width: 200px;
                height: 30px;
                padding: 0;
                border: none;
                .el-icon-time{
                    line-height: 30px;
                }
            }
        }
        #echarts {
            margin: 0;
            padding: 0;
            //height: 3rem;
            //border: 1px solid #396d83;
            //margin: 10px 10px 10px 10px;
        }
    }
  #echarts {
    margin: 0;
    padding: 0;
    //height: 3rem;
    //border: 1px solid #396d83;
    //margin: 10px 10px 10px 10px;
  }
}
</style>
src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue
New file
@@ -0,0 +1,196 @@
<template>
  <div style="width:100%;height:2rem;" ref="echarts"></div>
</template>
<script>
import mapApi from '@/api/mapApi'
import 'dayjs/locale/es'
import dayjs from 'dayjs'
export default {
  name: 'ECharts',
  data () {
    return {
      myChart: [],
      dataDate: [],
      value: '',
      seriesData: [],
      aseries: '',
      result: [],
      days: dayjs(new Date()).format('YYYYMMDDHHmmss')
    }
  },
  methods: {
    drawChart (result) {
      // const result = this.result
      this.myChart = this.$echarts.init(this.$refs.echarts)
      // setInterval(function () {
      // }, 3000)
      const option = {
        title: {
          text: '折线图堆叠'
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
        },
        grid: {
          containLabel: true
        },
        toolbox: {
          feature: {
            saveAsImage: {
              show: false
            }
          }
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          // data: seriesData,
          data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1
            }
          }
        },
        yAxis: {
          type: 'value',
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1
            }
          }
        },
        series: [
          {
            name: '邮件营销',
            type: 'line',
            stack: '总量',
            data: [120, 132, 101, 134, 90, 230, 210]
          },
          {
            name: '联盟广告',
            type: 'line',
            stack: '总量',
            data: [220, 182, 191, 234, 290, 330, 310]
          },
          {
            name: '视频广告',
            type: 'line',
            stack: '总量',
            data: [150, 232, 201, 154, 190, 330, 410]
          },
          {
            name: '直接访问',
            type: 'line',
            stack: '总量',
            data: [320, 332, 301, 334, 390, 330, 320]
          },
          {
            name: '搜索引擎',
            type: 'line',
            stack: '总量',
            data: [820, 932, 901, 934, 1290, 1330, 1320]
          }
        ]
      }
      this.myChart.setOption(option)
    },
    async echartsData () {
      const addDays = dayjs().add(300, 'day')
      const data = {
        $tagCodeList: 'TJIP45.yyqAI90305,TJIP45.yyqAI90303,TJIP45.yyqFI_90310N,TJIP45.yyqAI90304,TJIP45.yyqAIR001',
        $startTime: this.dayjs,
        $endTime: addDays,
        $step: 15
      }
      const result = await mapApi.DataItems(data)
      this.result = result.data
    },
    // 数据的请求
    requestEcharts () {
      setInterval(async () => {
        const addDays = dayjs().add(300, 'day')
        const data = {
          $tagCodeList: 'TJIP45.yyqAI90305,TJIP45.yyqAI90303,TJIP45.yyqFI_90310N,TJIP45.yyqAI90304,TJIP45.yyqAIR001',
          $startTime: this.dayjs,
          $endTime: addDays,
          $step: 15
        }
        const result = await mapApi.DataItems(data)
        this.result = result.data
        for (let i = 0; i < result.length; i++) {
          //   // console.log(result[i])
          const seriesData = []
          const aseries = []
          // let nameData = ''
          seriesData.push(result[i].ReadTime)
          aseries.push(result[i].TagValue)
          // nameData = result[i].UnionTagCode
          this.aseries = result[i].UnionTagCode
        }
        this.myChart.setOption({
          series: [{
            data: data
          }]
        })
      }, 3000)
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.requestEcharts()
      this.drawChart()
    })
  }
}
</script>
<style scoped lang="less">
.Infomation {
  margin-left: 10px;
  height: 0.2rem;
}
.el-tag {
  height: 25px;
  width: 140px;
  line-height: 25px;
  margin-right: 10px;
  font-size: 10px;
  background-color: rgba(0, 255, 246, 0.14);
  color: #00d0f9;
  border: none;
  padding: 0 15px;
}
.form-echrts {
  width: 100%;
  height: 1rem;
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .el-dialog-div {
    //height: 50vh!important;
    overflow: auto;
    //overflow: hidden;
  }
  #echarts {
    margin: 0;
    padding: 0;
    //height: 3rem;
    //border: 1px solid #396d83;
    //margin: 10px 10px 10px 10px;
  }
}
</style>
src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue
@@ -48,9 +48,10 @@
.win {
  position: relative;
  margin-bottom: 13px;
  /*margin-bottom: 13px;*/
  background-color: rgba(33, 41, 69, 0.9);
  border: 0.8px solid #396d83;
  /*height: 1.5rem;*/
}
.border_corner {
src/components/BaseNav/PublicBounced/GasComponents/PublicVideo.vue
@@ -27,11 +27,12 @@
  position: relative;
  background-color: rgba(33, 41, 69, 0.9);
  //height: 2rem;
  width: 3rem;
}
.main {
  border: 1px solid #396d83;
  padding: 5px;
  //padding: 5px;
  height: 2rem;
  video {
src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -1,5 +1,6 @@
<template>
  <div class="public-bounced" v-drag v-if="flag">
    <!--    <Echarts></Echarts>-->
    <div class="public-bounced-title">
      <span>{{ displayContentTitle }}</span>
      <i class="el-icon-circle-close" @click="closePopup"></i>
@@ -27,6 +28,8 @@
<script>
// import Echarts from '@components/BaseNav/PublicBounced/GasComponents/Echarts'
import '@/components/BaseNav/SolidWaste/directive/dir'
import PublicTabs from '@components/BaseNav/PublicBounced/GasComponents/PublicTabs'
import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable'
@@ -36,6 +39,7 @@
export default {
  name: 'PublicBounced',
  components: {
    // Echarts
    PublicTabs,
    PublicTable,
    PublicChart,
@@ -94,16 +98,10 @@
<style lang="less" scoped>
.public-bounced {
  width: 8rem;
  //height: 2.6rem;
  //width: 70vw;
  //height: 30vh;
  z-index: 999;
  position: absolute;
  //bottom: 2rem;
  //left: 5rem;
  top: 15%;
  left: 15%;
  left: 20%;
  background-color: #002432;
  border: 1px #9fc5c8 solid;
@@ -130,17 +128,18 @@
  }
  .public-bounced-content {
    margin: 0.2rem auto !important;
    padding: 0.1rem;
    display: flex;
    //align-items: center;
    justify-content: space-around;
    //justify-content: space-around;
    .public-bounced-content-left {
      width: 4.8rem;
      //width: 4.8rem;
    }
    .public-bounced-content-right {
      width: 3rem;
      //width: 3rem;
      margin-left: 0.1rem;
    }
  }
}
src/components/LayerController/modules/LcServiceLayer.vue
@@ -16,7 +16,7 @@
                                   :name="'wmsSublayers_'+item.code+'_'+itm.code"
                                   :checked="itm.checked"
                                   :value="itm.code"
                                   @change="swWmsLayer(itm)"/>{{ itm.name }}
                                   @change="swAllLayers(itm)"/>{{ itm.name }}
                            <!-- 三级图层遍历 -->
                            <div class="layerbox-item-3">
                                <div class="basemap-layer-item" v-for="layer in itm.layers" :key="layer.code">
@@ -24,7 +24,7 @@
                                           :name="'wmsSublayers_'+item.code+'_'+layer.code"
                                           :checked="layer.checked"
                                           :value="layer.code"
                                           @change="swWmsLayer(layer)"/>
                                           @change="swAllLayers(layer)"/>
                                    <span :style="'color:'+layer.color">{{ layer.name }}</span>
                                </div>
                            </div>
@@ -38,9 +38,7 @@
</template>
<script>
import WfsHelper from '../../helpers/WfsHelper'
import LcServiceLayerFilter from '@components/LayerController/modules/LcServiceLayerFilter'
import AjaxUtils from '../../../utils/AjaxUtils'
export default {
  name: 'LcServiceLayer',
@@ -51,52 +49,33 @@
    }
  },
  mounted () {
    // console.log('03步骤:', this.helper)
    this.updateServiceLayerList()
  },
  methods: {
    swAllLayers (item) {
      // eslint-disable-next-line no-debugger
      item.checked = !item.checked
      for (let i = 0, len = item.layers.length; i < len; ++i) {
        item.layers[i].checked = item.checked
      this.toggleLayer(item)
      this.swLayers(item.layers, item.checked)
    },
    swLayers (layers, checked) {
      if (layers) {
        for (let i = 0, len = layers.length; i < len; ++i) {
          var layer = layers[i]
          layer.checked = checked
          this.toggleLayer(layer)
          if (layer.layers) {
            this.swLayers(layer.layers, checked)
          }
        }
      }
      this.updateWms()
    },
    loadWfs () {
      var wfsHelper = new WfsHelper()
      wfsHelper.addTypeName('管线点')
      wfsHelper.addEquals('pipename', '研究院01路YS000001')
      AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}, (res) => {
        console.log(res)
      })
    },
    swWmsLayer (itm) {
      itm.checked = !itm.checked
    toggleLayer (itm) {
      if (itm.checked) {
        window.layerFactory.show(itm)
      } else {
        window.layerFactory.hide(itm)
      }
      // this.updateWms()
    },
    updateServiceLayerList () {
    },
    updateWms () {
      var mapConfig = this.mapConfig
      var wmsHelper = new WfsHelper()
      wmsHelper.initMapConfig(mapConfig)
      var wmsLayersMap = wmsHelper.getWmsLayersMap()
      for (var k in wmsLayersMap) {
        var layers = wmsLayersMap[k]
        var tileLayer = window.serviceLayerHelper.getTileLayer(k)
        if (tileLayer) {
          tileLayer.setParams({ layers: layers.join(',') }, false)
          tileLayer.setUrl(tileLayer.config.url, false)
        }
      }
    }
  }
}
src/components/LayerController/modules/LcServiceLayerFilter.vue
@@ -9,7 +9,7 @@
                    <div class="content">
                        <div v-for="filter in item.layers" :key="filter.code">
                            <input type="checkbox" :value="filter.code" :checked="filter.checked"
                                   @change="swSubFilter(item.url,filter)"><label
                                   @change="swAllSubFilter(filter)"><label
                                :title="filter.name">{{filter.name}}</label>
                        </div>
                    </div>
@@ -20,7 +20,6 @@
</template>
<script>
import { mapMutations } from 'vuex'
import { LayerSewersPoint } from '@src/conf/layers/LayerSewers'
export default {
@@ -43,12 +42,26 @@
    }
  },
  methods: {
    ...mapMutations([]),
    swAllSubFilter (item) {
      // eslint-disable-next-line no-debugger
      item.checked = !item.checked
      // window.serviceLayerHelper.loadLayers()
      this.toggleLayer(item)
      this.swLayers(item.layers, item.checked)
    },
    swLayers (layers, checked) {
      if (layers) {
        for (let i = 0, len = layers.length; i < len; ++i) {
          var layer = layers[i]
          layer.checked = checked
          this.toggleLayer(layer)
          if (layer.layers) {
            this.swLayers(layer.layers, checked)
          }
        }
      }
    },
    // todo 还需要优化,在有多个需要子图层独立弹窗情况下无效
    // 监听上级图层存在独立弹窗的选中情况
    toggle (serviceLayers) {
      if (serviceLayers) {
        for (var i = 0; i < serviceLayers.length; i++) {
@@ -76,8 +89,7 @@
        }
      }
    },
    swSubFilter (url, item) {
      item.checked = !item.checked
    toggleLayer (item) {
      if (item.checked) {
        window.layerFactory.show(item)
      } else {