派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-29 096190dfd5b6c0d3ff7ef0f95ea7885f85730f47
废气点动态加载
5个文件已修改
69 ■■■■ 已修改文件
src/api/request.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/SolidWaste/SolidWaste.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/flueGas/flueGas.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/axios.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/MapTemplate.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/request.js
@@ -1,5 +1,6 @@
import $http from '@utils/axios'
import Qs from 'qs'
// import axios from 'axios'
export const QueryStoragePlaceListByCompanyAndName = (data = {}) => {
  return $http.post('/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', Qs.stringify(data), {
@@ -8,22 +9,13 @@
    }
  })
}
export const FlueGas = (url) => {
  return $http.get('./static/airQuality.json')
}
// export function FlueGas () {
//   return axios.post('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
//     companyId: 3900100145,
//     id: '',
//     monType: 2,
//     userCode: 'wenchun.deng',
//     monDuration: '',
//     epName: '',
//     secdDeptId: '',
//     contrLevel: '',
//     dataStatus: '',
//     dataFlag: '',
//     runStatus: '',
//     emissTypeId: ''
//   })
// export const FlueGas = (url) => {
//   return $http.get('./static/airQuality.json')
// }
export function FlueGas (data = {}) {
  return $http.post('EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
src/components/BaseNav/SolidWaste/SolidWaste.js
@@ -18,7 +18,7 @@
  // 请求数据 data 为参数, 请求后台数据时 携带data参数
  requestData (data) {
    QueryStoragePlaceListByCompanyAndName(data).then(res => {
      console.log(res)
      // console.log(res)
      this.DrawTheSolidWasteContent(res.Result.DataInfo)
    }).catch(err => {
      console.log(err)
src/components/flueGas/flueGas.js
@@ -15,8 +15,8 @@
  }
  // 获取数据
  requestData () {
    FlueGas().then(res => {
  requestData (data) {
    FlueGas(data).then(res => {
      console.log(res)
      this.DrawFlueGasContent(res.Result.DataInfo)
    }).catch(err => {
@@ -35,8 +35,8 @@
    }
    for (let i = 0; i < data.length; i++) {
      // 经纬度 位置
      const positionX = data[i].positionX
      const positionY = data[i].positionY
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
      // 判断 经纬度位置信息是否存在
      // if (positionX != null && positionY != null) {
@@ -116,7 +116,7 @@
  // 脉冲效果设置实现
  EffectOfPulse (position, markers, layerGroup) {
    // // 区分直接执行 和判断执行的不同区别
    var differentColor = ''
    let differentColor = ''
    if (markers) {
      differentColor = '#ff0000'
    } else {
src/utils/axios.js
@@ -83,7 +83,7 @@
// 创建axios实例
const Service = axios.create({
  timeout: 1000,
  timeout: 5000,
  baseURL: 'http://10.246.162.140:8080/'
})
src/views/MapTemplate.vue
@@ -20,7 +20,7 @@
<!--    <SolidContent ref="SolidWastePopup"></SolidContent>-->
    <el-button type="primary" @click="AddGasHelper" class="flue-gas">废气</el-button>
    <popup-gas ref="FlueGas"></popup-gas>
    <public-bouncedounced ref="PublicBounced"></public-bouncedounced>
    <PublicBounced ref="PublicBounced"></PublicBounced>
  </div>
</template>
@@ -46,8 +46,7 @@
import AddGasHelper from '@components/flueGas/flueGas'
import PopupGas from '@/components/flueGas/popup-gas'
// // 公共展示数据
// import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
export default {
  name: 'MapTemplate',
  components: {
@@ -63,8 +62,8 @@
    Popup,
    summarySheets,
    // SolidContent,
    PopupGas
    // PublicBounced
    PopupGas,
    PublicBounced
  },
  data () {
    return {
@@ -88,9 +87,23 @@
  },
  methods: {
    AddGasHelper () {
      const data = {
        companyId: 3900100145,
        id: '',
        monType: 2,
        userCode: 'wenchun.deng',
        monDuration: '',
        epName: '',
        secdDeptId: '',
        contrLevel: '',
        dataStatus: '',
        dataFlag: '',
        runStatus: '',
        emissTypeId: ''
      }
      const AddGas = new AddGasHelper({ map: this.map })
      AddGas.requestData()
      AddGas.SetPlueGasContent(this.config, this.$refs.FlueGas)
      AddGas.requestData(data)
      AddGas.SetPlueGasContent(this.config, this.$refs.PublicBounced)
    },
    ChangeState () {
      const data = {