派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-20 8e182aa12fcba7ed25c2d65a6f5e1ae0b2160ab1
装置区问题修复
6个文件已修改
39 ■■■■ 已修改文件
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/favicon.ico 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/helpers/LocateHelper.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerArea.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -13,6 +13,7 @@
  },
  "dependencies": {
    "@jiaminghi/data-view": "^2.10.0",
    "@turf/turf": "^6.3.0",
    "audit": "0.0.6",
    "axios": "^0.21.1",
    "babel-polyfill": "^6.26.0",
public/favicon.ico

public/index.html
@@ -7,7 +7,7 @@
      <meta name="viewport" content="width=device-width">
      <meta http-equiv="X-UA-Compatible" content="IE=11">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <title>中国石化环保一张图</title>
  </head>
  <body>
    <noscript>
src/components/helpers/LocateHelper.js
@@ -22,6 +22,7 @@
  if (filters.length > 0) {
    params.CQL_FILTER = filters.join(' AND ')
  }
  console.log(centerPoint)
  loadPointWfs(centerPoint, params)
}
@@ -130,8 +131,10 @@
  if (type === 'Point') {
    return [coordinates[1], coordinates[0]]
  } else {
    const center = L.geoJSON(feature, {}).getBounds().getCenter()
    return [center.lat, center.lng]
    return L.geoJSON(feature, {}).getBounds().getSouthWest()
    // return [center.lat, center.lng]
    // return turf.centerOfMass(L.geoJSON(feature, {}).toGeoJSON())
  }
}
src/conf/Constants.js
@@ -58,16 +58,17 @@
  hospital: '医院',
  emergencyres: '社会专业应急救援队伍',
  emergencyesources: '应急物资',
  firefightingunit: '消防单位'
  firefightingunit: '消防单位',
  unitareaboundary: '装置区边界'
}
export const LAYERPROPS = {
  // 管网
  pipenetwork: {
    // 管网
    name: '名称',
    linenumtype: '管线类型',
    pipename: '管线名称',
    name: '管网名称',
    linenumtype: '管网类型',
    pipename: '管网名称',
    mediumtype: '输送介质',
    length: '长度(m)',
    startposname: '起点位置名称',
@@ -82,7 +83,7 @@
  // 管线
  pipeline: {
    // 管网
    name: '名称',
    name: '管网名称',
    linenumtype: '管线类型',
    pipename: '管线名称',
    mediumtype: '输送介质',
@@ -311,6 +312,7 @@
  // 水体
  pointhydrology: {
    name: '名称',
    orgname: '企业名称',
    telphonenumber: '联系方式',
    velocityaverage: '年平均流速(m/s)',
    erosiondepthavg: '年平均冲刷深度',
@@ -334,6 +336,7 @@
  // 自然保护区
  pointpreservationzone: {
    name: '名称',
    orgname: '企业名称',
    datasource: '数据来源',
    type: '保护区类型',
    structureoridsitearea: '占地面积',
@@ -343,6 +346,7 @@
  // 医院
  hospital: {
    companyname: '医院名称',
    orgname: '企业名称',
    telephone: '联系电话',
    hospitalleaval: '医院资质等级',
    maxinjurednumber: '可容纳伤员',
@@ -359,6 +363,7 @@
  // 社会专业应急救援队伍
  emergencyres: {
    name: '名称',
    orgname: '企业名称',
    numberteam: '救援人数',
    rescueobject: '主要救援对象',
    resperson: '负责人',
@@ -368,6 +373,7 @@
  // 应急物资
  emergencyesources: {
    resourcesname: '物资名称',
    orgname: '企业名称',
    resourcesnumber: '物资数量',
    ownedstatus: '是否自有物资',
    sourceschargestandard: '物资收费标准',
@@ -378,6 +384,7 @@
  // 消防单位
  firefightingunit: {
    companyname: '消防单位名称',
    orgname: '企业名称',
    pumpernumber: '消防车数量',
    contacttelephone: '联系电话',
    address: '单位地址',
@@ -385,5 +392,12 @@
    ficroute: '交通路线',
    distance: '距离',
    datasource: '数据来源'
  },
  // 装置区
  unitareaboundary: {
    name: '装置区名称',
    code: '装置区编码',
    responsperson: '负责人',
    startdate: '投用日期'
  }
}
src/conf/layers/LayerArea.js
@@ -1,3 +1,5 @@
import { SERVICE_TYPE } from '../Constants'
/**
 * 区域
 */
@@ -12,7 +14,6 @@
      name: '公司',
      sname: '公司', // 表名
      checked: true, // 默认选中状态
      type: 0,
      icon: 'sewers/.png',
      legendImage: '../.././assets/images/map/company_refining.png'
    },
@@ -21,7 +22,6 @@
      name: '码头',
      sname: '码头',
      checked: false, // 默认选中状态
      type: 0,
      icon: 'sewers/码头.png',
      legendImage: '../.././assets/images/map/sewers/码头.png'
    },
@@ -29,6 +29,7 @@
      code: 'sewersAreaZz',
      name: '装置区',
      sname: '装置区',
      type: SERVICE_TYPE.WMS,
      checked: false, // 默认选中状态
      icon: 'sewers/.png',
      typeName: 'sewer:unitareaboundary'