From 8e182aa12fcba7ed25c2d65a6f5e1ae0b2160ab1 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期四, 20 五月 2021 15:09:54 +0800
Subject: [PATCH] 装置区问题修复
---
public/index.html | 2 +-
src/conf/Constants.js | 24 +++++++++++++++++++-----
src/conf/layers/LayerArea.js | 5 +++--
package.json | 1 +
public/favicon.ico | 0
src/components/helpers/LocateHelper.js | 7 +++++--
6 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 49b8c35..badf5d0 100644
--- a/package.json
+++ b/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",
diff --git a/public/favicon.ico b/public/favicon.ico
index df36fcf..9f4f110 100644
--- a/public/favicon.ico
+++ b/public/favicon.ico
Binary files differ
diff --git a/public/index.html b/public/index.html
index d50d35b..83a048b 100644
--- a/public/index.html
+++ b/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>
diff --git a/src/components/helpers/LocateHelper.js b/src/components/helpers/LocateHelper.js
index 0d9935b..9e346c1 100644
--- a/src/components/helpers/LocateHelper.js
+++ b/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())
}
}
diff --git a/src/conf/Constants.js b/src/conf/Constants.js
index d538129..591870e 100644
--- a/src/conf/Constants.js
+++ b/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: '鎶曠敤鏃ユ湡'
}
}
diff --git a/src/conf/layers/LayerArea.js b/src/conf/layers/LayerArea.js
index 6bda76a..f7afbe5 100644
--- a/src/conf/layers/LayerArea.js
+++ b/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'
--
Gitblit v1.8.0