派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-25 9966a7e507a541c8e4e64f2a8a6746b0db4a2fd4
添加固废功能
3个文件已修改
51 ■■■■■ 已修改文件
public/static/SolidWaste.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Sgis.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/axios.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/SolidWaste.json
@@ -1,6 +1,7 @@
{
  "Result": {
    "IsSuccess": 1,
    "code": 1,
    "ErrorMsg": "",
    "DataInfo": [
      {
@@ -63,14 +64,14 @@
        "HazaWasteStorageDate": "0001-01-01T00:00:00",
        "HazaWasteCatgrName": null,
        "SurplusQuantityWarning": 0,
        "LongDayWarning": 1,
        "LongDayWarning": 1.0,
        "DesignFloorArea": 54.0,
        "HazaWasteName": null,
        "EstimateFloorArea": 0.0,
        "HazaWasteDeptName": null,
        "SurplusFloorArea": 54.0,
        "HazaWasteStorageDays": 0.0,
        "StorageQty": 1,
        "StorageQty": 1.0,
        "HazaWasteStorageQty": 0.0,
        "positionX": 32.23092555999756,
        "positionY": 118.75735759735107
src/Sgis.js
@@ -1,22 +1,28 @@
import BasemapHelper from '@components/helpers/BasemapHelper'
import VectorLayerHelper from '@components/helpers/VectorLayerHelper'
// 初始化显示
import ServiceLayerHelper from '@components/helpers/ServiceLayerHelper'
import '@components/plugin/PathDrag'
// import MagicMarker from '@components/plugin/MagicMarker'
// import WmtsSupport from '@components/plugin/wmts_plugins'
import MapConfig from '@/conf/MapConfig'
import '@components/plugin/PathDashFlow' // 流动线图
// import CanvasMarkers from '@components/plugin/CanvasMarkers'
// import FullScreen from '@components/plugin/FullScreen'
import DownLoad from '@components/plugin/DownLoad'
// 测量
import '@components/plugin/leaflet-measure-path/leaflet-measure-path'
import 'leaflet.markercluster'
// import 'leaflet-canvas-markers'
import './components/plugin/Leaflet.GridLayer.FadeOut' // 瓦片图层切换淡入淡出
import './components/plugin/leaflet-canvas-markers' // 画布marker
import './components/plugin/Editable' // 标绘操作
import './components/plugin/MagicMarker' // 动画Marker
import './assets/css/map/magic.min.css' // 动画Marker css
import './components/BaseNav/Pulse'
import './components/BaseNav/Pulse.css'
// import WmtsSupport from '@components/plugin/wmts_plugins'
// import CanvasMarkers from '@components/plugin/CanvasMarkers'
// import FullScreen from '@components/plugin/FullScreen'
// import 'leaflet-canvas-markers'
let map = null
const L = window.L
@@ -35,8 +41,8 @@
  // 全屏
  // FullScreen.init(L)
  // 下载
  DownLoad.init(L)
  // LeafletMeasurePath.init(L)
  DownLoad.init(L)
  map = L.map(div, MapConfig.mapOptions)
@@ -46,7 +52,11 @@
  window.map = map
  window.L = L
  // L.sgis = L.sgis || L
  initTileLayersHelper(map)
  return map
}
@@ -68,7 +78,6 @@
  var serviceLayerHelper = new ServiceLayerHelper({ map })
  return serviceLayerHelper
}
/**
 * 矢量地图初始化
 * @param map
src/utils/axios.js
@@ -117,10 +117,10 @@
// request拦截器
Service.interceptors.request.use(
  config => {
  // 临时追加
  //   if ($store.state.user.account) {
  //     config.headers.account = $store.state.user.account
  //   }
    // 临时追加
    //   if ($store.state.user.account) {
    //     config.headers.account = $store.state.user.account
    //   }
    const copyConfig = Object.assign({}, config)
    // copyConfig = filterOauthData(copyConfig)
    // showDebugInfo(copyConfig)
@@ -139,13 +139,14 @@
// respone拦截器
Service.interceptors.response.use(
  response => {
    const res = response.data
    if (Number(res.code) !== 200 && Number(res.code) !== 0) {
      $T.warning(res.message)
      return Promise.reject(res.message)
    } else {
      return res
    }
    // const res = response.data
    // if (Number(res.code) !== 200 && Number(res.code) !== 0) {
    //   $T.warning(res.message)
    //   return Promise.reject(res.message)
    // } else {
    //   return res
    // }
    return response.data
  },
  error => {
    if (error.message && error.message.includes('timeout')) {