From 97b80c664f59abd7e3f2b68cb471e51fbabc55df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98lijianhao=E2=80=99?=
Date: Wed, 27 Jul 2022 10:41:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=99=90=E5=88=B6=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../sections/organization/components/depModal.js | 2 +-
.../organization/components/userModal.js | 4 +---
.../src/sections/quanju/containers/example.js | 11 ++++++-----
.../footer/conserve/right/right-bottom.js | 16 ++++++++++------
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/web/client/src/sections/organization/components/depModal.js b/web/client/src/sections/organization/components/depModal.js
index ae12d57d..59f6ed5e 100644
--- a/web/client/src/sections/organization/components/depModal.js
+++ b/web/client/src/sections/organization/components/depModal.js
@@ -43,7 +43,7 @@ const DepModal = (props) => {
autocomplete: 'new-password'
}}
rules={[
- { required: true, message: '请输入部门名称' }, { max: 20, message: '请输入10个字以内的名称' }
+ { required: true, message: '请输入部门名称' }, { max: 10, message: '请输入10个字以内的名称' }
]}
/>
{
< ProFormText
name={['contract', 'phone']}
@@ -156,7 +155,6 @@ const UserModal = (props) => {
function mapStateToProps(state) {
const { depMessage } = state;
- console.log('depMessage:', depMessage);
const pakData = (dep) => {
// console.log(dep);
return dep.map((d) => {
diff --git a/web/client/src/sections/quanju/containers/example.js b/web/client/src/sections/quanju/containers/example.js
index 62a34a9f..d3bc89f8 100644
--- a/web/client/src/sections/quanju/containers/example.js
+++ b/web/client/src/sections/quanju/containers/example.js
@@ -26,8 +26,7 @@ const Example = (props) => {
useEffect(() => {
- const timer = setTimeout(() => {
- const map = new AMap.Map(MAPID, {
+ const map = new AMap.Map(MAPID, {
//resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块
// center: [115.857952, 28.683003],//地图中心点
@@ -46,7 +45,10 @@ const Example = (props) => {
window.onload = function () {
windowOnload = true;
}
- }, 100);
+
+
+
+
//主题样式
@@ -57,8 +59,7 @@ const Example = (props) => {
})
map.clearMap();
if (map) map.destroy();
- map = null;
- clearTimeout(timer)
+
}
}, [])
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
index efcc9de0..f3f15c41 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
@@ -15,7 +15,7 @@ let underColorList = [
"rgba(255,194,20,0.5)"
]
-const type = ['culvert','', 'road', 'bridge']
+const type = ['culvert', '', 'road', 'bridge']
const RightBottom = (props) => {
const { roadMaintenances } = props
@@ -23,7 +23,7 @@ const RightBottom = (props) => {
let typesNum = null
const list = roadMaintenances?.reportCount?.map((r, index) => {
totalData += Number(r.count)
- if (r.projectType === type[index]) {
+ if (r.projectType === 'culvert' || 'road' || 'bridge') {
typesNum += Number(r.count)
}
switch (r.projectType) {
@@ -41,12 +41,16 @@ const RightBottom = (props) => {
return {
name: '桥梁',
value: r.count
- }
+ };
+ case '其他':
+ return {
+ name: '其他',
+ value: r.count
+ };
}
}).filter(f => f !== undefined)
- const otherNum = totalData - typesNum
- console.log();
- otherNum !== null && list?.push({ name: '其他', value: otherNum })
+ // const otherNum = totalData - typesNum
+ // otherNum !== null && list?.push({ name: '其他', value: otherNum })
const style = { height: "31%", marginTop: "3%" }
return (
<>