派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-04-09 7ff20fa3438e716cc2b7ff1ad3494af45d183fa4
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

 Conflicts:
 src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
3个文件已修改
215 ■■■■ 已修改文件
src/Sgis.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Temp.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Sgis.js
@@ -20,13 +20,13 @@
let map = null
const L = window.L
const initMap = (div) => {
const initMap = (div, mapOption) => {
  if (map != null) {
    map.remove()
  }
  DownLoad.init(L)
  map = L.map(div, MapConfig.mapOptions)
  const option = mapOption || MapConfig.mapOptions
  map = L.map(div, option)
  map.on('click', (event, a, b) => {
    console.log(event, a, b)
src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -16,61 +16,54 @@
        </div>
        <div class="form-echrts">
            <div class="from-search">
              <div class="layoutFrom">
                <div class="pickerMon">
                  <div class="pickerData pickerDataLeft">
                    <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">
                    <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"
                                type="datetime"
                                v-model="value2"
                        >
                      </el-date-picker>
                      </span>
                  </div>
                </div>
                <div class="sampling">
                  <span>
                     采样点数:
                  </span>
                  <input list="source" id="ipt" class="echatsInput">
                  <datalist id="source">
                    <option value="0" />
                    <option value="25" />
                    <option value="50" />
                    <option value="75" />
                    <option value="100" />
                  </datalist>
                </div>
                <div class="InquiryBtn">
                  <div>查询</div>
                </div>
                <div class="detailBox">
                  <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
                  <el-dialog :visible.sync="dialogVisible"
                             :append-to-body="true"
                             :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"
                             width="68%"
                             center
                             v-dialogDrag
                  >
                    <div class="el-dialog-div" style="height: 500px">
                      <public-detailed-list v-bind="$attrs"></public-detailed-list>
                    </div>
                  </el-dialog>
                </div>
              </div>
            </div>
                <div>
                    采样点数:
                    <input list="source" id="ipt" class="echatsInput">
                    <datalist id="source">
                        <option value="0" />
                        <option value="25" />
                        <option value="50" />
                        <option value="75" />
                        <option value="100" />
                    </datalist>
                </div>
                <div class="detailbtn"  @click="onSubmit">查询</div>
                <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
             </div>
            <div style="width:5rem;height:2rem;" id="echarts" ref="main">
            </div>
        </div>
        <!-- 明细弹框 -->
        <el-dialog :visible.sync="dialogVisible"
                   :append-to-body="true"
                   :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"
                   width="68%"
                   center
                   v-dialogDrag
        >
            <div class="el-dialog-div" style="height: 500px">
                <public-detailed-list v-bind="$attrs"></public-detailed-list>
            </div>
        </el-dialog>
    </div>
</template>
@@ -279,26 +272,6 @@
      return options
    }
  },
  // methods: {
  //   // onSubmit () {
  //   //   console.log('submit!')
  //   // },
  //   drawChart: function () {
  //     const myChart = this.$echarts.init(this.$refs.main)
  //     myChart.setOption(this.options)
  //     window.onresize = function () {
  //       var h1 = document.documentElement.clientHeight// 获取屏幕的高度
  //       if (h1 > 700) {
  //         myChart.getDom().style.height = 3 + 'rem'
  //         myChart.getDom().style.width = 6 + 'rem'
  //       } else {
  //         myChart.getDom().style.height = 3 + 'rem'
  //         myChart.getDom().style.width = 6 + 'rem'
  //       }
  //       myChart.resize()
  //     }
  //   }
  // },
  mounted () {
    this.$nextTick(() => {
      this.drawChart()
@@ -357,50 +330,31 @@
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .from-search{
    margin-top: 6px;
    .layoutFrom{
    display: flex;
      padding:5px;
      >div{margin-left: 10px}
    .pickerMon{
      display: flex;
       .sampling{
        margin-left: 100px;
         >span{
           margin-right: 10px;
         }
      }
      .InquiryBtn{
        margin-left: 30px;
        width: 36px;
        height: 20px;
        font-size: 8px;
        background-color:#2e4967 ;
        text-align: center;
        border-radius: 3px;
      }
      .detailBox{
        margin-left: 30px;
      }
      .pickerMon{
        >div:first-child{
            margin-right: 10px;
        }
      .pickerData{
        flex: 1;
        display: flex;
        .pickerDataLeft{
          margin-left: 10px;
          margin-right: 90px;
        }
        .pickerData{
          flex: 1;
          display: flex;
          >span{
            margin-right: 15px;
          }
          .pickerTable{
            margin-left: 6px;
            width: 40px;
            /deep/.el-input__icon {
              width: 1rem;
              font-size: 0;
          >span{line-height: 22px}
        .pickerTable{
          margin-left: 6px;
            /deep/.el-input__prefix{
            }
          /deep/.el-input__icon {
             font-size: 0;
              width: 100%;
          }
        }
      }
    }
    /deep/.el-date-editor--datetime{
      width: 100%;
    }
    /deep/.el-input__inner{
      position: relative;
@@ -408,7 +362,8 @@
      height: 0.125rem!important;
      background-color: #2e4967;
      color: #ffffff;
      font-size: 8px;
      font-size: 12px;
        height: 24px;
      padding: 0;
      //padding-left:20px ;
      //padding: 0!important;
@@ -418,7 +373,8 @@
      background-color: #2e4967;
      border: none;
      border-radius: 6px;
      width: 40px;
      width: 80px;
        height: 22px;
    }
    .detailbtn{
      background-color:#2e4967;
@@ -426,7 +382,6 @@
      padding: 0 7px;
      line-height: 20px;
      border-radius: 4px;
      margin-right: 6px;
    }
  }
  .el-dialog-div {
src/views/Temp.vue
@@ -35,6 +35,9 @@
// // 公共展示数据
import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
import LayerFactory from '@components/LayerController/service/LayerFactory'
// import '../components/plugin/Leaflet.TileLayer.ProjWMTS'
// import * as L from 'leaflet'
// import * as L from 'leaflet'
const esri = require('esri-leaflet')
// const proj4 = require('proj4')
const proj4 = require('proj4')
@@ -88,7 +91,7 @@
      const mapcontainer = this.$refs.rootmap
      const CRS_4490 = new Proj.CRS('EPSG:4490', '+proj=longlat +ellps=GRS80 +no_defs', {
        resolutions: [
          1.40625,
          // 1.40625,
          0.703125,
          0.3515625,
          0.17578125,
@@ -110,12 +113,30 @@
          2.682209064925356E-6,
          1.3411045324626732E-6
        ],
        origin: [-180, 90]
        origin: [-180, 90],
        // origin: [-400.0, 399.9999999999998],//arcgis 坐标源点
        bounds: this.L.bounds([-180, -90], [180, 90]) // 天地图
      })
      console.log(mapcontainer)
      console.log(CRS_4490)
      debugger
      this.map = Sgis.initMap(mapcontainer)
      const options = {
        crs: CRS_4490,
        // crs: this.L.CRS.EPSG4326,
        minZoom: 3,
        maxZoom: 21,
        // center: [26, 104],
        center: [32.23012597374691, 118.78516085275147],
        // center: [29.454345703125, 113.40362548828125],
        zoom: 3,
        worldCopyJump: false,
        inertia: true,
        zoomControl: false,
        attributionControl: false,
        editable: true,
        preferCanvas: true
      }
      this.map = Sgis.initMap(mapcontainer, options)
      this.$refs.toolBox.map = this.map
      window.popupComp = this.$refs.popup
@@ -127,7 +148,7 @@
      window.layerFactory = layerFactory
      this.basemapHelper = Sgis.initBasemapsHelper(this.map) // 初始化基础底图助手
      this.basemapHelper.initBasemap(this.config, false) // 第二个参数,表示是否内网底图
      this.basemapHelper.initBasemap(this.config, true) // 第二个参数,表示是否内网底图
      // this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 初始化动态要素图层助手
      // this.vectorLayerHelper.initVectorLayers(this.config)
@@ -143,10 +164,15 @@
    },
    loadArcgisImg () {
      // const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer/tile/{z}/{y}/{x}'
      const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer'
      // const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer'
      const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-sinopec/MapServer'
      // const arcgisTileLayer = this.L.tileLayer(url, {
      const arcgisTileLayer = esri.tiledMapLayer({ url: url })
      // const arcgisTileLayer = esri.dynamicMapLayer({ url: url })
      const arcgisTileLayer = esri.tiledMapLayer({
        url: url,
        token: window.tdtToken,
        zoomOffsetAllowance: 0.5
      })
      // const arcgisTileLayer = esri.dynamicMapLayer({ url: url, useCors: true })
      arcgisTileLayer.addTo(this.map)
    },
    onLayerClick () {